diff --git a/assets/http-45319b00.js b/assets/http-9b812ea1.js similarity index 99% rename from assets/http-45319b00.js rename to assets/http-9b812ea1.js index 85fd599..ac5a5d3 100644 --- a/assets/http-45319b00.js +++ b/assets/http-9b812ea1.js @@ -1 +1 @@ -import{M as E,I as ae,J as q,N as ce}from"./index-42ee4a0e.js";const fe=r=>JSON.stringify(r,(t,s)=>typeof s=="bigint"?s.toString()+"n":s),ue=r=>{const t=/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,s=r.replace(t,'$1"$2n"$3');return JSON.parse(s,(c,f)=>typeof f=="string"&&f.match(/^\d+n$/)?BigInt(f.substring(0,f.length-1)):f)};function he(r){if(typeof r!="string")throw new Error(`Cannot safe json parse value of type ${typeof r}`);try{return ue(r)}catch{return r}}function L(r){return typeof r=="string"?r:fe(r)||""}const de="PARSE_ERROR",le="INVALID_REQUEST",pe="METHOD_NOT_FOUND",ye="INVALID_PARAMS",$="INTERNAL_ERROR",S="SERVER_ERROR",be=[-32700,-32600,-32601,-32602,-32603],R={[de]:{code:-32700,message:"Parse error"},[le]:{code:-32600,message:"Invalid Request"},[pe]:{code:-32601,message:"Method not found"},[ye]:{code:-32602,message:"Invalid params"},[$]:{code:-32603,message:"Internal error"},[S]:{code:-32e3,message:"Server error"}},V=S;function me(r){return be.includes(r)}function U(r){return Object.keys(R).includes(r)?R[r]:R[V]}function ve(r){const t=Object.values(R).find(s=>s.code===r);return t||R[V]}function Ee(r,t,s){return r.message.includes("getaddrinfo ENOTFOUND")||r.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${s} RPC url at ${t}`):r}var ge={},b={},M;function we(){if(M)return b;M=1,Object.defineProperty(b,"__esModule",{value:!0}),b.isBrowserCryptoAvailable=b.getSubtleCrypto=b.getBrowerCrypto=void 0;function r(){return(E===null||E===void 0?void 0:E.crypto)||(E===null||E===void 0?void 0:E.msCrypto)||{}}b.getBrowerCrypto=r;function t(){const c=r();return c.subtle||c.webkitSubtle}b.getSubtleCrypto=t;function s(){return!!r()&&!!t()}return b.isBrowserCryptoAvailable=s,b}var m={},j;function Re(){if(j)return m;j=1,Object.defineProperty(m,"__esModule",{value:!0}),m.isBrowser=m.isNode=m.isReactNative=void 0;function r(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}m.isReactNative=r;function t(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}m.isNode=t;function s(){return!r()&&!t()}return m.isBrowser=s,m}(function(r){Object.defineProperty(r,"__esModule",{value:!0});const t=ae;t.__exportStar(we(),r),t.__exportStar(Re(),r)})(ge);function k(r=3){const t=Date.now()*Math.pow(10,r),s=Math.floor(Math.random()*Math.pow(10,r));return t+s}function _e(r=6){return BigInt(k(r))}function Ae(r,t,s){return{id:s||k(),jsonrpc:"2.0",method:r,params:t}}function Ne(r,t){return{id:r,jsonrpc:"2.0",result:t}}function Te(r,t,s){return{id:r,jsonrpc:"2.0",error:Oe(t,s)}}function Oe(r,t){return typeof r>"u"?U($):(typeof r=="string"&&(r=Object.assign(Object.assign({},U(S)),{message:r})),typeof t<"u"&&(r.data=t),me(r.code)&&(r=ve(r.code)),r)}class G{}class Fe extends G{constructor(t){super()}}class Pe extends G{constructor(){super()}}class Be extends Pe{constructor(t){super()}}const Se="^https?:",De="^wss?:";function xe(r){const t=r.match(new RegExp(/^\w+:/,"gi"));if(!(!t||!t.length))return t[0]}function X(r,t){const s=xe(r);return typeof s>"u"?!1:new RegExp(t).test(s)}function N(r){return X(r,Se)}function He(r){return X(r,De)}function Je(r){return new RegExp("wss?://localhost(:d{2,5})?").test(r)}function z(r){return typeof r=="object"&&"id"in r&&"jsonrpc"in r&&r.jsonrpc==="2.0"}function qe(r){return z(r)&&"method"in r}function Ce(r){return z(r)&&(Ie(r)||W(r))}function Ie(r){return"result"in r}function W(r){return"error"in r}class $e extends Be{constructor(t){super(t),this.events=new q.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(t),this.connection.connected&&this.registerEventListeners()}async connect(t=this.connection){await this.open(t)}async disconnect(){await this.close()}on(t,s){this.events.on(t,s)}once(t,s){this.events.once(t,s)}off(t,s){this.events.off(t,s)}removeListener(t,s){this.events.removeListener(t,s)}async request(t,s){return this.requestStrict(Ae(t.method,t.params||[],t.id||_e().toString()),s)}async requestStrict(t,s){return new Promise(async(c,f)=>{if(!this.connection.connected)try{await this.open()}catch(o){f(o)}this.events.on(`${t.id}`,o=>{W(o)?f(o.error):c(o.result)});try{await this.connection.send(t,s)}catch(o){f(o)}})}setConnection(t=this.connection){return t}onPayload(t){this.events.emit("payload",t),Ce(t)?this.events.emit(`${t.id}`,t):this.events.emit("message",{type:t.method,data:t.params})}onClose(t){t&&t.code===3e3&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${t.code} ${t.reason?`(${t.reason})`:""}`)),this.events.emit("disconnect")}async open(t=this.connection){this.connection===t&&this.connection.connected||(this.connection.connected&&this.close(),typeof t=="string"&&(await this.connection.open(t),t=this.connection),this.connection=this.setConnection(t),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",t=>this.onPayload(t)),this.connection.on("close",t=>this.onClose(t)),this.connection.on("error",t=>this.events.emit("error",t)),this.connection.on("register_error",t=>this.onClose()),this.hasRegisteredEventListeners=!0)}}var B={exports:{}};(function(r,t){var s=typeof self<"u"?self:E,c=function(){function o(){this.fetch=!1,this.DOMException=s.DOMException}return o.prototype=s,new o}();(function(o){(function(l){var p={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function Q(e){return e&&DataView.prototype.isPrototypeOf(e)}if(p.arrayBuffer)var K=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Y=ArrayBuffer.isView||function(e){return e&&K.indexOf(Object.prototype.toString.call(e))>-1};function g(e){if(typeof e!="string"&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function D(e){return typeof e!="string"&&(e=String(e)),e}function A(e){var n={next:function(){var i=e.shift();return{done:i===void 0,value:i}}};return p.iterable&&(n[Symbol.iterator]=function(){return n}),n}function u(e){this.map={},e instanceof u?e.forEach(function(n,i){this.append(i,n)},this):Array.isArray(e)?e.forEach(function(n){this.append(n[0],n[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(n){this.append(n,e[n])},this)}u.prototype.append=function(e,n){e=g(e),n=D(n);var i=this.map[e];this.map[e]=i?i+", "+n:n},u.prototype.delete=function(e){delete this.map[g(e)]},u.prototype.get=function(e){return e=g(e),this.has(e)?this.map[e]:null},u.prototype.has=function(e){return this.map.hasOwnProperty(g(e))},u.prototype.set=function(e,n){this.map[g(e)]=D(n)},u.prototype.forEach=function(e,n){for(var i in this.map)this.map.hasOwnProperty(i)&&e.call(n,this.map[i],i,this)},u.prototype.keys=function(){var e=[];return this.forEach(function(n,i){e.push(i)}),A(e)},u.prototype.values=function(){var e=[];return this.forEach(function(n){e.push(n)}),A(e)},u.prototype.entries=function(){var e=[];return this.forEach(function(n,i){e.push([i,n])}),A(e)},p.iterable&&(u.prototype[Symbol.iterator]=u.prototype.entries);function T(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function x(e){return new Promise(function(n,i){e.onload=function(){n(e.result)},e.onerror=function(){i(e.error)}})}function Z(e){var n=new FileReader,i=x(n);return n.readAsArrayBuffer(e),i}function ee(e){var n=new FileReader,i=x(n);return n.readAsText(e),i}function te(e){for(var n=new Uint8Array(e),i=new Array(n.length),d=0;d-1?n:e}function v(e,n){n=n||{};var i=n.body;if(e instanceof v){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,n.headers||(this.headers=new u(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,!i&&e._bodyInit!=null&&(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=n.credentials||this.credentials||"same-origin",(n.headers||!this.headers)&&(this.headers=new u(n.headers)),this.method=ne(n.method||this.method||"GET"),this.mode=n.mode||this.mode||null,this.signal=n.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})};function se(e){var n=new FormData;return e.trim().split("&").forEach(function(i){if(i){var d=i.split("="),h=d.shift().replace(/\+/g," "),a=d.join("=").replace(/\+/g," ");n.append(decodeURIComponent(h),decodeURIComponent(a))}}),n}function ie(e){var n=new u,i=e.replace(/\r?\n[\t ]+/g," ");return i.split(/\r?\n/).forEach(function(d){var h=d.split(":"),a=h.shift().trim();if(a){var _=h.join(":").trim();n.append(a,_)}}),n}I.call(v.prototype);function y(e,n){n||(n={}),this.type="default",this.status=n.status===void 0?200:n.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in n?n.statusText:"OK",this.headers=new u(n.headers),this.url=n.url||"",this._initBody(e)}I.call(y.prototype),y.prototype.clone=function(){return new y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new u(this.headers),url:this.url})},y.error=function(){var e=new y(null,{status:0,statusText:""});return e.type="error",e};var oe=[301,302,303,307,308];y.redirect=function(e,n){if(oe.indexOf(n)===-1)throw new RangeError("Invalid status code");return new y(null,{status:n,headers:{location:e}})},l.DOMException=o.DOMException;try{new l.DOMException}catch{l.DOMException=function(n,i){this.message=n,this.name=i;var d=Error(n);this.stack=d.stack},l.DOMException.prototype=Object.create(Error.prototype),l.DOMException.prototype.constructor=l.DOMException}function O(e,n){return new Promise(function(i,d){var h=new v(e,n);if(h.signal&&h.signal.aborted)return d(new l.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function _(){a.abort()}a.onload=function(){var w={status:a.status,statusText:a.statusText,headers:ie(a.getAllResponseHeaders()||"")};w.url="responseURL"in a?a.responseURL:w.headers.get("X-Request-URL");var P="response"in a?a.response:a.responseText;i(new y(P,w))},a.onerror=function(){d(new TypeError("Network request failed"))},a.ontimeout=function(){d(new TypeError("Network request failed"))},a.onabort=function(){d(new l.DOMException("Aborted","AbortError"))},a.open(h.method,h.url,!0),h.credentials==="include"?a.withCredentials=!0:h.credentials==="omit"&&(a.withCredentials=!1),"responseType"in a&&p.blob&&(a.responseType="blob"),h.headers.forEach(function(w,P){a.setRequestHeader(P,w)}),h.signal&&(h.signal.addEventListener("abort",_),a.onreadystatechange=function(){a.readyState===4&&h.signal.removeEventListener("abort",_)}),a.send(typeof h._bodyInit>"u"?null:h._bodyInit)})}return O.polyfill=!0,o.fetch||(o.fetch=O,o.Headers=u,o.Request=v,o.Response=y),l.Headers=u,l.Request=v,l.Response=y,l.fetch=O,Object.defineProperty(l,"__esModule",{value:!0}),l})({})})(c),c.fetch.ponyfill=!0,delete c.fetch.polyfill;var f=c;t=f.fetch,t.default=f.fetch,t.fetch=f.fetch,t.Headers=f.Headers,t.Request=f.Request,t.Response=f.Response,r.exports=t})(B,B.exports);var Le=B.exports;const F=ce(Le),Ue={Accept:"application/json","Content-Type":"application/json"},Me="POST",H={headers:Ue,method:Me},J=10;class Ve{constructor(t,s=!1){if(this.url=t,this.disableProviderPing=s,this.events=new q.EventEmitter,this.isAvailable=!1,this.registering=!1,!N(t))throw new Error(`Provided URL is not compatible with HTTP connection: ${t}`);this.url=t,this.disableProviderPing=s}get connected(){return this.isAvailable}get connecting(){return this.registering}on(t,s){this.events.on(t,s)}once(t,s){this.events.once(t,s)}off(t,s){this.events.off(t,s)}removeListener(t,s){this.events.removeListener(t,s)}async open(t=this.url){await this.register(t)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(t,s){this.isAvailable||await this.register();try{const c=L(t),o=await(await F(this.url,Object.assign(Object.assign({},H),{body:c}))).json();this.onPayload({data:o})}catch(c){this.onError(t.id,c)}}async register(t=this.url){if(!N(t))throw new Error(`Provided URL is not compatible with HTTP connection: ${t}`);if(this.registering){const s=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=s||this.events.listenerCount("open")>=s)&&this.events.setMaxListeners(s+1),new Promise((c,f)=>{this.events.once("register_error",o=>{this.resetMaxListeners(),f(o)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return f(new Error("HTTP connection is missing or invalid"));c()})})}this.url=t,this.registering=!0;try{if(!this.disableProviderPing){const s=L({id:1,jsonrpc:"2.0",method:"test",params:[]});await F(t,Object.assign(Object.assign({},H),{body:s}))}this.onOpen()}catch(s){const c=this.parseError(s);throw this.events.emit("register_error",c),this.onClose(),c}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(t){if(typeof t.data>"u")return;const s=typeof t.data=="string"?he(t.data):t.data;this.events.emit("payload",s)}onError(t,s){const c=this.parseError(s),f=c.message||c.toString(),o=Te(t,f);this.events.emit("payload",o)}parseError(t,s=this.url){return Ee(t,s,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>J&&this.events.setMaxListeners(J)}}export{Ve as H,Fe as I,$e as J,he as a,Je as b,ge as c,qe as d,Ce as e,Te as f,Ne as g,Ie as h,He as i,W as j,Ae as k,_e as l,k as m,Ee as p,L as s}; +import{M as E,I as ae,J as q,N as ce}from"./index-d83b38d5.js";const fe=r=>JSON.stringify(r,(t,s)=>typeof s=="bigint"?s.toString()+"n":s),ue=r=>{const t=/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,s=r.replace(t,'$1"$2n"$3');return JSON.parse(s,(c,f)=>typeof f=="string"&&f.match(/^\d+n$/)?BigInt(f.substring(0,f.length-1)):f)};function he(r){if(typeof r!="string")throw new Error(`Cannot safe json parse value of type ${typeof r}`);try{return ue(r)}catch{return r}}function L(r){return typeof r=="string"?r:fe(r)||""}const de="PARSE_ERROR",le="INVALID_REQUEST",pe="METHOD_NOT_FOUND",ye="INVALID_PARAMS",$="INTERNAL_ERROR",S="SERVER_ERROR",be=[-32700,-32600,-32601,-32602,-32603],R={[de]:{code:-32700,message:"Parse error"},[le]:{code:-32600,message:"Invalid Request"},[pe]:{code:-32601,message:"Method not found"},[ye]:{code:-32602,message:"Invalid params"},[$]:{code:-32603,message:"Internal error"},[S]:{code:-32e3,message:"Server error"}},V=S;function me(r){return be.includes(r)}function U(r){return Object.keys(R).includes(r)?R[r]:R[V]}function ve(r){const t=Object.values(R).find(s=>s.code===r);return t||R[V]}function Ee(r,t,s){return r.message.includes("getaddrinfo ENOTFOUND")||r.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${s} RPC url at ${t}`):r}var ge={},b={},M;function we(){if(M)return b;M=1,Object.defineProperty(b,"__esModule",{value:!0}),b.isBrowserCryptoAvailable=b.getSubtleCrypto=b.getBrowerCrypto=void 0;function r(){return(E===null||E===void 0?void 0:E.crypto)||(E===null||E===void 0?void 0:E.msCrypto)||{}}b.getBrowerCrypto=r;function t(){const c=r();return c.subtle||c.webkitSubtle}b.getSubtleCrypto=t;function s(){return!!r()&&!!t()}return b.isBrowserCryptoAvailable=s,b}var m={},j;function Re(){if(j)return m;j=1,Object.defineProperty(m,"__esModule",{value:!0}),m.isBrowser=m.isNode=m.isReactNative=void 0;function r(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}m.isReactNative=r;function t(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}m.isNode=t;function s(){return!r()&&!t()}return m.isBrowser=s,m}(function(r){Object.defineProperty(r,"__esModule",{value:!0});const t=ae;t.__exportStar(we(),r),t.__exportStar(Re(),r)})(ge);function k(r=3){const t=Date.now()*Math.pow(10,r),s=Math.floor(Math.random()*Math.pow(10,r));return t+s}function _e(r=6){return BigInt(k(r))}function Ae(r,t,s){return{id:s||k(),jsonrpc:"2.0",method:r,params:t}}function Ne(r,t){return{id:r,jsonrpc:"2.0",result:t}}function Te(r,t,s){return{id:r,jsonrpc:"2.0",error:Oe(t,s)}}function Oe(r,t){return typeof r>"u"?U($):(typeof r=="string"&&(r=Object.assign(Object.assign({},U(S)),{message:r})),typeof t<"u"&&(r.data=t),me(r.code)&&(r=ve(r.code)),r)}class G{}class Fe extends G{constructor(t){super()}}class Pe extends G{constructor(){super()}}class Be extends Pe{constructor(t){super()}}const Se="^https?:",De="^wss?:";function xe(r){const t=r.match(new RegExp(/^\w+:/,"gi"));if(!(!t||!t.length))return t[0]}function X(r,t){const s=xe(r);return typeof s>"u"?!1:new RegExp(t).test(s)}function N(r){return X(r,Se)}function He(r){return X(r,De)}function Je(r){return new RegExp("wss?://localhost(:d{2,5})?").test(r)}function z(r){return typeof r=="object"&&"id"in r&&"jsonrpc"in r&&r.jsonrpc==="2.0"}function qe(r){return z(r)&&"method"in r}function Ce(r){return z(r)&&(Ie(r)||W(r))}function Ie(r){return"result"in r}function W(r){return"error"in r}class $e extends Be{constructor(t){super(t),this.events=new q.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(t),this.connection.connected&&this.registerEventListeners()}async connect(t=this.connection){await this.open(t)}async disconnect(){await this.close()}on(t,s){this.events.on(t,s)}once(t,s){this.events.once(t,s)}off(t,s){this.events.off(t,s)}removeListener(t,s){this.events.removeListener(t,s)}async request(t,s){return this.requestStrict(Ae(t.method,t.params||[],t.id||_e().toString()),s)}async requestStrict(t,s){return new Promise(async(c,f)=>{if(!this.connection.connected)try{await this.open()}catch(o){f(o)}this.events.on(`${t.id}`,o=>{W(o)?f(o.error):c(o.result)});try{await this.connection.send(t,s)}catch(o){f(o)}})}setConnection(t=this.connection){return t}onPayload(t){this.events.emit("payload",t),Ce(t)?this.events.emit(`${t.id}`,t):this.events.emit("message",{type:t.method,data:t.params})}onClose(t){t&&t.code===3e3&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${t.code} ${t.reason?`(${t.reason})`:""}`)),this.events.emit("disconnect")}async open(t=this.connection){this.connection===t&&this.connection.connected||(this.connection.connected&&this.close(),typeof t=="string"&&(await this.connection.open(t),t=this.connection),this.connection=this.setConnection(t),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",t=>this.onPayload(t)),this.connection.on("close",t=>this.onClose(t)),this.connection.on("error",t=>this.events.emit("error",t)),this.connection.on("register_error",t=>this.onClose()),this.hasRegisteredEventListeners=!0)}}var B={exports:{}};(function(r,t){var s=typeof self<"u"?self:E,c=function(){function o(){this.fetch=!1,this.DOMException=s.DOMException}return o.prototype=s,new o}();(function(o){(function(l){var p={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function Q(e){return e&&DataView.prototype.isPrototypeOf(e)}if(p.arrayBuffer)var K=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Y=ArrayBuffer.isView||function(e){return e&&K.indexOf(Object.prototype.toString.call(e))>-1};function g(e){if(typeof e!="string"&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function D(e){return typeof e!="string"&&(e=String(e)),e}function A(e){var n={next:function(){var i=e.shift();return{done:i===void 0,value:i}}};return p.iterable&&(n[Symbol.iterator]=function(){return n}),n}function u(e){this.map={},e instanceof u?e.forEach(function(n,i){this.append(i,n)},this):Array.isArray(e)?e.forEach(function(n){this.append(n[0],n[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(n){this.append(n,e[n])},this)}u.prototype.append=function(e,n){e=g(e),n=D(n);var i=this.map[e];this.map[e]=i?i+", "+n:n},u.prototype.delete=function(e){delete this.map[g(e)]},u.prototype.get=function(e){return e=g(e),this.has(e)?this.map[e]:null},u.prototype.has=function(e){return this.map.hasOwnProperty(g(e))},u.prototype.set=function(e,n){this.map[g(e)]=D(n)},u.prototype.forEach=function(e,n){for(var i in this.map)this.map.hasOwnProperty(i)&&e.call(n,this.map[i],i,this)},u.prototype.keys=function(){var e=[];return this.forEach(function(n,i){e.push(i)}),A(e)},u.prototype.values=function(){var e=[];return this.forEach(function(n){e.push(n)}),A(e)},u.prototype.entries=function(){var e=[];return this.forEach(function(n,i){e.push([i,n])}),A(e)},p.iterable&&(u.prototype[Symbol.iterator]=u.prototype.entries);function T(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function x(e){return new Promise(function(n,i){e.onload=function(){n(e.result)},e.onerror=function(){i(e.error)}})}function Z(e){var n=new FileReader,i=x(n);return n.readAsArrayBuffer(e),i}function ee(e){var n=new FileReader,i=x(n);return n.readAsText(e),i}function te(e){for(var n=new Uint8Array(e),i=new Array(n.length),d=0;d-1?n:e}function v(e,n){n=n||{};var i=n.body;if(e instanceof v){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,n.headers||(this.headers=new u(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,!i&&e._bodyInit!=null&&(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=n.credentials||this.credentials||"same-origin",(n.headers||!this.headers)&&(this.headers=new u(n.headers)),this.method=ne(n.method||this.method||"GET"),this.mode=n.mode||this.mode||null,this.signal=n.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})};function se(e){var n=new FormData;return e.trim().split("&").forEach(function(i){if(i){var d=i.split("="),h=d.shift().replace(/\+/g," "),a=d.join("=").replace(/\+/g," ");n.append(decodeURIComponent(h),decodeURIComponent(a))}}),n}function ie(e){var n=new u,i=e.replace(/\r?\n[\t ]+/g," ");return i.split(/\r?\n/).forEach(function(d){var h=d.split(":"),a=h.shift().trim();if(a){var _=h.join(":").trim();n.append(a,_)}}),n}I.call(v.prototype);function y(e,n){n||(n={}),this.type="default",this.status=n.status===void 0?200:n.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in n?n.statusText:"OK",this.headers=new u(n.headers),this.url=n.url||"",this._initBody(e)}I.call(y.prototype),y.prototype.clone=function(){return new y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new u(this.headers),url:this.url})},y.error=function(){var e=new y(null,{status:0,statusText:""});return e.type="error",e};var oe=[301,302,303,307,308];y.redirect=function(e,n){if(oe.indexOf(n)===-1)throw new RangeError("Invalid status code");return new y(null,{status:n,headers:{location:e}})},l.DOMException=o.DOMException;try{new l.DOMException}catch{l.DOMException=function(n,i){this.message=n,this.name=i;var d=Error(n);this.stack=d.stack},l.DOMException.prototype=Object.create(Error.prototype),l.DOMException.prototype.constructor=l.DOMException}function O(e,n){return new Promise(function(i,d){var h=new v(e,n);if(h.signal&&h.signal.aborted)return d(new l.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function _(){a.abort()}a.onload=function(){var w={status:a.status,statusText:a.statusText,headers:ie(a.getAllResponseHeaders()||"")};w.url="responseURL"in a?a.responseURL:w.headers.get("X-Request-URL");var P="response"in a?a.response:a.responseText;i(new y(P,w))},a.onerror=function(){d(new TypeError("Network request failed"))},a.ontimeout=function(){d(new TypeError("Network request failed"))},a.onabort=function(){d(new l.DOMException("Aborted","AbortError"))},a.open(h.method,h.url,!0),h.credentials==="include"?a.withCredentials=!0:h.credentials==="omit"&&(a.withCredentials=!1),"responseType"in a&&p.blob&&(a.responseType="blob"),h.headers.forEach(function(w,P){a.setRequestHeader(P,w)}),h.signal&&(h.signal.addEventListener("abort",_),a.onreadystatechange=function(){a.readyState===4&&h.signal.removeEventListener("abort",_)}),a.send(typeof h._bodyInit>"u"?null:h._bodyInit)})}return O.polyfill=!0,o.fetch||(o.fetch=O,o.Headers=u,o.Request=v,o.Response=y),l.Headers=u,l.Request=v,l.Response=y,l.fetch=O,Object.defineProperty(l,"__esModule",{value:!0}),l})({})})(c),c.fetch.ponyfill=!0,delete c.fetch.polyfill;var f=c;t=f.fetch,t.default=f.fetch,t.fetch=f.fetch,t.Headers=f.Headers,t.Request=f.Request,t.Response=f.Response,r.exports=t})(B,B.exports);var Le=B.exports;const F=ce(Le),Ue={Accept:"application/json","Content-Type":"application/json"},Me="POST",H={headers:Ue,method:Me},J=10;class Ve{constructor(t,s=!1){if(this.url=t,this.disableProviderPing=s,this.events=new q.EventEmitter,this.isAvailable=!1,this.registering=!1,!N(t))throw new Error(`Provided URL is not compatible with HTTP connection: ${t}`);this.url=t,this.disableProviderPing=s}get connected(){return this.isAvailable}get connecting(){return this.registering}on(t,s){this.events.on(t,s)}once(t,s){this.events.once(t,s)}off(t,s){this.events.off(t,s)}removeListener(t,s){this.events.removeListener(t,s)}async open(t=this.url){await this.register(t)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(t,s){this.isAvailable||await this.register();try{const c=L(t),o=await(await F(this.url,Object.assign(Object.assign({},H),{body:c}))).json();this.onPayload({data:o})}catch(c){this.onError(t.id,c)}}async register(t=this.url){if(!N(t))throw new Error(`Provided URL is not compatible with HTTP connection: ${t}`);if(this.registering){const s=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=s||this.events.listenerCount("open")>=s)&&this.events.setMaxListeners(s+1),new Promise((c,f)=>{this.events.once("register_error",o=>{this.resetMaxListeners(),f(o)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return f(new Error("HTTP connection is missing or invalid"));c()})})}this.url=t,this.registering=!0;try{if(!this.disableProviderPing){const s=L({id:1,jsonrpc:"2.0",method:"test",params:[]});await F(t,Object.assign(Object.assign({},H),{body:s}))}this.onOpen()}catch(s){const c=this.parseError(s);throw this.events.emit("register_error",c),this.onClose(),c}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(t){if(typeof t.data>"u")return;const s=typeof t.data=="string"?he(t.data):t.data;this.events.emit("payload",s)}onError(t,s){const c=this.parseError(s),f=c.message||c.toString(),o=Te(t,f);this.events.emit("payload",o)}parseError(t,s=this.url){return Ee(t,s,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>J&&this.events.setMaxListeners(J)}}export{Ve as H,Fe as I,$e as J,he as a,Je as b,ge as c,qe as d,Ce as e,Te as f,Ne as g,Ie as h,He as i,W as j,Ae as k,_e as l,k as m,Ee as p,L as s}; diff --git a/assets/index-4ce26692.js b/assets/index-2dc0eace.js similarity index 99% rename from assets/index-4ce26692.js rename to assets/index-2dc0eace.js index f179aae..ff9194b 100644 --- a/assets/index-4ce26692.js +++ b/assets/index-2dc0eace.js @@ -1,4 +1,4 @@ -import{N as pe,F as Wn,P as Fn,y as Hn,Q as zn,R as Qn,S as Jn,D as Vn,T as Gn,U as Yn,V as Kn,W as Zn,X as Xn,E as er,w as tr,s as nr,t as rr,u as or,v as ir,G as et,Y as sr,O as tt}from"./index-42ee4a0e.js";import{a as ar,s as cr,m as lr,c as Q,I as ur,f as $e,J as je,H as dr}from"./http-45319b00.js";import{b as A,l as S,y as x,g as $,$ as O,q as K,B as hr,E as fr,a as ee,h as ge,p as me,V as nt,s as rt,_ as ot,A as it,F as st,T as at,c as ct,x as lt,d as ut,e as dt,P as _r}from"./hooks.module-835c4290.js";const ae="Session currently connected",q="Session currently disconnected",pr="Session Rejected",gr="Missing JSON RPC response",mr='JSON-RPC success response must include "result" field',wr='JSON-RPC error response must include "error" field',yr='JSON RPC request must have valid "method" value',br='JSON RPC request must have valid "id" value',vr="Missing one of the required parameters: bridge / uri / session",Be="JSON RPC response format is invalid",Er="URI format is invalid",Sr="QRCode Modal not provided",We="User close QRCode Modal",Cr=["session_request","session_update","exchange_key","connect","disconnect","display_uri","modal_closed","transport_open","transport_close","transport_error"],kr=["wallet_addEthereumChain","wallet_switchEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],we=["eth_sendTransaction","eth_signTransaction","eth_sign","eth_signTypedData","eth_signTypedData_v1","eth_signTypedData_v2","eth_signTypedData_v3","eth_signTypedData_v4","personal_sign",...kr],ue="WALLETCONNECT_DEEPLINK_CHOICE",xr={1:"mainnet",3:"ropsten",4:"rinkeby",5:"goerli",42:"kovan"};var ht=ye;ye.strict=ft;ye.loose=_t;var Ir=Object.prototype.toString,Rr={"[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 ye(t){return ft(t)||_t(t)}function ft(t){return t instanceof Int8Array||t instanceof Int16Array||t instanceof Int32Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Uint16Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array}function _t(t){return Rr[Ir.call(t)]}const Tr=pe(ht);var Or=ht.strict,Nr=function(e){if(Or(e)){var n=Buffer.from(e.buffer);return e.byteLength!==e.buffer.byteLength&&(n=n.slice(e.byteOffset,e.byteOffset+e.byteLength)),n}else return Buffer.from(e)};const Mr=pe(Nr),be="hex",ve="utf8",Lr="binary",qr="buffer",Ar="array",Ur="typed-array",Pr="array-buffer",te="0";function j(t){return new Uint8Array(t)}function Ee(t,e=!1){const n=t.toString(be);return e?J(n):n}function Se(t){return t.toString(ve)}function pt(t){return t.readUIntBE(0,t.length)}function W(t){return Mr(t)}function N(t,e=!1){return Ee(W(t),e)}function gt(t){return Se(W(t))}function mt(t){return pt(W(t))}function Ce(t){return Buffer.from(B(t),be)}function M(t){return j(Ce(t))}function Dr(t){return Se(Ce(t))}function $r(t){return mt(M(t))}function ke(t){return Buffer.from(t,ve)}function wt(t){return j(ke(t))}function jr(t,e=!1){return Ee(ke(t),e)}function Br(t){const e=parseInt(t,10);return io(oo(e),"Number can only safely store up to 53 bits"),e}function Wr(t){return Qr(xe(t))}function Fr(t){return Ie(xe(t))}function Hr(t,e){return Jr(xe(t),e)}function zr(t){return`${t}`}function xe(t){const e=(t>>>0).toString(2);return Te(e)}function Qr(t){return W(Ie(t))}function Ie(t){return new Uint8Array(Xr(t).map(e=>parseInt(e,2)))}function Jr(t,e){return N(Ie(t),e)}function Vr(t){return!(typeof t!="string"||!new RegExp(/^[01]+$/).test(t)||t.length%8!==0)}function yt(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}function ne(t){return Buffer.isBuffer(t)}function Re(t){return Tr.strict(t)&&!ne(t)}function bt(t){return!Re(t)&&!ne(t)&&typeof t.byteLength<"u"}function Gr(t){return ne(t)?qr:Re(t)?Ur:bt(t)?Pr:Array.isArray(t)?Ar:typeof t}function Yr(t){return Vr(t)?Lr:yt(t)?be:ve}function Kr(...t){return Buffer.concat(t)}function vt(...t){let e=[];return t.forEach(n=>e=e.concat(Array.from(n))),new Uint8Array([...e])}function Zr(t,e=8){const n=t%e;return n?(t-n)/e*e+e:t}function Xr(t,e=8){const n=Te(t).match(new RegExp(`.{${e}}`,"gi"));return Array.from(n||[])}function Te(t,e=8,n=te){return eo(t,Zr(t.length,e),n)}function eo(t,e,n=te){return so(t,e,!0,n)}function B(t){return t.replace(/^0x/,"")}function J(t){return t.startsWith("0x")?t:`0x${t}`}function to(t){return t=B(t),t=Te(t,2),t&&(t=J(t)),t}function no(t){const e=t.startsWith("0x");return t=B(t),t=t.startsWith(te)?t.substring(1):t,e?J(t):t}function ro(t){return typeof t>"u"}function oo(t){return!ro(t)}function io(t,e){if(!t)throw new Error(e)}function so(t,e,n,r=te){const o=e-t.length;let i=t;if(o>0){const d=r.repeat(o);i=n?d+t:t+d}return i}function Z(t){return W(new Uint8Array(t))}function ao(t){return gt(new Uint8Array(t))}function Et(t,e){return N(new Uint8Array(t),!e)}function co(t){return mt(new Uint8Array(t))}function lo(...t){return M(t.map(e=>N(new Uint8Array(e))).join("")).buffer}function St(t){return j(t).buffer}function uo(t){return Se(t)}function ho(t,e){return Ee(t,!e)}function fo(t){return pt(t)}function _o(...t){return Kr(...t)}function po(t){return wt(t).buffer}function go(t){return ke(t)}function mo(t,e){return jr(t,!e)}function wo(t){return Br(t)}function yo(t){return Ce(t)}function Ct(t){return M(t).buffer}function bo(t){return Dr(t)}function vo(t){return $r(t)}function Eo(t){return Wr(t)}function So(t){return Fr(t).buffer}function Co(t){return zr(t)}function kt(t,e){return Hr(Number(t),!e)}const ko=zn,xo=Qn,Io=Jn,Ro=Vn,To=Gn,xt=Hn,Oo=Yn,It=Wn,No=Kn,Mo=Zn,Lo=Xn,re=Fn;function oe(t){return er(t)}function ie(){const t=oe();return t&&t.os?t.os:void 0}function Rt(){const t=ie();return t?t.toLowerCase().includes("android"):!1}function Tt(){const t=ie();return t?t.toLowerCase().includes("ios")||t.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1:!1}function Ot(){return ie()?Rt()||Tt():!1}function Nt(){const t=oe();return t&&t.name?t.name.toLowerCase()==="node":!1}function Mt(){return!Nt()&&!!xt()}const Lt=ar,qt=cr;function Oe(t,e){const n=qt(e),r=re();r&&r.setItem(t,n)}function Ne(t){let e=null,n=null;const r=re();return r&&(n=r.getItem(t)),e=n&&Lt(n),e}function Me(t){const e=re();e&&e.removeItem(t)}function de(){return tr()}function qo(t){return to(t)}function Ao(t){return J(t)}function Uo(t){return B(t)}function Po(t){return no(J(t))}const At=lr;function Y(){return((e,n)=>{for(n=e="";e++<36;n+=e*51&52?(e^15?8^Math.random()*(e^20?16:4):4).toString(16):"-");return n})()}function Do(){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 Ut(t,e){let n;const r=xr[t];return r&&(n=`https://${r}.infura.io/v3/${e}`),n}function Pt(t,e){let n;const r=Ut(t,e.infuraId);return e.custom&&e.custom[t]?n=e.custom[t]:r&&(n=r),n}function $o(t,e){const n=encodeURIComponent(t);return e.universalLink?`${e.universalLink}/wc?uri=${n}`:e.deepLink?`${e.deepLink}${e.deepLink.endsWith(":")?"//":"/"}wc?uri=${n}`:""}function jo(t){const e=t.href.split("?")[0];Oe(ue,Object.assign(Object.assign({},t),{href:e}))}function Dt(t,e){return t.filter(n=>n.name.toLowerCase().includes(e.toLowerCase()))[0]}function Bo(t,e){let n=t;return e&&(n=e.map(r=>Dt(t,r)).filter(Boolean)),n}function Wo(t,e){return async(...r)=>new Promise((o,i)=>{const d=(f,p)=>{(f===null||typeof f>"u")&&i(f),o(p)};t.apply(e,[...r,d])})}function $t(t){const e=t.message||"Failed or Rejected Request";let n=-32e3;if(t&&!t.code)switch(e){case"Parse error":n=-32700;break;case"Invalid request":n=-32600;break;case"Method not found":n=-32601;break;case"Invalid params":n=-32602;break;case"Internal error":n=-32603;break;default:n=-32e3;break}const r={code:n,message:e};return t.data&&(r.data=t.data),r}const jt="https://registry.walletconnect.com";function Fo(){return jt+"/api/v2/wallets"}function Ho(){return jt+"/api/v2/dapps"}function Bt(t,e="mobile"){var n;return{name:t.name||"",shortName:t.metadata.shortName||"",color:t.metadata.colors.primary||"",logo:(n=t.image_url.sm)!==null&&n!==void 0?n:"",universalLink:t[e].universal||"",deepLink:t[e].native||""}}function zo(t,e="mobile"){return Object.values(t).filter(n=>!!n[e].universal||!!n[e].native).map(n=>Bt(n,e))}var Le={};(function(t){const e=or,n=ir,r=nr,o=rr,i=s=>s==null;function d(s){switch(s.arrayFormat){case"index":return a=>(u,c)=>{const h=u.length;return c===void 0||s.skipNull&&c===null||s.skipEmptyString&&c===""?u:c===null?[...u,[g(a,s),"[",h,"]"].join("")]:[...u,[g(a,s),"[",g(h,s),"]=",g(c,s)].join("")]};case"bracket":return a=>(u,c)=>c===void 0||s.skipNull&&c===null||s.skipEmptyString&&c===""?u:c===null?[...u,[g(a,s),"[]"].join("")]:[...u,[g(a,s),"[]=",g(c,s)].join("")];case"comma":case"separator":return a=>(u,c)=>c==null||c.length===0?u:u.length===0?[[g(a,s),"=",g(c,s)].join("")]:[[u,g(c,s)].join(s.arrayFormatSeparator)];default:return a=>(u,c)=>c===void 0||s.skipNull&&c===null||s.skipEmptyString&&c===""?u:c===null?[...u,g(a,s)]:[...u,[g(a,s),"=",g(c,s)].join("")]}}function f(s){let a;switch(s.arrayFormat){case"index":return(u,c,h)=>{if(a=/\[(\d*)\]$/.exec(u),u=u.replace(/\[\d*\]$/,""),!a){h[u]=c;return}h[u]===void 0&&(h[u]={}),h[u][a[1]]=c};case"bracket":return(u,c,h)=>{if(a=/(\[\])$/.exec(u),u=u.replace(/\[\]$/,""),!a){h[u]=c;return}if(h[u]===void 0){h[u]=[c];return}h[u]=[].concat(h[u],c)};case"comma":case"separator":return(u,c,h)=>{const m=typeof c=="string"&&c.includes(s.arrayFormatSeparator),_=typeof c=="string"&&!m&&w(c,s).includes(s.arrayFormatSeparator);c=_?w(c,s):c;const v=m||_?c.split(s.arrayFormatSeparator).map(T=>w(T,s)):c===null?c:w(c,s);h[u]=v};default:return(u,c,h)=>{if(h[u]===void 0){h[u]=c;return}h[u]=[].concat(h[u],c)}}}function p(s){if(typeof s!="string"||s.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function g(s,a){return a.encode?a.strict?e(s):encodeURIComponent(s):s}function w(s,a){return a.decode?n(s):s}function y(s){return Array.isArray(s)?s.sort():typeof s=="object"?y(Object.keys(s)).sort((a,u)=>Number(a)-Number(u)).map(a=>s[a]):s}function b(s){const a=s.indexOf("#");return a!==-1&&(s=s.slice(0,a)),s}function C(s){let a="";const u=s.indexOf("#");return u!==-1&&(a=s.slice(u)),a}function k(s){s=b(s);const a=s.indexOf("?");return a===-1?"":s.slice(a+1)}function I(s,a){return a.parseNumbers&&!Number.isNaN(Number(s))&&typeof s=="string"&&s.trim()!==""?s=Number(s):a.parseBooleans&&s!==null&&(s.toLowerCase()==="true"||s.toLowerCase()==="false")&&(s=s.toLowerCase()==="true"),s}function R(s,a){a=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},a),p(a.arrayFormatSeparator);const u=f(a),c=Object.create(null);if(typeof s!="string"||(s=s.trim().replace(/^[?#&]/,""),!s))return c;for(const h of s.split("&")){if(h==="")continue;let[m,_]=r(a.decode?h.replace(/\+/g," "):h,"=");_=_===void 0?null:["comma","separator"].includes(a.arrayFormat)?_:w(_,a),u(w(m,a),_,c)}for(const h of Object.keys(c)){const m=c[h];if(typeof m=="object"&&m!==null)for(const _ of Object.keys(m))m[_]=I(m[_],a);else c[h]=I(m,a)}return a.sort===!1?c:(a.sort===!0?Object.keys(c).sort():Object.keys(c).sort(a.sort)).reduce((h,m)=>{const _=c[m];return _&&typeof _=="object"&&!Array.isArray(_)?h[m]=y(_):h[m]=_,h},Object.create(null))}t.extract=k,t.parse=R,t.stringify=(s,a)=>{if(!s)return"";a=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},a),p(a.arrayFormatSeparator);const u=_=>a.skipNull&&i(s[_])||a.skipEmptyString&&s[_]==="",c=d(a),h={};for(const _ of Object.keys(s))u(_)||(h[_]=s[_]);const m=Object.keys(h);return a.sort!==!1&&m.sort(a.sort),m.map(_=>{const v=s[_];return v===void 0?"":v===null?g(_,a):Array.isArray(v)?v.reduce(c(_),[]).join("&"):g(_,a)+"="+g(v,a)}).filter(_=>_.length>0).join("&")},t.parseUrl=(s,a)=>{a=Object.assign({decode:!0},a);const[u,c]=r(s,"#");return Object.assign({url:u.split("?")[0]||"",query:R(k(s),a)},a&&a.parseFragmentIdentifier&&c?{fragmentIdentifier:w(c,a)}:{})},t.stringifyUrl=(s,a)=>{a=Object.assign({encode:!0,strict:!0},a);const u=b(s.url).split("?")[0]||"",c=t.extract(s.url),h=t.parse(c,{sort:!1}),m=Object.assign(h,s.query);let _=t.stringify(m,a);_&&(_=`?${_}`);let v=C(s.url);return s.fragmentIdentifier&&(v=`#${g(s.fragmentIdentifier,a)}`),`${u}${_}${v}`},t.pick=(s,a,u)=>{u=Object.assign({parseFragmentIdentifier:!0},u);const{url:c,query:h,fragmentIdentifier:m}=t.parseUrl(s,u);return t.stringifyUrl({url:c,query:o(h,a),fragmentIdentifier:m},u)},t.exclude=(s,a,u)=>{const c=Array.isArray(a)?h=>!a.includes(h):(h,m)=>!a(h,m);return t.pick(s,c,u)}})(Le);function Wt(t){const e=t.indexOf("?")!==-1?t.indexOf("?"):void 0;return typeof e<"u"?t.substr(e):""}function Ft(t,e){let n=qe(t);return n=Object.assign(Object.assign({},n),e),t=Ht(n),t}function qe(t){return Le.parse(t)}function Ht(t){return Le.stringify(t)}function zt(t){return typeof t.bridge<"u"}function Qt(t){const e=t.indexOf(":"),n=t.indexOf("?")!==-1?t.indexOf("?"):void 0,r=t.substring(0,e),o=t.substring(e+1,n);function i(y){const b="@",C=y.split(b);return{handshakeTopic:C[0],version:parseInt(C[1],10)}}const d=i(o),f=typeof n<"u"?t.substr(n):"";function p(y){const b=qe(y);return{key:b.key||"",bridge:b.bridge||""}}const g=p(f);return Object.assign(Object.assign({protocol:r},d),g)}function Qo(t){return t===""||typeof t=="string"&&t.trim()===""}function Jo(t){return!(t&&t.length)}function Vo(t){return ne(t)}function Go(t){return Re(t)}function Yo(t){return bt(t)}function Ko(t){return Gr(t)}function Zo(t){return Yr(t)}function Xo(t,e){return yt(t,e)}function ei(t){return typeof t.params=="object"}function Jt(t){return typeof t.method<"u"}function P(t){return typeof t.result<"u"}function z(t){return typeof t.error<"u"}function he(t){return typeof t.event<"u"}function Vt(t){return Cr.includes(t)||t.startsWith("wc_")}function Gt(t){return t.method.startsWith("wc_")?!0:!we.includes(t.method)}const ti=Object.freeze(Object.defineProperty({__proto__:null,addHexPrefix:Ao,appendToQueryString:Ft,concatArrayBuffers:lo,concatBuffers:_o,convertArrayBufferToBuffer:Z,convertArrayBufferToHex:Et,convertArrayBufferToNumber:co,convertArrayBufferToUtf8:ao,convertBufferToArrayBuffer:St,convertBufferToHex:ho,convertBufferToNumber:fo,convertBufferToUtf8:uo,convertHexToArrayBuffer:Ct,convertHexToBuffer:yo,convertHexToNumber:vo,convertHexToUtf8:bo,convertNumberToArrayBuffer:So,convertNumberToBuffer:Eo,convertNumberToHex:kt,convertNumberToUtf8:Co,convertUtf8ToArrayBuffer:po,convertUtf8ToBuffer:go,convertUtf8ToHex:mo,convertUtf8ToNumber:wo,detectEnv:oe,detectOS:ie,formatIOSMobile:$o,formatMobileRegistry:zo,formatMobileRegistryEntry:Bt,formatQueryString:Ht,formatRpcError:$t,getClientMeta:de,getCrypto:Mo,getCryptoOrThrow:No,getDappRegistryUrl:Ho,getDocument:Ro,getDocumentOrThrow:Io,getEncoding:Zo,getFromWindow:ko,getFromWindowOrThrow:xo,getInfuraRpcUrl:Ut,getLocal:Ne,getLocalStorage:re,getLocalStorageOrThrow:Lo,getLocation:It,getLocationOrThrow:Oo,getMobileLinkRegistry:Bo,getMobileRegistryEntry:Dt,getNavigator:xt,getNavigatorOrThrow:To,getQueryString:Wt,getRpcUrl:Pt,getType:Ko,getWalletRegistryUrl:Fo,isAndroid:Rt,isArrayBuffer:Yo,isBrowser:Mt,isBuffer:Vo,isEmptyArray:Jo,isEmptyString:Qo,isHexString:Xo,isIOS:Tt,isInternalEvent:he,isJsonRpcRequest:Jt,isJsonRpcResponseError:z,isJsonRpcResponseSuccess:P,isJsonRpcSubscription:ei,isMobile:Ot,isNode:Nt,isReservedEvent:Vt,isSilentPayload:Gt,isTypedArray:Go,isWalletConnectSession:zt,logDeprecationWarning:Do,parseQueryString:qe,parseWalletConnectUri:Qt,payloadId:At,promisify:Wo,removeHexLeadingZeros:Po,removeHexPrefix:Uo,removeLocal:Me,safeJsonParse:Lt,safeJsonStringify:qt,sanitizeHex:qo,saveMobileLinkInfo:jo,setLocal:Oe,uuid:Y},Symbol.toStringTag,{value:"Module"}));class ni{constructor(){this._eventEmitters=[],typeof window<"u"&&typeof window.addEventListener<"u"&&(window.addEventListener("online",()=>this.trigger("online")),window.addEventListener("offline",()=>this.trigger("offline")))}on(e,n){this._eventEmitters.push({event:e,callback:n})}trigger(e){let n=[];e&&(n=this._eventEmitters.filter(r=>r.event===e)),n.forEach(r=>{r.callback()})}}const ri=typeof global.WebSocket<"u"?global.WebSocket:require("ws");class oi{constructor(e){if(this.opts=e,this._queue=[],this._events=[],this._subscriptions=[],this._protocol=e.protocol,this._version=e.version,this._url="",this._netMonitor=null,this._socket=null,this._nextSocket=null,this._subscriptions=e.subscriptions||[],this._netMonitor=e.netMonitor||new ni,!e.url||typeof e.url!="string")throw new Error("Missing or invalid WebSocket url");this._url=e.url,this._netMonitor.on("online",()=>this._socketCreate())}set readyState(e){}get readyState(){return this._socket?this._socket.readyState:-1}set connecting(e){}get connecting(){return this.readyState===0}set connected(e){}get connected(){return this.readyState===1}set closing(e){}get closing(){return this.readyState===2}set closed(e){}get closed(){return this.readyState===3}open(){this._socketCreate()}close(){this._socketClose()}send(e,n,r){if(!n||typeof n!="string")throw new Error("Missing or invalid topic field");this._socketSend({topic:n,type:"pub",payload:e,silent:!!r})}subscribe(e){this._socketSend({topic:e,type:"sub",payload:"",silent:!0})}on(e,n){this._events.push({event:e,callback:n})}_socketCreate(){if(this._nextSocket)return;const e=ii(this._url,this._protocol,this._version);if(this._nextSocket=new ri(e),!this._nextSocket)throw new Error("Failed to create socket");this._nextSocket.onmessage=n=>this._socketReceive(n),this._nextSocket.onopen=()=>this._socketOpen(),this._nextSocket.onerror=n=>this._socketError(n),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(e){const n=JSON.stringify(e);this._socket&&this._socket.readyState===1?this._socket.send(n):(this._setToQueue(e),this._socketCreate())}async _socketReceive(e){let n;try{n=JSON.parse(e.data)}catch{return}if(this._socketSend({topic:n.topic,type:"ack",payload:"",silent:!0}),this._socket&&this._socket.readyState===1){const r=this._events.filter(o=>o.event==="message");r&&r.length&&r.forEach(o=>o.callback(n))}}_socketError(e){const n=this._events.filter(r=>r.event==="error");n&&n.length&&n.forEach(r=>r.callback(e))}_queueSubscriptions(){this._subscriptions.forEach(n=>this._queue.push({topic:n,type:"sub",payload:"",silent:!0})),this._subscriptions=this.opts.subscriptions||[]}_setToQueue(e){this._queue.push(e)}_pushQueue(){this._queue.forEach(n=>this._socketSend(n)),this._queue=[]}}function ii(t,e,n){var r,o;const d=(t.startsWith("https")?t.replace("https","wss"):t.startsWith("http")?t.replace("http","ws"):t).split("?"),f=Mt()?{protocol:e,version:n,env:"browser",host:((r=It())===null||r===void 0?void 0:r.host)||""}:{protocol:e,version:n,env:((o=oe())===null||o===void 0?void 0:o.name)||""},p=Ft(Wt(d[1]||""),f);return d[0]+"?"+p}class si{constructor(){this._eventEmitters=[]}subscribe(e){this._eventEmitters.push(e)}unsubscribe(e){this._eventEmitters=this._eventEmitters.filter(n=>n.event!==e)}trigger(e){let n=[],r;Jt(e)?r=e.method:P(e)||z(e)?r=`response:${e.id}`:he(e)?r=e.event:r="",r&&(n=this._eventEmitters.filter(o=>o.event===r)),(!n||!n.length)&&!Vt(r)&&!he(r)&&(n=this._eventEmitters.filter(o=>o.event==="call_request")),n.forEach(o=>{if(z(e)){const i=new Error(e.error.message);o.callback(i,null)}else o.callback(null,e)})}}class ai{constructor(e="walletconnect"){this.storageId=e}getSession(){let e=null;const n=Ne(this.storageId);return n&&zt(n)&&(e=n),e}setSession(e){return Oe(this.storageId,e),e}removeSession(){Me(this.storageId)}}const ci="walletconnect.org",li="abcdefghijklmnopqrstuvwxyz0123456789",Yt=li.split("").map(t=>`https://${t}.bridge.walletconnect.org`);function ui(t){let e=t.indexOf("//")>-1?t.split("/")[2]:t.split("/")[0];return e=e.split(":")[0],e=e.split("?")[0],e}function di(t){return ui(t).split(".").slice(-2).join(".")}function hi(){return Math.floor(Math.random()*Yt.length)}function fi(){return Yt[hi()]}function _i(t){return di(t)===ci}function pi(t){return _i(t)?fi():t}class gi{constructor(e){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 si,this._clientMeta=de()||e.connectorOpts.clientMeta||null,this._cryptoLib=e.cryptoLib,this._sessionStorage=e.sessionStorage||new ai(e.connectorOpts.storageId),this._qrcodeModal=e.connectorOpts.qrcodeModal,this._qrcodeModalOptions=e.connectorOpts.qrcodeModalOptions,this._signingMethods=[...we,...e.connectorOpts.signingMethods||[]],!e.connectorOpts.bridge&&!e.connectorOpts.uri&&!e.connectorOpts.session)throw new Error(vr);e.connectorOpts.bridge&&(this.bridge=pi(e.connectorOpts.bridge)),e.connectorOpts.uri&&(this.uri=e.connectorOpts.uri);const n=e.connectorOpts.session||this._getStorageSession();n&&(this.session=n),this.handshakeId&&this._subscribeToSessionResponse(this.handshakeId,"Session request rejected"),this._transport=e.transport||new oi({protocol:this.protocol,version:this.version,url:this.bridge,subscriptions:[this.clientId]}),this._subscribeToInternalEvents(),this._initTransport(),e.connectorOpts.uri&&this._subscribeToSessionRequest(),e.pushServerOpts&&this._registerPushServer(e.pushServerOpts)}set bridge(e){e&&(this._bridge=e)}get bridge(){return this._bridge}set key(e){if(!e)return;const n=Ct(e);this._key=n}get key(){return this._key?Et(this._key,!0):""}set clientId(e){e&&(this._clientId=e)}get clientId(){let e=this._clientId;return e||(e=this._clientId=Y()),this._clientId}set peerId(e){e&&(this._peerId=e)}get peerId(){return this._peerId}set clientMeta(e){}get clientMeta(){let e=this._clientMeta;return e||(e=this._clientMeta=de()),e}set peerMeta(e){this._peerMeta=e}get peerMeta(){return this._peerMeta}set handshakeTopic(e){e&&(this._handshakeTopic=e)}get handshakeTopic(){return this._handshakeTopic}set handshakeId(e){e&&(this._handshakeId=e)}get handshakeId(){return this._handshakeId}get uri(){return this._formatUri()}set uri(e){if(!e)return;const{handshakeTopic:n,bridge:r,key:o}=this._parseUri(e);this.handshakeTopic=n,this.bridge=r,this.key=o}set chainId(e){this._chainId=e}get chainId(){return this._chainId}set networkId(e){this._networkId=e}get networkId(){return this._networkId}set accounts(e){this._accounts=e}get accounts(){return this._accounts}set rpcUrl(e){this._rpcUrl=e}get rpcUrl(){return this._rpcUrl}set connected(e){}get connected(){return this._connected}set pending(e){}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(e){e&&(this._connected=e.connected,this.accounts=e.accounts,this.chainId=e.chainId,this.bridge=e.bridge,this.key=e.key,this.clientId=e.clientId,this.clientMeta=e.clientMeta,this.peerId=e.peerId,this.peerMeta=e.peerMeta,this.handshakeId=e.handshakeId,this.handshakeTopic=e.handshakeTopic)}on(e,n){const r={event:e,callback:n};this._eventManager.subscribe(r)}off(e){this._eventManager.unsubscribe(e)}async createInstantRequest(e){this._key=await this._generateKey();const n=this._formatRequest({method:"wc_instantRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,request:this._formatRequest(e)}]});this.handshakeId=n.id,this.handshakeTopic=Y(),this._eventManager.trigger({event:"display_uri",params:[this.uri]}),this.on("modal_closed",()=>{throw new Error(We)});const r=()=>{this.killSession()};try{const o=await this._sendCallRequest(n);return o&&r(),o}catch(o){throw r(),o}}async connect(e){if(!this._qrcodeModal)throw new Error(Sr);return this.connected?{chainId:this.chainId,accounts:this.accounts}:(await this.createSession(e),new Promise(async(n,r)=>{this.on("modal_closed",()=>r(new Error(We))),this.on("connect",(o,i)=>{if(o)return r(o);n(i.params[0])})}))}async createSession(e){if(this._connected)throw new Error(ae);if(this.pending)return;this._key=await this._generateKey();const n=this._formatRequest({method:"wc_sessionRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,chainId:e&&e.chainId?e.chainId:null}]});this.handshakeId=n.id,this.handshakeTopic=Y(),this._sendSessionRequest(n,"Session update rejected",{topic:this.handshakeTopic}),this._eventManager.trigger({event:"display_uri",params:[this.uri]})}approveSession(e){if(this._connected)throw new Error(ae);this.chainId=e.chainId,this.accounts=e.accounts,this.networkId=e.networkId||0,this.rpcUrl=e.rpcUrl||"";const n={approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl,peerId:this.clientId,peerMeta:this.clientMeta},r={id:this.handshakeId,jsonrpc:"2.0",result:n};this._sendResponse(r),this._connected=!0,this._setStorageSession(),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})}rejectSession(e){if(this._connected)throw new Error(ae);const n=e&&e.message?e.message:pr,r=this._formatResponse({id:this.handshakeId,error:{message:n}});this._sendResponse(r),this._connected=!1,this._eventManager.trigger({event:"disconnect",params:[{message:n}]}),this._removeStorageSession()}updateSession(e){if(!this._connected)throw new Error(q);this.chainId=e.chainId,this.accounts=e.accounts,this.networkId=e.networkId||0,this.rpcUrl=e.rpcUrl||"";const n={approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl},r=this._formatRequest({method:"wc_sessionUpdate",params:[n]});this._sendSessionRequest(r,"Session update rejected"),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]}),this._manageStorageSession()}async killSession(e){const n=e?e.message:"Session Disconnected",r={approved:!1,chainId:null,networkId:null,accounts:null},o=this._formatRequest({method:"wc_sessionUpdate",params:[r]});await this._sendRequest(o),this._handleSessionDisconnect(n)}async sendTransaction(e){if(!this._connected)throw new Error(q);const n=e,r=this._formatRequest({method:"eth_sendTransaction",params:[n]});return await this._sendCallRequest(r)}async signTransaction(e){if(!this._connected)throw new Error(q);const n=e,r=this._formatRequest({method:"eth_signTransaction",params:[n]});return await this._sendCallRequest(r)}async signMessage(e){if(!this._connected)throw new Error(q);const n=this._formatRequest({method:"eth_sign",params:e});return await this._sendCallRequest(n)}async signPersonalMessage(e){if(!this._connected)throw new Error(q);const n=this._formatRequest({method:"personal_sign",params:e});return await this._sendCallRequest(n)}async signTypedData(e){if(!this._connected)throw new Error(q);const n=this._formatRequest({method:"eth_signTypedData",params:e});return await this._sendCallRequest(n)}async updateChain(e){if(!this._connected)throw new Error("Session currently disconnected");const n=this._formatRequest({method:"wallet_updateChain",params:[e]});return await this._sendCallRequest(n)}unsafeSend(e,n){return this._sendRequest(e,n),this._eventManager.trigger({event:"call_request_sent",params:[{request:e,options:n}]}),new Promise((r,o)=>{this._subscribeToResponse(e.id,(i,d)=>{if(i){o(i);return}if(!d)throw new Error(gr);r(d)})})}async sendCustomRequest(e,n){if(!this._connected)throw new Error(q);switch(e.method){case"eth_accounts":return this.accounts;case"eth_chainId":return kt(this.chainId);case"eth_sendTransaction":case"eth_signTransaction":e.params;break;case"personal_sign":e.params;break}const r=this._formatRequest(e);return await this._sendCallRequest(r,n)}approveRequest(e){if(P(e)){const n=this._formatResponse(e);this._sendResponse(n)}else throw new Error(mr)}rejectRequest(e){if(z(e)){const n=this._formatResponse(e);this._sendResponse(n)}else throw new Error(wr)}transportClose(){this._transport.close()}async _sendRequest(e,n){const r=this._formatRequest(e),o=await this._encrypt(r),i=typeof(n==null?void 0:n.topic)<"u"?n.topic:this.peerId,d=JSON.stringify(o),f=typeof(n==null?void 0:n.forcePushNotification)<"u"?!n.forcePushNotification:Gt(r);this._transport.send(d,i,f)}async _sendResponse(e){const n=await this._encrypt(e),r=this.peerId,o=JSON.stringify(n),i=!0;this._transport.send(o,r,i)}async _sendSessionRequest(e,n,r){this._sendRequest(e,r),this._subscribeToSessionResponse(e.id,n)}_sendCallRequest(e,n){return this._sendRequest(e,n),this._eventManager.trigger({event:"call_request_sent",params:[{request:e,options:n}]}),this._subscribeToCallResponse(e.id)}_formatRequest(e){if(typeof e.method>"u")throw new Error(yr);return{id:typeof e.id>"u"?At():e.id,jsonrpc:"2.0",method:e.method,params:typeof e.params>"u"?[]:e.params}}_formatResponse(e){if(typeof e.id>"u")throw new Error(br);const n={id:e.id,jsonrpc:"2.0"};if(z(e)){const r=$t(e.error);return Object.assign(Object.assign(Object.assign({},n),e),{error:r})}else if(P(e))return Object.assign(Object.assign({},n),e);throw new Error(Be)}_handleSessionDisconnect(e){const n=e||"Session Disconnected";this._connected||(this._qrcodeModal&&this._qrcodeModal.close(),Me(ue)),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:n}]}),this._removeStorageSession(),this.transportClose()}_handleSessionResponse(e,n){n?n.approved?(this._connected?(n.chainId&&(this.chainId=n.chainId),n.accounts&&(this.accounts=n.accounts),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]})):(this._connected=!0,n.chainId&&(this.chainId=n.chainId),n.accounts&&(this.accounts=n.accounts),n.peerId&&!this.peerId&&(this.peerId=n.peerId),n.peerMeta&&!this.peerMeta&&(this.peerMeta=n.peerMeta),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})),this._manageStorageSession()):this._handleSessionDisconnect(e):this._handleSessionDisconnect(e)}async _handleIncomingMessages(e){if(![this.clientId,this.handshakeTopic].includes(e.topic))return;let r;try{r=JSON.parse(e.payload)}catch{return}const o=await this._decrypt(r);o&&this._eventManager.trigger(o)}_subscribeToSessionRequest(){this._transport.subscribe(this.handshakeTopic)}_subscribeToResponse(e,n){this.on(`response:${e}`,n)}_subscribeToSessionResponse(e,n){this._subscribeToResponse(e,(r,o)=>{if(r){this._handleSessionResponse(r.message);return}P(o)?this._handleSessionResponse(n,o.result):o.error&&o.error.message?this._handleSessionResponse(o.error.message):this._handleSessionResponse(n)})}_subscribeToCallResponse(e){return new Promise((n,r)=>{this._subscribeToResponse(e,(o,i)=>{if(o){r(o);return}P(i)?n(i.result):i.error&&i.error.message?r(i.error):r(new Error(Be))})})}_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",(e,n)=>{const{request:r}=n.params[0];if(Ot()&&this._signingMethods.includes(r.method)){const o=Ne(ue);o&&(window.location.href=o.href)}}),this.on("wc_sessionRequest",(e,n)=>{e&&this._eventManager.trigger({event:"error",params:[{code:"SESSION_REQUEST_ERROR",message:e.toString()}]}),this.handshakeId=n.id,this.peerId=n.params[0].peerId,this.peerMeta=n.params[0].peerMeta;const r=Object.assign(Object.assign({},n),{method:"session_request"});this._eventManager.trigger(r)}),this.on("wc_sessionUpdate",(e,n)=>{e&&this._handleSessionResponse(e.message),this._handleSessionResponse("Session disconnected",n.params[0])})}_initTransport(){this._transport.on("message",e=>this._handleIncomingMessages(e)),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(){const e=this.protocol,n=this.handshakeTopic,r=this.version,o=encodeURIComponent(this.bridge),i=this.key;return`${e}:${n}@${r}?bridge=${o}&key=${i}`}_parseUri(e){const n=Qt(e);if(n.protocol===this.protocol){if(!n.handshakeTopic)throw Error("Invalid or missing handshakeTopic parameter value");const r=n.handshakeTopic;if(!n.bridge)throw Error("Invalid or missing bridge url parameter value");const o=decodeURIComponent(n.bridge);if(!n.key)throw Error("Invalid or missing key parameter value");const i=n.key;return{handshakeTopic:r,bridge:o,key:i}}else throw new Error(Er)}async _generateKey(){return this._cryptoLib?await this._cryptoLib.generateKey():null}async _encrypt(e){const n=this._key;return this._cryptoLib&&n?await this._cryptoLib.encrypt(e,n):null}async _decrypt(e){const n=this._key;return this._cryptoLib&&n?await this._cryptoLib.decrypt(e,n):null}_getStorageSession(){let e=null;return this._sessionStorage&&(e=this._sessionStorage.getSession()),e}_setStorageSession(){this._sessionStorage&&this._sessionStorage.setSession(this.session)}_removeStorageSession(){this._sessionStorage&&this._sessionStorage.removeSession()}_manageStorageSession(){this._connected?this._setStorageSession():this._removeStorageSession()}_registerPushServer(e){if(!e.url||typeof e.url!="string")throw Error("Invalid or missing pushServerOpts.url parameter value");if(!e.type||typeof e.type!="string")throw Error("Invalid or missing pushServerOpts.type parameter value");if(!e.token||typeof e.token!="string")throw Error("Invalid or missing pushServerOpts.token parameter value");const n={bridge:this.bridge,topic:this.clientId,type:e.type,token:e.token,peerName:"",language:e.language||""};this.on("connect",async(r,o)=>{if(r)throw r;if(e.peerMeta){const i=o.params[0].peerMeta.name;n.peerName=i}try{if(!(await(await fetch(`${e.url}/new`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)})).json()).success)throw Error("Failed to register in Push Server")}catch{throw Error("Failed to register in Push Server")}})}}function mi(t){return Q.getBrowerCrypto().getRandomValues(new Uint8Array(t))}const Kt=256,Zt=Kt,wi=Kt,L="AES-CBC",yi=`SHA-${Zt}`,fe="HMAC",bi="encrypt",vi="decrypt",Ei="sign",Si="verify";function Ci(t){return t===L?{length:Zt,name:L}:{hash:{name:yi},name:fe}}function ki(t){return t===L?[bi,vi]:[Ei,Si]}async function Ae(t,e=L){return Q.getSubtleCrypto().importKey("raw",t,Ci(e),!0,ki(e))}async function xi(t,e,n){const r=Q.getSubtleCrypto(),o=await Ae(e,L),i=await r.encrypt({iv:t,name:L},o,n);return new Uint8Array(i)}async function Ii(t,e,n){const r=Q.getSubtleCrypto(),o=await Ae(e,L),i=await r.decrypt({iv:t,name:L},o,n);return new Uint8Array(i)}async function Ri(t,e){const n=Q.getSubtleCrypto(),r=await Ae(t,fe),o=await n.sign({length:wi,name:fe},r,e);return new Uint8Array(o)}function Ti(t,e,n){return xi(t,e,n)}function Oi(t,e,n){return Ii(t,e,n)}async function Xt(t,e){return await Ri(t,e)}async function en(t){const e=(t||256)/8,n=mi(e);return St(W(n))}async function tn(t,e){const n=M(t.data),r=M(t.iv),o=M(t.hmac),i=N(o,!1),d=vt(n,r),f=await Xt(e,d),p=N(f,!1);return B(i)===B(p)}async function Ni(t,e,n){const r=j(Z(e)),o=n||await en(128),i=j(Z(o)),d=N(i,!1),f=JSON.stringify(t),p=wt(f),g=await Ti(i,r,p),w=N(g,!1),y=vt(g,i),b=await Xt(r,y),C=N(b,!1);return{data:w,hmac:C,iv:d}}async function Mi(t,e){const n=j(Z(e));if(!n)throw new Error("Missing key: required for decryption");if(!await tn(t,n))return null;const o=M(t.data),i=M(t.iv),d=await Oi(i,n,o),f=gt(d);let p;try{p=JSON.parse(f)}catch{return null}return p}const Li=Object.freeze(Object.defineProperty({__proto__:null,decrypt:Mi,encrypt:Ni,generateKey:en,verifyHmac:tn},Symbol.toStringTag,{value:"Module"}));class qi extends gi{constructor(e,n){super({cryptoLib:Li,connectorOpts:e,pushServerOpts:n})}}const Ai=et(ti);var Ui=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,n=[],r=0;r"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var y=Fe[e.format]||Fe.default;window.clipboardData.setData(y,t)}else w.clipboardData.clearData(),w.clipboardData.setData(e.format,t);e.onCopy&&(w.preventDefault(),e.onCopy(w.clipboardData))}),document.body.appendChild(f),i.selectNodeContents(f),d.addRange(i);var g=document.execCommand("copy");if(!g)throw new Error("copy command was unsuccessful");p=!0}catch(w){n&&console.error("unable to copy using execCommand: ",w),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),p=!0}catch(y){n&&console.error("unable to copy using clipboardData: ",y),n&&console.error("falling back to prompt"),r=$i("message"in e?e.message:Di),window.prompt(r,t)}}finally{d&&(typeof d.removeRange=="function"?d.removeRange(i):d.removeAllRanges()),f&&document.body.removeChild(f),o()}return p}var Bi=ji;function nn(t,e){for(var n in e)t[n]=e[n];return t}function _e(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var r in e)if(r!=="__source"&&t[r]!==e[r])return!0;return!1}function X(t){this.props=t}function rn(t,e){function n(o){var i=this.props.ref,d=i==o.ref;return!d&&i&&(i.call?i(null):i.current=null),e?!e(this.props,o)||!d:_e(this.props,o)}function r(o){return this.shouldComponentUpdate=n,x(t,o)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(X.prototype=new A).isPureReactComponent=!0,X.prototype.shouldComponentUpdate=function(t,e){return _e(this.props,t)||_e(this.state,e)};var He=S.__b;S.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),He&&He(t)};var Wi=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function on(t){function e(n){var r=nn({},n);return delete r.ref,t(r,n.ref||null)}return e.$$typeof=Wi,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var ze=function(t,e){return t==null?null:O(O(t).map(e))},sn={map:ze,forEach:ze,count:function(t){return t?O(t).length:0},only:function(t){var e=O(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:O},Fi=S.__e;S.__e=function(t,e,n,r){if(t.then){for(var o,i=e;i=i.__;)if((o=i.__c)&&o.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),o.__c(t,e)}Fi(t,e,n,r)};var Qe=S.unmount;function an(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),t.__c.__H=null),(t=nn({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(r){return an(r,e,n)})),t}function cn(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(r){return cn(r,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function H(){this.__u=0,this.t=null,this.__b=null}function ln(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function un(t){var e,n,r;function o(i){if(e||(e=t()).then(function(d){n=d.default||d},function(d){r=d}),r)throw r;if(!n)throw e;return x(n,i)}return o.displayName="Lazy",o.__f=!0,o}function D(){this.u=null,this.o=null}S.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),Qe&&Qe(t)},(H.prototype=new A).__c=function(t,e){var n=e.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var o=ln(r.__v),i=!1,d=function(){i||(i=!0,n.__R=null,o?o(f):f())};n.__R=d;var f=function(){if(!--r.__u){if(r.state.__a){var p=r.state.__a;r.__v.__k[0]=cn(p,p.__c.__P,p.__c.__O)}var g;for(r.setState({__a:r.__b=null});g=r.t.pop();)g.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(d,d)},H.prototype.componentWillUnmount=function(){this.t=[]},H.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=an(this.__b,n,r.__O=r.__P)}this.__b=null}var o=e.__a&&x($,null,t.fallback);return o&&(o.__u&=-33),[x($,null,e.__a?null:t.children),o]};var Je=function(t,e,n){if(++n[1]===n[0]&&t.o.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.o.size))for(n=t.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),e.i.removeChild(r)}}),K(x(Hi,{context:e.context},t.__v),e.l)}function dn(t,e){var n=x(zi,{__v:t,i:e});return n.containerInfo=e,n}(D.prototype=new A).__a=function(t){var e=this,n=ln(e.__v),r=e.o.get(t);return r[0]++,function(o){var i=function(){e.props.revealOrder?(r.push(o),Je(e,t,r)):o()};n?n(i):i()}},D.prototype.render=function(t){this.u=null,this.o=new Map;var e=O(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.o.set(e[n],this.u=[1,0,this.u]);return t.children},D.prototype.componentDidUpdate=D.prototype.componentDidMount=function(){var t=this;this.o.forEach(function(e,n){Je(t,n,e)})};var hn=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Qi=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ji=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Vi=/[A-Z0-9]/g,Gi=typeof document<"u",Yi=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function fn(t,e,n){return e.__k==null&&(e.textContent=""),K(t,e),typeof n=="function"&&n(),t?t.__c:null}function _n(t,e,n){return hr(t,e),typeof n=="function"&&n(),t?t.__c:null}A.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(A.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var Ve=S.event;function Ki(){}function Zi(){return this.cancelBubble}function Xi(){return this.defaultPrevented}S.event=function(t){return Ve&&(t=Ve(t)),t.persist=Ki,t.isPropagationStopped=Zi,t.isDefaultPrevented=Xi,t.nativeEvent=t};var Ue,es={enumerable:!1,configurable:!0,get:function(){return this.class}},Ge=S.vnode;S.vnode=function(t){typeof t.type=="string"&&function(e){var n=e.props,r=e.type,o={};for(var i in n){var d=n[i];if(!(i==="value"&&"defaultValue"in n&&d==null||Gi&&i==="children"&&r==="noscript"||i==="class"||i==="className")){var f=i.toLowerCase();i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&d===!0?d="":f==="ondoubleclick"?i="ondblclick":f!=="onchange"||r!=="input"&&r!=="textarea"||Yi(n.type)?f==="onfocus"?i="onfocusin":f==="onblur"?i="onfocusout":Ji.test(i)?i=f:r.indexOf("-")===-1&&Qi.test(i)?i=i.replace(Vi,"-$&").toLowerCase():d===null&&(d=void 0):f=i="oninput",f==="oninput"&&o[i=f]&&(i="oninputCapture"),o[i]=d}}r=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=O(n.children).forEach(function(p){p.props.selected=o.value.indexOf(p.props.value)!=-1})),r=="select"&&o.defaultValue!=null&&(o.value=O(n.children).forEach(function(p){p.props.selected=o.multiple?o.defaultValue.indexOf(p.props.value)!=-1:o.defaultValue==p.props.value})),n.class&&!n.className?(o.class=n.class,Object.defineProperty(o,"className",es)):(n.className&&!n.class||n.class&&n.className)&&(o.class=o.className=n.className),e.props=o}(t),t.$$typeof=hn,Ge&&Ge(t)};var Ye=S.__r;S.__r=function(t){Ye&&Ye(t),Ue=t.__c};var Ke=S.diffed;S.diffed=function(t){Ke&&Ke(t);var e=t.props,n=t.__e;n!=null&&t.type==="textarea"&&"value"in e&&e.value!==n.value&&(n.value=e.value==null?"":e.value),Ue=null};var pn={ReactCurrentDispatcher:{current:{readContext:function(t){return Ue.__n[t.__c].props.value}}}},ts="17.0.2";function gn(t){return x.bind(null,t)}function V(t){return!!t&&t.$$typeof===hn}function mn(t){return V(t)&&t.type===$}function wn(t){return V(t)?fr.apply(null,arguments):t}function yn(t){return!!t.__k&&(K(null,t),!0)}function bn(t){return t&&(t.base||t.nodeType===1&&t)||null}var vn=function(t,e){return t(e)},En=function(t,e){return t(e)},Sn=$;function Pe(t){t()}function Cn(t){return t}function kn(){return[!1,Pe]}var xn=ee,In=V;function Rn(t,e){var n=e(),r=ge({h:{__:n,v:e}}),o=r[0].h,i=r[1];return ee(function(){o.__=n,o.v=e,ce(o)&&i({h:o})},[t,n,e]),me(function(){return ce(o)&&i({h:o}),t(function(){ce(o)&&i({h:o})})},[t]),n}function ce(t){var e,n,r=t.v,o=t.__;try{var i=r();return!((e=o)===(n=i)&&(e!==0||1/e==1/n)||e!=e&&n!=n)}catch{return!0}}var ns={useState:ge,useId:nt,useReducer:rt,useEffect:me,useLayoutEffect:ee,useInsertionEffect:xn,useTransition:kn,useDeferredValue:Cn,useSyncExternalStore:Rn,startTransition:Pe,useRef:ot,useImperativeHandle:it,useMemo:st,useCallback:at,useContext:ct,useDebugValue:lt,version:"17.0.2",Children:sn,render:fn,hydrate:_n,unmountComponentAtNode:yn,createPortal:dn,createElement:x,createContext:ut,createFactory:gn,cloneElement:wn,createRef:dt,Fragment:$,isValidElement:V,isElement:In,isFragment:mn,findDOMNode:bn,Component:A,PureComponent:X,memo:rn,forwardRef:on,flushSync:En,unstable_batchedUpdates:vn,StrictMode:Sn,Suspense:H,SuspenseList:D,lazy:un,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:pn};const rs=Object.freeze(Object.defineProperty({__proto__:null,Children:sn,Component:A,Fragment:$,PureComponent:X,StrictMode:Sn,Suspense:H,SuspenseList:D,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:pn,cloneElement:wn,createContext:ut,createElement:x,createFactory:gn,createPortal:dn,createRef:dt,default:ns,findDOMNode:bn,flushSync:En,forwardRef:on,hydrate:_n,isElement:In,isFragment:mn,isValidElement:V,lazy:un,memo:rn,render:fn,startTransition:Pe,unmountComponentAtNode:yn,unstable_batchedUpdates:vn,useCallback:at,useContext:ct,useDebugValue:lt,useDeferredValue:Cn,useEffect:me,useErrorBoundary:_r,useId:nt,useImperativeHandle:it,useInsertionEffect:xn,useLayoutEffect:ee,useMemo:st,useReducer:rt,useRef:ot,useState:ge,useSyncExternalStore:Rn,useTransition:kn,version:ts},Symbol.toStringTag,{value:"Module"})),os=et(rs);function Tn(t){return t&&typeof t=="object"&&"default"in t?t.default:t}var E=Ai,On=Tn(sr),is=Tn(Bi),l=os;function ss(t){On.toString(t,{type:"terminal"}).then(console.log)}var as=`:root { +import{N as pe,F as Wn,P as Fn,y as Hn,Q as zn,R as Qn,S as Jn,D as Vn,T as Gn,U as Yn,V as Kn,W as Zn,X as Xn,E as er,w as tr,s as nr,t as rr,u as or,v as ir,G as et,Y as sr,O as tt}from"./index-d83b38d5.js";import{a as ar,s as cr,m as lr,c as Q,I as ur,f as $e,J as je,H as dr}from"./http-9b812ea1.js";import{b as A,l as S,y as x,g as $,$ as O,q as K,B as hr,E as fr,a as ee,h as ge,p as me,V as nt,s as rt,_ as ot,A as it,F as st,T as at,c as ct,x as lt,d as ut,e as dt,P as _r}from"./hooks.module-835c4290.js";const ae="Session currently connected",q="Session currently disconnected",pr="Session Rejected",gr="Missing JSON RPC response",mr='JSON-RPC success response must include "result" field',wr='JSON-RPC error response must include "error" field',yr='JSON RPC request must have valid "method" value',br='JSON RPC request must have valid "id" value',vr="Missing one of the required parameters: bridge / uri / session",Be="JSON RPC response format is invalid",Er="URI format is invalid",Sr="QRCode Modal not provided",We="User close QRCode Modal",Cr=["session_request","session_update","exchange_key","connect","disconnect","display_uri","modal_closed","transport_open","transport_close","transport_error"],kr=["wallet_addEthereumChain","wallet_switchEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],we=["eth_sendTransaction","eth_signTransaction","eth_sign","eth_signTypedData","eth_signTypedData_v1","eth_signTypedData_v2","eth_signTypedData_v3","eth_signTypedData_v4","personal_sign",...kr],ue="WALLETCONNECT_DEEPLINK_CHOICE",xr={1:"mainnet",3:"ropsten",4:"rinkeby",5:"goerli",42:"kovan"};var ht=ye;ye.strict=ft;ye.loose=_t;var Ir=Object.prototype.toString,Rr={"[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 ye(t){return ft(t)||_t(t)}function ft(t){return t instanceof Int8Array||t instanceof Int16Array||t instanceof Int32Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Uint16Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array}function _t(t){return Rr[Ir.call(t)]}const Tr=pe(ht);var Or=ht.strict,Nr=function(e){if(Or(e)){var n=Buffer.from(e.buffer);return e.byteLength!==e.buffer.byteLength&&(n=n.slice(e.byteOffset,e.byteOffset+e.byteLength)),n}else return Buffer.from(e)};const Mr=pe(Nr),be="hex",ve="utf8",Lr="binary",qr="buffer",Ar="array",Ur="typed-array",Pr="array-buffer",te="0";function j(t){return new Uint8Array(t)}function Ee(t,e=!1){const n=t.toString(be);return e?J(n):n}function Se(t){return t.toString(ve)}function pt(t){return t.readUIntBE(0,t.length)}function W(t){return Mr(t)}function N(t,e=!1){return Ee(W(t),e)}function gt(t){return Se(W(t))}function mt(t){return pt(W(t))}function Ce(t){return Buffer.from(B(t),be)}function M(t){return j(Ce(t))}function Dr(t){return Se(Ce(t))}function $r(t){return mt(M(t))}function ke(t){return Buffer.from(t,ve)}function wt(t){return j(ke(t))}function jr(t,e=!1){return Ee(ke(t),e)}function Br(t){const e=parseInt(t,10);return io(oo(e),"Number can only safely store up to 53 bits"),e}function Wr(t){return Qr(xe(t))}function Fr(t){return Ie(xe(t))}function Hr(t,e){return Jr(xe(t),e)}function zr(t){return`${t}`}function xe(t){const e=(t>>>0).toString(2);return Te(e)}function Qr(t){return W(Ie(t))}function Ie(t){return new Uint8Array(Xr(t).map(e=>parseInt(e,2)))}function Jr(t,e){return N(Ie(t),e)}function Vr(t){return!(typeof t!="string"||!new RegExp(/^[01]+$/).test(t)||t.length%8!==0)}function yt(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}function ne(t){return Buffer.isBuffer(t)}function Re(t){return Tr.strict(t)&&!ne(t)}function bt(t){return!Re(t)&&!ne(t)&&typeof t.byteLength<"u"}function Gr(t){return ne(t)?qr:Re(t)?Ur:bt(t)?Pr:Array.isArray(t)?Ar:typeof t}function Yr(t){return Vr(t)?Lr:yt(t)?be:ve}function Kr(...t){return Buffer.concat(t)}function vt(...t){let e=[];return t.forEach(n=>e=e.concat(Array.from(n))),new Uint8Array([...e])}function Zr(t,e=8){const n=t%e;return n?(t-n)/e*e+e:t}function Xr(t,e=8){const n=Te(t).match(new RegExp(`.{${e}}`,"gi"));return Array.from(n||[])}function Te(t,e=8,n=te){return eo(t,Zr(t.length,e),n)}function eo(t,e,n=te){return so(t,e,!0,n)}function B(t){return t.replace(/^0x/,"")}function J(t){return t.startsWith("0x")?t:`0x${t}`}function to(t){return t=B(t),t=Te(t,2),t&&(t=J(t)),t}function no(t){const e=t.startsWith("0x");return t=B(t),t=t.startsWith(te)?t.substring(1):t,e?J(t):t}function ro(t){return typeof t>"u"}function oo(t){return!ro(t)}function io(t,e){if(!t)throw new Error(e)}function so(t,e,n,r=te){const o=e-t.length;let i=t;if(o>0){const d=r.repeat(o);i=n?d+t:t+d}return i}function Z(t){return W(new Uint8Array(t))}function ao(t){return gt(new Uint8Array(t))}function Et(t,e){return N(new Uint8Array(t),!e)}function co(t){return mt(new Uint8Array(t))}function lo(...t){return M(t.map(e=>N(new Uint8Array(e))).join("")).buffer}function St(t){return j(t).buffer}function uo(t){return Se(t)}function ho(t,e){return Ee(t,!e)}function fo(t){return pt(t)}function _o(...t){return Kr(...t)}function po(t){return wt(t).buffer}function go(t){return ke(t)}function mo(t,e){return jr(t,!e)}function wo(t){return Br(t)}function yo(t){return Ce(t)}function Ct(t){return M(t).buffer}function bo(t){return Dr(t)}function vo(t){return $r(t)}function Eo(t){return Wr(t)}function So(t){return Fr(t).buffer}function Co(t){return zr(t)}function kt(t,e){return Hr(Number(t),!e)}const ko=zn,xo=Qn,Io=Jn,Ro=Vn,To=Gn,xt=Hn,Oo=Yn,It=Wn,No=Kn,Mo=Zn,Lo=Xn,re=Fn;function oe(t){return er(t)}function ie(){const t=oe();return t&&t.os?t.os:void 0}function Rt(){const t=ie();return t?t.toLowerCase().includes("android"):!1}function Tt(){const t=ie();return t?t.toLowerCase().includes("ios")||t.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1:!1}function Ot(){return ie()?Rt()||Tt():!1}function Nt(){const t=oe();return t&&t.name?t.name.toLowerCase()==="node":!1}function Mt(){return!Nt()&&!!xt()}const Lt=ar,qt=cr;function Oe(t,e){const n=qt(e),r=re();r&&r.setItem(t,n)}function Ne(t){let e=null,n=null;const r=re();return r&&(n=r.getItem(t)),e=n&&Lt(n),e}function Me(t){const e=re();e&&e.removeItem(t)}function de(){return tr()}function qo(t){return to(t)}function Ao(t){return J(t)}function Uo(t){return B(t)}function Po(t){return no(J(t))}const At=lr;function Y(){return((e,n)=>{for(n=e="";e++<36;n+=e*51&52?(e^15?8^Math.random()*(e^20?16:4):4).toString(16):"-");return n})()}function Do(){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 Ut(t,e){let n;const r=xr[t];return r&&(n=`https://${r}.infura.io/v3/${e}`),n}function Pt(t,e){let n;const r=Ut(t,e.infuraId);return e.custom&&e.custom[t]?n=e.custom[t]:r&&(n=r),n}function $o(t,e){const n=encodeURIComponent(t);return e.universalLink?`${e.universalLink}/wc?uri=${n}`:e.deepLink?`${e.deepLink}${e.deepLink.endsWith(":")?"//":"/"}wc?uri=${n}`:""}function jo(t){const e=t.href.split("?")[0];Oe(ue,Object.assign(Object.assign({},t),{href:e}))}function Dt(t,e){return t.filter(n=>n.name.toLowerCase().includes(e.toLowerCase()))[0]}function Bo(t,e){let n=t;return e&&(n=e.map(r=>Dt(t,r)).filter(Boolean)),n}function Wo(t,e){return async(...r)=>new Promise((o,i)=>{const d=(f,p)=>{(f===null||typeof f>"u")&&i(f),o(p)};t.apply(e,[...r,d])})}function $t(t){const e=t.message||"Failed or Rejected Request";let n=-32e3;if(t&&!t.code)switch(e){case"Parse error":n=-32700;break;case"Invalid request":n=-32600;break;case"Method not found":n=-32601;break;case"Invalid params":n=-32602;break;case"Internal error":n=-32603;break;default:n=-32e3;break}const r={code:n,message:e};return t.data&&(r.data=t.data),r}const jt="https://registry.walletconnect.com";function Fo(){return jt+"/api/v2/wallets"}function Ho(){return jt+"/api/v2/dapps"}function Bt(t,e="mobile"){var n;return{name:t.name||"",shortName:t.metadata.shortName||"",color:t.metadata.colors.primary||"",logo:(n=t.image_url.sm)!==null&&n!==void 0?n:"",universalLink:t[e].universal||"",deepLink:t[e].native||""}}function zo(t,e="mobile"){return Object.values(t).filter(n=>!!n[e].universal||!!n[e].native).map(n=>Bt(n,e))}var Le={};(function(t){const e=or,n=ir,r=nr,o=rr,i=s=>s==null;function d(s){switch(s.arrayFormat){case"index":return a=>(u,c)=>{const h=u.length;return c===void 0||s.skipNull&&c===null||s.skipEmptyString&&c===""?u:c===null?[...u,[g(a,s),"[",h,"]"].join("")]:[...u,[g(a,s),"[",g(h,s),"]=",g(c,s)].join("")]};case"bracket":return a=>(u,c)=>c===void 0||s.skipNull&&c===null||s.skipEmptyString&&c===""?u:c===null?[...u,[g(a,s),"[]"].join("")]:[...u,[g(a,s),"[]=",g(c,s)].join("")];case"comma":case"separator":return a=>(u,c)=>c==null||c.length===0?u:u.length===0?[[g(a,s),"=",g(c,s)].join("")]:[[u,g(c,s)].join(s.arrayFormatSeparator)];default:return a=>(u,c)=>c===void 0||s.skipNull&&c===null||s.skipEmptyString&&c===""?u:c===null?[...u,g(a,s)]:[...u,[g(a,s),"=",g(c,s)].join("")]}}function f(s){let a;switch(s.arrayFormat){case"index":return(u,c,h)=>{if(a=/\[(\d*)\]$/.exec(u),u=u.replace(/\[\d*\]$/,""),!a){h[u]=c;return}h[u]===void 0&&(h[u]={}),h[u][a[1]]=c};case"bracket":return(u,c,h)=>{if(a=/(\[\])$/.exec(u),u=u.replace(/\[\]$/,""),!a){h[u]=c;return}if(h[u]===void 0){h[u]=[c];return}h[u]=[].concat(h[u],c)};case"comma":case"separator":return(u,c,h)=>{const m=typeof c=="string"&&c.includes(s.arrayFormatSeparator),_=typeof c=="string"&&!m&&w(c,s).includes(s.arrayFormatSeparator);c=_?w(c,s):c;const v=m||_?c.split(s.arrayFormatSeparator).map(T=>w(T,s)):c===null?c:w(c,s);h[u]=v};default:return(u,c,h)=>{if(h[u]===void 0){h[u]=c;return}h[u]=[].concat(h[u],c)}}}function p(s){if(typeof s!="string"||s.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function g(s,a){return a.encode?a.strict?e(s):encodeURIComponent(s):s}function w(s,a){return a.decode?n(s):s}function y(s){return Array.isArray(s)?s.sort():typeof s=="object"?y(Object.keys(s)).sort((a,u)=>Number(a)-Number(u)).map(a=>s[a]):s}function b(s){const a=s.indexOf("#");return a!==-1&&(s=s.slice(0,a)),s}function C(s){let a="";const u=s.indexOf("#");return u!==-1&&(a=s.slice(u)),a}function k(s){s=b(s);const a=s.indexOf("?");return a===-1?"":s.slice(a+1)}function I(s,a){return a.parseNumbers&&!Number.isNaN(Number(s))&&typeof s=="string"&&s.trim()!==""?s=Number(s):a.parseBooleans&&s!==null&&(s.toLowerCase()==="true"||s.toLowerCase()==="false")&&(s=s.toLowerCase()==="true"),s}function R(s,a){a=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},a),p(a.arrayFormatSeparator);const u=f(a),c=Object.create(null);if(typeof s!="string"||(s=s.trim().replace(/^[?#&]/,""),!s))return c;for(const h of s.split("&")){if(h==="")continue;let[m,_]=r(a.decode?h.replace(/\+/g," "):h,"=");_=_===void 0?null:["comma","separator"].includes(a.arrayFormat)?_:w(_,a),u(w(m,a),_,c)}for(const h of Object.keys(c)){const m=c[h];if(typeof m=="object"&&m!==null)for(const _ of Object.keys(m))m[_]=I(m[_],a);else c[h]=I(m,a)}return a.sort===!1?c:(a.sort===!0?Object.keys(c).sort():Object.keys(c).sort(a.sort)).reduce((h,m)=>{const _=c[m];return _&&typeof _=="object"&&!Array.isArray(_)?h[m]=y(_):h[m]=_,h},Object.create(null))}t.extract=k,t.parse=R,t.stringify=(s,a)=>{if(!s)return"";a=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},a),p(a.arrayFormatSeparator);const u=_=>a.skipNull&&i(s[_])||a.skipEmptyString&&s[_]==="",c=d(a),h={};for(const _ of Object.keys(s))u(_)||(h[_]=s[_]);const m=Object.keys(h);return a.sort!==!1&&m.sort(a.sort),m.map(_=>{const v=s[_];return v===void 0?"":v===null?g(_,a):Array.isArray(v)?v.reduce(c(_),[]).join("&"):g(_,a)+"="+g(v,a)}).filter(_=>_.length>0).join("&")},t.parseUrl=(s,a)=>{a=Object.assign({decode:!0},a);const[u,c]=r(s,"#");return Object.assign({url:u.split("?")[0]||"",query:R(k(s),a)},a&&a.parseFragmentIdentifier&&c?{fragmentIdentifier:w(c,a)}:{})},t.stringifyUrl=(s,a)=>{a=Object.assign({encode:!0,strict:!0},a);const u=b(s.url).split("?")[0]||"",c=t.extract(s.url),h=t.parse(c,{sort:!1}),m=Object.assign(h,s.query);let _=t.stringify(m,a);_&&(_=`?${_}`);let v=C(s.url);return s.fragmentIdentifier&&(v=`#${g(s.fragmentIdentifier,a)}`),`${u}${_}${v}`},t.pick=(s,a,u)=>{u=Object.assign({parseFragmentIdentifier:!0},u);const{url:c,query:h,fragmentIdentifier:m}=t.parseUrl(s,u);return t.stringifyUrl({url:c,query:o(h,a),fragmentIdentifier:m},u)},t.exclude=(s,a,u)=>{const c=Array.isArray(a)?h=>!a.includes(h):(h,m)=>!a(h,m);return t.pick(s,c,u)}})(Le);function Wt(t){const e=t.indexOf("?")!==-1?t.indexOf("?"):void 0;return typeof e<"u"?t.substr(e):""}function Ft(t,e){let n=qe(t);return n=Object.assign(Object.assign({},n),e),t=Ht(n),t}function qe(t){return Le.parse(t)}function Ht(t){return Le.stringify(t)}function zt(t){return typeof t.bridge<"u"}function Qt(t){const e=t.indexOf(":"),n=t.indexOf("?")!==-1?t.indexOf("?"):void 0,r=t.substring(0,e),o=t.substring(e+1,n);function i(y){const b="@",C=y.split(b);return{handshakeTopic:C[0],version:parseInt(C[1],10)}}const d=i(o),f=typeof n<"u"?t.substr(n):"";function p(y){const b=qe(y);return{key:b.key||"",bridge:b.bridge||""}}const g=p(f);return Object.assign(Object.assign({protocol:r},d),g)}function Qo(t){return t===""||typeof t=="string"&&t.trim()===""}function Jo(t){return!(t&&t.length)}function Vo(t){return ne(t)}function Go(t){return Re(t)}function Yo(t){return bt(t)}function Ko(t){return Gr(t)}function Zo(t){return Yr(t)}function Xo(t,e){return yt(t,e)}function ei(t){return typeof t.params=="object"}function Jt(t){return typeof t.method<"u"}function P(t){return typeof t.result<"u"}function z(t){return typeof t.error<"u"}function he(t){return typeof t.event<"u"}function Vt(t){return Cr.includes(t)||t.startsWith("wc_")}function Gt(t){return t.method.startsWith("wc_")?!0:!we.includes(t.method)}const ti=Object.freeze(Object.defineProperty({__proto__:null,addHexPrefix:Ao,appendToQueryString:Ft,concatArrayBuffers:lo,concatBuffers:_o,convertArrayBufferToBuffer:Z,convertArrayBufferToHex:Et,convertArrayBufferToNumber:co,convertArrayBufferToUtf8:ao,convertBufferToArrayBuffer:St,convertBufferToHex:ho,convertBufferToNumber:fo,convertBufferToUtf8:uo,convertHexToArrayBuffer:Ct,convertHexToBuffer:yo,convertHexToNumber:vo,convertHexToUtf8:bo,convertNumberToArrayBuffer:So,convertNumberToBuffer:Eo,convertNumberToHex:kt,convertNumberToUtf8:Co,convertUtf8ToArrayBuffer:po,convertUtf8ToBuffer:go,convertUtf8ToHex:mo,convertUtf8ToNumber:wo,detectEnv:oe,detectOS:ie,formatIOSMobile:$o,formatMobileRegistry:zo,formatMobileRegistryEntry:Bt,formatQueryString:Ht,formatRpcError:$t,getClientMeta:de,getCrypto:Mo,getCryptoOrThrow:No,getDappRegistryUrl:Ho,getDocument:Ro,getDocumentOrThrow:Io,getEncoding:Zo,getFromWindow:ko,getFromWindowOrThrow:xo,getInfuraRpcUrl:Ut,getLocal:Ne,getLocalStorage:re,getLocalStorageOrThrow:Lo,getLocation:It,getLocationOrThrow:Oo,getMobileLinkRegistry:Bo,getMobileRegistryEntry:Dt,getNavigator:xt,getNavigatorOrThrow:To,getQueryString:Wt,getRpcUrl:Pt,getType:Ko,getWalletRegistryUrl:Fo,isAndroid:Rt,isArrayBuffer:Yo,isBrowser:Mt,isBuffer:Vo,isEmptyArray:Jo,isEmptyString:Qo,isHexString:Xo,isIOS:Tt,isInternalEvent:he,isJsonRpcRequest:Jt,isJsonRpcResponseError:z,isJsonRpcResponseSuccess:P,isJsonRpcSubscription:ei,isMobile:Ot,isNode:Nt,isReservedEvent:Vt,isSilentPayload:Gt,isTypedArray:Go,isWalletConnectSession:zt,logDeprecationWarning:Do,parseQueryString:qe,parseWalletConnectUri:Qt,payloadId:At,promisify:Wo,removeHexLeadingZeros:Po,removeHexPrefix:Uo,removeLocal:Me,safeJsonParse:Lt,safeJsonStringify:qt,sanitizeHex:qo,saveMobileLinkInfo:jo,setLocal:Oe,uuid:Y},Symbol.toStringTag,{value:"Module"}));class ni{constructor(){this._eventEmitters=[],typeof window<"u"&&typeof window.addEventListener<"u"&&(window.addEventListener("online",()=>this.trigger("online")),window.addEventListener("offline",()=>this.trigger("offline")))}on(e,n){this._eventEmitters.push({event:e,callback:n})}trigger(e){let n=[];e&&(n=this._eventEmitters.filter(r=>r.event===e)),n.forEach(r=>{r.callback()})}}const ri=typeof global.WebSocket<"u"?global.WebSocket:require("ws");class oi{constructor(e){if(this.opts=e,this._queue=[],this._events=[],this._subscriptions=[],this._protocol=e.protocol,this._version=e.version,this._url="",this._netMonitor=null,this._socket=null,this._nextSocket=null,this._subscriptions=e.subscriptions||[],this._netMonitor=e.netMonitor||new ni,!e.url||typeof e.url!="string")throw new Error("Missing or invalid WebSocket url");this._url=e.url,this._netMonitor.on("online",()=>this._socketCreate())}set readyState(e){}get readyState(){return this._socket?this._socket.readyState:-1}set connecting(e){}get connecting(){return this.readyState===0}set connected(e){}get connected(){return this.readyState===1}set closing(e){}get closing(){return this.readyState===2}set closed(e){}get closed(){return this.readyState===3}open(){this._socketCreate()}close(){this._socketClose()}send(e,n,r){if(!n||typeof n!="string")throw new Error("Missing or invalid topic field");this._socketSend({topic:n,type:"pub",payload:e,silent:!!r})}subscribe(e){this._socketSend({topic:e,type:"sub",payload:"",silent:!0})}on(e,n){this._events.push({event:e,callback:n})}_socketCreate(){if(this._nextSocket)return;const e=ii(this._url,this._protocol,this._version);if(this._nextSocket=new ri(e),!this._nextSocket)throw new Error("Failed to create socket");this._nextSocket.onmessage=n=>this._socketReceive(n),this._nextSocket.onopen=()=>this._socketOpen(),this._nextSocket.onerror=n=>this._socketError(n),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(e){const n=JSON.stringify(e);this._socket&&this._socket.readyState===1?this._socket.send(n):(this._setToQueue(e),this._socketCreate())}async _socketReceive(e){let n;try{n=JSON.parse(e.data)}catch{return}if(this._socketSend({topic:n.topic,type:"ack",payload:"",silent:!0}),this._socket&&this._socket.readyState===1){const r=this._events.filter(o=>o.event==="message");r&&r.length&&r.forEach(o=>o.callback(n))}}_socketError(e){const n=this._events.filter(r=>r.event==="error");n&&n.length&&n.forEach(r=>r.callback(e))}_queueSubscriptions(){this._subscriptions.forEach(n=>this._queue.push({topic:n,type:"sub",payload:"",silent:!0})),this._subscriptions=this.opts.subscriptions||[]}_setToQueue(e){this._queue.push(e)}_pushQueue(){this._queue.forEach(n=>this._socketSend(n)),this._queue=[]}}function ii(t,e,n){var r,o;const d=(t.startsWith("https")?t.replace("https","wss"):t.startsWith("http")?t.replace("http","ws"):t).split("?"),f=Mt()?{protocol:e,version:n,env:"browser",host:((r=It())===null||r===void 0?void 0:r.host)||""}:{protocol:e,version:n,env:((o=oe())===null||o===void 0?void 0:o.name)||""},p=Ft(Wt(d[1]||""),f);return d[0]+"?"+p}class si{constructor(){this._eventEmitters=[]}subscribe(e){this._eventEmitters.push(e)}unsubscribe(e){this._eventEmitters=this._eventEmitters.filter(n=>n.event!==e)}trigger(e){let n=[],r;Jt(e)?r=e.method:P(e)||z(e)?r=`response:${e.id}`:he(e)?r=e.event:r="",r&&(n=this._eventEmitters.filter(o=>o.event===r)),(!n||!n.length)&&!Vt(r)&&!he(r)&&(n=this._eventEmitters.filter(o=>o.event==="call_request")),n.forEach(o=>{if(z(e)){const i=new Error(e.error.message);o.callback(i,null)}else o.callback(null,e)})}}class ai{constructor(e="walletconnect"){this.storageId=e}getSession(){let e=null;const n=Ne(this.storageId);return n&&zt(n)&&(e=n),e}setSession(e){return Oe(this.storageId,e),e}removeSession(){Me(this.storageId)}}const ci="walletconnect.org",li="abcdefghijklmnopqrstuvwxyz0123456789",Yt=li.split("").map(t=>`https://${t}.bridge.walletconnect.org`);function ui(t){let e=t.indexOf("//")>-1?t.split("/")[2]:t.split("/")[0];return e=e.split(":")[0],e=e.split("?")[0],e}function di(t){return ui(t).split(".").slice(-2).join(".")}function hi(){return Math.floor(Math.random()*Yt.length)}function fi(){return Yt[hi()]}function _i(t){return di(t)===ci}function pi(t){return _i(t)?fi():t}class gi{constructor(e){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 si,this._clientMeta=de()||e.connectorOpts.clientMeta||null,this._cryptoLib=e.cryptoLib,this._sessionStorage=e.sessionStorage||new ai(e.connectorOpts.storageId),this._qrcodeModal=e.connectorOpts.qrcodeModal,this._qrcodeModalOptions=e.connectorOpts.qrcodeModalOptions,this._signingMethods=[...we,...e.connectorOpts.signingMethods||[]],!e.connectorOpts.bridge&&!e.connectorOpts.uri&&!e.connectorOpts.session)throw new Error(vr);e.connectorOpts.bridge&&(this.bridge=pi(e.connectorOpts.bridge)),e.connectorOpts.uri&&(this.uri=e.connectorOpts.uri);const n=e.connectorOpts.session||this._getStorageSession();n&&(this.session=n),this.handshakeId&&this._subscribeToSessionResponse(this.handshakeId,"Session request rejected"),this._transport=e.transport||new oi({protocol:this.protocol,version:this.version,url:this.bridge,subscriptions:[this.clientId]}),this._subscribeToInternalEvents(),this._initTransport(),e.connectorOpts.uri&&this._subscribeToSessionRequest(),e.pushServerOpts&&this._registerPushServer(e.pushServerOpts)}set bridge(e){e&&(this._bridge=e)}get bridge(){return this._bridge}set key(e){if(!e)return;const n=Ct(e);this._key=n}get key(){return this._key?Et(this._key,!0):""}set clientId(e){e&&(this._clientId=e)}get clientId(){let e=this._clientId;return e||(e=this._clientId=Y()),this._clientId}set peerId(e){e&&(this._peerId=e)}get peerId(){return this._peerId}set clientMeta(e){}get clientMeta(){let e=this._clientMeta;return e||(e=this._clientMeta=de()),e}set peerMeta(e){this._peerMeta=e}get peerMeta(){return this._peerMeta}set handshakeTopic(e){e&&(this._handshakeTopic=e)}get handshakeTopic(){return this._handshakeTopic}set handshakeId(e){e&&(this._handshakeId=e)}get handshakeId(){return this._handshakeId}get uri(){return this._formatUri()}set uri(e){if(!e)return;const{handshakeTopic:n,bridge:r,key:o}=this._parseUri(e);this.handshakeTopic=n,this.bridge=r,this.key=o}set chainId(e){this._chainId=e}get chainId(){return this._chainId}set networkId(e){this._networkId=e}get networkId(){return this._networkId}set accounts(e){this._accounts=e}get accounts(){return this._accounts}set rpcUrl(e){this._rpcUrl=e}get rpcUrl(){return this._rpcUrl}set connected(e){}get connected(){return this._connected}set pending(e){}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(e){e&&(this._connected=e.connected,this.accounts=e.accounts,this.chainId=e.chainId,this.bridge=e.bridge,this.key=e.key,this.clientId=e.clientId,this.clientMeta=e.clientMeta,this.peerId=e.peerId,this.peerMeta=e.peerMeta,this.handshakeId=e.handshakeId,this.handshakeTopic=e.handshakeTopic)}on(e,n){const r={event:e,callback:n};this._eventManager.subscribe(r)}off(e){this._eventManager.unsubscribe(e)}async createInstantRequest(e){this._key=await this._generateKey();const n=this._formatRequest({method:"wc_instantRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,request:this._formatRequest(e)}]});this.handshakeId=n.id,this.handshakeTopic=Y(),this._eventManager.trigger({event:"display_uri",params:[this.uri]}),this.on("modal_closed",()=>{throw new Error(We)});const r=()=>{this.killSession()};try{const o=await this._sendCallRequest(n);return o&&r(),o}catch(o){throw r(),o}}async connect(e){if(!this._qrcodeModal)throw new Error(Sr);return this.connected?{chainId:this.chainId,accounts:this.accounts}:(await this.createSession(e),new Promise(async(n,r)=>{this.on("modal_closed",()=>r(new Error(We))),this.on("connect",(o,i)=>{if(o)return r(o);n(i.params[0])})}))}async createSession(e){if(this._connected)throw new Error(ae);if(this.pending)return;this._key=await this._generateKey();const n=this._formatRequest({method:"wc_sessionRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,chainId:e&&e.chainId?e.chainId:null}]});this.handshakeId=n.id,this.handshakeTopic=Y(),this._sendSessionRequest(n,"Session update rejected",{topic:this.handshakeTopic}),this._eventManager.trigger({event:"display_uri",params:[this.uri]})}approveSession(e){if(this._connected)throw new Error(ae);this.chainId=e.chainId,this.accounts=e.accounts,this.networkId=e.networkId||0,this.rpcUrl=e.rpcUrl||"";const n={approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl,peerId:this.clientId,peerMeta:this.clientMeta},r={id:this.handshakeId,jsonrpc:"2.0",result:n};this._sendResponse(r),this._connected=!0,this._setStorageSession(),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})}rejectSession(e){if(this._connected)throw new Error(ae);const n=e&&e.message?e.message:pr,r=this._formatResponse({id:this.handshakeId,error:{message:n}});this._sendResponse(r),this._connected=!1,this._eventManager.trigger({event:"disconnect",params:[{message:n}]}),this._removeStorageSession()}updateSession(e){if(!this._connected)throw new Error(q);this.chainId=e.chainId,this.accounts=e.accounts,this.networkId=e.networkId||0,this.rpcUrl=e.rpcUrl||"";const n={approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl},r=this._formatRequest({method:"wc_sessionUpdate",params:[n]});this._sendSessionRequest(r,"Session update rejected"),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]}),this._manageStorageSession()}async killSession(e){const n=e?e.message:"Session Disconnected",r={approved:!1,chainId:null,networkId:null,accounts:null},o=this._formatRequest({method:"wc_sessionUpdate",params:[r]});await this._sendRequest(o),this._handleSessionDisconnect(n)}async sendTransaction(e){if(!this._connected)throw new Error(q);const n=e,r=this._formatRequest({method:"eth_sendTransaction",params:[n]});return await this._sendCallRequest(r)}async signTransaction(e){if(!this._connected)throw new Error(q);const n=e,r=this._formatRequest({method:"eth_signTransaction",params:[n]});return await this._sendCallRequest(r)}async signMessage(e){if(!this._connected)throw new Error(q);const n=this._formatRequest({method:"eth_sign",params:e});return await this._sendCallRequest(n)}async signPersonalMessage(e){if(!this._connected)throw new Error(q);const n=this._formatRequest({method:"personal_sign",params:e});return await this._sendCallRequest(n)}async signTypedData(e){if(!this._connected)throw new Error(q);const n=this._formatRequest({method:"eth_signTypedData",params:e});return await this._sendCallRequest(n)}async updateChain(e){if(!this._connected)throw new Error("Session currently disconnected");const n=this._formatRequest({method:"wallet_updateChain",params:[e]});return await this._sendCallRequest(n)}unsafeSend(e,n){return this._sendRequest(e,n),this._eventManager.trigger({event:"call_request_sent",params:[{request:e,options:n}]}),new Promise((r,o)=>{this._subscribeToResponse(e.id,(i,d)=>{if(i){o(i);return}if(!d)throw new Error(gr);r(d)})})}async sendCustomRequest(e,n){if(!this._connected)throw new Error(q);switch(e.method){case"eth_accounts":return this.accounts;case"eth_chainId":return kt(this.chainId);case"eth_sendTransaction":case"eth_signTransaction":e.params;break;case"personal_sign":e.params;break}const r=this._formatRequest(e);return await this._sendCallRequest(r,n)}approveRequest(e){if(P(e)){const n=this._formatResponse(e);this._sendResponse(n)}else throw new Error(mr)}rejectRequest(e){if(z(e)){const n=this._formatResponse(e);this._sendResponse(n)}else throw new Error(wr)}transportClose(){this._transport.close()}async _sendRequest(e,n){const r=this._formatRequest(e),o=await this._encrypt(r),i=typeof(n==null?void 0:n.topic)<"u"?n.topic:this.peerId,d=JSON.stringify(o),f=typeof(n==null?void 0:n.forcePushNotification)<"u"?!n.forcePushNotification:Gt(r);this._transport.send(d,i,f)}async _sendResponse(e){const n=await this._encrypt(e),r=this.peerId,o=JSON.stringify(n),i=!0;this._transport.send(o,r,i)}async _sendSessionRequest(e,n,r){this._sendRequest(e,r),this._subscribeToSessionResponse(e.id,n)}_sendCallRequest(e,n){return this._sendRequest(e,n),this._eventManager.trigger({event:"call_request_sent",params:[{request:e,options:n}]}),this._subscribeToCallResponse(e.id)}_formatRequest(e){if(typeof e.method>"u")throw new Error(yr);return{id:typeof e.id>"u"?At():e.id,jsonrpc:"2.0",method:e.method,params:typeof e.params>"u"?[]:e.params}}_formatResponse(e){if(typeof e.id>"u")throw new Error(br);const n={id:e.id,jsonrpc:"2.0"};if(z(e)){const r=$t(e.error);return Object.assign(Object.assign(Object.assign({},n),e),{error:r})}else if(P(e))return Object.assign(Object.assign({},n),e);throw new Error(Be)}_handleSessionDisconnect(e){const n=e||"Session Disconnected";this._connected||(this._qrcodeModal&&this._qrcodeModal.close(),Me(ue)),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:n}]}),this._removeStorageSession(),this.transportClose()}_handleSessionResponse(e,n){n?n.approved?(this._connected?(n.chainId&&(this.chainId=n.chainId),n.accounts&&(this.accounts=n.accounts),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]})):(this._connected=!0,n.chainId&&(this.chainId=n.chainId),n.accounts&&(this.accounts=n.accounts),n.peerId&&!this.peerId&&(this.peerId=n.peerId),n.peerMeta&&!this.peerMeta&&(this.peerMeta=n.peerMeta),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})),this._manageStorageSession()):this._handleSessionDisconnect(e):this._handleSessionDisconnect(e)}async _handleIncomingMessages(e){if(![this.clientId,this.handshakeTopic].includes(e.topic))return;let r;try{r=JSON.parse(e.payload)}catch{return}const o=await this._decrypt(r);o&&this._eventManager.trigger(o)}_subscribeToSessionRequest(){this._transport.subscribe(this.handshakeTopic)}_subscribeToResponse(e,n){this.on(`response:${e}`,n)}_subscribeToSessionResponse(e,n){this._subscribeToResponse(e,(r,o)=>{if(r){this._handleSessionResponse(r.message);return}P(o)?this._handleSessionResponse(n,o.result):o.error&&o.error.message?this._handleSessionResponse(o.error.message):this._handleSessionResponse(n)})}_subscribeToCallResponse(e){return new Promise((n,r)=>{this._subscribeToResponse(e,(o,i)=>{if(o){r(o);return}P(i)?n(i.result):i.error&&i.error.message?r(i.error):r(new Error(Be))})})}_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",(e,n)=>{const{request:r}=n.params[0];if(Ot()&&this._signingMethods.includes(r.method)){const o=Ne(ue);o&&(window.location.href=o.href)}}),this.on("wc_sessionRequest",(e,n)=>{e&&this._eventManager.trigger({event:"error",params:[{code:"SESSION_REQUEST_ERROR",message:e.toString()}]}),this.handshakeId=n.id,this.peerId=n.params[0].peerId,this.peerMeta=n.params[0].peerMeta;const r=Object.assign(Object.assign({},n),{method:"session_request"});this._eventManager.trigger(r)}),this.on("wc_sessionUpdate",(e,n)=>{e&&this._handleSessionResponse(e.message),this._handleSessionResponse("Session disconnected",n.params[0])})}_initTransport(){this._transport.on("message",e=>this._handleIncomingMessages(e)),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(){const e=this.protocol,n=this.handshakeTopic,r=this.version,o=encodeURIComponent(this.bridge),i=this.key;return`${e}:${n}@${r}?bridge=${o}&key=${i}`}_parseUri(e){const n=Qt(e);if(n.protocol===this.protocol){if(!n.handshakeTopic)throw Error("Invalid or missing handshakeTopic parameter value");const r=n.handshakeTopic;if(!n.bridge)throw Error("Invalid or missing bridge url parameter value");const o=decodeURIComponent(n.bridge);if(!n.key)throw Error("Invalid or missing key parameter value");const i=n.key;return{handshakeTopic:r,bridge:o,key:i}}else throw new Error(Er)}async _generateKey(){return this._cryptoLib?await this._cryptoLib.generateKey():null}async _encrypt(e){const n=this._key;return this._cryptoLib&&n?await this._cryptoLib.encrypt(e,n):null}async _decrypt(e){const n=this._key;return this._cryptoLib&&n?await this._cryptoLib.decrypt(e,n):null}_getStorageSession(){let e=null;return this._sessionStorage&&(e=this._sessionStorage.getSession()),e}_setStorageSession(){this._sessionStorage&&this._sessionStorage.setSession(this.session)}_removeStorageSession(){this._sessionStorage&&this._sessionStorage.removeSession()}_manageStorageSession(){this._connected?this._setStorageSession():this._removeStorageSession()}_registerPushServer(e){if(!e.url||typeof e.url!="string")throw Error("Invalid or missing pushServerOpts.url parameter value");if(!e.type||typeof e.type!="string")throw Error("Invalid or missing pushServerOpts.type parameter value");if(!e.token||typeof e.token!="string")throw Error("Invalid or missing pushServerOpts.token parameter value");const n={bridge:this.bridge,topic:this.clientId,type:e.type,token:e.token,peerName:"",language:e.language||""};this.on("connect",async(r,o)=>{if(r)throw r;if(e.peerMeta){const i=o.params[0].peerMeta.name;n.peerName=i}try{if(!(await(await fetch(`${e.url}/new`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)})).json()).success)throw Error("Failed to register in Push Server")}catch{throw Error("Failed to register in Push Server")}})}}function mi(t){return Q.getBrowerCrypto().getRandomValues(new Uint8Array(t))}const Kt=256,Zt=Kt,wi=Kt,L="AES-CBC",yi=`SHA-${Zt}`,fe="HMAC",bi="encrypt",vi="decrypt",Ei="sign",Si="verify";function Ci(t){return t===L?{length:Zt,name:L}:{hash:{name:yi},name:fe}}function ki(t){return t===L?[bi,vi]:[Ei,Si]}async function Ae(t,e=L){return Q.getSubtleCrypto().importKey("raw",t,Ci(e),!0,ki(e))}async function xi(t,e,n){const r=Q.getSubtleCrypto(),o=await Ae(e,L),i=await r.encrypt({iv:t,name:L},o,n);return new Uint8Array(i)}async function Ii(t,e,n){const r=Q.getSubtleCrypto(),o=await Ae(e,L),i=await r.decrypt({iv:t,name:L},o,n);return new Uint8Array(i)}async function Ri(t,e){const n=Q.getSubtleCrypto(),r=await Ae(t,fe),o=await n.sign({length:wi,name:fe},r,e);return new Uint8Array(o)}function Ti(t,e,n){return xi(t,e,n)}function Oi(t,e,n){return Ii(t,e,n)}async function Xt(t,e){return await Ri(t,e)}async function en(t){const e=(t||256)/8,n=mi(e);return St(W(n))}async function tn(t,e){const n=M(t.data),r=M(t.iv),o=M(t.hmac),i=N(o,!1),d=vt(n,r),f=await Xt(e,d),p=N(f,!1);return B(i)===B(p)}async function Ni(t,e,n){const r=j(Z(e)),o=n||await en(128),i=j(Z(o)),d=N(i,!1),f=JSON.stringify(t),p=wt(f),g=await Ti(i,r,p),w=N(g,!1),y=vt(g,i),b=await Xt(r,y),C=N(b,!1);return{data:w,hmac:C,iv:d}}async function Mi(t,e){const n=j(Z(e));if(!n)throw new Error("Missing key: required for decryption");if(!await tn(t,n))return null;const o=M(t.data),i=M(t.iv),d=await Oi(i,n,o),f=gt(d);let p;try{p=JSON.parse(f)}catch{return null}return p}const Li=Object.freeze(Object.defineProperty({__proto__:null,decrypt:Mi,encrypt:Ni,generateKey:en,verifyHmac:tn},Symbol.toStringTag,{value:"Module"}));class qi extends gi{constructor(e,n){super({cryptoLib:Li,connectorOpts:e,pushServerOpts:n})}}const Ai=et(ti);var Ui=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,n=[],r=0;r"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var y=Fe[e.format]||Fe.default;window.clipboardData.setData(y,t)}else w.clipboardData.clearData(),w.clipboardData.setData(e.format,t);e.onCopy&&(w.preventDefault(),e.onCopy(w.clipboardData))}),document.body.appendChild(f),i.selectNodeContents(f),d.addRange(i);var g=document.execCommand("copy");if(!g)throw new Error("copy command was unsuccessful");p=!0}catch(w){n&&console.error("unable to copy using execCommand: ",w),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),p=!0}catch(y){n&&console.error("unable to copy using clipboardData: ",y),n&&console.error("falling back to prompt"),r=$i("message"in e?e.message:Di),window.prompt(r,t)}}finally{d&&(typeof d.removeRange=="function"?d.removeRange(i):d.removeAllRanges()),f&&document.body.removeChild(f),o()}return p}var Bi=ji;function nn(t,e){for(var n in e)t[n]=e[n];return t}function _e(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var r in e)if(r!=="__source"&&t[r]!==e[r])return!0;return!1}function X(t){this.props=t}function rn(t,e){function n(o){var i=this.props.ref,d=i==o.ref;return!d&&i&&(i.call?i(null):i.current=null),e?!e(this.props,o)||!d:_e(this.props,o)}function r(o){return this.shouldComponentUpdate=n,x(t,o)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(X.prototype=new A).isPureReactComponent=!0,X.prototype.shouldComponentUpdate=function(t,e){return _e(this.props,t)||_e(this.state,e)};var He=S.__b;S.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),He&&He(t)};var Wi=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function on(t){function e(n){var r=nn({},n);return delete r.ref,t(r,n.ref||null)}return e.$$typeof=Wi,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var ze=function(t,e){return t==null?null:O(O(t).map(e))},sn={map:ze,forEach:ze,count:function(t){return t?O(t).length:0},only:function(t){var e=O(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:O},Fi=S.__e;S.__e=function(t,e,n,r){if(t.then){for(var o,i=e;i=i.__;)if((o=i.__c)&&o.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),o.__c(t,e)}Fi(t,e,n,r)};var Qe=S.unmount;function an(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),t.__c.__H=null),(t=nn({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(r){return an(r,e,n)})),t}function cn(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(r){return cn(r,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function H(){this.__u=0,this.t=null,this.__b=null}function ln(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function un(t){var e,n,r;function o(i){if(e||(e=t()).then(function(d){n=d.default||d},function(d){r=d}),r)throw r;if(!n)throw e;return x(n,i)}return o.displayName="Lazy",o.__f=!0,o}function D(){this.u=null,this.o=null}S.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),Qe&&Qe(t)},(H.prototype=new A).__c=function(t,e){var n=e.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var o=ln(r.__v),i=!1,d=function(){i||(i=!0,n.__R=null,o?o(f):f())};n.__R=d;var f=function(){if(!--r.__u){if(r.state.__a){var p=r.state.__a;r.__v.__k[0]=cn(p,p.__c.__P,p.__c.__O)}var g;for(r.setState({__a:r.__b=null});g=r.t.pop();)g.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(d,d)},H.prototype.componentWillUnmount=function(){this.t=[]},H.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=an(this.__b,n,r.__O=r.__P)}this.__b=null}var o=e.__a&&x($,null,t.fallback);return o&&(o.__u&=-33),[x($,null,e.__a?null:t.children),o]};var Je=function(t,e,n){if(++n[1]===n[0]&&t.o.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.o.size))for(n=t.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),e.i.removeChild(r)}}),K(x(Hi,{context:e.context},t.__v),e.l)}function dn(t,e){var n=x(zi,{__v:t,i:e});return n.containerInfo=e,n}(D.prototype=new A).__a=function(t){var e=this,n=ln(e.__v),r=e.o.get(t);return r[0]++,function(o){var i=function(){e.props.revealOrder?(r.push(o),Je(e,t,r)):o()};n?n(i):i()}},D.prototype.render=function(t){this.u=null,this.o=new Map;var e=O(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.o.set(e[n],this.u=[1,0,this.u]);return t.children},D.prototype.componentDidUpdate=D.prototype.componentDidMount=function(){var t=this;this.o.forEach(function(e,n){Je(t,n,e)})};var hn=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Qi=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ji=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Vi=/[A-Z0-9]/g,Gi=typeof document<"u",Yi=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function fn(t,e,n){return e.__k==null&&(e.textContent=""),K(t,e),typeof n=="function"&&n(),t?t.__c:null}function _n(t,e,n){return hr(t,e),typeof n=="function"&&n(),t?t.__c:null}A.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(A.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var Ve=S.event;function Ki(){}function Zi(){return this.cancelBubble}function Xi(){return this.defaultPrevented}S.event=function(t){return Ve&&(t=Ve(t)),t.persist=Ki,t.isPropagationStopped=Zi,t.isDefaultPrevented=Xi,t.nativeEvent=t};var Ue,es={enumerable:!1,configurable:!0,get:function(){return this.class}},Ge=S.vnode;S.vnode=function(t){typeof t.type=="string"&&function(e){var n=e.props,r=e.type,o={};for(var i in n){var d=n[i];if(!(i==="value"&&"defaultValue"in n&&d==null||Gi&&i==="children"&&r==="noscript"||i==="class"||i==="className")){var f=i.toLowerCase();i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&d===!0?d="":f==="ondoubleclick"?i="ondblclick":f!=="onchange"||r!=="input"&&r!=="textarea"||Yi(n.type)?f==="onfocus"?i="onfocusin":f==="onblur"?i="onfocusout":Ji.test(i)?i=f:r.indexOf("-")===-1&&Qi.test(i)?i=i.replace(Vi,"-$&").toLowerCase():d===null&&(d=void 0):f=i="oninput",f==="oninput"&&o[i=f]&&(i="oninputCapture"),o[i]=d}}r=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=O(n.children).forEach(function(p){p.props.selected=o.value.indexOf(p.props.value)!=-1})),r=="select"&&o.defaultValue!=null&&(o.value=O(n.children).forEach(function(p){p.props.selected=o.multiple?o.defaultValue.indexOf(p.props.value)!=-1:o.defaultValue==p.props.value})),n.class&&!n.className?(o.class=n.class,Object.defineProperty(o,"className",es)):(n.className&&!n.class||n.class&&n.className)&&(o.class=o.className=n.className),e.props=o}(t),t.$$typeof=hn,Ge&&Ge(t)};var Ye=S.__r;S.__r=function(t){Ye&&Ye(t),Ue=t.__c};var Ke=S.diffed;S.diffed=function(t){Ke&&Ke(t);var e=t.props,n=t.__e;n!=null&&t.type==="textarea"&&"value"in e&&e.value!==n.value&&(n.value=e.value==null?"":e.value),Ue=null};var pn={ReactCurrentDispatcher:{current:{readContext:function(t){return Ue.__n[t.__c].props.value}}}},ts="17.0.2";function gn(t){return x.bind(null,t)}function V(t){return!!t&&t.$$typeof===hn}function mn(t){return V(t)&&t.type===$}function wn(t){return V(t)?fr.apply(null,arguments):t}function yn(t){return!!t.__k&&(K(null,t),!0)}function bn(t){return t&&(t.base||t.nodeType===1&&t)||null}var vn=function(t,e){return t(e)},En=function(t,e){return t(e)},Sn=$;function Pe(t){t()}function Cn(t){return t}function kn(){return[!1,Pe]}var xn=ee,In=V;function Rn(t,e){var n=e(),r=ge({h:{__:n,v:e}}),o=r[0].h,i=r[1];return ee(function(){o.__=n,o.v=e,ce(o)&&i({h:o})},[t,n,e]),me(function(){return ce(o)&&i({h:o}),t(function(){ce(o)&&i({h:o})})},[t]),n}function ce(t){var e,n,r=t.v,o=t.__;try{var i=r();return!((e=o)===(n=i)&&(e!==0||1/e==1/n)||e!=e&&n!=n)}catch{return!0}}var ns={useState:ge,useId:nt,useReducer:rt,useEffect:me,useLayoutEffect:ee,useInsertionEffect:xn,useTransition:kn,useDeferredValue:Cn,useSyncExternalStore:Rn,startTransition:Pe,useRef:ot,useImperativeHandle:it,useMemo:st,useCallback:at,useContext:ct,useDebugValue:lt,version:"17.0.2",Children:sn,render:fn,hydrate:_n,unmountComponentAtNode:yn,createPortal:dn,createElement:x,createContext:ut,createFactory:gn,cloneElement:wn,createRef:dt,Fragment:$,isValidElement:V,isElement:In,isFragment:mn,findDOMNode:bn,Component:A,PureComponent:X,memo:rn,forwardRef:on,flushSync:En,unstable_batchedUpdates:vn,StrictMode:Sn,Suspense:H,SuspenseList:D,lazy:un,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:pn};const rs=Object.freeze(Object.defineProperty({__proto__:null,Children:sn,Component:A,Fragment:$,PureComponent:X,StrictMode:Sn,Suspense:H,SuspenseList:D,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:pn,cloneElement:wn,createContext:ut,createElement:x,createFactory:gn,createPortal:dn,createRef:dt,default:ns,findDOMNode:bn,flushSync:En,forwardRef:on,hydrate:_n,isElement:In,isFragment:mn,isValidElement:V,lazy:un,memo:rn,render:fn,startTransition:Pe,unmountComponentAtNode:yn,unstable_batchedUpdates:vn,useCallback:at,useContext:ct,useDebugValue:lt,useDeferredValue:Cn,useEffect:me,useErrorBoundary:_r,useId:nt,useImperativeHandle:it,useInsertionEffect:xn,useLayoutEffect:ee,useMemo:st,useReducer:rt,useRef:ot,useState:ge,useSyncExternalStore:Rn,useTransition:kn,version:ts},Symbol.toStringTag,{value:"Module"})),os=et(rs);function Tn(t){return t&&typeof t=="object"&&"default"in t?t.default:t}var E=Ai,On=Tn(sr),is=Tn(Bi),l=os;function ss(t){On.toString(t,{type:"terminal"}).then(console.log)}var as=`:root { --animation-duration: 300ms; } diff --git a/assets/index-02198e42.js b/assets/index-4c5d1742.js similarity index 55% rename from assets/index-02198e42.js rename to assets/index-4c5d1742.js index d94d871..a64871a 100644 --- a/assets/index-02198e42.js +++ b/assets/index-4c5d1742.js @@ -1 +1 @@ -import{e as s}from"./index-42ee4a0e.js";import{g as o,a as m,b as g,c as l,d as E,l as h,n as i}from"./index-42ee4a0e.js";function n(e){return s(e)}export{o as getEnsAddress,m as getEnsAvatar,g as getEnsName,l as getEnsResolver,E as getEnsText,h as labelhash,i as namehash,n as normalize}; +import{e as s}from"./index-d83b38d5.js";import{g as o,a as m,b as g,c as l,d as E,l as h,n as i}from"./index-d83b38d5.js";function n(e){return s(e)}export{o as getEnsAddress,m as getEnsAvatar,g as getEnsName,l as getEnsResolver,E as getEnsText,h as labelhash,i as namehash,n as normalize}; diff --git a/assets/index-3aa786fb.js b/assets/index-587ef3a1.js similarity index 99% rename from assets/index-3aa786fb.js rename to assets/index-587ef3a1.js index 9e688ee..99b11ab 100644 --- a/assets/index-3aa786fb.js +++ b/assets/index-587ef3a1.js @@ -1,4 +1,4 @@ -import{n as ve,s as qe,T as k,t as W,a as u,o as Q,R as jr,p as U,y as ne}from"./index-49a0569e.js";import{Y as Nr}from"./index-42ee4a0e.js";class Ur{setAnimation(e){this.animation=e,e==null||e.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}}function Hr(t,e){t.indexOf(e)===-1&&t.push(e)}const br=(t,e,r)=>Math.min(Math.max(r,t),e),j={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},Qe=t=>typeof t=="number",ge=t=>Array.isArray(t)&&!Qe(t[0]),Br=(t,e,r)=>{const i=e-t;return((r-t)%i+i)%i+t};function Zr(t,e){return ge(t)?t[Br(0,t.length,e)]:t}const yr=(t,e,r)=>-r*t+r*e+t,xr=()=>{},Y=t=>t,Nt=(t,e,r)=>e-t===0?1:(r-t)/(e-t);function $r(t,e){const r=t[t.length-1];for(let i=1;i<=e;i++){const o=Nt(0,e,i);t.push(yr(r,1,o))}}function zr(t){const e=[0];return $r(e,t-1),e}function Vr(t,e=zr(t.length),r=Y){const i=t.length,o=i-e.length;return o>0&&$r(e,o),n=>{let a=0;for(;aArray.isArray(t)&&Qe(t[0]),St=t=>typeof t=="object"&&!!t.createAnimation,fe=t=>typeof t=="function",Fr=t=>typeof t=="string",Pe={ms:t=>t*1e3,s:t=>t/1e3},Ar=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,qr=1e-7,Kr=12;function Qr(t,e,r,i,o){let n,a,s=0;do a=e+(r-e)/2,n=Ar(a,i,o)-t,n>0?r=a:e=a;while(Math.abs(n)>qr&&++sQr(n,0,1,t,r);return n=>n===0||n===1?n:Ar(o(n),e,i)}const Yr=(t,e="end")=>r=>{r=e==="end"?Math.min(r,.999):Math.max(r,.001);const i=r*t,o=e==="end"?Math.floor(i):Math.ceil(i);return br(0,1,o/t)},zt={ease:Te(.25,.1,.25,1),"ease-in":Te(.42,0,1,1),"ease-in-out":Te(.42,0,.58,1),"ease-out":Te(0,0,.58,1)},Gr=/\((.*?)\)/;function Vt(t){if(fe(t))return t;if(Cr(t))return Te(...t);if(zt[t])return zt[t];if(t.startsWith("steps")){const e=Gr.exec(t);if(e){const r=e[1].split(",");return Yr(parseFloat(r[0]),r[1].trim())}}return Y}class _r{constructor(e,r=[0,1],{easing:i,duration:o=j.duration,delay:n=j.delay,endDelay:a=j.endDelay,repeat:s=j.repeat,offset:c,direction:d="normal"}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=Y,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((v,p)=>{this.resolve=v,this.reject=p}),i=i||j.easing,St(i)){const v=i.createAnimation(r);i=v.easing,r=v.keyframes||r,o=v.duration||o}this.repeat=s,this.easing=ge(i)?Y:Vt(i),this.updateDuration(o);const y=Vr(r,c,ge(i)?i.map(Vt):Y);this.tick=v=>{var p;n=n;let A=0;this.pauseTime!==void 0?A=this.pauseTime:A=(v-this.startTime)*this.rate,this.t=A,A/=1e3,A=Math.max(A-n,0),this.playState==="finished"&&this.pauseTime===void 0&&(A=this.totalDuration);const _=A/this.duration;let g=Math.floor(_),E=_%1;!E&&_>=1&&(E=1),E===1&&g--;const $=g%2;(d==="reverse"||d==="alternate"&&$||d==="alternate-reverse"&&!$)&&(E=1-E);const T=A>=this.totalDuration?1:Math.min(E,1),R=y(this.easing(T));e(R),this.pauseTime===void 0&&(this.playState==="finished"||A>=this.totalDuration+a)?(this.playState="finished",(p=this.resolve)===null||p===void 0||p.call(this,R)):this.playState!=="idle"&&(this.frameRequestId=requestAnimationFrame(this.tick))},this.play()}play(){const e=performance.now();this.playState="running",this.pauseTime!==void 0?this.startTime=e-this.pauseTime:this.startTime||(this.startTime=e),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var e;this.playState="idle",this.frameRequestId!==void 0&&cancelAnimationFrame(this.frameRequestId),(e=this.reject)===null||e===void 0||e.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(e){this.duration=e,this.totalDuration=e*(this.repeat+1)}get currentTime(){return this.t}set currentTime(e){this.pauseTime!==void 0||this.rate===0?this.pauseTime=e:this.startTime=performance.now()-e/this.rate}get playbackRate(){return this.rate}set playbackRate(e){this.rate=e}}/** +import{n as ve,s as qe,T as k,t as W,a as u,o as Q,R as jr,p as U,y as ne}from"./index-99ae9c5d.js";import{Y as Nr}from"./index-d83b38d5.js";class Ur{setAnimation(e){this.animation=e,e==null||e.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}}function Hr(t,e){t.indexOf(e)===-1&&t.push(e)}const br=(t,e,r)=>Math.min(Math.max(r,t),e),j={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},Qe=t=>typeof t=="number",ge=t=>Array.isArray(t)&&!Qe(t[0]),Br=(t,e,r)=>{const i=e-t;return((r-t)%i+i)%i+t};function Zr(t,e){return ge(t)?t[Br(0,t.length,e)]:t}const yr=(t,e,r)=>-r*t+r*e+t,xr=()=>{},Y=t=>t,Nt=(t,e,r)=>e-t===0?1:(r-t)/(e-t);function $r(t,e){const r=t[t.length-1];for(let i=1;i<=e;i++){const o=Nt(0,e,i);t.push(yr(r,1,o))}}function zr(t){const e=[0];return $r(e,t-1),e}function Vr(t,e=zr(t.length),r=Y){const i=t.length,o=i-e.length;return o>0&&$r(e,o),n=>{let a=0;for(;aArray.isArray(t)&&Qe(t[0]),St=t=>typeof t=="object"&&!!t.createAnimation,fe=t=>typeof t=="function",Fr=t=>typeof t=="string",Pe={ms:t=>t*1e3,s:t=>t/1e3},Ar=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,qr=1e-7,Kr=12;function Qr(t,e,r,i,o){let n,a,s=0;do a=e+(r-e)/2,n=Ar(a,i,o)-t,n>0?r=a:e=a;while(Math.abs(n)>qr&&++sQr(n,0,1,t,r);return n=>n===0||n===1?n:Ar(o(n),e,i)}const Yr=(t,e="end")=>r=>{r=e==="end"?Math.min(r,.999):Math.max(r,.001);const i=r*t,o=e==="end"?Math.floor(i):Math.ceil(i);return br(0,1,o/t)},zt={ease:Te(.25,.1,.25,1),"ease-in":Te(.42,0,1,1),"ease-in-out":Te(.42,0,.58,1),"ease-out":Te(0,0,.58,1)},Gr=/\((.*?)\)/;function Vt(t){if(fe(t))return t;if(Cr(t))return Te(...t);if(zt[t])return zt[t];if(t.startsWith("steps")){const e=Gr.exec(t);if(e){const r=e[1].split(",");return Yr(parseFloat(r[0]),r[1].trim())}}return Y}class _r{constructor(e,r=[0,1],{easing:i,duration:o=j.duration,delay:n=j.delay,endDelay:a=j.endDelay,repeat:s=j.repeat,offset:c,direction:d="normal"}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=Y,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((v,p)=>{this.resolve=v,this.reject=p}),i=i||j.easing,St(i)){const v=i.createAnimation(r);i=v.easing,r=v.keyframes||r,o=v.duration||o}this.repeat=s,this.easing=ge(i)?Y:Vt(i),this.updateDuration(o);const y=Vr(r,c,ge(i)?i.map(Vt):Y);this.tick=v=>{var p;n=n;let A=0;this.pauseTime!==void 0?A=this.pauseTime:A=(v-this.startTime)*this.rate,this.t=A,A/=1e3,A=Math.max(A-n,0),this.playState==="finished"&&this.pauseTime===void 0&&(A=this.totalDuration);const _=A/this.duration;let g=Math.floor(_),E=_%1;!E&&_>=1&&(E=1),E===1&&g--;const $=g%2;(d==="reverse"||d==="alternate"&&$||d==="alternate-reverse"&&!$)&&(E=1-E);const T=A>=this.totalDuration?1:Math.min(E,1),R=y(this.easing(T));e(R),this.pauseTime===void 0&&(this.playState==="finished"||A>=this.totalDuration+a)?(this.playState="finished",(p=this.resolve)===null||p===void 0||p.call(this,R)):this.playState!=="idle"&&(this.frameRequestId=requestAnimationFrame(this.tick))},this.play()}play(){const e=performance.now();this.playState="running",this.pauseTime!==void 0?this.startTime=e-this.pauseTime:this.startTime||(this.startTime=e),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var e;this.playState="idle",this.frameRequestId!==void 0&&cancelAnimationFrame(this.frameRequestId),(e=this.reject)===null||e===void 0||e.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(e){this.duration=e,this.totalDuration=e*(this.repeat+1)}get currentTime(){return this.t}set currentTime(e){this.pauseTime!==void 0||this.rate===0?this.pauseTime=e:this.startTime=performance.now()-e/this.rate}get playbackRate(){return this.rate}set playbackRate(e){this.rate=e}}/** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause diff --git a/assets/index-3c62328b.js b/assets/index-83d26e2f.js similarity index 99% rename from assets/index-3c62328b.js rename to assets/index-83d26e2f.js index 82f088e..c4d4c05 100644 --- a/assets/index-3c62328b.js +++ b/assets/index-83d26e2f.js @@ -1,4 +1,4 @@ -import{Z as Ys,M as J,J as Eu,$ as Ks,G as dn,a0 as M0,a1 as B,N as x0}from"./index-42ee4a0e.js";import{f as C0,i as R0}from"./hooks.module-835c4290.js";function I0(t,e){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var Mu={exports:{}};Mu.exports;(function(t){(function(e,r){function n(v,u){if(!v)throw new Error(u||"Assertion failed")}function i(v,u){v.super_=u;var h=function(){};h.prototype=u.prototype,v.prototype=new h,v.prototype.constructor=v}function s(v,u,h){if(s.isBN(v))return v;this.negative=0,this.words=null,this.length=0,this.red=null,v!==null&&((u==="le"||u==="be")&&(h=u,u=10),this._init(v||0,u||10,h||"be"))}typeof e=="object"?e.exports=s:r.BN=s,s.BN=s,s.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=Ys.Buffer}catch{}s.isBN=function(u){return u instanceof s?!0:u!==null&&typeof u=="object"&&u.constructor.wordSize===s.wordSize&&Array.isArray(u.words)},s.max=function(u,h){return u.cmp(h)>0?u:h},s.min=function(u,h){return u.cmp(h)<0?u:h},s.prototype._init=function(u,h,g){if(typeof u=="number")return this._initNumber(u,h,g);if(typeof u=="object")return this._initArray(u,h,g);h==="hex"&&(h=16),n(h===(h|0)&&h>=2&&h<=36),u=u.toString().replace(/\s+/g,"");var y=0;u[0]==="-"&&(y++,this.negative=1),y=0;y-=3)C=u[y]|u[y-1]<<8|u[y-2]<<16,this.words[w]|=C<>>26-k&67108863,k+=24,k>=26&&(k-=26,w++);else if(g==="le")for(y=0,w=0;y>>26-k&67108863,k+=24,k>=26&&(k-=26,w++);return this._strip()};function a(v,u){var h=v.charCodeAt(u);if(h>=48&&h<=57)return h-48;if(h>=65&&h<=70)return h-55;if(h>=97&&h<=102)return h-87;n(!1,"Invalid character in "+v)}function c(v,u,h){var g=a(v,h);return h-1>=u&&(g|=a(v,h-1)<<4),g}s.prototype._parseHex=function(u,h,g){this.length=Math.ceil((u.length-h)/6),this.words=new Array(this.length);for(var y=0;y=h;y-=2)k=c(u,h,y)<=18?(w-=18,C+=1,this.words[C]|=k>>>26):w+=8;else{var m=u.length-h;for(y=m%2===0?h+1:h;y=18?(w-=18,C+=1,this.words[C]|=k>>>26):w+=8}this._strip()};function l(v,u,h,g){for(var y=0,w=0,C=Math.min(v.length,h),k=u;k=49?w=m-49+10:m>=17?w=m-17+10:w=m,n(m>=0&&w1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=p}catch{s.prototype.inspect=p}else s.prototype.inspect=p;function p(){return(this.red?""}var b=["","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"],x=[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],R=[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];s.prototype.toString=function(u,h){u=u||10,h=h|0||1;var g;if(u===16||u==="hex"){g="";for(var y=0,w=0,C=0;C>>24-y&16777215,y+=2,y>=26&&(y-=26,C--),w!==0||C!==this.length-1?g=b[6-m.length]+m+g:g=m+g}for(w!==0&&(g=w.toString(16)+g);g.length%h!==0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}if(u===(u|0)&&u>=2&&u<=36){var f=x[u],M=R[u];g="";var U=this.clone();for(U.negative=0;!U.isZero();){var q=U.modrn(M).toString(u);U=U.idivn(M),U.isZero()?g=q+g:g=b[f-q.length]+q+g}for(this.isZero()&&(g="0"+g);g.length%h!==0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var u=this.words[0];return this.length===2?u+=this.words[1]*67108864:this.length===3&&this.words[2]===1?u+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-u:u},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(u,h){return this.toArrayLike(o,u,h)}),s.prototype.toArray=function(u,h){return this.toArrayLike(Array,u,h)};var L=function(u,h){return u.allocUnsafe?u.allocUnsafe(h):new u(h)};s.prototype.toArrayLike=function(u,h,g){this._strip();var y=this.byteLength(),w=g||Math.max(1,y);n(y<=w,"byte array longer than desired length"),n(w>0,"Requested array length <= 0");var C=L(u,w),k=h==="le"?"LE":"BE";return this["_toArrayLike"+k](C,y),C},s.prototype._toArrayLikeLE=function(u,h){for(var g=0,y=0,w=0,C=0;w>8&255),g>16&255),C===6?(g>24&255),y=0,C=0):(y=k>>>24,C+=2)}if(g=0&&(u[g--]=k>>8&255),g>=0&&(u[g--]=k>>16&255),C===6?(g>=0&&(u[g--]=k>>24&255),y=0,C=0):(y=k>>>24,C+=2)}if(g>=0)for(u[g--]=y;g>=0;)u[g--]=0},Math.clz32?s.prototype._countBits=function(u){return 32-Math.clz32(u)}:s.prototype._countBits=function(u){var h=u,g=0;return h>=4096&&(g+=13,h>>>=13),h>=64&&(g+=7,h>>>=7),h>=8&&(g+=4,h>>>=4),h>=2&&(g+=2,h>>>=2),g+h},s.prototype._zeroBits=function(u){if(u===0)return 26;var h=u,g=0;return h&8191||(g+=13,h>>>=13),h&127||(g+=7,h>>>=7),h&15||(g+=4,h>>>=4),h&3||(g+=2,h>>>=2),h&1||g++,g},s.prototype.bitLength=function(){var u=this.words[this.length-1],h=this._countBits(u);return(this.length-1)*26+h};function N(v){for(var u=new Array(v.bitLength()),h=0;h>>y&1}return u}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var u=0,h=0;hu.length?this.clone().ior(u):u.clone().ior(this)},s.prototype.uor=function(u){return this.length>u.length?this.clone().iuor(u):u.clone().iuor(this)},s.prototype.iuand=function(u){var h;this.length>u.length?h=u:h=this;for(var g=0;gu.length?this.clone().iand(u):u.clone().iand(this)},s.prototype.uand=function(u){return this.length>u.length?this.clone().iuand(u):u.clone().iuand(this)},s.prototype.iuxor=function(u){var h,g;this.length>u.length?(h=this,g=u):(h=u,g=this);for(var y=0;yu.length?this.clone().ixor(u):u.clone().ixor(this)},s.prototype.uxor=function(u){return this.length>u.length?this.clone().iuxor(u):u.clone().iuxor(this)},s.prototype.inotn=function(u){n(typeof u=="number"&&u>=0);var h=Math.ceil(u/26)|0,g=u%26;this._expand(h),g>0&&h--;for(var y=0;y0&&(this.words[y]=~this.words[y]&67108863>>26-g),this._strip()},s.prototype.notn=function(u){return this.clone().inotn(u)},s.prototype.setn=function(u,h){n(typeof u=="number"&&u>=0);var g=u/26|0,y=u%26;return this._expand(g+1),h?this.words[g]=this.words[g]|1<u.length?(g=this,y=u):(g=u,y=this);for(var w=0,C=0;C>>26;for(;w!==0&&C>>26;if(this.length=g.length,w!==0)this.words[this.length]=w,this.length++;else if(g!==this)for(;Cu.length?this.clone().iadd(u):u.clone().iadd(this)},s.prototype.isub=function(u){if(u.negative!==0){u.negative=0;var h=this.iadd(u);return u.negative=1,h._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(u),this.negative=1,this._normSign();var g=this.cmp(u);if(g===0)return this.negative=0,this.length=1,this.words[0]=0,this;var y,w;g>0?(y=this,w=u):(y=u,w=this);for(var C=0,k=0;k>26,this.words[k]=h&67108863;for(;C!==0&&k>26,this.words[k]=h&67108863;if(C===0&&k>>26,U=m&67108863,q=Math.min(f,u.length-1),A=Math.max(0,f-v.length+1);A<=q;A++){var T=f-A|0;y=v.words[T]|0,w=u.words[A]|0,C=y*w+U,M+=C/67108864|0,U=C&67108863}h.words[f]=U|0,m=M|0}return m!==0?h.words[f]=m|0:h.length--,h._strip()}var I=function(u,h,g){var y=u.words,w=h.words,C=g.words,k=0,m,f,M,U=y[0]|0,q=U&8191,A=U>>>13,T=y[1]|0,D=T&8191,V=T>>>13,se=y[2]|0,_=se&8191,S=se>>>13,F=y[3]|0,H=F&8191,re=F>>>13,ie=y[4]|0,ee=ie&8191,he=ie>>>13,Zt=y[5]|0,me=Zt&8191,_e=Zt>>>13,yr=y[6]|0,be=yr&8191,ve=yr>>>13,cr=y[7]|0,ge=cr&8191,de=cr>>>13,Mt=y[8]|0,Se=Mt&8191,Ee=Mt>>>13,Sn=y[9]|0,Me=Sn&8191,xe=Sn>>>13,En=w[0]|0,Ce=En&8191,Re=En>>>13,Mn=w[1]|0,Ie=Mn&8191,Ae=Mn>>>13,xn=w[2]|0,ke=xn&8191,Te=xn>>>13,Cn=w[3]|0,Oe=Cn&8191,Ne=Cn>>>13,Rn=w[4]|0,Le=Rn&8191,Pe=Rn>>>13,In=w[5]|0,$e=In&8191,De=In>>>13,An=w[6]|0,je=An&8191,Be=An>>>13,kn=w[7]|0,Fe=kn&8191,We=kn>>>13,Tn=w[8]|0,He=Tn&8191,Ve=Tn>>>13,On=w[9]|0,Ue=On&8191,ze=On>>>13;g.negative=u.negative^h.negative,g.length=19,m=Math.imul(q,Ce),f=Math.imul(q,Re),f=f+Math.imul(A,Ce)|0,M=Math.imul(A,Re);var $r=(k+m|0)+((f&8191)<<13)|0;k=(M+(f>>>13)|0)+($r>>>26)|0,$r&=67108863,m=Math.imul(D,Ce),f=Math.imul(D,Re),f=f+Math.imul(V,Ce)|0,M=Math.imul(V,Re),m=m+Math.imul(q,Ie)|0,f=f+Math.imul(q,Ae)|0,f=f+Math.imul(A,Ie)|0,M=M+Math.imul(A,Ae)|0;var Dr=(k+m|0)+((f&8191)<<13)|0;k=(M+(f>>>13)|0)+(Dr>>>26)|0,Dr&=67108863,m=Math.imul(_,Ce),f=Math.imul(_,Re),f=f+Math.imul(S,Ce)|0,M=Math.imul(S,Re),m=m+Math.imul(D,Ie)|0,f=f+Math.imul(D,Ae)|0,f=f+Math.imul(V,Ie)|0,M=M+Math.imul(V,Ae)|0,m=m+Math.imul(q,ke)|0,f=f+Math.imul(q,Te)|0,f=f+Math.imul(A,ke)|0,M=M+Math.imul(A,Te)|0;var jr=(k+m|0)+((f&8191)<<13)|0;k=(M+(f>>>13)|0)+(jr>>>26)|0,jr&=67108863,m=Math.imul(H,Ce),f=Math.imul(H,Re),f=f+Math.imul(re,Ce)|0,M=Math.imul(re,Re),m=m+Math.imul(_,Ie)|0,f=f+Math.imul(_,Ae)|0,f=f+Math.imul(S,Ie)|0,M=M+Math.imul(S,Ae)|0,m=m+Math.imul(D,ke)|0,f=f+Math.imul(D,Te)|0,f=f+Math.imul(V,ke)|0,M=M+Math.imul(V,Te)|0,m=m+Math.imul(q,Oe)|0,f=f+Math.imul(q,Ne)|0,f=f+Math.imul(A,Oe)|0,M=M+Math.imul(A,Ne)|0;var Br=(k+m|0)+((f&8191)<<13)|0;k=(M+(f>>>13)|0)+(Br>>>26)|0,Br&=67108863,m=Math.imul(ee,Ce),f=Math.imul(ee,Re),f=f+Math.imul(he,Ce)|0,M=Math.imul(he,Re),m=m+Math.imul(H,Ie)|0,f=f+Math.imul(H,Ae)|0,f=f+Math.imul(re,Ie)|0,M=M+Math.imul(re,Ae)|0,m=m+Math.imul(_,ke)|0,f=f+Math.imul(_,Te)|0,f=f+Math.imul(S,ke)|0,M=M+Math.imul(S,Te)|0,m=m+Math.imul(D,Oe)|0,f=f+Math.imul(D,Ne)|0,f=f+Math.imul(V,Oe)|0,M=M+Math.imul(V,Ne)|0,m=m+Math.imul(q,Le)|0,f=f+Math.imul(q,Pe)|0,f=f+Math.imul(A,Le)|0,M=M+Math.imul(A,Pe)|0;var Fr=(k+m|0)+((f&8191)<<13)|0;k=(M+(f>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,m=Math.imul(me,Ce),f=Math.imul(me,Re),f=f+Math.imul(_e,Ce)|0,M=Math.imul(_e,Re),m=m+Math.imul(ee,Ie)|0,f=f+Math.imul(ee,Ae)|0,f=f+Math.imul(he,Ie)|0,M=M+Math.imul(he,Ae)|0,m=m+Math.imul(H,ke)|0,f=f+Math.imul(H,Te)|0,f=f+Math.imul(re,ke)|0,M=M+Math.imul(re,Te)|0,m=m+Math.imul(_,Oe)|0,f=f+Math.imul(_,Ne)|0,f=f+Math.imul(S,Oe)|0,M=M+Math.imul(S,Ne)|0,m=m+Math.imul(D,Le)|0,f=f+Math.imul(D,Pe)|0,f=f+Math.imul(V,Le)|0,M=M+Math.imul(V,Pe)|0,m=m+Math.imul(q,$e)|0,f=f+Math.imul(q,De)|0,f=f+Math.imul(A,$e)|0,M=M+Math.imul(A,De)|0;var Wr=(k+m|0)+((f&8191)<<13)|0;k=(M+(f>>>13)|0)+(Wr>>>26)|0,Wr&=67108863,m=Math.imul(be,Ce),f=Math.imul(be,Re),f=f+Math.imul(ve,Ce)|0,M=Math.imul(ve,Re),m=m+Math.imul(me,Ie)|0,f=f+Math.imul(me,Ae)|0,f=f+Math.imul(_e,Ie)|0,M=M+Math.imul(_e,Ae)|0,m=m+Math.imul(ee,ke)|0,f=f+Math.imul(ee,Te)|0,f=f+Math.imul(he,ke)|0,M=M+Math.imul(he,Te)|0,m=m+Math.imul(H,Oe)|0,f=f+Math.imul(H,Ne)|0,f=f+Math.imul(re,Oe)|0,M=M+Math.imul(re,Ne)|0,m=m+Math.imul(_,Le)|0,f=f+Math.imul(_,Pe)|0,f=f+Math.imul(S,Le)|0,M=M+Math.imul(S,Pe)|0,m=m+Math.imul(D,$e)|0,f=f+Math.imul(D,De)|0,f=f+Math.imul(V,$e)|0,M=M+Math.imul(V,De)|0,m=m+Math.imul(q,je)|0,f=f+Math.imul(q,Be)|0,f=f+Math.imul(A,je)|0,M=M+Math.imul(A,Be)|0;var Hr=(k+m|0)+((f&8191)<<13)|0;k=(M+(f>>>13)|0)+(Hr>>>26)|0,Hr&=67108863,m=Math.imul(ge,Ce),f=Math.imul(ge,Re),f=f+Math.imul(de,Ce)|0,M=Math.imul(de,Re),m=m+Math.imul(be,Ie)|0,f=f+Math.imul(be,Ae)|0,f=f+Math.imul(ve,Ie)|0,M=M+Math.imul(ve,Ae)|0,m=m+Math.imul(me,ke)|0,f=f+Math.imul(me,Te)|0,f=f+Math.imul(_e,ke)|0,M=M+Math.imul(_e,Te)|0,m=m+Math.imul(ee,Oe)|0,f=f+Math.imul(ee,Ne)|0,f=f+Math.imul(he,Oe)|0,M=M+Math.imul(he,Ne)|0,m=m+Math.imul(H,Le)|0,f=f+Math.imul(H,Pe)|0,f=f+Math.imul(re,Le)|0,M=M+Math.imul(re,Pe)|0,m=m+Math.imul(_,$e)|0,f=f+Math.imul(_,De)|0,f=f+Math.imul(S,$e)|0,M=M+Math.imul(S,De)|0,m=m+Math.imul(D,je)|0,f=f+Math.imul(D,Be)|0,f=f+Math.imul(V,je)|0,M=M+Math.imul(V,Be)|0,m=m+Math.imul(q,Fe)|0,f=f+Math.imul(q,We)|0,f=f+Math.imul(A,Fe)|0,M=M+Math.imul(A,We)|0;var Vr=(k+m|0)+((f&8191)<<13)|0;k=(M+(f>>>13)|0)+(Vr>>>26)|0,Vr&=67108863,m=Math.imul(Se,Ce),f=Math.imul(Se,Re),f=f+Math.imul(Ee,Ce)|0,M=Math.imul(Ee,Re),m=m+Math.imul(ge,Ie)|0,f=f+Math.imul(ge,Ae)|0,f=f+Math.imul(de,Ie)|0,M=M+Math.imul(de,Ae)|0,m=m+Math.imul(be,ke)|0,f=f+Math.imul(be,Te)|0,f=f+Math.imul(ve,ke)|0,M=M+Math.imul(ve,Te)|0,m=m+Math.imul(me,Oe)|0,f=f+Math.imul(me,Ne)|0,f=f+Math.imul(_e,Oe)|0,M=M+Math.imul(_e,Ne)|0,m=m+Math.imul(ee,Le)|0,f=f+Math.imul(ee,Pe)|0,f=f+Math.imul(he,Le)|0,M=M+Math.imul(he,Pe)|0,m=m+Math.imul(H,$e)|0,f=f+Math.imul(H,De)|0,f=f+Math.imul(re,$e)|0,M=M+Math.imul(re,De)|0,m=m+Math.imul(_,je)|0,f=f+Math.imul(_,Be)|0,f=f+Math.imul(S,je)|0,M=M+Math.imul(S,Be)|0,m=m+Math.imul(D,Fe)|0,f=f+Math.imul(D,We)|0,f=f+Math.imul(V,Fe)|0,M=M+Math.imul(V,We)|0,m=m+Math.imul(q,He)|0,f=f+Math.imul(q,Ve)|0,f=f+Math.imul(A,He)|0,M=M+Math.imul(A,Ve)|0;var Ur=(k+m|0)+((f&8191)<<13)|0;k=(M+(f>>>13)|0)+(Ur>>>26)|0,Ur&=67108863,m=Math.imul(Me,Ce),f=Math.imul(Me,Re),f=f+Math.imul(xe,Ce)|0,M=Math.imul(xe,Re),m=m+Math.imul(Se,Ie)|0,f=f+Math.imul(Se,Ae)|0,f=f+Math.imul(Ee,Ie)|0,M=M+Math.imul(Ee,Ae)|0,m=m+Math.imul(ge,ke)|0,f=f+Math.imul(ge,Te)|0,f=f+Math.imul(de,ke)|0,M=M+Math.imul(de,Te)|0,m=m+Math.imul(be,Oe)|0,f=f+Math.imul(be,Ne)|0,f=f+Math.imul(ve,Oe)|0,M=M+Math.imul(ve,Ne)|0,m=m+Math.imul(me,Le)|0,f=f+Math.imul(me,Pe)|0,f=f+Math.imul(_e,Le)|0,M=M+Math.imul(_e,Pe)|0,m=m+Math.imul(ee,$e)|0,f=f+Math.imul(ee,De)|0,f=f+Math.imul(he,$e)|0,M=M+Math.imul(he,De)|0,m=m+Math.imul(H,je)|0,f=f+Math.imul(H,Be)|0,f=f+Math.imul(re,je)|0,M=M+Math.imul(re,Be)|0,m=m+Math.imul(_,Fe)|0,f=f+Math.imul(_,We)|0,f=f+Math.imul(S,Fe)|0,M=M+Math.imul(S,We)|0,m=m+Math.imul(D,He)|0,f=f+Math.imul(D,Ve)|0,f=f+Math.imul(V,He)|0,M=M+Math.imul(V,Ve)|0,m=m+Math.imul(q,Ue)|0,f=f+Math.imul(q,ze)|0,f=f+Math.imul(A,Ue)|0,M=M+Math.imul(A,ze)|0;var zr=(k+m|0)+((f&8191)<<13)|0;k=(M+(f>>>13)|0)+(zr>>>26)|0,zr&=67108863,m=Math.imul(Me,Ie),f=Math.imul(Me,Ae),f=f+Math.imul(xe,Ie)|0,M=Math.imul(xe,Ae),m=m+Math.imul(Se,ke)|0,f=f+Math.imul(Se,Te)|0,f=f+Math.imul(Ee,ke)|0,M=M+Math.imul(Ee,Te)|0,m=m+Math.imul(ge,Oe)|0,f=f+Math.imul(ge,Ne)|0,f=f+Math.imul(de,Oe)|0,M=M+Math.imul(de,Ne)|0,m=m+Math.imul(be,Le)|0,f=f+Math.imul(be,Pe)|0,f=f+Math.imul(ve,Le)|0,M=M+Math.imul(ve,Pe)|0,m=m+Math.imul(me,$e)|0,f=f+Math.imul(me,De)|0,f=f+Math.imul(_e,$e)|0,M=M+Math.imul(_e,De)|0,m=m+Math.imul(ee,je)|0,f=f+Math.imul(ee,Be)|0,f=f+Math.imul(he,je)|0,M=M+Math.imul(he,Be)|0,m=m+Math.imul(H,Fe)|0,f=f+Math.imul(H,We)|0,f=f+Math.imul(re,Fe)|0,M=M+Math.imul(re,We)|0,m=m+Math.imul(_,He)|0,f=f+Math.imul(_,Ve)|0,f=f+Math.imul(S,He)|0,M=M+Math.imul(S,Ve)|0,m=m+Math.imul(D,Ue)|0,f=f+Math.imul(D,ze)|0,f=f+Math.imul(V,Ue)|0,M=M+Math.imul(V,ze)|0;var qr=(k+m|0)+((f&8191)<<13)|0;k=(M+(f>>>13)|0)+(qr>>>26)|0,qr&=67108863,m=Math.imul(Me,ke),f=Math.imul(Me,Te),f=f+Math.imul(xe,ke)|0,M=Math.imul(xe,Te),m=m+Math.imul(Se,Oe)|0,f=f+Math.imul(Se,Ne)|0,f=f+Math.imul(Ee,Oe)|0,M=M+Math.imul(Ee,Ne)|0,m=m+Math.imul(ge,Le)|0,f=f+Math.imul(ge,Pe)|0,f=f+Math.imul(de,Le)|0,M=M+Math.imul(de,Pe)|0,m=m+Math.imul(be,$e)|0,f=f+Math.imul(be,De)|0,f=f+Math.imul(ve,$e)|0,M=M+Math.imul(ve,De)|0,m=m+Math.imul(me,je)|0,f=f+Math.imul(me,Be)|0,f=f+Math.imul(_e,je)|0,M=M+Math.imul(_e,Be)|0,m=m+Math.imul(ee,Fe)|0,f=f+Math.imul(ee,We)|0,f=f+Math.imul(he,Fe)|0,M=M+Math.imul(he,We)|0,m=m+Math.imul(H,He)|0,f=f+Math.imul(H,Ve)|0,f=f+Math.imul(re,He)|0,M=M+Math.imul(re,Ve)|0,m=m+Math.imul(_,Ue)|0,f=f+Math.imul(_,ze)|0,f=f+Math.imul(S,Ue)|0,M=M+Math.imul(S,ze)|0;var Gr=(k+m|0)+((f&8191)<<13)|0;k=(M+(f>>>13)|0)+(Gr>>>26)|0,Gr&=67108863,m=Math.imul(Me,Oe),f=Math.imul(Me,Ne),f=f+Math.imul(xe,Oe)|0,M=Math.imul(xe,Ne),m=m+Math.imul(Se,Le)|0,f=f+Math.imul(Se,Pe)|0,f=f+Math.imul(Ee,Le)|0,M=M+Math.imul(Ee,Pe)|0,m=m+Math.imul(ge,$e)|0,f=f+Math.imul(ge,De)|0,f=f+Math.imul(de,$e)|0,M=M+Math.imul(de,De)|0,m=m+Math.imul(be,je)|0,f=f+Math.imul(be,Be)|0,f=f+Math.imul(ve,je)|0,M=M+Math.imul(ve,Be)|0,m=m+Math.imul(me,Fe)|0,f=f+Math.imul(me,We)|0,f=f+Math.imul(_e,Fe)|0,M=M+Math.imul(_e,We)|0,m=m+Math.imul(ee,He)|0,f=f+Math.imul(ee,Ve)|0,f=f+Math.imul(he,He)|0,M=M+Math.imul(he,Ve)|0,m=m+Math.imul(H,Ue)|0,f=f+Math.imul(H,ze)|0,f=f+Math.imul(re,Ue)|0,M=M+Math.imul(re,ze)|0;var Jr=(k+m|0)+((f&8191)<<13)|0;k=(M+(f>>>13)|0)+(Jr>>>26)|0,Jr&=67108863,m=Math.imul(Me,Le),f=Math.imul(Me,Pe),f=f+Math.imul(xe,Le)|0,M=Math.imul(xe,Pe),m=m+Math.imul(Se,$e)|0,f=f+Math.imul(Se,De)|0,f=f+Math.imul(Ee,$e)|0,M=M+Math.imul(Ee,De)|0,m=m+Math.imul(ge,je)|0,f=f+Math.imul(ge,Be)|0,f=f+Math.imul(de,je)|0,M=M+Math.imul(de,Be)|0,m=m+Math.imul(be,Fe)|0,f=f+Math.imul(be,We)|0,f=f+Math.imul(ve,Fe)|0,M=M+Math.imul(ve,We)|0,m=m+Math.imul(me,He)|0,f=f+Math.imul(me,Ve)|0,f=f+Math.imul(_e,He)|0,M=M+Math.imul(_e,Ve)|0,m=m+Math.imul(ee,Ue)|0,f=f+Math.imul(ee,ze)|0,f=f+Math.imul(he,Ue)|0,M=M+Math.imul(he,ze)|0;var Zr=(k+m|0)+((f&8191)<<13)|0;k=(M+(f>>>13)|0)+(Zr>>>26)|0,Zr&=67108863,m=Math.imul(Me,$e),f=Math.imul(Me,De),f=f+Math.imul(xe,$e)|0,M=Math.imul(xe,De),m=m+Math.imul(Se,je)|0,f=f+Math.imul(Se,Be)|0,f=f+Math.imul(Ee,je)|0,M=M+Math.imul(Ee,Be)|0,m=m+Math.imul(ge,Fe)|0,f=f+Math.imul(ge,We)|0,f=f+Math.imul(de,Fe)|0,M=M+Math.imul(de,We)|0,m=m+Math.imul(be,He)|0,f=f+Math.imul(be,Ve)|0,f=f+Math.imul(ve,He)|0,M=M+Math.imul(ve,Ve)|0,m=m+Math.imul(me,Ue)|0,f=f+Math.imul(me,ze)|0,f=f+Math.imul(_e,Ue)|0,M=M+Math.imul(_e,ze)|0;var sa=(k+m|0)+((f&8191)<<13)|0;k=(M+(f>>>13)|0)+(sa>>>26)|0,sa&=67108863,m=Math.imul(Me,je),f=Math.imul(Me,Be),f=f+Math.imul(xe,je)|0,M=Math.imul(xe,Be),m=m+Math.imul(Se,Fe)|0,f=f+Math.imul(Se,We)|0,f=f+Math.imul(Ee,Fe)|0,M=M+Math.imul(Ee,We)|0,m=m+Math.imul(ge,He)|0,f=f+Math.imul(ge,Ve)|0,f=f+Math.imul(de,He)|0,M=M+Math.imul(de,Ve)|0,m=m+Math.imul(be,Ue)|0,f=f+Math.imul(be,ze)|0,f=f+Math.imul(ve,Ue)|0,M=M+Math.imul(ve,ze)|0;var oa=(k+m|0)+((f&8191)<<13)|0;k=(M+(f>>>13)|0)+(oa>>>26)|0,oa&=67108863,m=Math.imul(Me,Fe),f=Math.imul(Me,We),f=f+Math.imul(xe,Fe)|0,M=Math.imul(xe,We),m=m+Math.imul(Se,He)|0,f=f+Math.imul(Se,Ve)|0,f=f+Math.imul(Ee,He)|0,M=M+Math.imul(Ee,Ve)|0,m=m+Math.imul(ge,Ue)|0,f=f+Math.imul(ge,ze)|0,f=f+Math.imul(de,Ue)|0,M=M+Math.imul(de,ze)|0;var aa=(k+m|0)+((f&8191)<<13)|0;k=(M+(f>>>13)|0)+(aa>>>26)|0,aa&=67108863,m=Math.imul(Me,He),f=Math.imul(Me,Ve),f=f+Math.imul(xe,He)|0,M=Math.imul(xe,Ve),m=m+Math.imul(Se,Ue)|0,f=f+Math.imul(Se,ze)|0,f=f+Math.imul(Ee,Ue)|0,M=M+Math.imul(Ee,ze)|0;var ua=(k+m|0)+((f&8191)<<13)|0;k=(M+(f>>>13)|0)+(ua>>>26)|0,ua&=67108863,m=Math.imul(Me,Ue),f=Math.imul(Me,ze),f=f+Math.imul(xe,Ue)|0,M=Math.imul(xe,ze);var ca=(k+m|0)+((f&8191)<<13)|0;return k=(M+(f>>>13)|0)+(ca>>>26)|0,ca&=67108863,C[0]=$r,C[1]=Dr,C[2]=jr,C[3]=Br,C[4]=Fr,C[5]=Wr,C[6]=Hr,C[7]=Vr,C[8]=Ur,C[9]=zr,C[10]=qr,C[11]=Gr,C[12]=Jr,C[13]=Zr,C[14]=sa,C[15]=oa,C[16]=aa,C[17]=ua,C[18]=ca,k!==0&&(C[19]=k,g.length++),g};Math.imul||(I=E);function O(v,u,h){h.negative=u.negative^v.negative,h.length=v.length+u.length;for(var g=0,y=0,w=0;w>>26)|0,y+=C>>>26,C&=67108863}h.words[w]=k,g=C,C=y}return g!==0?h.words[w]=g:h.length--,h._strip()}function $(v,u,h){return O(v,u,h)}s.prototype.mulTo=function(u,h){var g,y=this.length+u.length;return this.length===10&&u.length===10?g=I(this,u,h):y<63?g=E(this,u,h):y<1024?g=O(this,u,h):g=$(this,u,h),g},s.prototype.mul=function(u){var h=new s(null);return h.words=new Array(this.length+u.length),this.mulTo(u,h)},s.prototype.mulf=function(u){var h=new s(null);return h.words=new Array(this.length+u.length),$(this,u,h)},s.prototype.imul=function(u){return this.clone().mulTo(u,this)},s.prototype.imuln=function(u){var h=u<0;h&&(u=-u),n(typeof u=="number"),n(u<67108864);for(var g=0,y=0;y>=26,g+=w/67108864|0,g+=C>>>26,this.words[y]=C&67108863}return g!==0&&(this.words[y]=g,this.length++),h?this.ineg():this},s.prototype.muln=function(u){return this.clone().imuln(u)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(u){var h=N(u);if(h.length===0)return new s(1);for(var g=this,y=0;y=0);var h=u%26,g=(u-h)/26,y=67108863>>>26-h<<26-h,w;if(h!==0){var C=0;for(w=0;w>>26-h}C&&(this.words[w]=C,this.length++)}if(g!==0){for(w=this.length-1;w>=0;w--)this.words[w+g]=this.words[w];for(w=0;w=0);var y;h?y=(h-h%26)/26:y=0;var w=u%26,C=Math.min((u-w)/26,this.length),k=67108863^67108863>>>w<C)for(this.length-=C,f=0;f=0&&(M!==0||f>=y);f--){var U=this.words[f]|0;this.words[f]=M<<26-w|U>>>w,M=U&k}return m&&M!==0&&(m.words[m.length++]=M),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(u,h,g){return n(this.negative===0),this.iushrn(u,h,g)},s.prototype.shln=function(u){return this.clone().ishln(u)},s.prototype.ushln=function(u){return this.clone().iushln(u)},s.prototype.shrn=function(u){return this.clone().ishrn(u)},s.prototype.ushrn=function(u){return this.clone().iushrn(u)},s.prototype.testn=function(u){n(typeof u=="number"&&u>=0);var h=u%26,g=(u-h)/26,y=1<=0);var h=u%26,g=(u-h)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=g)return this;if(h!==0&&g++,this.length=Math.min(g,this.length),h!==0){var y=67108863^67108863>>>h<=67108864;h++)this.words[h]-=67108864,h===this.length-1?this.words[h+1]=1:this.words[h+1]++;return this.length=Math.max(this.length,h+1),this},s.prototype.isubn=function(u){if(n(typeof u=="number"),n(u<67108864),u<0)return this.iaddn(-u);if(this.negative!==0)return this.negative=0,this.iaddn(u),this.negative=1,this;if(this.words[0]-=u,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var h=0;h>26)-(m/67108864|0),this.words[w+g]=C&67108863}for(;w>26,this.words[w+g]=C&67108863;if(k===0)return this._strip();for(n(k===-1),k=0,w=0;w>26,this.words[w]=C&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(u,h){var g=this.length-u.length,y=this.clone(),w=u,C=w.words[w.length-1]|0,k=this._countBits(C);g=26-k,g!==0&&(w=w.ushln(g),y.iushln(g),C=w.words[w.length-1]|0);var m=y.length-w.length,f;if(h!=="mod"){f=new s(null),f.length=m+1,f.words=new Array(f.length);for(var M=0;M=0;q--){var A=(y.words[w.length+q]|0)*67108864+(y.words[w.length+q-1]|0);for(A=Math.min(A/C|0,67108863),y._ishlnsubmul(w,A,q);y.negative!==0;)A--,y.negative=0,y._ishlnsubmul(w,1,q),y.isZero()||(y.negative^=1);f&&(f.words[q]=A)}return f&&f._strip(),y._strip(),h!=="div"&&g!==0&&y.iushrn(g),{div:f||null,mod:y}},s.prototype.divmod=function(u,h,g){if(n(!u.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var y,w,C;return this.negative!==0&&u.negative===0?(C=this.neg().divmod(u,h),h!=="mod"&&(y=C.div.neg()),h!=="div"&&(w=C.mod.neg(),g&&w.negative!==0&&w.iadd(u)),{div:y,mod:w}):this.negative===0&&u.negative!==0?(C=this.divmod(u.neg(),h),h!=="mod"&&(y=C.div.neg()),{div:y,mod:C.mod}):this.negative&u.negative?(C=this.neg().divmod(u.neg(),h),h!=="div"&&(w=C.mod.neg(),g&&w.negative!==0&&w.isub(u)),{div:C.div,mod:w}):u.length>this.length||this.cmp(u)<0?{div:new s(0),mod:this}:u.length===1?h==="div"?{div:this.divn(u.words[0]),mod:null}:h==="mod"?{div:null,mod:new s(this.modrn(u.words[0]))}:{div:this.divn(u.words[0]),mod:new s(this.modrn(u.words[0]))}:this._wordDiv(u,h)},s.prototype.div=function(u){return this.divmod(u,"div",!1).div},s.prototype.mod=function(u){return this.divmod(u,"mod",!1).mod},s.prototype.umod=function(u){return this.divmod(u,"mod",!0).mod},s.prototype.divRound=function(u){var h=this.divmod(u);if(h.mod.isZero())return h.div;var g=h.div.negative!==0?h.mod.isub(u):h.mod,y=u.ushrn(1),w=u.andln(1),C=g.cmp(y);return C<0||w===1&&C===0?h.div:h.div.negative!==0?h.div.isubn(1):h.div.iaddn(1)},s.prototype.modrn=function(u){var h=u<0;h&&(u=-u),n(u<=67108863);for(var g=(1<<26)%u,y=0,w=this.length-1;w>=0;w--)y=(g*y+(this.words[w]|0))%u;return h?-y:y},s.prototype.modn=function(u){return this.modrn(u)},s.prototype.idivn=function(u){var h=u<0;h&&(u=-u),n(u<=67108863);for(var g=0,y=this.length-1;y>=0;y--){var w=(this.words[y]|0)+g*67108864;this.words[y]=w/u|0,g=w%u}return this._strip(),h?this.ineg():this},s.prototype.divn=function(u){return this.clone().idivn(u)},s.prototype.egcd=function(u){n(u.negative===0),n(!u.isZero());var h=this,g=u.clone();h.negative!==0?h=h.umod(u):h=h.clone();for(var y=new s(1),w=new s(0),C=new s(0),k=new s(1),m=0;h.isEven()&&g.isEven();)h.iushrn(1),g.iushrn(1),++m;for(var f=g.clone(),M=h.clone();!h.isZero();){for(var U=0,q=1;!(h.words[0]&q)&&U<26;++U,q<<=1);if(U>0)for(h.iushrn(U);U-- >0;)(y.isOdd()||w.isOdd())&&(y.iadd(f),w.isub(M)),y.iushrn(1),w.iushrn(1);for(var A=0,T=1;!(g.words[0]&T)&&A<26;++A,T<<=1);if(A>0)for(g.iushrn(A);A-- >0;)(C.isOdd()||k.isOdd())&&(C.iadd(f),k.isub(M)),C.iushrn(1),k.iushrn(1);h.cmp(g)>=0?(h.isub(g),y.isub(C),w.isub(k)):(g.isub(h),C.isub(y),k.isub(w))}return{a:C,b:k,gcd:g.iushln(m)}},s.prototype._invmp=function(u){n(u.negative===0),n(!u.isZero());var h=this,g=u.clone();h.negative!==0?h=h.umod(u):h=h.clone();for(var y=new s(1),w=new s(0),C=g.clone();h.cmpn(1)>0&&g.cmpn(1)>0;){for(var k=0,m=1;!(h.words[0]&m)&&k<26;++k,m<<=1);if(k>0)for(h.iushrn(k);k-- >0;)y.isOdd()&&y.iadd(C),y.iushrn(1);for(var f=0,M=1;!(g.words[0]&M)&&f<26;++f,M<<=1);if(f>0)for(g.iushrn(f);f-- >0;)w.isOdd()&&w.iadd(C),w.iushrn(1);h.cmp(g)>=0?(h.isub(g),y.isub(w)):(g.isub(h),w.isub(y))}var U;return h.cmpn(1)===0?U=y:U=w,U.cmpn(0)<0&&U.iadd(u),U},s.prototype.gcd=function(u){if(this.isZero())return u.abs();if(u.isZero())return this.abs();var h=this.clone(),g=u.clone();h.negative=0,g.negative=0;for(var y=0;h.isEven()&&g.isEven();y++)h.iushrn(1),g.iushrn(1);do{for(;h.isEven();)h.iushrn(1);for(;g.isEven();)g.iushrn(1);var w=h.cmp(g);if(w<0){var C=h;h=g,g=C}else if(w===0||g.cmpn(1)===0)break;h.isub(g)}while(!0);return g.iushln(y)},s.prototype.invm=function(u){return this.egcd(u).a.umod(u)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(u){return this.words[0]&u},s.prototype.bincn=function(u){n(typeof u=="number");var h=u%26,g=(u-h)/26,y=1<>>26,k&=67108863,this.words[C]=k}return w!==0&&(this.words[C]=w,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(u){var h=u<0;if(this.negative!==0&&!h)return-1;if(this.negative===0&&h)return 1;this._strip();var g;if(this.length>1)g=1;else{h&&(u=-u),n(u<=67108863,"Number is too big");var y=this.words[0]|0;g=y===u?0:yu.length)return 1;if(this.length=0;g--){var y=this.words[g]|0,w=u.words[g]|0;if(y!==w){yw&&(h=1);break}}return h},s.prototype.gtn=function(u){return this.cmpn(u)===1},s.prototype.gt=function(u){return this.cmp(u)===1},s.prototype.gten=function(u){return this.cmpn(u)>=0},s.prototype.gte=function(u){return this.cmp(u)>=0},s.prototype.ltn=function(u){return this.cmpn(u)===-1},s.prototype.lt=function(u){return this.cmp(u)===-1},s.prototype.lten=function(u){return this.cmpn(u)<=0},s.prototype.lte=function(u){return this.cmp(u)<=0},s.prototype.eqn=function(u){return this.cmpn(u)===0},s.prototype.eq=function(u){return this.cmp(u)===0},s.red=function(u){return new Y(u)},s.prototype.toRed=function(u){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),u.convertTo(this)._forceRed(u)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(u){return this.red=u,this},s.prototype.forceRed=function(u){return n(!this.red,"Already a number in reduction context"),this._forceRed(u)},s.prototype.redAdd=function(u){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,u)},s.prototype.redIAdd=function(u){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,u)},s.prototype.redSub=function(u){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,u)},s.prototype.redISub=function(u){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,u)},s.prototype.redShl=function(u){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,u)},s.prototype.redMul=function(u){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.mul(this,u)},s.prototype.redIMul=function(u){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.imul(this,u)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(u){return n(this.red&&!u.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,u)};var P={k256:null,p224:null,p192:null,p25519:null};function j(v,u){this.name=v,this.p=new s(u,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}j.prototype._tmp=function(){var u=new s(null);return u.words=new Array(Math.ceil(this.n/13)),u},j.prototype.ireduce=function(u){var h=u,g;do this.split(h,this.tmp),h=this.imulK(h),h=h.iadd(this.tmp),g=h.bitLength();while(g>this.n);var y=g0?h.isub(this.p):h.strip!==void 0?h.strip():h._strip(),h},j.prototype.split=function(u,h){u.iushrn(this.n,0,h)},j.prototype.imulK=function(u){return u.imul(this.k)};function G(){j.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(G,j),G.prototype.split=function(u,h){for(var g=4194303,y=Math.min(u.length,9),w=0;w>>22,C=k}C>>>=22,u.words[w-10]=C,C===0&&u.length>10?u.length-=10:u.length-=9},G.prototype.imulK=function(u){u.words[u.length]=0,u.words[u.length+1]=0,u.length+=2;for(var h=0,g=0;g>>=26,u.words[g]=w,h=y}return h!==0&&(u.words[u.length++]=h),u},s._prime=function(u){if(P[u])return P[u];var h;if(u==="k256")h=new G;else if(u==="p224")h=new z;else if(u==="p192")h=new W;else if(u==="p25519")h=new K;else throw new Error("Unknown prime "+u);return P[u]=h,h};function Y(v){if(typeof v=="string"){var u=s._prime(v);this.m=u.p,this.prime=u}else n(v.gtn(1),"modulus must be greater than 1"),this.m=v,this.prime=null}Y.prototype._verify1=function(u){n(u.negative===0,"red works only with positives"),n(u.red,"red works only with red numbers")},Y.prototype._verify2=function(u,h){n((u.negative|h.negative)===0,"red works only with positives"),n(u.red&&u.red===h.red,"red works only with red numbers")},Y.prototype.imod=function(u){return this.prime?this.prime.ireduce(u)._forceRed(this):(d(u,u.umod(this.m)._forceRed(this)),u)},Y.prototype.neg=function(u){return u.isZero()?u.clone():this.m.sub(u)._forceRed(this)},Y.prototype.add=function(u,h){this._verify2(u,h);var g=u.add(h);return g.cmp(this.m)>=0&&g.isub(this.m),g._forceRed(this)},Y.prototype.iadd=function(u,h){this._verify2(u,h);var g=u.iadd(h);return g.cmp(this.m)>=0&&g.isub(this.m),g},Y.prototype.sub=function(u,h){this._verify2(u,h);var g=u.sub(h);return g.cmpn(0)<0&&g.iadd(this.m),g._forceRed(this)},Y.prototype.isub=function(u,h){this._verify2(u,h);var g=u.isub(h);return g.cmpn(0)<0&&g.iadd(this.m),g},Y.prototype.shl=function(u,h){return this._verify1(u),this.imod(u.ushln(h))},Y.prototype.imul=function(u,h){return this._verify2(u,h),this.imod(u.imul(h))},Y.prototype.mul=function(u,h){return this._verify2(u,h),this.imod(u.mul(h))},Y.prototype.isqr=function(u){return this.imul(u,u.clone())},Y.prototype.sqr=function(u){return this.mul(u,u)},Y.prototype.sqrt=function(u){if(u.isZero())return u.clone();var h=this.m.andln(3);if(n(h%2===1),h===3){var g=this.m.add(new s(1)).iushrn(2);return this.pow(u,g)}for(var y=this.m.subn(1),w=0;!y.isZero()&&y.andln(1)===0;)w++,y.iushrn(1);n(!y.isZero());var C=new s(1).toRed(this),k=C.redNeg(),m=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new s(2*f*f).toRed(this);this.pow(f,m).cmp(k)!==0;)f.redIAdd(k);for(var M=this.pow(f,y),U=this.pow(u,y.addn(1).iushrn(1)),q=this.pow(u,y),A=w;q.cmp(C)!==0;){for(var T=q,D=0;T.cmp(C)!==0;D++)T=T.redSqr();n(D=0;w--){for(var M=h.words[w],U=f-1;U>=0;U--){var q=M>>U&1;if(C!==y[0]&&(C=this.sqr(C)),q===0&&k===0){m=0;continue}k<<=1,k|=q,m++,!(m!==g&&(w!==0||U!==0))&&(C=this.mul(C,y[k]),m=0,k=0)}f=26}return C},Y.prototype.convertTo=function(u){var h=u.umod(this.m);return h===u?h.clone():h},Y.prototype.convertFrom=function(u){var h=u.clone();return h.red=null,h},s.mont=function(u){return new X(u)};function X(v){Y.call(this,v),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(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)}i(X,Y),X.prototype.convertTo=function(u){return this.imod(u.ushln(this.shift))},X.prototype.convertFrom=function(u){var h=this.imod(u.mul(this.rinv));return h.red=null,h},X.prototype.imul=function(u,h){if(u.isZero()||h.isZero())return u.words[0]=0,u.length=1,u;var g=u.imul(h),y=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),w=g.isub(y).iushrn(this.shift),C=w;return w.cmp(this.m)>=0?C=w.isub(this.m):w.cmpn(0)<0&&(C=w.iadd(this.m)),C._forceRed(this)},X.prototype.mul=function(u,h){if(u.isZero()||h.isZero())return new s(0)._forceRed(this);var g=u.mul(h),y=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),w=g.isub(y).iushrn(this.shift),C=w;return w.cmp(this.m)>=0?C=w.isub(this.m):w.cmpn(0)<0&&(C=w.iadd(this.m)),C._forceRed(this)},X.prototype.invm=function(u){var h=this.imod(u._invmp(this.m).mul(this.r2));return h._forceRed(this)}})(t,J)})(Mu);var Xs=Mu.exports,xu={},Bi={},eo={};Object.defineProperty(eo,"__esModule",{value:!0});eo.walletLogo=void 0;const A0=(t,e)=>{let r;switch(t){case"standard":return r=e,`data:image/svg+xml,%3Csvg width='${e}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;case"circle":return r=e,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${e}' height='${r}' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E`;case"text":return r=(.1*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogo":return r=(.25*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;case"textLight":return r=(.1*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogoLight":return r=(.25*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;default:return r=e,`data:image/svg+xml,%3Csvg width='${e}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `}};eo.walletLogo=A0;var to={};Object.defineProperty(to,"__esModule",{value:!0});to.LINK_API_URL=void 0;to.LINK_API_URL="https://www.walletlink.org";var ro={};Object.defineProperty(ro,"__esModule",{value:!0});ro.ScopedLocalStorage=void 0;class k0{constructor(e){this.scope=e}setItem(e,r){localStorage.setItem(this.scopedKey(e),r)}getItem(e){return localStorage.getItem(this.scopedKey(e))}removeItem(e){localStorage.removeItem(this.scopedKey(e))}clear(){const e=this.scopedKey(""),r=[];for(let n=0;nlocalStorage.removeItem(n))}scopedKey(e){return`${this.scope}:${e}`}}ro.ScopedLocalStorage=k0;var Qn={},pn={};Object.defineProperty(pn,"__esModule",{value:!0});const T0=Eu;function Pc(t,e,r){try{Reflect.apply(t,e,r)}catch(n){setTimeout(()=>{throw n})}}function O0(t){const e=t.length,r=new Array(e);for(let n=0;n0&&([o]=r),o instanceof Error)throw o;const a=new Error(`Unhandled error.${o?` (${o.message})`:""}`);throw a.context=o,a}const s=i[e];if(s===void 0)return!1;if(typeof s=="function")Pc(s,this,r);else{const o=s.length,a=O0(s);for(let c=0;c"u"&&(n=eh()),Ya(t,"",0,[],void 0,0,n);var i;try{nn.length===0?i=JSON.stringify(t,e,r):i=JSON.stringify(t,rh(e),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;cn.length!==0;){var s=cn.pop();s.length===4?Object.defineProperty(s[0],s[1],s[3]):s[0][s[1]]=s[2]}}return i}function Un(t,e,r,n){var i=Object.getOwnPropertyDescriptor(n,r);i.get!==void 0?i.configurable?(Object.defineProperty(n,r,{value:t}),cn.push([n,r,e,i])):nn.push([e,r,t]):(n[r]=t,cn.push([n,r,e]))}function Ya(t,e,r,n,i,s,o){s+=1;var a;if(typeof t=="object"&&t!==null){for(a=0;ao.depthLimit){Un($s,t,e,i);return}if(typeof o.edgesLimit<"u"&&r+1>o.edgesLimit){Un($s,t,e,i);return}if(n.push(t),Array.isArray(t))for(a=0;ae?1:0}function th(t,e,r,n){typeof n>"u"&&(n=eh());var i=Ka(t,"",0,[],void 0,0,n)||t,s;try{nn.length===0?s=JSON.stringify(i,e,r):s=JSON.stringify(i,rh(e),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;cn.length!==0;){var o=cn.pop();o.length===4?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}}return s}function Ka(t,e,r,n,i,s,o){s+=1;var a;if(typeof t=="object"&&t!==null){for(a=0;ao.depthLimit){Un($s,t,e,i);return}if(typeof o.edgesLimit<"u"&&r+1>o.edgesLimit){Un($s,t,e,i);return}if(n.push(t),Array.isArray(t))for(a=0;a0)for(var n=0;n=1e3&&t<=4999}function j0(t,e){if(e!=="[Circular]")return e}var Cu={},Ir={};Object.defineProperty(Ir,"__esModule",{value:!0});Ir.errorValues=Ir.errorCodes=void 0;Ir.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}};Ir.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(t){Object.defineProperty(t,"__esModule",{value:!0}),t.serializeError=t.isValidCode=t.getMessageFromCode=t.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const e=Ir,r=Rr,n=e.errorCodes.rpc.internal,i="Unspecified error message. This is a bug, please report it.",s={code:n,message:o(n)};t.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function o(b,x=i){if(Number.isInteger(b)){const R=b.toString();if(p(e.errorValues,R))return e.errorValues[R].message;if(l(b))return t.JSON_RPC_SERVER_ERROR_MESSAGE}return x}t.getMessageFromCode=o;function a(b){if(!Number.isInteger(b))return!1;const x=b.toString();return!!(e.errorValues[x]||l(b))}t.isValidCode=a;function c(b,{fallbackError:x=s,shouldIncludeStack:R=!1}={}){var L,N;if(!x||!Number.isInteger(x.code)||typeof x.message!="string")throw new Error("Must provide fallback error with integer number code and string message.");if(b instanceof r.EthereumRpcError)return b.serialize();const E={};if(b&&typeof b=="object"&&!Array.isArray(b)&&p(b,"code")&&a(b.code)){const O=b;E.code=O.code,O.message&&typeof O.message=="string"?(E.message=O.message,p(O,"data")&&(E.data=O.data)):(E.message=o(E.code),E.data={originalError:d(b)})}else{E.code=x.code;const O=(L=b)===null||L===void 0?void 0:L.message;E.message=O&&typeof O=="string"?O:x.message,E.data={originalError:d(b)}}const I=(N=b)===null||N===void 0?void 0:N.stack;return R&&b&&I&&typeof I=="string"&&(E.stack=I),E}t.serializeError=c;function l(b){return b>=-32099&&b<=-32e3}function d(b){return b&&typeof b=="object"&&!Array.isArray(b)?Object.assign({},b):b}function p(b,x){return Object.prototype.hasOwnProperty.call(b,x)}})(Cu);var no={};Object.defineProperty(no,"__esModule",{value:!0});no.ethErrors=void 0;const Ru=Rr,ih=Cu,ht=Ir;no.ethErrors={rpc:{parse:t=>At(ht.errorCodes.rpc.parse,t),invalidRequest:t=>At(ht.errorCodes.rpc.invalidRequest,t),invalidParams:t=>At(ht.errorCodes.rpc.invalidParams,t),methodNotFound:t=>At(ht.errorCodes.rpc.methodNotFound,t),internal:t=>At(ht.errorCodes.rpc.internal,t),server:t=>{if(!t||typeof t!="object"||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return At(e,t)},invalidInput:t=>At(ht.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>At(ht.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>At(ht.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>At(ht.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>At(ht.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>At(ht.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>Mi(ht.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>Mi(ht.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>Mi(ht.errorCodes.provider.unsupportedMethod,t),disconnected:t=>Mi(ht.errorCodes.provider.disconnected,t),chainDisconnected:t=>Mi(ht.errorCodes.provider.chainDisconnected,t),custom:t=>{if(!t||typeof t!="object"||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:r,data:n}=t;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new Ru.EthereumProviderError(e,r,n)}}};function At(t,e){const[r,n]=sh(e);return new Ru.EthereumRpcError(t,r||ih.getMessageFromCode(t),n)}function Mi(t,e){const[r,n]=sh(e);return new Ru.EthereumProviderError(t,r||ih.getMessageFromCode(t),n)}function sh(t){if(t){if(typeof t=="string")return[t];if(typeof t=="object"&&!Array.isArray(t)){const{message:e,data:r}=t;if(e&&typeof e!="string")throw new Error("Must specify string message.");return[e||void 0,r]}}return[]}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getMessageFromCode=t.serializeError=t.EthereumProviderError=t.EthereumRpcError=t.ethErrors=t.errorCodes=void 0;const e=Rr;Object.defineProperty(t,"EthereumRpcError",{enumerable:!0,get:function(){return e.EthereumRpcError}}),Object.defineProperty(t,"EthereumProviderError",{enumerable:!0,get:function(){return e.EthereumProviderError}});const r=Cu;Object.defineProperty(t,"serializeError",{enumerable:!0,get:function(){return r.serializeError}}),Object.defineProperty(t,"getMessageFromCode",{enumerable:!0,get:function(){return r.getMessageFromCode}});const n=no;Object.defineProperty(t,"ethErrors",{enumerable:!0,get:function(){return n.ethErrors}});const i=Ir;Object.defineProperty(t,"errorCodes",{enumerable:!0,get:function(){return i.errorCodes}})})(Yf);var we={},io={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Web3Method=void 0,function(e){e.requestEthereumAccounts="requestEthereumAccounts",e.signEthereumMessage="signEthereumMessage",e.signEthereumTransaction="signEthereumTransaction",e.submitEthereumTransaction="submitEthereumTransaction",e.ethereumAddressFromSignedMessage="ethereumAddressFromSignedMessage",e.scanQRCode="scanQRCode",e.generic="generic",e.childRequestEthereumAccounts="childRequestEthereumAccounts",e.addEthereumChain="addEthereumChain",e.switchEthereumChain="switchEthereumChain",e.makeEthereumJSONRPCRequest="makeEthereumJSONRPCRequest",e.watchAsset="watchAsset",e.selectProvider="selectProvider"}(t.Web3Method||(t.Web3Method={}))})(io);Object.defineProperty(we,"__esModule",{value:!0});we.EthereumAddressFromSignedMessageResponse=we.SubmitEthereumTransactionResponse=we.SignEthereumTransactionResponse=we.SignEthereumMessageResponse=we.isRequestEthereumAccountsResponse=we.SelectProviderResponse=we.WatchAssetReponse=we.RequestEthereumAccountsResponse=we.SwitchEthereumChainResponse=we.AddEthereumChainResponse=we.isErrorResponse=void 0;const ur=io;function B0(t){var e,r;return((e=t)===null||e===void 0?void 0:e.method)!==void 0&&((r=t)===null||r===void 0?void 0:r.errorMessage)!==void 0}we.isErrorResponse=B0;function F0(t){return{method:ur.Web3Method.addEthereumChain,result:t}}we.AddEthereumChainResponse=F0;function W0(t){return{method:ur.Web3Method.switchEthereumChain,result:t}}we.SwitchEthereumChainResponse=W0;function H0(t){return{method:ur.Web3Method.requestEthereumAccounts,result:t}}we.RequestEthereumAccountsResponse=H0;function V0(t){return{method:ur.Web3Method.watchAsset,result:t}}we.WatchAssetReponse=V0;function U0(t){return{method:ur.Web3Method.selectProvider,result:t}}we.SelectProviderResponse=U0;function z0(t){return t&&t.method===ur.Web3Method.requestEthereumAccounts}we.isRequestEthereumAccountsResponse=z0;function q0(t){return{method:ur.Web3Method.signEthereumMessage,result:t}}we.SignEthereumMessageResponse=q0;function G0(t){return{method:ur.Web3Method.signEthereumTransaction,result:t}}we.SignEthereumTransactionResponse=G0;function J0(t){return{method:ur.Web3Method.submitEthereumTransaction,result:t}}we.SubmitEthereumTransactionResponse=J0;function Z0(t){return{method:ur.Web3Method.ethereumAddressFromSignedMessage,result:t}}we.EthereumAddressFromSignedMessageResponse=Z0;var hi={};Object.defineProperty(hi,"__esModule",{value:!0});hi.LIB_VERSION=void 0;hi.LIB_VERSION="3.7.2";(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCode=t.serializeError=t.standardErrors=t.standardErrorMessage=t.standardErrorCodes=void 0;const e=Yf,r=we,n=hi;t.standardErrorCodes=Object.freeze(Object.assign(Object.assign({},e.errorCodes),{provider:Object.freeze(Object.assign(Object.assign({},e.errorCodes.provider),{unsupportedChain:4902}))}));function i(d){return d!==void 0?(0,e.getMessageFromCode)(d):"Unknown error"}t.standardErrorMessage=i,t.standardErrors=Object.freeze(Object.assign(Object.assign({},e.ethErrors),{provider:Object.freeze(Object.assign(Object.assign({},e.ethErrors.provider),{unsupportedChain:(d="")=>e.ethErrors.provider.custom({code:t.standardErrorCodes.provider.unsupportedChain,message:`Unrecognized chain ID ${d}. Try adding the chain using wallet_addEthereumChain first.`})}))}));function s(d,p){const b=(0,e.serializeError)(o(d),{shouldIncludeStack:!0}),x=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");x.searchParams.set("version",n.LIB_VERSION),x.searchParams.set("code",b.code.toString());const R=a(b.data,p);return R&&x.searchParams.set("method",R),x.searchParams.set("message",b.message),Object.assign(Object.assign({},b),{docUrl:x.href})}t.serializeError=s;function o(d){return typeof d=="string"?{message:d,code:t.standardErrorCodes.rpc.internal}:(0,r.isErrorResponse)(d)?Object.assign(Object.assign({},d),{message:d.errorMessage,code:d.errorCode,data:{method:d.method,result:d.result}}):d}function a(d,p){var b;const x=(b=d)===null||b===void 0?void 0:b.method;if(x)return x;if(p!==void 0)return typeof p=="string"?p:Array.isArray(p)?p.length>0?p[0].method:void 0:p.method}function c(d){var p;if(typeof d=="number")return d;if(l(d))return(p=d.code)!==null&&p!==void 0?p:d.errorCode}t.getErrorCode=c;function l(d){return typeof d=="object"&&d!==null&&(typeof d.code=="number"||typeof d.errorCode=="number")}})(qi);var di={},oh={exports:{}},Xa={exports:{}};typeof Object.create=="function"?Xa.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Xa.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}};var qt=Xa.exports,eu={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh */(function(t,e){var r=Ks,n=r.Buffer;function i(o,a){for(var c in o)a[c]=o[c]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(i(r,e),e.Buffer=s);function s(o,a,c){return n(o,a,c)}s.prototype=Object.create(n.prototype),i(n,s),s.from=function(o,a,c){if(typeof o=="number")throw new TypeError("Argument must not be a number");return n(o,a,c)},s.alloc=function(o,a,c){if(typeof o!="number")throw new TypeError("Argument must be a number");var l=n(o);return a!==void 0?typeof c=="string"?l.fill(a,c):l.fill(a):l.fill(0),l},s.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return n(o)},s.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(o)}})(eu,eu.exports);var Lr=eu.exports,ah=Lr.Buffer;function so(t,e){this._block=ah.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}so.prototype.update=function(t,e){typeof t=="string"&&(e=e||"utf8",t=ah.from(t,e));for(var r=this._block,n=this._blockSize,i=t.length,s=this._len,o=0;o=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=this._len*8;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(r&4294967295)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var s=this._hash();return t?s.toString(t):s};so.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var pi=so,Q0=qt,uh=pi,Y0=Lr.Buffer,K0=[1518500249,1859775393,-1894007588,-899497514],X0=new Array(80);function Gi(){this.init(),this._w=X0,uh.call(this,64,56)}Q0(Gi,uh);Gi.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function eg(t){return t<<5|t>>>27}function tg(t){return t<<30|t>>>2}function rg(t,e,r,n){return t===0?e&r|~e&n:t===2?e&r|e&n|r&n:e^r^n}Gi.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,i=this._c|0,s=this._d|0,o=this._e|0,a=0;a<16;++a)e[a]=t.readInt32BE(a*4);for(;a<80;++a)e[a]=e[a-3]^e[a-8]^e[a-14]^e[a-16];for(var c=0;c<80;++c){var l=~~(c/20),d=eg(r)+rg(l,n,i,s)+o+e[c]+K0[l]|0;o=s,s=i,i=tg(n),n=r,r=d}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=o+this._e|0};Gi.prototype._hash=function(){var t=Y0.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};var ng=Gi,ig=qt,ch=pi,sg=Lr.Buffer,og=[1518500249,1859775393,-1894007588,-899497514],ag=new Array(80);function Ji(){this.init(),this._w=ag,ch.call(this,64,56)}ig(Ji,ch);Ji.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function ug(t){return t<<1|t>>>31}function cg(t){return t<<5|t>>>27}function lg(t){return t<<30|t>>>2}function fg(t,e,r,n){return t===0?e&r|~e&n:t===2?e&r|e&n|r&n:e^r^n}Ji.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,i=this._c|0,s=this._d|0,o=this._e|0,a=0;a<16;++a)e[a]=t.readInt32BE(a*4);for(;a<80;++a)e[a]=ug(e[a-3]^e[a-8]^e[a-14]^e[a-16]);for(var c=0;c<80;++c){var l=~~(c/20),d=cg(r)+fg(l,n,i,s)+o+e[c]+og[l]|0;o=s,s=i,i=lg(n),n=r,r=d}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=o+this._e|0};Ji.prototype._hash=function(){var t=sg.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};var hg=Ji,dg=qt,lh=pi,pg=Lr.Buffer,gg=[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],bg=new Array(64);function Zi(){this.init(),this._w=bg,lh.call(this,64,56)}dg(Zi,lh);Zi.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};function vg(t,e,r){return r^t&(e^r)}function yg(t,e,r){return t&e|r&(t|e)}function mg(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function wg(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function _g(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function Sg(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}Zi.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,i=this._c|0,s=this._d|0,o=this._e|0,a=this._f|0,c=this._g|0,l=this._h|0,d=0;d<16;++d)e[d]=t.readInt32BE(d*4);for(;d<64;++d)e[d]=Sg(e[d-2])+e[d-7]+_g(e[d-15])+e[d-16]|0;for(var p=0;p<64;++p){var b=l+wg(o)+vg(o,a,c)+gg[p]+e[p]|0,x=mg(r)+yg(r,n,i)|0;l=c,c=a,a=o,o=s+b|0,s=i,i=n,n=r,r=b+x|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=o+this._e|0,this._f=a+this._f|0,this._g=c+this._g|0,this._h=l+this._h|0};Zi.prototype._hash=function(){var t=pg.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t};var fh=Zi,Eg=qt,Mg=fh,xg=pi,Cg=Lr.Buffer,Rg=new Array(64);function oo(){this.init(),this._w=Rg,xg.call(this,64,56)}Eg(oo,Mg);oo.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};oo.prototype._hash=function(){var t=Cg.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};var Ig=oo,Ag=qt,hh=pi,kg=Lr.Buffer,$c=[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],Tg=new Array(160);function Qi(){this.init(),this._w=Tg,hh.call(this,128,112)}Ag(Qi,hh);Qi.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};function Dc(t,e,r){return r^t&(e^r)}function jc(t,e,r){return t&e|r&(t|e)}function Bc(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function Fc(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function Og(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function Ng(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function Lg(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function Pg(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function nt(t,e){return t>>>0>>0?1:0}Qi.prototype._update=function(t){for(var e=this._w,r=this._ah|0,n=this._bh|0,i=this._ch|0,s=this._dh|0,o=this._eh|0,a=this._fh|0,c=this._gh|0,l=this._hh|0,d=this._al|0,p=this._bl|0,b=this._cl|0,x=this._dl|0,R=this._el|0,L=this._fl|0,N=this._gl|0,E=this._hl|0,I=0;I<32;I+=2)e[I]=t.readInt32BE(I*4),e[I+1]=t.readInt32BE(I*4+4);for(;I<160;I+=2){var O=e[I-30],$=e[I-15*2+1],P=Og(O,$),j=Ng($,O);O=e[I-2*2],$=e[I-2*2+1];var G=Lg(O,$),z=Pg($,O),W=e[I-7*2],K=e[I-7*2+1],Y=e[I-16*2],X=e[I-16*2+1],v=j+K|0,u=P+W+nt(v,j)|0;v=v+z|0,u=u+G+nt(v,z)|0,v=v+X|0,u=u+Y+nt(v,X)|0,e[I]=u,e[I+1]=v}for(var h=0;h<160;h+=2){u=e[h],v=e[h+1];var g=jc(r,n,i),y=jc(d,p,b),w=Bc(r,d),C=Bc(d,r),k=Fc(o,R),m=Fc(R,o),f=$c[h],M=$c[h+1],U=Dc(o,a,c),q=Dc(R,L,N),A=E+m|0,T=l+k+nt(A,E)|0;A=A+q|0,T=T+U+nt(A,q)|0,A=A+M|0,T=T+f+nt(A,M)|0,A=A+v|0,T=T+u+nt(A,v)|0;var D=C+y|0,V=w+g+nt(D,C)|0;l=c,E=N,c=a,N=L,a=o,L=R,R=x+A|0,o=s+T+nt(R,x)|0,s=i,x=b,i=n,b=p,n=r,p=d,d=A+D|0,r=T+V+nt(d,A)|0}this._al=this._al+d|0,this._bl=this._bl+p|0,this._cl=this._cl+b|0,this._dl=this._dl+x|0,this._el=this._el+R|0,this._fl=this._fl+L|0,this._gl=this._gl+N|0,this._hl=this._hl+E|0,this._ah=this._ah+r+nt(this._al,d)|0,this._bh=this._bh+n+nt(this._bl,p)|0,this._ch=this._ch+i+nt(this._cl,b)|0,this._dh=this._dh+s+nt(this._dl,x)|0,this._eh=this._eh+o+nt(this._el,R)|0,this._fh=this._fh+a+nt(this._fl,L)|0,this._gh=this._gh+c+nt(this._gl,N)|0,this._hh=this._hh+l+nt(this._hl,E)|0};Qi.prototype._hash=function(){var t=kg.allocUnsafe(64);function e(r,n,i){t.writeInt32BE(r,i),t.writeInt32BE(n,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t};var dh=Qi,$g=qt,Dg=dh,jg=pi,Bg=Lr.Buffer,Fg=new Array(160);function ao(){this.init(),this._w=Fg,jg.call(this,128,112)}$g(ao,Dg);ao.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};ao.prototype._hash=function(){var t=Bg.allocUnsafe(48);function e(r,n,i){t.writeInt32BE(r,i),t.writeInt32BE(n,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t};var Wg=ao,gn=oh.exports=function(e){e=e.toLowerCase();var r=gn[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r};gn.sha=ng;gn.sha1=hg;gn.sha224=Ig;gn.sha256=fh;gn.sha384=Wg;gn.sha512=dh;var Hg=oh.exports,Z={},Vg=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[r]=i;for(r in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var s=Object.getOwnPropertySymbols(e);if(s.length!==1||s[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,r);if(o.value!==i||o.enumerable!==!0)return!1}return!0},Wc=typeof Symbol<"u"&&Symbol,Ug=Vg,zg=function(){return typeof Wc!="function"||typeof Symbol!="function"||typeof Wc("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Ug()},Hc={foo:{}},qg=Object,Gg=function(){return{__proto__:Hc}.foo===Hc.foo&&!({__proto__:null}instanceof qg)},Jg="Function.prototype.bind called on incompatible ",Zg=Object.prototype.toString,Qg=Math.max,Yg="[object Function]",Vc=function(e,r){for(var n=[],i=0;i"u"||!ot?ce:ot(Uint8Array),un={"%AggregateError%":typeof AggregateError>"u"?ce:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ce:ArrayBuffer,"%ArrayIteratorPrototype%":Nn&&ot?ot([][Symbol.iterator]()):ce,"%AsyncFromSyncIteratorPrototype%":ce,"%AsyncFunction%":Fn,"%AsyncGenerator%":Fn,"%AsyncGeneratorFunction%":Fn,"%AsyncIteratorPrototype%":Fn,"%Atomics%":typeof Atomics>"u"?ce:Atomics,"%BigInt%":typeof BigInt>"u"?ce:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ce:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ce:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ce:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?ce:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ce:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ce:FinalizationRegistry,"%Function%":ph,"%GeneratorFunction%":Fn,"%Int8Array%":typeof Int8Array>"u"?ce:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ce:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ce:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Nn&&ot?ot(ot([][Symbol.iterator]())):ce,"%JSON%":typeof JSON=="object"?JSON:ce,"%Map%":typeof Map>"u"?ce:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Nn||!ot?ce:ot(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ce:Promise,"%Proxy%":typeof Proxy>"u"?ce:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?ce:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ce:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Nn||!ot?ce:ot(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ce:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Nn&&ot?ot(""[Symbol.iterator]()):ce,"%Symbol%":Nn?Symbol:ce,"%SyntaxError%":Yn,"%ThrowTypeError%":ob,"%TypedArray%":ub,"%TypeError%":zn,"%Uint8Array%":typeof Uint8Array>"u"?ce:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ce:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ce:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ce:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?ce:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ce:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ce:WeakSet};if(ot)try{null.error}catch(t){var cb=ot(ot(t));un["%Error.prototype%"]=cb}var lb=function t(e){var r;if(e==="%AsyncFunction%")r=la("async function () {}");else if(e==="%GeneratorFunction%")r=la("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=la("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&ot&&(r=ot(i.prototype))}return un[e]=r,r},Uc={"%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"]},Yi=Iu,Ds=sb,fb=Yi.call(Function.call,Array.prototype.concat),hb=Yi.call(Function.apply,Array.prototype.splice),zc=Yi.call(Function.call,String.prototype.replace),js=Yi.call(Function.call,String.prototype.slice),db=Yi.call(Function.call,RegExp.prototype.exec),pb=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,gb=/\\(\\)?/g,bb=function(e){var r=js(e,0,1),n=js(e,-1);if(r==="%"&&n!=="%")throw new Yn("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Yn("invalid intrinsic syntax, expected opening `%`");var i=[];return zc(e,pb,function(s,o,a,c){i[i.length]=a?zc(c,gb,"$1"):o||s}),i},vb=function(e,r){var n=e,i;if(Ds(Uc,n)&&(i=Uc[n],n="%"+i[0]+"%"),Ds(un,n)){var s=un[n];if(s===Fn&&(s=lb(n)),typeof s>"u"&&!r)throw new zn("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:s}}throw new Yn("intrinsic "+e+" does not exist!")},bn=function(e,r){if(typeof e!="string"||e.length===0)throw new zn("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new zn('"allowMissing" argument must be a boolean');if(db(/^%?[^%]*%?$/,e)===null)throw new Yn("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=bb(e),i=n.length>0?n[0]:"",s=vb("%"+i+"%",r),o=s.name,a=s.value,c=!1,l=s.alias;l&&(i=l[0],hb(n,fb([0,1],l)));for(var d=1,p=!0;d=n.length){var L=an(a,b);p=!!L,p&&"get"in L&&!("originalValue"in L.get)?a=L.get:a=a[b]}else p=Ds(a,b),a=a[b];p&&!c&&(un[o]=a)}}return a},gh={exports:{}},yb=bn,tu=yb("%Object.defineProperty%",!0),ru=function(){if(tu)try{return tu({},"a",{value:1}),!0}catch{return!1}return!1};ru.hasArrayLengthDefineBug=function(){if(!ru())return null;try{return tu([],"length",{value:1}).length!==1}catch{return!0}};var bh=ru,mb=bn,Ts=mb("%Object.getOwnPropertyDescriptor%",!0);if(Ts)try{Ts([],"length")}catch{Ts=null}var vh=Ts,wb=bh(),Au=bn,Oi=wb&&Au("%Object.defineProperty%",!0);if(Oi)try{Oi({},"a",{value:1})}catch{Oi=!1}var _b=Au("%SyntaxError%"),Ln=Au("%TypeError%"),qc=vh,Sb=function(e,r,n){if(!e||typeof e!="object"&&typeof e!="function")throw new Ln("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new Ln("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Ln("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Ln("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Ln("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Ln("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,c=!!qc&&qc(e,r);if(Oi)Oi(e,r,{configurable:o===null&&c?c.configurable:!o,enumerable:i===null&&c?c.enumerable:!i,value:n,writable:s===null&&c?c.writable:!s});else if(a||!i&&!s&&!o)e[r]=n;else throw new _b("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},yh=bn,Gc=Sb,Eb=bh(),Jc=vh,Zc=yh("%TypeError%"),Mb=yh("%Math.floor%"),xb=function(e,r){if(typeof e!="function")throw new Zc("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||Mb(r)!==r)throw new Zc("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,s=!0;if("length"in e&&Jc){var o=Jc(e,"length");o&&!o.configurable&&(i=!1),o&&!o.writable&&(s=!1)}return(i||s||!n)&&(Eb?Gc(e,"length",r,!0,!0):Gc(e,"length",r)),e};(function(t){var e=Iu,r=bn,n=xb,i=r("%TypeError%"),s=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),a=r("%Reflect.apply%",!0)||e.call(o,s),c=r("%Object.defineProperty%",!0),l=r("%Math.max%");if(c)try{c({},"a",{value:1})}catch{c=null}t.exports=function(b){if(typeof b!="function")throw new i("a function is required");var x=a(e,o,arguments);return n(x,1+l(0,b.length-(arguments.length-1)),!0)};var d=function(){return a(e,s,arguments)};c?c(t.exports,"apply",{value:d}):t.exports.apply=d})(gh);var Cb=gh.exports,mh=bn,wh=Cb,Rb=wh(mh("String.prototype.indexOf")),Ib=function(e,r){var n=mh(e,!!r);return typeof n=="function"&&Rb(e,".prototype.")>-1?wh(n):n},ku=typeof Map=="function"&&Map.prototype,ha=Object.getOwnPropertyDescriptor&&ku?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Bs=ku&&ha&&typeof ha.get=="function"?ha.get:null,Qc=ku&&Map.prototype.forEach,Tu=typeof Set=="function"&&Set.prototype,da=Object.getOwnPropertyDescriptor&&Tu?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Fs=Tu&&da&&typeof da.get=="function"?da.get:null,Yc=Tu&&Set.prototype.forEach,Ab=typeof WeakMap=="function"&&WeakMap.prototype,Ni=Ab?WeakMap.prototype.has:null,kb=typeof WeakSet=="function"&&WeakSet.prototype,Li=kb?WeakSet.prototype.has:null,Tb=typeof WeakRef=="function"&&WeakRef.prototype,Kc=Tb?WeakRef.prototype.deref:null,Ob=Boolean.prototype.valueOf,Nb=Object.prototype.toString,Lb=Function.prototype.toString,Pb=String.prototype.match,Ou=String.prototype.slice,xr=String.prototype.replace,$b=String.prototype.toUpperCase,Xc=String.prototype.toLowerCase,_h=RegExp.prototype.test,el=Array.prototype.concat,rr=Array.prototype.join,Db=Array.prototype.slice,tl=Math.floor,nu=typeof BigInt=="function"?BigInt.prototype.valueOf:null,pa=Object.getOwnPropertySymbols,iu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Kn=typeof Symbol=="function"&&typeof Symbol.iterator=="object",bt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Kn||"symbol")?Symbol.toStringTag:null,Sh=Object.prototype.propertyIsEnumerable,rl=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function nl(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||_h.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-tl(-t):tl(t);if(n!==t){var i=String(n),s=Ou.call(e,i.length+1);return xr.call(i,r,"$&_")+"."+xr.call(xr.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return xr.call(e,r,"$&_")}var su=Ys,il=su.custom,sl=Mh(il)?il:null,jb=function t(e,r,n,i){var s=r||{};if(Sr(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Sr(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=Sr(s,"customInspect")?s.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Sr(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Sr(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=s.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return Ch(e,s);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var c=String(e);return a?nl(e,c):c}if(typeof e=="bigint"){var l=String(e)+"n";return a?nl(e,l):l}var d=typeof s.depth>"u"?5:s.depth;if(typeof n>"u"&&(n=0),n>=d&&d>0&&typeof e=="object")return ou(e)?"[Array]":"[Object]";var p=rv(s,n);if(typeof i>"u")i=[];else if(xh(i,e)>=0)return"[Circular]";function b(v,u,h){if(u&&(i=Db.call(i),i.push(u)),h){var g={depth:s.depth};return Sr(s,"quoteStyle")&&(g.quoteStyle=s.quoteStyle),t(v,g,n+1,i)}return t(v,s,n+1,i)}if(typeof e=="function"&&!ol(e)){var x=Gb(e),R=bs(e,b);return"[Function"+(x?": "+x:" (anonymous)")+"]"+(R.length>0?" { "+rr.call(R,", ")+" }":"")}if(Mh(e)){var L=Kn?xr.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):iu.call(e);return typeof e=="object"&&!Kn?xi(L):L}if(Xb(e)){for(var N="<"+Xc.call(String(e.nodeName)),E=e.attributes||[],I=0;I",N}if(ou(e)){if(e.length===0)return"[]";var O=bs(e,b);return p&&!tv(O)?"["+au(O,p)+"]":"[ "+rr.call(O,", ")+" ]"}if(Wb(e)){var $=bs(e,b);return!("cause"in Error.prototype)&&"cause"in e&&!Sh.call(e,"cause")?"{ ["+String(e)+"] "+rr.call(el.call("[cause]: "+b(e.cause),$),", ")+" }":$.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+rr.call($,", ")+" }"}if(typeof e=="object"&&o){if(sl&&typeof e[sl]=="function"&&su)return su(e,{depth:d-n});if(o!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(Jb(e)){var P=[];return Qc&&Qc.call(e,function(v,u){P.push(b(u,e,!0)+" => "+b(v,e))}),al("Map",Bs.call(e),P,p)}if(Yb(e)){var j=[];return Yc&&Yc.call(e,function(v){j.push(b(v,e))}),al("Set",Fs.call(e),j,p)}if(Zb(e))return ga("WeakMap");if(Kb(e))return ga("WeakSet");if(Qb(e))return ga("WeakRef");if(Vb(e))return xi(b(Number(e)));if(zb(e))return xi(b(nu.call(e)));if(Ub(e))return xi(Ob.call(e));if(Hb(e))return xi(b(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(e===J)return"{ [object globalThis] }";if(!Fb(e)&&!ol(e)){var G=bs(e,b),z=rl?rl(e)===Object.prototype:e instanceof Object||e.constructor===Object,W=e instanceof Object?"":"null prototype",K=!z&&bt&&Object(e)===e&&bt in e?Ou.call(Pr(e),8,-1):W?"Object":"",Y=z||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",X=Y+(K||W?"["+rr.call(el.call([],K||[],W||[]),": ")+"] ":"");return G.length===0?X+"{}":p?X+"{"+au(G,p)+"}":X+"{ "+rr.call(G,", ")+" }"}return String(e)};function Eh(t,e,r){var n=(r.quoteStyle||e)==="double"?'"':"'";return n+t+n}function Bb(t){return xr.call(String(t),/"/g,""")}function ou(t){return Pr(t)==="[object Array]"&&(!bt||!(typeof t=="object"&&bt in t))}function Fb(t){return Pr(t)==="[object Date]"&&(!bt||!(typeof t=="object"&&bt in t))}function ol(t){return Pr(t)==="[object RegExp]"&&(!bt||!(typeof t=="object"&&bt in t))}function Wb(t){return Pr(t)==="[object Error]"&&(!bt||!(typeof t=="object"&&bt in t))}function Hb(t){return Pr(t)==="[object String]"&&(!bt||!(typeof t=="object"&&bt in t))}function Vb(t){return Pr(t)==="[object Number]"&&(!bt||!(typeof t=="object"&&bt in t))}function Ub(t){return Pr(t)==="[object Boolean]"&&(!bt||!(typeof t=="object"&&bt in t))}function Mh(t){if(Kn)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!iu)return!1;try{return iu.call(t),!0}catch{}return!1}function zb(t){if(!t||typeof t!="object"||!nu)return!1;try{return nu.call(t),!0}catch{}return!1}var qb=Object.prototype.hasOwnProperty||function(t){return t in this};function Sr(t,e){return qb.call(t,e)}function Pr(t){return Nb.call(t)}function Gb(t){if(t.name)return t.name;var e=Pb.call(Lb.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function xh(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Ch(Ou.call(t,0,e.maxStringLength),e)+n}var i=xr.call(xr.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,ev);return Eh(i,"single",e)}function ev(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+$b.call(e.toString(16))}function xi(t){return"Object("+t+")"}function ga(t){return t+" { ? }"}function al(t,e,r,n){var i=n?au(r,n):rr.call(r,", ");return t+" ("+e+") {"+i+"}"}function tv(t){for(var e=0;en[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var Mu={exports:{}};Mu.exports;(function(t){(function(e,r){function n(v,u){if(!v)throw new Error(u||"Assertion failed")}function i(v,u){v.super_=u;var h=function(){};h.prototype=u.prototype,v.prototype=new h,v.prototype.constructor=v}function s(v,u,h){if(s.isBN(v))return v;this.negative=0,this.words=null,this.length=0,this.red=null,v!==null&&((u==="le"||u==="be")&&(h=u,u=10),this._init(v||0,u||10,h||"be"))}typeof e=="object"?e.exports=s:r.BN=s,s.BN=s,s.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=Ys.Buffer}catch{}s.isBN=function(u){return u instanceof s?!0:u!==null&&typeof u=="object"&&u.constructor.wordSize===s.wordSize&&Array.isArray(u.words)},s.max=function(u,h){return u.cmp(h)>0?u:h},s.min=function(u,h){return u.cmp(h)<0?u:h},s.prototype._init=function(u,h,g){if(typeof u=="number")return this._initNumber(u,h,g);if(typeof u=="object")return this._initArray(u,h,g);h==="hex"&&(h=16),n(h===(h|0)&&h>=2&&h<=36),u=u.toString().replace(/\s+/g,"");var y=0;u[0]==="-"&&(y++,this.negative=1),y=0;y-=3)C=u[y]|u[y-1]<<8|u[y-2]<<16,this.words[w]|=C<>>26-k&67108863,k+=24,k>=26&&(k-=26,w++);else if(g==="le")for(y=0,w=0;y>>26-k&67108863,k+=24,k>=26&&(k-=26,w++);return this._strip()};function a(v,u){var h=v.charCodeAt(u);if(h>=48&&h<=57)return h-48;if(h>=65&&h<=70)return h-55;if(h>=97&&h<=102)return h-87;n(!1,"Invalid character in "+v)}function c(v,u,h){var g=a(v,h);return h-1>=u&&(g|=a(v,h-1)<<4),g}s.prototype._parseHex=function(u,h,g){this.length=Math.ceil((u.length-h)/6),this.words=new Array(this.length);for(var y=0;y=h;y-=2)k=c(u,h,y)<=18?(w-=18,C+=1,this.words[C]|=k>>>26):w+=8;else{var m=u.length-h;for(y=m%2===0?h+1:h;y=18?(w-=18,C+=1,this.words[C]|=k>>>26):w+=8}this._strip()};function l(v,u,h,g){for(var y=0,w=0,C=Math.min(v.length,h),k=u;k=49?w=m-49+10:m>=17?w=m-17+10:w=m,n(m>=0&&w1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=p}catch{s.prototype.inspect=p}else s.prototype.inspect=p;function p(){return(this.red?""}var b=["","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"],x=[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],R=[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];s.prototype.toString=function(u,h){u=u||10,h=h|0||1;var g;if(u===16||u==="hex"){g="";for(var y=0,w=0,C=0;C>>24-y&16777215,y+=2,y>=26&&(y-=26,C--),w!==0||C!==this.length-1?g=b[6-m.length]+m+g:g=m+g}for(w!==0&&(g=w.toString(16)+g);g.length%h!==0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}if(u===(u|0)&&u>=2&&u<=36){var f=x[u],M=R[u];g="";var U=this.clone();for(U.negative=0;!U.isZero();){var q=U.modrn(M).toString(u);U=U.idivn(M),U.isZero()?g=q+g:g=b[f-q.length]+q+g}for(this.isZero()&&(g="0"+g);g.length%h!==0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var u=this.words[0];return this.length===2?u+=this.words[1]*67108864:this.length===3&&this.words[2]===1?u+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-u:u},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(u,h){return this.toArrayLike(o,u,h)}),s.prototype.toArray=function(u,h){return this.toArrayLike(Array,u,h)};var L=function(u,h){return u.allocUnsafe?u.allocUnsafe(h):new u(h)};s.prototype.toArrayLike=function(u,h,g){this._strip();var y=this.byteLength(),w=g||Math.max(1,y);n(y<=w,"byte array longer than desired length"),n(w>0,"Requested array length <= 0");var C=L(u,w),k=h==="le"?"LE":"BE";return this["_toArrayLike"+k](C,y),C},s.prototype._toArrayLikeLE=function(u,h){for(var g=0,y=0,w=0,C=0;w>8&255),g>16&255),C===6?(g>24&255),y=0,C=0):(y=k>>>24,C+=2)}if(g=0&&(u[g--]=k>>8&255),g>=0&&(u[g--]=k>>16&255),C===6?(g>=0&&(u[g--]=k>>24&255),y=0,C=0):(y=k>>>24,C+=2)}if(g>=0)for(u[g--]=y;g>=0;)u[g--]=0},Math.clz32?s.prototype._countBits=function(u){return 32-Math.clz32(u)}:s.prototype._countBits=function(u){var h=u,g=0;return h>=4096&&(g+=13,h>>>=13),h>=64&&(g+=7,h>>>=7),h>=8&&(g+=4,h>>>=4),h>=2&&(g+=2,h>>>=2),g+h},s.prototype._zeroBits=function(u){if(u===0)return 26;var h=u,g=0;return h&8191||(g+=13,h>>>=13),h&127||(g+=7,h>>>=7),h&15||(g+=4,h>>>=4),h&3||(g+=2,h>>>=2),h&1||g++,g},s.prototype.bitLength=function(){var u=this.words[this.length-1],h=this._countBits(u);return(this.length-1)*26+h};function N(v){for(var u=new Array(v.bitLength()),h=0;h>>y&1}return u}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var u=0,h=0;hu.length?this.clone().ior(u):u.clone().ior(this)},s.prototype.uor=function(u){return this.length>u.length?this.clone().iuor(u):u.clone().iuor(this)},s.prototype.iuand=function(u){var h;this.length>u.length?h=u:h=this;for(var g=0;gu.length?this.clone().iand(u):u.clone().iand(this)},s.prototype.uand=function(u){return this.length>u.length?this.clone().iuand(u):u.clone().iuand(this)},s.prototype.iuxor=function(u){var h,g;this.length>u.length?(h=this,g=u):(h=u,g=this);for(var y=0;yu.length?this.clone().ixor(u):u.clone().ixor(this)},s.prototype.uxor=function(u){return this.length>u.length?this.clone().iuxor(u):u.clone().iuxor(this)},s.prototype.inotn=function(u){n(typeof u=="number"&&u>=0);var h=Math.ceil(u/26)|0,g=u%26;this._expand(h),g>0&&h--;for(var y=0;y0&&(this.words[y]=~this.words[y]&67108863>>26-g),this._strip()},s.prototype.notn=function(u){return this.clone().inotn(u)},s.prototype.setn=function(u,h){n(typeof u=="number"&&u>=0);var g=u/26|0,y=u%26;return this._expand(g+1),h?this.words[g]=this.words[g]|1<u.length?(g=this,y=u):(g=u,y=this);for(var w=0,C=0;C>>26;for(;w!==0&&C>>26;if(this.length=g.length,w!==0)this.words[this.length]=w,this.length++;else if(g!==this)for(;Cu.length?this.clone().iadd(u):u.clone().iadd(this)},s.prototype.isub=function(u){if(u.negative!==0){u.negative=0;var h=this.iadd(u);return u.negative=1,h._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(u),this.negative=1,this._normSign();var g=this.cmp(u);if(g===0)return this.negative=0,this.length=1,this.words[0]=0,this;var y,w;g>0?(y=this,w=u):(y=u,w=this);for(var C=0,k=0;k>26,this.words[k]=h&67108863;for(;C!==0&&k>26,this.words[k]=h&67108863;if(C===0&&k>>26,U=m&67108863,q=Math.min(f,u.length-1),A=Math.max(0,f-v.length+1);A<=q;A++){var T=f-A|0;y=v.words[T]|0,w=u.words[A]|0,C=y*w+U,M+=C/67108864|0,U=C&67108863}h.words[f]=U|0,m=M|0}return m!==0?h.words[f]=m|0:h.length--,h._strip()}var I=function(u,h,g){var y=u.words,w=h.words,C=g.words,k=0,m,f,M,U=y[0]|0,q=U&8191,A=U>>>13,T=y[1]|0,D=T&8191,V=T>>>13,se=y[2]|0,_=se&8191,S=se>>>13,F=y[3]|0,H=F&8191,re=F>>>13,ie=y[4]|0,ee=ie&8191,he=ie>>>13,Zt=y[5]|0,me=Zt&8191,_e=Zt>>>13,yr=y[6]|0,be=yr&8191,ve=yr>>>13,cr=y[7]|0,ge=cr&8191,de=cr>>>13,Mt=y[8]|0,Se=Mt&8191,Ee=Mt>>>13,Sn=y[9]|0,Me=Sn&8191,xe=Sn>>>13,En=w[0]|0,Ce=En&8191,Re=En>>>13,Mn=w[1]|0,Ie=Mn&8191,Ae=Mn>>>13,xn=w[2]|0,ke=xn&8191,Te=xn>>>13,Cn=w[3]|0,Oe=Cn&8191,Ne=Cn>>>13,Rn=w[4]|0,Le=Rn&8191,Pe=Rn>>>13,In=w[5]|0,$e=In&8191,De=In>>>13,An=w[6]|0,je=An&8191,Be=An>>>13,kn=w[7]|0,Fe=kn&8191,We=kn>>>13,Tn=w[8]|0,He=Tn&8191,Ve=Tn>>>13,On=w[9]|0,Ue=On&8191,ze=On>>>13;g.negative=u.negative^h.negative,g.length=19,m=Math.imul(q,Ce),f=Math.imul(q,Re),f=f+Math.imul(A,Ce)|0,M=Math.imul(A,Re);var $r=(k+m|0)+((f&8191)<<13)|0;k=(M+(f>>>13)|0)+($r>>>26)|0,$r&=67108863,m=Math.imul(D,Ce),f=Math.imul(D,Re),f=f+Math.imul(V,Ce)|0,M=Math.imul(V,Re),m=m+Math.imul(q,Ie)|0,f=f+Math.imul(q,Ae)|0,f=f+Math.imul(A,Ie)|0,M=M+Math.imul(A,Ae)|0;var Dr=(k+m|0)+((f&8191)<<13)|0;k=(M+(f>>>13)|0)+(Dr>>>26)|0,Dr&=67108863,m=Math.imul(_,Ce),f=Math.imul(_,Re),f=f+Math.imul(S,Ce)|0,M=Math.imul(S,Re),m=m+Math.imul(D,Ie)|0,f=f+Math.imul(D,Ae)|0,f=f+Math.imul(V,Ie)|0,M=M+Math.imul(V,Ae)|0,m=m+Math.imul(q,ke)|0,f=f+Math.imul(q,Te)|0,f=f+Math.imul(A,ke)|0,M=M+Math.imul(A,Te)|0;var jr=(k+m|0)+((f&8191)<<13)|0;k=(M+(f>>>13)|0)+(jr>>>26)|0,jr&=67108863,m=Math.imul(H,Ce),f=Math.imul(H,Re),f=f+Math.imul(re,Ce)|0,M=Math.imul(re,Re),m=m+Math.imul(_,Ie)|0,f=f+Math.imul(_,Ae)|0,f=f+Math.imul(S,Ie)|0,M=M+Math.imul(S,Ae)|0,m=m+Math.imul(D,ke)|0,f=f+Math.imul(D,Te)|0,f=f+Math.imul(V,ke)|0,M=M+Math.imul(V,Te)|0,m=m+Math.imul(q,Oe)|0,f=f+Math.imul(q,Ne)|0,f=f+Math.imul(A,Oe)|0,M=M+Math.imul(A,Ne)|0;var Br=(k+m|0)+((f&8191)<<13)|0;k=(M+(f>>>13)|0)+(Br>>>26)|0,Br&=67108863,m=Math.imul(ee,Ce),f=Math.imul(ee,Re),f=f+Math.imul(he,Ce)|0,M=Math.imul(he,Re),m=m+Math.imul(H,Ie)|0,f=f+Math.imul(H,Ae)|0,f=f+Math.imul(re,Ie)|0,M=M+Math.imul(re,Ae)|0,m=m+Math.imul(_,ke)|0,f=f+Math.imul(_,Te)|0,f=f+Math.imul(S,ke)|0,M=M+Math.imul(S,Te)|0,m=m+Math.imul(D,Oe)|0,f=f+Math.imul(D,Ne)|0,f=f+Math.imul(V,Oe)|0,M=M+Math.imul(V,Ne)|0,m=m+Math.imul(q,Le)|0,f=f+Math.imul(q,Pe)|0,f=f+Math.imul(A,Le)|0,M=M+Math.imul(A,Pe)|0;var Fr=(k+m|0)+((f&8191)<<13)|0;k=(M+(f>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,m=Math.imul(me,Ce),f=Math.imul(me,Re),f=f+Math.imul(_e,Ce)|0,M=Math.imul(_e,Re),m=m+Math.imul(ee,Ie)|0,f=f+Math.imul(ee,Ae)|0,f=f+Math.imul(he,Ie)|0,M=M+Math.imul(he,Ae)|0,m=m+Math.imul(H,ke)|0,f=f+Math.imul(H,Te)|0,f=f+Math.imul(re,ke)|0,M=M+Math.imul(re,Te)|0,m=m+Math.imul(_,Oe)|0,f=f+Math.imul(_,Ne)|0,f=f+Math.imul(S,Oe)|0,M=M+Math.imul(S,Ne)|0,m=m+Math.imul(D,Le)|0,f=f+Math.imul(D,Pe)|0,f=f+Math.imul(V,Le)|0,M=M+Math.imul(V,Pe)|0,m=m+Math.imul(q,$e)|0,f=f+Math.imul(q,De)|0,f=f+Math.imul(A,$e)|0,M=M+Math.imul(A,De)|0;var Wr=(k+m|0)+((f&8191)<<13)|0;k=(M+(f>>>13)|0)+(Wr>>>26)|0,Wr&=67108863,m=Math.imul(be,Ce),f=Math.imul(be,Re),f=f+Math.imul(ve,Ce)|0,M=Math.imul(ve,Re),m=m+Math.imul(me,Ie)|0,f=f+Math.imul(me,Ae)|0,f=f+Math.imul(_e,Ie)|0,M=M+Math.imul(_e,Ae)|0,m=m+Math.imul(ee,ke)|0,f=f+Math.imul(ee,Te)|0,f=f+Math.imul(he,ke)|0,M=M+Math.imul(he,Te)|0,m=m+Math.imul(H,Oe)|0,f=f+Math.imul(H,Ne)|0,f=f+Math.imul(re,Oe)|0,M=M+Math.imul(re,Ne)|0,m=m+Math.imul(_,Le)|0,f=f+Math.imul(_,Pe)|0,f=f+Math.imul(S,Le)|0,M=M+Math.imul(S,Pe)|0,m=m+Math.imul(D,$e)|0,f=f+Math.imul(D,De)|0,f=f+Math.imul(V,$e)|0,M=M+Math.imul(V,De)|0,m=m+Math.imul(q,je)|0,f=f+Math.imul(q,Be)|0,f=f+Math.imul(A,je)|0,M=M+Math.imul(A,Be)|0;var Hr=(k+m|0)+((f&8191)<<13)|0;k=(M+(f>>>13)|0)+(Hr>>>26)|0,Hr&=67108863,m=Math.imul(ge,Ce),f=Math.imul(ge,Re),f=f+Math.imul(de,Ce)|0,M=Math.imul(de,Re),m=m+Math.imul(be,Ie)|0,f=f+Math.imul(be,Ae)|0,f=f+Math.imul(ve,Ie)|0,M=M+Math.imul(ve,Ae)|0,m=m+Math.imul(me,ke)|0,f=f+Math.imul(me,Te)|0,f=f+Math.imul(_e,ke)|0,M=M+Math.imul(_e,Te)|0,m=m+Math.imul(ee,Oe)|0,f=f+Math.imul(ee,Ne)|0,f=f+Math.imul(he,Oe)|0,M=M+Math.imul(he,Ne)|0,m=m+Math.imul(H,Le)|0,f=f+Math.imul(H,Pe)|0,f=f+Math.imul(re,Le)|0,M=M+Math.imul(re,Pe)|0,m=m+Math.imul(_,$e)|0,f=f+Math.imul(_,De)|0,f=f+Math.imul(S,$e)|0,M=M+Math.imul(S,De)|0,m=m+Math.imul(D,je)|0,f=f+Math.imul(D,Be)|0,f=f+Math.imul(V,je)|0,M=M+Math.imul(V,Be)|0,m=m+Math.imul(q,Fe)|0,f=f+Math.imul(q,We)|0,f=f+Math.imul(A,Fe)|0,M=M+Math.imul(A,We)|0;var Vr=(k+m|0)+((f&8191)<<13)|0;k=(M+(f>>>13)|0)+(Vr>>>26)|0,Vr&=67108863,m=Math.imul(Se,Ce),f=Math.imul(Se,Re),f=f+Math.imul(Ee,Ce)|0,M=Math.imul(Ee,Re),m=m+Math.imul(ge,Ie)|0,f=f+Math.imul(ge,Ae)|0,f=f+Math.imul(de,Ie)|0,M=M+Math.imul(de,Ae)|0,m=m+Math.imul(be,ke)|0,f=f+Math.imul(be,Te)|0,f=f+Math.imul(ve,ke)|0,M=M+Math.imul(ve,Te)|0,m=m+Math.imul(me,Oe)|0,f=f+Math.imul(me,Ne)|0,f=f+Math.imul(_e,Oe)|0,M=M+Math.imul(_e,Ne)|0,m=m+Math.imul(ee,Le)|0,f=f+Math.imul(ee,Pe)|0,f=f+Math.imul(he,Le)|0,M=M+Math.imul(he,Pe)|0,m=m+Math.imul(H,$e)|0,f=f+Math.imul(H,De)|0,f=f+Math.imul(re,$e)|0,M=M+Math.imul(re,De)|0,m=m+Math.imul(_,je)|0,f=f+Math.imul(_,Be)|0,f=f+Math.imul(S,je)|0,M=M+Math.imul(S,Be)|0,m=m+Math.imul(D,Fe)|0,f=f+Math.imul(D,We)|0,f=f+Math.imul(V,Fe)|0,M=M+Math.imul(V,We)|0,m=m+Math.imul(q,He)|0,f=f+Math.imul(q,Ve)|0,f=f+Math.imul(A,He)|0,M=M+Math.imul(A,Ve)|0;var Ur=(k+m|0)+((f&8191)<<13)|0;k=(M+(f>>>13)|0)+(Ur>>>26)|0,Ur&=67108863,m=Math.imul(Me,Ce),f=Math.imul(Me,Re),f=f+Math.imul(xe,Ce)|0,M=Math.imul(xe,Re),m=m+Math.imul(Se,Ie)|0,f=f+Math.imul(Se,Ae)|0,f=f+Math.imul(Ee,Ie)|0,M=M+Math.imul(Ee,Ae)|0,m=m+Math.imul(ge,ke)|0,f=f+Math.imul(ge,Te)|0,f=f+Math.imul(de,ke)|0,M=M+Math.imul(de,Te)|0,m=m+Math.imul(be,Oe)|0,f=f+Math.imul(be,Ne)|0,f=f+Math.imul(ve,Oe)|0,M=M+Math.imul(ve,Ne)|0,m=m+Math.imul(me,Le)|0,f=f+Math.imul(me,Pe)|0,f=f+Math.imul(_e,Le)|0,M=M+Math.imul(_e,Pe)|0,m=m+Math.imul(ee,$e)|0,f=f+Math.imul(ee,De)|0,f=f+Math.imul(he,$e)|0,M=M+Math.imul(he,De)|0,m=m+Math.imul(H,je)|0,f=f+Math.imul(H,Be)|0,f=f+Math.imul(re,je)|0,M=M+Math.imul(re,Be)|0,m=m+Math.imul(_,Fe)|0,f=f+Math.imul(_,We)|0,f=f+Math.imul(S,Fe)|0,M=M+Math.imul(S,We)|0,m=m+Math.imul(D,He)|0,f=f+Math.imul(D,Ve)|0,f=f+Math.imul(V,He)|0,M=M+Math.imul(V,Ve)|0,m=m+Math.imul(q,Ue)|0,f=f+Math.imul(q,ze)|0,f=f+Math.imul(A,Ue)|0,M=M+Math.imul(A,ze)|0;var zr=(k+m|0)+((f&8191)<<13)|0;k=(M+(f>>>13)|0)+(zr>>>26)|0,zr&=67108863,m=Math.imul(Me,Ie),f=Math.imul(Me,Ae),f=f+Math.imul(xe,Ie)|0,M=Math.imul(xe,Ae),m=m+Math.imul(Se,ke)|0,f=f+Math.imul(Se,Te)|0,f=f+Math.imul(Ee,ke)|0,M=M+Math.imul(Ee,Te)|0,m=m+Math.imul(ge,Oe)|0,f=f+Math.imul(ge,Ne)|0,f=f+Math.imul(de,Oe)|0,M=M+Math.imul(de,Ne)|0,m=m+Math.imul(be,Le)|0,f=f+Math.imul(be,Pe)|0,f=f+Math.imul(ve,Le)|0,M=M+Math.imul(ve,Pe)|0,m=m+Math.imul(me,$e)|0,f=f+Math.imul(me,De)|0,f=f+Math.imul(_e,$e)|0,M=M+Math.imul(_e,De)|0,m=m+Math.imul(ee,je)|0,f=f+Math.imul(ee,Be)|0,f=f+Math.imul(he,je)|0,M=M+Math.imul(he,Be)|0,m=m+Math.imul(H,Fe)|0,f=f+Math.imul(H,We)|0,f=f+Math.imul(re,Fe)|0,M=M+Math.imul(re,We)|0,m=m+Math.imul(_,He)|0,f=f+Math.imul(_,Ve)|0,f=f+Math.imul(S,He)|0,M=M+Math.imul(S,Ve)|0,m=m+Math.imul(D,Ue)|0,f=f+Math.imul(D,ze)|0,f=f+Math.imul(V,Ue)|0,M=M+Math.imul(V,ze)|0;var qr=(k+m|0)+((f&8191)<<13)|0;k=(M+(f>>>13)|0)+(qr>>>26)|0,qr&=67108863,m=Math.imul(Me,ke),f=Math.imul(Me,Te),f=f+Math.imul(xe,ke)|0,M=Math.imul(xe,Te),m=m+Math.imul(Se,Oe)|0,f=f+Math.imul(Se,Ne)|0,f=f+Math.imul(Ee,Oe)|0,M=M+Math.imul(Ee,Ne)|0,m=m+Math.imul(ge,Le)|0,f=f+Math.imul(ge,Pe)|0,f=f+Math.imul(de,Le)|0,M=M+Math.imul(de,Pe)|0,m=m+Math.imul(be,$e)|0,f=f+Math.imul(be,De)|0,f=f+Math.imul(ve,$e)|0,M=M+Math.imul(ve,De)|0,m=m+Math.imul(me,je)|0,f=f+Math.imul(me,Be)|0,f=f+Math.imul(_e,je)|0,M=M+Math.imul(_e,Be)|0,m=m+Math.imul(ee,Fe)|0,f=f+Math.imul(ee,We)|0,f=f+Math.imul(he,Fe)|0,M=M+Math.imul(he,We)|0,m=m+Math.imul(H,He)|0,f=f+Math.imul(H,Ve)|0,f=f+Math.imul(re,He)|0,M=M+Math.imul(re,Ve)|0,m=m+Math.imul(_,Ue)|0,f=f+Math.imul(_,ze)|0,f=f+Math.imul(S,Ue)|0,M=M+Math.imul(S,ze)|0;var Gr=(k+m|0)+((f&8191)<<13)|0;k=(M+(f>>>13)|0)+(Gr>>>26)|0,Gr&=67108863,m=Math.imul(Me,Oe),f=Math.imul(Me,Ne),f=f+Math.imul(xe,Oe)|0,M=Math.imul(xe,Ne),m=m+Math.imul(Se,Le)|0,f=f+Math.imul(Se,Pe)|0,f=f+Math.imul(Ee,Le)|0,M=M+Math.imul(Ee,Pe)|0,m=m+Math.imul(ge,$e)|0,f=f+Math.imul(ge,De)|0,f=f+Math.imul(de,$e)|0,M=M+Math.imul(de,De)|0,m=m+Math.imul(be,je)|0,f=f+Math.imul(be,Be)|0,f=f+Math.imul(ve,je)|0,M=M+Math.imul(ve,Be)|0,m=m+Math.imul(me,Fe)|0,f=f+Math.imul(me,We)|0,f=f+Math.imul(_e,Fe)|0,M=M+Math.imul(_e,We)|0,m=m+Math.imul(ee,He)|0,f=f+Math.imul(ee,Ve)|0,f=f+Math.imul(he,He)|0,M=M+Math.imul(he,Ve)|0,m=m+Math.imul(H,Ue)|0,f=f+Math.imul(H,ze)|0,f=f+Math.imul(re,Ue)|0,M=M+Math.imul(re,ze)|0;var Jr=(k+m|0)+((f&8191)<<13)|0;k=(M+(f>>>13)|0)+(Jr>>>26)|0,Jr&=67108863,m=Math.imul(Me,Le),f=Math.imul(Me,Pe),f=f+Math.imul(xe,Le)|0,M=Math.imul(xe,Pe),m=m+Math.imul(Se,$e)|0,f=f+Math.imul(Se,De)|0,f=f+Math.imul(Ee,$e)|0,M=M+Math.imul(Ee,De)|0,m=m+Math.imul(ge,je)|0,f=f+Math.imul(ge,Be)|0,f=f+Math.imul(de,je)|0,M=M+Math.imul(de,Be)|0,m=m+Math.imul(be,Fe)|0,f=f+Math.imul(be,We)|0,f=f+Math.imul(ve,Fe)|0,M=M+Math.imul(ve,We)|0,m=m+Math.imul(me,He)|0,f=f+Math.imul(me,Ve)|0,f=f+Math.imul(_e,He)|0,M=M+Math.imul(_e,Ve)|0,m=m+Math.imul(ee,Ue)|0,f=f+Math.imul(ee,ze)|0,f=f+Math.imul(he,Ue)|0,M=M+Math.imul(he,ze)|0;var Zr=(k+m|0)+((f&8191)<<13)|0;k=(M+(f>>>13)|0)+(Zr>>>26)|0,Zr&=67108863,m=Math.imul(Me,$e),f=Math.imul(Me,De),f=f+Math.imul(xe,$e)|0,M=Math.imul(xe,De),m=m+Math.imul(Se,je)|0,f=f+Math.imul(Se,Be)|0,f=f+Math.imul(Ee,je)|0,M=M+Math.imul(Ee,Be)|0,m=m+Math.imul(ge,Fe)|0,f=f+Math.imul(ge,We)|0,f=f+Math.imul(de,Fe)|0,M=M+Math.imul(de,We)|0,m=m+Math.imul(be,He)|0,f=f+Math.imul(be,Ve)|0,f=f+Math.imul(ve,He)|0,M=M+Math.imul(ve,Ve)|0,m=m+Math.imul(me,Ue)|0,f=f+Math.imul(me,ze)|0,f=f+Math.imul(_e,Ue)|0,M=M+Math.imul(_e,ze)|0;var sa=(k+m|0)+((f&8191)<<13)|0;k=(M+(f>>>13)|0)+(sa>>>26)|0,sa&=67108863,m=Math.imul(Me,je),f=Math.imul(Me,Be),f=f+Math.imul(xe,je)|0,M=Math.imul(xe,Be),m=m+Math.imul(Se,Fe)|0,f=f+Math.imul(Se,We)|0,f=f+Math.imul(Ee,Fe)|0,M=M+Math.imul(Ee,We)|0,m=m+Math.imul(ge,He)|0,f=f+Math.imul(ge,Ve)|0,f=f+Math.imul(de,He)|0,M=M+Math.imul(de,Ve)|0,m=m+Math.imul(be,Ue)|0,f=f+Math.imul(be,ze)|0,f=f+Math.imul(ve,Ue)|0,M=M+Math.imul(ve,ze)|0;var oa=(k+m|0)+((f&8191)<<13)|0;k=(M+(f>>>13)|0)+(oa>>>26)|0,oa&=67108863,m=Math.imul(Me,Fe),f=Math.imul(Me,We),f=f+Math.imul(xe,Fe)|0,M=Math.imul(xe,We),m=m+Math.imul(Se,He)|0,f=f+Math.imul(Se,Ve)|0,f=f+Math.imul(Ee,He)|0,M=M+Math.imul(Ee,Ve)|0,m=m+Math.imul(ge,Ue)|0,f=f+Math.imul(ge,ze)|0,f=f+Math.imul(de,Ue)|0,M=M+Math.imul(de,ze)|0;var aa=(k+m|0)+((f&8191)<<13)|0;k=(M+(f>>>13)|0)+(aa>>>26)|0,aa&=67108863,m=Math.imul(Me,He),f=Math.imul(Me,Ve),f=f+Math.imul(xe,He)|0,M=Math.imul(xe,Ve),m=m+Math.imul(Se,Ue)|0,f=f+Math.imul(Se,ze)|0,f=f+Math.imul(Ee,Ue)|0,M=M+Math.imul(Ee,ze)|0;var ua=(k+m|0)+((f&8191)<<13)|0;k=(M+(f>>>13)|0)+(ua>>>26)|0,ua&=67108863,m=Math.imul(Me,Ue),f=Math.imul(Me,ze),f=f+Math.imul(xe,Ue)|0,M=Math.imul(xe,ze);var ca=(k+m|0)+((f&8191)<<13)|0;return k=(M+(f>>>13)|0)+(ca>>>26)|0,ca&=67108863,C[0]=$r,C[1]=Dr,C[2]=jr,C[3]=Br,C[4]=Fr,C[5]=Wr,C[6]=Hr,C[7]=Vr,C[8]=Ur,C[9]=zr,C[10]=qr,C[11]=Gr,C[12]=Jr,C[13]=Zr,C[14]=sa,C[15]=oa,C[16]=aa,C[17]=ua,C[18]=ca,k!==0&&(C[19]=k,g.length++),g};Math.imul||(I=E);function O(v,u,h){h.negative=u.negative^v.negative,h.length=v.length+u.length;for(var g=0,y=0,w=0;w>>26)|0,y+=C>>>26,C&=67108863}h.words[w]=k,g=C,C=y}return g!==0?h.words[w]=g:h.length--,h._strip()}function $(v,u,h){return O(v,u,h)}s.prototype.mulTo=function(u,h){var g,y=this.length+u.length;return this.length===10&&u.length===10?g=I(this,u,h):y<63?g=E(this,u,h):y<1024?g=O(this,u,h):g=$(this,u,h),g},s.prototype.mul=function(u){var h=new s(null);return h.words=new Array(this.length+u.length),this.mulTo(u,h)},s.prototype.mulf=function(u){var h=new s(null);return h.words=new Array(this.length+u.length),$(this,u,h)},s.prototype.imul=function(u){return this.clone().mulTo(u,this)},s.prototype.imuln=function(u){var h=u<0;h&&(u=-u),n(typeof u=="number"),n(u<67108864);for(var g=0,y=0;y>=26,g+=w/67108864|0,g+=C>>>26,this.words[y]=C&67108863}return g!==0&&(this.words[y]=g,this.length++),h?this.ineg():this},s.prototype.muln=function(u){return this.clone().imuln(u)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(u){var h=N(u);if(h.length===0)return new s(1);for(var g=this,y=0;y=0);var h=u%26,g=(u-h)/26,y=67108863>>>26-h<<26-h,w;if(h!==0){var C=0;for(w=0;w>>26-h}C&&(this.words[w]=C,this.length++)}if(g!==0){for(w=this.length-1;w>=0;w--)this.words[w+g]=this.words[w];for(w=0;w=0);var y;h?y=(h-h%26)/26:y=0;var w=u%26,C=Math.min((u-w)/26,this.length),k=67108863^67108863>>>w<C)for(this.length-=C,f=0;f=0&&(M!==0||f>=y);f--){var U=this.words[f]|0;this.words[f]=M<<26-w|U>>>w,M=U&k}return m&&M!==0&&(m.words[m.length++]=M),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(u,h,g){return n(this.negative===0),this.iushrn(u,h,g)},s.prototype.shln=function(u){return this.clone().ishln(u)},s.prototype.ushln=function(u){return this.clone().iushln(u)},s.prototype.shrn=function(u){return this.clone().ishrn(u)},s.prototype.ushrn=function(u){return this.clone().iushrn(u)},s.prototype.testn=function(u){n(typeof u=="number"&&u>=0);var h=u%26,g=(u-h)/26,y=1<=0);var h=u%26,g=(u-h)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=g)return this;if(h!==0&&g++,this.length=Math.min(g,this.length),h!==0){var y=67108863^67108863>>>h<=67108864;h++)this.words[h]-=67108864,h===this.length-1?this.words[h+1]=1:this.words[h+1]++;return this.length=Math.max(this.length,h+1),this},s.prototype.isubn=function(u){if(n(typeof u=="number"),n(u<67108864),u<0)return this.iaddn(-u);if(this.negative!==0)return this.negative=0,this.iaddn(u),this.negative=1,this;if(this.words[0]-=u,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var h=0;h>26)-(m/67108864|0),this.words[w+g]=C&67108863}for(;w>26,this.words[w+g]=C&67108863;if(k===0)return this._strip();for(n(k===-1),k=0,w=0;w>26,this.words[w]=C&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(u,h){var g=this.length-u.length,y=this.clone(),w=u,C=w.words[w.length-1]|0,k=this._countBits(C);g=26-k,g!==0&&(w=w.ushln(g),y.iushln(g),C=w.words[w.length-1]|0);var m=y.length-w.length,f;if(h!=="mod"){f=new s(null),f.length=m+1,f.words=new Array(f.length);for(var M=0;M=0;q--){var A=(y.words[w.length+q]|0)*67108864+(y.words[w.length+q-1]|0);for(A=Math.min(A/C|0,67108863),y._ishlnsubmul(w,A,q);y.negative!==0;)A--,y.negative=0,y._ishlnsubmul(w,1,q),y.isZero()||(y.negative^=1);f&&(f.words[q]=A)}return f&&f._strip(),y._strip(),h!=="div"&&g!==0&&y.iushrn(g),{div:f||null,mod:y}},s.prototype.divmod=function(u,h,g){if(n(!u.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var y,w,C;return this.negative!==0&&u.negative===0?(C=this.neg().divmod(u,h),h!=="mod"&&(y=C.div.neg()),h!=="div"&&(w=C.mod.neg(),g&&w.negative!==0&&w.iadd(u)),{div:y,mod:w}):this.negative===0&&u.negative!==0?(C=this.divmod(u.neg(),h),h!=="mod"&&(y=C.div.neg()),{div:y,mod:C.mod}):this.negative&u.negative?(C=this.neg().divmod(u.neg(),h),h!=="div"&&(w=C.mod.neg(),g&&w.negative!==0&&w.isub(u)),{div:C.div,mod:w}):u.length>this.length||this.cmp(u)<0?{div:new s(0),mod:this}:u.length===1?h==="div"?{div:this.divn(u.words[0]),mod:null}:h==="mod"?{div:null,mod:new s(this.modrn(u.words[0]))}:{div:this.divn(u.words[0]),mod:new s(this.modrn(u.words[0]))}:this._wordDiv(u,h)},s.prototype.div=function(u){return this.divmod(u,"div",!1).div},s.prototype.mod=function(u){return this.divmod(u,"mod",!1).mod},s.prototype.umod=function(u){return this.divmod(u,"mod",!0).mod},s.prototype.divRound=function(u){var h=this.divmod(u);if(h.mod.isZero())return h.div;var g=h.div.negative!==0?h.mod.isub(u):h.mod,y=u.ushrn(1),w=u.andln(1),C=g.cmp(y);return C<0||w===1&&C===0?h.div:h.div.negative!==0?h.div.isubn(1):h.div.iaddn(1)},s.prototype.modrn=function(u){var h=u<0;h&&(u=-u),n(u<=67108863);for(var g=(1<<26)%u,y=0,w=this.length-1;w>=0;w--)y=(g*y+(this.words[w]|0))%u;return h?-y:y},s.prototype.modn=function(u){return this.modrn(u)},s.prototype.idivn=function(u){var h=u<0;h&&(u=-u),n(u<=67108863);for(var g=0,y=this.length-1;y>=0;y--){var w=(this.words[y]|0)+g*67108864;this.words[y]=w/u|0,g=w%u}return this._strip(),h?this.ineg():this},s.prototype.divn=function(u){return this.clone().idivn(u)},s.prototype.egcd=function(u){n(u.negative===0),n(!u.isZero());var h=this,g=u.clone();h.negative!==0?h=h.umod(u):h=h.clone();for(var y=new s(1),w=new s(0),C=new s(0),k=new s(1),m=0;h.isEven()&&g.isEven();)h.iushrn(1),g.iushrn(1),++m;for(var f=g.clone(),M=h.clone();!h.isZero();){for(var U=0,q=1;!(h.words[0]&q)&&U<26;++U,q<<=1);if(U>0)for(h.iushrn(U);U-- >0;)(y.isOdd()||w.isOdd())&&(y.iadd(f),w.isub(M)),y.iushrn(1),w.iushrn(1);for(var A=0,T=1;!(g.words[0]&T)&&A<26;++A,T<<=1);if(A>0)for(g.iushrn(A);A-- >0;)(C.isOdd()||k.isOdd())&&(C.iadd(f),k.isub(M)),C.iushrn(1),k.iushrn(1);h.cmp(g)>=0?(h.isub(g),y.isub(C),w.isub(k)):(g.isub(h),C.isub(y),k.isub(w))}return{a:C,b:k,gcd:g.iushln(m)}},s.prototype._invmp=function(u){n(u.negative===0),n(!u.isZero());var h=this,g=u.clone();h.negative!==0?h=h.umod(u):h=h.clone();for(var y=new s(1),w=new s(0),C=g.clone();h.cmpn(1)>0&&g.cmpn(1)>0;){for(var k=0,m=1;!(h.words[0]&m)&&k<26;++k,m<<=1);if(k>0)for(h.iushrn(k);k-- >0;)y.isOdd()&&y.iadd(C),y.iushrn(1);for(var f=0,M=1;!(g.words[0]&M)&&f<26;++f,M<<=1);if(f>0)for(g.iushrn(f);f-- >0;)w.isOdd()&&w.iadd(C),w.iushrn(1);h.cmp(g)>=0?(h.isub(g),y.isub(w)):(g.isub(h),w.isub(y))}var U;return h.cmpn(1)===0?U=y:U=w,U.cmpn(0)<0&&U.iadd(u),U},s.prototype.gcd=function(u){if(this.isZero())return u.abs();if(u.isZero())return this.abs();var h=this.clone(),g=u.clone();h.negative=0,g.negative=0;for(var y=0;h.isEven()&&g.isEven();y++)h.iushrn(1),g.iushrn(1);do{for(;h.isEven();)h.iushrn(1);for(;g.isEven();)g.iushrn(1);var w=h.cmp(g);if(w<0){var C=h;h=g,g=C}else if(w===0||g.cmpn(1)===0)break;h.isub(g)}while(!0);return g.iushln(y)},s.prototype.invm=function(u){return this.egcd(u).a.umod(u)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(u){return this.words[0]&u},s.prototype.bincn=function(u){n(typeof u=="number");var h=u%26,g=(u-h)/26,y=1<>>26,k&=67108863,this.words[C]=k}return w!==0&&(this.words[C]=w,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(u){var h=u<0;if(this.negative!==0&&!h)return-1;if(this.negative===0&&h)return 1;this._strip();var g;if(this.length>1)g=1;else{h&&(u=-u),n(u<=67108863,"Number is too big");var y=this.words[0]|0;g=y===u?0:yu.length)return 1;if(this.length=0;g--){var y=this.words[g]|0,w=u.words[g]|0;if(y!==w){yw&&(h=1);break}}return h},s.prototype.gtn=function(u){return this.cmpn(u)===1},s.prototype.gt=function(u){return this.cmp(u)===1},s.prototype.gten=function(u){return this.cmpn(u)>=0},s.prototype.gte=function(u){return this.cmp(u)>=0},s.prototype.ltn=function(u){return this.cmpn(u)===-1},s.prototype.lt=function(u){return this.cmp(u)===-1},s.prototype.lten=function(u){return this.cmpn(u)<=0},s.prototype.lte=function(u){return this.cmp(u)<=0},s.prototype.eqn=function(u){return this.cmpn(u)===0},s.prototype.eq=function(u){return this.cmp(u)===0},s.red=function(u){return new Y(u)},s.prototype.toRed=function(u){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),u.convertTo(this)._forceRed(u)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(u){return this.red=u,this},s.prototype.forceRed=function(u){return n(!this.red,"Already a number in reduction context"),this._forceRed(u)},s.prototype.redAdd=function(u){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,u)},s.prototype.redIAdd=function(u){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,u)},s.prototype.redSub=function(u){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,u)},s.prototype.redISub=function(u){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,u)},s.prototype.redShl=function(u){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,u)},s.prototype.redMul=function(u){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.mul(this,u)},s.prototype.redIMul=function(u){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.imul(this,u)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(u){return n(this.red&&!u.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,u)};var P={k256:null,p224:null,p192:null,p25519:null};function j(v,u){this.name=v,this.p=new s(u,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}j.prototype._tmp=function(){var u=new s(null);return u.words=new Array(Math.ceil(this.n/13)),u},j.prototype.ireduce=function(u){var h=u,g;do this.split(h,this.tmp),h=this.imulK(h),h=h.iadd(this.tmp),g=h.bitLength();while(g>this.n);var y=g0?h.isub(this.p):h.strip!==void 0?h.strip():h._strip(),h},j.prototype.split=function(u,h){u.iushrn(this.n,0,h)},j.prototype.imulK=function(u){return u.imul(this.k)};function G(){j.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(G,j),G.prototype.split=function(u,h){for(var g=4194303,y=Math.min(u.length,9),w=0;w>>22,C=k}C>>>=22,u.words[w-10]=C,C===0&&u.length>10?u.length-=10:u.length-=9},G.prototype.imulK=function(u){u.words[u.length]=0,u.words[u.length+1]=0,u.length+=2;for(var h=0,g=0;g>>=26,u.words[g]=w,h=y}return h!==0&&(u.words[u.length++]=h),u},s._prime=function(u){if(P[u])return P[u];var h;if(u==="k256")h=new G;else if(u==="p224")h=new z;else if(u==="p192")h=new W;else if(u==="p25519")h=new K;else throw new Error("Unknown prime "+u);return P[u]=h,h};function Y(v){if(typeof v=="string"){var u=s._prime(v);this.m=u.p,this.prime=u}else n(v.gtn(1),"modulus must be greater than 1"),this.m=v,this.prime=null}Y.prototype._verify1=function(u){n(u.negative===0,"red works only with positives"),n(u.red,"red works only with red numbers")},Y.prototype._verify2=function(u,h){n((u.negative|h.negative)===0,"red works only with positives"),n(u.red&&u.red===h.red,"red works only with red numbers")},Y.prototype.imod=function(u){return this.prime?this.prime.ireduce(u)._forceRed(this):(d(u,u.umod(this.m)._forceRed(this)),u)},Y.prototype.neg=function(u){return u.isZero()?u.clone():this.m.sub(u)._forceRed(this)},Y.prototype.add=function(u,h){this._verify2(u,h);var g=u.add(h);return g.cmp(this.m)>=0&&g.isub(this.m),g._forceRed(this)},Y.prototype.iadd=function(u,h){this._verify2(u,h);var g=u.iadd(h);return g.cmp(this.m)>=0&&g.isub(this.m),g},Y.prototype.sub=function(u,h){this._verify2(u,h);var g=u.sub(h);return g.cmpn(0)<0&&g.iadd(this.m),g._forceRed(this)},Y.prototype.isub=function(u,h){this._verify2(u,h);var g=u.isub(h);return g.cmpn(0)<0&&g.iadd(this.m),g},Y.prototype.shl=function(u,h){return this._verify1(u),this.imod(u.ushln(h))},Y.prototype.imul=function(u,h){return this._verify2(u,h),this.imod(u.imul(h))},Y.prototype.mul=function(u,h){return this._verify2(u,h),this.imod(u.mul(h))},Y.prototype.isqr=function(u){return this.imul(u,u.clone())},Y.prototype.sqr=function(u){return this.mul(u,u)},Y.prototype.sqrt=function(u){if(u.isZero())return u.clone();var h=this.m.andln(3);if(n(h%2===1),h===3){var g=this.m.add(new s(1)).iushrn(2);return this.pow(u,g)}for(var y=this.m.subn(1),w=0;!y.isZero()&&y.andln(1)===0;)w++,y.iushrn(1);n(!y.isZero());var C=new s(1).toRed(this),k=C.redNeg(),m=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new s(2*f*f).toRed(this);this.pow(f,m).cmp(k)!==0;)f.redIAdd(k);for(var M=this.pow(f,y),U=this.pow(u,y.addn(1).iushrn(1)),q=this.pow(u,y),A=w;q.cmp(C)!==0;){for(var T=q,D=0;T.cmp(C)!==0;D++)T=T.redSqr();n(D=0;w--){for(var M=h.words[w],U=f-1;U>=0;U--){var q=M>>U&1;if(C!==y[0]&&(C=this.sqr(C)),q===0&&k===0){m=0;continue}k<<=1,k|=q,m++,!(m!==g&&(w!==0||U!==0))&&(C=this.mul(C,y[k]),m=0,k=0)}f=26}return C},Y.prototype.convertTo=function(u){var h=u.umod(this.m);return h===u?h.clone():h},Y.prototype.convertFrom=function(u){var h=u.clone();return h.red=null,h},s.mont=function(u){return new X(u)};function X(v){Y.call(this,v),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(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)}i(X,Y),X.prototype.convertTo=function(u){return this.imod(u.ushln(this.shift))},X.prototype.convertFrom=function(u){var h=this.imod(u.mul(this.rinv));return h.red=null,h},X.prototype.imul=function(u,h){if(u.isZero()||h.isZero())return u.words[0]=0,u.length=1,u;var g=u.imul(h),y=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),w=g.isub(y).iushrn(this.shift),C=w;return w.cmp(this.m)>=0?C=w.isub(this.m):w.cmpn(0)<0&&(C=w.iadd(this.m)),C._forceRed(this)},X.prototype.mul=function(u,h){if(u.isZero()||h.isZero())return new s(0)._forceRed(this);var g=u.mul(h),y=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),w=g.isub(y).iushrn(this.shift),C=w;return w.cmp(this.m)>=0?C=w.isub(this.m):w.cmpn(0)<0&&(C=w.iadd(this.m)),C._forceRed(this)},X.prototype.invm=function(u){var h=this.imod(u._invmp(this.m).mul(this.r2));return h._forceRed(this)}})(t,J)})(Mu);var Xs=Mu.exports,xu={},Bi={},eo={};Object.defineProperty(eo,"__esModule",{value:!0});eo.walletLogo=void 0;const A0=(t,e)=>{let r;switch(t){case"standard":return r=e,`data:image/svg+xml,%3Csvg width='${e}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;case"circle":return r=e,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${e}' height='${r}' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E`;case"text":return r=(.1*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogo":return r=(.25*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;case"textLight":return r=(.1*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogoLight":return r=(.25*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;default:return r=e,`data:image/svg+xml,%3Csvg width='${e}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `}};eo.walletLogo=A0;var to={};Object.defineProperty(to,"__esModule",{value:!0});to.LINK_API_URL=void 0;to.LINK_API_URL="https://www.walletlink.org";var ro={};Object.defineProperty(ro,"__esModule",{value:!0});ro.ScopedLocalStorage=void 0;class k0{constructor(e){this.scope=e}setItem(e,r){localStorage.setItem(this.scopedKey(e),r)}getItem(e){return localStorage.getItem(this.scopedKey(e))}removeItem(e){localStorage.removeItem(this.scopedKey(e))}clear(){const e=this.scopedKey(""),r=[];for(let n=0;nlocalStorage.removeItem(n))}scopedKey(e){return`${this.scope}:${e}`}}ro.ScopedLocalStorage=k0;var Qn={},pn={};Object.defineProperty(pn,"__esModule",{value:!0});const T0=Eu;function Pc(t,e,r){try{Reflect.apply(t,e,r)}catch(n){setTimeout(()=>{throw n})}}function O0(t){const e=t.length,r=new Array(e);for(let n=0;n0&&([o]=r),o instanceof Error)throw o;const a=new Error(`Unhandled error.${o?` (${o.message})`:""}`);throw a.context=o,a}const s=i[e];if(s===void 0)return!1;if(typeof s=="function")Pc(s,this,r);else{const o=s.length,a=O0(s);for(let c=0;c"u"&&(n=eh()),Ya(t,"",0,[],void 0,0,n);var i;try{nn.length===0?i=JSON.stringify(t,e,r):i=JSON.stringify(t,rh(e),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;cn.length!==0;){var s=cn.pop();s.length===4?Object.defineProperty(s[0],s[1],s[3]):s[0][s[1]]=s[2]}}return i}function Un(t,e,r,n){var i=Object.getOwnPropertyDescriptor(n,r);i.get!==void 0?i.configurable?(Object.defineProperty(n,r,{value:t}),cn.push([n,r,e,i])):nn.push([e,r,t]):(n[r]=t,cn.push([n,r,e]))}function Ya(t,e,r,n,i,s,o){s+=1;var a;if(typeof t=="object"&&t!==null){for(a=0;ao.depthLimit){Un($s,t,e,i);return}if(typeof o.edgesLimit<"u"&&r+1>o.edgesLimit){Un($s,t,e,i);return}if(n.push(t),Array.isArray(t))for(a=0;ae?1:0}function th(t,e,r,n){typeof n>"u"&&(n=eh());var i=Ka(t,"",0,[],void 0,0,n)||t,s;try{nn.length===0?s=JSON.stringify(i,e,r):s=JSON.stringify(i,rh(e),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;cn.length!==0;){var o=cn.pop();o.length===4?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}}return s}function Ka(t,e,r,n,i,s,o){s+=1;var a;if(typeof t=="object"&&t!==null){for(a=0;ao.depthLimit){Un($s,t,e,i);return}if(typeof o.edgesLimit<"u"&&r+1>o.edgesLimit){Un($s,t,e,i);return}if(n.push(t),Array.isArray(t))for(a=0;a0)for(var n=0;n=1e3&&t<=4999}function j0(t,e){if(e!=="[Circular]")return e}var Cu={},Ir={};Object.defineProperty(Ir,"__esModule",{value:!0});Ir.errorValues=Ir.errorCodes=void 0;Ir.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}};Ir.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(t){Object.defineProperty(t,"__esModule",{value:!0}),t.serializeError=t.isValidCode=t.getMessageFromCode=t.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const e=Ir,r=Rr,n=e.errorCodes.rpc.internal,i="Unspecified error message. This is a bug, please report it.",s={code:n,message:o(n)};t.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function o(b,x=i){if(Number.isInteger(b)){const R=b.toString();if(p(e.errorValues,R))return e.errorValues[R].message;if(l(b))return t.JSON_RPC_SERVER_ERROR_MESSAGE}return x}t.getMessageFromCode=o;function a(b){if(!Number.isInteger(b))return!1;const x=b.toString();return!!(e.errorValues[x]||l(b))}t.isValidCode=a;function c(b,{fallbackError:x=s,shouldIncludeStack:R=!1}={}){var L,N;if(!x||!Number.isInteger(x.code)||typeof x.message!="string")throw new Error("Must provide fallback error with integer number code and string message.");if(b instanceof r.EthereumRpcError)return b.serialize();const E={};if(b&&typeof b=="object"&&!Array.isArray(b)&&p(b,"code")&&a(b.code)){const O=b;E.code=O.code,O.message&&typeof O.message=="string"?(E.message=O.message,p(O,"data")&&(E.data=O.data)):(E.message=o(E.code),E.data={originalError:d(b)})}else{E.code=x.code;const O=(L=b)===null||L===void 0?void 0:L.message;E.message=O&&typeof O=="string"?O:x.message,E.data={originalError:d(b)}}const I=(N=b)===null||N===void 0?void 0:N.stack;return R&&b&&I&&typeof I=="string"&&(E.stack=I),E}t.serializeError=c;function l(b){return b>=-32099&&b<=-32e3}function d(b){return b&&typeof b=="object"&&!Array.isArray(b)?Object.assign({},b):b}function p(b,x){return Object.prototype.hasOwnProperty.call(b,x)}})(Cu);var no={};Object.defineProperty(no,"__esModule",{value:!0});no.ethErrors=void 0;const Ru=Rr,ih=Cu,ht=Ir;no.ethErrors={rpc:{parse:t=>At(ht.errorCodes.rpc.parse,t),invalidRequest:t=>At(ht.errorCodes.rpc.invalidRequest,t),invalidParams:t=>At(ht.errorCodes.rpc.invalidParams,t),methodNotFound:t=>At(ht.errorCodes.rpc.methodNotFound,t),internal:t=>At(ht.errorCodes.rpc.internal,t),server:t=>{if(!t||typeof t!="object"||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return At(e,t)},invalidInput:t=>At(ht.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>At(ht.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>At(ht.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>At(ht.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>At(ht.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>At(ht.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>Mi(ht.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>Mi(ht.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>Mi(ht.errorCodes.provider.unsupportedMethod,t),disconnected:t=>Mi(ht.errorCodes.provider.disconnected,t),chainDisconnected:t=>Mi(ht.errorCodes.provider.chainDisconnected,t),custom:t=>{if(!t||typeof t!="object"||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:r,data:n}=t;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new Ru.EthereumProviderError(e,r,n)}}};function At(t,e){const[r,n]=sh(e);return new Ru.EthereumRpcError(t,r||ih.getMessageFromCode(t),n)}function Mi(t,e){const[r,n]=sh(e);return new Ru.EthereumProviderError(t,r||ih.getMessageFromCode(t),n)}function sh(t){if(t){if(typeof t=="string")return[t];if(typeof t=="object"&&!Array.isArray(t)){const{message:e,data:r}=t;if(e&&typeof e!="string")throw new Error("Must specify string message.");return[e||void 0,r]}}return[]}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getMessageFromCode=t.serializeError=t.EthereumProviderError=t.EthereumRpcError=t.ethErrors=t.errorCodes=void 0;const e=Rr;Object.defineProperty(t,"EthereumRpcError",{enumerable:!0,get:function(){return e.EthereumRpcError}}),Object.defineProperty(t,"EthereumProviderError",{enumerable:!0,get:function(){return e.EthereumProviderError}});const r=Cu;Object.defineProperty(t,"serializeError",{enumerable:!0,get:function(){return r.serializeError}}),Object.defineProperty(t,"getMessageFromCode",{enumerable:!0,get:function(){return r.getMessageFromCode}});const n=no;Object.defineProperty(t,"ethErrors",{enumerable:!0,get:function(){return n.ethErrors}});const i=Ir;Object.defineProperty(t,"errorCodes",{enumerable:!0,get:function(){return i.errorCodes}})})(Yf);var we={},io={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Web3Method=void 0,function(e){e.requestEthereumAccounts="requestEthereumAccounts",e.signEthereumMessage="signEthereumMessage",e.signEthereumTransaction="signEthereumTransaction",e.submitEthereumTransaction="submitEthereumTransaction",e.ethereumAddressFromSignedMessage="ethereumAddressFromSignedMessage",e.scanQRCode="scanQRCode",e.generic="generic",e.childRequestEthereumAccounts="childRequestEthereumAccounts",e.addEthereumChain="addEthereumChain",e.switchEthereumChain="switchEthereumChain",e.makeEthereumJSONRPCRequest="makeEthereumJSONRPCRequest",e.watchAsset="watchAsset",e.selectProvider="selectProvider"}(t.Web3Method||(t.Web3Method={}))})(io);Object.defineProperty(we,"__esModule",{value:!0});we.EthereumAddressFromSignedMessageResponse=we.SubmitEthereumTransactionResponse=we.SignEthereumTransactionResponse=we.SignEthereumMessageResponse=we.isRequestEthereumAccountsResponse=we.SelectProviderResponse=we.WatchAssetReponse=we.RequestEthereumAccountsResponse=we.SwitchEthereumChainResponse=we.AddEthereumChainResponse=we.isErrorResponse=void 0;const ur=io;function B0(t){var e,r;return((e=t)===null||e===void 0?void 0:e.method)!==void 0&&((r=t)===null||r===void 0?void 0:r.errorMessage)!==void 0}we.isErrorResponse=B0;function F0(t){return{method:ur.Web3Method.addEthereumChain,result:t}}we.AddEthereumChainResponse=F0;function W0(t){return{method:ur.Web3Method.switchEthereumChain,result:t}}we.SwitchEthereumChainResponse=W0;function H0(t){return{method:ur.Web3Method.requestEthereumAccounts,result:t}}we.RequestEthereumAccountsResponse=H0;function V0(t){return{method:ur.Web3Method.watchAsset,result:t}}we.WatchAssetReponse=V0;function U0(t){return{method:ur.Web3Method.selectProvider,result:t}}we.SelectProviderResponse=U0;function z0(t){return t&&t.method===ur.Web3Method.requestEthereumAccounts}we.isRequestEthereumAccountsResponse=z0;function q0(t){return{method:ur.Web3Method.signEthereumMessage,result:t}}we.SignEthereumMessageResponse=q0;function G0(t){return{method:ur.Web3Method.signEthereumTransaction,result:t}}we.SignEthereumTransactionResponse=G0;function J0(t){return{method:ur.Web3Method.submitEthereumTransaction,result:t}}we.SubmitEthereumTransactionResponse=J0;function Z0(t){return{method:ur.Web3Method.ethereumAddressFromSignedMessage,result:t}}we.EthereumAddressFromSignedMessageResponse=Z0;var hi={};Object.defineProperty(hi,"__esModule",{value:!0});hi.LIB_VERSION=void 0;hi.LIB_VERSION="3.7.2";(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCode=t.serializeError=t.standardErrors=t.standardErrorMessage=t.standardErrorCodes=void 0;const e=Yf,r=we,n=hi;t.standardErrorCodes=Object.freeze(Object.assign(Object.assign({},e.errorCodes),{provider:Object.freeze(Object.assign(Object.assign({},e.errorCodes.provider),{unsupportedChain:4902}))}));function i(d){return d!==void 0?(0,e.getMessageFromCode)(d):"Unknown error"}t.standardErrorMessage=i,t.standardErrors=Object.freeze(Object.assign(Object.assign({},e.ethErrors),{provider:Object.freeze(Object.assign(Object.assign({},e.ethErrors.provider),{unsupportedChain:(d="")=>e.ethErrors.provider.custom({code:t.standardErrorCodes.provider.unsupportedChain,message:`Unrecognized chain ID ${d}. Try adding the chain using wallet_addEthereumChain first.`})}))}));function s(d,p){const b=(0,e.serializeError)(o(d),{shouldIncludeStack:!0}),x=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");x.searchParams.set("version",n.LIB_VERSION),x.searchParams.set("code",b.code.toString());const R=a(b.data,p);return R&&x.searchParams.set("method",R),x.searchParams.set("message",b.message),Object.assign(Object.assign({},b),{docUrl:x.href})}t.serializeError=s;function o(d){return typeof d=="string"?{message:d,code:t.standardErrorCodes.rpc.internal}:(0,r.isErrorResponse)(d)?Object.assign(Object.assign({},d),{message:d.errorMessage,code:d.errorCode,data:{method:d.method,result:d.result}}):d}function a(d,p){var b;const x=(b=d)===null||b===void 0?void 0:b.method;if(x)return x;if(p!==void 0)return typeof p=="string"?p:Array.isArray(p)?p.length>0?p[0].method:void 0:p.method}function c(d){var p;if(typeof d=="number")return d;if(l(d))return(p=d.code)!==null&&p!==void 0?p:d.errorCode}t.getErrorCode=c;function l(d){return typeof d=="object"&&d!==null&&(typeof d.code=="number"||typeof d.errorCode=="number")}})(qi);var di={},oh={exports:{}},Xa={exports:{}};typeof Object.create=="function"?Xa.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Xa.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}};var qt=Xa.exports,eu={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh */(function(t,e){var r=Ks,n=r.Buffer;function i(o,a){for(var c in o)a[c]=o[c]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(i(r,e),e.Buffer=s);function s(o,a,c){return n(o,a,c)}s.prototype=Object.create(n.prototype),i(n,s),s.from=function(o,a,c){if(typeof o=="number")throw new TypeError("Argument must not be a number");return n(o,a,c)},s.alloc=function(o,a,c){if(typeof o!="number")throw new TypeError("Argument must be a number");var l=n(o);return a!==void 0?typeof c=="string"?l.fill(a,c):l.fill(a):l.fill(0),l},s.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return n(o)},s.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(o)}})(eu,eu.exports);var Lr=eu.exports,ah=Lr.Buffer;function so(t,e){this._block=ah.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}so.prototype.update=function(t,e){typeof t=="string"&&(e=e||"utf8",t=ah.from(t,e));for(var r=this._block,n=this._blockSize,i=t.length,s=this._len,o=0;o=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=this._len*8;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(r&4294967295)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var s=this._hash();return t?s.toString(t):s};so.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var pi=so,Q0=qt,uh=pi,Y0=Lr.Buffer,K0=[1518500249,1859775393,-1894007588,-899497514],X0=new Array(80);function Gi(){this.init(),this._w=X0,uh.call(this,64,56)}Q0(Gi,uh);Gi.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function eg(t){return t<<5|t>>>27}function tg(t){return t<<30|t>>>2}function rg(t,e,r,n){return t===0?e&r|~e&n:t===2?e&r|e&n|r&n:e^r^n}Gi.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,i=this._c|0,s=this._d|0,o=this._e|0,a=0;a<16;++a)e[a]=t.readInt32BE(a*4);for(;a<80;++a)e[a]=e[a-3]^e[a-8]^e[a-14]^e[a-16];for(var c=0;c<80;++c){var l=~~(c/20),d=eg(r)+rg(l,n,i,s)+o+e[c]+K0[l]|0;o=s,s=i,i=tg(n),n=r,r=d}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=o+this._e|0};Gi.prototype._hash=function(){var t=Y0.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};var ng=Gi,ig=qt,ch=pi,sg=Lr.Buffer,og=[1518500249,1859775393,-1894007588,-899497514],ag=new Array(80);function Ji(){this.init(),this._w=ag,ch.call(this,64,56)}ig(Ji,ch);Ji.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function ug(t){return t<<1|t>>>31}function cg(t){return t<<5|t>>>27}function lg(t){return t<<30|t>>>2}function fg(t,e,r,n){return t===0?e&r|~e&n:t===2?e&r|e&n|r&n:e^r^n}Ji.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,i=this._c|0,s=this._d|0,o=this._e|0,a=0;a<16;++a)e[a]=t.readInt32BE(a*4);for(;a<80;++a)e[a]=ug(e[a-3]^e[a-8]^e[a-14]^e[a-16]);for(var c=0;c<80;++c){var l=~~(c/20),d=cg(r)+fg(l,n,i,s)+o+e[c]+og[l]|0;o=s,s=i,i=lg(n),n=r,r=d}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=o+this._e|0};Ji.prototype._hash=function(){var t=sg.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};var hg=Ji,dg=qt,lh=pi,pg=Lr.Buffer,gg=[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],bg=new Array(64);function Zi(){this.init(),this._w=bg,lh.call(this,64,56)}dg(Zi,lh);Zi.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};function vg(t,e,r){return r^t&(e^r)}function yg(t,e,r){return t&e|r&(t|e)}function mg(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function wg(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function _g(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function Sg(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}Zi.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,i=this._c|0,s=this._d|0,o=this._e|0,a=this._f|0,c=this._g|0,l=this._h|0,d=0;d<16;++d)e[d]=t.readInt32BE(d*4);for(;d<64;++d)e[d]=Sg(e[d-2])+e[d-7]+_g(e[d-15])+e[d-16]|0;for(var p=0;p<64;++p){var b=l+wg(o)+vg(o,a,c)+gg[p]+e[p]|0,x=mg(r)+yg(r,n,i)|0;l=c,c=a,a=o,o=s+b|0,s=i,i=n,n=r,r=b+x|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=o+this._e|0,this._f=a+this._f|0,this._g=c+this._g|0,this._h=l+this._h|0};Zi.prototype._hash=function(){var t=pg.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t};var fh=Zi,Eg=qt,Mg=fh,xg=pi,Cg=Lr.Buffer,Rg=new Array(64);function oo(){this.init(),this._w=Rg,xg.call(this,64,56)}Eg(oo,Mg);oo.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};oo.prototype._hash=function(){var t=Cg.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};var Ig=oo,Ag=qt,hh=pi,kg=Lr.Buffer,$c=[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],Tg=new Array(160);function Qi(){this.init(),this._w=Tg,hh.call(this,128,112)}Ag(Qi,hh);Qi.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};function Dc(t,e,r){return r^t&(e^r)}function jc(t,e,r){return t&e|r&(t|e)}function Bc(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function Fc(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function Og(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function Ng(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function Lg(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function Pg(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function nt(t,e){return t>>>0>>0?1:0}Qi.prototype._update=function(t){for(var e=this._w,r=this._ah|0,n=this._bh|0,i=this._ch|0,s=this._dh|0,o=this._eh|0,a=this._fh|0,c=this._gh|0,l=this._hh|0,d=this._al|0,p=this._bl|0,b=this._cl|0,x=this._dl|0,R=this._el|0,L=this._fl|0,N=this._gl|0,E=this._hl|0,I=0;I<32;I+=2)e[I]=t.readInt32BE(I*4),e[I+1]=t.readInt32BE(I*4+4);for(;I<160;I+=2){var O=e[I-30],$=e[I-15*2+1],P=Og(O,$),j=Ng($,O);O=e[I-2*2],$=e[I-2*2+1];var G=Lg(O,$),z=Pg($,O),W=e[I-7*2],K=e[I-7*2+1],Y=e[I-16*2],X=e[I-16*2+1],v=j+K|0,u=P+W+nt(v,j)|0;v=v+z|0,u=u+G+nt(v,z)|0,v=v+X|0,u=u+Y+nt(v,X)|0,e[I]=u,e[I+1]=v}for(var h=0;h<160;h+=2){u=e[h],v=e[h+1];var g=jc(r,n,i),y=jc(d,p,b),w=Bc(r,d),C=Bc(d,r),k=Fc(o,R),m=Fc(R,o),f=$c[h],M=$c[h+1],U=Dc(o,a,c),q=Dc(R,L,N),A=E+m|0,T=l+k+nt(A,E)|0;A=A+q|0,T=T+U+nt(A,q)|0,A=A+M|0,T=T+f+nt(A,M)|0,A=A+v|0,T=T+u+nt(A,v)|0;var D=C+y|0,V=w+g+nt(D,C)|0;l=c,E=N,c=a,N=L,a=o,L=R,R=x+A|0,o=s+T+nt(R,x)|0,s=i,x=b,i=n,b=p,n=r,p=d,d=A+D|0,r=T+V+nt(d,A)|0}this._al=this._al+d|0,this._bl=this._bl+p|0,this._cl=this._cl+b|0,this._dl=this._dl+x|0,this._el=this._el+R|0,this._fl=this._fl+L|0,this._gl=this._gl+N|0,this._hl=this._hl+E|0,this._ah=this._ah+r+nt(this._al,d)|0,this._bh=this._bh+n+nt(this._bl,p)|0,this._ch=this._ch+i+nt(this._cl,b)|0,this._dh=this._dh+s+nt(this._dl,x)|0,this._eh=this._eh+o+nt(this._el,R)|0,this._fh=this._fh+a+nt(this._fl,L)|0,this._gh=this._gh+c+nt(this._gl,N)|0,this._hh=this._hh+l+nt(this._hl,E)|0};Qi.prototype._hash=function(){var t=kg.allocUnsafe(64);function e(r,n,i){t.writeInt32BE(r,i),t.writeInt32BE(n,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t};var dh=Qi,$g=qt,Dg=dh,jg=pi,Bg=Lr.Buffer,Fg=new Array(160);function ao(){this.init(),this._w=Fg,jg.call(this,128,112)}$g(ao,Dg);ao.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};ao.prototype._hash=function(){var t=Bg.allocUnsafe(48);function e(r,n,i){t.writeInt32BE(r,i),t.writeInt32BE(n,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t};var Wg=ao,gn=oh.exports=function(e){e=e.toLowerCase();var r=gn[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r};gn.sha=ng;gn.sha1=hg;gn.sha224=Ig;gn.sha256=fh;gn.sha384=Wg;gn.sha512=dh;var Hg=oh.exports,Z={},Vg=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[r]=i;for(r in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var s=Object.getOwnPropertySymbols(e);if(s.length!==1||s[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,r);if(o.value!==i||o.enumerable!==!0)return!1}return!0},Wc=typeof Symbol<"u"&&Symbol,Ug=Vg,zg=function(){return typeof Wc!="function"||typeof Symbol!="function"||typeof Wc("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Ug()},Hc={foo:{}},qg=Object,Gg=function(){return{__proto__:Hc}.foo===Hc.foo&&!({__proto__:null}instanceof qg)},Jg="Function.prototype.bind called on incompatible ",Zg=Object.prototype.toString,Qg=Math.max,Yg="[object Function]",Vc=function(e,r){for(var n=[],i=0;i"u"||!ot?ce:ot(Uint8Array),un={"%AggregateError%":typeof AggregateError>"u"?ce:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ce:ArrayBuffer,"%ArrayIteratorPrototype%":Nn&&ot?ot([][Symbol.iterator]()):ce,"%AsyncFromSyncIteratorPrototype%":ce,"%AsyncFunction%":Fn,"%AsyncGenerator%":Fn,"%AsyncGeneratorFunction%":Fn,"%AsyncIteratorPrototype%":Fn,"%Atomics%":typeof Atomics>"u"?ce:Atomics,"%BigInt%":typeof BigInt>"u"?ce:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ce:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ce:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ce:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?ce:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ce:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ce:FinalizationRegistry,"%Function%":ph,"%GeneratorFunction%":Fn,"%Int8Array%":typeof Int8Array>"u"?ce:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ce:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ce:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Nn&&ot?ot(ot([][Symbol.iterator]())):ce,"%JSON%":typeof JSON=="object"?JSON:ce,"%Map%":typeof Map>"u"?ce:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Nn||!ot?ce:ot(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ce:Promise,"%Proxy%":typeof Proxy>"u"?ce:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?ce:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ce:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Nn||!ot?ce:ot(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ce:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Nn&&ot?ot(""[Symbol.iterator]()):ce,"%Symbol%":Nn?Symbol:ce,"%SyntaxError%":Yn,"%ThrowTypeError%":ob,"%TypedArray%":ub,"%TypeError%":zn,"%Uint8Array%":typeof Uint8Array>"u"?ce:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ce:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ce:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ce:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?ce:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ce:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ce:WeakSet};if(ot)try{null.error}catch(t){var cb=ot(ot(t));un["%Error.prototype%"]=cb}var lb=function t(e){var r;if(e==="%AsyncFunction%")r=la("async function () {}");else if(e==="%GeneratorFunction%")r=la("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=la("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&ot&&(r=ot(i.prototype))}return un[e]=r,r},Uc={"%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"]},Yi=Iu,Ds=sb,fb=Yi.call(Function.call,Array.prototype.concat),hb=Yi.call(Function.apply,Array.prototype.splice),zc=Yi.call(Function.call,String.prototype.replace),js=Yi.call(Function.call,String.prototype.slice),db=Yi.call(Function.call,RegExp.prototype.exec),pb=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,gb=/\\(\\)?/g,bb=function(e){var r=js(e,0,1),n=js(e,-1);if(r==="%"&&n!=="%")throw new Yn("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Yn("invalid intrinsic syntax, expected opening `%`");var i=[];return zc(e,pb,function(s,o,a,c){i[i.length]=a?zc(c,gb,"$1"):o||s}),i},vb=function(e,r){var n=e,i;if(Ds(Uc,n)&&(i=Uc[n],n="%"+i[0]+"%"),Ds(un,n)){var s=un[n];if(s===Fn&&(s=lb(n)),typeof s>"u"&&!r)throw new zn("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:s}}throw new Yn("intrinsic "+e+" does not exist!")},bn=function(e,r){if(typeof e!="string"||e.length===0)throw new zn("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new zn('"allowMissing" argument must be a boolean');if(db(/^%?[^%]*%?$/,e)===null)throw new Yn("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=bb(e),i=n.length>0?n[0]:"",s=vb("%"+i+"%",r),o=s.name,a=s.value,c=!1,l=s.alias;l&&(i=l[0],hb(n,fb([0,1],l)));for(var d=1,p=!0;d=n.length){var L=an(a,b);p=!!L,p&&"get"in L&&!("originalValue"in L.get)?a=L.get:a=a[b]}else p=Ds(a,b),a=a[b];p&&!c&&(un[o]=a)}}return a},gh={exports:{}},yb=bn,tu=yb("%Object.defineProperty%",!0),ru=function(){if(tu)try{return tu({},"a",{value:1}),!0}catch{return!1}return!1};ru.hasArrayLengthDefineBug=function(){if(!ru())return null;try{return tu([],"length",{value:1}).length!==1}catch{return!0}};var bh=ru,mb=bn,Ts=mb("%Object.getOwnPropertyDescriptor%",!0);if(Ts)try{Ts([],"length")}catch{Ts=null}var vh=Ts,wb=bh(),Au=bn,Oi=wb&&Au("%Object.defineProperty%",!0);if(Oi)try{Oi({},"a",{value:1})}catch{Oi=!1}var _b=Au("%SyntaxError%"),Ln=Au("%TypeError%"),qc=vh,Sb=function(e,r,n){if(!e||typeof e!="object"&&typeof e!="function")throw new Ln("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new Ln("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Ln("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Ln("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Ln("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Ln("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,c=!!qc&&qc(e,r);if(Oi)Oi(e,r,{configurable:o===null&&c?c.configurable:!o,enumerable:i===null&&c?c.enumerable:!i,value:n,writable:s===null&&c?c.writable:!s});else if(a||!i&&!s&&!o)e[r]=n;else throw new _b("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},yh=bn,Gc=Sb,Eb=bh(),Jc=vh,Zc=yh("%TypeError%"),Mb=yh("%Math.floor%"),xb=function(e,r){if(typeof e!="function")throw new Zc("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||Mb(r)!==r)throw new Zc("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,s=!0;if("length"in e&&Jc){var o=Jc(e,"length");o&&!o.configurable&&(i=!1),o&&!o.writable&&(s=!1)}return(i||s||!n)&&(Eb?Gc(e,"length",r,!0,!0):Gc(e,"length",r)),e};(function(t){var e=Iu,r=bn,n=xb,i=r("%TypeError%"),s=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),a=r("%Reflect.apply%",!0)||e.call(o,s),c=r("%Object.defineProperty%",!0),l=r("%Math.max%");if(c)try{c({},"a",{value:1})}catch{c=null}t.exports=function(b){if(typeof b!="function")throw new i("a function is required");var x=a(e,o,arguments);return n(x,1+l(0,b.length-(arguments.length-1)),!0)};var d=function(){return a(e,s,arguments)};c?c(t.exports,"apply",{value:d}):t.exports.apply=d})(gh);var Cb=gh.exports,mh=bn,wh=Cb,Rb=wh(mh("String.prototype.indexOf")),Ib=function(e,r){var n=mh(e,!!r);return typeof n=="function"&&Rb(e,".prototype.")>-1?wh(n):n},ku=typeof Map=="function"&&Map.prototype,ha=Object.getOwnPropertyDescriptor&&ku?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Bs=ku&&ha&&typeof ha.get=="function"?ha.get:null,Qc=ku&&Map.prototype.forEach,Tu=typeof Set=="function"&&Set.prototype,da=Object.getOwnPropertyDescriptor&&Tu?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Fs=Tu&&da&&typeof da.get=="function"?da.get:null,Yc=Tu&&Set.prototype.forEach,Ab=typeof WeakMap=="function"&&WeakMap.prototype,Ni=Ab?WeakMap.prototype.has:null,kb=typeof WeakSet=="function"&&WeakSet.prototype,Li=kb?WeakSet.prototype.has:null,Tb=typeof WeakRef=="function"&&WeakRef.prototype,Kc=Tb?WeakRef.prototype.deref:null,Ob=Boolean.prototype.valueOf,Nb=Object.prototype.toString,Lb=Function.prototype.toString,Pb=String.prototype.match,Ou=String.prototype.slice,xr=String.prototype.replace,$b=String.prototype.toUpperCase,Xc=String.prototype.toLowerCase,_h=RegExp.prototype.test,el=Array.prototype.concat,rr=Array.prototype.join,Db=Array.prototype.slice,tl=Math.floor,nu=typeof BigInt=="function"?BigInt.prototype.valueOf:null,pa=Object.getOwnPropertySymbols,iu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Kn=typeof Symbol=="function"&&typeof Symbol.iterator=="object",bt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Kn||"symbol")?Symbol.toStringTag:null,Sh=Object.prototype.propertyIsEnumerable,rl=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function nl(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||_h.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-tl(-t):tl(t);if(n!==t){var i=String(n),s=Ou.call(e,i.length+1);return xr.call(i,r,"$&_")+"."+xr.call(xr.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return xr.call(e,r,"$&_")}var su=Ys,il=su.custom,sl=Mh(il)?il:null,jb=function t(e,r,n,i){var s=r||{};if(Sr(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Sr(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=Sr(s,"customInspect")?s.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Sr(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Sr(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=s.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return Ch(e,s);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var c=String(e);return a?nl(e,c):c}if(typeof e=="bigint"){var l=String(e)+"n";return a?nl(e,l):l}var d=typeof s.depth>"u"?5:s.depth;if(typeof n>"u"&&(n=0),n>=d&&d>0&&typeof e=="object")return ou(e)?"[Array]":"[Object]";var p=rv(s,n);if(typeof i>"u")i=[];else if(xh(i,e)>=0)return"[Circular]";function b(v,u,h){if(u&&(i=Db.call(i),i.push(u)),h){var g={depth:s.depth};return Sr(s,"quoteStyle")&&(g.quoteStyle=s.quoteStyle),t(v,g,n+1,i)}return t(v,s,n+1,i)}if(typeof e=="function"&&!ol(e)){var x=Gb(e),R=bs(e,b);return"[Function"+(x?": "+x:" (anonymous)")+"]"+(R.length>0?" { "+rr.call(R,", ")+" }":"")}if(Mh(e)){var L=Kn?xr.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):iu.call(e);return typeof e=="object"&&!Kn?xi(L):L}if(Xb(e)){for(var N="<"+Xc.call(String(e.nodeName)),E=e.attributes||[],I=0;I",N}if(ou(e)){if(e.length===0)return"[]";var O=bs(e,b);return p&&!tv(O)?"["+au(O,p)+"]":"[ "+rr.call(O,", ")+" ]"}if(Wb(e)){var $=bs(e,b);return!("cause"in Error.prototype)&&"cause"in e&&!Sh.call(e,"cause")?"{ ["+String(e)+"] "+rr.call(el.call("[cause]: "+b(e.cause),$),", ")+" }":$.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+rr.call($,", ")+" }"}if(typeof e=="object"&&o){if(sl&&typeof e[sl]=="function"&&su)return su(e,{depth:d-n});if(o!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(Jb(e)){var P=[];return Qc&&Qc.call(e,function(v,u){P.push(b(u,e,!0)+" => "+b(v,e))}),al("Map",Bs.call(e),P,p)}if(Yb(e)){var j=[];return Yc&&Yc.call(e,function(v){j.push(b(v,e))}),al("Set",Fs.call(e),j,p)}if(Zb(e))return ga("WeakMap");if(Kb(e))return ga("WeakSet");if(Qb(e))return ga("WeakRef");if(Vb(e))return xi(b(Number(e)));if(zb(e))return xi(b(nu.call(e)));if(Ub(e))return xi(Ob.call(e));if(Hb(e))return xi(b(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(e===J)return"{ [object globalThis] }";if(!Fb(e)&&!ol(e)){var G=bs(e,b),z=rl?rl(e)===Object.prototype:e instanceof Object||e.constructor===Object,W=e instanceof Object?"":"null prototype",K=!z&&bt&&Object(e)===e&&bt in e?Ou.call(Pr(e),8,-1):W?"Object":"",Y=z||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",X=Y+(K||W?"["+rr.call(el.call([],K||[],W||[]),": ")+"] ":"");return G.length===0?X+"{}":p?X+"{"+au(G,p)+"}":X+"{ "+rr.call(G,", ")+" }"}return String(e)};function Eh(t,e,r){var n=(r.quoteStyle||e)==="double"?'"':"'";return n+t+n}function Bb(t){return xr.call(String(t),/"/g,""")}function ou(t){return Pr(t)==="[object Array]"&&(!bt||!(typeof t=="object"&&bt in t))}function Fb(t){return Pr(t)==="[object Date]"&&(!bt||!(typeof t=="object"&&bt in t))}function ol(t){return Pr(t)==="[object RegExp]"&&(!bt||!(typeof t=="object"&&bt in t))}function Wb(t){return Pr(t)==="[object Error]"&&(!bt||!(typeof t=="object"&&bt in t))}function Hb(t){return Pr(t)==="[object String]"&&(!bt||!(typeof t=="object"&&bt in t))}function Vb(t){return Pr(t)==="[object Number]"&&(!bt||!(typeof t=="object"&&bt in t))}function Ub(t){return Pr(t)==="[object Boolean]"&&(!bt||!(typeof t=="object"&&bt in t))}function Mh(t){if(Kn)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!iu)return!1;try{return iu.call(t),!0}catch{}return!1}function zb(t){if(!t||typeof t!="object"||!nu)return!1;try{return nu.call(t),!0}catch{}return!1}var qb=Object.prototype.hasOwnProperty||function(t){return t in this};function Sr(t,e){return qb.call(t,e)}function Pr(t){return Nb.call(t)}function Gb(t){if(t.name)return t.name;var e=Pb.call(Lb.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function xh(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Ch(Ou.call(t,0,e.maxStringLength),e)+n}var i=xr.call(xr.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,ev);return Eh(i,"single",e)}function ev(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+$b.call(e.toString(16))}function xi(t){return"Object("+t+")"}function ga(t){return t+" { ? }"}function al(t,e,r,n){var i=n?au(r,n):rr.call(r,", ");return t+" ("+e+") {"+i+"}"}function tv(t){for(var e=0;e=0)return!1;return!0}function rv(t,e){var r;if(t.indent===" ")r=" ";else if(typeof t.indent=="number"&&t.indent>0)r=rr.call(Array(t.indent+1)," ");else return null;return{base:r,prev:rr.call(Array(e+1),r)}}function au(t,e){if(t.length===0)return"";var r=` `+e.prev+e.base;return r+rr.call(t,","+r)+` `+e.prev}function bs(t,e){var r=ou(t),n=[];if(r){n.length=t.length;for(var i=0;i1;){var r=e.pop(),n=r.obj[r.prop];if(Xr(n)){for(var i=[],s=0;s=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||s===vv.RFC1738&&(l===40||l===41)){a+=o.charAt(c);continue}if(l<128){a=a+Qt[l];continue}if(l<2048){a=a+(Qt[192|l>>6]+Qt[128|l&63]);continue}if(l<55296||l>=57344){a=a+(Qt[224|l>>12]+Qt[128|l>>6&63]+Qt[128|l&63]);continue}c+=1,l=65536+((l&1023)<<10|o.charCodeAt(c)&1023),a+=Qt[240|l>>18]+Qt[128|l>>12&63]+Qt[128|l>>6&63]+Qt[128|l&63]}return a},Ev=function(e){for(var r=[{obj:{o:e},prop:"o"}],n=[],i=0;i"u"&&(O=0)}if(typeof c=="function"?E=c(r,E):E instanceof Date?E=p(E):n==="comma"&&hr(E)&&(E=Os.maybeMap(E,function(g){return g instanceof Date?p(g):g})),E===null){if(s)return a&&!R?a(r,gt.encoder,L,"key",b):r;E=""}if(Tv(E)||Os.isBuffer(E)){if(a){var j=R?r:a(r,gt.encoder,L,"key",b);return[x(j)+"="+x(a(E,gt.encoder,L,"value",b))]}return[x(r)+"="+x(String(E))]}var G=[];if(typeof E>"u")return G;var z;if(n==="comma"&&hr(E))R&&a&&(E=Os.maybeMap(E,a)),z=[{value:E.length>0?E.join(",")||null:void 0}];else if(hr(c))z=c;else{var W=Object.keys(E);z=l?W.sort(l):W}for(var K=i&&hr(E)&&E.length===1?r+"[]":r,Y=0;Y"u"?gt.allowDots:!!e.allowDots,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:gt.charsetSentinel,delimiter:typeof e.delimiter>"u"?gt.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:gt.encode,encoder:typeof e.encoder=="function"?e.encoder:gt.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:gt.encodeValuesOnly,filter:s,format:n,formatter:i,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:gt.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:gt.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:gt.strictNullHandling}},Lv=function(t,e){var r=t,n=Nv(e),i,s;typeof n.filter=="function"?(s=n.filter,r=s("",r)):hr(n.filter)&&(s=n.filter,i=s);var o=[];if(typeof r!="object"||r===null)return"";var a;e&&e.arrayFormat in ul?a=e.arrayFormat:e&&"indices"in e?a=e.indices?"indices":"repeat":a="indices";var c=ul[a];if(e&&"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var l=c==="comma"&&e&&e.commaRoundTrip;i||(i=Object.keys(r)),n.sort&&i.sort(n.sort);for(var d=Ah(),p=0;p0?R+x:""},Xn=Ih,uu=Object.prototype.hasOwnProperty,Pv=Array.isArray,it={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Xn.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},$v=function(t){return t.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})},Th=function(t,e){return t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1?t.split(","):t},Dv="utf8=%26%2310003%3B",jv="utf8=%E2%9C%93",Bv=function(e,r){var n={__proto__:null},i=r.ignoreQueryPrefix?e.replace(/^\?/,""):e,s=r.parameterLimit===1/0?void 0:r.parameterLimit,o=i.split(r.delimiter,s),a=-1,c,l=r.charset;if(r.charsetSentinel)for(c=0;c-1&&(R=Pv(R)?[R]:R),uu.call(n,x)?n[x]=Xn.combine(n[x],R):n[x]=R}return n},Fv=function(t,e,r,n){for(var i=n?e:Th(e,r),s=t.length-1;s>=0;--s){var o,a=t[s];if(a==="[]"&&r.parseArrays)o=[].concat(i);else{o=r.plainObjects?Object.create(null):{};var c=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,l=parseInt(c,10);!r.parseArrays&&c===""?o={0:i}:!isNaN(l)&&a!==c&&String(l)===c&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(o=[],o[l]=i):c!=="__proto__"&&(o[c]=i)}i=o}return i},Wv=function(e,r,n,i){if(e){var s=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,c=n.depth>0&&o.exec(s),l=c?s.slice(0,c.index):s,d=[];if(l){if(!n.plainObjects&&uu.call(Object.prototype,l)&&!n.allowPrototypes)return;d.push(l)}for(var p=0;n.depth>0&&(c=a.exec(s))!==null&&p"u"?it.charset:e.charset;return{allowDots:typeof e.allowDots>"u"?it.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:it.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:it.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:it.arrayLimit,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:it.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:it.comma,decoder:typeof e.decoder=="function"?e.decoder:it.decoder,delimiter:typeof e.delimiter=="string"||Xn.isRegExp(e.delimiter)?e.delimiter:it.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:it.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:it.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:it.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:it.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:it.strictNullHandling}},Vv=function(t,e){var r=Hv(e);if(t===""||t===null||typeof t>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof t=="string"?Bv(t,r):t,i=r.plainObjects?Object.create(null):{},s=Object.keys(n),o=0;on}t.OpaqueType=e,t.HexString=e(),t.AddressString=e(),t.BigIntString=e();function r(n){return Math.floor(n)}t.IntNumber=r,t.RegExpString=e(),function(n){n.CoinbaseWallet="CoinbaseWallet",n.MetaMask="MetaMask",n.Unselected=""}(t.ProviderType||(t.ProviderType={}))})(Ki);var Jv=J&&J.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Z,"__esModule",{value:!0});Z.isInIFrame=Z.createQrUrl=Z.getFavicon=Z.range=Z.isBigNumber=Z.ensureParsedJSONObject=Z.ensureBN=Z.ensureRegExpString=Z.ensureIntNumber=Z.ensureBuffer=Z.ensureAddressString=Z.ensureEvenLengthHexString=Z.ensureHexString=Z.isHexString=Z.prepend0x=Z.strip0x=Z.has0xPrefix=Z.hexStringFromIntNumber=Z.intNumberFromHexString=Z.bigIntStringFromBN=Z.hexStringFromBuffer=Z.hexStringToUint8Array=Z.uint8ArrayToHex=Z.randomBytesHex=void 0;const Er=Jv(Xs),Zv=Gv,vn=qi,$t=Ki,Oh=/^[0-9]*$/,Nh=/^[a-f0-9]*$/;function Qv(t){return Lh(crypto.getRandomValues(new Uint8Array(t)))}Z.randomBytesHex=Qv;function Lh(t){return[...t].map(e=>e.toString(16).padStart(2,"0")).join("")}Z.uint8ArrayToHex=Lh;function Yv(t){return new Uint8Array(t.match(/.{1,2}/g).map(e=>parseInt(e,16)))}Z.hexStringToUint8Array=Yv;function Kv(t,e=!1){const r=t.toString("hex");return(0,$t.HexString)(e?"0x"+r:r)}Z.hexStringFromBuffer=Kv;function Xv(t){return(0,$t.BigIntString)(t.toString(10))}Z.bigIntStringFromBN=Xv;function ey(t){return(0,$t.IntNumber)(new Er.default(es(t,!1),16).toNumber())}Z.intNumberFromHexString=ey;function ty(t){return(0,$t.HexString)("0x"+new Er.default(t).toString(16))}Z.hexStringFromIntNumber=ty;function $u(t){return t.startsWith("0x")||t.startsWith("0X")}Z.has0xPrefix=$u;function uo(t){return $u(t)?t.slice(2):t}Z.strip0x=uo;function Ph(t){return $u(t)?"0x"+t.slice(2):"0x"+t}Z.prepend0x=Ph;function Xi(t){if(typeof t!="string")return!1;const e=uo(t).toLowerCase();return Nh.test(e)}Z.isHexString=Xi;function $h(t,e=!1){if(typeof t=="string"){const r=uo(t).toLowerCase();if(Nh.test(r))return(0,$t.HexString)(e?"0x"+r:r)}throw vn.standardErrors.rpc.invalidParams(`"${String(t)}" is not a hexadecimal string`)}Z.ensureHexString=$h;function es(t,e=!1){let r=$h(t,!1);return r.length%2===1&&(r=(0,$t.HexString)("0"+r)),e?(0,$t.HexString)("0x"+r):r}Z.ensureEvenLengthHexString=es;function ry(t){if(typeof t=="string"){const e=uo(t).toLowerCase();if(Xi(e)&&e.length===40)return(0,$t.AddressString)(Ph(e))}throw vn.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(t)}`)}Z.ensureAddressString=ry;function ny(t){if(Buffer.isBuffer(t))return t;if(typeof t=="string")if(Xi(t)){const e=es(t,!1);return Buffer.from(e,"hex")}else return Buffer.from(t,"utf8");throw vn.standardErrors.rpc.invalidParams(`Not binary data: ${String(t)}`)}Z.ensureBuffer=ny;function Dh(t){if(typeof t=="number"&&Number.isInteger(t))return(0,$t.IntNumber)(t);if(typeof t=="string"){if(Oh.test(t))return(0,$t.IntNumber)(Number(t));if(Xi(t))return(0,$t.IntNumber)(new Er.default(es(t,!1),16).toNumber())}throw vn.standardErrors.rpc.invalidParams(`Not an integer: ${String(t)}`)}Z.ensureIntNumber=Dh;function iy(t){if(t instanceof RegExp)return(0,$t.RegExpString)(t.toString());throw vn.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(t)}`)}Z.ensureRegExpString=iy;function sy(t){if(t!==null&&(Er.default.isBN(t)||jh(t)))return new Er.default(t.toString(10),10);if(typeof t=="number")return new Er.default(Dh(t));if(typeof t=="string"){if(Oh.test(t))return new Er.default(t,10);if(Xi(t))return new Er.default(es(t,!1),16)}throw vn.standardErrors.rpc.invalidParams(`Not an integer: ${String(t)}`)}Z.ensureBN=sy;function oy(t){if(typeof t=="string")return JSON.parse(t);if(typeof t=="object")return t;throw vn.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(t)}`)}Z.ensureParsedJSONObject=oy;function jh(t){if(t==null||typeof t.constructor!="function")return!1;const{constructor:e}=t;return typeof e.config=="function"&&typeof e.EUCLID=="number"}Z.isBigNumber=jh;function ay(t,e){return Array.from({length:e-t},(r,n)=>t+n)}Z.range=ay;function uy(){const t=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:e,host:r}=document.location,n=t?t.getAttribute("href"):null;return!n||n.startsWith("javascript:")?null:n.startsWith("http://")||n.startsWith("https://")||n.startsWith("data:")?n:n.startsWith("//")?e+n:`${e}//${r}${n}`}Z.getFavicon=uy;function cy(t,e,r,n,i,s){const o=n?"parent-id":"id",a=(0,Zv.stringify)({[o]:t,secret:e,server:r,v:i,chainId:s});return`${r}/#/link?${a}`}Z.createQrUrl=cy;function ly(){try{return window.frameElement!==null}catch{return!1}}Z.isInIFrame=ly;Object.defineProperty(di,"__esModule",{value:!0});di.Session=void 0;const ll=Hg,fl=Z,hl="session:id",dl="session:secret",pl="session:linked";class Du{constructor(e,r,n,i){this._storage=e,this._id=r||(0,fl.randomBytesHex)(16),this._secret=n||(0,fl.randomBytesHex)(32),this._key=new ll.sha256().update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!i}static load(e){const r=e.getItem(hl),n=e.getItem(pl),i=e.getItem(dl);return r&&i?new Du(e,r,i,n==="1"):null}static hash(e){return new ll.sha256().update(e).digest("hex")}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(e){this._linked=e,this.persistLinked()}save(){return this._storage.setItem(hl,this._id),this._storage.setItem(dl,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(pl,this._linked?"1":"0")}}di.Session=Du;var zt={};Object.defineProperty(zt,"__esModule",{value:!0});zt.WalletSDKRelayAbstract=zt.APP_VERSION_KEY=zt.LOCAL_STORAGE_ADDRESSES_KEY=zt.WALLET_USER_NAME_KEY=void 0;const gl=qi;zt.WALLET_USER_NAME_KEY="walletUsername";zt.LOCAL_STORAGE_ADDRESSES_KEY="Addresses";zt.APP_VERSION_KEY="AppVersion";class fy{async makeEthereumJSONRPCRequest(e,r){if(!r)throw new Error("Error: No jsonRpcUrl provided");return window.fetch(r,{method:"POST",body:JSON.stringify(e),mode:"cors",headers:{"Content-Type":"application/json"}}).then(n=>n.json()).then(n=>{if(!n)throw gl.standardErrors.rpc.parse({});const i=n,{error:s}=i;if(s)throw(0,gl.serializeError)(s,e.method);return i})}}zt.WalletSDKRelayAbstract=fy;var cu={exports:{}},Bh=Eu.EventEmitter,ma,bl;function hy(){if(bl)return ma;bl=1;function t(R,L){var N=Object.keys(R);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(R);L&&(E=E.filter(function(I){return Object.getOwnPropertyDescriptor(R,I).enumerable})),N.push.apply(N,E)}return N}function e(R){for(var L=1;L0?this.tail.next=E:this.head=E,this.tail=E,++this.length}},{key:"unshift",value:function(N){var E={data:N,next:this.head};this.length===0&&(this.tail=E),this.head=E,++this.length}},{key:"shift",value:function(){if(this.length!==0){var N=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,N}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(N){if(this.length===0)return"";for(var E=this.head,I=""+E.data;E=E.next;)I+=N+E.data;return I}},{key:"concat",value:function(N){if(this.length===0)return l.alloc(0);for(var E=l.allocUnsafe(N>>>0),I=this.head,O=0;I;)x(I.data,E,O),O+=I.data.length,I=I.next;return E}},{key:"consume",value:function(N,E){var I;return N$.length?$.length:N;if(P===$.length?O+=$:O+=$.slice(0,N),N-=P,N===0){P===$.length?(++I,E.next?this.head=E.next:this.head=this.tail=null):(this.head=E,E.data=$.slice(P));break}++I}return this.length-=I,O}},{key:"_getBuffer",value:function(N){var E=l.allocUnsafe(N),I=this.head,O=1;for(I.data.copy(E),N-=I.data.length;I=I.next;){var $=I.data,P=N>$.length?$.length:N;if($.copy(E,E.length-N,0,P),N-=P,N===0){P===$.length?(++O,I.next?this.head=I.next:this.head=this.tail=null):(this.head=I,I.data=$.slice(P));break}++O}return this.length-=O,E}},{key:b,value:function(N,E){return p(this,e(e({},E),{},{depth:0,customInspect:!1}))}}]),R}(),ma}function dy(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(lu,this,t)):process.nextTick(lu,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(Ns,r):(r._writableState.errorEmitted=!0,process.nextTick(vl,r,s)):process.nextTick(vl,r,s):e?(process.nextTick(Ns,r),e(s)):process.nextTick(Ns,r)}),this)}function vl(t,e){lu(t,e),Ns(t)}function Ns(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function py(){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)}function lu(t,e){t.emit("error",e)}function gy(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}var Fh={destroy:dy,undestroy:py,errorOrDestroy:gy},yn={};function by(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var Wh={};function jt(t,e,r){r||(r=Error);function n(s,o,a){return typeof e=="string"?e:e(s,o,a)}var i=function(s){by(o,s);function o(a,c,l){return s.call(this,n(a,c,l))||this}return o}(r);i.prototype.name=r.name,i.prototype.code=t,Wh[t]=i}function yl(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map(function(n){return String(n)}),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:r===2?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}else return"of ".concat(e," ").concat(String(t))}function vy(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function yy(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function my(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}jt("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);jt("ERR_INVALID_ARG_TYPE",function(t,e,r){var n;typeof e=="string"&&vy(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";var i;if(yy(t," argument"))i="The ".concat(t," ").concat(n," ").concat(yl(e,"type"));else{var s=my(t,".")?"property":"argument";i='The "'.concat(t,'" ').concat(s," ").concat(n," ").concat(yl(e,"type"))}return i+=". Received type ".concat(typeof r),i},TypeError);jt("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");jt("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});jt("ERR_STREAM_PREMATURE_CLOSE","Premature close");jt("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});jt("ERR_MULTIPLE_CALLBACK","Callback called multiple times");jt("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");jt("ERR_STREAM_WRITE_AFTER_END","write after end");jt("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);jt("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);jt("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");yn.codes=Wh;var wy=yn.codes.ERR_INVALID_OPT_VALUE;function _y(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Sy(t,e,r,n){var i=_y(e,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var s=n?r:"highWaterMark";throw new wy(s,i)}return Math.floor(i)}return t.objectMode?16:16*1024}var Hh={getHighWaterMark:Sy},Ey=My;function My(t,e){if(wa("noDeprecation"))return t;var r=!1;function n(){if(!r){if(wa("throwDeprecation"))throw new Error(e);wa("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}return n}function wa(t){try{if(!J.localStorage)return!1}catch{return!1}var e=J.localStorage[t];return e==null?!1:String(e).toLowerCase()==="true"}var _a,ml;function Vh(){if(ml)return _a;ml=1,_a=z;function t(A){var T=this;this.next=null,this.entry=null,this.finish=function(){q(T,A)}}var e;z.WritableState=j;var r={deprecate:Ey},n=Bh,i=Ks.Buffer,s=(typeof J<"u"?J:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(A){return i.from(A)}function a(A){return i.isBuffer(A)||A instanceof s}var c=Fh,l=Hh,d=l.getHighWaterMark,p=yn.codes,b=p.ERR_INVALID_ARG_TYPE,x=p.ERR_METHOD_NOT_IMPLEMENTED,R=p.ERR_MULTIPLE_CALLBACK,L=p.ERR_STREAM_CANNOT_PIPE,N=p.ERR_STREAM_DESTROYED,E=p.ERR_STREAM_NULL_VALUES,I=p.ERR_STREAM_WRITE_AFTER_END,O=p.ERR_UNKNOWN_ENCODING,$=c.errorOrDestroy;qt(z,n);function P(){}function j(A,T,D){e=e||ei(),A=A||{},typeof D!="boolean"&&(D=T instanceof e),this.objectMode=!!A.objectMode,D&&(this.objectMode=this.objectMode||!!A.writableObjectMode),this.highWaterMark=d(this,A,"writableHighWaterMark",D),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var V=A.decodeStrings===!1;this.decodeStrings=!V,this.defaultEncoding=A.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(se){g(T,se)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=A.emitClose!==!1,this.autoDestroy=!!A.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}j.prototype.getBuffer=function(){for(var T=this.bufferedRequest,D=[];T;)D.push(T),T=T.next;return D},function(){try{Object.defineProperty(j.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var G;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(G=Function.prototype[Symbol.hasInstance],Object.defineProperty(z,Symbol.hasInstance,{value:function(T){return G.call(this,T)?!0:this!==z?!1:T&&T._writableState instanceof j}})):G=function(T){return T instanceof this};function z(A){e=e||ei();var T=this instanceof e;if(!T&&!G.call(z,this))return new z(A);this._writableState=new j(A,this,T),this.writable=!0,A&&(typeof A.write=="function"&&(this._write=A.write),typeof A.writev=="function"&&(this._writev=A.writev),typeof A.destroy=="function"&&(this._destroy=A.destroy),typeof A.final=="function"&&(this._final=A.final)),n.call(this)}z.prototype.pipe=function(){$(this,new L)};function W(A,T){var D=new I;$(A,D),process.nextTick(T,D)}function K(A,T,D,V){var se;return D===null?se=new E:typeof D!="string"&&!T.objectMode&&(se=new b("chunk",["string","Buffer"],D)),se?($(A,se),process.nextTick(V,se),!1):!0}z.prototype.write=function(A,T,D){var V=this._writableState,se=!1,_=!V.objectMode&&a(A);return _&&!i.isBuffer(A)&&(A=o(A)),typeof T=="function"&&(D=T,T=null),_?T="buffer":T||(T=V.defaultEncoding),typeof D!="function"&&(D=P),V.ending?W(this,D):(_||K(this,V,A,D))&&(V.pendingcb++,se=X(this,V,_,A,T,D)),se},z.prototype.cork=function(){this._writableState.corked++},z.prototype.uncork=function(){var A=this._writableState;A.corked&&(A.corked--,!A.writing&&!A.corked&&!A.bufferProcessing&&A.bufferedRequest&&C(this,A))},z.prototype.setDefaultEncoding=function(T){if(typeof T=="string"&&(T=T.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((T+"").toLowerCase())>-1))throw new O(T);return this._writableState.defaultEncoding=T,this},Object.defineProperty(z.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Y(A,T,D){return!A.objectMode&&A.decodeStrings!==!1&&typeof T=="string"&&(T=i.from(T,D)),T}Object.defineProperty(z.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function X(A,T,D,V,se,_){if(!D){var S=Y(T,V,se);V!==S&&(D=!0,se="buffer",V=S)}var F=T.objectMode?1:V.length;T.length+=F;var H=T.length>5===6?2:E>>4===14?3:E>>3===30?4:E>>6===2?-1:-2}function o(E,I,O){var $=I.length-1;if($=0?(P>0&&(E.lastNeed=P-1),P):--$=0?(P>0&&(E.lastNeed=P-2),P):--$=0?(P>0&&(P===2?P=0:E.lastNeed=P-3),P):0))}function a(E,I,O){if((I[0]&192)!==128)return E.lastNeed=0,"�";if(E.lastNeed>1&&I.length>1){if((I[1]&192)!==128)return E.lastNeed=1,"�";if(E.lastNeed>2&&I.length>2&&(I[2]&192)!==128)return E.lastNeed=2,"�"}}function c(E){var I=this.lastTotal-this.lastNeed,O=a(this,E);if(O!==void 0)return O;if(this.lastNeed<=E.length)return E.copy(this.lastChar,I,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);E.copy(this.lastChar,I,0,E.length),this.lastNeed-=E.length}function l(E,I){var O=o(this,E,I);if(!this.lastNeed)return E.toString("utf8",I);this.lastTotal=O;var $=E.length-(O-this.lastNeed);return E.copy(this.lastChar,0,$),E.toString("utf8",I,$)}function d(E){var I=E&&E.length?this.write(E):"";return this.lastNeed?I+"�":I}function p(E,I){if((E.length-I)%2===0){var O=E.toString("utf16le",I);if(O){var $=O.charCodeAt(O.length-1);if($>=55296&&$<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=E[E.length-2],this.lastChar[1]=E[E.length-1],O.slice(0,-1)}return O}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=E[E.length-1],E.toString("utf16le",I,E.length-1)}function b(E){var I=E&&E.length?this.write(E):"";if(this.lastNeed){var O=this.lastTotal-this.lastNeed;return I+this.lastChar.toString("utf16le",0,O)}return I}function x(E,I){var O=(E.length-I)%3;return O===0?E.toString("base64",I):(this.lastNeed=3-O,this.lastTotal=3,O===1?this.lastChar[0]=E[E.length-1]:(this.lastChar[0]=E[E.length-2],this.lastChar[1]=E[E.length-1]),E.toString("base64",I,E.length-O))}function R(E){var I=E&&E.length?this.write(E):"";return this.lastNeed?I+this.lastChar.toString("base64",0,3-this.lastNeed):I}function L(E){return E.toString(this.encoding)}function N(E){return E&&E.length?this.write(E):""}return Ea}var El=yn.codes.ERR_STREAM_PREMATURE_CLOSE;function xy(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i0)if(typeof S!="string"&&!ie.objectMode&&Object.getPrototypeOf(S)!==n.prototype&&(S=s(S)),H)ie.endEmitted?P(_,new E):Y(_,ie,S,!0);else if(ie.ended)P(_,new L);else{if(ie.destroyed)return!1;ie.reading=!1,ie.decoder&&!F?(S=ie.decoder.write(S),ie.objectMode||S.length!==0?Y(_,ie,S,!1):C(_,ie)):Y(_,ie,S,!1)}else H||(ie.reading=!1,C(_,ie))}return!ie.ended&&(ie.length=v?_=v:(_--,_|=_>>>1,_|=_>>>2,_|=_>>>4,_|=_>>>8,_|=_>>>16,_++),_}function h(_,S){return _<=0||S.length===0&&S.ended?0:S.objectMode?1:_!==_?S.flowing&&S.length?S.buffer.head.data.length:S.length:(_>S.highWaterMark&&(S.highWaterMark=u(_)),_<=S.length?_:S.ended?S.length:(S.needReadable=!0,0))}W.prototype.read=function(_){c("read",_),_=parseInt(_,10);var S=this._readableState,F=_;if(_!==0&&(S.emittedReadable=!1),_===0&&S.needReadable&&((S.highWaterMark!==0?S.length>=S.highWaterMark:S.length>0)||S.ended))return c("read: emitReadable",S.length,S.ended),S.length===0&&S.ended?D(this):y(this),null;if(_=h(_,S),_===0&&S.ended)return S.length===0&&D(this),null;var H=S.needReadable;c("need readable",H),(S.length===0||S.length-_0?re=T(_,S):re=null,re===null?(S.needReadable=S.length<=S.highWaterMark,_=0):(S.length-=_,S.awaitDrain=0),S.length===0&&(S.ended||(S.needReadable=!0),F!==_&&S.ended&&D(this)),re!==null&&this.emit("data",re),re};function g(_,S){if(c("onEofChunk"),!S.ended){if(S.decoder){var F=S.decoder.end();F&&F.length&&(S.buffer.push(F),S.length+=S.objectMode?1:F.length)}S.ended=!0,S.sync?y(_):(S.needReadable=!1,S.emittedReadable||(S.emittedReadable=!0,w(_)))}}function y(_){var S=_._readableState;c("emitReadable",S.needReadable,S.emittedReadable),S.needReadable=!1,S.emittedReadable||(c("emitReadable",S.flowing),S.emittedReadable=!0,process.nextTick(w,_))}function w(_){var S=_._readableState;c("emitReadable_",S.destroyed,S.length,S.ended),!S.destroyed&&(S.length||S.ended)&&(_.emit("readable"),S.emittedReadable=!1),S.needReadable=!S.flowing&&!S.ended&&S.length<=S.highWaterMark,A(_)}function C(_,S){S.readingMore||(S.readingMore=!0,process.nextTick(k,_,S))}function k(_,S){for(;!S.reading&&!S.ended&&(S.length1&&se(H.pipes,_)!==-1)&&!me&&(c("false write response, pause",H.awaitDrain),H.awaitDrain++),F.pause())}function be(de){c("onerror",de),ge(),_.removeListener("error",be),e(_,"error")===0&&P(_,de)}G(_,"error",be);function ve(){_.removeListener("finish",cr),ge()}_.once("close",ve);function cr(){c("onfinish"),_.removeListener("close",ve),ge()}_.once("finish",cr);function ge(){c("unpipe"),F.unpipe(_)}return _.emit("pipe",F),H.flowing||(c("pipe resume"),F.resume()),_};function m(_){return function(){var F=_._readableState;c("pipeOnDrain",F.awaitDrain),F.awaitDrain&&F.awaitDrain--,F.awaitDrain===0&&e(_,"data")&&(F.flowing=!0,A(_))}}W.prototype.unpipe=function(_){var S=this._readableState,F={hasUnpiped:!1};if(S.pipesCount===0)return this;if(S.pipesCount===1)return _&&_!==S.pipes?this:(_||(_=S.pipes),S.pipes=null,S.pipesCount=0,S.flowing=!1,_&&_.emit("unpipe",this,F),this);if(!_){var H=S.pipes,re=S.pipesCount;S.pipes=null,S.pipesCount=0,S.flowing=!1;for(var ie=0;ie0,H.flowing!==!1&&this.resume()):_==="readable"&&!H.endEmitted&&!H.readableListening&&(H.readableListening=H.needReadable=!0,H.flowing=!1,H.emittedReadable=!1,c("on readable",H.length,H.reading),H.length?y(this):H.reading||process.nextTick(M,this)),F},W.prototype.addListener=W.prototype.on,W.prototype.removeListener=function(_,S){var F=r.prototype.removeListener.call(this,_,S);return _==="readable"&&process.nextTick(f,this),F},W.prototype.removeAllListeners=function(_){var S=r.prototype.removeAllListeners.apply(this,arguments);return(_==="readable"||_===void 0)&&process.nextTick(f,this),S};function f(_){var S=_._readableState;S.readableListening=_.listenerCount("readable")>0,S.resumeScheduled&&!S.paused?S.flowing=!0:_.listenerCount("data")>0&&_.resume()}function M(_){c("readable nexttick read 0"),_.read(0)}W.prototype.resume=function(){var _=this._readableState;return _.flowing||(c("resume"),_.flowing=!_.readableListening,U(this,_)),_.paused=!1,this};function U(_,S){S.resumeScheduled||(S.resumeScheduled=!0,process.nextTick(q,_,S))}function q(_,S){c("resume",S.reading),S.reading||_.read(0),S.resumeScheduled=!1,_.emit("resume"),A(_),S.flowing&&!S.reading&&_.read(0)}W.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function A(_){var S=_._readableState;for(c("flow",S.flowing);S.flowing&&_.read()!==null;);}W.prototype.wrap=function(_){var S=this,F=this._readableState,H=!1;_.on("end",function(){if(c("wrapped end"),F.decoder&&!F.ended){var ee=F.decoder.end();ee&&ee.length&&S.push(ee)}S.push(null)}),_.on("data",function(ee){if(c("wrapped data"),F.decoder&&(ee=F.decoder.write(ee)),!(F.objectMode&&ee==null)&&!(!F.objectMode&&(!ee||!ee.length))){var he=S.push(ee);he||(H=!0,_.pause())}});for(var re in _)this[re]===void 0&&typeof _[re]=="function"&&(this[re]=function(he){return function(){return _[he].apply(_,arguments)}}(re));for(var ie=0;ie=S.length?(S.decoder?F=S.buffer.join(""):S.buffer.length===1?F=S.buffer.first():F=S.buffer.concat(S.length),S.buffer.clear()):F=S.buffer.consume(_,S.decoder),F}function D(_){var S=_._readableState;c("endReadable",S.endEmitted),S.endEmitted||(S.ended=!0,process.nextTick(V,S,_))}function V(_,S){if(c("endReadableNT",_.endEmitted,_.length),!_.endEmitted&&_.length===0&&(_.endEmitted=!0,S.readable=!1,S.emit("end"),_.autoDestroy)){var F=S._writableState;(!F||F.autoDestroy&&F.finished)&&S.destroy()}}typeof Symbol=="function"&&(W.from=function(_,S){return $===void 0&&($=Ay()),$(W,_,S)});function se(_,S){for(var F=0,H=_.length;F0;return Wy(o,c,l,function(d){i||(i=d),d&&s.forEach(Al),!c&&(s.forEach(Al),n(i))})});return e.reduce(Hy)}var zy=Uy;(function(t,e){e=t.exports=zh(),e.Stream=e,e.Readable=e,e.Writable=Vh(),e.Duplex=ei(),e.Transform=qh,e.PassThrough=$y,e.finished=ju,e.pipeline=zy})(cu,cu.exports);var Zh=cu.exports;const{Transform:qy}=Zh;var Gy=t=>class Qh extends qy{constructor(r,n,i,s,o){super(o),this._rate=r,this._capacity=n,this._delimitedSuffix=i,this._hashBitLength=s,this._options=o,this._state=new t,this._state.initialize(r,n),this._finalized=!1}_transform(r,n,i){let s=null;try{this.update(r,n)}catch(o){s=o}i(s)}_flush(r){let n=null;try{this.push(this.digest())}catch(i){n=i}r(n)}update(r,n){if(!Buffer.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return Buffer.isBuffer(r)||(r=Buffer.from(r,n)),this._state.absorb(r),this}digest(r){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let n=this._state.squeeze(this._hashBitLength/8);return r!==void 0&&(n=n.toString(r)),this._resetState(),n}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const r=new Qh(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}};const{Transform:Jy}=Zh;var Zy=t=>class Yh extends Jy{constructor(r,n,i,s){super(s),this._rate=r,this._capacity=n,this._delimitedSuffix=i,this._options=s,this._state=new t,this._state.initialize(r,n),this._finalized=!1}_transform(r,n,i){let s=null;try{this.update(r,n)}catch(o){s=o}i(s)}_flush(){}_read(r){this.push(this.squeeze(r))}update(r,n){if(!Buffer.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return Buffer.isBuffer(r)||(r=Buffer.from(r,n)),this._state.absorb(r),this}squeeze(r,n){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let i=this._state.squeeze(r);return n!==void 0&&(i=i.toString(n)),i}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const r=new Yh(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}};const Qy=Gy,Yy=Zy;var Ky=function(t){const e=Qy(t),r=Yy(t);return function(n,i){switch(typeof n=="string"?n.toLowerCase():n){case"keccak224":return new e(1152,448,null,224,i);case"keccak256":return new e(1088,512,null,256,i);case"keccak384":return new e(832,768,null,384,i);case"keccak512":return new e(576,1024,null,512,i);case"sha3-224":return new e(1152,448,6,224,i);case"sha3-256":return new e(1088,512,6,256,i);case"sha3-384":return new e(832,768,6,384,i);case"sha3-512":return new e(576,1024,6,512,i);case"shake128":return new r(1344,256,31,i);case"shake256":return new r(1088,512,31,i);default:throw new Error("Invald algorithm: "+n)}}},Kh={};const kl=[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];Kh.p1600=function(t){for(let e=0;e<24;++e){const r=t[0]^t[10]^t[20]^t[30]^t[40],n=t[1]^t[11]^t[21]^t[31]^t[41],i=t[2]^t[12]^t[22]^t[32]^t[42],s=t[3]^t[13]^t[23]^t[33]^t[43],o=t[4]^t[14]^t[24]^t[34]^t[44],a=t[5]^t[15]^t[25]^t[35]^t[45],c=t[6]^t[16]^t[26]^t[36]^t[46],l=t[7]^t[17]^t[27]^t[37]^t[47],d=t[8]^t[18]^t[28]^t[38]^t[48],p=t[9]^t[19]^t[29]^t[39]^t[49];let b=d^(i<<1|s>>>31),x=p^(s<<1|i>>>31);const R=t[0]^b,L=t[1]^x,N=t[10]^b,E=t[11]^x,I=t[20]^b,O=t[21]^x,$=t[30]^b,P=t[31]^x,j=t[40]^b,G=t[41]^x;b=r^(o<<1|a>>>31),x=n^(a<<1|o>>>31);const z=t[2]^b,W=t[3]^x,K=t[12]^b,Y=t[13]^x,X=t[22]^b,v=t[23]^x,u=t[32]^b,h=t[33]^x,g=t[42]^b,y=t[43]^x;b=i^(c<<1|l>>>31),x=s^(l<<1|c>>>31);const w=t[4]^b,C=t[5]^x,k=t[14]^b,m=t[15]^x,f=t[24]^b,M=t[25]^x,U=t[34]^b,q=t[35]^x,A=t[44]^b,T=t[45]^x;b=o^(d<<1|p>>>31),x=a^(p<<1|d>>>31);const D=t[6]^b,V=t[7]^x,se=t[16]^b,_=t[17]^x,S=t[26]^b,F=t[27]^x,H=t[36]^b,re=t[37]^x,ie=t[46]^b,ee=t[47]^x;b=c^(r<<1|n>>>31),x=l^(n<<1|r>>>31);const he=t[8]^b,Zt=t[9]^x,me=t[18]^b,_e=t[19]^x,yr=t[28]^b,be=t[29]^x,ve=t[38]^b,cr=t[39]^x,ge=t[48]^b,de=t[49]^x,Mt=R,Se=L,Ee=E<<4|N>>>28,Sn=N<<4|E>>>28,Me=I<<3|O>>>29,xe=O<<3|I>>>29,En=P<<9|$>>>23,Ce=$<<9|P>>>23,Re=j<<18|G>>>14,Mn=G<<18|j>>>14,Ie=z<<1|W>>>31,Ae=W<<1|z>>>31,xn=Y<<12|K>>>20,ke=K<<12|Y>>>20,Te=X<<10|v>>>22,Cn=v<<10|X>>>22,Oe=h<<13|u>>>19,Ne=u<<13|h>>>19,Rn=g<<2|y>>>30,Le=y<<2|g>>>30,Pe=C<<30|w>>>2,In=w<<30|C>>>2,$e=k<<6|m>>>26,De=m<<6|k>>>26,An=M<<11|f>>>21,je=f<<11|M>>>21,Be=U<<15|q>>>17,kn=q<<15|U>>>17,Fe=T<<29|A>>>3,We=A<<29|T>>>3,Tn=D<<28|V>>>4,He=V<<28|D>>>4,Ve=_<<23|se>>>9,On=se<<23|_>>>9,Ue=S<<25|F>>>7,ze=F<<25|S>>>7,$r=H<<21|re>>>11,Dr=re<<21|H>>>11,jr=ee<<24|ie>>>8,Br=ie<<24|ee>>>8,Fr=he<<27|Zt>>>5,Wr=Zt<<27|he>>>5,Hr=me<<20|_e>>>12,Vr=_e<<20|me>>>12,Ur=be<<7|yr>>>25,zr=yr<<7|be>>>25,qr=ve<<8|cr>>>24,Gr=cr<<8|ve>>>24,Jr=ge<<14|de>>>18,Zr=de<<14|ge>>>18;t[0]=Mt^~xn&An,t[1]=Se^~ke&je,t[10]=Tn^~Hr&Me,t[11]=He^~Vr&xe,t[20]=Ie^~$e&Ue,t[21]=Ae^~De&ze,t[30]=Fr^~Ee&Te,t[31]=Wr^~Sn&Cn,t[40]=Pe^~Ve&Ur,t[41]=In^~On&zr,t[2]=xn^~An&$r,t[3]=ke^~je&Dr,t[12]=Hr^~Me&Oe,t[13]=Vr^~xe&Ne,t[22]=$e^~Ue&qr,t[23]=De^~ze&Gr,t[32]=Ee^~Te&Be,t[33]=Sn^~Cn&kn,t[42]=Ve^~Ur&En,t[43]=On^~zr&Ce,t[4]=An^~$r&Jr,t[5]=je^~Dr&Zr,t[14]=Me^~Oe&Fe,t[15]=xe^~Ne&We,t[24]=Ue^~qr&Re,t[25]=ze^~Gr&Mn,t[34]=Te^~Be&jr,t[35]=Cn^~kn&Br,t[44]=Ur^~En&Rn,t[45]=zr^~Ce&Le,t[6]=$r^~Jr&Mt,t[7]=Dr^~Zr&Se,t[16]=Oe^~Fe&Tn,t[17]=Ne^~We&He,t[26]=qr^~Re&Ie,t[27]=Gr^~Mn&Ae,t[36]=Be^~jr&Fr,t[37]=kn^~Br&Wr,t[46]=En^~Rn&Pe,t[47]=Ce^~Le&In,t[8]=Jr^~Mt&xn,t[9]=Zr^~Se&ke,t[18]=Fe^~Tn&Hr,t[19]=We^~He&Vr,t[28]=Re^~Ie&$e,t[29]=Mn^~Ae&De,t[38]=jr^~Fr&Ee,t[39]=Br^~Wr&Sn,t[48]=Rn^~Pe&Ve,t[49]=Le^~In&On,t[0]^=kl[e*2],t[1]^=kl[e*2+1]}};const Ws=Kh;function bi(){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}bi.prototype.initialize=function(t,e){for(let r=0;r<50;++r)this.state[r]=0;this.blockSize=t/8,this.count=0,this.squeezing=!1};bi.prototype.absorb=function(t){for(let e=0;e>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(Ws.p1600(this.state),this.count=0);return e};bi.prototype.copy=function(t){for(let e=0;e<50;++e)t.state[e]=this.state[e];t.blockSize=this.blockSize,t.count=this.count,t.squeezing=this.squeezing};var Xy=bi,em=Ky(Xy);const tm=em,rm=Xs;function Xh(t){return Buffer.allocUnsafe(t).fill(0)}function ed(t,e,r){const n=Xh(e);return t=fo(t),r?t.length"u")throw new Error("Not an array?");if(r=sd(t),r!=="dynamic"&&r!==0&&e.length>r)throw new Error("Elements exceed array size: "+r);i=[],t=t.slice(0,t.lastIndexOf("[")),typeof e=="string"&&(e=JSON.parse(e));for(s in e)i.push(er(t,e[s]));if(r==="dynamic"){var o=er("uint256",e.length);i.unshift(o)}return Buffer.concat(i)}else{if(t==="bytes")return e=new Buffer(e),i=Buffer.concat([er("uint256",e.length),e]),e.length%32!==0&&(i=Buffer.concat([i,ln.zeros(32-e.length%32)])),i;if(t.startsWith("bytes")){if(r=qn(t),r<1||r>32)throw new Error("Invalid bytes width: "+r);return ln.setLengthRight(e,32)}else if(t.startsWith("uint")){if(r=qn(t),r%8||r<8||r>256)throw new Error("Invalid uint width: "+r);if(n=en(e),n.bitLength()>r)throw new Error("Supplied uint exceeds width: "+r+" vs "+n.bitLength());if(n<0)throw new Error("Supplied uint is negative");return n.toArrayLike(Buffer,"be",32)}else if(t.startsWith("int")){if(r=qn(t),r%8||r<8||r>256)throw new Error("Invalid int width: "+r);if(n=en(e),n.bitLength()>r)throw new Error("Supplied int exceeds width: "+r+" vs "+n.bitLength());return n.toTwos(256).toArrayLike(Buffer,"be",32)}else if(t.startsWith("ufixed")){if(r=Tl(t),n=en(e),n<0)throw new Error("Supplied ufixed is negative");return er("uint256",n.mul(new sn(2).pow(new sn(r[1]))))}else if(t.startsWith("fixed"))return r=Tl(t),er("int256",en(e).mul(new sn(2).pow(new sn(r[1]))))}throw new Error("Unsupported or invalid type: "+t)}function am(t){return t==="string"||t==="bytes"||sd(t)==="dynamic"}function um(t){return t.lastIndexOf("]")===t.length-1}function cm(t,e){var r=[],n=[],i=32*t.length;for(var s in t){var o=id(t[s]),a=e[s],c=er(o,a);am(o)?(r.push(er("uint256",i)),n.push(c),i+=c.length):r.push(c)}return Buffer.concat(r.concat(n))}function od(t,e){if(t.length!==e.length)throw new Error("Number of types are not matching the values");for(var r,n,i=[],s=0;s32)throw new Error("Invalid bytes width: "+r);i.push(ln.setLengthRight(a,r))}else if(o.startsWith("uint")){if(r=qn(o),r%8||r<8||r>256)throw new Error("Invalid uint width: "+r);if(n=en(a),n.bitLength()>r)throw new Error("Supplied uint exceeds width: "+r+" vs "+n.bitLength());i.push(n.toArrayLike(Buffer,"be",r/8))}else if(o.startsWith("int")){if(r=qn(o),r%8||r<8||r>256)throw new Error("Invalid int width: "+r);if(n=en(a),n.bitLength()>r)throw new Error("Supplied int exceeds width: "+r+" vs "+n.bitLength());i.push(n.toTwos(r).toArrayLike(Buffer,"be",r/8))}else throw new Error("Unsupported or invalid type: "+o)}return Buffer.concat(i)}function lm(t,e){return ln.keccak(od(t,e))}var fm={rawEncode:cm,solidityPack:od,soliditySHA3:lm};const Ht=nd,$i=fm,ad={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},Ia={encodeData(t,e,r,n=!0){const i=["bytes32"],s=[this.hashType(t,r)];if(n){const o=(a,c,l)=>{if(r[c]!==void 0)return["bytes32",l==null?"0x0000000000000000000000000000000000000000000000000000000000000000":Ht.keccak(this.encodeData(c,l,r,n))];if(l===void 0)throw new Error(`missing value for field ${a} of type ${c}`);if(c==="bytes")return["bytes32",Ht.keccak(l)];if(c==="string")return typeof l=="string"&&(l=Buffer.from(l,"utf8")),["bytes32",Ht.keccak(l)];if(c.lastIndexOf("]")===c.length-1){const d=c.slice(0,c.lastIndexOf("[")),p=l.map(b=>o(a,d,b));return["bytes32",Ht.keccak($i.rawEncode(p.map(([b])=>b),p.map(([,b])=>b)))]}return[c,l]};for(const a of r[t]){const[c,l]=o(a.name,a.type,e[a.name]);i.push(c),s.push(l)}}else for(const o of r[t]){let a=e[o.name];if(a!==void 0)if(o.type==="bytes")i.push("bytes32"),a=Ht.keccak(a),s.push(a);else if(o.type==="string")i.push("bytes32"),typeof a=="string"&&(a=Buffer.from(a,"utf8")),a=Ht.keccak(a),s.push(a);else if(r[o.type]!==void 0)i.push("bytes32"),a=Ht.keccak(this.encodeData(o.type,a,r,n)),s.push(a);else{if(o.type.lastIndexOf("]")===o.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");i.push(o.type),s.push(a)}}return $i.rawEncode(i,s)},encodeType(t,e){let r="",n=this.findTypeDependencies(t,e).filter(i=>i!==t);n=[t].concat(n.sort());for(const i of n){if(!e[i])throw new Error("No type definition specified: "+i);r+=i+"("+e[i].map(({name:o,type:a})=>a+" "+o).join(",")+")"}return r},findTypeDependencies(t,e,r=[]){if(t=t.match(/^\w*/)[0],r.includes(t)||e[t]===void 0)return r;r.push(t);for(const n of e[t])for(const i of this.findTypeDependencies(n.type,e,r))!r.includes(i)&&r.push(i);return r},hashStruct(t,e,r,n=!0){return Ht.keccak(this.encodeData(t,e,r,n))},hashType(t,e){return Ht.keccak(this.encodeType(t,e))},sanitizeData(t){const e={};for(const r in ad.properties)t[r]&&(e[r]=t[r]);return e.types&&(e.types=Object.assign({EIP712Domain:[]},e.types)),e},hash(t,e=!0){const r=this.sanitizeData(t),n=[Buffer.from("1901","hex")];return n.push(this.hashStruct("EIP712Domain",r.domain,r.types,e)),r.primaryType!=="EIP712Domain"&&n.push(this.hashStruct(r.primaryType,r.message,r.types,e)),Ht.keccak(Buffer.concat(n))}};var hm={TYPED_MESSAGE_SCHEMA:ad,TypedDataUtils:Ia,hashForSignTypedDataLegacy:function(t){return dm(t.data)},hashForSignTypedData_v3:function(t){return Ia.hash(t.data,!1)},hashForSignTypedData_v4:function(t){return Ia.hash(t.data)}};function dm(t){const e=new Error("Expect argument to be non-empty array");if(typeof t!="object"||!t.length)throw e;const r=t.map(function(s){return s.type==="bytes"?Ht.toBuffer(s.value):s.value}),n=t.map(function(s){return s.type}),i=t.map(function(s){if(!s.name)throw e;return s.type+" "+s.name});return $i.soliditySHA3(["bytes32","bytes32"],[$i.soliditySHA3(new Array(t.length).fill("string"),i),$i.soliditySHA3(n,r)])}var ti={};Object.defineProperty(ti,"__esModule",{value:!0});ti.filterFromParam=ti.FilterPolyfill=void 0;const Wn=Ki,vt=Z,pm=5*60*1e3,tn={jsonrpc:"2.0",id:0};class gm{constructor(e){this.logFilters=new Map,this.blockFilters=new Set,this.pendingTransactionFilters=new Set,this.cursors=new Map,this.timeouts=new Map,this.nextFilterId=(0,Wn.IntNumber)(1),this.provider=e}async newFilter(e){const r=ud(e),n=this.makeFilterId(),i=await this.setInitialCursorPosition(n,r.fromBlock);return console.log(`Installing new log filter(${n}):`,r,"initial cursor position:",i),this.logFilters.set(n,r),this.setFilterTimeout(n),(0,vt.hexStringFromIntNumber)(n)}async newBlockFilter(){const e=this.makeFilterId(),r=await this.setInitialCursorPosition(e,"latest");return console.log(`Installing new block filter (${e}) with initial cursor position:`,r),this.blockFilters.add(e),this.setFilterTimeout(e),(0,vt.hexStringFromIntNumber)(e)}async newPendingTransactionFilter(){const e=this.makeFilterId(),r=await this.setInitialCursorPosition(e,"latest");return console.log(`Installing new block filter (${e}) with initial cursor position:`,r),this.pendingTransactionFilters.add(e),this.setFilterTimeout(e),(0,vt.hexStringFromIntNumber)(e)}uninstallFilter(e){const r=(0,vt.intNumberFromHexString)(e);return console.log(`Uninstalling filter (${r})`),this.deleteFilter(r),!0}getFilterChanges(e){const r=(0,vt.intNumberFromHexString)(e);return this.timeouts.has(r)&&this.setFilterTimeout(r),this.logFilters.has(r)?this.getLogFilterChanges(r):this.blockFilters.has(r)?this.getBlockFilterChanges(r):this.pendingTransactionFilters.has(r)?this.getPendingTransactionFilterChanges(r):Promise.resolve(ms())}async getFilterLogs(e){const r=(0,vt.intNumberFromHexString)(e),n=this.logFilters.get(r);return n?this.sendAsyncPromise(Object.assign(Object.assign({},tn),{method:"eth_getLogs",params:[Ol(n)]})):ms()}makeFilterId(){return(0,Wn.IntNumber)(++this.nextFilterId)}sendAsyncPromise(e){return new Promise((r,n)=>{this.provider.sendAsync(e,(i,s)=>{if(i)return n(i);if(Array.isArray(s)||s==null)return n(new Error(`unexpected response received: ${JSON.stringify(s)}`));r(s)})})}deleteFilter(e){console.log(`Deleting filter (${e})`),this.logFilters.delete(e),this.blockFilters.delete(e),this.pendingTransactionFilters.delete(e),this.cursors.delete(e),this.timeouts.delete(e)}async getLogFilterChanges(e){const r=this.logFilters.get(e),n=this.cursors.get(e);if(!n||!r)return ms();const i=await this.getCurrentBlockHeight(),s=r.toBlock==="latest"?i:r.toBlock;if(n>i||n>r.toBlock)return ws();console.log(`Fetching logs from ${n} to ${s} for filter ${e}`);const o=await this.sendAsyncPromise(Object.assign(Object.assign({},tn),{method:"eth_getLogs",params:[Ol(Object.assign(Object.assign({},r),{fromBlock:n,toBlock:s}))]}));if(Array.isArray(o.result)){const a=o.result.map(l=>(0,vt.intNumberFromHexString)(l.blockNumber||"0x0")),c=Math.max(...a);if(c&&c>n){const l=(0,Wn.IntNumber)(c+1);console.log(`Moving cursor position for filter (${e}) from ${n} to ${l}`),this.cursors.set(e,l)}}return o}async getBlockFilterChanges(e){const r=this.cursors.get(e);if(!r)return ms();const n=await this.getCurrentBlockHeight();if(r>n)return ws();console.log(`Fetching blocks from ${r} to ${n} for filter (${e})`);const i=(await Promise.all((0,vt.range)(r,n+1).map(o=>this.getBlockHashByNumber((0,Wn.IntNumber)(o))))).filter(o=>!!o),s=(0,Wn.IntNumber)(r+i.length);return console.log(`Moving cursor position for filter (${e}) from ${r} to ${s}`),this.cursors.set(e,s),Object.assign(Object.assign({},tn),{result:i})}async getPendingTransactionFilterChanges(e){return Promise.resolve(ws())}async setInitialCursorPosition(e,r){const n=await this.getCurrentBlockHeight(),i=typeof r=="number"&&r>n?r:n;return this.cursors.set(e,i),i}setFilterTimeout(e){const r=this.timeouts.get(e);r&&window.clearTimeout(r);const n=window.setTimeout(()=>{console.log(`Filter (${e}) timed out`),this.deleteFilter(e)},pm);this.timeouts.set(e,n)}async getCurrentBlockHeight(){const{result:e}=await this.sendAsyncPromise(Object.assign(Object.assign({},tn),{method:"eth_blockNumber",params:[]}));return(0,vt.intNumberFromHexString)((0,vt.ensureHexString)(e))}async getBlockHashByNumber(e){const r=await this.sendAsyncPromise(Object.assign(Object.assign({},tn),{method:"eth_getBlockByNumber",params:[(0,vt.hexStringFromIntNumber)(e),!1]}));return r.result&&typeof r.result.hash=="string"?(0,vt.ensureHexString)(r.result.hash):null}}ti.FilterPolyfill=gm;function ud(t){return{fromBlock:Nl(t.fromBlock),toBlock:Nl(t.toBlock),addresses:t.address===void 0?null:Array.isArray(t.address)?t.address:[t.address],topics:t.topics||[]}}ti.filterFromParam=ud;function Ol(t){const e={fromBlock:Ll(t.fromBlock),toBlock:Ll(t.toBlock),topics:t.topics};return t.addresses!==null&&(e.address=t.addresses),e}function Nl(t){if(t===void 0||t==="latest"||t==="pending")return"latest";if(t==="earliest")return(0,Wn.IntNumber)(0);if((0,vt.isHexString)(t))return(0,vt.intNumberFromHexString)(t);throw new Error(`Invalid block option: ${String(t)}`)}function Ll(t){return t==="latest"?t:(0,vt.hexStringFromIntNumber)(t)}function ms(){return Object.assign(Object.assign({},tn),{error:{code:-32e3,message:"filter not found"}})}function ws(){return Object.assign(Object.assign({},tn),{result:[]})}var cd={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.JSONRPCMethod=void 0,function(e){e.eth_accounts="eth_accounts",e.eth_coinbase="eth_coinbase",e.net_version="net_version",e.eth_chainId="eth_chainId",e.eth_uninstallFilter="eth_uninstallFilter",e.eth_requestAccounts="eth_requestAccounts",e.eth_sign="eth_sign",e.eth_ecRecover="eth_ecRecover",e.personal_sign="personal_sign",e.personal_ecRecover="personal_ecRecover",e.eth_signTransaction="eth_signTransaction",e.eth_sendRawTransaction="eth_sendRawTransaction",e.eth_sendTransaction="eth_sendTransaction",e.eth_signTypedData_v1="eth_signTypedData_v1",e.eth_signTypedData_v2="eth_signTypedData_v2",e.eth_signTypedData_v3="eth_signTypedData_v3",e.eth_signTypedData_v4="eth_signTypedData_v4",e.eth_signTypedData="eth_signTypedData",e.cbWallet_arbitrary="walletlink_arbitrary",e.wallet_addEthereumChain="wallet_addEthereumChain",e.wallet_switchEthereumChain="wallet_switchEthereumChain",e.wallet_watchAsset="wallet_watchAsset",e.eth_subscribe="eth_subscribe",e.eth_unsubscribe="eth_unsubscribe",e.eth_newFilter="eth_newFilter",e.eth_newBlockFilter="eth_newBlockFilter",e.eth_newPendingTransactionFilter="eth_newPendingTransactionFilter",e.eth_getFilterChanges="eth_getFilterChanges",e.eth_getFilterLogs="eth_getFilterLogs"}(t.JSONRPCMethod||(t.JSONRPCMethod={}))})(cd);var ho={},ld={},po={},Bu=bm;function bm(t){t=t||{};var e=t.max||Number.MAX_SAFE_INTEGER,r=typeof t.start<"u"?t.start:Math.floor(Math.random()*e);return function(){return r=r%e,r++}}const Pl=(t,e)=>function(){const r=e.promiseModule,n=new Array(arguments.length);for(let i=0;i{e.errorFirst?n.push(function(o,a){if(e.multiArgs){const c=new Array(arguments.length-1);for(let l=1;l{e=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},e);const r=i=>{const s=o=>typeof o=="string"?i===o:o.test(i);return e.include?e.include.some(s):!e.exclude.some(s)};let n;typeof t=="function"?n=function(){return e.excludeMain?t.apply(this,arguments):Pl(t,e).apply(this,arguments)}:n=Object.create(Object.getPrototypeOf(t));for(const i in t){const s=t[i];n[i]=typeof s=="function"&&r(i)?Pl(s,e):s}return n},ts={},ym=J&&J.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ts,"__esModule",{value:!0});ts.BaseBlockTracker=void 0;const mm=ym(pn),wm=1e3,_m=(t,e)=>t+e,$l=["sync","latest"];class Sm extends mm.default{constructor(e){super(),this._blockResetDuration=e.blockResetDuration||20*wm,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()}async destroy(){this._cancelBlockResetTimeout(),await this._maybeEnd(),super.removeAllListeners()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}async getLatestBlock(){return this._currentBlock?this._currentBlock:await new Promise(r=>this.once("latest",r))}removeAllListeners(e){return e?super.removeAllListeners(e):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener(),this}_setupInternalEvents(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}_onNewListener(e){$l.includes(e)&&this._maybeStart()}_onRemoveListener(){this._getBlockTrackerEventCount()>0||this._maybeEnd()}async _maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),await this._start(),this.emit("_started"))}async _maybeEnd(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),await this._end(),this.emit("_ended"))}_getBlockTrackerEventCount(){return $l.map(e=>this.listenerCount(e)).reduce(_m)}_newPotentialLatest(e){const r=this._currentBlock;r&&Dl(e)<=Dl(r)||this._setCurrentBlock(e)}_setCurrentBlock(e){const r=this._currentBlock;this._currentBlock=e,this.emit("latest",e),this.emit("sync",{oldBlock:r,newBlock:e})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){this._blockResetTimeout&&clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}}ts.BaseBlockTracker=Sm;function Dl(t){return Number.parseInt(t,16)}var fd={},hd={},ft={};class dd extends TypeError{constructor(e,r){let n;const{message:i,explanation:s,...o}=e,{path:a}=e,c=a.length===0?i:`At path: ${a.join(".")} -- ${i}`;super(s??c),s!=null&&(this.cause=c),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>n??(n=[e,...r()])}}function Em(t){return Dt(t)&&typeof t[Symbol.iterator]=="function"}function Dt(t){return typeof t=="object"&&t!=null}function jl(t){if(Object.prototype.toString.call(t)!=="[object Object]")return!1;const e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function rt(t){return typeof t=="symbol"?t.toString():typeof t=="string"?JSON.stringify(t):`${t}`}function Mm(t){const{done:e,value:r}=t.next();return e?void 0:r}function xm(t,e,r,n){if(t===!0)return;t===!1?t={}:typeof t=="string"&&(t={message:t});const{path:i,branch:s}=e,{type:o}=r,{refinement:a,message:c=`Expected a value of type \`${o}\`${a?` with refinement \`${a}\``:""}, but received: \`${rt(n)}\``}=t;return{value:n,type:o,refinement:a,key:i[i.length-1],path:i,branch:s,...t,message:c}}function*fu(t,e,r,n){Em(t)||(t=[t]);for(const i of t){const s=xm(i,e,r,n);s&&(yield s)}}function*Fu(t,e,r={}){const{path:n=[],branch:i=[t],coerce:s=!1,mask:o=!1}=r,a={path:n,branch:i};if(s&&(t=e.coercer(t,a),o&&e.type!=="type"&&Dt(e.schema)&&Dt(t)&&!Array.isArray(t)))for(const l in t)e.schema[l]===void 0&&delete t[l];let c="valid";for(const l of e.validator(t,a))l.explanation=r.message,c="not_valid",yield[l,void 0];for(let[l,d,p]of e.entries(t,a)){const b=Fu(d,p,{path:l===void 0?n:[...n,l],branch:l===void 0?i:[...i,d],coerce:s,mask:o,message:r.message});for(const x of b)x[0]?(c=x[0].refinement!=null?"not_refined":"not_valid",yield[x[0],void 0]):s&&(d=x[1],l===void 0?t=d:t instanceof Map?t.set(l,d):t instanceof Set?t.add(d):Dt(t)&&(d!==void 0||l in t)&&(t[l]=d))}if(c!=="not_valid")for(const l of e.refiner(t,a))l.explanation=r.message,c="not_refined",yield[l,void 0];c==="valid"&&(yield[void 0,t])}class Xe{constructor(e){const{type:r,schema:n,validator:i,refiner:s,coercer:o=c=>c,entries:a=function*(){}}=e;this.type=r,this.schema=n,this.entries=a,this.coercer=o,i?this.validator=(c,l)=>{const d=i(c,l);return fu(d,l,this,c)}:this.validator=()=>[],s?this.refiner=(c,l)=>{const d=s(c,l);return fu(d,l,this,c)}:this.refiner=()=>[]}assert(e,r){return pd(e,this,r)}create(e,r){return gd(e,this,r)}is(e){return Wu(e,this)}mask(e,r){return bd(e,this,r)}validate(e,r={}){return vi(e,this,r)}}function pd(t,e,r){const n=vi(t,e,{message:r});if(n[0])throw n[0]}function gd(t,e,r){const n=vi(t,e,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function bd(t,e,r){const n=vi(t,e,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function Wu(t,e){return!vi(t,e)[0]}function vi(t,e,r={}){const n=Fu(t,e,r),i=Mm(n);return i[0]?[new dd(i[0],function*(){for(const o of n)o[0]&&(yield o[0])}),void 0]:[void 0,i[1]]}function Cm(...t){const e=t[0].type==="type",r=t.map(i=>i.schema),n=Object.assign({},...r);return e?Vu(n):rs(n)}function Et(t,e){return new Xe({type:t,schema:null,validator:e})}function Rm(t,e){return new Xe({...t,refiner:(r,n)=>r===void 0||t.refiner(r,n),validator(r,n){return r===void 0?!0:(e(r,n),t.validator(r,n))}})}function Im(t){return new Xe({type:"dynamic",schema:null,*entries(e,r){yield*t(e,r).entries(e,r)},validator(e,r){return t(e,r).validator(e,r)},coercer(e,r){return t(e,r).coercer(e,r)},refiner(e,r){return t(e,r).refiner(e,r)}})}function Am(t){let e;return new Xe({type:"lazy",schema:null,*entries(r,n){e??(e=t()),yield*e.entries(r,n)},validator(r,n){return e??(e=t()),e.validator(r,n)},coercer(r,n){return e??(e=t()),e.coercer(r,n)},refiner(r,n){return e??(e=t()),e.refiner(r,n)}})}function km(t,e){const{schema:r}=t,n={...r};for(const i of e)delete n[i];switch(t.type){case"type":return Vu(n);default:return rs(n)}}function Tm(t){const e=t instanceof Xe?{...t.schema}:{...t};for(const r in e)e[r]=vd(e[r]);return rs(e)}function Om(t,e){const{schema:r}=t,n={};for(const i of e)n[i]=r[i];return rs(n)}function Nm(t,e){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),Et(t,e)}function Lm(){return Et("any",()=>!0)}function Pm(t){return new Xe({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[r,n]of e.entries())yield[r,n,t]},coercer(e){return Array.isArray(e)?e.slice():e},validator(e){return Array.isArray(e)||`Expected an array value, but received: ${rt(e)}`}})}function $m(){return Et("bigint",t=>typeof t=="bigint")}function Dm(){return Et("boolean",t=>typeof t=="boolean")}function jm(){return Et("date",t=>t instanceof Date&&!isNaN(t.getTime())||`Expected a valid \`Date\` object, but received: ${rt(t)}`)}function Bm(t){const e={},r=t.map(n=>rt(n)).join();for(const n of t)e[n]=n;return new Xe({type:"enums",schema:e,validator(n){return t.includes(n)||`Expected one of \`${r}\`, but received: ${rt(n)}`}})}function Fm(){return Et("func",t=>typeof t=="function"||`Expected a function, but received: ${rt(t)}`)}function Wm(t){return Et("instance",e=>e instanceof t||`Expected a \`${t.name}\` instance, but received: ${rt(e)}`)}function Hm(){return Et("integer",t=>typeof t=="number"&&!isNaN(t)&&Number.isInteger(t)||`Expected an integer, but received: ${rt(t)}`)}function Vm(t){return new Xe({type:"intersection",schema:null,*entries(e,r){for(const n of t)yield*n.entries(e,r)},*validator(e,r){for(const n of t)yield*n.validator(e,r)},*refiner(e,r){for(const n of t)yield*n.refiner(e,r)}})}function Um(t){const e=rt(t),r=typeof t;return new Xe({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?t:null,validator(n){return n===t||`Expected the literal \`${e}\`, but received: ${rt(n)}`}})}function zm(t,e){return new Xe({type:"map",schema:null,*entries(r){if(t&&e&&r instanceof Map)for(const[n,i]of r.entries())yield[n,n,t],yield[n,i,e]},coercer(r){return r instanceof Map?new Map(r):r},validator(r){return r instanceof Map||`Expected a \`Map\` object, but received: ${rt(r)}`}})}function Hu(){return Et("never",()=>!1)}function qm(t){return new Xe({...t,validator:(e,r)=>e===null||t.validator(e,r),refiner:(e,r)=>e===null||t.refiner(e,r)})}function Gm(){return Et("number",t=>typeof t=="number"&&!isNaN(t)||`Expected a number, but received: ${rt(t)}`)}function rs(t){const e=t?Object.keys(t):[],r=Hu();return new Xe({type:"object",schema:t||null,*entries(n){if(t&&Dt(n)){const i=new Set(Object.keys(n));for(const s of e)i.delete(s),yield[s,n[s],t[s]];for(const s of i)yield[s,n[s],r]}},validator(n){return Dt(n)||`Expected an object, but received: ${rt(n)}`},coercer(n){return Dt(n)?{...n}:n}})}function vd(t){return new Xe({...t,validator:(e,r)=>e===void 0||t.validator(e,r),refiner:(e,r)=>e===void 0||t.refiner(e,r)})}function Jm(t,e){return new Xe({type:"record",schema:null,*entries(r){if(Dt(r))for(const n in r){const i=r[n];yield[n,n,t],yield[n,i,e]}},validator(r){return Dt(r)||`Expected an object, but received: ${rt(r)}`}})}function Zm(){return Et("regexp",t=>t instanceof RegExp)}function Qm(t){return new Xe({type:"set",schema:null,*entries(e){if(t&&e instanceof Set)for(const r of e)yield[r,r,t]},coercer(e){return e instanceof Set?new Set(e):e},validator(e){return e instanceof Set||`Expected a \`Set\` object, but received: ${rt(e)}`}})}function yd(){return Et("string",t=>typeof t=="string"||`Expected a string, but received: ${rt(t)}`)}function Ym(t){const e=Hu();return new Xe({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(t.length,r.length);for(let i=0;ir.type).join(" | ");return new Xe({type:"union",schema:null,coercer(r){for(const n of t){const[i,s]=n.validate(r,{coerce:!0});if(!i)return s}return r},validator(r,n){const i=[];for(const s of t){const[...o]=Fu(r,s,n),[a]=o;if(a[0])for(const[c]of o)c&&i.push(c);else return[]}return[`Expected the value to satisfy a union of \`${e}\`, but received: ${rt(r)}`,...i]}})}function md(){return Et("unknown",()=>!0)}function Uu(t,e,r){return new Xe({...t,coercer:(n,i)=>Wu(n,e)?t.coercer(r(n,i),i):t.coercer(n,i)})}function Xm(t,e,r={}){return Uu(t,md(),n=>{const i=typeof e=="function"?e():e;if(n===void 0)return i;if(!r.strict&&jl(n)&&jl(i)){const s={...n};let o=!1;for(const a in i)s[a]===void 0&&(s[a]=i[a],o=!0);if(o)return s}return n})}function e1(t){return Uu(t,yd(),e=>e.trim())}function t1(t){return mn(t,"empty",e=>{const r=wd(e);return r===0||`Expected an empty ${t.type} but received one with a size of \`${r}\``})}function wd(t){return t instanceof Map||t instanceof Set?t.size:t.length}function r1(t,e,r={}){const{exclusive:n}=r;return mn(t,"max",i=>n?in?i>e:i>=e||`Expected a ${t.type} greater than ${n?"":"or equal to "}${e} but received \`${i}\``)}function i1(t){return mn(t,"nonempty",e=>wd(e)>0||`Expected a nonempty ${t.type} but received an empty one`)}function s1(t,e){return mn(t,"pattern",r=>e.test(r)||`Expected a ${t.type} matching \`/${e.source}/\` but received "${r}"`)}function o1(t,e,r=e){const n=`Expected a ${t.type}`,i=e===r?`of \`${e}\``:`between \`${e}\` and \`${r}\``;return mn(t,"size",s=>{if(typeof s=="number"||s instanceof Date)return e<=s&&s<=r||`${n} ${i} but received \`${s}\``;if(s instanceof Map||s instanceof Set){const{size:o}=s;return e<=o&&o<=r||`${n} with a size ${i} but received one with a size of \`${o}\``}else{const{length:o}=s;return e<=o&&o<=r||`${n} with a length ${i} but received one with a length of \`${o}\``}})}function mn(t,e,r){return new Xe({...t,*refiner(n,i){yield*t.refiner(n,i);const s=r(n,i),o=fu(s,i,t,n);for(const a of o)yield{...a,refinement:e}}})}const a1=Object.freeze(Object.defineProperty({__proto__:null,Struct:Xe,StructError:dd,any:Lm,array:Pm,assert:pd,assign:Cm,bigint:$m,boolean:Dm,coerce:Uu,create:gd,date:jm,defaulted:Xm,define:Et,deprecated:Rm,dynamic:Im,empty:t1,enums:Bm,func:Fm,instance:Wm,integer:Hm,intersection:Vm,is:Wu,lazy:Am,literal:Um,map:zm,mask:bd,max:r1,min:n1,never:Hu,nonempty:i1,nullable:qm,number:Gm,object:rs,omit:km,optional:vd,partial:Tm,pattern:s1,pick:Om,record:Jm,refine:mn,regexp:Zm,set:Qm,size:o1,string:yd,struct:Nm,trimmed:e1,tuple:Ym,type:Vu,union:Km,unknown:md,validate:vi},Symbol.toStringTag,{value:"Module"})),wn=dn(a1);Object.defineProperty(ft,"__esModule",{value:!0});ft.assertExhaustive=ft.assertStruct=ft.assert=ft.AssertionError=void 0;const u1=wn;function c1(t){return typeof t=="object"&&t!==null&&"message"in t}function l1(t){var e,r;return typeof((r=(e=t==null?void 0:t.prototype)===null||e===void 0?void 0:e.constructor)===null||r===void 0?void 0:r.name)=="string"}function f1(t){const e=c1(t)?t.message:String(t);return e.endsWith(".")?e.slice(0,-1):e}function _d(t,e){return l1(t)?new t({message:e}):t({message:e})}class zu extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}ft.AssertionError=zu;function h1(t,e="Assertion failed.",r=zu){if(!t)throw e instanceof Error?e:_d(r,e)}ft.assert=h1;function d1(t,e,r="Assertion failed",n=zu){try{(0,u1.assert)(t,e)}catch(i){throw _d(n,`${r}: ${f1(i)}.`)}}ft.assertStruct=d1;function p1(t){throw new Error("Invalid branch reached. Should be detected during compilation.")}ft.assertExhaustive=p1;var ns={};Object.defineProperty(ns,"__esModule",{value:!0});ns.base64=void 0;const g1=wn,b1=ft,v1=(t,e={})=>{var r,n;const i=(r=e.paddingRequired)!==null&&r!==void 0?r:!1,s=(n=e.characterSet)!==null&&n!==void 0?n:"base64";let o;s==="base64"?o=String.raw`[A-Za-z0-9+\/]`:((0,b1.assert)(s==="base64url"),o=String.raw`[-_A-Za-z0-9]`);let a;return i?a=new RegExp(`^(?:${o}{4})*(?:${o}{3}=|${o}{2}==)?$`,"u"):a=new RegExp(`^(?:${o}{4})*(?:${o}{2,3}|${o}{3}=|${o}{2}==)?$`,"u"),(0,g1.pattern)(t,a)};ns.base64=v1;var fe={},is={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.remove0x=t.add0x=t.assertIsStrictHexString=t.assertIsHexString=t.isStrictHexString=t.isHexString=t.StrictHexStruct=t.HexStruct=void 0;const e=wn,r=ft;t.HexStruct=(0,e.pattern)((0,e.string)(),/^(?:0x)?[0-9a-f]+$/iu),t.StrictHexStruct=(0,e.pattern)((0,e.string)(),/^0x[0-9a-f]+$/iu);function n(l){return(0,e.is)(l,t.HexStruct)}t.isHexString=n;function i(l){return(0,e.is)(l,t.StrictHexStruct)}t.isStrictHexString=i;function s(l){(0,r.assert)(n(l),"Value must be a hexadecimal string.")}t.assertIsHexString=s;function o(l){(0,r.assert)(i(l),'Value must be a hexadecimal string, starting with "0x".')}t.assertIsStrictHexString=o;function a(l){return l.startsWith("0x")?l:l.startsWith("0X")?`0x${l.substring(2)}`:`0x${l}`}t.add0x=a;function c(l){return l.startsWith("0x")||l.startsWith("0X")?l.substring(2):l}t.remove0x=c})(is);Object.defineProperty(fe,"__esModule",{value:!0});fe.createDataView=fe.concatBytes=fe.valueToBytes=fe.stringToBytes=fe.numberToBytes=fe.signedBigIntToBytes=fe.bigIntToBytes=fe.hexToBytes=fe.bytesToString=fe.bytesToNumber=fe.bytesToSignedBigInt=fe.bytesToBigInt=fe.bytesToHex=fe.assertIsBytes=fe.isBytes=void 0;const Ct=ft,hu=is,Bl=48,Fl=58,Wl=87;function y1(){const t=[];return()=>{if(t.length===0)for(let e=0;e<256;e++)t.push(e.toString(16).padStart(2,"0"));return t}}const m1=y1();function qu(t){return t instanceof Uint8Array}fe.isBytes=qu;function yi(t){(0,Ct.assert)(qu(t),"Value must be a Uint8Array.")}fe.assertIsBytes=yi;function Sd(t){if(yi(t),t.length===0)return"0x";const e=m1(),r=new Array(t.length);for(let n=0;n=BigInt(0),"Value must be a non-negative bigint.");const e=t.toString(16);return go(e)}fe.bigIntToBytes=Md;function E1(t,e){(0,Ct.assert)(e>0);const r=t>>BigInt(31);return!((~t&r)+(t&~r)>>BigInt(e*8+-1))}function M1(t,e){(0,Ct.assert)(typeof t=="bigint","Value must be a bigint."),(0,Ct.assert)(typeof e=="number","Byte length must be a number."),(0,Ct.assert)(e>0,"Byte length must be greater than 0."),(0,Ct.assert)(E1(t,e),"Byte length is too small to represent the given value.");let r=t;const n=new Uint8Array(e);for(let i=0;i>=BigInt(8);return n.reverse()}fe.signedBigIntToBytes=M1;function xd(t){(0,Ct.assert)(typeof t=="number","Value must be a number."),(0,Ct.assert)(t>=0,"Value must be a non-negative number."),(0,Ct.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `bigIntToBytes` instead.");const e=t.toString(16);return go(e)}fe.numberToBytes=xd;function Cd(t){return(0,Ct.assert)(typeof t=="string","Value must be a string."),new TextEncoder().encode(t)}fe.stringToBytes=Cd;function Rd(t){if(typeof t=="bigint")return Md(t);if(typeof t=="number")return xd(t);if(typeof t=="string")return t.startsWith("0x")?go(t):Cd(t);if(qu(t))return t;throw new TypeError(`Unsupported value type: "${typeof t}".`)}fe.valueToBytes=Rd;function x1(t){const e=new Array(t.length);let r=0;for(let i=0;ie.call(r,n,i,this))}get(e){return yt(this,Ft,"f").get(e)}has(e){return yt(this,Ft,"f").has(e)}keys(){return yt(this,Ft,"f").keys()}values(){return yt(this,Ft,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map(([e,r])=>`${String(e)} => ${String(r)}`).join(", ")} `:""}}`}}ri.FrozenMap=Gu;class Ju{constructor(e){Yt.set(this,void 0),kd(this,Yt,new Set(e),"f"),Object.freeze(this)}get size(){return yt(this,Yt,"f").size}[(Yt=new WeakMap,Symbol.iterator)](){return yt(this,Yt,"f")[Symbol.iterator]()}entries(){return yt(this,Yt,"f").entries()}forEach(e,r){return yt(this,Yt,"f").forEach((n,i,s)=>e.call(r,n,i,this))}has(e){return yt(this,Yt,"f").has(e)}keys(){return yt(this,Yt,"f").keys()}values(){return yt(this,Yt,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map(e=>String(e)).join(", ")} `:""}}`}}ri.FrozenSet=Ju;Object.freeze(Gu);Object.freeze(Gu.prototype);Object.freeze(Ju);Object.freeze(Ju.prototype);var Td={},Zu={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.calculateNumberSize=t.calculateStringSize=t.isASCII=t.isPlainObject=t.ESCAPE_CHARACTERS_REGEXP=t.JsonSize=t.hasProperty=t.isObject=t.isNullOrUndefined=t.isNonEmptyArray=void 0;function e(l){return Array.isArray(l)&&l.length>0}t.isNonEmptyArray=e;function r(l){return l==null}t.isNullOrUndefined=r;function n(l){return!!l&&typeof l=="object"&&!Array.isArray(l)}t.isObject=n;const i=(l,d)=>Object.hasOwnProperty.call(l,d);t.hasProperty=i,function(l){l[l.Null=4]="Null",l[l.Comma=1]="Comma",l[l.Wrapper=1]="Wrapper",l[l.True=4]="True",l[l.False=5]="False",l[l.Quote=1]="Quote",l[l.Colon=1]="Colon",l[l.Date=24]="Date"}(t.JsonSize||(t.JsonSize={})),t.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu;function s(l){if(typeof l!="object"||l===null)return!1;try{let d=l;for(;Object.getPrototypeOf(d)!==null;)d=Object.getPrototypeOf(d);return Object.getPrototypeOf(l)===d}catch{return!1}}t.isPlainObject=s;function o(l){return l.charCodeAt(0)<=127}t.isASCII=o;function a(l){var d;return l.split("").reduce((b,x)=>o(x)?b+1:b+2,0)+((d=l.match(t.ESCAPE_CHARACTERS_REGEXP))!==null&&d!==void 0?d:[]).length}t.calculateStringSize=a;function c(l){return l.toString().length}t.calculateNumberSize=c})(Zu);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateJsonAndGetSize=t.getJsonRpcIdValidator=t.assertIsJsonRpcError=t.isJsonRpcError=t.assertIsJsonRpcFailure=t.isJsonRpcFailure=t.assertIsJsonRpcSuccess=t.isJsonRpcSuccess=t.assertIsJsonRpcResponse=t.isJsonRpcResponse=t.assertIsPendingJsonRpcResponse=t.isPendingJsonRpcResponse=t.JsonRpcResponseStruct=t.JsonRpcFailureStruct=t.JsonRpcSuccessStruct=t.PendingJsonRpcResponseStruct=t.assertIsJsonRpcRequest=t.isJsonRpcRequest=t.assertIsJsonRpcNotification=t.isJsonRpcNotification=t.JsonRpcNotificationStruct=t.JsonRpcRequestStruct=t.JsonRpcParamsStruct=t.JsonRpcErrorStruct=t.JsonRpcIdStruct=t.JsonRpcVersionStruct=t.jsonrpc2=t.isValidJson=t.JsonStruct=void 0;const e=wn,r=ft,n=Zu;t.JsonStruct=(0,e.define)("Json",P=>{const[j]=$(P,!0);return j?!0:"Expected a valid JSON-serializable value"});function i(P){return(0,e.is)(P,t.JsonStruct)}t.isValidJson=i,t.jsonrpc2="2.0",t.JsonRpcVersionStruct=(0,e.literal)(t.jsonrpc2),t.JsonRpcIdStruct=(0,e.nullable)((0,e.union)([(0,e.number)(),(0,e.string)()])),t.JsonRpcErrorStruct=(0,e.object)({code:(0,e.integer)(),message:(0,e.string)(),data:(0,e.optional)(t.JsonStruct),stack:(0,e.optional)((0,e.string)())}),t.JsonRpcParamsStruct=(0,e.optional)((0,e.union)([(0,e.record)((0,e.string)(),t.JsonStruct),(0,e.array)(t.JsonStruct)])),t.JsonRpcRequestStruct=(0,e.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,method:(0,e.string)(),params:t.JsonRpcParamsStruct}),t.JsonRpcNotificationStruct=(0,e.omit)(t.JsonRpcRequestStruct,["id"]);function s(P){return(0,e.is)(P,t.JsonRpcNotificationStruct)}t.isJsonRpcNotification=s;function o(P,j){(0,r.assertStruct)(P,t.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",j)}t.assertIsJsonRpcNotification=o;function a(P){return(0,e.is)(P,t.JsonRpcRequestStruct)}t.isJsonRpcRequest=a;function c(P,j){(0,r.assertStruct)(P,t.JsonRpcRequestStruct,"Invalid JSON-RPC request",j)}t.assertIsJsonRpcRequest=c,t.PendingJsonRpcResponseStruct=(0,e.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,result:(0,e.optional)((0,e.unknown)()),error:(0,e.optional)(t.JsonRpcErrorStruct)}),t.JsonRpcSuccessStruct=(0,e.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,result:t.JsonStruct}),t.JsonRpcFailureStruct=(0,e.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,error:t.JsonRpcErrorStruct}),t.JsonRpcResponseStruct=(0,e.union)([t.JsonRpcSuccessStruct,t.JsonRpcFailureStruct]);function l(P){return(0,e.is)(P,t.PendingJsonRpcResponseStruct)}t.isPendingJsonRpcResponse=l;function d(P,j){(0,r.assertStruct)(P,t.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",j)}t.assertIsPendingJsonRpcResponse=d;function p(P){return(0,e.is)(P,t.JsonRpcResponseStruct)}t.isJsonRpcResponse=p;function b(P,j){(0,r.assertStruct)(P,t.JsonRpcResponseStruct,"Invalid JSON-RPC response",j)}t.assertIsJsonRpcResponse=b;function x(P){return(0,e.is)(P,t.JsonRpcSuccessStruct)}t.isJsonRpcSuccess=x;function R(P,j){(0,r.assertStruct)(P,t.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",j)}t.assertIsJsonRpcSuccess=R;function L(P){return(0,e.is)(P,t.JsonRpcFailureStruct)}t.isJsonRpcFailure=L;function N(P,j){(0,r.assertStruct)(P,t.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",j)}t.assertIsJsonRpcFailure=N;function E(P){return(0,e.is)(P,t.JsonRpcErrorStruct)}t.isJsonRpcError=E;function I(P,j){(0,r.assertStruct)(P,t.JsonRpcErrorStruct,"Invalid JSON-RPC error",j)}t.assertIsJsonRpcError=I;function O(P){const{permitEmptyString:j,permitFractions:G,permitNull:z}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},P);return K=>!!(typeof K=="number"&&(G||Number.isInteger(K))||typeof K=="string"&&(j||K.length>0)||z&&K===null)}t.getJsonRpcIdValidator=O;function $(P,j=!1){const G=new Set;function z(W,K){if(W===void 0)return[!1,0];if(W===null)return[!0,K?0:n.JsonSize.Null];const Y=typeof W;try{if(Y==="function")return[!1,0];if(Y==="string"||W instanceof String)return[!0,K?0:(0,n.calculateStringSize)(W)+n.JsonSize.Quote*2];if(Y==="boolean"||W instanceof Boolean)return K?[!0,0]:[!0,W==!0?n.JsonSize.True:n.JsonSize.False];if(Y==="number"||W instanceof Number)return K?[!0,0]:[!0,(0,n.calculateNumberSize)(W)];if(W instanceof Date)return K?[!0,0]:[!0,isNaN(W.getDate())?n.JsonSize.Null:n.JsonSize.Date+n.JsonSize.Quote*2]}catch{return[!1,0]}if(!(0,n.isPlainObject)(W)&&!Array.isArray(W))return[!1,0];if(G.has(W))return[!1,0];G.add(W);try{return[!0,Object.entries(W).reduce((X,[v,u],h,g)=>{let[y,w]=z(u,K);if(!y)throw new Error("JSON validation did not pass. Validation process stopped.");if(G.delete(W),K)return 0;const C=Array.isArray(W)?0:v.length+n.JsonSize.Comma+n.JsonSize.Colon*2,k=h0)return o(d);if(b==="number"&&isFinite(d))return p.long?c(d):a(d);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(d))};function o(d){if(d=String(d),!(d.length>100)){var p=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(d);if(p){var b=parseFloat(p[1]),x=(p[2]||"ms").toLowerCase();switch(x){case"years":case"year":case"yrs":case"yr":case"y":return b*s;case"weeks":case"week":case"w":return b*i;case"days":case"day":case"d":return b*n;case"hours":case"hour":case"hrs":case"hr":case"h":return b*r;case"minutes":case"minute":case"mins":case"min":case"m":return b*e;case"seconds":case"second":case"secs":case"sec":case"s":return b*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return b;default:return}}}}function a(d){var p=Math.abs(d);return p>=n?Math.round(d/n)+"d":p>=r?Math.round(d/r)+"h":p>=e?Math.round(d/e)+"m":p>=t?Math.round(d/t)+"s":d+"ms"}function c(d){var p=Math.abs(d);return p>=n?l(d,p,n,"day"):p>=r?l(d,p,r,"hour"):p>=e?l(d,p,e,"minute"):p>=t?l(d,p,t,"second"):d+" ms"}function l(d,p,b,x){var R=p>=b*1.5;return Math.round(d/b)+" "+x+(R?"s":"")}return Aa}function j1(t){r.debug=r,r.default=r,r.coerce=c,r.disable=s,r.enable=i,r.enabled=o,r.humanize=D1(),r.destroy=l,Object.keys(t).forEach(d=>{r[d]=t[d]}),r.names=[],r.skips=[],r.formatters={};function e(d){let p=0;for(let b=0;b{if(j==="%%")return"%";$++;const z=r.formatters[G];if(typeof z=="function"){const W=N[$];j=z.call(E,W),N.splice($,1),$--}return j}),r.formatArgs.call(E,N),(E.log||r.log).apply(E,N)}return L.namespace=d,L.useColors=r.useColors(),L.color=r.selectColor(d),L.extend=n,L.destroy=r.destroy,Object.defineProperty(L,"enabled",{enumerable:!0,configurable:!1,get:()=>b!==null?b:(x!==r.namespaces&&(x=r.namespaces,R=r.enabled(d)),R),set:N=>{b=N}}),typeof r.init=="function"&&r.init(L),L}function n(d,p){const b=r(this.namespace+(typeof p>"u"?":":p)+d);return b.log=this.log,b}function i(d){r.save(d),r.namespaces=d,r.names=[],r.skips=[];let p;const b=(typeof d=="string"?d:"").split(/[\s,]+/),x=b.length;for(p=0;p"-"+p)].join(",");return r.enable(""),d}function o(d){if(d[d.length-1]==="*")return!0;let p,b;for(p=0,b=r.skips.length;p{let c=!1;return()=>{c||(c=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function r(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function n(c){if(c[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+c[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const l="color: "+this.color;c.splice(1,0,l,"color: inherit");let d=0,p=0;c[0].replace(/%[a-zA-Z%]/g,b=>{b!=="%%"&&(d++,b==="%c"&&(p=d))}),c.splice(p,0,l)}e.log=console.debug||console.log||(()=>{});function i(c){try{c?e.storage.setItem("debug",c):e.storage.removeItem("debug")}catch{}}function s(){let c;try{c=e.storage.getItem("debug")}catch{}return!c&&typeof process<"u"&&"env"in process&&(c={}.DEBUG),c}function o(){try{return localStorage}catch{}}t.exports=B1(e);const{formatters:a}=t.exports;a.j=function(c){try{return JSON.stringify(c)}catch(l){return"[UnexpectedJSONParseError]: "+l.message}}})(du,du.exports);var F1=du.exports,W1=J&&J.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ni,"__esModule",{value:!0});ni.createModuleLogger=ni.createProjectLogger=void 0;const H1=W1(F1),V1=(0,H1.default)("metamask");function U1(t){return V1.extend(t)}ni.createProjectLogger=U1;function z1(t,e){return t.extend(e)}ni.createModuleLogger=z1;var sr={};Object.defineProperty(sr,"__esModule",{value:!0});sr.hexToBigInt=sr.hexToNumber=sr.bigIntToHex=sr.numberToHex=void 0;const Gn=ft,Hi=is,q1=t=>((0,Gn.assert)(typeof t=="number","Value must be a number."),(0,Gn.assert)(t>=0,"Value must be a non-negative number."),(0,Gn.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,Hi.add0x)(t.toString(16)));sr.numberToHex=q1;const G1=t=>((0,Gn.assert)(typeof t=="bigint","Value must be a bigint."),(0,Gn.assert)(t>=0,"Value must be a non-negative bigint."),(0,Hi.add0x)(t.toString(16)));sr.bigIntToHex=G1;const J1=t=>{(0,Hi.assertIsHexString)(t);const e=parseInt(t,16);return(0,Gn.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `hexToBigInt` instead."),e};sr.hexToNumber=J1;const Z1=t=>((0,Hi.assertIsHexString)(t),BigInt((0,Hi.add0x)(t)));sr.hexToBigInt=Z1;var Od={};Object.defineProperty(Od,"__esModule",{value:!0});var Nd={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.timeSince=t.inMilliseconds=t.Duration=void 0,function(s){s[s.Millisecond=1]="Millisecond",s[s.Second=1e3]="Second",s[s.Minute=6e4]="Minute",s[s.Hour=36e5]="Hour",s[s.Day=864e5]="Day",s[s.Week=6048e5]="Week",s[s.Year=31536e6]="Year"}(t.Duration||(t.Duration={}));const e=s=>Number.isInteger(s)&&s>=0,r=(s,o)=>{if(!e(s))throw new Error(`"${o}" must be a non-negative integer. Received: "${s}".`)};function n(s,o){return r(s,"count"),s*o}t.inMilliseconds=n;function i(s){return r(s,"timestamp"),Date.now()-s}t.timeSince=i})(Nd);var Ld={},pu={exports:{}};const Q1="2.0.0",Pd=256,Y1=Number.MAX_SAFE_INTEGER||9007199254740991,K1=16,X1=Pd-6,ew=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var yo={MAX_LENGTH:Pd,MAX_SAFE_COMPONENT_LENGTH:K1,MAX_SAFE_BUILD_LENGTH:X1,MAX_SAFE_INTEGER:Y1,RELEASE_TYPES:ew,SEMVER_SPEC_VERSION:Q1,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const tw=typeof process=="object"&&process.env&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};var mo=tw;(function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:i}=yo,s=mo;e=t.exports={};const o=e.re=[],a=e.safeRe=[],c=e.src=[],l=e.t={};let d=0;const p="[a-zA-Z0-9-]",b=[["\\s",1],["\\d",i],[p,n]],x=L=>{for(const[N,E]of b)L=L.split(`${N}*`).join(`${N}{0,${E}}`).split(`${N}+`).join(`${N}{1,${E}}`);return L},R=(L,N,E)=>{const I=x(N),O=d++;s(L,O,N),l[L]=O,c[O]=N,o[O]=new RegExp(N,E?"g":void 0),a[O]=new RegExp(I,E?"g":void 0)};R("NUMERICIDENTIFIER","0|[1-9]\\d*"),R("NUMERICIDENTIFIERLOOSE","\\d+"),R("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),R("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`),R("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`),R("PRERELEASEIDENTIFIER",`(?:${c[l.NUMERICIDENTIFIER]}|${c[l.NONNUMERICIDENTIFIER]})`),R("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NUMERICIDENTIFIERLOOSE]}|${c[l.NONNUMERICIDENTIFIER]})`),R("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`),R("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`),R("BUILDIDENTIFIER",`${p}+`),R("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`),R("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`),R("FULL",`^${c[l.FULLPLAIN]}$`),R("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`),R("LOOSE",`^${c[l.LOOSEPLAIN]}$`),R("GTLT","((?:<|>)?=?)"),R("XRANGEIDENTIFIERLOOSE",`${c[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),R("XRANGEIDENTIFIER",`${c[l.NUMERICIDENTIFIER]}|x|X|\\*`),R("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`),R("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`),R("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`),R("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`),R("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),R("COERCERTL",c[l.COERCE],!0),R("LONETILDE","(?:~>?)"),R("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",R("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`),R("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`),R("LONECARET","(?:\\^)"),R("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",R("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`),R("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`),R("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`),R("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`),R("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",R("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`),R("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`),R("STAR","(<|>)?=?\\s*\\*"),R("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),R("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(pu,pu.exports);var ss=pu.exports;const rw=Object.freeze({loose:!0}),nw=Object.freeze({}),iw=t=>t?typeof t!="object"?rw:t:nw;var Qu=iw;const Ul=/^[0-9]+$/,$d=(t,e)=>{const r=Ul.test(t),n=Ul.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t$d(e,t);var Dd={compareIdentifiers:$d,rcompareIdentifiers:sw};const _s=mo,{MAX_LENGTH:zl,MAX_SAFE_INTEGER:Ss}=yo,{safeRe:ql,t:Gl}=ss,ow=Qu,{compareIdentifiers:Pn}=Dd;let aw=class Xt{constructor(e,r){if(r=ow(r),e instanceof Xt){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>zl)throw new TypeError(`version is longer than ${zl} characters`);_s("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const n=e.trim().match(r.loose?ql[Gl.LOOSE]:ql[Gl.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>Ss||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Ss||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Ss||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){const s=+i;if(s>=0&&s=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(r){let s=[r,i];n===!1&&(s=[r]),Pn(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var _t=aw;const Jl=_t,uw=(t,e,r=!1)=>{if(t instanceof Jl)return t;try{return new Jl(t,e)}catch(n){if(!r)return null;throw n}};var mi=uw;const cw=mi,lw=(t,e)=>{const r=cw(t,e);return r?r.version:null};var fw=lw;const hw=mi,dw=(t,e)=>{const r=hw(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};var pw=dw;const Zl=_t,gw=(t,e,r,n,i)=>{typeof r=="string"&&(i=n,n=r,r=void 0);try{return new Zl(t instanceof Zl?t.version:t,r).inc(e,n,i).version}catch{return null}};var bw=gw;const Ql=mi,vw=(t,e)=>{const r=Ql(t,null,!0),n=Ql(e,null,!0),i=r.compare(n);if(i===0)return null;const s=i>0,o=s?r:n,a=s?n:r,c=!!o.prerelease.length;if(!!a.prerelease.length&&!c)return!a.patch&&!a.minor?"major":o.patch?"patch":o.minor?"minor":"major";const d=c?"pre":"";return r.major!==n.major?d+"major":r.minor!==n.minor?d+"minor":r.patch!==n.patch?d+"patch":"prerelease"};var yw=vw;const mw=_t,ww=(t,e)=>new mw(t,e).major;var _w=ww;const Sw=_t,Ew=(t,e)=>new Sw(t,e).minor;var Mw=Ew;const xw=_t,Cw=(t,e)=>new xw(t,e).patch;var Rw=Cw;const Iw=mi,Aw=(t,e)=>{const r=Iw(t,e);return r&&r.prerelease.length?r.prerelease:null};var kw=Aw;const Yl=_t,Tw=(t,e,r)=>new Yl(t,r).compare(new Yl(e,r));var Gt=Tw;const Ow=Gt,Nw=(t,e,r)=>Ow(e,t,r);var Lw=Nw;const Pw=Gt,$w=(t,e)=>Pw(t,e,!0);var Dw=$w;const Kl=_t,jw=(t,e,r)=>{const n=new Kl(t,r),i=new Kl(e,r);return n.compare(i)||n.compareBuild(i)};var Yu=jw;const Bw=Yu,Fw=(t,e)=>t.sort((r,n)=>Bw(r,n,e));var Ww=Fw;const Hw=Yu,Vw=(t,e)=>t.sort((r,n)=>Hw(n,r,e));var Uw=Vw;const zw=Gt,qw=(t,e,r)=>zw(t,e,r)>0;var wo=qw;const Gw=Gt,Jw=(t,e,r)=>Gw(t,e,r)<0;var Ku=Jw;const Zw=Gt,Qw=(t,e,r)=>Zw(t,e,r)===0;var jd=Qw;const Yw=Gt,Kw=(t,e,r)=>Yw(t,e,r)!==0;var Bd=Kw;const Xw=Gt,e_=(t,e,r)=>Xw(t,e,r)>=0;var Xu=e_;const t_=Gt,r_=(t,e,r)=>t_(t,e,r)<=0;var ec=r_;const n_=jd,i_=Bd,s_=wo,o_=Xu,a_=Ku,u_=ec,c_=(t,e,r,n)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return n_(t,r,n);case"!=":return i_(t,r,n);case">":return s_(t,r,n);case">=":return o_(t,r,n);case"<":return a_(t,r,n);case"<=":return u_(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}};var Fd=c_;const l_=_t,f_=mi,{safeRe:Es,t:Ms}=ss,h_=(t,e)=>{if(t instanceof l_)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(Es[Ms.COERCE]);else{let n;for(;(n=Es[Ms.COERCERTL].exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||n.index+n[0].length!==r.index+r[0].length)&&(r=n),Es[Ms.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;Es[Ms.COERCERTL].lastIndex=-1}return r===null?null:f_(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,e)};var d_=h_;const p_=M0(),rn=Symbol("max"),dr=Symbol("length"),$n=Symbol("lengthCalculator"),Di=Symbol("allowStale"),on=Symbol("maxAge"),lr=Symbol("dispose"),Xl=Symbol("noDisposeOnSet"),st=Symbol("lruList"),Vt=Symbol("cache"),Wd=Symbol("updateAgeOnGet"),ka=()=>1;class g_{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");this[rn]=e.max||1/0;const r=e.length||ka;if(this[$n]=typeof r!="function"?ka:r,this[Di]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[on]=e.maxAge||0,this[lr]=e.dispose,this[Xl]=e.noDisposeOnSet||!1,this[Wd]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[rn]=e||1/0,Ci(this)}get max(){return this[rn]}set allowStale(e){this[Di]=!!e}get allowStale(){return this[Di]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[on]=e,Ci(this)}get maxAge(){return this[on]}set lengthCalculator(e){typeof e!="function"&&(e=ka),e!==this[$n]&&(this[$n]=e,this[dr]=0,this[st].forEach(r=>{r.length=this[$n](r.value,r.key),this[dr]+=r.length})),Ci(this)}get lengthCalculator(){return this[$n]}get length(){return this[dr]}get itemCount(){return this[st].length}rforEach(e,r){r=r||this;for(let n=this[st].tail;n!==null;){const i=n.prev;ef(this,e,n,r),n=i}}forEach(e,r){r=r||this;for(let n=this[st].head;n!==null;){const i=n.next;ef(this,e,n,r),n=i}}keys(){return this[st].toArray().map(e=>e.key)}values(){return this[st].toArray().map(e=>e.value)}reset(){this[lr]&&this[st]&&this[st].length&&this[st].forEach(e=>this[lr](e.key,e.value)),this[Vt]=new Map,this[st]=new p_,this[dr]=0}dump(){return this[st].map(e=>Hs(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[st]}set(e,r,n){if(n=n||this[on],n&&typeof n!="number")throw new TypeError("maxAge must be a number");const i=n?Date.now():0,s=this[$n](r,e);if(this[Vt].has(e)){if(s>this[rn])return Jn(this,this[Vt].get(e)),!1;const c=this[Vt].get(e).value;return this[lr]&&(this[Xl]||this[lr](e,c.value)),c.now=i,c.maxAge=n,c.value=r,this[dr]+=s-c.length,c.length=s,this.get(e),Ci(this),!0}const o=new b_(e,r,s,i,n);return o.length>this[rn]?(this[lr]&&this[lr](e,r),!1):(this[dr]+=o.length,this[st].unshift(o),this[Vt].set(e,this[st].head),Ci(this),!0)}has(e){if(!this[Vt].has(e))return!1;const r=this[Vt].get(e).value;return!Hs(this,r)}get(e){return Ta(this,e,!0)}peek(e){return Ta(this,e,!1)}pop(){const e=this[st].tail;return e?(Jn(this,e),e.value):null}del(e){Jn(this,this[Vt].get(e))}load(e){this.reset();const r=Date.now();for(let n=e.length-1;n>=0;n--){const i=e[n],s=i.e||0;if(s===0)this.set(i.k,i.v);else{const o=s-r;o>0&&this.set(i.k,i.v,o)}}}prune(){this[Vt].forEach((e,r)=>Ta(this,r,!1))}}const Ta=(t,e,r)=>{const n=t[Vt].get(e);if(n){const i=n.value;if(Hs(t,i)){if(Jn(t,n),!t[Di])return}else r&&(t[Wd]&&(n.value.now=Date.now()),t[st].unshiftNode(n));return i.value}},Hs=(t,e)=>{if(!e||!e.maxAge&&!t[on])return!1;const r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[on]&&r>t[on]},Ci=t=>{if(t[dr]>t[rn])for(let e=t[st].tail;t[dr]>t[rn]&&e!==null;){const r=e.prev;Jn(t,e),e=r}},Jn=(t,e)=>{if(e){const r=e.value;t[lr]&&t[lr](r.key,r.value),t[dr]-=r.length,t[Vt].delete(r.key),t[st].removeNode(e)}};class b_{constructor(e,r,n,i,s){this.key=e,this.value=r,this.length=n,this.now=i,this.maxAge=s||0}}const ef=(t,e,r,n)=>{let i=r.value;Hs(t,i)&&(Jn(t,r),t[Di]||(i=void 0)),i&&e.call(n,i.value,i.key,t)};var v_=g_,Oa,tf;function Jt(){if(tf)return Oa;tf=1;class t{constructor(u,h){if(h=n(h),u instanceof t)return u.loose===!!h.loose&&u.includePrerelease===!!h.includePrerelease?u:new t(u.raw,h);if(u instanceof i)return this.raw=u.value,this.set=[[u]],this.format(),this;if(this.options=h,this.loose=!!h.loose,this.includePrerelease=!!h.includePrerelease,this.raw=u.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(g=>this.parseRange(g.trim())).filter(g=>g.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const g=this.set[0];if(this.set=this.set.filter(y=>!R(y[0])),this.set.length===0)this.set=[g];else if(this.set.length>1){for(const y of this.set)if(y.length===1&&L(y[0])){this.set=[y];break}}}this.format()}format(){return this.range=this.set.map(u=>u.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(u){const g=((this.options.includePrerelease&&b)|(this.options.loose&&x))+":"+u,y=r.get(g);if(y)return y;const w=this.options.loose,C=w?a[c.HYPHENRANGELOOSE]:a[c.HYPHENRANGE];u=u.replace(C,Y(this.options.includePrerelease)),s("hyphen replace",u),u=u.replace(a[c.COMPARATORTRIM],l),s("comparator trim",u),u=u.replace(a[c.TILDETRIM],d),s("tilde trim",u),u=u.replace(a[c.CARETTRIM],p),s("caret trim",u);let k=u.split(" ").map(U=>E(U,this.options)).join(" ").split(/\s+/).map(U=>K(U,this.options));w&&(k=k.filter(U=>(s("loose invalid filter",U,this.options),!!U.match(a[c.COMPARATORLOOSE])))),s("range list",k);const m=new Map,f=k.map(U=>new i(U,this.options));for(const U of f){if(R(U))return[U];m.set(U.value,U)}m.size>1&&m.has("")&&m.delete("");const M=[...m.values()];return r.set(g,M),M}intersects(u,h){if(!(u instanceof t))throw new TypeError("a Range is required");return this.set.some(g=>N(g,h)&&u.set.some(y=>N(y,h)&&g.every(w=>y.every(C=>w.intersects(C,h)))))}test(u){if(!u)return!1;if(typeof u=="string")try{u=new o(u,this.options)}catch{return!1}for(let h=0;hv.value==="<0.0.0-0",L=v=>v.value==="",N=(v,u)=>{let h=!0;const g=v.slice();let y=g.pop();for(;h&&g.length;)h=g.every(w=>y.intersects(w,u)),y=g.pop();return h},E=(v,u)=>(s("comp",v,u),v=P(v,u),s("caret",v),v=O(v,u),s("tildes",v),v=G(v,u),s("xrange",v),v=W(v,u),s("stars",v),v),I=v=>!v||v.toLowerCase()==="x"||v==="*",O=(v,u)=>v.trim().split(/\s+/).map(h=>$(h,u)).join(" "),$=(v,u)=>{const h=u.loose?a[c.TILDELOOSE]:a[c.TILDE];return v.replace(h,(g,y,w,C,k)=>{s("tilde",v,g,y,w,C,k);let m;return I(y)?m="":I(w)?m=`>=${y}.0.0 <${+y+1}.0.0-0`:I(C)?m=`>=${y}.${w}.0 <${y}.${+w+1}.0-0`:k?(s("replaceTilde pr",k),m=`>=${y}.${w}.${C}-${k} <${y}.${+w+1}.0-0`):m=`>=${y}.${w}.${C} <${y}.${+w+1}.0-0`,s("tilde return",m),m})},P=(v,u)=>v.trim().split(/\s+/).map(h=>j(h,u)).join(" "),j=(v,u)=>{s("caret",v,u);const h=u.loose?a[c.CARETLOOSE]:a[c.CARET],g=u.includePrerelease?"-0":"";return v.replace(h,(y,w,C,k,m)=>{s("caret",v,y,w,C,k,m);let f;return I(w)?f="":I(C)?f=`>=${w}.0.0${g} <${+w+1}.0.0-0`:I(k)?w==="0"?f=`>=${w}.${C}.0${g} <${w}.${+C+1}.0-0`:f=`>=${w}.${C}.0${g} <${+w+1}.0.0-0`:m?(s("replaceCaret pr",m),w==="0"?C==="0"?f=`>=${w}.${C}.${k}-${m} <${w}.${C}.${+k+1}-0`:f=`>=${w}.${C}.${k}-${m} <${w}.${+C+1}.0-0`:f=`>=${w}.${C}.${k}-${m} <${+w+1}.0.0-0`):(s("no pr"),w==="0"?C==="0"?f=`>=${w}.${C}.${k}${g} <${w}.${C}.${+k+1}-0`:f=`>=${w}.${C}.${k}${g} <${w}.${+C+1}.0-0`:f=`>=${w}.${C}.${k} <${+w+1}.0.0-0`),s("caret return",f),f})},G=(v,u)=>(s("replaceXRanges",v,u),v.split(/\s+/).map(h=>z(h,u)).join(" ")),z=(v,u)=>{v=v.trim();const h=u.loose?a[c.XRANGELOOSE]:a[c.XRANGE];return v.replace(h,(g,y,w,C,k,m)=>{s("xRange",v,g,y,w,C,k,m);const f=I(w),M=f||I(C),U=M||I(k),q=U;return y==="="&&q&&(y=""),m=u.includePrerelease?"-0":"",f?y===">"||y==="<"?g="<0.0.0-0":g="*":y&&q?(M&&(C=0),k=0,y===">"?(y=">=",M?(w=+w+1,C=0,k=0):(C=+C+1,k=0)):y==="<="&&(y="<",M?w=+w+1:C=+C+1),y==="<"&&(m="-0"),g=`${y+w}.${C}.${k}${m}`):M?g=`>=${w}.0.0${m} <${+w+1}.0.0-0`:U&&(g=`>=${w}.${C}.0${m} <${w}.${+C+1}.0-0`),s("xRange return",g),g})},W=(v,u)=>(s("replaceStars",v,u),v.trim().replace(a[c.STAR],"")),K=(v,u)=>(s("replaceGTE0",v,u),v.trim().replace(a[u.includePrerelease?c.GTE0PRE:c.GTE0],"")),Y=v=>(u,h,g,y,w,C,k,m,f,M,U,q,A)=>(I(g)?h="":I(y)?h=`>=${g}.0.0${v?"-0":""}`:I(w)?h=`>=${g}.${y}.0${v?"-0":""}`:C?h=`>=${h}`:h=`>=${h}${v?"-0":""}`,I(f)?m="":I(M)?m=`<${+f+1}.0.0-0`:I(U)?m=`<${f}.${+M+1}.0-0`:q?m=`<=${f}.${M}.${U}-${q}`:v?m=`<${f}.${M}.${+U+1}-0`:m=`<=${m}`,`${h} ${m}`.trim()),X=(v,u,h)=>{for(let g=0;g0){const y=v[g].semver;if(y.major===u.major&&y.minor===u.minor&&y.patch===u.patch)return!0}return!1}return!0};return Oa}var Na,rf;function _o(){if(rf)return Na;rf=1;const t=Symbol("SemVer ANY");class e{static get ANY(){return t}constructor(d,p){if(p=r(p),d instanceof e){if(d.loose===!!p.loose)return d;d=d.value}d=d.trim().split(/\s+/).join(" "),o("comparator",d,p),this.options=p,this.loose=!!p.loose,this.parse(d),this.semver===t?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(d){const p=this.options.loose?n[i.COMPARATORLOOSE]:n[i.COMPARATOR],b=d.match(p);if(!b)throw new TypeError(`Invalid comparator: ${d}`);this.operator=b[1]!==void 0?b[1]:"",this.operator==="="&&(this.operator=""),b[2]?this.semver=new a(b[2],this.options.loose):this.semver=t}toString(){return this.value}test(d){if(o("Comparator.test",d,this.options.loose),this.semver===t||d===t)return!0;if(typeof d=="string")try{d=new a(d,this.options)}catch{return!1}return s(d,this.operator,this.semver,this.options)}intersects(d,p){if(!(d instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new c(d.value,p).test(this.value):d.operator===""?d.value===""?!0:new c(this.value,p).test(d.semver):(p=r(p),p.includePrerelease&&(this.value==="<0.0.0-0"||d.value==="<0.0.0-0")||!p.includePrerelease&&(this.value.startsWith("<0.0.0")||d.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&d.operator.startsWith(">")||this.operator.startsWith("<")&&d.operator.startsWith("<")||this.semver.version===d.semver.version&&this.operator.includes("=")&&d.operator.includes("=")||s(this.semver,"<",d.semver,p)&&this.operator.startsWith(">")&&d.operator.startsWith("<")||s(this.semver,">",d.semver,p)&&this.operator.startsWith("<")&&d.operator.startsWith(">")))}}Na=e;const r=Qu,{safeRe:n,t:i}=ss,s=Fd,o=mo,a=_t,c=Jt();return Na}const y_=Jt(),m_=(t,e,r)=>{try{e=new y_(e,r)}catch{return!1}return e.test(t)};var So=m_;const w_=Jt(),__=(t,e)=>new w_(t,e).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));var S_=__;const E_=_t,M_=Jt(),x_=(t,e,r)=>{let n=null,i=null,s=null;try{s=new M_(e,r)}catch{return null}return t.forEach(o=>{s.test(o)&&(!n||i.compare(o)===-1)&&(n=o,i=new E_(n,r))}),n};var C_=x_;const R_=_t,I_=Jt(),A_=(t,e,r)=>{let n=null,i=null,s=null;try{s=new I_(e,r)}catch{return null}return t.forEach(o=>{s.test(o)&&(!n||i.compare(o)===1)&&(n=o,i=new R_(n,r))}),n};var k_=A_;const La=_t,T_=Jt(),nf=wo,O_=(t,e)=>{t=new T_(t,e);let r=new La("0.0.0");if(t.test(r)||(r=new La("0.0.0-0"),t.test(r)))return r;r=null;for(let n=0;n{const a=new La(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!s||nf(a,s))&&(s=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!r||nf(r,s))&&(r=s)}return r&&t.test(r)?r:null};var N_=O_;const L_=Jt(),P_=(t,e)=>{try{return new L_(t,e).range||"*"}catch{return null}};var $_=P_;const D_=_t,Hd=_o(),{ANY:j_}=Hd,B_=Jt(),F_=So,sf=wo,of=Ku,W_=ec,H_=Xu,V_=(t,e,r,n)=>{t=new D_(t,n),e=new B_(e,n);let i,s,o,a,c;switch(r){case">":i=sf,s=W_,o=of,a=">",c=">=";break;case"<":i=of,s=H_,o=sf,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(F_(t,e,n))return!1;for(let l=0;l{x.semver===j_&&(x=new Hd(">=0.0.0")),p=p||x,b=b||x,i(x.semver,p.semver,n)?p=x:o(x.semver,b.semver,n)&&(b=x)}),p.operator===a||p.operator===c||(!b.operator||b.operator===a)&&s(t,b.semver))return!1;if(b.operator===c&&o(t,b.semver))return!1}return!0};var tc=V_;const U_=tc,z_=(t,e,r)=>U_(t,e,">",r);var q_=z_;const G_=tc,J_=(t,e,r)=>G_(t,e,"<",r);var Z_=J_;const af=Jt(),Q_=(t,e,r)=>(t=new af(t,r),e=new af(e,r),t.intersects(e,r));var Y_=Q_;const K_=So,X_=Gt;var e2=(t,e,r)=>{const n=[];let i=null,s=null;const o=t.sort((d,p)=>X_(d,p,r));for(const d of o)K_(d,e,r)?(s=d,i||(i=d)):(s&&n.push([i,s]),s=null,i=null);i&&n.push([i,null]);const a=[];for(const[d,p]of n)d===p?a.push(d):!p&&d===o[0]?a.push("*"):p?d===o[0]?a.push(`<=${p}`):a.push(`${d} - ${p}`):a.push(`>=${d}`);const c=a.join(" || "),l=typeof e.raw=="string"?e.raw:String(e);return c.length{if(t===e)return!0;t=new uf(t,r),e=new uf(e,r);let n=!1;e:for(const i of t.set){for(const s of e.set){const o=n2(i,s,r);if(n=n||o!==null,o)continue e}if(n)return!1}return!0},r2=[new rc(">=0.0.0-0")],cf=[new rc(">=0.0.0")],n2=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===Pa){if(e.length===1&&e[0].semver===Pa)return!0;r.includePrerelease?t=r2:t=cf}if(e.length===1&&e[0].semver===Pa){if(r.includePrerelease)return!0;e=cf}const n=new Set;let i,s;for(const x of t)x.operator===">"||x.operator===">="?i=lf(i,x,r):x.operator==="<"||x.operator==="<="?s=ff(s,x,r):n.add(x.semver);if(n.size>1)return null;let o;if(i&&s){if(o=nc(i.semver,s.semver,r),o>0)return null;if(o===0&&(i.operator!==">="||s.operator!=="<="))return null}for(const x of n){if(i&&!Ri(x,String(i),r)||s&&!Ri(x,String(s),r))return null;for(const R of e)if(!Ri(x,String(R),r))return!1;return!0}let a,c,l,d,p=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1,b=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;p&&p.prerelease.length===1&&s.operator==="<"&&p.prerelease[0]===0&&(p=!1);for(const x of e){if(d=d||x.operator===">"||x.operator===">=",l=l||x.operator==="<"||x.operator==="<=",i){if(b&&x.semver.prerelease&&x.semver.prerelease.length&&x.semver.major===b.major&&x.semver.minor===b.minor&&x.semver.patch===b.patch&&(b=!1),x.operator===">"||x.operator===">="){if(a=lf(i,x,r),a===x&&a!==i)return!1}else if(i.operator===">="&&!Ri(i.semver,String(x),r))return!1}if(s){if(p&&x.semver.prerelease&&x.semver.prerelease.length&&x.semver.major===p.major&&x.semver.minor===p.minor&&x.semver.patch===p.patch&&(p=!1),x.operator==="<"||x.operator==="<="){if(c=ff(s,x,r),c===x&&c!==s)return!1}else if(s.operator==="<="&&!Ri(s.semver,String(x),r))return!1}if(!x.operator&&(s||i)&&o!==0)return!1}return!(i&&l&&!s&&o!==0||s&&d&&!i&&o!==0||b||p)},lf=(t,e,r)=>{if(!t)return e;const n=nc(t.semver,e.semver,r);return n>0?t:n<0||e.operator===">"&&t.operator===">="?e:t},ff=(t,e,r)=>{if(!t)return e;const n=nc(t.semver,e.semver,r);return n<0?t:n>0||e.operator==="<"&&t.operator==="<="?e:t};var i2=t2;const $a=ss,hf=yo,s2=_t,df=Dd,o2=mi,a2=fw,u2=pw,c2=bw,l2=yw,f2=_w,h2=Mw,d2=Rw,p2=kw,g2=Gt,b2=Lw,v2=Dw,y2=Yu,m2=Ww,w2=Uw,_2=wo,S2=Ku,E2=jd,M2=Bd,x2=Xu,C2=ec,R2=Fd,I2=d_,A2=_o(),k2=Jt(),T2=So,O2=S_,N2=C_,L2=k_,P2=N_,$2=$_,D2=tc,j2=q_,B2=Z_,F2=Y_,W2=e2,H2=i2;var V2={parse:o2,valid:a2,clean:u2,inc:c2,diff:l2,major:f2,minor:h2,patch:d2,prerelease:p2,compare:g2,rcompare:b2,compareLoose:v2,compareBuild:y2,sort:m2,rsort:w2,gt:_2,lt:S2,eq:E2,neq:M2,gte:x2,lte:C2,cmp:R2,coerce:I2,Comparator:A2,Range:k2,satisfies:T2,toComparators:O2,maxSatisfying:N2,minSatisfying:L2,minVersion:P2,validRange:$2,outside:D2,gtr:j2,ltr:B2,intersects:F2,simplifyRange:W2,subset:H2,SemVer:s2,re:$a.re,src:$a.src,tokens:$a.t,SEMVER_SPEC_VERSION:hf.SEMVER_SPEC_VERSION,RELEASE_TYPES:hf.RELEASE_TYPES,compareIdentifiers:df.compareIdentifiers,rcompareIdentifiers:df.rcompareIdentifiers};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.satisfiesVersionRange=t.gtRange=t.gtVersion=t.assertIsSemVerRange=t.assertIsSemVerVersion=t.isValidSemVerRange=t.isValidSemVerVersion=t.VersionRangeStruct=t.VersionStruct=void 0;const e=V2,r=wn,n=ft;t.VersionStruct=(0,r.refine)((0,r.string)(),"Version",p=>(0,e.valid)(p)===null?`Expected SemVer version, got "${p}"`:!0),t.VersionRangeStruct=(0,r.refine)((0,r.string)(),"Version range",p=>(0,e.validRange)(p)===null?`Expected SemVer range, got "${p}"`:!0);function i(p){return(0,r.is)(p,t.VersionStruct)}t.isValidSemVerVersion=i;function s(p){return(0,r.is)(p,t.VersionRangeStruct)}t.isValidSemVerRange=s;function o(p){(0,n.assertStruct)(p,t.VersionStruct)}t.assertIsSemVerVersion=o;function a(p){(0,n.assertStruct)(p,t.VersionRangeStruct)}t.assertIsSemVerRange=a;function c(p,b){return(0,e.gt)(p,b)}t.gtVersion=c;function l(p,b){return(0,e.gtr)(p,b)}t.gtRange=l;function d(p,b){return(0,e.satisfies)(p,b,{includePrerelease:!0})}t.satisfiesVersionRange=d})(Ld);(function(t){var e=J&&J.__createBinding||(Object.create?function(n,i,s,o){o===void 0&&(o=s);var a=Object.getOwnPropertyDescriptor(i,s);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,o,a)}:function(n,i,s,o){o===void 0&&(o=s),n[o]=i[s]}),r=J&&J.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&e(i,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(ft,t),r(ns,t),r(fe,t),r(bo,t),r(ir,t),r(ri,t),r(is,t),r(Td,t),r(ni,t),r(Zu,t),r(sr,t),r(Od,t),r(Nd,t),r(Ld,t)})(hd);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createModuleLogger=t.projectLogger=void 0;const e=hd;Object.defineProperty(t,"createModuleLogger",{enumerable:!0,get:function(){return e.createModuleLogger}}),t.projectLogger=(0,e.createProjectLogger)("eth-block-tracker")})(fd);var Vd=J&&J.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(po,"__esModule",{value:!0});po.PollingBlockTracker=void 0;const U2=Vd(Bu),z2=Vd(vm),q2=ts,pf=fd,gf=(0,pf.createModuleLogger)(pf.projectLogger,"polling-block-tracker"),G2=(0,U2.default)(),J2=1e3;class Z2 extends q2.BaseBlockTracker{constructor(e={}){var r;if(!e.provider)throw new Error("PollingBlockTracker - no provider specified.");super({blockResetDuration:(r=e.blockResetDuration)!==null&&r!==void 0?r:e.pollingInterval}),this._provider=e.provider,this._pollingInterval=e.pollingInterval||20*J2,this._retryTimeout=e.retryTimeout||this._pollingInterval/10,this._keepEventLoopActive=e.keepEventLoopActive===void 0?!0:e.keepEventLoopActive,this._setSkipCacheFlag=e.setSkipCacheFlag||!1}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}async _start(){this._synchronize()}async _end(){}async _synchronize(){for(var e;this._isRunning;)try{await this._updateLatestBlock();const r=bf(this._pollingInterval,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await r}catch(r){const n=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block: diff --git a/assets/index-49a0569e.js b/assets/index-99ae9c5d.js similarity index 98% rename from assets/index-49a0569e.js rename to assets/index-99ae9c5d.js index 3560fe2..f937499 100644 --- a/assets/index-49a0569e.js +++ b/assets/index-99ae9c5d.js @@ -1 +1 @@ -import{_ as pe}from"./index-42ee4a0e.js";const fe=Symbol(),Z=Object.getPrototypeOf,F=new WeakMap,ge=e=>e&&(F.has(e)?F.get(e):Z(e)===Object.prototype||Z(e)===Array.prototype),me=e=>ge(e)&&e[fe]||null,ee=(e,t=!0)=>{F.set(e,t)},Y=e=>typeof e=="object"&&e!==null,D=new WeakMap,x=new WeakSet,he=(e=Object.is,t=(o,h)=>new Proxy(o,h),s=o=>Y(o)&&!x.has(o)&&(Array.isArray(o)||!(Symbol.iterator in o))&&!(o instanceof WeakMap)&&!(o instanceof WeakSet)&&!(o instanceof Error)&&!(o instanceof Number)&&!(o instanceof Date)&&!(o instanceof String)&&!(o instanceof RegExp)&&!(o instanceof ArrayBuffer),r=o=>{switch(o.status){case"fulfilled":return o.value;case"rejected":throw o.reason;default:throw o}},l=new WeakMap,c=(o,h,v=r)=>{const b=l.get(o);if((b==null?void 0:b[0])===h)return b[1];const y=Array.isArray(o)?[]:Object.create(Object.getPrototypeOf(o));return ee(y,!0),l.set(o,[h,y]),Reflect.ownKeys(o).forEach(j=>{if(Object.getOwnPropertyDescriptor(y,j))return;const O=Reflect.get(o,j),P={value:O,enumerable:!0,configurable:!0};if(x.has(O))ee(O,!1);else if(O instanceof Promise)delete P.value,P.get=()=>v(O);else if(D.has(O)){const[E,z]=D.get(O);P.value=c(E,z(),v)}Object.defineProperty(y,j,P)}),Object.preventExtensions(y)},g=new WeakMap,f=[1,1],C=o=>{if(!Y(o))throw new Error("object required");const h=g.get(o);if(h)return h;let v=f[0];const b=new Set,y=(i,a=++f[0])=>{v!==a&&(v=a,b.forEach(n=>n(i,a)))};let j=f[1];const O=(i=++f[1])=>(j!==i&&!b.size&&(j=i,E.forEach(([a])=>{const n=a[1](i);n>v&&(v=n)})),v),P=i=>(a,n)=>{const m=[...a];m[1]=[i,...m[1]],y(m,n)},E=new Map,z=(i,a)=>{if(b.size){const n=a[3](P(i));E.set(i,[a,n])}else E.set(i,[a])},Q=i=>{var a;const n=E.get(i);n&&(E.delete(i),(a=n[1])==null||a.call(n))},de=i=>(b.add(i),b.size===1&&E.forEach(([n,m],T)=>{const k=n[3](P(T));E.set(T,[n,k])}),()=>{b.delete(i),b.size===0&&E.forEach(([n,m],T)=>{m&&(m(),E.set(T,[n]))})}),H=Array.isArray(o)?[]:Object.create(Object.getPrototypeOf(o)),V=t(H,{deleteProperty(i,a){const n=Reflect.get(i,a);Q(a);const m=Reflect.deleteProperty(i,a);return m&&y(["delete",[a],n]),m},set(i,a,n,m){const T=Reflect.has(i,a),k=Reflect.get(i,a,m);if(T&&(e(k,n)||g.has(n)&&e(k,g.get(n))))return!0;Q(a),Y(n)&&(n=me(n)||n);let $=n;if(n instanceof Promise)n.then(W=>{n.status="fulfilled",n.value=W,y(["resolve",[a],W])}).catch(W=>{n.status="rejected",n.reason=W,y(["reject",[a],W])});else{!D.has(n)&&s(n)&&($=C(n));const W=!x.has($)&&D.get($);W&&z(a,W)}return Reflect.set(i,a,$,m),y(["set",[a],n,k]),!0}});g.set(o,V);const ue=[H,O,c,de];return D.set(V,ue),Reflect.ownKeys(o).forEach(i=>{const a=Object.getOwnPropertyDescriptor(o,i);"value"in a&&(V[i]=o[i],delete a.value,delete a.writable),Object.defineProperty(H,i,a)}),V})=>[C,D,x,e,t,s,r,l,c,g,f],[be]=he();function A(e={}){return be(e)}function S(e,t,s){const r=D.get(e);let l;const c=[],g=r[3];let f=!1;const o=g(h=>{if(c.push(h),s){t(c.splice(0));return}l||(l=Promise.resolve().then(()=>{l=void 0,f&&t(c.splice(0))}))});return f=!0,()=>{f=!1,o()}}function ye(e,t){const s=D.get(e),[r,l,c]=s;return c(r,l(),t)}const d=A({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),ce={state:d,subscribe(e){return S(d,()=>e(d))},push(e,t){e!==d.view&&(d.view=e,t&&(d.data=t),d.history.push(e))},reset(e){d.view=e,d.history=[e]},replace(e){d.history.length>1&&(d.history[d.history.length-1]=e,d.view=e)},goBack(){if(d.history.length>1){d.history.pop();const[e]=d.history.slice(-1);d.view=e}},setData(e){d.data=e}},p={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return p.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const e=navigator.userAgent.toLowerCase();return p.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl(e){return e.startsWith("http://")||e.startsWith("https://")},isArray(e){return Array.isArray(e)&&e.length>0},formatNativeUrl(e,t,s){if(p.isHttpUrl(e))return this.formatUniversalUrl(e,t,s);let r=e;r.includes("://")||(r=e.replaceAll("/","").replaceAll(":",""),r=`${r}://`),r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,s);const l=encodeURIComponent(t);return`${r}wc?uri=${l}`},formatUniversalUrl(e,t,s){if(!p.isHttpUrl(e))return this.formatNativeUrl(e,t,s);let r=e;r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,s);const l=encodeURIComponent(t);return`${r}wc?uri=${l}`},async wait(e){return new Promise(t=>{setTimeout(t,e)})},openHref(e,t){window.open(e,t,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(p.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(p.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(p.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(p.WCM_VERSION,"2.6.2")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=(e=ce.state.data)==null?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},Ee=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),u=A({enabled:Ee,userSessionId:"",events:[],connectedWalletId:void 0}),Ie={state:u,subscribe(e){return S(u.events,()=>e(ye(u.events[u.events.length-1])))},initialize(){u.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(u.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){u.connectedWalletId=e},click(e){if(u.enabled){const t={type:"CLICK",name:e.name,userSessionId:u.userSessionId,timestamp:Date.now(),data:e};u.events.push(t)}},track(e){if(u.enabled){const t={type:"TRACK",name:e.name,userSessionId:u.userSessionId,timestamp:Date.now(),data:e};u.events.push(t)}},view(e){if(u.enabled){const t={type:"VIEW",name:e.name,userSessionId:u.userSessionId,timestamp:Date.now(),data:e};u.events.push(t)}}},w=A({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),I={state:w,subscribe(e){return S(w,()=>e(w))},setChains(e){w.chains=e},setWalletConnectUri(e){w.walletConnectUri=e},setIsCustomDesktop(e){w.isCustomDesktop=e},setIsCustomMobile(e){w.isCustomMobile=e},setIsDataLoaded(e){w.isDataLoaded=e},setIsUiLoaded(e){w.isUiLoaded=e},setIsAuth(e){w.isAuth=e}},B=A({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),R={state:B,subscribe(e){return S(B,()=>e(B))},setConfig(e){var t,s;Ie.initialize(),I.setChains(e.chains),I.setIsAuth(!!e.enableAuthMode),I.setIsCustomMobile(!!((t=e.mobileWallets)!=null&&t.length)),I.setIsCustomDesktop(!!((s=e.desktopWallets)!=null&&s.length)),p.setModalVersionInStorage(),Object.assign(B,e)}};var ve=Object.defineProperty,te=Object.getOwnPropertySymbols,we=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable,se=(e,t,s)=>t in e?ve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Oe=(e,t)=>{for(var s in t||(t={}))we.call(t,s)&&se(e,s,t[s]);if(te)for(var s of te(t))Le.call(t,s)&&se(e,s,t[s]);return e};const X="https://explorer-api.walletconnect.com",q="wcm",G="js-2.6.2";async function K(e,t){const s=Oe({sdkType:q,sdkVersion:G},t),r=new URL(e,X);return r.searchParams.append("projectId",R.state.projectId),Object.entries(s).forEach(([l,c])=>{c&&r.searchParams.append(l,String(c))}),(await fetch(r)).json()}const _={async getDesktopListings(e){return K("/w3m/v1/getDesktopListings",e)},async getMobileListings(e){return K("/w3m/v1/getMobileListings",e)},async getInjectedListings(e){return K("/w3m/v1/getInjectedListings",e)},async getAllListings(e){return K("/w3m/v1/getAllListings",e)},getWalletImageUrl(e){return`${X}/w3m/v1/getWalletImage/${e}?projectId=${R.state.projectId}&sdkType=${q}&sdkVersion=${G}`},getAssetImageUrl(e){return`${X}/w3m/v1/getAssetImage/${e}?projectId=${R.state.projectId}&sdkType=${q}&sdkVersion=${G}`}};var Ce=Object.defineProperty,oe=Object.getOwnPropertySymbols,We=Object.prototype.hasOwnProperty,De=Object.prototype.propertyIsEnumerable,ne=(e,t,s)=>t in e?Ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Ae=(e,t)=>{for(var s in t||(t={}))We.call(t,s)&&ne(e,s,t[s]);if(oe)for(var s of oe(t))De.call(t,s)&&ne(e,s,t[s]);return e};const re=p.isMobile(),L=A({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),ke={state:L,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=R.state;if(e==="NONE"||t==="ALL"&&!e)return L.recomendedWallets;if(p.isArray(e)){const s={recommendedIds:e.join(",")},{listings:r}=await _.getAllListings(s),l=Object.values(r);l.sort((c,g)=>{const f=e.indexOf(c.id),C=e.indexOf(g.id);return f-C}),L.recomendedWallets=l}else{const{chains:s,isAuth:r}=I.state,l=s==null?void 0:s.join(","),c=p.isArray(t),g={page:1,sdks:r?"auth_v1":void 0,entries:p.RECOMMENDED_WALLET_AMOUNT,chains:l,version:2,excludedIds:c?t.join(","):void 0},{listings:f}=re?await _.getMobileListings(g):await _.getDesktopListings(g);L.recomendedWallets=Object.values(f)}return L.recomendedWallets},async getWallets(e){const t=Ae({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:r}=R.state,{recomendedWallets:l}=L;if(r==="ALL")return L.wallets;l.length?t.excludedIds=l.map(v=>v.id).join(","):p.isArray(s)&&(t.excludedIds=s.join(",")),p.isArray(r)&&(t.excludedIds=[t.excludedIds,r].filter(Boolean).join(",")),I.state.isAuth&&(t.sdks="auth_v1");const{page:c,search:g}=e,{listings:f,total:C}=re?await _.getMobileListings(t):await _.getDesktopListings(t),o=Object.values(f),h=g?"search":"wallets";return L[h]={listings:[...L[h].listings,...o],total:C,page:c??1},{listings:o,total:C}},getWalletImageUrl(e){return _.getWalletImageUrl(e)},getAssetImageUrl(e){return _.getAssetImageUrl(e)},resetSearch(){L.search={listings:[],total:0,page:1}}},U=A({open:!1}),J={state:U,subscribe(e){return S(U,()=>e(U))},async open(e){return new Promise(t=>{const{isUiLoaded:s,isDataLoaded:r}=I.state;if(p.removeWalletConnectDeepLink(),I.setWalletConnectUri(e==null?void 0:e.uri),I.setChains(e==null?void 0:e.chains),ce.reset("ConnectWallet"),s&&r)U.open=!0,t();else{const l=setInterval(()=>{const c=I.state;c.isUiLoaded&&c.isDataLoaded&&(clearInterval(l),U.open=!0,t())},200)}})},close(){U.open=!1}};var Pe=Object.defineProperty,ae=Object.getOwnPropertySymbols,_e=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable,ie=(e,t,s)=>t in e?Pe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Se=(e,t)=>{for(var s in t||(t={}))_e.call(t,s)&&ie(e,s,t[s]);if(ae)for(var s of ae(t))Me.call(t,s)&&ie(e,s,t[s]);return e};function je(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const N=A({themeMode:je()?"dark":"light"}),le={state:N,subscribe(e){return S(N,()=>e(N))},setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(N.themeMode=t),s&&(N.themeVariables=Se({},s))}},M=A({open:!1,message:"",variant:"success"}),Ne={state:M,subscribe(e){return S(M,()=>e(M))},openToast(e,t){M.open=!0,M.message=e,M.variant=t},closeToast(){M.open=!1}};class Te{constructor(t){this.openModal=J.open,this.closeModal=J.close,this.subscribeModal=J.subscribe,this.setTheme=le.setThemeConfig,le.setThemeConfig(t),R.setConfig(t),this.initUi()}async initUi(){if(typeof window<"u"){await pe(()=>import("./index-3aa786fb.js"),["assets/index-3aa786fb.js","assets/index-42ee4a0e.js","assets/index-4ce1baa6.css"]);const t=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",t),I.setIsUiLoaded(!0)}}}const Ve=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:Te},Symbol.toStringTag,{value:"Module"}));export{Ie as R,ce as T,p as a,Ve as i,le as n,Ne as o,I as p,J as s,ke as t,R as y}; +import{_ as pe}from"./index-d83b38d5.js";const fe=Symbol(),Z=Object.getPrototypeOf,F=new WeakMap,ge=e=>e&&(F.has(e)?F.get(e):Z(e)===Object.prototype||Z(e)===Array.prototype),me=e=>ge(e)&&e[fe]||null,ee=(e,t=!0)=>{F.set(e,t)},Y=e=>typeof e=="object"&&e!==null,D=new WeakMap,x=new WeakSet,he=(e=Object.is,t=(o,h)=>new Proxy(o,h),s=o=>Y(o)&&!x.has(o)&&(Array.isArray(o)||!(Symbol.iterator in o))&&!(o instanceof WeakMap)&&!(o instanceof WeakSet)&&!(o instanceof Error)&&!(o instanceof Number)&&!(o instanceof Date)&&!(o instanceof String)&&!(o instanceof RegExp)&&!(o instanceof ArrayBuffer),r=o=>{switch(o.status){case"fulfilled":return o.value;case"rejected":throw o.reason;default:throw o}},l=new WeakMap,c=(o,h,v=r)=>{const b=l.get(o);if((b==null?void 0:b[0])===h)return b[1];const y=Array.isArray(o)?[]:Object.create(Object.getPrototypeOf(o));return ee(y,!0),l.set(o,[h,y]),Reflect.ownKeys(o).forEach(j=>{if(Object.getOwnPropertyDescriptor(y,j))return;const O=Reflect.get(o,j),P={value:O,enumerable:!0,configurable:!0};if(x.has(O))ee(O,!1);else if(O instanceof Promise)delete P.value,P.get=()=>v(O);else if(D.has(O)){const[E,z]=D.get(O);P.value=c(E,z(),v)}Object.defineProperty(y,j,P)}),Object.preventExtensions(y)},g=new WeakMap,f=[1,1],C=o=>{if(!Y(o))throw new Error("object required");const h=g.get(o);if(h)return h;let v=f[0];const b=new Set,y=(i,a=++f[0])=>{v!==a&&(v=a,b.forEach(n=>n(i,a)))};let j=f[1];const O=(i=++f[1])=>(j!==i&&!b.size&&(j=i,E.forEach(([a])=>{const n=a[1](i);n>v&&(v=n)})),v),P=i=>(a,n)=>{const m=[...a];m[1]=[i,...m[1]],y(m,n)},E=new Map,z=(i,a)=>{if(b.size){const n=a[3](P(i));E.set(i,[a,n])}else E.set(i,[a])},Q=i=>{var a;const n=E.get(i);n&&(E.delete(i),(a=n[1])==null||a.call(n))},de=i=>(b.add(i),b.size===1&&E.forEach(([n,m],T)=>{const k=n[3](P(T));E.set(T,[n,k])}),()=>{b.delete(i),b.size===0&&E.forEach(([n,m],T)=>{m&&(m(),E.set(T,[n]))})}),H=Array.isArray(o)?[]:Object.create(Object.getPrototypeOf(o)),V=t(H,{deleteProperty(i,a){const n=Reflect.get(i,a);Q(a);const m=Reflect.deleteProperty(i,a);return m&&y(["delete",[a],n]),m},set(i,a,n,m){const T=Reflect.has(i,a),k=Reflect.get(i,a,m);if(T&&(e(k,n)||g.has(n)&&e(k,g.get(n))))return!0;Q(a),Y(n)&&(n=me(n)||n);let $=n;if(n instanceof Promise)n.then(W=>{n.status="fulfilled",n.value=W,y(["resolve",[a],W])}).catch(W=>{n.status="rejected",n.reason=W,y(["reject",[a],W])});else{!D.has(n)&&s(n)&&($=C(n));const W=!x.has($)&&D.get($);W&&z(a,W)}return Reflect.set(i,a,$,m),y(["set",[a],n,k]),!0}});g.set(o,V);const ue=[H,O,c,de];return D.set(V,ue),Reflect.ownKeys(o).forEach(i=>{const a=Object.getOwnPropertyDescriptor(o,i);"value"in a&&(V[i]=o[i],delete a.value,delete a.writable),Object.defineProperty(H,i,a)}),V})=>[C,D,x,e,t,s,r,l,c,g,f],[be]=he();function A(e={}){return be(e)}function S(e,t,s){const r=D.get(e);let l;const c=[],g=r[3];let f=!1;const o=g(h=>{if(c.push(h),s){t(c.splice(0));return}l||(l=Promise.resolve().then(()=>{l=void 0,f&&t(c.splice(0))}))});return f=!0,()=>{f=!1,o()}}function ye(e,t){const s=D.get(e),[r,l,c]=s;return c(r,l(),t)}const d=A({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),ce={state:d,subscribe(e){return S(d,()=>e(d))},push(e,t){e!==d.view&&(d.view=e,t&&(d.data=t),d.history.push(e))},reset(e){d.view=e,d.history=[e]},replace(e){d.history.length>1&&(d.history[d.history.length-1]=e,d.view=e)},goBack(){if(d.history.length>1){d.history.pop();const[e]=d.history.slice(-1);d.view=e}},setData(e){d.data=e}},p={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return p.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const e=navigator.userAgent.toLowerCase();return p.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl(e){return e.startsWith("http://")||e.startsWith("https://")},isArray(e){return Array.isArray(e)&&e.length>0},formatNativeUrl(e,t,s){if(p.isHttpUrl(e))return this.formatUniversalUrl(e,t,s);let r=e;r.includes("://")||(r=e.replaceAll("/","").replaceAll(":",""),r=`${r}://`),r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,s);const l=encodeURIComponent(t);return`${r}wc?uri=${l}`},formatUniversalUrl(e,t,s){if(!p.isHttpUrl(e))return this.formatNativeUrl(e,t,s);let r=e;r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,s);const l=encodeURIComponent(t);return`${r}wc?uri=${l}`},async wait(e){return new Promise(t=>{setTimeout(t,e)})},openHref(e,t){window.open(e,t,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(p.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(p.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(p.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(p.WCM_VERSION,"2.6.2")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=(e=ce.state.data)==null?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},Ee=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),u=A({enabled:Ee,userSessionId:"",events:[],connectedWalletId:void 0}),Ie={state:u,subscribe(e){return S(u.events,()=>e(ye(u.events[u.events.length-1])))},initialize(){u.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(u.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){u.connectedWalletId=e},click(e){if(u.enabled){const t={type:"CLICK",name:e.name,userSessionId:u.userSessionId,timestamp:Date.now(),data:e};u.events.push(t)}},track(e){if(u.enabled){const t={type:"TRACK",name:e.name,userSessionId:u.userSessionId,timestamp:Date.now(),data:e};u.events.push(t)}},view(e){if(u.enabled){const t={type:"VIEW",name:e.name,userSessionId:u.userSessionId,timestamp:Date.now(),data:e};u.events.push(t)}}},w=A({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),I={state:w,subscribe(e){return S(w,()=>e(w))},setChains(e){w.chains=e},setWalletConnectUri(e){w.walletConnectUri=e},setIsCustomDesktop(e){w.isCustomDesktop=e},setIsCustomMobile(e){w.isCustomMobile=e},setIsDataLoaded(e){w.isDataLoaded=e},setIsUiLoaded(e){w.isUiLoaded=e},setIsAuth(e){w.isAuth=e}},B=A({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),R={state:B,subscribe(e){return S(B,()=>e(B))},setConfig(e){var t,s;Ie.initialize(),I.setChains(e.chains),I.setIsAuth(!!e.enableAuthMode),I.setIsCustomMobile(!!((t=e.mobileWallets)!=null&&t.length)),I.setIsCustomDesktop(!!((s=e.desktopWallets)!=null&&s.length)),p.setModalVersionInStorage(),Object.assign(B,e)}};var ve=Object.defineProperty,te=Object.getOwnPropertySymbols,we=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable,se=(e,t,s)=>t in e?ve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Oe=(e,t)=>{for(var s in t||(t={}))we.call(t,s)&&se(e,s,t[s]);if(te)for(var s of te(t))Le.call(t,s)&&se(e,s,t[s]);return e};const X="https://explorer-api.walletconnect.com",q="wcm",G="js-2.6.2";async function K(e,t){const s=Oe({sdkType:q,sdkVersion:G},t),r=new URL(e,X);return r.searchParams.append("projectId",R.state.projectId),Object.entries(s).forEach(([l,c])=>{c&&r.searchParams.append(l,String(c))}),(await fetch(r)).json()}const _={async getDesktopListings(e){return K("/w3m/v1/getDesktopListings",e)},async getMobileListings(e){return K("/w3m/v1/getMobileListings",e)},async getInjectedListings(e){return K("/w3m/v1/getInjectedListings",e)},async getAllListings(e){return K("/w3m/v1/getAllListings",e)},getWalletImageUrl(e){return`${X}/w3m/v1/getWalletImage/${e}?projectId=${R.state.projectId}&sdkType=${q}&sdkVersion=${G}`},getAssetImageUrl(e){return`${X}/w3m/v1/getAssetImage/${e}?projectId=${R.state.projectId}&sdkType=${q}&sdkVersion=${G}`}};var Ce=Object.defineProperty,oe=Object.getOwnPropertySymbols,We=Object.prototype.hasOwnProperty,De=Object.prototype.propertyIsEnumerable,ne=(e,t,s)=>t in e?Ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Ae=(e,t)=>{for(var s in t||(t={}))We.call(t,s)&&ne(e,s,t[s]);if(oe)for(var s of oe(t))De.call(t,s)&&ne(e,s,t[s]);return e};const re=p.isMobile(),L=A({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),ke={state:L,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=R.state;if(e==="NONE"||t==="ALL"&&!e)return L.recomendedWallets;if(p.isArray(e)){const s={recommendedIds:e.join(",")},{listings:r}=await _.getAllListings(s),l=Object.values(r);l.sort((c,g)=>{const f=e.indexOf(c.id),C=e.indexOf(g.id);return f-C}),L.recomendedWallets=l}else{const{chains:s,isAuth:r}=I.state,l=s==null?void 0:s.join(","),c=p.isArray(t),g={page:1,sdks:r?"auth_v1":void 0,entries:p.RECOMMENDED_WALLET_AMOUNT,chains:l,version:2,excludedIds:c?t.join(","):void 0},{listings:f}=re?await _.getMobileListings(g):await _.getDesktopListings(g);L.recomendedWallets=Object.values(f)}return L.recomendedWallets},async getWallets(e){const t=Ae({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:r}=R.state,{recomendedWallets:l}=L;if(r==="ALL")return L.wallets;l.length?t.excludedIds=l.map(v=>v.id).join(","):p.isArray(s)&&(t.excludedIds=s.join(",")),p.isArray(r)&&(t.excludedIds=[t.excludedIds,r].filter(Boolean).join(",")),I.state.isAuth&&(t.sdks="auth_v1");const{page:c,search:g}=e,{listings:f,total:C}=re?await _.getMobileListings(t):await _.getDesktopListings(t),o=Object.values(f),h=g?"search":"wallets";return L[h]={listings:[...L[h].listings,...o],total:C,page:c??1},{listings:o,total:C}},getWalletImageUrl(e){return _.getWalletImageUrl(e)},getAssetImageUrl(e){return _.getAssetImageUrl(e)},resetSearch(){L.search={listings:[],total:0,page:1}}},U=A({open:!1}),J={state:U,subscribe(e){return S(U,()=>e(U))},async open(e){return new Promise(t=>{const{isUiLoaded:s,isDataLoaded:r}=I.state;if(p.removeWalletConnectDeepLink(),I.setWalletConnectUri(e==null?void 0:e.uri),I.setChains(e==null?void 0:e.chains),ce.reset("ConnectWallet"),s&&r)U.open=!0,t();else{const l=setInterval(()=>{const c=I.state;c.isUiLoaded&&c.isDataLoaded&&(clearInterval(l),U.open=!0,t())},200)}})},close(){U.open=!1}};var Pe=Object.defineProperty,ae=Object.getOwnPropertySymbols,_e=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable,ie=(e,t,s)=>t in e?Pe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Se=(e,t)=>{for(var s in t||(t={}))_e.call(t,s)&&ie(e,s,t[s]);if(ae)for(var s of ae(t))Me.call(t,s)&&ie(e,s,t[s]);return e};function je(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const N=A({themeMode:je()?"dark":"light"}),le={state:N,subscribe(e){return S(N,()=>e(N))},setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(N.themeMode=t),s&&(N.themeVariables=Se({},s))}},M=A({open:!1,message:"",variant:"success"}),Ne={state:M,subscribe(e){return S(M,()=>e(M))},openToast(e,t){M.open=!0,M.message=e,M.variant=t},closeToast(){M.open=!1}};class Te{constructor(t){this.openModal=J.open,this.closeModal=J.close,this.subscribeModal=J.subscribe,this.setTheme=le.setThemeConfig,le.setThemeConfig(t),R.setConfig(t),this.initUi()}async initUi(){if(typeof window<"u"){await pe(()=>import("./index-587ef3a1.js"),["assets/index-587ef3a1.js","assets/index-d83b38d5.js","assets/index-4ce1baa6.css"]);const t=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",t),I.setIsUiLoaded(!0)}}}const Ve=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:Te},Symbol.toStringTag,{value:"Module"}));export{Ie as R,ce as T,p as a,Ve as i,le as n,Ne as o,I as p,J as s,ke as t,R as y}; diff --git a/assets/index-42ee4a0e.js b/assets/index-d83b38d5.js similarity index 93% rename from assets/index-42ee4a0e.js rename to assets/index-d83b38d5.js index f1bbaa1..150e468 100644 --- a/assets/index-42ee4a0e.js +++ b/assets/index-d83b38d5.js @@ -6,7 +6,7 @@ var Ope=Object.defineProperty;var Rpe=(e,t,n)=>t in e?Ope(e,t,{enumerable:!0,con * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var ib=Symbol.for("react.element"),jpe=Symbol.for("react.portal"),Dpe=Symbol.for("react.fragment"),Mpe=Symbol.for("react.strict_mode"),Bpe=Symbol.for("react.profiler"),Lpe=Symbol.for("react.provider"),Fpe=Symbol.for("react.context"),Upe=Symbol.for("react.forward_ref"),zpe=Symbol.for("react.suspense"),$pe=Symbol.for("react.memo"),Hpe=Symbol.for("react.lazy"),QB=Symbol.iterator;function Wpe(e){return e===null||typeof e!="object"?null:(e=QB&&e[QB]||e["@@iterator"],typeof e=="function"?e:null)}var DJ={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},MJ=Object.assign,BJ={};function Oh(e,t,n){this.props=e,this.context=t,this.refs=BJ,this.updater=n||DJ}Oh.prototype.isReactComponent={};Oh.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Oh.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function LJ(){}LJ.prototype=Oh.prototype;function LO(e,t,n){this.props=e,this.context=t,this.refs=BJ,this.updater=n||DJ}var FO=LO.prototype=new LJ;FO.constructor=LO;MJ(FO,Oh.prototype);FO.isPureReactComponent=!0;var ZB=Array.isArray,FJ=Object.prototype.hasOwnProperty,UO={current:null},UJ={key:!0,ref:!0,__self:!0,__source:!0};function zJ(e,t,n){var r,i={},a=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(a=""+t.key),t)FJ.call(t,r)&&!UJ.hasOwnProperty(r)&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1t in e?Ope(e,t,{enumerable:!0,con * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Qpe=D,Zpe=Symbol.for("react.element"),Ype=Symbol.for("react.fragment"),Jpe=Object.prototype.hasOwnProperty,Xpe=Qpe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ehe={key:!0,ref:!0,__self:!0,__source:!0};function $J(e,t,n){var r,i={},a=null,s=null;n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)Jpe.call(t,r)&&!ehe.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Zpe,type:e,key:a,ref:s,props:i,_owner:Xpe.current}}H9.Fragment=Ype;H9.jsx=$J;H9.jsxs=$J;NJ.exports=H9;var m=NJ.exports,qS={},HJ={exports:{}},oa={},WJ={exports:{}},VJ={};/** + */var Qpe=M,Zpe=Symbol.for("react.element"),Ype=Symbol.for("react.fragment"),Jpe=Object.prototype.hasOwnProperty,Xpe=Qpe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ehe={key:!0,ref:!0,__self:!0,__source:!0};function $J(e,t,n){var r,i={},a=null,s=null;n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)Jpe.call(t,r)&&!ehe.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Zpe,type:e,key:a,ref:s,props:i,_owner:Xpe.current}}H9.Fragment=Ype;H9.jsx=$J;H9.jsxs=$J;NJ.exports=H9;var m=NJ.exports,qS={},HJ={exports:{}},oa={},WJ={exports:{}},VJ={};/** * @license React * scheduler.production.min.js * @@ -22,7 +22,7 @@ var Ope=Object.defineProperty;var Rpe=(e,t,n)=>t in e?Ope(e,t,{enumerable:!0,con * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(e){function t(O,W){var U=O.length;O.push(W);e:for(;0>>1,F=O[z];if(0>>1;z<$;){var G=2*(z+1)-1,te=O[G],J=G+1,ie=O[J];if(0>i(te,U))Ji(ie,te)?(O[z]=ie,O[J]=U,z=J):(O[z]=te,O[G]=U,z=G);else if(Ji(ie,U))O[z]=ie,O[J]=U,z=J;else break e}}return W}function i(O,W){var U=O.sortIndex-W.sortIndex;return U!==0?U:O.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var s=Date,o=s.now();e.unstable_now=function(){return s.now()-o}}var c=[],l=[],f=1,u=null,d=3,p=!1,h=!1,y=!1,g=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(O){for(var W=n(l);W!==null;){if(W.callback===null)r(l);else if(W.startTime<=O)r(l),W.sortIndex=W.expirationTime,t(c,W);else break;W=n(l)}}function b(O){if(y=!1,v(O),!h)if(n(c)!==null)h=!0,R(A);else{var W=n(l);W!==null&&V(b,W.startTime-O)}}function A(O,W){h=!1,y&&(y=!1,x(T),T=-1),p=!0;var U=d;try{for(v(W),u=n(c);u!==null&&(!(u.expirationTime>W)||O&&!P());){var z=u.callback;if(typeof z=="function"){u.callback=null,d=u.priorityLevel;var F=z(u.expirationTime<=W);W=e.unstable_now(),typeof F=="function"?u.callback=F:u===n(c)&&r(c),v(W)}else r(c);u=n(c)}if(u!==null)var $=!0;else{var G=n(l);G!==null&&V(b,G.startTime-W),$=!1}return $}finally{u=null,d=U,p=!1}}var E=!1,C=null,T=-1,_=5,k=-1;function P(){return!(e.unstable_now()-k<_)}function N(){if(C!==null){var O=e.unstable_now();k=O;var W=!0;try{W=C(!0,O)}finally{W?B():(E=!1,C=null)}}else E=!1}var B;if(typeof w=="function")B=function(){w(N)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,M=L.port2;L.port1.onmessage=N,B=function(){M.postMessage(null)}}else B=function(){g(N,0)};function R(O){C=O,E||(E=!0,B())}function V(O,W){T=g(function(){O(e.unstable_now())},W)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(O){O.callback=null},e.unstable_continueExecution=function(){h||p||(h=!0,R(A))},e.unstable_forceFrameRate=function(O){0>O||125z?(O.sortIndex=U,t(l,O),n(c)===null&&O===n(l)&&(y?(x(T),T=-1):y=!0,V(b,U-z))):(O.sortIndex=F,t(c,O),h||p||(h=!0,R(A))),O},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(O){var W=d;return function(){var U=d;d=W;try{return O.apply(this,arguments)}finally{d=U}}}})(VJ);WJ.exports=VJ;var the=WJ.exports;/** + */(function(e){function t(O,W){var U=O.length;O.push(W);e:for(;0>>1,F=O[z];if(0>>1;z<$;){var G=2*(z+1)-1,te=O[G],J=G+1,ie=O[J];if(0>i(te,U))Ji(ie,te)?(O[z]=ie,O[J]=U,z=J):(O[z]=te,O[G]=U,z=G);else if(Ji(ie,U))O[z]=ie,O[J]=U,z=J;else break e}}return W}function i(O,W){var U=O.sortIndex-W.sortIndex;return U!==0?U:O.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var s=Date,o=s.now();e.unstable_now=function(){return s.now()-o}}var c=[],l=[],f=1,u=null,d=3,p=!1,h=!1,y=!1,g=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(O){for(var W=n(l);W!==null;){if(W.callback===null)r(l);else if(W.startTime<=O)r(l),W.sortIndex=W.expirationTime,t(c,W);else break;W=n(l)}}function b(O){if(y=!1,v(O),!h)if(n(c)!==null)h=!0,R(A);else{var W=n(l);W!==null&&V(b,W.startTime-O)}}function A(O,W){h=!1,y&&(y=!1,x(T),T=-1),p=!0;var U=d;try{for(v(W),u=n(c);u!==null&&(!(u.expirationTime>W)||O&&!P());){var z=u.callback;if(typeof z=="function"){u.callback=null,d=u.priorityLevel;var F=z(u.expirationTime<=W);W=e.unstable_now(),typeof F=="function"?u.callback=F:u===n(c)&&r(c),v(W)}else r(c);u=n(c)}if(u!==null)var $=!0;else{var G=n(l);G!==null&&V(b,G.startTime-W),$=!1}return $}finally{u=null,d=U,p=!1}}var E=!1,C=null,T=-1,_=5,k=-1;function P(){return!(e.unstable_now()-k<_)}function N(){if(C!==null){var O=e.unstable_now();k=O;var W=!0;try{W=C(!0,O)}finally{W?L():(E=!1,C=null)}}else E=!1}var L;if(typeof w=="function")L=function(){w(N)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,j=B.port2;B.port1.onmessage=N,L=function(){j.postMessage(null)}}else L=function(){g(N,0)};function R(O){C=O,E||(E=!0,L())}function V(O,W){T=g(function(){O(e.unstable_now())},W)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(O){O.callback=null},e.unstable_continueExecution=function(){h||p||(h=!0,R(A))},e.unstable_forceFrameRate=function(O){0>O||125z?(O.sortIndex=U,t(l,O),n(c)===null&&O===n(l)&&(y?(x(T),T=-1):y=!0,V(b,U-z))):(O.sortIndex=F,t(c,O),h||p||(h=!0,R(A))),O},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(O){var W=d;return function(){var U=d;d=W;try{return O.apply(this,arguments)}finally{d=U}}}})(VJ);WJ.exports=VJ;var the=WJ.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ var Ope=Object.defineProperty;var Rpe=(e,t,n)=>t in e?Ope(e,t,{enumerable:!0,con * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var GJ=D,aa=the;function We(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),KS=Object.prototype.hasOwnProperty,nhe=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,JB={},XB={};function rhe(e){return KS.call(XB,e)?!0:KS.call(JB,e)?!1:nhe.test(e)?XB[e]=!0:(JB[e]=!0,!1)}function ihe(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function ahe(e,t,n,r){if(t===null||typeof t>"u"||ihe(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function fi(e,t,n,r,i,a,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=s}var xr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){xr[e]=new fi(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];xr[t]=new fi(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){xr[e]=new fi(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){xr[e]=new fi(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){xr[e]=new fi(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){xr[e]=new fi(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){xr[e]=new fi(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){xr[e]=new fi(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){xr[e]=new fi(e,5,!1,e.toLowerCase(),null,!1,!1)});var HO=/[\-:]([a-z])/g;function WO(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(HO,WO);xr[t]=new fi(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(HO,WO);xr[t]=new fi(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(HO,WO);xr[t]=new fi(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){xr[e]=new fi(e,1,!1,e.toLowerCase(),null,!1,!1)});xr.xlinkHref=new fi("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){xr[e]=new fi(e,1,!1,e.toLowerCase(),null,!0,!0)});function VO(e,t,n,r){var i=xr.hasOwnProperty(t)?xr[t]:null;(i!==null?i.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),KS=Object.prototype.hasOwnProperty,nhe=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,JB={},XB={};function rhe(e){return KS.call(XB,e)?!0:KS.call(JB,e)?!1:nhe.test(e)?XB[e]=!0:(JB[e]=!0,!1)}function ihe(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function ahe(e,t,n,r){if(t===null||typeof t>"u"||ihe(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function fi(e,t,n,r,i,a,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=s}var xr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){xr[e]=new fi(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];xr[t]=new fi(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){xr[e]=new fi(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){xr[e]=new fi(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){xr[e]=new fi(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){xr[e]=new fi(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){xr[e]=new fi(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){xr[e]=new fi(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){xr[e]=new fi(e,5,!1,e.toLowerCase(),null,!1,!1)});var HO=/[\-:]([a-z])/g;function WO(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(HO,WO);xr[t]=new fi(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(HO,WO);xr[t]=new fi(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(HO,WO);xr[t]=new fi(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){xr[e]=new fi(e,1,!1,e.toLowerCase(),null,!1,!1)});xr.xlinkHref=new fi("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){xr[e]=new fi(e,1,!1,e.toLowerCase(),null,!0,!0)});function VO(e,t,n,r){var i=xr.hasOwnProperty(t)?xr[t]:null;(i!==null?i.type!==0:r||!(2o||i[s]!==a[o]){var c=` `+i[s].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=s&&0<=o);break}}}finally{ox=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?A2(e):""}function she(e){switch(e.tag){case 5:return A2(e.type);case 16:return A2("Lazy");case 13:return A2("Suspense");case 19:return A2("SuspenseList");case 0:case 2:case 15:return e=cx(e.type,!1),e;case 11:return e=cx(e.type.render,!1),e;case 1:return e=cx(e.type,!0),e;default:return""}}function JS(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case t1:return"Fragment";case e1:return"Portal";case QS:return"Profiler";case GO:return"StrictMode";case ZS:return"Suspense";case YS:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case QJ:return(e.displayName||"Context")+".Consumer";case KJ:return(e._context.displayName||"Context")+".Provider";case qO:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case KO:return t=e.displayName||null,t!==null?t:JS(e.type)||"Memo";case Pc:t=e._payload,e=e._init;try{return JS(e(t))}catch{}}return null}function ohe(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return JS(t);case 8:return t===GO?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Al(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function YJ(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function che(e){var t=YJ(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,a.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function y8(e){e._valueTracker||(e._valueTracker=che(e))}function JJ(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=YJ(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function E3(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function XS(e,t){var n=t.checked;return En({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function tL(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Al(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function XJ(e,t){t=t.checked,t!=null&&VO(e,"checked",t,!1)}function ek(e,t){XJ(e,t);var n=Al(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?tk(e,t.type,n):t.hasOwnProperty("defaultValue")&&tk(e,t.type,Al(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function nL(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function tk(e,t,n){(t!=="number"||E3(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var E2=Array.isArray;function E1(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=m8.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ny(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var J2={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},lhe=["Webkit","ms","Moz","O"];Object.keys(J2).forEach(function(e){lhe.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),J2[t]=J2[e]})});function rX(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||J2.hasOwnProperty(e)&&J2[e]?(""+t).trim():t+"px"}function iX(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=rX(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var fhe=En({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ik(e,t){if(t){if(fhe[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(We(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(We(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(We(61))}if(t.style!=null&&typeof t.style!="object")throw Error(We(62))}}function ak(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var sk=null;function QO(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ok=null,T1=null,_1=null;function aL(e){if(e=ob(e)){if(typeof ok!="function")throw Error(We(280));var t=e.stateNode;t&&(t=K9(t),ok(e.stateNode,e.type,t))}}function aX(e){T1?_1?_1.push(e):_1=[e]:T1=e}function sX(){if(T1){var e=T1,t=_1;if(_1=T1=null,aL(e),t)for(e=0;e>>=0,e===0?32:31-(xhe(e)/Che|0)|0}var b8=64,g8=4194304;function T2(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function k3(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,s=n&268435455;if(s!==0){var o=s&~i;o!==0?r=T2(o):(a&=s,a!==0&&(r=T2(a)))}else s=n&~i,s!==0?r=T2(s):a!==0&&(r=T2(a));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,a=t&-t,i>=a||i===16&&(a&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function ab(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ss(t),e[t]=n}function _he(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=ey),hL=String.fromCharCode(32),yL=!1;function _X(e,t){switch(e){case"keyup":return e6e.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function SX(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var n1=!1;function n6e(e,t){switch(e){case"compositionend":return SX(t);case"keypress":return t.which!==32?null:(yL=!0,hL);case"textInput":return e=t.data,e===hL&&yL?null:e;default:return null}}function r6e(e,t){if(n1)return e==="compositionend"||!rR&&_X(e,t)?(e=EX(),Og=eR=el=null,n1=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=vL(n)}}function OX(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?OX(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function RX(){for(var e=window,t=E3();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=E3(e.document)}return t}function iR(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function d6e(e){var t=RX(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&OX(n.ownerDocument.documentElement,n)){if(r!==null&&iR(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=wL(n,a);var s=wL(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,r1=null,pk=null,ny=null,hk=!1;function xL(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;hk||r1==null||r1!==E3(r)||(r=r1,"selectionStart"in r&&iR(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ny&&Fy(ny,r)||(ny=r,r=O3(pk,"onSelect"),0s1||(e.current=wk[s1],wk[s1]=null,s1--)}function Xt(e,t){s1++,wk[s1]=e.current,e.current=t}var El={},Vr=zl(El),Ei=zl(!1),Mu=El;function Op(e,t){var n=e.type.contextTypes;if(!n)return El;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ti(e){return e=e.childContextTypes,e!=null}function N3(){on(Ei),on(Vr)}function kL(e,t,n){if(Vr.current!==El)throw Error(We(168));Xt(Vr,t),Xt(Ei,n)}function zX(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(We(108,ohe(e)||"Unknown",i));return En({},n,r)}function j3(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||El,Mu=Vr.current,Xt(Vr,e),Xt(Ei,Ei.current),!0}function PL(e,t,n){var r=e.stateNode;if(!r)throw Error(We(169));n?(e=zX(e,t,Mu),r.__reactInternalMemoizedMergedChildContext=e,on(Ei),on(Vr),Xt(Vr,e)):on(Ei),Xt(Ei,n)}var d0=null,Q9=!1,Cx=!1;function $X(e){d0===null?d0=[e]:d0.push(e)}function E6e(e){Q9=!0,$X(e)}function $l(){if(!Cx&&d0!==null){Cx=!0;var e=0,t=$t;try{var n=d0;for($t=1;e>=s,i-=s,k0=1<<32-Ss(t)+i|n<T?(_=C,C=null):_=C.sibling;var k=d(x,C,v[T],b);if(k===null){C===null&&(C=_);break}e&&C&&k.alternate===null&&t(x,C),w=a(k,w,T),E===null?A=k:E.sibling=k,E=k,C=_}if(T===v.length)return n(x,C),un&&Hf(x,T),A;if(C===null){for(;TT?(_=C,C=null):_=C.sibling;var P=d(x,C,k.value,b);if(P===null){C===null&&(C=_);break}e&&C&&P.alternate===null&&t(x,C),w=a(P,w,T),E===null?A=P:E.sibling=P,E=P,C=_}if(k.done)return n(x,C),un&&Hf(x,T),A;if(C===null){for(;!k.done;T++,k=v.next())k=u(x,k.value,b),k!==null&&(w=a(k,w,T),E===null?A=k:E.sibling=k,E=k);return un&&Hf(x,T),A}for(C=r(x,C);!k.done;T++,k=v.next())k=p(C,x,T,k.value,b),k!==null&&(e&&k.alternate!==null&&C.delete(k.key===null?T:k.key),w=a(k,w,T),E===null?A=k:E.sibling=k,E=k);return e&&C.forEach(function(N){return t(x,N)}),un&&Hf(x,T),A}function g(x,w,v,b){if(typeof v=="object"&&v!==null&&v.type===t1&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case h8:e:{for(var A=v.key,E=w;E!==null;){if(E.key===A){if(A=v.type,A===t1){if(E.tag===7){n(x,E.sibling),w=i(E,v.props.children),w.return=x,x=w;break e}}else if(E.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===Pc&&ML(A)===E.type){n(x,E.sibling),w=i(E,v.props),w.ref=v6(x,E,v),w.return=x,x=w;break e}n(x,E);break}else t(x,E);E=E.sibling}v.type===t1?(w=Pu(v.props.children,x.mode,b,v.key),w.return=x,x=w):(b=Fg(v.type,v.key,v.props,null,x.mode,b),b.ref=v6(x,w,v),b.return=x,x=b)}return s(x);case e1:e:{for(E=v.key;w!==null;){if(w.key===E)if(w.tag===4&&w.stateNode.containerInfo===v.containerInfo&&w.stateNode.implementation===v.implementation){n(x,w.sibling),w=i(w,v.children||[]),w.return=x,x=w;break e}else{n(x,w);break}else t(x,w);w=w.sibling}w=Ix(v,x.mode,b),w.return=x,x=w}return s(x);case Pc:return E=v._init,g(x,w,E(v._payload),b)}if(E2(v))return h(x,w,v,b);if(h6(v))return y(x,w,v,b);T8(x,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,w!==null&&w.tag===6?(n(x,w.sibling),w=i(w,v),w.return=x,x=w):(n(x,w),w=Px(v,x.mode,b),w.return=x,x=w),s(x)):n(x,w)}return g}var Np=ZX(!0),YX=ZX(!1),cb={},Oo=zl(cb),Hy=zl(cb),Wy=zl(cb);function tu(e){if(e===cb)throw Error(We(174));return e}function pR(e,t){switch(Xt(Wy,t),Xt(Hy,e),Xt(Oo,cb),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:rk(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=rk(t,e)}on(Oo),Xt(Oo,t)}function jp(){on(Oo),on(Hy),on(Wy)}function JX(e){tu(Wy.current);var t=tu(Oo.current),n=rk(t,e.type);t!==n&&(Xt(Hy,e),Xt(Oo,n))}function hR(e){Hy.current===e&&(on(Oo),on(Hy))}var gn=zl(0);function U3(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ax=[];function yR(){for(var e=0;en?n:4,e(!0);var r=Ex.transition;Ex.transition={};try{e(!1),t()}finally{$t=n,Ex.transition=r}}function hee(){return Fa().memoizedState}function k6e(e,t,n){var r=yl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},yee(e))mee(t,n);else if(n=GX(e,t,n,r),n!==null){var i=ri();ks(n,e,r,i),bee(n,t,r)}}function P6e(e,t,n){var r=yl(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(yee(e))mee(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var s=t.lastRenderedState,o=a(s,n);if(i.hasEagerState=!0,i.eagerState=o,Bs(o,s)){var c=t.interleaved;c===null?(i.next=i,uR(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}n=GX(e,t,i,r),n!==null&&(i=ri(),ks(n,e,r,i),bee(n,t,r))}}function yee(e){var t=e.alternate;return e===An||t!==null&&t===An}function mee(e,t){ry=z3=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function bee(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,YO(e,n)}}var $3={readContext:La,useCallback:Sr,useContext:Sr,useEffect:Sr,useImperativeHandle:Sr,useInsertionEffect:Sr,useLayoutEffect:Sr,useMemo:Sr,useReducer:Sr,useRef:Sr,useState:Sr,useDebugValue:Sr,useDeferredValue:Sr,useTransition:Sr,useMutableSource:Sr,useSyncExternalStore:Sr,useId:Sr,unstable_isNewReconciler:!1},I6e={readContext:La,useCallback:function(e,t){return fo().memoizedState=[e,t===void 0?null:t],e},useContext:La,useEffect:LL,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Dg(4194308,4,lee.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Dg(4194308,4,e,t)},useInsertionEffect:function(e,t){return Dg(4,2,e,t)},useMemo:function(e,t){var n=fo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=fo();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=k6e.bind(null,An,e),[r.memoizedState,e]},useRef:function(e){var t=fo();return e={current:e},t.memoizedState=e},useState:BL,useDebugValue:wR,useDeferredValue:function(e){return fo().memoizedState=e},useTransition:function(){var e=BL(!1),t=e[0];return e=S6e.bind(null,e[1]),fo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=An,i=fo();if(un){if(n===void 0)throw Error(We(407));n=n()}else{if(n=t(),or===null)throw Error(We(349));Lu&30||tee(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,LL(ree.bind(null,r,a,e),[e]),r.flags|=2048,qy(9,nee.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=fo(),t=or.identifierPrefix;if(un){var n=P0,r=k0;n=(r&~(1<<32-Ss(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Vy++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Co]=t,e[$y]=r,_ee(e,t,!1,!1),t.stateNode=e;e:{switch(s=ak(n,r),n){case"dialog":an("cancel",e),an("close",e),i=r;break;case"iframe":case"object":case"embed":an("load",e),i=r;break;case"video":case"audio":for(i=0;i<_2.length;i++)an(_2[i],e);i=r;break;case"source":an("error",e),i=r;break;case"img":case"image":case"link":an("error",e),an("load",e),i=r;break;case"details":an("toggle",e),i=r;break;case"input":tL(e,r),i=XS(e,r),an("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=En({},r,{value:void 0}),an("invalid",e);break;case"textarea":rL(e,r),i=nk(e,r),an("invalid",e);break;default:i=r}ik(n,i),o=i;for(a in o)if(o.hasOwnProperty(a)){var c=o[a];a==="style"?iX(e,c):a==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&nX(e,c)):a==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&Ny(e,c):typeof c=="number"&&Ny(e,""+c):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(Ry.hasOwnProperty(a)?c!=null&&a==="onScroll"&&an("scroll",e):c!=null&&VO(e,a,c,s))}switch(n){case"input":y8(e),nL(e,r,!1);break;case"textarea":y8(e),iL(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Al(r.value));break;case"select":e.multiple=!!r.multiple,a=r.value,a!=null?E1(e,!!r.multiple,a,!1):r.defaultValue!=null&&E1(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=R3)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return kr(t),null;case 6:if(e&&t.stateNode!=null)kee(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(We(166));if(n=tu(Wy.current),tu(Oo.current),E8(t)){if(r=t.stateNode,n=t.memoizedProps,r[Co]=t,(a=r.nodeValue!==n)&&(e=na,e!==null))switch(e.tag){case 3:A8(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&A8(r.nodeValue,n,(e.mode&1)!==0)}a&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Co]=t,t.stateNode=r}return kr(t),null;case 13:if(on(gn),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(un&&Xi!==null&&t.mode&1&&!(t.flags&128))VX(),Rp(),t.flags|=98560,a=!1;else if(a=E8(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(We(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(We(317));a[Co]=t}else Rp(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;kr(t),a=!1}else bs!==null&&(Fk(bs),bs=null),a=!0;if(!a)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||gn.current&1?Yn===0&&(Yn=3):SR())),t.updateQueue!==null&&(t.flags|=4),kr(t),null);case 4:return jp(),Ok(e,t),e===null&&Uy(t.stateNode.containerInfo),kr(t),null;case 10:return fR(t.type._context),kr(t),null;case 17:return Ti(t.type)&&N3(),kr(t),null;case 19:if(on(gn),a=t.memoizedState,a===null)return kr(t),null;if(r=(t.flags&128)!==0,s=a.rendering,s===null)if(r)w6(a,!1);else{if(Yn!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=U3(e),s!==null){for(t.flags|=128,w6(a,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)a=n,e=r,a.flags&=14680066,s=a.alternate,s===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=s.childLanes,a.lanes=s.lanes,a.child=s.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=s.memoizedProps,a.memoizedState=s.memoizedState,a.updateQueue=s.updateQueue,a.type=s.type,e=s.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Xt(gn,gn.current&1|2),t.child}e=e.sibling}a.tail!==null&&Dn()>Mp&&(t.flags|=128,r=!0,w6(a,!1),t.lanes=4194304)}else{if(!r)if(e=U3(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),w6(a,!0),a.tail===null&&a.tailMode==="hidden"&&!s.alternate&&!un)return kr(t),null}else 2*Dn()-a.renderingStartTime>Mp&&n!==1073741824&&(t.flags|=128,r=!0,w6(a,!1),t.lanes=4194304);a.isBackwards?(s.sibling=t.child,t.child=s):(n=a.last,n!==null?n.sibling=s:t.child=s,a.last=s)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Dn(),t.sibling=null,n=gn.current,Xt(gn,r?n&1|2:n&1),t):(kr(t),null);case 22:case 23:return _R(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ki&1073741824&&(kr(t),t.subtreeFlags&6&&(t.flags|=8192)):kr(t),null;case 24:return null;case 25:return null}throw Error(We(156,t.tag))}function L6e(e,t){switch(sR(t),t.tag){case 1:return Ti(t.type)&&N3(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return jp(),on(Ei),on(Vr),yR(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return hR(t),null;case 13:if(on(gn),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(We(340));Rp()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return on(gn),null;case 4:return jp(),null;case 10:return fR(t.type._context),null;case 22:case 23:return _R(),null;case 24:return null;default:return null}}var S8=!1,Lr=!1,F6e=typeof WeakSet=="function"?WeakSet:Set,rt=null;function f1(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){kn(e,t,r)}else n.current=null}function Rk(e,t,n){try{n()}catch(r){kn(e,t,r)}}var qL=!1;function U6e(e,t){if(yk=P3,e=RX(),iR(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var s=0,o=-1,c=-1,l=0,f=0,u=e,d=null;t:for(;;){for(var p;u!==n||i!==0&&u.nodeType!==3||(o=s+i),u!==a||r!==0&&u.nodeType!==3||(c=s+r),u.nodeType===3&&(s+=u.nodeValue.length),(p=u.firstChild)!==null;)d=u,u=p;for(;;){if(u===e)break t;if(d===n&&++l===i&&(o=s),d===a&&++f===r&&(c=s),(p=u.nextSibling)!==null)break;u=d,d=u.parentNode}u=p}n=o===-1||c===-1?null:{start:o,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(mk={focusedElem:e,selectionRange:n},P3=!1,rt=t;rt!==null;)if(t=rt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,rt=e;else for(;rt!==null;){t=rt;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var y=h.memoizedProps,g=h.memoizedState,x=t.stateNode,w=x.getSnapshotBeforeUpdate(t.elementType===t.type?y:fs(t.type,y),g);x.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(We(163))}}catch(b){kn(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,rt=e;break}rt=t.return}return h=qL,qL=!1,h}function iy(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&Rk(t,n,a)}i=i.next}while(i!==r)}}function J9(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Nk(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Pee(e){var t=e.alternate;t!==null&&(e.alternate=null,Pee(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Co],delete t[$y],delete t[vk],delete t[C6e],delete t[A6e])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Iee(e){return e.tag===5||e.tag===3||e.tag===4}function KL(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Iee(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function jk(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=R3));else if(r!==4&&(e=e.child,e!==null))for(jk(e,t,n),e=e.sibling;e!==null;)jk(e,t,n),e=e.sibling}function Dk(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Dk(e,t,n),e=e.sibling;e!==null;)Dk(e,t,n),e=e.sibling}var yr=null,ys=!1;function hc(e,t,n){for(n=n.child;n!==null;)Oee(e,t,n),n=n.sibling}function Oee(e,t,n){if(Io&&typeof Io.onCommitFiberUnmount=="function")try{Io.onCommitFiberUnmount(W9,n)}catch{}switch(n.tag){case 5:Lr||f1(n,t);case 6:var r=yr,i=ys;yr=null,hc(e,t,n),yr=r,ys=i,yr!==null&&(ys?(e=yr,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):yr.removeChild(n.stateNode));break;case 18:yr!==null&&(ys?(e=yr,n=n.stateNode,e.nodeType===8?xx(e.parentNode,n):e.nodeType===1&&xx(e,n),By(e)):xx(yr,n.stateNode));break;case 4:r=yr,i=ys,yr=n.stateNode.containerInfo,ys=!0,hc(e,t,n),yr=r,ys=i;break;case 0:case 11:case 14:case 15:if(!Lr&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,s=a.destroy;a=a.tag,s!==void 0&&(a&2||a&4)&&Rk(n,t,s),i=i.next}while(i!==r)}hc(e,t,n);break;case 1:if(!Lr&&(f1(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){kn(n,t,o)}hc(e,t,n);break;case 21:hc(e,t,n);break;case 22:n.mode&1?(Lr=(r=Lr)||n.memoizedState!==null,hc(e,t,n),Lr=r):hc(e,t,n);break;default:hc(e,t,n)}}function QL(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new F6e),t.forEach(function(r){var i=Q6e.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Ja(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~a}if(r=i,r=Dn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*$6e(r/1960))-r,10e?16:e,tl===null)var r=!1;else{if(e=tl,tl=null,V3=0,jt&6)throw Error(We(331));var i=jt;for(jt|=4,rt=e.current;rt!==null;){var a=rt,s=a.child;if(rt.flags&16){var o=a.deletions;if(o!==null){for(var c=0;cDn()-ER?ku(e,0):AR|=n),_i(e,t)}function Fee(e,t){t===0&&(e.mode&1?(t=g8,g8<<=1,!(g8&130023424)&&(g8=4194304)):t=1);var n=ri();e=F0(e,t),e!==null&&(ab(e,t,n),_i(e,n))}function K6e(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Fee(e,n)}function Q6e(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(We(314))}r!==null&&r.delete(t),Fee(e,n)}var Uee;Uee=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ei.current)xi=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return xi=!1,M6e(e,t,n);xi=!!(e.flags&131072)}else xi=!1,un&&t.flags&1048576&&HX(t,M3,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Mg(e,t),e=t.pendingProps;var i=Op(t,Vr.current);k1(t,n),i=bR(null,t,r,e,i,n);var a=gR();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ti(r)?(a=!0,j3(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,dR(t),i.updater=Z9,t.stateNode=i,i._reactInternals=t,Tk(t,r,e,n),t=kk(null,t,r,!0,a,n)):(t.tag=0,un&&a&&aR(t),Jr(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Mg(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Y6e(r),e=fs(r,e),i){case 0:t=Sk(null,t,r,e,n);break e;case 1:t=WL(null,t,r,e,n);break e;case 11:t=$L(null,t,r,e,n);break e;case 14:t=HL(null,t,r,fs(r.type,e),n);break e}throw Error(We(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:fs(r,i),Sk(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:fs(r,i),WL(e,t,r,i,n);case 3:e:{if(Aee(t),e===null)throw Error(We(387));r=t.pendingProps,a=t.memoizedState,i=a.element,qX(e,t),F3(t,r,null,n);var s=t.memoizedState;if(r=s.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=Dp(Error(We(423)),t),t=VL(e,t,r,n,i);break e}else if(r!==i){i=Dp(Error(We(424)),t),t=VL(e,t,r,n,i);break e}else for(Xi=dl(t.stateNode.containerInfo.firstChild),na=t,un=!0,bs=null,n=YX(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Rp(),r===i){t=U0(e,t,n);break e}Jr(e,t,r,n)}t=t.child}return t;case 5:return JX(t),e===null&&Ck(t),r=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,s=i.children,bk(r,i)?s=null:a!==null&&bk(r,a)&&(t.flags|=32),Cee(e,t),Jr(e,t,s,n),t.child;case 6:return e===null&&Ck(t),null;case 13:return Eee(e,t,n);case 4:return pR(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Np(t,null,r,n):Jr(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:fs(r,i),$L(e,t,r,i,n);case 7:return Jr(e,t,t.pendingProps,n),t.child;case 8:return Jr(e,t,t.pendingProps.children,n),t.child;case 12:return Jr(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,s=i.value,Xt(B3,r._currentValue),r._currentValue=s,a!==null)if(Bs(a.value,s)){if(a.children===i.children&&!Ei.current){t=U0(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var o=a.dependencies;if(o!==null){s=a.child;for(var c=o.firstContext;c!==null;){if(c.context===r){if(a.tag===1){c=N0(-1,n&-n),c.tag=2;var l=a.updateQueue;if(l!==null){l=l.shared;var f=l.pending;f===null?c.next=c:(c.next=f.next,f.next=c),l.pending=c}}a.lanes|=n,c=a.alternate,c!==null&&(c.lanes|=n),Ak(a.return,n,t),o.lanes|=n;break}c=c.next}}else if(a.tag===10)s=a.type===t.type?null:a.child;else if(a.tag===18){if(s=a.return,s===null)throw Error(We(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Ak(s,n,t),s=a.sibling}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===t){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}Jr(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,k1(t,n),i=La(i),r=r(i),t.flags|=1,Jr(e,t,r,n),t.child;case 14:return r=t.type,i=fs(r,t.pendingProps),i=fs(r.type,i),HL(e,t,r,i,n);case 15:return wee(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:fs(r,i),Mg(e,t),t.tag=1,Ti(r)?(e=!0,j3(t)):e=!1,k1(t,n),QX(t,r,i),Tk(t,r,i,n),kk(null,t,r,!0,e,n);case 19:return Tee(e,t,n);case 22:return xee(e,t,n)}throw Error(We(156,t.tag))};function zee(e,t){return pX(e,t)}function Z6e(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Na(e,t,n,r){return new Z6e(e,t,n,r)}function kR(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Y6e(e){if(typeof e=="function")return kR(e)?1:0;if(e!=null){if(e=e.$$typeof,e===qO)return 11;if(e===KO)return 14}return 2}function ml(e,t){var n=e.alternate;return n===null?(n=Na(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Fg(e,t,n,r,i,a){var s=2;if(r=e,typeof e=="function")kR(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case t1:return Pu(n.children,i,a,t);case GO:s=8,i|=8;break;case QS:return e=Na(12,n,t,i|2),e.elementType=QS,e.lanes=a,e;case ZS:return e=Na(13,n,t,i),e.elementType=ZS,e.lanes=a,e;case YS:return e=Na(19,n,t,i),e.elementType=YS,e.lanes=a,e;case ZJ:return ev(n,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case KJ:s=10;break e;case QJ:s=9;break e;case qO:s=11;break e;case KO:s=14;break e;case Pc:s=16,r=null;break e}throw Error(We(130,e==null?e:typeof e,""))}return t=Na(s,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function Pu(e,t,n,r){return e=Na(7,e,r,t),e.lanes=n,e}function ev(e,t,n,r){return e=Na(22,e,r,t),e.elementType=ZJ,e.lanes=n,e.stateNode={isHidden:!1},e}function Px(e,t,n){return e=Na(6,e,null,t),e.lanes=n,e}function Ix(e,t,n){return t=Na(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function J6e(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=fx(0),this.expirationTimes=fx(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fx(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function PR(e,t,n,r,i,a,s,o,c){return e=new J6e(e,t,n,o,c),t===1?(t=1,a===!0&&(t|=8)):t=0,a=Na(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},dR(a),e}function X6e(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Vee)}catch(e){console.error(e)}}Vee(),HJ.exports=oa;var lb=HJ.exports,rF=lb;qS.createRoot=rF.createRoot,qS.hydrateRoot=rF.hydrateRoot;var Bc=function(){return Bc=Object.assign||function(t){for(var n,r=1,i=arguments.length;r"u")return x5e;var t=C5e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},E5e=Kee(),T5e=function(e,t,n,r){var i=e.left,a=e.top,s=e.right,o=e.gap;return n===void 0&&(n="margin"),` +`+a.stack}return{value:e,source:t,stack:i,digest:null}}function Sx(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function _k(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var N6e=typeof WeakMap=="function"?WeakMap:Map;function gee(e,t,n){n=N0(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){W3||(W3=!0,Mk=r),_k(e,t)},n}function vee(e,t,n){n=N0(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){_k(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(n.callback=function(){_k(e,t),typeof r!="function"&&(hl===null?hl=new Set([this]):hl.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function FL(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new N6e;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=q6e.bind(null,e,t,n),t.then(e,e))}function UL(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function zL(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=N0(-1,1),t.tag=2,pl(n,t,1))),n.lanes|=1),e)}var j6e=X0.ReactCurrentOwner,xi=!1;function Jr(e,t,n,r){t.child=e===null?YX(t,null,n,r):Np(t,e.child,n,r)}function $L(e,t,n,r,i){n=n.render;var a=t.ref;return k1(t,i),r=bR(e,t,n,r,a,i),n=gR(),e!==null&&!xi?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,U0(e,t,i)):(un&&n&&aR(t),t.flags|=1,Jr(e,t,r,i),t.child)}function HL(e,t,n,r,i){if(e===null){var a=n.type;return typeof a=="function"&&!kR(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,wee(e,t,a,r,i)):(e=Fg(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&i)){var s=a.memoizedProps;if(n=n.compare,n=n!==null?n:Fy,n(s,r)&&e.ref===t.ref)return U0(e,t,i)}return t.flags|=1,e=ml(a,r),e.ref=t.ref,e.return=t,t.child=e}function wee(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Fy(a,r)&&e.ref===t.ref)if(xi=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(xi=!0);else return t.lanes=e.lanes,U0(e,t,i)}return Sk(e,t,n,r,i)}function xee(e,t,n){var r=t.pendingProps,i=r.children,a=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Xt(u1,Ki),Ki|=n;else{if(!(n&1073741824))return e=a!==null?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Xt(u1,Ki),Ki|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a!==null?a.baseLanes:n,Xt(u1,Ki),Ki|=r}else a!==null?(r=a.baseLanes|n,t.memoizedState=null):r=n,Xt(u1,Ki),Ki|=r;return Jr(e,t,i,n),t.child}function Cee(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Sk(e,t,n,r,i){var a=Ti(n)?Mu:Vr.current;return a=Op(t,a),k1(t,i),n=bR(e,t,n,r,a,i),r=gR(),e!==null&&!xi?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,U0(e,t,i)):(un&&r&&aR(t),t.flags|=1,Jr(e,t,n,i),t.child)}function WL(e,t,n,r,i){if(Ti(n)){var a=!0;j3(t)}else a=!1;if(k1(t,i),t.stateNode===null)Mg(e,t),QX(t,n,r),Tk(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,o=t.memoizedProps;s.props=o;var c=s.context,l=n.contextType;typeof l=="object"&&l!==null?l=La(l):(l=Ti(n)?Mu:Vr.current,l=Op(t,l));var f=n.getDerivedStateFromProps,u=typeof f=="function"||typeof s.getSnapshotBeforeUpdate=="function";u||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o!==r||c!==l)&&DL(t,s,r,l),Ic=!1;var d=t.memoizedState;s.state=d,F3(t,r,s,i),c=t.memoizedState,o!==r||d!==c||Ei.current||Ic?(typeof f=="function"&&(Ek(t,n,f,r),c=t.memoizedState),(o=Ic||jL(t,n,o,r,d,c,l))?(u||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),s.props=r,s.state=c,s.context=l,r=o):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,qX(e,t),o=t.memoizedProps,l=t.type===t.elementType?o:fs(t.type,o),s.props=l,u=t.pendingProps,d=s.context,c=n.contextType,typeof c=="object"&&c!==null?c=La(c):(c=Ti(n)?Mu:Vr.current,c=Op(t,c));var p=n.getDerivedStateFromProps;(f=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o!==u||d!==c)&&DL(t,s,r,c),Ic=!1,d=t.memoizedState,s.state=d,F3(t,r,s,i);var h=t.memoizedState;o!==u||d!==h||Ei.current||Ic?(typeof p=="function"&&(Ek(t,n,p,r),h=t.memoizedState),(l=Ic||jL(t,n,l,r,d,h,c)||!1)?(f||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,h,c),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,h,c)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),s.props=r,s.state=h,s.context=c,r=l):(typeof s.componentDidUpdate!="function"||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return kk(e,t,n,r,a,i)}function kk(e,t,n,r,i,a){Cee(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&PL(t,n,!1),U0(e,t,a);r=t.stateNode,j6e.current=t;var o=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Np(t,e.child,null,a),t.child=Np(t,null,o,a)):Jr(e,t,o,a),t.memoizedState=r.state,i&&PL(t,n,!0),t.child}function Aee(e){var t=e.stateNode;t.pendingContext?kL(e,t.pendingContext,t.pendingContext!==t.context):t.context&&kL(e,t.context,!1),pR(e,t.containerInfo)}function VL(e,t,n,r,i){return Rp(),oR(i),t.flags|=256,Jr(e,t,n,r),t.child}var Pk={dehydrated:null,treeContext:null,retryLane:0};function Ik(e){return{baseLanes:e,cachePool:null,transitions:null}}function Eee(e,t,n){var r=t.pendingProps,i=gn.current,a=!1,s=(t.flags&128)!==0,o;if((o=s)||(o=e!==null&&e.memoizedState===null?!1:(i&2)!==0),o?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Xt(gn,i&1),e===null)return Ck(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,a?(r=t.mode,a=t.child,s={mode:"hidden",children:s},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=s):a=ev(s,r,0,null),e=Pu(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Ik(n),t.memoizedState=Pk,e):xR(t,s));if(i=e.memoizedState,i!==null&&(o=i.dehydrated,o!==null))return D6e(e,t,s,r,o,i,n);if(a){a=r.fallback,s=t.mode,i=e.child,o=i.sibling;var c={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=ml(i,c),r.subtreeFlags=i.subtreeFlags&14680064),o!==null?a=ml(o,a):(a=Pu(a,s,n,null),a.flags|=2),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,s=e.child.memoizedState,s=s===null?Ik(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},a.memoizedState=s,a.childLanes=e.childLanes&~n,t.memoizedState=Pk,r}return a=e.child,e=a.sibling,r=ml(a,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function xR(e,t){return t=ev({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function _8(e,t,n,r){return r!==null&&oR(r),Np(t,e.child,null,n),e=xR(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function D6e(e,t,n,r,i,a,s){if(n)return t.flags&256?(t.flags&=-257,r=Sx(Error(We(422))),_8(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=r.fallback,i=t.mode,r=ev({mode:"visible",children:r.children},i,0,null),a=Pu(a,i,s,null),a.flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,t.mode&1&&Np(t,e.child,null,s),t.child.memoizedState=Ik(s),t.memoizedState=Pk,a);if(!(t.mode&1))return _8(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var o=r.dgst;return r=o,a=Error(We(419)),r=Sx(a,r,void 0),_8(e,t,s,r)}if(o=(s&e.childLanes)!==0,xi||o){if(r=or,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==a.retryLane&&(a.retryLane=i,F0(e,i),ks(r,e,i,-1))}return SR(),r=Sx(Error(We(421))),_8(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=K6e.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,Xi=dl(i.nextSibling),na=t,un=!0,bs=null,e!==null&&(Oa[Ra++]=k0,Oa[Ra++]=P0,Oa[Ra++]=Bu,k0=e.id,P0=e.overflow,Bu=t),t=xR(t,r.children),t.flags|=4096,t)}function GL(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ak(e.return,t,n)}function kx(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function Tee(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Jr(e,t,r.children,n),r=gn.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&GL(e,n,t);else if(e.tag===19)GL(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Xt(gn,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&U3(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),kx(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&U3(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}kx(t,!0,n,null,a);break;case"together":kx(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Mg(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function U0(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Fu|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(We(153));if(t.child!==null){for(e=t.child,n=ml(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ml(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function M6e(e,t,n){switch(t.tag){case 3:Aee(t),Rp();break;case 5:JX(t);break;case 1:Ti(t.type)&&j3(t);break;case 4:pR(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Xt(B3,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Xt(gn,gn.current&1),t.flags|=128,null):n&t.child.childLanes?Eee(e,t,n):(Xt(gn,gn.current&1),e=U0(e,t,n),e!==null?e.sibling:null);Xt(gn,gn.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Tee(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Xt(gn,gn.current),r)break;return null;case 22:case 23:return t.lanes=0,xee(e,t,n)}return U0(e,t,n)}var _ee,Ok,See,kee;_ee=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Ok=function(){};See=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,tu(Oo.current);var a=null;switch(n){case"input":i=XS(e,i),r=XS(e,r),a=[];break;case"select":i=En({},i,{value:void 0}),r=En({},r,{value:void 0}),a=[];break;case"textarea":i=nk(e,i),r=nk(e,r),a=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=R3)}ik(n,r);var s;n=null;for(l in i)if(!r.hasOwnProperty(l)&&i.hasOwnProperty(l)&&i[l]!=null)if(l==="style"){var o=i[l];for(s in o)o.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else l!=="dangerouslySetInnerHTML"&&l!=="children"&&l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(Ry.hasOwnProperty(l)?a||(a=[]):(a=a||[]).push(l,null));for(l in r){var c=r[l];if(o=i!=null?i[l]:void 0,r.hasOwnProperty(l)&&c!==o&&(c!=null||o!=null))if(l==="style")if(o){for(s in o)!o.hasOwnProperty(s)||c&&c.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in c)c.hasOwnProperty(s)&&o[s]!==c[s]&&(n||(n={}),n[s]=c[s])}else n||(a||(a=[]),a.push(l,n)),n=c;else l==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,o=o?o.__html:void 0,c!=null&&o!==c&&(a=a||[]).push(l,c)):l==="children"?typeof c!="string"&&typeof c!="number"||(a=a||[]).push(l,""+c):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&(Ry.hasOwnProperty(l)?(c!=null&&l==="onScroll"&&an("scroll",e),a||o===c||(a=[])):(a=a||[]).push(l,c))}n&&(a=a||[]).push("style",n);var l=a;(t.updateQueue=l)&&(t.flags|=4)}};kee=function(e,t,n,r){n!==r&&(t.flags|=4)};function w6(e,t){if(!un)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function kr(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function B6e(e,t,n){var r=t.pendingProps;switch(sR(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return kr(t),null;case 1:return Ti(t.type)&&N3(),kr(t),null;case 3:return r=t.stateNode,jp(),on(Ei),on(Vr),yR(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(E8(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,bs!==null&&(Fk(bs),bs=null))),Ok(e,t),kr(t),null;case 5:hR(t);var i=tu(Wy.current);if(n=t.type,e!==null&&t.stateNode!=null)See(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(We(166));return kr(t),null}if(e=tu(Oo.current),E8(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[Co]=t,r[$y]=a,e=(t.mode&1)!==0,n){case"dialog":an("cancel",r),an("close",r);break;case"iframe":case"object":case"embed":an("load",r);break;case"video":case"audio":for(i=0;i<_2.length;i++)an(_2[i],r);break;case"source":an("error",r);break;case"img":case"image":case"link":an("error",r),an("load",r);break;case"details":an("toggle",r);break;case"input":tL(r,a),an("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},an("invalid",r);break;case"textarea":rL(r,a),an("invalid",r)}ik(n,a),i=null;for(var s in a)if(a.hasOwnProperty(s)){var o=a[s];s==="children"?typeof o=="string"?r.textContent!==o&&(a.suppressHydrationWarning!==!0&&A8(r.textContent,o,e),i=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(a.suppressHydrationWarning!==!0&&A8(r.textContent,o,e),i=["children",""+o]):Ry.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&an("scroll",r)}switch(n){case"input":y8(r),nL(r,a,!0);break;case"textarea":y8(r),iL(r);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(r.onclick=R3)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=tX(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML=" +