diff --git a/angular-bare-bones-demo/dist/110.a397f78a35145eea.js b/angular-bare-bones-demo/dist/110.a397f78a35145eea.js new file mode 100644 index 000000000..0c2346415 --- /dev/null +++ b/angular-bare-bones-demo/dist/110.a397f78a35145eea.js @@ -0,0 +1 @@ +(self.webpackChunkAngular_bare_bones_demo=self.webpackChunkAngular_bare_bones_demo||[]).push([[110],{4110:(mt,dt,lt)=>{"use strict";lt.r(dt),lt.d(dt,{getWalletConnectProviderInstance:()=>s});var ge=lt(3667),z=lt.n(ge),s=function(m){return function(m,y,n,o){return new(n||(n=Promise))(function(t,i){function c(d){try{u(o.next(d))}catch(_){i(_)}}function h(d){try{u(o.throw(d))}catch(_){i(_)}}function u(d){d.done?t(d.value):function e(t){return t instanceof n?t:new n(function(i){i(t)})}(d.value).then(c,h)}u((o=o.apply(m,y||[])).next())})}(void 0,void 0,void 0,function(){return function(m,y){var o,e,t,i,n={label:0,sent:function(){if(1&t[0])throw t[1];return t[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(u){return function(d){return function h(u){if(o)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(n=0)),n;)try{if(o=1,e&&(t=2&u[0]?e.return:u[0]?e.throw||((t=e.return)&&t.call(e),0):e.next)&&!(t=t.call(e,u[1])).done)return t;switch(e=0,t&&(u=[2&u[0],t.value]),u[0]){case 0:case 1:t=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,e=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(!(t=(t=n.trys).length>0&&t[t.length-1])&&(6===u[0]||2===u[0])){n=0;continue}if(3===u[0]&&(!t||u[1]>t[0]&&u[1]>>0).toString(2))}function D(F){return new Uint8Array(function M(F,B=8){const N=x(F).match(new RegExp(`.{${B}}`,"gi"));return Array.from(N||[])}(F).map(B=>parseInt(B,2)))}function q(F,B){return!("string"!=typeof F||!F.match(/^0x[0-9A-Fa-f]*$/)||B&&F.length!==2+2*B)}function k(F){return s.isBuffer(F)}function p(F){return y.a.strict(F)&&!k(F)}function E(F){return!p(F)&&!k(F)&&void 0!==F.byteLength}function R(F){return k(F)?"buffer":p(F)?"typed-array":E(F)?"array-buffer":Array.isArray(F)?"array":typeof F}function r(F){return"string"==typeof(B=F)&&new RegExp(/^[01]+$/).test(B)&&B.length%8==0?"binary":q(F)?"hex":"utf8";var B}function a(...F){return s.concat(F)}function g(...F){let B=[];return F.forEach(N=>B=B.concat(Array.from(N))),new Uint8Array([...B])}function x(F,B=8,N="0"){return function(P,j,K="0"){return function W(F,B,N,P="0"){const j=B-F.length;let K=F;if(j>0){const Z=P.repeat(j);K=N?Z+F:F+Z}return K}(P,j,!0,K)}(F,function(P,j=8){const K=P%j;return K?(P-K)/j*j+j:P}(F.length,B),N)}function C(F){return F.replace(/^0x/,"")}function U(F){return F.startsWith("0x")?F:"0x"+F}function V(F){return(F=x(F=C(F),2))&&(F=U(F)),F}function I(F){const B=F.startsWith("0x");return F=(F=C(F)).startsWith("0")?F.substring(1):F,B?U(F):F}}).call(this,f(2).Buffer)},function(z,l,f){"use strict";f.r(l);var s=f(76);const m=["session_request","session_update","exchange_key","connect","disconnect","display_uri","modal_closed","transport_open","transport_close","transport_error"],y=["eth_sendTransaction","eth_signTransaction","eth_sign","eth_signTypedData","eth_signTypedData_v1","eth_signTypedData_v2","eth_signTypedData_v3","eth_signTypedData_v4","personal_sign","wallet_addEthereumChain","wallet_switchEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],n=["eth_accounts","eth_chainId","net_version"],o={1:"mainnet",3:"ropsten",4:"rinkeby",5:"goerli",42:"kovan"};var e=f(9),t=f.n(e),i=f(0);function c(Q){return i.b(new Uint8Array(Q))}function h(Q){return i.e(new Uint8Array(Q))}function u(Q,se){return i.c(new Uint8Array(Q),!se)}function d(Q){return i.d(new Uint8Array(Q))}function _(...Q){return i.n(Q.map(se=>i.c(new Uint8Array(se))).join("")).buffer}function v(Q){return i.f(Q).buffer}function T(Q){return i.i(Q)}function O(Q,se){return i.g(Q,!se)}function b(Q){return i.h(Q)}function S(...Q){return i.k(...Q)}function w(Q){return i.z(Q).buffer}function A(Q){return i.A(Q)}function L(Q,se){return i.B(Q,!se)}function H(Q){return new t.a(Q,10).toNumber()}function D(Q){return i.o(Q)}function q(Q){return i.n(Q).buffer}function k(Q){return i.p(Q)}function p(Q){return new t.a(i.x(Q),"hex").toNumber()}function E(Q){return i.v(Q)}function R(Q){return i.u(Q).buffer}function r(Q){return new t.a(Q).toString()}function a(Q,se){const le=i.x(i.y(new t.a(Q).toString(16)));return se?le:i.a(le)}var g=f(160);function M(Q){return i.y(Q)}function x(Q){return i.a(Q)}function C(Q){return i.x(Q)}function U(Q){return i.w(i.a(Q))}const V=f(161).payloadId;function I(){return((Q,se)=>{for(se=Q="";Q++<36;se+=51*Q&52?(15^Q?8^Math.random()*(20^Q?16:4):4).toString(16):"-");return se})()}function W(){console.warn("DEPRECATION WARNING: This WalletConnect client library will be deprecated in favor of @walletconnect/client. Please check docs.walletconnect.org to learn more about this migration!")}function F(Q,se){let le;const Le=o[Q];return Le&&(le=`https://${Le}.infura.io/v3/${se}`),le}function B(Q,se){let le;const Le=F(Q,se.infuraId);return se.custom&&se.custom[Q]?le=se.custom[Q]:Le&&(le=Le),le}function N(Q){return""===Q||"string"==typeof Q&&""===Q.trim()}function P(Q){return!(Q&&Q.length)}function j(Q){return i.r(Q)}function K(Q){return i.t(Q)}function Z(Q){return i.q(Q)}function J(Q){return i.m(Q)}function X(Q){return i.l(Q)}function ee(Q,se){return i.s(Q,se)}function te(Q){return"object"==typeof Q.params}function oe(Q){return void 0!==Q.method}function ve(Q){return void 0!==Q.result}function ie(Q){return void 0!==Q.error}function de(Q){return void 0!==Q.event}function fe(Q){return m.includes(Q)||Q.startsWith("wc_")}function re(Q){return!!Q.method.startsWith("wc_")||!y.includes(Q.method)}function _e(Q){Q=Object(i.x)(Q.toLowerCase());const se=Object(i.x)(Object(g.keccak_256)(A(Q)));let le="";for(let Le=0;Le7?le+=Q[Le].toUpperCase():le+=Q[Le];return Object(i.a)(le)}const Ke=Q=>!(!Q||"0x"!==Q.toLowerCase().substring(0,2)||!/^(0x)?[0-9a-f]{40}$/i.test(Q)||!/^(0x)?[0-9a-f]{40}$/.test(Q)&&!/^(0x)?[0-9A-F]{40}$/.test(Q)&&Q!==_e(Q));function pe(Q){return P(Q)||ee(Q[0])||(Q[0]=L(Q[0])),Q}function Te(Q){if(void 0!==Q.type&&"0"!==Q.type)return Q;if(void 0===Q.from||!Ke(Q.from))throw new Error("Transaction object must include a valid 'from' value.");function se(he){let Oe=he;return("number"==typeof he||"string"==typeof he&&!N(he))&&(ee(he)?"string"==typeof he&&(Oe=M(he)):Oe=a(he)),"string"==typeof Oe&&(Oe=U(Oe)),Oe}const le={from:M(Q.from),to:void 0===Q.to?void 0:M(Q.to),gasPrice:void 0===Q.gasPrice?"":se(Q.gasPrice),gas:void 0===Q.gas?void 0===Q.gasLimit?"":se(Q.gasLimit):se(Q.gas),value:void 0===Q.value?"":se(Q.value),nonce:void 0===Q.nonce?"":se(Q.nonce),data:void 0===Q.data?"":M(Q.data)||"0x"},Le=["gasPrice","gas","value","nonce"];return Object.keys(le).forEach(he=>{(void 0===le[he]||"string"==typeof le[he]&&!le[he].trim().length)&&Le.includes(he)&&delete le[he]}),le}function Ve(Q,se){return ge(function*(...le){return new Promise((Le,he)=>{Q.apply(se,[...le,(Oe,Ge)=>{null==Oe&&he(Oe),Le(Ge)}])})})}function be(Q){const se=Q.message||"Failed or Rejected Request";let le=-32e3;if(Q&&!Q.code)switch(se){case"Parse error":le=-32700;break;case"Invalid request":le=-32600;break;case"Method not found":le=-32601;break;case"Invalid params":le=-32602;break;case"Internal error":le=-32603;break;default:le=-32e3}const Le={code:le,message:se};return Q.data&&(Le.data=Q.data),Le}var Pe=f(78);function Ye(Q){const se=-1!==Q.indexOf("?")?Q.indexOf("?"):void 0;return void 0!==se?Q.substr(se):""}function we(Q,se){let le=Be(Q);return le=Object.assign(Object.assign({},le),se),$e(le)}function Be(Q){return Pe.parse(Q)}function $e(Q){return Pe.stringify(Q)}function Me(Q){return void 0!==Q.bridge}function je(Q){const se=Q.indexOf(":"),le=-1!==Q.indexOf("?")?Q.indexOf("?"):void 0,Le=Q.substring(0,se),he=function(Ge){const me=Ge.split("@");return{handshakeTopic:me[0],version:parseInt(me[1],10)}}(Q.substring(se+1,le)),Oe=function(Ge){const me=Be(Ge);return{key:me.key||"",bridge:me.bridge||""}}(void 0!==le?Q.substr(le):"");return Object.assign(Object.assign({protocol:Le},he),Oe)}f.d(l,"detectEnv",function(){return s.detectEnv}),f.d(l,"detectOS",function(){return s.detectOS}),f.d(l,"isAndroid",function(){return s.isAndroid}),f.d(l,"isIOS",function(){return s.isIOS}),f.d(l,"isMobile",function(){return s.isMobile}),f.d(l,"isNode",function(){return s.isNode}),f.d(l,"isBrowser",function(){return s.isBrowser}),f.d(l,"getFromWindow",function(){return s.getFromWindow}),f.d(l,"getFromWindowOrThrow",function(){return s.getFromWindowOrThrow}),f.d(l,"getDocumentOrThrow",function(){return s.getDocumentOrThrow}),f.d(l,"getDocument",function(){return s.getDocument}),f.d(l,"getNavigatorOrThrow",function(){return s.getNavigatorOrThrow}),f.d(l,"getNavigator",function(){return s.getNavigator}),f.d(l,"getLocationOrThrow",function(){return s.getLocationOrThrow}),f.d(l,"getLocation",function(){return s.getLocation}),f.d(l,"getCryptoOrThrow",function(){return s.getCryptoOrThrow}),f.d(l,"getCrypto",function(){return s.getCrypto}),f.d(l,"getLocalStorageOrThrow",function(){return s.getLocalStorageOrThrow}),f.d(l,"getLocalStorage",function(){return s.getLocalStorage}),f.d(l,"getClientMeta",function(){return s.getClientMeta}),f.d(l,"safeJsonParse",function(){return s.safeJsonParse}),f.d(l,"safeJsonStringify",function(){return s.safeJsonStringify}),f.d(l,"setLocal",function(){return s.setLocal}),f.d(l,"getLocal",function(){return s.getLocal}),f.d(l,"removeLocal",function(){return s.removeLocal}),f.d(l,"mobileLinkChoiceKey",function(){return s.mobileLinkChoiceKey}),f.d(l,"formatIOSMobile",function(){return s.formatIOSMobile}),f.d(l,"saveMobileLinkInfo",function(){return s.saveMobileLinkInfo}),f.d(l,"getMobileRegistryEntry",function(){return s.getMobileRegistryEntry}),f.d(l,"getMobileLinkRegistry",function(){return s.getMobileLinkRegistry}),f.d(l,"getWalletRegistryUrl",function(){return s.getWalletRegistryUrl}),f.d(l,"getDappRegistryUrl",function(){return s.getDappRegistryUrl}),f.d(l,"formatMobileRegistryEntry",function(){return s.formatMobileRegistryEntry}),f.d(l,"formatMobileRegistry",function(){return s.formatMobileRegistry}),f.d(l,"reservedEvents",function(){return m}),f.d(l,"signingMethods",function(){return y}),f.d(l,"stateMethods",function(){return n}),f.d(l,"infuraNetworks",function(){return o}),f.d(l,"convertArrayBufferToBuffer",function(){return c}),f.d(l,"convertArrayBufferToUtf8",function(){return h}),f.d(l,"convertArrayBufferToHex",function(){return u}),f.d(l,"convertArrayBufferToNumber",function(){return d}),f.d(l,"concatArrayBuffers",function(){return _}),f.d(l,"convertBufferToArrayBuffer",function(){return v}),f.d(l,"convertBufferToUtf8",function(){return T}),f.d(l,"convertBufferToHex",function(){return O}),f.d(l,"convertBufferToNumber",function(){return b}),f.d(l,"concatBuffers",function(){return S}),f.d(l,"convertUtf8ToArrayBuffer",function(){return w}),f.d(l,"convertUtf8ToBuffer",function(){return A}),f.d(l,"convertUtf8ToHex",function(){return L}),f.d(l,"convertUtf8ToNumber",function(){return H}),f.d(l,"convertHexToBuffer",function(){return D}),f.d(l,"convertHexToArrayBuffer",function(){return q}),f.d(l,"convertHexToUtf8",function(){return k}),f.d(l,"convertHexToNumber",function(){return p}),f.d(l,"convertNumberToBuffer",function(){return E}),f.d(l,"convertNumberToArrayBuffer",function(){return R}),f.d(l,"convertNumberToUtf8",function(){return r}),f.d(l,"convertNumberToHex",function(){return a}),f.d(l,"toChecksumAddress",function(){return _e}),f.d(l,"isValidAddress",function(){return Ke}),f.d(l,"parsePersonalSign",function(){return pe}),f.d(l,"parseTransactionData",function(){return Te}),f.d(l,"sanitizeHex",function(){return M}),f.d(l,"addHexPrefix",function(){return x}),f.d(l,"removeHexPrefix",function(){return C}),f.d(l,"removeHexLeadingZeros",function(){return U}),f.d(l,"payloadId",function(){return V}),f.d(l,"uuid",function(){return I}),f.d(l,"logDeprecationWarning",function(){return W}),f.d(l,"getInfuraRpcUrl",function(){return F}),f.d(l,"getRpcUrl",function(){return B}),f.d(l,"promisify",function(){return Ve}),f.d(l,"formatRpcError",function(){return be}),f.d(l,"isWalletConnectSession",function(){return Me}),f.d(l,"parseWalletConnectUri",function(){return je}),f.d(l,"getQueryString",function(){return Ye}),f.d(l,"appendToQueryString",function(){return we}),f.d(l,"parseQueryString",function(){return Be}),f.d(l,"formatQueryString",function(){return $e}),f.d(l,"isEmptyString",function(){return N}),f.d(l,"isEmptyArray",function(){return P}),f.d(l,"isBuffer",function(){return j}),f.d(l,"isTypedArray",function(){return K}),f.d(l,"isArrayBuffer",function(){return Z}),f.d(l,"getType",function(){return J}),f.d(l,"getEncoding",function(){return X}),f.d(l,"isHexString",function(){return ee}),f.d(l,"isJsonRpcSubscription",function(){return te}),f.d(l,"isJsonRpcRequest",function(){return oe}),f.d(l,"isJsonRpcResponseSuccess",function(){return ve}),f.d(l,"isJsonRpcResponseError",function(){return ie}),f.d(l,"isInternalEvent",function(){return de}),f.d(l,"isReservedEvent",function(){return fe}),f.d(l,"isSilentPayload",function(){return re})},function(z,l,f){"use strict";(function(s){var m=f(169),y=f(170),n=f(79);function o(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function e(P,j){if(o()=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|P}function _(P,j){if(t.isBuffer(P))return P.length;if(typeof ArrayBuffer<"u"&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(P)||P instanceof ArrayBuffer))return P.byteLength;"string"!=typeof P&&(P=""+P);var K=P.length;if(0===K)return 0;for(var Z=!1;;)switch(j){case"ascii":case"latin1":case"binary":return K;case"utf8":case"utf-8":case void 0:return F(P).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*K;case"hex":return K>>>1;case"base64":return B(P).length;default:if(Z)return F(P).length;j=(""+j).toLowerCase(),Z=!0}}function v(P,j,K){var Z=!1;if((void 0===j||j<0)&&(j=0),j>this.length||((void 0===K||K>this.length)&&(K=this.length),K<=0)||(K>>>=0)<=(j>>>=0))return"";for(P||(P="utf8");;)switch(P){case"hex":return R(this,j,K);case"utf8":case"utf-8":return k(this,j,K);case"ascii":return p(this,j,K);case"latin1":case"binary":return E(this,j,K);case"base64":return q(this,j,K);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r(this,j,K);default:if(Z)throw new TypeError("Unknown encoding: "+P);P=(P+"").toLowerCase(),Z=!0}}function T(P,j,K){var Z=P[j];P[j]=P[K],P[K]=Z}function O(P,j,K,Z,J){if(0===P.length)return-1;if("string"==typeof K?(Z=K,K=0):K>2147483647?K=2147483647:K<-2147483648&&(K=-2147483648),K=+K,isNaN(K)&&(K=J?0:P.length-1),K<0&&(K=P.length+K),K>=P.length){if(J)return-1;K=P.length-1}else if(K<0){if(!J)return-1;K=0}if("string"==typeof j&&(j=t.from(j,Z)),t.isBuffer(j))return 0===j.length?-1:b(P,j,K,Z,J);if("number"==typeof j)return j&=255,t.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?J?Uint8Array.prototype.indexOf.call(P,j,K):Uint8Array.prototype.lastIndexOf.call(P,j,K):b(P,[j],K,Z,J);throw new TypeError("val must be string, number or Buffer")}function b(P,j,K,Z,J){var X,ee=1,te=P.length,oe=j.length;if(void 0!==Z&&("ucs2"===(Z=String(Z).toLowerCase())||"ucs-2"===Z||"utf16le"===Z||"utf-16le"===Z)){if(P.length<2||j.length<2)return-1;ee=2,te/=2,oe/=2,K/=2}function ve(re,_e){return 1===ee?re[_e]:re.readUInt16BE(_e*ee)}if(J){var ie=-1;for(X=K;Xte&&(K=te-oe),X=K;X>=0;X--){for(var de=!0,fe=0;feJ&&(Z=J):Z=J;var X=j.length;if(X%2!=0)throw new TypeError("Invalid hex string");Z>X/2&&(Z=X/2);for(var ee=0;ee>8,ve.push(ee%256),ve.push(te);return ve}(j,P.length-K),P,K,Z)}function q(P,j,K){return m.fromByteArray(0===j&&K===P.length?P:P.slice(j,K))}function k(P,j,K){K=Math.min(P.length,K);for(var Z=[],J=j;J239?4:ve>223?3:ve>191?2:1;if(J+de<=K)switch(de){case 1:ve<128&&(ie=ve);break;case 2:128==(192&(X=P[J+1]))&&(oe=(31&ve)<<6|63&X)>127&&(ie=oe);break;case 3:ee=P[J+2],128==(192&(X=P[J+1]))&&128==(192&ee)&&(oe=(15&ve)<<12|(63&X)<<6|63&ee)>2047&&(oe<55296||oe>57343)&&(ie=oe);break;case 4:ee=P[J+2],te=P[J+3],128==(192&(X=P[J+1]))&&128==(192&ee)&&128==(192&te)&&(oe=(15&ve)<<18|(63&X)<<12|(63&ee)<<6|63&te)>65535&&oe<1114112&&(ie=oe)}null===ie?(ie=65533,de=1):ie>65535&&(Z.push((ie-=65536)>>>10&1023|55296),ie=56320|1023&ie),Z.push(ie),J+=de}return function(fe){var re=fe.length;if(re<=4096)return String.fromCharCode.apply(String,fe);for(var _e="",Ke=0;KeZ)&&(K=Z);for(var J="",X=j;XK)throw new RangeError("Trying to access beyond buffer length")}function g(P,j,K,Z,J,X){if(!t.isBuffer(P))throw new TypeError('"buffer" argument must be a Buffer instance');if(j>J||jP.length)throw new RangeError("Index out of range")}function M(P,j,K,Z){j<0&&(j=65535+j+1);for(var J=0,X=Math.min(P.length-K,2);J>>8*(Z?J:1-J)}function x(P,j,K,Z){j<0&&(j=4294967295+j+1);for(var J=0,X=Math.min(P.length-K,4);J>>8*(Z?J:3-J)&255}function C(P,j,K,Z,J,X){if(K+Z>P.length)throw new RangeError("Index out of range");if(K<0)throw new RangeError("Index out of range")}function U(P,j,K,Z,J){return J||C(P,0,K,4),y.write(P,j,K,Z,23,4),K+4}function V(P,j,K,Z,J){return J||C(P,0,K,8),y.write(P,j,K,Z,52,8),K+8}l.Buffer=t,l.SlowBuffer=function(P){return+P!=P&&(P=0),t.alloc(+P)},l.INSPECT_MAX_BYTES=50,t.TYPED_ARRAY_SUPPORT=void 0!==s.TYPED_ARRAY_SUPPORT?s.TYPED_ARRAY_SUPPORT:function(){try{var P=new Uint8Array(1);return P.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===P.foo()&&"function"==typeof P.subarray&&0===P.subarray(1,1).byteLength}catch{return!1}}(),l.kMaxLength=o(),t.poolSize=8192,t._augment=function(P){return P.__proto__=t.prototype,P},t.from=function(P,j,K){return i(null,P,j,K)},t.TYPED_ARRAY_SUPPORT&&(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0})),t.alloc=function(P,j,K){return Z=null,X=j,ee=K,c(J=P),J<=0?e(Z,J):void 0!==X?"string"==typeof ee?e(Z,J).fill(X,ee):e(Z,J).fill(X):e(Z,J);var Z,J,X,ee},t.allocUnsafe=function(P){return h(null,P)},t.allocUnsafeSlow=function(P){return h(null,P)},t.isBuffer=function(P){return!(null==P||!P._isBuffer)},t.compare=function(P,j){if(!t.isBuffer(P)||!t.isBuffer(j))throw new TypeError("Arguments must be Buffers");if(P===j)return 0;for(var K=P.length,Z=j.length,J=0,X=Math.min(K,Z);J0&&(P=this.toString("hex",0,j).match(/.{2}/g).join(" "),this.length>j&&(P+=" ... ")),""},t.prototype.compare=function(P,j,K,Z,J){if(!t.isBuffer(P))throw new TypeError("Argument must be a Buffer");if(void 0===j&&(j=0),void 0===K&&(K=P?P.length:0),void 0===Z&&(Z=0),void 0===J&&(J=this.length),j<0||K>P.length||Z<0||J>this.length)throw new RangeError("out of range index");if(Z>=J&&j>=K)return 0;if(Z>=J)return-1;if(j>=K)return 1;if(this===P)return 0;for(var X=(J>>>=0)-(Z>>>=0),ee=(K>>>=0)-(j>>>=0),te=Math.min(X,ee),oe=this.slice(Z,J),ve=P.slice(j,K),ie=0;ieJ)&&(K=J),P.length>0&&(K<0||j<0)||j>this.length)throw new RangeError("Attempt to write outside buffer bounds");Z||(Z="utf8");for(var X=!1;;)switch(Z){case"hex":return S(this,P,j,K);case"utf8":case"utf-8":return w(this,P,j,K);case"ascii":return A(this,P,j,K);case"latin1":case"binary":return L(this,P,j,K);case"base64":return H(this,P,j,K);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,P,j,K);default:if(X)throw new TypeError("Unknown encoding: "+Z);Z=(""+Z).toLowerCase(),X=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},t.prototype.slice=function(P,j){var K,Z=this.length;if((P=~~P)<0?(P+=Z)<0&&(P=0):P>Z&&(P=Z),(j=void 0===j?Z:~~j)<0?(j+=Z)<0&&(j=0):j>Z&&(j=Z),j0&&(J*=256);)Z+=this[P+--j]*J;return Z},t.prototype.readUInt8=function(P,j){return j||a(P,1,this.length),this[P]},t.prototype.readUInt16LE=function(P,j){return j||a(P,2,this.length),this[P]|this[P+1]<<8},t.prototype.readUInt16BE=function(P,j){return j||a(P,2,this.length),this[P]<<8|this[P+1]},t.prototype.readUInt32LE=function(P,j){return j||a(P,4,this.length),(this[P]|this[P+1]<<8|this[P+2]<<16)+16777216*this[P+3]},t.prototype.readUInt32BE=function(P,j){return j||a(P,4,this.length),16777216*this[P]+(this[P+1]<<16|this[P+2]<<8|this[P+3])},t.prototype.readIntLE=function(P,j,K){P|=0,j|=0,K||a(P,j,this.length);for(var Z=this[P],J=1,X=0;++X=(J*=128)&&(Z-=Math.pow(2,8*j)),Z},t.prototype.readIntBE=function(P,j,K){P|=0,j|=0,K||a(P,j,this.length);for(var Z=j,J=1,X=this[P+--Z];Z>0&&(J*=256);)X+=this[P+--Z]*J;return X>=(J*=128)&&(X-=Math.pow(2,8*j)),X},t.prototype.readInt8=function(P,j){return j||a(P,1,this.length),128&this[P]?-1*(255-this[P]+1):this[P]},t.prototype.readInt16LE=function(P,j){j||a(P,2,this.length);var K=this[P]|this[P+1]<<8;return 32768&K?4294901760|K:K},t.prototype.readInt16BE=function(P,j){j||a(P,2,this.length);var K=this[P+1]|this[P]<<8;return 32768&K?4294901760|K:K},t.prototype.readInt32LE=function(P,j){return j||a(P,4,this.length),this[P]|this[P+1]<<8|this[P+2]<<16|this[P+3]<<24},t.prototype.readInt32BE=function(P,j){return j||a(P,4,this.length),this[P]<<24|this[P+1]<<16|this[P+2]<<8|this[P+3]},t.prototype.readFloatLE=function(P,j){return j||a(P,4,this.length),y.read(this,P,!0,23,4)},t.prototype.readFloatBE=function(P,j){return j||a(P,4,this.length),y.read(this,P,!1,23,4)},t.prototype.readDoubleLE=function(P,j){return j||a(P,8,this.length),y.read(this,P,!0,52,8)},t.prototype.readDoubleBE=function(P,j){return j||a(P,8,this.length),y.read(this,P,!1,52,8)},t.prototype.writeUIntLE=function(P,j,K,Z){P=+P,j|=0,K|=0,Z||g(this,P,j,K,Math.pow(2,8*K)-1,0);var J=1,X=0;for(this[j]=255&P;++X=0&&(X*=256);)this[j+J]=P/X&255;return j+K},t.prototype.writeUInt8=function(P,j,K){return P=+P,j|=0,K||g(this,P,j,1,255,0),t.TYPED_ARRAY_SUPPORT||(P=Math.floor(P)),this[j]=255&P,j+1},t.prototype.writeUInt16LE=function(P,j,K){return P=+P,j|=0,K||g(this,P,j,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[j]=255&P,this[j+1]=P>>>8):M(this,P,j,!0),j+2},t.prototype.writeUInt16BE=function(P,j,K){return P=+P,j|=0,K||g(this,P,j,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[j]=P>>>8,this[j+1]=255&P):M(this,P,j,!1),j+2},t.prototype.writeUInt32LE=function(P,j,K){return P=+P,j|=0,K||g(this,P,j,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[j+3]=P>>>24,this[j+2]=P>>>16,this[j+1]=P>>>8,this[j]=255&P):x(this,P,j,!0),j+4},t.prototype.writeUInt32BE=function(P,j,K){return P=+P,j|=0,K||g(this,P,j,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[j]=P>>>24,this[j+1]=P>>>16,this[j+2]=P>>>8,this[j+3]=255&P):x(this,P,j,!1),j+4},t.prototype.writeIntLE=function(P,j,K,Z){if(P=+P,j|=0,!Z){var J=Math.pow(2,8*K-1);g(this,P,j,K,J-1,-J)}var X=0,ee=1,te=0;for(this[j]=255&P;++X>0)-te&255;return j+K},t.prototype.writeIntBE=function(P,j,K,Z){if(P=+P,j|=0,!Z){var J=Math.pow(2,8*K-1);g(this,P,j,K,J-1,-J)}var X=K-1,ee=1,te=0;for(this[j+X]=255&P;--X>=0&&(ee*=256);)P<0&&0===te&&0!==this[j+X+1]&&(te=1),this[j+X]=(P/ee>>0)-te&255;return j+K},t.prototype.writeInt8=function(P,j,K){return P=+P,j|=0,K||g(this,P,j,1,127,-128),t.TYPED_ARRAY_SUPPORT||(P=Math.floor(P)),P<0&&(P=255+P+1),this[j]=255&P,j+1},t.prototype.writeInt16LE=function(P,j,K){return P=+P,j|=0,K||g(this,P,j,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[j]=255&P,this[j+1]=P>>>8):M(this,P,j,!0),j+2},t.prototype.writeInt16BE=function(P,j,K){return P=+P,j|=0,K||g(this,P,j,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[j]=P>>>8,this[j+1]=255&P):M(this,P,j,!1),j+2},t.prototype.writeInt32LE=function(P,j,K){return P=+P,j|=0,K||g(this,P,j,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[j]=255&P,this[j+1]=P>>>8,this[j+2]=P>>>16,this[j+3]=P>>>24):x(this,P,j,!0),j+4},t.prototype.writeInt32BE=function(P,j,K){return P=+P,j|=0,K||g(this,P,j,4,2147483647,-2147483648),P<0&&(P=4294967295+P+1),t.TYPED_ARRAY_SUPPORT?(this[j]=P>>>24,this[j+1]=P>>>16,this[j+2]=P>>>8,this[j+3]=255&P):x(this,P,j,!1),j+4},t.prototype.writeFloatLE=function(P,j,K){return U(this,P,j,!0,K)},t.prototype.writeFloatBE=function(P,j,K){return U(this,P,j,!1,K)},t.prototype.writeDoubleLE=function(P,j,K){return V(this,P,j,!0,K)},t.prototype.writeDoubleBE=function(P,j,K){return V(this,P,j,!1,K)},t.prototype.copy=function(P,j,K,Z){if(K||(K=0),Z||0===Z||(Z=this.length),j>=P.length&&(j=P.length),j||(j=0),Z>0&&Z=this.length)throw new RangeError("sourceStart out of bounds");if(Z<0)throw new RangeError("sourceEnd out of bounds");Z>this.length&&(Z=this.length),P.length-j=0;--J)P[J+j]=this[J+K];else if(X<1e3||!t.TYPED_ARRAY_SUPPORT)for(J=0;J>>=0,K=void 0===K?this.length:K>>>0,P||(P=0),"number"==typeof P)for(X=j;X55295&&K<57344){if(!J){if(K>56319){(j-=3)>-1&&X.push(239,191,189);continue}if(ee+1===Z){(j-=3)>-1&&X.push(239,191,189);continue}J=K;continue}if(K<56320){(j-=3)>-1&&X.push(239,191,189),J=K;continue}K=65536+(J-55296<<10|K-56320)}else J&&(j-=3)>-1&&X.push(239,191,189);if(J=null,K<128){if((j-=1)<0)break;X.push(K)}else if(K<2048){if((j-=2)<0)break;X.push(K>>6|192,63&K|128)}else if(K<65536){if((j-=3)<0)break;X.push(K>>12|224,K>>6&63|128,63&K|128)}else{if(!(K<1114112))throw new Error("Invalid code point");if((j-=4)<0)break;X.push(K>>18|240,K>>12&63|128,K>>6&63|128,63&K|128)}}return X}function B(P){return m.toByteArray(function(j){if((j=(K=j,K.trim?K.trim():K.replace(/^\s+|\s+$/g,"")).replace(I,"")).length<2)return"";for(var K;j.length%4!=0;)j+="=";return j}(P))}function N(P,j,K,Z){for(var J=0;J=j.length||J>=P.length);++J)j[J+K]=P[J];return J}}).call(this,f(6))},function(z,l){z.exports="function"==typeof Object.create?function(f,s){s&&(f.super_=s,f.prototype=Object.create(s.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}))}:function(f,s){if(s){f.super_=s;var m=function(){};m.prototype=s.prototype,f.prototype=new m,f.prototype.constructor=f}}},function(z,l,f){"use strict";f.d(l,"b",function(){return 256}),f.d(l,"g",function(){return 256}),f.d(l,"a",function(){return"AES-CBC"}),f.d(l,"f",function(){return"SHA-256"}),f.d(l,"e",function(){return"HMAC"}),f.d(l,"i",function(){return"SHA-256"}),f.d(l,"j",function(){return"SHA-512"}),f.d(l,"h",function(){return 512}),f.d(l,"d",function(){return"encrypt"}),f.d(l,"c",function(){return"decrypt"}),f.d(l,"k",function(){return"sign"}),f.d(l,"l",function(){return"verify"})},function(z,l){var f,s,m=z.exports={};function y(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function o(v){if(f===setTimeout)return setTimeout(v,0);if((f===y||!f)&&setTimeout)return f=setTimeout,setTimeout(v,0);try{return f(v,0)}catch{try{return f.call(null,v,0)}catch{return f.call(this,v,0)}}}!function(){try{f="function"==typeof setTimeout?setTimeout:y}catch{f=y}try{s="function"==typeof clearTimeout?clearTimeout:n}catch{s=n}}();var e,t=[],i=!1,c=-1;function h(){i&&e&&(i=!1,e.length?t=e.concat(t):c=-1,t.length&&u())}function u(){if(!i){var v=o(h);i=!0;for(var T=t.length;T;){for(e=t,t=[];++c1)for(var O=1;O=49&&g<=54?g-49+10:g>=17&&g<=22?g-17+10:15&g}return R}function c(k,p,E,R){for(var r=0,a=Math.min(k.length,E),g=p;g=49?M-49+10:M>=17?M-17+10:M}return r}e.isBN=function(k){return k instanceof e||null!==k&&"object"==typeof k&&k.constructor.wordSize===e.wordSize&&Array.isArray(k.words)},e.max=function(k,p){return k.cmp(p)>0?k:p},e.min=function(k,p){return k.cmp(p)<0?k:p},e.prototype._init=function(k,p,E){if("number"==typeof k)return this._initNumber(k,p,E);if("object"==typeof k)return this._initArray(k,p,E);"hex"===p&&(p=16),n(p===(0|p)&&p>=2&&p<=36);var R=0;"-"===(k=k.toString().replace(/\s+/g,""))[0]&&R++,16===p?this._parseHex(k,R):this._parseBase(k,p,R),"-"===k[0]&&(this.negative=1),this.strip(),"le"===E&&this._initArray(this.toArray(),p,E)},e.prototype._initNumber=function(k,p,E){k<0&&(this.negative=1,k=-k),k<67108864?(this.words=[67108863&k],this.length=1):k<4503599627370496?(this.words=[67108863&k,k/67108864&67108863],this.length=2):(n(k<9007199254740992),this.words=[67108863&k,k/67108864&67108863,1],this.length=3),"le"===E&&this._initArray(this.toArray(),p,E)},e.prototype._initArray=function(k,p,E){if(n("number"==typeof k.length),k.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(k.length/3),this.words=new Array(this.length);for(var R=0;R=0;R-=3)this.words[r]|=(a=k[R]|k[R-1]<<8|k[R-2]<<16)<>>26-g&67108863,(g+=24)>=26&&(g-=26,r++);else if("le"===E)for(R=0,r=0;R>>26-g&67108863,(g+=24)>=26&&(g-=26,r++);return this.strip()},e.prototype._parseHex=function(k,p){this.length=Math.ceil((k.length-p)/6),this.words=new Array(this.length);for(var E=0;E=p;E-=6)r=i(k,E,E+6),this.words[R]|=r<>>26-a&4194303,(a+=24)>=26&&(a-=26,R++);E+6!==p&&(r=i(k,p,E+6),this.words[R]|=r<>>26-a&4194303),this.strip()},e.prototype._parseBase=function(k,p,E){this.words=[0],this.length=1;for(var R=0,r=1;r<=67108863;r*=p)R++;R--,r=r/p|0;for(var a=k.length-E,g=a%R,M=Math.min(a,a-g)+E,x=0,C=E;C1&&0===this.words[this.length-1];)this.length--;return this._normSign()},e.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},e.prototype.inspect=function(){return(this.red?""};var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function _(k,p,E){E.negative=p.negative^k.negative;var R=k.length+p.length|0;E.length=R,R=R-1|0;var r=0|k.words[0],a=0|p.words[0],g=r*a,x=g/67108864|0;E.words[0]=67108863&g;for(var C=1;C>>26,V=67108863&x,I=Math.min(C,p.length-1),W=Math.max(0,C-k.length+1);W<=I;W++)U+=(g=(r=0|k.words[C-W|0])*(a=0|p.words[W])+V)/67108864|0,V=67108863&g;E.words[C]=0|V,x=0|U}return 0!==x?E.words[C]=0|x:E.length--,E.strip()}e.prototype.toString=function(k,p){var E;if(p=0|p||1,16===(k=k||10)||"hex"===k){E="";for(var R=0,r=0,a=0;a>>24-R&16777215)||a!==this.length-1?h[6-M.length]+M+E:M+E,(R+=2)>=26&&(R-=26,a--)}for(0!==r&&(E=r.toString(16)+E);E.length%p!=0;)E="0"+E;return 0!==this.negative&&(E="-"+E),E}if(k===(0|k)&&k>=2&&k<=36){var x=u[k],C=d[k];E="";var U=this.clone();for(U.negative=0;!U.isZero();){var V=U.modn(C).toString(k);E=(U=U.idivn(C)).isZero()?V+E:h[x-V.length]+V+E}for(this.isZero()&&(E="0"+E);E.length%p!=0;)E="0"+E;return 0!==this.negative&&(E="-"+E),E}n(!1,"Base should be between 2 and 36")},e.prototype.toNumber=function(){var k=this.words[0];return 2===this.length?k+=67108864*this.words[1]:3===this.length&&1===this.words[2]?k+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-k:k},e.prototype.toJSON=function(){return this.toString(16)},e.prototype.toBuffer=function(k,p){return n(void 0!==t),this.toArrayLike(t,k,p)},e.prototype.toArray=function(k,p){return this.toArrayLike(Array,k,p)},e.prototype.toArrayLike=function(k,p,E){var R=this.byteLength(),r=E||Math.max(1,R);n(R<=r,"byte array longer than desired length"),n(r>0,"Requested array length <= 0"),this.strip();var a,g,M="le"===p,x=new k(r),C=this.clone();if(M){for(g=0;!C.isZero();g++)a=C.andln(255),C.iushrn(8),x[g]=a;for(;g=4096&&(E+=13,p>>>=13),p>=64&&(E+=7,p>>>=7),p>=8&&(E+=4,p>>>=4),p>=2&&(E+=2,p>>>=2),E+p},e.prototype._zeroBits=function(k){if(0===k)return 26;var p=k,E=0;return 0==(8191&p)&&(E+=13,p>>>=13),0==(127&p)&&(E+=7,p>>>=7),0==(15&p)&&(E+=4,p>>>=4),0==(3&p)&&(E+=2,p>>>=2),0==(1&p)&&E++,E},e.prototype.bitLength=function(){var p=this._countBits(this.words[this.length-1]);return 26*(this.length-1)+p},e.prototype.zeroBits=function(){if(this.isZero())return 0;for(var k=0,p=0;pk.length?this.clone().ior(k):k.clone().ior(this)},e.prototype.uor=function(k){return this.length>k.length?this.clone().iuor(k):k.clone().iuor(this)},e.prototype.iuand=function(k){var p;p=this.length>k.length?k:this;for(var E=0;Ek.length?this.clone().iand(k):k.clone().iand(this)},e.prototype.uand=function(k){return this.length>k.length?this.clone().iuand(k):k.clone().iuand(this)},e.prototype.iuxor=function(k){var p,E;this.length>k.length?(p=this,E=k):(p=k,E=this);for(var R=0;Rk.length?this.clone().ixor(k):k.clone().ixor(this)},e.prototype.uxor=function(k){return this.length>k.length?this.clone().iuxor(k):k.clone().iuxor(this)},e.prototype.inotn=function(k){n("number"==typeof k&&k>=0);var p=0|Math.ceil(k/26),E=k%26;this._expand(p),E>0&&p--;for(var R=0;R0&&(this.words[R]=~this.words[R]&67108863>>26-E),this.strip()},e.prototype.notn=function(k){return this.clone().inotn(k)},e.prototype.setn=function(k,p){n("number"==typeof k&&k>=0);var E=k/26|0,R=k%26;return this._expand(E+1),this.words[E]=p?this.words[E]|1<k.length?(E=this,R=k):(E=k,R=this);for(var r=0,a=0;a>>26;for(;0!==r&&a>>26;if(this.length=E.length,0!==r)this.words[this.length]=r,this.length++;else if(E!==this)for(;ak.length?this.clone().iadd(k):k.clone().iadd(this)},e.prototype.isub=function(k){if(0!==k.negative){k.negative=0;var p=this.iadd(k);return k.negative=1,p._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(k),this.negative=1,this._normSign();var E,R,r=this.cmp(k);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(E=this,R=k):(E=k,R=this);for(var a=0,g=0;g>26,this.words[g]=67108863&p;for(;0!==a&&g>26,this.words[g]=67108863&p;if(0===a&&g>>13,W=0|g[1],F=8191&W,B=W>>>13,N=0|g[2],P=8191&N,j=N>>>13,K=0|g[3],Z=8191&K,J=K>>>13,X=0|g[4],ee=8191&X,te=X>>>13,oe=0|g[5],ve=8191&oe,ie=oe>>>13,de=0|g[6],fe=8191&de,re=de>>>13,_e=0|g[7],Ke=8191&_e,pe=_e>>>13,Te=0|g[8],Ve=8191&Te,be=Te>>>13,Pe=0|g[9],Ye=8191&Pe,we=Pe>>>13,Be=0|M[0],$e=8191&Be,Me=Be>>>13,je=0|M[1],Q=8191&je,se=je>>>13,le=0|M[2],Le=8191&le,he=le>>>13,Oe=0|M[3],Ge=8191&Oe,me=Oe>>>13,ze=0|M[4],rt=8191&ze,Re=ze>>>13,He=0|M[5],Qe=8191&He,xe=He>>>13,Ne=0|M[6],it=8191&Ne,Ee=Ne>>>13,qe=0|M[7],et=8191&qe,ke=qe>>>13,We=0|M[8],tt=8191&We,Se=We>>>13,Fe=0|M[9],nt=8191&Fe,Ae=Fe>>>13;E.negative=k.negative^p.negative,E.length=19;var Ue=(C+(R=Math.imul(V,$e))|0)+((8191&(r=(r=Math.imul(V,Me))+Math.imul(I,$e)|0))<<13)|0;C=((a=Math.imul(I,Me))+(r>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,R=Math.imul(F,$e),r=(r=Math.imul(F,Me))+Math.imul(B,$e)|0,a=Math.imul(B,Me);var Y=(C+(R=R+Math.imul(V,Q)|0)|0)+((8191&(r=(r=r+Math.imul(V,se)|0)+Math.imul(I,Q)|0))<<13)|0;C=((a=a+Math.imul(I,se)|0)+(r>>>13)|0)+(Y>>>26)|0,Y&=67108863,R=Math.imul(P,$e),r=(r=Math.imul(P,Me))+Math.imul(j,$e)|0,a=Math.imul(j,Me),R=R+Math.imul(F,Q)|0,r=(r=r+Math.imul(F,se)|0)+Math.imul(B,Q)|0,a=a+Math.imul(B,se)|0;var G=(C+(R=R+Math.imul(V,Le)|0)|0)+((8191&(r=(r=r+Math.imul(V,he)|0)+Math.imul(I,Le)|0))<<13)|0;C=((a=a+Math.imul(I,he)|0)+(r>>>13)|0)+(G>>>26)|0,G&=67108863,R=Math.imul(Z,$e),r=(r=Math.imul(Z,Me))+Math.imul(J,$e)|0,a=Math.imul(J,Me),R=R+Math.imul(P,Q)|0,r=(r=r+Math.imul(P,se)|0)+Math.imul(j,Q)|0,a=a+Math.imul(j,se)|0,R=R+Math.imul(F,Le)|0,r=(r=r+Math.imul(F,he)|0)+Math.imul(B,Le)|0,a=a+Math.imul(B,he)|0;var $=(C+(R=R+Math.imul(V,Ge)|0)|0)+((8191&(r=(r=r+Math.imul(V,me)|0)+Math.imul(I,Ge)|0))<<13)|0;C=((a=a+Math.imul(I,me)|0)+(r>>>13)|0)+($>>>26)|0,$&=67108863,R=Math.imul(ee,$e),r=(r=Math.imul(ee,Me))+Math.imul(te,$e)|0,a=Math.imul(te,Me),R=R+Math.imul(Z,Q)|0,r=(r=r+Math.imul(Z,se)|0)+Math.imul(J,Q)|0,a=a+Math.imul(J,se)|0,R=R+Math.imul(P,Le)|0,r=(r=r+Math.imul(P,he)|0)+Math.imul(j,Le)|0,a=a+Math.imul(j,he)|0,R=R+Math.imul(F,Ge)|0,r=(r=r+Math.imul(F,me)|0)+Math.imul(B,Ge)|0,a=a+Math.imul(B,me)|0;var ne=(C+(R=R+Math.imul(V,rt)|0)|0)+((8191&(r=(r=r+Math.imul(V,Re)|0)+Math.imul(I,rt)|0))<<13)|0;C=((a=a+Math.imul(I,Re)|0)+(r>>>13)|0)+(ne>>>26)|0,ne&=67108863,R=Math.imul(ve,$e),r=(r=Math.imul(ve,Me))+Math.imul(ie,$e)|0,a=Math.imul(ie,Me),R=R+Math.imul(ee,Q)|0,r=(r=r+Math.imul(ee,se)|0)+Math.imul(te,Q)|0,a=a+Math.imul(te,se)|0,R=R+Math.imul(Z,Le)|0,r=(r=r+Math.imul(Z,he)|0)+Math.imul(J,Le)|0,a=a+Math.imul(J,he)|0,R=R+Math.imul(P,Ge)|0,r=(r=r+Math.imul(P,me)|0)+Math.imul(j,Ge)|0,a=a+Math.imul(j,me)|0,R=R+Math.imul(F,rt)|0,r=(r=r+Math.imul(F,Re)|0)+Math.imul(B,rt)|0,a=a+Math.imul(B,Re)|0;var ce=(C+(R=R+Math.imul(V,Qe)|0)|0)+((8191&(r=(r=r+Math.imul(V,xe)|0)+Math.imul(I,Qe)|0))<<13)|0;C=((a=a+Math.imul(I,xe)|0)+(r>>>13)|0)+(ce>>>26)|0,ce&=67108863,R=Math.imul(fe,$e),r=(r=Math.imul(fe,Me))+Math.imul(re,$e)|0,a=Math.imul(re,Me),R=R+Math.imul(ve,Q)|0,r=(r=r+Math.imul(ve,se)|0)+Math.imul(ie,Q)|0,a=a+Math.imul(ie,se)|0,R=R+Math.imul(ee,Le)|0,r=(r=r+Math.imul(ee,he)|0)+Math.imul(te,Le)|0,a=a+Math.imul(te,he)|0,R=R+Math.imul(Z,Ge)|0,r=(r=r+Math.imul(Z,me)|0)+Math.imul(J,Ge)|0,a=a+Math.imul(J,me)|0,R=R+Math.imul(P,rt)|0,r=(r=r+Math.imul(P,Re)|0)+Math.imul(j,rt)|0,a=a+Math.imul(j,Re)|0,R=R+Math.imul(F,Qe)|0,r=(r=r+Math.imul(F,xe)|0)+Math.imul(B,Qe)|0,a=a+Math.imul(B,xe)|0;var ue=(C+(R=R+Math.imul(V,it)|0)|0)+((8191&(r=(r=r+Math.imul(V,Ee)|0)+Math.imul(I,it)|0))<<13)|0;C=((a=a+Math.imul(I,Ee)|0)+(r>>>13)|0)+(ue>>>26)|0,ue&=67108863,R=Math.imul(Ke,$e),r=(r=Math.imul(Ke,Me))+Math.imul(pe,$e)|0,a=Math.imul(pe,Me),R=R+Math.imul(fe,Q)|0,r=(r=r+Math.imul(fe,se)|0)+Math.imul(re,Q)|0,a=a+Math.imul(re,se)|0,R=R+Math.imul(ve,Le)|0,r=(r=r+Math.imul(ve,he)|0)+Math.imul(ie,Le)|0,a=a+Math.imul(ie,he)|0,R=R+Math.imul(ee,Ge)|0,r=(r=r+Math.imul(ee,me)|0)+Math.imul(te,Ge)|0,a=a+Math.imul(te,me)|0,R=R+Math.imul(Z,rt)|0,r=(r=r+Math.imul(Z,Re)|0)+Math.imul(J,rt)|0,a=a+Math.imul(J,Re)|0,R=R+Math.imul(P,Qe)|0,r=(r=r+Math.imul(P,xe)|0)+Math.imul(j,Qe)|0,a=a+Math.imul(j,xe)|0,R=R+Math.imul(F,it)|0,r=(r=r+Math.imul(F,Ee)|0)+Math.imul(B,it)|0,a=a+Math.imul(B,Ee)|0;var Ce=(C+(R=R+Math.imul(V,et)|0)|0)+((8191&(r=(r=r+Math.imul(V,ke)|0)+Math.imul(I,et)|0))<<13)|0;C=((a=a+Math.imul(I,ke)|0)+(r>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,R=Math.imul(Ve,$e),r=(r=Math.imul(Ve,Me))+Math.imul(be,$e)|0,a=Math.imul(be,Me),R=R+Math.imul(Ke,Q)|0,r=(r=r+Math.imul(Ke,se)|0)+Math.imul(pe,Q)|0,a=a+Math.imul(pe,se)|0,R=R+Math.imul(fe,Le)|0,r=(r=r+Math.imul(fe,he)|0)+Math.imul(re,Le)|0,a=a+Math.imul(re,he)|0,R=R+Math.imul(ve,Ge)|0,r=(r=r+Math.imul(ve,me)|0)+Math.imul(ie,Ge)|0,a=a+Math.imul(ie,me)|0,R=R+Math.imul(ee,rt)|0,r=(r=r+Math.imul(ee,Re)|0)+Math.imul(te,rt)|0,a=a+Math.imul(te,Re)|0,R=R+Math.imul(Z,Qe)|0,r=(r=r+Math.imul(Z,xe)|0)+Math.imul(J,Qe)|0,a=a+Math.imul(J,xe)|0,R=R+Math.imul(P,it)|0,r=(r=r+Math.imul(P,Ee)|0)+Math.imul(j,it)|0,a=a+Math.imul(j,Ee)|0,R=R+Math.imul(F,et)|0,r=(r=r+Math.imul(F,ke)|0)+Math.imul(B,et)|0,a=a+Math.imul(B,ke)|0;var Ie=(C+(R=R+Math.imul(V,tt)|0)|0)+((8191&(r=(r=r+Math.imul(V,Se)|0)+Math.imul(I,tt)|0))<<13)|0;C=((a=a+Math.imul(I,Se)|0)+(r>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,R=Math.imul(Ye,$e),r=(r=Math.imul(Ye,Me))+Math.imul(we,$e)|0,a=Math.imul(we,Me),R=R+Math.imul(Ve,Q)|0,r=(r=r+Math.imul(Ve,se)|0)+Math.imul(be,Q)|0,a=a+Math.imul(be,se)|0,R=R+Math.imul(Ke,Le)|0,r=(r=r+Math.imul(Ke,he)|0)+Math.imul(pe,Le)|0,a=a+Math.imul(pe,he)|0,R=R+Math.imul(fe,Ge)|0,r=(r=r+Math.imul(fe,me)|0)+Math.imul(re,Ge)|0,a=a+Math.imul(re,me)|0,R=R+Math.imul(ve,rt)|0,r=(r=r+Math.imul(ve,Re)|0)+Math.imul(ie,rt)|0,a=a+Math.imul(ie,Re)|0,R=R+Math.imul(ee,Qe)|0,r=(r=r+Math.imul(ee,xe)|0)+Math.imul(te,Qe)|0,a=a+Math.imul(te,xe)|0,R=R+Math.imul(Z,it)|0,r=(r=r+Math.imul(Z,Ee)|0)+Math.imul(J,it)|0,a=a+Math.imul(J,Ee)|0,R=R+Math.imul(P,et)|0,r=(r=r+Math.imul(P,ke)|0)+Math.imul(j,et)|0,a=a+Math.imul(j,ke)|0,R=R+Math.imul(F,tt)|0,r=(r=r+Math.imul(F,Se)|0)+Math.imul(B,tt)|0,a=a+Math.imul(B,Se)|0;var De=(C+(R=R+Math.imul(V,nt)|0)|0)+((8191&(r=(r=r+Math.imul(V,Ae)|0)+Math.imul(I,nt)|0))<<13)|0;C=((a=a+Math.imul(I,Ae)|0)+(r>>>13)|0)+(De>>>26)|0,De&=67108863,R=Math.imul(Ye,Q),r=(r=Math.imul(Ye,se))+Math.imul(we,Q)|0,a=Math.imul(we,se),R=R+Math.imul(Ve,Le)|0,r=(r=r+Math.imul(Ve,he)|0)+Math.imul(be,Le)|0,a=a+Math.imul(be,he)|0,R=R+Math.imul(Ke,Ge)|0,r=(r=r+Math.imul(Ke,me)|0)+Math.imul(pe,Ge)|0,a=a+Math.imul(pe,me)|0,R=R+Math.imul(fe,rt)|0,r=(r=r+Math.imul(fe,Re)|0)+Math.imul(re,rt)|0,a=a+Math.imul(re,Re)|0,R=R+Math.imul(ve,Qe)|0,r=(r=r+Math.imul(ve,xe)|0)+Math.imul(ie,Qe)|0,a=a+Math.imul(ie,xe)|0,R=R+Math.imul(ee,it)|0,r=(r=r+Math.imul(ee,Ee)|0)+Math.imul(te,it)|0,a=a+Math.imul(te,Ee)|0,R=R+Math.imul(Z,et)|0,r=(r=r+Math.imul(Z,ke)|0)+Math.imul(J,et)|0,a=a+Math.imul(J,ke)|0,R=R+Math.imul(P,tt)|0,r=(r=r+Math.imul(P,Se)|0)+Math.imul(j,tt)|0,a=a+Math.imul(j,Se)|0;var ye=(C+(R=R+Math.imul(F,nt)|0)|0)+((8191&(r=(r=r+Math.imul(F,Ae)|0)+Math.imul(B,nt)|0))<<13)|0;C=((a=a+Math.imul(B,Ae)|0)+(r>>>13)|0)+(ye>>>26)|0,ye&=67108863,R=Math.imul(Ye,Le),r=(r=Math.imul(Ye,he))+Math.imul(we,Le)|0,a=Math.imul(we,he),R=R+Math.imul(Ve,Ge)|0,r=(r=r+Math.imul(Ve,me)|0)+Math.imul(be,Ge)|0,a=a+Math.imul(be,me)|0,R=R+Math.imul(Ke,rt)|0,r=(r=r+Math.imul(Ke,Re)|0)+Math.imul(pe,rt)|0,a=a+Math.imul(pe,Re)|0,R=R+Math.imul(fe,Qe)|0,r=(r=r+Math.imul(fe,xe)|0)+Math.imul(re,Qe)|0,a=a+Math.imul(re,xe)|0,R=R+Math.imul(ve,it)|0,r=(r=r+Math.imul(ve,Ee)|0)+Math.imul(ie,it)|0,a=a+Math.imul(ie,Ee)|0,R=R+Math.imul(ee,et)|0,r=(r=r+Math.imul(ee,ke)|0)+Math.imul(te,et)|0,a=a+Math.imul(te,ke)|0,R=R+Math.imul(Z,tt)|0,r=(r=r+Math.imul(Z,Se)|0)+Math.imul(J,tt)|0,a=a+Math.imul(J,Se)|0;var ae=(C+(R=R+Math.imul(P,nt)|0)|0)+((8191&(r=(r=r+Math.imul(P,Ae)|0)+Math.imul(j,nt)|0))<<13)|0;C=((a=a+Math.imul(j,Ae)|0)+(r>>>13)|0)+(ae>>>26)|0,ae&=67108863,R=Math.imul(Ye,Ge),r=(r=Math.imul(Ye,me))+Math.imul(we,Ge)|0,a=Math.imul(we,me),R=R+Math.imul(Ve,rt)|0,r=(r=r+Math.imul(Ve,Re)|0)+Math.imul(be,rt)|0,a=a+Math.imul(be,Re)|0,R=R+Math.imul(Ke,Qe)|0,r=(r=r+Math.imul(Ke,xe)|0)+Math.imul(pe,Qe)|0,a=a+Math.imul(pe,xe)|0,R=R+Math.imul(fe,it)|0,r=(r=r+Math.imul(fe,Ee)|0)+Math.imul(re,it)|0,a=a+Math.imul(re,Ee)|0,R=R+Math.imul(ve,et)|0,r=(r=r+Math.imul(ve,ke)|0)+Math.imul(ie,et)|0,a=a+Math.imul(ie,ke)|0,R=R+Math.imul(ee,tt)|0,r=(r=r+Math.imul(ee,Se)|0)+Math.imul(te,tt)|0,a=a+Math.imul(te,Se)|0;var Je=(C+(R=R+Math.imul(Z,nt)|0)|0)+((8191&(r=(r=r+Math.imul(Z,Ae)|0)+Math.imul(J,nt)|0))<<13)|0;C=((a=a+Math.imul(J,Ae)|0)+(r>>>13)|0)+(Je>>>26)|0,Je&=67108863,R=Math.imul(Ye,rt),r=(r=Math.imul(Ye,Re))+Math.imul(we,rt)|0,a=Math.imul(we,Re),R=R+Math.imul(Ve,Qe)|0,r=(r=r+Math.imul(Ve,xe)|0)+Math.imul(be,Qe)|0,a=a+Math.imul(be,xe)|0,R=R+Math.imul(Ke,it)|0,r=(r=r+Math.imul(Ke,Ee)|0)+Math.imul(pe,it)|0,a=a+Math.imul(pe,Ee)|0,R=R+Math.imul(fe,et)|0,r=(r=r+Math.imul(fe,ke)|0)+Math.imul(re,et)|0,a=a+Math.imul(re,ke)|0,R=R+Math.imul(ve,tt)|0,r=(r=r+Math.imul(ve,Se)|0)+Math.imul(ie,tt)|0,a=a+Math.imul(ie,Se)|0;var ot=(C+(R=R+Math.imul(ee,nt)|0)|0)+((8191&(r=(r=r+Math.imul(ee,Ae)|0)+Math.imul(te,nt)|0))<<13)|0;C=((a=a+Math.imul(te,Ae)|0)+(r>>>13)|0)+(ot>>>26)|0,ot&=67108863,R=Math.imul(Ye,Qe),r=(r=Math.imul(Ye,xe))+Math.imul(we,Qe)|0,a=Math.imul(we,xe),R=R+Math.imul(Ve,it)|0,r=(r=r+Math.imul(Ve,Ee)|0)+Math.imul(be,it)|0,a=a+Math.imul(be,Ee)|0,R=R+Math.imul(Ke,et)|0,r=(r=r+Math.imul(Ke,ke)|0)+Math.imul(pe,et)|0,a=a+Math.imul(pe,ke)|0,R=R+Math.imul(fe,tt)|0,r=(r=r+Math.imul(fe,Se)|0)+Math.imul(re,tt)|0,a=a+Math.imul(re,Se)|0;var at=(C+(R=R+Math.imul(ve,nt)|0)|0)+((8191&(r=(r=r+Math.imul(ve,Ae)|0)+Math.imul(ie,nt)|0))<<13)|0;C=((a=a+Math.imul(ie,Ae)|0)+(r>>>13)|0)+(at>>>26)|0,at&=67108863,R=Math.imul(Ye,it),r=(r=Math.imul(Ye,Ee))+Math.imul(we,it)|0,a=Math.imul(we,Ee),R=R+Math.imul(Ve,et)|0,r=(r=r+Math.imul(Ve,ke)|0)+Math.imul(be,et)|0,a=a+Math.imul(be,ke)|0,R=R+Math.imul(Ke,tt)|0,r=(r=r+Math.imul(Ke,Se)|0)+Math.imul(pe,tt)|0,a=a+Math.imul(pe,Se)|0;var st=(C+(R=R+Math.imul(fe,nt)|0)|0)+((8191&(r=(r=r+Math.imul(fe,Ae)|0)+Math.imul(re,nt)|0))<<13)|0;C=((a=a+Math.imul(re,Ae)|0)+(r>>>13)|0)+(st>>>26)|0,st&=67108863,R=Math.imul(Ye,et),r=(r=Math.imul(Ye,ke))+Math.imul(we,et)|0,a=Math.imul(we,ke),R=R+Math.imul(Ve,tt)|0,r=(r=r+Math.imul(Ve,Se)|0)+Math.imul(be,tt)|0,a=a+Math.imul(be,Se)|0;var ut=(C+(R=R+Math.imul(Ke,nt)|0)|0)+((8191&(r=(r=r+Math.imul(Ke,Ae)|0)+Math.imul(pe,nt)|0))<<13)|0;C=((a=a+Math.imul(pe,Ae)|0)+(r>>>13)|0)+(ut>>>26)|0,ut&=67108863,R=Math.imul(Ye,tt),r=(r=Math.imul(Ye,Se))+Math.imul(we,tt)|0,a=Math.imul(we,Se);var Ze=(C+(R=R+Math.imul(Ve,nt)|0)|0)+((8191&(r=(r=r+Math.imul(Ve,Ae)|0)+Math.imul(be,nt)|0))<<13)|0;C=((a=a+Math.imul(be,Ae)|0)+(r>>>13)|0)+(Ze>>>26)|0,Ze&=67108863;var ct=(C+(R=Math.imul(Ye,nt))|0)+((8191&(r=(r=Math.imul(Ye,Ae))+Math.imul(we,nt)|0))<<13)|0;return C=((a=Math.imul(we,Ae))+(r>>>13)|0)+(ct>>>26)|0,ct&=67108863,x[0]=Ue,x[1]=Y,x[2]=G,x[3]=$,x[4]=ne,x[5]=ce,x[6]=ue,x[7]=Ce,x[8]=Ie,x[9]=De,x[10]=ye,x[11]=ae,x[12]=Je,x[13]=ot,x[14]=at,x[15]=st,x[16]=ut,x[17]=Ze,x[18]=ct,0!==C&&(x[19]=C,E.length++),E};function T(k,p,E){return(new O).mulp(k,p,E)}function O(k,p){this.x=k,this.y=p}Math.imul||(v=_),e.prototype.mulTo=function(k,p){var E=this.length+k.length;return 10===this.length&&10===k.length?v(this,k,p):E<63?_(this,k,p):E<1024?function(R,r,a){a.negative=r.negative^R.negative,a.length=R.length+r.length;for(var g=0,M=0,x=0;x>>26)|0)>>>26,C&=67108863}a.words[x]=U,g=C,C=M}return 0!==g?a.words[x]=g:a.length--,a.strip()}(this,k,p):T(this,k,p)},O.prototype.makeRBT=function(k){for(var p=new Array(k),E=e.prototype._countBits(k)-1,R=0;R>=1;return R},O.prototype.permute=function(k,p,E,R,r,a){for(var g=0;g>>=1)r++;return 1<>>=13),r>>>=13;for(a=2*p;a>=26,p+=R/67108864|0,p+=r>>>26,this.words[E]=67108863&r}return 0!==p&&(this.words[E]=p,this.length++),this},e.prototype.muln=function(k){return this.clone().imuln(k)},e.prototype.sqr=function(){return this.mul(this)},e.prototype.isqr=function(){return this.imul(this.clone())},e.prototype.pow=function(k){var p=function(a){for(var g=new Array(a.bitLength()),M=0;M>>C}return g}(k);if(0===p.length)return new e(1);for(var E=this,R=0;R=0);var p,E=k%26,R=(k-E)/26,r=67108863>>>26-E<<26-E;if(0!==E){var a=0;for(p=0;p>>26-E}a&&(this.words[p]=a,this.length++)}if(0!==R){for(p=this.length-1;p>=0;p--)this.words[p+R]=this.words[p];for(p=0;p=0),R=p?(p-p%26)/26:0;var r=k%26,a=Math.min((k-r)/26,this.length),g=67108863^67108863>>>r<a)for(this.length-=a,x=0;x=0&&(0!==C||x>=R);x--){var U=0|this.words[x];this.words[x]=C<<26-r|U>>>r,C=U&g}return M&&0!==C&&(M.words[M.length++]=C),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},e.prototype.ishrn=function(k,p,E){return n(0===this.negative),this.iushrn(k,p,E)},e.prototype.shln=function(k){return this.clone().ishln(k)},e.prototype.ushln=function(k){return this.clone().iushln(k)},e.prototype.shrn=function(k){return this.clone().ishrn(k)},e.prototype.ushrn=function(k){return this.clone().iushrn(k)},e.prototype.testn=function(k){n("number"==typeof k&&k>=0);var p=k%26,E=(k-p)/26;return!(this.length<=E||!(this.words[E]&1<=0);var p=k%26,E=(k-p)/26;return n(0===this.negative,"imaskn works only with positive numbers"),this.length<=E?this:(0!==p&&E++,this.length=Math.min(E,this.length),0!==p&&(this.words[this.length-1]&=67108863^67108863>>>p<=67108864;p++)this.words[p]-=67108864,p===this.length-1?this.words[p+1]=1:this.words[p+1]++;return this.length=Math.max(this.length,p+1),this},e.prototype.isubn=function(k){if(n("number"==typeof k),n(k<67108864),k<0)return this.iaddn(-k);if(0!==this.negative)return this.negative=0,this.iaddn(k),this.negative=1,this;if(this.words[0]-=k,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var p=0;p>26)-(M/67108864|0),this.words[R+E]=67108863&r}for(;R>26,this.words[R+E]=67108863&r;if(0===g)return this.strip();for(n(-1===g),g=0,R=0;R>26,this.words[R]=67108863&r;return this.negative=1,this.strip()},e.prototype._wordDiv=function(k,p){var E,R=this.clone(),r=k,a=0|r.words[r.length-1];0!=(E=26-this._countBits(a))&&(r=r.ushln(E),R.iushln(E),a=0|r.words[r.length-1]);var g,M=R.length-r.length;if("mod"!==p){(g=new e(null)).length=M+1,g.words=new Array(g.length);for(var x=0;x=0;U--){var V=67108864*(0|R.words[r.length+U])+(0|R.words[r.length+U-1]);for(V=Math.min(V/a|0,67108863),R._ishlnsubmul(r,V,U);0!==R.negative;)V--,R.negative=0,R._ishlnsubmul(r,1,U),R.isZero()||(R.negative^=1);g&&(g.words[U]=V)}return g&&g.strip(),R.strip(),"div"!==p&&0!==E&&R.iushrn(E),{div:g||null,mod:R}},e.prototype.divmod=function(k,p,E){return n(!k.isZero()),this.isZero()?{div:new e(0),mod:new e(0)}:0!==this.negative&&0===k.negative?(a=this.neg().divmod(k,p),"mod"!==p&&(R=a.div.neg()),"div"!==p&&(r=a.mod.neg(),E&&0!==r.negative&&r.iadd(k)),{div:R,mod:r}):0===this.negative&&0!==k.negative?(a=this.divmod(k.neg(),p),"mod"!==p&&(R=a.div.neg()),{div:R,mod:a.mod}):0!=(this.negative&k.negative)?(a=this.neg().divmod(k.neg(),p),"div"!==p&&(r=a.mod.neg(),E&&0!==r.negative&&r.isub(k)),{div:a.div,mod:r}):k.length>this.length||this.cmp(k)<0?{div:new e(0),mod:this}:1===k.length?"div"===p?{div:this.divn(k.words[0]),mod:null}:"mod"===p?{div:null,mod:new e(this.modn(k.words[0]))}:{div:this.divn(k.words[0]),mod:new e(this.modn(k.words[0]))}:this._wordDiv(k,p);var R,r,a},e.prototype.div=function(k){return this.divmod(k,"div",!1).div},e.prototype.mod=function(k){return this.divmod(k,"mod",!1).mod},e.prototype.umod=function(k){return this.divmod(k,"mod",!0).mod},e.prototype.divRound=function(k){var p=this.divmod(k);if(p.mod.isZero())return p.div;var E=0!==p.div.negative?p.mod.isub(k):p.mod,R=k.ushrn(1),r=k.andln(1),a=E.cmp(R);return a<0||1===r&&0===a?p.div:0!==p.div.negative?p.div.isubn(1):p.div.iaddn(1)},e.prototype.modn=function(k){n(k<=67108863);for(var p=(1<<26)%k,E=0,R=this.length-1;R>=0;R--)E=(p*E+(0|this.words[R]))%k;return E},e.prototype.idivn=function(k){n(k<=67108863);for(var p=0,E=this.length-1;E>=0;E--){var R=(0|this.words[E])+67108864*p;this.words[E]=R/k|0,p=R%k}return this.strip()},e.prototype.divn=function(k){return this.clone().idivn(k)},e.prototype.egcd=function(k){n(0===k.negative),n(!k.isZero());var p=this,E=k.clone();p=0!==p.negative?p.umod(k):p.clone();for(var R=new e(1),r=new e(0),a=new e(0),g=new e(1),M=0;p.isEven()&&E.isEven();)p.iushrn(1),E.iushrn(1),++M;for(var x=E.clone(),C=p.clone();!p.isZero();){for(var U=0,V=1;0==(p.words[0]&V)&&U<26;++U,V<<=1);if(U>0)for(p.iushrn(U);U-- >0;)(R.isOdd()||r.isOdd())&&(R.iadd(x),r.isub(C)),R.iushrn(1),r.iushrn(1);for(var I=0,W=1;0==(E.words[0]&W)&&I<26;++I,W<<=1);if(I>0)for(E.iushrn(I);I-- >0;)(a.isOdd()||g.isOdd())&&(a.iadd(x),g.isub(C)),a.iushrn(1),g.iushrn(1);p.cmp(E)>=0?(p.isub(E),R.isub(a),r.isub(g)):(E.isub(p),a.isub(R),g.isub(r))}return{a,b:g,gcd:E.iushln(M)}},e.prototype._invmp=function(k){n(0===k.negative),n(!k.isZero());var p=this,E=k.clone();p=0!==p.negative?p.umod(k):p.clone();for(var R,r=new e(1),a=new e(0),g=E.clone();p.cmpn(1)>0&&E.cmpn(1)>0;){for(var M=0,x=1;0==(p.words[0]&x)&&M<26;++M,x<<=1);if(M>0)for(p.iushrn(M);M-- >0;)r.isOdd()&&r.iadd(g),r.iushrn(1);for(var C=0,U=1;0==(E.words[0]&U)&&C<26;++C,U<<=1);if(C>0)for(E.iushrn(C);C-- >0;)a.isOdd()&&a.iadd(g),a.iushrn(1);p.cmp(E)>=0?(p.isub(E),r.isub(a)):(E.isub(p),a.isub(r))}return(R=0===p.cmpn(1)?r:a).cmpn(0)<0&&R.iadd(k),R},e.prototype.gcd=function(k){if(this.isZero())return k.abs();if(k.isZero())return this.abs();var p=this.clone(),E=k.clone();p.negative=0,E.negative=0;for(var R=0;p.isEven()&&E.isEven();R++)p.iushrn(1),E.iushrn(1);for(;;){for(;p.isEven();)p.iushrn(1);for(;E.isEven();)E.iushrn(1);var r=p.cmp(E);if(r<0){var a=p;p=E,E=a}else if(0===r||0===E.cmpn(1))break;p.isub(E)}return E.iushln(R)},e.prototype.invm=function(k){return this.egcd(k).a.umod(k)},e.prototype.isEven=function(){return 0==(1&this.words[0])},e.prototype.isOdd=function(){return 1==(1&this.words[0])},e.prototype.andln=function(k){return this.words[0]&k},e.prototype.bincn=function(k){n("number"==typeof k);var p=k%26,E=(k-p)/26,R=1<>>26,this.words[a]=g&=67108863}return 0!==r&&(this.words[a]=r,this.length++),this},e.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},e.prototype.cmpn=function(k){var p,E=k<0;if(0!==this.negative&&!E)return-1;if(0===this.negative&&E)return 1;if(this.strip(),this.length>1)p=1;else{E&&(k=-k),n(k<=67108863,"Number is too big");var R=0|this.words[0];p=R===k?0:Rk.length)return 1;if(this.length=0;E--){var R=0|this.words[E],r=0|k.words[E];if(R!==r){Rr&&(p=1);break}}return p},e.prototype.gtn=function(k){return 1===this.cmpn(k)},e.prototype.gt=function(k){return 1===this.cmp(k)},e.prototype.gten=function(k){return this.cmpn(k)>=0},e.prototype.gte=function(k){return this.cmp(k)>=0},e.prototype.ltn=function(k){return-1===this.cmpn(k)},e.prototype.lt=function(k){return-1===this.cmp(k)},e.prototype.lten=function(k){return this.cmpn(k)<=0},e.prototype.lte=function(k){return this.cmp(k)<=0},e.prototype.eqn=function(k){return 0===this.cmpn(k)},e.prototype.eq=function(k){return 0===this.cmp(k)},e.red=function(k){return new D(k)},e.prototype.toRed=function(k){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),k.convertTo(this)._forceRed(k)},e.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},e.prototype._forceRed=function(k){return this.red=k,this},e.prototype.forceRed=function(k){return n(!this.red,"Already a number in reduction context"),this._forceRed(k)},e.prototype.redAdd=function(k){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,k)},e.prototype.redIAdd=function(k){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,k)},e.prototype.redSub=function(k){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,k)},e.prototype.redISub=function(k){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,k)},e.prototype.redShl=function(k){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,k)},e.prototype.redMul=function(k){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,k),this.red.mul(this,k)},e.prototype.redIMul=function(k){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,k),this.red.imul(this,k)},e.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},e.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},e.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},e.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},e.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},e.prototype.redPow=function(k){return n(this.red&&!k.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,k)};var b={k256:null,p224:null,p192:null,p25519:null};function S(k,p){this.name=k,this.p=new e(p,16),this.n=this.p.bitLength(),this.k=new e(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){S.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){S.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function L(){S.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function H(){S.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function D(k){if("string"==typeof k){var p=e._prime(k);this.m=p.p,this.prime=p}else n(k.gtn(1),"modulus must be greater than 1"),this.m=k,this.prime=null}function q(k){D.call(this,k),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new e(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)}S.prototype._tmp=function(){var k=new e(null);return k.words=new Array(Math.ceil(this.n/13)),k},S.prototype.ireduce=function(k){var p,E=k;do{this.split(E,this.tmp),p=(E=(E=this.imulK(E)).iadd(this.tmp)).bitLength()}while(p>this.n);var R=p0?E.isub(this.p):E.strip(),E},S.prototype.split=function(k,p){k.iushrn(this.n,0,p)},S.prototype.imulK=function(k){return k.imul(this.k)},o(w,S),w.prototype.split=function(k,p){for(var E=Math.min(k.length,9),R=0;R>>22,r=a}k.words[R-10]=r>>>=22,k.length-=0===r&&k.length>10?10:9},w.prototype.imulK=function(k){k.words[k.length]=0,k.words[k.length+1]=0,k.length+=2;for(var p=0,E=0;E>>=26,k.words[E]=r,p=R}return 0!==p&&(k.words[k.length++]=p),k},e._prime=function(k){if(b[k])return b[k];var p;if("k256"===k)p=new w;else if("p224"===k)p=new A;else if("p192"===k)p=new L;else{if("p25519"!==k)throw new Error("Unknown prime "+k);p=new H}return b[k]=p,p},D.prototype._verify1=function(k){n(0===k.negative,"red works only with positives"),n(k.red,"red works only with red numbers")},D.prototype._verify2=function(k,p){n(0==(k.negative|p.negative),"red works only with positives"),n(k.red&&k.red===p.red,"red works only with red numbers")},D.prototype.imod=function(k){return this.prime?this.prime.ireduce(k)._forceRed(this):k.umod(this.m)._forceRed(this)},D.prototype.neg=function(k){return k.isZero()?k.clone():this.m.sub(k)._forceRed(this)},D.prototype.add=function(k,p){this._verify2(k,p);var E=k.add(p);return E.cmp(this.m)>=0&&E.isub(this.m),E._forceRed(this)},D.prototype.iadd=function(k,p){this._verify2(k,p);var E=k.iadd(p);return E.cmp(this.m)>=0&&E.isub(this.m),E},D.prototype.sub=function(k,p){this._verify2(k,p);var E=k.sub(p);return E.cmpn(0)<0&&E.iadd(this.m),E._forceRed(this)},D.prototype.isub=function(k,p){this._verify2(k,p);var E=k.isub(p);return E.cmpn(0)<0&&E.iadd(this.m),E},D.prototype.shl=function(k,p){return this._verify1(k),this.imod(k.ushln(p))},D.prototype.imul=function(k,p){return this._verify2(k,p),this.imod(k.imul(p))},D.prototype.mul=function(k,p){return this._verify2(k,p),this.imod(k.mul(p))},D.prototype.isqr=function(k){return this.imul(k,k.clone())},D.prototype.sqr=function(k){return this.mul(k,k)},D.prototype.sqrt=function(k){if(k.isZero())return k.clone();var p=this.m.andln(3);if(n(p%2==1),3===p){var E=this.m.add(new e(1)).iushrn(2);return this.pow(k,E)}for(var R=this.m.subn(1),r=0;!R.isZero()&&0===R.andln(1);)r++,R.iushrn(1);n(!R.isZero());var a=new e(1).toRed(this),g=a.redNeg(),M=this.m.subn(1).iushrn(1),x=this.m.bitLength();for(x=new e(2*x*x).toRed(this);0!==this.pow(x,M).cmp(g);)x.redIAdd(g);for(var C=this.pow(x,R),U=this.pow(k,R.addn(1).iushrn(1)),V=this.pow(k,R),I=r;0!==V.cmp(a);){for(var W=V,F=0;0!==W.cmp(a);F++)W=W.redSqr();n(F=0;R--){for(var x=p.words[R],C=M-1;C>=0;C--){var U=x>>C&1;r!==E[0]&&(r=this.sqr(r)),0!==U||0!==a?(a<<=1,a|=U,(4==++g||0===R&&0===C)&&(r=this.mul(r,E[a]),g=0,a=0)):g=0}M=26}return r},D.prototype.convertTo=function(k){var p=k.umod(this.m);return p===k?p.clone():p},D.prototype.convertFrom=function(k){var p=k.clone();return p.red=null,p},e.mont=function(k){return new q(k)},o(q,D),q.prototype.convertTo=function(k){return this.imod(k.ushln(this.shift))},q.prototype.convertFrom=function(k){var p=this.imod(k.mul(this.rinv));return p.red=null,p},q.prototype.imul=function(k,p){if(k.isZero()||p.isZero())return k.words[0]=0,k.length=1,k;var E=k.imul(p),R=E.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=E.isub(R).iushrn(this.shift),a=r;return r.cmp(this.m)>=0?a=r.isub(this.m):r.cmpn(0)<0&&(a=r.iadd(this.m)),a._forceRed(this)},q.prototype.mul=function(k,p){if(k.isZero()||p.isZero())return new e(0)._forceRed(this);var E=k.mul(p),R=E.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=E.isub(R).iushrn(this.shift),a=r;return r.cmp(this.m)>=0?a=r.isub(this.m):r.cmpn(0)<0&&(a=r.iadd(this.m)),a._forceRed(this)},q.prototype.invm=function(k){return this.imod(k._invmp(this.m).mul(this.r2))._forceRed(this)}}(s,this)}).call(this,f(25)(z))},function(z,l,f){"use strict";function s(y){let n;return typeof window<"u"&&void 0!==window[y]&&(n=window[y]),n}function m(y){const n=s(y);if(!n)throw new Error(y+" is not defined in Window");return n}Object.defineProperty(l,"__esModule",{value:!0}),l.getLocalStorage=l.getLocalStorageOrThrow=l.getCrypto=l.getCryptoOrThrow=l.getLocation=l.getLocationOrThrow=l.getNavigator=l.getNavigatorOrThrow=l.getDocument=l.getDocumentOrThrow=l.getFromWindowOrThrow=l.getFromWindow=void 0,l.getFromWindow=s,l.getFromWindowOrThrow=m,l.getDocumentOrThrow=function(){return m("document")},l.getDocument=function(){return s("document")},l.getNavigatorOrThrow=function(){return m("navigator")},l.getNavigator=function(){return s("navigator")},l.getLocationOrThrow=function(){return m("location")},l.getLocation=function(){return s("location")},l.getCryptoOrThrow=function(){return m("crypto")},l.getCrypto=function(){return s("crypto")},l.getLocalStorageOrThrow=function(){return m("localStorage")},l.getLocalStorage=function(){return s("localStorage")}},function(z,l,f){"use strict";var s=l,m=f(16),y=f(22),n=f(120);s.assert=y,s.toArray=n.toArray,s.zero2=n.zero2,s.toHex=n.toHex,s.encode=n.encode,s.getNAF=function(o,e,t){var i=new Array(Math.max(o.bitLength(),t)+1);i.fill(0);for(var c=1<(c>>1)-1?(c>>1)-_:_):d=0,i[u]=d,h.iushrn(1)}return i},s.getJSF=function(o,e){var t=[[],[]];o=o.clone(),e=e.clone();for(var i,c=0,h=0;o.cmpn(-c)>0||e.cmpn(-h)>0;){var u,d,_=o.andln(3)+c&3,v=e.andln(3)+h&3;3===_&&(_=-1),3===v&&(v=-1),u=0==(1&_)?0:3!=(i=o.andln(7)+c&7)&&5!==i||2!==v?_:-_,t[0].push(u),d=0==(1&v)?0:3!=(i=e.andln(7)+h&7)&&5!==i||2!==_?v:-v,t[1].push(d),2*c===u+1&&(c=1-c),2*h===d+1&&(h=1-h),o.iushrn(1),e.iushrn(1)}return t},s.cachedProperty=function(o,e,t){var i="_"+e;o.prototype[e]=function(){return void 0!==this[i]?this[i]:this[i]=t.call(this)}},s.parseBytes=function(o){return"string"==typeof o?s.toArray(o,"hex"):o},s.intFromLE=function(o){return new m(o,"hex","le")}},function(z,l,f){"use strict";var s,m="object"==typeof Reflect?Reflect:null,y=m&&"function"==typeof m.apply?m.apply:function(O,b,S){return Function.prototype.apply.call(O,b,S)};s=m&&"function"==typeof m.ownKeys?m.ownKeys:Object.getOwnPropertySymbols?function(O){return Object.getOwnPropertyNames(O).concat(Object.getOwnPropertySymbols(O))}:function(O){return Object.getOwnPropertyNames(O)};var n=Number.isNaN||function(O){return O!=O};function o(){o.init.call(this)}z.exports=o,z.exports.once=function(O,b){return new Promise(function(S,w){function A(H){O.removeListener(b,L),w(H)}function L(){"function"==typeof O.removeListener&&O.removeListener("error",A),S([].slice.call(arguments))}var H;T(O,b,L,{once:!0}),"error"!==b&&("function"==typeof(H=O).on&&T(H,"error",A,{once:!0}))})},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var e=10;function t(O){if("function"!=typeof O)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof O)}function i(O){return void 0===O._maxListeners?o.defaultMaxListeners:O._maxListeners}function c(O,b,S,w){var A,L,H;if(t(S),void 0===(L=O._events)?(L=O._events=Object.create(null),O._eventsCount=0):(void 0!==L.newListener&&(O.emit("newListener",b,S.listener?S.listener:S),L=O._events),H=L[b]),void 0===H)H=L[b]=S,++O._eventsCount;else if("function"==typeof H?H=L[b]=w?[S,H]:[H,S]:w?H.unshift(S):H.push(S),(A=i(O))>0&&H.length>A&&!H.warned){H.warned=!0;var q=new Error("Possible EventEmitter memory leak detected. "+H.length+" "+String(b)+" listeners added. Use emitter.setMaxListeners() to increase limit");q.name="MaxListenersExceededWarning",q.emitter=O,q.type=b,q.count=H.length,console&&console.warn&&console.warn(q)}return O}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u(O,b,S){var w={fired:!1,wrapFn:void 0,target:O,type:b,listener:S},A=h.bind(w);return A.listener=S,w.wrapFn=A,A}function d(O,b,S){var w=O._events;if(void 0===w)return[];var A=w[b];return void 0===A?[]:"function"==typeof A?S?[A.listener||A]:[A]:S?function(L){for(var H=new Array(L.length),D=0;D0&&(L=b[0]),L instanceof Error)throw L;var H=new Error("Unhandled error."+(L?" ("+L.message+")":""));throw H.context=L,H}var D=A[O];if(void 0===D)return!1;if("function"==typeof D)y(D,this,b);else{var q=D.length,k=v(D,q);for(S=0;S=0;L--)if(S[L]===b||S[L].listener===b){H=S[L].listener,A=L;break}if(A<0)return this;0===A?S.shift():function(D,q){for(;q+1=0;w--)this.removeListener(O,b[w]);return this},o.prototype.listeners=function(O){return d(this,O,!0)},o.prototype.rawListeners=function(O){return d(this,O,!1)},o.listenerCount=function(O,b){return"function"==typeof O.listenerCount?O.listenerCount(b):_.call(O,b)},o.prototype.listenerCount=_,o.prototype.eventNames=function(){return this._eventsCount>0?s(this._events):[]}},function(z,l,f){var s=f(2),m=s.Buffer;function y(o,e){for(var t in o)e[t]=o[t]}function n(o,e,t){return m(o,e,t)}m.from&&m.alloc&&m.allocUnsafe&&m.allocUnsafeSlow?z.exports=s:(y(s,l),l.Buffer=n),n.prototype=Object.create(m.prototype),y(m,n),n.from=function(o,e,t){if("number"==typeof o)throw new TypeError("Argument must not be a number");return m(o,e,t)},n.alloc=function(o,e,t){if("number"!=typeof o)throw new TypeError("Argument must be a number");var i=m(o);return void 0!==e?"string"==typeof t?i.fill(e,t):i.fill(e):i.fill(0),i},n.allocUnsafe=function(o){if("number"!=typeof o)throw new TypeError("Argument must be a number");return m(o)},n.allocUnsafeSlow=function(o){if("number"!=typeof o)throw new TypeError("Argument must be a number");return s.SlowBuffer(o)}},function(z,l,f){"use strict";f.d(l,"b",function(){return o}),f.d(l,"a",function(){return t}),f.d(l,"c",function(){return c}),f.d(l,"d",function(){return u}),f.d(l,"e",function(){return _}),f.d(l,"f",function(){return T});var s=f(8),m=f(4);function y(b){return n.apply(this,arguments)}function n(){return(n=ge(function*(b,S=m.a){return s.getSubtleCrypto().importKey("raw",b,S===m.a?{length:m.b,name:m.a}:{hash:{name:m.f},name:m.e},!0,S===m.a?[m.d,m.c]:[m.k,m.l])})).apply(this,arguments)}function o(b,S,w){return e.apply(this,arguments)}function e(){return(e=ge(function*(b,S,w){const A=s.getSubtleCrypto(),L=yield y(S,m.a),H=yield A.encrypt({iv:b,name:m.a},L,w);return new Uint8Array(H)})).apply(this,arguments)}function t(b,S,w){return i.apply(this,arguments)}function i(){return(i=ge(function*(b,S,w){const A=s.getSubtleCrypto(),L=yield y(S,m.a),H=yield A.decrypt({iv:b,name:m.a},L,w);return new Uint8Array(H)})).apply(this,arguments)}function c(b,S){return h.apply(this,arguments)}function h(){return(h=ge(function*(b,S){const w=s.getSubtleCrypto(),A=yield y(b,m.e),L=yield w.sign({length:m.g,name:m.e},A,S);return new Uint8Array(L)})).apply(this,arguments)}function u(b,S){return d.apply(this,arguments)}function d(){return(d=ge(function*(b,S){const w=s.getSubtleCrypto(),A=yield y(b,m.e),L=yield w.sign({length:m.h,name:m.e},A,S);return new Uint8Array(L)})).apply(this,arguments)}function _(b){return v.apply(this,arguments)}function v(){return(v=ge(function*(b){const S=s.getSubtleCrypto(),w=yield S.digest({name:m.i},b);return new Uint8Array(w)})).apply(this,arguments)}function T(b){return O.apply(this,arguments)}function O(){return(O=ge(function*(b){const S=s.getSubtleCrypto(),w=yield S.digest({name:m.j},b);return new Uint8Array(w)})).apply(this,arguments)}},function(z,l,f){"use strict";var s=f(22),m=f(3);function y(t,i){return 55296==(64512&t.charCodeAt(i))&&!(i<0||i+1>=t.length)&&56320==(64512&t.charCodeAt(i+1))}function n(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function o(t){return 1===t.length?"0"+t:t}function e(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}l.inherits=m,l.toArray=function(t,i){if(Array.isArray(t))return t.slice();if(!t)return[];var c=[];if("string"==typeof t)if(i){if("hex"===i)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),u=0;u>6|192,c[h++]=63&d|128):y(t,u)?(d=65536+((1023&d)<<10)+(1023&t.charCodeAt(++u)),c[h++]=d>>18|240,c[h++]=d>>12&63|128,c[h++]=d>>6&63|128,c[h++]=63&d|128):(c[h++]=d>>12|224,c[h++]=d>>6&63|128,c[h++]=63&d|128)}else for(u=0;u>>0;return d},l.split32=function(t,i){for(var c=new Array(4*t.length),h=0,u=0;h>>24,c[u+1]=d>>>16&255,c[u+2]=d>>>8&255,c[u+3]=255&d):(c[u+3]=d>>>24,c[u+2]=d>>>16&255,c[u+1]=d>>>8&255,c[u]=255&d)}return c},l.rotr32=function(t,i){return t>>>i|t<<32-i},l.rotl32=function(t,i){return t<>>32-i},l.sum32=function(t,i){return t+i>>>0},l.sum32_3=function(t,i,c){return t+i+c>>>0},l.sum32_4=function(t,i,c,h){return t+i+c+h>>>0},l.sum32_5=function(t,i,c,h,u){return t+i+c+h+u>>>0},l.sum64=function(t,i,c,h){var d=h+t[i+1]>>>0;t[i]=(d>>0,t[i+1]=d},l.sum64_hi=function(t,i,c,h){return(i+h>>>0>>0},l.sum64_lo=function(t,i,c,h){return i+h>>>0},l.sum64_4_hi=function(t,i,c,h,u,d,_,v){var T=0,O=i;return T+=(O=O+h>>>0)>>0)>>0)>>0},l.sum64_4_lo=function(t,i,c,h,u,d,_,v){return i+h+d+v>>>0},l.sum64_5_hi=function(t,i,c,h,u,d,_,v,T,O){var b=0,S=i;return b+=(S=S+h>>>0)>>0)>>0)>>0)>>0},l.sum64_5_lo=function(t,i,c,h,u,d,_,v,T,O){return i+h+d+v+O>>>0},l.rotr64_hi=function(t,i,c){return(i<<32-c|t>>>c)>>>0},l.rotr64_lo=function(t,i,c){return(t<<32-c|i>>>c)>>>0},l.shr64_hi=function(t,i,c){return t>>>c},l.shr64_lo=function(t,i,c){return(t<<32-c|i>>>c)>>>0}},function(z,l,f){(function(s){!function(m,y){"use strict";function n(p,E){if(!p)throw new Error(E||"Assertion failed")}function o(p,E){p.super_=E;var R=function(){};R.prototype=E.prototype,p.prototype=new R,p.prototype.constructor=p}function e(p,E,R){if(e.isBN(p))return p;this.negative=0,this.words=null,this.length=0,this.red=null,null!==p&&("le"!==E&&"be"!==E||(R=E,E=10),this._init(p||0,E||10,R||"be"))}var t;"object"==typeof m?m.exports=e:y.BN=e,e.BN=e,e.wordSize=26;try{t=typeof window<"u"&&void 0!==window.Buffer?window.Buffer:f(245).Buffer}catch{}function i(p,E){var R=p.charCodeAt(E);return R>=65&&R<=70?R-55:R>=97&&R<=102?R-87:R-48&15}function c(p,E,R){var r=i(p,R);return R-1>=E&&(r|=i(p,R-1)<<4),r}function h(p,E,R,r){for(var a=0,g=Math.min(p.length,R),M=E;M=49?x-49+10:x>=17?x-17+10:x}return a}e.isBN=function(p){return p instanceof e||null!==p&&"object"==typeof p&&p.constructor.wordSize===e.wordSize&&Array.isArray(p.words)},e.max=function(p,E){return p.cmp(E)>0?p:E},e.min=function(p,E){return p.cmp(E)<0?p:E},e.prototype._init=function(p,E,R){if("number"==typeof p)return this._initNumber(p,E,R);if("object"==typeof p)return this._initArray(p,E,R);"hex"===E&&(E=16),n(E===(0|E)&&E>=2&&E<=36);var r=0;"-"===(p=p.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;r-=3)this.words[a]|=(g=p[r]|p[r-1]<<8|p[r-2]<<16)<>>26-M&67108863,(M+=24)>=26&&(M-=26,a++);else if("le"===R)for(r=0,a=0;r>>26-M&67108863,(M+=24)>=26&&(M-=26,a++);return this.strip()},e.prototype._parseHex=function(p,E,R){this.length=Math.ceil((p.length-E)/6),this.words=new Array(this.length);for(var r=0;r=E;r-=2)a=c(p,E,r)<=18?(g-=18,this.words[M+=1]|=a>>>26):g+=8;else for(r=(p.length-E)%2==0?E+1:E;r=18?(g-=18,this.words[M+=1]|=a>>>26):g+=8;this.strip()},e.prototype._parseBase=function(p,E,R){this.words=[0],this.length=1;for(var r=0,a=1;a<=67108863;a*=E)r++;r--,a=a/E|0;for(var g=p.length-R,M=g%r,x=Math.min(g,g-M)+R,C=0,U=R;U1&&0===this.words[this.length-1];)this.length--;return this._normSign()},e.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},e.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],_=[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 v(p,E,R){R.negative=E.negative^p.negative;var r=p.length+E.length|0;R.length=r,r=r-1|0;var a=0|p.words[0],g=0|E.words[0],M=a*g,C=M/67108864|0;R.words[0]=67108863&M;for(var U=1;U>>26,I=67108863&C,W=Math.min(U,E.length-1),F=Math.max(0,U-p.length+1);F<=W;F++)V+=(M=(a=0|p.words[U-F|0])*(g=0|E.words[F])+I)/67108864|0,I=67108863&M;R.words[U]=0|I,C=0|V}return 0!==C?R.words[U]=0|C:R.length--,R.strip()}e.prototype.toString=function(p,E){var R;if(E=0|E||1,16===(p=p||10)||"hex"===p){R="";for(var r=0,a=0,g=0;g>>24-r&16777215)||g!==this.length-1?u[6-x.length]+x+R:x+R,(r+=2)>=26&&(r-=26,g--)}for(0!==a&&(R=a.toString(16)+R);R.length%E!=0;)R="0"+R;return 0!==this.negative&&(R="-"+R),R}if(p===(0|p)&&p>=2&&p<=36){var C=d[p],U=_[p];R="";var V=this.clone();for(V.negative=0;!V.isZero();){var I=V.modn(U).toString(p);R=(V=V.idivn(U)).isZero()?I+R:u[C-I.length]+I+R}for(this.isZero()&&(R="0"+R);R.length%E!=0;)R="0"+R;return 0!==this.negative&&(R="-"+R),R}n(!1,"Base should be between 2 and 36")},e.prototype.toNumber=function(){var p=this.words[0];return 2===this.length?p+=67108864*this.words[1]:3===this.length&&1===this.words[2]?p+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-p:p},e.prototype.toJSON=function(){return this.toString(16)},e.prototype.toBuffer=function(p,E){return n(void 0!==t),this.toArrayLike(t,p,E)},e.prototype.toArray=function(p,E){return this.toArrayLike(Array,p,E)},e.prototype.toArrayLike=function(p,E,R){var r=this.byteLength(),a=R||Math.max(1,r);n(r<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var g,M,x="le"===E,C=new p(a),U=this.clone();if(x){for(M=0;!U.isZero();M++)g=U.andln(255),U.iushrn(8),C[M]=g;for(;M=4096&&(R+=13,E>>>=13),E>=64&&(R+=7,E>>>=7),E>=8&&(R+=4,E>>>=4),E>=2&&(R+=2,E>>>=2),R+E},e.prototype._zeroBits=function(p){if(0===p)return 26;var E=p,R=0;return 0==(8191&E)&&(R+=13,E>>>=13),0==(127&E)&&(R+=7,E>>>=7),0==(15&E)&&(R+=4,E>>>=4),0==(3&E)&&(R+=2,E>>>=2),0==(1&E)&&R++,R},e.prototype.bitLength=function(){var E=this._countBits(this.words[this.length-1]);return 26*(this.length-1)+E},e.prototype.zeroBits=function(){if(this.isZero())return 0;for(var p=0,E=0;Ep.length?this.clone().ior(p):p.clone().ior(this)},e.prototype.uor=function(p){return this.length>p.length?this.clone().iuor(p):p.clone().iuor(this)},e.prototype.iuand=function(p){var E;E=this.length>p.length?p:this;for(var R=0;Rp.length?this.clone().iand(p):p.clone().iand(this)},e.prototype.uand=function(p){return this.length>p.length?this.clone().iuand(p):p.clone().iuand(this)},e.prototype.iuxor=function(p){var E,R;this.length>p.length?(E=this,R=p):(E=p,R=this);for(var r=0;rp.length?this.clone().ixor(p):p.clone().ixor(this)},e.prototype.uxor=function(p){return this.length>p.length?this.clone().iuxor(p):p.clone().iuxor(this)},e.prototype.inotn=function(p){n("number"==typeof p&&p>=0);var E=0|Math.ceil(p/26),R=p%26;this._expand(E),R>0&&E--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-R),this.strip()},e.prototype.notn=function(p){return this.clone().inotn(p)},e.prototype.setn=function(p,E){n("number"==typeof p&&p>=0);var R=p/26|0,r=p%26;return this._expand(R+1),this.words[R]=E?this.words[R]|1<p.length?(R=this,r=p):(R=p,r=this);for(var a=0,g=0;g>>26;for(;0!==a&&g>>26;if(this.length=R.length,0!==a)this.words[this.length]=a,this.length++;else if(R!==this)for(;gp.length?this.clone().iadd(p):p.clone().iadd(this)},e.prototype.isub=function(p){if(0!==p.negative){p.negative=0;var E=this.iadd(p);return p.negative=1,E._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(p),this.negative=1,this._normSign();var R,r,a=this.cmp(p);if(0===a)return this.negative=0,this.length=1,this.words[0]=0,this;a>0?(R=this,r=p):(R=p,r=this);for(var g=0,M=0;M>26,this.words[M]=67108863&E;for(;0!==g&&M>26,this.words[M]=67108863&E;if(0===g&&M>>13,F=0|M[1],B=8191&F,N=F>>>13,P=0|M[2],j=8191&P,K=P>>>13,Z=0|M[3],J=8191&Z,X=Z>>>13,ee=0|M[4],te=8191&ee,oe=ee>>>13,ve=0|M[5],ie=8191&ve,de=ve>>>13,fe=0|M[6],re=8191&fe,_e=fe>>>13,Ke=0|M[7],pe=8191&Ke,Te=Ke>>>13,Ve=0|M[8],be=8191&Ve,Pe=Ve>>>13,Ye=0|M[9],we=8191&Ye,Be=Ye>>>13,$e=0|x[0],Me=8191&$e,je=$e>>>13,Q=0|x[1],se=8191&Q,le=Q>>>13,Le=0|x[2],he=8191&Le,Oe=Le>>>13,Ge=0|x[3],me=8191&Ge,ze=Ge>>>13,rt=0|x[4],Re=8191&rt,He=rt>>>13,Qe=0|x[5],xe=8191&Qe,Ne=Qe>>>13,it=0|x[6],Ee=8191&it,qe=it>>>13,et=0|x[7],ke=8191&et,We=et>>>13,tt=0|x[8],Se=8191&tt,Fe=tt>>>13,nt=0|x[9],Ae=8191&nt,Ue=nt>>>13;R.negative=p.negative^E.negative,R.length=19;var Y=(U+(r=Math.imul(I,Me))|0)+((8191&(a=(a=Math.imul(I,je))+Math.imul(W,Me)|0))<<13)|0;U=((g=Math.imul(W,je))+(a>>>13)|0)+(Y>>>26)|0,Y&=67108863,r=Math.imul(B,Me),a=(a=Math.imul(B,je))+Math.imul(N,Me)|0,g=Math.imul(N,je);var G=(U+(r=r+Math.imul(I,se)|0)|0)+((8191&(a=(a=a+Math.imul(I,le)|0)+Math.imul(W,se)|0))<<13)|0;U=((g=g+Math.imul(W,le)|0)+(a>>>13)|0)+(G>>>26)|0,G&=67108863,r=Math.imul(j,Me),a=(a=Math.imul(j,je))+Math.imul(K,Me)|0,g=Math.imul(K,je),r=r+Math.imul(B,se)|0,a=(a=a+Math.imul(B,le)|0)+Math.imul(N,se)|0,g=g+Math.imul(N,le)|0;var $=(U+(r=r+Math.imul(I,he)|0)|0)+((8191&(a=(a=a+Math.imul(I,Oe)|0)+Math.imul(W,he)|0))<<13)|0;U=((g=g+Math.imul(W,Oe)|0)+(a>>>13)|0)+($>>>26)|0,$&=67108863,r=Math.imul(J,Me),a=(a=Math.imul(J,je))+Math.imul(X,Me)|0,g=Math.imul(X,je),r=r+Math.imul(j,se)|0,a=(a=a+Math.imul(j,le)|0)+Math.imul(K,se)|0,g=g+Math.imul(K,le)|0,r=r+Math.imul(B,he)|0,a=(a=a+Math.imul(B,Oe)|0)+Math.imul(N,he)|0,g=g+Math.imul(N,Oe)|0;var ne=(U+(r=r+Math.imul(I,me)|0)|0)+((8191&(a=(a=a+Math.imul(I,ze)|0)+Math.imul(W,me)|0))<<13)|0;U=((g=g+Math.imul(W,ze)|0)+(a>>>13)|0)+(ne>>>26)|0,ne&=67108863,r=Math.imul(te,Me),a=(a=Math.imul(te,je))+Math.imul(oe,Me)|0,g=Math.imul(oe,je),r=r+Math.imul(J,se)|0,a=(a=a+Math.imul(J,le)|0)+Math.imul(X,se)|0,g=g+Math.imul(X,le)|0,r=r+Math.imul(j,he)|0,a=(a=a+Math.imul(j,Oe)|0)+Math.imul(K,he)|0,g=g+Math.imul(K,Oe)|0,r=r+Math.imul(B,me)|0,a=(a=a+Math.imul(B,ze)|0)+Math.imul(N,me)|0,g=g+Math.imul(N,ze)|0;var ce=(U+(r=r+Math.imul(I,Re)|0)|0)+((8191&(a=(a=a+Math.imul(I,He)|0)+Math.imul(W,Re)|0))<<13)|0;U=((g=g+Math.imul(W,He)|0)+(a>>>13)|0)+(ce>>>26)|0,ce&=67108863,r=Math.imul(ie,Me),a=(a=Math.imul(ie,je))+Math.imul(de,Me)|0,g=Math.imul(de,je),r=r+Math.imul(te,se)|0,a=(a=a+Math.imul(te,le)|0)+Math.imul(oe,se)|0,g=g+Math.imul(oe,le)|0,r=r+Math.imul(J,he)|0,a=(a=a+Math.imul(J,Oe)|0)+Math.imul(X,he)|0,g=g+Math.imul(X,Oe)|0,r=r+Math.imul(j,me)|0,a=(a=a+Math.imul(j,ze)|0)+Math.imul(K,me)|0,g=g+Math.imul(K,ze)|0,r=r+Math.imul(B,Re)|0,a=(a=a+Math.imul(B,He)|0)+Math.imul(N,Re)|0,g=g+Math.imul(N,He)|0;var ue=(U+(r=r+Math.imul(I,xe)|0)|0)+((8191&(a=(a=a+Math.imul(I,Ne)|0)+Math.imul(W,xe)|0))<<13)|0;U=((g=g+Math.imul(W,Ne)|0)+(a>>>13)|0)+(ue>>>26)|0,ue&=67108863,r=Math.imul(re,Me),a=(a=Math.imul(re,je))+Math.imul(_e,Me)|0,g=Math.imul(_e,je),r=r+Math.imul(ie,se)|0,a=(a=a+Math.imul(ie,le)|0)+Math.imul(de,se)|0,g=g+Math.imul(de,le)|0,r=r+Math.imul(te,he)|0,a=(a=a+Math.imul(te,Oe)|0)+Math.imul(oe,he)|0,g=g+Math.imul(oe,Oe)|0,r=r+Math.imul(J,me)|0,a=(a=a+Math.imul(J,ze)|0)+Math.imul(X,me)|0,g=g+Math.imul(X,ze)|0,r=r+Math.imul(j,Re)|0,a=(a=a+Math.imul(j,He)|0)+Math.imul(K,Re)|0,g=g+Math.imul(K,He)|0,r=r+Math.imul(B,xe)|0,a=(a=a+Math.imul(B,Ne)|0)+Math.imul(N,xe)|0,g=g+Math.imul(N,Ne)|0;var Ce=(U+(r=r+Math.imul(I,Ee)|0)|0)+((8191&(a=(a=a+Math.imul(I,qe)|0)+Math.imul(W,Ee)|0))<<13)|0;U=((g=g+Math.imul(W,qe)|0)+(a>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(pe,Me),a=(a=Math.imul(pe,je))+Math.imul(Te,Me)|0,g=Math.imul(Te,je),r=r+Math.imul(re,se)|0,a=(a=a+Math.imul(re,le)|0)+Math.imul(_e,se)|0,g=g+Math.imul(_e,le)|0,r=r+Math.imul(ie,he)|0,a=(a=a+Math.imul(ie,Oe)|0)+Math.imul(de,he)|0,g=g+Math.imul(de,Oe)|0,r=r+Math.imul(te,me)|0,a=(a=a+Math.imul(te,ze)|0)+Math.imul(oe,me)|0,g=g+Math.imul(oe,ze)|0,r=r+Math.imul(J,Re)|0,a=(a=a+Math.imul(J,He)|0)+Math.imul(X,Re)|0,g=g+Math.imul(X,He)|0,r=r+Math.imul(j,xe)|0,a=(a=a+Math.imul(j,Ne)|0)+Math.imul(K,xe)|0,g=g+Math.imul(K,Ne)|0,r=r+Math.imul(B,Ee)|0,a=(a=a+Math.imul(B,qe)|0)+Math.imul(N,Ee)|0,g=g+Math.imul(N,qe)|0;var Ie=(U+(r=r+Math.imul(I,ke)|0)|0)+((8191&(a=(a=a+Math.imul(I,We)|0)+Math.imul(W,ke)|0))<<13)|0;U=((g=g+Math.imul(W,We)|0)+(a>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(be,Me),a=(a=Math.imul(be,je))+Math.imul(Pe,Me)|0,g=Math.imul(Pe,je),r=r+Math.imul(pe,se)|0,a=(a=a+Math.imul(pe,le)|0)+Math.imul(Te,se)|0,g=g+Math.imul(Te,le)|0,r=r+Math.imul(re,he)|0,a=(a=a+Math.imul(re,Oe)|0)+Math.imul(_e,he)|0,g=g+Math.imul(_e,Oe)|0,r=r+Math.imul(ie,me)|0,a=(a=a+Math.imul(ie,ze)|0)+Math.imul(de,me)|0,g=g+Math.imul(de,ze)|0,r=r+Math.imul(te,Re)|0,a=(a=a+Math.imul(te,He)|0)+Math.imul(oe,Re)|0,g=g+Math.imul(oe,He)|0,r=r+Math.imul(J,xe)|0,a=(a=a+Math.imul(J,Ne)|0)+Math.imul(X,xe)|0,g=g+Math.imul(X,Ne)|0,r=r+Math.imul(j,Ee)|0,a=(a=a+Math.imul(j,qe)|0)+Math.imul(K,Ee)|0,g=g+Math.imul(K,qe)|0,r=r+Math.imul(B,ke)|0,a=(a=a+Math.imul(B,We)|0)+Math.imul(N,ke)|0,g=g+Math.imul(N,We)|0;var De=(U+(r=r+Math.imul(I,Se)|0)|0)+((8191&(a=(a=a+Math.imul(I,Fe)|0)+Math.imul(W,Se)|0))<<13)|0;U=((g=g+Math.imul(W,Fe)|0)+(a>>>13)|0)+(De>>>26)|0,De&=67108863,r=Math.imul(we,Me),a=(a=Math.imul(we,je))+Math.imul(Be,Me)|0,g=Math.imul(Be,je),r=r+Math.imul(be,se)|0,a=(a=a+Math.imul(be,le)|0)+Math.imul(Pe,se)|0,g=g+Math.imul(Pe,le)|0,r=r+Math.imul(pe,he)|0,a=(a=a+Math.imul(pe,Oe)|0)+Math.imul(Te,he)|0,g=g+Math.imul(Te,Oe)|0,r=r+Math.imul(re,me)|0,a=(a=a+Math.imul(re,ze)|0)+Math.imul(_e,me)|0,g=g+Math.imul(_e,ze)|0,r=r+Math.imul(ie,Re)|0,a=(a=a+Math.imul(ie,He)|0)+Math.imul(de,Re)|0,g=g+Math.imul(de,He)|0,r=r+Math.imul(te,xe)|0,a=(a=a+Math.imul(te,Ne)|0)+Math.imul(oe,xe)|0,g=g+Math.imul(oe,Ne)|0,r=r+Math.imul(J,Ee)|0,a=(a=a+Math.imul(J,qe)|0)+Math.imul(X,Ee)|0,g=g+Math.imul(X,qe)|0,r=r+Math.imul(j,ke)|0,a=(a=a+Math.imul(j,We)|0)+Math.imul(K,ke)|0,g=g+Math.imul(K,We)|0,r=r+Math.imul(B,Se)|0,a=(a=a+Math.imul(B,Fe)|0)+Math.imul(N,Se)|0,g=g+Math.imul(N,Fe)|0;var ye=(U+(r=r+Math.imul(I,Ae)|0)|0)+((8191&(a=(a=a+Math.imul(I,Ue)|0)+Math.imul(W,Ae)|0))<<13)|0;U=((g=g+Math.imul(W,Ue)|0)+(a>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(we,se),a=(a=Math.imul(we,le))+Math.imul(Be,se)|0,g=Math.imul(Be,le),r=r+Math.imul(be,he)|0,a=(a=a+Math.imul(be,Oe)|0)+Math.imul(Pe,he)|0,g=g+Math.imul(Pe,Oe)|0,r=r+Math.imul(pe,me)|0,a=(a=a+Math.imul(pe,ze)|0)+Math.imul(Te,me)|0,g=g+Math.imul(Te,ze)|0,r=r+Math.imul(re,Re)|0,a=(a=a+Math.imul(re,He)|0)+Math.imul(_e,Re)|0,g=g+Math.imul(_e,He)|0,r=r+Math.imul(ie,xe)|0,a=(a=a+Math.imul(ie,Ne)|0)+Math.imul(de,xe)|0,g=g+Math.imul(de,Ne)|0,r=r+Math.imul(te,Ee)|0,a=(a=a+Math.imul(te,qe)|0)+Math.imul(oe,Ee)|0,g=g+Math.imul(oe,qe)|0,r=r+Math.imul(J,ke)|0,a=(a=a+Math.imul(J,We)|0)+Math.imul(X,ke)|0,g=g+Math.imul(X,We)|0,r=r+Math.imul(j,Se)|0,a=(a=a+Math.imul(j,Fe)|0)+Math.imul(K,Se)|0,g=g+Math.imul(K,Fe)|0;var ae=(U+(r=r+Math.imul(B,Ae)|0)|0)+((8191&(a=(a=a+Math.imul(B,Ue)|0)+Math.imul(N,Ae)|0))<<13)|0;U=((g=g+Math.imul(N,Ue)|0)+(a>>>13)|0)+(ae>>>26)|0,ae&=67108863,r=Math.imul(we,he),a=(a=Math.imul(we,Oe))+Math.imul(Be,he)|0,g=Math.imul(Be,Oe),r=r+Math.imul(be,me)|0,a=(a=a+Math.imul(be,ze)|0)+Math.imul(Pe,me)|0,g=g+Math.imul(Pe,ze)|0,r=r+Math.imul(pe,Re)|0,a=(a=a+Math.imul(pe,He)|0)+Math.imul(Te,Re)|0,g=g+Math.imul(Te,He)|0,r=r+Math.imul(re,xe)|0,a=(a=a+Math.imul(re,Ne)|0)+Math.imul(_e,xe)|0,g=g+Math.imul(_e,Ne)|0,r=r+Math.imul(ie,Ee)|0,a=(a=a+Math.imul(ie,qe)|0)+Math.imul(de,Ee)|0,g=g+Math.imul(de,qe)|0,r=r+Math.imul(te,ke)|0,a=(a=a+Math.imul(te,We)|0)+Math.imul(oe,ke)|0,g=g+Math.imul(oe,We)|0,r=r+Math.imul(J,Se)|0,a=(a=a+Math.imul(J,Fe)|0)+Math.imul(X,Se)|0,g=g+Math.imul(X,Fe)|0;var Je=(U+(r=r+Math.imul(j,Ae)|0)|0)+((8191&(a=(a=a+Math.imul(j,Ue)|0)+Math.imul(K,Ae)|0))<<13)|0;U=((g=g+Math.imul(K,Ue)|0)+(a>>>13)|0)+(Je>>>26)|0,Je&=67108863,r=Math.imul(we,me),a=(a=Math.imul(we,ze))+Math.imul(Be,me)|0,g=Math.imul(Be,ze),r=r+Math.imul(be,Re)|0,a=(a=a+Math.imul(be,He)|0)+Math.imul(Pe,Re)|0,g=g+Math.imul(Pe,He)|0,r=r+Math.imul(pe,xe)|0,a=(a=a+Math.imul(pe,Ne)|0)+Math.imul(Te,xe)|0,g=g+Math.imul(Te,Ne)|0,r=r+Math.imul(re,Ee)|0,a=(a=a+Math.imul(re,qe)|0)+Math.imul(_e,Ee)|0,g=g+Math.imul(_e,qe)|0,r=r+Math.imul(ie,ke)|0,a=(a=a+Math.imul(ie,We)|0)+Math.imul(de,ke)|0,g=g+Math.imul(de,We)|0,r=r+Math.imul(te,Se)|0,a=(a=a+Math.imul(te,Fe)|0)+Math.imul(oe,Se)|0,g=g+Math.imul(oe,Fe)|0;var ot=(U+(r=r+Math.imul(J,Ae)|0)|0)+((8191&(a=(a=a+Math.imul(J,Ue)|0)+Math.imul(X,Ae)|0))<<13)|0;U=((g=g+Math.imul(X,Ue)|0)+(a>>>13)|0)+(ot>>>26)|0,ot&=67108863,r=Math.imul(we,Re),a=(a=Math.imul(we,He))+Math.imul(Be,Re)|0,g=Math.imul(Be,He),r=r+Math.imul(be,xe)|0,a=(a=a+Math.imul(be,Ne)|0)+Math.imul(Pe,xe)|0,g=g+Math.imul(Pe,Ne)|0,r=r+Math.imul(pe,Ee)|0,a=(a=a+Math.imul(pe,qe)|0)+Math.imul(Te,Ee)|0,g=g+Math.imul(Te,qe)|0,r=r+Math.imul(re,ke)|0,a=(a=a+Math.imul(re,We)|0)+Math.imul(_e,ke)|0,g=g+Math.imul(_e,We)|0,r=r+Math.imul(ie,Se)|0,a=(a=a+Math.imul(ie,Fe)|0)+Math.imul(de,Se)|0,g=g+Math.imul(de,Fe)|0;var at=(U+(r=r+Math.imul(te,Ae)|0)|0)+((8191&(a=(a=a+Math.imul(te,Ue)|0)+Math.imul(oe,Ae)|0))<<13)|0;U=((g=g+Math.imul(oe,Ue)|0)+(a>>>13)|0)+(at>>>26)|0,at&=67108863,r=Math.imul(we,xe),a=(a=Math.imul(we,Ne))+Math.imul(Be,xe)|0,g=Math.imul(Be,Ne),r=r+Math.imul(be,Ee)|0,a=(a=a+Math.imul(be,qe)|0)+Math.imul(Pe,Ee)|0,g=g+Math.imul(Pe,qe)|0,r=r+Math.imul(pe,ke)|0,a=(a=a+Math.imul(pe,We)|0)+Math.imul(Te,ke)|0,g=g+Math.imul(Te,We)|0,r=r+Math.imul(re,Se)|0,a=(a=a+Math.imul(re,Fe)|0)+Math.imul(_e,Se)|0,g=g+Math.imul(_e,Fe)|0;var st=(U+(r=r+Math.imul(ie,Ae)|0)|0)+((8191&(a=(a=a+Math.imul(ie,Ue)|0)+Math.imul(de,Ae)|0))<<13)|0;U=((g=g+Math.imul(de,Ue)|0)+(a>>>13)|0)+(st>>>26)|0,st&=67108863,r=Math.imul(we,Ee),a=(a=Math.imul(we,qe))+Math.imul(Be,Ee)|0,g=Math.imul(Be,qe),r=r+Math.imul(be,ke)|0,a=(a=a+Math.imul(be,We)|0)+Math.imul(Pe,ke)|0,g=g+Math.imul(Pe,We)|0,r=r+Math.imul(pe,Se)|0,a=(a=a+Math.imul(pe,Fe)|0)+Math.imul(Te,Se)|0,g=g+Math.imul(Te,Fe)|0;var ut=(U+(r=r+Math.imul(re,Ae)|0)|0)+((8191&(a=(a=a+Math.imul(re,Ue)|0)+Math.imul(_e,Ae)|0))<<13)|0;U=((g=g+Math.imul(_e,Ue)|0)+(a>>>13)|0)+(ut>>>26)|0,ut&=67108863,r=Math.imul(we,ke),a=(a=Math.imul(we,We))+Math.imul(Be,ke)|0,g=Math.imul(Be,We),r=r+Math.imul(be,Se)|0,a=(a=a+Math.imul(be,Fe)|0)+Math.imul(Pe,Se)|0,g=g+Math.imul(Pe,Fe)|0;var Ze=(U+(r=r+Math.imul(pe,Ae)|0)|0)+((8191&(a=(a=a+Math.imul(pe,Ue)|0)+Math.imul(Te,Ae)|0))<<13)|0;U=((g=g+Math.imul(Te,Ue)|0)+(a>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,r=Math.imul(we,Se),a=(a=Math.imul(we,Fe))+Math.imul(Be,Se)|0,g=Math.imul(Be,Fe);var ct=(U+(r=r+Math.imul(be,Ae)|0)|0)+((8191&(a=(a=a+Math.imul(be,Ue)|0)+Math.imul(Pe,Ae)|0))<<13)|0;U=((g=g+Math.imul(Pe,Ue)|0)+(a>>>13)|0)+(ct>>>26)|0,ct&=67108863;var Xe=(U+(r=Math.imul(we,Ae))|0)+((8191&(a=(a=Math.imul(we,Ue))+Math.imul(Be,Ae)|0))<<13)|0;return U=((g=Math.imul(Be,Ue))+(a>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,C[0]=Y,C[1]=G,C[2]=$,C[3]=ne,C[4]=ce,C[5]=ue,C[6]=Ce,C[7]=Ie,C[8]=De,C[9]=ye,C[10]=ae,C[11]=Je,C[12]=ot,C[13]=at,C[14]=st,C[15]=ut,C[16]=Ze,C[17]=ct,C[18]=Xe,0!==U&&(C[19]=U,R.length++),R};function O(p,E,R){return(new b).mulp(p,E,R)}function b(p,E){this.x=p,this.y=E}Math.imul||(T=v),e.prototype.mulTo=function(p,E){var R=this.length+p.length;return 10===this.length&&10===p.length?T(this,p,E):R<63?v(this,p,E):R<1024?function(r,a,g){g.negative=a.negative^r.negative,g.length=r.length+a.length;for(var M=0,x=0,C=0;C>>26)|0)>>>26,U&=67108863}g.words[C]=V,M=U,U=x}return 0!==M?g.words[C]=M:g.length--,g.strip()}(this,p,E):O(this,p,E)},b.prototype.makeRBT=function(p){for(var E=new Array(p),R=e.prototype._countBits(p)-1,r=0;r>=1;return r},b.prototype.permute=function(p,E,R,r,a,g){for(var M=0;M>>=1)a++;return 1<>>=13),a>>>=13;for(g=2*E;g>=26,E+=r/67108864|0,E+=a>>>26,this.words[R]=67108863&a}return 0!==E&&(this.words[R]=E,this.length++),this},e.prototype.muln=function(p){return this.clone().imuln(p)},e.prototype.sqr=function(){return this.mul(this)},e.prototype.isqr=function(){return this.imul(this.clone())},e.prototype.pow=function(p){var E=function(g){for(var M=new Array(g.bitLength()),x=0;x>>U}return M}(p);if(0===E.length)return new e(1);for(var R=this,r=0;r=0);var E,R=p%26,r=(p-R)/26,a=67108863>>>26-R<<26-R;if(0!==R){var g=0;for(E=0;E>>26-R}g&&(this.words[E]=g,this.length++)}if(0!==r){for(E=this.length-1;E>=0;E--)this.words[E+r]=this.words[E];for(E=0;E=0),r=E?(E-E%26)/26:0;var a=p%26,g=Math.min((p-a)/26,this.length),M=67108863^67108863>>>a<g)for(this.length-=g,C=0;C=0&&(0!==U||C>=r);C--){var V=0|this.words[C];this.words[C]=U<<26-a|V>>>a,U=V&M}return x&&0!==U&&(x.words[x.length++]=U),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},e.prototype.ishrn=function(p,E,R){return n(0===this.negative),this.iushrn(p,E,R)},e.prototype.shln=function(p){return this.clone().ishln(p)},e.prototype.ushln=function(p){return this.clone().iushln(p)},e.prototype.shrn=function(p){return this.clone().ishrn(p)},e.prototype.ushrn=function(p){return this.clone().iushrn(p)},e.prototype.testn=function(p){n("number"==typeof p&&p>=0);var E=p%26,R=(p-E)/26;return!(this.length<=R||!(this.words[R]&1<=0);var E=p%26,R=(p-E)/26;return n(0===this.negative,"imaskn works only with positive numbers"),this.length<=R?this:(0!==E&&R++,this.length=Math.min(R,this.length),0!==E&&(this.words[this.length-1]&=67108863^67108863>>>E<=67108864;E++)this.words[E]-=67108864,E===this.length-1?this.words[E+1]=1:this.words[E+1]++;return this.length=Math.max(this.length,E+1),this},e.prototype.isubn=function(p){if(n("number"==typeof p),n(p<67108864),p<0)return this.iaddn(-p);if(0!==this.negative)return this.negative=0,this.iaddn(p),this.negative=1,this;if(this.words[0]-=p,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var E=0;E>26)-(x/67108864|0),this.words[r+R]=67108863&a}for(;r>26,this.words[r+R]=67108863&a;if(0===M)return this.strip();for(n(-1===M),M=0,r=0;r>26,this.words[r]=67108863&a;return this.negative=1,this.strip()},e.prototype._wordDiv=function(p,E){var R,r=this.clone(),a=p,g=0|a.words[a.length-1];0!=(R=26-this._countBits(g))&&(a=a.ushln(R),r.iushln(R),g=0|a.words[a.length-1]);var M,x=r.length-a.length;if("mod"!==E){(M=new e(null)).length=x+1,M.words=new Array(M.length);for(var C=0;C=0;V--){var I=67108864*(0|r.words[a.length+V])+(0|r.words[a.length+V-1]);for(I=Math.min(I/g|0,67108863),r._ishlnsubmul(a,I,V);0!==r.negative;)I--,r.negative=0,r._ishlnsubmul(a,1,V),r.isZero()||(r.negative^=1);M&&(M.words[V]=I)}return M&&M.strip(),r.strip(),"div"!==E&&0!==R&&r.iushrn(R),{div:M||null,mod:r}},e.prototype.divmod=function(p,E,R){return n(!p.isZero()),this.isZero()?{div:new e(0),mod:new e(0)}:0!==this.negative&&0===p.negative?(g=this.neg().divmod(p,E),"mod"!==E&&(r=g.div.neg()),"div"!==E&&(a=g.mod.neg(),R&&0!==a.negative&&a.iadd(p)),{div:r,mod:a}):0===this.negative&&0!==p.negative?(g=this.divmod(p.neg(),E),"mod"!==E&&(r=g.div.neg()),{div:r,mod:g.mod}):0!=(this.negative&p.negative)?(g=this.neg().divmod(p.neg(),E),"div"!==E&&(a=g.mod.neg(),R&&0!==a.negative&&a.isub(p)),{div:g.div,mod:a}):p.length>this.length||this.cmp(p)<0?{div:new e(0),mod:this}:1===p.length?"div"===E?{div:this.divn(p.words[0]),mod:null}:"mod"===E?{div:null,mod:new e(this.modn(p.words[0]))}:{div:this.divn(p.words[0]),mod:new e(this.modn(p.words[0]))}:this._wordDiv(p,E);var r,a,g},e.prototype.div=function(p){return this.divmod(p,"div",!1).div},e.prototype.mod=function(p){return this.divmod(p,"mod",!1).mod},e.prototype.umod=function(p){return this.divmod(p,"mod",!0).mod},e.prototype.divRound=function(p){var E=this.divmod(p);if(E.mod.isZero())return E.div;var R=0!==E.div.negative?E.mod.isub(p):E.mod,r=p.ushrn(1),a=p.andln(1),g=R.cmp(r);return g<0||1===a&&0===g?E.div:0!==E.div.negative?E.div.isubn(1):E.div.iaddn(1)},e.prototype.modn=function(p){n(p<=67108863);for(var E=(1<<26)%p,R=0,r=this.length-1;r>=0;r--)R=(E*R+(0|this.words[r]))%p;return R},e.prototype.idivn=function(p){n(p<=67108863);for(var E=0,R=this.length-1;R>=0;R--){var r=(0|this.words[R])+67108864*E;this.words[R]=r/p|0,E=r%p}return this.strip()},e.prototype.divn=function(p){return this.clone().idivn(p)},e.prototype.egcd=function(p){n(0===p.negative),n(!p.isZero());var E=this,R=p.clone();E=0!==E.negative?E.umod(p):E.clone();for(var r=new e(1),a=new e(0),g=new e(0),M=new e(1),x=0;E.isEven()&&R.isEven();)E.iushrn(1),R.iushrn(1),++x;for(var C=R.clone(),U=E.clone();!E.isZero();){for(var V=0,I=1;0==(E.words[0]&I)&&V<26;++V,I<<=1);if(V>0)for(E.iushrn(V);V-- >0;)(r.isOdd()||a.isOdd())&&(r.iadd(C),a.isub(U)),r.iushrn(1),a.iushrn(1);for(var W=0,F=1;0==(R.words[0]&F)&&W<26;++W,F<<=1);if(W>0)for(R.iushrn(W);W-- >0;)(g.isOdd()||M.isOdd())&&(g.iadd(C),M.isub(U)),g.iushrn(1),M.iushrn(1);E.cmp(R)>=0?(E.isub(R),r.isub(g),a.isub(M)):(R.isub(E),g.isub(r),M.isub(a))}return{a:g,b:M,gcd:R.iushln(x)}},e.prototype._invmp=function(p){n(0===p.negative),n(!p.isZero());var E=this,R=p.clone();E=0!==E.negative?E.umod(p):E.clone();for(var r,a=new e(1),g=new e(0),M=R.clone();E.cmpn(1)>0&&R.cmpn(1)>0;){for(var x=0,C=1;0==(E.words[0]&C)&&x<26;++x,C<<=1);if(x>0)for(E.iushrn(x);x-- >0;)a.isOdd()&&a.iadd(M),a.iushrn(1);for(var U=0,V=1;0==(R.words[0]&V)&&U<26;++U,V<<=1);if(U>0)for(R.iushrn(U);U-- >0;)g.isOdd()&&g.iadd(M),g.iushrn(1);E.cmp(R)>=0?(E.isub(R),a.isub(g)):(R.isub(E),g.isub(a))}return(r=0===E.cmpn(1)?a:g).cmpn(0)<0&&r.iadd(p),r},e.prototype.gcd=function(p){if(this.isZero())return p.abs();if(p.isZero())return this.abs();var E=this.clone(),R=p.clone();E.negative=0,R.negative=0;for(var r=0;E.isEven()&&R.isEven();r++)E.iushrn(1),R.iushrn(1);for(;;){for(;E.isEven();)E.iushrn(1);for(;R.isEven();)R.iushrn(1);var a=E.cmp(R);if(a<0){var g=E;E=R,R=g}else if(0===a||0===R.cmpn(1))break;E.isub(R)}return R.iushln(r)},e.prototype.invm=function(p){return this.egcd(p).a.umod(p)},e.prototype.isEven=function(){return 0==(1&this.words[0])},e.prototype.isOdd=function(){return 1==(1&this.words[0])},e.prototype.andln=function(p){return this.words[0]&p},e.prototype.bincn=function(p){n("number"==typeof p);var E=p%26,R=(p-E)/26,r=1<>>26,this.words[g]=M&=67108863}return 0!==a&&(this.words[g]=a,this.length++),this},e.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},e.prototype.cmpn=function(p){var E,R=p<0;if(0!==this.negative&&!R)return-1;if(0===this.negative&&R)return 1;if(this.strip(),this.length>1)E=1;else{R&&(p=-p),n(p<=67108863,"Number is too big");var r=0|this.words[0];E=r===p?0:rp.length)return 1;if(this.length=0;R--){var r=0|this.words[R],a=0|p.words[R];if(r!==a){ra&&(E=1);break}}return E},e.prototype.gtn=function(p){return 1===this.cmpn(p)},e.prototype.gt=function(p){return 1===this.cmp(p)},e.prototype.gten=function(p){return this.cmpn(p)>=0},e.prototype.gte=function(p){return this.cmp(p)>=0},e.prototype.ltn=function(p){return-1===this.cmpn(p)},e.prototype.lt=function(p){return-1===this.cmp(p)},e.prototype.lten=function(p){return this.cmpn(p)<=0},e.prototype.lte=function(p){return this.cmp(p)<=0},e.prototype.eqn=function(p){return 0===this.cmpn(p)},e.prototype.eq=function(p){return 0===this.cmp(p)},e.red=function(p){return new q(p)},e.prototype.toRed=function(p){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),p.convertTo(this)._forceRed(p)},e.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},e.prototype._forceRed=function(p){return this.red=p,this},e.prototype.forceRed=function(p){return n(!this.red,"Already a number in reduction context"),this._forceRed(p)},e.prototype.redAdd=function(p){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,p)},e.prototype.redIAdd=function(p){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,p)},e.prototype.redSub=function(p){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,p)},e.prototype.redISub=function(p){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,p)},e.prototype.redShl=function(p){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,p)},e.prototype.redMul=function(p){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,p),this.red.mul(this,p)},e.prototype.redIMul=function(p){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,p),this.red.imul(this,p)},e.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},e.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},e.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},e.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},e.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},e.prototype.redPow=function(p){return n(this.red&&!p.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,p)};var S={k256:null,p224:null,p192:null,p25519:null};function w(p,E){this.name=p,this.p=new e(E,16),this.n=this.p.bitLength(),this.k=new e(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function A(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function L(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function H(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function D(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function q(p){if("string"==typeof p){var E=e._prime(p);this.m=E.p,this.prime=E}else n(p.gtn(1),"modulus must be greater than 1"),this.m=p,this.prime=null}function k(p){q.call(this,p),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new e(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)}w.prototype._tmp=function(){var p=new e(null);return p.words=new Array(Math.ceil(this.n/13)),p},w.prototype.ireduce=function(p){var E,R=p;do{this.split(R,this.tmp),E=(R=(R=this.imulK(R)).iadd(this.tmp)).bitLength()}while(E>this.n);var r=E0?R.isub(this.p):void 0!==R.strip?R.strip():R._strip(),R},w.prototype.split=function(p,E){p.iushrn(this.n,0,E)},w.prototype.imulK=function(p){return p.imul(this.k)},o(A,w),A.prototype.split=function(p,E){for(var R=Math.min(p.length,9),r=0;r>>22,a=g}p.words[r-10]=a>>>=22,p.length-=0===a&&p.length>10?10:9},A.prototype.imulK=function(p){p.words[p.length]=0,p.words[p.length+1]=0,p.length+=2;for(var E=0,R=0;R>>=26,p.words[R]=a,E=r}return 0!==E&&(p.words[p.length++]=E),p},e._prime=function(p){if(S[p])return S[p];var E;if("k256"===p)E=new A;else if("p224"===p)E=new L;else if("p192"===p)E=new H;else{if("p25519"!==p)throw new Error("Unknown prime "+p);E=new D}return S[p]=E,E},q.prototype._verify1=function(p){n(0===p.negative,"red works only with positives"),n(p.red,"red works only with red numbers")},q.prototype._verify2=function(p,E){n(0==(p.negative|E.negative),"red works only with positives"),n(p.red&&p.red===E.red,"red works only with red numbers")},q.prototype.imod=function(p){return this.prime?this.prime.ireduce(p)._forceRed(this):p.umod(this.m)._forceRed(this)},q.prototype.neg=function(p){return p.isZero()?p.clone():this.m.sub(p)._forceRed(this)},q.prototype.add=function(p,E){this._verify2(p,E);var R=p.add(E);return R.cmp(this.m)>=0&&R.isub(this.m),R._forceRed(this)},q.prototype.iadd=function(p,E){this._verify2(p,E);var R=p.iadd(E);return R.cmp(this.m)>=0&&R.isub(this.m),R},q.prototype.sub=function(p,E){this._verify2(p,E);var R=p.sub(E);return R.cmpn(0)<0&&R.iadd(this.m),R._forceRed(this)},q.prototype.isub=function(p,E){this._verify2(p,E);var R=p.isub(E);return R.cmpn(0)<0&&R.iadd(this.m),R},q.prototype.shl=function(p,E){return this._verify1(p),this.imod(p.ushln(E))},q.prototype.imul=function(p,E){return this._verify2(p,E),this.imod(p.imul(E))},q.prototype.mul=function(p,E){return this._verify2(p,E),this.imod(p.mul(E))},q.prototype.isqr=function(p){return this.imul(p,p.clone())},q.prototype.sqr=function(p){return this.mul(p,p)},q.prototype.sqrt=function(p){if(p.isZero())return p.clone();var E=this.m.andln(3);if(n(E%2==1),3===E){var R=this.m.add(new e(1)).iushrn(2);return this.pow(p,R)}for(var r=this.m.subn(1),a=0;!r.isZero()&&0===r.andln(1);)a++,r.iushrn(1);n(!r.isZero());var g=new e(1).toRed(this),M=g.redNeg(),x=this.m.subn(1).iushrn(1),C=this.m.bitLength();for(C=new e(2*C*C).toRed(this);0!==this.pow(C,x).cmp(M);)C.redIAdd(M);for(var U=this.pow(C,r),V=this.pow(p,r.addn(1).iushrn(1)),I=this.pow(p,r),W=a;0!==I.cmp(g);){for(var F=I,B=0;0!==F.cmp(g);B++)F=F.redSqr();n(B=0;r--){for(var C=E.words[r],U=x-1;U>=0;U--){var V=C>>U&1;a!==R[0]&&(a=this.sqr(a)),0!==V||0!==g?(g<<=1,g|=V,(4==++M||0===r&&0===U)&&(a=this.mul(a,R[g]),M=0,g=0)):M=0}x=26}return a},q.prototype.convertTo=function(p){var E=p.umod(this.m);return E===p?E.clone():E},q.prototype.convertFrom=function(p){var E=p.clone();return E.red=null,E},e.mont=function(p){return new k(p)},o(k,q),k.prototype.convertTo=function(p){return this.imod(p.ushln(this.shift))},k.prototype.convertFrom=function(p){var E=this.imod(p.mul(this.rinv));return E.red=null,E},k.prototype.imul=function(p,E){if(p.isZero()||E.isZero())return p.words[0]=0,p.length=1,p;var R=p.imul(E),r=R.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=R.isub(r).iushrn(this.shift),g=a;return a.cmp(this.m)>=0?g=a.isub(this.m):a.cmpn(0)<0&&(g=a.iadd(this.m)),g._forceRed(this)},k.prototype.mul=function(p,E){if(p.isZero()||E.isZero())return new e(0)._forceRed(this);var R=p.mul(E),r=R.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=R.isub(r).iushrn(this.shift),g=a;return a.cmp(this.m)>=0?g=a.isub(this.m):a.cmpn(0)<0&&(g=a.iadd(this.m)),g._forceRed(this)},k.prototype.invm=function(p){return this.imod(p._invmp(this.m).mul(this.r2))._forceRed(this)}}(s,this)}).call(this,f(25)(z))},function(z,l){var f,s=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];l.getSymbolSize=function(m){if(!m)throw new Error('"version" cannot be null or undefined');if(m<1||m>40)throw new Error('"version" should be in range from 1 to 40');return 4*m+17},l.getSymbolTotalCodewords=function(m){return s[m]},l.getBCHDigit=function(m){for(var y=0;0!==m;)y++,m>>>=1;return y},l.setToSJISFunction=function(m){if("function"!=typeof m)throw new Error('"toSJISFunc" is not a valid function.');f=m},l.isKanjiModeEnabled=function(){return void 0!==f},l.toSJIS=function(m){return f(m)}},function(z,l,f){var s=f(99),m=f(100);l.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},l.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},l.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},l.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},l.MIXED={bit:-1},l.getCharCountIndicator=function(y,n){if(!y.ccBits)throw new Error("Invalid mode: "+y);if(!s.isValid(n))throw new Error("Invalid version: "+n);return n>=1&&n<10?y.ccBits[0]:n<27?y.ccBits[1]:y.ccBits[2]},l.getBestModeForData=function(y){return m.testNumeric(y)?l.NUMERIC:m.testAlphanumeric(y)?l.ALPHANUMERIC:m.testKanji(y)?l.KANJI:l.BYTE},l.toString=function(y){if(y&&y.id)return y.id;throw new Error("Invalid mode")},l.isValid=function(y){return y&&y.bit&&y.ccBits},l.from=function(y,n){if(l.isValid(y))return y;try{return function(o){if("string"!=typeof o)throw new Error("Param is not a string");switch(o.toLowerCase()){case"numeric":return l.NUMERIC;case"alphanumeric":return l.ALPHANUMERIC;case"kanji":return l.KANJI;case"byte":return l.BYTE;default:throw new Error("Unknown mode: "+o)}}(y)}catch{return n}}},function(z,l,f){"use strict";var s=f(43),m=Object.keys||function(d){var _=[];for(var v in d)_.push(v);return _};z.exports=c;var y=Object.create(f(35));y.inherits=f(3);var n=f(105),o=f(53);y.inherits(c,n);for(var e=m(o.prototype),t=0;t>5==6?2:d>>4==14?3:d>>3==30?4:d>>6==2?-1:-2}function o(d){var _=this.lastTotal-this.lastNeed,v=function(T,O,b){if(128!=(192&O[0]))return T.lastNeed=0,"\ufffd";if(T.lastNeed>1&&O.length>1){if(128!=(192&O[1]))return T.lastNeed=1,"\ufffd";if(T.lastNeed>2&&O.length>2&&128!=(192&O[2]))return T.lastNeed=2,"\ufffd"}}(this,d);return void 0!==v?v:this.lastNeed<=d.length?(d.copy(this.lastChar,_,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(d.copy(this.lastChar,_,0,d.length),void(this.lastNeed-=d.length))}function e(d,_){if((d.length-_)%2==0){var v=d.toString("utf16le",_);if(v){var T=v.charCodeAt(v.length-1);if(T>=55296&&T<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=d[d.length-2],this.lastChar[1]=d[d.length-1],v.slice(0,-1)}return v}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=d[d.length-1],d.toString("utf16le",_,d.length-1)}function t(d){var _=d&&d.length?this.write(d):"";return this.lastNeed?_+this.lastChar.toString("utf16le",0,this.lastTotal-this.lastNeed):_}function i(d,_){var v=(d.length-_)%3;return 0===v?d.toString("base64",_):(this.lastNeed=3-v,this.lastTotal=3,1===v?this.lastChar[0]=d[d.length-1]:(this.lastChar[0]=d[d.length-2],this.lastChar[1]=d[d.length-1]),d.toString("base64",_,d.length-v))}function c(d){var _=d&&d.length?this.write(d):"";return this.lastNeed?_+this.lastChar.toString("base64",0,3-this.lastNeed):_}function h(d){return d.toString(this.encoding)}function u(d){return d&&d.length?this.write(d):""}l.StringDecoder=y,y.prototype.write=function(d){if(0===d.length)return"";var _,v;if(this.lastNeed){if(void 0===(_=this.fillLast(d)))return"";v=this.lastNeed,this.lastNeed=0}else v=0;return v=0?(A>0&&(O.lastNeed=A-1),A):--w=0?(A>0&&(O.lastNeed=A-2),A):--w=0?(A>0&&(2===A?A=0:O.lastNeed=A-3),A):0}(this,d,_);if(!this.lastNeed)return d.toString("utf8",_);this.lastTotal=v;var T=d.length-(v-this.lastNeed);return d.copy(this.lastChar,0,T),d.toString("utf8",_,T)},y.prototype.fillLast=function(d){if(this.lastNeed<=d.length)return d.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);d.copy(this.lastChar,this.lastTotal-this.lastNeed,0,d.length),this.lastNeed-=d.length}},function(z,l,f){(function(s){var m=Object.getOwnPropertyDescriptors||function(a){for(var g=Object.keys(a),M={},x=0;x=C)return I;switch(I){case"%s":return String(x[M++]);case"%d":return Number(x[M++]);case"%j":try{return JSON.stringify(x[M++])}catch{return"[Circular]"}default:return I}}),V=x[M];M=3&&(M.depth=arguments[2]),arguments.length>=4&&(M.colors=arguments[3]),_(g)?M.showHidden=g:g&&l._extend(M,g),b(M.showHidden)&&(M.showHidden=!1),b(M.depth)&&(M.depth=2),b(M.colors)&&(M.colors=!1),b(M.customInspect)&&(M.customInspect=!0),M.colors&&(M.stylize=t),c(M,a,M.depth)}function t(a,g){var M=e.styles[g];return M?"\x1b["+e.colors[M][0]+"m"+a+"\x1b["+e.colors[M][1]+"m":a}function i(a,g){return a}function c(a,g,M){if(a.customInspect&&g&&H(g.inspect)&&g.inspect!==l.inspect&&(!g.constructor||g.constructor.prototype!==g)){var x=g.inspect(M,a);return O(x)||(x=c(a,x,M)),x}var C=function(P,j){if(b(j))return P.stylize("undefined","undefined");if(O(j)){var K="'"+JSON.stringify(j).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return P.stylize(K,"string")}return T(j)?P.stylize(""+j,"number"):_(j)?P.stylize(""+j,"boolean"):v(j)?P.stylize("null","null"):void 0}(a,g);if(C)return C;var j,U=Object.keys(g),V=(j={},U.forEach(function(K,Z){j[K]=!0}),j);if(a.showHidden&&(U=Object.getOwnPropertyNames(g)),L(g)&&(U.indexOf("message")>=0||U.indexOf("description")>=0))return h(g);if(0===U.length){if(H(g))return a.stylize("[Function"+(g.name?": "+g.name:"")+"]","special");if(S(g))return a.stylize(RegExp.prototype.toString.call(g),"regexp");if(A(g))return a.stylize(Date.prototype.toString.call(g),"date");if(L(g))return h(g)}var W,F="",B=!1,N=["{","}"];return d(g)&&(B=!0,N=["[","]"]),H(g)&&(F=" [Function"+(g.name?": "+g.name:"")+"]"),S(g)&&(F=" "+RegExp.prototype.toString.call(g)),A(g)&&(F=" "+Date.prototype.toUTCString.call(g)),L(g)&&(F=" "+h(g)),0!==U.length||B&&0!=g.length?M<0?S(g)?a.stylize(RegExp.prototype.toString.call(g),"regexp"):a.stylize("[Object]","special"):(a.seen.push(g),W=B?function(P,j,K,Z,J){for(var X=[],ee=0,te=j.length;ee60?K[0]+(""===j?"":j+"\n ")+" "+P.join(",\n ")+" "+K[1]:K[0]+j+" "+P.join(", ")+" "+K[1]}(W,F,N)):N[0]+F+N[1]}function h(a){return"["+Error.prototype.toString.call(a)+"]"}function u(a,g,M,x,C,U){var V,I,W;if((W=Object.getOwnPropertyDescriptor(g,C)||{value:g[C]}).get?I=a.stylize(W.set?"[Getter/Setter]":"[Getter]","special"):W.set&&(I=a.stylize("[Setter]","special")),E(x,C)||(V="["+C+"]"),I||(a.seen.indexOf(W.value)<0?(I=v(M)?c(a,W.value,null):c(a,W.value,M-1)).indexOf("\n")>-1&&(I=U?I.split("\n").map(function(F){return" "+F}).join("\n").substr(2):"\n"+I.split("\n").map(function(F){return" "+F}).join("\n")):I=a.stylize("[Circular]","special")),b(V)){if(U&&C.match(/^\d+$/))return I;(V=JSON.stringify(""+C)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(V=V.substr(1,V.length-2),V=a.stylize(V,"name")):(V=V.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),V=a.stylize(V,"string"))}return V+": "+I}function d(a){return Array.isArray(a)}function _(a){return"boolean"==typeof a}function v(a){return null===a}function T(a){return"number"==typeof a}function O(a){return"string"==typeof a}function b(a){return void 0===a}function S(a){return w(a)&&"[object RegExp]"===D(a)}function w(a){return"object"==typeof a&&null!==a}function A(a){return w(a)&&"[object Date]"===D(a)}function L(a){return w(a)&&("[object Error]"===D(a)||a instanceof Error)}function H(a){return"function"==typeof a}function D(a){return Object.prototype.toString.call(a)}function q(a){return a<10?"0"+a.toString(10):a.toString(10)}l.debuglog=function(a){if(b(n)&&(n=s.env.NODE_DEBUG||""),a=a.toUpperCase(),!o[a])if(new RegExp("\\b"+a+"\\b","i").test(n)){var g=s.pid;o[a]=function(){var M=l.format.apply(l,arguments);console.error("%s %d: %s",a,g,M)}}else o[a]=function(){};return o[a]},l.inspect=e,e.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},e.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},l.isArray=d,l.isBoolean=_,l.isNull=v,l.isNullOrUndefined=function(a){return null==a},l.isNumber=T,l.isString=O,l.isSymbol=function(a){return"symbol"==typeof a},l.isUndefined=b,l.isRegExp=S,l.isObject=w,l.isDate=A,l.isError=L,l.isFunction=H,l.isPrimitive=function(a){return null===a||"boolean"==typeof a||"number"==typeof a||"string"==typeof a||"symbol"==typeof a||void 0===a},l.isBuffer=f(225);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function p(){var a=new Date,g=[q(a.getHours()),q(a.getMinutes()),q(a.getSeconds())].join(":");return[a.getDate(),k[a.getMonth()],g].join(" ")}function E(a,g){return Object.prototype.hasOwnProperty.call(a,g)}l.log=function(){console.log("%s - %s",p(),l.format.apply(l,arguments))},l.inherits=f(226),l._extend=function(a,g){if(!g||!w(g))return a;for(var M=Object.keys(g),x=M.length;x--;)a[M[x]]=g[M[x]];return a};var R=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function r(a,g){if(!a){var M=new Error("Promise was rejected with a falsy value");M.reason=a,a=M}return g(a)}l.promisify=function(a){if("function"!=typeof a)throw new TypeError('The "original" argument must be of type Function');if(R&&a[R]){var g;if("function"!=typeof(g=a[R]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(g,R,{value:g,enumerable:!1,writable:!1,configurable:!0}),g}function g(){for(var M,x,C=new Promise(function(I,W){M=I,x=W}),U=[],V=0;Vt.code===o)||s.f[s.a]}},function(z,l){z.exports=function(f){return f.webpackPolyfill||(f.deprecate=function(){},f.paths=[],f.children||(f.children=[]),Object.defineProperty(f,"loaded",{enumerable:!0,get:function(){return f.l}}),Object.defineProperty(f,"id",{enumerable:!0,get:function(){return f.i}}),f.webpackPolyfill=1),f}},function(z,l,f){"use strict";var s=f(50),m=(y.TYPED_ARRAY_SUPPORT=function(){try{var h=new Uint8Array(1);return h.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===h.foo()}catch{return!1}}())?2147483647:1073741823;function y(h,u,d){return y.TYPED_ARRAY_SUPPORT||this instanceof y?"number"==typeof h?e(this,h):function(_,v,T,O){if("number"==typeof v)throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&v instanceof ArrayBuffer?function(b,S,w,A){if(w<0||S.byteLength=m)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+m.toString(16)+" bytes");return 0|h}function o(h,u){var d;return y.TYPED_ARRAY_SUPPORT?(d=new Uint8Array(u)).__proto__=y.prototype:(null===(d=h)&&(d=new y(u)),d.length=u),d}function e(h,u){var d=o(h,u<0?0:0|n(u));if(!y.TYPED_ARRAY_SUPPORT)for(var _=0;_55295&&d<57344){if(!v){if(d>56319){(u-=3)>-1&&T.push(239,191,189);continue}if(O+1===_){(u-=3)>-1&&T.push(239,191,189);continue}v=d;continue}if(d<56320){(u-=3)>-1&&T.push(239,191,189),v=d;continue}d=65536+(v-55296<<10|d-56320)}else v&&(u-=3)>-1&&T.push(239,191,189);if(v=null,d<128){if((u-=1)<0)break;T.push(d)}else if(d<2048){if((u-=2)<0)break;T.push(d>>6|192,63&d|128)}else if(d<65536){if((u-=3)<0)break;T.push(d>>12|224,d>>6&63|128,63&d|128)}else{if(!(d<1114112))throw new Error("Invalid code point");if((u-=4)<0)break;T.push(d>>18|240,d>>12&63|128,d>>6&63|128,63&d|128)}}return T}function c(h){return y.isBuffer(h)?h.length:typeof ArrayBuffer<"u"&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(h)||h instanceof ArrayBuffer)?h.byteLength:("string"!=typeof h&&(h=""+h),0===h.length?0:i(h).length)}y.TYPED_ARRAY_SUPPORT&&(y.prototype.__proto__=Uint8Array.prototype,y.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&y[Symbol.species]===y&&Object.defineProperty(y,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1})),y.prototype.write=function(h,u,d){void 0===u||void 0===d&&"string"==typeof u?(d=this.length,u=0):isFinite(u)&&(u|=0,isFinite(d)?d|=0:d=void 0);var O,b,_=this.length-u;if((void 0===d||d>_)&&(d=_),h.length>0&&(d<0||u<0)||u>this.length)throw new RangeError("Attempt to write outside buffer bounds");return b=d,function(S,w,A,L){for(var H=0;H=w.length||H>=S.length);++H)w[H+A]=S[H];return H}(i(h,this.length-(O=u)),this,O,b)},y.prototype.slice=function(h,u){var d,_=this.length;if((h=~~h)<0?(h+=_)<0&&(h=0):h>_&&(h=_),(u=void 0===u?_:~~u)<0?(u+=_)<0&&(u=0):u>_&&(u=_),u=h.length&&(u=h.length),u||(u=0),_>0&&_=this.length)throw new RangeError("sourceStart out of bounds");if(_<0)throw new RangeError("sourceEnd out of bounds");_>this.length&&(_=this.length),h.length-u<_-d&&(_=h.length-u+d);var v,T=_-d;if(this===h&&d=0;--v)h[v+u]=this[v+d];else if(T<1e3||!y.TYPED_ARRAY_SUPPORT)for(v=0;v>>=0,d=void 0===d?this.length:d>>>0,h||(h=0),"number"==typeof h)for(v=u;v2?"one of ".concat(o," ").concat(n.slice(0,e-1).join(", "),", or ")+n[e-1]:2===e?"one of ".concat(o," ").concat(n[0]," or ").concat(n[1]):"of ".concat(o," ").concat(n[0])}return"of ".concat(o," ").concat(String(n))}m("ERR_INVALID_OPT_VALUE",function(n,o){return'The value "'+o+'" is invalid for option "'+n+'"'},TypeError),m("ERR_INVALID_ARG_TYPE",function(n,o,e){var t,h,d,v;if("string"==typeof o&&"not "===o.substr(0,"not ".length)?(t="must not be",o=o.replace(/^not /,"")):t="must be",d=n,(void 0===v||v>d.length)&&(v=d.length)," argument"===d.substring(v-" argument".length,v))h="The ".concat(n," ").concat(t," ").concat(y(o,"type"));else{var u=function(d,_,v){return"number"!=typeof v&&(v=0),!(v+".".length>d.length)&&-1!==d.indexOf(".",v)}(n)?"property":"argument";h='The "'.concat(n,'" ').concat(u," ").concat(t," ").concat(y(o,"type"))}return h+". Received type ".concat(typeof e)},TypeError),m("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),m("ERR_METHOD_NOT_IMPLEMENTED",function(n){return"The "+n+" method is not implemented"}),m("ERR_STREAM_PREMATURE_CLOSE","Premature close"),m("ERR_STREAM_DESTROYED",function(n){return"Cannot call "+n+" after a stream was destroyed"}),m("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),m("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),m("ERR_STREAM_WRITE_AFTER_END","write after end"),m("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),m("ERR_UNKNOWN_ENCODING",function(n){return"Unknown encoding: "+n},TypeError),m("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),z.exports.codes=s},function(z,l,f){"use strict";(function(s){var m=Object.keys||function(u){var d=[];for(var _ in u)d.push(_);return d};z.exports=i;var y=f(112),n=f(116);f(3)(i,y);for(var o=m(n.prototype),e=0;e2?"one of ".concat(o," ").concat(n.slice(0,e-1).join(", "),", or ")+n[e-1]:2===e?"one of ".concat(o," ").concat(n[0]," or ").concat(n[1]):"of ".concat(o," ").concat(n[0])}return"of ".concat(o," ").concat(String(n))}m("ERR_INVALID_OPT_VALUE",function(n,o){return'The value "'+o+'" is invalid for option "'+n+'"'},TypeError),m("ERR_INVALID_ARG_TYPE",function(n,o,e){var t,h,d,v;if("string"==typeof o&&"not "===o.substr(0,"not ".length)?(t="must not be",o=o.replace(/^not /,"")):t="must be",d=n,(void 0===v||v>d.length)&&(v=d.length)," argument"===d.substring(v-" argument".length,v))h="The ".concat(n," ").concat(t," ").concat(y(o,"type"));else{var u=function(d,_,v){return"number"!=typeof v&&(v=0),!(v+".".length>d.length)&&-1!==d.indexOf(".",v)}(n)?"property":"argument";h='The "'.concat(n,'" ').concat(u," ").concat(t," ").concat(y(o,"type"))}return h+". Received type ".concat(typeof e)},TypeError),m("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),m("ERR_METHOD_NOT_IMPLEMENTED",function(n){return"The "+n+" method is not implemented"}),m("ERR_STREAM_PREMATURE_CLOSE","Premature close"),m("ERR_STREAM_DESTROYED",function(n){return"Cannot call "+n+" after a stream was destroyed"}),m("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),m("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),m("ERR_STREAM_WRITE_AFTER_END","write after end"),m("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),m("ERR_UNKNOWN_ENCODING",function(n){return"Unknown encoding: "+n},TypeError),m("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),z.exports.codes=s},function(z,l,f){"use strict";(function(s){var m=Object.keys||function(u){var d=[];for(var _ in u)d.push(_);return d};z.exports=i;var y=f(128),n=f(132);f(3)(i,y);for(var o=m(n.prototype),e=0;e=this._finalSize&&(this._update(this._block),this._block.fill(0));var o=8*this._len;if(o<=4294967295)this._block.writeUInt32BE(o,this._blockSize-4);else{var e=(4294967295&o)>>>0;this._block.writeUInt32BE((o-e)/4294967296,this._blockSize-8),this._block.writeUInt32BE(e,this._blockSize-4)}this._update(this._block);var i=this._hash();return y?i.toString(y):i},m.prototype._update=function(){throw new Error("_update must be implemented by subclass")},z.exports=m},function(z,l,f){"use strict";(function(s){var m=f(136),y=f(293);function n(e){var t=e;if("string"!=typeof t)throw new Error("[ethjs-util] while padding to even, value must be string, is currently "+typeof t+", while padToEven.");return t.length%2&&(t="0"+t),t}function o(e){return"0x"+e.toString(16)}z.exports={arrayContainsArray:function(e,t,i){if(!0!==Array.isArray(e))throw new Error("[ethjs-util] method arrayContainsArray requires input 'superset' to be an array got type '"+typeof e+"'");if(!0!==Array.isArray(t))throw new Error("[ethjs-util] method arrayContainsArray requires input 'subset' to be an array got type '"+typeof t+"'");return t[Boolean(i)?"some":"every"](function(c){return e.indexOf(c)>=0})},intToBuffer:function(e){var t=o(e);return new s(n(t.slice(2)),"hex")},getBinarySize:function(e){if("string"!=typeof e)throw new Error("[ethjs-util] while getting binary size, method getBinarySize requires input 'str' to be type String, got '"+typeof e+"'.");return s.byteLength(e,"utf8")},isHexPrefixed:m,stripHexPrefix:y,padToEven:n,intToHex:o,fromAscii:function(e){for(var t="",i=0;i0&&"0"===T.toString();)T=(v=v.slice(1))[0];return v},l.toBuffer=function(v){if(!d.isBuffer(v))if(Array.isArray(v))v=d.from(v);else if("string"==typeof v)v=l.isHexString(v)?d.from(l.padToEven(l.stripHexPrefix(v)),"hex"):d.from(v);else if("number"==typeof v)v=l.intToBuffer(v);else if(null==v)v=d.allocUnsafe(0);else if(h.isBN(v))v=v.toArrayLike(d);else{if(!v.toArray)throw new Error("invalid type");v=d.from(v.toArray())}return v},l.bufferToInt=function(v){return new h(l.toBuffer(v)).toNumber()},l.bufferToHex=function(v){return"0x"+(v=l.toBuffer(v)).toString("hex")},l.fromSigned=function(v){return new h(v).fromTwos(256)},l.toUnsigned=function(v){return d.from(v.toTwos(256).toArray())},l.keccak=function(v,T){switch(v=l.toBuffer(v),T||(T=256),T){case 224:return y(v);case 256:return o(v);case 384:return n(v);case 512:return e(v);default:throw new Error("Invald algorithm: keccak"+T)}},l.keccak256=function(v){return l.keccak(v)},l.sha3=l.keccak,l.sha256=function(v){return v=l.toBuffer(v),u("sha256").update(v).digest()},l.ripemd160=function(v,T){v=l.toBuffer(v);var O=u("rmd160").update(v).digest();return!0===T?l.setLength(O,32):O},l.rlphash=function(v){return l.keccak(c.encode(v))},l.isValidPrivate=function(v){return t.privateKeyVerify(v)},l.isValidPublic=function(v,T){return 64===v.length?t.publicKeyVerify(d.concat([d.from([4]),v])):!!T&&t.publicKeyVerify(v)},l.pubToAddress=l.publicToAddress=function(v,T){return v=l.toBuffer(v),T&&64!==v.length&&(v=t.publicKeyConvert(v,!1).slice(1)),i(64===v.length),l.keccak(v).slice(-20)};var _=l.privateToPublic=function(v){return v=l.toBuffer(v),t.publicKeyCreate(v,!1).slice(1)};l.importPublic=function(v){return 64!==(v=l.toBuffer(v)).length&&(v=t.publicKeyConvert(v,!1).slice(1)),v},l.ecsign=function(v,T){var O=t.sign(v,T),b={};return b.r=O.signature.slice(0,32),b.s=O.signature.slice(32,64),b.v=O.recovery+27,b},l.hashPersonalMessage=function(v){var T=l.toBuffer("\x19Ethereum Signed Message:\n"+v.length.toString());return l.keccak(d.concat([T,v]))},l.ecrecover=function(v,T,O,b){var S=d.concat([l.setLength(O,32),l.setLength(b,32)],64),w=T-27;if(0!==w&&1!==w)throw new Error("Invalid signature v value");var A=t.recover(v,S,w);return t.publicKeyConvert(A,!1).slice(1)},l.toRpcSig=function(v,T,O){if(27!==v&&28!==v)throw new Error("Invalid recovery id");return l.bufferToHex(d.concat([l.setLengthLeft(T,32),l.setLengthLeft(O,32),l.toBuffer(v-27)]))},l.fromRpcSig=function(v){if(65!==(v=l.toBuffer(v)).length)throw new Error("Invalid signature length");var T=v[64];return T<27&&(T+=27),{v:T,r:v.slice(0,32),s:v.slice(32,64)}},l.privateToAddress=function(v){return l.publicToAddress(_(v))},l.isValidAddress=function(v){return/^0x[0-9a-fA-F]{40}$/.test(v)},l.isZeroAddress=function(v){return l.zeroAddress()===l.addHexPrefix(v)},l.toChecksumAddress=function(v){v=l.stripHexPrefix(v).toLowerCase();for(var T=l.keccak(v).toString("hex"),O="0x",b=0;b=8?O+=v[b].toUpperCase():O+=v[b];return O},l.isValidChecksumAddress=function(v){return l.isValidAddress(v)&&l.toChecksumAddress(v)===v},l.generateAddress=function(v,T){return v=l.toBuffer(v),T=(T=new h(T)).isZero()?null:d.from(T.toArray()),l.rlphash([v,T]).slice(-20)},l.isPrecompiled=function(v){var T=l.unpad(v);return 1===T.length&&T[0]>=1&&T[0]<=8},l.addHexPrefix=function(v){return"string"!=typeof v||l.isHexPrefixed(v)?v:"0x"+v},l.isValidSignature=function(v,T,O,b){var S=new h("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),w=new h("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);return!(32!==T.length||32!==O.length||27!==v&&28!==v||(T=new h(T),O=new h(O),T.isZero()||T.gt(w)||O.isZero()||O.gt(w)||!1===b&&1===new h(O).cmp(S)))},l.baToJSON=function(v){if(d.isBuffer(v))return"0x"+v.toString("hex");if(v instanceof Array){for(var T=[],O=0;O=H.length,"The field "+S.name+" must not have more "+S.length+" bytes")):S.allowZero&&0===H.length||!S.length||i(S.length===H.length,"The field "+S.name+" must have byte length of "+S.length),v.raw[w]=H}v._fields.push(S.name),Object.defineProperty(v,S.name,{enumerable:!0,configurable:!0,get:A,set:L}),S.default&&(v[S.name]=S.default),S.alias&&Object.defineProperty(v,S.alias,{enumerable:!1,configurable:!0,set:L,get:A})}),O)if("string"==typeof O&&(O=d.from(l.stripHexPrefix(O),"hex")),d.isBuffer(O)&&(O=c.decode(O)),Array.isArray(O)){if(O.length>v._fields.length)throw new Error("wrong number of fields in data");O.forEach(function(S,w){v[v._fields[w]]=l.toBuffer(S)})}else{if("object"!==(void 0===O?"undefined":s(O)))throw new Error("invalid data");var b=Object.keys(O);T.forEach(function(S){-1!==b.indexOf(S.name)&&(v[S.name]=O[S.name]),-1!==b.indexOf(S.alias)&&(v[S.alias]=O[S.alias])})}}},function(z,l,f){"use strict";var s=f(15),m=f(22);function y(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}l.BlockHash=y,y.prototype.update=function(n,o){if(n=s.toArray(n,o),this.pending=this.pending?this.pending.concat(n):n,this.pendingTotal+=n.length,this.pending.length>=this._delta8){var e=(n=this.pending).length%this._delta8;this.pending=n.slice(n.length-e,n.length),0===this.pending.length&&(this.pending=null),n=s.join32(n,0,n.length-e,this.endian);for(var t=0;t>>24&255,t[i++]=n>>>16&255,t[i++]=n>>>8&255,t[i++]=255&n}else for(t[i++]=255&n,t[i++]=n>>>8&255,t[i++]=n>>>16&255,t[i++]=n>>>24&255,t[i++]=0,t[i++]=0,t[i++]=0,t[i++]=0,c=8;c"latest"===o||"earliest"===e?1:"latest"===e||"earliest"===o?-1:s(o)-s(e))}function s(n){return null==n?n:Number.parseInt(n,16)}function m(n){if(null==n)return n;let o=n.toString(16);return o.length%2&&(o="0"+o),"0x"+o}function y(){return Math.floor(16*Math.random()).toString(16)}z.exports={minBlockRef:function(...n){return f(n)[0]},maxBlockRef:function(...n){const o=f(n);return o[o.length-1]},sortBlockRefs:f,bnToHex:function(n){return"0x"+n.toString(16)},blockRefIsNumber:function(n){return n&&!["earliest","latest","pending"].includes(n)},hexToInt:s,incrementHexInt:function(n){return null==n?n:m(s(n)+1)},intToHex:m,unsafeRandomBytes:function(n){let o="0x";for(let e=0;e0&&"0"===o.toString();)o=(n=n.slice(1))[0];return n},l.stripZeros=l.unpad,l.toBuffer=function(n){if(!s.isBuffer(n))if(Array.isArray(n))n=s.from(n);else if("string"==typeof n){if(!m.isHexString(n))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: "+n);n=s.from(m.padToEven(m.stripHexPrefix(n)),"hex")}else if("number"==typeof n)n=m.intToBuffer(n);else if(null==n)n=s.allocUnsafe(0);else if(y.isBN(n))n=n.toArrayLike(s);else{if(!n.toArray)throw new Error("invalid type");n=s.from(n.toArray())}return n},l.bufferToInt=function(n){return new y(l.toBuffer(n)).toNumber()},l.bufferToHex=function(n){return"0x"+(n=l.toBuffer(n)).toString("hex")},l.fromSigned=function(n){return new y(n).fromTwos(256)},l.toUnsigned=function(n){return s.from(n.toTwos(256).toArray())},l.addHexPrefix=function(n){return"string"!=typeof n||m.isHexPrefixed(n)?n:"0x"+n},l.baToJSON=function(n){if(s.isBuffer(n))return"0x"+n.toString("hex");if(n instanceof Array){for(var o=[],e=0;e0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function t(i,c){this.curve=i,this.type=c,this.precomputed=null}z.exports=e,e.prototype.point=function(){throw new Error("Not implemented")},e.prototype.validate=function(){throw new Error("Not implemented")},e.prototype._fixedNafMul=function(i,c){o(i.precomputed);var h=i._getDoubles(),u=y(c,1,this._bitLength),d=(1<=_;O--)v=(v<<1)+u[O];T.push(v)}for(var b=this.jpoint(null,null,null),S=this.jpoint(null,null,null),w=d;w>0;w--){for(_=0;_=0;T--){for(var O=0;T>=0&&0===_[T];T--)O++;if(T>=0&&O++,v=v.dblp(O),T<0)break;var b=_[T];o(0!==b),v="affine"===i.type?v.mixedAdd(b>0?d[b-1>>1]:d[-b-1>>1].neg()):v.add(b>0?d[b-1>>1]:d[-b-1>>1].neg())}return"affine"===i.type?v.toP():v},e.prototype._wnafMulAdd=function(i,c,h,u,d){var _,v,T,O=this._wnafT1,b=this._wnafT2,S=this._wnafT3,w=0;for(_=0;_=1;_-=2){var L=_-1,H=_;if(1===O[L]&&1===O[H]){var D=[c[L],null,null,c[H]];0===c[L].y.cmp(c[H].y)?(D[1]=c[L].add(c[H]),D[2]=c[L].toJ().mixedAdd(c[H].neg())):0===c[L].y.cmp(c[H].y.redNeg())?(D[1]=c[L].toJ().mixedAdd(c[H]),D[2]=c[L].add(c[H].neg())):(D[1]=c[L].toJ().mixedAdd(c[H]),D[2]=c[L].toJ().mixedAdd(c[H].neg()));var q=[-3,-1,-5,-7,0,7,5,1,3],k=n(h[L],h[H]);for(w=Math.max(k[0].length,w),S[L]=new Array(w),S[H]=new Array(w),v=0;v=0;_--){for(var a=0;_>=0;){var g=!0;for(v=0;v=0&&a++,R=R.dblp(a),_<0)break;for(v=0;v0?T=b[v][M-1>>1]:M<0&&(T=b[v][-M-1>>1].neg()),R="affine"===T.type?R.mixedAdd(T):R.add(T))}}for(_=0;_=Math.ceil((i.bitLength()+1)/c.step)},t.prototype._getDoubles=function(i,c){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var h=[this],u=this,d=0;d_.length)throw new Error("invalid rlp: total length is larger than the data");if(0===(b=_.slice(T,L)).length)throw new Error("invalid rlp, List has a invalid length");for(;b.length;)S=d(b),w.push(S.data),b=S.remainder;return{data:w,remainder:_.slice(L)}}(i(c));if(h)return u;if(0!==u.remainder.length)throw new Error("invalid remainder");return u.data},l.getLength=function(c){if(!c||0===c.length)return s.from([]);var h=i(c),u=h[0];if(u<=127)return h.length;if(u<=183)return u-127;if(u<=191)return u-182;if(u<=247)return u-191;var d=u-246;return d+n(h.slice(1,d).toString("hex"),16)}}).call(this,f(2).Buffer)},function(z,l,f){var s=f(300),m=f(144);z.exports=function(y){return null!=y&&m(y.length)&&!s(y)}},function(z,l,f){"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.default=function(s,m){m|=0;for(var y=Math.max(s.length-m,0),n=Array(y),o=0;o=0&&f.bit<4},l.from=function(f,s){if(l.isValid(f))return f;try{return function(m){if("string"!=typeof m)throw new Error("Param is not a string");switch(m.toLowerCase()){case"l":case"low":return l.L;case"m":case"medium":return l.M;case"q":case"quartile":return l.Q;case"h":case"high":return l.H;default:throw new Error("Unknown EC Level: "+m)}}(f)}catch{return s}}},function(z,l,f){var s=f(2),m=s.Buffer;function y(o,e){for(var t in o)e[t]=o[t]}function n(o,e,t){return m(o,e,t)}m.from&&m.alloc&&m.allocUnsafe&&m.allocUnsafeSlow?z.exports=s:(y(s,l),l.Buffer=n),y(m,n),n.from=function(o,e,t){if("number"==typeof o)throw new TypeError("Argument must not be a number");return m(o,e,t)},n.alloc=function(o,e,t){if("number"!=typeof o)throw new TypeError("Argument must be a number");var i=m(o);return void 0!==e?"string"==typeof t?i.fill(e,t):i.fill(e):i.fill(0),i},n.allocUnsafe=function(o){if("number"!=typeof o)throw new TypeError("Argument must be a number");return m(o)},n.allocUnsafeSlow=function(o){if("number"!=typeof o)throw new TypeError("Argument must be a number");return s.SlowBuffer(o)}},function(z,l,f){"use strict";(function(s,m,y){var n=f(43);function o(q){var k=this;this.next=null,this.entry=null,this.finish=function(){!function(p,E,R){var r=p.entry;for(p.entry=null;r;){var a=r.callback;E.pendingcb--,a(undefined),r=r.next}E.corkedRequestsFree?E.corkedRequestsFree.next=p:E.corkedRequestsFree=p}(k,q)}}z.exports=b;var e,t=!s.browser&&["v0.10","v0.9."].indexOf(s.version.slice(0,5))>-1?m:n.nextTick;b.WritableState=O;var i=Object.create(f(35));i.inherits=f(3);var _,c={deprecate:f(54)},h=f(106),u=f(52).Buffer,d=y.Uint8Array||function(){},v=f(107);function T(){}function O(q,k){e=e||f(19);var p=k instanceof e;this.objectMode=!!(q=q||{}).objectMode,p&&(this.objectMode=this.objectMode||!!q.writableObjectMode);var E=q.highWaterMark,R=q.writableHighWaterMark;this.highWaterMark=E||0===E?E:p&&(R||0===R)?R:this.objectMode?16:16384,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1,this.decodeStrings=!(!1===q.decodeStrings),this.defaultEncoding=q.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(g){!function(M,x){var W,C=M._writableState,U=C.sync,V=C.writecb;if((W=C).writing=!1,W.writecb=null,W.length-=W.writelen,W.writelen=0,x)!function(W,F,B,N,P){--F.pendingcb,B?(n.nextTick(P,N),n.nextTick(D,W,F),W._writableState.errorEmitted=!0,W.emit("error",N)):(P(N),W._writableState.errorEmitted=!0,W.emit("error",N),D(W,F))}(M,C,U,x,V);else{var I=L(C);I||C.corked||C.bufferProcessing||!C.bufferedRequest||A(M,C),U?t(w,M,C,I,V):w(M,C,I,V)}}(k,g)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function b(q){if(e=e||f(19),!(_.call(b,this)||this instanceof e))return new b(q);this._writableState=new O(q,this),this.writable=!0,q&&("function"==typeof q.write&&(this._write=q.write),"function"==typeof q.writev&&(this._writev=q.writev),"function"==typeof q.destroy&&(this._destroy=q.destroy),"function"==typeof q.final&&(this._final=q.final)),h.call(this)}function S(q,k,p,E,R,r,a){k.writelen=E,k.writecb=a,k.writing=!0,k.sync=!0,p?q._writev(R,k.onwrite):q._write(R,r,k.onwrite),k.sync=!1}function w(q,k,p,E){var R,r;p||(R=q,0===(r=k).length&&r.needDrain&&(r.needDrain=!1,R.emit("drain"))),k.pendingcb--,E(),D(q,k)}function A(q,k){k.bufferProcessing=!0;var p=k.bufferedRequest;if(q._writev&&p&&p.next){var R=new Array(k.bufferedRequestCount),r=k.corkedRequestsFree;r.entry=p;for(var a=0,g=!0;p;)R[a]=p,p.isBuf||(g=!1),p=p.next,a+=1;R.allBuffers=g,S(q,k,!0,k.length,R,"",r.finish),k.pendingcb++,k.lastBufferedRequest=null,r.next?(k.corkedRequestsFree=r.next,r.next=null):k.corkedRequestsFree=new o(k),k.bufferedRequestCount=0}else{for(;p;){var M=p.chunk;if(S(q,k,!1,k.objectMode?1:M.length,M,p.encoding,p.callback),p=p.next,k.bufferedRequestCount--,k.writing)break}null===p&&(k.lastBufferedRequest=null)}k.bufferedRequest=p,k.bufferProcessing=!1}function L(q){return q.ending&&0===q.length&&null===q.bufferedRequest&&!q.finished&&!q.writing}function H(q,k){q._final(function(p){k.pendingcb--,p&&q.emit("error",p),k.prefinished=!0,q.emit("prefinish"),D(q,k)})}function D(q,k){var E,R,p=L(k);return p&&(E=q,(R=k).prefinished||R.finalCalled||("function"==typeof E._final?(R.pendingcb++,R.finalCalled=!0,n.nextTick(H,E,R)):(R.prefinished=!0,E.emit("prefinish"))),0===k.pendingcb&&(k.finished=!0,q.emit("finish"))),p}i.inherits(b,h),O.prototype.getBuffer=function(){for(var q=this.bufferedRequest,k=[];q;)k.push(q),q=q.next;return k},function(){try{Object.defineProperty(O.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(_=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(q){return!!_.call(this,q)||this===b&&q&&q._writableState instanceof O}})):_=function(q){return q instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(q,k,p){var E,g,M,x,R=this._writableState,r=!1,a=!R.objectMode&&(u.isBuffer(E=q)||E instanceof d);return a&&!u.isBuffer(q)&&(q=u.from(q)),"function"==typeof k&&(p=k,k=null),a?k="buffer":k||(k=R.defaultEncoding),"function"!=typeof p&&(p=T),R.ended?(g=this,M=p,x=new Error("write after end"),g.emit("error",x),n.nextTick(M,x)):(a||function(g,M,x,C){var U=!0,V=!1;return null===x?V=new TypeError("May not write null values to stream"):"string"==typeof x||void 0===x||M.objectMode||(V=new TypeError("Invalid non-string/buffer chunk")),V&&(g.emit("error",V),n.nextTick(C,V),U=!1),U}(this,R,q,p))&&(R.pendingcb++,r=function(g,M,x,C,U,V){if(!x){var I=(P=C,(N=M).objectMode||!1===N.decodeStrings||"string"!=typeof P||(P=u.from(P,U)),P);C!==I&&(x=!0,U="buffer",C=I)}var N,P,W=M.objectMode?1:C.length;M.length+=W;var F=M.length-1))throw new TypeError("Unknown encoding: "+q);return this._writableState.defaultEncoding=q,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(q,k,p){p(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(q,k,p){var R,r,a,E=this._writableState;"function"==typeof q?(p=q,q=null,k=null):"function"==typeof k&&(p=k,k=null),null!=q&&this.write(q,k),E.corked&&(E.corked=1,this.uncork()),E.ending||E.finished||(R=this,a=p,(r=E).ending=!0,D(R,r),a&&(r.finished?n.nextTick(a):R.once("finish",a)),r.ended=!0,R.writable=!1)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(q){this._writableState&&(this._writableState.destroyed=q)}}),b.prototype.destroy=v.destroy,b.prototype._undestroy=v.undestroy,b.prototype._destroy=function(q,k){this.end(),k(q)}}).call(this,f(5),f(108).setImmediate,f(6))},function(z,l,f){(function(s){function m(y){try{if(!s.localStorage)return!1}catch{return!1}var n=s.localStorage[y];return null!=n&&"true"===String(n).toLowerCase()}z.exports=function(y,n){if(m("noDeprecation"))return y;var o=!1;return function(){if(!o){if(m("throwDeprecation"))throw new Error(n);m("traceDeprecation")?console.trace(n):console.warn(n),o=!0}return y.apply(this,arguments)}}}).call(this,f(6))},function(z,l,f){"use strict";var s=f(213),m=f(214);function y(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}l.parse=b,l.resolve=function(S,w){return b(S,!1,!0).resolve(w)},l.resolveObject=function(S,w){return S?b(S,!1,!0).resolveObject(w):w},l.format=function(S){return m.isString(S)&&(S=b(S)),S instanceof y?S.format():y.prototype.format.call(S)},l.Url=y;var n=/^([a-z0-9.+-]+:)/i,o=/:[0-9]*$/,e=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,t=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),i=["'"].concat(t),c=["%","/","?",";","#"].concat(i),h=["/","?","#"],u=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,_={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},T={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},O=f(215);function b(S,w,A){if(S&&m.isObject(S)&&S instanceof y)return S;var L=new y;return L.parse(S,w,A),L}y.prototype.parse=function(S,w,A){if(!m.isString(S))throw new TypeError("Parameter 'url' must be a string, not "+typeof S);var L=S.indexOf("?"),H=-1!==L&&L127?W+="x":W+=I[F];if(!W.match(u)){var N=U.slice(0,M),P=U.slice(M+1),j=I.match(d);j&&(N.push(j[1]),P.unshift(j[2])),P.length&&(q="/"+P.join(".")+q),this.hostname=N.join(".");break}}}this.hostname=this.hostname.length>255?"":this.hostname.toLowerCase(),C||(this.hostname=s.toASCII(this.hostname));var K=this.port?":"+this.port:"";this.host=(this.hostname||"")+K,this.href+=this.host,C&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==q[0]&&(q="/"+q))}if(!_[E])for(M=0,V=i.length;M0)&&A.host.split("@"))&&(A.auth=j.shift(),A.host=A.hostname=j.shift())),A.search=S.search,A.query=S.query,m.isNull(A.pathname)&&m.isNull(A.search)||(A.path=(A.pathname?A.pathname:"")+(A.search?A.search:"")),A.href=A.format(),A;if(!I.length)return A.pathname=null,A.path=A.search?"/"+A.search:null,A.href=A.format(),A;for(var F=I.slice(-1)[0],B=(A.host||S.host||I.length>1)&&("."===F||".."===F)||""===F,N=0,P=I.length;P>=0;P--)"."===(F=I[P])?I.splice(P,1):".."===F?(I.splice(P,1),N++):N&&(I.splice(P,1),N--);if(!U&&!V)for(;N--;N)I.unshift("..");!U||""===I[0]||I[0]&&"/"===I[0].charAt(0)||I.unshift(""),B&&"/"!==I.join("/").substr(-1)&&I.push("");var j,K=""===I[0]||I[0]&&"/"===I[0].charAt(0);return W&&(A.hostname=A.host=K?"":I.length?I.shift():"",(j=!!(A.host&&A.host.indexOf("@")>0)&&A.host.split("@"))&&(A.auth=j.shift(),A.host=A.hostname=j.shift())),(U=U||A.host&&I.length)&&!K&&I.unshift(""),I.length?A.pathname=I.join("/"):(A.pathname=null,A.path=null),m.isNull(A.pathname)&&m.isNull(A.search)||(A.path=(A.pathname?A.pathname:"")+(A.search?A.search:"")),A.auth=S.auth||A.auth,A.slashes=A.slashes||S.slashes,A.href=A.format(),A},y.prototype.parseHost=function(){var S=this.host,w=o.exec(S);w&&(":"!==(w=w[0])&&(this.port=w.substr(1)),S=S.substr(0,S.length-w.length)),S&&(this.hostname=S)}},function(z,l,f){"use strict";Object.defineProperty(l,"__esModule",{value:!0});var s=function(){function m(){this.listeners={}}return m.prototype.addEventListener=function(y,n){y=y.toLowerCase(),this.listeners[y]=this.listeners[y]||[],this.listeners[y].push(n.handleEvent||n)},m.prototype.removeEventListener=function(y,n){if(y=y.toLowerCase(),this.listeners[y]){var o=this.listeners[y].indexOf(n.handleEvent||n);o<0||this.listeners[y].splice(o,1)}},m.prototype.dispatchEvent=function(y){var n=y.type.toLowerCase();if(y.target=this,this.listeners[n])for(var o=0,e=this.listeners[n];o=0;U--)if(V[U]!==I[U])return!1;for(U=V.length-1;U>=0;U--)if(!S(R[C=V[U]],r[C],a,g))return!1;return!0}(D,q,k,p))}return k?D===q:D==q}function w(D){return"[object Arguments]"==Object.prototype.toString.call(D)}function A(D,q){if(!D||!q)return!1;if("[object RegExp]"==Object.prototype.toString.call(q))return q.test(D);try{if(D instanceof q)return!0}catch{}return!Error.isPrototypeOf(q)&&!0===q.call({},D)}function L(D,q,k,p){var E;if("function"!=typeof q)throw new TypeError('"block" argument must be a function');"string"==typeof k&&(p=k,k=null),E=function(a){var g;try{a()}catch(M){g=M}return g}(q),p=(k&&k.name?" ("+k.name+").":".")+(p?" "+p:"."),D&&!E&&O(E,k,"Missing expected exception"+p);var R="string"==typeof p,r=!D&&E&&!k;if((!D&&o.isError(E)&&R&&A(E,k)||r)&&O(E,k,"Got unwanted exception"+p),D&&E&&k&&!A(E,k)||!D&&E)throw E}u.AssertionError=function(D){this.name="AssertionError",this.actual=D.actual,this.expected=D.expected,this.operator=D.operator,D.message?(this.message=D.message,this.generatedMessage=!1):(this.message=v(T(this.actual),128)+" "+this.operator+" "+v(T(this.expected),128),this.generatedMessage=!0);var q=D.stackStartFunction||O;if(Error.captureStackTrace)Error.captureStackTrace(this,q);else{var k=new Error;if(k.stack){var p=k.stack,E=_(q),R=p.indexOf("\n"+E);if(R>=0){var r=p.indexOf("\n",R+1);p=p.substring(r+1)}this.stack=p}}},o.inherits(u.AssertionError,Error),u.fail=O,u.ok=b,u.equal=function(D,q,k){D!=q&&O(D,q,k,"==",u.equal)},u.notEqual=function(D,q,k){D==q&&O(D,q,k,"!=",u.notEqual)},u.deepEqual=function(D,q,k){S(D,q,!1)||O(D,q,k,"deepEqual",u.deepEqual)},u.deepStrictEqual=function(D,q,k){S(D,q,!0)||O(D,q,k,"deepStrictEqual",u.deepStrictEqual)},u.notDeepEqual=function(D,q,k){S(D,q,!1)&&O(D,q,k,"notDeepEqual",u.notDeepEqual)},u.notDeepStrictEqual=function D(q,k,p){S(q,k,!0)&&O(q,k,p,"notDeepStrictEqual",D)},u.strictEqual=function(D,q,k){D!==q&&O(D,q,k,"===",u.strictEqual)},u.notStrictEqual=function(D,q,k){D===q&&O(D,q,k,"!==",u.notStrictEqual)},u.throws=function(D,q,k){L(!0,D,q,k)},u.doesNotThrow=function(D,q,k){L(!1,D,q,k)},u.ifError=function(D){if(D)throw D},u.strict=m(function D(q,k){q||O(q,!0,k,"==",D)},u,{equal:u.strictEqual,deepEqual:u.deepStrictEqual,notEqual:u.notStrictEqual,notDeepEqual:u.notDeepStrictEqual}),u.strict.strict=u.strict;var H=Object.keys||function(D){var q=[];for(var k in D)e.call(D,k)&&q.push(k);return q}}).call(this,f(6))},function(z,l,f){"use strict";var s=f(29).codes.ERR_STREAM_PREMATURE_CLOSE;function m(){}z.exports=function y(n,o,e){if("function"==typeof o)return y(n,null,o);var b,S;o||(o={}),b=e||m,S=!1,e=function(){if(!S){S=!0;for(var w=arguments.length,A=new Array(w),L=0;L{t?(delete o.result,o.error={message:t.message||t}):o.result=i,e?e(c):c()})},function(e){if(e)return n(e);n(null,o.result)})}}},function(z,l,f){"use strict";Object.defineProperty(l,"__esModule",{value:!0});const s=f(12);function m(n,o,e){try{Reflect.apply(n,o,e)}catch(t){setTimeout(()=>{throw t})}}l.default=class y extends s.EventEmitter{emit(o,...e){let t="error"===o;const i=this._events;if(void 0!==i)t=t&&void 0===i.error;else if(!t)return!1;if(t){let h;if(e.length>0&&([h]=e),h instanceof Error)throw h;const u=new Error("Unhandled error."+(h?` (${h.message})`:""));throw u.context=h,u}const c=i[o];if(void 0===c)return!1;if("function"==typeof c)m(c,this,e);else{const h=c.length,u=function(d){const _=d.length,v=new Array(_);for(let T=0;T<_;T+=1)v[T]=d[T];return v}(c);for(let d=0;d=1e3&&t<=4999))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');var t;super(n,o,e)}}},function(z,l,f){"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.errorValues=l.errorCodes=void 0,l.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},l.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}},function(z,l,f){const s=f(69).default;z.exports=class extends s{constructor(){super(),this.updates=[]}initialize(){return ge(function*(){})()}update(){return ge(function*(){throw new Error("BaseFilter - no update method specified")})()}addResults(m){this.updates=this.updates.concat(m),m.forEach(y=>this.emit("update",y))}addInitialResults(m){}getChangesAndClear(){const m=this.updates;return this.updates=[],m}}},function(z,l){function f(m){return null==m?m:Number.parseInt(m,16)}function s(m){return null==m?m:"0x"+m.toString(16)}z.exports=function(){var m=ge(function*({provider:y,fromBlock:n,toBlock:o}){n||(n=o);const e=f(n),t=f(o),i=Array(t-e+1).fill().map((c,h)=>e+h).map(s);return yield Promise.all(i.map(c=>{return h=y,"eth_getBlockByNumber",d=[c,!1],new Promise((_,v)=>{h.sendAsync({id:1,jsonrpc:"2.0",method:"eth_getBlockByNumber",params:d},(T,O)=>{if(T)return v(T);_(O.result)})});var h,d}))});return function(y){return m.apply(this,arguments)}}()},function(z,l,f){"use strict";(function(s){Object.defineProperty(l,"__esModule",{value:!0}),l.ecdhUnsafe=l.ecdh=l.recover=l.verify=l.sign=l.signatureImportLax=l.signatureImport=l.signatureExport=l.signatureNormalize=l.publicKeyCombine=l.publicKeyTweakMul=l.publicKeyTweakAdd=l.publicKeyVerify=l.publicKeyConvert=l.publicKeyCreate=l.privateKeyTweakMul=l.privateKeyTweakAdd=l.privateKeyModInverse=l.privateKeyNegate=l.privateKeyImport=l.privateKeyExport=l.privateKeyVerify=void 0;var m=f(118),y=f(361),n=f(362);l.privateKeyVerify=function(o){return 32===o.length&&m.privateKeyVerify(Uint8Array.from(o))},l.privateKeyExport=function(o,e){if(32!==o.length)throw new RangeError("private key length is invalid");var t=y.privateKeyExport(o,e);return n.privateKeyExport(o,t,e)},l.privateKeyImport=function(o){if(null!==(o=n.privateKeyImport(o))&&32===o.length&&l.privateKeyVerify(o))return o;throw new Error("couldn't import from DER format")},l.privateKeyNegate=function(o){return s.from(m.privateKeyNegate(Uint8Array.from(o)))},l.privateKeyModInverse=function(o){if(32!==o.length)throw new Error("private key length is invalid");return s.from(y.privateKeyModInverse(Uint8Array.from(o)))},l.privateKeyTweakAdd=function(o,e){return s.from(m.privateKeyTweakAdd(Uint8Array.from(o),e))},l.privateKeyTweakMul=function(o,e){return s.from(m.privateKeyTweakMul(Uint8Array.from(o),Uint8Array.from(e)))},l.publicKeyCreate=function(o,e){return s.from(m.publicKeyCreate(Uint8Array.from(o),e))},l.publicKeyConvert=function(o,e){return s.from(m.publicKeyConvert(Uint8Array.from(o),e))},l.publicKeyVerify=function(o){return(33===o.length||65===o.length)&&m.publicKeyVerify(Uint8Array.from(o))},l.publicKeyTweakAdd=function(o,e,t){return s.from(m.publicKeyTweakAdd(Uint8Array.from(o),Uint8Array.from(e),t))},l.publicKeyTweakMul=function(o,e,t){return s.from(m.publicKeyTweakMul(Uint8Array.from(o),Uint8Array.from(e),t))},l.publicKeyCombine=function(o,e){var t=[];return o.forEach(function(i){t.push(Uint8Array.from(i))}),s.from(m.publicKeyCombine(t,e))},l.signatureNormalize=function(o){return s.from(m.signatureNormalize(Uint8Array.from(o)))},l.signatureExport=function(o){return s.from(m.signatureExport(Uint8Array.from(o)))},l.signatureImport=function(o){return s.from(m.signatureImport(Uint8Array.from(o)))},l.signatureImportLax=function(o){if(0===o.length)throw new RangeError("signature length is invalid");var e=n.signatureImportLax(o);if(null===e)throw new Error("couldn't parse DER signature");return y.signatureImport(e)},l.sign=function(o,e,t){if(null===t)throw new TypeError("options should be an Object");var i=void 0;if(t){if(i={},null===t.data)throw new TypeError("options.data should be a Buffer");if(t.data){if(32!=t.data.length)throw new RangeError("options.data length is invalid");i.data=new Uint8Array(t.data)}if(null===t.noncefn)throw new TypeError("options.noncefn should be a Function");t.noncefn&&(i.noncefn=function(h,u,d,_,v){var T=null!=d?s.from(d):null,O=null!=_?s.from(_):null,b=s.from("");return t.noncefn&&(b=t.noncefn(s.from(h),s.from(u),T,O,v)),new Uint8Array(b)})}var c=m.ecdsaSign(Uint8Array.from(o),Uint8Array.from(e),i);return{signature:s.from(c.signature),recovery:c.recid}},l.verify=function(o,e,t){return m.ecdsaVerify(Uint8Array.from(e),Uint8Array.from(o),t)},l.recover=function(o,e,t,i){return s.from(m.ecdsaRecover(Uint8Array.from(e),t,Uint8Array.from(o),i))},l.ecdh=function(o,e){return s.from(m.ecdh(Uint8Array.from(o),Uint8Array.from(e),{}))},l.ecdhUnsafe=function(o,e,t){if(33!==o.length&&65!==o.length)throw new RangeError("public key length is invalid");if(32!==e.length)throw new RangeError("private key length is invalid");return s.from(y.ecdhUnsafe(Uint8Array.from(o),Uint8Array.from(e),t))}}).call(this,f(2).Buffer)},function(z,l,f){"use strict";(function(s){Object.defineProperty(l,"__esModule",{value:!0}),l.rlphash=l.ripemd160=l.sha256=l.keccak256=l.keccak=void 0;var m=f(110),y=m.keccak224,n=m.keccak384,o=m.keccak256,e=m.keccak512,t=f(126),i=f(32),c=f(46),h=f(40);l.keccak=function(u,d){switch(void 0===d&&(d=256),u="string"!=typeof u||i.isHexString(u)?h.toBuffer(u):s.from(u,"utf8"),d||(d=256),d){case 224:return y(u);case 256:return o(u);case 384:return n(u);case 512:return e(u);default:throw new Error("Invald algorithm: keccak"+d)}},l.keccak256=function(u){return l.keccak(u)},l.sha256=function(u){return u=h.toBuffer(u),t("sha256").update(u).digest()},l.ripemd160=function(u,d){u=h.toBuffer(u);var _=t("rmd160").update(u).digest();return!0===d?h.setLength(_,32):_},l.rlphash=function(u){return l.keccak(c.encode(u))}}).call(this,f(2).Buffer)},function(z,l,f){"use strict";f.r(l);var s=f(157),m=f(10),y=f(158);function n(W){return Object(y.a)(W)}function o(){const W=n();return W&&W.os?W.os:void 0}function e(){const W=o();return!!W&&W.toLowerCase().includes("android")}function t(){const W=o();return!!W&&(W.toLowerCase().includes("ios")||W.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1)}function i(){return!!o()&&(e()||t())}function c(){const W=n();return!(!W||!W.name)&&"node"===W.name.toLowerCase()}function h(){return!c()&&!!O()}const u=m.getFromWindow,d=m.getFromWindowOrThrow,_=m.getDocumentOrThrow,v=m.getDocument,T=m.getNavigatorOrThrow,O=m.getNavigator,b=m.getLocationOrThrow,S=m.getLocation,w=m.getCryptoOrThrow,A=m.getCrypto,L=m.getLocalStorageOrThrow,H=m.getLocalStorage;function D(){return s.getWindowMetadata()}const q=function(W){if("string"!=typeof W)throw new Error("Cannot safe json parse value of type "+typeof W);try{return JSON.parse(W)}catch{return W}},k=function(W){return"string"==typeof W?W:JSON.stringify(W)};function p(W,F){const B=k(F),N=H();N&&N.setItem(W,B)}function E(W){let F=null,B=null;const N=H();return N&&(B=N.getItem(W)),F=B&&q(B),F}function R(W){const F=H();F&&F.removeItem(W)}function r(W,F){const B=encodeURIComponent(W);return F.universalLink?`${F.universalLink}/wc?uri=${B}`:F.deepLink?`${F.deepLink}${F.deepLink.endsWith(":")?"//":"/"}wc?uri=${B}`:""}function a(W){const F=W.href.split("?")[0];p("WALLETCONNECT_DEEPLINK_CHOICE",Object.assign(Object.assign({},W),{href:F}))}function g(W,F){return W.filter(B=>B.name.toLowerCase().includes(F.toLowerCase()))[0]}function M(W,F){let B=W;return F&&(B=F.map(N=>g(W,N)).filter(Boolean)),B}const x="https://registry.walletconnect.com";function C(){return x+"/api/v2/wallets"}function U(){return x+"/api/v2/dapps"}function V(W,F="mobile"){var B;return{name:W.name||"",shortName:W.metadata.shortName||"",color:W.metadata.colors.primary||"",logo:null!==(B=W.image_url.sm)&&void 0!==B?B:"",universalLink:W[F].universal||"",deepLink:W[F].native||""}}function I(W,F="mobile"){return Object.values(W).filter(B=>!!B[F].universal||!!B[F].native).map(B=>V(B,F))}f.d(l,"detectEnv",function(){return n}),f.d(l,"detectOS",function(){return o}),f.d(l,"isAndroid",function(){return e}),f.d(l,"isIOS",function(){return t}),f.d(l,"isMobile",function(){return i}),f.d(l,"isNode",function(){return c}),f.d(l,"isBrowser",function(){return h}),f.d(l,"getFromWindow",function(){return u}),f.d(l,"getFromWindowOrThrow",function(){return d}),f.d(l,"getDocumentOrThrow",function(){return _}),f.d(l,"getDocument",function(){return v}),f.d(l,"getNavigatorOrThrow",function(){return T}),f.d(l,"getNavigator",function(){return O}),f.d(l,"getLocationOrThrow",function(){return b}),f.d(l,"getLocation",function(){return S}),f.d(l,"getCryptoOrThrow",function(){return w}),f.d(l,"getCrypto",function(){return A}),f.d(l,"getLocalStorageOrThrow",function(){return L}),f.d(l,"getLocalStorage",function(){return H}),f.d(l,"getClientMeta",function(){return D}),f.d(l,"safeJsonParse",function(){return q}),f.d(l,"safeJsonStringify",function(){return k}),f.d(l,"setLocal",function(){return p}),f.d(l,"getLocal",function(){return E}),f.d(l,"removeLocal",function(){return R}),f.d(l,"mobileLinkChoiceKey",function(){return"WALLETCONNECT_DEEPLINK_CHOICE"}),f.d(l,"formatIOSMobile",function(){return r}),f.d(l,"saveMobileLinkInfo",function(){return a}),f.d(l,"getMobileRegistryEntry",function(){return g}),f.d(l,"getMobileLinkRegistry",function(){return M}),f.d(l,"getWalletRegistryUrl",function(){return C}),f.d(l,"getDappRegistryUrl",function(){return U}),f.d(l,"formatMobileRegistryEntry",function(){return V}),f.d(l,"formatMobileRegistry",function(){return I})},function(z,l){z.exports=m,m.strict=y,m.loose=n;var f=Object.prototype.toString,s={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function m(o){return y(o)||n(o)}function y(o){return o instanceof Int8Array||o instanceof Int16Array||o instanceof Int32Array||o instanceof Uint8Array||o instanceof Uint8ClampedArray||o instanceof Uint16Array||o instanceof Uint32Array||o instanceof Float32Array||o instanceof Float64Array}function n(o){return s[f.call(o)]}},function(z,l,f){"use strict";const s=f(174),m=f(175),y=f(176);function n(u){if("string"!=typeof u||1!==u.length)throw new TypeError("arrayFormatSeparator must be single character string")}function o(u,d){return d.encode?d.strict?s(u):encodeURIComponent(u):u}function e(u,d){return d.decode?m(u):u}function t(u){const d=u.indexOf("#");return-1!==d&&(u=u.slice(0,d)),u}function i(u){const d=(u=t(u)).indexOf("?");return-1===d?"":u.slice(d+1)}function c(u,d){return d.parseNumbers&&!Number.isNaN(Number(u))&&"string"==typeof u&&""!==u.trim()?u=Number(u):!d.parseBooleans||null===u||"true"!==u.toLowerCase()&&"false"!==u.toLowerCase()||(u="true"===u.toLowerCase()),u}function h(u,d){n((d=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},d)).arrayFormatSeparator);const _=function(T){let O;switch(T.arrayFormat){case"index":return(b,S,w)=>{O=/\[(\d*)\]$/.exec(b),b=b.replace(/\[\d*\]$/,""),O?(void 0===w[b]&&(w[b]={}),w[b][O[1]]=S):w[b]=S};case"bracket":return(b,S,w)=>{O=/(\[\])$/.exec(b),w[b=b.replace(/\[\]$/,"")]=O?void 0!==w[b]?[].concat(w[b],S):[S]:S};case"comma":case"separator":return(b,S,w)=>{const A="string"==typeof S&&S.split("").indexOf(T.arrayFormatSeparator)>-1?S.split(T.arrayFormatSeparator).map(L=>e(L,T)):null===S?S:e(S,T);w[b]=A};default:return(b,S,w)=>{w[b]=void 0!==w[b]?[].concat(w[b],S):S}}}(d),v=Object.create(null);if("string"!=typeof u||!(u=u.trim().replace(/^[?#&]/,"")))return v;for(const T of u.split("&")){let[O,b]=y(d.decode?T.replace(/\+/g," "):T,"=");b=void 0===b?null:["comma","separator"].includes(d.arrayFormat)?b:e(b,d),_(e(O,d),b,v)}for(const T of Object.keys(v)){const O=v[T];if("object"==typeof O&&null!==O)for(const b of Object.keys(O))O[b]=c(O[b],d);else v[T]=c(O,d)}return!1===d.sort?v:(!0===d.sort?Object.keys(v).sort():Object.keys(v).sort(d.sort)).reduce((T,O)=>{const b=v[O];return T[O]=Boolean(b)&&"object"==typeof b&&!Array.isArray(b)?function S(w){return Array.isArray(w)?w.sort():"object"==typeof w?S(Object.keys(w)).sort((A,L)=>Number(A)-Number(L)).map(A=>w[A]):w}(b):b,T},Object.create(null))}l.extract=i,l.parse=h,l.stringify=(u,d)=>{if(!u)return"";n((d=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},d)).arrayFormatSeparator);const _=b=>d.skipNull&&null==u[b]||d.skipEmptyString&&""===u[b],v=function(b){switch(b.arrayFormat){case"index":return S=>(w,A)=>{const L=w.length;return void 0===A||b.skipNull&&null===A||b.skipEmptyString&&""===A?w:null===A?[...w,[o(S,b),"[",L,"]"].join("")]:[...w,[o(S,b),"[",o(L,b),"]=",o(A,b)].join("")]};case"bracket":return S=>(w,A)=>void 0===A||b.skipNull&&null===A||b.skipEmptyString&&""===A?w:null===A?[...w,[o(S,b),"[]"].join("")]:[...w,[o(S,b),"[]=",o(A,b)].join("")];case"comma":case"separator":return S=>(w,A)=>null==A||0===A.length?w:0===w.length?[[o(S,b),"=",o(A,b)].join("")]:[[w,o(A,b)].join(b.arrayFormatSeparator)];default:return S=>(w,A)=>void 0===A||b.skipNull&&null===A||b.skipEmptyString&&""===A?w:null===A?[...w,o(S,b)]:[...w,[o(S,b),"=",o(A,b)].join("")]}}(d),T={};for(const b of Object.keys(u))_(b)||(T[b]=u[b]);const O=Object.keys(T);return!1!==d.sort&&O.sort(d.sort),O.map(b=>{const S=u[b];return void 0===S?"":null===S?o(b,d):Array.isArray(S)?S.reduce(v(b),[]).join("&"):o(b,d)+"="+o(S,d)}).filter(b=>b.length>0).join("&")},l.parseUrl=(u,d)=>{d=Object.assign({decode:!0},d);const[_,v]=y(u,"#");return Object.assign({url:_.split("?")[0]||"",query:h(i(u),d)},d&&d.parseFragmentIdentifier&&v?{fragmentIdentifier:e(v,d)}:{})},l.stringifyUrl=(u,d)=>{d=Object.assign({encode:!0,strict:!0},d);const _=t(u.url).split("?")[0]||"",v=l.extract(u.url),T=l.parse(v,{sort:!1}),O=Object.assign(T,u.query);let b=l.stringify(O,d);b&&(b="?"+b);let S=function(w){let A="";const L=w.indexOf("#");return-1!==L&&(A=w.slice(L)),A}(u.url);return u.fragmentIdentifier&&(S="#"+o(u.fragmentIdentifier,d)),`${_}${b}${S}`}},function(z,l){var f={}.toString;z.exports=Array.isArray||function(s){return"[object Array]"==f.call(s)}},function(z,l,f){"use strict";var s=f(8);f.o(s,"payloadId")&&f.d(l,"payloadId",function(){return s.payloadId})},function(z,l,f){"use strict";function s(){return Date.now()*Math.pow(10,3)+Math.floor(Math.random()*Math.pow(10,3))}f.d(l,"a",function(){return s}),f(24),f(7)},function(z,l,f){},function(z,l,f){"use strict";f(84)},function(z,l,f){"use strict";f(85),f(41),f(86),f(87)},function(z,l){},function(z,l,f){"use strict";f(41)},function(z,l){},function(z,l,f){},function(z,l,f){},function(z,l,f){"use strict";f.d(l,"a",function(){return m});var s=f(8);function m(y){return s.getBrowerCrypto().getRandomValues(new Uint8Array(y))}},function(z,l,f){"use strict";f.d(l,"b",function(){return m}),f.d(l,"a",function(){return y});var s=f(14);function m(n,o,e){return Object(s.b)(n,o,e)}function y(n,o,e){return Object(s.a)(n,o,e)}},function(z,l,f){"use strict";f.d(l,"a",function(){return m});var s=f(14);function m(n,o){return y.apply(this,arguments)}function y(){return(y=ge(function*(n,o){return yield Object(s.c)(n,o)})).apply(this,arguments)}f(42)},function(z,l,f){"use strict";var s=f(8);f.o(s,"isConstantTime")&&f.d(l,"isConstantTime",function(){return s.isConstantTime})},function(z,l,f){},function(z,l){},function(z,l,f){"use strict";function s(m,y){if(m.length!==y.length)return!1;let n=0;for(let o=0;o=1&&f<=40}},function(z,l){var f="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",s="(?:(?![A-Z0-9 $%*+\\-./:]|"+(f=f.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";l.KANJI=new RegExp(f,"g"),l.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),l.BYTE=new RegExp(s,"g"),l.NUMERIC=new RegExp("[0-9]+","g"),l.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var m=new RegExp("^"+f+"$"),y=new RegExp("^[0-9]+$"),n=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");l.testKanji=function(o){return m.test(o)},l.testNumeric=function(o){return y.test(o)},l.testAlphanumeric=function(o){return n.test(o)}},function(z,l){function f(s){if("number"==typeof s&&(s=s.toString()),"string"!=typeof s)throw new Error("Color should be defined as hex string");var m=s.slice().replace("#","").split("");if(m.length<3||5===m.length||m.length>8)throw new Error("Invalid hex color: "+s);3!==m.length&&4!==m.length||(m=Array.prototype.concat.apply([],m.map(function(n){return[n,n]}))),6===m.length&&m.push("F","F");var y=parseInt(m.join(""),16);return{r:y>>24&255,g:y>>16&255,b:y>>8&255,a:255&y,hex:"#"+m.slice(0,6).join("")}}l.getOptions=function(s){s||(s={}),s.color||(s.color={});var y=s.width&&s.width>=21?s.width:void 0;return{width:y,scale:y?4:s.scale||4,margin:null==s.margin||s.margin<0?4:s.margin,color:{dark:f(s.color.dark||"#000000ff"),light:f(s.color.light||"#ffffffff")},type:s.type,rendererOpts:s.rendererOpts||{}}},l.getScale=function(s,m){return m.width&&m.width>=s+2*m.margin?m.width/(s+2*m.margin):m.scale},l.getImageWidth=function(s,m){var y=l.getScale(s,m);return Math.floor((s+2*m.margin)*y)},l.qrToImageData=function(s,m,y){for(var n=m.modules.size,o=m.modules.data,e=l.getScale(n,y),t=Math.floor((n+2*y.margin)*e),i=y.margin*e,c=[y.color.light,y.color.dark],h=0;h=i&&u>=i&&hc._pos){var d=u.substr(c._pos);if("x-user-defined"===c._charset){for(var _=new m(d.length),v=0;vc._pos&&(c.push(new m(new Uint8Array(T.result.slice(c._pos)))),c._pos=T.result.byteLength)},T.onload=function(){c.push(null)},T.readAsArrayBuffer(u)}c._xhr.readyState===t.DONE&&"ms-stream"!==c._mode&&c.push(null)}}).call(this,f(5),f(2).Buffer,f(6))},function(z,l,f){"use strict";(function(s,m){var y=f(43);z.exports=S;var n,o=f(79);S.ReadableState=b,f(12);var e=function(x,C){return x.listeners(C).length},t=f(106),i=f(52).Buffer,c=s.Uint8Array||function(){},h=Object.create(f(35));h.inherits=f(3);var u=f(205),d=void 0;d=u&&u.debuglog?u.debuglog("stream"):function(){};var _,v=f(206),T=f(107);h.inherits(S,t);var O=["error","close","destroy","pause","resume"];function b(x,C){x=x||{};var U=C instanceof(n=n||f(19));this.objectMode=!!x.objectMode,U&&(this.objectMode=this.objectMode||!!x.readableObjectMode);var V=x.highWaterMark,I=x.readableHighWaterMark;this.highWaterMark=V||0===V?V:U&&(I||0===I)?I:this.objectMode?16:16384,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new v,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=x.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,x.encoding&&(_||(_=f(20).StringDecoder),this.decoder=new _(x.encoding),this.encoding=x.encoding)}function S(x){if(n=n||f(19),!(this instanceof S))return new S(x);this._readableState=new b(x,this),this.readable=!0,x&&("function"==typeof x.read&&(this._read=x.read),"function"==typeof x.destroy&&(this._destroy=x.destroy)),t.call(this)}function w(x,C,U,V,I){var W,B,N,P,j,F=x._readableState;return null===C?(F.reading=!1,function(B,N){if(!N.ended){if(N.decoder){var P=N.decoder.end();P&&P.length&&(N.buffer.push(P),N.length+=N.objectMode?1:P.length)}N.ended=!0,H(B)}}(x,F)):(I||(B=F,i.isBuffer(j=N=C)||j instanceof c||"string"==typeof N||void 0===N||B.objectMode||(P=new TypeError("Invalid non-string/buffer chunk")),W=P),W?x.emit("error",W):F.objectMode||C&&C.length>0?("string"==typeof C||F.objectMode||Object.getPrototypeOf(C)===i.prototype||(C=function(B){return i.from(B)}(C)),V?F.endEmitted?x.emit("error",new Error("stream.unshift() after end event")):A(x,F,C,!0):F.ended?x.emit("error",new Error("stream.push() after EOF")):(F.reading=!1,F.decoder&&!U?(C=F.decoder.write(C),F.objectMode||0!==C.length?A(x,F,C,!1):q(x,F)):A(x,F,C,!1))):V||(F.reading=!1)),function(B){return!B.ended&&(B.needReadable||B.lengthC.highWaterMark&&(C.highWaterMark=((U=x)>=8388608?U=8388608:(U--,U|=U>>>1,U|=U>>>2,U|=U>>>4,U|=U>>>8,U|=U>>>16,U++),U)),x<=C.length?x:C.ended?C.length:(C.needReadable=!0,0));var U}function H(x){var C=x._readableState;C.needReadable=!1,C.emittedReadable||(d("emitReadable",C.flowing),C.emittedReadable=!0,C.sync?y.nextTick(D,x):D(x))}function D(x){d("emit readable"),x.emit("readable"),R(x)}function q(x,C){C.readingMore||(C.readingMore=!0,y.nextTick(k,x,C))}function k(x,C){for(var U=C.length;!C.reading&&!C.flowing&&!C.ended&&C.length=C.length?(U=C.decoder?C.buffer.join(""):1===C.buffer.length?C.buffer.head.data:C.buffer.concat(C.length),C.buffer.clear()):(W=C.decoder,(V=x)<(I=C.buffer).head.data.length?(F=I.head.data.slice(0,V),I.head.data=I.head.data.slice(V)):F=V===I.head.data.length?I.shift():W?function(B,N){var P=N.head,j=1,K=P.data;for(B-=K.length;P=P.next;){var Z=P.data,J=B>Z.length?Z.length:B;if(K+=J===Z.length?Z:Z.slice(0,B),0==(B-=J)){J===Z.length?(++j,N.head=P.next?P.next:N.tail=null):(N.head=P,P.data=Z.slice(J));break}++j}return N.length-=j,K}(V,I):function(B,N){var P=i.allocUnsafe(B),j=N.head,K=1;for(j.data.copy(P),B-=j.data.length;j=j.next;){var Z=j.data,J=B>Z.length?Z.length:B;if(Z.copy(P,P.length-B,0,J),0==(B-=J)){J===Z.length?(++K,N.head=j.next?j.next:N.tail=null):(N.head=j,j.data=Z.slice(J));break}++K}return N.length-=K,P}(V,I),U=F),U);var V,I,W,F,U}function a(x){var C=x._readableState;if(C.length>0)throw new Error('"endReadable()" called on non-empty stream');C.endEmitted||(C.ended=!0,y.nextTick(g,C,x))}function g(x,C){x.endEmitted||0!==x.length||(x.endEmitted=!0,C.readable=!1,C.emit("end"))}function M(x,C){for(var U=0,V=x.length;U=C.highWaterMark||C.ended))return d("read: emitReadable",C.length,C.ended),0===C.length&&C.ended?a(this):H(this),null;if(0===(x=L(x,C))&&C.ended)return 0===C.length&&a(this),null;var V,I=C.needReadable;return d("need readable",I),(0===C.length||C.length-x0?r(x,C):null)?(C.needReadable=!0,x=0):C.length-=x,0===C.length&&(C.ended||(C.needReadable=!0),U!==x&&C.ended&&a(this)),null!==V&&this.emit("data",V),V},S.prototype._read=function(x){this.emit("error",new Error("_read() is not implemented"))},S.prototype.pipe=function(x,C){var U=this,V=this._readableState;switch(V.pipesCount){case 0:V.pipes=x;break;case 1:V.pipes=[V.pipes,x];break;default:V.pipes.push(x)}V.pipesCount+=1,d("pipe count=%d opts=%j",V.pipesCount,C);var I=C&&!1===C.end||x===m.stdout||x===m.stderr?X:F;function F(){d("onend"),x.end()}V.endEmitted?y.nextTick(I):U.once("end",I),x.on("unpipe",function W(ee,te){d("onunpipe"),ee===U&&te&&!1===te.hasUnpiped&&(te.hasUnpiped=!0,d("cleanup"),x.removeListener("close",Z),x.removeListener("finish",J),x.removeListener("drain",B),x.removeListener("error",K),x.removeListener("unpipe",W),U.removeListener("end",F),U.removeListener("end",X),U.removeListener("data",j),N=!0,!V.awaitDrain||x._writableState&&!x._writableState.needDrain||B())});var ee,B=(ee=U,function(){var te=ee._readableState;d("pipeOnDrain",te.awaitDrain),te.awaitDrain&&te.awaitDrain--,0===te.awaitDrain&&e(ee,"data")&&(te.flowing=!0,R(ee))});x.on("drain",B);var N=!1,P=!1;function j(ee){d("ondata"),P=!1,!1!==x.write(ee)||P||((1===V.pipesCount&&V.pipes===x||V.pipesCount>1&&-1!==M(V.pipes,x))&&!N&&(d("false write response, pause",U._readableState.awaitDrain),U._readableState.awaitDrain++,P=!0),U.pause())}function K(ee){d("onerror",ee),X(),x.removeListener("error",K),0===e(x,"error")&&x.emit("error",ee)}function Z(){x.removeListener("finish",J),X()}function J(){d("onfinish"),x.removeListener("close",Z),X()}function X(){d("unpipe"),U.unpipe(x)}return U.on("data",j),function(ee,te,oe){if("function"==typeof ee.prependListener)return ee.prependListener(te,oe);ee._events&&ee._events[te]?o(ee._events[te])?ee._events[te].unshift(oe):ee._events[te]=[oe,ee._events[te]]:ee.on(te,oe)}(x,"error",K),x.once("close",Z),x.once("finish",J),x.emit("pipe",U),V.flowing||(d("pipe resume"),U.resume()),x},S.prototype.unpipe=function(x){var C=this._readableState,U={hasUnpiped:!1};if(0===C.pipesCount)return this;if(1===C.pipesCount)return x&&x!==C.pipes||(x||(x=C.pipes),C.pipes=null,C.pipesCount=0,C.flowing=!1,x&&x.emit("unpipe",this,U)),this;if(!x){var V=C.pipes,I=C.pipesCount;C.pipes=null,C.pipesCount=0,C.flowing=!1;for(var W=0;W=0&&(o._idleTimeoutId=setTimeout(function(){o._onTimeout&&o._onTimeout()},e))},f(208),l.setImmediate=typeof self<"u"&&self.setImmediate||void 0!==s&&s.setImmediate||this&&this.setImmediate,l.clearImmediate=typeof self<"u"&&self.clearImmediate||void 0!==s&&s.clearImmediate||this&&this.clearImmediate}).call(this,f(6))},function(z,l,f){"use strict";z.exports=n;var s=f(19),m=Object.create(f(35));function y(t,i){var c=this._transformState;c.transforming=!1;var h=c.writecb;if(!h)return this.emit("error",new Error("write callback called multiple times"));c.writechunk=null,c.writecb=null,null!=i&&this.push(i),h(t);var u=this._readableState;u.reading=!1,(u.needReadable||u.length0)if("string"==typeof N||J.objectMode||Object.getPrototypeOf(N)===e.prototype||(N=function(X){return e.from(X)}(N)),j)J.endEmitted?L(B,new A):p(B,J,N,!0);else if(J.ended)L(B,new S);else{if(J.destroyed)return!1;J.reading=!1,J.decoder&&!P?(N=J.decoder.write(N),J.objectMode||0!==N.length?p(B,J,N,!1):a(B,J)):p(B,J,N,!1)}else j||(J.reading=!1,a(B,J));return!J.ended&&(J.lengthN.highWaterMark&&(N.highWaterMark=((P=B)>=1073741824?P=1073741824:(P--,P|=P>>>1,P|=P>>>2,P|=P>>>4,P|=P>>>8,P|=P>>>16,P++),P)),B<=N.length?B:N.ended?N.length:(N.needReadable=!0,0));var P}function R(B){var N=B._readableState;i("emitReadable",N.needReadable,N.emittedReadable),N.needReadable=!1,N.emittedReadable||(i("emitReadable",N.flowing),N.emittedReadable=!0,m.nextTick(r,B))}function r(B){var N=B._readableState;i("emitReadable_",N.destroyed,N.length,N.ended),N.destroyed||!N.length&&!N.ended||(B.emit("readable"),N.emittedReadable=!1),N.needReadable=!N.flowing&&!N.ended&&N.length<=N.highWaterMark,U(B)}function a(B,N){N.readingMore||(N.readingMore=!0,m.nextTick(g,B,N))}function g(B,N){for(;!N.reading&&!N.ended&&(N.length0,N.resumeScheduled&&!N.paused?N.flowing=!0:B.listenerCount("data")>0&&B.resume()}function x(B){i("readable nexttick read 0"),B.read(0)}function C(B,N){i("resume",N.reading),N.reading||B.read(0),N.resumeScheduled=!1,B.emit("resume"),U(B),N.flowing&&!N.reading&&B.read(0)}function U(B){var N=B._readableState;for(i("flow",N.flowing);N.flowing&&null!==B.read(););}function V(B,N){return 0===N.length?null:(N.objectMode?P=N.buffer.shift():!B||B>=N.length?(P=N.decoder?N.buffer.join(""):1===N.buffer.length?N.buffer.first():N.buffer.concat(N.length),N.buffer.clear()):P=N.buffer.consume(B,N.decoder),P);var P}function I(B){var N=B._readableState;i("endReadable",N.endEmitted),N.endEmitted||(N.ended=!0,m.nextTick(W,N,B))}function W(B,N){if(i("endReadableNT",B.endEmitted,B.length),!B.endEmitted&&0===B.length&&(B.endEmitted=!0,N.readable=!1,N.emit("end"),B.autoDestroy)){var P=N._writableState;(!P||P.autoDestroy&&P.finished)&&N.destroy()}}function F(B,N){for(var P=0,j=B.length;P=N.highWaterMark:N.length>0)||N.ended))return i("read: emitReadable",N.length,N.ended),0===N.length&&N.ended?I(this):R(this),null;if(0===(B=E(B,N))&&N.ended)return 0===N.length&&I(this),null;var j,K=N.needReadable;return i("need readable",K),(0===N.length||N.length-B0?V(B,N):null)?(N.needReadable=N.length<=N.highWaterMark,B=0):(N.length-=B,N.awaitDrain=0),0===N.length&&(N.ended||(N.needReadable=!0),P!==B&&N.ended&&I(this)),null!==j&&this.emit("data",j),j},q.prototype._read=function(B){L(this,new w("_read()"))},q.prototype.pipe=function(B,N){var P=this,j=this._readableState;switch(j.pipesCount){case 0:j.pipes=B;break;case 1:j.pipes=[j.pipes,B];break;default:j.pipes.push(B)}j.pipesCount+=1,i("pipe count=%d opts=%j",j.pipesCount,N);var K=N&&!1===N.end||B===m.stdout||B===m.stderr?de:J;function J(){i("onend"),B.end()}j.endEmitted?m.nextTick(K):P.once("end",K),B.on("unpipe",function Z(fe,re){i("onunpipe"),fe===P&&re&&!1===re.hasUnpiped&&(re.hasUnpiped=!0,i("cleanup"),B.removeListener("close",ve),B.removeListener("finish",ie),B.removeListener("drain",X),B.removeListener("error",oe),B.removeListener("unpipe",Z),P.removeListener("end",J),P.removeListener("end",de),P.removeListener("data",te),ee=!0,!j.awaitDrain||B._writableState&&!B._writableState.needDrain||X())});var fe,X=(fe=P,function(){var re=fe._readableState;i("pipeOnDrain",re.awaitDrain),re.awaitDrain&&re.awaitDrain--,0===re.awaitDrain&&n(fe,"data")&&(re.flowing=!0,U(fe))});B.on("drain",X);var ee=!1;function te(fe){i("ondata");var re=B.write(fe);i("dest.write",re),!1===re&&((1===j.pipesCount&&j.pipes===B||j.pipesCount>1&&-1!==F(j.pipes,B))&&!ee&&(i("false write response, pause",j.awaitDrain),j.awaitDrain++),P.pause())}function oe(fe){i("onerror",fe),de(),B.removeListener("error",oe),0===n(B,"error")&&L(B,fe)}function ve(){B.removeListener("finish",ie),de()}function ie(){i("onfinish"),B.removeListener("close",ve),de()}function de(){i("unpipe"),P.unpipe(B)}return P.on("data",te),function(fe,re,_e){if("function"==typeof fe.prependListener)return fe.prependListener(re,_e);fe._events&&fe._events[re]?Array.isArray(fe._events[re])?fe._events[re].unshift(_e):fe._events[re]=[_e,fe._events[re]]:fe.on(re,_e)}(B,"error",oe),B.once("close",ve),B.once("finish",ie),B.emit("pipe",P),j.flowing||(i("pipe resume"),P.resume()),B},q.prototype.unpipe=function(B){var N=this._readableState,P={hasUnpiped:!1};if(0===N.pipesCount)return this;if(1===N.pipesCount)return B&&B!==N.pipes||(B||(B=N.pipes),N.pipes=null,N.pipesCount=0,N.flowing=!1,B&&B.emit("unpipe",this,P)),this;if(!B){var j=N.pipes,K=N.pipesCount;N.pipes=null,N.pipesCount=0,N.flowing=!1;for(var Z=0;Z0,!1!==j.flowing&&this.resume()):"readable"===B&&(j.endEmitted||j.readableListening||(j.readableListening=j.needReadable=!0,j.flowing=!1,j.emittedReadable=!1,i("on readable",j.length,j.reading),j.length?R(this):j.reading||m.nextTick(x,this))),P},q.prototype.removeListener=function(B,N){var P=o.prototype.removeListener.call(this,B,N);return"readable"===B&&m.nextTick(M,this),P},q.prototype.removeAllListeners=function(B){var N=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==B&&void 0!==B||m.nextTick(M,this),N},q.prototype.resume=function(){var P,B=this._readableState;return B.flowing||(i("resume"),B.flowing=!B.readableListening,this,(P=B).resumeScheduled||(P.resumeScheduled=!0,m.nextTick(C,this,P))),B.paused=!1,this},q.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},q.prototype.wrap=function(B){var N=this,P=this._readableState,j=!1;for(var K in B.on("end",function(){if(i("wrapped end"),P.decoder&&!P.ended){var J=P.decoder.end();J&&J.length&&N.push(J)}N.push(null)}),B.on("data",function(J){i("wrapped data"),P.decoder&&(J=P.decoder.write(J)),P.objectMode&&null==J||(P.objectMode||J&&J.length)&&(N.push(J)||(j=!0,B.pause()))}),B)void 0===this[K]&&"function"==typeof B[K]&&(this[K]=function(J){return function(){return B[J].apply(B,arguments)}}(K));for(var Z=0;Z-1))throw new A(g);return this._writableState.defaultEncoding=g,this},Object.defineProperty(q.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(q.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),q.prototype._write=function(g,M,x){x(new v("_write()"))},q.prototype._writev=null,q.prototype.end=function(g,M,x){var U,V,I,C=this._writableState;return"function"==typeof g?(x=g,g=null,M=null):"function"==typeof M&&(x=M,M=null),null!=g&&this.write(g,M),C.corked&&(C.corked=1,this.uncork()),C.ending||(U=this,I=x,(V=C).ending=!0,a(U,V),I&&(V.finished?m.nextTick(I):U.once("finish",I)),V.ended=!0,U.writable=!1),this},Object.defineProperty(q.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(q.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(g){this._writableState&&(this._writableState.destroyed=g)}}),q.prototype.destroy=h.destroy,q.prototype._undestroy=h.undestroy,q.prototype._destroy=function(g,M){M(g)}}).call(this,f(6),f(5))},function(z,l,f){"use strict";z.exports=i;var s=f(27).codes,m=s.ERR_METHOD_NOT_IMPLEMENTED,y=s.ERR_MULTIPLE_CALLBACK,n=s.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=s.ERR_TRANSFORM_WITH_LENGTH_0,e=f(28);function t(u,d){var _=this._transformState;_.transforming=!1;var v=_.writecb;if(null===v)return this.emit("error",new y);_.writechunk=null,_.writecb=null,null!=d&&this.push(d),v(u);var T=this._readableState;T.reading=!1,(T.needReadable||T.length0&&c[c.length-1])||6!==T[0]&&2!==T[0])){u=0;continue}if(3===T[0]&&(!c||T[1]>c[0]&&T[1]>8,h=255&i;c?e.push(c,h):e.push(h)}return e},s.zero2=m,s.toHex=y,s.encode=function(n,o){return"hex"===o?y(n):n}},function(z,l,f){var s;function m(n){this.rand=n}if(z.exports=function(n){return s||(s=new m(null)),s.generate(n)},z.exports.Rand=m,m.prototype.generate=function(n){return this._rand(n)},m.prototype._rand=function(n){if(this.rand.getBytes)return this.rand.getBytes(n);for(var o=new Uint8Array(n),e=0;e>>3},l.g1_256=function(o){return s(o,17)^s(o,19)^o>>>10}},function(z,l,f){"use strict";var s=f(15),m=f(37),y=f(123),n=f(22),o=s.sum32,e=s.sum32_4,t=s.sum32_5,i=y.ch32,c=y.maj32,h=y.s0_256,u=y.s1_256,d=y.g0_256,_=y.g1_256,v=m.BlockHash,T=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function O(){if(!(this instanceof O))return new O;v.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=T,this.W=new Array(64)}s.inherits(O,v),z.exports=O,O.blockSize=512,O.outSize=256,O.hmacStrength=192,O.padLength=64,O.prototype._update=function(b,S){for(var w=this.W,A=0;A<16;A++)w[A]=b[S+A];for(;A=this._blockSize;){for(var i=this._blockOffset;i0;++c)this._length[c]+=h,(h=this._length[c]/4294967296|0)>0&&(this._length[c]-=4294967296*h);return this},y.prototype._update=function(){throw new Error("_update is not implemented")},y.prototype.digest=function(n){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var o=this._digest();void 0!==n&&(o=o.toString(n)),this._block.fill(0),this._blockOffset=0;for(var e=0;e<4;++e)this._length[e]=0;return o},y.prototype._digest=function(){throw new Error("_digest is not implemented")},z.exports=y},function(z,l,f){"use strict";(function(s,m){var y;z.exports=q,q.ReadableState=D,f(12);var i,n=function(B,N){return B.listeners(N).length},o=f(129),e=f(2).Buffer,t=s.Uint8Array||function(){},c=f(273);i=c&&c.debuglog?c.debuglog("stream"):function(){};var h,u,d,_=f(274),v=f(130),T=f(131).getHighWaterMark,O=f(29).codes,b=O.ERR_INVALID_ARG_TYPE,S=O.ERR_STREAM_PUSH_AFTER_EOF,w=O.ERR_METHOD_NOT_IMPLEMENTED,A=O.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;f(3)(q,o);var L=v.errorOrDestroy,H=["error","close","destroy","pause","resume"];function D(B,N,P){y=y||f(30),"boolean"!=typeof P&&(P=N instanceof y),this.objectMode=!!(B=B||{}).objectMode,P&&(this.objectMode=this.objectMode||!!B.readableObjectMode),this.highWaterMark=T(this,B,"readableHighWaterMark",P),this.buffer=new _,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==B.emitClose,this.autoDestroy=!!B.autoDestroy,this.destroyed=!1,this.defaultEncoding=B.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,B.encoding&&(h||(h=f(20).StringDecoder),this.decoder=new h(B.encoding),this.encoding=B.encoding)}function q(B){if(y=y||f(30),!(this instanceof q))return new q(B);this._readableState=new D(B,this,this instanceof y),this.readable=!0,B&&("function"==typeof B.read&&(this._read=B.read),"function"==typeof B.destroy&&(this._destroy=B.destroy)),o.call(this)}function k(B,N,P,j,K){i("readableAddChunk",N);var Z,X,ee,te,oe,J=B._readableState;if(null===N)J.reading=!1,function(X,ee){if(i("onEofChunk"),!ee.ended){if(ee.decoder){var te=ee.decoder.end();te&&te.length&&(ee.buffer.push(te),ee.length+=ee.objectMode?1:te.length)}ee.ended=!0,ee.sync?R(X):(ee.needReadable=!1,ee.emittedReadable||(ee.emittedReadable=!0,r(X)))}}(B,J);else if(K||(X=J,e.isBuffer(oe=ee=N)||oe instanceof t||"string"==typeof ee||void 0===ee||X.objectMode||(te=new b("chunk",["string","Buffer","Uint8Array"],ee)),Z=te),Z)L(B,Z);else if(J.objectMode||N&&N.length>0)if("string"==typeof N||J.objectMode||Object.getPrototypeOf(N)===e.prototype||(N=function(X){return e.from(X)}(N)),j)J.endEmitted?L(B,new A):p(B,J,N,!0);else if(J.ended)L(B,new S);else{if(J.destroyed)return!1;J.reading=!1,J.decoder&&!P?(N=J.decoder.write(N),J.objectMode||0!==N.length?p(B,J,N,!1):a(B,J)):p(B,J,N,!1)}else j||(J.reading=!1,a(B,J));return!J.ended&&(J.lengthN.highWaterMark&&(N.highWaterMark=((P=B)>=1073741824?P=1073741824:(P--,P|=P>>>1,P|=P>>>2,P|=P>>>4,P|=P>>>8,P|=P>>>16,P++),P)),B<=N.length?B:N.ended?N.length:(N.needReadable=!0,0));var P}function R(B){var N=B._readableState;i("emitReadable",N.needReadable,N.emittedReadable),N.needReadable=!1,N.emittedReadable||(i("emitReadable",N.flowing),N.emittedReadable=!0,m.nextTick(r,B))}function r(B){var N=B._readableState;i("emitReadable_",N.destroyed,N.length,N.ended),N.destroyed||!N.length&&!N.ended||(B.emit("readable"),N.emittedReadable=!1),N.needReadable=!N.flowing&&!N.ended&&N.length<=N.highWaterMark,U(B)}function a(B,N){N.readingMore||(N.readingMore=!0,m.nextTick(g,B,N))}function g(B,N){for(;!N.reading&&!N.ended&&(N.length0,N.resumeScheduled&&!N.paused?N.flowing=!0:B.listenerCount("data")>0&&B.resume()}function x(B){i("readable nexttick read 0"),B.read(0)}function C(B,N){i("resume",N.reading),N.reading||B.read(0),N.resumeScheduled=!1,B.emit("resume"),U(B),N.flowing&&!N.reading&&B.read(0)}function U(B){var N=B._readableState;for(i("flow",N.flowing);N.flowing&&null!==B.read(););}function V(B,N){return 0===N.length?null:(N.objectMode?P=N.buffer.shift():!B||B>=N.length?(P=N.decoder?N.buffer.join(""):1===N.buffer.length?N.buffer.first():N.buffer.concat(N.length),N.buffer.clear()):P=N.buffer.consume(B,N.decoder),P);var P}function I(B){var N=B._readableState;i("endReadable",N.endEmitted),N.endEmitted||(N.ended=!0,m.nextTick(W,N,B))}function W(B,N){if(i("endReadableNT",B.endEmitted,B.length),!B.endEmitted&&0===B.length&&(B.endEmitted=!0,N.readable=!1,N.emit("end"),B.autoDestroy)){var P=N._writableState;(!P||P.autoDestroy&&P.finished)&&N.destroy()}}function F(B,N){for(var P=0,j=B.length;P=N.highWaterMark:N.length>0)||N.ended))return i("read: emitReadable",N.length,N.ended),0===N.length&&N.ended?I(this):R(this),null;if(0===(B=E(B,N))&&N.ended)return 0===N.length&&I(this),null;var j,K=N.needReadable;return i("need readable",K),(0===N.length||N.length-B0?V(B,N):null)?(N.needReadable=N.length<=N.highWaterMark,B=0):(N.length-=B,N.awaitDrain=0),0===N.length&&(N.ended||(N.needReadable=!0),P!==B&&N.ended&&I(this)),null!==j&&this.emit("data",j),j},q.prototype._read=function(B){L(this,new w("_read()"))},q.prototype.pipe=function(B,N){var P=this,j=this._readableState;switch(j.pipesCount){case 0:j.pipes=B;break;case 1:j.pipes=[j.pipes,B];break;default:j.pipes.push(B)}j.pipesCount+=1,i("pipe count=%d opts=%j",j.pipesCount,N);var K=N&&!1===N.end||B===m.stdout||B===m.stderr?de:J;function J(){i("onend"),B.end()}j.endEmitted?m.nextTick(K):P.once("end",K),B.on("unpipe",function Z(fe,re){i("onunpipe"),fe===P&&re&&!1===re.hasUnpiped&&(re.hasUnpiped=!0,i("cleanup"),B.removeListener("close",ve),B.removeListener("finish",ie),B.removeListener("drain",X),B.removeListener("error",oe),B.removeListener("unpipe",Z),P.removeListener("end",J),P.removeListener("end",de),P.removeListener("data",te),ee=!0,!j.awaitDrain||B._writableState&&!B._writableState.needDrain||X())});var fe,X=(fe=P,function(){var re=fe._readableState;i("pipeOnDrain",re.awaitDrain),re.awaitDrain&&re.awaitDrain--,0===re.awaitDrain&&n(fe,"data")&&(re.flowing=!0,U(fe))});B.on("drain",X);var ee=!1;function te(fe){i("ondata");var re=B.write(fe);i("dest.write",re),!1===re&&((1===j.pipesCount&&j.pipes===B||j.pipesCount>1&&-1!==F(j.pipes,B))&&!ee&&(i("false write response, pause",j.awaitDrain),j.awaitDrain++),P.pause())}function oe(fe){i("onerror",fe),de(),B.removeListener("error",oe),0===n(B,"error")&&L(B,fe)}function ve(){B.removeListener("finish",ie),de()}function ie(){i("onfinish"),B.removeListener("close",ve),de()}function de(){i("unpipe"),P.unpipe(B)}return P.on("data",te),function(fe,re,_e){if("function"==typeof fe.prependListener)return fe.prependListener(re,_e);fe._events&&fe._events[re]?Array.isArray(fe._events[re])?fe._events[re].unshift(_e):fe._events[re]=[_e,fe._events[re]]:fe.on(re,_e)}(B,"error",oe),B.once("close",ve),B.once("finish",ie),B.emit("pipe",P),j.flowing||(i("pipe resume"),P.resume()),B},q.prototype.unpipe=function(B){var N=this._readableState,P={hasUnpiped:!1};if(0===N.pipesCount)return this;if(1===N.pipesCount)return B&&B!==N.pipes||(B||(B=N.pipes),N.pipes=null,N.pipesCount=0,N.flowing=!1,B&&B.emit("unpipe",this,P)),this;if(!B){var j=N.pipes,K=N.pipesCount;N.pipes=null,N.pipesCount=0,N.flowing=!1;for(var Z=0;Z0,!1!==j.flowing&&this.resume()):"readable"===B&&(j.endEmitted||j.readableListening||(j.readableListening=j.needReadable=!0,j.flowing=!1,j.emittedReadable=!1,i("on readable",j.length,j.reading),j.length?R(this):j.reading||m.nextTick(x,this))),P},q.prototype.removeListener=function(B,N){var P=o.prototype.removeListener.call(this,B,N);return"readable"===B&&m.nextTick(M,this),P},q.prototype.removeAllListeners=function(B){var N=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==B&&void 0!==B||m.nextTick(M,this),N},q.prototype.resume=function(){var P,B=this._readableState;return B.flowing||(i("resume"),B.flowing=!B.readableListening,this,(P=B).resumeScheduled||(P.resumeScheduled=!0,m.nextTick(C,this,P))),B.paused=!1,this},q.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},q.prototype.wrap=function(B){var N=this,P=this._readableState,j=!1;for(var K in B.on("end",function(){if(i("wrapped end"),P.decoder&&!P.ended){var J=P.decoder.end();J&&J.length&&N.push(J)}N.push(null)}),B.on("data",function(J){i("wrapped data"),P.decoder&&(J=P.decoder.write(J)),P.objectMode&&null==J||(P.objectMode||J&&J.length)&&(N.push(J)||(j=!0,B.pause()))}),B)void 0===this[K]&&"function"==typeof B[K]&&(this[K]=function(J){return function(){return B[J].apply(B,arguments)}}(K));for(var Z=0;Z-1))throw new A(g);return this._writableState.defaultEncoding=g,this},Object.defineProperty(q.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(q.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),q.prototype._write=function(g,M,x){x(new v("_write()"))},q.prototype._writev=null,q.prototype.end=function(g,M,x){var U,V,I,C=this._writableState;return"function"==typeof g?(x=g,g=null,M=null):"function"==typeof M&&(x=M,M=null),null!=g&&this.write(g,M),C.corked&&(C.corked=1,this.uncork()),C.ending||(U=this,I=x,(V=C).ending=!0,a(U,V),I&&(V.finished?m.nextTick(I):U.once("finish",I)),V.ended=!0,U.writable=!1),this},Object.defineProperty(q.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(q.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(g){this._writableState&&(this._writableState.destroyed=g)}}),q.prototype.destroy=h.destroy,q.prototype._undestroy=h.undestroy,q.prototype._destroy=function(g,M){M(g)}}).call(this,f(6),f(5))},function(z,l,f){"use strict";z.exports=i;var s=f(29).codes,m=s.ERR_METHOD_NOT_IMPLEMENTED,y=s.ERR_MULTIPLE_CALLBACK,n=s.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=s.ERR_TRANSFORM_WITH_LENGTH_0,e=f(30);function t(u,d){var _=this._transformState;_.transforming=!1;var v=_.writecb;if(null===v)return this.emit("error",new y);_.writechunk=null,_.writecb=null,null!=d&&this.push(d),v(u);var T=this._readableState;T.reading=!1,(T.needReadable||T.length>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10)}function h(d){return(d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7)}function u(d){return(d>>>7|d<<25)^(d>>>18|d<<14)^d>>>3}s(e,m),e.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},e.prototype._update=function(d){for(var _,v=this._w,T=0|this._a,O=0|this._b,b=0|this._c,S=0|this._d,w=0|this._e,A=0|this._f,L=0|this._g,H=0|this._h,D=0;D<16;++D)v[D]=d.readInt32BE(4*D);for(;D<64;++D)v[D]=0|(((_=v[D-2])>>>17|_<<15)^(_>>>19|_<<13)^_>>>10)+v[D-7]+u(v[D-15])+v[D-16];for(var q=0;q<64;++q){var k=H+h(w)+t(w,A,L)+n[q]+v[q]|0,p=c(T)+i(T,O,b)|0;H=L,L=A,A=w,w=S+k|0,S=b,b=O,O=T,T=k+p|0}this._a=T+this._a|0,this._b=O+this._b|0,this._c=b+this._c|0,this._d=S+this._d|0,this._e=w+this._e|0,this._f=A+this._f|0,this._g=L+this._g|0,this._h=H+this._h|0},e.prototype._hash=function(){var d=y.allocUnsafe(32);return d.writeInt32BE(this._a,0),d.writeInt32BE(this._b,4),d.writeInt32BE(this._c,8),d.writeInt32BE(this._d,12),d.writeInt32BE(this._e,16),d.writeInt32BE(this._f,20),d.writeInt32BE(this._g,24),d.writeInt32BE(this._h,28),d},z.exports=e},function(z,l,f){var s=f(3),m=f(31),y=f(13).Buffer,n=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],o=new Array(160);function e(){this.init(),this._w=o,m.call(this,128,112)}function t(O,b,S){return S^O&(b^S)}function i(O,b,S){return O&b|S&(O|b)}function c(O,b){return(O>>>28|b<<4)^(b>>>2|O<<30)^(b>>>7|O<<25)}function h(O,b){return(O>>>14|b<<18)^(O>>>18|b<<14)^(b>>>9|O<<23)}function u(O,b){return(O>>>1|b<<31)^(O>>>8|b<<24)^O>>>7}function d(O,b){return(O>>>1|b<<31)^(O>>>8|b<<24)^(O>>>7|b<<25)}function _(O,b){return(O>>>19|b<<13)^(b>>>29|O<<3)^O>>>6}function v(O,b){return(O>>>19|b<<13)^(b>>>29|O<<3)^(O>>>6|b<<26)}function T(O,b){return O>>>0>>0?1:0}s(e,m),e.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},e.prototype._update=function(O){for(var b=this._w,S=0|this._ah,w=0|this._bh,A=0|this._ch,L=0|this._dh,H=0|this._eh,D=0|this._fh,q=0|this._gh,k=0|this._hh,p=0|this._al,E=0|this._bl,R=0|this._cl,r=0|this._dl,a=0|this._el,g=0|this._fl,M=0|this._gl,x=0|this._hl,C=0;C<32;C+=2)b[C]=O.readInt32BE(4*C),b[C+1]=O.readInt32BE(4*C+4);for(;C<160;C+=2){var U=b[C-30],V=b[C-30+1],I=u(U,V),W=d(V,U),F=_(U=b[C-4],V=b[C-4+1]),B=v(V,U),j=b[C-32],K=b[C-32+1],Z=W+b[C-14+1]|0,J=I+b[C-14]+T(Z,W)|0;J=(J=J+F+T(Z=Z+B|0,B)|0)+j+T(Z=Z+K|0,K)|0,b[C]=J,b[C+1]=Z}for(var X=0;X<160;X+=2){J=b[X],Z=b[X+1];var ee=i(S,w,A),te=i(p,E,R),oe=c(S,p),ve=c(p,S),ie=h(H,a),de=h(a,H),fe=n[X],re=n[X+1],_e=t(H,D,q),Ke=t(a,g,M),pe=x+de|0,Te=k+ie+T(pe,x)|0;Te=(Te=(Te=Te+_e+T(pe=pe+Ke|0,Ke)|0)+fe+T(pe=pe+re|0,re)|0)+J+T(pe=pe+Z|0,Z)|0;var Ve=ve+te|0,be=oe+ee+T(Ve,ve)|0;k=q,x=M,q=D,M=g,D=H,g=a,H=L+Te+T(a=r+pe|0,r)|0,L=A,r=R,A=w,R=E,w=S,E=p,S=Te+be+T(p=pe+Ve|0,pe)|0}this._al=this._al+p|0,this._bl=this._bl+E|0,this._cl=this._cl+R|0,this._dl=this._dl+r|0,this._el=this._el+a|0,this._fl=this._fl+g|0,this._gl=this._gl+M|0,this._hl=this._hl+x|0,this._ah=this._ah+S+T(this._al,p)|0,this._bh=this._bh+w+T(this._bl,E)|0,this._ch=this._ch+A+T(this._cl,R)|0,this._dh=this._dh+L+T(this._dl,r)|0,this._eh=this._eh+H+T(this._el,a)|0,this._fh=this._fh+D+T(this._fl,g)|0,this._gh=this._gh+q+T(this._gl,M)|0,this._hh=this._hh+k+T(this._hl,x)|0},e.prototype._hash=function(){var O=y.allocUnsafe(64);function b(S,w,A){O.writeInt32BE(S,A),O.writeInt32BE(w,A+4)}return b(this._ah,this._al,0),b(this._bh,this._bl,8),b(this._ch,this._cl,16),b(this._dh,this._dl,24),b(this._eh,this._el,32),b(this._fh,this._fl,40),b(this._gh,this._gl,48),b(this._hh,this._hl,56),O},z.exports=e},function(z,l){z.exports=function(f){if("string"!=typeof f)throw new Error("[is-hex-prefixed] value must be type 'string', is currently type "+typeof f+", while checking isHexPrefixed.");return"0x"===f.slice(0,2)}},function(z,l,f){"use strict";const s=(m,y)=>function(){const n=y.promiseModule,o=new Array(arguments.length);for(let e=0;e{o.push(y.errorFirst?function(i,c){if(y.multiArgs){const h=new Array(arguments.length-1);for(let u=1;u{y=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},y);const n=e=>{const t=i=>"string"==typeof i?e===i:i.test(e);return y.include?y.include.some(t):!y.exclude.some(t)};let o;o="function"==typeof m?function(){return y.excludeMain?m.apply(this,arguments):s(m,y).apply(this,arguments)}:Object.create(Object.getPrototypeOf(m));for(const e in m){const t=m[e];o[e]="function"==typeof t&&n(e)?s(t,y):t}return o}},function(z,l,f){const s=f(44),m=f(296)();function y(e){this.currentProvider=e}function n(e){return function(){const t=this;var i=[].slice.call(arguments),c=i.pop();t.sendAsync({method:e,params:i},c)}}function o(e,t){return function(){const i=this;var c=[].slice.call(arguments),h=c.pop();c.length-1&&f%1==0&&f<=9007199254740991}},function(z,l,f){"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.default={},z.exports=l.default},function(z,l,f){"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.default=function(t){return function(i,c,h){if(h=(0,m.default)(h||s.default),t<=0||!i)return h(null);var u=(0,y.default)(i),d=!1,_=0,v=!1;function T(b,S){if(_-=1,b)d=!0,h(b);else{if(S===o.default||d&&_<=0)return d=!0,h(null);v||O()}}function O(){for(v=!0;_=e.params.length?e.params:"eth_getBlockByNumber"===e.method?e.params.slice(1):e.params.slice(0,t)}function n(e){switch(e.method){case"eth_getStorageAt":return 2;case"eth_getBalance":case"eth_getCode":case"eth_getTransactionCount":case"eth_call":case"eth_estimateGas":return 1;case"eth_getBlockByNumber":return 0;default:return}}function o(e){switch(e.method){case"web3_clientVersion":case"web3_sha3":case"eth_protocolVersion":case"eth_getBlockTransactionCountByHash":case"eth_getUncleCountByBlockHash":case"eth_getCode":case"eth_getBlockByHash":case"eth_getTransactionByHash":case"eth_getTransactionByBlockHashAndIndex":case"eth_getTransactionReceipt":case"eth_getUncleByBlockHashAndIndex":case"eth_getCompilers":case"eth_compileLLL":case"eth_compileSolidity":case"eth_compileSerpent":case"shh_version":return"perma";case"eth_getBlockByNumber":case"eth_getBlockTransactionCountByNumber":case"eth_getUncleCountByBlockNumber":case"eth_getTransactionByBlockNumberAndIndex":case"eth_getUncleByBlockNumberAndIndex":return"fork";case"eth_gasPrice":case"eth_getBalance":case"eth_getStorageAt":case"eth_getTransactionCount":case"eth_call":case"eth_estimateGas":case"eth_getFilterLogs":case"eth_getLogs":case"eth_blockNumber":return"block";case"net_version":case"net_peerCount":case"net_listening":case"eth_syncing":case"eth_sign":case"eth_coinbase":case"eth_mining":case"eth_hashrate":case"eth_accounts":case"eth_sendTransaction":case"eth_sendRawTransaction":case"eth_newFilter":case"eth_newBlockFilter":case"eth_newPendingTransactionFilter":case"eth_uninstallFilter":case"eth_getFilterChanges":case"eth_getWork":case"eth_submitWork":case"eth_submitHashrate":case"db_putString":case"db_getString":case"db_putHex":case"db_getHex":case"shh_post":case"shh_newIdentity":case"shh_hasIdentity":case"shh_newGroup":case"shh_addToGroup":case"shh_newFilter":case"shh_uninstallFilter":case"shh_getFilterChanges":case"shh_getMessages":return"never"}}z.exports={cacheIdentifierForPayload:function(e,t={}){if(!m(e))return null;const{includeBlockRef:i}=t,c=i?e.params:y(e);return e.method+":"+s(c)},canCache:m,blockTagForPayload:function(e){var t=n(e);return t>=e.params.length?null:e.params[t]},paramsWithoutBlockTag:y,blockTagParamIndex:n,cacheTypeForPayload:o}},function(z,l,f){var s=typeof JSON<"u"?JSON:f(330);z.exports=function(n,o){o||(o={}),"function"==typeof o&&(o={cmp:o});var e=o.space||"";"number"==typeof e&&(e=Array(e+1).join(" "));var t,i="boolean"==typeof o.cycles&&o.cycles,c=o.replacer||function(d,_){return _},h=o.cmp&&(t=o.cmp,function(d){return function(_,v){return t({key:_,value:d[_]},{key:v,value:d[v]})}}),u=[];return function d(_,v,T,O){var b=e?"\n"+new Array(O+1).join(e):"",S=e?": ":":";if(T&&T.toJSON&&"function"==typeof T.toJSON&&(T=T.toJSON()),void 0!==(T=c.call(_,v,T))){if("object"!=typeof T||null===T)return s.stringify(T);if(m(T)){for(var w=[],A=0;Afunction(){var I=ge(function*(W,F,B,N){(yield U.acquire())(),V(W,F,B,N)});return function(W,F,B,N){return I.apply(this,arguments)}}()}({mutex:O}),S=y({eth_newFilter:b(c(A)),eth_newBlockFilter:b(c(H)),eth_newPendingTransactionFilter:b(c(q)),eth_uninstallFilter:b(h(a)),eth_getFilterChanges:b(h(p)),eth_getFilterLogs:b(h(R))}),w=function(){var U=ge(function*({oldBlock:V,newBlock:I}){if(0===T.length)return;const W=yield O.acquire();try{yield Promise.all(u(T).map(function(){var F=ge(function*(B){try{yield B.update({oldBlock:V,newBlock:I})}catch(N){console.error(N)}});return function(B){return F.apply(this,arguments)}}()))}catch(F){console.error(F)}W()});return function(I){return U.apply(this,arguments)}}();return S.newLogFilter=A,S.newBlockFilter=H,S.newPendingTransactionFilter=q,S.uninstallFilter=a,S.getFilterChanges=p,S.getFilterLogs=R,S.destroy=()=>{ge(function*(){const U=u(T).length;T={},C({prevFilterCount:U,newFilterCount:0})})()},S;function A(U){return L.apply(this,arguments)}function L(){return(L=ge(function*(U){const V=new n({provider:_,params:U});return yield M(V),V})).apply(this,arguments)}function H(){return D.apply(this,arguments)}function D(){return(D=ge(function*(){const U=new o({provider:_});return yield M(U),U})).apply(this,arguments)}function q(){return k.apply(this,arguments)}function k(){return(k=ge(function*(){const U=new e({provider:_});return yield M(U),U})).apply(this,arguments)}function p(U){return E.apply(this,arguments)}function E(){return(E=ge(function*(U){const V=i(U),I=T[V];if(!I)throw new Error(`No filter for index "${V}"`);return I.getChangesAndClear()})).apply(this,arguments)}function R(U){return r.apply(this,arguments)}function r(){return(r=ge(function*(U){const V=i(U),I=T[V];if(!I)throw new Error(`No filter for index "${V}"`);return results="log"===I.type?I.getAllResults():[],results})).apply(this,arguments)}function a(U){return g.apply(this,arguments)}function g(){return g=ge(function*(U){const V=i(U),W=Boolean(T[V]);return W&&(yield(F=ge(function*(B){const N=u(T).length;delete T[B],C({prevFilterCount:N,newFilterCount:u(T).length})}),function(B){return F.apply(this,arguments)})(V)),W;var F}),g.apply(this,arguments)}function M(U){return x.apply(this,arguments)}function x(){return(x=ge(function*(U){const V=u(T).length,I=yield d.getLatestBlock();return yield U.initialize({currentBlock:I}),v++,T[v]=U,U.id=v,U.idHex=t(v),C({prevFilterCount:V,newFilterCount:u(T).length}),v})).apply(this,arguments)}function C({prevFilterCount:U,newFilterCount:V}){0===U&&V>0?d.on("sync",w):U>0&&0===V&&d.removeListener("sync",w)}}},function(z,l,f){"use strict";var s=this&&this.__createBinding||(Object.create?function(y,n,o,e){void 0===e&&(e=o),Object.defineProperty(y,e,{enumerable:!0,get:function(){return n[o]}})}:function(y,n,o,e){void 0===e&&(e=o),y[e]=n[o]}),m=this&&this.__exportStar||function(y,n){for(var o in y)"default"===o||Object.prototype.hasOwnProperty.call(n,o)||s(n,y,o)};Object.defineProperty(l,"__esModule",{value:!0}),m(f(340),l),m(f(341),l),m(f(342),l),m(f(153),l),m(f(154),l),m(f(346),l)},function(z,l,f){"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.getUniqueId=void 0;let s=Math.floor(4294967295*Math.random());l.getUniqueId=function(){return s=(s+1)%4294967295,s}},function(z,l,f){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(l,"__esModule",{value:!0}),l.JsonRpcEngine=void 0;const m=s(f(69)),y=f(343);class n extends m.default{constructor(){super(),this._middleware=[]}push(t){this._middleware.push(t)}handle(t,i){if(i&&"function"!=typeof i)throw new Error('"callback" must be a function if provided.');return Array.isArray(t)?i?this._handleBatch(t,i):this._handleBatch(t):i?this._handle(t,i):this._promiseHandle(t)}asMiddleware(){var t=this;return function(){var i=ge(function*(c,h,u,d){try{const[_,v,T]=yield n._runAllMiddleware(c,h,t._middleware);return v?(yield n._runReturnHandlers(T),d(_)):u(function(){var O=ge(function*(b){try{yield n._runReturnHandlers(T)}catch(S){return b(S)}return b()});return function(b){return O.apply(this,arguments)}}())}catch(_){return d(_)}});return function(c,h,u,d){return i.apply(this,arguments)}}()}_handleBatch(t,i){var c=this;return ge(function*(){try{const h=yield Promise.all(t.map(c._promiseHandle.bind(c)));return i?i(null,h):h}catch(h){if(i)return i(h);throw h}})()}_promiseHandle(t){return new Promise(i=>{this._handle(t,(c,h)=>{i(h)})})}_handle(t,i){var c=this;return ge(function*(){if(!t||Array.isArray(t)||"object"!=typeof t){const _=new y.EthereumRpcError(y.errorCodes.rpc.invalidRequest,"Requests must be plain objects. Received: "+typeof t,{request:t});return i(_,{id:void 0,jsonrpc:"2.0",error:_})}if("string"!=typeof t.method){const _=new y.EthereumRpcError(y.errorCodes.rpc.invalidRequest,"Must specify a string method. Received: "+typeof t.method,{request:t});return i(_,{id:t.id,jsonrpc:"2.0",error:_})}const h=Object.assign({},t),u={id:h.id,jsonrpc:h.jsonrpc};let d=null;try{yield c._processRequest(h,u)}catch(_){d=_}return d&&(delete u.result,u.error||(u.error=y.serializeError(d))),i(d,u)})()}_processRequest(t,i){var c=this;return ge(function*(){const[h,u,d]=yield n._runAllMiddleware(t,i,c._middleware);if(n._checkForCompletion(t,i,u),yield n._runReturnHandlers(d),h)throw h})()}static _runAllMiddleware(t,i,c){return ge(function*(){const h=[];let u=null,d=!1;for(const _ of c)if([u,d]=yield n._runMiddleware(t,i,_,h),d)break;return[u,d,h.reverse()]})()}static _runMiddleware(t,i,c,h){return new Promise(u=>{const d=v=>{const T=v||i.error;T&&(i.error=y.serializeError(T)),u([T,!0])},_=v=>{i.error?d(i.error):(v&&("function"!=typeof v&&d(new y.EthereumRpcError(y.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof v}" for request:\n${o(t)}`,{request:t})),h.push(v)),u([null,!1]))};try{c(t,i,_,d)}catch(v){d(v)}})}static _runReturnHandlers(t){return ge(function*(){for(const i of t)yield new Promise((c,h)=>{i(u=>u?h(u):c())})})()}static _checkForCompletion(t,i,c){if(!("result"in i)&&!("error"in i))throw new y.EthereumRpcError(y.errorCodes.rpc.internal,"JsonRpcEngine: Response has no error or result for request:\n"+o(t),{request:t});if(!c)throw new y.EthereumRpcError(y.errorCodes.rpc.internal,"JsonRpcEngine: Nothing ended request:\n"+o(t),{request:t})}}function o(e){return JSON.stringify(e,null,2)}l.JsonRpcEngine=n},function(z,l,f){"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.serializeError=l.isValidCode=l.getMessageFromCode=l.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const s=f(71),m=f(70),y=s.errorCodes.rpc.internal,n={code:y,message:o(y)};function o(h,u="Unspecified error message. This is a bug, please report it."){if(Number.isInteger(h)){const d=h.toString();if(c(s.errorValues,d))return s.errorValues[d].message;if(t(h))return l.JSON_RPC_SERVER_ERROR_MESSAGE}return u}function e(h){if(!Number.isInteger(h))return!1;const u=h.toString();return!!s.errorValues[u]||!!t(h)}function t(h){return h>=-32099&&h<=-32e3}function i(h){return h&&"object"==typeof h&&!Array.isArray(h)?Object.assign({},h):h}function c(h,u){return Object.prototype.hasOwnProperty.call(h,u)}l.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",l.getMessageFromCode=o,l.isValidCode=e,l.serializeError=function(h,{fallbackError:u=n,shouldIncludeStack:d=!1}={}){var _,v;if(!u||!Number.isInteger(u.code)||"string"!=typeof u.message)throw new Error("Must provide fallback error with integer number code and string message.");if(h instanceof m.EthereumRpcError)return h.serialize();const T={};if(h&&"object"==typeof h&&!Array.isArray(h)&&c(h,"code")&&e(h.code)){const b=h;T.code=b.code,b.message&&"string"==typeof b.message?(T.message=b.message,c(b,"data")&&(T.data=b.data)):(T.message=o(T.code),T.data={originalError:i(h)})}else{T.code=u.code;const b=null===(_=h)||void 0===_?void 0:_.message;T.message=b&&"string"==typeof b?b:u.message,T.data={originalError:i(h)}}const O=null===(v=h)||void 0===v?void 0:v.stack;return d&&h&&O&&"string"==typeof O&&(T.stack=O),T}},function(z,l,f){z.exports=f(347)},function(z,l,f){"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.getWindowMetadata=void 0;const s=f(10);l.getWindowMetadata=function(){let m,y;try{m=s.getDocumentOrThrow(),y=s.getLocationOrThrow()}catch{return null}function n(...e){const t=m.getElementsByTagName("meta");for(let i=0;ic.getAttribute(u)).filter(u=>!!u&&e.includes(u));if(h.length&&h){const u=c.getAttribute("content");if(u)return u}}return""}const o=function(){let e=n("name","og:site_name","og:title","twitter:title");return e||(e=m.title),e}();return{description:n("description","og:description","twitter:description","keywords"),url:y.origin,icons:function(){const e=m.getElementsByTagName("link"),t=[];for(let i=0;i-1){const u=c.getAttribute("href");if(u)if(-1===u.toLowerCase().indexOf("https:")&&-1===u.toLowerCase().indexOf("http:")&&0!==u.indexOf("//")){let d=y.protocol+"//"+y.host;if(0===u.indexOf("/"))d+=u;else{const _=y.pathname.split("/");_.pop(),d+=_.join("/")+"/"+u}t.push(d)}else 0===u.indexOf("//")?t.push(y.protocol+u):t.push(u)}}return t}(),name:o}}},function(z,l,f){"use strict";(function(s){f.d(l,"a",function(){return u});var y=function(v,T,O){this.name=v,this.version=T,this.os=O,this.type="browser"},n=function(v){this.version=v,this.type="node",this.name="node",this.os=s.platform},o=function(v,T,O,b){this.name=v,this.version=T,this.os=O,this.bot=b,this.type="bot-device"},e=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},t=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},i=/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,c=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],h=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function u(v){return v?_(v):typeof document>"u"&&typeof navigator<"u"&&"ReactNative"===navigator.product?new t:typeof navigator<"u"?_(navigator.userAgent):void 0!==s&&s.version?new n(s.version.slice(1)):null}function _(v){var T=function d(v){return""!==v&&c.reduce(function(T,O){var b=O[0];if(T)return T;var w=O[1].exec(v);return!!w&&[b,w]},!1)}(v);if(!T)return null;var O=T[0],b=T[1];if("searchbot"===O)return new e;var S=b[1]&&b[1].split(/[._]/).slice(0,3);S?S.length<3&&(S=function(){for(var v=0,T=0,O=arguments.length;T>5,this.byteCount=this.blockCount<<2,this.outputBlocks=F>>5,this.extraBytes=(31&F)>>3;for(var B=0;B<50;++B)this.s[B]=0}function U(I,W,F){C.call(this,I,W,F)}C.prototype.update=function(I){if(this.finalized)throw new Error("finalize already called");var W,F=typeof I;if("string"!==F){if("object"!==F)throw new Error(n);if(null===I)throw new Error(n);if(h&&I.constructor===ArrayBuffer)I=new Uint8Array(I);else if(!(Array.isArray(I)||h&&ArrayBuffer.isView(I)))throw new Error(n);W=!0}for(var B,N,P=this.blocks,j=this.byteCount,K=I.length,Z=this.blockCount,J=0,X=this.s;J>2]|=I[J]<<_[3&B++];else for(B=this.start;J>2]|=N<<_[3&B++]:N<2048?(P[B>>2]|=(192|N>>6)<<_[3&B++],P[B>>2]|=(128|63&N)<<_[3&B++]):N<55296||N>=57344?(P[B>>2]|=(224|N>>12)<<_[3&B++],P[B>>2]|=(128|N>>6&63)<<_[3&B++],P[B>>2]|=(128|63&N)<<_[3&B++]):(N=65536+((1023&N)<<10|1023&I.charCodeAt(++J)),P[B>>2]|=(240|N>>18)<<_[3&B++],P[B>>2]|=(128|N>>12&63)<<_[3&B++],P[B>>2]|=(128|N>>6&63)<<_[3&B++],P[B>>2]|=(128|63&N)<<_[3&B++]);if(this.lastByteIndex=B,B>=j){for(this.start=B-j,this.block=P[Z],B=0;B>=8);F>0;)N.unshift(F),F=255&(I>>=8),++B;return W?N.push(B):N.unshift(B),this.update(N),N.length},C.prototype.encodeString=function(I){var W,F=typeof I;if("string"!==F){if("object"!==F)throw new Error(n);if(null===I)throw new Error(n);if(h&&I.constructor===ArrayBuffer)I=new Uint8Array(I);else if(!(Array.isArray(I)||h&&ArrayBuffer.isView(I)))throw new Error(n);W=!0}var B=0;if(W)B=I.length;else for(var P=0;P=57344?B+=3:(j=65536+((1023&j)<<10|1023&I.charCodeAt(++P)),B+=4)}return B+=this.encode(8*B),this.update(I),B},C.prototype.bytepad=function(I,W){for(var F=this.encode(W),B=0;B>2]|=this.padding[3&W],this.lastByteIndex===this.byteCount)for(I[0]=I[F],W=1;W>4&15]+u[15&I]+u[I>>12&15]+u[I>>8&15]+u[I>>20&15]+u[I>>16&15]+u[I>>28&15]+u[I>>24&15];j%W==0&&(V(F),P=0)}return N&&(K+=u[(I=F[P])>>4&15]+u[15&I],N>1&&(K+=u[I>>12&15]+u[I>>8&15]),N>2&&(K+=u[I>>20&15]+u[I>>16&15])),K},C.prototype.buffer=C.prototype.arrayBuffer=function(){this.finalize();var I,W=this.blockCount,F=this.s,B=this.outputBlocks,N=this.extraBytes,P=0,j=0,K=this.outputBits>>3;I=N?new ArrayBuffer(B+1<<2):new ArrayBuffer(K);for(var Z=new Uint32Array(I);j>8&255,Z[I+2]=W>>16&255,Z[I+3]=W>>24&255;K%F==0&&V(B)}return P&&(Z[I=K<<2]=255&(W=B[j]),P>1&&(Z[I+1]=W>>8&255),P>2&&(Z[I+2]=W>>16&255)),Z},(U.prototype=new C).finalize=function(){return this.encode(this.outputBits,!0),C.prototype.finalize.call(this)};var V=function(I){var W,F,B,N,P,j,K,Z,J,X,ee,te,oe,ve,ie,de,fe,re,_e,Ke,pe,Te,Ve,be,Pe,Ye,we,Be,$e,Me,je,Q,se,le,Le,he,Oe,Ge,me,ze,rt,Re,He,Qe,xe,Ne,it,Ee,qe,et,ke,We,tt,Se,Fe,nt,Ae,Ue,Y,G,$,ne,ce;for(B=0;B<48;B+=2)N=I[0]^I[10]^I[20]^I[30]^I[40],P=I[1]^I[11]^I[21]^I[31]^I[41],Z=I[4]^I[14]^I[24]^I[34]^I[44],J=I[5]^I[15]^I[25]^I[35]^I[45],X=I[6]^I[16]^I[26]^I[36]^I[46],ee=I[7]^I[17]^I[27]^I[37]^I[47],W=(te=I[8]^I[18]^I[28]^I[38]^I[48])^((j=I[2]^I[12]^I[22]^I[32]^I[42])<<1|(K=I[3]^I[13]^I[23]^I[33]^I[43])>>>31),F=(oe=I[9]^I[19]^I[29]^I[39]^I[49])^(K<<1|j>>>31),I[0]^=W,I[1]^=F,I[10]^=W,I[11]^=F,I[20]^=W,I[21]^=F,I[30]^=W,I[31]^=F,I[40]^=W,I[41]^=F,F=P^(J<<1|Z>>>31),I[2]^=W=N^(Z<<1|J>>>31),I[3]^=F,I[12]^=W,I[13]^=F,I[22]^=W,I[23]^=F,I[32]^=W,I[33]^=F,I[42]^=W,I[43]^=F,F=K^(ee<<1|X>>>31),I[4]^=W=j^(X<<1|ee>>>31),I[5]^=F,I[14]^=W,I[15]^=F,I[24]^=W,I[25]^=F,I[34]^=W,I[35]^=F,I[44]^=W,I[45]^=F,F=J^(oe<<1|te>>>31),I[6]^=W=Z^(te<<1|oe>>>31),I[7]^=F,I[16]^=W,I[17]^=F,I[26]^=W,I[27]^=F,I[36]^=W,I[37]^=F,I[46]^=W,I[47]^=F,F=ee^(P<<1|N>>>31),I[8]^=W=X^(N<<1|P>>>31),I[9]^=F,I[18]^=W,I[19]^=F,I[28]^=W,I[29]^=F,I[38]^=W,I[39]^=F,I[48]^=W,I[49]^=F,ie=I[1],Ne=I[11]<<4|I[10]>>>28,it=I[10]<<4|I[11]>>>28,Be=I[20]<<3|I[21]>>>29,$e=I[21]<<3|I[20]>>>29,G=I[31]<<9|I[30]>>>23,$=I[30]<<9|I[31]>>>23,Re=I[40]<<18|I[41]>>>14,He=I[41]<<18|I[40]>>>14,le=I[2]<<1|I[3]>>>31,Le=I[3]<<1|I[2]>>>31,fe=I[12]<<12|I[13]>>>20,Ee=I[22]<<10|I[23]>>>22,qe=I[23]<<10|I[22]>>>22,Me=I[33]<<13|I[32]>>>19,je=I[32]<<13|I[33]>>>19,ne=I[42]<<2|I[43]>>>30,ce=I[43]<<2|I[42]>>>30,Se=I[5]<<30|I[4]>>>2,Fe=I[4]<<30|I[5]>>>2,he=I[14]<<6|I[15]>>>26,Oe=I[15]<<6|I[14]>>>26,_e=I[24]<<11|I[25]>>>21,et=I[34]<<15|I[35]>>>17,ke=I[35]<<15|I[34]>>>17,Q=I[45]<<29|I[44]>>>3,se=I[44]<<29|I[45]>>>3,be=I[6]<<28|I[7]>>>4,Pe=I[7]<<28|I[6]>>>4,nt=I[17]<<23|I[16]>>>9,Ae=I[16]<<23|I[17]>>>9,Ge=I[26]<<25|I[27]>>>7,me=I[27]<<25|I[26]>>>7,Ke=I[36]<<21|I[37]>>>11,pe=I[37]<<21|I[36]>>>11,We=I[47]<<24|I[46]>>>8,tt=I[46]<<24|I[47]>>>8,Qe=I[8]<<27|I[9]>>>5,xe=I[9]<<27|I[8]>>>5,Ye=I[18]<<20|I[19]>>>12,we=I[19]<<20|I[18]>>>12,Ue=I[29]<<7|I[28]>>>25,Y=I[28]<<7|I[29]>>>25,ze=I[38]<<8|I[39]>>>24,rt=I[39]<<8|I[38]>>>24,Te=I[48]<<14|I[49]>>>18,Ve=I[49]<<14|I[48]>>>18,I[0]=(ve=I[0])^~(de=I[13]<<12|I[12]>>>20)&(re=I[25]<<11|I[24]>>>21),I[1]=ie^~fe&_e,I[10]=be^~Ye&Be,I[11]=Pe^~we&$e,I[20]=le^~he&Ge,I[21]=Le^~Oe&me,I[30]=Qe^~Ne&Ee,I[31]=xe^~it&qe,I[40]=Se^~nt&Ue,I[41]=Fe^~Ae&Y,I[2]=de^~re&Ke,I[3]=fe^~_e&pe,I[12]=Ye^~Be&Me,I[13]=we^~$e&je,I[22]=he^~Ge&ze,I[23]=Oe^~me&rt,I[32]=Ne^~Ee&et,I[33]=it^~qe&ke,I[42]=nt^~Ue&G,I[43]=Ae^~Y&$,I[4]=re^~Ke&Te,I[5]=_e^~pe&Ve,I[14]=Be^~Me&Q,I[15]=$e^~je&se,I[24]=Ge^~ze&Re,I[25]=me^~rt&He,I[34]=Ee^~et&We,I[35]=qe^~ke&tt,I[44]=Ue^~G&ne,I[45]=Y^~$&ce,I[6]=Ke^~Te&ve,I[7]=pe^~Ve&ie,I[16]=Me^~Q&be,I[17]=je^~se&Pe,I[26]=ze^~Re&le,I[27]=rt^~He&Le,I[36]=et^~We&Qe,I[37]=ke^~tt&xe,I[46]=G^~ne&Se,I[47]=$^~ce&Fe,I[8]=Te^~ve&de,I[9]=Ve^~ie&fe,I[18]=Q^~be&Ye,I[19]=se^~Pe&we,I[28]=Re^~le&he,I[29]=He^~Le&Oe,I[38]=We^~Qe&Ne,I[39]=tt^~xe&it,I[48]=ne^~Se&nt,I[49]=ce^~Fe&Ae,I[0]^=v[B],I[1]^=v[B+1]};if(i)z.exports=p;else{for(R=0;Rthis._socketCreate())}set readyState(o){}get readyState(){return this._socket?this._socket.readyState:-1}set connecting(o){}get connecting(){return 0===this.readyState}set connected(o){}get connected(){return 1===this.readyState}set closing(o){}get closing(){return 2===this.readyState}set closed(o){}get closed(){return 3===this.readyState}open(){this._socketCreate()}close(){this._socketClose()}send(o,e,t){if(!e||"string"!=typeof e)throw new Error("Missing or invalid topic field");this._socketSend({topic:e,type:"pub",payload:o,silent:!!t})}subscribe(o){this._socketSend({topic:o,type:"sub",payload:"",silent:!0})}on(o,e){this._events.push({event:o,callback:e})}_socketCreate(){if(this._nextSocket)return;const o=function(e,t,i){var c,h;const u=(e.startsWith("https")?e.replace("https","wss"):e.startsWith("http")?e.replace("http","ws"):e).split("?"),d=Object(m.isBrowser)()?{protocol:t,version:i,env:"browser",host:(null===(c=Object(m.getLocation)())||void 0===c?void 0:c.host)||""}:{protocol:t,version:i,env:(null===(h=Object(m.detectEnv)())||void 0===h?void 0:h.name)||""},_=Object(m.appendToQueryString)(Object(m.getQueryString)(u[1]||""),d);return u[0]+"?"+_}(this._url,this._protocol,this._version);if(this._nextSocket=new n(o),!this._nextSocket)throw new Error("Failed to create socket");this._nextSocket.onmessage=e=>this._socketReceive(e),this._nextSocket.onopen=()=>this._socketOpen(),this._nextSocket.onerror=e=>this._socketError(e),this._nextSocket.onclose=()=>{setTimeout(()=>{this._nextSocket=null,this._socketCreate()},1e3)}}_socketOpen(){this._socketClose(),this._socket=this._nextSocket,this._nextSocket=null,this._queueSubscriptions(),this._pushQueue()}_socketClose(){this._socket&&(this._socket.onclose=()=>{},this._socket.close())}_socketSend(o){const e=JSON.stringify(o);this._socket&&1===this._socket.readyState?this._socket.send(e):(this._setToQueue(o),this._socketCreate())}_socketReceive(o){var e=this;return ge(function*(){let t;try{t=JSON.parse(o.data)}catch{return}if(e._socketSend({topic:t.topic,type:"ack",payload:"",silent:!0}),e._socket&&1===e._socket.readyState){const i=e._events.filter(c=>"message"===c.event);i&&i.length&&i.forEach(c=>c.callback(t))}})()}_socketError(o){const e=this._events.filter(t=>"error"===t.event);e&&e.length&&e.forEach(t=>t.callback(o))}_queueSubscriptions(){this._subscriptions.forEach(o=>this._queue.push({topic:o,type:"sub",payload:"",silent:!0})),this._subscriptions=this.opts.subscriptions||[]}_setToQueue(o){this._queue.push(o)}_pushQueue(){this._queue.forEach(o=>this._socketSend(o)),this._queue=[]}}}).call(this,f(6))},function(z,l,f){"use strict";l.a=class{constructor(){this._eventEmitters=[],typeof window<"u"&&void 0!==window.addEventListener&&(window.addEventListener("online",()=>this.trigger("online")),window.addEventListener("offline",()=>this.trigger("offline")))}on(s,m){this._eventEmitters.push({event:s,callback:m})}trigger(s){let m=[];s&&(m=this._eventEmitters.filter(y=>y.event===s)),m.forEach(y=>{y.callback()})}}},function(z,l,f){"use strict";var s=Object.prototype.hasOwnProperty,m="~";function y(){}function n(i,c,h){this.fn=i,this.context=c,this.once=h||!1}function o(i,c,h,u,d){if("function"!=typeof h)throw new TypeError("The listener must be a function");var _=new n(h,u||i,d),v=m?m+c:c;return i._events[v]?i._events[v].fn?i._events[v]=[i._events[v],_]:i._events[v].push(_):(i._events[v]=_,i._eventsCount++),i}function e(i,c){0==--i._eventsCount?i._events=new y:delete i._events[c]}function t(){this._events=new y,this._eventsCount=0}Object.create&&(y.prototype=Object.create(null),(new y).__proto__||(m=!1)),t.prototype.eventNames=function(){var i,c,h=[];if(0===this._eventsCount)return h;for(c in i=this._events)s.call(i,c)&&h.push(m?c.slice(1):c);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(i)):h},t.prototype.listeners=function(i){var h=this._events[m?m+i:i];if(!h)return[];if(h.fn)return[h.fn];for(var u=0,d=h.length,_=new Array(d);us.__awaiter(this,void 0,void 0,function*(){const v=yield this.getWalletConnector();if(v)return this.start(),this.subscribeWalletConnector(),v.accounts;throw new Error("Failed to connect to WalleConnect")}),this.request=v=>s.__awaiter(this,void 0,void 0,function*(){return this.send(v)}),this.send=(v,T)=>s.__awaiter(this,void 0,void 0,function*(){var O;if("string"==typeof v){const b=v;let S=T;return"personal_sign"===b&&(S=(0,o.parsePersonalSign)(S)),this.sendAsyncPromise(b,S)}if("personal_sign"===(v=Object.assign({id:(0,o.payloadId)(),jsonrpc:"2.0"},v)).method&&(v.params=(0,o.parsePersonalSign)(v.params)),!T){if("eth_signTypedData_v4"===v.method&&"MetaMask"===(null===(O=this.walletMeta)||void 0===O?void 0:O.name)){const{result:b}=yield this.handleOtherRequests(v);return b}return this.sendAsyncPromise(v.method,v.params)}this.sendAsync(v,T)}),this.onConnect=v=>{this.connectCallbacks.push(v)},this.triggerConnect=v=>{this.connectCallbacks&&this.connectCallbacks.length&&this.connectCallbacks.forEach(T=>T(v))},this.bridge=_.connector?_.connector.bridge:_.bridge||"https://bridge.walletconnect.org",this.qrcode=void 0===_.qrcode||!1!==_.qrcode,this.qrcodeModal=_.qrcodeModal||this.qrcodeModal,this.qrcodeModalOptions=_.qrcodeModalOptions,this.wc=_.connector||new m.default({bridge:this.bridge,qrcodeModal:this.qrcode?this.qrcodeModal:void 0,qrcodeModalOptions:this.qrcodeModalOptions,storageId:null==_?void 0:_.storageId,signingMethods:null==_?void 0:_.signingMethods,clientMeta:null==_?void 0:_.clientMeta}),this.rpc=_.rpc||null,!(this.rpc||_.infuraId&&"string"==typeof _.infuraId&&_.infuraId.trim()))throw new Error("Missing one of the required parameters: rpc or infuraId");this.infuraId=_.infuraId||"",this.chainId=(null==_?void 0:_.chainId)||this.chainId,this.initialize()}get isWalletConnect(){return!0}get connector(){return this.wc}get walletMeta(){return this.wc.peerMeta}disconnect(){return s.__awaiter(this,void 0,void 0,function*(){this.close()})}close(){return s.__awaiter(this,void 0,void 0,function*(){yield(yield this.getWalletConnector({disableSessionCreation:!0})).killSession(),yield this.onDisconnect()})}handleRequest(_){return s.__awaiter(this,void 0,void 0,function*(){try{let v,T=null;const O=yield this.getWalletConnector();switch(_.method){case"wc_killSession":yield this.close(),T=null;break;case"eth_accounts":T=O.accounts;break;case"eth_coinbase":T=O.accounts[0];break;case"eth_chainId":case"net_version":T=O.chainId;break;case"eth_uninstallFilter":this.sendAsync(_,b=>b),T=!0;break;default:v=yield this.handleOtherRequests(_)}return v||this.formatResponse(_,T)}catch(v){throw this.emit("error",v),v}})}handleOtherRequests(_){return s.__awaiter(this,void 0,void 0,function*(){if(!o.signingMethods.includes(_.method)&&_.method.startsWith("eth_"))return this.handleReadRequests(_);const v=yield this.getWalletConnector(),T=yield v.sendCustomRequest(_);return this.formatResponse(_,T)})}handleReadRequests(_){return s.__awaiter(this,void 0,void 0,function*(){if(!this.http){const v=new Error("HTTP Connection not available");throw this.emit("error",v),v}return this.http.send(_)})}formatResponse(_,v){return{id:_.id,jsonrpc:_.jsonrpc,result:v}}getWalletConnector(_={}){const{disableSessionCreation:v=!1}=_;return new Promise((T,O)=>{const b=this.wc;this.isConnecting?this.onConnect(S=>T(S)):b.connected||v?(this.connected||(this.connected=!0,this.updateState(b.session)),T(b)):(this.isConnecting=!0,b.on("modal_closed",()=>{O(new Error("User closed modal"))}),b.createSession({chainId:this.chainId}).then(()=>{b.on("connect",(S,w)=>{if(S)return this.isConnecting=!1,O(S);this.isConnecting=!1,this.connected=!0,w&&this.updateState(w.params[0]),this.emit("connect"),this.triggerConnect(b),T(b)})}).catch(S=>{this.isConnecting=!1,O(S)}))})}subscribeWalletConnector(){return s.__awaiter(this,void 0,void 0,function*(){const _=yield this.getWalletConnector();_.on("disconnect",v=>{v?this.emit("error",v):this.onDisconnect()}),_.on("session_update",(v,T)=>{v?this.emit("error",v):this.updateState(T.params[0])})})}onDisconnect(){return s.__awaiter(this,void 0,void 0,function*(){yield this.stop(),this.emit("close",1e3,"Connection closed"),this.emit("disconnect",1e3,"Connection disconnected"),this.connected=!1})}updateState(_){return s.__awaiter(this,void 0,void 0,function*(){const{accounts:v,chainId:T,networkId:O,rpcUrl:b}=_;(!this.accounts||v&&this.accounts!==v)&&(this.accounts=v,this.emit("accountsChanged",v)),(!this.chainId||T&&this.chainId!==T)&&(this.chainId=T,this.emit("chainChanged",T)),(!this.networkId||O&&this.networkId!==O)&&(this.networkId=O,this.emit("networkChanged",O)),this.updateRpcUrl(this.chainId,b||"")})}updateRpcUrl(_,v=""){(v=v||(0,o.getRpcUrl)(_,{infuraId:this.infuraId,custom:this.rpc||void 0}))?(this.rpcUrl=v,this.updateHttpConnection()):this.emit("error",new Error("No RPC Url available for chainId: "+_))}updateHttpConnection(){this.rpcUrl&&(this.http=new n.default(this.rpcUrl),this.http.on("payload",_=>this.emit("payload",_)),this.http.on("error",_=>this.emit("error",_)))}sendAsyncPromise(_,v){return new Promise((T,O)=>{this.sendAsync({id:(0,o.payloadId)(),jsonrpc:"2.0",method:_,params:v||[]},(b,S)=>{b?O(b):T(S.result)})})}initialize(){this.updateRpcUrl(this.chainId),this.addProvider(new i({eth_hashrate:"0x00",eth_mining:!1,eth_syncing:!0,net_listening:!0,web3_clientVersion:"WalletConnect/v1.x.x/javascript"})),this.addProvider(new t),this.addProvider(new d),this.addProvider(new c),this.addProvider(new u),this.addProvider(new h(this.configWallet())),this.addProvider({handleRequest:(_,v,T)=>s.__awaiter(this,void 0,void 0,function*(){try{const{error:O,result:b}=yield this.handleRequest(_);T(O,b)}catch(O){T(O)}}),setEngine:_=>_})}configWallet(){return{getAccounts:_=>s.__awaiter(this,void 0,void 0,function*(){try{const v=(yield this.getWalletConnector()).accounts;v&&v.length?_(null,v):_(new Error("Failed to get accounts"))}catch(v){_(v)}}),processMessage:(_,v)=>s.__awaiter(this,void 0,void 0,function*(){try{const T=yield this.getWalletConnector(),O=yield T.signMessage([_.from,_.data]);v(null,O)}catch(T){v(T)}}),processPersonalMessage:(_,v)=>s.__awaiter(this,void 0,void 0,function*(){try{const T=yield this.getWalletConnector(),O=yield T.signPersonalMessage([_.data,_.from]);v(null,O)}catch(T){v(T)}}),processSignTransaction:(_,v)=>s.__awaiter(this,void 0,void 0,function*(){try{const T=yield this.getWalletConnector(),O=yield T.signTransaction(_);v(null,O)}catch(T){v(T)}}),processTransaction:(_,v)=>s.__awaiter(this,void 0,void 0,function*(){try{const T=yield this.getWalletConnector(),O=yield T.sendTransaction(_);v(null,O)}catch(T){v(T)}}),processTypedMessage:(_,v)=>s.__awaiter(this,void 0,void 0,function*(){try{const T=yield this.getWalletConnector(),O=yield T.signTypedData([_.from,_.data]);v(null,O)}catch(T){v(T)}})}}}},function(z,l,f){"use strict";f.r(l),f.d(l,"__extends",function(){return m}),f.d(l,"__assign",function(){return y}),f.d(l,"__rest",function(){return n}),f.d(l,"__decorate",function(){return o}),f.d(l,"__param",function(){return e}),f.d(l,"__metadata",function(){return t}),f.d(l,"__awaiter",function(){return i}),f.d(l,"__generator",function(){return c}),f.d(l,"__exportStar",function(){return h}),f.d(l,"__values",function(){return u}),f.d(l,"__read",function(){return d}),f.d(l,"__spread",function(){return _}),f.d(l,"__await",function(){return v}),f.d(l,"__asyncGenerator",function(){return T}),f.d(l,"__asyncDelegator",function(){return O}),f.d(l,"__asyncValues",function(){return b}),f.d(l,"__makeTemplateObject",function(){return S}),f.d(l,"__importStar",function(){return w}),f.d(l,"__importDefault",function(){return A});var s=function(L,H){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,q){D.__proto__=q}||function(D,q){for(var k in q)q.hasOwnProperty(k)&&(D[k]=q[k])})(L,H)};function m(L,H){function D(){this.constructor=L}s(L,H),L.prototype=null===H?Object.create(H):(D.prototype=H.prototype,new D)}var y=function(){return(y=Object.assign||function(L){for(var H,D=1,q=arguments.length;D=0;R--)(k=L[R])&&(E=(p<3?k(E):p>3?k(H,D,E):k(H,D))||E);return p>3&&E&&Object.defineProperty(H,D,E),E}function e(L,H){return function(D,q){H(D,q,L)}}function t(L,H){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(L,H)}function i(L,H,D,q){return new(D||(D=Promise))(function(k,p){function E(a){try{r(q.next(a))}catch(g){p(g)}}function R(a){try{r(q.throw(a))}catch(g){p(g)}}function r(a){a.done?k(a.value):new D(function(g){g(a.value)}).then(E,R)}r((q=q.apply(L,H||[])).next())})}function c(L,H){var D,q,k,p,E={label:0,sent:function(){if(1&k[0])throw k[1];return k[1]},trys:[],ops:[]};return p={next:R(0),throw:R(1),return:R(2)},"function"==typeof Symbol&&(p[Symbol.iterator]=function(){return this}),p;function R(r){return function(a){return function(g){if(D)throw new TypeError("Generator is already executing.");for(;E;)try{if(D=1,q&&(k=2&g[0]?q.return:g[0]?q.throw||((k=q.return)&&k.call(q),0):q.next)&&!(k=k.call(q,g[1])).done)return k;switch(q=0,k&&(g=[2&g[0],k.value]),g[0]){case 0:case 1:k=g;break;case 4:return E.label++,{value:g[1],done:!1};case 5:E.label++,q=g[1],g=[0];continue;case 7:g=E.ops.pop(),E.trys.pop();continue;default:if(!((k=(k=E.trys).length>0&&k[k.length-1])||6!==g[0]&&2!==g[0])){E=0;continue}if(3===g[0]&&(!k||g[1]>k[0]&&g[1]=L.length&&(L=void 0),{value:L&&L[D++],done:!L}}}}function d(L,H){var D="function"==typeof Symbol&&L[Symbol.iterator];if(!D)return L;var q,k,p=D.call(L),E=[];try{for(;(void 0===H||H-- >0)&&!(q=p.next()).done;)E.push(q.value)}catch(R){k={error:R}}finally{try{q&&!q.done&&(D=p.return)&&D.call(p)}finally{if(k)throw k.error}}return E}function _(){for(var L=[],H=0;H1||R(M,x)})})}function R(M,x){try{(C=k[M](x)).value instanceof v?Promise.resolve(C.value.v).then(r,a):g(p[0][2],C)}catch(U){g(p[0][3],U)}var C}function r(M){R("next",M)}function a(M){R("throw",M)}function g(M,x){M(x),p.shift(),p.length&&R(p[0][0],p[0][1])}}function O(L){var H,D;return H={},q("next"),q("throw",function(k){throw k}),q("return"),H[Symbol.iterator]=function(){return this},H;function q(k,p){H[k]=L[k]?function(E){return(D=!D)?{value:v(L[k](E)),done:"return"===k}:p?p(E):E}:p}}function b(L){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var H,D=L[Symbol.asyncIterator];return D?D.call(L):(L=u(L),H={},q("next"),q("throw"),q("return"),H[Symbol.asyncIterator]=function(){return this},H);function q(k){H[k]=L[k]&&function(p){return new Promise(function(E,R){var r,a,g;r=E,a=R,g=(p=L[k](p)).done,Promise.resolve(p.value).then(function(x){r({value:x,done:g})},a)})}}}function S(L,H){return Object.defineProperty?Object.defineProperty(L,"raw",{value:H}):L.raw=H,L}function w(L){if(L&&L.__esModule)return L;var H={};if(null!=L)for(var D in L)Object.hasOwnProperty.call(L,D)&&(H[D]=L[D]);return H.default=L,H}function A(L){return L&&L.__esModule?L:{default:L}}},function(z,l){},function(z,l,f){"use strict";l.byteLength=function(c){var h=t(c),d=h[1];return 3*(h[0]+d)/4-d},l.toByteArray=function(c){var h,u,A,d=t(c),_=d[0],v=d[1],T=new y(3*(_+(A=v))/4-A),O=0,b=v>0?_-4:_;for(u=0;u>16&255,T[O++]=h>>8&255,T[O++]=255&h;return 2===v&&(h=m[c.charCodeAt(u)]<<2|m[c.charCodeAt(u+1)]>>4,T[O++]=255&h),1===v&&(h=m[c.charCodeAt(u)]<<10|m[c.charCodeAt(u+1)]<<4|m[c.charCodeAt(u+2)]>>2,T[O++]=h>>8&255,T[O++]=255&h),T},l.fromByteArray=function(c){for(var h,u=c.length,d=u%3,_=[],v=0,T=u-d;vT?T:v+16383));return 1===d?_.push(s[(h=c[u-1])>>2]+s[h<<4&63]+"=="):2===d&&_.push(s[(h=(c[u-2]<<8)+c[u-1])>>10]+s[h>>4&63]+s[h<<2&63]+"="),_.join("")};for(var s=[],m=[],y=typeof Uint8Array<"u"?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,e=n.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var u=c.indexOf("=");return-1===u&&(u=h),[u,u===h?0:4-u%4]}function i(c,h,u){for(var _,v=[],T=h;T>18&63]+s[_>>12&63]+s[_>>6&63]+s[63&_]);return v.join("")}m["-".charCodeAt(0)]=62,m["_".charCodeAt(0)]=63},function(z,l){l.read=function(f,s,m,y,n){var o,e,t=8*n-y-1,i=(1<>1,h=-7,u=m?n-1:0,d=m?-1:1,_=f[s+u];for(u+=d,o=_&(1<<-h)-1,_>>=-h,h+=t;h>0;o=256*o+f[s+u],u+=d,h-=8);for(e=o&(1<<-h)-1,o>>=-h,h+=y;h>0;e=256*e+f[s+u],u+=d,h-=8);if(0===o)o=1-c;else{if(o===i)return e?NaN:1/0*(_?-1:1);e+=Math.pow(2,y),o-=c}return(_?-1:1)*e*Math.pow(2,o-y)},l.write=function(f,s,m,y,n,o){var e,t,i,c=8*o-n-1,h=(1<>1,d=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,_=y?0:o-1,v=y?1:-1,T=s<0||0===s&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(t=isNaN(s)?1:0,e=h):(e=Math.floor(Math.log(s)/Math.LN2),s*(i=Math.pow(2,-e))<1&&(e--,i*=2),(s+=e+u>=1?d/i:d*Math.pow(2,1-u))*i>=2&&(e++,i/=2),e+u>=h?(t=0,e=h):e+u>=1?(t=(s*i-1)*Math.pow(2,n),e+=u):(t=s*Math.pow(2,u-1)*Math.pow(2,n),e=0));n>=8;f[m+_]=255&t,_+=v,t/=256,n-=8);for(e=e<0;f[m+_]=255&e,_+=v,e/=256,c-=8);f[m+_-v]|=128*T}},function(z,l){(function(f){z.exports=f}).call(this,{})},function(z,l,f){"use strict";(function(s){function m(){return(null==s?void 0:s.crypto)||(null==s?void 0:s.msCrypto)||{}}function y(){const n=m();return n.subtle||n.webkitSubtle}Object.defineProperty(l,"__esModule",{value:!0}),l.isBrowserCryptoAvailable=l.getSubtleCrypto=l.getBrowerCrypto=void 0,l.getBrowerCrypto=m,l.getSubtleCrypto=y,l.isBrowserCryptoAvailable=function(){return!!m()&&!!y()}}).call(this,f(6))},function(z,l,f){"use strict";(function(s){function m(){return typeof document>"u"&&typeof navigator<"u"&&"ReactNative"===navigator.product}function y(){return void 0!==s&&void 0!==s.versions&&void 0!==s.versions.node}Object.defineProperty(l,"__esModule",{value:!0}),l.isBrowser=l.isNode=l.isReactNative=void 0,l.isReactNative=m,l.isNode=y,l.isBrowser=function(){return!m()&&!y()}}).call(this,f(5))},function(z,l,f){"use strict";z.exports=s=>encodeURIComponent(s).replace(/[!'()*]/g,m=>"%"+m.charCodeAt(0).toString(16).toUpperCase())},function(z,l,f){"use strict";var s=new RegExp("%[a-f0-9]{2}","gi"),m=new RegExp("(%[a-f0-9]{2})+","gi");function y(o,e){try{return decodeURIComponent(o.join(""))}catch{}if(1===o.length)return o;var t=o.slice(0,e=e||1),i=o.slice(e);return Array.prototype.concat.call([],y(t),y(i))}function n(o){try{return decodeURIComponent(o)}catch{for(var e=o.match(s),t=1;t{if("string"!=typeof s||"string"!=typeof m)throw new TypeError("Expected the arguments to be of type `string`");if(""===m)return[s];const y=s.indexOf(m);return-1===y?[s]:[s.slice(0,y),s.slice(y+m.length)]}},function(z,l,f){"use strict";z.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},function(z,l,f){(function(s){function m(L){return L&&"object"==typeof L&&"default"in L?L.default:L}var y=f(76),n=m(f(179)),o=m(f(200)),e=f(376);function t(L){return e.createElement("div",{className:"walletconnect-modal__header"},e.createElement("img",{src:"data:image/svg+xml,%3Csvg height='185' viewBox='0 0 300 185' width='300' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m61.4385429 36.2562612c48.9112241-47.8881663 128.2119871-47.8881663 177.1232091 0l5.886545 5.7634174c2.445561 2.3944081 2.445561 6.2765112 0 8.6709204l-20.136695 19.715503c-1.222781 1.1972051-3.2053 1.1972051-4.428081 0l-8.100584-7.9311479c-34.121692-33.4079817-89.443886-33.4079817-123.5655788 0l-8.6750562 8.4936051c-1.2227816 1.1972041-3.205301 1.1972041-4.4280806 0l-20.1366949-19.7155031c-2.4455612-2.3944092-2.4455612-6.2765122 0-8.6709204zm218.7677961 40.7737449 17.921697 17.546897c2.445549 2.3943969 2.445563 6.2764769.000031 8.6708899l-80.810171 79.121134c-2.445544 2.394426-6.410582 2.394453-8.85616.000062-.00001-.00001-.000022-.000022-.000032-.000032l-57.354143-56.154572c-.61139-.598602-1.60265-.598602-2.21404 0-.000004.000004-.000007.000008-.000011.000011l-57.3529212 56.154531c-2.4455368 2.394432-6.4105755 2.394472-8.8561612.000087-.0000143-.000014-.0000296-.000028-.0000449-.000044l-80.81241943-79.122185c-2.44556021-2.394408-2.44556021-6.2765115 0-8.6709197l17.92172963-17.5468673c2.4455602-2.3944082 6.4105989-2.3944082 8.8561602 0l57.3549775 56.155357c.6113908.598602 1.602649.598602 2.2140398 0 .0000092-.000009.0000174-.000017.0000265-.000024l57.3521031-56.155333c2.445505-2.3944633 6.410544-2.3945531 8.856161-.0002.000034.0000336.000068.0000673.000101.000101l57.354902 56.155432c.61139.598601 1.60265.598601 2.21404 0l57.353975-56.1543249c2.445561-2.3944092 6.410599-2.3944092 8.85616 0z' fill='%233b99fc'/%3E%3C/svg%3E",className:"walletconnect-modal__headerLogo"}),e.createElement("p",null,"WalletConnect"),e.createElement("div",{className:"walletconnect-modal__close__wrapper",onClick:L.onClose},e.createElement("div",{id:"walletconnect-qrcode-close",className:"walletconnect-modal__close__icon"},e.createElement("div",{className:"walletconnect-modal__close__line1"}),e.createElement("div",{className:"walletconnect-modal__close__line2"}))))}function i(L){return e.createElement("a",{className:"walletconnect-connect__button",href:L.href,id:"walletconnect-connect-button-"+L.name,onClick:L.onClick,rel:"noopener noreferrer",style:{backgroundColor:L.color},target:"_blank"},L.name)}function c(L){var H=L.color,k=L.logo;return e.createElement("a",{className:"walletconnect-modal__base__row",href:L.href,onClick:L.onClick,rel:"noopener noreferrer",target:"_blank"},e.createElement("h3",{className:"walletconnect-modal__base__row__h3"},L.name),e.createElement("div",{className:"walletconnect-modal__base__row__right"},e.createElement("div",{className:"walletconnect-modal__base__row__right__app-icon",style:{background:"url('"+k+"') "+H,backgroundSize:"100%"}}),e.createElement("img",{src:"data:image/svg+xml,%3Csvg fill='none' height='18' viewBox='0 0 8 18' width='8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath clip-rule='evenodd' d='m.586301.213898c-.435947.33907-.5144813.967342-.175411 1.403292l4.87831 6.27212c.28087.36111.28087.86677 0 1.22788l-4.878311 6.27211c-.33907.436-.260536 1.0642.175412 1.4033.435949.3391 1.064219.2605 1.403289-.1754l4.87832-6.2721c.84259-1.08336.84259-2.60034 0-3.68367l-4.87832-6.27212c-.33907-.4359474-.96734-.514482-1.403289-.175412z' fill='%233c4252' fill-rule='evenodd'/%3E%3C/svg%3E",className:"walletconnect-modal__base__row__right__caret"})))}function h(L){var q=L.name,E=window.innerWidth<768?(q.length>8?2.5:2.7)+"vw":"inherit";return e.createElement("a",{className:"walletconnect-connect__button__icon_anchor",href:L.href,onClick:L.onClick,rel:"noopener noreferrer",target:"_blank"},e.createElement("div",{className:"walletconnect-connect__button__icon",style:{background:"url('"+L.logo+"') "+L.color,backgroundSize:"100%"}}),e.createElement("div",{style:{fontSize:E},className:"walletconnect-connect__button__text"},q))}function u(L){var H=y.isAndroid(),D=e.useState(""),q=D[0],k=D[1],p=e.useState(""),E=p[0],R=p[1],r=e.useState(1),a=r[0],g=r[1],M=E?L.links.filter(function(B){return B.name.toLowerCase().includes(E.toLowerCase())}):L.links,x=L.errorMessage,C=E||M.length>5,U=Math.ceil(M.length/12),V=[12*(a-1)+1,12*a],I=M.length?M.filter(function(B,N){return N+1>=V[0]&&N+1<=V[1]}):[],W=!(H||!(U>1)),F=void 0;return e.createElement("div",null,e.createElement("p",{id:"walletconnect-qrcode-text",className:"walletconnect-qrcode__text"},H?L.text.connect_mobile_wallet:L.text.choose_preferred_wallet),!H&&e.createElement("input",{className:"walletconnect-search__input",placeholder:"Search",value:q,onChange:function(B){k(B.target.value),clearTimeout(F),B.target.value?F=setTimeout(function(){R(B.target.value),g(1)},1e3):(k(""),R(""),g(1))}}),e.createElement("div",{className:"walletconnect-connect__buttons__wrapper"+(H?"__android":C&&M.length?"__wrap":"")},H?e.createElement(i,{name:L.text.connect,color:"rgb(64, 153, 255)",href:L.uri,onClick:e.useCallback(function(){y.saveMobileLinkInfo({name:"Unknown",href:L.uri})},[])}):I.length?I.map(function(B){var N=B.color,P=B.name,j=B.shortName,K=B.logo,Z=y.formatIOSMobile(L.uri,B),J=e.useCallback(function(){y.saveMobileLinkInfo({name:P,href:Z})},[I]);return C?e.createElement(h,{color:N,href:Z,name:j||P,logo:K,onClick:J}):e.createElement(c,{color:N,href:Z,name:P,logo:K,onClick:J})}):e.createElement(e.Fragment,null,e.createElement("p",null,x.length?L.errorMessage:L.links.length&&!M.length?L.text.no_wallets_found:L.text.loading))),W&&e.createElement("div",{className:"walletconnect-modal__footer"},Array(U).fill(0).map(function(B,N){var P=N+1;return e.createElement("a",{style:{margin:"auto 10px",fontWeight:a===P?"bold":"normal"},onClick:function(){return g(P)}},P)})))}function d(L){var H=!!L.message.trim();return e.createElement("div",{className:"walletconnect-qrcode__notification"+(H?" notification__show":"")},L.message)}function _(L){var H=e.useState(""),D=H[0],q=H[1],k=e.useState(""),p=k[0],E=k[1];return e.useEffect(function(){try{return Promise.resolve(function(R){try{var r="";return Promise.resolve(n.toString(R,{margin:0,type:"svg"})).then(function(a){return"string"==typeof a&&(r=a.replace("0||e.useEffect(function(){!function(){try{if(H)return Promise.resolve();E(!0);var te=function(oe,ve){try{var ie=function(){var oe=L.qrcodeModalOptions&&L.qrcodeModalOptions.registryUrl?L.qrcodeModalOptions.registryUrl:y.getWalletRegistryUrl();return Promise.resolve(fetch(oe)).then(function(ve){return Promise.resolve(ve.json()).then(function(ie){var re=y.getMobileLinkRegistry(y.formatMobileRegistry(ie.listings,D?"mobile":"desktop"),q);E(!1),a(!0),J(re.length?"":L.text.no_supported_wallets),j(re);var _e=1===re.length;_e&&(I(y.formatIOSMobile(L.uri,re[0])),x(!0)),B(_e)})})}()}catch(de){return ve(de)}return ie&&ie.then?ie.then(void 0,ve):ie}(0,function(oe){E(!1),a(!0),J(L.text.something_went_wrong),console.error(oe)});Promise.resolve(te&&te.then?te.then(function(){}):void 0)}catch(oe){return Promise.reject(oe)}}()})};X();var ee=D?M:!M;return e.createElement("div",{id:"walletconnect-qrcode-modal",className:"walletconnect-qrcode__base animated fadeIn"},e.createElement("div",{className:"walletconnect-modal__base"},e.createElement(t,{onClose:L.onClose}),F&&M?e.createElement("div",{className:"walletconnect-modal__single_wallet"},e.createElement("a",{onClick:function(){return y.saveMobileLinkInfo({name:P[0].name,href:V})},href:V,rel:"noopener noreferrer",target:"_blank"},L.text.connect_with+" "+(F?P[0].name:"")+" \u203a")):H||p||!p&&P.length?e.createElement("div",{className:"walletconnect-modal__mobile__toggle"+(ee?" right__selected":"")},e.createElement("div",{className:"walletconnect-modal__mobile__toggle_selector"}),D?e.createElement(e.Fragment,null,e.createElement("a",{onClick:function(){return x(!1),X()}},L.text.mobile),e.createElement("a",{onClick:function(){return x(!0)}},L.text.qrcode)):e.createElement(e.Fragment,null,e.createElement("a",{onClick:function(){return x(!0)}},L.text.qrcode),e.createElement("a",{onClick:function(){return x(!1),X()}},L.text.desktop))):null,e.createElement("div",null,M||!H&&!p&&!P.length?e.createElement(_,Object.assign({},C)):e.createElement(u,Object.assign({},C,{links:P,errorMessage:Z})))))}typeof Symbol<"u"&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),typeof Symbol<"u"&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var T={de:{choose_preferred_wallet:"W\xe4hle bevorzugte Wallet",connect_mobile_wallet:"Verbinde mit Mobile Wallet",scan_qrcode_with_wallet:"Scanne den QR-code mit einer WalletConnect kompatiblen Wallet",connect:"Verbinden",qrcode:"QR-Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"In die Zwischenablage kopieren",copied_to_clipboard:"In die Zwischenablage kopiert!",connect_with:"Verbinden mit Hilfe von",loading:"Laden...",something_went_wrong:"Etwas ist schief gelaufen",no_supported_wallets:"Es gibt noch keine unterst\xfctzten Wallet",no_wallets_found:"keine Wallet gefunden"},en:{choose_preferred_wallet:"Choose your preferred wallet",connect_mobile_wallet:"Connect to Mobile Wallet",scan_qrcode_with_wallet:"Scan QR code with a WalletConnect-compatible wallet",connect:"Connect",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copy to clipboard",copied_to_clipboard:"Copied to clipboard!",connect_with:"Connect with",loading:"Loading...",something_went_wrong:"Something went wrong",no_supported_wallets:"There are no supported wallets yet",no_wallets_found:"No wallets found"},es:{choose_preferred_wallet:"Elige tu billetera preferida",connect_mobile_wallet:"Conectar a billetera m\xf3vil",scan_qrcode_with_wallet:"Escanea el c\xf3digo QR con una billetera compatible con WalletConnect",connect:"Conectar",qrcode:"C\xf3digo QR",mobile:"M\xf3vil",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Conectar mediante",loading:"Cargando...",something_went_wrong:"Algo sali\xf3 mal",no_supported_wallets:"Todav\xeda no hay billeteras compatibles",no_wallets_found:"No se encontraron billeteras"},fr:{choose_preferred_wallet:"Choisissez votre portefeuille pr\xe9f\xe9r\xe9",connect_mobile_wallet:"Se connecter au portefeuille mobile",scan_qrcode_with_wallet:"Scannez le QR code avec un portefeuille compatible WalletConnect",connect:"Se connecter",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copier",copied_to_clipboard:"Copi\xe9!",connect_with:"Connectez-vous \xe0 l'aide de",loading:"Chargement...",something_went_wrong:"Quelque chose a mal tourn\xe9",no_supported_wallets:"Il n'y a pas encore de portefeuilles pris en charge",no_wallets_found:"Aucun portefeuille trouv\xe9"},ko:{choose_preferred_wallet:"\uc6d0\ud558\ub294 \uc9c0\uac11\uc744 \uc120\ud0dd\ud558\uc138\uc694",connect_mobile_wallet:"\ubaa8\ubc14\uc77c \uc9c0\uac11\uacfc \uc5f0\uacb0",scan_qrcode_with_wallet:"WalletConnect \uc9c0\uc6d0 \uc9c0\uac11\uc5d0\uc11c QR\ucf54\ub4dc\ub97c \uc2a4\uce94\ud558\uc138\uc694",connect:"\uc5f0\uacb0",qrcode:"QR \ucf54\ub4dc",mobile:"\ubaa8\ubc14\uc77c",desktop:"\ub370\uc2a4\ud06c\ud0d1",copy_to_clipboard:"\ud074\ub9bd\ubcf4\ub4dc\uc5d0 \ubcf5\uc0ac",copied_to_clipboard:"\ud074\ub9bd\ubcf4\ub4dc\uc5d0 \ubcf5\uc0ac\ub418\uc5c8\uc2b5\ub2c8\ub2e4!",connect_with:"\uc640 \uc5f0\uacb0\ud558\ub2e4",loading:"\ub85c\ub4dc \uc911...",something_went_wrong:"\ubb38\uc81c\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4.",no_supported_wallets:"\uc544\uc9c1 \uc9c0\uc6d0\ub418\ub294 \uc9c0\uac11\uc774 \uc5c6\uc2b5\ub2c8\ub2e4",no_wallets_found:"\uc9c0\uac11\uc744 \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4"},pt:{choose_preferred_wallet:"Escolha sua carteira preferida",connect_mobile_wallet:"Conectar-se \xe0 carteira m\xf3vel",scan_qrcode_with_wallet:"Ler o c\xf3digo QR com uma carteira compat\xedvel com WalletConnect",connect:"Conectar",qrcode:"C\xf3digo QR",mobile:"M\xf3vel",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Ligar por meio de",loading:"Carregamento...",something_went_wrong:"Algo correu mal",no_supported_wallets:"Ainda n\xe3o h\xe1 carteiras suportadas",no_wallets_found:"Nenhuma carteira encontrada"},zh:{choose_preferred_wallet:"\u9009\u62e9\u4f60\u7684\u94b1\u5305",connect_mobile_wallet:"\u8fde\u63a5\u81f3\u79fb\u52a8\u7aef\u94b1\u5305",scan_qrcode_with_wallet:"\u4f7f\u7528\u517c\u5bb9 WalletConnect \u7684\u94b1\u5305\u626b\u63cf\u4e8c\u7ef4\u7801",connect:"\u8fde\u63a5",qrcode:"\u4e8c\u7ef4\u7801",mobile:"\u79fb\u52a8",desktop:"\u684c\u9762",copy_to_clipboard:"\u590d\u5236\u5230\u526a\u8d34\u677f",copied_to_clipboard:"\u590d\u5236\u5230\u526a\u8d34\u677f\u6210\u529f\uff01",connect_with:"\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u8fde\u63a5",loading:"\u6b63\u5728\u52a0\u8f7d...",something_went_wrong:"\u51fa\u4e86\u95ee\u9898",no_supported_wallets:"\u76ee\u524d\u8fd8\u6ca1\u6709\u652f\u6301\u7684\u94b1\u5305",no_wallets_found:"\u6ca1\u6709\u627e\u5230\u94b1\u5305"},fa:{choose_preferred_wallet:"\u06a9\u06cc\u0641 \u067e\u0648\u0644 \u0645\u0648\u0631\u062f \u0646\u0638\u0631 \u062e\u0648\u062f \u0631\u0627 \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0646\u06cc\u062f",connect_mobile_wallet:"\u0628\u0647 \u06a9\u06cc\u0641 \u067e\u0648\u0644 \u0645\u0648\u0628\u0627\u06cc\u0644 \u0648\u0635\u0644 \u0634\u0648\u06cc\u062f",scan_qrcode_with_wallet:"\u06a9\u062f QR \u0631\u0627 \u0628\u0627 \u06cc\u06a9 \u06a9\u06cc\u0641 \u067e\u0648\u0644 \u0633\u0627\u0632\u06af\u0627\u0631 \u0628\u0627 WalletConnect \u0627\u0633\u06a9\u0646 \u06a9\u0646\u06cc\u062f",connect:"\u0627\u062a\u0635\u0627\u0644",qrcode:"\u06a9\u062f QR",mobile:"\u0633\u06cc\u0627\u0631",desktop:"\u062f\u0633\u06a9\u062a\u0627\u067e",copy_to_clipboard:"\u06a9\u067e\u06cc \u0628\u0647 \u06a9\u0644\u06cc\u067e \u0628\u0648\u0631\u062f",copied_to_clipboard:"\u062f\u0631 \u06a9\u0644\u06cc\u067e \u0628\u0648\u0631\u062f \u06a9\u067e\u06cc \u0634\u062f!",connect_with:"\u0627\u0631\u062a\u0628\u0627\u0637 \u0628\u0627",loading:"...\u0628\u0627\u0631\u06af\u0630\u0627\u0631\u06cc",something_went_wrong:"\u0645\u0634\u06a9\u0644\u06cc \u067e\u06cc\u0634 \u0622\u0645\u062f",no_supported_wallets:"\u0647\u0646\u0648\u0632 \u0647\u06cc\u0686 \u06a9\u06cc\u0641 \u067e\u0648\u0644 \u067e\u0634\u062a\u06cc\u0628\u0627\u0646\u06cc \u0634\u062f\u0647 \u0627\u06cc \u0648\u062c\u0648\u062f \u0646\u062f\u0627\u0631\u062f",no_wallets_found:"\u0647\u06cc\u0686 \u06a9\u06cc\u0641 \u067e\u0648\u0644\u06cc \u067e\u06cc\u062f\u0627 \u0646\u0634\u062f"}};function O(){var L=y.getDocumentOrThrow(),H=L.getElementById("walletconnect-qrcode-modal");H&&(H.className=H.className.replace("fadeIn","fadeOut"),setTimeout(function(){var D=L.getElementById("walletconnect-wrapper");D&&L.body.removeChild(D)},300))}function b(L){return function(){O(),L&&L()}}var w=function(){return void 0!==s&&void 0!==s.versions&&void 0!==s.versions.node};z.exports={open:function(L,H,D){console.log(L),w()?n.toString(L,{type:"terminal"}).then(console.log):function S(L,H,D){!function(){var p=y.getDocumentOrThrow(),E=p.getElementById("walletconnect-style-sheet");E&&p.head.removeChild(E);var R=p.createElement("style");R.setAttribute("id","walletconnect-style-sheet"),R.innerText=':root {\n --animation-duration: 300ms;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n.animated {\n animation-duration: var(--animation-duration);\n animation-fill-mode: both;\n}\n\n.fadeIn {\n animation-name: fadeIn;\n}\n\n.fadeOut {\n animation-name: fadeOut;\n}\n\n#walletconnect-wrapper {\n -webkit-user-select: none;\n align-items: center;\n display: flex;\n height: 100%;\n justify-content: center;\n left: 0;\n pointer-events: none;\n position: fixed;\n top: 0;\n user-select: none;\n width: 100%;\n z-index: 99999999999999;\n}\n\n.walletconnect-modal__headerLogo {\n height: 21px;\n}\n\n.walletconnect-modal__header p {\n color: #ffffff;\n font-size: 20px;\n font-weight: 600;\n margin: 0;\n align-items: flex-start;\n display: flex;\n flex: 1;\n margin-left: 5px;\n}\n\n.walletconnect-modal__close__wrapper {\n position: absolute;\n top: 0px;\n right: 0px;\n z-index: 10000;\n background: white;\n border-radius: 26px;\n padding: 6px;\n box-sizing: border-box;\n width: 26px;\n height: 26px;\n cursor: pointer;\n}\n\n.walletconnect-modal__close__icon {\n position: relative;\n top: 7px;\n right: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n transform: rotate(45deg);\n}\n\n.walletconnect-modal__close__line1 {\n position: absolute;\n width: 100%;\n border: 1px solid rgb(48, 52, 59);\n}\n\n.walletconnect-modal__close__line2 {\n position: absolute;\n width: 100%;\n border: 1px solid rgb(48, 52, 59);\n transform: rotate(90deg);\n}\n\n.walletconnect-qrcode__base {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n background: rgba(37, 41, 46, 0.95);\n height: 100%;\n left: 0;\n pointer-events: auto;\n position: fixed;\n top: 0;\n transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n width: 100%;\n will-change: opacity;\n padding: 40px;\n box-sizing: border-box;\n}\n\n.walletconnect-qrcode__text {\n color: rgba(60, 66, 82, 0.6);\n font-size: 16px;\n font-weight: 600;\n letter-spacing: 0;\n line-height: 1.1875em;\n margin: 10px 0 20px 0;\n text-align: center;\n width: 100%;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-qrcode__text {\n font-size: 4vw;\n }\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-qrcode__text {\n font-size: 14px;\n }\n}\n\n.walletconnect-qrcode__image {\n width: calc(100% - 30px);\n box-sizing: border-box;\n cursor: none;\n margin: 0 auto;\n}\n\n.walletconnect-qrcode__notification {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n font-size: 16px;\n padding: 16px 20px;\n border-radius: 16px;\n text-align: center;\n transition: all 0.1s ease-in-out;\n background: white;\n color: black;\n margin-bottom: -60px;\n opacity: 0;\n}\n\n.walletconnect-qrcode__notification.notification__show {\n opacity: 1;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-modal__header {\n height: 130px;\n }\n .walletconnect-modal__base {\n overflow: auto;\n }\n}\n\n@media only screen and (min-device-width: 415px) and (max-width: 768px) {\n #content {\n max-width: 768px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (min-width: 375px) and (max-width: 415px) {\n #content {\n max-width: 414px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (min-width: 320px) and (max-width: 375px) {\n #content {\n max-width: 375px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (max-width: 320px) {\n #content {\n max-width: 320px;\n box-sizing: border-box;\n }\n}\n\n.walletconnect-modal__base {\n -webkit-font-smoothing: antialiased;\n background: #ffffff;\n border-radius: 24px;\n box-shadow: 0 10px 50px 5px rgba(0, 0, 0, 0.4);\n font-family: ui-rounded, "SF Pro Rounded", "SF Pro Text", medium-content-sans-serif-font,\n -apple-system, BlinkMacSystemFont, ui-sans-serif, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,\n "Open Sans", "Helvetica Neue", sans-serif;\n margin-top: 41px;\n padding: 24px 24px 22px;\n pointer-events: auto;\n position: relative;\n text-align: center;\n transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n will-change: transform;\n overflow: visible;\n transform: translateY(-50%);\n top: 50%;\n max-width: 500px;\n margin: auto;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-modal__base {\n padding: 24px 12px;\n }\n}\n\n.walletconnect-modal__base .hidden {\n transform: translateY(150%);\n transition: 0.125s cubic-bezier(0.4, 0, 1, 1);\n}\n\n.walletconnect-modal__header {\n align-items: center;\n display: flex;\n height: 26px;\n left: 0;\n justify-content: space-between;\n position: absolute;\n top: -42px;\n width: 100%;\n}\n\n.walletconnect-modal__base .wc-logo {\n align-items: center;\n display: flex;\n height: 26px;\n margin-top: 15px;\n padding-bottom: 15px;\n pointer-events: auto;\n}\n\n.walletconnect-modal__base .wc-logo div {\n background-color: #3399ff;\n height: 21px;\n margin-right: 5px;\n mask-image: url("images/wc-logo.svg") center no-repeat;\n width: 32px;\n}\n\n.walletconnect-modal__base .wc-logo p {\n color: #ffffff;\n font-size: 20px;\n font-weight: 600;\n margin: 0;\n}\n\n.walletconnect-modal__base h2 {\n color: rgba(60, 66, 82, 0.6);\n font-size: 16px;\n font-weight: 600;\n letter-spacing: 0;\n line-height: 1.1875em;\n margin: 0 0 19px 0;\n text-align: center;\n width: 100%;\n}\n\n.walletconnect-modal__base__row {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n align-items: center;\n border-radius: 20px;\n cursor: pointer;\n display: flex;\n height: 56px;\n justify-content: space-between;\n padding: 0 15px;\n position: relative;\n margin: 0px 0px 8px;\n text-align: left;\n transition: 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n will-change: transform;\n text-decoration: none;\n}\n\n.walletconnect-modal__base__row:hover {\n background: rgba(60, 66, 82, 0.06);\n}\n\n.walletconnect-modal__base__row:active {\n background: rgba(60, 66, 82, 0.06);\n transform: scale(0.975);\n transition: 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n}\n\n.walletconnect-modal__base__row__h3 {\n color: #25292e;\n font-size: 20px;\n font-weight: 700;\n margin: 0;\n padding-bottom: 3px;\n}\n\n.walletconnect-modal__base__row__right {\n align-items: center;\n display: flex;\n justify-content: center;\n}\n\n.walletconnect-modal__base__row__right__app-icon {\n border-radius: 8px;\n height: 34px;\n margin: 0 11px 2px 0;\n width: 34px;\n background-size: 100%;\n box-shadow: 0 4px 12px 0 rgba(37, 41, 46, 0.25);\n}\n\n.walletconnect-modal__base__row__right__caret {\n height: 18px;\n opacity: 0.3;\n transition: 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n width: 8px;\n will-change: opacity;\n}\n\n.walletconnect-modal__base__row:hover .caret,\n.walletconnect-modal__base__row:active .caret {\n opacity: 0.6;\n}\n\n.walletconnect-modal__mobile__toggle {\n width: 80%;\n display: flex;\n margin: 0 auto;\n position: relative;\n overflow: hidden;\n border-radius: 8px;\n margin-bottom: 18px;\n background: #d4d5d9;\n}\n\n.walletconnect-modal__single_wallet {\n display: flex;\n justify-content: center;\n margin-top: 7px;\n margin-bottom: 18px;\n}\n\n.walletconnect-modal__single_wallet a {\n cursor: pointer;\n color: rgb(64, 153, 255);\n font-size: 21px;\n font-weight: 800;\n text-decoration: none !important;\n margin: 0 auto;\n}\n\n.walletconnect-modal__mobile__toggle_selector {\n width: calc(50% - 8px);\n background: white;\n position: absolute;\n border-radius: 5px;\n height: calc(100% - 8px);\n top: 4px;\n transition: all 0.2s ease-in-out;\n transform: translate3d(4px, 0, 0);\n}\n\n.walletconnect-modal__mobile__toggle.right__selected .walletconnect-modal__mobile__toggle_selector {\n transform: translate3d(calc(100% + 12px), 0, 0);\n}\n\n.walletconnect-modal__mobile__toggle a {\n font-size: 12px;\n width: 50%;\n text-align: center;\n padding: 8px;\n margin: 0;\n font-weight: 600;\n z-index: 1;\n}\n\n.walletconnect-modal__footer {\n display: flex;\n justify-content: center;\n margin-top: 20px;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-modal__footer {\n margin-top: 5vw;\n }\n}\n\n.walletconnect-modal__footer a {\n cursor: pointer;\n color: #898d97;\n font-size: 15px;\n margin: 0 auto;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-modal__footer a {\n font-size: 14px;\n }\n}\n\n.walletconnect-connect__buttons__wrapper {\n max-height: 44vh;\n}\n\n.walletconnect-connect__buttons__wrapper__android {\n margin: 50% 0;\n}\n\n.walletconnect-connect__buttons__wrapper__wrap {\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n margin: 10px 0;\n}\n\n@media only screen and (min-width: 768px) {\n .walletconnect-connect__buttons__wrapper__wrap {\n margin-top: 40px;\n }\n}\n\n.walletconnect-connect__button {\n background-color: rgb(64, 153, 255);\n padding: 12px;\n border-radius: 8px;\n text-decoration: none;\n color: rgb(255, 255, 255);\n font-weight: 500;\n}\n\n.walletconnect-connect__button__icon_anchor {\n cursor: pointer;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n margin: 8px;\n width: 42px;\n justify-self: center;\n flex-direction: column;\n text-decoration: none !important;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-connect__button__icon_anchor {\n margin: 4px;\n }\n}\n\n.walletconnect-connect__button__icon {\n border-radius: 10px;\n height: 42px;\n margin: 0;\n width: 42px;\n background-size: cover !important;\n box-shadow: 0 4px 12px 0 rgba(37, 41, 46, 0.25);\n}\n\n.walletconnect-connect__button__text {\n color: #424952;\n font-size: 2.7vw;\n text-decoration: none !important;\n padding: 0;\n margin-top: 1.8vw;\n font-weight: 600;\n}\n\n@media only screen and (min-width: 768px) {\n .walletconnect-connect__button__text {\n font-size: 16px;\n margin-top: 12px;\n }\n}\n\n.walletconnect-search__input {\n border: none;\n background: #d4d5d9;\n border-style: none;\n padding: 8px 16px;\n outline: none;\n font-style: normal;\n font-stretch: normal;\n font-size: 16px;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: normal;\n text-align: left;\n border-radius: 8px;\n width: calc(100% - 16px);\n margin: 0;\n margin-bottom: 8px;\n}\n',p.head.appendChild(R)}();var q,p,E,k=((E=(p=y.getDocumentOrThrow()).createElement("div")).setAttribute("id","walletconnect-wrapper"),p.body.appendChild(E),E);e.render(e.createElement(v,{text:(q=y.getNavigatorOrThrow().language.split("-")[0]||"en",T[q]||T.en),uri:L,onClose:b(H),qrcodeModalOptions:D}),k)}(L,H,D)},close:function(){w()||O()}}}).call(this,f(5))},function(z,l,f){var s=f(180),m=f(181),y=f(198),n=f(199);function o(e,t,i,c,h){var u=[].slice.call(arguments,1),d=u.length,_="function"==typeof u[d-1];if(!_&&!s())throw new Error("Callback required as last argument");if(!_){if(d<1)throw new Error("Too few arguments provided");return 1===d?(i=t,t=c=void 0):2!==d||t.getContext||(c=i,i=t,t=void 0),new Promise(function(T,O){try{var b=m.create(i,c);T(e(b,t,c))}catch(S){O(S)}})}if(d<2)throw new Error("Too few arguments provided");2===d?(h=i,i=t,t=c=void 0):3===d&&(t.getContext&&void 0===h?(h=c,c=void 0):(h=c,c=i,i=t,t=void 0));try{var v=m.create(i,c);h(null,e(v,t,c))}catch(T){h(T)}}l.create=m.create,l.toCanvas=o.bind(null,y.render),l.toDataURL=o.bind(null,y.renderToDataURL),l.toString=o.bind(null,function(e,t,i){return n.render(e,i)})},function(z,l){z.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},function(z,l,f){var s=f(26),m=f(17),y=f(51),n=f(182),o=f(183),e=f(184),t=f(185),i=f(186),c=f(98),h=f(187),u=f(190),d=f(191),_=f(18),v=f(192),T=f(50);function O(w,A,L){var H,D,q=w.size,k=d.getEncodedBits(A,L);for(H=0;H<15;H++)w.set(H<6?H:H<8?H+1:q-15+H,8,D=1==(k>>H&1),!0),w.set(8,H<8?q-H-1:H<9?15-H-1+1:15-H-1,D,!0);w.set(q-8,8,1,!0)}function S(w,A,L,H){var D;if(T(w))D=v.fromArray(w);else{if("string"!=typeof w)throw new Error("Invalid data");var q=A;if(!q){var k=v.rawSplit(w);q=u.getBestVersionForData(k,L)}D=v.fromString(w,q||40)}var p=u.getBestVersionForData(D,L);if(!p)throw new Error("The amount of data is too big to be stored in a QR Code");if(A){if(A=0&&I<=6&&(0===W||6===W)||W>=0&&W<=6&&(0===I||6===I)||I>=2&&I<=4&&W>=2&&W<=4,!0)}(r,A),function(a){for(var g=a.size,M=8;M=7&&function(a,g){for(var M,x,C,U=a.size,V=u.getEncodedBits(g),I=0;I<18;I++)M=Math.floor(I/3),a.set(M,x=I%3+U-8-3,C=1==(V>>I&1),!0),a.set(x,M,C,!0)}(r,A),function(a,g){for(var M=a.size,x=-1,C=M-1,U=7,V=0,I=M-1;I>0;I-=2)for(6===I&&I--;;){for(var W=0;W<2;W++)if(!a.isReserved(C,I-W)){var F=!1;V>>U&1)),a.set(C,I-W,F),-1==--U&&(V++,U=7)}if((C+=x)<0||M<=C){C-=x,x=-x;break}}}(r,E),isNaN(H)&&(H=i.getBestMask(r,O.bind(null,r,L))),i.applyMask(H,r),O(r,L,H),{modules:r,version:A,errorCorrectionLevel:L,maskPattern:H,segments:D}}l.create=function(w,A){if(void 0===w||""===w)throw new Error("No input text");var L,H,D=y.M;return void 0!==A&&(D=y.from(A.errorCorrectionLevel,y.M),L=u.from(A.version),H=i.from(A.maskPattern),A.toSJISFunc&&m.setToSJISFunction(A.toSJISFunc)),S(w,L,D,H)}},function(z,l){function f(){this.buffer=[],this.length=0}f.prototype={get:function(s){var m=Math.floor(s/8);return 1==(this.buffer[m]>>>7-s%8&1)},put:function(s,m){for(var y=0;y>>m-y-1&1))},getLengthInBits:function(){return this.length},putBit:function(s){var m=Math.floor(this.length/8);this.buffer.length<=m&&this.buffer.push(0),s&&(this.buffer[m]|=128>>>this.length%8),this.length++}},z.exports=f},function(z,l,f){var s=f(26);function m(y){if(!y||y<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=y,this.data=s.alloc(y*y),this.reservedBit=s.alloc(y*y)}m.prototype.set=function(y,n,o,e){var t=y*this.size+n;this.data[t]=o,e&&(this.reservedBit[t]=!0)},m.prototype.get=function(y,n){return this.data[y*this.size+n]},m.prototype.xor=function(y,n,o){this.data[y*this.size+n]^=o},m.prototype.isReserved=function(y,n){return this.reservedBit[y*this.size+n]},z.exports=m},function(z,l,f){var s=f(17).getSymbolSize;l.getRowColCoords=function(m){if(1===m)return[];for(var y=Math.floor(m/7)+2,n=s(m),o=145===n?26:2*Math.ceil((n-13)/(2*y-2)),e=[n-7],t=1;t=0&&o<=7},l.from=function(o){return l.isValid(o)?parseInt(o,10):void 0},l.getPenaltyN1=function(o){for(var e=o.size,t=0,i=0,c=0,h=null,u=null,d=0;d=5&&(t+=i-5+3),h=v,i=1),(v=o.get(_,d))===u?c++:(c>=5&&(t+=c-5+3),u=v,c=1)}i>=5&&(t+=i-5+3),c>=5&&(t+=c-5+3)}return t},l.getPenaltyN2=function(o){for(var e=o.size,t=0,i=0;i=10&&(1488===i||93===i)&&t++,c=c<<1&2047|o.get(u,h),u>=10&&(1488===c||93===c)&&t++}return 40*t},l.getPenaltyN4=function(o){for(var e=0,t=o.data.length,i=0;i0){var h=s.alloc(this.degree);return i.copy(h,c),h}return i},z.exports=n},function(z,l,f){var s=f(26),m=f(189);l.mul=function(y,n){for(var o=s.alloc(y.length+n.length-1),e=0;e=0;){for(var e=o[0],t=0;t1)return function(v,T){for(var O=1;O<=40;O++)if(c(v,O)<=l.getCapacity(O,T,n.MIXED))return O}(h,_);if(0===h.length)return 1;d=h[0]}else d=h;return function(v,T,O){for(var b=1;b<=40;b++)if(T<=l.getCapacity(b,O,v))return b}(d.mode,d.getLength(),_)},l.getEncodedBits=function(h){if(!o.isValid(h)||h<7)throw new Error("Invalid QR Code version");for(var u=h<<12;s.getBCHDigit(u)-t>=0;)u^=7973<=0;)e^=1335<=0?L[L.length-1]:null;return D&&D.mode===H.mode?(L[L.length-1].data+=H.data,L):(L.push(H),L)},[]))},l.rawSplit=function(v){return l.fromArray(u(v,t.isKanjiModeEnabled()))}},function(z,l,f){var s=f(18);function m(y){this.mode=s.NUMERIC,this.data=y.toString()}m.getBitsLength=function(y){return 10*Math.floor(y/3)+(y%3?y%3*3+1:0)},m.prototype.getLength=function(){return this.data.length},m.prototype.getBitsLength=function(){return m.getBitsLength(this.data.length)},m.prototype.write=function(y){var n,o,e;for(n=0;n+3<=this.data.length;n+=3)o=this.data.substr(n,3),e=parseInt(o,10),y.put(e,10);var t=this.data.length-n;t>0&&(o=this.data.substr(n),e=parseInt(o,10),y.put(e,3*t+1))},z.exports=m},function(z,l,f){var s=f(18),m=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function y(n){this.mode=s.ALPHANUMERIC,this.data=n}y.getBitsLength=function(n){return 11*Math.floor(n/2)+n%2*6},y.prototype.getLength=function(){return this.data.length},y.prototype.getBitsLength=function(){return y.getBitsLength(this.data.length)},y.prototype.write=function(n){var o;for(o=0;o+2<=this.data.length;o+=2){var e=45*m.indexOf(this.data[o]);e+=m.indexOf(this.data[o+1]),n.put(e,11)}this.data.length%2&&n.put(m.indexOf(this.data[o]),6)},z.exports=y},function(z,l,f){var s=f(26),m=f(18);function y(n){this.mode=m.BYTE,this.data=s.from(n)}y.getBitsLength=function(n){return 8*n},y.prototype.getLength=function(){return this.data.length},y.prototype.getBitsLength=function(){return y.getBitsLength(this.data.length)},y.prototype.write=function(n){for(var o=0,e=this.data.length;o=33088&&e<=40956)e-=33088;else{if(!(e>=57408&&e<=60351))throw new Error("Invalid SJIS character: "+this.data[o]+"\nMake sure your charset is UTF-8");e-=49472}n.put(e=192*(e>>>8&255)+(255&e),13)}},z.exports=y},function(z,l,f){"use strict";var s={single_source_shortest_paths:function(m,y,n){var o={},e={};e[y]=0;var t,i,c,h,u,d,v=s.PriorityQueue.make();for(v.push(y,0);!v.empty();)for(c in i=(t=v.pop()).value,h=t.cost,u=m[i]||{})u.hasOwnProperty(c)&&(d=h+u[c],(void 0===e[c]||e[c]>d)&&(e[c]=d,v.push(c,d),o[c]=i));if(void 0!==n&&void 0===e[n]){var T=["Could not find a path from ",y," to ",n,"."].join("");throw new Error(T)}return o},extract_shortest_path_from_predecessor_list:function(m,y){for(var n=[],o=y;o;)n.push(o),o=m[o];return n.reverse(),n},find_path:function(m,y,n){var o=s.single_source_shortest_paths(m,y,n);return s.extract_shortest_path_from_predecessor_list(o,n)},PriorityQueue:{make:function(m){var y,n=s.PriorityQueue,o={};for(y in m=m||{},n)n.hasOwnProperty(y)&&(o[y]=n[y]);return o.queue=[],o.sorter=m.sorter||n.default_sorter,o},default_sorter:function(m,y){return m.cost-y.cost},push:function(m,y){this.queue.push({value:m,cost:y}),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};z.exports=s},function(z,l,f){var s=f(101);l.render=function(m,y,n){var o=n,e=y;void 0!==o||y&&y.getContext||(o=y,y=void 0),y||(e=function(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}()),o=s.getOptions(o);var u,d,t=s.getImageWidth(m.modules.size,o),i=e.getContext("2d"),c=i.createImageData(t,t);return s.qrToImageData(c.data,m,o),d=t,i.clearRect(0,0,(u=e).width,u.height),u.style||(u.style={}),u.height=d,u.width=d,u.style.height=d+"px",u.style.width=d+"px",i.putImageData(c,0,0),e},l.renderToDataURL=function(m,y,n){var o=n;return void 0!==o||y&&y.getContext||(o=y,y=void 0),o||(o={}),l.render(m,y,o).toDataURL(o.type||"image/png",(o.rendererOpts||{}).quality)}},function(z,l,f){var s=f(101);function m(n,o){var e=n.a/255,t=o+'="'+n.hex+'"';return e<1?t+" "+o+'-opacity="'+e.toFixed(2).slice(1)+'"':t}function y(n,o,e){var t=n+o;return void 0!==e&&(t+=" "+e),t}l.render=function(n,o,e){var t=s.getOptions(o),i=n.modules.size,c=n.modules.data,h=i+2*t.margin,u=t.color.light.a?"':"",d="0&&D>0&&T[H-1]||(S+=A?y("M",D+b,.5+q+b):y("m",w,0),w=0,A=!1),D+1',v=''+u+d+"\n";return"function"==typeof e&&e(null,v),v}},function(z,l,f){"use strict";var s=f(201),m={"text/plain":"Text","text/html":"Url",default:"Text"};z.exports=function(y,n){var o,e,t,i,c,h,v,T,u=!1;n||(n={}),o=n.debug||!1;try{if(t=s(),i=document.createRange(),c=document.getSelection(),(h=document.createElement("span")).textContent=y,h.style.all="unset",h.style.position="fixed",h.style.top=0,h.style.clip="rect(0, 0, 0, 0)",h.style.whiteSpace="pre",h.style.webkitUserSelect="text",h.style.MozUserSelect="text",h.style.msUserSelect="text",h.style.userSelect="text",h.addEventListener("copy",function(d){d.stopPropagation(),n.format&&(d.preventDefault(),void 0===d.clipboardData?(o&&console.warn("unable to use e.clipboardData"),o&&console.warn("trying IE specific stuff"),window.clipboardData.clearData(),window.clipboardData.setData(m[n.format]||m.default,y)):(d.clipboardData.clearData(),d.clipboardData.setData(n.format,y))),n.onCopy&&(d.preventDefault(),n.onCopy(d.clipboardData))}),document.body.appendChild(h),i.selectNodeContents(h),c.addRange(i),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");u=!0}catch(d){o&&console.error("unable to copy using execCommand: ",d),o&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(n.format||"text",y),n.onCopy&&n.onCopy(window.clipboardData),u=!0}catch(_){o&&console.error("unable to copy using clipboardData: ",_),o&&console.error("falling back to prompt"),v="message"in n?n.message:"Copy to clipboard: #{key}, Enter",T=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C",e=v.replace(/#{\s*key\s*}/g,T),window.prompt(e,y)}}finally{c&&("function"==typeof c.removeRange?c.removeRange(i):c.removeAllRanges()),h&&document.body.removeChild(h),t()}return u}},function(z,l){z.exports=function(){var f=document.getSelection();if(!f.rangeCount)return function(){};for(var s=document.activeElement,m=[],y=0;y{if("eth_subscribe"===i.method){const v=this.formatError(i,"Subscriptions are not supported by this HTTP endpoint");return this.emit("error",v),h(v)}const u=new o;let d=!1;const _=(v,T)=>{if(!d)if(u.abort(),d=!0,c)c(v,T);else{const{id:O,jsonrpc:b}=i,S=v?{id:O,jsonrpc:b,error:{message:v.message,code:v.code}}:{id:O,jsonrpc:b,result:T};this.emit("payload",S),h(S)}};u.open("POST",this.url,!0),u.setRequestHeader("Content-Type","application/json"),u.timeout=6e4,u.onerror=_,u.ontimeout=_,u.onreadystatechange=()=>{if(4===u.readyState)try{const v=JSON.parse(u.responseText);_(v.error,v.result)}catch(v){_(v)}},u.send(JSON.stringify(i))})}}},function(z,l,f){"use strict";(function(s,m){var y,n=this&&this.__extends||(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,b){O.__proto__=b}||function(O,b){for(var S in b)b.hasOwnProperty(S)&&(O[S]=b[S])},function(O,b){function S(){this.constructor=O}y(O,b),O.prototype=null===b?Object.create(b):(S.prototype=b.prototype,new S)}),o=this&&this.__assign||Object.assign||function(O){for(var b,S=1,w=arguments.length;S=0)return this._url=this._parseUrl(w.headers.location),this._method="GET",this._loweredHeaders["content-type"]&&(delete this._headers[this._loweredHeaders["content-type"]],delete this._loweredHeaders["content-type"]),null!=this._headers["Content-Type"]&&delete this._headers["Content-Type"],delete this._headers["Content-Length"],this.upload._reset(),this._finalizeHeaders(),void this._sendHxxpRequest();this._response=w,this._response.on("data",function(H){return A._onHttpResponseData(w,H)}),this._response.on("end",function(){return A._onHttpResponseEnd(w)}),this._response.on("close",function(){return A._onHttpResponseClose(w)}),this.responseUrl=this._url.href.split("#")[0],this.status=w.statusCode,this.statusText=e.STATUS_CODES[this.status],this._parseResponseHeaders(w);var L=this._responseHeaders["content-length"]||"";this._totalBytes=+L,this._lengthComputable=!!L,this._setReadyState(b.HEADERS_RECEIVED)}},b.prototype._onHttpResponseData=function(S,w){this._response===S&&(this._responseParts.push(new m(w)),this._loadedBytes+=w.length,this.readyState!==b.LOADING&&this._setReadyState(b.LOADING),this._dispatchProgress("progress"))},b.prototype._onHttpResponseEnd=function(S){this._response===S&&(this._parseResponse(),this._request=null,this._response=null,this._setReadyState(b.DONE),this._dispatchProgress("load"),this._dispatchProgress("loadend"))},b.prototype._onHttpResponseClose=function(S){if(this._response===S){var w=this._request;this._setError(),w.abort(),this._setReadyState(b.DONE),this._dispatchProgress("error"),this._dispatchProgress("loadend")}},b.prototype._onHttpTimeout=function(S){this._request===S&&(this._setError(),S.abort(),this._setReadyState(b.DONE),this._dispatchProgress("timeout"),this._dispatchProgress("loadend"))},b.prototype._onHttpRequestError=function(S,w){this._request===S&&(this._setError(),S.abort(),this._setReadyState(b.DONE),this._dispatchProgress("error"),this._dispatchProgress("loadend"))},b.prototype._dispatchProgress=function(S){var w=new b.ProgressEvent(S);w.lengthComputable=this._lengthComputable,w.loaded=this._loadedBytes,w.total=this._totalBytes,this.dispatchEvent(w)},b.prototype._setError=function(){this._request=null,this._response=null,this._responseHeaders=null,this._responseParts=null},b.prototype._parseUrl=function(S,w,A){var L=null==this.nodejsBaseUrl?S:c.resolve(this.nodejsBaseUrl,S),H=c.parse(L,!1,!0);H.hash=null;var D=(H.auth||"").split(":"),q=D[0],k=D[1];return(q||k||w||A)&&(H.auth=(w||q||"")+":"+(A||k||"")),H},b.prototype._parseResponseHeaders=function(S){for(var w in this._responseHeaders={},S.headers){var A=w.toLowerCase();this._privateHeaders[A]||(this._responseHeaders[A]=S.headers[w])}null!=this._mimeOverride&&(this._responseHeaders["content-type"]=this._mimeOverride)},b.prototype._parseResponse=function(){var S=m.concat(this._responseParts);switch(this._responseParts=null,this.responseType){case"json":this.responseText=null;try{this.response=JSON.parse(S.toString("utf-8"))}catch{this.response=null}return;case"buffer":return this.responseText=null,void(this.response=S);case"arraybuffer":this.responseText=null;for(var w=new ArrayBuffer(S.length),A=new Uint8Array(w),L=0;L0?this.tail.next=o:this.head=o,this.tail=o,++this.length},y.prototype.unshift=function(n){var o={data:n,next:this.head};0===this.length&&(this.tail=o),this.head=o,++this.length},y.prototype.shift=function(){if(0!==this.length){var n=this.head.data;return this.head=1===this.length?this.tail=null:this.head.next,--this.length,n}},y.prototype.clear=function(){this.head=this.tail=null,this.length=0},y.prototype.join=function(n){if(0===this.length)return"";for(var o=this.head,e=""+o.data;o=o.next;)e+=n+o.data;return e},y.prototype.concat=function(n){if(0===this.length)return s.alloc(0);if(1===this.length)return this.head.data;for(var i=s.allocUnsafe(n>>>0),c=this.head,h=0;c;)c.data.copy(i,h),h+=c.data.length,c=c.next;return i},y}(),m&&m.inspect&&m.inspect.custom&&(z.exports.prototype[m.inspect.custom]=function(){var y=m.inspect({length:this.length});return this.constructor.name+" "+y})},function(z,l){},function(z,l,f){(function(s,m){!function(y,n){"use strict";if(!y.setImmediate){var o,e,t,i,c,h=1,u={},d=!1,_=y.document,v=Object.getPrototypeOf&&Object.getPrototypeOf(y);v=v&&v.setTimeout?v:y,"[object process]"==={}.toString.call(y.process)?o=function(b){m.nextTick(function(){O(b)})}:function(){if(y.postMessage&&!y.importScripts){var b=!0,S=y.onmessage;return y.onmessage=function(){b=!1},y.postMessage("","*"),y.onmessage=S,b}}()?(i="setImmediate$"+Math.random()+"$",c=function(b){b.source===y&&"string"==typeof b.data&&0===b.data.indexOf(i)&&O(+b.data.slice(i.length))},y.addEventListener?y.addEventListener("message",c,!1):y.attachEvent("onmessage",c),o=function(b){y.postMessage(i+b,"*")}):y.MessageChannel?((t=new MessageChannel).port1.onmessage=function(b){O(b.data)},o=function(b){t.port2.postMessage(b)}):_&&"onreadystatechange"in _.createElement("script")?(e=_.documentElement,o=function(b){var S=_.createElement("script");S.onreadystatechange=function(){O(b),S.onreadystatechange=null,e.removeChild(S),S=null},e.appendChild(S)}):o=function(b){setTimeout(O,0,b)},v.setImmediate=function(b){"function"!=typeof b&&(b=new Function(""+b));for(var S=new Array(arguments.length-1),w=0;w"u"?void 0===s?this:s:self)}).call(this,f(6),f(5))},function(z,l,f){var s=f(2),m=s.Buffer;function y(o,e){for(var t in o)e[t]=o[t]}function n(o,e,t){return m(o,e,t)}m.from&&m.alloc&&m.allocUnsafe&&m.allocUnsafeSlow?z.exports=s:(y(s,l),l.Buffer=n),y(m,n),n.from=function(o,e,t){if("number"==typeof o)throw new TypeError("Argument must not be a number");return m(o,e,t)},n.alloc=function(o,e,t){if("number"!=typeof o)throw new TypeError("Argument must be a number");var i=m(o);return void 0!==e?"string"==typeof t?i.fill(e,t):i.fill(e):i.fill(0),i},n.allocUnsafe=function(o){if("number"!=typeof o)throw new TypeError("Argument must be a number");return m(o)},n.allocUnsafeSlow=function(o){if("number"!=typeof o)throw new TypeError("Argument must be a number");return s.SlowBuffer(o)}},function(z,l,f){"use strict";z.exports=y;var s=f(109),m=Object.create(f(35));function y(n){if(!(this instanceof y))return new y(n);s.call(this,n)}m.inherits=f(3),m.inherits(y,s),y.prototype._transform=function(n,o,e){e(null,n)}},function(z,l,f){var s=f(2).Buffer;z.exports=function(m){if(m instanceof Uint8Array){if(0===m.byteOffset&&m.byteLength===m.buffer.byteLength)return m.buffer;if("function"==typeof m.buffer.slice)return m.buffer.slice(m.byteOffset,m.byteOffset+m.byteLength)}if(s.isBuffer(m)){for(var y=new Uint8Array(m.length),n=m.length,o=0;o= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,_=String.fromCharCode;function v(D){throw new RangeError(u[D])}function T(D,q){for(var k=D.length,p=[];k--;)p[k]=q(D[k]);return p}function O(D,q){var k=D.split("@"),p="";return k.length>1&&(p=k[0]+"@",D=k[1]),p+T((D=D.replace(h,".")).split("."),q).join(".")}function b(D){for(var q,k,p=[],E=0,R=D.length;E=55296&&q<=56319&&E65535&&(k+=_((q-=65536)>>>10&1023|55296),q=56320|1023&q),k+_(q)}).join("")}function w(D,q){return D+22+75*(D<26)-((0!=q)<<5)}function A(D,q,k){var p=0;for(D=k?d(D/700):D>>1,D+=d(D/q);D>455;p+=36)D=d(D/35);return d(p+36*D/(D+38))}function L(D){var q,k,p,E,R,r,a,g,M,x,C,U=[],V=D.length,I=0,W=128,F=72;for((k=D.lastIndexOf("-"))<0&&(k=0),p=0;p=128&&v("not-basic"),U.push(D.charCodeAt(p));for(E=k>0?k+1:0;E=V&&v("invalid-input"),((g=(C=D.charCodeAt(E++))-48<10?C-22:C-65<26?C-65:C-97<26?C-97:36)>=36||g>d((t-I)/r))&&v("overflow"),I+=g*r,!(g<(M=a<=F?1:a>=F+26?26:a-F));a+=36)r>d(t/(x=36-M))&&v("overflow"),r*=x;F=A(I-R,q=U.length+1,0==R),d(I/q)>t-W&&v("overflow"),W+=d(I/q),I%=q,U.splice(I++,0,W)}return S(U)}function H(D){var q,k,p,E,R,r,a,g,M,x,C,U,V,I,W,F=[];for(U=(D=b(D)).length,q=128,k=0,R=72,r=0;r=q&&Cd((t-k)/(V=p+1))&&v("overflow"),k+=(a-q)*V,q=a,r=0;rt&&v("overflow"),C==q){for(g=k,M=36;!(g<(x=M<=R?1:M>=R+26?26:M-R));M+=36)F.push(_(w(x+(W=g-x)%(I=36-x),0))),g=d(W/I);F.push(_(w(g,0))),R=A(k,V,p==E),k=0,++p}++k,++q}return F.join("")}e={version:"1.4.1",ucs2:{decode:b,encode:S},decode:L,encode:H,toASCII:function(D){return O(D,function(q){return c.test(q)?"xn--"+H(q):q})},toUnicode:function(D){return O(D,function(q){return i.test(q)?L(q.slice(4).toLowerCase()):q})}},void 0===(y=function(){return e}.call(l,f,l,s))||(s.exports=y)}()}).call(this,f(25)(z),f(6))},function(z,l,f){"use strict";z.exports={isString:function(s){return"string"==typeof s},isObject:function(s){return"object"==typeof s&&null!==s},isNull:function(s){return null===s},isNullOrUndefined:function(s){return null==s}}},function(z,l,f){"use strict";l.decode=l.parse=f(216),l.encode=l.stringify=f(217)},function(z,l,f){"use strict";function s(y,n){return Object.prototype.hasOwnProperty.call(y,n)}z.exports=function(y,n,o,e){o=o||"=";var t={};if("string"!=typeof y||0===y.length)return t;var i=/\+/g;y=y.split(n=n||"&");var c=1e3;e&&"number"==typeof e.maxKeys&&(c=e.maxKeys);var h=y.length;c>0&&h>c&&(h=c);for(var u=0;u=0?(d=O.substr(0,b),_=O.substr(b+1)):(d=O,_=""),v=decodeURIComponent(d),T=decodeURIComponent(_),s(t,v)?m(t[v])?t[v].push(T):t[v]=[t[v],T]:t[v]=T}return t};var m=Array.isArray||function(y){return"[object Array]"===Object.prototype.toString.call(y)}},function(z,l,f){"use strict";var s=function(o){switch(typeof o){case"string":return o;case"boolean":return o?"true":"false";case"number":return isFinite(o)?o:"";default:return""}};z.exports=function(o,e,t,i){return e=e||"&",t=t||"=",null===o&&(o=void 0),"object"==typeof o?y(n(o),function(c){var h=encodeURIComponent(s(c))+t;return m(o[c])?y(o[c],function(u){return h+encodeURIComponent(s(u))}).join(e):h+encodeURIComponent(s(o[c]))}).join(e):i?encodeURIComponent(s(i))+t+encodeURIComponent(s(o)):""};var m=Array.isArray||function(o){return"[object Array]"===Object.prototype.toString.call(o)};function y(o,e){if(o.map)return o.map(e);for(var t=[],i=0;i{d._getBlockByNumberWithRetry(_,(v,T)=>{if(v)return void this.emit("error",v);if(!T)return console.log(T),void this.emit("error",new Error("Could not find block"));const O={number:y.toBuffer((b=T).number),hash:y.toBuffer(b.hash),parentHash:y.toBuffer(b.parentHash),nonce:y.toBuffer(b.nonce),mixHash:y.toBuffer(b.mixHash),sha3Uncles:y.toBuffer(b.sha3Uncles),logsBloom:y.toBuffer(b.logsBloom),transactionsRoot:y.toBuffer(b.transactionsRoot),stateRoot:y.toBuffer(b.stateRoot),receiptsRoot:y.toBuffer(b.receiptRoot||b.receiptsRoot),miner:y.toBuffer(b.miner),difficulty:y.toBuffer(b.difficulty),totalDifficulty:y.toBuffer(b.totalDifficulty),size:y.toBuffer(b.size),extraData:y.toBuffer(b.extraData),gasLimit:y.toBuffer(b.gasLimit),gasUsed:y.toBuffer(b.gasUsed),timestamp:y.toBuffer(b.timestamp),transactions:b.transactions};var b;d._setCurrentBlock(O),d.emit("rawBlock",T),d.emit("latest",T)})}),d._blockTracker.on("sync",d.emit.bind(d,"sync")),d._blockTracker.on("error",d.emit.bind(d,"error")),d._running=!0,d.emit("start")},h.prototype.stop=function(){this._blockTracker.removeAllListeners(),this._running=!1,this.emit("stop")},h.prototype.isRunning=function(){return this._running},h.prototype.addProvider=function(u,d){"number"==typeof d?this._providers.splice(d,0,u):this._providers.push(u),u.setEngine(this)},h.prototype.removeProvider=function(u){const d=this._providers.indexOf(u);if(d<0)throw new Error("Provider not found.");this._providers.splice(d,1)},h.prototype.send=function(u){throw new Error("Web3ProviderEngine does not support synchronous requests.")},h.prototype.sendAsync=function(u,d){const _=this;_._ready.await(function(){Array.isArray(u)?o(u,_._handleAsync.bind(_),d):_._handleAsync(u,d)})},h.prototype._getBlockByNumberWithRetry=function(u,d){const _=this;let v=5;return void T();function T(){_._getBlockByNumber(u,O)}function O(b,S){return b?d(b):S?void d(null,S):v>0?(v--,void setTimeout(function(){T()},1e3)):void d(null,null)}},h.prototype._getBlockByNumber=function(u,d){const _=i({method:"eth_getBlockByNumber",params:[u,!1],skipCache:!0});this._handleAsync(_,(v,T)=>v?d(v):d(null,T.result))},h.prototype._handleAsync=function(u,d){var _=this,v=-1,T=null,O=null,b=[];function S(w,A){O=w,T=A,e(b,function(L,H){L?L(O,T,H):H()},function(){var L={id:u.id,jsonrpc:u.jsonrpc,result:T};null!=O?(L.error={message:O.stack||O.message||O,code:-32e3},d(O,L)):d(null,L)})}!function w(A){if(v+=1,b.unshift(A),v>=_._providers.length)S(new Error('Request for method "'+u.method+'" not handled by any subprovider. Please check your subprovider configuration to ensure this method is handled.'));else try{_._providers[v].handleRequest(u,w,S)}catch(L){S(L)}}()},h.prototype._setCurrentBlock=function(u){this.currentBlock=u,this.emit("block",u)}},function(z,l){z.exports=function(f){return f&&"object"==typeof f&&"function"==typeof f.copy&&"function"==typeof f.fill&&"function"==typeof f.readUInt8}},function(z,l){z.exports="function"==typeof Object.create?function(f,s){f.super_=s,f.prototype=Object.create(s.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}})}:function(f,s){f.super_=s;var m=function(){};m.prototype=s.prototype,f.prototype=new m,f.prototype.constructor=f}},function(z,l,f){"use strict";(function(s){Object.defineProperty(l,"__esModule",{value:!0}),l.createHashFunction=function(m){return function(y){var n=m();return n.update(y),s.from(n.digest())}}}).call(this,f(2).Buffer)},function(z,l,f){z.exports=f(229)(f(239))},function(z,l,f){const s=f(230),m=f(238);z.exports=function(y){const n=s(y),o=m(y);return function(e,t){switch("string"==typeof e?e.toLowerCase():e){case"keccak224":return new n(1152,448,null,224,t);case"keccak256":return new n(1088,512,null,256,t);case"keccak384":return new n(832,768,null,384,t);case"keccak512":return new n(576,1024,null,512,t);case"sha3-224":return new n(1152,448,6,224,t);case"sha3-256":return new n(1088,512,6,256,t);case"sha3-384":return new n(832,768,6,384,t);case"sha3-512":return new n(576,1024,6,512,t);case"shake128":return new o(1344,256,31,t);case"shake256":return new o(1088,512,31,t);default:throw new Error("Invald algorithm: "+e)}}}},function(z,l,f){(function(s){const{Transform:m}=f(111);z.exports=y=>class gt extends m{constructor(o,e,t,i,c){super(c),this._rate=o,this._capacity=e,this._delimitedSuffix=t,this._hashBitLength=i,this._options=c,this._state=new y,this._state.initialize(o,e),this._finalized=!1}_transform(o,e,t){let i=null;try{this.update(o,e)}catch(c){i=c}t(i)}_flush(o){let e=null;try{this.push(this.digest())}catch(t){e=t}o(e)}update(o,e){if(!s.isBuffer(o)&&"string"!=typeof o)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return s.isBuffer(o)||(o=s.from(o,e)),this._state.absorb(o),this}digest(o){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let e=this._state.squeeze(this._hashBitLength/8);return void 0!==o&&(e=e.toString(o)),this._resetState(),e}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const o=new gt(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(o._state),o._finalized=this._finalized,o}}}).call(this,f(2).Buffer)},function(z,l){},function(z,l,f){"use strict";function s(t,i){var c=Object.keys(t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(t);i&&(h=h.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),c.push.apply(c,h)}return c}function m(t,i,c){return i in t?Object.defineProperty(t,i,{value:c,enumerable:!0,configurable:!0,writable:!0}):t[i]=c,t}function y(t,i){for(var c=0;c0?this.tail.next=d:this.head=d,this.tail=d,++this.length}},{key:"unshift",value:function(u){var d={data:u,next:this.head};0===this.length&&(this.tail=d),this.head=d,++this.length}},{key:"shift",value:function(){if(0!==this.length){var u=this.head.data;return this.head=1===this.length?this.tail=null:this.head.next,--this.length,u}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(u){if(0===this.length)return"";for(var d=this.head,_=""+d.data;d=d.next;)_+=u+d.data;return _}},{key:"concat",value:function(u){if(0===this.length)return n.alloc(0);for(var T=n.allocUnsafe(u>>>0),O=this.head,b=0;O;)n.prototype.copy.call(O.data,T,b),b+=O.data.length,O=O.next;return T}},{key:"consume",value:function(u,d){var _;return uT.length?T.length:u;if(v+=O===T.length?T:T.slice(0,u),0==(u-=O)){O===T.length?(++_,this.head=d.next?d.next:this.tail=null):(this.head=d,d.data=T.slice(O));break}++_}return this.length-=_,v}},{key:"_getBuffer",value:function(u){var d=n.allocUnsafe(u),_=this.head,v=1;for(_.data.copy(d),u-=_.data.length;_=_.next;){var T=_.data,O=u>T.length?T.length:u;if(T.copy(d,d.length-u,0,O),0==(u-=O)){O===T.length?(++v,this.head=_.next?_.next:this.tail=null):(this.head=_,_.data=T.slice(O));break}++v}return this.length-=v,d}},{key:e,value:function(u,d){return o(this,function(_){for(var v=1;v0,function(w){_||(_=w),w&&T.forEach(t),S||(T.forEach(t),v(_))})});return u.reduce(i)}},function(z,l,f){(function(s){const{Transform:m}=f(111);z.exports=y=>class bt extends m{constructor(o,e,t,i){super(i),this._rate=o,this._capacity=e,this._delimitedSuffix=t,this._options=i,this._state=new y,this._state.initialize(o,e),this._finalized=!1}_transform(o,e,t){let i=null;try{this.update(o,e)}catch(c){i=c}t(i)}_flush(){}_read(o){this.push(this.squeeze(o))}update(o,e){if(!s.isBuffer(o)&&"string"!=typeof o)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return s.isBuffer(o)||(o=s.from(o,e)),this._state.absorb(o),this}squeeze(o,e){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let t=this._state.squeeze(o);return void 0!==e&&(t=t.toString(e)),t}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const o=new bt(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(o._state),o._finalized=this._finalized,o}}}).call(this,f(2).Buffer)},function(z,l,f){(function(s){const m=f(240);function y(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}y.prototype.initialize=function(n,o){for(let e=0;e<50;++e)this.state[e]=0;this.blockSize=n/8,this.count=0,this.squeezing=!1},y.prototype.absorb=function(n){for(let o=0;o>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(m.p1600(this.state),this.count=0);return o},y.prototype.copy=function(n){for(let o=0;o<50;++o)n.state[o]=this.state[o];n.blockSize=this.blockSize,n.count=this.count,n.squeezing=this.squeezing},z.exports=y}).call(this,f(2).Buffer)},function(z,l){const f=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];l.p1600=function(s){for(let m=0;m<24;++m){const y=s[0]^s[10]^s[20]^s[30]^s[40],n=s[1]^s[11]^s[21]^s[31]^s[41],o=s[2]^s[12]^s[22]^s[32]^s[42],e=s[3]^s[13]^s[23]^s[33]^s[43],t=s[4]^s[14]^s[24]^s[34]^s[44],i=s[5]^s[15]^s[25]^s[35]^s[45],c=s[6]^s[16]^s[26]^s[36]^s[46],h=s[7]^s[17]^s[27]^s[37]^s[47],u=s[8]^s[18]^s[28]^s[38]^s[48],d=s[9]^s[19]^s[29]^s[39]^s[49];let _=u^(o<<1|e>>>31),v=d^(e<<1|o>>>31);const T=s[0]^_,O=s[1]^v,b=s[10]^_,S=s[11]^v,w=s[20]^_,A=s[21]^v,L=s[30]^_,H=s[31]^v,D=s[40]^_,q=s[41]^v;_=y^(t<<1|i>>>31),v=n^(i<<1|t>>>31);const k=s[2]^_,p=s[3]^v,E=s[12]^_,R=s[13]^v,r=s[22]^_,a=s[23]^v,g=s[32]^_,M=s[33]^v,x=s[42]^_,C=s[43]^v;_=o^(c<<1|h>>>31),v=e^(h<<1|c>>>31);const U=s[4]^_,V=s[5]^v,I=s[14]^_,W=s[15]^v,F=s[24]^_,B=s[25]^v,N=s[34]^_,P=s[35]^v,j=s[44]^_,K=s[45]^v;_=t^(u<<1|d>>>31),v=i^(d<<1|u>>>31);const Z=s[6]^_,J=s[7]^v,X=s[16]^_,ee=s[17]^v,te=s[26]^_,oe=s[27]^v,ve=s[36]^_,ie=s[37]^v,de=s[46]^_,fe=s[47]^v;_=c^(y<<1|n>>>31),v=h^(n<<1|y>>>31);const re=s[8]^_,_e=s[9]^v,Ke=s[18]^_,pe=s[19]^v,Te=s[28]^_,Ve=s[29]^v,be=s[38]^_,Pe=s[39]^v,Ye=s[48]^_,we=s[49]^v,Be=T,$e=O,Me=S<<4|b>>>28,je=b<<4|S>>>28,Q=w<<3|A>>>29,se=A<<3|w>>>29,le=H<<9|L>>>23,Le=L<<9|H>>>23,he=D<<18|q>>>14,Oe=q<<18|D>>>14,Ge=k<<1|p>>>31,me=p<<1|k>>>31,ze=R<<12|E>>>20,rt=E<<12|R>>>20,Re=r<<10|a>>>22,He=a<<10|r>>>22,Qe=M<<13|g>>>19,xe=g<<13|M>>>19,Ne=x<<2|C>>>30,it=C<<2|x>>>30,Ee=V<<30|U>>>2,qe=U<<30|V>>>2,et=I<<6|W>>>26,ke=W<<6|I>>>26,We=B<<11|F>>>21,tt=F<<11|B>>>21,Se=N<<15|P>>>17,Fe=P<<15|N>>>17,nt=K<<29|j>>>3,Ae=j<<29|K>>>3,Ue=Z<<28|J>>>4,Y=J<<28|Z>>>4,G=ee<<23|X>>>9,$=X<<23|ee>>>9,ne=te<<25|oe>>>7,ce=oe<<25|te>>>7,ue=ve<<21|ie>>>11,Ce=ie<<21|ve>>>11,Ie=fe<<24|de>>>8,De=de<<24|fe>>>8,ye=re<<27|_e>>>5,ae=_e<<27|re>>>5,Je=Ke<<20|pe>>>12,ot=pe<<20|Ke>>>12,at=Ve<<7|Te>>>25,st=Te<<7|Ve>>>25,ut=be<<8|Pe>>>24,Ze=Pe<<8|be>>>24,ct=Ye<<14|we>>>18,Xe=we<<14|Ye>>>18;s[0]=Be^~ze&We,s[1]=$e^~rt&tt,s[10]=Ue^~Je&Q,s[11]=Y^~ot&se,s[20]=Ge^~et&ne,s[21]=me^~ke&ce,s[30]=ye^~Me&Re,s[31]=ae^~je&He,s[40]=Ee^~G&at,s[41]=qe^~$&st,s[2]=ze^~We&ue,s[3]=rt^~tt&Ce,s[12]=Je^~Q&Qe,s[13]=ot^~se&xe,s[22]=et^~ne&ut,s[23]=ke^~ce&Ze,s[32]=Me^~Re&Se,s[33]=je^~He&Fe,s[42]=G^~at&le,s[43]=$^~st&Le,s[4]=We^~ue&ct,s[5]=tt^~Ce&Xe,s[14]=Q^~Qe&nt,s[15]=se^~xe&Ae,s[24]=ne^~ut&he,s[25]=ce^~Ze&Oe,s[34]=Re^~Se&Ie,s[35]=He^~Fe&De,s[44]=at^~le&Ne,s[45]=st^~Le&it,s[6]=ue^~ct&Be,s[7]=Ce^~Xe&$e,s[16]=Qe^~nt&Ue,s[17]=xe^~Ae&Y,s[26]=ut^~he&Ge,s[27]=Ze^~Oe&me,s[36]=Se^~Ie&ye,s[37]=Fe^~De&ae,s[46]=le^~Ne&Ee,s[47]=Le^~it&qe,s[8]=ct^~Be&ze,s[9]=Xe^~$e&rt,s[18]=nt^~Ue&Je,s[19]=Ae^~Y&ot,s[28]=he^~Ge&et,s[29]=Oe^~me&ke,s[38]=Ie^~ye&Me,s[39]=De^~ae&je,s[48]=Ne^~Ee&G,s[49]=it^~qe&$,s[0]^=f[2*m],s[1]^=f[2*m+1]}}},function(z,l,f){"use strict";(function(s){var m=f(118),y=f(266),n=f(267),o=function(e){return 32===e.length&&m.privateKeyVerify(Uint8Array.from(e))};z.exports={privateKeyVerify:o,privateKeyExport:function(e,t){if(32!==e.length)throw new RangeError("private key length is invalid");var i=y.privateKeyExport(e,t);return n.privateKeyExport(e,i,t)},privateKeyImport:function(e){if(null!==(e=n.privateKeyImport(e))&&32===e.length&&o(e))return e;throw new Error("couldn't import from DER format")},privateKeyNegate:function(e){return s.from(m.privateKeyNegate(Uint8Array.from(e)))},privateKeyModInverse:function(e){if(32!==e.length)throw new Error("private key length is invalid");return s.from(y.privateKeyModInverse(Uint8Array.from(e)))},privateKeyTweakAdd:function(e,t){return s.from(m.privateKeyTweakAdd(Uint8Array.from(e),t))},privateKeyTweakMul:function(e,t){return s.from(m.privateKeyTweakMul(Uint8Array.from(e),Uint8Array.from(t)))},publicKeyCreate:function(e,t){return s.from(m.publicKeyCreate(Uint8Array.from(e),t))},publicKeyConvert:function(e,t){return s.from(m.publicKeyConvert(Uint8Array.from(e),t))},publicKeyVerify:function(e){return(33===e.length||65===e.length)&&m.publicKeyVerify(Uint8Array.from(e))},publicKeyTweakAdd:function(e,t,i){return s.from(m.publicKeyTweakAdd(Uint8Array.from(e),Uint8Array.from(t),i))},publicKeyTweakMul:function(e,t,i){return s.from(m.publicKeyTweakMul(Uint8Array.from(e),Uint8Array.from(t),i))},publicKeyCombine:function(e,t){var i=[];return e.forEach(function(c){i.push(Uint8Array.from(c))}),s.from(m.publicKeyCombine(i,t))},signatureNormalize:function(e){return s.from(m.signatureNormalize(Uint8Array.from(e)))},signatureExport:function(e){return s.from(m.signatureExport(Uint8Array.from(e)))},signatureImport:function(e){return s.from(m.signatureImport(Uint8Array.from(e)))},signatureImportLax:function(e){if(0===e.length)throw new RangeError("signature length is invalid");var t=n.signatureImportLax(e);if(null===t)throw new Error("couldn't parse DER signature");return y.signatureImport(t)},sign:function(e,t,i){if(null===i)throw new TypeError("options should be an Object");var c=void 0;if(i){if(c={},null===i.data)throw new TypeError("options.data should be a Buffer");if(i.data){if(32!==i.data.length)throw new RangeError("options.data length is invalid");c.data=new Uint8Array(i.data)}if(null===i.noncefn)throw new TypeError("options.noncefn should be a Function");i.noncefn&&(c.noncefn=function(u,d,_,v,T){var O=null!=_?s.from(_):null,b=null!=v?s.from(v):null,S=s.from("");return i.noncefn&&(S=i.noncefn(s.from(u),s.from(d),O,b,T)),Uint8Array.from(S)})}var h=m.ecdsaSign(Uint8Array.from(e),Uint8Array.from(t),c);return{signature:s.from(h.signature),recovery:h.recid}},verify:function(e,t,i){return m.ecdsaVerify(Uint8Array.from(t),Uint8Array.from(e),i)},recover:function(e,t,i,c){return s.from(m.ecdsaRecover(Uint8Array.from(t),i,Uint8Array.from(e),c))},ecdh:function(e,t){return s.from(m.ecdh(Uint8Array.from(e),Uint8Array.from(t),{}))},ecdhUnsafe:function(e,t,i){if(33!==e.length&&65!==e.length)throw new RangeError("public key length is invalid");if(32!==t.length)throw new RangeError("private key length is invalid");return s.from(y.ecdhUnsafe(Uint8Array.from(e),Uint8Array.from(t),i))}}}).call(this,f(2).Buffer)},function(z,l){const f="Impossible case. Please create issue.",s="The tweak was out of range or the resulted private key is invalid",m="The tweak was out of range or equal to zero",o="Public Key could not be parsed",e="Public Key serialization error",i="Signature could not be parsed";function d(b,S){if(!b)throw new Error(S)}function _(b,S,w){if(d(S instanceof Uint8Array,`Expected ${b} to be an Uint8Array`),void 0!==w)if(Array.isArray(w)){const A=`Expected ${b} to be an Uint8Array with length [${w.join(", ")}]`;d(w.includes(S.length),A)}else d(S.length===w,`Expected ${b} to be an Uint8Array with length ${w}`)}function v(b){d("Boolean"===O(b),"Expected compressed to be a Boolean")}function T(b=(w=>new Uint8Array(w)),S){return"function"==typeof b&&(b=b(S)),_("output",b,S),b}function O(b){return Object.prototype.toString.call(b).slice(8,-1)}z.exports=b=>({contextRandomize(S){if(1===(d(null===S||S instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),null!==S&&_("seed",S,32),b.contextRandomize(S)))throw new Error("Unknow error on context randomization")},privateKeyVerify:S=>(_("private key",S,32),0===b.privateKeyVerify(S)),privateKeyNegate(S){switch(_("private key",S,32),b.privateKeyNegate(S)){case 0:return S;case 1:throw new Error(f)}},privateKeyTweakAdd(S,w){switch(_("private key",S,32),_("tweak",w,32),b.privateKeyTweakAdd(S,w)){case 0:return S;case 1:throw new Error(s)}},privateKeyTweakMul(S,w){switch(_("private key",S,32),_("tweak",w,32),b.privateKeyTweakMul(S,w)){case 0:return S;case 1:throw new Error(m)}},publicKeyVerify:S=>(_("public key",S,[33,65]),0===b.publicKeyVerify(S)),publicKeyCreate(S,w=!0,A){switch(_("private key",S,32),v(w),A=T(A,w?33:65),b.publicKeyCreate(A,S)){case 0:return A;case 1:throw new Error("Private Key is invalid");case 2:throw new Error(e)}},publicKeyConvert(S,w=!0,A){switch(_("public key",S,[33,65]),v(w),A=T(A,w?33:65),b.publicKeyConvert(A,S)){case 0:return A;case 1:throw new Error(o);case 2:throw new Error(e)}},publicKeyNegate(S,w=!0,A){switch(_("public key",S,[33,65]),v(w),A=T(A,w?33:65),b.publicKeyNegate(A,S)){case 0:return A;case 1:throw new Error(o);case 2:throw new Error(f);case 3:throw new Error(e)}},publicKeyCombine(S,w=!0,A){d(Array.isArray(S),"Expected public keys to be an Array"),d(S.length>0,"Expected public keys array will have more than zero items");for(const L of S)_("public key",L,[33,65]);switch(v(w),A=T(A,w?33:65),b.publicKeyCombine(A,S)){case 0:return A;case 1:throw new Error(o);case 2:throw new Error("The sum of the public keys is not valid");case 3:throw new Error(e)}},publicKeyTweakAdd(S,w,A=!0,L){switch(_("public key",S,[33,65]),_("tweak",w,32),v(A),L=T(L,A?33:65),b.publicKeyTweakAdd(L,S,w)){case 0:return L;case 1:throw new Error(o);case 2:throw new Error(s)}},publicKeyTweakMul(S,w,A=!0,L){switch(_("public key",S,[33,65]),_("tweak",w,32),v(A),L=T(L,A?33:65),b.publicKeyTweakMul(L,S,w)){case 0:return L;case 1:throw new Error(o);case 2:throw new Error(m)}},signatureNormalize(S){switch(_("signature",S,64),b.signatureNormalize(S)){case 0:return S;case 1:throw new Error(i)}},signatureExport(S,w){_("signature",S,64);const A={output:w=T(w,72),outputlen:72};switch(b.signatureExport(A,S)){case 0:return w.slice(0,A.outputlen);case 1:throw new Error(i);case 2:throw new Error(f)}},signatureImport(S,w){switch(_("signature",S),w=T(w,64),b.signatureImport(w,S)){case 0:return w;case 1:throw new Error(i);case 2:throw new Error(f)}},ecdsaSign(S,w,A={},L){_("message",S,32),_("private key",w,32),d("Object"===O(A),"Expected options to be an Object"),void 0!==A.data&&_("options.data",A.data),void 0!==A.noncefn&&d("Function"===O(A.noncefn),"Expected options.noncefn to be a Function");const H={signature:L=T(L,64),recid:null};switch(b.ecdsaSign(H,S,w,A.data,A.noncefn)){case 0:return H;case 1:throw new Error("The nonce generation function failed, or the private key was invalid");case 2:throw new Error(f)}},ecdsaVerify(S,w,A){switch(_("signature",S,64),_("message",w,32),_("public key",A,[33,65]),b.ecdsaVerify(S,w,A)){case 0:return!0;case 3:return!1;case 1:throw new Error(i);case 2:throw new Error(o)}},ecdsaRecover(S,w,A,L=!0,H){switch(_("signature",S,64),d("Number"===O(w)&&w>=0&&w<=3,"Expected recovery id to be a Number within interval [0, 3]"),_("message",A,32),v(L),H=T(H,L?33:65),b.ecdsaRecover(H,S,w,A)){case 0:return H;case 1:throw new Error(i);case 2:throw new Error("Public key could not be recover");case 3:throw new Error(f)}},ecdh(S,w,A={},L){switch(_("public key",S,[33,65]),_("private key",w,32),d("Object"===O(A),"Expected options to be an Object"),void 0!==A.data&&_("options.data",A.data),void 0!==A.hashfn?(d("Function"===O(A.hashfn),"Expected options.hashfn to be a Function"),void 0!==A.xbuf&&_("options.xbuf",A.xbuf,32),void 0!==A.ybuf&&_("options.ybuf",A.ybuf,32),_("output",L)):L=T(L,32),b.ecdh(L,S,w,A.data,A.hashfn,A.xbuf,A.ybuf)){case 0:return L;case 1:throw new Error(o);case 2:throw new Error("Scalar was invalid (zero or overflow)")}}})},function(z,l,f){const s=new(f(58).ec)("secp256k1"),m=s.curve,y=m.n.constructor;function n(e){const t=e[0];switch(t){case 2:case 3:return 33!==e.length?null:function(i,c){let h=new y(c);if(h.cmp(m.p)>=0)return null;h=h.toRed(m.red);let u=h.redSqr().redIMul(h).redIAdd(m.b).redSqrt();return 3===i!==u.isOdd()&&(u=u.redNeg()),s.keyPair({pub:{x:h,y:u}})}(t,e.subarray(1,33));case 4:case 6:case 7:return 65!==e.length?null:function(i,c,h){let u=new y(c),d=new y(h);if(u.cmp(m.p)>=0||d.cmp(m.p)>=0||(u=u.toRed(m.red),d=d.toRed(m.red),(6===i||7===i)&&d.isOdd()!==(7===i)))return null;const _=u.redSqr().redIMul(u);return d.redSqr().redISub(_.redIAdd(m.b)).isZero()?s.keyPair({pub:{x:u,y:d}}):null}(t,e.subarray(1,33),e.subarray(33,65));default:return null}}function o(e,t){const i=t.encode(null,33===e.length);for(let c=0;c0,privateKeyVerify(e){const t=new y(e);return t.cmp(m.n)<0&&!t.isZero()?0:1},privateKeyNegate(e){const t=new y(e),i=m.n.sub(t).umod(m.n).toArrayLike(Uint8Array,"be",32);return e.set(i),0},privateKeyTweakAdd(e,t){const i=new y(t);if(i.cmp(m.n)>=0||(i.iadd(new y(e)),i.cmp(m.n)>=0&&i.isub(m.n),i.isZero()))return 1;const c=i.toArrayLike(Uint8Array,"be",32);return e.set(c),0},privateKeyTweakMul(e,t){let i=new y(t);if(i.cmp(m.n)>=0||i.isZero())return 1;i.imul(new y(e)),i.cmp(m.n)>=0&&(i=i.umod(m.n));const c=i.toArrayLike(Uint8Array,"be",32);return e.set(c),0},publicKeyVerify:e=>null===n(e)?1:0,publicKeyCreate(e,t){const i=new y(t);return i.cmp(m.n)>=0||i.isZero()?1:(o(e,s.keyFromPrivate(t).getPublic()),0)},publicKeyConvert(e,t){const i=n(t);return null===i?1:(o(e,i.getPublic()),0)},publicKeyNegate(e,t){const i=n(t);if(null===i)return 1;const c=i.getPublic();return c.y=c.y.redNeg(),o(e,c),0},publicKeyCombine(e,t){const i=new Array(t.length);for(let h=0;h=0)return 2;const h=c.getPublic().add(m.g.mul(i));return h.isInfinity()?2:(o(e,h),0)},publicKeyTweakMul(e,t,i){const c=n(t);return null===c?1:(i=new y(i)).cmp(m.n)>=0||i.isZero()?2:(o(e,c.getPublic().mul(i)),0)},signatureNormalize(e){const t=new y(e.subarray(0,32)),i=new y(e.subarray(32,64));return t.cmp(m.n)>=0||i.cmp(m.n)>=0?1:(1===i.cmp(s.nh)&&e.set(m.n.sub(i).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport(e,t){const i=t.subarray(0,32),c=t.subarray(32,64);if(new y(i).cmp(m.n)>=0||new y(c).cmp(m.n)>=0)return 1;const{output:h}=e;let u=h.subarray(4,37);u[0]=0,u.set(i,1);let d=33,_=0;for(;d>1&&0===u[_]&&!(128&u[_+1]);--d,++_);if(u=u.subarray(_),128&u[0]||d>1&&0===u[0]&&!(128&u[1]))return 1;let v=h.subarray(39,72);v[0]=0,v.set(c,1);let T=33,O=0;for(;T>1&&0===v[O]&&!(128&v[O+1]);--T,++O);return v=v.subarray(O),128&v[0]||T>1&&0===v[0]&&!(128&v[1])?1:(e.outputlen=6+d+T,h[0]=48,h[1]=e.outputlen-2,h[2]=2,h[3]=u.length,h.set(u,4),h[4+d]=2,h[5+d]=v.length,h.set(v,6+d),0)},signatureImport(e,t){if(t.length<8||t.length>72||48!==t[0]||t[1]!==t.length-2||2!==t[2])return 1;const i=t[3];if(0===i||5+i>=t.length||2!==t[4+i])return 1;const c=t[5+i];if(0===c||6+i+c!==t.length||128&t[4]||i>1&&0===t[4]&&!(128&t[5])||128&t[i+6]||c>1&&0===t[i+6]&&!(128&t[i+7]))return 1;let h=t.subarray(4,4+i);if(33===h.length&&0===h[0]&&(h=h.subarray(1)),h.length>32)return 1;let u=t.subarray(6+i);if(33===u.length&&0===u[0]&&(u=u.slice(1)),u.length>32)throw new Error("S length is too long");let d=new y(h);d.cmp(m.n)>=0&&(d=new y(0));let _=new y(t.subarray(6+i));return _.cmp(m.n)>=0&&(_=new y(0)),e.set(d.toArrayLike(Uint8Array,"be",32),0),e.set(_.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign(e,t,i,c,h){if(h){const _=h;h=v=>{const T=_(t,i,null,c,v);if(!(T instanceof Uint8Array&&32===T.length))throw new Error("This is the way");return new y(T)}}const u=new y(i);if(u.cmp(m.n)>=0||u.isZero())return 1;let d;try{d=s.sign(t,i,{canonical:!0,k:h,pers:c})}catch{return 1}return e.signature.set(d.r.toArrayLike(Uint8Array,"be",32),0),e.signature.set(d.s.toArrayLike(Uint8Array,"be",32),32),e.recid=d.recoveryParam,0},ecdsaVerify(e,t,i){const c={r:e.subarray(0,32),s:e.subarray(32,64)},h=new y(c.r),u=new y(c.s);if(h.cmp(m.n)>=0||u.cmp(m.n)>=0)return 1;if(1===u.cmp(s.nh)||h.isZero()||u.isZero())return 3;const d=n(i);if(null===d)return 2;const _=d.getPublic();return s.verify(t,c,_)?0:3},ecdsaRecover(e,t,i,c){const h={r:t.slice(0,32),s:t.slice(32,64)},u=new y(h.r),d=new y(h.s);if(u.cmp(m.n)>=0||d.cmp(m.n)>=0)return 1;if(u.isZero()||d.isZero())return 2;let _;try{_=s.recoverPubKey(c,h,i)}catch{return 2}return o(e,_),0},ecdh(e,t,i,c,h,u,d){const _=n(t);if(null===_)return 1;const v=new y(i);if(v.cmp(m.n)>=0||v.isZero())return 2;const T=_.getPublic().mul(v);if(void 0===h){const O=T.encode(null,!0),b=s.hash().update(O).digest();for(let S=0;S<32;++S)e[S]=b[S]}else{u||(u=new Uint8Array(32));const O=T.getX().toArray("be",32);for(let w=0;w<32;++w)u[w]=O[w];d||(d=new Uint8Array(32));const b=T.getY().toArray("be",32);for(let w=0;w<32;++w)d[w]=b[w];const S=h(u,d,c);if(!(S instanceof Uint8Array&&S.length===e.length))return 2;e.set(S)}return 0}}},function(z){z.exports=JSON.parse('{"name":"elliptic","version":"6.5.4","description":"EC cryptography","main":"lib/elliptic.js","files":["lib"],"scripts":{"lint":"eslint lib test","lint:fix":"npm run lint -- --fix","unit":"istanbul test _mocha --reporter=spec test/index.js","test":"npm run lint && npm run unit","version":"grunt dist && git add dist/"},"repository":{"type":"git","url":"git@github.com:indutny/elliptic"},"keywords":["EC","Elliptic","curve","Cryptography"],"author":"Fedor Indutny ","license":"MIT","bugs":{"url":"https://github.com/indutny/elliptic/issues"},"homepage":"https://github.com/indutny/elliptic","devDependencies":{"brfs":"^2.0.2","coveralls":"^3.1.0","eslint":"^7.6.0","grunt":"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1","istanbul":"^0.4.5","mocha":"^8.0.1"},"dependencies":{"bn.js":"^4.11.9","brorand":"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1","inherits":"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}')},function(z,l){},function(z,l){},function(z,l,f){"use strict";var s=f(11),m=f(16),y=f(3),n=f(45),o=s.assert;function e(c){n.call(this,"short",c),this.a=new m(c.a,16).toRed(this.red),this.b=new m(c.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(c),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function t(c,h,u,d){n.BasePoint.call(this,c,"affine"),null===h&&null===u?(this.x=null,this.y=null,this.inf=!0):(this.x=new m(h,16),this.y=new m(u,16),d&&(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 i(c,h,u,d){n.BasePoint.call(this,c,"jacobian"),null===h&&null===u&&null===d?(this.x=this.curve.one,this.y=this.curve.one,this.z=new m(0)):(this.x=new m(h,16),this.y=new m(u,16),this.z=new m(d,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}y(e,n),z.exports=e,e.prototype._getEndomorphism=function(c){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var h,u;if(c.beta)h=new m(c.beta,16).toRed(this.red);else{var d=this._getEndoRoots(this.p);h=(h=d[0].cmp(d[1])<0?d[0]:d[1]).toRed(this.red)}if(c.lambda)u=new m(c.lambda,16);else{var _=this._getEndoRoots(this.n);0===this.g.mul(_[0]).x.cmp(this.g.x.redMul(h))?u=_[0]:o(0===this.g.mul(u=_[1]).x.cmp(this.g.x.redMul(h)))}return{beta:h,lambda:u,basis:c.basis?c.basis.map(function(v){return{a:new m(v.a,16),b:new m(v.b,16)}}):this._getEndoBasis(u)}}},e.prototype._getEndoRoots=function(c){var h=c===this.p?this.red:m.mont(c),u=new m(2).toRed(h).redInvm(),d=u.redNeg(),_=new m(3).toRed(h).redNeg().redSqrt().redMul(u);return[d.redAdd(_).fromRed(),d.redSub(_).fromRed()]},e.prototype._getEndoBasis=function(c){for(var h,u,d,_,v,T,O,b,S,w=this.n.ushrn(Math.floor(this.n.bitLength()/2)),A=c,L=this.n.clone(),H=new m(1),D=new m(0),q=new m(0),k=new m(1),p=0;0!==A.cmpn(0);){var E=L.div(A);b=L.sub(E.mul(A)),S=q.sub(E.mul(H));var R=k.sub(E.mul(D));if(!d&&b.cmp(w)<0)h=O.neg(),u=H,d=b.neg(),_=S;else if(d&&2==++p)break;O=b,L=A,A=b,q=H,H=S,k=D,D=R}v=b.neg(),T=S;var r=d.sqr().add(_.sqr());return v.sqr().add(T.sqr()).cmp(r)>=0&&(v=h,T=u),d.negative&&(d=d.neg(),_=_.neg()),v.negative&&(v=v.neg(),T=T.neg()),[{a:d,b:_},{a:v,b:T}]},e.prototype._endoSplit=function(c){var h=this.endo.basis,u=h[0],d=h[1],_=d.b.mul(c).divRound(this.n),v=u.b.neg().mul(c).divRound(this.n),T=_.mul(u.a),O=v.mul(d.a),b=_.mul(u.b),S=v.mul(d.b);return{k1:c.sub(T).sub(O),k2:b.add(S).neg()}},e.prototype.pointFromX=function(c,h){(c=new m(c,16)).red||(c=c.toRed(this.red));var u=c.redSqr().redMul(c).redIAdd(c.redMul(this.a)).redIAdd(this.b),d=u.redSqrt();if(0!==d.redSqr().redSub(u).cmp(this.zero))throw new Error("invalid point");var _=d.fromRed().isOdd();return(h&&!_||!h&&_)&&(d=d.redNeg()),this.point(c,d)},e.prototype.validate=function(c){if(c.inf)return!0;var h=c.x,u=c.y,d=this.a.redMul(h),_=h.redSqr().redMul(h).redIAdd(d).redIAdd(this.b);return 0===u.redSqr().redISub(_).cmpn(0)},e.prototype._endoWnafMulAdd=function(c,h,u){for(var d=this._endoWnafT1,_=this._endoWnafT2,v=0;v":""},t.prototype.isInfinity=function(){return this.inf},t.prototype.add=function(c){if(this.inf)return c;if(c.inf)return this;if(this.eq(c))return this.dbl();if(this.neg().eq(c))return this.curve.point(null,null);if(0===this.x.cmp(c.x))return this.curve.point(null,null);var h=this.y.redSub(c.y);0!==h.cmpn(0)&&(h=h.redMul(this.x.redSub(c.x).redInvm()));var u=h.redSqr().redISub(this.x).redISub(c.x),d=h.redMul(this.x.redSub(u)).redISub(this.y);return this.curve.point(u,d)},t.prototype.dbl=function(){if(this.inf)return this;var c=this.y.redAdd(this.y);if(0===c.cmpn(0))return this.curve.point(null,null);var h=this.curve.a,u=this.x.redSqr(),d=c.redInvm(),_=u.redAdd(u).redIAdd(u).redIAdd(h).redMul(d),v=_.redSqr().redISub(this.x.redAdd(this.x)),T=_.redMul(this.x.redSub(v)).redISub(this.y);return this.curve.point(v,T)},t.prototype.getX=function(){return this.x.fromRed()},t.prototype.getY=function(){return this.y.fromRed()},t.prototype.mul=function(c){return c=new m(c,16),this.isInfinity()?this:this._hasDoubles(c)?this.curve._fixedNafMul(this,c):this.curve.endo?this.curve._endoWnafMulAdd([this],[c]):this.curve._wnafMul(this,c)},t.prototype.mulAdd=function(c,h,u){var d=[this,h],_=[c,u];return this.curve.endo?this.curve._endoWnafMulAdd(d,_):this.curve._wnafMulAdd(1,d,_,2)},t.prototype.jmulAdd=function(c,h,u){var d=[this,h],_=[c,u];return this.curve.endo?this.curve._endoWnafMulAdd(d,_,!0):this.curve._wnafMulAdd(1,d,_,2,!0)},t.prototype.eq=function(c){return this===c||this.inf===c.inf&&(this.inf||0===this.x.cmp(c.x)&&0===this.y.cmp(c.y))},t.prototype.neg=function(c){if(this.inf)return this;var h=this.curve.point(this.x,this.y.redNeg());if(c&&this.precomputed){var u=this.precomputed,d=function(_){return _.neg()};h.precomputed={naf:u.naf&&{wnd:u.naf.wnd,points:u.naf.points.map(d)},doubles:u.doubles&&{step:u.doubles.step,points:u.doubles.points.map(d)}}}return h},t.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},y(i,n.BasePoint),e.prototype.jpoint=function(c,h,u){return new i(this,c,h,u)},i.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var c=this.z.redInvm(),h=c.redSqr(),u=this.x.redMul(h),d=this.y.redMul(h).redMul(c);return this.curve.point(u,d)},i.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},i.prototype.add=function(c){if(this.isInfinity())return c;if(c.isInfinity())return this;var h=c.z.redSqr(),u=this.z.redSqr(),d=this.x.redMul(h),_=c.x.redMul(u),v=this.y.redMul(h.redMul(c.z)),T=c.y.redMul(u.redMul(this.z)),O=d.redSub(_),b=v.redSub(T);if(0===O.cmpn(0))return 0!==b.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var S=O.redSqr(),w=S.redMul(O),A=d.redMul(S),L=b.redSqr().redIAdd(w).redISub(A).redISub(A),H=b.redMul(A.redISub(L)).redISub(v.redMul(w)),D=this.z.redMul(c.z).redMul(O);return this.curve.jpoint(L,H,D)},i.prototype.mixedAdd=function(c){if(this.isInfinity())return c.toJ();if(c.isInfinity())return this;var h=this.z.redSqr(),u=this.x,d=c.x.redMul(h),_=this.y,v=c.y.redMul(h).redMul(this.z),T=u.redSub(d),O=_.redSub(v);if(0===T.cmpn(0))return 0!==O.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var b=T.redSqr(),S=b.redMul(T),w=u.redMul(b),A=O.redSqr().redIAdd(S).redISub(w).redISub(w),L=O.redMul(w.redISub(A)).redISub(_.redMul(S)),H=this.z.redMul(T);return this.curve.jpoint(A,L,H)},i.prototype.dblp=function(c){if(0===c)return this;if(this.isInfinity())return this;if(!c)return this.dbl();var h;if(this.curve.zeroA||this.curve.threeA){var u=this;for(h=0;h=0)return!1;if(u.redIAdd(_),0===this.x.cmp(u))return!0}},i.prototype.inspect=function(){return this.isInfinity()?"":""},i.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(z,l,f){"use strict";var s=f(16),m=f(3),y=f(45),n=f(11);function o(t){y.call(this,"mont",t),this.a=new s(t.a,16).toRed(this.red),this.b=new s(t.b,16).toRed(this.red),this.i4=new s(4).toRed(this.red).redInvm(),this.two=new s(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function e(t,i,c){y.BasePoint.call(this,t,"projective"),null===i&&null===c?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new s(i,16),this.z=new s(c,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}m(o,y),z.exports=o,o.prototype.validate=function(t){var i=t.normalize().x,c=i.redSqr(),h=c.redMul(i).redAdd(c.redMul(this.a)).redAdd(i);return 0===h.redSqrt().redSqr().cmp(h)},m(e,y.BasePoint),o.prototype.decodePoint=function(t,i){return this.point(n.toArray(t,i),1)},o.prototype.point=function(t,i){return new e(this,t,i)},o.prototype.pointFromJSON=function(t){return e.fromJSON(this,t)},e.prototype.precompute=function(){},e.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},e.fromJSON=function(t,i){return new e(t,i[0],i[1]||t.one)},e.prototype.inspect=function(){return this.isInfinity()?"":""},e.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},e.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),i=this.x.redSub(this.z).redSqr(),c=t.redSub(i),h=t.redMul(i),u=c.redMul(i.redAdd(this.curve.a24.redMul(c)));return this.curve.point(h,u)},e.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},e.prototype.diffAdd=function(t,i){var c=this.x.redAdd(this.z),h=this.x.redSub(this.z),u=t.x.redAdd(t.z),d=t.x.redSub(t.z).redMul(c),_=u.redMul(h),v=i.z.redMul(d.redAdd(_).redSqr()),T=i.x.redMul(d.redISub(_).redSqr());return this.curve.point(v,T)},e.prototype.mul=function(t){for(var i=t.clone(),c=this,h=this.curve.point(null,null),u=[];0!==i.cmpn(0);i.iushrn(1))u.push(i.andln(1));for(var d=u.length-1;d>=0;d--)0===u[d]?(c=c.diffAdd(h,this),h=h.dbl()):(h=c.diffAdd(h,this),c=c.dbl());return h},e.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},e.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},e.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},e.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},e.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(z,l,f){"use strict";var s=f(11),m=f(16),y=f(3),n=f(45),o=s.assert;function e(i){this.twisted=1!=(0|i.a),this.mOneA=this.twisted&&-1==(0|i.a),this.extended=this.mOneA,n.call(this,"edwards",i),this.a=new m(i.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new m(i.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new m(i.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),o(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|i.c)}function t(i,c,h,u,d){n.BasePoint.call(this,i,"projective"),null===c&&null===h&&null===u?(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 m(c,16),this.y=new m(h,16),this.z=u?new m(u,16):this.curve.one,this.t=d&&new m(d,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()))))}y(e,n),z.exports=e,e.prototype._mulA=function(i){return this.mOneA?i.redNeg():this.a.redMul(i)},e.prototype._mulC=function(i){return this.oneC?i:this.c.redMul(i)},e.prototype.jpoint=function(i,c,h,u){return this.point(i,c,h,u)},e.prototype.pointFromX=function(i,c){(i=new m(i,16)).red||(i=i.toRed(this.red));var h=i.redSqr(),u=this.c2.redSub(this.a.redMul(h)),d=this.one.redSub(this.c2.redMul(this.d).redMul(h)),_=u.redMul(d.redInvm()),v=_.redSqrt();if(0!==v.redSqr().redSub(_).cmp(this.zero))throw new Error("invalid point");var T=v.fromRed().isOdd();return(c&&!T||!c&&T)&&(v=v.redNeg()),this.point(i,v)},e.prototype.pointFromY=function(i,c){(i=new m(i,16)).red||(i=i.toRed(this.red));var h=i.redSqr(),u=h.redSub(this.c2),d=h.redMul(this.d).redMul(this.c2).redSub(this.a),_=u.redMul(d.redInvm());if(0===_.cmp(this.zero)){if(c)throw new Error("invalid point");return this.point(this.zero,i)}var v=_.redSqrt();if(0!==v.redSqr().redSub(_).cmp(this.zero))throw new Error("invalid point");return v.fromRed().isOdd()!==c&&(v=v.redNeg()),this.point(v,i)},e.prototype.validate=function(i){if(i.isInfinity())return!0;i.normalize();var c=i.x.redSqr(),h=i.y.redSqr(),u=c.redMul(this.a).redAdd(h),d=this.c2.redMul(this.one.redAdd(this.d.redMul(c).redMul(h)));return 0===u.cmp(d)},y(t,n.BasePoint),e.prototype.pointFromJSON=function(i){return t.fromJSON(this,i)},e.prototype.point=function(i,c,h,u){return new t(this,i,c,h,u)},t.fromJSON=function(i,c){return new t(i,c[0],c[1],c[2])},t.prototype.inspect=function(){return this.isInfinity()?"":""},t.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},t.prototype._extDbl=function(){var i=this.x.redSqr(),c=this.y.redSqr(),h=this.z.redSqr();h=h.redIAdd(h);var u=this.curve._mulA(i),d=this.x.redAdd(this.y).redSqr().redISub(i).redISub(c),_=u.redAdd(c),v=_.redSub(h),T=u.redSub(c),O=d.redMul(v),b=_.redMul(T),S=d.redMul(T),w=v.redMul(_);return this.curve.point(O,b,w,S)},t.prototype._projDbl=function(){var i,c,h,u,d,_,v=this.x.redAdd(this.y).redSqr(),T=this.x.redSqr(),O=this.y.redSqr();if(this.curve.twisted){var b=(u=this.curve._mulA(T)).redAdd(O);this.zOne?(i=v.redSub(T).redSub(O).redMul(b.redSub(this.curve.two)),c=b.redMul(u.redSub(O)),h=b.redSqr().redSub(b).redSub(b)):(d=this.z.redSqr(),_=b.redSub(d).redISub(d),i=v.redSub(T).redISub(O).redMul(_),c=b.redMul(u.redSub(O)),h=b.redMul(_))}else u=T.redAdd(O),d=this.curve._mulC(this.z).redSqr(),_=u.redSub(d).redSub(d),i=this.curve._mulC(v.redISub(u)).redMul(_),c=this.curve._mulC(u).redMul(T.redISub(O)),h=u.redMul(_);return this.curve.point(i,c,h)},t.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},t.prototype._extAdd=function(i){var c=this.y.redSub(this.x).redMul(i.y.redSub(i.x)),h=this.y.redAdd(this.x).redMul(i.y.redAdd(i.x)),u=this.t.redMul(this.curve.dd).redMul(i.t),d=this.z.redMul(i.z.redAdd(i.z)),_=h.redSub(c),v=d.redSub(u),T=d.redAdd(u),O=h.redAdd(c),b=_.redMul(v),S=T.redMul(O),w=_.redMul(O),A=v.redMul(T);return this.curve.point(b,S,A,w)},t.prototype._projAdd=function(i){var c,h,u=this.z.redMul(i.z),d=u.redSqr(),_=this.x.redMul(i.x),v=this.y.redMul(i.y),T=this.curve.d.redMul(_).redMul(v),O=d.redSub(T),b=d.redAdd(T),S=this.x.redAdd(this.y).redMul(i.x.redAdd(i.y)).redISub(_).redISub(v),w=u.redMul(O).redMul(S);return this.curve.twisted?(c=u.redMul(b).redMul(v.redSub(this.curve._mulA(_))),h=O.redMul(b)):(c=u.redMul(b).redMul(v.redSub(_)),h=this.curve._mulC(O).redMul(b)),this.curve.point(w,c,h)},t.prototype.add=function(i){return this.isInfinity()?i:i.isInfinity()?this:this.curve.extended?this._extAdd(i):this._projAdd(i)},t.prototype.mul=function(i){return this._hasDoubles(i)?this.curve._fixedNafMul(this,i):this.curve._wnafMul(this,i)},t.prototype.mulAdd=function(i,c,h){return this.curve._wnafMulAdd(1,[this,c],[i,h],2,!1)},t.prototype.jmulAdd=function(i,c,h){return this.curve._wnafMulAdd(1,[this,c],[i,h],2,!0)},t.prototype.normalize=function(){if(this.zOne)return this;var i=this.z.redInvm();return this.x=this.x.redMul(i),this.y=this.y.redMul(i),this.t&&(this.t=this.t.redMul(i)),this.z=this.curve.one,this.zOne=!0,this},t.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},t.prototype.getX=function(){return this.normalize(),this.x.fromRed()},t.prototype.getY=function(){return this.normalize(),this.y.fromRed()},t.prototype.eq=function(i){return this===i||0===this.getX().cmp(i.getX())&&0===this.getY().cmp(i.getY())},t.prototype.eqXToP=function(i){var c=i.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(c))return!0;for(var h=i.clone(),u=this.curve.redN.redMul(this.z);;){if(h.iadd(this.curve.n),h.cmp(this.curve.p)>=0)return!1;if(c.redIAdd(u),0===this.x.cmp(c))return!0}},t.prototype.toP=t.prototype.normalize,t.prototype.mixedAdd=t.prototype.add},function(z,l,f){"use strict";l.sha1=f(251),l.sha224=f(252),l.sha256=f(124),l.sha384=f(253),l.sha512=f(125)},function(z,l,f){"use strict";var s=f(15),m=f(37),y=f(123),n=s.rotl32,o=s.sum32,e=s.sum32_5,t=y.ft_1,i=m.BlockHash,c=[1518500249,1859775393,2400959708,3395469782];function h(){if(!(this instanceof h))return new h;i.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}s.inherits(h,i),z.exports=h,h.blockSize=512,h.outSize=160,h.hmacStrength=80,h.padLength=64,h.prototype._update=function(u,d){for(var _=this.W,v=0;v<16;v++)_[v]=u[d+v];for(;v<_.length;v++)_[v]=n(_[v-3]^_[v-8]^_[v-14]^_[v-16],1);var T=this.h[0],O=this.h[1],b=this.h[2],S=this.h[3],w=this.h[4];for(v=0;v<_.length;v++){var A=~~(v/20),L=e(n(T,5),t(A,O,b,S),w,_[v],c[A]);w=S,S=b,b=n(O,30),O=T,T=L}this.h[0]=o(this.h[0],T),this.h[1]=o(this.h[1],O),this.h[2]=o(this.h[2],b),this.h[3]=o(this.h[3],S),this.h[4]=o(this.h[4],w)},h.prototype._digest=function(u){return"hex"===u?s.toHex32(this.h,"big"):s.split32(this.h,"big")}},function(z,l,f){"use strict";var s=f(15),m=f(124);function y(){if(!(this instanceof y))return new y;m.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}s.inherits(y,m),z.exports=y,y.blockSize=512,y.outSize=224,y.hmacStrength=192,y.padLength=64,y.prototype._digest=function(n){return"hex"===n?s.toHex32(this.h.slice(0,7),"big"):s.split32(this.h.slice(0,7),"big")}},function(z,l,f){"use strict";var s=f(15),m=f(125);function y(){if(!(this instanceof y))return new y;m.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}s.inherits(y,m),z.exports=y,y.blockSize=1024,y.outSize=384,y.hmacStrength=192,y.padLength=128,y.prototype._digest=function(n){return"hex"===n?s.toHex32(this.h.slice(0,12),"big"):s.split32(this.h.slice(0,12),"big")}},function(z,l,f){"use strict";var s=f(15),m=f(37),y=s.rotl32,n=s.sum32,o=s.sum32_3,e=s.sum32_4,t=m.BlockHash;function i(){if(!(this instanceof i))return new i;t.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function c(O,b,S,w){return O<=15?b^S^w:O<=31?b&S|~b&w:O<=47?(b|~S)^w:O<=63?b&w|S&~w:b^(S|~w)}function h(O){return O<=15?0:O<=31?1518500249:O<=47?1859775393:O<=63?2400959708:2840853838}function u(O){return O<=15?1352829926:O<=31?1548603684:O<=47?1836072691:O<=63?2053994217:0}s.inherits(i,t),l.ripemd160=i,i.blockSize=512,i.outSize=160,i.hmacStrength=192,i.padLength=64,i.prototype._update=function(O,b){for(var S=this.h[0],w=this.h[1],A=this.h[2],L=this.h[3],H=this.h[4],D=S,q=w,k=A,p=L,E=H,R=0;R<80;R++){var r=n(y(e(S,c(R,w,A,L),O[d[R]+b],h(R)),v[R]),H);S=H,H=L,L=y(A,10),A=w,w=r,r=n(y(e(D,c(79-R,q,k,p),O[_[R]+b],u(R)),T[R]),E),D=E,E=p,p=y(k,10),k=q,q=r}r=o(this.h[1],A,p),this.h[1]=o(this.h[2],L,E),this.h[2]=o(this.h[3],H,D),this.h[3]=o(this.h[4],S,q),this.h[4]=o(this.h[0],w,k),this.h[0]=r},i.prototype._digest=function(O){return"hex"===O?s.toHex32(this.h,"little"):s.split32(this.h,"little")};var d=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],_=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],v=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],T=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},function(z,l,f){"use strict";var s=f(15),m=f(22);function y(n,o,e){if(!(this instanceof y))return new y(n,o,e);this.Hash=n,this.blockSize=n.blockSize/8,this.outSize=n.outSize/8,this.inner=null,this.outer=null,this._init(s.toArray(o,e))}z.exports=y,y.prototype._init=function(n){n.length>this.blockSize&&(n=(new this.Hash).update(n).digest()),m(n.length<=this.blockSize);for(var o=n.length;o0))return v.iaddn(1),this.keyFromPrivate(v)}},c.prototype._truncateToN=function(h,u){var d=8*h.byteLength()-this.n.bitLength();return d>0&&(h=h.ushrn(d)),!u&&h.cmp(this.n)>=0?h.sub(this.n):h},c.prototype.sign=function(h,u,d,_){"object"==typeof d&&(_=d,d=null),_||(_={}),u=this.keyFromPrivate(u,d),h=this._truncateToN(new s(h,16));for(var v=this.n.byteLength(),T=u.getPrivate().toArray("be",v),O=h.toArray("be",v),b=new m({hash:this.hash,entropy:T,nonce:O,pers:_.pers,persEnc:_.persEnc||"utf8"}),S=this.n.sub(new s(1)),w=0;;w++){var A=_.k?_.k(w):new s(b.generate(this.n.byteLength()));if(!((A=this._truncateToN(A,!0)).cmpn(1)<=0||A.cmp(S)>=0)){var L=this.g.mul(A);if(!L.isInfinity()){var H=L.getX(),D=H.umod(this.n);if(0!==D.cmpn(0)){var q=A.invm(this.n).mul(D.mul(u.getPrivate()).iadd(h));if(0!==(q=q.umod(this.n)).cmpn(0)){var k=(L.getY().isOdd()?1:0)|(0!==H.cmp(D)?2:0);return _.canonical&&q.cmp(this.nh)>0&&(q=this.n.sub(q),k^=1),new i({r:D,s:q,recoveryParam:k})}}}}}},c.prototype.verify=function(h,u,d,_){h=this._truncateToN(new s(h,16)),d=this.keyFromPublic(d,_);var v=(u=new i(u,"hex")).r,T=u.s;if(v.cmpn(1)<0||v.cmp(this.n)>=0||T.cmpn(1)<0||T.cmp(this.n)>=0)return!1;var O,b=T.invm(this.n),S=b.mul(h).umod(this.n),w=b.mul(v).umod(this.n);return this.curve._maxwellTrick?!(O=this.g.jmulAdd(S,d.getPublic(),w)).isInfinity()&&O.eqXToP(v):!(O=this.g.mulAdd(S,d.getPublic(),w)).isInfinity()&&0===O.getX().umod(this.n).cmp(v)},c.prototype.recoverPubKey=function(h,u,d,_){e((3&d)===d,"The recovery param is more than two bits"),u=new i(u,_);var v=this.n,T=new s(h),O=u.r,b=u.s,S=1&d,w=d>>1;if(O.cmp(this.curve.p.umod(this.curve.n))>=0&&w)throw new Error("Unable to find sencond key candinate");O=this.curve.pointFromX(w?O.add(this.curve.n):O,S);var A=u.r.invm(v),L=v.sub(T).mul(A).umod(v),H=b.mul(A).umod(v);return this.g.mulAdd(L,O,H)},c.prototype.getKeyRecoveryParam=function(h,u,d,_){if(null!==(u=new i(u,_)).recoveryParam)return u.recoveryParam;for(var v=0;v<4;v++){var T;try{T=this.recoverPubKey(h,u,v)}catch{continue}if(T.eq(d))return v}throw new Error("Unable to find valid recovery factor")}},function(z,l,f){"use strict";var s=f(60),m=f(120),y=f(22);function n(o){if(!(this instanceof n))return new n(o);this.hash=o.hash,this.predResist=!!o.predResist,this.outLen=this.hash.outSize,this.minEntropy=o.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=m.toArray(o.entropy,o.entropyEnc||"hex"),t=m.toArray(o.nonce,o.nonceEnc||"hex"),i=m.toArray(o.pers,o.persEnc||"hex");y(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,i)}z.exports=n,n.prototype._init=function(o,e,t){var i=o.concat(e).concat(t);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var c=0;c=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(o.concat(t||[])),this._reseed=1},n.prototype.generate=function(o,e,t,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(i=t,t=e,e=null),t&&(t=m.toArray(t,i||"hex"),this._update(t));for(var c=[];c.length"}},function(z,l,f){"use strict";var s=f(16),m=f(11),y=m.assert;function n(c,h){if(c instanceof n)return c;this._importDER(c,h)||(y(c.r&&c.s,"Signature without r or s"),this.r=new s(c.r,16),this.s=new s(c.s,16),this.recoveryParam=void 0===c.recoveryParam?null:c.recoveryParam)}function o(){this.place=0}function e(c,h){var u=c[h.place++];if(!(128&u))return u;var d=15&u;if(0===d||d>4)return!1;for(var _=0,v=0,T=h.place;v>>=0;return!(_<=127)&&(h.place=T,_)}function t(c){for(var h=0,u=c.length-1;!c[h]&&!(128&c[h+1])&&h>>3);for(c.push(128|u);--u;)c.push(h>>>(u<<3)&255);c.push(h)}}z.exports=n,n.prototype._importDER=function(c,h){c=m.toArray(c,h);var u=new o;if(48!==c[u.place++])return!1;var d=e(c,u);if(!1===d||d+u.place!==c.length||2!==c[u.place++])return!1;var _=e(c,u);if(!1===_)return!1;var v=c.slice(u.place,_+u.place);if(u.place+=_,2!==c[u.place++])return!1;var T=e(c,u);if(!1===T||c.length!==T+u.place)return!1;var O=c.slice(u.place,T+u.place);if(0===v[0]){if(!(128&v[1]))return!1;v=v.slice(1)}if(0===O[0]){if(!(128&O[1]))return!1;O=O.slice(1)}return this.r=new s(v),this.s=new s(O),this.recoveryParam=null,!0},n.prototype.toDER=function(c){var h=this.r.toArray(),u=this.s.toArray();for(128&h[0]&&(h=[0].concat(h)),128&u[0]&&(u=[0].concat(u)),h=t(h),u=t(u);!(u[0]||128&u[1]);)u=u.slice(1);var d=[2];i(d,h.length),(d=d.concat(h)).push(2),i(d,u.length);var _=d.concat(u),v=[48];return i(v,_.length),v=v.concat(_),m.encode(v,c)}},function(z,l,f){"use strict";var s=f(60),m=f(59),y=f(11),n=y.assert,o=y.parseBytes,e=f(262),t=f(263);function i(c){if(n("ed25519"===c,"only tested with ed25519 so far"),!(this instanceof i))return new i(c);this.curve=c=m[c].curve,this.g=c.g,this.g.precompute(c.n.bitLength()+1),this.pointClass=c.point().constructor,this.encodingLength=Math.ceil(c.n.bitLength()/8),this.hash=s.sha512}z.exports=i,i.prototype.sign=function(c,h){c=o(c);var u=this.keyFromSecret(h),d=this.hashInt(u.messagePrefix(),c),_=this.g.mul(d),v=this.encodePoint(_),T=this.hashInt(v,u.pubBytes(),c).mul(u.priv()),O=d.add(T).umod(this.curve.n);return this.makeSignature({R:_,S:O,Rencoded:v})},i.prototype.verify=function(c,h,u){c=o(c),h=this.makeSignature(h);var d=this.keyFromPublic(u),_=this.hashInt(h.Rencoded(),d.pubBytes(),c),v=this.g.mul(h.S());return h.R().add(d.pub().mul(_)).eq(v)},i.prototype.hashInt=function(){for(var c=this.hash(),h=0;h4294967295)throw new RangeError("requested too many random bytes");var t=y.allocUnsafe(o);if(o>0)if(o>65536)for(var i=0;i=0)throw new Error("couldn't export to DER format");var c=y.g.mul(i);return o(c.getX(),c.getY(),t)},l.privateKeyModInverse=function(e){var t=new m(e);if(t.ucmp(n.n)>=0||t.isZero())throw new Error("private key range is invalid");return t.invm(n.n).toArrayLike(s,"be",32)},l.signatureImport=function(e){var t=new m(e.r);t.ucmp(n.n)>=0&&(t=new m(0));var i=new m(e.s);return i.ucmp(n.n)>=0&&(i=new m(0)),s.concat([t.toArrayLike(s,"be",32),i.toArrayLike(s,"be",32)])},l.ecdhUnsafe=function(e,t,i){var c=y.keyFromPublic(e),h=new m(t);if(h.ucmp(n.n)>=0||h.isZero())throw new Error("scalar was invalid (zero or overflow)");var u=c.pub.mul(h);return o(u.getX(),u.getY(),i)};var o=function(e,t,i){var c=void 0;return i?((c=s.alloc(33))[0]=t.isOdd()?3:2,e.toArrayLike(s,"be",32).copy(c,1)):((c=s.alloc(65))[0]=4,e.toArrayLike(s,"be",32).copy(c,1),t.toArrayLike(s,"be",32).copy(c,33)),c}}).call(this,f(2).Buffer)},function(z,l,f){"use strict";(function(s){var m=s.from([48,129,211,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),y=s.from([48,130,1,19,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);l.privateKeyExport=function(n,o,e){var t=s.from(e?m:y);return n.copy(t,e?8:9),o.copy(t,e?181:214),t},l.privateKeyImport=function(n){var o=n.length,e=0;if(o2||o<(e+=1)+t)return null;var i=n[e+t-1]|(t>1?n[e+t-2]<<8:0);return o<(e+=t)+i||o32||ot||2!==n[i++])return null;var h=n[i++];if(128&h){if(i+(c=h-128)>t)return null;for(;c>0&&0===n[i];i+=1,c-=1);for(h=0;c>0;i+=1,c-=1)h=(h<<8)+n[i]}if(h>t-i)return null;var u=i;if(i+=h,2!==n[i++])return null;var d=n[i++];if(128&d){if(i+(c=d-128)>t)return null;for(;c>0&&0===n[i];i+=1,c-=1);for(d=0;c>0;i+=1,c-=1)d=(d<<8)+n[i]}if(d>t-i)return null;var _=i;for(i+=d;h>0&&0===n[u];h-=1,u+=1);if(h>32)return null;var v=n.slice(u,u+h);for(v.copy(o,32-v.length);d>0&&0===n[_];d-=1,_+=1);if(d>32)return null;var T=n.slice(_,_+d);return T.copy(e,32-T.length),{r:o,s:e}}}).call(this,f(2).Buffer)},function(z,l,f){"use strict";var s=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable;function n(o){if(null==o)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}z.exports=function(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de","5"===Object.getOwnPropertyNames(o)[0])return!1;for(var e={},t=0;t<10;t++)e["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(c){return e[c]}).join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(c){i[c]=c}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch{return!1}}()?Object.assign:function(o,e){for(var t,i,c=n(o),h=1;h=48&&g<=57?g-48:g>=65&&g<=70?g-55:g>=97&&g<=102?g-87:void n(!1,"Invalid character in "+r)}function c(r,a,g){var M=i(r,g);return g-1>=a&&(M|=i(r,g-1)<<4),M}function h(r,a,g,M){for(var x=0,C=0,U=Math.min(r.length,g),V=a;V=49?I-49+10:I>=17?I-17+10:I,n(I>=0&&C0?r:a},e.min=function(r,a){return r.cmp(a)<0?r:a},e.prototype._init=function(r,a,g){if("number"==typeof r)return this._initNumber(r,a,g);if("object"==typeof r)return this._initArray(r,a,g);"hex"===a&&(a=16),n(a===(0|a)&&a>=2&&a<=36);var M=0;"-"===(r=r.toString().replace(/\s+/g,""))[0]&&(M++,this.negative=1),M=0;M-=3)this.words[x]|=(C=r[M]|r[M-1]<<8|r[M-2]<<16)<>>26-U&67108863,(U+=24)>=26&&(U-=26,x++);else if("le"===g)for(M=0,x=0;M>>26-U&67108863,(U+=24)>=26&&(U-=26,x++);return this._strip()},e.prototype._parseHex=function(r,a,g){this.length=Math.ceil((r.length-a)/6),this.words=new Array(this.length);for(var M=0;M=a;M-=2)x=c(r,a,M)<=18?(C-=18,this.words[U+=1]|=x>>>26):C+=8;else for(M=(r.length-a)%2==0?a+1:a;M=18?(C-=18,this.words[U+=1]|=x>>>26):C+=8;this._strip()},e.prototype._parseBase=function(r,a,g){this.words=[0],this.length=1;for(var M=0,x=1;x<=67108863;x*=a)M++;M--,x=x/a|0;for(var C=r.length-g,U=C%M,V=Math.min(C,C-U)+g,I=0,W=g;W1&&0===this.words[this.length-1];)this.length--;return this._normSign()},e.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},typeof Symbol<"u"&&"function"==typeof Symbol.for)try{e.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch{e.prototype.inspect=d}else e.prototype.inspect=d;function d(){return(this.red?""}var _=["","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"],v=[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],T=[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 O(r,a,g){g.negative=a.negative^r.negative;var M=r.length+a.length|0;g.length=M,M=M-1|0;var x=0|r.words[0],C=0|a.words[0],U=x*C,I=U/67108864|0;g.words[0]=67108863&U;for(var W=1;W>>26,B=67108863&I,N=Math.min(W,a.length-1),P=Math.max(0,W-r.length+1);P<=N;P++)F+=(U=(x=0|r.words[W-P|0])*(C=0|a.words[P])+B)/67108864|0,B=67108863&U;g.words[W]=0|B,I=0|F}return 0!==I?g.words[W]=0|I:g.length--,g._strip()}e.prototype.toString=function(r,a){var g;if(a=0|a||1,16===(r=r||10)||"hex"===r){g="";for(var M=0,x=0,C=0;C>>24-M&16777215,(M+=2)>=26&&(M-=26,C--),g=0!==x||C!==this.length-1?_[6-V.length]+V+g:V+g}for(0!==x&&(g=x.toString(16)+g);g.length%a!=0;)g="0"+g;return 0!==this.negative&&(g="-"+g),g}if(r===(0|r)&&r>=2&&r<=36){var I=v[r],W=T[r];g="";var F=this.clone();for(F.negative=0;!F.isZero();){var B=F.modrn(W).toString(r);g=(F=F.idivn(W)).isZero()?B+g:_[I-B.length]+B+g}for(this.isZero()&&(g="0"+g);g.length%a!=0;)g="0"+g;return 0!==this.negative&&(g="-"+g),g}n(!1,"Base should be between 2 and 36")},e.prototype.toNumber=function(){var r=this.words[0];return 2===this.length?r+=67108864*this.words[1]:3===this.length&&1===this.words[2]?r+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-r:r},e.prototype.toJSON=function(){return this.toString(16,2)},t&&(e.prototype.toBuffer=function(r,a){return this.toArrayLike(t,r,a)}),e.prototype.toArray=function(r,a){return this.toArrayLike(Array,r,a)},e.prototype.toArrayLike=function(r,a,g){this._strip();var M=this.byteLength(),x=g||Math.max(1,M);n(M<=x,"byte array longer than desired length"),n(x>0,"Requested array length <= 0");var U,V,C=(V=x,(U=r).allocUnsafe?U.allocUnsafe(V):new U(V));return this["_toArrayLike"+("le"===a?"LE":"BE")](C,M),C},e.prototype._toArrayLikeLE=function(r,a){for(var g=0,M=0,x=0,C=0;x>8&255),g>16&255),6===C?(g>24&255),M=0,C=0):(M=U>>>24,C+=2)}if(g=0&&(r[g--]=U>>8&255),g>=0&&(r[g--]=U>>16&255),6===C?(g>=0&&(r[g--]=U>>24&255),M=0,C=0):(M=U>>>24,C+=2)}if(g>=0)for(r[g--]=M;g>=0;)r[g--]=0},e.prototype._countBits=Math.clz32?function(r){return 32-Math.clz32(r)}:function(r){var a=r,g=0;return a>=4096&&(g+=13,a>>>=13),a>=64&&(g+=7,a>>>=7),a>=8&&(g+=4,a>>>=4),a>=2&&(g+=2,a>>>=2),g+a},e.prototype._zeroBits=function(r){if(0===r)return 26;var a=r,g=0;return 0==(8191&a)&&(g+=13,a>>>=13),0==(127&a)&&(g+=7,a>>>=7),0==(15&a)&&(g+=4,a>>>=4),0==(3&a)&&(g+=2,a>>>=2),0==(1&a)&&g++,g},e.prototype.bitLength=function(){var a=this._countBits(this.words[this.length-1]);return 26*(this.length-1)+a},e.prototype.zeroBits=function(){if(this.isZero())return 0;for(var r=0,a=0;ar.length?this.clone().ior(r):r.clone().ior(this)},e.prototype.uor=function(r){return this.length>r.length?this.clone().iuor(r):r.clone().iuor(this)},e.prototype.iuand=function(r){var a;a=this.length>r.length?r:this;for(var g=0;gr.length?this.clone().iand(r):r.clone().iand(this)},e.prototype.uand=function(r){return this.length>r.length?this.clone().iuand(r):r.clone().iuand(this)},e.prototype.iuxor=function(r){var a,g;this.length>r.length?(a=this,g=r):(a=r,g=this);for(var M=0;Mr.length?this.clone().ixor(r):r.clone().ixor(this)},e.prototype.uxor=function(r){return this.length>r.length?this.clone().iuxor(r):r.clone().iuxor(this)},e.prototype.inotn=function(r){n("number"==typeof r&&r>=0);var a=0|Math.ceil(r/26),g=r%26;this._expand(a),g>0&&a--;for(var M=0;M0&&(this.words[M]=~this.words[M]&67108863>>26-g),this._strip()},e.prototype.notn=function(r){return this.clone().inotn(r)},e.prototype.setn=function(r,a){n("number"==typeof r&&r>=0);var g=r/26|0,M=r%26;return this._expand(g+1),this.words[g]=a?this.words[g]|1<r.length?(g=this,M=r):(g=r,M=this);for(var x=0,C=0;C>>26;for(;0!==x&&C>>26;if(this.length=g.length,0!==x)this.words[this.length]=x,this.length++;else if(g!==this)for(;Cr.length?this.clone().iadd(r):r.clone().iadd(this)},e.prototype.isub=function(r){if(0!==r.negative){r.negative=0;var a=this.iadd(r);return r.negative=1,a._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(r),this.negative=1,this._normSign();var g,M,x=this.cmp(r);if(0===x)return this.negative=0,this.length=1,this.words[0]=0,this;x>0?(g=this,M=r):(g=r,M=this);for(var C=0,U=0;U>26,this.words[U]=67108863&a;for(;0!==C&&U>26,this.words[U]=67108863&a;if(0===C&&U>>13,P=0|U[1],j=8191&P,K=P>>>13,Z=0|U[2],J=8191&Z,X=Z>>>13,ee=0|U[3],te=8191&ee,oe=ee>>>13,ve=0|U[4],ie=8191&ve,de=ve>>>13,fe=0|U[5],re=8191&fe,_e=fe>>>13,Ke=0|U[6],pe=8191&Ke,Te=Ke>>>13,Ve=0|U[7],be=8191&Ve,Pe=Ve>>>13,Ye=0|U[8],we=8191&Ye,Be=Ye>>>13,$e=0|U[9],Me=8191&$e,je=$e>>>13,Q=0|V[0],se=8191&Q,le=Q>>>13,Le=0|V[1],he=8191&Le,Oe=Le>>>13,Ge=0|V[2],me=8191&Ge,ze=Ge>>>13,rt=0|V[3],Re=8191&rt,He=rt>>>13,Qe=0|V[4],xe=8191&Qe,Ne=Qe>>>13,it=0|V[5],Ee=8191&it,qe=it>>>13,et=0|V[6],ke=8191&et,We=et>>>13,tt=0|V[7],Se=8191&tt,Fe=tt>>>13,nt=0|V[8],Ae=8191&nt,Ue=nt>>>13,Y=0|V[9],G=8191&Y,$=Y>>>13;g.negative=r.negative^a.negative,g.length=19;var ne=(W+(M=Math.imul(B,se))|0)+((8191&(x=(x=Math.imul(B,le))+Math.imul(N,se)|0))<<13)|0;W=((C=Math.imul(N,le))+(x>>>13)|0)+(ne>>>26)|0,ne&=67108863,M=Math.imul(j,se),x=(x=Math.imul(j,le))+Math.imul(K,se)|0,C=Math.imul(K,le);var ce=(W+(M=M+Math.imul(B,he)|0)|0)+((8191&(x=(x=x+Math.imul(B,Oe)|0)+Math.imul(N,he)|0))<<13)|0;W=((C=C+Math.imul(N,Oe)|0)+(x>>>13)|0)+(ce>>>26)|0,ce&=67108863,M=Math.imul(J,se),x=(x=Math.imul(J,le))+Math.imul(X,se)|0,C=Math.imul(X,le),M=M+Math.imul(j,he)|0,x=(x=x+Math.imul(j,Oe)|0)+Math.imul(K,he)|0,C=C+Math.imul(K,Oe)|0;var ue=(W+(M=M+Math.imul(B,me)|0)|0)+((8191&(x=(x=x+Math.imul(B,ze)|0)+Math.imul(N,me)|0))<<13)|0;W=((C=C+Math.imul(N,ze)|0)+(x>>>13)|0)+(ue>>>26)|0,ue&=67108863,M=Math.imul(te,se),x=(x=Math.imul(te,le))+Math.imul(oe,se)|0,C=Math.imul(oe,le),M=M+Math.imul(J,he)|0,x=(x=x+Math.imul(J,Oe)|0)+Math.imul(X,he)|0,C=C+Math.imul(X,Oe)|0,M=M+Math.imul(j,me)|0,x=(x=x+Math.imul(j,ze)|0)+Math.imul(K,me)|0,C=C+Math.imul(K,ze)|0;var Ce=(W+(M=M+Math.imul(B,Re)|0)|0)+((8191&(x=(x=x+Math.imul(B,He)|0)+Math.imul(N,Re)|0))<<13)|0;W=((C=C+Math.imul(N,He)|0)+(x>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,M=Math.imul(ie,se),x=(x=Math.imul(ie,le))+Math.imul(de,se)|0,C=Math.imul(de,le),M=M+Math.imul(te,he)|0,x=(x=x+Math.imul(te,Oe)|0)+Math.imul(oe,he)|0,C=C+Math.imul(oe,Oe)|0,M=M+Math.imul(J,me)|0,x=(x=x+Math.imul(J,ze)|0)+Math.imul(X,me)|0,C=C+Math.imul(X,ze)|0,M=M+Math.imul(j,Re)|0,x=(x=x+Math.imul(j,He)|0)+Math.imul(K,Re)|0,C=C+Math.imul(K,He)|0;var Ie=(W+(M=M+Math.imul(B,xe)|0)|0)+((8191&(x=(x=x+Math.imul(B,Ne)|0)+Math.imul(N,xe)|0))<<13)|0;W=((C=C+Math.imul(N,Ne)|0)+(x>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,M=Math.imul(re,se),x=(x=Math.imul(re,le))+Math.imul(_e,se)|0,C=Math.imul(_e,le),M=M+Math.imul(ie,he)|0,x=(x=x+Math.imul(ie,Oe)|0)+Math.imul(de,he)|0,C=C+Math.imul(de,Oe)|0,M=M+Math.imul(te,me)|0,x=(x=x+Math.imul(te,ze)|0)+Math.imul(oe,me)|0,C=C+Math.imul(oe,ze)|0,M=M+Math.imul(J,Re)|0,x=(x=x+Math.imul(J,He)|0)+Math.imul(X,Re)|0,C=C+Math.imul(X,He)|0,M=M+Math.imul(j,xe)|0,x=(x=x+Math.imul(j,Ne)|0)+Math.imul(K,xe)|0,C=C+Math.imul(K,Ne)|0;var De=(W+(M=M+Math.imul(B,Ee)|0)|0)+((8191&(x=(x=x+Math.imul(B,qe)|0)+Math.imul(N,Ee)|0))<<13)|0;W=((C=C+Math.imul(N,qe)|0)+(x>>>13)|0)+(De>>>26)|0,De&=67108863,M=Math.imul(pe,se),x=(x=Math.imul(pe,le))+Math.imul(Te,se)|0,C=Math.imul(Te,le),M=M+Math.imul(re,he)|0,x=(x=x+Math.imul(re,Oe)|0)+Math.imul(_e,he)|0,C=C+Math.imul(_e,Oe)|0,M=M+Math.imul(ie,me)|0,x=(x=x+Math.imul(ie,ze)|0)+Math.imul(de,me)|0,C=C+Math.imul(de,ze)|0,M=M+Math.imul(te,Re)|0,x=(x=x+Math.imul(te,He)|0)+Math.imul(oe,Re)|0,C=C+Math.imul(oe,He)|0,M=M+Math.imul(J,xe)|0,x=(x=x+Math.imul(J,Ne)|0)+Math.imul(X,xe)|0,C=C+Math.imul(X,Ne)|0,M=M+Math.imul(j,Ee)|0,x=(x=x+Math.imul(j,qe)|0)+Math.imul(K,Ee)|0,C=C+Math.imul(K,qe)|0;var ye=(W+(M=M+Math.imul(B,ke)|0)|0)+((8191&(x=(x=x+Math.imul(B,We)|0)+Math.imul(N,ke)|0))<<13)|0;W=((C=C+Math.imul(N,We)|0)+(x>>>13)|0)+(ye>>>26)|0,ye&=67108863,M=Math.imul(be,se),x=(x=Math.imul(be,le))+Math.imul(Pe,se)|0,C=Math.imul(Pe,le),M=M+Math.imul(pe,he)|0,x=(x=x+Math.imul(pe,Oe)|0)+Math.imul(Te,he)|0,C=C+Math.imul(Te,Oe)|0,M=M+Math.imul(re,me)|0,x=(x=x+Math.imul(re,ze)|0)+Math.imul(_e,me)|0,C=C+Math.imul(_e,ze)|0,M=M+Math.imul(ie,Re)|0,x=(x=x+Math.imul(ie,He)|0)+Math.imul(de,Re)|0,C=C+Math.imul(de,He)|0,M=M+Math.imul(te,xe)|0,x=(x=x+Math.imul(te,Ne)|0)+Math.imul(oe,xe)|0,C=C+Math.imul(oe,Ne)|0,M=M+Math.imul(J,Ee)|0,x=(x=x+Math.imul(J,qe)|0)+Math.imul(X,Ee)|0,C=C+Math.imul(X,qe)|0,M=M+Math.imul(j,ke)|0,x=(x=x+Math.imul(j,We)|0)+Math.imul(K,ke)|0,C=C+Math.imul(K,We)|0;var ae=(W+(M=M+Math.imul(B,Se)|0)|0)+((8191&(x=(x=x+Math.imul(B,Fe)|0)+Math.imul(N,Se)|0))<<13)|0;W=((C=C+Math.imul(N,Fe)|0)+(x>>>13)|0)+(ae>>>26)|0,ae&=67108863,M=Math.imul(we,se),x=(x=Math.imul(we,le))+Math.imul(Be,se)|0,C=Math.imul(Be,le),M=M+Math.imul(be,he)|0,x=(x=x+Math.imul(be,Oe)|0)+Math.imul(Pe,he)|0,C=C+Math.imul(Pe,Oe)|0,M=M+Math.imul(pe,me)|0,x=(x=x+Math.imul(pe,ze)|0)+Math.imul(Te,me)|0,C=C+Math.imul(Te,ze)|0,M=M+Math.imul(re,Re)|0,x=(x=x+Math.imul(re,He)|0)+Math.imul(_e,Re)|0,C=C+Math.imul(_e,He)|0,M=M+Math.imul(ie,xe)|0,x=(x=x+Math.imul(ie,Ne)|0)+Math.imul(de,xe)|0,C=C+Math.imul(de,Ne)|0,M=M+Math.imul(te,Ee)|0,x=(x=x+Math.imul(te,qe)|0)+Math.imul(oe,Ee)|0,C=C+Math.imul(oe,qe)|0,M=M+Math.imul(J,ke)|0,x=(x=x+Math.imul(J,We)|0)+Math.imul(X,ke)|0,C=C+Math.imul(X,We)|0,M=M+Math.imul(j,Se)|0,x=(x=x+Math.imul(j,Fe)|0)+Math.imul(K,Se)|0,C=C+Math.imul(K,Fe)|0;var Je=(W+(M=M+Math.imul(B,Ae)|0)|0)+((8191&(x=(x=x+Math.imul(B,Ue)|0)+Math.imul(N,Ae)|0))<<13)|0;W=((C=C+Math.imul(N,Ue)|0)+(x>>>13)|0)+(Je>>>26)|0,Je&=67108863,M=Math.imul(Me,se),x=(x=Math.imul(Me,le))+Math.imul(je,se)|0,C=Math.imul(je,le),M=M+Math.imul(we,he)|0,x=(x=x+Math.imul(we,Oe)|0)+Math.imul(Be,he)|0,C=C+Math.imul(Be,Oe)|0,M=M+Math.imul(be,me)|0,x=(x=x+Math.imul(be,ze)|0)+Math.imul(Pe,me)|0,C=C+Math.imul(Pe,ze)|0,M=M+Math.imul(pe,Re)|0,x=(x=x+Math.imul(pe,He)|0)+Math.imul(Te,Re)|0,C=C+Math.imul(Te,He)|0,M=M+Math.imul(re,xe)|0,x=(x=x+Math.imul(re,Ne)|0)+Math.imul(_e,xe)|0,C=C+Math.imul(_e,Ne)|0,M=M+Math.imul(ie,Ee)|0,x=(x=x+Math.imul(ie,qe)|0)+Math.imul(de,Ee)|0,C=C+Math.imul(de,qe)|0,M=M+Math.imul(te,ke)|0,x=(x=x+Math.imul(te,We)|0)+Math.imul(oe,ke)|0,C=C+Math.imul(oe,We)|0,M=M+Math.imul(J,Se)|0,x=(x=x+Math.imul(J,Fe)|0)+Math.imul(X,Se)|0,C=C+Math.imul(X,Fe)|0,M=M+Math.imul(j,Ae)|0,x=(x=x+Math.imul(j,Ue)|0)+Math.imul(K,Ae)|0,C=C+Math.imul(K,Ue)|0;var ot=(W+(M=M+Math.imul(B,G)|0)|0)+((8191&(x=(x=x+Math.imul(B,$)|0)+Math.imul(N,G)|0))<<13)|0;W=((C=C+Math.imul(N,$)|0)+(x>>>13)|0)+(ot>>>26)|0,ot&=67108863,M=Math.imul(Me,he),x=(x=Math.imul(Me,Oe))+Math.imul(je,he)|0,C=Math.imul(je,Oe),M=M+Math.imul(we,me)|0,x=(x=x+Math.imul(we,ze)|0)+Math.imul(Be,me)|0,C=C+Math.imul(Be,ze)|0,M=M+Math.imul(be,Re)|0,x=(x=x+Math.imul(be,He)|0)+Math.imul(Pe,Re)|0,C=C+Math.imul(Pe,He)|0,M=M+Math.imul(pe,xe)|0,x=(x=x+Math.imul(pe,Ne)|0)+Math.imul(Te,xe)|0,C=C+Math.imul(Te,Ne)|0,M=M+Math.imul(re,Ee)|0,x=(x=x+Math.imul(re,qe)|0)+Math.imul(_e,Ee)|0,C=C+Math.imul(_e,qe)|0,M=M+Math.imul(ie,ke)|0,x=(x=x+Math.imul(ie,We)|0)+Math.imul(de,ke)|0,C=C+Math.imul(de,We)|0,M=M+Math.imul(te,Se)|0,x=(x=x+Math.imul(te,Fe)|0)+Math.imul(oe,Se)|0,C=C+Math.imul(oe,Fe)|0,M=M+Math.imul(J,Ae)|0,x=(x=x+Math.imul(J,Ue)|0)+Math.imul(X,Ae)|0,C=C+Math.imul(X,Ue)|0;var at=(W+(M=M+Math.imul(j,G)|0)|0)+((8191&(x=(x=x+Math.imul(j,$)|0)+Math.imul(K,G)|0))<<13)|0;W=((C=C+Math.imul(K,$)|0)+(x>>>13)|0)+(at>>>26)|0,at&=67108863,M=Math.imul(Me,me),x=(x=Math.imul(Me,ze))+Math.imul(je,me)|0,C=Math.imul(je,ze),M=M+Math.imul(we,Re)|0,x=(x=x+Math.imul(we,He)|0)+Math.imul(Be,Re)|0,C=C+Math.imul(Be,He)|0,M=M+Math.imul(be,xe)|0,x=(x=x+Math.imul(be,Ne)|0)+Math.imul(Pe,xe)|0,C=C+Math.imul(Pe,Ne)|0,M=M+Math.imul(pe,Ee)|0,x=(x=x+Math.imul(pe,qe)|0)+Math.imul(Te,Ee)|0,C=C+Math.imul(Te,qe)|0,M=M+Math.imul(re,ke)|0,x=(x=x+Math.imul(re,We)|0)+Math.imul(_e,ke)|0,C=C+Math.imul(_e,We)|0,M=M+Math.imul(ie,Se)|0,x=(x=x+Math.imul(ie,Fe)|0)+Math.imul(de,Se)|0,C=C+Math.imul(de,Fe)|0,M=M+Math.imul(te,Ae)|0,x=(x=x+Math.imul(te,Ue)|0)+Math.imul(oe,Ae)|0,C=C+Math.imul(oe,Ue)|0;var st=(W+(M=M+Math.imul(J,G)|0)|0)+((8191&(x=(x=x+Math.imul(J,$)|0)+Math.imul(X,G)|0))<<13)|0;W=((C=C+Math.imul(X,$)|0)+(x>>>13)|0)+(st>>>26)|0,st&=67108863,M=Math.imul(Me,Re),x=(x=Math.imul(Me,He))+Math.imul(je,Re)|0,C=Math.imul(je,He),M=M+Math.imul(we,xe)|0,x=(x=x+Math.imul(we,Ne)|0)+Math.imul(Be,xe)|0,C=C+Math.imul(Be,Ne)|0,M=M+Math.imul(be,Ee)|0,x=(x=x+Math.imul(be,qe)|0)+Math.imul(Pe,Ee)|0,C=C+Math.imul(Pe,qe)|0,M=M+Math.imul(pe,ke)|0,x=(x=x+Math.imul(pe,We)|0)+Math.imul(Te,ke)|0,C=C+Math.imul(Te,We)|0,M=M+Math.imul(re,Se)|0,x=(x=x+Math.imul(re,Fe)|0)+Math.imul(_e,Se)|0,C=C+Math.imul(_e,Fe)|0,M=M+Math.imul(ie,Ae)|0,x=(x=x+Math.imul(ie,Ue)|0)+Math.imul(de,Ae)|0,C=C+Math.imul(de,Ue)|0;var ut=(W+(M=M+Math.imul(te,G)|0)|0)+((8191&(x=(x=x+Math.imul(te,$)|0)+Math.imul(oe,G)|0))<<13)|0;W=((C=C+Math.imul(oe,$)|0)+(x>>>13)|0)+(ut>>>26)|0,ut&=67108863,M=Math.imul(Me,xe),x=(x=Math.imul(Me,Ne))+Math.imul(je,xe)|0,C=Math.imul(je,Ne),M=M+Math.imul(we,Ee)|0,x=(x=x+Math.imul(we,qe)|0)+Math.imul(Be,Ee)|0,C=C+Math.imul(Be,qe)|0,M=M+Math.imul(be,ke)|0,x=(x=x+Math.imul(be,We)|0)+Math.imul(Pe,ke)|0,C=C+Math.imul(Pe,We)|0,M=M+Math.imul(pe,Se)|0,x=(x=x+Math.imul(pe,Fe)|0)+Math.imul(Te,Se)|0,C=C+Math.imul(Te,Fe)|0,M=M+Math.imul(re,Ae)|0,x=(x=x+Math.imul(re,Ue)|0)+Math.imul(_e,Ae)|0,C=C+Math.imul(_e,Ue)|0;var Ze=(W+(M=M+Math.imul(ie,G)|0)|0)+((8191&(x=(x=x+Math.imul(ie,$)|0)+Math.imul(de,G)|0))<<13)|0;W=((C=C+Math.imul(de,$)|0)+(x>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,M=Math.imul(Me,Ee),x=(x=Math.imul(Me,qe))+Math.imul(je,Ee)|0,C=Math.imul(je,qe),M=M+Math.imul(we,ke)|0,x=(x=x+Math.imul(we,We)|0)+Math.imul(Be,ke)|0,C=C+Math.imul(Be,We)|0,M=M+Math.imul(be,Se)|0,x=(x=x+Math.imul(be,Fe)|0)+Math.imul(Pe,Se)|0,C=C+Math.imul(Pe,Fe)|0,M=M+Math.imul(pe,Ae)|0,x=(x=x+Math.imul(pe,Ue)|0)+Math.imul(Te,Ae)|0,C=C+Math.imul(Te,Ue)|0;var ct=(W+(M=M+Math.imul(re,G)|0)|0)+((8191&(x=(x=x+Math.imul(re,$)|0)+Math.imul(_e,G)|0))<<13)|0;W=((C=C+Math.imul(_e,$)|0)+(x>>>13)|0)+(ct>>>26)|0,ct&=67108863,M=Math.imul(Me,ke),x=(x=Math.imul(Me,We))+Math.imul(je,ke)|0,C=Math.imul(je,We),M=M+Math.imul(we,Se)|0,x=(x=x+Math.imul(we,Fe)|0)+Math.imul(Be,Se)|0,C=C+Math.imul(Be,Fe)|0,M=M+Math.imul(be,Ae)|0,x=(x=x+Math.imul(be,Ue)|0)+Math.imul(Pe,Ae)|0,C=C+Math.imul(Pe,Ue)|0;var Xe=(W+(M=M+Math.imul(pe,G)|0)|0)+((8191&(x=(x=x+Math.imul(pe,$)|0)+Math.imul(Te,G)|0))<<13)|0;W=((C=C+Math.imul(Te,$)|0)+(x>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,M=Math.imul(Me,Se),x=(x=Math.imul(Me,Fe))+Math.imul(je,Se)|0,C=Math.imul(je,Fe),M=M+Math.imul(we,Ae)|0,x=(x=x+Math.imul(we,Ue)|0)+Math.imul(Be,Ae)|0,C=C+Math.imul(Be,Ue)|0;var ht=(W+(M=M+Math.imul(be,G)|0)|0)+((8191&(x=(x=x+Math.imul(be,$)|0)+Math.imul(Pe,G)|0))<<13)|0;W=((C=C+Math.imul(Pe,$)|0)+(x>>>13)|0)+(ht>>>26)|0,ht&=67108863,M=Math.imul(Me,Ae),x=(x=Math.imul(Me,Ue))+Math.imul(je,Ae)|0,C=Math.imul(je,Ue);var ft=(W+(M=M+Math.imul(we,G)|0)|0)+((8191&(x=(x=x+Math.imul(we,$)|0)+Math.imul(Be,G)|0))<<13)|0;W=((C=C+Math.imul(Be,$)|0)+(x>>>13)|0)+(ft>>>26)|0,ft&=67108863;var pt=(W+(M=Math.imul(Me,G))|0)+((8191&(x=(x=Math.imul(Me,$))+Math.imul(je,G)|0))<<13)|0;return W=((C=Math.imul(je,$))+(x>>>13)|0)+(pt>>>26)|0,pt&=67108863,I[0]=ne,I[1]=ce,I[2]=ue,I[3]=Ce,I[4]=Ie,I[5]=De,I[6]=ye,I[7]=ae,I[8]=Je,I[9]=ot,I[10]=at,I[11]=st,I[12]=ut,I[13]=Ze,I[14]=ct,I[15]=Xe,I[16]=ht,I[17]=ft,I[18]=pt,0!==W&&(I[19]=W,g.length++),g};function S(r,a,g){g.negative=a.negative^r.negative,g.length=r.length+a.length;for(var M=0,x=0,C=0;C>>26)|0)>>>26,U&=67108863}g.words[C]=V,M=U,U=x}return 0!==M?g.words[C]=M:g.length--,g._strip()}function w(r,a,g){return S(r,a,g)}function A(r,a){this.x=r,this.y=a}Math.imul||(b=O),e.prototype.mulTo=function(r,a){var g=this.length+r.length;return 10===this.length&&10===r.length?b(this,r,a):g<63?O(this,r,a):g<1024?S(this,r,a):w(this,r,a)},A.prototype.makeRBT=function(r){for(var a=new Array(r),g=e.prototype._countBits(r)-1,M=0;M>=1;return M},A.prototype.permute=function(r,a,g,M,x,C){for(var U=0;U>>=1)x++;return 1<>>=13),x>>>=13;for(C=2*a;C>=26,g+=x/67108864|0,g+=C>>>26,this.words[M]=67108863&C}return 0!==g&&(this.words[M]=g,this.length++),a?this.ineg():this},e.prototype.muln=function(r){return this.clone().imuln(r)},e.prototype.sqr=function(){return this.mul(this)},e.prototype.isqr=function(){return this.imul(this.clone())},e.prototype.pow=function(r){var a=function(C){for(var U=new Array(C.bitLength()),V=0;V>>V%26&1;return U}(r);if(0===a.length)return new e(1);for(var g=this,M=0;M=0);var a,g=r%26,M=(r-g)/26,x=67108863>>>26-g<<26-g;if(0!==g){var C=0;for(a=0;a>>26-g}C&&(this.words[a]=C,this.length++)}if(0!==M){for(a=this.length-1;a>=0;a--)this.words[a+M]=this.words[a];for(a=0;a=0),M=a?(a-a%26)/26:0;var x=r%26,C=Math.min((r-x)/26,this.length),U=67108863^67108863>>>x<C)for(this.length-=C,I=0;I=0&&(0!==W||I>=M);I--){var F=0|this.words[I];this.words[I]=W<<26-x|F>>>x,W=F&U}return V&&0!==W&&(V.words[V.length++]=W),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},e.prototype.ishrn=function(r,a,g){return n(0===this.negative),this.iushrn(r,a,g)},e.prototype.shln=function(r){return this.clone().ishln(r)},e.prototype.ushln=function(r){return this.clone().iushln(r)},e.prototype.shrn=function(r){return this.clone().ishrn(r)},e.prototype.ushrn=function(r){return this.clone().iushrn(r)},e.prototype.testn=function(r){n("number"==typeof r&&r>=0);var a=r%26,g=(r-a)/26;return!(this.length<=g||!(this.words[g]&1<=0);var a=r%26,g=(r-a)/26;return n(0===this.negative,"imaskn works only with positive numbers"),this.length<=g?this:(0!==a&&g++,this.length=Math.min(g,this.length),0!==a&&(this.words[this.length-1]&=67108863^67108863>>>a<=67108864;a++)this.words[a]-=67108864,a===this.length-1?this.words[a+1]=1:this.words[a+1]++;return this.length=Math.max(this.length,a+1),this},e.prototype.isubn=function(r){if(n("number"==typeof r),n(r<67108864),r<0)return this.iaddn(-r);if(0!==this.negative)return this.negative=0,this.iaddn(r),this.negative=1,this;if(this.words[0]-=r,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var a=0;a>26)-(V/67108864|0),this.words[M+g]=67108863&x}for(;M>26,this.words[M+g]=67108863&x;if(0===U)return this._strip();for(n(-1===U),U=0,M=0;M>26,this.words[M]=67108863&x;return this.negative=1,this._strip()},e.prototype._wordDiv=function(r,a){var g,M=this.clone(),x=r,C=0|x.words[x.length-1];0!=(g=26-this._countBits(C))&&(x=x.ushln(g),M.iushln(g),C=0|x.words[x.length-1]);var U,V=M.length-x.length;if("mod"!==a){(U=new e(null)).length=V+1,U.words=new Array(U.length);for(var I=0;I=0;F--){var B=67108864*(0|M.words[x.length+F])+(0|M.words[x.length+F-1]);for(B=Math.min(B/C|0,67108863),M._ishlnsubmul(x,B,F);0!==M.negative;)B--,M.negative=0,M._ishlnsubmul(x,1,F),M.isZero()||(M.negative^=1);U&&(U.words[F]=B)}return U&&U._strip(),M._strip(),"div"!==a&&0!==g&&M.iushrn(g),{div:U||null,mod:M}},e.prototype.divmod=function(r,a,g){return n(!r.isZero()),this.isZero()?{div:new e(0),mod:new e(0)}:0!==this.negative&&0===r.negative?(C=this.neg().divmod(r,a),"mod"!==a&&(M=C.div.neg()),"div"!==a&&(x=C.mod.neg(),g&&0!==x.negative&&x.iadd(r)),{div:M,mod:x}):0===this.negative&&0!==r.negative?(C=this.divmod(r.neg(),a),"mod"!==a&&(M=C.div.neg()),{div:M,mod:C.mod}):0!=(this.negative&r.negative)?(C=this.neg().divmod(r.neg(),a),"div"!==a&&(x=C.mod.neg(),g&&0!==x.negative&&x.isub(r)),{div:C.div,mod:x}):r.length>this.length||this.cmp(r)<0?{div:new e(0),mod:this}:1===r.length?"div"===a?{div:this.divn(r.words[0]),mod:null}:"mod"===a?{div:null,mod:new e(this.modrn(r.words[0]))}:{div:this.divn(r.words[0]),mod:new e(this.modrn(r.words[0]))}:this._wordDiv(r,a);var M,x,C},e.prototype.div=function(r){return this.divmod(r,"div",!1).div},e.prototype.mod=function(r){return this.divmod(r,"mod",!1).mod},e.prototype.umod=function(r){return this.divmod(r,"mod",!0).mod},e.prototype.divRound=function(r){var a=this.divmod(r);if(a.mod.isZero())return a.div;var g=0!==a.div.negative?a.mod.isub(r):a.mod,M=r.ushrn(1),x=r.andln(1),C=g.cmp(M);return C<0||1===x&&0===C?a.div:0!==a.div.negative?a.div.isubn(1):a.div.iaddn(1)},e.prototype.modrn=function(r){var a=r<0;a&&(r=-r),n(r<=67108863);for(var g=(1<<26)%r,M=0,x=this.length-1;x>=0;x--)M=(g*M+(0|this.words[x]))%r;return a?-M:M},e.prototype.modn=function(r){return this.modrn(r)},e.prototype.idivn=function(r){var a=r<0;a&&(r=-r),n(r<=67108863);for(var g=0,M=this.length-1;M>=0;M--){var x=(0|this.words[M])+67108864*g;this.words[M]=x/r|0,g=x%r}return this._strip(),a?this.ineg():this},e.prototype.divn=function(r){return this.clone().idivn(r)},e.prototype.egcd=function(r){n(0===r.negative),n(!r.isZero());var a=this,g=r.clone();a=0!==a.negative?a.umod(r):a.clone();for(var M=new e(1),x=new e(0),C=new e(0),U=new e(1),V=0;a.isEven()&&g.isEven();)a.iushrn(1),g.iushrn(1),++V;for(var I=g.clone(),W=a.clone();!a.isZero();){for(var F=0,B=1;0==(a.words[0]&B)&&F<26;++F,B<<=1);if(F>0)for(a.iushrn(F);F-- >0;)(M.isOdd()||x.isOdd())&&(M.iadd(I),x.isub(W)),M.iushrn(1),x.iushrn(1);for(var N=0,P=1;0==(g.words[0]&P)&&N<26;++N,P<<=1);if(N>0)for(g.iushrn(N);N-- >0;)(C.isOdd()||U.isOdd())&&(C.iadd(I),U.isub(W)),C.iushrn(1),U.iushrn(1);a.cmp(g)>=0?(a.isub(g),M.isub(C),x.isub(U)):(g.isub(a),C.isub(M),U.isub(x))}return{a:C,b:U,gcd:g.iushln(V)}},e.prototype._invmp=function(r){n(0===r.negative),n(!r.isZero());var a=this,g=r.clone();a=0!==a.negative?a.umod(r):a.clone();for(var M,x=new e(1),C=new e(0),U=g.clone();a.cmpn(1)>0&&g.cmpn(1)>0;){for(var V=0,I=1;0==(a.words[0]&I)&&V<26;++V,I<<=1);if(V>0)for(a.iushrn(V);V-- >0;)x.isOdd()&&x.iadd(U),x.iushrn(1);for(var W=0,F=1;0==(g.words[0]&F)&&W<26;++W,F<<=1);if(W>0)for(g.iushrn(W);W-- >0;)C.isOdd()&&C.iadd(U),C.iushrn(1);a.cmp(g)>=0?(a.isub(g),x.isub(C)):(g.isub(a),C.isub(x))}return(M=0===a.cmpn(1)?x:C).cmpn(0)<0&&M.iadd(r),M},e.prototype.gcd=function(r){if(this.isZero())return r.abs();if(r.isZero())return this.abs();var a=this.clone(),g=r.clone();a.negative=0,g.negative=0;for(var M=0;a.isEven()&&g.isEven();M++)a.iushrn(1),g.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;g.isEven();)g.iushrn(1);var x=a.cmp(g);if(x<0){var C=a;a=g,g=C}else if(0===x||0===g.cmpn(1))break;a.isub(g)}return g.iushln(M)},e.prototype.invm=function(r){return this.egcd(r).a.umod(r)},e.prototype.isEven=function(){return 0==(1&this.words[0])},e.prototype.isOdd=function(){return 1==(1&this.words[0])},e.prototype.andln=function(r){return this.words[0]&r},e.prototype.bincn=function(r){n("number"==typeof r);var a=r%26,g=(r-a)/26,M=1<>>26,this.words[C]=U&=67108863}return 0!==x&&(this.words[C]=x,this.length++),this},e.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},e.prototype.cmpn=function(r){var a,g=r<0;if(0!==this.negative&&!g)return-1;if(0===this.negative&&g)return 1;if(this._strip(),this.length>1)a=1;else{g&&(r=-r),n(r<=67108863,"Number is too big");var M=0|this.words[0];a=M===r?0:Mr.length)return 1;if(this.length=0;g--){var M=0|this.words[g],x=0|r.words[g];if(M!==x){Mx&&(a=1);break}}return a},e.prototype.gtn=function(r){return 1===this.cmpn(r)},e.prototype.gt=function(r){return 1===this.cmp(r)},e.prototype.gten=function(r){return this.cmpn(r)>=0},e.prototype.gte=function(r){return this.cmp(r)>=0},e.prototype.ltn=function(r){return-1===this.cmpn(r)},e.prototype.lt=function(r){return-1===this.cmp(r)},e.prototype.lten=function(r){return this.cmpn(r)<=0},e.prototype.lte=function(r){return this.cmp(r)<=0},e.prototype.eqn=function(r){return 0===this.cmpn(r)},e.prototype.eq=function(r){return 0===this.cmp(r)},e.red=function(r){return new E(r)},e.prototype.toRed=function(r){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),r.convertTo(this)._forceRed(r)},e.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},e.prototype._forceRed=function(r){return this.red=r,this},e.prototype.forceRed=function(r){return n(!this.red,"Already a number in reduction context"),this._forceRed(r)},e.prototype.redAdd=function(r){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,r)},e.prototype.redIAdd=function(r){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,r)},e.prototype.redSub=function(r){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,r)},e.prototype.redISub=function(r){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,r)},e.prototype.redShl=function(r){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,r)},e.prototype.redMul=function(r){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,r),this.red.mul(this,r)},e.prototype.redIMul=function(r){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,r),this.red.imul(this,r)},e.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},e.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},e.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},e.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},e.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},e.prototype.redPow=function(r){return n(this.red&&!r.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,r)};var L={k256:null,p224:null,p192:null,p25519:null};function H(r,a){this.name=r,this.p=new e(a,16),this.n=this.p.bitLength(),this.k=new e(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function D(){H.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function q(){H.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){H.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function p(){H.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(r){if("string"==typeof r){var a=e._prime(r);this.m=a.p,this.prime=a}else n(r.gtn(1),"modulus must be greater than 1"),this.m=r,this.prime=null}function R(r){E.call(this,r),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new e(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)}H.prototype._tmp=function(){var r=new e(null);return r.words=new Array(Math.ceil(this.n/13)),r},H.prototype.ireduce=function(r){var a,g=r;do{this.split(g,this.tmp),a=(g=(g=this.imulK(g)).iadd(this.tmp)).bitLength()}while(a>this.n);var M=a0?g.isub(this.p):void 0!==g.strip?g.strip():g._strip(),g},H.prototype.split=function(r,a){r.iushrn(this.n,0,a)},H.prototype.imulK=function(r){return r.imul(this.k)},o(D,H),D.prototype.split=function(r,a){for(var g=Math.min(r.length,9),M=0;M>>22,x=C}r.words[M-10]=x>>>=22,r.length-=0===x&&r.length>10?10:9},D.prototype.imulK=function(r){r.words[r.length]=0,r.words[r.length+1]=0,r.length+=2;for(var a=0,g=0;g>>=26,r.words[g]=x,a=M}return 0!==a&&(r.words[r.length++]=a),r},e._prime=function(r){if(L[r])return L[r];var a;if("k256"===r)a=new D;else if("p224"===r)a=new q;else if("p192"===r)a=new k;else{if("p25519"!==r)throw new Error("Unknown prime "+r);a=new p}return L[r]=a,a},E.prototype._verify1=function(r){n(0===r.negative,"red works only with positives"),n(r.red,"red works only with red numbers")},E.prototype._verify2=function(r,a){n(0==(r.negative|a.negative),"red works only with positives"),n(r.red&&r.red===a.red,"red works only with red numbers")},E.prototype.imod=function(r){return this.prime?this.prime.ireduce(r)._forceRed(this):(u(r,r.umod(this.m)._forceRed(this)),r)},E.prototype.neg=function(r){return r.isZero()?r.clone():this.m.sub(r)._forceRed(this)},E.prototype.add=function(r,a){this._verify2(r,a);var g=r.add(a);return g.cmp(this.m)>=0&&g.isub(this.m),g._forceRed(this)},E.prototype.iadd=function(r,a){this._verify2(r,a);var g=r.iadd(a);return g.cmp(this.m)>=0&&g.isub(this.m),g},E.prototype.sub=function(r,a){this._verify2(r,a);var g=r.sub(a);return g.cmpn(0)<0&&g.iadd(this.m),g._forceRed(this)},E.prototype.isub=function(r,a){this._verify2(r,a);var g=r.isub(a);return g.cmpn(0)<0&&g.iadd(this.m),g},E.prototype.shl=function(r,a){return this._verify1(r),this.imod(r.ushln(a))},E.prototype.imul=function(r,a){return this._verify2(r,a),this.imod(r.imul(a))},E.prototype.mul=function(r,a){return this._verify2(r,a),this.imod(r.mul(a))},E.prototype.isqr=function(r){return this.imul(r,r.clone())},E.prototype.sqr=function(r){return this.mul(r,r)},E.prototype.sqrt=function(r){if(r.isZero())return r.clone();var a=this.m.andln(3);if(n(a%2==1),3===a){var g=this.m.add(new e(1)).iushrn(2);return this.pow(r,g)}for(var M=this.m.subn(1),x=0;!M.isZero()&&0===M.andln(1);)x++,M.iushrn(1);n(!M.isZero());var C=new e(1).toRed(this),U=C.redNeg(),V=this.m.subn(1).iushrn(1),I=this.m.bitLength();for(I=new e(2*I*I).toRed(this);0!==this.pow(I,V).cmp(U);)I.redIAdd(U);for(var W=this.pow(I,M),F=this.pow(r,M.addn(1).iushrn(1)),B=this.pow(r,M),N=x;0!==B.cmp(C);){for(var P=B,j=0;0!==P.cmp(C);j++)P=P.redSqr();n(j=0;M--){for(var I=a.words[M],W=V-1;W>=0;W--){var F=I>>W&1;x!==g[0]&&(x=this.sqr(x)),0!==F||0!==C?(C<<=1,C|=F,(4==++U||0===M&&0===W)&&(x=this.mul(x,g[C]),U=0,C=0)):U=0}V=26}return x},E.prototype.convertTo=function(r){var a=r.umod(this.m);return a===r?a.clone():a},E.prototype.convertFrom=function(r){var a=r.clone();return a.red=null,a},e.mont=function(r){return new R(r)},o(R,E),R.prototype.convertTo=function(r){return this.imod(r.ushln(this.shift))},R.prototype.convertFrom=function(r){var a=this.imod(r.mul(this.rinv));return a.red=null,a},R.prototype.imul=function(r,a){if(r.isZero()||a.isZero())return r.words[0]=0,r.length=1,r;var g=r.imul(a),M=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=g.isub(M).iushrn(this.shift),C=x;return x.cmp(this.m)>=0?C=x.isub(this.m):x.cmpn(0)<0&&(C=x.iadd(this.m)),C._forceRed(this)},R.prototype.mul=function(r,a){if(r.isZero()||a.isZero())return new e(0)._forceRed(this);var g=r.mul(a),M=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=g.isub(M).iushrn(this.shift),C=x;return x.cmp(this.m)>=0?C=x.isub(this.m):x.cmpn(0)<0&&(C=x.iadd(this.m)),C._forceRed(this)},R.prototype.invm=function(r){return this.imod(r._invmp(this.m).mul(this.r2))._forceRed(this)}}(s,this)}).call(this,f(25)(z))},function(z,l){},function(z,l,f){"use strict";var s=f(3),m=f(127),y=f(13).Buffer,n=new Array(16);function o(){m.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function e(u,d){return u<>>32-d}function t(u,d,_,v,T,O,b){return e(u+(d&_|~d&v)+T+O|0,b)+d|0}function i(u,d,_,v,T,O,b){return e(u+(d&v|_&~v)+T+O|0,b)+d|0}function c(u,d,_,v,T,O,b){return e(u+(d^_^v)+T+O|0,b)+d|0}function h(u,d,_,v,T,O,b){return e(u+(_^(d|~v))+T+O|0,b)+d|0}s(o,m),o.prototype._update=function(){for(var u=n,d=0;d<16;++d)u[d]=this._block.readInt32LE(4*d);var _=this._a,v=this._b,T=this._c,O=this._d;_=t(_,v,T,O,u[0],3614090360,7),O=t(O,_,v,T,u[1],3905402710,12),T=t(T,O,_,v,u[2],606105819,17),v=t(v,T,O,_,u[3],3250441966,22),_=t(_,v,T,O,u[4],4118548399,7),O=t(O,_,v,T,u[5],1200080426,12),T=t(T,O,_,v,u[6],2821735955,17),v=t(v,T,O,_,u[7],4249261313,22),_=t(_,v,T,O,u[8],1770035416,7),O=t(O,_,v,T,u[9],2336552879,12),T=t(T,O,_,v,u[10],4294925233,17),v=t(v,T,O,_,u[11],2304563134,22),_=t(_,v,T,O,u[12],1804603682,7),O=t(O,_,v,T,u[13],4254626195,12),T=t(T,O,_,v,u[14],2792965006,17),_=i(_,v=t(v,T,O,_,u[15],1236535329,22),T,O,u[1],4129170786,5),O=i(O,_,v,T,u[6],3225465664,9),T=i(T,O,_,v,u[11],643717713,14),v=i(v,T,O,_,u[0],3921069994,20),_=i(_,v,T,O,u[5],3593408605,5),O=i(O,_,v,T,u[10],38016083,9),T=i(T,O,_,v,u[15],3634488961,14),v=i(v,T,O,_,u[4],3889429448,20),_=i(_,v,T,O,u[9],568446438,5),O=i(O,_,v,T,u[14],3275163606,9),T=i(T,O,_,v,u[3],4107603335,14),v=i(v,T,O,_,u[8],1163531501,20),_=i(_,v,T,O,u[13],2850285829,5),O=i(O,_,v,T,u[2],4243563512,9),T=i(T,O,_,v,u[7],1735328473,14),_=c(_,v=i(v,T,O,_,u[12],2368359562,20),T,O,u[5],4294588738,4),O=c(O,_,v,T,u[8],2272392833,11),T=c(T,O,_,v,u[11],1839030562,16),v=c(v,T,O,_,u[14],4259657740,23),_=c(_,v,T,O,u[1],2763975236,4),O=c(O,_,v,T,u[4],1272893353,11),T=c(T,O,_,v,u[7],4139469664,16),v=c(v,T,O,_,u[10],3200236656,23),_=c(_,v,T,O,u[13],681279174,4),O=c(O,_,v,T,u[0],3936430074,11),T=c(T,O,_,v,u[3],3572445317,16),v=c(v,T,O,_,u[6],76029189,23),_=c(_,v,T,O,u[9],3654602809,4),O=c(O,_,v,T,u[12],3873151461,11),T=c(T,O,_,v,u[15],530742520,16),_=h(_,v=c(v,T,O,_,u[2],3299628645,23),T,O,u[0],4096336452,6),O=h(O,_,v,T,u[7],1126891415,10),T=h(T,O,_,v,u[14],2878612391,15),v=h(v,T,O,_,u[5],4237533241,21),_=h(_,v,T,O,u[12],1700485571,6),O=h(O,_,v,T,u[3],2399980690,10),T=h(T,O,_,v,u[10],4293915773,15),v=h(v,T,O,_,u[1],2240044497,21),_=h(_,v,T,O,u[8],1873313359,6),O=h(O,_,v,T,u[15],4264355552,10),T=h(T,O,_,v,u[6],2734768916,15),v=h(v,T,O,_,u[13],1309151649,21),_=h(_,v,T,O,u[4],4149444226,6),O=h(O,_,v,T,u[11],3174756917,10),T=h(T,O,_,v,u[2],718787259,15),v=h(v,T,O,_,u[9],3951481745,21),this._a=this._a+_|0,this._b=this._b+v|0,this._c=this._c+T|0,this._d=this._d+O|0},o.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var u=y.allocUnsafe(16);return u.writeInt32LE(this._a,0),u.writeInt32LE(this._b,4),u.writeInt32LE(this._c,8),u.writeInt32LE(this._d,12),u},z.exports=o},function(z,l,f){(l=z.exports=f(128)).Stream=l,l.Readable=l,l.Writable=f(132),l.Duplex=f(30),l.Transform=f(133),l.PassThrough=f(278),l.finished=f(62),l.pipeline=f(279)},function(z,l){},function(z,l,f){"use strict";function s(t,i){var c=Object.keys(t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(t);i&&(h=h.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),c.push.apply(c,h)}return c}function m(t,i,c){return i in t?Object.defineProperty(t,i,{value:c,enumerable:!0,configurable:!0,writable:!0}):t[i]=c,t}function y(t,i){for(var c=0;c0?this.tail.next=d:this.head=d,this.tail=d,++this.length}},{key:"unshift",value:function(u){var d={data:u,next:this.head};0===this.length&&(this.tail=d),this.head=d,++this.length}},{key:"shift",value:function(){if(0!==this.length){var u=this.head.data;return this.head=1===this.length?this.tail=null:this.head.next,--this.length,u}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(u){if(0===this.length)return"";for(var d=this.head,_=""+d.data;d=d.next;)_+=u+d.data;return _}},{key:"concat",value:function(u){if(0===this.length)return n.alloc(0);for(var T=n.allocUnsafe(u>>>0),O=this.head,b=0;O;)n.prototype.copy.call(O.data,T,b),b+=O.data.length,O=O.next;return T}},{key:"consume",value:function(u,d){var _;return uT.length?T.length:u;if(v+=O===T.length?T:T.slice(0,u),0==(u-=O)){O===T.length?(++_,this.head=d.next?d.next:this.tail=null):(this.head=d,d.data=T.slice(O));break}++_}return this.length-=_,v}},{key:"_getBuffer",value:function(u){var d=n.allocUnsafe(u),_=this.head,v=1;for(_.data.copy(d),u-=_.data.length;_=_.next;){var T=_.data,O=u>T.length?T.length:u;if(T.copy(d,d.length-u,0,O),0==(u-=O)){O===T.length?(++v,this.head=_.next?_.next:this.tail=null):(this.head=_,_.data=T.slice(O));break}++v}return this.length-=v,d}},{key:e,value:function(u,d){return o(this,function(_){for(var v=1;v0,function(w){_||(_=w),w&&T.forEach(t),S||(T.forEach(t),v(_))})});return u.reduce(i)}},function(z,l,f){"use strict";var s=f(2).Buffer,m=f(3),y=f(127),n=new Array(16),o=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],e=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],t=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],i=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],c=[0,1518500249,1859775393,2400959708,2840853838],h=[1352829926,1548603684,1836072691,2053994217,0];function u(){y.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function d(S,w){return S<>>32-w}function _(S,w,A,L,H,D,q,k){return d(S+(w^A^L)+D+q|0,k)+H|0}function v(S,w,A,L,H,D,q,k){return d(S+(w&A|~w&L)+D+q|0,k)+H|0}function T(S,w,A,L,H,D,q,k){return d(S+((w|~A)^L)+D+q|0,k)+H|0}function O(S,w,A,L,H,D,q,k){return d(S+(w&L|A&~L)+D+q|0,k)+H|0}function b(S,w,A,L,H,D,q,k){return d(S+(w^(A|~L))+D+q|0,k)+H|0}m(u,y),u.prototype._update=function(){for(var S=n,w=0;w<16;++w)S[w]=this._block.readInt32LE(4*w);for(var A=0|this._a,L=0|this._b,H=0|this._c,D=0|this._d,q=0|this._e,k=0|this._a,p=0|this._b,E=0|this._c,R=0|this._d,r=0|this._e,a=0;a<80;a+=1){var g,M;a<16?(g=_(A,L,H,D,q,S[o[a]],c[0],t[a]),M=b(k,p,E,R,r,S[e[a]],h[0],i[a])):a<32?(g=v(A,L,H,D,q,S[o[a]],c[1],t[a]),M=O(k,p,E,R,r,S[e[a]],h[1],i[a])):a<48?(g=T(A,L,H,D,q,S[o[a]],c[2],t[a]),M=T(k,p,E,R,r,S[e[a]],h[2],i[a])):a<64?(g=O(A,L,H,D,q,S[o[a]],c[3],t[a]),M=v(k,p,E,R,r,S[e[a]],h[3],i[a])):(g=b(A,L,H,D,q,S[o[a]],c[4],t[a]),M=_(k,p,E,R,r,S[e[a]],h[4],i[a])),A=q,q=D,D=d(H,10),H=L,L=g,k=r,r=R,R=d(E,10),E=p,p=M}var x=this._b+H+R|0;this._b=this._c+D+r|0,this._c=this._d+q+k|0,this._d=this._e+A+p|0,this._e=this._a+L+E|0,this._a=x},u.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var S=s.alloc?s.alloc(20):new s(20);return S.writeInt32LE(this._a,0),S.writeInt32LE(this._b,4),S.writeInt32LE(this._c,8),S.writeInt32LE(this._d,12),S.writeInt32LE(this._e,16),S},z.exports=u},function(z,l,f){(l=z.exports=function(s){s=s.toLowerCase();var m=l[s];if(!m)throw new Error(s+" is not supported (we accept pull requests)");return new m}).sha=f(282),l.sha1=f(283),l.sha224=f(284),l.sha256=f(134),l.sha384=f(285),l.sha512=f(135)},function(z,l,f){var s=f(3),m=f(31),y=f(13).Buffer,n=[1518500249,1859775393,-1894007588,-899497514],o=new Array(80);function e(){this.init(),this._w=o,m.call(this,64,56)}function t(c){return c<<30|c>>>2}function i(c,h,u,d){return 0===c?h&u|~h&d:2===c?h&u|h&d|u&d:h^u^d}s(e,m),e.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},e.prototype._update=function(c){for(var h,u=this._w,d=0|this._a,_=0|this._b,v=0|this._c,T=0|this._d,O=0|this._e,b=0;b<16;++b)u[b]=c.readInt32BE(4*b);for(;b<80;++b)u[b]=u[b-3]^u[b-8]^u[b-14]^u[b-16];for(var S=0;S<80;++S){var w=~~(S/20),A=0|((h=d)<<5|h>>>27)+i(w,_,v,T)+O+u[S]+n[w];O=T,T=v,v=t(_),_=d,d=A}this._a=d+this._a|0,this._b=_+this._b|0,this._c=v+this._c|0,this._d=T+this._d|0,this._e=O+this._e|0},e.prototype._hash=function(){var c=y.allocUnsafe(20);return c.writeInt32BE(0|this._a,0),c.writeInt32BE(0|this._b,4),c.writeInt32BE(0|this._c,8),c.writeInt32BE(0|this._d,12),c.writeInt32BE(0|this._e,16),c},z.exports=e},function(z,l,f){var s=f(3),m=f(31),y=f(13).Buffer,n=[1518500249,1859775393,-1894007588,-899497514],o=new Array(80);function e(){this.init(),this._w=o,m.call(this,64,56)}function t(h){return h<<5|h>>>27}function i(h){return h<<30|h>>>2}function c(h,u,d,_){return 0===h?u&d|~u&_:2===h?u&d|u&_|d&_:u^d^_}s(e,m),e.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},e.prototype._update=function(h){for(var u,d=this._w,_=0|this._a,v=0|this._b,T=0|this._c,O=0|this._d,b=0|this._e,S=0;S<16;++S)d[S]=h.readInt32BE(4*S);for(;S<80;++S)d[S]=(u=d[S-3]^d[S-8]^d[S-14]^d[S-16])<<1|u>>>31;for(var w=0;w<80;++w){var A=~~(w/20),L=t(_)+c(A,v,T,O)+b+d[w]+n[A]|0;b=O,O=T,T=i(v),v=_,_=L}this._a=_+this._a|0,this._b=v+this._b|0,this._c=T+this._c|0,this._d=O+this._d|0,this._e=b+this._e|0},e.prototype._hash=function(){var h=y.allocUnsafe(20);return h.writeInt32BE(0|this._a,0),h.writeInt32BE(0|this._b,4),h.writeInt32BE(0|this._c,8),h.writeInt32BE(0|this._d,12),h.writeInt32BE(0|this._e,16),h},z.exports=e},function(z,l,f){var s=f(3),m=f(134),y=f(31),n=f(13).Buffer,o=new Array(64);function e(){this.init(),this._w=o,y.call(this,64,56)}s(e,m),e.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},e.prototype._hash=function(){var t=n.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},z.exports=e},function(z,l,f){var s=f(3),m=f(135),y=f(31),n=f(13).Buffer,o=new Array(160);function e(){this.init(),this._w=o,y.call(this,128,112)}s(e,m),e.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},e.prototype._hash=function(){var t=n.allocUnsafe(48);function i(c,h,u){t.writeInt32BE(c,u),t.writeInt32BE(h,u+4)}return i(this._ah,this._al,0),i(this._bh,this._bl,8),i(this._ch,this._cl,16),i(this._dh,this._dl,24),i(this._eh,this._el,32),i(this._fh,this._fl,40),t},z.exports=e},function(z,l,f){var s=f(13).Buffer,m=f(287).Transform,y=f(20).StringDecoder;function n(o){m.call(this),this.hashMode="string"==typeof o,this.hashMode?this[o]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}f(3)(n,m),n.prototype.update=function(o,e,t){"string"==typeof o&&(o=s.from(o,e));var i=this._update(o);return this.hashMode?this:(t&&(i=this._toString(i,t)),i)},n.prototype.setAutoPadding=function(){},n.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},n.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},n.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},n.prototype._transform=function(o,e,t){var i;try{this.hashMode?this._update(o):this.push(this._update(o))}catch(c){i=c}finally{t(i)}},n.prototype._flush=function(o){var e;try{this.push(this.__final())}catch(t){e=t}o(e)},n.prototype._finalOrDigest=function(o){var e=this.__final()||s.alloc(0);return o&&(e=this._toString(e,o,!0)),e},n.prototype._toString=function(o,e,t){if(this._decoder||(this._decoder=new y(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var i=this._decoder.write(o);return t&&(i+=this._decoder.end()),i},z.exports=n},function(z,l,f){z.exports=m;var s=f(12).EventEmitter;function m(){s.call(this)}f(3)(m,s),m.Readable=f(34),m.Writable=f(288),m.Duplex=f(289),m.Transform=f(290),m.PassThrough=f(291),m.Stream=m,m.prototype.pipe=function(y,n){var o=this;function e(_){y.writable&&!1===y.write(_)&&o.pause&&o.pause()}function t(){o.readable&&o.resume&&o.resume()}o.on("data",e),y.on("drain",t),y._isStdio||n&&!1===n.end||(o.on("end",c),o.on("close",h));var i=!1;function c(){i||(i=!0,y.end())}function h(){i||(i=!0,"function"==typeof y.destroy&&y.destroy())}function u(_){if(d(),0===s.listenerCount(this,"error"))throw _}function d(){o.removeListener("data",e),y.removeListener("drain",t),o.removeListener("end",c),o.removeListener("close",h),o.removeListener("error",u),y.removeListener("error",u),o.removeListener("end",d),o.removeListener("close",d),y.removeListener("close",d)}return o.on("error",u),y.on("error",u),o.on("end",d),o.on("close",d),y.on("close",d),y.emit("pipe",o),y}},function(z,l,f){z.exports=f(53)},function(z,l,f){z.exports=f(19)},function(z,l,f){z.exports=f(34).Transform},function(z,l,f){z.exports=f(34).PassThrough},function(z,l,f){var s=f(2),m=s.Buffer;function y(o,e){for(var t in o)e[t]=o[t]}function n(o,e,t){return m(o,e,t)}m.from&&m.alloc&&m.allocUnsafe&&m.allocUnsafeSlow?z.exports=s:(y(s,l),l.Buffer=n),y(m,n),n.from=function(o,e,t){if("number"==typeof o)throw new TypeError("Argument must not be a number");return m(o,e,t)},n.alloc=function(o,e,t){if("number"!=typeof o)throw new TypeError("Argument must be a number");var i=m(o);return void 0!==e?"string"==typeof t?i.fill(e,t):i.fill(e):i.fill(0),i},n.allocUnsafe=function(o){if("number"!=typeof o)throw new TypeError("Argument must be a number");return m(o)},n.allocUnsafeSlow=function(o){if("number"!=typeof o)throw new TypeError("Argument must be a number");return s.SlowBuffer(o)}},function(z,l,f){var s=f(136);z.exports=function(m){return"string"!=typeof m?m:s(m)?m.slice(2):m}},function(z,l,f){const s=f(137),m=f(295);function y(n,o){return new Promise(e=>{const t=setTimeout(e,n);t.unref&&o&&t.unref()})}z.exports=class extends m{constructor(n={}){if(!n.provider)throw new Error("PollingBlockTracker - no provider specified.");const o=n.pollingInterval||2e4,e=n.retryTimeout||o/10,t=void 0===n.keepEventLoopActive||n.keepEventLoopActive,i=n.setSkipCacheFlag||!1;super(Object.assign({blockResetDuration:o},n)),this._provider=n.provider,this._pollingInterval=o,this._retryTimeout=e,this._keepEventLoopActive=t,this._setSkipCacheFlag=i}checkForLatestBlock(){var n=this;return ge(function*(){return yield n._updateLatestBlock(),yield n.getLatestBlock()})()}_start(){this._performSync().catch(n=>this.emit("error",n))}_performSync(){var n=this;return ge(function*(){for(;n._isRunning;)try{yield n._updateLatestBlock(),yield y(n._pollingInterval,!n._keepEventLoopActive)}catch(o){const e=new Error("PollingBlockTracker - encountered an error while attempting to update latest block:\n"+o.stack);try{n.emit("error",e)}catch{console.error(e)}yield y(n._retryTimeout,!n._keepEventLoopActive)}})()}_updateLatestBlock(){var n=this;return ge(function*(){const o=yield n._fetchLatestBlock();n._newPotentialLatest(o)})()}_fetchLatestBlock(){var n=this;return ge(function*(){const o={jsonrpc:"2.0",id:1,method:"eth_blockNumber",params:[]};n._setSkipCacheFlag&&(o.skipCache=!0);const e=yield s(t=>n._provider.sendAsync(o,t))();if(e.error)throw new Error("PollingBlockTracker - encountered error fetching block:\n"+e.error);return e.result})()}}},function(z,l,f){f(138),f(137);const s=f(297),m=(o,e)=>o+e,y=["sync","latest"];function n(o){return Number.parseInt(o,16)}z.exports=class extends s{constructor(o={}){super(),this._blockResetDuration=o.blockResetDuration||2e4,this._currentBlock=null,this._isRunning=!1,this._onNewListener=this._onNewListener.bind(this),this._onRemoveListener=this._onRemoveListener.bind(this),this._resetCurrentBlock=this._resetCurrentBlock.bind(this),this._setupInternalEvents()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}getLatestBlock(){var o=this;return ge(function*(){return o._currentBlock?o._currentBlock:yield new Promise(e=>o.once("latest",e))})()}removeAllListeners(o){o?super.removeAllListeners(o):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener()}_start(){}_end(){}_setupInternalEvents(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}_onNewListener(o,e){y.includes(o)&&this._maybeStart()}_onRemoveListener(o,e){this._getBlockTrackerEventCount()>0||this._maybeEnd()}_maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),this._start())}_maybeEnd(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),this._end())}_getBlockTrackerEventCount(){return y.map(o=>this.listenerCount(o)).reduce(m)}_newPotentialLatest(o){const e=this._currentBlock;e&&n(o)<=n(e)||this._setCurrentBlock(o)}_setCurrentBlock(o){const e=this._currentBlock;this._currentBlock=o,this.emit("latest",o),this.emit("sync",{oldBlock:e,newBlock:o})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}}},function(z,l){z.exports=function(f){var s=(f=f||{}).max||Number.MAX_SAFE_INTEGER,m=void 0!==f.start?f.start:Math.floor(Math.random()*s);return function(){return m%=s,m++}}},function(z,l,f){const s=f(21),m=f(12);var y="object"==typeof Reflect?Reflect:null,n=y&&"function"==typeof y.apply?y.apply:function(i,c,h){return Function.prototype.apply.call(i,c,h)};function o(){m.call(this)}function e(i,c,h){try{n(i,c,h)}catch(u){setTimeout(()=>{throw u})}}function t(i,c){for(var h=new Array(c),u=0;u0&&(_=c[0]),_ instanceof Error)throw _;var v=new Error("Unhandled error."+(_?" ("+_.message+")":""));throw v.context=_,v}var T=d[i];if(void 0===T)return!1;if("function"==typeof T)e(T,this,c);else{var O=T.length,b=t(T,O);for(h=0;h-1&&s%1==0&&s="0"&&s<="9";)u+=s,e();if("."===s)for(u+=".";e()&&s>="0"&&s<="9";)u+=s;if("e"===s||"E"===s)for(u+=s,e(),"-"!==s&&"+"!==s||(u+=s,e());s>="0"&&s<="9";)u+=s,e();if(h=+u,isFinite(h))return h;o("Bad number")},i=function(){var h,u,d,_="";if('"'===s)for(;e();){if('"'===s)return e(),_;if("\\"===s)if(e(),"u"===s){for(d=0,u=0;u<4&&(h=parseInt(e(),16),isFinite(h));u+=1)d=16*d+h;_+=String.fromCharCode(d)}else{if("string"!=typeof n[s])break;_+=n[s]}else _+=s}o("Bad string")},c=function(){for(;s&&s<=" ";)e()};y=function(){switch(c(),s){case"{":return function(){var h,u={};if("{"===s){if(e("{"),c(),"}"===s)return e("}"),u;for(;s;){if(h=i(),c(),e(":"),Object.hasOwnProperty.call(u,h)&&o('Duplicate key "'+h+'"'),u[h]=y(),c(),"}"===s)return e("}"),u;e(","),c()}}o("Bad object")}();case"[":return function(){var h=[];if("["===s){if(e("["),c(),"]"===s)return e("]"),h;for(;s;){if(h.push(y()),c(),"]"===s)return e("]"),h;e(","),c()}}o("Bad array")}();case'"':return i();case"-":return t();default:return s>="0"&&s<="9"?t():function(){switch(s){case"t":return e("t"),e("r"),e("u"),e("e"),!0;case"f":return e("f"),e("a"),e("l"),e("s"),e("e"),!1;case"n":return e("n"),e("u"),e("l"),e("l"),null}o("Unexpected '"+s+"'")}()}},z.exports=function(h,u){var d;return m=h,f=0,s=" ",d=y(),c(),s&&o("Syntax error"),"function"==typeof u?function _(v,T){var O,b,S=v[T];if(S&&"object"==typeof S)for(O in S)Object.prototype.hasOwnProperty.call(S,O)&&(void 0!==(b=_(S,O))?S[O]=b:delete S[O]);return u.call(v,T,S)}({"":d},""):d}},function(z,l){var f,s,m,y=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function o(e){return y.lastIndex=0,y.test(e)?'"'+e.replace(y,function(t){var i=n[t];return"string"==typeof i?i:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}z.exports=function(e,t,i){var c;if(f="",s="","number"==typeof i)for(c=0;cm(Object.assign({blockTracker:n},y)))}}},function(z,l,f){const s=f(336),m=f(337),y=[void 0,null,""];z.exports=function(o={}){const{blockTracker:e}=o;if(!e)throw new Error("createBlockCacheMiddleware - No BlockTracker specified");const t=new n,i={perma:t,block:t,fork:t};return m(function(){var c=ge(function*(h,u,d){if(h.skipCache)return d();const _=s.cacheTypeForPayload(h),v=i[_];if(!v||!v.canCacheRequest(h))return d();let T,O=s.blockTagForPayload(h);if(O||(O="latest"),"earliest"===O)T="0x00";else if("latest"===O){const S=yield e.getLatestBlock();t.clearBefore(S),T=S}else T=O;const b=yield v.get(h,T);void 0===b?(yield d(),yield v.set(h,T,u.result)):u.result=b});return function(h,u,d){return c.apply(this,arguments)}}())};class n{constructor(){this.cache={}}getBlockCacheForPayload(e,t){const i=Number.parseInt(t,16);let c=this.cache[i];if(!c){const h={};this.cache[i]=h,c=h}return c}get(e,t){var i=this;return ge(function*(){const c=i.getBlockCacheForPayload(e,t);if(c)return c[s.cacheIdentifierForPayload(e,!0)]})()}set(e,t,i){var c=this;return ge(function*(){!c.canCacheResult(e,i)||(c.getBlockCacheForPayload(e,t)[s.cacheIdentifierForPayload(e,!0)]=i)})()}canCacheRequest(e){return!!s.canCache(e)&&"pending"!==s.blockTagForPayload(e)}canCacheResult(e,t){if(!y.includes(t))return!!(!["eth_getTransactionByHash","eth_getTransactionReceipt"].includes(e.method)||t&&t.blockHash&&"0x0000000000000000000000000000000000000000000000000000000000000000"!==t.blockHash)}clearBefore(e){const t=this,i=Number.parseInt(e,16);Object.keys(t.cache).map(Number).filter(c=>cdelete t.cache[c])}}},function(z,l,f){const s=f(150);function m(e){return"never"!==o(e)}function y(e){const t=n(e);return t>=e.params.length?e.params:"eth_getBlockByNumber"===e.method?e.params.slice(1):e.params.slice(0,t)}function n(e){switch(e.method){case"eth_getStorageAt":return 2;case"eth_getBalance":case"eth_getCode":case"eth_getTransactionCount":case"eth_call":return 1;case"eth_getBlockByNumber":return 0;default:return}}function o(e){switch(e.method){case"web3_clientVersion":case"web3_sha3":case"eth_protocolVersion":case"eth_getBlockTransactionCountByHash":case"eth_getUncleCountByBlockHash":case"eth_getCode":case"eth_getBlockByHash":case"eth_getTransactionByHash":case"eth_getTransactionByBlockHashAndIndex":case"eth_getTransactionReceipt":case"eth_getUncleByBlockHashAndIndex":case"eth_getCompilers":case"eth_compileLLL":case"eth_compileSolidity":case"eth_compileSerpent":case"shh_version":case"test_permaCache":return"perma";case"eth_getBlockByNumber":case"eth_getBlockTransactionCountByNumber":case"eth_getUncleCountByBlockNumber":case"eth_getTransactionByBlockNumberAndIndex":case"eth_getUncleByBlockNumberAndIndex":case"test_forkCache":return"fork";case"eth_gasPrice":case"eth_blockNumber":case"eth_getBalance":case"eth_getStorageAt":case"eth_getTransactionCount":case"eth_call":case"eth_estimateGas":case"eth_getFilterLogs":case"eth_getLogs":case"test_blockCache":return"block";case"net_version":case"net_peerCount":case"net_listening":case"eth_syncing":case"eth_sign":case"eth_coinbase":case"eth_mining":case"eth_hashrate":case"eth_accounts":case"eth_sendTransaction":case"eth_sendRawTransaction":case"eth_newFilter":case"eth_newBlockFilter":case"eth_newPendingTransactionFilter":case"eth_uninstallFilter":case"eth_getFilterChanges":case"eth_getWork":case"eth_submitWork":case"eth_submitHashrate":case"db_putString":case"db_getString":case"db_putHex":case"db_getHex":case"shh_post":case"shh_newIdentity":case"shh_hasIdentity":case"shh_newGroup":case"shh_addToGroup":case"shh_newFilter":case"shh_uninstallFilter":case"shh_getFilterChanges":case"shh_getMessages":case"test_neverCache":return"never"}}z.exports={cacheIdentifierForPayload:function(e,t){const i=t?y(e):e.params;return m(e)?e.method+":"+s(i):null},canCache:m,blockTagForPayload:function(e){let t=n(e);return t>=e.params.length?null:e.params[t]},paramsWithoutBlockTag:y,blockTagParamIndex:n,cacheTypeForPayload:o}},function(z,l){z.exports=function(f){return(s,m,y,n)=>{let o;const e=new Promise(c=>{o=c});let t,i;f(s,m,ge(function*(){i=!0,y(c=>{t=c,o()}),yield e})).then(ge(function*(){i?(yield e,t(null)):n(null)})).catch(c=>{t?t(c):n(c)})}}},function(z,l,f){const s=f(21).inherits,m=f(49);function y(n){this.staticResponses=n=n||{}}z.exports=y,s(y,m),y.prototype.handleRequest=function(n,o,e){var t=this.staticResponses[n.method];"function"==typeof t?t(n,o,e):void 0!==t?setTimeout(()=>e(null,t)):o()}},function(z,l,f){const s=f(68),m=f(151);z.exports=class extends s{constructor(){super(({blockTracker:y,provider:n})=>m({blockTracker:y,provider:n}))}}},function(z,l,f){"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.createIdRemapMiddleware=void 0;const s=f(153);l.createIdRemapMiddleware=function(){return(m,y,n,o)=>{const e=m.id,t=s.getUniqueId();m.id=t,y.id=t,n(i=>{m.id=e,y.id=e,i()})}}},function(z,l,f){"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.createAsyncMiddleware=void 0,l.createAsyncMiddleware=function(s){return function(){var m=ge(function*(y,n,o,e){let t;const i=new Promise(d=>{t=d});let c=null,h=!1;const u=function(){var d=ge(function*(){h=!0,o(_=>{c=_,t()}),yield i});return function(){return d.apply(this,arguments)}}();try{yield s(y,n,u),h?(yield i,c(null)):e(null)}catch(d){c?c(d):e(d)}});return function(y,n,o,e){return m.apply(this,arguments)}}()}},function(z,l,f){"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.createScaffoldMiddleware=void 0,l.createScaffoldMiddleware=function(s){return(m,y,n,o)=>{const e=s[m.method];return void 0===e?n():"function"==typeof e?e(m,y,n,o):(y.result=e,o())}}},function(z,l,f){"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.getMessageFromCode=l.serializeError=l.EthereumProviderError=l.EthereumRpcError=l.ethErrors=l.errorCodes=void 0;const s=f(70);Object.defineProperty(l,"EthereumRpcError",{enumerable:!0,get:function(){return s.EthereumRpcError}}),Object.defineProperty(l,"EthereumProviderError",{enumerable:!0,get:function(){return s.EthereumProviderError}});const m=f(155);Object.defineProperty(l,"serializeError",{enumerable:!0,get:function(){return m.serializeError}}),Object.defineProperty(l,"getMessageFromCode",{enumerable:!0,get:function(){return m.getMessageFromCode}});const y=f(345);Object.defineProperty(l,"ethErrors",{enumerable:!0,get:function(){return y.ethErrors}});const n=f(71);Object.defineProperty(l,"errorCodes",{enumerable:!0,get:function(){return n.errorCodes}})},function(z,l){z.exports=y,y.default=y,y.stable=e,y.stableStringify=e;var f=[],s=[];function m(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function y(i,c,h,u){var d;void 0===u&&(u=m()),function v(T,O,b,S,w,A,L){var H;if(A+=1,"object"==typeof T&&null!==T){for(H=0;HL.depthLimit||void 0!==L.edgesLimit&&b+1>L.edgesLimit)return void n("[...]",T,O,w);if(S.push(T),Array.isArray(T))for(H=0;Hc?1:0}function e(i,c,h,u){void 0===u&&(u=m());var d,_=function T(O,b,S,w,A,L,H){var D;if(L+=1,"object"==typeof O&&null!==O){for(D=0;DH.depthLimit||void 0!==H.edgesLimit&&S+1>H.edgesLimit)return void n("[...]",O,b,A);if(w.push(O),Array.isArray(O))for(D=0;D0)for(var u=0;un(y.errorCodes.rpc.parse,t),invalidRequest:t=>n(y.errorCodes.rpc.invalidRequest,t),invalidParams:t=>n(y.errorCodes.rpc.invalidParams,t),methodNotFound:t=>n(y.errorCodes.rpc.methodNotFound,t),internal:t=>n(y.errorCodes.rpc.internal,t),server:t=>{if(!t||"object"!=typeof t||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:i}=t;if(!Number.isInteger(i)||i>-32005||i<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return n(i,t)},invalidInput:t=>n(y.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>n(y.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>n(y.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>n(y.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>n(y.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>n(y.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>o(y.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>o(y.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>o(y.errorCodes.provider.unsupportedMethod,t),disconnected:t=>o(y.errorCodes.provider.disconnected,t),chainDisconnected:t=>o(y.errorCodes.provider.chainDisconnected,t),custom:t=>{if(!t||"object"!=typeof t||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:i,message:c,data:h}=t;if(!c||"string"!=typeof c)throw new Error('"message" must be a nonempty string');return new s.EthereumProviderError(i,c,h)}}}},function(z,l,f){"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.mergeMiddleware=void 0;const s=f(154);l.mergeMiddleware=function(m){const y=new s.JsonRpcEngine;return m.forEach(n=>y.push(n)),y.asMiddleware()}},function(z,l){z.exports=function(f){return(s,m,y,n)=>{const o=f[s.method];return void 0===o?y():"function"==typeof o?o(s,m,y,n):(m.result=o,n())}}},function(z,l,f){const s=f(138),m=f(349),y=f(350),{hexToInt:o,incrementHexInt:e,minBlockRef:t,blockRefIsNumber:i}=f(39);z.exports=class extends y{constructor({provider:c,params:h}){super(),this.type="log",this.ethQuery=new s(c),this.params=Object.assign({fromBlock:"latest",toBlock:"latest",address:void 0,topics:[]},h),this.params.address&&(Array.isArray(this.params.address)||(this.params.address=[this.params.address]),this.params.address=this.params.address.map(u=>u.toLowerCase()))}initialize({currentBlock:c}){var h=this;return ge(function*(){let u=h.params.fromBlock;["latest","pending"].includes(u)&&(u=c),"earliest"===u&&(u="0x0"),h.params.fromBlock=u;const d=t(h.params.toBlock,c),_=Object.assign({},h.params,{toBlock:d}),v=yield h._fetchLogs(_);h.addInitialResults(v)})()}update({oldBlock:c,newBlock:h}){var u=this;return ge(function*(){const d=h;let _;_=c?e(c):h;const v=Object.assign({},u.params,{fromBlock:_,toBlock:d}),T=(yield u._fetchLogs(v)).filter(O=>u.matchLog(O));u.addResults(T)})()}_fetchLogs(c){var h=this;return ge(function*(){return yield m(u=>h.ethQuery.getLogs(c,u))()})()}matchLog(c){if(o(this.params.fromBlock)>=o(c.blockNumber)||i(this.params.toBlock)&&o(this.params.toBlock)<=o(c.blockNumber))return!1;const h=c.address&&c.address.toLowerCase();return!(this.params.address&&h&&!this.params.address.includes(h))&&this.params.topics.every((u,d)=>{let _=c.topics[d];if(!_)return!1;_=_.toLowerCase();let v=Array.isArray(u)?u:[u];return!!v.includes(null)||(v=v.map(T=>T.toLowerCase()),v.includes(_))})}}},function(z,l,f){"use strict";const s=(y,n,o,e)=>function(...t){return new n.promiseModule((i,c)=>{t.push(n.multiArgs?(...u)=>{n.errorFirst?u[0]?c(u):(u.shift(),i(u)):i(u)}:n.errorFirst?(u,d)=>{u?c(u):i(d)}:i),Reflect.apply(y,this===o?e:this,t)})},m=new WeakMap;z.exports=(y,n)=>{n={exclude:[/.+(?:Sync|Stream)$/],errorFirst:!0,promiseModule:Promise,...n};const o=typeof y;if(null===y||"object"!==o&&"function"!==o)throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${null===y?"null":o}\``);const e=new WeakMap,t=new Proxy(y,{apply(i,c,h){const u=e.get(i);if(u)return Reflect.apply(u,c,h);const d=n.excludeMain?i:s(i,n,t,i);return e.set(i,d),Reflect.apply(d,c,h)},get(i,c){const h=i[c];if(!((d,_)=>{let v=m.get(d);if(v||(v={},m.set(d,v)),_ in v)return v[_];const T=w=>"string"==typeof w||"symbol"==typeof _?_===w:w.test(_),O=Reflect.getOwnPropertyDescriptor(d,_),b=void 0===O||O.writable||O.configurable,S=(n.include?n.include.some(T):!n.exclude.some(T))&&b;return v[_]=S,S})(i,c)||h===Function.prototype[c])return h;const u=e.get(h);if(u)return u;if("function"==typeof h){const d=s(h,n,t,i);return e.set(h,d),d}return h}});return t}},function(z,l,f){const s=f(72);z.exports=class extends s{constructor(){super(),this.allResults=[]}update(){return ge(function*(){throw new Error("BaseFilterWithHistory - no update method specified")})()}addResults(m){this.allResults=this.allResults.concat(m),super.addResults(m)}addInitialResults(m){this.allResults=this.allResults.concat(m),super.addInitialResults(m)}getAllResults(){return this.allResults}}},function(z,l,f){const s=f(72),m=f(73),{incrementHexInt:y}=f(39);z.exports=class extends s{constructor({provider:n}){super(),this.type="block",this.provider=n}update({oldBlock:n,newBlock:o}){var e=this;return ge(function*(){const t=o,i=y(n),c=(yield m({provider:e.provider,fromBlock:i,toBlock:t})).map(h=>h.hash);e.addResults(c)})()}}},function(z,l,f){const s=f(72),m=f(73),{incrementHexInt:y}=f(39);z.exports=class extends s{constructor({provider:n}){super(),this.type="tx",this.provider=n}update({oldBlock:n}){var o=this;return ge(function*(){const e=n,t=y(n),i=yield m({provider:o.provider,fromBlock:t,toBlock:e}),c=[];for(const h of i)c.push(...h.transactions);o.addResults(c)})()}}},function(z,l,f){const s=f(354),m=f(355),y=f(21).inherits,n=f(36),o=f(357),e=f(44),t=f(367),i=f(49),c=f(368),h=/^[0-9A-Fa-f]+$/g;function u(b){this.nonceLock=t(1),b.getAccounts&&(this.getAccounts=b.getAccounts),b.processTransaction&&(this.processTransaction=b.processTransaction),b.processMessage&&(this.processMessage=b.processMessage),b.processPersonalMessage&&(this.processPersonalMessage=b.processPersonalMessage),b.processTypedMessage&&(this.processTypedMessage=b.processTypedMessage),this.approveTransaction=b.approveTransaction||this.autoApprove,this.approveMessage=b.approveMessage||this.autoApprove,this.approvePersonalMessage=b.approvePersonalMessage||this.autoApprove,this.approveDecryptMessage=b.approveDecryptMessage||this.autoApprove,this.approveEncryptionPublicKey=b.approveEncryptionPublicKey||this.autoApprove,this.approveTypedMessage=b.approveTypedMessage||this.autoApprove,b.signTransaction&&(this.signTransaction=b.signTransaction||O("signTransaction")),b.signMessage&&(this.signMessage=b.signMessage||O("signMessage")),b.signPersonalMessage&&(this.signPersonalMessage=b.signPersonalMessage||O("signPersonalMessage")),b.decryptMessage&&(this.decryptMessage=b.decryptMessage||O("decryptMessage")),b.encryptionPublicKey&&(this.encryptionPublicKey=b.encryptionPublicKey||O("encryptionPublicKey")),b.signTypedMessage&&(this.signTypedMessage=b.signTypedMessage||O("signTypedMessage")),b.recoverPersonalSignature&&(this.recoverPersonalSignature=b.recoverPersonalSignature),b.publishTransaction&&(this.publishTransaction=b.publishTransaction),this.estimateGas=b.estimateGas||this.estimateGas,this.getGasPrice=b.getGasPrice||this.getGasPrice}function d(b){return b.toLowerCase()}function _(b){const S=n.addHexPrefix(b);return n.isValidAddress(S)}function v(b){const S=n.addHexPrefix(b);return!n.isValidAddress(S)&&T(b)}function T(b){return"string"==typeof b&&"0x"===b.slice(0,2)&&b.slice(2).match(h)}function O(b){return function(S,w){w(new Error('ProviderEngine - HookedWalletSubprovider - Must provide "'+b+'" fn in constructor options'))}}z.exports=u,y(u,i),u.prototype.handleRequest=function(b,S,w){const A=this;let L,H,D,q,k;switch(A._parityRequests={},A._parityRequestCount=0,b.method){case"eth_coinbase":case"parity_defaultAccount":return void A.getAccounts(function(p,E){if(p)return w(p);w(null,E[0]||null)});case"eth_accounts":return void A.getAccounts(function(p,E){if(p)return w(p);w(null,E)});case"eth_sendTransaction":return L=b.params[0],void s([p=>A.validateTransaction(L,p),p=>A.processTransaction(L,p)],w);case"eth_signTransaction":return L=b.params[0],void s([p=>A.validateTransaction(L,p),p=>A.processSignTransaction(L,p)],w);case"eth_sign":return k=b.params[0],q=b.params[1],D=b.params[2]||{},H=e(D,{from:k,data:q}),void s([p=>A.validateMessage(H,p),p=>A.processMessage(H,p)],w);case"personal_sign":return function(){const p=b.params[0];if(v(b.params[1])&&_(p)){let E="The eth_personalSign method requires params ordered ";E+="[message, address]. This was previously handled incorrectly, ",E+="and has been corrected automatically. ",E+="Please switch this param order for smooth behavior in the future.",console.warn(E),k=b.params[0],q=b.params[1]}else q=b.params[0],k=b.params[1];D=b.params[2]||{},H=e(D,{from:k,data:q}),s([E=>A.validatePersonalMessage(H,E),E=>A.processPersonalMessage(H,E)],w)}();case"eth_decryptMessage":return function(){const p=b.params[0];if(v(b.params[1])&&_(p)){let E="The eth_decryptMessage method requires params ordered ";E+="[message, address]. This was previously handled incorrectly, ",E+="and has been corrected automatically. ",E+="Please switch this param order for smooth behavior in the future.",console.warn(E),k=b.params[0],q=b.params[1]}else q=b.params[0],k=b.params[1];D=b.params[2]||{},H=e(D,{from:k,data:q}),s([E=>A.validateDecryptMessage(H,E),E=>A.processDecryptMessage(H,E)],w)}();case"encryption_public_key":return function(){const p=b.params[0];s([E=>A.validateEncryptionPublicKey(p,E),E=>A.processEncryptionPublicKey(p,E)],w)}();case"personal_ecRecover":return q=b.params[0],D=b.params[2]||{},H=e(D,{sig:b.params[1],data:q}),void A.recoverPersonalSignature(H,w);case"eth_signTypedData":case"eth_signTypedData_v3":case"eth_signTypedData_v4":return function(){const p=b.params[0],E=b.params[1];_(p)?(k=p,q=E):(q=p,k=E),D=b.params[2]||{},H=e(D,{from:k,data:q}),s([R=>A.validateTypedMessage(H,R),R=>A.processTypedMessage(H,R)],w)}();case"parity_postTransaction":return L=b.params[0],void A.parityPostTransaction(L,w);case"parity_postSign":return k=b.params[0],q=b.params[1],void A.parityPostSign(k,q,w);case"parity_checkRequest":return void A.parityCheckRequest(b.params[0],w);default:return void S()}},u.prototype.getAccounts=function(b){b(null,[])},u.prototype.processTransaction=function(b,S){const w=this;s([A=>w.approveTransaction(b,A),(A,L)=>w.checkApproval("transaction",A,L),A=>w.finalizeAndSubmitTx(b,A)],S)},u.prototype.processSignTransaction=function(b,S){const w=this;s([A=>w.approveTransaction(b,A),(A,L)=>w.checkApproval("transaction",A,L),A=>w.finalizeTx(b,A)],S)},u.prototype.processMessage=function(b,S){const w=this;s([A=>w.approveMessage(b,A),(A,L)=>w.checkApproval("message",A,L),A=>w.signMessage(b,A)],S)},u.prototype.processPersonalMessage=function(b,S){const w=this;s([A=>w.approvePersonalMessage(b,A),(A,L)=>w.checkApproval("message",A,L),A=>w.signPersonalMessage(b,A)],S)},u.prototype.processDecryptMessage=function(b,S){const w=this;s([A=>w.approveDecryptMessage(b,A),(A,L)=>w.checkApproval("decryptMessage",A,L),A=>w.decryptMessage(b,A)],S)},u.prototype.processEncryptionPublicKey=function(b,S){const w=this;s([A=>w.approveEncryptionPublicKey(b,A),(A,L)=>w.checkApproval("encryptionPublicKey",A,L),A=>w.encryptionPublicKey(b,A)],S)},u.prototype.processTypedMessage=function(b,S){const w=this;s([A=>w.approveTypedMessage(b,A),(A,L)=>w.checkApproval("message",A,L),A=>w.signTypedMessage(b,A)],S)},u.prototype.autoApprove=function(b,S){S(null,!0)},u.prototype.checkApproval=function(b,S,w){w(S?null:new Error("User denied "+b+" signature."))},u.prototype.parityPostTransaction=function(b,S){const w=this,A="0x"+w._parityRequestCount.toString(16);w._parityRequestCount++,w.emitPayload({method:"eth_sendTransaction",params:[b]},function(L,H){w._parityRequests[A]=L?{error:L}:H.result}),S(null,A)},u.prototype.parityPostSign=function(b,S,w){const A=this,L="0x"+A._parityRequestCount.toString(16);A._parityRequestCount++,A.emitPayload({method:"eth_sign",params:[b,S]},function(H,D){A._parityRequests[L]=H?{error:H}:D.result}),w(null,L)},u.prototype.parityCheckRequest=function(b,S){const w=this._parityRequests[b]||null;return w?w.error?S(w.error):void S(null,w):S(null,null)},u.prototype.recoverPersonalSignature=function(b,S){let w;try{w=o.recoverPersonalSignature(b)}catch(A){return S(A)}S(null,w)},u.prototype.validateTransaction=function(b,S){if(void 0===b.from)return S(new Error("Undefined address - from address required to sign transaction."));this.validateSender(b.from,function(w,A){return w?S(w):A?void S():S(new Error(`Unknown address - unable to sign transaction for this address: "${b.from}"`))})},u.prototype.validateMessage=function(b,S){if(void 0===b.from)return S(new Error("Undefined address - from address required to sign message."));this.validateSender(b.from,function(w,A){return w?S(w):A?void S():S(new Error(`Unknown address - unable to sign message for this address: "${b.from}"`))})},u.prototype.validatePersonalMessage=function(b,S){return void 0===b.from?S(new Error("Undefined address - from address required to sign personal message.")):void 0===b.data?S(new Error("Undefined message - message required to sign personal message.")):T(b.data)?void this.validateSender(b.from,function(w,A){return w?S(w):A?void S():S(new Error(`Unknown address - unable to sign message for this address: "${b.from}"`))}):S(new Error("HookedWalletSubprovider - validateMessage - message was not encoded as hex."))},u.prototype.validateDecryptMessage=function(b,S){return void 0===b.from?S(new Error("Undefined address - from address required to decrypt message.")):void 0===b.data?S(new Error("Undefined message - message required to decrypt message.")):T(b.data)?void this.validateSender(b.from,function(w,A){return w?S(w):A?void S():S(new Error(`Unknown address - unable to decrypt message for this address: "${b.from}"`))}):S(new Error("HookedWalletSubprovider - validateDecryptMessage - message was not encoded as hex."))},u.prototype.validateEncryptionPublicKey=function(b,S){this.validateSender(b,function(w,A){return w?S(w):A?void S():S(new Error(`Unknown address - unable to obtain encryption public key for this address: "${b}"`))})},u.prototype.validateTypedMessage=function(b,S){return void 0===b.from?S(new Error("Undefined address - from address required to sign typed data.")):void 0===b.data?S(new Error("Undefined data - message required to sign typed data.")):void this.validateSender(b.from,function(w,A){return w?S(w):A?void S():S(new Error(`Unknown address - unable to sign message for this address: "${b.from}"`))})},u.prototype.validateSender=function(b,S){if(!b)return S(null,!1);this.getAccounts(function(w,A){if(w)return S(w);const L=-1!==A.map(d).indexOf(b.toLowerCase());S(null,L)})},u.prototype.finalizeAndSubmitTx=function(b,S){const w=this;w.nonceLock.take(function(){s([w.fillInTxExtras.bind(w,b),w.signTransaction.bind(w),w.publishTransaction.bind(w)],function(A,L){if(w.nonceLock.leave(),A)return S(A);S(null,L)})})},u.prototype.finalizeTx=function(b,S){const w=this;w.nonceLock.take(function(){s([w.fillInTxExtras.bind(w,b),w.signTransaction.bind(w)],function(A,L){if(w.nonceLock.leave(),A)return S(A);S(null,{raw:L,tx:b})})})},u.prototype.publishTransaction=function(b,S){this.emitPayload({method:"eth_sendRawTransaction",params:[b]},function(w,A){if(w)return S(w);S(null,A.result)})},u.prototype.estimateGas=function(b,S){c(this.engine,b,S)},u.prototype.getGasPrice=function(b){this.emitPayload({method:"eth_gasPrice",params:[]},function(S,w){if(S)return b(S);b(null,w.result)})},u.prototype.fillInTxExtras=function(b,S){const w=this,A=b.from,L={};var H;void 0===b.gasPrice&&(L.gasPrice=w.getGasPrice.bind(w)),void 0===b.nonce&&(L.nonce=w.emitPayload.bind(w,{method:"eth_getTransactionCount",params:[A,"pending"]})),void 0===b.gas&&(L.gas=w.estimateGas.bind(w,{from:(H=b).from,to:H.to,value:H.value,data:H.data,gas:H.gas,gasPrice:H.gasPrice,nonce:H.nonce})),m(L,function(H,D){if(H)return S(H);const q={};D.gasPrice&&(q.gasPrice=D.gasPrice),D.nonce&&(q.nonce=D.nonce.result),D.gas&&(q.gas=D.gas),S(null,e(b,q))})}},function(z,l,f){"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.default=function(i,c){if(c=(0,y.default)(c||m.default),!(0,s.default)(i))return c(new Error("First argument to waterfall must be an array of functions"));if(!i.length)return c();var h=0;function u(_){var v=(0,e.default)(i[h++]);_.push((0,o.default)(d)),v.apply(null,_)}function d(_){if(_||h===i.length)return c.apply(null,arguments);u((0,n.default)(arguments,1))}u([])};var s=t(f(147)),m=t(f(38)),y=t(f(64)),n=t(f(48)),o=t(f(66)),e=t(f(23));function t(i){return i&&i.__esModule?i:{default:i}}z.exports=l.default},function(z,l,f){"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.default=function(n,o){(0,m.default)(s.default,n,o)};var s=y(f(139)),m=y(f(356));function y(n){return n&&n.__esModule?n:{default:n}}z.exports=l.default},function(z,l,f){"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.default=function(e,t,i){i=i||s.default;var c=(0,m.default)(t)?[]:{};e(t,function(h,u,d){(0,n.default)(h)(function(_,v){arguments.length>2&&(v=(0,y.default)(arguments,1)),c[u]=v,d(_)})},function(h){i(h,c)})};var s=o(f(38)),m=o(f(47)),y=o(f(48)),n=o(f(23));function o(e){return e&&e.__esModule?e:{default:e}}z.exports=l.default},function(z,l,f){const s=f(36),m=f(358);function y(t){const i=new Error("Expect argument to be non-empty array");if("object"!=typeof t||!t.length)throw i;const c=t.map(function(d){return"bytes"===d.type?s.toBuffer(d.value):d.value}),h=t.map(function(d){return d.type}),u=t.map(function(d){if(!d.name)throw i;return d.type+" "+d.name});return m.soliditySHA3(["bytes32","bytes32"],[m.soliditySHA3(new Array(t.length).fill("string"),u),m.soliditySHA3(h,c)])}function n(t,i){const c=s.toBuffer(i),h=s.fromRpcSig(c);return s.ecrecover(t,h.v,h.r,h.s)}function o(t){const i=s.toBuffer(t.data);return n(s.hashPersonalMessage(i),t.sig)}function e(t,i){for(var c=""+t;c.lengthw)throw new Error("Elements exceed array size: "+w);for(H in L=[],b=b.slice(0,b.lastIndexOf("[")),"string"==typeof S&&(S=JSON.parse(S)),S)L.push(u(b,S[H]));if("dynamic"===w){var D=u("uint256",S.length);L.unshift(D)}return s.concat(L)}if("bytes"===b)return S=s.from(S),L=s.concat([u("uint256",S.length),S]),S.length%32!=0&&(L=s.concat([L,m.zeros(32-S.length%32)])),L;if(b.startsWith("bytes")){if((w=e(b))<1||w>32)throw new Error("Invalid bytes width: "+w);return m.setLengthRight(S,32)}if(b.startsWith("uint")){if((w=e(b))%8||w<8||w>256)throw new Error("Invalid uint width: "+w);if((A=c(S)).bitLength()>w)throw new Error("Supplied uint exceeds width: "+w+" vs "+A.bitLength());if(A<0)throw new Error("Supplied uint is negative");return A.toArrayLike(s,"be",32)}if(b.startsWith("int")){if((w=e(b))%8||w<8||w>256)throw new Error("Invalid int width: "+w);if((A=c(S)).bitLength()>w)throw new Error("Supplied int exceeds width: "+w+" vs "+A.bitLength());return A.toTwos(256).toArrayLike(s,"be",32)}if(b.startsWith("ufixed")){if(w=t(b),(A=c(S))<0)throw new Error("Supplied ufixed is negative");return u("uint256",A.mul(new y(2).pow(new y(w[1]))))}if(b.startsWith("fixed"))return w=t(b),u("int256",c(S).mul(new y(2).pow(new y(w[1]))));throw new Error("Unsupported or invalid type: "+b)}function d(b,S,w){var A,L,H,D;if("string"==typeof b&&(b=_(b)),"address"===b.name)return d(b.rawType,S,w).toArrayLike(s,"be",20).toString("hex");if("bool"===b.name)return d(b.rawType,S,w).toString()===new y(1).toString();if("string"===b.name){var q=d(b.rawType,S,w);return s.from(q,"utf8").toString()}if(b.isArray){for(H=[],A=b.size,"dynamic"===b.size&&(w=d("uint256",S,w).toNumber(),A=d("uint256",S,w).toNumber(),w+=32),D=0;Db.size)throw new Error("Decoded int exceeds width: "+b.size+" vs "+L.bitLength());return L}if(b.name.startsWith("int")){if((L=new y(S.slice(w,w+32),16,"be").fromTwos(256)).bitLength()>b.size)throw new Error("Decoded uint exceeds width: "+b.size+" vs "+L.bitLength());return L}if(b.name.startsWith("ufixed")){if(A=new y(2).pow(new y(b.size[1])),!(L=d("uint256",S,w)).mod(A).isZero())throw new Error("Decimals not supported yet");return L.div(A)}if(b.name.startsWith("fixed")){if(A=new y(2).pow(new y(b.size[1])),!(L=d("int256",S,w)).mod(A).isZero())throw new Error("Decimals not supported yet");return L.div(A)}throw new Error("Unsupported or invalid type: "+b.name)}function _(b){var S,w,A;if(T(b)){S=i(b);var L=b.slice(0,b.lastIndexOf("["));return L=_(L),{isArray:!0,name:b,size:S,memoryUsage:"dynamic"===S?32:L.memoryUsage*S,subArray:L}}switch(b){case"address":A="uint160";break;case"bool":A="uint8";break;case"string":A="bytes"}if(w={rawType:A,name:b,memoryUsage:32},b.startsWith("bytes")&&"bytes"!==b||b.startsWith("uint")||b.startsWith("int")?w.size=e(b):(b.startsWith("ufixed")||b.startsWith("fixed"))&&(w.size=t(b)),b.startsWith("bytes")&&"bytes"!==b&&(w.size<1||w.size>32))throw new Error("Invalid bytes width: "+w.size);if((b.startsWith("uint")||b.startsWith("int"))&&(w.size%8||w.size<8||w.size>256))throw new Error("Invalid int/uint width: "+w.size);return w}function v(b){return"string"===b||"bytes"===b||"dynamic"===i(b)}function T(b){return b.lastIndexOf("]")===b.length-1}function O(b,S){return b.startsWith("address")||b.startsWith("bytes")?"0x"+S.toString("hex"):S.toString()}n.eventID=function(b,S){var w=b+"("+S.map(o).join(",")+")";return m.keccak256(s.from(w))},n.methodID=function(b,S){return n.eventID(b,S).slice(0,4)},n.rawEncode=function(b,S){var w=[],A=[],L=0;b.forEach(function(k){if(T(k)){var p=i(k);L+="dynamic"!==p?32*p:32}else L+=32});for(var H=0;HD)throw new Error("Elements exceed array size: "+D)}var q=S.map(function(E){return n.solidityHexValue(H,E,256)});return s.concat(q)}if("bytes"===b)return S;if("string"===b)return s.from(S,"utf8");if("bool"===b){w=w||8;var k=Array(w/4).join("0");return s.from(S?k+"1":k+"0","hex")}if("address"===b){var p=20;return w&&(p=w/8),m.setLengthLeft(S,p)}if(b.startsWith("bytes")){if((A=e(b))<1||A>32)throw new Error("Invalid bytes width: "+A);return m.setLengthRight(S,A)}if(b.startsWith("uint")){if((A=e(b))%8||A<8||A>256)throw new Error("Invalid uint width: "+A);if((L=c(S)).bitLength()>A)throw new Error("Supplied uint exceeds width: "+A+" vs "+L.bitLength());return L.toArrayLike(s,"be",(w=w||A)/8)}if(b.startsWith("int")){if((A=e(b))%8||A<8||A>256)throw new Error("Invalid int width: "+A);if((L=c(S)).bitLength()>A)throw new Error("Supplied int exceeds width: "+A+" vs "+L.bitLength());return w=w||A,L.toTwos(A).toArrayLike(s,"be",w/8)}throw new Error("Unsupported or invalid type: "+b)},n.solidityPack=function(b,S){if(b.length!==S.length)throw new Error("Number of types are not matching the values");for(var w=[],A=0;A="0"&&S<="9";)H+=b[D]-"0",D++;A=D-1,w.push(H)}else if("i"===L)w.push("int256");else{if("a"!==L)throw new Error("Unsupported or invalid type: "+L);w.push("int256[]")}}return w},n.toSerpent=function(b){for(var S=[],w=0;w=0)throw new Error("couldn't export to DER format");var c=y.g.mul(i);return o(c.getX(),c.getY(),t)},l.privateKeyModInverse=function(e){var t=new m(e);if(t.ucmp(n.n)>=0||t.isZero())throw new Error("private key range is invalid");return t.invm(n.n).toArrayLike(s,"be",32)},l.signatureImport=function(e){var t=new m(e.r);t.ucmp(n.n)>=0&&(t=new m(0));var i=new m(e.s);return i.ucmp(n.n)>=0&&(i=new m(0)),s.concat([t.toArrayLike(s,"be",32),i.toArrayLike(s,"be",32)])},l.ecdhUnsafe=function(e,t,i){void 0===i&&(i=!0);var c=y.keyFromPublic(e),h=new m(t);if(h.ucmp(n.n)>=0||h.isZero())throw new Error("scalar was invalid (zero or overflow)");var u=c.pub.mul(h);return o(u.getX(),u.getY(),i)};var o=function(e,t,i){var c;return i?((c=s.alloc(33))[0]=t.isOdd()?3:2,e.toArrayLike(s,"be",32).copy(c,1)):((c=s.alloc(65))[0]=4,e.toArrayLike(s,"be",32).copy(c,1),t.toArrayLike(s,"be",32).copy(c,33)),c}}).call(this,f(2).Buffer)},function(z,l,f){"use strict";(function(s){Object.defineProperty(l,"__esModule",{value:!0});var m=s.from([48,129,211,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),y=s.from([48,130,1,19,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);l.privateKeyExport=function(n,o,e){void 0===e&&(e=!0);var t=s.from(e?m:y);return n.copy(t,e?8:9),o.copy(t,e?181:214),t},l.privateKeyImport=function(n){var o=n.length,e=0;if(o2||o<(e+=1)+t)return null;var i=n[e+t-1]|(t>1?n[e+t-2]<<8:0);return o<(e+=t)+i||o32||ot||2!==n[i++])return null;var h=n[i++];if(128&h){if(i+(c=h-128)>t)return null;for(;c>0&&0===n[i];i+=1,c-=1);for(h=0;c>0;i+=1,c-=1)h=(h<<8)+n[i]}if(h>t-i)return null;var u=i;if(i+=h,2!==n[i++])return null;var d=n[i++];if(128&d){if(i+(c=d-128)>t)return null;for(;c>0&&0===n[i];i+=1,c-=1);for(d=0;c>0;i+=1,c-=1)d=(d<<8)+n[i]}if(d>t-i)return null;var _=i;for(i+=d;h>0&&0===n[u];h-=1,u+=1);if(h>32)return null;var v=n.slice(u,u+h);for(v.copy(o,32-v.length);d>0&&0===n[_];d-=1,_+=1);if(d>32)return null;var T=n.slice(_,_+d);return T.copy(e,32-T.length),{r:o,s:e}}}).call(this,f(2).Buffer)},function(z,l,f){"use strict";(function(s){Object.defineProperty(l,"__esModule",{value:!0}),l.KECCAK256_RLP=l.KECCAK256_RLP_S=l.KECCAK256_RLP_ARRAY=l.KECCAK256_RLP_ARRAY_S=l.KECCAK256_NULL=l.KECCAK256_NULL_S=l.TWO_POW256=l.MAX_INTEGER=void 0;var m=f(9);l.MAX_INTEGER=new m("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),l.TWO_POW256=new m("10000000000000000000000000000000000000000000000000000000000000000",16),l.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",l.KECCAK256_NULL=s.from(l.KECCAK256_NULL_S,"hex"),l.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",l.KECCAK256_RLP_ARRAY=s.from(l.KECCAK256_RLP_ARRAY_S,"hex"),l.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",l.KECCAK256_RLP=s.from(l.KECCAK256_RLP_S,"hex")}).call(this,f(2).Buffer)},function(z,l,f){"use strict";(function(s){Object.defineProperty(l,"__esModule",{value:!0}),l.importPublic=l.privateToPublic=l.privateToAddress=l.publicToAddress=l.pubToAddress=l.isValidPublic=l.isValidPrivate=l.isPrecompiled=l.generateAddress2=l.generateAddress=l.isValidChecksumAddress=l.toChecksumAddress=l.isZeroAddress=l.isValidAddress=l.zeroAddress=void 0;var m=f(61),y=f(32),n=f(74),o=f(9),e=f(40),t=f(75);l.zeroAddress=function(){var i=e.zeros(20);return e.bufferToHex(i)},l.isValidAddress=function(i){return/^0x[0-9a-fA-F]{40}$/.test(i)},l.isZeroAddress=function(i){return l.zeroAddress()===e.addHexPrefix(i)},l.toChecksumAddress=function(i,c){i=y.stripHexPrefix(i).toLowerCase();for(var h=void 0!==c?c.toString()+"0x":"",u=t.keccak(h+i).toString("hex"),d="0x",_=0;_=8?d+=i[_].toUpperCase():d+=i[_];return d},l.isValidChecksumAddress=function(i,c){return l.isValidAddress(i)&&l.toChecksumAddress(i,c)===i},l.generateAddress=function(i,c){i=e.toBuffer(i);var h=new o(c);return h.isZero()?t.rlphash([i,null]).slice(-20):t.rlphash([i,s.from(h.toArray())]).slice(-20)},l.generateAddress2=function(i,c,h){var u=e.toBuffer(i),d=e.toBuffer(c),_=e.toBuffer(h);return m(20===u.length),m(32===d.length),t.keccak256(s.concat([s.from("ff","hex"),u,d,t.keccak256(_)])).slice(-20)},l.isPrecompiled=function(i){var c=e.unpad(i);return 1===c.length&&c[0]>=1&&c[0]<=8},l.isValidPrivate=function(i){return n.privateKeyVerify(i)},l.isValidPublic=function(i,c){return void 0===c&&(c=!1),64===i.length?n.publicKeyVerify(s.concat([s.from([4]),i])):!!c&&n.publicKeyVerify(i)},l.pubToAddress=function(i,c){return void 0===c&&(c=!1),i=e.toBuffer(i),c&&64!==i.length&&(i=n.publicKeyConvert(i,!1).slice(1)),m(64===i.length),t.keccak(i).slice(-20)},l.publicToAddress=l.pubToAddress,l.privateToAddress=function(i){return l.publicToAddress(l.privateToPublic(i))},l.privateToPublic=function(i){return i=e.toBuffer(i),n.publicKeyCreate(i,!1).slice(1)},l.importPublic=function(i){return 64!==(i=e.toBuffer(i)).length&&(i=n.publicKeyConvert(i,!1).slice(1)),i}}).call(this,f(2).Buffer)},function(z,l,f){"use strict";(function(s){Object.defineProperty(l,"__esModule",{value:!0}),l.hashPersonalMessage=l.isValidSignature=l.fromRpcSig=l.toRpcSig=l.ecrecover=l.ecsign=void 0;var m=f(74),y=f(9),n=f(40),o=f(75);function e(i,c){return c?i-(2*c+35):i-27}function t(i){return 0===i||1===i}l.ecsign=function(i,c,h){var u=m.sign(i,c),d=u.recovery;return{r:u.signature.slice(0,32),s:u.signature.slice(32,64),v:h?d+(2*h+35):d+27}},l.ecrecover=function(i,c,h,u,d){var _=s.concat([n.setLength(h,32),n.setLength(u,32)],64),v=e(c,d);if(!t(v))throw new Error("Invalid signature v value");var T=m.recover(i,_,v);return m.publicKeyConvert(T,!1).slice(1)},l.toRpcSig=function(i,c,h,u){if(!t(e(i,u)))throw new Error("Invalid signature v value");return n.bufferToHex(s.concat([n.setLengthLeft(c,32),n.setLengthLeft(h,32),n.toBuffer(i)]))},l.fromRpcSig=function(i){var c=n.toBuffer(i);if(65!==c.length)throw new Error("Invalid signature length");var h=c[64];return h<27&&(h+=27),{v:h,r:c.slice(0,32),s:c.slice(32,64)}},l.isValidSignature=function(i,c,h,u,d){void 0===u&&(u=!0);var _=new y("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),v=new y("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==c.length||32!==h.length||!t(e(i,d)))return!1;var T=new y(c),O=new y(h);return!(T.isZero()||T.gt(v)||O.isZero()||O.gt(v)||u&&1===O.cmp(_))},l.hashPersonalMessage=function(i){var c=s.from("\x19Ethereum Signed Message:\n"+i.length.toString(),"utf-8");return o.keccak(s.concat([c,i]))}}).call(this,f(2).Buffer)},function(z,l,f){"use strict";(function(s){Object.defineProperty(l,"__esModule",{value:!0}),l.defineProperties=void 0;var m=f(61),y=f(32),n=f(46),o=f(40);l.defineProperties=function(e,t,i){if(e.raw=[],e._fields=[],e.toJSON=function(h){if(void 0===h&&(h=!1),h){var u={};return e._fields.forEach(function(d){u[d]="0x"+e[d].toString("hex")}),u}return o.baToJSON(e.raw)},e.serialize=function(){return n.encode(e.raw)},t.forEach(function(h,u){function d(){return e.raw[u]}function _(v){"00"!==(v=o.toBuffer(v)).toString("hex")||h.allowZero||(v=s.allocUnsafe(0)),h.allowLess&&h.length?(v=o.stripZeros(v),m(h.length>=v.length,"The field "+h.name+" must not have more "+h.length+" bytes")):h.allowZero&&0===v.length||!h.length||m(h.length===v.length,"The field "+h.name+" must have byte length of "+h.length),e.raw[u]=v}e._fields.push(h.name),Object.defineProperty(e,h.name,{enumerable:!0,configurable:!0,get:d,set:_}),h.default&&(e[h.name]=h.default),h.alias&&Object.defineProperty(e,h.alias,{enumerable:!1,configurable:!0,set:_,get:d})}),i)if("string"==typeof i&&(i=s.from(y.stripHexPrefix(i),"hex")),s.isBuffer(i)&&(i=n.decode(i)),Array.isArray(i)){if(i.length>e._fields.length)throw new Error("wrong number of fields in data");i.forEach(function(h,u){e[e._fields[u]]=o.toBuffer(h)})}else{if("object"!=typeof i)throw new Error("invalid data");var c=Object.keys(i);t.forEach(function(h){-1!==c.indexOf(h.name)&&(e[h.name]=i[h.name]),-1!==c.indexOf(h.alias)&&(e[h.alias]=i[h.alias])})}}}).call(this,f(2).Buffer)},function(z,l,f){(function(s){!function(m){"use strict";var y=function(n){setTimeout(n,0)};void 0!==s&&s&&"function"==typeof s.nextTick&&(y=s.nextTick),z.exports=function(n){var o={capacity:n||1,current:0,queue:[],firstHere:!1,take:function(){if(!1===o.firstHere){o.current++,o.firstHere=!0;var e=1}else e=0;var t={n:1};"function"==typeof arguments[0]?t.task=arguments[0]:t.n=arguments[0],arguments.length>=2&&("function"==typeof arguments[1]?t.task=arguments[1]:t.n=arguments[1]);var i=t.task;if(t.task=function(){i(o.leave)},o.current+t.n-e>o.capacity)return 1===e&&(o.current--,o.firstHere=!1),o.queue.push(t);o.current+=t.n-e,t.task(o.leave),1===e&&(o.firstHere=!1)},leave:function(e){if(o.current-=e=e||1,o.queue.length){var t=o.queue[0];t.n+o.current>o.capacity||(o.queue.shift(),o.current+=t.n,y(t.task))}else if(o.current<0)throw new Error("leave called too many times.")},available:function(e){return o.current+(e=e||1)<=o.capacity}};return o}}()}).call(this,f(5))},function(z,l,f){const s=f(67);z.exports=function(m,y,n){m.sendAsync(s({method:"eth_estimateGas",params:[y]}),function(o,e){if(o)return"no contract code at given address"===o.message?n(null,"0xcf08"):n(o);n(null,e.result)})}},function(z,l,f){(function(s){const m=f(21).inherits,y=f(370),n=f(36),o=f(49),e=f(149).blockTagForPayload;function t(i){this.nonceCache={}}z.exports=t,m(t,o),t.prototype.handleRequest=function(i,c,h){const u=this;switch(i.method){case"eth_getTransactionCount":var d=e(i),_=i.params[0].toLowerCase(),v=u.nonceCache[_];return void("pending"===d?v?h(null,v):c(function(T,O,b){if(T)return b();void 0===u.nonceCache[_]&&(u.nonceCache[_]=O),b()}):c());case"eth_sendRawTransaction":return void c(function(T,O,b){if(T)return b();var S=i.params[0],w=(n.stripHexPrefix(S),s.from(n.stripHexPrefix(S),"hex"),new y(s.from(n.stripHexPrefix(S),"hex"))),A="0x"+w.getSenderAddress().toString("hex").toLowerCase(),L=n.bufferToInt(w.nonce),H=(++L).toString(16);H.length%2&&(H="0"+H),u.nonceCache[A]=H="0x"+H,b()});case"evm_revert":return u.nonceCache={},void c();default:return void c()}}}).call(this,f(2).Buffer)},function(z,l,f){"use strict";(function(s){var m=f(36),y=f(371),n=m.BN,o=new n("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),e=function(){function t(i){(function(d,_){if(!(d instanceof _))throw new TypeError("Cannot call a class as a function")})(this,t),i=i||{};var c=[{name:"nonce",length:32,allowLess:!0,default:new s([])},{name:"gasPrice",length:32,allowLess:!0,default:new s([])},{name:"gasLimit",alias:"gas",length:32,allowLess:!0,default:new s([])},{name:"to",allowZero:!0,length:20,default:new s([])},{name:"value",length:32,allowLess:!0,default:new s([])},{name:"data",alias:"input",allowZero:!0,default:new s([])},{name:"v",allowZero:!0,default:new s([28])},{name:"r",length:32,allowZero:!0,allowLess:!0,default:new s([])},{name:"s",length:32,allowZero:!0,allowLess:!0,default:new s([])}];m.defineProperties(this,c,i),Object.defineProperty(this,"from",{enumerable:!0,configurable:!0,get:this.getSenderAddress.bind(this)});var h=m.bufferToInt(this.v),u=Math.floor((h-35)/2);u<0&&(u=0),this._chainId=u||i.chainId||0,this._homestead=!0}return t.prototype.toCreationAddress=function(){return""===this.to.toString("hex")},t.prototype.hash=function(i){void 0===i&&(i=!0);var c=void 0;if(i)c=this.raw;else if(this._chainId>0){var h=this.raw.slice();this.v=this._chainId,this.r=0,this.s=0,c=this.raw,this.raw=h}else c=this.raw.slice(0,6);return m.rlphash(c)},t.prototype.getChainId=function(){return this._chainId},t.prototype.getSenderAddress=function(){if(this._from)return this._from;var i=this.getSenderPublicKey();return this._from=m.publicToAddress(i),this._from},t.prototype.getSenderPublicKey=function(){if(!(this._senderPubKey&&this._senderPubKey.length||this.verifySignature()))throw new Error("Invalid Signature");return this._senderPubKey},t.prototype.verifySignature=function(){var i=this.hash(!1);if(this._homestead&&1===new n(this.s).cmp(o))return!1;try{var c=m.bufferToInt(this.v);this._chainId>0&&(c-=2*this._chainId+8),this._senderPubKey=m.ecrecover(i,c,this.r,this.s)}catch{return!1}return!!this._senderPubKey},t.prototype.sign=function(i){var c=this.hash(!1),h=m.ecsign(c,i);this._chainId>0&&(h.v+=2*this._chainId+8),Object.assign(this,h)},t.prototype.getDataFee=function(){for(var i=this.raw[5],c=new n(0),h=0;h0&&c.push(["gas limit is too low. Need at least "+this.getBaseFee()]),void 0===i||!1===i?0===c.length:c.join(" ")},t}();z.exports=e}).call(this,f(2).Buffer)},function(z){z.exports=JSON.parse('{"genesisGasLimit":{"v":5000,"d":"Gas limit of the Genesis block."},"genesisDifficulty":{"v":17179869184,"d":"Difficulty of the Genesis block."},"genesisNonce":{"v":"0x0000000000000042","d":"the geneis nonce"},"genesisExtraData":{"v":"0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa","d":"extra data "},"genesisHash":{"v":"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3","d":"genesis hash"},"genesisStateRoot":{"v":"0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544","d":"the genesis state root"},"minGasLimit":{"v":5000,"d":"Minimum the gas limit may ever be."},"gasLimitBoundDivisor":{"v":1024,"d":"The bound divisor of the gas limit, used in update calculations."},"minimumDifficulty":{"v":131072,"d":"The minimum that the difficulty may ever be."},"difficultyBoundDivisor":{"v":2048,"d":"The bound divisor of the difficulty, used in the update calculations."},"durationLimit":{"v":13,"d":"The decision boundary on the blocktime duration used to determine whether difficulty should go up or not."},"maximumExtraDataSize":{"v":32,"d":"Maximum size extra data may be after Genesis."},"epochDuration":{"v":30000,"d":"Duration between proof-of-work epochs."},"stackLimit":{"v":1024,"d":"Maximum size of VM stack allowed."},"callCreateDepth":{"v":1024,"d":"Maximum depth of call/create stack."},"tierStepGas":{"v":[0,2,3,5,8,10,20],"d":"Once per operation, for a selection of them."},"expGas":{"v":10,"d":"Once per EXP instuction."},"expByteGas":{"v":10,"d":"Times ceil(log256(exponent)) for the EXP instruction."},"sha3Gas":{"v":30,"d":"Once per SHA3 operation."},"sha3WordGas":{"v":6,"d":"Once per word of the SHA3 operation\'s data."},"sloadGas":{"v":50,"d":"Once per SLOAD operation."},"sstoreSetGas":{"v":20000,"d":"Once per SSTORE operation if the zeroness changes from zero."},"sstoreResetGas":{"v":5000,"d":"Once per SSTORE operation if the zeroness does not change from zero."},"sstoreRefundGas":{"v":15000,"d":"Once per SSTORE operation if the zeroness changes to zero."},"jumpdestGas":{"v":1,"d":"Refunded gas, once per SSTORE operation if the zeroness changes to zero."},"logGas":{"v":375,"d":"Per LOG* operation."},"logDataGas":{"v":8,"d":"Per byte in a LOG* operation\'s data."},"logTopicGas":{"v":375,"d":"Multiplied by the * of the LOG*, per LOG transaction. e.g. LOG0 incurs 0 * c_txLogTopicGas, LOG4 incurs 4 * c_txLogTopicGas."},"createGas":{"v":32000,"d":"Once per CREATE operation & contract-creation transaction."},"callGas":{"v":40,"d":"Once per CALL operation & message call transaction."},"callStipend":{"v":2300,"d":"Free gas given at beginning of call."},"callValueTransferGas":{"v":9000,"d":"Paid for CALL when the value transfor is non-zero."},"callNewAccountGas":{"v":25000,"d":"Paid for CALL when the destination address didn\'t exist prior."},"suicideRefundGas":{"v":24000,"d":"Refunded following a suicide operation."},"memoryGas":{"v":3,"d":"Times the address of the (highest referenced byte in memory + 1). NOTE: referencing happens on read, write and in instructions such as RETURN and CALL."},"quadCoeffDiv":{"v":512,"d":"Divisor for the quadratic particle of the memory cost equation."},"createDataGas":{"v":200,"d":""},"txGas":{"v":21000,"d":"Per transaction. NOTE: Not payable on data of calls between transactions."},"txCreation":{"v":32000,"d":"the cost of creating a contract via tx"},"txDataZeroGas":{"v":4,"d":"Per byte of data attached to a transaction that equals zero. NOTE: Not payable on data of calls between transactions."},"txDataNonZeroGas":{"v":68,"d":"Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions."},"copyGas":{"v":3,"d":"Multiplied by the number of 32-byte words that are copied (round up) for any *COPY operation and added."},"ecrecoverGas":{"v":3000,"d":""},"sha256Gas":{"v":60,"d":""},"sha256WordGas":{"v":12,"d":""},"ripemd160Gas":{"v":600,"d":""},"ripemd160WordGas":{"v":120,"d":""},"identityGas":{"v":15,"d":""},"identityWordGas":{"v":3,"d":""},"minerReward":{"v":"5000000000000000000","d":"the amount a miner get rewarded for mining a block"},"ommerReward":{"v":"625000000000000000","d":"The amount of wei a miner of an uncle block gets for being inculded in the blockchain"},"niblingReward":{"v":"156250000000000000","d":"the amount a miner gets for inculding a uncle"},"homeSteadForkNumber":{"v":1150000,"d":"the block that the Homestead fork started at"},"homesteadRepriceForkNumber":{"v":2463000,"d":"the block that the Homestead Reprice (EIP150) fork started at"},"timebombPeriod":{"v":100000,"d":"Exponential difficulty timebomb period"},"freeBlockPeriod":{"v":2}}')},function(z,l,f){const s=f(68),m=f(373);z.exports=class extends s{constructor(){super(({blockTracker:y,provider:n,engine:o})=>{const{events:e,middleware:t}=m({blockTracker:y,provider:n});return e.on("notification",i=>o.emit("data",null,i)),t})}}},function(z,l,f){const s=f(69).default,m=f(156),{createAsyncMiddleware:y}=f(152),n=f(151),{unsafeRandomBytes:o,incrementHexInt:e}=f(39),t=f(73);function i(c){return{hash:c.hash,parentHash:c.parentHash,sha3Uncles:c.sha3Uncles,miner:c.miner,stateRoot:c.stateRoot,transactionsRoot:c.transactionsRoot,receiptsRoot:c.receiptsRoot,logsBloom:c.logsBloom,difficulty:c.difficulty,number:c.number,gasLimit:c.gasLimit,gasUsed:c.gasUsed,nonce:c.nonce,mixHash:c.mixHash,timestamp:c.timestamp,extraData:c.extraData}}z.exports=function({blockTracker:c,provider:h}){const u={},d=n({blockTracker:c,provider:h});let _=!1;const v=new s,T=m({eth_subscribe:y(function(){var b=ge(function*(S,w){if(_)throw new Error("SubscriptionManager - attempting to use after destroying");const A=S.params[0],L=o(16);let H;switch(A){case"newHeads":H=function({subId:k}){const p={type:A,destroy:(E=ge(function*(){c.removeListener("sync",p.update)}),function(){return E.apply(this,arguments)}),update:function(){var E=ge(function*({oldBlock:R,newBlock:r}){const a=r,g=e(R);(yield t({provider:h,fromBlock:g,toBlock:a})).map(i).forEach(M=>{O(k,M)})});return function(r){return E.apply(this,arguments)}}()};var E;return c.on("sync",p.update),p}({subId:L});break;case"logs":const D=S.params[1];H=function({subId:k,filter:p}){return p.on("update",E=>O(k,E)),{type:A,destroy:(E=ge(function*(){return yield d.uninstallFilter(p.idHex)}),function(){return E.apply(this,arguments)})};var E}({subId:L,filter:yield d.newLogFilter(D)});break;default:throw new Error(`SubscriptionManager - unsupported subscription type "${A}"`)}return u[L]=H,void(w.result=L)});return function(S,w){return b.apply(this,arguments)}}()),eth_unsubscribe:y(function(){var b=ge(function*(S,w){if(_)throw new Error("SubscriptionManager - attempting to use after destroying");const A=S.params[0],L=u[A];L?(delete u[A],yield L.destroy(),w.result=!0):w.result=!1});return function(S,w){return b.apply(this,arguments)}}())});return T.destroy=function(){v.removeAllListeners();for(const b in u)u[b].destroy(),delete u[b];_=!0},{events:v,middleware:T};function O(b,S){v.emit("notification",{jsonrpc:"2.0",method:"eth_subscription",params:{subscription:b,result:S}})}}},function(z,l,f){"use strict";f.r(l);var s={};f.r(s),f.d(s,"generateKey",function(){return u}),f.d(s,"verifyHmac",function(){return _}),f.d(s,"encrypt",function(){return T}),f.d(s,"decrypt",function(){return b});var m=f(1),y=f(162);const e="abcdefghijklmnopqrstuvwxyz0123456789".split("").map(w=>`https://${w}.bridge.walletconnect.org`);var c=f(33),h=f(0);function u(w){return d.apply(this,arguments)}function d(){return(d=ge(function*(w){const L=c.randomBytes((w||256)/8);return Object(m.convertBufferToArrayBuffer)(h.b(L))})).apply(this,arguments)}function _(w,A){return v.apply(this,arguments)}function v(){return(v=ge(function*(w,A){const L=h.n(w.data),H=h.n(w.iv),D=h.n(w.hmac),q=h.c(D,!1),k=h.j(L,H),p=yield c.hmacSha256Sign(A,k),E=h.c(p,!1);return h.x(q)===h.x(E)})).apply(this,arguments)}function T(w,A,L){return O.apply(this,arguments)}function O(){return(O=ge(function*(w,A,L){const H=h.f(Object(m.convertArrayBufferToBuffer)(A)),D=L||(yield u(128)),q=h.f(Object(m.convertArrayBufferToBuffer)(D)),k=h.c(q,!1),p=JSON.stringify(w),E=h.z(p),R=yield c.aesCbcEncrypt(q,H,E),r=h.c(R,!1),a=h.j(R,q),g=yield c.hmacSha256Sign(H,a);return{data:r,hmac:h.c(g,!1),iv:k}})).apply(this,arguments)}function b(w,A){return S.apply(this,arguments)}function S(){return(S=ge(function*(w,A){const L=h.f(Object(m.convertArrayBufferToBuffer)(A));if(!L)throw new Error("Missing key: required for decryption");if(!(yield _(w,L)))return null;const H=h.n(w.data),D=h.n(w.iv),q=yield c.aesCbcDecrypt(D,L,H),k=h.e(q);let p;try{p=JSON.parse(k)}catch{return null}return p})).apply(this,arguments)}l.default=class extends class{constructor(w){if(this.protocol="wc",this.version=1,this._bridge="",this._key=null,this._clientId="",this._clientMeta=null,this._peerId="",this._peerMeta=null,this._handshakeId=0,this._handshakeTopic="",this._connected=!1,this._accounts=[],this._chainId=0,this._networkId=0,this._rpcUrl="",this._eventManager=new class{constructor(){this._eventEmitters=[]}subscribe(w){this._eventEmitters.push(w)}unsubscribe(w){this._eventEmitters=this._eventEmitters.filter(A=>A.event!==w)}trigger(w){let A,L=[];A=Object(m.isJsonRpcRequest)(w)?w.method:Object(m.isJsonRpcResponseSuccess)(w)||Object(m.isJsonRpcResponseError)(w)?"response:"+w.id:Object(m.isInternalEvent)(w)?w.event:"",A&&(L=this._eventEmitters.filter(H=>H.event===A)),L&&L.length||Object(m.isReservedEvent)(A)||Object(m.isInternalEvent)(A)||(L=this._eventEmitters.filter(H=>"call_request"===H.event)),L.forEach(H=>{if(Object(m.isJsonRpcResponseError)(w)){const D=new Error(w.error.message);H.callback(D,null)}else H.callback(null,w)})}},this._clientMeta=Object(m.getClientMeta)()||w.connectorOpts.clientMeta||null,this._cryptoLib=w.cryptoLib,this._sessionStorage=w.sessionStorage||new class{constructor(w="walletconnect"){this.storageId=w}getSession(){let w=null;const A=Object(m.getLocal)(this.storageId);return A&&Object(m.isWalletConnectSession)(A)&&(w=A),w}setSession(w){return Object(m.setLocal)(this.storageId,w),w}removeSession(){Object(m.removeLocal)(this.storageId)}}(w.connectorOpts.storageId),this._qrcodeModal=w.connectorOpts.qrcodeModal,this._qrcodeModalOptions=w.connectorOpts.qrcodeModalOptions,this._signingMethods=[...m.signingMethods,...w.connectorOpts.signingMethods||[]],!w.connectorOpts.bridge&&!w.connectorOpts.uri&&!w.connectorOpts.session)throw new Error("Missing one of the required parameters: bridge / uri / session");var A;w.connectorOpts.bridge&&(this.bridge="walletconnect.org"===function(q){let k=q.indexOf("//")>-1?q.split("/")[2]:q.split("/")[0];return k=k.split(":")[0],k=k.split("?")[0],k}(A=w.connectorOpts.bridge).split(".").slice(-2).join(".")?function t(){return e[Math.floor(Math.random()*e.length)]}():A),w.connectorOpts.uri&&(this.uri=w.connectorOpts.uri);const L=w.connectorOpts.session||this._getStorageSession();L&&(this.session=L),this.handshakeId&&this._subscribeToSessionResponse(this.handshakeId,"Session request rejected"),this._transport=w.transport||new y.a({protocol:this.protocol,version:this.version,url:this.bridge,subscriptions:[this.clientId]}),this._subscribeToInternalEvents(),this._initTransport(),w.connectorOpts.uri&&this._subscribeToSessionRequest(),w.pushServerOpts&&this._registerPushServer(w.pushServerOpts)}set bridge(w){w&&(this._bridge=w)}get bridge(){return this._bridge}set key(w){if(!w)return;const A=Object(m.convertHexToArrayBuffer)(w);this._key=A}get key(){return this._key?Object(m.convertArrayBufferToHex)(this._key,!0):""}set clientId(w){w&&(this._clientId=w)}get clientId(){let w=this._clientId;return w||(w=this._clientId=Object(m.uuid)()),this._clientId}set peerId(w){w&&(this._peerId=w)}get peerId(){return this._peerId}set clientMeta(w){}get clientMeta(){let w=this._clientMeta;return w||(w=this._clientMeta=Object(m.getClientMeta)()),w}set peerMeta(w){this._peerMeta=w}get peerMeta(){return this._peerMeta}set handshakeTopic(w){w&&(this._handshakeTopic=w)}get handshakeTopic(){return this._handshakeTopic}set handshakeId(w){w&&(this._handshakeId=w)}get handshakeId(){return this._handshakeId}get uri(){return this._formatUri()}set uri(w){if(!w)return;const{handshakeTopic:A,bridge:L,key:H}=this._parseUri(w);this.handshakeTopic=A,this.bridge=L,this.key=H}set chainId(w){this._chainId=w}get chainId(){return this._chainId}set networkId(w){this._networkId=w}get networkId(){return this._networkId}set accounts(w){this._accounts=w}get accounts(){return this._accounts}set rpcUrl(w){this._rpcUrl=w}get rpcUrl(){return this._rpcUrl}set connected(w){}get connected(){return this._connected}set pending(w){}get pending(){return!!this._handshakeTopic}get session(){return{connected:this.connected,accounts:this.accounts,chainId:this.chainId,bridge:this.bridge,key:this.key,clientId:this.clientId,clientMeta:this.clientMeta,peerId:this.peerId,peerMeta:this.peerMeta,handshakeId:this.handshakeId,handshakeTopic:this.handshakeTopic}}set session(w){w&&(this._connected=w.connected,this.accounts=w.accounts,this.chainId=w.chainId,this.bridge=w.bridge,this.key=w.key,this.clientId=w.clientId,this.clientMeta=w.clientMeta,this.peerId=w.peerId,this.peerMeta=w.peerMeta,this.handshakeId=w.handshakeId,this.handshakeTopic=w.handshakeTopic)}on(w,A){this._eventManager.subscribe({event:w,callback:A})}off(w){this._eventManager.unsubscribe(w)}createInstantRequest(w){var A=this;return ge(function*(){A._key=yield A._generateKey();const L=A._formatRequest({method:"wc_instantRequest",params:[{peerId:A.clientId,peerMeta:A.clientMeta,request:A._formatRequest(w)}]});A.handshakeId=L.id,A.handshakeTopic=Object(m.uuid)(),A._eventManager.trigger({event:"display_uri",params:[A.uri]}),A.on("modal_closed",()=>{throw new Error("User close QRCode Modal")});const H=()=>{A.killSession()};try{const D=yield A._sendCallRequest(L);return D&&H(),D}catch(D){throw H(),D}})()}connect(w){var A=this;return ge(function*(){if(!A._qrcodeModal)throw new Error("QRCode Modal not provided");return A.connected?{chainId:A.chainId,accounts:A.accounts}:(yield A.createSession(w),new Promise(function(){var L=ge(function*(H,D){A.on("modal_closed",()=>D(new Error("User close QRCode Modal"))),A.on("connect",(q,k)=>{if(q)return D(q);H(k.params[0])})});return function(H,D){return L.apply(this,arguments)}}()))})()}createSession(w){var A=this;return ge(function*(){if(A._connected)throw new Error("Session currently connected");if(A.pending)return;A._key=yield A._generateKey();const L=A._formatRequest({method:"wc_sessionRequest",params:[{peerId:A.clientId,peerMeta:A.clientMeta,chainId:w&&w.chainId?w.chainId:null}]});A.handshakeId=L.id,A.handshakeTopic=Object(m.uuid)(),A._sendSessionRequest(L,"Session update rejected",{topic:A.handshakeTopic}),A._eventManager.trigger({event:"display_uri",params:[A.uri]})})()}approveSession(w){if(this._connected)throw new Error("Session currently connected");this.chainId=w.chainId,this.accounts=w.accounts,this.networkId=w.networkId||0,this.rpcUrl=w.rpcUrl||"",this._sendResponse({id:this.handshakeId,jsonrpc:"2.0",result:{approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl,peerId:this.clientId,peerMeta:this.clientMeta}}),this._connected=!0,this._setStorageSession(),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})}rejectSession(w){if(this._connected)throw new Error("Session currently connected");const A=w&&w.message?w.message:"Session Rejected",L=this._formatResponse({id:this.handshakeId,error:{message:A}});this._sendResponse(L),this._connected=!1,this._eventManager.trigger({event:"disconnect",params:[{message:A}]}),this._removeStorageSession()}updateSession(w){if(!this._connected)throw new Error("Session currently disconnected");this.chainId=w.chainId,this.accounts=w.accounts,this.networkId=w.networkId||0,this.rpcUrl=w.rpcUrl||"";const L=this._formatRequest({method:"wc_sessionUpdate",params:[{approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl}]});this._sendSessionRequest(L,"Session update rejected"),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]}),this._manageStorageSession()}killSession(w){var A=this;return ge(function*(){const L=w?w.message:"Session Disconnected",H=A._formatRequest({method:"wc_sessionUpdate",params:[{approved:!1,chainId:null,networkId:null,accounts:null}]});yield A._sendRequest(H),A._handleSessionDisconnect(L)})()}sendTransaction(w){var A=this;return ge(function*(){if(!A._connected)throw new Error("Session currently disconnected");const L=Object(m.parseTransactionData)(w),H=A._formatRequest({method:"eth_sendTransaction",params:[L]});return yield A._sendCallRequest(H)})()}signTransaction(w){var A=this;return ge(function*(){if(!A._connected)throw new Error("Session currently disconnected");const L=Object(m.parseTransactionData)(w),H=A._formatRequest({method:"eth_signTransaction",params:[L]});return yield A._sendCallRequest(H)})()}signMessage(w){var A=this;return ge(function*(){if(!A._connected)throw new Error("Session currently disconnected");const L=A._formatRequest({method:"eth_sign",params:w});return yield A._sendCallRequest(L)})()}signPersonalMessage(w){var A=this;return ge(function*(){if(!A._connected)throw new Error("Session currently disconnected");w=Object(m.parsePersonalSign)(w);const L=A._formatRequest({method:"personal_sign",params:w});return yield A._sendCallRequest(L)})()}signTypedData(w){var A=this;return ge(function*(){if(!A._connected)throw new Error("Session currently disconnected");const L=A._formatRequest({method:"eth_signTypedData",params:w});return yield A._sendCallRequest(L)})()}updateChain(w){var A=this;return ge(function*(){if(!A._connected)throw new Error("Session currently disconnected");const L=A._formatRequest({method:"wallet_updateChain",params:[w]});return yield A._sendCallRequest(L)})()}unsafeSend(w,A){return this._sendRequest(w,A),this._eventManager.trigger({event:"call_request_sent",params:[{request:w,options:A}]}),new Promise((L,H)=>{this._subscribeToResponse(w.id,(D,q)=>{if(D)H(D);else{if(!q)throw new Error("Missing JSON RPC response");L(q)}})})}sendCustomRequest(w,A){var L=this;return ge(function*(){if(!L._connected)throw new Error("Session currently disconnected");switch(w.method){case"eth_accounts":return L.accounts;case"eth_chainId":return Object(m.convertNumberToHex)(L.chainId);case"eth_sendTransaction":case"eth_signTransaction":w.params&&(w.params[0]=Object(m.parseTransactionData)(w.params[0]));break;case"personal_sign":w.params&&(w.params=Object(m.parsePersonalSign)(w.params))}const H=L._formatRequest(w);return yield L._sendCallRequest(H,A)})()}approveRequest(w){if(!Object(m.isJsonRpcResponseSuccess)(w))throw new Error('JSON-RPC success response must include "result" field');{const A=this._formatResponse(w);this._sendResponse(A)}}rejectRequest(w){if(!Object(m.isJsonRpcResponseError)(w))throw new Error('JSON-RPC error response must include "error" field');{const A=this._formatResponse(w);this._sendResponse(A)}}transportClose(){this._transport.close()}_sendRequest(w,A){var L=this;return ge(function*(){const H=L._formatRequest(w),D=yield L._encrypt(H),q=void 0!==(null==A?void 0:A.topic)?A.topic:L.peerId,k=JSON.stringify(D),p=void 0!==(null==A?void 0:A.forcePushNotification)?!A.forcePushNotification:Object(m.isSilentPayload)(H);L._transport.send(k,q,p)})()}_sendResponse(w){var A=this;return ge(function*(){const L=yield A._encrypt(w),H=A.peerId,D=JSON.stringify(L);A._transport.send(D,H,!0)})()}_sendSessionRequest(w,A,L){var H=this;return ge(function*(){H._sendRequest(w,L),H._subscribeToSessionResponse(w.id,A)})()}_sendCallRequest(w,A){return this._sendRequest(w,A),this._eventManager.trigger({event:"call_request_sent",params:[{request:w,options:A}]}),this._subscribeToCallResponse(w.id)}_formatRequest(w){if(void 0===w.method)throw new Error('JSON RPC request must have valid "method" value');return{id:void 0===w.id?Object(m.payloadId)():w.id,jsonrpc:"2.0",method:w.method,params:void 0===w.params?[]:w.params}}_formatResponse(w){if(void 0===w.id)throw new Error('JSON RPC request must have valid "id" value');const A={id:w.id,jsonrpc:"2.0"};if(Object(m.isJsonRpcResponseError)(w)){const L=Object(m.formatRpcError)(w.error);return Object.assign(Object.assign(Object.assign({},A),w),{error:L})}if(Object(m.isJsonRpcResponseSuccess)(w))return Object.assign(Object.assign({},A),w);throw new Error("JSON RPC response format is invalid")}_handleSessionDisconnect(w){const A=w||"Session Disconnected";this._connected||(this._qrcodeModal&&this._qrcodeModal.close(),Object(m.removeLocal)(m.mobileLinkChoiceKey)),this._connected&&(this._connected=!1),this._handshakeId&&(this._handshakeId=0),this._handshakeTopic&&(this._handshakeTopic=""),this._peerId&&(this._peerId=""),this._eventManager.trigger({event:"disconnect",params:[{message:A}]}),this._removeStorageSession(),this.transportClose()}_handleSessionResponse(w,A){A&&A.approved?(this._connected?(A.chainId&&(this.chainId=A.chainId),A.accounts&&(this.accounts=A.accounts),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]})):(this._connected=!0,A.chainId&&(this.chainId=A.chainId),A.accounts&&(this.accounts=A.accounts),A.peerId&&!this.peerId&&(this.peerId=A.peerId),A.peerMeta&&!this.peerMeta&&(this.peerMeta=A.peerMeta),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})),this._manageStorageSession()):this._handleSessionDisconnect(w)}_handleIncomingMessages(w){var A=this;return ge(function*(){if(![A.clientId,A.handshakeTopic].includes(w.topic))return;let L;try{L=JSON.parse(w.payload)}catch{return}const H=yield A._decrypt(L);H&&A._eventManager.trigger(H)})()}_subscribeToSessionRequest(){this._transport.subscribe(this.handshakeTopic)}_subscribeToResponse(w,A){this.on("response:"+w,A)}_subscribeToSessionResponse(w,A){this._subscribeToResponse(w,(L,H)=>{L?this._handleSessionResponse(L.message):Object(m.isJsonRpcResponseSuccess)(H)?this._handleSessionResponse(A,H.result):this._handleSessionResponse(H.error&&H.error.message?H.error.message:A)})}_subscribeToCallResponse(w){return new Promise((A,L)=>{this._subscribeToResponse(w,(H,D)=>{H?L(H):Object(m.isJsonRpcResponseSuccess)(D)?A(D.result):L(D.error&&D.error.message?D.error:new Error("JSON RPC response format is invalid"))})})}_subscribeToInternalEvents(){this.on("display_uri",()=>{this._qrcodeModal&&this._qrcodeModal.open(this.uri,()=>{this._eventManager.trigger({event:"modal_closed",params:[]})},this._qrcodeModalOptions)}),this.on("connect",()=>{this._qrcodeModal&&this._qrcodeModal.close()}),this.on("call_request_sent",(w,A)=>{const{request:L}=A.params[0];if(Object(m.isMobile)()&&this._signingMethods.includes(L.method)){const H=Object(m.getLocal)(m.mobileLinkChoiceKey);H&&(window.location.href=H.href)}}),this.on("wc_sessionRequest",(w,A)=>{w&&this._eventManager.trigger({event:"error",params:[{code:"SESSION_REQUEST_ERROR",message:w.toString()}]}),this.handshakeId=A.id,this.peerId=A.params[0].peerId,this.peerMeta=A.params[0].peerMeta;const L=Object.assign(Object.assign({},A),{method:"session_request"});this._eventManager.trigger(L)}),this.on("wc_sessionUpdate",(w,A)=>{w&&this._handleSessionResponse(w.message),this._handleSessionResponse("Session disconnected",A.params[0])})}_initTransport(){this._transport.on("message",w=>this._handleIncomingMessages(w)),this._transport.on("open",()=>this._eventManager.trigger({event:"transport_open",params:[]})),this._transport.on("close",()=>this._eventManager.trigger({event:"transport_close",params:[]})),this._transport.on("error",()=>this._eventManager.trigger({event:"transport_error",params:["Websocket connection failed"]})),this._transport.open()}_formatUri(){return`${this.protocol}:${this.handshakeTopic}@${this.version}?bridge=${encodeURIComponent(this.bridge)}&key=${this.key}`}_parseUri(w){const A=Object(m.parseWalletConnectUri)(w);if(A.protocol===this.protocol){if(!A.handshakeTopic)throw Error("Invalid or missing handshakeTopic parameter value");const L=A.handshakeTopic;if(!A.bridge)throw Error("Invalid or missing bridge url parameter value");const H=decodeURIComponent(A.bridge);if(!A.key)throw Error("Invalid or missing key parameter value");return{handshakeTopic:L,bridge:H,key:A.key}}throw new Error("URI format is invalid")}_generateKey(){var w=this;return ge(function*(){return w._cryptoLib?yield w._cryptoLib.generateKey():null})()}_encrypt(w){var A=this;return ge(function*(){const L=A._key;return A._cryptoLib&&L?yield A._cryptoLib.encrypt(w,L):null})()}_decrypt(w){var A=this;return ge(function*(){const L=A._key;return A._cryptoLib&&L?yield A._cryptoLib.decrypt(w,L):null})()}_getStorageSession(){let w=null;return this._sessionStorage&&(w=this._sessionStorage.getSession()),w}_setStorageSession(){this._sessionStorage&&this._sessionStorage.setSession(this.session)}_removeStorageSession(){this._sessionStorage&&this._sessionStorage.removeSession()}_manageStorageSession(){this._connected?this._setStorageSession():this._removeStorageSession()}_registerPushServer(w){if(!w.url||"string"!=typeof w.url)throw Error("Invalid or missing pushServerOpts.url parameter value");if(!w.type||"string"!=typeof w.type)throw Error("Invalid or missing pushServerOpts.type parameter value");if(!w.token||"string"!=typeof w.token)throw Error("Invalid or missing pushServerOpts.token parameter value");const A={bridge:this.bridge,topic:this.clientId,type:w.type,token:w.token,peerName:"",language:w.language||""};this.on("connect",function(){var L=ge(function*(H,D){if(H)throw H;w.peerMeta&&(A.peerName=D.params[0].peerMeta.name);try{if(!(yield(yield fetch(w.url+"/new",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(A)})).json()).success)throw Error("Failed to register in Push Server")}catch{throw Error("Failed to register in Push Server")}});return function(H,D){return L.apply(this,arguments)}}())}}{constructor(w,A){super({cryptoLib:s,connectorOpts:w,pushServerOpts:A})}}},function(z,l,f){"use strict";function s(e,t,i,c){return new(i||(i=Promise))(function(h,u){function d(T){try{v(c.next(T))}catch(O){u(O)}}function _(T){try{v(c.throw(T))}catch(O){u(O)}}function v(T){var O;T.done?h(T.value):(O=T.value,O instanceof i?O:new i(function(b){b(O)})).then(d,_)}v((c=c.apply(e,t||[])).next())})}function m(e,t){var i,c,h,u,d={label:0,sent:function(){if(1&h[0])throw h[1];return h[1]},trys:[],ops:[]};return u={next:_(0),throw:_(1),return:_(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function _(v){return function(T){return function(O){if(i)throw new TypeError("Generator is already executing.");for(;d;)try{if(i=1,c&&(h=2&O[0]?c.return:O[0]?c.throw||((h=c.return)&&h.call(c),0):c.next)&&!(h=h.call(c,O[1])).done)return h;switch(c=0,h&&(O=[2&O[0],h.value]),O[0]){case 0:case 1:h=O;break;case 4:return d.label++,{value:O[1],done:!1};case 5:d.label++,c=O[1],O=[0];continue;case 7:O=d.ops.pop(),d.trys.pop();continue;default:if(!((h=(h=d.trys).length>0&&h[h.length-1])||6!==O[0]&&2!==O[0])){d=0;continue}if(3===O[0]&&(!h||O[1]>h[0]&&O[1]1)throw new Error("this method is unavailabel on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){var t=this._currentReleaser;this._currentReleaser=void 0,t()}},e.prototype._dispatch=function(){var t=this,i=this._queue.shift();if(i){var c=!1;this._currentReleaser=function(){c||(c=!0,t._value++,t._dispatch())},i([this._value--,this._currentReleaser])}},e}(),n=function(){function e(){this._semaphore=new y(1)}return e.prototype.acquire=function(){return s(this,void 0,void 0,function(){return m(this,function(i){switch(i.label){case 0:return[4,this._semaphore.acquire()];case 1:return[2,i.sent()[1]]}})})},e.prototype.runExclusive=function(t){return this._semaphore.runExclusive(function(){return t()})},e.prototype.isLocked=function(){return this._semaphore.isLocked()},e.prototype.release=function(){this._semaphore.release()},e}();function o(e,t,i){var c=this;return void 0===i&&(i=new Error("timeout")),{acquire:function(){return new Promise(function(h,u){return s(c,void 0,void 0,function(){var d,_;return m(this,function(v){switch(v.label){case 0:return d=!1,setTimeout(function(){d=!0,u(i)},t),[4,e.acquire()];case 1:return _=v.sent(),d?(Array.isArray(_)?_[1]:_)():h(_),[2]}})})})},runExclusive:function(h){return s(this,void 0,void 0,function(){var u,d;return m(this,function(_){switch(_.label){case 0:u=function(){},_.label=1;case 1:return _.trys.push([1,,7,8]),[4,this.acquire()];case 2:return d=_.sent(),Array.isArray(d)?(u=d[1],[4,h(d[0])]):[3,4];case 3:return[2,_.sent()];case 4:return u=d,[4,h()];case 5:return[2,_.sent()];case 6:return[3,8];case 7:return u(),[7];case 8:return[2]}})})},release:function(){e.release()},isLocked:function(){return e.isLocked()}}}f.d(l,"Mutex",function(){return n}),f.d(l,"Semaphore",function(){return y}),f.d(l,"withTimeout",function(){return o})},function(z,l,f){"use strict";f.r(l);var s,m,y,n,o,e,t,i={},c=[],h=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function u(Y,G){for(var $ in G)Y[$]=G[$];return Y}function d(Y){var G=Y.parentNode;G&&G.removeChild(Y)}function _(Y,G,$){var ne,ce=arguments,ue={};for(ne in G)"key"!==ne&&"ref"!==ne&&(ue[ne]=G[ne]);if(arguments.length>3)for($=[$],ne=3;ne2&&(G.children=c.slice.call(arguments,2)),$={},G)"key"!==ne&&"ref"!==ne&&($[ne]=G[ne]);return v(Y.type,$,G.key||Y.key,G.ref||Y.ref,null)}function V(Y){var G={},$={__c:"__cC"+t++,__:Y,Consumer:function(ne,ce){return ne.children(ce)},Provider:function(ne){var ce,ue=this;return this.getChildContext||(ce=[],this.getChildContext=function(){return G[$.__c]=ue,G},this.shouldComponentUpdate=function(Ce){ue.props.value!==Ce.value&&ce.some(function(Ie){Ie.context=Ce.value,A(Ie)})},this.sub=function(Ce){ce.push(Ce);var Ie=Ce.componentWillUnmount;Ce.componentWillUnmount=function(){ce.splice(ce.indexOf(Ce),1),Ie&&Ie.call(Ce)}}),ne.children}};return $.Consumer.contextType=$,$.Provider.__=$,$}s={__e:function(Y,G){for(var $,ne;G=G.__;)if(($=G.__c)&&!$.__)try{if($.constructor&&null!=$.constructor.getDerivedStateFromError&&(ne=!0,$.setState($.constructor.getDerivedStateFromError(Y))),null!=$.componentDidCatch&&(ne=!0,$.componentDidCatch(Y)),ne)return A($.__E=$)}catch(ce){Y=ce}throw Y}},b.prototype.setState=function(Y,G){var $;$=this.__s!==this.state?this.__s:this.__s=u({},this.state),"function"==typeof Y&&(Y=Y($,this.props)),Y&&u($,Y),null!=Y&&this.__v&&(G&&this.__h.push(G),A(this))},b.prototype.forceUpdate=function(Y){this.__v&&(this.__e=!0,Y&&this.__h.push(Y),A(this))},b.prototype.render=O,m=[],y=0,n="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,e=i,t=0;var I,W,F,B=0,N=[],P=s.__r,j=s.diffed,K=s.__c,Z=s.unmount;function J(Y,G){s.__h&&s.__h(W,Y,B||G),B=0;var $=W.__H||(W.__H={__:[],__h:[]});return Y>=$.__.length&&$.__.push({}),$.__[Y]}function X(Y){return B=1,ee(Pe,Y)}function ee(Y,G,$){var ne=J(I++,2);return ne.__c||(ne.__c=W,ne.__=[$?$(G):Pe(void 0,G),function(ce){var ue=Y(ne.__[0],ce);ne.__[0]!==ue&&(ne.__[0]=ue,ne.__c.setState({}))}]),ne.__}function te(Y,G){var $=J(I++,3);!s.__s&&be($.__H,G)&&($.__=Y,$.__H=G,W.__H.__h.push($))}function oe(Y,G){var $=J(I++,4);!s.__s&&be($.__H,G)&&($.__=Y,$.__H=G,W.__h.push($))}function ve(Y){return B=5,de(function(){return{current:Y}},[])}function ie(Y,G,$){B=6,oe(function(){"function"==typeof Y?Y(G()):Y&&(Y.current=G())},null==$?$:$.concat(Y))}function de(Y,G){var $=J(I++,7);return be($.__H,G)?($.__H=G,$.__h=Y,$.__=Y()):$.__}function fe(Y,G){return B=8,de(function(){return Y},G)}function re(Y){var G=W.context[Y.__c],$=J(I++,9);return $.__c=Y,G?(null==$.__&&($.__=!0,G.sub(W)),G.props.value):Y.__}function _e(Y,G){s.useDebugValue&&s.useDebugValue(G?G(Y):Y)}function Ke(Y){var G=J(I++,10),$=X();return G.__=Y,W.componentDidCatch||(W.componentDidCatch=function(ne){G.__&&G.__(ne),$[1](ne)}),[$[0],function(){$[1](void 0)}]}function pe(){N.some(function(Y){if(Y.__P)try{Y.__H.__h.forEach(Te),Y.__H.__h.forEach(Ve),Y.__H.__h=[]}catch(G){return Y.__H.__h=[],s.__e(G,Y.__v),!0}}),N=[]}function Te(Y){Y.t&&Y.t()}function Ve(Y){var G=Y.__();"function"==typeof G&&(Y.t=G)}function be(Y,G){return!Y||G.some(function($,ne){return $!==Y[ne]})}function Pe(Y,G){return"function"==typeof G?G(Y):G}function Ye(Y,G){for(var $ in G)Y[$]=G[$];return Y}function we(Y,G){for(var $ in Y)if("__source"!==$&&!($ in G))return!0;for(var ne in G)if("__source"!==ne&&Y[ne]!==G[ne])return!0;return!1}s.__r=function(Y){P&&P(Y),I=0,(W=Y.__c).__H&&(W.__H.__h.forEach(Te),W.__H.__h.forEach(Ve),W.__H.__h=[])},s.diffed=function(Y){j&&j(Y);var G=Y.__c;if(G){var $=G.__H;$&&$.__h.length&&(1!==N.push(G)&&F===s.requestAnimationFrame||((F=s.requestAnimationFrame)||function(ne){var ce,ue=function(){clearTimeout(Ce),cancelAnimationFrame(ce),setTimeout(ne)},Ce=setTimeout(ue,100);typeof window<"u"&&(ce=requestAnimationFrame(ue))})(pe))}},s.__c=function(Y,G){G.some(function($){try{$.__h.forEach(Te),$.__h=$.__h.filter(function(ne){return!ne.__||Ve(ne)})}catch(ne){G.some(function(ce){ce.__h&&(ce.__h=[])}),G=[],s.__e(ne,$.__v)}}),K&&K(Y,G)},s.unmount=function(Y){Z&&Z(Y);var G=Y.__c;if(G){var $=G.__H;if($)try{$.__.forEach(function(ne){return ne.t&&ne.t()})}catch(ne){s.__e(ne,G.__v)}}},f.d(l,"version",function(){return We}),f.d(l,"Children",function(){return se}),f.d(l,"render",function(){return Ne}),f.d(l,"hydrate",function(){return it}),f.d(l,"unmountComponentAtNode",function(){return nt}),f.d(l,"createPortal",function(){return He}),f.d(l,"createFactory",function(){return tt}),f.d(l,"cloneElement",function(){return Fe}),f.d(l,"isValidElement",function(){return Se}),f.d(l,"findDOMNode",function(){return Ae}),f.d(l,"PureComponent",function(){return Be}),f.d(l,"memo",function(){return $e}),f.d(l,"forwardRef",function(){return je}),f.d(l,"unstable_batchedUpdates",function(){return Ue}),f.d(l,"Suspense",function(){return he}),f.d(l,"SuspenseList",function(){return me}),f.d(l,"lazy",function(){return Ge}),f.d(l,"useState",function(){return X}),f.d(l,"useReducer",function(){return ee}),f.d(l,"useEffect",function(){return te}),f.d(l,"useLayoutEffect",function(){return oe}),f.d(l,"useRef",function(){return ve}),f.d(l,"useImperativeHandle",function(){return ie}),f.d(l,"useMemo",function(){return de}),f.d(l,"useCallback",function(){return fe}),f.d(l,"useContext",function(){return re}),f.d(l,"useDebugValue",function(){return _e}),f.d(l,"useErrorBoundary",function(){return Ke}),f.d(l,"createElement",function(){return _}),f.d(l,"createContext",function(){return V}),f.d(l,"createRef",function(){return T}),f.d(l,"Fragment",function(){return O}),f.d(l,"Component",function(){return b});var Be=function(Y){var G,$;function ne(ce){var ue;return(ue=Y.call(this,ce)||this).isPureReactComponent=!0,ue}return $=Y,(G=ne).prototype=Object.create($.prototype),G.prototype.constructor=G,G.__proto__=$,ne.prototype.shouldComponentUpdate=function(ce,ue){return we(this.props,ce)||we(this.state,ue)},ne}(b);function $e(Y,G){function $(ce){var ue=this.props.ref,Ce=ue==ce.ref;return!Ce&&ue&&(ue.call?ue(null):ue.current=null),G?!G(this.props,ce)||!Ce:we(this.props,ce)}function ne(ce){return this.shouldComponentUpdate=$,_(Y,Ye({},ce))}return ne.prototype.isReactComponent=!0,ne.displayName="Memo("+(Y.displayName||Y.name)+")",ne.t=!0,ne}var Me=s.__b;function je(Y){function G($){var ne=Ye({},$);return delete ne.ref,Y(ne,$.ref)}return G.prototype.isReactComponent=G.t=!0,G.displayName="ForwardRef("+(Y.displayName||Y.name)+")",G}s.__b=function(Y){Y.type&&Y.type.t&&Y.ref&&(Y.props.ref=Y.ref,Y.ref=null),Me&&Me(Y)};var Q=function(Y,G){return Y?D(Y).reduce(function($,ne,ce){return $.concat(G(ne,ce))},[]):null},se={map:Q,forEach:Q,count:function(Y){return Y?D(Y).length:0},only:function(Y){if(1!==(Y=D(Y)).length)throw new Error("Children.only() expects only one child.");return Y[0]},toArray:D},le=s.__e;function Le(Y){return Y&&((Y=Ye({},Y)).__c=null,Y.__k=Y.__k&&Y.__k.map(Le)),Y}function he(){this.__u=0,this.o=null,this.__b=null}function Oe(Y){var G=Y.__.__c;return G&&G.u&&G.u(Y)}function Ge(Y){var G,$,ne;function ce(ue){if(G||(G=Y()).then(function(Ce){$=Ce.default||Ce},function(Ce){ne=Ce}),ne)throw ne;if(!$)throw G;return _($,ue)}return ce.displayName="Lazy",ce.t=!0,ce}function me(){this.i=null,this.l=null}s.__e=function(Y,G,$){if(Y.then)for(var ne,ce=G;ce=ce.__;)if((ne=ce.__c)&&ne.__c)return ne.__c(Y,G.__c);le(Y,G,$)},(he.prototype=new b).__c=function(Y,G){var $=this;null==$.o&&($.o=[]),$.o.push(G);var ne=Oe($.__v),ce=!1,ue=function(){ce||(ce=!0,ne?ne(Ce):Ce())};G.__c=G.componentWillUnmount,G.componentWillUnmount=function(){ue(),G.__c&&G.__c()};var Ce=function(){var Ie;if(!--$.__u)for($.__v.__k[0]=$.state.u,$.setState({u:$.__b=null});Ie=$.o.pop();)Ie.forceUpdate()};$.__u++||$.setState({u:$.__b=$.__v.__k[0]}),Y.then(ue,ue)},he.prototype.render=function(Y,G){return this.__b&&(this.__v.__k[0]=Le(this.__b),this.__b=null),[_(b,null,G.u?null:Y.children),G.u&&Y.fallback]};var ze=function(Y,G,$){if(++$[1]===$[0]&&Y.l.delete(G),Y.props.revealOrder&&("t"!==Y.props.revealOrder[0]||!Y.l.size))for($=Y.i;$;){for(;$.length>3;)$.pop()();if($[1]<$[0])break;Y.i=$=$[2]}};(me.prototype=new b).u=function(Y){var G=this,$=Oe(G.__v),ne=G.l.get(Y);return ne[0]++,function(ce){var ue=function(){G.props.revealOrder?(ne.push(ce),ze(G,Y,ne)):ce()};$?$(ue):ue()}},me.prototype.render=function(Y){this.i=null,this.l=new Map;var G=D(Y.children);Y.revealOrder&&"b"===Y.revealOrder[0]&&G.reverse();for(var $=G.length;$--;)this.l.set(G[$],this.i=[1,0,this.i]);return Y.children},me.prototype.componentDidUpdate=me.prototype.componentDidMount=function(){var Y=this;Y.l.forEach(function(G,$){ze(Y,$,G)})};var rt=function(){function Y(){}var G=Y.prototype;return G.getChildContext=function(){return this.props.context},G.render=function($){return $.children},Y}();function Re(Y){var G=this,$=Y.container,ne=_(rt,{context:G.context},Y.vnode);return G.s&&G.s!==$&&(G.v.parentNode&&G.s.removeChild(G.v),g(G.h),G.p=!1),Y.vnode?G.p?($.__k=G.__k,x(ne,$),G.__k=$.__k):(G.v=document.createTextNode(""),C("",$),$.appendChild(G.v),G.p=!0,G.s=$,x(ne,$,G.v),G.__k=G.v.__k):G.p&&(G.v.parentNode&&G.s.removeChild(G.v),g(G.h)),G.h=ne,G.componentWillUnmount=function(){G.v.parentNode&&G.s.removeChild(G.v),g(G.h)},null}function He(Y,G){return _(Re,{vnode:Y,container:G})}var Qe=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/;b.prototype.isReactComponent={};var xe=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103;function Ne(Y,G,$){if(null==G.__k)for(;G.firstChild;)G.removeChild(G.firstChild);return x(Y,G),"function"==typeof $&&$(),Y?Y.__c:null}function it(Y,G,$){return C(Y,G),"function"==typeof $&&$(),Y?Y.__c:null}var Ee=s.event;function qe(Y,G){Y["UNSAFE_"+G]&&!Y[G]&&Object.defineProperty(Y,G,{configurable:!1,get:function(){return this["UNSAFE_"+G]},set:function($){this["UNSAFE_"+G]=$}})}s.event=function(Y){Ee&&(Y=Ee(Y)),Y.persist=function(){};var G=!1,$=!1,ne=Y.stopPropagation;Y.stopPropagation=function(){ne.call(Y),G=!0};var ce=Y.preventDefault;return Y.preventDefault=function(){ce.call(Y),$=!0},Y.isPropagationStopped=function(){return G},Y.isDefaultPrevented=function(){return $},Y.nativeEvent=Y};var et={configurable:!0,get:function(){return this.class}},ke=s.vnode;s.vnode=function(Y){Y.$$typeof=xe;var G=Y.type,$=Y.props;if(G){if($.class!=$.className&&(et.enumerable="className"in $,null!=$.className&&($.class=$.className),Object.defineProperty($,"className",et)),"function"!=typeof G){var ne,ce,ue;for(ue in $.defaultValue&&void 0!==$.value&&($.value||0===$.value||($.value=$.defaultValue),delete $.defaultValue),Array.isArray($.value)&&$.multiple&&"select"===G&&(D($.children).forEach(function(Ce){-1!=$.value.indexOf(Ce.props.value)&&(Ce.props.selected=!0)}),delete $.value),$)if(ne=Qe.test(ue))break;if(ne)for(ue in ce=Y.props={},$)ce[Qe.test(ue)?ue.replace(/[A-Z0-9]/,"-$&").toLowerCase():ue]=$[ue]}(function(Ce){var Ie=Y.type,De=Y.props;if(De&&"string"==typeof Ie){var ye={};for(var ae in De)/^on(Ani|Tra|Tou)/.test(ae)&&(De[ae.toLowerCase()]=De[ae],delete De[ae]),ye[ae.toLowerCase()]=ae;if(ye.ondoubleclick&&(De.ondblclick=De[ye.ondoubleclick],delete De[ye.ondoubleclick]),ye.onbeforeinput&&(De.onbeforeinput=De[ye.onbeforeinput],delete De[ye.onbeforeinput]),ye.onchange&&("textarea"===Ie||"input"===Ie.toLowerCase()&&!/^fil|che|ra/i.test(De.type))){var Je=ye.oninput||"oninput";De[Je]||(De[Je]=De[ye.onchange],delete De[ye.onchange])}}})(),"function"==typeof G&&!G.m&&G.prototype&&(qe(G.prototype,"componentWillMount"),qe(G.prototype,"componentWillReceiveProps"),qe(G.prototype,"componentWillUpdate"),G.m=!0)}ke&&ke(Y)};var We="16.8.0";function tt(Y){return _.bind(null,Y)}function Se(Y){return!!Y&&Y.$$typeof===xe}function Fe(Y){return Se(Y)?U.apply(null,arguments):Y}function nt(Y){return!!Y.__k&&(x(null,Y),!0)}function Ae(Y){return Y&&(Y.base||1===Y.nodeType&&Y)||null}var Ue=function(Y,G){return Y(G)};l.default={useState:X,useReducer:ee,useEffect:te,useLayoutEffect:oe,useRef:ve,useImperativeHandle:ie,useMemo:de,useCallback:fe,useContext:re,useDebugValue:_e,version:"16.8.0",Children:se,render:Ne,hydrate:Ne,unmountComponentAtNode:nt,createPortal:He,createElement:_,createContext:V,createFactory:tt,cloneElement:Fe,createRef:T,Fragment:O,isValidElement:Se,findDOMNode:Ae,Component:b,PureComponent:Be,memo:$e,forwardRef:je,unstable_batchedUpdates:Ue,Suspense:he,SuspenseList:me,lazy:Ge}}])}}]); \ No newline at end of file diff --git a/angular-bare-bones-demo/dist/261.1843d3d0c204dc4b.js b/angular-bare-bones-demo/dist/261.1843d3d0c204dc4b.js deleted file mode 100644 index 2ddcab8e3..000000000 --- a/angular-bare-bones-demo/dist/261.1843d3d0c204dc4b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkAngular_bare_bones_demo=self.webpackChunkAngular_bare_bones_demo||[]).push([[261],{64261:(P,g,u)=>{u.r(g),u.d(g,{Web3WalletProvider:()=>y,default:()=>b});var p=u(84003),w=u(7483),v=u(36022),h=function(s,n,e,r){return new(e||(e=Promise))(function(t,c){function l(d){try{o(r.next(d))}catch(C){c(C)}}function a(d){try{o(r.throw(d))}catch(C){c(C)}}function o(d){d.done?t(d.value):function i(t){return t instanceof e?t:new e(function(c){c(t)})}(d.value).then(l,a)}o((r=r.apply(s,n||[])).next())})},f=function(s,n){var r,i,t,c,e={label:0,sent:function(){if(1&t[0])throw t[1];return t[1]},trys:[],ops:[]};return c={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function l(o){return function(d){return function a(o){if(r)throw new TypeError("Generator is already executing.");for(;e;)try{if(r=1,i&&(t=2&o[0]?i.return:o[0]?i.throw||((t=i.return)&&t.call(i),0):i.next)&&!(t=t.call(i,o[1])).done)return t;switch(i=0,t&&(o=[2&o[0],t.value]),o[0]){case 0:case 1:t=o;break;case 4:return e.label++,{value:o[1],done:!1};case 5:e.label++,i=o[1],o=[0];continue;case 7:o=e.ops.pop(),e.trys.pop();continue;default:if(!(t=(t=e.trys).length>0&&t[t.length-1])&&(6===o[0]||2===o[0])){e=0;continue}if(3===o[0]&&(!t||o[1]>t[0]&&o[1]{"use strict";function i(v){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(I){return typeof I}:function(I){return I&&"function"==typeof Symbol&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I})(v)}var w,P,p=s(71349).codes,l=p.ERR_AMBIGUOUS_ARGUMENT,e=p.ERR_INVALID_ARG_TYPE,t=p.ERR_INVALID_ARG_VALUE,u=p.ERR_INVALID_RETURN_VALUE,m=p.ERR_MISSING_ARGS,h=s(89122),b=s(71732).inspect,a=s(71732).types,o=a.isPromise,n=a.isRegExp,f=Object.assign?Object.assign:s(73276).assign,_=Object.is?Object.is:s(64269);function H(){var v=s(18964);w=v.isDeepEqual,P=v.isDeepStrictEqual}var re=!1,te=M.exports=Q,W={};function ie(v){throw v.message instanceof Error?v.message:new h(v)}function ee(v,T,I,k){if(!I){var c=!1;if(0===T)c=!0,k="No value argument passed to `assert.ok()`";else if(k instanceof Error)throw k;var d=new h({actual:I,expected:!0,message:k,operator:"==",stackStartFn:v});throw d.generatedMessage=c,d}}function Q(){for(var v=arguments.length,T=new Array(v),I=0;I1?I-1:0),c=1;c1?I-1:0),c=1;c1?I-1:0),c=1;c1?I-1:0),c=1;c{"use strict";function S(J,ee,Q){return ee in J?Object.defineProperty(J,ee,{value:Q,enumerable:!0,configurable:!0,writable:!0}):J[ee]=Q,J}function p(J,ee){for(var Q=0;Q"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function r(J,ee,Q){return(r=h()?Reflect.construct:function(F,K,x){var j=[null];j.push.apply(j,K);var D=new(Function.bind.apply(F,j));return x&&a(D,x.prototype),D}).apply(null,arguments)}function a(J,ee){return(a=Object.setPrototypeOf||function(X,F){return X.__proto__=F,X})(J,ee)}function o(J){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(Q){return Q.__proto__||Object.getPrototypeOf(Q)})(J)}function n(J){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(Q){return typeof Q}:function(Q){return Q&&"function"==typeof Symbol&&Q.constructor===Symbol&&Q!==Symbol.prototype?"symbol":typeof Q})(J)}var _=s(71732).inspect,w=s(71349).codes.ERR_INVALID_ARG_TYPE;function P(J,ee,Q){return(void 0===Q||Q>J.length)&&(Q=J.length),J.substring(Q-ee.length,Q)===ee}var U="",O="",H="",R="",Y={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function re(J){var ee=Object.keys(J),Q=Object.create(Object.getPrototypeOf(J));return ee.forEach(function(X){Q[X]=J[X]}),Object.defineProperty(Q,"message",{value:J.message}),Q}function te(J){return _(J,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var ie=function(J){function ee(Q){var X;if(function E(J,ee){if(!(J instanceof ee))throw new TypeError("Cannot call a class as a function")}(this,ee),"object"!==n(Q)||null===Q)throw new w("options","Object",Q);var F=Q.message,K=Q.operator,x=Q.stackStartFn,j=Q.actual,L=Q.expected,D=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=F)X=e(this,o(ee).call(this,String(F)));else if(process.stderr&&process.stderr.isTTY&&(process.stderr&&process.stderr.getColorDepth&&1!==process.stderr.getColorDepth()?(U="\x1b[34m",O="\x1b[32m",R="\x1b[39m",H="\x1b[31m"):(U="",O="",R="",H="")),"object"===n(j)&&null!==j&&"object"===n(L)&&null!==L&&"stack"in j&&j instanceof Error&&"stack"in L&&L instanceof Error&&(j=re(j),L=re(L)),"deepStrictEqual"===K||"strictEqual"===K)X=e(this,o(ee).call(this,function W(J,ee,Q){var X="",F="",K=0,x="",j=!1,L=te(J),D=L.split("\n"),V=te(ee).split("\n"),q=0,A="";if("strictEqual"===Q&&"object"===n(J)&&"object"===n(ee)&&null!==J&&null!==ee&&(Q="strictEqualObject"),1===D.length&&1===V.length&&D[0]!==V[0]){var v=D[0].length+V[0].length;if(v<=10){if(!("object"===n(J)&&null!==J||"object"===n(ee)&&null!==ee||0===J&&0===ee))return"".concat(Y[Q],"\n\n")+"".concat(D[0]," !== ").concat(V[0],"\n")}else if("strictEqualObject"!==Q&&v<(process.stderr&&process.stderr.isTTY?process.stderr.columns:80)){for(;D[0][q]===V[0][q];)q++;q>2&&(A="\n ".concat(function C(J,ee){if(ee=Math.floor(ee),0==J.length||0==ee)return"";var Q=J.length*ee;for(ee=Math.floor(Math.log(ee)/Math.log(2));ee;)J+=J,ee--;return J+J.substring(0,Q-J.length)}(" ",q),"^"),q=0)}}for(var I=D[D.length-1],k=V[V.length-1];I===k&&(q++<2?x="\n ".concat(I).concat(x):X=I,D.pop(),V.pop(),0!==D.length&&0!==V.length);)I=D[D.length-1],k=V[V.length-1];var c=Math.max(D.length,V.length);if(0===c){var d=L.split("\n");if(d.length>30)for(d[26]="".concat(U,"...").concat(R);d.length>27;)d.pop();return"".concat(Y.notIdentical,"\n\n").concat(d.join("\n"),"\n")}q>3&&(x="\n".concat(U,"...").concat(R).concat(x),j=!0),""!==X&&(x="\n ".concat(X).concat(x),X="");var B=0,z=Y[Q]+"\n".concat(O,"+ actual").concat(R," ").concat(H,"- expected").concat(R),oe=" ".concat(U,"...").concat(R," Lines skipped");for(q=0;q1&&q>2&&(ne>4?(F+="\n".concat(U,"...").concat(R),j=!0):ne>3&&(F+="\n ".concat(V[q-2]),B++),F+="\n ".concat(V[q-1]),B++),K=q,X+="\n".concat(H,"-").concat(R," ").concat(V[q]),B++;else if(V.length1&&q>2&&(ne>4?(F+="\n".concat(U,"...").concat(R),j=!0):ne>3&&(F+="\n ".concat(D[q-2]),B++),F+="\n ".concat(D[q-1]),B++),K=q,F+="\n".concat(O,"+").concat(R," ").concat(D[q]),B++;else{var N=V[q],he=D[q],ye=he!==N&&(!P(he,",")||he.slice(0,-1)!==N);ye&&P(N,",")&&N.slice(0,-1)===he&&(ye=!1,he+=","),ye?(ne>1&&q>2&&(ne>4?(F+="\n".concat(U,"...").concat(R),j=!0):ne>3&&(F+="\n ".concat(D[q-2]),B++),F+="\n ".concat(D[q-1]),B++),K=q,F+="\n".concat(O,"+").concat(R," ").concat(he),X+="\n".concat(H,"-").concat(R," ").concat(N),B+=2):(F+=X,X="",(1===ne||0===q)&&(F+="\n ".concat(he),B++))}if(B>20&&q30)for(q[26]="".concat(U,"...").concat(R);q.length>27;)q.pop();X=e(this,1===q.length?o(ee).call(this,"".concat(V," ").concat(q[0])):o(ee).call(this,"".concat(V,"\n\n").concat(q.join("\n"),"\n")))}else{var A=te(j),v="",T=Y[K];"notDeepEqual"===K||"notEqual"===K?(A="".concat(Y[K],"\n\n").concat(A)).length>1024&&(A="".concat(A.slice(0,1021),"...")):(v="".concat(te(L)),A.length>512&&(A="".concat(A.slice(0,509),"...")),v.length>512&&(v="".concat(v.slice(0,509),"...")),"deepEqual"===K||"equal"===K?A="".concat(T,"\n\n").concat(A,"\n\nshould equal\n\n"):v=" ".concat(K," ").concat(v)),X=e(this,o(ee).call(this,"".concat(A).concat(v)))}return Error.stackTraceLimit=D,X.generatedMessage=!F,Object.defineProperty(t(X),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),X.code="ERR_ASSERTION",X.actual=j,X.expected=L,X.operator=K,Error.captureStackTrace&&Error.captureStackTrace(t(X),x),X.name="AssertionError",e(X)}return function u(J,ee){if("function"!=typeof ee&&null!==ee)throw new TypeError("Super expression must either be null or a function");J.prototype=Object.create(ee&&ee.prototype,{constructor:{value:J,writable:!0,configurable:!0}}),ee&&a(J,ee)}(ee,J),function l(J,ee,Q){ee&&p(J.prototype,ee),Q&&p(J,Q)}(ee,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:_.custom,value:function(X,F){return _(this,function i(J){for(var ee=1;ee{"use strict";function i(f){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(y){return typeof y}:function(y){return y&&"function"==typeof Symbol&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y})(f)}function l(f){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)})(f)}function t(f,_){return(t=Object.setPrototypeOf||function(w,P){return w.__proto__=P,w})(f,_)}var m,h,u={};function r(f,_,y){y||(y=Error);var P=function(C){function U(O,H,R){var Y;return function S(f,_){if(!(f instanceof _))throw new TypeError("Cannot call a class as a function")}(this,U),Y=function E(f,_){return!_||"object"!==i(_)&&"function"!=typeof _?function p(f){if(void 0===f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f}(f):_}(this,l(U).call(this,function w(C,U,O){return"string"==typeof _?_:_(C,U,O)}(O,H,R))),Y.code=f,Y}return function e(f,_){if("function"!=typeof _&&null!==_)throw new TypeError("Super expression must either be null or a function");f.prototype=Object.create(_&&_.prototype,{constructor:{value:f,writable:!0,configurable:!0}}),_&&t(f,_)}(U,C),U}(y);u[f]=P}function b(f,_){if(Array.isArray(f)){var y=f.length;return f=f.map(function(w){return String(w)}),y>2?"one of ".concat(_," ").concat(f.slice(0,y-1).join(", "),", or ")+f[y-1]:2===y?"one of ".concat(_," ").concat(f[0]," or ").concat(f[1]):"of ".concat(_," ").concat(f[0])}return"of ".concat(_," ").concat(String(f))}r("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),r("ERR_INVALID_ARG_TYPE",function(f,_,y){var w,P;if(void 0===m&&(m=s(80469)),m("string"==typeof f,"'name' must be a string"),"string"==typeof _&&function a(f,_,y){return f.substr(!y||y<0?0:+y,_.length)===_}(_,"not ")?(w="must not be",_=_.replace(/^not /,"")):w="must be",function o(f,_,y){return(void 0===y||y>f.length)&&(y=f.length),f.substring(y-_.length,y)===_}(f," argument"))P="The ".concat(f," ").concat(w," ").concat(b(_,"type"));else{var C=function n(f,_,y){return"number"!=typeof y&&(y=0),!(y+_.length>f.length)&&-1!==f.indexOf(_,y)}(f,".")?"property":"argument";P='The "'.concat(f,'" ').concat(C," ").concat(w," ").concat(b(_,"type"))}return P+". Received type ".concat(i(y))},TypeError),r("ERR_INVALID_ARG_VALUE",function(f,_){var y=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===h&&(h=s(71732));var w=h.inspect(_);return w.length>128&&(w="".concat(w.slice(0,128),"...")),"The argument '".concat(f,"' ").concat(y,". Received ").concat(w)},TypeError,RangeError),r("ERR_INVALID_RETURN_VALUE",function(f,_,y){var w;return w=y&&y.constructor&&y.constructor.name?"instance of ".concat(y.constructor.name):"type ".concat(i(y)),"Expected ".concat(f,' to be returned from the "').concat(_,'"')+" function but got ".concat(w,".")},TypeError),r("ERR_MISSING_ARGS",function(){for(var f=arguments.length,_=new Array(f),y=0;y0,"At least one arg needs to be specified");var w="The ",P=_.length;switch(_=_.map(function(C){return'"'.concat(C,'"')}),P){case 1:w+="".concat(_[0]," argument");break;case 2:w+="".concat(_[0]," and ").concat(_[1]," arguments");break;default:w+=_.slice(0,P-1).join(", "),w+=", and ".concat(_[P-1]," arguments")}return"".concat(w," must be specified")},TypeError),M.exports.codes=u},18964:(M,g,s)=>{"use strict";function i($,Z){return function p($){if(Array.isArray($))return $}($)||function E($,Z){var ae=[],fe=!0,se=!1,le=void 0;try{for(var de,ue=$[Symbol.iterator]();!(fe=(de=ue.next()).done)&&(ae.push(de.value),!Z||ae.length!==Z);fe=!0);}catch(ce){se=!0,le=ce}finally{try{!fe&&null!=ue.return&&ue.return()}finally{if(se)throw le}}return ae}($,Z)||function S(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function l($){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(ae){return typeof ae}:function(ae){return ae&&"function"==typeof Symbol&&ae.constructor===Symbol&&ae!==Symbol.prototype?"symbol":typeof ae})($)}var e=void 0!==/a/g.flags,t=function(Z){var ae=[];return Z.forEach(function(fe){return ae.push(fe)}),ae},u=function(Z){var ae=[];return Z.forEach(function(fe,se){return ae.push([se,fe])}),ae},m=Object.is?Object.is:s(64269),h=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},r=Number.isNaN?Number.isNaN:s(12989);function b($){return $.call.bind($)}var a=b(Object.prototype.hasOwnProperty),o=b(Object.prototype.propertyIsEnumerable),n=b(Object.prototype.toString),f=s(71732).types,_=f.isAnyArrayBuffer,y=f.isArrayBufferView,w=f.isDate,P=f.isMap,C=f.isRegExp,U=f.isSet,O=f.isNativeError,H=f.isBoxedPrimitive,R=f.isNumberObject,Y=f.isStringObject,G=f.isBooleanObject,re=f.isBigIntObject,te=f.isSymbolObject,W=f.isFloat32Array,ie=f.isFloat64Array;function J($){if(0===$.length||$.length>10)return!0;for(var Z=0;Z<$.length;Z++){var ae=$.charCodeAt(Z);if(ae<48||ae>57)return!0}return 10===$.length&&$>=Math.pow(2,32)}function ee($){return Object.keys($).filter(J).concat(h($).filter(Object.prototype.propertyIsEnumerable.bind($)))}function Q($,Z){if($===Z)return 0;for(var ae=$.length,fe=Z.length,se=0,le=Math.min(ae,fe);se{M.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},19568:(M,g,s)=>{"use strict";var i=s(18540),S=s(60044),E=S(i("String.prototype.indexOf"));M.exports=function(l,e){var t=i(l,!!e);return"function"==typeof t&&E(l,".prototype.")>-1?S(t):t}},60044:(M,g,s)=>{"use strict";var i=s(75396),S=s(18540),E=S("%Function.prototype.apply%"),p=S("%Function.prototype.call%"),l=S("%Reflect.apply%",!0)||i.call(p,E),e=S("%Object.getOwnPropertyDescriptor%",!0),t=S("%Object.defineProperty%",!0),u=S("%Math.max%");if(t)try{t({},"a",{value:1})}catch{t=null}M.exports=function(r){var b=l(i,p,arguments);if(e&&t){var a=e(b,"length");a.configurable&&t(b,"length",{value:1+u(0,r.length-(arguments.length-1))})}return b};var m=function(){return l(i,E,arguments)};t?t(M.exports,"apply",{value:m}):M.exports.apply=m},96886:(M,g,s)=>{"use strict";var i=s(28507),S="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),E=Object.prototype.toString,p=Array.prototype.concat,l=Object.defineProperty,t=s(45898)(),u=l&&t,m=function(r,b,a,o){b in r&&(!function(r){return"function"==typeof r&&"[object Function]"===E.call(r)}(o)||!o())||(u?l(r,b,{configurable:!0,enumerable:!1,value:a,writable:!0}):r[b]=a)},h=function(r,b){var a=arguments.length>2?arguments[2]:{},o=i(b);S&&(o=p.call(o,Object.getOwnPropertySymbols(b)));for(var n=0;n{"use strict";function g(i,S){if(null==i)throw new TypeError("Cannot convert first argument to object");for(var E=Object(i),p=1;p{"use strict";var i=s(17701),S=Object.prototype.toString,E=Object.prototype.hasOwnProperty,p=function(m,h,r){for(var b=0,a=m.length;b=3&&(b=r),"[object Array]"===S.call(m)?p(m,h,b):"string"==typeof m?l(m,h,b):e(m,h,b)}},31609:M=>{"use strict";var g="Function.prototype.bind called on incompatible ",s=Array.prototype.slice,i=Object.prototype.toString,S="[object Function]";M.exports=function(p){var l=this;if("function"!=typeof l||i.call(l)!==S)throw new TypeError(g+l);for(var t,e=s.call(arguments,1),u=function(){if(this instanceof t){var a=l.apply(this,e.concat(s.call(arguments)));return Object(a)===a?a:this}return l.apply(p,e.concat(s.call(arguments)))},m=Math.max(0,l.length-e.length),h=[],r=0;r{"use strict";var i=s(31609);M.exports=Function.prototype.bind||i},18540:(M,g,s)=>{"use strict";var i,S=SyntaxError,E=Function,p=TypeError,l=function(G){try{return E('"use strict"; return ('+G+").constructor;")()}catch{}},e=Object.getOwnPropertyDescriptor;if(e)try{e({},"")}catch{e=null}var t=function(){throw new p},u=e?function(){try{return t}catch{try{return e(arguments,"callee").get}catch{return t}}}():t,m=s(59326)(),h=Object.getPrototypeOf||function(G){return G.__proto__},r={},b=typeof Uint8Array>"u"?i:h(Uint8Array),a={"%AggregateError%":typeof AggregateError>"u"?i:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?i:ArrayBuffer,"%ArrayIteratorPrototype%":m?h([][Symbol.iterator]()):i,"%AsyncFromSyncIteratorPrototype%":i,"%AsyncFunction%":r,"%AsyncGenerator%":r,"%AsyncGeneratorFunction%":r,"%AsyncIteratorPrototype%":r,"%Atomics%":typeof Atomics>"u"?i:Atomics,"%BigInt%":typeof BigInt>"u"?i:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?i:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?i:Float32Array,"%Float64Array%":typeof Float64Array>"u"?i:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?i:FinalizationRegistry,"%Function%":E,"%GeneratorFunction%":r,"%Int8Array%":typeof Int8Array>"u"?i:Int8Array,"%Int16Array%":typeof Int16Array>"u"?i:Int16Array,"%Int32Array%":typeof Int32Array>"u"?i:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":m?h(h([][Symbol.iterator]())):i,"%JSON%":"object"==typeof JSON?JSON:i,"%Map%":typeof Map>"u"?i:Map,"%MapIteratorPrototype%":typeof Map>"u"||!m?i:h((new Map)[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?i:Promise,"%Proxy%":typeof Proxy>"u"?i:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?i:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?i:Set,"%SetIteratorPrototype%":typeof Set>"u"||!m?i:h((new Set)[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?i:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":m?h(""[Symbol.iterator]()):i,"%Symbol%":m?Symbol:i,"%SyntaxError%":S,"%ThrowTypeError%":u,"%TypedArray%":b,"%TypeError%":p,"%Uint8Array%":typeof Uint8Array>"u"?i:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?i:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?i:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?i:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?i:WeakMap,"%WeakRef%":typeof WeakRef>"u"?i:WeakRef,"%WeakSet%":typeof WeakSet>"u"?i:WeakSet},o=function G(re){var te;if("%AsyncFunction%"===re)te=l("async function () {}");else if("%GeneratorFunction%"===re)te=l("function* () {}");else if("%AsyncGeneratorFunction%"===re)te=l("async function* () {}");else if("%AsyncGenerator%"===re){var W=G("%AsyncGeneratorFunction%");W&&(te=W.prototype)}else if("%AsyncIteratorPrototype%"===re){var ie=G("%AsyncGenerator%");ie&&(te=h(ie.prototype))}return a[re]=te,te},n={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},f=s(75396),_=s(57709),y=f.call(Function.call,Array.prototype.concat),w=f.call(Function.apply,Array.prototype.splice),P=f.call(Function.call,String.prototype.replace),C=f.call(Function.call,String.prototype.slice),U=f.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,H=/\\(\\)?/g,R=function(re){var te=C(re,0,1),W=C(re,-1);if("%"===te&&"%"!==W)throw new S("invalid intrinsic syntax, expected closing `%`");if("%"===W&&"%"!==te)throw new S("invalid intrinsic syntax, expected opening `%`");var ie=[];return P(re,O,function(J,ee,Q,X){ie[ie.length]=Q?P(X,H,"$1"):ee||J}),ie},Y=function(re,te){var ie,W=re;if(_(n,W)&&(W="%"+(ie=n[W])[0]+"%"),_(a,W)){var J=a[W];if(J===r&&(J=o(W)),typeof J>"u"&&!te)throw new p("intrinsic "+re+" exists, but is not available. Please file an issue!");return{alias:ie,name:W,value:J}}throw new S("intrinsic "+re+" does not exist!")};M.exports=function(re,te){if("string"!=typeof re||0===re.length)throw new p("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof te)throw new p('"allowMissing" argument must be a boolean');if(null===U(/^%?[^%]*%?$/,re))throw new S("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var W=R(re),ie=W.length>0?W[0]:"",J=Y("%"+ie+"%",te),ee=J.name,Q=J.value,X=!1,F=J.alias;F&&(ie=F[0],w(W,y([0,1],F)));for(var K=1,x=!0;K=W.length){var V=e(Q,j);Q=(x=!!V)&&"get"in V&&!("originalValue"in V.get)?V.get:Q[j]}else x=_(Q,j),Q=Q[j];x&&!X&&(a[ee]=Q)}}return Q}},45898:(M,g,s)=>{"use strict";var S=s(18540)("%Object.defineProperty%",!0),E=function(){if(S)try{return S({},"a",{value:1}),!0}catch{return!1}return!1};E.hasArrayLengthDefineBug=function(){if(!E())return null;try{return 1!==S([],"length",{value:1}).length}catch{return!0}},M.exports=E},59326:(M,g,s)=>{"use strict";var i=typeof Symbol<"u"&&Symbol,S=s(79045);M.exports=function(){return"function"==typeof i&&"function"==typeof Symbol&&"symbol"==typeof i("foo")&&"symbol"==typeof Symbol("bar")&&S()}},79045:M=>{"use strict";M.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var s={},i=Symbol("test"),S=Object(i);if("string"==typeof i||"[object Symbol]"!==Object.prototype.toString.call(i)||"[object Symbol]"!==Object.prototype.toString.call(S))return!1;for(i in s[i]=42,s)return!1;if("function"==typeof Object.keys&&0!==Object.keys(s).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(s).length)return!1;var p=Object.getOwnPropertySymbols(s);if(1!==p.length||p[0]!==i||!Object.prototype.propertyIsEnumerable.call(s,i))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var l=Object.getOwnPropertyDescriptor(s,i);if(42!==l.value||!0!==l.enumerable)return!1}return!0}},91407:(M,g,s)=>{"use strict";var i=s(79045);M.exports=function(){return i()&&!!Symbol.toStringTag}},57709:(M,g,s)=>{"use strict";var i=s(75396);M.exports=i.call(Function.call,Object.prototype.hasOwnProperty)},54557:(M,g,s)=>{var i=s(12703),S=s(38505),E=M.exports;for(var p in i)i.hasOwnProperty(p)&&(E[p]=i[p]);function l(e){if("string"==typeof e&&(e=S.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw new Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}E.request=function(e,t){return e=l(e),i.request.call(this,e,t)},E.get=function(e,t){return e=l(e),i.get.call(this,e,t)}},77316:(M,g,s)=>{"use strict";var i=s(91407)(),E=s(19568)("Object.prototype.toString"),p=function(u){return!(i&&u&&"object"==typeof u&&Symbol.toStringTag in u)&&"[object Arguments]"===E(u)},l=function(u){return!!p(u)||null!==u&&"object"==typeof u&&"number"==typeof u.length&&u.length>=0&&"[object Array]"!==E(u)&&"[object Function]"===E(u.callee)},e=function(){return p(arguments)}();p.isLegacyArguments=l,M.exports=e?p:l},17701:M=>{"use strict";var i,S,g=Function.prototype.toString,s="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof s&&"function"==typeof Object.defineProperty)try{i=Object.defineProperty({},"length",{get:function(){throw S}}),S={},s(function(){throw 42},null,i)}catch(_){_!==S&&(s=null)}else s=null;var E=/^\s*class\b/,p=function(y){try{var w=g.call(y);return E.test(w)}catch{return!1}},l=function(y){try{return!p(y)&&(g.call(y),!0)}catch{return!1}},e=Object.prototype.toString,a="function"==typeof Symbol&&!!Symbol.toStringTag,o=!(0 in[,]),n=function(){return!1};if("object"==typeof document){var f=document.all;e.call(f)===e.call(document.all)&&(n=function(y){if((o||!y)&&(typeof y>"u"||"object"==typeof y))try{var w=e.call(y);return("[object HTMLAllCollection]"===w||"[object HTML document.all class]"===w||"[object HTMLCollection]"===w||"[object Object]"===w)&&null==y("")}catch{}return!1})}M.exports=s?function(y){if(n(y))return!0;if(!y||"function"!=typeof y&&"object"!=typeof y)return!1;try{s(y,null,i)}catch(w){if(w!==S)return!1}return!p(y)&&l(y)}:function(y){if(n(y))return!0;if(!y||"function"!=typeof y&&"object"!=typeof y)return!1;if(a)return l(y);if(p(y))return!1;var w=e.call(y);return!("[object Function]"!==w&&"[object GeneratorFunction]"!==w&&!/^\[object HTML/.test(w))&&l(y)}},72197:(M,g,s)=>{"use strict";var t,i=Object.prototype.toString,S=Function.prototype.toString,E=/^\s*(?:function)?\*/,p=s(91407)(),l=Object.getPrototypeOf;M.exports=function(m){if("function"!=typeof m)return!1;if(E.test(S.call(m)))return!0;if(!p)return"[object GeneratorFunction]"===i.call(m);if(!l)return!1;if(typeof t>"u"){var r=function(){if(!p)return!1;try{return Function("return function*() {}")()}catch{}}();t=!!r&&l(r)}return l(m)===t}},43126:M=>{"use strict";M.exports=function(s){return s!=s}},12989:(M,g,s)=>{"use strict";var i=s(60044),S=s(96886),E=s(43126),p=s(46618),l=s(6295),e=i(p(),Number);S(e,{getPolyfill:p,implementation:E,shim:l}),M.exports=e},46618:(M,g,s)=>{"use strict";var i=s(43126);M.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:i}},6295:(M,g,s)=>{"use strict";var i=s(96886),S=s(46618);M.exports=function(){var p=S();return i(Number,{isNaN:p},{isNaN:function(){return Number.isNaN!==p}}),p}},77579:(M,g,s)=>{"use strict";var i=s(32208),S=s(85127),E=s(19568),p=E("Object.prototype.toString"),l=s(91407)(),e=typeof globalThis>"u"?global:globalThis,t=S(),u=E("Array.prototype.indexOf",!0)||function(n,f){for(var _=0;_-1}return!!r&&function(n){var f=!1;return i(h,function(_,y){if(!f)try{f=_.call(n)===y}catch{}}),f}(n)}},27859:M=>{"use strict";var g=function(s){return s!=s};M.exports=function(i,S){return 0===i&&0===S?1/i==1/S:!!(i===S||g(i)&&g(S))}},64269:(M,g,s)=>{"use strict";var i=s(96886),S=s(60044),E=s(27859),p=s(28593),l=s(16343),e=S(p(),Object);i(e,{getPolyfill:p,implementation:E,shim:l}),M.exports=e},28593:(M,g,s)=>{"use strict";var i=s(27859);M.exports=function(){return"function"==typeof Object.is?Object.is:i}},16343:(M,g,s)=>{"use strict";var i=s(28593),S=s(96886);M.exports=function(){var p=i();return S(Object,{is:p},{is:function(){return Object.is!==p}}),p}},26068:(M,g,s)=>{"use strict";var i;if(!Object.keys){var S=Object.prototype.hasOwnProperty,E=Object.prototype.toString,p=s(62666),l=Object.prototype.propertyIsEnumerable,e=!l.call({toString:null},"toString"),t=l.call(function(){},"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],m=function(a){var o=a.constructor;return o&&o.prototype===a},h={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},r=function(){if(typeof window>"u")return!1;for(var a in window)try{if(!h["$"+a]&&S.call(window,a)&&null!==window[a]&&"object"==typeof window[a])try{m(window[a])}catch{return!0}}catch{return!0}return!1}();i=function(o){var n=null!==o&&"object"==typeof o,f="[object Function]"===E.call(o),_=p(o),y=n&&"[object String]"===E.call(o),w=[];if(!n&&!f&&!_)throw new TypeError("Object.keys called on a non-object");var P=t&&f;if(y&&o.length>0&&!S.call(o,0))for(var C=0;C0)for(var U=0;U"u"||!r)return m(a);try{return m(a)}catch{return!1}}(o),R=0;R{"use strict";var i=Array.prototype.slice,S=s(62666),E=Object.keys,p=E?function(t){return E(t)}:s(26068),l=Object.keys;p.shim=function(){if(Object.keys){var t=function(){var u=Object.keys(arguments);return u&&u.length===arguments.length}(1,2);t||(Object.keys=function(m){return S(m)?l(i.call(m)):l(m)})}else Object.keys=p;return Object.keys||p},M.exports=p},62666:M=>{"use strict";var g=Object.prototype.toString;M.exports=function(i){var S=g.call(i),E="[object Arguments]"===S;return E||(E="[object Array]"!==S&&null!==i&&"object"==typeof i&&"number"==typeof i.length&&i.length>=0&&"[object Function]"===g.call(i.callee)),E}},65067:(M,g)=>{g.endianness=function(){return"LE"},g.hostname=function(){return typeof location<"u"?location.hostname:""},g.loadavg=function(){return[]},g.uptime=function(){return 0},g.freemem=function(){return Number.MAX_VALUE},g.totalmem=function(){return Number.MAX_VALUE},g.cpus=function(){return[]},g.type=function(){return"Browser"},g.release=function(){return typeof navigator<"u"?navigator.appVersion:""},g.networkInterfaces=g.getNetworkInterfaces=function(){return{}},g.arch=function(){return"javascript"},g.platform=function(){return"browser"},g.tmpdir=g.tmpDir=function(){return"/tmp"},g.EOL="\n",g.homedir=function(){return"/"}},87504:function(M,g,s){var i;M=s.nmd(M),function(S){"object"==typeof global&&global;var e,t=2147483647,u=36,f=/^xn--/,_=/[^\x20-\x7E]/,y=/[\x2E\u3002\uFF0E\uFF61]/g,w={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},C=Math.floor,U=String.fromCharCode;function H(F){throw RangeError(w[F])}function R(F,K){for(var x=F.length,j=[];x--;)j[x]=K(F[x]);return j}function Y(F,K){var x=F.split("@"),j="";return x.length>1&&(j=x[0]+"@",F=x[1]),j+R((F=F.replace(y,".")).split("."),K).join(".")}function G(F){for(var L,D,K=[],x=0,j=F.length;x=55296&&L<=56319&&x65535&&(x+=U((K-=65536)>>>10&1023|55296),K=56320|1023&K),x+U(K)}).join("")}function te(F){return F-48<10?F-22:F-65<26?F-65:F-97<26?F-97:u}function W(F,K){return F+22+75*(F<26)-((0!=K)<<5)}function ie(F,K,x){var j=0;for(F=x?C(F/700):F>>1,F+=C(F/K);F>455;j+=u)F=C(F/35);return C(j+36*F/(F+38))}function J(F){var j,q,A,v,T,I,k,c,d,B,K=[],x=F.length,L=0,D=128,V=72;for((q=F.lastIndexOf("-"))<0&&(q=0),A=0;A=128&&H("not-basic"),K.push(F.charCodeAt(A));for(v=q>0?q+1:0;v=x&&H("invalid-input"),((c=te(F.charCodeAt(v++)))>=u||c>C((t-L)/I))&&H("overflow"),L+=c*I,!(c<(d=k<=V?1:k>=V+26?26:k-V));k+=u)I>C(t/(B=u-d))&&H("overflow"),I*=B;V=ie(L-T,j=K.length+1,0==T),C(L/j)>t-D&&H("overflow"),D+=C(L/j),L%=j,K.splice(L++,0,D)}return re(K)}function ee(F){var K,x,j,L,D,V,q,A,v,T,I,c,d,B,z,k=[];for(c=(F=G(F)).length,K=128,x=0,D=72,V=0;V=K&&IC((t-x)/(d=j+1))&&H("overflow"),x+=(q-K)*d,K=q,V=0;Vt&&H("overflow"),I==K){for(A=x,v=u;!(A<(T=v<=D?1:v>=D+26?26:v-D));v+=u)k.push(U(W(T+(z=A-T)%(B=u-T),0))),A=C(z/B);k.push(U(W(A,0))),D=ie(x,d,j==L),x=0,++j}++x,++K}return k.join("")}e={version:"1.3.2",ucs2:{decode:G,encode:re},decode:J,encode:ee,toASCII:function X(F){return Y(F,function(K){return _.test(K)?"xn--"+ee(K):K})},toUnicode:function Q(F){return Y(F,function(K){return f.test(K)?J(K.slice(4).toLowerCase()):K})}},void 0!==(i=function(){return e}.call(g,s,g,M))&&(M.exports=i)}()},98216:M=>{"use strict";function g(s,i){return Object.prototype.hasOwnProperty.call(s,i)}M.exports=function(s,i,S,E){S=S||"=";var p={};if("string"!=typeof s||0===s.length)return p;var l=/\+/g;s=s.split(i=i||"&");var e=1e3;E&&"number"==typeof E.maxKeys&&(e=E.maxKeys);var t=s.length;e>0&&t>e&&(t=e);for(var u=0;u=0?(r=m.substr(0,h),b=m.substr(h+1)):(r=m,b=""),a=decodeURIComponent(r),o=decodeURIComponent(b),g(p,a)?Array.isArray(p[a])?p[a].push(o):p[a]=[p[a],o]:p[a]=o}return p}},36173:M=>{"use strict";var g=function(s){switch(typeof s){case"string":return s;case"boolean":return s?"true":"false";case"number":return isFinite(s)?s:"";default:return""}};M.exports=function(s,i,S,E){return i=i||"&",S=S||"=",null===s&&(s=void 0),"object"==typeof s?Object.keys(s).map(function(p){var l=encodeURIComponent(g(p))+S;return Array.isArray(s[p])?s[p].map(function(e){return l+encodeURIComponent(g(e))}).join(i):l+encodeURIComponent(g(s[p]))}).join(i):E?encodeURIComponent(g(E))+S+encodeURIComponent(g(s)):""}},36284:(M,g,s)=>{"use strict";g.decode=g.parse=s(98216),g.encode=g.stringify=s(36173)},12703:(M,g,s)=>{var i=s(17767),S=s(99090),E=s(70166),p=s(2399),l=s(38505),e=g;e.request=function(t,u){t="string"==typeof t?l.parse(t):E(t);var m=-1===global.location.protocol.search(/^https?:$/)?"http:":"",h=t.protocol||m,r=t.hostname||t.host,b=t.port,a=t.path||"/";r&&-1!==r.indexOf(":")&&(r="["+r+"]"),t.url=(r?h+"//"+r:"")+(b?":"+b:"")+a,t.method=(t.method||"GET").toUpperCase(),t.headers=t.headers||{};var o=new i(t);return u&&o.on("response",u),o},e.get=function(u,m){var h=e.request(u,m);return h.end(),h},e.ClientRequest=i,e.IncomingMessage=S.IncomingMessage,e.Agent=function(){},e.Agent.defaultMaxSockets=4,e.globalAgent=new e.Agent,e.STATUS_CODES=p,e.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},72201:(M,g)=>{var s;function i(){if(void 0!==s)return s;if(global.XMLHttpRequest){s=new global.XMLHttpRequest;try{s.open("GET",global.XDomainRequest?"/":"https://example.com")}catch{s=null}}else s=null;return s}function S(p){var l=i();if(!l)return!1;try{return l.responseType=p,l.responseType===p}catch{}return!1}function E(p){return"function"==typeof p}g.fetch=E(global.fetch)&&E(global.ReadableStream),g.writableStream=E(global.WritableStream),g.abortController=E(global.AbortController),g.arraybuffer=g.fetch||S("arraybuffer"),g.msstream=!g.fetch&&S("ms-stream"),g.mozchunkedarraybuffer=!g.fetch&&S("moz-chunked-arraybuffer"),g.overrideMimeType=g.fetch||!!i()&&E(i().overrideMimeType),s=null},17767:(M,g,s)=>{var i=s(72201),S=s(59879),E=s(99090),p=s(2397),l=E.IncomingMessage,e=E.readyStates,u=M.exports=function(r){var b=this;p.Writable.call(b),b._opts=r,b._body=[],b._headers={},r.auth&&b.setHeader("Authorization","Basic "+Buffer.from(r.auth).toString("base64")),Object.keys(r.headers).forEach(function(n){b.setHeader(n,r.headers[n])});var a,o=!0;if("disable-fetch"===r.mode||"requestTimeout"in r&&!i.abortController)o=!1,a=!0;else if("prefer-streaming"===r.mode)a=!1;else if("allow-wrong-content-type"===r.mode)a=!i.overrideMimeType;else{if(r.mode&&"default"!==r.mode&&"prefer-fast"!==r.mode)throw new Error("Invalid value for opts.mode");a=!0}b._mode=function t(r,b){return i.fetch&&b?"fetch":i.mozchunkedarraybuffer?"moz-chunked-arraybuffer":i.msstream?"ms-stream":i.arraybuffer&&r?"arraybuffer":"text"}(a,o),b._fetchTimer=null,b._socketTimeout=null,b._socketTimer=null,b.on("finish",function(){b._onFinish()})};S(u,p.Writable),u.prototype.setHeader=function(r,b){var o=r.toLowerCase();-1===h.indexOf(o)&&(this._headers[o]={name:r,value:b})},u.prototype.getHeader=function(r){var b=this._headers[r.toLowerCase()];return b?b.value:null},u.prototype.removeHeader=function(r){delete this._headers[r.toLowerCase()]},u.prototype._onFinish=function(){var r=this;if(!r._destroyed){var b=r._opts;"timeout"in b&&0!==b.timeout&&r.setTimeout(b.timeout);var a=r._headers,o=null;"GET"!==b.method&&"HEAD"!==b.method&&(o=new Blob(r._body,{type:(a["content-type"]||{}).value||""}));var n=[];if(Object.keys(a).forEach(function(w){var P=a[w].name,C=a[w].value;Array.isArray(C)?C.forEach(function(U){n.push([P,U])}):n.push([P,C])}),"fetch"===r._mode){var f=null;if(i.abortController){var _=new AbortController;f=_.signal,r._fetchAbortController=_,"requestTimeout"in b&&0!==b.requestTimeout&&(r._fetchTimer=global.setTimeout(function(){r.emit("requestTimeout"),r._fetchAbortController&&r._fetchAbortController.abort()},b.requestTimeout))}global.fetch(r._opts.url,{method:r._opts.method,headers:n,body:o||void 0,mode:"cors",credentials:b.withCredentials?"include":"same-origin",signal:f}).then(function(w){r._fetchResponse=w,r._resetTimers(!1),r._connect()},function(w){r._resetTimers(!0),r._destroyed||r.emit("error",w)})}else{var y=r._xhr=new global.XMLHttpRequest;try{y.open(r._opts.method,r._opts.url,!0)}catch(w){return void process.nextTick(function(){r.emit("error",w)})}"responseType"in y&&(y.responseType=r._mode),"withCredentials"in y&&(y.withCredentials=!!b.withCredentials),"text"===r._mode&&"overrideMimeType"in y&&y.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in b&&(y.timeout=b.requestTimeout,y.ontimeout=function(){r.emit("requestTimeout")}),n.forEach(function(w){y.setRequestHeader(w[0],w[1])}),r._response=null,y.onreadystatechange=function(){switch(y.readyState){case e.LOADING:case e.DONE:r._onXHRProgress()}},"moz-chunked-arraybuffer"===r._mode&&(y.onprogress=function(){r._onXHRProgress()}),y.onerror=function(){r._destroyed||(r._resetTimers(!0),r.emit("error",new Error("XHR error")))};try{y.send(o)}catch(w){return void process.nextTick(function(){r.emit("error",w)})}}}},u.prototype._onXHRProgress=function(){var r=this;r._resetTimers(!1),function m(r){try{var b=r.status;return null!==b&&0!==b}catch{return!1}}(r._xhr)&&!r._destroyed&&(r._response||r._connect(),r._response._onXHRProgress(r._resetTimers.bind(r)))},u.prototype._connect=function(){var r=this;r._destroyed||(r._response=new l(r._xhr,r._fetchResponse,r._mode,r._resetTimers.bind(r)),r._response.on("error",function(b){r.emit("error",b)}),r.emit("response",r._response))},u.prototype._write=function(r,b,a){this._body.push(r),a()},u.prototype._resetTimers=function(r){var b=this;global.clearTimeout(b._socketTimer),b._socketTimer=null,r?(global.clearTimeout(b._fetchTimer),b._fetchTimer=null):b._socketTimeout&&(b._socketTimer=global.setTimeout(function(){b.emit("timeout")},b._socketTimeout))},u.prototype.abort=u.prototype.destroy=function(r){var b=this;b._destroyed=!0,b._resetTimers(!0),b._response&&(b._response._destroyed=!0),b._xhr?b._xhr.abort():b._fetchAbortController&&b._fetchAbortController.abort(),r&&b.emit("error",r)},u.prototype.end=function(r,b,a){"function"==typeof r&&(a=r,r=void 0),p.Writable.prototype.end.call(this,r,b,a)},u.prototype.setTimeout=function(r,b){var a=this;b&&a.once("timeout",b),a._socketTimeout=r,a._resetTimers(!1)},u.prototype.flushHeaders=function(){},u.prototype.setNoDelay=function(){},u.prototype.setSocketKeepAlive=function(){};var h=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]},99090:(M,g,s)=>{var i=s(72201),S=s(59879),E=s(2397),p=g.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},l=g.IncomingMessage=function(e,t,u,m){var h=this;if(E.Readable.call(h),h._mode=u,h.headers={},h.rawHeaders=[],h.trailers={},h.rawTrailers=[],h.on("end",function(){process.nextTick(function(){h.emit("close")})}),"fetch"===u){let _=function(){b.read().then(function(y){if(!h._destroyed){if(m(y.done),y.done)return void h.push(null);h.push(Buffer.from(y.value)),_()}}).catch(function(y){m(!0),h._destroyed||h.emit("error",y)})};if(h._fetchResponse=t,h.url=t.url,h.statusCode=t.status,h.statusMessage=t.statusText,t.headers.forEach(function(y,w){h.headers[w.toLowerCase()]=y,h.rawHeaders.push(w,y)}),i.writableStream){var r=new WritableStream({write:function(y){return m(!1),new Promise(function(w,P){h._destroyed?P():h.push(Buffer.from(y))?w():h._resumeFetch=w})},close:function(){m(!0),h._destroyed||h.push(null)},abort:function(y){m(!0),h._destroyed||h.emit("error",y)}});try{return void t.body.pipeTo(r).catch(function(y){m(!0),h._destroyed||h.emit("error",y)})}catch{}}var b=t.body.getReader();_()}else if(h._xhr=e,h._pos=0,h.url=e.responseURL,h.statusCode=e.status,h.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach(function(_){var y=_.match(/^([^:]+):\s*(.*)/);if(y){var w=y[1].toLowerCase();"set-cookie"===w?(void 0===h.headers[w]&&(h.headers[w]=[]),h.headers[w].push(y[2])):void 0!==h.headers[w]?h.headers[w]+=", "+y[2]:h.headers[w]=y[2],h.rawHeaders.push(y[1],y[2])}}),h._charset="x-user-defined",!i.overrideMimeType){var o=h.rawHeaders["mime-type"];if(o){var n=o.match(/;\s*charset=([^;])(;|$)/);n&&(h._charset=n[1].toLowerCase())}h._charset||(h._charset="utf-8")}};S(l,E.Readable),l.prototype._read=function(){var t=this._resumeFetch;t&&(this._resumeFetch=null,t())},l.prototype._onXHRProgress=function(e){var t=this,u=t._xhr,m=null;switch(t._mode){case"text":if((m=u.responseText).length>t._pos){var h=m.substr(t._pos);if("x-user-defined"===t._charset){for(var r=Buffer.alloc(h.length),b=0;bt._pos&&(t.push(Buffer.from(new Uint8Array(a.result.slice(t._pos)))),t._pos=a.result.byteLength)},a.onload=function(){e(!0),t.push(null)},a.readAsArrayBuffer(m)}t._xhr.readyState===p.DONE&&"ms-stream"!==t._mode&&(e(!0),t.push(null))}},49862:M=>{"use strict";var s={};function i(e,t,u){u||(u=Error);var h=function(r){function b(a,o,n){return r.call(this,function m(r,b,a){return"string"==typeof t?t:t(r,b,a)}(a,o,n))||this}return function g(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(b,r),b}(u);h.prototype.name=u.name,h.prototype.code=e,s[e]=h}function S(e,t){if(Array.isArray(e)){var u=e.length;return e=e.map(function(m){return String(m)}),u>2?"one of ".concat(t," ").concat(e.slice(0,u-1).join(", "),", or ")+e[u-1]:2===u?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),i("ERR_INVALID_ARG_TYPE",function(e,t,u){var m,h;if("string"==typeof t&&function E(e,t,u){return e.substr(!u||u<0?0:+u,t.length)===t}(t,"not ")?(m="must not be",t=t.replace(/^not /,"")):m="must be",function p(e,t,u){return(void 0===u||u>e.length)&&(u=e.length),e.substring(u-t.length,u)===t}(e," argument"))h="The ".concat(e," ").concat(m," ").concat(S(t,"type"));else{var r=function l(e,t,u){return"number"!=typeof u&&(u=0),!(u+t.length>e.length)&&-1!==e.indexOf(t,u)}(e,".")?"property":"argument";h='The "'.concat(e,'" ').concat(r," ").concat(m," ").concat(S(t,"type"))}return h+". Received type ".concat(typeof u)},TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),M.exports.q=s},48425:(M,g,s)=>{"use strict";var i=Object.keys||function(h){var r=[];for(var b in h)r.push(b);return r};M.exports=t;var S=s(95974),E=s(61628);s(59879)(t,S);for(var p=i(E.prototype),l=0;l{"use strict";M.exports=S;var i=s(13818);function S(E){if(!(this instanceof S))return new S(E);i.call(this,E)}s(59879)(S,i),S.prototype._transform=function(E,p,l){l(null,E)}},95974:(M,g,s)=>{"use strict";var i;M.exports=G,G.ReadableState=Y,s(93105);var h,E=function(d,B){return d.listeners(B).length},p=s(46848),l=s(3875).Buffer,e=global.Uint8Array||function(){},m=s(23646);h=m&&m.debuglog?m.debuglog("stream"):function(){};var P,C,U,r=s(47196),b=s(93017),o=s(67749).getHighWaterMark,n=s(49862).q,f=n.ERR_INVALID_ARG_TYPE,_=n.ERR_STREAM_PUSH_AFTER_EOF,y=n.ERR_METHOD_NOT_IMPLEMENTED,w=n.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;s(59879)(G,p);var O=b.errorOrDestroy,H=["error","close","destroy","pause","resume"];function Y(c,d,B){i=i||s(48425),"boolean"!=typeof B&&(B=d instanceof i),this.objectMode=!!(c=c||{}).objectMode,B&&(this.objectMode=this.objectMode||!!c.readableObjectMode),this.highWaterMark=o(this,c,"readableHighWaterMark",B),this.buffer=new r,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==c.emitClose,this.autoDestroy=!!c.autoDestroy,this.destroyed=!1,this.defaultEncoding=c.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,c.encoding&&(P||(P=s(32519).s),this.decoder=new P(c.encoding),this.encoding=c.encoding)}function G(c){if(i=i||s(48425),!(this instanceof G))return new G(c);this._readableState=new Y(c,this,this instanceof i),this.readable=!0,c&&("function"==typeof c.read&&(this._read=c.read),"function"==typeof c.destroy&&(this._destroy=c.destroy)),p.call(this)}function re(c,d,B,z,oe){h("readableAddChunk",d);var N,ne=c._readableState;if(null===d)ne.reading=!1,function Q(c,d){if(h("onEofChunk"),!d.ended){if(d.decoder){var B=d.decoder.end();B&&B.length&&(d.buffer.push(B),d.length+=d.objectMode?1:B.length)}d.ended=!0,d.sync?X(c):(d.needReadable=!1,d.emittedReadable||(d.emittedReadable=!0,F(c)))}}(c,ne);else if(oe||(N=function W(c,d){var B;return!function u(c){return l.isBuffer(c)||c instanceof e}(d)&&"string"!=typeof d&&void 0!==d&&!c.objectMode&&(B=new f("chunk",["string","Buffer","Uint8Array"],d)),B}(ne,d)),N)O(c,N);else if(ne.objectMode||d&&d.length>0)if("string"!=typeof d&&!ne.objectMode&&Object.getPrototypeOf(d)!==l.prototype&&(d=function t(c){return l.from(c)}(d)),z)ne.endEmitted?O(c,new w):te(c,ne,d,!0);else if(ne.ended)O(c,new _);else{if(ne.destroyed)return!1;ne.reading=!1,ne.decoder&&!B?(d=ne.decoder.write(d),ne.objectMode||0!==d.length?te(c,ne,d,!1):K(c,ne)):te(c,ne,d,!1)}else z||(ne.reading=!1,K(c,ne));return!ne.ended&&(ne.lengthd.highWaterMark&&(d.highWaterMark=function J(c){return c>=ie?c=ie:(c--,c|=c>>>1,c|=c>>>2,c|=c>>>4,c|=c>>>8,c|=c>>>16,c++),c}(c)),c<=d.length?c:d.ended?d.length:(d.needReadable=!0,0))}function X(c){var d=c._readableState;h("emitReadable",d.needReadable,d.emittedReadable),d.needReadable=!1,d.emittedReadable||(h("emitReadable",d.flowing),d.emittedReadable=!0,process.nextTick(F,c))}function F(c){var d=c._readableState;h("emitReadable_",d.destroyed,d.length,d.ended),!d.destroyed&&(d.length||d.ended)&&(c.emit("readable"),d.emittedReadable=!1),d.needReadable=!d.flowing&&!d.ended&&d.length<=d.highWaterMark,A(c)}function K(c,d){d.readingMore||(d.readingMore=!0,process.nextTick(x,c,d))}function x(c,d){for(;!d.reading&&!d.ended&&(d.length0,d.resumeScheduled&&!d.paused?d.flowing=!0:c.listenerCount("data")>0&&c.resume()}function D(c){h("readable nexttick read 0"),c.read(0)}function q(c,d){h("resume",d.reading),d.reading||c.read(0),d.resumeScheduled=!1,c.emit("resume"),A(c),d.flowing&&!d.reading&&c.read(0)}function A(c){var d=c._readableState;for(h("flow",d.flowing);d.flowing&&null!==c.read(););}function v(c,d){return 0===d.length?null:(d.objectMode?B=d.buffer.shift():!c||c>=d.length?(B=d.decoder?d.buffer.join(""):1===d.buffer.length?d.buffer.first():d.buffer.concat(d.length),d.buffer.clear()):B=d.buffer.consume(c,d.decoder),B);var B}function T(c){var d=c._readableState;h("endReadable",d.endEmitted),d.endEmitted||(d.ended=!0,process.nextTick(I,d,c))}function I(c,d){if(h("endReadableNT",c.endEmitted,c.length),!c.endEmitted&&0===c.length&&(c.endEmitted=!0,d.readable=!1,d.emit("end"),c.autoDestroy)){var B=d._writableState;(!B||B.autoDestroy&&B.finished)&&d.destroy()}}function k(c,d){for(var B=0,z=c.length;B=d.highWaterMark:d.length>0)||d.ended))return h("read: emitReadable",d.length,d.ended),0===d.length&&d.ended?T(this):X(this),null;if(0===(c=ee(c,d))&&d.ended)return 0===d.length&&T(this),null;var oe,z=d.needReadable;return h("need readable",z),(0===d.length||d.length-c0?v(c,d):null)?(d.needReadable=d.length<=d.highWaterMark,c=0):(d.length-=c,d.awaitDrain=0),0===d.length&&(d.ended||(d.needReadable=!0),B!==c&&d.ended&&T(this)),null!==oe&&this.emit("data",oe),oe},G.prototype._read=function(c){O(this,new y("_read()"))},G.prototype.pipe=function(c,d){var B=this,z=this._readableState;switch(z.pipesCount){case 0:z.pipes=c;break;case 1:z.pipes=[z.pipes,c];break;default:z.pipes.push(c)}z.pipesCount+=1,h("pipe count=%d opts=%j",z.pipesCount,d);var ne=d&&!1===d.end||c===process.stdout||c===process.stderr?se:he;function he(){h("onend"),c.end()}z.endEmitted?process.nextTick(ne):B.once("end",ne),c.on("unpipe",function N(le,ue){h("onunpipe"),le===B&&ue&&!1===ue.hasUnpiped&&(ue.hasUnpiped=!0,function be(){h("cleanup"),c.removeListener("close",ae),c.removeListener("finish",fe),c.removeListener("drain",ye),c.removeListener("error",Z),c.removeListener("unpipe",N),B.removeListener("end",he),B.removeListener("end",se),B.removeListener("data",$),pe=!0,z.awaitDrain&&(!c._writableState||c._writableState.needDrain)&&ye()}())});var ye=function j(c){return function(){var B=c._readableState;h("pipeOnDrain",B.awaitDrain),B.awaitDrain&&B.awaitDrain--,0===B.awaitDrain&&E(c,"data")&&(B.flowing=!0,A(c))}}(B);c.on("drain",ye);var pe=!1;function $(le){h("ondata");var ue=c.write(le);h("dest.write",ue),!1===ue&&((1===z.pipesCount&&z.pipes===c||z.pipesCount>1&&-1!==k(z.pipes,c))&&!pe&&(h("false write response, pause",z.awaitDrain),z.awaitDrain++),B.pause())}function Z(le){h("onerror",le),se(),c.removeListener("error",Z),0===E(c,"error")&&O(c,le)}function ae(){c.removeListener("finish",fe),se()}function fe(){h("onfinish"),c.removeListener("close",ae),se()}function se(){h("unpipe"),B.unpipe(c)}return B.on("data",$),function R(c,d,B){if("function"==typeof c.prependListener)return c.prependListener(d,B);c._events&&c._events[d]?Array.isArray(c._events[d])?c._events[d].unshift(B):c._events[d]=[B,c._events[d]]:c.on(d,B)}(c,"error",Z),c.once("close",ae),c.once("finish",fe),c.emit("pipe",B),z.flowing||(h("pipe resume"),B.resume()),c},G.prototype.unpipe=function(c){var d=this._readableState,B={hasUnpiped:!1};if(0===d.pipesCount)return this;if(1===d.pipesCount)return c&&c!==d.pipes||(c||(c=d.pipes),d.pipes=null,d.pipesCount=0,d.flowing=!1,c&&c.emit("unpipe",this,B)),this;if(!c){var z=d.pipes,oe=d.pipesCount;d.pipes=null,d.pipesCount=0,d.flowing=!1;for(var ne=0;ne0,!1!==z.flowing&&this.resume()):"readable"===c&&!z.endEmitted&&!z.readableListening&&(z.readableListening=z.needReadable=!0,z.flowing=!1,z.emittedReadable=!1,h("on readable",z.length,z.reading),z.length?X(this):z.reading||process.nextTick(D,this)),B},G.prototype.removeListener=function(c,d){var B=p.prototype.removeListener.call(this,c,d);return"readable"===c&&process.nextTick(L,this),B},G.prototype.removeAllListeners=function(c){var d=p.prototype.removeAllListeners.apply(this,arguments);return("readable"===c||void 0===c)&&process.nextTick(L,this),d},G.prototype.resume=function(){var c=this._readableState;return c.flowing||(h("resume"),c.flowing=!c.readableListening,function V(c,d){d.resumeScheduled||(d.resumeScheduled=!0,process.nextTick(q,c,d))}(this,c)),c.paused=!1,this},G.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},G.prototype.wrap=function(c){var d=this,B=this._readableState,z=!1;for(var oe in c.on("end",function(){if(h("wrapped end"),B.decoder&&!B.ended){var N=B.decoder.end();N&&N.length&&d.push(N)}d.push(null)}),c.on("data",function(N){h("wrapped data"),B.decoder&&(N=B.decoder.write(N)),B.objectMode&&null==N||!(B.objectMode||N&&N.length)||d.push(N)||(z=!0,c.pause())}),c)void 0===this[oe]&&"function"==typeof c[oe]&&(this[oe]=function(he){return function(){return c[he].apply(c,arguments)}}(oe));for(var ne=0;ne{"use strict";M.exports=u;var i=s(49862).q,S=i.ERR_METHOD_NOT_IMPLEMENTED,E=i.ERR_MULTIPLE_CALLBACK,p=i.ERR_TRANSFORM_ALREADY_TRANSFORMING,l=i.ERR_TRANSFORM_WITH_LENGTH_0,e=s(48425);function t(r,b){var a=this._transformState;a.transforming=!1;var o=a.writecb;if(null===o)return this.emit("error",new E);a.writechunk=null,a.writecb=null,null!=b&&this.push(b),o(r);var n=this._readableState;n.reading=!1,(n.needReadable||n.length{"use strict";function S(A){var v=this;this.next=null,this.entry=null,this.finish=function(){!function q(A,v,T){var I=A.entry;for(A.entry=null;I;){var k=I.callback;v.pendingcb--,k(T),I=I.next}v.corkedRequestsFree.next=A}(v,A)}}var E;M.exports=Y,Y.WritableState=H;var R,p={deprecate:s(15822)},l=s(46848),e=s(3875).Buffer,t=global.Uint8Array||function(){},h=s(93017),b=s(67749).getHighWaterMark,a=s(49862).q,o=a.ERR_INVALID_ARG_TYPE,n=a.ERR_METHOD_NOT_IMPLEMENTED,f=a.ERR_MULTIPLE_CALLBACK,_=a.ERR_STREAM_CANNOT_PIPE,y=a.ERR_STREAM_DESTROYED,w=a.ERR_STREAM_NULL_VALUES,P=a.ERR_STREAM_WRITE_AFTER_END,C=a.ERR_UNKNOWN_ENCODING,U=h.errorOrDestroy;function O(){}function H(A,v,T){E=E||s(48425),"boolean"!=typeof T&&(T=v instanceof E),this.objectMode=!!(A=A||{}).objectMode,T&&(this.objectMode=this.objectMode||!!A.writableObjectMode),this.highWaterMark=b(this,A,"writableHighWaterMark",T),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1,this.decodeStrings=!(!1===A.decodeStrings),this.defaultEncoding=A.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(k){!function Q(A,v){var T=A._writableState,I=T.sync,k=T.writecb;if("function"!=typeof k)throw new f;if(function ee(A){A.writing=!1,A.writecb=null,A.length-=A.writelen,A.writelen=0}(T),v)!function J(A,v,T,I,k){--v.pendingcb,T?(process.nextTick(k,I),process.nextTick(D,A,v),A._writableState.errorEmitted=!0,U(A,I)):(k(I),A._writableState.errorEmitted=!0,U(A,I),D(A,v))}(A,T,I,v,k);else{var c=x(T)||A.destroyed;!c&&!T.corked&&!T.bufferProcessing&&T.bufferedRequest&&K(A,T),I?process.nextTick(X,A,T,c,k):X(A,T,c,k)}}(v,k)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==A.emitClose,this.autoDestroy=!!A.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new S(this)}function Y(A){var v=this instanceof(E=E||s(48425));if(!v&&!R.call(Y,this))return new Y(A);this._writableState=new H(A,this,v),this.writable=!0,A&&("function"==typeof A.write&&(this._write=A.write),"function"==typeof A.writev&&(this._writev=A.writev),"function"==typeof A.destroy&&(this._destroy=A.destroy),"function"==typeof A.final&&(this._final=A.final)),l.call(this)}function ie(A,v,T,I,k,c,d){v.writelen=I,v.writecb=d,v.writing=!0,v.sync=!0,v.destroyed?v.onwrite(new y("write")):T?A._writev(k,v.onwrite):A._write(k,c,v.onwrite),v.sync=!1}function X(A,v,T,I){T||function F(A,v){0===v.length&&v.needDrain&&(v.needDrain=!1,A.emit("drain"))}(A,v),v.pendingcb--,I(),D(A,v)}function K(A,v){v.bufferProcessing=!0;var T=v.bufferedRequest;if(A._writev&&T&&T.next){var k=new Array(v.bufferedRequestCount),c=v.corkedRequestsFree;c.entry=T;for(var d=0,B=!0;T;)k[d]=T,T.isBuf||(B=!1),T=T.next,d+=1;k.allBuffers=B,ie(A,v,!0,v.length,k,"",c.finish),v.pendingcb++,v.lastBufferedRequest=null,c.next?(v.corkedRequestsFree=c.next,c.next=null):v.corkedRequestsFree=new S(v),v.bufferedRequestCount=0}else{for(;T;){var z=T.chunk;if(ie(A,v,!1,v.objectMode?1:z.length,z,T.encoding,T.callback),T=T.next,v.bufferedRequestCount--,v.writing)break}null===T&&(v.lastBufferedRequest=null)}v.bufferedRequest=T,v.bufferProcessing=!1}function x(A){return A.ending&&0===A.length&&null===A.bufferedRequest&&!A.finished&&!A.writing}function j(A,v){A._final(function(T){v.pendingcb--,T&&U(A,T),v.prefinished=!0,A.emit("prefinish"),D(A,v)})}function D(A,v){var T=x(v);if(T&&(function L(A,v){!v.prefinished&&!v.finalCalled&&("function"!=typeof A._final||v.destroyed?(v.prefinished=!0,A.emit("prefinish")):(v.pendingcb++,v.finalCalled=!0,process.nextTick(j,A,v)))}(A,v),0===v.pendingcb&&(v.finished=!0,A.emit("finish"),v.autoDestroy))){var I=A._readableState;(!I||I.autoDestroy&&I.endEmitted)&&A.destroy()}return T}s(59879)(Y,l),H.prototype.getBuffer=function(){for(var v=this.bufferedRequest,T=[];v;)T.push(v),v=v.next;return T},function(){try{Object.defineProperty(H.prototype,"buffer",{get:p.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(R=Function.prototype[Symbol.hasInstance],Object.defineProperty(Y,Symbol.hasInstance,{value:function(v){return!!R.call(this,v)||this===Y&&v&&v._writableState instanceof H}})):R=function(v){return v instanceof this},Y.prototype.pipe=function(){U(this,new _)},Y.prototype.write=function(A,v,T){var I=this._writableState,k=!1,c=!I.objectMode&&function m(A){return e.isBuffer(A)||A instanceof t}(A);return c&&!e.isBuffer(A)&&(A=function u(A){return e.from(A)}(A)),"function"==typeof v&&(T=v,v=null),c?v="buffer":v||(v=I.defaultEncoding),"function"!=typeof T&&(T=O),I.ending?function G(A,v){var T=new P;U(A,T),process.nextTick(v,T)}(this,T):(c||function re(A,v,T,I){var k;return null===T?k=new w:"string"!=typeof T&&!v.objectMode&&(k=new o("chunk",["string","Buffer"],T)),!k||(U(A,k),process.nextTick(I,k),!1)}(this,I,A,T))&&(I.pendingcb++,k=function W(A,v,T,I,k,c){if(!T){var d=function te(A,v,T){return!A.objectMode&&!1!==A.decodeStrings&&"string"==typeof v&&(v=e.from(v,T)),v}(v,I,k);I!==d&&(T=!0,k="buffer",I=d)}var B=v.objectMode?1:I.length;v.length+=B;var z=v.length-1))throw new C(v);return this._writableState.defaultEncoding=v,this},Object.defineProperty(Y.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Y.prototype._write=function(A,v,T){T(new n("_write()"))},Y.prototype._writev=null,Y.prototype.end=function(A,v,T){var I=this._writableState;return"function"==typeof A?(T=A,A=null,v=null):"function"==typeof v&&(T=v,v=null),null!=A&&this.write(A,v),I.corked&&(I.corked=1,this.uncork()),I.ending||function V(A,v,T){v.ending=!0,D(A,v),T&&(v.finished?process.nextTick(T):A.once("finish",T)),v.ended=!0,A.writable=!1}(this,I,T),this},Object.defineProperty(Y.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(Y.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(v){!this._writableState||(this._writableState.destroyed=v)}}),Y.prototype.destroy=h.destroy,Y.prototype._undestroy=h.undestroy,Y.prototype._destroy=function(A,v){v(A)}},11418:(M,g,s)=>{"use strict";var i;function S(y,w,P){return w in y?Object.defineProperty(y,w,{value:P,enumerable:!0,configurable:!0,writable:!0}):y[w]=P,y}var E=s(13992),p=Symbol("lastResolve"),l=Symbol("lastReject"),e=Symbol("error"),t=Symbol("ended"),u=Symbol("lastPromise"),m=Symbol("handlePromise"),h=Symbol("stream");function r(y,w){return{value:y,done:w}}function b(y){var w=y[p];if(null!==w){var P=y[h].read();null!==P&&(y[u]=null,y[p]=null,y[l]=null,w(r(P,!1)))}}function a(y){process.nextTick(b,y)}var n=Object.getPrototypeOf(function(){}),f=Object.setPrototypeOf((S(i={get stream(){return this[h]},next:function(){var w=this,P=this[e];if(null!==P)return Promise.reject(P);if(this[t])return Promise.resolve(r(void 0,!0));if(this[h].destroyed)return new Promise(function(H,R){process.nextTick(function(){w[e]?R(w[e]):H(r(void 0,!0))})});var U,C=this[u];if(C)U=new Promise(function o(y,w){return function(P,C){y.then(function(){w[t]?P(r(void 0,!0)):w[m](P,C)},C)}}(C,this));else{var O=this[h].read();if(null!==O)return Promise.resolve(r(O,!1));U=new Promise(this[m])}return this[u]=U,U}},Symbol.asyncIterator,function(){return this}),S(i,"return",function(){var w=this;return new Promise(function(P,C){w[h].destroy(null,function(U){U?C(U):P(r(void 0,!0))})})}),i),n);M.exports=function(w){var P,C=Object.create(f,(S(P={},h,{value:w,writable:!0}),S(P,p,{value:null,writable:!0}),S(P,l,{value:null,writable:!0}),S(P,e,{value:null,writable:!0}),S(P,t,{value:w._readableState.endEmitted,writable:!0}),S(P,m,{value:function(O,H){var R=C[h].read();R?(C[u]=null,C[p]=null,C[l]=null,O(r(R,!1))):(C[p]=O,C[l]=H)},writable:!0}),P));return C[u]=null,E(w,function(U){if(U&&"ERR_STREAM_PREMATURE_CLOSE"!==U.code){var O=C[l];return null!==O&&(C[u]=null,C[p]=null,C[l]=null,O(U)),void(C[e]=U)}var H=C[p];null!==H&&(C[u]=null,C[p]=null,C[l]=null,H(r(void 0,!0))),C[t]=!0}),w.on("readable",a.bind(null,C)),C}},47196:(M,g,s)=>{"use strict";function i(a,o){var n=Object.keys(a);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(a);o&&(f=f.filter(function(_){return Object.getOwnPropertyDescriptor(a,_).enumerable})),n.push.apply(n,f)}return n}function E(a,o,n){return o in a?Object.defineProperty(a,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):a[o]=n,a}function l(a,o){for(var n=0;n0?this.tail.next=f:this.head=f,this.tail=f,++this.length}},{key:"unshift",value:function(n){var f={data:n,next:this.head};0===this.length&&(this.tail=f),this.head=f,++this.length}},{key:"shift",value:function(){if(0!==this.length){var n=this.head.data;return this.head=1===this.length?this.tail=null:this.head.next,--this.length,n}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(n){if(0===this.length)return"";for(var f=this.head,_=""+f.data;f=f.next;)_+=n+f.data;return _}},{key:"concat",value:function(n){if(0===this.length)return u.alloc(0);for(var f=u.allocUnsafe(n>>>0),_=this.head,y=0;_;)b(_.data,f,y),y+=_.data.length,_=_.next;return f}},{key:"consume",value:function(n,f){var _;return nw.length?w.length:n;if(y+=P===w.length?w:w.slice(0,n),0==(n-=P)){P===w.length?(++_,this.head=f.next?f.next:this.tail=null):(this.head=f,f.data=w.slice(P));break}++_}return this.length-=_,y}},{key:"_getBuffer",value:function(n){var f=u.allocUnsafe(n),_=this.head,y=1;for(_.data.copy(f),n-=_.data.length;_=_.next;){var w=_.data,P=n>w.length?w.length:n;if(w.copy(f,f.length-n,0,P),0==(n-=P)){P===w.length?(++y,this.head=_.next?_.next:this.tail=null):(this.head=_,_.data=w.slice(P));break}++y}return this.length-=y,f}},{key:r,value:function(n,f){return h(this,function S(a){for(var o=1;o{"use strict";function s(l,e){E(l,e),i(l)}function i(l){l._writableState&&!l._writableState.emitClose||l._readableState&&!l._readableState.emitClose||l.emit("close")}function E(l,e){l.emit("error",e)}M.exports={destroy:function g(l,e){var t=this;return this._readableState&&this._readableState.destroyed||this._writableState&&this._writableState.destroyed?(e?e(l):l&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(E,this,l)):process.nextTick(E,this,l)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(l||null,function(h){!e&&h?t._writableState?t._writableState.errorEmitted?process.nextTick(i,t):(t._writableState.errorEmitted=!0,process.nextTick(s,t,h)):process.nextTick(s,t,h):e?(process.nextTick(i,t),e(h)):process.nextTick(i,t)}),this)},undestroy:function S(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function p(l,e){var t=l._readableState,u=l._writableState;t&&t.autoDestroy||u&&u.autoDestroy?l.destroy(e):l.emit("error",e)}}},13992:(M,g,s)=>{"use strict";var i=s(49862).q.ERR_STREAM_PREMATURE_CLOSE;function E(){}M.exports=function l(e,t,u){if("function"==typeof t)return l(e,null,t);t||(t={}),u=function S(e){var t=!1;return function(){if(!t){t=!0;for(var u=arguments.length,m=new Array(u),h=0;h{M.exports=function(){throw new Error("Readable.from is not available in the browser")}},47293:(M,g,s)=>{"use strict";var i,E=s(49862).q,p=E.ERR_MISSING_ARGS,l=E.ERR_STREAM_DESTROYED;function e(a){if(a)throw a}function u(a,o,n,f){f=function S(a){var o=!1;return function(){o||(o=!0,a.apply(void 0,arguments))}}(f);var _=!1;a.on("close",function(){_=!0}),void 0===i&&(i=s(13992)),i(a,{readable:o,writable:n},function(w){if(w)return f(w);_=!0,f()});var y=!1;return function(w){if(!_&&!y){if(y=!0,function t(a){return a.setHeader&&"function"==typeof a.abort}(a))return a.abort();if("function"==typeof a.destroy)return a.destroy();f(w||new l("pipe"))}}}function m(a){a()}function h(a,o){return a.pipe(o)}function r(a){return a.length&&"function"==typeof a[a.length-1]?a.pop():e}M.exports=function b(){for(var a=arguments.length,o=new Array(a),n=0;n0,function(O){_||(_=O),O&&y.forEach(m),!C&&(y.forEach(m),f(_))})});return o.reduce(h)}},67749:(M,g,s)=>{"use strict";var i=s(49862).q.ERR_INVALID_OPT_VALUE;M.exports={getHighWaterMark:function E(p,l,e,t){var u=function S(p,l,e){return null!=p.highWaterMark?p.highWaterMark:l?p[e]:null}(l,t,e);if(null!=u){if(!isFinite(u)||Math.floor(u)!==u||u<0)throw new i(t?e:"highWaterMark",u);return Math.floor(u)}return p.objectMode?16:16384}}},46848:(M,g,s)=>{M.exports=s(93105).EventEmitter},2397:(M,g,s)=>{(g=M.exports=s(95974)).Stream=g,g.Readable=g,g.Writable=s(61628),g.Duplex=s(48425),g.Transform=s(13818),g.PassThrough=s(48357),g.finished=s(13992),g.pipeline=s(47293)},38505:(M,g,s)=>{"use strict";var i=s(87504),S=s(43745);function E(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}g.parse=w,g.resolve=function C(O,H){return w(O,!1,!0).resolve(H)},g.resolveObject=function U(O,H){return O?w(O,!1,!0).resolveObject(H):H},g.format=function P(O){return S.isString(O)&&(O=w(O)),O instanceof E?O.format():E.prototype.format.call(O)},g.Url=E;var p=/^([a-z0-9.+-]+:)/i,l=/:[0-9]*$/,e=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),m=["'"].concat(u),h=["%","/","?",";","#"].concat(m),r=["/","?","#"],a=/^[+a-z0-9A-Z_-]{0,63}$/,o=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,n={javascript:!0,"javascript:":!0},f={javascript:!0,"javascript:":!0},_={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=s(36284);function w(O,H,R){if(O&&S.isObject(O)&&O instanceof E)return O;var Y=new E;return Y.parse(O,H,R),Y}E.prototype.parse=function(O,H,R){if(!S.isString(O))throw new TypeError("Parameter 'url' must be a string, not "+typeof O);var Y=O.indexOf("?"),G=-1!==Y&&Y127?A+="x":A+=q[v];if(!A.match(a)){var I=D.slice(0,F),k=D.slice(F+1),c=q.match(o);c&&(I.push(c[1]),k.unshift(c[2])),k.length&&(W="/"+k.join(".")+W),this.hostname=I.join(".");break}}}this.hostname=this.hostname.length>255?"":this.hostname.toLowerCase(),L||(this.hostname=i.toASCII(this.hostname)),this.host=(this.hostname||"")+(this.port?":"+this.port:""),this.href+=this.host,L&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==W[0]&&(W="/"+W))}if(!n[ee])for(F=0,V=m.length;F0)&&R.host.split("@"))&&(R.auth=A.shift(),R.host=R.hostname=A.shift())),R.search=O.search,R.query=O.query,(!S.isNull(R.pathname)||!S.isNull(R.search))&&(R.path=(R.pathname?R.pathname:"")+(R.search?R.search:"")),R.href=R.format(),R;if(!D.length)return R.pathname=null,R.path=R.search?"/"+R.search:null,R.href=R.format(),R;for(var v=D.slice(-1)[0],T=(R.host||O.host||D.length>1)&&("."===v||".."===v)||""===v,I=0,k=D.length;k>=0;k--)"."===(v=D[k])?D.splice(k,1):".."===v?(D.splice(k,1),I++):I&&(D.splice(k,1),I--);if(!j&&!L)for(;I--;I)D.unshift("..");j&&""!==D[0]&&(!D[0]||"/"!==D[0].charAt(0))&&D.unshift(""),T&&"/"!==D.join("/").substr(-1)&&D.push("");var A,c=""===D[0]||D[0]&&"/"===D[0].charAt(0);return q&&(R.hostname=R.host=c?"":D.length?D.shift():"",(A=!!(R.host&&R.host.indexOf("@")>0)&&R.host.split("@"))&&(R.auth=A.shift(),R.host=R.hostname=A.shift())),(j=j||R.host&&D.length)&&!c&&D.unshift(""),D.length?R.pathname=D.join("/"):(R.pathname=null,R.path=null),(!S.isNull(R.pathname)||!S.isNull(R.search))&&(R.path=(R.pathname?R.pathname:"")+(R.search?R.search:"")),R.auth=O.auth||R.auth,R.slashes=R.slashes||O.slashes,R.href=R.format(),R},E.prototype.parseHost=function(){var O=this.host,H=l.exec(O);H&&(":"!==(H=H[0])&&(this.port=H.substr(1)),O=O.substr(0,O.length-H.length)),O&&(this.hostname=O)}},43745:M=>{"use strict";M.exports={isString:function(g){return"string"==typeof g},isObject:function(g){return"object"==typeof g&&null!==g},isNull:function(g){return null===g},isNullOrUndefined:function(g){return null==g}}},20826:M=>{M.exports=function(s){return s&&"object"==typeof s&&"function"==typeof s.copy&&"function"==typeof s.fill&&"function"==typeof s.readUInt8}},17775:(M,g,s)=>{"use strict";var i=s(77316),S=s(72197),E=s(23446),p=s(77579);function l(N){return N.call.bind(N)}var e=typeof BigInt<"u",t=typeof Symbol<"u",u=l(Object.prototype.toString),m=l(Number.prototype.valueOf),h=l(String.prototype.valueOf),r=l(Boolean.prototype.valueOf);if(e)var b=l(BigInt.prototype.valueOf);if(t)var a=l(Symbol.prototype.valueOf);function o(N,he){if("object"!=typeof N)return!1;try{return he(N),!0}catch{return!1}}function re(N){return"[object Map]"===u(N)}function W(N){return"[object Set]"===u(N)}function J(N){return"[object WeakMap]"===u(N)}function Q(N){return"[object WeakSet]"===u(N)}function F(N){return"[object ArrayBuffer]"===u(N)}function K(N){return!(typeof ArrayBuffer>"u")&&(F.working?F(N):N instanceof ArrayBuffer)}function x(N){return"[object DataView]"===u(N)}function j(N){return!(typeof DataView>"u")&&(x.working?x(N):N instanceof DataView)}g.isArgumentsObject=i,g.isGeneratorFunction=S,g.isTypedArray=p,g.isPromise=function n(N){return typeof Promise<"u"&&N instanceof Promise||null!==N&&"object"==typeof N&&"function"==typeof N.then&&"function"==typeof N.catch},g.isArrayBufferView=function f(N){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(N):p(N)||j(N)},g.isUint8Array=function _(N){return"Uint8Array"===E(N)},g.isUint8ClampedArray=function y(N){return"Uint8ClampedArray"===E(N)},g.isUint16Array=function w(N){return"Uint16Array"===E(N)},g.isUint32Array=function P(N){return"Uint32Array"===E(N)},g.isInt8Array=function C(N){return"Int8Array"===E(N)},g.isInt16Array=function U(N){return"Int16Array"===E(N)},g.isInt32Array=function O(N){return"Int32Array"===E(N)},g.isFloat32Array=function H(N){return"Float32Array"===E(N)},g.isFloat64Array=function R(N){return"Float64Array"===E(N)},g.isBigInt64Array=function Y(N){return"BigInt64Array"===E(N)},g.isBigUint64Array=function G(N){return"BigUint64Array"===E(N)},re.working=typeof Map<"u"&&re(new Map),g.isMap=function te(N){return!(typeof Map>"u")&&(re.working?re(N):N instanceof Map)},W.working=typeof Set<"u"&&W(new Set),g.isSet=function ie(N){return!(typeof Set>"u")&&(W.working?W(N):N instanceof Set)},J.working=typeof WeakMap<"u"&&J(new WeakMap),g.isWeakMap=function ee(N){return!(typeof WeakMap>"u")&&(J.working?J(N):N instanceof WeakMap)},Q.working=typeof WeakSet<"u"&&Q(new WeakSet),g.isWeakSet=function X(N){return Q(N)},F.working=typeof ArrayBuffer<"u"&&F(new ArrayBuffer),g.isArrayBuffer=K,x.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&x(new DataView(new ArrayBuffer(1),0,1)),g.isDataView=j;var L=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function D(N){return"[object SharedArrayBuffer]"===u(N)}function V(N){return!(typeof L>"u")&&(typeof D.working>"u"&&(D.working=D(new L)),D.working?D(N):N instanceof L)}function k(N){return o(N,m)}function c(N){return o(N,h)}function d(N){return o(N,r)}function B(N){return e&&o(N,b)}function z(N){return t&&o(N,a)}g.isSharedArrayBuffer=V,g.isAsyncFunction=function q(N){return"[object AsyncFunction]"===u(N)},g.isMapIterator=function A(N){return"[object Map Iterator]"===u(N)},g.isSetIterator=function v(N){return"[object Set Iterator]"===u(N)},g.isGeneratorObject=function T(N){return"[object Generator]"===u(N)},g.isWebAssemblyCompiledModule=function I(N){return"[object WebAssembly.Module]"===u(N)},g.isNumberObject=k,g.isStringObject=c,g.isBooleanObject=d,g.isBigIntObject=B,g.isSymbolObject=z,g.isBoxedPrimitive=function oe(N){return k(N)||c(N)||d(N)||B(N)||z(N)},g.isAnyArrayBuffer=function ne(N){return typeof Uint8Array<"u"&&(K(N)||V(N))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(N){Object.defineProperty(g,N,{enumerable:!1,value:function(){throw new Error(N+" is not supported in userland")}})})},71732:(M,g,s)=>{var i=Object.getOwnPropertyDescriptors||function(j){for(var L=Object.keys(j),D={},V=0;V=V)return v;switch(v){case"%s":return String(D[L++]);case"%d":return Number(D[L++]);case"%j":try{return JSON.stringify(D[L++])}catch{return"[Circular]"}default:return v}}),A=D[L];L"u")return function(){return g.deprecate(x,j).apply(this,arguments)};var L=!1;return function D(){if(!L){if(process.throwDeprecation)throw new Error(j);process.traceDeprecation?console.trace(j):console.error(j),L=!0}return x.apply(this,arguments)}};var E={},p=/^$/;if(process.env.NODE_DEBUG){var l=process.env.NODE_DEBUG;l=l.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),p=new RegExp("^"+l+"$","i")}function e(x,j){var L={seen:[],stylize:u};return arguments.length>=3&&(L.depth=arguments[2]),arguments.length>=4&&(L.colors=arguments[3]),_(j)?L.showHidden=j:j&&g._extend(L,j),O(L.showHidden)&&(L.showHidden=!1),O(L.depth)&&(L.depth=2),O(L.colors)&&(L.colors=!1),O(L.customInspect)&&(L.customInspect=!0),L.colors&&(L.stylize=t),h(L,x,L.depth)}function t(x,j){var L=e.styles[j];return L?"\x1b["+e.colors[L][0]+"m"+x+"\x1b["+e.colors[L][1]+"m":x}function u(x,j){return x}function h(x,j,L){if(x.customInspect&&j&&re(j.inspect)&&j.inspect!==g.inspect&&(!j.constructor||j.constructor.prototype!==j)){var D=j.inspect(L,x);return C(D)||(D=h(x,D,L)),D}var V=function r(x,j){if(O(j))return x.stylize("undefined","undefined");if(C(j)){var L="'"+JSON.stringify(j).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return x.stylize(L,"string")}return P(j)?x.stylize(""+j,"number"):_(j)?x.stylize(""+j,"boolean"):y(j)?x.stylize("null","null"):void 0}(x,j);if(V)return V;var q=Object.keys(j),A=function m(x){var j={};return x.forEach(function(L,D){j[L]=!0}),j}(q);if(x.showHidden&&(q=Object.getOwnPropertyNames(j)),G(j)&&(q.indexOf("message")>=0||q.indexOf("description")>=0))return b(j);if(0===q.length){if(re(j))return x.stylize("[Function"+(j.name?": "+j.name:"")+"]","special");if(H(j))return x.stylize(RegExp.prototype.toString.call(j),"regexp");if(Y(j))return x.stylize(Date.prototype.toString.call(j),"date");if(G(j))return b(j)}var d,T="",I=!1,k=["{","}"];return f(j)&&(I=!0,k=["[","]"]),re(j)&&(T=" [Function"+(j.name?": "+j.name:"")+"]"),H(j)&&(T=" "+RegExp.prototype.toString.call(j)),Y(j)&&(T=" "+Date.prototype.toUTCString.call(j)),G(j)&&(T=" "+b(j)),0!==q.length||I&&0!=j.length?L<0?H(j)?x.stylize(RegExp.prototype.toString.call(j),"regexp"):x.stylize("[Object]","special"):(x.seen.push(j),d=I?function a(x,j,L,D,V){for(var q=[],A=0,v=j.length;A60?L[0]+(""===j?"":j+"\n ")+" "+x.join(",\n ")+" "+L[1]:L[0]+j+" "+x.join(", ")+" "+L[1]}(d,T,k)):k[0]+T+k[1]}function b(x){return"["+Error.prototype.toString.call(x)+"]"}function o(x,j,L,D,V,q){var A,v,T;if((T=Object.getOwnPropertyDescriptor(j,V)||{value:j[V]}).get?v=x.stylize(T.set?"[Getter/Setter]":"[Getter]","special"):T.set&&(v=x.stylize("[Setter]","special")),Q(D,V)||(A="["+V+"]"),v||(x.seen.indexOf(T.value)<0?(v=y(L)?h(x,T.value,null):h(x,T.value,L-1)).indexOf("\n")>-1&&(v=q?v.split("\n").map(function(I){return" "+I}).join("\n").substr(2):"\n"+v.split("\n").map(function(I){return" "+I}).join("\n")):v=x.stylize("[Circular]","special")),O(A)){if(q&&V.match(/^\d+$/))return v;(A=JSON.stringify(""+V)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(A=A.substr(1,A.length-2),A=x.stylize(A,"name")):(A=A.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),A=x.stylize(A,"string"))}return A+": "+v}function f(x){return Array.isArray(x)}function _(x){return"boolean"==typeof x}function y(x){return null===x}function P(x){return"number"==typeof x}function C(x){return"string"==typeof x}function O(x){return void 0===x}function H(x){return R(x)&&"[object RegExp]"===W(x)}function R(x){return"object"==typeof x&&null!==x}function Y(x){return R(x)&&"[object Date]"===W(x)}function G(x){return R(x)&&("[object Error]"===W(x)||x instanceof Error)}function re(x){return"function"==typeof x}function W(x){return Object.prototype.toString.call(x)}function ie(x){return x<10?"0"+x.toString(10):x.toString(10)}g.debuglog=function(x){if(x=x.toUpperCase(),!E[x])if(p.test(x)){var j=process.pid;E[x]=function(){var L=g.format.apply(g,arguments);console.error("%s %d: %s",x,j,L)}}else E[x]=function(){};return E[x]},g.inspect=e,e.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},e.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},g.types=s(17775),g.isArray=f,g.isBoolean=_,g.isNull=y,g.isNullOrUndefined=function w(x){return null==x},g.isNumber=P,g.isString=C,g.isSymbol=function U(x){return"symbol"==typeof x},g.isUndefined=O,g.isRegExp=H,g.types.isRegExp=H,g.isObject=R,g.isDate=Y,g.types.isDate=Y,g.isError=G,g.types.isNativeError=G,g.isFunction=re,g.isPrimitive=function te(x){return null===x||"boolean"==typeof x||"number"==typeof x||"string"==typeof x||"symbol"==typeof x||typeof x>"u"},g.isBuffer=s(20826);var J=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ee(){var x=new Date,j=[ie(x.getHours()),ie(x.getMinutes()),ie(x.getSeconds())].join(":");return[x.getDate(),J[x.getMonth()],j].join(" ")}function Q(x,j){return Object.prototype.hasOwnProperty.call(x,j)}g.log=function(){console.log("%s - %s",ee(),g.format.apply(g,arguments))},g.inherits=s(59879),g._extend=function(x,j){if(!j||!R(j))return x;for(var L=Object.keys(j),D=L.length;D--;)x[L[D]]=j[L[D]];return x};var X=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function F(x,j){if(!x){var L=new Error("Promise was rejected with a falsy value");L.reason=x,x=L}return j(x)}g.promisify=function(j){if("function"!=typeof j)throw new TypeError('The "original" argument must be of type Function');if(X&&j[X]){var L;if("function"!=typeof(L=j[X]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(L,X,{value:L,enumerable:!1,writable:!1,configurable:!0}),L}function L(){for(var D,V,q=new Promise(function(T,I){D=T,V=I}),A=[],v=0;v{"use strict";var i=s(32208),S=s(85127),E=s(19568),p=E("Object.prototype.toString"),l=s(91407)(),e=typeof globalThis>"u"?global:globalThis,t=S(),u=E("String.prototype.slice"),m={},h=s(7168),r=Object.getPrototypeOf;l&&h&&r&&i(t,function(o){if("function"==typeof e[o]){var n=new e[o];if(Symbol.toStringTag in n){var f=r(n),_=h(f,Symbol.toStringTag);if(!_){var y=r(f);_=h(y,Symbol.toStringTag)}m[o]=_.get}}});var a=s(77579);M.exports=function(n){return!!a(n)&&(l&&Symbol.toStringTag in n?function(n){var f=!1;return i(m,function(_,y){if(!f)try{var w=_.call(n);w===y&&(f=w)}catch{}}),f}(n):u(p(n),8,-1))}},70166:M=>{M.exports=function s(){for(var i={},S=0;S{"use strict";Object.defineProperty(g,"__esModule",{value:!0});const i=s(2272);function S(l,e,t){try{Reflect.apply(l,e,t)}catch(u){setTimeout(()=>{throw u})}}g.default=class p extends i.EventEmitter{emit(e,...t){let u="error"===e;const m=this._events;if(void 0!==m)u=u&&void 0===m.error;else if(!u)return!1;if(u){let r;if(t.length>0&&([r]=t),r instanceof Error)throw r;const b=new Error("Unhandled error."+(r?` (${r.message})`:""));throw b.context=r,b}const h=m[e];if(void 0===h)return!1;if("function"==typeof h)S(h,this,t);else{const r=h.length,b=function E(l){const e=l.length,t=new Array(e);for(let u=0;u{var i=s(5214).Buffer,S=s(36917).Transform,E=s(77195).s;function l(e){S.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}s(61390)(l,S),l.prototype.update=function(e,t,u){"string"==typeof e&&(e=i.from(e,t));var m=this._update(e);return this.hashMode?this:(u&&(m=this._toString(m,u)),m)},l.prototype.setAutoPadding=function(){},l.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},l.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},l.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},l.prototype._transform=function(e,t,u){var m;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(h){m=h}finally{u(m)}},l.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(u){t=u}e(t)},l.prototype._finalOrDigest=function(e){var t=this.__final()||i.alloc(0);return e&&(t=this._toString(t,e,!0)),t},l.prototype._toString=function(e,t,u){if(this._decoder||(this._decoder=new E(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var m=this._decoder.write(e);return u&&(m+=this._decoder.end()),m},M.exports=l},77353:(M,g)=>{!function(){"use strict";function s(p,l,e,t){return this instanceof s?(this.domain=p||void 0,this.path=l||"/",this.secure=!!e,this.script=!!t,this):new s(p,l,e,t)}function i(p,l,e){return p instanceof i?p:this instanceof i?(this.name=null,this.value=null,this.expiration_date=1/0,this.path=String(e||"/"),this.explicit_path=!1,this.domain=l||null,this.explicit_domain=!1,this.secure=!1,this.noscript=!1,p&&this.parse(p,l,e),this):new i(p,l,e)}s.All=Object.freeze(Object.create(null)),g.CookieAccessInfo=s,g.Cookie=i,i.prototype.toString=function(){var l=[this.name+"="+this.value];return this.expiration_date!==1/0&&l.push("expires="+new Date(this.expiration_date).toGMTString()),this.domain&&l.push("domain="+this.domain),this.path&&l.push("path="+this.path),this.secure&&l.push("secure"),this.noscript&&l.push("httponly"),l.join("; ")},i.prototype.toValueString=function(){return this.name+"="+this.value};var S=/[:](?=\s*[a-zA-Z0-9_\-]+\s*[=])/g;function E(){var p,l;return this instanceof E?(p=Object.create(null),this.setCookie=function(u,m,h){var r,b;if(r=(u=new i(u,m,h)).expiration_date<=Date.now(),void 0!==p[u.name]){for(l=p[u.name],b=0;b{"use strict";var i=s(61390),S=s(31385),E=s(29478),p=s(5197),l=s(12269);function e(t){l.call(this,"digest"),this._hash=t}i(e,l),e.prototype._update=function(t){this._hash.update(t)},e.prototype._final=function(){return this._hash.digest()},M.exports=function(u){return"md5"===(u=u.toLowerCase())?new S:"rmd160"===u||"ripemd160"===u?new E:new e(p(u))}},3061:(M,g,s)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.EthereumProviderError=g.EthereumRpcError=void 0;const i=s(93726);class S extends Error{constructor(t,u,m){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!u||"string"!=typeof u)throw new Error('"message" must be a nonempty string.');super(u),this.code=t,void 0!==m&&(this.data=m)}serialize(){const t={code:this.code,message:this.message};return void 0!==this.data&&(t.data=this.data),this.stack&&(t.stack=this.stack),t}toString(){return i.default(this.serialize(),l,2)}}function l(e,t){if("[Circular]"!==t)return t}g.EthereumRpcError=S,g.EthereumProviderError=class E extends S{constructor(t,u,m){if(!function p(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,u,m)}}},24638:(M,g)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.errorValues=g.errorCodes=void 0,g.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},g.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}},50011:(M,g,s)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.ethErrors=void 0;const i=s(3061),S=s(4777),E=s(24638);function p(t,u){const[m,h]=e(u);return new i.EthereumRpcError(t,m||S.getMessageFromCode(t),h)}function l(t,u){const[m,h]=e(u);return new i.EthereumProviderError(t,m||S.getMessageFromCode(t),h)}function e(t){if(t){if("string"==typeof t)return[t];if("object"==typeof t&&!Array.isArray(t)){const{message:u,data:m}=t;if(u&&"string"!=typeof u)throw new Error("Must specify string message.");return[u||void 0,m]}}return[]}g.ethErrors={rpc:{parse:t=>p(E.errorCodes.rpc.parse,t),invalidRequest:t=>p(E.errorCodes.rpc.invalidRequest,t),invalidParams:t=>p(E.errorCodes.rpc.invalidParams,t),methodNotFound:t=>p(E.errorCodes.rpc.methodNotFound,t),internal:t=>p(E.errorCodes.rpc.internal,t),server:t=>{if(!t||"object"!=typeof t||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:u}=t;if(!Number.isInteger(u)||u>-32005||u<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return p(u,t)},invalidInput:t=>p(E.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>p(E.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>p(E.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>p(E.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>p(E.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>p(E.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>l(E.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>l(E.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>l(E.errorCodes.provider.unsupportedMethod,t),disconnected:t=>l(E.errorCodes.provider.disconnected,t),chainDisconnected:t=>l(E.errorCodes.provider.chainDisconnected,t),custom:t=>{if(!t||"object"!=typeof t||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:u,message:m,data:h}=t;if(!m||"string"!=typeof m)throw new Error('"message" must be a nonempty string');return new i.EthereumProviderError(u,m,h)}}}},85327:(M,g,s)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.getMessageFromCode=g.serializeError=g.EthereumProviderError=g.EthereumRpcError=g.ethErrors=g.errorCodes=void 0;const i=s(3061);Object.defineProperty(g,"EthereumRpcError",{enumerable:!0,get:function(){return i.EthereumRpcError}}),Object.defineProperty(g,"EthereumProviderError",{enumerable:!0,get:function(){return i.EthereumProviderError}});const S=s(4777);Object.defineProperty(g,"serializeError",{enumerable:!0,get:function(){return S.serializeError}}),Object.defineProperty(g,"getMessageFromCode",{enumerable:!0,get:function(){return S.getMessageFromCode}});const E=s(50011);Object.defineProperty(g,"ethErrors",{enumerable:!0,get:function(){return E.ethErrors}});const p=s(24638);Object.defineProperty(g,"errorCodes",{enumerable:!0,get:function(){return p.errorCodes}})},4777:(M,g,s)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.serializeError=g.isValidCode=g.getMessageFromCode=g.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const i=s(24638),S=s(3061),E=i.errorCodes.rpc.internal,l={code:E,message:e(E)};function e(b,a="Unspecified error message. This is a bug, please report it."){if(Number.isInteger(b)){const o=b.toString();if(r(i.errorValues,o))return i.errorValues[o].message;if(m(b))return g.JSON_RPC_SERVER_ERROR_MESSAGE}return a}function t(b){if(!Number.isInteger(b))return!1;const a=b.toString();return!(!i.errorValues[a]&&!m(b))}function m(b){return b>=-32099&&b<=-32e3}function h(b){return b&&"object"==typeof b&&!Array.isArray(b)?Object.assign({},b):b}function r(b,a){return Object.prototype.hasOwnProperty.call(b,a)}g.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",g.getMessageFromCode=e,g.isValidCode=t,g.serializeError=function u(b,{fallbackError:a=l,shouldIncludeStack:o=!1}={}){var n,f;if(!a||!Number.isInteger(a.code)||"string"!=typeof a.message)throw new Error("Must provide fallback error with integer number code and string message.");if(b instanceof S.EthereumRpcError)return b.serialize();const _={};if(b&&"object"==typeof b&&!Array.isArray(b)&&r(b,"code")&&t(b.code)){const w=b;_.code=w.code,w.message&&"string"==typeof w.message?(_.message=w.message,r(w,"data")&&(_.data=w.data)):(_.message=e(_.code),_.data={originalError:h(b)})}else{_.code=a.code;const w=null===(n=b)||void 0===n?void 0:n.message;_.message=w&&"string"==typeof w?w:a.message,_.data={originalError:h(b)}}const y=null===(f=b)||void 0===f?void 0:f.stack;return o&&b&&y&&"string"==typeof y&&(_.stack=y),_}},15185:(M,g)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.createHashFunction=function s(i){return function(S){var E=i();return E.update(S),Buffer.from(E.digest())}}},75512:(M,g,s)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0});var i=s(15185),S=s(78556);g.keccak224=i.createHashFunction(function(){return S("keccak224")}),g.keccak256=i.createHashFunction(function(){return S("keccak256")}),g.keccak384=i.createHashFunction(function(){return S("keccak384")}),g.keccak512=i.createHashFunction(function(){return S("keccak512")})},74907:(M,g,s)=>{M.exports=s(26661)(s(90706))},90706:(M,g,s)=>{const S=new(0,s(4913).ec)("secp256k1"),E=S.curve,p=E.n.constructor;function t(m){const h=m[0];switch(h){case 2:case 3:return 33!==m.length?null:function l(m,h){let r=new p(h);if(r.cmp(E.p)>=0)return null;r=r.toRed(E.red);let b=r.redSqr().redIMul(r).redIAdd(E.b).redSqrt();return 3===m!==b.isOdd()&&(b=b.redNeg()),S.keyPair({pub:{x:r,y:b}})}(h,m.subarray(1,33));case 4:case 6:case 7:return 65!==m.length?null:function e(m,h,r){let b=new p(h),a=new p(r);if(b.cmp(E.p)>=0||a.cmp(E.p)>=0||(b=b.toRed(E.red),a=a.toRed(E.red),(6===m||7===m)&&a.isOdd()!==(7===m)))return null;const o=b.redSqr().redIMul(b);return a.redSqr().redISub(o.redIAdd(E.b)).isZero()?S.keyPair({pub:{x:b,y:a}}):null}(h,m.subarray(1,33),m.subarray(33,65));default:return null}}function u(m,h){const r=h.encode(null,33===m.length);for(let b=0;b0,privateKeyVerify(m){const h=new p(m);return h.cmp(E.n)<0&&!h.isZero()?0:1},privateKeyNegate(m){const h=new p(m),r=E.n.sub(h).umod(E.n).toArrayLike(Uint8Array,"be",32);return m.set(r),0},privateKeyTweakAdd(m,h){const r=new p(h);if(r.cmp(E.n)>=0||(r.iadd(new p(m)),r.cmp(E.n)>=0&&r.isub(E.n),r.isZero()))return 1;const b=r.toArrayLike(Uint8Array,"be",32);return m.set(b),0},privateKeyTweakMul(m,h){let r=new p(h);if(r.cmp(E.n)>=0||r.isZero())return 1;r.imul(new p(m)),r.cmp(E.n)>=0&&(r=r.umod(E.n));const b=r.toArrayLike(Uint8Array,"be",32);return m.set(b),0},publicKeyVerify:m=>null===t(m)?1:0,publicKeyCreate(m,h){const r=new p(h);return r.cmp(E.n)>=0||r.isZero()?1:(u(m,S.keyFromPrivate(h).getPublic()),0)},publicKeyConvert(m,h){const r=t(h);return null===r?1:(u(m,r.getPublic()),0)},publicKeyNegate(m,h){const r=t(h);if(null===r)return 1;const b=r.getPublic();return b.y=b.y.redNeg(),u(m,b),0},publicKeyCombine(m,h){const r=new Array(h.length);for(let a=0;a=0)return 2;const a=b.getPublic().add(E.g.mul(r));return a.isInfinity()?2:(u(m,a),0)},publicKeyTweakMul(m,h,r){const b=t(h);return null===b?1:(r=new p(r)).cmp(E.n)>=0||r.isZero()?2:(u(m,b.getPublic().mul(r)),0)},signatureNormalize(m){const h=new p(m.subarray(0,32)),r=new p(m.subarray(32,64));return h.cmp(E.n)>=0||r.cmp(E.n)>=0?1:(1===r.cmp(S.nh)&&m.set(E.n.sub(r).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport(m,h){const r=h.subarray(0,32),b=h.subarray(32,64);if(new p(r).cmp(E.n)>=0||new p(b).cmp(E.n)>=0)return 1;const{output:a}=m;let o=a.subarray(4,37);o[0]=0,o.set(r,1);let n=33,f=0;for(;n>1&&0===o[f]&&!(128&o[f+1]);--n,++f);if(o=o.subarray(f),128&o[0]||n>1&&0===o[0]&&!(128&o[1]))return 1;let _=a.subarray(39,72);_[0]=0,_.set(b,1);let y=33,w=0;for(;y>1&&0===_[w]&&!(128&_[w+1]);--y,++w);return _=_.subarray(w),128&_[0]||y>1&&0===_[0]&&!(128&_[1])?1:(m.outputlen=6+n+y,a[0]=48,a[1]=m.outputlen-2,a[2]=2,a[3]=o.length,a.set(o,4),a[4+n]=2,a[5+n]=_.length,a.set(_,6+n),0)},signatureImport(m,h){if(h.length<8||h.length>72||48!==h[0]||h[1]!==h.length-2||2!==h[2])return 1;const r=h[3];if(0===r||5+r>=h.length||2!==h[4+r])return 1;const b=h[5+r];if(0===b||6+r+b!==h.length||128&h[4]||r>1&&0===h[4]&&!(128&h[5])||128&h[r+6]||b>1&&0===h[r+6]&&!(128&h[r+7]))return 1;let a=h.subarray(4,4+r);if(33===a.length&&0===a[0]&&(a=a.subarray(1)),a.length>32)return 1;let o=h.subarray(6+r);if(33===o.length&&0===o[0]&&(o=o.slice(1)),o.length>32)throw new Error("S length is too long");let n=new p(a);n.cmp(E.n)>=0&&(n=new p(0));let f=new p(h.subarray(6+r));return f.cmp(E.n)>=0&&(f=new p(0)),m.set(n.toArrayLike(Uint8Array,"be",32),0),m.set(f.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign(m,h,r,b,a){if(a){const f=a;a=_=>{const y=f(h,r,null,b,_);if(!(y instanceof Uint8Array&&32===y.length))throw new Error("This is the way");return new p(y)}}const o=new p(r);if(o.cmp(E.n)>=0||o.isZero())return 1;let n;try{n=S.sign(h,r,{canonical:!0,k:a,pers:b})}catch{return 1}return m.signature.set(n.r.toArrayLike(Uint8Array,"be",32),0),m.signature.set(n.s.toArrayLike(Uint8Array,"be",32),32),m.recid=n.recoveryParam,0},ecdsaVerify(m,h,r){const b={r:m.subarray(0,32),s:m.subarray(32,64)},a=new p(b.r),o=new p(b.s);if(a.cmp(E.n)>=0||o.cmp(E.n)>=0)return 1;if(1===o.cmp(S.nh)||a.isZero()||o.isZero())return 3;const n=t(r);if(null===n)return 2;const f=n.getPublic();return S.verify(h,b,f)?0:3},ecdsaRecover(m,h,r,b){const a={r:h.slice(0,32),s:h.slice(32,64)},o=new p(a.r),n=new p(a.s);if(o.cmp(E.n)>=0||n.cmp(E.n)>=0)return 1;if(o.isZero()||n.isZero())return 2;let f;try{f=S.recoverPubKey(b,a,r)}catch{return 2}return u(m,f),0},ecdh(m,h,r,b,a,o,n){const f=t(h);if(null===f)return 1;const _=new p(r);if(_.cmp(E.n)>=0||_.isZero())return 2;const y=f.getPublic().mul(_);if(void 0===a){const w=y.encode(null,!0),P=S.hash().update(w).digest();for(let C=0;C<32;++C)m[C]=P[C]}else{o||(o=new Uint8Array(32));const w=y.getX().toArray("be",32);for(let O=0;O<32;++O)o[O]=w[O];n||(n=new Uint8Array(32));const P=y.getY().toArray("be",32);for(let O=0;O<32;++O)n[O]=P[O];const C=a(o,n,b);if(!(C instanceof Uint8Array&&C.length===m.length))return 2;m.set(C)}return 0}}},26661:M=>{const g_IMPOSSIBLE_CASE="Impossible case. Please create issue.",g_TWEAK_ADD="The tweak was out of range or the resulted private key is invalid",g_TWEAK_MUL="The tweak was out of range or equal to zero",g_PUBKEY_PARSE="Public Key could not be parsed",g_PUBKEY_SERIALIZE="Public Key serialization error",g_SIG_PARSE="Signature could not be parsed";function s(l,e){if(!l)throw new Error(e)}function i(l,e,t){if(s(e instanceof Uint8Array,`Expected ${l} to be an Uint8Array`),void 0!==t)if(Array.isArray(t)){const m=`Expected ${l} to be an Uint8Array with length [${t.join(", ")}]`;s(t.includes(e.length),m)}else s(e.length===t,`Expected ${l} to be an Uint8Array with length ${t}`)}function S(l){s("Boolean"===p(l),"Expected compressed to be a Boolean")}function E(l=(t=>new Uint8Array(t)),e){return"function"==typeof l&&(l=l(e)),i("output",l,e),l}function p(l){return Object.prototype.toString.call(l).slice(8,-1)}M.exports=l=>({contextRandomize(e){if(1===(s(null===e||e instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),null!==e&&i("seed",e,32),l.contextRandomize(e)))throw new Error("Unknow error on context randomization")},privateKeyVerify:e=>(i("private key",e,32),0===l.privateKeyVerify(e)),privateKeyNegate(e){switch(i("private key",e,32),l.privateKeyNegate(e)){case 0:return e;case 1:throw new Error(g_IMPOSSIBLE_CASE)}},privateKeyTweakAdd(e,t){switch(i("private key",e,32),i("tweak",t,32),l.privateKeyTweakAdd(e,t)){case 0:return e;case 1:throw new Error(g_TWEAK_ADD)}},privateKeyTweakMul(e,t){switch(i("private key",e,32),i("tweak",t,32),l.privateKeyTweakMul(e,t)){case 0:return e;case 1:throw new Error(g_TWEAK_MUL)}},publicKeyVerify:e=>(i("public key",e,[33,65]),0===l.publicKeyVerify(e)),publicKeyCreate(e,t=!0,u){switch(i("private key",e,32),S(t),u=E(u,t?33:65),l.publicKeyCreate(u,e)){case 0:return u;case 1:throw new Error("Private Key is invalid");case 2:throw new Error(g_PUBKEY_SERIALIZE)}},publicKeyConvert(e,t=!0,u){switch(i("public key",e,[33,65]),S(t),u=E(u,t?33:65),l.publicKeyConvert(u,e)){case 0:return u;case 1:throw new Error(g_PUBKEY_PARSE);case 2:throw new Error(g_PUBKEY_SERIALIZE)}},publicKeyNegate(e,t=!0,u){switch(i("public key",e,[33,65]),S(t),u=E(u,t?33:65),l.publicKeyNegate(u,e)){case 0:return u;case 1:throw new Error(g_PUBKEY_PARSE);case 2:throw new Error(g_IMPOSSIBLE_CASE);case 3:throw new Error(g_PUBKEY_SERIALIZE)}},publicKeyCombine(e,t=!0,u){s(Array.isArray(e),"Expected public keys to be an Array"),s(e.length>0,"Expected public keys array will have more than zero items");for(const m of e)i("public key",m,[33,65]);switch(S(t),u=E(u,t?33:65),l.publicKeyCombine(u,e)){case 0:return u;case 1:throw new Error(g_PUBKEY_PARSE);case 2:throw new Error("The sum of the public keys is not valid");case 3:throw new Error(g_PUBKEY_SERIALIZE)}},publicKeyTweakAdd(e,t,u=!0,m){switch(i("public key",e,[33,65]),i("tweak",t,32),S(u),m=E(m,u?33:65),l.publicKeyTweakAdd(m,e,t)){case 0:return m;case 1:throw new Error(g_PUBKEY_PARSE);case 2:throw new Error(g_TWEAK_ADD)}},publicKeyTweakMul(e,t,u=!0,m){switch(i("public key",e,[33,65]),i("tweak",t,32),S(u),m=E(m,u?33:65),l.publicKeyTweakMul(m,e,t)){case 0:return m;case 1:throw new Error(g_PUBKEY_PARSE);case 2:throw new Error(g_TWEAK_MUL)}},signatureNormalize(e){switch(i("signature",e,64),l.signatureNormalize(e)){case 0:return e;case 1:throw new Error(g_SIG_PARSE)}},signatureExport(e,t){i("signature",e,64);const u={output:t=E(t,72),outputlen:72};switch(l.signatureExport(u,e)){case 0:return t.slice(0,u.outputlen);case 1:throw new Error(g_SIG_PARSE);case 2:throw new Error(g_IMPOSSIBLE_CASE)}},signatureImport(e,t){switch(i("signature",e),t=E(t,64),l.signatureImport(t,e)){case 0:return t;case 1:throw new Error(g_SIG_PARSE);case 2:throw new Error(g_IMPOSSIBLE_CASE)}},ecdsaSign(e,t,u={},m){i("message",e,32),i("private key",t,32),s("Object"===p(u),"Expected options to be an Object"),void 0!==u.data&&i("options.data",u.data),void 0!==u.noncefn&&s("Function"===p(u.noncefn),"Expected options.noncefn to be a Function");const h={signature:m=E(m,64),recid:null};switch(l.ecdsaSign(h,e,t,u.data,u.noncefn)){case 0:return h;case 1:throw new Error("The nonce generation function failed, or the private key was invalid");case 2:throw new Error(g_IMPOSSIBLE_CASE)}},ecdsaVerify(e,t,u){switch(i("signature",e,64),i("message",t,32),i("public key",u,[33,65]),l.ecdsaVerify(e,t,u)){case 0:return!0;case 3:return!1;case 1:throw new Error(g_SIG_PARSE);case 2:throw new Error(g_PUBKEY_PARSE)}},ecdsaRecover(e,t,u,m=!0,h){switch(i("signature",e,64),s("Number"===p(t)&&t>=0&&t<=3,"Expected recovery id to be a Number within interval [0, 3]"),i("message",u,32),S(m),h=E(h,m?33:65),l.ecdsaRecover(h,e,t,u)){case 0:return h;case 1:throw new Error(g_SIG_PARSE);case 2:throw new Error("Public key could not be recover");case 3:throw new Error(g_IMPOSSIBLE_CASE)}},ecdh(e,t,u={},m){switch(i("public key",e,[33,65]),i("private key",t,32),s("Object"===p(u),"Expected options to be an Object"),void 0!==u.data&&i("options.data",u.data),void 0!==u.hashfn?(s("Function"===p(u.hashfn),"Expected options.hashfn to be a Function"),void 0!==u.xbuf&&i("options.xbuf",u.xbuf,32),void 0!==u.ybuf&&i("options.ybuf",u.ybuf,32),i("output",m)):m=E(m,32),l.ecdh(m,e,t,u.data,u.hashfn,u.xbuf,u.ybuf)){case 0:return m;case 1:throw new Error(g_PUBKEY_PARSE);case 2:throw new Error("Scalar was invalid (zero or overflow)")}}})},43944:(M,g,s)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0});var i=s(67505);g.getRandomBytes=function S(p){return new Promise(function(l,e){i(p,function(t,u){t?e(t):l(u)})})},g.getRandomBytesSync=function E(p){return i(p)}},37712:function(M,g,s){"use strict";var i=this&&this.__awaiter||function(m,h,r,b){return new(r||(r=Promise))(function(o,n){function f(w){try{y(b.next(w))}catch(P){n(P)}}function _(w){try{y(b.throw(w))}catch(P){n(P)}}function y(w){w.done?o(w.value):function a(o){return o instanceof r?o:new r(function(n){n(o)})}(w.value).then(f,_)}y((b=b.apply(m,h||[])).next())})},S=this&&this.__generator||function(m,h){var b,a,o,n,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return n={next:f(0),throw:f(1),return:f(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function f(y){return function(w){return function _(y){if(b)throw new TypeError("Generator is already executing.");for(;r;)try{if(b=1,a&&(o=2&y[0]?a.return:y[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,y[1])).done)return o;switch(a=0,o&&(y=[2&y[0],o.value]),y[0]){case 0:case 1:o=y;break;case 4:return r.label++,{value:y[1],done:!1};case 5:r.label++,a=y[1],y=[0];continue;case 7:y=r.ops.pop(),r.trys.pop();continue;default:if(!(o=(o=r.trys).length>0&&o[o.length-1])&&(6===y[0]||2===y[0])){r=0;continue}if(3===y[0]&&(!o||y[1]>o[0]&&y[1]{"use strict";var i,g="object"==typeof Reflect?Reflect:null,s=g&&"function"==typeof g.apply?g.apply:function(P,C,U){return Function.prototype.apply.call(P,C,U)};i=g&&"function"==typeof g.ownKeys?g.ownKeys:Object.getOwnPropertySymbols?function(P){return Object.getOwnPropertyNames(P).concat(Object.getOwnPropertySymbols(P))}:function(P){return Object.getOwnPropertyNames(P)};var E=Number.isNaN||function(P){return P!=P};function p(){p.init.call(this)}M.exports=p,M.exports.once=function f(w,P){return new Promise(function(C,U){function O(R){w.removeListener(P,H),U(R)}function H(){"function"==typeof w.removeListener&&w.removeListener("error",O),C([].slice.call(arguments))}y(w,P,H,{once:!0}),"error"!==P&&function _(w,P,C){"function"==typeof w.on&&y(w,"error",P,C)}(w,O,{once:!0})})},p.EventEmitter=p,p.prototype._events=void 0,p.prototype._eventsCount=0,p.prototype._maxListeners=void 0;var l=10;function e(w){if("function"!=typeof w)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof w)}function t(w){return void 0===w._maxListeners?p.defaultMaxListeners:w._maxListeners}function u(w,P,C,U){var O,H,R;if(e(C),void 0===(H=w._events)?(H=w._events=Object.create(null),w._eventsCount=0):(void 0!==H.newListener&&(w.emit("newListener",P,C.listener?C.listener:C),H=w._events),R=H[P]),void 0===R)R=H[P]=C,++w._eventsCount;else if("function"==typeof R?R=H[P]=U?[C,R]:[R,C]:U?R.unshift(C):R.push(C),(O=t(w))>0&&R.length>O&&!R.warned){R.warned=!0;var Y=new Error("Possible EventEmitter memory leak detected. "+R.length+" "+String(P)+" listeners added. Use emitter.setMaxListeners() to increase limit");Y.name="MaxListenersExceededWarning",Y.emitter=w,Y.type=P,Y.count=R.length,function S(w){console&&console.warn&&console.warn(w)}(Y)}return w}function m(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(w,P,C){var U={fired:!1,wrapFn:void 0,target:w,type:P,listener:C},O=m.bind(U);return O.listener=C,U.wrapFn=O,O}function r(w,P,C){var U=w._events;if(void 0===U)return[];var O=U[P];return void 0===O?[]:"function"==typeof O?C?[O.listener||O]:[O]:C?function n(w){for(var P=new Array(w.length),C=0;C0&&(R=C[0]),R instanceof Error)throw R;var Y=new Error("Unhandled error."+(R?" ("+R.message+")":""));throw Y.context=R,Y}var G=H[P];if(void 0===G)return!1;if("function"==typeof G)s(G,this,C);else{var re=G.length,te=a(G,re);for(U=0;U=0;R--)if(U[R]===C||U[R].listener===C){Y=U[R].listener,H=R;break}if(H<0)return this;0===H?U.shift():function o(w,P){for(;P+1=0;O--)this.removeListener(P,C[O]);return this},p.prototype.listeners=function(P){return r(this,P,!0)},p.prototype.rawListeners=function(P){return r(this,P,!1)},p.listenerCount=function(w,P){return"function"==typeof w.listenerCount?w.listenerCount(P):b.call(w,P)},p.prototype.listenerCount=b,p.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]}},93726:M=>{M.exports=p,p.default=p,p.stable=u,p.stableStringify=u;var g="[...]",s="[Circular]",i=[],S=[];function E(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function p(r,b,a,o){var n;typeof o>"u"&&(o=E()),e(r,"",0,[],void 0,0,o);try{n=0===S.length?JSON.stringify(r,b,a):JSON.stringify(r,h(b),a)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==i.length;){var f=i.pop();4===f.length?Object.defineProperty(f[0],f[1],f[3]):f[0][f[1]]=f[2]}}return n}function l(r,b,a,o){var n=Object.getOwnPropertyDescriptor(o,a);void 0!==n.get?n.configurable?(Object.defineProperty(o,a,{value:r}),i.push([o,a,b,n])):S.push([b,a,r]):(o[a]=r,i.push([o,a,b]))}function e(r,b,a,o,n,f,_){var y;if(f+=1,"object"==typeof r&&null!==r){for(y=0;y_.depthLimit)return void l(g,r,b,n);if(typeof _.edgesLimit<"u"&&a+1>_.edgesLimit)return void l(g,r,b,n);if(o.push(r),Array.isArray(r))for(y=0;yb?1:0}function u(r,b,a,o){typeof o>"u"&&(o=E());var f,n=m(r,"",0,[],void 0,0,o)||r;try{f=0===S.length?JSON.stringify(n,b,a):JSON.stringify(n,h(b),a)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==i.length;){var _=i.pop();4===_.length?Object.defineProperty(_[0],_[1],_[3]):_[0][_[1]]=_[2]}}return f}function m(r,b,a,o,n,f,_){var y;if(f+=1,"object"==typeof r&&null!==r){for(y=0;y_.depthLimit)return void l(g,r,b,n);if(typeof _.edgesLimit<"u"&&a+1>_.edgesLimit)return void l(g,r,b,n);if(o.push(r),Array.isArray(r))for(y=0;y0)for(var o=0;o{var g=Object.prototype.hasOwnProperty,s=Object.prototype.toString;M.exports=function(S,E,p){if("[object Function]"!==s.call(E))throw new TypeError("iterator must be a function");var l=S.length;if(l===+l)for(var e=0;e{"use strict";var i=s(5214).Buffer,S=s(23225).Transform;function l(e){S.call(this),this._block=i.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}s(61390)(l,S),l.prototype._transform=function(e,t,u){var m=null;try{this.update(e,t)}catch(h){m=h}u(m)},l.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(u){t=u}e(t)},l.prototype.update=function(e,t){if(function p(e,t){if(!i.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");i.isBuffer(e)||(e=i.from(e,t));for(var u=this._block,m=0;this._blockOffset+e.length-m>=this._blockSize;){for(var h=this._blockOffset;h0;++r)this._length[r]+=b,(b=this._length[r]/4294967296|0)>0&&(this._length[r]-=4294967296*b);return this},l.prototype._update=function(){throw new Error("_update is not implemented")},l.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var u=0;u<4;++u)this._length[u]=0;return t},l.prototype._digest=function(){throw new Error("_digest is not implemented")},M.exports=l},92158:(M,g,s)=>{"use strict";var i=s(15851)(),E=s(83740)("Object.prototype.toString"),p=function(u){return!(i&&u&&"object"==typeof u&&Symbol.toStringTag in u)&&"[object Arguments]"===E(u)},l=function(u){return!!p(u)||null!==u&&"object"==typeof u&&"number"==typeof u.length&&u.length>=0&&"[object Array]"!==E(u)&&"[object Function]"===E(u.callee)},e=function(){return p(arguments)}();p.isLegacyArguments=l,M.exports=e?p:l},67844:(M,g,s)=>{"use strict";var t,i=Object.prototype.toString,S=Function.prototype.toString,E=/^\s*(?:function)?\*/,p=s(15851)(),l=Object.getPrototypeOf;M.exports=function(m){if("function"!=typeof m)return!1;if(E.test(S.call(m)))return!0;if(!p)return"[object GeneratorFunction]"===i.call(m);if(!l)return!1;if(typeof t>"u"){var r=function(){if(!p)return!1;try{return Function("return function*() {}")()}catch{}}();t=!!r&&l(r)}return l(m)===t}},30853:M=>{M.exports=function(s){if("string"!=typeof s)throw new Error("[is-hex-prefixed] value must be type 'string', is currently type "+typeof s+", while checking isHexPrefixed.");return"0x"===s.slice(0,2)}},68627:(M,g,s)=>{"use strict";var i=s(69856),S=s(60130),E=s(83740),p=E("Object.prototype.toString"),l=s(15851)(),e=typeof globalThis>"u"?global:globalThis,t=S(),u=E("Array.prototype.indexOf",!0)||function(n,f){for(var _=0;_-1}return!!r&&function(n){var f=!1;return i(h,function(_,y){if(!f)try{f=_.call(n)===y}catch{}}),f}(n)}},18535:(M,g,s)=>{var i=typeof JSON<"u"?JSON:s(85293);M.exports=function(p,l){l||(l={}),"function"==typeof l&&(l={cmp:l});var e=l.space||"";"number"==typeof e&&(e=Array(e+1).join(" "));var r,t="boolean"==typeof l.cycles&&l.cycles,u=l.replacer||function(r,b){return b},m=l.cmp&&(r=l.cmp,function(b){return function(a,o){return r({key:a,value:b[a]},{key:o,value:b[o]})}}),h=[];return function r(b,a,o,n){var f=e?"\n"+new Array(n+1).join(e):"",_=e?": ":":";if(o&&o.toJSON&&"function"==typeof o.toJSON&&(o=o.toJSON()),void 0!==(o=u.call(b,a,o))){if("object"!=typeof o||null===o)return i.stringify(o);if(S(o)){for(var y=[],w=0;w{g.parse=s(36964),g.stringify=s(94642)},36964:M=>{var g,s,S,m,i={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},E=function(b){throw{name:"SyntaxError",message:b,at:g,text:S}},p=function(b){return b&&b!==s&&E("Expected '"+b+"' instead of '"+s+"'"),s=S.charAt(g),g+=1,s},l=function(){var b,a="";for("-"===s&&(a="-",p("-"));s>="0"&&s<="9";)a+=s,p();if("."===s)for(a+=".";p()&&s>="0"&&s<="9";)a+=s;if("e"===s||"E"===s)for(a+=s,p(),("-"===s||"+"===s)&&(a+=s,p());s>="0"&&s<="9";)a+=s,p();if(b=+a,isFinite(b))return b;E("Bad number")},e=function(){var b,a,n,o="";if('"'===s)for(;p();){if('"'===s)return p(),o;if("\\"===s)if(p(),"u"===s){for(n=0,a=0;a<4&&(b=parseInt(p(),16),isFinite(b));a+=1)n=16*n+b;o+=String.fromCharCode(n)}else{if("string"!=typeof i[s])break;o+=i[s]}else o+=s}E("Bad string")},t=function(){for(;s&&s<=" ";)p()};m=function(){switch(t(),s){case"{":return function(){var b,a={};if("{"===s){if(p("{"),t(),"}"===s)return p("}"),a;for(;s;){if(b=e(),t(),p(":"),Object.hasOwnProperty.call(a,b)&&E('Duplicate key "'+b+'"'),a[b]=m(),t(),"}"===s)return p("}"),a;p(","),t()}}E("Bad object")}();case"[":return function(){var b=[];if("["===s){if(p("["),t(),"]"===s)return p("]"),b;for(;s;){if(b.push(m()),t(),"]"===s)return p("]"),b;p(","),t()}}E("Bad array")}();case'"':return e();case"-":return l();default:return s>="0"&&s<="9"?l():function(){switch(s){case"t":return p("t"),p("r"),p("u"),p("e"),!0;case"f":return p("f"),p("a"),p("l"),p("s"),p("e"),!1;case"n":return p("n"),p("u"),p("l"),p("l"),null}E("Unexpected '"+s+"'")}()}},M.exports=function(b,a){var o;return S=b,g=0,s=" ",o=m(),t(),s&&E("Syntax error"),"function"==typeof a?function n(f,_){var y,w,P=f[_];if(P&&"object"==typeof P)for(y in P)Object.prototype.hasOwnProperty.call(P,y)&&(void 0!==(w=n(P,y))?P[y]=w:delete P[y]);return a.call(f,_,P)}({"":o},""):o}},94642:M=>{var i,S,p,s=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,E={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function l(t){return s.lastIndex=0,s.test(t)?'"'+t.replace(s,function(u){var m=E[u];return"string"==typeof m?m:"\\u"+("0000"+u.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+t+'"'}function e(t,u){var m,h,r,b,o,a=i,n=u[t];switch(n&&"object"==typeof n&&"function"==typeof n.toJSON&&(n=n.toJSON(t)),"function"==typeof p&&(n=p.call(u,t,n)),typeof n){case"string":return l(n);case"number":return isFinite(n)?String(n):"null";case"boolean":case"null":return String(n);case"object":if(!n)return"null";if(i+=S,o=[],"[object Array]"===Object.prototype.toString.apply(n)){for(b=n.length,m=0;m{M.exports=s(21983)(s(14748))},21983:(M,g,s)=>{const i=s(66247),S=s(40948);M.exports=function(E){const p=i(E),l=S(E);return function(e,t){switch("string"==typeof e?e.toLowerCase():e){case"keccak224":return new p(1152,448,null,224,t);case"keccak256":return new p(1088,512,null,256,t);case"keccak384":return new p(832,768,null,384,t);case"keccak512":return new p(576,1024,null,512,t);case"sha3-224":return new p(1152,448,6,224,t);case"sha3-256":return new p(1088,512,6,256,t);case"sha3-384":return new p(832,768,6,384,t);case"sha3-512":return new p(576,1024,6,512,t);case"shake128":return new l(1344,256,31,t);case"shake256":return new l(1088,512,31,t);default:throw new Error("Invald algorithm: "+e)}}}},66247:(M,g,s)=>{const{Transform:i}=s(23225);M.exports=S=>class ut extends i{constructor(p,l,e,t,u){super(u),this._rate=p,this._capacity=l,this._delimitedSuffix=e,this._hashBitLength=t,this._options=u,this._state=new S,this._state.initialize(p,l),this._finalized=!1}_transform(p,l,e){let t=null;try{this.update(p,l)}catch(u){t=u}e(t)}_flush(p){let l=null;try{this.push(this.digest())}catch(e){l=e}p(l)}update(p,l){if(!Buffer.isBuffer(p)&&"string"!=typeof p)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return Buffer.isBuffer(p)||(p=Buffer.from(p,l)),this._state.absorb(p),this}digest(p){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let l=this._state.squeeze(this._hashBitLength/8);return void 0!==p&&(l=l.toString(p)),this._resetState(),l}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const p=new ut(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(p._state),p._finalized=this._finalized,p}}},40948:(M,g,s)=>{const{Transform:i}=s(23225);M.exports=S=>class lt extends i{constructor(p,l,e,t){super(t),this._rate=p,this._capacity=l,this._delimitedSuffix=e,this._options=t,this._state=new S,this._state.initialize(p,l),this._finalized=!1}_transform(p,l,e){let t=null;try{this.update(p,l)}catch(u){t=u}e(t)}_flush(){}_read(p){this.push(this.squeeze(p))}update(p,l){if(!Buffer.isBuffer(p)&&"string"!=typeof p)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return Buffer.isBuffer(p)||(p=Buffer.from(p,l)),this._state.absorb(p),this}squeeze(p,l){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let e=this._state.squeeze(p);return void 0!==l&&(e=e.toString(l)),e}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const p=new lt(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(p._state),p._finalized=this._finalized,p}}},86321:(M,g)=>{const s=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];g.p1600=function(i){for(let S=0;S<24;++S){const E=i[0]^i[10]^i[20]^i[30]^i[40],p=i[1]^i[11]^i[21]^i[31]^i[41],l=i[2]^i[12]^i[22]^i[32]^i[42],e=i[3]^i[13]^i[23]^i[33]^i[43],t=i[4]^i[14]^i[24]^i[34]^i[44],u=i[5]^i[15]^i[25]^i[35]^i[45],m=i[6]^i[16]^i[26]^i[36]^i[46],h=i[7]^i[17]^i[27]^i[37]^i[47],r=i[8]^i[18]^i[28]^i[38]^i[48],b=i[9]^i[19]^i[29]^i[39]^i[49];let a=r^(l<<1|e>>>31),o=b^(e<<1|l>>>31);const n=i[0]^a,f=i[1]^o,_=i[10]^a,y=i[11]^o,w=i[20]^a,P=i[21]^o,C=i[30]^a,U=i[31]^o,O=i[40]^a,H=i[41]^o;a=E^(t<<1|u>>>31),o=p^(u<<1|t>>>31);const R=i[2]^a,Y=i[3]^o,G=i[12]^a,re=i[13]^o,te=i[22]^a,W=i[23]^o,ie=i[32]^a,J=i[33]^o,ee=i[42]^a,Q=i[43]^o;a=l^(m<<1|h>>>31),o=e^(h<<1|m>>>31);const X=i[4]^a,F=i[5]^o,K=i[14]^a,x=i[15]^o,j=i[24]^a,L=i[25]^o,D=i[34]^a,V=i[35]^o,q=i[44]^a,A=i[45]^o;a=t^(r<<1|b>>>31),o=u^(b<<1|r>>>31);const v=i[6]^a,T=i[7]^o,I=i[16]^a,k=i[17]^o,c=i[26]^a,d=i[27]^o,B=i[36]^a,z=i[37]^o,oe=i[46]^a,ne=i[47]^o;a=m^(E<<1|p>>>31),o=h^(p<<1|E>>>31);const N=i[8]^a,he=i[9]^o,ye=i[18]^a,pe=i[19]^o,be=i[28]^a,$=i[29]^o,Z=i[38]^a,ae=i[39]^o,fe=i[48]^a,se=i[49]^o,le=n,ue=f,de=y<<4|_>>>28,ce=_<<4|y>>>28,ge=w<<3|P>>>29,ve=P<<3|w>>>29,Ee=U<<9|C>>>23,me=C<<9|U>>>23,_e=O<<18|H>>>14,we=H<<18|O>>>14,Se=R<<1|Y>>>31,Ae=Y<<1|R>>>31,Re=re<<12|G>>>20,Oe=G<<12|re>>>20,xe=te<<10|W>>>22,Te=W<<10|te>>>22,Pe=J<<13|ie>>>19,je=ie<<13|J>>>19,Ie=ee<<2|Q>>>30,Ce=Q<<2|ee>>>30,Me=F<<30|X>>>2,Ne=X<<30|F>>>2,Le=K<<6|x>>>26,Be=x<<6|K>>>26,De=L<<11|j>>>21,Ue=j<<11|L>>>21,Fe=D<<15|V>>>17,ke=V<<15|D>>>17,He=A<<29|q>>>3,We=q<<29|A>>>3,Ve=v<<28|T>>>4,ze=T<<28|v>>>4,Ge=k<<23|I>>>9,qe=I<<23|k>>>9,Ke=c<<25|d>>>7,$e=d<<25|c>>>7,Ye=B<<21|z>>>11,Je=z<<21|B>>>11,Xe=ne<<24|oe>>>8,Ze=oe<<24|ne>>>8,Qe=N<<27|he>>>5,et=he<<27|N>>>5,tt=ye<<20|pe>>>12,rt=pe<<20|ye>>>12,nt=$<<7|be>>>25,it=be<<7|$>>>25,ot=Z<<8|ae>>>24,at=ae<<8|Z>>>24,st=fe<<14|se>>>18,ft=se<<14|fe>>>18;i[0]=le^~Re&De,i[1]=ue^~Oe&Ue,i[10]=Ve^~tt&ge,i[11]=ze^~rt&ve,i[20]=Se^~Le&Ke,i[21]=Ae^~Be&$e,i[30]=Qe^~de&xe,i[31]=et^~ce&Te,i[40]=Me^~Ge&nt,i[41]=Ne^~qe&it,i[2]=Re^~De&Ye,i[3]=Oe^~Ue&Je,i[12]=tt^~ge&Pe,i[13]=rt^~ve&je,i[22]=Le^~Ke&ot,i[23]=Be^~$e&at,i[32]=de^~xe&Fe,i[33]=ce^~Te&ke,i[42]=Ge^~nt&Ee,i[43]=qe^~it&me,i[4]=De^~Ye&st,i[5]=Ue^~Je&ft,i[14]=ge^~Pe&He,i[15]=ve^~je&We,i[24]=Ke^~ot&_e,i[25]=$e^~at&we,i[34]=xe^~Fe&Xe,i[35]=Te^~ke&Ze,i[44]=nt^~Ee&Ie,i[45]=it^~me&Ce,i[6]=Ye^~st&le,i[7]=Je^~ft&ue,i[16]=Pe^~He&Ve,i[17]=je^~We&ze,i[26]=ot^~_e&Se,i[27]=at^~we&Ae,i[36]=Fe^~Xe&Qe,i[37]=ke^~Ze&et,i[46]=Ee^~Ie&Me,i[47]=me^~Ce&Ne,i[8]=st^~le&Re,i[9]=ft^~ue&Oe,i[18]=He^~Ve&tt,i[19]=We^~ze&rt,i[28]=_e^~Se&Le,i[29]=we^~Ae&Be,i[38]=Xe^~Qe&de,i[39]=Ze^~et&ce,i[48]=Ie^~Me&Ge,i[49]=Ce^~Ne&qe,i[0]^=s[2*S],i[1]^=s[2*S+1]}}},14748:(M,g,s)=>{const i=s(86321);function S(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}S.prototype.initialize=function(E,p){for(let l=0;l<50;++l)this.state[l]=0;this.blockSize=E/8,this.count=0,this.squeezing=!1},S.prototype.absorb=function(E){for(let p=0;p>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(i.p1600(this.state),this.count=0);return p},S.prototype.copy=function(E){for(let p=0;p<50;++p)E.state[p]=this.state[p];E.blockSize=this.blockSize,E.count=this.count,E.squeezing=this.squeezing},M.exports=S},31385:(M,g,s)=>{"use strict";var i=s(61390),S=s(60942),E=s(5214).Buffer,p=new Array(16);function l(){S.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function e(r,b){return r<>>32-b}function t(r,b,a,o,n,f,_){return e(r+(b&a|~b&o)+n+f|0,_)+b|0}function u(r,b,a,o,n,f,_){return e(r+(b&o|a&~o)+n+f|0,_)+b|0}function m(r,b,a,o,n,f,_){return e(r+(b^a^o)+n+f|0,_)+b|0}function h(r,b,a,o,n,f,_){return e(r+(a^(b|~o))+n+f|0,_)+b|0}i(l,S),l.prototype._update=function(){for(var r=p,b=0;b<16;++b)r[b]=this._block.readInt32LE(4*b);var a=this._a,o=this._b,n=this._c,f=this._d;a=t(a,o,n,f,r[0],3614090360,7),f=t(f,a,o,n,r[1],3905402710,12),n=t(n,f,a,o,r[2],606105819,17),o=t(o,n,f,a,r[3],3250441966,22),a=t(a,o,n,f,r[4],4118548399,7),f=t(f,a,o,n,r[5],1200080426,12),n=t(n,f,a,o,r[6],2821735955,17),o=t(o,n,f,a,r[7],4249261313,22),a=t(a,o,n,f,r[8],1770035416,7),f=t(f,a,o,n,r[9],2336552879,12),n=t(n,f,a,o,r[10],4294925233,17),o=t(o,n,f,a,r[11],2304563134,22),a=t(a,o,n,f,r[12],1804603682,7),f=t(f,a,o,n,r[13],4254626195,12),n=t(n,f,a,o,r[14],2792965006,17),a=u(a,o=t(o,n,f,a,r[15],1236535329,22),n,f,r[1],4129170786,5),f=u(f,a,o,n,r[6],3225465664,9),n=u(n,f,a,o,r[11],643717713,14),o=u(o,n,f,a,r[0],3921069994,20),a=u(a,o,n,f,r[5],3593408605,5),f=u(f,a,o,n,r[10],38016083,9),n=u(n,f,a,o,r[15],3634488961,14),o=u(o,n,f,a,r[4],3889429448,20),a=u(a,o,n,f,r[9],568446438,5),f=u(f,a,o,n,r[14],3275163606,9),n=u(n,f,a,o,r[3],4107603335,14),o=u(o,n,f,a,r[8],1163531501,20),a=u(a,o,n,f,r[13],2850285829,5),f=u(f,a,o,n,r[2],4243563512,9),n=u(n,f,a,o,r[7],1735328473,14),a=m(a,o=u(o,n,f,a,r[12],2368359562,20),n,f,r[5],4294588738,4),f=m(f,a,o,n,r[8],2272392833,11),n=m(n,f,a,o,r[11],1839030562,16),o=m(o,n,f,a,r[14],4259657740,23),a=m(a,o,n,f,r[1],2763975236,4),f=m(f,a,o,n,r[4],1272893353,11),n=m(n,f,a,o,r[7],4139469664,16),o=m(o,n,f,a,r[10],3200236656,23),a=m(a,o,n,f,r[13],681279174,4),f=m(f,a,o,n,r[0],3936430074,11),n=m(n,f,a,o,r[3],3572445317,16),o=m(o,n,f,a,r[6],76029189,23),a=m(a,o,n,f,r[9],3654602809,4),f=m(f,a,o,n,r[12],3873151461,11),n=m(n,f,a,o,r[15],530742520,16),a=h(a,o=m(o,n,f,a,r[2],3299628645,23),n,f,r[0],4096336452,6),f=h(f,a,o,n,r[7],1126891415,10),n=h(n,f,a,o,r[14],2878612391,15),o=h(o,n,f,a,r[5],4237533241,21),a=h(a,o,n,f,r[12],1700485571,6),f=h(f,a,o,n,r[3],2399980690,10),n=h(n,f,a,o,r[10],4293915773,15),o=h(o,n,f,a,r[1],2240044497,21),a=h(a,o,n,f,r[8],1873313359,6),f=h(f,a,o,n,r[15],4264355552,10),n=h(n,f,a,o,r[6],2734768916,15),o=h(o,n,f,a,r[13],1309151649,21),a=h(a,o,n,f,r[4],4149444226,6),f=h(f,a,o,n,r[11],3174756917,10),n=h(n,f,a,o,r[2],718787259,15),o=h(o,n,f,a,r[9],3951481745,21),this._a=this._a+a|0,this._b=this._b+o|0,this._c=this._c+n|0,this._d=this._d+f|0},l.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var r=E.allocUnsafe(16);return r.writeInt32LE(this._a,0),r.writeInt32LE(this._b,4),r.writeInt32LE(this._c,8),r.writeInt32LE(this._d,12),r},M.exports=l},36545:function(M,g,s){var i;M=s.nmd(M),function(S){"object"==typeof global&&global;var e,t=2147483647,u=36,f=/^xn--/,_=/[^\x20-\x7E]/,y=/[\x2E\u3002\uFF0E\uFF61]/g,w={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},C=Math.floor,U=String.fromCharCode;function H(F){throw RangeError(w[F])}function R(F,K){for(var x=F.length,j=[];x--;)j[x]=K(F[x]);return j}function Y(F,K){var x=F.split("@"),j="";return x.length>1&&(j=x[0]+"@",F=x[1]),j+R((F=F.replace(y,".")).split("."),K).join(".")}function G(F){for(var L,D,K=[],x=0,j=F.length;x=55296&&L<=56319&&x65535&&(x+=U((K-=65536)>>>10&1023|55296),K=56320|1023&K),x+U(K)}).join("")}function te(F){return F-48<10?F-22:F-65<26?F-65:F-97<26?F-97:u}function W(F,K){return F+22+75*(F<26)-((0!=K)<<5)}function ie(F,K,x){var j=0;for(F=x?C(F/700):F>>1,F+=C(F/K);F>455;j+=u)F=C(F/35);return C(j+36*F/(F+38))}function J(F){var j,q,A,v,T,I,k,c,d,B,K=[],x=F.length,L=0,D=128,V=72;for((q=F.lastIndexOf("-"))<0&&(q=0),A=0;A=128&&H("not-basic"),K.push(F.charCodeAt(A));for(v=q>0?q+1:0;v=x&&H("invalid-input"),((c=te(F.charCodeAt(v++)))>=u||c>C((t-L)/I))&&H("overflow"),L+=c*I,!(c<(d=k<=V?1:k>=V+26?26:k-V));k+=u)I>C(t/(B=u-d))&&H("overflow"),I*=B;V=ie(L-T,j=K.length+1,0==T),C(L/j)>t-D&&H("overflow"),D+=C(L/j),L%=j,K.splice(L++,0,D)}return re(K)}function ee(F){var K,x,j,L,D,V,q,A,v,T,I,c,d,B,z,k=[];for(c=(F=G(F)).length,K=128,x=0,D=72,V=0;V=K&&IC((t-x)/(d=j+1))&&H("overflow"),x+=(q-K)*d,K=q,V=0;Vt&&H("overflow"),I==K){for(A=x,v=u;!(A<(T=v<=D?1:v>=D+26?26:v-D));v+=u)k.push(U(W(T+(z=A-T)%(B=u-T),0))),A=C(z/B);k.push(U(W(A,0))),D=ie(x,d,j==L),x=0,++j}++x,++K}return k.join("")}e={version:"1.3.2",ucs2:{decode:G,encode:re},decode:J,encode:ee,toASCII:function X(F){return Y(F,function(K){return _.test(K)?"xn--"+ee(K):K})},toUnicode:function Q(F){return Y(F,function(K){return f.test(K)?J(K.slice(4).toLowerCase()):K})}},void 0!==(i=function(){return e}.call(g,s,g,M))&&(M.exports=i)}()},54504:M=>{"use strict";function g(s,i){return Object.prototype.hasOwnProperty.call(s,i)}M.exports=function(s,i,S,E){S=S||"=";var p={};if("string"!=typeof s||0===s.length)return p;var l=/\+/g;s=s.split(i=i||"&");var e=1e3;E&&"number"==typeof E.maxKeys&&(e=E.maxKeys);var t=s.length;e>0&&t>e&&(t=e);for(var u=0;u=0?(r=m.substr(0,h),b=m.substr(h+1)):(r=m,b=""),a=decodeURIComponent(r),o=decodeURIComponent(b),g(p,a)?Array.isArray(p[a])?p[a].push(o):p[a]=[p[a],o]:p[a]=o}return p}},27740:M=>{"use strict";var g=function(s){switch(typeof s){case"string":return s;case"boolean":return s?"true":"false";case"number":return isFinite(s)?s:"";default:return""}};M.exports=function(s,i,S,E){return i=i||"&",S=S||"=",null===s&&(s=void 0),"object"==typeof s?Object.keys(s).map(function(p){var l=encodeURIComponent(g(p))+S;return Array.isArray(s[p])?s[p].map(function(e){return l+encodeURIComponent(g(e))}).join(i):l+encodeURIComponent(g(s[p]))}).join(i):E?encodeURIComponent(g(E))+S+encodeURIComponent(g(s)):""}},25302:(M,g,s)=>{"use strict";g.decode=g.parse=s(54504),g.encode=g.stringify=s(27740)},67505:(M,g,s)=>{"use strict";var i=65536,p=s(5214).Buffer,l=global.crypto||global.msCrypto;M.exports=l&&l.getRandomValues?function e(t,u){if(t>4294967295)throw new RangeError("requested too many random bytes");var m=p.allocUnsafe(t);if(t>0)if(t>i)for(var h=0;h{"use strict";var s={};function i(e,t,u){u||(u=Error);var h=function(r){function b(a,o,n){return r.call(this,function m(r,b,a){return"string"==typeof t?t:t(r,b,a)}(a,o,n))||this}return function g(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(b,r),b}(u);h.prototype.name=u.name,h.prototype.code=e,s[e]=h}function S(e,t){if(Array.isArray(e)){var u=e.length;return e=e.map(function(m){return String(m)}),u>2?"one of ".concat(t," ").concat(e.slice(0,u-1).join(", "),", or ")+e[u-1]:2===u?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),i("ERR_INVALID_ARG_TYPE",function(e,t,u){var m,h;if("string"==typeof t&&function E(e,t,u){return e.substr(!u||u<0?0:+u,t.length)===t}(t,"not ")?(m="must not be",t=t.replace(/^not /,"")):m="must be",function p(e,t,u){return(void 0===u||u>e.length)&&(u=e.length),e.substring(u-t.length,u)===t}(e," argument"))h="The ".concat(e," ").concat(m," ").concat(S(t,"type"));else{var r=function l(e,t,u){return"number"!=typeof u&&(u=0),!(u+t.length>e.length)&&-1!==e.indexOf(t,u)}(e,".")?"property":"argument";h='The "'.concat(e,'" ').concat(r," ").concat(m," ").concat(S(t,"type"))}return h+". Received type ".concat(typeof u)},TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),M.exports.q=s},81492:(M,g,s)=>{"use strict";var i=Object.keys||function(h){var r=[];for(var b in h)r.push(b);return r};M.exports=t;var S=s(70999),E=s(58736);s(61390)(t,S);for(var p=i(E.prototype),l=0;l{"use strict";M.exports=S;var i=s(20651);function S(E){if(!(this instanceof S))return new S(E);i.call(this,E)}s(61390)(S,i),S.prototype._transform=function(E,p,l){l(null,E)}},70999:(M,g,s)=>{"use strict";var i;M.exports=G,G.ReadableState=Y,s(2272);var h,E=function(d,B){return d.listeners(B).length},p=s(94149),l=s(44381).Buffer,e=global.Uint8Array||function(){},m=s(13527);h=m&&m.debuglog?m.debuglog("stream"):function(){};var P,C,U,r=s(67600),b=s(38387),o=s(30689).getHighWaterMark,n=s(36899).q,f=n.ERR_INVALID_ARG_TYPE,_=n.ERR_STREAM_PUSH_AFTER_EOF,y=n.ERR_METHOD_NOT_IMPLEMENTED,w=n.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;s(61390)(G,p);var O=b.errorOrDestroy,H=["error","close","destroy","pause","resume"];function Y(c,d,B){i=i||s(81492),"boolean"!=typeof B&&(B=d instanceof i),this.objectMode=!!(c=c||{}).objectMode,B&&(this.objectMode=this.objectMode||!!c.readableObjectMode),this.highWaterMark=o(this,c,"readableHighWaterMark",B),this.buffer=new r,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==c.emitClose,this.autoDestroy=!!c.autoDestroy,this.destroyed=!1,this.defaultEncoding=c.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,c.encoding&&(P||(P=s(77195).s),this.decoder=new P(c.encoding),this.encoding=c.encoding)}function G(c){if(i=i||s(81492),!(this instanceof G))return new G(c);this._readableState=new Y(c,this,this instanceof i),this.readable=!0,c&&("function"==typeof c.read&&(this._read=c.read),"function"==typeof c.destroy&&(this._destroy=c.destroy)),p.call(this)}function re(c,d,B,z,oe){h("readableAddChunk",d);var N,ne=c._readableState;if(null===d)ne.reading=!1,function Q(c,d){if(h("onEofChunk"),!d.ended){if(d.decoder){var B=d.decoder.end();B&&B.length&&(d.buffer.push(B),d.length+=d.objectMode?1:B.length)}d.ended=!0,d.sync?X(c):(d.needReadable=!1,d.emittedReadable||(d.emittedReadable=!0,F(c)))}}(c,ne);else if(oe||(N=function W(c,d){var B;return!function u(c){return l.isBuffer(c)||c instanceof e}(d)&&"string"!=typeof d&&void 0!==d&&!c.objectMode&&(B=new f("chunk",["string","Buffer","Uint8Array"],d)),B}(ne,d)),N)O(c,N);else if(ne.objectMode||d&&d.length>0)if("string"!=typeof d&&!ne.objectMode&&Object.getPrototypeOf(d)!==l.prototype&&(d=function t(c){return l.from(c)}(d)),z)ne.endEmitted?O(c,new w):te(c,ne,d,!0);else if(ne.ended)O(c,new _);else{if(ne.destroyed)return!1;ne.reading=!1,ne.decoder&&!B?(d=ne.decoder.write(d),ne.objectMode||0!==d.length?te(c,ne,d,!1):K(c,ne)):te(c,ne,d,!1)}else z||(ne.reading=!1,K(c,ne));return!ne.ended&&(ne.lengthd.highWaterMark&&(d.highWaterMark=function J(c){return c>=ie?c=ie:(c--,c|=c>>>1,c|=c>>>2,c|=c>>>4,c|=c>>>8,c|=c>>>16,c++),c}(c)),c<=d.length?c:d.ended?d.length:(d.needReadable=!0,0))}function X(c){var d=c._readableState;h("emitReadable",d.needReadable,d.emittedReadable),d.needReadable=!1,d.emittedReadable||(h("emitReadable",d.flowing),d.emittedReadable=!0,process.nextTick(F,c))}function F(c){var d=c._readableState;h("emitReadable_",d.destroyed,d.length,d.ended),!d.destroyed&&(d.length||d.ended)&&(c.emit("readable"),d.emittedReadable=!1),d.needReadable=!d.flowing&&!d.ended&&d.length<=d.highWaterMark,A(c)}function K(c,d){d.readingMore||(d.readingMore=!0,process.nextTick(x,c,d))}function x(c,d){for(;!d.reading&&!d.ended&&(d.length0,d.resumeScheduled&&!d.paused?d.flowing=!0:c.listenerCount("data")>0&&c.resume()}function D(c){h("readable nexttick read 0"),c.read(0)}function q(c,d){h("resume",d.reading),d.reading||c.read(0),d.resumeScheduled=!1,c.emit("resume"),A(c),d.flowing&&!d.reading&&c.read(0)}function A(c){var d=c._readableState;for(h("flow",d.flowing);d.flowing&&null!==c.read(););}function v(c,d){return 0===d.length?null:(d.objectMode?B=d.buffer.shift():!c||c>=d.length?(B=d.decoder?d.buffer.join(""):1===d.buffer.length?d.buffer.first():d.buffer.concat(d.length),d.buffer.clear()):B=d.buffer.consume(c,d.decoder),B);var B}function T(c){var d=c._readableState;h("endReadable",d.endEmitted),d.endEmitted||(d.ended=!0,process.nextTick(I,d,c))}function I(c,d){if(h("endReadableNT",c.endEmitted,c.length),!c.endEmitted&&0===c.length&&(c.endEmitted=!0,d.readable=!1,d.emit("end"),c.autoDestroy)){var B=d._writableState;(!B||B.autoDestroy&&B.finished)&&d.destroy()}}function k(c,d){for(var B=0,z=c.length;B=d.highWaterMark:d.length>0)||d.ended))return h("read: emitReadable",d.length,d.ended),0===d.length&&d.ended?T(this):X(this),null;if(0===(c=ee(c,d))&&d.ended)return 0===d.length&&T(this),null;var oe,z=d.needReadable;return h("need readable",z),(0===d.length||d.length-c0?v(c,d):null)?(d.needReadable=d.length<=d.highWaterMark,c=0):(d.length-=c,d.awaitDrain=0),0===d.length&&(d.ended||(d.needReadable=!0),B!==c&&d.ended&&T(this)),null!==oe&&this.emit("data",oe),oe},G.prototype._read=function(c){O(this,new y("_read()"))},G.prototype.pipe=function(c,d){var B=this,z=this._readableState;switch(z.pipesCount){case 0:z.pipes=c;break;case 1:z.pipes=[z.pipes,c];break;default:z.pipes.push(c)}z.pipesCount+=1,h("pipe count=%d opts=%j",z.pipesCount,d);var ne=d&&!1===d.end||c===process.stdout||c===process.stderr?se:he;function he(){h("onend"),c.end()}z.endEmitted?process.nextTick(ne):B.once("end",ne),c.on("unpipe",function N(le,ue){h("onunpipe"),le===B&&ue&&!1===ue.hasUnpiped&&(ue.hasUnpiped=!0,function be(){h("cleanup"),c.removeListener("close",ae),c.removeListener("finish",fe),c.removeListener("drain",ye),c.removeListener("error",Z),c.removeListener("unpipe",N),B.removeListener("end",he),B.removeListener("end",se),B.removeListener("data",$),pe=!0,z.awaitDrain&&(!c._writableState||c._writableState.needDrain)&&ye()}())});var ye=function j(c){return function(){var B=c._readableState;h("pipeOnDrain",B.awaitDrain),B.awaitDrain&&B.awaitDrain--,0===B.awaitDrain&&E(c,"data")&&(B.flowing=!0,A(c))}}(B);c.on("drain",ye);var pe=!1;function $(le){h("ondata");var ue=c.write(le);h("dest.write",ue),!1===ue&&((1===z.pipesCount&&z.pipes===c||z.pipesCount>1&&-1!==k(z.pipes,c))&&!pe&&(h("false write response, pause",z.awaitDrain),z.awaitDrain++),B.pause())}function Z(le){h("onerror",le),se(),c.removeListener("error",Z),0===E(c,"error")&&O(c,le)}function ae(){c.removeListener("finish",fe),se()}function fe(){h("onfinish"),c.removeListener("close",ae),se()}function se(){h("unpipe"),B.unpipe(c)}return B.on("data",$),function R(c,d,B){if("function"==typeof c.prependListener)return c.prependListener(d,B);c._events&&c._events[d]?Array.isArray(c._events[d])?c._events[d].unshift(B):c._events[d]=[B,c._events[d]]:c.on(d,B)}(c,"error",Z),c.once("close",ae),c.once("finish",fe),c.emit("pipe",B),z.flowing||(h("pipe resume"),B.resume()),c},G.prototype.unpipe=function(c){var d=this._readableState,B={hasUnpiped:!1};if(0===d.pipesCount)return this;if(1===d.pipesCount)return c&&c!==d.pipes||(c||(c=d.pipes),d.pipes=null,d.pipesCount=0,d.flowing=!1,c&&c.emit("unpipe",this,B)),this;if(!c){var z=d.pipes,oe=d.pipesCount;d.pipes=null,d.pipesCount=0,d.flowing=!1;for(var ne=0;ne0,!1!==z.flowing&&this.resume()):"readable"===c&&!z.endEmitted&&!z.readableListening&&(z.readableListening=z.needReadable=!0,z.flowing=!1,z.emittedReadable=!1,h("on readable",z.length,z.reading),z.length?X(this):z.reading||process.nextTick(D,this)),B},G.prototype.removeListener=function(c,d){var B=p.prototype.removeListener.call(this,c,d);return"readable"===c&&process.nextTick(L,this),B},G.prototype.removeAllListeners=function(c){var d=p.prototype.removeAllListeners.apply(this,arguments);return("readable"===c||void 0===c)&&process.nextTick(L,this),d},G.prototype.resume=function(){var c=this._readableState;return c.flowing||(h("resume"),c.flowing=!c.readableListening,function V(c,d){d.resumeScheduled||(d.resumeScheduled=!0,process.nextTick(q,c,d))}(this,c)),c.paused=!1,this},G.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},G.prototype.wrap=function(c){var d=this,B=this._readableState,z=!1;for(var oe in c.on("end",function(){if(h("wrapped end"),B.decoder&&!B.ended){var N=B.decoder.end();N&&N.length&&d.push(N)}d.push(null)}),c.on("data",function(N){h("wrapped data"),B.decoder&&(N=B.decoder.write(N)),B.objectMode&&null==N||!(B.objectMode||N&&N.length)||d.push(N)||(z=!0,c.pause())}),c)void 0===this[oe]&&"function"==typeof c[oe]&&(this[oe]=function(he){return function(){return c[he].apply(c,arguments)}}(oe));for(var ne=0;ne{"use strict";M.exports=u;var i=s(36899).q,S=i.ERR_METHOD_NOT_IMPLEMENTED,E=i.ERR_MULTIPLE_CALLBACK,p=i.ERR_TRANSFORM_ALREADY_TRANSFORMING,l=i.ERR_TRANSFORM_WITH_LENGTH_0,e=s(81492);function t(r,b){var a=this._transformState;a.transforming=!1;var o=a.writecb;if(null===o)return this.emit("error",new E);a.writechunk=null,a.writecb=null,null!=b&&this.push(b),o(r);var n=this._readableState;n.reading=!1,(n.needReadable||n.length{"use strict";function S(A){var v=this;this.next=null,this.entry=null,this.finish=function(){!function q(A,v,T){var I=A.entry;for(A.entry=null;I;){var k=I.callback;v.pendingcb--,k(T),I=I.next}v.corkedRequestsFree.next=A}(v,A)}}var E;M.exports=Y,Y.WritableState=H;var R,p={deprecate:s(12779)},l=s(94149),e=s(44381).Buffer,t=global.Uint8Array||function(){},h=s(38387),b=s(30689).getHighWaterMark,a=s(36899).q,o=a.ERR_INVALID_ARG_TYPE,n=a.ERR_METHOD_NOT_IMPLEMENTED,f=a.ERR_MULTIPLE_CALLBACK,_=a.ERR_STREAM_CANNOT_PIPE,y=a.ERR_STREAM_DESTROYED,w=a.ERR_STREAM_NULL_VALUES,P=a.ERR_STREAM_WRITE_AFTER_END,C=a.ERR_UNKNOWN_ENCODING,U=h.errorOrDestroy;function O(){}function H(A,v,T){E=E||s(81492),"boolean"!=typeof T&&(T=v instanceof E),this.objectMode=!!(A=A||{}).objectMode,T&&(this.objectMode=this.objectMode||!!A.writableObjectMode),this.highWaterMark=b(this,A,"writableHighWaterMark",T),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1,this.decodeStrings=!(!1===A.decodeStrings),this.defaultEncoding=A.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(k){!function Q(A,v){var T=A._writableState,I=T.sync,k=T.writecb;if("function"!=typeof k)throw new f;if(function ee(A){A.writing=!1,A.writecb=null,A.length-=A.writelen,A.writelen=0}(T),v)!function J(A,v,T,I,k){--v.pendingcb,T?(process.nextTick(k,I),process.nextTick(D,A,v),A._writableState.errorEmitted=!0,U(A,I)):(k(I),A._writableState.errorEmitted=!0,U(A,I),D(A,v))}(A,T,I,v,k);else{var c=x(T)||A.destroyed;!c&&!T.corked&&!T.bufferProcessing&&T.bufferedRequest&&K(A,T),I?process.nextTick(X,A,T,c,k):X(A,T,c,k)}}(v,k)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==A.emitClose,this.autoDestroy=!!A.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new S(this)}function Y(A){var v=this instanceof(E=E||s(81492));if(!v&&!R.call(Y,this))return new Y(A);this._writableState=new H(A,this,v),this.writable=!0,A&&("function"==typeof A.write&&(this._write=A.write),"function"==typeof A.writev&&(this._writev=A.writev),"function"==typeof A.destroy&&(this._destroy=A.destroy),"function"==typeof A.final&&(this._final=A.final)),l.call(this)}function ie(A,v,T,I,k,c,d){v.writelen=I,v.writecb=d,v.writing=!0,v.sync=!0,v.destroyed?v.onwrite(new y("write")):T?A._writev(k,v.onwrite):A._write(k,c,v.onwrite),v.sync=!1}function X(A,v,T,I){T||function F(A,v){0===v.length&&v.needDrain&&(v.needDrain=!1,A.emit("drain"))}(A,v),v.pendingcb--,I(),D(A,v)}function K(A,v){v.bufferProcessing=!0;var T=v.bufferedRequest;if(A._writev&&T&&T.next){var k=new Array(v.bufferedRequestCount),c=v.corkedRequestsFree;c.entry=T;for(var d=0,B=!0;T;)k[d]=T,T.isBuf||(B=!1),T=T.next,d+=1;k.allBuffers=B,ie(A,v,!0,v.length,k,"",c.finish),v.pendingcb++,v.lastBufferedRequest=null,c.next?(v.corkedRequestsFree=c.next,c.next=null):v.corkedRequestsFree=new S(v),v.bufferedRequestCount=0}else{for(;T;){var z=T.chunk;if(ie(A,v,!1,v.objectMode?1:z.length,z,T.encoding,T.callback),T=T.next,v.bufferedRequestCount--,v.writing)break}null===T&&(v.lastBufferedRequest=null)}v.bufferedRequest=T,v.bufferProcessing=!1}function x(A){return A.ending&&0===A.length&&null===A.bufferedRequest&&!A.finished&&!A.writing}function j(A,v){A._final(function(T){v.pendingcb--,T&&U(A,T),v.prefinished=!0,A.emit("prefinish"),D(A,v)})}function D(A,v){var T=x(v);if(T&&(function L(A,v){!v.prefinished&&!v.finalCalled&&("function"!=typeof A._final||v.destroyed?(v.prefinished=!0,A.emit("prefinish")):(v.pendingcb++,v.finalCalled=!0,process.nextTick(j,A,v)))}(A,v),0===v.pendingcb&&(v.finished=!0,A.emit("finish"),v.autoDestroy))){var I=A._readableState;(!I||I.autoDestroy&&I.endEmitted)&&A.destroy()}return T}s(61390)(Y,l),H.prototype.getBuffer=function(){for(var v=this.bufferedRequest,T=[];v;)T.push(v),v=v.next;return T},function(){try{Object.defineProperty(H.prototype,"buffer",{get:p.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(R=Function.prototype[Symbol.hasInstance],Object.defineProperty(Y,Symbol.hasInstance,{value:function(v){return!!R.call(this,v)||this===Y&&v&&v._writableState instanceof H}})):R=function(v){return v instanceof this},Y.prototype.pipe=function(){U(this,new _)},Y.prototype.write=function(A,v,T){var I=this._writableState,k=!1,c=!I.objectMode&&function m(A){return e.isBuffer(A)||A instanceof t}(A);return c&&!e.isBuffer(A)&&(A=function u(A){return e.from(A)}(A)),"function"==typeof v&&(T=v,v=null),c?v="buffer":v||(v=I.defaultEncoding),"function"!=typeof T&&(T=O),I.ending?function G(A,v){var T=new P;U(A,T),process.nextTick(v,T)}(this,T):(c||function re(A,v,T,I){var k;return null===T?k=new w:"string"!=typeof T&&!v.objectMode&&(k=new o("chunk",["string","Buffer"],T)),!k||(U(A,k),process.nextTick(I,k),!1)}(this,I,A,T))&&(I.pendingcb++,k=function W(A,v,T,I,k,c){if(!T){var d=function te(A,v,T){return!A.objectMode&&!1!==A.decodeStrings&&"string"==typeof v&&(v=e.from(v,T)),v}(v,I,k);I!==d&&(T=!0,k="buffer",I=d)}var B=v.objectMode?1:I.length;v.length+=B;var z=v.length-1))throw new C(v);return this._writableState.defaultEncoding=v,this},Object.defineProperty(Y.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Y.prototype._write=function(A,v,T){T(new n("_write()"))},Y.prototype._writev=null,Y.prototype.end=function(A,v,T){var I=this._writableState;return"function"==typeof A?(T=A,A=null,v=null):"function"==typeof v&&(T=v,v=null),null!=A&&this.write(A,v),I.corked&&(I.corked=1,this.uncork()),I.ending||function V(A,v,T){v.ending=!0,D(A,v),T&&(v.finished?process.nextTick(T):A.once("finish",T)),v.ended=!0,A.writable=!1}(this,I,T),this},Object.defineProperty(Y.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(Y.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(v){!this._writableState||(this._writableState.destroyed=v)}}),Y.prototype.destroy=h.destroy,Y.prototype._undestroy=h.undestroy,Y.prototype._destroy=function(A,v){v(A)}},26032:(M,g,s)=>{"use strict";var i;function S(y,w,P){return w in y?Object.defineProperty(y,w,{value:P,enumerable:!0,configurable:!0,writable:!0}):y[w]=P,y}var E=s(27067),p=Symbol("lastResolve"),l=Symbol("lastReject"),e=Symbol("error"),t=Symbol("ended"),u=Symbol("lastPromise"),m=Symbol("handlePromise"),h=Symbol("stream");function r(y,w){return{value:y,done:w}}function b(y){var w=y[p];if(null!==w){var P=y[h].read();null!==P&&(y[u]=null,y[p]=null,y[l]=null,w(r(P,!1)))}}function a(y){process.nextTick(b,y)}var n=Object.getPrototypeOf(function(){}),f=Object.setPrototypeOf((S(i={get stream(){return this[h]},next:function(){var w=this,P=this[e];if(null!==P)return Promise.reject(P);if(this[t])return Promise.resolve(r(void 0,!0));if(this[h].destroyed)return new Promise(function(H,R){process.nextTick(function(){w[e]?R(w[e]):H(r(void 0,!0))})});var U,C=this[u];if(C)U=new Promise(function o(y,w){return function(P,C){y.then(function(){w[t]?P(r(void 0,!0)):w[m](P,C)},C)}}(C,this));else{var O=this[h].read();if(null!==O)return Promise.resolve(r(O,!1));U=new Promise(this[m])}return this[u]=U,U}},Symbol.asyncIterator,function(){return this}),S(i,"return",function(){var w=this;return new Promise(function(P,C){w[h].destroy(null,function(U){U?C(U):P(r(void 0,!0))})})}),i),n);M.exports=function(w){var P,C=Object.create(f,(S(P={},h,{value:w,writable:!0}),S(P,p,{value:null,writable:!0}),S(P,l,{value:null,writable:!0}),S(P,e,{value:null,writable:!0}),S(P,t,{value:w._readableState.endEmitted,writable:!0}),S(P,m,{value:function(O,H){var R=C[h].read();R?(C[u]=null,C[p]=null,C[l]=null,O(r(R,!1))):(C[p]=O,C[l]=H)},writable:!0}),P));return C[u]=null,E(w,function(U){if(U&&"ERR_STREAM_PREMATURE_CLOSE"!==U.code){var O=C[l];return null!==O&&(C[u]=null,C[p]=null,C[l]=null,O(U)),void(C[e]=U)}var H=C[p];null!==H&&(C[u]=null,C[p]=null,C[l]=null,H(r(void 0,!0))),C[t]=!0}),w.on("readable",a.bind(null,C)),C}},67600:(M,g,s)=>{"use strict";function i(a,o){var n=Object.keys(a);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(a);o&&(f=f.filter(function(_){return Object.getOwnPropertyDescriptor(a,_).enumerable})),n.push.apply(n,f)}return n}function E(a,o,n){return o in a?Object.defineProperty(a,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):a[o]=n,a}function l(a,o){for(var n=0;n0?this.tail.next=f:this.head=f,this.tail=f,++this.length}},{key:"unshift",value:function(n){var f={data:n,next:this.head};0===this.length&&(this.tail=f),this.head=f,++this.length}},{key:"shift",value:function(){if(0!==this.length){var n=this.head.data;return this.head=1===this.length?this.tail=null:this.head.next,--this.length,n}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(n){if(0===this.length)return"";for(var f=this.head,_=""+f.data;f=f.next;)_+=n+f.data;return _}},{key:"concat",value:function(n){if(0===this.length)return u.alloc(0);for(var f=u.allocUnsafe(n>>>0),_=this.head,y=0;_;)b(_.data,f,y),y+=_.data.length,_=_.next;return f}},{key:"consume",value:function(n,f){var _;return nw.length?w.length:n;if(y+=P===w.length?w:w.slice(0,n),0==(n-=P)){P===w.length?(++_,this.head=f.next?f.next:this.tail=null):(this.head=f,f.data=w.slice(P));break}++_}return this.length-=_,y}},{key:"_getBuffer",value:function(n){var f=u.allocUnsafe(n),_=this.head,y=1;for(_.data.copy(f),n-=_.data.length;_=_.next;){var w=_.data,P=n>w.length?w.length:n;if(w.copy(f,f.length-n,0,P),0==(n-=P)){P===w.length?(++y,this.head=_.next?_.next:this.tail=null):(this.head=_,_.data=w.slice(P));break}++y}return this.length-=y,f}},{key:r,value:function(n,f){return h(this,function S(a){for(var o=1;o{"use strict";function s(l,e){E(l,e),i(l)}function i(l){l._writableState&&!l._writableState.emitClose||l._readableState&&!l._readableState.emitClose||l.emit("close")}function E(l,e){l.emit("error",e)}M.exports={destroy:function g(l,e){var t=this;return this._readableState&&this._readableState.destroyed||this._writableState&&this._writableState.destroyed?(e?e(l):l&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(E,this,l)):process.nextTick(E,this,l)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(l||null,function(h){!e&&h?t._writableState?t._writableState.errorEmitted?process.nextTick(i,t):(t._writableState.errorEmitted=!0,process.nextTick(s,t,h)):process.nextTick(s,t,h):e?(process.nextTick(i,t),e(h)):process.nextTick(i,t)}),this)},undestroy:function S(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function p(l,e){var t=l._readableState,u=l._writableState;t&&t.autoDestroy||u&&u.autoDestroy?l.destroy(e):l.emit("error",e)}}},27067:(M,g,s)=>{"use strict";var i=s(36899).q.ERR_STREAM_PREMATURE_CLOSE;function E(){}M.exports=function l(e,t,u){if("function"==typeof t)return l(e,null,t);t||(t={}),u=function S(e){var t=!1;return function(){if(!t){t=!0;for(var u=arguments.length,m=new Array(u),h=0;h{M.exports=function(){throw new Error("Readable.from is not available in the browser")}},26866:(M,g,s)=>{"use strict";var i,E=s(36899).q,p=E.ERR_MISSING_ARGS,l=E.ERR_STREAM_DESTROYED;function e(a){if(a)throw a}function u(a,o,n,f){f=function S(a){var o=!1;return function(){o||(o=!0,a.apply(void 0,arguments))}}(f);var _=!1;a.on("close",function(){_=!0}),void 0===i&&(i=s(27067)),i(a,{readable:o,writable:n},function(w){if(w)return f(w);_=!0,f()});var y=!1;return function(w){if(!_&&!y){if(y=!0,function t(a){return a.setHeader&&"function"==typeof a.abort}(a))return a.abort();if("function"==typeof a.destroy)return a.destroy();f(w||new l("pipe"))}}}function m(a){a()}function h(a,o){return a.pipe(o)}function r(a){return a.length&&"function"==typeof a[a.length-1]?a.pop():e}M.exports=function b(){for(var a=arguments.length,o=new Array(a),n=0;n0,function(O){_||(_=O),O&&y.forEach(m),!C&&(y.forEach(m),f(_))})});return o.reduce(h)}},30689:(M,g,s)=>{"use strict";var i=s(36899).q.ERR_INVALID_OPT_VALUE;M.exports={getHighWaterMark:function E(p,l,e,t){var u=function S(p,l,e){return null!=p.highWaterMark?p.highWaterMark:l?p[e]:null}(l,t,e);if(null!=u){if(!isFinite(u)||Math.floor(u)!==u||u<0)throw new i(t?e:"highWaterMark",u);return Math.floor(u)}return p.objectMode?16:16384}}},94149:(M,g,s)=>{M.exports=s(2272).EventEmitter},23225:(M,g,s)=>{(g=M.exports=s(70999)).Stream=g,g.Readable=g,g.Writable=s(58736),g.Duplex=s(81492),g.Transform=s(20651),g.PassThrough=s(44753),g.finished=s(27067),g.pipeline=s(26866)},29478:(M,g,s)=>{"use strict";var i=s(44381).Buffer,S=s(61390),E=s(60942),p=new Array(16),l=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],e=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],t=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],u=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],m=[0,1518500249,1859775393,2400959708,2840853838],h=[1352829926,1548603684,1836072691,2053994217,0];function r(){E.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function b(y,w){return y<>>32-w}function a(y,w,P,C,U,O,H,R){return b(y+(w^P^C)+O+H|0,R)+U|0}function o(y,w,P,C,U,O,H,R){return b(y+(w&P|~w&C)+O+H|0,R)+U|0}function n(y,w,P,C,U,O,H,R){return b(y+((w|~P)^C)+O+H|0,R)+U|0}function f(y,w,P,C,U,O,H,R){return b(y+(w&C|P&~C)+O+H|0,R)+U|0}function _(y,w,P,C,U,O,H,R){return b(y+(w^(P|~C))+O+H|0,R)+U|0}S(r,E),r.prototype._update=function(){for(var y=p,w=0;w<16;++w)y[w]=this._block.readInt32LE(4*w);for(var P=0|this._a,C=0|this._b,U=0|this._c,O=0|this._d,H=0|this._e,R=0|this._a,Y=0|this._b,G=0|this._c,re=0|this._d,te=0|this._e,W=0;W<80;W+=1){var ie,J;W<16?(ie=a(P,C,U,O,H,y[l[W]],m[0],t[W]),J=_(R,Y,G,re,te,y[e[W]],h[0],u[W])):W<32?(ie=o(P,C,U,O,H,y[l[W]],m[1],t[W]),J=f(R,Y,G,re,te,y[e[W]],h[1],u[W])):W<48?(ie=n(P,C,U,O,H,y[l[W]],m[2],t[W]),J=n(R,Y,G,re,te,y[e[W]],h[2],u[W])):W<64?(ie=f(P,C,U,O,H,y[l[W]],m[3],t[W]),J=o(R,Y,G,re,te,y[e[W]],h[3],u[W])):(ie=_(P,C,U,O,H,y[l[W]],m[4],t[W]),J=a(R,Y,G,re,te,y[e[W]],h[4],u[W])),P=H,H=O,O=b(U,10),U=C,C=ie,R=te,te=re,re=b(G,10),G=Y,Y=J}var ee=this._b+U+re|0;this._b=this._c+O+te|0,this._c=this._d+H+R|0,this._d=this._e+P+Y|0,this._e=this._a+C+G|0,this._a=ee},r.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var y=i.alloc?i.alloc(20):new i(20);return y.writeInt32LE(this._a,0),y.writeInt32LE(this._b,4),y.writeInt32LE(this._c,8),y.writeInt32LE(this._d,12),y.writeInt32LE(this._e,16),y},M.exports=r},26651:function(M,g,s){"use strict";var i=this&&this.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(g,"__esModule",{value:!0}),g.getLength=g.decode=g.encode=void 0;var S=i(s(17907));function p(n,f){if("0"===n[0]&&"0"===n[1])throw new Error("invalid RLP: extra zeros");return parseInt(n,f)}function l(n,f){if(n<56)return Buffer.from([n+f]);var _=r(n),w=r(f+55+_.length/2);return Buffer.from(w+_,"hex")}function u(n){var f,_,y,w,P,C=[],U=n[0];if(U<=127)return{data:n.slice(0,1),remainder:n.slice(1)};if(U<=183){if(f=U-127,y=128===U?Buffer.from([]):n.slice(1,f),2===f&&y[0]<128)throw new Error("invalid rlp encoding: byte must be less 0x80");return{data:y,remainder:n.slice(f)}}if(U<=191){if(n.length-1<(_=U-182))throw new Error("invalid RLP: not enough bytes for string length");if((f=p(n.slice(1,_).toString("hex"),16))<=55)throw new Error("invalid RLP: expected string length to be greater than 55");if((y=n.slice(_,f+_)).lengthn.length)throw new Error("invalid rlp: total length is larger than the data");if(0===(w=n.slice(_,O)).length)throw new Error("invalid rlp, List has a invalid length");for(;w.length;)P=u(w),C.push(P.data),w=P.remainder;return{data:C,remainder:n.slice(O)}}function m(n){return"0x"===n.slice(0,2)}function r(n){if(n<0)throw new Error("Invalid integer as argument, must be unsigned!");var f=n.toString(16);return f.length%2?"0"+f:f}function o(n){if(!Buffer.isBuffer(n)){if("string"==typeof n)return m(n)?Buffer.from(function b(n){return n.length%2?"0"+n:n}(function h(n){return"string"!=typeof n?n:m(n)?n.slice(2):n}(n)),"hex"):Buffer.from(n);if("number"==typeof n||"bigint"==typeof n)return n?function a(n){var f=r(n);return Buffer.from(f,"hex")}(n):Buffer.from([]);if(null==n)return Buffer.from([]);if(n instanceof Uint8Array)return Buffer.from(n);if(S.default.isBN(n))return Buffer.from(n.toArray());throw new Error("invalid type")}return n}g.encode=function E(n){if(Array.isArray(n)){for(var f=[],_=0;_{var i=s(44381),S=i.Buffer;function E(l,e){for(var t in l)e[t]=l[t]}function p(l,e,t){return S(l,e,t)}S.from&&S.alloc&&S.allocUnsafe&&S.allocUnsafeSlow?M.exports=i:(E(i,g),g.Buffer=p),p.prototype=Object.create(S.prototype),E(S,p),p.from=function(l,e,t){if("number"==typeof l)throw new TypeError("Argument must not be a number");return S(l,e,t)},p.alloc=function(l,e,t){if("number"!=typeof l)throw new TypeError("Argument must be a number");var u=S(l);return void 0!==e?"string"==typeof t?u.fill(e,t):u.fill(e):u.fill(0),u},p.allocUnsafe=function(l){if("number"!=typeof l)throw new TypeError("Argument must be a number");return S(l)},p.allocUnsafeSlow=function(l){if("number"!=typeof l)throw new TypeError("Argument must be a number");return i.SlowBuffer(l)}},8371:(M,g,s)=>{var i=s(5214).Buffer;function S(E,p){this._block=i.alloc(E),this._finalSize=p,this._blockSize=E,this._len=0}S.prototype.update=function(E,p){"string"==typeof E&&(E=i.from(E,p=p||"utf8"));for(var l=this._block,e=this._blockSize,t=E.length,u=this._len,m=0;m=this._finalSize&&(this._update(this._block),this._block.fill(0));var l=8*this._len;if(l<=4294967295)this._block.writeUInt32BE(l,this._blockSize-4);else{var e=(4294967295&l)>>>0;this._block.writeUInt32BE((l-e)/4294967296,this._blockSize-8),this._block.writeUInt32BE(e,this._blockSize-4)}this._update(this._block);var u=this._hash();return E?u.toString(E):u},S.prototype._update=function(){throw new Error("_update must be implemented by subclass")},M.exports=S},5197:(M,g,s)=>{var i=M.exports=function(E){E=E.toLowerCase();var p=i[E];if(!p)throw new Error(E+" is not supported (we accept pull requests)");return new p};i.sha=s(2885),i.sha1=s(8079),i.sha224=s(84269),i.sha256=s(881),i.sha384=s(57911),i.sha512=s(53054)},2885:(M,g,s)=>{var i=s(61390),S=s(8371),E=s(5214).Buffer,p=[1518500249,1859775393,-1894007588,-899497514],l=new Array(80);function e(){this.init(),this._w=l,S.call(this,64,56)}function t(h){return h<<5|h>>>27}function u(h){return h<<30|h>>>2}function m(h,r,b,a){return 0===h?r&b|~r&a:2===h?r&b|r&a|b&a:r^b^a}i(e,S),e.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},e.prototype._update=function(h){for(var r=this._w,b=0|this._a,a=0|this._b,o=0|this._c,n=0|this._d,f=0|this._e,_=0;_<16;++_)r[_]=h.readInt32BE(4*_);for(;_<80;++_)r[_]=r[_-3]^r[_-8]^r[_-14]^r[_-16];for(var y=0;y<80;++y){var w=~~(y/20),P=t(b)+m(w,a,o,n)+f+r[y]+p[w]|0;f=n,n=o,o=u(a),a=b,b=P}this._a=b+this._a|0,this._b=a+this._b|0,this._c=o+this._c|0,this._d=n+this._d|0,this._e=f+this._e|0},e.prototype._hash=function(){var h=E.allocUnsafe(20);return h.writeInt32BE(0|this._a,0),h.writeInt32BE(0|this._b,4),h.writeInt32BE(0|this._c,8),h.writeInt32BE(0|this._d,12),h.writeInt32BE(0|this._e,16),h},M.exports=e},8079:(M,g,s)=>{var i=s(61390),S=s(8371),E=s(5214).Buffer,p=[1518500249,1859775393,-1894007588,-899497514],l=new Array(80);function e(){this.init(),this._w=l,S.call(this,64,56)}function t(r){return r<<1|r>>>31}function u(r){return r<<5|r>>>27}function m(r){return r<<30|r>>>2}function h(r,b,a,o){return 0===r?b&a|~b&o:2===r?b&a|b&o|a&o:b^a^o}i(e,S),e.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},e.prototype._update=function(r){for(var b=this._w,a=0|this._a,o=0|this._b,n=0|this._c,f=0|this._d,_=0|this._e,y=0;y<16;++y)b[y]=r.readInt32BE(4*y);for(;y<80;++y)b[y]=t(b[y-3]^b[y-8]^b[y-14]^b[y-16]);for(var w=0;w<80;++w){var P=~~(w/20),C=u(a)+h(P,o,n,f)+_+b[w]+p[P]|0;_=f,f=n,n=m(o),o=a,a=C}this._a=a+this._a|0,this._b=o+this._b|0,this._c=n+this._c|0,this._d=f+this._d|0,this._e=_+this._e|0},e.prototype._hash=function(){var r=E.allocUnsafe(20);return r.writeInt32BE(0|this._a,0),r.writeInt32BE(0|this._b,4),r.writeInt32BE(0|this._c,8),r.writeInt32BE(0|this._d,12),r.writeInt32BE(0|this._e,16),r},M.exports=e},84269:(M,g,s)=>{var i=s(61390),S=s(881),E=s(8371),p=s(5214).Buffer,l=new Array(64);function e(){this.init(),this._w=l,E.call(this,64,56)}i(e,S),e.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},e.prototype._hash=function(){var t=p.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},M.exports=e},881:(M,g,s)=>{var i=s(61390),S=s(8371),E=s(5214).Buffer,p=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],l=new Array(64);function e(){this.init(),this._w=l,S.call(this,64,56)}function t(a,o,n){return n^a&(o^n)}function u(a,o,n){return a&o|n&(a|o)}function m(a){return(a>>>2|a<<30)^(a>>>13|a<<19)^(a>>>22|a<<10)}function h(a){return(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7)}function r(a){return(a>>>7|a<<25)^(a>>>18|a<<14)^a>>>3}function b(a){return(a>>>17|a<<15)^(a>>>19|a<<13)^a>>>10}i(e,S),e.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},e.prototype._update=function(a){for(var o=this._w,n=0|this._a,f=0|this._b,_=0|this._c,y=0|this._d,w=0|this._e,P=0|this._f,C=0|this._g,U=0|this._h,O=0;O<16;++O)o[O]=a.readInt32BE(4*O);for(;O<64;++O)o[O]=b(o[O-2])+o[O-7]+r(o[O-15])+o[O-16]|0;for(var H=0;H<64;++H){var R=U+h(w)+t(w,P,C)+p[H]+o[H]|0,Y=m(n)+u(n,f,_)|0;U=C,C=P,P=w,w=y+R|0,y=_,_=f,f=n,n=R+Y|0}this._a=n+this._a|0,this._b=f+this._b|0,this._c=_+this._c|0,this._d=y+this._d|0,this._e=w+this._e|0,this._f=P+this._f|0,this._g=C+this._g|0,this._h=U+this._h|0},e.prototype._hash=function(){var a=E.allocUnsafe(32);return a.writeInt32BE(this._a,0),a.writeInt32BE(this._b,4),a.writeInt32BE(this._c,8),a.writeInt32BE(this._d,12),a.writeInt32BE(this._e,16),a.writeInt32BE(this._f,20),a.writeInt32BE(this._g,24),a.writeInt32BE(this._h,28),a},M.exports=e},57911:(M,g,s)=>{var i=s(61390),S=s(53054),E=s(8371),p=s(5214).Buffer,l=new Array(160);function e(){this.init(),this._w=l,E.call(this,128,112)}i(e,S),e.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},e.prototype._hash=function(){var t=p.allocUnsafe(48);function u(m,h,r){t.writeInt32BE(m,r),t.writeInt32BE(h,r+4)}return u(this._ah,this._al,0),u(this._bh,this._bl,8),u(this._ch,this._cl,16),u(this._dh,this._dl,24),u(this._eh,this._el,32),u(this._fh,this._fl,40),t},M.exports=e},53054:(M,g,s)=>{var i=s(61390),S=s(8371),E=s(5214).Buffer,p=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],l=new Array(160);function e(){this.init(),this._w=l,S.call(this,128,112)}function t(f,_,y){return y^f&(_^y)}function u(f,_,y){return f&_|y&(f|_)}function m(f,_){return(f>>>28|_<<4)^(_>>>2|f<<30)^(_>>>7|f<<25)}function h(f,_){return(f>>>14|_<<18)^(f>>>18|_<<14)^(_>>>9|f<<23)}function r(f,_){return(f>>>1|_<<31)^(f>>>8|_<<24)^f>>>7}function b(f,_){return(f>>>1|_<<31)^(f>>>8|_<<24)^(f>>>7|_<<25)}function a(f,_){return(f>>>19|_<<13)^(_>>>29|f<<3)^f>>>6}function o(f,_){return(f>>>19|_<<13)^(_>>>29|f<<3)^(f>>>6|_<<26)}function n(f,_){return f>>>0<_>>>0?1:0}i(e,S),e.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},e.prototype._update=function(f){for(var _=this._w,y=0|this._ah,w=0|this._bh,P=0|this._ch,C=0|this._dh,U=0|this._eh,O=0|this._fh,H=0|this._gh,R=0|this._hh,Y=0|this._al,G=0|this._bl,re=0|this._cl,te=0|this._dl,W=0|this._el,ie=0|this._fl,J=0|this._gl,ee=0|this._hl,Q=0;Q<32;Q+=2)_[Q]=f.readInt32BE(4*Q),_[Q+1]=f.readInt32BE(4*Q+4);for(;Q<160;Q+=2){var X=_[Q-30],F=_[Q-30+1],K=r(X,F),x=b(F,X),j=a(X=_[Q-4],F=_[Q-4+1]),L=o(F,X),q=_[Q-32],A=_[Q-32+1],v=x+_[Q-14+1]|0,T=K+_[Q-14]+n(v,x)|0;T=(T=T+j+n(v=v+L|0,L)|0)+q+n(v=v+A|0,A)|0,_[Q]=T,_[Q+1]=v}for(var I=0;I<160;I+=2){T=_[I],v=_[I+1];var k=u(y,w,P),c=u(Y,G,re),d=m(y,Y),B=m(Y,y),z=h(U,W),oe=h(W,U),ne=p[I],N=p[I+1],he=t(U,O,H),ye=t(W,ie,J),pe=ee+oe|0,be=R+z+n(pe,ee)|0;be=(be=(be=be+he+n(pe=pe+ye|0,ye)|0)+ne+n(pe=pe+N|0,N)|0)+T+n(pe=pe+v|0,v)|0;var $=B+c|0,Z=d+k+n($,B)|0;R=H,ee=J,H=O,J=ie,O=U,ie=W,U=C+be+n(W=te+pe|0,te)|0,C=P,te=re,P=w,re=G,w=y,G=Y,y=be+Z+n(Y=pe+$|0,pe)|0}this._al=this._al+Y|0,this._bl=this._bl+G|0,this._cl=this._cl+re|0,this._dl=this._dl+te|0,this._el=this._el+W|0,this._fl=this._fl+ie|0,this._gl=this._gl+J|0,this._hl=this._hl+ee|0,this._ah=this._ah+y+n(this._al,Y)|0,this._bh=this._bh+w+n(this._bl,G)|0,this._ch=this._ch+P+n(this._cl,re)|0,this._dh=this._dh+C+n(this._dl,te)|0,this._eh=this._eh+U+n(this._el,W)|0,this._fh=this._fh+O+n(this._fl,ie)|0,this._gh=this._gh+H+n(this._gl,J)|0,this._hh=this._hh+R+n(this._hl,ee)|0},e.prototype._hash=function(){var f=E.allocUnsafe(64);function _(y,w,P){f.writeInt32BE(y,P),f.writeInt32BE(w,P+4)}return _(this._ah,this._al,0),_(this._bh,this._bl,8),_(this._ch,this._cl,16),_(this._dh,this._dl,24),_(this._eh,this._el,32),_(this._fh,this._fl,40),_(this._gh,this._gl,48),_(this._hh,this._hl,56),f},M.exports=e},77195:(M,g,s)=>{"use strict";var i=s(87200).Buffer,S=i.isEncoding||function(y){switch((y=""+y)&&y.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function l(y){var w;switch(this.encoding=function p(y){var w=function E(y){if(!y)return"utf8";for(var w;;)switch(y){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return y;default:if(w)return;y=(""+y).toLowerCase(),w=!0}}(y);if("string"!=typeof w&&(i.isEncoding===S||!S(y)))throw new Error("Unknown encoding: "+y);return w||y}(y),this.encoding){case"utf16le":this.text=b,this.end=a,w=4;break;case"utf8":this.fillLast=m,w=4;break;case"base64":this.text=o,this.end=n,w=3;break;default:return this.write=f,void(this.end=_)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(w)}function e(y){return y<=127?0:y>>5==6?2:y>>4==14?3:y>>3==30?4:y>>6==2?-1:-2}function m(y){var w=this.lastTotal-this.lastNeed,P=function u(y,w,P){if(128!=(192&w[0]))return y.lastNeed=0,"\ufffd";if(y.lastNeed>1&&w.length>1){if(128!=(192&w[1]))return y.lastNeed=1,"\ufffd";if(y.lastNeed>2&&w.length>2&&128!=(192&w[2]))return y.lastNeed=2,"\ufffd"}}(this,y);return void 0!==P?P:this.lastNeed<=y.length?(y.copy(this.lastChar,w,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(y.copy(this.lastChar,w,0,y.length),void(this.lastNeed-=y.length))}function b(y,w){if((y.length-w)%2==0){var P=y.toString("utf16le",w);if(P){var C=P.charCodeAt(P.length-1);if(C>=55296&&C<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=y[y.length-2],this.lastChar[1]=y[y.length-1],P.slice(0,-1)}return P}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=y[y.length-1],y.toString("utf16le",w,y.length-1)}function a(y){var w=y&&y.length?this.write(y):"";return this.lastNeed?w+this.lastChar.toString("utf16le",0,this.lastTotal-this.lastNeed):w}function o(y,w){var P=(y.length-w)%3;return 0===P?y.toString("base64",w):(this.lastNeed=3-P,this.lastTotal=3,1===P?this.lastChar[0]=y[y.length-1]:(this.lastChar[0]=y[y.length-2],this.lastChar[1]=y[y.length-1]),y.toString("base64",w,y.length-P))}function n(y){var w=y&&y.length?this.write(y):"";return this.lastNeed?w+this.lastChar.toString("base64",0,3-this.lastNeed):w}function f(y){return y.toString(this.encoding)}function _(y){return y&&y.length?this.write(y):""}g.s=l,l.prototype.write=function(y){if(0===y.length)return"";var w,P;if(this.lastNeed){if(void 0===(w=this.fillLast(y)))return"";P=this.lastNeed,this.lastNeed=0}else P=0;return P=0?(U>0&&(y.lastNeed=U-1),U):--C=0?(U>0&&(y.lastNeed=U-2),U):--C=0?(U>0&&(2===U?U=0:y.lastNeed=U-3),U):0}(this,y,w);if(!this.lastNeed)return y.toString("utf8",w);this.lastTotal=P;var C=y.length-(P-this.lastNeed);return y.copy(this.lastChar,0,C),y.toString("utf8",w,C)},l.prototype.fillLast=function(y){if(this.lastNeed<=y.length)return y.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);y.copy(this.lastChar,this.lastTotal-this.lastNeed,0,y.length),this.lastNeed-=y.length}},87200:(M,g,s)=>{var i=s(44381),S=i.Buffer;function E(l,e){for(var t in l)e[t]=l[t]}function p(l,e,t){return S(l,e,t)}S.from&&S.alloc&&S.allocUnsafe&&S.allocUnsafeSlow?M.exports=i:(E(i,g),g.Buffer=p),E(S,p),p.from=function(l,e,t){if("number"==typeof l)throw new TypeError("Argument must not be a number");return S(l,e,t)},p.alloc=function(l,e,t){if("number"!=typeof l)throw new TypeError("Argument must be a number");var u=S(l);return void 0!==e?"string"==typeof t?u.fill(e,t):u.fill(e):u.fill(0),u},p.allocUnsafe=function(l){if("number"!=typeof l)throw new TypeError("Argument must be a number");return S(l)},p.allocUnsafeSlow=function(l){if("number"!=typeof l)throw new TypeError("Argument must be a number");return i.SlowBuffer(l)}},77021:(M,g,s)=>{var i=s(30853);M.exports=function(E){return"string"!=typeof E?E:i(E)?E.slice(2):E}},95498:(M,g,s)=>{"use strict";var i=s(36545),S=s(49434);function E(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}g.parse=w,g.resolve=function C(O,H){return w(O,!1,!0).resolve(H)},g.resolveObject=function U(O,H){return O?w(O,!1,!0).resolveObject(H):H},g.format=function P(O){return S.isString(O)&&(O=w(O)),O instanceof E?O.format():E.prototype.format.call(O)},g.Url=E;var p=/^([a-z0-9.+-]+:)/i,l=/:[0-9]*$/,e=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),m=["'"].concat(u),h=["%","/","?",";","#"].concat(m),r=["/","?","#"],a=/^[+a-z0-9A-Z_-]{0,63}$/,o=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,n={javascript:!0,"javascript:":!0},f={javascript:!0,"javascript:":!0},_={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=s(25302);function w(O,H,R){if(O&&S.isObject(O)&&O instanceof E)return O;var Y=new E;return Y.parse(O,H,R),Y}E.prototype.parse=function(O,H,R){if(!S.isString(O))throw new TypeError("Parameter 'url' must be a string, not "+typeof O);var Y=O.indexOf("?"),G=-1!==Y&&Y127?A+="x":A+=q[v];if(!A.match(a)){var I=D.slice(0,F),k=D.slice(F+1),c=q.match(o);c&&(I.push(c[1]),k.unshift(c[2])),k.length&&(W="/"+k.join(".")+W),this.hostname=I.join(".");break}}}this.hostname=this.hostname.length>255?"":this.hostname.toLowerCase(),L||(this.hostname=i.toASCII(this.hostname)),this.host=(this.hostname||"")+(this.port?":"+this.port:""),this.href+=this.host,L&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==W[0]&&(W="/"+W))}if(!n[ee])for(F=0,V=m.length;F0)&&R.host.split("@"))&&(R.auth=A.shift(),R.host=R.hostname=A.shift())),R.search=O.search,R.query=O.query,(!S.isNull(R.pathname)||!S.isNull(R.search))&&(R.path=(R.pathname?R.pathname:"")+(R.search?R.search:"")),R.href=R.format(),R;if(!D.length)return R.pathname=null,R.path=R.search?"/"+R.search:null,R.href=R.format(),R;for(var v=D.slice(-1)[0],T=(R.host||O.host||D.length>1)&&("."===v||".."===v)||""===v,I=0,k=D.length;k>=0;k--)"."===(v=D[k])?D.splice(k,1):".."===v?(D.splice(k,1),I++):I&&(D.splice(k,1),I--);if(!j&&!L)for(;I--;I)D.unshift("..");j&&""!==D[0]&&(!D[0]||"/"!==D[0].charAt(0))&&D.unshift(""),T&&"/"!==D.join("/").substr(-1)&&D.push("");var A,c=""===D[0]||D[0]&&"/"===D[0].charAt(0);return q&&(R.hostname=R.host=c?"":D.length?D.shift():"",(A=!!(R.host&&R.host.indexOf("@")>0)&&R.host.split("@"))&&(R.auth=A.shift(),R.host=R.hostname=A.shift())),(j=j||R.host&&D.length)&&!c&&D.unshift(""),D.length?R.pathname=D.join("/"):(R.pathname=null,R.path=null),(!S.isNull(R.pathname)||!S.isNull(R.search))&&(R.path=(R.pathname?R.pathname:"")+(R.search?R.search:"")),R.auth=O.auth||R.auth,R.slashes=R.slashes||O.slashes,R.href=R.format(),R},E.prototype.parseHost=function(){var O=this.host,H=l.exec(O);H&&(":"!==(H=H[0])&&(this.port=H.substr(1)),O=O.substr(0,O.length-H.length)),O&&(this.hostname=O)}},49434:M=>{"use strict";M.exports={isString:function(g){return"string"==typeof g},isObject:function(g){return"object"==typeof g&&null!==g},isNull:function(g){return null===g},isNullOrUndefined:function(g){return null==g}}},12779:M=>{function s(i){try{if(!global.localStorage)return!1}catch{return!1}var S=global.localStorage[i];return null!=S&&"true"===String(S).toLowerCase()}M.exports=function g(i,S){if(s("noDeprecation"))return i;var E=!1;return function p(){if(!E){if(s("throwDeprecation"))throw new Error(S);s("traceDeprecation")?console.trace(S):console.warn(S),E=!0}return i.apply(this,arguments)}}},86890:M=>{M.exports=function(s){return s&&"object"==typeof s&&"function"==typeof s.copy&&"function"==typeof s.fill&&"function"==typeof s.readUInt8}},30430:(M,g,s)=>{"use strict";var i=s(92158),S=s(67844),E=s(70718),p=s(68627);function l(N){return N.call.bind(N)}var e=typeof BigInt<"u",t=typeof Symbol<"u",u=l(Object.prototype.toString),m=l(Number.prototype.valueOf),h=l(String.prototype.valueOf),r=l(Boolean.prototype.valueOf);if(e)var b=l(BigInt.prototype.valueOf);if(t)var a=l(Symbol.prototype.valueOf);function o(N,he){if("object"!=typeof N)return!1;try{return he(N),!0}catch{return!1}}function re(N){return"[object Map]"===u(N)}function W(N){return"[object Set]"===u(N)}function J(N){return"[object WeakMap]"===u(N)}function Q(N){return"[object WeakSet]"===u(N)}function F(N){return"[object ArrayBuffer]"===u(N)}function K(N){return!(typeof ArrayBuffer>"u")&&(F.working?F(N):N instanceof ArrayBuffer)}function x(N){return"[object DataView]"===u(N)}function j(N){return!(typeof DataView>"u")&&(x.working?x(N):N instanceof DataView)}g.isArgumentsObject=i,g.isGeneratorFunction=S,g.isTypedArray=p,g.isPromise=function n(N){return typeof Promise<"u"&&N instanceof Promise||null!==N&&"object"==typeof N&&"function"==typeof N.then&&"function"==typeof N.catch},g.isArrayBufferView=function f(N){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(N):p(N)||j(N)},g.isUint8Array=function _(N){return"Uint8Array"===E(N)},g.isUint8ClampedArray=function y(N){return"Uint8ClampedArray"===E(N)},g.isUint16Array=function w(N){return"Uint16Array"===E(N)},g.isUint32Array=function P(N){return"Uint32Array"===E(N)},g.isInt8Array=function C(N){return"Int8Array"===E(N)},g.isInt16Array=function U(N){return"Int16Array"===E(N)},g.isInt32Array=function O(N){return"Int32Array"===E(N)},g.isFloat32Array=function H(N){return"Float32Array"===E(N)},g.isFloat64Array=function R(N){return"Float64Array"===E(N)},g.isBigInt64Array=function Y(N){return"BigInt64Array"===E(N)},g.isBigUint64Array=function G(N){return"BigUint64Array"===E(N)},re.working=typeof Map<"u"&&re(new Map),g.isMap=function te(N){return!(typeof Map>"u")&&(re.working?re(N):N instanceof Map)},W.working=typeof Set<"u"&&W(new Set),g.isSet=function ie(N){return!(typeof Set>"u")&&(W.working?W(N):N instanceof Set)},J.working=typeof WeakMap<"u"&&J(new WeakMap),g.isWeakMap=function ee(N){return!(typeof WeakMap>"u")&&(J.working?J(N):N instanceof WeakMap)},Q.working=typeof WeakSet<"u"&&Q(new WeakSet),g.isWeakSet=function X(N){return Q(N)},F.working=typeof ArrayBuffer<"u"&&F(new ArrayBuffer),g.isArrayBuffer=K,x.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&x(new DataView(new ArrayBuffer(1),0,1)),g.isDataView=j;var L=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function D(N){return"[object SharedArrayBuffer]"===u(N)}function V(N){return!(typeof L>"u")&&(typeof D.working>"u"&&(D.working=D(new L)),D.working?D(N):N instanceof L)}function k(N){return o(N,m)}function c(N){return o(N,h)}function d(N){return o(N,r)}function B(N){return e&&o(N,b)}function z(N){return t&&o(N,a)}g.isSharedArrayBuffer=V,g.isAsyncFunction=function q(N){return"[object AsyncFunction]"===u(N)},g.isMapIterator=function A(N){return"[object Map Iterator]"===u(N)},g.isSetIterator=function v(N){return"[object Set Iterator]"===u(N)},g.isGeneratorObject=function T(N){return"[object Generator]"===u(N)},g.isWebAssemblyCompiledModule=function I(N){return"[object WebAssembly.Module]"===u(N)},g.isNumberObject=k,g.isStringObject=c,g.isBooleanObject=d,g.isBigIntObject=B,g.isSymbolObject=z,g.isBoxedPrimitive=function oe(N){return k(N)||c(N)||d(N)||B(N)||z(N)},g.isAnyArrayBuffer=function ne(N){return typeof Uint8Array<"u"&&(K(N)||V(N))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(N){Object.defineProperty(g,N,{enumerable:!1,value:function(){throw new Error(N+" is not supported in userland")}})})},44407:(M,g,s)=>{var i=Object.getOwnPropertyDescriptors||function(j){for(var L=Object.keys(j),D={},V=0;V=V)return v;switch(v){case"%s":return String(D[L++]);case"%d":return Number(D[L++]);case"%j":try{return JSON.stringify(D[L++])}catch{return"[Circular]"}default:return v}}),A=D[L];L"u")return function(){return g.deprecate(x,j).apply(this,arguments)};var L=!1;return function D(){if(!L){if(process.throwDeprecation)throw new Error(j);process.traceDeprecation?console.trace(j):console.error(j),L=!0}return x.apply(this,arguments)}};var E={},p=/^$/;if(process.env.NODE_DEBUG){var l=process.env.NODE_DEBUG;l=l.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),p=new RegExp("^"+l+"$","i")}function e(x,j){var L={seen:[],stylize:u};return arguments.length>=3&&(L.depth=arguments[2]),arguments.length>=4&&(L.colors=arguments[3]),_(j)?L.showHidden=j:j&&g._extend(L,j),O(L.showHidden)&&(L.showHidden=!1),O(L.depth)&&(L.depth=2),O(L.colors)&&(L.colors=!1),O(L.customInspect)&&(L.customInspect=!0),L.colors&&(L.stylize=t),h(L,x,L.depth)}function t(x,j){var L=e.styles[j];return L?"\x1b["+e.colors[L][0]+"m"+x+"\x1b["+e.colors[L][1]+"m":x}function u(x,j){return x}function h(x,j,L){if(x.customInspect&&j&&re(j.inspect)&&j.inspect!==g.inspect&&(!j.constructor||j.constructor.prototype!==j)){var D=j.inspect(L,x);return C(D)||(D=h(x,D,L)),D}var V=function r(x,j){if(O(j))return x.stylize("undefined","undefined");if(C(j)){var L="'"+JSON.stringify(j).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return x.stylize(L,"string")}return P(j)?x.stylize(""+j,"number"):_(j)?x.stylize(""+j,"boolean"):y(j)?x.stylize("null","null"):void 0}(x,j);if(V)return V;var q=Object.keys(j),A=function m(x){var j={};return x.forEach(function(L,D){j[L]=!0}),j}(q);if(x.showHidden&&(q=Object.getOwnPropertyNames(j)),G(j)&&(q.indexOf("message")>=0||q.indexOf("description")>=0))return b(j);if(0===q.length){if(re(j))return x.stylize("[Function"+(j.name?": "+j.name:"")+"]","special");if(H(j))return x.stylize(RegExp.prototype.toString.call(j),"regexp");if(Y(j))return x.stylize(Date.prototype.toString.call(j),"date");if(G(j))return b(j)}var d,T="",I=!1,k=["{","}"];return f(j)&&(I=!0,k=["[","]"]),re(j)&&(T=" [Function"+(j.name?": "+j.name:"")+"]"),H(j)&&(T=" "+RegExp.prototype.toString.call(j)),Y(j)&&(T=" "+Date.prototype.toUTCString.call(j)),G(j)&&(T=" "+b(j)),0!==q.length||I&&0!=j.length?L<0?H(j)?x.stylize(RegExp.prototype.toString.call(j),"regexp"):x.stylize("[Object]","special"):(x.seen.push(j),d=I?function a(x,j,L,D,V){for(var q=[],A=0,v=j.length;A60?L[0]+(""===j?"":j+"\n ")+" "+x.join(",\n ")+" "+L[1]:L[0]+j+" "+x.join(", ")+" "+L[1]}(d,T,k)):k[0]+T+k[1]}function b(x){return"["+Error.prototype.toString.call(x)+"]"}function o(x,j,L,D,V,q){var A,v,T;if((T=Object.getOwnPropertyDescriptor(j,V)||{value:j[V]}).get?v=x.stylize(T.set?"[Getter/Setter]":"[Getter]","special"):T.set&&(v=x.stylize("[Setter]","special")),Q(D,V)||(A="["+V+"]"),v||(x.seen.indexOf(T.value)<0?(v=y(L)?h(x,T.value,null):h(x,T.value,L-1)).indexOf("\n")>-1&&(v=q?v.split("\n").map(function(I){return" "+I}).join("\n").substr(2):"\n"+v.split("\n").map(function(I){return" "+I}).join("\n")):v=x.stylize("[Circular]","special")),O(A)){if(q&&V.match(/^\d+$/))return v;(A=JSON.stringify(""+V)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(A=A.substr(1,A.length-2),A=x.stylize(A,"name")):(A=A.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),A=x.stylize(A,"string"))}return A+": "+v}function f(x){return Array.isArray(x)}function _(x){return"boolean"==typeof x}function y(x){return null===x}function P(x){return"number"==typeof x}function C(x){return"string"==typeof x}function O(x){return void 0===x}function H(x){return R(x)&&"[object RegExp]"===W(x)}function R(x){return"object"==typeof x&&null!==x}function Y(x){return R(x)&&"[object Date]"===W(x)}function G(x){return R(x)&&("[object Error]"===W(x)||x instanceof Error)}function re(x){return"function"==typeof x}function W(x){return Object.prototype.toString.call(x)}function ie(x){return x<10?"0"+x.toString(10):x.toString(10)}g.debuglog=function(x){if(x=x.toUpperCase(),!E[x])if(p.test(x)){var j=process.pid;E[x]=function(){var L=g.format.apply(g,arguments);console.error("%s %d: %s",x,j,L)}}else E[x]=function(){};return E[x]},g.inspect=e,e.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},e.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},g.types=s(30430),g.isArray=f,g.isBoolean=_,g.isNull=y,g.isNullOrUndefined=function w(x){return null==x},g.isNumber=P,g.isString=C,g.isSymbol=function U(x){return"symbol"==typeof x},g.isUndefined=O,g.isRegExp=H,g.types.isRegExp=H,g.isObject=R,g.isDate=Y,g.types.isDate=Y,g.isError=G,g.types.isNativeError=G,g.isFunction=re,g.isPrimitive=function te(x){return null===x||"boolean"==typeof x||"number"==typeof x||"string"==typeof x||"symbol"==typeof x||typeof x>"u"},g.isBuffer=s(86890);var J=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ee(){var x=new Date,j=[ie(x.getHours()),ie(x.getMinutes()),ie(x.getSeconds())].join(":");return[x.getDate(),J[x.getMonth()],j].join(" ")}function Q(x,j){return Object.prototype.hasOwnProperty.call(x,j)}g.log=function(){console.log("%s - %s",ee(),g.format.apply(g,arguments))},g.inherits=s(61390),g._extend=function(x,j){if(!j||!R(j))return x;for(var L=Object.keys(j),D=L.length;D--;)x[L[D]]=j[L[D]];return x};var X=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function F(x,j){if(!x){var L=new Error("Promise was rejected with a falsy value");L.reason=x,x=L}return j(x)}g.promisify=function(j){if("function"!=typeof j)throw new TypeError('The "original" argument must be of type Function');if(X&&j[X]){var L;if("function"!=typeof(L=j[X]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(L,X,{value:L,enumerable:!1,writable:!1,configurable:!0}),L}function L(){for(var D,V,q=new Promise(function(T,I){D=T,V=I}),A=[],v=0;v{"use strict";var i=s(69856),S=s(60130),E=s(83740),p=E("Object.prototype.toString"),l=s(15851)(),e=typeof globalThis>"u"?global:globalThis,t=S(),u=E("String.prototype.slice"),m={},h=s(87421),r=Object.getPrototypeOf;l&&h&&r&&i(t,function(o){if("function"==typeof e[o]){var n=new e[o];if(Symbol.toStringTag in n){var f=r(n),_=h(f,Symbol.toStringTag);if(!_){var y=r(f);_=h(y,Symbol.toStringTag)}m[o]=_.get}}});var a=s(68627);M.exports=function(n){return!!a(n)&&(l&&Symbol.toStringTag in n?function(n){var f=!1;return i(m,function(_,y){if(!f)try{var w=_.call(n);w===y&&(f=w)}catch{}}),f}(n):u(p(n),8,-1))}},1222:function(M,g){"use strict";var l,s=this&&this.__extends||(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var u in t)t.hasOwnProperty(u)&&(e[u]=t[u])},function(e,t){function u(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(u.prototype=t.prototype,new u)});Object.defineProperty(g,"__esModule",{value:!0});var i=function(l){function e(){return null!==l&&l.apply(this,arguments)||this}return s(e,l),e}(Error);g.SecurityError=i;var S=function(l){function e(){return null!==l&&l.apply(this,arguments)||this}return s(e,l),e}(Error);g.InvalidStateError=S;var E=function(l){function e(){return null!==l&&l.apply(this,arguments)||this}return s(e,l),e}(Error);g.NetworkError=E;var p=function(l){function e(){return null!==l&&l.apply(this,arguments)||this}return s(e,l),e}(Error);g.SyntaxError=p},44052:(M,g,s)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0}),function i(E){for(var p in E)g.hasOwnProperty(p)||(g[p]=E[p])}(s(96938));var S=s(9696);g.XMLHttpRequestEventTarget=S.XMLHttpRequestEventTarget},60795:(M,g)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.ProgressEvent=function i(S){this.type=S,this.bubbles=!1,this.cancelable=!1,this.loaded=0,this.lengthComputable=!1,this.total=0}},9696:(M,g)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0});var s=function(){function i(){this.listeners={}}return i.prototype.addEventListener=function(S,E){S=S.toLowerCase(),this.listeners[S]=this.listeners[S]||[],this.listeners[S].push(E.handleEvent||E)},i.prototype.removeEventListener=function(S,E){if(S=S.toLowerCase(),this.listeners[S]){var p=this.listeners[S].indexOf(E.handleEvent||E);p<0||this.listeners[S].splice(p,1)}},i.prototype.dispatchEvent=function(S){var E=S.type.toLowerCase();if(S.target=this,this.listeners[E])for(var p=0,l=this.listeners[E];p=0)return this._url=this._parseUrl(f.headers.location),this._method="GET",this._loweredHeaders["content-type"]&&(delete this._headers[this._loweredHeaders["content-type"]],delete this._loweredHeaders["content-type"]),null!=this._headers["Content-Type"]&&delete this._headers["Content-Type"],delete this._headers["Content-Length"],this.upload._reset(),this._finalizeHeaders(),void this._sendHxxpRequest();this._response=f,this._response.on("data",function(w){return _._onHttpResponseData(f,w)}),this._response.on("end",function(){return _._onHttpResponseEnd(f)}),this._response.on("close",function(){return _._onHttpResponseClose(f)}),this.responseUrl=this._url.href.split("#")[0],this.status=f.statusCode,this.statusText=E.STATUS_CODES[this.status],this._parseResponseHeaders(f);var y=this._responseHeaders["content-length"]||"";this._totalBytes=+y,this._lengthComputable=!!y,this._setReadyState(o.HEADERS_RECEIVED)}},o.prototype._onHttpResponseData=function(n,f){this._response===n&&(this._responseParts.push(new Buffer(f)),this._loadedBytes+=f.length,this.readyState!==o.LOADING&&this._setReadyState(o.LOADING),this._dispatchProgress("progress"))},o.prototype._onHttpResponseEnd=function(n){this._response===n&&(this._parseResponse(),this._request=null,this._response=null,this._setReadyState(o.DONE),this._dispatchProgress("load"),this._dispatchProgress("loadend"))},o.prototype._onHttpResponseClose=function(n){if(this._response===n){var f=this._request;this._setError(),f.abort(),this._setReadyState(o.DONE),this._dispatchProgress("error"),this._dispatchProgress("loadend")}},o.prototype._onHttpTimeout=function(n){this._request===n&&(this._setError(),n.abort(),this._setReadyState(o.DONE),this._dispatchProgress("timeout"),this._dispatchProgress("loadend"))},o.prototype._onHttpRequestError=function(n,f){this._request===n&&(this._setError(),n.abort(),this._setReadyState(o.DONE),this._dispatchProgress("error"),this._dispatchProgress("loadend"))},o.prototype._dispatchProgress=function(n){var f=new o.ProgressEvent(n);f.lengthComputable=this._lengthComputable,f.loaded=this._loadedBytes,f.total=this._totalBytes,this.dispatchEvent(f)},o.prototype._setError=function(){this._request=null,this._response=null,this._responseHeaders=null,this._responseParts=null},o.prototype._parseUrl=function(n,f,_){var y=null==this.nodejsBaseUrl?n:e.resolve(this.nodejsBaseUrl,n),w=e.parse(y,!1,!0);w.hash=null;var P=(w.auth||"").split(":"),C=P[0],U=P[1];return(C||U||f||_)&&(w.auth=(f||C||"")+":"+(_||U||"")),w},o.prototype._parseResponseHeaders=function(n){for(var f in this._responseHeaders={},n.headers){var _=f.toLowerCase();this._privateHeaders[_]||(this._responseHeaders[_]=n.headers[f])}null!=this._mimeOverride&&(this._responseHeaders["content-type"]=this._mimeOverride)},o.prototype._parseResponse=function(){var n=Buffer.concat(this._responseParts);switch(this._responseParts=null,this.responseType){case"json":this.responseText=null;try{this.response=JSON.parse(n.toString("utf-8"))}catch{this.response=null}return;case"buffer":return this.responseText=null,void(this.response=n);case"arraybuffer":this.responseText=null;for(var f=new ArrayBuffer(n.length),_=new Uint8Array(f),y=0;y{M.exports=function s(){for(var i={},S=0;S{},23646:()=>{},76773:()=>{},13527:()=>{},85127:M=>{"use strict";var g=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],s=typeof globalThis>"u"?global:globalThis;M.exports=function(){for(var S=[],E=0;E{"use strict";var S=s(18540)("%Object.getOwnPropertyDescriptor%",!0);if(S)try{S([],"length")}catch{S=null}M.exports=S},60130:M=>{"use strict";var g=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],s=typeof globalThis>"u"?global:globalThis;M.exports=function(){for(var S=[],E=0;E{"use strict";var S=s(16168)("%Object.getOwnPropertyDescriptor%",!0);if(S)try{S([],"length")}catch{S=null}M.exports=S},34553:(M,g,s)=>{"use strict";function i(E,p,l,e,t,u,m){try{var h=E[u](m),r=h.value}catch(b){return void l(b)}h.done?p(r):Promise.resolve(r).then(e,t)}function S(E){return function(){var p=this,l=arguments;return new Promise(function(e,t){var u=E.apply(p,l);function m(r){i(u,e,t,m,h,"next",r)}function h(r){i(u,e,t,m,h,"throw",r)}m(void 0)})}}s.d(g,{Z:()=>S})}}]); \ No newline at end of file diff --git a/angular-bare-bones-demo/dist/3rdpartylicenses.txt b/angular-bare-bones-demo/dist/3rdpartylicenses.txt index b51a10950..462d32088 100644 --- a/angular-bare-bones-demo/dist/3rdpartylicenses.txt +++ b/angular-bare-bones-demo/dist/3rdpartylicenses.txt @@ -771,267 +771,421 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -@metamask/obs-store -ISC -ISC License +@onflow/config +Apache-2.0 -Copyright (c) 2020 MetaMask +@onflow/fcl +Apache-2.0 -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +@onflow/rlp +MPL-2.0 +Mozilla Public License Version 2.0 +================================== -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +1. Definitions +-------------- +1.1. "Contributor" +means each individual or legal entity that creates, contributes to +the creation of, or owns Covered Software. -@metamask/safe-event-emitter -ISC -ISC License +1.2. "Contributor Version" +means the combination of the Contributions of others (if any) used +by a Contributor and that particular Contributor's Contribution. -Copyright (c) 2020 MetaMask +1.3. "Contribution" +means Covered Software of a particular Contributor. -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +1.4. "Covered Software" +means Source Code Form to which the initial Contributor has attached +the notice in Exhibit A, the Executable Form of such Source Code +Form, and Modifications of such Source Code Form, in each case +including portions thereof. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +1.5. "Incompatible With Secondary Licenses" +means +(a) that the initial Contributor has attached the notice described +in Exhibit B to the Covered Software; or -@peculiar/asn1-schema -MIT -MIT License +(b) that the Covered Software was made available under the terms of +version 1.1 or earlier of the License, but not also under the +terms of a Secondary License. -Copyright (c) 2020 +1.6. "Executable Form" +means any form of the work other than Source Code Form. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +1.7. "Larger Work" +means a work that combines Covered Software with other material, in +a separate file or files, that is not Covered Software. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +1.8. "License" +means this document. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +1.9. "Licensable" +means having the right to grant, to the maximum extent possible, +whether at the time of the initial grant or subsequently, any and +all of the rights conveyed by this License. +1.10. "Modifications" +means any of the following: -@tokenscript/attestation -ISC +(a) any file in Source Code Form that results from an addition to, +deletion from, or modification of the contents of Covered +Software; or -@tokenscript/token-negotiator -MIT -MIT License +(b) any new file in Source Code Form that contains any Covered +Software. -Copyright (c) 2022 TokenScript by Smart Token Labs +1.11. "Patent Claims" of a Contributor +means any patent claim(s), including without limitation, method, +process, and apparatus claims, in any patent Licensable by such +Contributor that would be infringed, but for the grant of the +License, by the making, using, selling, offering for sale, having +made, import, or transfer of either its Contributions or its +Contributor Version. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +1.12. "Secondary License" +means either the GNU General Public License, Version 2.0, the GNU +Lesser General Public License, Version 2.1, the GNU Affero General +Public License, Version 3.0, or any later versions of those +licenses. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +1.13. "Source Code Form" +means the form of the work preferred for making modifications. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +1.14. "You" (or "Your") +means an individual or a legal entity exercising rights under this +License. For legal entities, "You" includes any entity that +controls, is controlled by, or is under common control with You. For +purposes of this definition, "control" means (a) the power, direct +or indirect, to cause the direction or management of such entity, +whether by contract or otherwise, or (b) ownership of more than +fifty percent (50%) of the outstanding shares or beneficial +ownership of such entity. -@toruslabs/eccrypto -CC0-1.0 +2. License Grants and Conditions +-------------------------------- -@toruslabs/fetch-node-details -MIT -MIT License +2.1. Grants -Copyright (c) 2020 Torus +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +(a) under intellectual property rights (other than patent or trademark) +Licensable by such Contributor to use, reproduce, make available, +modify, display, perform, distribute, and otherwise exploit its +Contributions, either on an unmodified basis, with Modifications, or +as part of a Larger Work; and -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +(b) under Patent Claims of such Contributor to make, use, sell, offer +for sale, have made, import, and otherwise transfer either its +Contributions or its Contributor Version. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +2.2. Effective Date +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. -@toruslabs/http-helpers -MIT -MIT License +2.3. Limitations on Grant Scope -Copyright (c) 2020 Torus +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +(a) for any code that a Contributor has removed from Covered Software; +or -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +(b) for infringements caused by: (i) Your and any other third party's +modifications of Covered Software, or (ii) the combination of its +Contributions with other software (except as part of its Contributor +Version); or -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +(c) under Patent Claims infringed by Covered Software in the absence of +its Contributions. +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). -@toruslabs/openlogin-jrpc -ISC +2.4. Subsequent Licenses -@toruslabs/openlogin-utils -ISC +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). -@toruslabs/torus-embed -MIT -MIT License +2.5. Representation -Copyright (c) 2019 Torus +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +2.6. Fair Use -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +2.7. Conditions +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. -@toruslabs/torus.js -MIT -MIT License +3. Responsibilities +------------------- -Copyright (c) 2020 Torus +3.1. Distribution of Source Form -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +3.2. Distribution of Executable Form -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +If You distribute Covered Software in Executable Form then: +(a) such Covered Software must also be made available in Source Code +Form, as described in Section 3.1, and You must inform recipients of +the Executable Form how they can obtain a copy of such Source Code +Form by reasonable means in a timely manner, at a charge no more +than the cost of distribution to the recipient; and -@walletconnect/browser-utils -Apache-2.0 +(b) You may distribute such Executable Form under the terms of this +License, or sublicense it under different terms, provided that the +license for the Executable Form does not attempt to limit or alter +the recipients' rights in the Source Code Form under this License. -@walletconnect/client -Apache-2.0 +3.3. Distribution of a Larger Work -@walletconnect/core -Apache-2.0 +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). -@walletconnect/crypto -MIT -MIT License +3.4. Notices -Copyright (c) 2020 Pedro Gomes +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +3.5. Application of Additional Terms -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- -@walletconnect/encoding -MIT -MIT License +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. -Copyright (c) 2020 Pedro Gomes +5. Termination +-------------- -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. -@walletconnect/environment +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + +This Source Code Form is subject to the terms of the Mozilla Public +License, v. 2.0. If a copy of the MPL was not distributed with this +file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + +This Source Code Form is "Incompatible With Secondary Licenses", as +defined by the Mozilla Public License, v. 2.0. + + +@onflow/sdk +Apache-2.0 + +@onflow/transport-http +Apache-2.0 + +@onflow/types +Apache-2.0 + +@onflow/util-actor +Apache-2.0 + +@onflow/util-address +Apache-2.0 + +@onflow/util-invariant +Apache-2.0 + +@onflow/util-logger +Apache-2.0 + +@onflow/util-template +Apache-2.0 + +@onflow/util-uid +Apache-2.0 + +@peculiar/asn1-schema MIT MIT License -Copyright (c) 2020 Pedro Gomes +Copyright (c) 2020 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -1051,17 +1205,15 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -@walletconnect/http-connection -Apache-2.0 -@walletconnect/iso-crypto -Apache-2.0 +@tokenscript/attestation +ISC -@walletconnect/jsonrpc-utils +@tokenscript/token-negotiator MIT MIT License -Copyright (c) 2021 WalletConnect Labs OÜ +Copyright (c) 2022 TokenScript by Smart Token Labs Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -1081,14 +1233,11 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -@walletconnect/qrcode-modal -Apache-2.0 - -@walletconnect/randombytes +@toruslabs/torus-embed MIT MIT License -Copyright (c) 2020 Pedro Gomes +Copyright (c) 2019 Torus Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -1108,6 +1257,13 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +@walletconnect/browser-utils +Apache-2.0 + +@walletconnect/qrcode-modal +Apache-2.0 + @walletconnect/safe-json MIT MIT License @@ -1132,11 +1288,198 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -@walletconnect/socket-transport -Apache-2.0 - -@walletconnect/utils +@walletconnect/universal-provider Apache-2.0 + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2021 WalletConnect, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. @walletconnect/web3-provider Apache-2.0 @@ -1274,31 +1617,11 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -assert +base64-js MIT -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. - +The MIT License (MIT) -async -MIT -Copyright (c) 2010-2018 Caolan McMahon +Copyright (c) 2014 Jameson Little Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -1319,11 +1642,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -async-mutex +bech32 MIT -The MIT License (MIT) +MIT License -Copyright (c) 2016 Christian Speckner +Copyright (c) 2017 Pieter Wuille +Copyright (c) 2018 bitcoinjs contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -1332,23 +1656,21 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -available-typed-arrays +bn.js MIT -MIT License - -Copyright (c) 2020 Inspect JS +Copyright Fedor Indutny, 2015. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -1369,112 +1691,14 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -base64-js +brorand +MIT + +browserify-aes MIT The MIT License (MIT) -Copyright (c) 2014 Jameson Little - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -base64url -MIT -Copyright (c) 2013–2016 Brian J. Brennan - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -bech32 -MIT -MIT License - -Copyright (c) 2017 Pieter Wuille -Copyright (c) 2018 bitcoinjs contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -bn.js -MIT -Copyright Fedor Indutny, 2015. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -brorand -MIT - -browserify-aes -MIT -The MIT License (MIT) - -Copyright (c) 2014-2017 browserify-aes contributors +Copyright (c) 2014-2017 browserify-aes contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -1637,31 +1861,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -builtin-status-codes -MIT -The MIT License (MIT) - -Copyright (c) Ben Drucker (bendrucker.me) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - call-bind MIT MIT License @@ -1712,19 +1911,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -cookiejar -MIT -The MIT License (MIT) -Copyright (c) 2013 Bradley Meck - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - - copy-to-clipboard MIT MIT License @@ -1750,29 +1936,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -core-util-is -MIT -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. - - create-ecdh MIT The MIT License (MIT) @@ -1875,31 +2038,6 @@ ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -decode-uri-component -MIT -The MIT License (MIT) - -Copyright (c) Sam Verschueren (github.com/SamVerschueren) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - define-properties MIT The MIT License (MIT) @@ -2001,11 +2139,11 @@ THE SOFTWARE. elliptic MIT -end-of-stream +es-abstract MIT The MIT License (MIT) -Copyright (c) 2014 Mathias Buus +Copyright (C) 2015 Jordan Harband Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -2025,11 +2163,12 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -es-abstract + +es-set-tostringtag MIT -The MIT License (MIT) +MIT License -Copyright (C) 2015 Jordan Harband +Copyright (c) 2022 ECMAScript Shims Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -2038,16 +2177,16 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. es-to-primitive @@ -2076,56 +2215,11 @@ SOFTWARE. -es5-ext -ISC -ISC License - -Copyright (c) 2011-2022, Mariusz Nowak, @medikoo, medikoo.com - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - - -es6-object-assign -MIT -Copyright (c) 2015-2017 Rubén Norte - -MIT License - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -eth-block-tracker +ethers MIT MIT License -Copyright (c) 2018 MetaMask +Copyright (c) 2019 Richard Moore Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -2143,54 +2237,40 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -eth-json-rpc-filters -ISC -ISC License +events +MIT +MIT -Copyright (c) 2020 MetaMask +Copyright Joyent, Inc. and other Node contributors. -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - -eth-json-rpc-middleware -ISC -ISC License - -Copyright (c) 2020 MetaMask - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. -eth-query -ISC -eth-rpc-errors +evp_bytestokey MIT -MIT License +The MIT License (MIT) -Copyright (c) 2019 MetaMask +Copyright (c) 2017 crypto-browserify contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -2211,14 +2291,35 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -eth-sig-util -ISC +function-bind +MIT +Copyright (c) 2013 Raynos. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + -ethereum-bloom-filters + +functions-have-names MIT MIT License -Copyright (c) 2019 Josh Stevens +Copyright (c) 2019 Jordan Harband Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -2239,11 +2340,11 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -ethereum-common +get-intrinsic MIT -The MIT License (MIT) +MIT License -Copyright (c) 2015 +Copyright (c) 2020 Jordan Harband Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -2264,42 +2365,62 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -ethereum-cryptography +has MIT -bip39-without-wordlist.js is based on bip39, which is released under the -ISC license by the Wei Lu and Daniel Cousens. Its license complete license can be found here: https://github.com/bitcoinjs/bip39/blob/0a0e74eac9f4b753939dd6368984900fdba1975b/LICENSE +Copyright (c) 2013 Thiago de Arruda -hdkey-without-crypto.js is based on hdkey, which is released under the -MIT license by the cryptocoinjs. Its license complete license can be found here: https://github.com/cryptocoinjs/hdkey/blob/87d5495ac8e4dfe9917ddcebf6788ce69c0695ff/LICENSE +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. -The rest of the project is released under this license: -Copyright 2019 The ethereum-cryptography contributors +has-property-descriptors +MIT +MIT License -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: +Copyright (c) 2022 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -ethereumjs-abi +has-proto MIT -The MIT License (MIT) +MIT License -Copyright (c) 2015 Alex Beregszaszi +Copyright (c) 2022 Inspect JS Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -2320,3084 +2441,306 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +has-symbols +MIT +MIT License -ethereumjs-tx -MPL-2.0 -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- +Copyright (c) 2016 Jordan Harband -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -1.3. "Contribution" - means Covered Software of a particular Contributor. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. -1.5. "Incompatible With Secondary Licenses" - means +has-tostringtag +MIT +MIT License - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or +Copyright (c) 2021 Inspect JS - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -1.6. "Executable Form" - means any form of the work other than Source Code Form. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -1.8. "License" - means this document. -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. +hash-base +MIT +The MIT License (MIT) -1.10. "Modifications" - means any of the following: +Copyright (c) 2016 Kirill Fomichev - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: - (b) any new file in Source Code Form that contains any Covered - Software. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. -1.13. "Source Code Form" - means the form of the work preferred for making modifications. +hash.js +MIT -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. +hmac-drbg +MIT -2. License Grants and Conditions --------------------------------- +hooks +MIT -2.1. Grants +ieee754 +BSD-3-Clause +Copyright 2008 Fair Oaks Labs, Inc. -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -2.2. Effective Date +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -2.3. Limitations on Grant Scope -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: +inherits +ISC +The ISC License -(a) for any code that a Contributor has removed from Covered Software; - or +Copyright (c) Isaac Z. Schlueter -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). -2.4. Subsequent Licenses -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). +internal-slot +MIT +MIT License -2.5. Representation +Copyright (c) 2019 Jordan Harband -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. - - -ethereumjs-util -MPL-2.0 -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. - - -ethers -MIT -MIT License - -Copyright (c) 2019 Richard Moore - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -ethjs-unit -MIT -The MIT License (MIT) - -Copyright (c) 2016 Nick Dodson - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -ethjs-util -MIT -The MIT License - -Copyright (c) 2016 Nick Dodson. nickdodson.com - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -eventemitter3 -MIT -The MIT License (MIT) - -Copyright (c) 2014 Arnout Kazemier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -events -MIT -MIT - -Copyright Joyent, Inc. and other Node contributors. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. - - -evp_bytestokey -MIT -The MIT License (MIT) - -Copyright (c) 2017 crypto-browserify contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -fast-deep-equal -MIT -MIT License - -Copyright (c) 2017 Evgeny Poberezkin - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -fast-safe-stringify -MIT -The MIT License (MIT) - -Copyright (c) 2016 David Mark Clements -Copyright (c) 2017 David Mark Clements & Matteo Collina -Copyright (c) 2018 David Mark Clements, Matteo Collina & Ruben Bridgewater - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -for-each -MIT -The MIT License (MIT) - -Copyright (c) 2012 Raynos. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - -foreach -MIT -The MIT License - -Copyright (c) 2013 Manuel Stofer - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - - -function-bind -MIT -Copyright (c) 2013 Raynos. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - - -functions-have-names -MIT -MIT License - -Copyright (c) 2019 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -get-intrinsic -MIT -MIT License - -Copyright (c) 2020 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -has -MIT -Copyright (c) 2013 Thiago de Arruda - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - - -has-property-descriptors -MIT -MIT License - -Copyright (c) 2022 Inspect JS - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -has-symbols -MIT -MIT License - -Copyright (c) 2016 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -has-tostringtag -MIT -MIT License - -Copyright (c) 2021 Inspect JS - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -hash-base -MIT -The MIT License (MIT) - -Copyright (c) 2016 Kirill Fomichev - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -hash.js -MIT - -hmac-drbg -MIT - -hooks -MIT - -https-browserify -MIT -This software is released under the MIT license: - -Copyright (c) James Halliday - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -ieee754 -BSD-3-Clause -Copyright 2008 Fair Oaks Labs, Inc. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -inherits -ISC -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - - - -internal-slot -MIT -MIT License - -Copyright (c) 2019 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -is-arguments -MIT -The MIT License (MIT) - -Copyright (c) 2014 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -is-callable -MIT -The MIT License (MIT) - -Copyright (c) 2015 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - -is-date-object -MIT -The MIT License (MIT) - -Copyright (c) 2015 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - -is-generator-function -MIT -The MIT License (MIT) - -Copyright (c) 2014 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -is-hex-prefixed -MIT -The MIT License - -Copyright (c) 2016 Nick Dodson. nickdodson.com - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -is-nan -MIT -The MIT License (MIT) - -Copyright (c) 2014 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -is-regex -MIT -The MIT License (MIT) - -Copyright (c) 2014 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -is-stream -MIT -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -is-symbol -MIT -The MIT License (MIT) - -Copyright (c) 2015 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - -is-typed-array -MIT -The MIT License (MIT) - -Copyright (c) 2015 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - -is-typedarray -MIT -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -isarray -MIT -MIT License - -Copyright (c) 2013 Julian Gruber - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -js-sha3 -MIT -Copyright 2015-2018 Chen, Yi-Cyuan - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -json-rpc-engine -ISC -ISC License - -Copyright (c) 2020 MetaMask - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - -json-rpc-random-id -ISC - -json-stable-stringify -MIT -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -jsonify -Public Domain - -keccak -MIT -The MIT License (MIT) - -Copyright (c) 2016-2019 https://github.com/cryptocoinjs/keccak contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -lodash -MIT -Copyright OpenJS Foundation and other contributors - -Based on Underscore.js, copyright Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/lodash/lodash - -The following license applies to all parts of this software except as -documented below: - -==== - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==== - -Copyright and related rights for sample code are waived via CC0. Sample -code is defined as all source code displayed within the prose of the -documentation. - -CC0: http://creativecommons.org/publicdomain/zero/1.0/ - -==== - -Files located in the node_modules and vendor directories are externally -maintained libraries used by this software which have their own -licenses; we recommend you read them, as their terms may differ from the -terms above. - - -lodash.merge -MIT -Copyright OpenJS Foundation and other contributors - -Based on Underscore.js, copyright Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/lodash/lodash - -The following license applies to all parts of this software except as -documented below: - -==== - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==== - -Copyright and related rights for sample code are waived via CC0. Sample -code is defined as all source code displayed within the prose of the -documentation. - -CC0: http://creativecommons.org/publicdomain/zero/1.0/ - -==== - -Files located in the node_modules and vendor directories are externally -maintained libraries used by this software which have their own -licenses; we recommend you read them, as their terms may differ from the -terms above. - - -loglevel -MIT -Copyright (c) 2013 Tim Perry - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - - -md5.js -MIT -The MIT License (MIT) - -Copyright (c) 2016 Kirill Fomichev - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -miller-rabin -MIT - -minimalistic-assert -ISC -Copyright 2015 Calvin Metcalf - -Permission to use, copy, modify, and/or distribute this software for any purpose -with or without fee is hereby granted, provided that the above copyright notice -and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - -minimalistic-crypto-utils -MIT - -number-to-bn -MIT -The MIT License - -Copyright (c) 2016 Nick Dodson. nickdodson.com - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -object-inspect -MIT -MIT License - -Copyright (c) 2013 James Halliday - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -object-is -MIT -The MIT License (MIT) - -Copyright (c) 2014 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -object-keys -MIT -The MIT License (MIT) - -Copyright (C) 2013 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -oboe -BSD -Copyright (c) 2013, Jim Higson -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -The views and conclusions contained in the software and documentation are those -of the authors and should not be interpreted as representing official policies, -either expressed or implied, of the FreeBSD Project. - -once -ISC -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - -os-browserify -MIT -The MIT License (MIT) - -Copyright (c) 2017 CoderPuppy - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -parse-asn1 -ISC -Copyright (c) 2017, crypto-browserify contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - -pbkdf2 -MIT -The MIT License (MIT) - -Copyright (c) 2014 Daniel Cousens - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -pify -MIT -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -preact -MIT -The MIT License (MIT) - -Copyright (c) 2015-present Jason Miller - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -preact-compat -MIT - -process -MIT -(The MIT License) - -Copyright (c) 2013 Roman Shtylman - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -process-nextick-args -MIT -# Copyright (c) 2015 Calvin Metcalf - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -**THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE.** - - -public-encrypt -MIT -Copyright (c) 2017 Calvin Metcalf - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -pump -MIT -The MIT License (MIT) - -Copyright (c) 2014 Mathias Buus - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -punycode -MIT -Copyright Mathias Bynens - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -pvtsutils -MIT -MIT License - -Copyright (c) 2017-2022 Peculiar Ventures, LLC - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -pvutils -MIT -MIT License - -Copyright (c) 2016-2019, Peculiar Ventures -All rights reserved. - -Author 2016-2019, Yury Strozhevsky - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -qrcode -MIT -The MIT License (MIT) - -Copyright (c) 2012 Ryan Day - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - - -query-string -MIT -MIT License - -Copyright (c) Sindre Sorhus (http://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -querystring -MIT - -Copyright 2012 Irakli Gozalishvili. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. - - -randombytes -MIT -MIT License - -Copyright (c) 2017 crypto-browserify - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -randomfill -MIT -MIT License - -Copyright (c) 2017 crypto-browserify - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -readable-stream -MIT -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - - -regexp.prototype.flags -MIT -The MIT License (MIT) - -Copyright (C) 2014 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - - -ripemd160 -MIT -The MIT License (MIT) - -Copyright (c) 2016 crypto-browserify - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -rlp -MPL-2.0 -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -Exhibit A - Source Code Form License Notice -------------------------------------------- +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. -You may add additional accurate notices of copyright ownership. +is-callable +MIT +The MIT License (MIT) -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- +Copyright (c) 2015 Jordan Harband - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -rxjs -Apache-2.0 - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - 1. Definitions. - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. +is-date-object +MIT +The MIT License (MIT) - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. +Copyright (c) 2015 Jordan Harband - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. +is-regex +MIT +The MIT License (MIT) - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." +Copyright (c) 2014 Jordan Harband - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and +is-symbol +MIT +The MIT License (MIT) - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and +Copyright (c) 2015 Jordan Harband - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. +isarray +MIT +MIT License - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. +Copyright (c) 2013 Julian Gruber - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: - END OF TERMS AND CONDITIONS +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. - APPENDIX: How to apply the Apache License to your work. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors +js-sha3 +MIT +Copyright 2015-2018 Chen, Yi-Cyuan - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: - http://www.apache.org/licenses/LICENSE-2.0 +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -safe-buffer +md5.js MIT The MIT License (MIT) -Copyright (c) Feross Aboukhadijeh +Copyright (c) 2016 Kirill Fomichev Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -5418,14 +2761,33 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -safe-event-emitter -ISC +miller-rabin +MIT + +minimalistic-assert +ISC +Copyright 2015 Calvin Metcalf + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + +minimalistic-crypto-utils +MIT -safe-regex-test +node-fetch MIT -MIT License +The MIT License (MIT) -Copyright (c) 2022 Jordan Harband +Copyright (c) 2016 David Frank Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -5446,11 +2808,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -safer-buffer + +object-inspect MIT MIT License -Copyright (c) 2018 Nikita Skovoroda +Copyright (c) 2013 James Halliday Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -5471,11 +2834,11 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -scrypt-js +object-keys MIT The MIT License (MIT) -Copyright (c) 2016 Richard Moore +Copyright (C) 2013 Jordan Harband Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -5495,16 +2858,28 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +parse-asn1 +ISC +Copyright (c) 2017, crypto-browserify contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -secp256k1 +pbkdf2 MIT The MIT License (MIT) -Copyright (c) 2014-2016 secp256k1-node contributors - -Parts of this software are based on bn.js, elliptic, hash.js -Copyright (c) 2014-2016 Fedor Indutny +Copyright (c) 2014 Daniel Cousens Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -5513,23 +2888,23 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -semaphore +preact +MIT +The MIT License (MIT) -sha.js -(MIT AND BSD-3-Clause) -Copyright (c) 2013-2018 sha.js contributors +Copyright (c) 2015-present Jason Miller Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -5550,41 +2925,63 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -Copyright (c) 1998 - 2009, Paul Johnston & Contributors -All rights reserved. +preact-compat +MIT -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +process +MIT +(The MIT License) -Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. +Copyright (c) 2013 Roman Shtylman -Redistributions in binary form must reproduce the above copyright notice, this -list of conditions and the following disclaimer in the documentation and/or -other materials provided with the distribution. +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: -Neither the name of the author nor the names of its contributors may be used to -endorse or promote products derived from this software without specific prior -written permission. +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +public-encrypt +MIT +Copyright (c) 2017 Calvin Metcalf -side-channel +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +pvtsutils MIT MIT License -Copyright (c) 2019 Jordan Harband +Copyright (c) 2017-2022 Peculiar Ventures, LLC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -5605,11 +3002,39 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -split-on-first +pvutils MIT MIT License -Copyright (c) Sindre Sorhus (sindresorhus.com) +Copyright (c) 2016-2019, Peculiar Ventures +All rights reserved. + +Author 2016-2019, Yury Strozhevsky + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +qrcode +MIT +The MIT License (MIT) + +Copyright (c) 2012 Ryan Day Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -5618,11 +3043,12 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -stream-browserify + +queue-microtask MIT -MIT License +The MIT License (MIT) -Copyright (c) James Halliday +Copyright (c) Feross Aboukhadijeh Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in @@ -5642,38 +3068,11 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -stream-http -MIT -The MIT License - -Copyright (c) 2015 John Hiesey - -Permission is hereby granted, free of charge, -to any person obtaining a copy of this software and -associated documentation files (the "Software"), to -deal in the Software without restriction, including -without limitation the rights to use, copy, modify, -merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom -the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -strict-uri-encode +randombytes MIT -The MIT License (MIT) +MIT License -Copyright (c) Kevin Martensson (github.com/kevva) +Copyright (c) 2017 crypto-browserify Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -5682,23 +3081,23 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -string.prototype.matchall +randomfill MIT -The MIT License (MIT) +MIT License -Copyright (c) 2015 Jordan Harband +Copyright (c) 2017 crypto-browserify Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -5719,8 +3118,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -string_decoder +readable-stream MIT Node.js is licensed for use as follows: @@ -5771,68 +3169,11 @@ IN THE SOFTWARE. """ - -strip-hex-prefix -MIT -The MIT License - -Copyright (c) 2016 Nick Dodson. nickdodson.com - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -through2 -MIT -# The MIT License (MIT) - -**Copyright (c) Rod Vagg (the "Original Author") and additional contributors** - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -toggle-selection -MIT - -tslib -0BSD -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - -typedarray-to-buffer +regexp.prototype.flags MIT The MIT License (MIT) -Copyright (c) Feross Aboukhadijeh +Copyright (C) 2014 Jordan Harband Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -5853,11 +3194,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -url + +ripemd160 MIT The MIT License (MIT) -Copyright Joyent, Inc. and other Node contributors. +Copyright (c) 2016 crypto-browserify Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -5878,247 +3220,267 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -utf8 -MIT -Copyright Mathias Bynens - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -util -MIT -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. - - -util-deprecate -MIT -(The MIT License) - -Copyright (c) 2014 Nathan Rajlich - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - +rxjs +Apache-2.0 + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -web3-core -LGPL-3.0 -This file is part of web3.js. + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -web3.js is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. + 1. Definitions. -web3.js is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. -You should have received a copy of the GNU Lesser General Public License -along with web3.js. If not, see . + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. -web3-core-helpers -LGPL-3.0 -This file is part of web3.js. + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. -web3.js is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. -web3.js is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. -You should have received a copy of the GNU Lesser General Public License -along with web3.js. If not, see . + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. -web3-core-method -LGPL-3.0 -This file is part of web3.js. + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." -web3.js is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. -web3.js is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. -You should have received a copy of the GNU Lesser General Public License -along with web3.js. If not, see . + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: -web3-core-promievent -LGPL-3.0 -This file is part of web3.js. + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and -web3.js is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and -web3.js is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and -You should have received a copy of the GNU Lesser General Public License -along with web3.js. If not, see . + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. -web3-core-requestmanager -LGPL-3.0 -This file is part of web3.js. + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. -web3.js is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. -web3.js is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. -You should have received a copy of the GNU Lesser General Public License -along with web3.js. If not, see . + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. -web3-core-subscriptions -LGPL-3.0 -This file is part of web3.js. + END OF TERMS AND CONDITIONS -web3.js is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. + APPENDIX: How to apply the Apache License to your work. -web3.js is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. -You should have received a copy of the GNU Lesser General Public License -along with web3.js. If not, see . + Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at -web3-eth-abi -LGPL-3.0 -This file is part of web3.js. + http://www.apache.org/licenses/LICENSE-2.0 -web3.js is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + -web3.js is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. -You should have received a copy of the GNU Lesser General Public License -along with web3.js. If not, see . +safe-buffer +MIT +The MIT License (MIT) +Copyright (c) Feross Aboukhadijeh -web3-eth-contract -LGPL-3.0 -This file is part of web3.js. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -web3.js is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. -web3.js is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. -You should have received a copy of the GNU Lesser General Public License -along with web3.js. If not, see . +safe-regex-test +MIT +MIT License -web3-eth-iban -LGPL-3.0 -This file is part of web3.js. +Copyright (c) 2022 Jordan Harband -web3.js is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -web3.js is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -You should have received a copy of the GNU Lesser General Public License -along with web3.js. If not, see . +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -web3-provider-engine +safer-buffer MIT MIT License -Copyright (c) 2018 MetaMask +Copyright (c) 2018 Nikita Skovoroda Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -6136,266 +3498,116 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +scrypt-js +MIT +The MIT License (MIT) + +Copyright (c) 2016 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. -web3-providers-http -LGPL-3.0 -This file is part of web3.js. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. -web3.js is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. -web3.js is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. -You should have received a copy of the GNU Lesser General Public License -along with web3.js. If not, see . +sha.js +(MIT AND BSD-3-Clause) +Copyright (c) 2013-2018 sha.js contributors +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -web3-providers-ipc -LGPL-3.0 -This file is part of web3.js. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -web3.js is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -web3.js is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. -You should have received a copy of the GNU Lesser General Public License -along with web3.js. If not, see . +Copyright (c) 1998 - 2009, Paul Johnston & Contributors +All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -web3-providers-ws -LGPL-3.0 -This file is part of web3.js. +Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. -web3.js is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. +Redistributions in binary form must reproduce the above copyright notice, this +list of conditions and the following disclaimer in the documentation and/or +other materials provided with the distribution. -web3.js is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. +Neither the name of the author nor the names of its contributors may be used to +endorse or promote products derived from this software without specific prior +written permission. -You should have received a copy of the GNU Lesser General Public License -along with web3.js. If not, see . +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -web3-utils -LGPL-3.0 -This file is part of web3.js. -web3.js is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. +sha3 +MIT +Copyright 2012 Phusion -web3.js is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: -You should have received a copy of the GNU Lesser General Public License -along with web3.js. If not, see . +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -websocket -Apache-2.0 - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - - -which-typed-array +side-channel MIT -The MIT License (MIT) +MIT License -Copyright (c) 2015 Jordan Harband +Copyright (c) 2019 Jordan Harband Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -6416,31 +3628,35 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +stream-browserify +MIT +MIT License -wrappy -ISC -The ISC License +Copyright (c) James Halliday -Copyright (c) Isaac Z. Schlueter and Contributors +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -ws +string.prototype.matchall MIT The MIT License (MIT) -Copyright (c) 2011 Einar Otto Stangvik +Copyright (c) 2015 Jordan Harband Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -6461,13 +3677,110 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -xhr2-cookies + +string_decoder +MIT +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + + + +toggle-selection +MIT + +tslib +0BSD +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + +util-deprecate MIT +(The MIT License) + +Copyright (c) 2014 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. -xtend + +ws MIT The MIT License (MIT) -Copyright (c) 2012-2014 Raynos. + +Copyright (c) 2011 Einar Otto Stangvik Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -6476,16 +3789,16 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. zone.js diff --git a/angular-bare-bones-demo/dist/475.6a2a9d0889779f15.js b/angular-bare-bones-demo/dist/475.6a2a9d0889779f15.js new file mode 100644 index 000000000..17aee6d83 --- /dev/null +++ b/angular-bare-bones-demo/dist/475.6a2a9d0889779f15.js @@ -0,0 +1 @@ +(self.webpackChunkAngular_bare_bones_demo=self.webpackChunkAngular_bare_bones_demo||[]).push([[475],{1859:(z,u,h)=>{"use strict";h.r(u),h.d(u,{detectEnv:()=>m,detectOS:()=>E,formatIOSMobile:()=>_e,formatMobileRegistry:()=>me,formatMobileRegistryEntry:()=>re,getClientMeta:()=>ae,getCrypto:()=>Ie,getCryptoOrThrow:()=>Oe,getDappRegistryUrl:()=>j,getDocument:()=>$,getDocumentOrThrow:()=>V,getFromWindow:()=>R,getFromWindowOrThrow:()=>Y,getLocal:()=>Ae,getLocalStorage:()=>de,getLocalStorageOrThrow:()=>De,getLocation:()=>ne,getLocationOrThrow:()=>ge,getMobileLinkRegistry:()=>Ke,getMobileRegistryEntry:()=>$e,getNavigator:()=>Z,getNavigatorOrThrow:()=>K,getWalletRegistryUrl:()=>G,isAndroid:()=>U,isBrowser:()=>D,isIOS:()=>H,isMobile:()=>I,isNode:()=>F,mobileLinkChoiceKey:()=>le,removeLocal:()=>Le,safeJsonParse:()=>Ne,safeJsonStringify:()=>be,saveMobileLinkInfo:()=>Ve,setLocal:()=>Te});var i=h(8359),o=h(7167),l=function b(T,W,X){this.name=T,this.version=W,this.os=X,this.type="browser"},r=function b(T){this.version=T,this.type="node",this.name="node",this.os=process.platform},s=function b(T,W,X,te){this.name=T,this.version=W,this.os=X,this.bot=te,this.type="bot-device"},d=function b(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},g=function b(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},L=/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,x=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],N=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function S(b){var T=function P(b){return""!==b&&x.reduce(function(T,W){var X=W[0];if(T)return T;var ce=W[1].exec(b);return!!ce&&[X,ce]},!1)}(b);if(!T)return null;var W=T[0],X=T[1];if("searchbot"===W)return new d;var te=X[1]&&X[1].split(/[._]/).slice(0,3);te?te.length<3&&(te=function(){for(var b=0,T=0,W=arguments.length;T"u"&&typeof navigator<"u"&&"ReactNative"===navigator.product?new g:typeof navigator<"u"?S(navigator.userAgent):function f(){return typeof process<"u"&&process.version?new r(process.version.slice(1)):null}()}(b)}function E(){const b=m();return b&&b.os?b.os:void 0}function U(){const b=E();return!!b&&b.toLowerCase().includes("android")}function H(){const b=E();return!!b&&(b.toLowerCase().includes("ios")||b.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1)}function I(){return!!E()&&(U()||H())}function F(){const b=m();return!(!b||!b.name)&&"node"===b.name.toLowerCase()}function D(){return!F()&&!!Z()}const R=o.getFromWindow,Y=o.getFromWindowOrThrow,V=o.getDocumentOrThrow,$=o.getDocument,K=o.getNavigatorOrThrow,Z=o.getNavigator,ge=o.getLocationOrThrow,ne=o.getLocation,Oe=o.getCryptoOrThrow,Ie=o.getCrypto,De=o.getLocalStorageOrThrow,de=o.getLocalStorage;function ae(){return i.D()}const Ne=function Se(b){if("string"!=typeof b)throw new Error("Cannot safe json parse value of type "+typeof b);try{return JSON.parse(b)}catch{return b}},be=function Ce(b){return"string"==typeof b?b:JSON.stringify(b)};function Te(b,T){const W=be(T),X=de();X&&X.setItem(b,W)}function Ae(b){let T=null,W=null;const X=de();return X&&(W=X.getItem(b)),T=W&&Ne(W),T}function Le(b){const T=de();T&&T.removeItem(b)}const le="WALLETCONNECT_DEEPLINK_CHOICE";function _e(b,T){const W=encodeURIComponent(b);return T.universalLink?`${T.universalLink}/wc?uri=${W}`:T.deepLink?`${T.deepLink}${T.deepLink.endsWith(":")?"//":"/"}wc?uri=${W}`:""}function Ve(b){const T=b.href.split("?")[0];Te(le,Object.assign(Object.assign({},b),{href:T}))}function $e(b,T){return b.filter(W=>W.name.toLowerCase().includes(T.toLowerCase()))[0]}function Ke(b,T){let W=b;return T&&(W=T.map(X=>$e(b,X)).filter(Boolean)),W}const w="https://registry.walletconnect.com";function G(){return w+"/api/v2/wallets"}function j(){return w+"/api/v2/dapps"}function re(b,T="mobile"){var W;return{name:b.name||"",shortName:b.metadata.shortName||"",color:b.metadata.colors.primary||"",logo:null!==(W=b.image_url.sm)&&void 0!==W?W:"",universalLink:b[T].universal||"",deepLink:b[T].native||""}}function me(b,T="mobile"){return Object.values(b).filter(W=>!!W[T].universal||!!W[T].native).map(W=>re(W,T))}},5475:(z,u,h)=>{function i(w){return w&&"object"==typeof w&&"default"in w?w.default:w}var o=h(1859),a=i(h(6877)),l=i(h(6967)),r=h(3312);typeof Symbol<"u"&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),typeof Symbol<"u"&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var P="walletconnect-wrapper",O="walletconnect-style-sheet",S="walletconnect-qrcode-modal",f="walletconnect-qrcode-text";function m(w){return r.createElement("div",{className:"walletconnect-modal__header"},r.createElement("img",{src:"data:image/svg+xml,%3Csvg height='185' viewBox='0 0 300 185' width='300' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m61.4385429 36.2562612c48.9112241-47.8881663 128.2119871-47.8881663 177.1232091 0l5.886545 5.7634174c2.445561 2.3944081 2.445561 6.2765112 0 8.6709204l-20.136695 19.715503c-1.222781 1.1972051-3.2053 1.1972051-4.428081 0l-8.100584-7.9311479c-34.121692-33.4079817-89.443886-33.4079817-123.5655788 0l-8.6750562 8.4936051c-1.2227816 1.1972041-3.205301 1.1972041-4.4280806 0l-20.1366949-19.7155031c-2.4455612-2.3944092-2.4455612-6.2765122 0-8.6709204zm218.7677961 40.7737449 17.921697 17.546897c2.445549 2.3943969 2.445563 6.2764769.000031 8.6708899l-80.810171 79.121134c-2.445544 2.394426-6.410582 2.394453-8.85616.000062-.00001-.00001-.000022-.000022-.000032-.000032l-57.354143-56.154572c-.61139-.598602-1.60265-.598602-2.21404 0-.000004.000004-.000007.000008-.000011.000011l-57.3529212 56.154531c-2.4455368 2.394432-6.4105755 2.394472-8.8561612.000087-.0000143-.000014-.0000296-.000028-.0000449-.000044l-80.81241943-79.122185c-2.44556021-2.394408-2.44556021-6.2765115 0-8.6709197l17.92172963-17.5468673c2.4455602-2.3944082 6.4105989-2.3944082 8.8561602 0l57.3549775 56.155357c.6113908.598602 1.602649.598602 2.2140398 0 .0000092-.000009.0000174-.000017.0000265-.000024l57.3521031-56.155333c2.445505-2.3944633 6.410544-2.3945531 8.856161-.0002.000034.0000336.000068.0000673.000101.000101l57.354902 56.155432c.61139.598601 1.60265.598601 2.21404 0l57.353975-56.1543249c2.445561-2.3944092 6.410599-2.3944092 8.85616 0z' fill='%233b99fc'/%3E%3C/svg%3E",className:"walletconnect-modal__headerLogo"}),r.createElement("p",null,"WalletConnect"),r.createElement("div",{className:"walletconnect-modal__close__wrapper",onClick:w.onClose},r.createElement("div",{id:"walletconnect-qrcode-close",className:"walletconnect-modal__close__icon"},r.createElement("div",{className:"walletconnect-modal__close__line1"}),r.createElement("div",{className:"walletconnect-modal__close__line2"}))))}function E(w){return r.createElement("a",{className:"walletconnect-connect__button",href:w.href,id:"walletconnect-connect-button-"+w.name,onClick:w.onClick,rel:"noopener noreferrer",style:{backgroundColor:w.color},target:"_blank"},w.name)}function H(w){var G=w.color,me=w.logo;return r.createElement("a",{className:"walletconnect-modal__base__row",href:w.href,onClick:w.onClick,rel:"noopener noreferrer",target:"_blank"},r.createElement("h3",{className:"walletconnect-modal__base__row__h3"},w.name),r.createElement("div",{className:"walletconnect-modal__base__row__right"},r.createElement("div",{className:"walletconnect-modal__base__row__right__app-icon",style:{background:"url('"+me+"') "+G,backgroundSize:"100%"}}),r.createElement("img",{src:"data:image/svg+xml,%3Csvg fill='none' height='18' viewBox='0 0 8 18' width='8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath clip-rule='evenodd' d='m.586301.213898c-.435947.33907-.5144813.967342-.175411 1.403292l4.87831 6.27212c.28087.36111.28087.86677 0 1.22788l-4.878311 6.27211c-.33907.436-.260536 1.0642.175412 1.4033.435949.3391 1.064219.2605 1.403289-.1754l4.87832-6.2721c.84259-1.08336.84259-2.60034 0-3.68367l-4.87832-6.27212c-.33907-.4359474-.96734-.514482-1.403289-.175412z' fill='%233c4252' fill-rule='evenodd'/%3E%3C/svg%3E",className:"walletconnect-modal__base__row__right__caret"})))}function I(w){var re=w.name,T=window.innerWidth<768?(re.length>8?2.5:2.7)+"vw":"inherit";return r.createElement("a",{className:"walletconnect-connect__button__icon_anchor",href:w.href,onClick:w.onClick,rel:"noopener noreferrer",target:"_blank"},r.createElement("div",{className:"walletconnect-connect__button__icon",style:{background:"url('"+w.logo+"') "+w.color,backgroundSize:"100%"}}),r.createElement("div",{style:{fontSize:T},className:"walletconnect-connect__button__text"},re))}function R(w){var G=o.isAndroid(),j=r.useState(""),re=j[0],me=j[1],b=r.useState(""),T=b[0],W=b[1],X=r.useState(1),te=X[0],ce=X[1],ie=T?w.links.filter(function(he){return he.name.toLowerCase().includes(T.toLowerCase())}):w.links,pe=w.errorMessage,Re=T||ie.length>5,Ue=Math.ceil(ie.length/12),Fe=[12*(te-1)+1,12*te],We=ie.length?ie.filter(function(he,ve){return ve+1>=Fe[0]&&ve+1<=Fe[1]}):[],Je=!G&&Ue>1,ze=void 0;return r.createElement("div",null,r.createElement("p",{id:f,className:"walletconnect-qrcode__text"},G?w.text.connect_mobile_wallet:w.text.choose_preferred_wallet),!G&&r.createElement("input",{className:"walletconnect-search__input",placeholder:"Search",value:re,onChange:function Ge(he){me(he.target.value),clearTimeout(ze),he.target.value?ze=setTimeout(function(){W(he.target.value),ce(1)},1e3):(me(""),W(""),ce(1))}}),r.createElement("div",{className:"walletconnect-connect__buttons__wrapper"+(G?"__android":Re&&ie.length?"__wrap":"")},G?r.createElement(E,{name:w.text.connect,color:"rgb(64, 153, 255)",href:w.uri,onClick:r.useCallback(function(){o.saveMobileLinkInfo({name:"Unknown",href:w.uri})},[])}):We.length?We.map(function(he){var ve=he.color,Ee=he.name,Pe=he.shortName,Qe=he.logo,xe=o.formatIOSMobile(w.uri,he),Me=r.useCallback(function(){o.saveMobileLinkInfo({name:Ee,href:xe})},[We]);return Re?r.createElement(I,{color:ve,href:xe,name:Pe||Ee,logo:Qe,onClick:Me}):r.createElement(H,{color:ve,href:xe,name:Ee,logo:Qe,onClick:Me})}):r.createElement(r.Fragment,null,r.createElement("p",null,pe.length?w.errorMessage:w.links.length&&!ie.length?w.text.no_wallets_found:w.text.loading))),Je&&r.createElement("div",{className:"walletconnect-modal__footer"},Array(Ue).fill(0).map(function(he,ve){var Ee=ve+1;return r.createElement("a",{style:{margin:"auto 10px",fontWeight:te===Ee?"bold":"normal"},onClick:function(){return ce(Ee)}},Ee)})))}function Y(w){var G=!!w.message.trim();return r.createElement("div",{className:"walletconnect-qrcode__notification"+(G?" notification__show":"")},w.message)}function $(w){var G=r.useState(""),j=G[0],re=G[1],me=r.useState(""),b=me[0],T=me[1];return r.useEffect(function(){try{return Promise.resolve(function(w){try{var G="";return Promise.resolve(a.toString(w,{margin:0,type:"svg"})).then(function(j){return"string"==typeof j&&(G=j.replace("0||r.useEffect(function(){!function(){try{if(G)return Promise.resolve();T(!0);var je=function L(w,G){try{var j=w()}catch(re){return G(re)}return j&&j.then?j.then(void 0,G):j}(function(){var He=w.qrcodeModalOptions&&w.qrcodeModalOptions.registryUrl?w.qrcodeModalOptions.registryUrl:o.getWalletRegistryUrl();return Promise.resolve(fetch(He)).then(function(Ze){return Promise.resolve(Ze.json()).then(function(qe){var Ye=o.getMobileLinkRegistry(o.formatMobileRegistry(qe.listings,j?"mobile":"desktop"),re);T(!1),te(!0),xe(Ye.length?"":w.text.no_supported_wallets),Ee(Ye);var Xe=1===Ye.length;Xe&&(We(o.formatIOSMobile(w.uri,Ye[0])),pe(!0)),Ge(Xe)})})},function(He){T(!1),te(!0),xe(w.text.something_went_wrong),console.error(He)});Promise.resolve(je&&je.then?je.then(function(){}):void 0)}catch(He){return Promise.reject(He)}}()})};Me();var tt=j?ie:!ie;return r.createElement("div",{id:S,className:"walletconnect-qrcode__base animated fadeIn"},r.createElement("div",{className:"walletconnect-modal__base"},r.createElement(m,{onClose:w.onClose}),ze&&ie?r.createElement("div",{className:"walletconnect-modal__single_wallet"},r.createElement("a",{onClick:function(){return o.saveMobileLinkInfo({name:ve[0].name,href:Fe})},href:Fe,rel:"noopener noreferrer",target:"_blank"},w.text.connect_with+" "+(ze?ve[0].name:"")+" \u203a")):G||b||!b&&ve.length?r.createElement("div",{className:"walletconnect-modal__mobile__toggle"+(tt?" right__selected":"")},r.createElement("div",{className:"walletconnect-modal__mobile__toggle_selector"}),j?r.createElement(r.Fragment,null,r.createElement("a",{onClick:function(){return pe(!1),Me()}},w.text.mobile),r.createElement("a",{onClick:function(){return pe(!0)}},w.text.qrcode)):r.createElement(r.Fragment,null,r.createElement("a",{onClick:function(){return pe(!0)}},w.text.qrcode),r.createElement("a",{onClick:function(){return pe(!1),Me()}},w.text.desktop))):null,r.createElement("div",null,ie||!G&&!b&&!ve.length?r.createElement($,Object.assign({},Re)):r.createElement(R,Object.assign({},Re,{links:ve,errorMessage:Qe})))))}var Se={de:{choose_preferred_wallet:"W\xe4hle bevorzugte Wallet",connect_mobile_wallet:"Verbinde mit Mobile Wallet",scan_qrcode_with_wallet:"Scanne den QR-code mit einer WalletConnect kompatiblen Wallet",connect:"Verbinden",qrcode:"QR-Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"In die Zwischenablage kopieren",copied_to_clipboard:"In die Zwischenablage kopiert!",connect_with:"Verbinden mit Hilfe von",loading:"Laden...",something_went_wrong:"Etwas ist schief gelaufen",no_supported_wallets:"Es gibt noch keine unterst\xfctzten Wallet",no_wallets_found:"keine Wallet gefunden"},en:{choose_preferred_wallet:"Choose your preferred wallet",connect_mobile_wallet:"Connect to Mobile Wallet",scan_qrcode_with_wallet:"Scan QR code with a WalletConnect-compatible wallet",connect:"Connect",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copy to clipboard",copied_to_clipboard:"Copied to clipboard!",connect_with:"Connect with",loading:"Loading...",something_went_wrong:"Something went wrong",no_supported_wallets:"There are no supported wallets yet",no_wallets_found:"No wallets found"},es:{choose_preferred_wallet:"Elige tu billetera preferida",connect_mobile_wallet:"Conectar a billetera m\xf3vil",scan_qrcode_with_wallet:"Escanea el c\xf3digo QR con una billetera compatible con WalletConnect",connect:"Conectar",qrcode:"C\xf3digo QR",mobile:"M\xf3vil",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Conectar mediante",loading:"Cargando...",something_went_wrong:"Algo sali\xf3 mal",no_supported_wallets:"Todav\xeda no hay billeteras compatibles",no_wallets_found:"No se encontraron billeteras"},fr:{choose_preferred_wallet:"Choisissez votre portefeuille pr\xe9f\xe9r\xe9",connect_mobile_wallet:"Se connecter au portefeuille mobile",scan_qrcode_with_wallet:"Scannez le QR code avec un portefeuille compatible WalletConnect",connect:"Se connecter",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copier",copied_to_clipboard:"Copi\xe9!",connect_with:"Connectez-vous \xe0 l'aide de",loading:"Chargement...",something_went_wrong:"Quelque chose a mal tourn\xe9",no_supported_wallets:"Il n'y a pas encore de portefeuilles pris en charge",no_wallets_found:"Aucun portefeuille trouv\xe9"},ko:{choose_preferred_wallet:"\uc6d0\ud558\ub294 \uc9c0\uac11\uc744 \uc120\ud0dd\ud558\uc138\uc694",connect_mobile_wallet:"\ubaa8\ubc14\uc77c \uc9c0\uac11\uacfc \uc5f0\uacb0",scan_qrcode_with_wallet:"WalletConnect \uc9c0\uc6d0 \uc9c0\uac11\uc5d0\uc11c QR\ucf54\ub4dc\ub97c \uc2a4\uce94\ud558\uc138\uc694",connect:"\uc5f0\uacb0",qrcode:"QR \ucf54\ub4dc",mobile:"\ubaa8\ubc14\uc77c",desktop:"\ub370\uc2a4\ud06c\ud0d1",copy_to_clipboard:"\ud074\ub9bd\ubcf4\ub4dc\uc5d0 \ubcf5\uc0ac",copied_to_clipboard:"\ud074\ub9bd\ubcf4\ub4dc\uc5d0 \ubcf5\uc0ac\ub418\uc5c8\uc2b5\ub2c8\ub2e4!",connect_with:"\uc640 \uc5f0\uacb0\ud558\ub2e4",loading:"\ub85c\ub4dc \uc911...",something_went_wrong:"\ubb38\uc81c\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4.",no_supported_wallets:"\uc544\uc9c1 \uc9c0\uc6d0\ub418\ub294 \uc9c0\uac11\uc774 \uc5c6\uc2b5\ub2c8\ub2e4",no_wallets_found:"\uc9c0\uac11\uc744 \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4"},pt:{choose_preferred_wallet:"Escolha sua carteira preferida",connect_mobile_wallet:"Conectar-se \xe0 carteira m\xf3vel",scan_qrcode_with_wallet:"Ler o c\xf3digo QR com uma carteira compat\xedvel com WalletConnect",connect:"Conectar",qrcode:"C\xf3digo QR",mobile:"M\xf3vel",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Ligar por meio de",loading:"Carregamento...",something_went_wrong:"Algo correu mal",no_supported_wallets:"Ainda n\xe3o h\xe1 carteiras suportadas",no_wallets_found:"Nenhuma carteira encontrada"},zh:{choose_preferred_wallet:"\u9009\u62e9\u4f60\u7684\u94b1\u5305",connect_mobile_wallet:"\u8fde\u63a5\u81f3\u79fb\u52a8\u7aef\u94b1\u5305",scan_qrcode_with_wallet:"\u4f7f\u7528\u517c\u5bb9 WalletConnect \u7684\u94b1\u5305\u626b\u63cf\u4e8c\u7ef4\u7801",connect:"\u8fde\u63a5",qrcode:"\u4e8c\u7ef4\u7801",mobile:"\u79fb\u52a8",desktop:"\u684c\u9762",copy_to_clipboard:"\u590d\u5236\u5230\u526a\u8d34\u677f",copied_to_clipboard:"\u590d\u5236\u5230\u526a\u8d34\u677f\u6210\u529f\uff01",connect_with:"\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u8fde\u63a5",loading:"\u6b63\u5728\u52a0\u8f7d...",something_went_wrong:"\u51fa\u4e86\u95ee\u9898",no_supported_wallets:"\u76ee\u524d\u8fd8\u6ca1\u6709\u652f\u6301\u7684\u94b1\u5305",no_wallets_found:"\u6ca1\u6709\u627e\u5230\u94b1\u5305"},fa:{choose_preferred_wallet:"\u06a9\u06cc\u0641 \u067e\u0648\u0644 \u0645\u0648\u0631\u062f \u0646\u0638\u0631 \u062e\u0648\u062f \u0631\u0627 \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0646\u06cc\u062f",connect_mobile_wallet:"\u0628\u0647 \u06a9\u06cc\u0641 \u067e\u0648\u0644 \u0645\u0648\u0628\u0627\u06cc\u0644 \u0648\u0635\u0644 \u0634\u0648\u06cc\u062f",scan_qrcode_with_wallet:"\u06a9\u062f QR \u0631\u0627 \u0628\u0627 \u06cc\u06a9 \u06a9\u06cc\u0641 \u067e\u0648\u0644 \u0633\u0627\u0632\u06af\u0627\u0631 \u0628\u0627 WalletConnect \u0627\u0633\u06a9\u0646 \u06a9\u0646\u06cc\u062f",connect:"\u0627\u062a\u0635\u0627\u0644",qrcode:"\u06a9\u062f QR",mobile:"\u0633\u06cc\u0627\u0631",desktop:"\u062f\u0633\u06a9\u062a\u0627\u067e",copy_to_clipboard:"\u06a9\u067e\u06cc \u0628\u0647 \u06a9\u0644\u06cc\u067e \u0628\u0648\u0631\u062f",copied_to_clipboard:"\u062f\u0631 \u06a9\u0644\u06cc\u067e \u0628\u0648\u0631\u062f \u06a9\u067e\u06cc \u0634\u062f!",connect_with:"\u0627\u0631\u062a\u0628\u0627\u0637 \u0628\u0627",loading:"...\u0628\u0627\u0631\u06af\u0630\u0627\u0631\u06cc",something_went_wrong:"\u0645\u0634\u06a9\u0644\u06cc \u067e\u06cc\u0634 \u0622\u0645\u062f",no_supported_wallets:"\u0647\u0646\u0648\u0632 \u0647\u06cc\u0686 \u06a9\u06cc\u0641 \u067e\u0648\u0644 \u067e\u0634\u062a\u06cc\u0628\u0627\u0646\u06cc \u0634\u062f\u0647 \u0627\u06cc \u0648\u062c\u0648\u062f \u0646\u062f\u0627\u0631\u062f",no_wallets_found:"\u0647\u06cc\u0686 \u06a9\u06cc\u0641 \u067e\u0648\u0644\u06cc \u067e\u06cc\u062f\u0627 \u0646\u0634\u062f"}};function be(){var w=o.getDocumentOrThrow(),G=w.getElementById(S);G&&(G.className=G.className.replace("fadeIn","fadeOut"),setTimeout(function(){var j=w.getElementById(P);j&&w.body.removeChild(j)},300))}function Te(w){return function(){be(),w&&w()}}function Ae(){var w=o.getNavigatorOrThrow().language.split("-")[0]||"en";return Se[w]||Se.en}var _e=function(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"};z.exports={open:function Ve(w,G,j){console.log(w),_e()?function s(w){a.toString(w,{type:"terminal"}).then(console.log)}(w):function Le(w,G,j){!function Ce(){var w=o.getDocumentOrThrow(),G=w.getElementById(O);G&&w.head.removeChild(G);var j=w.createElement("style");j.setAttribute("id",O),j.innerText=':root {\n --animation-duration: 300ms;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n.animated {\n animation-duration: var(--animation-duration);\n animation-fill-mode: both;\n}\n\n.fadeIn {\n animation-name: fadeIn;\n}\n\n.fadeOut {\n animation-name: fadeOut;\n}\n\n#walletconnect-wrapper {\n -webkit-user-select: none;\n align-items: center;\n display: flex;\n height: 100%;\n justify-content: center;\n left: 0;\n pointer-events: none;\n position: fixed;\n top: 0;\n user-select: none;\n width: 100%;\n z-index: 99999999999999;\n}\n\n.walletconnect-modal__headerLogo {\n height: 21px;\n}\n\n.walletconnect-modal__header p {\n color: #ffffff;\n font-size: 20px;\n font-weight: 600;\n margin: 0;\n align-items: flex-start;\n display: flex;\n flex: 1;\n margin-left: 5px;\n}\n\n.walletconnect-modal__close__wrapper {\n position: absolute;\n top: 0px;\n right: 0px;\n z-index: 10000;\n background: white;\n border-radius: 26px;\n padding: 6px;\n box-sizing: border-box;\n width: 26px;\n height: 26px;\n cursor: pointer;\n}\n\n.walletconnect-modal__close__icon {\n position: relative;\n top: 7px;\n right: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n transform: rotate(45deg);\n}\n\n.walletconnect-modal__close__line1 {\n position: absolute;\n width: 100%;\n border: 1px solid rgb(48, 52, 59);\n}\n\n.walletconnect-modal__close__line2 {\n position: absolute;\n width: 100%;\n border: 1px solid rgb(48, 52, 59);\n transform: rotate(90deg);\n}\n\n.walletconnect-qrcode__base {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n background: rgba(37, 41, 46, 0.95);\n height: 100%;\n left: 0;\n pointer-events: auto;\n position: fixed;\n top: 0;\n transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n width: 100%;\n will-change: opacity;\n padding: 40px;\n box-sizing: border-box;\n}\n\n.walletconnect-qrcode__text {\n color: rgba(60, 66, 82, 0.6);\n font-size: 16px;\n font-weight: 600;\n letter-spacing: 0;\n line-height: 1.1875em;\n margin: 10px 0 20px 0;\n text-align: center;\n width: 100%;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-qrcode__text {\n font-size: 4vw;\n }\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-qrcode__text {\n font-size: 14px;\n }\n}\n\n.walletconnect-qrcode__image {\n width: calc(100% - 30px);\n box-sizing: border-box;\n cursor: none;\n margin: 0 auto;\n}\n\n.walletconnect-qrcode__notification {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n font-size: 16px;\n padding: 16px 20px;\n border-radius: 16px;\n text-align: center;\n transition: all 0.1s ease-in-out;\n background: white;\n color: black;\n margin-bottom: -60px;\n opacity: 0;\n}\n\n.walletconnect-qrcode__notification.notification__show {\n opacity: 1;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-modal__header {\n height: 130px;\n }\n .walletconnect-modal__base {\n overflow: auto;\n }\n}\n\n@media only screen and (min-device-width: 415px) and (max-width: 768px) {\n #content {\n max-width: 768px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (min-width: 375px) and (max-width: 415px) {\n #content {\n max-width: 414px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (min-width: 320px) and (max-width: 375px) {\n #content {\n max-width: 375px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (max-width: 320px) {\n #content {\n max-width: 320px;\n box-sizing: border-box;\n }\n}\n\n.walletconnect-modal__base {\n -webkit-font-smoothing: antialiased;\n background: #ffffff;\n border-radius: 24px;\n box-shadow: 0 10px 50px 5px rgba(0, 0, 0, 0.4);\n font-family: ui-rounded, "SF Pro Rounded", "SF Pro Text", medium-content-sans-serif-font,\n -apple-system, BlinkMacSystemFont, ui-sans-serif, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,\n "Open Sans", "Helvetica Neue", sans-serif;\n margin-top: 41px;\n padding: 24px 24px 22px;\n pointer-events: auto;\n position: relative;\n text-align: center;\n transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n will-change: transform;\n overflow: visible;\n transform: translateY(-50%);\n top: 50%;\n max-width: 500px;\n margin: auto;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-modal__base {\n padding: 24px 12px;\n }\n}\n\n.walletconnect-modal__base .hidden {\n transform: translateY(150%);\n transition: 0.125s cubic-bezier(0.4, 0, 1, 1);\n}\n\n.walletconnect-modal__header {\n align-items: center;\n display: flex;\n height: 26px;\n left: 0;\n justify-content: space-between;\n position: absolute;\n top: -42px;\n width: 100%;\n}\n\n.walletconnect-modal__base .wc-logo {\n align-items: center;\n display: flex;\n height: 26px;\n margin-top: 15px;\n padding-bottom: 15px;\n pointer-events: auto;\n}\n\n.walletconnect-modal__base .wc-logo div {\n background-color: #3399ff;\n height: 21px;\n margin-right: 5px;\n mask-image: url("images/wc-logo.svg") center no-repeat;\n width: 32px;\n}\n\n.walletconnect-modal__base .wc-logo p {\n color: #ffffff;\n font-size: 20px;\n font-weight: 600;\n margin: 0;\n}\n\n.walletconnect-modal__base h2 {\n color: rgba(60, 66, 82, 0.6);\n font-size: 16px;\n font-weight: 600;\n letter-spacing: 0;\n line-height: 1.1875em;\n margin: 0 0 19px 0;\n text-align: center;\n width: 100%;\n}\n\n.walletconnect-modal__base__row {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n align-items: center;\n border-radius: 20px;\n cursor: pointer;\n display: flex;\n height: 56px;\n justify-content: space-between;\n padding: 0 15px;\n position: relative;\n margin: 0px 0px 8px;\n text-align: left;\n transition: 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n will-change: transform;\n text-decoration: none;\n}\n\n.walletconnect-modal__base__row:hover {\n background: rgba(60, 66, 82, 0.06);\n}\n\n.walletconnect-modal__base__row:active {\n background: rgba(60, 66, 82, 0.06);\n transform: scale(0.975);\n transition: 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n}\n\n.walletconnect-modal__base__row__h3 {\n color: #25292e;\n font-size: 20px;\n font-weight: 700;\n margin: 0;\n padding-bottom: 3px;\n}\n\n.walletconnect-modal__base__row__right {\n align-items: center;\n display: flex;\n justify-content: center;\n}\n\n.walletconnect-modal__base__row__right__app-icon {\n border-radius: 8px;\n height: 34px;\n margin: 0 11px 2px 0;\n width: 34px;\n background-size: 100%;\n box-shadow: 0 4px 12px 0 rgba(37, 41, 46, 0.25);\n}\n\n.walletconnect-modal__base__row__right__caret {\n height: 18px;\n opacity: 0.3;\n transition: 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n width: 8px;\n will-change: opacity;\n}\n\n.walletconnect-modal__base__row:hover .caret,\n.walletconnect-modal__base__row:active .caret {\n opacity: 0.6;\n}\n\n.walletconnect-modal__mobile__toggle {\n width: 80%;\n display: flex;\n margin: 0 auto;\n position: relative;\n overflow: hidden;\n border-radius: 8px;\n margin-bottom: 18px;\n background: #d4d5d9;\n}\n\n.walletconnect-modal__single_wallet {\n display: flex;\n justify-content: center;\n margin-top: 7px;\n margin-bottom: 18px;\n}\n\n.walletconnect-modal__single_wallet a {\n cursor: pointer;\n color: rgb(64, 153, 255);\n font-size: 21px;\n font-weight: 800;\n text-decoration: none !important;\n margin: 0 auto;\n}\n\n.walletconnect-modal__mobile__toggle_selector {\n width: calc(50% - 8px);\n background: white;\n position: absolute;\n border-radius: 5px;\n height: calc(100% - 8px);\n top: 4px;\n transition: all 0.2s ease-in-out;\n transform: translate3d(4px, 0, 0);\n}\n\n.walletconnect-modal__mobile__toggle.right__selected .walletconnect-modal__mobile__toggle_selector {\n transform: translate3d(calc(100% + 12px), 0, 0);\n}\n\n.walletconnect-modal__mobile__toggle a {\n font-size: 12px;\n width: 50%;\n text-align: center;\n padding: 8px;\n margin: 0;\n font-weight: 600;\n z-index: 1;\n}\n\n.walletconnect-modal__footer {\n display: flex;\n justify-content: center;\n margin-top: 20px;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-modal__footer {\n margin-top: 5vw;\n }\n}\n\n.walletconnect-modal__footer a {\n cursor: pointer;\n color: #898d97;\n font-size: 15px;\n margin: 0 auto;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-modal__footer a {\n font-size: 14px;\n }\n}\n\n.walletconnect-connect__buttons__wrapper {\n max-height: 44vh;\n}\n\n.walletconnect-connect__buttons__wrapper__android {\n margin: 50% 0;\n}\n\n.walletconnect-connect__buttons__wrapper__wrap {\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n margin: 10px 0;\n}\n\n@media only screen and (min-width: 768px) {\n .walletconnect-connect__buttons__wrapper__wrap {\n margin-top: 40px;\n }\n}\n\n.walletconnect-connect__button {\n background-color: rgb(64, 153, 255);\n padding: 12px;\n border-radius: 8px;\n text-decoration: none;\n color: rgb(255, 255, 255);\n font-weight: 500;\n}\n\n.walletconnect-connect__button__icon_anchor {\n cursor: pointer;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n margin: 8px;\n width: 42px;\n justify-self: center;\n flex-direction: column;\n text-decoration: none !important;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-connect__button__icon_anchor {\n margin: 4px;\n }\n}\n\n.walletconnect-connect__button__icon {\n border-radius: 10px;\n height: 42px;\n margin: 0;\n width: 42px;\n background-size: cover !important;\n box-shadow: 0 4px 12px 0 rgba(37, 41, 46, 0.25);\n}\n\n.walletconnect-connect__button__text {\n color: #424952;\n font-size: 2.7vw;\n text-decoration: none !important;\n padding: 0;\n margin-top: 1.8vw;\n font-weight: 600;\n}\n\n@media only screen and (min-width: 768px) {\n .walletconnect-connect__button__text {\n font-size: 16px;\n margin-top: 12px;\n }\n}\n\n.walletconnect-search__input {\n border: none;\n background: #d4d5d9;\n border-style: none;\n padding: 8px 16px;\n outline: none;\n font-style: normal;\n font-stretch: normal;\n font-size: 16px;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: normal;\n text-align: left;\n border-radius: 8px;\n width: calc(100% - 16px);\n margin: 0;\n margin-bottom: 8px;\n}\n',w.head.appendChild(j)}();var re=function Ne(){var w=o.getDocumentOrThrow(),G=w.createElement("div");return G.setAttribute("id",P),w.body.appendChild(G),G}();r.render(r.createElement(K,{text:Ae(),uri:w,onClose:Te(G),qrcodeModalOptions:j}),re)}(w,G,j)},close:function $e(){_e()||function le(){be()}()}}},7167:(z,u)=>{"use strict";function h(x){let N;return typeof window<"u"&&typeof window[x]<"u"&&(N=window[x]),N}function i(x){const N=h(x);if(!N)throw new Error(`${x} is not defined in Window`);return N}Object.defineProperty(u,"__esModule",{value:!0}),u.getLocalStorage=u.getLocalStorageOrThrow=u.getCrypto=u.getCryptoOrThrow=u.getLocation=u.getLocationOrThrow=u.getNavigator=u.getNavigatorOrThrow=u.getDocument=u.getDocumentOrThrow=u.getFromWindowOrThrow=u.getFromWindow=void 0,u.getFromWindow=h,u.getFromWindowOrThrow=i,u.getDocumentOrThrow=function o(){return i("document")},u.getDocument=function a(){return h("document")},u.getNavigatorOrThrow=function l(){return i("navigator")},u.getNavigator=function r(){return h("navigator")},u.getLocationOrThrow=function s(){return i("location")},u.getLocation=function d(){return h("location")},u.getCryptoOrThrow=function g(){return i("crypto")},u.getCrypto=function y(){return h("crypto")},u.getLocalStorageOrThrow=function L(){return i("localStorage")},u.getLocalStorage=function M(){return h("localStorage")}},8359:(z,u,h)=>{"use strict";u.D=void 0;const o=h(7167);u.D=function a(){let l,r;try{l=o.getDocumentOrThrow(),r=o.getLocationOrThrow()}catch{return null}function d(...P){const O=l.getElementsByTagName("meta");for(let S=0;Sp.getAttribute(c)).filter(c=>!!c&&P.includes(c));if(f.length&&f){const c=p.getAttribute("content");if(c)return c}}return""}const L=function g(){let P=d("name","og:site_name","og:title","twitter:title");return P||(P=l.title),P}();return{description:function y(){return d("description","og:description","twitter:description","keywords")}(),url:r.origin,icons:function s(){const P=l.getElementsByTagName("link"),O=[];for(let S=0;S-1){const c=p.getAttribute("href");if(c)if(-1===c.toLowerCase().indexOf("https:")&&-1===c.toLowerCase().indexOf("http:")&&0!==c.indexOf("//")){let m=r.protocol+"//"+r.host;if(0===c.indexOf("/"))m+=c;else{const E=r.pathname.split("/");E.pop(),m+=E.join("/")+"/"+c}O.push(m)}else 0===c.indexOf("//")?O.push(r.protocol+c):O.push(c)}}return O}(),name:L}}},6967:(z,u,h)=>{"use strict";var i=h(5311),o={"text/plain":"Text","text/html":"Url",default:"Text"};z.exports=function r(s,d){var g,y,L,M,x,N,A=!1;d||(d={}),g=d.debug||!1;try{if(L=i(),M=document.createRange(),x=document.getSelection(),(N=document.createElement("span")).textContent=s,N.ariaHidden="true",N.style.all="unset",N.style.position="fixed",N.style.top=0,N.style.clip="rect(0, 0, 0, 0)",N.style.whiteSpace="pre",N.style.webkitUserSelect="text",N.style.MozUserSelect="text",N.style.msUserSelect="text",N.style.userSelect="text",N.addEventListener("copy",function(O){O.stopPropagation(),d.format&&(O.preventDefault(),typeof O.clipboardData>"u"?(g&&console.warn("unable to use e.clipboardData"),g&&console.warn("trying IE specific stuff"),window.clipboardData.clearData(),window.clipboardData.setData(o[d.format]||o.default,s)):(O.clipboardData.clearData(),O.clipboardData.setData(d.format,s))),d.onCopy&&(O.preventDefault(),d.onCopy(O.clipboardData))}),document.body.appendChild(N),M.selectNodeContents(N),x.addRange(M),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");A=!0}catch(O){g&&console.error("unable to copy using execCommand: ",O),g&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(d.format||"text",s),d.onCopy&&d.onCopy(window.clipboardData),A=!0}catch(S){g&&console.error("unable to copy using clipboardData: ",S),g&&console.error("falling back to prompt"),y=function l(s){var d=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return s.replace(/#{\s*key\s*}/g,d)}("message"in d?d.message:"Copy to clipboard: #{key}, Enter"),window.prompt(y,s)}}finally{x&&("function"==typeof x.removeRange?x.removeRange(M):x.removeAllRanges()),N&&document.body.removeChild(N),L()}return A}},8333:z=>{"use strict";var u={single_source_shortest_paths:function(h,i,o){var a={},l={};l[i]=0;var s,d,g,y,L,x,r=u.PriorityQueue.make();for(r.push(i,0);!r.empty();)for(g in y=(s=r.pop()).cost,L=h[d=s.value]||{})L.hasOwnProperty(g)&&(x=y+L[g],(typeof l[g]>"u"||l[g]>x)&&(l[g]=x,r.push(g,x),a[g]=d));if(typeof o<"u"&&typeof l[o]>"u"){var P=["Could not find a path from ",i," to ",o,"."].join("");throw new Error(P)}return a},extract_shortest_path_from_predecessor_list:function(h,i){for(var o=[],a=i;a;)o.push(a),a=h[a];return o.reverse(),o},find_path:function(h,i,o){var a=u.single_source_shortest_paths(h,i,o);return u.extract_shortest_path_from_predecessor_list(a,o)},PriorityQueue:{make:function(h){var a,i=u.PriorityQueue,o={};for(a in h=h||{},i)i.hasOwnProperty(a)&&(o[a]=i[a]);return o.queue=[],o.sorter=h.sorter||i.default_sorter,o},default_sorter:function(h,i){return h.cost-i.cost},push:function(h,i){this.queue.push({value:h,cost:i}),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};z.exports=u},5105:z=>{var u={}.toString;z.exports=Array.isArray||function(h){return"[object Array]"==u.call(h)}},3312:(z,u,h)=>{"use strict";h.r(u),h.d(u,{Children:()=>Ge,Component:()=>p,Fragment:()=>S,PureComponent:()=>Ue,Suspense:()=>Ee,SuspenseList:()=>xe,cloneElement:()=>lt,createContext:()=>De,createElement:()=>A,createFactory:()=>it,createPortal:()=>je,createRef:()=>O,default:()=>dt,findDOMNode:()=>ut,forwardRef:()=>Je,hydrate:()=>rt,isValidElement:()=>ot,lazy:()=>Qe,memo:()=>Fe,render:()=>qe,unmountComponentAtNode:()=>ct,unstable_batchedUpdates:()=>st,useCallback:()=>re,useContext:()=>me,useDebugValue:()=>b,useEffect:()=>$e,useErrorBoundary:()=>T,useImperativeHandle:()=>G,useLayoutEffect:()=>Ke,useMemo:()=>j,useReducer:()=>Ve,useRef:()=>w,useState:()=>_e,version:()=>ft});var i,a,l,r,s,d,g,y={},L=[],M=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function x(e,t){for(var n in t)e[n]=t[n];return e}function N(e){var t=e.parentNode;t&&t.removeChild(e)}function A(e,t,n){var _,k=arguments,v={};for(_ in t)"key"!==_&&"ref"!==_&&(v[_]=t[_]);if(arguments.length>3)for(n=[n],_=3;_2&&(t.children=L.slice.call(arguments,2)),n={},t)"key"!==_&&"ref"!==_&&(n[_]=t[_]);return P(e.type,n,t.key||e.key,t.ref||e.ref,null)}function De(e){var t={},n={__c:"__cC"+g++,__:e,Consumer:function(_,k){return _.children(k)},Provider:function(_){var k,v=this;return this.getChildContext||(k=[],this.getChildContext=function(){return t[n.__c]=v,t},this.shouldComponentUpdate=function(J){v.props.value!==J.value&&k.some(function(Q){Q.context=J.value,m(Q)})},this.sub=function(J){k.push(J);var Q=J.componentWillUnmount;J.componentWillUnmount=function(){k.splice(k.indexOf(J),1),Q&&Q.call(J)}}),_.children}};return n.Consumer.contextType=n,n.Provider.__=n,n}i={__e:function(e,t){for(var n,_;t=t.__;)if((n=t.__c)&&!n.__)try{if(n.constructor&&null!=n.constructor.getDerivedStateFromError&&(_=!0,n.setState(n.constructor.getDerivedStateFromError(e))),null!=n.componentDidCatch&&(_=!0,n.componentDidCatch(e)),_)return m(n.__E=n)}catch(k){e=k}throw e}},p.prototype.setState=function(e,t){var n;n=this.__s!==this.state?this.__s:this.__s=x({},this.state),"function"==typeof e&&(e=e(n,this.props)),e&&x(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),m(this))},p.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),m(this))},p.prototype.render=S,a=[],l=0,r="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,d=y,g=0;var de,ae,Se,Ce=0,Ne=[],be=i.__r,Te=i.diffed,Ae=i.__c,Le=i.unmount;function le(e,t){i.__h&&i.__h(ae,e,Ce||t),Ce=0;var n=ae.__H||(ae.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function _e(e){return Ce=1,Ve(ie,e)}function Ve(e,t,n){var _=le(de++,2);return _.__c||(_.__c=ae,_.__=[n?n(t):ie(void 0,t),function(k){var v=e(_.__[0],k);_.__[0]!==v&&(_.__[0]=v,_.__c.setState({}))}]),_.__}function $e(e,t){var n=le(de++,3);!i.__s&&ce(n.__H,t)&&(n.__=e,n.__H=t,ae.__H.__h.push(n))}function Ke(e,t){var n=le(de++,4);!i.__s&&ce(n.__H,t)&&(n.__=e,n.__H=t,ae.__h.push(n))}function w(e){return Ce=5,j(function(){return{current:e}},[])}function G(e,t,n){Ce=6,Ke(function(){"function"==typeof e?e(t()):e&&(e.current=t())},null==n?n:n.concat(e))}function j(e,t){var n=le(de++,7);return ce(n.__H,t)?(n.__H=t,n.__h=e,n.__=e()):n.__}function re(e,t){return Ce=8,j(function(){return e},t)}function me(e){var t=ae.context[e.__c],n=le(de++,9);return n.__c=e,t?(null==n.__&&(n.__=!0,t.sub(ae)),t.props.value):e.__}function b(e,t){i.useDebugValue&&i.useDebugValue(t?t(e):e)}function T(e){var t=le(de++,10),n=_e();return t.__=e,ae.componentDidCatch||(ae.componentDidCatch=function(_){t.__&&t.__(_),n[1](_)}),[n[0],function(){n[1](void 0)}]}function W(){Ne.some(function(e){if(e.__P)try{e.__H.__h.forEach(X),e.__H.__h.forEach(te),e.__H.__h=[]}catch(t){return e.__H.__h=[],i.__e(t,e.__v),!0}}),Ne=[]}function X(e){e.t&&e.t()}function te(e){var t=e.__();"function"==typeof t&&(e.t=t)}function ce(e,t){return!e||t.some(function(n,_){return n!==e[_]})}function ie(e,t){return"function"==typeof t?t(e):t}function pe(e,t){for(var n in t)e[n]=t[n];return e}function Re(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var _ in t)if("__source"!==_&&e[_]!==t[_])return!0;return!1}i.__r=function(e){be&&be(e),de=0,(ae=e.__c).__H&&(ae.__H.__h.forEach(X),ae.__H.__h.forEach(te),ae.__H.__h=[])},i.diffed=function(e){Te&&Te(e);var t=e.__c;if(t){var n=t.__H;n&&n.__h.length&&(1!==Ne.push(t)&&Se===i.requestAnimationFrame||((Se=i.requestAnimationFrame)||function(_){var k,v=function(){clearTimeout(J),cancelAnimationFrame(k),setTimeout(_)},J=setTimeout(v,100);typeof window<"u"&&(k=requestAnimationFrame(v))})(W))}},i.__c=function(e,t){t.some(function(n){try{n.__h.forEach(X),n.__h=n.__h.filter(function(_){return!_.__||te(_)})}catch(_){t.some(function(k){k.__h&&(k.__h=[])}),t=[],i.__e(_,n.__v)}}),Ae&&Ae(e,t)},i.unmount=function(e){Le&&Le(e);var t=e.__c;if(t){var n=t.__H;if(n)try{n.__.forEach(function(_){return _.t&&_.t()})}catch(_){i.__e(_,t.__v)}}};var Ue=function(e){var t,n;function _(k){var v;return(v=e.call(this,k)||this).isPureReactComponent=!0,v}return n=e,(t=_).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,_.prototype.shouldComponentUpdate=function(k,v){return Re(this.props,k)||Re(this.state,v)},_}(p);function Fe(e,t){function n(k){var v=this.props.ref,J=v==k.ref;return!J&&v&&(v.call?v(null):v.current=null),t?!t(this.props,k)||!J:Re(this.props,k)}function _(k){return this.shouldComponentUpdate=n,A(e,pe({},k))}return _.prototype.isReactComponent=!0,_.displayName="Memo("+(e.displayName||e.name)+")",_.t=!0,_}var We=i.__b;function Je(e){function t(n){var _=pe({},n);return delete _.ref,e(_,n.ref)}return t.prototype.isReactComponent=t.t=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}i.__b=function(e){e.type&&e.type.t&&e.ref&&(e.props.ref=e.ref,e.ref=null),We&&We(e)};var ze=function(e,t){return e?H(e).reduce(function(n,_,k){return n.concat(t(_,k))},[]):null},Ge={map:ze,forEach:ze,count:function(e){return e?H(e).length:0},only:function(e){if(1!==(e=H(e)).length)throw new Error("Children.only() expects only one child.");return e[0]},toArray:H},he=i.__e;function ve(e){return e&&((e=pe({},e)).__c=null,e.__k=e.__k&&e.__k.map(ve)),e}function Ee(){this.__u=0,this.o=null,this.__b=null}function Pe(e){var t=e.__.__c;return t&&t.u&&t.u(e)}function Qe(e){var t,n,_;function k(v){if(t||(t=e()).then(function(J){n=J.default||J},function(J){_=J}),_)throw _;if(!n)throw t;return A(n,v)}return k.displayName="Lazy",k.t=!0,k}function xe(){this.i=null,this.l=null}i.__e=function(e,t,n){if(e.then)for(var _,k=t;k=k.__;)if((_=k.__c)&&_.__c)return _.__c(e,t.__c);he(e,t,n)},(Ee.prototype=new p).__c=function(e,t){var n=this;null==n.o&&(n.o=[]),n.o.push(t);var _=Pe(n.__v),k=!1,v=function(){k||(k=!0,_?_(J):J())};t.__c=t.componentWillUnmount,t.componentWillUnmount=function(){v(),t.__c&&t.__c()};var J=function(){var Q;if(!--n.__u)for(n.__v.__k[0]=n.state.u,n.setState({u:n.__b=null});Q=n.o.pop();)Q.forceUpdate()};n.__u++||n.setState({u:n.__b=n.__v.__k[0]}),e.then(v,v)},Ee.prototype.render=function(e,t){return this.__b&&(this.__v.__k[0]=ve(this.__b),this.__b=null),[A(p,null,t.u?null:e.children),t.u&&e.fallback]};var Me=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]{var i=h(436),o=h(1191),a=h(2158),l=h(173);function r(s,d,g,y,L){var M=[].slice.call(arguments,1),x=M.length,N="function"==typeof M[x-1];if(!N&&!i())throw new Error("Callback required as last argument");if(!N){if(x<1)throw new Error("Too few arguments provided");return 1===x?(g=d,d=y=void 0):2===x&&!d.getContext&&(y=g,g=d,d=void 0),new Promise(function(P,O){try{var S=o.create(g,y);P(s(S,d,y))}catch(p){O(p)}})}if(x<2)throw new Error("Too few arguments provided");2===x?(L=g,g=d,d=y=void 0):3===x&&(d.getContext&&typeof L>"u"?(L=y,y=void 0):(L=y,y=g,g=d,d=void 0));try{var A=o.create(g,y);L(null,s(A,d,y))}catch(P){L(P)}}u.create=o.create,u.toCanvas=r.bind(null,a.render),u.toDataURL=r.bind(null,a.renderToDataURL),u.toString=r.bind(null,function(s,d,g){return l.render(s,g)})},436:z=>{z.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},6448:(z,u,h)=>{var i=h(5402).getSymbolSize;u.getRowColCoords=function(a){if(1===a)return[];for(var l=Math.floor(a/7)+2,r=i(a),s=145===r?26:2*Math.ceil((r-13)/(2*l-2)),d=[r-7],g=1;g{var i=h(3141),o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function a(l){this.mode=i.ALPHANUMERIC,this.data=l}a.getBitsLength=function(r){return 11*Math.floor(r/2)+r%2*6},a.prototype.getLength=function(){return this.data.length},a.prototype.getBitsLength=function(){return a.getBitsLength(this.data.length)},a.prototype.write=function(r){var s;for(s=0;s+2<=this.data.length;s+=2){var d=45*o.indexOf(this.data[s]);d+=o.indexOf(this.data[s+1]),r.put(d,11)}this.data.length%2&&r.put(o.indexOf(this.data[s]),6)},z.exports=a},7258:z=>{function u(){this.buffer=[],this.length=0}u.prototype={get:function(h){var i=Math.floor(h/8);return 1==(this.buffer[i]>>>7-h%8&1)},put:function(h,i){for(var o=0;o>>i-o-1&1))},getLengthInBits:function(){return this.length},putBit:function(h){var i=Math.floor(this.length/8);this.buffer.length<=i&&this.buffer.push(0),h&&(this.buffer[i]|=128>>>this.length%8),this.length++}},z.exports=u},8104:(z,u,h)=>{var i=h(9657);function o(a){if(!a||a<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=a,this.data=i.alloc(a*a),this.reservedBit=i.alloc(a*a)}o.prototype.set=function(a,l,r,s){var d=a*this.size+l;this.data[d]=r,s&&(this.reservedBit[d]=!0)},o.prototype.get=function(a,l){return this.data[a*this.size+l]},o.prototype.xor=function(a,l,r){this.data[a*this.size+l]^=r},o.prototype.isReserved=function(a,l){return this.reservedBit[a*this.size+l]},z.exports=o},2860:(z,u,h)=>{var i=h(9657),o=h(3141);function a(l){this.mode=o.BYTE,this.data=i.from(l)}a.getBitsLength=function(r){return 8*r},a.prototype.getLength=function(){return this.data.length},a.prototype.getBitsLength=function(){return a.getBitsLength(this.data.length)},a.prototype.write=function(l){for(var r=0,s=this.data.length;r{var i=h(3997),o=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],a=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];u.getBlocksCount=function(r,s){switch(s){case i.L:return o[4*(r-1)+0];case i.M:return o[4*(r-1)+1];case i.Q:return o[4*(r-1)+2];case i.H:return o[4*(r-1)+3];default:return}},u.getTotalCodewordsCount=function(r,s){switch(s){case i.L:return a[4*(r-1)+0];case i.M:return a[4*(r-1)+1];case i.Q:return a[4*(r-1)+2];case i.H:return a[4*(r-1)+3];default:return}}},3997:(z,u)=>{u.L={bit:1},u.M={bit:0},u.Q={bit:3},u.H={bit:2},u.isValid=function(o){return o&&typeof o.bit<"u"&&o.bit>=0&&o.bit<4},u.from=function(o,a){if(u.isValid(o))return o;try{return function h(i){if("string"!=typeof i)throw new Error("Param is not a string");switch(i.toLowerCase()){case"l":case"low":return u.L;case"m":case"medium":return u.M;case"q":case"quartile":return u.Q;case"h":case"high":return u.H;default:throw new Error("Unknown EC Level: "+i)}}(o)}catch{return a}}},1224:(z,u,h)=>{var i=h(5402).getSymbolSize;u.getPositions=function(l){var r=i(l);return[[0,0],[r-7,0],[0,r-7]]}},4482:(z,u,h)=>{var i=h(5402),l=i.getBCHDigit(1335);u.getEncodedBits=function(s,d){for(var g=s.bit<<3|d,y=g<<10;i.getBCHDigit(y)-l>=0;)y^=1335<{var i=h(9657),o=i.alloc(512),a=i.alloc(256);(function(){for(var r=1,s=0;s<255;s++)o[s]=r,a[r]=s,256&(r<<=1)&&(r^=285);for(s=255;s<512;s++)o[s]=o[s-255]})(),u.log=function(r){if(r<1)throw new Error("log("+r+")");return a[r]},u.exp=function(r){return o[r]},u.mul=function(r,s){return 0===r||0===s?0:o[a[r]+a[s]]}},1909:(z,u,h)=>{var i=h(3141),o=h(5402);function a(l){this.mode=i.KANJI,this.data=l}a.getBitsLength=function(r){return 13*r},a.prototype.getLength=function(){return this.data.length},a.prototype.getBitsLength=function(){return a.getBitsLength(this.data.length)},a.prototype.write=function(l){var r;for(r=0;r=33088&&s<=40956)s-=33088;else{if(!(s>=57408&&s<=60351))throw new Error("Invalid SJIS character: "+this.data[r]+"\nMake sure your charset is UTF-8");s-=49472}l.put(s=192*(s>>>8&255)+(255&s),13)}},z.exports=a},1976:(z,u)=>{u.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};function i(o,a,l){switch(o){case u.Patterns.PATTERN000:return(a+l)%2==0;case u.Patterns.PATTERN001:return a%2==0;case u.Patterns.PATTERN010:return l%3==0;case u.Patterns.PATTERN011:return(a+l)%3==0;case u.Patterns.PATTERN100:return(Math.floor(a/2)+Math.floor(l/3))%2==0;case u.Patterns.PATTERN101:return a*l%2+a*l%3==0;case u.Patterns.PATTERN110:return(a*l%2+a*l%3)%2==0;case u.Patterns.PATTERN111:return(a*l%3+(a+l)%2)%2==0;default:throw new Error("bad maskPattern:"+o)}}u.isValid=function(a){return null!=a&&""!==a&&!isNaN(a)&&a>=0&&a<=7},u.from=function(a){return u.isValid(a)?parseInt(a,10):void 0},u.getPenaltyN1=function(a){for(var l=a.size,r=0,s=0,d=0,g=null,y=null,L=0;L=5&&(r+=s-5+3),g=x,s=1),(x=a.get(M,L))===y?d++:(d>=5&&(r+=d-5+3),y=x,d=1)}s>=5&&(r+=s-5+3),d>=5&&(r+=d-5+3)}return r},u.getPenaltyN2=function(a){for(var l=a.size,r=0,s=0;s=10&&(1488===s||93===s)&&r++,d=d<<1&2047|a.get(y,g),y>=10&&(1488===d||93===d)&&r++}return 40*r},u.getPenaltyN4=function(a){for(var l=0,r=a.data.length,s=0;s{var i=h(4200),o=h(2679);u.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},u.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},u.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},u.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},u.MIXED={bit:-1},u.getCharCountIndicator=function(r,s){if(!r.ccBits)throw new Error("Invalid mode: "+r);if(!i.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?r.ccBits[0]:s<27?r.ccBits[1]:r.ccBits[2]},u.getBestModeForData=function(r){return o.testNumeric(r)?u.NUMERIC:o.testAlphanumeric(r)?u.ALPHANUMERIC:o.testKanji(r)?u.KANJI:u.BYTE},u.toString=function(r){if(r&&r.id)return r.id;throw new Error("Invalid mode")},u.isValid=function(r){return r&&r.bit&&r.ccBits},u.from=function(r,s){if(u.isValid(r))return r;try{return function a(l){if("string"!=typeof l)throw new Error("Param is not a string");switch(l.toLowerCase()){case"numeric":return u.NUMERIC;case"alphanumeric":return u.ALPHANUMERIC;case"kanji":return u.KANJI;case"byte":return u.BYTE;default:throw new Error("Unknown mode: "+l)}}(r)}catch{return s}}},580:(z,u,h)=>{var i=h(3141);function o(a){this.mode=i.NUMERIC,this.data=a.toString()}o.getBitsLength=function(l){return 10*Math.floor(l/3)+(l%3?l%3*3+1:0)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(l){var r,s,d;for(r=0;r+3<=this.data.length;r+=3)s=this.data.substr(r,3),d=parseInt(s,10),l.put(d,10);var g=this.data.length-r;g>0&&(s=this.data.substr(r),d=parseInt(s,10),l.put(d,3*g+1))},z.exports=o},830:(z,u,h)=>{var i=h(9657),o=h(567);u.mul=function(l,r){for(var s=i.alloc(l.length+r.length-1),d=0;d=0;){for(var d=s[0],g=0;g{var i=h(9657),o=h(5402),a=h(3997),l=h(7258),r=h(8104),s=h(6448),d=h(1224),g=h(1976),y=h(7291),L=h(6041),M=h(160),x=h(4482),N=h(3141),A=h(1769),P=h(5105);function c(I,F,D){var V,$,R=I.size,Y=x.getEncodedBits(F,D);for(V=0;V<15;V++)I.set(V<6?V:V<8?V+1:R-15+V,8,$=1==(Y>>V&1),!0),I.set(8,V<8?R-V-1:V<9?15-V-1+1:15-V-1,$,!0);I.set(R-8,8,1,!0)}function H(I,F,D,R){var Y;if(P(I))Y=A.fromArray(I);else{if("string"!=typeof I)throw new Error("Invalid data");var V=F;if(!V){var $=A.rawSplit(I);V=M.getBestVersionForData($,D)}Y=A.fromString(I,V||40)}var K=M.getBestVersionForData(Y,D);if(!K)throw new Error("The amount of data is too big to be stored in a QR Code");if(F){if(F=0&&K<=6&&(0===Z||6===Z)||Z>=0&&Z<=6&&(0===K||6===K)||K>=2&&K<=4&&Z>=2&&Z<=4,!0)}(ne,F),function S(I){for(var F=I.size,D=8;D=7&&function f(I,F){for(var Y,V,$,D=I.size,R=M.getEncodedBits(F),K=0;K<18;K++)Y=Math.floor(K/3),I.set(Y,V=K%3+D-8-3,$=1==(R>>K&1),!0),I.set(V,Y,$,!0)}(ne,F),function m(I,F){for(var D=I.size,R=-1,Y=D-1,V=7,$=0,K=D-1;K>0;K-=2)for(6===K&&K--;;){for(var Z=0;Z<2;Z++)if(!I.isReserved(Y,K-Z)){var ge=!1;$>>V&1)),I.set(Y,K-Z,ge),-1==--V&&($++,V=7)}if((Y+=R)<0||D<=Y){Y-=R,R=-R;break}}}(ne,Z),isNaN(R)&&(R=g.getBestMask(ne,c.bind(null,ne,D))),g.applyMask(R,ne),c(ne,D,R),{modules:ne,version:F,errorCorrectionLevel:D,maskPattern:R,segments:Y}}u.create=function(F,D){if(typeof F>"u"||""===F)throw new Error("No input text");var Y,V,R=a.M;return typeof D<"u"&&(R=a.from(D.errorCorrectionLevel,a.M),Y=M.from(D.version),V=g.from(D.maskPattern),D.toSJISFunc&&o.setToSJISFunction(D.toSJISFunc)),H(F,Y,R,V)}},6041:(z,u,h)=>{var i=h(9657),o=h(830),a=h(3875).Buffer;function l(r){this.genPoly=void 0,this.degree=r,this.degree&&this.initialize(this.degree)}l.prototype.initialize=function(s){this.degree=s,this.genPoly=o.generateECPolynomial(this.degree)},l.prototype.encode=function(s){if(!this.genPoly)throw new Error("Encoder not initialized");var d=i.alloc(this.degree),g=a.concat([s,d],s.length+this.degree),y=o.mod(g,this.genPoly),L=this.degree-y.length;if(L>0){var M=i.alloc(this.degree);return y.copy(M,L),M}return y},z.exports=l},2679:(z,u)=>{var h="[0-9]+",o="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",a="(?:(?![A-Z0-9 $%*+\\-./:]|"+(o=o.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";u.KANJI=new RegExp(o,"g"),u.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),u.BYTE=new RegExp(a,"g"),u.NUMERIC=new RegExp(h,"g"),u.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var l=new RegExp("^"+o+"$"),r=new RegExp("^"+h+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");u.testKanji=function(g){return l.test(g)},u.testNumeric=function(g){return r.test(g)},u.testAlphanumeric=function(g){return s.test(g)}},1769:(z,u,h)=>{var i=h(3141),o=h(580),a=h(2793),l=h(2860),r=h(1909),s=h(2679),d=h(5402),g=h(8333);function y(S){return unescape(encodeURIComponent(S)).length}function L(S,p,f){for(var m,c=[];null!==(m=S.exec(f));)c.push({data:m[0],index:m.index,mode:p,length:m[0].length});return c}function M(S){var c,m,p=L(s.NUMERIC,i.NUMERIC,S),f=L(s.ALPHANUMERIC,i.ALPHANUMERIC,S);return d.isKanjiModeEnabled()?(c=L(s.BYTE,i.BYTE,S),m=L(s.KANJI,i.KANJI,S)):(c=L(s.BYTE_KANJI,i.BYTE,S),m=[]),p.concat(f,c,m).sort(function(U,H){return U.index-H.index}).map(function(U){return{data:U.data,mode:U.mode,length:U.length}})}function x(S,p){switch(p){case i.NUMERIC:return o.getBitsLength(S);case i.ALPHANUMERIC:return a.getBitsLength(S);case i.KANJI:return r.getBitsLength(S);case i.BYTE:return l.getBitsLength(S)}}function O(S,p){var f,c=i.getBestModeForData(S);if((f=i.from(p,c))!==i.BYTE&&f.bit=0?p[p.length-1]:null;return c&&c.mode===f.mode?(p[p.length-1].data+=f.data,p):(p.push(f),p)},[])}(H))},u.rawSplit=function(p){return u.fromArray(M(p,d.isKanjiModeEnabled()))}},5402:(z,u)=>{var h,i=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];u.getSymbolSize=function(a){if(!a)throw new Error('"version" cannot be null or undefined');if(a<1||a>40)throw new Error('"version" should be in range from 1 to 40');return 4*a+17},u.getSymbolTotalCodewords=function(a){return i[a]},u.getBCHDigit=function(o){for(var a=0;0!==o;)a++,o>>>=1;return a},u.setToSJISFunction=function(a){if("function"!=typeof a)throw new Error('"toSJISFunc" is not a valid function.');h=a},u.isKanjiModeEnabled=function(){return typeof h<"u"},u.toSJIS=function(a){return h(a)}},4200:(z,u)=>{u.isValid=function(i){return!isNaN(i)&&i>=1&&i<=40}},160:(z,u,h)=>{var i=h(5402),o=h(7291),a=h(3997),l=h(3141),r=h(4200),s=h(5105),g=i.getBCHDigit(7973);function L(N,A){return l.getCharCountIndicator(N,A)+4}function M(N,A){var P=0;return N.forEach(function(O){var S=L(O.mode,A);P+=S+O.getBitsLength()}),P}u.from=function(A,P){return r.isValid(A)?parseInt(A,10):P},u.getCapacity=function(A,P,O){if(!r.isValid(A))throw new Error("Invalid QR Code version");typeof O>"u"&&(O=l.BYTE);var f=8*(i.getSymbolTotalCodewords(A)-o.getTotalCodewordsCount(A,P));if(O===l.MIXED)return f;var c=f-L(O,A);switch(O){case l.NUMERIC:return Math.floor(c/10*3);case l.ALPHANUMERIC:return Math.floor(c/11*2);case l.KANJI:return Math.floor(c/13);default:return Math.floor(c/8)}},u.getBestVersionForData=function(A,P){var O,S=a.from(P,a.M);if(s(A)){if(A.length>1)return function x(N,A){for(var P=1;P<=40;P++)if(M(N,P)<=u.getCapacity(P,A,l.MIXED))return P}(A,S);if(0===A.length)return 1;O=A[0]}else O=A;return function y(N,A,P){for(var O=1;O<=40;O++)if(A<=u.getCapacity(O,P,N))return O}(O.mode,O.getLength(),S)},u.getEncodedBits=function(A){if(!r.isValid(A)||A<7)throw new Error("Invalid QR Code version");for(var P=A<<12;i.getBCHDigit(P)-g>=0;)P^=7973<{var i=h(5726);u.render=function(r,s,d){var g=d,y=s;typeof g>"u"&&(!s||!s.getContext)&&(g=s,s=void 0),s||(y=function a(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}()),g=i.getOptions(g);var L=i.getImageWidth(r.modules.size,g),M=y.getContext("2d"),x=M.createImageData(L,L);return i.qrToImageData(x.data,r,g),function o(l,r,s){l.clearRect(0,0,r.width,r.height),r.style||(r.style={}),r.height=s,r.width=s,r.style.height=s+"px",r.style.width=s+"px"}(M,y,L),M.putImageData(x,0,0),y},u.renderToDataURL=function(r,s,d){var g=d;return typeof g>"u"&&(!s||!s.getContext)&&(g=s,s=void 0),g||(g={}),u.render(r,s,g).toDataURL(g.type||"image/png",(g.rendererOpts||{}).quality)}},173:(z,u,h)=>{var i=h(5726);function o(r,s){var d=r.a/255,g=s+'="'+r.hex+'"';return d<1?g+" "+s+'-opacity="'+d.toFixed(2).slice(1)+'"':g}function a(r,s,d){var g=r+s;return typeof d<"u"&&(g+=" "+d),g}u.render=function(s,d,g){var y=i.getOptions(d),L=s.modules.size,M=s.modules.data,x=L+2*y.margin,N=y.color.light.a?"':"",A="0&&N>0&&r[x-1]||(g+=L?a("M",N+d,.5+A+d):a("m",y,0),y=0,L=!1),N+1',S=''+N+A+"\n";return"function"==typeof g&&g(null,S),S}},5726:(z,u)=>{function h(i){if("number"==typeof i&&(i=i.toString()),"string"!=typeof i)throw new Error("Color should be defined as hex string");var o=i.slice().replace("#","").split("");if(o.length<3||5===o.length||o.length>8)throw new Error("Invalid hex color: "+i);(3===o.length||4===o.length)&&(o=Array.prototype.concat.apply([],o.map(function(l){return[l,l]}))),6===o.length&&o.push("F","F");var a=parseInt(o.join(""),16);return{r:a>>24&255,g:a>>16&255,b:a>>8&255,a:255&a,hex:"#"+o.slice(0,6).join("")}}u.getOptions=function(o){o||(o={}),o.color||(o.color={});var l=o.width&&o.width>=21?o.width:void 0;return{width:l,scale:l?4:o.scale||4,margin:typeof o.margin>"u"||null===o.margin||o.margin<0?4:o.margin,color:{dark:h(o.color.dark||"#000000ff"),light:h(o.color.light||"#ffffffff")},type:o.type,rendererOpts:o.rendererOpts||{}}},u.getScale=function(o,a){return a.width&&a.width>=o+2*a.margin?a.width/(o+2*a.margin):a.scale},u.getImageWidth=function(o,a){var l=u.getScale(o,a);return Math.floor((o+2*a.margin)*l)},u.qrToImageData=function(o,a,l){for(var r=a.modules.size,s=a.modules.data,d=u.getScale(r,l),g=Math.floor((r+2*l.margin)*d),y=l.margin*d,L=[l.color.light,l.color.dark],M=0;M=y&&x>=y&&M{"use strict";var i=h(5105),a=(l.TYPED_ARRAY_SUPPORT=function o(){try{var p=new Uint8Array(1);return p.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===p.foo()}catch{return!1}}())?2147483647:1073741823;function l(p,f,c){return l.TYPED_ARRAY_SUPPORT||this instanceof l?"number"==typeof p?g(this,p):function S(p,f,c,m){if("number"==typeof f)throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&f instanceof ArrayBuffer?function M(p,f,c,m){if(c<0||f.byteLength=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|p}function d(p,f){var c;return l.TYPED_ARRAY_SUPPORT?(c=new Uint8Array(f)).__proto__=l.prototype:(null===(c=p)&&(c=new l(f)),c.length=f),c}function g(p,f){var c=d(p,f<0?0:0|r(f));if(!l.TYPED_ARRAY_SUPPORT)for(var m=0;m55295&&c<57344){if(!E){if(c>56319){(f-=3)>-1&&U.push(239,191,189);continue}if(H+1===m){(f-=3)>-1&&U.push(239,191,189);continue}E=c;continue}if(c<56320){(f-=3)>-1&&U.push(239,191,189),E=c;continue}c=65536+(E-55296<<10|c-56320)}else E&&(f-=3)>-1&&U.push(239,191,189);if(E=null,c<128){if((f-=1)<0)break;U.push(c)}else if(c<2048){if((f-=2)<0)break;U.push(c>>6|192,63&c|128)}else if(c<65536){if((f-=3)<0)break;U.push(c>>12|224,c>>6&63|128,63&c|128)}else{if(!(c<1114112))throw new Error("Invalid code point");if((f-=4)<0)break;U.push(c>>18|240,c>>12&63|128,c>>6&63|128,63&c|128)}}return U}function A(p){return l.isBuffer(p)?p.length:typeof ArrayBuffer<"u"&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(p)||p instanceof ArrayBuffer)?p.byteLength:("string"!=typeof p&&(p=""+p),0===p.length?0:N(p).length)}l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1})),l.prototype.write=function(f,c,m){void 0===c||void 0===m&&"string"==typeof c?(m=this.length,c=0):isFinite(c)&&(c|=0,isFinite(m)?m|=0:m=void 0);var E=this.length-c;if((void 0===m||m>E)&&(m=E),f.length>0&&(m<0||c<0)||c>this.length)throw new RangeError("Attempt to write outside buffer bounds");return function O(p,f,c,m){return function P(p,f,c,m){for(var E=0;E=f.length||E>=p.length);++E)f[E+c]=p[E];return E}(N(f,p.length-c),p,c,m)}(this,f,c,m)},l.prototype.slice=function(f,c){var E,m=this.length;if((f=~~f)<0?(f+=m)<0&&(f=0):f>m&&(f=m),(c=void 0===c?m:~~c)<0?(c+=m)<0&&(c=0):c>m&&(c=m),c=f.length&&(c=f.length),c||(c=0),E>0&&E=this.length)throw new RangeError("sourceStart out of bounds");if(E<0)throw new RangeError("sourceEnd out of bounds");E>this.length&&(E=this.length),f.length-c=0;--H)f[H+c]=this[H+m];else if(U<1e3||!l.TYPED_ARRAY_SUPPORT)for(H=0;H>>=0,m=void 0===m?this.length:m>>>0,f||(f=0),"number"==typeof f)for(U=c;U{z.exports=function(){var u=document.getSelection();if(!u.rangeCount)return function(){};for(var h=document.activeElement,i=[],o=0;o{"use strict";M.r(l),M.d(l,{getWalletConnectProviderInstance:()=>qn});var x={};M.r(x),M.d(x,{decrypt:()=>En,encrypt:()=>An,generateKey:()=>pr,verifyHmac:()=>gr});var y=M(34553),h=M(40859);const p=["session_request","session_update","exchange_key","connect","disconnect","display_uri","modal_closed","transport_open","transport_close","transport_error"],a=["eth_sendTransaction","eth_signTransaction","eth_sign","eth_signTypedData","eth_signTypedData_v1","eth_signTypedData_v2","eth_signTypedData_v3","eth_signTypedData_v4","personal_sign","wallet_addEthereumChain","wallet_switchEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],g={1:"mainnet",3:"ropsten",4:"rinkeby",5:"goerli",42:"kovan"};var m=M(42007),E=M.n(m),I=(M(38260),M(41175)),F=M.n(I);const v="utf8",B="0";function D(C){return new Uint8Array(C)}function J(C,R=!1){const P=C.toString("hex");return R?Lt(P):P}function U(C){return F()(C)}function n(C,R=!1){return J(U(C),R)}function t(C){return function at(C){return C.toString(v)}(U(C))}function f(C){return D(function s(C){return Buffer.from(pt(C),"hex")}(C))}function r(C){return Buffer.from(C,v)}function u(C){return D(r(C))}function nt(...C){let R=[];return C.forEach(P=>R=R.concat(Array.from(P))),new Uint8Array([...R])}function xt(C,R=8,P=B){return function Pt(C,R,P=B){return function ie(C,R,P,X=B){const rt=R-C.length;let ft=C;if(rt>0){const qt=X.repeat(rt);ft=P?qt+C:C+qt}return ft}(C,R,!0,P)}(C,function Gt(C,R=8){const P=C%R;return P?(C-P)/R*R+R:C}(C.length,R),P)}function pt(C){return C.replace(/^0x/,"")}function Lt(C){return C.startsWith("0x")?C:`0x${C}`}function re(C){return(C=xt(C=pt(C),2))&&(C=Lt(C)),C}function gt(C){return U(new Uint8Array(C))}function oe(C){return D(C).buffer}function H(C,R){const P=pt(re(new(E())(C).toString(16)));return R?P:Lt(P)}var K=M(81403),ye=M(43841);function Ce(C){return re(C)}const Ne=function Re(){return Date.now()*Math.pow(10,3)+Math.floor(Math.random()*Math.pow(10,3))};function Oe(){return((R,P)=>{for(P=R="";R++<36;P+=51*R&52?(15^R?8^Math.random()*(20^R?16:4):4).toString(16):"-");return P})()}function ar(C,R){return function Nt(C,R){return!("string"!=typeof C||!C.match(/^0x[0-9A-Fa-f]*$/)||R&&C.length!==2+2*R)}(C,R)}function Te(C){return typeof C.result<"u"}function Ie(C){return typeof C.error<"u"}function sr(C){return typeof C.event<"u"}function Le(C){return!function br(C){return!(C&&C.length)}(C)&&!ar(C[0])&&(C[0]=function kt(C,R){return function z(C,R=!1){return J(r(C),R)}(C,!R)}(C[0])),C}function Ue(C){if(typeof C.type<"u"&&"0"!==C.type)return C;if(typeof C.from>"u"||!(C=>!(!C||"0x"!==C.toLowerCase().substring(0,2)||!/^(0x)?[0-9a-f]{40}$/i.test(C)||!/^(0x)?[0-9a-f]{40}$/.test(C)&&!/^(0x)?[0-9A-F]{40}$/.test(C)&&C!==function Br(C){C=pt(C.toLowerCase());const R=pt((0,K.keccak_256)(function he(C){return r(C)}(C)));let P="";for(let X=0;X7?P+=C[X].toUpperCase():P+=C[X];return Lt(P)}(C)))(C.from))throw new Error("Transaction object must include a valid 'from' value.");function R(rt){let ft=rt;return("number"==typeof rt||"string"==typeof rt&&!function Mr(C){return""===C||"string"==typeof C&&""===C.trim()}(rt))&&(ar(rt)?"string"==typeof rt&&(ft=Ce(rt)):ft=H(rt)),"string"==typeof ft&&(ft=function xr(C){return function bt(C){const R=C.startsWith("0x");return C=(C=pt(C)).startsWith(B)?C.substring(1):C,R?Lt(C):C}(Lt(C))}(ft)),ft}const P={from:Ce(C.from),to:typeof C.to>"u"?void 0:Ce(C.to),gasPrice:typeof C.gasPrice>"u"?"":R(C.gasPrice),gas:typeof C.gas>"u"?typeof C.gasLimit>"u"?"":R(C.gasLimit):R(C.gas),value:typeof C.value>"u"?"":R(C.value),nonce:typeof C.nonce>"u"?"":R(C.nonce),data:typeof C.data>"u"?"":Ce(C.data)||"0x"},X=["gasPrice","gas","value","nonce"];return Object.keys(P).forEach(rt=>{(typeof P[rt]>"u"||"string"==typeof P[rt]&&!P[rt].trim().length)&&X.includes(rt)&&delete P[rt]}),P}var fr=M(9805);function ur(C){return fr.parse(C)}const Ur=typeof global.WebSocket<"u"?global.WebSocket:M(82791),Fe="Session currently connected",Se="Session currently disconnected",hr="JSON RPC response format is invalid",lr="User close QRCode Modal",cr="abcdefghijklmnopqrstuvwxyz0123456789".split("").map(C=>`https://${C}.bridge.walletconnect.org`);function hn(C){return ye.getBrowerCrypto().getRandomValues(new Uint8Array(C))}const Ee="AES-CBC",He="HMAC";function pn(C){return C===Ee?{length:256,name:Ee}:{hash:{name:"SHA-256"},name:He}}function gn(C){return C===Ee?["encrypt","decrypt"]:["sign","verify"]}function Pe(C){return ze.apply(this,arguments)}function ze(){return(ze=(0,y.Z)(function*(C,R=Ee){return ye.getSubtleCrypto().importKey("raw",C,pn(R),!0,gn(R))})).apply(this,arguments)}function We(){return(We=(0,y.Z)(function*(C,R,P){const X=ye.getSubtleCrypto(),rt=yield Pe(R,Ee),ft=yield X.encrypt({iv:C,name:Ee},rt,P);return new Uint8Array(ft)})).apply(this,arguments)}function Ze(){return(Ze=(0,y.Z)(function*(C,R,P){const X=ye.getSubtleCrypto(),rt=yield Pe(R,Ee),ft=yield X.decrypt({iv:C,name:Ee},rt,P);return new Uint8Array(ft)})).apply(this,arguments)}function wn(C,R){return Ve.apply(this,arguments)}function Ve(){return(Ve=(0,y.Z)(function*(C,R){const P=ye.getSubtleCrypto(),X=yield Pe(C,He),rt=yield P.sign({length:256,name:He},X,R);return new Uint8Array(rt)})).apply(this,arguments)}function _n(C,R,P){return function yn(C,R,P){return We.apply(this,arguments)}(C,R,P)}function Mn(C,R,P){return function xn(C,R,P){return Ze.apply(this,arguments)}(C,R,P)}function mr(C,R){return Je.apply(this,arguments)}function Je(){return(Je=(0,y.Z)(function*(C,R){return yield wn(C,R)})).apply(this,arguments)}function pr(C){return rr.apply(this,arguments)}function rr(){return(rr=(0,y.Z)(function*(C){return oe(U(hn((C||256)/8)))})).apply(this,arguments)}function gr(C,R){return nr.apply(this,arguments)}function nr(){return(nr=(0,y.Z)(function*(C,R){const P=f(C.data),X=f(C.iv),ft=n(f(C.hmac),!1),qt=nt(P,X),we=n(yield mr(R,qt),!1);return pt(ft)===pt(we)})).apply(this,arguments)}function An(C,R,P){return ir.apply(this,arguments)}function ir(){return(ir=(0,y.Z)(function*(C,R,P){const X=D(gt(R)),ft=D(gt(P||(yield pr(128)))),qt=n(ft,!1),we=u(JSON.stringify(C)),se=yield _n(ft,X,we),be=n(se,!1),Ae=nt(se,ft);return{data:be,hmac:n(yield mr(X,Ae),!1),iv:qt}})).apply(this,arguments)}function En(C,R){return or.apply(this,arguments)}function or(){return(or=(0,y.Z)(function*(C,R){const P=D(gt(R));if(!P)throw new Error("Missing key: required for decryption");if(!(yield gr(C,P)))return null;const rt=f(C.data),ft=f(C.iv),ne=t(yield Mn(ft,P,rt));let we;try{we=JSON.parse(ne)}catch{return null}return we})).apply(this,arguments)}var Tn=M(62639),kn=M.n(Tn),Rn=M(46183),Cn=M.n(Rn),In=M(44052);const Ln=(0,h.getFromWindow)("XMLHttpRequest")||In.XMLHttpRequest;class Pn extends(Cn()){constructor(R){super(),this.url=R}formatError(R,P,X=-1){return{error:{message:P,code:X},id:R.id,jsonrpc:R.jsonrpc}}send(R,P){return new Promise(X=>{if("eth_subscribe"===R.method){const ne=this.formatError(R,"Subscriptions are not supported by this HTTP endpoint");return this.emit("error",ne),X(ne)}const rt=new Ln;let ft=!1;const qt=(ne,we)=>{if(!ft)if(rt.abort(),ft=!0,P)P(ne,we);else{const{id:se,jsonrpc:be}=R,Ae=ne?{id:se,jsonrpc:be,error:{message:ne.message,code:ne.code}}:{id:se,jsonrpc:be,result:we};this.emit("payload",Ae),X(Ae)}};rt.open("POST",this.url,!0),rt.setRequestHeader("Content-Type","application/json"),rt.timeout=6e4,rt.onerror=qt,rt.ontimeout=qt,rt.onreadystatechange=()=>{if(4===rt.readyState)try{const ne=JSON.parse(rt.responseText);qt(ne.error,ne.result)}catch(ne){qt(ne)}},rt.send(JSON.stringify(R))})}}const Nn=Pn,On=M(79775),Un=M(50124),Fn=M(67576),Dn=M(4365),Hn=M(46082),Kn=M(57068),zn=M(52087),Zn=class Wn extends On{constructor(R){var P;if(super({pollingInterval:R.pollingInterval||8e3}),P=this,this.bridge="https://bridge.walletconnect.org",this.qrcode=!0,this.qrcodeModal=kn(),this.qrcodeModalOptions=void 0,this.rpc=null,this.infuraId="",this.http=null,this.isConnecting=!1,this.connected=!1,this.connectCallbacks=[],this.accounts=[],this.chainId=1,this.rpcUrl="",this.enable=(0,y.Z)(function*(){const X=yield P.getWalletConnector();if(X)return P.start(),P.subscribeWalletConnector(),X.accounts;throw new Error("Failed to connect to WalleConnect")}),this.request=function(){var X=(0,y.Z)(function*(rt){return P.send(rt)});return function(rt){return X.apply(this,arguments)}}(),this.send=function(){var X=(0,y.Z)(function*(rt,ft){if("string"==typeof rt){const qt=rt;let ne=ft;return"personal_sign"===qt&&(ne=Le(ne)),P.sendAsyncPromise(qt,ne)}if("personal_sign"===(rt=Object.assign({id:Ne(),jsonrpc:"2.0"},rt)).method&&(rt.params=Le(rt.params)),!ft)return P.sendAsyncPromise(rt.method,rt.params);P.sendAsync(rt,ft)});return function(rt,ft){return X.apply(this,arguments)}}(),this.onConnect=X=>{this.connectCallbacks.push(X)},this.triggerConnect=X=>{this.connectCallbacks&&this.connectCallbacks.length&&this.connectCallbacks.forEach(rt=>rt(X))},this.bridge=R.connector?R.connector.bridge:R.bridge||"https://bridge.walletconnect.org",this.qrcode=typeof R.qrcode>"u"||!1!==R.qrcode,this.qrcodeModal=R.qrcodeModal||this.qrcodeModal,this.qrcodeModalOptions=R.qrcodeModalOptions,this.wc=R.connector||new class Sn extends class fn{constructor(R){if(this.protocol="wc",this.version=1,this._bridge="",this._key=null,this._clientId="",this._clientMeta=null,this._peerId="",this._peerMeta=null,this._handshakeId=0,this._handshakeTopic="",this._connected=!1,this._accounts=[],this._chainId=0,this._networkId=0,this._rpcUrl="",this._eventManager=new class Yr{constructor(){this._eventEmitters=[]}subscribe(R){this._eventEmitters.push(R)}unsubscribe(R){this._eventEmitters=this._eventEmitters.filter(P=>P.event!==R)}trigger(R){let X,P=[];X=function Ar(C){return typeof C.method<"u"}(R)?R.method:Te(R)||Ie(R)?`response:${R.id}`:sr(R)?R.event:"",X&&(P=this._eventEmitters.filter(rt=>rt.event===X)),(!P||!P.length)&&!function Er(C){return p.includes(C)||C.startsWith("wc_")}(X)&&!sr(X)&&(P=this._eventEmitters.filter(rt=>"call_request"===rt.event)),P.forEach(rt=>{if(Ie(R)){const ft=new Error(R.error.message);rt.callback(ft,null)}else rt.callback(null,R)})}},this._clientMeta=(0,h.getClientMeta)()||R.connectorOpts.clientMeta||null,this._cryptoLib=R.cryptoLib,this._sessionStorage=R.sessionStorage||new class Qr{constructor(R="walletconnect"){this.storageId=R}getSession(){let R=null;const P=(0,h.getLocal)(this.storageId);return P&&function Lr(C){return typeof C.bridge<"u"}(P)&&(R=P),R}setSession(R){return(0,h.setLocal)(this.storageId,R),R}removeSession(){(0,h.removeLocal)(this.storageId)}}(R.connectorOpts.storageId),this._qrcodeModal=R.connectorOpts.qrcodeModal,this._qrcodeModalOptions=R.connectorOpts.qrcodeModalOptions,this._signingMethods=[...a,...R.connectorOpts.signingMethods||[]],!R.connectorOpts.bridge&&!R.connectorOpts.uri&&!R.connectorOpts.session)throw new Error("Missing one of the required parameters: bridge / uri / session");R.connectorOpts.bridge&&(this.bridge=function sn(C){return function an(C){return"walletconnect.org"===function rn(C){return function en(C){let R=C.indexOf("//")>-1?C.split("/")[2]:C.split("/")[0];return R=R.split(":")[0],R=R.split("?")[0],R}(C).split(".").slice(-2).join(".")}(C)}(C)?function on(){return cr[function nn(){return Math.floor(Math.random()*cr.length)}()]}():C}(R.connectorOpts.bridge)),R.connectorOpts.uri&&(this.uri=R.connectorOpts.uri);const P=R.connectorOpts.session||this._getStorageSession();P&&(this.session=P),this.handshakeId&&this._subscribeToSessionResponse(this.handshakeId,"Session request rejected"),this._transport=R.transport||new class Fr{constructor(R){if(this.opts=R,this._queue=[],this._events=[],this._subscriptions=[],this._protocol=R.protocol,this._version=R.version,this._url="",this._netMonitor=null,this._socket=null,this._nextSocket=null,this._subscriptions=R.subscriptions||[],this._netMonitor=R.netMonitor||new class Nr{constructor(){this._eventEmitters=[],typeof window<"u"&&typeof window.addEventListener<"u"&&(window.addEventListener("online",()=>this.trigger("online")),window.addEventListener("offline",()=>this.trigger("offline")))}on(R,P){this._eventEmitters.push({event:R,callback:P})}trigger(R){let P=[];R&&(P=this._eventEmitters.filter(X=>X.event===R)),P.forEach(X=>{X.callback()})}},!R.url||"string"!=typeof R.url)throw new Error("Missing or invalid WebSocket url");this._url=R.url,this._netMonitor.on("online",()=>this._socketCreate())}set readyState(R){}get readyState(){return this._socket?this._socket.readyState:-1}set connecting(R){}get connecting(){return 0===this.readyState}set connected(R){}get connected(){return 1===this.readyState}set closing(R){}get closing(){return 2===this.readyState}set closed(R){}get closed(){return 3===this.readyState}open(){this._socketCreate()}close(){this._socketClose()}send(R,P,X){if(!P||"string"!=typeof P)throw new Error("Missing or invalid topic field");this._socketSend({topic:P,type:"pub",payload:R,silent:!!X})}subscribe(R){this._socketSend({topic:R,type:"sub",payload:"",silent:!0})}on(R,P){this._events.push({event:R,callback:P})}_socketCreate(){if(this._nextSocket)return;const R=function Dr(C,R,P){var X,rt;const qt=(C.startsWith("https")?C.replace("https","wss"):C.startsWith("http")?C.replace("http","ws"):C).split("?"),ne=(0,h.isBrowser)()?{protocol:R,version:P,env:"browser",host:(null===(X=(0,h.getLocation)())||void 0===X?void 0:X.host)||""}:{protocol:R,version:P,env:(null===(rt=(0,h.detectEnv)())||void 0===rt?void 0:rt.name)||""},we=function Cr(C,R){let P=ur(C);return P=Object.assign(Object.assign({},P),R),function Ir(C){return fr.stringify(C)}(P)}(function Rr(C){const R=-1!==C.indexOf("?")?C.indexOf("?"):void 0;return typeof R<"u"?C.substr(R):""}(qt[1]||""),ne);return qt[0]+"?"+we}(this._url,this._protocol,this._version);if(this._nextSocket=new Ur(R),!this._nextSocket)throw new Error("Failed to create socket");this._nextSocket.onmessage=P=>this._socketReceive(P),this._nextSocket.onopen=()=>this._socketOpen(),this._nextSocket.onerror=P=>this._socketError(P),this._nextSocket.onclose=()=>{setTimeout(()=>{this._nextSocket=null,this._socketCreate()},1e3)}}_socketOpen(){this._socketClose(),this._socket=this._nextSocket,this._nextSocket=null,this._queueSubscriptions(),this._pushQueue()}_socketClose(){this._socket&&(this._socket.onclose=()=>{},this._socket.close())}_socketSend(R){const P=JSON.stringify(R);this._socket&&1===this._socket.readyState?this._socket.send(P):(this._setToQueue(R),this._socketCreate())}_socketReceive(R){var P=this;return(0,y.Z)(function*(){let X;try{X=JSON.parse(R.data)}catch{return}if(P._socketSend({topic:X.topic,type:"ack",payload:"",silent:!0}),P._socket&&1===P._socket.readyState){const rt=P._events.filter(ft=>"message"===ft.event);rt&&rt.length&&rt.forEach(ft=>ft.callback(X))}})()}_socketError(R){const P=this._events.filter(X=>"error"===X.event);P&&P.length&&P.forEach(X=>X.callback(R))}_queueSubscriptions(){this._subscriptions.forEach(P=>this._queue.push({topic:P,type:"sub",payload:"",silent:!0})),this._subscriptions=this.opts.subscriptions||[]}_setToQueue(R){this._queue.push(R)}_pushQueue(){this._queue.forEach(P=>this._socketSend(P)),this._queue=[]}}({protocol:this.protocol,version:this.version,url:this.bridge,subscriptions:[this.clientId]}),this._subscribeToInternalEvents(),this._initTransport(),R.connectorOpts.uri&&this._subscribeToSessionRequest(),R.pushServerOpts&&this._registerPushServer(R.pushServerOpts)}set bridge(R){!R||(this._bridge=R)}get bridge(){return this._bridge}set key(R){if(!R)return;const P=function Bt(C){return f(C).buffer}(R);this._key=P}get key(){return this._key?function de(C,R){return n(new Uint8Array(C),!R)}(this._key,!0):""}set clientId(R){!R||(this._clientId=R)}get clientId(){let R=this._clientId;return R||(R=this._clientId=Oe()),this._clientId}set peerId(R){!R||(this._peerId=R)}get peerId(){return this._peerId}set clientMeta(R){}get clientMeta(){let R=this._clientMeta;return R||(R=this._clientMeta=(0,h.getClientMeta)()),R}set peerMeta(R){this._peerMeta=R}get peerMeta(){return this._peerMeta}set handshakeTopic(R){!R||(this._handshakeTopic=R)}get handshakeTopic(){return this._handshakeTopic}set handshakeId(R){!R||(this._handshakeId=R)}get handshakeId(){return this._handshakeId}get uri(){return this._formatUri()}set uri(R){if(!R)return;const{handshakeTopic:P,bridge:X,key:rt}=this._parseUri(R);this.handshakeTopic=P,this.bridge=X,this.key=rt}set chainId(R){this._chainId=R}get chainId(){return this._chainId}set networkId(R){this._networkId=R}get networkId(){return this._networkId}set accounts(R){this._accounts=R}get accounts(){return this._accounts}set rpcUrl(R){this._rpcUrl=R}get rpcUrl(){return this._rpcUrl}set connected(R){}get connected(){return this._connected}set pending(R){}get pending(){return!!this._handshakeTopic}get session(){return{connected:this.connected,accounts:this.accounts,chainId:this.chainId,bridge:this.bridge,key:this.key,clientId:this.clientId,clientMeta:this.clientMeta,peerId:this.peerId,peerMeta:this.peerMeta,handshakeId:this.handshakeId,handshakeTopic:this.handshakeTopic}}set session(R){!R||(this._connected=R.connected,this.accounts=R.accounts,this.chainId=R.chainId,this.bridge=R.bridge,this.key=R.key,this.clientId=R.clientId,this.clientMeta=R.clientMeta,this.peerId=R.peerId,this.peerMeta=R.peerMeta,this.handshakeId=R.handshakeId,this.handshakeTopic=R.handshakeTopic)}on(R,P){this._eventManager.subscribe({event:R,callback:P})}off(R){this._eventManager.unsubscribe(R)}createInstantRequest(R){var P=this;return(0,y.Z)(function*(){P._key=yield P._generateKey();const X=P._formatRequest({method:"wc_instantRequest",params:[{peerId:P.clientId,peerMeta:P.clientMeta,request:P._formatRequest(R)}]});P.handshakeId=X.id,P.handshakeTopic=Oe(),P._eventManager.trigger({event:"display_uri",params:[P.uri]}),P.on("modal_closed",()=>{throw new Error(lr)});const rt=()=>{P.killSession()};try{const ft=yield P._sendCallRequest(X);return ft&&rt(),ft}catch(ft){throw rt(),ft}})()}connect(R){var P=this;return(0,y.Z)(function*(){if(!P._qrcodeModal)throw new Error("QRCode Modal not provided");return P.connected?{chainId:P.chainId,accounts:P.accounts}:(yield P.createSession(R),new Promise(function(){var X=(0,y.Z)(function*(rt,ft){P.on("modal_closed",()=>ft(new Error(lr))),P.on("connect",(qt,ne)=>{if(qt)return ft(qt);rt(ne.params[0])})});return function(rt,ft){return X.apply(this,arguments)}}()))})()}createSession(R){var P=this;return(0,y.Z)(function*(){if(P._connected)throw new Error(Fe);if(P.pending)return;P._key=yield P._generateKey();const X=P._formatRequest({method:"wc_sessionRequest",params:[{peerId:P.clientId,peerMeta:P.clientMeta,chainId:R&&R.chainId?R.chainId:null}]});P.handshakeId=X.id,P.handshakeTopic=Oe(),P._sendSessionRequest(X,"Session update rejected",{topic:P.handshakeTopic}),P._eventManager.trigger({event:"display_uri",params:[P.uri]})})()}approveSession(R){if(this._connected)throw new Error(Fe);this.chainId=R.chainId,this.accounts=R.accounts,this.networkId=R.networkId||0,this.rpcUrl=R.rpcUrl||"",this._sendResponse({id:this.handshakeId,jsonrpc:"2.0",result:{approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl,peerId:this.clientId,peerMeta:this.clientMeta}}),this._connected=!0,this._setStorageSession(),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})}rejectSession(R){if(this._connected)throw new Error(Fe);const P=R&&R.message?R.message:"Session Rejected",X=this._formatResponse({id:this.handshakeId,error:{message:P}});this._sendResponse(X),this._connected=!1,this._eventManager.trigger({event:"disconnect",params:[{message:P}]}),this._removeStorageSession()}updateSession(R){if(!this._connected)throw new Error(Se);this.chainId=R.chainId,this.accounts=R.accounts,this.networkId=R.networkId||0,this.rpcUrl=R.rpcUrl||"";const X=this._formatRequest({method:"wc_sessionUpdate",params:[{approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl}]});this._sendSessionRequest(X,"Session update rejected"),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]}),this._manageStorageSession()}killSession(R){var P=this;return(0,y.Z)(function*(){const X=R?R.message:"Session Disconnected",ft=P._formatRequest({method:"wc_sessionUpdate",params:[{approved:!1,chainId:null,networkId:null,accounts:null}]});yield P._sendRequest(ft),P._handleSessionDisconnect(X)})()}sendTransaction(R){var P=this;return(0,y.Z)(function*(){if(!P._connected)throw new Error(Se);const X=Ue(R),rt=P._formatRequest({method:"eth_sendTransaction",params:[X]});return yield P._sendCallRequest(rt)})()}signTransaction(R){var P=this;return(0,y.Z)(function*(){if(!P._connected)throw new Error(Se);const X=Ue(R),rt=P._formatRequest({method:"eth_signTransaction",params:[X]});return yield P._sendCallRequest(rt)})()}signMessage(R){var P=this;return(0,y.Z)(function*(){if(!P._connected)throw new Error(Se);const X=P._formatRequest({method:"eth_sign",params:R});return yield P._sendCallRequest(X)})()}signPersonalMessage(R){var P=this;return(0,y.Z)(function*(){if(!P._connected)throw new Error(Se);R=Le(R);const X=P._formatRequest({method:"personal_sign",params:R});return yield P._sendCallRequest(X)})()}signTypedData(R){var P=this;return(0,y.Z)(function*(){if(!P._connected)throw new Error(Se);const X=P._formatRequest({method:"eth_signTypedData",params:R});return yield P._sendCallRequest(X)})()}updateChain(R){var P=this;return(0,y.Z)(function*(){if(!P._connected)throw new Error("Session currently disconnected");const X=P._formatRequest({method:"wallet_updateChain",params:[R]});return yield P._sendCallRequest(X)})()}unsafeSend(R,P){return this._sendRequest(R,P),this._eventManager.trigger({event:"call_request_sent",params:[{request:R,options:P}]}),new Promise((X,rt)=>{this._subscribeToResponse(R.id,(ft,qt)=>{if(ft)rt(ft);else{if(!qt)throw new Error("Missing JSON RPC response");X(qt)}})})}sendCustomRequest(R,P){var X=this;return(0,y.Z)(function*(){if(!X._connected)throw new Error(Se);switch(R.method){case"eth_accounts":return X.accounts;case"eth_chainId":return H(X.chainId);case"eth_sendTransaction":case"eth_signTransaction":R.params&&(R.params[0]=Ue(R.params[0]));break;case"personal_sign":R.params&&(R.params=Le(R.params))}const rt=X._formatRequest(R);return yield X._sendCallRequest(rt,P)})()}approveRequest(R){if(!Te(R))throw new Error('JSON-RPC success response must include "result" field');{const P=this._formatResponse(R);this._sendResponse(P)}}rejectRequest(R){if(!Ie(R))throw new Error('JSON-RPC error response must include "error" field');{const P=this._formatResponse(R);this._sendResponse(P)}}transportClose(){this._transport.close()}_sendRequest(R,P){var X=this;return(0,y.Z)(function*(){const rt=X._formatRequest(R),ft=yield X._encrypt(rt),qt=typeof(null==P?void 0:P.topic)<"u"?P.topic:X.peerId,ne=JSON.stringify(ft),we=typeof(null==P?void 0:P.forcePushNotification)<"u"?!P.forcePushNotification:function Sr(C){return!!C.method.startsWith("wc_")||!a.includes(C.method)}(rt);X._transport.send(ne,qt,we)})()}_sendResponse(R){var P=this;return(0,y.Z)(function*(){const X=yield P._encrypt(R),rt=P.peerId,ft=JSON.stringify(X);P._transport.send(ft,rt,!0)})()}_sendSessionRequest(R,P,X){var rt=this;return(0,y.Z)(function*(){rt._sendRequest(R,X),rt._subscribeToSessionResponse(R.id,P)})()}_sendCallRequest(R,P){return this._sendRequest(R,P),this._eventManager.trigger({event:"call_request_sent",params:[{request:R,options:P}]}),this._subscribeToCallResponse(R.id)}_formatRequest(R){if(typeof R.method>"u")throw new Error('JSON RPC request must have valid "method" value');return{id:typeof R.id>"u"?Ne():R.id,jsonrpc:"2.0",method:R.method,params:typeof R.params>"u"?[]:R.params}}_formatResponse(R){if(typeof R.id>"u")throw new Error('JSON RPC request must have valid "id" value');const P={id:R.id,jsonrpc:"2.0"};if(Ie(R)){const X=function kr(C){const R=C.message||"Failed or Rejected Request";let P=-32e3;if(C&&!C.code)switch(R){case"Parse error":P=-32700;break;case"Invalid request":P=-32600;break;case"Method not found":P=-32601;break;case"Invalid params":P=-32602;break;case"Internal error":P=-32603;break;default:P=-32e3}return{code:P,message:R}}(R.error);return Object.assign(Object.assign(Object.assign({},P),R),{error:X})}if(Te(R))return Object.assign(Object.assign({},P),R);throw new Error(hr)}_handleSessionDisconnect(R){const P=R||"Session Disconnected";this._connected||(this._qrcodeModal&&this._qrcodeModal.close(),(0,h.removeLocal)(h.mobileLinkChoiceKey)),this._connected&&(this._connected=!1),this._handshakeId&&(this._handshakeId=0),this._handshakeTopic&&(this._handshakeTopic=""),this._peerId&&(this._peerId=""),this._eventManager.trigger({event:"disconnect",params:[{message:P}]}),this._removeStorageSession(),this.transportClose()}_handleSessionResponse(R,P){P&&P.approved?(this._connected?(P.chainId&&(this.chainId=P.chainId),P.accounts&&(this.accounts=P.accounts),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]})):(this._connected=!0,P.chainId&&(this.chainId=P.chainId),P.accounts&&(this.accounts=P.accounts),P.peerId&&!this.peerId&&(this.peerId=P.peerId),P.peerMeta&&!this.peerMeta&&(this.peerMeta=P.peerMeta),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})),this._manageStorageSession()):this._handleSessionDisconnect(R)}_handleIncomingMessages(R){var P=this;return(0,y.Z)(function*(){if(![P.clientId,P.handshakeTopic].includes(R.topic))return;let rt;try{rt=JSON.parse(R.payload)}catch{return}const ft=yield P._decrypt(rt);ft&&P._eventManager.trigger(ft)})()}_subscribeToSessionRequest(){this._transport.subscribe(this.handshakeTopic)}_subscribeToResponse(R,P){this.on(`response:${R}`,P)}_subscribeToSessionResponse(R,P){this._subscribeToResponse(R,(X,rt)=>{X?this._handleSessionResponse(X.message):Te(rt)?this._handleSessionResponse(P,rt.result):this._handleSessionResponse(rt.error&&rt.error.message?rt.error.message:P)})}_subscribeToCallResponse(R){return new Promise((P,X)=>{this._subscribeToResponse(R,(rt,ft)=>{rt?X(rt):Te(ft)?P(ft.result):X(ft.error&&ft.error.message?new Error(ft.error.message):new Error(hr))})})}_subscribeToInternalEvents(){this.on("display_uri",()=>{this._qrcodeModal&&this._qrcodeModal.open(this.uri,()=>{this._eventManager.trigger({event:"modal_closed",params:[]})},this._qrcodeModalOptions)}),this.on("connect",()=>{this._qrcodeModal&&this._qrcodeModal.close()}),this.on("call_request_sent",(R,P)=>{const{request:X}=P.params[0];if((0,h.isMobile)()&&this._signingMethods.includes(X.method)){const rt=(0,h.getLocal)(h.mobileLinkChoiceKey);rt&&(window.location.href=rt.href)}}),this.on("wc_sessionRequest",(R,P)=>{R&&this._eventManager.trigger({event:"error",params:[{code:"SESSION_REQUEST_ERROR",message:R.toString()}]}),this.handshakeId=P.id,this.peerId=P.params[0].peerId,this.peerMeta=P.params[0].peerMeta;const X=Object.assign(Object.assign({},P),{method:"session_request"});this._eventManager.trigger(X)}),this.on("wc_sessionUpdate",(R,P)=>{R&&this._handleSessionResponse(R.message),this._handleSessionResponse("Session disconnected",P.params[0])})}_initTransport(){this._transport.on("message",R=>this._handleIncomingMessages(R)),this._transport.on("open",()=>this._eventManager.trigger({event:"transport_open",params:[]})),this._transport.on("close",()=>this._eventManager.trigger({event:"transport_close",params:[]})),this._transport.on("error",()=>this._eventManager.trigger({event:"transport_error",params:["Websocket connection failed"]})),this._transport.open()}_formatUri(){return`${this.protocol}:${this.handshakeTopic}@${this.version}?bridge=${encodeURIComponent(this.bridge)}&key=${this.key}`}_parseUri(R){const P=function Pr(C){const R=C.indexOf(":"),P=-1!==C.indexOf("?")?C.indexOf("?"):void 0,X=C.substring(0,R),qt=function ft(Ae){const ke=Ae.split("@");return{handshakeTopic:ke[0],version:parseInt(ke[1],10)}}(C.substring(R+1,P)),se=function we(Ae){const Be=ur(Ae);return{key:Be.key||"",bridge:Be.bridge||""}}(typeof P<"u"?C.substr(P):"");return Object.assign(Object.assign({protocol:X},qt),se)}(R);if(P.protocol===this.protocol){if(!P.handshakeTopic)throw Error("Invalid or missing handshakeTopic parameter value");const X=P.handshakeTopic;if(!P.bridge)throw Error("Invalid or missing bridge url parameter value");const rt=decodeURIComponent(P.bridge);if(!P.key)throw Error("Invalid or missing key parameter value");return{handshakeTopic:X,bridge:rt,key:P.key}}throw new Error("URI format is invalid")}_generateKey(){var R=this;return(0,y.Z)(function*(){return R._cryptoLib?yield R._cryptoLib.generateKey():null})()}_encrypt(R){var P=this;return(0,y.Z)(function*(){const X=P._key;return P._cryptoLib&&X?yield P._cryptoLib.encrypt(R,X):null})()}_decrypt(R){var P=this;return(0,y.Z)(function*(){const X=P._key;return P._cryptoLib&&X?yield P._cryptoLib.decrypt(R,X):null})()}_getStorageSession(){let R=null;return this._sessionStorage&&(R=this._sessionStorage.getSession()),R}_setStorageSession(){this._sessionStorage&&this._sessionStorage.setSession(this.session)}_removeStorageSession(){this._sessionStorage&&this._sessionStorage.removeSession()}_manageStorageSession(){this._connected?this._setStorageSession():this._removeStorageSession()}_registerPushServer(R){if(!R.url||"string"!=typeof R.url)throw Error("Invalid or missing pushServerOpts.url parameter value");if(!R.type||"string"!=typeof R.type)throw Error("Invalid or missing pushServerOpts.type parameter value");if(!R.token||"string"!=typeof R.token)throw Error("Invalid or missing pushServerOpts.token parameter value");const P={bridge:this.bridge,topic:this.clientId,type:R.type,token:R.token,peerName:"",language:R.language||""};this.on("connect",function(){var X=(0,y.Z)(function*(rt,ft){if(rt)throw rt;R.peerMeta&&(P.peerName=ft.params[0].peerMeta.name);try{if(!(yield(yield fetch(`${R.url}/new`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(P)})).json()).success)throw Error("Failed to register in Push Server")}catch{throw Error("Failed to register in Push Server")}});return function(rt,ft){return X.apply(this,arguments)}}())}}{constructor(R,P){super({cryptoLib:x,connectorOpts:R,pushServerOpts:P})}}({bridge:this.bridge,qrcodeModal:this.qrcode?this.qrcodeModal:void 0,qrcodeModalOptions:this.qrcodeModalOptions,storageId:null==R?void 0:R.storageId,signingMethods:null==R?void 0:R.signingMethods,clientMeta:null==R?void 0:R.clientMeta}),this.rpc=R.rpc||null,!(this.rpc||R.infuraId&&"string"==typeof R.infuraId&&R.infuraId.trim()))throw new Error("Missing one of the required parameters: rpc or infuraId");this.infuraId=R.infuraId||"",this.chainId=(null==R?void 0:R.chainId)||this.chainId,this.initialize()}get isWalletConnect(){return!0}get connector(){return this.wc}get walletMeta(){return this.wc.peerMeta}disconnect(){var R=this;return(0,y.Z)(function*(){R.close()})()}close(){var R=this;return(0,y.Z)(function*(){yield(yield R.getWalletConnector({disableSessionCreation:!0})).killSession(),yield R.onDisconnect()})()}handleRequest(R){var P=this;return(0,y.Z)(function*(){try{let X,rt=null;const ft=yield P.getWalletConnector();switch(R.method){case"wc_killSession":yield P.close(),rt=null;break;case"eth_accounts":rt=ft.accounts;break;case"eth_coinbase":rt=ft.accounts[0];break;case"eth_chainId":case"net_version":rt=ft.chainId;break;case"eth_uninstallFilter":P.sendAsync(R,qt=>qt),rt=!0;break;default:X=yield P.handleOtherRequests(R)}return X||P.formatResponse(R,rt)}catch(X){throw P.emit("error",X),X}})()}handleOtherRequests(R){var P=this;return(0,y.Z)(function*(){if(!a.includes(R.method)&&R.method.startsWith("eth_"))return P.handleReadRequests(R);const rt=yield(yield P.getWalletConnector()).sendCustomRequest(R);return P.formatResponse(R,rt)})()}handleReadRequests(R){var P=this;return(0,y.Z)(function*(){if(!P.http){const X=new Error("HTTP Connection not available");throw P.emit("error",X),X}return P.http.send(R)})()}formatResponse(R,P){return{id:R.id,jsonrpc:R.jsonrpc,result:P}}getWalletConnector(R={}){const{disableSessionCreation:P=!1}=R;return new Promise((X,rt)=>{const ft=this.wc;this.isConnecting?this.onConnect(qt=>X(qt)):ft.connected||P?(this.connected||(this.connected=!0,this.updateState(ft.session)),X(ft)):(this.isConnecting=!0,ft.on("modal_closed",()=>{rt(new Error("User closed modal"))}),ft.createSession({chainId:this.chainId}).then(()=>{ft.on("connect",(qt,ne)=>{if(qt)return this.isConnecting=!1,rt(qt);this.isConnecting=!1,this.connected=!0,ne&&this.updateState(ne.params[0]),this.emit("connect"),this.triggerConnect(ft),X(ft)})}).catch(qt=>{this.isConnecting=!1,rt(qt)}))})}subscribeWalletConnector(){var R=this;return(0,y.Z)(function*(){const P=yield R.getWalletConnector();P.on("disconnect",X=>{X?R.emit("error",X):R.onDisconnect()}),P.on("session_update",(X,rt)=>{X?R.emit("error",X):R.updateState(rt.params[0])})})()}onDisconnect(){var R=this;return(0,y.Z)(function*(){yield R.stop(),R.emit("close",1e3,"Connection closed"),R.emit("disconnect",1e3,"Connection disconnected"),R.connected=!1})()}updateState(R){var P=this;return(0,y.Z)(function*(){const{accounts:X,chainId:rt,networkId:ft,rpcUrl:qt}=R;(!P.accounts||X&&P.accounts!==X)&&(P.accounts=X,P.emit("accountsChanged",X)),(!P.chainId||rt&&P.chainId!==rt)&&(P.chainId=rt,P.emit("chainChanged",rt)),(!P.networkId||ft&&P.networkId!==ft)&&(P.networkId=ft,P.emit("networkChanged",ft)),P.updateRpcUrl(P.chainId,qt||"")})()}updateRpcUrl(R,P=""){(P=P||function _r(C,R){let P;const X=function wr(C,R){let P;const X=g[C];return X&&(P=`https://${X}.infura.io/v3/${R}`),P}(C,R.infuraId);return R.custom&&R.custom[C]?P=R.custom[C]:X&&(P=X),P}(R,{infuraId:this.infuraId,custom:this.rpc||void 0}))?(this.rpcUrl=P,this.updateHttpConnection()):this.emit("error",new Error(`No RPC Url available for chainId: ${R}`))}updateHttpConnection(){this.rpcUrl&&(this.http=new Nn(this.rpcUrl),this.http.on("payload",R=>this.emit("payload",R)),this.http.on("error",R=>this.emit("error",R)))}sendAsyncPromise(R,P){return new Promise((X,rt)=>{this.sendAsync({id:Ne(),jsonrpc:"2.0",method:R,params:P||[]},(ft,qt)=>{ft?rt(ft):X(qt.result)})})}initialize(){var P,R=this;this.updateRpcUrl(this.chainId),this.addProvider(new Fn({eth_hashrate:"0x00",eth_mining:!1,eth_syncing:!0,net_listening:!0,web3_clientVersion:"WalletConnect/v1.x.x/javascript"})),this.addProvider(new Un),this.addProvider(new zn),this.addProvider(new Dn),this.addProvider(new Kn),this.addProvider(new Hn(this.configWallet())),this.addProvider({handleRequest:(P=(0,y.Z)(function*(X,rt,ft){try{const{error:qt,result:ne}=yield R.handleRequest(X);ft(qt,ne)}catch(qt){ft(qt)}}),function(rt,ft,qt){return P.apply(this,arguments)}),setEngine:P=>P})}configWallet(){var P,R=this;return{getAccounts:(P=(0,y.Z)(function*(X){try{const ft=(yield R.getWalletConnector()).accounts;ft&&ft.length?X(null,ft):X(new Error("Failed to get accounts"))}catch(rt){X(rt)}}),function(rt){return P.apply(this,arguments)}),processMessage:function(){var P=(0,y.Z)(function*(X,rt){try{rt(null,yield(yield R.getWalletConnector()).signMessage([X.from,X.data]))}catch(ft){rt(ft)}});return function(rt,ft){return P.apply(this,arguments)}}(),processPersonalMessage:function(){var P=(0,y.Z)(function*(X,rt){try{rt(null,yield(yield R.getWalletConnector()).signPersonalMessage([X.data,X.from]))}catch(ft){rt(ft)}});return function(rt,ft){return P.apply(this,arguments)}}(),processSignTransaction:function(){var P=(0,y.Z)(function*(X,rt){try{rt(null,yield(yield R.getWalletConnector()).signTransaction(X))}catch(ft){rt(ft)}});return function(rt,ft){return P.apply(this,arguments)}}(),processTransaction:function(){var P=(0,y.Z)(function*(X,rt){try{rt(null,yield(yield R.getWalletConnector()).sendTransaction(X))}catch(ft){rt(ft)}});return function(rt,ft){return P.apply(this,arguments)}}(),processTypedMessage:function(){var P=(0,y.Z)(function*(X,rt){try{rt(null,yield(yield R.getWalletConnector()).signTypedData([X.from,X.data]))}catch(ft){rt(ft)}});return function(rt,ft){return P.apply(this,arguments)}}()}}};var qn=function(C){return function(C,R,P,X){return new(P||(P=Promise))(function(ft,qt){function ne(be){try{se(X.next(be))}catch(Ae){qt(Ae)}}function we(be){try{se(X.throw(be))}catch(Ae){qt(Ae)}}function se(be){be.done?ft(be.value):function rt(ft){return ft instanceof P?ft:new P(function(qt){qt(ft)})}(be.value).then(ne,we)}se((X=X.apply(C,R||[])).next())})}(void 0,void 0,void 0,function(){return function(C,R){var X,rt,ft,qt,P={label:0,sent:function(){if(1&ft[0])throw ft[1];return ft[1]},trys:[],ops:[]};return qt={next:ne(0),throw:ne(1),return:ne(2)},"function"==typeof Symbol&&(qt[Symbol.iterator]=function(){return this}),qt;function ne(se){return function(be){return function we(se){if(X)throw new TypeError("Generator is already executing.");for(;P;)try{if(X=1,rt&&(ft=2&se[0]?rt.return:se[0]?rt.throw||((ft=rt.return)&&ft.call(rt),0):rt.next)&&!(ft=ft.call(rt,se[1])).done)return ft;switch(rt=0,ft&&(se=[2&se[0],ft.value]),se[0]){case 0:case 1:ft=se;break;case 4:return P.label++,{value:se[1],done:!1};case 5:P.label++,rt=se[1],se=[0];continue;case 7:se=P.ops.pop(),P.trys.pop();continue;default:if(!(ft=(ft=P.trys).length>0&&ft[ft.length-1])&&(6===se[0]||2===se[0])){P=0;continue}if(3===se[0]&&(!ft||se[1]>ft[0]&&se[1]{"use strict";M.r(l),M.d(l,{detectEnv:()=>D,detectOS:()=>J,formatIOSMobile:()=>At,formatMobileRegistry:()=>j,formatMobileRegistryEntry:()=>q,getClientMeta:()=>G,getCrypto:()=>u,getCryptoOrThrow:()=>r,getDappRegistryUrl:()=>S,getDocument:()=>s,getDocumentOrThrow:()=>i,getFromWindow:()=>t,getFromWindowOrThrow:()=>e,getLocal:()=>yt,getLocalStorage:()=>Z,getLocalStorageOrThrow:()=>z,getLocation:()=>o,getLocationOrThrow:()=>d,getMobileLinkRegistry:()=>Nt,getMobileRegistryEntry:()=>_t,getNavigator:()=>c,getNavigatorOrThrow:()=>f,getWalletRegistryUrl:()=>b,isAndroid:()=>at,isBrowser:()=>n,isIOS:()=>st,isMobile:()=>tt,isNode:()=>U,mobileLinkChoiceKey:()=>vt,removeLocal:()=>Qt,safeJsonParse:()=>ht,safeJsonStringify:()=>Ot,saveMobileLinkInfo:()=>Xt,setLocal:()=>ut});var x=M(98064),y=M(6179),p=function Y(nt,it,lt){this.name=nt,this.version=it,this.os=lt,this.type="browser"},a=function Y(nt){this.version=nt,this.type="node",this.name="node",this.os=process.platform},_=function Y(nt,it,lt,Gt){this.name=nt,this.version=it,this.os=lt,this.bot=Gt,this.type="bot-device"},g=function Y(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},m=function Y(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},T=/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,F=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],W=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function k(Y){var nt=function L(Y){return""!==Y&&F.reduce(function(nt,it){var lt=it[0];if(nt)return nt;var ct=it[1].exec(Y);return!!ct&&[lt,ct]},!1)}(Y);if(!nt)return null;var it=nt[0],lt=nt[1];if("searchbot"===it)return new g;var Gt=lt[1]&<[1].split(/[._]/).slice(0,3);Gt?Gt.length<3&&(Gt=function(){for(var Y=0,nt=0,it=arguments.length;nt"u"&&typeof navigator<"u"&&"ReactNative"===navigator.product?new m:typeof navigator<"u"?k(navigator.userAgent):function A(){return typeof process<"u"&&process.version?new a(process.version.slice(1)):null}()}(Y)}function J(){const Y=D();return Y&&Y.os?Y.os:void 0}function at(){const Y=J();return!!Y&&Y.toLowerCase().includes("android")}function st(){const Y=J();return!!Y&&(Y.toLowerCase().includes("ios")||Y.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1)}function tt(){return!!J()&&(at()||st())}function U(){const Y=D();return!(!Y||!Y.name)&&"node"===Y.name.toLowerCase()}function n(){return!U()&&!!c()}const t=y.getFromWindow,e=y.getFromWindowOrThrow,i=y.getDocumentOrThrow,s=y.getDocument,f=y.getNavigatorOrThrow,c=y.getNavigator,d=y.getLocationOrThrow,o=y.getLocation,r=y.getCryptoOrThrow,u=y.getCrypto,z=y.getLocalStorageOrThrow,Z=y.getLocalStorage;function G(){return x.D()}const ht=function Q(Y){if("string"!=typeof Y)throw new Error("Cannot safe json parse value of type "+typeof Y);try{return JSON.parse(Y)}catch{return Y}},Ot=function et(Y){return"string"==typeof Y?Y:JSON.stringify(Y)};function ut(Y,nt){const it=Ot(nt),lt=Z();lt&<.setItem(Y,it)}function yt(Y){let nt=null,it=null;const lt=Z();return lt&&(it=lt.getItem(Y)),nt=it&&ht(it),nt}function Qt(Y){const nt=Z();nt&&nt.removeItem(Y)}const vt="WALLETCONNECT_DEEPLINK_CHOICE";function At(Y,nt){const it=encodeURIComponent(Y);return nt.universalLink?`${nt.universalLink}/wc?uri=${it}`:nt.deepLink?`${nt.deepLink}${nt.deepLink.endsWith(":")?"//":"/"}wc?uri=${it}`:""}function Xt(Y){const nt=Y.href.split("?")[0];ut(vt,Object.assign(Object.assign({},Y),{href:nt}))}function _t(Y,nt){return Y.filter(it=>it.name.toLowerCase().includes(nt.toLowerCase()))[0]}function Nt(Y,nt){let it=Y;return nt&&(it=nt.map(lt=>_t(Y,lt)).filter(Boolean)),it}const O="https://registry.walletconnect.com";function b(){return O+"/api/v2/wallets"}function S(){return O+"/api/v2/dapps"}function q(Y,nt="mobile"){var it;return{name:Y.name||"",shortName:Y.metadata.shortName||"",color:Y.metadata.colors.primary||"",logo:null!==(it=Y.image_url.sm)&&void 0!==it?it:"",universalLink:Y[nt].universal||"",deepLink:Y[nt].native||""}}function j(Y,nt="mobile"){return Object.values(Y).filter(it=>!!it[nt].universal||!!it[nt].native).map(it=>q(it,nt))}},38573:(V,l)=>{"use strict";function M(){return(null==global?void 0:global.crypto)||(null==global?void 0:global.msCrypto)||{}}function x(){const h=M();return h.subtle||h.webkitSubtle}Object.defineProperty(l,"__esModule",{value:!0}),l.isBrowserCryptoAvailable=l.getSubtleCrypto=l.getBrowerCrypto=void 0,l.getBrowerCrypto=M,l.getSubtleCrypto=x,l.isBrowserCryptoAvailable=function y(){return!!M()&&!!x()}},26e3:(V,l)=>{"use strict";function M(){return typeof document>"u"&&typeof navigator<"u"&&"ReactNative"===navigator.product}function x(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}Object.defineProperty(l,"__esModule",{value:!0}),l.isBrowser=l.isNode=l.isReactNative=void 0,l.isReactNative=M,l.isNode=x,l.isBrowser=function y(){return!M()&&!x()}},43841:function(V,l,M){"use strict";var x=this&&this.__createBinding||(Object.create?function(h,p,a,_){void 0===_&&(_=a),Object.defineProperty(h,_,{enumerable:!0,get:function(){return p[a]}})}:function(h,p,a,_){void 0===_&&(_=a),h[_]=p[a]}),y=this&&this.__exportStar||function(h,p){for(var a in h)"default"!==a&&!p.hasOwnProperty(a)&&x(p,h,a)};Object.defineProperty(l,"__esModule",{value:!0}),y(M(38573),l),y(M(26e3),l)},62639:(V,l,M)=>{function x(O){return O&&"object"==typeof O&&"default"in O?O.default:O}var y=M(40859),h=x(M(26084)),p=x(M(83040)),a=M(24023);typeof Symbol<"u"&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),typeof Symbol<"u"&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var L="walletconnect-wrapper",N="walletconnect-style-sheet",k="walletconnect-qrcode-modal",A="walletconnect-qrcode-text";function D(O){return a.createElement("div",{className:"walletconnect-modal__header"},a.createElement("img",{src:"data:image/svg+xml,%3Csvg height='185' viewBox='0 0 300 185' width='300' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m61.4385429 36.2562612c48.9112241-47.8881663 128.2119871-47.8881663 177.1232091 0l5.886545 5.7634174c2.445561 2.3944081 2.445561 6.2765112 0 8.6709204l-20.136695 19.715503c-1.222781 1.1972051-3.2053 1.1972051-4.428081 0l-8.100584-7.9311479c-34.121692-33.4079817-89.443886-33.4079817-123.5655788 0l-8.6750562 8.4936051c-1.2227816 1.1972041-3.205301 1.1972041-4.4280806 0l-20.1366949-19.7155031c-2.4455612-2.3944092-2.4455612-6.2765122 0-8.6709204zm218.7677961 40.7737449 17.921697 17.546897c2.445549 2.3943969 2.445563 6.2764769.000031 8.6708899l-80.810171 79.121134c-2.445544 2.394426-6.410582 2.394453-8.85616.000062-.00001-.00001-.000022-.000022-.000032-.000032l-57.354143-56.154572c-.61139-.598602-1.60265-.598602-2.21404 0-.000004.000004-.000007.000008-.000011.000011l-57.3529212 56.154531c-2.4455368 2.394432-6.4105755 2.394472-8.8561612.000087-.0000143-.000014-.0000296-.000028-.0000449-.000044l-80.81241943-79.122185c-2.44556021-2.394408-2.44556021-6.2765115 0-8.6709197l17.92172963-17.5468673c2.4455602-2.3944082 6.4105989-2.3944082 8.8561602 0l57.3549775 56.155357c.6113908.598602 1.602649.598602 2.2140398 0 .0000092-.000009.0000174-.000017.0000265-.000024l57.3521031-56.155333c2.445505-2.3944633 6.410544-2.3945531 8.856161-.0002.000034.0000336.000068.0000673.000101.000101l57.354902 56.155432c.61139.598601 1.60265.598601 2.21404 0l57.353975-56.1543249c2.445561-2.3944092 6.410599-2.3944092 8.85616 0z' fill='%233b99fc'/%3E%3C/svg%3E",className:"walletconnect-modal__headerLogo"}),a.createElement("p",null,"WalletConnect"),a.createElement("div",{className:"walletconnect-modal__close__wrapper",onClick:O.onClose},a.createElement("div",{id:"walletconnect-qrcode-close",className:"walletconnect-modal__close__icon"},a.createElement("div",{className:"walletconnect-modal__close__line1"}),a.createElement("div",{className:"walletconnect-modal__close__line2"}))))}function J(O){return a.createElement("a",{className:"walletconnect-connect__button",href:O.href,id:"walletconnect-connect-button-"+O.name,onClick:O.onClick,rel:"noopener noreferrer",style:{backgroundColor:O.color},target:"_blank"},O.name)}function st(O){var b=O.color,j=O.logo;return a.createElement("a",{className:"walletconnect-modal__base__row",href:O.href,onClick:O.onClick,rel:"noopener noreferrer",target:"_blank"},a.createElement("h3",{className:"walletconnect-modal__base__row__h3"},O.name),a.createElement("div",{className:"walletconnect-modal__base__row__right"},a.createElement("div",{className:"walletconnect-modal__base__row__right__app-icon",style:{background:"url('"+j+"') "+b,backgroundSize:"100%"}}),a.createElement("img",{src:"data:image/svg+xml,%3Csvg fill='none' height='18' viewBox='0 0 8 18' width='8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath clip-rule='evenodd' d='m.586301.213898c-.435947.33907-.5144813.967342-.175411 1.403292l4.87831 6.27212c.28087.36111.28087.86677 0 1.22788l-4.878311 6.27211c-.33907.436-.260536 1.0642.175412 1.4033.435949.3391 1.064219.2605 1.403289-.1754l4.87832-6.2721c.84259-1.08336.84259-2.60034 0-3.68367l-4.87832-6.27212c-.33907-.4359474-.96734-.514482-1.403289-.175412z' fill='%233c4252' fill-rule='evenodd'/%3E%3C/svg%3E",className:"walletconnect-modal__base__row__right__caret"})))}function tt(O){var q=O.name,nt=window.innerWidth<768?(q.length>8?2.5:2.7)+"vw":"inherit";return a.createElement("a",{className:"walletconnect-connect__button__icon_anchor",href:O.href,onClick:O.onClick,rel:"noopener noreferrer",target:"_blank"},a.createElement("div",{className:"walletconnect-connect__button__icon",style:{background:"url('"+O.logo+"') "+O.color,backgroundSize:"100%"}}),a.createElement("div",{style:{fontSize:nt},className:"walletconnect-connect__button__text"},q))}function t(O){var b=y.isAndroid(),S=a.useState(""),q=S[0],j=S[1],Y=a.useState(""),nt=Y[0],it=Y[1],lt=a.useState(1),Gt=lt[0],ct=lt[1],dt=nt?O.links.filter(function(Ct){return Ct.name.toLowerCase().includes(nt.toLowerCase())}):O.links,jt=O.errorMessage,xt=nt||dt.length>5,Pt=Math.ceil(dt.length/12),fe=[12*(Gt-1)+1,12*Gt],pt=dt.length?dt.filter(function(Ct,te){return te+1>=fe[0]&&te+1<=fe[1]}):[],Lt=!b&&Pt>1,re=void 0;return a.createElement("div",null,a.createElement("p",{id:A,className:"walletconnect-qrcode__text"},b?O.text.connect_mobile_wallet:O.text.choose_preferred_wallet),!b&&a.createElement("input",{className:"walletconnect-search__input",placeholder:"Search",value:q,onChange:function bt(Ct){j(Ct.target.value),clearTimeout(re),Ct.target.value?re=setTimeout(function(){it(Ct.target.value),ct(1)},1e3):(j(""),it(""),ct(1))}}),a.createElement("div",{className:"walletconnect-connect__buttons__wrapper"+(b?"__android":xt&&dt.length?"__wrap":"")},b?a.createElement(J,{name:O.text.connect,color:"rgb(64, 153, 255)",href:O.uri,onClick:a.useCallback(function(){y.saveMobileLinkInfo({name:"Unknown",href:O.uri})},[])}):pt.length?pt.map(function(Ct){var te=Ct.color,wt=Ct.name,Ut=Ct.shortName,ie=Ct.logo,gt=y.formatIOSMobile(O.uri,Ct),Ft=a.useCallback(function(){y.saveMobileLinkInfo({name:wt,href:gt})},[pt]);return xt?a.createElement(tt,{color:te,href:gt,name:Ut||wt,logo:ie,onClick:Ft}):a.createElement(st,{color:te,href:gt,name:wt,logo:ie,onClick:Ft})}):a.createElement(a.Fragment,null,a.createElement("p",null,jt.length?O.errorMessage:O.links.length&&!dt.length?O.text.no_wallets_found:O.text.loading))),Lt&&a.createElement("div",{className:"walletconnect-modal__footer"},Array(Pt).fill(0).map(function(Ct,te){var wt=te+1;return a.createElement("a",{style:{margin:"auto 10px",fontWeight:Gt===wt?"bold":"normal"},onClick:function(){return ct(wt)}},wt)})))}function e(O){var b=!!O.message.trim();return a.createElement("div",{className:"walletconnect-qrcode__notification"+(b?" notification__show":"")},O.message)}function s(O){var b=a.useState(""),S=b[0],q=b[1],j=a.useState(""),Y=j[0],nt=j[1];return a.useEffect(function(){try{return Promise.resolve(function(O){try{var b="";return Promise.resolve(h.toString(O,{margin:0,type:"svg"})).then(function(S){return"string"==typeof S&&(b=S.replace("0||a.useEffect(function(){!function(){try{if(b)return Promise.resolve();nt(!0);var Ht=function T(O,b){try{var S=O()}catch(q){return b(q)}return S&&S.then?S.then(void 0,b):S}(function(){var oe=O.qrcodeModalOptions&&O.qrcodeModalOptions.registryUrl?O.qrcodeModalOptions.registryUrl:y.getWalletRegistryUrl();return Promise.resolve(fetch(oe)).then(function(Et){return Promise.resolve(Et.json()).then(function(Kt){var Dt=y.getMobileLinkRegistry(y.formatMobileRegistry(Kt.listings,S?"mobile":"desktop"),q);nt(!1),Gt(!0),gt(Dt.length?"":O.text.no_supported_wallets),wt(Dt);var he=1===Dt.length;he&&(pt(y.formatIOSMobile(O.uri,Dt[0])),jt(!0)),bt(he)})})},function(oe){nt(!1),Gt(!0),gt(O.text.something_went_wrong),console.error(oe)});Promise.resolve(Ht&&Ht.then?Ht.then(function(){}):void 0)}catch(oe){return Promise.reject(oe)}}()})};Ft();var de=S?dt:!dt;return a.createElement("div",{id:k,className:"walletconnect-qrcode__base animated fadeIn"},a.createElement("div",{className:"walletconnect-modal__base"},a.createElement(D,{onClose:O.onClose}),re&&dt?a.createElement("div",{className:"walletconnect-modal__single_wallet"},a.createElement("a",{onClick:function(){return y.saveMobileLinkInfo({name:te[0].name,href:fe})},href:fe,rel:"noopener noreferrer",target:"_blank"},O.text.connect_with+" "+(re?te[0].name:"")+" \u203a")):b||Y||!Y&&te.length?a.createElement("div",{className:"walletconnect-modal__mobile__toggle"+(de?" right__selected":"")},a.createElement("div",{className:"walletconnect-modal__mobile__toggle_selector"}),S?a.createElement(a.Fragment,null,a.createElement("a",{onClick:function(){return jt(!1),Ft()}},O.text.mobile),a.createElement("a",{onClick:function(){return jt(!0)}},O.text.qrcode)):a.createElement(a.Fragment,null,a.createElement("a",{onClick:function(){return jt(!0)}},O.text.qrcode),a.createElement("a",{onClick:function(){return jt(!1),Ft()}},O.text.desktop))):null,a.createElement("div",null,dt||!b&&!Y&&!te.length?a.createElement(s,Object.assign({},xt)):a.createElement(t,Object.assign({},xt,{links:te,errorMessage:ie})))))}var Q={de:{choose_preferred_wallet:"W\xe4hle bevorzugte Wallet",connect_mobile_wallet:"Verbinde mit Mobile Wallet",scan_qrcode_with_wallet:"Scanne den QR-code mit einer WalletConnect kompatiblen Wallet",connect:"Verbinden",qrcode:"QR-Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"In die Zwischenablage kopieren",copied_to_clipboard:"In die Zwischenablage kopiert!",connect_with:"Verbinden mit Hilfe von",loading:"Laden...",something_went_wrong:"Etwas ist schief gelaufen",no_supported_wallets:"Es gibt noch keine unterst\xfctzten Wallet",no_wallets_found:"keine Wallet gefunden"},en:{choose_preferred_wallet:"Choose your preferred wallet",connect_mobile_wallet:"Connect to Mobile Wallet",scan_qrcode_with_wallet:"Scan QR code with a WalletConnect-compatible wallet",connect:"Connect",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copy to clipboard",copied_to_clipboard:"Copied to clipboard!",connect_with:"Connect with",loading:"Loading...",something_went_wrong:"Something went wrong",no_supported_wallets:"There are no supported wallets yet",no_wallets_found:"No wallets found"},es:{choose_preferred_wallet:"Elige tu billetera preferida",connect_mobile_wallet:"Conectar a billetera m\xf3vil",scan_qrcode_with_wallet:"Escanea el c\xf3digo QR con una billetera compatible con WalletConnect",connect:"Conectar",qrcode:"C\xf3digo QR",mobile:"M\xf3vil",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Conectar mediante",loading:"Cargando...",something_went_wrong:"Algo sali\xf3 mal",no_supported_wallets:"Todav\xeda no hay billeteras compatibles",no_wallets_found:"No se encontraron billeteras"},fr:{choose_preferred_wallet:"Choisissez votre portefeuille pr\xe9f\xe9r\xe9",connect_mobile_wallet:"Se connecter au portefeuille mobile",scan_qrcode_with_wallet:"Scannez le QR code avec un portefeuille compatible WalletConnect",connect:"Se connecter",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copier",copied_to_clipboard:"Copi\xe9!",connect_with:"Connectez-vous \xe0 l'aide de",loading:"Chargement...",something_went_wrong:"Quelque chose a mal tourn\xe9",no_supported_wallets:"Il n'y a pas encore de portefeuilles pris en charge",no_wallets_found:"Aucun portefeuille trouv\xe9"},ko:{choose_preferred_wallet:"\uc6d0\ud558\ub294 \uc9c0\uac11\uc744 \uc120\ud0dd\ud558\uc138\uc694",connect_mobile_wallet:"\ubaa8\ubc14\uc77c \uc9c0\uac11\uacfc \uc5f0\uacb0",scan_qrcode_with_wallet:"WalletConnect \uc9c0\uc6d0 \uc9c0\uac11\uc5d0\uc11c QR\ucf54\ub4dc\ub97c \uc2a4\uce94\ud558\uc138\uc694",connect:"\uc5f0\uacb0",qrcode:"QR \ucf54\ub4dc",mobile:"\ubaa8\ubc14\uc77c",desktop:"\ub370\uc2a4\ud06c\ud0d1",copy_to_clipboard:"\ud074\ub9bd\ubcf4\ub4dc\uc5d0 \ubcf5\uc0ac",copied_to_clipboard:"\ud074\ub9bd\ubcf4\ub4dc\uc5d0 \ubcf5\uc0ac\ub418\uc5c8\uc2b5\ub2c8\ub2e4!",connect_with:"\uc640 \uc5f0\uacb0\ud558\ub2e4",loading:"\ub85c\ub4dc \uc911...",something_went_wrong:"\ubb38\uc81c\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4.",no_supported_wallets:"\uc544\uc9c1 \uc9c0\uc6d0\ub418\ub294 \uc9c0\uac11\uc774 \uc5c6\uc2b5\ub2c8\ub2e4",no_wallets_found:"\uc9c0\uac11\uc744 \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4"},pt:{choose_preferred_wallet:"Escolha sua carteira preferida",connect_mobile_wallet:"Conectar-se \xe0 carteira m\xf3vel",scan_qrcode_with_wallet:"Ler o c\xf3digo QR com uma carteira compat\xedvel com WalletConnect",connect:"Conectar",qrcode:"C\xf3digo QR",mobile:"M\xf3vel",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Ligar por meio de",loading:"Carregamento...",something_went_wrong:"Algo correu mal",no_supported_wallets:"Ainda n\xe3o h\xe1 carteiras suportadas",no_wallets_found:"Nenhuma carteira encontrada"},zh:{choose_preferred_wallet:"\u9009\u62e9\u4f60\u7684\u94b1\u5305",connect_mobile_wallet:"\u8fde\u63a5\u81f3\u79fb\u52a8\u7aef\u94b1\u5305",scan_qrcode_with_wallet:"\u4f7f\u7528\u517c\u5bb9 WalletConnect \u7684\u94b1\u5305\u626b\u63cf\u4e8c\u7ef4\u7801",connect:"\u8fde\u63a5",qrcode:"\u4e8c\u7ef4\u7801",mobile:"\u79fb\u52a8",desktop:"\u684c\u9762",copy_to_clipboard:"\u590d\u5236\u5230\u526a\u8d34\u677f",copied_to_clipboard:"\u590d\u5236\u5230\u526a\u8d34\u677f\u6210\u529f\uff01",connect_with:"\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u8fde\u63a5",loading:"\u6b63\u5728\u52a0\u8f7d...",something_went_wrong:"\u51fa\u4e86\u95ee\u9898",no_supported_wallets:"\u76ee\u524d\u8fd8\u6ca1\u6709\u652f\u6301\u7684\u94b1\u5305",no_wallets_found:"\u6ca1\u6709\u627e\u5230\u94b1\u5305"},fa:{choose_preferred_wallet:"\u06a9\u06cc\u0641 \u067e\u0648\u0644 \u0645\u0648\u0631\u062f \u0646\u0638\u0631 \u062e\u0648\u062f \u0631\u0627 \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0646\u06cc\u062f",connect_mobile_wallet:"\u0628\u0647 \u06a9\u06cc\u0641 \u067e\u0648\u0644 \u0645\u0648\u0628\u0627\u06cc\u0644 \u0648\u0635\u0644 \u0634\u0648\u06cc\u062f",scan_qrcode_with_wallet:"\u06a9\u062f QR \u0631\u0627 \u0628\u0627 \u06cc\u06a9 \u06a9\u06cc\u0641 \u067e\u0648\u0644 \u0633\u0627\u0632\u06af\u0627\u0631 \u0628\u0627 WalletConnect \u0627\u0633\u06a9\u0646 \u06a9\u0646\u06cc\u062f",connect:"\u0627\u062a\u0635\u0627\u0644",qrcode:"\u06a9\u062f QR",mobile:"\u0633\u06cc\u0627\u0631",desktop:"\u062f\u0633\u06a9\u062a\u0627\u067e",copy_to_clipboard:"\u06a9\u067e\u06cc \u0628\u0647 \u06a9\u0644\u06cc\u067e \u0628\u0648\u0631\u062f",copied_to_clipboard:"\u062f\u0631 \u06a9\u0644\u06cc\u067e \u0628\u0648\u0631\u062f \u06a9\u067e\u06cc \u0634\u062f!",connect_with:"\u0627\u0631\u062a\u0628\u0627\u0637 \u0628\u0627",loading:"...\u0628\u0627\u0631\u06af\u0630\u0627\u0631\u06cc",something_went_wrong:"\u0645\u0634\u06a9\u0644\u06cc \u067e\u06cc\u0634 \u0622\u0645\u062f",no_supported_wallets:"\u0647\u0646\u0648\u0632 \u0647\u06cc\u0686 \u06a9\u06cc\u0641 \u067e\u0648\u0644 \u067e\u0634\u062a\u06cc\u0628\u0627\u0646\u06cc \u0634\u062f\u0647 \u0627\u06cc \u0648\u062c\u0648\u062f \u0646\u062f\u0627\u0631\u062f",no_wallets_found:"\u0647\u06cc\u0686 \u06a9\u06cc\u0641 \u067e\u0648\u0644\u06cc \u067e\u06cc\u062f\u0627 \u0646\u0634\u062f"}};function Ot(){var O=y.getDocumentOrThrow(),b=O.getElementById(k);b&&(b.className=b.className.replace("fadeIn","fadeOut"),setTimeout(function(){var S=O.getElementById(L);S&&O.body.removeChild(S)},300))}function ut(O){return function(){Ot(),O&&O()}}function yt(){var O=y.getNavigatorOrThrow().language.split("-")[0]||"en";return Q[O]||Q.en}var At=function(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"};V.exports={open:function Xt(O,b,S){console.log(O),At()?function _(O){h.toString(O,{type:"terminal"}).then(console.log)}(O):function Qt(O,b,S){!function et(){var O=y.getDocumentOrThrow(),b=O.getElementById(N);b&&O.head.removeChild(b);var S=O.createElement("style");S.setAttribute("id",N),S.innerText=':root {\n --animation-duration: 300ms;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n.animated {\n animation-duration: var(--animation-duration);\n animation-fill-mode: both;\n}\n\n.fadeIn {\n animation-name: fadeIn;\n}\n\n.fadeOut {\n animation-name: fadeOut;\n}\n\n#walletconnect-wrapper {\n -webkit-user-select: none;\n align-items: center;\n display: flex;\n height: 100%;\n justify-content: center;\n left: 0;\n pointer-events: none;\n position: fixed;\n top: 0;\n user-select: none;\n width: 100%;\n z-index: 99999999999999;\n}\n\n.walletconnect-modal__headerLogo {\n height: 21px;\n}\n\n.walletconnect-modal__header p {\n color: #ffffff;\n font-size: 20px;\n font-weight: 600;\n margin: 0;\n align-items: flex-start;\n display: flex;\n flex: 1;\n margin-left: 5px;\n}\n\n.walletconnect-modal__close__wrapper {\n position: absolute;\n top: 0px;\n right: 0px;\n z-index: 10000;\n background: white;\n border-radius: 26px;\n padding: 6px;\n box-sizing: border-box;\n width: 26px;\n height: 26px;\n cursor: pointer;\n}\n\n.walletconnect-modal__close__icon {\n position: relative;\n top: 7px;\n right: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n transform: rotate(45deg);\n}\n\n.walletconnect-modal__close__line1 {\n position: absolute;\n width: 100%;\n border: 1px solid rgb(48, 52, 59);\n}\n\n.walletconnect-modal__close__line2 {\n position: absolute;\n width: 100%;\n border: 1px solid rgb(48, 52, 59);\n transform: rotate(90deg);\n}\n\n.walletconnect-qrcode__base {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n background: rgba(37, 41, 46, 0.95);\n height: 100%;\n left: 0;\n pointer-events: auto;\n position: fixed;\n top: 0;\n transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n width: 100%;\n will-change: opacity;\n padding: 40px;\n box-sizing: border-box;\n}\n\n.walletconnect-qrcode__text {\n color: rgba(60, 66, 82, 0.6);\n font-size: 16px;\n font-weight: 600;\n letter-spacing: 0;\n line-height: 1.1875em;\n margin: 10px 0 20px 0;\n text-align: center;\n width: 100%;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-qrcode__text {\n font-size: 4vw;\n }\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-qrcode__text {\n font-size: 14px;\n }\n}\n\n.walletconnect-qrcode__image {\n width: calc(100% - 30px);\n box-sizing: border-box;\n cursor: none;\n margin: 0 auto;\n}\n\n.walletconnect-qrcode__notification {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n font-size: 16px;\n padding: 16px 20px;\n border-radius: 16px;\n text-align: center;\n transition: all 0.1s ease-in-out;\n background: white;\n color: black;\n margin-bottom: -60px;\n opacity: 0;\n}\n\n.walletconnect-qrcode__notification.notification__show {\n opacity: 1;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-modal__header {\n height: 130px;\n }\n .walletconnect-modal__base {\n overflow: auto;\n }\n}\n\n@media only screen and (min-device-width: 415px) and (max-width: 768px) {\n #content {\n max-width: 768px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (min-width: 375px) and (max-width: 415px) {\n #content {\n max-width: 414px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (min-width: 320px) and (max-width: 375px) {\n #content {\n max-width: 375px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (max-width: 320px) {\n #content {\n max-width: 320px;\n box-sizing: border-box;\n }\n}\n\n.walletconnect-modal__base {\n -webkit-font-smoothing: antialiased;\n background: #ffffff;\n border-radius: 24px;\n box-shadow: 0 10px 50px 5px rgba(0, 0, 0, 0.4);\n font-family: ui-rounded, "SF Pro Rounded", "SF Pro Text", medium-content-sans-serif-font,\n -apple-system, BlinkMacSystemFont, ui-sans-serif, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,\n "Open Sans", "Helvetica Neue", sans-serif;\n margin-top: 41px;\n padding: 24px 24px 22px;\n pointer-events: auto;\n position: relative;\n text-align: center;\n transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n will-change: transform;\n overflow: visible;\n transform: translateY(-50%);\n top: 50%;\n max-width: 500px;\n margin: auto;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-modal__base {\n padding: 24px 12px;\n }\n}\n\n.walletconnect-modal__base .hidden {\n transform: translateY(150%);\n transition: 0.125s cubic-bezier(0.4, 0, 1, 1);\n}\n\n.walletconnect-modal__header {\n align-items: center;\n display: flex;\n height: 26px;\n left: 0;\n justify-content: space-between;\n position: absolute;\n top: -42px;\n width: 100%;\n}\n\n.walletconnect-modal__base .wc-logo {\n align-items: center;\n display: flex;\n height: 26px;\n margin-top: 15px;\n padding-bottom: 15px;\n pointer-events: auto;\n}\n\n.walletconnect-modal__base .wc-logo div {\n background-color: #3399ff;\n height: 21px;\n margin-right: 5px;\n mask-image: url("images/wc-logo.svg") center no-repeat;\n width: 32px;\n}\n\n.walletconnect-modal__base .wc-logo p {\n color: #ffffff;\n font-size: 20px;\n font-weight: 600;\n margin: 0;\n}\n\n.walletconnect-modal__base h2 {\n color: rgba(60, 66, 82, 0.6);\n font-size: 16px;\n font-weight: 600;\n letter-spacing: 0;\n line-height: 1.1875em;\n margin: 0 0 19px 0;\n text-align: center;\n width: 100%;\n}\n\n.walletconnect-modal__base__row {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n align-items: center;\n border-radius: 20px;\n cursor: pointer;\n display: flex;\n height: 56px;\n justify-content: space-between;\n padding: 0 15px;\n position: relative;\n margin: 0px 0px 8px;\n text-align: left;\n transition: 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n will-change: transform;\n text-decoration: none;\n}\n\n.walletconnect-modal__base__row:hover {\n background: rgba(60, 66, 82, 0.06);\n}\n\n.walletconnect-modal__base__row:active {\n background: rgba(60, 66, 82, 0.06);\n transform: scale(0.975);\n transition: 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n}\n\n.walletconnect-modal__base__row__h3 {\n color: #25292e;\n font-size: 20px;\n font-weight: 700;\n margin: 0;\n padding-bottom: 3px;\n}\n\n.walletconnect-modal__base__row__right {\n align-items: center;\n display: flex;\n justify-content: center;\n}\n\n.walletconnect-modal__base__row__right__app-icon {\n border-radius: 8px;\n height: 34px;\n margin: 0 11px 2px 0;\n width: 34px;\n background-size: 100%;\n box-shadow: 0 4px 12px 0 rgba(37, 41, 46, 0.25);\n}\n\n.walletconnect-modal__base__row__right__caret {\n height: 18px;\n opacity: 0.3;\n transition: 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n width: 8px;\n will-change: opacity;\n}\n\n.walletconnect-modal__base__row:hover .caret,\n.walletconnect-modal__base__row:active .caret {\n opacity: 0.6;\n}\n\n.walletconnect-modal__mobile__toggle {\n width: 80%;\n display: flex;\n margin: 0 auto;\n position: relative;\n overflow: hidden;\n border-radius: 8px;\n margin-bottom: 18px;\n background: #d4d5d9;\n}\n\n.walletconnect-modal__single_wallet {\n display: flex;\n justify-content: center;\n margin-top: 7px;\n margin-bottom: 18px;\n}\n\n.walletconnect-modal__single_wallet a {\n cursor: pointer;\n color: rgb(64, 153, 255);\n font-size: 21px;\n font-weight: 800;\n text-decoration: none !important;\n margin: 0 auto;\n}\n\n.walletconnect-modal__mobile__toggle_selector {\n width: calc(50% - 8px);\n background: white;\n position: absolute;\n border-radius: 5px;\n height: calc(100% - 8px);\n top: 4px;\n transition: all 0.2s ease-in-out;\n transform: translate3d(4px, 0, 0);\n}\n\n.walletconnect-modal__mobile__toggle.right__selected .walletconnect-modal__mobile__toggle_selector {\n transform: translate3d(calc(100% + 12px), 0, 0);\n}\n\n.walletconnect-modal__mobile__toggle a {\n font-size: 12px;\n width: 50%;\n text-align: center;\n padding: 8px;\n margin: 0;\n font-weight: 600;\n z-index: 1;\n}\n\n.walletconnect-modal__footer {\n display: flex;\n justify-content: center;\n margin-top: 20px;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-modal__footer {\n margin-top: 5vw;\n }\n}\n\n.walletconnect-modal__footer a {\n cursor: pointer;\n color: #898d97;\n font-size: 15px;\n margin: 0 auto;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-modal__footer a {\n font-size: 14px;\n }\n}\n\n.walletconnect-connect__buttons__wrapper {\n max-height: 44vh;\n}\n\n.walletconnect-connect__buttons__wrapper__android {\n margin: 50% 0;\n}\n\n.walletconnect-connect__buttons__wrapper__wrap {\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n margin: 10px 0;\n}\n\n@media only screen and (min-width: 768px) {\n .walletconnect-connect__buttons__wrapper__wrap {\n margin-top: 40px;\n }\n}\n\n.walletconnect-connect__button {\n background-color: rgb(64, 153, 255);\n padding: 12px;\n border-radius: 8px;\n text-decoration: none;\n color: rgb(255, 255, 255);\n font-weight: 500;\n}\n\n.walletconnect-connect__button__icon_anchor {\n cursor: pointer;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n margin: 8px;\n width: 42px;\n justify-self: center;\n flex-direction: column;\n text-decoration: none !important;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-connect__button__icon_anchor {\n margin: 4px;\n }\n}\n\n.walletconnect-connect__button__icon {\n border-radius: 10px;\n height: 42px;\n margin: 0;\n width: 42px;\n background-size: cover !important;\n box-shadow: 0 4px 12px 0 rgba(37, 41, 46, 0.25);\n}\n\n.walletconnect-connect__button__text {\n color: #424952;\n font-size: 2.7vw;\n text-decoration: none !important;\n padding: 0;\n margin-top: 1.8vw;\n font-weight: 600;\n}\n\n@media only screen and (min-width: 768px) {\n .walletconnect-connect__button__text {\n font-size: 16px;\n margin-top: 12px;\n }\n}\n\n.walletconnect-search__input {\n border: none;\n background: #d4d5d9;\n border-style: none;\n padding: 8px 16px;\n outline: none;\n font-style: normal;\n font-stretch: normal;\n font-size: 16px;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: normal;\n text-align: left;\n border-radius: 8px;\n width: calc(100% - 16px);\n margin: 0;\n margin-bottom: 8px;\n}\n',O.head.appendChild(S)}();var q=function ht(){var O=y.getDocumentOrThrow(),b=O.createElement("div");return b.setAttribute("id",L),O.body.appendChild(b),b}();a.render(a.createElement(f,{text:yt(),uri:O,onClose:ut(b),qrcodeModalOptions:S}),q)}(O,b,S)},close:function _t(){At()||function vt(){Ot()}()}}},42007:function(V,l,M){!function(x,y){"use strict";function h(U,n){if(!U)throw new Error(n||"Assertion failed")}function p(U,n){U.super_=n;var t=function(){};t.prototype=n.prototype,U.prototype=new t,U.prototype.constructor=U}function a(U,n,t){if(a.isBN(U))return U;this.negative=0,this.words=null,this.length=0,this.red=null,null!==U&&(("le"===n||"be"===n)&&(t=n,n=10),this._init(U||0,n||10,t||"be"))}var _;"object"==typeof x?x.exports=a:y.BN=a,a.BN=a,a.wordSize=26;try{_=M(94745).Buffer}catch{}function g(U,n,t){for(var e=0,i=Math.min(U.length,t),s=n;s=49&&f<=54?f-49+10:f>=17&&f<=22?f-17+10:15&f}return e}function m(U,n,t,e){for(var i=0,s=Math.min(U.length,t),f=n;f=49?c-49+10:c>=17?c-17+10:c}return i}a.isBN=function(n){return n instanceof a||null!==n&&"object"==typeof n&&n.constructor.wordSize===a.wordSize&&Array.isArray(n.words)},a.max=function(n,t){return n.cmp(t)>0?n:t},a.min=function(n,t){return n.cmp(t)<0?n:t},a.prototype._init=function(n,t,e){if("number"==typeof n)return this._initNumber(n,t,e);if("object"==typeof n)return this._initArray(n,t,e);"hex"===t&&(t=16),h(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(n=n.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(n,i):this._parseBase(n,t,i),"-"===n[0]&&(this.negative=1),this.strip(),"le"===e&&this._initArray(this.toArray(),t,e)},a.prototype._initNumber=function(n,t,e){n<0&&(this.negative=1,n=-n),n<67108864?(this.words=[67108863&n],this.length=1):n<4503599627370496?(this.words=[67108863&n,n/67108864&67108863],this.length=2):(h(n<9007199254740992),this.words=[67108863&n,n/67108864&67108863,1],this.length=3),"le"===e&&this._initArray(this.toArray(),t,e)},a.prototype._initArray=function(n,t,e){if(h("number"==typeof n.length),n.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(n.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)this.words[s]|=(f=n[i]|n[i-1]<<8|n[i-2]<<16)<>>26-c&67108863,(c+=24)>=26&&(c-=26,s++);else if("le"===e)for(i=0,s=0;i>>26-c&67108863,(c+=24)>=26&&(c-=26,s++);return this.strip()},a.prototype._parseHex=function(n,t){this.length=Math.ceil((n.length-t)/6),this.words=new Array(this.length);for(var e=0;e=t;e-=6)s=g(n,e,e+6),this.words[i]|=s<>>26-f&4194303,(f+=24)>=26&&(f-=26,i++);e+6!==t&&(s=g(n,t,e+6),this.words[i]|=s<>>26-f&4194303),this.strip()},a.prototype._parseBase=function(n,t,e){this.words=[0],this.length=1;for(var i=0,s=1;s<=67108863;s*=t)i++;i--,s=s/t|0;for(var f=n.length-e,c=f%i,d=Math.min(f,f-c)+e,o=0,r=e;r1&&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?""};var E=["","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"],T=[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],I=[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 W(U,n,t){t.negative=n.negative^U.negative;var e=U.length+n.length|0;t.length=e,e=e-1|0;var i=0|U.words[0],s=0|n.words[0],f=i*s,d=f/67108864|0;t.words[0]=67108863&f;for(var o=1;o>>26,u=67108863&d,z=Math.min(o,n.length-1),Z=Math.max(0,o-U.length+1);Z<=z;Z++)r+=(f=(i=0|U.words[o-Z|0])*(s=0|n.words[Z])+u)/67108864|0,u=67108863&f;t.words[o]=0|u,d=0|r}return 0!==d?t.words[o]=0|d:t.length--,t.strip()}a.prototype.toString=function(n,t){var e;if(t=0|t||1,16===(n=n||10)||"hex"===n){e="";for(var i=0,s=0,f=0;f>>24-i&16777215)||f!==this.length-1?E[6-d.length]+d+e:d+e,(i+=2)>=26&&(i-=26,f--)}for(0!==s&&(e=s.toString(16)+e);e.length%t!=0;)e="0"+e;return 0!==this.negative&&(e="-"+e),e}if(n===(0|n)&&n>=2&&n<=36){var o=T[n],r=I[n];e="";var u=this.clone();for(u.negative=0;!u.isZero();){var z=u.modn(r).toString(n);e=(u=u.idivn(r)).isZero()?z+e:E[o-z.length]+z+e}for(this.isZero()&&(e="0"+e);e.length%t!=0;)e="0"+e;return 0!==this.negative&&(e="-"+e),e}h(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var n=this.words[0];return 2===this.length?n+=67108864*this.words[1]:3===this.length&&1===this.words[2]?n+=4503599627370496+67108864*this.words[1]:this.length>2&&h(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-n:n},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(n,t){return h(typeof _<"u"),this.toArrayLike(_,n,t)},a.prototype.toArray=function(n,t){return this.toArrayLike(Array,n,t)},a.prototype.toArrayLike=function(n,t,e){var i=this.byteLength(),s=e||Math.max(1,i);h(i<=s,"byte array longer than desired length"),h(s>0,"Requested array length <= 0"),this.strip();var d,o,f="le"===t,c=new n(s),r=this.clone();if(f){for(o=0;!r.isZero();o++)d=r.andln(255),r.iushrn(8),c[o]=d;for(;o=4096&&(e+=13,t>>>=13),t>=64&&(e+=7,t>>>=7),t>=8&&(e+=4,t>>>=4),t>=2&&(e+=2,t>>>=2),e+t},a.prototype._zeroBits=function(n){if(0===n)return 26;var t=n,e=0;return 0==(8191&t)&&(e+=13,t>>>=13),0==(127&t)&&(e+=7,t>>>=7),0==(15&t)&&(e+=4,t>>>=4),0==(3&t)&&(e+=2,t>>>=2),0==(1&t)&&e++,e},a.prototype.bitLength=function(){var t=this._countBits(this.words[this.length-1]);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var n=0,t=0;tn.length?this.clone().ior(n):n.clone().ior(this)},a.prototype.uor=function(n){return this.length>n.length?this.clone().iuor(n):n.clone().iuor(this)},a.prototype.iuand=function(n){var t;t=this.length>n.length?n:this;for(var e=0;en.length?this.clone().iand(n):n.clone().iand(this)},a.prototype.uand=function(n){return this.length>n.length?this.clone().iuand(n):n.clone().iuand(this)},a.prototype.iuxor=function(n){var t,e;this.length>n.length?(t=this,e=n):(t=n,e=this);for(var i=0;in.length?this.clone().ixor(n):n.clone().ixor(this)},a.prototype.uxor=function(n){return this.length>n.length?this.clone().iuxor(n):n.clone().iuxor(this)},a.prototype.inotn=function(n){h("number"==typeof n&&n>=0);var t=0|Math.ceil(n/26),e=n%26;this._expand(t),e>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-e),this.strip()},a.prototype.notn=function(n){return this.clone().inotn(n)},a.prototype.setn=function(n,t){h("number"==typeof n&&n>=0);var e=n/26|0,i=n%26;return this._expand(e+1),this.words[e]=t?this.words[e]|1<n.length?(e=this,i=n):(e=n,i=this);for(var s=0,f=0;f>>26;for(;0!==s&&f>>26;if(this.length=e.length,0!==s)this.words[this.length]=s,this.length++;else if(e!==this)for(;fn.length?this.clone().iadd(n):n.clone().iadd(this)},a.prototype.isub=function(n){if(0!==n.negative){n.negative=0;var t=this.iadd(n);return n.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(n),this.negative=1,this._normSign();var i,s,e=this.cmp(n);if(0===e)return this.negative=0,this.length=1,this.words[0]=0,this;e>0?(i=this,s=n):(i=n,s=this);for(var f=0,c=0;c>26,this.words[c]=67108863&t;for(;0!==f&&c>26,this.words[c]=67108863&t;if(0===f&&c>>13,G=0|i[1],Q=8191&G,et=G>>>13,ht=0|i[2],Ot=8191&ht,ut=ht>>>13,yt=0|i[3],Qt=8191&yt,vt=yt>>>13,At=0|i[4],Xt=8191&At,_t=At>>>13,Nt=0|i[5],O=8191&Nt,b=Nt>>>13,S=0|i[6],q=8191&S,j=S>>>13,Y=0|i[7],nt=8191&Y,it=Y>>>13,lt=0|i[8],Gt=8191<,ct=lt>>>13,dt=0|i[9],jt=8191&dt,xt=dt>>>13,Pt=0|s[0],fe=8191&Pt,pt=Pt>>>13,Lt=0|s[1],re=8191&Lt,bt=Lt>>>13,Ct=0|s[2],te=8191&Ct,wt=Ct>>>13,Ut=0|s[3],ie=8191&Ut,gt=Ut>>>13,Ft=0|s[4],de=8191&Ft,Tt=Ft>>>13,Ht=0|s[5],oe=8191&Ht,Et=Ht>>>13,Kt=0|s[6],ve=8191&Kt,St=Kt>>>13,Dt=0|s[7],he=8191&Dt,kt=Dt>>>13,Zt=0|s[8],me=8191&Zt,Bt=Zt>>>13,Wt=0|s[9],pe=8191&Wt,Rt=Wt>>>13;e.negative=n.negative^t.negative,e.length=19;var zt=(c+(d=Math.imul(z,fe))|0)+((8191&(o=(o=Math.imul(z,pt))+Math.imul(Z,fe)|0))<<13)|0;c=((r=Math.imul(Z,pt))+(o>>>13)|0)+(zt>>>26)|0,zt&=67108863,d=Math.imul(Q,fe),o=(o=Math.imul(Q,pt))+Math.imul(et,fe)|0,r=Math.imul(et,pt);var _e=(c+(d=d+Math.imul(z,re)|0)|0)+((8191&(o=(o=o+Math.imul(z,bt)|0)+Math.imul(Z,re)|0))<<13)|0;c=((r=r+Math.imul(Z,bt)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863,d=Math.imul(Ot,fe),o=(o=Math.imul(Ot,pt))+Math.imul(ut,fe)|0,r=Math.imul(ut,pt),d=d+Math.imul(Q,re)|0,o=(o=o+Math.imul(Q,bt)|0)+Math.imul(et,re)|0,r=r+Math.imul(et,bt)|0;var H=(c+(d=d+Math.imul(z,te)|0)|0)+((8191&(o=(o=o+Math.imul(z,wt)|0)+Math.imul(Z,te)|0))<<13)|0;c=((r=r+Math.imul(Z,wt)|0)+(o>>>13)|0)+(H>>>26)|0,H&=67108863,d=Math.imul(Qt,fe),o=(o=Math.imul(Qt,pt))+Math.imul(vt,fe)|0,r=Math.imul(vt,pt),d=d+Math.imul(Ot,re)|0,o=(o=o+Math.imul(Ot,bt)|0)+Math.imul(ut,re)|0,r=r+Math.imul(ut,bt)|0,d=d+Math.imul(Q,te)|0,o=(o=o+Math.imul(Q,wt)|0)+Math.imul(et,te)|0,r=r+Math.imul(et,wt)|0;var K=(c+(d=d+Math.imul(z,ie)|0)|0)+((8191&(o=(o=o+Math.imul(z,gt)|0)+Math.imul(Z,ie)|0))<<13)|0;c=((r=r+Math.imul(Z,gt)|0)+(o>>>13)|0)+(K>>>26)|0,K&=67108863,d=Math.imul(Xt,fe),o=(o=Math.imul(Xt,pt))+Math.imul(_t,fe)|0,r=Math.imul(_t,pt),d=d+Math.imul(Qt,re)|0,o=(o=o+Math.imul(Qt,bt)|0)+Math.imul(vt,re)|0,r=r+Math.imul(vt,bt)|0,d=d+Math.imul(Ot,te)|0,o=(o=o+Math.imul(Ot,wt)|0)+Math.imul(ut,te)|0,r=r+Math.imul(ut,wt)|0,d=d+Math.imul(Q,ie)|0,o=(o=o+Math.imul(Q,gt)|0)+Math.imul(et,ie)|0,r=r+Math.imul(et,gt)|0;var $=(c+(d=d+Math.imul(z,de)|0)|0)+((8191&(o=(o=o+Math.imul(z,Tt)|0)+Math.imul(Z,de)|0))<<13)|0;c=((r=r+Math.imul(Z,Tt)|0)+(o>>>13)|0)+($>>>26)|0,$&=67108863,d=Math.imul(O,fe),o=(o=Math.imul(O,pt))+Math.imul(b,fe)|0,r=Math.imul(b,pt),d=d+Math.imul(Xt,re)|0,o=(o=o+Math.imul(Xt,bt)|0)+Math.imul(_t,re)|0,r=r+Math.imul(_t,bt)|0,d=d+Math.imul(Qt,te)|0,o=(o=o+Math.imul(Qt,wt)|0)+Math.imul(vt,te)|0,r=r+Math.imul(vt,wt)|0,d=d+Math.imul(Ot,ie)|0,o=(o=o+Math.imul(Ot,gt)|0)+Math.imul(ut,ie)|0,r=r+Math.imul(ut,gt)|0,d=d+Math.imul(Q,de)|0,o=(o=o+Math.imul(Q,Tt)|0)+Math.imul(et,de)|0,r=r+Math.imul(et,Tt)|0;var ot=(c+(d=d+Math.imul(z,oe)|0)|0)+((8191&(o=(o=o+Math.imul(z,Et)|0)+Math.imul(Z,oe)|0))<<13)|0;c=((r=r+Math.imul(Z,Et)|0)+(o>>>13)|0)+(ot>>>26)|0,ot&=67108863,d=Math.imul(q,fe),o=(o=Math.imul(q,pt))+Math.imul(j,fe)|0,r=Math.imul(j,pt),d=d+Math.imul(O,re)|0,o=(o=o+Math.imul(O,bt)|0)+Math.imul(b,re)|0,r=r+Math.imul(b,bt)|0,d=d+Math.imul(Xt,te)|0,o=(o=o+Math.imul(Xt,wt)|0)+Math.imul(_t,te)|0,r=r+Math.imul(_t,wt)|0,d=d+Math.imul(Qt,ie)|0,o=(o=o+Math.imul(Qt,gt)|0)+Math.imul(vt,ie)|0,r=r+Math.imul(vt,gt)|0,d=d+Math.imul(Ot,de)|0,o=(o=o+Math.imul(Ot,Tt)|0)+Math.imul(ut,de)|0,r=r+Math.imul(ut,Tt)|0,d=d+Math.imul(Q,oe)|0,o=(o=o+Math.imul(Q,Et)|0)+Math.imul(et,oe)|0,r=r+Math.imul(et,Et)|0;var It=(c+(d=d+Math.imul(z,ve)|0)|0)+((8191&(o=(o=o+Math.imul(z,St)|0)+Math.imul(Z,ve)|0))<<13)|0;c=((r=r+Math.imul(Z,St)|0)+(o>>>13)|0)+(It>>>26)|0,It&=67108863,d=Math.imul(nt,fe),o=(o=Math.imul(nt,pt))+Math.imul(it,fe)|0,r=Math.imul(it,pt),d=d+Math.imul(q,re)|0,o=(o=o+Math.imul(q,bt)|0)+Math.imul(j,re)|0,r=r+Math.imul(j,bt)|0,d=d+Math.imul(O,te)|0,o=(o=o+Math.imul(O,wt)|0)+Math.imul(b,te)|0,r=r+Math.imul(b,wt)|0,d=d+Math.imul(Xt,ie)|0,o=(o=o+Math.imul(Xt,gt)|0)+Math.imul(_t,ie)|0,r=r+Math.imul(_t,gt)|0,d=d+Math.imul(Qt,de)|0,o=(o=o+Math.imul(Qt,Tt)|0)+Math.imul(vt,de)|0,r=r+Math.imul(vt,Tt)|0,d=d+Math.imul(Ot,oe)|0,o=(o=o+Math.imul(Ot,Et)|0)+Math.imul(ut,oe)|0,r=r+Math.imul(ut,Et)|0,d=d+Math.imul(Q,ve)|0,o=(o=o+Math.imul(Q,St)|0)+Math.imul(et,ve)|0,r=r+Math.imul(et,St)|0;var mt=(c+(d=d+Math.imul(z,he)|0)|0)+((8191&(o=(o=o+Math.imul(z,kt)|0)+Math.imul(Z,he)|0))<<13)|0;c=((r=r+Math.imul(Z,kt)|0)+(o>>>13)|0)+(mt>>>26)|0,mt&=67108863,d=Math.imul(Gt,fe),o=(o=Math.imul(Gt,pt))+Math.imul(ct,fe)|0,r=Math.imul(ct,pt),d=d+Math.imul(nt,re)|0,o=(o=o+Math.imul(nt,bt)|0)+Math.imul(it,re)|0,r=r+Math.imul(it,bt)|0,d=d+Math.imul(q,te)|0,o=(o=o+Math.imul(q,wt)|0)+Math.imul(j,te)|0,r=r+Math.imul(j,wt)|0,d=d+Math.imul(O,ie)|0,o=(o=o+Math.imul(O,gt)|0)+Math.imul(b,ie)|0,r=r+Math.imul(b,gt)|0,d=d+Math.imul(Xt,de)|0,o=(o=o+Math.imul(Xt,Tt)|0)+Math.imul(_t,de)|0,r=r+Math.imul(_t,Tt)|0,d=d+Math.imul(Qt,oe)|0,o=(o=o+Math.imul(Qt,Et)|0)+Math.imul(vt,oe)|0,r=r+Math.imul(vt,Et)|0,d=d+Math.imul(Ot,ve)|0,o=(o=o+Math.imul(Ot,St)|0)+Math.imul(ut,ve)|0,r=r+Math.imul(ut,St)|0,d=d+Math.imul(Q,he)|0,o=(o=o+Math.imul(Q,kt)|0)+Math.imul(et,he)|0,r=r+Math.imul(et,kt)|0;var $t=(c+(d=d+Math.imul(z,me)|0)|0)+((8191&(o=(o=o+Math.imul(z,Bt)|0)+Math.imul(Z,me)|0))<<13)|0;c=((r=r+Math.imul(Z,Bt)|0)+(o>>>13)|0)+($t>>>26)|0,$t&=67108863,d=Math.imul(jt,fe),o=(o=Math.imul(jt,pt))+Math.imul(xt,fe)|0,r=Math.imul(xt,pt),d=d+Math.imul(Gt,re)|0,o=(o=o+Math.imul(Gt,bt)|0)+Math.imul(ct,re)|0,r=r+Math.imul(ct,bt)|0,d=d+Math.imul(nt,te)|0,o=(o=o+Math.imul(nt,wt)|0)+Math.imul(it,te)|0,r=r+Math.imul(it,wt)|0,d=d+Math.imul(q,ie)|0,o=(o=o+Math.imul(q,gt)|0)+Math.imul(j,ie)|0,r=r+Math.imul(j,gt)|0,d=d+Math.imul(O,de)|0,o=(o=o+Math.imul(O,Tt)|0)+Math.imul(b,de)|0,r=r+Math.imul(b,Tt)|0,d=d+Math.imul(Xt,oe)|0,o=(o=o+Math.imul(Xt,Et)|0)+Math.imul(_t,oe)|0,r=r+Math.imul(_t,Et)|0,d=d+Math.imul(Qt,ve)|0,o=(o=o+Math.imul(Qt,St)|0)+Math.imul(vt,ve)|0,r=r+Math.imul(vt,St)|0,d=d+Math.imul(Ot,he)|0,o=(o=o+Math.imul(Ot,kt)|0)+Math.imul(ut,he)|0,r=r+Math.imul(ut,kt)|0,d=d+Math.imul(Q,me)|0,o=(o=o+Math.imul(Q,Bt)|0)+Math.imul(et,me)|0,r=r+Math.imul(et,Bt)|0;var Jt=(c+(d=d+Math.imul(z,pe)|0)|0)+((8191&(o=(o=o+Math.imul(z,Rt)|0)+Math.imul(Z,pe)|0))<<13)|0;c=((r=r+Math.imul(Z,Rt)|0)+(o>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,d=Math.imul(jt,re),o=(o=Math.imul(jt,bt))+Math.imul(xt,re)|0,r=Math.imul(xt,bt),d=d+Math.imul(Gt,te)|0,o=(o=o+Math.imul(Gt,wt)|0)+Math.imul(ct,te)|0,r=r+Math.imul(ct,wt)|0,d=d+Math.imul(nt,ie)|0,o=(o=o+Math.imul(nt,gt)|0)+Math.imul(it,ie)|0,r=r+Math.imul(it,gt)|0,d=d+Math.imul(q,de)|0,o=(o=o+Math.imul(q,Tt)|0)+Math.imul(j,de)|0,r=r+Math.imul(j,Tt)|0,d=d+Math.imul(O,oe)|0,o=(o=o+Math.imul(O,Et)|0)+Math.imul(b,oe)|0,r=r+Math.imul(b,Et)|0,d=d+Math.imul(Xt,ve)|0,o=(o=o+Math.imul(Xt,St)|0)+Math.imul(_t,ve)|0,r=r+Math.imul(_t,St)|0,d=d+Math.imul(Qt,he)|0,o=(o=o+Math.imul(Qt,kt)|0)+Math.imul(vt,he)|0,r=r+Math.imul(vt,kt)|0,d=d+Math.imul(Ot,me)|0,o=(o=o+Math.imul(Ot,Bt)|0)+Math.imul(ut,me)|0,r=r+Math.imul(ut,Bt)|0;var Yt=(c+(d=d+Math.imul(Q,pe)|0)|0)+((8191&(o=(o=o+Math.imul(Q,Rt)|0)+Math.imul(et,pe)|0))<<13)|0;c=((r=r+Math.imul(et,Rt)|0)+(o>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,d=Math.imul(jt,te),o=(o=Math.imul(jt,wt))+Math.imul(xt,te)|0,r=Math.imul(xt,wt),d=d+Math.imul(Gt,ie)|0,o=(o=o+Math.imul(Gt,gt)|0)+Math.imul(ct,ie)|0,r=r+Math.imul(ct,gt)|0,d=d+Math.imul(nt,de)|0,o=(o=o+Math.imul(nt,Tt)|0)+Math.imul(it,de)|0,r=r+Math.imul(it,Tt)|0,d=d+Math.imul(q,oe)|0,o=(o=o+Math.imul(q,Et)|0)+Math.imul(j,oe)|0,r=r+Math.imul(j,Et)|0,d=d+Math.imul(O,ve)|0,o=(o=o+Math.imul(O,St)|0)+Math.imul(b,ve)|0,r=r+Math.imul(b,St)|0,d=d+Math.imul(Xt,he)|0,o=(o=o+Math.imul(Xt,kt)|0)+Math.imul(_t,he)|0,r=r+Math.imul(_t,kt)|0,d=d+Math.imul(Qt,me)|0,o=(o=o+Math.imul(Qt,Bt)|0)+Math.imul(vt,me)|0,r=r+Math.imul(vt,Bt)|0;var Vt=(c+(d=d+Math.imul(Ot,pe)|0)|0)+((8191&(o=(o=o+Math.imul(Ot,Rt)|0)+Math.imul(ut,pe)|0))<<13)|0;c=((r=r+Math.imul(ut,Rt)|0)+(o>>>13)|0)+(Vt>>>26)|0,Vt&=67108863,d=Math.imul(jt,ie),o=(o=Math.imul(jt,gt))+Math.imul(xt,ie)|0,r=Math.imul(xt,gt),d=d+Math.imul(Gt,de)|0,o=(o=o+Math.imul(Gt,Tt)|0)+Math.imul(ct,de)|0,r=r+Math.imul(ct,Tt)|0,d=d+Math.imul(nt,oe)|0,o=(o=o+Math.imul(nt,Et)|0)+Math.imul(it,oe)|0,r=r+Math.imul(it,Et)|0,d=d+Math.imul(q,ve)|0,o=(o=o+Math.imul(q,St)|0)+Math.imul(j,ve)|0,r=r+Math.imul(j,St)|0,d=d+Math.imul(O,he)|0,o=(o=o+Math.imul(O,kt)|0)+Math.imul(b,he)|0,r=r+Math.imul(b,kt)|0,d=d+Math.imul(Xt,me)|0,o=(o=o+Math.imul(Xt,Bt)|0)+Math.imul(_t,me)|0,r=r+Math.imul(_t,Bt)|0;var Mt=(c+(d=d+Math.imul(Qt,pe)|0)|0)+((8191&(o=(o=o+Math.imul(Qt,Rt)|0)+Math.imul(vt,pe)|0))<<13)|0;c=((r=r+Math.imul(vt,Rt)|0)+(o>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,d=Math.imul(jt,de),o=(o=Math.imul(jt,Tt))+Math.imul(xt,de)|0,r=Math.imul(xt,Tt),d=d+Math.imul(Gt,oe)|0,o=(o=o+Math.imul(Gt,Et)|0)+Math.imul(ct,oe)|0,r=r+Math.imul(ct,Et)|0,d=d+Math.imul(nt,ve)|0,o=(o=o+Math.imul(nt,St)|0)+Math.imul(it,ve)|0,r=r+Math.imul(it,St)|0,d=d+Math.imul(q,he)|0,o=(o=o+Math.imul(q,kt)|0)+Math.imul(j,he)|0,r=r+Math.imul(j,kt)|0,d=d+Math.imul(O,me)|0,o=(o=o+Math.imul(O,Bt)|0)+Math.imul(b,me)|0,r=r+Math.imul(b,Bt)|0;var ee=(c+(d=d+Math.imul(Xt,pe)|0)|0)+((8191&(o=(o=o+Math.imul(Xt,Rt)|0)+Math.imul(_t,pe)|0))<<13)|0;c=((r=r+Math.imul(_t,Rt)|0)+(o>>>13)|0)+(ee>>>26)|0,ee&=67108863,d=Math.imul(jt,oe),o=(o=Math.imul(jt,Et))+Math.imul(xt,oe)|0,r=Math.imul(xt,Et),d=d+Math.imul(Gt,ve)|0,o=(o=o+Math.imul(Gt,St)|0)+Math.imul(ct,ve)|0,r=r+Math.imul(ct,St)|0,d=d+Math.imul(nt,he)|0,o=(o=o+Math.imul(nt,kt)|0)+Math.imul(it,he)|0,r=r+Math.imul(it,kt)|0,d=d+Math.imul(q,me)|0,o=(o=o+Math.imul(q,Bt)|0)+Math.imul(j,me)|0,r=r+Math.imul(j,Bt)|0;var ae=(c+(d=d+Math.imul(O,pe)|0)|0)+((8191&(o=(o=o+Math.imul(O,Rt)|0)+Math.imul(b,pe)|0))<<13)|0;c=((r=r+Math.imul(b,Rt)|0)+(o>>>13)|0)+(ae>>>26)|0,ae&=67108863,d=Math.imul(jt,ve),o=(o=Math.imul(jt,St))+Math.imul(xt,ve)|0,r=Math.imul(xt,St),d=d+Math.imul(Gt,he)|0,o=(o=o+Math.imul(Gt,kt)|0)+Math.imul(ct,he)|0,r=r+Math.imul(ct,kt)|0,d=d+Math.imul(nt,me)|0,o=(o=o+Math.imul(nt,Bt)|0)+Math.imul(it,me)|0,r=r+Math.imul(it,Bt)|0;var ce=(c+(d=d+Math.imul(q,pe)|0)|0)+((8191&(o=(o=o+Math.imul(q,Rt)|0)+Math.imul(j,pe)|0))<<13)|0;c=((r=r+Math.imul(j,Rt)|0)+(o>>>13)|0)+(ce>>>26)|0,ce&=67108863,d=Math.imul(jt,he),o=(o=Math.imul(jt,kt))+Math.imul(xt,he)|0,r=Math.imul(xt,kt),d=d+Math.imul(Gt,me)|0,o=(o=o+Math.imul(Gt,Bt)|0)+Math.imul(ct,me)|0,r=r+Math.imul(ct,Bt)|0;var le=(c+(d=d+Math.imul(nt,pe)|0)|0)+((8191&(o=(o=o+Math.imul(nt,Rt)|0)+Math.imul(it,pe)|0))<<13)|0;c=((r=r+Math.imul(it,Rt)|0)+(o>>>13)|0)+(le>>>26)|0,le&=67108863,d=Math.imul(jt,me),o=(o=Math.imul(jt,Bt))+Math.imul(xt,me)|0,r=Math.imul(xt,Bt);var ge=(c+(d=d+Math.imul(Gt,pe)|0)|0)+((8191&(o=(o=o+Math.imul(Gt,Rt)|0)+Math.imul(ct,pe)|0))<<13)|0;c=((r=r+Math.imul(ct,Rt)|0)+(o>>>13)|0)+(ge>>>26)|0,ge&=67108863;var ue=(c+(d=Math.imul(jt,pe))|0)+((8191&(o=(o=Math.imul(jt,Rt))+Math.imul(xt,pe)|0))<<13)|0;return c=((r=Math.imul(xt,Rt))+(o>>>13)|0)+(ue>>>26)|0,ue&=67108863,f[0]=zt,f[1]=_e,f[2]=H,f[3]=K,f[4]=$,f[5]=ot,f[6]=It,f[7]=mt,f[8]=$t,f[9]=Jt,f[10]=Yt,f[11]=Vt,f[12]=Mt,f[13]=ee,f[14]=ae,f[15]=ce,f[16]=le,f[17]=ge,f[18]=ue,0!==c&&(f[19]=c,e.length++),e};function N(U,n,t){return(new k).mulp(U,n,t)}function k(U,n){this.x=U,this.y=n}Math.imul||(v=W),a.prototype.mulTo=function(n,t){var e,i=this.length+n.length;return e=10===this.length&&10===n.length?v(this,n,t):i<63?W(this,n,t):i<1024?function L(U,n,t){t.negative=n.negative^U.negative,t.length=U.length+n.length;for(var e=0,i=0,s=0;s>>26)|0)>>>26,f&=67108863}t.words[s]=c,e=f,f=i}return 0!==e?t.words[s]=e:t.length--,t.strip()}(this,n,t):N(this,n,t),e},k.prototype.makeRBT=function(n){for(var t=new Array(n),e=a.prototype._countBits(n)-1,i=0;i>=1;return i},k.prototype.permute=function(n,t,e,i,s,f){for(var c=0;c>>=1)s++;return 1<>>=13),s>>>=13;for(f=2*t;f>=26,t+=i/67108864|0,t+=s>>>26,this.words[e]=67108863&s}return 0!==t&&(this.words[e]=t,this.length++),this},a.prototype.muln=function(n){return this.clone().imuln(n)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(n){var t=function F(U){for(var n=new Array(U.bitLength()),t=0;t>>i}return n}(n);if(0===t.length)return new a(1);for(var e=this,i=0;i=0);var s,t=n%26,e=(n-t)/26,i=67108863>>>26-t<<26-t;if(0!==t){var f=0;for(s=0;s>>26-t}f&&(this.words[s]=f,this.length++)}if(0!==e){for(s=this.length-1;s>=0;s--)this.words[s+e]=this.words[s];for(s=0;s=0),i=t?(t-t%26)/26:0;var s=n%26,f=Math.min((n-s)/26,this.length),c=67108863^67108863>>>s<f)for(this.length-=f,o=0;o=0&&(0!==r||o>=i);o--){var u=0|this.words[o];this.words[o]=r<<26-s|u>>>s,r=u&c}return d&&0!==r&&(d.words[d.length++]=r),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(n,t,e){return h(0===this.negative),this.iushrn(n,t,e)},a.prototype.shln=function(n){return this.clone().ishln(n)},a.prototype.ushln=function(n){return this.clone().iushln(n)},a.prototype.shrn=function(n){return this.clone().ishrn(n)},a.prototype.ushrn=function(n){return this.clone().iushrn(n)},a.prototype.testn=function(n){h("number"==typeof n&&n>=0);var t=n%26,e=(n-t)/26;return!(this.length<=e||!(this.words[e]&1<=0);var t=n%26,e=(n-t)/26;return h(0===this.negative,"imaskn works only with positive numbers"),this.length<=e?this:(0!==t&&e++,this.length=Math.min(e,this.length),0!==t&&(this.words[this.length-1]&=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(n){if(h("number"==typeof n),h(n<67108864),n<0)return this.iaddn(-n);if(0!==this.negative)return this.negative=0,this.iaddn(n),this.negative=1,this;if(this.words[0]-=n,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(d/67108864|0),this.words[s+e]=67108863&f}for(;s>26,this.words[s+e]=67108863&f;if(0===c)return this.strip();for(h(-1===c),c=0,s=0;s>26,this.words[s]=67108863&f;return this.negative=1,this.strip()},a.prototype._wordDiv=function(n,t){var e,i=this.clone(),s=n,f=0|s.words[s.length-1];0!=(e=26-this._countBits(f))&&(s=s.ushln(e),i.iushln(e),f=0|s.words[s.length-1]);var o,d=i.length-s.length;if("mod"!==t){(o=new a(null)).length=d+1,o.words=new Array(o.length);for(var r=0;r=0;z--){var Z=67108864*(0|i.words[s.length+z])+(0|i.words[s.length+z-1]);for(Z=Math.min(Z/f|0,67108863),i._ishlnsubmul(s,Z,z);0!==i.negative;)Z--,i.negative=0,i._ishlnsubmul(s,1,z),i.isZero()||(i.negative^=1);o&&(o.words[z]=Z)}return o&&o.strip(),i.strip(),"div"!==t&&0!==e&&i.iushrn(e),{div:o||null,mod:i}},a.prototype.divmod=function(n,t,e){return h(!n.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===n.negative?(f=this.neg().divmod(n,t),"mod"!==t&&(i=f.div.neg()),"div"!==t&&(s=f.mod.neg(),e&&0!==s.negative&&s.iadd(n)),{div:i,mod:s}):0===this.negative&&0!==n.negative?(f=this.divmod(n.neg(),t),"mod"!==t&&(i=f.div.neg()),{div:i,mod:f.mod}):0!=(this.negative&n.negative)?(f=this.neg().divmod(n.neg(),t),"div"!==t&&(s=f.mod.neg(),e&&0!==s.negative&&s.isub(n)),{div:f.div,mod:s}):n.length>this.length||this.cmp(n)<0?{div:new a(0),mod:this}:1===n.length?"div"===t?{div:this.divn(n.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(n.words[0]))}:{div:this.divn(n.words[0]),mod:new a(this.modn(n.words[0]))}:this._wordDiv(n,t);var i,s,f},a.prototype.div=function(n){return this.divmod(n,"div",!1).div},a.prototype.mod=function(n){return this.divmod(n,"mod",!1).mod},a.prototype.umod=function(n){return this.divmod(n,"mod",!0).mod},a.prototype.divRound=function(n){var t=this.divmod(n);if(t.mod.isZero())return t.div;var e=0!==t.div.negative?t.mod.isub(n):t.mod,i=n.ushrn(1),s=n.andln(1),f=e.cmp(i);return f<0||1===s&&0===f?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(n){h(n<=67108863);for(var t=(1<<26)%n,e=0,i=this.length-1;i>=0;i--)e=(t*e+(0|this.words[i]))%n;return e},a.prototype.idivn=function(n){h(n<=67108863);for(var t=0,e=this.length-1;e>=0;e--){var i=(0|this.words[e])+67108864*t;this.words[e]=i/n|0,t=i%n}return this.strip()},a.prototype.divn=function(n){return this.clone().idivn(n)},a.prototype.egcd=function(n){h(0===n.negative),h(!n.isZero());var t=this,e=n.clone();t=0!==t.negative?t.umod(n):t.clone();for(var i=new a(1),s=new a(0),f=new a(0),c=new a(1),d=0;t.isEven()&&e.isEven();)t.iushrn(1),e.iushrn(1),++d;for(var o=e.clone(),r=t.clone();!t.isZero();){for(var u=0,z=1;0==(t.words[0]&z)&&u<26;++u,z<<=1);if(u>0)for(t.iushrn(u);u-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(o),s.isub(r)),i.iushrn(1),s.iushrn(1);for(var Z=0,G=1;0==(e.words[0]&G)&&Z<26;++Z,G<<=1);if(Z>0)for(e.iushrn(Z);Z-- >0;)(f.isOdd()||c.isOdd())&&(f.iadd(o),c.isub(r)),f.iushrn(1),c.iushrn(1);t.cmp(e)>=0?(t.isub(e),i.isub(f),s.isub(c)):(e.isub(t),f.isub(i),c.isub(s))}return{a:f,b:c,gcd:e.iushln(d)}},a.prototype._invmp=function(n){h(0===n.negative),h(!n.isZero());var u,t=this,e=n.clone();t=0!==t.negative?t.umod(n):t.clone();for(var i=new a(1),s=new a(0),f=e.clone();t.cmpn(1)>0&&e.cmpn(1)>0;){for(var c=0,d=1;0==(t.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(t.iushrn(c);c-- >0;)i.isOdd()&&i.iadd(f),i.iushrn(1);for(var o=0,r=1;0==(e.words[0]&r)&&o<26;++o,r<<=1);if(o>0)for(e.iushrn(o);o-- >0;)s.isOdd()&&s.iadd(f),s.iushrn(1);t.cmp(e)>=0?(t.isub(e),i.isub(s)):(e.isub(t),s.isub(i))}return(u=0===t.cmpn(1)?i:s).cmpn(0)<0&&u.iadd(n),u},a.prototype.gcd=function(n){if(this.isZero())return n.abs();if(n.isZero())return this.abs();var t=this.clone(),e=n.clone();t.negative=0,e.negative=0;for(var i=0;t.isEven()&&e.isEven();i++)t.iushrn(1),e.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;e.isEven();)e.iushrn(1);var s=t.cmp(e);if(s<0){var f=t;t=e,e=f}else if(0===s||0===e.cmpn(1))break;t.isub(e)}return e.iushln(i)},a.prototype.invm=function(n){return this.egcd(n).a.umod(n)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(n){return this.words[0]&n},a.prototype.bincn=function(n){h("number"==typeof n);var t=n%26,e=(n-t)/26,i=1<>>26,this.words[f]=c&=67108863}return 0!==s&&(this.words[f]=s,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(n){var e,t=n<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;if(this.strip(),this.length>1)e=1;else{t&&(n=-n),h(n<=67108863,"Number is too big");var i=0|this.words[0];e=i===n?0:in.length)return 1;if(this.length=0;e--){var i=0|this.words[e],s=0|n.words[e];if(i!==s){is&&(t=1);break}}return t},a.prototype.gtn=function(n){return 1===this.cmpn(n)},a.prototype.gt=function(n){return 1===this.cmp(n)},a.prototype.gten=function(n){return this.cmpn(n)>=0},a.prototype.gte=function(n){return this.cmp(n)>=0},a.prototype.ltn=function(n){return-1===this.cmpn(n)},a.prototype.lt=function(n){return-1===this.cmp(n)},a.prototype.lten=function(n){return this.cmpn(n)<=0},a.prototype.lte=function(n){return this.cmp(n)<=0},a.prototype.eqn=function(n){return 0===this.cmpn(n)},a.prototype.eq=function(n){return 0===this.cmp(n)},a.red=function(n){return new st(n)},a.prototype.toRed=function(n){return h(!this.red,"Already a number in reduction context"),h(0===this.negative,"red works only with positives"),n.convertTo(this)._forceRed(n)},a.prototype.fromRed=function(){return h(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(n){return this.red=n,this},a.prototype.forceRed=function(n){return h(!this.red,"Already a number in reduction context"),this._forceRed(n)},a.prototype.redAdd=function(n){return h(this.red,"redAdd works only with red numbers"),this.red.add(this,n)},a.prototype.redIAdd=function(n){return h(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,n)},a.prototype.redSub=function(n){return h(this.red,"redSub works only with red numbers"),this.red.sub(this,n)},a.prototype.redISub=function(n){return h(this.red,"redISub works only with red numbers"),this.red.isub(this,n)},a.prototype.redShl=function(n){return h(this.red,"redShl works only with red numbers"),this.red.shl(this,n)},a.prototype.redMul=function(n){return h(this.red,"redMul works only with red numbers"),this.red._verify2(this,n),this.red.mul(this,n)},a.prototype.redIMul=function(n){return h(this.red,"redMul works only with red numbers"),this.red._verify2(this,n),this.red.imul(this,n)},a.prototype.redSqr=function(){return h(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return h(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return h(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return h(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return h(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(n){return h(this.red&&!n.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,n)};var w={k256:null,p224:null,p192:null,p25519:null};function A(U,n){this.name=U,this.p=new a(n,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function B(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function D(){A.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function J(){A.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function at(){A.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function st(U){if("string"==typeof U){var n=a._prime(U);this.m=n.p,this.prime=n}else h(U.gtn(1),"modulus must be greater than 1"),this.m=U,this.prime=null}function tt(U){st.call(this,U),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)}A.prototype._tmp=function(){var n=new a(null);return n.words=new Array(Math.ceil(this.n/13)),n},A.prototype.ireduce=function(n){var e,t=n;do{this.split(t,this.tmp),e=(t=(t=this.imulK(t)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e0?t.isub(this.p):t.strip(),t},A.prototype.split=function(n,t){n.iushrn(this.n,0,t)},A.prototype.imulK=function(n){return n.imul(this.k)},p(B,A),B.prototype.split=function(n,t){for(var e=4194303,i=Math.min(n.length,9),s=0;s>>22,f=c}n.words[s-10]=f>>>=22,n.length-=0===f&&n.length>10?10:9},B.prototype.imulK=function(n){n.words[n.length]=0,n.words[n.length+1]=0,n.length+=2;for(var t=0,e=0;e>>=26,n.words[e]=s,t=i}return 0!==t&&(n.words[n.length++]=t),n},a._prime=function(n){if(w[n])return w[n];var t;if("k256"===n)t=new B;else if("p224"===n)t=new D;else if("p192"===n)t=new J;else{if("p25519"!==n)throw new Error("Unknown prime "+n);t=new at}return w[n]=t,t},st.prototype._verify1=function(n){h(0===n.negative,"red works only with positives"),h(n.red,"red works only with red numbers")},st.prototype._verify2=function(n,t){h(0==(n.negative|t.negative),"red works only with positives"),h(n.red&&n.red===t.red,"red works only with red numbers")},st.prototype.imod=function(n){return this.prime?this.prime.ireduce(n)._forceRed(this):n.umod(this.m)._forceRed(this)},st.prototype.neg=function(n){return n.isZero()?n.clone():this.m.sub(n)._forceRed(this)},st.prototype.add=function(n,t){this._verify2(n,t);var e=n.add(t);return e.cmp(this.m)>=0&&e.isub(this.m),e._forceRed(this)},st.prototype.iadd=function(n,t){this._verify2(n,t);var e=n.iadd(t);return e.cmp(this.m)>=0&&e.isub(this.m),e},st.prototype.sub=function(n,t){this._verify2(n,t);var e=n.sub(t);return e.cmpn(0)<0&&e.iadd(this.m),e._forceRed(this)},st.prototype.isub=function(n,t){this._verify2(n,t);var e=n.isub(t);return e.cmpn(0)<0&&e.iadd(this.m),e},st.prototype.shl=function(n,t){return this._verify1(n),this.imod(n.ushln(t))},st.prototype.imul=function(n,t){return this._verify2(n,t),this.imod(n.imul(t))},st.prototype.mul=function(n,t){return this._verify2(n,t),this.imod(n.mul(t))},st.prototype.isqr=function(n){return this.imul(n,n.clone())},st.prototype.sqr=function(n){return this.mul(n,n)},st.prototype.sqrt=function(n){if(n.isZero())return n.clone();var t=this.m.andln(3);if(h(t%2==1),3===t){var e=this.m.add(new a(1)).iushrn(2);return this.pow(n,e)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);h(!i.isZero());var f=new a(1).toRed(this),c=f.redNeg(),d=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new a(2*o*o).toRed(this);0!==this.pow(o,d).cmp(c);)o.redIAdd(c);for(var r=this.pow(o,i),u=this.pow(n,i.addn(1).iushrn(1)),z=this.pow(n,i),Z=s;0!==z.cmp(f);){for(var G=z,Q=0;0!==G.cmp(f);Q++)G=G.redSqr();h(Q=0;s--){for(var r=t.words[s],u=o-1;u>=0;u--){var z=r>>u&1;f!==i[0]&&(f=this.sqr(f)),0!==z||0!==c?(c<<=1,c|=z,(4==++d||0===s&&0===u)&&(f=this.mul(f,i[c]),d=0,c=0)):d=0}o=26}return f},st.prototype.convertTo=function(n){var t=n.umod(this.m);return t===n?t.clone():t},st.prototype.convertFrom=function(n){var t=n.clone();return t.red=null,t},a.mont=function(n){return new tt(n)},p(tt,st),tt.prototype.convertTo=function(n){return this.imod(n.ushln(this.shift))},tt.prototype.convertFrom=function(n){var t=this.imod(n.mul(this.rinv));return t.red=null,t},tt.prototype.imul=function(n,t){if(n.isZero()||t.isZero())return n.words[0]=0,n.length=1,n;var e=n.imul(t),i=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=e.isub(i).iushrn(this.shift),f=s;return s.cmp(this.m)>=0?f=s.isub(this.m):s.cmpn(0)<0&&(f=s.iadd(this.m)),f._forceRed(this)},tt.prototype.mul=function(n,t){if(n.isZero()||t.isZero())return new a(0)._forceRed(this);var e=n.mul(t),i=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=e.isub(i).iushrn(this.shift),f=s;return s.cmp(this.m)>=0?f=s.isub(this.m):s.cmpn(0)<0&&(f=s.iadd(this.m)),f._forceRed(this)},tt.prototype.invm=function(n){return this.imod(n._invmp(this.m).mul(this.r2))._forceRed(this)}}(V=M.nmd(V),this)},6179:(V,l)=>{"use strict";function M(F){let W;return typeof window<"u"&&typeof window[F]<"u"&&(W=window[F]),W}function x(F){const W=M(F);if(!W)throw new Error(`${F} is not defined in Window`);return W}Object.defineProperty(l,"__esModule",{value:!0}),l.getLocalStorage=l.getLocalStorageOrThrow=l.getCrypto=l.getCryptoOrThrow=l.getLocation=l.getLocationOrThrow=l.getNavigator=l.getNavigatorOrThrow=l.getDocument=l.getDocumentOrThrow=l.getFromWindowOrThrow=l.getFromWindow=void 0,l.getFromWindow=M,l.getFromWindowOrThrow=x,l.getDocumentOrThrow=function y(){return x("document")},l.getDocument=function h(){return M("document")},l.getNavigatorOrThrow=function p(){return x("navigator")},l.getNavigator=function a(){return M("navigator")},l.getLocationOrThrow=function _(){return x("location")},l.getLocation=function g(){return M("location")},l.getCryptoOrThrow=function m(){return x("crypto")},l.getCrypto=function E(){return M("crypto")},l.getLocalStorageOrThrow=function T(){return x("localStorage")},l.getLocalStorage=function I(){return M("localStorage")}},98064:(V,l,M)=>{"use strict";l.D=void 0;const y=M(6179);l.D=function h(){let p,a;try{p=y.getDocumentOrThrow(),a=y.getLocationOrThrow()}catch{return null}function g(...L){const N=p.getElementsByTagName("meta");for(let k=0;kw.getAttribute(B)).filter(B=>!!B&&L.includes(B));if(A.length&&A){const B=w.getAttribute("content");if(B)return B}}return""}const T=function m(){let L=g("name","og:site_name","og:title","twitter:title");return L||(L=p.title),L}();return{description:function E(){return g("description","og:description","twitter:description","keywords")}(),url:a.origin,icons:function _(){const L=p.getElementsByTagName("link"),N=[];for(let k=0;k-1){const B=w.getAttribute("href");if(B)if(-1===B.toLowerCase().indexOf("https:")&&-1===B.toLowerCase().indexOf("http:")&&0!==B.indexOf("//")){let D=a.protocol+"//"+a.host;if(0===B.indexOf("/"))D+=B;else{const J=a.pathname.split("/");J.pop(),D+=J.join("/")+"/"+B}N.push(D)}else 0===B.indexOf("//")?N.push(a.protocol+B):N.push(B)}}return N}(),name:T}}},77131:(V,l,M)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0});var x=M(77775),y=M(77757),h=function(){function p(){this._semaphore=new y.default(1)}return p.prototype.acquire=function(){return x.__awaiter(this,void 0,void 0,function(){return x.__generator(this,function(g){switch(g.label){case 0:return[4,this._semaphore.acquire()];case 1:return[2,g.sent()[1]]}})})},p.prototype.runExclusive=function(a){return this._semaphore.runExclusive(function(){return a()})},p.prototype.isLocked=function(){return this._semaphore.isLocked()},p.prototype.release=function(){this._semaphore.release()},p}();l.default=h},77757:(V,l,M)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0});var x=M(77775),y=function(){function h(p){if(this._maxConcurrency=p,this._queue=[],p<=0)throw new Error("semaphore must be initialized to a positive value");this._value=p}return h.prototype.acquire=function(){var p=this,a=this.isLocked(),_=new Promise(function(g){return p._queue.push(g)});return a||this._dispatch(),_},h.prototype.runExclusive=function(p){return x.__awaiter(this,void 0,void 0,function(){var a,_,g;return x.__generator(this,function(m){switch(m.label){case 0:return[4,this.acquire()];case 1:a=m.sent(),_=a[0],g=a[1],m.label=2;case 2:return m.trys.push([2,,4,5]),[4,p(_)];case 3:return[2,m.sent()];case 4:return g(),[7];case 5:return[2]}})})},h.prototype.isLocked=function(){return this._value<=0},h.prototype.release=function(){if(this._maxConcurrency>1)throw new Error("this method is unavailabel on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){var p=this._currentReleaser;this._currentReleaser=void 0,p()}},h.prototype._dispatch=function(){var p=this,a=this._queue.shift();if(a){var _=!1;this._currentReleaser=function(){_||(_=!0,p._value++,p._dispatch())},a([this._value--,this._currentReleaser])}},h}();l.default=y},22174:(V,l,M)=>{"use strict";l.WU=void 0;var y=M(77131);Object.defineProperty(l,"WU",{enumerable:!0,get:function(){return y.default}});M(77757),M(38078)},38078:(V,l,M)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.withTimeout=void 0;var x=M(77775);l.withTimeout=function y(h,p,a){var _=this;return void 0===a&&(a=new Error("timeout")),{acquire:function(){return new Promise(function(g,m){return x.__awaiter(_,void 0,void 0,function(){var E,T;return x.__generator(this,function(F){switch(F.label){case 0:return E=!1,setTimeout(function(){E=!0,m(a)},p),[4,h.acquire()];case 1:return T=F.sent(),E?(Array.isArray(T)?T[1]:T)():g(T),[2]}})})})},runExclusive:function(g){return x.__awaiter(this,void 0,void 0,function(){var m,E;return x.__generator(this,function(T){switch(T.label){case 0:m=function(){},T.label=1;case 1:return T.trys.push([1,,7,8]),[4,this.acquire()];case 2:return E=T.sent(),Array.isArray(E)?(m=E[1],[4,g(E[0])]):[3,4];case 3:return[2,T.sent()];case 4:return m=E,[4,g()];case 5:return[2,T.sent()];case 6:return[3,8];case 7:return m(),[7];case 8:return[2]}})})},release:function(){h.release()},isLocked:function(){return h.isLocked()}}}},54942:(V,l,M)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.default=function m(I){return(0,p.default)(function(F,W){var v;try{v=I.apply(this,F)}catch(L){return W(L)}(0,y.default)(v)&&"function"==typeof v.then?v.then(function(L){E(W,null,L)},function(L){E(W,L.message?L:new Error(L))}):W(null,v)})};var y=g(M(18909)),p=g(M(22788)),_=g(M(29531));function g(I){return I&&I.__esModule?I:{default:I}}function E(I,F,W){try{I(F,W)}catch(v){(0,_.default)(T,v)}}function T(I){throw I}V.exports=l.default},943:(V,l,M)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.default=function m(E,T,I,F){(0,y.default)(T)(E,(0,p.default)((0,_.default)(I)),F)};var y=g(M(21873)),p=g(M(52681)),_=g(M(132));function g(E){return E&&E.__esModule?E:{default:E}}V.exports=l.default},70129:(V,l,M)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.default=function(B,D,J){((0,y.default)(B)?w:A)(B,(0,N.default)(D),J)};var y=k(M(38932)),p=k(M(77787)),_=k(M(1559)),m=k(M(86818)),T=k(M(81925)),F=k(M(24897)),v=k(M(94919)),N=k(M(132));function k(B){return B&&B.__esModule?B:{default:B}}function w(B,D,J){J=(0,F.default)(J||T.default);var at=0,st=0,tt=B.length;function U(n,t){n?J(n):(++st===tt||t===p.default)&&J(null)}for(0===tt&&J(null);at{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.default=function _(g,m,E,T){(0,y.default)(m)(g,(0,p.default)(E),T)};var y=a(M(21873)),p=a(M(132));function a(g){return g&&g.__esModule?g:{default:g}}V.exports=l.default},78980:(V,l,M)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0});var y=a(M(943)),p=a(M(86818));function a(_){return _&&_.__esModule?_:{default:_}}l.default=(0,p.default)(y.default,1),V.exports=l.default},77787:(V,l)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.default={},V.exports=l.default},86818:(V,l)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.default=function M(x,y){return function(h,p,a){return x(h,y,p,a)}},V.exports=l.default},71859:(V,l,M)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.default=function _(g){return function(m,E,T){return g(y.default,m,(0,p.default)(E),T)}};var y=a(M(70129)),p=a(M(132));function a(g){return g&&g.__esModule?g:{default:g}}V.exports=l.default},21873:(V,l,M)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.default=function F(W){return function(v,L,N){if(N=(0,p.default)(N||y.default),W<=0||!v)return N(null);var k=(0,_.default)(v),w=!1,A=0,B=!1;function D(at,st){if(A-=1,at)w=!0,N(at);else{if(st===T.default||w&&A<=0)return w=!0,N(null);B||J()}}function J(){for(B=!0;A{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.default=function(x){return M&&x[M]&&x[M]()};var M="function"==typeof Symbol&&Symbol.iterator;V.exports=l.default},22788:(V,l,M)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.default=function(p){return function(){var a=(0,y.default)(arguments),_=a.pop();p.call(this,a,_)}};var y=function h(p){return p&&p.__esModule?p:{default:p}}(M(27866));V.exports=l.default},16814:(V,l,M)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.default=function I(F){if((0,y.default)(F))return function m(F){var W=-1,v=F.length;return function(){return++W{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.default=function _(g,m,E,T){T=T||y.default,m=m||[];var I=[],F=0,W=(0,p.default)(E);g(m,function(v,L,N){var k=F++;W(v,function(w,A){I[k]=A,N(w)})},function(v){T(v,I)})};var y=a(M(81925)),p=a(M(132));function a(g){return g&&g.__esModule?g:{default:g}}V.exports=l.default},24897:(V,l)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.default=function M(x){return function(){if(null!==x){var y=x;x=null,y.apply(this,arguments)}}},V.exports=l.default},94919:(V,l)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.default=function M(x){return function(){if(null===x)throw new Error("Callback was already called.");var y=x;x=null,y.apply(this,arguments)}},V.exports=l.default},30703:(V,l,M)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.default=function T(I,F,W){W=W||y.default;var v=(0,p.default)(F)?[]:{};I(F,function(L,N,k){(0,m.default)(L)(function(w,A){arguments.length>2&&(A=(0,_.default)(arguments,1)),v[N]=A,k(w)})},function(L){W(L,v)})};var y=E(M(81925)),p=E(M(38932)),_=E(M(27866)),m=E(M(132));function E(I){return I&&I.__esModule?I:{default:I}}V.exports=l.default},29531:(V,l,M)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.hasNextTick=l.hasSetImmediate=void 0,l.fallback=_,l.wrap=g;var m,y=function h(E){return E&&E.__esModule?E:{default:E}}(M(27866)),p=l.hasSetImmediate="function"==typeof setImmediate&&setImmediate,a=l.hasNextTick="object"==typeof process&&"function"==typeof process.nextTick;function _(E){setTimeout(E,0)}function g(E){return function(T){var I=(0,y.default)(arguments,1);E(function(){T.apply(null,I)})}}m=p?setImmediate:a?process.nextTick:_,l.default=g(m)},27866:(V,l)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.default=function M(x,y){y|=0;for(var h=Math.max(x.length-y,0),p=Array(h),a=0;a{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.default=function M(x){return function(y,h,p){return x(y,p)}},V.exports=l.default},132:(V,l,M)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.isAsync=void 0;var y=function h(g){return g&&g.__esModule?g:{default:g}}(M(54942)),p="function"==typeof Symbol;function a(g){return p&&"AsyncFunction"===g[Symbol.toStringTag]}l.default=function _(g){return a(g)?(0,y.default)(g):g},l.isAsync=a},48819:(V,l,M)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0});var y=a(M(71859)),p=a(M(21854));function a(_){return _&&_.__esModule?_:{default:_}}l.default=(0,y.default)(p.default),V.exports=l.default},5911:(V,l,M)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.default=function _(g,m){(0,p.default)(y.default,g,m)};var y=a(M(70129)),p=a(M(30703));function a(g){return g&&g.__esModule?g:{default:g}}V.exports=l.default},55198:(V,l,M)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.default=function(v,L){if(L=(0,_.default)(L||p.default),!(0,y.default)(v))return L(new Error("First argument to waterfall must be an array of functions"));if(!v.length)return L();var N=0;function k(A){var B=(0,F.default)(v[N++]);A.push((0,T.default)(w)),B.apply(null,A)}function w(A){if(A||N===v.length)return L.apply(null,arguments);k((0,m.default)(arguments,1))}k([])};var y=W(M(60108)),p=W(M(81925)),_=W(M(24897)),m=W(M(27866)),T=W(M(94919)),F=W(M(132));function W(v){return v&&v.__esModule?v:{default:v}}V.exports=l.default},83040:(V,l,M)=>{"use strict";var x=M(37753),y={"text/plain":"Text","text/html":"Url",default:"Text"};V.exports=function a(_,g){var m,E,T,I,F,W,v=!1;g||(g={}),m=g.debug||!1;try{if(T=x(),I=document.createRange(),F=document.getSelection(),(W=document.createElement("span")).textContent=_,W.style.all="unset",W.style.position="fixed",W.style.top=0,W.style.clip="rect(0, 0, 0, 0)",W.style.whiteSpace="pre",W.style.webkitUserSelect="text",W.style.MozUserSelect="text",W.style.msUserSelect="text",W.style.userSelect="text",W.addEventListener("copy",function(N){N.stopPropagation(),g.format&&(N.preventDefault(),typeof N.clipboardData>"u"?(m&&console.warn("unable to use e.clipboardData"),m&&console.warn("trying IE specific stuff"),window.clipboardData.clearData(),window.clipboardData.setData(y[g.format]||y.default,_)):(N.clipboardData.clearData(),N.clipboardData.setData(g.format,_))),g.onCopy&&(N.preventDefault(),g.onCopy(N.clipboardData))}),document.body.appendChild(W),I.selectNodeContents(W),F.addRange(I),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");v=!0}catch(N){m&&console.error("unable to copy using execCommand: ",N),m&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(g.format||"text",_),g.onCopy&&g.onCopy(window.clipboardData),v=!0}catch(k){m&&console.error("unable to copy using clipboardData: ",k),m&&console.error("falling back to prompt"),E=function p(_){var g=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return _.replace(/#{\s*key\s*}/g,g)}("message"in g?g.message:"Copy to clipboard: #{key}, Enter"),window.prompt(E,_)}}finally{F&&("function"==typeof F.removeRange?F.removeRange(I):F.removeAllRanges()),W&&document.body.removeChild(W),T()}return v}},80318:V=>{"use strict";var l="%[a-f0-9]{2}",M=new RegExp(l,"gi"),x=new RegExp("("+l+")+","gi");function y(a,_){try{return decodeURIComponent(a.join(""))}catch{}if(1===a.length)return a;var g=a.slice(0,_=_||1),m=a.slice(_);return Array.prototype.concat.call([],y(g),y(m))}function h(a){try{return decodeURIComponent(a)}catch{for(var _=a.match(M),g=1;g<_.length;g++)_=(a=y(_,g).join("")).match(M);return a}}V.exports=function(a){if("string"!=typeof a)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof a+"`");try{return a=a.replace(/\+/g," "),decodeURIComponent(a)}catch{return function p(a){for(var _={"%FE%FF":"\ufffd\ufffd","%FF%FE":"\ufffd\ufffd"},g=x.exec(a);g;){try{_[g[0]]=decodeURIComponent(g[0])}catch{var m=h(g[0]);m!==g[0]&&(_[g[0]]=m)}g=x.exec(a)}_["%C2"]="\ufffd";for(var E=Object.keys(_),T=0;T{"use strict";var l={single_source_shortest_paths:function(M,x,y){var h={},p={};p[x]=0;var _,g,m,E,T,F,a=l.PriorityQueue.make();for(a.push(x,0);!a.empty();)for(m in E=(_=a.pop()).cost,T=M[g=_.value]||{})T.hasOwnProperty(m)&&(F=E+T[m],(typeof p[m]>"u"||p[m]>F)&&(p[m]=F,a.push(m,F),h[m]=g));if(typeof y<"u"&&typeof p[y]>"u"){var L=["Could not find a path from ",x," to ",y,"."].join("");throw new Error(L)}return h},extract_shortest_path_from_predecessor_list:function(M,x){for(var y=[],h=x;h;)y.push(h),h=M[h];return y.reverse(),y},find_path:function(M,x,y){var h=l.single_source_shortest_paths(M,x,y);return l.extract_shortest_path_from_predecessor_list(h,y)},PriorityQueue:{make:function(M){var h,x=l.PriorityQueue,y={};for(h in M=M||{},x)x.hasOwnProperty(h)&&(y[h]=x[h]);return y.queue=[],y.sorter=M.sorter||x.default_sorter,y},default_sorter:function(M,x){return M.cost-x.cost},push:function(M,x){this.queue.push({value:M,cost:x}),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};V.exports=l},92945:(V,l,M)=>{var x=M(31325).default;M(76863),M(95920);const p=M(12625),_=(T,I)=>T+I,g=["sync","latest"];function E(T){return Number.parseInt(T,16)}V.exports=class m extends p{constructor(I={}){super(),this._blockResetDuration=I.blockResetDuration||2e4,this._currentBlock=null,this._isRunning=!1,this._onNewListener=this._onNewListener.bind(this),this._onRemoveListener=this._onRemoveListener.bind(this),this._resetCurrentBlock=this._resetCurrentBlock.bind(this),this._setupInternalEvents()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}getLatestBlock(){var I=this;return x(function*(){return I._currentBlock?I._currentBlock:yield new Promise(W=>I.once("latest",W))})()}removeAllListeners(I){I?super.removeAllListeners(I):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener()}_start(){}_end(){}_setupInternalEvents(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}_onNewListener(I,F){!g.includes(I)||this._maybeStart()}_onRemoveListener(I,F){this._getBlockTrackerEventCount()>0||this._maybeEnd()}_maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),this._start())}_maybeEnd(){!this._isRunning||(this._isRunning=!1,this._setupBlockResetTimeout(),this._end())}_getBlockTrackerEventCount(){return g.map(I=>this.listenerCount(I)).reduce(_)}_newPotentialLatest(I){const F=this._currentBlock;F&&E(I)<=E(F)||this._setCurrentBlock(I)}_setCurrentBlock(I){const F=this._currentBlock;this._currentBlock=I,this.emit("latest",I),this.emit("sync",{oldBlock:F,newBlock:I})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}}},53223:(V,l,M)=>{var x=M(31325).default;const y=M(95920),h=M(92945);function _(g,m){return new Promise(E=>{const T=setTimeout(E,g);T.unref&&m&&T.unref()})}V.exports=class a extends h{constructor(m={}){if(!m.provider)throw new Error("PollingBlockTracker - no provider specified.");const E=m.pollingInterval||2e4,T=m.retryTimeout||E/10,I=void 0===m.keepEventLoopActive||m.keepEventLoopActive,F=m.setSkipCacheFlag||!1;super(Object.assign({blockResetDuration:E},m)),this._provider=m.provider,this._pollingInterval=E,this._retryTimeout=T,this._keepEventLoopActive=I,this._setSkipCacheFlag=F}checkForLatestBlock(){var m=this;return x(function*(){return yield m._updateLatestBlock(),yield m.getLatestBlock()})()}_start(){this._performSync().catch(m=>this.emit("error",m))}_performSync(){var m=this;return x(function*(){for(;m._isRunning;)try{yield m._updateLatestBlock(),yield _(m._pollingInterval,!m._keepEventLoopActive)}catch(E){const T=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block:\n${E.stack}`);try{m.emit("error",T)}catch{console.error(T)}yield _(m._retryTimeout,!m._keepEventLoopActive)}})()}_updateLatestBlock(){var m=this;return x(function*(){const E=yield m._fetchLatestBlock();m._newPotentialLatest(E)})()}_fetchLatestBlock(){var m=this;return x(function*(){const E={jsonrpc:"2.0",id:1,method:"eth_blockNumber",params:[]};m._setSkipCacheFlag&&(E.skipCache=!0);const T=yield y(I=>m._provider.sendAsync(E,I))();if(T.error)throw new Error(`PollingBlockTracker - encountered error fetching block:\n${T.error}`);return T.result})()}}},45116:(V,l,M)=>{var x=M(31325).default;const y=M(61357);V.exports=class h extends y{constructor(){super(),this.allResults=[]}update(){return x(function*(){throw new Error("BaseFilterWithHistory - no update method specified")})()}addResults(a){this.allResults=this.allResults.concat(a),super.addResults(a)}addInitialResults(a){this.allResults=this.allResults.concat(a),super.addInitialResults(a)}getAllResults(){return this.allResults}}},61357:(V,l,M)=>{var x=M(31325).default;const y=M(70912).default;V.exports=class h extends y{constructor(){super(),this.updates=[]}initialize(){return x(function*(){})()}update(){return x(function*(){throw new Error("BaseFilter - no update method specified")})()}addResults(a){this.updates=this.updates.concat(a),a.forEach(_=>this.emit("update",_))}addInitialResults(a){}getChangesAndClear(){const a=this.updates;return this.updates=[],a}}},11052:(V,l,M)=>{var x=M(31325).default;const y=M(61357),h=M(54369),{incrementHexInt:p}=M(21776);V.exports=class a extends y{constructor({provider:g}){super(),this.type="block",this.provider=g}update({oldBlock:g,newBlock:m}){var E=this;return x(function*(){const T=m,I=p(g),W=(yield h({provider:E.provider,fromBlock:I,toBlock:T})).map(v=>v.hash);E.addResults(W)})()}}},54369:(V,l,M)=>{var x=M(31325).default;function h(){return(h=x(function*({provider:m,fromBlock:E,toBlock:T}){E||(E=T);const I=p(E),W=p(T)-I+1,v=Array(W).fill().map((N,k)=>I+k).map(_);return yield Promise.all(v.map(N=>g(m,"eth_getBlockByNumber",[N,!1])))})).apply(this,arguments)}function p(m){return null==m?m:Number.parseInt(m,16)}function _(m){return null==m?m:"0x"+m.toString(16)}function g(m,E,T){return new Promise((I,F)=>{m.sendAsync({id:1,jsonrpc:"2.0",method:E,params:T},(W,v)=>{if(W)return F(W);I(v.result)})})}V.exports=function y(m){return h.apply(this,arguments)}},21776:V=>{function x(E){return E.sort((T,I)=>"latest"===T||"earliest"===I?1:"latest"===I||"earliest"===T?-1:p(T)-p(I))}function p(E){return null==E?E:Number.parseInt(E,16)}function _(E){if(null==E)return E;let T=E.toString(16);return T.length%2&&(T="0"+T),"0x"+T}function m(){return Math.floor(16*Math.random()).toString(16)}V.exports={minBlockRef:function l(...E){return x(E)[0]},maxBlockRef:function M(...E){const T=x(E);return T[T.length-1]},sortBlockRefs:x,bnToHex:function y(E){return"0x"+E.toString(16)},blockRefIsNumber:function h(E){return E&&!["earliest","latest","pending"].includes(E)},hexToInt:p,incrementHexInt:function a(E){return null==E?E:_(p(E)+1)},intToHex:_,unsafeRandomBytes:function g(E){let T="0x";for(let I=0;I{var x=M(31325).default;const y=M(22174).WU,{createAsyncMiddleware:h}=M(79238),p=M(17467),a=M(3872),_=M(11052),g=M(82527),{intToHex:m,hexToInt:E}=M(21776);function I(L){return F(x(function*(...N){const k=yield L(...N);return m(k.id)}))}function F(L){return h(function(){var N=x(function*(k,w){const A=yield L.apply(null,k.params);w.result=A});return function(k,w){return N.apply(this,arguments)}}())}function v(L,N){const k=[];for(let w in L)k.push(L[w]);return k}V.exports=function T({blockTracker:L,provider:N}){let k=0,w={};const A=new y,B=function W({mutex:L}){return N=>function(){var k=x(function*(w,A,B,D){(yield L.acquire())(),N(w,A,B,D)});return function(w,A,B,D){return k.apply(this,arguments)}}()}({mutex:A}),D=p({eth_newFilter:B(I(at)),eth_newBlockFilter:B(I(tt)),eth_newPendingTransactionFilter:B(I(n)),eth_uninstallFilter:B(F(c)),eth_getFilterChanges:B(F(e)),eth_getFilterLogs:B(F(s))}),J=function(){var et=x(function*({oldBlock:ht,newBlock:Ot}){if(0===w.length)return;const ut=yield A.acquire();try{yield Promise.all(v(w).map(function(){var yt=x(function*(Qt){try{yield Qt.update({oldBlock:ht,newBlock:Ot})}catch(vt){console.error(vt)}});return function(Qt){return yt.apply(this,arguments)}}()))}catch(yt){console.error(yt)}ut()});return function(Ot){return et.apply(this,arguments)}}();return D.newLogFilter=at,D.newBlockFilter=tt,D.newPendingTransactionFilter=n,D.uninstallFilter=c,D.getFilterChanges=e,D.getFilterLogs=s,D.destroy=()=>{!function Z(){G.apply(this,arguments)}()},D;function at(et){return st.apply(this,arguments)}function st(){return(st=x(function*(et){const ht=new a({provider:N,params:et});return yield o(ht),ht})).apply(this,arguments)}function tt(){return U.apply(this,arguments)}function U(){return(U=x(function*(){const et=new _({provider:N});return yield o(et),et})).apply(this,arguments)}function n(){return t.apply(this,arguments)}function t(){return(t=x(function*(){const et=new g({provider:N});return yield o(et),et})).apply(this,arguments)}function e(et){return i.apply(this,arguments)}function i(){return(i=x(function*(et){const ht=E(et),Ot=w[ht];if(!Ot)throw new Error(`No filter for index "${ht}"`);return Ot.getChangesAndClear()})).apply(this,arguments)}function s(et){return f.apply(this,arguments)}function f(){return(f=x(function*(et){const ht=E(et),Ot=w[ht];if(!Ot)throw new Error(`No filter for index "${ht}"`);return results="log"===Ot.type?Ot.getAllResults():[],results})).apply(this,arguments)}function c(et){return d.apply(this,arguments)}function d(){return(d=x(function*(et){const ht=E(et),ut=Boolean(w[ht]);return ut&&(yield u(ht)),ut})).apply(this,arguments)}function o(et){return r.apply(this,arguments)}function r(){return(r=x(function*(et){const ht=v(w).length,Ot=yield L.getLatestBlock();return yield et.initialize({currentBlock:Ot}),k++,w[k]=et,et.id=k,et.idHex=m(k),Q({prevFilterCount:ht,newFilterCount:v(w).length}),k})).apply(this,arguments)}function u(et){return z.apply(this,arguments)}function z(){return(z=x(function*(et){const ht=v(w).length;delete w[et],Q({prevFilterCount:ht,newFilterCount:v(w).length})})).apply(this,arguments)}function G(){return(G=x(function*(){const et=v(w).length;w={},Q({prevFilterCount:et,newFilterCount:0})})).apply(this,arguments)}function Q({prevFilterCount:et,newFilterCount:ht}){0===et&&ht>0?L.on("sync",J):et>0&&0===ht&&L.removeListener("sync",J)}}},3872:(V,l,M)=>{var x=M(31325).default;const y=M(76863),h=M(82802),p=M(45116),{hexToInt:_,incrementHexInt:g,minBlockRef:m,blockRefIsNumber:E}=M(21776);V.exports=class T extends p{constructor({provider:F,params:W}){super(),this.type="log",this.ethQuery=new y(F),this.params=Object.assign({fromBlock:"latest",toBlock:"latest",address:void 0,topics:[]},W),this.params.address&&(Array.isArray(this.params.address)||(this.params.address=[this.params.address]),this.params.address=this.params.address.map(v=>v.toLowerCase()))}initialize({currentBlock:F}){var W=this;return x(function*(){let v=W.params.fromBlock;["latest","pending"].includes(v)&&(v=F),"earliest"===v&&(v="0x0"),W.params.fromBlock=v;const L=m(W.params.toBlock,F),N=Object.assign({},W.params,{toBlock:L}),k=yield W._fetchLogs(N);W.addInitialResults(k)})()}update({oldBlock:F,newBlock:W}){var v=this;return x(function*(){const L=W;let N;N=F?g(F):W;const k=Object.assign({},v.params,{fromBlock:N,toBlock:L}),A=(yield v._fetchLogs(k)).filter(B=>v.matchLog(B));v.addResults(A)})()}_fetchLogs(F){var W=this;return x(function*(){return yield h(L=>W.ethQuery.getLogs(F,L))()})()}matchLog(F){if(_(this.params.fromBlock)>=_(F.blockNumber)||E(this.params.toBlock)&&_(this.params.toBlock)<=_(F.blockNumber))return!1;const W=F.address&&F.address.toLowerCase();return!(this.params.address&&W&&!this.params.address.includes(W))&&this.params.topics.every((L,N)=>{let k=F.topics[N];if(!k)return!1;k=k.toLowerCase();let w=Array.isArray(L)?L:[L];return!!w.includes(null)||(w=w.map(D=>D.toLowerCase()),w.includes(k))})}}},82802:V=>{"use strict";const l=(x,y,h,p)=>function(...a){return new(0,y.promiseModule)((g,m)=>{a.push(y.multiArgs?(...T)=>{y.errorFirst?T[0]?m(T):(T.shift(),g(T)):g(T)}:y.errorFirst?(T,I)=>{T?m(T):g(I)}:g),Reflect.apply(x,this===h?p:this,a)})},M=new WeakMap;V.exports=(x,y)=>{y={exclude:[/.+(?:Sync|Stream)$/],errorFirst:!0,promiseModule:Promise,...y};const h=typeof x;if(null===x||"object"!==h&&"function"!==h)throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${null===x?"null":h}\``);const a=new WeakMap,_=new Proxy(x,{apply(g,m,E){const T=a.get(g);if(T)return Reflect.apply(T,m,E);const I=y.excludeMain?g:l(g,y,_,g);return a.set(g,I),Reflect.apply(I,m,E)},get(g,m){const E=g[m];if(!((g,m)=>{let E=M.get(g);if(E||(E={},M.set(g,E)),m in E)return E[m];const T=L=>"string"==typeof L||"symbol"==typeof m?m===L:L.test(m),I=Reflect.getOwnPropertyDescriptor(g,m),F=void 0===I||I.writable||I.configurable,v=(y.include?y.include.some(T):!y.exclude.some(T))&&F;return E[m]=v,v})(g,m)||E===Function.prototype[m])return E;const T=a.get(E);if(T)return T;if("function"==typeof E){const I=l(E,y,_,g);return a.set(E,I),I}return E}});return _}},67857:(V,l,M)=>{var x=M(31325).default;const y=M(70912).default,h=M(17467),{createAsyncMiddleware:p}=M(79238),a=M(70114),{unsafeRandomBytes:_,incrementHexInt:g}=M(21776),m=M(54369);function T(I){return{hash:I.hash,parentHash:I.parentHash,sha3Uncles:I.sha3Uncles,miner:I.miner,stateRoot:I.stateRoot,transactionsRoot:I.transactionsRoot,receiptsRoot:I.receiptsRoot,logsBloom:I.logsBloom,difficulty:I.difficulty,number:I.number,gasLimit:I.gasLimit,gasUsed:I.gasUsed,nonce:I.nonce,mixHash:I.mixHash,timestamp:I.timestamp,extraData:I.extraData}}V.exports=function E({blockTracker:I,provider:F}){const W={},v=a({blockTracker:I,provider:F});let L=!1;const N=new y,k=h({eth_subscribe:p(function w(st,tt){return A.apply(this,arguments)}),eth_unsubscribe:p(function B(st,tt){return D.apply(this,arguments)})});return k.destroy=function at(){N.removeAllListeners();for(const st in W)W[st].destroy(),delete W[st];L=!0},{events:N,middleware:k};function A(){return A=x(function*(st,tt){if(L)throw new Error("SubscriptionManager - attempting to use after destroying");const U=st.params[0],n=_(16);let t;switch(U){case"newHeads":t=function e({subId:s}){const f={type:U,destroy:(c=x(function*(){I.removeListener("sync",f.update)}),function(){return c.apply(this,arguments)}),update:function(){var c=x(function*({oldBlock:d,newBlock:o}){const r=o,u=g(d);(yield m({provider:F,fromBlock:u,toBlock:r})).map(T).forEach(G=>{J(s,G)})});return function(o){return c.apply(this,arguments)}}()};var c;return I.on("sync",f.update),f}({subId:n});break;case"logs":const s=st.params[1];t=function i({subId:s,filter:f}){return f.on("update",d=>J(s,d)),{type:U,destroy:(d=x(function*(){return yield v.uninstallFilter(f.idHex)}),function(){return d.apply(this,arguments)})};var d}({subId:n,filter:yield v.newLogFilter(s)});break;default:throw new Error(`SubscriptionManager - unsupported subscription type "${U}"`)}return W[n]=t,void(tt.result=n)}),A.apply(this,arguments)}function D(){return(D=x(function*(st,tt){if(L)throw new Error("SubscriptionManager - attempting to use after destroying");const U=st.params[0],n=W[U];n?(delete W[U],yield n.destroy(),tt.result=!0):tt.result=!1})).apply(this,arguments)}function J(st,tt){N.emit("notification",{jsonrpc:"2.0",method:"eth_subscription",params:{subscription:st,result:tt}})}}},82527:(V,l,M)=>{var x=M(31325).default;const y=M(61357),h=M(54369),{incrementHexInt:p}=M(21776);V.exports=class a extends y{constructor({provider:g}){super(),this.type="tx",this.provider=g}update({oldBlock:g}){var m=this;return x(function*(){const E=g,T=p(g),I=yield h({provider:m.provider,fromBlock:T,toBlock:E}),F=[];for(const W of I)F.push(...W.transactions);m.addResults(F)})()}}},24789:(V,l,M)=>{var x=M(31325).default;const y=M(92550),h=M(96946),p=[void 0,null,""];V.exports=function a(g={}){const{blockTracker:m}=g;if(!m)throw new Error("createBlockCacheMiddleware - No BlockTracker specified");const E=new _,T={perma:E,block:E,fork:E};return h(function(){var I=x(function*(F,W,v){if(F.skipCache)return v();const L=y.cacheTypeForPayload(F),N=T[L];if(!N||!N.canCacheRequest(F))return v();let w,k=y.blockTagForPayload(F);if(k||(k="latest"),"earliest"===k)w="0x00";else if("latest"===k){const B=yield m.getLatestBlock();E.clearBefore(B),w=B}else w=k;const A=yield N.get(F,w);void 0===A?(yield v(),yield N.set(F,w,W.result)):W.result=A});return function(F,W,v){return I.apply(this,arguments)}}())};class _{constructor(){this.cache={}}getBlockCacheForPayload(m,E){const T=Number.parseInt(E,16);let I=this.cache[T];if(!I){const F={};this.cache[T]=F,I=F}return I}get(m,E){var T=this;return x(function*(){const I=T.getBlockCacheForPayload(m,E);if(I)return I[y.cacheIdentifierForPayload(m,!0)]})()}set(m,E,T){var I=this;return x(function*(){I.canCacheResult(m,T)&&(I.getBlockCacheForPayload(m,E)[y.cacheIdentifierForPayload(m,!0)]=T)})()}canCacheRequest(m){return!(!y.canCache(m)||"pending"===y.blockTagForPayload(m))}canCacheResult(m,E){if(!p.includes(E))return!(["eth_getTransactionByHash","eth_getTransactionReceipt"].includes(m.method)&&(!E||!E.blockHash||"0x0000000000000000000000000000000000000000000000000000000000000000"===E.blockHash))}clearBefore(m){const E=this,T=Number.parseInt(m,16);Object.keys(E.cache).map(Number).filter(I=>Idelete E.cache[I])}}},92550:(V,l,M)=>{const x=M(18535);function h(m){return"never"!==g(m)}function a(m){const E=_(m);return E>=m.params.length?m.params:"eth_getBlockByNumber"===m.method?m.params.slice(1):m.params.slice(0,E)}function _(m){switch(m.method){case"eth_getStorageAt":return 2;case"eth_getBalance":case"eth_getCode":case"eth_getTransactionCount":case"eth_call":return 1;case"eth_getBlockByNumber":return 0;default:return}}function g(m){switch(m.method){case"web3_clientVersion":case"web3_sha3":case"eth_protocolVersion":case"eth_getBlockTransactionCountByHash":case"eth_getUncleCountByBlockHash":case"eth_getCode":case"eth_getBlockByHash":case"eth_getTransactionByHash":case"eth_getTransactionByBlockHashAndIndex":case"eth_getTransactionReceipt":case"eth_getUncleByBlockHashAndIndex":case"eth_getCompilers":case"eth_compileLLL":case"eth_compileSolidity":case"eth_compileSerpent":case"shh_version":case"test_permaCache":return"perma";case"eth_getBlockByNumber":case"eth_getBlockTransactionCountByNumber":case"eth_getUncleCountByBlockNumber":case"eth_getTransactionByBlockNumberAndIndex":case"eth_getUncleByBlockNumberAndIndex":case"test_forkCache":return"fork";case"eth_gasPrice":case"eth_blockNumber":case"eth_getBalance":case"eth_getStorageAt":case"eth_getTransactionCount":case"eth_call":case"eth_estimateGas":case"eth_getFilterLogs":case"eth_getLogs":case"test_blockCache":return"block";case"net_version":case"net_peerCount":case"net_listening":case"eth_syncing":case"eth_sign":case"eth_coinbase":case"eth_mining":case"eth_hashrate":case"eth_accounts":case"eth_sendTransaction":case"eth_sendRawTransaction":case"eth_newFilter":case"eth_newBlockFilter":case"eth_newPendingTransactionFilter":case"eth_uninstallFilter":case"eth_getFilterChanges":case"eth_getWork":case"eth_submitWork":case"eth_submitHashrate":case"db_putString":case"db_getString":case"db_putHex":case"db_getHex":case"shh_post":case"shh_newIdentity":case"shh_hasIdentity":case"shh_newGroup":case"shh_addToGroup":case"shh_newFilter":case"shh_uninstallFilter":case"shh_getFilterChanges":case"shh_getMessages":case"test_neverCache":return"never"}}V.exports={cacheIdentifierForPayload:function y(m,E){const T=E?a(m):m.params;return h(m)?m.method+":"+x(T):null},canCache:h,blockTagForPayload:function p(m){let E=_(m);return E>=m.params.length?null:m.params[E]},paramsWithoutBlockTag:a,blockTagParamIndex:_,cacheTypeForPayload:g}},96946:(V,l,M)=>{var x=M(31325).default;V.exports=function(h){return(p,a,_,g)=>{let m;const E=new Promise(W=>{m=W});let T,I;h(p,a,function(){var W=x(function*(){I=!0,_(v=>{T=v,m()}),yield E});return function(){return W.apply(this,arguments)}}()).then(x(function*(){I?(yield E,T(null)):g(null)})).catch(W=>{T?T(W):g(W)})}}},73762:V=>{V.exports=function(M){return(x,y,h,p)=>{const a=M[x.method];return void 0===a?h():"function"==typeof a?a(x,y,h,p):(y.result=a,p())}}},17467:(V,l,M)=>{V.exports=M(73762)},76863:(V,l,M)=>{const x=M(26939),y=M(87729)();function h(g){this.currentProvider=g}function p(g){return function(){const m=this;var E=[].slice.call(arguments),T=E.pop();m.sendAsync({method:g,params:E},T)}}function a(g,m){return function(){const E=this;var T=[].slice.call(arguments),I=T.pop();T.length{const x=M(73120),y=M(47506);function h(g){const m=new Error("Expect argument to be non-empty array");if("object"!=typeof g||!g.length)throw m;const E=g.map(function(F){return"bytes"===F.type?x.toBuffer(F.value):F.value}),T=g.map(function(F){return F.type}),I=g.map(function(F){if(!F.name)throw m;return F.type+" "+F.name});return y.soliditySHA3(["bytes32","bytes32"],[y.soliditySHA3(new Array(g.length).fill("string"),I),y.soliditySHA3(T,E)])}function p(g,m){const E=x.toBuffer(m),T=x.fromRpcSig(E);return x.ecrecover(g,T.v,T.r,T.s)}function a(g){const m=x.toBuffer(g.data);return p(x.hashPersonalMessage(m),g.sig)}function _(g,m){for(var E=""+g;E.length=65&&e<=70?e-55:e>=97&&e<=102?e-87:e-48&15}function m(n,t,e){var i=g(n,e);return e-1>=t&&(i|=g(n,e-1)<<4),i}function E(n,t,e,i){for(var s=0,f=Math.min(n.length,e),c=t;c=49?d-49+10:d>=17?d-17+10:d}return s}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,i){if("number"==typeof t)return this._initNumber(t,e,i);if("object"==typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),h(e===(0|e)&&e>=2&&e<=36);var s=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(s++,this.negative=1),s=0;s-=3)this.words[f]|=(c=t[s]|t[s-1]<<8|t[s-2]<<16)<>>26-d&67108863,(d+=24)>=26&&(d-=26,f++);else if("le"===i)for(s=0,f=0;s>>26-d&67108863,(d+=24)>=26&&(d-=26,f++);return this.strip()},a.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var s=0;s=e;s-=2)d=m(t,e,s)<=18?(f-=18,this.words[c+=1]|=d>>>26):f+=8;else for(s=(t.length-e)%2==0?e+1:e;s=18?(f-=18,this.words[c+=1]|=d>>>26):f+=8;this.strip()},a.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var s=0,f=1;f<=67108863;f*=e)s++;s--,f=f/e|0;for(var c=t.length-i,d=c%s,o=Math.min(c,c-d)+i,r=0,u=i;u1&&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?""};var T=["","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"],I=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],F=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function v(n,t,e){e.negative=t.negative^n.negative;var i=n.length+t.length|0;e.length=i,i=i-1|0;var s=0|n.words[0],f=0|t.words[0],c=s*f,o=c/67108864|0;e.words[0]=67108863&c;for(var r=1;r>>26,z=67108863&o,Z=Math.min(r,t.length-1),G=Math.max(0,r-n.length+1);G<=Z;G++)u+=(c=(s=0|n.words[r-G|0])*(f=0|t.words[G])+z)/67108864|0,z=67108863&c;e.words[r]=0|z,o=0|u}return 0!==o?e.words[r]=0|o:e.length--,e.strip()}a.prototype.toString=function(t,e){var i;if(e=0|e||1,16===(t=t||10)||"hex"===t){i="";for(var s=0,f=0,c=0;c>>24-s&16777215)||c!==this.length-1?T[6-o.length]+o+i:o+i,(s+=2)>=26&&(s-=26,c--)}for(0!==f&&(i=f.toString(16)+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var r=I[t],u=F[t];i="";var z=this.clone();for(z.negative=0;!z.isZero();){var Z=z.modn(u).toString(t);i=(z=z.idivn(u)).isZero()?Z+i:T[r-Z.length]+Z+i}for(this.isZero()&&(i="0"+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}h(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&h(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return h(typeof _<"u"),this.toArrayLike(_,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,i){var s=this.byteLength(),f=i||Math.max(1,s);h(s<=f,"byte array longer than desired length"),h(f>0,"Requested array length <= 0"),this.strip();var o,r,c="le"===e,d=new t(f),u=this.clone();if(c){for(r=0;!u.isZero();r++)o=u.andln(255),u.iushrn(8),d[r]=o;for(;r=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0==(8191&e)&&(i+=13,e>>>=13),0==(127&e)&&(i+=7,e>>>=7),0==(15&e)&&(i+=4,e>>>=4),0==(3&e)&&(i+=2,e>>>=2),0==(1&e)&&i++,i},a.prototype.bitLength=function(){var e=this._countBits(this.words[this.length-1]);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var i=0;it.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var s=0;st.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){h("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var s=0;s0&&(this.words[s]=~this.words[s]&67108863>>26-i),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){h("number"==typeof t&&t>=0);var i=t/26|0,s=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<t.length?(i=this,s=t):(i=t,s=this);for(var f=0,c=0;c>>26;for(;0!==f&&c>>26;if(this.length=i.length,0!==f)this.words[this.length]=f,this.length++;else if(i!==this)for(;ct.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var s,f,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(s=this,f=t):(s=t,f=this);for(var c=0,d=0;d>26,this.words[d]=67108863&e;for(;0!==c&&d>26,this.words[d]=67108863&e;if(0===c&&d>>13,Q=0|s[1],et=8191&Q,ht=Q>>>13,Ot=0|s[2],ut=8191&Ot,yt=Ot>>>13,Qt=0|s[3],vt=8191&Qt,At=Qt>>>13,Xt=0|s[4],_t=8191&Xt,Nt=Xt>>>13,O=0|s[5],b=8191&O,S=O>>>13,q=0|s[6],j=8191&q,Y=q>>>13,nt=0|s[7],it=8191&nt,lt=nt>>>13,Gt=0|s[8],ct=8191&Gt,dt=Gt>>>13,jt=0|s[9],xt=8191&jt,Pt=jt>>>13,fe=0|f[0],pt=8191&fe,Lt=fe>>>13,re=0|f[1],bt=8191&re,Ct=re>>>13,te=0|f[2],wt=8191&te,Ut=te>>>13,ie=0|f[3],gt=8191&ie,Ft=ie>>>13,de=0|f[4],Tt=8191&de,Ht=de>>>13,oe=0|f[5],Et=8191&oe,Kt=oe>>>13,ve=0|f[6],St=8191&ve,Dt=ve>>>13,he=0|f[7],kt=8191&he,Zt=he>>>13,me=0|f[8],Bt=8191&me,Wt=me>>>13,pe=0|f[9],Rt=8191&pe,zt=pe>>>13;i.negative=t.negative^e.negative,i.length=19;var _e=(d+(o=Math.imul(Z,pt))|0)+((8191&(r=(r=Math.imul(Z,Lt))+Math.imul(G,pt)|0))<<13)|0;d=((u=Math.imul(G,Lt))+(r>>>13)|0)+(_e>>>26)|0,_e&=67108863,o=Math.imul(et,pt),r=(r=Math.imul(et,Lt))+Math.imul(ht,pt)|0,u=Math.imul(ht,Lt);var H=(d+(o=o+Math.imul(Z,bt)|0)|0)+((8191&(r=(r=r+Math.imul(Z,Ct)|0)+Math.imul(G,bt)|0))<<13)|0;d=((u=u+Math.imul(G,Ct)|0)+(r>>>13)|0)+(H>>>26)|0,H&=67108863,o=Math.imul(ut,pt),r=(r=Math.imul(ut,Lt))+Math.imul(yt,pt)|0,u=Math.imul(yt,Lt),o=o+Math.imul(et,bt)|0,r=(r=r+Math.imul(et,Ct)|0)+Math.imul(ht,bt)|0,u=u+Math.imul(ht,Ct)|0;var K=(d+(o=o+Math.imul(Z,wt)|0)|0)+((8191&(r=(r=r+Math.imul(Z,Ut)|0)+Math.imul(G,wt)|0))<<13)|0;d=((u=u+Math.imul(G,Ut)|0)+(r>>>13)|0)+(K>>>26)|0,K&=67108863,o=Math.imul(vt,pt),r=(r=Math.imul(vt,Lt))+Math.imul(At,pt)|0,u=Math.imul(At,Lt),o=o+Math.imul(ut,bt)|0,r=(r=r+Math.imul(ut,Ct)|0)+Math.imul(yt,bt)|0,u=u+Math.imul(yt,Ct)|0,o=o+Math.imul(et,wt)|0,r=(r=r+Math.imul(et,Ut)|0)+Math.imul(ht,wt)|0,u=u+Math.imul(ht,Ut)|0;var $=(d+(o=o+Math.imul(Z,gt)|0)|0)+((8191&(r=(r=r+Math.imul(Z,Ft)|0)+Math.imul(G,gt)|0))<<13)|0;d=((u=u+Math.imul(G,Ft)|0)+(r>>>13)|0)+($>>>26)|0,$&=67108863,o=Math.imul(_t,pt),r=(r=Math.imul(_t,Lt))+Math.imul(Nt,pt)|0,u=Math.imul(Nt,Lt),o=o+Math.imul(vt,bt)|0,r=(r=r+Math.imul(vt,Ct)|0)+Math.imul(At,bt)|0,u=u+Math.imul(At,Ct)|0,o=o+Math.imul(ut,wt)|0,r=(r=r+Math.imul(ut,Ut)|0)+Math.imul(yt,wt)|0,u=u+Math.imul(yt,Ut)|0,o=o+Math.imul(et,gt)|0,r=(r=r+Math.imul(et,Ft)|0)+Math.imul(ht,gt)|0,u=u+Math.imul(ht,Ft)|0;var ot=(d+(o=o+Math.imul(Z,Tt)|0)|0)+((8191&(r=(r=r+Math.imul(Z,Ht)|0)+Math.imul(G,Tt)|0))<<13)|0;d=((u=u+Math.imul(G,Ht)|0)+(r>>>13)|0)+(ot>>>26)|0,ot&=67108863,o=Math.imul(b,pt),r=(r=Math.imul(b,Lt))+Math.imul(S,pt)|0,u=Math.imul(S,Lt),o=o+Math.imul(_t,bt)|0,r=(r=r+Math.imul(_t,Ct)|0)+Math.imul(Nt,bt)|0,u=u+Math.imul(Nt,Ct)|0,o=o+Math.imul(vt,wt)|0,r=(r=r+Math.imul(vt,Ut)|0)+Math.imul(At,wt)|0,u=u+Math.imul(At,Ut)|0,o=o+Math.imul(ut,gt)|0,r=(r=r+Math.imul(ut,Ft)|0)+Math.imul(yt,gt)|0,u=u+Math.imul(yt,Ft)|0,o=o+Math.imul(et,Tt)|0,r=(r=r+Math.imul(et,Ht)|0)+Math.imul(ht,Tt)|0,u=u+Math.imul(ht,Ht)|0;var It=(d+(o=o+Math.imul(Z,Et)|0)|0)+((8191&(r=(r=r+Math.imul(Z,Kt)|0)+Math.imul(G,Et)|0))<<13)|0;d=((u=u+Math.imul(G,Kt)|0)+(r>>>13)|0)+(It>>>26)|0,It&=67108863,o=Math.imul(j,pt),r=(r=Math.imul(j,Lt))+Math.imul(Y,pt)|0,u=Math.imul(Y,Lt),o=o+Math.imul(b,bt)|0,r=(r=r+Math.imul(b,Ct)|0)+Math.imul(S,bt)|0,u=u+Math.imul(S,Ct)|0,o=o+Math.imul(_t,wt)|0,r=(r=r+Math.imul(_t,Ut)|0)+Math.imul(Nt,wt)|0,u=u+Math.imul(Nt,Ut)|0,o=o+Math.imul(vt,gt)|0,r=(r=r+Math.imul(vt,Ft)|0)+Math.imul(At,gt)|0,u=u+Math.imul(At,Ft)|0,o=o+Math.imul(ut,Tt)|0,r=(r=r+Math.imul(ut,Ht)|0)+Math.imul(yt,Tt)|0,u=u+Math.imul(yt,Ht)|0,o=o+Math.imul(et,Et)|0,r=(r=r+Math.imul(et,Kt)|0)+Math.imul(ht,Et)|0,u=u+Math.imul(ht,Kt)|0;var mt=(d+(o=o+Math.imul(Z,St)|0)|0)+((8191&(r=(r=r+Math.imul(Z,Dt)|0)+Math.imul(G,St)|0))<<13)|0;d=((u=u+Math.imul(G,Dt)|0)+(r>>>13)|0)+(mt>>>26)|0,mt&=67108863,o=Math.imul(it,pt),r=(r=Math.imul(it,Lt))+Math.imul(lt,pt)|0,u=Math.imul(lt,Lt),o=o+Math.imul(j,bt)|0,r=(r=r+Math.imul(j,Ct)|0)+Math.imul(Y,bt)|0,u=u+Math.imul(Y,Ct)|0,o=o+Math.imul(b,wt)|0,r=(r=r+Math.imul(b,Ut)|0)+Math.imul(S,wt)|0,u=u+Math.imul(S,Ut)|0,o=o+Math.imul(_t,gt)|0,r=(r=r+Math.imul(_t,Ft)|0)+Math.imul(Nt,gt)|0,u=u+Math.imul(Nt,Ft)|0,o=o+Math.imul(vt,Tt)|0,r=(r=r+Math.imul(vt,Ht)|0)+Math.imul(At,Tt)|0,u=u+Math.imul(At,Ht)|0,o=o+Math.imul(ut,Et)|0,r=(r=r+Math.imul(ut,Kt)|0)+Math.imul(yt,Et)|0,u=u+Math.imul(yt,Kt)|0,o=o+Math.imul(et,St)|0,r=(r=r+Math.imul(et,Dt)|0)+Math.imul(ht,St)|0,u=u+Math.imul(ht,Dt)|0;var $t=(d+(o=o+Math.imul(Z,kt)|0)|0)+((8191&(r=(r=r+Math.imul(Z,Zt)|0)+Math.imul(G,kt)|0))<<13)|0;d=((u=u+Math.imul(G,Zt)|0)+(r>>>13)|0)+($t>>>26)|0,$t&=67108863,o=Math.imul(ct,pt),r=(r=Math.imul(ct,Lt))+Math.imul(dt,pt)|0,u=Math.imul(dt,Lt),o=o+Math.imul(it,bt)|0,r=(r=r+Math.imul(it,Ct)|0)+Math.imul(lt,bt)|0,u=u+Math.imul(lt,Ct)|0,o=o+Math.imul(j,wt)|0,r=(r=r+Math.imul(j,Ut)|0)+Math.imul(Y,wt)|0,u=u+Math.imul(Y,Ut)|0,o=o+Math.imul(b,gt)|0,r=(r=r+Math.imul(b,Ft)|0)+Math.imul(S,gt)|0,u=u+Math.imul(S,Ft)|0,o=o+Math.imul(_t,Tt)|0,r=(r=r+Math.imul(_t,Ht)|0)+Math.imul(Nt,Tt)|0,u=u+Math.imul(Nt,Ht)|0,o=o+Math.imul(vt,Et)|0,r=(r=r+Math.imul(vt,Kt)|0)+Math.imul(At,Et)|0,u=u+Math.imul(At,Kt)|0,o=o+Math.imul(ut,St)|0,r=(r=r+Math.imul(ut,Dt)|0)+Math.imul(yt,St)|0,u=u+Math.imul(yt,Dt)|0,o=o+Math.imul(et,kt)|0,r=(r=r+Math.imul(et,Zt)|0)+Math.imul(ht,kt)|0,u=u+Math.imul(ht,Zt)|0;var Jt=(d+(o=o+Math.imul(Z,Bt)|0)|0)+((8191&(r=(r=r+Math.imul(Z,Wt)|0)+Math.imul(G,Bt)|0))<<13)|0;d=((u=u+Math.imul(G,Wt)|0)+(r>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,o=Math.imul(xt,pt),r=(r=Math.imul(xt,Lt))+Math.imul(Pt,pt)|0,u=Math.imul(Pt,Lt),o=o+Math.imul(ct,bt)|0,r=(r=r+Math.imul(ct,Ct)|0)+Math.imul(dt,bt)|0,u=u+Math.imul(dt,Ct)|0,o=o+Math.imul(it,wt)|0,r=(r=r+Math.imul(it,Ut)|0)+Math.imul(lt,wt)|0,u=u+Math.imul(lt,Ut)|0,o=o+Math.imul(j,gt)|0,r=(r=r+Math.imul(j,Ft)|0)+Math.imul(Y,gt)|0,u=u+Math.imul(Y,Ft)|0,o=o+Math.imul(b,Tt)|0,r=(r=r+Math.imul(b,Ht)|0)+Math.imul(S,Tt)|0,u=u+Math.imul(S,Ht)|0,o=o+Math.imul(_t,Et)|0,r=(r=r+Math.imul(_t,Kt)|0)+Math.imul(Nt,Et)|0,u=u+Math.imul(Nt,Kt)|0,o=o+Math.imul(vt,St)|0,r=(r=r+Math.imul(vt,Dt)|0)+Math.imul(At,St)|0,u=u+Math.imul(At,Dt)|0,o=o+Math.imul(ut,kt)|0,r=(r=r+Math.imul(ut,Zt)|0)+Math.imul(yt,kt)|0,u=u+Math.imul(yt,Zt)|0,o=o+Math.imul(et,Bt)|0,r=(r=r+Math.imul(et,Wt)|0)+Math.imul(ht,Bt)|0,u=u+Math.imul(ht,Wt)|0;var Yt=(d+(o=o+Math.imul(Z,Rt)|0)|0)+((8191&(r=(r=r+Math.imul(Z,zt)|0)+Math.imul(G,Rt)|0))<<13)|0;d=((u=u+Math.imul(G,zt)|0)+(r>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,o=Math.imul(xt,bt),r=(r=Math.imul(xt,Ct))+Math.imul(Pt,bt)|0,u=Math.imul(Pt,Ct),o=o+Math.imul(ct,wt)|0,r=(r=r+Math.imul(ct,Ut)|0)+Math.imul(dt,wt)|0,u=u+Math.imul(dt,Ut)|0,o=o+Math.imul(it,gt)|0,r=(r=r+Math.imul(it,Ft)|0)+Math.imul(lt,gt)|0,u=u+Math.imul(lt,Ft)|0,o=o+Math.imul(j,Tt)|0,r=(r=r+Math.imul(j,Ht)|0)+Math.imul(Y,Tt)|0,u=u+Math.imul(Y,Ht)|0,o=o+Math.imul(b,Et)|0,r=(r=r+Math.imul(b,Kt)|0)+Math.imul(S,Et)|0,u=u+Math.imul(S,Kt)|0,o=o+Math.imul(_t,St)|0,r=(r=r+Math.imul(_t,Dt)|0)+Math.imul(Nt,St)|0,u=u+Math.imul(Nt,Dt)|0,o=o+Math.imul(vt,kt)|0,r=(r=r+Math.imul(vt,Zt)|0)+Math.imul(At,kt)|0,u=u+Math.imul(At,Zt)|0,o=o+Math.imul(ut,Bt)|0,r=(r=r+Math.imul(ut,Wt)|0)+Math.imul(yt,Bt)|0,u=u+Math.imul(yt,Wt)|0;var Vt=(d+(o=o+Math.imul(et,Rt)|0)|0)+((8191&(r=(r=r+Math.imul(et,zt)|0)+Math.imul(ht,Rt)|0))<<13)|0;d=((u=u+Math.imul(ht,zt)|0)+(r>>>13)|0)+(Vt>>>26)|0,Vt&=67108863,o=Math.imul(xt,wt),r=(r=Math.imul(xt,Ut))+Math.imul(Pt,wt)|0,u=Math.imul(Pt,Ut),o=o+Math.imul(ct,gt)|0,r=(r=r+Math.imul(ct,Ft)|0)+Math.imul(dt,gt)|0,u=u+Math.imul(dt,Ft)|0,o=o+Math.imul(it,Tt)|0,r=(r=r+Math.imul(it,Ht)|0)+Math.imul(lt,Tt)|0,u=u+Math.imul(lt,Ht)|0,o=o+Math.imul(j,Et)|0,r=(r=r+Math.imul(j,Kt)|0)+Math.imul(Y,Et)|0,u=u+Math.imul(Y,Kt)|0,o=o+Math.imul(b,St)|0,r=(r=r+Math.imul(b,Dt)|0)+Math.imul(S,St)|0,u=u+Math.imul(S,Dt)|0,o=o+Math.imul(_t,kt)|0,r=(r=r+Math.imul(_t,Zt)|0)+Math.imul(Nt,kt)|0,u=u+Math.imul(Nt,Zt)|0,o=o+Math.imul(vt,Bt)|0,r=(r=r+Math.imul(vt,Wt)|0)+Math.imul(At,Bt)|0,u=u+Math.imul(At,Wt)|0;var Mt=(d+(o=o+Math.imul(ut,Rt)|0)|0)+((8191&(r=(r=r+Math.imul(ut,zt)|0)+Math.imul(yt,Rt)|0))<<13)|0;d=((u=u+Math.imul(yt,zt)|0)+(r>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,o=Math.imul(xt,gt),r=(r=Math.imul(xt,Ft))+Math.imul(Pt,gt)|0,u=Math.imul(Pt,Ft),o=o+Math.imul(ct,Tt)|0,r=(r=r+Math.imul(ct,Ht)|0)+Math.imul(dt,Tt)|0,u=u+Math.imul(dt,Ht)|0,o=o+Math.imul(it,Et)|0,r=(r=r+Math.imul(it,Kt)|0)+Math.imul(lt,Et)|0,u=u+Math.imul(lt,Kt)|0,o=o+Math.imul(j,St)|0,r=(r=r+Math.imul(j,Dt)|0)+Math.imul(Y,St)|0,u=u+Math.imul(Y,Dt)|0,o=o+Math.imul(b,kt)|0,r=(r=r+Math.imul(b,Zt)|0)+Math.imul(S,kt)|0,u=u+Math.imul(S,Zt)|0,o=o+Math.imul(_t,Bt)|0,r=(r=r+Math.imul(_t,Wt)|0)+Math.imul(Nt,Bt)|0,u=u+Math.imul(Nt,Wt)|0;var ee=(d+(o=o+Math.imul(vt,Rt)|0)|0)+((8191&(r=(r=r+Math.imul(vt,zt)|0)+Math.imul(At,Rt)|0))<<13)|0;d=((u=u+Math.imul(At,zt)|0)+(r>>>13)|0)+(ee>>>26)|0,ee&=67108863,o=Math.imul(xt,Tt),r=(r=Math.imul(xt,Ht))+Math.imul(Pt,Tt)|0,u=Math.imul(Pt,Ht),o=o+Math.imul(ct,Et)|0,r=(r=r+Math.imul(ct,Kt)|0)+Math.imul(dt,Et)|0,u=u+Math.imul(dt,Kt)|0,o=o+Math.imul(it,St)|0,r=(r=r+Math.imul(it,Dt)|0)+Math.imul(lt,St)|0,u=u+Math.imul(lt,Dt)|0,o=o+Math.imul(j,kt)|0,r=(r=r+Math.imul(j,Zt)|0)+Math.imul(Y,kt)|0,u=u+Math.imul(Y,Zt)|0,o=o+Math.imul(b,Bt)|0,r=(r=r+Math.imul(b,Wt)|0)+Math.imul(S,Bt)|0,u=u+Math.imul(S,Wt)|0;var ae=(d+(o=o+Math.imul(_t,Rt)|0)|0)+((8191&(r=(r=r+Math.imul(_t,zt)|0)+Math.imul(Nt,Rt)|0))<<13)|0;d=((u=u+Math.imul(Nt,zt)|0)+(r>>>13)|0)+(ae>>>26)|0,ae&=67108863,o=Math.imul(xt,Et),r=(r=Math.imul(xt,Kt))+Math.imul(Pt,Et)|0,u=Math.imul(Pt,Kt),o=o+Math.imul(ct,St)|0,r=(r=r+Math.imul(ct,Dt)|0)+Math.imul(dt,St)|0,u=u+Math.imul(dt,Dt)|0,o=o+Math.imul(it,kt)|0,r=(r=r+Math.imul(it,Zt)|0)+Math.imul(lt,kt)|0,u=u+Math.imul(lt,Zt)|0,o=o+Math.imul(j,Bt)|0,r=(r=r+Math.imul(j,Wt)|0)+Math.imul(Y,Bt)|0,u=u+Math.imul(Y,Wt)|0;var ce=(d+(o=o+Math.imul(b,Rt)|0)|0)+((8191&(r=(r=r+Math.imul(b,zt)|0)+Math.imul(S,Rt)|0))<<13)|0;d=((u=u+Math.imul(S,zt)|0)+(r>>>13)|0)+(ce>>>26)|0,ce&=67108863,o=Math.imul(xt,St),r=(r=Math.imul(xt,Dt))+Math.imul(Pt,St)|0,u=Math.imul(Pt,Dt),o=o+Math.imul(ct,kt)|0,r=(r=r+Math.imul(ct,Zt)|0)+Math.imul(dt,kt)|0,u=u+Math.imul(dt,Zt)|0,o=o+Math.imul(it,Bt)|0,r=(r=r+Math.imul(it,Wt)|0)+Math.imul(lt,Bt)|0,u=u+Math.imul(lt,Wt)|0;var le=(d+(o=o+Math.imul(j,Rt)|0)|0)+((8191&(r=(r=r+Math.imul(j,zt)|0)+Math.imul(Y,Rt)|0))<<13)|0;d=((u=u+Math.imul(Y,zt)|0)+(r>>>13)|0)+(le>>>26)|0,le&=67108863,o=Math.imul(xt,kt),r=(r=Math.imul(xt,Zt))+Math.imul(Pt,kt)|0,u=Math.imul(Pt,Zt),o=o+Math.imul(ct,Bt)|0,r=(r=r+Math.imul(ct,Wt)|0)+Math.imul(dt,Bt)|0,u=u+Math.imul(dt,Wt)|0;var ge=(d+(o=o+Math.imul(it,Rt)|0)|0)+((8191&(r=(r=r+Math.imul(it,zt)|0)+Math.imul(lt,Rt)|0))<<13)|0;d=((u=u+Math.imul(lt,zt)|0)+(r>>>13)|0)+(ge>>>26)|0,ge&=67108863,o=Math.imul(xt,Bt),r=(r=Math.imul(xt,Wt))+Math.imul(Pt,Bt)|0,u=Math.imul(Pt,Wt);var ue=(d+(o=o+Math.imul(ct,Rt)|0)|0)+((8191&(r=(r=r+Math.imul(ct,zt)|0)+Math.imul(dt,Rt)|0))<<13)|0;d=((u=u+Math.imul(dt,zt)|0)+(r>>>13)|0)+(ue>>>26)|0,ue&=67108863;var xe=(d+(o=Math.imul(xt,Rt))|0)+((8191&(r=(r=Math.imul(xt,zt))+Math.imul(Pt,Rt)|0))<<13)|0;return d=((u=Math.imul(Pt,zt))+(r>>>13)|0)+(xe>>>26)|0,xe&=67108863,c[0]=_e,c[1]=H,c[2]=K,c[3]=$,c[4]=ot,c[5]=It,c[6]=mt,c[7]=$t,c[8]=Jt,c[9]=Yt,c[10]=Vt,c[11]=Mt,c[12]=ee,c[13]=ae,c[14]=ce,c[15]=le,c[16]=ge,c[17]=ue,c[18]=xe,0!==d&&(c[19]=d,i.length++),i};function k(n,t,e){return(new w).mulp(n,t,e)}function w(n,t){this.x=n,this.y=t}Math.imul||(L=v),a.prototype.mulTo=function(t,e){var i,s=this.length+t.length;return i=10===this.length&&10===t.length?L(this,t,e):s<63?v(this,t,e):s<1024?function N(n,t,e){e.negative=t.negative^n.negative,e.length=n.length+t.length;for(var i=0,s=0,f=0;f>>26)|0)>>>26,c&=67108863}e.words[f]=d,i=c,c=s}return 0!==i?e.words[f]=i:e.length--,e.strip()}(this,t,e):k(this,t,e),i},w.prototype.makeRBT=function(t){for(var e=new Array(t),i=a.prototype._countBits(t)-1,s=0;s>=1;return s},w.prototype.permute=function(t,e,i,s,f,c){for(var d=0;d>>=1)f++;return 1<>>=13),f>>>=13;for(c=2*e;c>=26,e+=s/67108864|0,e+=f>>>26,this.words[i]=67108863&f}return 0!==e&&(this.words[i]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function W(n){for(var t=new Array(n.bitLength()),e=0;e>>s}return t}(t);if(0===e.length)return new a(1);for(var i=this,s=0;s=0);var f,e=t%26,i=(t-e)/26,s=67108863>>>26-e<<26-e;if(0!==e){var c=0;for(f=0;f>>26-e}c&&(this.words[f]=c,this.length++)}if(0!==i){for(f=this.length-1;f>=0;f--)this.words[f+i]=this.words[f];for(f=0;f=0),s=e?(e-e%26)/26:0;var f=t%26,c=Math.min((t-f)/26,this.length),d=67108863^67108863>>>f<c)for(this.length-=c,r=0;r=0&&(0!==u||r>=s);r--){var z=0|this.words[r];this.words[r]=u<<26-f|z>>>f,u=z&d}return o&&0!==u&&(o.words[o.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,i){return h(0===this.negative),this.iushrn(t,e,i)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){h("number"==typeof t&&t>=0);var e=t%26,i=(t-e)/26;return!(this.length<=i||!(this.words[i]&1<=0);var e=t%26,i=(t-e)/26;return h(0===this.negative,"imaskn works only with positive numbers"),this.length<=i?this:(0!==e&&i++,this.length=Math.min(i,this.length),0!==e&&(this.words[this.length-1]&=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(h("number"==typeof t),h(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(o/67108864|0),this.words[f+i]=67108863&c}for(;f>26,this.words[f+i]=67108863&c;if(0===d)return this.strip();for(h(-1===d),d=0,f=0;f>26,this.words[f]=67108863&c;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var i,s=this.clone(),f=t,c=0|f.words[f.length-1];0!=(i=26-this._countBits(c))&&(f=f.ushln(i),s.iushln(i),c=0|f.words[f.length-1]);var r,o=s.length-f.length;if("mod"!==e){(r=new a(null)).length=o+1,r.words=new Array(r.length);for(var u=0;u=0;Z--){var G=67108864*(0|s.words[f.length+Z])+(0|s.words[f.length+Z-1]);for(G=Math.min(G/c|0,67108863),s._ishlnsubmul(f,G,Z);0!==s.negative;)G--,s.negative=0,s._ishlnsubmul(f,1,Z),s.isZero()||(s.negative^=1);r&&(r.words[Z]=G)}return r&&r.strip(),s.strip(),"div"!==e&&0!==i&&s.iushrn(i),{div:r||null,mod:s}},a.prototype.divmod=function(t,e,i){return h(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(c=this.neg().divmod(t,e),"mod"!==e&&(s=c.div.neg()),"div"!==e&&(f=c.mod.neg(),i&&0!==f.negative&&f.iadd(t)),{div:s,mod:f}):0===this.negative&&0!==t.negative?(c=this.divmod(t.neg(),e),"mod"!==e&&(s=c.div.neg()),{div:s,mod:c.mod}):0!=(this.negative&t.negative)?(c=this.neg().divmod(t.neg(),e),"div"!==e&&(f=c.mod.neg(),i&&0!==f.negative&&f.isub(t)),{div:c.div,mod:f}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var s,f,c},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,s=t.ushrn(1),f=t.andln(1),c=i.cmp(s);return c<0||1===f&&0===c?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){h(t<=67108863);for(var e=(1<<26)%t,i=0,s=this.length-1;s>=0;s--)i=(e*i+(0|this.words[s]))%t;return i},a.prototype.idivn=function(t){h(t<=67108863);for(var e=0,i=this.length-1;i>=0;i--){var s=(0|this.words[i])+67108864*e;this.words[i]=s/t|0,e=s%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){h(0===t.negative),h(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var s=new a(1),f=new a(0),c=new a(0),d=new a(1),o=0;e.isEven()&&i.isEven();)e.iushrn(1),i.iushrn(1),++o;for(var r=i.clone(),u=e.clone();!e.isZero();){for(var z=0,Z=1;0==(e.words[0]&Z)&&z<26;++z,Z<<=1);if(z>0)for(e.iushrn(z);z-- >0;)(s.isOdd()||f.isOdd())&&(s.iadd(r),f.isub(u)),s.iushrn(1),f.iushrn(1);for(var G=0,Q=1;0==(i.words[0]&Q)&&G<26;++G,Q<<=1);if(G>0)for(i.iushrn(G);G-- >0;)(c.isOdd()||d.isOdd())&&(c.iadd(r),d.isub(u)),c.iushrn(1),d.iushrn(1);e.cmp(i)>=0?(e.isub(i),s.isub(c),f.isub(d)):(i.isub(e),c.isub(s),d.isub(f))}return{a:c,b:d,gcd:i.iushln(o)}},a.prototype._invmp=function(t){h(0===t.negative),h(!t.isZero());var z,e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var s=new a(1),f=new a(0),c=i.clone();e.cmpn(1)>0&&i.cmpn(1)>0;){for(var d=0,o=1;0==(e.words[0]&o)&&d<26;++d,o<<=1);if(d>0)for(e.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);for(var r=0,u=1;0==(i.words[0]&u)&&r<26;++r,u<<=1);if(r>0)for(i.iushrn(r);r-- >0;)f.isOdd()&&f.iadd(c),f.iushrn(1);e.cmp(i)>=0?(e.isub(i),s.isub(f)):(i.isub(e),f.isub(s))}return(z=0===e.cmpn(1)?s:f).cmpn(0)<0&&z.iadd(t),z},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var s=0;e.isEven()&&i.isEven();s++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var f=e.cmp(i);if(f<0){var c=e;e=i,i=c}else if(0===f||0===i.cmpn(1))break;e.isub(i)}return i.iushln(s)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){h("number"==typeof t);var e=t%26,i=(t-e)/26,s=1<>>26,this.words[c]=d&=67108863}return 0!==f&&(this.words[c]=f,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var i,e=t<0;if(0!==this.negative&&!e)return-1;if(0===this.negative&&e)return 1;if(this.strip(),this.length>1)i=1;else{e&&(t=-t),h(t<=67108863,"Number is too big");var s=0|this.words[0];i=s===t?0:st.length)return 1;if(this.length=0;i--){var s=0|this.words[i],f=0|t.words[i];if(s!==f){sf&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new tt(t)},a.prototype.toRed=function(t){return h(!this.red,"Already a number in reduction context"),h(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return h(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return h(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return h(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return h(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return h(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return h(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return h(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return h(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return h(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return h(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return h(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return h(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return h(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return h(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return h(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var A={k256:null,p224:null,p192:null,p25519:null};function B(n,t){this.name=n,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 D(){B.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function J(){B.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function at(){B.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function st(){B.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function tt(n){if("string"==typeof n){var t=a._prime(n);this.m=t.p,this.prime=t}else h(n.gtn(1),"modulus must be greater than 1"),this.m=n,this.prime=null}function U(n){tt.call(this,n),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 t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},B.prototype.ireduce=function(t){var i,e=t;do{this.split(e,this.tmp),i=(e=(e=this.imulK(e)).iadd(this.tmp)).bitLength()}while(i>this.n);var s=i0?e.isub(this.p):void 0!==e.strip?e.strip():e._strip(),e},B.prototype.split=function(t,e){t.iushrn(this.n,0,e)},B.prototype.imulK=function(t){return t.imul(this.k)},p(D,B),D.prototype.split=function(t,e){for(var i=4194303,s=Math.min(t.length,9),f=0;f>>22,c=d}t.words[f-10]=c>>>=22,t.length-=0===c&&t.length>10?10:9},D.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i>>=26,t.words[i]=f,e=s}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(A[t])return A[t];var e;if("k256"===t)e=new D;else if("p224"===t)e=new J;else if("p192"===t)e=new at;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new st}return A[t]=e,e},tt.prototype._verify1=function(t){h(0===t.negative,"red works only with positives"),h(t.red,"red works only with red numbers")},tt.prototype._verify2=function(t,e){h(0==(t.negative|e.negative),"red works only with positives"),h(t.red&&t.red===e.red,"red works only with red numbers")},tt.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},tt.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},tt.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},tt.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},tt.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},tt.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},tt.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},tt.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},tt.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},tt.prototype.isqr=function(t){return this.imul(t,t.clone())},tt.prototype.sqr=function(t){return this.mul(t,t)},tt.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(h(e%2==1),3===e){var i=this.m.add(new a(1)).iushrn(2);return this.pow(t,i)}for(var s=this.m.subn(1),f=0;!s.isZero()&&0===s.andln(1);)f++,s.iushrn(1);h(!s.isZero());var c=new a(1).toRed(this),d=c.redNeg(),o=this.m.subn(1).iushrn(1),r=this.m.bitLength();for(r=new a(2*r*r).toRed(this);0!==this.pow(r,o).cmp(d);)r.redIAdd(d);for(var u=this.pow(r,s),z=this.pow(t,s.addn(1).iushrn(1)),Z=this.pow(t,s),G=f;0!==Z.cmp(c);){for(var Q=Z,et=0;0!==Q.cmp(c);et++)Q=Q.redSqr();h(et=0;f--){for(var u=e.words[f],z=r-1;z>=0;z--){var Z=u>>z&1;c!==s[0]&&(c=this.sqr(c)),0!==Z||0!==d?(d<<=1,d|=Z,(4==++o||0===f&&0===z)&&(c=this.mul(c,s[d]),o=0,d=0)):o=0}r=26}return c},tt.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},tt.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new U(t)},p(U,tt),U.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},U.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},U.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),s=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=i.isub(s).iushrn(this.shift),c=f;return f.cmp(this.m)>=0?c=f.isub(this.m):f.cmpn(0)<0&&(c=f.iadd(this.m)),c._forceRed(this)},U.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var i=t.mul(e),s=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=i.isub(s).iushrn(this.shift),c=f;return f.cmp(this.m)>=0?c=f.isub(this.m):f.cmpn(0)<0&&(c=f.iadd(this.m)),c._forceRed(this)},U.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(V=M.nmd(V),this)},73120:(V,l,M)=>{"use strict";var x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(v){return typeof v}:function(v){return v&&"function"==typeof Symbol&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},y=M(75512),h=y.keccak224,p=y.keccak384,a=y.keccak256,_=y.keccak512,g=M(98067),m=M(80469),E=M(26651),T=M(52759),I=M(45429),F=M(5214).Buffer;Object.assign(l,M(44780)),l.MAX_INTEGER=new T("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),l.TWO_POW256=new T("10000000000000000000000000000000000000000000000000000000000000000",16),l.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",l.SHA3_NULL_S=l.KECCAK256_NULL_S,l.KECCAK256_NULL=F.from(l.KECCAK256_NULL_S,"hex"),l.SHA3_NULL=l.KECCAK256_NULL,l.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",l.SHA3_RLP_ARRAY_S=l.KECCAK256_RLP_ARRAY_S,l.KECCAK256_RLP_ARRAY=F.from(l.KECCAK256_RLP_ARRAY_S,"hex"),l.SHA3_RLP_ARRAY=l.KECCAK256_RLP_ARRAY,l.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",l.SHA3_RLP_S=l.KECCAK256_RLP_S,l.KECCAK256_RLP=F.from(l.KECCAK256_RLP_S,"hex"),l.SHA3_RLP=l.KECCAK256_RLP,l.BN=T,l.rlp=E,l.secp256k1=g,l.zeros=function(v){return F.allocUnsafe(v).fill(0)},l.zeroAddress=function(){var L=l.zeros(20);return l.bufferToHex(L)},l.setLengthLeft=l.setLength=function(v,L,N){var k=l.zeros(L);return v=l.toBuffer(v),N?v.length0&&"0"===L.toString();)L=(v=v.slice(1))[0];return v},l.toBuffer=function(v){if(!F.isBuffer(v))if(Array.isArray(v))v=F.from(v);else if("string"==typeof v)v=l.isHexString(v)?F.from(l.padToEven(l.stripHexPrefix(v)),"hex"):F.from(v);else if("number"==typeof v)v=l.intToBuffer(v);else if(null==v)v=F.allocUnsafe(0);else if(T.isBN(v))v=v.toArrayLike(F);else{if(!v.toArray)throw new Error("invalid type");v=F.from(v.toArray())}return v},l.bufferToInt=function(v){return new T(l.toBuffer(v)).toNumber()},l.bufferToHex=function(v){return"0x"+(v=l.toBuffer(v)).toString("hex")},l.fromSigned=function(v){return new T(v).fromTwos(256)},l.toUnsigned=function(v){return F.from(v.toTwos(256).toArray())},l.keccak=function(v,L){switch(v=l.toBuffer(v),L||(L=256),L){case 224:return h(v);case 256:return a(v);case 384:return p(v);case 512:return _(v);default:throw new Error("Invald algorithm: keccak"+L)}},l.keccak256=function(v){return l.keccak(v)},l.sha3=l.keccak,l.sha256=function(v){return v=l.toBuffer(v),I("sha256").update(v).digest()},l.ripemd160=function(v,L){v=l.toBuffer(v);var N=I("rmd160").update(v).digest();return!0===L?l.setLength(N,32):N},l.rlphash=function(v){return l.keccak(E.encode(v))},l.isValidPrivate=function(v){return g.privateKeyVerify(v)},l.isValidPublic=function(v,L){return 64===v.length?g.publicKeyVerify(F.concat([F.from([4]),v])):!!L&&g.publicKeyVerify(v)},l.pubToAddress=l.publicToAddress=function(v,L){return v=l.toBuffer(v),L&&64!==v.length&&(v=g.publicKeyConvert(v,!1).slice(1)),m(64===v.length),l.keccak(v).slice(-20)};var W=l.privateToPublic=function(v){return v=l.toBuffer(v),g.publicKeyCreate(v,!1).slice(1)};l.importPublic=function(v){return 64!==(v=l.toBuffer(v)).length&&(v=g.publicKeyConvert(v,!1).slice(1)),v},l.ecsign=function(v,L){var N=g.sign(v,L),k={};return k.r=N.signature.slice(0,32),k.s=N.signature.slice(32,64),k.v=N.recovery+27,k},l.hashPersonalMessage=function(v){var L=l.toBuffer("\x19Ethereum Signed Message:\n"+v.length.toString());return l.keccak(F.concat([L,v]))},l.ecrecover=function(v,L,N,k){var w=F.concat([l.setLength(N,32),l.setLength(k,32)],64),A=L-27;if(0!==A&&1!==A)throw new Error("Invalid signature v value");var B=g.recover(v,w,A);return g.publicKeyConvert(B,!1).slice(1)},l.toRpcSig=function(v,L,N){if(27!==v&&28!==v)throw new Error("Invalid recovery id");return l.bufferToHex(F.concat([l.setLengthLeft(L,32),l.setLengthLeft(N,32),l.toBuffer(v-27)]))},l.fromRpcSig=function(v){if(65!==(v=l.toBuffer(v)).length)throw new Error("Invalid signature length");var L=v[64];return L<27&&(L+=27),{v:L,r:v.slice(0,32),s:v.slice(32,64)}},l.privateToAddress=function(v){return l.publicToAddress(W(v))},l.isValidAddress=function(v){return/^0x[0-9a-fA-F]{40}$/.test(v)},l.isZeroAddress=function(v){return l.zeroAddress()===l.addHexPrefix(v)},l.toChecksumAddress=function(v){v=l.stripHexPrefix(v).toLowerCase();for(var L=l.keccak(v).toString("hex"),N="0x",k=0;k=8?N+=v[k].toUpperCase():N+=v[k];return N},l.isValidChecksumAddress=function(v){return l.isValidAddress(v)&&l.toChecksumAddress(v)===v},l.generateAddress=function(v,L){return v=l.toBuffer(v),L=(L=new T(L)).isZero()?null:F.from(L.toArray()),l.rlphash([v,L]).slice(-20)},l.isPrecompiled=function(v){var L=l.unpad(v);return 1===L.length&&L[0]>=1&&L[0]<=8},l.addHexPrefix=function(v){return"string"!=typeof v||l.isHexPrefixed(v)?v:"0x"+v},l.isValidSignature=function(v,L,N,k){var w=new T("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),A=new T("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);return!(32!==L.length||32!==N.length||27!==v&&28!==v||(L=new T(L),N=new T(N),L.isZero()||L.gt(A)||N.isZero()||N.gt(A))||!1===k&&1===new T(N).cmp(w))},l.baToJSON=function(v){if(F.isBuffer(v))return"0x"+v.toString("hex");if(v instanceof Array){for(var L=[],N=0;N=J.length,"The field "+w.name+" must not have more "+w.length+" bytes")):!(w.allowZero&&0===J.length)&&w.length&&m(w.length===J.length,"The field "+w.name+" must have byte length of "+w.length),v.raw[A]=J}v._fields.push(w.name),Object.defineProperty(v,w.name,{enumerable:!0,configurable:!0,get:B,set:D}),w.default&&(v[w.name]=w.default),w.alias&&Object.defineProperty(v,w.alias,{enumerable:!1,configurable:!0,set:D,get:B})}),N)if("string"==typeof N&&(N=F.from(l.stripHexPrefix(N),"hex")),F.isBuffer(N)&&(N=E.decode(N)),Array.isArray(N)){if(N.length>v._fields.length)throw new Error("wrong number of fields in data");N.forEach(function(w,A){v[v._fields[A]]=l.toBuffer(w)})}else{if("object"!==(typeof N>"u"?"undefined":x(N)))throw new Error("invalid data");var k=Object.keys(N);L.forEach(function(w){-1!==k.indexOf(w.name)&&(v[w.name]=N[w.name]),-1!==k.indexOf(w.alias)&&(v[w.alias]=N[w.alias])})}}},98067:(V,l,M)=>{"use strict";var x=M(37712),y=M(34024),h=M(82463),p=function(n){return 32===n.length&&x.privateKeyVerify(Uint8Array.from(n))};V.exports={privateKeyVerify:p,privateKeyExport:function(n,t){if(32!==n.length)throw new RangeError("private key length is invalid");var e=y.privateKeyExport(n,t);return h.privateKeyExport(n,e,t)},privateKeyImport:function(n){if(null!==(n=h.privateKeyImport(n))&&32===n.length&&p(n))return n;throw new Error("couldn't import from DER format")},privateKeyNegate:function(n){return Buffer.from(x.privateKeyNegate(Uint8Array.from(n)))},privateKeyModInverse:function(n){if(32!==n.length)throw new Error("private key length is invalid");return Buffer.from(y.privateKeyModInverse(Uint8Array.from(n)))},privateKeyTweakAdd:function(n,t){return Buffer.from(x.privateKeyTweakAdd(Uint8Array.from(n),t))},privateKeyTweakMul:function(n,t){return Buffer.from(x.privateKeyTweakMul(Uint8Array.from(n),Uint8Array.from(t)))},publicKeyCreate:function(n,t){return Buffer.from(x.publicKeyCreate(Uint8Array.from(n),t))},publicKeyConvert:function(n,t){return Buffer.from(x.publicKeyConvert(Uint8Array.from(n),t))},publicKeyVerify:function(n){return(33===n.length||65===n.length)&&x.publicKeyVerify(Uint8Array.from(n))},publicKeyTweakAdd:function(n,t,e){return Buffer.from(x.publicKeyTweakAdd(Uint8Array.from(n),Uint8Array.from(t),e))},publicKeyTweakMul:function(n,t,e){return Buffer.from(x.publicKeyTweakMul(Uint8Array.from(n),Uint8Array.from(t),e))},publicKeyCombine:function(n,t){var e=[];return n.forEach(function(i){e.push(Uint8Array.from(i))}),Buffer.from(x.publicKeyCombine(e,t))},signatureNormalize:function(n){return Buffer.from(x.signatureNormalize(Uint8Array.from(n)))},signatureExport:function(n){return Buffer.from(x.signatureExport(Uint8Array.from(n)))},signatureImport:function(n){return Buffer.from(x.signatureImport(Uint8Array.from(n)))},signatureImportLax:function(n){if(0===n.length)throw new RangeError("signature length is invalid");var t=h.signatureImportLax(n);if(null===t)throw new Error("couldn't parse DER signature");return y.signatureImport(t)},sign:function(n,t,e){if(null===e)throw new TypeError("options should be an Object");var i=void 0;if(e){if(i={},null===e.data)throw new TypeError("options.data should be a Buffer");if(e.data){if(32!==e.data.length)throw new RangeError("options.data length is invalid");i.data=new Uint8Array(e.data)}if(null===e.noncefn)throw new TypeError("options.noncefn should be a Function");e.noncefn&&(i.noncefn=function(f,c,d,o,r){var u=null!=d?Buffer.from(d):null,z=null!=o?Buffer.from(o):null,Z=Buffer.from("");return e.noncefn&&(Z=e.noncefn(Buffer.from(f),Buffer.from(c),u,z,r)),Uint8Array.from(Z)})}var s=x.ecdsaSign(Uint8Array.from(n),Uint8Array.from(t),i);return{signature:Buffer.from(s.signature),recovery:s.recid}},verify:function(n,t,e){return x.ecdsaVerify(Uint8Array.from(t),Uint8Array.from(n),e)},recover:function(n,t,e,i){return Buffer.from(x.ecdsaRecover(Uint8Array.from(t),e,Uint8Array.from(n),i))},ecdh:function(n,t){return Buffer.from(x.ecdh(Uint8Array.from(n),Uint8Array.from(t),{}))},ecdhUnsafe:function(n,t,e){if(33!==n.length&&65!==n.length)throw new RangeError("public key length is invalid");if(32!==t.length)throw new RangeError("private key length is invalid");return Buffer.from(y.ecdhUnsafe(Uint8Array.from(n),Uint8Array.from(t),e))}}},82463:(V,l)=>{"use strict";var M=Buffer.from([48,129,211,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),x=Buffer.from([48,130,1,19,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);l.privateKeyExport=function(y,h,p){var a=Buffer.from(p?M:x);return y.copy(a,p?8:9),h.copy(a,p?181:214),a},l.privateKeyImport=function(y){var h=y.length,p=0;if(h2||h1?y[p+a-2]<<8:0);return h<(p+=a)+_||h32||ha||2!==y[_++])return null;var m=y[_++];if(128&m){if(_+(g=m-128)>a)return null;for(;g>0&&0===y[_];_+=1,g-=1);for(m=0;g>0;_+=1,g-=1)m=(m<<8)+y[_]}if(m>a-_)return null;var E=_;if(_+=m,2!==y[_++])return null;var T=y[_++];if(128&T){if(_+(g=T-128)>a)return null;for(;g>0&&0===y[_];_+=1,g-=1);for(T=0;g>0;_+=1,g-=1)T=(T<<8)+y[_]}if(T>a-_)return null;var I=_;for(_+=T;m>0&&0===y[E];m-=1,E+=1);if(m>32)return null;var F=y.slice(E,E+m);for(F.copy(h,32-F.length);T>0&&0===y[I];T-=1,I+=1);if(T>32)return null;var W=y.slice(I,I+T);return W.copy(p,32-W.length),{r:h,s:p}}},34024:(V,l,M)=>{"use strict";var x=M(52759),h=new(0,M(4913).ec)("secp256k1"),p=h.curve;l.privateKeyExport=function(_,g){var m=new x(_);if(m.ucmp(p.n)>=0)throw new Error("couldn't export to DER format");var E=h.g.mul(m);return a(E.getX(),E.getY(),g)},l.privateKeyModInverse=function(_){var g=new x(_);if(g.ucmp(p.n)>=0||g.isZero())throw new Error("private key range is invalid");return g.invm(p.n).toArrayLike(Buffer,"be",32)},l.signatureImport=function(_){var g=new x(_.r);g.ucmp(p.n)>=0&&(g=new x(0));var m=new x(_.s);return m.ucmp(p.n)>=0&&(m=new x(0)),Buffer.concat([g.toArrayLike(Buffer,"be",32),m.toArrayLike(Buffer,"be",32)])},l.ecdhUnsafe=function(_,g,m){var E=h.keyFromPublic(_),T=new x(g);if(T.ucmp(p.n)>=0||T.isZero())throw new Error("scalar was invalid (zero or overflow)");var I=E.pub.mul(T);return a(I.getX(),I.getY(),m)};var a=function(g,m,E){var T=void 0;return E?((T=Buffer.alloc(33))[0]=m.isOdd()?3:2,g.toArrayLike(Buffer,"be",32).copy(T,1)):((T=Buffer.alloc(65))[0]=4,g.toArrayLike(Buffer,"be",32).copy(T,1),m.toArrayLike(Buffer,"be",32).copy(T,33)),T}},47506:(V,l,M)=>{V.exports=M(35414)},35414:(V,l,M)=>{const x=M(88397),y=M(94202);var h=function(){};function p(k){return k.startsWith("int[")?"int256"+k.slice(3):"int"===k?"int256":k.startsWith("uint[")?"uint256"+k.slice(4):"uint"===k?"uint256":k.startsWith("fixed[")?"fixed128x128"+k.slice(5):"fixed"===k?"fixed128x128":k.startsWith("ufixed[")?"ufixed128x128"+k.slice(6):"ufixed"===k?"ufixed128x128":k}function a(k){return parseInt(/^\D+(\d+)$/.exec(k)[1],10)}function _(k){var w=/^\D+(\d+)x(\d+)$/.exec(k);return[parseInt(w[1],10),parseInt(w[2],10)]}function g(k){var w=k.match(/(.*)\[(.*?)\]$/);return w?""===w[2]?"dynamic":parseInt(w[2],10):null}function m(k){var w=typeof k;if("string"===w)return x.isHexPrefixed(k)?new y(x.stripHexPrefix(k),16):new y(k,10);if("number"===w)return new y(k);if(k.toArray)return k;throw new Error("Argument is not a number")}function E(k){var w=/^(\w+)\((.*)\)$/.exec(k);if(3!==w.length)throw new Error("Invalid method signature");var A=/^(.+)\):\((.+)$/.exec(w[2]);if(null!==A&&3===A.length)return{method:w[1],args:A[1].split(","),retargs:A[2].split(",")};var B=w[2].split(",");return 1===B.length&&""===B[0]&&(B=[]),{method:w[1],args:B}}function T(k,w){var A,B,D,J;if("address"===k)return T("uint160",m(w));if("bool"===k)return T("uint8",w?1:0);if("string"===k)return T("bytes",Buffer.from(w,"utf8"));if(v(k)){if(typeof w.length>"u")throw new Error("Not an array?");if("dynamic"!==(A=g(k))&&0!==A&&w.length>A)throw new Error("Elements exceed array size: "+A);for(J in D=[],k=k.slice(0,k.lastIndexOf("[")),"string"==typeof w&&(w=JSON.parse(w)),w)D.push(T(k,w[J]));if("dynamic"===A){var at=T("uint256",w.length);D.unshift(at)}return Buffer.concat(D)}if("bytes"===k)return w=Buffer.from(w),D=Buffer.concat([T("uint256",w.length),w]),w.length%32!=0&&(D=Buffer.concat([D,x.zeros(32-w.length%32)])),D;if(k.startsWith("bytes")){if((A=a(k))<1||A>32)throw new Error("Invalid bytes width: "+A);return x.setLengthRight(w,32)}if(k.startsWith("uint")){if((A=a(k))%8||A<8||A>256)throw new Error("Invalid uint width: "+A);if((B=m(w)).bitLength()>A)throw new Error("Supplied uint exceeds width: "+A+" vs "+B.bitLength());if(B<0)throw new Error("Supplied uint is negative");return B.toArrayLike(Buffer,"be",32)}if(k.startsWith("int")){if((A=a(k))%8||A<8||A>256)throw new Error("Invalid int width: "+A);if((B=m(w)).bitLength()>A)throw new Error("Supplied int exceeds width: "+A+" vs "+B.bitLength());return B.toTwos(256).toArrayLike(Buffer,"be",32)}if(k.startsWith("ufixed")){if(A=_(k),(B=m(w))<0)throw new Error("Supplied ufixed is negative");return T("uint256",B.mul(new y(2).pow(new y(A[1]))))}if(k.startsWith("fixed"))return A=_(k),T("int256",m(w).mul(new y(2).pow(new y(A[1]))));throw new Error("Unsupported or invalid type: "+k)}function I(k,w,A){var B,D,J,at;if("string"==typeof k&&(k=F(k)),"address"===k.name)return I(k.rawType,w,A).toArrayLike(Buffer,"be",20).toString("hex");if("bool"===k.name)return I(k.rawType,w,A).toString()===new y(1).toString();if("string"===k.name){var st=I(k.rawType,w,A);return Buffer.from(st,"utf8").toString()}if(k.isArray){for(J=[],B=k.size,"dynamic"===k.size&&(A=I("uint256",w,A).toNumber(),B=I("uint256",w,A).toNumber(),A+=32),at=0;atk.size)throw new Error("Decoded int exceeds width: "+k.size+" vs "+D.bitLength());return D}if(k.name.startsWith("int")){if((D=new y(w.slice(A,A+32),16,"be").fromTwos(256)).bitLength()>k.size)throw new Error("Decoded uint exceeds width: "+k.size+" vs "+D.bitLength());return D}if(k.name.startsWith("ufixed")){if(B=new y(2).pow(new y(k.size[1])),!(D=I("uint256",w,A)).mod(B).isZero())throw new Error("Decimals not supported yet");return D.div(B)}if(k.name.startsWith("fixed")){if(B=new y(2).pow(new y(k.size[1])),!(D=I("int256",w,A)).mod(B).isZero())throw new Error("Decimals not supported yet");return D.div(B)}throw new Error("Unsupported or invalid type: "+k.name)}function F(k){var w,A,D;if(v(k)){w=g(k);var B=k.slice(0,k.lastIndexOf("["));return B=F(B),{isArray:!0,name:k,size:w,memoryUsage:"dynamic"===w?32:B.memoryUsage*w,subArray:B}}switch(k){case"address":D="uint160";break;case"bool":D="uint8";break;case"string":D="bytes"}if(A={rawType:D,name:k,memoryUsage:32},k.startsWith("bytes")&&"bytes"!==k||k.startsWith("uint")||k.startsWith("int")?A.size=a(k):(k.startsWith("ufixed")||k.startsWith("fixed"))&&(A.size=_(k)),k.startsWith("bytes")&&"bytes"!==k&&(A.size<1||A.size>32))throw new Error("Invalid bytes width: "+A.size);if((k.startsWith("uint")||k.startsWith("int"))&&(A.size%8||A.size<8||A.size>256))throw new Error("Invalid int/uint width: "+A.size);return A}function W(k){return"string"===k||"bytes"===k||"dynamic"===g(k)}function v(k){return k.lastIndexOf("]")===k.length-1}function L(k,w){return k.startsWith("address")||k.startsWith("bytes")?"0x"+w.toString("hex"):w.toString()}function N(k){return k>="0"&&k<="9"}h.eventID=function(k,w){var A=k+"("+w.map(p).join(",")+")";return x.keccak256(Buffer.from(A))},h.methodID=function(k,w){return h.eventID(k,w).slice(0,4)},h.rawEncode=function(k,w){var A=[],B=[],D=0;k.forEach(function(U){if(v(U)){var n=g(U);D+="dynamic"!==n?32*n:32}else D+=32});for(var J=0;Jat)throw new Error("Elements exceed array size: "+at)}var st=w.map(function(n){return h.solidityHexValue(J,n,256)});return Buffer.concat(st)}if("bytes"===k)return w;if("string"===k)return Buffer.from(w,"utf8");if("bool"===k){A=A||8;var tt=Array(A/4).join("0");return Buffer.from(w?tt+"1":tt+"0","hex")}if("address"===k){var U=20;return A&&(U=A/8),x.setLengthLeft(w,U)}if(k.startsWith("bytes")){if((B=a(k))<1||B>32)throw new Error("Invalid bytes width: "+B);return x.setLengthRight(w,B)}if(k.startsWith("uint")){if((B=a(k))%8||B<8||B>256)throw new Error("Invalid uint width: "+B);if((D=m(w)).bitLength()>B)throw new Error("Supplied uint exceeds width: "+B+" vs "+D.bitLength());return A=A||B,D.toArrayLike(Buffer,"be",A/8)}if(k.startsWith("int")){if((B=a(k))%8||B<8||B>256)throw new Error("Invalid int width: "+B);if((D=m(w)).bitLength()>B)throw new Error("Supplied int exceeds width: "+B+" vs "+D.bitLength());return A=A||B,D.toTwos(B).toArrayLike(Buffer,"be",A/8)}throw new Error("Unsupported or invalid type: "+k)},h.solidityPack=function(k,w){if(k.length!==w.length)throw new Error("Number of types are not matching the values");for(var A=[],B=0;B=65&&e<=70?e-55:e>=97&&e<=102?e-87:e-48&15}function m(n,t,e){var i=g(n,e);return e-1>=t&&(i|=g(n,e-1)<<4),i}function E(n,t,e,i){for(var s=0,f=Math.min(n.length,e),c=t;c=49?d-49+10:d>=17?d-17+10:d}return s}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,i){if("number"==typeof t)return this._initNumber(t,e,i);if("object"==typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),h(e===(0|e)&&e>=2&&e<=36);var s=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(s++,this.negative=1),s=0;s-=3)this.words[f]|=(c=t[s]|t[s-1]<<8|t[s-2]<<16)<>>26-d&67108863,(d+=24)>=26&&(d-=26,f++);else if("le"===i)for(s=0,f=0;s>>26-d&67108863,(d+=24)>=26&&(d-=26,f++);return this.strip()},a.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var s=0;s=e;s-=2)d=m(t,e,s)<=18?(f-=18,this.words[c+=1]|=d>>>26):f+=8;else for(s=(t.length-e)%2==0?e+1:e;s=18?(f-=18,this.words[c+=1]|=d>>>26):f+=8;this.strip()},a.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var s=0,f=1;f<=67108863;f*=e)s++;s--,f=f/e|0;for(var c=t.length-i,d=c%s,o=Math.min(c,c-d)+i,r=0,u=i;u1&&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?""};var T=["","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"],I=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],F=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function v(n,t,e){e.negative=t.negative^n.negative;var i=n.length+t.length|0;e.length=i,i=i-1|0;var s=0|n.words[0],f=0|t.words[0],c=s*f,o=c/67108864|0;e.words[0]=67108863&c;for(var r=1;r>>26,z=67108863&o,Z=Math.min(r,t.length-1),G=Math.max(0,r-n.length+1);G<=Z;G++)u+=(c=(s=0|n.words[r-G|0])*(f=0|t.words[G])+z)/67108864|0,z=67108863&c;e.words[r]=0|z,o=0|u}return 0!==o?e.words[r]=0|o:e.length--,e.strip()}a.prototype.toString=function(t,e){var i;if(e=0|e||1,16===(t=t||10)||"hex"===t){i="";for(var s=0,f=0,c=0;c>>24-s&16777215)||c!==this.length-1?T[6-o.length]+o+i:o+i,(s+=2)>=26&&(s-=26,c--)}for(0!==f&&(i=f.toString(16)+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var r=I[t],u=F[t];i="";var z=this.clone();for(z.negative=0;!z.isZero();){var Z=z.modn(u).toString(t);i=(z=z.idivn(u)).isZero()?Z+i:T[r-Z.length]+Z+i}for(this.isZero()&&(i="0"+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}h(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&h(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return h(typeof _<"u"),this.toArrayLike(_,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,i){var s=this.byteLength(),f=i||Math.max(1,s);h(s<=f,"byte array longer than desired length"),h(f>0,"Requested array length <= 0"),this.strip();var o,r,c="le"===e,d=new t(f),u=this.clone();if(c){for(r=0;!u.isZero();r++)o=u.andln(255),u.iushrn(8),d[r]=o;for(;r=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0==(8191&e)&&(i+=13,e>>>=13),0==(127&e)&&(i+=7,e>>>=7),0==(15&e)&&(i+=4,e>>>=4),0==(3&e)&&(i+=2,e>>>=2),0==(1&e)&&i++,i},a.prototype.bitLength=function(){var e=this._countBits(this.words[this.length-1]);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var i=0;it.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var s=0;st.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){h("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var s=0;s0&&(this.words[s]=~this.words[s]&67108863>>26-i),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){h("number"==typeof t&&t>=0);var i=t/26|0,s=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<t.length?(i=this,s=t):(i=t,s=this);for(var f=0,c=0;c>>26;for(;0!==f&&c>>26;if(this.length=i.length,0!==f)this.words[this.length]=f,this.length++;else if(i!==this)for(;ct.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var s,f,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(s=this,f=t):(s=t,f=this);for(var c=0,d=0;d>26,this.words[d]=67108863&e;for(;0!==c&&d>26,this.words[d]=67108863&e;if(0===c&&d>>13,Q=0|s[1],et=8191&Q,ht=Q>>>13,Ot=0|s[2],ut=8191&Ot,yt=Ot>>>13,Qt=0|s[3],vt=8191&Qt,At=Qt>>>13,Xt=0|s[4],_t=8191&Xt,Nt=Xt>>>13,O=0|s[5],b=8191&O,S=O>>>13,q=0|s[6],j=8191&q,Y=q>>>13,nt=0|s[7],it=8191&nt,lt=nt>>>13,Gt=0|s[8],ct=8191&Gt,dt=Gt>>>13,jt=0|s[9],xt=8191&jt,Pt=jt>>>13,fe=0|f[0],pt=8191&fe,Lt=fe>>>13,re=0|f[1],bt=8191&re,Ct=re>>>13,te=0|f[2],wt=8191&te,Ut=te>>>13,ie=0|f[3],gt=8191&ie,Ft=ie>>>13,de=0|f[4],Tt=8191&de,Ht=de>>>13,oe=0|f[5],Et=8191&oe,Kt=oe>>>13,ve=0|f[6],St=8191&ve,Dt=ve>>>13,he=0|f[7],kt=8191&he,Zt=he>>>13,me=0|f[8],Bt=8191&me,Wt=me>>>13,pe=0|f[9],Rt=8191&pe,zt=pe>>>13;i.negative=t.negative^e.negative,i.length=19;var _e=(d+(o=Math.imul(Z,pt))|0)+((8191&(r=(r=Math.imul(Z,Lt))+Math.imul(G,pt)|0))<<13)|0;d=((u=Math.imul(G,Lt))+(r>>>13)|0)+(_e>>>26)|0,_e&=67108863,o=Math.imul(et,pt),r=(r=Math.imul(et,Lt))+Math.imul(ht,pt)|0,u=Math.imul(ht,Lt);var H=(d+(o=o+Math.imul(Z,bt)|0)|0)+((8191&(r=(r=r+Math.imul(Z,Ct)|0)+Math.imul(G,bt)|0))<<13)|0;d=((u=u+Math.imul(G,Ct)|0)+(r>>>13)|0)+(H>>>26)|0,H&=67108863,o=Math.imul(ut,pt),r=(r=Math.imul(ut,Lt))+Math.imul(yt,pt)|0,u=Math.imul(yt,Lt),o=o+Math.imul(et,bt)|0,r=(r=r+Math.imul(et,Ct)|0)+Math.imul(ht,bt)|0,u=u+Math.imul(ht,Ct)|0;var K=(d+(o=o+Math.imul(Z,wt)|0)|0)+((8191&(r=(r=r+Math.imul(Z,Ut)|0)+Math.imul(G,wt)|0))<<13)|0;d=((u=u+Math.imul(G,Ut)|0)+(r>>>13)|0)+(K>>>26)|0,K&=67108863,o=Math.imul(vt,pt),r=(r=Math.imul(vt,Lt))+Math.imul(At,pt)|0,u=Math.imul(At,Lt),o=o+Math.imul(ut,bt)|0,r=(r=r+Math.imul(ut,Ct)|0)+Math.imul(yt,bt)|0,u=u+Math.imul(yt,Ct)|0,o=o+Math.imul(et,wt)|0,r=(r=r+Math.imul(et,Ut)|0)+Math.imul(ht,wt)|0,u=u+Math.imul(ht,Ut)|0;var $=(d+(o=o+Math.imul(Z,gt)|0)|0)+((8191&(r=(r=r+Math.imul(Z,Ft)|0)+Math.imul(G,gt)|0))<<13)|0;d=((u=u+Math.imul(G,Ft)|0)+(r>>>13)|0)+($>>>26)|0,$&=67108863,o=Math.imul(_t,pt),r=(r=Math.imul(_t,Lt))+Math.imul(Nt,pt)|0,u=Math.imul(Nt,Lt),o=o+Math.imul(vt,bt)|0,r=(r=r+Math.imul(vt,Ct)|0)+Math.imul(At,bt)|0,u=u+Math.imul(At,Ct)|0,o=o+Math.imul(ut,wt)|0,r=(r=r+Math.imul(ut,Ut)|0)+Math.imul(yt,wt)|0,u=u+Math.imul(yt,Ut)|0,o=o+Math.imul(et,gt)|0,r=(r=r+Math.imul(et,Ft)|0)+Math.imul(ht,gt)|0,u=u+Math.imul(ht,Ft)|0;var ot=(d+(o=o+Math.imul(Z,Tt)|0)|0)+((8191&(r=(r=r+Math.imul(Z,Ht)|0)+Math.imul(G,Tt)|0))<<13)|0;d=((u=u+Math.imul(G,Ht)|0)+(r>>>13)|0)+(ot>>>26)|0,ot&=67108863,o=Math.imul(b,pt),r=(r=Math.imul(b,Lt))+Math.imul(S,pt)|0,u=Math.imul(S,Lt),o=o+Math.imul(_t,bt)|0,r=(r=r+Math.imul(_t,Ct)|0)+Math.imul(Nt,bt)|0,u=u+Math.imul(Nt,Ct)|0,o=o+Math.imul(vt,wt)|0,r=(r=r+Math.imul(vt,Ut)|0)+Math.imul(At,wt)|0,u=u+Math.imul(At,Ut)|0,o=o+Math.imul(ut,gt)|0,r=(r=r+Math.imul(ut,Ft)|0)+Math.imul(yt,gt)|0,u=u+Math.imul(yt,Ft)|0,o=o+Math.imul(et,Tt)|0,r=(r=r+Math.imul(et,Ht)|0)+Math.imul(ht,Tt)|0,u=u+Math.imul(ht,Ht)|0;var It=(d+(o=o+Math.imul(Z,Et)|0)|0)+((8191&(r=(r=r+Math.imul(Z,Kt)|0)+Math.imul(G,Et)|0))<<13)|0;d=((u=u+Math.imul(G,Kt)|0)+(r>>>13)|0)+(It>>>26)|0,It&=67108863,o=Math.imul(j,pt),r=(r=Math.imul(j,Lt))+Math.imul(Y,pt)|0,u=Math.imul(Y,Lt),o=o+Math.imul(b,bt)|0,r=(r=r+Math.imul(b,Ct)|0)+Math.imul(S,bt)|0,u=u+Math.imul(S,Ct)|0,o=o+Math.imul(_t,wt)|0,r=(r=r+Math.imul(_t,Ut)|0)+Math.imul(Nt,wt)|0,u=u+Math.imul(Nt,Ut)|0,o=o+Math.imul(vt,gt)|0,r=(r=r+Math.imul(vt,Ft)|0)+Math.imul(At,gt)|0,u=u+Math.imul(At,Ft)|0,o=o+Math.imul(ut,Tt)|0,r=(r=r+Math.imul(ut,Ht)|0)+Math.imul(yt,Tt)|0,u=u+Math.imul(yt,Ht)|0,o=o+Math.imul(et,Et)|0,r=(r=r+Math.imul(et,Kt)|0)+Math.imul(ht,Et)|0,u=u+Math.imul(ht,Kt)|0;var mt=(d+(o=o+Math.imul(Z,St)|0)|0)+((8191&(r=(r=r+Math.imul(Z,Dt)|0)+Math.imul(G,St)|0))<<13)|0;d=((u=u+Math.imul(G,Dt)|0)+(r>>>13)|0)+(mt>>>26)|0,mt&=67108863,o=Math.imul(it,pt),r=(r=Math.imul(it,Lt))+Math.imul(lt,pt)|0,u=Math.imul(lt,Lt),o=o+Math.imul(j,bt)|0,r=(r=r+Math.imul(j,Ct)|0)+Math.imul(Y,bt)|0,u=u+Math.imul(Y,Ct)|0,o=o+Math.imul(b,wt)|0,r=(r=r+Math.imul(b,Ut)|0)+Math.imul(S,wt)|0,u=u+Math.imul(S,Ut)|0,o=o+Math.imul(_t,gt)|0,r=(r=r+Math.imul(_t,Ft)|0)+Math.imul(Nt,gt)|0,u=u+Math.imul(Nt,Ft)|0,o=o+Math.imul(vt,Tt)|0,r=(r=r+Math.imul(vt,Ht)|0)+Math.imul(At,Tt)|0,u=u+Math.imul(At,Ht)|0,o=o+Math.imul(ut,Et)|0,r=(r=r+Math.imul(ut,Kt)|0)+Math.imul(yt,Et)|0,u=u+Math.imul(yt,Kt)|0,o=o+Math.imul(et,St)|0,r=(r=r+Math.imul(et,Dt)|0)+Math.imul(ht,St)|0,u=u+Math.imul(ht,Dt)|0;var $t=(d+(o=o+Math.imul(Z,kt)|0)|0)+((8191&(r=(r=r+Math.imul(Z,Zt)|0)+Math.imul(G,kt)|0))<<13)|0;d=((u=u+Math.imul(G,Zt)|0)+(r>>>13)|0)+($t>>>26)|0,$t&=67108863,o=Math.imul(ct,pt),r=(r=Math.imul(ct,Lt))+Math.imul(dt,pt)|0,u=Math.imul(dt,Lt),o=o+Math.imul(it,bt)|0,r=(r=r+Math.imul(it,Ct)|0)+Math.imul(lt,bt)|0,u=u+Math.imul(lt,Ct)|0,o=o+Math.imul(j,wt)|0,r=(r=r+Math.imul(j,Ut)|0)+Math.imul(Y,wt)|0,u=u+Math.imul(Y,Ut)|0,o=o+Math.imul(b,gt)|0,r=(r=r+Math.imul(b,Ft)|0)+Math.imul(S,gt)|0,u=u+Math.imul(S,Ft)|0,o=o+Math.imul(_t,Tt)|0,r=(r=r+Math.imul(_t,Ht)|0)+Math.imul(Nt,Tt)|0,u=u+Math.imul(Nt,Ht)|0,o=o+Math.imul(vt,Et)|0,r=(r=r+Math.imul(vt,Kt)|0)+Math.imul(At,Et)|0,u=u+Math.imul(At,Kt)|0,o=o+Math.imul(ut,St)|0,r=(r=r+Math.imul(ut,Dt)|0)+Math.imul(yt,St)|0,u=u+Math.imul(yt,Dt)|0,o=o+Math.imul(et,kt)|0,r=(r=r+Math.imul(et,Zt)|0)+Math.imul(ht,kt)|0,u=u+Math.imul(ht,Zt)|0;var Jt=(d+(o=o+Math.imul(Z,Bt)|0)|0)+((8191&(r=(r=r+Math.imul(Z,Wt)|0)+Math.imul(G,Bt)|0))<<13)|0;d=((u=u+Math.imul(G,Wt)|0)+(r>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,o=Math.imul(xt,pt),r=(r=Math.imul(xt,Lt))+Math.imul(Pt,pt)|0,u=Math.imul(Pt,Lt),o=o+Math.imul(ct,bt)|0,r=(r=r+Math.imul(ct,Ct)|0)+Math.imul(dt,bt)|0,u=u+Math.imul(dt,Ct)|0,o=o+Math.imul(it,wt)|0,r=(r=r+Math.imul(it,Ut)|0)+Math.imul(lt,wt)|0,u=u+Math.imul(lt,Ut)|0,o=o+Math.imul(j,gt)|0,r=(r=r+Math.imul(j,Ft)|0)+Math.imul(Y,gt)|0,u=u+Math.imul(Y,Ft)|0,o=o+Math.imul(b,Tt)|0,r=(r=r+Math.imul(b,Ht)|0)+Math.imul(S,Tt)|0,u=u+Math.imul(S,Ht)|0,o=o+Math.imul(_t,Et)|0,r=(r=r+Math.imul(_t,Kt)|0)+Math.imul(Nt,Et)|0,u=u+Math.imul(Nt,Kt)|0,o=o+Math.imul(vt,St)|0,r=(r=r+Math.imul(vt,Dt)|0)+Math.imul(At,St)|0,u=u+Math.imul(At,Dt)|0,o=o+Math.imul(ut,kt)|0,r=(r=r+Math.imul(ut,Zt)|0)+Math.imul(yt,kt)|0,u=u+Math.imul(yt,Zt)|0,o=o+Math.imul(et,Bt)|0,r=(r=r+Math.imul(et,Wt)|0)+Math.imul(ht,Bt)|0,u=u+Math.imul(ht,Wt)|0;var Yt=(d+(o=o+Math.imul(Z,Rt)|0)|0)+((8191&(r=(r=r+Math.imul(Z,zt)|0)+Math.imul(G,Rt)|0))<<13)|0;d=((u=u+Math.imul(G,zt)|0)+(r>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,o=Math.imul(xt,bt),r=(r=Math.imul(xt,Ct))+Math.imul(Pt,bt)|0,u=Math.imul(Pt,Ct),o=o+Math.imul(ct,wt)|0,r=(r=r+Math.imul(ct,Ut)|0)+Math.imul(dt,wt)|0,u=u+Math.imul(dt,Ut)|0,o=o+Math.imul(it,gt)|0,r=(r=r+Math.imul(it,Ft)|0)+Math.imul(lt,gt)|0,u=u+Math.imul(lt,Ft)|0,o=o+Math.imul(j,Tt)|0,r=(r=r+Math.imul(j,Ht)|0)+Math.imul(Y,Tt)|0,u=u+Math.imul(Y,Ht)|0,o=o+Math.imul(b,Et)|0,r=(r=r+Math.imul(b,Kt)|0)+Math.imul(S,Et)|0,u=u+Math.imul(S,Kt)|0,o=o+Math.imul(_t,St)|0,r=(r=r+Math.imul(_t,Dt)|0)+Math.imul(Nt,St)|0,u=u+Math.imul(Nt,Dt)|0,o=o+Math.imul(vt,kt)|0,r=(r=r+Math.imul(vt,Zt)|0)+Math.imul(At,kt)|0,u=u+Math.imul(At,Zt)|0,o=o+Math.imul(ut,Bt)|0,r=(r=r+Math.imul(ut,Wt)|0)+Math.imul(yt,Bt)|0,u=u+Math.imul(yt,Wt)|0;var Vt=(d+(o=o+Math.imul(et,Rt)|0)|0)+((8191&(r=(r=r+Math.imul(et,zt)|0)+Math.imul(ht,Rt)|0))<<13)|0;d=((u=u+Math.imul(ht,zt)|0)+(r>>>13)|0)+(Vt>>>26)|0,Vt&=67108863,o=Math.imul(xt,wt),r=(r=Math.imul(xt,Ut))+Math.imul(Pt,wt)|0,u=Math.imul(Pt,Ut),o=o+Math.imul(ct,gt)|0,r=(r=r+Math.imul(ct,Ft)|0)+Math.imul(dt,gt)|0,u=u+Math.imul(dt,Ft)|0,o=o+Math.imul(it,Tt)|0,r=(r=r+Math.imul(it,Ht)|0)+Math.imul(lt,Tt)|0,u=u+Math.imul(lt,Ht)|0,o=o+Math.imul(j,Et)|0,r=(r=r+Math.imul(j,Kt)|0)+Math.imul(Y,Et)|0,u=u+Math.imul(Y,Kt)|0,o=o+Math.imul(b,St)|0,r=(r=r+Math.imul(b,Dt)|0)+Math.imul(S,St)|0,u=u+Math.imul(S,Dt)|0,o=o+Math.imul(_t,kt)|0,r=(r=r+Math.imul(_t,Zt)|0)+Math.imul(Nt,kt)|0,u=u+Math.imul(Nt,Zt)|0,o=o+Math.imul(vt,Bt)|0,r=(r=r+Math.imul(vt,Wt)|0)+Math.imul(At,Bt)|0,u=u+Math.imul(At,Wt)|0;var Mt=(d+(o=o+Math.imul(ut,Rt)|0)|0)+((8191&(r=(r=r+Math.imul(ut,zt)|0)+Math.imul(yt,Rt)|0))<<13)|0;d=((u=u+Math.imul(yt,zt)|0)+(r>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,o=Math.imul(xt,gt),r=(r=Math.imul(xt,Ft))+Math.imul(Pt,gt)|0,u=Math.imul(Pt,Ft),o=o+Math.imul(ct,Tt)|0,r=(r=r+Math.imul(ct,Ht)|0)+Math.imul(dt,Tt)|0,u=u+Math.imul(dt,Ht)|0,o=o+Math.imul(it,Et)|0,r=(r=r+Math.imul(it,Kt)|0)+Math.imul(lt,Et)|0,u=u+Math.imul(lt,Kt)|0,o=o+Math.imul(j,St)|0,r=(r=r+Math.imul(j,Dt)|0)+Math.imul(Y,St)|0,u=u+Math.imul(Y,Dt)|0,o=o+Math.imul(b,kt)|0,r=(r=r+Math.imul(b,Zt)|0)+Math.imul(S,kt)|0,u=u+Math.imul(S,Zt)|0,o=o+Math.imul(_t,Bt)|0,r=(r=r+Math.imul(_t,Wt)|0)+Math.imul(Nt,Bt)|0,u=u+Math.imul(Nt,Wt)|0;var ee=(d+(o=o+Math.imul(vt,Rt)|0)|0)+((8191&(r=(r=r+Math.imul(vt,zt)|0)+Math.imul(At,Rt)|0))<<13)|0;d=((u=u+Math.imul(At,zt)|0)+(r>>>13)|0)+(ee>>>26)|0,ee&=67108863,o=Math.imul(xt,Tt),r=(r=Math.imul(xt,Ht))+Math.imul(Pt,Tt)|0,u=Math.imul(Pt,Ht),o=o+Math.imul(ct,Et)|0,r=(r=r+Math.imul(ct,Kt)|0)+Math.imul(dt,Et)|0,u=u+Math.imul(dt,Kt)|0,o=o+Math.imul(it,St)|0,r=(r=r+Math.imul(it,Dt)|0)+Math.imul(lt,St)|0,u=u+Math.imul(lt,Dt)|0,o=o+Math.imul(j,kt)|0,r=(r=r+Math.imul(j,Zt)|0)+Math.imul(Y,kt)|0,u=u+Math.imul(Y,Zt)|0,o=o+Math.imul(b,Bt)|0,r=(r=r+Math.imul(b,Wt)|0)+Math.imul(S,Bt)|0,u=u+Math.imul(S,Wt)|0;var ae=(d+(o=o+Math.imul(_t,Rt)|0)|0)+((8191&(r=(r=r+Math.imul(_t,zt)|0)+Math.imul(Nt,Rt)|0))<<13)|0;d=((u=u+Math.imul(Nt,zt)|0)+(r>>>13)|0)+(ae>>>26)|0,ae&=67108863,o=Math.imul(xt,Et),r=(r=Math.imul(xt,Kt))+Math.imul(Pt,Et)|0,u=Math.imul(Pt,Kt),o=o+Math.imul(ct,St)|0,r=(r=r+Math.imul(ct,Dt)|0)+Math.imul(dt,St)|0,u=u+Math.imul(dt,Dt)|0,o=o+Math.imul(it,kt)|0,r=(r=r+Math.imul(it,Zt)|0)+Math.imul(lt,kt)|0,u=u+Math.imul(lt,Zt)|0,o=o+Math.imul(j,Bt)|0,r=(r=r+Math.imul(j,Wt)|0)+Math.imul(Y,Bt)|0,u=u+Math.imul(Y,Wt)|0;var ce=(d+(o=o+Math.imul(b,Rt)|0)|0)+((8191&(r=(r=r+Math.imul(b,zt)|0)+Math.imul(S,Rt)|0))<<13)|0;d=((u=u+Math.imul(S,zt)|0)+(r>>>13)|0)+(ce>>>26)|0,ce&=67108863,o=Math.imul(xt,St),r=(r=Math.imul(xt,Dt))+Math.imul(Pt,St)|0,u=Math.imul(Pt,Dt),o=o+Math.imul(ct,kt)|0,r=(r=r+Math.imul(ct,Zt)|0)+Math.imul(dt,kt)|0,u=u+Math.imul(dt,Zt)|0,o=o+Math.imul(it,Bt)|0,r=(r=r+Math.imul(it,Wt)|0)+Math.imul(lt,Bt)|0,u=u+Math.imul(lt,Wt)|0;var le=(d+(o=o+Math.imul(j,Rt)|0)|0)+((8191&(r=(r=r+Math.imul(j,zt)|0)+Math.imul(Y,Rt)|0))<<13)|0;d=((u=u+Math.imul(Y,zt)|0)+(r>>>13)|0)+(le>>>26)|0,le&=67108863,o=Math.imul(xt,kt),r=(r=Math.imul(xt,Zt))+Math.imul(Pt,kt)|0,u=Math.imul(Pt,Zt),o=o+Math.imul(ct,Bt)|0,r=(r=r+Math.imul(ct,Wt)|0)+Math.imul(dt,Bt)|0,u=u+Math.imul(dt,Wt)|0;var ge=(d+(o=o+Math.imul(it,Rt)|0)|0)+((8191&(r=(r=r+Math.imul(it,zt)|0)+Math.imul(lt,Rt)|0))<<13)|0;d=((u=u+Math.imul(lt,zt)|0)+(r>>>13)|0)+(ge>>>26)|0,ge&=67108863,o=Math.imul(xt,Bt),r=(r=Math.imul(xt,Wt))+Math.imul(Pt,Bt)|0,u=Math.imul(Pt,Wt);var ue=(d+(o=o+Math.imul(ct,Rt)|0)|0)+((8191&(r=(r=r+Math.imul(ct,zt)|0)+Math.imul(dt,Rt)|0))<<13)|0;d=((u=u+Math.imul(dt,zt)|0)+(r>>>13)|0)+(ue>>>26)|0,ue&=67108863;var xe=(d+(o=Math.imul(xt,Rt))|0)+((8191&(r=(r=Math.imul(xt,zt))+Math.imul(Pt,Rt)|0))<<13)|0;return d=((u=Math.imul(Pt,zt))+(r>>>13)|0)+(xe>>>26)|0,xe&=67108863,c[0]=_e,c[1]=H,c[2]=K,c[3]=$,c[4]=ot,c[5]=It,c[6]=mt,c[7]=$t,c[8]=Jt,c[9]=Yt,c[10]=Vt,c[11]=Mt,c[12]=ee,c[13]=ae,c[14]=ce,c[15]=le,c[16]=ge,c[17]=ue,c[18]=xe,0!==d&&(c[19]=d,i.length++),i};function k(n,t,e){return(new w).mulp(n,t,e)}function w(n,t){this.x=n,this.y=t}Math.imul||(L=v),a.prototype.mulTo=function(t,e){var i,s=this.length+t.length;return i=10===this.length&&10===t.length?L(this,t,e):s<63?v(this,t,e):s<1024?function N(n,t,e){e.negative=t.negative^n.negative,e.length=n.length+t.length;for(var i=0,s=0,f=0;f>>26)|0)>>>26,c&=67108863}e.words[f]=d,i=c,c=s}return 0!==i?e.words[f]=i:e.length--,e.strip()}(this,t,e):k(this,t,e),i},w.prototype.makeRBT=function(t){for(var e=new Array(t),i=a.prototype._countBits(t)-1,s=0;s>=1;return s},w.prototype.permute=function(t,e,i,s,f,c){for(var d=0;d>>=1)f++;return 1<>>=13),f>>>=13;for(c=2*e;c>=26,e+=s/67108864|0,e+=f>>>26,this.words[i]=67108863&f}return 0!==e&&(this.words[i]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function W(n){for(var t=new Array(n.bitLength()),e=0;e>>s}return t}(t);if(0===e.length)return new a(1);for(var i=this,s=0;s=0);var f,e=t%26,i=(t-e)/26,s=67108863>>>26-e<<26-e;if(0!==e){var c=0;for(f=0;f>>26-e}c&&(this.words[f]=c,this.length++)}if(0!==i){for(f=this.length-1;f>=0;f--)this.words[f+i]=this.words[f];for(f=0;f=0),s=e?(e-e%26)/26:0;var f=t%26,c=Math.min((t-f)/26,this.length),d=67108863^67108863>>>f<c)for(this.length-=c,r=0;r=0&&(0!==u||r>=s);r--){var z=0|this.words[r];this.words[r]=u<<26-f|z>>>f,u=z&d}return o&&0!==u&&(o.words[o.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,i){return h(0===this.negative),this.iushrn(t,e,i)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){h("number"==typeof t&&t>=0);var e=t%26,i=(t-e)/26;return!(this.length<=i||!(this.words[i]&1<=0);var e=t%26,i=(t-e)/26;return h(0===this.negative,"imaskn works only with positive numbers"),this.length<=i?this:(0!==e&&i++,this.length=Math.min(i,this.length),0!==e&&(this.words[this.length-1]&=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(h("number"==typeof t),h(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(o/67108864|0),this.words[f+i]=67108863&c}for(;f>26,this.words[f+i]=67108863&c;if(0===d)return this.strip();for(h(-1===d),d=0,f=0;f>26,this.words[f]=67108863&c;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var i,s=this.clone(),f=t,c=0|f.words[f.length-1];0!=(i=26-this._countBits(c))&&(f=f.ushln(i),s.iushln(i),c=0|f.words[f.length-1]);var r,o=s.length-f.length;if("mod"!==e){(r=new a(null)).length=o+1,r.words=new Array(r.length);for(var u=0;u=0;Z--){var G=67108864*(0|s.words[f.length+Z])+(0|s.words[f.length+Z-1]);for(G=Math.min(G/c|0,67108863),s._ishlnsubmul(f,G,Z);0!==s.negative;)G--,s.negative=0,s._ishlnsubmul(f,1,Z),s.isZero()||(s.negative^=1);r&&(r.words[Z]=G)}return r&&r.strip(),s.strip(),"div"!==e&&0!==i&&s.iushrn(i),{div:r||null,mod:s}},a.prototype.divmod=function(t,e,i){return h(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(c=this.neg().divmod(t,e),"mod"!==e&&(s=c.div.neg()),"div"!==e&&(f=c.mod.neg(),i&&0!==f.negative&&f.iadd(t)),{div:s,mod:f}):0===this.negative&&0!==t.negative?(c=this.divmod(t.neg(),e),"mod"!==e&&(s=c.div.neg()),{div:s,mod:c.mod}):0!=(this.negative&t.negative)?(c=this.neg().divmod(t.neg(),e),"div"!==e&&(f=c.mod.neg(),i&&0!==f.negative&&f.isub(t)),{div:c.div,mod:f}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var s,f,c},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,s=t.ushrn(1),f=t.andln(1),c=i.cmp(s);return c<0||1===f&&0===c?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){h(t<=67108863);for(var e=(1<<26)%t,i=0,s=this.length-1;s>=0;s--)i=(e*i+(0|this.words[s]))%t;return i},a.prototype.idivn=function(t){h(t<=67108863);for(var e=0,i=this.length-1;i>=0;i--){var s=(0|this.words[i])+67108864*e;this.words[i]=s/t|0,e=s%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){h(0===t.negative),h(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var s=new a(1),f=new a(0),c=new a(0),d=new a(1),o=0;e.isEven()&&i.isEven();)e.iushrn(1),i.iushrn(1),++o;for(var r=i.clone(),u=e.clone();!e.isZero();){for(var z=0,Z=1;0==(e.words[0]&Z)&&z<26;++z,Z<<=1);if(z>0)for(e.iushrn(z);z-- >0;)(s.isOdd()||f.isOdd())&&(s.iadd(r),f.isub(u)),s.iushrn(1),f.iushrn(1);for(var G=0,Q=1;0==(i.words[0]&Q)&&G<26;++G,Q<<=1);if(G>0)for(i.iushrn(G);G-- >0;)(c.isOdd()||d.isOdd())&&(c.iadd(r),d.isub(u)),c.iushrn(1),d.iushrn(1);e.cmp(i)>=0?(e.isub(i),s.isub(c),f.isub(d)):(i.isub(e),c.isub(s),d.isub(f))}return{a:c,b:d,gcd:i.iushln(o)}},a.prototype._invmp=function(t){h(0===t.negative),h(!t.isZero());var z,e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var s=new a(1),f=new a(0),c=i.clone();e.cmpn(1)>0&&i.cmpn(1)>0;){for(var d=0,o=1;0==(e.words[0]&o)&&d<26;++d,o<<=1);if(d>0)for(e.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);for(var r=0,u=1;0==(i.words[0]&u)&&r<26;++r,u<<=1);if(r>0)for(i.iushrn(r);r-- >0;)f.isOdd()&&f.iadd(c),f.iushrn(1);e.cmp(i)>=0?(e.isub(i),s.isub(f)):(i.isub(e),f.isub(s))}return(z=0===e.cmpn(1)?s:f).cmpn(0)<0&&z.iadd(t),z},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var s=0;e.isEven()&&i.isEven();s++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var f=e.cmp(i);if(f<0){var c=e;e=i,i=c}else if(0===f||0===i.cmpn(1))break;e.isub(i)}return i.iushln(s)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){h("number"==typeof t);var e=t%26,i=(t-e)/26,s=1<>>26,this.words[c]=d&=67108863}return 0!==f&&(this.words[c]=f,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var i,e=t<0;if(0!==this.negative&&!e)return-1;if(0===this.negative&&e)return 1;if(this.strip(),this.length>1)i=1;else{e&&(t=-t),h(t<=67108863,"Number is too big");var s=0|this.words[0];i=s===t?0:st.length)return 1;if(this.length=0;i--){var s=0|this.words[i],f=0|t.words[i];if(s!==f){sf&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new tt(t)},a.prototype.toRed=function(t){return h(!this.red,"Already a number in reduction context"),h(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return h(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return h(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return h(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return h(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return h(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return h(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return h(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return h(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return h(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return h(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return h(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return h(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return h(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return h(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return h(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var A={k256:null,p224:null,p192:null,p25519:null};function B(n,t){this.name=n,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 D(){B.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function J(){B.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function at(){B.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function st(){B.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function tt(n){if("string"==typeof n){var t=a._prime(n);this.m=t.p,this.prime=t}else h(n.gtn(1),"modulus must be greater than 1"),this.m=n,this.prime=null}function U(n){tt.call(this,n),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 t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},B.prototype.ireduce=function(t){var i,e=t;do{this.split(e,this.tmp),i=(e=(e=this.imulK(e)).iadd(this.tmp)).bitLength()}while(i>this.n);var s=i0?e.isub(this.p):void 0!==e.strip?e.strip():e._strip(),e},B.prototype.split=function(t,e){t.iushrn(this.n,0,e)},B.prototype.imulK=function(t){return t.imul(this.k)},p(D,B),D.prototype.split=function(t,e){for(var i=4194303,s=Math.min(t.length,9),f=0;f>>22,c=d}t.words[f-10]=c>>>=22,t.length-=0===c&&t.length>10?10:9},D.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i>>=26,t.words[i]=f,e=s}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(A[t])return A[t];var e;if("k256"===t)e=new D;else if("p224"===t)e=new J;else if("p192"===t)e=new at;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new st}return A[t]=e,e},tt.prototype._verify1=function(t){h(0===t.negative,"red works only with positives"),h(t.red,"red works only with red numbers")},tt.prototype._verify2=function(t,e){h(0==(t.negative|e.negative),"red works only with positives"),h(t.red&&t.red===e.red,"red works only with red numbers")},tt.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},tt.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},tt.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},tt.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},tt.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},tt.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},tt.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},tt.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},tt.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},tt.prototype.isqr=function(t){return this.imul(t,t.clone())},tt.prototype.sqr=function(t){return this.mul(t,t)},tt.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(h(e%2==1),3===e){var i=this.m.add(new a(1)).iushrn(2);return this.pow(t,i)}for(var s=this.m.subn(1),f=0;!s.isZero()&&0===s.andln(1);)f++,s.iushrn(1);h(!s.isZero());var c=new a(1).toRed(this),d=c.redNeg(),o=this.m.subn(1).iushrn(1),r=this.m.bitLength();for(r=new a(2*r*r).toRed(this);0!==this.pow(r,o).cmp(d);)r.redIAdd(d);for(var u=this.pow(r,s),z=this.pow(t,s.addn(1).iushrn(1)),Z=this.pow(t,s),G=f;0!==Z.cmp(c);){for(var Q=Z,et=0;0!==Q.cmp(c);et++)Q=Q.redSqr();h(et=0;f--){for(var u=e.words[f],z=r-1;z>=0;z--){var Z=u>>z&1;c!==s[0]&&(c=this.sqr(c)),0!==Z||0!==d?(d<<=1,d|=Z,(4==++o||0===f&&0===z)&&(c=this.mul(c,s[d]),o=0,d=0)):o=0}r=26}return c},tt.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},tt.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new U(t)},p(U,tt),U.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},U.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},U.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),s=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=i.isub(s).iushrn(this.shift),c=f;return f.cmp(this.m)>=0?c=f.isub(this.m):f.cmpn(0)<0&&(c=f.iadd(this.m)),c._forceRed(this)},U.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var i=t.mul(e),s=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=i.isub(s).iushrn(this.shift),c=f;return f.cmp(this.m)>=0?c=f.isub(this.m):f.cmpn(0)<0&&(c=f.iadd(this.m)),c._forceRed(this)},U.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(V=M.nmd(V),this)},42977:(V,l,M)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.importPublic=l.privateToPublic=l.privateToAddress=l.publicToAddress=l.pubToAddress=l.isValidPublic=l.isValidPrivate=l.isPrecompiled=l.generateAddress2=l.generateAddress=l.isValidChecksumAddress=l.toChecksumAddress=l.isZeroAddress=l.isValidAddress=l.zeroAddress=void 0;var x=M(80469),y=M(44780),h=M(90008),p=M(94202),a=M(52308),_=M(57313);l.zeroAddress=function(){var m=a.zeros(20);return a.bufferToHex(m)},l.isValidAddress=function(g){return/^0x[0-9a-fA-F]{40}$/.test(g)},l.isZeroAddress=function(g){return l.zeroAddress()===a.addHexPrefix(g)},l.toChecksumAddress=function(g,m){g=y.stripHexPrefix(g).toLowerCase();for(var E=void 0!==m?m.toString()+"0x":"",T=_.keccak(E+g).toString("hex"),I="0x",F=0;F=8?I+=g[F].toUpperCase():I+=g[F];return I},l.isValidChecksumAddress=function(g,m){return l.isValidAddress(g)&&l.toChecksumAddress(g,m)===g},l.generateAddress=function(g,m){g=a.toBuffer(g);var E=new p(m);return E.isZero()?_.rlphash([g,null]).slice(-20):_.rlphash([g,Buffer.from(E.toArray())]).slice(-20)},l.generateAddress2=function(g,m,E){var T=a.toBuffer(g),I=a.toBuffer(m),F=a.toBuffer(E);return x(20===T.length),x(32===I.length),_.keccak256(Buffer.concat([Buffer.from("ff","hex"),T,I,_.keccak256(F)])).slice(-20)},l.isPrecompiled=function(g){var m=a.unpad(g);return 1===m.length&&m[0]>=1&&m[0]<=8},l.isValidPrivate=function(g){return h.privateKeyVerify(g)},l.isValidPublic=function(g,m){return void 0===m&&(m=!1),64===g.length?h.publicKeyVerify(Buffer.concat([Buffer.from([4]),g])):!!m&&h.publicKeyVerify(g)},l.pubToAddress=function(g,m){return void 0===m&&(m=!1),g=a.toBuffer(g),m&&64!==g.length&&(g=h.publicKeyConvert(g,!1).slice(1)),x(64===g.length),_.keccak(g).slice(-20)},l.publicToAddress=l.pubToAddress,l.privateToAddress=function(g){return l.publicToAddress(l.privateToPublic(g))},l.privateToPublic=function(g){return g=a.toBuffer(g),h.publicKeyCreate(g,!1).slice(1)},l.importPublic=function(g){return 64!==(g=a.toBuffer(g)).length&&(g=h.publicKeyConvert(g,!1).slice(1)),g}},52308:(V,l,M)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.baToJSON=l.addHexPrefix=l.toUnsigned=l.fromSigned=l.bufferToHex=l.bufferToInt=l.toBuffer=l.stripZeros=l.unpad=l.setLengthRight=l.setLength=l.setLengthLeft=l.zeros=void 0;var x=M(44780),y=M(94202);l.zeros=function(h){return Buffer.allocUnsafe(h).fill(0)},l.setLengthLeft=function(h,p,a){void 0===a&&(a=!1);var _=l.zeros(p);return h=l.toBuffer(h),a?h.length0&&"0"===p.toString();)p=(h=h.slice(1))[0];return h},l.stripZeros=l.unpad,l.toBuffer=function(h){if(!Buffer.isBuffer(h))if(Array.isArray(h))h=Buffer.from(h);else if("string"==typeof h){if(!x.isHexString(h))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: "+h);h=Buffer.from(x.padToEven(x.stripHexPrefix(h)),"hex")}else if("number"==typeof h)h=x.intToBuffer(h);else if(null==h)h=Buffer.allocUnsafe(0);else if(y.isBN(h))h=h.toArrayLike(Buffer);else{if(!h.toArray)throw new Error("invalid type");h=Buffer.from(h.toArray())}return h},l.bufferToInt=function(h){return new y(l.toBuffer(h)).toNumber()},l.bufferToHex=function(h){return"0x"+(h=l.toBuffer(h)).toString("hex")},l.fromSigned=function(h){return new y(h).fromTwos(256)},l.toUnsigned=function(h){return Buffer.from(h.toTwos(256).toArray())},l.addHexPrefix=function(h){return"string"!=typeof h||x.isHexPrefixed(h)?h:"0x"+h},l.baToJSON=function(h){if(Buffer.isBuffer(h))return"0x"+h.toString("hex");if(h instanceof Array){for(var p=[],a=0;a{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.KECCAK256_RLP=l.KECCAK256_RLP_S=l.KECCAK256_RLP_ARRAY=l.KECCAK256_RLP_ARRAY_S=l.KECCAK256_NULL=l.KECCAK256_NULL_S=l.TWO_POW256=l.MAX_INTEGER=void 0;var x=M(94202);l.MAX_INTEGER=new x("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),l.TWO_POW256=new x("10000000000000000000000000000000000000000000000000000000000000000",16),l.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",l.KECCAK256_NULL=Buffer.from(l.KECCAK256_NULL_S,"hex"),l.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",l.KECCAK256_RLP_ARRAY=Buffer.from(l.KECCAK256_RLP_ARRAY_S,"hex"),l.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",l.KECCAK256_RLP=Buffer.from(l.KECCAK256_RLP_S,"hex")},57313:(V,l,M)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.rlphash=l.ripemd160=l.sha256=l.keccak256=l.keccak=void 0;var x=M(75512),y=x.keccak224,h=x.keccak384,p=x.keccak256,a=x.keccak512,_=M(45429),g=M(44780),m=M(26651),E=M(52308);l.keccak=function(T,I){switch(void 0===I&&(I=256),T="string"!=typeof T||g.isHexString(T)?E.toBuffer(T):Buffer.from(T,"utf8"),I||(I=256),I){case 224:return y(T);case 256:return p(T);case 384:return h(T);case 512:return a(T);default:throw new Error("Invald algorithm: keccak"+I)}},l.keccak256=function(T){return l.keccak(T)},l.sha256=function(T){return T=E.toBuffer(T),_("sha256").update(T).digest()},l.ripemd160=function(T,I){T=E.toBuffer(T);var F=_("rmd160").update(T).digest();return!0===I?E.setLength(F,32):F},l.rlphash=function(T){return l.keccak(m.encode(T))}},88397:function(V,l,M){"use strict";var x=this&&this.__createBinding||(Object.create?function(g,m,E,T){void 0===T&&(T=E),Object.defineProperty(g,T,{enumerable:!0,get:function(){return m[E]}})}:function(g,m,E,T){void 0===T&&(T=E),g[T]=m[E]}),y=this&&this.__exportStar||function(g,m){for(var E in g)"default"!==E&&!m.hasOwnProperty(E)&&x(m,g,E)};Object.defineProperty(l,"__esModule",{value:!0}),l.secp256k1=l.rlp=l.BN=void 0;var h=M(90008);l.secp256k1=h;var p=M(44780),a=M(94202);l.BN=a;var _=M(26651);l.rlp=_,Object.assign(l,p),y(M(31105),l),y(M(42977),l),y(M(57313),l),y(M(86243),l),y(M(52308),l),y(M(88264),l)},88264:(V,l,M)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.defineProperties=void 0;var x=M(80469),y=M(44780),h=M(26651),p=M(52308);l.defineProperties=function(a,_,g){if(a.raw=[],a._fields=[],a.toJSON=function(E){if(void 0===E&&(E=!1),E){var T={};return a._fields.forEach(function(I){T[I]="0x"+a[I].toString("hex")}),T}return p.baToJSON(a.raw)},a.serialize=function(){return h.encode(a.raw)},_.forEach(function(E,T){function I(){return a.raw[T]}function F(W){"00"===(W=p.toBuffer(W)).toString("hex")&&!E.allowZero&&(W=Buffer.allocUnsafe(0)),E.allowLess&&E.length?(W=p.stripZeros(W),x(E.length>=W.length,"The field "+E.name+" must not have more "+E.length+" bytes")):!(E.allowZero&&0===W.length)&&E.length&&x(E.length===W.length,"The field "+E.name+" must have byte length of "+E.length),a.raw[T]=W}a._fields.push(E.name),Object.defineProperty(a,E.name,{enumerable:!0,configurable:!0,get:I,set:F}),E.default&&(a[E.name]=E.default),E.alias&&Object.defineProperty(a,E.alias,{enumerable:!1,configurable:!0,set:F,get:I})}),g)if("string"==typeof g&&(g=Buffer.from(y.stripHexPrefix(g),"hex")),Buffer.isBuffer(g)&&(g=h.decode(g)),Array.isArray(g)){if(g.length>a._fields.length)throw new Error("wrong number of fields in data");g.forEach(function(E,T){a[a._fields[T]]=p.toBuffer(E)})}else{if("object"!=typeof g)throw new Error("invalid data");var m=Object.keys(g);_.forEach(function(E){-1!==m.indexOf(E.name)&&(a[E.name]=g[E.name]),-1!==m.indexOf(E.alias)&&(a[E.alias]=g[E.alias])})}}},90008:(V,l,M)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.ecdhUnsafe=l.ecdh=l.recover=l.verify=l.sign=l.signatureImportLax=l.signatureImport=l.signatureExport=l.signatureNormalize=l.publicKeyCombine=l.publicKeyTweakMul=l.publicKeyTweakAdd=l.publicKeyVerify=l.publicKeyConvert=l.publicKeyCreate=l.privateKeyTweakMul=l.privateKeyTweakAdd=l.privateKeyModInverse=l.privateKeyNegate=l.privateKeyImport=l.privateKeyExport=l.privateKeyVerify=void 0;var x=M(37712),y=M(55959),h=M(27960);l.privateKeyVerify=function(p){return 32===p.length&&x.privateKeyVerify(Uint8Array.from(p))},l.privateKeyExport=function(p,a){if(32!==p.length)throw new RangeError("private key length is invalid");var _=y.privateKeyExport(p,a);return h.privateKeyExport(p,_,a)},l.privateKeyImport=function(p){if(null!==(p=h.privateKeyImport(p))&&32===p.length&&l.privateKeyVerify(p))return p;throw new Error("couldn't import from DER format")},l.privateKeyNegate=function(p){return Buffer.from(x.privateKeyNegate(Uint8Array.from(p)))},l.privateKeyModInverse=function(p){if(32!==p.length)throw new Error("private key length is invalid");return Buffer.from(y.privateKeyModInverse(Uint8Array.from(p)))},l.privateKeyTweakAdd=function(p,a){return Buffer.from(x.privateKeyTweakAdd(Uint8Array.from(p),a))},l.privateKeyTweakMul=function(p,a){return Buffer.from(x.privateKeyTweakMul(Uint8Array.from(p),Uint8Array.from(a)))},l.publicKeyCreate=function(p,a){return Buffer.from(x.publicKeyCreate(Uint8Array.from(p),a))},l.publicKeyConvert=function(p,a){return Buffer.from(x.publicKeyConvert(Uint8Array.from(p),a))},l.publicKeyVerify=function(p){return(33===p.length||65===p.length)&&x.publicKeyVerify(Uint8Array.from(p))},l.publicKeyTweakAdd=function(p,a,_){return Buffer.from(x.publicKeyTweakAdd(Uint8Array.from(p),Uint8Array.from(a),_))},l.publicKeyTweakMul=function(p,a,_){return Buffer.from(x.publicKeyTweakMul(Uint8Array.from(p),Uint8Array.from(a),_))},l.publicKeyCombine=function(p,a){var _=[];return p.forEach(function(g){_.push(Uint8Array.from(g))}),Buffer.from(x.publicKeyCombine(_,a))},l.signatureNormalize=function(p){return Buffer.from(x.signatureNormalize(Uint8Array.from(p)))},l.signatureExport=function(p){return Buffer.from(x.signatureExport(Uint8Array.from(p)))},l.signatureImport=function(p){return Buffer.from(x.signatureImport(Uint8Array.from(p)))},l.signatureImportLax=function(p){if(0===p.length)throw new RangeError("signature length is invalid");var a=h.signatureImportLax(p);if(null===a)throw new Error("couldn't parse DER signature");return y.signatureImport(a)},l.sign=function(p,a,_){if(null===_)throw new TypeError("options should be an Object");var g=void 0;if(_){if(g={},null===_.data)throw new TypeError("options.data should be a Buffer");if(_.data){if(32!=_.data.length)throw new RangeError("options.data length is invalid");g.data=new Uint8Array(_.data)}if(null===_.noncefn)throw new TypeError("options.noncefn should be a Function");_.noncefn&&(g.noncefn=function(E,T,I,F,W){var v=null!=I?Buffer.from(I):null,L=null!=F?Buffer.from(F):null,N=Buffer.from("");return _.noncefn&&(N=_.noncefn(Buffer.from(E),Buffer.from(T),v,L,W)),new Uint8Array(N)})}var m=x.ecdsaSign(Uint8Array.from(p),Uint8Array.from(a),g);return{signature:Buffer.from(m.signature),recovery:m.recid}},l.verify=function(p,a,_){return x.ecdsaVerify(Uint8Array.from(a),Uint8Array.from(p),_)},l.recover=function(p,a,_,g){return Buffer.from(x.ecdsaRecover(Uint8Array.from(a),_,Uint8Array.from(p),g))},l.ecdh=function(p,a){return Buffer.from(x.ecdh(Uint8Array.from(p),Uint8Array.from(a),{}))},l.ecdhUnsafe=function(p,a,_){if(33!==p.length&&65!==p.length)throw new RangeError("public key length is invalid");if(32!==a.length)throw new RangeError("private key length is invalid");return Buffer.from(y.ecdhUnsafe(Uint8Array.from(p),Uint8Array.from(a),_))}},27960:(V,l)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0});var M=Buffer.from([48,129,211,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),x=Buffer.from([48,130,1,19,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);l.privateKeyExport=function(y,h,p){void 0===p&&(p=!0);var a=Buffer.from(p?M:x);return y.copy(a,p?8:9),h.copy(a,p?181:214),a},l.privateKeyImport=function(y){var h=y.length,p=0;if(h2||h1?y[p+a-2]<<8:0);return h<(p+=a)+_||h32||ha||2!==y[_++])return null;var m=y[_++];if(128&m){if(_+(g=m-128)>a)return null;for(;g>0&&0===y[_];_+=1,g-=1);for(m=0;g>0;_+=1,g-=1)m=(m<<8)+y[_]}if(m>a-_)return null;var E=_;if(_+=m,2!==y[_++])return null;var T=y[_++];if(128&T){if(_+(g=T-128)>a)return null;for(;g>0&&0===y[_];_+=1,g-=1);for(T=0;g>0;_+=1,g-=1)T=(T<<8)+y[_]}if(T>a-_)return null;var I=_;for(_+=T;m>0&&0===y[E];m-=1,E+=1);if(m>32)return null;var F=y.slice(E,E+m);for(F.copy(h,32-F.length);T>0&&0===y[I];T-=1,I+=1);if(T>32)return null;var W=y.slice(I,I+T);return W.copy(p,32-W.length),{r:h,s:p}}},55959:(V,l,M)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0});var x=M(94202),h=new(0,M(4913).ec)("secp256k1"),p=h.curve;l.privateKeyExport=function(_,g){void 0===g&&(g=!0);var m=new x(_);if(m.ucmp(p.n)>=0)throw new Error("couldn't export to DER format");var E=h.g.mul(m);return a(E.getX(),E.getY(),g)},l.privateKeyModInverse=function(_){var g=new x(_);if(g.ucmp(p.n)>=0||g.isZero())throw new Error("private key range is invalid");return g.invm(p.n).toArrayLike(Buffer,"be",32)},l.signatureImport=function(_){var g=new x(_.r);g.ucmp(p.n)>=0&&(g=new x(0));var m=new x(_.s);return m.ucmp(p.n)>=0&&(m=new x(0)),Buffer.concat([g.toArrayLike(Buffer,"be",32),m.toArrayLike(Buffer,"be",32)])},l.ecdhUnsafe=function(_,g,m){void 0===m&&(m=!0);var E=h.keyFromPublic(_),T=new x(g);if(T.ucmp(p.n)>=0||T.isZero())throw new Error("scalar was invalid (zero or overflow)");var I=E.pub.mul(T);return a(I.getX(),I.getY(),m)};var a=function(_,g,m){var E;return m?((E=Buffer.alloc(33))[0]=g.isOdd()?3:2,_.toArrayLike(Buffer,"be",32).copy(E,1)):((E=Buffer.alloc(65))[0]=4,_.toArrayLike(Buffer,"be",32).copy(E,1),g.toArrayLike(Buffer,"be",32).copy(E,33)),E}},86243:(V,l,M)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.hashPersonalMessage=l.isValidSignature=l.fromRpcSig=l.toRpcSig=l.ecrecover=l.ecsign=void 0;var x=M(90008),y=M(94202),h=M(52308),p=M(57313);function a(g,m){return m?g-(2*m+35):g-27}function _(g){return 0===g||1===g}l.ecsign=function(g,m,E){var T=x.sign(g,m),I=T.recovery;return{r:T.signature.slice(0,32),s:T.signature.slice(32,64),v:E?I+(2*E+35):I+27}},l.ecrecover=function(g,m,E,T,I){var F=Buffer.concat([h.setLength(E,32),h.setLength(T,32)],64),W=a(m,I);if(!_(W))throw new Error("Invalid signature v value");var v=x.recover(g,F,W);return x.publicKeyConvert(v,!1).slice(1)},l.toRpcSig=function(g,m,E,T){if(!_(a(g,T)))throw new Error("Invalid signature v value");return h.bufferToHex(Buffer.concat([h.setLengthLeft(m,32),h.setLengthLeft(E,32),h.toBuffer(g)]))},l.fromRpcSig=function(g){var m=h.toBuffer(g);if(65!==m.length)throw new Error("Invalid signature length");var E=m[64];return E<27&&(E+=27),{v:E,r:m.slice(0,32),s:m.slice(32,64)}},l.isValidSignature=function(g,m,E,T,I){void 0===T&&(T=!0);var F=new y("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),W=new y("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==m.length||32!==E.length||!_(a(g,I)))return!1;var v=new y(m),L=new y(E);return!(v.isZero()||v.gt(W)||L.isZero()||L.gt(W)||T&&1===L.cmp(F))},l.hashPersonalMessage=function(g){var m=Buffer.from("\x19Ethereum Signed Message:\n"+g.length.toString(),"utf-8");return p.keccak(Buffer.concat([m,g]))}},67912:(V,l,M)=>{"use strict";var y=M(82466),h=M(19697),p=y.BN,a=new p("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),_=function(){function g(m){(function x(g,m){if(!(g instanceof m))throw new TypeError("Cannot call a class as a function")})(this,g),m=m||{};var E=[{name:"nonce",length:32,allowLess:!0,default:new Buffer([])},{name:"gasPrice",length:32,allowLess:!0,default:new Buffer([])},{name:"gasLimit",alias:"gas",length:32,allowLess:!0,default:new Buffer([])},{name:"to",allowZero:!0,length:20,default:new Buffer([])},{name:"value",length:32,allowLess:!0,default:new Buffer([])},{name:"data",alias:"input",allowZero:!0,default:new Buffer([])},{name:"v",allowZero:!0,default:new Buffer([28])},{name:"r",length:32,allowZero:!0,allowLess:!0,default:new Buffer([])},{name:"s",length:32,allowZero:!0,allowLess:!0,default:new Buffer([])}];y.defineProperties(this,E,m),Object.defineProperty(this,"from",{enumerable:!0,configurable:!0,get:this.getSenderAddress.bind(this)});var T=y.bufferToInt(this.v),I=Math.floor((T-35)/2);I<0&&(I=0),this._chainId=I||m.chainId||0,this._homestead=!0}return g.prototype.toCreationAddress=function(){return""===this.to.toString("hex")},g.prototype.hash=function(E){void 0===E&&(E=!0);var T=void 0;if(E)T=this.raw;else if(this._chainId>0){var I=this.raw.slice();this.v=this._chainId,this.r=0,this.s=0,T=this.raw,this.raw=I}else T=this.raw.slice(0,6);return y.rlphash(T)},g.prototype.getChainId=function(){return this._chainId},g.prototype.getSenderAddress=function(){if(this._from)return this._from;var E=this.getSenderPublicKey();return this._from=y.publicToAddress(E),this._from},g.prototype.getSenderPublicKey=function(){if(!(this._senderPubKey&&this._senderPubKey.length||this.verifySignature()))throw new Error("Invalid Signature");return this._senderPubKey},g.prototype.verifySignature=function(){var E=this.hash(!1);if(this._homestead&&1===new p(this.s).cmp(a))return!1;try{var T=y.bufferToInt(this.v);this._chainId>0&&(T-=2*this._chainId+8),this._senderPubKey=y.ecrecover(E,T,this.r,this.s)}catch{return!1}return!!this._senderPubKey},g.prototype.sign=function(E){var T=this.hash(!1),I=y.ecsign(T,E);this._chainId>0&&(I.v+=2*this._chainId+8),Object.assign(this,I)},g.prototype.getDataFee=function(){for(var E=this.raw[5],T=new p(0),I=0;I0&&T.push(["gas limit is too low. Need at least "+this.getBaseFee()]),void 0===E||!1===E?0===T.length:T.join(" ")},g}();V.exports=_},50373:function(V,l,M){!function(x,y){"use strict";function h(n,t){if(!n)throw new Error(t||"Assertion failed")}function p(n,t){n.super_=t;var e=function(){};e.prototype=t.prototype,n.prototype=new e,n.prototype.constructor=n}function a(n,t,e){if(a.isBN(n))return n;this.negative=0,this.words=null,this.length=0,this.red=null,null!==n&&(("le"===t||"be"===t)&&(e=t,t=10),this._init(n||0,t||10,e||"be"))}var _;"object"==typeof x?x.exports=a:y.BN=a,a.BN=a,a.wordSize=26;try{_=typeof window<"u"&&typeof window.Buffer<"u"?window.Buffer:M(56635).Buffer}catch{}function g(n,t){var e=n.charCodeAt(t);return e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:e-48&15}function m(n,t,e){var i=g(n,e);return e-1>=t&&(i|=g(n,e-1)<<4),i}function E(n,t,e,i){for(var s=0,f=Math.min(n.length,e),c=t;c=49?d-49+10:d>=17?d-17+10:d}return s}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,i){if("number"==typeof t)return this._initNumber(t,e,i);if("object"==typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),h(e===(0|e)&&e>=2&&e<=36);var s=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(s++,this.negative=1),s=0;s-=3)this.words[f]|=(c=t[s]|t[s-1]<<8|t[s-2]<<16)<>>26-d&67108863,(d+=24)>=26&&(d-=26,f++);else if("le"===i)for(s=0,f=0;s>>26-d&67108863,(d+=24)>=26&&(d-=26,f++);return this.strip()},a.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var s=0;s=e;s-=2)d=m(t,e,s)<=18?(f-=18,this.words[c+=1]|=d>>>26):f+=8;else for(s=(t.length-e)%2==0?e+1:e;s=18?(f-=18,this.words[c+=1]|=d>>>26):f+=8;this.strip()},a.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var s=0,f=1;f<=67108863;f*=e)s++;s--,f=f/e|0;for(var c=t.length-i,d=c%s,o=Math.min(c,c-d)+i,r=0,u=i;u1&&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?""};var T=["","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"],I=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],F=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function v(n,t,e){e.negative=t.negative^n.negative;var i=n.length+t.length|0;e.length=i,i=i-1|0;var s=0|n.words[0],f=0|t.words[0],c=s*f,o=c/67108864|0;e.words[0]=67108863&c;for(var r=1;r>>26,z=67108863&o,Z=Math.min(r,t.length-1),G=Math.max(0,r-n.length+1);G<=Z;G++)u+=(c=(s=0|n.words[r-G|0])*(f=0|t.words[G])+z)/67108864|0,z=67108863&c;e.words[r]=0|z,o=0|u}return 0!==o?e.words[r]=0|o:e.length--,e.strip()}a.prototype.toString=function(t,e){var i;if(e=0|e||1,16===(t=t||10)||"hex"===t){i="";for(var s=0,f=0,c=0;c>>24-s&16777215)||c!==this.length-1?T[6-o.length]+o+i:o+i,(s+=2)>=26&&(s-=26,c--)}for(0!==f&&(i=f.toString(16)+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var r=I[t],u=F[t];i="";var z=this.clone();for(z.negative=0;!z.isZero();){var Z=z.modn(u).toString(t);i=(z=z.idivn(u)).isZero()?Z+i:T[r-Z.length]+Z+i}for(this.isZero()&&(i="0"+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}h(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&h(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return h(typeof _<"u"),this.toArrayLike(_,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,i){var s=this.byteLength(),f=i||Math.max(1,s);h(s<=f,"byte array longer than desired length"),h(f>0,"Requested array length <= 0"),this.strip();var o,r,c="le"===e,d=new t(f),u=this.clone();if(c){for(r=0;!u.isZero();r++)o=u.andln(255),u.iushrn(8),d[r]=o;for(;r=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0==(8191&e)&&(i+=13,e>>>=13),0==(127&e)&&(i+=7,e>>>=7),0==(15&e)&&(i+=4,e>>>=4),0==(3&e)&&(i+=2,e>>>=2),0==(1&e)&&i++,i},a.prototype.bitLength=function(){var e=this._countBits(this.words[this.length-1]);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var i=0;it.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var s=0;st.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){h("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var s=0;s0&&(this.words[s]=~this.words[s]&67108863>>26-i),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){h("number"==typeof t&&t>=0);var i=t/26|0,s=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<t.length?(i=this,s=t):(i=t,s=this);for(var f=0,c=0;c>>26;for(;0!==f&&c>>26;if(this.length=i.length,0!==f)this.words[this.length]=f,this.length++;else if(i!==this)for(;ct.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var s,f,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(s=this,f=t):(s=t,f=this);for(var c=0,d=0;d>26,this.words[d]=67108863&e;for(;0!==c&&d>26,this.words[d]=67108863&e;if(0===c&&d>>13,Q=0|s[1],et=8191&Q,ht=Q>>>13,Ot=0|s[2],ut=8191&Ot,yt=Ot>>>13,Qt=0|s[3],vt=8191&Qt,At=Qt>>>13,Xt=0|s[4],_t=8191&Xt,Nt=Xt>>>13,O=0|s[5],b=8191&O,S=O>>>13,q=0|s[6],j=8191&q,Y=q>>>13,nt=0|s[7],it=8191&nt,lt=nt>>>13,Gt=0|s[8],ct=8191&Gt,dt=Gt>>>13,jt=0|s[9],xt=8191&jt,Pt=jt>>>13,fe=0|f[0],pt=8191&fe,Lt=fe>>>13,re=0|f[1],bt=8191&re,Ct=re>>>13,te=0|f[2],wt=8191&te,Ut=te>>>13,ie=0|f[3],gt=8191&ie,Ft=ie>>>13,de=0|f[4],Tt=8191&de,Ht=de>>>13,oe=0|f[5],Et=8191&oe,Kt=oe>>>13,ve=0|f[6],St=8191&ve,Dt=ve>>>13,he=0|f[7],kt=8191&he,Zt=he>>>13,me=0|f[8],Bt=8191&me,Wt=me>>>13,pe=0|f[9],Rt=8191&pe,zt=pe>>>13;i.negative=t.negative^e.negative,i.length=19;var _e=(d+(o=Math.imul(Z,pt))|0)+((8191&(r=(r=Math.imul(Z,Lt))+Math.imul(G,pt)|0))<<13)|0;d=((u=Math.imul(G,Lt))+(r>>>13)|0)+(_e>>>26)|0,_e&=67108863,o=Math.imul(et,pt),r=(r=Math.imul(et,Lt))+Math.imul(ht,pt)|0,u=Math.imul(ht,Lt);var H=(d+(o=o+Math.imul(Z,bt)|0)|0)+((8191&(r=(r=r+Math.imul(Z,Ct)|0)+Math.imul(G,bt)|0))<<13)|0;d=((u=u+Math.imul(G,Ct)|0)+(r>>>13)|0)+(H>>>26)|0,H&=67108863,o=Math.imul(ut,pt),r=(r=Math.imul(ut,Lt))+Math.imul(yt,pt)|0,u=Math.imul(yt,Lt),o=o+Math.imul(et,bt)|0,r=(r=r+Math.imul(et,Ct)|0)+Math.imul(ht,bt)|0,u=u+Math.imul(ht,Ct)|0;var K=(d+(o=o+Math.imul(Z,wt)|0)|0)+((8191&(r=(r=r+Math.imul(Z,Ut)|0)+Math.imul(G,wt)|0))<<13)|0;d=((u=u+Math.imul(G,Ut)|0)+(r>>>13)|0)+(K>>>26)|0,K&=67108863,o=Math.imul(vt,pt),r=(r=Math.imul(vt,Lt))+Math.imul(At,pt)|0,u=Math.imul(At,Lt),o=o+Math.imul(ut,bt)|0,r=(r=r+Math.imul(ut,Ct)|0)+Math.imul(yt,bt)|0,u=u+Math.imul(yt,Ct)|0,o=o+Math.imul(et,wt)|0,r=(r=r+Math.imul(et,Ut)|0)+Math.imul(ht,wt)|0,u=u+Math.imul(ht,Ut)|0;var $=(d+(o=o+Math.imul(Z,gt)|0)|0)+((8191&(r=(r=r+Math.imul(Z,Ft)|0)+Math.imul(G,gt)|0))<<13)|0;d=((u=u+Math.imul(G,Ft)|0)+(r>>>13)|0)+($>>>26)|0,$&=67108863,o=Math.imul(_t,pt),r=(r=Math.imul(_t,Lt))+Math.imul(Nt,pt)|0,u=Math.imul(Nt,Lt),o=o+Math.imul(vt,bt)|0,r=(r=r+Math.imul(vt,Ct)|0)+Math.imul(At,bt)|0,u=u+Math.imul(At,Ct)|0,o=o+Math.imul(ut,wt)|0,r=(r=r+Math.imul(ut,Ut)|0)+Math.imul(yt,wt)|0,u=u+Math.imul(yt,Ut)|0,o=o+Math.imul(et,gt)|0,r=(r=r+Math.imul(et,Ft)|0)+Math.imul(ht,gt)|0,u=u+Math.imul(ht,Ft)|0;var ot=(d+(o=o+Math.imul(Z,Tt)|0)|0)+((8191&(r=(r=r+Math.imul(Z,Ht)|0)+Math.imul(G,Tt)|0))<<13)|0;d=((u=u+Math.imul(G,Ht)|0)+(r>>>13)|0)+(ot>>>26)|0,ot&=67108863,o=Math.imul(b,pt),r=(r=Math.imul(b,Lt))+Math.imul(S,pt)|0,u=Math.imul(S,Lt),o=o+Math.imul(_t,bt)|0,r=(r=r+Math.imul(_t,Ct)|0)+Math.imul(Nt,bt)|0,u=u+Math.imul(Nt,Ct)|0,o=o+Math.imul(vt,wt)|0,r=(r=r+Math.imul(vt,Ut)|0)+Math.imul(At,wt)|0,u=u+Math.imul(At,Ut)|0,o=o+Math.imul(ut,gt)|0,r=(r=r+Math.imul(ut,Ft)|0)+Math.imul(yt,gt)|0,u=u+Math.imul(yt,Ft)|0,o=o+Math.imul(et,Tt)|0,r=(r=r+Math.imul(et,Ht)|0)+Math.imul(ht,Tt)|0,u=u+Math.imul(ht,Ht)|0;var It=(d+(o=o+Math.imul(Z,Et)|0)|0)+((8191&(r=(r=r+Math.imul(Z,Kt)|0)+Math.imul(G,Et)|0))<<13)|0;d=((u=u+Math.imul(G,Kt)|0)+(r>>>13)|0)+(It>>>26)|0,It&=67108863,o=Math.imul(j,pt),r=(r=Math.imul(j,Lt))+Math.imul(Y,pt)|0,u=Math.imul(Y,Lt),o=o+Math.imul(b,bt)|0,r=(r=r+Math.imul(b,Ct)|0)+Math.imul(S,bt)|0,u=u+Math.imul(S,Ct)|0,o=o+Math.imul(_t,wt)|0,r=(r=r+Math.imul(_t,Ut)|0)+Math.imul(Nt,wt)|0,u=u+Math.imul(Nt,Ut)|0,o=o+Math.imul(vt,gt)|0,r=(r=r+Math.imul(vt,Ft)|0)+Math.imul(At,gt)|0,u=u+Math.imul(At,Ft)|0,o=o+Math.imul(ut,Tt)|0,r=(r=r+Math.imul(ut,Ht)|0)+Math.imul(yt,Tt)|0,u=u+Math.imul(yt,Ht)|0,o=o+Math.imul(et,Et)|0,r=(r=r+Math.imul(et,Kt)|0)+Math.imul(ht,Et)|0,u=u+Math.imul(ht,Kt)|0;var mt=(d+(o=o+Math.imul(Z,St)|0)|0)+((8191&(r=(r=r+Math.imul(Z,Dt)|0)+Math.imul(G,St)|0))<<13)|0;d=((u=u+Math.imul(G,Dt)|0)+(r>>>13)|0)+(mt>>>26)|0,mt&=67108863,o=Math.imul(it,pt),r=(r=Math.imul(it,Lt))+Math.imul(lt,pt)|0,u=Math.imul(lt,Lt),o=o+Math.imul(j,bt)|0,r=(r=r+Math.imul(j,Ct)|0)+Math.imul(Y,bt)|0,u=u+Math.imul(Y,Ct)|0,o=o+Math.imul(b,wt)|0,r=(r=r+Math.imul(b,Ut)|0)+Math.imul(S,wt)|0,u=u+Math.imul(S,Ut)|0,o=o+Math.imul(_t,gt)|0,r=(r=r+Math.imul(_t,Ft)|0)+Math.imul(Nt,gt)|0,u=u+Math.imul(Nt,Ft)|0,o=o+Math.imul(vt,Tt)|0,r=(r=r+Math.imul(vt,Ht)|0)+Math.imul(At,Tt)|0,u=u+Math.imul(At,Ht)|0,o=o+Math.imul(ut,Et)|0,r=(r=r+Math.imul(ut,Kt)|0)+Math.imul(yt,Et)|0,u=u+Math.imul(yt,Kt)|0,o=o+Math.imul(et,St)|0,r=(r=r+Math.imul(et,Dt)|0)+Math.imul(ht,St)|0,u=u+Math.imul(ht,Dt)|0;var $t=(d+(o=o+Math.imul(Z,kt)|0)|0)+((8191&(r=(r=r+Math.imul(Z,Zt)|0)+Math.imul(G,kt)|0))<<13)|0;d=((u=u+Math.imul(G,Zt)|0)+(r>>>13)|0)+($t>>>26)|0,$t&=67108863,o=Math.imul(ct,pt),r=(r=Math.imul(ct,Lt))+Math.imul(dt,pt)|0,u=Math.imul(dt,Lt),o=o+Math.imul(it,bt)|0,r=(r=r+Math.imul(it,Ct)|0)+Math.imul(lt,bt)|0,u=u+Math.imul(lt,Ct)|0,o=o+Math.imul(j,wt)|0,r=(r=r+Math.imul(j,Ut)|0)+Math.imul(Y,wt)|0,u=u+Math.imul(Y,Ut)|0,o=o+Math.imul(b,gt)|0,r=(r=r+Math.imul(b,Ft)|0)+Math.imul(S,gt)|0,u=u+Math.imul(S,Ft)|0,o=o+Math.imul(_t,Tt)|0,r=(r=r+Math.imul(_t,Ht)|0)+Math.imul(Nt,Tt)|0,u=u+Math.imul(Nt,Ht)|0,o=o+Math.imul(vt,Et)|0,r=(r=r+Math.imul(vt,Kt)|0)+Math.imul(At,Et)|0,u=u+Math.imul(At,Kt)|0,o=o+Math.imul(ut,St)|0,r=(r=r+Math.imul(ut,Dt)|0)+Math.imul(yt,St)|0,u=u+Math.imul(yt,Dt)|0,o=o+Math.imul(et,kt)|0,r=(r=r+Math.imul(et,Zt)|0)+Math.imul(ht,kt)|0,u=u+Math.imul(ht,Zt)|0;var Jt=(d+(o=o+Math.imul(Z,Bt)|0)|0)+((8191&(r=(r=r+Math.imul(Z,Wt)|0)+Math.imul(G,Bt)|0))<<13)|0;d=((u=u+Math.imul(G,Wt)|0)+(r>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,o=Math.imul(xt,pt),r=(r=Math.imul(xt,Lt))+Math.imul(Pt,pt)|0,u=Math.imul(Pt,Lt),o=o+Math.imul(ct,bt)|0,r=(r=r+Math.imul(ct,Ct)|0)+Math.imul(dt,bt)|0,u=u+Math.imul(dt,Ct)|0,o=o+Math.imul(it,wt)|0,r=(r=r+Math.imul(it,Ut)|0)+Math.imul(lt,wt)|0,u=u+Math.imul(lt,Ut)|0,o=o+Math.imul(j,gt)|0,r=(r=r+Math.imul(j,Ft)|0)+Math.imul(Y,gt)|0,u=u+Math.imul(Y,Ft)|0,o=o+Math.imul(b,Tt)|0,r=(r=r+Math.imul(b,Ht)|0)+Math.imul(S,Tt)|0,u=u+Math.imul(S,Ht)|0,o=o+Math.imul(_t,Et)|0,r=(r=r+Math.imul(_t,Kt)|0)+Math.imul(Nt,Et)|0,u=u+Math.imul(Nt,Kt)|0,o=o+Math.imul(vt,St)|0,r=(r=r+Math.imul(vt,Dt)|0)+Math.imul(At,St)|0,u=u+Math.imul(At,Dt)|0,o=o+Math.imul(ut,kt)|0,r=(r=r+Math.imul(ut,Zt)|0)+Math.imul(yt,kt)|0,u=u+Math.imul(yt,Zt)|0,o=o+Math.imul(et,Bt)|0,r=(r=r+Math.imul(et,Wt)|0)+Math.imul(ht,Bt)|0,u=u+Math.imul(ht,Wt)|0;var Yt=(d+(o=o+Math.imul(Z,Rt)|0)|0)+((8191&(r=(r=r+Math.imul(Z,zt)|0)+Math.imul(G,Rt)|0))<<13)|0;d=((u=u+Math.imul(G,zt)|0)+(r>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,o=Math.imul(xt,bt),r=(r=Math.imul(xt,Ct))+Math.imul(Pt,bt)|0,u=Math.imul(Pt,Ct),o=o+Math.imul(ct,wt)|0,r=(r=r+Math.imul(ct,Ut)|0)+Math.imul(dt,wt)|0,u=u+Math.imul(dt,Ut)|0,o=o+Math.imul(it,gt)|0,r=(r=r+Math.imul(it,Ft)|0)+Math.imul(lt,gt)|0,u=u+Math.imul(lt,Ft)|0,o=o+Math.imul(j,Tt)|0,r=(r=r+Math.imul(j,Ht)|0)+Math.imul(Y,Tt)|0,u=u+Math.imul(Y,Ht)|0,o=o+Math.imul(b,Et)|0,r=(r=r+Math.imul(b,Kt)|0)+Math.imul(S,Et)|0,u=u+Math.imul(S,Kt)|0,o=o+Math.imul(_t,St)|0,r=(r=r+Math.imul(_t,Dt)|0)+Math.imul(Nt,St)|0,u=u+Math.imul(Nt,Dt)|0,o=o+Math.imul(vt,kt)|0,r=(r=r+Math.imul(vt,Zt)|0)+Math.imul(At,kt)|0,u=u+Math.imul(At,Zt)|0,o=o+Math.imul(ut,Bt)|0,r=(r=r+Math.imul(ut,Wt)|0)+Math.imul(yt,Bt)|0,u=u+Math.imul(yt,Wt)|0;var Vt=(d+(o=o+Math.imul(et,Rt)|0)|0)+((8191&(r=(r=r+Math.imul(et,zt)|0)+Math.imul(ht,Rt)|0))<<13)|0;d=((u=u+Math.imul(ht,zt)|0)+(r>>>13)|0)+(Vt>>>26)|0,Vt&=67108863,o=Math.imul(xt,wt),r=(r=Math.imul(xt,Ut))+Math.imul(Pt,wt)|0,u=Math.imul(Pt,Ut),o=o+Math.imul(ct,gt)|0,r=(r=r+Math.imul(ct,Ft)|0)+Math.imul(dt,gt)|0,u=u+Math.imul(dt,Ft)|0,o=o+Math.imul(it,Tt)|0,r=(r=r+Math.imul(it,Ht)|0)+Math.imul(lt,Tt)|0,u=u+Math.imul(lt,Ht)|0,o=o+Math.imul(j,Et)|0,r=(r=r+Math.imul(j,Kt)|0)+Math.imul(Y,Et)|0,u=u+Math.imul(Y,Kt)|0,o=o+Math.imul(b,St)|0,r=(r=r+Math.imul(b,Dt)|0)+Math.imul(S,St)|0,u=u+Math.imul(S,Dt)|0,o=o+Math.imul(_t,kt)|0,r=(r=r+Math.imul(_t,Zt)|0)+Math.imul(Nt,kt)|0,u=u+Math.imul(Nt,Zt)|0,o=o+Math.imul(vt,Bt)|0,r=(r=r+Math.imul(vt,Wt)|0)+Math.imul(At,Bt)|0,u=u+Math.imul(At,Wt)|0;var Mt=(d+(o=o+Math.imul(ut,Rt)|0)|0)+((8191&(r=(r=r+Math.imul(ut,zt)|0)+Math.imul(yt,Rt)|0))<<13)|0;d=((u=u+Math.imul(yt,zt)|0)+(r>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,o=Math.imul(xt,gt),r=(r=Math.imul(xt,Ft))+Math.imul(Pt,gt)|0,u=Math.imul(Pt,Ft),o=o+Math.imul(ct,Tt)|0,r=(r=r+Math.imul(ct,Ht)|0)+Math.imul(dt,Tt)|0,u=u+Math.imul(dt,Ht)|0,o=o+Math.imul(it,Et)|0,r=(r=r+Math.imul(it,Kt)|0)+Math.imul(lt,Et)|0,u=u+Math.imul(lt,Kt)|0,o=o+Math.imul(j,St)|0,r=(r=r+Math.imul(j,Dt)|0)+Math.imul(Y,St)|0,u=u+Math.imul(Y,Dt)|0,o=o+Math.imul(b,kt)|0,r=(r=r+Math.imul(b,Zt)|0)+Math.imul(S,kt)|0,u=u+Math.imul(S,Zt)|0,o=o+Math.imul(_t,Bt)|0,r=(r=r+Math.imul(_t,Wt)|0)+Math.imul(Nt,Bt)|0,u=u+Math.imul(Nt,Wt)|0;var ee=(d+(o=o+Math.imul(vt,Rt)|0)|0)+((8191&(r=(r=r+Math.imul(vt,zt)|0)+Math.imul(At,Rt)|0))<<13)|0;d=((u=u+Math.imul(At,zt)|0)+(r>>>13)|0)+(ee>>>26)|0,ee&=67108863,o=Math.imul(xt,Tt),r=(r=Math.imul(xt,Ht))+Math.imul(Pt,Tt)|0,u=Math.imul(Pt,Ht),o=o+Math.imul(ct,Et)|0,r=(r=r+Math.imul(ct,Kt)|0)+Math.imul(dt,Et)|0,u=u+Math.imul(dt,Kt)|0,o=o+Math.imul(it,St)|0,r=(r=r+Math.imul(it,Dt)|0)+Math.imul(lt,St)|0,u=u+Math.imul(lt,Dt)|0,o=o+Math.imul(j,kt)|0,r=(r=r+Math.imul(j,Zt)|0)+Math.imul(Y,kt)|0,u=u+Math.imul(Y,Zt)|0,o=o+Math.imul(b,Bt)|0,r=(r=r+Math.imul(b,Wt)|0)+Math.imul(S,Bt)|0,u=u+Math.imul(S,Wt)|0;var ae=(d+(o=o+Math.imul(_t,Rt)|0)|0)+((8191&(r=(r=r+Math.imul(_t,zt)|0)+Math.imul(Nt,Rt)|0))<<13)|0;d=((u=u+Math.imul(Nt,zt)|0)+(r>>>13)|0)+(ae>>>26)|0,ae&=67108863,o=Math.imul(xt,Et),r=(r=Math.imul(xt,Kt))+Math.imul(Pt,Et)|0,u=Math.imul(Pt,Kt),o=o+Math.imul(ct,St)|0,r=(r=r+Math.imul(ct,Dt)|0)+Math.imul(dt,St)|0,u=u+Math.imul(dt,Dt)|0,o=o+Math.imul(it,kt)|0,r=(r=r+Math.imul(it,Zt)|0)+Math.imul(lt,kt)|0,u=u+Math.imul(lt,Zt)|0,o=o+Math.imul(j,Bt)|0,r=(r=r+Math.imul(j,Wt)|0)+Math.imul(Y,Bt)|0,u=u+Math.imul(Y,Wt)|0;var ce=(d+(o=o+Math.imul(b,Rt)|0)|0)+((8191&(r=(r=r+Math.imul(b,zt)|0)+Math.imul(S,Rt)|0))<<13)|0;d=((u=u+Math.imul(S,zt)|0)+(r>>>13)|0)+(ce>>>26)|0,ce&=67108863,o=Math.imul(xt,St),r=(r=Math.imul(xt,Dt))+Math.imul(Pt,St)|0,u=Math.imul(Pt,Dt),o=o+Math.imul(ct,kt)|0,r=(r=r+Math.imul(ct,Zt)|0)+Math.imul(dt,kt)|0,u=u+Math.imul(dt,Zt)|0,o=o+Math.imul(it,Bt)|0,r=(r=r+Math.imul(it,Wt)|0)+Math.imul(lt,Bt)|0,u=u+Math.imul(lt,Wt)|0;var le=(d+(o=o+Math.imul(j,Rt)|0)|0)+((8191&(r=(r=r+Math.imul(j,zt)|0)+Math.imul(Y,Rt)|0))<<13)|0;d=((u=u+Math.imul(Y,zt)|0)+(r>>>13)|0)+(le>>>26)|0,le&=67108863,o=Math.imul(xt,kt),r=(r=Math.imul(xt,Zt))+Math.imul(Pt,kt)|0,u=Math.imul(Pt,Zt),o=o+Math.imul(ct,Bt)|0,r=(r=r+Math.imul(ct,Wt)|0)+Math.imul(dt,Bt)|0,u=u+Math.imul(dt,Wt)|0;var ge=(d+(o=o+Math.imul(it,Rt)|0)|0)+((8191&(r=(r=r+Math.imul(it,zt)|0)+Math.imul(lt,Rt)|0))<<13)|0;d=((u=u+Math.imul(lt,zt)|0)+(r>>>13)|0)+(ge>>>26)|0,ge&=67108863,o=Math.imul(xt,Bt),r=(r=Math.imul(xt,Wt))+Math.imul(Pt,Bt)|0,u=Math.imul(Pt,Wt);var ue=(d+(o=o+Math.imul(ct,Rt)|0)|0)+((8191&(r=(r=r+Math.imul(ct,zt)|0)+Math.imul(dt,Rt)|0))<<13)|0;d=((u=u+Math.imul(dt,zt)|0)+(r>>>13)|0)+(ue>>>26)|0,ue&=67108863;var xe=(d+(o=Math.imul(xt,Rt))|0)+((8191&(r=(r=Math.imul(xt,zt))+Math.imul(Pt,Rt)|0))<<13)|0;return d=((u=Math.imul(Pt,zt))+(r>>>13)|0)+(xe>>>26)|0,xe&=67108863,c[0]=_e,c[1]=H,c[2]=K,c[3]=$,c[4]=ot,c[5]=It,c[6]=mt,c[7]=$t,c[8]=Jt,c[9]=Yt,c[10]=Vt,c[11]=Mt,c[12]=ee,c[13]=ae,c[14]=ce,c[15]=le,c[16]=ge,c[17]=ue,c[18]=xe,0!==d&&(c[19]=d,i.length++),i};function k(n,t,e){return(new w).mulp(n,t,e)}function w(n,t){this.x=n,this.y=t}Math.imul||(L=v),a.prototype.mulTo=function(t,e){var i,s=this.length+t.length;return i=10===this.length&&10===t.length?L(this,t,e):s<63?v(this,t,e):s<1024?function N(n,t,e){e.negative=t.negative^n.negative,e.length=n.length+t.length;for(var i=0,s=0,f=0;f>>26)|0)>>>26,c&=67108863}e.words[f]=d,i=c,c=s}return 0!==i?e.words[f]=i:e.length--,e.strip()}(this,t,e):k(this,t,e),i},w.prototype.makeRBT=function(t){for(var e=new Array(t),i=a.prototype._countBits(t)-1,s=0;s>=1;return s},w.prototype.permute=function(t,e,i,s,f,c){for(var d=0;d>>=1)f++;return 1<>>=13),f>>>=13;for(c=2*e;c>=26,e+=s/67108864|0,e+=f>>>26,this.words[i]=67108863&f}return 0!==e&&(this.words[i]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function W(n){for(var t=new Array(n.bitLength()),e=0;e>>s}return t}(t);if(0===e.length)return new a(1);for(var i=this,s=0;s=0);var f,e=t%26,i=(t-e)/26,s=67108863>>>26-e<<26-e;if(0!==e){var c=0;for(f=0;f>>26-e}c&&(this.words[f]=c,this.length++)}if(0!==i){for(f=this.length-1;f>=0;f--)this.words[f+i]=this.words[f];for(f=0;f=0),s=e?(e-e%26)/26:0;var f=t%26,c=Math.min((t-f)/26,this.length),d=67108863^67108863>>>f<c)for(this.length-=c,r=0;r=0&&(0!==u||r>=s);r--){var z=0|this.words[r];this.words[r]=u<<26-f|z>>>f,u=z&d}return o&&0!==u&&(o.words[o.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,i){return h(0===this.negative),this.iushrn(t,e,i)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){h("number"==typeof t&&t>=0);var e=t%26,i=(t-e)/26;return!(this.length<=i||!(this.words[i]&1<=0);var e=t%26,i=(t-e)/26;return h(0===this.negative,"imaskn works only with positive numbers"),this.length<=i?this:(0!==e&&i++,this.length=Math.min(i,this.length),0!==e&&(this.words[this.length-1]&=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(h("number"==typeof t),h(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(o/67108864|0),this.words[f+i]=67108863&c}for(;f>26,this.words[f+i]=67108863&c;if(0===d)return this.strip();for(h(-1===d),d=0,f=0;f>26,this.words[f]=67108863&c;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var i,s=this.clone(),f=t,c=0|f.words[f.length-1];0!=(i=26-this._countBits(c))&&(f=f.ushln(i),s.iushln(i),c=0|f.words[f.length-1]);var r,o=s.length-f.length;if("mod"!==e){(r=new a(null)).length=o+1,r.words=new Array(r.length);for(var u=0;u=0;Z--){var G=67108864*(0|s.words[f.length+Z])+(0|s.words[f.length+Z-1]);for(G=Math.min(G/c|0,67108863),s._ishlnsubmul(f,G,Z);0!==s.negative;)G--,s.negative=0,s._ishlnsubmul(f,1,Z),s.isZero()||(s.negative^=1);r&&(r.words[Z]=G)}return r&&r.strip(),s.strip(),"div"!==e&&0!==i&&s.iushrn(i),{div:r||null,mod:s}},a.prototype.divmod=function(t,e,i){return h(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(c=this.neg().divmod(t,e),"mod"!==e&&(s=c.div.neg()),"div"!==e&&(f=c.mod.neg(),i&&0!==f.negative&&f.iadd(t)),{div:s,mod:f}):0===this.negative&&0!==t.negative?(c=this.divmod(t.neg(),e),"mod"!==e&&(s=c.div.neg()),{div:s,mod:c.mod}):0!=(this.negative&t.negative)?(c=this.neg().divmod(t.neg(),e),"div"!==e&&(f=c.mod.neg(),i&&0!==f.negative&&f.isub(t)),{div:c.div,mod:f}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var s,f,c},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,s=t.ushrn(1),f=t.andln(1),c=i.cmp(s);return c<0||1===f&&0===c?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){h(t<=67108863);for(var e=(1<<26)%t,i=0,s=this.length-1;s>=0;s--)i=(e*i+(0|this.words[s]))%t;return i},a.prototype.idivn=function(t){h(t<=67108863);for(var e=0,i=this.length-1;i>=0;i--){var s=(0|this.words[i])+67108864*e;this.words[i]=s/t|0,e=s%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){h(0===t.negative),h(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var s=new a(1),f=new a(0),c=new a(0),d=new a(1),o=0;e.isEven()&&i.isEven();)e.iushrn(1),i.iushrn(1),++o;for(var r=i.clone(),u=e.clone();!e.isZero();){for(var z=0,Z=1;0==(e.words[0]&Z)&&z<26;++z,Z<<=1);if(z>0)for(e.iushrn(z);z-- >0;)(s.isOdd()||f.isOdd())&&(s.iadd(r),f.isub(u)),s.iushrn(1),f.iushrn(1);for(var G=0,Q=1;0==(i.words[0]&Q)&&G<26;++G,Q<<=1);if(G>0)for(i.iushrn(G);G-- >0;)(c.isOdd()||d.isOdd())&&(c.iadd(r),d.isub(u)),c.iushrn(1),d.iushrn(1);e.cmp(i)>=0?(e.isub(i),s.isub(c),f.isub(d)):(i.isub(e),c.isub(s),d.isub(f))}return{a:c,b:d,gcd:i.iushln(o)}},a.prototype._invmp=function(t){h(0===t.negative),h(!t.isZero());var z,e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var s=new a(1),f=new a(0),c=i.clone();e.cmpn(1)>0&&i.cmpn(1)>0;){for(var d=0,o=1;0==(e.words[0]&o)&&d<26;++d,o<<=1);if(d>0)for(e.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);for(var r=0,u=1;0==(i.words[0]&u)&&r<26;++r,u<<=1);if(r>0)for(i.iushrn(r);r-- >0;)f.isOdd()&&f.iadd(c),f.iushrn(1);e.cmp(i)>=0?(e.isub(i),s.isub(f)):(i.isub(e),f.isub(s))}return(z=0===e.cmpn(1)?s:f).cmpn(0)<0&&z.iadd(t),z},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var s=0;e.isEven()&&i.isEven();s++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var f=e.cmp(i);if(f<0){var c=e;e=i,i=c}else if(0===f||0===i.cmpn(1))break;e.isub(i)}return i.iushln(s)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){h("number"==typeof t);var e=t%26,i=(t-e)/26,s=1<>>26,this.words[c]=d&=67108863}return 0!==f&&(this.words[c]=f,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var i,e=t<0;if(0!==this.negative&&!e)return-1;if(0===this.negative&&e)return 1;if(this.strip(),this.length>1)i=1;else{e&&(t=-t),h(t<=67108863,"Number is too big");var s=0|this.words[0];i=s===t?0:st.length)return 1;if(this.length=0;i--){var s=0|this.words[i],f=0|t.words[i];if(s!==f){sf&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new tt(t)},a.prototype.toRed=function(t){return h(!this.red,"Already a number in reduction context"),h(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return h(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return h(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return h(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return h(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return h(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return h(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return h(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return h(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return h(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return h(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return h(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return h(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return h(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return h(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return h(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var A={k256:null,p224:null,p192:null,p25519:null};function B(n,t){this.name=n,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 D(){B.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function J(){B.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function at(){B.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function st(){B.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function tt(n){if("string"==typeof n){var t=a._prime(n);this.m=t.p,this.prime=t}else h(n.gtn(1),"modulus must be greater than 1"),this.m=n,this.prime=null}function U(n){tt.call(this,n),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 t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},B.prototype.ireduce=function(t){var i,e=t;do{this.split(e,this.tmp),i=(e=(e=this.imulK(e)).iadd(this.tmp)).bitLength()}while(i>this.n);var s=i0?e.isub(this.p):void 0!==e.strip?e.strip():e._strip(),e},B.prototype.split=function(t,e){t.iushrn(this.n,0,e)},B.prototype.imulK=function(t){return t.imul(this.k)},p(D,B),D.prototype.split=function(t,e){for(var i=4194303,s=Math.min(t.length,9),f=0;f>>22,c=d}t.words[f-10]=c>>>=22,t.length-=0===c&&t.length>10?10:9},D.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i>>=26,t.words[i]=f,e=s}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(A[t])return A[t];var e;if("k256"===t)e=new D;else if("p224"===t)e=new J;else if("p192"===t)e=new at;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new st}return A[t]=e,e},tt.prototype._verify1=function(t){h(0===t.negative,"red works only with positives"),h(t.red,"red works only with red numbers")},tt.prototype._verify2=function(t,e){h(0==(t.negative|e.negative),"red works only with positives"),h(t.red&&t.red===e.red,"red works only with red numbers")},tt.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},tt.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},tt.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},tt.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},tt.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},tt.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},tt.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},tt.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},tt.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},tt.prototype.isqr=function(t){return this.imul(t,t.clone())},tt.prototype.sqr=function(t){return this.mul(t,t)},tt.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(h(e%2==1),3===e){var i=this.m.add(new a(1)).iushrn(2);return this.pow(t,i)}for(var s=this.m.subn(1),f=0;!s.isZero()&&0===s.andln(1);)f++,s.iushrn(1);h(!s.isZero());var c=new a(1).toRed(this),d=c.redNeg(),o=this.m.subn(1).iushrn(1),r=this.m.bitLength();for(r=new a(2*r*r).toRed(this);0!==this.pow(r,o).cmp(d);)r.redIAdd(d);for(var u=this.pow(r,s),z=this.pow(t,s.addn(1).iushrn(1)),Z=this.pow(t,s),G=f;0!==Z.cmp(c);){for(var Q=Z,et=0;0!==Q.cmp(c);et++)Q=Q.redSqr();h(et=0;f--){for(var u=e.words[f],z=r-1;z>=0;z--){var Z=u>>z&1;c!==s[0]&&(c=this.sqr(c)),0!==Z||0!==d?(d<<=1,d|=Z,(4==++o||0===f&&0===z)&&(c=this.mul(c,s[d]),o=0,d=0)):o=0}r=26}return c},tt.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},tt.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new U(t)},p(U,tt),U.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},U.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},U.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),s=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=i.isub(s).iushrn(this.shift),c=f;return f.cmp(this.m)>=0?c=f.isub(this.m):f.cmpn(0)<0&&(c=f.iadd(this.m)),c._forceRed(this)},U.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var i=t.mul(e),s=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=i.isub(s).iushrn(this.shift),c=f;return f.cmp(this.m)>=0?c=f.isub(this.m):f.cmpn(0)<0&&(c=f.iadd(this.m)),c._forceRed(this)},U.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(V=M.nmd(V),this)},82466:(V,l,M)=>{"use strict";var x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(v){return typeof v}:function(v){return v&&"function"==typeof Symbol&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},y=M(75512),h=y.keccak224,p=y.keccak384,a=y.keccak256,_=y.keccak512,g=M(39785),m=M(80469),E=M(26651),T=M(50373),I=M(45429),F=M(5214).Buffer;Object.assign(l,M(44780)),l.MAX_INTEGER=new T("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),l.TWO_POW256=new T("10000000000000000000000000000000000000000000000000000000000000000",16),l.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",l.SHA3_NULL_S=l.KECCAK256_NULL_S,l.KECCAK256_NULL=F.from(l.KECCAK256_NULL_S,"hex"),l.SHA3_NULL=l.KECCAK256_NULL,l.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",l.SHA3_RLP_ARRAY_S=l.KECCAK256_RLP_ARRAY_S,l.KECCAK256_RLP_ARRAY=F.from(l.KECCAK256_RLP_ARRAY_S,"hex"),l.SHA3_RLP_ARRAY=l.KECCAK256_RLP_ARRAY,l.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",l.SHA3_RLP_S=l.KECCAK256_RLP_S,l.KECCAK256_RLP=F.from(l.KECCAK256_RLP_S,"hex"),l.SHA3_RLP=l.KECCAK256_RLP,l.BN=T,l.rlp=E,l.secp256k1=g,l.zeros=function(v){return F.allocUnsafe(v).fill(0)},l.zeroAddress=function(){var L=l.zeros(20);return l.bufferToHex(L)},l.setLengthLeft=l.setLength=function(v,L,N){var k=l.zeros(L);return v=l.toBuffer(v),N?v.length0&&"0"===L.toString();)L=(v=v.slice(1))[0];return v},l.toBuffer=function(v){if(!F.isBuffer(v))if(Array.isArray(v))v=F.from(v);else if("string"==typeof v)v=l.isHexString(v)?F.from(l.padToEven(l.stripHexPrefix(v)),"hex"):F.from(v);else if("number"==typeof v)v=l.intToBuffer(v);else if(null==v)v=F.allocUnsafe(0);else if(T.isBN(v))v=v.toArrayLike(F);else{if(!v.toArray)throw new Error("invalid type");v=F.from(v.toArray())}return v},l.bufferToInt=function(v){return new T(l.toBuffer(v)).toNumber()},l.bufferToHex=function(v){return"0x"+(v=l.toBuffer(v)).toString("hex")},l.fromSigned=function(v){return new T(v).fromTwos(256)},l.toUnsigned=function(v){return F.from(v.toTwos(256).toArray())},l.keccak=function(v,L){switch(v=l.toBuffer(v),L||(L=256),L){case 224:return h(v);case 256:return a(v);case 384:return p(v);case 512:return _(v);default:throw new Error("Invald algorithm: keccak"+L)}},l.keccak256=function(v){return l.keccak(v)},l.sha3=l.keccak,l.sha256=function(v){return v=l.toBuffer(v),I("sha256").update(v).digest()},l.ripemd160=function(v,L){v=l.toBuffer(v);var N=I("rmd160").update(v).digest();return!0===L?l.setLength(N,32):N},l.rlphash=function(v){return l.keccak(E.encode(v))},l.isValidPrivate=function(v){return g.privateKeyVerify(v)},l.isValidPublic=function(v,L){return 64===v.length?g.publicKeyVerify(F.concat([F.from([4]),v])):!!L&&g.publicKeyVerify(v)},l.pubToAddress=l.publicToAddress=function(v,L){return v=l.toBuffer(v),L&&64!==v.length&&(v=g.publicKeyConvert(v,!1).slice(1)),m(64===v.length),l.keccak(v).slice(-20)};var W=l.privateToPublic=function(v){return v=l.toBuffer(v),g.publicKeyCreate(v,!1).slice(1)};l.importPublic=function(v){return 64!==(v=l.toBuffer(v)).length&&(v=g.publicKeyConvert(v,!1).slice(1)),v},l.ecsign=function(v,L){var N=g.sign(v,L),k={};return k.r=N.signature.slice(0,32),k.s=N.signature.slice(32,64),k.v=N.recovery+27,k},l.hashPersonalMessage=function(v){var L=l.toBuffer("\x19Ethereum Signed Message:\n"+v.length.toString());return l.keccak(F.concat([L,v]))},l.ecrecover=function(v,L,N,k){var w=F.concat([l.setLength(N,32),l.setLength(k,32)],64),A=L-27;if(0!==A&&1!==A)throw new Error("Invalid signature v value");var B=g.recover(v,w,A);return g.publicKeyConvert(B,!1).slice(1)},l.toRpcSig=function(v,L,N){if(27!==v&&28!==v)throw new Error("Invalid recovery id");return l.bufferToHex(F.concat([l.setLengthLeft(L,32),l.setLengthLeft(N,32),l.toBuffer(v-27)]))},l.fromRpcSig=function(v){if(65!==(v=l.toBuffer(v)).length)throw new Error("Invalid signature length");var L=v[64];return L<27&&(L+=27),{v:L,r:v.slice(0,32),s:v.slice(32,64)}},l.privateToAddress=function(v){return l.publicToAddress(W(v))},l.isValidAddress=function(v){return/^0x[0-9a-fA-F]{40}$/.test(v)},l.isZeroAddress=function(v){return l.zeroAddress()===l.addHexPrefix(v)},l.toChecksumAddress=function(v){v=l.stripHexPrefix(v).toLowerCase();for(var L=l.keccak(v).toString("hex"),N="0x",k=0;k=8?N+=v[k].toUpperCase():N+=v[k];return N},l.isValidChecksumAddress=function(v){return l.isValidAddress(v)&&l.toChecksumAddress(v)===v},l.generateAddress=function(v,L){return v=l.toBuffer(v),L=(L=new T(L)).isZero()?null:F.from(L.toArray()),l.rlphash([v,L]).slice(-20)},l.isPrecompiled=function(v){var L=l.unpad(v);return 1===L.length&&L[0]>=1&&L[0]<=8},l.addHexPrefix=function(v){return"string"!=typeof v||l.isHexPrefixed(v)?v:"0x"+v},l.isValidSignature=function(v,L,N,k){var w=new T("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),A=new T("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);return!(32!==L.length||32!==N.length||27!==v&&28!==v||(L=new T(L),N=new T(N),L.isZero()||L.gt(A)||N.isZero()||N.gt(A))||!1===k&&1===new T(N).cmp(w))},l.baToJSON=function(v){if(F.isBuffer(v))return"0x"+v.toString("hex");if(v instanceof Array){for(var L=[],N=0;N=J.length,"The field "+w.name+" must not have more "+w.length+" bytes")):!(w.allowZero&&0===J.length)&&w.length&&m(w.length===J.length,"The field "+w.name+" must have byte length of "+w.length),v.raw[A]=J}v._fields.push(w.name),Object.defineProperty(v,w.name,{enumerable:!0,configurable:!0,get:B,set:D}),w.default&&(v[w.name]=w.default),w.alias&&Object.defineProperty(v,w.alias,{enumerable:!1,configurable:!0,set:D,get:B})}),N)if("string"==typeof N&&(N=F.from(l.stripHexPrefix(N),"hex")),F.isBuffer(N)&&(N=E.decode(N)),Array.isArray(N)){if(N.length>v._fields.length)throw new Error("wrong number of fields in data");N.forEach(function(w,A){v[v._fields[A]]=l.toBuffer(w)})}else{if("object"!==(typeof N>"u"?"undefined":x(N)))throw new Error("invalid data");var k=Object.keys(N);L.forEach(function(w){-1!==k.indexOf(w.name)&&(v[w.name]=N[w.name]),-1!==k.indexOf(w.alias)&&(v[w.alias]=N[w.alias])})}}},39785:(V,l,M)=>{"use strict";var x=M(37712),y=M(98630),h=M(81164),p=function(n){return 32===n.length&&x.privateKeyVerify(Uint8Array.from(n))};V.exports={privateKeyVerify:p,privateKeyExport:function(n,t){if(32!==n.length)throw new RangeError("private key length is invalid");var e=y.privateKeyExport(n,t);return h.privateKeyExport(n,e,t)},privateKeyImport:function(n){if(null!==(n=h.privateKeyImport(n))&&32===n.length&&p(n))return n;throw new Error("couldn't import from DER format")},privateKeyNegate:function(n){return Buffer.from(x.privateKeyNegate(Uint8Array.from(n)))},privateKeyModInverse:function(n){if(32!==n.length)throw new Error("private key length is invalid");return Buffer.from(y.privateKeyModInverse(Uint8Array.from(n)))},privateKeyTweakAdd:function(n,t){return Buffer.from(x.privateKeyTweakAdd(Uint8Array.from(n),t))},privateKeyTweakMul:function(n,t){return Buffer.from(x.privateKeyTweakMul(Uint8Array.from(n),Uint8Array.from(t)))},publicKeyCreate:function(n,t){return Buffer.from(x.publicKeyCreate(Uint8Array.from(n),t))},publicKeyConvert:function(n,t){return Buffer.from(x.publicKeyConvert(Uint8Array.from(n),t))},publicKeyVerify:function(n){return(33===n.length||65===n.length)&&x.publicKeyVerify(Uint8Array.from(n))},publicKeyTweakAdd:function(n,t,e){return Buffer.from(x.publicKeyTweakAdd(Uint8Array.from(n),Uint8Array.from(t),e))},publicKeyTweakMul:function(n,t,e){return Buffer.from(x.publicKeyTweakMul(Uint8Array.from(n),Uint8Array.from(t),e))},publicKeyCombine:function(n,t){var e=[];return n.forEach(function(i){e.push(Uint8Array.from(i))}),Buffer.from(x.publicKeyCombine(e,t))},signatureNormalize:function(n){return Buffer.from(x.signatureNormalize(Uint8Array.from(n)))},signatureExport:function(n){return Buffer.from(x.signatureExport(Uint8Array.from(n)))},signatureImport:function(n){return Buffer.from(x.signatureImport(Uint8Array.from(n)))},signatureImportLax:function(n){if(0===n.length)throw new RangeError("signature length is invalid");var t=h.signatureImportLax(n);if(null===t)throw new Error("couldn't parse DER signature");return y.signatureImport(t)},sign:function(n,t,e){if(null===e)throw new TypeError("options should be an Object");var i=void 0;if(e){if(i={},null===e.data)throw new TypeError("options.data should be a Buffer");if(e.data){if(32!==e.data.length)throw new RangeError("options.data length is invalid");i.data=new Uint8Array(e.data)}if(null===e.noncefn)throw new TypeError("options.noncefn should be a Function");e.noncefn&&(i.noncefn=function(f,c,d,o,r){var u=null!=d?Buffer.from(d):null,z=null!=o?Buffer.from(o):null,Z=Buffer.from("");return e.noncefn&&(Z=e.noncefn(Buffer.from(f),Buffer.from(c),u,z,r)),Uint8Array.from(Z)})}var s=x.ecdsaSign(Uint8Array.from(n),Uint8Array.from(t),i);return{signature:Buffer.from(s.signature),recovery:s.recid}},verify:function(n,t,e){return x.ecdsaVerify(Uint8Array.from(t),Uint8Array.from(n),e)},recover:function(n,t,e,i){return Buffer.from(x.ecdsaRecover(Uint8Array.from(t),e,Uint8Array.from(n),i))},ecdh:function(n,t){return Buffer.from(x.ecdh(Uint8Array.from(n),Uint8Array.from(t),{}))},ecdhUnsafe:function(n,t,e){if(33!==n.length&&65!==n.length)throw new RangeError("public key length is invalid");if(32!==t.length)throw new RangeError("private key length is invalid");return Buffer.from(y.ecdhUnsafe(Uint8Array.from(n),Uint8Array.from(t),e))}}},81164:(V,l)=>{"use strict";var M=Buffer.from([48,129,211,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),x=Buffer.from([48,130,1,19,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);l.privateKeyExport=function(y,h,p){var a=Buffer.from(p?M:x);return y.copy(a,p?8:9),h.copy(a,p?181:214),a},l.privateKeyImport=function(y){var h=y.length,p=0;if(h2||h1?y[p+a-2]<<8:0);return h<(p+=a)+_||h32||ha||2!==y[_++])return null;var m=y[_++];if(128&m){if(_+(g=m-128)>a)return null;for(;g>0&&0===y[_];_+=1,g-=1);for(m=0;g>0;_+=1,g-=1)m=(m<<8)+y[_]}if(m>a-_)return null;var E=_;if(_+=m,2!==y[_++])return null;var T=y[_++];if(128&T){if(_+(g=T-128)>a)return null;for(;g>0&&0===y[_];_+=1,g-=1);for(T=0;g>0;_+=1,g-=1)T=(T<<8)+y[_]}if(T>a-_)return null;var I=_;for(_+=T;m>0&&0===y[E];m-=1,E+=1);if(m>32)return null;var F=y.slice(E,E+m);for(F.copy(h,32-F.length);T>0&&0===y[I];T-=1,I+=1);if(T>32)return null;var W=y.slice(I,I+T);return W.copy(p,32-W.length),{r:h,s:p}}},98630:(V,l,M)=>{"use strict";var x=M(50373),h=new(0,M(4913).ec)("secp256k1"),p=h.curve;l.privateKeyExport=function(_,g){var m=new x(_);if(m.ucmp(p.n)>=0)throw new Error("couldn't export to DER format");var E=h.g.mul(m);return a(E.getX(),E.getY(),g)},l.privateKeyModInverse=function(_){var g=new x(_);if(g.ucmp(p.n)>=0||g.isZero())throw new Error("private key range is invalid");return g.invm(p.n).toArrayLike(Buffer,"be",32)},l.signatureImport=function(_){var g=new x(_.r);g.ucmp(p.n)>=0&&(g=new x(0));var m=new x(_.s);return m.ucmp(p.n)>=0&&(m=new x(0)),Buffer.concat([g.toArrayLike(Buffer,"be",32),m.toArrayLike(Buffer,"be",32)])},l.ecdhUnsafe=function(_,g,m){var E=h.keyFromPublic(_),T=new x(g);if(T.ucmp(p.n)>=0||T.isZero())throw new Error("scalar was invalid (zero or overflow)");var I=E.pub.mul(T);return a(I.getX(),I.getY(),m)};var a=function(g,m,E){var T=void 0;return E?((T=Buffer.alloc(33))[0]=m.isOdd()?3:2,g.toArrayLike(Buffer,"be",32).copy(T,1)):((T=Buffer.alloc(65))[0]=4,g.toArrayLike(Buffer,"be",32).copy(T,1),m.toArrayLike(Buffer,"be",32).copy(T,33)),T}},44780:(V,l,M)=>{"use strict";var x=M(30853),y=M(77021);function h(v){var L=v;if("string"!=typeof L)throw new Error("[ethjs-util] while padding to even, value must be string, is currently "+typeof L+", while padToEven.");return L.length%2&&(L="0"+L),L}function p(v){return"0x"+v.toString(16)}V.exports={arrayContainsArray:function g(v,L,N){if(!0!==Array.isArray(v))throw new Error("[ethjs-util] method arrayContainsArray requires input 'superset' to be an array got type '"+typeof v+"'");if(!0!==Array.isArray(L))throw new Error("[ethjs-util] method arrayContainsArray requires input 'subset' to be an array got type '"+typeof L+"'");return L[Boolean(N)?"some":"every"](function(k){return v.indexOf(k)>=0})},intToBuffer:function a(v){var L=p(v);return new Buffer(h(L.slice(2)),"hex")},getBinarySize:function _(v){if("string"!=typeof v)throw new Error("[ethjs-util] while getting binary size, method getBinarySize requires input 'str' to be type String, got '"+typeof v+"'.");return Buffer.byteLength(v,"utf8")},isHexPrefixed:x,stripHexPrefix:y,padToEven:h,intToHex:p,fromAscii:function I(v){for(var L="",N=0;N{"use strict";var l=Object.prototype.hasOwnProperty,M="~";function x(){}function y(_,g,m){this.fn=_,this.context=g,this.once=m||!1}function h(_,g,m,E,T){if("function"!=typeof m)throw new TypeError("The listener must be a function");var I=new y(m,E||_,T),F=M?M+g:g;return _._events[F]?_._events[F].fn?_._events[F]=[_._events[F],I]:_._events[F].push(I):(_._events[F]=I,_._eventsCount++),_}function p(_,g){0==--_._eventsCount?_._events=new x:delete _._events[g]}function a(){this._events=new x,this._eventsCount=0}Object.create&&(x.prototype=Object.create(null),(new x).__proto__||(M=!1)),a.prototype.eventNames=function(){var m,E,g=[];if(0===this._eventsCount)return g;for(E in m=this._events)l.call(m,E)&&g.push(M?E.slice(1):E);return Object.getOwnPropertySymbols?g.concat(Object.getOwnPropertySymbols(m)):g},a.prototype.listeners=function(g){var E=this._events[M?M+g:g];if(!E)return[];if(E.fn)return[E.fn];for(var T=0,I=E.length,F=new Array(I);T{V.exports=x,x.strict=y,x.loose=h;var l=Object.prototype.toString,M={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function x(p){return y(p)||h(p)}function y(p){return p instanceof Int8Array||p instanceof Int16Array||p instanceof Int32Array||p instanceof Uint8Array||p instanceof Uint8ClampedArray||p instanceof Uint16Array||p instanceof Uint32Array||p instanceof Float32Array||p instanceof Float64Array}function h(p){return M[l.call(p)]}},17613:V=>{var l={}.toString;V.exports=Array.isArray||function(M){return"[object Array]"==l.call(M)}},44786:function(V,l,M){"use strict";var x=M(31325).default,y=this&&this.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(l,"__esModule",{value:!0}),l.JsonRpcEngine=void 0;const h=y(M(70912)),p=M(85327);class a extends h.default{constructor(){super(),this._middleware=[]}push(m){this._middleware.push(m)}handle(m,E){if(E&&"function"!=typeof E)throw new Error('"callback" must be a function if provided.');return Array.isArray(m)?E?this._handleBatch(m,E):this._handleBatch(m):E?this._handle(m,E):this._promiseHandle(m)}asMiddleware(){var m=this;return function(){var E=x(function*(T,I,F,W){try{const[v,L,N]=yield a._runAllMiddleware(T,I,m._middleware);return L?(yield a._runReturnHandlers(N),W(v)):F(function(){var k=x(function*(w){try{yield a._runReturnHandlers(N)}catch(A){return w(A)}return w()});return function(w){return k.apply(this,arguments)}}())}catch(v){return W(v)}});return function(T,I,F,W){return E.apply(this,arguments)}}()}_handleBatch(m,E){var T=this;return x(function*(){try{const I=yield Promise.all(m.map(T._promiseHandle.bind(T)));return E?E(null,I):I}catch(I){if(E)return E(I);throw I}})()}_promiseHandle(m){return new Promise(E=>{this._handle(m,(T,I)=>{E(I)})})}_handle(m,E){var T=this;return x(function*(){if(!m||Array.isArray(m)||"object"!=typeof m){const v=new p.EthereumRpcError(p.errorCodes.rpc.invalidRequest,"Requests must be plain objects. Received: "+typeof m,{request:m});return E(v,{id:void 0,jsonrpc:"2.0",error:v})}if("string"!=typeof m.method){const v=new p.EthereumRpcError(p.errorCodes.rpc.invalidRequest,"Must specify a string method. Received: "+typeof m.method,{request:m});return E(v,{id:m.id,jsonrpc:"2.0",error:v})}const I=Object.assign({},m),F={id:I.id,jsonrpc:I.jsonrpc};let W=null;try{yield T._processRequest(I,F)}catch(v){W=v}return W&&(delete F.result,F.error||(F.error=p.serializeError(W))),E(W,F)})()}_processRequest(m,E){var T=this;return x(function*(){const[I,F,W]=yield a._runAllMiddleware(m,E,T._middleware);if(a._checkForCompletion(m,E,F),yield a._runReturnHandlers(W),I)throw I})()}static _runAllMiddleware(m,E,T){return x(function*(){const I=[];let F=null,W=!1;for(const v of T)if([F,W]=yield a._runMiddleware(m,E,v,I),W)break;return[F,W,I.reverse()]})()}static _runMiddleware(m,E,T,I){return new Promise(F=>{const W=L=>{const N=L||E.error;N&&(E.error=p.serializeError(N)),F([N,!0])},v=L=>{E.error?W(E.error):(L&&("function"!=typeof L&&W(new p.EthereumRpcError(p.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof L}" for request:\n${_(m)}`,{request:m})),I.push(L)),F([null,!1]))};try{T(m,E,v,W)}catch(L){W(L)}})}static _runReturnHandlers(m){return x(function*(){for(const E of m)yield new Promise((T,I)=>{E(F=>F?I(F):T())})})()}static _checkForCompletion(m,E,T){if(!("result"in E)&&!("error"in E))throw new p.EthereumRpcError(p.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request:\n${_(m)}`,{request:m});if(!T)throw new p.EthereumRpcError(p.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request:\n${_(m)}`,{request:m})}}function _(g){return JSON.stringify(g,null,2)}l.JsonRpcEngine=a},19758:(V,l,M)=>{"use strict";var x=M(31325).default;Object.defineProperty(l,"__esModule",{value:!0}),l.createAsyncMiddleware=void 0,l.createAsyncMiddleware=function y(h){return function(){var p=x(function*(a,_,g,m){let E;const T=new Promise(v=>{E=v});let I=null,F=!1;const W=function(){var v=x(function*(){F=!0,g(L=>{I=L,E()}),yield T});return function(){return v.apply(this,arguments)}}();try{yield h(a,_,W),F?(yield T,I(null)):m(null)}catch(v){I?I(v):m(v)}});return function(a,_,g,m){return p.apply(this,arguments)}}()}},71994:(V,l)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.createScaffoldMiddleware=void 0,l.createScaffoldMiddleware=function M(x){return(y,h,p,a)=>{const _=x[y.method];return void 0===_?p():"function"==typeof _?_(y,h,p,a):(h.result=_,a())}}},72654:(V,l)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.getUniqueId=void 0;const M=4294967295;let x=Math.floor(Math.random()*M);l.getUniqueId=function y(){return x=(x+1)%M,x}},43190:(V,l,M)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.createIdRemapMiddleware=void 0;const x=M(72654);l.createIdRemapMiddleware=function y(){return(h,p,a,_)=>{const g=h.id,m=x.getUniqueId();h.id=m,p.id=m,a(E=>{h.id=g,p.id=g,E()})}}},79238:function(V,l,M){"use strict";var x=this&&this.__createBinding||(Object.create?function(h,p,a,_){void 0===_&&(_=a),Object.defineProperty(h,_,{enumerable:!0,get:function(){return p[a]}})}:function(h,p,a,_){void 0===_&&(_=a),h[_]=p[a]}),y=this&&this.__exportStar||function(h,p){for(var a in h)"default"!==a&&!Object.prototype.hasOwnProperty.call(p,a)&&x(p,h,a)};Object.defineProperty(l,"__esModule",{value:!0}),y(M(43190),l),y(M(19758),l),y(M(71994),l),y(M(72654),l),y(M(44786),l),y(M(48470),l)},48470:(V,l,M)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.mergeMiddleware=void 0;const x=M(44786);l.mergeMiddleware=function y(h){const p=new x.JsonRpcEngine;return h.forEach(a=>p.push(a)),p.asMiddleware()}},87729:V=>{V.exports=function l(M){var x=(M=M||{}).max||Number.MAX_SAFE_INTEGER,y=typeof M.start<"u"?M.start:Math.floor(Math.random()*x);return function(){return y%=x,y++}}},47585:(V,l,M)=>{var x=M(63214);V.exports=x.Symbol},8047:(V,l,M)=>{var x=M(62538),y=M(73409),h=M(60108),p=M(59533),a=M(45403),_=M(59473),m=Object.prototype.hasOwnProperty;V.exports=function E(T,I){var F=h(T),W=!F&&y(T),v=!F&&!W&&p(T),L=!F&&!W&&!v&&_(T),N=F||W||v||L,k=N?x(T.length,String):[],w=k.length;for(var A in T)(I||m.call(T,A))&&(!N||!("length"==A||v&&("offset"==A||"parent"==A)||L&&("buffer"==A||"byteLength"==A||"byteOffset"==A)||a(A,w)))&&k.push(A);return k}},45826:(V,l,M)=>{var x=M(47585),y=M(35951),h=M(87778),_=x?x.toStringTag:void 0;V.exports=function g(m){return null==m?void 0===m?"[object Undefined]":"[object Null]":_&&_ in Object(m)?y(m):h(m)}},5393:(V,l,M)=>{var x=M(45826),y=M(30145);V.exports=function p(a){return y(a)&&"[object Arguments]"==x(a)}},71844:(V,l,M)=>{var x=M(45826),y=M(1818),h=M(30145),t={};t["[object Float32Array]"]=t["[object Float64Array]"]=t["[object Int8Array]"]=t["[object Int16Array]"]=t["[object Int32Array]"]=t["[object Uint8Array]"]=t["[object Uint8ClampedArray]"]=t["[object Uint16Array]"]=t["[object Uint32Array]"]=!0,t["[object Arguments]"]=t["[object Array]"]=t["[object ArrayBuffer]"]=t["[object Boolean]"]=t["[object DataView]"]=t["[object Date]"]=t["[object Error]"]=t["[object Function]"]=t["[object Map]"]=t["[object Number]"]=t["[object Object]"]=t["[object RegExp]"]=t["[object Set]"]=t["[object String]"]=t["[object WeakMap]"]=!1,V.exports=function e(i){return h(i)&&y(i.length)&&!!t[x(i)]}},12324:(V,l,M)=>{var x=M(30419),y=M(4836),p=Object.prototype.hasOwnProperty;V.exports=function a(_){if(!x(_))return y(_);var g=[];for(var m in Object(_))p.call(_,m)&&"constructor"!=m&&g.push(m);return g}},62538:V=>{V.exports=function l(M,x){for(var y=-1,h=Array(M);++y{V.exports=function l(M){return function(x){return M(x)}}},2625:V=>{var l="object"==typeof global&&global&&global.Object===Object&&global;V.exports=l},35951:(V,l,M)=>{var x=M(47585),y=Object.prototype,h=y.hasOwnProperty,p=y.toString,a=x?x.toStringTag:void 0;V.exports=function _(g){var m=h.call(g,a),E=g[a];try{g[a]=void 0;var T=!0}catch{}var I=p.call(g);return T&&(m?g[a]=E:delete g[a]),I}},45403:V=>{var M=/^(?:0|[1-9]\d*)$/;V.exports=function x(y,h){var p=typeof y;return!!(h=h??9007199254740991)&&("number"==p||"symbol"!=p&&M.test(y))&&y>-1&&y%1==0&&y{var l=Object.prototype;V.exports=function M(x){var y=x&&x.constructor;return x===("function"==typeof y&&y.prototype||l)}},4836:(V,l,M)=>{var y=M(60087)(Object.keys,Object);V.exports=y},24380:(V,l,M)=>{V=M.nmd(V);var x=M(2625),y=l&&!l.nodeType&&l,h=y&&V&&!V.nodeType&&V,a=h&&h.exports===y&&x.process,_=function(){try{return h&&h.require&&h.require("util").types||a&&a.binding&&a.binding("util")}catch{}}();V.exports=_},87778:V=>{var M=Object.prototype.toString;V.exports=function x(y){return M.call(y)}},60087:V=>{V.exports=function l(M,x){return function(y){return M(x(y))}}},63214:(V,l,M)=>{var x=M(2625),y="object"==typeof self&&self&&self.Object===Object&&self,h=x||y||Function("return this")();V.exports=h},73409:(V,l,M)=>{var x=M(5393),y=M(30145),h=Object.prototype,p=h.hasOwnProperty,a=h.propertyIsEnumerable,_=x(function(){return arguments}())?x:function(g){return y(g)&&p.call(g,"callee")&&!a.call(g,"callee")};V.exports=_},60108:V=>{V.exports=Array.isArray},38932:(V,l,M)=>{var x=M(51030),y=M(1818);V.exports=function h(p){return null!=p&&y(p.length)&&!x(p)}},59533:(V,l,M)=>{V=M.nmd(V);var x=M(63214),y=M(23504),h=l&&!l.nodeType&&l,p=h&&V&&!V.nodeType&&V,_=p&&p.exports===h?x.Buffer:void 0;V.exports=(_?_.isBuffer:void 0)||y},51030:(V,l,M)=>{var x=M(45826),y=M(18909);V.exports=function g(m){if(!y(m))return!1;var E=x(m);return"[object Function]"==E||"[object GeneratorFunction]"==E||"[object AsyncFunction]"==E||"[object Proxy]"==E}},1818:V=>{V.exports=function M(x){return"number"==typeof x&&x>-1&&x%1==0&&x<=9007199254740991}},18909:V=>{V.exports=function l(M){var x=typeof M;return null!=M&&("object"==x||"function"==x)}},30145:V=>{V.exports=function l(M){return null!=M&&"object"==typeof M}},59473:(V,l,M)=>{var x=M(71844),y=M(958),h=M(24380),p=h&&h.isTypedArray,a=p?y(p):x;V.exports=a},14687:(V,l,M)=>{var x=M(8047),y=M(12324),h=M(38932);V.exports=function p(a){return h(a)?x(a):y(a)}},81925:V=>{V.exports=function l(){}},23504:V=>{V.exports=function l(){return!1}},95920:V=>{"use strict";const l=(M,x)=>function(){const y=x.promiseModule,h=new Array(arguments.length);for(let p=0;p{h.push(x.errorFirst?function(_,g){if(x.multiArgs){const m=new Array(arguments.length-1);for(let E=1;E{x=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},x);const y=p=>{const a=_=>"string"==typeof _?p===_:_.test(p);return x.include?x.include.some(a):!x.exclude.some(a)};let h;h="function"==typeof M?function(){return x.excludeMain?M.apply(this,arguments):l(M,x).apply(this,arguments)}:Object.create(Object.getPrototypeOf(M));for(const p in M){const a=M[p];h[p]="function"==typeof a&&y(p)?l(a,x):a}return h}},24023:(V,l,M)=>{"use strict";M.r(l),M.d(l,{Children:()=>bt,Component:()=>w,Fragment:()=>k,PureComponent:()=>Pt,Suspense:()=>wt,SuspenseList:()=>gt,cloneElement:()=>Wt,createContext:()=>z,createElement:()=>v,createFactory:()=>me,createPortal:()=>Ht,createRef:()=>N,default:()=>_e,findDOMNode:()=>Rt,forwardRef:()=>Lt,hydrate:()=>ve,isValidElement:()=>Bt,lazy:()=>ie,memo:()=>fe,render:()=>Kt,unmountComponentAtNode:()=>pe,unstable_batchedUpdates:()=>zt,useCallback:()=>q,useContext:()=>j,useDebugValue:()=>Y,useEffect:()=>_t,useErrorBoundary:()=>nt,useImperativeHandle:()=>b,useLayoutEffect:()=>Nt,useMemo:()=>S,useReducer:()=>Xt,useRef:()=>O,useState:()=>At,version:()=>Zt});var x,h,p,a,_,g,m,E={},T=[],I=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function F(H,K){for(var $ in K)H[$]=K[$];return H}function W(H){var K=H.parentNode;K&&K.removeChild(H)}function v(H,K,$){var ot,It=arguments,mt={};for(ot in K)"key"!==ot&&"ref"!==ot&&(mt[ot]=K[ot]);if(arguments.length>3)for($=[$],ot=3;ot2&&(K.children=T.slice.call(arguments,2)),$={},K)"key"!==ot&&"ref"!==ot&&($[ot]=K[ot]);return L(H.type,$,K.key||H.key,K.ref||H.ref,null)}function z(H){var K={},$={__c:"__cC"+m++,__:H,Consumer:function(ot,It){return ot.children(It)},Provider:function(ot){var It,mt=this;return this.getChildContext||(It=[],this.getChildContext=function(){return K[$.__c]=mt,K},this.shouldComponentUpdate=function($t){mt.props.value!==$t.value&&It.some(function(Jt){Jt.context=$t.value,D(Jt)})},this.sub=function($t){It.push($t);var Jt=$t.componentWillUnmount;$t.componentWillUnmount=function(){It.splice(It.indexOf($t),1),Jt&&Jt.call($t)}}),ot.children}};return $.Consumer.contextType=$,$.Provider.__=$,$}x={__e:function(H,K){for(var $,ot;K=K.__;)if(($=K.__c)&&!$.__)try{if($.constructor&&null!=$.constructor.getDerivedStateFromError&&(ot=!0,$.setState($.constructor.getDerivedStateFromError(H))),null!=$.componentDidCatch&&(ot=!0,$.componentDidCatch(H)),ot)return D($.__E=$)}catch(It){H=It}throw H}},w.prototype.setState=function(H,K){var $;$=this.__s!==this.state?this.__s:this.__s=F({},this.state),"function"==typeof H&&(H=H($,this.props)),H&&F($,H),null!=H&&this.__v&&(K&&this.__h.push(K),D(this))},w.prototype.forceUpdate=function(H){this.__v&&(this.__e=!0,H&&this.__h.push(H),D(this))},w.prototype.render=k,h=[],p=0,a="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,g=E,m=0;var Z,G,Q,et=0,ht=[],Ot=x.__r,ut=x.diffed,yt=x.__c,Qt=x.unmount;function vt(H,K){x.__h&&x.__h(G,H,et||K),et=0;var $=G.__H||(G.__H={__:[],__h:[]});return H>=$.__.length&&$.__.push({}),$.__[H]}function At(H){return et=1,Xt(dt,H)}function Xt(H,K,$){var ot=vt(Z++,2);return ot.__c||(ot.__c=G,ot.__=[$?$(K):dt(void 0,K),function(It){var mt=H(ot.__[0],It);ot.__[0]!==mt&&(ot.__[0]=mt,ot.__c.setState({}))}]),ot.__}function _t(H,K){var $=vt(Z++,3);!x.__s&&ct($.__H,K)&&($.__=H,$.__H=K,G.__H.__h.push($))}function Nt(H,K){var $=vt(Z++,4);!x.__s&&ct($.__H,K)&&($.__=H,$.__H=K,G.__h.push($))}function O(H){return et=5,S(function(){return{current:H}},[])}function b(H,K,$){et=6,Nt(function(){"function"==typeof H?H(K()):H&&(H.current=K())},null==$?$:$.concat(H))}function S(H,K){var $=vt(Z++,7);return ct($.__H,K)?($.__H=K,$.__h=H,$.__=H()):$.__}function q(H,K){return et=8,S(function(){return H},K)}function j(H){var K=G.context[H.__c],$=vt(Z++,9);return $.__c=H,K?(null==$.__&&($.__=!0,K.sub(G)),K.props.value):H.__}function Y(H,K){x.useDebugValue&&x.useDebugValue(K?K(H):H)}function nt(H){var K=vt(Z++,10),$=At();return K.__=H,G.componentDidCatch||(G.componentDidCatch=function(ot){K.__&&K.__(ot),$[1](ot)}),[$[0],function(){$[1](void 0)}]}function it(){ht.some(function(H){if(H.__P)try{H.__H.__h.forEach(lt),H.__H.__h.forEach(Gt),H.__H.__h=[]}catch(K){return H.__H.__h=[],x.__e(K,H.__v),!0}}),ht=[]}function lt(H){H.t&&H.t()}function Gt(H){var K=H.__();"function"==typeof K&&(H.t=K)}function ct(H,K){return!H||K.some(function($,ot){return $!==H[ot]})}function dt(H,K){return"function"==typeof K?K(H):K}function jt(H,K){for(var $ in K)H[$]=K[$];return H}function xt(H,K){for(var $ in H)if("__source"!==$&&!($ in K))return!0;for(var ot in K)if("__source"!==ot&&H[ot]!==K[ot])return!0;return!1}x.__r=function(H){Ot&&Ot(H),Z=0,(G=H.__c).__H&&(G.__H.__h.forEach(lt),G.__H.__h.forEach(Gt),G.__H.__h=[])},x.diffed=function(H){ut&&ut(H);var K=H.__c;if(K){var $=K.__H;$&&$.__h.length&&(1!==ht.push(K)&&Q===x.requestAnimationFrame||((Q=x.requestAnimationFrame)||function(ot){var It,mt=function(){clearTimeout($t),cancelAnimationFrame(It),setTimeout(ot)},$t=setTimeout(mt,100);typeof window<"u"&&(It=requestAnimationFrame(mt))})(it))}},x.__c=function(H,K){K.some(function($){try{$.__h.forEach(lt),$.__h=$.__h.filter(function(ot){return!ot.__||Gt(ot)})}catch(ot){K.some(function(It){It.__h&&(It.__h=[])}),K=[],x.__e(ot,$.__v)}}),yt&&yt(H,K)},x.unmount=function(H){Qt&&Qt(H);var K=H.__c;if(K){var $=K.__H;if($)try{$.__.forEach(function(ot){return ot.t&&ot.t()})}catch(ot){x.__e(ot,K.__v)}}};var Pt=function(H){var K,$;function ot(It){var mt;return(mt=H.call(this,It)||this).isPureReactComponent=!0,mt}return $=H,(K=ot).prototype=Object.create($.prototype),K.prototype.constructor=K,K.__proto__=$,ot.prototype.shouldComponentUpdate=function(It,mt){return xt(this.props,It)||xt(this.state,mt)},ot}(w);function fe(H,K){function $(It){var mt=this.props.ref,$t=mt==It.ref;return!$t&&mt&&(mt.call?mt(null):mt.current=null),K?!K(this.props,It)||!$t:xt(this.props,It)}function ot(It){return this.shouldComponentUpdate=$,v(H,jt({},It))}return ot.prototype.isReactComponent=!0,ot.displayName="Memo("+(H.displayName||H.name)+")",ot.t=!0,ot}var pt=x.__b;function Lt(H){function K($){var ot=jt({},$);return delete ot.ref,H(ot,$.ref)}return K.prototype.isReactComponent=K.t=!0,K.displayName="ForwardRef("+(H.displayName||H.name)+")",K}x.__b=function(H){H.type&&H.type.t&&H.ref&&(H.props.ref=H.ref,H.ref=null),pt&&pt(H)};var re=function(H,K){return H?st(H).reduce(function($,ot,It){return $.concat(K(ot,It))},[]):null},bt={map:re,forEach:re,count:function(H){return H?st(H).length:0},only:function(H){if(1!==(H=st(H)).length)throw new Error("Children.only() expects only one child.");return H[0]},toArray:st},Ct=x.__e;function te(H){return H&&((H=jt({},H)).__c=null,H.__k=H.__k&&H.__k.map(te)),H}function wt(){this.__u=0,this.o=null,this.__b=null}function Ut(H){var K=H.__.__c;return K&&K.u&&K.u(H)}function ie(H){var K,$,ot;function It(mt){if(K||(K=H()).then(function($t){$=$t.default||$t},function($t){ot=$t}),ot)throw ot;if(!$)throw K;return v($,mt)}return It.displayName="Lazy",It.t=!0,It}function gt(){this.i=null,this.l=null}x.__e=function(H,K,$){if(H.then)for(var ot,It=K;It=It.__;)if((ot=It.__c)&&ot.__c)return ot.__c(H,K.__c);Ct(H,K,$)},(wt.prototype=new w).__c=function(H,K){var $=this;null==$.o&&($.o=[]),$.o.push(K);var ot=Ut($.__v),It=!1,mt=function(){It||(It=!0,ot?ot($t):$t())};K.__c=K.componentWillUnmount,K.componentWillUnmount=function(){mt(),K.__c&&K.__c()};var $t=function(){var Jt;if(!--$.__u)for($.__v.__k[0]=$.state.u,$.setState({u:$.__b=null});Jt=$.o.pop();)Jt.forceUpdate()};$.__u++||$.setState({u:$.__b=$.__v.__k[0]}),H.then(mt,mt)},wt.prototype.render=function(H,K){return this.__b&&(this.__v.__k[0]=te(this.__b),this.__b=null),[v(w,null,K.u?null:H.children),K.u&&H.fallback]};var Ft=function(H,K,$){if(++$[1]===$[0]&&H.l.delete(K),H.props.revealOrder&&("t"!==H.props.revealOrder[0]||!H.l.size))for($=H.i;$;){for(;$.length>3;)$.pop()();if($[1]<$[0])break;H.i=$=$[2]}};(gt.prototype=new w).u=function(H){var K=this,$=Ut(K.__v),ot=K.l.get(H);return ot[0]++,function(It){var mt=function(){K.props.revealOrder?(ot.push(It),Ft(K,H,ot)):It()};$?$(mt):mt()}},gt.prototype.render=function(H){this.i=null,this.l=new Map;var K=st(H.children);H.revealOrder&&"b"===H.revealOrder[0]&&K.reverse();for(var $=K.length;$--;)this.l.set(K[$],this.i=[1,0,this.i]);return H.children},gt.prototype.componentDidUpdate=gt.prototype.componentDidMount=function(){var H=this;H.l.forEach(function(K,$){Ft(H,$,K)})};var de=function(){function H(){}var K=H.prototype;return K.getChildContext=function(){return this.props.context},K.render=function($){return $.children},H}();function Tt(H){var K=this,$=H.container,ot=v(de,{context:K.context},H.vnode);return K.s&&K.s!==$&&(K.v.parentNode&&K.s.removeChild(K.v),c(K.h),K.p=!1),H.vnode?K.p?($.__k=K.__k,o(ot,$),K.__k=$.__k):(K.v=document.createTextNode(""),r("",$),$.appendChild(K.v),K.p=!0,K.s=$,o(ot,$,K.v),K.__k=K.v.__k):K.p&&(K.v.parentNode&&K.s.removeChild(K.v),c(K.h)),K.h=ot,K.componentWillUnmount=function(){K.v.parentNode&&K.s.removeChild(K.v),c(K.h)},null}function Ht(H,K){return v(Tt,{vnode:H,container:K})}var oe=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/;w.prototype.isReactComponent={};var Et=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103;function Kt(H,K,$){if(null==K.__k)for(;K.firstChild;)K.removeChild(K.firstChild);return o(H,K),"function"==typeof $&&$(),H?H.__c:null}function ve(H,K,$){return r(H,K),"function"==typeof $&&$(),H?H.__c:null}var St=x.event;function Dt(H,K){H["UNSAFE_"+K]&&!H[K]&&Object.defineProperty(H,K,{configurable:!1,get:function(){return this["UNSAFE_"+K]},set:function($){this["UNSAFE_"+K]=$}})}x.event=function(H){St&&(H=St(H)),H.persist=function(){};var K=!1,$=!1,ot=H.stopPropagation;H.stopPropagation=function(){ot.call(H),K=!0};var It=H.preventDefault;return H.preventDefault=function(){It.call(H),$=!0},H.isPropagationStopped=function(){return K},H.isDefaultPrevented=function(){return $},H.nativeEvent=H};var he={configurable:!0,get:function(){return this.class}},kt=x.vnode;x.vnode=function(H){H.$$typeof=Et;var K=H.type,$=H.props;if(K){if($.class!=$.className&&(he.enumerable="className"in $,null!=$.className&&($.class=$.className),Object.defineProperty($,"className",he)),"function"!=typeof K){var ot,It,mt;for(mt in $.defaultValue&&void 0!==$.value&&($.value||0===$.value||($.value=$.defaultValue),delete $.defaultValue),Array.isArray($.value)&&$.multiple&&"select"===K&&(st($.children).forEach(function($t){-1!=$.value.indexOf($t.props.value)&&($t.props.selected=!0)}),delete $.value),$)if(ot=oe.test(mt))break;if(ot)for(mt in It=H.props={},$)It[oe.test(mt)?mt.replace(/[A-Z0-9]/,"-$&").toLowerCase():mt]=$[mt]}(function($t){var Jt=H.type,Yt=H.props;if(Yt&&"string"==typeof Jt){var Vt={};for(var Mt in Yt)/^on(Ani|Tra|Tou)/.test(Mt)&&(Yt[Mt.toLowerCase()]=Yt[Mt],delete Yt[Mt]),Vt[Mt.toLowerCase()]=Mt;if(Vt.ondoubleclick&&(Yt.ondblclick=Yt[Vt.ondoubleclick],delete Yt[Vt.ondoubleclick]),Vt.onbeforeinput&&(Yt.onbeforeinput=Yt[Vt.onbeforeinput],delete Yt[Vt.onbeforeinput]),Vt.onchange&&("textarea"===Jt||"input"===Jt.toLowerCase()&&!/^fil|che|ra/i.test(Yt.type))){var ee=Vt.oninput||"oninput";Yt[ee]||(Yt[ee]=Yt[Vt.onchange],delete Yt[Vt.onchange])}}})(),"function"==typeof K&&!K.m&&K.prototype&&(Dt(K.prototype,"componentWillMount"),Dt(K.prototype,"componentWillReceiveProps"),Dt(K.prototype,"componentWillUpdate"),K.m=!0)}kt&&kt(H)};var Zt="16.8.0";function me(H){return v.bind(null,H)}function Bt(H){return!!H&&H.$$typeof===Et}function Wt(H){return Bt(H)?u.apply(null,arguments):H}function pe(H){return!!H.__k&&(o(null,H),!0)}function Rt(H){return H&&(H.base||1===H.nodeType&&H)||null}var zt=function(H,K){return H(K)};const _e={useState:At,useReducer:Xt,useEffect:_t,useLayoutEffect:Nt,useRef:O,useImperativeHandle:b,useMemo:S,useCallback:q,useContext:j,useDebugValue:Y,version:"16.8.0",Children:bt,render:Kt,hydrate:Kt,unmountComponentAtNode:pe,createPortal:Ht,createElement:v,createContext:z,createFactory:me,cloneElement:Wt,createRef:N,Fragment:k,isValidElement:Bt,findDOMNode:Rt,Component:w,PureComponent:Pt,memo:fe,forwardRef:Lt,unstable_batchedUpdates:zt,Suspense:wt,SuspenseList:gt,lazy:ie}},26084:(V,l,M)=>{var x=M(14939),y=M(19931),h=M(52874),p=M(75049);function a(_,g,m,E,T){var I=[].slice.call(arguments,1),F=I.length,W="function"==typeof I[F-1];if(!W&&!x())throw new Error("Callback required as last argument");if(!W){if(F<1)throw new Error("Too few arguments provided");return 1===F?(m=g,g=E=void 0):2===F&&!g.getContext&&(E=m,m=g,g=void 0),new Promise(function(L,N){try{var k=y.create(m,E);L(_(k,g,E))}catch(w){N(w)}})}if(F<2)throw new Error("Too few arguments provided");2===F?(T=m,m=g,g=E=void 0):3===F&&(g.getContext&&typeof T>"u"?(T=E,E=void 0):(T=E,E=m,m=g,g=void 0));try{var v=y.create(m,E);T(null,_(v,g,E))}catch(L){T(L)}}l.create=y.create,l.toCanvas=a.bind(null,h.render),l.toDataURL=a.bind(null,h.renderToDataURL),l.toString=a.bind(null,function(_,g,m){return p.render(_,m)})},14939:V=>{V.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},73023:(V,l,M)=>{var x=M(33392).getSymbolSize;l.getRowColCoords=function(h){if(1===h)return[];for(var p=Math.floor(h/7)+2,a=x(h),_=145===a?26:2*Math.ceil((a-13)/(2*p-2)),g=[a-7],m=1;m{var x=M(12956),y=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function h(p){this.mode=x.ALPHANUMERIC,this.data=p}h.getBitsLength=function(a){return 11*Math.floor(a/2)+a%2*6},h.prototype.getLength=function(){return this.data.length},h.prototype.getBitsLength=function(){return h.getBitsLength(this.data.length)},h.prototype.write=function(a){var _;for(_=0;_+2<=this.data.length;_+=2){var g=45*y.indexOf(this.data[_]);g+=y.indexOf(this.data[_+1]),a.put(g,11)}this.data.length%2&&a.put(y.indexOf(this.data[_]),6)},V.exports=h},85924:V=>{function l(){this.buffer=[],this.length=0}l.prototype={get:function(M){var x=Math.floor(M/8);return 1==(this.buffer[x]>>>7-M%8&1)},put:function(M,x){for(var y=0;y>>x-y-1&1))},getLengthInBits:function(){return this.length},putBit:function(M){var x=Math.floor(this.length/8);this.buffer.length<=x&&this.buffer.push(0),M&&(this.buffer[x]|=128>>>this.length%8),this.length++}},V.exports=l},51907:(V,l,M)=>{var x=M(68623);function y(h){if(!h||h<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=h,this.data=x.alloc(h*h),this.reservedBit=x.alloc(h*h)}y.prototype.set=function(h,p,a,_){var g=h*this.size+p;this.data[g]=a,_&&(this.reservedBit[g]=!0)},y.prototype.get=function(h,p){return this.data[h*this.size+p]},y.prototype.xor=function(h,p,a){this.data[h*this.size+p]^=a},y.prototype.isReserved=function(h,p){return this.reservedBit[h*this.size+p]},V.exports=y},59556:(V,l,M)=>{var x=M(68623),y=M(12956);function h(p){this.mode=y.BYTE,this.data=x.from(p)}h.getBitsLength=function(a){return 8*a},h.prototype.getLength=function(){return this.data.length},h.prototype.getBitsLength=function(){return h.getBitsLength(this.data.length)},h.prototype.write=function(p){for(var a=0,_=this.data.length;a<_;a++)p.put(this.data[a],8)},V.exports=h},43534:(V,l,M)=>{var x=M(46942),y=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],h=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];l.getBlocksCount=function(a,_){switch(_){case x.L:return y[4*(a-1)+0];case x.M:return y[4*(a-1)+1];case x.Q:return y[4*(a-1)+2];case x.H:return y[4*(a-1)+3];default:return}},l.getTotalCodewordsCount=function(a,_){switch(_){case x.L:return h[4*(a-1)+0];case x.M:return h[4*(a-1)+1];case x.Q:return h[4*(a-1)+2];case x.H:return h[4*(a-1)+3];default:return}}},46942:(V,l)=>{l.L={bit:1},l.M={bit:0},l.Q={bit:3},l.H={bit:2},l.isValid=function(y){return y&&typeof y.bit<"u"&&y.bit>=0&&y.bit<4},l.from=function(y,h){if(l.isValid(y))return y;try{return function M(x){if("string"!=typeof x)throw new Error("Param is not a string");switch(x.toLowerCase()){case"l":case"low":return l.L;case"m":case"medium":return l.M;case"q":case"quartile":return l.Q;case"h":case"high":return l.H;default:throw new Error("Unknown EC Level: "+x)}}(y)}catch{return h}}},6402:(V,l,M)=>{var x=M(33392).getSymbolSize;l.getPositions=function(p){var a=x(p);return[[0,0],[a-7,0],[0,a-7]]}},83861:(V,l,M)=>{var x=M(33392),p=x.getBCHDigit(1335);l.getEncodedBits=function(_,g){for(var m=_.bit<<3|g,E=m<<10;x.getBCHDigit(E)-p>=0;)E^=1335<{var x=M(68623),y=x.alloc(512),h=x.alloc(256);(function(){for(var a=1,_=0;_<255;_++)y[_]=a,h[a]=_,256&(a<<=1)&&(a^=285);for(_=255;_<512;_++)y[_]=y[_-255]})(),l.log=function(a){if(a<1)throw new Error("log("+a+")");return h[a]},l.exp=function(a){return y[a]},l.mul=function(a,_){return 0===a||0===_?0:y[h[a]+h[_]]}},38918:(V,l,M)=>{var x=M(12956),y=M(33392);function h(p){this.mode=x.KANJI,this.data=p}h.getBitsLength=function(a){return 13*a},h.prototype.getLength=function(){return this.data.length},h.prototype.getBitsLength=function(){return h.getBitsLength(this.data.length)},h.prototype.write=function(p){var a;for(a=0;a=33088&&_<=40956)_-=33088;else{if(!(_>=57408&&_<=60351))throw new Error("Invalid SJIS character: "+this.data[a]+"\nMake sure your charset is UTF-8");_-=49472}p.put(_=192*(_>>>8&255)+(255&_),13)}},V.exports=h},73119:(V,l)=>{l.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};function x(y,h,p){switch(y){case l.Patterns.PATTERN000:return(h+p)%2==0;case l.Patterns.PATTERN001:return h%2==0;case l.Patterns.PATTERN010:return p%3==0;case l.Patterns.PATTERN011:return(h+p)%3==0;case l.Patterns.PATTERN100:return(Math.floor(h/2)+Math.floor(p/3))%2==0;case l.Patterns.PATTERN101:return h*p%2+h*p%3==0;case l.Patterns.PATTERN110:return(h*p%2+h*p%3)%2==0;case l.Patterns.PATTERN111:return(h*p%3+(h+p)%2)%2==0;default:throw new Error("bad maskPattern:"+y)}}l.isValid=function(h){return null!=h&&""!==h&&!isNaN(h)&&h>=0&&h<=7},l.from=function(h){return l.isValid(h)?parseInt(h,10):void 0},l.getPenaltyN1=function(h){for(var p=h.size,a=0,_=0,g=0,m=null,E=null,T=0;T=5&&(a+=_-5+3),m=F,_=1),(F=h.get(I,T))===E?g++:(g>=5&&(a+=g-5+3),E=F,g=1)}_>=5&&(a+=_-5+3),g>=5&&(a+=g-5+3)}return a},l.getPenaltyN2=function(h){for(var p=h.size,a=0,_=0;_=10&&(1488===_||93===_)&&a++,g=g<<1&2047|h.get(E,m),E>=10&&(1488===g||93===g)&&a++}return 40*a},l.getPenaltyN4=function(h){for(var p=0,a=h.data.length,_=0;_{var x=M(8081),y=M(94563);l.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},l.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},l.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},l.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},l.MIXED={bit:-1},l.getCharCountIndicator=function(a,_){if(!a.ccBits)throw new Error("Invalid mode: "+a);if(!x.isValid(_))throw new Error("Invalid version: "+_);return _>=1&&_<10?a.ccBits[0]:_<27?a.ccBits[1]:a.ccBits[2]},l.getBestModeForData=function(a){return y.testNumeric(a)?l.NUMERIC:y.testAlphanumeric(a)?l.ALPHANUMERIC:y.testKanji(a)?l.KANJI:l.BYTE},l.toString=function(a){if(a&&a.id)return a.id;throw new Error("Invalid mode")},l.isValid=function(a){return a&&a.bit&&a.ccBits},l.from=function(a,_){if(l.isValid(a))return a;try{return function h(p){if("string"!=typeof p)throw new Error("Param is not a string");switch(p.toLowerCase()){case"numeric":return l.NUMERIC;case"alphanumeric":return l.ALPHANUMERIC;case"kanji":return l.KANJI;case"byte":return l.BYTE;default:throw new Error("Unknown mode: "+p)}}(a)}catch{return _}}},18570:(V,l,M)=>{var x=M(12956);function y(h){this.mode=x.NUMERIC,this.data=h.toString()}y.getBitsLength=function(p){return 10*Math.floor(p/3)+(p%3?p%3*3+1:0)},y.prototype.getLength=function(){return this.data.length},y.prototype.getBitsLength=function(){return y.getBitsLength(this.data.length)},y.prototype.write=function(p){var a,_,g;for(a=0;a+3<=this.data.length;a+=3)_=this.data.substr(a,3),g=parseInt(_,10),p.put(g,10);var m=this.data.length-a;m>0&&(_=this.data.substr(a),g=parseInt(_,10),p.put(g,3*m+1))},V.exports=y},87137:(V,l,M)=>{var x=M(68623),y=M(1642);l.mul=function(p,a){for(var _=x.alloc(p.length+a.length-1),g=0;g=0;){for(var g=_[0],m=0;m{var x=M(68623),y=M(33392),h=M(46942),p=M(85924),a=M(51907),_=M(73023),g=M(6402),m=M(73119),E=M(43534),T=M(96252),I=M(66264),F=M(83861),W=M(12956),v=M(72107),L=M(17613);function B(tt,U,n){var i,s,t=tt.size,e=F.getEncodedBits(U,n);for(i=0;i<15;i++)tt.set(i<6?i:i<8?i+1:t-15+i,8,s=1==(e>>i&1),!0),tt.set(8,i<8?t-i-1:i<9?15-i-1+1:15-i-1,s,!0);tt.set(t-8,8,1,!0)}function st(tt,U,n,t){var e;if(L(tt))e=v.fromArray(tt);else{if("string"!=typeof tt)throw new Error("Invalid data");var i=U;if(!i){var s=v.rawSplit(tt);i=I.getBestVersionForData(s,n)}e=v.fromString(tt,i||40)}var f=I.getBestVersionForData(e,n);if(!f)throw new Error("The amount of data is too big to be stored in a QR Code");if(U){if(U=0&&f<=6&&(0===c||6===c)||c>=0&&c<=6&&(0===f||6===f)||f>=2&&f<=4&&c>=2&&c<=4,!0)}(o,U),function k(tt){for(var U=tt.size,n=8;n=7&&function A(tt,U){for(var e,i,s,n=tt.size,t=I.getEncodedBits(U),f=0;f<18;f++)e=Math.floor(f/3),tt.set(e,i=f%3+n-8-3,s=1==(t>>f&1),!0),tt.set(i,e,s,!0)}(o,U),function D(tt,U){for(var n=tt.size,t=-1,e=n-1,i=7,s=0,f=n-1;f>0;f-=2)for(6===f&&f--;;){for(var c=0;c<2;c++)if(!tt.isReserved(e,f-c)){var d=!1;s>>i&1)),tt.set(e,f-c,d),-1==--i&&(s++,i=7)}if((e+=t)<0||n<=e){e-=t,t=-t;break}}}(o,c),isNaN(t)&&(t=m.getBestMask(o,B.bind(null,o,n))),m.applyMask(t,o),B(o,n,t),{modules:o,version:U,errorCorrectionLevel:n,maskPattern:t,segments:e}}l.create=function(U,n){if(typeof U>"u"||""===U)throw new Error("No input text");var e,i,t=h.M;return typeof n<"u"&&(t=h.from(n.errorCorrectionLevel,h.M),e=I.from(n.version),i=m.from(n.maskPattern),n.toSJISFunc&&y.setToSJISFunction(n.toSJISFunc)),st(U,e,t,i)}},96252:(V,l,M)=>{var x=M(68623),y=M(87137),h=M(67086).lW;function p(a){this.genPoly=void 0,this.degree=a,this.degree&&this.initialize(this.degree)}p.prototype.initialize=function(_){this.degree=_,this.genPoly=y.generateECPolynomial(this.degree)},p.prototype.encode=function(_){if(!this.genPoly)throw new Error("Encoder not initialized");var g=x.alloc(this.degree),m=h.concat([_,g],_.length+this.degree),E=y.mod(m,this.genPoly),T=this.degree-E.length;if(T>0){var I=x.alloc(this.degree);return E.copy(I,T),I}return E},V.exports=p},94563:(V,l)=>{var M="[0-9]+",y="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",h="(?:(?![A-Z0-9 $%*+\\-./:]|"+(y=y.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";l.KANJI=new RegExp(y,"g"),l.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),l.BYTE=new RegExp(h,"g"),l.NUMERIC=new RegExp(M,"g"),l.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var p=new RegExp("^"+y+"$"),a=new RegExp("^"+M+"$"),_=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");l.testKanji=function(m){return p.test(m)},l.testNumeric=function(m){return a.test(m)},l.testAlphanumeric=function(m){return _.test(m)}},72107:(V,l,M)=>{var x=M(12956),y=M(18570),h=M(3799),p=M(59556),a=M(38918),_=M(94563),g=M(33392),m=M(12015);function E(k){return unescape(encodeURIComponent(k)).length}function T(k,w,A){for(var D,B=[];null!==(D=k.exec(A));)B.push({data:D[0],index:D.index,mode:w,length:D[0].length});return B}function I(k){var B,D,w=T(_.NUMERIC,x.NUMERIC,k),A=T(_.ALPHANUMERIC,x.ALPHANUMERIC,k);return g.isKanjiModeEnabled()?(B=T(_.BYTE,x.BYTE,k),D=T(_.KANJI,x.KANJI,k)):(B=T(_.BYTE_KANJI,x.BYTE,k),D=[]),w.concat(A,B,D).sort(function(at,st){return at.index-st.index}).map(function(at){return{data:at.data,mode:at.mode,length:at.length}})}function F(k,w){switch(w){case x.NUMERIC:return y.getBitsLength(k);case x.ALPHANUMERIC:return h.getBitsLength(k);case x.KANJI:return a.getBitsLength(k);case x.BYTE:return p.getBitsLength(k)}}function N(k,w){var A,B=x.getBestModeForData(k);if((A=x.from(w,B))!==x.BYTE&&A.bit=0?w[w.length-1]:null;return B&&B.mode===A.mode?(w[w.length-1].data+=A.data,w):(w.push(A),w)},[])}(st))},l.rawSplit=function(w){return l.fromArray(I(w,g.isKanjiModeEnabled()))}},33392:(V,l)=>{var M,x=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];l.getSymbolSize=function(h){if(!h)throw new Error('"version" cannot be null or undefined');if(h<1||h>40)throw new Error('"version" should be in range from 1 to 40');return 4*h+17},l.getSymbolTotalCodewords=function(h){return x[h]},l.getBCHDigit=function(y){for(var h=0;0!==y;)h++,y>>>=1;return h},l.setToSJISFunction=function(h){if("function"!=typeof h)throw new Error('"toSJISFunc" is not a valid function.');M=h},l.isKanjiModeEnabled=function(){return typeof M<"u"},l.toSJIS=function(h){return M(h)}},8081:(V,l)=>{l.isValid=function(x){return!isNaN(x)&&x>=1&&x<=40}},66264:(V,l,M)=>{var x=M(33392),y=M(43534),h=M(46942),p=M(12956),a=M(8081),_=M(17613),m=x.getBCHDigit(7973);function T(W,v){return p.getCharCountIndicator(W,v)+4}function I(W,v){var L=0;return W.forEach(function(N){var k=T(N.mode,v);L+=k+N.getBitsLength()}),L}l.from=function(v,L){return a.isValid(v)?parseInt(v,10):L},l.getCapacity=function(v,L,N){if(!a.isValid(v))throw new Error("Invalid QR Code version");typeof N>"u"&&(N=p.BYTE);var A=8*(x.getSymbolTotalCodewords(v)-y.getTotalCodewordsCount(v,L));if(N===p.MIXED)return A;var B=A-T(N,v);switch(N){case p.NUMERIC:return Math.floor(B/10*3);case p.ALPHANUMERIC:return Math.floor(B/11*2);case p.KANJI:return Math.floor(B/13);default:return Math.floor(B/8)}},l.getBestVersionForData=function(v,L){var N,k=h.from(L,h.M);if(_(v)){if(v.length>1)return function F(W,v){for(var L=1;L<=40;L++)if(I(W,L)<=l.getCapacity(L,v,p.MIXED))return L}(v,k);if(0===v.length)return 1;N=v[0]}else N=v;return function E(W,v,L){for(var N=1;N<=40;N++)if(v<=l.getCapacity(N,L,W))return N}(N.mode,N.getLength(),k)},l.getEncodedBits=function(v){if(!a.isValid(v)||v<7)throw new Error("Invalid QR Code version");for(var L=v<<12;x.getBCHDigit(L)-m>=0;)L^=7973<{var x=M(98347);l.render=function(a,_,g){var m=g,E=_;typeof m>"u"&&(!_||!_.getContext)&&(m=_,_=void 0),_||(E=function h(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}()),m=x.getOptions(m);var T=x.getImageWidth(a.modules.size,m),I=E.getContext("2d"),F=I.createImageData(T,T);return x.qrToImageData(F.data,a,m),function y(p,a,_){p.clearRect(0,0,a.width,a.height),a.style||(a.style={}),a.height=_,a.width=_,a.style.height=_+"px",a.style.width=_+"px"}(I,E,T),I.putImageData(F,0,0),E},l.renderToDataURL=function(a,_,g){var m=g;return typeof m>"u"&&(!_||!_.getContext)&&(m=_,_=void 0),m||(m={}),l.render(a,_,m).toDataURL(m.type||"image/png",(m.rendererOpts||{}).quality)}},75049:(V,l,M)=>{var x=M(98347);function y(a,_){var g=a.a/255,m=_+'="'+a.hex+'"';return g<1?m+" "+_+'-opacity="'+g.toFixed(2).slice(1)+'"':m}function h(a,_,g){var m=a+_;return typeof g<"u"&&(m+=" "+g),m}l.render=function(_,g,m){var E=x.getOptions(g),T=_.modules.size,I=_.modules.data,F=T+2*E.margin,W=E.color.light.a?"':"",v="0&&W>0&&a[F-1]||(m+=T?h("M",W+g,.5+v+g):h("m",E,0),E=0,T=!1),W+1<_&&a[F+1]||(m+=h("h",I),I=0)):E++}return m}(I,T,E.margin)+'"/>',k=''+W+v+"\n";return"function"==typeof m&&m(null,k),k}},98347:(V,l)=>{function M(x){if("number"==typeof x&&(x=x.toString()),"string"!=typeof x)throw new Error("Color should be defined as hex string");var y=x.slice().replace("#","").split("");if(y.length<3||5===y.length||y.length>8)throw new Error("Invalid hex color: "+x);(3===y.length||4===y.length)&&(y=Array.prototype.concat.apply([],y.map(function(p){return[p,p]}))),6===y.length&&y.push("F","F");var h=parseInt(y.join(""),16);return{r:h>>24&255,g:h>>16&255,b:h>>8&255,a:255&h,hex:"#"+y.slice(0,6).join("")}}l.getOptions=function(y){y||(y={}),y.color||(y.color={});var p=y.width&&y.width>=21?y.width:void 0;return{width:p,scale:p?4:y.scale||4,margin:typeof y.margin>"u"||null===y.margin||y.margin<0?4:y.margin,color:{dark:M(y.color.dark||"#000000ff"),light:M(y.color.light||"#ffffffff")},type:y.type,rendererOpts:y.rendererOpts||{}}},l.getScale=function(y,h){return h.width&&h.width>=y+2*h.margin?h.width/(y+2*h.margin):h.scale},l.getImageWidth=function(y,h){var p=l.getScale(y,h);return Math.floor((y+2*h.margin)*p)},l.qrToImageData=function(y,h,p){for(var a=h.modules.size,_=h.modules.data,g=l.getScale(a,p),m=Math.floor((a+2*p.margin)*g),E=p.margin*g,T=[p.color.light,p.color.dark],I=0;I=E&&F>=E&&I{"use strict";var x=M(17613),h=(p.TYPED_ARRAY_SUPPORT=function y(){try{var w=new Uint8Array(1);return w.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===w.foo()}catch{return!1}}())?2147483647:1073741823;function p(w,A,B){return p.TYPED_ARRAY_SUPPORT||this instanceof p?"number"==typeof w?m(this,w):function k(w,A,B,D){if("number"==typeof A)throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&A instanceof ArrayBuffer?function I(w,A,B,D){if(B<0||A.byteLength=h)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+h.toString(16)+" bytes");return 0|w}function g(w,A){var B;return p.TYPED_ARRAY_SUPPORT?(B=new Uint8Array(A)).__proto__=p.prototype:(null===(B=w)&&(B=new p(A)),B.length=A),B}function m(w,A){var B=g(w,A<0?0:0|a(A));if(!p.TYPED_ARRAY_SUPPORT)for(var D=0;D55295&&B<57344){if(!J){if(B>56319){(A-=3)>-1&&at.push(239,191,189);continue}if(st+1===D){(A-=3)>-1&&at.push(239,191,189);continue}J=B;continue}if(B<56320){(A-=3)>-1&&at.push(239,191,189),J=B;continue}B=65536+(J-55296<<10|B-56320)}else J&&(A-=3)>-1&&at.push(239,191,189);if(J=null,B<128){if((A-=1)<0)break;at.push(B)}else if(B<2048){if((A-=2)<0)break;at.push(B>>6|192,63&B|128)}else if(B<65536){if((A-=3)<0)break;at.push(B>>12|224,B>>6&63|128,63&B|128)}else{if(!(B<1114112))throw new Error("Invalid code point");if((A-=4)<0)break;at.push(B>>18|240,B>>12&63|128,B>>6&63|128,63&B|128)}}return at}function v(w){return p.isBuffer(w)?w.length:typeof ArrayBuffer<"u"&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(w)||w instanceof ArrayBuffer)?w.byteLength:("string"!=typeof w&&(w=""+w),0===w.length?0:W(w).length)}p.TYPED_ARRAY_SUPPORT&&(p.prototype.__proto__=Uint8Array.prototype,p.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&p[Symbol.species]===p&&Object.defineProperty(p,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1})),p.prototype.write=function(A,B,D){void 0===B||void 0===D&&"string"==typeof B?(D=this.length,B=0):isFinite(B)&&(B|=0,isFinite(D)?D|=0:D=void 0);var J=this.length-B;if((void 0===D||D>J)&&(D=J),A.length>0&&(D<0||B<0)||B>this.length)throw new RangeError("Attempt to write outside buffer bounds");return function N(w,A,B,D){return function L(w,A,B,D){for(var J=0;J=A.length||J>=w.length);++J)A[J+B]=w[J];return J}(W(A,w.length-B),w,B,D)}(this,A,B,D)},p.prototype.slice=function(A,B){var J,D=this.length;if((A=~~A)<0?(A+=D)<0&&(A=0):A>D&&(A=D),(B=void 0===B?D:~~B)<0?(B+=D)<0&&(B=0):B>D&&(B=D),B=A.length&&(B=A.length),B||(B=0),J>0&&J=this.length)throw new RangeError("sourceStart out of bounds");if(J<0)throw new RangeError("sourceEnd out of bounds");J>this.length&&(J=this.length),A.length-B=0;--st)A[st+B]=this[st+D];else if(at<1e3||!p.TYPED_ARRAY_SUPPORT)for(st=0;st>>=0,D=void 0===D?this.length:D>>>0,A||(A=0),"number"==typeof A)for(at=B;at{"use strict";var y=M(46402),h=M(74144),p="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;l.lW=m,l.h2=50;var a=2147483647;function g(O){if(O>a)throw new RangeError('The value "'+O+'" is invalid for option "size"');var b=new Uint8Array(O);return Object.setPrototypeOf(b,m.prototype),b}function m(O,b,S){if("number"==typeof O){if("string"==typeof b)throw new TypeError('The "string" argument must be of type string. Received type number');return F(O)}return E(O,b,S)}function E(O,b,S){if("string"==typeof O)return function W(O,b){if(("string"!=typeof b||""===b)&&(b="utf8"),!m.isEncoding(b))throw new TypeError("Unknown encoding: "+b);var S=0|B(O,b),q=g(S),j=q.write(O,b);return j!==S&&(q=q.slice(0,j)),q}(O,b);if(ArrayBuffer.isView(O))return function L(O){if(Xt(O,Uint8Array)){var b=new Uint8Array(O);return N(b.buffer,b.byteOffset,b.byteLength)}return v(O)}(O);if(null==O)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof O);if(Xt(O,ArrayBuffer)||O&&Xt(O.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Xt(O,SharedArrayBuffer)||O&&Xt(O.buffer,SharedArrayBuffer)))return N(O,b,S);if("number"==typeof O)throw new TypeError('The "value" argument must not be of type number. Received type number');var q=O.valueOf&&O.valueOf();if(null!=q&&q!==O)return m.from(q,b,S);var j=function k(O){if(m.isBuffer(O)){var b=0|w(O.length),S=g(b);return 0===S.length||O.copy(S,0,0,b),S}return void 0!==O.length?"number"!=typeof O.length||_t(O.length)?g(0):v(O):"Buffer"===O.type&&Array.isArray(O.data)?v(O.data):void 0}(O);if(j)return j;if(typeof Symbol<"u"&&null!=Symbol.toPrimitive&&"function"==typeof O[Symbol.toPrimitive])return m.from(O[Symbol.toPrimitive]("string"),b,S);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof O)}function T(O){if("number"!=typeof O)throw new TypeError('"size" argument must be of type number');if(O<0)throw new RangeError('The value "'+O+'" is invalid for option "size"')}function F(O){return T(O),g(O<0?0:0|w(O))}function v(O){for(var b=O.length<0?0:0|w(O.length),S=g(b),q=0;q=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|O}function B(O,b){if(m.isBuffer(O))return O.length;if(ArrayBuffer.isView(O)||Xt(O,ArrayBuffer))return O.byteLength;if("string"!=typeof O)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof O);var S=O.length,q=arguments.length>2&&!0===arguments[2];if(!q&&0===S)return 0;for(var j=!1;;)switch(b){case"ascii":case"latin1":case"binary":return S;case"utf8":case"utf-8":return ut(O).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*S;case"hex":return S>>>1;case"base64":return vt(O).length;default:if(j)return q?-1:ut(O).length;b=(""+b).toLowerCase(),j=!0}}function D(O,b,S){var q=!1;if((void 0===b||b<0)&&(b=0),b>this.length||((void 0===S||S>this.length)&&(S=this.length),S<=0)||(S>>>=0)<=(b>>>=0))return"";for(O||(O="utf8");;)switch(O){case"hex":return r(this,b,S);case"utf8":case"utf-8":return s(this,b,S);case"ascii":return d(this,b,S);case"latin1":case"binary":return o(this,b,S);case"base64":return i(this,b,S);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return u(this,b,S);default:if(q)throw new TypeError("Unknown encoding: "+O);O=(O+"").toLowerCase(),q=!0}}function J(O,b,S){var q=O[b];O[b]=O[S],O[S]=q}function at(O,b,S,q,j){if(0===O.length)return-1;if("string"==typeof S?(q=S,S=0):S>2147483647?S=2147483647:S<-2147483648&&(S=-2147483648),_t(S=+S)&&(S=j?0:O.length-1),S<0&&(S=O.length+S),S>=O.length){if(j)return-1;S=O.length-1}else if(S<0){if(!j)return-1;S=0}if("string"==typeof b&&(b=m.from(b,q)),m.isBuffer(b))return 0===b.length?-1:st(O,b,S,q,j);if("number"==typeof b)return b&=255,"function"==typeof Uint8Array.prototype.indexOf?j?Uint8Array.prototype.indexOf.call(O,b,S):Uint8Array.prototype.lastIndexOf.call(O,b,S):st(O,[b],S,q,j);throw new TypeError("val must be string, number or Buffer")}function st(O,b,S,q,j){var Gt,Y=1,nt=O.length,it=b.length;if(void 0!==q&&("ucs2"===(q=String(q).toLowerCase())||"ucs-2"===q||"utf16le"===q||"utf-16le"===q)){if(O.length<2||b.length<2)return-1;Y=2,nt/=2,it/=2,S/=2}function lt(xt,Pt){return 1===Y?xt[Pt]:xt.readUInt16BE(Pt*Y)}if(j){var ct=-1;for(Gt=S;Gtnt&&(S=nt-it),Gt=S;Gt>=0;Gt--){for(var dt=!0,jt=0;jtj&&(q=j):q=j;var Y=b.length;q>Y/2&&(q=Y/2);for(var nt=0;nt>8,Y.push(S%256),Y.push(q);return Y}(b,O.length-S),O,S,q)}function i(O,b,S){return y.fromByteArray(0===b&&S===O.length?O:O.slice(b,S))}function s(O,b,S){S=Math.min(O.length,S);for(var q=[],j=b;j239?4:Y>223?3:Y>191?2:1;if(j+it<=S)switch(it){case 1:Y<128&&(nt=Y);break;case 2:128==(192&(lt=O[j+1]))&&(dt=(31&Y)<<6|63<)>127&&(nt=dt);break;case 3:Gt=O[j+2],128==(192&(lt=O[j+1]))&&128==(192&Gt)&&(dt=(15&Y)<<12|(63<)<<6|63&Gt)>2047&&(dt<55296||dt>57343)&&(nt=dt);break;case 4:Gt=O[j+2],ct=O[j+3],128==(192&(lt=O[j+1]))&&128==(192&Gt)&&128==(192&ct)&&(dt=(15&Y)<<18|(63<)<<12|(63&Gt)<<6|63&ct)>65535&&dt<1114112&&(nt=dt)}null===nt?(nt=65533,it=1):nt>65535&&(q.push((nt-=65536)>>>10&1023|55296),nt=56320|1023&nt),q.push(nt),j+=it}return function c(O){var b=O.length;if(b<=f)return String.fromCharCode.apply(String,O);for(var S="",q=0;qj.length?m.from(nt).copy(j,Y):Uint8Array.prototype.set.call(j,nt,Y);else{if(!m.isBuffer(nt))throw new TypeError('"list" argument must be an Array of Buffers');nt.copy(j,Y)}Y+=nt.length}return j},m.byteLength=B,m.prototype._isBuffer=!0,m.prototype.swap16=function(){var b=this.length;if(b%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var S=0;SS&&(b+=" ... "),""},p&&(m.prototype[p]=m.prototype.inspect),m.prototype.compare=function(b,S,q,j,Y){if(Xt(b,Uint8Array)&&(b=m.from(b,b.offset,b.byteLength)),!m.isBuffer(b))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof b);if(void 0===S&&(S=0),void 0===q&&(q=b?b.length:0),void 0===j&&(j=0),void 0===Y&&(Y=this.length),S<0||q>b.length||j<0||Y>this.length)throw new RangeError("out of range index");if(j>=Y&&S>=q)return 0;if(j>=Y)return-1;if(S>=q)return 1;if(this===b)return 0;for(var nt=(Y>>>=0)-(j>>>=0),it=(q>>>=0)-(S>>>=0),lt=Math.min(nt,it),Gt=this.slice(j,Y),ct=b.slice(S,q),dt=0;dt>>=0,isFinite(q)?(q>>>=0,void 0===j&&(j="utf8")):(j=q,q=void 0)}var Y=this.length-S;if((void 0===q||q>Y)&&(q=Y),b.length>0&&(q<0||S<0)||S>this.length)throw new RangeError("Attempt to write outside buffer bounds");j||(j="utf8");for(var nt=!1;;)switch(j){case"hex":return tt(this,b,S,q);case"utf8":case"utf-8":return U(this,b,S,q);case"ascii":case"latin1":case"binary":return n(this,b,S,q);case"base64":return t(this,b,S,q);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e(this,b,S,q);default:if(nt)throw new TypeError("Unknown encoding: "+j);j=(""+j).toLowerCase(),nt=!0}},m.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var f=4096;function d(O,b,S){var q="";S=Math.min(O.length,S);for(var j=b;jq)&&(S=q);for(var j="",Y=b;YS)throw new RangeError("Trying to access beyond buffer length")}function Z(O,b,S,q,j,Y){if(!m.isBuffer(O))throw new TypeError('"buffer" argument must be a Buffer instance');if(b>j||bO.length)throw new RangeError("Index out of range")}function G(O,b,S,q,j,Y){if(S+q>O.length)throw new RangeError("Index out of range");if(S<0)throw new RangeError("Index out of range")}function Q(O,b,S,q,j){return b=+b,S>>>=0,j||G(O,0,S,4),h.write(O,b,S,q,23,4),S+4}function et(O,b,S,q,j){return b=+b,S>>>=0,j||G(O,0,S,8),h.write(O,b,S,q,52,8),S+8}m.prototype.slice=function(b,S){var q=this.length;(b=~~b)<0?(b+=q)<0&&(b=0):b>q&&(b=q),(S=void 0===S?q:~~S)<0?(S+=q)<0&&(S=0):S>q&&(S=q),S>>=0,S>>>=0,q||z(b,S,this.length);for(var j=this[b],Y=1,nt=0;++nt>>=0,S>>>=0,q||z(b,S,this.length);for(var j=this[b+--S],Y=1;S>0&&(Y*=256);)j+=this[b+--S]*Y;return j},m.prototype.readUint8=m.prototype.readUInt8=function(b,S){return b>>>=0,S||z(b,1,this.length),this[b]},m.prototype.readUint16LE=m.prototype.readUInt16LE=function(b,S){return b>>>=0,S||z(b,2,this.length),this[b]|this[b+1]<<8},m.prototype.readUint16BE=m.prototype.readUInt16BE=function(b,S){return b>>>=0,S||z(b,2,this.length),this[b]<<8|this[b+1]},m.prototype.readUint32LE=m.prototype.readUInt32LE=function(b,S){return b>>>=0,S||z(b,4,this.length),(this[b]|this[b+1]<<8|this[b+2]<<16)+16777216*this[b+3]},m.prototype.readUint32BE=m.prototype.readUInt32BE=function(b,S){return b>>>=0,S||z(b,4,this.length),16777216*this[b]+(this[b+1]<<16|this[b+2]<<8|this[b+3])},m.prototype.readIntLE=function(b,S,q){b>>>=0,S>>>=0,q||z(b,S,this.length);for(var j=this[b],Y=1,nt=0;++nt=(Y*=128)&&(j-=Math.pow(2,8*S)),j},m.prototype.readIntBE=function(b,S,q){b>>>=0,S>>>=0,q||z(b,S,this.length);for(var j=S,Y=1,nt=this[b+--j];j>0&&(Y*=256);)nt+=this[b+--j]*Y;return nt>=(Y*=128)&&(nt-=Math.pow(2,8*S)),nt},m.prototype.readInt8=function(b,S){return b>>>=0,S||z(b,1,this.length),128&this[b]?-1*(255-this[b]+1):this[b]},m.prototype.readInt16LE=function(b,S){b>>>=0,S||z(b,2,this.length);var q=this[b]|this[b+1]<<8;return 32768&q?4294901760|q:q},m.prototype.readInt16BE=function(b,S){b>>>=0,S||z(b,2,this.length);var q=this[b+1]|this[b]<<8;return 32768&q?4294901760|q:q},m.prototype.readInt32LE=function(b,S){return b>>>=0,S||z(b,4,this.length),this[b]|this[b+1]<<8|this[b+2]<<16|this[b+3]<<24},m.prototype.readInt32BE=function(b,S){return b>>>=0,S||z(b,4,this.length),this[b]<<24|this[b+1]<<16|this[b+2]<<8|this[b+3]},m.prototype.readFloatLE=function(b,S){return b>>>=0,S||z(b,4,this.length),h.read(this,b,!0,23,4)},m.prototype.readFloatBE=function(b,S){return b>>>=0,S||z(b,4,this.length),h.read(this,b,!1,23,4)},m.prototype.readDoubleLE=function(b,S){return b>>>=0,S||z(b,8,this.length),h.read(this,b,!0,52,8)},m.prototype.readDoubleBE=function(b,S){return b>>>=0,S||z(b,8,this.length),h.read(this,b,!1,52,8)},m.prototype.writeUintLE=m.prototype.writeUIntLE=function(b,S,q,j){b=+b,S>>>=0,q>>>=0,j||Z(this,b,S,q,Math.pow(2,8*q)-1,0);var nt=1,it=0;for(this[S]=255&b;++it>>=0,q>>>=0,j||Z(this,b,S,q,Math.pow(2,8*q)-1,0);var nt=q-1,it=1;for(this[S+nt]=255&b;--nt>=0&&(it*=256);)this[S+nt]=b/it&255;return S+q},m.prototype.writeUint8=m.prototype.writeUInt8=function(b,S,q){return b=+b,S>>>=0,q||Z(this,b,S,1,255,0),this[S]=255&b,S+1},m.prototype.writeUint16LE=m.prototype.writeUInt16LE=function(b,S,q){return b=+b,S>>>=0,q||Z(this,b,S,2,65535,0),this[S]=255&b,this[S+1]=b>>>8,S+2},m.prototype.writeUint16BE=m.prototype.writeUInt16BE=function(b,S,q){return b=+b,S>>>=0,q||Z(this,b,S,2,65535,0),this[S]=b>>>8,this[S+1]=255&b,S+2},m.prototype.writeUint32LE=m.prototype.writeUInt32LE=function(b,S,q){return b=+b,S>>>=0,q||Z(this,b,S,4,4294967295,0),this[S+3]=b>>>24,this[S+2]=b>>>16,this[S+1]=b>>>8,this[S]=255&b,S+4},m.prototype.writeUint32BE=m.prototype.writeUInt32BE=function(b,S,q){return b=+b,S>>>=0,q||Z(this,b,S,4,4294967295,0),this[S]=b>>>24,this[S+1]=b>>>16,this[S+2]=b>>>8,this[S+3]=255&b,S+4},m.prototype.writeIntLE=function(b,S,q,j){if(b=+b,S>>>=0,!j){var Y=Math.pow(2,8*q-1);Z(this,b,S,q,Y-1,-Y)}var nt=0,it=1,lt=0;for(this[S]=255&b;++nt>0)-lt&255;return S+q},m.prototype.writeIntBE=function(b,S,q,j){if(b=+b,S>>>=0,!j){var Y=Math.pow(2,8*q-1);Z(this,b,S,q,Y-1,-Y)}var nt=q-1,it=1,lt=0;for(this[S+nt]=255&b;--nt>=0&&(it*=256);)b<0&&0===lt&&0!==this[S+nt+1]&&(lt=1),this[S+nt]=(b/it>>0)-lt&255;return S+q},m.prototype.writeInt8=function(b,S,q){return b=+b,S>>>=0,q||Z(this,b,S,1,127,-128),b<0&&(b=255+b+1),this[S]=255&b,S+1},m.prototype.writeInt16LE=function(b,S,q){return b=+b,S>>>=0,q||Z(this,b,S,2,32767,-32768),this[S]=255&b,this[S+1]=b>>>8,S+2},m.prototype.writeInt16BE=function(b,S,q){return b=+b,S>>>=0,q||Z(this,b,S,2,32767,-32768),this[S]=b>>>8,this[S+1]=255&b,S+2},m.prototype.writeInt32LE=function(b,S,q){return b=+b,S>>>=0,q||Z(this,b,S,4,2147483647,-2147483648),this[S]=255&b,this[S+1]=b>>>8,this[S+2]=b>>>16,this[S+3]=b>>>24,S+4},m.prototype.writeInt32BE=function(b,S,q){return b=+b,S>>>=0,q||Z(this,b,S,4,2147483647,-2147483648),b<0&&(b=4294967295+b+1),this[S]=b>>>24,this[S+1]=b>>>16,this[S+2]=b>>>8,this[S+3]=255&b,S+4},m.prototype.writeFloatLE=function(b,S,q){return Q(this,b,S,!0,q)},m.prototype.writeFloatBE=function(b,S,q){return Q(this,b,S,!1,q)},m.prototype.writeDoubleLE=function(b,S,q){return et(this,b,S,!0,q)},m.prototype.writeDoubleBE=function(b,S,q){return et(this,b,S,!1,q)},m.prototype.copy=function(b,S,q,j){if(!m.isBuffer(b))throw new TypeError("argument should be a Buffer");if(q||(q=0),!j&&0!==j&&(j=this.length),S>=b.length&&(S=b.length),S||(S=0),j>0&&j=this.length)throw new RangeError("Index out of range");if(j<0)throw new RangeError("sourceEnd out of bounds");j>this.length&&(j=this.length),b.length-S>>=0,q=void 0===q?this.length:q>>>0,b||(b=0),"number"==typeof b)for(nt=S;nt55295&&S<57344){if(!j){if(S>56319){(b-=3)>-1&&Y.push(239,191,189);continue}if(nt+1===q){(b-=3)>-1&&Y.push(239,191,189);continue}j=S;continue}if(S<56320){(b-=3)>-1&&Y.push(239,191,189),j=S;continue}S=65536+(j-55296<<10|S-56320)}else j&&(b-=3)>-1&&Y.push(239,191,189);if(j=null,S<128){if((b-=1)<0)break;Y.push(S)}else if(S<2048){if((b-=2)<0)break;Y.push(S>>6|192,63&S|128)}else if(S<65536){if((b-=3)<0)break;Y.push(S>>12|224,S>>6&63|128,63&S|128)}else{if(!(S<1114112))throw new Error("Invalid code point");if((b-=4)<0)break;Y.push(S>>18|240,S>>12&63|128,S>>6&63|128,63&S|128)}}return Y}function vt(O){return y.toByteArray(function Ot(O){if((O=(O=O.split("=")[0]).trim().replace(ht,"")).length<2)return"";for(;O.length%4!=0;)O+="=";return O}(O))}function At(O,b,S,q){for(var j=0;j=b.length||j>=O.length);++j)b[j+S]=O[j];return j}function Xt(O,b){return O instanceof b||null!=O&&null!=O.constructor&&null!=O.constructor.name&&O.constructor.name===b.name}function _t(O){return O!=O}var Nt=function(){for(var O="0123456789abcdef",b=new Array(256),S=0;S<16;++S)for(var q=16*S,j=0;j<16;++j)b[q+j]=O[S]+O[j];return b}()},9805:(V,l,M)=>{"use strict";const x=M(71141),y=M(80318),h=M(71675);function g(N){if("string"!=typeof N||1!==N.length)throw new TypeError("arrayFormatSeparator must be single character string")}function m(N,k){return k.encode?k.strict?x(N):encodeURIComponent(N):N}function E(N,k){return k.decode?y(N):N}function T(N){return Array.isArray(N)?N.sort():"object"==typeof N?T(Object.keys(N)).sort((k,w)=>Number(k)-Number(w)).map(k=>N[k]):N}function I(N){const k=N.indexOf("#");return-1!==k&&(N=N.slice(0,k)),N}function W(N){const k=(N=I(N)).indexOf("?");return-1===k?"":N.slice(k+1)}function v(N,k){return k.parseNumbers&&!Number.isNaN(Number(N))&&"string"==typeof N&&""!==N.trim()?N=Number(N):k.parseBooleans&&null!==N&&("true"===N.toLowerCase()||"false"===N.toLowerCase())&&(N="true"===N.toLowerCase()),N}function L(N,k){g((k=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},k)).arrayFormatSeparator);const w=function _(N){let k;switch(N.arrayFormat){case"index":return(w,A,B)=>{k=/\[(\d*)\]$/.exec(w),w=w.replace(/\[\d*\]$/,""),k?(void 0===B[w]&&(B[w]={}),B[w][k[1]]=A):B[w]=A};case"bracket":return(w,A,B)=>{k=/(\[\])$/.exec(w),B[w=w.replace(/\[\]$/,"")]=k?void 0!==B[w]?[].concat(B[w],A):[A]:A};case"comma":case"separator":return(w,A,B)=>{const J="string"==typeof A&&A.split("").indexOf(N.arrayFormatSeparator)>-1?A.split(N.arrayFormatSeparator).map(at=>E(at,N)):null===A?A:E(A,N);B[w]=J};default:return(w,A,B)=>{B[w]=void 0!==B[w]?[].concat(B[w],A):A}}}(k),A=Object.create(null);if("string"!=typeof N||!(N=N.trim().replace(/^[?#&]/,"")))return A;for(const B of N.split("&")){let[D,J]=h(k.decode?B.replace(/\+/g," "):B,"=");J=void 0===J?null:["comma","separator"].includes(k.arrayFormat)?J:E(J,k),w(E(D,k),J,A)}for(const B of Object.keys(A)){const D=A[B];if("object"==typeof D&&null!==D)for(const J of Object.keys(D))D[J]=v(D[J],k);else A[B]=v(D,k)}return!1===k.sort?A:(!0===k.sort?Object.keys(A).sort():Object.keys(A).sort(k.sort)).reduce((B,D)=>{const J=A[D];return B[D]=Boolean(J)&&"object"==typeof J&&!Array.isArray(J)?T(J):J,B},Object.create(null))}l.extract=W,l.parse=L,l.stringify=(N,k)=>{if(!N)return"";g((k=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},k)).arrayFormatSeparator);const w=J=>k.skipNull&&(N=>null==N)(N[J])||k.skipEmptyString&&""===N[J],A=function a(N){switch(N.arrayFormat){case"index":return k=>(w,A)=>{const B=w.length;return void 0===A||N.skipNull&&null===A||N.skipEmptyString&&""===A?w:null===A?[...w,[m(k,N),"[",B,"]"].join("")]:[...w,[m(k,N),"[",m(B,N),"]=",m(A,N)].join("")]};case"bracket":return k=>(w,A)=>void 0===A||N.skipNull&&null===A||N.skipEmptyString&&""===A?w:null===A?[...w,[m(k,N),"[]"].join("")]:[...w,[m(k,N),"[]=",m(A,N)].join("")];case"comma":case"separator":return k=>(w,A)=>null==A||0===A.length?w:0===w.length?[[m(k,N),"=",m(A,N)].join("")]:[[w,m(A,N)].join(N.arrayFormatSeparator)];default:return k=>(w,A)=>void 0===A||N.skipNull&&null===A||N.skipEmptyString&&""===A?w:null===A?[...w,m(k,N)]:[...w,[m(k,N),"=",m(A,N)].join("")]}}(k),B={};for(const J of Object.keys(N))w(J)||(B[J]=N[J]);const D=Object.keys(B);return!1!==k.sort&&D.sort(k.sort),D.map(J=>{const at=N[J];return void 0===at?"":null===at?m(J,k):Array.isArray(at)?at.reduce(A(J),[]).join("&"):m(J,k)+"="+m(at,k)}).filter(J=>J.length>0).join("&")},l.parseUrl=(N,k)=>{k=Object.assign({decode:!0},k);const[w,A]=h(N,"#");return Object.assign({url:w.split("?")[0]||"",query:L(W(N),k)},k&&k.parseFragmentIdentifier&&A?{fragmentIdentifier:E(A,k)}:{})},l.stringifyUrl=(N,k)=>{k=Object.assign({encode:!0,strict:!0},k);const w=I(N.url).split("?")[0]||"",A=l.extract(N.url),B=l.parse(A,{sort:!1}),D=Object.assign(B,N.query);let J=l.stringify(D,k);J&&(J=`?${J}`);let at=function F(N){let k="";const w=N.indexOf("#");return-1!==w&&(k=N.slice(w)),k}(N.url);return N.fragmentIdentifier&&(at=`#${m(N.fragmentIdentifier,k)}`),`${w}${J}${at}`}},12625:(V,l,M)=>{const x=M(44407),y=M(2272);var h="object"==typeof Reflect?Reflect:null,p=h&&"function"==typeof h.apply?h.apply:function(E,T,I){return Function.prototype.apply.call(E,T,I)};function a(){y.call(this)}function _(m,E,T){try{p(m,E,T)}catch(I){setTimeout(()=>{throw I})}}function g(m,E){for(var T=new Array(E),I=0;I0&&(W=E[0]),W instanceof Error)throw W;var v=new Error("Unhandled error."+(W?" ("+W.message+")":""));throw v.context=W,v}var L=F[m];if(void 0===L)return!1;if("function"==typeof L)_(L,this,E);else{var N=L.length,k=g(L,N);for(T=0;T=2&&("function"==typeof arguments[1]?a.task=arguments[1]:a.n=arguments[1]);var _=a.task;if(a.task=function(){_(h.leave)},h.current+a.n-p>h.capacity)return 1===p&&(h.current--,h.firstHere=!1),h.queue.push(a);h.current+=a.n-p,a.task(h.leave),1===p&&(h.firstHere=!1)},leave:function(p){if(h.current-=p=p||1,h.queue.length){var a=h.queue[0];a.n+h.current>h.capacity||(h.queue.shift(),h.current+=a.n,M(a.task))}else if(h.current<0)throw new Error("leave called too many times.")},available:function(p){return h.current+(p=p||1)<=h.capacity}};return h}}()},71675:V=>{"use strict";V.exports=(l,M)=>{if("string"!=typeof l||"string"!=typeof M)throw new TypeError("Expected the arguments to be of type `string`");if(""===M)return[l];const x=l.indexOf(M);return-1===x?[l]:[l.slice(0,x),l.slice(x+M.length)]}},71141:V=>{"use strict";V.exports=l=>encodeURIComponent(l).replace(/[!'()*]/g,M=>`%${M.charCodeAt(0).toString(16).toUpperCase()}`)},37753:V=>{V.exports=function(){var l=document.getSelection();if(!l.rangeCount)return function(){};for(var M=document.activeElement,x=[],y=0;y{var x=M(38260).strict;V.exports=function(h){if(x(h)){var p=Buffer.from(h.buffer);return h.byteLength!==h.buffer.byteLength&&(p=p.slice(h.byteOffset,h.byteOffset+h.byteLength)),p}return Buffer.from(h)}},79775:(V,l,M)=>{const x=M(2272).EventEmitter,y=M(44407).inherits,h=M(29707),p=M(53223),a=M(48819),_=M(78980),g=M(10361),E=(M(32914),M(88644)),T=function(){};function I(W){const v=this;x.call(v),v.setMaxListeners(30),W=W||{};const L={sendAsync:v._handleAsync.bind(v)};v._blockTracker=W.blockTracker||new p({provider:W.blockTrackerProvider||L,pollingInterval:W.pollingInterval||4e3,setSkipCacheFlag:!0}),v._ready=new g,v.currentBlock=null,v._providers=[]}V.exports=I,y(I,x),I.prototype.start=function(W=T){const v=this;v._ready.go(),v._blockTracker.on("latest",L=>{v._getBlockByNumberWithRetry(L,(N,k)=>{if(N)return void this.emit("error",N);if(!k)return console.log(k),void this.emit("error",new Error("Could not find block"));const w=function F(W){return{number:h.toBuffer(W.number),hash:h.toBuffer(W.hash),parentHash:h.toBuffer(W.parentHash),nonce:h.toBuffer(W.nonce),mixHash:h.toBuffer(W.mixHash),sha3Uncles:h.toBuffer(W.sha3Uncles),logsBloom:h.toBuffer(W.logsBloom),transactionsRoot:h.toBuffer(W.transactionsRoot),stateRoot:h.toBuffer(W.stateRoot),receiptsRoot:h.toBuffer(W.receiptRoot||W.receiptsRoot),miner:h.toBuffer(W.miner),difficulty:h.toBuffer(W.difficulty),totalDifficulty:h.toBuffer(W.totalDifficulty),size:h.toBuffer(W.size),extraData:h.toBuffer(W.extraData),gasLimit:h.toBuffer(W.gasLimit),gasUsed:h.toBuffer(W.gasUsed),timestamp:h.toBuffer(W.timestamp),transactions:W.transactions}}(k);v._setCurrentBlock(w),v.emit("rawBlock",k),v.emit("latest",k)})}),v._blockTracker.on("sync",v.emit.bind(v,"sync")),v._blockTracker.on("error",v.emit.bind(v,"error")),v._running=!0,v.emit("start")},I.prototype.stop=function(){const W=this;W._blockTracker.removeAllListeners(),W._running=!1,W.emit("stop")},I.prototype.isRunning=function(){return this._running},I.prototype.addProvider=function(W,v){"number"==typeof v?this._providers.splice(v,0,W):this._providers.push(W),W.setEngine(this)},I.prototype.removeProvider=function(W){const L=this._providers.indexOf(W);if(L<0)throw new Error("Provider not found.");this._providers.splice(L,1)},I.prototype.send=function(W){throw new Error("Web3ProviderEngine does not support synchronous requests.")},I.prototype.sendAsync=function(W,v){const L=this;L._ready.await(function(){Array.isArray(W)?a(W,L._handleAsync.bind(L),v):L._handleAsync(W,v)})},I.prototype._getBlockByNumberWithRetry=function(W,v){const L=this;let N=5;return void k();function k(){L._getBlockByNumber(W,w)}function w(A,B){return A?v(A):B?void v(null,B):N>0?(N--,void setTimeout(function(){k()},1e3)):void v(null,null)}},I.prototype._getBlockByNumber=function(W,v){const L=E({method:"eth_getBlockByNumber",params:[W,!1],skipCache:!0});this._handleAsync(L,(N,k)=>N?v(N):v(null,k.result))},I.prototype._handleAsync=function(W,v){var L=this,N=-1,k=null,w=null,A=[];function D(J,at){w=J,k=at,_(A,function(st,tt){st?st(w,k,tt):tt()},function(){var st={id:W.id,jsonrpc:W.jsonrpc,result:k};null!=w?(st.error={message:w.stack||w.message||w,code:-32e3},v(w,st)):v(null,st)})}!function B(J){if(N+=1,A.unshift(J),N>=L._providers.length)D(new Error('Request for method "'+W.method+'" not handled by any subprovider. Please check your subprovider configuration to ensure this method is handled.'));else try{L._providers[N].handleRequest(W,B,D)}catch(st){D(st)}}()},I.prototype._setCurrentBlock=function(W){this.currentBlock=W,this.emit("block",W)}},64297:function(V,l,M){!function(x,y){"use strict";function h(n,t){if(!n)throw new Error(t||"Assertion failed")}function p(n,t){n.super_=t;var e=function(){};e.prototype=t.prototype,n.prototype=new e,n.prototype.constructor=n}function a(n,t,e){if(a.isBN(n))return n;this.negative=0,this.words=null,this.length=0,this.red=null,null!==n&&(("le"===t||"be"===t)&&(e=t,t=10),this._init(n||0,t||10,e||"be"))}var _;"object"==typeof x?x.exports=a:y.BN=a,a.BN=a,a.wordSize=26;try{_=typeof window<"u"&&typeof window.Buffer<"u"?window.Buffer:M(84508).Buffer}catch{}function g(n,t){var e=n.charCodeAt(t);return e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:e-48&15}function m(n,t,e){var i=g(n,e);return e-1>=t&&(i|=g(n,e-1)<<4),i}function E(n,t,e,i){for(var s=0,f=Math.min(n.length,e),c=t;c=49?d-49+10:d>=17?d-17+10:d}return s}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,i){if("number"==typeof t)return this._initNumber(t,e,i);if("object"==typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),h(e===(0|e)&&e>=2&&e<=36);var s=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(s++,this.negative=1),s=0;s-=3)this.words[f]|=(c=t[s]|t[s-1]<<8|t[s-2]<<16)<>>26-d&67108863,(d+=24)>=26&&(d-=26,f++);else if("le"===i)for(s=0,f=0;s>>26-d&67108863,(d+=24)>=26&&(d-=26,f++);return this.strip()},a.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var s=0;s=e;s-=2)d=m(t,e,s)<=18?(f-=18,this.words[c+=1]|=d>>>26):f+=8;else for(s=(t.length-e)%2==0?e+1:e;s=18?(f-=18,this.words[c+=1]|=d>>>26):f+=8;this.strip()},a.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var s=0,f=1;f<=67108863;f*=e)s++;s--,f=f/e|0;for(var c=t.length-i,d=c%s,o=Math.min(c,c-d)+i,r=0,u=i;u1&&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?""};var T=["","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"],I=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],F=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function v(n,t,e){e.negative=t.negative^n.negative;var i=n.length+t.length|0;e.length=i,i=i-1|0;var s=0|n.words[0],f=0|t.words[0],c=s*f,o=c/67108864|0;e.words[0]=67108863&c;for(var r=1;r>>26,z=67108863&o,Z=Math.min(r,t.length-1),G=Math.max(0,r-n.length+1);G<=Z;G++)u+=(c=(s=0|n.words[r-G|0])*(f=0|t.words[G])+z)/67108864|0,z=67108863&c;e.words[r]=0|z,o=0|u}return 0!==o?e.words[r]=0|o:e.length--,e.strip()}a.prototype.toString=function(t,e){var i;if(e=0|e||1,16===(t=t||10)||"hex"===t){i="";for(var s=0,f=0,c=0;c>>24-s&16777215)||c!==this.length-1?T[6-o.length]+o+i:o+i,(s+=2)>=26&&(s-=26,c--)}for(0!==f&&(i=f.toString(16)+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var r=I[t],u=F[t];i="";var z=this.clone();for(z.negative=0;!z.isZero();){var Z=z.modn(u).toString(t);i=(z=z.idivn(u)).isZero()?Z+i:T[r-Z.length]+Z+i}for(this.isZero()&&(i="0"+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}h(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&h(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return h(typeof _<"u"),this.toArrayLike(_,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,i){var s=this.byteLength(),f=i||Math.max(1,s);h(s<=f,"byte array longer than desired length"),h(f>0,"Requested array length <= 0"),this.strip();var o,r,c="le"===e,d=new t(f),u=this.clone();if(c){for(r=0;!u.isZero();r++)o=u.andln(255),u.iushrn(8),d[r]=o;for(;r=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0==(8191&e)&&(i+=13,e>>>=13),0==(127&e)&&(i+=7,e>>>=7),0==(15&e)&&(i+=4,e>>>=4),0==(3&e)&&(i+=2,e>>>=2),0==(1&e)&&i++,i},a.prototype.bitLength=function(){var e=this._countBits(this.words[this.length-1]);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var i=0;it.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var s=0;st.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){h("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var s=0;s0&&(this.words[s]=~this.words[s]&67108863>>26-i),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){h("number"==typeof t&&t>=0);var i=t/26|0,s=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<t.length?(i=this,s=t):(i=t,s=this);for(var f=0,c=0;c>>26;for(;0!==f&&c>>26;if(this.length=i.length,0!==f)this.words[this.length]=f,this.length++;else if(i!==this)for(;ct.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var s,f,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(s=this,f=t):(s=t,f=this);for(var c=0,d=0;d>26,this.words[d]=67108863&e;for(;0!==c&&d>26,this.words[d]=67108863&e;if(0===c&&d>>13,Q=0|s[1],et=8191&Q,ht=Q>>>13,Ot=0|s[2],ut=8191&Ot,yt=Ot>>>13,Qt=0|s[3],vt=8191&Qt,At=Qt>>>13,Xt=0|s[4],_t=8191&Xt,Nt=Xt>>>13,O=0|s[5],b=8191&O,S=O>>>13,q=0|s[6],j=8191&q,Y=q>>>13,nt=0|s[7],it=8191&nt,lt=nt>>>13,Gt=0|s[8],ct=8191&Gt,dt=Gt>>>13,jt=0|s[9],xt=8191&jt,Pt=jt>>>13,fe=0|f[0],pt=8191&fe,Lt=fe>>>13,re=0|f[1],bt=8191&re,Ct=re>>>13,te=0|f[2],wt=8191&te,Ut=te>>>13,ie=0|f[3],gt=8191&ie,Ft=ie>>>13,de=0|f[4],Tt=8191&de,Ht=de>>>13,oe=0|f[5],Et=8191&oe,Kt=oe>>>13,ve=0|f[6],St=8191&ve,Dt=ve>>>13,he=0|f[7],kt=8191&he,Zt=he>>>13,me=0|f[8],Bt=8191&me,Wt=me>>>13,pe=0|f[9],Rt=8191&pe,zt=pe>>>13;i.negative=t.negative^e.negative,i.length=19;var _e=(d+(o=Math.imul(Z,pt))|0)+((8191&(r=(r=Math.imul(Z,Lt))+Math.imul(G,pt)|0))<<13)|0;d=((u=Math.imul(G,Lt))+(r>>>13)|0)+(_e>>>26)|0,_e&=67108863,o=Math.imul(et,pt),r=(r=Math.imul(et,Lt))+Math.imul(ht,pt)|0,u=Math.imul(ht,Lt);var H=(d+(o=o+Math.imul(Z,bt)|0)|0)+((8191&(r=(r=r+Math.imul(Z,Ct)|0)+Math.imul(G,bt)|0))<<13)|0;d=((u=u+Math.imul(G,Ct)|0)+(r>>>13)|0)+(H>>>26)|0,H&=67108863,o=Math.imul(ut,pt),r=(r=Math.imul(ut,Lt))+Math.imul(yt,pt)|0,u=Math.imul(yt,Lt),o=o+Math.imul(et,bt)|0,r=(r=r+Math.imul(et,Ct)|0)+Math.imul(ht,bt)|0,u=u+Math.imul(ht,Ct)|0;var K=(d+(o=o+Math.imul(Z,wt)|0)|0)+((8191&(r=(r=r+Math.imul(Z,Ut)|0)+Math.imul(G,wt)|0))<<13)|0;d=((u=u+Math.imul(G,Ut)|0)+(r>>>13)|0)+(K>>>26)|0,K&=67108863,o=Math.imul(vt,pt),r=(r=Math.imul(vt,Lt))+Math.imul(At,pt)|0,u=Math.imul(At,Lt),o=o+Math.imul(ut,bt)|0,r=(r=r+Math.imul(ut,Ct)|0)+Math.imul(yt,bt)|0,u=u+Math.imul(yt,Ct)|0,o=o+Math.imul(et,wt)|0,r=(r=r+Math.imul(et,Ut)|0)+Math.imul(ht,wt)|0,u=u+Math.imul(ht,Ut)|0;var $=(d+(o=o+Math.imul(Z,gt)|0)|0)+((8191&(r=(r=r+Math.imul(Z,Ft)|0)+Math.imul(G,gt)|0))<<13)|0;d=((u=u+Math.imul(G,Ft)|0)+(r>>>13)|0)+($>>>26)|0,$&=67108863,o=Math.imul(_t,pt),r=(r=Math.imul(_t,Lt))+Math.imul(Nt,pt)|0,u=Math.imul(Nt,Lt),o=o+Math.imul(vt,bt)|0,r=(r=r+Math.imul(vt,Ct)|0)+Math.imul(At,bt)|0,u=u+Math.imul(At,Ct)|0,o=o+Math.imul(ut,wt)|0,r=(r=r+Math.imul(ut,Ut)|0)+Math.imul(yt,wt)|0,u=u+Math.imul(yt,Ut)|0,o=o+Math.imul(et,gt)|0,r=(r=r+Math.imul(et,Ft)|0)+Math.imul(ht,gt)|0,u=u+Math.imul(ht,Ft)|0;var ot=(d+(o=o+Math.imul(Z,Tt)|0)|0)+((8191&(r=(r=r+Math.imul(Z,Ht)|0)+Math.imul(G,Tt)|0))<<13)|0;d=((u=u+Math.imul(G,Ht)|0)+(r>>>13)|0)+(ot>>>26)|0,ot&=67108863,o=Math.imul(b,pt),r=(r=Math.imul(b,Lt))+Math.imul(S,pt)|0,u=Math.imul(S,Lt),o=o+Math.imul(_t,bt)|0,r=(r=r+Math.imul(_t,Ct)|0)+Math.imul(Nt,bt)|0,u=u+Math.imul(Nt,Ct)|0,o=o+Math.imul(vt,wt)|0,r=(r=r+Math.imul(vt,Ut)|0)+Math.imul(At,wt)|0,u=u+Math.imul(At,Ut)|0,o=o+Math.imul(ut,gt)|0,r=(r=r+Math.imul(ut,Ft)|0)+Math.imul(yt,gt)|0,u=u+Math.imul(yt,Ft)|0,o=o+Math.imul(et,Tt)|0,r=(r=r+Math.imul(et,Ht)|0)+Math.imul(ht,Tt)|0,u=u+Math.imul(ht,Ht)|0;var It=(d+(o=o+Math.imul(Z,Et)|0)|0)+((8191&(r=(r=r+Math.imul(Z,Kt)|0)+Math.imul(G,Et)|0))<<13)|0;d=((u=u+Math.imul(G,Kt)|0)+(r>>>13)|0)+(It>>>26)|0,It&=67108863,o=Math.imul(j,pt),r=(r=Math.imul(j,Lt))+Math.imul(Y,pt)|0,u=Math.imul(Y,Lt),o=o+Math.imul(b,bt)|0,r=(r=r+Math.imul(b,Ct)|0)+Math.imul(S,bt)|0,u=u+Math.imul(S,Ct)|0,o=o+Math.imul(_t,wt)|0,r=(r=r+Math.imul(_t,Ut)|0)+Math.imul(Nt,wt)|0,u=u+Math.imul(Nt,Ut)|0,o=o+Math.imul(vt,gt)|0,r=(r=r+Math.imul(vt,Ft)|0)+Math.imul(At,gt)|0,u=u+Math.imul(At,Ft)|0,o=o+Math.imul(ut,Tt)|0,r=(r=r+Math.imul(ut,Ht)|0)+Math.imul(yt,Tt)|0,u=u+Math.imul(yt,Ht)|0,o=o+Math.imul(et,Et)|0,r=(r=r+Math.imul(et,Kt)|0)+Math.imul(ht,Et)|0,u=u+Math.imul(ht,Kt)|0;var mt=(d+(o=o+Math.imul(Z,St)|0)|0)+((8191&(r=(r=r+Math.imul(Z,Dt)|0)+Math.imul(G,St)|0))<<13)|0;d=((u=u+Math.imul(G,Dt)|0)+(r>>>13)|0)+(mt>>>26)|0,mt&=67108863,o=Math.imul(it,pt),r=(r=Math.imul(it,Lt))+Math.imul(lt,pt)|0,u=Math.imul(lt,Lt),o=o+Math.imul(j,bt)|0,r=(r=r+Math.imul(j,Ct)|0)+Math.imul(Y,bt)|0,u=u+Math.imul(Y,Ct)|0,o=o+Math.imul(b,wt)|0,r=(r=r+Math.imul(b,Ut)|0)+Math.imul(S,wt)|0,u=u+Math.imul(S,Ut)|0,o=o+Math.imul(_t,gt)|0,r=(r=r+Math.imul(_t,Ft)|0)+Math.imul(Nt,gt)|0,u=u+Math.imul(Nt,Ft)|0,o=o+Math.imul(vt,Tt)|0,r=(r=r+Math.imul(vt,Ht)|0)+Math.imul(At,Tt)|0,u=u+Math.imul(At,Ht)|0,o=o+Math.imul(ut,Et)|0,r=(r=r+Math.imul(ut,Kt)|0)+Math.imul(yt,Et)|0,u=u+Math.imul(yt,Kt)|0,o=o+Math.imul(et,St)|0,r=(r=r+Math.imul(et,Dt)|0)+Math.imul(ht,St)|0,u=u+Math.imul(ht,Dt)|0;var $t=(d+(o=o+Math.imul(Z,kt)|0)|0)+((8191&(r=(r=r+Math.imul(Z,Zt)|0)+Math.imul(G,kt)|0))<<13)|0;d=((u=u+Math.imul(G,Zt)|0)+(r>>>13)|0)+($t>>>26)|0,$t&=67108863,o=Math.imul(ct,pt),r=(r=Math.imul(ct,Lt))+Math.imul(dt,pt)|0,u=Math.imul(dt,Lt),o=o+Math.imul(it,bt)|0,r=(r=r+Math.imul(it,Ct)|0)+Math.imul(lt,bt)|0,u=u+Math.imul(lt,Ct)|0,o=o+Math.imul(j,wt)|0,r=(r=r+Math.imul(j,Ut)|0)+Math.imul(Y,wt)|0,u=u+Math.imul(Y,Ut)|0,o=o+Math.imul(b,gt)|0,r=(r=r+Math.imul(b,Ft)|0)+Math.imul(S,gt)|0,u=u+Math.imul(S,Ft)|0,o=o+Math.imul(_t,Tt)|0,r=(r=r+Math.imul(_t,Ht)|0)+Math.imul(Nt,Tt)|0,u=u+Math.imul(Nt,Ht)|0,o=o+Math.imul(vt,Et)|0,r=(r=r+Math.imul(vt,Kt)|0)+Math.imul(At,Et)|0,u=u+Math.imul(At,Kt)|0,o=o+Math.imul(ut,St)|0,r=(r=r+Math.imul(ut,Dt)|0)+Math.imul(yt,St)|0,u=u+Math.imul(yt,Dt)|0,o=o+Math.imul(et,kt)|0,r=(r=r+Math.imul(et,Zt)|0)+Math.imul(ht,kt)|0,u=u+Math.imul(ht,Zt)|0;var Jt=(d+(o=o+Math.imul(Z,Bt)|0)|0)+((8191&(r=(r=r+Math.imul(Z,Wt)|0)+Math.imul(G,Bt)|0))<<13)|0;d=((u=u+Math.imul(G,Wt)|0)+(r>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,o=Math.imul(xt,pt),r=(r=Math.imul(xt,Lt))+Math.imul(Pt,pt)|0,u=Math.imul(Pt,Lt),o=o+Math.imul(ct,bt)|0,r=(r=r+Math.imul(ct,Ct)|0)+Math.imul(dt,bt)|0,u=u+Math.imul(dt,Ct)|0,o=o+Math.imul(it,wt)|0,r=(r=r+Math.imul(it,Ut)|0)+Math.imul(lt,wt)|0,u=u+Math.imul(lt,Ut)|0,o=o+Math.imul(j,gt)|0,r=(r=r+Math.imul(j,Ft)|0)+Math.imul(Y,gt)|0,u=u+Math.imul(Y,Ft)|0,o=o+Math.imul(b,Tt)|0,r=(r=r+Math.imul(b,Ht)|0)+Math.imul(S,Tt)|0,u=u+Math.imul(S,Ht)|0,o=o+Math.imul(_t,Et)|0,r=(r=r+Math.imul(_t,Kt)|0)+Math.imul(Nt,Et)|0,u=u+Math.imul(Nt,Kt)|0,o=o+Math.imul(vt,St)|0,r=(r=r+Math.imul(vt,Dt)|0)+Math.imul(At,St)|0,u=u+Math.imul(At,Dt)|0,o=o+Math.imul(ut,kt)|0,r=(r=r+Math.imul(ut,Zt)|0)+Math.imul(yt,kt)|0,u=u+Math.imul(yt,Zt)|0,o=o+Math.imul(et,Bt)|0,r=(r=r+Math.imul(et,Wt)|0)+Math.imul(ht,Bt)|0,u=u+Math.imul(ht,Wt)|0;var Yt=(d+(o=o+Math.imul(Z,Rt)|0)|0)+((8191&(r=(r=r+Math.imul(Z,zt)|0)+Math.imul(G,Rt)|0))<<13)|0;d=((u=u+Math.imul(G,zt)|0)+(r>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,o=Math.imul(xt,bt),r=(r=Math.imul(xt,Ct))+Math.imul(Pt,bt)|0,u=Math.imul(Pt,Ct),o=o+Math.imul(ct,wt)|0,r=(r=r+Math.imul(ct,Ut)|0)+Math.imul(dt,wt)|0,u=u+Math.imul(dt,Ut)|0,o=o+Math.imul(it,gt)|0,r=(r=r+Math.imul(it,Ft)|0)+Math.imul(lt,gt)|0,u=u+Math.imul(lt,Ft)|0,o=o+Math.imul(j,Tt)|0,r=(r=r+Math.imul(j,Ht)|0)+Math.imul(Y,Tt)|0,u=u+Math.imul(Y,Ht)|0,o=o+Math.imul(b,Et)|0,r=(r=r+Math.imul(b,Kt)|0)+Math.imul(S,Et)|0,u=u+Math.imul(S,Kt)|0,o=o+Math.imul(_t,St)|0,r=(r=r+Math.imul(_t,Dt)|0)+Math.imul(Nt,St)|0,u=u+Math.imul(Nt,Dt)|0,o=o+Math.imul(vt,kt)|0,r=(r=r+Math.imul(vt,Zt)|0)+Math.imul(At,kt)|0,u=u+Math.imul(At,Zt)|0,o=o+Math.imul(ut,Bt)|0,r=(r=r+Math.imul(ut,Wt)|0)+Math.imul(yt,Bt)|0,u=u+Math.imul(yt,Wt)|0;var Vt=(d+(o=o+Math.imul(et,Rt)|0)|0)+((8191&(r=(r=r+Math.imul(et,zt)|0)+Math.imul(ht,Rt)|0))<<13)|0;d=((u=u+Math.imul(ht,zt)|0)+(r>>>13)|0)+(Vt>>>26)|0,Vt&=67108863,o=Math.imul(xt,wt),r=(r=Math.imul(xt,Ut))+Math.imul(Pt,wt)|0,u=Math.imul(Pt,Ut),o=o+Math.imul(ct,gt)|0,r=(r=r+Math.imul(ct,Ft)|0)+Math.imul(dt,gt)|0,u=u+Math.imul(dt,Ft)|0,o=o+Math.imul(it,Tt)|0,r=(r=r+Math.imul(it,Ht)|0)+Math.imul(lt,Tt)|0,u=u+Math.imul(lt,Ht)|0,o=o+Math.imul(j,Et)|0,r=(r=r+Math.imul(j,Kt)|0)+Math.imul(Y,Et)|0,u=u+Math.imul(Y,Kt)|0,o=o+Math.imul(b,St)|0,r=(r=r+Math.imul(b,Dt)|0)+Math.imul(S,St)|0,u=u+Math.imul(S,Dt)|0,o=o+Math.imul(_t,kt)|0,r=(r=r+Math.imul(_t,Zt)|0)+Math.imul(Nt,kt)|0,u=u+Math.imul(Nt,Zt)|0,o=o+Math.imul(vt,Bt)|0,r=(r=r+Math.imul(vt,Wt)|0)+Math.imul(At,Bt)|0,u=u+Math.imul(At,Wt)|0;var Mt=(d+(o=o+Math.imul(ut,Rt)|0)|0)+((8191&(r=(r=r+Math.imul(ut,zt)|0)+Math.imul(yt,Rt)|0))<<13)|0;d=((u=u+Math.imul(yt,zt)|0)+(r>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,o=Math.imul(xt,gt),r=(r=Math.imul(xt,Ft))+Math.imul(Pt,gt)|0,u=Math.imul(Pt,Ft),o=o+Math.imul(ct,Tt)|0,r=(r=r+Math.imul(ct,Ht)|0)+Math.imul(dt,Tt)|0,u=u+Math.imul(dt,Ht)|0,o=o+Math.imul(it,Et)|0,r=(r=r+Math.imul(it,Kt)|0)+Math.imul(lt,Et)|0,u=u+Math.imul(lt,Kt)|0,o=o+Math.imul(j,St)|0,r=(r=r+Math.imul(j,Dt)|0)+Math.imul(Y,St)|0,u=u+Math.imul(Y,Dt)|0,o=o+Math.imul(b,kt)|0,r=(r=r+Math.imul(b,Zt)|0)+Math.imul(S,kt)|0,u=u+Math.imul(S,Zt)|0,o=o+Math.imul(_t,Bt)|0,r=(r=r+Math.imul(_t,Wt)|0)+Math.imul(Nt,Bt)|0,u=u+Math.imul(Nt,Wt)|0;var ee=(d+(o=o+Math.imul(vt,Rt)|0)|0)+((8191&(r=(r=r+Math.imul(vt,zt)|0)+Math.imul(At,Rt)|0))<<13)|0;d=((u=u+Math.imul(At,zt)|0)+(r>>>13)|0)+(ee>>>26)|0,ee&=67108863,o=Math.imul(xt,Tt),r=(r=Math.imul(xt,Ht))+Math.imul(Pt,Tt)|0,u=Math.imul(Pt,Ht),o=o+Math.imul(ct,Et)|0,r=(r=r+Math.imul(ct,Kt)|0)+Math.imul(dt,Et)|0,u=u+Math.imul(dt,Kt)|0,o=o+Math.imul(it,St)|0,r=(r=r+Math.imul(it,Dt)|0)+Math.imul(lt,St)|0,u=u+Math.imul(lt,Dt)|0,o=o+Math.imul(j,kt)|0,r=(r=r+Math.imul(j,Zt)|0)+Math.imul(Y,kt)|0,u=u+Math.imul(Y,Zt)|0,o=o+Math.imul(b,Bt)|0,r=(r=r+Math.imul(b,Wt)|0)+Math.imul(S,Bt)|0,u=u+Math.imul(S,Wt)|0;var ae=(d+(o=o+Math.imul(_t,Rt)|0)|0)+((8191&(r=(r=r+Math.imul(_t,zt)|0)+Math.imul(Nt,Rt)|0))<<13)|0;d=((u=u+Math.imul(Nt,zt)|0)+(r>>>13)|0)+(ae>>>26)|0,ae&=67108863,o=Math.imul(xt,Et),r=(r=Math.imul(xt,Kt))+Math.imul(Pt,Et)|0,u=Math.imul(Pt,Kt),o=o+Math.imul(ct,St)|0,r=(r=r+Math.imul(ct,Dt)|0)+Math.imul(dt,St)|0,u=u+Math.imul(dt,Dt)|0,o=o+Math.imul(it,kt)|0,r=(r=r+Math.imul(it,Zt)|0)+Math.imul(lt,kt)|0,u=u+Math.imul(lt,Zt)|0,o=o+Math.imul(j,Bt)|0,r=(r=r+Math.imul(j,Wt)|0)+Math.imul(Y,Bt)|0,u=u+Math.imul(Y,Wt)|0;var ce=(d+(o=o+Math.imul(b,Rt)|0)|0)+((8191&(r=(r=r+Math.imul(b,zt)|0)+Math.imul(S,Rt)|0))<<13)|0;d=((u=u+Math.imul(S,zt)|0)+(r>>>13)|0)+(ce>>>26)|0,ce&=67108863,o=Math.imul(xt,St),r=(r=Math.imul(xt,Dt))+Math.imul(Pt,St)|0,u=Math.imul(Pt,Dt),o=o+Math.imul(ct,kt)|0,r=(r=r+Math.imul(ct,Zt)|0)+Math.imul(dt,kt)|0,u=u+Math.imul(dt,Zt)|0,o=o+Math.imul(it,Bt)|0,r=(r=r+Math.imul(it,Wt)|0)+Math.imul(lt,Bt)|0,u=u+Math.imul(lt,Wt)|0;var le=(d+(o=o+Math.imul(j,Rt)|0)|0)+((8191&(r=(r=r+Math.imul(j,zt)|0)+Math.imul(Y,Rt)|0))<<13)|0;d=((u=u+Math.imul(Y,zt)|0)+(r>>>13)|0)+(le>>>26)|0,le&=67108863,o=Math.imul(xt,kt),r=(r=Math.imul(xt,Zt))+Math.imul(Pt,kt)|0,u=Math.imul(Pt,Zt),o=o+Math.imul(ct,Bt)|0,r=(r=r+Math.imul(ct,Wt)|0)+Math.imul(dt,Bt)|0,u=u+Math.imul(dt,Wt)|0;var ge=(d+(o=o+Math.imul(it,Rt)|0)|0)+((8191&(r=(r=r+Math.imul(it,zt)|0)+Math.imul(lt,Rt)|0))<<13)|0;d=((u=u+Math.imul(lt,zt)|0)+(r>>>13)|0)+(ge>>>26)|0,ge&=67108863,o=Math.imul(xt,Bt),r=(r=Math.imul(xt,Wt))+Math.imul(Pt,Bt)|0,u=Math.imul(Pt,Wt);var ue=(d+(o=o+Math.imul(ct,Rt)|0)|0)+((8191&(r=(r=r+Math.imul(ct,zt)|0)+Math.imul(dt,Rt)|0))<<13)|0;d=((u=u+Math.imul(dt,zt)|0)+(r>>>13)|0)+(ue>>>26)|0,ue&=67108863;var xe=(d+(o=Math.imul(xt,Rt))|0)+((8191&(r=(r=Math.imul(xt,zt))+Math.imul(Pt,Rt)|0))<<13)|0;return d=((u=Math.imul(Pt,zt))+(r>>>13)|0)+(xe>>>26)|0,xe&=67108863,c[0]=_e,c[1]=H,c[2]=K,c[3]=$,c[4]=ot,c[5]=It,c[6]=mt,c[7]=$t,c[8]=Jt,c[9]=Yt,c[10]=Vt,c[11]=Mt,c[12]=ee,c[13]=ae,c[14]=ce,c[15]=le,c[16]=ge,c[17]=ue,c[18]=xe,0!==d&&(c[19]=d,i.length++),i};function k(n,t,e){return(new w).mulp(n,t,e)}function w(n,t){this.x=n,this.y=t}Math.imul||(L=v),a.prototype.mulTo=function(t,e){var i,s=this.length+t.length;return i=10===this.length&&10===t.length?L(this,t,e):s<63?v(this,t,e):s<1024?function N(n,t,e){e.negative=t.negative^n.negative,e.length=n.length+t.length;for(var i=0,s=0,f=0;f>>26)|0)>>>26,c&=67108863}e.words[f]=d,i=c,c=s}return 0!==i?e.words[f]=i:e.length--,e.strip()}(this,t,e):k(this,t,e),i},w.prototype.makeRBT=function(t){for(var e=new Array(t),i=a.prototype._countBits(t)-1,s=0;s>=1;return s},w.prototype.permute=function(t,e,i,s,f,c){for(var d=0;d>>=1)f++;return 1<>>=13),f>>>=13;for(c=2*e;c>=26,e+=s/67108864|0,e+=f>>>26,this.words[i]=67108863&f}return 0!==e&&(this.words[i]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function W(n){for(var t=new Array(n.bitLength()),e=0;e>>s}return t}(t);if(0===e.length)return new a(1);for(var i=this,s=0;s=0);var f,e=t%26,i=(t-e)/26,s=67108863>>>26-e<<26-e;if(0!==e){var c=0;for(f=0;f>>26-e}c&&(this.words[f]=c,this.length++)}if(0!==i){for(f=this.length-1;f>=0;f--)this.words[f+i]=this.words[f];for(f=0;f=0),s=e?(e-e%26)/26:0;var f=t%26,c=Math.min((t-f)/26,this.length),d=67108863^67108863>>>f<c)for(this.length-=c,r=0;r=0&&(0!==u||r>=s);r--){var z=0|this.words[r];this.words[r]=u<<26-f|z>>>f,u=z&d}return o&&0!==u&&(o.words[o.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,i){return h(0===this.negative),this.iushrn(t,e,i)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){h("number"==typeof t&&t>=0);var e=t%26,i=(t-e)/26;return!(this.length<=i||!(this.words[i]&1<=0);var e=t%26,i=(t-e)/26;return h(0===this.negative,"imaskn works only with positive numbers"),this.length<=i?this:(0!==e&&i++,this.length=Math.min(i,this.length),0!==e&&(this.words[this.length-1]&=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(h("number"==typeof t),h(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(o/67108864|0),this.words[f+i]=67108863&c}for(;f>26,this.words[f+i]=67108863&c;if(0===d)return this.strip();for(h(-1===d),d=0,f=0;f>26,this.words[f]=67108863&c;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var i,s=this.clone(),f=t,c=0|f.words[f.length-1];0!=(i=26-this._countBits(c))&&(f=f.ushln(i),s.iushln(i),c=0|f.words[f.length-1]);var r,o=s.length-f.length;if("mod"!==e){(r=new a(null)).length=o+1,r.words=new Array(r.length);for(var u=0;u=0;Z--){var G=67108864*(0|s.words[f.length+Z])+(0|s.words[f.length+Z-1]);for(G=Math.min(G/c|0,67108863),s._ishlnsubmul(f,G,Z);0!==s.negative;)G--,s.negative=0,s._ishlnsubmul(f,1,Z),s.isZero()||(s.negative^=1);r&&(r.words[Z]=G)}return r&&r.strip(),s.strip(),"div"!==e&&0!==i&&s.iushrn(i),{div:r||null,mod:s}},a.prototype.divmod=function(t,e,i){return h(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(c=this.neg().divmod(t,e),"mod"!==e&&(s=c.div.neg()),"div"!==e&&(f=c.mod.neg(),i&&0!==f.negative&&f.iadd(t)),{div:s,mod:f}):0===this.negative&&0!==t.negative?(c=this.divmod(t.neg(),e),"mod"!==e&&(s=c.div.neg()),{div:s,mod:c.mod}):0!=(this.negative&t.negative)?(c=this.neg().divmod(t.neg(),e),"div"!==e&&(f=c.mod.neg(),i&&0!==f.negative&&f.isub(t)),{div:c.div,mod:f}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var s,f,c},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,s=t.ushrn(1),f=t.andln(1),c=i.cmp(s);return c<0||1===f&&0===c?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){h(t<=67108863);for(var e=(1<<26)%t,i=0,s=this.length-1;s>=0;s--)i=(e*i+(0|this.words[s]))%t;return i},a.prototype.idivn=function(t){h(t<=67108863);for(var e=0,i=this.length-1;i>=0;i--){var s=(0|this.words[i])+67108864*e;this.words[i]=s/t|0,e=s%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){h(0===t.negative),h(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var s=new a(1),f=new a(0),c=new a(0),d=new a(1),o=0;e.isEven()&&i.isEven();)e.iushrn(1),i.iushrn(1),++o;for(var r=i.clone(),u=e.clone();!e.isZero();){for(var z=0,Z=1;0==(e.words[0]&Z)&&z<26;++z,Z<<=1);if(z>0)for(e.iushrn(z);z-- >0;)(s.isOdd()||f.isOdd())&&(s.iadd(r),f.isub(u)),s.iushrn(1),f.iushrn(1);for(var G=0,Q=1;0==(i.words[0]&Q)&&G<26;++G,Q<<=1);if(G>0)for(i.iushrn(G);G-- >0;)(c.isOdd()||d.isOdd())&&(c.iadd(r),d.isub(u)),c.iushrn(1),d.iushrn(1);e.cmp(i)>=0?(e.isub(i),s.isub(c),f.isub(d)):(i.isub(e),c.isub(s),d.isub(f))}return{a:c,b:d,gcd:i.iushln(o)}},a.prototype._invmp=function(t){h(0===t.negative),h(!t.isZero());var z,e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var s=new a(1),f=new a(0),c=i.clone();e.cmpn(1)>0&&i.cmpn(1)>0;){for(var d=0,o=1;0==(e.words[0]&o)&&d<26;++d,o<<=1);if(d>0)for(e.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);for(var r=0,u=1;0==(i.words[0]&u)&&r<26;++r,u<<=1);if(r>0)for(i.iushrn(r);r-- >0;)f.isOdd()&&f.iadd(c),f.iushrn(1);e.cmp(i)>=0?(e.isub(i),s.isub(f)):(i.isub(e),f.isub(s))}return(z=0===e.cmpn(1)?s:f).cmpn(0)<0&&z.iadd(t),z},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var s=0;e.isEven()&&i.isEven();s++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var f=e.cmp(i);if(f<0){var c=e;e=i,i=c}else if(0===f||0===i.cmpn(1))break;e.isub(i)}return i.iushln(s)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){h("number"==typeof t);var e=t%26,i=(t-e)/26,s=1<>>26,this.words[c]=d&=67108863}return 0!==f&&(this.words[c]=f,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var i,e=t<0;if(0!==this.negative&&!e)return-1;if(0===this.negative&&e)return 1;if(this.strip(),this.length>1)i=1;else{e&&(t=-t),h(t<=67108863,"Number is too big");var s=0|this.words[0];i=s===t?0:st.length)return 1;if(this.length=0;i--){var s=0|this.words[i],f=0|t.words[i];if(s!==f){sf&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new tt(t)},a.prototype.toRed=function(t){return h(!this.red,"Already a number in reduction context"),h(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return h(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return h(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return h(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return h(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return h(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return h(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return h(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return h(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return h(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return h(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return h(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return h(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return h(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return h(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return h(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var A={k256:null,p224:null,p192:null,p25519:null};function B(n,t){this.name=n,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 D(){B.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function J(){B.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function at(){B.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function st(){B.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function tt(n){if("string"==typeof n){var t=a._prime(n);this.m=t.p,this.prime=t}else h(n.gtn(1),"modulus must be greater than 1"),this.m=n,this.prime=null}function U(n){tt.call(this,n),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 t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},B.prototype.ireduce=function(t){var i,e=t;do{this.split(e,this.tmp),i=(e=(e=this.imulK(e)).iadd(this.tmp)).bitLength()}while(i>this.n);var s=i0?e.isub(this.p):void 0!==e.strip?e.strip():e._strip(),e},B.prototype.split=function(t,e){t.iushrn(this.n,0,e)},B.prototype.imulK=function(t){return t.imul(this.k)},p(D,B),D.prototype.split=function(t,e){for(var i=4194303,s=Math.min(t.length,9),f=0;f>>22,c=d}t.words[f-10]=c>>>=22,t.length-=0===c&&t.length>10?10:9},D.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i>>=26,t.words[i]=f,e=s}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(A[t])return A[t];var e;if("k256"===t)e=new D;else if("p224"===t)e=new J;else if("p192"===t)e=new at;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new st}return A[t]=e,e},tt.prototype._verify1=function(t){h(0===t.negative,"red works only with positives"),h(t.red,"red works only with red numbers")},tt.prototype._verify2=function(t,e){h(0==(t.negative|e.negative),"red works only with positives"),h(t.red&&t.red===e.red,"red works only with red numbers")},tt.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},tt.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},tt.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},tt.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},tt.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},tt.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},tt.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},tt.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},tt.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},tt.prototype.isqr=function(t){return this.imul(t,t.clone())},tt.prototype.sqr=function(t){return this.mul(t,t)},tt.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(h(e%2==1),3===e){var i=this.m.add(new a(1)).iushrn(2);return this.pow(t,i)}for(var s=this.m.subn(1),f=0;!s.isZero()&&0===s.andln(1);)f++,s.iushrn(1);h(!s.isZero());var c=new a(1).toRed(this),d=c.redNeg(),o=this.m.subn(1).iushrn(1),r=this.m.bitLength();for(r=new a(2*r*r).toRed(this);0!==this.pow(r,o).cmp(d);)r.redIAdd(d);for(var u=this.pow(r,s),z=this.pow(t,s.addn(1).iushrn(1)),Z=this.pow(t,s),G=f;0!==Z.cmp(c);){for(var Q=Z,et=0;0!==Q.cmp(c);et++)Q=Q.redSqr();h(et=0;f--){for(var u=e.words[f],z=r-1;z>=0;z--){var Z=u>>z&1;c!==s[0]&&(c=this.sqr(c)),0!==Z||0!==d?(d<<=1,d|=Z,(4==++o||0===f&&0===z)&&(c=this.mul(c,s[d]),o=0,d=0)):o=0}r=26}return c},tt.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},tt.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new U(t)},p(U,tt),U.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},U.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},U.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),s=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=i.isub(s).iushrn(this.shift),c=f;return f.cmp(this.m)>=0?c=f.isub(this.m):f.cmpn(0)<0&&(c=f.iadd(this.m)),c._forceRed(this)},U.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var i=t.mul(e),s=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=i.isub(s).iushrn(this.shift),c=f;return f.cmp(this.m)>=0?c=f.isub(this.m):f.cmpn(0)<0&&(c=f.iadd(this.m)),c._forceRed(this)},U.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(V=M.nmd(V),this)},29707:(V,l,M)=>{"use strict";var x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(v){return typeof v}:function(v){return v&&"function"==typeof Symbol&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},y=M(75512),h=y.keccak224,p=y.keccak384,a=y.keccak256,_=y.keccak512,g=M(58010),m=M(80469),E=M(26651),T=M(64297),I=M(45429),F=M(81593).Buffer;Object.assign(l,M(44780)),l.MAX_INTEGER=new T("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),l.TWO_POW256=new T("10000000000000000000000000000000000000000000000000000000000000000",16),l.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",l.SHA3_NULL_S=l.KECCAK256_NULL_S,l.KECCAK256_NULL=F.from(l.KECCAK256_NULL_S,"hex"),l.SHA3_NULL=l.KECCAK256_NULL,l.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",l.SHA3_RLP_ARRAY_S=l.KECCAK256_RLP_ARRAY_S,l.KECCAK256_RLP_ARRAY=F.from(l.KECCAK256_RLP_ARRAY_S,"hex"),l.SHA3_RLP_ARRAY=l.KECCAK256_RLP_ARRAY,l.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",l.SHA3_RLP_S=l.KECCAK256_RLP_S,l.KECCAK256_RLP=F.from(l.KECCAK256_RLP_S,"hex"),l.SHA3_RLP=l.KECCAK256_RLP,l.BN=T,l.rlp=E,l.secp256k1=g,l.zeros=function(v){return F.allocUnsafe(v).fill(0)},l.zeroAddress=function(){var L=l.zeros(20);return l.bufferToHex(L)},l.setLengthLeft=l.setLength=function(v,L,N){var k=l.zeros(L);return v=l.toBuffer(v),N?v.length0&&"0"===L.toString();)L=(v=v.slice(1))[0];return v},l.toBuffer=function(v){if(!F.isBuffer(v))if(Array.isArray(v))v=F.from(v);else if("string"==typeof v)v=l.isHexString(v)?F.from(l.padToEven(l.stripHexPrefix(v)),"hex"):F.from(v);else if("number"==typeof v)v=l.intToBuffer(v);else if(null==v)v=F.allocUnsafe(0);else if(T.isBN(v))v=v.toArrayLike(F);else{if(!v.toArray)throw new Error("invalid type");v=F.from(v.toArray())}return v},l.bufferToInt=function(v){return new T(l.toBuffer(v)).toNumber()},l.bufferToHex=function(v){return"0x"+(v=l.toBuffer(v)).toString("hex")},l.fromSigned=function(v){return new T(v).fromTwos(256)},l.toUnsigned=function(v){return F.from(v.toTwos(256).toArray())},l.keccak=function(v,L){switch(v=l.toBuffer(v),L||(L=256),L){case 224:return h(v);case 256:return a(v);case 384:return p(v);case 512:return _(v);default:throw new Error("Invald algorithm: keccak"+L)}},l.keccak256=function(v){return l.keccak(v)},l.sha3=l.keccak,l.sha256=function(v){return v=l.toBuffer(v),I("sha256").update(v).digest()},l.ripemd160=function(v,L){v=l.toBuffer(v);var N=I("rmd160").update(v).digest();return!0===L?l.setLength(N,32):N},l.rlphash=function(v){return l.keccak(E.encode(v))},l.isValidPrivate=function(v){return g.privateKeyVerify(v)},l.isValidPublic=function(v,L){return 64===v.length?g.publicKeyVerify(F.concat([F.from([4]),v])):!!L&&g.publicKeyVerify(v)},l.pubToAddress=l.publicToAddress=function(v,L){return v=l.toBuffer(v),L&&64!==v.length&&(v=g.publicKeyConvert(v,!1).slice(1)),m(64===v.length),l.keccak(v).slice(-20)};var W=l.privateToPublic=function(v){return v=l.toBuffer(v),g.publicKeyCreate(v,!1).slice(1)};l.importPublic=function(v){return 64!==(v=l.toBuffer(v)).length&&(v=g.publicKeyConvert(v,!1).slice(1)),v},l.ecsign=function(v,L){var N=g.sign(v,L),k={};return k.r=N.signature.slice(0,32),k.s=N.signature.slice(32,64),k.v=N.recovery+27,k},l.hashPersonalMessage=function(v){var L=l.toBuffer("\x19Ethereum Signed Message:\n"+v.length.toString());return l.keccak(F.concat([L,v]))},l.ecrecover=function(v,L,N,k){var w=F.concat([l.setLength(N,32),l.setLength(k,32)],64),A=L-27;if(0!==A&&1!==A)throw new Error("Invalid signature v value");var B=g.recover(v,w,A);return g.publicKeyConvert(B,!1).slice(1)},l.toRpcSig=function(v,L,N){if(27!==v&&28!==v)throw new Error("Invalid recovery id");return l.bufferToHex(F.concat([l.setLengthLeft(L,32),l.setLengthLeft(N,32),l.toBuffer(v-27)]))},l.fromRpcSig=function(v){if(65!==(v=l.toBuffer(v)).length)throw new Error("Invalid signature length");var L=v[64];return L<27&&(L+=27),{v:L,r:v.slice(0,32),s:v.slice(32,64)}},l.privateToAddress=function(v){return l.publicToAddress(W(v))},l.isValidAddress=function(v){return/^0x[0-9a-fA-F]{40}$/.test(v)},l.isZeroAddress=function(v){return l.zeroAddress()===l.addHexPrefix(v)},l.toChecksumAddress=function(v){v=l.stripHexPrefix(v).toLowerCase();for(var L=l.keccak(v).toString("hex"),N="0x",k=0;k=8?N+=v[k].toUpperCase():N+=v[k];return N},l.isValidChecksumAddress=function(v){return l.isValidAddress(v)&&l.toChecksumAddress(v)===v},l.generateAddress=function(v,L){return v=l.toBuffer(v),L=(L=new T(L)).isZero()?null:F.from(L.toArray()),l.rlphash([v,L]).slice(-20)},l.isPrecompiled=function(v){var L=l.unpad(v);return 1===L.length&&L[0]>=1&&L[0]<=8},l.addHexPrefix=function(v){return"string"!=typeof v||l.isHexPrefixed(v)?v:"0x"+v},l.isValidSignature=function(v,L,N,k){var w=new T("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),A=new T("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);return!(32!==L.length||32!==N.length||27!==v&&28!==v||(L=new T(L),N=new T(N),L.isZero()||L.gt(A)||N.isZero()||N.gt(A))||!1===k&&1===new T(N).cmp(w))},l.baToJSON=function(v){if(F.isBuffer(v))return"0x"+v.toString("hex");if(v instanceof Array){for(var L=[],N=0;N=J.length,"The field "+w.name+" must not have more "+w.length+" bytes")):!(w.allowZero&&0===J.length)&&w.length&&m(w.length===J.length,"The field "+w.name+" must have byte length of "+w.length),v.raw[A]=J}v._fields.push(w.name),Object.defineProperty(v,w.name,{enumerable:!0,configurable:!0,get:B,set:D}),w.default&&(v[w.name]=w.default),w.alias&&Object.defineProperty(v,w.alias,{enumerable:!1,configurable:!0,set:D,get:B})}),N)if("string"==typeof N&&(N=F.from(l.stripHexPrefix(N),"hex")),F.isBuffer(N)&&(N=E.decode(N)),Array.isArray(N)){if(N.length>v._fields.length)throw new Error("wrong number of fields in data");N.forEach(function(w,A){v[v._fields[A]]=l.toBuffer(w)})}else{if("object"!==(typeof N>"u"?"undefined":x(N)))throw new Error("invalid data");var k=Object.keys(N);L.forEach(function(w){-1!==k.indexOf(w.name)&&(v[w.name]=N[w.name]),-1!==k.indexOf(w.alias)&&(v[w.alias]=N[w.alias])})}}},58010:(V,l,M)=>{"use strict";var x=M(37712),y=M(2210),h=M(60664),p=function(n){return 32===n.length&&x.privateKeyVerify(Uint8Array.from(n))};V.exports={privateKeyVerify:p,privateKeyExport:function(n,t){if(32!==n.length)throw new RangeError("private key length is invalid");var e=y.privateKeyExport(n,t);return h.privateKeyExport(n,e,t)},privateKeyImport:function(n){if(null!==(n=h.privateKeyImport(n))&&32===n.length&&p(n))return n;throw new Error("couldn't import from DER format")},privateKeyNegate:function(n){return Buffer.from(x.privateKeyNegate(Uint8Array.from(n)))},privateKeyModInverse:function(n){if(32!==n.length)throw new Error("private key length is invalid");return Buffer.from(y.privateKeyModInverse(Uint8Array.from(n)))},privateKeyTweakAdd:function(n,t){return Buffer.from(x.privateKeyTweakAdd(Uint8Array.from(n),t))},privateKeyTweakMul:function(n,t){return Buffer.from(x.privateKeyTweakMul(Uint8Array.from(n),Uint8Array.from(t)))},publicKeyCreate:function(n,t){return Buffer.from(x.publicKeyCreate(Uint8Array.from(n),t))},publicKeyConvert:function(n,t){return Buffer.from(x.publicKeyConvert(Uint8Array.from(n),t))},publicKeyVerify:function(n){return(33===n.length||65===n.length)&&x.publicKeyVerify(Uint8Array.from(n))},publicKeyTweakAdd:function(n,t,e){return Buffer.from(x.publicKeyTweakAdd(Uint8Array.from(n),Uint8Array.from(t),e))},publicKeyTweakMul:function(n,t,e){return Buffer.from(x.publicKeyTweakMul(Uint8Array.from(n),Uint8Array.from(t),e))},publicKeyCombine:function(n,t){var e=[];return n.forEach(function(i){e.push(Uint8Array.from(i))}),Buffer.from(x.publicKeyCombine(e,t))},signatureNormalize:function(n){return Buffer.from(x.signatureNormalize(Uint8Array.from(n)))},signatureExport:function(n){return Buffer.from(x.signatureExport(Uint8Array.from(n)))},signatureImport:function(n){return Buffer.from(x.signatureImport(Uint8Array.from(n)))},signatureImportLax:function(n){if(0===n.length)throw new RangeError("signature length is invalid");var t=h.signatureImportLax(n);if(null===t)throw new Error("couldn't parse DER signature");return y.signatureImport(t)},sign:function(n,t,e){if(null===e)throw new TypeError("options should be an Object");var i=void 0;if(e){if(i={},null===e.data)throw new TypeError("options.data should be a Buffer");if(e.data){if(32!==e.data.length)throw new RangeError("options.data length is invalid");i.data=new Uint8Array(e.data)}if(null===e.noncefn)throw new TypeError("options.noncefn should be a Function");e.noncefn&&(i.noncefn=function(f,c,d,o,r){var u=null!=d?Buffer.from(d):null,z=null!=o?Buffer.from(o):null,Z=Buffer.from("");return e.noncefn&&(Z=e.noncefn(Buffer.from(f),Buffer.from(c),u,z,r)),Uint8Array.from(Z)})}var s=x.ecdsaSign(Uint8Array.from(n),Uint8Array.from(t),i);return{signature:Buffer.from(s.signature),recovery:s.recid}},verify:function(n,t,e){return x.ecdsaVerify(Uint8Array.from(t),Uint8Array.from(n),e)},recover:function(n,t,e,i){return Buffer.from(x.ecdsaRecover(Uint8Array.from(t),e,Uint8Array.from(n),i))},ecdh:function(n,t){return Buffer.from(x.ecdh(Uint8Array.from(n),Uint8Array.from(t),{}))},ecdhUnsafe:function(n,t,e){if(33!==n.length&&65!==n.length)throw new RangeError("public key length is invalid");if(32!==t.length)throw new RangeError("private key length is invalid");return Buffer.from(y.ecdhUnsafe(Uint8Array.from(n),Uint8Array.from(t),e))}}},60664:(V,l)=>{"use strict";var M=Buffer.from([48,129,211,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),x=Buffer.from([48,130,1,19,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);l.privateKeyExport=function(y,h,p){var a=Buffer.from(p?M:x);return y.copy(a,p?8:9),h.copy(a,p?181:214),a},l.privateKeyImport=function(y){var h=y.length,p=0;if(h2||h1?y[p+a-2]<<8:0);return h<(p+=a)+_||h32||ha||2!==y[_++])return null;var m=y[_++];if(128&m){if(_+(g=m-128)>a)return null;for(;g>0&&0===y[_];_+=1,g-=1);for(m=0;g>0;_+=1,g-=1)m=(m<<8)+y[_]}if(m>a-_)return null;var E=_;if(_+=m,2!==y[_++])return null;var T=y[_++];if(128&T){if(_+(g=T-128)>a)return null;for(;g>0&&0===y[_];_+=1,g-=1);for(T=0;g>0;_+=1,g-=1)T=(T<<8)+y[_]}if(T>a-_)return null;var I=_;for(_+=T;m>0&&0===y[E];m-=1,E+=1);if(m>32)return null;var F=y.slice(E,E+m);for(F.copy(h,32-F.length);T>0&&0===y[I];T-=1,I+=1);if(T>32)return null;var W=y.slice(I,I+T);return W.copy(p,32-W.length),{r:h,s:p}}},2210:(V,l,M)=>{"use strict";var x=M(64297),h=new(0,M(4913).ec)("secp256k1"),p=h.curve;l.privateKeyExport=function(_,g){var m=new x(_);if(m.ucmp(p.n)>=0)throw new Error("couldn't export to DER format");var E=h.g.mul(m);return a(E.getX(),E.getY(),g)},l.privateKeyModInverse=function(_){var g=new x(_);if(g.ucmp(p.n)>=0||g.isZero())throw new Error("private key range is invalid");return g.invm(p.n).toArrayLike(Buffer,"be",32)},l.signatureImport=function(_){var g=new x(_.r);g.ucmp(p.n)>=0&&(g=new x(0));var m=new x(_.s);return m.ucmp(p.n)>=0&&(m=new x(0)),Buffer.concat([g.toArrayLike(Buffer,"be",32),m.toArrayLike(Buffer,"be",32)])},l.ecdhUnsafe=function(_,g,m){var E=h.keyFromPublic(_),T=new x(g);if(T.ucmp(p.n)>=0||T.isZero())throw new Error("scalar was invalid (zero or overflow)");var I=E.pub.mul(T);return a(I.getX(),I.getY(),m)};var a=function(g,m,E){var T=void 0;return E?((T=Buffer.alloc(33))[0]=m.isOdd()?3:2,g.toArrayLike(Buffer,"be",32).copy(T,1)):((T=Buffer.alloc(65))[0]=4,g.toArrayLike(Buffer,"be",32).copy(T,1),m.toArrayLike(Buffer,"be",32).copy(T,33)),T}},81593:(V,l,M)=>{var x=M(44381),y=x.Buffer;function h(a,_){for(var g in a)_[g]=a[g]}function p(a,_,g){return y(a,_,g)}y.from&&y.alloc&&y.allocUnsafe&&y.allocUnsafeSlow?V.exports=x:(h(x,l),l.Buffer=p),h(y,p),p.from=function(a,_,g){if("number"==typeof a)throw new TypeError("Argument must not be a number");return y(a,_,g)},p.alloc=function(a,_,g){if("number"!=typeof a)throw new TypeError("Argument must be a number");var m=y(a);return void 0!==_?"string"==typeof g?m.fill(_,g):m.fill(_):m.fill(0),m},p.allocUnsafe=function(a){if("number"!=typeof a)throw new TypeError("Argument must be a number");return y(a)},p.allocUnsafeSlow=function(a){if("number"!=typeof a)throw new TypeError("Argument must be a number");return x.SlowBuffer(a)}},50124:(V,l,M)=>{const x=M(26772),y=M(24789);V.exports=class h extends x{constructor(a){super(({blockTracker:_})=>y(Object.assign({blockTracker:_},a)))}}},4365:(V,l,M)=>{const x=M(26772),y=M(70114);V.exports=class h extends x{constructor(){super(({blockTracker:a,provider:_})=>y({blockTracker:a,provider:_}))}}},67576:(V,l,M)=>{const x=M(44407).inherits,y=M(31357);function h(p){this.staticResponses=p=p||{}}V.exports=h,x(h,y),h.prototype.handleRequest=function(p,a,_){var m=this.staticResponses[p.method];"function"==typeof m?m(p,a,_):void 0!==m?setTimeout(()=>_(null,m)):a()}},46082:(V,l,M)=>{const x=M(55198),y=M(5911),h=M(44407).inherits,p=M(29707),a=M(27283),_=M(26939),g=M(54907),m=M(31357),E=M(88796),T=/^[0-9A-Fa-f]+$/g;function I(w){const A=this;A.nonceLock=g(1),w.getAccounts&&(A.getAccounts=w.getAccounts),w.processTransaction&&(A.processTransaction=w.processTransaction),w.processMessage&&(A.processMessage=w.processMessage),w.processPersonalMessage&&(A.processPersonalMessage=w.processPersonalMessage),w.processTypedMessage&&(A.processTypedMessage=w.processTypedMessage),A.approveTransaction=w.approveTransaction||A.autoApprove,A.approveMessage=w.approveMessage||A.autoApprove,A.approvePersonalMessage=w.approvePersonalMessage||A.autoApprove,A.approveDecryptMessage=w.approveDecryptMessage||A.autoApprove,A.approveEncryptionPublicKey=w.approveEncryptionPublicKey||A.autoApprove,A.approveTypedMessage=w.approveTypedMessage||A.autoApprove,w.signTransaction&&(A.signTransaction=w.signTransaction||k("signTransaction")),w.signMessage&&(A.signMessage=w.signMessage||k("signMessage")),w.signPersonalMessage&&(A.signPersonalMessage=w.signPersonalMessage||k("signPersonalMessage")),w.decryptMessage&&(A.decryptMessage=w.decryptMessage||k("decryptMessage")),w.encryptionPublicKey&&(A.encryptionPublicKey=w.encryptionPublicKey||k("encryptionPublicKey")),w.signTypedMessage&&(A.signTypedMessage=w.signTypedMessage||k("signTypedMessage")),w.recoverPersonalSignature&&(A.recoverPersonalSignature=w.recoverPersonalSignature),w.publishTransaction&&(A.publishTransaction=w.publishTransaction),A.estimateGas=w.estimateGas||A.estimateGas,A.getGasPrice=w.getGasPrice||A.getGasPrice}function W(w){return w.toLowerCase()}function v(w){const A=p.addHexPrefix(w);return p.isValidAddress(A)}function L(w){const A=p.addHexPrefix(w);return!p.isValidAddress(A)&&N(w)}function N(w){return"string"==typeof w&&"0x"===w.slice(0,2)&&w.slice(2).match(T)}function k(w){return function(A,B){B(new Error('ProviderEngine - HookedWalletSubprovider - Must provide "'+w+'" fn in constructor options'))}}V.exports=I,h(I,m),I.prototype.handleRequest=function(w,A,B){const D=this;let J,at,st,tt,U;switch(D._parityRequests={},D._parityRequestCount=0,w.method){case"eth_coinbase":case"parity_defaultAccount":return void D.getAccounts(function(n,t){if(n)return B(n);B(null,t[0]||null)});case"eth_accounts":return void D.getAccounts(function(n,t){if(n)return B(n);B(null,t)});case"eth_sendTransaction":return J=w.params[0],void x([n=>D.validateTransaction(J,n),n=>D.processTransaction(J,n)],B);case"eth_signTransaction":return J=w.params[0],void x([n=>D.validateTransaction(J,n),n=>D.processSignTransaction(J,n)],B);case"eth_sign":return U=w.params[0],tt=w.params[1],st=w.params[2]||{},at=_(st,{from:U,data:tt}),void x([n=>D.validateMessage(at,n),n=>D.processMessage(at,n)],B);case"personal_sign":return function(){const n=w.params[0];if(L(w.params[1])&&v(n)){let e="The eth_personalSign method requires params ordered ";e+="[message, address]. This was previously handled incorrectly, ",e+="and has been corrected automatically. ",e+="Please switch this param order for smooth behavior in the future.",console.warn(e),U=w.params[0],tt=w.params[1]}else tt=w.params[0],U=w.params[1];st=w.params[2]||{},at=_(st,{from:U,data:tt}),x([e=>D.validatePersonalMessage(at,e),e=>D.processPersonalMessage(at,e)],B)}();case"eth_decryptMessage":return function(){const n=w.params[0];if(L(w.params[1])&&v(n)){let e="The eth_decryptMessage method requires params ordered ";e+="[message, address]. This was previously handled incorrectly, ",e+="and has been corrected automatically. ",e+="Please switch this param order for smooth behavior in the future.",console.warn(e),U=w.params[0],tt=w.params[1]}else tt=w.params[0],U=w.params[1];st=w.params[2]||{},at=_(st,{from:U,data:tt}),x([e=>D.validateDecryptMessage(at,e),e=>D.processDecryptMessage(at,e)],B)}();case"encryption_public_key":return function(){const n=w.params[0];x([t=>D.validateEncryptionPublicKey(n,t),t=>D.processEncryptionPublicKey(n,t)],B)}();case"personal_ecRecover":return tt=w.params[0],st=w.params[2]||{},at=_(st,{sig:w.params[1],data:tt}),void D.recoverPersonalSignature(at,B);case"eth_signTypedData":case"eth_signTypedData_v3":case"eth_signTypedData_v4":return function(){const n=w.params[0],t=w.params[1];v(n)?(U=n,tt=t):(tt=n,U=t),st=w.params[2]||{},at=_(st,{from:U,data:tt}),x([e=>D.validateTypedMessage(at,e),e=>D.processTypedMessage(at,e)],B)}();case"parity_postTransaction":return J=w.params[0],void D.parityPostTransaction(J,B);case"parity_postSign":return U=w.params[0],tt=w.params[1],void D.parityPostSign(U,tt,B);case"parity_checkRequest":return void D.parityCheckRequest(w.params[0],B);default:return void A()}},I.prototype.getAccounts=function(w){w(null,[])},I.prototype.processTransaction=function(w,A){const B=this;x([D=>B.approveTransaction(w,D),(D,J)=>B.checkApproval("transaction",D,J),D=>B.finalizeAndSubmitTx(w,D)],A)},I.prototype.processSignTransaction=function(w,A){const B=this;x([D=>B.approveTransaction(w,D),(D,J)=>B.checkApproval("transaction",D,J),D=>B.finalizeTx(w,D)],A)},I.prototype.processMessage=function(w,A){const B=this;x([D=>B.approveMessage(w,D),(D,J)=>B.checkApproval("message",D,J),D=>B.signMessage(w,D)],A)},I.prototype.processPersonalMessage=function(w,A){const B=this;x([D=>B.approvePersonalMessage(w,D),(D,J)=>B.checkApproval("message",D,J),D=>B.signPersonalMessage(w,D)],A)},I.prototype.processDecryptMessage=function(w,A){const B=this;x([D=>B.approveDecryptMessage(w,D),(D,J)=>B.checkApproval("decryptMessage",D,J),D=>B.decryptMessage(w,D)],A)},I.prototype.processEncryptionPublicKey=function(w,A){const B=this;x([D=>B.approveEncryptionPublicKey(w,D),(D,J)=>B.checkApproval("encryptionPublicKey",D,J),D=>B.encryptionPublicKey(w,D)],A)},I.prototype.processTypedMessage=function(w,A){const B=this;x([D=>B.approveTypedMessage(w,D),(D,J)=>B.checkApproval("message",D,J),D=>B.signTypedMessage(w,D)],A)},I.prototype.autoApprove=function(w,A){A(null,!0)},I.prototype.checkApproval=function(w,A,B){B(A?null:new Error("User denied "+w+" signature."))},I.prototype.parityPostTransaction=function(w,A){const B=this,J=`0x${B._parityRequestCount.toString(16)}`;B._parityRequestCount++,B.emitPayload({method:"eth_sendTransaction",params:[w]},function(at,st){B._parityRequests[J]=at?{error:at}:st.result}),A(null,J)},I.prototype.parityPostSign=function(w,A,B){const D=this,at=`0x${D._parityRequestCount.toString(16)}`;D._parityRequestCount++,D.emitPayload({method:"eth_sign",params:[w,A]},function(st,tt){D._parityRequests[at]=st?{error:st}:tt.result}),B(null,at)},I.prototype.parityCheckRequest=function(w,A){const D=this._parityRequests[w]||null;return D?D.error?A(D.error):void A(null,D):A(null,null)},I.prototype.recoverPersonalSignature=function(w,A){let B;try{B=a.recoverPersonalSignature(w)}catch(D){return A(D)}A(null,B)},I.prototype.validateTransaction=function(w,A){if(void 0===w.from)return A(new Error("Undefined address - from address required to sign transaction."));this.validateSender(w.from,function(D,J){return D?A(D):J?void A():A(new Error(`Unknown address - unable to sign transaction for this address: "${w.from}"`))})},I.prototype.validateMessage=function(w,A){if(void 0===w.from)return A(new Error("Undefined address - from address required to sign message."));this.validateSender(w.from,function(D,J){return D?A(D):J?void A():A(new Error(`Unknown address - unable to sign message for this address: "${w.from}"`))})},I.prototype.validatePersonalMessage=function(w,A){return void 0===w.from?A(new Error("Undefined address - from address required to sign personal message.")):void 0===w.data?A(new Error("Undefined message - message required to sign personal message.")):N(w.data)?void this.validateSender(w.from,function(D,J){return D?A(D):J?void A():A(new Error(`Unknown address - unable to sign message for this address: "${w.from}"`))}):A(new Error("HookedWalletSubprovider - validateMessage - message was not encoded as hex."))},I.prototype.validateDecryptMessage=function(w,A){return void 0===w.from?A(new Error("Undefined address - from address required to decrypt message.")):void 0===w.data?A(new Error("Undefined message - message required to decrypt message.")):N(w.data)?void this.validateSender(w.from,function(D,J){return D?A(D):J?void A():A(new Error(`Unknown address - unable to decrypt message for this address: "${w.from}"`))}):A(new Error("HookedWalletSubprovider - validateDecryptMessage - message was not encoded as hex."))},I.prototype.validateEncryptionPublicKey=function(w,A){this.validateSender(w,function(D,J){return D?A(D):J?void A():A(new Error(`Unknown address - unable to obtain encryption public key for this address: "${w}"`))})},I.prototype.validateTypedMessage=function(w,A){return void 0===w.from?A(new Error("Undefined address - from address required to sign typed data.")):void 0===w.data?A(new Error("Undefined data - message required to sign typed data.")):void this.validateSender(w.from,function(B,D){return B?A(B):D?void A():A(new Error(`Unknown address - unable to sign message for this address: "${w.from}"`))})},I.prototype.validateSender=function(w,A){if(!w)return A(null,!1);this.getAccounts(function(D,J){if(D)return A(D);const at=-1!==J.map(W).indexOf(w.toLowerCase());A(null,at)})},I.prototype.finalizeAndSubmitTx=function(w,A){const B=this;B.nonceLock.take(function(){x([B.fillInTxExtras.bind(B,w),B.signTransaction.bind(B),B.publishTransaction.bind(B)],function(D,J){if(B.nonceLock.leave(),D)return A(D);A(null,J)})})},I.prototype.finalizeTx=function(w,A){const B=this;B.nonceLock.take(function(){x([B.fillInTxExtras.bind(B,w),B.signTransaction.bind(B)],function(D,J){if(B.nonceLock.leave(),D)return A(D);A(null,{raw:J,tx:w})})})},I.prototype.publishTransaction=function(w,A){this.emitPayload({method:"eth_sendRawTransaction",params:[w]},function(D,J){if(D)return A(D);A(null,J.result)})},I.prototype.estimateGas=function(w,A){E(this.engine,w,A)},I.prototype.getGasPrice=function(w){this.emitPayload({method:"eth_gasPrice",params:[]},function(B,D){if(B)return w(B);w(null,D.result)})},I.prototype.fillInTxExtras=function(w,A){const B=this,D=w.from,J={};void 0===w.gasPrice&&(J.gasPrice=B.getGasPrice.bind(B)),void 0===w.nonce&&(J.nonce=B.emitPayload.bind(B,{method:"eth_getTransactionCount",params:[D,"pending"]})),void 0===w.gas&&(J.gas=B.estimateGas.bind(B,function F(w){return{from:w.from,to:w.to,value:w.value,data:w.data,gas:w.gas,gasPrice:w.gasPrice,nonce:w.nonce}}(w))),y(J,function(at,st){if(at)return A(at);const tt={};st.gasPrice&&(tt.gasPrice=st.gasPrice),st.nonce&&(tt.nonce=st.nonce.result),st.gas&&(tt.gas=st.gas),A(null,_(w,tt))})}},26772:(V,l,M)=>{const x=M(31357);V.exports=class y extends x{constructor(p){if(super(),!p)throw new Error("JsonRpcEngineMiddlewareSubprovider - no constructorFn specified");this._constructorFn=p}setEngine(p){if(this.middleware)throw new Error("JsonRpcEngineMiddlewareSubprovider - subprovider added to engine twice");const _=this._constructorFn({engine:p,provider:p,blockTracker:p._blockTracker});if(!_)throw new Error("JsonRpcEngineMiddlewareSubprovider - _constructorFn did not return middleware");if("function"!=typeof _)throw new Error("JsonRpcEngineMiddlewareSubprovider - specified middleware is not a function");this.middleware=_}handleRequest(p,a,_){const g={id:p.id};this.middleware(p,g,function m(T){a((I,F,W)=>{I?(delete g.result,g.error={message:I.message||I}):g.result=F,T?T(W):W()})},function E(T){if(T)return _(T);_(null,g.result)})}}},57068:(V,l,M)=>{const x=M(44407).inherits,y=M(67912),h=M(29707),p=M(31357),a=M(32914).blockTagForPayload;function _(g){this.nonceCache={}}V.exports=_,x(_,p),_.prototype.handleRequest=function(g,m,E){const T=this;switch(g.method){case"eth_getTransactionCount":var I=a(g),F=g.params[0].toLowerCase(),W=T.nonceCache[F];return void("pending"===I?W?E(null,W):m(function(v,L,N){if(v)return N();void 0===T.nonceCache[F]&&(T.nonceCache[F]=L),N()}):m());case"eth_sendRawTransaction":return void m(function(v,L,N){if(v)return N();var k=g.params[0],B=(h.stripHexPrefix(k),Buffer.from(h.stripHexPrefix(k),"hex"),new y(Buffer.from(h.stripHexPrefix(k),"hex"))),D="0x"+B.getSenderAddress().toString("hex").toLowerCase(),J=h.bufferToInt(B.nonce),at=(++J).toString(16);at.length%2&&(at="0"+at),T.nonceCache[D]=at="0x"+at,N()});case"evm_revert":return T.nonceCache={},void m();default:return void m()}}},31357:(V,l,M)=>{const x=M(88644);function y(){}V.exports=y,y.prototype.setEngine=function(h){const p=this;p.engine||(p.engine=h,h.on("block",function(a){p.currentBlock=a}),h.on("start",function(){p.start()}),h.on("stop",function(){p.stop()}))},y.prototype.handleRequest=function(h,p,a){throw new Error("Subproviders should override `handleRequest`.")},y.prototype.emitPayload=function(h,p){this.engine.sendAsync(x(h),p)},y.prototype.stop=function(){},y.prototype.start=function(){}},52087:(V,l,M)=>{const x=M(26772),y=M(67857);V.exports=class h extends x{constructor(){super(({blockTracker:a,provider:_,engine:g})=>{const{events:m,middleware:E}=y({blockTracker:a,provider:_});return m.on("notification",T=>g.emit("data",null,T)),E})}}},88644:(V,l,M)=>{const x=M(9373),y=M(26939);V.exports=function h(p){return y({id:x(),jsonrpc:"2.0",params:[]},p)}},88796:(V,l,M)=>{const x=M(88644);V.exports=function y(h,p,a){h.sendAsync(x({method:"eth_estimateGas",params:[p]}),function(_,g){if(_)return"no contract code at given address"===_.message?a(null,"0xcf08"):a(_);a(null,g.result)})}},9373:V=>{V.exports=function l(){return Math.floor(Number.MAX_SAFE_INTEGER*Math.random())}},32914:(V,l,M)=>{const x=M(18535);function h(m){return"never"!==g(m)}function a(m){var E=_(m);return E>=m.params.length?m.params:"eth_getBlockByNumber"===m.method?m.params.slice(1):m.params.slice(0,E)}function _(m){switch(m.method){case"eth_getStorageAt":return 2;case"eth_getBalance":case"eth_getCode":case"eth_getTransactionCount":case"eth_call":case"eth_estimateGas":return 1;case"eth_getBlockByNumber":return 0;default:return}}function g(m){switch(m.method){case"web3_clientVersion":case"web3_sha3":case"eth_protocolVersion":case"eth_getBlockTransactionCountByHash":case"eth_getUncleCountByBlockHash":case"eth_getCode":case"eth_getBlockByHash":case"eth_getTransactionByHash":case"eth_getTransactionByBlockHashAndIndex":case"eth_getTransactionReceipt":case"eth_getUncleByBlockHashAndIndex":case"eth_getCompilers":case"eth_compileLLL":case"eth_compileSolidity":case"eth_compileSerpent":case"shh_version":return"perma";case"eth_getBlockByNumber":case"eth_getBlockTransactionCountByNumber":case"eth_getUncleCountByBlockNumber":case"eth_getTransactionByBlockNumberAndIndex":case"eth_getUncleByBlockNumberAndIndex":return"fork";case"eth_gasPrice":case"eth_getBalance":case"eth_getStorageAt":case"eth_getTransactionCount":case"eth_call":case"eth_estimateGas":case"eth_getFilterLogs":case"eth_getLogs":case"eth_blockNumber":return"block";case"net_version":case"net_peerCount":case"net_listening":case"eth_syncing":case"eth_sign":case"eth_coinbase":case"eth_mining":case"eth_hashrate":case"eth_accounts":case"eth_sendTransaction":case"eth_sendRawTransaction":case"eth_newFilter":case"eth_newBlockFilter":case"eth_newPendingTransactionFilter":case"eth_uninstallFilter":case"eth_getFilterChanges":case"eth_getWork":case"eth_submitWork":case"eth_submitHashrate":case"db_putString":case"db_getString":case"db_putHex":case"db_getHex":case"shh_post":case"shh_newIdentity":case"shh_hasIdentity":case"shh_newGroup":case"shh_addToGroup":case"shh_newFilter":case"shh_uninstallFilter":case"shh_getFilterChanges":case"shh_getMessages":return"never"}}V.exports={cacheIdentifierForPayload:function y(m,E={}){if(!h(m))return null;const{includeBlockRef:T}=E,I=T?m.params:a(m);return m.method+":"+x(I)},canCache:h,blockTagForPayload:function p(m){var E=_(m);return E>=m.params.length?null:m.params[E]},paramsWithoutBlockTag:a,blockTagParamIndex:_,cacheTypeForPayload:g}},10361:(V,l,M)=>{const x=M(2272).EventEmitter,y=M(44407).inherits;function h(){x.call(this),this.isLocked=!0}V.exports=h,y(h,x),h.prototype.go=function(){this.isLocked=!1,this.emit("unlock")},h.prototype.stop=function(){this.isLocked=!0,this.emit("lock")},h.prototype.await=function(p){this.isLocked?this.once("unlock",p):setTimeout(p)}},82791:V=>{"use strict";V.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},77775:(V,l,M)=>{"use strict";M.r(l),M.d(l,{__assign:()=>h,__asyncDelegator:()=>A,__asyncGenerator:()=>w,__asyncValues:()=>B,__await:()=>k,__awaiter:()=>m,__classPrivateFieldGet:()=>tt,__classPrivateFieldIn:()=>n,__classPrivateFieldSet:()=>U,__createBinding:()=>T,__decorate:()=>a,__exportStar:()=>I,__extends:()=>y,__generator:()=>E,__importDefault:()=>st,__importStar:()=>at,__makeTemplateObject:()=>D,__metadata:()=>g,__param:()=>_,__read:()=>W,__rest:()=>p,__spread:()=>v,__spreadArray:()=>N,__spreadArrays:()=>L,__values:()=>F});var x=function(t,e){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,s){i.__proto__=s}||function(i,s){for(var f in s)Object.prototype.hasOwnProperty.call(s,f)&&(i[f]=s[f])})(t,e)};function y(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}x(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var h=function(){return h=Object.assign||function(e){for(var i,s=1,f=arguments.length;s=0;o--)(d=t[o])&&(c=(f<3?d(c):f>3?d(e,i,c):d(e,i))||c);return f>3&&c&&Object.defineProperty(e,i,c),c}function _(t,e){return function(i,s){e(i,s,t)}}function g(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function m(t,e,i,s){return new(i||(i=Promise))(function(c,d){function o(z){try{u(s.next(z))}catch(Z){d(Z)}}function r(z){try{u(s.throw(z))}catch(Z){d(Z)}}function u(z){z.done?c(z.value):function f(c){return c instanceof i?c:new i(function(d){d(c)})}(z.value).then(o,r)}u((s=s.apply(t,e||[])).next())})}function E(t,e){var s,f,c,d,i={label:0,sent:function(){if(1&c[0])throw c[1];return c[1]},trys:[],ops:[]};return d={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(d[Symbol.iterator]=function(){return this}),d;function o(u){return function(z){return function r(u){if(s)throw new TypeError("Generator is already executing.");for(;i;)try{if(s=1,f&&(c=2&u[0]?f.return:u[0]?f.throw||((c=f.return)&&c.call(f),0):f.next)&&!(c=c.call(f,u[1])).done)return c;switch(f=0,c&&(u=[2&u[0],c.value]),u[0]){case 0:case 1:c=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,f=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(c=(c=i.trys).length>0&&c[c.length-1])&&(6===u[0]||2===u[0])){i=0;continue}if(3===u[0]&&(!c||u[1]>c[0]&&u[1]=t.length&&(t=void 0),{value:t&&t[s++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function W(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var f,d,s=i.call(t),c=[];try{for(;(void 0===e||e-- >0)&&!(f=s.next()).done;)c.push(f.value)}catch(o){d={error:o}}finally{try{f&&!f.done&&(i=s.return)&&i.call(s)}finally{if(d)throw d.error}}return c}function v(){for(var t=[],e=0;e1||o(G,Q)})})}function o(G,Q){try{!function r(G){G.value instanceof k?Promise.resolve(G.value.v).then(u,z):Z(c[0][2],G)}(s[G](Q))}catch(et){Z(c[0][3],et)}}function u(G){o("next",G)}function z(G){o("throw",G)}function Z(G,Q){G(Q),c.shift(),c.length&&o(c[0][0],c[0][1])}}function A(t){var e,i;return e={},s("next"),s("throw",function(f){throw f}),s("return"),e[Symbol.iterator]=function(){return this},e;function s(f,c){e[f]=t[f]?function(d){return(i=!i)?{value:k(t[f](d)),done:"return"===f}:c?c(d):d}:c}}function B(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,e=t[Symbol.asyncIterator];return e?e.call(t):(t=F(t),i={},s("next"),s("throw"),s("return"),i[Symbol.asyncIterator]=function(){return this},i);function s(c){i[c]=t[c]&&function(d){return new Promise(function(o,r){!function f(c,d,o,r){Promise.resolve(r).then(function(u){c({value:u,done:o})},d)}(o,r,(d=t[c](d)).done,d.value)})}}}function D(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var J=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e};function at(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)"default"!==i&&Object.prototype.hasOwnProperty.call(t,i)&&T(e,t,i);return J(e,t),e}function st(t){return t&&t.__esModule?t:{default:t}}function tt(t,e,i,s){if("a"===i&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?s:"a"===i?s.call(t):s?s.value:e.get(t)}function U(t,e,i,s,f){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!f)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!f:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?f.call(t,i):f?f.value=i:e.set(t,i),i}function n(t,e){if(null===e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof t?e===t:t.has(e)}},94745:()=>{},33110:()=>{},66857:()=>{},56635:()=>{},84508:()=>{},19697:V=>{"use strict";V.exports=JSON.parse('{"genesisGasLimit":{"v":5000,"d":"Gas limit of the Genesis block."},"genesisDifficulty":{"v":17179869184,"d":"Difficulty of the Genesis block."},"genesisNonce":{"v":"0x0000000000000042","d":"the geneis nonce"},"genesisExtraData":{"v":"0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa","d":"extra data "},"genesisHash":{"v":"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3","d":"genesis hash"},"genesisStateRoot":{"v":"0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544","d":"the genesis state root"},"minGasLimit":{"v":5000,"d":"Minimum the gas limit may ever be."},"gasLimitBoundDivisor":{"v":1024,"d":"The bound divisor of the gas limit, used in update calculations."},"minimumDifficulty":{"v":131072,"d":"The minimum that the difficulty may ever be."},"difficultyBoundDivisor":{"v":2048,"d":"The bound divisor of the difficulty, used in the update calculations."},"durationLimit":{"v":13,"d":"The decision boundary on the blocktime duration used to determine whether difficulty should go up or not."},"maximumExtraDataSize":{"v":32,"d":"Maximum size extra data may be after Genesis."},"epochDuration":{"v":30000,"d":"Duration between proof-of-work epochs."},"stackLimit":{"v":1024,"d":"Maximum size of VM stack allowed."},"callCreateDepth":{"v":1024,"d":"Maximum depth of call/create stack."},"tierStepGas":{"v":[0,2,3,5,8,10,20],"d":"Once per operation, for a selection of them."},"expGas":{"v":10,"d":"Once per EXP instuction."},"expByteGas":{"v":10,"d":"Times ceil(log256(exponent)) for the EXP instruction."},"sha3Gas":{"v":30,"d":"Once per SHA3 operation."},"sha3WordGas":{"v":6,"d":"Once per word of the SHA3 operation\'s data."},"sloadGas":{"v":50,"d":"Once per SLOAD operation."},"sstoreSetGas":{"v":20000,"d":"Once per SSTORE operation if the zeroness changes from zero."},"sstoreResetGas":{"v":5000,"d":"Once per SSTORE operation if the zeroness does not change from zero."},"sstoreRefundGas":{"v":15000,"d":"Once per SSTORE operation if the zeroness changes to zero."},"jumpdestGas":{"v":1,"d":"Refunded gas, once per SSTORE operation if the zeroness changes to zero."},"logGas":{"v":375,"d":"Per LOG* operation."},"logDataGas":{"v":8,"d":"Per byte in a LOG* operation\'s data."},"logTopicGas":{"v":375,"d":"Multiplied by the * of the LOG*, per LOG transaction. e.g. LOG0 incurs 0 * c_txLogTopicGas, LOG4 incurs 4 * c_txLogTopicGas."},"createGas":{"v":32000,"d":"Once per CREATE operation & contract-creation transaction."},"callGas":{"v":40,"d":"Once per CALL operation & message call transaction."},"callStipend":{"v":2300,"d":"Free gas given at beginning of call."},"callValueTransferGas":{"v":9000,"d":"Paid for CALL when the value transfor is non-zero."},"callNewAccountGas":{"v":25000,"d":"Paid for CALL when the destination address didn\'t exist prior."},"suicideRefundGas":{"v":24000,"d":"Refunded following a suicide operation."},"memoryGas":{"v":3,"d":"Times the address of the (highest referenced byte in memory + 1). NOTE: referencing happens on read, write and in instructions such as RETURN and CALL."},"quadCoeffDiv":{"v":512,"d":"Divisor for the quadratic particle of the memory cost equation."},"createDataGas":{"v":200,"d":""},"txGas":{"v":21000,"d":"Per transaction. NOTE: Not payable on data of calls between transactions."},"txCreation":{"v":32000,"d":"the cost of creating a contract via tx"},"txDataZeroGas":{"v":4,"d":"Per byte of data attached to a transaction that equals zero. NOTE: Not payable on data of calls between transactions."},"txDataNonZeroGas":{"v":68,"d":"Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions."},"copyGas":{"v":3,"d":"Multiplied by the number of 32-byte words that are copied (round up) for any *COPY operation and added."},"ecrecoverGas":{"v":3000,"d":""},"sha256Gas":{"v":60,"d":""},"sha256WordGas":{"v":12,"d":""},"ripemd160Gas":{"v":600,"d":""},"ripemd160WordGas":{"v":120,"d":""},"identityGas":{"v":15,"d":""},"identityWordGas":{"v":3,"d":""},"minerReward":{"v":"5000000000000000000","d":"the amount a miner get rewarded for mining a block"},"ommerReward":{"v":"625000000000000000","d":"The amount of wei a miner of an uncle block gets for being inculded in the blockchain"},"niblingReward":{"v":"156250000000000000","d":"the amount a miner gets for inculding a uncle"},"homeSteadForkNumber":{"v":1150000,"d":"the block that the Homestead fork started at"},"homesteadRepriceForkNumber":{"v":2463000,"d":"the block that the Homestead Reprice (EIP150) fork started at"},"timebombPeriod":{"v":100000,"d":"Exponential difficulty timebomb period"},"freeBlockPeriod":{"v":2}}')}}]); \ No newline at end of file diff --git a/angular-bare-bones-demo/dist/66.df7aa39327f67da9.js b/angular-bare-bones-demo/dist/66.df7aa39327f67da9.js new file mode 100644 index 000000000..457713cb2 --- /dev/null +++ b/angular-bare-bones-demo/dist/66.df7aa39327f67da9.js @@ -0,0 +1 @@ +(self.webpackChunkAngular_bare_bones_demo=self.webpackChunkAngular_bare_bones_demo||[]).push([[66],{6066:(Dn,en,er)=>{"use strict";er.r(en),er.d(en,{CUSTOM_RPCS_FOR_WC_V2:()=>Dt,WC_V2_CHAINS:()=>zn,getWalletConnectV2ProviderInstance:()=>Hn});var I=er(3648),hr=er.n(I),Dt={1:"https://ethereum.publicnode.com",5:"https://eth-goerli.g.alchemy.com/v2/yVhq9zPJorAWsw-F87fEabSUl7cCU6z4",137:"https://polygon-rpc.com/",80001:"https://polygon-mumbai.g.alchemy.com/v2/rVI6pOV4irVsrw20cJxc1fxK_1cSeiY0",56:"https://bsc-dataseed.binance.org/",43114:"https://api.avax.network/ext/bc/C/rpc",250:"https://rpc.fantom.network/",25:"https://evm-cronos.crypto.org",42161:"https://arb1.arbitrum.io/rpc",10:"https://mainnet.optimism.io"},zn=["eip155:1","eip155:137","eip155:250","eip155:25","eip155:42161","eip155:10"],Hn=function(){return Bt=void 0,fr=void 0,yt=function(){return function(Bt,fr){var yt,gt,fe,De,Fe={label:0,sent:function(){if(1&fe[0])throw fe[1];return fe[1]},trys:[],ops:[]};return De={next:Ot(0),throw:Ot(1),return:Ot(2)},"function"==typeof Symbol&&(De[Symbol.iterator]=function(){return this}),De;function Ot(ye){return function(at){return function wr(ye){if(yt)throw new TypeError("Generator is already executing.");for(;De&&(De=0,ye[0]&&(Fe=0)),Fe;)try{if(yt=1,gt&&(fe=2&ye[0]?gt.return:ye[0]?gt.throw||((fe=gt.return)&&fe.call(gt),0):gt.next)&&!(fe=fe.call(gt,ye[1])).done)return fe;switch(gt=0,fe&&(ye=[2&ye[0],fe.value]),ye[0]){case 0:case 1:fe=ye;break;case 4:return Fe.label++,{value:ye[1],done:!1};case 5:Fe.label++,gt=ye[1],ye=[0];continue;case 7:ye=Fe.ops.pop(),Fe.trys.pop();continue;default:if(!(fe=(fe=Fe.trys).length>0&&fe[fe.length-1])&&(6===ye[0]||2===ye[0])){Fe=0;continue}if(3===ye[0]&&(!fe||ye[1]>fe[0]&&ye[1]-1?_:0,r.charCodeAt(b+1)){case 100:case 102:if(f>=h||null==e[f])break;_=h||null==e[f])break;_=h||void 0===e[f])break;_",_=b+2,b++;break}l+=n(e[f]),_=b+2,b++;break;case 115:if(f>=h)break;_-1&&(o=!1);"function"==typeof t&&(t.error=t.fatal=t.warn=t.info=t.debug=t.trace=t),!1===r.enabled&&(r.level="silent");const a=r.level||"info",h=Object.create(t);h.log||(h.log=Er),Object.defineProperty(h,"levelVal",{get:function f(){return"silent"===this.level?1/0:this.levels.values[this.level]}}),Object.defineProperty(h,"level",{get:function _(){return this._level},set:function v(m){if("silent"!==m&&!this.levels.values[m])throw Error("unknown level "+m);this._level=m,Ot(l,h,"error","log"),Ot(l,h,"fatal","error"),Ot(l,h,"warn","error"),Ot(l,h,"info","log"),Ot(l,h,"debug","log"),Ot(l,h,"trace","log")}});const l={transmit:e,serialize:i,asObject:r.browser.asObject,levels:["error","fatal","warn","info","debug","trace"],timestamp:Ac(r)};return h.levels=De.levels,h.level=a,h.setMaxListeners=h.getMaxListeners=h.emit=h.addListener=h.on=h.prependListener=h.once=h.prependOnceListener=h.removeListener=h.removeAllListeners=h.listeners=h.listenerCount=h.eventNames=h.write=h.flush=Er,h.serializers=n,h._serialize=i,h._stdErrSerialize=o,h.child=function b(m,T){if(!m)throw new Error("missing bindings for child Pino");T=T||{},i&&m.serializers&&(T.serializers=m.serializers);const j=T.serializers;if(i&&j){var $=Object.assign({},n,j),P=!0===r.browser.serialize?Object.keys($):i;delete m.serializers,at([m],P,$,this._stdErrSerialize)}function A(g){this._childLevel=1+(0|g._childLevel),this.error=Tt(g,m,"error"),this.fatal=Tt(g,m,"fatal"),this.warn=Tt(g,m,"warn"),this.info=Tt(g,m,"info"),this.debug=Tt(g,m,"debug"),this.trace=Tt(g,m,"trace"),$&&(this.serializers=$,this._serialize=P),e&&(this._logEvent=Kn([].concat(g._logEvent.bindings,m)))}return A.prototype=this,new A(this)},e&&(h._logEvent=Kn()),h}function Ot(r,e,t,n){const i=Object.getPrototypeOf(e);e[t]=e.levelVal>e.levels.values[t]?Er:i[t]?i[t]:yt[t]||yt[n]||Er,function wr(r,e,t){var n;!r.transmit&&e[t]===Er||(e[t]=(n=e[t],function(){const i=r.timestamp(),o=new Array(arguments.length),s=Object.getPrototypeOf&&Object.getPrototypeOf(this)===yt?yt:this;for(var a=0;a-1&&o in t&&(r[i][o]=t[o](r[i][o]))}function Tt(r,e,t){return function(){const n=new Array(1+arguments.length);n[0]=e;for(var i=1;i0&&s.length>i&&!s.warned){s.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=r,a.type=e,a.count=s.length,function Lc(r){console&&console.warn&&console.warn(r)}(a)}return r}function Cc(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function co(r,e,t){var n={fired:!1,wrapFn:void 0,target:r,type:e,listener:t},i=Cc.bind(n);return i.listener=t,n.wrapFn=i,i}function uo(r,e,t){var n=r._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?t?[i.listener||i]:[i]:t?function Uc(r){for(var e=new Array(r.length),t=0;t0&&(o=e[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var a=i[r];if(void 0===a)return!1;if("function"==typeof a)no(a,this,e);else{var h=a.length,l=ho(a,h);for(t=0;t=0;o--)if(t[o]===e||t[o].listener===e){s=t[o].listener,i=o;break}if(i<0)return this;0===i?t.shift():function jc(r,e){for(;e+1=0;n--)this.removeListener(r,e[n]);return this},Ae.prototype.listeners=function(r){return uo(this,r,!0)},Ae.prototype.rawListeners=function(r){return uo(this,r,!1)},Ae.listenerCount=function(r,e){return"function"==typeof r.listenerCount?r.listenerCount(e):lo.call(r,e)},Ae.prototype.listenerCount=lo,Ae.prototype.eventNames=function(){return this._eventsCount>0?rn(this._events):[]};var on={},Bn=function(r,e){return(Bn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)n.hasOwnProperty(i)&&(t[i]=n[i])})(r,e)};var Vn=function(){return Vn=Object.assign||function(r){for(var e,t=1,n=arguments.length;t=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function po(r,e){var t="function"==typeof Symbol&&r[Symbol.iterator];if(!t)return r;var i,s,n=t.call(r),o=[];try{for(;(void 0===e||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(s)throw s.error}}return o}function Sr(r){return this instanceof Sr?(this.v=r,this):new Sr(r)}var yo=Dt(Object.freeze({__proto__:null,__extends:function kc(r,e){function t(){this.constructor=r}Bn(r,e),r.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)},get __assign(){return Vn},__rest:function zc(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(r);i=0;a--)(s=r[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},__param:function Kc(r,e){return function(t,n){e(t,n,r)}},__metadata:function $c(r,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(r,e)},__awaiter:function Bc(r,e,t,n){return new(t||(t=Promise))(function(o,s){function a(f){try{l(n.next(f))}catch(_){s(_)}}function h(f){try{l(n.throw(f))}catch(_){s(_)}}function l(f){f.done?o(f.value):function i(o){return o instanceof t?o:new t(function(s){s(o)})}(f.value).then(a,h)}l((n=n.apply(r,e||[])).next())})},__generator:function Vc(r,e){var n,i,o,s,t={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(f){return function h(l){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,i&&(o=2&l[0]?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return t.label++,{value:l[1],done:!1};case 5:t.label++,i=l[1],l=[0];continue;case 7:l=t.ops.pop(),t.trys.pop();continue;default:if(!(o=(o=t.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){t=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]1||a(v,b)})})}function a(v,b){try{!function h(v){v.value instanceof Sr?Promise.resolve(v.value.v).then(l,f):_(o[0][2],v)}(n[v](b))}catch(m){_(o[0][3],m)}}function l(v){a("next",v)}function f(v){a("throw",v)}function _(v,b){v(b),o.shift(),o.length&&a(o[0][0],o[0][1])}},__asyncDelegator:function Xc(r){var e,t;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,o){e[i]=r[i]?function(s){return(t=!t)?{value:Sr(r[i](s)),done:"return"===i}:o?o(s):s}:o}},__asyncValues:function Zc(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,e=r[Symbol.asyncIterator];return e?e.call(r):(r=qn(r),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(o){t[o]=r[o]&&function(s){return new Promise(function(a,h){!function i(o,s,a,h){Promise.resolve(h).then(function(l){o({value:l,done:a})},s)}(a,h,(s=r[o](s)).done,s.value)})}}},__makeTemplateObject:function Qc(r,e){return Object.defineProperty?Object.defineProperty(r,"raw",{value:e}):r.raw=e,r},__importStar:function eu(r){if(r&&r.__esModule)return r;var e={};if(null!=r)for(var t in r)Object.hasOwnProperty.call(r,t)&&(e[t]=r[t]);return e.default=r,e},__importDefault:function tu(r){return r&&r.__esModule?r:{default:r}},__classPrivateFieldGet:function ru(r,e){if(!e.has(r))throw new TypeError("attempted to get private field on non-instance");return e.get(r)},__classPrivateFieldSet:function nu(r,e,t){if(!e.has(r))throw new TypeError("attempted to set private field on non-instance");return e.set(r,t),t}})),Or={};Object.defineProperty(Or,"__esModule",{value:!0}),Or.safeJsonParse=function ou(r){if("string"!=typeof r)throw new Error("Cannot safe json parse value of type "+typeof r);try{return JSON.parse(r)}catch{return r}},Or.safeJsonStringify=function su(r){return"string"==typeof r?r:JSON.stringify(r,(e,t)=>typeof t>"u"?null:t)};var go,sn={exports:{}};var vo,_o={},Ir={};var mo,bo,Pr={};Object.defineProperty(on,"__esModule",{value:!0}),on.KeyValueStorage=void 0;const dr=yo,wo=Or,hu=dr.__importDefault(function au(){return go||(go=1,function(){let r;function e(){}r=e,r.prototype.getItem=function(t){return this.hasOwnProperty(t)?String(this[t]):null},r.prototype.setItem=function(t,n){this[t]=String(n)},r.prototype.removeItem=function(t){delete this[t]},r.prototype.clear=function(){const t=this;Object.keys(t).forEach(function(n){t[n]=void 0,delete t[n]})},r.prototype.key=function(t){return t=t||0,Object.keys(this)[t]},r.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),sn.exports=typeof dt<"u"&&dt.localStorage?dt.localStorage:typeof window<"u"&&window.localStorage?window.localStorage:new e}()),sn.exports}()),fu=function lu(){return bo||(bo=1,function(r){Object.defineProperty(r,"__esModule",{value:!0});const e=yo;e.__exportStar(function cu(){return vo||(vo=1,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.IKeyValueStorage=void 0,Ir.IKeyValueStorage=class r{}),Ir}(),r),e.__exportStar(function uu(){if(mo)return Pr;mo=1,Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.parseEntry=void 0;const r=Or;return Pr.parseEntry=function e(t){var n;return[t[0],r.safeJsonParse(null!==(n=t[1])&&void 0!==n?n:"")]},Pr}(),r)}(_o)),_o}();class Eo{constructor(){this.localStorage=hu.default}getKeys(){return dr.__awaiter(this,void 0,void 0,function*(){return Object.keys(this.localStorage)})}getEntries(){return dr.__awaiter(this,void 0,void 0,function*(){return Object.entries(this.localStorage).map(fu.parseEntry)})}getItem(e){return dr.__awaiter(this,void 0,void 0,function*(){const t=this.localStorage.getItem(e);if(null!==t)return wo.safeJsonParse(t)})}setItem(e,t){return dr.__awaiter(this,void 0,void 0,function*(){this.localStorage.setItem(e,wo.safeJsonStringify(t))})}removeItem(e){return dr.__awaiter(this,void 0,void 0,function*(){this.localStorage.removeItem(e)})}}on.KeyValueStorage=Eo;var pu=on.default=Eo,xr={},Gn=function(r,e){return(Gn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)n.hasOwnProperty(i)&&(t[i]=n[i])})(r,e)};var Wn=function(){return Wn=Object.assign||function(r){for(var e,t=1,n=arguments.length;t=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function So(r,e){var t="function"==typeof Symbol&&r[Symbol.iterator];if(!t)return r;var i,s,n=t.call(r),o=[];try{for(;(void 0===e||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(s)throw s.error}}return o}function Fr(r){return this instanceof Fr?(this.v=r,this):new Fr(r)}var an=Dt(Object.freeze({__proto__:null,__extends:function du(r,e){function t(){this.constructor=r}Gn(r,e),r.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)},get __assign(){return Wn},__rest:function yu(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(r);i=0;a--)(s=r[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},__param:function _u(r,e){return function(t,n){e(t,n,r)}},__metadata:function vu(r,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(r,e)},__awaiter:function mu(r,e,t,n){return new(t||(t=Promise))(function(o,s){function a(f){try{l(n.next(f))}catch(_){s(_)}}function h(f){try{l(n.throw(f))}catch(_){s(_)}}function l(f){f.done?o(f.value):function i(o){return o instanceof t?o:new t(function(s){s(o)})}(f.value).then(a,h)}l((n=n.apply(r,e||[])).next())})},__generator:function bu(r,e){var n,i,o,s,t={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(f){return function h(l){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,i&&(o=2&l[0]?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return t.label++,{value:l[1],done:!1};case 5:t.label++,i=l[1],l=[0];continue;case 7:l=t.ops.pop(),t.trys.pop();continue;default:if(!(o=(o=t.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){t=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]1||a(v,b)})})}function a(v,b){try{!function h(v){v.value instanceof Fr?Promise.resolve(v.value.v).then(l,f):_(o[0][2],v)}(n[v](b))}catch(m){_(o[0][3],m)}}function l(v){a("next",v)}function f(v){a("throw",v)}function _(v,b){v(b),o.shift(),o.length&&a(o[0][0],o[0][1])}},__asyncDelegator:function Pu(r){var e,t;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,o){e[i]=r[i]?function(s){return(t=!t)?{value:Fr(r[i](s)),done:"return"===i}:o?o(s):s}:o}},__asyncValues:function xu(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,e=r[Symbol.asyncIterator];return e?e.call(r):(r=Yn(r),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(o){t[o]=r[o]&&function(s){return new Promise(function(a,h){!function i(o,s,a,h){Promise.resolve(h).then(function(l){o({value:l,done:a})},s)}(a,h,(s=r[o](s)).done,s.value)})}}},__makeTemplateObject:function Fu(r,e){return Object.defineProperty?Object.defineProperty(r,"raw",{value:e}):r.raw=e,r},__importStar:function Au(r){if(r&&r.__esModule)return r;var e={};if(null!=r)for(var t in r)Object.hasOwnProperty.call(r,t)&&(e[t]=r[t]);return e.default=r,e},__importDefault:function Nu(r){return r&&r.__esModule?r:{default:r}},__classPrivateFieldGet:function Ru(r,e){if(!e.has(r))throw new TypeError("attempted to get private field on non-instance");return e.get(r)},__classPrivateFieldSet:function Tu(r,e,t){if(!e.has(r))throw new TypeError("attempted to set private field on non-instance");return e.set(r,t),t}})),Ar={},Q={},Jn=function(r,e){return(Jn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)n.hasOwnProperty(i)&&(t[i]=n[i])})(r,e)};var Xn=function(){return Xn=Object.assign||function(r){for(var e,t=1,n=arguments.length;t=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Oo(r,e){var t="function"==typeof Symbol&&r[Symbol.iterator];if(!t)return r;var i,s,n=t.call(r),o=[];try{for(;(void 0===e||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(s)throw s.error}}return o}function Nr(r){return this instanceof Nr?(this.v=r,this):new Nr(r)}var Po,cn=Dt(Object.freeze({__proto__:null,__extends:function Cu(r,e){function t(){this.constructor=r}Jn(r,e),r.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)},get __assign(){return Xn},__rest:function ju(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(r);i=0;a--)(s=r[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},__param:function Mu(r,e){return function(t,n){e(t,n,r)}},__metadata:function Du(r,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(r,e)},__awaiter:function ku(r,e,t,n){return new(t||(t=Promise))(function(o,s){function a(f){try{l(n.next(f))}catch(_){s(_)}}function h(f){try{l(n.throw(f))}catch(_){s(_)}}function l(f){f.done?o(f.value):function i(o){return o instanceof t?o:new t(function(s){s(o)})}(f.value).then(a,h)}l((n=n.apply(r,e||[])).next())})},__generator:function zu(r,e){var n,i,o,s,t={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(f){return function h(l){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,i&&(o=2&l[0]?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return t.label++,{value:l[1],done:!1};case 5:t.label++,i=l[1],l=[0];continue;case 7:l=t.ops.pop(),t.trys.pop();continue;default:if(!(o=(o=t.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){t=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]1||a(v,b)})})}function a(v,b){try{!function h(v){v.value instanceof Nr?Promise.resolve(v.value.v).then(l,f):_(o[0][2],v)}(n[v](b))}catch(m){_(o[0][3],m)}}function l(v){a("next",v)}function f(v){a("throw",v)}function _(v,b){v(b),o.shift(),o.length&&a(o[0][0],o[0][1])}},__asyncDelegator:function qu(r){var e,t;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,o){e[i]=r[i]?function(s){return(t=!t)?{value:Nr(r[i](s)),done:"return"===i}:o?o(s):s}:o}},__asyncValues:function Gu(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,e=r[Symbol.asyncIterator];return e?e.call(r):(r=Zn(r),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(o){t[o]=r[o]&&function(s){return new Promise(function(a,h){!function i(o,s,a,h){Promise.resolve(h).then(function(l){o({value:l,done:a})},s)}(a,h,(s=r[o](s)).done,s.value)})}}},__makeTemplateObject:function Wu(r,e){return Object.defineProperty?Object.defineProperty(r,"raw",{value:e}):r.raw=e,r},__importStar:function Yu(r){if(r&&r.__esModule)return r;var e={};if(null!=r)for(var t in r)Object.hasOwnProperty.call(r,t)&&(e[t]=r[t]);return e.default=r,e},__importDefault:function Ju(r){return r&&r.__esModule?r:{default:r}},__classPrivateFieldGet:function Xu(r,e){if(!e.has(r))throw new TypeError("attempted to get private field on non-instance");return e.get(r)},__classPrivateFieldSet:function Zu(r,e,t){if(!e.has(r))throw new TypeError("attempted to set private field on non-instance");return e.set(r,t),t}})),Io={},Rr={};var Fo,tr={},xo={},yr={};var No,Ro,Lo,Co,Ao={};function To(){return Ro||(Ro=1,function(r){Object.defineProperty(r,"__esModule",{value:!0});const e=cn;e.__exportStar(function tl(){return Fo||(Fo=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.ONE_THOUSAND=yr.ONE_HUNDRED=void 0,yr.ONE_HUNDRED=100,yr.ONE_THOUSAND=1e3),yr}(),r),e.__exportStar(function rl(){return No||(No=1,r=Ao,Object.defineProperty(r,"__esModule",{value:!0}),r.ONE_YEAR=r.FOUR_WEEKS=r.THREE_WEEKS=r.TWO_WEEKS=r.ONE_WEEK=r.THIRTY_DAYS=r.SEVEN_DAYS=r.FIVE_DAYS=r.THREE_DAYS=r.ONE_DAY=r.TWENTY_FOUR_HOURS=r.TWELVE_HOURS=r.SIX_HOURS=r.THREE_HOURS=r.ONE_HOUR=r.SIXTY_MINUTES=r.THIRTY_MINUTES=r.TEN_MINUTES=r.FIVE_MINUTES=r.ONE_MINUTE=r.SIXTY_SECONDS=r.THIRTY_SECONDS=r.TEN_SECONDS=r.FIVE_SECONDS=r.ONE_SECOND=void 0,r.ONE_SECOND=1,r.FIVE_SECONDS=5,r.TEN_SECONDS=10,r.THIRTY_SECONDS=30,r.SIXTY_SECONDS=60,r.ONE_MINUTE=r.SIXTY_SECONDS,r.FIVE_MINUTES=5*r.ONE_MINUTE,r.TEN_MINUTES=10*r.ONE_MINUTE,r.THIRTY_MINUTES=30*r.ONE_MINUTE,r.SIXTY_MINUTES=60*r.ONE_MINUTE,r.ONE_HOUR=r.SIXTY_MINUTES,r.THREE_HOURS=3*r.ONE_HOUR,r.SIX_HOURS=6*r.ONE_HOUR,r.TWELVE_HOURS=12*r.ONE_HOUR,r.TWENTY_FOUR_HOURS=24*r.ONE_HOUR,r.ONE_DAY=r.TWENTY_FOUR_HOURS,r.THREE_DAYS=3*r.ONE_DAY,r.FIVE_DAYS=5*r.ONE_DAY,r.SEVEN_DAYS=7*r.ONE_DAY,r.THIRTY_DAYS=30*r.ONE_DAY,r.ONE_WEEK=r.SEVEN_DAYS,r.TWO_WEEKS=2*r.ONE_WEEK,r.THREE_WEEKS=3*r.ONE_WEEK,r.FOUR_WEEKS=4*r.ONE_WEEK,r.ONE_YEAR=365*r.ONE_DAY),Ao;var r}(),r)}(xo)),xo}function il(){return Co||(Co=1,function(r){Object.defineProperty(r,"__esModule",{value:!0});const e=cn;e.__exportStar(function el(){return Po||(Po=1,Object.defineProperty(Rr,"__esModule",{value:!0}),Rr.delay=void 0,Rr.delay=function r(e){return new Promise(t=>{setTimeout(()=>{t(!0)},e)})}),Rr}(),r),e.__exportStar(function nl(){if(Lo)return tr;Lo=1,Object.defineProperty(tr,"__esModule",{value:!0}),tr.fromMiliseconds=tr.toMiliseconds=void 0;const r=To();return tr.toMiliseconds=function e(n){return n*r.ONE_THOUSAND},tr.fromMiliseconds=function t(n){return Math.floor(n/r.ONE_THOUSAND)},tr}(),r)}(Io)),Io}var jo,gr={};var Mo,Do,Uo={},Tr={};function al(){return Do||(Do=1,r=Uo,Object.defineProperty(r,"__esModule",{value:!0}),cn.__exportStar(function sl(){return Mo||(Mo=1,Object.defineProperty(Tr,"__esModule",{value:!0}),Tr.IWatch=void 0,Tr.IWatch=class r{}),Tr}(),r)),Uo;var r}!function(r){Object.defineProperty(r,"__esModule",{value:!0});const e=cn;e.__exportStar(il(),r),e.__exportStar(function ol(){if(jo)return gr;jo=1,Object.defineProperty(gr,"__esModule",{value:!0}),gr.Watch=void 0;class r{constructor(){this.timestamps=new Map}start(t){if(this.timestamps.has(t))throw new Error(`Watch already started for label: ${t}`);this.timestamps.set(t,{started:Date.now()})}stop(t){const n=this.get(t);if(typeof n.elapsed<"u")throw new Error(`Watch already stopped for label: ${t}`);const i=Date.now()-n.started;this.timestamps.set(t,{started:n.started,elapsed:i})}get(t){const n=this.timestamps.get(t);if(typeof n>"u")throw new Error(`No timestamp found for label: ${t}`);return n}elapsed(t){const n=this.get(t);return n.elapsed||Date.now()-n.started}}return gr.Watch=r,gr.default=r,gr}(),r),e.__exportStar(al(),r),e.__exportStar(To(),r)}(Q);var ko={},Lr={};class rr{}var zo,Ho,ul=Dt(Object.freeze({__proto__:null,IEvents:rr}));function Ko(){return Ho||(Ho=1,r=ko,Object.defineProperty(r,"__esModule",{value:!0}),an.__exportStar(function ll(){if(zo)return Lr;zo=1,Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.IHeartBeat=void 0;const r=ul;return Lr.IHeartBeat=class e extends r.IEvents{constructor(n){super()}},Lr}(),r)),ko;var r}var Bo,Vo,Go,$o={},nr={};function qo(){return Vo||(Vo=1,r=$o,Object.defineProperty(r,"__esModule",{value:!0}),an.__exportStar(function hl(){return Bo||(Bo=1,Object.defineProperty(nr,"__esModule",{value:!0}),nr.HEARTBEAT_EVENTS=nr.HEARTBEAT_INTERVAL=void 0,nr.HEARTBEAT_INTERVAL=Q.FIVE_SECONDS,nr.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"}),nr}(),r)),$o;var r}!function(r){Object.defineProperty(r,"__esModule",{value:!0});const e=an;e.__exportStar(function fl(){if(Go)return Ar;Go=1,Object.defineProperty(Ar,"__esModule",{value:!0}),Ar.HeartBeat=void 0;const r=an,e=ct.exports,t=Q,n=Ko(),i=qo();class o extends n.IHeartBeat{constructor(a){super(a),this.events=new e.EventEmitter,this.interval=i.HEARTBEAT_INTERVAL,this.interval=a?.interval||i.HEARTBEAT_INTERVAL}static init(a){return r.__awaiter(this,void 0,void 0,function*(){const h=new o(a);return yield h.init(),h})}init(){return r.__awaiter(this,void 0,void 0,function*(){yield this.initialize()})}stop(){clearInterval(this.intervalRef)}on(a,h){this.events.on(a,h)}once(a,h){this.events.once(a,h)}off(a,h){this.events.off(a,h)}removeListener(a,h){this.events.removeListener(a,h)}initialize(){return r.__awaiter(this,void 0,void 0,function*(){this.intervalRef=setInterval(()=>this.pulse(),t.toMiliseconds(this.interval))})}pulse(){this.events.emit(i.HEARTBEAT_EVENTS.pulse)}}return Ar.HeartBeat=o,Ar}(),r),e.__exportStar(Ko(),r),e.__exportStar(qo(),r)}(xr);var xe={},Qn=function(r,e){return(Qn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)n.hasOwnProperty(i)&&(t[i]=n[i])})(r,e)};var ei=function(){return ei=Object.assign||function(r){for(var e,t=1,n=arguments.length;t=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Wo(r,e){var t="function"==typeof Symbol&&r[Symbol.iterator];if(!t)return r;var i,s,n=t.call(r),o=[];try{for(;(void 0===e||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(s)throw s.error}}return o}function Cr(r){return this instanceof Cr?(this.v=r,this):new Cr(r)}var Yo,Ll=Dt(Object.freeze({__proto__:null,__extends:function pl(r,e){function t(){this.constructor=r}Qn(r,e),r.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)},get __assign(){return ei},__rest:function dl(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(r);i=0;a--)(s=r[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},__param:function gl(r,e){return function(t,n){e(t,n,r)}},__metadata:function _l(r,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(r,e)},__awaiter:function vl(r,e,t,n){return new(t||(t=Promise))(function(o,s){function a(f){try{l(n.next(f))}catch(_){s(_)}}function h(f){try{l(n.throw(f))}catch(_){s(_)}}function l(f){f.done?o(f.value):function i(o){return o instanceof t?o:new t(function(s){s(o)})}(f.value).then(a,h)}l((n=n.apply(r,e||[])).next())})},__generator:function ml(r,e){var n,i,o,s,t={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(f){return function h(l){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,i&&(o=2&l[0]?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return t.label++,{value:l[1],done:!1};case 5:t.label++,i=l[1],l=[0];continue;case 7:l=t.ops.pop(),t.trys.pop();continue;default:if(!(o=(o=t.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){t=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]1||a(v,b)})})}function a(v,b){try{!function h(v){v.value instanceof Cr?Promise.resolve(v.value.v).then(l,f):_(o[0][2],v)}(n[v](b))}catch(m){_(o[0][3],m)}}function l(v){a("next",v)}function f(v){a("throw",v)}function _(v,b){v(b),o.shift(),o.length&&a(o[0][0],o[0][1])}},__asyncDelegator:function Il(r){var e,t;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,o){e[i]=r[i]?function(s){return(t=!t)?{value:Cr(r[i](s)),done:"return"===i}:o?o(s):s}:o}},__asyncValues:function Pl(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,e=r[Symbol.asyncIterator];return e?e.call(r):(r=ti(r),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(o){t[o]=r[o]&&function(s){return new Promise(function(a,h){!function i(o,s,a,h){Promise.resolve(h).then(function(l){o({value:l,done:a})},s)}(a,h,(s=r[o](s)).done,s.value)})}}},__makeTemplateObject:function xl(r,e){return Object.defineProperty?Object.defineProperty(r,"raw",{value:e}):r.raw=e,r},__importStar:function Fl(r){if(r&&r.__esModule)return r;var e={};if(null!=r)for(var t in r)Object.hasOwnProperty.call(r,t)&&(e[t]=r[t]);return e.default=r,e},__importDefault:function Al(r){return r&&r.__esModule?r:{default:r}},__classPrivateFieldGet:function Nl(r,e){if(!e.has(r))throw new TypeError("attempted to get private field on non-instance");return e.get(r)},__classPrivateFieldSet:function Rl(r,e,t){if(!e.has(r))throw new TypeError("attempted to set private field on non-instance");return e.set(r,t),t}})),_r={};function Jo(){return Yo||(Yo=1,Object.defineProperty(_r,"__esModule",{value:!0}),_r.PINO_CUSTOM_CONTEXT_KEY=_r.PINO_LOGGER_DEFAULTS=void 0,_r.PINO_LOGGER_DEFAULTS={level:"info"},_r.PINO_CUSTOM_CONTEXT_KEY="custom_context"),_r}var Xo,ht={};!function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.pino=void 0;const e=Ll,t=e.__importDefault(Fe);Object.defineProperty(r,"pino",{enumerable:!0,get:function(){return t.default}}),e.__exportStar(Jo(),r),e.__exportStar(function Cl(){if(Xo)return ht;Xo=1,Object.defineProperty(ht,"__esModule",{value:!0}),ht.generateChildLogger=ht.formatChildLoggerContext=ht.getLoggerContext=ht.setBrowserLoggerContext=ht.getBrowserLoggerContext=ht.getDefaultLoggerOptions=void 0;const r=Jo();function t(a,h=r.PINO_CUSTOM_CONTEXT_KEY){return a[h]||""}function n(a,h,l=r.PINO_CUSTOM_CONTEXT_KEY){return a[l]=h,a}function i(a,h=r.PINO_CUSTOM_CONTEXT_KEY){let l="";return l=typeof a.bindings>"u"?t(a,h):a.bindings().context||"",l}function o(a,h,l=r.PINO_CUSTOM_CONTEXT_KEY){const f=i(a,l);return f.trim()?`${f}/${h}`:h}return ht.getDefaultLoggerOptions=function e(a){return Object.assign(Object.assign({},a),{level:a?.level||r.PINO_LOGGER_DEFAULTS.level})},ht.getBrowserLoggerContext=t,ht.setBrowserLoggerContext=n,ht.getLoggerContext=i,ht.formatChildLoggerContext=o,ht.generateChildLogger=function s(a,h,l=r.PINO_CUSTOM_CONTEXT_KEY){const f=o(a,h,l);return n(a.child({context:f}),f,l)},ht}(),r)}(xe);class jl extends rr{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}}class Ul extends rr{constructor(e,t){super(),this.core=e,this.logger=t,this.records=new Map}}class Dl extends rr{constructor(e,t){super(),this.relayer=e,this.logger=t}}class kl extends rr{constructor(e){super()}}class Hl extends rr{constructor(e,t){super(),this.relayer=e,this.logger=t}}class Kl extends rr{constructor(e,t){super(),this.core=e,this.logger=t}}function ri(r){if("string"!=typeof r)throw new Error("Cannot safe json parse value of type "+typeof r);try{return JSON.parse(r)}catch{return r}}function jr(r){return"string"==typeof r?r:JSON.stringify(r)}var ni={},vr={},un={},ln={};Object.defineProperty(ln,"__esModule",{value:!0}),ln.BrowserRandomSource=void 0;ln.BrowserRandomSource=class Vl{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const e=typeof self<"u"?self.crypto||self.msCrypto:null;e&&void 0!==e.getRandomValues&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const t=new Uint8Array(e);for(let n=0;n>>16&65535)*v+f*(h>>>16&65535)<<16>>>0)|0},r.add=function t(a,h){return a+h|0},r.sub=function n(a,h){return a-h|0},r.rotl=function i(a,h){return a<>>32-h},r.rotr=function o(a,h){return a<<32-h|a>>>h},r.isInteger=Number.isInteger||function s(a){return"number"==typeof a&&isFinite(a)&&Math.floor(a)===a},r.MAX_SAFE_INTEGER=9007199254740991,r.isSafeInteger=function(a){return r.isInteger(a)&&a>=-r.MAX_SAFE_INTEGER&&a<=r.MAX_SAFE_INTEGER},Object.defineProperty(ne,"__esModule",{value:!0});var es=Qo;function ts(r,e,t){return void 0===e&&(e=new Uint8Array(2)),void 0===t&&(t=0),e[t+0]=r>>>8,e[t+1]=r>>>0,e}function rs(r,e,t){return void 0===e&&(e=new Uint8Array(2)),void 0===t&&(t=0),e[t+0]=r>>>0,e[t+1]=r>>>8,e}function ii(r,e){return void 0===e&&(e=0),r[e]<<24|r[e+1]<<16|r[e+2]<<8|r[e+3]}function oi(r,e){return void 0===e&&(e=0),(r[e]<<24|r[e+1]<<16|r[e+2]<<8|r[e+3])>>>0}function si(r,e){return void 0===e&&(e=0),r[e+3]<<24|r[e+2]<<16|r[e+1]<<8|r[e]}function ai(r,e){return void 0===e&&(e=0),(r[e+3]<<24|r[e+2]<<16|r[e+1]<<8|r[e])>>>0}function fn(r,e,t){return void 0===e&&(e=new Uint8Array(4)),void 0===t&&(t=0),e[t+0]=r>>>24,e[t+1]=r>>>16,e[t+2]=r>>>8,e[t+3]=r>>>0,e}function pn(r,e,t){return void 0===e&&(e=new Uint8Array(4)),void 0===t&&(t=0),e[t+0]=r>>>0,e[t+1]=r>>>8,e[t+2]=r>>>16,e[t+3]=r>>>24,e}function ns(r,e,t){return void 0===e&&(e=new Uint8Array(8)),void 0===t&&(t=0),fn(r/4294967296>>>0,e,t),fn(r>>>0,e,t+4),e}function is(r,e,t){return void 0===e&&(e=new Uint8Array(8)),void 0===t&&(t=0),pn(r>>>0,e,t),pn(r/4294967296>>>0,e,t+4),e}ne.readInt16BE=function rh(r,e){return void 0===e&&(e=0),(r[e+0]<<8|r[e+1])<<16>>16},ne.readUint16BE=function nh(r,e){return void 0===e&&(e=0),(r[e+0]<<8|r[e+1])>>>0},ne.readInt16LE=function ih(r,e){return void 0===e&&(e=0),(r[e+1]<<8|r[e])<<16>>16},ne.readUint16LE=function oh(r,e){return void 0===e&&(e=0),(r[e+1]<<8|r[e])>>>0},ne.writeUint16BE=ts,ne.writeInt16BE=ts,ne.writeUint16LE=rs,ne.writeInt16LE=rs,ne.readInt32BE=ii,ne.readUint32BE=oi,ne.readInt32LE=si,ne.readUint32LE=ai,ne.writeUint32BE=fn,ne.writeInt32BE=fn,ne.writeUint32LE=pn,ne.writeInt32LE=pn,ne.readInt64BE=function sh(r,e){void 0===e&&(e=0);var t=ii(r,e),n=ii(r,e+4);return 4294967296*t+n-4294967296*(n>>31)},ne.readUint64BE=function ah(r,e){return void 0===e&&(e=0),4294967296*oi(r,e)+oi(r,e+4)},ne.readInt64LE=function ch(r,e){void 0===e&&(e=0);var t=si(r,e);return 4294967296*si(r,e+4)+t-4294967296*(t>>31)},ne.readUint64LE=function uh(r,e){void 0===e&&(e=0);var t=ai(r,e);return 4294967296*ai(r,e+4)+t},ne.writeUint64BE=ns,ne.writeInt64BE=ns,ne.writeUint64LE=is,ne.writeInt64LE=is,ne.readUintBE=function lh(r,e,t){if(void 0===t&&(t=0),r%8!=0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(r/8>e.length-t)throw new Error("readUintBE: array is too short for the given bitLength");for(var n=0,i=1,o=r/8+t-1;o>=t;o--)n+=e[o]*i,i*=256;return n},ne.readUintLE=function hh(r,e,t){if(void 0===t&&(t=0),r%8!=0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(r/8>e.length-t)throw new Error("readUintLE: array is too short for the given bitLength");for(var n=0,i=1,o=t;o=n;o--)t[o]=e/i&255,i*=256;return t},ne.writeUintLE=function ph(r,e,t,n){if(void 0===t&&(t=new Uint8Array(r/8)),void 0===n&&(n=0),r%8!=0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!es.isSafeInteger(e))throw new Error("writeUintLE value must be an integer");for(var i=1,o=n;o256)throw new Error("randomString charset is too long");let v="";const b=f.length,m=256-256%b;for(;l>0;){const T=i(Math.ceil(256*l/m),_);for(let j=0;j0;j++){const $=T[j];$0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=h[f++],l--;this._bufferLength===this.blockSize&&(o(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(l>=this.blockSize&&(f=o(this._tempHi,this._tempLo,this._stateHi,this._stateLo,h,f,l),l%=this.blockSize);l>0;)this._buffer[this._bufferLength++]=h[f++],l--;return this},a.prototype.finish=function(h){if(!this._finished){var l=this._bytesHashed,f=this._bufferLength,_=l/536870912|0,v=l<<3,b=l%128<112?128:256;this._buffer[f]=128;for(var m=f+1;m0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},a.prototype.restoreState=function(h){return this._stateHi.set(h.stateHi),this._stateLo.set(h.stateLo),this._bufferLength=h.bufferLength,h.buffer&&this._buffer.set(h.buffer),this._bytesHashed=h.bytesHashed,this._finished=!1,this},a.prototype.cleanSavedState=function(h){t.wipe(h.stateHi),t.wipe(h.stateLo),h.buffer&&t.wipe(h.buffer),h.bufferLength=0,h.bytesHashed=0},a}();r.SHA512=n;var i=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function o(a,h,l,f,_,v,b){for(var d,S,M,D,C,L,z,H,m=l[0],T=l[1],j=l[2],$=l[3],P=l[4],A=l[5],g=l[6],O=l[7],w=f[0],c=f[1],p=f[2],k=f[3],K=f[4],G=f[5],X=f[6],Z=f[7];b>=128;){for(var ee=0;ee<16;ee++)a[ee]=e.readUint32BE(_,B=8*ee+v),h[ee]=e.readUint32BE(_,B+4);for(ee=0;ee<80;ee++){var E,Ce,J=T,ce=j,R=$,N=P,x=A,u=g,W=c,pe=p,be=k,ge=K,Se=G,ze=X;if(C=65535&(S=Z),L=S>>>16,z=65535&(d=O),H=d>>>16,C+=65535&(S=(K>>>14|P<<18)^(K>>>18|P<<14)^(P>>>9|K<<23)),L+=S>>>16,z+=65535&(d=(P>>>14|K<<18)^(P>>>18|K<<14)^(K>>>9|P<<23)),H+=d>>>16,C+=65535&(S=K&G^~K&X),L+=S>>>16,z+=65535&(d=P&A^~P&g),H+=d>>>16,C+=65535&(S=i[2*ee+1]),L+=S>>>16,z+=65535&(d=i[2*ee]),H+=d>>>16,L+=(S=h[ee%16])>>>16,z+=65535&(d=a[ee%16]),H+=d>>>16,z+=(L+=(C+=65535&S)>>>16)>>>16,C=65535&(S=D=65535&C|L<<16),L=S>>>16,z=65535&(d=M=65535&z|(H+=z>>>16)<<16),H=d>>>16,C+=65535&(S=(w>>>28|m<<4)^(m>>>2|w<<30)^(m>>>7|w<<25)),L+=S>>>16,z+=65535&(d=(m>>>28|w<<4)^(w>>>2|m<<30)^(w>>>7|m<<25)),H+=d>>>16,L+=(S=w&c^w&p^c&p)>>>16,z+=65535&(d=m&T^m&j^T&j),H+=d>>>16,E=65535&(z+=(L+=(C+=65535&S)>>>16)>>>16)|(H+=z>>>16)<<16,Ce=65535&C|L<<16,C=65535&(S=be),L=S>>>16,z=65535&(d=R),H=d>>>16,L+=(S=D)>>>16,z+=65535&(d=M),H+=d>>>16,T=m,j=J,$=ce,P=R=65535&(z+=(L+=(C+=65535&S)>>>16)>>>16)|(H+=z>>>16)<<16,A=N,g=x,O=u,m=E,c=w,p=W,k=pe,K=be=65535&C|L<<16,G=ge,X=Se,Z=ze,w=Ce,ee%16==15)for(var B=0;B<16;B++)C=65535&(S=h[B]),L=S>>>16,z=65535&(d=a[B]),H=d>>>16,C+=65535&(S=h[(B+9)%16]),L+=S>>>16,z+=65535&(d=a[(B+9)%16]),H+=d>>>16,C+=65535&(S=((D=h[(B+1)%16])>>>1|(M=a[(B+1)%16])<<31)^(D>>>8|M<<24)^(D>>>7|M<<25)),L+=S>>>16,z+=65535&(d=(M>>>1|D<<31)^(M>>>8|D<<24)^M>>>7),H+=d>>>16,L+=(S=((D=h[(B+14)%16])>>>19|(M=a[(B+14)%16])<<13)^(M>>>29|D<<3)^(D>>>6|M<<26))>>>16,z+=65535&(d=(M>>>19|D<<13)^(D>>>29|M<<3)^M>>>6),H+=d>>>16,a[B]=65535&(z+=(L+=(C+=65535&S)>>>16)>>>16)|(H+=z>>>16)<<16,h[B]=65535&C|L<<16}C=65535&(S=w),L=S>>>16,z=65535&(d=m),H=d>>>16,L+=(S=f[0])>>>16,z+=65535&(d=l[0]),H+=d>>>16,l[0]=m=65535&(z+=(L+=(C+=65535&S)>>>16)>>>16)|(H+=z>>>16)<<16,f[0]=w=65535&C|L<<16,C=65535&(S=c),L=S>>>16,z=65535&(d=T),H=d>>>16,L+=(S=f[1])>>>16,z+=65535&(d=l[1]),H+=d>>>16,l[1]=T=65535&(z+=(L+=(C+=65535&S)>>>16)>>>16)|(H+=z>>>16)<<16,f[1]=c=65535&C|L<<16,C=65535&(S=p),L=S>>>16,z=65535&(d=j),H=d>>>16,L+=(S=f[2])>>>16,z+=65535&(d=l[2]),H+=d>>>16,l[2]=j=65535&(z+=(L+=(C+=65535&S)>>>16)>>>16)|(H+=z>>>16)<<16,f[2]=p=65535&C|L<<16,C=65535&(S=k),L=S>>>16,z=65535&(d=$),H=d>>>16,L+=(S=f[3])>>>16,z+=65535&(d=l[3]),H+=d>>>16,l[3]=$=65535&(z+=(L+=(C+=65535&S)>>>16)>>>16)|(H+=z>>>16)<<16,f[3]=k=65535&C|L<<16,C=65535&(S=K),L=S>>>16,z=65535&(d=P),H=d>>>16,L+=(S=f[4])>>>16,z+=65535&(d=l[4]),H+=d>>>16,l[4]=P=65535&(z+=(L+=(C+=65535&S)>>>16)>>>16)|(H+=z>>>16)<<16,f[4]=K=65535&C|L<<16,C=65535&(S=G),L=S>>>16,z=65535&(d=A),H=d>>>16,L+=(S=f[5])>>>16,z+=65535&(d=l[5]),H+=d>>>16,l[5]=A=65535&(z+=(L+=(C+=65535&S)>>>16)>>>16)|(H+=z>>>16)<<16,f[5]=G=65535&C|L<<16,C=65535&(S=X),L=S>>>16,z=65535&(d=g),H=d>>>16,L+=(S=f[6])>>>16,z+=65535&(d=l[6]),H+=d>>>16,l[6]=g=65535&(z+=(L+=(C+=65535&S)>>>16)>>>16)|(H+=z>>>16)<<16,f[6]=X=65535&C|L<<16,C=65535&(S=Z),L=S>>>16,z=65535&(d=O),H=d>>>16,L+=(S=f[7])>>>16,z+=65535&(d=l[7]),H+=d>>>16,l[7]=O=65535&(z+=(L+=(C+=65535&S)>>>16)>>>16)|(H+=z>>>16)<<16,f[7]=Z=65535&C|L<<16,v+=128,b-=128}return v}r.hash=function s(a){var h=new n;h.update(a);var l=h.digest();return h.clean(),l}})(os),function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertSecretKeyToX25519=r.convertPublicKeyToX25519=r.verify=r.sign=r.extractPublicKeyFromSecretKey=r.generateKeyPair=r.generateKeyPairFromSeed=r.SEED_LENGTH=r.SECRET_KEY_LENGTH=r.PUBLIC_KEY_LENGTH=r.SIGNATURE_LENGTH=void 0;const e=vr,t=os,n=wt;function i(R){const N=new Float64Array(16);if(R)for(let x=0;x>16&1),x[W-1]&=65535;x[15]=u[15]-32767-(x[14]>>16&1);const V=x[15]>>16&1;x[14]&=65535,T(u,x,1-V)}for(let E=0;E<16;E++)R[2*E]=255&u[E],R[2*E+1]=u[E]>>8}function $(R,N){let x=0;for(let u=0;u<32;u++)x|=R[u]^N[u];return(1&x-1>>>8)-1}function P(R,N){const x=new Uint8Array(32),u=new Uint8Array(32);return j(x,R),j(u,N),$(x,u)}function A(R){const N=new Uint8Array(32);return j(N,R),1&N[0]}function O(R,N,x){for(let u=0;u<16;u++)R[u]=N[u]+x[u]}function w(R,N,x){for(let u=0;u<16;u++)R[u]=N[u]-x[u]}function c(R,N,x){let u,E,V=0,W=0,pe=0,be=0,ge=0,Se=0,ze=0,Ce=0,me=0,_e=0,de=0,le=0,ue=0,ae=0,oe=0,re=0,he=0,ve=0,ie=0,we=0,Ee=0,Ie=0,Pe=0,Oe=0,Nt=0,Mt=0,Jt=0,Et=0,ar=0,Xr=0,Rn=0,Ke=x[0],je=x[1],$e=x[2],Be=x[3],Ve=x[4],Ue=x[5],Ye=x[6],Je=x[7],Xe=x[8],Ze=x[9],Qe=x[10],Ge=x[11],qe=x[12],Te=x[13],et=x[14],tt=x[15];u=N[0],V+=u*Ke,W+=u*je,pe+=u*$e,be+=u*Be,ge+=u*Ve,Se+=u*Ue,ze+=u*Ye,Ce+=u*Je,me+=u*Xe,_e+=u*Ze,de+=u*Qe,le+=u*Ge,ue+=u*qe,ae+=u*Te,oe+=u*et,re+=u*tt,u=N[1],W+=u*Ke,pe+=u*je,be+=u*$e,ge+=u*Be,Se+=u*Ve,ze+=u*Ue,Ce+=u*Ye,me+=u*Je,_e+=u*Xe,de+=u*Ze,le+=u*Qe,ue+=u*Ge,ae+=u*qe,oe+=u*Te,re+=u*et,he+=u*tt,u=N[2],pe+=u*Ke,be+=u*je,ge+=u*$e,Se+=u*Be,ze+=u*Ve,Ce+=u*Ue,me+=u*Ye,_e+=u*Je,de+=u*Xe,le+=u*Ze,ue+=u*Qe,ae+=u*Ge,oe+=u*qe,re+=u*Te,he+=u*et,ve+=u*tt,u=N[3],be+=u*Ke,ge+=u*je,Se+=u*$e,ze+=u*Be,Ce+=u*Ve,me+=u*Ue,_e+=u*Ye,de+=u*Je,le+=u*Xe,ue+=u*Ze,ae+=u*Qe,oe+=u*Ge,re+=u*qe,he+=u*Te,ve+=u*et,ie+=u*tt,u=N[4],ge+=u*Ke,Se+=u*je,ze+=u*$e,Ce+=u*Be,me+=u*Ve,_e+=u*Ue,de+=u*Ye,le+=u*Je,ue+=u*Xe,ae+=u*Ze,oe+=u*Qe,re+=u*Ge,he+=u*qe,ve+=u*Te,ie+=u*et,we+=u*tt,u=N[5],Se+=u*Ke,ze+=u*je,Ce+=u*$e,me+=u*Be,_e+=u*Ve,de+=u*Ue,le+=u*Ye,ue+=u*Je,ae+=u*Xe,oe+=u*Ze,re+=u*Qe,he+=u*Ge,ve+=u*qe,ie+=u*Te,we+=u*et,Ee+=u*tt,u=N[6],ze+=u*Ke,Ce+=u*je,me+=u*$e,_e+=u*Be,de+=u*Ve,le+=u*Ue,ue+=u*Ye,ae+=u*Je,oe+=u*Xe,re+=u*Ze,he+=u*Qe,ve+=u*Ge,ie+=u*qe,we+=u*Te,Ee+=u*et,Ie+=u*tt,u=N[7],Ce+=u*Ke,me+=u*je,_e+=u*$e,de+=u*Be,le+=u*Ve,ue+=u*Ue,ae+=u*Ye,oe+=u*Je,re+=u*Xe,he+=u*Ze,ve+=u*Qe,ie+=u*Ge,we+=u*qe,Ee+=u*Te,Ie+=u*et,Pe+=u*tt,u=N[8],me+=u*Ke,_e+=u*je,de+=u*$e,le+=u*Be,ue+=u*Ve,ae+=u*Ue,oe+=u*Ye,re+=u*Je,he+=u*Xe,ve+=u*Ze,ie+=u*Qe,we+=u*Ge,Ee+=u*qe,Ie+=u*Te,Pe+=u*et,Oe+=u*tt,u=N[9],_e+=u*Ke,de+=u*je,le+=u*$e,ue+=u*Be,ae+=u*Ve,oe+=u*Ue,re+=u*Ye,he+=u*Je,ve+=u*Xe,ie+=u*Ze,we+=u*Qe,Ee+=u*Ge,Ie+=u*qe,Pe+=u*Te,Oe+=u*et,Nt+=u*tt,u=N[10],de+=u*Ke,le+=u*je,ue+=u*$e,ae+=u*Be,oe+=u*Ve,re+=u*Ue,he+=u*Ye,ve+=u*Je,ie+=u*Xe,we+=u*Ze,Ee+=u*Qe,Ie+=u*Ge,Pe+=u*qe,Oe+=u*Te,Nt+=u*et,Mt+=u*tt,u=N[11],le+=u*Ke,ue+=u*je,ae+=u*$e,oe+=u*Be,re+=u*Ve,he+=u*Ue,ve+=u*Ye,ie+=u*Je,we+=u*Xe,Ee+=u*Ze,Ie+=u*Qe,Pe+=u*Ge,Oe+=u*qe,Nt+=u*Te,Mt+=u*et,Jt+=u*tt,u=N[12],ue+=u*Ke,ae+=u*je,oe+=u*$e,re+=u*Be,he+=u*Ve,ve+=u*Ue,ie+=u*Ye,we+=u*Je,Ee+=u*Xe,Ie+=u*Ze,Pe+=u*Qe,Oe+=u*Ge,Nt+=u*qe,Mt+=u*Te,Jt+=u*et,Et+=u*tt,u=N[13],ae+=u*Ke,oe+=u*je,re+=u*$e,he+=u*Be,ve+=u*Ve,ie+=u*Ue,we+=u*Ye,Ee+=u*Je,Ie+=u*Xe,Pe+=u*Ze,Oe+=u*Qe,Nt+=u*Ge,Mt+=u*qe,Jt+=u*Te,Et+=u*et,ar+=u*tt,u=N[14],oe+=u*Ke,re+=u*je,he+=u*$e,ve+=u*Be,ie+=u*Ve,we+=u*Ue,Ee+=u*Ye,Ie+=u*Je,Pe+=u*Xe,Oe+=u*Ze,Nt+=u*Qe,Mt+=u*Ge,Jt+=u*qe,Et+=u*Te,ar+=u*et,Xr+=u*tt,u=N[15],re+=u*Ke,he+=u*je,ve+=u*$e,ie+=u*Be,we+=u*Ve,Ee+=u*Ue,Ie+=u*Ye,Pe+=u*Je,Oe+=u*Xe,Nt+=u*Ze,Mt+=u*Qe,Jt+=u*Ge,Et+=u*qe,ar+=u*Te,Xr+=u*et,Rn+=u*tt,V+=38*he,W+=38*ve,pe+=38*ie,be+=38*we,ge+=38*Ee,Se+=38*Ie,ze+=38*Pe,Ce+=38*Oe,me+=38*Nt,_e+=38*Mt,de+=38*Jt,le+=38*Et,ue+=38*ar,ae+=38*Xr,oe+=38*Rn,E=1,u=V+E+65535,E=Math.floor(u/65536),V=u-65536*E,u=W+E+65535,E=Math.floor(u/65536),W=u-65536*E,u=pe+E+65535,E=Math.floor(u/65536),pe=u-65536*E,u=be+E+65535,E=Math.floor(u/65536),be=u-65536*E,u=ge+E+65535,E=Math.floor(u/65536),ge=u-65536*E,u=Se+E+65535,E=Math.floor(u/65536),Se=u-65536*E,u=ze+E+65535,E=Math.floor(u/65536),ze=u-65536*E,u=Ce+E+65535,E=Math.floor(u/65536),Ce=u-65536*E,u=me+E+65535,E=Math.floor(u/65536),me=u-65536*E,u=_e+E+65535,E=Math.floor(u/65536),_e=u-65536*E,u=de+E+65535,E=Math.floor(u/65536),de=u-65536*E,u=le+E+65535,E=Math.floor(u/65536),le=u-65536*E,u=ue+E+65535,E=Math.floor(u/65536),ue=u-65536*E,u=ae+E+65535,E=Math.floor(u/65536),ae=u-65536*E,u=oe+E+65535,E=Math.floor(u/65536),oe=u-65536*E,u=re+E+65535,E=Math.floor(u/65536),re=u-65536*E,V+=E-1+37*(E-1),E=1,u=V+E+65535,E=Math.floor(u/65536),V=u-65536*E,u=W+E+65535,E=Math.floor(u/65536),W=u-65536*E,u=pe+E+65535,E=Math.floor(u/65536),pe=u-65536*E,u=be+E+65535,E=Math.floor(u/65536),be=u-65536*E,u=ge+E+65535,E=Math.floor(u/65536),ge=u-65536*E,u=Se+E+65535,E=Math.floor(u/65536),Se=u-65536*E,u=ze+E+65535,E=Math.floor(u/65536),ze=u-65536*E,u=Ce+E+65535,E=Math.floor(u/65536),Ce=u-65536*E,u=me+E+65535,E=Math.floor(u/65536),me=u-65536*E,u=_e+E+65535,E=Math.floor(u/65536),_e=u-65536*E,u=de+E+65535,E=Math.floor(u/65536),de=u-65536*E,u=le+E+65535,E=Math.floor(u/65536),le=u-65536*E,u=ue+E+65535,E=Math.floor(u/65536),ue=u-65536*E,u=ae+E+65535,E=Math.floor(u/65536),ae=u-65536*E,u=oe+E+65535,E=Math.floor(u/65536),oe=u-65536*E,u=re+E+65535,E=Math.floor(u/65536),re=u-65536*E,V+=E-1+37*(E-1),R[0]=V,R[1]=W,R[2]=pe,R[3]=be,R[4]=ge,R[5]=Se,R[6]=ze,R[7]=Ce,R[8]=me,R[9]=_e,R[10]=de,R[11]=le,R[12]=ue,R[13]=ae,R[14]=oe,R[15]=re}function p(R,N){c(R,N,N)}function k(R,N){const x=i();let u;for(u=0;u<16;u++)x[u]=N[u];for(u=253;u>=0;u--)p(x,x),2!==u&&4!==u&&c(x,x,N);for(u=0;u<16;u++)R[u]=x[u]}function G(R,N){const x=i(),u=i(),E=i(),V=i(),W=i(),pe=i(),be=i(),ge=i(),Se=i();w(x,R[1],R[0]),w(Se,N[1],N[0]),c(x,x,Se),O(u,R[0],R[1]),O(Se,N[0],N[1]),c(u,u,Se),c(E,R[3],N[3]),c(E,E,l),c(V,R[2],N[2]),O(V,V,V),w(W,u,x),w(pe,V,E),O(be,V,E),O(ge,u,x),c(R[0],W,pe),c(R[1],ge,be),c(R[2],be,pe),c(R[3],W,ge)}function X(R,N,x){for(let u=0;u<4;u++)T(R[u],N[u],x)}function Z(R,N){const x=i(),u=i(),E=i();k(E,N[2]),c(x,N[0],E),c(u,N[1],E),j(R,u),R[31]^=A(x)<<7}function d(R,N,x){b(R[0],s),b(R[1],a),b(R[2],a),b(R[3],s);for(let u=255;u>=0;--u){const E=x[u/8|0]>>(7&u)&1;X(R,N,E),G(N,R),G(R,R),X(R,N,E)}}function S(R,N){const x=[i(),i(),i(),i()];b(x[0],f),b(x[1],_),b(x[2],a),c(x[3],f,_),d(R,x,N)}function M(R){if(R.length!==r.SEED_LENGTH)throw new Error(`ed25519: seed must be ${r.SEED_LENGTH} bytes`);const N=(0,t.hash)(R);N[0]&=248,N[31]&=127,N[31]|=64;const x=new Uint8Array(32),u=[i(),i(),i(),i()];S(u,N),Z(x,u);const E=new Uint8Array(64);return E.set(R),E.set(x,32),{publicKey:x,secretKey:E}}r.generateKeyPairFromSeed=M,r.generateKeyPair=function D(R){const N=(0,e.randomBytes)(32,R),x=M(N);return(0,n.wipe)(N),x},r.extractPublicKeyFromSecretKey=function C(R){if(R.length!==r.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${r.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(R.subarray(32))};const L=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function z(R,N){let x,u,E,V;for(u=63;u>=32;--u){for(x=0,E=u-32,V=u-12;E>4)*L[E],x=N[E]>>8,N[E]&=255;for(E=0;E<32;E++)N[E]-=x*L[E];for(u=0;u<32;u++)N[u+1]+=N[u]>>8,R[u]=255&N[u]}function H(R){const N=new Float64Array(64);for(let x=0;x<64;x++)N[x]=R[x];for(let x=0;x<64;x++)R[x]=0;z(R,N)}function B(R,N){const x=i(),u=i(),E=i(),V=i(),W=i(),pe=i(),be=i();return b(R[2],a),function g(R,N){for(let x=0;x<16;x++)R[x]=N[2*x]+(N[2*x+1]<<8);R[15]&=32767}(R[1],N),p(E,R[1]),c(V,E,h),w(E,E,R[2]),O(V,R[2],V),p(W,V),p(pe,W),c(be,pe,W),c(x,be,E),c(x,x,V),function K(R,N){const x=i();let u;for(u=0;u<16;u++)x[u]=N[u];for(u=250;u>=0;u--)p(x,x),1!==u&&c(x,x,N);for(u=0;u<16;u++)R[u]=x[u]}(x,x),c(x,x,E),c(x,x,V),c(x,x,V),c(R[0],x,V),p(u,R[0]),c(u,u,V),P(u,E)&&c(R[0],R[0],v),p(u,R[0]),c(u,u,V),P(u,E)?-1:(A(R[0])===N[31]>>7&&w(R[0],s,R[0]),c(R[3],R[0],R[1]),0)}r.sign=function ee(R,N){const x=new Float64Array(64),u=[i(),i(),i(),i()],E=(0,t.hash)(R.subarray(0,32));E[0]&=248,E[31]&=127,E[31]|=64;const V=new Uint8Array(64);V.set(E.subarray(32),32);const W=new t.SHA512;W.update(V.subarray(32)),W.update(N);const pe=W.digest();W.clean(),H(pe),S(u,pe),Z(V,u),W.reset(),W.update(V.subarray(0,32)),W.update(R.subarray(32)),W.update(N);const be=W.digest();H(be);for(let ge=0;ge<32;ge++)x[ge]=pe[ge];for(let ge=0;ge<32;ge++)for(let Se=0;Se<32;Se++)x[ge+Se]+=be[ge]*E[Se];return z(V.subarray(32),x),V},r.verify=function te(R,N,x){const u=new Uint8Array(32),E=[i(),i(),i(),i()],V=[i(),i(),i(),i()];if(x.length!==r.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${r.SIGNATURE_LENGTH} bytes`);if(B(V,R))return!1;const W=new t.SHA512;W.update(x.subarray(0,32)),W.update(R),W.update(N);const pe=W.digest();return H(pe),d(E,V,pe),S(V,x.subarray(32)),G(E,V),Z(u,E),!$(x,u)},r.convertPublicKeyToX25519=function J(R){let N=[i(),i(),i(),i()];if(B(N,R))throw new Error("Ed25519: invalid public key");let x=i(),u=i(),E=N[1];O(x,a,E),w(u,a,E),k(u,u),c(x,x,u);let V=new Uint8Array(32);return j(V,x),V},r.convertSecretKeyToX25519=function ce(R){const N=(0,t.hash)(R.subarray(0,32));N[0]&=248,N[31]&=127,N[31]|=64;const x=new Uint8Array(N.subarray(0,32));return(0,n.wipe)(N),x}}(ni);const as="base64url",xh="did",Fh="key",cs="base58btc";function us(r=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?globalThis.Buffer.allocUnsafe(r):new Uint8Array(r)}function ci(r,e){e||(e=r.reduce((i,o)=>i+o.length,0));const t=us(e);let n=0;for(const i of r)t.set(i,n),n+=i.length;return t}var Ch=function Th(r,e){if(r.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),n=0;n>>0,A=new Uint8Array(P);m[T];){var g=t[m.charCodeAt(T)];if(255===g)return;for(var O=0,w=P-1;(0!==g||O<$)&&-1!==w;w--,O++)A[w]=(g+=a*A[w]>>>0)%256>>>0,g=g/256>>>0;if(0!==g)throw new Error("Non-zero carry");$=O,T++}if(" "!==m[T]){for(var c=P-$;c!==P&&0===A[c];)c++;for(var p=new Uint8Array(j+(P-c)),k=j;c!==P;)p[k++]=A[c++];return p}}}return{encode:function _(m){if(m instanceof Uint8Array||(ArrayBuffer.isView(m)?m=new Uint8Array(m.buffer,m.byteOffset,m.byteLength):Array.isArray(m)&&(m=Uint8Array.from(m))),!(m instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===m.length)return"";for(var T=0,j=0,$=0,P=m.length;$!==P&&0===m[$];)$++,T++;for(var A=(P-$)*f+1>>>0,g=new Uint8Array(A);$!==P;){for(var O=m[$],w=0,c=A-1;(0!==O||w>>0)%a>>>0,O=O/a>>>0;if(0!==O)throw new Error("Non-zero carry");j=w,$++}for(var p=A-j;p!==A&&0===g[p];)p++;for(var k=h.repeat(T);p{if(r instanceof Uint8Array&&"Uint8Array"===r.constructor.name)return r;if(r instanceof ArrayBuffer)return new Uint8Array(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength);throw new Error("Unknown type, must be binary type")};class Mh{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class Dh{constructor(e,t,n){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return hs(this,e)}}class kh{constructor(e){this.decoders=e}or(e){return hs(this,e)}decode(e){const n=this.decoders[e[0]];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const hs=(r,e)=>new kh({...r.decoders||{[r.prefix]:r},...e.decoders||{[e.prefix]:e}});class zh{constructor(e,t,n,i){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=i,this.encoder=new Mh(e,t,n),this.decoder=new Dh(e,t,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const dn=({name:r,prefix:e,encode:t,decode:n})=>new zh(r,e,t,n),Ur=({prefix:r,name:e,alphabet:t})=>{const{encode:n,decode:i}=Ch(t,e);return dn({prefix:r,name:e,encode:n,decode:o=>ls(i(o))})},nt=({name:r,prefix:e,bitsPerChar:t,alphabet:n})=>dn({prefix:e,name:r,encode:i=>((r,e,t)=>{const n="="===e[e.length-1],i=(1<t;)s-=t,o+=e[i&a>>s];if(s&&(o+=e[i&a<((r,e,t,n)=>{const i={};for(let f=0;f=8&&(a-=8,s[l++]=255&h>>a)}if(a>=t||255&h<<8-a)throw new SyntaxError("Unexpected end of data");return s})(i,n,t,r)}),$h=dn({prefix:"\0",name:"identity",encode:r=>(r=>(new TextDecoder).decode(r))(r),decode:r=>(r=>(new TextEncoder).encode(r))(r)});var Bh=Object.freeze({__proto__:null,identity:$h});const Vh=nt({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var qh=Object.freeze({__proto__:null,base2:Vh});const Gh=nt({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var Wh=Object.freeze({__proto__:null,base8:Gh});const Yh=Ur({prefix:"9",name:"base10",alphabet:"0123456789"});var Jh=Object.freeze({__proto__:null,base10:Yh});const Xh=nt({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Zh=nt({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var Qh=Object.freeze({__proto__:null,base16:Xh,base16upper:Zh});const ef=nt({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),tf=nt({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),rf=nt({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),nf=nt({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),of=nt({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),sf=nt({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),af=nt({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),cf=nt({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),uf=nt({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var lf=Object.freeze({__proto__:null,base32:ef,base32upper:tf,base32pad:rf,base32padupper:nf,base32hex:of,base32hexupper:sf,base32hexpad:af,base32hexpadupper:cf,base32z:uf});const hf=Ur({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),ff=Ur({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var pf=Object.freeze({__proto__:null,base36:hf,base36upper:ff});const df=Ur({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),yf=Ur({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var gf=Object.freeze({__proto__:null,base58btc:df,base58flickr:yf});const _f=nt({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),vf=nt({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),mf=nt({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),bf=nt({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var wf=Object.freeze({__proto__:null,base64:_f,base64pad:vf,base64url:mf,base64urlpad:bf});const fs=Array.from("\u{1f680}\u{1fa90}\u2604\u{1f6f0}\u{1f30c}\u{1f311}\u{1f312}\u{1f313}\u{1f314}\u{1f315}\u{1f316}\u{1f317}\u{1f318}\u{1f30d}\u{1f30f}\u{1f30e}\u{1f409}\u2600\u{1f4bb}\u{1f5a5}\u{1f4be}\u{1f4bf}\u{1f602}\u2764\u{1f60d}\u{1f923}\u{1f60a}\u{1f64f}\u{1f495}\u{1f62d}\u{1f618}\u{1f44d}\u{1f605}\u{1f44f}\u{1f601}\u{1f525}\u{1f970}\u{1f494}\u{1f496}\u{1f499}\u{1f622}\u{1f914}\u{1f606}\u{1f644}\u{1f4aa}\u{1f609}\u263a\u{1f44c}\u{1f917}\u{1f49c}\u{1f614}\u{1f60e}\u{1f607}\u{1f339}\u{1f926}\u{1f389}\u{1f49e}\u270c\u2728\u{1f937}\u{1f631}\u{1f60c}\u{1f338}\u{1f64c}\u{1f60b}\u{1f497}\u{1f49a}\u{1f60f}\u{1f49b}\u{1f642}\u{1f493}\u{1f929}\u{1f604}\u{1f600}\u{1f5a4}\u{1f603}\u{1f4af}\u{1f648}\u{1f447}\u{1f3b6}\u{1f612}\u{1f92d}\u2763\u{1f61c}\u{1f48b}\u{1f440}\u{1f62a}\u{1f611}\u{1f4a5}\u{1f64b}\u{1f61e}\u{1f629}\u{1f621}\u{1f92a}\u{1f44a}\u{1f973}\u{1f625}\u{1f924}\u{1f449}\u{1f483}\u{1f633}\u270b\u{1f61a}\u{1f61d}\u{1f634}\u{1f31f}\u{1f62c}\u{1f643}\u{1f340}\u{1f337}\u{1f63b}\u{1f613}\u2b50\u2705\u{1f97a}\u{1f308}\u{1f608}\u{1f918}\u{1f4a6}\u2714\u{1f623}\u{1f3c3}\u{1f490}\u2639\u{1f38a}\u{1f498}\u{1f620}\u261d\u{1f615}\u{1f33a}\u{1f382}\u{1f33b}\u{1f610}\u{1f595}\u{1f49d}\u{1f64a}\u{1f639}\u{1f5e3}\u{1f4ab}\u{1f480}\u{1f451}\u{1f3b5}\u{1f91e}\u{1f61b}\u{1f534}\u{1f624}\u{1f33c}\u{1f62b}\u26bd\u{1f919}\u2615\u{1f3c6}\u{1f92b}\u{1f448}\u{1f62e}\u{1f646}\u{1f37b}\u{1f343}\u{1f436}\u{1f481}\u{1f632}\u{1f33f}\u{1f9e1}\u{1f381}\u26a1\u{1f31e}\u{1f388}\u274c\u270a\u{1f44b}\u{1f630}\u{1f928}\u{1f636}\u{1f91d}\u{1f6b6}\u{1f4b0}\u{1f353}\u{1f4a2}\u{1f91f}\u{1f641}\u{1f6a8}\u{1f4a8}\u{1f92c}\u2708\u{1f380}\u{1f37a}\u{1f913}\u{1f619}\u{1f49f}\u{1f331}\u{1f616}\u{1f476}\u{1f974}\u25b6\u27a1\u2753\u{1f48e}\u{1f4b8}\u2b07\u{1f628}\u{1f31a}\u{1f98b}\u{1f637}\u{1f57a}\u26a0\u{1f645}\u{1f61f}\u{1f635}\u{1f44e}\u{1f932}\u{1f920}\u{1f927}\u{1f4cc}\u{1f535}\u{1f485}\u{1f9d0}\u{1f43e}\u{1f352}\u{1f617}\u{1f911}\u{1f30a}\u{1f92f}\u{1f437}\u260e\u{1f4a7}\u{1f62f}\u{1f486}\u{1f446}\u{1f3a4}\u{1f647}\u{1f351}\u2744\u{1f334}\u{1f4a3}\u{1f438}\u{1f48c}\u{1f4cd}\u{1f940}\u{1f922}\u{1f445}\u{1f4a1}\u{1f4a9}\u{1f450}\u{1f4f8}\u{1f47b}\u{1f910}\u{1f92e}\u{1f3bc}\u{1f975}\u{1f6a9}\u{1f34e}\u{1f34a}\u{1f47c}\u{1f48d}\u{1f4e3}\u{1f942}"),Ef=fs.reduce((r,e,t)=>(r[t]=e,r),[]),Sf=fs.reduce((r,e,t)=>(r[e.codePointAt(0)]=t,r),[]);const Pf=dn({prefix:"\u{1f680}",name:"base256emoji",encode:function Of(r){return r.reduce((e,t)=>e+Ef[t],"")},decode:function If(r){const e=[];for(const t of r){const n=Sf[t.codePointAt(0)];if(void 0===n)throw new Error(`Non-base256emoji character: ${t}`);e.push(n)}return new Uint8Array(e)}});var xf=Object.freeze({__proto__:null,base256emoji:Pf}),Ff=function ds(r,e,t){e=e||[];for(var n=t=t||0;r>=Rf;)e[t++]=255&r|128,r/=128;for(;-128&r;)e[t++]=255&r|128,r>>>=7;return e[t]=0|r,ds.bytes=t-n+1,e},Rf=Math.pow(2,31);var Tf=function ui(r,n){var s,t=0,i=0,o=n=n||0,a=r.length;do{if(o>=a)throw ui.bytes=0,new RangeError("Could not decode varint");s=r[o++],t+=i<28?(127&s)<=128);return ui.bytes=o-n,t};var Cf=Math.pow(2,7),jf=Math.pow(2,14),Uf=Math.pow(2,21),Mf=Math.pow(2,28),Df=Math.pow(2,35),kf=Math.pow(2,42),zf=Math.pow(2,49),Hf=Math.pow(2,56),Kf=Math.pow(2,63),gs={encode:Ff,decode:Tf,encodingLength:function(r){return r(gs.encode(r,e,t),e),vs=r=>gs.encodingLength(r),li=(r,e)=>{const t=e.byteLength,n=vs(r),i=n+vs(t),o=new Uint8Array(i+t);return _s(r,o,0),_s(t,o,n),o.set(e,i),new Vf(r,t,e,o)};class Vf{constructor(e,t,n,i){this.code=e,this.size=t,this.digest=n,this.bytes=i}}const ms=({name:r,code:e,encode:t})=>new qf(r,e,t);class qf{constructor(e,t,n){this.name=e,this.code=t,this.encode=n}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?li(this.code,t):t.then(n=>li(this.code,n))}throw Error("Unknown type, must be binary type")}}const bs=r=>function(){var e=I(function*(t){return new Uint8Array(yield crypto.subtle.digest(r,t))});return function(t){return e.apply(this,arguments)}}(),Gf=ms({name:"sha2-256",code:18,encode:bs("SHA-256")}),Wf=ms({name:"sha2-512",code:19,encode:bs("SHA-512")});Object.freeze({__proto__:null,sha256:Gf,sha512:Wf});const Es=ls;Object.freeze({__proto__:null,identity:{code:0,name:"identity",encode:Es,digest:r=>li(0,Es(r))}}),new TextEncoder,new TextDecoder;const Ss={...Bh,...qh,...Wh,...Jh,...Qh,...lf,...pf,...gf,...wf,...xf};function Os(r,e,t,n){return{name:r,prefix:e,encoder:{name:r,prefix:e,encode:t},decoder:{decode:n}}}const Is=Os("utf8","u",r=>"u"+new TextDecoder("utf8").decode(r),r=>(new TextEncoder).encode(r.substring(1))),hi=Os("ascii","a",r=>{let e="a";for(let t=0;t{const e=us((r=r.substring(1)).length);for(let t=0;t>>16|S<<16)|0)>>>20|c<<12,p=(p^=X=X+(M=(M^=g=g+p|0)>>>16|M<<16)|0)>>>20|p<<12,k=(k^=Z=Z+(D=(D^=O=O+k|0)>>>16|D<<16)|0)>>>20|k<<12,K=(K^=d=d+(C=(C^=w=w+K|0)>>>16|C<<16)|0)>>>20|K<<12,k=(k^=Z=Z+(D=(D^=O=O+k|0)>>>24|D<<8)|0)>>>25|k<<7,K=(K^=d=d+(C=(C^=w=w+K|0)>>>24|C<<8)|0)>>>25|K<<7,p=(p^=X=X+(M=(M^=g=g+p|0)>>>24|M<<8)|0)>>>25|p<<7,c=(c^=G=G+(S=(S^=A=A+c|0)>>>24|S<<8)|0)>>>25|c<<7,p=(p^=Z=Z+(C=(C^=A=A+p|0)>>>16|C<<16)|0)>>>20|p<<12,k=(k^=d=d+(S=(S^=g=g+k|0)>>>16|S<<16)|0)>>>20|k<<12,K=(K^=G=G+(M=(M^=O=O+K|0)>>>16|M<<16)|0)>>>20|K<<12,c=(c^=X=X+(D=(D^=w=w+c|0)>>>16|D<<16)|0)>>>20|c<<12,K=(K^=G=G+(M=(M^=O=O+K|0)>>>24|M<<8)|0)>>>25|K<<7,c=(c^=X=X+(D=(D^=w=w+c|0)>>>24|D<<8)|0)>>>25|c<<7,k=(k^=d=d+(S=(S^=g=g+k|0)>>>24|S<<8)|0)>>>25|k<<7,p=(p^=Z=Z+(C=(C^=A=A+p|0)>>>24|C<<8)|0)>>>25|p<<7;ut.writeUint32LE(A+n|0,r,0),ut.writeUint32LE(g+i|0,r,4),ut.writeUint32LE(O+o|0,r,8),ut.writeUint32LE(w+s|0,r,12),ut.writeUint32LE(c+a|0,r,16),ut.writeUint32LE(p+h|0,r,20),ut.writeUint32LE(k+l|0,r,24),ut.writeUint32LE(K+f|0,r,28),ut.writeUint32LE(G+_|0,r,32),ut.writeUint32LE(X+v|0,r,36),ut.writeUint32LE(Z+b|0,r,40),ut.writeUint32LE(d+m|0,r,44),ut.writeUint32LE(S+T|0,r,48),ut.writeUint32LE(M+j|0,r,52),ut.writeUint32LE(D+$|0,r,56),ut.writeUint32LE(C+P|0,r,60)}function As(r,e,t,n,i){if(void 0===i&&(i=0),32!==r.length)throw new Error("ChaCha: key size must be 32 bytes");if(n.length>>=8,e++;if(n>0)throw new Error("ChaCha: counter overflow")}gn.streamXOR=As,gn.stream=function ip(r,e,t,n){return void 0===n&&(n=0),di.wipe(t),As(r,e,t,t,n)};var Ns={},Vt={};function Rs(r,e){if(r.length!==e.length)return 0;for(var t=0,n=0;n>>8}Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.select=function sp(r,e,t){return~(r-1)&e|r-1&t},Vt.lessOrEqual=function ap(r,e){return(0|r)-(0|e)-1>>>31&1},Vt.compare=Rs,Vt.equal=function cp(r,e){return 0!==r.length&&0!==e.length&&0!==Rs(r,e)},function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=Vt,t=wt;r.DIGEST_LENGTH=16;var n=function(){function s(a){this.digestLength=r.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var h=a[0]|a[1]<<8;this._r[0]=8191&h;var l=a[2]|a[3]<<8;this._r[1]=8191&(h>>>13|l<<3);var f=a[4]|a[5]<<8;this._r[2]=7939&(l>>>10|f<<6);var _=a[6]|a[7]<<8;this._r[3]=8191&(f>>>7|_<<9);var v=a[8]|a[9]<<8;this._r[4]=255&(_>>>4|v<<12),this._r[5]=v>>>1&8190;var b=a[10]|a[11]<<8;this._r[6]=8191&(v>>>14|b<<2);var m=a[12]|a[13]<<8;this._r[7]=8065&(b>>>11|m<<5);var T=a[14]|a[15]<<8;this._r[8]=8191&(m>>>8|T<<8),this._r[9]=T>>>5&127,this._pad[0]=a[16]|a[17]<<8,this._pad[1]=a[18]|a[19]<<8,this._pad[2]=a[20]|a[21]<<8,this._pad[3]=a[22]|a[23]<<8,this._pad[4]=a[24]|a[25]<<8,this._pad[5]=a[26]|a[27]<<8,this._pad[6]=a[28]|a[29]<<8,this._pad[7]=a[30]|a[31]<<8}return s.prototype._blocks=function(a,h,l){for(var f=this._fin?0:2048,_=this._h[0],v=this._h[1],b=this._h[2],m=this._h[3],T=this._h[4],j=this._h[5],$=this._h[6],P=this._h[7],A=this._h[8],g=this._h[9],O=this._r[0],w=this._r[1],c=this._r[2],p=this._r[3],k=this._r[4],K=this._r[5],G=this._r[6],X=this._r[7],Z=this._r[8],d=this._r[9];l>=16;){var S=a[h+0]|a[h+1]<<8,M=a[h+2]|a[h+3]<<8,D=a[h+4]|a[h+5]<<8,C=a[h+6]|a[h+7]<<8,L=a[h+8]|a[h+9]<<8,z=a[h+10]|a[h+11]<<8,H=a[h+12]|a[h+13]<<8,ee=a[h+14]|a[h+15]<<8,B=0,te=B;te+=(_+=8191&S)*O,te+=(v+=8191&(S>>>13|M<<3))*(5*d),te+=(b+=8191&(M>>>10|D<<6))*(5*Z),te+=(m+=8191&(D>>>7|C<<9))*(5*X),B=(te+=(T+=8191&(C>>>4|L<<12))*(5*G))>>>13,te&=8191,te+=(j+=L>>>1&8191)*(5*K),te+=($+=8191&(L>>>14|z<<2))*(5*k),te+=(P+=8191&(z>>>11|H<<5))*(5*p),te+=(A+=8191&(H>>>8|ee<<8))*(5*c);var J=B+=(te+=(g+=ee>>>5|f)*(5*w))>>>13;J+=_*w,J+=v*O,J+=b*(5*d),J+=m*(5*Z),B=(J+=T*(5*X))>>>13,J&=8191,J+=j*(5*G),J+=$*(5*K),J+=P*(5*k),J+=A*(5*p),B+=(J+=g*(5*c))>>>13,J&=8191;var ce=B;ce+=_*c,ce+=v*w,ce+=b*O,ce+=m*(5*d),B=(ce+=T*(5*Z))>>>13,ce&=8191,ce+=j*(5*X),ce+=$*(5*G),ce+=P*(5*K),ce+=A*(5*k);var R=B+=(ce+=g*(5*p))>>>13;R+=_*p,R+=v*c,R+=b*w,R+=m*O,B=(R+=T*(5*d))>>>13,R&=8191,R+=j*(5*Z),R+=$*(5*X),R+=P*(5*G),R+=A*(5*K);var N=B+=(R+=g*(5*k))>>>13;N+=_*k,N+=v*p,N+=b*c,N+=m*w,B=(N+=T*O)>>>13,N&=8191,N+=j*(5*d),N+=$*(5*Z),N+=P*(5*X),N+=A*(5*G);var x=B+=(N+=g*(5*K))>>>13;x+=_*K,x+=v*k,x+=b*p,x+=m*c,B=(x+=T*w)>>>13,x&=8191,x+=j*O,x+=$*(5*d),x+=P*(5*Z),x+=A*(5*X);var u=B+=(x+=g*(5*G))>>>13;u+=_*G,u+=v*K,u+=b*k,u+=m*p,B=(u+=T*c)>>>13,u&=8191,u+=j*w,u+=$*O,u+=P*(5*d),u+=A*(5*Z);var E=B+=(u+=g*(5*X))>>>13;E+=_*X,E+=v*G,E+=b*K,E+=m*k,B=(E+=T*p)>>>13,E&=8191,E+=j*c,E+=$*w,E+=P*O,E+=A*(5*d);var V=B+=(E+=g*(5*Z))>>>13;V+=_*Z,V+=v*X,V+=b*G,V+=m*K,B=(V+=T*k)>>>13,V&=8191,V+=j*p,V+=$*c,V+=P*w,V+=A*O;var W=B+=(V+=g*(5*d))>>>13;W+=_*d,W+=v*Z,W+=b*X,W+=m*G,B=(W+=T*K)>>>13,W&=8191,W+=j*k,W+=$*p,W+=P*c,W+=A*w,_=te=8191&(B=(B=((B+=(W+=g*O)>>>13)<<2)+B|0)+(te&=8191)|0),v=J+=B>>>=13,b=ce&=8191,m=R&=8191,T=N&=8191,j=x&=8191,$=u&=8191,P=E&=8191,A=V&=8191,g=W&=8191,h+=16,l-=16}this._h[0]=_,this._h[1]=v,this._h[2]=b,this._h[3]=m,this._h[4]=T,this._h[5]=j,this._h[6]=$,this._h[7]=P,this._h[8]=A,this._h[9]=g},s.prototype.finish=function(a,h){void 0===h&&(h=0);var f,_,v,b,l=new Uint16Array(10);if(this._leftover){for(b=this._leftover,this._buffer[b++]=1;b<16;b++)this._buffer[b]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(f=this._h[1]>>>13,this._h[1]&=8191,b=2;b<10;b++)this._h[b]+=f,f=this._h[b]>>>13,this._h[b]&=8191;for(this._h[0]+=5*f,f=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=f,f=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=f,l[0]=this._h[0]+5,f=l[0]>>>13,l[0]&=8191,b=1;b<10;b++)l[b]=this._h[b]+f,f=l[b]>>>13,l[b]&=8191;for(l[9]-=8192,_=(1^f)-1,b=0;b<10;b++)l[b]&=_;for(_=~_,b=0;b<10;b++)this._h[b]=this._h[b]&_|l[b];for(this._h[0]=65535&(this._h[0]|this._h[1]<<13),this._h[1]=65535&(this._h[1]>>>3|this._h[2]<<10),this._h[2]=65535&(this._h[2]>>>6|this._h[3]<<7),this._h[3]=65535&(this._h[3]>>>9|this._h[4]<<4),this._h[4]=65535&(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14),this._h[5]=65535&(this._h[6]>>>2|this._h[7]<<11),this._h[6]=65535&(this._h[7]>>>5|this._h[8]<<8),this._h[7]=65535&(this._h[8]>>>8|this._h[9]<<5),this._h[0]=65535&(v=this._h[0]+this._pad[0]),b=1;b<8;b++)this._h[b]=65535&(v=(this._h[b]+this._pad[b]|0)+(v>>>16)|0);return a[h+0]=this._h[0]>>>0,a[h+1]=this._h[0]>>>8,a[h+2]=this._h[1]>>>0,a[h+3]=this._h[1]>>>8,a[h+4]=this._h[2]>>>0,a[h+5]=this._h[2]>>>8,a[h+6]=this._h[3]>>>0,a[h+7]=this._h[3]>>>8,a[h+8]=this._h[4]>>>0,a[h+9]=this._h[4]>>>8,a[h+10]=this._h[5]>>>0,a[h+11]=this._h[5]>>>8,a[h+12]=this._h[6]>>>0,a[h+13]=this._h[6]>>>8,a[h+14]=this._h[7]>>>0,a[h+15]=this._h[7]>>>8,this._finished=!0,this},s.prototype.update=function(a){var f,h=0,l=a.length;if(this._leftover){(f=16-this._leftover)>l&&(f=l);for(var _=0;_=16&&(this._blocks(a,h,f=l-l%16),h+=f,l-=f),l){for(_=0;_16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var b=new Uint8Array(16);b.set(l,b.length-l.length);var m=new Uint8Array(32);e.stream(this._key,b,m,4);var j,T=f.length+this.tagLength;if(v){if(v.length!==T)throw new Error("ChaCha20Poly1305: incorrect destination length");j=v}else j=new Uint8Array(T);return e.streamXOR(this._key,b,f,j,4),this._authenticate(j.subarray(j.length-this.tagLength,j.length),m,j.subarray(0,j.length-this.tagLength),_),n.wipe(b),j},h.prototype.open=function(l,f,_,v){if(l.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(f.length0&&b.update(s.subarray(v.length%16))),b.update(_),_.length%16>0&&b.update(s.subarray(_.length%16));var m=new Uint8Array(8);v&&i.writeUint64LE(v.length,m),b.update(m),i.writeUint64LE(_.length,m),b.update(m);for(var T=b.digest(),j=0;jthis.blockSize?this._inner.update(t).finish(n).clean():n.set(t);for(var i=0;i1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},r.prototype.expand=function(e){for(var t=new Uint8Array(e),n=0;n0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=h[f++],l--;this._bufferLength===this.blockSize&&(o(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(l>=this.blockSize&&(f=o(this._temp,this._state,h,f,l),l%=this.blockSize);l>0;)this._buffer[this._bufferLength++]=h[f++],l--;return this},a.prototype.finish=function(h){if(!this._finished){var l=this._bytesHashed,f=this._bufferLength,_=l/536870912|0,v=l<<3,b=l%64<56?64:128;this._buffer[f]=128;for(var m=f+1;m0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},a.prototype.restoreState=function(h){return this._state.set(h.state),this._bufferLength=h.bufferLength,h.buffer&&this._buffer.set(h.buffer),this._bytesHashed=h.bytesHashed,this._finished=!1,this},a.prototype.cleanSavedState=function(h){t.wipe(h.state),h.buffer&&t.wipe(h.buffer),h.bufferLength=0,h.bytesHashed=0},a}();r.SHA256=n;var i=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function o(a,h,l,f,_){for(;_>=64;){for(var v=h[0],b=h[1],m=h[2],T=h[3],j=h[4],$=h[5],P=h[6],A=h[7],g=0;g<16;g++)a[g]=e.readUint32BE(l,f+4*g);for(g=16;g<64;g++){var w=a[g-2];a[g]=((c=(w>>>17|w<<15)^(w>>>19|w<<13)^w>>>10)+a[g-7]|0)+((p=((w=a[g-15])>>>7|w<<25)^(w>>>18|w<<14)^w>>>3)+a[g-16]|0)}for(g=0;g<64;g++){var c=(((j>>>6|j<<26)^(j>>>11|j<<21)^(j>>>25|j<<7))+(j&$^~j&P)|0)+(A+(i[g]+a[g]|0)|0)|0,p=((v>>>2|v<<30)^(v>>>13|v<<19)^(v>>>22|v<<10))+(v&b^v&m^b&m)|0;A=P,P=$,$=j,j=T+c|0,T=m,m=b,b=v,v=c+p|0}h[0]+=v,h[1]+=b,h[2]+=m,h[3]+=T,h[4]+=j,h[5]+=$,h[6]+=P,h[7]+=A,f+=64,_-=64}return f}r.hash=function s(a){var h=new n;h.update(a);var l=h.digest();return h.clean(),l}}(_n);var gi={};!function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.sharedKey=r.generateKeyPair=r.generateKeyPairFromSeed=r.scalarMultBase=r.scalarMult=r.SHARED_KEY_LENGTH=r.SECRET_KEY_LENGTH=r.PUBLIC_KEY_LENGTH=void 0;const e=vr,t=wt;function n(g){const O=new Float64Array(16);if(g)for(let w=0;w=0;--D){const C=w[D>>>3]>>>(7&D)&1;a(p,k,C),a(K,G,C),f(X,p,K),_(p,p,K),f(K,k,G),_(k,k,G),b(G,X),b(Z,p),v(p,K,p),v(K,k,X),f(X,p,K),_(p,p,K),b(k,p),_(K,G,Z),v(p,K,o),f(p,p,G),v(K,K,p),v(p,G,Z),v(G,k,c),b(k,X),a(p,k,C),a(K,G,C)}for(let D=0;D<16;D++)c[D+16]=p[D],c[D+32]=K[D],c[D+48]=k[D],c[D+64]=G[D];const d=c.subarray(32),S=c.subarray(16);(function m(g,O){const w=n();for(let c=0;c<16;c++)w[c]=O[c];for(let c=253;c>=0;c--)b(w,w),2!==c&&4!==c&&v(w,w,O);for(let c=0;c<16;c++)g[c]=w[c]})(d,d),v(S,S,d);const M=new Uint8Array(32);return function h(g,O){const w=n(),c=n();for(let p=0;p<16;p++)c[p]=O[p];s(c),s(c),s(c);for(let p=0;p<2;p++){w[0]=c[0]-65517;for(let K=1;K<15;K++)w[K]=c[K]-65535-(w[K-1]>>16&1),w[K-1]&=65535;w[15]=c[15]-32767-(w[14]>>16&1);const k=w[15]>>16&1;w[14]&=65535,a(c,w,1-k)}for(let p=0;p<16;p++)g[2*p]=255&c[p],g[2*p+1]=c[p]>>8}(M,S),M}function j(g){return T(g,i)}function $(g){if(g.length!==r.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${r.SECRET_KEY_LENGTH} bytes`);const O=new Uint8Array(g);return{publicKey:j(O),secretKey:O}}r.scalarMult=T,r.scalarMultBase=j,r.generateKeyPairFromSeed=$,r.generateKeyPair=function P(g){const O=(0,e.randomBytes)(32,g),w=$(O);return(0,t.wipe)(O),w},r.sharedKey=function A(g,O,w=!1){if(g.length!==r.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(O.length!==r.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const c=T(g,O);if(w){let p=0;for(let k=0;k"u"&&typeof navigator<"u"&&"ReactNative"===navigator.product?new mp:typeof navigator<"u"?ks(navigator.userAgent):function Pp(){return typeof process<"u"&&process.version?new gp(process.version.slice(1)):null}()}function ks(r){var e=function Op(r){return""!==r&&Ep.reduce(function(e,t){var n=t[0];if(e)return e;var o=t[1].exec(r);return!!o&&[n,o]},!1)}(r);if(!e)return null;var t=e[0],n=e[1];if("searchbot"===t)return new vp;var i=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);i?i.length<3&&(i=Us(Us([],i,!0),function xp(r){for(var e=[],t=0;tb.getAttribute(T)).filter(T=>!!T&&f.includes(T));if(m.length&&m){const T=b.getAttribute("content");if(T)return T}}return""}const s=function i(){let f=n("name","og:site_name","og:title","twitter:title");return f||(f=r.title),f}();return{description:function o(){return n("description","og:description","twitter:description","keywords")}(),url:e.origin,icons:function t(){const f=r.getElementsByTagName("link"),_=[];for(let v=0;v-1){const T=b.getAttribute("href");if(T)if(-1===T.toLowerCase().indexOf("https:")&&-1===T.toLowerCase().indexOf("http:")&&0!==T.indexOf("//")){let j=e.protocol+"//"+e.host;if(0===T.indexOf("/"))j+=T;else{const $=e.pathname.split("/");$.pop(),j+=$.join("/")+"/"+T}_.push(j)}else 0===T.indexOf("//")?_.push(e.protocol+T):_.push(T)}}return _}(),name:s}};var Dr={},kp=r=>encodeURIComponent(r).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),Bs="%[a-f0-9]{2}",Vs=new RegExp("("+Bs+")|([^%]+?)","gi"),qs=new RegExp("("+Bs+")+","gi");function mi(r,e){try{return[decodeURIComponent(r.join(""))]}catch{}if(1===r.length)return r;var t=r.slice(0,e=e||1),n=r.slice(e);return Array.prototype.concat.call([],mi(t),mi(n))}function zp(r){try{return decodeURIComponent(r)}catch{for(var e=r.match(Vs)||[],t=1;t{if("string"!=typeof r||"string"!=typeof e)throw new TypeError("Expected the arguments to be of type `string`");if(""===e)return[r];const t=r.indexOf(e);return-1===t?[r]:[r.slice(0,t),r.slice(t+e.length)]},Bp=function(r,e){for(var t={},n=Object.keys(r),i=Array.isArray(e),o=0;oNumber(A)-Number(g)).map(A=>P[A]):P}function b(P){const A=P.indexOf("#");return-1!==A&&(P=P.slice(0,A)),P}function T(P){const A=(P=b(P)).indexOf("?");return-1===A?"":P.slice(A+1)}function j(P,A){return A.parseNumbers&&!Number.isNaN(Number(P))&&"string"==typeof P&&""!==P.trim()?P=Number(P):A.parseBooleans&&null!==P&&("true"===P.toLowerCase()||"false"===P.toLowerCase())&&(P="true"===P.toLowerCase()),P}function $(P,A){l((A=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},A)).arrayFormatSeparator);const g=function h(P){let A;switch(P.arrayFormat){case"index":return(g,O,w)=>{A=/\[(\d*)\]$/.exec(g),g=g.replace(/\[\d*\]$/,""),A?(void 0===w[g]&&(w[g]={}),w[g][A[1]]=O):w[g]=O};case"bracket":return(g,O,w)=>{A=/(\[\])$/.exec(g),w[g=g.replace(/\[\]$/,"")]=A?void 0!==w[g]?[].concat(w[g],O):[O]:O};case"colon-list-separator":return(g,O,w)=>{A=/(:list)$/.exec(g),w[g=g.replace(/:list$/,"")]=A?void 0!==w[g]?[].concat(w[g],O):[O]:O};case"comma":case"separator":return(g,O,w)=>{const c="string"==typeof O&&O.includes(P.arrayFormatSeparator),p="string"==typeof O&&!c&&_(O,P).includes(P.arrayFormatSeparator);O=p?_(O,P):O;const k=c||p?O.split(P.arrayFormatSeparator).map(K=>_(K,P)):null===O?O:_(O,P);w[g]=k};case"bracket-separator":return(g,O,w)=>{const c=/(\[\])$/.test(g);if(g=g.replace(/\[\]$/,""),!c)return void(w[g]=O&&_(O,P));const p=null===O?[]:O.split(P.arrayFormatSeparator).map(k=>_(k,P));w[g]=void 0!==w[g]?[].concat(w[g],p):p};default:return(g,O,w)=>{w[g]=void 0!==w[g]?[].concat(w[g],O):O}}}(A),O=Object.create(null);if("string"!=typeof P||!(P=P.trim().replace(/^[?#&]/,"")))return O;for(const w of P.split("&")){if(""===w)continue;let[c,p]=n(A.decode?w.replace(/\+/g," "):w,"=");p=void 0===p?null:["comma","separator","bracket-separator"].includes(A.arrayFormat)?p:_(p,A),g(_(c,A),p,O)}for(const w of Object.keys(O)){const c=O[w];if("object"==typeof c&&null!==c)for(const p of Object.keys(c))c[p]=j(c[p],A);else O[w]=j(c,A)}return!1===A.sort?O:(!0===A.sort?Object.keys(O).sort():Object.keys(O).sort(A.sort)).reduce((w,c)=>{const p=O[c];return w[c]=Boolean(p)&&"object"==typeof p&&!Array.isArray(p)?v(p):p,w},Object.create(null))}r.extract=T,r.parse=$,r.stringify=(P,A)=>{if(!P)return"";l((A=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},A)).arrayFormatSeparator);const g=p=>A.skipNull&&(P=>null==P)(P[p])||A.skipEmptyString&&""===P[p],O=function a(P){switch(P.arrayFormat){case"index":return A=>(g,O)=>{const w=g.length;return void 0===O||P.skipNull&&null===O||P.skipEmptyString&&""===O?g:null===O?[...g,[f(A,P),"[",w,"]"].join("")]:[...g,[f(A,P),"[",f(w,P),"]=",f(O,P)].join("")]};case"bracket":return A=>(g,O)=>void 0===O||P.skipNull&&null===O||P.skipEmptyString&&""===O?g:null===O?[...g,[f(A,P),"[]"].join("")]:[...g,[f(A,P),"[]=",f(O,P)].join("")];case"colon-list-separator":return A=>(g,O)=>void 0===O||P.skipNull&&null===O||P.skipEmptyString&&""===O?g:null===O?[...g,[f(A,P),":list="].join("")]:[...g,[f(A,P),":list=",f(O,P)].join("")];case"comma":case"separator":case"bracket-separator":{const A="bracket-separator"===P.arrayFormat?"[]=":"=";return g=>(O,w)=>void 0===w||P.skipNull&&null===w||P.skipEmptyString&&""===w?O:(w=null===w?"":w,0===O.length?[[f(g,P),A,f(w,P)].join("")]:[[O,f(w,P)].join(P.arrayFormatSeparator)])}default:return A=>(g,O)=>void 0===O||P.skipNull&&null===O||P.skipEmptyString&&""===O?g:null===O?[...g,f(A,P)]:[...g,[f(A,P),"=",f(O,P)].join("")]}}(A),w={};for(const p of Object.keys(P))g(p)||(w[p]=P[p]);const c=Object.keys(w);return!1!==A.sort&&c.sort(A.sort),c.map(p=>{const k=P[p];return void 0===k?"":null===k?f(p,A):Array.isArray(k)?0===k.length&&"bracket-separator"===A.arrayFormat?f(p,A)+"[]":k.reduce(O(p),[]).join("&"):f(p,A)+"="+f(k,A)}).filter(p=>p.length>0).join("&")},r.parseUrl=(P,A)=>{A=Object.assign({decode:!0},A);const[g,O]=n(P,"#");return Object.assign({url:g.split("?")[0]||"",query:$(T(P),A)},A&&A.parseFragmentIdentifier&&O?{fragmentIdentifier:_(O,A)}:{})},r.stringifyUrl=(P,A)=>{A=Object.assign({encode:!0,strict:!0,[s]:!0},A);const g=b(P.url).split("?")[0]||"",O=r.extract(P.url),w=r.parse(O,{sort:!1}),c=Object.assign(w,P.query);let p=r.stringify(c,A);p&&(p=`?${p}`);let k=function m(P){let A="";const g=P.indexOf("#");return-1!==g&&(A=P.slice(g)),A}(P.url);return P.fragmentIdentifier&&(k=`#${A[s]?f(P.fragmentIdentifier,A):P.fragmentIdentifier}`),`${g}${p}${k}`},r.pick=(P,A,g)=>{g=Object.assign({parseFragmentIdentifier:!0,[s]:!1},g);const{url:O,query:w,fragmentIdentifier:c}=r.parseUrl(P,g);return r.stringifyUrl({url:O,query:i(w,A),fragmentIdentifier:c},g)},r.exclude=(P,A,g)=>{const O=Array.isArray(A)?w=>!A.includes(w):(w,c)=>!A(w,c);return r.pick(P,O,g)}}(Dr);const Vp={waku:{publish:"waku_publish",subscribe:"waku_subscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe"},irn:{publish:"irn_publish",subscribe:"irn_subscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe"},iridium:{publish:"iridium_publish",subscribe:"iridium_subscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe"}};function bi(r,e){return r.includes(":")?[r]:e.chains||[]}const mt="base16",wi="base64pad",Ei="utf8";function Ii(){return _t(vr.randomBytes(32),mt)}function vn(r){return _t(_n.hash(vt(r,Ei)),mt)}function kr(r){return Number(_t(r,"base10"))}function Xp(r){const e=function Jp(r){return vt(`${r}`,"base10")}(typeof r.type<"u"?r.type:0);if(1===kr(e)&&typeof r.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const t=typeof r.senderPublicKey<"u"?vt(r.senderPublicKey,mt):void 0,n=typeof r.iv<"u"?vt(r.iv,mt):vr.randomBytes(12);return function Qp(r){if(1===kr(r.type)){if(typeof r.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return _t(ci([r.type,r.senderPublicKey,r.iv,r.sealed]),wi)}return _t(ci([r.type,r.iv,r.sealed]),wi)}({type:e,sealed:new pi.ChaCha20Poly1305(vt(r.symKey,mt)).seal(n,vt(r.message,Ei)),iv:n,senderPublicKey:t})}function Pi(r){const e=vt(r,wi),t=e.slice(0,1);if(1===kr(t)){const a=33,h=a+12,l=e.slice(1,a),f=e.slice(a,h);return{type:t,sealed:e.slice(h),iv:f,senderPublicKey:l}}const o=e.slice(1,13);return{type:t,sealed:e.slice(13),iv:o}}function Js(r){const e=r?.type||0;if(1===e){if(typeof r?.senderPublicKey>"u")throw new Error("missing sender public key");if(typeof r?.receiverPublicKey>"u")throw new Error("missing receiver public key")}return{type:e,senderPublicKey:r?.senderPublicKey,receiverPublicKey:r?.receiverPublicKey}}function Xs(r){return 1===r.type&&"string"==typeof r.senderPublicKey&&"string"==typeof r.receiverPublicKey}var td=Object.defineProperty,Zs=Object.getOwnPropertySymbols,rd=Object.prototype.hasOwnProperty,nd=Object.prototype.propertyIsEnumerable,Qs=(r,e,t)=>e in r?td(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,ea=(r,e)=>{for(var t in e||(e={}))rd.call(e,t)&&Qs(r,t,e[t]);if(Zs)for(var t of Zs(e))nd.call(e,t)&&Qs(r,t,e[t]);return r};const zr_reactNative="react-native",zr_node="node",zr_browser="browser",zr_unknown="unknown",od="js";function ta(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function cd(){return function sd(){return!zs()&&!!_i()&&"ReactNative"===navigator.product}()?zr_reactNative:ta()?zr_node:function ad(){return!ta()&&!!_i()}()?zr_browser:zr_unknown}function pd(r,e,t){const n=function hd(){const r=Sp();if(null===r)return"unknown";const e=r.os?r.os.replace(" ","").toLowerCase():"unknown";return"browser"===r.type?[e,r.name,r.version].join("-"):[e,r.version].join("-")}(),i=function fd(){var r;const e=cd();return e===zr_browser?[e,(null==(r=Hs())?void 0:r.host)||"unknown"].join(":"):e}();return[[r,e].join("-"),[od,t].join("-"),n,i].join("/")}function dd({protocol:r,version:e,relayUrl:t,sdkVersion:n,auth:i,projectId:o}){const s=t.split("?"),a=pd(r,e,n),l=function ud(r,e){let t=Dr.parse(r);return t=ea(ea({},t),e),Dr.stringify(t)}(s[1]||"",{auth:i,ua:a,projectId:o});return s[0]+"?"+l}function qt(r,e){return r.filter(t=>e.includes(t)).length===r.length}function ra(r){return Object.fromEntries(r.entries())}function na(r){return new Map(Object.entries(r))}function sr(r){const e=Q.toMiliseconds(r||Q.FIVE_MINUTES);let t,n,i;return{resolve:o=>{i&&t&&(clearTimeout(i),t(o))},reject:o=>{i&&n&&(clearTimeout(i),n(o))},done:()=>new Promise((o,s)=>{i=setTimeout(s,e),t=o,n=s})}}function ia(r,e){return new Promise(function(){var t=I(function*(n,i){const o=setTimeout(()=>i(),e),s=yield r;clearTimeout(o),n(s)});return function(n,i){return t.apply(this,arguments)}}())}function oa(r,e){if("string"==typeof e&&e.startsWith(`${r}:`))return e;if("topic"===r.toLowerCase()){if("string"!=typeof e)throw new Error('Value must be "string" for expirer target type: topic');return`topic:${e}`}if("id"===r.toLowerCase()){if("number"!=typeof e)throw new Error('Value must be "number" for expirer target type: id');return`id:${e}`}throw new Error(`Unknown expirer target type: ${r}`)}function sa(r){const[e,t]=r.split(":"),n={id:void 0,topic:void 0};if("topic"===e&&"string"==typeof t)n.topic=t;else{if("id"!==e||!Number.isInteger(Number(t)))throw new Error(`Invalid target, expected id:number or topic:string, got ${e}:${t}`);n.id=Number(t)}return n}function Ct(r,e){return Q.fromMiliseconds((e||Date.now())+Q.toMiliseconds(r))}function Gt(r){return Date.now()>=Q.toMiliseconds(r)}function ke(r,e){return`${r}${e?`:${e}`:""}`}function xi(r){return r?.relay||{protocol:"irn"}}function Fi(r){const e=Vp[r];if(typeof e>"u")throw new Error(`Relay Protocol not supported: ${r}`);return e}var vd=Object.defineProperty,aa=Object.getOwnPropertySymbols,md=Object.prototype.hasOwnProperty,bd=Object.prototype.propertyIsEnumerable,ca=(r,e,t)=>e in r?vd(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;function Ed(r,e="-"){const t={},n="relay"+e;return Object.keys(r).forEach(i=>{if(i.startsWith(n)){const o=i.replace(n,"");t[o]=r[i]}}),t}function Id(r){return`${r.protocol}:${r.topic}@${r.version}?`+Dr.stringify(((r,e)=>{for(var t in e||(e={}))md.call(e,t)&&ca(r,t,e[t]);if(aa)for(var t of aa(e))bd.call(e,t)&&ca(r,t,e[t]);return r})({symKey:r.symKey},function Od(r,e="-"){const n={};return Object.keys(r).forEach(i=>{r[i]&&(n["relay"+e+i]=r[i])}),n}(r.relay)))}function Hr(r){const e=[];return r.forEach(t=>{const[n,i]=t.split(":");e.push(`${n}:${i}`)}),e}const Nd={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},Rd={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function q(r,e){const{message:t,code:n}=Rd[r];return{message:e?`${t} ${e}`:t,code:n}}function He(r,e){const{message:t,code:n}=Nd[r];return{message:e?`${t} ${e}`:t,code:n}}function Kr(r,e){return!!Array.isArray(r)&&(!(typeof e<"u"&&r.length)||r.every(e))}function $r(r){return Object.getPrototypeOf(r)===Object.prototype&&Object.keys(r).length}function ft(r){return typeof r>"u"}function We(r,e){return!(!e||!ft(r))||"string"==typeof r&&Boolean(r.trim().length)}function Ai(r,e){return!(!e||!ft(r))||"number"==typeof r&&!isNaN(r)}function Ni(r){return!(!We(r,!1)||!r.includes(":"))&&2===r.split(":").length}function ua(r){let e=!0;return Kr(r)?r.length&&(e=r.every(t=>We(t,!1))):e=!1,e}function kd(r,e){let t=null;return Object.entries(r).forEach(([n,i])=>{if(t)return;const o=function Dd(r,e,t){let n=null;return Kr(e)?e.forEach(i=>{n||(!Ni(i)||!i.includes(r))&&(n=He("UNSUPPORTED_CHAINS",`${t}, chain ${i} should be a string and conform to "namespace:chainId" format`))}):n=He("UNSUPPORTED_CHAINS",`${t}, chains ${e} should be an array of strings conforming to "namespace:chainId" format`),n}(n,bi(n,i),`${e} requiredNamespace`);o&&(t=o)}),t}function zd(r,e){let t=null;return Kr(r)?r.forEach(n=>{t||function Ld(r){if(We(r,!1)&&r.includes(":")){const e=r.split(":");if(3===e.length){const t=e[0]+":"+e[1];return!!e[2]&&Ni(t)}}return!1}(n)||(t=He("UNSUPPORTED_ACCOUNTS",`${e}, account ${n} should be a string and conform to "namespace:chainId:address" format`))}):t=He("UNSUPPORTED_ACCOUNTS",`${e}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),t}function la(r,e){let t=null;return Object.values(r).forEach(n=>{if(t)return;const i=function Kd(r,e){let t=null;return ua(r?.methods)?ua(r?.events)||(t=He("UNSUPPORTED_EVENTS",`${e}, events should be an array of strings or empty array for no events`)):t=He("UNSUPPORTED_METHODS",`${e}, methods should be an array of strings or empty array for no methods`),t}(n,`${e}, namespace`);i&&(t=i)}),t}function mn(r,e){let t=null;if(r&&$r(r)){const n=la(r,e);n&&(t=n);const i=function Hd(r,e){let t=null;return Object.values(r).forEach(n=>{if(t)return;const i=zd(n?.accounts,`${e} namespace`);i&&(t=i)}),t}(r,e);i&&(t=i)}else t=q("MISSING_OR_INVALID",`${e}, namespaces should be an object with data`);return t}function ha(r){return We(r.protocol,!0)}function bt(r){return typeof r<"u"&&null!==typeof r}function fa(r,e){return!(!Ni(e)||!function Pd(r){const e=[];return Object.values(r).forEach(t=>{e.push(...Hr(t.accounts))}),e}(r).includes(e))}function Jd(r,e,t){return!!We(t,!1)&&function xd(r,e){const t=[];return Object.values(r).forEach(n=>{Hr(n.accounts).includes(e)&&t.push(...n.methods)}),t}(r,e).includes(t)}function Xd(r,e,t){return!!We(t,!1)&&function Fd(r,e){const t=[];return Object.values(r).forEach(n=>{Hr(n.accounts).includes(e)&&t.push(...n.events)}),t}(r,e).includes(t)}function Ri(r,e,t,n){let i=null;const o=Object.keys(r);return qt(o,Object.keys(e))?o.forEach(a=>{if(i)return;const h=Hr(e[a].accounts);qt(bi(a,r[a]),h)?qt(r[a].methods,e[a].methods)?qt(r[a].events,e[a].events)||(i=q("NON_CONFORMING_NAMESPACES",`${t} namespaces events don't satisfy namespace events for ${a}`)):i=q("NON_CONFORMING_NAMESPACES",`${t} namespaces methods don't satisfy namespace methods for ${a}`):i=q("NON_CONFORMING_NAMESPACES",`${t} namespaces accounts don't satisfy namespace chains for ${a}`)}):i=q("NON_CONFORMING_NAMESPACES",`${t} namespaces keys don't satisfy ${n}`),i}const pa="INTERNAL_ERROR",Ti="SERVER_ERROR",ny=[-32700,-32600,-32601,-32602,-32603],Br={PARSE_ERROR:{code:-32700,message:"Parse error"},INVALID_REQUEST:{code:-32600,message:"Invalid Request"},METHOD_NOT_FOUND:{code:-32601,message:"Method not found"},INVALID_PARAMS:{code:-32602,message:"Invalid params"},[pa]:{code:-32603,message:"Internal error"},[Ti]:{code:-32e3,message:"Server error"}},da=Ti;function ya(r){return Object.keys(Br).includes(r)?Br[r]:Br[da]}function ga(r,e,t){return r.message.includes("getaddrinfo ENOTFOUND")||r.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${t} RPC url at ${e}`):r}var _a={},Li=function(r,e){return(Li=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)n.hasOwnProperty(i)&&(t[i]=n[i])})(r,e)};var Ci=function(){return Ci=Object.assign||function(r){for(var e,t=1,n=arguments.length;t=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function va(r,e){var t="function"==typeof Symbol&&r[Symbol.iterator];if(!t)return r;var i,s,n=t.call(r),o=[];try{for(;(void 0===e||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(s)throw s.error}}return o}function Vr(r){return this instanceof Vr?(this.v=r,this):new Vr(r)}var ma,Py=Dt(Object.freeze({__proto__:null,__extends:function sy(r,e){function t(){this.constructor=r}Li(r,e),r.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)},get __assign(){return Ci},__rest:function ay(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(r);i=0;a--)(s=r[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},__param:function uy(r,e){return function(t,n){e(t,n,r)}},__metadata:function ly(r,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(r,e)},__awaiter:function hy(r,e,t,n){return new(t||(t=Promise))(function(o,s){function a(f){try{l(n.next(f))}catch(_){s(_)}}function h(f){try{l(n.throw(f))}catch(_){s(_)}}function l(f){f.done?o(f.value):function i(o){return o instanceof t?o:new t(function(s){s(o)})}(f.value).then(a,h)}l((n=n.apply(r,e||[])).next())})},__generator:function fy(r,e){var n,i,o,s,t={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(f){return function h(l){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,i&&(o=2&l[0]?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return t.label++,{value:l[1],done:!1};case 5:t.label++,i=l[1],l=[0];continue;case 7:l=t.ops.pop(),t.trys.pop();continue;default:if(!(o=(o=t.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){t=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]1||a(v,b)})})}function a(v,b){try{!function h(v){v.value instanceof Vr?Promise.resolve(v.value.v).then(l,f):_(o[0][2],v)}(n[v](b))}catch(m){_(o[0][3],m)}}function l(v){a("next",v)}function f(v){a("throw",v)}function _(v,b){v(b),o.shift(),o.length&&a(o[0][0],o[0][1])}},__asyncDelegator:function vy(r){var e,t;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,o){e[i]=r[i]?function(s){return(t=!t)?{value:Vr(r[i](s)),done:"return"===i}:o?o(s):s}:o}},__asyncValues:function my(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,e=r[Symbol.asyncIterator];return e?e.call(r):(r=ji(r),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(o){t[o]=r[o]&&function(s){return new Promise(function(a,h){!function i(o,s,a,h){Promise.resolve(h).then(function(l){o({value:l,done:a})},s)}(a,h,(s=r[o](s)).done,s.value)})}}},__makeTemplateObject:function by(r,e){return Object.defineProperty?Object.defineProperty(r,"raw",{value:e}):r.raw=e,r},__importStar:function wy(r){if(r&&r.__esModule)return r;var e={};if(null!=r)for(var t in r)Object.hasOwnProperty.call(r,t)&&(e[t]=r[t]);return e.default=r,e},__importDefault:function Ey(r){return r&&r.__esModule?r:{default:r}},__classPrivateFieldGet:function Sy(r,e){if(!e.has(r))throw new TypeError("attempted to get private field on non-instance");return e.get(r)},__classPrivateFieldSet:function Oy(r,e,t){if(!e.has(r))throw new TypeError("attempted to set private field on non-instance");return e.set(r,t),t}})),kt={};var ba,zt={};function bn(r,e,t){return{id:t||Date.now()*Math.pow(10,3)+Math.floor(Math.random()*Math.pow(10,3)),jsonrpc:"2.0",method:r,params:e}}function Ui(r,e){return{id:r,jsonrpc:"2.0",result:e}}function wn(r,e,t){return{id:r,jsonrpc:"2.0",error:Ny(e,t)}}function Ny(r,e){return typeof r>"u"?ya(pa):("string"==typeof r&&(r=Object.assign(Object.assign({},ya(Ti)),{message:r})),typeof e<"u"&&(r.data=e),function iy(r){return ny.includes(r)}(r.code)&&(r=function oy(r){return Object.values(Br).find(t=>t.code===r)||Br[da]}(r.code)),r)}!function(r){Object.defineProperty(r,"__esModule",{value:!0});const e=Py;e.__exportStar(function xy(){if(ma)return kt;function r(){return dt?.crypto||dt?.msCrypto||{}}function e(){const n=r();return n.subtle||n.webkitSubtle}return ma=1,Object.defineProperty(kt,"__esModule",{value:!0}),kt.isBrowserCryptoAvailable=kt.getSubtleCrypto=kt.getBrowerCrypto=void 0,kt.getBrowerCrypto=r,kt.getSubtleCrypto=e,kt.isBrowserCryptoAvailable=function t(){return!!r()&&!!e()},kt}(),r),e.__exportStar(function Fy(){if(ba)return zt;function r(){return typeof document>"u"&&typeof navigator<"u"&&"ReactNative"===navigator.product}function e(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}return ba=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.isBrowser=zt.isNode=zt.isReactNative=void 0,zt.isReactNative=r,zt.isNode=e,zt.isBrowser=function t(){return!r()&&!e()},zt}(),r)}(_a);function wa(r,e){const t=function Uy(r){const e=r.match(new RegExp(/^\w+:/,"gi"));if(e&&e.length)return e[0]}(r);return!(typeof t>"u")&&new RegExp(e).test(t)}function Ea(r){return wa(r,"^https?:")}function Sa(r){return wa(r,"^wss?:")}function My(r){return new RegExp("wss?://localhost(:d{2,5})?").test(r)}function Oa(r){return"object"==typeof r&&"id"in r&&"jsonrpc"in r&&"2.0"===r.jsonrpc}function Mi(r){return Oa(r)&&"method"in r}function Di(r){return Oa(r)&&(Ht(r)||At(r))}function Ht(r){return"result"in r}function At(r){return"error"in r}class qr extends class Ly extends class Ty extends class Ry{}{constructor(){super()}}{constructor(e){super()}}{constructor(e){super(e),this.events=new ct.exports.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}connect(e=this.connection){var t=this;return I(function*(){yield t.open(e)})()}disconnect(){var e=this;return I(function*(){yield e.close()})()}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}request(e,t){var n=this;return I(function*(){return n.requestStrict(bn(e.method,e.params||[]),t)})()}requestStrict(e,t){var n=this;return I(function*(){return new Promise(function(){var i=I(function*(o,s){if(!n.connection.connected)try{yield n.open()}catch(a){s(a)}n.events.on(`${e.id}`,a=>{At(a)?s(a.error):o(a.result)});try{yield n.connection.send(e,t)}catch(a){s(a)}});return function(o,s){return i.apply(this,arguments)}}())})()}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),Di(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}open(e=this.connection){var t=this;return I(function*(){t.connection===e&&t.connection.connected||(t.connection.connected&&t.close(),"string"==typeof e&&(yield t.connection.open(e),e=t.connection),t.connection=t.setConnection(e),yield t.connection.open(),t.registerEventListeners(),t.events.emit("connect"))})()}close(){var e=this;return I(function*(){yield e.connection.close()})()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",e=>this.onPayload(e)),this.connection.on("close",()=>this.events.emit("disconnect")),this.connection.on("error",e=>this.events.emit("error",e)),this.hasRegisteredEventListeners=!0)}}const zy=typeof global<"u"&&typeof global.WebSocket<"u"?global.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:er(4813);class Hy{constructor(e){if(this.url=e,this.events=new ct.exports.EventEmitter,this.registering=!1,!Sa(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);this.url=e}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}open(e=this.url){var t=this;return I(function*(){yield t.register(e)})()}close(){var e=this;return I(function*(){return new Promise((t,n)=>{typeof e.socket>"u"?n(new Error("Connection already closed")):(e.socket.onclose=()=>{e.onClose(),t()},e.socket.close())})})()}send(e,t){var n=this;return I(function*(){typeof n.socket>"u"&&(n.socket=yield n.register());try{n.socket.send(jr(e))}catch(i){n.onError(e.id,i)}})()}register(e=this.url){if(!Sa(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){const t=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=t||this.events.listenerCount("open")>=t)&&this.events.setMaxListeners(t+1),new Promise((n,i)=>{this.events.once("register_error",o=>{this.resetMaxListeners(),i(o)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return i(new Error("WebSocket connection is missing or invalid"));n(this.socket)})})}return this.url=e,this.registering=!0,new Promise((t,n)=>{const i=_a.isReactNative()?void 0:{rejectUnauthorized:!My(e)},o=new zy(e,[],i);typeof window<"u"?o.onerror=s=>{n(this.emitError(s.error))}:o.on("error",s=>{n(this.emitError(s))}),o.onopen=()=>{this.onOpen(o),t(o)}})}onOpen(e){e.onmessage=t=>this.onPayload(t),e.onclose=()=>this.onClose(),this.socket=e,this.registering=!1,this.events.emit("open")}onClose(){this.socket=void 0,this.registering=!1,this.events.emit("close")}onPayload(e){if(typeof e.data>"u")return;const t="string"==typeof e.data?ri(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const n=this.parseError(t),o=wn(e,n.message||n.toString());this.events.emit("payload",o)}parseError(e,t=this.url){return ga(e,t,"WS")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}emitError(e){const t=this.parseError(new Error(e?.message||`WebSocket connection failed for URL: ${this.url}`));return this.events.emit("register_error",t),t}}var ki={exports:{}};!function(r,e){var n="__lodash_hash_undefined__",s=9007199254740991,a="[object Arguments]",h="[object Array]",f="[object Boolean]",_="[object Date]",v="[object Error]",b="[object Function]",T="[object Map]",j="[object Number]",P="[object Object]",A="[object Promise]",O="[object RegExp]",w="[object Set]",c="[object String]",p="[object Symbol]",K="[object WeakMap]",G="[object ArrayBuffer]",X="[object DataView]",B=/^\[object .+?Constructor\]$/,te=/^(?:0|[1-9]\d*)$/,J={};J["[object Float32Array]"]=J["[object Float64Array]"]=J["[object Int8Array]"]=J["[object Int16Array]"]=J["[object Int32Array]"]=J["[object Uint8Array]"]=J["[object Uint8ClampedArray]"]=J["[object Uint16Array]"]=J["[object Uint32Array]"]=!0,J[a]=J[h]=J[G]=J[f]=J[X]=J[_]=J[v]=J[b]=J[T]=J[j]=J[P]=J[O]=J[w]=J[c]=J[K]=!1;var ce="object"==typeof dt&&dt&&dt.Object===Object&&dt,R="object"==typeof self&&self&&self.Object===Object&&self,N=ce||R||Function("return this")(),x=e&&!e.nodeType&&e,u=x&&r&&!r.nodeType&&r,E=u&&u.exports===x,V=E&&ce.process,W=function(){try{return V&&V.binding&&V.binding("util")}catch{}}(),pe=W&&W.isTypedArray;function Se(y,F){for(var U=-1,Y=null==y?0:y.length;++Urt))return!1;var Le=se.get(y);if(Le&&se.get(F))return Le==F;var St=-1,Rt=!0,lt=2&U?new Tn:void 0;for(se.set(y,F),se.set(F,y);++St-1},Kt.prototype.set=function W_(y,F){var U=this.__data__,Y=Ln(U,y);return Y<0?(++this.size,U.push([y,F])):U[Y][1]=F,this},cr.prototype.clear=function Y_(){this.size=0,this.__data__={hash:new Te,map:new(je||Kt),string:new Te}},cr.prototype.delete=function J_(y){var F=Cn(this,y).delete(y);return this.size-=F?1:0,F},cr.prototype.get=function X_(y){return Cn(this,y).get(y)},cr.prototype.has=function Z_(y){return Cn(this,y).has(y)},cr.prototype.set=function Q_(y,F){var U=Cn(this,y),Y=U.size;return U.set(y,F),this.size+=U.size==Y?0:1,this},Tn.prototype.add=Tn.prototype.push=function e0(y){return this.__data__.set(y,n),this},Tn.prototype.has=function t0(y){return this.__data__.has(y)},Xt.prototype.clear=function r0(){this.__data__=new Kt,this.size=0},Xt.prototype.delete=function n0(y){var F=this.__data__,U=F.delete(y);return this.size=F.size,U},Xt.prototype.get=function i0(y){return this.__data__.get(y)},Xt.prototype.has=function o0(y){return this.__data__.has(y)},Xt.prototype.set=function s0(y,F){var U=this.__data__;if(U instanceof Kt){var Y=U.__data__;if(!je||Y.length<199)return Y.push([y,F]),this.size=++U.size,this;U=this.__data__=new cr(Y)}return U.set(y,F),this.size=U.size,this};var g0=ar?function(y){return null==y?[]:(y=Object(y),function be(y,F){for(var U=-1,Y=null==y?0:y.length,Re=0,se=[];++U-1&&y%1==0&&y-1&&y%1==0&&y<=s}function Oc(y){var F=typeof y;return null!=y&&("object"==F||"function"==F)}function Qr(y){return null!=y&&"object"==typeof y}var Ic=pe?function Ce(y){return function(F){return y(F)}}(pe):function h0(y){return Qr(y)&&Sc(y.length)&&!!J[Zr(y)]};function I0(y){return function S0(y){return null!=y&&Sc(y.length)&&!Ec(y)}(y)?a0(y):f0(y)}r.exports=function O0(y,F){return vc(y,F)}}(ki,ki.exports);var Ky=ki.exports,$y=Object.defineProperty,Pa=Object.getOwnPropertySymbols,By=Object.prototype.hasOwnProperty,Vy=Object.prototype.propertyIsEnumerable,xa=(r,e,t)=>e in r?$y(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,pt=(r,e)=>{for(var t in e||(e={}))By.call(e,t)&&xa(r,t,e[t]);if(Pa)for(var t of Pa(e))Vy.call(e,t)&&xa(r,t,e[t]);return r};var Wy=function qy(r,e){if(r.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),n=0;n>>0,A=new Uint8Array(P);m[T];){var g=t[m.charCodeAt(T)];if(255===g)return;for(var O=0,w=P-1;(0!==g||O<$)&&-1!==w;w--,O++)A[w]=(g+=a*A[w]>>>0)%256>>>0,g=g/256>>>0;if(0!==g)throw new Error("Non-zero carry");$=O,T++}if(" "!==m[T]){for(var c=P-$;c!==P&&0===A[c];)c++;for(var p=new Uint8Array(j+(P-c)),k=j;c!==P;)p[k++]=A[c++];return p}}}return{encode:function _(m){if(m instanceof Uint8Array||(ArrayBuffer.isView(m)?m=new Uint8Array(m.buffer,m.byteOffset,m.byteLength):Array.isArray(m)&&(m=Uint8Array.from(m))),!(m instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===m.length)return"";for(var T=0,j=0,$=0,P=m.length;$!==P&&0===m[$];)$++,T++;for(var A=(P-$)*f+1>>>0,g=new Uint8Array(A);$!==P;){for(var O=m[$],w=0,c=A-1;(0!==O||w>>0)%a>>>0,O=O/a>>>0;if(0!==O)throw new Error("Non-zero carry");j=w,$++}for(var p=A-j;p!==A&&0===g[p];)p++;for(var k=h.repeat(T);p{if(r instanceof Uint8Array&&"Uint8Array"===r.constructor.name)return r;if(r instanceof ArrayBuffer)return new Uint8Array(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength);throw new Error("Unknown type, must be binary type")};class Xy{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class Zy{constructor(e,t,n){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return Aa(this,e)}}class Qy{constructor(e){this.decoders=e}or(e){return Aa(this,e)}decode(e){const n=this.decoders[e[0]];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const Aa=(r,e)=>new Qy(pt(pt({},r.decoders||{[r.prefix]:r}),e.decoders||{[e.prefix]:e}));class eg{constructor(e,t,n,i){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=i,this.encoder=new Xy(e,t,n),this.decoder=new Zy(e,t,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const En=({name:r,prefix:e,encode:t,decode:n})=>new eg(r,e,t,n),Gr=({prefix:r,name:e,alphabet:t})=>{const{encode:n,decode:i}=Wy(t,e);return En({prefix:r,name:e,encode:n,decode:o=>Fa(i(o))})},it=({name:r,prefix:e,bitsPerChar:t,alphabet:n})=>En({prefix:e,name:r,encode:i=>((r,e,t)=>{const n="="===e[e.length-1],i=(1<t;)s-=t,o+=e[i&a>>s];if(s&&(o+=e[i&a<((r,e,t,n)=>{const i={};for(let f=0;f=8&&(a-=8,s[l++]=255&h>>a)}if(a>=t||255&h<<8-a)throw new SyntaxError("Unexpected end of data");return s})(i,n,t,r)}),ng=En({prefix:"\0",name:"identity",encode:r=>(r=>(new TextDecoder).decode(r))(r),decode:r=>(r=>(new TextEncoder).encode(r))(r)});var ig=Object.freeze({__proto__:null,identity:ng});const og=it({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var sg=Object.freeze({__proto__:null,base2:og});const ag=it({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var cg=Object.freeze({__proto__:null,base8:ag});const ug=Gr({prefix:"9",name:"base10",alphabet:"0123456789"});var lg=Object.freeze({__proto__:null,base10:ug});const hg=it({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),fg=it({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var pg=Object.freeze({__proto__:null,base16:hg,base16upper:fg});const dg=it({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),yg=it({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),gg=it({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),_g=it({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),vg=it({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),mg=it({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),bg=it({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),wg=it({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Eg=it({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var Sg=Object.freeze({__proto__:null,base32:dg,base32upper:yg,base32pad:gg,base32padupper:_g,base32hex:vg,base32hexupper:mg,base32hexpad:bg,base32hexpadupper:wg,base32z:Eg});const Og=Gr({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Ig=Gr({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var Pg=Object.freeze({__proto__:null,base36:Og,base36upper:Ig});const xg=Gr({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Fg=Gr({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var Ag=Object.freeze({__proto__:null,base58btc:xg,base58flickr:Fg});const Ng=it({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Rg=it({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Tg=it({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Lg=it({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Cg=Object.freeze({__proto__:null,base64:Ng,base64pad:Rg,base64url:Tg,base64urlpad:Lg});const Na=Array.from("\u{1f680}\u{1fa90}\u2604\u{1f6f0}\u{1f30c}\u{1f311}\u{1f312}\u{1f313}\u{1f314}\u{1f315}\u{1f316}\u{1f317}\u{1f318}\u{1f30d}\u{1f30f}\u{1f30e}\u{1f409}\u2600\u{1f4bb}\u{1f5a5}\u{1f4be}\u{1f4bf}\u{1f602}\u2764\u{1f60d}\u{1f923}\u{1f60a}\u{1f64f}\u{1f495}\u{1f62d}\u{1f618}\u{1f44d}\u{1f605}\u{1f44f}\u{1f601}\u{1f525}\u{1f970}\u{1f494}\u{1f496}\u{1f499}\u{1f622}\u{1f914}\u{1f606}\u{1f644}\u{1f4aa}\u{1f609}\u263a\u{1f44c}\u{1f917}\u{1f49c}\u{1f614}\u{1f60e}\u{1f607}\u{1f339}\u{1f926}\u{1f389}\u{1f49e}\u270c\u2728\u{1f937}\u{1f631}\u{1f60c}\u{1f338}\u{1f64c}\u{1f60b}\u{1f497}\u{1f49a}\u{1f60f}\u{1f49b}\u{1f642}\u{1f493}\u{1f929}\u{1f604}\u{1f600}\u{1f5a4}\u{1f603}\u{1f4af}\u{1f648}\u{1f447}\u{1f3b6}\u{1f612}\u{1f92d}\u2763\u{1f61c}\u{1f48b}\u{1f440}\u{1f62a}\u{1f611}\u{1f4a5}\u{1f64b}\u{1f61e}\u{1f629}\u{1f621}\u{1f92a}\u{1f44a}\u{1f973}\u{1f625}\u{1f924}\u{1f449}\u{1f483}\u{1f633}\u270b\u{1f61a}\u{1f61d}\u{1f634}\u{1f31f}\u{1f62c}\u{1f643}\u{1f340}\u{1f337}\u{1f63b}\u{1f613}\u2b50\u2705\u{1f97a}\u{1f308}\u{1f608}\u{1f918}\u{1f4a6}\u2714\u{1f623}\u{1f3c3}\u{1f490}\u2639\u{1f38a}\u{1f498}\u{1f620}\u261d\u{1f615}\u{1f33a}\u{1f382}\u{1f33b}\u{1f610}\u{1f595}\u{1f49d}\u{1f64a}\u{1f639}\u{1f5e3}\u{1f4ab}\u{1f480}\u{1f451}\u{1f3b5}\u{1f91e}\u{1f61b}\u{1f534}\u{1f624}\u{1f33c}\u{1f62b}\u26bd\u{1f919}\u2615\u{1f3c6}\u{1f92b}\u{1f448}\u{1f62e}\u{1f646}\u{1f37b}\u{1f343}\u{1f436}\u{1f481}\u{1f632}\u{1f33f}\u{1f9e1}\u{1f381}\u26a1\u{1f31e}\u{1f388}\u274c\u270a\u{1f44b}\u{1f630}\u{1f928}\u{1f636}\u{1f91d}\u{1f6b6}\u{1f4b0}\u{1f353}\u{1f4a2}\u{1f91f}\u{1f641}\u{1f6a8}\u{1f4a8}\u{1f92c}\u2708\u{1f380}\u{1f37a}\u{1f913}\u{1f619}\u{1f49f}\u{1f331}\u{1f616}\u{1f476}\u{1f974}\u25b6\u27a1\u2753\u{1f48e}\u{1f4b8}\u2b07\u{1f628}\u{1f31a}\u{1f98b}\u{1f637}\u{1f57a}\u26a0\u{1f645}\u{1f61f}\u{1f635}\u{1f44e}\u{1f932}\u{1f920}\u{1f927}\u{1f4cc}\u{1f535}\u{1f485}\u{1f9d0}\u{1f43e}\u{1f352}\u{1f617}\u{1f911}\u{1f30a}\u{1f92f}\u{1f437}\u260e\u{1f4a7}\u{1f62f}\u{1f486}\u{1f446}\u{1f3a4}\u{1f647}\u{1f351}\u2744\u{1f334}\u{1f4a3}\u{1f438}\u{1f48c}\u{1f4cd}\u{1f940}\u{1f922}\u{1f445}\u{1f4a1}\u{1f4a9}\u{1f450}\u{1f4f8}\u{1f47b}\u{1f910}\u{1f92e}\u{1f3bc}\u{1f975}\u{1f6a9}\u{1f34e}\u{1f34a}\u{1f47c}\u{1f48d}\u{1f4e3}\u{1f942}"),jg=Na.reduce((r,e,t)=>(r[t]=e,r),[]),Ug=Na.reduce((r,e,t)=>(r[e.codePointAt(0)]=t,r),[]);const kg=En({prefix:"\u{1f680}",name:"base256emoji",encode:function Mg(r){return r.reduce((e,t)=>e+jg[t],"")},decode:function Dg(r){const e=[];for(const t of r){const n=Ug[t.codePointAt(0)];if(void 0===n)throw new Error(`Non-base256emoji character: ${t}`);e.push(n)}return new Uint8Array(e)}});var zg=Object.freeze({__proto__:null,base256emoji:kg}),Hg=function Ta(r,e,t){e=e||[];for(var n=t=t||0;r>=Bg;)e[t++]=255&r|128,r/=128;for(;-128&r;)e[t++]=255&r|128,r>>>=7;return e[t]=0|r,Ta.bytes=t-n+1,e},Bg=Math.pow(2,31);var Vg=function zi(r,n){var s,t=0,i=0,o=n=n||0,a=r.length;do{if(o>=a)throw zi.bytes=0,new RangeError("Could not decode varint");s=r[o++],t+=i<28?(127&s)<=128);return zi.bytes=o-n,t};var Gg=Math.pow(2,7),Wg=Math.pow(2,14),Yg=Math.pow(2,21),Jg=Math.pow(2,28),Xg=Math.pow(2,35),Zg=Math.pow(2,42),Qg=Math.pow(2,49),e1=Math.pow(2,56),t1=Math.pow(2,63),Ca={encode:Hg,decode:Vg,encodingLength:function(r){return r(Ca.encode(r,e,t),e),Ua=r=>Ca.encodingLength(r),Hi=(r,e)=>{const t=e.byteLength,n=Ua(r),i=n+Ua(t),o=new Uint8Array(i+t);return ja(r,o,0),ja(t,o,n),o.set(e,i),new i1(r,t,e,o)};class i1{constructor(e,t,n,i){this.code=e,this.size=t,this.digest=n,this.bytes=i}}const Ma=({name:r,code:e,encode:t})=>new o1(r,e,t);class o1{constructor(e,t,n){this.name=e,this.code=t,this.encode=n}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?Hi(this.code,t):t.then(n=>Hi(this.code,n))}throw Error("Unknown type, must be binary type")}}const Da=r=>function(){var e=I(function*(t){return new Uint8Array(yield crypto.subtle.digest(r,t))});return function(t){return e.apply(this,arguments)}}(),s1=Ma({name:"sha2-256",code:18,encode:Da("SHA-256")}),a1=Ma({name:"sha2-512",code:19,encode:Da("SHA-512")});var c1=Object.freeze({__proto__:null,sha256:s1,sha512:a1});const za=Fa;var l1=Object.freeze({__proto__:null,identity:{code:0,name:"identity",encode:za,digest:r=>Hi(0,za(r))}});new TextEncoder,new TextDecoder;const Ha=pt(pt(pt(pt(pt(pt(pt(pt(pt(pt({},ig),sg),cg),lg),pg),Sg),Pg),Ag),Cg),zg);function Ka(r,e,t,n){return{name:r,prefix:e,encoder:{name:r,prefix:e,encode:t},decoder:{decode:n}}}pt(pt({},c1),l1);const $a=Ka("utf8","u",r=>"u"+new TextDecoder("utf8").decode(r),r=>(new TextEncoder).encode(r.substring(1))),Ki=Ka("ascii","a",r=>{let e="a";for(let t=0;t{const e=function h1(r=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?globalThis.Buffer.allocUnsafe(r):new Uint8Array(r)}((r=r.substring(1)).length);for(let t=0;t(this.isInitialized(),this.keychain.has(i)),this.set=function(){var i=I(function*(o,s){n.isInitialized(),n.keychain.set(o,s),yield n.persist()});return function(o,s){return i.apply(this,arguments)}}(),this.get=i=>{this.isInitialized();const o=this.keychain.get(i);if(typeof o>"u"){const{message:s}=q("NO_MATCHING_KEY",`${this.name}: ${i}`);throw new Error(s)}return o},this.del=function(){var i=I(function*(o){n.isInitialized(),n.keychain.delete(o),yield n.persist()});return function(o){return i.apply(this,arguments)}}(),this.core=e,this.logger=xe.generateChildLogger(t,this.name)}get context(){return xe.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}setKeyChain(e){var t=this;return I(function*(){yield t.core.storage.setItem(t.storageKey,ra(e))})()}getKeyChain(){var e=this;return I(function*(){const t=yield e.core.storage.getItem(e.storageKey);return typeof t<"u"?na(t):void 0})()}persist(){var e=this;return I(function*(){yield e.setKeyChain(e.keychain)})()}isInitialized(){if(!this.initialized){const{message:e}=q("NOT_INITIALIZED",this.name);throw new Error(e)}}}class z1{constructor(e,t,n){var i=this;this.core=e,this.logger=t,this.name="crypto",this.initialized=!1,this.init=I(function*(){i.initialized||(yield i.keychain.init(),i.initialized=!0)}),this.hasKeys=o=>(this.isInitialized(),this.keychain.has(o)),this.getClientId=I(function*(){return i.isInitialized(),xs(Fs(yield i.getClientSeed()).publicKey)}),this.generateKeyPair=()=>{this.isInitialized();const o=function Gp(){const r=gi.generateKeyPair();return{privateKey:_t(r.secretKey,mt),publicKey:_t(r.publicKey,mt)}}();return this.setPrivateKey(o.publicKey,o.privateKey)},this.signJWT=function(){var o=I(function*(s){i.isInitialized();const h=Fs(yield i.getClientSeed()),l=Ii();return yield function tp(r,e,t,n){return fi.apply(this,arguments)}(l,s,v1,h)});return function(s){return o.apply(this,arguments)}}(),this.generateSharedKey=(o,s,a)=>{this.isInitialized();const l=function Wp(r,e){const t=gi.sharedKey(vt(r,mt),vt(e,mt));return _t(new dp(_n.SHA256,t).expand(32),mt)}(this.getPrivateKey(o),s);return this.setSymKey(l,a)},this.setSymKey=function(){var o=I(function*(s,a){i.isInitialized();const h=a||function Yp(r){return _t(_n.hash(vt(r,mt)),mt)}(s);return yield i.keychain.set(h,s),h});return function(s,a){return o.apply(this,arguments)}}(),this.deleteKeyPair=function(){var o=I(function*(s){i.isInitialized(),yield i.keychain.del(s)});return function(s){return o.apply(this,arguments)}}(),this.deleteSymKey=function(){var o=I(function*(s){i.isInitialized(),yield i.keychain.del(s)});return function(s){return o.apply(this,arguments)}}(),this.encode=function(){var o=I(function*(s,a,h){i.isInitialized();const l=Js(h),f=jr(a);if(Xs(l)){const m=l.senderPublicKey,T=l.receiverPublicKey;s=yield i.generateSharedKey(m,T)}const _=i.getSymKey(s),{type:v,senderPublicKey:b}=l;return Xp({type:v,symKey:_,message:f,senderPublicKey:b})});return function(s,a,h){return o.apply(this,arguments)}}(),this.decode=function(){var o=I(function*(s,a,h){i.isInitialized();const l=function ed(r,e){const t=Pi(r);return Js({type:kr(t.type),senderPublicKey:typeof t.senderPublicKey<"u"?_t(t.senderPublicKey,mt):void 0,receiverPublicKey:e?.receiverPublicKey})}(a,h);if(Xs(l)){const v=l.receiverPublicKey,b=l.senderPublicKey;s=yield i.generateSharedKey(v,b)}return ri(function Zp(r){const e=new pi.ChaCha20Poly1305(vt(r.symKey,mt)),{sealed:t,iv:n}=Pi(r.encoded),i=e.open(n,t);if(null===i)throw new Error("Failed to decrypt");return _t(i,Ei)}({symKey:i.getSymKey(s),encoded:a}))});return function(s,a,h){return o.apply(this,arguments)}}(),this.core=e,this.logger=xe.generateChildLogger(t,this.name),this.keychain=n||new k1(this.core,this.logger)}get context(){return xe.getLoggerContext(this.logger)}getPayloadType(e){return kr(Pi(e).type)}setPrivateKey(e,t){var n=this;return I(function*(){return yield n.keychain.set(e,t),e})()}getPrivateKey(e){return this.keychain.get(e)}getClientSeed(){var e=this;return I(function*(){let t="";try{t=e.keychain.get(Va)}catch{t=Ii(),yield e.keychain.set(Va,t)}return function p1(r,e="utf8"){const t=f1[e];if(!t)throw new Error(`Unsupported encoding "${e}"`);return"utf8"!==e&&"utf-8"!==e||null==globalThis.Buffer||null==globalThis.Buffer.from?t.decoder.decode(`${t.prefix}${r}`):globalThis.Buffer.from(r,"utf8")}(t,"base16")})()}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=q("NOT_INITIALIZED",this.name);throw new Error(e)}}}class H1 extends class Ml{constructor(e,t){this.logger=e,this.core=t}}{constructor(e,t){var n;super(e,t),n=this,this.logger=e,this.core=t,this.messages=new Map,this.name="messages",this.version="0.3",this.initialized=!1,this.storagePrefix=Wt,this.init=I(function*(){if(!n.initialized){n.logger.trace("Initialized");try{const i=yield n.getRelayerMessages();typeof i<"u"&&(n.messages=i),n.logger.debug(`Successfully Restored records for ${n.name}`),n.logger.trace({type:"method",method:"restore",size:n.messages.size})}catch(i){n.logger.debug(`Failed to Restore records for ${n.name}`),n.logger.error(i)}finally{n.initialized=!0}}}),this.set=function(){var i=I(function*(o,s){n.isInitialized();const a=vn(s);let h=n.messages.get(o);return typeof h>"u"&&(h={}),typeof h[a]<"u"||(h[a]=s,n.messages.set(o,h),yield n.persist()),a});return function(o,s){return i.apply(this,arguments)}}(),this.get=i=>{this.isInitialized();let o=this.messages.get(i);return typeof o>"u"&&(o={}),o},this.has=(i,o)=>(this.isInitialized(),typeof this.get(i)[vn(o)]<"u"),this.del=function(){var i=I(function*(o){n.isInitialized(),n.messages.delete(o),yield n.persist()});return function(o){return i.apply(this,arguments)}}(),this.logger=xe.generateChildLogger(e,this.name),this.core=t}get context(){return xe.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}setRelayerMessages(e){var t=this;return I(function*(){yield t.core.storage.setItem(t.storageKey,ra(e))})()}getRelayerMessages(){var e=this;return I(function*(){const t=yield e.core.storage.getItem(e.storageKey);return typeof t<"u"?na(t):void 0})()}persist(){var e=this;return I(function*(){yield e.setRelayerMessages(e.messages)})()}isInitialized(){if(!this.initialized){const{message:e}=q("NOT_INITIALIZED",this.name);throw new Error(e)}}}class K1 extends Dl{constructor(e,t){var n;super(e,t),n=this,this.relayer=e,this.logger=t,this.events=new ct.exports.EventEmitter,this.name="publisher",this.queue=new Map,this.publishTimeout=1e4,this.publish=function(){var i=I(function*(o,s,a){n.logger.debug("Publishing Payload"),n.logger.trace({type:"method",method:"publish",params:{topic:o,message:s,opts:a}});try{const h=a?.ttl||S1,l=xi(a),f=a?.prompt||!1,_=a?.tag||0,v={topic:o,message:s,opts:{ttl:h,relay:l,prompt:f,tag:_}},b=vn(s);n.queue.set(b,v);try{yield yield ia(n.rpcPublish(o,s,h,l,f,_),n.publishTimeout),n.relayer.events.emit(ot_publish,v)}catch{return n.logger.debug("Publishing Payload stalled"),void n.relayer.events.emit(ot_connection_stalled)}n.onPublish(b,v),n.logger.debug("Successfully Published Payload"),n.logger.trace({type:"method",method:"publish",params:{topic:o,message:s,opts:a}})}catch(h){throw n.logger.debug("Failed to Publish Payload"),n.logger.error(h),h}});return function(o,s,a){return i.apply(this,arguments)}}(),this.on=(i,o)=>{this.events.on(i,o)},this.once=(i,o)=>{this.events.once(i,o)},this.off=(i,o)=>{this.events.off(i,o)},this.removeListener=(i,o)=>{this.events.removeListener(i,o)},this.relayer=e,this.logger=xe.generateChildLogger(t,this.name),this.registerEventListeners()}get context(){return xe.getLoggerContext(this.logger)}rpcPublish(e,t,n,i,o,s){var a,h,l,f;const _={method:Fi(i.protocol).publish,params:{topic:e,message:t,ttl:n,prompt:o,tag:s}};return ft(null==(a=_.params)?void 0:a.prompt)&&(null==(h=_.params)||delete h.prompt),ft(null==(l=_.params)?void 0:l.tag)&&(null==(f=_.params)||delete f.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:_}),this.relayer.provider.request(_)}onPublish(e,t){this.queue.delete(e)}checkQueue(){var e=this;this.queue.forEach(function(){var t=I(function*(n){const{topic:i,message:o,opts:s}=n;yield e.publish(i,o,s)});return function(n){return t.apply(this,arguments)}}())}registerEventListeners(){this.relayer.core.heartbeat.on(xr.HEARTBEAT_EVENTS.pulse,()=>{this.checkQueue()})}}class $1{constructor(){this.map=new Map,this.set=(e,t)=>{const n=this.get(e);this.exists(e,t)||this.map.set(e,[...n,t])},this.get=e=>this.map.get(e)||[],this.exists=(e,t)=>this.get(e).includes(t),this.delete=(e,t)=>{if(typeof t>"u")return void this.map.delete(e);if(!this.map.has(e))return;const n=this.get(e);if(!this.exists(e,t))return;const i=n.filter(o=>o!==t);i.length?this.map.set(e,i):this.map.delete(e)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var B1=Object.defineProperty,V1=Object.defineProperties,q1=Object.getOwnPropertyDescriptors,Ya=Object.getOwnPropertySymbols,G1=Object.prototype.hasOwnProperty,W1=Object.prototype.propertyIsEnumerable,Ja=(r,e,t)=>e in r?B1(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,On=(r,e)=>{for(var t in e||(e={}))G1.call(e,t)&&Ja(r,t,e[t]);if(Ya)for(var t of Ya(e))W1.call(e,t)&&Ja(r,t,e[t]);return r},Bi=(r,e)=>V1(r,q1(e));class Y1 extends Hl{constructor(e,t){var n;super(e,t),n=this,this.relayer=e,this.logger=t,this.subscriptions=new Map,this.topicMap=new $1,this.events=new ct.exports.EventEmitter,this.name="subscription",this.version="0.3",this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=Wt,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.init=I(function*(){n.initialized||(n.logger.trace("Initialized"),yield n.restart(),n.registerEventListeners(),n.onEnable(),n.clientId=yield n.relayer.core.crypto.getClientId())}),this.subscribe=function(){var i=I(function*(o,s){yield n.restartToComplete(),n.isInitialized(),n.logger.debug("Subscribing Topic"),n.logger.trace({type:"method",method:"subscribe",params:{topic:o,opts:s}});try{const a=xi(s),h={topic:o,relay:a};n.pending.set(o,h);const l=yield n.rpcSubscribe(o,a);return n.onSubscribe(l,h),n.logger.debug("Successfully Subscribed Topic"),n.logger.trace({type:"method",method:"subscribe",params:{topic:o,opts:s}}),l}catch(a){throw n.logger.debug("Failed to Subscribe Topic"),n.logger.error(a),a}});return function(o,s){return i.apply(this,arguments)}}(),this.unsubscribe=function(){var i=I(function*(o,s){yield n.restartToComplete(),n.isInitialized(),typeof s?.id<"u"?yield n.unsubscribeById(o,s.id,s):yield n.unsubscribeByTopic(o,s)});return function(o,s){return i.apply(this,arguments)}}(),this.isSubscribed=function(){var i=I(function*(o){return!!n.topics.includes(o)||(yield new Promise((s,a)=>{const h=new Q.Watch;h.start(n.pendingSubscriptionWatchLabel);const l=setInterval(()=>{!n.pending.has(o)&&n.topics.includes(o)&&(clearInterval(l),h.stop(n.pendingSubscriptionWatchLabel),s(!0)),h.elapsed(n.pendingSubscriptionWatchLabel)>=T1&&(clearInterval(l),h.stop(n.pendingSubscriptionWatchLabel),a(!1))},n.pollingInterval)}))});return function(o){return i.apply(this,arguments)}}(),this.on=(i,o)=>{this.events.on(i,o)},this.once=(i,o)=>{this.events.once(i,o)},this.off=(i,o)=>{this.events.off(i,o)},this.removeListener=(i,o)=>{this.events.removeListener(i,o)},this.restart=I(function*(){n.restartInProgress=!0,yield n.restore(),yield n.reset(),n.restartInProgress=!1}),this.relayer=e,this.logger=xe.generateChildLogger(t,this.name),this.clientId=""}get context(){return xe.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(e,t){let n=!1;try{n=this.getSubscription(e).topic===t}catch{}return n}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear(),this.initialized=!1}unsubscribeByTopic(e,t){var n=this;return I(function*(){const i=n.topicMap.get(e);yield Promise.all(i.map(function(){var o=I(function*(s){return yield n.unsubscribeById(e,s,t)});return function(s){return o.apply(this,arguments)}}()))})()}unsubscribeById(e,t,n){var i=this;return I(function*(){i.logger.debug("Unsubscribing Topic"),i.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:n}});try{const o=xi(n);yield i.rpcUnsubscribe(e,t,o);const s=He("USER_DISCONNECTED",`${i.name}, ${e}`);yield i.onUnsubscribe(e,t,s),i.logger.debug("Successfully Unsubscribed Topic"),i.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:n}})}catch(o){throw i.logger.debug("Failed to Unsubscribe Topic"),i.logger.error(o),o}})()}rpcSubscribe(e,t){var n=this;return I(function*(){const i={method:Fi(t.protocol).subscribe,params:{topic:e}};n.logger.debug("Outgoing Relay Payload"),n.logger.trace({type:"payload",direction:"outgoing",request:i});try{yield yield ia(n.relayer.provider.request(i),n.subscribeTimeout)}catch{n.logger.debug("Outgoing Relay Payload stalled"),n.relayer.events.emit(ot_connection_stalled)}return vn(e+n.clientId)})()}rpcUnsubscribe(e,t,n){const i={method:Fi(n.protocol).unsubscribe,params:{topic:e,id:t}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:i}),this.relayer.provider.request(i)}onSubscribe(e,t){this.setSubscription(e,Bi(On({},t),{id:e})),this.pending.delete(t.topic)}onResubscribe(e,t){this.addSubscription(e,Bi(On({},t),{id:e})),this.pending.delete(t.topic)}onUnsubscribe(e,t,n){var i=this;return I(function*(){i.events.removeAllListeners(t),i.hasSubscription(t,e)&&i.deleteSubscription(t,n),yield i.relayer.messages.del(e)})()}setRelayerSubscriptions(e){var t=this;return I(function*(){yield t.relayer.core.storage.setItem(t.storageKey,e)})()}getRelayerSubscriptions(){var e=this;return I(function*(){return yield e.relayer.core.storage.getItem(e.storageKey)})()}setSubscription(e,t){this.subscriptions.has(e)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:t}),this.addSubscription(e,t))}addSubscription(e,t){this.subscriptions.set(e,On({},t)),this.topicMap.set(t.topic,e),this.events.emit(jt_created,t)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});const t=this.subscriptions.get(e);if(!t){const{message:n}=q("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(n)}return t}deleteSubscription(e,t){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:t});const n=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(n.topic,e),this.events.emit(jt_deleted,Bi(On({},n),{reason:t}))}persist(){var e=this;return I(function*(){yield e.setRelayerSubscriptions(e.values),e.events.emit(jt_sync)})()}reset(){var e=this;return I(function*(){e.cached.length&&(yield Promise.all(e.cached.map(function(){var t=I(function*(n){return yield e.resubscribe(n)});return function(n){return t.apply(this,arguments)}}()))),e.events.emit(jt_resubscribed)})()}restore(){var e=this;return I(function*(){try{const t=yield e.getRelayerSubscriptions();if(typeof t>"u"||!t.length)return;if(e.subscriptions.size){const{message:n}=q("RESTORE_WILL_OVERRIDE",e.name);throw e.logger.error(n),e.logger.error(`${e.name}: ${JSON.stringify(e.values)}`),new Error(n)}e.cached=t,e.logger.debug(`Successfully Restored subscriptions for ${e.name}`),e.logger.trace({type:"method",method:"restore",subscriptions:e.values})}catch(t){e.logger.debug(`Failed to Restore subscriptions for ${e.name}`),e.logger.error(t)}})()}resubscribe(e){var t=this;return I(function*(){if(!t.ids.includes(e.id)){const{topic:n,relay:i}=e,o={topic:n,relay:i};t.pending.set(o.topic,o);const s=yield t.rpcSubscribe(o.topic,o.relay);t.onResubscribe(s,o)}})()}onConnect(){var e=this;return I(function*(){e.restartInProgress||(yield e.restart(),e.onEnable())})()}onDisconnect(){this.onDisable()}checkPending(){var e=this;this.relayer.transportExplicitlyClosed||this.pending.forEach(function(){var t=I(function*(n){const i=yield e.rpcSubscribe(n.topic,n.relay);e.onSubscribe(i,n)});return function(n){return t.apply(this,arguments)}}())}registerEventListeners(){var e=this;this.relayer.core.heartbeat.on(xr.HEARTBEAT_EVENTS.pulse,()=>{this.checkPending()}),this.relayer.on(ot_connect,I(function*(){yield e.onConnect()})),this.relayer.on(ot_disconnect,()=>{this.onDisconnect()}),this.events.on(jt_created,function(){var t=I(function*(n){const i=jt_created;e.logger.info(`Emitting ${i}`),e.logger.debug({type:"event",event:i,data:n}),yield e.persist()});return function(n){return t.apply(this,arguments)}}()),this.events.on(jt_deleted,function(){var t=I(function*(n){const i=jt_deleted;e.logger.info(`Emitting ${i}`),e.logger.debug({type:"event",event:i,data:n}),yield e.persist()});return function(n){return t.apply(this,arguments)}}())}isInitialized(){if(!this.initialized){const{message:e}=q("NOT_INITIALIZED",this.name);throw new Error(e)}}restartToComplete(){var e=this;return I(function*(){e.restartInProgress&&(yield new Promise(t=>{const n=setInterval(()=>{e.restartInProgress||(clearInterval(n),t())},e.pollingInterval)}))})()}}var J1=Object.defineProperty,Xa=Object.getOwnPropertySymbols,X1=Object.prototype.hasOwnProperty,Z1=Object.prototype.propertyIsEnumerable,Za=(r,e,t)=>e in r?J1(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;class e_ extends kl{constructor(e){super(e),this.protocol="wc",this.version=2,this.events=new ct.exports.EventEmitter,this.name="relayer",this.transportExplicitlyClosed=!1,this.initialized=!1,this.reconnecting=!1,this.core=e.core,this.logger=typeof e.logger<"u"&&"string"!=typeof e.logger?xe.generateChildLogger(e.logger,this.name):Fe(xe.getDefaultLoggerOptions({level:e.logger||"error"})),this.messages=new H1(this.logger,e.core),this.subscriber=new Y1(this,this.logger),this.publisher=new K1(this,this.logger),this.relayUrl=e?.relayUrl||Ga,this.projectId=e.projectId,this.provider={}}init(){var e=this;return I(function*(){e.logger.trace("Initialized"),e.provider=yield e.createProvider(),yield Promise.all([e.messages.init(),e.transportOpen(),e.subscriber.init()]),e.registerEventListeners(),e.initialized=!0})()}get context(){return xe.getLoggerContext(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}publish(e,t,n){var i=this;return I(function*(){i.isInitialized(),yield i.publisher.publish(e,t,n),yield i.recordMessageEvent({topic:e,message:t})})()}subscribe(e,t){var n=this;return I(function*(){n.isInitialized();let i="";return yield Promise.all([new Promise(o=>{n.subscriber.once(jt_created,s=>{s.topic===e&&o()})}),new Promise(function(){var o=I(function*(s){i=yield n.subscriber.subscribe(e,t),s()});return function(s){return o.apply(this,arguments)}}())]),i})()}unsubscribe(e,t){var n=this;return I(function*(){n.isInitialized(),yield n.subscriber.unsubscribe(e,t)})()}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}transportClose(){var e=this;return I(function*(){e.transportExplicitlyClosed=!0,e.connected&&(yield e.provider.disconnect(),e.events.emit(ot_transport_closed))})()}transportOpen(e){var t=this;return I(function*(){if(!t.reconnecting){t.relayUrl=e||t.relayUrl,t.transportExplicitlyClosed=!1,t.reconnecting=!0;try{yield Promise.all([new Promise(n=>{t.initialized||n(),t.subscriber.once(jt_resubscribed,()=>{n()})}),yield Promise.race([new Promise(function(){var n=I(function*(i){yield t.provider.connect(),t.removeListener(ot_transport_closed,t.rejectTransportOpen),i()});return function(i){return n.apply(this,arguments)}}()),new Promise(n=>t.once(ot_transport_closed,t.rejectTransportOpen))])])}catch(n){if(!/socket hang up/i.test(n.message))throw n;t.logger.error(n),t.events.emit(ot_transport_closed)}finally{t.reconnecting=!1}}})()}restartTransport(e){var t=this;return I(function*(){t.transportExplicitlyClosed||(yield t.transportClose(),yield new Promise(n=>setTimeout(n,Wa)),yield t.transportOpen(e))})()}rejectTransportOpen(){throw new Error("closeTransport called before connection was established")}createProvider(){var e=this;return I(function*(){const t=yield e.core.crypto.signJWT(e.relayUrl);return new qr(new Hy(dd({sdkVersion:"2.4.5",protocol:e.protocol,version:e.version,relayUrl:e.relayUrl,projectId:e.projectId,auth:t})))})()}recordMessageEvent(e){var t=this;return I(function*(){const{topic:n,message:i}=e;yield t.messages.set(n,i)})()}shouldIgnoreMessageEvent(e){var t=this;return I(function*(){const{topic:n,message:i}=e;return!(yield t.subscriber.isSubscribed(n))||t.messages.has(n,i)})()}onProviderPayload(e){var t=this;return I(function*(){if(t.logger.debug("Incoming Relay Payload"),t.logger.trace({type:"payload",direction:"incoming",payload:e}),Mi(e)){if(!e.method.endsWith("_subscription"))return;const n=e.params,{topic:i,message:o}=n.data,s={topic:i,message:o};t.logger.debug("Emitting Relayer Payload"),t.logger.trace(((r,e)=>{for(var t in e||(e={}))X1.call(e,t)&&Za(r,t,e[t]);if(Xa)for(var t of Xa(e))Z1.call(e,t)&&Za(r,t,e[t]);return r})({type:"event",event:n.id},s)),t.events.emit(n.id,s),yield t.acknowledgePayload(e),yield t.onMessageEvent(s)}})()}onMessageEvent(e){var t=this;return I(function*(){(yield t.shouldIgnoreMessageEvent(e))||(t.events.emit(ot_message,e),yield t.recordMessageEvent(e))})()}acknowledgePayload(e){var t=this;return I(function*(){const n=Ui(e.id,!0);yield t.provider.connection.send(n)})()}registerEventListeners(){var e=this;this.provider.on(Sn_payload,t=>this.onProviderPayload(t)),this.provider.on(Sn_connect,()=>{this.events.emit(ot_connect)}),this.provider.on(Sn_disconnect,()=>{this.events.emit(ot_disconnect),this.attemptToReconnect()}),this.provider.on(Sn_error,t=>this.events.emit(ot_error,t)),this.events.on(ot_connection_stalled,I(function*(){yield e.restartTransport()}))}attemptToReconnect(){var e=this;this.transportExplicitlyClosed||setTimeout(I(function*(){yield e.transportOpen()}),Q.toMiliseconds(Wa))}isInitialized(){if(!this.initialized){const{message:e}=q("NOT_INITIALIZED",this.name);throw new Error(e)}}}var t_=Object.defineProperty,Qa=Object.getOwnPropertySymbols,r_=Object.prototype.hasOwnProperty,n_=Object.prototype.propertyIsEnumerable,ec=(r,e,t)=>e in r?t_(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,tc=(r,e)=>{for(var t in e||(e={}))r_.call(e,t)&&ec(r,t,e[t]);if(Qa)for(var t of Qa(e))n_.call(e,t)&&ec(r,t,e[t]);return r};class In extends class zl{constructor(e,t,n,i){this.core=e,this.logger=t,this.name=n}}{constructor(e,t,n,i=Wt,o){var s;super(e,t,n,i),s=this,this.core=e,this.logger=t,this.name=n,this.map=new Map,this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=Wt,this.init=I(function*(){s.initialized||(s.logger.trace("Initialized"),yield s.restore(),s.cached.forEach(a=>{!function jd(r){var e;return null==(e=r?.proposer)?void 0:e.publicKey}(a)?function Ud(r){return r?.topic}(a)?s.map.set(a.topic,a):s.getKey&&null!==a&&!ft(a)&&s.map.set(s.getKey(a),a):s.map.set(a.id,a)}),s.cached=[],s.initialized=!0)}),this.set=function(){var a=I(function*(h,l){s.isInitialized(),s.map.has(h)?yield s.update(h,l):(s.logger.debug("Setting value"),s.logger.trace({type:"method",method:"set",key:h,value:l}),s.map.set(h,l),yield s.persist())});return function(h,l){return a.apply(this,arguments)}}(),this.get=a=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:a}),this.getData(a)),this.getAll=a=>(this.isInitialized(),a?this.values.filter(h=>Object.keys(a).every(l=>Ky(h[l],a[l]))):this.values),this.update=function(){var a=I(function*(h,l){s.isInitialized(),s.logger.debug("Updating value"),s.logger.trace({type:"method",method:"update",key:h,update:l});const f=tc(tc({},s.getData(h)),l);s.map.set(h,f),yield s.persist()});return function(h,l){return a.apply(this,arguments)}}(),this.delete=function(){var a=I(function*(h,l){s.isInitialized(),s.map.has(h)&&(s.logger.debug("Deleting value"),s.logger.trace({type:"method",method:"delete",key:h,reason:l}),s.map.delete(h),yield s.persist())});return function(h,l){return a.apply(this,arguments)}}(),this.logger=xe.generateChildLogger(t,this.name),this.storagePrefix=i,this.getKey=o}get context(){return xe.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}setDataStore(e){var t=this;return I(function*(){yield t.core.storage.setItem(t.storageKey,e)})()}getDataStore(){var e=this;return I(function*(){return yield e.core.storage.getItem(e.storageKey)})()}getData(e){const t=this.map.get(e);if(!t){const{message:n}=q("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(n),new Error(n)}return t}persist(){var e=this;return I(function*(){yield e.setDataStore(e.values)})()}restore(){var e=this;return I(function*(){try{const t=yield e.getDataStore();if(typeof t>"u"||!t.length)return;if(e.map.size){const{message:n}=q("RESTORE_WILL_OVERRIDE",e.name);throw e.logger.error(n),new Error(n)}e.cached=t,e.logger.debug(`Successfully Restored value for ${e.name}`),e.logger.trace({type:"method",method:"restore",value:e.values})}catch(t){e.logger.debug(`Failed to Restore value for ${e.name}`),e.logger.error(t)}})()}isInitialized(){if(!this.initialized){const{message:e}=q("NOT_INITIALIZED",this.name);throw new Error(e)}}}class i_{constructor(e,t){var n=this;this.core=e,this.logger=t,this.name="pairing",this.version="0.3",this.events=new ct.exports,this.initialized=!1,this.storagePrefix=Wt,this.ignoredPayloadTypes=[1],this.registeredMethods=[],this.init=I(function*(){n.initialized||(yield n.pairings.init(),yield n.cleanup(),n.registerRelayerEvents(),n.registerExpirerEvents(),n.initialized=!0,n.logger.trace("Initialized"))}),this.register=({methods:i})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...i])]},this.create=I(function*(){n.isInitialized();const i=Ii(),o=yield n.core.crypto.setSymKey(i),s=Ct(Q.FIVE_MINUTES),a={protocol:"irn"},h={topic:o,expiry:s,relay:a,active:!1},l=Id({protocol:n.core.protocol,version:n.core.version,topic:o,symKey:i,relay:a});return yield n.pairings.set(o,h),yield n.core.relayer.subscribe(o),n.core.expirer.set(o,s),{topic:o,uri:l}}),this.pair=function(){var i=I(function*(o){n.isInitialized(),n.isValidPair(o);const{topic:s,symKey:a,relay:h}=function Sd(r){const e=r.indexOf(":"),t=-1!==r.indexOf("?")?r.indexOf("?"):void 0,n=r.substring(0,e),i=r.substring(e+1,t).split("@"),o=typeof t<"u"?r.substring(t):"",s=Dr.parse(o);return{protocol:n,topic:i[0],version:parseInt(i[1],10),symKey:s.symKey,relay:Ed(s)}}(o.uri),l=Ct(Q.FIVE_MINUTES),f={topic:s,relay:h,expiry:l,active:!1};return yield n.pairings.set(s,f),yield n.core.crypto.setSymKey(a,s),yield n.core.relayer.subscribe(s,{relay:h}),n.core.expirer.set(s,l),o.activatePairing&&(yield n.activate({topic:s})),f});return function(o){return i.apply(this,arguments)}}(),this.activate=function(){var i=I(function*({topic:o}){n.isInitialized();const s=Ct(Q.THIRTY_DAYS);yield n.pairings.update(o,{active:!0,expiry:s}),n.core.expirer.set(o,s)});return function(o){return i.apply(this,arguments)}}(),this.ping=function(){var i=I(function*(o){n.isInitialized(),yield n.isValidPing(o);const{topic:s}=o;if(n.pairings.keys.includes(s)){const a=yield n.sendRequest(s,"wc_pairingPing",{}),{done:h,resolve:l,reject:f}=sr();n.events.once(ke("pairing_ping",a),({error:_})=>{_?f(_):l()}),yield h()}});return function(o){return i.apply(this,arguments)}}(),this.updateExpiry=function(){var i=I(function*({topic:o,expiry:s}){n.isInitialized(),yield n.pairings.update(o,{expiry:s})});return function(o){return i.apply(this,arguments)}}(),this.updateMetadata=function(){var i=I(function*({topic:o,metadata:s}){n.isInitialized(),yield n.pairings.update(o,{peerMetadata:s})});return function(o){return i.apply(this,arguments)}}(),this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=function(){var i=I(function*(o){n.isInitialized(),yield n.isValidDisconnect(o);const{topic:s}=o;n.pairings.keys.includes(s)&&(yield n.sendRequest(s,"wc_pairingDelete",He("USER_DISCONNECTED")),yield n.deletePairing(s))});return function(o){return i.apply(this,arguments)}}(),this.sendRequest=function(){var i=I(function*(o,s,a){const h=bn(s,a),l=yield n.core.crypto.encode(o,h),f=Wr[s].req;return n.core.history.set(o,h),yield n.core.relayer.publish(o,l,f),h.id});return function(o,s,a){return i.apply(this,arguments)}}(),this.sendResult=function(){var i=I(function*(o,s,a){const h=Ui(o,a),l=yield n.core.crypto.encode(s,h),f=yield n.core.history.get(s,o),_=Wr[f.request.method].res;yield n.core.relayer.publish(s,l,_),yield n.core.history.resolve(h)});return function(o,s,a){return i.apply(this,arguments)}}(),this.sendError=function(){var i=I(function*(o,s,a){const h=wn(o,a),l=yield n.core.crypto.encode(s,h),f=yield n.core.history.get(s,o),_=Wr[f.request.method]?Wr[f.request.method].res:Wr.unregistered_method.res;yield n.core.relayer.publish(s,l,_),yield n.core.history.resolve(h)});return function(o,s,a){return i.apply(this,arguments)}}(),this.deletePairing=function(){var i=I(function*(o,s){yield n.core.relayer.unsubscribe(o),yield Promise.all([n.pairings.delete(o,He("USER_DISCONNECTED")),n.core.crypto.deleteSymKey(o),s?Promise.resolve():n.core.expirer.del(o)])});return function(o,s){return i.apply(this,arguments)}}(),this.cleanup=I(function*(){const i=n.pairings.getAll().filter(o=>Gt(o.expiry));yield Promise.all(i.map(o=>n.deletePairing(o.topic)))}),this.onRelayEventRequest=i=>{const{topic:o,payload:s}=i,a=s.method;if(this.pairings.keys.includes(o))switch(a){case"wc_pairingPing":return this.onPairingPingRequest(o,s);case"wc_pairingDelete":return this.onPairingDeleteRequest(o,s);default:return this.onUnknownRpcMethodRequest(o,s)}},this.onRelayEventResponse=function(){var i=I(function*(o){const{topic:s,payload:a}=o,h=(yield n.core.history.get(s,a.id)).request.method;if(n.pairings.keys.includes(s))return"wc_pairingPing"===h?n.onPairingPingResponse(s,a):n.onUnknownRpcMethodResponse(h)});return function(o){return i.apply(this,arguments)}}(),this.onPairingPingRequest=function(){var i=I(function*(o,s){const{id:a}=s;try{n.isValidPing({topic:o}),yield n.sendResult(a,o,!0),n.events.emit("pairing_ping",{id:a,topic:o})}catch(h){yield n.sendError(a,o,h),n.logger.error(h)}});return function(o,s){return i.apply(this,arguments)}}(),this.onPairingPingResponse=(i,o)=>{const{id:s}=o;setTimeout(()=>{Ht(o)?this.events.emit(ke("pairing_ping",s),{}):At(o)&&this.events.emit(ke("pairing_ping",s),{error:o.error})},500)},this.onPairingDeleteRequest=function(){var i=I(function*(o,s){const{id:a}=s;try{n.isValidDisconnect({topic:o}),yield n.deletePairing(o),n.events.emit("pairing_delete",{id:a,topic:o})}catch(h){yield n.sendError(a,o,h),n.logger.error(h)}});return function(o,s){return i.apply(this,arguments)}}(),this.onUnknownRpcMethodRequest=function(){var i=I(function*(o,s){const{id:a,method:h}=s;try{if(n.registeredMethods.includes(h))return;const l=He("WC_METHOD_UNSUPPORTED",h);yield n.sendError(a,o,l),n.logger.error(l)}catch(l){yield n.sendError(a,o,l),n.logger.error(l)}});return function(o,s){return i.apply(this,arguments)}}(),this.onUnknownRpcMethodResponse=i=>{this.registeredMethods.includes(i)||this.logger.error(He("WC_METHOD_UNSUPPORTED",i))},this.isValidPair=i=>{if(!bt(i)){const{message:o}=q("MISSING_OR_INVALID",`pair() params: ${i}`);throw new Error(o)}if(!function Cd(r){if(We(r,!1))try{return typeof new URL(r)<"u"}catch{return!1}return!1}(i.uri)){const{message:o}=q("MISSING_OR_INVALID",`pair() uri: ${i.uri}`);throw new Error(o)}},this.isValidPing=function(){var i=I(function*(o){if(!bt(o)){const{message:a}=q("MISSING_OR_INVALID",`ping() params: ${o}`);throw new Error(a)}const{topic:s}=o;yield n.isValidPairingTopic(s)});return function(o){return i.apply(this,arguments)}}(),this.isValidDisconnect=function(){var i=I(function*(o){if(!bt(o)){const{message:a}=q("MISSING_OR_INVALID",`disconnect() params: ${o}`);throw new Error(a)}const{topic:s}=o;yield n.isValidPairingTopic(s)});return function(o){return i.apply(this,arguments)}}(),this.isValidPairingTopic=function(){var i=I(function*(o){if(!We(o,!1)){const{message:s}=q("MISSING_OR_INVALID",`pairing topic should be a string: ${o}`);throw new Error(s)}if(!n.pairings.keys.includes(o)){const{message:s}=q("NO_MATCHING_KEY",`pairing topic doesn't exist: ${o}`);throw new Error(s)}if(Gt(n.pairings.get(o).expiry)){yield n.deletePairing(o);const{message:s}=q("EXPIRED",`pairing topic: ${o}`);throw new Error(s)}});return function(o){return i.apply(this,arguments)}}(),this.core=e,this.logger=xe.generateChildLogger(t,this.name),this.pairings=new In(this.core,this.logger,this.name,this.storagePrefix)}get context(){return xe.getLoggerContext(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=q("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){var e=this;this.core.relayer.on(ot_message,function(){var t=I(function*(n){const{topic:i,message:o}=n;if(e.ignoredPayloadTypes.includes(e.core.crypto.getPayloadType(o)))return;const s=yield e.core.crypto.decode(i,o);Mi(s)?(e.core.history.set(i,s),e.onRelayEventRequest({topic:i,payload:s})):Di(s)&&(yield e.core.history.resolve(s),e.onRelayEventResponse({topic:i,payload:s}))});return function(n){return t.apply(this,arguments)}}())}registerExpirerEvents(){var e=this;this.core.expirer.on(It_expired,function(){var t=I(function*(n){const{topic:i}=sa(n.target);i&&e.pairings.keys.includes(i)&&(yield e.deletePairing(i,!0),e.events.emit("pairing_expire",{topic:i}))});return function(n){return t.apply(this,arguments)}}())}}class o_ extends Ul{constructor(e,t){var n;super(e,t),n=this,this.core=e,this.logger=t,this.records=new Map,this.events=new ct.exports.EventEmitter,this.name="history",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=Wt,this.init=I(function*(){n.initialized||(n.logger.trace("Initialized"),yield n.restore(),n.cached.forEach(i=>n.records.set(i.id,i)),n.cached=[],n.registerEventListeners(),n.initialized=!0)}),this.set=(i,o,s)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:i,request:o,chainId:s}),this.records.has(o.id))return;const a={id:o.id,topic:i,request:{method:o.method,params:o.params||null},chainId:s};this.records.set(a.id,a),this.events.emit(Ut_created,a)},this.resolve=function(){var i=I(function*(o){if(n.isInitialized(),n.logger.debug("Updating JSON-RPC response history record"),n.logger.trace({type:"method",method:"update",response:o}),!n.records.has(o.id))return;const s=yield n.getRecord(o.id);typeof s.response>"u"&&(s.response=At(o)?{error:o.error}:{result:o.result},n.records.set(s.id,s),n.events.emit(Ut_updated,s))});return function(o){return i.apply(this,arguments)}}(),this.get=function(){var i=I(function*(o,s){return n.isInitialized(),n.logger.debug("Getting record"),n.logger.trace({type:"method",method:"get",topic:o,id:s}),yield n.getRecord(s)});return function(o,s){return i.apply(this,arguments)}}(),this.delete=(i,o)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:o}),this.values.forEach(s=>{if(s.topic===i){if(typeof o<"u"&&s.id!==o)return;this.records.delete(s.id),this.events.emit(Ut_deleted,s)}})},this.exists=function(){var i=I(function*(o,s){return n.isInitialized(),!!n.records.has(s)&&(yield n.getRecord(s)).topic===o});return function(o,s){return i.apply(this,arguments)}}(),this.on=(i,o)=>{this.events.on(i,o)},this.once=(i,o)=>{this.events.once(i,o)},this.off=(i,o)=>{this.events.off(i,o)},this.removeListener=(i,o)=>{this.events.removeListener(i,o)},this.logger=xe.generateChildLogger(t,this.name)}get context(){return xe.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const e=[];return this.values.forEach(t=>{if(typeof t.response<"u")return;const n={topic:t.topic,request:bn(t.request.method,t.request.params,t.id),chainId:t.chainId};return e.push(n)}),e}setJsonRpcRecords(e){var t=this;return I(function*(){yield t.core.storage.setItem(t.storageKey,e)})()}getJsonRpcRecords(){var e=this;return I(function*(){return yield e.core.storage.getItem(e.storageKey)})()}getRecord(e){this.isInitialized();const t=this.records.get(e);if(!t){const{message:n}=q("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(n)}return t}persist(){var e=this;return I(function*(){yield e.setJsonRpcRecords(e.values),e.events.emit(Ut_sync)})()}restore(){var e=this;return I(function*(){try{const t=yield e.getJsonRpcRecords();if(typeof t>"u"||!t.length)return;if(e.records.size){const{message:n}=q("RESTORE_WILL_OVERRIDE",e.name);throw e.logger.error(n),new Error(n)}e.cached=t,e.logger.debug(`Successfully Restored records for ${e.name}`),e.logger.trace({type:"method",method:"restore",records:e.values})}catch(t){e.logger.debug(`Failed to Restore records for ${e.name}`),e.logger.error(t)}})()}registerEventListeners(){this.events.on(Ut_created,e=>{const t=Ut_created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()}),this.events.on(Ut_updated,e=>{const t=Ut_updated;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()}),this.events.on(Ut_deleted,e=>{const t=Ut_deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=q("NOT_INITIALIZED",this.name);throw new Error(e)}}}class s_ extends Kl{constructor(e,t){var n;super(e,t),n=this,this.core=e,this.logger=t,this.expirations=new Map,this.events=new ct.exports.EventEmitter,this.name="expirer",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=Wt,this.init=I(function*(){n.initialized||(n.logger.trace("Initialized"),yield n.restore(),n.cached.forEach(i=>n.expirations.set(i.target,i)),n.cached=[],n.registerEventListeners(),n.initialized=!0)}),this.has=i=>{try{const o=this.formatTarget(i);return typeof this.getExpiration(o)<"u"}catch{return!1}},this.set=(i,o)=>{this.isInitialized();const s=this.formatTarget(i),a={target:s,expiry:o};this.expirations.set(s,a),this.checkExpiry(s,a),this.events.emit(It_created,{target:s,expiration:a})},this.get=i=>{this.isInitialized();const o=this.formatTarget(i);return this.getExpiration(o)},this.del=i=>{if(this.isInitialized(),this.has(i)){const o=this.formatTarget(i),s=this.getExpiration(o);this.expirations.delete(o),this.events.emit(It_deleted,{target:o,expiration:s})}},this.on=(i,o)=>{this.events.on(i,o)},this.once=(i,o)=>{this.events.once(i,o)},this.off=(i,o)=>{this.events.off(i,o)},this.removeListener=(i,o)=>{this.events.removeListener(i,o)},this.logger=xe.generateChildLogger(t,this.name)}get context(){return xe.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if("string"==typeof e)return function yd(r){return oa("topic",r)}(e);if("number"==typeof e)return function gd(r){return oa("id",r)}(e);const{message:t}=q("UNKNOWN_TYPE","Target type: "+typeof e);throw new Error(t)}setExpirations(e){var t=this;return I(function*(){yield t.core.storage.setItem(t.storageKey,e)})()}getExpirations(){var e=this;return I(function*(){return yield e.core.storage.getItem(e.storageKey)})()}persist(){var e=this;return I(function*(){yield e.setExpirations(e.values),e.events.emit(It_sync)})()}restore(){var e=this;return I(function*(){try{const t=yield e.getExpirations();if(typeof t>"u"||!t.length)return;if(e.expirations.size){const{message:n}=q("RESTORE_WILL_OVERRIDE",e.name);throw e.logger.error(n),new Error(n)}e.cached=t,e.logger.debug(`Successfully Restored expirations for ${e.name}`),e.logger.trace({type:"method",method:"restore",expirations:e.values})}catch(t){e.logger.debug(`Failed to Restore expirations for ${e.name}`),e.logger.error(t)}})()}getExpiration(e){const t=this.expirations.get(e);if(!t){const{message:n}=q("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(n),new Error(n)}return t}checkExpiry(e,t){const{expiry:n}=t;Q.toMiliseconds(n)-Date.now()<=0&&this.expire(e,t)}expire(e,t){this.expirations.delete(e),this.events.emit(It_expired,{target:e,expiration:t})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,t)=>this.checkExpiry(t,e))}registerEventListeners(){this.core.heartbeat.on(xr.HEARTBEAT_EVENTS.pulse,()=>this.checkExpirations()),this.events.on(It_created,e=>{const t=It_created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}),this.events.on(It_expired,e=>{const t=It_expired;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}),this.events.on(It_deleted,e=>{const t=It_deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=q("NOT_INITIALIZED",this.name);throw new Error(e)}}}var a_=Object.defineProperty,rc=Object.getOwnPropertySymbols,c_=Object.prototype.hasOwnProperty,u_=Object.prototype.propertyIsEnumerable,nc=(r,e,t)=>e in r?a_(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,ic=(r,e)=>{for(var t in e||(e={}))c_.call(e,t)&&nc(r,t,e[t]);if(rc)for(var t of rc(e))u_.call(e,t)&&nc(r,t,e[t]);return r};class Vi extends jl{constructor(e){super(e),this.protocol="wc",this.version=2,this.name=$i,this.events=new ct.exports.EventEmitter,this.initialized=!1,this.on=(n,i)=>this.events.on(n,i),this.once=(n,i)=>this.events.once(n,i),this.off=(n,i)=>this.events.off(n,i),this.removeListener=(n,i)=>this.events.removeListener(n,i),this.projectId=e?.projectId,this.relayUrl=e?.relayUrl||Ga;const t=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:Fe(xe.getDefaultLoggerOptions({level:e?.logger||y1_logger}));this.logger=xe.generateChildLogger(t,this.name),this.heartbeat=new xr.HeartBeat,this.crypto=new z1(this,this.logger,e?.keychain),this.history=new o_(this,this.logger),this.expirer=new s_(this,this.logger),this.storage=null!=e&&e.storage?e.storage:new pu(ic(ic({},g1),e?.storageOptions)),this.relayer=new e_({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new i_(this,this.logger)}static init(e){return I(function*(){const t=new Vi(e);return yield t.initialize(),t})()}get context(){return xe.getLoggerContext(this.logger)}start(){var e=this;return I(function*(){e.initialized||(yield e.initialize())})()}initialize(){var e=this;return I(function*(){e.logger.trace("Initialized");try{yield e.crypto.init(),yield e.history.init(),yield e.expirer.init(),yield e.relayer.init(),yield e.heartbeat.init(),yield e.pairing.init(),e.initialized=!0,e.logger.info("Core Initialization Success")}catch(t){throw e.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,t),e.logger.error(t.message),t}})()}}const l_=Vi,qi="wc@2:client:",Gi_name="client",Gi_logger="error",Pn=Q.SEVEN_DAYS,Yr={wc_sessionPropose:{req:{ttl:Q.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:Q.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:Q.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:Q.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:Q.ONE_DAY,prompt:!1,tag:1104},res:{ttl:Q.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:Q.ONE_DAY,prompt:!1,tag:1106},res:{ttl:Q.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:Q.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:Q.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:Q.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:Q.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:Q.ONE_DAY,prompt:!1,tag:1112},res:{ttl:Q.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:Q.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:Q.THIRTY_SECONDS,prompt:!1,tag:1115}}},Wi={min:Q.FIVE_MINUTES,max:Q.SEVEN_DAYS};var y_=Object.defineProperty,g_=Object.defineProperties,__=Object.getOwnPropertyDescriptors,cc=Object.getOwnPropertySymbols,v_=Object.prototype.hasOwnProperty,m_=Object.prototype.propertyIsEnumerable,uc=(r,e,t)=>e in r?y_(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Pt=(r,e)=>{for(var t in e||(e={}))v_.call(e,t)&&uc(r,t,e[t]);if(cc)for(var t of cc(e))m_.call(e,t)&&uc(r,t,e[t]);return r},Yi=(r,e)=>g_(r,__(e));class b_ extends class Bl{constructor(e){this.client=e}}{constructor(e){var t;super(e),t=this,this.name="engine",this.events=new ct.exports,this.initialized=!1,this.ignoredPayloadTypes=[1],this.init=I(function*(){t.initialized||(yield t.cleanup(),t.registerRelayerEvents(),t.registerExpirerEvents(),t.client.core.pairing.register({methods:Object.keys(Yr)}),t.initialized=!0)}),this.connect=function(){var n=I(function*(i){t.isInitialized();const o=Yi(Pt({},i),{requiredNamespaces:i.requiredNamespaces||{},optionalNamespaces:i.optionalNamespaces||{}});yield t.isValidConnect(o);const{pairingTopic:s,requiredNamespaces:a,optionalNamespaces:h,sessionProperties:l,relays:f}=o;let v,_=s,b=!1;if(_&&(b=t.client.core.pairing.pairings.get(_).active),!_||!b){const{topic:O,uri:w}=yield t.client.core.pairing.create();_=O,v=w}const m=yield t.client.core.crypto.generateKeyPair(),T=Pt({requiredNamespaces:a,optionalNamespaces:h,relays:f??[{protocol:"irn"}],proposer:{publicKey:m,metadata:t.client.metadata}},l&&{sessionProperties:l}),{reject:j,resolve:$,done:P}=sr();if(t.events.once(ke("session_connect"),function(){var O=I(function*({error:w,session:c}){if(w)j(w);else if(c){c.self.publicKey=m;const p=Yi(Pt({},c),{requiredNamespaces:c.requiredNamespaces,optionalNamespaces:c.optionalNamespaces});yield t.client.session.set(c.topic,p),yield t.setExpiry(c.topic,c.expiry),_&&(yield t.client.core.pairing.updateMetadata({topic:_,metadata:c.peer.metadata})),$(p)}});return function(w){return O.apply(this,arguments)}}()),!_){const{message:O}=q("NO_MATCHING_KEY",`connect() pairing topic: ${_}`);throw new Error(O)}const A=yield t.sendRequest(_,"wc_sessionPropose",T),g=Ct(Q.FIVE_MINUTES);return yield t.setProposal(A,Pt({id:A,expiry:g},T)),{uri:v,approval:P}});return function(i){return n.apply(this,arguments)}}(),this.pair=function(){var n=I(function*(i){return t.isInitialized(),yield t.client.core.pairing.pair(i)});return function(i){return n.apply(this,arguments)}}(),this.approve=function(){var n=I(function*(i){t.isInitialized(),yield t.isValidApprove(i);const{id:o,relayProtocol:s,namespaces:a,sessionProperties:h}=i,l=t.client.proposal.get(o);let{pairingTopic:f,proposer:_,requiredNamespaces:v,optionalNamespaces:b}=l;$r(v)||(v=function Ad(r,e){const t=mn(r,e);if(t)throw new Error(t.message);const n={};for(const[i,o]of Object.entries(r))n[i]={methods:o.methods,events:o.events,chains:o.accounts.map(s=>`${s.split(":")[0]}:${s.split(":")[1]}`)};return n}(a,"approve()"));const m=yield t.client.core.crypto.generateKeyPair(),T=_.publicKey,j=yield t.client.core.crypto.generateSharedKey(m,T);f&&o&&(yield t.client.core.pairing.updateMetadata({topic:f,metadata:_.metadata}),yield t.sendResult(o,f,{relay:{protocol:s??"irn"},responderPublicKey:m}),yield t.client.proposal.delete(o,He("USER_DISCONNECTED")),yield t.client.core.pairing.activate({topic:f}));const $=Pt({relay:{protocol:s??"irn"},namespaces:a,requiredNamespaces:v,optionalNamespaces:b,controller:{publicKey:m,metadata:t.client.metadata},expiry:Ct(Pn)},h&&{sessionProperties:h});yield t.client.core.relayer.subscribe(j);const P=yield t.sendRequest(j,"wc_sessionSettle",$),{done:A,resolve:g,reject:O}=sr();t.events.once(ke("session_approve",P),({error:c})=>{c?O(c):g(t.client.session.get(j))});const w=Yi(Pt({},$),{topic:j,acknowledged:!1,self:$.controller,peer:{publicKey:_.publicKey,metadata:_.metadata},controller:m});return yield t.client.session.set(j,w),yield t.setExpiry(j,Ct(Pn)),{topic:j,acknowledged:A}});return function(i){return n.apply(this,arguments)}}(),this.reject=function(){var n=I(function*(i){t.isInitialized(),yield t.isValidReject(i);const{id:o,reason:s}=i,{pairingTopic:a}=t.client.proposal.get(o);a&&(yield t.sendError(o,a,s),yield t.client.proposal.delete(o,He("USER_DISCONNECTED")))});return function(i){return n.apply(this,arguments)}}(),this.update=function(){var n=I(function*(i){t.isInitialized(),yield t.isValidUpdate(i);const{topic:o,namespaces:s}=i,a=yield t.sendRequest(o,"wc_sessionUpdate",{namespaces:s}),{done:h,resolve:l,reject:f}=sr();return t.events.once(ke("session_update",a),({error:_})=>{_?f(_):l()}),yield t.client.session.update(o,{namespaces:s}),{acknowledged:h}});return function(i){return n.apply(this,arguments)}}(),this.extend=function(){var n=I(function*(i){t.isInitialized(),yield t.isValidExtend(i);const{topic:o}=i,s=yield t.sendRequest(o,"wc_sessionExtend",{}),{done:a,resolve:h,reject:l}=sr();return t.events.once(ke("session_extend",s),({error:f})=>{f?l(f):h()}),yield t.setExpiry(o,Ct(Pn)),{acknowledged:a}});return function(i){return n.apply(this,arguments)}}(),this.request=function(){var n=I(function*(i){t.isInitialized(),yield t.isValidRequest(i);const{chainId:o,request:s,topic:a,expiry:h}=i,l=yield t.sendRequest(a,"wc_sessionRequest",{request:s,chainId:o},h),{done:f,resolve:_,reject:v}=sr(h);return t.events.once(ke("session_request",l),({error:b,result:m})=>{b?v(b):_(m)}),t.client.events.emit("session_request_sent",{topic:a,request:s,chainId:o}),yield f()});return function(i){return n.apply(this,arguments)}}(),this.respond=function(){var n=I(function*(i){t.isInitialized(),yield t.isValidRespond(i);const{topic:o,response:s}=i,{id:a}=s;Ht(s)?yield t.sendResult(a,o,s.result):At(s)&&(yield t.sendError(a,o,s.error)),t.deletePendingSessionRequest(i.response.id,{message:"fulfilled",code:0})});return function(i){return n.apply(this,arguments)}}(),this.ping=function(){var n=I(function*(i){t.isInitialized(),yield t.isValidPing(i);const{topic:o}=i;if(t.client.session.keys.includes(o)){const s=yield t.sendRequest(o,"wc_sessionPing",{}),{done:a,resolve:h,reject:l}=sr();t.events.once(ke("session_ping",s),({error:f})=>{f?l(f):h()}),yield a()}else t.client.core.pairing.pairings.keys.includes(o)&&(yield t.client.core.pairing.ping({topic:o}))});return function(i){return n.apply(this,arguments)}}(),this.emit=function(){var n=I(function*(i){t.isInitialized(),yield t.isValidEmit(i);const{topic:o,event:s,chainId:a}=i;yield t.sendRequest(o,"wc_sessionEvent",{event:s,chainId:a})});return function(i){return n.apply(this,arguments)}}(),this.disconnect=function(){var n=I(function*(i){t.isInitialized(),yield t.isValidDisconnect(i);const{topic:o}=i;t.client.session.keys.includes(o)?(yield t.sendRequest(o,"wc_sessionDelete",He("USER_DISCONNECTED")),yield t.deleteSession(o)):yield t.client.core.pairing.disconnect({topic:o})});return function(i){return n.apply(this,arguments)}}(),this.find=n=>(this.isInitialized(),this.client.session.getAll().filter(i=>function Td(r,e){const{requiredNamespaces:t}=e,n=Object.keys(r.namespaces),i=Object.keys(t);let o=!0;return!!qt(i,n)&&(n.forEach(s=>{const{accounts:a,methods:h,events:l}=r.namespaces[s],f=Hr(a),_=t[s];qt(bi(s,_),f)&&qt(_.methods,h)&&qt(_.events,l)||(o=!1)}),o)}(i,n))),this.getPendingSessionRequests=()=>(this.isInitialized(),this.client.pendingRequest.getAll()),this.deleteSession=function(){var n=I(function*(i,o){const{self:s}=t.client.session.get(i);yield t.client.core.relayer.unsubscribe(i),yield Promise.all([t.client.session.delete(i,He("USER_DISCONNECTED")),t.client.core.crypto.deleteKeyPair(s.publicKey),t.client.core.crypto.deleteSymKey(i),o?Promise.resolve():t.client.core.expirer.del(i)])});return function(i,o){return n.apply(this,arguments)}}(),this.deleteProposal=function(){var n=I(function*(i,o){yield Promise.all([t.client.proposal.delete(i,He("USER_DISCONNECTED")),o?Promise.resolve():t.client.core.expirer.del(i)])});return function(i,o){return n.apply(this,arguments)}}(),this.deletePendingSessionRequest=function(){var n=I(function*(i,o,s=!1){yield Promise.all([t.client.pendingRequest.delete(i,o),s?Promise.resolve():t.client.core.expirer.del(i)])});return function(i,o){return n.apply(this,arguments)}}(),this.setExpiry=function(){var n=I(function*(i,o){t.client.session.keys.includes(i)&&(yield t.client.session.update(i,{expiry:o})),t.client.core.expirer.set(i,o)});return function(i,o){return n.apply(this,arguments)}}(),this.setProposal=function(){var n=I(function*(i,o){yield t.client.proposal.set(i,o),t.client.core.expirer.set(i,o.expiry)});return function(i,o){return n.apply(this,arguments)}}(),this.setPendingSessionRequest=function(){var n=I(function*(i){const o=Yr.wc_sessionRequest.req.ttl,{id:s,topic:a,params:h}=i;yield t.client.pendingRequest.set(s,{id:s,topic:a,params:h}),o&&t.client.core.expirer.set(s,Ct(o))});return function(i){return n.apply(this,arguments)}}(),this.sendRequest=function(){var n=I(function*(i,o,s,a){const h=bn(o,s),l=yield t.client.core.crypto.encode(i,h),f=Yr[o].req;return a&&(f.ttl=a),t.client.core.history.set(i,h),t.client.core.relayer.publish(i,l,f),h.id});return function(i,o,s,a){return n.apply(this,arguments)}}(),this.sendResult=function(){var n=I(function*(i,o,s){const a=Ui(i,s),h=yield t.client.core.crypto.encode(o,a),l=yield t.client.core.history.get(o,i);t.client.core.relayer.publish(o,h,Yr[l.request.method].res),yield t.client.core.history.resolve(a)});return function(i,o,s){return n.apply(this,arguments)}}(),this.sendError=function(){var n=I(function*(i,o,s){const a=wn(i,s),h=yield t.client.core.crypto.encode(o,a),l=yield t.client.core.history.get(o,i);t.client.core.relayer.publish(o,h,Yr[l.request.method].res),yield t.client.core.history.resolve(a)});return function(i,o,s){return n.apply(this,arguments)}}(),this.cleanup=I(function*(){const n=[],i=[];t.client.session.getAll().forEach(o=>{Gt(o.expiry)&&n.push(o.topic)}),t.client.proposal.getAll().forEach(o=>{Gt(o.expiry)&&i.push(o.id)}),yield Promise.all([...n.map(o=>t.deleteSession(o)),...i.map(o=>t.deleteProposal(o))])}),this.onRelayEventRequest=n=>{const{topic:i,payload:o}=n,s=o.method;switch(s){case"wc_sessionPropose":return this.onSessionProposeRequest(i,o);case"wc_sessionSettle":return this.onSessionSettleRequest(i,o);case"wc_sessionUpdate":return this.onSessionUpdateRequest(i,o);case"wc_sessionExtend":return this.onSessionExtendRequest(i,o);case"wc_sessionPing":return this.onSessionPingRequest(i,o);case"wc_sessionDelete":return this.onSessionDeleteRequest(i,o);case"wc_sessionRequest":return this.onSessionRequest(i,o);case"wc_sessionEvent":return this.onSessionEventRequest(i,o);default:return this.client.logger.info(`Unsupported request method ${s}`)}},this.onRelayEventResponse=function(){var n=I(function*(i){const{topic:o,payload:s}=i,a=(yield t.client.core.history.get(o,s.id)).request.method;switch(a){case"wc_sessionPropose":return t.onSessionProposeResponse(o,s);case"wc_sessionSettle":return t.onSessionSettleResponse(o,s);case"wc_sessionUpdate":return t.onSessionUpdateResponse(o,s);case"wc_sessionExtend":return t.onSessionExtendResponse(o,s);case"wc_sessionPing":return t.onSessionPingResponse(o,s);case"wc_sessionRequest":return t.onSessionRequestResponse(o,s);default:return t.client.logger.info(`Unsupported response method ${a}`)}});return function(i){return n.apply(this,arguments)}}(),this.onSessionProposeRequest=function(){var n=I(function*(i,o){const{params:s,id:a}=o;try{t.isValidConnect(Pt({},o.params));const h=Ct(Q.FIVE_MINUTES),l=Pt({id:a,pairingTopic:i,expiry:h},s);yield t.setProposal(a,l),t.client.events.emit("session_proposal",{id:a,params:l})}catch(h){yield t.sendError(a,i,h),t.client.logger.error(h)}});return function(i,o){return n.apply(this,arguments)}}(),this.onSessionProposeResponse=function(){var n=I(function*(i,o){const{id:s}=o;if(Ht(o)){const{result:a}=o;t.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:a});const h=t.client.proposal.get(s);t.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:h});const l=h.proposer.publicKey;t.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:l});const f=a.responderPublicKey;t.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:f});const _=yield t.client.core.crypto.generateSharedKey(l,f);t.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:_});const v=yield t.client.core.relayer.subscribe(_);t.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:v}),yield t.client.core.pairing.activate({topic:i})}else At(o)&&(yield t.client.proposal.delete(s,He("USER_DISCONNECTED")),t.events.emit(ke("session_connect"),{error:o.error}))});return function(i,o){return n.apply(this,arguments)}}(),this.onSessionSettleRequest=function(){var n=I(function*(i,o){const{id:s,params:a}=o;try{t.isValidSessionSettleRequest(a);const{relay:h,controller:l,expiry:f,namespaces:_,requiredNamespaces:v,optionalNamespaces:b,sessionProperties:m}=o.params,T=Pt({topic:i,relay:h,expiry:f,namespaces:_,acknowledged:!0,requiredNamespaces:v,optionalNamespaces:b,controller:l.publicKey,self:{publicKey:"",metadata:t.client.metadata},peer:{publicKey:l.publicKey,metadata:l.metadata}},m&&{sessionProperties:m});yield t.sendResult(o.id,i,!0),t.events.emit(ke("session_connect"),{session:T})}catch(h){yield t.sendError(s,i,h),t.client.logger.error(h)}});return function(i,o){return n.apply(this,arguments)}}(),this.onSessionSettleResponse=function(){var n=I(function*(i,o){const{id:s}=o;Ht(o)?(yield t.client.session.update(i,{acknowledged:!0}),t.events.emit(ke("session_approve",s),{})):At(o)&&(yield t.client.session.delete(i,He("USER_DISCONNECTED")),t.events.emit(ke("session_approve",s),{error:o.error}))});return function(i,o){return n.apply(this,arguments)}}(),this.onSessionUpdateRequest=function(){var n=I(function*(i,o){const{params:s,id:a}=o;try{t.isValidUpdate(Pt({topic:i},s)),yield t.client.session.update(i,{namespaces:s.namespaces}),yield t.sendResult(a,i,!0),t.client.events.emit("session_update",{id:a,topic:i,params:s})}catch(h){yield t.sendError(a,i,h),t.client.logger.error(h)}});return function(i,o){return n.apply(this,arguments)}}(),this.onSessionUpdateResponse=(n,i)=>{const{id:o}=i;Ht(i)?this.events.emit(ke("session_update",o),{}):At(i)&&this.events.emit(ke("session_update",o),{error:i.error})},this.onSessionExtendRequest=function(){var n=I(function*(i,o){const{id:s}=o;try{t.isValidExtend({topic:i}),yield t.setExpiry(i,Ct(Pn)),yield t.sendResult(s,i,!0),t.client.events.emit("session_extend",{id:s,topic:i})}catch(a){yield t.sendError(s,i,a),t.client.logger.error(a)}});return function(i,o){return n.apply(this,arguments)}}(),this.onSessionExtendResponse=(n,i)=>{const{id:o}=i;Ht(i)?this.events.emit(ke("session_extend",o),{}):At(i)&&this.events.emit(ke("session_extend",o),{error:i.error})},this.onSessionPingRequest=function(){var n=I(function*(i,o){const{id:s}=o;try{t.isValidPing({topic:i}),yield t.sendResult(s,i,!0),t.client.events.emit("session_ping",{id:s,topic:i})}catch(a){yield t.sendError(s,i,a),t.client.logger.error(a)}});return function(i,o){return n.apply(this,arguments)}}(),this.onSessionPingResponse=(n,i)=>{const{id:o}=i;setTimeout(()=>{Ht(i)?this.events.emit(ke("session_ping",o),{}):At(i)&&this.events.emit(ke("session_ping",o),{error:i.error})},500)},this.onSessionDeleteRequest=function(){var n=I(function*(i,o){const{id:s}=o;try{t.isValidDisconnect({topic:i,reason:o.params}),t.client.core.relayer.once(ot_publish,I(function*(){yield t.deleteSession(i)})),yield t.sendResult(s,i,!0),t.client.events.emit("session_delete",{id:s,topic:i})}catch(a){yield t.sendError(s,i,a),t.client.logger.error(a)}});return function(i,o){return n.apply(this,arguments)}}(),this.onSessionRequest=function(){var n=I(function*(i,o){const{id:s,params:a}=o;try{t.isValidRequest(Pt({topic:i},a)),yield t.setPendingSessionRequest({id:s,topic:i,params:a}),t.client.events.emit("session_request",{id:s,topic:i,params:a})}catch(h){yield t.sendError(s,i,h),t.client.logger.error(h)}});return function(i,o){return n.apply(this,arguments)}}(),this.onSessionRequestResponse=(n,i)=>{const{id:o}=i;Ht(i)?this.events.emit(ke("session_request",o),{result:i.result}):At(i)&&this.events.emit(ke("session_request",o),{error:i.error})},this.onSessionEventRequest=function(){var n=I(function*(i,o){const{id:s,params:a}=o;try{t.isValidEmit(Pt({topic:i},a)),t.client.events.emit("session_event",{id:s,topic:i,params:a})}catch(h){yield t.sendError(s,i,h),t.client.logger.error(h)}});return function(i,o){return n.apply(this,arguments)}}(),this.isValidConnect=function(){var n=I(function*(i){if(!bt(i)){const{message:f}=q("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(i)}`);throw new Error(f)}const{pairingTopic:o,requiredNamespaces:s,optionalNamespaces:a,sessionProperties:h,relays:l}=i;if(ft(o)||(yield t.isValidPairingTopic(o)),!function Bd(r,e){let t=!1;return e&&!r?t=!0:r&&Kr(r)&&r.length&&r.forEach(n=>{t=ha(n)}),t}(l,!0)){const{message:f}=q("MISSING_OR_INVALID",`connect() relays: ${l}`);throw new Error(f)}!ft(s)&&0!==$r(s)&&t.validateNamespaces(s,"requiredNamespaces"),!ft(a)&&0!==$r(a)&&t.validateNamespaces(a,"optionalNamespaces"),ft(h)||t.validateSessionProps(h,"sessionProperties")});return function(i){return n.apply(this,arguments)}}(),this.validateNamespaces=(n,i)=>{const o=function $d(r,e,t){let n=null;if(r&&$r(r)){const i=la(r,e);i&&(n=i);const o=kd(r,e);o&&(n=o)}else n=q("MISSING_OR_INVALID",`${e}, ${t} should be an object with data`);return n}(n,"connect()",i);if(o)throw new Error(o.message)},this.isValidApprove=function(){var n=I(function*(i){if(!bt(i))throw new Error(q("MISSING_OR_INVALID",`approve() params: ${i}`).message);const{id:o,namespaces:s,relayProtocol:a,sessionProperties:h}=i;yield t.isValidProposalId(o);const l=t.client.proposal.get(o),f=mn(s,"approve()");if(f)throw new Error(f.message);const _=Ri(l.requiredNamespaces,s,"approve()","requiredNamespaces");if(_)throw new Error(_.message);if(!We(a,!0)){const{message:v}=q("MISSING_OR_INVALID",`approve() relayProtocol: ${a}`);throw new Error(v)}if(Object.keys(s).length>Object.keys(l.requiredNamespaces).length){const v=Object.keys(l.optionalNamespaces).filter(T=>s[T]),b={};for(const T in l.optionalNamespaces)v.includes(T)&&(b[T]=l.optionalNamespaces[T]);const m=Ri(b,s,"approve()","optionalNamespaces");if(m)throw new Error(m.message)}ft(h)||t.validateSessionProps(h,"sessionProperties")});return function(i){return n.apply(this,arguments)}}(),this.isValidReject=function(){var n=I(function*(i){if(!bt(i)){const{message:a}=q("MISSING_OR_INVALID",`reject() params: ${i}`);throw new Error(a)}const{id:o,reason:s}=i;if(yield t.isValidProposalId(o),!function qd(r){return!!(r&&"object"==typeof r&&r.code&&Ai(r.code,!1)&&r.message&&We(r.message,!1))}(s)){const{message:a}=q("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(s)}`);throw new Error(a)}});return function(i){return n.apply(this,arguments)}}(),this.isValidSessionSettleRequest=n=>{if(!bt(n)){const{message:f}=q("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${n}`);throw new Error(f)}const{relay:i,controller:o,namespaces:s,expiry:a}=n;if(!ha(i)){const{message:f}=q("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(f)}const h=function Md(r,e){let t=null;return We(r?.publicKey,!1)||(t=q("MISSING_OR_INVALID",`${e} controller public key should be a string`)),t}(o,"onSessionSettleRequest()");if(h)throw new Error(h.message);const l=mn(s,"onSessionSettleRequest()");if(l)throw new Error(l.message);if(Gt(a)){const{message:f}=q("EXPIRED","onSessionSettleRequest()");throw new Error(f)}},this.isValidUpdate=function(){var n=I(function*(i){if(!bt(i)){const{message:f}=q("MISSING_OR_INVALID",`update() params: ${i}`);throw new Error(f)}const{topic:o,namespaces:s}=i;yield t.isValidSessionTopic(o);const a=t.client.session.get(o),h=mn(s,"update()");if(h)throw new Error(h.message);const l=Ri(a.requiredNamespaces,s,"update()","requiredNamespaces");if(l)throw new Error(l.message)});return function(i){return n.apply(this,arguments)}}(),this.isValidExtend=function(){var n=I(function*(i){if(!bt(i)){const{message:s}=q("MISSING_OR_INVALID",`extend() params: ${i}`);throw new Error(s)}const{topic:o}=i;yield t.isValidSessionTopic(o)});return function(i){return n.apply(this,arguments)}}(),this.isValidRequest=function(){var n=I(function*(i){if(!bt(i)){const{message:f}=q("MISSING_OR_INVALID",`request() params: ${i}`);throw new Error(f)}const{topic:o,request:s,chainId:a,expiry:h}=i;yield t.isValidSessionTopic(o);const{namespaces:l}=t.client.session.get(o);if(!fa(l,a)){const{message:f}=q("MISSING_OR_INVALID",`request() chainId: ${a}`);throw new Error(f)}if(!function Gd(r){return!(ft(r)||!We(r.method,!1))}(s)){const{message:f}=q("MISSING_OR_INVALID",`request() ${JSON.stringify(s)}`);throw new Error(f)}if(!Jd(l,a,s.method)){const{message:f}=q("MISSING_OR_INVALID",`request() method: ${s.method}`);throw new Error(f)}if(h&&!function Zd(r,e){return Ai(r,!1)&&r<=e.max&&r>=e.min}(h,Wi)){const{message:f}=q("MISSING_OR_INVALID",`request() expiry: ${h}. Expiry must be a number (in seconds) between ${Wi.min} and ${Wi.max}`);throw new Error(f)}});return function(i){return n.apply(this,arguments)}}(),this.isValidRespond=function(){var n=I(function*(i){if(!bt(i)){const{message:a}=q("MISSING_OR_INVALID",`respond() params: ${i}`);throw new Error(a)}const{topic:o,response:s}=i;if(yield t.isValidSessionTopic(o),!function Wd(r){return!(ft(r)||ft(r.result)&&ft(r.error)||!Ai(r.id,!1)||!We(r.jsonrpc,!1))}(s)){const{message:a}=q("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(s)}`);throw new Error(a)}});return function(i){return n.apply(this,arguments)}}(),this.isValidPing=function(){var n=I(function*(i){if(!bt(i)){const{message:s}=q("MISSING_OR_INVALID",`ping() params: ${i}`);throw new Error(s)}const{topic:o}=i;yield t.isValidSessionOrPairingTopic(o)});return function(i){return n.apply(this,arguments)}}(),this.isValidEmit=function(){var n=I(function*(i){if(!bt(i)){const{message:l}=q("MISSING_OR_INVALID",`emit() params: ${i}`);throw new Error(l)}const{topic:o,event:s,chainId:a}=i;yield t.isValidSessionTopic(o);const{namespaces:h}=t.client.session.get(o);if(!fa(h,a)){const{message:l}=q("MISSING_OR_INVALID",`emit() chainId: ${a}`);throw new Error(l)}if(!function Yd(r){return!(ft(r)||!We(r.name,!1))}(s)){const{message:l}=q("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(s)}`);throw new Error(l)}if(!Xd(h,a,s.name)){const{message:l}=q("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(s)}`);throw new Error(l)}});return function(i){return n.apply(this,arguments)}}(),this.isValidDisconnect=function(){var n=I(function*(i){if(!bt(i)){const{message:s}=q("MISSING_OR_INVALID",`disconnect() params: ${i}`);throw new Error(s)}const{topic:o}=i;yield t.isValidSessionOrPairingTopic(o)});return function(i){return n.apply(this,arguments)}}(),this.validateSessionProps=(n,i)=>{Object.values(n).forEach(o=>{if(!We(o,!1)){const{message:s}=q("MISSING_OR_INVALID",`${i} must be in Record format. Received: ${JSON.stringify(o)}`);throw new Error(s)}})}}isInitialized(){if(!this.initialized){const{message:e}=q("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){var e=this;this.client.core.relayer.on(ot_message,function(){var t=I(function*(n){const{topic:i,message:o}=n;if(e.ignoredPayloadTypes.includes(e.client.core.crypto.getPayloadType(o)))return;const s=yield e.client.core.crypto.decode(i,o);Mi(s)?(e.client.core.history.set(i,s),e.onRelayEventRequest({topic:i,payload:s})):Di(s)&&(yield e.client.core.history.resolve(s),e.onRelayEventResponse({topic:i,payload:s}))});return function(n){return t.apply(this,arguments)}}())}registerExpirerEvents(){var e=this;this.client.core.expirer.on(It_expired,function(){var t=I(function*(n){const{topic:i,id:o}=sa(n.target);if(o&&e.client.pendingRequest.keys.includes(o))return yield e.deletePendingSessionRequest(o,q("EXPIRED"),!0);i?e.client.session.keys.includes(i)&&(yield e.deleteSession(i,!0),e.client.events.emit("session_expire",{topic:i})):o&&(yield e.deleteProposal(o,!0),e.client.events.emit("proposal_expire",{id:o}))});return function(n){return t.apply(this,arguments)}}())}isValidPairingTopic(e){if(!We(e,!1)){const{message:t}=q("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(t)}if(!this.client.core.pairing.pairings.keys.includes(e)){const{message:t}=q("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if(Gt(this.client.core.pairing.pairings.get(e).expiry)){const{message:t}=q("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}}isValidSessionTopic(e){var t=this;return I(function*(){if(!We(e,!1)){const{message:n}=q("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(n)}if(!t.client.session.keys.includes(e)){const{message:n}=q("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(n)}if(Gt(t.client.session.get(e).expiry)){yield t.deleteSession(e);const{message:n}=q("EXPIRED",`session topic: ${e}`);throw new Error(n)}})()}isValidSessionOrPairingTopic(e){var t=this;return I(function*(){if(t.client.session.keys.includes(e))yield t.isValidSessionTopic(e);else{if(!t.client.core.pairing.pairings.keys.includes(e)){if(We(e,!1)){const{message:n}=q("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(n)}{const{message:n}=q("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(n)}}t.isValidPairingTopic(e)}})()}isValidProposalId(e){var t=this;return I(function*(){if(!function Vd(r){return"number"==typeof r}(e)){const{message:n}=q("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(n)}if(!t.client.proposal.keys.includes(e)){const{message:n}=q("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(n)}if(Gt(t.client.proposal.get(e).expiry)){yield t.deleteProposal(e);const{message:n}=q("EXPIRED",`proposal id: ${e}`);throw new Error(n)}})()}}class w_ extends In{constructor(e,t){super(e,t,"proposal",qi),this.core=e,this.logger=t}}class E_ extends In{constructor(e,t){super(e,t,"session",qi),this.core=e,this.logger=t}}class S_ extends In{constructor(e,t){super(e,t,"request",qi),this.core=e,this.logger=t}}class Ji extends class $l{constructor(e){this.opts=e,this.protocol="wc",this.version=2}}{constructor(e){var t;super(e),t=this,this.protocol="wc",this.version=2,this.name=Gi_name,this.events=new ct.exports.EventEmitter,this.on=(i,o)=>this.events.on(i,o),this.once=(i,o)=>this.events.once(i,o),this.off=(i,o)=>this.events.off(i,o),this.removeListener=(i,o)=>this.events.removeListener(i,o),this.removeAllListeners=i=>this.events.removeAllListeners(i),this.connect=function(){var i=I(function*(o){try{return yield t.engine.connect(o)}catch(s){throw t.logger.error(s.message),s}});return function(o){return i.apply(this,arguments)}}(),this.pair=function(){var i=I(function*(o){try{return yield t.engine.pair(o)}catch(s){throw t.logger.error(s.message),s}});return function(o){return i.apply(this,arguments)}}(),this.approve=function(){var i=I(function*(o){try{return yield t.engine.approve(o)}catch(s){throw t.logger.error(s.message),s}});return function(o){return i.apply(this,arguments)}}(),this.reject=function(){var i=I(function*(o){try{return yield t.engine.reject(o)}catch(s){throw t.logger.error(s.message),s}});return function(o){return i.apply(this,arguments)}}(),this.update=function(){var i=I(function*(o){try{return yield t.engine.update(o)}catch(s){throw t.logger.error(s.message),s}});return function(o){return i.apply(this,arguments)}}(),this.extend=function(){var i=I(function*(o){try{return yield t.engine.extend(o)}catch(s){throw t.logger.error(s.message),s}});return function(o){return i.apply(this,arguments)}}(),this.request=function(){var i=I(function*(o){try{return yield t.engine.request(o)}catch(s){throw t.logger.error(s.message),s}});return function(o){return i.apply(this,arguments)}}(),this.respond=function(){var i=I(function*(o){try{return yield t.engine.respond(o)}catch(s){throw t.logger.error(s.message),s}});return function(o){return i.apply(this,arguments)}}(),this.ping=function(){var i=I(function*(o){try{return yield t.engine.ping(o)}catch(s){throw t.logger.error(s.message),s}});return function(o){return i.apply(this,arguments)}}(),this.emit=function(){var i=I(function*(o){try{return yield t.engine.emit(o)}catch(s){throw t.logger.error(s.message),s}});return function(o){return i.apply(this,arguments)}}(),this.disconnect=function(){var i=I(function*(o){try{return yield t.engine.disconnect(o)}catch(s){throw t.logger.error(s.message),s}});return function(o){return i.apply(this,arguments)}}(),this.find=i=>{try{return this.engine.find(i)}catch(o){throw this.logger.error(o.message),o}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(i){throw this.logger.error(i.message),i}},this.name=e?.name||Gi_name,this.metadata=e?.metadata||function ld(){return Ks()||{name:"",description:"",url:"",icons:[""]}}();const n=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:Fe(xe.getDefaultLoggerOptions({level:e?.logger||Gi_logger}));this.core=e?.core||new l_(e),this.logger=xe.generateChildLogger(n,this.name),this.session=new E_(this.core,this.logger),this.proposal=new w_(this.core,this.logger),this.pendingRequest=new S_(this.core,this.logger),this.engine=new b_(this)}static init(e){return I(function*(){const t=new Ji(e);return yield t.initialize(),t})()}get context(){return xe.getLoggerContext(this.logger)}get pairing(){return this.core.pairing.pairings}initialize(){var e=this;return I(function*(){e.logger.trace("Initialized");try{yield e.core.start(),yield e.session.init(),yield e.proposal.init(),yield e.pendingRequest.init(),yield e.engine.init(),e.logger.info("SignClient Initialization Success")}catch(t){throw e.logger.info("SignClient Initialization Failure"),e.logger.error(t.message),t}})()}}var Xi={exports:{}};!function(r,e){var o,t=typeof self<"u"?self:dt,n=function(){function o(){this.fetch=!1,this.DOMException=t.DOMException}return o.prototype=t,new o}();o=n,function(s){var a_searchParams="URLSearchParams"in o,a_iterable="Symbol"in o&&"iterator"in Symbol,a_blob="FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch{return!1}}(),a_formData="FormData"in o,a_arrayBuffer="ArrayBuffer"in o;if(a_arrayBuffer)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],f=ArrayBuffer.isView||function(d){return d&&l.indexOf(Object.prototype.toString.call(d))>-1};function _(d){if("string"!=typeof d&&(d=String(d)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(d))throw new TypeError("Invalid character in header field name");return d.toLowerCase()}function v(d){return"string"!=typeof d&&(d=String(d)),d}function b(d){var S={next:function(){var M=d.shift();return{done:void 0===M,value:M}}};return a_iterable&&(S[Symbol.iterator]=function(){return S}),S}function m(d){this.map={},d instanceof m?d.forEach(function(S,M){this.append(M,S)},this):Array.isArray(d)?d.forEach(function(S){this.append(S[0],S[1])},this):d&&Object.getOwnPropertyNames(d).forEach(function(S){this.append(S,d[S])},this)}function T(d){if(d.bodyUsed)return Promise.reject(new TypeError("Already read"));d.bodyUsed=!0}function j(d){return new Promise(function(S,M){d.onload=function(){S(d.result)},d.onerror=function(){M(d.error)}})}function $(d){var S=new FileReader,M=j(S);return S.readAsArrayBuffer(d),M}function g(d){if(d.slice)return d.slice(0);var S=new Uint8Array(d.byteLength);return S.set(new Uint8Array(d)),S.buffer}function O(){return this.bodyUsed=!1,this._initBody=function(d){this._bodyInit=d,d?"string"==typeof d?this._bodyText=d:a_blob&&Blob.prototype.isPrototypeOf(d)?this._bodyBlob=d:a_formData&&FormData.prototype.isPrototypeOf(d)?this._bodyFormData=d:a_searchParams&&URLSearchParams.prototype.isPrototypeOf(d)?this._bodyText=d.toString():a_arrayBuffer&&a_blob&&function h(d){return d&&DataView.prototype.isPrototypeOf(d)}(d)?(this._bodyArrayBuffer=g(d.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a_arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(d)||f(d))?this._bodyArrayBuffer=g(d):this._bodyText=d=Object.prototype.toString.call(d):this._bodyText="",this.headers.get("content-type")||("string"==typeof d?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):a_searchParams&&URLSearchParams.prototype.isPrototypeOf(d)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a_blob&&(this.blob=function(){var d=T(this);if(d)return d;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?T(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then($)}),this.text=function(){var d=T(this);if(d)return d;if(this._bodyBlob)return function P(d){var S=new FileReader,M=j(S);return S.readAsText(d),M}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function A(d){for(var S=new Uint8Array(d),M=new Array(S.length),D=0;D-1?S:d}(S.method||this.method||"GET"),this.mode=S.mode||this.mode||null,this.signal=S.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&M)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(M)}function k(d){var S=new FormData;return d.trim().split("&").forEach(function(M){if(M){var D=M.split("="),C=D.shift().replace(/\+/g," "),L=D.join("=").replace(/\+/g," ");S.append(decodeURIComponent(C),decodeURIComponent(L))}}),S}function K(d){var S=new m;return d.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(D){var C=D.split(":"),L=C.shift().trim();if(L){var z=C.join(":").trim();S.append(L,z)}}),S}function G(d,S){S||(S={}),this.type="default",this.status=void 0===S.status?200:S.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in S?S.statusText:"OK",this.headers=new m(S.headers),this.url=S.url||"",this._initBody(d)}p.prototype.clone=function(){return new p(this,{body:this._bodyInit})},O.call(p.prototype),O.call(G.prototype),G.prototype.clone=function(){return new G(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},G.error=function(){var d=new G(null,{status:0,statusText:""});return d.type="error",d};var X=[301,302,303,307,308];G.redirect=function(d,S){if(-1===X.indexOf(S))throw new RangeError("Invalid status code");return new G(null,{status:S,headers:{location:d}})},s.DOMException=o.DOMException;try{new s.DOMException}catch{s.DOMException=function(d,S){this.message=d,this.name=S;var M=Error(d);this.stack=M.stack},s.DOMException.prototype=Object.create(Error.prototype),s.DOMException.prototype.constructor=s.DOMException}function Z(d,S){return new Promise(function(M,D){var C=new p(d,S);if(C.signal&&C.signal.aborted)return D(new s.DOMException("Aborted","AbortError"));var L=new XMLHttpRequest;function z(){L.abort()}L.onload=function(){var H={status:L.status,statusText:L.statusText,headers:K(L.getAllResponseHeaders()||"")};H.url="responseURL"in L?L.responseURL:H.headers.get("X-Request-URL"),M(new G("response"in L?L.response:L.responseText,H))},L.onerror=function(){D(new TypeError("Network request failed"))},L.ontimeout=function(){D(new TypeError("Network request failed"))},L.onabort=function(){D(new s.DOMException("Aborted","AbortError"))},L.open(C.method,C.url,!0),"include"===C.credentials?L.withCredentials=!0:"omit"===C.credentials&&(L.withCredentials=!1),"responseType"in L&&a_blob&&(L.responseType="blob"),C.headers.forEach(function(H,ee){L.setRequestHeader(ee,H)}),C.signal&&(C.signal.addEventListener("abort",z),L.onreadystatechange=function(){4===L.readyState&&C.signal.removeEventListener("abort",z)}),L.send(typeof C._bodyInit>"u"?null:C._bodyInit)})}Z.polyfill=!0,o.fetch||(o.fetch=Z,o.Headers=m,o.Request=p,o.Response=G),s.Headers=m,s.Request=p,s.Response=G,s.fetch=Z,Object.defineProperty(s,"__esModule",{value:!0})}({}),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;(e=i.fetch).default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,r.exports=e}(Xi,Xi.exports);var lc=function kn(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}(Xi.exports);const hc={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"};class xn{constructor(e){if(this.url=e,this.events=new ct.exports.EventEmitter,this.isAvailable=!1,this.registering=!1,!Ea(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}open(e=this.url){var t=this;return I(function*(){yield t.register(e)})()}close(){var e=this;return I(function*(){if(!e.isAvailable)throw new Error("Connection already closed");e.onClose()})()}send(e,t){var n=this;return I(function*(){n.isAvailable||(yield n.register());try{const i=jr(e),o=yield(yield lc(n.url,Object.assign(Object.assign({},hc),{body:i}))).json();n.onPayload({data:o})}catch(i){n.onError(e.id,i)}})()}register(e=this.url){var t=this;return I(function*(){if(!Ea(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(t.registering){const n=t.events.getMaxListeners();return(t.events.listenerCount("register_error")>=n||t.events.listenerCount("open")>=n)&&t.events.setMaxListeners(n+1),new Promise((i,o)=>{t.events.once("register_error",s=>{t.resetMaxListeners(),o(s)}),t.events.once("open",()=>{if(t.resetMaxListeners(),typeof t.isAvailable>"u")return o(new Error("HTTP connection is missing or invalid"));i()})})}t.url=e,t.registering=!0;try{const n=jr({id:1,jsonrpc:"2.0",method:"test",params:[]});yield lc(e,Object.assign(Object.assign({},hc),{body:n})),t.onOpen()}catch(n){const i=t.parseError(n);throw t.events.emit("register_error",i),t.onClose(),i}})()}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(typeof e.data>"u")return;const t="string"==typeof e.data?ri(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const n=this.parseError(t),o=wn(e,n.message||n.toString());this.events.emit("payload",o)}parseError(e,t=this.url){return ga(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}}const dc="wc@2:universal_provider:",Jr_DEFAULT_CHAIN_CHANGED="default_chain_changed";function Yt(r,e,t){let n;const i=Zi(r);return e.rpcMap&&(n=e.rpcMap[i]),n||(n=`https://rpc.walletconnect.com/v1?chainId=eip155:${i}&projectId=${t}`),n}function Zi(r){return r.includes("eip155")?Number(r.split(":")[1]):Number(r)}const Fn=(r,e)=>{const t=n=>{n.request!==e.request||n.topic!==e.topic||(r.events.removeListener("session_request_sent",t),function N_(){if(typeof window<"u")try{const r=window.localStorage.getItem("WALLETCONNECT_DEEPLINK_CHOICE");if(r){const e=JSON.parse(r);window.open(e.href,"_self","noreferrer noopener")}}catch(r){console.error(r)}}())};r.on("session_request_sent",t)};class R_{constructor(e){this.name="eip155",this.namespace=e.namespace,this.client=e.client,this.events=e.events,this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}request(e){var t=this;return I(function*(){var n;switch(e.request.method){case"eth_requestAccounts":case"eth_accounts":return t.getAccounts();case"wallet_switchEthereumChain":return t.handleSwitchChain(e.request.params?null==(n=e.request.params[0])?void 0:n.chainId:"0x0"),null;case"eth_chainId":return parseInt(t.getDefaultChain())}return t.namespace.methods.includes(e.request.method)?(Fn(t.client,e),yield t.client.request(e)):t.getHttpProvider().request(e.request)})()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,t){const n=Zi(e);if(!this.httpProviders[n]){const i=t||Yt(`${this.name}:${n}`,this.namespace,this.client.core.projectId);if(!i)throw new Error(`No RPC url provided for chainId: ${n}`);this.setHttpProvider(n,i)}this.chainId=n,this.events.emit(Jr_DEFAULT_CHAIN_CHANGED,`${this.name}:${n}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,t){const n=t||Yt(`${this.name}:${e}`,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new qr(new xn(n))}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{const n=Zi(t);e[n]=this.createHttpProvider(n)}),e}getAccounts(){const e=this.namespace.accounts;return e&&e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2])||[]}getHttpProvider(){const e=this.chainId,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}handleSwitchChain(e){const t=parseInt(e,16);(function F_(r,e){if(!e.includes(r))throw new Error(`Chain '${r}' not approved. Please use one of the following: ${e.toString()}`)})(`${this.name}:${t}`,this.namespace.chains),this.setDefaultChain(`${t}`)}}class T_{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=e.events,this.client=e.client,this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?(Fn(this.client,e),this.client.request(e)):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(!this.httpProviders[e]){const n=t||Yt(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.chainId=e,this.events.emit(Jr_DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e&&e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2])||[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{e[t]=this.createHttpProvider(t)}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Yt(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new qr(new xn(n))}}class L_{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=e.events,this.client=e.client,this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?(Fn(this.client,e),this.client.request(e)):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const n=t||Yt(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(Jr_DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e&&e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2])||[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{e[t]=this.createHttpProvider(t)}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Yt(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new qr(new xn(n))}}class C_{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=e.events,this.client=e.client,this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?(Fn(this.client,e),this.client.request(e)):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const n=t||Yt(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(Jr_DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e&&e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2])||[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{e[t]=this.createHttpProvider(t)}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Yt(e,this.namespace);return typeof n>"u"?void 0:new qr(new xn(n))}}var j_=Object.defineProperty,U_=Object.defineProperties,M_=Object.getOwnPropertyDescriptors,yc=Object.getOwnPropertySymbols,D_=Object.prototype.hasOwnProperty,k_=Object.prototype.propertyIsEnumerable,gc=(r,e,t)=>e in r?j_(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,An=(r,e)=>{for(var t in e||(e={}))D_.call(e,t)&&gc(r,t,e[t]);if(yc)for(var t of yc(e))k_.call(e,t)&&gc(r,t,e[t]);return r},Qi=(r,e)=>U_(r,M_(e));class Nn{constructor(e){this.events=new ct.exports,this.rpcProviders={},this.providerOpts=e,this.logger=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:Fe(xe.getDefaultLoggerOptions({level:e?.logger||"error"}))}static init(e){return I(function*(){const t=new Nn(e);return yield t.initialize(),t})()}request(e,t){var n=this;return I(function*(){const[i,o]=n.validateChain(t);if(!n.session)throw new Error("Please call connect() before request()");return yield n.getProvider(i).request({request:An({},e),chainId:`${i}:${o}`,topic:n.session.topic})})()}sendAsync(e,t,n){this.request(e,n).then(i=>t(null,i)).catch(i=>t(i,void 0))}enable(){var e=this;return I(function*(){if(!e.client)throw new Error("Sign Client not initialized");return e.session||(yield e.connect({namespaces:e.namespaces,optionalNamespaces:e.optionalNamespaces,sessionProperties:e.sessionProperties})),yield e.requestAccounts()})()}disconnect(){var e=this;return I(function*(){var t;if(!e.session)throw new Error("Please call connect() before enable()");yield e.client.disconnect({topic:null==(t=e.session)?void 0:t.topic,reason:He("USER_DISCONNECTED")}),yield e.cleanup()})()}connect(e){var t=this;return I(function*(){if(!t.client)throw new Error("Sign Client not initialized");if(t.setNamespaces(e),yield t.cleanupPendingPairings(),!e.skipPairing)return yield t.pair(e.pairingTopic)})()}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}removeListener(e,t){this.events.removeListener(e,t)}off(e,t){this.events.off(e,t)}get isWalletConnect(){return!0}pair(e){var t=this;return I(function*(){const{uri:n,approval:i}=yield t.client.connect({pairingTopic:e,requiredNamespaces:t.namespaces,optionalNamespaces:t.optionalNamespaces,sessionProperties:t.sessionProperties});return n&&(t.uri=n,t.events.emit("display_uri",n)),t.session=yield i(),t.createProviders(),t.onConnect(),t.session})()}setDefaultChain(e,t){try{const[n,i]=this.validateChain(e);this.getProvider(n).setDefaultChain(i,t)}catch(n){if(!/Please call connect/.test(n.message))throw n}}cleanupPendingPairings(e={}){var t=this;return I(function*(){t.logger.info("Cleaning up inactive pairings...");const n=t.client.pairing.getAll();if(Kr(n)){for(const i of n)e.deletePairings?t.client.core.expirer.set(i.topic,0):yield t.client.core.relayer.subscriber.unsubscribe(i.topic);t.logger.info(`Inactive pairings cleared: ${n.length}`)}})()}checkStorage(){var e=this;return I(function*(){e.namespaces=(yield e.getFromStore("namespaces"))||{},e.optionalNamespaces=(yield e.getFromStore("optionalNamespaces"))||{},e.client.session.length&&(e.session=e.client.session.get(e.client.session.keys[e.client.session.keys.length-1]),e.createProviders())})()}initialize(){var e=this;return I(function*(){e.logger.trace("Initialized"),yield e.createClient(),yield e.checkStorage(),e.registerEventListeners()})()}createClient(){var e=this;return I(function*(){e.client=e.providerOpts.client||(yield Ji.init({logger:e.providerOpts.logger||"error",relayUrl:e.providerOpts.relayUrl||"wss://relay.walletconnect.com",projectId:e.providerOpts.projectId,metadata:e.providerOpts.metadata,storageOptions:e.providerOpts.storageOptions,name:e.providerOpts.name})),e.logger.trace("SignClient Initialized")})()}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");Object.keys(this.namespaces).forEach(e=>{var t,n,i;const o=(null==(t=this.session)?void 0:t.namespaces[e].accounts)||[],s=function A_(r){return r.map(e=>`${e.split(":")[0]}:${e.split(":")[1]}`)}(o),a=Qi(An({},Object.assign(this.namespaces[e],null!=(i=null==(n=this.optionalNamespaces)?void 0:n[e])?i:{})),{accounts:o,chains:s});switch(e){case"eip155":this.rpcProviders[e]=new R_({client:this.client,namespace:a,events:this.events});break;case"solana":this.rpcProviders[e]=new T_({client:this.client,namespace:a,events:this.events});break;case"cosmos":this.rpcProviders[e]=new L_({client:this.client,namespace:a,events:this.events});break;case"polkadot":break;case"cip34":this.rpcProviders[e]=new C_({client:this.client,namespace:a,events:this.events})}})}registerEventListeners(){var e=this;if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",t=>{this.events.emit("session_ping",t)}),this.client.on("session_event",t=>{const{params:n}=t,{event:i}=n;"accountsChanged"===i.name?this.events.emit("accountsChanged",i.data):"chainChanged"===i.name?this.onChainChanged(n.chainId):this.events.emit(i.name,i.data),this.events.emit("session_event",t)}),this.client.on("session_update",({topic:t,params:n})=>{var i;const{namespaces:o}=n,s=null==(i=this.client)?void 0:i.session.get(t);this.session=Qi(An({},s),{namespaces:o}),this.onSessionUpdate(),this.events.emit("session_update",{topic:t,params:n})}),this.client.on("session_delete",function(){var t=I(function*(n){yield e.cleanup(),e.events.emit("session_delete",n),e.events.emit("disconnect",Qi(An({},He("USER_DISCONNECTED")),{data:n.topic}))});return function(n){return t.apply(this,arguments)}}()),this.on(Jr_DEFAULT_CHAIN_CHANGED,t=>{this.onChainChanged(t,!0)})}getProvider(e){if(!this.rpcProviders[e])throw new Error(`Provider not found: ${e}`);return this.rpcProviders[e]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(e=>{var t;this.getProvider(e).updateNamespace(null==(t=this.session)?void 0:t.namespaces[e])})}setNamespaces(e){const{namespaces:t,optionalNamespaces:n,sessionProperties:i}=e;if(!t||!Object.keys(t).length)throw new Error("Namespaces must be not empty");this.namespaces=t,this.optionalNamespaces=n,this.sessionProperties=i,this.persist("namespaces",t),this.persist("optionalNamespaces",n)}validateChain(e){const[t,n]=e?.split(":")||["",""];if(t&&!Object.keys(this.namespaces).includes(t))throw new Error(`Namespace '${t}' is not configured. Please call connect() first with namespace config.`);if(t&&n)return[t,n];const i=Object.keys(this.namespaces)[0];return[i,this.rpcProviders[i].getDefaultChain()]}requestAccounts(){var e=this;return I(function*(){const[t]=e.validateChain();return yield e.getProvider(t).requestAccounts()})()}onChainChanged(e,t=!1){const[n,i]=this.validateChain(e);t||this.getProvider(n).setDefaultChain(i),this.namespaces[n].defaultChain=i,this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",i)}onConnect(){this.events.emit("connect",{session:this.session})}cleanup(){var e=this;return I(function*(){e.session=void 0,yield e.cleanupPendingPairings({deletePairings:!0})})()}persist(e,t){this.client.core.storage.setItem(`${dc}/${e}`,t)}getFromStore(e){var t=this;return I(function*(){return yield t.client.core.storage.getItem(`${dc}/${e}`)})()}}hr.UniversalProvider=Nn,hr.default=Nn,Object.defineProperty(hr,"__esModule",{value:!0})}(en)},4813:Dn=>{"use strict";Dn.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}}}]); \ No newline at end of file diff --git a/angular-bare-bones-demo/dist/724.1f9375e6c866d030.js b/angular-bare-bones-demo/dist/724.1f9375e6c866d030.js new file mode 100644 index 000000000..b6fb0b92a --- /dev/null +++ b/angular-bare-bones-demo/dist/724.1f9375e6c866d030.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkAngular_bare_bones_demo=self.webpackChunkAngular_bare_bones_demo||[]).push([[724],{3724:(W,C,d)=>{d.r(C),d.d(C,{Web3WalletProvider:()=>y,default:()=>b});var p=d(4266),g=d(9267),v=d(4033),h=function(a,o,e,t){return new(e||(e=Promise))(function(n,s){function u(l){try{r(t.next(l))}catch(w){s(w)}}function c(l){try{r(t.throw(l))}catch(w){s(w)}}function r(l){l.done?n(l.value):function i(n){return n instanceof e?n:new e(function(s){s(n)})}(l.value).then(u,c)}r((t=t.apply(a,o||[])).next())})},f=function(a,o){var t,i,n,s,e={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return s={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function u(r){return function(l){return function c(r){if(t)throw new TypeError("Generator is already executing.");for(;s&&(s=0,r[0]&&(e=0)),e;)try{if(t=1,i&&(n=2&r[0]?i.return:r[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,r[1])).done)return n;switch(i=0,n&&(r=[2&r[0],n.value]),r[0]){case 0:case 1:n=r;break;case 4:return e.label++,{value:r[1],done:!1};case 5:e.label++,i=r[1],r=[0];continue;case 7:r=e.ops.pop(),e.trys.pop();continue;default:if(!(n=(n=e.trys).length>0&&n[n.length-1])&&(6===r[0]||2===r[0])){e=0;continue}if(3===r[0]&&(!n||r[1]>n[0]&&r[1]-1||s.client.disconnectWallet()}),[2,t[0]]}})})},a.prototype.MetaMask=function(o){return h(this,void 0,void 0,function(){var e;return f(this,function(t){switch(t.label){case 0:return(0,v.kg)(2,"connect MetaMask"),typeof window.ethereum<"u"?[4,window.ethereum.enable()]:[3,2];case 1:return t.sent(),e=new g.Q(window.ethereum,"any"),[2,this.registerProvider(e,"MetaMask")];case 2:throw new Error("MetaMask is not available. Please check the extension is supported and active.")}})})},a.prototype.WalletConnect=function(o){return h(this,void 0,void 0,function(){var t,i=this;return f(this,function(n){switch(n.label){case 0:return(0,v.kg)(2,"connect Wallet Connect"),[4,d.e(110).then(d.bind(d,4110))];case 1:return[4,n.sent().getWalletConnectProviderInstance(o)];case 2:return t=n.sent(),[2,new Promise(function(s,u){o&&t.connector.on("display_uri",function(c,r){u(new Error("Connection expired"))}),t.enable().then(function(){var c=new g.Q(t,"any");s(i.registerProvider(c,"WalletConnect"))}).catch(function(c){return u(c)})})]}})})},a.prototype.WalletConnectV2=function(o){return h(this,void 0,void 0,function(){var e,t,i,s=this;return f(this,function(u){switch(u.label){case 0:return(0,v.kg)(2,"connect Wallet Connect V2"),[4,d.e(66).then(d.bind(d,6066))];case 1:return[4,(e=u.sent()).getWalletConnectV2ProviderInstance()];case 2:return(t=u.sent()).on("display_uri",function(c){return h(s,void 0,void 0,function(){var r=this;return f(this,function(l){switch(l.label){case 0:return console.log("EVENT","QR Code Modal open"),[4,d.e(475).then(d.t.bind(d,5475,23))];case 1:return(i=l.sent().default).open(c,function(){r.client.getUi().showError("User closed modal")}),[2]}})})}),t.on("session_delete",function(c){console.log("WC V2 EVENT","session_deleted"),s.client.disconnectWallet()}),o?[3,4]:[4,t.connect({namespaces:{eip155:{methods:["eth_sendTransaction","eth_signTransaction","eth_sign","personal_sign","eth_signTypedData"],chains:e.WC_V2_CHAINS,events:["chainChanged","accountsChanged"],rpcMap:e.CUSTOM_RPCS_FOR_WC_V2}},pairingTopic:void 0})];case 3:u.sent(),i.close(),u.label=4;case 4:return[2,new Promise(function(c,r){t.enable().then(function(){var l=new g.Q(t,"any");c(s.registerProvider(l,"WalletConnectV2"))}).catch(function(l){r(l)})})]}})})},a.prototype.Torus=function(o){return h(this,void 0,void 0,function(){var t,i;return f(this,function(n){switch(n.label){case 0:return[4,d.e(795).then(d.bind(d,8795))];case 1:return[4,n.sent().getTorusProviderInstance()];case 2:return[4,(t=n.sent()).init()];case 3:return n.sent(),[4,t.login()];case 4:return n.sent(),i=new g.Q(t.provider,"any"),[2,this.registerProvider(i,"Torus")]}})})},a.prototype.Phantom=function(){return h(this,void 0,void 0,function(){var o,e;return f(this,function(t){switch(t.label){case 0:return(0,v.kg)(2,"connect Phantom"),typeof window.solana<"u"?[4,window.solana.connect()]:[3,2];case 1:return o=t.sent(),e=o.publicKey.toBase58(),[2,this.registerNewWalletAddress(e,"mainnet-beta","phantom",window.solana,"solana")];case 2:throw new Error("MetaMask is not available. Please check the extension is supported and active.")}})})},a.prototype.SafeConnect=function(){return h(this,void 0,void 0,function(){var o,e;return f(this,function(t){switch(t.label){case 0:return(0,v.kg)(2,"connect SafeConnect"),[4,this.getSafeConnectProvider()];case 1:return[4,(o=t.sent()).initSafeConnect()];case 2:return e=t.sent(),this.registerNewWalletAddress(e,1,"SafeConnect",o),[2,e]}})})},a.prototype.flowSubscribe=function(o,e){return h(this,void 0,void 0,function(){var t;return f(this,function(i){try{e.addr&&(this.registerNewWalletAddress(e.addr,1,"flow",o),(t=this.client.getUi())&&t.dismissLoader(),this.client.enrichTokenLookupDataOnChainTokens(),t&&t.updateUI("main"))}catch(n){console.error("flow wallet connection error ==>",n),this.client.getUi().showError("Flow wallet connection error.")}return[2]})})},a.prototype.Flow=function(){return h(this,void 0,void 0,function(){var o,e,t,i=this;return f(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,d.e(952).then(d.bind(d,4952))];case 1:return o=n.sent(),(e=o.getFlowProvider()).currentUser.subscribe(function(s){return i.flowSubscribe(e,s)}),e.authenticate(),[3,3];case 2:return t=n.sent(),console.error("error ==>",t),[3,3];case 3:return[2,""]}})})},a.prototype.safeConnectAvailable=function(){return void 0!==this.safeConnectOptions},a.prototype.getSafeConnectProvider=function(){return h(this,void 0,void 0,function(){return f(this,function(e){switch(e.label){case 0:return[4,Promise.resolve().then(d.bind(d,7747))];case 1:return[2,new(0,e.sent().SafeConnectProvider)(this.client.getUi(),this.safeConnectOptions)]}})})},a.LOCAL_STORAGE_KEY="tn-wallet-connections",a}();const b=y}}]); \ No newline at end of file diff --git a/angular-bare-bones-demo/dist/795.681c00ce3aca1a02.js b/angular-bare-bones-demo/dist/795.681c00ce3aca1a02.js new file mode 100644 index 000000000..ad2550990 --- /dev/null +++ b/angular-bare-bones-demo/dist/795.681c00ce3aca1a02.js @@ -0,0 +1 @@ +(self.webpackChunkAngular_bare_bones_demo=self.webpackChunkAngular_bare_bones_demo||[]).push([[795],{8795:(Re,Oe,ge)=>{"use strict";ge.r(Oe),ge.d(Oe,{getTorusProviderInstance:()=>Ae});var Tt=ge(39),Ee=ge.n(Tt),Ae=function(){return O=void 0,v=void 0,e=function(){return function(O,v){var e,y,c,h,i={label:0,sent:function(){if(1&c[0])throw c[1];return c[1]},trys:[],ops:[]};return h={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(h[Symbol.iterator]=function(){return this}),h;function n(a){return function(d){return function r(a){if(e)throw new TypeError("Generator is already executing.");for(;h&&(h=0,a[0]&&(i=0)),i;)try{if(e=1,y&&(c=2&a[0]?y.return:a[0]?y.throw||((c=y.return)&&c.call(y),0):y.next)&&!(c=c.call(y,a[1])).done)return c;switch(y=0,c&&(a=[2&a[0],c.value]),a[0]){case 0:case 1:c=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,y=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(c=(c=i.trys).length>0&&c[c.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!c||a[1]>c[0]&&a[1]{var Tt=ge(1052).default;self,Re.exports=(()=>(()=>{var Ee={5508:(O,v,i)=>{"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.ComposedStore=void 0;const e=i(8877);v.ComposedStore=class y extends e.ObservableStore{constructor(h){super({}),this._children=h||{},Object.keys(this._children).forEach(n=>{this._addChild(n,this._children[n])})}_addChild(h,n){const r=a=>{const d=this.getState();d[h]=a,this.putState(d)};n.subscribe(r),r(n.getState())}}},401:(O,v,i)=>{"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.MergedStore=void 0;const e=i(8877);v.MergedStore=class y extends e.ObservableStore{constructor(h=[]){super({}),this._children=h,h.forEach(n=>this._addChild(n)),this._updateWholeState()}_addChild(h){h.subscribe(()=>this._updateWholeState())}_updateWholeState(){const h=this._children.map(r=>r.getState()),n=Object.assign({},...h);this.putState(n)}}},8877:function(O,v,i){"use strict";var e=this&&this.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(v,"__esModule",{value:!0}),v.ObservableStore=void 0;const y=e(i(9394));v.ObservableStore=class c extends y.default{constructor(n){super(),this._state=n||{}}getState(){return this._getState()}putState(n){this._putState(n),this.emit("update",n)}updateState(n){if(n&&"object"==typeof n){const r=this.getState();this.putState(Object.assign(Object.assign({},r),n))}else this.putState(n)}subscribe(n){this.on("update",n)}unsubscribe(n){this.removeListener("update",n)}_getState(){return this._state}_putState(n){this._state=n}}},7969:(O,v,i)=>{"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.storeAsStream=void 0;const e=i(2830);class y extends e.Duplex{constructor(h){super({objectMode:!0}),this.resume(),this.handler=n=>this.push(n),this.obsStore=h,this.obsStore.subscribe(this.handler)}pipe(h,n){const r=super.pipe(h,n);return h.write(this.obsStore.getState()),r}_write(h,n,r){this.obsStore.putState(h),r()}_read(h){}_destroy(h,n){this.obsStore.unsubscribe(this.handler),super._destroy(h,n)}}v.storeAsStream=function(c){return new y(c)}},2724:function(O,v,i){"use strict";var e=this&&this.__createBinding||(Object.create?function(c,h,n,r){void 0===r&&(r=n),Object.defineProperty(c,r,{enumerable:!0,get:function(){return h[n]}})}:function(c,h,n,r){void 0===r&&(r=n),c[r]=h[n]}),y=this&&this.__exportStar||function(c,h){for(var n in c)"default"===n||Object.prototype.hasOwnProperty.call(h,n)||e(h,c,n)};Object.defineProperty(v,"__esModule",{value:!0}),y(i(7969),v),y(i(5508),v),y(i(401),v),y(i(8877),v),y(i(6546),v)},6546:(O,v,i)=>{"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.storeTransformStream=void 0;const e=i(4650);v.storeTransformStream=function(y){return e.obj((c,h,n)=>{try{return void n(null,y(c))}catch(r){return void n(r)}})}},9394:(O,v,i)=>{"use strict";Object.defineProperty(v,"__esModule",{value:!0});const e=i(7187);function y(h,n,r){try{Reflect.apply(h,n,r)}catch(a){setTimeout(()=>{throw a})}}v.default=class c extends e.EventEmitter{emit(n,...r){let a="error"===n;const d=this._events;if(void 0!==d)a=a&&void 0===d.error;else if(!a)return!1;if(a){let g;if(r.length>0&&([g]=r),g instanceof Error)throw g;const o=new Error("Unhandled error."+(g?` (${g.message})`:""));throw o.context=g,o}const S=d[n];if(void 0===S)return!1;if("function"==typeof S)y(S,this,r);else{const g=S.length,o=function(s){const f=s.length,l=new Array(f);for(let p=0;p{"use strict";v.byteLength=function(d){var S=r(d),o=S[1];return 3*(S[0]+o)/4-o},v.toByteArray=function(d){var S,g,M,o=r(d),s=o[0],f=o[1],l=new y(3*(s+(M=f))/4-M),p=0,_=f>0?s-4:s;for(g=0;g<_;g+=4)S=e[d.charCodeAt(g)]<<18|e[d.charCodeAt(g+1)]<<12|e[d.charCodeAt(g+2)]<<6|e[d.charCodeAt(g+3)],l[p++]=S>>16&255,l[p++]=S>>8&255,l[p++]=255&S;return 2===f&&(S=e[d.charCodeAt(g)]<<2|e[d.charCodeAt(g+1)]>>4,l[p++]=255&S),1===f&&(S=e[d.charCodeAt(g)]<<10|e[d.charCodeAt(g+1)]<<4|e[d.charCodeAt(g+2)]>>2,l[p++]=S>>8&255,l[p++]=255&S),l},v.fromByteArray=function(d){for(var S,g=d.length,o=g%3,s=[],f=16383,l=0,p=g-o;lp?p:l+f));return 1===o?s.push(i[(S=d[g-1])>>2]+i[S<<4&63]+"=="):2===o&&s.push(i[(S=(d[g-2]<<8)+d[g-1])>>10]+i[S>>4&63]+i[S<<2&63]+"="),s.join("")};for(var i=[],e=[],y=typeof Uint8Array<"u"?Uint8Array:Array,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,n=c.length;h0)throw new Error("Invalid string. Length must be a multiple of 4");var g=d.indexOf("=");return-1===g&&(g=S),[g,g===S?0:4-g%4]}function a(d,S,g){for(var s,f=[],l=S;l>18&63]+i[s>>12&63]+i[s>>6&63]+i[63&s]);return f.join("")}e["-".charCodeAt(0)]=62,e["_".charCodeAt(0)]=63},2240:(O,v,i)=>{"use strict";var e=i(8764).Buffer,y=i(1518);function c(a,d){return void 0===d&&(d="utf8"),e.isBuffer(a)?n(a.toString("base64")):n(e.from(a,d).toString("base64"))}function h(a){return a=a.toString(),y.default(a).replace(/\-/g,"+").replace(/_/g,"/")}function n(a){return a.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}var r=c;r.encode=c,r.decode=function(a,d){return void 0===d&&(d="utf8"),e.from(h(a),"base64").toString(d)},r.toBase64=h,r.fromBase64=n,r.toBuffer=function(a){return e.from(h(a),"base64")},v.default=r},1518:(O,v,i)=>{"use strict";var e=i(8764).Buffer;Object.defineProperty(v,"__esModule",{value:!0}),v.default=function(y){var c=y.length,h=c%4;if(!h)return y;var n=c,r=4-h,d=e.alloc(c+r);for(d.write(y);r--;)d.write("=",n++);return d.toString()}},5772:(O,v,i)=>{O.exports=i(2240).default,O.exports.default=O.exports},8764:(O,v,i)=>{"use strict";var e=i(9742),y=i(645),c="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;v.Buffer=r,v.SlowBuffer=function(t){return+t!=t&&(t=0),r.alloc(+t)},v.INSPECT_MAX_BYTES=50;var h=2147483647;function n(t){if(t>h)throw new RangeError('The value "'+t+'" is invalid for option "size"');var u=new Uint8Array(t);return Object.setPrototypeOf(u,r.prototype),u}function r(t,u,b){if("number"==typeof t){if("string"==typeof u)throw new TypeError('The "string" argument must be of type string. Received type number');return S(t)}return a(t,u,b)}function a(t,u,b){if("string"==typeof t)return function(N,X){if("string"==typeof X&&""!==X||(X="utf8"),!r.isEncoding(X))throw new TypeError("Unknown encoding: "+X);var ct=0|f(N,X),pt=n(ct),gt=pt.write(N,X);return gt!==ct&&(pt=pt.slice(0,gt)),pt}(t,u);if(ArrayBuffer.isView(t))return function(N){if(J(N,Uint8Array)){var X=new Uint8Array(N);return o(X.buffer,X.byteOffset,X.byteLength)}return g(N)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(J(t,ArrayBuffer)||t&&J(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(J(t,SharedArrayBuffer)||t&&J(t.buffer,SharedArrayBuffer)))return o(t,u,b);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var C=t.valueOf&&t.valueOf();if(null!=C&&C!==t)return r.from(C,u,b);var x=function(N){if(r.isBuffer(N)){var X=0|s(N.length),ct=n(X);return 0===ct.length||N.copy(ct,0,0,X),ct}return void 0!==N.length?"number"!=typeof N.length||T(N.length)?n(0):g(N):"Buffer"===N.type&&Array.isArray(N.data)?g(N.data):void 0}(t);if(x)return x;if(typeof Symbol<"u"&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return r.from(t[Symbol.toPrimitive]("string"),u,b);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function d(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function S(t){return d(t),n(t<0?0:0|s(t))}function g(t){for(var u=t.length<0?0:0|s(t.length),b=n(u),C=0;C=h)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+h.toString(16)+" bytes");return 0|t}function f(t,u){if(r.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||J(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var b=t.length,C=arguments.length>2&&!0===arguments[2];if(!C&&0===b)return 0;for(var x=!1;;)switch(u){case"ascii":case"latin1":case"binary":return b;case"utf8":case"utf-8":return G(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*b;case"hex":return b>>>1;case"base64":return Q(t).length;default:if(x)return C?-1:G(t).length;u=(""+u).toLowerCase(),x=!0}}function l(t,u,b){var C=!1;if((void 0===u||u<0)&&(u=0),u>this.length||((void 0===b||b>this.length)&&(b=this.length),b<=0)||(b>>>=0)<=(u>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return at(this,u,b);case"utf8":case"utf-8":return $(this,u,b);case"ascii":return et(this,u,b);case"latin1":case"binary":return Z(this,u,b);case"base64":return L(this,u,b);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ut(this,u,b);default:if(C)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),C=!0}}function p(t,u,b){var C=t[u];t[u]=t[b],t[b]=C}function _(t,u,b,C,x){if(0===t.length)return-1;if("string"==typeof b?(C=b,b=0):b>2147483647?b=2147483647:b<-2147483648&&(b=-2147483648),T(b=+b)&&(b=x?0:t.length-1),b<0&&(b=t.length+b),b>=t.length){if(x)return-1;b=t.length-1}else if(b<0){if(!x)return-1;b=0}if("string"==typeof u&&(u=r.from(u,C)),r.isBuffer(u))return 0===u.length?-1:E(t,u,b,C,x);if("number"==typeof u)return u&=255,"function"==typeof Uint8Array.prototype.indexOf?x?Uint8Array.prototype.indexOf.call(t,u,b):Uint8Array.prototype.lastIndexOf.call(t,u,b):E(t,[u],b,C,x);throw new TypeError("val must be string, number or Buffer")}function E(t,u,b,C,x){var N,X=1,ct=t.length,pt=u.length;if(void 0!==C&&("ucs2"===(C=String(C).toLowerCase())||"ucs-2"===C||"utf16le"===C||"utf-16le"===C)){if(t.length<2||u.length<2)return-1;X=2,ct/=2,pt/=2,b/=2}function gt(Rt,Mt){return 1===X?Rt[Mt]:Rt.readUInt16BE(Mt*X)}if(x){var yt=-1;for(N=b;Nct&&(b=ct-pt),N=b;N>=0;N--){for(var bt=!0,Et=0;Etx&&(C=x):C=x;var N=u.length;C>N/2&&(C=N/2);for(var X=0;X>8,gt.push(X%256),gt.push(ct);return gt}(u,t.length-b),t,b,C)}function L(t,u,b){return e.fromByteArray(0===u&&b===t.length?t:t.slice(u,b))}function $(t,u,b){b=Math.min(t.length,b);for(var C=[],x=u;x239?4:gt>223?3:gt>191?2:1;if(x+bt<=b)switch(bt){case 1:gt<128&&(yt=gt);break;case 2:128==(192&(N=t[x+1]))&&(pt=(31>)<<6|63&N)>127&&(yt=pt);break;case 3:X=t[x+2],128==(192&(N=t[x+1]))&&128==(192&X)&&(pt=(15>)<<12|(63&N)<<6|63&X)>2047&&(pt<55296||pt>57343)&&(yt=pt);break;case 4:X=t[x+2],ct=t[x+3],128==(192&(N=t[x+1]))&&128==(192&X)&&128==(192&ct)&&(pt=(15>)<<18|(63&N)<<12|(63&X)<<6|63&ct)>65535&&pt<1114112&&(yt=pt)}null===yt?(yt=65533,bt=1):yt>65535&&(C.push((yt-=65536)>>>10&1023|55296),yt=56320|1023&yt),C.push(yt),x+=bt}return function(Et){var Rt=Et.length;if(Rt<=ot)return String.fromCharCode.apply(String,Et);for(var Mt="",Vt=0;Vt"u"||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(r.prototype,"parent",{enumerable:!0,get:function(){if(r.isBuffer(this))return this.buffer}}),Object.defineProperty(r.prototype,"offset",{enumerable:!0,get:function(){if(r.isBuffer(this))return this.byteOffset}}),r.poolSize=8192,r.from=function(t,u,b){return a(t,u,b)},Object.setPrototypeOf(r.prototype,Uint8Array.prototype),Object.setPrototypeOf(r,Uint8Array),r.alloc=function(t,u,b){return x=u,N=b,d(C=t),C<=0?n(C):void 0!==x?"string"==typeof N?n(C).fill(x,N):n(C).fill(x):n(C);var C,x,N},r.allocUnsafe=function(t){return S(t)},r.allocUnsafeSlow=function(t){return S(t)},r.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==r.prototype},r.compare=function(t,u){if(J(t,Uint8Array)&&(t=r.from(t,t.offset,t.byteLength)),J(u,Uint8Array)&&(u=r.from(u,u.offset,u.byteLength)),!r.isBuffer(t)||!r.isBuffer(u))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===u)return 0;for(var b=t.length,C=u.length,x=0,N=Math.min(b,C);xC.length?r.from(N).copy(C,x):Uint8Array.prototype.set.call(C,N,x);else{if(!r.isBuffer(N))throw new TypeError('"list" argument must be an Array of Buffers');N.copy(C,x)}x+=N.length}return C},r.byteLength=f,r.prototype._isBuffer=!0,r.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var u=0;uu&&(t+=" ... "),""},c&&(r.prototype[c]=r.prototype.inspect),r.prototype.compare=function(t,u,b,C,x){if(J(t,Uint8Array)&&(t=r.from(t,t.offset,t.byteLength)),!r.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===u&&(u=0),void 0===b&&(b=t?t.length:0),void 0===C&&(C=0),void 0===x&&(x=this.length),u<0||b>t.length||C<0||x>this.length)throw new RangeError("out of range index");if(C>=x&&u>=b)return 0;if(C>=x)return-1;if(u>=b)return 1;if(this===t)return 0;for(var N=(x>>>=0)-(C>>>=0),X=(b>>>=0)-(u>>>=0),ct=Math.min(N,X),pt=this.slice(C,x),gt=t.slice(u,b),yt=0;yt>>=0,isFinite(b)?(b>>>=0,void 0===C&&(C="utf8")):(C=b,b=void 0)}var x=this.length-u;if((void 0===b||b>x)&&(b=x),t.length>0&&(b<0||u<0)||u>this.length)throw new RangeError("Attempt to write outside buffer bounds");C||(C="utf8");for(var N=!1;;)switch(C){case"hex":return j(this,t,u,b);case"utf8":case"utf-8":return M(this,t,u,b);case"ascii":case"latin1":case"binary":return F(this,t,u,b);case"base64":return K(this,t,u,b);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,t,u,b);default:if(N)throw new TypeError("Unknown encoding: "+C);C=(""+C).toLowerCase(),N=!0}},r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ot=4096;function et(t,u,b){var C="";b=Math.min(t.length,b);for(var x=u;xC)&&(b=C);for(var x="",N=u;Nb)throw new RangeError("Trying to access beyond buffer length")}function m(t,u,b,C,x,N){if(!r.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(u>x||ut.length)throw new RangeError("Index out of range")}function D(t,u,b,C,x,N){if(b+C>t.length)throw new RangeError("Index out of range");if(b<0)throw new RangeError("Index out of range")}function A(t,u,b,C,x){return u=+u,b>>>=0,x||D(t,0,b,4),y.write(t,u,b,C,23,4),b+4}function R(t,u,b,C,x){return u=+u,b>>>=0,x||D(t,0,b,8),y.write(t,u,b,C,52,8),b+8}r.prototype.slice=function(t,u){var b=this.length;(t=~~t)<0?(t+=b)<0&&(t=0):t>b&&(t=b),(u=void 0===u?b:~~u)<0?(u+=b)<0&&(u=0):u>b&&(u=b),u>>=0,u>>>=0,b||I(t,u,this.length);for(var C=this[t],x=1,N=0;++N>>=0,u>>>=0,b||I(t,u,this.length);for(var C=this[t+--u],x=1;u>0&&(x*=256);)C+=this[t+--u]*x;return C},r.prototype.readUint8=r.prototype.readUInt8=function(t,u){return t>>>=0,u||I(t,1,this.length),this[t]},r.prototype.readUint16LE=r.prototype.readUInt16LE=function(t,u){return t>>>=0,u||I(t,2,this.length),this[t]|this[t+1]<<8},r.prototype.readUint16BE=r.prototype.readUInt16BE=function(t,u){return t>>>=0,u||I(t,2,this.length),this[t]<<8|this[t+1]},r.prototype.readUint32LE=r.prototype.readUInt32LE=function(t,u){return t>>>=0,u||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},r.prototype.readUint32BE=r.prototype.readUInt32BE=function(t,u){return t>>>=0,u||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},r.prototype.readIntLE=function(t,u,b){t>>>=0,u>>>=0,b||I(t,u,this.length);for(var C=this[t],x=1,N=0;++N=(x*=128)&&(C-=Math.pow(2,8*u)),C},r.prototype.readIntBE=function(t,u,b){t>>>=0,u>>>=0,b||I(t,u,this.length);for(var C=u,x=1,N=this[t+--C];C>0&&(x*=256);)N+=this[t+--C]*x;return N>=(x*=128)&&(N-=Math.pow(2,8*u)),N},r.prototype.readInt8=function(t,u){return t>>>=0,u||I(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},r.prototype.readInt16LE=function(t,u){t>>>=0,u||I(t,2,this.length);var b=this[t]|this[t+1]<<8;return 32768&b?4294901760|b:b},r.prototype.readInt16BE=function(t,u){t>>>=0,u||I(t,2,this.length);var b=this[t+1]|this[t]<<8;return 32768&b?4294901760|b:b},r.prototype.readInt32LE=function(t,u){return t>>>=0,u||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},r.prototype.readInt32BE=function(t,u){return t>>>=0,u||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},r.prototype.readFloatLE=function(t,u){return t>>>=0,u||I(t,4,this.length),y.read(this,t,!0,23,4)},r.prototype.readFloatBE=function(t,u){return t>>>=0,u||I(t,4,this.length),y.read(this,t,!1,23,4)},r.prototype.readDoubleLE=function(t,u){return t>>>=0,u||I(t,8,this.length),y.read(this,t,!0,52,8)},r.prototype.readDoubleBE=function(t,u){return t>>>=0,u||I(t,8,this.length),y.read(this,t,!1,52,8)},r.prototype.writeUintLE=r.prototype.writeUIntLE=function(t,u,b,C){t=+t,u>>>=0,b>>>=0,C||m(this,t,u,b,Math.pow(2,8*b)-1,0);var x=1,N=0;for(this[u]=255&t;++N>>=0,b>>>=0,C||m(this,t,u,b,Math.pow(2,8*b)-1,0);var x=b-1,N=1;for(this[u+x]=255&t;--x>=0&&(N*=256);)this[u+x]=t/N&255;return u+b},r.prototype.writeUint8=r.prototype.writeUInt8=function(t,u,b){return t=+t,u>>>=0,b||m(this,t,u,1,255,0),this[u]=255&t,u+1},r.prototype.writeUint16LE=r.prototype.writeUInt16LE=function(t,u,b){return t=+t,u>>>=0,b||m(this,t,u,2,65535,0),this[u]=255&t,this[u+1]=t>>>8,u+2},r.prototype.writeUint16BE=r.prototype.writeUInt16BE=function(t,u,b){return t=+t,u>>>=0,b||m(this,t,u,2,65535,0),this[u]=t>>>8,this[u+1]=255&t,u+2},r.prototype.writeUint32LE=r.prototype.writeUInt32LE=function(t,u,b){return t=+t,u>>>=0,b||m(this,t,u,4,4294967295,0),this[u+3]=t>>>24,this[u+2]=t>>>16,this[u+1]=t>>>8,this[u]=255&t,u+4},r.prototype.writeUint32BE=r.prototype.writeUInt32BE=function(t,u,b){return t=+t,u>>>=0,b||m(this,t,u,4,4294967295,0),this[u]=t>>>24,this[u+1]=t>>>16,this[u+2]=t>>>8,this[u+3]=255&t,u+4},r.prototype.writeIntLE=function(t,u,b,C){if(t=+t,u>>>=0,!C){var x=Math.pow(2,8*b-1);m(this,t,u,b,x-1,-x)}var N=0,X=1,ct=0;for(this[u]=255&t;++N>0)-ct&255;return u+b},r.prototype.writeIntBE=function(t,u,b,C){if(t=+t,u>>>=0,!C){var x=Math.pow(2,8*b-1);m(this,t,u,b,x-1,-x)}var N=b-1,X=1,ct=0;for(this[u+N]=255&t;--N>=0&&(X*=256);)t<0&&0===ct&&0!==this[u+N+1]&&(ct=1),this[u+N]=(t/X>>0)-ct&255;return u+b},r.prototype.writeInt8=function(t,u,b){return t=+t,u>>>=0,b||m(this,t,u,1,127,-128),t<0&&(t=255+t+1),this[u]=255&t,u+1},r.prototype.writeInt16LE=function(t,u,b){return t=+t,u>>>=0,b||m(this,t,u,2,32767,-32768),this[u]=255&t,this[u+1]=t>>>8,u+2},r.prototype.writeInt16BE=function(t,u,b){return t=+t,u>>>=0,b||m(this,t,u,2,32767,-32768),this[u]=t>>>8,this[u+1]=255&t,u+2},r.prototype.writeInt32LE=function(t,u,b){return t=+t,u>>>=0,b||m(this,t,u,4,2147483647,-2147483648),this[u]=255&t,this[u+1]=t>>>8,this[u+2]=t>>>16,this[u+3]=t>>>24,u+4},r.prototype.writeInt32BE=function(t,u,b){return t=+t,u>>>=0,b||m(this,t,u,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[u]=t>>>24,this[u+1]=t>>>16,this[u+2]=t>>>8,this[u+3]=255&t,u+4},r.prototype.writeFloatLE=function(t,u,b){return A(this,t,u,!0,b)},r.prototype.writeFloatBE=function(t,u,b){return A(this,t,u,!1,b)},r.prototype.writeDoubleLE=function(t,u,b){return R(this,t,u,!0,b)},r.prototype.writeDoubleBE=function(t,u,b){return R(this,t,u,!1,b)},r.prototype.copy=function(t,u,b,C){if(!r.isBuffer(t))throw new TypeError("argument should be a Buffer");if(b||(b=0),C||0===C||(C=this.length),u>=t.length&&(u=t.length),u||(u=0),C>0&&C=this.length)throw new RangeError("Index out of range");if(C<0)throw new RangeError("sourceEnd out of bounds");C>this.length&&(C=this.length),t.length-u>>=0,b=void 0===b?this.length:b>>>0,t||(t=0),"number"==typeof t)for(N=u;N55295&&b<57344){if(!x){if(b>56319){(u-=3)>-1&&N.push(239,191,189);continue}if(X+1===C){(u-=3)>-1&&N.push(239,191,189);continue}x=b;continue}if(b<56320){(u-=3)>-1&&N.push(239,191,189),x=b;continue}b=65536+(x-55296<<10|b-56320)}else x&&(u-=3)>-1&&N.push(239,191,189);if(x=null,b<128){if((u-=1)<0)break;N.push(b)}else if(b<2048){if((u-=2)<0)break;N.push(b>>6|192,63&b|128)}else if(b<65536){if((u-=3)<0)break;N.push(b>>12|224,b>>6&63|128,63&b|128)}else{if(!(b<1114112))throw new Error("Invalid code point");if((u-=4)<0)break;N.push(b>>18|240,b>>12&63|128,b>>6&63|128,63&b|128)}}return N}function Q(t){return e.toByteArray(function(u){if((u=(u=u.split("=")[0]).trim().replace(z,"")).length<2)return"";for(;u.length%4!=0;)u+="=";return u}(t))}function nt(t,u,b,C){for(var x=0;x=u.length||x>=t.length);++x)u[x+b]=t[x];return x}function J(t,u){return t instanceof u||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===u.name}function T(t){return t!=t}var k=function(){for(var t="0123456789abcdef",u=new Array(256),b=0;b<16;++b)for(var C=16*b,x=0;x<16;++x)u[C+x]=t[b]+t[x];return u}()},1924:(O,v,i)=>{"use strict";var e=i(210),y=i(5559),c=y(e("String.prototype.indexOf"));O.exports=function(h,n){var r=e(h,!!n);return"function"==typeof r&&c(h,".prototype.")>-1?y(r):r}},5559:(O,v,i)=>{"use strict";var e=i(8612),y=i(210),c=y("%Function.prototype.apply%"),h=y("%Function.prototype.call%"),n=y("%Reflect.apply%",!0)||e.call(h,c),r=y("%Object.getOwnPropertyDescriptor%",!0),a=y("%Object.defineProperty%",!0),d=y("%Math.max%");if(a)try{a({},"a",{value:1})}catch{a=null}O.exports=function(g){var o=n(e,h,arguments);if(r&&a){var s=r(o,"length");s.configurable&&a(o,"length",{value:1+d(0,g.length-(arguments.length-1))})}return o};var S=function(){return n(e,c,arguments)};a?a(O.exports,"apply",{value:S}):O.exports.apply=S},1027:(O,v,i)=>{var e=i(9509).Buffer,y=i(2830).Transform,c=i(2553).s;function h(n){y.call(this),this.hashMode="string"==typeof n,this.hashMode?this[n]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}i(5717)(h,y),h.prototype.update=function(n,r,a){"string"==typeof n&&(n=e.from(n,r));var d=this._update(n);return this.hashMode?this:(a&&(d=this._toString(d,a)),d)},h.prototype.setAutoPadding=function(){},h.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},h.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},h.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},h.prototype._transform=function(n,r,a){var d;try{this.hashMode?this._update(n):this.push(this._update(n))}catch(S){d=S}finally{a(d)}},h.prototype._flush=function(n){var r;try{this.push(this.__final())}catch(a){r=a}n(r)},h.prototype._finalOrDigest=function(n){var r=this.__final()||e.alloc(0);return n&&(r=this._toString(r,n,!0)),r},h.prototype._toString=function(n,r,a){if(this._decoder||(this._decoder=new c(r),this._encoding=r),this._encoding!==r)throw new Error("can't switch encodings");var d=this._decoder.write(n);return a&&(d+=this._decoder.end()),d},O.exports=h},6497:(O,v,i)=>{function e(y){return Object.prototype.toString.call(y)}v.isArray=function(y){return Array.isArray?Array.isArray(y):"[object Array]"===e(y)},v.isBoolean=function(y){return"boolean"==typeof y},v.isNull=function(y){return null===y},v.isNullOrUndefined=function(y){return null==y},v.isNumber=function(y){return"number"==typeof y},v.isString=function(y){return"string"==typeof y},v.isSymbol=function(y){return"symbol"==typeof y},v.isUndefined=function(y){return void 0===y},v.isRegExp=function(y){return"[object RegExp]"===e(y)},v.isObject=function(y){return"object"==typeof y&&null!==y},v.isDate=function(y){return"[object Date]"===e(y)},v.isError=function(y){return"[object Error]"===e(y)||y instanceof Error},v.isFunction=function(y){return"function"==typeof y},v.isPrimitive=function(y){return null===y||"boolean"==typeof y||"number"==typeof y||"string"==typeof y||"symbol"==typeof y||void 0===y},v.isBuffer=i(8764).Buffer.isBuffer},3482:(O,v,i)=>{"use strict";var e=i(5717),y=i(2318),c=i(9785),h=i(9072),n=i(1027);function r(a){n.call(this,"digest"),this._hash=a}e(r,n),r.prototype._update=function(a){this._hash.update(a)},r.prototype._final=function(){return this._hash.digest()},O.exports=function(a){return"md5"===(a=a.toLowerCase())?new y:"rmd160"===a||"ripemd160"===a?new c:new r(h(a))}},2840:(O,v,i)=>{var e=i(4155),y=i(778),c=function(){},h=function(n,r,a){if("function"==typeof r)return h(n,null,r);r||(r={}),a=y(a||c);var K,d=n._writableState,S=n._readableState,g=r.readable||!1!==r.readable&&n.readable,o=r.writable||!1!==r.writable&&n.writable,s=!1,f=function(){n.writable||l()},l=function(){o=!1,g||a.call(n)},p=function(){g=!1,o||a.call(n)},_=function(K){a.call(n,K?new Error("exited with error code: "+K):null)},E=function(K){a.call(n,K)},j=function(){e.nextTick(M)},M=function(){if(!s)return(!g||S&&S.ended&&!S.destroyed)&&(!o||d&&d.ended&&!d.destroyed)?void 0:a.call(n,new Error("premature close"))},F=function(){n.req.on("finish",l)};return(K=n).setHeader&&"function"==typeof K.abort?(n.on("complete",l),n.on("abort",j),n.req?F():n.on("request",F)):o&&!d&&(n.on("end",f),n.on("close",f)),function(K){return K.stdio&&Array.isArray(K.stdio)&&3===K.stdio.length}(n)&&n.on("exit",_),n.on("end",p),n.on("finish",l),!1!==r.error&&n.on("error",E),n.on("close",j),function(){s=!0,n.removeListener("complete",l),n.removeListener("abort",j),n.removeListener("request",F),n.req&&n.req.removeListener("finish",l),n.removeListener("end",f),n.removeListener("close",f),n.removeListener("finish",l),n.removeListener("exit",_),n.removeListener("end",p),n.removeListener("error",E),n.removeListener("close",j)}};O.exports=h},2294:(O,v,i)=>{"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.EthereumProviderError=v.EthereumRpcError=void 0;const e=i(4445);class y extends Error{constructor(n,r,a){if(!Number.isInteger(n))throw new Error('"code" must be an integer.');if(!r||"string"!=typeof r)throw new Error('"message" must be a nonempty string.');super(r),this.code=n,void 0!==a&&(this.data=a)}serialize(){const n={code:this.code,message:this.message};return void 0!==this.data&&(n.data=this.data),this.stack&&(n.stack=this.stack),n}toString(){return e.default(this.serialize(),c,2)}}function c(h,n){if("[Circular]"!==n)return n}v.EthereumRpcError=y,v.EthereumProviderError=class extends y{constructor(h,n,r){if(a=h,!(Number.isInteger(a)&&a>=1e3&&a<=4999))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');var a;super(h,n,r)}}},2662:(O,v)=>{"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.errorValues=v.errorCodes=void 0,v.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},v.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}},8797:(O,v,i)=>{"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.ethErrors=void 0;const e=i(2294),y=i(8753),c=i(2662);function h(a,d){const[S,g]=r(d);return new e.EthereumRpcError(a,S||y.getMessageFromCode(a),g)}function n(a,d){const[S,g]=r(d);return new e.EthereumProviderError(a,S||y.getMessageFromCode(a),g)}function r(a){if(a){if("string"==typeof a)return[a];if("object"==typeof a&&!Array.isArray(a)){const{message:d,data:S}=a;if(d&&"string"!=typeof d)throw new Error("Must specify string message.");return[d||void 0,S]}}return[]}v.ethErrors={rpc:{parse:a=>h(c.errorCodes.rpc.parse,a),invalidRequest:a=>h(c.errorCodes.rpc.invalidRequest,a),invalidParams:a=>h(c.errorCodes.rpc.invalidParams,a),methodNotFound:a=>h(c.errorCodes.rpc.methodNotFound,a),internal:a=>h(c.errorCodes.rpc.internal,a),server:a=>{if(!a||"object"!=typeof a||Array.isArray(a))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:d}=a;if(!Number.isInteger(d)||d>-32005||d<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return h(d,a)},invalidInput:a=>h(c.errorCodes.rpc.invalidInput,a),resourceNotFound:a=>h(c.errorCodes.rpc.resourceNotFound,a),resourceUnavailable:a=>h(c.errorCodes.rpc.resourceUnavailable,a),transactionRejected:a=>h(c.errorCodes.rpc.transactionRejected,a),methodNotSupported:a=>h(c.errorCodes.rpc.methodNotSupported,a),limitExceeded:a=>h(c.errorCodes.rpc.limitExceeded,a)},provider:{userRejectedRequest:a=>n(c.errorCodes.provider.userRejectedRequest,a),unauthorized:a=>n(c.errorCodes.provider.unauthorized,a),unsupportedMethod:a=>n(c.errorCodes.provider.unsupportedMethod,a),disconnected:a=>n(c.errorCodes.provider.disconnected,a),chainDisconnected:a=>n(c.errorCodes.provider.chainDisconnected,a),custom:a=>{if(!a||"object"!=typeof a||Array.isArray(a))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:d,message:S,data:g}=a;if(!S||"string"!=typeof S)throw new Error('"message" must be a nonempty string');return new e.EthereumProviderError(d,S,g)}}}},9826:(O,v,i)=>{"use strict";v.Xy=v.Cg=v.Sy=void 0;const e=i(2294);Object.defineProperty(v,"Cg",{enumerable:!0,get:function(){return e.EthereumRpcError}});const y=i(8753);Object.defineProperty(v,"Xy",{enumerable:!0,get:function(){return y.serializeError}});const c=i(8797);Object.defineProperty(v,"Sy",{enumerable:!0,get:function(){return c.ethErrors}}),i(2662)},8753:(O,v,i)=>{"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.serializeError=v.isValidCode=v.getMessageFromCode=v.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const e=i(2662),y=i(2294),c=e.errorCodes.rpc.internal,h={code:c,message:n(c)};function n(g,o="Unspecified error message. This is a bug, please report it."){if(Number.isInteger(g)){const s=g.toString();if(S(e.errorValues,s))return e.errorValues[s].message;if(a(g))return v.JSON_RPC_SERVER_ERROR_MESSAGE}return o}function r(g){if(!Number.isInteger(g))return!1;const o=g.toString();return!!e.errorValues[o]||!!a(g)}function a(g){return g>=-32099&&g<=-32e3}function d(g){return g&&"object"==typeof g&&!Array.isArray(g)?Object.assign({},g):g}function S(g,o){return Object.prototype.hasOwnProperty.call(g,o)}v.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",v.getMessageFromCode=n,v.isValidCode=r,v.serializeError=function(g,{fallbackError:o=h,shouldIncludeStack:s=!1}={}){var f,l;if(!o||!Number.isInteger(o.code)||"string"!=typeof o.message)throw new Error("Must provide fallback error with integer number code and string message.");if(g instanceof y.EthereumRpcError)return g.serialize();const p={};if(g&&"object"==typeof g&&!Array.isArray(g)&&S(g,"code")&&r(g.code)){const E=g;p.code=E.code,E.message&&"string"==typeof E.message?(p.message=E.message,S(E,"data")&&(p.data=E.data)):(p.message=n(p.code),p.data={originalError:d(g)})}else{p.code=o.code;const E=null===(f=g)||void 0===f?void 0:f.message;p.message=E&&"string"==typeof E?E:o.message,p.data={originalError:d(g)}}const _=null===(l=g)||void 0===l?void 0:l.stack;return s&&g&&_&&"string"==typeof _&&(p.stack=_),p}},7187:O=>{"use strict";var v,i="object"==typeof Reflect?Reflect:null,e=i&&"function"==typeof i.apply?i.apply:function(l,p,_){return Function.prototype.apply.call(l,p,_)};v=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(l){return Object.getOwnPropertyNames(l).concat(Object.getOwnPropertySymbols(l))}:function(l){return Object.getOwnPropertyNames(l)};var y=Number.isNaN||function(l){return l!=l};function c(){c.init.call(this)}O.exports=c,O.exports.once=function(l,p){return new Promise(function(_,E){function j(F){l.removeListener(p,M),E(F)}function M(){"function"==typeof l.removeListener&&l.removeListener("error",j),_([].slice.call(arguments))}var F;f(l,p,M,{once:!0}),"error"!==p&&("function"==typeof(F=l).on&&f(F,"error",j,{once:!0}))})},c.EventEmitter=c,c.prototype._events=void 0,c.prototype._eventsCount=0,c.prototype._maxListeners=void 0;var h=10;function n(l){if("function"!=typeof l)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof l)}function r(l){return void 0===l._maxListeners?c.defaultMaxListeners:l._maxListeners}function a(l,p,_,E){var j,M,F;if(n(_),void 0===(M=l._events)?(M=l._events=Object.create(null),l._eventsCount=0):(void 0!==M.newListener&&(l.emit("newListener",p,_.listener?_.listener:_),M=l._events),F=M[p]),void 0===F)F=M[p]=_,++l._eventsCount;else if("function"==typeof F?F=M[p]=E?[_,F]:[F,_]:E?F.unshift(_):F.push(_),(j=r(l))>0&&F.length>j&&!F.warned){F.warned=!0;var U=new Error("Possible EventEmitter memory leak detected. "+F.length+" "+String(p)+" listeners added. Use emitter.setMaxListeners() to increase limit");U.name="MaxListenersExceededWarning",U.emitter=l,U.type=p,U.count=F.length,console&&console.warn&&console.warn(U)}return l}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function S(l,p,_){var E={fired:!1,wrapFn:void 0,target:l,type:p,listener:_},j=d.bind(E);return j.listener=_,E.wrapFn=j,j}function g(l,p,_){var E=l._events;if(void 0===E)return[];var j=E[p];return void 0===j?[]:"function"==typeof j?_?[j.listener||j]:[j]:_?function(M){for(var F=new Array(M.length),K=0;K0&&(M=p[0]),M instanceof Error)throw M;var F=new Error("Unhandled error."+(M?" ("+M.message+")":""));throw F.context=M,F}var K=j[l];if(void 0===K)return!1;if("function"==typeof K)e(K,this,p);else{var U=K.length,L=s(K,U);for(_=0;_=0;M--)if(_[M]===p||_[M].listener===p){F=_[M].listener,j=M;break}if(j<0)return this;0===j?_.shift():function(K,U){for(;U+1=0;E--)this.removeListener(l,p[E]);return this},c.prototype.listeners=function(l){return g(this,l,!0)},c.prototype.rawListeners=function(l){return g(this,l,!1)},c.listenerCount=function(l,p){return"function"==typeof l.listenerCount?l.listenerCount(p):o.call(l,p)},c.prototype.listenerCount=o,c.prototype.eventNames=function(){return this._eventsCount>0?v(this._events):[]}},4063:O=>{"use strict";O.exports=function v(i,e){if(i===e)return!0;if(i&&e&&"object"==typeof i&&"object"==typeof e){if(i.constructor!==e.constructor)return!1;var y,c,h;if(Array.isArray(i)){if((y=i.length)!=e.length)return!1;for(c=y;0!=c--;)if(!v(i[c],e[c]))return!1;return!0}if(i.constructor===RegExp)return i.source===e.source&&i.flags===e.flags;if(i.valueOf!==Object.prototype.valueOf)return i.valueOf()===e.valueOf();if(i.toString!==Object.prototype.toString)return i.toString()===e.toString();if((y=(h=Object.keys(i)).length)!==Object.keys(e).length)return!1;for(c=y;0!=c--;)if(!Object.prototype.hasOwnProperty.call(e,h[c]))return!1;for(c=y;0!=c--;){var n=h[c];if(!v(i[n],e[n]))return!1}return!0}return i!=i&&e!=e}},4445:O=>{O.exports=h,h.default=h,h.stable=d,h.stableStringify=d;var v="[...]",i="[Circular]",e=[],y=[];function c(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function h(o,s,f,l){var p;void 0===l&&(l=c()),r(o,"",0,[],void 0,0,l);try{p=0===y.length?JSON.stringify(o,s,f):JSON.stringify(o,g(s),f)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==e.length;){var _=e.pop();4===_.length?Object.defineProperty(_[0],_[1],_[3]):_[0][_[1]]=_[2]}}return p}function n(o,s,f,l){var p=Object.getOwnPropertyDescriptor(l,f);void 0!==p.get?p.configurable?(Object.defineProperty(l,f,{value:o}),e.push([l,f,s,p])):y.push([s,f,o]):(l[f]=o,e.push([l,f,s]))}function r(o,s,f,l,p,_,E){var j;if(_+=1,"object"==typeof o&&null!==o){for(j=0;jE.depthLimit||void 0!==E.edgesLimit&&f+1>E.edgesLimit)return void n(v,o,s,p);if(l.push(o),Array.isArray(o))for(j=0;js?1:0}function d(o,s,f,l){void 0===l&&(l=c());var p,_=S(o,"",0,[],void 0,0,l)||o;try{p=0===y.length?JSON.stringify(_,s,f):JSON.stringify(_,g(s),f)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==e.length;){var E=e.pop();4===E.length?Object.defineProperty(E[0],E[1],E[3]):E[0][E[1]]=E[2]}}return p}function S(o,s,f,l,p,_,E){var j;if(_+=1,"object"==typeof o&&null!==o){for(j=0;jE.depthLimit||void 0!==E.edgesLimit&&f+1>E.edgesLimit)return void n(v,o,s,p);if(l.push(o),Array.isArray(o))for(j=0;j0)for(var l=0;l{"use strict";var e=i(5320),y=Object.prototype.toString,c=Object.prototype.hasOwnProperty,h=function(a,d,S){for(var g=0,o=a.length;g=3&&(g=S),"[object Array]"===y.call(a)?h(a,d,g):"string"==typeof a?n(a,d,g):r(a,d,g)}},7648:O=>{"use strict";var v="Function.prototype.bind called on incompatible ",i=Array.prototype.slice,e=Object.prototype.toString,y="[object Function]";O.exports=function(c){var h=this;if("function"!=typeof h||e.call(h)!==y)throw new TypeError(v+h);for(var n,r=i.call(arguments,1),a=function(){if(this instanceof n){var s=h.apply(this,r.concat(i.call(arguments)));return Object(s)===s?s:this}return h.apply(c,r.concat(i.call(arguments)))},d=Math.max(0,h.length-r.length),S=[],g=0;g{"use strict";var e=i(7648);O.exports=Function.prototype.bind||e},210:(O,v,i)=>{"use strict";var e,y=SyntaxError,c=Function,h=TypeError,n=function(et){try{return c('"use strict"; return ('+et+").constructor;")()}catch{}},r=Object.getOwnPropertyDescriptor;if(r)try{r({},"")}catch{r=null}var a=function(){throw new h},d=r?function(){try{return a}catch{try{return r(arguments,"callee").get}catch{return a}}}():a,S=i(1405)(),g=Object.getPrototypeOf||function(et){return et.__proto__},o={},s=typeof Uint8Array>"u"?e:g(Uint8Array),f={"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":S?g([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":o,"%AsyncGenerator%":o,"%AsyncGeneratorFunction%":o,"%AsyncIteratorPrototype%":o,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":c,"%GeneratorFunction%":o,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":S?g(g([][Symbol.iterator]())):e,"%JSON%":"object"==typeof JSON?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map<"u"&&S?g((new Map)[Symbol.iterator]()):e,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set<"u"&&S?g((new Set)[Symbol.iterator]()):e,"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":S?g(""[Symbol.iterator]()):e,"%Symbol%":S?Symbol:e,"%SyntaxError%":y,"%ThrowTypeError%":d,"%TypedArray%":s,"%TypeError%":h,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet},l=function et(Z){var at;if("%AsyncFunction%"===Z)at=n("async function () {}");else if("%GeneratorFunction%"===Z)at=n("function* () {}");else if("%AsyncGeneratorFunction%"===Z)at=n("async function* () {}");else if("%AsyncGenerator%"===Z){var ut=et("%AsyncGeneratorFunction%");ut&&(at=ut.prototype)}else if("%AsyncIteratorPrototype%"===Z){var I=et("%AsyncGenerator%");I&&(at=g(I.prototype))}return f[Z]=at,at},p={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},_=i(8612),E=i(7642),j=_.call(Function.call,Array.prototype.concat),M=_.call(Function.apply,Array.prototype.splice),F=_.call(Function.call,String.prototype.replace),K=_.call(Function.call,String.prototype.slice),U=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,L=/\\(\\)?/g,$=function(et){var Z=K(et,0,1),at=K(et,-1);if("%"===Z&&"%"!==at)throw new y("invalid intrinsic syntax, expected closing `%`");if("%"===at&&"%"!==Z)throw new y("invalid intrinsic syntax, expected opening `%`");var ut=[];return F(et,U,function(I,m,D,A){ut[ut.length]=D?F(A,L,"$1"):m||I}),ut},ot=function(et,Z){var at,ut=et;if(E(p,ut)&&(ut="%"+(at=p[ut])[0]+"%"),E(f,ut)){var I=f[ut];if(I===o&&(I=l(ut)),void 0===I&&!Z)throw new h("intrinsic "+et+" exists, but is not available. Please file an issue!");return{alias:at,name:ut,value:I}}throw new y("intrinsic "+et+" does not exist!")};O.exports=function(et,Z){if("string"!=typeof et||0===et.length)throw new h("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof Z)throw new h('"allowMissing" argument must be a boolean');var at=$(et),ut=at.length>0?at[0]:"",I=ot("%"+ut+"%",Z),m=I.name,D=I.value,A=!1,R=I.alias;R&&(ut=R[0],M(at,j([0,1],R)));for(var z=1,G=!0;z=at.length){var T=r(D,Q);D=(G=!!T)&&"get"in T&&!("originalValue"in T.get)?T.get:D[Q]}else G=E(D,Q),D=D[Q];G&&!A&&(f[m]=D)}}return D}},1405:(O,v,i)=>{"use strict";var e=typeof Symbol<"u"&&Symbol,y=i(5419);O.exports=function(){return"function"==typeof e&&"function"==typeof Symbol&&"symbol"==typeof e("foo")&&"symbol"==typeof Symbol("bar")&&y()}},5419:O=>{"use strict";O.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var v={},i=Symbol("test"),e=Object(i);if("string"==typeof i||"[object Symbol]"!==Object.prototype.toString.call(i)||"[object Symbol]"!==Object.prototype.toString.call(e))return!1;for(i in v[i]=42,v)return!1;if("function"==typeof Object.keys&&0!==Object.keys(v).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(v).length)return!1;var y=Object.getOwnPropertySymbols(v);if(1!==y.length||y[0]!==i||!Object.prototype.propertyIsEnumerable.call(v,i))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var c=Object.getOwnPropertyDescriptor(v,i);if(42!==c.value||!0!==c.enumerable)return!1}return!0}},6410:(O,v,i)=>{"use strict";var e=i(5419);O.exports=function(){return e()&&!!Symbol.toStringTag}},7642:(O,v,i)=>{"use strict";var e=i(8612);O.exports=e.call(Function.call,Object.prototype.hasOwnProperty)},3349:(O,v,i)=>{"use strict";var e=i(9509).Buffer,y=i(8473).Transform;function c(h){y.call(this),this._block=e.allocUnsafe(h),this._blockSize=h,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}i(5717)(c,y),c.prototype._transform=function(h,n,r){var a=null;try{this.update(h,n)}catch(d){a=d}r(a)},c.prototype._flush=function(h){var n=null;try{this.push(this.digest())}catch(r){n=r}h(n)},c.prototype.update=function(h,n){if(function(o,s){if(!e.isBuffer(o)&&"string"!=typeof o)throw new TypeError("Data must be a string or a buffer")}(h),this._finalized)throw new Error("Digest already called");e.isBuffer(h)||(h=e.from(h,n));for(var r=this._block,a=0;this._blockOffset+h.length-a>=this._blockSize;){for(var d=this._blockOffset;d0;++S)this._length[S]+=g,(g=this._length[S]/4294967296|0)>0&&(this._length[S]-=4294967296*g);return this},c.prototype._update=function(){throw new Error("_update is not implemented")},c.prototype.digest=function(h){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var n=this._digest();void 0!==h&&(n=n.toString(h)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return n},c.prototype._digest=function(){throw new Error("_digest is not implemented")},O.exports=c},645:(O,v)=>{v.read=function(i,e,y,c,h){var n,r,a=8*h-c-1,d=(1<>1,g=-7,o=y?h-1:0,s=y?-1:1,f=i[e+o];for(o+=s,n=f&(1<<-g)-1,f>>=-g,g+=a;g>0;n=256*n+i[e+o],o+=s,g-=8);for(r=n&(1<<-g)-1,n>>=-g,g+=c;g>0;r=256*r+i[e+o],o+=s,g-=8);if(0===n)n=1-S;else{if(n===d)return r?NaN:1/0*(f?-1:1);r+=Math.pow(2,c),n-=S}return(f?-1:1)*r*Math.pow(2,n-c)},v.write=function(i,e,y,c,h,n){var r,a,d,S=8*n-h-1,g=(1<>1,s=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,f=c?0:n-1,l=c?1:-1,p=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,r=g):(r=Math.floor(Math.log(e)/Math.LN2),e*(d=Math.pow(2,-r))<1&&(r--,d*=2),(e+=r+o>=1?s/d:s*Math.pow(2,1-o))*d>=2&&(r++,d/=2),r+o>=g?(a=0,r=g):r+o>=1?(a=(e*d-1)*Math.pow(2,h),r+=o):(a=e*Math.pow(2,o-1)*Math.pow(2,h),r=0));h>=8;i[y+f]=255&a,f+=l,a/=256,h-=8);for(r=r<0;i[y+f]=255&r,f+=l,r/=256,S-=8);i[y+f-l]|=128*p}},5717:O=>{O.exports="function"==typeof Object.create?function(v,i){i&&(v.super_=i,v.prototype=Object.create(i.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}))}:function(v,i){if(i){v.super_=i;var e=function(){};e.prototype=i.prototype,v.prototype=new e,v.prototype.constructor=v}}},2584:(O,v,i)=>{"use strict";var e=i(6410)(),y=i(1924)("Object.prototype.toString"),c=function(r){return!(e&&r&&"object"==typeof r&&Symbol.toStringTag in r)&&"[object Arguments]"===y(r)},h=function(r){return!!c(r)||null!==r&&"object"==typeof r&&"number"==typeof r.length&&r.length>=0&&"[object Array]"!==y(r)&&"[object Function]"===y(r.callee)},n=function(){return c(arguments)}();c.isLegacyArguments=h,O.exports=n?c:h},5320:O=>{"use strict";var v,i,e=Function.prototype.toString,y="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof y&&"function"==typeof Object.defineProperty)try{v=Object.defineProperty({},"length",{get:function(){throw i}}),i={},y(function(){throw 42},null,v)}catch(d){d!==i&&(y=null)}else y=null;var c=/^\s*class\b/,h=function(d){try{var S=e.call(d);return c.test(S)}catch{return!1}},n=Object.prototype.toString,r="function"==typeof Symbol&&!!Symbol.toStringTag,a="object"==typeof document&&void 0===document.all&&void 0!==document.all?document.all:{};O.exports=y?function(d){if(d===a)return!0;if(!d||"function"!=typeof d&&"object"!=typeof d)return!1;if("function"==typeof d&&!d.prototype)return!0;try{y(d,null,v)}catch(S){if(S!==i)return!1}return!h(d)}:function(d){if(d===a)return!0;if(!d||"function"!=typeof d&&"object"!=typeof d)return!1;if("function"==typeof d&&!d.prototype)return!0;if(r)return function(g){try{return!h(g)&&(e.call(g),!0)}catch{return!1}}(d);if(h(d))return!1;var S=n.call(d);return"[object Function]"===S||"[object GeneratorFunction]"===S}},8662:(O,v,i)=>{"use strict";var e,y=Object.prototype.toString,c=Function.prototype.toString,h=/^\s*(?:function)?\*/,n=i(6410)(),r=Object.getPrototypeOf;O.exports=function(a){if("function"!=typeof a)return!1;if(h.test(c.call(a)))return!0;if(!n)return"[object GeneratorFunction]"===y.call(a);if(!r)return!1;if(void 0===e){var d=function(){if(!n)return!1;try{return Function("return function*() {}")()}catch{}}();e=!!d&&r(d)}return r(a)===e}},4970:O=>{"use strict";const v=i=>null!==i&&"object"==typeof i&&"function"==typeof i.pipe;v.writable=i=>v(i)&&!1!==i.writable&&"function"==typeof i._write&&"object"==typeof i._writableState,v.readable=i=>v(i)&&!1!==i.readable&&"function"==typeof i._read&&"object"==typeof i._readableState,v.duplex=i=>v.writable(i)&&v.readable(i),v.transform=i=>v.duplex(i)&&"function"==typeof i._transform,O.exports=v},5692:(O,v,i)=>{"use strict";var e=i(4029),y=i(3083),c=i(1924),h=c("Object.prototype.toString"),n=i(6410)(),r=typeof globalThis>"u"?i.g:globalThis,a=y(),d=c("Array.prototype.indexOf",!0)||function(f,l){for(var p=0;p-1}return!!o&&(p=f,_=!1,e(g,function(E,j){if(!_)try{_=E.call(p)===j}catch{}}),_);var p,_}},5811:(O,v,i)=>{O.exports=i(6066)(i(9653))},6066:(O,v,i)=>{const e=i(7016),y=i(5675);O.exports=function(c){const h=e(c),n=y(c);return function(r,a){switch("string"==typeof r?r.toLowerCase():r){case"keccak224":return new h(1152,448,null,224,a);case"keccak256":return new h(1088,512,null,256,a);case"keccak384":return new h(832,768,null,384,a);case"keccak512":return new h(576,1024,null,512,a);case"sha3-224":return new h(1152,448,6,224,a);case"sha3-256":return new h(1088,512,6,256,a);case"sha3-384":return new h(832,768,6,384,a);case"sha3-512":return new h(576,1024,6,512,a);case"shake128":return new n(1344,256,31,a);case"shake256":return new n(1088,512,31,a);default:throw new Error("Invald algorithm: "+r)}}}},7016:(O,v,i)=>{var e=i(8764).Buffer;const{Transform:y}=i(8473);O.exports=c=>class je extends y{constructor(n,r,a,d,S){super(S),this._rate=n,this._capacity=r,this._delimitedSuffix=a,this._hashBitLength=d,this._options=S,this._state=new c,this._state.initialize(n,r),this._finalized=!1}_transform(n,r,a){let d=null;try{this.update(n,r)}catch(S){d=S}a(d)}_flush(n){let r=null;try{this.push(this.digest())}catch(a){r=a}n(r)}update(n,r){if(!e.isBuffer(n)&&"string"!=typeof n)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return e.isBuffer(n)||(n=e.from(n,r)),this._state.absorb(n),this}digest(n){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let r=this._state.squeeze(this._hashBitLength/8);return void 0!==n&&(r=r.toString(n)),this._resetState(),r}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const n=new je(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(n._state),n._finalized=this._finalized,n}}},5675:(O,v,i)=>{var e=i(8764).Buffer;const{Transform:y}=i(8473);O.exports=c=>class xe extends y{constructor(n,r,a,d){super(d),this._rate=n,this._capacity=r,this._delimitedSuffix=a,this._options=d,this._state=new c,this._state.initialize(n,r),this._finalized=!1}_transform(n,r,a){let d=null;try{this.update(n,r)}catch(S){d=S}a(d)}_flush(){}_read(n){this.push(this.squeeze(n))}update(n,r){if(!e.isBuffer(n)&&"string"!=typeof n)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return e.isBuffer(n)||(n=e.from(n,r)),this._state.absorb(n),this}squeeze(n,r){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let a=this._state.squeeze(n);return void 0!==r&&(a=a.toString(r)),a}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const n=new xe(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(n._state),n._finalized=this._finalized,n}}},4040:(O,v)=>{const i=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];v.p1600=function(e){for(let y=0;y<24;++y){const c=e[0]^e[10]^e[20]^e[30]^e[40],h=e[1]^e[11]^e[21]^e[31]^e[41],n=e[2]^e[12]^e[22]^e[32]^e[42],r=e[3]^e[13]^e[23]^e[33]^e[43],a=e[4]^e[14]^e[24]^e[34]^e[44],d=e[5]^e[15]^e[25]^e[35]^e[45],S=e[6]^e[16]^e[26]^e[36]^e[46],g=e[7]^e[17]^e[27]^e[37]^e[47],o=e[8]^e[18]^e[28]^e[38]^e[48],s=e[9]^e[19]^e[29]^e[39]^e[49];let f=o^(n<<1|r>>>31),l=s^(r<<1|n>>>31);const p=e[0]^f,_=e[1]^l,E=e[10]^f,j=e[11]^l,M=e[20]^f,F=e[21]^l,K=e[30]^f,U=e[31]^l,L=e[40]^f,$=e[41]^l;f=c^(a<<1|d>>>31),l=h^(d<<1|a>>>31);const ot=e[2]^f,et=e[3]^l,Z=e[12]^f,at=e[13]^l,ut=e[22]^f,I=e[23]^l,m=e[32]^f,D=e[33]^l,A=e[42]^f,R=e[43]^l;f=n^(S<<1|g>>>31),l=r^(g<<1|S>>>31);const z=e[4]^f,G=e[5]^l,Q=e[14]^f,nt=e[15]^l,J=e[24]^f,T=e[25]^l,k=e[34]^f,t=e[35]^l,u=e[44]^f,b=e[45]^l;f=a^(o<<1|s>>>31),l=d^(s<<1|o>>>31);const C=e[6]^f,x=e[7]^l,N=e[16]^f,X=e[17]^l,ct=e[26]^f,pt=e[27]^l,gt=e[36]^f,yt=e[37]^l,bt=e[46]^f,Et=e[47]^l;f=S^(c<<1|h>>>31),l=g^(h<<1|c>>>31);const Rt=e[8]^f,Mt=e[9]^l,Vt=e[18]^f,Pt=e[19]^l,Nt=e[28]^f,qt=e[29]^l,Ut=e[38]^f,ce=e[39]^l,he=e[48]^f,me=e[49]^l,Zt=p,St=_,Bt=j<<4|E>>>28,Qt=E<<4|j>>>28,re=M<<3|F>>>29,zt=F<<3|M>>>29,ne=U<<9|K>>>23,Ht=K<<9|U>>>23,Xt=L<<18|$>>>14,ie=$<<18|L>>>14,oe=ot<<1|et>>>31,te=et<<1|ot>>>31,fe=at<<12|Z>>>20,se=Z<<12|at>>>20,q=ut<<10|I>>>22,H=I<<10|ut>>>22,it=D<<13|m>>>19,ft=m<<13|D>>>19,vt=A<<2|R>>>30,Ot=R<<2|A>>>30,At=G<<30|z>>>2,It=z<<30|G>>>2,jt=Q<<6|nt>>>26,xt=nt<<6|Q>>>26,kt=T<<11|J>>>21,Jt=J<<11|T>>>21,Yt=k<<15|t>>>17,Kt=t<<15|k>>>17,Gt=b<<29|u>>>3,Wt=u<<29|b>>>3,Lt=C<<28|x>>>4,de=x<<28|C>>>4,ee=X<<23|N>>>9,W=N<<23|X>>>9,w=ct<<25|pt>>>7,P=pt<<25|ct>>>7,B=gt<<21|yt>>>11,V=yt<<21|gt>>>11,tt=Et<<24|bt>>>8,Y=bt<<24|Et>>>8,st=Rt<<27|Mt>>>5,rt=Mt<<27|Rt>>>5,lt=Vt<<20|Pt>>>12,ht=Pt<<20|Vt>>>12,dt=qt<<7|Nt>>>25,mt=Nt<<7|qt>>>25,_t=Ut<<8|ce>>>24,Dt=ce<<8|Ut>>>24,Ct=he<<14|me>>>18,Ft=me<<14|he>>>18;e[0]=Zt^~fe&kt,e[1]=St^~se&Jt,e[10]=Lt^~lt&re,e[11]=de^~ht&zt,e[20]=oe^~jt&w,e[21]=te^~xt&P,e[30]=st^~Bt&q,e[31]=rt^~Qt&H,e[40]=At^~ee&dt,e[41]=It^~W&mt,e[2]=fe^~kt&B,e[3]=se^~Jt&V,e[12]=lt^~re&it,e[13]=ht^~zt&ft,e[22]=jt^~w&_t,e[23]=xt^~P&Dt,e[32]=Bt^~q&Yt,e[33]=Qt^~H&Kt,e[42]=ee^~dt&ne,e[43]=W^~mt&Ht,e[4]=kt^~B&Ct,e[5]=Jt^~V&Ft,e[14]=re^~it&Gt,e[15]=zt^~ft&Wt,e[24]=w^~_t&Xt,e[25]=P^~Dt&ie,e[34]=q^~Yt&tt,e[35]=H^~Kt&Y,e[44]=dt^~ne&vt,e[45]=mt^~Ht&Ot,e[6]=B^~Ct&Zt,e[7]=V^~Ft&St,e[16]=it^~Gt&Lt,e[17]=ft^~Wt&de,e[26]=_t^~Xt&oe,e[27]=Dt^~ie&te,e[36]=Yt^~tt&st,e[37]=Kt^~Y&rt,e[46]=ne^~vt&At,e[47]=Ht^~Ot&It,e[8]=Ct^~Zt&fe,e[9]=Ft^~St&se,e[18]=Gt^~Lt<,e[19]=Wt^~de&ht,e[28]=Xt^~oe&jt,e[29]=ie^~te&xt,e[38]=tt^~st&Bt,e[39]=Y^~rt&Qt,e[48]=vt^~At&ee,e[49]=Ot^~It&W,e[0]^=i[2*y],e[1]^=i[2*y+1]}}},9653:(O,v,i)=>{var e=i(8764).Buffer;const y=i(4040);function c(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}c.prototype.initialize=function(h,n){for(let r=0;r<50;++r)this.state[r]=0;this.blockSize=h/8,this.count=0,this.squeezing=!1},c.prototype.absorb=function(h){for(let n=0;n>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(y.p1600(this.state),this.count=0);return n},c.prototype.copy=function(h){for(let n=0;n<50;++n)h.state[n]=this.state[n];h.blockSize=this.blockSize,h.count=this.count,h.squeezing=this.squeezing},O.exports=c},2378:(O,v,i)=>{O=i.nmd(O);var e="__lodash_hash_undefined__",y=9007199254740991,c="[object Arguments]",h="[object Function]",n="[object Object]",r=/^\[object .+?Constructor\]$/,a=/^(?:0|[1-9]\d*)$/,d={};d["[object Float32Array]"]=d["[object Float64Array]"]=d["[object Int8Array]"]=d["[object Int16Array]"]=d["[object Int32Array]"]=d["[object Uint8Array]"]=d["[object Uint8ClampedArray]"]=d["[object Uint16Array]"]=d["[object Uint32Array]"]=!0,d[c]=d["[object Array]"]=d["[object ArrayBuffer]"]=d["[object Boolean]"]=d["[object DataView]"]=d["[object Date]"]=d["[object Error]"]=d[h]=d["[object Map]"]=d["[object Number]"]=d[n]=d["[object RegExp]"]=d["[object Set]"]=d["[object String]"]=d["[object WeakMap]"]=!1;var S="object"==typeof i.g&&i.g&&i.g.Object===Object&&i.g,g="object"==typeof self&&self&&self.Object===Object&&self,o=S||g||Function("return this")(),s=v&&!v.nodeType&&v,f=s&&O&&!O.nodeType&&O,l=f&&f.exports===s,p=l&&S.process,_=function(){try{return f&&f.require&&f.require("util").types||p&&p.binding&&p.binding("util")}catch{}}(),E=_&&_.isTypedArray;function j(q,H,it){switch(it.length){case 0:return q.call(H);case 1:return q.call(H,it[0]);case 2:return q.call(H,it[0],it[1]);case 3:return q.call(H,it[0],it[1],it[2])}return q.apply(H,it)}var M,F,K,U=Array.prototype,$=Object.prototype,ot=o["__core-js_shared__"],et=Function.prototype.toString,Z=$.hasOwnProperty,at=(M=/[^.]+$/.exec(ot&&ot.keys&&ot.keys.IE_PROTO||""))?"Symbol(src)_1."+M:"",ut=$.toString,I=et.call(Object),m=RegExp("^"+et.call(Z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),D=l?o.Buffer:void 0,A=o.Symbol,R=o.Uint8Array,z=(F=Object.getPrototypeOf,K=Object,function(q){return F(K(q))}),G=Object.create,Q=$.propertyIsEnumerable,nt=U.splice,J=A?A.toStringTag:void 0,T=function(){try{var q=qt(Object,"defineProperty");return q({},"",{}),q}catch{}}(),k=D?D.isBuffer:void 0,t=Math.max,u=Date.now,b=qt(o,"Map"),C=qt(Object,"create"),x=function(){function q(){}return function(H){if(!Ht(H))return{};if(G)return G(H);q.prototype=H;var it=new q;return q.prototype=void 0,it}}();function N(q){var H=-1,it=null==q?0:q.length;for(this.clear();++H-1},X.prototype.set=function(q,H){var it=this.__data__,ft=bt(it,q);return ft<0?(++this.size,it.push([q,H])):it[ft][1]=H,this},ct.prototype.clear=function(){this.size=0,this.__data__={hash:new N,map:new(b||X),string:new N}},ct.prototype.delete=function(q){var H=Nt(this,q).delete(q);return this.size-=H?1:0,H},ct.prototype.get=function(q){return Nt(this,q).get(q)},ct.prototype.has=function(q){return Nt(this,q).has(q)},ct.prototype.set=function(q,H){var it=Nt(this,q),ft=it.size;return it.set(q,H),this.size+=it.size==ft?0:1,this},pt.prototype.clear=function(){this.__data__=new X,this.size=0},pt.prototype.delete=function(q){var H=this.__data__,it=H.delete(q);return this.size=H.size,it},pt.prototype.get=function(q){return this.__data__.get(q)},pt.prototype.has=function(q){return this.__data__.has(q)},pt.prototype.set=function(q,H){var it=this.__data__;if(it instanceof X){var ft=it.__data__;if(!b||ft.length<199)return ft.push([q,H]),this.size=++it.size,this;it=this.__data__=new ct(ft)}return it.set(q,H),this.size=it.size,this};var Pt=T?function(q,H){return T(q,"toString",{configurable:!0,enumerable:!1,value:(it=H,function(){return it}),writable:!0});var it}:se;function Nt(q,H){var it,ft,vt=q.__data__;return("string"==(ft=typeof(it=H))||"number"==ft||"symbol"==ft||"boolean"==ft?"__proto__"!==it:null===it)?vt["string"==typeof H?"string":"hash"]:vt.map}function qt(q,H){var ft,it=null==(ft=q)?void 0:ft[H];return function(ft){return!(!Ht(ft)||function(vt){return!!at&&at in vt}(ft))&&(zt(ft)?m:r).test(function(vt){if(null!=vt){try{return et.call(vt)}catch{}try{return vt+""}catch{}}return""}(ft))}(it)?it:void 0}function Ut(q,H){var it=typeof q;return!!(H=H??y)&&("number"==it||"symbol"!=it&&a.test(q))&&q>-1&&q%1==0&&q0){if(++H>=800)return arguments[0]}else H=0;return q.apply(void 0,arguments)});function Zt(q,H){return q===H||q!=q&&H!=H}var St=Mt(function(){return arguments}())?Mt:function(q){return Xt(q)&&Z.call(q,"callee")&&!Q.call(q,"callee")},Bt=Array.isArray;function Qt(q){return null!=q&&ne(q.length)&&!zt(q)}var re=k||function(){return!1};function zt(q){if(!Ht(q))return!1;var H=Rt(q);return H==h||"[object GeneratorFunction]"==H||"[object AsyncFunction]"==H||"[object Proxy]"==H}function ne(q){return"number"==typeof q&&q>-1&&q%1==0&&q<=y}function Ht(q){var H=typeof q;return null!=q&&("object"==H||"function"==H)}function Xt(q){return null!=q&&"object"==typeof q}var ie=E?function(q){return function(H){return q(H)}}(E):function(q){return Xt(q)&&ne(q.length)&&!!d[Rt(q)]};function oe(q){return Qt(q)?function(H,it){var ft=Bt(H),vt=!ft&&St(H),Ot=!ft&&!vt&&re(H),At=!ft&&!vt&&!Ot&&ie(H),It=ft||vt||Ot||At,jt=It?function(Jt,Yt){for(var Kt=-1,Gt=Array(Jt);++Kt1?H[ft-1]:void 0,Ot=ft>2?H[2]:void 0;for(vt=te.length>3&&"function"==typeof vt?(ft--,vt):void 0,Ot&&function(It,jt,xt){if(!Ht(xt))return!1;var kt=typeof jt;return!!("number"==kt?Qt(xt)&&Ut(jt,xt.length):"string"==kt&&jt in xt)&&Zt(xt[jt],It)}(H[0],H[1],Ot)&&(vt=ft<3?void 0:vt,ft=1),q=Object(q);++it=0&&Z<=L.levels.SILENT))throw"log.setLevel() called with invalid level: "+Z;if(U=Z,!1!==at&&function(ut){var I=(d[ut]||"silent").toUpperCase();if(typeof window!==r&&$){try{return void(window.localStorage[$]=I)}catch{}try{window.document.cookie=encodeURIComponent($)+"="+I+";"}catch{}}}(Z),s.call(L,Z,M),typeof console===r&&Z{"use strict";var e=i(5717),y=i(3349),c=i(9509).Buffer,h=new Array(16);function n(){y.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function r(o,s){return o<>>32-s}function a(o,s,f,l,p,_,E){return r(o+(s&f|~s&l)+p+_|0,E)+s|0}function d(o,s,f,l,p,_,E){return r(o+(s&l|f&~l)+p+_|0,E)+s|0}function S(o,s,f,l,p,_,E){return r(o+(s^f^l)+p+_|0,E)+s|0}function g(o,s,f,l,p,_,E){return r(o+(f^(s|~l))+p+_|0,E)+s|0}e(n,y),n.prototype._update=function(){for(var o=h,s=0;s<16;++s)o[s]=this._block.readInt32LE(4*s);var f=this._a,l=this._b,p=this._c,_=this._d;f=a(f,l,p,_,o[0],3614090360,7),_=a(_,f,l,p,o[1],3905402710,12),p=a(p,_,f,l,o[2],606105819,17),l=a(l,p,_,f,o[3],3250441966,22),f=a(f,l,p,_,o[4],4118548399,7),_=a(_,f,l,p,o[5],1200080426,12),p=a(p,_,f,l,o[6],2821735955,17),l=a(l,p,_,f,o[7],4249261313,22),f=a(f,l,p,_,o[8],1770035416,7),_=a(_,f,l,p,o[9],2336552879,12),p=a(p,_,f,l,o[10],4294925233,17),l=a(l,p,_,f,o[11],2304563134,22),f=a(f,l,p,_,o[12],1804603682,7),_=a(_,f,l,p,o[13],4254626195,12),p=a(p,_,f,l,o[14],2792965006,17),f=d(f,l=a(l,p,_,f,o[15],1236535329,22),p,_,o[1],4129170786,5),_=d(_,f,l,p,o[6],3225465664,9),p=d(p,_,f,l,o[11],643717713,14),l=d(l,p,_,f,o[0],3921069994,20),f=d(f,l,p,_,o[5],3593408605,5),_=d(_,f,l,p,o[10],38016083,9),p=d(p,_,f,l,o[15],3634488961,14),l=d(l,p,_,f,o[4],3889429448,20),f=d(f,l,p,_,o[9],568446438,5),_=d(_,f,l,p,o[14],3275163606,9),p=d(p,_,f,l,o[3],4107603335,14),l=d(l,p,_,f,o[8],1163531501,20),f=d(f,l,p,_,o[13],2850285829,5),_=d(_,f,l,p,o[2],4243563512,9),p=d(p,_,f,l,o[7],1735328473,14),f=S(f,l=d(l,p,_,f,o[12],2368359562,20),p,_,o[5],4294588738,4),_=S(_,f,l,p,o[8],2272392833,11),p=S(p,_,f,l,o[11],1839030562,16),l=S(l,p,_,f,o[14],4259657740,23),f=S(f,l,p,_,o[1],2763975236,4),_=S(_,f,l,p,o[4],1272893353,11),p=S(p,_,f,l,o[7],4139469664,16),l=S(l,p,_,f,o[10],3200236656,23),f=S(f,l,p,_,o[13],681279174,4),_=S(_,f,l,p,o[0],3936430074,11),p=S(p,_,f,l,o[3],3572445317,16),l=S(l,p,_,f,o[6],76029189,23),f=S(f,l,p,_,o[9],3654602809,4),_=S(_,f,l,p,o[12],3873151461,11),p=S(p,_,f,l,o[15],530742520,16),f=g(f,l=S(l,p,_,f,o[2],3299628645,23),p,_,o[0],4096336452,6),_=g(_,f,l,p,o[7],1126891415,10),p=g(p,_,f,l,o[14],2878612391,15),l=g(l,p,_,f,o[5],4237533241,21),f=g(f,l,p,_,o[12],1700485571,6),_=g(_,f,l,p,o[3],2399980690,10),p=g(p,_,f,l,o[10],4293915773,15),l=g(l,p,_,f,o[1],2240044497,21),f=g(f,l,p,_,o[8],1873313359,6),_=g(_,f,l,p,o[15],4264355552,10),p=g(p,_,f,l,o[6],2734768916,15),l=g(l,p,_,f,o[13],1309151649,21),f=g(f,l,p,_,o[4],4149444226,6),_=g(_,f,l,p,o[11],3174756917,10),p=g(p,_,f,l,o[2],718787259,15),l=g(l,p,_,f,o[9],3951481745,21),this._a=this._a+f|0,this._b=this._b+l|0,this._c=this._c+p|0,this._d=this._d+_|0},n.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var o=c.allocUnsafe(16);return o.writeInt32LE(this._a,0),o.writeInt32LE(this._b,4),o.writeInt32LE(this._c,8),o.writeInt32LE(this._d,12),o},O.exports=n},778:(O,v,i)=>{var e=i(2479);function y(h){var n=function(){return n.called?n.value:(n.called=!0,n.value=h.apply(this,arguments))};return n.called=!1,n}function c(h){var n=function(){if(n.called)throw new Error(n.onceError);return n.called=!0,n.value=h.apply(this,arguments)};return n.onceError=(h.name||"Function wrapped with `once`")+" shouldn't be called more than once",n.called=!1,n}O.exports=e(y),O.exports.strict=e(c),y.proto=y(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return y(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return c(this)},configurable:!0})})},8212:(O,v,i)=>{"use strict";var e=i(4155);O.exports=void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?{nextTick:function(y,c,h,n){if("function"!=typeof y)throw new TypeError('"callback" argument must be a function');var r,a,d=arguments.length;switch(d){case 0:case 1:return e.nextTick(y);case 2:return e.nextTick(function(){y.call(null,c)});case 3:return e.nextTick(function(){y.call(null,c,h)});case 4:return e.nextTick(function(){y.call(null,c,h,n)});default:for(r=new Array(d-1),a=0;a{var v,i,e=O.exports={};function y(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}function h(f){if(v===setTimeout)return setTimeout(f,0);if((v===y||!v)&&setTimeout)return v=setTimeout,setTimeout(f,0);try{return v(f,0)}catch{try{return v.call(null,f,0)}catch{return v.call(this,f,0)}}}!function(){try{v="function"==typeof setTimeout?setTimeout:y}catch{v=y}try{i="function"==typeof clearTimeout?clearTimeout:c}catch{i=c}}();var n,r=[],a=!1,d=-1;function S(){a&&n&&(a=!1,n.length?r=n.concat(r):d=-1,r.length&&g())}function g(){if(!a){var f=h(S);a=!0;for(var l=r.length;l;){for(n=r,r=[];++d1)for(var p=1;p{var e=i(4155),y=i(778),c=i(2840),h=i(1156),n=function(){},r=/^v?\.0/.test(e.version),a=function(o){return"function"==typeof o},d=function(o,s,f,l){l=y(l);var p=!1;o.on("close",function(){p=!0}),c(o,{readable:s,writable:f},function(E){if(E)return l(E);p=!0,l()});var _=!1;return function(E){if(!p&&!_)return _=!0,j=o,r&&h&&(j instanceof(h.ReadStream||n)||j instanceof(h.WriteStream||n))&&a(j.close)?o.close(n):function(j){return j.setHeader&&a(j.abort)}(o)?o.abort():a(o.destroy)?o.destroy():void l(E||new Error("stream was destroyed"));var j}},S=function(o){o()},g=function(o,s){return o.pipe(s)};O.exports=function(){var o,s=Array.prototype.slice.call(arguments),f=a(s[s.length-1]||n)&&s.pop()||n;if(Array.isArray(s[0])&&(s=s[0]),s.length<2)throw new Error("pump requires two streams per minimum");var l=s.map(function(p,_){var E=_0,function(j){o||(o=j),j&&l.forEach(S),E||(l.forEach(S),f(o))})});return s.reduce(g)}},1798:(O,v,i)=>{"use strict";var e=i(4155),y=65536,c=i(9509).Buffer,h=i.g.crypto||i.g.msCrypto;O.exports=h&&h.getRandomValues?function(n,r){if(n>4294967295)throw new RangeError("requested too many random bytes");var a=c.allocUnsafe(n);if(n>0)if(n>y)for(var d=0;d{"use strict";var v={};function i(y,c,h){h||(h=Error);var n=function(r){var a,d;function S(g,o,s){return r.call(this,"string"==typeof c?c:c(g,o,s))||this}return d=r,(a=S).prototype=Object.create(d.prototype),a.prototype.constructor=a,a.__proto__=d,S}(h);n.prototype.name=h.name,n.prototype.code=y,v[y]=n}function e(y,c){if(Array.isArray(y)){var h=y.length;return y=y.map(function(n){return String(n)}),h>2?"one of ".concat(c," ").concat(y.slice(0,h-1).join(", "),", or ")+y[h-1]:2===h?"one of ".concat(c," ").concat(y[0]," or ").concat(y[1]):"of ".concat(c," ").concat(y[0])}return"of ".concat(c," ").concat(String(y))}i("ERR_INVALID_OPT_VALUE",function(y,c){return'The value "'+c+'" is invalid for option "'+y+'"'},TypeError),i("ERR_INVALID_ARG_TYPE",function(y,c,h){var n,a,d,S,o,f;if("string"==typeof c&&"not "===c.substr(0,"not ".length)?(n="must not be",c=c.replace(/^not /,"")):n="must be",o=y,(void 0===f||f>o.length)&&(f=o.length)," argument"===o.substring(f-" argument".length,f))a="The ".concat(y," ").concat(n," ").concat(e(c,"type"));else{var g=("number"!=typeof S&&(S=0),S+1>(d=y).length||-1===d.indexOf(".",S)?"argument":"property");a='The "'.concat(y,'" ').concat(g," ").concat(n," ").concat(e(c,"type"))}return a+". Received type ".concat(typeof h)},TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",function(y){return"The "+y+" method is not implemented"}),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",function(y){return"Cannot call "+y+" after a stream was destroyed"}),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",function(y){return"Unknown encoding: "+y},TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),O.exports.q=v},6753:(O,v,i)=>{"use strict";var e=i(4155),y=Object.keys||function(o){var s=[];for(var f in o)s.push(f);return s};O.exports=d;var c=i(9481),h=i(4229);i(5717)(d,c);for(var n=y(h.prototype),r=0;r{"use strict";O.exports=y;var e=i(4605);function y(c){if(!(this instanceof y))return new y(c);e.call(this,c)}i(5717)(y,e),y.prototype._transform=function(c,h,n){n(null,c)}},9481:(O,v,i)=>{"use strict";var e,y=i(4155);O.exports=L,L.ReadableState=U,i(7187);var c,h=function(T,k){return T.listeners(k).length},n=i(2503),r=i(8764).Buffer,a=i.g.Uint8Array||function(){},d=i(4616);c=d&&d.debuglog?d.debuglog("stream"):function(){};var S,g,o,s=i(7327),f=i(1195),l=i(2457).getHighWaterMark,p=i(4281).q,_=p.ERR_INVALID_ARG_TYPE,E=p.ERR_STREAM_PUSH_AFTER_EOF,j=p.ERR_METHOD_NOT_IMPLEMENTED,M=p.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;i(5717)(L,n);var F=f.errorOrDestroy,K=["error","close","destroy","pause","resume"];function U(T,k,t){e=e||i(6753),"boolean"!=typeof t&&(t=k instanceof e),this.objectMode=!!(T=T||{}).objectMode,t&&(this.objectMode=this.objectMode||!!T.readableObjectMode),this.highWaterMark=l(this,T,"readableHighWaterMark",t),this.buffer=new s,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==T.emitClose,this.autoDestroy=!!T.autoDestroy,this.destroyed=!1,this.defaultEncoding=T.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,T.encoding&&(S||(S=i(2553).s),this.decoder=new S(T.encoding),this.encoding=T.encoding)}function L(T){if(e=e||i(6753),!(this instanceof L))return new L(T);this._readableState=new U(T,this,this instanceof e),this.readable=!0,T&&("function"==typeof T.read&&(this._read=T.read),"function"==typeof T.destroy&&(this._destroy=T.destroy)),n.call(this)}function $(T,k,t,u,b){c("readableAddChunk",k);var C,N,X,ct,pt,x=T._readableState;if(null===k)x.reading=!1,function(N,X){if(c("onEofChunk"),!X.ended){if(X.decoder){var ct=X.decoder.end();ct&&ct.length&&(X.buffer.push(ct),X.length+=X.objectMode?1:ct.length)}X.ended=!0,X.sync?at(N):(X.needReadable=!1,X.emittedReadable||(X.emittedReadable=!0,ut(N)))}}(T,x);else if(b||(N=x,r.isBuffer(pt=X=k)||pt instanceof a||"string"==typeof X||void 0===X||N.objectMode||(ct=new _("chunk",["string","Buffer","Uint8Array"],X)),C=ct),C)F(T,C);else if(x.objectMode||k&&k.length>0)if("string"==typeof k||x.objectMode||Object.getPrototypeOf(k)===r.prototype||(k=function(N){return r.from(N)}(k)),u)x.endEmitted?F(T,new M):ot(T,x,k,!0);else if(x.ended)F(T,new E);else{if(x.destroyed)return!1;x.reading=!1,x.decoder&&!t?(k=x.decoder.write(k),x.objectMode||0!==k.length?ot(T,x,k,!1):I(T,x)):ot(T,x,k,!1)}else u||(x.reading=!1,I(T,x));return!x.ended&&(x.lengthk.highWaterMark&&(k.highWaterMark=((t=T)>=et?t=et:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t)),T<=k.length?T:k.ended?k.length:(k.needReadable=!0,0));var t}function at(T){var k=T._readableState;c("emitReadable",k.needReadable,k.emittedReadable),k.needReadable=!1,k.emittedReadable||(c("emitReadable",k.flowing),k.emittedReadable=!0,y.nextTick(ut,T))}function ut(T){var k=T._readableState;c("emitReadable_",k.destroyed,k.length,k.ended),k.destroyed||!k.length&&!k.ended||(T.emit("readable"),k.emittedReadable=!1),k.needReadable=!k.flowing&&!k.ended&&k.length<=k.highWaterMark,z(T)}function I(T,k){k.readingMore||(k.readingMore=!0,y.nextTick(m,T,k))}function m(T,k){for(;!k.reading&&!k.ended&&(k.length0,k.resumeScheduled&&!k.paused?k.flowing=!0:T.listenerCount("data")>0&&T.resume()}function A(T){c("readable nexttick read 0"),T.read(0)}function R(T,k){c("resume",k.reading),k.reading||T.read(0),k.resumeScheduled=!1,T.emit("resume"),z(T),k.flowing&&!k.reading&&T.read(0)}function z(T){var k=T._readableState;for(c("flow",k.flowing);k.flowing&&null!==T.read(););}function G(T,k){return 0===k.length?null:(k.objectMode?t=k.buffer.shift():!T||T>=k.length?(t=k.decoder?k.buffer.join(""):1===k.buffer.length?k.buffer.first():k.buffer.concat(k.length),k.buffer.clear()):t=k.buffer.consume(T,k.decoder),t);var t}function Q(T){var k=T._readableState;c("endReadable",k.endEmitted),k.endEmitted||(k.ended=!0,y.nextTick(nt,k,T))}function nt(T,k){if(c("endReadableNT",T.endEmitted,T.length),!T.endEmitted&&0===T.length&&(T.endEmitted=!0,k.readable=!1,k.emit("end"),T.autoDestroy)){var t=k._writableState;(!t||t.autoDestroy&&t.finished)&&k.destroy()}}function J(T,k){for(var t=0,u=T.length;t=k.highWaterMark:k.length>0)||k.ended))return c("read: emitReadable",k.length,k.ended),0===k.length&&k.ended?Q(this):at(this),null;if(0===(T=Z(T,k))&&k.ended)return 0===k.length&&Q(this),null;var u,b=k.needReadable;return c("need readable",b),(0===k.length||k.length-T0?G(T,k):null)?(k.needReadable=k.length<=k.highWaterMark,T=0):(k.length-=T,k.awaitDrain=0),0===k.length&&(k.ended||(k.needReadable=!0),t!==T&&k.ended&&Q(this)),null!==u&&this.emit("data",u),u},L.prototype._read=function(T){F(this,new j("_read()"))},L.prototype.pipe=function(T,k){var t=this,u=this._readableState;switch(u.pipesCount){case 0:u.pipes=T;break;case 1:u.pipes=[u.pipes,T];break;default:u.pipes.push(T)}u.pipesCount+=1,c("pipe count=%d opts=%j",u.pipesCount,k);var b=k&&!1===k.end||T===y.stdout||T===y.stderr?yt:C;function C(){c("onend"),T.end()}u.endEmitted?y.nextTick(b):t.once("end",b),T.on("unpipe",function bt(Et,Rt){c("onunpipe"),Et===t&&Rt&&!1===Rt.hasUnpiped&&(Rt.hasUnpiped=!0,c("cleanup"),T.removeListener("close",pt),T.removeListener("finish",gt),T.removeListener("drain",x),T.removeListener("error",ct),T.removeListener("unpipe",bt),t.removeListener("end",C),t.removeListener("end",yt),t.removeListener("data",X),N=!0,!u.awaitDrain||T._writableState&&!T._writableState.needDrain||x())});var bt,x=(bt=t,function(){var Et=bt._readableState;c("pipeOnDrain",Et.awaitDrain),Et.awaitDrain&&Et.awaitDrain--,0===Et.awaitDrain&&h(bt,"data")&&(Et.flowing=!0,z(bt))});T.on("drain",x);var N=!1;function X(bt){c("ondata");var Et=T.write(bt);c("dest.write",Et),!1===Et&&((1===u.pipesCount&&u.pipes===T||u.pipesCount>1&&-1!==J(u.pipes,T))&&!N&&(c("false write response, pause",u.awaitDrain),u.awaitDrain++),t.pause())}function ct(bt){c("onerror",bt),yt(),T.removeListener("error",ct),0===h(T,"error")&&F(T,bt)}function pt(){T.removeListener("finish",gt),yt()}function gt(){c("onfinish"),T.removeListener("close",pt),yt()}function yt(){c("unpipe"),t.unpipe(T)}return t.on("data",X),function(bt,Et,Rt){if("function"==typeof bt.prependListener)return bt.prependListener("error",Rt);bt._events&&bt._events.error?Array.isArray(bt._events.error)?bt._events.error.unshift(Rt):bt._events.error=[Rt,bt._events.error]:bt.on("error",Rt)}(T,0,ct),T.once("close",pt),T.once("finish",gt),T.emit("pipe",t),u.flowing||(c("pipe resume"),t.resume()),T},L.prototype.unpipe=function(T){var k=this._readableState,t={hasUnpiped:!1};if(0===k.pipesCount)return this;if(1===k.pipesCount)return T&&T!==k.pipes||(T||(T=k.pipes),k.pipes=null,k.pipesCount=0,k.flowing=!1,T&&T.emit("unpipe",this,t)),this;if(!T){var u=k.pipes,b=k.pipesCount;k.pipes=null,k.pipesCount=0,k.flowing=!1;for(var C=0;C0,!1!==u.flowing&&this.resume()):"readable"===T&&(u.endEmitted||u.readableListening||(u.readableListening=u.needReadable=!0,u.flowing=!1,u.emittedReadable=!1,c("on readable",u.length,u.reading),u.length?at(this):u.reading||y.nextTick(A,this))),t},L.prototype.removeListener=function(T,k){var t=n.prototype.removeListener.call(this,T,k);return"readable"===T&&y.nextTick(D,this),t},L.prototype.removeAllListeners=function(T){var k=n.prototype.removeAllListeners.apply(this,arguments);return"readable"!==T&&void 0!==T||y.nextTick(D,this),k},L.prototype.resume=function(){var t,T=this._readableState;return T.flowing||(c("resume"),T.flowing=!T.readableListening,this,(t=T).resumeScheduled||(t.resumeScheduled=!0,y.nextTick(R,this,t))),T.paused=!1,this},L.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},L.prototype.wrap=function(T){var k=this,t=this._readableState,u=!1;for(var b in T.on("end",function(){if(c("wrapped end"),t.decoder&&!t.ended){var x=t.decoder.end();x&&x.length&&k.push(x)}k.push(null)}),T.on("data",function(x){c("wrapped data"),t.decoder&&(x=t.decoder.write(x)),t.objectMode&&null==x||(t.objectMode||x&&x.length)&&(k.push(x)||(u=!0,T.pause()))}),T)void 0===this[b]&&"function"==typeof T[b]&&(this[b]=function(x){return function(){return T[x].apply(T,arguments)}}(b));for(var C=0;C{"use strict";O.exports=d;var e=i(4281).q,y=e.ERR_METHOD_NOT_IMPLEMENTED,c=e.ERR_MULTIPLE_CALLBACK,h=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,n=e.ERR_TRANSFORM_WITH_LENGTH_0,r=i(6753);function a(o,s){var f=this._transformState;f.transforming=!1;var l=f.writecb;if(null===l)return this.emit("error",new c);f.writechunk=null,f.writecb=null,null!=s&&this.push(s),l(o);var p=this._readableState;p.reading=!1,(p.needReadable||p.length{"use strict";var e,y=i(4155);function c(I){var m=this;this.next=null,this.entry=null,this.finish=function(){!function(D,A,R){var z=D.entry;for(D.entry=null;z;){var G=z.callback;A.pendingcb--,G(void 0),z=z.next}A.corkedRequestsFree.next=D}(m,I)}}O.exports=L,L.WritableState=U;var h,n={deprecate:i(4927)},r=i(2503),a=i(8764).Buffer,d=i.g.Uint8Array||function(){},S=i(1195),g=i(2457).getHighWaterMark,o=i(4281).q,s=o.ERR_INVALID_ARG_TYPE,f=o.ERR_METHOD_NOT_IMPLEMENTED,l=o.ERR_MULTIPLE_CALLBACK,p=o.ERR_STREAM_CANNOT_PIPE,_=o.ERR_STREAM_DESTROYED,E=o.ERR_STREAM_NULL_VALUES,j=o.ERR_STREAM_WRITE_AFTER_END,M=o.ERR_UNKNOWN_ENCODING,F=S.errorOrDestroy;function K(){}function U(I,m,D){e=e||i(6753),"boolean"!=typeof D&&(D=m instanceof e),this.objectMode=!!(I=I||{}).objectMode,D&&(this.objectMode=this.objectMode||!!I.writableObjectMode),this.highWaterMark=g(this,I,"writableHighWaterMark",D),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1,this.decodeStrings=!(!1===I.decodeStrings),this.defaultEncoding=I.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(R){!function(z,G){var k,Q=z._writableState,nt=Q.sync,J=Q.writecb;if("function"!=typeof J)throw new l;if((k=Q).writing=!1,k.writecb=null,k.length-=k.writelen,k.writelen=0,G)!function(k,t,u,b,C){--t.pendingcb,u?(y.nextTick(C,b),y.nextTick(ut,k,t),k._writableState.errorEmitted=!0,F(k,b)):(C(b),k._writableState.errorEmitted=!0,F(k,b),ut(k,t))}(z,Q,nt,G,J);else{var T=Z(Q)||z.destroyed;T||Q.corked||Q.bufferProcessing||!Q.bufferedRequest||et(z,Q),nt?y.nextTick(ot,z,Q,T,J):ot(z,Q,T,J)}}(m,R)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==I.emitClose,this.autoDestroy=!!I.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new c(this)}function L(I){var m=this instanceof(e=e||i(6753));if(!m&&!h.call(L,this))return new L(I);this._writableState=new U(I,this,m),this.writable=!0,I&&("function"==typeof I.write&&(this._write=I.write),"function"==typeof I.writev&&(this._writev=I.writev),"function"==typeof I.destroy&&(this._destroy=I.destroy),"function"==typeof I.final&&(this._final=I.final)),r.call(this)}function $(I,m,D,A,R,z,G){m.writelen=A,m.writecb=G,m.writing=!0,m.sync=!0,m.destroyed?m.onwrite(new _("write")):D?I._writev(R,m.onwrite):I._write(R,z,m.onwrite),m.sync=!1}function ot(I,m,D,A){var R,z;D||(R=I,0===(z=m).length&&z.needDrain&&(z.needDrain=!1,R.emit("drain"))),m.pendingcb--,A(),ut(I,m)}function et(I,m){m.bufferProcessing=!0;var D=m.bufferedRequest;if(I._writev&&D&&D.next){var R=new Array(m.bufferedRequestCount),z=m.corkedRequestsFree;z.entry=D;for(var G=0,Q=!0;D;)R[G]=D,D.isBuf||(Q=!1),D=D.next,G+=1;R.allBuffers=Q,$(I,m,!0,m.length,R,"",z.finish),m.pendingcb++,m.lastBufferedRequest=null,z.next?(m.corkedRequestsFree=z.next,z.next=null):m.corkedRequestsFree=new c(m),m.bufferedRequestCount=0}else{for(;D;){var nt=D.chunk;if($(I,m,!1,m.objectMode?1:nt.length,nt,D.encoding,D.callback),D=D.next,m.bufferedRequestCount--,m.writing)break}null===D&&(m.lastBufferedRequest=null)}m.bufferedRequest=D,m.bufferProcessing=!1}function Z(I){return I.ending&&0===I.length&&null===I.bufferedRequest&&!I.finished&&!I.writing}function at(I,m){I._final(function(D){m.pendingcb--,D&&F(I,D),m.prefinished=!0,I.emit("prefinish"),ut(I,m)})}function ut(I,m){var R,z,D=Z(m);if(D&&(R=I,(z=m).prefinished||z.finalCalled||("function"!=typeof R._final||z.destroyed?(z.prefinished=!0,R.emit("prefinish")):(z.pendingcb++,z.finalCalled=!0,y.nextTick(at,R,z))),0===m.pendingcb&&(m.finished=!0,I.emit("finish"),m.autoDestroy))){var A=I._readableState;(!A||A.autoDestroy&&A.endEmitted)&&I.destroy()}return D}i(5717)(L,r),U.prototype.getBuffer=function(){for(var I=this.bufferedRequest,m=[];I;)m.push(I),I=I.next;return m},function(){try{Object.defineProperty(U.prototype,"buffer",{get:n.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(L,Symbol.hasInstance,{value:function(I){return!!h.call(this,I)||this===L&&I&&I._writableState instanceof U}})):h=function(I){return I instanceof this},L.prototype.pipe=function(){F(this,new p)},L.prototype.write=function(I,m,D){var A,Q,nt,J,R=this._writableState,z=!1,G=!R.objectMode&&(a.isBuffer(A=I)||A instanceof d);return G&&!a.isBuffer(I)&&(I=a.from(I)),"function"==typeof m&&(D=m,m=null),G?m="buffer":m||(m=R.defaultEncoding),"function"!=typeof D&&(D=K),R.ending?(Q=this,nt=D,J=new j,F(Q,J),y.nextTick(nt,J)):(G||function(Q,nt,J,T){var k;return null===J?k=new E:"string"==typeof J||nt.objectMode||(k=new s("chunk",["string","Buffer"],J)),!k||(F(Q,k),y.nextTick(T,k),!1)}(this,R,I,D))&&(R.pendingcb++,z=function(Q,nt,J,T,k,t){if(!J){var u=(X=T,(N=nt).objectMode||!1===N.decodeStrings||"string"!=typeof X||(X=a.from(X,k)),X);T!==u&&(J=!0,k="buffer",T=u)}var N,X,b=nt.objectMode?1:T.length;nt.length+=b;var C=nt.length-1))throw new M(I);return this._writableState.defaultEncoding=I,this},Object.defineProperty(L.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(L.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),L.prototype._write=function(I,m,D){D(new f("_write()"))},L.prototype._writev=null,L.prototype.end=function(I,m,D){var R,z,G,A=this._writableState;return"function"==typeof I?(D=I,I=null,m=null):"function"==typeof m&&(D=m,m=null),null!=I&&this.write(I,m),A.corked&&(A.corked=1,this.uncork()),A.ending||(R=this,G=D,(z=A).ending=!0,ut(R,z),G&&(z.finished?y.nextTick(G):R.once("finish",G)),z.ended=!0,R.writable=!1),this},Object.defineProperty(L.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(L.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(I){this._writableState&&(this._writableState.destroyed=I)}}),L.prototype.destroy=S.destroy,L.prototype._undestroy=S.undestroy,L.prototype._destroy=function(I,m){m(I)}},5850:(O,v,i)=>{"use strict";var e,y=i(4155);function c(E,j,M){return j in E?Object.defineProperty(E,j,{value:M,enumerable:!0,configurable:!0,writable:!0}):E[j]=M,E}var h=i(8610),n=Symbol("lastResolve"),r=Symbol("lastReject"),a=Symbol("error"),d=Symbol("ended"),S=Symbol("lastPromise"),g=Symbol("handlePromise"),o=Symbol("stream");function s(E,j){return{value:E,done:j}}function f(E){var j=E[n];if(null!==j){var M=E[o].read();null!==M&&(E[S]=null,E[n]=null,E[r]=null,j(s(M,!1)))}}function l(E){y.nextTick(f,E)}var p=Object.getPrototypeOf(function(){}),_=Object.setPrototypeOf((c(e={get stream(){return this[o]},next:function(){var E=this,j=this[a];if(null!==j)return Promise.reject(j);if(this[d])return Promise.resolve(s(void 0,!0));if(this[o].destroyed)return new Promise(function(U,L){y.nextTick(function(){E[a]?L(E[a]):U(s(void 0,!0))})});var M,U,L,F=this[S];if(F)M=new Promise((U=F,L=this,function($,ot){U.then(function(){L[d]?$(s(void 0,!0)):L[g]($,ot)},ot)}));else{var K=this[o].read();if(null!==K)return Promise.resolve(s(K,!1));M=new Promise(this[g])}return this[S]=M,M}},Symbol.asyncIterator,function(){return this}),c(e,"return",function(){var E=this;return new Promise(function(j,M){E[o].destroy(null,function(F){F?M(F):j(s(void 0,!0))})})}),e),p);O.exports=function(E){var j,M=Object.create(_,(c(j={},o,{value:E,writable:!0}),c(j,n,{value:null,writable:!0}),c(j,r,{value:null,writable:!0}),c(j,a,{value:null,writable:!0}),c(j,d,{value:E._readableState.endEmitted,writable:!0}),c(j,g,{value:function(F,K){var U=M[o].read();U?(M[S]=null,M[n]=null,M[r]=null,F(s(U,!1))):(M[n]=F,M[r]=K)},writable:!0}),j));return M[S]=null,h(E,function(F){if(F&&"ERR_STREAM_PREMATURE_CLOSE"!==F.code){var K=M[r];return null!==K&&(M[S]=null,M[n]=null,M[r]=null,K(F)),void(M[a]=F)}var U=M[n];null!==U&&(M[S]=null,M[n]=null,M[r]=null,U(s(void 0,!0))),M[d]=!0}),E.on("readable",l.bind(null,M)),M}},7327:(O,v,i)=>{"use strict";function e(a,d){var S=Object.keys(a);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(a);d&&(g=g.filter(function(o){return Object.getOwnPropertyDescriptor(a,o).enumerable})),S.push.apply(S,g)}return S}function y(a,d,S){return d in a?Object.defineProperty(a,d,{value:S,enumerable:!0,configurable:!0,writable:!0}):a[d]=S,a}var h=i(8764).Buffer,n=i(2361).inspect,r=n&&n.custom||"inspect";O.exports=function(){function a(){(function(g,o){if(!(g instanceof o))throw new TypeError("Cannot call a class as a function")})(this,a),this.head=null,this.tail=null,this.length=0}var S;return S=[{key:"push",value:function(g){var o={data:g,next:null};this.length>0?this.tail.next=o:this.head=o,this.tail=o,++this.length}},{key:"unshift",value:function(g){var o={data:g,next:this.head};0===this.length&&(this.tail=o),this.head=o,++this.length}},{key:"shift",value:function(){if(0!==this.length){var g=this.head.data;return this.head=1===this.length?this.tail=null:this.head.next,--this.length,g}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(g){if(0===this.length)return"";for(var o=this.head,s=""+o.data;o=o.next;)s+=g+o.data;return s}},{key:"concat",value:function(g){if(0===this.length)return h.alloc(0);for(var l=h.allocUnsafe(g>>>0),p=this.head,_=0;p;)h.prototype.copy.call(p.data,l,_),_+=p.data.length,p=p.next;return l}},{key:"consume",value:function(g,o){var s;return gl.length?l.length:g;if(f+=p===l.length?l:l.slice(0,g),0==(g-=p)){p===l.length?(++s,this.head=o.next?o.next:this.tail=null):(this.head=o,o.data=l.slice(p));break}++s}return this.length-=s,f}},{key:"_getBuffer",value:function(g){var o=h.allocUnsafe(g),s=this.head,f=1;for(s.data.copy(o),g-=s.data.length;s=s.next;){var l=s.data,p=g>l.length?l.length:g;if(l.copy(o,o.length-g,0,p),0==(g-=p)){p===l.length?(++f,this.head=s.next?s.next:this.tail=null):(this.head=s,s.data=l.slice(p));break}++f}return this.length-=f,o}},{key:r,value:function(g,o){return n(this,function(s){for(var f=1;f{"use strict";var e=i(4155);function y(n,r){h(n,r),c(n)}function c(n){n._writableState&&!n._writableState.emitClose||n._readableState&&!n._readableState.emitClose||n.emit("close")}function h(n,r){n.emit("error",r)}O.exports={destroy:function(n,r){var a=this;return this._readableState&&this._readableState.destroyed||this._writableState&&this._writableState.destroyed?(r?r(n):n&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(h,this,n)):e.nextTick(h,this,n)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(n||null,function(g){!r&&g?a._writableState?a._writableState.errorEmitted?e.nextTick(c,a):(a._writableState.errorEmitted=!0,e.nextTick(y,a,g)):e.nextTick(y,a,g):r?(e.nextTick(c,a),r(g)):e.nextTick(c,a)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(n,r){var a=n._readableState,d=n._writableState;a&&a.autoDestroy||d&&d.autoDestroy?n.destroy(r):n.emit("error",r)}}},8610:(O,v,i)=>{"use strict";var e=i(4281).q.ERR_STREAM_PREMATURE_CLOSE;function y(){}O.exports=function c(h,n,r){if("function"==typeof n)return c(h,null,n);var E,j;n||(n={}),E=r||y,j=!1,r=function(){if(!j){j=!0;for(var M=arguments.length,F=new Array(M),K=0;K{O.exports=function(){throw new Error("Readable.from is not available in the browser")}},9946:(O,v,i)=>{"use strict";var e,y=i(4281).q,c=y.ERR_MISSING_ARGS,h=y.ERR_STREAM_DESTROYED;function n(g){if(g)throw g}function r(g,o,s,f){var _,E;_=f,E=!1,f=function(){E||(E=!0,_.apply(void 0,arguments))};var l=!1;g.on("close",function(){l=!0}),void 0===e&&(e=i(8610)),e(g,{readable:o,writable:s},function(_){if(_)return f(_);l=!0,f()});var p=!1;return function(_){if(!l&&!p)return p=!0,function(E){return E.setHeader&&"function"==typeof E.abort}(g)?g.abort():"function"==typeof g.destroy?g.destroy():void f(_||new h("pipe"))}}function a(g){g()}function d(g,o){return g.pipe(o)}function S(g){return g.length?"function"!=typeof g[g.length-1]?n:g.pop():n}O.exports=function(){for(var g=arguments.length,o=new Array(g),s=0;s0,function(M){f||(f=M),M&&p.forEach(a),j||(p.forEach(a),l(f))})});return o.reduce(d)}},2457:(O,v,i)=>{"use strict";var e=i(4281).q.ERR_INVALID_OPT_VALUE;O.exports={getHighWaterMark:function(y,c,h,n){var a,r=null!=(a=c).highWaterMark?a.highWaterMark:n?a[h]:null;if(null!=r){if(!isFinite(r)||Math.floor(r)!==r||r<0)throw new e(n?h:"highWaterMark",r);return Math.floor(r)}return y.objectMode?16:16384}}},2503:(O,v,i)=>{O.exports=i(7187).EventEmitter},8473:(O,v,i)=>{(v=O.exports=i(9481)).Stream=v,v.Readable=v,v.Writable=i(4229),v.Duplex=i(6753),v.Transform=i(4605),v.PassThrough=i(2725),v.finished=i(8610),v.pipeline=i(9946)},9785:(O,v,i)=>{"use strict";var e=i(8764).Buffer,y=i(5717),c=i(3349),h=new Array(16),n=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],r=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],a=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],d=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],S=[0,1518500249,1859775393,2400959708,2840853838],g=[1352829926,1548603684,1836072691,2053994217,0];function o(){c.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function s(j,M){return j<>>32-M}function f(j,M,F,K,U,L,$,ot){return s(j+(M^F^K)+L+$|0,ot)+U|0}function l(j,M,F,K,U,L,$,ot){return s(j+(M&F|~M&K)+L+$|0,ot)+U|0}function p(j,M,F,K,U,L,$,ot){return s(j+((M|~F)^K)+L+$|0,ot)+U|0}function _(j,M,F,K,U,L,$,ot){return s(j+(M&K|F&~K)+L+$|0,ot)+U|0}function E(j,M,F,K,U,L,$,ot){return s(j+(M^(F|~K))+L+$|0,ot)+U|0}y(o,c),o.prototype._update=function(){for(var j=h,M=0;M<16;++M)j[M]=this._block.readInt32LE(4*M);for(var F=0|this._a,K=0|this._b,U=0|this._c,L=0|this._d,$=0|this._e,ot=0|this._a,et=0|this._b,Z=0|this._c,at=0|this._d,ut=0|this._e,I=0;I<80;I+=1){var m,D;I<16?(m=f(F,K,U,L,$,j[n[I]],S[0],a[I]),D=E(ot,et,Z,at,ut,j[r[I]],g[0],d[I])):I<32?(m=l(F,K,U,L,$,j[n[I]],S[1],a[I]),D=_(ot,et,Z,at,ut,j[r[I]],g[1],d[I])):I<48?(m=p(F,K,U,L,$,j[n[I]],S[2],a[I]),D=p(ot,et,Z,at,ut,j[r[I]],g[2],d[I])):I<64?(m=_(F,K,U,L,$,j[n[I]],S[3],a[I]),D=l(ot,et,Z,at,ut,j[r[I]],g[3],d[I])):(m=E(F,K,U,L,$,j[n[I]],S[4],a[I]),D=f(ot,et,Z,at,ut,j[r[I]],g[4],d[I])),F=$,$=L,L=s(U,10),U=K,K=m,ot=ut,ut=at,at=s(Z,10),Z=et,et=D}var A=this._b+U+at|0;this._b=this._c+L+ut|0,this._c=this._d+$+ot|0,this._d=this._e+F+et|0,this._e=this._a+K+Z|0,this._a=A},o.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var j=e.alloc?e.alloc(20):new e(20);return j.writeInt32LE(this._a,0),j.writeInt32LE(this._b,4),j.writeInt32LE(this._c,8),j.writeInt32LE(this._d,12),j.writeInt32LE(this._e,16),j},O.exports=o},9509:(O,v,i)=>{var e=i(8764),y=e.Buffer;function c(n,r){for(var a in n)r[a]=n[a]}function h(n,r,a){return y(n,r,a)}y.from&&y.alloc&&y.allocUnsafe&&y.allocUnsafeSlow?O.exports=e:(c(e,v),v.Buffer=h),h.prototype=Object.create(y.prototype),c(y,h),h.from=function(n,r,a){if("number"==typeof n)throw new TypeError("Argument must not be a number");return y(n,r,a)},h.alloc=function(n,r,a){if("number"!=typeof n)throw new TypeError("Argument must be a number");var d=y(n);return void 0!==r?"string"==typeof a?d.fill(r,a):d.fill(r):d.fill(0),d},h.allocUnsafe=function(n){if("number"!=typeof n)throw new TypeError("Argument must be a number");return y(n)},h.allocUnsafeSlow=function(n){if("number"!=typeof n)throw new TypeError("Argument must be a number");return e.SlowBuffer(n)}},4189:(O,v,i)=>{var e=i(9509).Buffer;function y(c,h){this._block=e.alloc(c),this._finalSize=h,this._blockSize=c,this._len=0}y.prototype.update=function(c,h){"string"==typeof c&&(c=e.from(c,h=h||"utf8"));for(var n=this._block,r=this._blockSize,a=c.length,d=this._len,S=0;S=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0;this._block.writeUInt32BE((n-r)/4294967296,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var d=this._hash();return c?d.toString(c):d},y.prototype._update=function(){throw new Error("_update must be implemented by subclass")},O.exports=y},9072:(O,v,i)=>{var e=O.exports=function(y){y=y.toLowerCase();var c=e[y];if(!c)throw new Error(y+" is not supported (we accept pull requests)");return new c};e.sha=i(4448),e.sha1=i(8336),e.sha224=i(8432),e.sha256=i(7499),e.sha384=i(1686),e.sha512=i(7816)},4448:(O,v,i)=>{var e=i(5717),y=i(4189),c=i(9509).Buffer,h=[1518500249,1859775393,-1894007588,-899497514],n=new Array(80);function r(){this.init(),this._w=n,y.call(this,64,56)}function a(S){return S<<30|S>>>2}function d(S,g,o,s){return 0===S?g&o|~g&s:2===S?g&o|g&s|o&s:g^o^s}e(r,y),r.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},r.prototype._update=function(S){for(var g,o=this._w,s=0|this._a,f=0|this._b,l=0|this._c,p=0|this._d,_=0|this._e,E=0;E<16;++E)o[E]=S.readInt32BE(4*E);for(;E<80;++E)o[E]=o[E-3]^o[E-8]^o[E-14]^o[E-16];for(var j=0;j<80;++j){var M=~~(j/20),F=0|((g=s)<<5|g>>>27)+d(M,f,l,p)+_+o[j]+h[M];_=p,p=l,l=a(f),f=s,s=F}this._a=s+this._a|0,this._b=f+this._b|0,this._c=l+this._c|0,this._d=p+this._d|0,this._e=_+this._e|0},r.prototype._hash=function(){var S=c.allocUnsafe(20);return S.writeInt32BE(0|this._a,0),S.writeInt32BE(0|this._b,4),S.writeInt32BE(0|this._c,8),S.writeInt32BE(0|this._d,12),S.writeInt32BE(0|this._e,16),S},O.exports=r},8336:(O,v,i)=>{var e=i(5717),y=i(4189),c=i(9509).Buffer,h=[1518500249,1859775393,-1894007588,-899497514],n=new Array(80);function r(){this.init(),this._w=n,y.call(this,64,56)}function a(g){return g<<5|g>>>27}function d(g){return g<<30|g>>>2}function S(g,o,s,f){return 0===g?o&s|~o&f:2===g?o&s|o&f|s&f:o^s^f}e(r,y),r.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},r.prototype._update=function(g){for(var o,s=this._w,f=0|this._a,l=0|this._b,p=0|this._c,_=0|this._d,E=0|this._e,j=0;j<16;++j)s[j]=g.readInt32BE(4*j);for(;j<80;++j)s[j]=(o=s[j-3]^s[j-8]^s[j-14]^s[j-16])<<1|o>>>31;for(var M=0;M<80;++M){var F=~~(M/20),K=a(f)+S(F,l,p,_)+E+s[M]+h[F]|0;E=_,_=p,p=d(l),l=f,f=K}this._a=f+this._a|0,this._b=l+this._b|0,this._c=p+this._c|0,this._d=_+this._d|0,this._e=E+this._e|0},r.prototype._hash=function(){var g=c.allocUnsafe(20);return g.writeInt32BE(0|this._a,0),g.writeInt32BE(0|this._b,4),g.writeInt32BE(0|this._c,8),g.writeInt32BE(0|this._d,12),g.writeInt32BE(0|this._e,16),g},O.exports=r},8432:(O,v,i)=>{var e=i(5717),y=i(7499),c=i(4189),h=i(9509).Buffer,n=new Array(64);function r(){this.init(),this._w=n,c.call(this,64,56)}e(r,y),r.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},r.prototype._hash=function(){var a=h.allocUnsafe(28);return a.writeInt32BE(this._a,0),a.writeInt32BE(this._b,4),a.writeInt32BE(this._c,8),a.writeInt32BE(this._d,12),a.writeInt32BE(this._e,16),a.writeInt32BE(this._f,20),a.writeInt32BE(this._g,24),a},O.exports=r},7499:(O,v,i)=>{var e=i(5717),y=i(4189),c=i(9509).Buffer,h=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],n=new Array(64);function r(){this.init(),this._w=n,y.call(this,64,56)}function a(s,f,l){return l^s&(f^l)}function d(s,f,l){return s&f|l&(s|f)}function S(s){return(s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10)}function g(s){return(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7)}function o(s){return(s>>>7|s<<25)^(s>>>18|s<<14)^s>>>3}e(r,y),r.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},r.prototype._update=function(s){for(var f,l=this._w,p=0|this._a,_=0|this._b,E=0|this._c,j=0|this._d,M=0|this._e,F=0|this._f,K=0|this._g,U=0|this._h,L=0;L<16;++L)l[L]=s.readInt32BE(4*L);for(;L<64;++L)l[L]=0|(((f=l[L-2])>>>17|f<<15)^(f>>>19|f<<13)^f>>>10)+l[L-7]+o(l[L-15])+l[L-16];for(var $=0;$<64;++$){var ot=U+g(M)+a(M,F,K)+h[$]+l[$]|0,et=S(p)+d(p,_,E)|0;U=K,K=F,F=M,M=j+ot|0,j=E,E=_,_=p,p=ot+et|0}this._a=p+this._a|0,this._b=_+this._b|0,this._c=E+this._c|0,this._d=j+this._d|0,this._e=M+this._e|0,this._f=F+this._f|0,this._g=K+this._g|0,this._h=U+this._h|0},r.prototype._hash=function(){var s=c.allocUnsafe(32);return s.writeInt32BE(this._a,0),s.writeInt32BE(this._b,4),s.writeInt32BE(this._c,8),s.writeInt32BE(this._d,12),s.writeInt32BE(this._e,16),s.writeInt32BE(this._f,20),s.writeInt32BE(this._g,24),s.writeInt32BE(this._h,28),s},O.exports=r},1686:(O,v,i)=>{var e=i(5717),y=i(7816),c=i(4189),h=i(9509).Buffer,n=new Array(160);function r(){this.init(),this._w=n,c.call(this,128,112)}e(r,y),r.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},r.prototype._hash=function(){var a=h.allocUnsafe(48);function d(S,g,o){a.writeInt32BE(S,o),a.writeInt32BE(g,o+4)}return d(this._ah,this._al,0),d(this._bh,this._bl,8),d(this._ch,this._cl,16),d(this._dh,this._dl,24),d(this._eh,this._el,32),d(this._fh,this._fl,40),a},O.exports=r},7816:(O,v,i)=>{var e=i(5717),y=i(4189),c=i(9509).Buffer,h=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],n=new Array(160);function r(){this.init(),this._w=n,y.call(this,128,112)}function a(_,E,j){return j^_&(E^j)}function d(_,E,j){return _&E|j&(_|E)}function S(_,E){return(_>>>28|E<<4)^(E>>>2|_<<30)^(E>>>7|_<<25)}function g(_,E){return(_>>>14|E<<18)^(_>>>18|E<<14)^(E>>>9|_<<23)}function o(_,E){return(_>>>1|E<<31)^(_>>>8|E<<24)^_>>>7}function s(_,E){return(_>>>1|E<<31)^(_>>>8|E<<24)^(_>>>7|E<<25)}function f(_,E){return(_>>>19|E<<13)^(E>>>29|_<<3)^_>>>6}function l(_,E){return(_>>>19|E<<13)^(E>>>29|_<<3)^(_>>>6|E<<26)}function p(_,E){return _>>>0>>0?1:0}e(r,y),r.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},r.prototype._update=function(_){for(var E=this._w,j=0|this._ah,M=0|this._bh,F=0|this._ch,K=0|this._dh,U=0|this._eh,L=0|this._fh,$=0|this._gh,ot=0|this._hh,et=0|this._al,Z=0|this._bl,at=0|this._cl,ut=0|this._dl,I=0|this._el,m=0|this._fl,D=0|this._gl,A=0|this._hl,R=0;R<32;R+=2)E[R]=_.readInt32BE(4*R),E[R+1]=_.readInt32BE(4*R+4);for(;R<160;R+=2){var z=E[R-30],G=E[R-30+1],Q=o(z,G),nt=s(G,z),J=f(z=E[R-4],G=E[R-4+1]),T=l(G,z),u=E[R-32],b=E[R-32+1],C=nt+E[R-14+1]|0,x=Q+E[R-14]+p(C,nt)|0;x=(x=x+J+p(C=C+T|0,T)|0)+u+p(C=C+b|0,b)|0,E[R]=x,E[R+1]=C}for(var N=0;N<160;N+=2){x=E[N],C=E[N+1];var X=d(j,M,F),ct=d(et,Z,at),pt=S(j,et),gt=S(et,j),yt=g(U,I),bt=g(I,U),Et=h[N],Rt=h[N+1],Mt=a(U,L,$),Vt=a(I,m,D),Pt=A+bt|0,Nt=ot+yt+p(Pt,A)|0;Nt=(Nt=(Nt=Nt+Mt+p(Pt=Pt+Vt|0,Vt)|0)+Et+p(Pt=Pt+Rt|0,Rt)|0)+x+p(Pt=Pt+C|0,C)|0;var qt=gt+ct|0,Ut=pt+X+p(qt,gt)|0;ot=$,A=D,$=L,D=m,L=U,m=I,U=K+Nt+p(I=ut+Pt|0,ut)|0,K=F,ut=at,F=M,at=Z,M=j,Z=et,j=Nt+Ut+p(et=Pt+qt|0,Pt)|0}this._al=this._al+et|0,this._bl=this._bl+Z|0,this._cl=this._cl+at|0,this._dl=this._dl+ut|0,this._el=this._el+I|0,this._fl=this._fl+m|0,this._gl=this._gl+D|0,this._hl=this._hl+A|0,this._ah=this._ah+j+p(this._al,et)|0,this._bh=this._bh+M+p(this._bl,Z)|0,this._ch=this._ch+F+p(this._cl,at)|0,this._dh=this._dh+K+p(this._dl,ut)|0,this._eh=this._eh+U+p(this._el,I)|0,this._fh=this._fh+L+p(this._fl,m)|0,this._gh=this._gh+$+p(this._gl,D)|0,this._hh=this._hh+ot+p(this._hl,A)|0},r.prototype._hash=function(){var _=c.allocUnsafe(64);function E(j,M,F){_.writeInt32BE(j,F),_.writeInt32BE(M,F+4)}return E(this._ah,this._al,0),E(this._bh,this._bl,8),E(this._ch,this._cl,16),E(this._dh,this._dl,24),E(this._eh,this._el,32),E(this._fh,this._fl,40),E(this._gh,this._gl,48),E(this._hh,this._hl,56),_},O.exports=r},2830:(O,v,i)=>{O.exports=y;var e=i(7187).EventEmitter;function y(){e.call(this)}i(5717)(y,e),y.Readable=i(9481),y.Writable=i(4229),y.Duplex=i(6753),y.Transform=i(4605),y.PassThrough=i(2725),y.finished=i(8610),y.pipeline=i(9946),y.Stream=y,y.prototype.pipe=function(c,h){var n=this;function r(f){c.writable&&!1===c.write(f)&&n.pause&&n.pause()}function a(){n.readable&&n.resume&&n.resume()}n.on("data",r),c.on("drain",a),c._isStdio||h&&!1===h.end||(n.on("end",S),n.on("close",g));var d=!1;function S(){d||(d=!0,c.end())}function g(){d||(d=!0,"function"==typeof c.destroy&&c.destroy())}function o(f){if(s(),0===e.listenerCount(this,"error"))throw f}function s(){n.removeListener("data",r),c.removeListener("drain",a),n.removeListener("end",S),n.removeListener("close",g),n.removeListener("error",o),c.removeListener("error",o),n.removeListener("end",s),n.removeListener("close",s),c.removeListener("close",s)}return n.on("error",o),c.on("error",o),n.on("end",s),n.on("close",s),c.on("close",s),c.emit("pipe",n),c}},2553:(O,v,i)=>{"use strict";var e=i(9509).Buffer,y=e.isEncoding||function(s){switch((s=""+s)&&s.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function c(s){var f;switch(this.encoding=function(l){var p=function(_){if(!_)return"utf8";for(var E;;)switch(_){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return _;default:if(E)return;_=(""+_).toLowerCase(),E=!0}}(l);if("string"!=typeof p&&(e.isEncoding===y||!y(l)))throw new Error("Unknown encoding: "+l);return p||l}(s),this.encoding){case"utf16le":this.text=r,this.end=a,f=4;break;case"utf8":this.fillLast=n,f=4;break;case"base64":this.text=d,this.end=S,f=3;break;default:return this.write=g,void(this.end=o)}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(f)}function h(s){return s<=127?0:s>>5==6?2:s>>4==14?3:s>>3==30?4:s>>6==2?-1:-2}function n(s){var f=this.lastTotal-this.lastNeed,l=function(p,_,E){if(128!=(192&_[0]))return p.lastNeed=0,"\ufffd";if(p.lastNeed>1&&_.length>1){if(128!=(192&_[1]))return p.lastNeed=1,"\ufffd";if(p.lastNeed>2&&_.length>2&&128!=(192&_[2]))return p.lastNeed=2,"\ufffd"}}(this,s);return void 0!==l?l:this.lastNeed<=s.length?(s.copy(this.lastChar,f,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(s.copy(this.lastChar,f,0,s.length),void(this.lastNeed-=s.length))}function r(s,f){if((s.length-f)%2==0){var l=s.toString("utf16le",f);if(l){var p=l.charCodeAt(l.length-1);if(p>=55296&&p<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=s[s.length-2],this.lastChar[1]=s[s.length-1],l.slice(0,-1)}return l}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=s[s.length-1],s.toString("utf16le",f,s.length-1)}function a(s){var f=s&&s.length?this.write(s):"";return this.lastNeed?f+this.lastChar.toString("utf16le",0,this.lastTotal-this.lastNeed):f}function d(s,f){var l=(s.length-f)%3;return 0===l?s.toString("base64",f):(this.lastNeed=3-l,this.lastTotal=3,1===l?this.lastChar[0]=s[s.length-1]:(this.lastChar[0]=s[s.length-2],this.lastChar[1]=s[s.length-1]),s.toString("base64",f,s.length-l))}function S(s){var f=s&&s.length?this.write(s):"";return this.lastNeed?f+this.lastChar.toString("base64",0,3-this.lastNeed):f}function g(s){return s.toString(this.encoding)}function o(s){return s&&s.length?this.write(s):""}v.s=c,c.prototype.write=function(s){if(0===s.length)return"";var f,l;if(this.lastNeed){if(void 0===(f=this.fillLast(s)))return"";l=this.lastNeed,this.lastNeed=0}else l=0;return l=0?(F>0&&(_.lastNeed=F-1),F):--M=0?(F>0&&(_.lastNeed=F-2),F):--M=0?(F>0&&(2===F?F=0:_.lastNeed=F-3),F):0}(this,s,f);if(!this.lastNeed)return s.toString("utf8",f);this.lastTotal=l;var p=s.length-(l-this.lastNeed);return s.copy(this.lastChar,0,p),s.toString("utf8",f,p)},c.prototype.fillLast=function(s){if(this.lastNeed<=s.length)return s.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);s.copy(this.lastChar,this.lastTotal-this.lastNeed,0,s.length),this.lastNeed-=s.length}},5940:O=>{var v={}.toString;O.exports=Array.isArray||function(i){return"[object Array]"==v.call(i)}},5867:(O,v,i)=>{"use strict";var e=i(8212),y=Object.keys||function(s){var f=[];for(var l in s)f.push(l);return f};O.exports=S;var c=Object.create(i(6497));c.inherits=i(5717);var h=i(4278),n=i(759);c.inherits(S,h);for(var r=y(n.prototype),a=0;a{"use strict";O.exports=c;var e=i(62),y=Object.create(i(6497));function c(h){if(!(this instanceof c))return new c(h);e.call(this,h)}y.inherits=i(5717),y.inherits(c,e),c.prototype._transform=function(h,n,r){r(null,h)}},4278:(O,v,i)=>{"use strict";var e=i(4155),y=i(8212);O.exports=E;var c,h=i(5940);E.ReadableState=_,i(7187);var n=function(A,R){return A.listeners(R).length},r=i(4104),a=i(4591).Buffer,d=i.g.Uint8Array||function(){},S=Object.create(i(6497));S.inherits=i(5717);var g=i(6882),o=void 0;o=g&&g.debuglog?g.debuglog("stream"):function(){};var s,f=i(3912),l=i(5513);S.inherits(E,r);var p=["error","close","destroy","pause","resume"];function _(A,R){A=A||{};var z=R instanceof(c=c||i(5867));this.objectMode=!!A.objectMode,z&&(this.objectMode=this.objectMode||!!A.readableObjectMode);var G=A.highWaterMark,Q=A.readableHighWaterMark;this.highWaterMark=G||0===G?G:z&&(Q||0===Q)?Q:this.objectMode?16:16384,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new f,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=A.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,A.encoding&&(s||(s=i(7989).s),this.decoder=new s(A.encoding),this.encoding=A.encoding)}function E(A){if(c=c||i(5867),!(this instanceof E))return new E(A);this._readableState=new _(A,this),this.readable=!0,A&&("function"==typeof A.read&&(this._read=A.read),"function"==typeof A.destroy&&(this._destroy=A.destroy)),r.call(this)}function j(A,R,z,G,Q){var nt,T,k,t,u,J=A._readableState;return null===R?(J.reading=!1,function(T,k){if(!k.ended){if(k.decoder){var t=k.decoder.end();t&&t.length&&(k.buffer.push(t),k.length+=k.objectMode?1:t.length)}k.ended=!0,U(T)}}(A,J)):(Q||(T=J,a.isBuffer(u=k=R)||u instanceof d||"string"==typeof k||void 0===k||T.objectMode||(t=new TypeError("Invalid non-string/buffer chunk")),nt=t),nt?A.emit("error",nt):J.objectMode||R&&R.length>0?("string"==typeof R||J.objectMode||Object.getPrototypeOf(R)===a.prototype||(R=function(T){return a.from(T)}(R)),G?J.endEmitted?A.emit("error",new Error("stream.unshift() after end event")):M(A,J,R,!0):J.ended?A.emit("error",new Error("stream.push() after EOF")):(J.reading=!1,J.decoder&&!z?(R=J.decoder.write(R),J.objectMode||0!==R.length?M(A,J,R,!1):$(A,J)):M(A,J,R,!1))):G||(J.reading=!1)),function(T){return!T.ended&&(T.needReadable||T.lengthR.highWaterMark&&(R.highWaterMark=((z=A)>=F?z=F:(z--,z|=z>>>1,z|=z>>>2,z|=z>>>4,z|=z>>>8,z|=z>>>16,z++),z)),A<=R.length?A:R.ended?R.length:(R.needReadable=!0,0));var z}function U(A){var R=A._readableState;R.needReadable=!1,R.emittedReadable||(o("emitReadable",R.flowing),R.emittedReadable=!0,R.sync?y.nextTick(L,A):L(A))}function L(A){o("emit readable"),A.emit("readable"),at(A)}function $(A,R){R.readingMore||(R.readingMore=!0,y.nextTick(ot,A,R))}function ot(A,R){for(var z=R.length;!R.reading&&!R.flowing&&!R.ended&&R.length=R.length?(z=R.decoder?R.buffer.join(""):1===R.buffer.length?R.buffer.head.data:R.buffer.concat(R.length),R.buffer.clear()):(nt=R.decoder,(G=A)<(Q=R.buffer).head.data.length?(J=Q.head.data.slice(0,G),Q.head.data=Q.head.data.slice(G)):J=G===Q.head.data.length?Q.shift():nt?function(T,k){var t=k.head,u=1,b=t.data;for(T-=b.length;t=t.next;){var C=t.data,x=T>C.length?C.length:T;if(b+=x===C.length?C:C.slice(0,T),0==(T-=x)){x===C.length?(++u,k.head=t.next?t.next:k.tail=null):(k.head=t,t.data=C.slice(x));break}++u}return k.length-=u,b}(G,Q):function(T,k){var t=a.allocUnsafe(T),u=k.head,b=1;for(u.data.copy(t),T-=u.data.length;u=u.next;){var C=u.data,x=T>C.length?C.length:T;if(C.copy(t,t.length-T,0,x),0==(T-=x)){x===C.length?(++b,k.head=u.next?u.next:k.tail=null):(k.head=u,u.data=C.slice(x));break}++b}return k.length-=b,t}(G,Q),z=J),z);var G,Q,nt,J,z}function I(A){var R=A._readableState;if(R.length>0)throw new Error('"endReadable()" called on non-empty stream');R.endEmitted||(R.ended=!0,y.nextTick(m,R,A))}function m(A,R){A.endEmitted||0!==A.length||(A.endEmitted=!0,R.readable=!1,R.emit("end"))}function D(A,R){for(var z=0,G=A.length;z=R.highWaterMark||R.ended))return o("read: emitReadable",R.length,R.ended),0===R.length&&R.ended?I(this):U(this),null;if(0===(A=K(A,R))&&R.ended)return 0===R.length&&I(this),null;var G,Q=R.needReadable;return o("need readable",Q),(0===R.length||R.length-A0?ut(A,R):null)?(R.needReadable=!0,A=0):R.length-=A,0===R.length&&(R.ended||(R.needReadable=!0),z!==A&&R.ended&&I(this)),null!==G&&this.emit("data",G),G},E.prototype._read=function(A){this.emit("error",new Error("_read() is not implemented"))},E.prototype.pipe=function(A,R){var z=this,G=this._readableState;switch(G.pipesCount){case 0:G.pipes=A;break;case 1:G.pipes=[G.pipes,A];break;default:G.pipes.push(A)}G.pipesCount+=1,o("pipe count=%d opts=%j",G.pipesCount,R);var Q=R&&!1===R.end||A===e.stdout||A===e.stderr?x:nt;function nt(){o("onend"),A.end()}G.endEmitted?y.nextTick(Q):z.once("end",Q),A.on("unpipe",function N(X,ct){o("onunpipe"),X===z&&ct&&!1===ct.hasUnpiped&&(ct.hasUnpiped=!0,o("cleanup"),A.removeListener("close",b),A.removeListener("finish",C),A.removeListener("drain",J),A.removeListener("error",u),A.removeListener("unpipe",N),z.removeListener("end",nt),z.removeListener("end",x),z.removeListener("data",t),T=!0,!G.awaitDrain||A._writableState&&!A._writableState.needDrain||J())});var N,J=(N=z,function(){var X=N._readableState;o("pipeOnDrain",X.awaitDrain),X.awaitDrain&&X.awaitDrain--,0===X.awaitDrain&&n(N,"data")&&(X.flowing=!0,at(N))});A.on("drain",J);var T=!1,k=!1;function t(N){o("ondata"),k=!1,!1!==A.write(N)||k||((1===G.pipesCount&&G.pipes===A||G.pipesCount>1&&-1!==D(G.pipes,A))&&!T&&(o("false write response, pause",z._readableState.awaitDrain),z._readableState.awaitDrain++,k=!0),z.pause())}function u(N){o("onerror",N),x(),A.removeListener("error",u),0===n(A,"error")&&A.emit("error",N)}function b(){A.removeListener("finish",C),x()}function C(){o("onfinish"),A.removeListener("close",b),x()}function x(){o("unpipe"),z.unpipe(A)}return z.on("data",t),function(N,X,ct){if("function"==typeof N.prependListener)return N.prependListener(X,ct);N._events&&N._events.error?h(N._events.error)?N._events.error.unshift(ct):N._events.error=[ct,N._events.error]:N.on(X,ct)}(A,"error",u),A.once("close",b),A.once("finish",C),A.emit("pipe",z),G.flowing||(o("pipe resume"),z.resume()),A},E.prototype.unpipe=function(A){var R=this._readableState,z={hasUnpiped:!1};if(0===R.pipesCount)return this;if(1===R.pipesCount)return A&&A!==R.pipes||(A||(A=R.pipes),R.pipes=null,R.pipesCount=0,R.flowing=!1,A&&A.emit("unpipe",this,z)),this;if(!A){var G=R.pipes,Q=R.pipesCount;R.pipes=null,R.pipesCount=0,R.flowing=!1;for(var nt=0;nt{"use strict";O.exports=h;var e=i(5867),y=Object.create(i(6497));function c(a,d){var S=this._transformState;S.transforming=!1;var g=S.writecb;if(!g)return this.emit("error",new Error("write callback called multiple times"));S.writechunk=null,S.writecb=null,null!=d&&this.push(d),g(a);var o=this._readableState;o.reading=!1,(o.needReadable||o.length{"use strict";var e=i(4155),y=i(8212);function c(U){var L=this;this.next=null,this.entry=null,this.finish=function(){!function($,ot,et){var Z=$.entry;for($.entry=null;Z;){var at=Z.callback;ot.pendingcb--,at(void 0),Z=Z.next}ot.corkedRequestsFree?ot.corkedRequestsFree.next=$:ot.corkedRequestsFree=$}(L,U)}}O.exports=p;var h,n=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?setImmediate:y.nextTick;p.WritableState=l;var r=Object.create(i(6497));r.inherits=i(5717);var a,d={deprecate:i(4927)},S=i(4104),g=i(4591).Buffer,o=i.g.Uint8Array||function(){},s=i(5513);function f(){}function l(U,L){h=h||i(5867);var $=L instanceof h;this.objectMode=!!(U=U||{}).objectMode,$&&(this.objectMode=this.objectMode||!!U.writableObjectMode);var ot=U.highWaterMark,et=U.writableHighWaterMark;this.highWaterMark=ot||0===ot?ot:$&&(et||0===et)?et:this.objectMode?16:16384,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1,this.decodeStrings=!(!1===U.decodeStrings),this.defaultEncoding=U.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ut){!function(I,m){var G,D=I._writableState,A=D.sync,R=D.writecb;if((G=D).writing=!1,G.writecb=null,G.length-=G.writelen,G.writelen=0,m)!function(G,Q,nt,J,T){--Q.pendingcb,nt?(y.nextTick(T,J),y.nextTick(K,G,Q),G._writableState.errorEmitted=!0,G.emit("error",J)):(T(J),G._writableState.errorEmitted=!0,G.emit("error",J),K(G,Q))}(I,D,A,m,R);else{var z=M(D);z||D.corked||D.bufferProcessing||!D.bufferedRequest||j(I,D),A?n(E,I,D,z,R):E(I,D,z,R)}}(L,ut)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new c(this)}function p(U){if(h=h||i(5867),!(a.call(p,this)||this instanceof h))return new p(U);this._writableState=new l(U,this),this.writable=!0,U&&("function"==typeof U.write&&(this._write=U.write),"function"==typeof U.writev&&(this._writev=U.writev),"function"==typeof U.destroy&&(this._destroy=U.destroy),"function"==typeof U.final&&(this._final=U.final)),S.call(this)}function _(U,L,$,ot,et,Z,at){L.writelen=ot,L.writecb=at,L.writing=!0,L.sync=!0,$?U._writev(et,L.onwrite):U._write(et,Z,L.onwrite),L.sync=!1}function E(U,L,$,ot){var et,Z;$||(et=U,0===(Z=L).length&&Z.needDrain&&(Z.needDrain=!1,et.emit("drain"))),L.pendingcb--,ot(),K(U,L)}function j(U,L){L.bufferProcessing=!0;var $=L.bufferedRequest;if(U._writev&&$&&$.next){var et=new Array(L.bufferedRequestCount),Z=L.corkedRequestsFree;Z.entry=$;for(var at=0,ut=!0;$;)et[at]=$,$.isBuf||(ut=!1),$=$.next,at+=1;et.allBuffers=ut,_(U,L,!0,L.length,et,"",Z.finish),L.pendingcb++,L.lastBufferedRequest=null,Z.next?(L.corkedRequestsFree=Z.next,Z.next=null):L.corkedRequestsFree=new c(L),L.bufferedRequestCount=0}else{for(;$;){var I=$.chunk;if(_(U,L,!1,L.objectMode?1:I.length,I,$.encoding,$.callback),$=$.next,L.bufferedRequestCount--,L.writing)break}null===$&&(L.lastBufferedRequest=null)}L.bufferedRequest=$,L.bufferProcessing=!1}function M(U){return U.ending&&0===U.length&&null===U.bufferedRequest&&!U.finished&&!U.writing}function F(U,L){U._final(function($){L.pendingcb--,$&&U.emit("error",$),L.prefinished=!0,U.emit("prefinish"),K(U,L)})}function K(U,L){var ot,et,$=M(L);return $&&(ot=U,(et=L).prefinished||et.finalCalled||("function"==typeof ot._final?(et.pendingcb++,et.finalCalled=!0,y.nextTick(F,ot,et)):(et.prefinished=!0,ot.emit("prefinish"))),0===L.pendingcb&&(L.finished=!0,U.emit("finish"))),$}r.inherits(p,S),l.prototype.getBuffer=function(){for(var U=this.bufferedRequest,L=[];U;)L.push(U),U=U.next;return L},function(){try{Object.defineProperty(l.prototype,"buffer",{get:d.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(a=Function.prototype[Symbol.hasInstance],Object.defineProperty(p,Symbol.hasInstance,{value:function(U){return!!a.call(this,U)||this===p&&U&&U._writableState instanceof l}})):a=function(U){return U instanceof this},p.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},p.prototype.write=function(U,L,$){var ot,ut,I,m,et=this._writableState,Z=!1,at=!et.objectMode&&(g.isBuffer(ot=U)||ot instanceof o);return at&&!g.isBuffer(U)&&(U=g.from(U)),"function"==typeof L&&($=L,L=null),at?L="buffer":L||(L=et.defaultEncoding),"function"!=typeof $&&($=f),et.ended?(ut=this,I=$,m=new Error("write after end"),ut.emit("error",m),y.nextTick(I,m)):(at||function(ut,I,m,D){var A=!0,R=!1;return null===m?R=new TypeError("May not write null values to stream"):"string"==typeof m||void 0===m||I.objectMode||(R=new TypeError("Invalid non-string/buffer chunk")),R&&(ut.emit("error",R),y.nextTick(D,R),A=!1),A}(this,et,U,$))&&(et.pendingcb++,Z=function(ut,I,m,D,A,R){if(!m){var z=(T=D,(J=I).objectMode||!1===J.decodeStrings||"string"!=typeof T||(T=g.from(T,A)),T);D!==z&&(m=!0,A="buffer",D=z)}var J,T,G=I.objectMode?1:D.length;I.length+=G;var Q=I.length-1))throw new TypeError("Unknown encoding: "+U);return this._writableState.defaultEncoding=U,this},Object.defineProperty(p.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),p.prototype._write=function(U,L,$){$(new Error("_write() is not implemented"))},p.prototype._writev=null,p.prototype.end=function(U,L,$){var Z,at,ot=this._writableState;"function"==typeof U?($=U,U=null,L=null):"function"==typeof L&&($=L,L=null),null!=U&&this.write(U,L),ot.corked&&(ot.corked=1,this.uncork()),ot.ending||ot.finished||(this,at=$,(Z=ot).ending=!0,K(this,Z),at&&(Z.finished?y.nextTick(at):this.once("finish",at)),Z.ended=!0,this.writable=!1)},Object.defineProperty(p.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(U){this._writableState&&(this._writableState.destroyed=U)}}),p.prototype.destroy=s.destroy,p.prototype._undestroy=s.undestroy,p.prototype._destroy=function(U,L){this.end(),L(U)}},3912:(O,v,i)=>{"use strict";var e=i(4591).Buffer,y=i(522);O.exports=function(){function c(){(function(h,n){if(!(h instanceof n))throw new TypeError("Cannot call a class as a function")})(this,c),this.head=null,this.tail=null,this.length=0}return c.prototype.push=function(h){var n={data:h,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},c.prototype.unshift=function(h){var n={data:h,next:this.head};0===this.length&&(this.tail=n),this.head=n,++this.length},c.prototype.shift=function(){if(0!==this.length){var h=this.head.data;return this.head=1===this.length?this.tail=null:this.head.next,--this.length,h}},c.prototype.clear=function(){this.head=this.tail=null,this.length=0},c.prototype.join=function(h){if(0===this.length)return"";for(var n=this.head,r=""+n.data;n=n.next;)r+=h+n.data;return r},c.prototype.concat=function(h){if(0===this.length)return e.alloc(0);if(1===this.length)return this.head.data;for(var a=e.allocUnsafe(h>>>0),d=this.head,S=0;d;)d.data.copy(a,S),S+=d.data.length,d=d.next;return a},c}(),y&&y.inspect&&y.inspect.custom&&(O.exports.prototype[y.inspect.custom]=function(){var c=y.inspect({length:this.length});return this.constructor.name+" "+c})},5513:(O,v,i)=>{"use strict";var e=i(8212);function y(c,h){c.emit("error",h)}O.exports={destroy:function(c,h){var n=this;return this._readableState&&this._readableState.destroyed||this._writableState&&this._writableState.destroyed?(h?h(c):!c||this._writableState&&this._writableState.errorEmitted||e.nextTick(y,this,c),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(c||null,function(d){!h&&d?(e.nextTick(y,n,d),n._writableState&&(n._writableState.errorEmitted=!0)):h&&h(d)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},4104:(O,v,i)=>{O.exports=i(7187).EventEmitter},6801:(O,v,i)=>{(v=O.exports=i(4278)).Stream=v,v.Readable=v,v.Writable=i(759),v.Duplex=i(5867),v.Transform=i(62),v.PassThrough=i(3431)},4591:(O,v,i)=>{var e=i(8764),y=e.Buffer;function c(n,r){for(var a in n)r[a]=n[a]}function h(n,r,a){return y(n,r,a)}y.from&&y.alloc&&y.allocUnsafe&&y.allocUnsafeSlow?O.exports=e:(c(e,v),v.Buffer=h),c(y,h),h.from=function(n,r,a){if("number"==typeof n)throw new TypeError("Argument must not be a number");return y(n,r,a)},h.alloc=function(n,r,a){if("number"!=typeof n)throw new TypeError("Argument must be a number");var d=y(n);return void 0!==r?"string"==typeof a?d.fill(r,a):d.fill(r):d.fill(0),d},h.allocUnsafe=function(n){if("number"!=typeof n)throw new TypeError("Argument must be a number");return y(n)},h.allocUnsafeSlow=function(n){if("number"!=typeof n)throw new TypeError("Argument must be a number");return e.SlowBuffer(n)}},7989:(O,v,i)=>{"use strict";var e=i(4591).Buffer,y=e.isEncoding||function(s){switch((s=""+s)&&s.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function c(s){var f;switch(this.encoding=function(l){var p=function(_){if(!_)return"utf8";for(var E;;)switch(_){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return _;default:if(E)return;_=(""+_).toLowerCase(),E=!0}}(l);if("string"!=typeof p&&(e.isEncoding===y||!y(l)))throw new Error("Unknown encoding: "+l);return p||l}(s),this.encoding){case"utf16le":this.text=r,this.end=a,f=4;break;case"utf8":this.fillLast=n,f=4;break;case"base64":this.text=d,this.end=S,f=3;break;default:return this.write=g,void(this.end=o)}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(f)}function h(s){return s<=127?0:s>>5==6?2:s>>4==14?3:s>>3==30?4:s>>6==2?-1:-2}function n(s){var f=this.lastTotal-this.lastNeed,l=function(p,_,E){if(128!=(192&_[0]))return p.lastNeed=0,"\ufffd";if(p.lastNeed>1&&_.length>1){if(128!=(192&_[1]))return p.lastNeed=1,"\ufffd";if(p.lastNeed>2&&_.length>2&&128!=(192&_[2]))return p.lastNeed=2,"\ufffd"}}(this,s);return void 0!==l?l:this.lastNeed<=s.length?(s.copy(this.lastChar,f,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(s.copy(this.lastChar,f,0,s.length),void(this.lastNeed-=s.length))}function r(s,f){if((s.length-f)%2==0){var l=s.toString("utf16le",f);if(l){var p=l.charCodeAt(l.length-1);if(p>=55296&&p<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=s[s.length-2],this.lastChar[1]=s[s.length-1],l.slice(0,-1)}return l}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=s[s.length-1],s.toString("utf16le",f,s.length-1)}function a(s){var f=s&&s.length?this.write(s):"";return this.lastNeed?f+this.lastChar.toString("utf16le",0,this.lastTotal-this.lastNeed):f}function d(s,f){var l=(s.length-f)%3;return 0===l?s.toString("base64",f):(this.lastNeed=3-l,this.lastTotal=3,1===l?this.lastChar[0]=s[s.length-1]:(this.lastChar[0]=s[s.length-2],this.lastChar[1]=s[s.length-1]),s.toString("base64",f,s.length-l))}function S(s){var f=s&&s.length?this.write(s):"";return this.lastNeed?f+this.lastChar.toString("base64",0,3-this.lastNeed):f}function g(s){return s.toString(this.encoding)}function o(s){return s&&s.length?this.write(s):""}v.s=c,c.prototype.write=function(s){if(0===s.length)return"";var f,l;if(this.lastNeed){if(void 0===(f=this.fillLast(s)))return"";l=this.lastNeed,this.lastNeed=0}else l=0;return l=0?(F>0&&(_.lastNeed=F-1),F):--M=0?(F>0&&(_.lastNeed=F-2),F):--M=0?(F>0&&(2===F?F=0:_.lastNeed=F-3),F):0}(this,s,f);if(!this.lastNeed)return s.toString("utf8",f);this.lastTotal=l;var p=s.length-(l-this.lastNeed);return s.copy(this.lastChar,0,p),s.toString("utf8",f,p)},c.prototype.fillLast=function(s){if(this.lastNeed<=s.length)return s.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);s.copy(this.lastChar,this.lastTotal-this.lastNeed,0,s.length),this.lastNeed-=s.length}},4650:(O,v,i)=>{var e=i(4155),y=i(6801).Transform,c=i(9539).inherits,h=i(7529);function n(d){y.call(this,d),this._destroyed=!1}function r(d,S,g){g(null,d)}function a(d){return function(S,g,o){return"function"==typeof S&&(o=g,g=S,S={}),"function"!=typeof g&&(g=r),"function"!=typeof o&&(o=null),d(S,g,o)}}c(n,y),n.prototype.destroy=function(d){if(!this._destroyed){this._destroyed=!0;var S=this;e.nextTick(function(){d&&S.emit("error",d),S.emit("close")})}},O.exports=a(function(d,S,g){var o=new n(d);return o._transform=S,g&&(o._flush=g),o}),O.exports.ctor=a(function(d,S,g){function o(s){if(!(this instanceof o))return new o(s);this.options=h(d,s),n.call(this,this.options)}return c(o,n),o.prototype._transform=S,g&&(o.prototype._flush=g),o}),O.exports.obj=a(function(d,S,g){var o=new n(h({objectMode:!0,highWaterMark:16},d));return o._transform=S,g&&(o._flush=g),o})},4927:(O,v,i)=>{function e(y){try{if(!i.g.localStorage)return!1}catch{return!1}var c=i.g.localStorage[y];return null!=c&&"true"===String(c).toLowerCase()}O.exports=function(y,c){if(e("noDeprecation"))return y;var h=!1;return function(){if(!h){if(e("throwDeprecation"))throw new Error(c);e("traceDeprecation")?console.trace(c):console.warn(c),h=!0}return y.apply(this,arguments)}}},384:O=>{O.exports=function(v){return v&&"object"==typeof v&&"function"==typeof v.copy&&"function"==typeof v.fill&&"function"==typeof v.readUInt8}},5955:(O,v,i)=>{"use strict";var e=i(2584),y=i(8662),c=i(6430),h=i(5692);function n(m){return m.call.bind(m)}var r=typeof BigInt<"u",a=typeof Symbol<"u",d=n(Object.prototype.toString),S=n(Number.prototype.valueOf),g=n(String.prototype.valueOf),o=n(Boolean.prototype.valueOf);if(r)var s=n(BigInt.prototype.valueOf);if(a)var f=n(Symbol.prototype.valueOf);function l(m,D){if("object"!=typeof m)return!1;try{return D(m),!0}catch{return!1}}function p(m){return"[object Map]"===d(m)}function _(m){return"[object Set]"===d(m)}function E(m){return"[object WeakMap]"===d(m)}function j(m){return"[object WeakSet]"===d(m)}function M(m){return"[object ArrayBuffer]"===d(m)}function F(m){return typeof ArrayBuffer<"u"&&(M.working?M(m):m instanceof ArrayBuffer)}function K(m){return"[object DataView]"===d(m)}function U(m){return typeof DataView<"u"&&(K.working?K(m):m instanceof DataView)}v.isArgumentsObject=e,v.isGeneratorFunction=y,v.isTypedArray=h,v.isPromise=function(m){return typeof Promise<"u"&&m instanceof Promise||null!==m&&"object"==typeof m&&"function"==typeof m.then&&"function"==typeof m.catch},v.isArrayBufferView=function(m){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(m):h(m)||U(m)},v.isUint8Array=function(m){return"Uint8Array"===c(m)},v.isUint8ClampedArray=function(m){return"Uint8ClampedArray"===c(m)},v.isUint16Array=function(m){return"Uint16Array"===c(m)},v.isUint32Array=function(m){return"Uint32Array"===c(m)},v.isInt8Array=function(m){return"Int8Array"===c(m)},v.isInt16Array=function(m){return"Int16Array"===c(m)},v.isInt32Array=function(m){return"Int32Array"===c(m)},v.isFloat32Array=function(m){return"Float32Array"===c(m)},v.isFloat64Array=function(m){return"Float64Array"===c(m)},v.isBigInt64Array=function(m){return"BigInt64Array"===c(m)},v.isBigUint64Array=function(m){return"BigUint64Array"===c(m)},p.working=typeof Map<"u"&&p(new Map),v.isMap=function(m){return typeof Map<"u"&&(p.working?p(m):m instanceof Map)},_.working=typeof Set<"u"&&_(new Set),v.isSet=function(m){return typeof Set<"u"&&(_.working?_(m):m instanceof Set)},E.working=typeof WeakMap<"u"&&E(new WeakMap),v.isWeakMap=function(m){return typeof WeakMap<"u"&&(E.working?E(m):m instanceof WeakMap)},j.working=typeof WeakSet<"u"&&j(new WeakSet),v.isWeakSet=function(m){return j(m)},M.working=typeof ArrayBuffer<"u"&&M(new ArrayBuffer),v.isArrayBuffer=F,K.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&K(new DataView(new ArrayBuffer(1),0,1)),v.isDataView=U;var L=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function $(m){return"[object SharedArrayBuffer]"===d(m)}function ot(m){return void 0!==L&&(void 0===$.working&&($.working=$(new L)),$.working?$(m):m instanceof L)}function et(m){return l(m,S)}function Z(m){return l(m,g)}function at(m){return l(m,o)}function ut(m){return r&&l(m,s)}function I(m){return a&&l(m,f)}v.isSharedArrayBuffer=ot,v.isAsyncFunction=function(m){return"[object AsyncFunction]"===d(m)},v.isMapIterator=function(m){return"[object Map Iterator]"===d(m)},v.isSetIterator=function(m){return"[object Set Iterator]"===d(m)},v.isGeneratorObject=function(m){return"[object Generator]"===d(m)},v.isWebAssemblyCompiledModule=function(m){return"[object WebAssembly.Module]"===d(m)},v.isNumberObject=et,v.isStringObject=Z,v.isBooleanObject=at,v.isBigIntObject=ut,v.isSymbolObject=I,v.isBoxedPrimitive=function(m){return et(m)||Z(m)||at(m)||ut(m)||I(m)},v.isAnyArrayBuffer=function(m){return typeof Uint8Array<"u"&&(F(m)||ot(m))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(m){Object.defineProperty(v,m,{enumerable:!1,value:function(){throw new Error(m+" is not supported in userland")}})})},9539:(O,v,i)=>{var e=i(4155),y=Object.getOwnPropertyDescriptors||function(m){for(var D=Object.keys(m),A={},R=0;R=z)return nt;switch(nt){case"%s":return String(R[A++]);case"%d":return Number(R[A++]);case"%j":try{return JSON.stringify(R[A++])}catch{return"[Circular]"}default:return nt}}),Q=R[A];A=3&&(A.depth=arguments[2]),arguments.length>=4&&(A.colors=arguments[3]),l(D)?A.showHidden=D:D&&v._extend(A,D),j(A.showHidden)&&(A.showHidden=!1),j(A.depth)&&(A.depth=2),j(A.colors)&&(A.colors=!1),j(A.customInspect)&&(A.customInspect=!0),A.colors&&(A.stylize=d),g(A,m,A.depth)}function d(m,D){var A=a.styles[D];return A?"\x1b["+a.colors[A][0]+"m"+m+"\x1b["+a.colors[A][1]+"m":m}function S(m,D){return m}function g(m,D,A){if(m.customInspect&&D&&L(D.inspect)&&D.inspect!==v.inspect&&(!D.constructor||D.constructor.prototype!==D)){var R=D.inspect(A,m);return E(R)||(R=g(m,R,A)),R}var z=function(u,b){if(j(b))return u.stylize("undefined","undefined");if(E(b)){var C="'"+JSON.stringify(b).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return u.stylize(C,"string")}return _(b)?u.stylize(""+b,"number"):l(b)?u.stylize(""+b,"boolean"):p(b)?u.stylize("null","null"):void 0}(m,D);if(z)return z;var b,G=Object.keys(D),Q=(b={},G.forEach(function(C,x){b[C]=!0}),b);if(m.showHidden&&(G=Object.getOwnPropertyNames(D)),U(D)&&(G.indexOf("message")>=0||G.indexOf("description")>=0))return o(D);if(0===G.length){if(L(D))return m.stylize("[Function"+(D.name?": "+D.name:"")+"]","special");if(M(D))return m.stylize(RegExp.prototype.toString.call(D),"regexp");if(K(D))return m.stylize(Date.prototype.toString.call(D),"date");if(U(D))return o(D)}var J,T="",k=!1,t=["{","}"];return f(D)&&(k=!0,t=["[","]"]),L(D)&&(T=" [Function"+(D.name?": "+D.name:"")+"]"),M(D)&&(T=" "+RegExp.prototype.toString.call(D)),K(D)&&(T=" "+Date.prototype.toUTCString.call(D)),U(D)&&(T=" "+o(D)),0!==G.length||k&&0!=D.length?A<0?M(D)?m.stylize(RegExp.prototype.toString.call(D),"regexp"):m.stylize("[Object]","special"):(m.seen.push(D),J=k?function(u,b,C,x,N){for(var X=[],ct=0,pt=b.length;ct60?C[0]+(""===b?"":b+"\n ")+" "+u.join(",\n ")+" "+C[1]:C[0]+b+" "+u.join(", ")+" "+C[1]}(J,T,t)):t[0]+T+t[1]}function o(m){return"["+Error.prototype.toString.call(m)+"]"}function s(m,D,A,R,z,G){var Q,nt,J;if((J=Object.getOwnPropertyDescriptor(D,z)||{value:D[z]}).get?nt=m.stylize(J.set?"[Getter/Setter]":"[Getter]","special"):J.set&&(nt=m.stylize("[Setter]","special")),at(R,z)||(Q="["+z+"]"),nt||(m.seen.indexOf(J.value)<0?(nt=p(A)?g(m,J.value,null):g(m,J.value,A-1)).indexOf("\n")>-1&&(nt=G?nt.split("\n").map(function(T){return" "+T}).join("\n").substr(2):"\n"+nt.split("\n").map(function(T){return" "+T}).join("\n")):nt=m.stylize("[Circular]","special")),j(Q)){if(G&&z.match(/^\d+$/))return nt;(Q=JSON.stringify(""+z)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Q=Q.substr(1,Q.length-2),Q=m.stylize(Q,"name")):(Q=Q.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Q=m.stylize(Q,"string"))}return Q+": "+nt}function f(m){return Array.isArray(m)}function l(m){return"boolean"==typeof m}function p(m){return null===m}function _(m){return"number"==typeof m}function E(m){return"string"==typeof m}function j(m){return void 0===m}function M(m){return F(m)&&"[object RegExp]"===$(m)}function F(m){return"object"==typeof m&&null!==m}function K(m){return F(m)&&"[object Date]"===$(m)}function U(m){return F(m)&&("[object Error]"===$(m)||m instanceof Error)}function L(m){return"function"==typeof m}function $(m){return Object.prototype.toString.call(m)}function ot(m){return m<10?"0"+m.toString(10):m.toString(10)}v.debuglog=function(m){if(m=m.toUpperCase(),!h[m])if(n.test(m)){var D=e.pid;h[m]=function(){var A=v.format.apply(v,arguments);console.error("%s %d: %s",m,D,A)}}else h[m]=function(){};return h[m]},v.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},v.types=i(5955),v.isArray=f,v.isBoolean=l,v.isNull=p,v.isNullOrUndefined=function(m){return null==m},v.isNumber=_,v.isString=E,v.isSymbol=function(m){return"symbol"==typeof m},v.isUndefined=j,v.isRegExp=M,v.types.isRegExp=M,v.isObject=F,v.isDate=K,v.types.isDate=K,v.isError=U,v.types.isNativeError=U,v.isFunction=L,v.isPrimitive=function(m){return null===m||"boolean"==typeof m||"number"==typeof m||"string"==typeof m||"symbol"==typeof m||void 0===m},v.isBuffer=i(384);var et=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Z(){var m=new Date,D=[ot(m.getHours()),ot(m.getMinutes()),ot(m.getSeconds())].join(":");return[m.getDate(),et[m.getMonth()],D].join(" ")}function at(m,D){return Object.prototype.hasOwnProperty.call(m,D)}v.log=function(){console.log("%s - %s",Z(),v.format.apply(v,arguments))},v.inherits=i(5717),v._extend=function(m,D){if(!D||!F(D))return m;for(var A=Object.keys(D),R=A.length;R--;)m[A[R]]=D[A[R]];return m};var ut=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function I(m,D){if(!m){var A=new Error("Promise was rejected with a falsy value");A.reason=m,m=A}return D(m)}v.promisify=function(m){if("function"!=typeof m)throw new TypeError('The "original" argument must be of type Function');if(ut&&m[ut]){var D;if("function"!=typeof(D=m[ut]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(D,ut,{value:D,enumerable:!1,writable:!1,configurable:!0}),D}function D(){for(var A,R,z=new Promise(function(nt,J){A=nt,R=J}),G=[],Q=0;Q{"use strict";var e=i(4029),y=i(3083),c=i(1924),h=c("Object.prototype.toString"),n=i(6410)(),r=typeof globalThis>"u"?i.g:globalThis,a=y(),d=c("String.prototype.slice"),S={},g=i(882),o=Object.getPrototypeOf;n&&g&&o&&e(a,function(f){if("function"==typeof r[f]){var l=new r[f];if(Symbol.toStringTag in l){var p=o(l),_=g(p,Symbol.toStringTag);if(!_){var E=o(p);_=g(E,Symbol.toStringTag)}S[f]=_.get}}});var s=i(5692);O.exports=function(f){return!!s(f)&&(n&&Symbol.toStringTag in f?(l=f,p=!1,e(S,function(_,E){if(!p)try{var j=_.call(l);j===E&&(p=j)}catch{}}),p):d(h(f),8,-1));var l,p}},2479:O=>{O.exports=function v(i,e){if(i&&e)return v(i)(e);if("function"!=typeof i)throw new TypeError("need wrapper function");return Object.keys(i).forEach(function(c){y[c]=i[c]}),y;function y(){for(var c=new Array(arguments.length),h=0;h{O.exports=function(){for(var i={},e=0;e{},2361:()=>{},4616:()=>{},522:()=>{},6882:()=>{},3083:(O,v,i)=>{"use strict";var e=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],y=typeof globalThis>"u"?i.g:globalThis;O.exports=function(){for(var c=[],h=0;h{"use strict";var e=i(210)("%Object.getOwnPropertyDescriptor%",!0);if(e)try{e([],"length")}catch{e=null}O.exports=e}},be={};function wt(O){var v=be[O];if(void 0!==v)return v.exports;var i=be[O]={id:O,loaded:!1,exports:{}};return Ee[O].call(i.exports,i,i.exports,wt),i.loaded=!0,i.exports}wt.n=O=>{var v=O&&O.__esModule?()=>O.default:()=>O;return wt.d(v,{a:v}),v},wt.d=(O,v)=>{for(var i in v)wt.o(v,i)&&!wt.o(O,i)&&Object.defineProperty(O,i,{enumerable:!0,get:v[i]})},wt.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch{if("object"==typeof window)return window}}(),wt.o=(O,v)=>Object.prototype.hasOwnProperty.call(O,v),wt.nmd=O=>(O.paths=[],O.children||(O.children=[]),O);var Ae={};return(()=>{"use strict";function O(W,w,P){return w in W?Object.defineProperty(W,w,{value:P,enumerable:!0,configurable:!0,writable:!0}):W[w]=P,W}wt.d(Ae,{default:()=>ee});var v=wt(2378),i=wt.n(v),e=wt(2043),y=wt.n(e);function c(W,w){var P=Object.keys(W);if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(W);w&&(B=B.filter(function(V){return Object.getOwnPropertyDescriptor(W,V).enumerable})),P.push.apply(P,B)}return P}function h(W){for(var w=1;w1&&void 0!==arguments[1]?arguments[1]:{},B=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const V={mode:"cors",headers:{}};B.useAPIKey&&(V.headers=h(h({},V.headers),g()));const tt=i()(V,P,{method:"GET"}),Y=yield d(w,tt);if(Y.ok)return Y.json();throw o(Y),Y});return function(P){return W.apply(this,arguments)}}();var f=wt(8473),l=wt(1798),p=wt.n(l);wt(5772),wt(5811),wt(8764);var _=wt(7187),E=wt(4445),j=wt.n(E),M=wt(9826),F=wt(2840),K=wt.n(F),U=wt(778),L=wt.n(U),$=wt(4286),ot=wt.n($);function et(){}const Z="ACK";class at extends f.Duplex{constructor(w){let{name:P,target:B,targetWindow:V=window,targetOrigin:tt="*"}=w;if(super({objectMode:!0}),O(this,"_init",void 0),O(this,"_haveSyn",void 0),O(this,"_name",void 0),O(this,"_target",void 0),O(this,"_targetWindow",void 0),O(this,"_targetOrigin",void 0),O(this,"_onMessage",void 0),O(this,"_synIntervalId",void 0),!P||!B)throw new Error("Invalid input.");this._init=!1,this._haveSyn=!1,this._name=P,this._target=B,this._targetWindow=V,this._targetOrigin=tt,this._onMessage=this.onMessage.bind(this),this._synIntervalId=null,window.addEventListener("message",this._onMessage,!1),this._handShake()}_break(){this.cork(),this._write("BRK",null,et),this._haveSyn=!1,this._init=!1}_handShake(){this._write("SYN",null,et),this.cork()}_onData(w){if(this._init)if("BRK"===w)this._break();else try{this.push(w)}catch(P){this.emit("error",P)}else"SYN"===w?(this._haveSyn=!0,this._write(Z,null,et)):w===Z&&(this._init=!0,this._haveSyn||this._write(Z,null,et),this.uncork())}_postMessage(w){this._targetWindow.postMessage({target:this._target,data:w},this._targetOrigin)}onMessage(w){const P=w.data;"*"!==this._targetOrigin&&w.origin!==this._targetOrigin||w.source!==this._targetWindow||"object"!=typeof P||P.target!==this._name||!P.data||this._onData(P.data)}_read(){}_write(w,P,B){this._postMessage(w),B()}_destroy(){window.removeEventListener("message",this._onMessage,!1)}}function ut(W,w,P){try{Reflect.apply(W,w,P)}catch(B){setTimeout(()=>{throw B})}}class I extends _.EventEmitter{emit(w){let P="error"===w;const B=this._events;if(void 0!==B)P=P&&void 0===B.error;else if(!P)return!1;for(var V=arguments.length,tt=new Array(V>1?V-1:0),Y=1;Y0&&([rt]=tt),rt instanceof Error)throw rt;const lt=new Error("Unhandled error.".concat(rt?" (".concat(rt.message,")"):""));throw lt.context=rt,lt}const st=B[w];if(void 0===st)return!1;if("function"==typeof st)ut(st,this,tt);else{const rt=st.length,lt=function(ht){const dt=ht.length,mt=new Array(dt);for(let _t=0;_t{const Y=rt=>{const lt=rt||P.error;lt&&(P.error=(0,M.Xy)(lt)),tt([lt,!0])},st=rt=>{P.error?Y(P.error):(rt&&("function"!=typeof rt&&Y(new m({code:-32603,message:"JRPCEngine: 'next' return handlers must be functions"})),V.push(rt)),tt([null,!1]))};try{B(w,P,st,Y)}catch(rt){Y(rt)}})}static _runReturnHandlers(w){return Tt(function*(){for(const P of w)yield new Promise((B,V)=>{P(tt=>tt?V(tt):B())})})()}static _checkForCompletion(w,P,B){if(!("result"in P)&&!("error"in P))throw new m({code:-32603,message:"Response has no error or result for request"});if(!B)throw new m({code:-32603,message:"Nothing ended request"})}push(w){this._middleware.push(w)}handle(w,P){if(P&&"function"!=typeof P)throw new Error('"callback" must be a function if provided.');return Array.isArray(w)?P?this._handleBatch(w,P):this._handleBatch(w):P?this._handle(w,P):this._promiseHandle(w)}asMiddleware(){var w=this;return function(){var P=Tt(function*(B,V,tt,Y){try{const[st,rt,lt]=yield A._runAllMiddleware(B,V,w._middleware);return rt?(yield A._runReturnHandlers(lt),Y(st)):tt(function(){var ht=Tt(function*(dt){try{yield A._runReturnHandlers(lt)}catch(mt){return dt(mt)}return dt()});return function(dt){return ht.apply(this,arguments)}}())}catch(st){return Y(st)}});return function(B,V,tt,Y){return P.apply(this,arguments)}}()}_handleBatch(w,P){var B=this;return Tt(function*(){try{const V=yield Promise.all(w.map(B._promiseHandle.bind(B)));return P?P(null,V):V}catch(V){if(P)return P(V);throw V}})()}_promiseHandle(w){return new Promise(P=>{this._handle(w,(B,V)=>{P(V)})})}_handle(w,P){var B=this;return Tt(function*(){if(!w||Array.isArray(w)||"object"!=typeof w){const st=new m({code:-32603,message:"request must be plain object"});return P(st,{id:void 0,jsonrpc:"2.0",error:st})}if("string"!=typeof w.method){const st=new m({code:-32603,message:"method must be string"});return P(st,{id:w.id,jsonrpc:"2.0",error:st})}const V=function(st){for(var rt=1;rt0&&void 0!==arguments[0]?arguments[0]:{}),{},{objectMode:!0})),O(this,"_substreams",void 0),O(this,"getStream",void 0),this._substreams={}}createStream(w){if(!w)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[w])throw new Error('ObjectMultiplex - Substream for name "'.concat(w,'" already exists'));const P=new R({parent:this,name:w});return this._substreams[w]=P,function(B,V){const tt=L()(Y=>P.destroy(Y||void 0));K()(B,{readable:!1},tt),K()(B,{writable:!1},tt)}(this),P}ignoreStream(w){if(!w)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[w])throw new Error('ObjectMultiplex - Substream for name "'.concat(w,'" already exists'));this._substreams[w]=Q}_read(){}_write(w,P,B){const{name:V,data:tt}=w;if(!V)return window.console.warn('ObjectMultiplex - malformed chunk without name "'.concat(w,'"')),B();const Y=this._substreams[V];return Y?(Y!==Q&&Y.push(tt),B()):(window.console.warn('ObjectMultiplex - orphaned data for stream "'.concat(V,'"')),B())}}const J={GOOGLE:"google",FACEBOOK:"facebook",TWITCH:"twitch",REDDIT:"reddit",DISCORD:"discord",EMAIL_PASSWORDLESS:"torus-auth0-email-passwordless"},T={[J.GOOGLE]:"tkey-google",[J.FACEBOOK]:"tkey-facebook",[J.TWITCH]:"tkey-twitch",[J.REDDIT]:"tkey-reddit",[J.DISCORD]:"tkey-discord",[J.EMAIL_PASSWORDLESS]:"tkey-auth0-email-passwordless"},k="moonpay",t="wyre",u="rampnetwork",b="xanpool",C="mercuryo",x="transak",N="banxa",X="mainnet",ct="matic",pt="bsc_mainnet",gt="avalanche_mainnet",yt={PRODUCTION:"production",DEVELOPMENT:"development",BINANCE:"binance",TESTING:"testing",LRC:"lrc",BETA:"beta",BNB:"bnb",POLYGON:"polygon"},bt={BOTTOM_LEFT:"bottom-left",TOP_LEFT:"top-left",BOTTOM_RIGHT:"bottom-right",TOP_RIGHT:"top-right"},Et={[k]:["AUD","BGN","BRL","CAD","CHF","CNY","COP","CZK","DKK","DOP","EGP","EUR","GBP","HKD","HRK","IDR","ILS","JPY","JOD","KES","KRW","KWD","LKR","MAD","MXN","MYR","NGN","NOK","NZD","OMR","PEN","PKR","PLN","RON","RUB","SEK","SGD","THB","TRY","TWD","USD","VND","ZAR"],[t]:["USD","EUR","GBP","AUD","CAD","NZD","ARS","BRL","CHF","CLP","COP","CZK","DKK","HKD","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","PHP","PLN","SEK","THB","VND","ZAR"],[u]:["USD","EUR","GBP"],[b]:["SGD","HKD","THB","PHP","INR","IDR","MYR","AUD","NZD","KRW"],[C]:["EUR","USD","GBP","TRY","JPY","BRL","NGN","VND","MXN","KRW"],[x]:["ARS","AUD","BBD","BGN","BMD","BRL","CAD","CHF","CLP","CRC","CZK","DKK","DOP","EUR","FJD","FKP","GBP","GIP","HRK","HUF","IDR","ILS","ISK","JMD","JPY","KES","KRW","MDL","MXN","MYR","NOK","NZD","PEN","PHP","PLN","PYG","RON","SEK","SGD","THB","TRY","TZS","USD","ZAR"],[N]:["EUR","GBP","USD"]},Rt=new Set(["ETH","USDT","USDC","TUSD","EOSDT","USD","DAI","GUSD","DKKT","PAX","ILS","RUB","BYN","EUR","GBP","JPY","KRW","PLN","MXN","AUD","BRL","CAD","CHF","KPW","LAK","LBP","LKR","XOF","CNHT","DOGE","UAH","TRY","HKD","XJP","SGD","USC","NZD","NGN","RUR","COP","GHS","EGP","IDR","BHD","CRC","PEN","AED","DOP","PKR","HUF","VND","XAR","LTC","RON","OMR","MYR","DKK","UGX","ZMW","SAR","SEK","GEL","RWF","IRR","TZS","CNY","VEF","BDT","HRK","CLP","THB","XAF","ARS","UYU","SZL","KZT","NOK","KES","PAB","INR","CZK","MAD","TWD","PHP","ZAR","BOB","CDF","DASH","VES","ISK","MWK","BAM","TTD","XRP","JOD","RSD","HNL","BGN","GTQ","BWP","XMR","MMK","QAR","AOA","KWD","MUR","WUSD","WEUR","WAVES","WTRY","LRD","LSL","LYD","AWG","MDL","BTO","EURS","CHFT","MKD","MNT","MOP","MRO","MVR","VOLLAR","CKUSD","KHR","VUV","BITCNY","QC","BBD","NAD","NPR","PGK","PYG","BIF","BMD","BND","XLM","BNB","SCR","BAT","CRO","HT","KCS","LEO","LINK","MKR","NPXS","OMG","REP","ZB","ZIL","ZRX","BCH","BZD","CUP","CVE","DJF","DZD","ERN","ETB","FJD","FKP","BUSD","ANCT","ALL","AMD","ANG","CNYX","IQD","UZS","TND","GGP","XAU","KGS","GIP","JMD","ZEC","USDP","BSV","EMC2","SNT","GTO","POWR","EUSD","EURT","BCY","BTS","ATM","BLOCKPAY","ARDR","AMP","B2X","BITGOLD","BITEUR","ATB","BITUSD","AGRS","DFXT","HIKEN","BIX","KNC","EOS","COB","COSS","BMH","NANO","BDG","BNT","XVG","LKK1Y","LKK","USDK","EURN","NZDT","JSE","GMD","GNF","GYD","YER","XPF","HTG","SLL","SOS","WST","SVC","SYP","NEO","KMF","JUMP","AYA","BLAST","WGR","BCN","BTG","URALS","INN","USDQ","CNH","HUSD","BKRW","NZDX","EURX","CADX","USDEX","JPYX","AUDX","VNDC","EON","GBPX","CHFX","USDJ","IDRT","USDS","USDN","BIDR","IDK","BSD","BTN","KYD","NIO","SBD","SDG","SHP","TOP","XCD","XCHF","CNYT","GYEN","ZUSD","GOLD","TRX","TRYB","PLATC","STRAX","UST","GLM","VAI","BRZ","DDRST","XAUT","MIM"]);function Mt(W){return Et[W].filter(w=>Rt.has(w))}const Vt={[k]:{line1:"Credit/ Debit Card/ Apple Pay",line2:"4.5% or 5 USD",line3:"2,000\u20ac/day, 10,000\u20ac/mo",supportPage:"https://help.moonpay.io/en/",minOrderValue:24.99,maxOrderValue:5e4,validCurrencies:Mt(k),validCryptoCurrenciesByChain:{[X]:[{value:"aave",display:"AAVE"},{value:"bat",display:"BAT"},{value:"dai",display:"DAI"},{value:"eth",display:"ETH"},{value:"mkr",display:"MKR"},{value:"matic",display:"MATIC"},{value:"usdt",display:"USDT"},{value:"usdc",display:"USDC"}],[ct]:[{value:"eth_polygon",display:"ETH"},{value:"matic_polygon",display:"MATIC"},{value:"usdc_polygon",display:"USDC"}],[pt]:[{value:"bnb_bsc",display:"BNB"},{value:"busd_bsc",display:"BUSD"}],[gt]:[{value:"avax_cchain",display:"AVAX"}]},includeFees:!0,api:!0,enforceMax:!1},[t]:{line1:"Apple Pay/ Debit/ Credit Card",line2:"4.9% + 30\xa2 or 5 USD",line3:"$250/day",supportPage:"https://support.sendwyre.com/en/",minOrderValue:5,maxOrderValue:500,validCurrencies:Mt(t),validCryptoCurrenciesByChain:{[X]:[{value:"AAVE",display:"AAVE"},{value:"BAT",display:"BAT"},{value:"BUSD",display:"BUSD"},{value:"DAI",display:"DAI"},{value:"ETH",display:"ETH"},{value:"MKR",display:"MKR"},{value:"UNI",display:"UNI"},{value:"USDC",display:"USDC"},{value:"USDT",display:"USDT"}],[ct]:[{value:"MUSDC",display:"USDC"}],[gt]:[{value:"AVAXC",display:"AVAXC"}]},includeFees:!1,api:!0,enforceMax:!1},[u]:{line1:"Debit Card/
Apple Pay/ Bank transfer",line2:"0.49% - 2.9%",line3:"5,000\u20ac/purchase, 20,000\u20ac/mo",supportPage:"https://instant.ramp.network/",minOrderValue:50,maxOrderValue:2e4,validCurrencies:Mt(u),validCryptoCurrenciesByChain:{[X]:[{value:"ETH",display:"ETH"},{value:"DAI",display:"DAI"},{value:"USDC",display:"USDC"},{value:"USDT",display:"USDT"}],[ct]:[{value:"MATIC_DAI",display:"DAI"},{value:"MATIC_MATIC",display:"MATIC"},{value:"MATIC_USDC",display:"USDC"}],[gt]:[{value:"AVAX",display:"AVAX"}]},includeFees:!0,api:!0,receiveHint:"walletTopUp.receiveHintRamp",enforceMax:!1},[b]:{line1:"PayNow/ InstaPay/ FPS/ GoJekPay/ UPI/ PromptPay/
ViettelPay/ DuitNow",line2:"2.5% buying, 3% selling",line3:"$2,500 / day",supportPage:"mailto:support@xanpool.com",minOrderValue:100,maxOrderValue:2500,validCurrencies:Mt(b),validCryptoCurrenciesByChain:{[X]:[{value:"ETH",display:"ETH"},{value:"USDT",display:"USDT"}]},includeFees:!0,api:!0,sell:!0,enforceMax:!1},[C]:{line1:"Credit/ Debit Card/ Apple Pay",line2:"3.95% or 4 USD",line3:"10,000\u20ac/day, 25,000\u20ac/mo",supportPage:"mailto:support@mercuryo.io",minOrderValue:30,maxOrderValue:5e3,validCurrencies:Mt(C),validCryptoCurrenciesByChain:{[X]:[{value:"ETH",display:"ETH"},{value:"BAT",display:"BAT"},{value:"USDT",display:"USDT"},{value:"DAI",display:"DAI"}],[pt]:[{value:"BNB",display:"BNB"},{value:"BUSD",display:"BUSD"},{value:"1INCH",display:"1INCH"}]},includeFees:!0,api:!0,enforceMax:!1},[x]:{line1:"Apple & Google Pay / Credit/Debit Card
Bangkok Bank Mobile & iPay
Bank Transfer (sepa/gbp) / SCB Mobile & Easy",line2:"0.99% - 5.5% or 5 USD",line3:"$5,000/day, $28,000/mo",supportPage:"https://support.transak.com/hc/en-US",minOrderValue:30,maxOrderValue:500,validCurrencies:Mt(x),validCryptoCurrenciesByChain:{[X]:[{value:"AAVE",display:"AAVE"},{value:"DAI",display:"DAI"},{value:"ETH",display:"ETH"},{value:"USDC",display:"USDC"},{value:"USDT",display:"USDT"}],[ct]:[{value:"AAVE",display:"AAVE"},{value:"DAI",display:"DAI"},{value:"MATIC",display:"MATIC"},{value:"USDC",display:"USDC"},{value:"USDT",display:"USDT"},{value:"WETH",display:"WETH"}],[pt]:[{value:"BNB",display:"BNB"},{value:"BUSD",display:"BUSD"}],[gt]:[{value:"AVAX",display:"AVAX"}]},includeFees:!0,enforceMax:!0},[N]:{line1:"Debit Card/
Apple Pay/ Bank transfer",line2:"0.49% - 2.9%",line3:"5,000\u20ac/purchase, 20,000\u20ac/mo",supportPage:"https://support.banxa.com",minOrderValue:20,maxOrderValue:15e3,validCurrencies:Mt(N),validCryptoCurrenciesByChain:{[X]:[{value:"ETH",display:"ETH"},{value:"USDT",display:"USDT"},{value:"BUSD",display:"BUSD"},{value:"LINK",display:"LINK"},{value:"USDC",display:"USDC"},{value:"CHZ",display:"CHZ"},{value:"BAT",display:"BAT"},{value:"MANA",display:"MANA"},{value:"AAVE",display:"AAVE"},{value:"COMP",display:"COMP"},{value:"ENJ",display:"ENJ"}],[ct]:[{value:"MATIC",display:"MATIC"}]},includeFees:!0,enforceMax:!0}},Pt={supportedVerifierList:Object.values(J),paymentProviders:Vt,api:"https://api.tor.us",translations:{en:{embed:{continue:"Continue",actionRequired:"Authorization required",pendingAction:"Click continue to proceed with your request in a popup",cookiesRequired:"Cookies Required",enableCookies:"Please enable cookies in your browser preferences to access Torus",clickHere:"More Info"}},de:{embed:{continue:"Fortsetzen",actionRequired:"Autorisierung erforderlich",pendingAction:"Klicken Sie in einem Popup auf Weiter, um mit Ihrer Anfrage fortzufahren",cookiesRequired:"Cookies ben\xf6tigt",enableCookies:"Bitte aktivieren Sie Cookies in Ihren Browsereinstellungen, um auf Torus zuzugreifen",clickHere:"Mehr Info"}},ja:{embed:{continue:"\u7d99\u7d9a\u3059\u308b",actionRequired:"\u8a8d\u8a3c\u304c\u5fc5\u8981\u3067\u3059",pendingAction:"\u7d9a\u884c\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u3001\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7\u3067\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u7d9a\u884c\u3057\u307e\u3059",cookiesRequired:"\u5fc5\u8981\u306a\u30af\u30c3\u30ad\u30fc",enableCookies:"Torus\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u306b\u306f\u3001\u30d6\u30e9\u30a6\u30b6\u306e\u8a2d\u5b9a\u3067Cookie\u3092\u6709\u52b9\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002",clickHere:"\u8a73\u3057\u304f\u306f"}},ko:{embed:{continue:"\uacc4\uc18d\ud558\ub2e4",actionRequired:"\uc2b9\uc778 \ud544\uc694",pendingAction:"\ud31d\uc5c5\uc5d0\uc11c \uc694\uccad\uc744 \uc9c4\ud589\ud558\ub824\uba74 \uacc4\uc18d\uc744 \ud074\ub9ad\ud558\uc2ed\uc2dc\uc624.",cookiesRequired:"\ucfe0\ud0a4 \ud544\uc694",enableCookies:"\ube0c\ub77c\uc6b0\uc800 \ud658\uacbd \uc124\uc815\uc5d0\uc11c \ucfe0\ud0a4\ub97c \ud65c\uc131\ud654\ud558\uc5ec Torus\uc5d0 \uc561\uc138\uc2a4\ud558\uc2ed\uc2dc\uc624.",clickHere:"\ub354 \ub9ce\uc740 \uc815\ubcf4"}},zh:{embed:{continue:"\u7ee7\u7eed",actionRequired:"\u9700\u8981\u6388\u6743",pendingAction:"\u5355\u51fb\u7ee7\u7eed\u4ee5\u5728\u5f39\u51fa\u7a97\u53e3\u4e2d\u7ee7\u7eed\u60a8\u7684\u8bf7\u6c42",cookiesRequired:"\u5fc5\u586bCookie",enableCookies:"\u8bf7\u5728\u60a8\u7684\u6d4f\u89c8\u5668\u9996\u9009\u9879\u4e2d\u542f\u7528cookie\u4ee5\u8bbf\u95eeTorus\u3002",clickHere:"\u66f4\u591a\u4fe1\u606f"}}},prodTorusUrl:"",localStorageKeyPrefix:"torus-"},Nt=W=>new Promise((w,P)=>{null!=window.document.body?Promise.resolve(W()).then(w).catch(P):window.document.addEventListener("DOMContentLoaded",()=>{Promise.resolve(W()).then(w).catch(P)})}),qt=W=>{const w=window.document.createElement("template"),P=W.trim();return w.innerHTML=P,w.content.firstChild},Ut=(W,w,P)=>{const B=V=>{P(V),W.removeListener(w,B)};W.on(w,B)};var ce=wt(2724),he=wt(4063),me=wt.n(he),Zt=wt(4970);const St=y().getLogger("torus-embed"),Bt={errors:{disconnected:()=>"Torus: Lost connection to Torus.",permanentlyDisconnected:()=>"Torus: Disconnected from iframe. Page reload required.",sendSiteMetadata:()=>"Torus: Failed to send site metadata. This is an internal error, please report this bug.",unsupportedSync:W=>`Torus: The Torus Ethereum provider does not support synchronous methods like ${W} without a callback parameter.`,invalidDuplexStream:()=>"Must provide a Node.js-style duplex stream.",invalidOptions:(W,w)=>`Invalid options. Received: { maxEventListeners: ${W}, shouldSendMetadata: ${w} }`,invalidRequestArgs:()=>"Expected a single, non-array, object argument.",invalidRequestMethod:()=>"'args.method' must be a non-empty string.",invalidRequestParams:()=>"'args.params' must be an object or array if provided.",invalidLoggerObject:()=>"'args.logger' must be an object if provided.",invalidLoggerMethod:W=>`'args.logger' must include required method '${W}'.`},info:{connected:W=>`Torus: Connected to chain with ID "${W}".`},warnings:{enableDeprecation:'Torus: ""ethereum.enable()" is deprecated and may be removed in the future. Please use "ethereum.send("eth_requestAccounts")" instead. For more information, see: https://eips.ethereum.org/EIPS/eip-1102',sendDeprecation:'Torus: "ethereum.send(...)" is deprecated and may be removed in the future. Please use "ethereum.sendAsync(...)" or "ethereum.request(...)" instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193',events:{close:'Torus: The event "close" is deprecated and may be removed in the future. Please use "disconnect" instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193',data:'Torus: The event "data" is deprecated and will be removed in the future.Use "message" instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#message',networkChanged:'Torus: The event "networkChanged" is deprecated and may be removed in the future. Please use "chainChanged" instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193',notification:'Torus: The event "notification" is deprecated and may be removed in the future. Please use "message" instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193'},publicConfigStore:'Torus: The property "publicConfigStore" is deprecated and WILL be removed in the future.'}},{paymentProviders:Qt}=Pt;function re(W,w,P){let B=`MetaMask: Lost connection to "${W}".`;null!=w&&w.stack&&(B+=`\n${w.stack}`),St.warn(B),P&&P.listenerCount("error")>0&&P.emit("error",B)}const zt=()=>Math.random().toString(36).slice(2),ne=function(){var W=Tt(function*(w,P){let B,V,tt=P.version||"1.37.1";try{if(("binance"===w||"production"===w)&&!P.version){let Y;Y=Pt.prodTorusUrl?{data:Pt.prodTorusUrl}:yield s(`${Pt.api}/latestversion?name=@toruslabs/torus-embed&version=1.37.1`,{},{useAPIKey:!0}),tt=Y.data,Pt.prodTorusUrl=Y.data}}catch(Y){St.error(Y,"unable to fetch latest version")}switch(St.info("version used: ",tt),w){case"binance":B=`https://binance.tor.us/v${tt}`,V="info";break;case"testing":B="https://testing.tor.us",V="debug";break;case"bnb":B="https://bnb.tor.us",V="error";break;case"polygon":B="https://polygon.tor.us",V="error";break;case"lrc":B="https://lrc.tor.us",V="debug";break;case"beta":B="https://beta.tor.us",V="debug";break;case"development":B="http://localhost:4050",V="debug";break;default:B=`https://app.tor.us/v${tt}`,V="error"}return{torusUrl:B,logLevel:V}});return function(P,B){return W.apply(this,arguments)}}(),Ht=()=>{let W=window.navigator.language||"en-US";const w=W.split("-");return W=Object.prototype.hasOwnProperty.call(Pt.translations,w[0])?w[0]:"en",W},Xt=["eth_subscription"],ie=()=>{},oe="directories=0,titlebar=0,toolbar=0,status=0,location=0,menubar=0,height=660,width=375",te="directories=0,titlebar=0,toolbar=0,status=0,location=0,menubar=0,height=700,width=450";function fe(W,w){var P=Object.keys(W);if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(W);w&&(B=B.filter(function(V){return Object.getOwnPropertyDescriptor(W,V).enumerable})),P.push.apply(P,B)}return P}I.defaultMaxListeners=100;const se=function(W,w){let P=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return(B,V)=>B||V.error?w(B||V.error):!P||Array.isArray(V)?W(V):W(V.result)};class q extends I{constructor(w){let{maxEventListeners:P=100,shouldSendMetadata:B=!0,jsonRpcStreamName:V="provider"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(super(),O(this,"chainId",void 0),O(this,"selectedAddress",void 0),O(this,"_rpcEngine",void 0),O(this,"networkVersion",void 0),O(this,"shouldSendMetadata",void 0),O(this,"isTorus",void 0),O(this,"_publicConfigStore",void 0),O(this,"tryPreopenHandle",void 0),O(this,"enable",void 0),O(this,"_state",void 0),O(this,"_jsonRpcConnection",void 0),O(this,"_sentWarnings",{enable:!1,experimentalMethods:!1,send:!1,publicConfigStore:!1,events:{close:!1,data:!1,networkChanged:!1,notification:!1}}),!(0,Zt.duplex)(w))throw new Error(Bt.errors.invalidDuplexStream());this.isTorus=!0,this.setMaxListeners(P),this._state=function(rt){for(var lt=1;lt{this._state.isConnected=!0});const Y=function(){const rt={},lt=new I,ht=new f.Duplex({objectMode:!0,read:function(){return!1},write:function(dt,mt,_t){let Dt;try{dt.id?function(Ct){const Ft=rt[Ct.id];if(!Ft)throw new Error('StreamMiddleware - Unknown response id "'.concat(Ct.id,'"'));delete rt[Ct.id],Object.assign(Ft.res,Ct),setTimeout(Ft.end)}(dt):lt.emit("notification",Ct=dt)}catch(Ct){Dt=Ct}var Ct;_t(Dt)}});return{events:lt,middleware:(dt,mt,_t,Dt)=>{ht.push(dt),rt[dt.id]={req:dt,res:mt,next:_t,end:Dt}},stream:ht}}();ot()(Y.stream,tt.createStream(V),Y.stream,this._handleStreamDisconnect.bind(this,"MetaMask RpcProvider"));const st=new A;st.push((rt,lt,ht,dt)=>{const mt=rt.id,_t=p()(32).toString("hex");rt.id=_t,lt.id=_t,ht(Dt=>{rt.id=mt,lt.id=mt,Dt()})}),st.push((rt,lt,ht)=>{"string"==typeof rt.method&&rt.method||(lt.error=M.Sy.rpc.invalidRequest({message:"The request 'method' must be a non-empty string.",data:rt})),ht(dt=>{const{error:mt}=lt;return mt&&St.error(`MetaMask - RPC Error: ${mt.message}`,mt),dt()})}),st.push(Y.middleware),this._rpcEngine=st,Y.events.on("notification",rt=>{const{method:lt,params:ht}=rt;"wallet_accountsChanged"===lt?this._handleAccountsChanged(ht):"wallet_unlockStateChanged"===lt?this._handleUnlockStateChanged(ht):"wallet_chainChanged"===lt?this._handleChainChanged(ht):Xt.includes(rt.method)&&(this.emit("data",rt),this.emit("notification",ht.result),this.emit("message",{type:lt,data:ht}))})}get publicConfigStore(){return this._sentWarnings.publicConfigStore||(St.warn(Bt.warnings.publicConfigStore),this._sentWarnings.publicConfigStore=!0),this._publicConfigStore}isConnected(){return this._state.isConnected}request(w){var P=this;return Tt(function*(){if(!w||"object"!=typeof w||Array.isArray(w))throw M.Sy.rpc.invalidRequest({message:Bt.errors.invalidRequestArgs(),data:w});const{method:B,params:V}=w;if("string"!=typeof B||0===B.length)throw M.Sy.rpc.invalidRequest({message:Bt.errors.invalidRequestMethod(),data:w});if(void 0!==V&&!Array.isArray(V)&&("object"!=typeof V||null===V))throw M.Sy.rpc.invalidRequest({message:Bt.errors.invalidRequestParams(),data:w});return new Promise((tt,Y)=>{P._rpcRequest({method:B,params:V},se(tt,Y))})})()}sendAsync(w,P){this._rpcRequest(w,P)}addListener(w,P){return this._warnOfDeprecation(w),super.addListener(w,P)}on(w,P){return this._warnOfDeprecation(w),super.on(w,P)}once(w,P){return this._warnOfDeprecation(w),super.once(w,P)}prependListener(w,P){return this._warnOfDeprecation(w),super.prependListener(w,P)}prependOnceListener(w,P){return this._warnOfDeprecation(w),super.prependOnceListener(w,P)}_initializeState(){var w=this;return Tt(function*(){try{const{accounts:P,chainId:B,isUnlocked:V,networkVersion:tt}=yield w.request({method:"wallet_getProviderState"});w.emit("connect",{chainId:B}),w._handleChainChanged({chainId:B,networkVersion:tt}),w._handleUnlockStateChanged({accounts:P,isUnlocked:V}),w._handleAccountsChanged(P)}catch(P){St.error("MetaMask: Failed to get initial state. Please report this bug.",P)}finally{St.info("initialized state"),w._state.initialized=!0,w.emit("_initialized")}})()}_rpcRequest(w,P){let B=arguments.length>2&&void 0!==arguments[2]&&arguments[2],V=P;const tt=w;if(!Array.isArray(tt))if(tt.jsonrpc||(tt.jsonrpc="2.0"),"eth_accounts"===tt.method||"eth_requestAccounts"===tt.method)V=(Y,st)=>{this._handleAccountsChanged(st.result||[],"eth_accounts"===tt.method,B),P(Y,st)};else if("wallet_getProviderState"===tt.method)return void this._rpcEngine.handle(w,V);this.tryPreopenHandle(tt,V)}send(w,P){return this._sentWarnings.send||(St.warn(Bt.warnings.sendDeprecation),this._sentWarnings.send=!0),"string"!=typeof w||P&&!Array.isArray(P)?w&&"object"==typeof w&&"function"==typeof P?this._rpcRequest(w,P):this._sendSync(w):new Promise((B,V)=>{try{this._rpcRequest({method:w,params:P},se(B,V,!1))}catch(tt){V(tt)}})}_sendSync(w){let P;switch(w.method){case"eth_accounts":P=this.selectedAddress?[this.selectedAddress]:[];break;case"eth_coinbase":P=this.selectedAddress||null;break;case"eth_uninstallFilter":this._rpcRequest(w,ie),P=!0;break;case"net_version":P=this.networkVersion||null;break;default:throw new Error(Bt.errors.unsupportedSync(w.method))}return{id:w.id,jsonrpc:w.jsonrpc,result:P}}_handleConnect(w){this._state.isConnected||(this._state.isConnected=!0,this.emit("connect",{chainId:w}),St.debug(Bt.info.connected(w)))}_handleDisconnect(w,P){if(this._state.isConnected||!this._state.isPermanentlyDisconnected&&!w){let B;this._state.isConnected=!1,w?(B=new M.Cg(1013,P||Bt.errors.disconnected()),St.debug(B)):(B=new M.Cg(1011,P||Bt.errors.permanentlyDisconnected()),St.error(B),this.chainId=null,this._state.accounts=null,this.selectedAddress=null,this._state.isUnlocked=!1,this._state.isPermanentlyDisconnected=!0),this.emit("disconnect",B)}}_handleStreamDisconnect(w,P){re(w,P,this),this._handleDisconnect(!1,P?P.message:void 0)}_handleAccountsChanged(w){let P=arguments.length>1&&void 0!==arguments[1]&&arguments[1],B=arguments.length>2&&void 0!==arguments[2]&&arguments[2],V=w;Array.isArray(V)||(St.error("MetaMask: Received non-array accounts parameter. Please report this bug.",V),V=[]);for(const tt of w)if("string"!=typeof tt){St.error("MetaMask: Received non-string account. Please report this bug.",w),V=[];break}me()(this._state.accounts,V)||(P&&Array.isArray(this._state.accounts)&&this._state.accounts.length>0&&!B&&St.error('MetaMask: "eth_accounts" unexpectedly updated accounts. Please report this bug.',V),this._state.accounts=V,this.emit("accountsChanged",V)),this.selectedAddress!==V[0]&&(this.selectedAddress=V[0]||null)}_handleChainChanged(){let{chainId:w,networkVersion:P}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};w&&P?"loading"===P?this._handleDisconnect(!0):(this._handleConnect(w),w!==this.chainId&&(this.chainId=w,this._state.initialized&&this.emit("chainChanged",this.chainId))):St.error("MetaMask: Received invalid network parameters. Please report this bug.",{chainId:w,networkVersion:P})}_handleUnlockStateChanged(){let{accounts:w,isUnlocked:P}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"boolean"==typeof P?P!==this._state.isUnlocked&&(this._state.isUnlocked=P,this._handleAccountsChanged(w||[])):St.error("MetaMask: Received invalid isUnlocked parameter. Please report this bug.",{isUnlocked:P})}_warnOfDeprecation(w){!1===this._sentWarnings.events[w]&&(St.warn(Bt.warnings.events[w]),this._sentWarnings.events[w]=!0)}}O(q,"_defaultState",{accounts:null,isConnected:!1,isUnlocked:!1,initialized:!1,isPermanentlyDisconnected:!1,hasEmittedConnection:!1});const H=q;var it=wt(3482),ft=wt.n(it);const vt=(W,w)=>{const P={};return W.algorithms.forEach(B=>{P[B]=ft()(B).update(w,"utf8").digest("base64")}),P},At=class Ot extends _.EventEmitter{constructor(w){let{url:P,target:B,features:V}=w;super(),O(this,"url",void 0),O(this,"target",void 0),O(this,"features",void 0),O(this,"window",void 0),O(this,"windowTimer",void 0),O(this,"iClosedWindow",void 0),this.url=P,this.target=B||"_blank",this.features=V||function(){const tt=void 0!==window.screenLeft?window.screenLeft:window.screenX,Y=void 0!==window.screenTop?window.screenTop:window.screenY,st=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:window.screen.width,rt=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:window.screen.height,lt=Math.abs((st-1200)/2/1+tt);return`titlebar=0,toolbar=0,status=0,location=0,menubar=0,height=700,width=1200,top=${Math.abs((rt-700)/2/1+Y)},left=${lt}`}(),this.window=void 0,this.windowTimer=void 0,this.iClosedWindow=!1,this._setupTimer()}_setupTimer(){this.windowTimer=Number(setInterval(()=>{this.window&&this.window.closed&&(clearInterval(this.windowTimer),this.iClosedWindow||this.emit("close"),this.iClosedWindow=!1,this.window=void 0),void 0===this.window&&clearInterval(this.windowTimer)},500))}open(){var w;return this.window=window.open(this.url.href,this.target,this.features),null!==(w=this.window)&&void 0!==w&&w.focus&&this.window.focus(),Promise.resolve()}close(){this.iClosedWindow=!0,this.window&&this.window.close()}redirect(w){w?window.location.replace(this.url.href):window.location.href=this.url.href}};function It(W){return new Promise((w,P)=>{try{const B=document.createElement("img");B.onload=()=>w(!0),B.onerror=()=>w(!1),B.src=W}catch(B){P(B)}})}const jt=W=>{const{document:w}=W,P=w.querySelector('head > meta[property="og:site_name"]');if(P)return P.content;const B=w.querySelector('head > meta[name="title"]');return B?B.content:w.title&&w.title.length>0?w.title:W.location.hostname};function xt(W){return kt.apply(this,arguments)}function kt(){return(kt=Tt(function*(W){const{document:w}=W;let P=w.querySelector('head > link[rel="shortcut icon"]');return P&&(yield It(P.href))?P.href:(P=Array.from(w.querySelectorAll('head > link[rel="icon"]')).find(B=>Boolean(B.href)),P&&(yield It(P.href))?P.href:null)})).apply(this,arguments)}var Jt=wt(8764).Buffer;const Yt=["host","chainId","networkName"];function Kt(W,w){var P=Object.keys(W);if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(W);w&&(B=B.filter(function(V){return Object.getOwnPropertyDescriptor(W,V).enumerable})),P.push.apply(P,B)}return P}function Gt(W){for(var w=1;w"u")return;const W=document.createElement("link"),{torusUrl:w}=yield ne("production",{check:!1,hash:Lt,version:""});W.href=`${w}/popup`,W.crossOrigin="anonymous",W.type="text/html",W.rel="prefetch",W.relList&&W.relList.supports&&W.relList.supports("prefetch")&&document.head.appendChild(W)}catch(W){St.warn(W)}})();const ee=class{constructor(){let{buttonPosition:W=bt.BOTTOM_LEFT,buttonSize:w=56,modalZIndex:P=99999,apiKey:B="torus-default"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};O(this,"buttonPosition",bt.BOTTOM_LEFT),O(this,"buttonSize",void 0),O(this,"torusUrl",void 0),O(this,"torusIframe",void 0),O(this,"styleLink",void 0),O(this,"isLoggedIn",void 0),O(this,"isInitialized",void 0),O(this,"torusWidgetVisibility",void 0),O(this,"torusAlert",void 0),O(this,"apiKey",void 0),O(this,"modalZIndex",void 0),O(this,"alertZIndex",void 0),O(this,"torusAlertContainer",void 0),O(this,"isIframeFullScreen",void 0),O(this,"whiteLabel",void 0),O(this,"requestedVerifier",void 0),O(this,"currentVerifier",void 0),O(this,"embedTranslations",void 0),O(this,"ethereum",void 0),O(this,"provider",void 0),O(this,"communicationMux",void 0),O(this,"isLoginCallback",void 0),O(this,"paymentProviders",Pt.paymentProviders),O(this,"loginHint",""),O(this,"useWalletConnect",void 0),O(this,"isCustomLogin",!1),this.buttonPosition=W,this.buttonSize=w,this.torusUrl="",this.isLoggedIn=!1,this.isInitialized=!1,this.torusWidgetVisibility=!0,this.requestedVerifier="",this.currentVerifier="",this.apiKey=B,function a(W){r=W}(B),this.modalZIndex=P,this.alertZIndex=P+1e3,this.isIframeFullScreen=!1}init(){var W=arguments,w=this;return Tt(function*(){let{buildEnv:P=yt.PRODUCTION,enableLogging:B=!1,enabledVerifiers:V=Wt,network:tt={host:"mainnet",chainId:null,networkName:"",blockExplorer:"",ticker:"",tickerName:""},loginConfig:Y={},showTorusButton:st=!0,integrity:rt={check:!1,hash:Lt,version:""},whiteLabel:lt,skipTKey:ht=!1,useWalletConnect:dt=!1,mfaLevel:mt="default"}=W.length>0&&void 0!==W[0]?W[0]:{};if(w.isInitialized)throw new Error("Already initialized");const{torusUrl:_t,logLevel:Dt}=yield ne(P,rt);St.info(_t,"url loaded"),w.torusUrl=_t,w.whiteLabel=lt,w.useWalletConnect=dt,w.isCustomLogin=!!(Y&&Object.keys(Y).length>0)||!!(lt&&Object.keys(lt).length>0),St.setDefaultLevel(Dt),B?St.enableAll():St.disableAll(),w.torusWidgetVisibility=st;const Ct=new URL(_t);Ct.pathname.endsWith("/")?Ct.pathname+="popup":Ct.pathname+="/popup",Ct.hash=`#isCustomLogin=${w.isCustomLogin}`,w.torusIframe=qt(`