From 8b2618d34896f9e9dbbe3edef67b51f10be9a093 Mon Sep 17 00:00:00 2001 From: aman035 Date: Wed, 18 Sep 2024 18:24:50 +0530 Subject: [PATCH] Updates --- ...4124-_tXazQQp.js => Index-8adb4124-Byt0tLBB.js} | 2 +- ...058e-B94dMgcD.js => Index-a4a1058e-eVkqWWuo.js} | 2 +- assets/{ccip-B9fhUHMP.js => ccip-BypqJ45N.js} | 2 +- assets/{index-MsX5kOG8.js => index-ANyCsgDC.js} | 2 +- assets/index-BQOD_iIK.js | 2 -- assets/{index-hcwXXuMg.js => index-BivK3ymw.js} | 2 +- assets/{index-J40BUt8X.js => index-C2b3983o.js} | 2 +- assets/{index-BwZaYMab.js => index-C6UBXeMY.js} | 14 +++++++------- assets/{index-CdPQs6F4.js => index-C9Hr7owJ.js} | 2 +- assets/{index-DvN7N4_1.js => index-CmFE4F7-.js} | 2 +- assets/{index-6w8_iIHZ.js => index-D6EKpZiz.js} | 2 +- assets/{index-PdbjxWGy.js => index-DBR7Q1I_.js} | 2 +- assets/index-DkbPsACs.js | 2 ++ assets/{index-DkX1LEPK.js => index-uqrbdLfT.js} | 2 +- .../{index.es-IxFjqeYu.js => index.es-DEtxasS7.js} | 6 +++--- ...er-DCQ5xBDd.js => inherits_browser-B1P7kPq9.js} | 2 +- assets/{number-CDau7Bsv.js => number-C2Dy0LFJ.js} | 2 +- index.html | 6 +++--- 18 files changed, 28 insertions(+), 28 deletions(-) rename assets/{Index-8adb4124-_tXazQQp.js => Index-8adb4124-Byt0tLBB.js} (99%) rename assets/{Index-a4a1058e-B94dMgcD.js => Index-a4a1058e-eVkqWWuo.js} (99%) rename assets/{ccip-B9fhUHMP.js => ccip-BypqJ45N.js} (97%) rename assets/{index-MsX5kOG8.js => index-ANyCsgDC.js} (93%) delete mode 100644 assets/index-BQOD_iIK.js rename assets/{index-hcwXXuMg.js => index-BivK3ymw.js} (99%) rename assets/{index-J40BUt8X.js => index-C2b3983o.js} (99%) rename assets/{index-BwZaYMab.js => index-C6UBXeMY.js} (94%) rename assets/{index-CdPQs6F4.js => index-C9Hr7owJ.js} (94%) rename assets/{index-DvN7N4_1.js => index-CmFE4F7-.js} (85%) rename assets/{index-6w8_iIHZ.js => index-D6EKpZiz.js} (98%) rename assets/{index-PdbjxWGy.js => index-DBR7Q1I_.js} (99%) create mode 100644 assets/index-DkbPsACs.js rename assets/{index-DkX1LEPK.js => index-uqrbdLfT.js} (99%) rename assets/{index.es-IxFjqeYu.js => index.es-DEtxasS7.js} (99%) rename assets/{inherits_browser-DCQ5xBDd.js => inherits_browser-B1P7kPq9.js} (99%) rename assets/{number-CDau7Bsv.js => number-C2Dy0LFJ.js} (99%) diff --git a/assets/Index-8adb4124-_tXazQQp.js b/assets/Index-8adb4124-Byt0tLBB.js similarity index 99% rename from assets/Index-8adb4124-_tXazQQp.js rename to assets/Index-8adb4124-Byt0tLBB.js index 5c30669..f420f98 100644 --- a/assets/Index-8adb4124-_tXazQQp.js +++ b/assets/Index-8adb4124-Byt0tLBB.js @@ -1,4 +1,4 @@ -import{S as R,i as N,s as M,a as O,y as me,d as _,t as w,g as G,h as T,j as A,k as C,m as Y,n as _e,o as we,p as D,e as h,c as m,K as Ce,r as F,b as L,ak as B,u as H,f as g,l as S,I as ye,at as ze,au as Te,av as je,N as xe,a5 as Le,Q as Pe,a7 as Se,v as $,_ as Z,a2 as Ee,aw as Ie,ax as be,a6 as Re,J as Ne,ay as J,az as K,G as V,R as he,z as Me,$ as ge,aA as Oe,q as ke,aB as Q,aC as U,x as I,aD as X,E,M as q,aE as ee,aF as De,aG as te,aH as P,D as Fe,a8 as W,aI as He}from"./index-BwZaYMab.js";function $e(i,{from:e,to:t},n={}){const o=getComputedStyle(i),a=o.transform==="none"?"":o.transform,[f,l]=o.transformOrigin.split(" ").map(parseFloat),s=e.left+e.width*f/t.width-(t.left+f),r=e.top+e.height*l/t.height-(t.top+l),{delay:c=0,duration:d=u=>Math.sqrt(u)*120,easing:v=be}=n;return{delay:c,duration:Ne(d)?d(Math.sqrt(s*s+r*r)):d,easing:v,css:(u,b)=>{const p=b*s,y=b*r,z=u+b*e.width/t.width,j=u+b*e.height/t.height;return`transform: ${a} translate(${p}px, ${y}px) scale(${z}, ${j});`}}}function Ge(i){O(i,"svelte-13cuwwo","div.svelte-13cuwwo{box-sizing:content-box}.border.svelte-13cuwwo{border:2px solid;border-radius:120px;overflow:hidden}")}function Ae(i){let e,t;return{c(){e=h("div"),m(e,"class","border svelte-13cuwwo"),m(e,"style",t=` +import{S as R,i as N,s as M,a as O,y as me,d as _,t as w,g as G,h as T,j as A,k as C,m as Y,n as _e,o as we,p as D,e as h,c as m,K as Ce,r as F,b as L,ak as B,u as H,f as g,l as S,I as ye,at as ze,au as Te,av as je,N as xe,a5 as Le,Q as Pe,a7 as Se,v as $,_ as Z,a2 as Ee,aw as Ie,ax as be,a6 as Re,J as Ne,ay as J,az as K,G as V,R as he,z as Me,$ as ge,aA as Oe,q as ke,aB as Q,aC as U,x as I,aD as X,E,M as q,aE as ee,aF as De,aG as te,aH as P,D as Fe,a8 as W,aI as He}from"./index-C6UBXeMY.js";function $e(i,{from:e,to:t},n={}){const o=getComputedStyle(i),a=o.transform==="none"?"":o.transform,[f,l]=o.transformOrigin.split(" ").map(parseFloat),s=e.left+e.width*f/t.width-(t.left+f),r=e.top+e.height*l/t.height-(t.top+l),{delay:c=0,duration:d=u=>Math.sqrt(u)*120,easing:v=be}=n;return{delay:c,duration:Ne(d)?d(Math.sqrt(s*s+r*r)):d,easing:v,css:(u,b)=>{const p=b*s,y=b*r,z=u+b*e.width/t.width,j=u+b*e.height/t.height;return`transform: ${a} translate(${p}px, ${y}px) scale(${z}, ${j});`}}}function Ge(i){O(i,"svelte-13cuwwo","div.svelte-13cuwwo{box-sizing:content-box}.border.svelte-13cuwwo{border:2px solid;border-radius:120px;overflow:hidden}")}function Ae(i){let e,t;return{c(){e=h("div"),m(e,"class","border svelte-13cuwwo"),m(e,"style",t=` width: ${i[2]-i[3]*2}px; height: ${i[2]-i[3]*2}px; border-color: var(${i[1]}); diff --git a/assets/Index-a4a1058e-B94dMgcD.js b/assets/Index-a4a1058e-eVkqWWuo.js similarity index 99% rename from assets/Index-a4a1058e-B94dMgcD.js rename to assets/Index-a4a1058e-eVkqWWuo.js index cd9b793..4cfa2be 100644 --- a/assets/Index-a4a1058e-B94dMgcD.js +++ b/assets/Index-a4a1058e-eVkqWWuo.js @@ -1,4 +1,4 @@ -import{S as pe,i as ve,s as me,a as ge,e as g,b as z,c as p,d as M,f as c,l as J,t as y,g as ae,h as T,j as ie,k as S,m as ne,n as ye,o as Ce,p as ee,q as Hn,r as E,u as O,v as Z,w as Ie,x as G,y as ue,z as Me,$ as je,A as Cn,B as Be,C as L,W as he,D as be,E as q,F as _e,G as ce,H as Vn,I as fe,J as we,K as zn,L as In,M as V,N as Te,O as De,P as We,Q as Ne,R as ke,T as $n,U as Bn,V as Dn,X as He,Y as ze,Z as Tn,_ as Wn,a0 as Nn,a1 as Fn,a2 as An,a3 as En,a4 as de,a5 as Pe,a6 as $e,a7 as On,a8 as Ve,a9 as Zn,aa as Gn,ab as Mn,ac as Sn,ad as Rn,ae as Un,af as Fe,ag as Xn,ah as Ee,ai as Jn,aj as Oe,ak as Le,al as Ze,am as Kn,an as qe,ao as Ge,ap as Qn,aq as Yn,ar as Re,as as xn}from"./index-BwZaYMab.js";import{merge as et}from"./index-DvN7N4_1.js";import{s as nt,d as tt}from"./index-6w8_iIHZ.js";var Pn='',Se=` +import{S as pe,i as ve,s as me,a as ge,e as g,b as z,c as p,d as M,f as c,l as J,t as y,g as ae,h as T,j as ie,k as S,m as ne,n as ye,o as Ce,p as ee,q as Hn,r as E,u as O,v as Z,w as Ie,x as G,y as ue,z as Me,$ as je,A as Cn,B as Be,C as L,W as he,D as be,E as q,F as _e,G as ce,H as Vn,I as fe,J as we,K as zn,L as In,M as V,N as Te,O as De,P as We,Q as Ne,R as ke,T as $n,U as Bn,V as Dn,X as He,Y as ze,Z as Tn,_ as Wn,a0 as Nn,a1 as Fn,a2 as An,a3 as En,a4 as de,a5 as Pe,a6 as $e,a7 as On,a8 as Ve,a9 as Zn,aa as Gn,ab as Mn,ac as Sn,ad as Rn,ae as Un,af as Fe,ag as Xn,ah as Ee,ai as Jn,aj as Oe,ak as Le,al as Ze,am as Kn,an as qe,ao as Ge,ap as Qn,aq as Yn,ar as Re,as as xn}from"./index-C6UBXeMY.js";import{merge as et}from"./index-CmFE4F7-.js";import{s as nt,d as tt}from"./index-D6EKpZiz.js";var Pn='',Se=` diff --git a/assets/ccip-B9fhUHMP.js b/assets/ccip-BypqJ45N.js similarity index 97% rename from assets/ccip-B9fhUHMP.js rename to assets/ccip-BypqJ45N.js index 422ee0e..cb811e5 100644 --- a/assets/ccip-B9fhUHMP.js +++ b/assets/ccip-BypqJ45N.js @@ -1 +1 @@ -import{bp as p,bq as m,br as y,bs as g,bt as k,bu as x,bv as E,bw as L,bx as h,by as O}from"./index-BwZaYMab.js";class M extends p{constructor({callbackSelector:r,cause:e,data:o,extraData:c,sender:d,urls:a}){var i;super(e.shortMessage||"An error occurred while fetching for an offchain result.",{cause:e,metaMessages:[...e.metaMessages||[],(i=e.metaMessages)!=null&&i.length?"":[],"Offchain Gateway Call:",a&&[" Gateway URL(s):",...a.map(f=>` ${m(f)}`)],` Sender: ${d}`,` Data: ${o}`,` Callback selector: ${r}`,` Extra data: ${c}`].flat(),name:"OffchainLookupError"})}}class R extends p{constructor({result:r,url:e}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${m(e)}`,`Response: ${y(r)}`],name:"OffchainLookupResponseMalformedError"})}}class $ extends p{constructor({sender:r,to:e}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${e}`,`OffchainLookup sender address: ${r}`],name:"OffchainLookupSenderMismatchError"})}}const D="0x556f1830",S={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function T(n,{blockNumber:r,blockTag:e,data:o,to:c}){const{args:d}=g({data:o,abi:[S]}),[a,i,f,t,s]=d,{ccipRead:u}=n,b=u&&typeof(u==null?void 0:u.request)=="function"?u.request:q;try{if(!k(c,a))throw new $({sender:a,to:c});const l=await b({data:f,sender:a,urls:i}),{data:w}=await x(n,{blockNumber:r,blockTag:e,data:E([t,L([{type:"bytes"},{type:"bytes"}],[l,s])]),to:c});return w}catch(l){throw new M({callbackSelector:t,cause:l,data:o,extraData:s,sender:a,urls:i})}}async function q({data:n,sender:r,urls:e}){var c;let o=new Error("An unknown error occurred.");for(let d=0;d` ${m(f)}`)],` Sender: ${d}`,` Data: ${o}`,` Callback selector: ${r}`,` Extra data: ${c}`].flat(),name:"OffchainLookupError"})}}class R extends p{constructor({result:r,url:e}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${m(e)}`,`Response: ${y(r)}`],name:"OffchainLookupResponseMalformedError"})}}class $ extends p{constructor({sender:r,to:e}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${e}`,`OffchainLookup sender address: ${r}`],name:"OffchainLookupSenderMismatchError"})}}const D="0x556f1830",S={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function T(n,{blockNumber:r,blockTag:e,data:o,to:c}){const{args:d}=g({data:o,abi:[S]}),[a,i,f,t,s]=d,{ccipRead:u}=n,b=u&&typeof(u==null?void 0:u.request)=="function"?u.request:q;try{if(!k(c,a))throw new $({sender:a,to:c});const l=await b({data:f,sender:a,urls:i}),{data:w}=await x(n,{blockNumber:r,blockTag:e,data:E([t,L([{type:"bytes"},{type:"bytes"}],[l,s])]),to:c});return w}catch(l){throw new M({callbackSelector:t,cause:l,data:o,extraData:s,sender:a,urls:i})}}async function q({data:n,sender:r,urls:e}){var c;let o=new Error("An unknown error occurred.");for(let d=0;di.map(i=>d[i]); -import{bz as fe}from"./index-BwZaYMab.js";const me=Symbol(),ee=Object.getPrototypeOf,G=new WeakMap,ge=e=>e&&(G.has(e)?G.get(e):ee(e)===Object.prototype||ee(e)===Array.prototype),he=e=>ge(e)&&e[me]||null,te=(e,t=!0)=>{G.set(e,t)},z={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_APP_ENV:"dev",VITE_APP_WALLETCONNECT_PROJECT_ID:"a9782e50cde6e67b10c297f1834e43ea"},q=e=>typeof e=="object"&&e!==null,A=new WeakMap,x=new WeakSet,be=(e=Object.is,t=(n,h)=>new Proxy(n,h),s=n=>q(n)&&!x.has(n)&&(Array.isArray(n)||!(Symbol.iterator in n))&&!(n instanceof WeakMap)&&!(n instanceof WeakSet)&&!(n instanceof Error)&&!(n instanceof Number)&&!(n instanceof Date)&&!(n instanceof String)&&!(n instanceof RegExp)&&!(n instanceof ArrayBuffer),r=n=>{switch(n.status){case"fulfilled":return n.value;case"rejected":throw n.reason;default:throw n}},l=new WeakMap,c=(n,h,I=r)=>{const y=l.get(n);if((y==null?void 0:y[0])===h)return y[1];const v=Array.isArray(n)?[]:Object.create(Object.getPrototypeOf(n));return te(v,!0),l.set(n,[h,v]),Reflect.ownKeys(n).forEach(D=>{if(Object.getOwnPropertyDescriptor(v,D))return;const O=Reflect.get(n,D),M={value:O,enumerable:!0,configurable:!0};if(x.has(O))te(O,!1);else if(O instanceof Promise)delete M.value,M.get=()=>I(O);else if(A.has(O)){const[b,H]=A.get(O);M.value=c(b,H(),I)}Object.defineProperty(v,D,M)}),Object.preventExtensions(v)},m=new WeakMap,f=[1,1],W=n=>{if(!q(n))throw new Error("object required");const h=m.get(n);if(h)return h;let I=f[0];const y=new Set,v=(i,a=++f[0])=>{I!==a&&(I=a,y.forEach(o=>o(i,a)))};let D=f[1];const O=(i=++f[1])=>(D!==i&&!y.size&&(D=i,b.forEach(([a])=>{const o=a[1](i);o>I&&(I=o)})),I),M=i=>(a,o)=>{const g=[...a];g[1]=[i,...g[1]],v(g,o)},b=new Map,H=(i,a)=>{if((z?"production":void 0)!=="production"&&b.has(i))throw new Error("prop listener already exists");if(y.size){const o=a[3](M(i));b.set(i,[a,o])}else b.set(i,[a])},Z=i=>{var a;const o=b.get(i);o&&(b.delete(i),(a=o[1])==null||a.call(o))},ue=i=>(y.add(i),y.size===1&&b.forEach(([o,g],S)=>{if((z?"production":void 0)!=="production"&&g)throw new Error("remove already exists");const T=o[3](M(S));b.set(S,[o,T])}),()=>{y.delete(i),y.size===0&&b.forEach(([o,g],S)=>{g&&(g(),b.set(S,[o]))})}),J=Array.isArray(n)?[]:Object.create(Object.getPrototypeOf(n)),V=t(J,{deleteProperty(i,a){const o=Reflect.get(i,a);Z(a);const g=Reflect.deleteProperty(i,a);return g&&v(["delete",[a],o]),g},set(i,a,o,g){const S=Reflect.has(i,a),T=Reflect.get(i,a,g);if(S&&(e(T,o)||m.has(o)&&e(T,m.get(o))))return!0;Z(a),q(o)&&(o=he(o)||o);let $=o;if(o instanceof Promise)o.then(C=>{o.status="fulfilled",o.value=C,v(["resolve",[a],C])}).catch(C=>{o.status="rejected",o.reason=C,v(["reject",[a],C])});else{!A.has(o)&&s(o)&&($=W(o));const C=!x.has($)&&A.get($);C&&H(a,C)}return Reflect.set(i,a,$,g),v(["set",[a],o,T]),!0}});m.set(n,V);const pe=[J,O,c,ue];return A.set(V,pe),Reflect.ownKeys(n).forEach(i=>{const a=Object.getOwnPropertyDescriptor(n,i);"value"in a&&(V[i]=n[i],delete a.value,delete a.writable),Object.defineProperty(J,i,a)}),V})=>[W,A,x,e,t,s,r,l,c,m,f],[ye]=be();function j(e={}){return ye(e)}function U(e,t,s){const r=A.get(e);(z?"production":void 0)!=="production"&&!r&&console.warn("Please use proxy object");let l;const c=[],m=r[3];let f=!1;const n=m(h=>{c.push(h),l||(l=Promise.resolve().then(()=>{l=void 0,f&&t(c.splice(0))}))});return f=!0,()=>{f=!1,n()}}function ve(e,t){const s=A.get(e);(z?"production":void 0)!=="production"&&!s&&console.warn("Please use proxy object");const[r,l,c]=s;return c(r,l(),t)}const d=j({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),de={state:d,subscribe(e){return U(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=de.state.data)==null?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},we=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),u=j({enabled:we,userSessionId:"",events:[],connectedWalletId:void 0}),Ie={state:u,subscribe(e){return U(u.events,()=>e(ve(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)}}},E=j({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),w={state:E,subscribe(e){return U(E,()=>e(E))},setChains(e){E.chains=e},setWalletConnectUri(e){E.walletConnectUri=e},setIsCustomDesktop(e){E.isCustomDesktop=e},setIsCustomMobile(e){E.isCustomMobile=e},setIsDataLoaded(e){E.isDataLoaded=e},setIsUiLoaded(e){E.isUiLoaded=e},setIsAuth(e){E.isAuth=e}},B=j({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}),N={state:B,subscribe(e){return U(B,()=>e(B))},setConfig(e){var t,s;Ie.initialize(),w.setChains(e.chains),w.setIsAuth(!!e.enableAuthMode),w.setIsCustomMobile(!!((t=e.mobileWallets)!=null&&t.length)),w.setIsCustomDesktop(!!((s=e.desktopWallets)!=null&&s.length)),p.setModalVersionInStorage(),Object.assign(B,e)}};var Ee=Object.defineProperty,se=Object.getOwnPropertySymbols,Le=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,ne=(e,t,s)=>t in e?Ee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,We=(e,t)=>{for(var s in t||(t={}))Le.call(t,s)&&ne(e,s,t[s]);if(se)for(var s of se(t))Oe.call(t,s)&&ne(e,s,t[s]);return e};const Q="https://explorer-api.walletconnect.com",X="wcm",Y="js-2.6.2";async function K(e,t){const s=We({sdkType:X,sdkVersion:Y},t),r=new URL(e,Q);return r.searchParams.append("projectId",N.state.projectId),Object.entries(s).forEach(([l,c])=>{c&&r.searchParams.append(l,String(c))}),(await fetch(r)).json()}const P={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`${Q}/w3m/v1/getWalletImage/${e}?projectId=${N.state.projectId}&sdkType=${X}&sdkVersion=${Y}`},getAssetImageUrl(e){return`${Q}/w3m/v1/getAssetImage/${e}?projectId=${N.state.projectId}&sdkType=${X}&sdkVersion=${Y}`}};var Ce=Object.defineProperty,oe=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,re=(e,t,s)=>t in e?Ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Me=(e,t)=>{for(var s in t||(t={}))Ae.call(t,s)&&re(e,s,t[s]);if(oe)for(var s of oe(t))je.call(t,s)&&re(e,s,t[s]);return e};const ae=p.isMobile(),L=j({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),Re={state:L,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=N.state;if(e==="NONE"||t==="ALL"&&!e)return L.recomendedWallets;if(p.isArray(e)){const s={recommendedIds:e.join(",")},{listings:r}=await P.getAllListings(s),l=Object.values(r);l.sort((c,m)=>{const f=e.indexOf(c.id),W=e.indexOf(m.id);return f-W}),L.recomendedWallets=l}else{const{chains:s,isAuth:r}=w.state,l=s==null?void 0:s.join(","),c=p.isArray(t),m={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}=ae?await P.getMobileListings(m):await P.getDesktopListings(m);L.recomendedWallets=Object.values(f)}return L.recomendedWallets},async getWallets(e){const t=Me({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:r}=N.state,{recomendedWallets:l}=L;if(r==="ALL")return L.wallets;l.length?t.excludedIds=l.map(I=>I.id).join(","):p.isArray(s)&&(t.excludedIds=s.join(",")),p.isArray(r)&&(t.excludedIds=[t.excludedIds,r].filter(Boolean).join(",")),w.state.isAuth&&(t.sdks="auth_v1");const{page:c,search:m}=e,{listings:f,total:W}=ae?await P.getMobileListings(t):await P.getDesktopListings(t),n=Object.values(f),h=m?"search":"wallets";return L[h]={listings:[...L[h].listings,...n],total:W,page:c??1},{listings:n,total:W}},getWalletImageUrl(e){return P.getWalletImageUrl(e)},getAssetImageUrl(e){return P.getAssetImageUrl(e)},resetSearch(){L.search={listings:[],total:0,page:1}}},k=j({open:!1}),F={state:k,subscribe(e){return U(k,()=>e(k))},async open(e){return new Promise(t=>{const{isUiLoaded:s,isDataLoaded:r}=w.state;if(p.removeWalletConnectDeepLink(),w.setWalletConnectUri(e==null?void 0:e.uri),w.setChains(e==null?void 0:e.chains),de.reset("ConnectWallet"),s&&r)k.open=!0,t();else{const l=setInterval(()=>{const c=w.state;c.isUiLoaded&&c.isDataLoaded&&(clearInterval(l),k.open=!0,t())},200)}})},close(){k.open=!1}};var Pe=Object.defineProperty,ie=Object.getOwnPropertySymbols,_e=Object.prototype.hasOwnProperty,Ue=Object.prototype.propertyIsEnumerable,le=(e,t,s)=>t in e?Pe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,De=(e,t)=>{for(var s in t||(t={}))_e.call(t,s)&&le(e,s,t[s]);if(ie)for(var s of ie(t))Ue.call(t,s)&&le(e,s,t[s]);return e};function Se(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const R=j({themeMode:Se()?"dark":"light"}),ce={state:R,subscribe(e){return U(R,()=>e(R))},setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(R.themeMode=t),s&&(R.themeVariables=De({},s))}},_=j({open:!1,message:"",variant:"success"}),Ve={state:_,subscribe(e){return U(_,()=>e(_))},openToast(e,t){_.open=!0,_.message=e,_.variant=t},closeToast(){_.open=!1}};class ke{constructor(t){this.openModal=F.open,this.closeModal=F.close,this.subscribeModal=F.subscribe,this.setTheme=ce.setThemeConfig,ce.setThemeConfig(t),N.setConfig(t),this.initUi()}async initUi(){if(typeof window<"u"){await fe(()=>import("./index-PdbjxWGy.js"),__vite__mapDeps([0,1,2]));const t=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",t),w.setIsUiLoaded(!0)}}}const $e=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:ke},Symbol.toStringTag,{value:"Module"}));export{Ie as R,de as T,p as a,$e as i,ce as n,Ve as o,w as p,F as s,Re as t,N as y}; diff --git a/assets/index-hcwXXuMg.js b/assets/index-BivK3ymw.js similarity index 99% rename from assets/index-hcwXXuMg.js rename to assets/index-BivK3ymw.js index d9ae6f6..23f0151 100644 --- a/assets/index-hcwXXuMg.js +++ b/assets/index-BivK3ymw.js @@ -1,2 +1,2 @@ -import{C as e,e as G,i as J,h as V,j as ee,L as X,B as q,p as j,G as k,a as E,l as te,K as de,P as me,I as ae,F as ue,T as be,m as he,g as ke,J as xe}from"./number-CDau7Bsv.js";import{bf as i,aS as o,bo as W,a_ as u,bh as fe,b5 as R,b8 as K,bj as ye}from"./index-BwZaYMab.js";const et=e({id:787,name:"Acala",network:"acala",nativeCurrency:{name:"Acala",symbol:"ACA",decimals:18},rpcUrls:{public:{http:["https://eth-rpc-acala.aca-api.network"],webSocket:["wss://eth-rpc-acala.aca-api.network"]},default:{http:["https://eth-rpc-acala.aca-api.network"],webSocket:["wss://eth-rpc-acala.aca-api.network"]}},blockExplorers:{default:{name:"Acala Blockscout",url:"https://blockscout.acala.network",apiUrl:"https://blockscout.acala.network/api"}},testnet:!1}),Ee={gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}},Z={block:G({format(t){var s;return{transactions:(s=t.transactions)==null?void 0:s.map(r=>{if(typeof r=="string")return r;const n=J(r);return n.typeHex==="0x7e"&&(n.isSystemTx=r.isSystemTx,n.mint=r.mint?i(r.mint):void 0,n.sourceHash=r.sourceHash,n.type="deposit"),n}),stateRoot:t.stateRoot}}}),transaction:V({format(t){const a={};return t.type==="0x7e"&&(a.isSystemTx=t.isSystemTx,a.mint=t.mint?i(t.mint):void 0,a.sourceHash=t.sourceHash,a.type="deposit"),a}}),transactionReceipt:ee({format(t){return{l1GasPrice:t.l1GasPrice?i(t.l1GasPrice):null,l1GasUsed:t.l1GasUsed?i(t.l1GasUsed):null,l1Fee:t.l1Fee?i(t.l1Fee):null,l1FeeScalar:t.l1FeeScalar?Number(t.l1FeeScalar):null}}})};function Ce(t,a){return Te(t)?ve(t):X(t,a)}const we={transaction:Ce};function ve(t){Ue(t);const{sourceHash:a,data:s,from:r,gas:n,isSystemTx:c,mint:p,to:m,value:d}=t,b=[a,r,m??"0x",p?o(p):"0x",d?o(d):"0x",n?o(n):"0x",c?"0x1":"0x",s??"0x"];return q(["0x7e",j(b)])}function Te(t){return t.type==="deposit"||typeof t.sourceHash<"u"}function Ue(t){const{from:a,to:s}=t;if(a&&!k(a))throw new E({address:a});if(s&&!k(s))throw new E({address:s})}const l={contracts:Ee,formatters:Z,serializers:we},T=1,tt=e({...l,id:888888888,name:"Ancient8",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.ancient8.gg"]}},blockExplorers:{default:{name:"Ancient8 explorer",url:"https://scan.ancient8.gg",apiUrl:"https://scan.ancient8.gg/api"}},contracts:{...l.contracts,l2OutputOracle:{[T]:{address:"0xB09DC08428C8b4EFB4ff9C0827386CDF34277996"}},portal:{[T]:{address:"0x639F2AECE398Aa76b07e59eF6abe2cFe32bacb68",blockCreated:19070571}},l1StandardBridge:{[T]:{address:"0xd5e3eDf5b68135D559D572E26bF863FBC1950033",blockCreated:19070571}}},sourceId:T}),U=11155111,at=e({...l,id:28122024,name:"Ancient8 Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpcv2-testnet.ancient8.gg"]}},blockExplorers:{default:{name:"Ancient8 Celestia Testnet explorer",url:"https://scanv2-testnet.ancient8.gg",apiUrl:"https://scanv2-testnet.ancient8.gg/api"}},contracts:{...l.contracts,l2OutputOracle:{[U]:{address:"0x942fD5017c0F60575930D8574Eaca13BEcD6e1bB"}},portal:{[U]:{address:"0xfa1d9E26A6aCD7b22115D27572c1221B9803c960",blockCreated:4972908}},l1StandardBridge:{[U]:{address:"0xF6Bc0146d3c74D48306e79Ae134A260E418C9335",blockCreated:4972908}}},sourceId:U}),rt=e({id:31337,name:"Anvil",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"],webSocket:["ws://127.0.0.1:8545"]}}}),st=e({id:3993,name:"APEX Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.apexlayer.xyz"]}},blockExplorers:{default:{name:"Blockscout",url:"https://exp-testnet.apexlayer.xyz",apiUrl:"https://exp-testnet.apexlayer.xyz/api"}},contracts:{multicall3:{address:"0xf7642be33a6b18D16a995657adb5a68CD0438aE2",blockCreated:283775}},testnet:!0}),nt=e({id:42161,name:"Arbitrum One",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://arbiscan.io",apiUrl:"https://api.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7654707}}}),lt=e({id:421613,name:"Arbitrum Goerli",nativeCurrency:{name:"Arbitrum Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://goerli-rollup.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://goerli.arbiscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:88114}},testnet:!0}),ot=e({id:42170,name:"Arbitrum Nova",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://nova.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://nova.arbiscan.io",apiUrl:"https://api-nova.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1746963}}}),ct=e({id:592,name:"Astar",network:"astar-mainnet",nativeCurrency:{name:"Astar",symbol:"ASTR",decimals:18},rpcUrls:{default:{http:["https://astar.api.onfinality.io/public"]}},blockExplorers:{default:{name:"Astar Subscan",url:"https://astar.subscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:761794}},testnet:!1}),it=e({id:3776,name:"Astar zkEVM",network:"AstarZkEVM",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.startale.com/astar-zkevm"]}},blockExplorers:{default:{name:"Astar zkEVM Explorer",url:"https://astar-zkevm.explorer.startale.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:93528}},testnet:!1}),pt=e({id:6038361,name:"Astar zkEVM Testnet zKyoto",network:"zKyoto",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.startale.com/zkyoto"]}},blockExplorers:{default:{name:"zKyoto Explorer",url:"https://zkyoto.explorer.startale.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:196153}},testnet:!0}),dt=e({id:421614,name:"Arbitrum Sepolia",nativeCurrency:{name:"Arbitrum Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rollup.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://sepolia.arbiscan.io",apiUrl:"https://api-sepolia.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:81930}},testnet:!0}),mt=e({id:463,name:"Areon Network",nativeCurrency:{decimals:18,name:"AREA",symbol:"AREA"},rpcUrls:{default:{http:["https://mainnet-rpc.areon.network"],webSocket:["wss://mainnet-ws.areon.network"]}},blockExplorers:{default:{name:"Areonscan",url:"https://areonscan.com"}},testnet:!1}),ut=e({id:462,name:"Areon Network Testnet",nativeCurrency:{decimals:18,name:"TAREA",symbol:"TAREA"},rpcUrls:{default:{http:["https://testnet-rpc.areon.network"],webSocket:["wss://testnet-ws.areon.network"]}},blockExplorers:{default:{name:"Areonscan",url:"https://areonscan.com"}},testnet:!0}),bt=e({id:1313161554,name:"Aurora",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.aurora.dev"]}},blockExplorers:{default:{name:"Aurorascan",url:"https://aurorascan.dev",apiUrl:"https://aurorascan.dev/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:62907816}}}),ht=e({id:1313161555,name:"Aurora Testnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://testnet.aurora.dev"]}},blockExplorers:{default:{name:"Aurorascan",url:"https://testnet.aurorascan.dev",apiUrl:"https://testnet.aurorascan.dev/api"}},testnet:!0}),kt=e({id:205205,name:"Auroria Testnet",network:"auroria",nativeCurrency:{name:"Auroria Stratis",symbol:"tSTRAX",decimals:18},rpcUrls:{default:{http:["https://auroria.rpc.stratisevm.com"]}},blockExplorers:{default:{name:"Auroria Testnet Explorer",url:"https://auroria.explorer.stratisevm.com"}},testnet:!0}),xt=e({id:43114,name:"Avalanche",nativeCurrency:{decimals:18,name:"Avalanche",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax.network/ext/bc/C/rpc"]}},blockExplorers:{default:{name:"SnowScan",url:"https://snowscan.xyz",apiUrl:"https://api.snowscan.xyz/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11907934}}}),ft=e({id:43113,name:"Avalanche Fuji",nativeCurrency:{decimals:18,name:"Avalanche Fuji",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax-test.network/ext/bc/C/rpc"]}},blockExplorers:{default:{name:"SnowScan",url:"https://testnet.snowscan.xyz",apiUrl:"https://api-testnet.snowscan.xyz"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7096959}},testnet:!0}),yt=e({id:5165,network:"bahamut",name:"Bahamut",nativeCurrency:{name:"Fasttoken",symbol:"FTN",decimals:18},rpcUrls:{default:{http:["https://rpc1.bahamut.io","https://bahamut-rpc.publicnode.com","https://rpc2.bahamut.io"],webSocket:["wss://ws1.sahara.bahamutchain.com","wss://bahamut-rpc.publicnode.com","wss://ws2.sahara.bahamutchain.com"]},public:{http:["https://rpc1.bahamut.io","https://bahamut-rpc.publicnode.com","https://rpc2.bahamut.io"],webSocket:["wss://ws1.sahara.bahamutchain.com","wss://bahamut-rpc.publicnode.com","wss://ws2.sahara.bahamutchain.com"]}},blockExplorers:{default:{name:"Ftnscan",url:"https://www.ftnscan.com",apiUrl:"https://www.ftnscan.com/api"}}}),g=1,Et=e({...l,id:8453,name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://basescan.org",apiUrl:"https://api.basescan.org/api"}},contracts:{...l.contracts,l2OutputOracle:{[g]:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{[g]:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:17482143}},l1StandardBridge:{[g]:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:17482143}}},sourceId:g}),S=5,Ct=e({...l,id:84531,name:"Base Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://goerli.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://goerli.basescan.org",apiUrl:"https://goerli.basescan.org/api"}},contracts:{...l.contracts,l2OutputOracle:{[S]:{address:"0x2A35891ff30313CcFa6CE88dcf3858bb075A2298"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1376988},portal:{[S]:{address:"0xe93c8cD0D409341205A592f8c4Ac1A5fe5585cfA"}},l1StandardBridge:{[S]:{address:"0xfA6D8Ee5BE770F84FC001D098C4bD604Fe01284a"}}},testnet:!0,sourceId:S}),A=11155111,wt=e({...l,id:84532,network:"base-sepolia",name:"Base Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://sepolia.basescan.org",apiUrl:"https://api-sepolia.basescan.org/api"}},contracts:{...l.contracts,l2OutputOracle:{[A]:{address:"0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254"}},portal:{[A]:{address:"0x49f53e41452c74589e85ca1677426ba426459e85",blockCreated:4446677}},l1StandardBridge:{[A]:{address:"0xfd0Bf71F60660E2f608ed56e1659C450eB113120",blockCreated:4446677}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1059647}},testnet:!0,sourceId:A}),vt=e({id:4337,name:"Beam",network:"beam",nativeCurrency:{decimals:18,name:"Beam",symbol:"BEAM"},rpcUrls:{public:{http:["https://build.onbeam.com/rpc"],webSocket:["wss://build.onbeam.com/ws"]},default:{http:["https://build.onbeam.com/rpc"],webSocket:["wss://build.onbeam.com/ws"]}},blockExplorers:{default:{name:"Beam Explorer",url:"https://subnets.avax.network/beam"}},contracts:{multicall3:{address:"0x4956f15efdc3dc16645e90cc356eafa65ffc65ec",blockCreated:1}}}),Tt=e({id:13337,name:"Beam Testnet",network:"beam",nativeCurrency:{decimals:18,name:"Beam",symbol:"BEAM"},rpcUrls:{public:{http:["https://build.onbeam.com/rpc/testnet"],webSocket:["wss://build.onbeam.com/ws/testnet"]},default:{http:["https://build.onbeam.com/rpc/testnet"],webSocket:["wss://build.onbeam.com/ws/testnet"]}},blockExplorers:{default:{name:"Beam Explorer",url:"https://subnets-test.avax.network/beam"}},contracts:{multicall3:{address:"0x9bf49b704ee2a095b95c1f2d4eb9010510c41c9e",blockCreated:3}},testnet:!0}),Ut=e({id:641230,name:"Bear Network Chain Mainnet",nativeCurrency:{decimals:18,name:"BearNetworkChain",symbol:"BRNKC"},rpcUrls:{default:{http:["https://brnkc-mainnet.bearnetwork.net"]}},blockExplorers:{default:{name:"BrnkScan",url:"https://brnkscan.bearnetwork.net",apiUrl:"https://brnkscan.bearnetwork.net/api"}}}),gt=e({id:751230,name:"Bear Network Chain Testnet",nativeCurrency:{decimals:18,name:"tBRNKC",symbol:"tBRNKC"},rpcUrls:{default:{http:["https://brnkc-test.bearnetwork.net"]}},blockExplorers:{default:{name:"BrnkTestScan",url:"https://brnktest-scan.bearnetwork.net",apiUrl:"https://brnktest-scan.bearnetwork.net/api"}},testnet:!0}),St=e({id:80085,name:"Berachain Artio",nativeCurrency:{decimals:18,name:"BERA Token",symbol:"BERA"},rpcUrls:{default:{http:["https://artio.rpc.berachain.com"]}},blockExplorers:{default:{name:"Berachain",url:"https://artio.beratrail.io"}},testnet:!0}),At=e({id:11501,name:"BEVM Mainnet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet-1.bevm.io"]}},blockExplorers:{default:{name:"Bevmscan",url:"https://scan-mainnet.bevm.io",apiUrl:"https://scan-mainnet-api.bevm.io/api"}}}),Bt=e({id:199,name:"BitTorrent",network:"bittorrent-chain-mainnet",nativeCurrency:{name:"BitTorrent",symbol:"BTT",decimals:18},rpcUrls:{default:{http:["https://rpc.bittorrentchain.io"]},public:{http:["https://rpc.bittorrentchain.io"]}},blockExplorers:{default:{name:"Bttcscan",url:"https://bttcscan.com",apiUrl:"https://api.bttcscan.com/api"}}}),Ft=e({id:1028,name:"BitTorrent Chain Testnet",network:"bittorrent-chain-testnet",nativeCurrency:{name:"BitTorrent",symbol:"BTT",decimals:18},rpcUrls:{default:{http:["https://testrpc.bittorrentchain.io"]},public:{http:["https://testrpc.bittorrentchain.io"]}},blockExplorers:{default:{name:"Bttcscan",url:"https://testnet.bttcscan.com",apiUrl:"https://testnet.bttcscan.com/api"}},testnet:!0}),ge=1,Mt=e({id:81457,name:"Blast",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.blast.io"]}},blockExplorers:{default:{name:"Blastscan",url:"https://blastscan.io",apiUrl:"https://api.blastscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:212929}},sourceId:ge}),Se=11155111,zt=e({id:168587773,name:"Blast Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.blast.io"]}},blockExplorers:{default:{name:"Blastscan",url:"https://sepolia.blastscan.io",apiUrl:"https://api-sepolia.blastscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:756690}},testnet:!0,sourceId:Se}),Dt=e({id:60808,name:"BOB",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.gobob.xyz"],webSocket:["wss://rpc.gobob.xyz"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.gobob.xyz"}},contracts:{multicall3:{address:"0x63f8279bccDb75c0F38e0CD6B6A0c72a0a760FF9",blockCreated:457045}},testnet:!1}),It=e({id:288,name:"Boba Network",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.boba.network"]}},blockExplorers:{default:{name:"BOBAScan",url:"https://bobascan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:446859}}}),_t=e({id:1039,name:"Bronos",nativeCurrency:{decimals:18,name:"BRO",symbol:"BRO"},rpcUrls:{default:{http:["https://evm.bronos.org"]}},blockExplorers:{default:{name:"BronoScan",url:"https://broscan.bronos.org"}}}),Ht=e({id:1038,name:"Bronos Testnet",nativeCurrency:{decimals:18,name:"Bronos Coin",symbol:"tBRO"},rpcUrls:{default:{http:["https://evm-testnet.bronos.org"]}},blockExplorers:{default:{name:"BronoScan",url:"https://tbroscan.bronos.org"}},testnet:!0}),Pt=e({id:56,name:"BNB Smart Chain",nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://rpc.ankr.com/bsc"]}},blockExplorers:{default:{name:"BscScan",url:"https://bscscan.com",apiUrl:"https://api.bscscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15921452}}}),Ot=e({id:97,name:"Binance Smart Chain Testnet",nativeCurrency:{decimals:18,name:"BNB",symbol:"tBNB"},rpcUrls:{default:{http:["https://data-seed-prebsc-1-s1.bnbchain.org:8545"]}},blockExplorers:{default:{name:"BscScan",url:"https://testnet.bscscan.com",apiUrl:"https://testnet.bscscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:17422483}},testnet:!0}),Lt=e({id:1017,name:"BNB Greenfield Chain",nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://greenfield-chain.bnbchain.org"]}},blockExplorers:{default:{name:"BNB Greenfield Mainnet Scan",url:"https://greenfieldscan.com"}},testnet:!1}),Nt=e({id:200901,name:"Bitlayer",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.bitlayer.org","https://rpc.bitlayer-rpc.com","https://rpc.ankr.com/bitlayer"],webSocket:["wss://ws.bitlayer.org","wss://ws.bitlayer-rpc.com"]}},blockExplorers:{default:{name:"btrscan",url:"https://www.btrscan.com",apiUrl:"https://www.btrscan.com/apis"}}}),Rt=e({id:200810,name:"Bitlayer Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.bitlayer.org"],webSocket:["wss://testnet-ws.bitlayer.org","wss://testnet-ws.bitlayer-rpc.com"]}},blockExplorers:{default:{name:"btrscan",url:"https://testnet-scan.bitlayer.org",apiUrl:"https://testnet-scan.bitlayer.org/apis"}}}),Kt=e({id:4999,name:"BlackFort Exchange Network",nativeCurrency:{name:"BlackFort Token",symbol:"BXN",decimals:18},rpcUrls:{default:{http:["https://mainnet.blackfort.network/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.blackfort.network",apiUrl:"https://explorer.blackfort.network/api"}}}),Gt=e({id:4777,name:"BlackFort Exchange Network Testnet",nativeCurrency:{name:"BlackFort Testnet Token",symbol:"TBXN",decimals:18},rpcUrls:{default:{http:["https://testnet.blackfort.network/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet-explorer.blackfort.network",apiUrl:"https://testnet-explorer.blackfort.network/api"}},testnet:!0}),Vt=e({id:7700,name:"Canto",nativeCurrency:{decimals:18,name:"Canto",symbol:"CANTO"},rpcUrls:{default:{http:["https://canto.gravitychain.io"]}},blockExplorers:{default:{name:"Tuber.Build (Blockscout)",url:"https://tuber.build"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:2905789}}}),Ae={estimateFeesPerGas:async t=>{var r;if(!((r=t.request)!=null&&r.feeCurrency))return null;const[a,s]=await Promise.all([Be(t.client,t.request.feeCurrency),Fe(t.client,t.request.feeCurrency)]);return{maxFeePerGas:a,maxPriorityFeePerGas:s}}};async function Be(t,a){const s=await t.request({method:"eth_gasPrice",params:[a]});return BigInt(s)}async function Fe(t,a){const s=await t.request({method:"eth_maxPriorityFeePerGas",params:[a]});return BigInt(s)}function re(t){return t===0||t===0n||t===void 0||t===null||t==="0"||t===""||typeof t=="string"&&(W(t).toLowerCase()==="0x"||W(t).toLowerCase()==="0x00")}function w(t){return!re(t)}function Me(t){return typeof t.maxFeePerGas<"u"&&typeof t.maxPriorityFeePerGas<"u"}function se(t){return t.type==="cip64"?!0:Me(t)&&w(t.feeCurrency)}const ze={block:G({exclude:["difficulty","gasLimit","mixHash","nonce","uncles"],format(t){var s;const a=(s=t.transactions)==null?void 0:s.map(r=>typeof r=="string"?r:{...J(r),feeCurrency:r.feeCurrency,...r.type!=="0x7b"?{gatewayFee:r.gatewayFee?i(r.gatewayFee):null,gatewayFeeRecipient:r.gatewayFeeRecipient||null}:{}});return{randomness:t.randomness,transactions:a}}}),transaction:V({format(t){const a={feeCurrency:t.feeCurrency};return t.type==="0x7b"?a.type="cip64":(t.type==="0x7c"&&(a.type="cip42"),a.gatewayFee=t.gatewayFee?i(t.gatewayFee):null,a.gatewayFeeRecipient=t.gatewayFeeRecipient),a}}),transactionRequest:te({format(t){const a={feeCurrency:t.feeCurrency};return se(t)&&(a.type="0x7b"),a}})};function De(t,a){return se(t)?_e(t,a):X(t,a)}const Ie={transaction:De};function _e(t,a){Pe(t);const{chainId:s,gas:r,nonce:n,to:c,value:p,maxFeePerGas:m,maxPriorityFeePerGas:d,accessList:b,feeCurrency:f,data:y}=t,h=[o(s),n?o(n):"0x",d?o(d):"0x",m?o(m):"0x",r?o(r):"0x",c??"0x",p?o(p):"0x",y??"0x",de(b),f,...me(t,a)];return q(["0x7b",j(h)])}const He=2n**256n-1n;function Pe(t){const{chainId:a,maxPriorityFeePerGas:s,gasPrice:r,maxFeePerGas:n,to:c,feeCurrency:p}=t;if(a<=0)throw new ae({chainId:a});if(c&&!k(c))throw new E({address:c});if(r)throw new u("`gasPrice` is not a valid CIP-64 Transaction attribute.");if(w(n)&&n>He)throw new ue({maxFeePerGas:n});if(w(s)&&w(n)&&s>n)throw new be({maxFeePerGas:n,maxPriorityFeePerGas:s});if(w(p)&&!k(p))throw new u("`feeCurrency` MUST be a token address for CIP-64 transactions.");if(re(p))throw new u("`feeCurrency` must be provided for CIP-64 transactions.")}const ne={formatters:ze,serializers:Ie,fees:Ae},Xt=e({...ne,id:42220,name:"Celo",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://forno.celo.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://celoscan.io",apiUrl:"https://api.celoscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:13112599}},testnet:!1}),qt=e({...ne,id:44787,name:"Alfajores",nativeCurrency:{decimals:18,name:"CELO",symbol:"A-CELO"},rpcUrls:{default:{http:["https://alfajores-forno.celo-testnet.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://explorer.celo.org/alfajores",apiUrl:"https://explorer.celo.org/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:14569001}},testnet:!0}),jt=e({id:88888,name:"Chiliz Chain",network:"chiliz-chain",nativeCurrency:{decimals:18,name:"CHZ",symbol:"CHZ"},rpcUrls:{default:{http:["https://rpc.ankr.com/chiliz","https://chiliz-rpc.publicnode.com"]}},blockExplorers:{default:{name:"Chiliz Explorer",url:"https://scan.chiliz.com",apiUrl:"https://scan.chiliz.com/api"}}}),Zt=e({id:61,name:"Ethereum Classic",nativeCurrency:{decimals:18,name:"ETC",symbol:"ETC"},rpcUrls:{default:{http:["https://etc.rivet.link"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.com/etc/mainnet"}}}),$t=e({id:1030,name:"Conflux eSpace",nativeCurrency:{name:"Conflux",symbol:"CFX",decimals:18},rpcUrls:{default:{http:["https://evm.confluxrpc.org"],webSocket:["wss://evm.confluxrpc.org/ws"]}},blockExplorers:{default:{name:"ConfluxScan",url:"https://evm.confluxscan.io"}},contracts:{multicall3:{address:"0xEFf0078910f638cd81996cc117bccD3eDf2B072F",blockCreated:68602935}}}),Wt=e({id:71,name:"Conflux eSpace Testnet",network:"cfx-espace-testnet",testnet:!0,nativeCurrency:{name:"Conflux",symbol:"CFX",decimals:18},rpcUrls:{default:{http:["https://evmtestnet.confluxrpc.org"],webSocket:["wss://evmtestnet.confluxrpc.org/ws"]}},blockExplorers:{default:{name:"ConfluxScan",url:"https://evmtestnet.confluxscan.io"}},contracts:{multicall3:{address:"0xEFf0078910f638cd81996cc117bccD3eDf2B072F",blockCreated:117499050}}}),Qt=e({id:1116,name:"Core Dao",nativeCurrency:{decimals:18,name:"Core",symbol:"CORE"},rpcUrls:{default:{http:["https://rpc.coredao.org"]}},blockExplorers:{default:{name:"CoreDao",url:"https://scan.coredao.org"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:11907934}},testnet:!1}),Yt=e({id:25,name:"Cronos Mainnet",nativeCurrency:{decimals:18,name:"Cronos",symbol:"CRO"},rpcUrls:{default:{http:["https://evm.cronos.org"]}},blockExplorers:{default:{name:"Cronos Explorer",url:"https://explorer.cronos.org",apiUrl:"https://explorer-api.cronos.org/mainnet/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1963112}}}),Jt=e({id:338,name:"Cronos Testnet",nativeCurrency:{decimals:18,name:"CRO",symbol:"tCRO"},rpcUrls:{default:{http:["https://evm-t3.cronos.org"]}},blockExplorers:{default:{name:"Cronos Explorer",url:"https://cronos.org/explorer/testnet3"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:10191251}},testnet:!0}),ea=e({id:3737,name:"Crossbell",nativeCurrency:{decimals:18,name:"CSB",symbol:"CSB"},rpcUrls:{default:{http:["https://rpc.crossbell.io"]}},blockExplorers:{default:{name:"CrossScan",url:"https://scan.crossbell.io",apiUrl:"https://scan.crossbell.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:38246031}}}),ta=e({id:7560,name:"Cyber",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://cyber.alt.technology"]}},blockExplorers:{default:{name:"Blockscout",url:"https://cyberscan.co",apiUrl:"https://cyberscan.co/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}}}),aa=e({id:111557560,name:"Cyber Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://cyber-testnet.alt.technology"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet.cyberscan.co",apiUrl:"https://testnet.cyberscan.co/api"}},contracts:{multicall3:{address:"0xffc391F0018269d4758AEA1a144772E8FB99545E",blockCreated:304545}},testnet:!0}),ra=e({id:46,name:"Darwinia Network",nativeCurrency:{decimals:18,name:"RING",symbol:"RING"},rpcUrls:{default:{http:["https://rpc.darwinia.network"],webSocket:["wss://rpc.darwinia.network"]}},blockExplorers:{default:{name:"Explorer",url:"https://darwinia.subscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:69420}}}),sa=e({id:1130,network:"defichain-evm",name:"DeFiChain EVM Mainnet",nativeCurrency:{name:"DeFiChain",symbol:"DFI",decimals:8},rpcUrls:{default:{http:["https://eth.mainnet.ocean.jellyfishsdk.com"]},public:{http:["https://eth.mainnet.ocean.jellyfishsdk.com"]}},blockExplorers:{default:{name:"DeFiScan",url:"https://meta.defiscan.live"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:137852}}}),na=e({id:1131,network:"defichain-evm-testnet",name:"DeFiChain EVM Testnet",nativeCurrency:{name:"DeFiChain",symbol:"DFI",decimals:8},rpcUrls:{default:{http:["https://eth.testnet.ocean.jellyfishsdk.com"]},public:{http:["https://eth.testnet.ocean.jellyfishsdk.com"]}},blockExplorers:{default:{name:"DeFiScan",url:"https://meta.defiscan.live/?network=TestNet"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:156462}},testnet:!0}),la=e({id:666666666,name:"Degen",nativeCurrency:{decimals:18,name:"Degen",symbol:"DEGEN"},rpcUrls:{default:{http:["https://rpc.degen.tips"],webSocket:["wss://rpc.degen.tips"]}},blockExplorers:{default:{name:"Degen Chain Explorer",url:"https://explorer.degen.tips",apiUrl:"https://explorer.degen.tips/api/v2"}}}),oa=e({id:53935,name:"DFK Chain",nativeCurrency:{decimals:18,name:"Jewel",symbol:"JEWEL"},rpcUrls:{default:{http:["https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"]}},blockExplorers:{default:{name:"DFKSubnetScan",url:"https://subnets.avax.network/defi-kingdoms"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14790551}}}),ca=e({id:53457,name:"DODOchain Testnet",nativeCurrency:{decimals:18,name:"DODO",symbol:"DODO"},rpcUrls:{default:{http:["https://dodochain-testnet.alt.technology"],webSocket:["wss://dodochain-testnet.alt.technology/ws"]}},blockExplorers:{default:{name:"DODOchain Testnet (Sepolia) Explorer",url:"https://testnet-scan.dodochain.com"}},testnet:!0}),ia=e({id:2e3,name:"Dogechain",nativeCurrency:{decimals:18,name:"Dogechain",symbol:"DC"},rpcUrls:{default:{http:["https://rpc.dogechain.dog"]}},blockExplorers:{default:{name:"DogeChainExplorer",url:"https://explorer.dogechain.dog",apiUrl:"https://explorer.dogechain.dog/api"}}}),pa=e({id:23451,name:"DreyerX Mainnet",nativeCurrency:{name:"DreyerX",symbol:"DRX",decimals:18},rpcUrls:{default:{http:["https://rpc.dreyerx.com"]}},blockExplorers:{default:{name:"DreyerX Scan",url:"https://scan.dreyerx.com"}}}),da=e({id:2026,name:"Edgeless Network",nativeCurrency:{name:"Edgeless Wrapped ETH",symbol:"EwETH",decimals:18},rpcUrls:{default:{http:["https://rpc.edgeless.network/http"],webSocket:["wss://rpc.edgeless.network/ws"]}},blockExplorers:{default:{name:"Edgeless Explorer",url:"https://explorer.edgeless.network"}}}),ma=e({id:202,name:"Edgeless Testnet",nativeCurrency:{name:"Edgeless Wrapped ETH",symbol:"EwETH",decimals:18},rpcUrls:{default:{http:["https://edgeless-testnet.rpc.caldera.xyz/http"],webSocket:["wss://edgeless-testnet.rpc.caldera.xyz/ws"]}},blockExplorers:{default:{name:"Edgeless Testnet Explorer",url:"https://testnet.explorer.edgeless.network"}}}),ua=e({id:2021,name:"Edgeware EdgeEVM Mainnet",nativeCurrency:{decimals:18,name:"Edgeware",symbol:"EDG"},rpcUrls:{default:{http:["https://edgeware-evm.jelliedowl.net"]}},blockExplorers:{default:{name:"Edgscan by Bharathcoorg",url:"https://edgscan.live",apiUrl:"https://edgscan.live/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:18117872}}}),ba=e({id:2022,name:"Beresheet BereEVM Testnet",nativeCurrency:{decimals:18,name:"Testnet EDG",symbol:"tEDG"},rpcUrls:{default:{http:["https://beresheet-evm.jelliedowl.net"]}},blockExplorers:{default:{name:"Edgscan by Bharathcoorg",url:"https://testnet.edgscan.live",apiUrl:"https://testnet.edgscan.live/api"}}}),ha=e({id:7332,name:"Horizen EON",nativeCurrency:{decimals:18,name:"ZEN",symbol:"ZEN"},rpcUrls:{default:{http:["https://eon-rpc.horizenlabs.io/ethv1"]}},blockExplorers:{default:{name:"EON Explorer",url:"https://eon-explorer.horizenlabs.io"}},contracts:{}}),ka=e({id:17777,name:"EOS EVM",nativeCurrency:{decimals:18,name:"EOS",symbol:"EOS"},rpcUrls:{default:{http:["https://api.evm.eosnetwork.com"]}},blockExplorers:{default:{name:"EOS EVM Explorer",url:"https://explorer.evm.eosnetwork.com",apiUrl:"https://explorer.evm.eosnetwork.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7943933}}}),xa=e({id:15557,name:"EOS EVM Testnet",nativeCurrency:{decimals:18,name:"EOS",symbol:"EOS"},rpcUrls:{default:{http:["https://api.testnet.evm.eosnetwork.com"]}},blockExplorers:{default:{name:"EOS EVM Testnet Explorer",url:"https://explorer.testnet.evm.eosnetwork.com",apiUrl:"https://explorer.testnet.evm.eosnetwork.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:9067940}},testnet:!0}),fa=e({id:128123,name:"Etherlink Testnet",nativeCurrency:{decimals:18,name:"Tez",symbol:"XTZ"},rpcUrls:{default:{http:["https://node.ghostnet.etherlink.com"]}},blockExplorers:{default:{name:"Etherlink Testnet",url:"https://testnet-explorer.etherlink.com"}},testnet:!0}),ya=e({id:9001,name:"Evmos",nativeCurrency:{decimals:18,name:"Evmos",symbol:"EVMOS"},rpcUrls:{default:{http:["https://eth.bd.evmos.org:8545"]}},blockExplorers:{default:{name:"Evmos Block Explorer",url:"https://escan.live"}}}),Ea=e({id:9e3,name:"Evmos Testnet",nativeCurrency:{decimals:18,name:"Evmos",symbol:"EVMOS"},rpcUrls:{default:{http:["https://eth.bd.evmos.dev:8545"]}},blockExplorers:{default:{name:"Evmos Testnet Block Explorer",url:"https://evm.evmos.dev/"}}}),Ca=e({id:1994,name:"Ekta",nativeCurrency:{decimals:18,name:"EKTA",symbol:"EKTA"},rpcUrls:{default:{http:["https://main.ekta.io"]}},blockExplorers:{default:{name:"Ektascan",url:"https://ektascan.io",apiUrl:"https://ektascan.io/api"}}}),wa=e({id:1004,name:"Ekta Testnet",nativeCurrency:{decimals:18,name:"EKTA",symbol:"EKTA"},rpcUrls:{default:{http:["https://test.ekta.io:8545"]}},blockExplorers:{default:{name:"Test Ektascan",url:"https://test.ektascan.io",apiUrl:"https://test.ektascan.io/api"}},testnet:!0}),va=e({id:250,name:"Fantom",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://rpc.ankr.com/fantom"]}},blockExplorers:{default:{name:"FTMScan",url:"https://ftmscan.com",apiUrl:"https://api.ftmscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:33001987}}}),Ta=e({id:64240,name:"Fantom Sonic Open Testnet",network:"fantom-sonic-testnet",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://rpcapi.sonic.fantom.network"]}},blockExplorers:{default:{name:"Fantom Sonic Open Testnet Explorer",url:"https://public-sonic.fantom.network"}},testnet:!0}),Ua=e({id:4002,name:"Fantom Testnet",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://rpc.testnet.fantom.network"]}},blockExplorers:{default:{name:"FTMScan",url:"https://testnet.ftmscan.com",apiUrl:"https://testnet.ftmscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:8328688}}}),ga=e({id:12306,name:"Fibo Chain",nativeCurrency:{decimals:18,name:"fibo",symbol:"FIBO"},rpcUrls:{default:{http:["https://network.hzroc.art"]}},blockExplorers:{default:{name:"FiboScan",url:"https://scan.fibochain.org"}}}),Sa=e({id:314,name:"Filecoin Mainnet",nativeCurrency:{decimals:18,name:"filecoin",symbol:"FIL"},rpcUrls:{default:{http:["https://api.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filfox",url:"https://filfox.info/en"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3328594}}}),Aa=e({id:314159,name:"Filecoin Calibration",nativeCurrency:{decimals:18,name:"testnet filecoin",symbol:"tFIL"},rpcUrls:{default:{http:["https://api.calibration.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filscan",url:"https://calibration.filscan.io"}},testnet:!0}),Ba=e({id:3141,name:"Filecoin Hyperspace",nativeCurrency:{decimals:18,name:"testnet filecoin",symbol:"tFIL"},rpcUrls:{default:{http:["https://api.hyperspace.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filfox",url:"https://hyperspace.filfox.info/en"}},testnet:!0}),Fa=e({id:14,name:"Flare Mainnet",nativeCurrency:{decimals:18,name:"flare",symbol:"FLR"},rpcUrls:{default:{http:["https://flare-api.flare.network/ext/C/rpc"]}},blockExplorers:{default:{name:"Flare Explorer",url:"https://flare-explorer.flare.network",apiUrl:"https://flare-explorer.flare.network/api"}}}),Ma=e({id:114,name:"Coston2",nativeCurrency:{decimals:18,name:"coston2flare",symbol:"C2FLR"},rpcUrls:{default:{http:["https://coston2-api.flare.network/ext/C/rpc"]}},blockExplorers:{default:{name:"Coston2 Explorer",url:"https://coston2-explorer.flare.network",apiUrl:"https://coston2-explorer.flare.network/api"}},testnet:!0}),za=e({id:646,name:"FlowEVM Previewnet",nativeCurrency:{decimals:18,name:"Flow",symbol:"FLOW"},rpcUrls:{default:{http:["https://previewnet.evm.nodes.onflow.org"]}},blockExplorers:{default:{name:"Previewnet Explorer",url:"https://previewnet.flowdiver.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6205}}}),Da=e({id:747,name:"FlowEVM Mainnet",nativeCurrency:{decimals:18,name:"Flow",symbol:"FLOW"},rpcUrls:{default:{http:["https://mainnet.evm.nodes.onflow.org"]}},blockExplorers:{default:{name:"Mainnet Explorer",url:"https://flowdiver.io"}}}),Ia=e({id:545,name:"FlowEVM Testnet",nativeCurrency:{decimals:18,name:"Flow",symbol:"FLOW"},rpcUrls:{default:{http:["https://testnet.evm.nodes.onflow.org"]}},blockExplorers:{default:{name:"Flow Diver",url:"https://testnet.flowdiver.io"}}}),_a=e({id:31337,name:"Foundry",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"],webSocket:["ws://127.0.0.1:8545"]}}}),B=1,Ha=e({...l,id:252,name:"Fraxtal",nativeCurrency:{name:"Frax Ether",symbol:"frxETH",decimals:18},rpcUrls:{default:{http:["https://rpc.frax.com"]}},blockExplorers:{default:{name:"fraxscan",url:"https://fraxscan.com",apiUrl:"https://api.fraxscan.com/api"}},contracts:{...l.contracts,l2OutputOracle:{[B]:{address:"0x66CC916Ed5C6C2FA97014f7D1cD141528Ae171e4"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[B]:{address:"0x36cb65c1967A0Fb0EEE11569C51C2f2aA1Ca6f6D",blockCreated:19135323}},l1StandardBridge:{[B]:{address:"0x34C0bD5877A5Ee7099D0f5688D65F4bB9158BDE2",blockCreated:19135323}}},sourceId:B}),F=17e3,Pa=e({...l,id:2522,name:"Fraxtal Testnet",nativeCurrency:{name:"Frax Ether",symbol:"frxETH",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.frax.com"]}},blockExplorers:{default:{name:"fraxscan testnet",url:"https://holesky.fraxscan.com",apiUrl:"https://api-holesky.fraxscan.com/api"}},contracts:{...l.contracts,l2OutputOracle:{[F]:{address:"0x715EA64DA13F4d0831ece4Ad3E8c1aa013167F32"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[F]:{address:"0xB9c64BfA498d5b9a8398Ed6f46eb76d90dE5505d",blockCreated:318416}},l1StandardBridge:{[F]:{address:"0x0BaafC217162f64930909aD9f2B27125121d6332",blockCreated:318416}}},sourceId:F}),Oe=11155111,Oa=e({...l,id:3397901,network:"funkiSepolia",name:"Funki Sepolia Sandbox",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://funki-testnet.alt.technology"]}},blockExplorers:{default:{name:"Funki Sepolia Sandbox Explorer",url:"https://sepolia-sandbox.funkichain.com/"}},testnet:!0,contracts:{...l.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1620204}},sourceId:Oe}),La=e({id:122,name:"Fuse",nativeCurrency:{name:"Fuse",symbol:"FUSE",decimals:18},rpcUrls:{default:{http:["https://rpc.fuse.io"]}},blockExplorers:{default:{name:"Fuse Explorer",url:"https://explorer.fuse.io",apiUrl:"https://explorer.fuse.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:16146628}}}),Na=e({id:123,name:"Fuse Sparknet",nativeCurrency:{name:"Spark",symbol:"SPARK",decimals:18},rpcUrls:{default:{http:["https://rpc.fusespark.io"]}},blockExplorers:{default:{name:"Sparkent Explorer",url:"https://explorer.fusespark.io",apiUrl:"https://explorer.fusespark.io/api"}}}),Ra=e({id:4689,name:"IoTeX",nativeCurrency:{decimals:18,name:"IoTeX",symbol:"IOTX"},rpcUrls:{default:{http:["https://babel-api.mainnet.iotex.io"],webSocket:["wss://babel-api.mainnet.iotex.io"]}},blockExplorers:{default:{name:"IoTeXScan",url:"https://iotexscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:22163670}}}),Ka=e({id:4690,name:"IoTeX Testnet",nativeCurrency:{decimals:18,name:"IoTeX",symbol:"IOTX"},rpcUrls:{default:{http:["https://babel-api.testnet.iotex.io"],webSocket:["wss://babel-api.testnet.iotex.io"]}},blockExplorers:{default:{name:"IoTeXScan",url:"https://testnet.iotexscan.io"}},testnet:!0}),Ga=e({id:8899,name:"JIBCHAIN L1",network:"jbc",nativeCurrency:{name:"JBC",symbol:"JBC",decimals:18},rpcUrls:{default:{http:["https://rpc-l1.jibchain.net"]},public:{http:["https://rpc-l1.jibchain.net"]}},blockExplorers:{default:{name:"Blockscout",url:"https://exp-l1.jibchain.net",apiUrl:"https://exp-l1.jibchain.net/api"}},contracts:{multicall3:{address:"0xc0C8C486D1466C57Efe13C2bf000d4c56F47CBdC",blockCreated:2299048}},testnet:!1}),Va=e({id:88991,name:"Jibchain Testnet",nativeCurrency:{name:"tJBC",symbol:"tJBC",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.jibchain.net"]}},blockExplorers:{default:{name:"Blockscout",url:"https://exp.testnet.jibchain.net",apiUrl:"https://exp.testnet.jibchain.net/api"}},contracts:{multicall3:{address:"0xa1a858ad9041B4741e620355a3F96B3c78e70ecE",blockCreated:32848}},testnet:!0}),Xa=e({id:686,name:"Karura",network:"karura",nativeCurrency:{name:"Karura",symbol:"KAR",decimals:18},rpcUrls:{public:{http:["https://eth-rpc-karura.aca-api.network"],webSocket:["wss://eth-rpc-karura.aca-api.network"]},default:{http:["https://eth-rpc-karura.aca-api.network"],webSocket:["wss://eth-rpc-karura.aca-api.network"]}},blockExplorers:{default:{name:"Karura Blockscout",url:"https://blockscout.karura.network",apiUrl:"https://blockscout.karura.network/api"}},testnet:!1}),qa=e({id:1663,name:"Horizen Gobi Testnet",nativeCurrency:{decimals:18,name:"Test ZEN",symbol:"tZEN"},rpcUrls:{default:{http:["https://gobi-testnet.horizenlabs.io/ethv1"]}},blockExplorers:{default:{name:"Gobi Explorer",url:"https://gobi-explorer.horizen.io"}},contracts:{},testnet:!0}),ja=e({id:5,name:"Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.ankr.com/eth_goerli"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.etherscan.io",apiUrl:"https://api-goerli.etherscan.io/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xfc4AC75C46C914aF5892d6d3eFFcebD7917293F1",blockCreated:10339206},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0}),Za=e({id:100,name:"Gnosis",nativeCurrency:{decimals:18,name:"Gnosis",symbol:"xDAI"},rpcUrls:{default:{http:["https://rpc.gnosischain.com"],webSocket:["wss://rpc.gnosischain.com/wss"]}},blockExplorers:{default:{name:"Gnosisscan",url:"https://gnosisscan.io",apiUrl:"https://api.gnosisscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:21022491}}}),$a=e({id:10200,name:"Gnosis Chiado",nativeCurrency:{decimals:18,name:"Gnosis",symbol:"xDAI"},rpcUrls:{default:{http:["https://rpc.chiadochain.net"],webSocket:["wss://rpc.chiadochain.net/wss"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.chiadochain.net",apiUrl:"https://blockscout.chiadochain.net/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:4967313}},testnet:!0}),Wa=e({id:31337,name:"Hardhat",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),Qa=e({id:16666e5,name:"Harmony One",nativeCurrency:{name:"Harmony",symbol:"ONE",decimals:18},rpcUrls:{default:{http:["https://rpc.ankr.com/harmony"]}},blockExplorers:{default:{name:"Harmony Explorer",url:"https://explorer.harmony.one"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:24185753}}}),Ya=e({id:11235,name:"HAQQ Mainnet",nativeCurrency:{decimals:18,name:"Islamic Coin",symbol:"ISLM"},rpcUrls:{default:{http:["https://rpc.eth.haqq.network"]}},blockExplorers:{default:{name:"HAQQ Explorer",url:"https://explorer.haqq.network",apiUrl:"https://explorer.haqq.network/api"}}}),Ja=e({id:54211,name:"HAQQ Testedge 2",nativeCurrency:{decimals:18,name:"Islamic Coin",symbol:"ISLMT"},rpcUrls:{default:{http:["https://rpc.eth.testedge2.haqq.network"]}},blockExplorers:{default:{name:"HAQQ Explorer",url:"https://explorer.testedge2.haqq.network",apiUrl:"https://explorer.testedge2.haqq.network/api"}}}),er=e({id:295,name:"Hedera Mainnet",network:"hedera-mainnet",nativeCurrency:{symbol:"HBAR",name:"HBAR",decimals:18},rpcUrls:{default:{http:["https://mainnet.hashio.io/api"]}},blockExplorers:{default:{name:"Hashscan",url:"https://hashscan.io/mainnet"}},testnet:!1}),tr=e({id:296,name:"Hedera Testnet",network:"hedera-testnet",nativeCurrency:{symbol:"HBAR",name:"HBAR",decimals:18},rpcUrls:{default:{http:["https://testnet.hashio.io/api"]}},blockExplorers:{default:{name:"Hashscan",url:"https://hashscan.io/testnet"}},testnet:!0}),ar=e({id:297,name:"Hedera Previewnet",network:"hedera-previewnet",nativeCurrency:{symbol:"HBAR",name:"HBAR",decimals:18},rpcUrls:{default:{http:["https://previewnet.hashio.io/api"]}},blockExplorers:{default:{name:"Hashscan",url:"https://hashscan.io/previewnet"}},testnet:!0}),rr=e({id:17e3,name:"Holesky",nativeCurrency:{name:"Holesky Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://ethereum-holesky-rpc.publicnode.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://holesky.etherscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:77},ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",blockCreated:801613},ensUniversalResolver:{address:"0xa6AC935D4971E3CD133b950aE053bECD16fE7f3b",blockCreated:973484}},testnet:!0}),sr=e({id:13371,name:"Immutable zkEVM",nativeCurrency:{decimals:18,name:"Immutable Coin",symbol:"IMX"},rpcUrls:{default:{http:["https://rpc.immutable.com"]}},blockExplorers:{default:{name:"Immutable Explorer",url:"https://explorer.immutable.com"}},contracts:{multicall3:{address:"0x236bdA4589e44e6850f5aC6a74BfCa398a86c6c0",blockCreated:4335972}}}),nr=e({id:13473,name:"Immutable zkEVM Testnet",nativeCurrency:{decimals:18,name:"Immutable Coin",symbol:"IMX"},rpcUrls:{default:{http:["https://rpc.testnet.immutable.com"]}},blockExplorers:{default:{name:"Immutable Testnet Explorer",url:"https://explorer.testnet.immutable.com/"}},contracts:{multicall3:{address:"0x2CC787Ed364600B0222361C4188308Fa8E68bA60",blockCreated:5977391}},testnet:!0}),lr=e({id:2525,name:"inEVM Mainnet",nativeCurrency:{decimals:18,name:"Injective",symbol:"INJ"},rpcUrls:{default:{http:["https://mainnet.rpc.inevm.com/http"]}},blockExplorers:{default:{name:"inEVM Explorer",url:"https://inevm.calderaexplorer.xyz",apiUrl:"https://inevm.calderaexplorer.xyz/api/v2"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:118606}}}),or=e({id:107107114116,name:"Kakarot Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rpc.kakarot.org"]}},blockExplorers:{default:{name:"Kakarot Scan",url:"https://sepolia.kakarotscan.org"}},testnet:!0}),cr=e({id:2222,name:"Kava EVM",network:"kava-mainnet",nativeCurrency:{name:"Kava",symbol:"KAVA",decimals:18},rpcUrls:{default:{http:["https://evm.kava.io"]}},blockExplorers:{default:{name:"Kava EVM Explorer",url:"https://kavascan.com",apiUrl:"https://kavascan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:3661165}},testnet:!1}),ir=e({id:2221,name:"Kava EVM Testnet",network:"kava-testnet",nativeCurrency:{name:"Kava",symbol:"KAVA",decimals:18},rpcUrls:{default:{http:["https://evm.testnet.kava.io"]}},blockExplorers:{default:{name:"Kava EVM Testnet Explorer",url:"https://testnet.kavascan.com/",apiUrl:"https://testnet.kavascan.com/api"}},contracts:{multicall3:{address:"0xDf1D724A7166261eEB015418fe8c7679BBEa7fd6",blockCreated:7242179}},testnet:!0}),pr=e({id:321,name:"KCC Mainnet",network:"KCC Mainnet",nativeCurrency:{decimals:18,name:"KCS",symbol:"KCS"},rpcUrls:{default:{http:["https://kcc-rpc.com"]},public:{http:["https://kcc-rpc.com"]}},blockExplorers:{default:{name:"KCC Explorer",url:"https://explorer.kcc.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11760430}},testnet:!1}),dr=e({id:8217,name:"Klaytn",nativeCurrency:{decimals:18,name:"Klaytn",symbol:"KLAY"},rpcUrls:{default:{http:["https://public-en-cypress.klaytn.net"]}},blockExplorers:{default:{name:"KlaytnScope",url:"https://scope.klaytn.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:96002415}}}),mr=e({id:1001,name:"Klaytn Baobab Testnet",network:"klaytn-baobab",nativeCurrency:{decimals:18,name:"Baobab Klaytn",symbol:"KLAY"},rpcUrls:{default:{http:["https://public-en-baobab.klaytn.net"]}},blockExplorers:{default:{name:"KlaytnScope",url:"https://baobab.klaytnscope.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:123390593}},testnet:!0}),ur=e({id:255,name:"Kroma",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://api.kroma.network"]}},blockExplorers:{default:{name:"Kroma Explorer",url:"https://blockscout.kroma.network",apiUrl:"https://blockscout.kroma.network/api"}},testnet:!1}),br=e({id:2358,name:"Kroma Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://api.sepolia.kroma.network"]}},blockExplorers:{default:{name:"Kroma Sepolia Explorer",url:"https://blockscout.sepolia.kroma.network",apiUrl:"https://blockscout.sepolia.kroma.network/api"}},testnet:!0}),hr=e({id:12324,name:"L3X Protocol",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet.l3x.com"],webSocket:["wss://rpc-mainnet.l3x.com"]}},blockExplorers:{default:{name:"L3X Mainnet Explorer",url:"https://explorer.l3x.com",apiUrl:"https://explorer.l3x.com/api/v2"}},testnet:!1}),kr=e({id:12325,name:"L3X Protocol Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.l3x.com"],webSocket:["wss://rpc-testnet.l3x.com"]}},blockExplorers:{default:{name:"L3X Testnet Explorer",url:"https://explorer-testnet.l3x.com",apiUrl:"https://explorer-testnet.l3x.com/api/v2"}},testnet:!0}),xr=e({id:1891,name:"LightLink Pegasus Testnet",network:"lightlink-pegasus",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://replicator.pegasus.lightlink.io/rpc/v1"]}},blockExplorers:{default:{name:"LightLink Pegasus Explorer",url:"https://pegasus.lightlink.io"}},testnet:!0}),fr=e({id:1890,name:"LightLink Phoenix Mainnet",network:"lightlink-phoenix",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://replicator.phoenix.lightlink.io/rpc/v1"]}},blockExplorers:{default:{name:"LightLink Phoenix Explorer",url:"https://phoenix.lightlink.io"}},testnet:!1}),yr=e({id:59144,name:"Linea Mainnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://lineascan.build",apiUrl:"https://api.lineascan.build/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:42}},testnet:!1}),Er=e({id:59140,name:"Linea Goerli Testnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.lineascan.build",apiUrl:"https://api-goerli.lineascan.build/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:498623}},testnet:!0}),Cr=e({id:59141,name:"Linea Sepolia Testnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.sepolia.linea.build"],webSocket:["wss://rpc.sepolia.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.lineascan.build",apiUrl:"https://api-sepolia.lineascan.build/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:227427}},testnet:!0}),wr=e({id:59140,name:"Linea Goerli Testnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.lineascan.build",apiUrl:"https://goerli.lineascan.build/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:498623}},testnet:!0}),$=50000n,Q=he*32n,le={block:G({format(t){var s;const a=(s=t.transactions)==null?void 0:s.map(r=>{var c;if(typeof r=="string")return r;const n=(c=le.transaction)==null?void 0:c.format(r);return n.typeHex==="0x71"?n.type="eip712":n.typeHex==="0xff"&&(n.type="priority"),n});return{l1BatchNumber:t.l1BatchNumber?i(t.l1BatchNumber):null,l1BatchTimestamp:t.l1BatchTimestamp?i(t.l1BatchTimestamp):null,transactions:a}}}),transaction:V({format(t){const a={};return t.type==="0x71"?a.type="eip712":t.type==="0xff"&&(a.type="priority"),{...a,l1BatchNumber:t.l1BatchNumber?i(t.l1BatchNumber):null,l1BatchTxIndex:t.l1BatchTxIndex?i(t.l1BatchTxIndex):null}}}),transactionReceipt:ee({format(t){return{l1BatchNumber:t.l1BatchNumber?i(t.l1BatchNumber):null,l1BatchTxIndex:t.l1BatchTxIndex?i(t.l1BatchTxIndex):null,logs:t.logs.map(a=>({...ke(a),l1BatchNumber:a.l1BatchNumber?i(a.l1BatchNumber):null,transactionLogIndex:fe(a.transactionLogIndex),logType:a.logType})),l2ToL1Logs:t.l2ToL1Logs.map(a=>({blockNumber:i(a.blockHash),blockHash:a.blockHash,l1BatchNumber:i(a.l1BatchNumber),transactionIndex:i(a.transactionIndex),shardId:i(a.shardId),isService:a.isService,sender:a.sender,key:a.key,value:a.value,transactionHash:a.transactionHash,logIndex:i(a.logIndex)}))}}}),transactionRequest:te({exclude:["customSignature","factoryDeps","gasPerPubdata","paymaster","paymasterInput"],format(t){return t.gasPerPubdata||t.paymaster&&t.paymasterInput||t.factoryDeps||t.customSignature?{eip712Meta:{...t.gasPerPubdata?{gasPerPubdata:o(t.gasPerPubdata)}:{gasPerPubdata:o($)},...t.paymaster&&t.paymasterInput?{paymasterParams:{paymaster:t.paymaster,paymasterInput:Array.from(R(t.paymasterInput))}}:{},...t.factoryDeps?{factoryDeps:t.factoryDeps.map(a=>Array.from(R(a)))}:{},...t.customSignature?{customSignature:Array.from(R(t.customSignature))}:{}},type:"0x71"}:{}}})};class Le extends u{constructor(){super(["Transaction is not an EIP712 transaction.","","Transaction must:",' - include `type: "eip712"`'," - include one of the following: `customSignature`, `paymaster`, `paymasterInput`, `gasPerPubdata`, `factoryDeps`"].join(` +import{C as e,e as G,i as J,h as V,j as ee,L as X,B as q,p as j,G as k,a as E,l as te,K as de,P as me,I as ae,F as ue,T as be,m as he,g as ke,J as xe}from"./number-C2Dy0LFJ.js";import{bf as i,aS as o,bo as W,a_ as u,bh as fe,b5 as R,b8 as K,bj as ye}from"./index-C6UBXeMY.js";const et=e({id:787,name:"Acala",network:"acala",nativeCurrency:{name:"Acala",symbol:"ACA",decimals:18},rpcUrls:{public:{http:["https://eth-rpc-acala.aca-api.network"],webSocket:["wss://eth-rpc-acala.aca-api.network"]},default:{http:["https://eth-rpc-acala.aca-api.network"],webSocket:["wss://eth-rpc-acala.aca-api.network"]}},blockExplorers:{default:{name:"Acala Blockscout",url:"https://blockscout.acala.network",apiUrl:"https://blockscout.acala.network/api"}},testnet:!1}),Ee={gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}},Z={block:G({format(t){var s;return{transactions:(s=t.transactions)==null?void 0:s.map(r=>{if(typeof r=="string")return r;const n=J(r);return n.typeHex==="0x7e"&&(n.isSystemTx=r.isSystemTx,n.mint=r.mint?i(r.mint):void 0,n.sourceHash=r.sourceHash,n.type="deposit"),n}),stateRoot:t.stateRoot}}}),transaction:V({format(t){const a={};return t.type==="0x7e"&&(a.isSystemTx=t.isSystemTx,a.mint=t.mint?i(t.mint):void 0,a.sourceHash=t.sourceHash,a.type="deposit"),a}}),transactionReceipt:ee({format(t){return{l1GasPrice:t.l1GasPrice?i(t.l1GasPrice):null,l1GasUsed:t.l1GasUsed?i(t.l1GasUsed):null,l1Fee:t.l1Fee?i(t.l1Fee):null,l1FeeScalar:t.l1FeeScalar?Number(t.l1FeeScalar):null}}})};function Ce(t,a){return Te(t)?ve(t):X(t,a)}const we={transaction:Ce};function ve(t){Ue(t);const{sourceHash:a,data:s,from:r,gas:n,isSystemTx:c,mint:p,to:m,value:d}=t,b=[a,r,m??"0x",p?o(p):"0x",d?o(d):"0x",n?o(n):"0x",c?"0x1":"0x",s??"0x"];return q(["0x7e",j(b)])}function Te(t){return t.type==="deposit"||typeof t.sourceHash<"u"}function Ue(t){const{from:a,to:s}=t;if(a&&!k(a))throw new E({address:a});if(s&&!k(s))throw new E({address:s})}const l={contracts:Ee,formatters:Z,serializers:we},T=1,tt=e({...l,id:888888888,name:"Ancient8",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.ancient8.gg"]}},blockExplorers:{default:{name:"Ancient8 explorer",url:"https://scan.ancient8.gg",apiUrl:"https://scan.ancient8.gg/api"}},contracts:{...l.contracts,l2OutputOracle:{[T]:{address:"0xB09DC08428C8b4EFB4ff9C0827386CDF34277996"}},portal:{[T]:{address:"0x639F2AECE398Aa76b07e59eF6abe2cFe32bacb68",blockCreated:19070571}},l1StandardBridge:{[T]:{address:"0xd5e3eDf5b68135D559D572E26bF863FBC1950033",blockCreated:19070571}}},sourceId:T}),U=11155111,at=e({...l,id:28122024,name:"Ancient8 Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpcv2-testnet.ancient8.gg"]}},blockExplorers:{default:{name:"Ancient8 Celestia Testnet explorer",url:"https://scanv2-testnet.ancient8.gg",apiUrl:"https://scanv2-testnet.ancient8.gg/api"}},contracts:{...l.contracts,l2OutputOracle:{[U]:{address:"0x942fD5017c0F60575930D8574Eaca13BEcD6e1bB"}},portal:{[U]:{address:"0xfa1d9E26A6aCD7b22115D27572c1221B9803c960",blockCreated:4972908}},l1StandardBridge:{[U]:{address:"0xF6Bc0146d3c74D48306e79Ae134A260E418C9335",blockCreated:4972908}}},sourceId:U}),rt=e({id:31337,name:"Anvil",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"],webSocket:["ws://127.0.0.1:8545"]}}}),st=e({id:3993,name:"APEX Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.apexlayer.xyz"]}},blockExplorers:{default:{name:"Blockscout",url:"https://exp-testnet.apexlayer.xyz",apiUrl:"https://exp-testnet.apexlayer.xyz/api"}},contracts:{multicall3:{address:"0xf7642be33a6b18D16a995657adb5a68CD0438aE2",blockCreated:283775}},testnet:!0}),nt=e({id:42161,name:"Arbitrum One",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://arbiscan.io",apiUrl:"https://api.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7654707}}}),lt=e({id:421613,name:"Arbitrum Goerli",nativeCurrency:{name:"Arbitrum Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://goerli-rollup.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://goerli.arbiscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:88114}},testnet:!0}),ot=e({id:42170,name:"Arbitrum Nova",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://nova.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://nova.arbiscan.io",apiUrl:"https://api-nova.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1746963}}}),ct=e({id:592,name:"Astar",network:"astar-mainnet",nativeCurrency:{name:"Astar",symbol:"ASTR",decimals:18},rpcUrls:{default:{http:["https://astar.api.onfinality.io/public"]}},blockExplorers:{default:{name:"Astar Subscan",url:"https://astar.subscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:761794}},testnet:!1}),it=e({id:3776,name:"Astar zkEVM",network:"AstarZkEVM",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.startale.com/astar-zkevm"]}},blockExplorers:{default:{name:"Astar zkEVM Explorer",url:"https://astar-zkevm.explorer.startale.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:93528}},testnet:!1}),pt=e({id:6038361,name:"Astar zkEVM Testnet zKyoto",network:"zKyoto",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.startale.com/zkyoto"]}},blockExplorers:{default:{name:"zKyoto Explorer",url:"https://zkyoto.explorer.startale.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:196153}},testnet:!0}),dt=e({id:421614,name:"Arbitrum Sepolia",nativeCurrency:{name:"Arbitrum Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rollup.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://sepolia.arbiscan.io",apiUrl:"https://api-sepolia.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:81930}},testnet:!0}),mt=e({id:463,name:"Areon Network",nativeCurrency:{decimals:18,name:"AREA",symbol:"AREA"},rpcUrls:{default:{http:["https://mainnet-rpc.areon.network"],webSocket:["wss://mainnet-ws.areon.network"]}},blockExplorers:{default:{name:"Areonscan",url:"https://areonscan.com"}},testnet:!1}),ut=e({id:462,name:"Areon Network Testnet",nativeCurrency:{decimals:18,name:"TAREA",symbol:"TAREA"},rpcUrls:{default:{http:["https://testnet-rpc.areon.network"],webSocket:["wss://testnet-ws.areon.network"]}},blockExplorers:{default:{name:"Areonscan",url:"https://areonscan.com"}},testnet:!0}),bt=e({id:1313161554,name:"Aurora",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.aurora.dev"]}},blockExplorers:{default:{name:"Aurorascan",url:"https://aurorascan.dev",apiUrl:"https://aurorascan.dev/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:62907816}}}),ht=e({id:1313161555,name:"Aurora Testnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://testnet.aurora.dev"]}},blockExplorers:{default:{name:"Aurorascan",url:"https://testnet.aurorascan.dev",apiUrl:"https://testnet.aurorascan.dev/api"}},testnet:!0}),kt=e({id:205205,name:"Auroria Testnet",network:"auroria",nativeCurrency:{name:"Auroria Stratis",symbol:"tSTRAX",decimals:18},rpcUrls:{default:{http:["https://auroria.rpc.stratisevm.com"]}},blockExplorers:{default:{name:"Auroria Testnet Explorer",url:"https://auroria.explorer.stratisevm.com"}},testnet:!0}),xt=e({id:43114,name:"Avalanche",nativeCurrency:{decimals:18,name:"Avalanche",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax.network/ext/bc/C/rpc"]}},blockExplorers:{default:{name:"SnowScan",url:"https://snowscan.xyz",apiUrl:"https://api.snowscan.xyz/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11907934}}}),ft=e({id:43113,name:"Avalanche Fuji",nativeCurrency:{decimals:18,name:"Avalanche Fuji",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax-test.network/ext/bc/C/rpc"]}},blockExplorers:{default:{name:"SnowScan",url:"https://testnet.snowscan.xyz",apiUrl:"https://api-testnet.snowscan.xyz"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7096959}},testnet:!0}),yt=e({id:5165,network:"bahamut",name:"Bahamut",nativeCurrency:{name:"Fasttoken",symbol:"FTN",decimals:18},rpcUrls:{default:{http:["https://rpc1.bahamut.io","https://bahamut-rpc.publicnode.com","https://rpc2.bahamut.io"],webSocket:["wss://ws1.sahara.bahamutchain.com","wss://bahamut-rpc.publicnode.com","wss://ws2.sahara.bahamutchain.com"]},public:{http:["https://rpc1.bahamut.io","https://bahamut-rpc.publicnode.com","https://rpc2.bahamut.io"],webSocket:["wss://ws1.sahara.bahamutchain.com","wss://bahamut-rpc.publicnode.com","wss://ws2.sahara.bahamutchain.com"]}},blockExplorers:{default:{name:"Ftnscan",url:"https://www.ftnscan.com",apiUrl:"https://www.ftnscan.com/api"}}}),g=1,Et=e({...l,id:8453,name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://basescan.org",apiUrl:"https://api.basescan.org/api"}},contracts:{...l.contracts,l2OutputOracle:{[g]:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{[g]:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:17482143}},l1StandardBridge:{[g]:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:17482143}}},sourceId:g}),S=5,Ct=e({...l,id:84531,name:"Base Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://goerli.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://goerli.basescan.org",apiUrl:"https://goerli.basescan.org/api"}},contracts:{...l.contracts,l2OutputOracle:{[S]:{address:"0x2A35891ff30313CcFa6CE88dcf3858bb075A2298"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1376988},portal:{[S]:{address:"0xe93c8cD0D409341205A592f8c4Ac1A5fe5585cfA"}},l1StandardBridge:{[S]:{address:"0xfA6D8Ee5BE770F84FC001D098C4bD604Fe01284a"}}},testnet:!0,sourceId:S}),A=11155111,wt=e({...l,id:84532,network:"base-sepolia",name:"Base Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://sepolia.basescan.org",apiUrl:"https://api-sepolia.basescan.org/api"}},contracts:{...l.contracts,l2OutputOracle:{[A]:{address:"0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254"}},portal:{[A]:{address:"0x49f53e41452c74589e85ca1677426ba426459e85",blockCreated:4446677}},l1StandardBridge:{[A]:{address:"0xfd0Bf71F60660E2f608ed56e1659C450eB113120",blockCreated:4446677}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1059647}},testnet:!0,sourceId:A}),vt=e({id:4337,name:"Beam",network:"beam",nativeCurrency:{decimals:18,name:"Beam",symbol:"BEAM"},rpcUrls:{public:{http:["https://build.onbeam.com/rpc"],webSocket:["wss://build.onbeam.com/ws"]},default:{http:["https://build.onbeam.com/rpc"],webSocket:["wss://build.onbeam.com/ws"]}},blockExplorers:{default:{name:"Beam Explorer",url:"https://subnets.avax.network/beam"}},contracts:{multicall3:{address:"0x4956f15efdc3dc16645e90cc356eafa65ffc65ec",blockCreated:1}}}),Tt=e({id:13337,name:"Beam Testnet",network:"beam",nativeCurrency:{decimals:18,name:"Beam",symbol:"BEAM"},rpcUrls:{public:{http:["https://build.onbeam.com/rpc/testnet"],webSocket:["wss://build.onbeam.com/ws/testnet"]},default:{http:["https://build.onbeam.com/rpc/testnet"],webSocket:["wss://build.onbeam.com/ws/testnet"]}},blockExplorers:{default:{name:"Beam Explorer",url:"https://subnets-test.avax.network/beam"}},contracts:{multicall3:{address:"0x9bf49b704ee2a095b95c1f2d4eb9010510c41c9e",blockCreated:3}},testnet:!0}),Ut=e({id:641230,name:"Bear Network Chain Mainnet",nativeCurrency:{decimals:18,name:"BearNetworkChain",symbol:"BRNKC"},rpcUrls:{default:{http:["https://brnkc-mainnet.bearnetwork.net"]}},blockExplorers:{default:{name:"BrnkScan",url:"https://brnkscan.bearnetwork.net",apiUrl:"https://brnkscan.bearnetwork.net/api"}}}),gt=e({id:751230,name:"Bear Network Chain Testnet",nativeCurrency:{decimals:18,name:"tBRNKC",symbol:"tBRNKC"},rpcUrls:{default:{http:["https://brnkc-test.bearnetwork.net"]}},blockExplorers:{default:{name:"BrnkTestScan",url:"https://brnktest-scan.bearnetwork.net",apiUrl:"https://brnktest-scan.bearnetwork.net/api"}},testnet:!0}),St=e({id:80085,name:"Berachain Artio",nativeCurrency:{decimals:18,name:"BERA Token",symbol:"BERA"},rpcUrls:{default:{http:["https://artio.rpc.berachain.com"]}},blockExplorers:{default:{name:"Berachain",url:"https://artio.beratrail.io"}},testnet:!0}),At=e({id:11501,name:"BEVM Mainnet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet-1.bevm.io"]}},blockExplorers:{default:{name:"Bevmscan",url:"https://scan-mainnet.bevm.io",apiUrl:"https://scan-mainnet-api.bevm.io/api"}}}),Bt=e({id:199,name:"BitTorrent",network:"bittorrent-chain-mainnet",nativeCurrency:{name:"BitTorrent",symbol:"BTT",decimals:18},rpcUrls:{default:{http:["https://rpc.bittorrentchain.io"]},public:{http:["https://rpc.bittorrentchain.io"]}},blockExplorers:{default:{name:"Bttcscan",url:"https://bttcscan.com",apiUrl:"https://api.bttcscan.com/api"}}}),Ft=e({id:1028,name:"BitTorrent Chain Testnet",network:"bittorrent-chain-testnet",nativeCurrency:{name:"BitTorrent",symbol:"BTT",decimals:18},rpcUrls:{default:{http:["https://testrpc.bittorrentchain.io"]},public:{http:["https://testrpc.bittorrentchain.io"]}},blockExplorers:{default:{name:"Bttcscan",url:"https://testnet.bttcscan.com",apiUrl:"https://testnet.bttcscan.com/api"}},testnet:!0}),ge=1,Mt=e({id:81457,name:"Blast",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.blast.io"]}},blockExplorers:{default:{name:"Blastscan",url:"https://blastscan.io",apiUrl:"https://api.blastscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:212929}},sourceId:ge}),Se=11155111,zt=e({id:168587773,name:"Blast Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.blast.io"]}},blockExplorers:{default:{name:"Blastscan",url:"https://sepolia.blastscan.io",apiUrl:"https://api-sepolia.blastscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:756690}},testnet:!0,sourceId:Se}),Dt=e({id:60808,name:"BOB",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.gobob.xyz"],webSocket:["wss://rpc.gobob.xyz"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.gobob.xyz"}},contracts:{multicall3:{address:"0x63f8279bccDb75c0F38e0CD6B6A0c72a0a760FF9",blockCreated:457045}},testnet:!1}),It=e({id:288,name:"Boba Network",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.boba.network"]}},blockExplorers:{default:{name:"BOBAScan",url:"https://bobascan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:446859}}}),_t=e({id:1039,name:"Bronos",nativeCurrency:{decimals:18,name:"BRO",symbol:"BRO"},rpcUrls:{default:{http:["https://evm.bronos.org"]}},blockExplorers:{default:{name:"BronoScan",url:"https://broscan.bronos.org"}}}),Ht=e({id:1038,name:"Bronos Testnet",nativeCurrency:{decimals:18,name:"Bronos Coin",symbol:"tBRO"},rpcUrls:{default:{http:["https://evm-testnet.bronos.org"]}},blockExplorers:{default:{name:"BronoScan",url:"https://tbroscan.bronos.org"}},testnet:!0}),Pt=e({id:56,name:"BNB Smart Chain",nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://rpc.ankr.com/bsc"]}},blockExplorers:{default:{name:"BscScan",url:"https://bscscan.com",apiUrl:"https://api.bscscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15921452}}}),Ot=e({id:97,name:"Binance Smart Chain Testnet",nativeCurrency:{decimals:18,name:"BNB",symbol:"tBNB"},rpcUrls:{default:{http:["https://data-seed-prebsc-1-s1.bnbchain.org:8545"]}},blockExplorers:{default:{name:"BscScan",url:"https://testnet.bscscan.com",apiUrl:"https://testnet.bscscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:17422483}},testnet:!0}),Lt=e({id:1017,name:"BNB Greenfield Chain",nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://greenfield-chain.bnbchain.org"]}},blockExplorers:{default:{name:"BNB Greenfield Mainnet Scan",url:"https://greenfieldscan.com"}},testnet:!1}),Nt=e({id:200901,name:"Bitlayer",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.bitlayer.org","https://rpc.bitlayer-rpc.com","https://rpc.ankr.com/bitlayer"],webSocket:["wss://ws.bitlayer.org","wss://ws.bitlayer-rpc.com"]}},blockExplorers:{default:{name:"btrscan",url:"https://www.btrscan.com",apiUrl:"https://www.btrscan.com/apis"}}}),Rt=e({id:200810,name:"Bitlayer Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.bitlayer.org"],webSocket:["wss://testnet-ws.bitlayer.org","wss://testnet-ws.bitlayer-rpc.com"]}},blockExplorers:{default:{name:"btrscan",url:"https://testnet-scan.bitlayer.org",apiUrl:"https://testnet-scan.bitlayer.org/apis"}}}),Kt=e({id:4999,name:"BlackFort Exchange Network",nativeCurrency:{name:"BlackFort Token",symbol:"BXN",decimals:18},rpcUrls:{default:{http:["https://mainnet.blackfort.network/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.blackfort.network",apiUrl:"https://explorer.blackfort.network/api"}}}),Gt=e({id:4777,name:"BlackFort Exchange Network Testnet",nativeCurrency:{name:"BlackFort Testnet Token",symbol:"TBXN",decimals:18},rpcUrls:{default:{http:["https://testnet.blackfort.network/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet-explorer.blackfort.network",apiUrl:"https://testnet-explorer.blackfort.network/api"}},testnet:!0}),Vt=e({id:7700,name:"Canto",nativeCurrency:{decimals:18,name:"Canto",symbol:"CANTO"},rpcUrls:{default:{http:["https://canto.gravitychain.io"]}},blockExplorers:{default:{name:"Tuber.Build (Blockscout)",url:"https://tuber.build"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:2905789}}}),Ae={estimateFeesPerGas:async t=>{var r;if(!((r=t.request)!=null&&r.feeCurrency))return null;const[a,s]=await Promise.all([Be(t.client,t.request.feeCurrency),Fe(t.client,t.request.feeCurrency)]);return{maxFeePerGas:a,maxPriorityFeePerGas:s}}};async function Be(t,a){const s=await t.request({method:"eth_gasPrice",params:[a]});return BigInt(s)}async function Fe(t,a){const s=await t.request({method:"eth_maxPriorityFeePerGas",params:[a]});return BigInt(s)}function re(t){return t===0||t===0n||t===void 0||t===null||t==="0"||t===""||typeof t=="string"&&(W(t).toLowerCase()==="0x"||W(t).toLowerCase()==="0x00")}function w(t){return!re(t)}function Me(t){return typeof t.maxFeePerGas<"u"&&typeof t.maxPriorityFeePerGas<"u"}function se(t){return t.type==="cip64"?!0:Me(t)&&w(t.feeCurrency)}const ze={block:G({exclude:["difficulty","gasLimit","mixHash","nonce","uncles"],format(t){var s;const a=(s=t.transactions)==null?void 0:s.map(r=>typeof r=="string"?r:{...J(r),feeCurrency:r.feeCurrency,...r.type!=="0x7b"?{gatewayFee:r.gatewayFee?i(r.gatewayFee):null,gatewayFeeRecipient:r.gatewayFeeRecipient||null}:{}});return{randomness:t.randomness,transactions:a}}}),transaction:V({format(t){const a={feeCurrency:t.feeCurrency};return t.type==="0x7b"?a.type="cip64":(t.type==="0x7c"&&(a.type="cip42"),a.gatewayFee=t.gatewayFee?i(t.gatewayFee):null,a.gatewayFeeRecipient=t.gatewayFeeRecipient),a}}),transactionRequest:te({format(t){const a={feeCurrency:t.feeCurrency};return se(t)&&(a.type="0x7b"),a}})};function De(t,a){return se(t)?_e(t,a):X(t,a)}const Ie={transaction:De};function _e(t,a){Pe(t);const{chainId:s,gas:r,nonce:n,to:c,value:p,maxFeePerGas:m,maxPriorityFeePerGas:d,accessList:b,feeCurrency:f,data:y}=t,h=[o(s),n?o(n):"0x",d?o(d):"0x",m?o(m):"0x",r?o(r):"0x",c??"0x",p?o(p):"0x",y??"0x",de(b),f,...me(t,a)];return q(["0x7b",j(h)])}const He=2n**256n-1n;function Pe(t){const{chainId:a,maxPriorityFeePerGas:s,gasPrice:r,maxFeePerGas:n,to:c,feeCurrency:p}=t;if(a<=0)throw new ae({chainId:a});if(c&&!k(c))throw new E({address:c});if(r)throw new u("`gasPrice` is not a valid CIP-64 Transaction attribute.");if(w(n)&&n>He)throw new ue({maxFeePerGas:n});if(w(s)&&w(n)&&s>n)throw new be({maxFeePerGas:n,maxPriorityFeePerGas:s});if(w(p)&&!k(p))throw new u("`feeCurrency` MUST be a token address for CIP-64 transactions.");if(re(p))throw new u("`feeCurrency` must be provided for CIP-64 transactions.")}const ne={formatters:ze,serializers:Ie,fees:Ae},Xt=e({...ne,id:42220,name:"Celo",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://forno.celo.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://celoscan.io",apiUrl:"https://api.celoscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:13112599}},testnet:!1}),qt=e({...ne,id:44787,name:"Alfajores",nativeCurrency:{decimals:18,name:"CELO",symbol:"A-CELO"},rpcUrls:{default:{http:["https://alfajores-forno.celo-testnet.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://explorer.celo.org/alfajores",apiUrl:"https://explorer.celo.org/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:14569001}},testnet:!0}),jt=e({id:88888,name:"Chiliz Chain",network:"chiliz-chain",nativeCurrency:{decimals:18,name:"CHZ",symbol:"CHZ"},rpcUrls:{default:{http:["https://rpc.ankr.com/chiliz","https://chiliz-rpc.publicnode.com"]}},blockExplorers:{default:{name:"Chiliz Explorer",url:"https://scan.chiliz.com",apiUrl:"https://scan.chiliz.com/api"}}}),Zt=e({id:61,name:"Ethereum Classic",nativeCurrency:{decimals:18,name:"ETC",symbol:"ETC"},rpcUrls:{default:{http:["https://etc.rivet.link"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.com/etc/mainnet"}}}),$t=e({id:1030,name:"Conflux eSpace",nativeCurrency:{name:"Conflux",symbol:"CFX",decimals:18},rpcUrls:{default:{http:["https://evm.confluxrpc.org"],webSocket:["wss://evm.confluxrpc.org/ws"]}},blockExplorers:{default:{name:"ConfluxScan",url:"https://evm.confluxscan.io"}},contracts:{multicall3:{address:"0xEFf0078910f638cd81996cc117bccD3eDf2B072F",blockCreated:68602935}}}),Wt=e({id:71,name:"Conflux eSpace Testnet",network:"cfx-espace-testnet",testnet:!0,nativeCurrency:{name:"Conflux",symbol:"CFX",decimals:18},rpcUrls:{default:{http:["https://evmtestnet.confluxrpc.org"],webSocket:["wss://evmtestnet.confluxrpc.org/ws"]}},blockExplorers:{default:{name:"ConfluxScan",url:"https://evmtestnet.confluxscan.io"}},contracts:{multicall3:{address:"0xEFf0078910f638cd81996cc117bccD3eDf2B072F",blockCreated:117499050}}}),Qt=e({id:1116,name:"Core Dao",nativeCurrency:{decimals:18,name:"Core",symbol:"CORE"},rpcUrls:{default:{http:["https://rpc.coredao.org"]}},blockExplorers:{default:{name:"CoreDao",url:"https://scan.coredao.org"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:11907934}},testnet:!1}),Yt=e({id:25,name:"Cronos Mainnet",nativeCurrency:{decimals:18,name:"Cronos",symbol:"CRO"},rpcUrls:{default:{http:["https://evm.cronos.org"]}},blockExplorers:{default:{name:"Cronos Explorer",url:"https://explorer.cronos.org",apiUrl:"https://explorer-api.cronos.org/mainnet/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1963112}}}),Jt=e({id:338,name:"Cronos Testnet",nativeCurrency:{decimals:18,name:"CRO",symbol:"tCRO"},rpcUrls:{default:{http:["https://evm-t3.cronos.org"]}},blockExplorers:{default:{name:"Cronos Explorer",url:"https://cronos.org/explorer/testnet3"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:10191251}},testnet:!0}),ea=e({id:3737,name:"Crossbell",nativeCurrency:{decimals:18,name:"CSB",symbol:"CSB"},rpcUrls:{default:{http:["https://rpc.crossbell.io"]}},blockExplorers:{default:{name:"CrossScan",url:"https://scan.crossbell.io",apiUrl:"https://scan.crossbell.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:38246031}}}),ta=e({id:7560,name:"Cyber",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://cyber.alt.technology"]}},blockExplorers:{default:{name:"Blockscout",url:"https://cyberscan.co",apiUrl:"https://cyberscan.co/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}}}),aa=e({id:111557560,name:"Cyber Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://cyber-testnet.alt.technology"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet.cyberscan.co",apiUrl:"https://testnet.cyberscan.co/api"}},contracts:{multicall3:{address:"0xffc391F0018269d4758AEA1a144772E8FB99545E",blockCreated:304545}},testnet:!0}),ra=e({id:46,name:"Darwinia Network",nativeCurrency:{decimals:18,name:"RING",symbol:"RING"},rpcUrls:{default:{http:["https://rpc.darwinia.network"],webSocket:["wss://rpc.darwinia.network"]}},blockExplorers:{default:{name:"Explorer",url:"https://darwinia.subscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:69420}}}),sa=e({id:1130,network:"defichain-evm",name:"DeFiChain EVM Mainnet",nativeCurrency:{name:"DeFiChain",symbol:"DFI",decimals:8},rpcUrls:{default:{http:["https://eth.mainnet.ocean.jellyfishsdk.com"]},public:{http:["https://eth.mainnet.ocean.jellyfishsdk.com"]}},blockExplorers:{default:{name:"DeFiScan",url:"https://meta.defiscan.live"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:137852}}}),na=e({id:1131,network:"defichain-evm-testnet",name:"DeFiChain EVM Testnet",nativeCurrency:{name:"DeFiChain",symbol:"DFI",decimals:8},rpcUrls:{default:{http:["https://eth.testnet.ocean.jellyfishsdk.com"]},public:{http:["https://eth.testnet.ocean.jellyfishsdk.com"]}},blockExplorers:{default:{name:"DeFiScan",url:"https://meta.defiscan.live/?network=TestNet"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:156462}},testnet:!0}),la=e({id:666666666,name:"Degen",nativeCurrency:{decimals:18,name:"Degen",symbol:"DEGEN"},rpcUrls:{default:{http:["https://rpc.degen.tips"],webSocket:["wss://rpc.degen.tips"]}},blockExplorers:{default:{name:"Degen Chain Explorer",url:"https://explorer.degen.tips",apiUrl:"https://explorer.degen.tips/api/v2"}}}),oa=e({id:53935,name:"DFK Chain",nativeCurrency:{decimals:18,name:"Jewel",symbol:"JEWEL"},rpcUrls:{default:{http:["https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"]}},blockExplorers:{default:{name:"DFKSubnetScan",url:"https://subnets.avax.network/defi-kingdoms"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14790551}}}),ca=e({id:53457,name:"DODOchain Testnet",nativeCurrency:{decimals:18,name:"DODO",symbol:"DODO"},rpcUrls:{default:{http:["https://dodochain-testnet.alt.technology"],webSocket:["wss://dodochain-testnet.alt.technology/ws"]}},blockExplorers:{default:{name:"DODOchain Testnet (Sepolia) Explorer",url:"https://testnet-scan.dodochain.com"}},testnet:!0}),ia=e({id:2e3,name:"Dogechain",nativeCurrency:{decimals:18,name:"Dogechain",symbol:"DC"},rpcUrls:{default:{http:["https://rpc.dogechain.dog"]}},blockExplorers:{default:{name:"DogeChainExplorer",url:"https://explorer.dogechain.dog",apiUrl:"https://explorer.dogechain.dog/api"}}}),pa=e({id:23451,name:"DreyerX Mainnet",nativeCurrency:{name:"DreyerX",symbol:"DRX",decimals:18},rpcUrls:{default:{http:["https://rpc.dreyerx.com"]}},blockExplorers:{default:{name:"DreyerX Scan",url:"https://scan.dreyerx.com"}}}),da=e({id:2026,name:"Edgeless Network",nativeCurrency:{name:"Edgeless Wrapped ETH",symbol:"EwETH",decimals:18},rpcUrls:{default:{http:["https://rpc.edgeless.network/http"],webSocket:["wss://rpc.edgeless.network/ws"]}},blockExplorers:{default:{name:"Edgeless Explorer",url:"https://explorer.edgeless.network"}}}),ma=e({id:202,name:"Edgeless Testnet",nativeCurrency:{name:"Edgeless Wrapped ETH",symbol:"EwETH",decimals:18},rpcUrls:{default:{http:["https://edgeless-testnet.rpc.caldera.xyz/http"],webSocket:["wss://edgeless-testnet.rpc.caldera.xyz/ws"]}},blockExplorers:{default:{name:"Edgeless Testnet Explorer",url:"https://testnet.explorer.edgeless.network"}}}),ua=e({id:2021,name:"Edgeware EdgeEVM Mainnet",nativeCurrency:{decimals:18,name:"Edgeware",symbol:"EDG"},rpcUrls:{default:{http:["https://edgeware-evm.jelliedowl.net"]}},blockExplorers:{default:{name:"Edgscan by Bharathcoorg",url:"https://edgscan.live",apiUrl:"https://edgscan.live/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:18117872}}}),ba=e({id:2022,name:"Beresheet BereEVM Testnet",nativeCurrency:{decimals:18,name:"Testnet EDG",symbol:"tEDG"},rpcUrls:{default:{http:["https://beresheet-evm.jelliedowl.net"]}},blockExplorers:{default:{name:"Edgscan by Bharathcoorg",url:"https://testnet.edgscan.live",apiUrl:"https://testnet.edgscan.live/api"}}}),ha=e({id:7332,name:"Horizen EON",nativeCurrency:{decimals:18,name:"ZEN",symbol:"ZEN"},rpcUrls:{default:{http:["https://eon-rpc.horizenlabs.io/ethv1"]}},blockExplorers:{default:{name:"EON Explorer",url:"https://eon-explorer.horizenlabs.io"}},contracts:{}}),ka=e({id:17777,name:"EOS EVM",nativeCurrency:{decimals:18,name:"EOS",symbol:"EOS"},rpcUrls:{default:{http:["https://api.evm.eosnetwork.com"]}},blockExplorers:{default:{name:"EOS EVM Explorer",url:"https://explorer.evm.eosnetwork.com",apiUrl:"https://explorer.evm.eosnetwork.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7943933}}}),xa=e({id:15557,name:"EOS EVM Testnet",nativeCurrency:{decimals:18,name:"EOS",symbol:"EOS"},rpcUrls:{default:{http:["https://api.testnet.evm.eosnetwork.com"]}},blockExplorers:{default:{name:"EOS EVM Testnet Explorer",url:"https://explorer.testnet.evm.eosnetwork.com",apiUrl:"https://explorer.testnet.evm.eosnetwork.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:9067940}},testnet:!0}),fa=e({id:128123,name:"Etherlink Testnet",nativeCurrency:{decimals:18,name:"Tez",symbol:"XTZ"},rpcUrls:{default:{http:["https://node.ghostnet.etherlink.com"]}},blockExplorers:{default:{name:"Etherlink Testnet",url:"https://testnet-explorer.etherlink.com"}},testnet:!0}),ya=e({id:9001,name:"Evmos",nativeCurrency:{decimals:18,name:"Evmos",symbol:"EVMOS"},rpcUrls:{default:{http:["https://eth.bd.evmos.org:8545"]}},blockExplorers:{default:{name:"Evmos Block Explorer",url:"https://escan.live"}}}),Ea=e({id:9e3,name:"Evmos Testnet",nativeCurrency:{decimals:18,name:"Evmos",symbol:"EVMOS"},rpcUrls:{default:{http:["https://eth.bd.evmos.dev:8545"]}},blockExplorers:{default:{name:"Evmos Testnet Block Explorer",url:"https://evm.evmos.dev/"}}}),Ca=e({id:1994,name:"Ekta",nativeCurrency:{decimals:18,name:"EKTA",symbol:"EKTA"},rpcUrls:{default:{http:["https://main.ekta.io"]}},blockExplorers:{default:{name:"Ektascan",url:"https://ektascan.io",apiUrl:"https://ektascan.io/api"}}}),wa=e({id:1004,name:"Ekta Testnet",nativeCurrency:{decimals:18,name:"EKTA",symbol:"EKTA"},rpcUrls:{default:{http:["https://test.ekta.io:8545"]}},blockExplorers:{default:{name:"Test Ektascan",url:"https://test.ektascan.io",apiUrl:"https://test.ektascan.io/api"}},testnet:!0}),va=e({id:250,name:"Fantom",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://rpc.ankr.com/fantom"]}},blockExplorers:{default:{name:"FTMScan",url:"https://ftmscan.com",apiUrl:"https://api.ftmscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:33001987}}}),Ta=e({id:64240,name:"Fantom Sonic Open Testnet",network:"fantom-sonic-testnet",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://rpcapi.sonic.fantom.network"]}},blockExplorers:{default:{name:"Fantom Sonic Open Testnet Explorer",url:"https://public-sonic.fantom.network"}},testnet:!0}),Ua=e({id:4002,name:"Fantom Testnet",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://rpc.testnet.fantom.network"]}},blockExplorers:{default:{name:"FTMScan",url:"https://testnet.ftmscan.com",apiUrl:"https://testnet.ftmscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:8328688}}}),ga=e({id:12306,name:"Fibo Chain",nativeCurrency:{decimals:18,name:"fibo",symbol:"FIBO"},rpcUrls:{default:{http:["https://network.hzroc.art"]}},blockExplorers:{default:{name:"FiboScan",url:"https://scan.fibochain.org"}}}),Sa=e({id:314,name:"Filecoin Mainnet",nativeCurrency:{decimals:18,name:"filecoin",symbol:"FIL"},rpcUrls:{default:{http:["https://api.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filfox",url:"https://filfox.info/en"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3328594}}}),Aa=e({id:314159,name:"Filecoin Calibration",nativeCurrency:{decimals:18,name:"testnet filecoin",symbol:"tFIL"},rpcUrls:{default:{http:["https://api.calibration.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filscan",url:"https://calibration.filscan.io"}},testnet:!0}),Ba=e({id:3141,name:"Filecoin Hyperspace",nativeCurrency:{decimals:18,name:"testnet filecoin",symbol:"tFIL"},rpcUrls:{default:{http:["https://api.hyperspace.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filfox",url:"https://hyperspace.filfox.info/en"}},testnet:!0}),Fa=e({id:14,name:"Flare Mainnet",nativeCurrency:{decimals:18,name:"flare",symbol:"FLR"},rpcUrls:{default:{http:["https://flare-api.flare.network/ext/C/rpc"]}},blockExplorers:{default:{name:"Flare Explorer",url:"https://flare-explorer.flare.network",apiUrl:"https://flare-explorer.flare.network/api"}}}),Ma=e({id:114,name:"Coston2",nativeCurrency:{decimals:18,name:"coston2flare",symbol:"C2FLR"},rpcUrls:{default:{http:["https://coston2-api.flare.network/ext/C/rpc"]}},blockExplorers:{default:{name:"Coston2 Explorer",url:"https://coston2-explorer.flare.network",apiUrl:"https://coston2-explorer.flare.network/api"}},testnet:!0}),za=e({id:646,name:"FlowEVM Previewnet",nativeCurrency:{decimals:18,name:"Flow",symbol:"FLOW"},rpcUrls:{default:{http:["https://previewnet.evm.nodes.onflow.org"]}},blockExplorers:{default:{name:"Previewnet Explorer",url:"https://previewnet.flowdiver.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6205}}}),Da=e({id:747,name:"FlowEVM Mainnet",nativeCurrency:{decimals:18,name:"Flow",symbol:"FLOW"},rpcUrls:{default:{http:["https://mainnet.evm.nodes.onflow.org"]}},blockExplorers:{default:{name:"Mainnet Explorer",url:"https://flowdiver.io"}}}),Ia=e({id:545,name:"FlowEVM Testnet",nativeCurrency:{decimals:18,name:"Flow",symbol:"FLOW"},rpcUrls:{default:{http:["https://testnet.evm.nodes.onflow.org"]}},blockExplorers:{default:{name:"Flow Diver",url:"https://testnet.flowdiver.io"}}}),_a=e({id:31337,name:"Foundry",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"],webSocket:["ws://127.0.0.1:8545"]}}}),B=1,Ha=e({...l,id:252,name:"Fraxtal",nativeCurrency:{name:"Frax Ether",symbol:"frxETH",decimals:18},rpcUrls:{default:{http:["https://rpc.frax.com"]}},blockExplorers:{default:{name:"fraxscan",url:"https://fraxscan.com",apiUrl:"https://api.fraxscan.com/api"}},contracts:{...l.contracts,l2OutputOracle:{[B]:{address:"0x66CC916Ed5C6C2FA97014f7D1cD141528Ae171e4"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[B]:{address:"0x36cb65c1967A0Fb0EEE11569C51C2f2aA1Ca6f6D",blockCreated:19135323}},l1StandardBridge:{[B]:{address:"0x34C0bD5877A5Ee7099D0f5688D65F4bB9158BDE2",blockCreated:19135323}}},sourceId:B}),F=17e3,Pa=e({...l,id:2522,name:"Fraxtal Testnet",nativeCurrency:{name:"Frax Ether",symbol:"frxETH",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.frax.com"]}},blockExplorers:{default:{name:"fraxscan testnet",url:"https://holesky.fraxscan.com",apiUrl:"https://api-holesky.fraxscan.com/api"}},contracts:{...l.contracts,l2OutputOracle:{[F]:{address:"0x715EA64DA13F4d0831ece4Ad3E8c1aa013167F32"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[F]:{address:"0xB9c64BfA498d5b9a8398Ed6f46eb76d90dE5505d",blockCreated:318416}},l1StandardBridge:{[F]:{address:"0x0BaafC217162f64930909aD9f2B27125121d6332",blockCreated:318416}}},sourceId:F}),Oe=11155111,Oa=e({...l,id:3397901,network:"funkiSepolia",name:"Funki Sepolia Sandbox",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://funki-testnet.alt.technology"]}},blockExplorers:{default:{name:"Funki Sepolia Sandbox Explorer",url:"https://sepolia-sandbox.funkichain.com/"}},testnet:!0,contracts:{...l.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1620204}},sourceId:Oe}),La=e({id:122,name:"Fuse",nativeCurrency:{name:"Fuse",symbol:"FUSE",decimals:18},rpcUrls:{default:{http:["https://rpc.fuse.io"]}},blockExplorers:{default:{name:"Fuse Explorer",url:"https://explorer.fuse.io",apiUrl:"https://explorer.fuse.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:16146628}}}),Na=e({id:123,name:"Fuse Sparknet",nativeCurrency:{name:"Spark",symbol:"SPARK",decimals:18},rpcUrls:{default:{http:["https://rpc.fusespark.io"]}},blockExplorers:{default:{name:"Sparkent Explorer",url:"https://explorer.fusespark.io",apiUrl:"https://explorer.fusespark.io/api"}}}),Ra=e({id:4689,name:"IoTeX",nativeCurrency:{decimals:18,name:"IoTeX",symbol:"IOTX"},rpcUrls:{default:{http:["https://babel-api.mainnet.iotex.io"],webSocket:["wss://babel-api.mainnet.iotex.io"]}},blockExplorers:{default:{name:"IoTeXScan",url:"https://iotexscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:22163670}}}),Ka=e({id:4690,name:"IoTeX Testnet",nativeCurrency:{decimals:18,name:"IoTeX",symbol:"IOTX"},rpcUrls:{default:{http:["https://babel-api.testnet.iotex.io"],webSocket:["wss://babel-api.testnet.iotex.io"]}},blockExplorers:{default:{name:"IoTeXScan",url:"https://testnet.iotexscan.io"}},testnet:!0}),Ga=e({id:8899,name:"JIBCHAIN L1",network:"jbc",nativeCurrency:{name:"JBC",symbol:"JBC",decimals:18},rpcUrls:{default:{http:["https://rpc-l1.jibchain.net"]},public:{http:["https://rpc-l1.jibchain.net"]}},blockExplorers:{default:{name:"Blockscout",url:"https://exp-l1.jibchain.net",apiUrl:"https://exp-l1.jibchain.net/api"}},contracts:{multicall3:{address:"0xc0C8C486D1466C57Efe13C2bf000d4c56F47CBdC",blockCreated:2299048}},testnet:!1}),Va=e({id:88991,name:"Jibchain Testnet",nativeCurrency:{name:"tJBC",symbol:"tJBC",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.jibchain.net"]}},blockExplorers:{default:{name:"Blockscout",url:"https://exp.testnet.jibchain.net",apiUrl:"https://exp.testnet.jibchain.net/api"}},contracts:{multicall3:{address:"0xa1a858ad9041B4741e620355a3F96B3c78e70ecE",blockCreated:32848}},testnet:!0}),Xa=e({id:686,name:"Karura",network:"karura",nativeCurrency:{name:"Karura",symbol:"KAR",decimals:18},rpcUrls:{public:{http:["https://eth-rpc-karura.aca-api.network"],webSocket:["wss://eth-rpc-karura.aca-api.network"]},default:{http:["https://eth-rpc-karura.aca-api.network"],webSocket:["wss://eth-rpc-karura.aca-api.network"]}},blockExplorers:{default:{name:"Karura Blockscout",url:"https://blockscout.karura.network",apiUrl:"https://blockscout.karura.network/api"}},testnet:!1}),qa=e({id:1663,name:"Horizen Gobi Testnet",nativeCurrency:{decimals:18,name:"Test ZEN",symbol:"tZEN"},rpcUrls:{default:{http:["https://gobi-testnet.horizenlabs.io/ethv1"]}},blockExplorers:{default:{name:"Gobi Explorer",url:"https://gobi-explorer.horizen.io"}},contracts:{},testnet:!0}),ja=e({id:5,name:"Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.ankr.com/eth_goerli"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.etherscan.io",apiUrl:"https://api-goerli.etherscan.io/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xfc4AC75C46C914aF5892d6d3eFFcebD7917293F1",blockCreated:10339206},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0}),Za=e({id:100,name:"Gnosis",nativeCurrency:{decimals:18,name:"Gnosis",symbol:"xDAI"},rpcUrls:{default:{http:["https://rpc.gnosischain.com"],webSocket:["wss://rpc.gnosischain.com/wss"]}},blockExplorers:{default:{name:"Gnosisscan",url:"https://gnosisscan.io",apiUrl:"https://api.gnosisscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:21022491}}}),$a=e({id:10200,name:"Gnosis Chiado",nativeCurrency:{decimals:18,name:"Gnosis",symbol:"xDAI"},rpcUrls:{default:{http:["https://rpc.chiadochain.net"],webSocket:["wss://rpc.chiadochain.net/wss"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.chiadochain.net",apiUrl:"https://blockscout.chiadochain.net/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:4967313}},testnet:!0}),Wa=e({id:31337,name:"Hardhat",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),Qa=e({id:16666e5,name:"Harmony One",nativeCurrency:{name:"Harmony",symbol:"ONE",decimals:18},rpcUrls:{default:{http:["https://rpc.ankr.com/harmony"]}},blockExplorers:{default:{name:"Harmony Explorer",url:"https://explorer.harmony.one"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:24185753}}}),Ya=e({id:11235,name:"HAQQ Mainnet",nativeCurrency:{decimals:18,name:"Islamic Coin",symbol:"ISLM"},rpcUrls:{default:{http:["https://rpc.eth.haqq.network"]}},blockExplorers:{default:{name:"HAQQ Explorer",url:"https://explorer.haqq.network",apiUrl:"https://explorer.haqq.network/api"}}}),Ja=e({id:54211,name:"HAQQ Testedge 2",nativeCurrency:{decimals:18,name:"Islamic Coin",symbol:"ISLMT"},rpcUrls:{default:{http:["https://rpc.eth.testedge2.haqq.network"]}},blockExplorers:{default:{name:"HAQQ Explorer",url:"https://explorer.testedge2.haqq.network",apiUrl:"https://explorer.testedge2.haqq.network/api"}}}),er=e({id:295,name:"Hedera Mainnet",network:"hedera-mainnet",nativeCurrency:{symbol:"HBAR",name:"HBAR",decimals:18},rpcUrls:{default:{http:["https://mainnet.hashio.io/api"]}},blockExplorers:{default:{name:"Hashscan",url:"https://hashscan.io/mainnet"}},testnet:!1}),tr=e({id:296,name:"Hedera Testnet",network:"hedera-testnet",nativeCurrency:{symbol:"HBAR",name:"HBAR",decimals:18},rpcUrls:{default:{http:["https://testnet.hashio.io/api"]}},blockExplorers:{default:{name:"Hashscan",url:"https://hashscan.io/testnet"}},testnet:!0}),ar=e({id:297,name:"Hedera Previewnet",network:"hedera-previewnet",nativeCurrency:{symbol:"HBAR",name:"HBAR",decimals:18},rpcUrls:{default:{http:["https://previewnet.hashio.io/api"]}},blockExplorers:{default:{name:"Hashscan",url:"https://hashscan.io/previewnet"}},testnet:!0}),rr=e({id:17e3,name:"Holesky",nativeCurrency:{name:"Holesky Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://ethereum-holesky-rpc.publicnode.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://holesky.etherscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:77},ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",blockCreated:801613},ensUniversalResolver:{address:"0xa6AC935D4971E3CD133b950aE053bECD16fE7f3b",blockCreated:973484}},testnet:!0}),sr=e({id:13371,name:"Immutable zkEVM",nativeCurrency:{decimals:18,name:"Immutable Coin",symbol:"IMX"},rpcUrls:{default:{http:["https://rpc.immutable.com"]}},blockExplorers:{default:{name:"Immutable Explorer",url:"https://explorer.immutable.com"}},contracts:{multicall3:{address:"0x236bdA4589e44e6850f5aC6a74BfCa398a86c6c0",blockCreated:4335972}}}),nr=e({id:13473,name:"Immutable zkEVM Testnet",nativeCurrency:{decimals:18,name:"Immutable Coin",symbol:"IMX"},rpcUrls:{default:{http:["https://rpc.testnet.immutable.com"]}},blockExplorers:{default:{name:"Immutable Testnet Explorer",url:"https://explorer.testnet.immutable.com/"}},contracts:{multicall3:{address:"0x2CC787Ed364600B0222361C4188308Fa8E68bA60",blockCreated:5977391}},testnet:!0}),lr=e({id:2525,name:"inEVM Mainnet",nativeCurrency:{decimals:18,name:"Injective",symbol:"INJ"},rpcUrls:{default:{http:["https://mainnet.rpc.inevm.com/http"]}},blockExplorers:{default:{name:"inEVM Explorer",url:"https://inevm.calderaexplorer.xyz",apiUrl:"https://inevm.calderaexplorer.xyz/api/v2"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:118606}}}),or=e({id:107107114116,name:"Kakarot Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rpc.kakarot.org"]}},blockExplorers:{default:{name:"Kakarot Scan",url:"https://sepolia.kakarotscan.org"}},testnet:!0}),cr=e({id:2222,name:"Kava EVM",network:"kava-mainnet",nativeCurrency:{name:"Kava",symbol:"KAVA",decimals:18},rpcUrls:{default:{http:["https://evm.kava.io"]}},blockExplorers:{default:{name:"Kava EVM Explorer",url:"https://kavascan.com",apiUrl:"https://kavascan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:3661165}},testnet:!1}),ir=e({id:2221,name:"Kava EVM Testnet",network:"kava-testnet",nativeCurrency:{name:"Kava",symbol:"KAVA",decimals:18},rpcUrls:{default:{http:["https://evm.testnet.kava.io"]}},blockExplorers:{default:{name:"Kava EVM Testnet Explorer",url:"https://testnet.kavascan.com/",apiUrl:"https://testnet.kavascan.com/api"}},contracts:{multicall3:{address:"0xDf1D724A7166261eEB015418fe8c7679BBEa7fd6",blockCreated:7242179}},testnet:!0}),pr=e({id:321,name:"KCC Mainnet",network:"KCC Mainnet",nativeCurrency:{decimals:18,name:"KCS",symbol:"KCS"},rpcUrls:{default:{http:["https://kcc-rpc.com"]},public:{http:["https://kcc-rpc.com"]}},blockExplorers:{default:{name:"KCC Explorer",url:"https://explorer.kcc.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11760430}},testnet:!1}),dr=e({id:8217,name:"Klaytn",nativeCurrency:{decimals:18,name:"Klaytn",symbol:"KLAY"},rpcUrls:{default:{http:["https://public-en-cypress.klaytn.net"]}},blockExplorers:{default:{name:"KlaytnScope",url:"https://scope.klaytn.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:96002415}}}),mr=e({id:1001,name:"Klaytn Baobab Testnet",network:"klaytn-baobab",nativeCurrency:{decimals:18,name:"Baobab Klaytn",symbol:"KLAY"},rpcUrls:{default:{http:["https://public-en-baobab.klaytn.net"]}},blockExplorers:{default:{name:"KlaytnScope",url:"https://baobab.klaytnscope.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:123390593}},testnet:!0}),ur=e({id:255,name:"Kroma",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://api.kroma.network"]}},blockExplorers:{default:{name:"Kroma Explorer",url:"https://blockscout.kroma.network",apiUrl:"https://blockscout.kroma.network/api"}},testnet:!1}),br=e({id:2358,name:"Kroma Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://api.sepolia.kroma.network"]}},blockExplorers:{default:{name:"Kroma Sepolia Explorer",url:"https://blockscout.sepolia.kroma.network",apiUrl:"https://blockscout.sepolia.kroma.network/api"}},testnet:!0}),hr=e({id:12324,name:"L3X Protocol",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet.l3x.com"],webSocket:["wss://rpc-mainnet.l3x.com"]}},blockExplorers:{default:{name:"L3X Mainnet Explorer",url:"https://explorer.l3x.com",apiUrl:"https://explorer.l3x.com/api/v2"}},testnet:!1}),kr=e({id:12325,name:"L3X Protocol Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.l3x.com"],webSocket:["wss://rpc-testnet.l3x.com"]}},blockExplorers:{default:{name:"L3X Testnet Explorer",url:"https://explorer-testnet.l3x.com",apiUrl:"https://explorer-testnet.l3x.com/api/v2"}},testnet:!0}),xr=e({id:1891,name:"LightLink Pegasus Testnet",network:"lightlink-pegasus",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://replicator.pegasus.lightlink.io/rpc/v1"]}},blockExplorers:{default:{name:"LightLink Pegasus Explorer",url:"https://pegasus.lightlink.io"}},testnet:!0}),fr=e({id:1890,name:"LightLink Phoenix Mainnet",network:"lightlink-phoenix",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://replicator.phoenix.lightlink.io/rpc/v1"]}},blockExplorers:{default:{name:"LightLink Phoenix Explorer",url:"https://phoenix.lightlink.io"}},testnet:!1}),yr=e({id:59144,name:"Linea Mainnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://lineascan.build",apiUrl:"https://api.lineascan.build/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:42}},testnet:!1}),Er=e({id:59140,name:"Linea Goerli Testnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.lineascan.build",apiUrl:"https://api-goerli.lineascan.build/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:498623}},testnet:!0}),Cr=e({id:59141,name:"Linea Sepolia Testnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.sepolia.linea.build"],webSocket:["wss://rpc.sepolia.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.lineascan.build",apiUrl:"https://api-sepolia.lineascan.build/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:227427}},testnet:!0}),wr=e({id:59140,name:"Linea Goerli Testnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.lineascan.build",apiUrl:"https://goerli.lineascan.build/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:498623}},testnet:!0}),$=50000n,Q=he*32n,le={block:G({format(t){var s;const a=(s=t.transactions)==null?void 0:s.map(r=>{var c;if(typeof r=="string")return r;const n=(c=le.transaction)==null?void 0:c.format(r);return n.typeHex==="0x71"?n.type="eip712":n.typeHex==="0xff"&&(n.type="priority"),n});return{l1BatchNumber:t.l1BatchNumber?i(t.l1BatchNumber):null,l1BatchTimestamp:t.l1BatchTimestamp?i(t.l1BatchTimestamp):null,transactions:a}}}),transaction:V({format(t){const a={};return t.type==="0x71"?a.type="eip712":t.type==="0xff"&&(a.type="priority"),{...a,l1BatchNumber:t.l1BatchNumber?i(t.l1BatchNumber):null,l1BatchTxIndex:t.l1BatchTxIndex?i(t.l1BatchTxIndex):null}}}),transactionReceipt:ee({format(t){return{l1BatchNumber:t.l1BatchNumber?i(t.l1BatchNumber):null,l1BatchTxIndex:t.l1BatchTxIndex?i(t.l1BatchTxIndex):null,logs:t.logs.map(a=>({...ke(a),l1BatchNumber:a.l1BatchNumber?i(a.l1BatchNumber):null,transactionLogIndex:fe(a.transactionLogIndex),logType:a.logType})),l2ToL1Logs:t.l2ToL1Logs.map(a=>({blockNumber:i(a.blockHash),blockHash:a.blockHash,l1BatchNumber:i(a.l1BatchNumber),transactionIndex:i(a.transactionIndex),shardId:i(a.shardId),isService:a.isService,sender:a.sender,key:a.key,value:a.value,transactionHash:a.transactionHash,logIndex:i(a.logIndex)}))}}}),transactionRequest:te({exclude:["customSignature","factoryDeps","gasPerPubdata","paymaster","paymasterInput"],format(t){return t.gasPerPubdata||t.paymaster&&t.paymasterInput||t.factoryDeps||t.customSignature?{eip712Meta:{...t.gasPerPubdata?{gasPerPubdata:o(t.gasPerPubdata)}:{gasPerPubdata:o($)},...t.paymaster&&t.paymasterInput?{paymasterParams:{paymaster:t.paymaster,paymasterInput:Array.from(R(t.paymasterInput))}}:{},...t.factoryDeps?{factoryDeps:t.factoryDeps.map(a=>Array.from(R(a)))}:{},...t.customSignature?{customSignature:Array.from(R(t.customSignature))}:{}},type:"0x71"}:{}}})};class Le extends u{constructor(){super(["Transaction is not an EIP712 transaction.","","Transaction must:",' - include `type: "eip712"`'," - include one of the following: `customSignature`, `paymaster`, `paymasterInput`, `gasPerPubdata`, `factoryDeps`"].join(` `)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidEip712TransactionError"})}}function oe(t){return!!(t.type==="eip712"||"customSignature"in t&&t.customSignature||"paymaster"in t&&t.paymaster||"paymasterInput"in t&&t.paymasterInput||"gasPerPubdata"in t&&typeof t.gasPerPubdata=="bigint"||"factoryDeps"in t&&t.factoryDeps)}function ce(t){const{chainId:a,to:s,from:r,paymaster:n,paymasterInput:c}=t;if(!oe(t))throw new Le;if(!a||a<=0)throw new ae({chainId:a});if(s&&!k(s))throw new E({address:s});if(r&&!k(r))throw new E({address:r});if(n&&!k(n))throw new E({address:n});if(n&&!c)throw new u("`paymasterInput` must be provided when `paymaster` is defined");if(!n&&c)throw new u("`paymaster` must be provided when `paymasterInput` is defined")}function Ne(t,a){return oe(t)?Ke(t):X(t,a)}const Re={transaction:Ne};function Ke(t){const{chainId:a,gas:s,nonce:r,to:n,from:c,value:p,maxFeePerGas:m,maxPriorityFeePerGas:d,customSignature:b,factoryDeps:f,paymaster:y,paymasterInput:h,gasPerPubdata:v,data:ie}=t;ce(t);const pe=[r?o(r):"0x",d?o(d):"0x",m?o(m):"0x",s?o(s):"0x",n??"0x",p?o(p):"0x",ie??"0x0",o(a),o(""),o(""),o(a),c??"0x",v?o(v):o($),f??[],b??"0x",y&&h?[y,h]:[]];return q(["0x71",j(pe)])}class Ge extends u{constructor({givenLength:a,maxBytecodeSize:s}){super(`Bytecode cannot be longer than ${s} bytes. Given length: ${a}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BytecodeLengthExceedsMaxSizeError"})}}class Ve extends u{constructor({givenLengthInWords:a}){super(`Bytecode length in 32-byte words must be odd. Given length in words: ${a}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BytecodeLengthInWordsMustBeOddError"})}}class Xe extends u{constructor({givenLength:a}){super(`The bytecode length in bytes must be divisible by 32. Given length: ${a}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BytecodeLengthMustBeDivisibleBy32Error"})}}function qe(t){const a=K(t);if(a.length%32!==0)throw new Xe({givenLength:a.length});if(a.length>Q)throw new Ge({givenLength:a.length,maxBytecodeSize:Q});const s=xe(a),r=K(s),n=a.length/32;if(n%2===0)throw new Ve({givenLengthInWords:n});const c=K(n),p=ye(c,{size:2}),m=new Uint8Array([1,0]);return r.set(m,0),r.set(p,2),r}const je=t=>{ce(t);const a=Ze(t);return{domain:{name:"zkSync",version:"2",chainId:t.chainId},types:{Transaction:[{name:"txType",type:"uint256"},{name:"from",type:"uint256"},{name:"to",type:"uint256"},{name:"gasLimit",type:"uint256"},{name:"gasPerPubdataByteLimit",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymaster",type:"uint256"},{name:"nonce",type:"uint256"},{name:"value",type:"uint256"},{name:"data",type:"bytes"},{name:"factoryDeps",type:"bytes32[]"},{name:"paymasterInput",type:"bytes"}]},primaryType:"Transaction",message:a}};function Ze(t){const{gas:a,nonce:s,to:r,from:n,value:c,maxFeePerGas:p,maxPriorityFeePerGas:m,factoryDeps:d,paymaster:b,paymasterInput:f,gasPerPubdata:y,data:h}=t;return{txType:113n,from:BigInt(n),to:r?BigInt(r):0n,gasLimit:a??0n,gasPerPubdataByteLimit:y??$,maxFeePerGas:p??0n,maxPriorityFeePerGas:m??0n,paymaster:b?BigInt(b):0n,nonce:s?BigInt(s):0n,value:c??0n,data:h||"0x0",factoryDeps:(d==null?void 0:d.map(v=>o(qe(v))))??[],paymasterInput:f||"0x"}}const x={formatters:le,serializers:Re,custom:{getEip712Domain:je}},vr=e({...x,id:1135,name:"Lisk",network:"lisk",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.api.lisk.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.lisk.com",apiUrl:"https://blockscout.lisk.com/api"}},contracts:{multicall3:{address:"0xA9d71E1dd7ca26F26e656E66d6AA81ed7f745bf0"}}}),M=11155111,Tr=e({...l,id:4202,network:"lisk-sepolia",name:"Lisk Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.sepolia-api.lisk.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia-blockscout.lisk.com",apiUrl:"https://sepolia-blockscout.lisk.com/api"}},contracts:{...l.contracts,l2OutputOracle:{[M]:{address:"0xA0E35F56C318DE1bD5D9ca6A94Fe7e37C5663348"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[M]:{address:"0xe3d90F21490686Ec7eF37BE788E02dfC12787264"}},l1StandardBridge:{[M]:{address:"0x1Fb30e446eA791cd1f011675E5F3f5311b70faF5"}}},testnet:!0,sourceId:M}),Ur=e({id:1337,name:"Localhost",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),gr=e({id:42,network:"lukso",name:"LUKSO",nativeCurrency:{name:"LUKSO",symbol:"LYX",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.lukso.network"],webSocket:["wss://ws-rpc.mainnet.lukso.network"]}},blockExplorers:{default:{name:"LUKSO Mainnet Explorer",url:"https://explorer.execution.mainnet.lukso.network",apiUrl:"https://api.explorer.execution.mainnet.lukso.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:468183}}}),Sr=e({id:4201,name:"LUKSO Testnet",nativeCurrency:{decimals:18,name:"LUKSO Testnet",symbol:"LYXt"},rpcUrls:{default:{http:["https://rpc.testnet.lukso.network"],webSocket:["wss://ws-rpc.testnet.lukso.network"]}},blockExplorers:{default:{name:"LUKSO Testnet Explorer",url:"https://explorer.execution.testnet.lukso.network",apiUrl:"https://api.explorer.execution.testnet.lukso.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:605348}},testnet:!0}),Ar=e({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://cloudflare-eth.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xce01f8eee7E479C928F8919abD53E553a36CeF67",blockCreated:19258213},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),Br=e({id:595,name:"Mandala TC9",network:"mandala",nativeCurrency:{name:"Mandala",symbol:"mACA",decimals:18},rpcUrls:{public:{http:["https://eth-rpc-tc9.aca-staging.network"],webSocket:["wss://eth-rpc-tc9.aca-staging.network"]},default:{http:["https://eth-rpc-tc9.aca-staging.network"],webSocket:["wss://eth-rpc-tc9.aca-staging.network"]}},blockExplorers:{default:{name:"Mandala Blockscout",url:"https://blockscout.mandala.aca-staging.network",apiUrl:"https://blockscout.mandala.aca-staging.network/api"}},testnet:!0}),Fr=e({id:169,name:"Manta Pacific Mainnet",network:"manta",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://pacific-rpc.manta.network/http"]}},blockExplorers:{default:{name:"Manta Explorer",url:"https://pacific-explorer.manta.network",apiUrl:"https://pacific-explorer.manta.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:332890}}}),Mr=e({id:3441006,name:"Manta Pacific Sepolia Testnet",network:"manta-sepolia",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://pacific-rpc.sepolia-testnet.manta.network/http"]}},blockExplorers:{default:{name:"Manta Sepolia Testnet Explorer",url:"https://pacific-explorer.sepolia-testnet.manta.network",apiUrl:"https://pacific-explorer.sepolia-testnet.manta.network/api"}},contracts:{multicall3:{address:"0xca54918f7B525C8df894668846506767412b53E3",blockCreated:479584}},testnet:!0}),zr=e({id:3441005,name:"Manta Pacific Testnet",network:"manta-testnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://manta-testnet.calderachain.xyz/http"]}},blockExplorers:{default:{name:"Manta Testnet Explorer",url:"https://pacific-explorer.testnet.manta.network",apiUrl:"https://pacific-explorer.testnet.manta.network/api"}},contracts:{multicall3:{address:"0x211B1643b95Fe76f11eD8880EE810ABD9A4cf56C",blockCreated:419915}},testnet:!0}),Dr=e({id:5e3,name:"Mantle",nativeCurrency:{decimals:18,name:"MNT",symbol:"MNT"},rpcUrls:{default:{http:["https://rpc.mantle.xyz"]}},blockExplorers:{default:{name:"Mantle Explorer",url:"https://mantlescan.xyz/",apiUrl:"https://api.mantlescan.xyz/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:304717}}}),Ir=e({id:5003,name:"Mantle Sepolia Testnet",nativeCurrency:{decimals:18,name:"MNT",symbol:"MNT"},rpcUrls:{default:{http:["https://rpc.sepolia.mantle.xyz"]}},blockExplorers:{default:{name:"Mantle Testnet Explorer",url:"https://explorer.sepolia.mantle.xyz/",apiUrl:"https://explorer.sepolia.mantle.xyz/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:4584012}},testnet:!0}),_r=e({id:5001,name:"Mantle Testnet",nativeCurrency:{decimals:18,name:"MNT",symbol:"MNT"},rpcUrls:{default:{http:["https://rpc.testnet.mantle.xyz"]}},blockExplorers:{default:{name:"Mantle Testnet Explorer",url:"https://explorer.testnet.mantle.xyz",apiUrl:"https://explorer.testnet.mantle.xyz/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:561333}},testnet:!0}),Hr=e({id:4200,name:"Merlin",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc.merlinchain.io"]}},blockExplorers:{default:{name:"blockscout",url:"https://scan.merlinchain.io",apiUrl:"https://scan.merlinchain.io/api"}}}),Pr=e({id:571,name:"MetaChain Mainnet",nativeCurrency:{name:"Metatime Coin",symbol:"MTC",decimals:18},rpcUrls:{default:{http:["https://rpc.metatime.com"]}},blockExplorers:{default:{name:"MetaExplorer",url:"https://explorer.metatime.com"}},contracts:{multicall3:{address:"0x0000000000000000000000000000000000003001",blockCreated:0}}}),Or=e({id:1453,name:"MetaChain Istanbul",nativeCurrency:{name:"Metatime Coin",symbol:"MTC",decimals:18},rpcUrls:{default:{http:["https://istanbul-rpc.metachain.dev"]}},blockExplorers:{default:{name:"MetaExplorer",url:"https://istanbul-explorer.metachain.dev"}},contracts:{multicall3:{address:"0x0000000000000000000000000000000000003001",blockCreated:0}},testnet:!0}),z=1,Lr=e({...l,id:1750,name:"Metal L2",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.metall2.com"],webSocket:["wss://rpc.metall2.com"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.metall2.com",apiUrl:"https://explorer.metall2.com/api"}},contracts:{...l.contracts,l2OutputOracle:{[z]:{address:"0x3B1F7aDa0Fcc26B13515af752Dd07fB1CAc11426"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0},portal:{[z]:{address:"0x3F37aBdE2C6b5B2ed6F8045787Df1ED1E3753956"}},l1StandardBridge:{[z]:{address:"0x6d0f65D59b55B0FEC5d2d15365154DcADC140BF3"}}},sourceId:z}),Nr=e({id:82,name:"Meter",nativeCurrency:{decimals:18,name:"MTR",symbol:"MTR"},rpcUrls:{default:{http:["https://rpc.meter.io"]}},blockExplorers:{default:{name:"MeterScan",url:"https://scan.meter.io"}}}),Rr=e({id:83,name:"Meter Testnet",nativeCurrency:{decimals:18,name:"MTR",symbol:"MTR"},rpcUrls:{default:{http:["https://rpctest.meter.io"]}},blockExplorers:{default:{name:"MeterTestnetScan",url:"https://scan-warringstakes.meter.io"}}}),Kr=e({id:1088,name:"Metis",nativeCurrency:{decimals:18,name:"Metis",symbol:"METIS"},rpcUrls:{default:{http:["https://andromeda.metis.io/?owner=1088"]}},blockExplorers:{default:{name:"Metis Explorer",url:"https://explorer.metis.io",apiUrl:"https://api.routescan.io/v2/network/mainnet/evm/43114/etherscan/api"},blockscout:{name:"Andromeda Explorer",url:"https://andromeda-explorer.metis.io",apiUrl:"https://andromeda-explorer.metis.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:2338552}}}),Gr=e({id:599,name:"Metis Goerli",nativeCurrency:{decimals:18,name:"Metis Goerli",symbol:"METIS"},rpcUrls:{default:{http:["https://goerli.gateway.metisdevops.link"]}},blockExplorers:{default:{name:"Metis Goerli Explorer",url:"https://goerli.explorer.metisdevops.link",apiUrl:"https://goerli.explorer.metisdevops.link/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1006207}}}),Vr=e({id:7518,name:"MEVerse Chain Mainnet",nativeCurrency:{decimals:18,name:"MEVerse",symbol:"MEV"},rpcUrls:{default:{http:["https://rpc.meversemainnet.io"]}},blockExplorers:{default:{name:"Explorer",url:"https://www.meversescan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:86881340}}}),Xr=e({id:4759,name:"MEVerse Chain Testnet",nativeCurrency:{decimals:18,name:"MEVerse",symbol:"MEV"},rpcUrls:{default:{http:["https://rpc.meversetestnet.io"]}},blockExplorers:{default:{name:"Explorer",url:"https://testnet.meversescan.io/"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:64371115}},testnet:!0}),qr=e({id:1686,name:"Mint Sepolia Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.mintchain.io"]}},blockExplorers:{default:{name:"Mintchain Testnet explorer",url:"https://testnet-explorer.mintchain.io"}},testnet:!0}),$e=1,jr=e({id:34443,name:"Mode Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.mode.network"]}},blockExplorers:{default:{name:"Modescan",url:"https://modescan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:2465882}},sourceId:$e}),We=11155111,Zr=e({id:919,name:"Mode Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.mode.network"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia.explorer.mode.network",apiUrl:"https://sepolia.explorer.mode.network/api"}},contracts:{multicall3:{address:"0xBAba8373113Fb7a68f195deF18732e01aF8eDfCF",blockCreated:3019007}},testnet:!0,sourceId:We}),$r=e({id:1287,name:"Moonbase Alpha",nativeCurrency:{decimals:18,name:"DEV",symbol:"DEV"},rpcUrls:{default:{http:["https://rpc.api.moonbase.moonbeam.network"],webSocket:["wss://wss.api.moonbase.moonbeam.network"]}},blockExplorers:{default:{name:"Moonscan",url:"https://moonbase.moonscan.io",apiUrl:"https://moonbase.moonscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1850686}},testnet:!0}),Wr=e({id:1284,name:"Moonbeam",nativeCurrency:{decimals:18,name:"GLMR",symbol:"GLMR"},rpcUrls:{default:{http:["https://moonbeam.public.blastapi.io"],webSocket:["wss://moonbeam.public.blastapi.io"]}},blockExplorers:{default:{name:"Moonscan",url:"https://moonscan.io",apiUrl:"https://api-moonbeam.moonscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:609002}},testnet:!1}),Qr=e({id:1281,name:"Moonbeam Development Node",nativeCurrency:{decimals:18,name:"DEV",symbol:"DEV"},rpcUrls:{default:{http:["http://127.0.0.1:9944"],webSocket:["wss://127.0.0.1:9944"]}}}),Yr=e({id:1285,name:"Moonriver",nativeCurrency:{decimals:18,name:"MOVR",symbol:"MOVR"},rpcUrls:{default:{http:["https://moonriver.public.blastapi.io"],webSocket:["wss://moonriver.public.blastapi.io"]}},blockExplorers:{default:{name:"Moonscan",url:"https://moonriver.moonscan.io",apiUrl:"https://api-moonriver.moonscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1597904}},testnet:!1}),Jr=e({id:2710,name:"Morph Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.morphl2.io"]}},blockExplorers:{default:{name:"Morph Testnet Explorer",url:"https://explorer-testnet.morphl2.io",apiUrl:"https://explorer-api-testnet.morphl2.io/api"}},testnet:!0}),es=e({id:22222,name:"Nautilus Mainnet",nativeCurrency:{name:"ZBC",symbol:"ZBC",decimals:9},rpcUrls:{default:{http:["https://api.nautilus.nautchain.xyz"]}},blockExplorers:{default:{name:"NautScan",url:"https://nautscan.com"}}}),ts=e({id:245022926,name:"Neon EVM DevNet",nativeCurrency:{name:"NEON",symbol:"NEON",decimals:18},rpcUrls:{default:{http:["https://devnet.neonevm.org"]}},blockExplorers:{default:{name:"Neonscan",url:"https://devnet.neonscan.org"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:205206112}},testnet:!0}),as=e({id:245022934,network:"neonMainnet",name:"Neon EVM MainNet",nativeCurrency:{name:"NEON",symbol:"NEON",decimals:18},rpcUrls:{default:{http:["https://neon-proxy-mainnet.solana.p2p.org"]}},blockExplorers:{default:{name:"Neonscan",url:"https://neonscan.org"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:206545524}},testnet:!1}),rs=e({id:4242,name:"Nexi",nativeCurrency:{name:"Nexi",symbol:"NEXI",decimals:18},rpcUrls:{default:{http:["https://rpc.chain.nexi.technology"]}},blockExplorers:{default:{name:"NexiScan",url:"https://www.nexiscan.com",apiUrl:"https://www.nexiscan.com/api"}},contracts:{multicall3:{address:"0x0277A46Cc69A57eE3A6C8c158bA874832F718B8E",blockCreated:25770160}}}),ss=e({id:240,name:"Nexilix Smart Chain",nativeCurrency:{decimals:18,name:"Nexilix",symbol:"NEXILIX"},rpcUrls:{default:{http:["https://rpcurl.pos.nexilix.com"]}},blockExplorers:{default:{name:"NexilixScan",url:"https://scan.nexilix.com"}},contracts:{multicall3:{address:"0x58381c8e2BF9d0C2C4259cA14BdA9Afe02831244",blockCreated:74448}}}),ns=e({id:248,name:"Oasys",nativeCurrency:{name:"Oasys",symbol:"OAS",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.oasys.games"]}},blockExplorers:{default:{name:"OasysScan",url:"https://scan.oasys.games",apiUrl:"https://scan.oasys.games/api"}}}),ls=e({id:4090,network:"oasis-testnet",name:"Oasis Testnet",nativeCurrency:{name:"Fasttoken",symbol:"FTN",decimals:18},rpcUrls:{default:{http:["https://rpc1.oasis.bahamutchain.com"]},public:{http:["https://rpc1.oasis.bahamutchain.com"]}},blockExplorers:{default:{name:"Ftnscan",url:"https://oasis.ftnscan.com",apiUrl:"https://oasis.ftnscan.com/api"}},testnet:!0}),os=e({id:66,name:"OKC",nativeCurrency:{decimals:18,name:"OKT",symbol:"OKT"},rpcUrls:{default:{http:["https://exchainrpc.okex.org"]}},blockExplorers:{default:{name:"oklink",url:"https://www.oklink.com/okc"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:10364792}}}),D=1,cs=e({...l,id:10,name:"OP Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.optimism.io"]}},blockExplorers:{default:{name:"Optimism Explorer",url:"https://optimistic.etherscan.io",apiUrl:"https://api-optimistic.etherscan.io/api"}},contracts:{...l.contracts,l2OutputOracle:{[D]:{address:"0xdfe97868233d1aa22e815a266982f2cf17685a27"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4286263},portal:{[D]:{address:"0xbEb5Fc579115071764c7423A4f12eDde41f106Ed"}},l1StandardBridge:{[D]:{address:"0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1"}}},sourceId:D}),I=5,is=e({...l,id:420,name:"Optimism Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://goerli.optimism.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli-optimism.etherscan.io",apiUrl:"https://goerli-optimism.etherscan.io/api"}},contracts:{...l.contracts,l2OutputOracle:{[I]:{address:"0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:49461},portal:{[I]:{address:"0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383"}},l1StandardBridge:{[I]:{address:"0x636Af16bf2f682dD3109e60102b8E1A089FedAa8"}}},testnet:!0,sourceId:I}),C=11155111,ps=e({...l,id:11155420,name:"OP Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.optimism.io"]}},blockExplorers:{default:{name:"Blockscout",url:"https://optimism-sepolia.blockscout.com",apiUrl:"https://optimism-sepolia.blockscout.com/api"}},contracts:{...l.contracts,disputeGameFactory:{[C]:{address:"0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1"}},l2OutputOracle:{[C]:{address:"0x90E9c4f8a994a250F6aEfd61CAFb4F2e895D458F"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1620204},portal:{[C]:{address:"0x16Fc5058F25648194471939df75CF27A2fdC48BC"}},l1StandardBridge:{[C]:{address:"0xFBb0621E0B23b5478B630BD55a5f21f67730B0F1"}}},testnet:!0,sourceId:C}),ds=e({id:204,name:"opBNB",nativeCurrency:{name:"BNB",symbol:"BNB",decimals:18},rpcUrls:{default:{http:["https://opbnb-mainnet-rpc.bnbchain.org"]}},blockExplorers:{default:{name:"opbnbscan",url:"https://mainnet.opbnbscan.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:512881}}}),ms=e({id:5611,name:"opBNB Testnet",nativeCurrency:{decimals:18,name:"tBNB",symbol:"tBNB"},rpcUrls:{default:{http:["https://opbnb-testnet-rpc.bnbchain.org"]}},blockExplorers:{default:{name:"opbnbscan",url:"https://testnet.opbnbscan.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3705108}},testnet:!0}),us=e({id:9700,name:"OORT MainnetDev",nativeCurrency:{decimals:18,name:"OORT",symbol:"OORT"},rpcUrls:{default:{http:["https://dev-rpc.oortech.com"]}},blockExplorers:{oort:{name:"OORT MainnetDev Explorer",url:"https://dev-scan.oortech.com"},default:{name:"OORT MainnetDev Explorer",url:"https://dev-scan.oortech.com"}}}),bs=e({id:41144114,name:"Otim Devnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["http://devnet.otim.xyz"]}},contracts:{batchInvoker:{address:"0x5FbDB2315678afecb367f032d93F642f64180aa3"}}}),hs=e({id:11297108109,name:"Palm",nativeCurrency:{decimals:18,name:"PALM",symbol:"PALM"},rpcUrls:{default:{http:["https://palm-mainnet.public.blastapi.io"],webSocket:["wss://palm-mainnet.public.blastapi.io"]}},blockExplorers:{default:{name:"Chainlens",url:"https://palm.chainlens.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15429248}}}),ks=e({id:11297108099,name:"Palm Testnet",nativeCurrency:{decimals:18,name:"PALM",symbol:"PALM"},rpcUrls:{default:{http:["https://palm-mainnet.public.blastapi.io"],webSocket:["wss://palm-mainnet.public.blastapi.io"]}},blockExplorers:{default:{name:"Chainlens",url:"https://palm.chainlens.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15429248}},testnet:!0}),xs=e({...x,id:1612127,name:"PlayFi Albireo Testnet",network:"albireo",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://albireo-rpc.playfi.ai"],webSocket:["wss://albireo-rpc-ws.playfi.ai/ws"]}},blockExplorers:{default:{name:"PlayFi Albireo Explorer",url:"https://albireo-explorer.playfi.ai"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963"}},testnet:!0}),_=1,fs=e({id:424,network:"pgn",name:"PGN",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.publicgoods.network"]}},blockExplorers:{default:{name:"PGN Explorer",url:"https://explorer.publicgoods.network",apiUrl:"https://explorer.publicgoods.network/api"},blocksout:{name:"PGN Explorer",url:"https://explorer.publicgoods.network",apiUrl:"https://explorer.publicgoods.network/api"}},contracts:{l2OutputOracle:{[_]:{address:"0x9E6204F750cD866b299594e2aC9eA824E2e5f95c"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3380209},portal:{[_]:{address:"0xb26Fd985c5959bBB382BAFdD0b879E149e48116c"}},l1StandardBridge:{[_]:{address:"0xD0204B9527C1bA7bD765Fa5CCD9355d38338272b"}}},formatters:Z,sourceId:_}),H=11155111,ys=e({id:58008,network:"pgn-testnet",name:"PGN ",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.publicgoods.network"]}},blockExplorers:{default:{name:"PGN Testnet Explorer",url:"https://explorer.sepolia.publicgoods.network",apiUrl:"https://explorer.sepolia.publicgoods.network/api"},blocksout:{name:"PGN Testnet Explorer",url:"https://explorer.sepolia.publicgoods.network",apiUrl:"https://explorer.sepolia.publicgoods.network/api"}},contracts:{l2OutputOracle:{[H]:{address:"0xD5bAc3152ffC25318F848B3DD5dA6C85171BaEEe"}},portal:{[H]:{address:"0xF04BdD5353Bb0EFF6CA60CfcC78594278eBfE179"}},l1StandardBridge:{[H]:{address:"0xFaE6abCAF30D23e233AC7faF747F2fC3a5a6Bfa3"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3754925}},formatters:Z,sourceId:H,testnet:!0}),Es=e({id:13381,name:"Phoenix Blockchain",nativeCurrency:{name:"Phoenix",symbol:"PHX",decimals:18},rpcUrls:{default:{http:["https://rpc.phoenixplorer.com"]}},blockExplorers:{default:{name:"Phoenixplorer",url:"https://phoenixplorer.com",apiUrl:"https://phoenixplorer.com/api"}},contracts:{multicall3:{address:"0x498cF757a575cFF2c2Ed9f532f56Efa797f86442",blockCreated:5620192}}}),Cs=e({id:242,name:"Plinga",nativeCurrency:{name:"Plinga",symbol:"PLINGA",decimals:18},rpcUrls:{default:{http:["https://rpcurl.mainnet.plgchain.com"]}},blockExplorers:{default:{name:"Plgscan",url:"https://www.plgscan.com"}},contracts:{multicall3:{address:"0x0989576160f2e7092908BB9479631b901060b6e4",blockCreated:204489}}}),Qe=11155111,ws=e({id:161221135,name:"Plume Testnet",nativeCurrency:{name:"Plume Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.plumenetwork.xyz/http"],webSocket:["wss://testnet-rpc.plumenetwork.xyz/ws"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet-explorer.plumenetwork.xyz",apiUrl:"https://testnet-explorer.plumenetwork.xyz/api"}},testnet:!0,sourceId:Qe}),vs=e({id:137,name:"Polygon",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{default:{http:["https://polygon-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://polygonscan.com",apiUrl:"https://api.polygonscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}}}),Ts=e({id:80002,name:"Polygon Amoy",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{default:{http:["https://rpc-amoy.polygon.technology"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://amoy.polygonscan.com/",apiUrl:"https://api-amoy.polygonscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:3127388}},testnet:!0}),Us=e({id:80001,name:"Polygon Mumbai",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{default:{http:["https://rpc.ankr.com/polygon_mumbai"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://mumbai.polygonscan.com",apiUrl:"https://api-testnet.polygonscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}},testnet:!0}),gs=e({id:1101,name:"Polygon zkEVM",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://zkevm-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://zkevm.polygonscan.com",apiUrl:"https://api-zkevm.polygonscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:57746}}}),Ss=e({id:2442,name:"Polygon zkEVM Cardona",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.cardona.zkevm-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://cardona-zkevm.polygonscan.com",apiUrl:"https://cardona-zkevm.polygonscan.com/api"}},testnet:!0,contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:114091}}}),As=e({id:1442,name:"Polygon zkEVM Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.public.zkevm-test.net"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://testnet-zkevm.polygonscan.com",apiUrl:"https://testnet-zkevm.polygonscan.com/api"}},testnet:!0,contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:525686}}}),Bs=e({id:369,name:"PulseChain",nativeCurrency:{name:"Pulse",symbol:"PLS",decimals:18},testnet:!1,rpcUrls:{default:{http:["https://rpc.pulsechain.com"],webSocket:["wss://ws.pulsechain.com"]}},blockExplorers:{default:{name:"PulseScan",url:"https://scan.pulsechain.com",apiUrl:"https://api.scan.pulsechain.com/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),Fs=e({id:943,name:"PulseChain V4",testnet:!0,nativeCurrency:{name:"V4 Pulse",symbol:"v4PLS",decimals:18},rpcUrls:{default:{http:["https://rpc.v4.testnet.pulsechain.com"],webSocket:["wss://ws.v4.testnet.pulsechain.com"]}},blockExplorers:{default:{name:"PulseScan",url:"https://scan.v4.testnet.pulsechain.com",apiUrl:"https://scan.v4.testnet.pulsechain.com/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),Ms=e({id:35441,name:"Q Mainnet",nativeCurrency:{decimals:18,name:"Q",symbol:"Q"},rpcUrls:{default:{http:["https://rpc.q.org"]}},blockExplorers:{default:{name:"Q Mainnet Explorer",url:"https://explorer.q.org",apiUrl:"https://explorer.q.org/api"}}}),zs=e({id:35443,name:"Q Testnet",nativeCurrency:{decimals:18,name:"Q",symbol:"Q"},rpcUrls:{default:{http:["https://rpc.qtestnet.org"]}},blockExplorers:{default:{name:"Q Testnet Explorer",url:"https://explorer.qtestnet.org",apiUrl:"https://explorer.qtestnet.org/api"}},testnet:!0}),Ds=e({id:1729,name:"Reya Network",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.reya.network"],webSocket:["wss://ws.reya.network"]}},blockExplorers:{default:{name:"Reya Network Explorer",url:"https://explorer.reya.network"}},testnet:!1}),Is=e({id:570,name:"Rollux Mainnet",nativeCurrency:{decimals:18,name:"Syscoin",symbol:"SYS"},rpcUrls:{default:{http:["https://rpc.rollux.com"],webSocket:["wss://rpc.rollux.com/wss"]}},blockExplorers:{default:{name:"RolluxExplorer",url:"https://explorer.rollux.com",apiUrl:"https://explorer.rollux.com/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:119222}}}),_s=e({id:57e3,name:"Rollux Testnet",nativeCurrency:{decimals:18,name:"Syscoin",symbol:"SYS"},rpcUrls:{default:{http:["https://rpc-tanenbaum.rollux.com/"],webSocket:["wss://rpc-tanenbaum.rollux.com/wss"]}},blockExplorers:{default:{name:"RolluxTestnetExplorer",url:"https://rollux.tanenbaum.io",apiUrl:"https://rollux.tanenbaum.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1813675}}}),Hs=e({id:2020,name:"Ronin",nativeCurrency:{name:"RON",symbol:"RON",decimals:18},rpcUrls:{default:{http:["https://api.roninchain.com/rpc"]}},blockExplorers:{default:{name:"Ronin Explorer",url:"https://app.roninchain.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:26023535}}}),Ps=e({id:30,name:"Rootstock Mainnet",network:"rootstock",nativeCurrency:{decimals:18,name:"Rootstock Bitcoin",symbol:"RBTC"},rpcUrls:{default:{http:["https://public-node.rsk.co"]}},blockExplorers:{default:{name:"RSK Explorer",url:"https://explorer.rsk.co"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:4249540}}}),Os=e({id:31,name:"Rootstock Testnet",network:"rootstock",nativeCurrency:{decimals:18,name:"Rootstock Bitcoin",symbol:"tRBTC"},rpcUrls:{default:{http:["https://public-node.testnet.rsk.co"]}},blockExplorers:{default:{name:"RSK Explorer",url:"https://explorer.testnet.rootstock.io"}}}),P=1,Ls=e({...l,id:12553,name:"RSS3 VSL Mainnet",nativeCurrency:{name:"RSS3",symbol:"RSS3",decimals:18},rpcUrls:{default:{http:["https://rpc.rss3.io"]}},blockExplorers:{default:{name:"RSS3 VSL Mainnet Scan",url:"https://scan.rss3.io",apiUrl:"https://scan.rss3.io/api"}},contracts:{...l.contracts,l2OutputOracle:{[P]:{address:"0xE6f24d2C32B3109B18ed33cF08eFb490b1e09C10"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14193},portal:{[P]:{address:"0x6A12432491bbbE8d3babf75F759766774C778Db4",blockCreated:19387057}},l1StandardBridge:{[P]:{address:"0x4cbab69108Aa72151EDa5A3c164eA86845f18438"}}},sourceId:P}),O=11155111,Ns=e({...l,id:2331,name:"RSS3 VSL Sepolia Testnet",nativeCurrency:{name:"RSS3",symbol:"RSS3",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.rss3.io"]}},blockExplorers:{default:{name:"RSS3 VSL Sepolia Testnet Scan",url:"https://scan.testnet.rss3.io",apiUrl:"https://scan.testnet.rss3.io/api"}},contracts:{...l.contracts,l2OutputOracle:{[O]:{address:"0xDb5c46C3Eaa6Ed6aE8b2379785DF7dd029C0dC81"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:55697},portal:{[O]:{address:"0xcBD77E8E1E7F06B25baDe67142cdE82652Da7b57",blockCreated:5345035}},l1StandardBridge:{[O]:{address:"0xdDD29bb63B0839FB1cE0eE439Ff027738595D07B"}}},testnet:!0,sourceId:O}),Rs=e({id:2021,name:"Saigon Testnet",nativeCurrency:{name:"RON",symbol:"RON",decimals:18},rpcUrls:{default:{http:["https://saigon-testnet.roninchain.com/rpc"]}},blockExplorers:{default:{name:"Saigon Explorer",url:"https://saigon-app.roninchain.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:18736871}},testnet:!0}),Ks=e({id:23294,name:"Oasis Sapphire",network:"sapphire",nativeCurrency:{name:"Sapphire Rose",symbol:"ROSE",decimals:18},rpcUrls:{default:{http:["https://sapphire.oasis.io"],webSocket:["wss://sapphire.oasis.io/ws"]}},blockExplorers:{default:{name:"Oasis Explorer",url:"https://explorer.oasis.io/mainnet/sapphire"},blockscout:{name:"Oasis Sapphire Explorer",url:"https://old-explorer.sapphire.oasis.io",apiUrl:"https://old-explorer.sapphire.oasis.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:734531}}}),Gs=e({id:23295,name:"Oasis Sapphire Testnet",network:"sapphire-testnet",nativeCurrency:{name:"Sapphire Test Rose",symbol:"TEST",decimals:18},rpcUrls:{default:{http:["https://testnet.sapphire.oasis.dev"],webSocket:["wss://testnet.sapphire.oasis.dev/ws"]}},blockExplorers:{default:{name:"Oasis Explorer",url:"https://explorer.oasis.io/testnet/sapphire"},blockscout:{name:"Oasis Sapphire Testnet Explorer",url:"https://testnet.old-explorer.sapphire.oasis.dev",apiUrl:"https://testnet.old-explorer.sapphire.oasis.dev/api"}},testnet:!0}),Vs=e({id:534352,name:"Scroll",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.scroll.io"],webSocket:["wss://wss-rpc.scroll.io/ws"]}},blockExplorers:{default:{name:"Scrollscan",url:"https://scrollscan.com",apiUrl:"https://api.scrollscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14}},testnet:!1}),Xs=e({id:534351,name:"Scroll Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rpc.scroll.io"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia-blockscout.scroll.io",apiUrl:"https://sepolia-blockscout.scroll.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:9473}},testnet:!0}),qs=e({id:534353,name:"Scroll Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://alpha-rpc.scroll.io/l2"],webSocket:["wss://alpha-rpc.scroll.io/l2/ws"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.scroll.io",apiUrl:"https://blockscout.scroll.io/api"}},testnet:!0}),js=e({id:713715,name:"Sei Devnet",nativeCurrency:{name:"Sei",symbol:"SEI",decimals:18},rpcUrls:{default:{http:["https://evm-rpc-arctic-1.sei-apis.com"]}},blockExplorers:{default:{name:"Seitrace",url:"https://seitrace.com"}},testnet:!0}),Zs=e({id:11155111,name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.sepolia.org"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.etherscan.io",apiUrl:"https://api-sepolia.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc8Af999e38273D658BE1b921b88A9Ddf005769cC",blockCreated:5317080}},testnet:!0}),$s=e({id:148,name:"Shimmer",network:"shimmer",nativeCurrency:{decimals:18,name:"Shimmer",symbol:"SMR"},rpcUrls:{default:{http:["https://json-rpc.evm.shimmer.network"]}},blockExplorers:{default:{name:"Shimmer Network Explorer",url:"https://explorer.evm.shimmer.network",apiUrl:"https://explorer.evm.shimmer.network/api"}}}),Ws=e({id:1073,name:"Shimmer Testnet",network:"shimmer-testnet",nativeCurrency:{decimals:18,name:"Shimmer",symbol:"SMR"},rpcUrls:{default:{http:["https://json-rpc.evm.testnet.shimmer.network"]}},blockExplorers:{default:{name:"Shimmer Network Explorer",url:"https://explorer.evm.testnet.shimmer.network",apiUrl:"https://explorer.evm.testnet.shimmer.network/api"}},testnet:!0}),Qs=e({id:391845894,name:"SKALE | Block Brawlers",nativeCurrency:{name:"BRAWL",symbol:"BRAWL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/frayed-decent-antares"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/frayed-decent-antares"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://frayed-decent-antares.explorer.mainnet.skalenodes.com"}},contracts:{}}),Ys=e({id:1564830818,name:"SKALE | Calypso NFT Hub",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/honorable-steel-rasalhague"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/honorable-steel-rasalhague"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://honorable-steel-rasalhague.explorer.mainnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3107626}}}),Js=e({id:974399131,name:"SKALE Calypso Testnet",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://testnet.skalenodes.com/v1/giant-half-dual-testnet"],webSocket:["wss://testnet.skalenodes.com/v1/ws/giant-half-dual-testnet"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://giant-half-dual-testnet.explorer.testnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:103220}},testnet:!0}),en=e({id:1026062157,name:"SKALE | CryptoBlades",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/affectionate-immediate-pollux"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/affectionate-immediate-pollux"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://affectionate-immediate-pollux.explorer.mainnet.skalenodes.com"}},contracts:{}}),tn=e({id:1032942172,name:"SKALE | Crypto Colosseum",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/haunting-devoted-deneb"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/haunting-devoted-deneb"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://haunting-devoted-deneb.explorer.mainnet.skalenodes.com"}},contracts:{}}),an=e({id:2046399126,name:"SKALE | Europa Liquidity Hub",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/elated-tan-skat"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/elated-tan-skat"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://elated-tan-skat.explorer.mainnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3113495}}}),rn=e({id:1444673419,name:"SKALE Europa Testnet",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://testnet.skalenodes.com/v1/juicy-low-small-testnet"],webSocket:["wss://testnet.skalenodes.com/v1/ws/juicy-low-small-testnet"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://juicy-low-small-testnet.explorer.testnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:110858}},testnet:!0}),sn=e({id:2139927552,name:"SKALE | Exorde",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/light-vast-diphda"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/light-vast-diphda"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://light-vast-diphda.explorer.mainnet.skalenodes.com"}},contracts:{}}),nn=e({id:1273227453,name:"SKALE | Human Protocol",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/wan-red-ain"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/wan-red-ain"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://wan-red-ain.explorer.mainnet.skalenodes.com"}},contracts:{}}),ln=e({id:1482601649,name:"SKALE | Nebula Gaming Hub",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/green-giddy-denebola"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/green-giddy-denebola"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://green-giddy-denebola.explorer.mainnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2372986}}}),on=e({id:37084624,name:"SKALE Nebula Testnet",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://testnet.skalenodes.com/v1/lanky-ill-funny-testnet"],webSocket:["wss://testnet.skalenodes.com/v1/ws/lanky-ill-funny-testnet"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://lanky-ill-funny-testnet.explorer.testnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:105141}},testnet:!0}),cn=e({id:278611351,name:"SKALE | Razor Network",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/turbulent-unique-scheat"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/turbulent-unique-scheat"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://turbulent-unique-scheat.explorer.mainnet.skalenodes.com"}},contracts:{}}),pn=e({id:1350216234,name:"SKALE | Titan Community Hub",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/parallel-stormy-spica"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/parallel-stormy-spica"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://parallel-stormy-spica.explorer.mainnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2076458}}}),dn=e({id:1020352220,name:"SKALE Titan Hub",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://testnet.skalenodes.com/v1/aware-fake-trim-testnet"],webSocket:["wss://testnet.skalenodes.com/v1/ws/aware-fake-trim-testnet"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://aware-fake-trim-testnet.explorer.testnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:104072}},testnet:!0}),mn=e({id:19,name:"Songbird Mainnet",nativeCurrency:{decimals:18,name:"songbird",symbol:"SGB"},rpcUrls:{default:{http:["https://songbird-api.flare.network/ext/C/rpc"]}},blockExplorers:{default:{name:"Songbird Explorer",url:"https://songbird-explorer.flare.network",apiUrl:"https://songbird-explorer.flare.network/api"}}}),un=e({id:16,name:"Coston",nativeCurrency:{decimals:18,name:"costonflare",symbol:"CFLR"},rpcUrls:{default:{http:["https://coston-api.flare.network/ext/C/rpc"]}},blockExplorers:{default:{name:"Coston Explorer",url:"https://coston-explorer.flare.network",apiUrl:"https://coston-explorer.flare.network/api"}},testnet:!0}),bn=e({id:88882,name:"Chiliz Spicy Testnet",network:"chiliz-spicy-Testnet",nativeCurrency:{decimals:18,name:"CHZ",symbol:"CHZ"},rpcUrls:{default:{http:["https://spicy-rpc.chiliz.com","https://chiliz-spicy-rpc.publicnode.com"],webSocket:["wss://spicy-rpc-ws.chiliz.com","wss://chiliz-spicy-rpc.publicnode.com"]}},blockExplorers:{default:{name:"Chiliz Explorer",url:"http://spicy-explorer.chiliz.com",apiUrl:"http://spicy-explorer.chiliz.com/api"}},testnet:!0}),hn=e({id:8082,name:"Shardeum Sphinx",nativeCurrency:{name:"SHARDEUM",symbol:"SHM",decimals:18},rpcUrls:{default:{http:["https://sphinx.shardeum.org"]}},blockExplorers:{default:{name:"Shardeum Explorer",url:"https://explorer-sphinx.shardeum.org"}},testnet:!0}),kn=e({id:109,name:"Shibarium",network:"shibarium",nativeCurrency:{name:"Bone",symbol:"BONE",decimals:18},rpcUrls:{default:{http:["https://rpc.shibrpc.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://shibariumscan.io"}},contracts:{multicall3:{address:"0x864Bf681ADD6052395188A89101A1B37d3B4C961",blockCreated:265900}}}),xn=e({id:105105,name:"Stratis Mainnet",network:"stratis",nativeCurrency:{name:"Stratis",symbol:"STRAX",decimals:18},rpcUrls:{default:{http:["https://rpc.stratisevm.com"]}},blockExplorers:{default:{name:"Stratis Explorer",url:"https://explorer.stratisevm.com"}}}),fn=e({id:57,name:"Syscoin Mainnet",nativeCurrency:{decimals:18,name:"Syscoin",symbol:"SYS"},rpcUrls:{default:{http:["https://rpc.syscoin.org"],webSocket:["wss://rpc.syscoin.org/wss"]}},blockExplorers:{default:{name:"SyscoinExplorer",url:"https://explorer.syscoin.org",apiUrl:"https://explorer.syscoin.org/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:287139}}}),yn=e({id:5700,name:"Syscoin Tanenbaum Testnet",nativeCurrency:{decimals:18,name:"Syscoin",symbol:"SYS"},rpcUrls:{default:{http:["https://rpc.tanenbaum.io"],webSocket:["wss://rpc.tanenbaum.io/wss"]}},blockExplorers:{default:{name:"SyscoinTestnetExplorer",url:"https://tanenbaum.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:271288}}}),En=e({id:841,name:"Taraxa Mainnet",nativeCurrency:{name:"Tara",symbol:"TARA",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.taraxa.io"]}},blockExplorers:{default:{name:"Taraxa Explorer",url:"https://explorer.mainnet.taraxa.io"}}}),Cn=e({id:167009,name:"Taiko Hekla L2",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.hekla.taiko.xyz"]}},blockExplorers:{default:{name:"Taikoscan",url:"https://hekla.taikoscan.network"}}}),wn=e({id:167007,name:"Taiko Jolnir (Alpha-5 Testnet)",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.jolnir.taiko.xyz"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.jolnir.taiko.xyz"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:732706}},testnet:!0}),vn=e({id:167008,name:"Taiko Katla (Alpha-6 Testnet)",network:"tko-katla",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.katla.taiko.xyz"]},public:{http:["https://rpc.katla.taiko.xyz"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.katla.taiko.xyz"}}}),Tn=e({id:167005,name:"Taiko (Alpha-3 Testnet)",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.test.taiko.xyz"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.test.taiko.xyz"}}}),Un=e({id:842,name:"Taraxa Testnet",nativeCurrency:{name:"Tara",symbol:"TARA",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.taraxa.io"]}},blockExplorers:{default:{name:"Taraxa Explorer",url:"https://explorer.testnet.taraxa.io"}},testnet:!0}),gn=e({id:2017,name:"Telcoin Adiri Testnet",nativeCurrency:{name:"Telcoin",symbol:"TEL",decimals:18},rpcUrls:{default:{http:["https://rpc.telcoin.network"]}},blockExplorers:{default:{name:"telscan",url:"https://telscan.io"}},testnet:!0}),Sn=e({id:40,name:"Telos",nativeCurrency:{decimals:18,name:"Telos",symbol:"TLOS"},rpcUrls:{default:{http:["https://mainnet.telos.net/evm"]}},blockExplorers:{default:{name:"Teloscan",url:"https://www.teloscan.io/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:246530709}}}),An=e({id:41,name:"Telos",nativeCurrency:{decimals:18,name:"Telos",symbol:"TLOS"},rpcUrls:{default:{http:["https://testnet.telos.net/evm"]}},blockExplorers:{default:{name:"Teloscan (testnet)",url:"https://testnet.teloscan.io/"}},testnet:!0}),Bn=e({id:1559,name:"Tenet",network:"tenet-mainnet",nativeCurrency:{name:"TENET",symbol:"TENET",decimals:18},rpcUrls:{default:{http:["https://rpc.tenet.org"]}},blockExplorers:{default:{name:"TenetScan Mainnet",url:"https://tenetscan.io",apiUrl:"https://tenetscan.io/api"}},testnet:!1}),Fn=e({id:7,name:"ThaiChain",nativeCurrency:{name:"TCH",symbol:"TCH",decimals:18},rpcUrls:{default:{http:["hhttps://rpc.thaichain.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://exp.thaichain.org",apiUrl:"https://exp.thaichain.org/api"}},contracts:{multicall3:{address:"0x0DaD6130e832c21719C5CE3bae93454E16A84826",blockCreated:4806386}},testnet:!1}),Mn=e({id:997,name:"5ireChain Thunder Testnet",nativeCurrency:{name:"5ire Token",symbol:"5IRE",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.5ire.network"]}},blockExplorers:{default:{name:"5ireChain Explorer",url:"https://explorer.5ire.network"}},testnet:!0}),zn=e({id:100009,name:"Vechain",nativeCurrency:{name:"VeChain",symbol:"VET",decimals:18},rpcUrls:{default:{http:["https://mainnet.vechain.org"]}},blockExplorers:{default:{name:"Vechain Explorer",url:"https://explore.vechain.org"},vechainStats:{name:"Vechain Stats",url:"https://vechainstats.com"}}}),Dn=e({id:888,name:"Wanchain",nativeCurrency:{name:"WANCHAIN",symbol:"WAN",decimals:18},rpcUrls:{default:{http:["https://gwan-ssl.wandevs.org:56891","https://gwan2-ssl.wandevs.org"]}},blockExplorers:{default:{name:"WanScan",url:"https://wanscan.org"}},contracts:{multicall3:{address:"0xcDF6A1566e78EB4594c86Fe73Fcdc82429e97fbB",blockCreated:25312390}}}),In=e({id:999,name:"Wanchain Testnet",nativeCurrency:{name:"WANCHAIN",symbol:"WANt",decimals:18},rpcUrls:{default:{http:["https://gwan-ssl.wandevs.org:46891"]}},blockExplorers:{default:{name:"WanScanTest",url:"https://wanscan.org"}},contracts:{multicall3:{address:"0x11c89bF4496c39FB80535Ffb4c92715839CC5324",blockCreated:24743448}},testnet:!0}),_n=e({id:1111,name:"WEMIX",network:"wemix-mainnet",nativeCurrency:{name:"WEMIX",symbol:"WEMIX",decimals:18},rpcUrls:{default:{http:["https://api.wemix.com"]},public:{http:["https://api.wemix.com"]}},blockExplorers:{default:{name:"wemixExplorer",url:"https://explorer.wemix.com"}}}),Hn=e({id:1112,name:"WEMIX Testnet",network:"wemix-testnet",nativeCurrency:{name:"WEMIX",symbol:"tWEMIX",decimals:18},rpcUrls:{default:{http:["https://api.test.wemix.com"]},public:{http:["https://api.test.wemix.com"]}},blockExplorers:{default:{name:"wemixExplorer",url:"https://testnet.wemixscan.com",apiUrl:"https://testnet.wemixscan.com/api"}},testnet:!0}),Pn=e({id:195,name:"X1 Testnet",nativeCurrency:{decimals:18,name:"OKB",symbol:"OKB"},rpcUrls:{default:{http:["https://x1testrpc.okx.com"]}},blockExplorers:{default:{name:"OKLink",url:"https://www.oklink.com/x1-test"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:624344}},testnet:!0}),On=e({id:196,name:"X Layer Mainnet",nativeCurrency:{decimals:18,name:"OKB",symbol:"OKB"},rpcUrls:{default:{http:["https://rpc.xlayer.tech"]}},blockExplorers:{default:{name:"OKLink",url:"https://www.oklink.com/xlayer"}}}),Ln=e({id:50,name:"XinFin Network",nativeCurrency:{decimals:18,name:"XDC",symbol:"XDC"},rpcUrls:{default:{http:["https://rpc.xinfin.network"]}},blockExplorers:{xinfin:{name:"XinFin",url:"https://explorer.xinfin.network"},default:{name:"Blocksscan",url:"https://xdc.blocksscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:71542788}}}),Nn=e({id:51,name:"Apothem Network",nativeCurrency:{decimals:18,name:"TXDC",symbol:"TXDC"},rpcUrls:{default:{http:["https://erpc.apothem.network"]}},blockExplorers:{default:{name:"Blocksscan",url:"https://apothem.blocksscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:59765389}}}),Rn=e({id:50005,name:"Yooldo Verse",nativeCurrency:{name:"OAS",symbol:"OAS",decimals:18},rpcUrls:{default:{http:["https://rpc.yooldo-verse.xyz"]}},blockExplorers:{default:{name:"Yooldo Verse Explorer",url:"https://explorer.yooldo-verse.xyz"}}}),Kn=e({id:50006,name:"Yooldo Verse Testnet",nativeCurrency:{name:"OAS",symbol:"OAS",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.yooldo-verse.xyz"]}},blockExplorers:{default:{name:"Yooldo Verse Testnet Explorer",url:"https://explorer.testnet.yooldo-verse.xyz"}},testnet:!0}),Gn=e({id:7e3,name:"ZetaChain",nativeCurrency:{decimals:18,name:"Zeta",symbol:"ZETA"},rpcUrls:{default:{http:["https://zetachain-evm.blockpi.network/v1/rpc/public"]}},blockExplorers:{default:{name:"ZetaScan",url:"https://explorer.zetachain.com"}},testnet:!1}),Vn=e({id:7001,name:"ZetaChain Athens Testnet",nativeCurrency:{decimals:18,name:"Zeta",symbol:"aZETA"},rpcUrls:{default:{http:["https://zetachain-athens-evm.blockpi.network/v1/rpc/public"]}},blockExplorers:{default:{name:"ZetaScan",url:"https://athens.explorer.zetachain.com"}},testnet:!0}),Xn=e({id:1337803,name:"Zhejiang",nativeCurrency:{name:"Zhejiang Ether",symbol:"ZhejETH",decimals:18},rpcUrls:{default:{http:["https://rpc.zhejiang.ethpandaops.io"]}},blockExplorers:{default:{name:"Beaconchain",url:"https://zhejiang.beaconcha.in"}},testnet:!0}),qn=e({id:32769,name:"Zilliqa",network:"zilliqa",nativeCurrency:{name:"Zilliqa",symbol:"ZIL",decimals:18},rpcUrls:{default:{http:["https://api.zilliqa.com"]}},blockExplorers:{default:{name:"Ethernal",url:"https://evmx.zilliqa.com"}},testnet:!1}),jn=e({id:33101,name:"Zilliqa Testnet",network:"zilliqa-testnet",nativeCurrency:{name:"Zilliqa",symbol:"ZIL",decimals:18},rpcUrls:{default:{http:["https://dev-api.zilliqa.com"]}},blockExplorers:{default:{name:"Ethernal",url:"https://evmx.testnet.zilliqa.com"}},testnet:!0}),Zn=e({id:42766,name:"ZKFair Mainnet",network:"zkfair-mainnet",nativeCurrency:{decimals:18,name:"USD Coin",symbol:"USDC"},rpcUrls:{default:{http:["https://rpc.zkfair.io"]},public:{http:["https://rpc.zkfair.io"]}},blockExplorers:{default:{name:"zkFair Explorer",url:"https://scan.zkfair.io",apiUrl:"https://scan.zkfair.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6090959}},testnet:!1}),$n=e({id:43851,name:"ZKFair Testnet",network:"zkfair-testnet",nativeCurrency:{decimals:18,name:"USD Coin",symbol:"USDC"},rpcUrls:{default:{http:["https://testnet-rpc.zkfair.io"]},public:{http:["https://testnet-rpc.zkfair.io"]}},blockExplorers:{default:{name:"zkFair Explorer",url:"https://testnet-scan.zkfair.io"}},testnet:!0}),Wn=e({...x,id:324,name:"zkSync Era",network:"zksync-era",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.era.zksync.io"],webSocket:["wss://mainnet.era.zksync.io/ws"]}},blockExplorers:{default:{name:"Etherscan",url:"https://era.zksync.network/",apiUrl:"https://api-era.zksync.network/api"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963"}}}),Qn=e({...x,id:260,name:"zkSync InMemory Node",network:"zksync-in-memory-node",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["http://localhost:8011"]}},testnet:!0}),Yn=e({...x,id:270,name:"zkSync CLI Local Node",network:"zksync-cli-local-node",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["http://localhost:3050"]}},testnet:!0}),Jn=e({...x,id:300,name:"zkSync Sepolia Testnet",network:"zksync-sepolia-testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.era.zksync.dev"],webSocket:["wss://sepolia.era.zksync.dev/ws"]}},blockExplorers:{default:{name:"zkExplorer",url:"https://sepolia.explorer.zksync.io/"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963"}},testnet:!0}),el=e({...x,id:280,name:"zkSync Era Testnet",network:"zksync-era-testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet.era.zksync.dev"],webSocket:["wss://testnet.era.zksync.dev/ws"]}},blockExplorers:{default:{name:"zkExplorer",url:"https://goerli.explorer.zksync.io"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963"}},testnet:!0}),L=1,tl=e({...l,id:7777777,name:"Zora",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.zora.energy"],webSocket:["wss://rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.zora.energy",apiUrl:"https://explorer.zora.energy/api"}},contracts:{...l.contracts,l2OutputOracle:{[L]:{address:"0x9E6204F750cD866b299594e2aC9eA824E2e5f95c"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:5882},portal:{[L]:{address:"0x1a0ad011913A150f69f6A19DF447A0CfD9551054"}},l1StandardBridge:{[L]:{address:"0x3e2Ea9B92B7E48A52296fD261dc26fd995284631"}}},sourceId:L}),N=11155111,al=e({...l,id:999999999,name:"Zora Sepolia",network:"zora-sepolia",nativeCurrency:{decimals:18,name:"Zora Sepolia",symbol:"ETH"},rpcUrls:{default:{http:["https://sepolia.rpc.zora.energy"],webSocket:["wss://sepolia.rpc.zora.energy"]}},blockExplorers:{default:{name:"Zora Sepolia Explorer",url:"https://sepolia.explorer.zora.energy/",apiUrl:"https://sepolia.explorer.zora.energy/api"}},contracts:{...l.contracts,l2OutputOracle:{[N]:{address:"0x2615B481Bd3E5A1C0C7Ca3Da1bdc663E8615Ade9"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:83160},portal:{[N]:{address:"0xeffE2C6cA9Ab797D418f0D91eA60807713f3536f"}},l1StandardBridge:{[N]:{address:"0x5376f1D543dcbB5BD416c56C189e4cB7399fCcCB"}}},sourceId:N,testnet:!0}),Y=5,rl=e({...l,id:999,name:"Zora Goerli Testnet",nativeCurrency:{decimals:18,name:"Zora Goerli",symbol:"ETH"},rpcUrls:{default:{http:["https://testnet.rpc.zora.energy"],webSocket:["wss://testnet.rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://testnet.explorer.zora.energy",apiUrl:"https://testnet.explorer.zora.energy/api"}},contracts:{...l.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:189123},portal:{[Y]:{address:"0xDb9F51790365e7dc196e7D072728df39Be958ACe"}}},sourceId:Y,testnet:!0});export{et as acala,tt as ancient8,at as ancient8Sepolia,rt as anvil,st as apexTestnet,nt as arbitrum,lt as arbitrumGoerli,ot as arbitrumNova,dt as arbitrumSepolia,mt as areonNetwork,ut as areonNetworkTestnet,ct as astar,it as astarZkEVM,pt as astarZkyoto,bt as aurora,ht as auroraTestnet,kt as auroria,xt as avalanche,ft as avalancheFuji,yt as bahamut,Et as base,Ct as baseGoerli,wt as baseSepolia,vt as beam,Tt as beamTestnet,Ut as bearNetworkChainMainnet,gt as bearNetworkChainTestnet,St as berachainTestnet,At as bevmMainnet,Bt as bitTorrent,Ft as bitTorrentTestnet,Mt as blast,zt as blastSepolia,Dt as bob,It as boba,_t as bronos,Ht as bronosTestnet,Pt as bsc,Lt as bscGreenfield,Ot as bscTestnet,Nt as btr,Rt as btrTestnet,Kt as bxn,Gt as bxnTestnet,Vt as canto,Xt as celo,qt as celoAlfajores,jt as chiliz,Zt as classic,$t as confluxESpace,Wt as confluxESpaceTestnet,Qt as coreDao,Yt as cronos,Jt as cronosTestnet,ea as crossbell,ta as cyber,aa as cyberTestnet,ra as darwinia,sa as defichainEvm,na as defichainEvmTestnet,la as degen,oa as dfk,ca as dodochainTestnet,ia as dogechain,pa as dreyerxMainnet,da as edgeless,ma as edgelessTestnet,ua as edgeware,ba as edgewareTestnet,Ca as ekta,wa as ektaTestnet,ha as eon,ka as eos,xa as eosTestnet,fa as etherlinkTestnet,ya as evmos,Ea as evmosTestnet,va as fantom,Ta as fantomSonicTestnet,Ua as fantomTestnet,ga as fibo,Sa as filecoin,Aa as filecoinCalibration,Ba as filecoinHyperspace,Fa as flare,Ma as flareTestnet,Da as flowMainnet,za as flowPreviewnet,Ia as flowTestnet,_a as foundry,Ha as fraxtal,Pa as fraxtalTestnet,Oa as funkiSepolia,La as fuse,Na as fuseSparknet,Za as gnosis,$a as gnosisChiado,qa as gobi,ja as goerli,Ya as haqqMainnet,Ja as haqqTestedge2,Wa as hardhat,Qa as harmonyOne,er as hedera,ar as hederaPreviewnet,tr as hederaTestnet,rr as holesky,sr as immutableZkEvm,nr as immutableZkEvmTestnet,lr as inEVM,Ra as iotex,Ka as iotexTestnet,Ga as jbc,Va as jbcTestnet,or as kakarotSepolia,Xa as karura,cr as kava,ir as kavaTestnet,pr as kcc,dr as klaytn,mr as klaytnBaobab,ur as kroma,br as kromaSepolia,hr as l3x,kr as l3xTestnet,xr as lightlinkPegasus,fr as lightlinkPhoenix,yr as linea,Er as lineaGoerli,Cr as lineaSepolia,wr as lineaTestnet,vr as lisk,Tr as liskSepolia,Ur as localhost,gr as lukso,Sr as luksoTestnet,Ar as mainnet,Br as mandala,Fr as manta,Mr as mantaSepoliaTestnet,zr as mantaTestnet,Dr as mantle,Ir as mantleSepoliaTestnet,_r as mantleTestnet,Hr as merlin,Pr as metachain,Or as metachainIstanbul,Lr as metalL2,Nr as meter,Rr as meterTestnet,Kr as metis,Gr as metisGoerli,Vr as mev,Xr as mevTestnet,qr as mintSepoliaTestnet,jr as mode,Zr as modeTestnet,$r as moonbaseAlpha,Wr as moonbeam,Qr as moonbeamDev,Yr as moonriver,Jr as morphSepolia,es as nautilus,ts as neonDevnet,as as neonMainnet,rs as nexi,ss as nexilix,ls as oasisTestnet,ns as oasys,os as okc,us as oortMainnetDev,ds as opBNB,ms as opBNBTestnet,cs as optimism,is as optimismGoerli,ps as optimismSepolia,bs as otimDevnet,hs as palm,ks as palmTestnet,fs as pgn,ys as pgnTestnet,Es as phoenix,xs as playfiAlbireo,Cs as plinga,ws as plumeTestnet,vs as polygon,Ts as polygonAmoy,Us as polygonMumbai,gs as polygonZkEvm,Ss as polygonZkEvmCardona,As as polygonZkEvmTestnet,Bs as pulsechain,Fs as pulsechainV4,Ms as qMainnet,zs as qTestnet,Ds as reyaNetwork,Is as rollux,_s as rolluxTestnet,Hs as ronin,Ps as rootstock,Os as rootstockTestnet,Ls as rss3,Ns as rss3Sepolia,Rs as saigon,Ks as sapphire,Gs as sapphireTestnet,Vs as scroll,Xs as scrollSepolia,qs as scrollTestnet,js as seiDevnet,Zs as sepolia,hn as shardeumSphinx,kn as shibarium,$s as shimmer,Ws as shimmerTestnet,Qs as skaleBlockBrawlers,Ys as skaleCalypso,Js as skaleCalypsoTestnet,en as skaleCryptoBlades,tn as skaleCryptoColosseum,an as skaleEuropa,rn as skaleEuropaTestnet,sn as skaleExorde,nn as skaleHumanProtocol,ln as skaleNebula,on as skaleNebulaTestnet,cn as skaleRazor,pn as skaleTitan,dn as skaleTitanTestnet,mn as songbird,un as songbirdTestnet,bn as spicy,xn as stratis,fn as syscoin,yn as syscoinTestnet,Cn as taikoHekla,wn as taikoJolnir,vn as taikoKatla,Tn as taikoTestnetSepolia,En as taraxa,Un as taraxaTestnet,gn as telcoinTestnet,Sn as telos,An as telosTestnet,Bn as tenet,Fn as thaiChain,Mn as thunderTestnet,zn as vechain,Dn as wanchain,In as wanchainTestnet,_n as wemix,Hn as wemixTestnet,Pn as x1Testnet,On as xLayer,Pn as xLayerTestnet,Ln as xdc,Nn as xdcTestnet,Rn as yooldoVerse,Kn as yooldoVerseTestnet,Gn as zetachain,Vn as zetachainAthensTestnet,Xn as zhejiang,qn as zilliqa,jn as zilliqaTestnet,Zn as zkFair,$n as zkFairTestnet,Wn as zkSync,Qn as zkSyncInMemoryNode,Yn as zkSyncLocalNode,Jn as zkSyncSepoliaTestnet,el as zkSyncTestnet,tl as zora,al as zoraSepolia,rl as zoraTestnet}; diff --git a/assets/index-J40BUt8X.js b/assets/index-C2b3983o.js similarity index 99% rename from assets/index-J40BUt8X.js rename to assets/index-C2b3983o.js index 8cd78b6..da9e831 100644 --- a/assets/index-J40BUt8X.js +++ b/assets/index-C2b3983o.js @@ -1,4 +1,4 @@ -import{bC as ue,bB as Kn,bA as Lo}from"./index-BwZaYMab.js";import{e as os,r as as,i as Pe}from"./inherits_browser-DCQ5xBDd.js";var cs={},At={},ir={};Object.defineProperty(ir,"__esModule",{value:!0});ir.walletLogo=void 0;const Bo=(e,t)=>{let r;switch(e){case"standard":return r=t,`data:image/svg+xml,%3Csvg width='${t}' 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=t,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${t}' 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*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' 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*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' 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*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' 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*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' 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=t,`data:image/svg+xml,%3Csvg width='${t}' 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 `}};ir.walletLogo=Bo;var sr={},us={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function o(h,_,m){this.fn=h,this.context=_,this.once=m||!1}function c(h,_,m,g,b){if(typeof m!="function")throw new TypeError("The listener must be a function");var v=new o(m,g||h,b),I=r?r+_:_;return h._events[I]?h._events[I].fn?h._events[I]=[h._events[I],v]:h._events[I].push(v):(h._events[I]=v,h._eventsCount++),h}function u(h,_){--h._eventsCount===0?h._events=new n:delete h._events[_]}function a(){this._events=new n,this._eventsCount=0}a.prototype.eventNames=function(){var _=[],m,g;if(this._eventsCount===0)return _;for(g in m=this._events)t.call(m,g)&&_.push(r?g.slice(1):g);return Object.getOwnPropertySymbols?_.concat(Object.getOwnPropertySymbols(m)):_},a.prototype.listeners=function(_){var m=r?r+_:_,g=this._events[m];if(!g)return[];if(g.fn)return[g.fn];for(var b=0,v=g.length,I=new Array(v);b=-32099&&b<=-32e3}function _(b){return b&&typeof b=="object"&&!Array.isArray(b)?Object.assign({},b):b}function m(b,v){return Object.prototype.hasOwnProperty.call(b,v)}function g(b,v){return typeof b=="object"&&b!==null&&v in b&&typeof b[v]=="string"}})(zn);Object.defineProperty(or,"__esModule",{value:!0});or.standardErrors=void 0;const fe=Je,ls=zn;or.standardErrors={rpc:{parse:e=>Se(fe.standardErrorCodes.rpc.parse,e),invalidRequest:e=>Se(fe.standardErrorCodes.rpc.invalidRequest,e),invalidParams:e=>Se(fe.standardErrorCodes.rpc.invalidParams,e),methodNotFound:e=>Se(fe.standardErrorCodes.rpc.methodNotFound,e),internal:e=>Se(fe.standardErrorCodes.rpc.internal,e),server:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return Se(t,e)},invalidInput:e=>Se(fe.standardErrorCodes.rpc.invalidInput,e),resourceNotFound:e=>Se(fe.standardErrorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>Se(fe.standardErrorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>Se(fe.standardErrorCodes.rpc.transactionRejected,e),methodNotSupported:e=>Se(fe.standardErrorCodes.rpc.methodNotSupported,e),limitExceeded:e=>Se(fe.standardErrorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>ht(fe.standardErrorCodes.provider.userRejectedRequest,e),unauthorized:e=>ht(fe.standardErrorCodes.provider.unauthorized,e),unsupportedMethod:e=>ht(fe.standardErrorCodes.provider.unsupportedMethod,e),disconnected:e=>ht(fe.standardErrorCodes.provider.disconnected,e),chainDisconnected:e=>ht(fe.standardErrorCodes.provider.chainDisconnected,e),unsupportedChain:e=>ht(fe.standardErrorCodes.provider.unsupportedChain,e),custom:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:n}=e;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new fs(t,r,n)}}};function Se(e,t){const[r,n]=hs(t);return new ds(e,r||(0,ls.getMessageFromCode)(e),n)}function ht(e,t){const[r,n]=hs(t);return new fs(e,r||(0,ls.getMessageFromCode)(e),n)}function hs(e){if(e){if(typeof e=="string")return[e];if(typeof e=="object"&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&typeof t!="string")throw new Error("Must specify string message.");return[t||void 0,r]}}return[]}class ds extends Error{constructor(t,r,n){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string.');super(r),this.code=t,n!==void 0&&(this.data=n)}}class fs extends ds{constructor(t,r,n){if(!Po(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,r,n)}}function Po(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.standardErrors=e.standardErrorCodes=void 0;var t=Je;Object.defineProperty(e,"standardErrorCodes",{enumerable:!0,get:function(){return t.standardErrorCodes}});var r=or;Object.defineProperty(e,"standardErrors",{enumerable:!0,get:function(){return r.standardErrors}})})(qe);var ar={},Et={};Object.defineProperty(Et,"__esModule",{value:!0});Et.isErrorResponse=void 0;function No(e){return e.errorMessage!==void 0}Et.isErrorResponse=No;var ot={};Object.defineProperty(ot,"__esModule",{value:!0});ot.LIB_VERSION=void 0;ot.LIB_VERSION="4.0.3";Object.defineProperty(ar,"__esModule",{value:!0});ar.serializeError=void 0;const Do=Et,Oo=ot,Uo=Je,Fo=zn;function jo(e,t){const r=(0,Fo.serialize)(Wo(e),{shouldIncludeStack:!0}),n=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");n.searchParams.set("version",Oo.LIB_VERSION),n.searchParams.set("code",r.code.toString());const o=$o(r.data,t);return o&&n.searchParams.set("method",o),n.searchParams.set("message",r.message),Object.assign(Object.assign({},r),{docUrl:n.href})}ar.serializeError=jo;function Wo(e){return typeof e=="string"?{message:e,code:Uo.standardErrorCodes.rpc.internal}:(0,Do.isErrorResponse)(e)?Object.assign(Object.assign({},e),{message:e.errorMessage,code:e.errorCode,data:{method:e.method}}):e}function $o(e,t){const r=e==null?void 0:e.method;if(r)return r;if(t!==void 0){if(typeof t=="string")return t;if(Array.isArray(t)){if(t.length>0)return t[0].method}else return t.method}}var ge={};Object.defineProperty(ge,"__esModule",{value:!0});ge.RegExpString=ge.IntNumber=ge.BigIntString=ge.AddressString=ge.HexString=ge.OpaqueType=void 0;function Bt(){return e=>e}ge.OpaqueType=Bt;ge.HexString=Bt();ge.AddressString=Bt();ge.BigIntString=Bt();function Ho(e){return Math.floor(e)}ge.IntNumber=Ho;ge.RegExpString=Bt();var O={};Object.defineProperty(O,"__esModule",{value:!0});O.areAddressArraysEqual=O.getFavicon=O.range=O.isBigNumber=O.ensureParsedJSONObject=O.ensureBigInt=O.ensureRegExpString=O.ensureIntNumber=O.ensureBuffer=O.ensureAddressString=O.ensureEvenLengthHexString=O.ensureHexString=O.isHexString=O.prepend0x=O.strip0x=O.has0xPrefix=O.hexStringFromIntNumber=O.intNumberFromHexString=O.bigIntStringFromBigInt=O.hexStringFromBuffer=O.hexStringToUint8Array=O.uint8ArrayToHex=O.randomBytesHex=void 0;const at=qe,Ie=ge,ps=/^[0-9]*$/,_s=/^[a-f0-9]*$/;function qo(e){return gs(crypto.getRandomValues(new Uint8Array(e)))}O.randomBytesHex=qo;function gs(e){return[...e].map(t=>t.toString(16).padStart(2,"0")).join("")}O.uint8ArrayToHex=gs;function Ko(e){return new Uint8Array(e.match(/.{1,2}/g).map(t=>parseInt(t,16)))}O.hexStringToUint8Array=Ko;function zo(e,t=!1){const r=e.toString("hex");return(0,Ie.HexString)(t?`0x${r}`:r)}O.hexStringFromBuffer=zo;function Vo(e){return(0,Ie.BigIntString)(e.toString(10))}O.bigIntStringFromBigInt=Vo;function Go(e){return(0,Ie.IntNumber)(Number(BigInt(Pt(e,!0))))}O.intNumberFromHexString=Go;function Zo(e){return(0,Ie.HexString)(`0x${BigInt(e).toString(16)}`)}O.hexStringFromIntNumber=Zo;function Vn(e){return e.startsWith("0x")||e.startsWith("0X")}O.has0xPrefix=Vn;function cr(e){return Vn(e)?e.slice(2):e}O.strip0x=cr;function ys(e){return Vn(e)?`0x${e.slice(2)}`:`0x${e}`}O.prepend0x=ys;function Tt(e){if(typeof e!="string")return!1;const t=cr(e).toLowerCase();return _s.test(t)}O.isHexString=Tt;function bs(e,t=!1){if(typeof e=="string"){const r=cr(e).toLowerCase();if(_s.test(r))return(0,Ie.HexString)(t?`0x${r}`:r)}throw at.standardErrors.rpc.invalidParams(`"${String(e)}" is not a hexadecimal string`)}O.ensureHexString=bs;function Pt(e,t=!1){let r=bs(e,!1);return r.length%2===1&&(r=(0,Ie.HexString)(`0${r}`)),t?(0,Ie.HexString)(`0x${r}`):r}O.ensureEvenLengthHexString=Pt;function Yo(e){if(typeof e=="string"){const t=cr(e).toLowerCase();if(Tt(t)&&t.length===40)return(0,Ie.AddressString)(ys(t))}throw at.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(e)}`)}O.ensureAddressString=Yo;function Jo(e){if(Buffer.isBuffer(e))return e;if(typeof e=="string"){if(Tt(e)){const t=Pt(e,!1);return Buffer.from(t,"hex")}return Buffer.from(e,"utf8")}throw at.standardErrors.rpc.invalidParams(`Not binary data: ${String(e)}`)}O.ensureBuffer=Jo;function ws(e){if(typeof e=="number"&&Number.isInteger(e))return(0,Ie.IntNumber)(e);if(typeof e=="string"){if(ps.test(e))return(0,Ie.IntNumber)(Number(e));if(Tt(e))return(0,Ie.IntNumber)(Number(BigInt(Pt(e,!0))))}throw at.standardErrors.rpc.invalidParams(`Not an integer: ${String(e)}`)}O.ensureIntNumber=ws;function Qo(e){if(e instanceof RegExp)return(0,Ie.RegExpString)(e.toString());throw at.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(e)}`)}O.ensureRegExpString=Qo;function Xo(e){if(e!==null&&(typeof e=="bigint"||ms(e)))return BigInt(e.toString(10));if(typeof e=="number")return BigInt(ws(e));if(typeof e=="string"){if(ps.test(e))return BigInt(e);if(Tt(e))return BigInt(Pt(e,!0))}throw at.standardErrors.rpc.invalidParams(`Not an integer: ${String(e)}`)}O.ensureBigInt=Xo;function ea(e){if(typeof e=="string")return JSON.parse(e);if(typeof e=="object")return e;throw at.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(e)}`)}O.ensureParsedJSONObject=ea;function ms(e){if(e==null||typeof e.constructor!="function")return!1;const{constructor:t}=e;return typeof t.config=="function"&&typeof t.EUCLID=="number"}O.isBigNumber=ms;function ta(e,t){return Array.from({length:t-e},(r,n)=>e+n)}O.range=ta;function ra(){const e=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:t,host:r}=document.location,n=e?e.getAttribute("href"):null;return!n||n.startsWith("javascript:")||n.startsWith("vbscript:")?null:n.startsWith("http://")||n.startsWith("https://")||n.startsWith("data:")?n:n.startsWith("//")?t+n:`${t}//${r}${n}`}O.getFavicon=ra;function na(e,t){return e.length===t.length&&e.every((r,n)=>r===t[n])}O.areAddressArraysEqual=na;var We={},ur={},lr={},oe={};Object.defineProperty(oe,"__esModule",{value:!0});oe.decryptContent=oe.encryptContent=oe.importKeyFromHexString=oe.exportKeyToHexString=oe.decrypt=oe.encrypt=oe.deriveSharedSecret=oe.generateKeyPair=void 0;const vs=O;async function ia(){return crypto.subtle.generateKey({name:"ECDH",namedCurve:"P-256"},!0,["deriveKey"])}oe.generateKeyPair=ia;async function sa(e,t){return crypto.subtle.deriveKey({name:"ECDH",public:t},e,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}oe.deriveSharedSecret=sa;async function Es(e,t){const r=crypto.getRandomValues(new Uint8Array(12)),n=await crypto.subtle.encrypt({name:"AES-GCM",iv:r},e,new TextEncoder().encode(t));return{iv:r,cipherText:n}}oe.encrypt=Es;async function Ss(e,{iv:t,cipherText:r}){const n=await crypto.subtle.decrypt({name:"AES-GCM",iv:t},e,r);return new TextDecoder().decode(n)}oe.decrypt=Ss;function xs(e){switch(e){case"public":return"spki";case"private":return"pkcs8"}}async function oa(e,t){const r=xs(e),n=await crypto.subtle.exportKey(r,t);return(0,vs.uint8ArrayToHex)(new Uint8Array(n))}oe.exportKeyToHexString=oa;async function aa(e,t){const r=xs(e),n=(0,vs.hexStringToUint8Array)(t).buffer;return await crypto.subtle.importKey(r,n,{name:"ECDH",namedCurve:"P-256"},!0,e==="private"?["deriveKey"]:[])}oe.importKeyFromHexString=aa;async function ca(e,t){const r=JSON.stringify(e,(n,o)=>{if(!(o instanceof Error))return o;const c=o;return Object.assign(Object.assign({},c.code?{code:c.code}:{}),{message:c.message})});return Es(t,r)}oe.encryptContent=ca;async function ua(e,t){return JSON.parse(await Ss(t,e))}oe.decryptContent=ua;var Ke={};Object.defineProperty(Ke,"__esModule",{value:!0});Ke.ScopedLocalStorage=void 0;class tr{constructor(t,r){this.scope=t,this.module=r}setItem(t,r){localStorage.setItem(this.scopedKey(t),r)}getItem(t){return localStorage.getItem(this.scopedKey(t))}removeItem(t){localStorage.removeItem(this.scopedKey(t))}clear(){const t=this.scopedKey(""),r=[];for(let n=0;nlocalStorage.removeItem(n))}scopedKey(t){return`-${this.scope}${this.module?`:${this.module}`:""}:${t}`}static clearAll(){new tr("CBWSDK").clear(),new tr("walletlink").clear()}}Ke.ScopedLocalStorage=tr;Object.defineProperty(lr,"__esModule",{value:!0});lr.SCWKeyManager=void 0;const qt=oe,la=Ke,yn={storageKey:"ownPrivateKey",keyType:"private"},bn={storageKey:"ownPublicKey",keyType:"public"},wn={storageKey:"peerPublicKey",keyType:"public"};class ha{constructor(){this.storage=new la.ScopedLocalStorage("CBWSDK","SCWKeyManager"),this.ownPrivateKey=null,this.ownPublicKey=null,this.peerPublicKey=null,this.sharedSecret=null}async getOwnPublicKey(){return await this.loadKeysIfNeeded(),this.ownPublicKey}async getSharedSecret(){return await this.loadKeysIfNeeded(),this.sharedSecret}async setPeerPublicKey(t){this.sharedSecret=null,this.peerPublicKey=t,await this.storeKey(wn,t),await this.loadKeysIfNeeded()}async clear(){this.ownPrivateKey=null,this.ownPublicKey=null,this.peerPublicKey=null,this.sharedSecret=null,this.storage.removeItem(bn.storageKey),this.storage.removeItem(yn.storageKey),this.storage.removeItem(wn.storageKey)}async generateKeyPair(){const t=await(0,qt.generateKeyPair)();this.ownPrivateKey=t.privateKey,this.ownPublicKey=t.publicKey,await this.storeKey(yn,t.privateKey),await this.storeKey(bn,t.publicKey)}async loadKeysIfNeeded(){if(this.ownPrivateKey===null&&(this.ownPrivateKey=await this.loadKey(yn)),this.ownPublicKey===null&&(this.ownPublicKey=await this.loadKey(bn)),(this.ownPrivateKey===null||this.ownPublicKey===null)&&await this.generateKeyPair(),this.peerPublicKey===null&&(this.peerPublicKey=await this.loadKey(wn)),this.sharedSecret===null){if(this.ownPrivateKey===null||this.peerPublicKey===null)return;this.sharedSecret=await(0,qt.deriveSharedSecret)(this.ownPrivateKey,this.peerPublicKey)}}async loadKey(t){const r=this.storage.getItem(t.storageKey);return r?(0,qt.importKeyFromHexString)(t.keyType,r):null}async storeKey(t,r){const n=await(0,qt.exportKeyToHexString)(t.keyType,r);this.storage.setItem(t.storageKey,n)}}lr.SCWKeyManager=ha;var hr={};Object.defineProperty(hr,"__esModule",{value:!0});hr.SCWStateManager=void 0;const da=Ke,oi="accounts",ai="activeChain",ci="availableChains",ui="walletCapabilities";class fa{get accounts(){return this._accounts}get activeChain(){return this._activeChain}get walletCapabilities(){return this._walletCapabilities}constructor(t){var r,n;this.storage=new da.ScopedLocalStorage("CBWSDK","SCWStateManager"),this.updateListener=t.updateListener,this.availableChains=this.loadItemFromStorage(ci),this._walletCapabilities=this.loadItemFromStorage(ui);const o=this.loadItemFromStorage(oi),c=this.loadItemFromStorage(ai);o&&this.updateListener.onAccountsUpdate({accounts:o,source:"storage"}),c&&this.updateListener.onChainUpdate({chain:c,source:"storage"}),this._accounts=o||[],this._activeChain=c||{id:(n=(r=t.appChainIds)===null||r===void 0?void 0:r[0])!==null&&n!==void 0?n:1}}updateAccounts(t){this._accounts=t,this.storeItemToStorage(oi,t),this.updateListener.onAccountsUpdate({accounts:t,source:"wallet"})}switchChain(t){var r;const n=(r=this.availableChains)===null||r===void 0?void 0:r.find(o=>o.id===t);return n?(n===this._activeChain||(this._activeChain=n,this.storeItemToStorage(ai,n),this.updateListener.onChainUpdate({chain:n,source:"wallet"})),!0):!1}updateAvailableChains(t){if(!t||Object.keys(t).length===0)return;const r=Object.entries(t).map(([n,o])=>({id:Number(n),rpcUrl:o}));this.availableChains=r,this.storeItemToStorage(ci,r),this.switchChain(this._activeChain.id)}updateWalletCapabilities(t){this._walletCapabilities=t,this.storeItemToStorage(ui,t)}storeItemToStorage(t,r){this.storage.setItem(t,JSON.stringify(r))}loadItemFromStorage(t){const r=this.storage.getItem(t);return r?JSON.parse(r):void 0}clear(){this.storage.clear()}}hr.SCWStateManager=fa;Object.defineProperty(ur,"__esModule",{value:!0});ur.SCWSigner=void 0;const pa=lr,_a=hr,Kt=qe,li=O,zt=oe;class ga{constructor(t){this.metadata=t.metadata,this.communicator=t.communicator,this.keyManager=new pa.SCWKeyManager,this.stateManager=new _a.SCWStateManager({appChainIds:this.metadata.appChainIds,updateListener:t.updateListener}),this.handshake=this.handshake.bind(this),this.request=this.request.bind(this),this.createRequestMessage=this.createRequestMessage.bind(this),this.decryptResponseMessage=this.decryptResponseMessage.bind(this)}async handshake(){const t=await this.createRequestMessage({handshake:{method:"eth_requestAccounts",params:this.metadata}}),r=await this.communicator.postRequestAndWaitForResponse(t);if("failure"in r.content)throw r.content.failure;const n=await(0,zt.importKeyFromHexString)("public",r.sender);await this.keyManager.setPeerPublicKey(n);const o=await this.decryptResponseMessage(r);this.updateInternalState({method:"eth_requestAccounts"},o);const c=o.result;if("error"in c)throw c.error;return this.stateManager.accounts}async request(t){const r=this.tryLocalHandling(t);if(r!==void 0){if(r instanceof Error)throw r;return r}await this.communicator.waitForPopupLoaded();const n=await this.sendEncryptedRequest(t),o=await this.decryptResponseMessage(n);this.updateInternalState(t,o);const c=o.result;if("error"in c)throw c.error;return c.value}async disconnect(){this.stateManager.clear(),await this.keyManager.clear()}tryLocalHandling(t){var r;switch(t.method){case"wallet_switchEthereumChain":{const n=t.params;if(!n||!(!((r=n[0])===null||r===void 0)&&r.chainId))throw Kt.standardErrors.rpc.invalidParams();const o=(0,li.ensureIntNumber)(n[0].chainId);return this.stateManager.switchChain(o)?null:void 0}case"wallet_getCapabilities":{const n=this.stateManager.walletCapabilities;if(!n)throw Kt.standardErrors.provider.unauthorized("No wallet capabilities found, please disconnect and reconnect");return n}default:return}}async sendEncryptedRequest(t){const r=await this.keyManager.getSharedSecret();if(!r)throw Kt.standardErrors.provider.unauthorized("No valid session found, try requestAccounts before other methods");const n=await(0,zt.encryptContent)({action:t,chainId:this.stateManager.activeChain.id},r),o=await this.createRequestMessage({encrypted:n});return this.communicator.postRequestAndWaitForResponse(o)}async createRequestMessage(t){const r=await(0,zt.exportKeyToHexString)("public",await this.keyManager.getOwnPublicKey());return{id:crypto.randomUUID(),sender:r,content:t,timestamp:new Date}}async decryptResponseMessage(t){const r=t.content;if("failure"in r)throw r.failure;const n=await this.keyManager.getSharedSecret();if(!n)throw Kt.standardErrors.provider.unauthorized("Invalid session");return(0,zt.decryptContent)(r.encrypted,n)}updateInternalState(t,r){var n,o;const c=(n=r.data)===null||n===void 0?void 0:n.chains;c&&this.stateManager.updateAvailableChains(c);const u=(o=r.data)===null||o===void 0?void 0:o.capabilities;u&&this.stateManager.updateWalletCapabilities(u);const a=r.result;if(!("error"in a))switch(t.method){case"eth_requestAccounts":{const h=a.value;this.stateManager.updateAccounts(h);break}case"wallet_switchEthereumChain":{if(a.value!==null)return;const h=t.params,_=(0,li.ensureIntNumber)(h[0].chainId);this.stateManager.switchChain(_);break}}}}ur.SCWSigner=ga;var dr={},Nn={exports:{}},Cs=os.EventEmitter,Nt={},fr={};fr.byteLength=wa;fr.toByteArray=va;fr.fromByteArray=xa;var je=[],xe=[],ya=typeof Uint8Array<"u"?Uint8Array:Array,mn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var dt=0,ba=mn.length;dt0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function wa(e){var t=Is(e),r=t[0],n=t[1];return(r+n)*3/4-n}function ma(e,t,r){return(t+r)*3/4-r}function va(e){var t,r=Is(e),n=r[0],o=r[1],c=new ya(ma(e,n,o)),u=0,a=o>0?n-4:n,h;for(h=0;h>16&255,c[u++]=t>>8&255,c[u++]=t&255;return o===2&&(t=xe[e.charCodeAt(h)]<<2|xe[e.charCodeAt(h+1)]>>4,c[u++]=t&255),o===1&&(t=xe[e.charCodeAt(h)]<<10|xe[e.charCodeAt(h+1)]<<4|xe[e.charCodeAt(h+2)]>>2,c[u++]=t>>8&255,c[u++]=t&255),c}function Ea(e){return je[e>>18&63]+je[e>>12&63]+je[e>>6&63]+je[e&63]}function Sa(e,t,r){for(var n,o=[],c=t;ca?a:u+c));return n===1?(t=e[r-1],o.push(je[t>>2]+je[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],o.push(je[t>>10]+je[t>>4&63]+je[t<<2&63]+"=")),o.join("")}var Gn={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */Gn.read=function(e,t,r,n,o){var c,u,a=o*8-n-1,h=(1<>1,m=-7,g=r?o-1:0,b=r?-1:1,v=e[t+g];for(g+=b,c=v&(1<<-m)-1,v>>=-m,m+=a;m>0;c=c*256+e[t+g],g+=b,m-=8);for(u=c&(1<<-m)-1,c>>=-m,m+=n;m>0;u=u*256+e[t+g],g+=b,m-=8);if(c===0)c=1-_;else{if(c===h)return u?NaN:(v?-1:1)*(1/0);u=u+Math.pow(2,n),c=c-_}return(v?-1:1)*u*Math.pow(2,c-n)};Gn.write=function(e,t,r,n,o,c){var u,a,h,_=c*8-o-1,m=(1<<_)-1,g=m>>1,b=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=n?0:c-1,I=n?1:-1,T=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,u=m):(u=Math.floor(Math.log(t)/Math.LN2),t*(h=Math.pow(2,-u))<1&&(u--,h*=2),u+g>=1?t+=b/h:t+=b*Math.pow(2,1-g),t*h>=2&&(u++,h/=2),u+g>=m?(a=0,u=m):u+g>=1?(a=(t*h-1)*Math.pow(2,o),u=u+g):(a=t*Math.pow(2,g-1)*Math.pow(2,o),u=0));o>=8;e[r+v]=a&255,v+=I,a/=256,o-=8);for(u=u<0;e[r+v]=u&255,v+=I,u/=256,_-=8);e[r+v-I]|=T*128};/*! +import{bC as ue,bB as Kn,bA as Lo}from"./index-C6UBXeMY.js";import{e as os,r as as,i as Pe}from"./inherits_browser-B1P7kPq9.js";var cs={},At={},ir={};Object.defineProperty(ir,"__esModule",{value:!0});ir.walletLogo=void 0;const Bo=(e,t)=>{let r;switch(e){case"standard":return r=t,`data:image/svg+xml,%3Csvg width='${t}' 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=t,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${t}' 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*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' 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*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' 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*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' 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*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' 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=t,`data:image/svg+xml,%3Csvg width='${t}' 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 `}};ir.walletLogo=Bo;var sr={},us={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function o(h,_,m){this.fn=h,this.context=_,this.once=m||!1}function c(h,_,m,g,b){if(typeof m!="function")throw new TypeError("The listener must be a function");var v=new o(m,g||h,b),I=r?r+_:_;return h._events[I]?h._events[I].fn?h._events[I]=[h._events[I],v]:h._events[I].push(v):(h._events[I]=v,h._eventsCount++),h}function u(h,_){--h._eventsCount===0?h._events=new n:delete h._events[_]}function a(){this._events=new n,this._eventsCount=0}a.prototype.eventNames=function(){var _=[],m,g;if(this._eventsCount===0)return _;for(g in m=this._events)t.call(m,g)&&_.push(r?g.slice(1):g);return Object.getOwnPropertySymbols?_.concat(Object.getOwnPropertySymbols(m)):_},a.prototype.listeners=function(_){var m=r?r+_:_,g=this._events[m];if(!g)return[];if(g.fn)return[g.fn];for(var b=0,v=g.length,I=new Array(v);b=-32099&&b<=-32e3}function _(b){return b&&typeof b=="object"&&!Array.isArray(b)?Object.assign({},b):b}function m(b,v){return Object.prototype.hasOwnProperty.call(b,v)}function g(b,v){return typeof b=="object"&&b!==null&&v in b&&typeof b[v]=="string"}})(zn);Object.defineProperty(or,"__esModule",{value:!0});or.standardErrors=void 0;const fe=Je,ls=zn;or.standardErrors={rpc:{parse:e=>Se(fe.standardErrorCodes.rpc.parse,e),invalidRequest:e=>Se(fe.standardErrorCodes.rpc.invalidRequest,e),invalidParams:e=>Se(fe.standardErrorCodes.rpc.invalidParams,e),methodNotFound:e=>Se(fe.standardErrorCodes.rpc.methodNotFound,e),internal:e=>Se(fe.standardErrorCodes.rpc.internal,e),server:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return Se(t,e)},invalidInput:e=>Se(fe.standardErrorCodes.rpc.invalidInput,e),resourceNotFound:e=>Se(fe.standardErrorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>Se(fe.standardErrorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>Se(fe.standardErrorCodes.rpc.transactionRejected,e),methodNotSupported:e=>Se(fe.standardErrorCodes.rpc.methodNotSupported,e),limitExceeded:e=>Se(fe.standardErrorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>ht(fe.standardErrorCodes.provider.userRejectedRequest,e),unauthorized:e=>ht(fe.standardErrorCodes.provider.unauthorized,e),unsupportedMethod:e=>ht(fe.standardErrorCodes.provider.unsupportedMethod,e),disconnected:e=>ht(fe.standardErrorCodes.provider.disconnected,e),chainDisconnected:e=>ht(fe.standardErrorCodes.provider.chainDisconnected,e),unsupportedChain:e=>ht(fe.standardErrorCodes.provider.unsupportedChain,e),custom:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:n}=e;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new fs(t,r,n)}}};function Se(e,t){const[r,n]=hs(t);return new ds(e,r||(0,ls.getMessageFromCode)(e),n)}function ht(e,t){const[r,n]=hs(t);return new fs(e,r||(0,ls.getMessageFromCode)(e),n)}function hs(e){if(e){if(typeof e=="string")return[e];if(typeof e=="object"&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&typeof t!="string")throw new Error("Must specify string message.");return[t||void 0,r]}}return[]}class ds extends Error{constructor(t,r,n){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string.');super(r),this.code=t,n!==void 0&&(this.data=n)}}class fs extends ds{constructor(t,r,n){if(!Po(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,r,n)}}function Po(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.standardErrors=e.standardErrorCodes=void 0;var t=Je;Object.defineProperty(e,"standardErrorCodes",{enumerable:!0,get:function(){return t.standardErrorCodes}});var r=or;Object.defineProperty(e,"standardErrors",{enumerable:!0,get:function(){return r.standardErrors}})})(qe);var ar={},Et={};Object.defineProperty(Et,"__esModule",{value:!0});Et.isErrorResponse=void 0;function No(e){return e.errorMessage!==void 0}Et.isErrorResponse=No;var ot={};Object.defineProperty(ot,"__esModule",{value:!0});ot.LIB_VERSION=void 0;ot.LIB_VERSION="4.0.3";Object.defineProperty(ar,"__esModule",{value:!0});ar.serializeError=void 0;const Do=Et,Oo=ot,Uo=Je,Fo=zn;function jo(e,t){const r=(0,Fo.serialize)(Wo(e),{shouldIncludeStack:!0}),n=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");n.searchParams.set("version",Oo.LIB_VERSION),n.searchParams.set("code",r.code.toString());const o=$o(r.data,t);return o&&n.searchParams.set("method",o),n.searchParams.set("message",r.message),Object.assign(Object.assign({},r),{docUrl:n.href})}ar.serializeError=jo;function Wo(e){return typeof e=="string"?{message:e,code:Uo.standardErrorCodes.rpc.internal}:(0,Do.isErrorResponse)(e)?Object.assign(Object.assign({},e),{message:e.errorMessage,code:e.errorCode,data:{method:e.method}}):e}function $o(e,t){const r=e==null?void 0:e.method;if(r)return r;if(t!==void 0){if(typeof t=="string")return t;if(Array.isArray(t)){if(t.length>0)return t[0].method}else return t.method}}var ge={};Object.defineProperty(ge,"__esModule",{value:!0});ge.RegExpString=ge.IntNumber=ge.BigIntString=ge.AddressString=ge.HexString=ge.OpaqueType=void 0;function Bt(){return e=>e}ge.OpaqueType=Bt;ge.HexString=Bt();ge.AddressString=Bt();ge.BigIntString=Bt();function Ho(e){return Math.floor(e)}ge.IntNumber=Ho;ge.RegExpString=Bt();var O={};Object.defineProperty(O,"__esModule",{value:!0});O.areAddressArraysEqual=O.getFavicon=O.range=O.isBigNumber=O.ensureParsedJSONObject=O.ensureBigInt=O.ensureRegExpString=O.ensureIntNumber=O.ensureBuffer=O.ensureAddressString=O.ensureEvenLengthHexString=O.ensureHexString=O.isHexString=O.prepend0x=O.strip0x=O.has0xPrefix=O.hexStringFromIntNumber=O.intNumberFromHexString=O.bigIntStringFromBigInt=O.hexStringFromBuffer=O.hexStringToUint8Array=O.uint8ArrayToHex=O.randomBytesHex=void 0;const at=qe,Ie=ge,ps=/^[0-9]*$/,_s=/^[a-f0-9]*$/;function qo(e){return gs(crypto.getRandomValues(new Uint8Array(e)))}O.randomBytesHex=qo;function gs(e){return[...e].map(t=>t.toString(16).padStart(2,"0")).join("")}O.uint8ArrayToHex=gs;function Ko(e){return new Uint8Array(e.match(/.{1,2}/g).map(t=>parseInt(t,16)))}O.hexStringToUint8Array=Ko;function zo(e,t=!1){const r=e.toString("hex");return(0,Ie.HexString)(t?`0x${r}`:r)}O.hexStringFromBuffer=zo;function Vo(e){return(0,Ie.BigIntString)(e.toString(10))}O.bigIntStringFromBigInt=Vo;function Go(e){return(0,Ie.IntNumber)(Number(BigInt(Pt(e,!0))))}O.intNumberFromHexString=Go;function Zo(e){return(0,Ie.HexString)(`0x${BigInt(e).toString(16)}`)}O.hexStringFromIntNumber=Zo;function Vn(e){return e.startsWith("0x")||e.startsWith("0X")}O.has0xPrefix=Vn;function cr(e){return Vn(e)?e.slice(2):e}O.strip0x=cr;function ys(e){return Vn(e)?`0x${e.slice(2)}`:`0x${e}`}O.prepend0x=ys;function Tt(e){if(typeof e!="string")return!1;const t=cr(e).toLowerCase();return _s.test(t)}O.isHexString=Tt;function bs(e,t=!1){if(typeof e=="string"){const r=cr(e).toLowerCase();if(_s.test(r))return(0,Ie.HexString)(t?`0x${r}`:r)}throw at.standardErrors.rpc.invalidParams(`"${String(e)}" is not a hexadecimal string`)}O.ensureHexString=bs;function Pt(e,t=!1){let r=bs(e,!1);return r.length%2===1&&(r=(0,Ie.HexString)(`0${r}`)),t?(0,Ie.HexString)(`0x${r}`):r}O.ensureEvenLengthHexString=Pt;function Yo(e){if(typeof e=="string"){const t=cr(e).toLowerCase();if(Tt(t)&&t.length===40)return(0,Ie.AddressString)(ys(t))}throw at.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(e)}`)}O.ensureAddressString=Yo;function Jo(e){if(Buffer.isBuffer(e))return e;if(typeof e=="string"){if(Tt(e)){const t=Pt(e,!1);return Buffer.from(t,"hex")}return Buffer.from(e,"utf8")}throw at.standardErrors.rpc.invalidParams(`Not binary data: ${String(e)}`)}O.ensureBuffer=Jo;function ws(e){if(typeof e=="number"&&Number.isInteger(e))return(0,Ie.IntNumber)(e);if(typeof e=="string"){if(ps.test(e))return(0,Ie.IntNumber)(Number(e));if(Tt(e))return(0,Ie.IntNumber)(Number(BigInt(Pt(e,!0))))}throw at.standardErrors.rpc.invalidParams(`Not an integer: ${String(e)}`)}O.ensureIntNumber=ws;function Qo(e){if(e instanceof RegExp)return(0,Ie.RegExpString)(e.toString());throw at.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(e)}`)}O.ensureRegExpString=Qo;function Xo(e){if(e!==null&&(typeof e=="bigint"||ms(e)))return BigInt(e.toString(10));if(typeof e=="number")return BigInt(ws(e));if(typeof e=="string"){if(ps.test(e))return BigInt(e);if(Tt(e))return BigInt(Pt(e,!0))}throw at.standardErrors.rpc.invalidParams(`Not an integer: ${String(e)}`)}O.ensureBigInt=Xo;function ea(e){if(typeof e=="string")return JSON.parse(e);if(typeof e=="object")return e;throw at.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(e)}`)}O.ensureParsedJSONObject=ea;function ms(e){if(e==null||typeof e.constructor!="function")return!1;const{constructor:t}=e;return typeof t.config=="function"&&typeof t.EUCLID=="number"}O.isBigNumber=ms;function ta(e,t){return Array.from({length:t-e},(r,n)=>e+n)}O.range=ta;function ra(){const e=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:t,host:r}=document.location,n=e?e.getAttribute("href"):null;return!n||n.startsWith("javascript:")||n.startsWith("vbscript:")?null:n.startsWith("http://")||n.startsWith("https://")||n.startsWith("data:")?n:n.startsWith("//")?t+n:`${t}//${r}${n}`}O.getFavicon=ra;function na(e,t){return e.length===t.length&&e.every((r,n)=>r===t[n])}O.areAddressArraysEqual=na;var We={},ur={},lr={},oe={};Object.defineProperty(oe,"__esModule",{value:!0});oe.decryptContent=oe.encryptContent=oe.importKeyFromHexString=oe.exportKeyToHexString=oe.decrypt=oe.encrypt=oe.deriveSharedSecret=oe.generateKeyPair=void 0;const vs=O;async function ia(){return crypto.subtle.generateKey({name:"ECDH",namedCurve:"P-256"},!0,["deriveKey"])}oe.generateKeyPair=ia;async function sa(e,t){return crypto.subtle.deriveKey({name:"ECDH",public:t},e,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}oe.deriveSharedSecret=sa;async function Es(e,t){const r=crypto.getRandomValues(new Uint8Array(12)),n=await crypto.subtle.encrypt({name:"AES-GCM",iv:r},e,new TextEncoder().encode(t));return{iv:r,cipherText:n}}oe.encrypt=Es;async function Ss(e,{iv:t,cipherText:r}){const n=await crypto.subtle.decrypt({name:"AES-GCM",iv:t},e,r);return new TextDecoder().decode(n)}oe.decrypt=Ss;function xs(e){switch(e){case"public":return"spki";case"private":return"pkcs8"}}async function oa(e,t){const r=xs(e),n=await crypto.subtle.exportKey(r,t);return(0,vs.uint8ArrayToHex)(new Uint8Array(n))}oe.exportKeyToHexString=oa;async function aa(e,t){const r=xs(e),n=(0,vs.hexStringToUint8Array)(t).buffer;return await crypto.subtle.importKey(r,n,{name:"ECDH",namedCurve:"P-256"},!0,e==="private"?["deriveKey"]:[])}oe.importKeyFromHexString=aa;async function ca(e,t){const r=JSON.stringify(e,(n,o)=>{if(!(o instanceof Error))return o;const c=o;return Object.assign(Object.assign({},c.code?{code:c.code}:{}),{message:c.message})});return Es(t,r)}oe.encryptContent=ca;async function ua(e,t){return JSON.parse(await Ss(t,e))}oe.decryptContent=ua;var Ke={};Object.defineProperty(Ke,"__esModule",{value:!0});Ke.ScopedLocalStorage=void 0;class tr{constructor(t,r){this.scope=t,this.module=r}setItem(t,r){localStorage.setItem(this.scopedKey(t),r)}getItem(t){return localStorage.getItem(this.scopedKey(t))}removeItem(t){localStorage.removeItem(this.scopedKey(t))}clear(){const t=this.scopedKey(""),r=[];for(let n=0;nlocalStorage.removeItem(n))}scopedKey(t){return`-${this.scope}${this.module?`:${this.module}`:""}:${t}`}static clearAll(){new tr("CBWSDK").clear(),new tr("walletlink").clear()}}Ke.ScopedLocalStorage=tr;Object.defineProperty(lr,"__esModule",{value:!0});lr.SCWKeyManager=void 0;const qt=oe,la=Ke,yn={storageKey:"ownPrivateKey",keyType:"private"},bn={storageKey:"ownPublicKey",keyType:"public"},wn={storageKey:"peerPublicKey",keyType:"public"};class ha{constructor(){this.storage=new la.ScopedLocalStorage("CBWSDK","SCWKeyManager"),this.ownPrivateKey=null,this.ownPublicKey=null,this.peerPublicKey=null,this.sharedSecret=null}async getOwnPublicKey(){return await this.loadKeysIfNeeded(),this.ownPublicKey}async getSharedSecret(){return await this.loadKeysIfNeeded(),this.sharedSecret}async setPeerPublicKey(t){this.sharedSecret=null,this.peerPublicKey=t,await this.storeKey(wn,t),await this.loadKeysIfNeeded()}async clear(){this.ownPrivateKey=null,this.ownPublicKey=null,this.peerPublicKey=null,this.sharedSecret=null,this.storage.removeItem(bn.storageKey),this.storage.removeItem(yn.storageKey),this.storage.removeItem(wn.storageKey)}async generateKeyPair(){const t=await(0,qt.generateKeyPair)();this.ownPrivateKey=t.privateKey,this.ownPublicKey=t.publicKey,await this.storeKey(yn,t.privateKey),await this.storeKey(bn,t.publicKey)}async loadKeysIfNeeded(){if(this.ownPrivateKey===null&&(this.ownPrivateKey=await this.loadKey(yn)),this.ownPublicKey===null&&(this.ownPublicKey=await this.loadKey(bn)),(this.ownPrivateKey===null||this.ownPublicKey===null)&&await this.generateKeyPair(),this.peerPublicKey===null&&(this.peerPublicKey=await this.loadKey(wn)),this.sharedSecret===null){if(this.ownPrivateKey===null||this.peerPublicKey===null)return;this.sharedSecret=await(0,qt.deriveSharedSecret)(this.ownPrivateKey,this.peerPublicKey)}}async loadKey(t){const r=this.storage.getItem(t.storageKey);return r?(0,qt.importKeyFromHexString)(t.keyType,r):null}async storeKey(t,r){const n=await(0,qt.exportKeyToHexString)(t.keyType,r);this.storage.setItem(t.storageKey,n)}}lr.SCWKeyManager=ha;var hr={};Object.defineProperty(hr,"__esModule",{value:!0});hr.SCWStateManager=void 0;const da=Ke,oi="accounts",ai="activeChain",ci="availableChains",ui="walletCapabilities";class fa{get accounts(){return this._accounts}get activeChain(){return this._activeChain}get walletCapabilities(){return this._walletCapabilities}constructor(t){var r,n;this.storage=new da.ScopedLocalStorage("CBWSDK","SCWStateManager"),this.updateListener=t.updateListener,this.availableChains=this.loadItemFromStorage(ci),this._walletCapabilities=this.loadItemFromStorage(ui);const o=this.loadItemFromStorage(oi),c=this.loadItemFromStorage(ai);o&&this.updateListener.onAccountsUpdate({accounts:o,source:"storage"}),c&&this.updateListener.onChainUpdate({chain:c,source:"storage"}),this._accounts=o||[],this._activeChain=c||{id:(n=(r=t.appChainIds)===null||r===void 0?void 0:r[0])!==null&&n!==void 0?n:1}}updateAccounts(t){this._accounts=t,this.storeItemToStorage(oi,t),this.updateListener.onAccountsUpdate({accounts:t,source:"wallet"})}switchChain(t){var r;const n=(r=this.availableChains)===null||r===void 0?void 0:r.find(o=>o.id===t);return n?(n===this._activeChain||(this._activeChain=n,this.storeItemToStorage(ai,n),this.updateListener.onChainUpdate({chain:n,source:"wallet"})),!0):!1}updateAvailableChains(t){if(!t||Object.keys(t).length===0)return;const r=Object.entries(t).map(([n,o])=>({id:Number(n),rpcUrl:o}));this.availableChains=r,this.storeItemToStorage(ci,r),this.switchChain(this._activeChain.id)}updateWalletCapabilities(t){this._walletCapabilities=t,this.storeItemToStorage(ui,t)}storeItemToStorage(t,r){this.storage.setItem(t,JSON.stringify(r))}loadItemFromStorage(t){const r=this.storage.getItem(t);return r?JSON.parse(r):void 0}clear(){this.storage.clear()}}hr.SCWStateManager=fa;Object.defineProperty(ur,"__esModule",{value:!0});ur.SCWSigner=void 0;const pa=lr,_a=hr,Kt=qe,li=O,zt=oe;class ga{constructor(t){this.metadata=t.metadata,this.communicator=t.communicator,this.keyManager=new pa.SCWKeyManager,this.stateManager=new _a.SCWStateManager({appChainIds:this.metadata.appChainIds,updateListener:t.updateListener}),this.handshake=this.handshake.bind(this),this.request=this.request.bind(this),this.createRequestMessage=this.createRequestMessage.bind(this),this.decryptResponseMessage=this.decryptResponseMessage.bind(this)}async handshake(){const t=await this.createRequestMessage({handshake:{method:"eth_requestAccounts",params:this.metadata}}),r=await this.communicator.postRequestAndWaitForResponse(t);if("failure"in r.content)throw r.content.failure;const n=await(0,zt.importKeyFromHexString)("public",r.sender);await this.keyManager.setPeerPublicKey(n);const o=await this.decryptResponseMessage(r);this.updateInternalState({method:"eth_requestAccounts"},o);const c=o.result;if("error"in c)throw c.error;return this.stateManager.accounts}async request(t){const r=this.tryLocalHandling(t);if(r!==void 0){if(r instanceof Error)throw r;return r}await this.communicator.waitForPopupLoaded();const n=await this.sendEncryptedRequest(t),o=await this.decryptResponseMessage(n);this.updateInternalState(t,o);const c=o.result;if("error"in c)throw c.error;return c.value}async disconnect(){this.stateManager.clear(),await this.keyManager.clear()}tryLocalHandling(t){var r;switch(t.method){case"wallet_switchEthereumChain":{const n=t.params;if(!n||!(!((r=n[0])===null||r===void 0)&&r.chainId))throw Kt.standardErrors.rpc.invalidParams();const o=(0,li.ensureIntNumber)(n[0].chainId);return this.stateManager.switchChain(o)?null:void 0}case"wallet_getCapabilities":{const n=this.stateManager.walletCapabilities;if(!n)throw Kt.standardErrors.provider.unauthorized("No wallet capabilities found, please disconnect and reconnect");return n}default:return}}async sendEncryptedRequest(t){const r=await this.keyManager.getSharedSecret();if(!r)throw Kt.standardErrors.provider.unauthorized("No valid session found, try requestAccounts before other methods");const n=await(0,zt.encryptContent)({action:t,chainId:this.stateManager.activeChain.id},r),o=await this.createRequestMessage({encrypted:n});return this.communicator.postRequestAndWaitForResponse(o)}async createRequestMessage(t){const r=await(0,zt.exportKeyToHexString)("public",await this.keyManager.getOwnPublicKey());return{id:crypto.randomUUID(),sender:r,content:t,timestamp:new Date}}async decryptResponseMessage(t){const r=t.content;if("failure"in r)throw r.failure;const n=await this.keyManager.getSharedSecret();if(!n)throw Kt.standardErrors.provider.unauthorized("Invalid session");return(0,zt.decryptContent)(r.encrypted,n)}updateInternalState(t,r){var n,o;const c=(n=r.data)===null||n===void 0?void 0:n.chains;c&&this.stateManager.updateAvailableChains(c);const u=(o=r.data)===null||o===void 0?void 0:o.capabilities;u&&this.stateManager.updateWalletCapabilities(u);const a=r.result;if(!("error"in a))switch(t.method){case"eth_requestAccounts":{const h=a.value;this.stateManager.updateAccounts(h);break}case"wallet_switchEthereumChain":{if(a.value!==null)return;const h=t.params,_=(0,li.ensureIntNumber)(h[0].chainId);this.stateManager.switchChain(_);break}}}}ur.SCWSigner=ga;var dr={},Nn={exports:{}},Cs=os.EventEmitter,Nt={},fr={};fr.byteLength=wa;fr.toByteArray=va;fr.fromByteArray=xa;var je=[],xe=[],ya=typeof Uint8Array<"u"?Uint8Array:Array,mn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var dt=0,ba=mn.length;dt0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function wa(e){var t=Is(e),r=t[0],n=t[1];return(r+n)*3/4-n}function ma(e,t,r){return(t+r)*3/4-r}function va(e){var t,r=Is(e),n=r[0],o=r[1],c=new ya(ma(e,n,o)),u=0,a=o>0?n-4:n,h;for(h=0;h>16&255,c[u++]=t>>8&255,c[u++]=t&255;return o===2&&(t=xe[e.charCodeAt(h)]<<2|xe[e.charCodeAt(h+1)]>>4,c[u++]=t&255),o===1&&(t=xe[e.charCodeAt(h)]<<10|xe[e.charCodeAt(h+1)]<<4|xe[e.charCodeAt(h+2)]>>2,c[u++]=t>>8&255,c[u++]=t&255),c}function Ea(e){return je[e>>18&63]+je[e>>12&63]+je[e>>6&63]+je[e&63]}function Sa(e,t,r){for(var n,o=[],c=t;ca?a:u+c));return n===1?(t=e[r-1],o.push(je[t>>2]+je[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],o.push(je[t>>10]+je[t>>4&63]+je[t<<2&63]+"=")),o.join("")}var Gn={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */Gn.read=function(e,t,r,n,o){var c,u,a=o*8-n-1,h=(1<>1,m=-7,g=r?o-1:0,b=r?-1:1,v=e[t+g];for(g+=b,c=v&(1<<-m)-1,v>>=-m,m+=a;m>0;c=c*256+e[t+g],g+=b,m-=8);for(u=c&(1<<-m)-1,c>>=-m,m+=n;m>0;u=u*256+e[t+g],g+=b,m-=8);if(c===0)c=1-_;else{if(c===h)return u?NaN:(v?-1:1)*(1/0);u=u+Math.pow(2,n),c=c-_}return(v?-1:1)*u*Math.pow(2,c-n)};Gn.write=function(e,t,r,n,o,c){var u,a,h,_=c*8-o-1,m=(1<<_)-1,g=m>>1,b=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=n?0:c-1,I=n?1:-1,T=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,u=m):(u=Math.floor(Math.log(t)/Math.LN2),t*(h=Math.pow(2,-u))<1&&(u--,h*=2),u+g>=1?t+=b/h:t+=b*Math.pow(2,1-g),t*h>=2&&(u++,h/=2),u+g>=m?(a=0,u=m):u+g>=1?(a=(t*h-1)*Math.pow(2,o),u=u+g):(a=t*Math.pow(2,g-1)*Math.pow(2,o),u=0));o>=8;e[r+v]=a&255,v+=I,a/=256,o-=8);for(u=u<0;e[r+v]=u&255,v+=I,u/=256,_-=8);e[r+v-I]|=T*128};/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh diff --git a/assets/index-BwZaYMab.js b/assets/index-C6UBXeMY.js similarity index 94% rename from assets/index-BwZaYMab.js rename to assets/index-C6UBXeMY.js index cad48a5..a64f193 100644 --- a/assets/index-BwZaYMab.js +++ b/assets/index-C6UBXeMY.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-hcwXXuMg.js","assets/number-CDau7Bsv.js","assets/index-CdPQs6F4.js","assets/index-40a497ea-B-e4dja1.js","assets/index-021f6a62-BcF70HI7.js","assets/Index-a4a1058e-B94dMgcD.js","assets/index-DvN7N4_1.js","assets/index-6w8_iIHZ.js","assets/index-J40BUt8X.js","assets/inherits_browser-DCQ5xBDd.js","assets/index.es-IxFjqeYu.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BivK3ymw.js","assets/number-C2Dy0LFJ.js","assets/index-C9Hr7owJ.js","assets/index-40a497ea-B-e4dja1.js","assets/index-021f6a62-BcF70HI7.js","assets/Index-a4a1058e-eVkqWWuo.js","assets/index-CmFE4F7-.js","assets/index-D6EKpZiz.js","assets/index-C2b3983o.js","assets/inherits_browser-B1P7kPq9.js","assets/index.es-DEtxasS7.js"])))=>i.map(i=>d[i]); var fS=Object.defineProperty;var dS=(e,t,n)=>t in e?fS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Se=(e,t,n)=>dS(e,typeof t!="symbol"?t+"":t,n);function hS(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var br=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Sa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function mK(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var g3={exports:{}},Np={},y3={exports:{}},qe={};/** * @license React * react.production.min.js @@ -2150,11 +2150,11 @@ zoo`.split(` ${vR(m)}`),super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Raw Call Arguments:",h].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class CR extends J{constructor(t,{abi:n,args:r,contractAddress:i,docsPath:o,functionName:s,sender:a}){const l=nd({abi:n,args:r,name:s}),u=l?E8({abiItem:l,args:r,includeFunctionName:!1,includeName:!1}):void 0,d=l?no(l,{includeName:!0}):void 0,c=id({address:i&&kR(i),function:d,args:u&&u!=="()"&&`${[...Array((s==null?void 0:s.length)??0).keys()].map(()=>" ").join("")}${u}`,sender:a});super(t.shortMessage||`An unknown error occurred while executing the contract function "${s}".`,{cause:t,docsPath:o,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],c&&"Contract Call:",c].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abi=n,this.args=r,this.cause=t,this.contractAddress=i,this.functionName=s,this.sender=a}}class I1 extends J{constructor({abi:t,data:n,functionName:r,message:i}){let o,s,a,l;if(n&&n!=="0x")try{s=pR({abi:t,data:n});const{abiItem:d,errorName:c,args:f}=s;if(c==="Error")l=f[0];else if(c==="Panic"){const[m]=f;l=_8[m]}else{const m=d?no(d,{includeName:!0}):void 0,p=d&&f?E8({abiItem:d,args:f,includeFunctionName:!1,includeName:!1}):void 0;a=[m?`Error: ${m}`:"",p&&p!=="()"?` ${[...Array((c==null?void 0:c.length)??0).keys()].map(()=>" ").join("")}${p}`:""]}}catch(d){o=d}else i&&(l=i);let u;o instanceof Jx&&(u=o.signature,a=[`Unable to decode signature "${u}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${u}.`]),super(l&&l!=="execution reverted"||u?[`The contract function "${r}" reverted with the following ${u?"signature":"reason"}:`,l||u].join(` `):`The contract function "${r}" reverted.`,{cause:o,metaMessages:a,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=s,this.reason=l,this.signature=u}}class AR extends J{constructor({functionName:t}){super(`The contract function "${t}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${t}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError"})}}class TR extends J{constructor({factory:t}){super(`Deployment for counterfactual contract call failed${t?` for factory "${t}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"})}}class Hb extends J{constructor({data:t,message:n}){super(n||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t}}class Bu extends J{constructor({body:t,cause:n,details:r,headers:i,status:o,url:s}){super("HTTP request failed.",{cause:n,details:r,metaMessages:[o&&`Status: ${o}`,`URL: ${Ub(s)}`,t&&`Request body: ${hn(t)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=t,this.headers=i,this.status=o,this.url=s}}class T8 extends J{constructor({body:t,error:n,url:r}){super("RPC Request failed.",{cause:n,details:n.message,metaMessages:[`URL: ${Ub(r)}`,`Request body: ${hn(t)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=n.code}}class h6 extends J{constructor({body:t,url:n}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${Ub(n)}`,`Request body: ${hn(t)}`],name:"TimeoutError"})}}const IR=-1;class Gn extends J{constructor(t,{code:n,docsPath:r,metaMessages:i,name:o,shortMessage:s}){super(s,{cause:t,docsPath:r,metaMessages:i||(t==null?void 0:t.metaMessages),name:o||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=o||t.name,this.code=t instanceof T8?t.code:n??IR}}let fc=class extends Gn{constructor(t,n){super(t,n),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=n.data}};class mf extends Gn{constructor(t){super(t,{code:mf.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(mf,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class gf extends Gn{constructor(t){super(t,{code:gf.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(gf,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class yf extends Gn{constructor(t,{method:n}={}){super(t,{code:yf.code,name:"MethodNotFoundRpcError",shortMessage:`The method${n?` "${n}"`:""} does not exist / is not available.`})}}Object.defineProperty(yf,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class bf extends Gn{constructor(t){super(t,{code:bf.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(` `)})}}Object.defineProperty(bf,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class ba extends Gn{constructor(t){super(t,{code:ba.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(ba,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class va extends Gn{constructor(t){super(t,{code:va.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(` -`)})}}Object.defineProperty(va,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class vf extends Gn{constructor(t){super(t,{code:vf.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(vf,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class wf extends Gn{constructor(t){super(t,{code:wf.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(wf,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class _f extends Gn{constructor(t){super(t,{code:_f.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(_f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class xf extends Gn{constructor(t,{method:n}={}){super(t,{code:xf.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${n?` "${n}"`:""} is not implemented.`})}}Object.defineProperty(xf,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class Hl extends Gn{constructor(t){super(t,{code:Hl.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(Hl,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class Ef extends Gn{constructor(t){super(t,{code:Ef.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(Ef,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class El extends fc{constructor(t){super(t,{code:El.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(El,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class Sf extends fc{constructor(t){super(t,{code:Sf.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(Sf,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class kf extends fc{constructor(t,{method:n}={}){super(t,{code:kf.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${n?` " ${n}"`:""}.`})}}Object.defineProperty(kf,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class Cf extends fc{constructor(t){super(t,{code:Cf.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(Cf,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class Af extends fc{constructor(t){super(t,{code:Af.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(Af,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class Tf extends fc{constructor(t){super(t,{code:Tf.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(Tf,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class $R extends Gn{constructor(t){super(t,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}const PR=3;function zl(e,{abi:t,address:n,args:r,docsPath:i,functionName:o,sender:s}){const{code:a,data:l,message:u,shortMessage:d}=e instanceof Hb?e:e instanceof J?e.walk(f=>"data"in f)||e.walk():{},c=e instanceof a0?new AR({functionName:o}):[PR,ba.code].includes(a)&&(l||u||d)?new I1({abi:t,data:typeof l=="object"?l.data:l,functionName:o,message:d??u}):e;return new CR(c,{abi:t,args:r,contractAddress:n,docsPath:i,functionName:o,sender:s})}function I8(e){const t=zt(`0x${e.substring(4)}`).substring(26);return td(`0x${t}`)}const OR="modulepreload",RR=function(e){return"/"+e},p6={},ue=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),s=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.allSettled(n.map(a=>{if(a=RR(a),a in p6)return;p6[a]=!0;const l=a.endsWith(".css"),u=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${u}`))return;const d=document.createElement("link");if(d.rel=l?"stylesheet":OR,l||(d.as="script"),d.crossOrigin="",d.href=a,s&&d.setAttribute("nonce",s),document.head.appendChild(d),l)return new Promise((c,f)=>{d.addEventListener("load",c),d.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${a}`)))})}))}return i.then(o=>{for(const s of o||[]){if(s.status!=="rejected")continue;const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s.reason,window.dispatchEvent(a),!a.defaultPrevented)throw s.reason}return t()})};async function LR({hash:e,signature:t}){const n=Er(e)?e:Te(e),{secp256k1:r}=await ue(async()=>{const{secp256k1:s}=await Promise.resolve().then(()=>kN);return{secp256k1:s}},void 0);return`0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){const{r:u,s:d,v:c,yParity:f}=t,m=Number(f??c),p=m6(m);return new r.Signature(ls(u),ls(d)).addRecoveryBit(p)}const s=Er(t)?t:Te(t),a=yi(`0x${s.slice(130)}`),l=m6(a);return r.Signature.fromCompact(s.substring(2,130)).addRecoveryBit(l)})().recoverPublicKey(n.substring(2)).toHex(!1)}`}function m6(e){if(e===0||e===1)return e;if(e===27)return 0;if(e===28)return 1;throw new Error("Invalid yParityOrV value")}async function $8({hash:e,signature:t}){return I8(await LR({hash:e,signature:t}))}function wa(e,t="hex"){const n=P8(e),r=Db(new Uint8Array(n.length));return n.encode(r),t==="hex"?Mt(r.bytes):r.bytes}function P8(e){return Array.isArray(e)?BR(e.map(t=>P8(t))):NR(e)}function BR(e){const t=e.reduce((i,o)=>i+o.length,0),n=O8(t);return{length:t<=55?1+t:1+n+t,encode(i){t<=55?i.pushByte(192+t):(i.pushByte(247+n),n===1?i.pushUint8(t):n===2?i.pushUint16(t):n===3?i.pushUint24(t):i.pushUint32(t));for(const{encode:o}of e)o(i)}}}function NR(e){const t=typeof e=="string"?Sr(e):e,n=O8(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(i){t.length===1&&t[0]<128?i.pushBytes(t):t.length<=55?(i.pushByte(128+t.length),i.pushBytes(t)):(i.pushByte(183+n),n===1?i.pushUint8(t.length):n===2?i.pushUint16(t.length):n===3?i.pushUint24(t.length):i.pushUint32(t.length),i.pushBytes(t))}}}function O8(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new J("Length is too large.")}function R8(e){const{chainId:t,contractAddress:n,nonce:r,to:i}=e,o=zt(so(["0x05",wa([Ae(t),n,Ae(r)])]));return i==="bytes"?Sr(o):o}async function L8(e){const{authorization:t,signature:n}=e;return $8({hash:R8(t),signature:n??t})}class MR extends J{constructor(t,{account:n,docsPath:r,chain:i,data:o,gas:s,gasPrice:a,maxFeePerGas:l,maxPriorityFeePerGas:u,nonce:d,to:c,value:f}){var p;const m=id({from:n==null?void 0:n.address,to:c,value:typeof f<"u"&&`${Fb(f)} ${((p=i==null?void 0:i.nativeCurrency)==null?void 0:p.symbol)||"ETH"}`,data:o,gas:s,gasPrice:typeof a<"u"&&`${Vn(a)} gwei`,maxFeePerGas:typeof l<"u"&&`${Vn(l)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${Vn(u)} gwei`,nonce:d});super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Estimate Gas Arguments:",m].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class ul extends J{constructor({cause:t,message:n}={}){var i;const r=(i=n==null?void 0:n.replace("execution reverted: ",""))==null?void 0:i.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"})}}Object.defineProperty(ul,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(ul,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class _a extends J{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${Vn(n)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"})}}Object.defineProperty(_a,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class $1 extends J{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${Vn(n)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t,name:"FeeCapTooLowError"})}}Object.defineProperty($1,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class P1 extends J{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}is higher than the next one expected.`,{cause:t,name:"NonceTooHighError"})}}Object.defineProperty(P1,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class O1 extends J{constructor({cause:t,nonce:n}={}){super([`Nonce provided for the transaction ${n?`(${n}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(` +`)})}}Object.defineProperty(va,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class vf extends Gn{constructor(t){super(t,{code:vf.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(vf,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class wf extends Gn{constructor(t){super(t,{code:wf.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(wf,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class _f extends Gn{constructor(t){super(t,{code:_f.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(_f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class xf extends Gn{constructor(t,{method:n}={}){super(t,{code:xf.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${n?` "${n}"`:""} is not implemented.`})}}Object.defineProperty(xf,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class Hl extends Gn{constructor(t){super(t,{code:Hl.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(Hl,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class Ef extends Gn{constructor(t){super(t,{code:Ef.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(Ef,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class El extends fc{constructor(t){super(t,{code:El.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(El,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class Sf extends fc{constructor(t){super(t,{code:Sf.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(Sf,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class kf extends fc{constructor(t,{method:n}={}){super(t,{code:kf.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${n?` " ${n}"`:""}.`})}}Object.defineProperty(kf,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class Cf extends fc{constructor(t){super(t,{code:Cf.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(Cf,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class Af extends fc{constructor(t){super(t,{code:Af.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(Af,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class Tf extends fc{constructor(t){super(t,{code:Tf.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(Tf,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class $R extends Gn{constructor(t){super(t,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}const PR=3;function zl(e,{abi:t,address:n,args:r,docsPath:i,functionName:o,sender:s}){const{code:a,data:l,message:u,shortMessage:d}=e instanceof Hb?e:e instanceof J?e.walk(f=>"data"in f)||e.walk():{},c=e instanceof a0?new AR({functionName:o}):[PR,ba.code].includes(a)&&(l||u||d)?new I1({abi:t,data:typeof l=="object"?l.data:l,functionName:o,message:d??u}):e;return new CR(c,{abi:t,args:r,contractAddress:n,docsPath:i,functionName:o,sender:s})}function I8(e){const t=zt(`0x${e.substring(4)}`).substring(26);return td(`0x${t}`)}const OR="modulepreload",RR=function(e){return"/push-keys/"+e},p6={},ue=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),s=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.allSettled(n.map(a=>{if(a=RR(a),a in p6)return;p6[a]=!0;const l=a.endsWith(".css"),u=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${u}`))return;const d=document.createElement("link");if(d.rel=l?"stylesheet":OR,l||(d.as="script"),d.crossOrigin="",d.href=a,s&&d.setAttribute("nonce",s),document.head.appendChild(d),l)return new Promise((c,f)=>{d.addEventListener("load",c),d.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${a}`)))})}))}return i.then(o=>{for(const s of o||[]){if(s.status!=="rejected")continue;const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s.reason,window.dispatchEvent(a),!a.defaultPrevented)throw s.reason}return t()})};async function LR({hash:e,signature:t}){const n=Er(e)?e:Te(e),{secp256k1:r}=await ue(async()=>{const{secp256k1:s}=await Promise.resolve().then(()=>kN);return{secp256k1:s}},void 0);return`0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){const{r:u,s:d,v:c,yParity:f}=t,m=Number(f??c),p=m6(m);return new r.Signature(ls(u),ls(d)).addRecoveryBit(p)}const s=Er(t)?t:Te(t),a=yi(`0x${s.slice(130)}`),l=m6(a);return r.Signature.fromCompact(s.substring(2,130)).addRecoveryBit(l)})().recoverPublicKey(n.substring(2)).toHex(!1)}`}function m6(e){if(e===0||e===1)return e;if(e===27)return 0;if(e===28)return 1;throw new Error("Invalid yParityOrV value")}async function $8({hash:e,signature:t}){return I8(await LR({hash:e,signature:t}))}function wa(e,t="hex"){const n=P8(e),r=Db(new Uint8Array(n.length));return n.encode(r),t==="hex"?Mt(r.bytes):r.bytes}function P8(e){return Array.isArray(e)?BR(e.map(t=>P8(t))):NR(e)}function BR(e){const t=e.reduce((i,o)=>i+o.length,0),n=O8(t);return{length:t<=55?1+t:1+n+t,encode(i){t<=55?i.pushByte(192+t):(i.pushByte(247+n),n===1?i.pushUint8(t):n===2?i.pushUint16(t):n===3?i.pushUint24(t):i.pushUint32(t));for(const{encode:o}of e)o(i)}}}function NR(e){const t=typeof e=="string"?Sr(e):e,n=O8(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(i){t.length===1&&t[0]<128?i.pushBytes(t):t.length<=55?(i.pushByte(128+t.length),i.pushBytes(t)):(i.pushByte(183+n),n===1?i.pushUint8(t.length):n===2?i.pushUint16(t.length):n===3?i.pushUint24(t.length):i.pushUint32(t.length),i.pushBytes(t))}}}function O8(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new J("Length is too large.")}function R8(e){const{chainId:t,contractAddress:n,nonce:r,to:i}=e,o=zt(so(["0x05",wa([Ae(t),n,Ae(r)])]));return i==="bytes"?Sr(o):o}async function L8(e){const{authorization:t,signature:n}=e;return $8({hash:R8(t),signature:n??t})}class MR extends J{constructor(t,{account:n,docsPath:r,chain:i,data:o,gas:s,gasPrice:a,maxFeePerGas:l,maxPriorityFeePerGas:u,nonce:d,to:c,value:f}){var p;const m=id({from:n==null?void 0:n.address,to:c,value:typeof f<"u"&&`${Fb(f)} ${((p=i==null?void 0:i.nativeCurrency)==null?void 0:p.symbol)||"ETH"}`,data:o,gas:s,gasPrice:typeof a<"u"&&`${Vn(a)} gwei`,maxFeePerGas:typeof l<"u"&&`${Vn(l)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${Vn(u)} gwei`,nonce:d});super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Estimate Gas Arguments:",m].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class ul extends J{constructor({cause:t,message:n}={}){var i;const r=(i=n==null?void 0:n.replace("execution reverted: ",""))==null?void 0:i.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"})}}Object.defineProperty(ul,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(ul,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class _a extends J{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${Vn(n)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"})}}Object.defineProperty(_a,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class $1 extends J{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${Vn(n)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t,name:"FeeCapTooLowError"})}}Object.defineProperty($1,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class P1 extends J{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}is higher than the next one expected.`,{cause:t,name:"NonceTooHighError"})}}Object.defineProperty(P1,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class O1 extends J{constructor({cause:t,nonce:n}={}){super([`Nonce provided for the transaction ${n?`(${n}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(` `),{cause:t,name:"NonceTooLowError"})}}Object.defineProperty(O1,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class R1 extends J{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}exceeds the maximum allowed nonce.`,{cause:t,name:"NonceMaxValueError"})}}Object.defineProperty(R1,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class L1 extends J{constructor({cause:t}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(` `),{cause:t,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(L1,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class B1 extends J{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:t,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(B1,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class N1 extends J{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction is too low.`,{cause:t,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(N1,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class M1 extends J{constructor({cause:t}){super("The transaction type is not supported for this chain.",{cause:t,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(M1,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class If extends J{constructor({cause:t,maxPriorityFeePerGas:n,maxFeePerGas:r}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${n?` = ${Vn(n)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${Vn(r)} gwei`:""}).`].join(` `),{cause:t,name:"TipAboveFeeCapError"})}}Object.defineProperty(If,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class p0 extends J{constructor({cause:t}){super(`An error occurred while executing: ${t==null?void 0:t.shortMessage}`,{cause:t,name:"UnknownNodeError"})}}function zb(e,t){const n=(e.details||"").toLowerCase(),r=e instanceof J?e.walk(i=>i.code===ul.code):e;return r instanceof J?new ul({cause:e,message:r.details}):ul.nodeMessage.test(n)?new ul({cause:e,message:e.details}):_a.nodeMessage.test(n)?new _a({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):$1.nodeMessage.test(n)?new $1({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):P1.nodeMessage.test(n)?new P1({cause:e,nonce:t==null?void 0:t.nonce}):O1.nodeMessage.test(n)?new O1({cause:e,nonce:t==null?void 0:t.nonce}):R1.nodeMessage.test(n)?new R1({cause:e,nonce:t==null?void 0:t.nonce}):L1.nodeMessage.test(n)?new L1({cause:e}):B1.nodeMessage.test(n)?new B1({cause:e,gas:t==null?void 0:t.gas}):N1.nodeMessage.test(n)?new N1({cause:e,gas:t==null?void 0:t.gas}):M1.nodeMessage.test(n)?new M1({cause:e}):If.nodeMessage.test(n)?new If({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas,maxPriorityFeePerGas:t==null?void 0:t.maxPriorityFeePerGas}):new p0({cause:e})}function jR(e,{docsPath:t,...n}){const r=(()=>{const i=zb(e,n);return i instanceof p0?e:i})();return new MR(r,{docsPath:t,...n})}function Wb(e,{format:t}){if(!t)return{};const n={};function r(o){const s=Object.keys(o);for(const a of s)a in e&&(n[a]=e[a]),o[a]&&typeof o[a]=="object"&&!Array.isArray(o[a])&&r(o[a])}const i=t(e||{});return r(i),n}const DR={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function m0(e){const t={};return typeof e.authorizationList<"u"&&(t.authorizationList=FR(e.authorizationList)),typeof e.accessList<"u"&&(t.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(t.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?t.blobs=e.blobs.map(n=>Mt(n)):t.blobs=e.blobs),typeof e.data<"u"&&(t.data=e.data),typeof e.from<"u"&&(t.from=e.from),typeof e.gas<"u"&&(t.gas=Ae(e.gas)),typeof e.gasPrice<"u"&&(t.gasPrice=Ae(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(t.maxFeePerBlobGas=Ae(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(t.maxFeePerGas=Ae(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(t.maxPriorityFeePerGas=Ae(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(t.nonce=Ae(e.nonce)),typeof e.to<"u"&&(t.to=e.to),typeof e.type<"u"&&(t.type=DR[e.type]),typeof e.value<"u"&&(t.value=Ae(e.value)),t}function FR(e){return e.map(t=>({address:t.contractAddress,r:t.r,s:t.s,chainId:Ae(t.chainId),nonce:Ae(t.nonce),...typeof t.yParity<"u"?{yParity:Ae(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:Ae(t.v)}:{}}))}function g6(e){if(!(!e||e.length===0))return e.reduce((t,{slot:n,value:r})=>{if(n.length!==66)throw new J2({size:n.length,targetSize:66,type:"hex"});if(r.length!==66)throw new J2({size:r.length,targetSize:66,type:"hex"});return t[n]=r,t},{})}function UR(e){const{balance:t,nonce:n,state:r,stateDiff:i,code:o}=e,s={};if(o!==void 0&&(s.code=o),t!==void 0&&(s.balance=Ae(t)),n!==void 0&&(s.nonce=Ae(n)),r!==void 0&&(s.state=g6(r)),i!==void 0){if(s.state)throw new bR;s.stateDiff=g6(i)}return s}function B8(e){if(!e)return;const t={};for(const{address:n,...r}of e){if(!on(n,{strict:!1}))throw new Pn({address:n});if(t[n])throw new yR({address:n});t[n]=UR(r)}return t}const g0=2n**256n-1n;function od(e){const{account:t,gasPrice:n,maxFeePerGas:r,maxPriorityFeePerGas:i,to:o}=e,s=t?cr(t):void 0;if(s&&!on(s.address))throw new Pn({address:s.address});if(o&&!on(o))throw new Pn({address:o});if(typeof n<"u"&&(typeof r<"u"||typeof i<"u"))throw new wR;if(r&&r>g0)throw new _a({maxFeePerGas:r});if(i&&r&&i>r)throw new If({maxFeePerGas:r,maxPriorityFeePerGas:i})}class HR extends J{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class Vb extends J{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class zR extends J{constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${Vn(t)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}class N8 extends J{constructor({blockHash:t,blockNumber:n}){let r="Block";t&&(r=`Block at hash "${t}"`),n&&(r=`Block at number "${n}"`),super(`${r} could not be found.`,{name:"BlockNotFoundError"})}}const M8={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function j8(e){const t={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?yi(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?yi(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?M8[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(t.authorizationList=WR(e.authorizationList)),t.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof t.v=="bigint"){if(t.v===0n||t.v===27n)return 0;if(t.v===1n||t.v===28n)return 1;if(t.v>=35n)return t.v%2n===0n?1:0}})(),t.type==="legacy"&&(delete t.accessList,delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas,delete t.yParity),t.type==="eip2930"&&(delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),t.type==="eip1559"&&delete t.maxFeePerBlobGas,t}function WR(e){return e.map(t=>({contractAddress:t.address,r:t.r,s:t.s,chainId:Number(t.chainId),nonce:Number(t.nonce),...typeof t.yParity<"u"?{yParity:Number(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:Number(t.v)}:{}}))}function D8(e){var n;const t=(n=e.transactions)==null?void 0:n.map(r=>typeof r=="string"?r:j8(r));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:t,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}async function us(e,{blockHash:t,blockNumber:n,blockTag:r,includeTransactions:i}={}){var d,c,f;const o=r??"latest",s=i??!1,a=n!==void 0?Ae(n):void 0;let l=null;if(t?l=await e.request({method:"eth_getBlockByHash",params:[t,s]},{dedupe:!0}):l=await e.request({method:"eth_getBlockByNumber",params:[a||o,s]},{dedupe:!!a}),!l)throw new N8({blockHash:t,blockNumber:n});return(((f=(c=(d=e.chain)==null?void 0:d.formatters)==null?void 0:c.block)==null?void 0:f.format)||D8)(l)}async function qb(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function VR(e,t){return F8(e,t)}async function F8(e,t){var o,s;const{block:n,chain:r=e.chain,request:i}=t||{};try{const a=((o=r==null?void 0:r.fees)==null?void 0:o.maxPriorityFeePerGas)??((s=r==null?void 0:r.fees)==null?void 0:s.defaultPriorityFee);if(typeof a=="function"){const u=n||await Ee(e,us,"getBlock")({}),d=await a({block:u,client:e,request:i});if(d===null)throw new Error;return d}if(typeof a<"u")return a;const l=await e.request({method:"eth_maxPriorityFeePerGas"});return ls(l)}catch{const[a,l]=await Promise.all([n?Promise.resolve(n):Ee(e,us,"getBlock")({}),Ee(e,qb,"getGasPrice")({})]);if(typeof a.baseFeePerGas!="bigint")throw new Vb;const u=l-a.baseFeePerGas;return u<0n?0n:u}}async function qR(e,t){return j1(e,t)}async function j1(e,t){var f,m;const{block:n,chain:r=e.chain,request:i,type:o="eip1559"}=t||{},s=await(async()=>{var p,h;return typeof((p=r==null?void 0:r.fees)==null?void 0:p.baseFeeMultiplier)=="function"?r.fees.baseFeeMultiplier({block:n,client:e,request:i}):((h=r==null?void 0:r.fees)==null?void 0:h.baseFeeMultiplier)??1.2})();if(s<1)throw new HR;const l=10**(((f=s.toString().split(".")[1])==null?void 0:f.length)??0),u=p=>p*BigInt(Math.ceil(s*l))/BigInt(l),d=n||await Ee(e,us,"getBlock")({});if(typeof((m=r==null?void 0:r.fees)==null?void 0:m.estimateFeesPerGas)=="function"){const p=await r.fees.estimateFeesPerGas({block:n,client:e,multiply:u,request:i,type:o});if(p!==null)return p}if(o==="eip1559"){if(typeof d.baseFeePerGas!="bigint")throw new Vb;const p=typeof(i==null?void 0:i.maxPriorityFeePerGas)=="bigint"?i.maxPriorityFeePerGas:await F8(e,{block:d,chain:r,request:i}),h=u(d.baseFeePerGas);return{maxFeePerGas:(i==null?void 0:i.maxFeePerGas)??h+p,maxPriorityFeePerGas:p}}return{gasPrice:(i==null?void 0:i.gasPrice)??u(await Ee(e,qb,"getGasPrice")({}))}}async function U8(e,{address:t,blockTag:n="latest",blockNumber:r}){const i=await e.request({method:"eth_getTransactionCount",params:[t,r?Ae(r):n]},{dedupe:!!r});return yi(i)}function Gb(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(o=>Sr(o)):e.blobs,i=[];for(const o of r)i.push(Uint8Array.from(t.blobToKzgCommitment(o)));return n==="bytes"?i:i.map(o=>Mt(o))}function Kb(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(s=>Sr(s)):e.blobs,i=typeof e.commitments[0]=="string"?e.commitments.map(s=>Sr(s)):e.commitments,o=[];for(let s=0;sMt(s))}function GR(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const i=BigInt(32),o=BigInt(4294967295),s=Number(n>>i&o),a=Number(n&o),l=r?4:0,u=r?0:4;e.setUint32(t+l,s,r),e.setUint32(t+u,a,r)}const KR=(e,t,n)=>e&t^~e&n,ZR=(e,t,n)=>e&t^e&n^t&n;class Zb extends Pb{constructor(t,n,r,i){super(),this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=_l(this.buffer)}update(t){Ul(this);const{view:n,buffer:r,blockLen:i}=this;t=c0(t);const o=t.length;for(let s=0;si-s&&(this.process(r,0),s=0);for(let c=s;cd.length)throw new Error("_sha2: outputLen bigger than state");for(let c=0;c>>3,h=si(m,17)^si(m,19)^m>>>10;Po[c]=h+Po[c-7]+p+Po[c-16]|0}let{A:r,B:i,C:o,D:s,E:a,F:l,G:u,H:d}=this;for(let c=0;c<64;c++){const f=si(a,6)^si(a,11)^si(a,25),m=d+f+KR(a,l,u)+XR[c]+Po[c]|0,h=(si(r,2)^si(r,13)^si(r,22))+ZR(r,i,o)|0;d=u,u=l,l=a,a=s+m|0,s=o,o=i,i=r,r=m+h|0}r=r+this.A|0,i=i+this.B|0,o=o+this.C|0,s=s+this.D|0,a=a+this.E|0,l=l+this.F|0,u=u+this.G|0,d=d+this.H|0,this.set(r,i,o,s,a,l,u,d)}roundClean(){Po.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const y0=u0(()=>new YR);function QR(e,t){return y0(Er(e,{strict:!1})?cs(e):e)}function JR(e){const{commitment:t,version:n=1}=e,r=e.to??(typeof t=="string"?"hex":"bytes"),i=QR(t);return i.set([n],0),r==="bytes"?i:Mt(i)}function H8(e){const{commitments:t,version:n}=e,r=e.to??(typeof t[0]=="string"?"hex":"bytes"),i=[];for(const o of t)i.push(JR({commitment:o,to:r,version:n}));return i}const y6=6,z8=32,Xb=4096,W8=z8*Xb,b6=W8*y6-1-1*Xb*y6,V8=1;class eL extends J{constructor({maxSize:t,size:n}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${n} bytes`],name:"BlobSizeTooLargeError"})}}class q8 extends J{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class tL extends J{constructor({hash:t,size:n}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${n}`],name:"InvalidVersionedHashSizeError"})}}class nL extends J{constructor({hash:t,version:n}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${V8}`,`Received: ${n}`],name:"InvalidVersionedHashVersionError"})}}function rL(e){const t=e.to??(typeof e.data=="string"?"hex":"bytes"),n=typeof e.data=="string"?Sr(e.data):e.data,r=At(n);if(!r)throw new q8;if(r>b6)throw new eL({maxSize:b6,size:r});const i=[];let o=!0,s=0;for(;o;){const a=Db(new Uint8Array(W8));let l=0;for(;la.bytes):i.map(a=>Mt(a.bytes))}function G8(e){const{data:t,kzg:n,to:r}=e,i=e.blobs??rL({data:t,to:r}),o=e.commitments??Gb({blobs:i,kzg:n,to:r}),s=e.proofs??Kb({blobs:i,commitments:o,kzg:n,to:r}),a=[];for(let l=0;l"u"&&c)if(l){const g=await y();f.nonce=await l.consume({address:c.address,chainId:g,client:e})}else f.nonce=await Ee(e,U8,"getTransactionCount")({address:c.address,blockTag:"pending"});if((u.includes("fees")||u.includes("type"))&&typeof d>"u")try{f.type=K8(f)}catch{const g=await p();f.type=typeof(g==null?void 0:g.baseFeePerGas)=="bigint"?"eip1559":"legacy"}if(u.includes("fees"))if(f.type!=="legacy"&&f.type!=="eip2930"){if(typeof f.maxFeePerGas>"u"||typeof f.maxPriorityFeePerGas>"u"){const g=await p(),{maxFeePerGas:b,maxPriorityFeePerGas:v}=await j1(e,{block:g,chain:i,request:f});if(typeof t.maxPriorityFeePerGas>"u"&&t.maxFeePerGas&&t.maxFeePerGas"u"&&(f.gas=await Ee(e,Yb,"estimateGas")({...f,account:c?{address:c.address,type:"json-rpc"}:void 0})),od(f),delete f.parameters,f}async function X8(e,{address:t,blockNumber:n,blockTag:r="latest"}){const i=n?Ae(n):void 0,o=await e.request({method:"eth_getBalance",params:[t,i||r]});return BigInt(o)}async function Yb(e,t){var i,o,s;const n=t.account??e.account,r=n?cr(n):void 0;try{let N=function(B){const{block:V,request:j,rpcStateOverride:W}=B;return e.request({method:"eth_estimateGas",params:W?[j,V??"latest",W]:V?[j,V]:[j]})};const{accessList:a,authorizationList:l,blobs:u,blobVersionedHashes:d,blockNumber:c,blockTag:f,data:m,gas:p,gasPrice:h,maxFeePerBlobGas:y,maxFeePerGas:g,maxPriorityFeePerGas:b,nonce:v,value:w,stateOverride:E,...C}=await b0(e,{...t,parameters:(r==null?void 0:r.type)==="local"?void 0:["blobVersionedHashes"]}),_=(c?Ae(c):void 0)||f,S=B8(E),A=await(async()=>{if(C.to)return C.to;if(l&&l.length>0)return await L8({authorization:l[0]}).catch(()=>{throw new J("`to` is required. Could not infer from `authorizationList`")})})();od(t);const I=(s=(o=(i=e.chain)==null?void 0:i.formatters)==null?void 0:o.transactionRequest)==null?void 0:s.format,F=(I||m0)({...Wb(C,{format:I}),from:r==null?void 0:r.address,accessList:a,authorizationList:l,blobs:u,blobVersionedHashes:d,data:m,gas:p,gasPrice:h,maxFeePerBlobGas:y,maxFeePerGas:g,maxPriorityFeePerGas:b,nonce:v,to:A,value:w});let R=BigInt(await N({block:_,request:F,rpcStateOverride:S}));if(l){const B=await X8(e,{address:F.from}),V=await Promise.all(l.map(async j=>{const{contractAddress:W}=j,Y=await N({block:_,request:{authorizationList:void 0,data:m,from:r==null?void 0:r.address,to:W,value:Ae(B)},rpcStateOverride:S}).catch(()=>100000n);return 2n*BigInt(Y)}));R+=V.reduce((j,W)=>j+W,0n)}return R}catch(a){throw jR(a,{...t,account:r,chain:e.chain})}}async function Y8(e,t){const{abi:n,address:r,args:i,functionName:o,...s}=t,a=ws({abi:n,args:i,functionName:o});try{return await Ee(e,Yb,"estimateGas")({data:a,to:r,...s})}catch(l){const u=s.account?cr(s.account):void 0;throw zl(l,{abi:n,address:r,args:i,docsPath:"/docs/contract/estimateContractGas",functionName:o,sender:u==null?void 0:u.address})}}function Qb(e,t){if(!on(e,{strict:!1}))throw new Pn({address:e});if(!on(t,{strict:!1}))throw new Pn({address:t});return e.toLowerCase()===t.toLowerCase()}const v6="/docs/contract/decodeEventLog";function Jb(e){const{abi:t,data:n,strict:r,topics:i}=e,o=r??!0,[s,...a]=i;if(!s)throw new UP({docsPath:v6});const l=t.length===1?t[0]:t.find(h=>h.type==="event"&&s===f0(no(h)));if(!(l&&"name"in l)||l.type!=="event")throw new e8(s,{docsPath:v6});const{name:u,inputs:d}=l,c=d==null?void 0:d.some(h=>!("name"in h&&h.name));let f=c?[]:{};const m=d.filter(h=>"indexed"in h&&h.indexed);for(let h=0;h!("indexed"in h&&h.indexed));if(p.length>0){if(n&&n!=="0x")try{const h=h0(p,n);if(h)if(c)f=[...f,...h];else for(let y=0;y0?f:void 0}}function iL({param:e,value:t}){return e.type==="string"||e.type==="bytes"||e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/)?t:(h0([e],t)||[])[0]}function ev(e){const{abi:t,args:n,logs:r,strict:i=!0}=e,o=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})();return r.map(s=>{var a;try{const l=t.find(d=>d.type==="event"&&s.topics[0]===f0(d));if(!l)return null;const u=Jb({...s,abi:[l],strict:i});return o&&!o.includes(u.eventName)||!oL({args:u.args,inputs:l.inputs,matchArgs:n})?null:{...u,...s}}catch(l){let u,d;if(l instanceof e8)return null;if(l instanceof df||l instanceof l0){if(i)return null;u=l.abiItem.name,d=(a=l.abiItem.inputs)==null?void 0:a.some(c=>!("name"in c&&c.name))}return{...s,args:d?[]:{},eventName:u}}}).filter(Boolean)}function oL(e){const{args:t,inputs:n,matchArgs:r}=e;if(!r)return!0;if(!t)return!1;function i(o,s,a){try{return o.type==="address"?Qb(s,a):o.type==="string"||o.type==="bytes"?zt(cs(s))===a:s===a}catch{return!1}}return Array.isArray(t)&&Array.isArray(r)?r.every((o,s)=>{if(!o)return!0;const a=n[s];return a?(Array.isArray(o)?o:[o]).some(u=>i(a,u,t[s])):!1}):typeof t=="object"&&!Array.isArray(t)&&typeof r=="object"&&!Array.isArray(r)?Object.entries(r).every(([o,s])=>{if(!s)return!0;const a=n.find(u=>u.name===o);return a?(Array.isArray(s)?s:[s]).some(u=>i(a,u,t[o])):!1}):!1}function fs(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}async function tv(e,{address:t,blockHash:n,fromBlock:r,toBlock:i,event:o,events:s,args:a,strict:l}={}){const u=l??!1,d=s??(o?[o]:void 0);let c=[];d&&(c=[d.flatMap(h=>rd({abi:[h],eventName:h.name,args:s?void 0:a}))],o&&(c=c[0]));let f;n?f=await e.request({method:"eth_getLogs",params:[{address:t,topics:c,blockHash:n}]}):f=await e.request({method:"eth_getLogs",params:[{address:t,topics:c,fromBlock:typeof r=="bigint"?Ae(r):r,toBlock:typeof i=="bigint"?Ae(i):i}]});const m=f.map(p=>fs(p));return d?ev({abi:d,args:a,logs:m,strict:u}):m}async function nv(e,t){const{abi:n,address:r,args:i,blockHash:o,eventName:s,fromBlock:a,toBlock:l,strict:u}=t,d=s?nd({abi:n,name:s}):void 0,c=d?void 0:n.filter(f=>f.type==="event");return Ee(e,tv,"getLogs")({address:r,args:i,blockHash:o,event:d,events:c,fromBlock:a,toBlock:l,strict:u})}const Lm="/docs/contract/decodeFunctionResult";function dc(e){const{abi:t,args:n,functionName:r,data:i}=e;let o=t[0];if(r){const a=nd({abi:t,args:n,name:r});if(!a)throw new cp(r,{docsPath:Lm});o=a}if(o.type!=="function")throw new cp(void 0,{docsPath:Lm});if(!o.outputs)throw new HP(o.name,{docsPath:Lm});const s=h0(o.outputs,i);if(s&&s.length>1)return s;if(s&&s.length===1)return s[0]}const D1=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"}],Q8=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"},{inputs:[],name:"ResolverNotContract",type:"error"},{inputs:[{name:"returnData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{components:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"errors",type:"tuple[]"}],name:"HttpError",type:"error"}],J8=[...Q8,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]},{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],sL=[...Q8,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]},{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],w6=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],_6=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],aL=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"}],lL="0x82ad56cb",cL="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",uL="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",fL="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572";class F1 extends J{constructor({blockNumber:t,chain:n,contract:r}){super(`Chain "${n.name}" does not support contract "${r.name}".`,{metaMessages:["This could be due to any of the following:",...t&&r.blockCreated&&r.blockCreated>t?[`- The contract "${r.name}" was not deployed until block ${r.blockCreated} (current block ${t}).`]:[`- The chain does not have the contract "${r.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}class dL extends J{constructor({chain:t,currentChainId:n}){super(`The current chain of the wallet (id: ${n}) does not match the target chain for the transaction (id: ${t.id} – ${t.name}).`,{metaMessages:[`Current Chain ID: ${n}`,`Expected Chain ID: ${t.id} – ${t.name}`],name:"ChainMismatchError"})}}class hL extends J{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(` -`),{name:"ChainNotFoundError"})}}class eE extends J{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}class v0 extends J{constructor({chainId:t}){super(typeof t=="number"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}const Bm="/docs/contract/encodeDeployData";function w0(e){const{abi:t,args:n,bytecode:r}=e;if(!n||n.length===0)return r;const i=t.find(s=>"type"in s&&s.type==="constructor");if(!i)throw new MP({docsPath:Bm});if(!("inputs"in i))throw new Y2({docsPath:Bm});if(!i.inputs||i.inputs.length===0)throw new Y2({docsPath:Bm});const o=uc(i.inputs,n);return so([r,o])}function hc({blockNumber:e,chain:t,contract:n}){var i;const r=(i=t==null?void 0:t.contracts)==null?void 0:i[n];if(!r)throw new F1({chain:t,contract:{name:n}});if(e&&r.blockCreated&&r.blockCreated>e)throw new F1({blockNumber:e,chain:t,contract:{name:n,blockCreated:r.blockCreated}});return r.address}function pL(e,{docsPath:t,...n}){const r=(()=>{const i=zb(e,n);return i instanceof p0?e:i})();return new A8(r,{docsPath:t,...n})}const Nm=new Map;function tE({fn:e,id:t,shouldSplitBatch:n,wait:r=0,sort:i}){const o=async()=>{const d=l();s();const c=d.map(({args:f})=>f);c.length!==0&&e(c).then(f=>{var m;i&&Array.isArray(f)&&f.sort(i);for(let p=0;p{var m;for(let p=0;pNm.delete(t),a=()=>l().map(({args:d})=>d),l=()=>Nm.get(t)||[],u=d=>Nm.set(t,[...l(),d]);return{flush:s,async schedule(d){const c={},f=new Promise((h,y)=>{c.resolve=h,c.reject=y});return(n==null?void 0:n([...a(),d]))&&o(),l().length>0?(u({args:d,pendingPromise:c}),f):(u({args:d,pendingPromise:c}),setTimeout(o,r),f)}}}async function _0(e,t){var I,L,F,N;const{account:n=e.account,batch:r=!!((I=e.batch)!=null&&I.multicall),blockNumber:i,blockTag:o="latest",accessList:s,blobs:a,code:l,data:u,factory:d,factoryData:c,gas:f,gasPrice:m,maxFeePerBlobGas:p,maxFeePerGas:h,maxPriorityFeePerGas:y,nonce:g,to:b,value:v,stateOverride:w,...E}=t,C=n?cr(n):void 0;if(l&&(d||c))throw new J("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(l&&b)throw new J("Cannot provide both `code` & `to` as parameters.");const k=l&&u,_=d&&c&&b&&u,S=k||_,A=k?yL({code:l,data:u}):_?bL({data:u,factory:d,factoryData:c,to:b}):u;try{od(t);const B=(i?Ae(i):void 0)||o,V=B8(w),j=(N=(F=(L=e.chain)==null?void 0:L.formatters)==null?void 0:F.transactionRequest)==null?void 0:N.format,Y=(j||m0)({...Wb(E,{format:j}),from:C==null?void 0:C.address,accessList:s,blobs:a,data:A,gas:f,gasPrice:m,maxFeePerBlobGas:p,maxFeePerGas:h,maxPriorityFeePerGas:y,nonce:g,to:S?void 0:b,value:v});if(r&&mL({request:Y})&&!V)try{return await gL(e,{...Y,blockNumber:i,blockTag:o})}catch(ae){if(!(ae instanceof eE)&&!(ae instanceof F1))throw ae}const te=await e.request({method:"eth_call",params:V?[Y,B,V]:[Y,B]});return te==="0x"?{data:void 0}:{data:te}}catch(R){const B=vL(R),{offchainLookup:V,offchainLookupSignature:j}=await ue(async()=>{const{offchainLookup:W,offchainLookupSignature:Y}=await import("./ccip-B9fhUHMP.js");return{offchainLookup:W,offchainLookupSignature:Y}},[]);if(e.ccipRead!==!1&&(B==null?void 0:B.slice(0,10))===j&&b)return{data:await V(e,{data:B,to:b})};throw S&&(B==null?void 0:B.slice(0,10))==="0x101bb98d"?new TR({factory:d}):pL(R,{...t,account:C,chain:e.chain})}}function mL({request:e}){const{data:t,to:n,...r}=e;return!(!t||t.startsWith(lL)||!n||Object.values(r).filter(i=>typeof i<"u").length>0)}async function gL(e,t){var h;const{batchSize:n=1024,wait:r=0}=typeof((h=e.batch)==null?void 0:h.multicall)=="object"?e.batch.multicall:{},{blockNumber:i,blockTag:o="latest",data:s,multicallAddress:a,to:l}=t;let u=a;if(!u){if(!e.chain)throw new eE;u=hc({blockNumber:i,chain:e.chain,contract:"multicall3"})}const c=(i?Ae(i):void 0)||o,{schedule:f}=tE({id:`${e.uid}.${c}`,wait:r,shouldSplitBatch(y){return y.reduce((b,{data:v})=>b+(v.length-2),0)>n*2},fn:async y=>{const g=y.map(w=>({allowFailure:!0,callData:w.data,target:w.to})),b=ws({abi:D1,args:[g],functionName:"aggregate3"}),v=await e.request({method:"eth_call",params:[{data:b,to:u},c]});return dc({abi:D1,args:[g],functionName:"aggregate3",data:v||"0x"})}}),[{returnData:m,success:p}]=await f({data:s,to:l});if(!p)throw new Hb({data:m});return m==="0x"?{data:void 0}:{data:m}}function yL(e){const{code:t,data:n}=e;return w0({abi:Zx(["constructor(bytes, bytes)"]),bytecode:cL,args:[t,n]})}function bL(e){const{data:t,factory:n,factoryData:r,to:i}=e;return w0({abi:Zx(["constructor(address, bytes, address, bytes)"]),bytecode:uL,args:[i,t,n,r]})}function vL(e){var n;if(!(e instanceof J))return;const t=e.walk();return typeof(t==null?void 0:t.data)=="object"?(n=t.data)==null?void 0:n.data:t.data}async function bi(e,t){const{abi:n,address:r,args:i,functionName:o,...s}=t,a=ws({abi:n,args:i,functionName:o});try{const{data:l}=await Ee(e,_0,"call")({...s,data:a,to:r});return dc({abi:n,args:i,functionName:o,data:l||"0x"})}catch(l){throw zl(l,{abi:n,address:r,args:i,docsPath:"/docs/contract/readContract",functionName:o})}}async function nE(e,t){const{abi:n,address:r,args:i,dataSuffix:o,functionName:s,...a}=t,l=a.account?cr(a.account):e.account,u=ws({abi:n,args:i,functionName:s});try{const{data:d}=await Ee(e,_0,"call")({batch:!1,data:`${u}${o?o.replace("0x",""):""}`,to:r,...a,account:l}),c=dc({abi:n,args:i,functionName:s,data:d||"0x"}),f=n.filter(m=>"name"in m&&m.name===t.functionName);return{result:c,request:{abi:f,address:r,args:i,dataSuffix:o,functionName:s,...a,account:l}}}catch(d){throw zl(d,{abi:n,address:r,args:i,docsPath:"/docs/contract/simulateContract",functionName:s,sender:l==null?void 0:l.address})}}const Mm=new Map,x6=new Map;let wL=0;function ds(e,t,n){const r=++wL,i=()=>Mm.get(e)||[],o=()=>{const d=i();Mm.set(e,d.filter(c=>c.id!==r))},s=()=>{const d=x6.get(e);i().length===1&&d&&d(),o()},a=i();if(Mm.set(e,[...a,{id:r,fns:t}]),a&&a.length>0)return s;const l={};for(const d in t)l[d]=(...c)=>{var m,p;const f=i();if(f.length!==0)for(const h of f)(p=(m=h.fns)[d])==null||p.call(m,...c)};const u=n(l);return typeof u=="function"&&x6.set(e,u),s}async function U1(e){return new Promise(t=>setTimeout(t,e))}function ad(e,{emitOnBegin:t,initialWaitTime:n,interval:r}){let i=!0;const o=()=>i=!1;return(async()=>{let a;t&&(a=await e({unpoll:o}));const l=await(n==null?void 0:n(a))??r;await U1(l);const u=async()=>{i&&(await e({unpoll:o}),await U1(r),u())};u()})(),o}const _L=new Map,xL=new Map;function EL(e){const t=(i,o)=>({clear:()=>o.delete(i),get:()=>o.get(i),set:s=>o.set(i,s)}),n=t(e,_L),r=t(e,xL);return{clear:()=>{n.clear(),r.clear()},promise:n,response:r}}async function SL(e,{cacheKey:t,cacheTime:n=Number.POSITIVE_INFINITY}){const r=EL(t),i=r.response.get();if(i&&n>0&&new Date().getTime()-i.created.getTime()`blockNumber.${e}`;async function ld(e,{cacheTime:t=e.cacheTime}={}){const n=await SL(()=>e.request({method:"eth_blockNumber"}),{cacheKey:kL(e.uid),cacheTime:t});return BigInt(n)}async function x0(e,{filter:t}){const n="strict"in t&&t.strict,r=await t.request({method:"eth_getFilterChanges",params:[t.id]});if(typeof r[0]=="string")return r;const i=r.map(o=>fs(o));return!("abi"in t)||!t.abi?i:ev({abi:t.abi,logs:i,strict:n})}async function E0(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}function rE(e,t){const{abi:n,address:r,args:i,batch:o=!0,eventName:s,fromBlock:a,onError:l,onLogs:u,poll:d,pollingInterval:c=e.pollingInterval,strict:f}=t;return(typeof d<"u"?d:typeof a=="bigint"?!0:!(e.transport.type==="webSocket"||e.transport.type==="fallback"&&e.transport.transports[0].config.type==="webSocket"))?(()=>{const y=f??!1,g=hn(["watchContractEvent",r,i,o,e.uid,s,c,y,a]);return ds(g,{onLogs:u,onError:l},b=>{let v;a!==void 0&&(v=a-1n);let w,E=!1;const C=ad(async()=>{var k;if(!E){try{w=await Ee(e,jb,"createContractEventFilter")({abi:n,address:r,args:i,eventName:s,strict:y,fromBlock:a})}catch{}E=!0;return}try{let _;if(w)_=await Ee(e,x0,"getFilterChanges")({filter:w});else{const S=await Ee(e,ld,"getBlockNumber")({});v&&v{w&&await Ee(e,E0,"uninstallFilter")({filter:w}),C()}})})():(()=>{const y=f??!1,g=hn(["watchContractEvent",r,i,o,e.uid,s,c,y]);let b=!0,v=()=>b=!1;return ds(g,{onLogs:u,onError:l},w=>((async()=>{try{const E=(()=>{if(e.transport.type==="fallback"){const _=e.transport.transports.find(S=>S.config.type==="webSocket");return _?_.value:e.transport}return e.transport})(),C=s?rd({abi:n,eventName:s,args:i}):[],{unsubscribe:k}=await E.subscribe({params:["logs",{address:r,topics:C}],onData(_){var A;if(!b)return;const S=_.result;try{const{eventName:I,args:L}=Jb({abi:n,data:S.data,topics:S.topics,strict:f}),F=fs(S,{args:L,eventName:I});w.onLogs([F])}catch(I){let L,F;if(I instanceof df||I instanceof l0){if(f)return;L=I.abiItem.name,F=(A=I.abiItem.inputs)==null?void 0:A.some(R=>!("name"in R&&R.name))}const N=fs(S,{args:F?[]:{},eventName:L});w.onLogs([N])}},onError(_){var S;(S=w.onError)==null||S.call(w,_)}});v=k,b||v()}catch(E){l==null||l(E)}})(),()=>v()))})()}class cd extends J{constructor({docsPath:t}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(` +`),{name:"ChainNotFoundError"})}}class eE extends J{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}class v0 extends J{constructor({chainId:t}){super(typeof t=="number"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}const Bm="/docs/contract/encodeDeployData";function w0(e){const{abi:t,args:n,bytecode:r}=e;if(!n||n.length===0)return r;const i=t.find(s=>"type"in s&&s.type==="constructor");if(!i)throw new MP({docsPath:Bm});if(!("inputs"in i))throw new Y2({docsPath:Bm});if(!i.inputs||i.inputs.length===0)throw new Y2({docsPath:Bm});const o=uc(i.inputs,n);return so([r,o])}function hc({blockNumber:e,chain:t,contract:n}){var i;const r=(i=t==null?void 0:t.contracts)==null?void 0:i[n];if(!r)throw new F1({chain:t,contract:{name:n}});if(e&&r.blockCreated&&r.blockCreated>e)throw new F1({blockNumber:e,chain:t,contract:{name:n,blockCreated:r.blockCreated}});return r.address}function pL(e,{docsPath:t,...n}){const r=(()=>{const i=zb(e,n);return i instanceof p0?e:i})();return new A8(r,{docsPath:t,...n})}const Nm=new Map;function tE({fn:e,id:t,shouldSplitBatch:n,wait:r=0,sort:i}){const o=async()=>{const d=l();s();const c=d.map(({args:f})=>f);c.length!==0&&e(c).then(f=>{var m;i&&Array.isArray(f)&&f.sort(i);for(let p=0;p{var m;for(let p=0;pNm.delete(t),a=()=>l().map(({args:d})=>d),l=()=>Nm.get(t)||[],u=d=>Nm.set(t,[...l(),d]);return{flush:s,async schedule(d){const c={},f=new Promise((h,y)=>{c.resolve=h,c.reject=y});return(n==null?void 0:n([...a(),d]))&&o(),l().length>0?(u({args:d,pendingPromise:c}),f):(u({args:d,pendingPromise:c}),setTimeout(o,r),f)}}}async function _0(e,t){var I,L,F,N;const{account:n=e.account,batch:r=!!((I=e.batch)!=null&&I.multicall),blockNumber:i,blockTag:o="latest",accessList:s,blobs:a,code:l,data:u,factory:d,factoryData:c,gas:f,gasPrice:m,maxFeePerBlobGas:p,maxFeePerGas:h,maxPriorityFeePerGas:y,nonce:g,to:b,value:v,stateOverride:w,...E}=t,C=n?cr(n):void 0;if(l&&(d||c))throw new J("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(l&&b)throw new J("Cannot provide both `code` & `to` as parameters.");const k=l&&u,_=d&&c&&b&&u,S=k||_,A=k?yL({code:l,data:u}):_?bL({data:u,factory:d,factoryData:c,to:b}):u;try{od(t);const B=(i?Ae(i):void 0)||o,V=B8(w),j=(N=(F=(L=e.chain)==null?void 0:L.formatters)==null?void 0:F.transactionRequest)==null?void 0:N.format,Y=(j||m0)({...Wb(E,{format:j}),from:C==null?void 0:C.address,accessList:s,blobs:a,data:A,gas:f,gasPrice:m,maxFeePerBlobGas:p,maxFeePerGas:h,maxPriorityFeePerGas:y,nonce:g,to:S?void 0:b,value:v});if(r&&mL({request:Y})&&!V)try{return await gL(e,{...Y,blockNumber:i,blockTag:o})}catch(ae){if(!(ae instanceof eE)&&!(ae instanceof F1))throw ae}const te=await e.request({method:"eth_call",params:V?[Y,B,V]:[Y,B]});return te==="0x"?{data:void 0}:{data:te}}catch(R){const B=vL(R),{offchainLookup:V,offchainLookupSignature:j}=await ue(async()=>{const{offchainLookup:W,offchainLookupSignature:Y}=await import("./ccip-BypqJ45N.js");return{offchainLookup:W,offchainLookupSignature:Y}},[]);if(e.ccipRead!==!1&&(B==null?void 0:B.slice(0,10))===j&&b)return{data:await V(e,{data:B,to:b})};throw S&&(B==null?void 0:B.slice(0,10))==="0x101bb98d"?new TR({factory:d}):pL(R,{...t,account:C,chain:e.chain})}}function mL({request:e}){const{data:t,to:n,...r}=e;return!(!t||t.startsWith(lL)||!n||Object.values(r).filter(i=>typeof i<"u").length>0)}async function gL(e,t){var h;const{batchSize:n=1024,wait:r=0}=typeof((h=e.batch)==null?void 0:h.multicall)=="object"?e.batch.multicall:{},{blockNumber:i,blockTag:o="latest",data:s,multicallAddress:a,to:l}=t;let u=a;if(!u){if(!e.chain)throw new eE;u=hc({blockNumber:i,chain:e.chain,contract:"multicall3"})}const c=(i?Ae(i):void 0)||o,{schedule:f}=tE({id:`${e.uid}.${c}`,wait:r,shouldSplitBatch(y){return y.reduce((b,{data:v})=>b+(v.length-2),0)>n*2},fn:async y=>{const g=y.map(w=>({allowFailure:!0,callData:w.data,target:w.to})),b=ws({abi:D1,args:[g],functionName:"aggregate3"}),v=await e.request({method:"eth_call",params:[{data:b,to:u},c]});return dc({abi:D1,args:[g],functionName:"aggregate3",data:v||"0x"})}}),[{returnData:m,success:p}]=await f({data:s,to:l});if(!p)throw new Hb({data:m});return m==="0x"?{data:void 0}:{data:m}}function yL(e){const{code:t,data:n}=e;return w0({abi:Zx(["constructor(bytes, bytes)"]),bytecode:cL,args:[t,n]})}function bL(e){const{data:t,factory:n,factoryData:r,to:i}=e;return w0({abi:Zx(["constructor(address, bytes, address, bytes)"]),bytecode:uL,args:[i,t,n,r]})}function vL(e){var n;if(!(e instanceof J))return;const t=e.walk();return typeof(t==null?void 0:t.data)=="object"?(n=t.data)==null?void 0:n.data:t.data}async function bi(e,t){const{abi:n,address:r,args:i,functionName:o,...s}=t,a=ws({abi:n,args:i,functionName:o});try{const{data:l}=await Ee(e,_0,"call")({...s,data:a,to:r});return dc({abi:n,args:i,functionName:o,data:l||"0x"})}catch(l){throw zl(l,{abi:n,address:r,args:i,docsPath:"/docs/contract/readContract",functionName:o})}}async function nE(e,t){const{abi:n,address:r,args:i,dataSuffix:o,functionName:s,...a}=t,l=a.account?cr(a.account):e.account,u=ws({abi:n,args:i,functionName:s});try{const{data:d}=await Ee(e,_0,"call")({batch:!1,data:`${u}${o?o.replace("0x",""):""}`,to:r,...a,account:l}),c=dc({abi:n,args:i,functionName:s,data:d||"0x"}),f=n.filter(m=>"name"in m&&m.name===t.functionName);return{result:c,request:{abi:f,address:r,args:i,dataSuffix:o,functionName:s,...a,account:l}}}catch(d){throw zl(d,{abi:n,address:r,args:i,docsPath:"/docs/contract/simulateContract",functionName:s,sender:l==null?void 0:l.address})}}const Mm=new Map,x6=new Map;let wL=0;function ds(e,t,n){const r=++wL,i=()=>Mm.get(e)||[],o=()=>{const d=i();Mm.set(e,d.filter(c=>c.id!==r))},s=()=>{const d=x6.get(e);i().length===1&&d&&d(),o()},a=i();if(Mm.set(e,[...a,{id:r,fns:t}]),a&&a.length>0)return s;const l={};for(const d in t)l[d]=(...c)=>{var m,p;const f=i();if(f.length!==0)for(const h of f)(p=(m=h.fns)[d])==null||p.call(m,...c)};const u=n(l);return typeof u=="function"&&x6.set(e,u),s}async function U1(e){return new Promise(t=>setTimeout(t,e))}function ad(e,{emitOnBegin:t,initialWaitTime:n,interval:r}){let i=!0;const o=()=>i=!1;return(async()=>{let a;t&&(a=await e({unpoll:o}));const l=await(n==null?void 0:n(a))??r;await U1(l);const u=async()=>{i&&(await e({unpoll:o}),await U1(r),u())};u()})(),o}const _L=new Map,xL=new Map;function EL(e){const t=(i,o)=>({clear:()=>o.delete(i),get:()=>o.get(i),set:s=>o.set(i,s)}),n=t(e,_L),r=t(e,xL);return{clear:()=>{n.clear(),r.clear()},promise:n,response:r}}async function SL(e,{cacheKey:t,cacheTime:n=Number.POSITIVE_INFINITY}){const r=EL(t),i=r.response.get();if(i&&n>0&&new Date().getTime()-i.created.getTime()`blockNumber.${e}`;async function ld(e,{cacheTime:t=e.cacheTime}={}){const n=await SL(()=>e.request({method:"eth_blockNumber"}),{cacheKey:kL(e.uid),cacheTime:t});return BigInt(n)}async function x0(e,{filter:t}){const n="strict"in t&&t.strict,r=await t.request({method:"eth_getFilterChanges",params:[t.id]});if(typeof r[0]=="string")return r;const i=r.map(o=>fs(o));return!("abi"in t)||!t.abi?i:ev({abi:t.abi,logs:i,strict:n})}async function E0(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}function rE(e,t){const{abi:n,address:r,args:i,batch:o=!0,eventName:s,fromBlock:a,onError:l,onLogs:u,poll:d,pollingInterval:c=e.pollingInterval,strict:f}=t;return(typeof d<"u"?d:typeof a=="bigint"?!0:!(e.transport.type==="webSocket"||e.transport.type==="fallback"&&e.transport.transports[0].config.type==="webSocket"))?(()=>{const y=f??!1,g=hn(["watchContractEvent",r,i,o,e.uid,s,c,y,a]);return ds(g,{onLogs:u,onError:l},b=>{let v;a!==void 0&&(v=a-1n);let w,E=!1;const C=ad(async()=>{var k;if(!E){try{w=await Ee(e,jb,"createContractEventFilter")({abi:n,address:r,args:i,eventName:s,strict:y,fromBlock:a})}catch{}E=!0;return}try{let _;if(w)_=await Ee(e,x0,"getFilterChanges")({filter:w});else{const S=await Ee(e,ld,"getBlockNumber")({});v&&v{w&&await Ee(e,E0,"uninstallFilter")({filter:w}),C()}})})():(()=>{const y=f??!1,g=hn(["watchContractEvent",r,i,o,e.uid,s,c,y]);let b=!0,v=()=>b=!1;return ds(g,{onLogs:u,onError:l},w=>((async()=>{try{const E=(()=>{if(e.transport.type==="fallback"){const _=e.transport.transports.find(S=>S.config.type==="webSocket");return _?_.value:e.transport}return e.transport})(),C=s?rd({abi:n,eventName:s,args:i}):[],{unsubscribe:k}=await E.subscribe({params:["logs",{address:r,topics:C}],onData(_){var A;if(!b)return;const S=_.result;try{const{eventName:I,args:L}=Jb({abi:n,data:S.data,topics:S.topics,strict:f}),F=fs(S,{args:L,eventName:I});w.onLogs([F])}catch(I){let L,F;if(I instanceof df||I instanceof l0){if(f)return;L=I.abiItem.name,F=(A=I.abiItem.inputs)==null?void 0:A.some(R=>!("name"in R&&R.name))}const N=fs(S,{args:F?[]:{},eventName:L});w.onLogs([N])}},onError(_){var S;(S=w.onError)==null||S.call(w,_)}});v=k,b||v()}catch(E){l==null||l(E)}})(),()=>v()))})()}class cd extends J{constructor({docsPath:t}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(` `),{docsPath:t,docsSlug:"account",name:"AccountNotFoundError"})}}class jm extends J{constructor({docsPath:t,metaMessages:n,type:r}){super(`Account type "${r}" is not supported.`,{docsPath:t,metaMessages:n,name:"AccountTypeNotSupportedError"})}}function iE({chain:e,currentChainId:t}){if(!e)throw new hL;if(t!==e.id)throw new dL({chain:e,currentChainId:t})}function CL(e,{docsPath:t,...n}){const r=(()=>{const i=zb(e,n);return i instanceof p0?e:i})();return new SR(r,{docsPath:t,...n})}async function rv(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}async function iv(e,t){var g,b,v,w;const{account:n=e.account,chain:r=e.chain,accessList:i,authorizationList:o,blobs:s,data:a,gas:l,gasPrice:u,maxFeePerBlobGas:d,maxFeePerGas:c,maxPriorityFeePerGas:f,nonce:m,value:p,...h}=t;if(!n)throw new cd({docsPath:"/docs/actions/wallet/sendTransaction"});const y=cr(n);try{od(t);const E=await(async()=>{if(t.to)return t.to;if(o&&o.length>0)return await L8({authorization:o[0]}).catch(()=>{throw new J("`to` is required. Could not infer from `authorizationList`.")})})();if(y.type==="json-rpc"){let C;r!==null&&(C=await Ee(e,sd,"getChainId")({}),iE({currentChainId:C,chain:r}));const k=(v=(b=(g=e.chain)==null?void 0:g.formatters)==null?void 0:b.transactionRequest)==null?void 0:v.format,S=(k||m0)({...Wb(h,{format:k}),accessList:i,authorizationList:o,blobs:s,chainId:C,data:a,from:y.address,gas:l,gasPrice:u,maxFeePerBlobGas:d,maxFeePerGas:c,maxPriorityFeePerGas:f,nonce:m,to:E,value:p});return await e.request({method:"eth_sendTransaction",params:[S]},{retryCount:0})}if(y.type==="local"){const C=await Ee(e,b0,"prepareTransactionRequest")({account:y,accessList:i,authorizationList:o,blobs:s,chain:r,data:a,gas:l,gasPrice:u,maxFeePerBlobGas:d,maxFeePerGas:c,maxPriorityFeePerGas:f,nonce:m,nonceManager:y.nonceManager,parameters:[...Z8,"sidecars"],value:p,...h,to:E}),k=(w=r==null?void 0:r.serializers)==null?void 0:w.transaction,_=await y.signTransaction(C,{serializer:k});return await Ee(e,rv,"sendRawTransaction")({serializedTransaction:_})}throw y.type==="smart"?new jm({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new jm({docsPath:"/docs/actions/wallet/sendTransaction",type:y.type})}catch(E){throw E instanceof jm?E:CL(E,{...t,account:y,chain:t.chain||void 0})}}async function oE(e,t){const{abi:n,account:r=e.account,address:i,args:o,dataSuffix:s,functionName:a,...l}=t;if(!r)throw new cd({docsPath:"/docs/contract/writeContract"});const u=cr(r),d=ws({abi:n,args:o,functionName:a});try{return await Ee(e,iv,"sendTransaction")({data:`${d}${s?s.replace("0x",""):""}`,to:i,account:u,...l})}catch(c){throw zl(c,{abi:n,address:i,args:o,docsPath:"/docs/contract/writeContract",functionName:a,sender:u.address})}}function AL({abi:e,address:t,client:n}){const r=n,[i,o]=r?"public"in r&&"wallet"in r?[r.public,r.wallet]:"public"in r?[r.public,void 0]:"wallet"in r?[void 0,r.wallet]:[r,r]:[void 0,void 0],s=i!=null,a=o!=null,l={};let u=!1,d=!1,c=!1;for(const f of e)if(f.type==="function"?f.stateMutability==="view"||f.stateMutability==="pure"?u=!0:d=!0:f.type==="event"&&(c=!0),u&&d&&c)break;return s&&(u&&(l.read=new Proxy({},{get(f,m){return(...p)=>{const{args:h,options:y}=Vd(p);return Ee(i,bi,"readContract")({abi:e,address:t,functionName:m,args:h,...y})}}})),d&&(l.simulate=new Proxy({},{get(f,m){return(...p)=>{const{args:h,options:y}=Vd(p);return Ee(i,nE,"simulateContract")({abi:e,address:t,functionName:m,args:h,...y})}}})),c&&(l.createEventFilter=new Proxy({},{get(f,m){return(...p)=>{const h=e.find(b=>b.type==="event"&&b.name===m),{args:y,options:g}=Dm(p,h);return Ee(i,jb,"createContractEventFilter")({abi:e,address:t,eventName:m,args:y,...g})}}}),l.getEvents=new Proxy({},{get(f,m){return(...p)=>{const h=e.find(b=>b.type==="event"&&b.name===m),{args:y,options:g}=Dm(p,h);return Ee(i,nv,"getContractEvents")({abi:e,address:t,eventName:m,args:y,...g})}}}),l.watchEvent=new Proxy({},{get(f,m){return(...p)=>{const h=e.find(b=>b.type==="event"&&b.name===m),{args:y,options:g}=Dm(p,h);return Ee(i,rE,"watchContractEvent")({abi:e,address:t,eventName:m,args:y,...g})}}}))),a&&d&&(l.write=new Proxy({},{get(f,m){return(...p)=>{const{args:h,options:y}=Vd(p);return Ee(o,oE,"writeContract")({abi:e,address:t,functionName:m,args:h,...y})}}})),(s||a)&&d&&(l.estimateGas=new Proxy({},{get(f,m){return(...p)=>{const{args:h,options:y}=Vd(p);return Ee(i??o,Y8,"estimateContractGas")({abi:e,address:t,functionName:m,args:h,...y,account:y.account??o.account})}}})),l.address=t,l.abi=e,l}function Vd(e){const t=e.length&&Array.isArray(e[0]),n=t?e[0]:[],r=(t?e[1]:e[0])??{};return{args:n,options:r}}function Dm(e,t){let n=!1;Array.isArray(e[0])?n=!0:e.length===1?n=t.inputs.some(o=>o.indexed):e.length===2&&(n=!0);const r=n?e[0]:void 0,i=(n?e[1]:e[0])??{};return{args:r,options:i}}class TL extends J{constructor({address:t}){super(`No EIP-712 domain found on contract "${t}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${t}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"})}}async function IL(e,t){const{address:n,factory:r,factoryData:i}=t;try{const[o,s,a,l,u,d,c]=await Ee(e,bi,"readContract")({abi:$L,address:n,functionName:"eip712Domain",factory:r,factoryData:i});return{domain:{name:s,version:a,chainId:Number(l),verifyingContract:u,salt:d},extensions:c,fields:o}}catch(o){const s=o;throw s.name==="ContractFunctionExecutionError"&&s.cause.name==="ContractFunctionZeroDataError"?new TL({address:n}):s}}const $L=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];async function PL(e,{chain:t}){const{id:n,name:r,nativeCurrency:i,rpcUrls:o,blockExplorers:s}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:Ae(n),chainName:r,nativeCurrency:i,rpcUrls:o.default.http,blockExplorerUrls:s?Object.values(s).map(({url:a})=>a):void 0}]},{dedupe:!0,retryCount:0})}const H1=256;let qd=H1,Gd;function sE(e=11){if(!Gd||qd+e>H1*2){Gd="",qd=0;for(let t=0;t{const b=g(y);for(const w in p)delete b[w];const v={...y,...b};return Object.assign(v,{extend:h(v)})}}return Object.assign(p,{extend:h(p)})}const Kd=new Rb(8192);function OL(e,{enabled:t=!0,id:n}){if(!t||!n)return e();if(Kd.get(n))return Kd.get(n);const r=e().finally(()=>Kd.delete(n));return Kd.set(n,r),r}function z1(e,{delay:t=100,retryCount:n=2,shouldRetry:r=()=>!0}={}){return new Promise((i,o)=>{const s=async({count:a=0}={})=>{const l=async({error:u})=>{const d=typeof t=="function"?t({count:a,error:u}):t;d&&await U1(d),s({count:a+1})};try{const u=await e();i(u)}catch(u){if(a{const{dedupe:i=!1,retryDelay:o=150,retryCount:s=3,uid:a}={...t,...r},l=i?zt(Fl(`${a}.${hn(n)}`)):void 0;return OL(()=>z1(async()=>{try{return await e(n)}catch(u){const d=u;switch(d.code){case mf.code:throw new mf(d);case gf.code:throw new gf(d);case yf.code:throw new yf(d,{method:n.method});case bf.code:throw new bf(d);case ba.code:throw new ba(d);case va.code:throw new va(d);case vf.code:throw new vf(d);case wf.code:throw new wf(d);case _f.code:throw new _f(d);case xf.code:throw new xf(d,{method:n.method});case Hl.code:throw new Hl(d);case Ef.code:throw new Ef(d);case El.code:throw new El(d);case Sf.code:throw new Sf(d);case kf.code:throw new kf(d);case Cf.code:throw new Cf(d);case Af.code:throw new Af(d);case Tf.code:throw new Tf(d);case 5e3:throw new El(d);default:throw u instanceof J?u:new $R(d)}}},{delay:({count:u,error:d})=>{var c;if(d&&d instanceof Bu){const f=(c=d==null?void 0:d.headers)==null?void 0:c.get("Retry-After");if(f!=null&&f.match(/\d/))return Number.parseInt(f)*1e3}return~~(1<LL(u)}),{enabled:i,id:l})}}function LL(e){return"code"in e&&typeof e.code=="number"?e.code===-1||e.code===Hl.code||e.code===ba.code:e instanceof Bu&&e.status?e.status===403||e.status===408||e.status===413||e.status===429||e.status===500||e.status===502||e.status===503||e.status===504:!0}function lE({key:e,name:t,request:n,retryCount:r=3,retryDelay:i=150,timeout:o,type:s},a){const l=sE();return{config:{key:e,name:t,request:n,retryCount:r,retryDelay:i,timeout:o,type:s},request:RL(n,{retryCount:r,retryDelay:i,uid:l}),value:a}}function BL(e,t={}){const{key:n="custom",name:r="Custom Provider",retryDelay:i}=t;return({retryCount:o})=>lE({key:n,name:r,request:e.request.bind(e),retryCount:t.retryCount??o,retryDelay:i,type:"custom"})}class NL extends J{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}function ML(e,{errorInstance:t=new Error("timed out"),timeout:n,signal:r}){return new Promise((i,o)=>{(async()=>{let s;try{const a=new AbortController;n>0&&(s=setTimeout(()=>{r?a.abort():o(t)},n)),i(await e({signal:(a==null?void 0:a.signal)||null}))}catch(a){(a==null?void 0:a.name)==="AbortError"&&o(t),o(a)}finally{clearTimeout(s)}})()})}function jL(){return{current:0,take(){return this.current++},reset(){this.current=0}}}const E6=jL();function DL(e,t={}){return{async request(n){var c;const{body:r,onRequest:i=t.onRequest,onResponse:o=t.onResponse,timeout:s=t.timeout??1e4}=n,a={...t.fetchOptions??{},...n.fetchOptions??{}},{headers:l,method:u,signal:d}=a;try{const f=await ML(async({signal:p})=>{const h={...a,body:Array.isArray(r)?hn(r.map(b=>({jsonrpc:"2.0",id:b.id??E6.take(),...b}))):hn({jsonrpc:"2.0",id:r.id??E6.take(),...r}),headers:{"Content-Type":"application/json",...l},method:u||"POST",signal:d||(s>0?p:null)},y=new Request(e,h);return i&&await i(y),await fetch(e,h)},{errorInstance:new h6({body:r,url:e}),timeout:s,signal:!0});o&&await o(f);let m;if((c=f.headers.get("Content-Type"))!=null&&c.startsWith("application/json")?m=await f.json():(m=await f.text(),m=JSON.parse(m||"{}")),!f.ok)throw new Bu({body:r,details:hn(m.error)||f.statusText,headers:f.headers,status:f.status,url:e});return m}catch(f){throw f instanceof Bu||f instanceof h6?f:new Bu({body:r,cause:f,url:e})}}}}function cE(e,t={}){const{batch:n,fetchOptions:r,key:i="http",name:o="HTTP JSON-RPC",onFetchRequest:s,onFetchResponse:a,retryDelay:l}=t;return({chain:u,retryCount:d,timeout:c})=>{const{batchSize:f=1e3,wait:m=0}=typeof n=="object"?n:{},p=t.retryCount??d,h=c??t.timeout??1e4,y=u==null?void 0:u.rpcUrls.default.http[0];if(!y)throw new NL;const g=DL(y,{fetchOptions:r,onRequest:s,onResponse:a,timeout:h});return lE({key:i,name:o,async request({method:b,params:v}){const w={method:b,params:v},{schedule:E}=tE({id:y,wait:m,shouldSplitBatch(S){return S.length>f},fn:S=>g.request({body:S}),sort:(S,A)=>S.id-A.id}),C=async S=>n?E(S):[await g.request({body:S})],[{error:k,result:_}]=await C(w);if(k)throw new T8({body:w,error:k,url:y});return _},retryCount:p,retryDelay:l,timeout:h,type:"http"},{fetchOptions:r,url:y})}}function ov(e,t){var r,i,o,s,a,l;if(!(e instanceof J))return!1;const n=e.walk(u=>u instanceof I1);return n instanceof I1?!!(((r=n.data)==null?void 0:r.errorName)==="ResolverNotFound"||((i=n.data)==null?void 0:i.errorName)==="ResolverWildcardNotSupported"||((o=n.data)==null?void 0:o.errorName)==="ResolverNotContract"||((s=n.data)==null?void 0:s.errorName)==="ResolverError"||((a=n.data)==null?void 0:a.errorName)==="HttpError"||(l=n.reason)!=null&&l.includes("Wildcard on non-extended resolvers is not supported")||t==="reverse"&&n.reason===_8[50]):!1}function uE(e){if(e.length!==66||e.indexOf("[")!==0||e.indexOf("]")!==65)return null;const t=`0x${e.slice(1,65)}`;return Er(t)?t:null}function wh(e){let t=new Uint8Array(32).fill(0);if(!e)return Mt(t);const n=e.split(".");for(let r=n.length-1;r>=0;r-=1){const i=uE(n[r]),o=i?cs(i):zt(aa(n[r]),"bytes");t=zt(ro([t,o]),"bytes")}return Mt(t)}function FL(e){return`[${e.slice(2)}]`}function UL(e){const t=new Uint8Array(32).fill(0);return e?uE(e)||zt(aa(e)):Mt(t)}function S0(e){const t=e.replace(/^\.|\.$/gm,"");if(t.length===0)return new Uint8Array(1);const n=new Uint8Array(aa(t).byteLength+2);let r=0;const i=t.split(".");for(let o=0;o255&&(s=aa(FL(UL(i[o])))),n[r]=s.length,n.set(s,r+1),r+=s.length+1}return n.byteLength!==r+1?n.slice(0,r+1):n}async function HL(e,{blockNumber:t,blockTag:n,coinType:r,name:i,gatewayUrls:o,strict:s,universalResolverAddress:a}){let l=a;if(!l){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");l=hc({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{const u=ws({abi:_6,functionName:"addr",...r!=null?{args:[wh(i),BigInt(r)]}:{args:[wh(i)]}}),d={address:l,abi:J8,functionName:"resolve",args:[Te(S0(i)),u],blockNumber:t,blockTag:n},c=Ee(e,bi,"readContract"),f=o?await c({...d,args:[...d.args,o]}):await c(d);if(f[0]==="0x")return null;const m=dc({abi:_6,args:r!=null?[wh(i),BigInt(r)]:void 0,functionName:"addr",data:f[0]});return m==="0x"||as(m)==="0x00"?null:m}catch(u){if(s)throw u;if(ov(u,"resolve"))return null;throw u}}class zL extends J{constructor({data:t}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(t)}`],name:"EnsAvatarInvalidMetadataError"})}}class lu extends J{constructor({reason:t}){super(`ENS NFT avatar URI is invalid. ${t}`,{name:"EnsAvatarInvalidNftUriError"})}}class sv extends J{constructor({uri:t}){super(`Unable to resolve ENS avatar URI "${t}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"})}}class WL extends J{constructor({namespace:t}){super(`ENS NFT avatar namespace "${t}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}const VL=/(?https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?\/)?(?ipfs\/|ipns\/)?(?[\w\-.]+)(?\/.*)?/,qL=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?[\w\-.]+))?(?\/.*)?$/,GL=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,KL=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function ZL(e){try{const t=await fetch(e,{method:"HEAD"});if(t.status===200){const n=t.headers.get("content-type");return n==null?void 0:n.startsWith("image/")}return!1}catch(t){return typeof t=="object"&&typeof t.response<"u"||!globalThis.hasOwnProperty("Image")?!1:new Promise(n=>{const r=new Image;r.onload=()=>{n(!0)},r.onerror=()=>{n(!1)},r.src=e})}}function S6(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function fE({uri:e,gatewayUrls:t}){const n=GL.test(e);if(n)return{uri:e,isOnChain:!0,isEncoded:n};const r=S6(t==null?void 0:t.ipfs,"https://ipfs.io"),i=S6(t==null?void 0:t.arweave,"https://arweave.net"),o=e.match(VL),{protocol:s,subpath:a,target:l,subtarget:u=""}=(o==null?void 0:o.groups)||{},d=s==="ipns:/"||a==="ipns/",c=s==="ipfs:/"||a==="ipfs/"||qL.test(e);if(e.startsWith("http")&&!d&&!c){let m=e;return t!=null&&t.arweave&&(m=e.replace(/https:\/\/arweave.net/g,t==null?void 0:t.arweave)),{uri:m,isOnChain:!1,isEncoded:!1}}if((d||c)&&l)return{uri:`${r}/${d?"ipns":"ipfs"}/${l}${u}`,isOnChain:!1,isEncoded:!1};if(s==="ar:/"&&l)return{uri:`${i}/${l}${u||""}`,isOnChain:!1,isEncoded:!1};let f=e.replace(KL,"");if(f.startsWith("i.json());return await av({gatewayUrls:e,uri:dE(n)})}catch{throw new sv({uri:t})}}async function av({gatewayUrls:e,uri:t}){const{uri:n,isOnChain:r}=fE({uri:t,gatewayUrls:e});if(r||await ZL(n))return n;throw new sv({uri:t})}function YL(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));const[n,r,i]=t.split("/"),[o,s]=n.split(":"),[a,l]=r.split(":");if(!o||o.toLowerCase()!=="eip155")throw new lu({reason:"Only EIP-155 supported"});if(!s)throw new lu({reason:"Chain ID not found"});if(!l)throw new lu({reason:"Contract address not found"});if(!i)throw new lu({reason:"Token ID not found"});if(!a)throw new lu({reason:"ERC namespace not found"});return{chainID:Number.parseInt(s),namespace:a.toLowerCase(),contractAddress:l,tokenID:i}}async function QL(e,{nft:t}){if(t.namespace==="erc721")return bi(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if(t.namespace==="erc1155")return bi(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new WL({namespace:t.namespace})}async function JL(e,{gatewayUrls:t,record:n}){return/eip155:/i.test(n)?eB(e,{gatewayUrls:t,record:n}):av({uri:n,gatewayUrls:t})}async function eB(e,{gatewayUrls:t,record:n}){const r=YL(n),i=await QL(e,{nft:r}),{uri:o,isOnChain:s,isEncoded:a}=fE({uri:i,gatewayUrls:t});if(s&&(o.includes("data:application/json;base64,")||o.startsWith("{"))){const u=a?atob(o.replace("data:application/json;base64,","")):o,d=JSON.parse(u);return av({uri:dE(d),gatewayUrls:t})}let l=r.tokenID;return r.namespace==="erc1155"&&(l=l.replace("0x","").padStart(64,"0")),XL({gatewayUrls:t,uri:o.replace(/(?:0x)?{id}/,l)})}async function hE(e,{blockNumber:t,blockTag:n,name:r,key:i,gatewayUrls:o,strict:s,universalResolverAddress:a}){let l=a;if(!l){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");l=hc({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{const u={address:l,abi:J8,functionName:"resolve",args:[Te(S0(r)),ws({abi:w6,functionName:"text",args:[wh(r),i]})],blockNumber:t,blockTag:n},d=Ee(e,bi,"readContract"),c=o?await d({...u,args:[...u.args,o]}):await d(u);if(c[0]==="0x")return null;const f=dc({abi:w6,functionName:"text",data:c[0]});return f===""?null:f}catch(u){if(s)throw u;if(ov(u,"resolve"))return null;throw u}}async function tB(e,{blockNumber:t,blockTag:n,assetGatewayUrls:r,name:i,gatewayUrls:o,strict:s,universalResolverAddress:a}){const l=await Ee(e,hE,"getEnsText")({blockNumber:t,blockTag:n,key:"avatar",name:i,universalResolverAddress:a,gatewayUrls:o,strict:s});if(!l)return null;try{return await JL(e,{record:l,gatewayUrls:r})}catch{return null}}async function nB(e,{address:t,blockNumber:n,blockTag:r,gatewayUrls:i,strict:o,universalResolverAddress:s}){let a=s;if(!a){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");a=hc({blockNumber:n,chain:e.chain,contract:"ensUniversalResolver"})}const l=`${t.toLowerCase().substring(2)}.addr.reverse`;try{const u={address:a,abi:sL,functionName:"reverse",args:[Te(S0(l))],blockNumber:n,blockTag:r},d=Ee(e,bi,"readContract"),[c,f]=i?await d({...u,args:[...u.args,i]}):await d(u);return t.toLowerCase()!==f.toLowerCase()?null:c}catch(u){if(o)throw u;if(ov(u,"reverse"))return null;throw u}}async function rB(e,{blockNumber:t,blockTag:n,name:r,universalResolverAddress:i}){let o=i;if(!o){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");o=hc({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}const[s]=await Ee(e,bi,"readContract")({address:o,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[Te(S0(r))],blockNumber:t,blockTag:n});return s}async function iB(e){const t=d0(e,{method:"eth_newBlockFilter"}),n=await e.request({method:"eth_newBlockFilter"});return{id:n,request:t(n),type:"block"}}async function pE(e,{address:t,args:n,event:r,events:i,fromBlock:o,strict:s,toBlock:a}={}){const l=i??(r?[r]:void 0),u=d0(e,{method:"eth_newFilter"});let d=[];l&&(d=[l.flatMap(m=>rd({abi:[m],eventName:m.name,args:n}))],r&&(d=d[0]));const c=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:typeof o=="bigint"?Ae(o):o,toBlock:typeof a=="bigint"?Ae(a):a,...d.length?{topics:d}:{}}]});return{abi:l,args:n,eventName:r?r.name:void 0,fromBlock:o,id:c,request:u(c),strict:!!s,toBlock:a,type:"event"}}async function mE(e){const t=d0(e,{method:"eth_newPendingTransactionFilter"}),n=await e.request({method:"eth_newPendingTransactionFilter"});return{id:n,request:t(n),type:"transaction"}}async function oB(e){const t=await e.request({method:"eth_blobBaseFee"});return BigInt(t)}async function sB(e,{blockHash:t,blockNumber:n,blockTag:r="latest"}={}){const i=n!==void 0?Ae(n):void 0;let o;return t?o=await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]},{dedupe:!0}):o=await e.request({method:"eth_getBlockTransactionCountByNumber",params:[i||r]},{dedupe:!!i}),yi(o)}async function k6(e,{address:t,blockNumber:n,blockTag:r="latest"}){const i=n!==void 0?Ae(n):void 0,o=await e.request({method:"eth_getCode",params:[t,i||r]},{dedupe:!!i});if(o!=="0x")return o}function aB(e){var t;return{baseFeePerGas:e.baseFeePerGas.map(n=>BigInt(n)),gasUsedRatio:e.gasUsedRatio,oldestBlock:BigInt(e.oldestBlock),reward:(t=e.reward)==null?void 0:t.map(n=>n.map(r=>BigInt(r)))}}async function lB(e,{blockCount:t,blockNumber:n,blockTag:r="latest",rewardPercentiles:i}){const o=n?Ae(n):void 0,s=await e.request({method:"eth_feeHistory",params:[Ae(t),o||r,i]},{dedupe:!!o});return aB(s)}async function cB(e,{filter:t}){const n=t.strict??!1,i=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(o=>fs(o));return t.abi?ev({abi:t.abi,logs:i,strict:n}):i}function lv(e){return{formatters:void 0,fees:void 0,serializers:void 0,...e}}const uB=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,fB=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function gE(e){const{domain:t={},message:n,primaryType:r}=e,i={EIP712Domain:xE({domain:t}),...e.types};_E({domain:t,message:n,primaryType:r,types:i});const o=["0x1901"];return t&&o.push(dB({domain:t,types:i})),r!=="EIP712Domain"&&o.push(yE({data:n,primaryType:r,types:i})),zt(ro(o))}function dB({domain:e,types:t}){return yE({data:e,primaryType:"EIP712Domain",types:t})}function yE({data:e,primaryType:t,types:n}){const r=bE({data:e,primaryType:t,types:n});return zt(r)}function bE({data:e,primaryType:t,types:n}){const r=[{type:"bytes32"}],i=[hB({primaryType:t,types:n})];for(const o of n[t]){const[s,a]=wE({types:n,name:o.name,type:o.type,value:e[o.name]});r.push(s),i.push(a)}return uc(r,i)}function hB({primaryType:e,types:t}){const n=Te(pB({primaryType:e,types:t}));return zt(n)}function pB({primaryType:e,types:t}){let n="";const r=vE({primaryType:e,types:t});r.delete(e);const i=[e,...Array.from(r).sort()];for(const o of i)n+=`${o}(${t[o].map(({name:s,type:a})=>`${a} ${s}`).join(",")})`;return n}function vE({primaryType:e,types:t},n=new Set){const r=e.match(/^\w*/u),i=r==null?void 0:r[0];if(n.has(i)||t[i]===void 0)return n;n.add(i);for(const o of t[i])vE({primaryType:o.type,types:t},n);return n}function wE({types:e,name:t,type:n,value:r}){if(e[n]!==void 0)return[{type:"bytes32"},zt(bE({data:r,primaryType:n,types:e}))];if(n==="bytes")return r=`0x${(r.length%2?"0":"")+r.slice(2)}`,[{type:"bytes32"},zt(r)];if(n==="string")return[{type:"bytes32"},zt(Te(r))];if(n.lastIndexOf("]")===n.length-1){const i=n.slice(0,n.lastIndexOf("[")),o=r.map(s=>wE({name:t,type:i,types:e,value:s}));return[{type:"bytes32"},zt(uc(o.map(([s])=>s),o.map(([,s])=>s)))]}return[{type:n},r]}function mB(e){const{domain:t,message:n,primaryType:r,types:i}=e,o=(l,u)=>{const d={...u};for(const c of l){const{name:f,type:m}=c;m==="address"&&(d[f]=d[f].toLowerCase())}return d},s=i.EIP712Domain?t?o(i.EIP712Domain,t):{}:{},a=(()=>{if(r!=="EIP712Domain")return o(i[r],n)})();return hn({domain:s,message:a,primaryType:r,types:i})}function _E(e){const{domain:t,message:n,primaryType:r,types:i}=e,o=(s,a)=>{for(const l of s){const{name:u,type:d}=l,c=a[u],f=d.match(fB);if(f&&(typeof c=="number"||typeof c=="bigint")){const[h,y,g]=f;Ae(c,{signed:y==="int",size:Number.parseInt(g)/8})}if(d==="address"&&typeof c=="string"&&!on(c))throw new Pn({address:c});const m=d.match(uB);if(m){const[h,y]=m;if(y&&At(c)!==Number.parseInt(y))throw new WP({expectedSize:Number.parseInt(y),givenSize:At(c)})}const p=i[d];p&&o(p,c)}};i.EIP712Domain&&t&&o(i.EIP712Domain,t),r!=="EIP712Domain"&&o(i[r],n)}function xE({domain:e}){return[typeof(e==null?void 0:e.name)=="string"&&{name:"name",type:"string"},(e==null?void 0:e.version)&&{name:"version",type:"string"},typeof(e==null?void 0:e.chainId)=="number"&&{name:"chainId",type:"uint256"},(e==null?void 0:e.verifyingContract)&&{name:"verifyingContract",type:"address"},(e==null?void 0:e.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}const gB={"0x0":"reverted","0x1":"success"};function yB(e){const t={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(n=>fs(n)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?yi(e.transactionIndex):null,status:e.status?gB[e.status]:null,type:e.type?M8[e.type]||e.type:null};return e.blobGasPrice&&(t.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(t.blobGasUsed=BigInt(e.blobGasUsed)),t}const bB=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),EE=new Uint8Array(new Array(16).fill(0).map((e,t)=>t)),vB=EE.map(e=>(9*e+5)%16);let cv=[EE],uv=[vB];for(let e=0;e<4;e++)for(let t of[cv,uv])t.push(t[e].map(n=>bB[n]));const SE=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(e=>new Uint8Array(e)),wB=cv.map((e,t)=>e.map(n=>SE[t][n])),_B=uv.map((e,t)=>e.map(n=>SE[t][n])),xB=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),EB=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]);function C6(e,t,n,r){return e===0?t^n^r:e===1?t&n|~t&r:e===2?(t|~n)^r:e===3?t&r|n&~r:t^(n|~r)}const Zd=new Uint32Array(16);class SB extends Zb{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:t,h1:n,h2:r,h3:i,h4:o}=this;return[t,n,r,i,o]}set(t,n,r,i,o){this.h0=t|0,this.h1=n|0,this.h2=r|0,this.h3=i|0,this.h4=o|0}process(t,n){for(let m=0;m<16;m++,n+=4)Zd[m]=t.getUint32(n,!0);let r=this.h0|0,i=r,o=this.h1|0,s=o,a=this.h2|0,l=a,u=this.h3|0,d=u,c=this.h4|0,f=c;for(let m=0;m<5;m++){const p=4-m,h=xB[m],y=EB[m],g=cv[m],b=uv[m],v=wB[m],w=_B[m];for(let E=0;E<16;E++){const C=Wd(r+C6(m,o,a,u)+Zd[g[E]]+h,v[E])+c|0;r=c,c=u,u=Wd(a,10)|0,a=o,o=C}for(let E=0;E<16;E++){const C=Wd(i+C6(p,s,l,d)+Zd[b[E]]+y,w[E])+f|0;i=f,f=d,d=Wd(l,10)|0,l=s,s=C}}this.set(this.h1+a+d|0,this.h2+u+f|0,this.h3+c+i|0,this.h4+r+s|0,this.h0+o+l|0)}roundClean(){Zd.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}const kB=u0(()=>new SB),CB=`Ethereum Signed Message: `;function AB(e){const t=typeof e=="string"?Fl(e):typeof e.raw=="string"?e.raw:Mt(e.raw),n=Fl(`${CB}${At(t)}`);return ro([n,t])}function fv(e,t){return zt(AB(e),t)}const kE="0x6492649264926492649264926492649264926492649264926492649264926492";function TB(e){return v8(e,-32)===kE}function IB(e){const{address:t,data:n,signature:r,to:i="hex"}=e,o=so([uc([{type:"address"},{type:"bytes"},{type:"bytes"}],[t,n,r]),kE]);return i==="hex"?o:Sr(o)}function $B(e){const{authorizationList:t}=e;if(t)for(const n of t){const{contractAddress:r,chainId:i}=n;if(!on(r))throw new Pn({address:r});if(i<=0)throw new v0({chainId:i})}dv(e)}function PB(e){const{blobVersionedHashes:t}=e;if(t){if(t.length===0)throw new q8;for(const n of t){const r=At(n),i=yi(hf(n,0,1));if(r!==32)throw new tL({hash:n,size:r});if(i!==V8)throw new nL({hash:n,version:i})}}dv(e)}function dv(e){const{chainId:t,maxPriorityFeePerGas:n,maxFeePerGas:r,to:i}=e;if(t<=0)throw new v0({chainId:t});if(i&&!on(i))throw new Pn({address:i});if(r&&r>g0)throw new _a({maxFeePerGas:r});if(n&&r&&n>r)throw new If({maxFeePerGas:r,maxPriorityFeePerGas:n})}function OB(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:i,to:o}=e;if(t<=0)throw new v0({chainId:t});if(o&&!on(o))throw new Pn({address:o});if(n||i)throw new J("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(r&&r>g0)throw new _a({maxFeePerGas:r})}function RB(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:i,to:o}=e;if(o&&!on(o))throw new Pn({address:o});if(typeof t<"u"&&t<=0)throw new v0({chainId:t});if(n||i)throw new J("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(r&&r>g0)throw new _a({maxFeePerGas:r})}function LB(e){if(!e||e.length===0)return[];const t=[];for(const n of e){const{contractAddress:r,chainId:i,nonce:o,...s}=n;t.push([Te(i),r,Te(o),...ud({},s)])}return t}function k0(e){if(!e||e.length===0)return[];const t=[];for(let n=0;n"u"||typeof m>"u")){const v=typeof e.blobs[0]=="string"?e.blobs:e.blobs.map(C=>Mt(C)),w=e.kzg,E=Gb({blobs:v,kzg:w});if(typeof f>"u"&&(f=H8({commitments:E})),typeof m>"u"){const C=Kb({blobs:v,commitments:E,kzg:w});m=G8({blobs:v,commitments:E,proofs:C})}}const p=k0(d),h=[Te(n),i?Te(i):"0x",u?Te(u):"0x",l?Te(l):"0x",r?Te(r):"0x",o??"0x",s?Te(s):"0x",c??"0x",p,a?Te(a):"0x",f??[],...ud(e,t)],y=[],g=[],b=[];if(m)for(let v=0;v{if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(t.v===35n?0n:1n);if(n>0)return BigInt(n*2)+BigInt(35n+t.v-27n);const m=27n+(t.v===27n?0n:1n);if(t.v!==m)throw new _R({v:t.v});return m})(),c=as(t.r),f=as(t.s);u=[...u,Te(d),c==="0x00"?"0x":c,f==="0x00"?"0x":f]}else n>0&&(u=[...u,Te(n),"0x","0x"]);return wa(u)}function ud(e,t){const n=t??e,{v:r,yParity:i}=n;if(typeof n.r>"u")return[];if(typeof n.s>"u")return[];if(typeof r>"u"&&typeof i>"u")return[];const o=as(n.r),s=as(n.s);return[typeof i=="number"?i?Te(1):"0x":r===0n?"0x":r===1n?Te(1):r===27n?"0x":Te(1),o==="0x00"?"0x":o,s==="0x00"?"0x":s]}function UB(e){return e.map(t=>({...t,value:BigInt(t.value)}))}function HB(e){return{...e,balance:e.balance?BigInt(e.balance):void 0,nonce:e.nonce?yi(e.nonce):void 0,storageProof:e.storageProof?UB(e.storageProof):void 0}}async function zB(e,{address:t,blockNumber:n,blockTag:r,storageKeys:i}){const o=r??"latest",s=n!==void 0?Ae(n):void 0,a=await e.request({method:"eth_getProof",params:[t,i,s||o]});return HB(a)}async function WB(e,{address:t,blockNumber:n,blockTag:r="latest",slot:i}){const o=n!==void 0?Ae(n):void 0;return await e.request({method:"eth_getStorageAt",params:[t,i,o||r]})}async function hv(e,{blockHash:t,blockNumber:n,blockTag:r,hash:i,index:o}){var d,c,f;const s=r||"latest",a=n!==void 0?Ae(n):void 0;let l=null;if(i?l=await e.request({method:"eth_getTransactionByHash",params:[i]},{dedupe:!0}):t?l=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,Ae(o)]},{dedupe:!0}):(a||s)&&(l=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[a||s,Ae(o)]},{dedupe:!!a})),!l)throw new k8({blockHash:t,blockNumber:n,blockTag:s,hash:i,index:o});return(((f=(c=(d=e.chain)==null?void 0:d.formatters)==null?void 0:c.transaction)==null?void 0:f.format)||j8)(l)}async function VB(e,{hash:t,transactionReceipt:n}){const[r,i]=await Promise.all([Ee(e,ld,"getBlockNumber")({}),t?Ee(e,hv,"getTransaction")({hash:t}):void 0]),o=(n==null?void 0:n.blockNumber)||(i==null?void 0:i.blockNumber);return o?r-o+1n:0n}async function W1(e,{hash:t}){var i,o,s;const n=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:!0});if(!n)throw new C8({hash:t});return(((s=(o=(i=e.chain)==null?void 0:i.formatters)==null?void 0:o.transactionReceipt)==null?void 0:s.format)||yB)(n)}async function qB(e,t){var y;const{allowFailure:n=!0,batchSize:r,blockNumber:i,blockTag:o,multicallAddress:s,stateOverride:a}=t,l=t.contracts,u=r??(typeof((y=e.batch)==null?void 0:y.multicall)=="object"&&e.batch.multicall.batchSize||1024);let d=s;if(!d){if(!e.chain)throw new Error("client chain not configured. multicallAddress is required.");d=hc({blockNumber:i,chain:e.chain,contract:"multicall3"})}const c=[[]];let f=0,m=0;for(let g=0;g0&&m>u&&c[f].length>0&&(f++,m=(C.length-2)/2,c[f]=[]),c[f]=[...c[f],{allowFailure:!0,callData:C,target:v}]}catch(C){const k=zl(C,{abi:b,address:v,args:w,docsPath:"/docs/contract/multicall",functionName:E});if(!n)throw k;c[f]=[...c[f],{allowFailure:!0,callData:"0x",target:v}]}}const p=await Promise.allSettled(c.map(g=>Ee(e,bi,"readContract")({abi:D1,address:d,args:[g],blockNumber:i,blockTag:o,functionName:"aggregate3",stateOverride:a}))),h=[];for(let g=0;gt.toString(16).padStart(2,"0"));function Wl(e){fd(e);let t="";for(let n=0;n=Fi._0&&e<=Fi._9)return e-Fi._0;if(e>=Fi._A&&e<=Fi._F)return e-(Fi._A-10);if(e>=Fi._a&&e<=Fi._f)return e-(Fi._a-10)}function Vl(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);const t=e.length,n=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let i=0,o=0;iCE;e>>=C0,t+=1);return t}function QB(e,t){return e>>BigInt(t)&C0}function JB(e,t,n){return e|(n?C0:CE)<(GB<new Uint8Array(e),T6=e=>Uint8Array.from(e);function IE(e,t,n){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");let r=Fm(e),i=Fm(e),o=0;const s=()=>{r.fill(1),i.fill(0),o=0},a=(...c)=>n(i,r,...c),l=(c=Fm())=>{i=a(T6([0]),c),r=a(),c.length!==0&&(i=a(T6([1]),c),r=a())},u=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let c=0;const f=[];for(;c{s(),l(c);let m;for(;!(m=f(u()));)l();return s(),m}}const eN={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||xa(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function dd(e,t,n={}){const r=(i,o,s)=>{const a=eN[o];if(typeof a!="function")throw new Error(`Invalid validator "${o}", expected function`);const l=e[i];if(!(s&&l===void 0)&&!a(l,e))throw new Error(`Invalid param ${String(i)}=${l} (${typeof l}), expected ${o}`)};for(const[i,o]of Object.entries(t))r(i,o,!1);for(const[i,o]of Object.entries(n))r(i,o,!0);return e}const tN=Object.freeze(Object.defineProperty({__proto__:null,abytes:fd,bitGet:QB,bitLen:YB,bitMask:yv,bitSet:JB,bytesToHex:Wl,bytesToNumberBE:la,bytesToNumberLE:mv,concatBytes:$f,createHmacDrbg:IE,ensureBytes:Nr,equalBytes:TE,hexToBytes:Vl,hexToNumber:pv,isBytes:xa,numberToBytesBE:ql,numberToBytesLE:gv,numberToHexUnpadded:AE,numberToVarBytesBE:ZB,utf8ToBytes:XB,validateObject:dd},Symbol.toStringTag,{value:"Module"}));function nN(e,t){const n=Er(e)?cs(e):e,r=Er(t)?cs(t):t;return TE(n,r)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const nn=BigInt(0),Pt=BigInt(1),Vs=BigInt(2),rN=BigInt(3),V1=BigInt(4),I6=BigInt(5),$6=BigInt(8);BigInt(9);BigInt(16);function In(e,t){const n=e%t;return n>=nn?n:t+n}function iN(e,t,n){if(n<=nn||t 0");if(n===Pt)return nn;let r=Pt;for(;t>nn;)t&Pt&&(r=r*e%n),e=e*e%n,t>>=Pt;return r}function pr(e,t,n){let r=e;for(;t-- >nn;)r*=r,r%=n;return r}function q1(e,t){if(e===nn||t<=nn)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let n=In(e,t),r=t,i=nn,o=Pt;for(;n!==nn;){const a=r/n,l=r%n,u=i-o*a;r=n,n=l,i=o,o=u}if(r!==Pt)throw new Error("invert: does not exist");return In(i,t)}function oN(e){const t=(e-Pt)/Vs;let n,r,i;for(n=e-Pt,r=0;n%Vs===nn;n/=Vs,r++);for(i=Vs;i(r[i]="function",r),t);return dd(e,n)}function cN(e,t,n){if(n 0");if(n===nn)return e.ONE;if(n===Pt)return t;let r=e.ONE,i=t;for(;n>nn;)n&Pt&&(r=e.mul(r,i)),i=e.sqr(i),n>>=Pt;return r}function uN(e,t){const n=new Array(t.length),r=t.reduce((o,s,a)=>e.is0(s)?o:(n[a]=o,e.mul(o,s)),e.ONE),i=e.inv(r);return t.reduceRight((o,s,a)=>e.is0(s)?o:(n[a]=e.mul(o,n[a]),e.mul(o,s)),i),n}function $E(e,t){const n=t!==void 0?t:e.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function fN(e,t,n=!1,r={}){if(e<=nn)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:i,nByteLength:o}=$E(e,t);if(o>2048)throw new Error("Field lengths over 2048 bytes are not supported");const s=sN(e),a=Object.freeze({ORDER:e,BITS:i,BYTES:o,MASK:yv(i),ZERO:nn,ONE:Pt,create:l=>In(l,e),isValid:l=>{if(typeof l!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof l}`);return nn<=l&&ll===nn,isOdd:l=>(l&Pt)===Pt,neg:l=>In(-l,e),eql:(l,u)=>l===u,sqr:l=>In(l*l,e),add:(l,u)=>In(l+u,e),sub:(l,u)=>In(l-u,e),mul:(l,u)=>In(l*u,e),pow:(l,u)=>cN(a,l,u),div:(l,u)=>In(l*q1(u,e),e),sqrN:l=>l*l,addN:(l,u)=>l+u,subN:(l,u)=>l-u,mulN:(l,u)=>l*u,inv:l=>q1(l,e),sqrt:r.sqrt||(l=>s(a,l)),invertBatch:l=>uN(a,l),cmov:(l,u,d)=>d?u:l,toBytes:l=>n?gv(l,o):ql(l,o),fromBytes:l=>{if(l.length!==o)throw new Error(`Fp.fromBytes: expected ${o}, got ${l.length}`);return n?mv(l):la(l)}});return Object.freeze(a)}function PE(e){if(typeof e!="bigint")throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function OE(e){const t=PE(e);return t+Math.ceil(t/2)}function dN(e,t,n=!1){const r=e.length,i=PE(t),o=OE(t);if(r<16||r1024)throw new Error(`expected ${o}-1024 bytes of input, got ${r}`);const s=n?la(e):mv(e),a=In(s,t-Pt)+Pt;return n?gv(a,i):ql(a,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const hN=BigInt(0),Um=BigInt(1);function pN(e,t){const n=(i,o)=>{const s=o.negate();return i?s:o},r=i=>{const o=Math.ceil(t/i)+1,s=2**(i-1);return{windows:o,windowSize:s}};return{constTimeNegate:n,unsafeLadder(i,o){let s=e.ZERO,a=i;for(;o>hN;)o&Um&&(s=s.add(a)),a=a.double(),o>>=Um;return s},precomputeWindow(i,o){const{windows:s,windowSize:a}=r(o),l=[];let u=i,d=u;for(let c=0;c>=m,y>l&&(y-=f,s+=Um);const g=h,b=h+Math.abs(y)-1,v=p%2!==0,w=y<0;y===0?d=d.add(n(v,o[g])):u=u.add(n(w,o[b]))}return{p:u,f:d}},wNAFCached(i,o,s,a){const l=i._WINDOW_SIZE||1;let u=o.get(i);return u||(u=this.precomputeWindow(i,l),l!==1&&o.set(i,a(u))),this.wNAF(l,u,s)}}}function RE(e){return lN(e.Fp),dd(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...$E(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function mN(e){const t=RE(e);dd(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:n,Fp:r,a:i}=t;if(n){if(!r.eql(i,r.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof n!="object"||typeof n.beta!="bigint"||typeof n.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}const{bytesToNumberBE:gN,hexToBytes:yN}=tN,Ys={Err:class extends Error{constructor(t=""){super(t)}},_parseInt(e){const{Err:t}=Ys;if(e.length<2||e[0]!==2)throw new t("Invalid signature integer tag");const n=e[1],r=e.subarray(2,n+2);if(!n||r.length!==n)throw new t("Invalid signature integer: wrong length");if(r[0]&128)throw new t("Invalid signature integer: negative");if(r[0]===0&&!(r[1]&128))throw new t("Invalid signature integer: unnecessary leading zero");return{d:gN(r),l:e.subarray(n+2)}},toSig(e){const{Err:t}=Ys,n=typeof e=="string"?yN(e):e;fd(n);let r=n.length;if(r<2||n[0]!=48)throw new t("Invalid signature tag");if(n[1]!==r-2)throw new t("Invalid signature: incorrect length");const{d:i,l:o}=Ys._parseInt(n.subarray(2)),{d:s,l:a}=Ys._parseInt(o);if(a.length)throw new t("Invalid signature: left bytes after parsing");return{r:i,s}},hexFromSig(e){const t=u=>Number.parseInt(u[0],16)&8?"00"+u:u,n=u=>{const d=u.toString(16);return d.length&1?`0${d}`:d},r=t(n(e.s)),i=t(n(e.r)),o=r.length/2,s=i.length/2,a=n(o),l=n(s);return`30${n(s+o+4)}02${l}${i}02${a}${r}`}},qi=BigInt(0),mr=BigInt(1);BigInt(2);const P6=BigInt(3);BigInt(4);function bN(e){const t=mN(e),{Fp:n}=t,r=t.toBytes||((p,h,y)=>{const g=h.toAffine();return $f(Uint8Array.from([4]),n.toBytes(g.x),n.toBytes(g.y))}),i=t.fromBytes||(p=>{const h=p.subarray(1),y=n.fromBytes(h.subarray(0,n.BYTES)),g=n.fromBytes(h.subarray(n.BYTES,2*n.BYTES));return{x:y,y:g}});function o(p){const{a:h,b:y}=t,g=n.sqr(p),b=n.mul(g,p);return n.add(n.add(b,n.mul(p,h)),y)}if(!n.eql(n.sqr(t.Gy),o(t.Gx)))throw new Error("bad generator point: equation left != right");function s(p){return typeof p=="bigint"&&qin.eql(v,n.ZERO);return b(y)&&b(g)?c.ZERO:new c(y,g,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(h){const y=n.invertBatch(h.map(g=>g.pz));return h.map((g,b)=>g.toAffine(y[b])).map(c.fromAffine)}static fromHex(h){const y=c.fromAffine(i(Nr("pointHex",h)));return y.assertValidity(),y}static fromPrivateKey(h){return c.BASE.multiply(l(h))}_setWindowSize(h){this._WINDOW_SIZE=h,u.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!n.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:h,y}=this.toAffine();if(!n.isValid(h)||!n.isValid(y))throw new Error("bad point: x or y not FE");const g=n.sqr(y),b=o(h);if(!n.eql(g,b))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:h}=this.toAffine();if(n.isOdd)return!n.isOdd(h);throw new Error("Field doesn't support isOdd")}equals(h){d(h);const{px:y,py:g,pz:b}=this,{px:v,py:w,pz:E}=h,C=n.eql(n.mul(y,E),n.mul(v,b)),k=n.eql(n.mul(g,E),n.mul(w,b));return C&&k}negate(){return new c(this.px,n.neg(this.py),this.pz)}double(){const{a:h,b:y}=t,g=n.mul(y,P6),{px:b,py:v,pz:w}=this;let E=n.ZERO,C=n.ZERO,k=n.ZERO,_=n.mul(b,b),S=n.mul(v,v),A=n.mul(w,w),I=n.mul(b,v);return I=n.add(I,I),k=n.mul(b,w),k=n.add(k,k),E=n.mul(h,k),C=n.mul(g,A),C=n.add(E,C),E=n.sub(S,C),C=n.add(S,C),C=n.mul(E,C),E=n.mul(I,E),k=n.mul(g,k),A=n.mul(h,A),I=n.sub(_,A),I=n.mul(h,I),I=n.add(I,k),k=n.add(_,_),_=n.add(k,_),_=n.add(_,A),_=n.mul(_,I),C=n.add(C,_),A=n.mul(v,w),A=n.add(A,A),_=n.mul(A,I),E=n.sub(E,_),k=n.mul(A,S),k=n.add(k,k),k=n.add(k,k),new c(E,C,k)}add(h){d(h);const{px:y,py:g,pz:b}=this,{px:v,py:w,pz:E}=h;let C=n.ZERO,k=n.ZERO,_=n.ZERO;const S=t.a,A=n.mul(t.b,P6);let I=n.mul(y,v),L=n.mul(g,w),F=n.mul(b,E),N=n.add(y,g),R=n.add(v,w);N=n.mul(N,R),R=n.add(I,L),N=n.sub(N,R),R=n.add(y,b);let B=n.add(v,E);return R=n.mul(R,B),B=n.add(I,F),R=n.sub(R,B),B=n.add(g,b),C=n.add(w,E),B=n.mul(B,C),C=n.add(L,F),B=n.sub(B,C),_=n.mul(S,R),C=n.mul(A,F),_=n.add(C,_),C=n.sub(L,_),_=n.add(L,_),k=n.mul(C,_),L=n.add(I,I),L=n.add(L,I),F=n.mul(S,F),R=n.mul(A,R),L=n.add(L,F),F=n.sub(I,F),F=n.mul(S,F),R=n.add(R,F),I=n.mul(L,R),k=n.add(k,I),I=n.mul(B,R),C=n.mul(N,C),C=n.sub(C,I),I=n.mul(N,L),_=n.mul(B,_),_=n.add(_,I),new c(C,k,_)}subtract(h){return this.add(h.negate())}is0(){return this.equals(c.ZERO)}wNAF(h){return m.wNAFCached(this,u,h,y=>{const g=n.invertBatch(y.map(b=>b.pz));return y.map((b,v)=>b.toAffine(g[v])).map(c.fromAffine)})}multiplyUnsafe(h){const y=c.ZERO;if(h===qi)return y;if(a(h),h===mr)return this;const{endo:g}=t;if(!g)return m.unsafeLadder(this,h);let{k1neg:b,k1:v,k2neg:w,k2:E}=g.splitScalar(h),C=y,k=y,_=this;for(;v>qi||E>qi;)v&mr&&(C=C.add(_)),E&mr&&(k=k.add(_)),_=_.double(),v>>=mr,E>>=mr;return b&&(C=C.negate()),w&&(k=k.negate()),k=new c(n.mul(k.px,g.beta),k.py,k.pz),C.add(k)}multiply(h){a(h);let y=h,g,b;const{endo:v}=t;if(v){const{k1neg:w,k1:E,k2neg:C,k2:k}=v.splitScalar(y);let{p:_,f:S}=this.wNAF(E),{p:A,f:I}=this.wNAF(k);_=m.constTimeNegate(w,_),A=m.constTimeNegate(C,A),A=new c(n.mul(A.px,v.beta),A.py,A.pz),g=_.add(A),b=S.add(I)}else{const{p:w,f:E}=this.wNAF(y);g=w,b=E}return c.normalizeZ([g,b])[0]}multiplyAndAddUnsafe(h,y,g){const b=c.BASE,v=(E,C)=>C===qi||C===mr||!E.equals(b)?E.multiplyUnsafe(C):E.multiply(C),w=v(this,y).add(v(h,g));return w.is0()?void 0:w}toAffine(h){const{px:y,py:g,pz:b}=this,v=this.is0();h==null&&(h=v?n.ONE:n.inv(b));const w=n.mul(y,h),E=n.mul(g,h),C=n.mul(b,h);if(v)return{x:n.ZERO,y:n.ZERO};if(!n.eql(C,n.ONE))throw new Error("invZ was invalid");return{x:w,y:E}}isTorsionFree(){const{h,isTorsionFree:y}=t;if(h===mr)return!0;if(y)return y(c,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h,clearCofactor:y}=t;return h===mr?this:y?y(c,this):this.multiplyUnsafe(t.h)}toRawBytes(h=!0){return this.assertValidity(),r(c,this,h)}toHex(h=!0){return Wl(this.toRawBytes(h))}}c.BASE=new c(t.Gx,t.Gy,n.ONE),c.ZERO=new c(n.ZERO,n.ONE,n.ZERO);const f=t.nBitLength,m=pN(c,t.endo?Math.ceil(f/2):f);return{CURVE:t,ProjectivePoint:c,normPrivateKeyToScalar:l,weierstrassEquation:o,isWithinCurveOrder:s}}function vN(e){const t=RE(e);return dd(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function wN(e){const t=vN(e),{Fp:n,n:r}=t,i=n.BYTES+1,o=2*n.BYTES+1;function s(R){return qiWl(ql(R,t.nByteLength));function p(R){const B=r>>mr;return R>B}function h(R){return p(R)?a(-R):R}const y=(R,B,V)=>la(R.slice(B,V));class g{constructor(B,V,j){this.r=B,this.s=V,this.recovery=j,this.assertValidity()}static fromCompact(B){const V=t.nByteLength;return B=Nr("compactSignature",B,V*2),new g(y(B,0,V),y(B,V,2*V))}static fromDER(B){const{r:V,s:j}=Ys.toSig(Nr("DER",B));return new g(V,j)}assertValidity(){if(!f(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!f(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(B){return new g(this.r,this.s,B)}recoverPublicKey(B){const{r:V,s:j,recovery:W}=this,Y=k(Nr("msgHash",B));if(W==null||![0,1,2,3].includes(W))throw new Error("recovery id invalid");const te=W===2||W===3?V+t.n:V;if(te>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const ae=W&1?"03":"02",Z=u.fromHex(ae+m(te)),pe=l(te),Ie=a(-Y*pe),_e=a(j*pe),Ce=u.BASE.multiplyAndAddUnsafe(Z,Ie,_e);if(!Ce)throw new Error("point at infinify");return Ce.assertValidity(),Ce}hasHighS(){return p(this.s)}normalizeS(){return this.hasHighS()?new g(this.r,a(-this.s),this.recovery):this}toDERRawBytes(){return Vl(this.toDERHex())}toDERHex(){return Ys.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Vl(this.toCompactHex())}toCompactHex(){return m(this.r)+m(this.s)}}const b={isValidPrivateKey(R){try{return d(R),!0}catch{return!1}},normPrivateKeyToScalar:d,randomPrivateKey:()=>{const R=OE(t.n);return dN(t.randomBytes(R),t.n)},precompute(R=8,B=u.BASE){return B._setWindowSize(R),B.multiply(BigInt(3)),B}};function v(R,B=!0){return u.fromPrivateKey(R).toRawBytes(B)}function w(R){const B=xa(R),V=typeof R=="string",j=(B||V)&&R.length;return B?j===i||j===o:V?j===2*i||j===2*o:R instanceof u}function E(R,B,V=!0){if(w(R))throw new Error("first arg must be private key");if(!w(B))throw new Error("second arg must be public key");return u.fromHex(B).multiply(d(R)).toRawBytes(V)}const C=t.bits2int||function(R){const B=la(R),V=R.length*8-t.nBitLength;return V>0?B>>BigInt(V):B},k=t.bits2int_modN||function(R){return a(C(R))},_=yv(t.nBitLength);function S(R){if(typeof R!="bigint")throw new Error("bigint expected");if(!(qi<=R&&R<_))throw new Error(`bigint expected < 2^${t.nBitLength}`);return ql(R,t.nByteLength)}function A(R,B,V=I){if(["recovered","canonical"].some($e=>$e in V))throw new Error("sign() legacy options not supported");const{hash:j,randomBytes:W}=t;let{lowS:Y,prehash:te,extraEntropy:ae}=V;Y==null&&(Y=!0),R=Nr("msgHash",R),te&&(R=Nr("prehashed msgHash",j(R)));const Z=k(R),pe=d(B),Ie=[S(pe),S(Z)];if(ae!=null&&ae!==!1){const $e=ae===!0?W(n.BYTES):ae;Ie.push(Nr("extraEntropy",$e))}const _e=$f(...Ie),Ce=Z;function le($e){const rt=C($e);if(!f(rt))return;const je=l(rt),nt=u.BASE.multiply(rt).toAffine(),Le=a(nt.x);if(Le===qi)return;const _t=a(je*a(Ce+Le*pe));if(_t===qi)return;let Kn=(nt.x===Le?0:2)|Number(nt.y&mr),Zr=_t;return Y&&p(_t)&&(Zr=h(_t),Kn^=1),new g(Le,Zr,Kn)}return{seed:_e,k2sig:le}}const I={lowS:t.lowS,prehash:!1},L={lowS:t.lowS,prehash:!1};function F(R,B,V=I){const{seed:j,k2sig:W}=A(R,B,V),Y=t;return IE(Y.hash.outputLen,Y.nByteLength,Y.hmac)(j,W)}u.BASE._setWindowSize(8);function N(R,B,V,j=L){var nt;const W=R;if(B=Nr("msgHash",B),V=Nr("publicKey",V),"strict"in j)throw new Error("options.strict was renamed to lowS");const{lowS:Y,prehash:te}=j;let ae,Z;try{if(typeof W=="string"||xa(W))try{ae=g.fromDER(W)}catch(Le){if(!(Le instanceof Ys.Err))throw Le;ae=g.fromCompact(W)}else if(typeof W=="object"&&typeof W.r=="bigint"&&typeof W.s=="bigint"){const{r:Le,s:_t}=W;ae=new g(Le,_t)}else throw new Error("PARSE");Z=u.fromHex(V)}catch(Le){if(Le.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(Y&&ae.hasHighS())return!1;te&&(B=t.hash(B));const{r:pe,s:Ie}=ae,_e=k(B),Ce=l(Ie),le=a(_e*Ce),$e=a(pe*Ce),rt=(nt=u.BASE.multiplyAndAddUnsafe(Z,le,$e))==null?void 0:nt.toAffine();return rt?a(rt.x)===pe:!1}return{CURVE:t,getPublicKey:v,getSharedSecret:E,sign:F,verify:N,ProjectivePoint:u,Signature:g,utils:b}}class LE extends Pb{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,sO(t);const r=c0(n);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,o=new Uint8Array(i);o.set(r.length>i?t.create().update(r).digest():r);for(let s=0;snew LE(e,t).update(n).digest();dp.create=(e,t)=>new LE(e,t);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function _N(e){return{hash:e,hmac:(t,...n)=>dp(e,t,vu(...n)),randomBytes:TO}}function xN(e,t){const n=r=>wN({...e,..._N(r)});return Object.freeze({...n(t),create:n})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const BE=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),O6=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),EN=BigInt(1),G1=BigInt(2),R6=(e,t)=>(e+t/G1)/t;function SN(e){const t=BE,n=BigInt(3),r=BigInt(6),i=BigInt(11),o=BigInt(22),s=BigInt(23),a=BigInt(44),l=BigInt(88),u=e*e*e%t,d=u*u*e%t,c=pr(d,n,t)*d%t,f=pr(c,n,t)*d%t,m=pr(f,G1,t)*u%t,p=pr(m,i,t)*m%t,h=pr(p,o,t)*p%t,y=pr(h,a,t)*h%t,g=pr(y,l,t)*y%t,b=pr(g,a,t)*h%t,v=pr(b,n,t)*d%t,w=pr(v,s,t)*p%t,E=pr(w,r,t)*u%t,C=pr(E,G1,t);if(!K1.eql(K1.sqr(C),e))throw new Error("Cannot find square root");return C}const K1=fN(BE,void 0,void 0,{sqrt:SN}),Mn=xN({a:BigInt(0),b:BigInt(7),Fp:K1,n:O6,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=O6,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-EN*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=n,s=BigInt("0x100000000000000000000000000000000"),a=R6(o*e,t),l=R6(-r*e,t);let u=In(e-a*n-l*i,t),d=In(-a*r-l*o,t);const c=u>s,f=d>s;if(c&&(u=t-u),f&&(d=t-d),u>s||d>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:c,k1:u,k2neg:f,k2:d}}}},y0);BigInt(0);Mn.ProjectivePoint;const kN=Object.freeze(Object.defineProperty({__proto__:null,secp256k1:Mn},Symbol.toStringTag,{value:"Module"}));function NE({r:e,s:t,to:n="hex",v:r,yParity:i}){const o=(()=>{if(i===0||i===1)return i;if(r&&(r===27n||r===28n||r>=35n))return r%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),s=`0x${new Mn.Signature(ls(e),ls(t)).toCompactHex()}${o===0?"1b":"1c"}`;return n==="hex"?s:Sr(s)}async function bv(e,t){const{address:n,factory:r,factoryData:i,hash:o,signature:s,...a}=t,l=Er(s)?s:typeof s=="object"&&"r"in s&&"s"in s?NE(s):Mt(s),u=await(async()=>!r&&!i||TB(l)?l:IB({address:r,data:i,signature:l}))();try{const{data:d}=await Ee(e,_0,"call")({data:w0({abi:aL,args:[n,o,u],bytecode:fL}),...a});return nN(d??"0x0","0x1")}catch(d){try{if(Qb(fp(n),await $8({hash:o,signature:s})))return!0}catch{}if(d instanceof A8)return!1;throw d}}async function CN(e,{address:t,message:n,factory:r,factoryData:i,signature:o,...s}){const a=fv(n);return bv(e,{address:t,factory:r,factoryData:i,hash:a,signature:o,...s})}async function AN(e,t){const{address:n,factory:r,factoryData:i,signature:o,message:s,primaryType:a,types:l,domain:u,...d}=t,c=gE({message:s,primaryType:a,types:l,domain:u});return bv(e,{address:n,factory:r,factoryData:i,hash:c,signature:o,...d})}function ME(e,{emitOnBegin:t=!1,emitMissed:n=!1,onBlockNumber:r,onError:i,poll:o,pollingInterval:s=e.pollingInterval}){const a=typeof o<"u"?o:!(e.transport.type==="webSocket"||e.transport.type==="fallback"&&e.transport.transports[0].config.type==="webSocket");let l;return a?(()=>{const c=hn(["watchBlockNumber",e.uid,t,n,s]);return ds(c,{onBlockNumber:r,onError:i},f=>ad(async()=>{var m;try{const p=await Ee(e,ld,"getBlockNumber")({cacheTime:0});if(l){if(p===l)return;if(p-l>1&&n)for(let h=l+1n;hl)&&(f.onBlockNumber(p,l),l=p)}catch(p){(m=f.onError)==null||m.call(f,p)}},{emitOnBegin:t,interval:s}))})():(()=>{const c=hn(["watchBlockNumber",e.uid,t,n]);return ds(c,{onBlockNumber:r,onError:i},f=>{let m=!0,p=()=>m=!1;return(async()=>{try{const h=(()=>{if(e.transport.type==="fallback"){const g=e.transport.transports.find(b=>b.config.type==="webSocket");return g?g.value:e.transport}return e.transport})(),{unsubscribe:y}=await h.subscribe({params:["newHeads"],onData(g){var v;if(!m)return;const b=ls((v=g.result)==null?void 0:v.number);f.onBlockNumber(b,l),l=b},onError(g){var b;(b=f.onError)==null||b.call(f,g)}});p=y,m||p()}catch(h){i==null||i(h)}})(),()=>p()})})()}async function TN(e,{confirmations:t=1,hash:n,onReplaced:r,pollingInterval:i=e.pollingInterval,retryCount:o=6,retryDelay:s=({count:l})=>~~(1<{a&&setTimeout(()=>h(new d6({hash:n})),a);const y=ds(l,{onReplaced:r,resolve:p,reject:h},g=>{const b=Ee(e,ME,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:i,async onBlockNumber(v){const w=C=>{b(),C(),y()};let E=v;if(!m){u>o&&w(()=>g.reject(new d6({hash:n})));try{if(f){if(t>1&&(!f.blockNumber||E-f.blockNumber+1ng.resolve(f));return}if(d||(m=!0,await z1(async()=>{d=await Ee(e,hv,"getTransaction")({hash:n}),d.blockNumber&&(E=d.blockNumber)},{delay:s,retryCount:o}),m=!1),f=await Ee(e,W1,"getTransactionReceipt")({hash:n}),t>1&&(!f.blockNumber||E-f.blockNumber+1ng.resolve(f))}catch(C){if(C instanceof k8||C instanceof C8){if(!d){m=!1;return}try{c=d,m=!0;const k=await z1(()=>Ee(e,us,"getBlock")({blockNumber:E,includeTransactions:!0}),{delay:s,retryCount:o,shouldRetry:({error:A})=>A instanceof N8});m=!1;const _=k.transactions.find(({from:A,nonce:I})=>A===c.from&&I===c.nonce);if(!_||(f=await Ee(e,W1,"getTransactionReceipt")({hash:_.hash}),t>1&&(!f.blockNumber||E-f.blockNumber+1n{var A;(A=g.onReplaced)==null||A.call(g,{reason:S,replacedTransaction:c,transaction:_,transactionReceipt:f}),g.resolve(f)})}catch(k){w(()=>g.reject(k))}}else w(()=>g.reject(C))}finally{u++}}}})})})}function IN(e,{blockTag:t="latest",emitMissed:n=!1,emitOnBegin:r=!1,onBlock:i,onError:o,includeTransactions:s,poll:a,pollingInterval:l=e.pollingInterval}){const u=typeof a<"u"?a:!(e.transport.type==="webSocket"||e.transport.type==="fallback"&&e.transport.transports[0].config.type==="webSocket"),d=s??!1;let c;return u?(()=>{const p=hn(["watchBlocks",e.uid,t,n,r,d,l]);return ds(p,{onBlock:i,onError:o},h=>ad(async()=>{var y;try{const g=await Ee(e,us,"getBlock")({blockTag:t,includeTransactions:d});if(g.number&&(c!=null&&c.number)){if(g.number===c.number)return;if(g.number-c.number>1&&n)for(let b=(c==null?void 0:c.number)+1n;bc.number)&&(h.onBlock(g,c),c=g)}catch(g){(y=h.onError)==null||y.call(h,g)}},{emitOnBegin:r,interval:l}))})():(()=>{let p=!0,h=()=>p=!1;return(async()=>{try{const y=(()=>{if(e.transport.type==="fallback"){const b=e.transport.transports.find(v=>v.config.type==="webSocket");return b?b.value:e.transport}return e.transport})(),{unsubscribe:g}=await y.subscribe({params:["newHeads"],onData(b){var E,C,k;if(!p)return;const w=(((k=(C=(E=e.chain)==null?void 0:E.formatters)==null?void 0:C.block)==null?void 0:k.format)||D8)(b.result);i(w,c),c=w},onError(b){o==null||o(b)}});h=g,p||h()}catch(y){o==null||o(y)}})(),()=>h()})()}function $N(e,{address:t,args:n,batch:r=!0,event:i,events:o,fromBlock:s,onError:a,onLogs:l,poll:u,pollingInterval:d=e.pollingInterval,strict:c}){const f=typeof u<"u"?u:typeof s=="bigint"?!0:!(e.transport.type==="webSocket"||e.transport.type==="fallback"&&e.transport.transports[0].config.type==="webSocket"),m=c??!1;return f?(()=>{const y=hn(["watchEvent",t,n,r,e.uid,i,d,s]);return ds(y,{onLogs:l,onError:a},g=>{let b;s!==void 0&&(b=s-1n);let v,w=!1;const E=ad(async()=>{var C;if(!w){try{v=await Ee(e,pE,"createEventFilter")({address:t,args:n,event:i,events:o,strict:m,fromBlock:s})}catch{}w=!0;return}try{let k;if(v)k=await Ee(e,x0,"getFilterChanges")({filter:v});else{const _=await Ee(e,ld,"getBlockNumber")({});b&&b!==_?k=await Ee(e,tv,"getLogs")({address:t,args:n,event:i,events:o,fromBlock:b+1n,toBlock:_}):k=[],b=_}if(k.length===0)return;if(r)g.onLogs(k);else for(const _ of k)g.onLogs([_])}catch(k){v&&k instanceof va&&(w=!1),(C=g.onError)==null||C.call(g,k)}},{emitOnBegin:!0,interval:d});return async()=>{v&&await Ee(e,E0,"uninstallFilter")({filter:v}),E()}})})():(()=>{let y=!0,g=()=>y=!1;return(async()=>{try{const b=(()=>{if(e.transport.type==="fallback"){const C=e.transport.transports.find(k=>k.config.type==="webSocket");return C?C.value:e.transport}return e.transport})(),v=o??(i?[i]:void 0);let w=[];v&&(w=[v.flatMap(k=>rd({abi:[k],eventName:k.name,args:n}))],i&&(w=w[0]));const{unsubscribe:E}=await b.subscribe({params:["logs",{address:t,topics:w}],onData(C){var _;if(!y)return;const k=C.result;try{const{eventName:S,args:A}=Jb({abi:v??[],data:k.data,topics:k.topics,strict:m}),I=fs(k,{args:A,eventName:S});l([I])}catch(S){let A,I;if(S instanceof df||S instanceof l0){if(c)return;A=S.abiItem.name,I=(_=S.abiItem.inputs)==null?void 0:_.some(F=>!("name"in F&&F.name))}const L=fs(k,{args:I?[]:{},eventName:A});l([L])}},onError(C){a==null||a(C)}});g=E,y||g()}catch(b){a==null||a(b)}})(),()=>g()})()}function PN(e,{batch:t=!0,onError:n,onTransactions:r,poll:i,pollingInterval:o=e.pollingInterval}){return(typeof i<"u"?i:e.transport.type!=="webSocket")?(()=>{const u=hn(["watchPendingTransactions",e.uid,t,o]);return ds(u,{onTransactions:r,onError:n},d=>{let c;const f=ad(async()=>{var m;try{if(!c)try{c=await Ee(e,mE,"createPendingTransactionFilter")({});return}catch(h){throw f(),h}const p=await Ee(e,x0,"getFilterChanges")({filter:c});if(p.length===0)return;if(t)d.onTransactions(p);else for(const h of p)d.onTransactions([h])}catch(p){(m=d.onError)==null||m.call(d,p)}},{emitOnBegin:!0,interval:o});return async()=>{c&&await Ee(e,E0,"uninstallFilter")({filter:c}),f()}})})():(()=>{let u=!0,d=()=>u=!1;return(async()=>{try{const{unsubscribe:c}=await e.transport.subscribe({params:["newPendingTransactions"],onData(f){if(!u)return;const m=f.result;r([m])},onError(f){n==null||n(f)}});d=c,u||d()}catch(c){n==null||n(c)}})(),()=>d()})()}function ON(e){var c,f,m;const{scheme:t,statement:n,...r}=((c=e.match(RN))==null?void 0:c.groups)??{},{chainId:i,expirationTime:o,issuedAt:s,notBefore:a,requestId:l,...u}=((f=e.match(LN))==null?void 0:f.groups)??{},d=(m=e.split("Resources:")[1])==null?void 0:m.split(` - `).slice(1);return{...r,...u,...i?{chainId:Number(i)}:{},...o?{expirationTime:new Date(o)}:{},...s?{issuedAt:new Date(s)}:{},...a?{notBefore:new Date(a)}:{},...l?{requestId:l}:{},...d?{resources:d}:{},...t?{scheme:t}:{},...n?{statement:n}:{}}}const RN=/^(?:(?[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?
0x[a-fA-F0-9]{40})\n\n(?:(?.*)\n\n)?/,LN=/(?:URI: (?.+))\n(?:Version: (?.+))\n(?:Chain ID: (?\d+))\n(?:Nonce: (?[a-zA-Z0-9]+))\n(?:Issued At: (?.+))(?:\nExpiration Time: (?.+))?(?:\nNot Before: (?.+))?(?:\nRequest ID: (?.+))?/;function BN(e){const{address:t,domain:n,message:r,nonce:i,scheme:o,time:s=new Date}=e;if(n&&r.domain!==n||i&&r.nonce!==i||o&&r.scheme!==o||r.expirationTime&&s>=r.expirationTime||r.notBefore&&s_0(e,t),createBlockFilter:()=>iB(e),createContractEventFilter:t=>jb(e,t),createEventFilter:t=>pE(e,t),createPendingTransactionFilter:()=>mE(e),estimateContractGas:t=>Y8(e,t),estimateGas:t=>Yb(e,t),getBalance:t=>X8(e,t),getBlobBaseFee:()=>oB(e),getBlock:t=>us(e,t),getBlockNumber:t=>ld(e,t),getBlockTransactionCount:t=>sB(e,t),getBytecode:t=>k6(e,t),getChainId:()=>sd(e),getCode:t=>k6(e,t),getContractEvents:t=>nv(e,t),getEip712Domain:t=>IL(e,t),getEnsAddress:t=>HL(e,t),getEnsAvatar:t=>tB(e,t),getEnsName:t=>nB(e,t),getEnsResolver:t=>rB(e,t),getEnsText:t=>hE(e,t),getFeeHistory:t=>lB(e,t),estimateFeesPerGas:t=>qR(e,t),getFilterChanges:t=>x0(e,t),getFilterLogs:t=>cB(e,t),getGasPrice:()=>qb(e),getLogs:t=>tv(e,t),getProof:t=>zB(e,t),estimateMaxPriorityFeePerGas:t=>VR(e,t),getStorageAt:t=>WB(e,t),getTransaction:t=>hv(e,t),getTransactionConfirmations:t=>VB(e,t),getTransactionCount:t=>U8(e,t),getTransactionReceipt:t=>W1(e,t),multicall:t=>qB(e,t),prepareTransactionRequest:t=>b0(e,t),readContract:t=>bi(e,t),sendRawTransaction:t=>rv(e,t),simulateContract:t=>nE(e,t),verifyMessage:t=>CN(e,t),verifySiweMessage:t=>NN(e,t),verifyTypedData:t=>AN(e,t),uninstallFilter:t=>E0(e,t),waitForTransactionReceipt:t=>TN(e,t),watchBlocks:t=>IN(e,t),watchBlockNumber:t=>ME(e,t),watchContractEvent:t=>rE(e,t),watchEvent:t=>$N(e,t),watchPendingTransactions:t=>PN(e,t)}}function jN(e){const{key:t="public",name:n="Public Client"}=e;return aE({...e,key:t,name:n,type:"publicClient"}).extend(MN)}function DN(e,t){const{abi:n,args:r,bytecode:i,...o}=t,s=w0({abi:n,args:r,bytecode:i});return iv(e,{...o,data:s})}async function FN(e){var n;return((n=e.account)==null?void 0:n.type)==="local"?[e.account.address]:(await e.request({method:"eth_accounts"},{dedupe:!0})).map(r=>td(r))}async function UN(e){return await e.request({method:"wallet_getPermissions"},{dedupe:!0})}async function HN(e){return(await e.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(n=>fp(n))}async function zN(e,t){return e.request({method:"wallet_requestPermissions",params:[t]},{retryCount:0})}async function WN(e,{account:t=e.account,message:n}){if(!t)throw new cd({docsPath:"/docs/actions/wallet/signMessage"});const r=cr(t);if(r.signMessage)return r.signMessage({message:n});const i=typeof n=="string"?Fl(n):n.raw instanceof Uint8Array?Te(n.raw):n.raw;return e.request({method:"personal_sign",params:[i,r.address]},{retryCount:0})}async function VN(e,t){var u,d,c,f;const{account:n=e.account,chain:r=e.chain,...i}=t;if(!n)throw new cd({docsPath:"/docs/actions/wallet/signTransaction"});const o=cr(n);od({account:o,...t});const s=await Ee(e,sd,"getChainId")({});r!==null&&iE({currentChainId:s,chain:r});const a=(r==null?void 0:r.formatters)||((u=e.chain)==null?void 0:u.formatters),l=((d=a==null?void 0:a.transactionRequest)==null?void 0:d.format)||m0;return o.signTransaction?o.signTransaction({...i,chainId:s},{serializer:(f=(c=e.chain)==null?void 0:c.serializers)==null?void 0:f.transaction}):await e.request({method:"eth_signTransaction",params:[{...l(i),chainId:Ae(s),from:o.address}]},{retryCount:0})}async function qN(e,t){const{account:n=e.account,domain:r,message:i,primaryType:o}=t;if(!n)throw new cd({docsPath:"/docs/actions/wallet/signTypedData"});const s=cr(n),a={EIP712Domain:xE({domain:r}),...t.types};if(_E({domain:r,message:i,primaryType:o,types:a}),s.signTypedData)return s.signTypedData({domain:r,message:i,primaryType:o,types:a});const l=mB({domain:r,message:i,primaryType:o,types:a});return e.request({method:"eth_signTypedData_v4",params:[s.address,l]},{retryCount:0})}async function GN(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:Ae(t)}]},{retryCount:0})}async function KN(e,t){return await e.request({method:"wallet_watchAsset",params:t},{retryCount:0})}function ZN(e){return{addChain:t=>PL(e,t),deployContract:t=>DN(e,t),getAddresses:()=>FN(e),getChainId:()=>sd(e),getPermissions:()=>UN(e),prepareTransactionRequest:t=>b0(e,t),requestAddresses:()=>HN(e),requestPermissions:t=>zN(e,t),sendRawTransaction:t=>rv(e,t),sendTransaction:t=>iv(e,t),signMessage:t=>WN(e,t),signTransaction:t=>VN(e,t),signTypedData:t=>qN(e,t),switchChain:t=>GN(e,t),watchAsset:t=>KN(e,t),writeContract:t=>oE(e,t)}}function jE(e){const{key:t="wallet",name:n="Wallet Client",transport:r}=e;return aE({...e,key:t,name:n,transport:r,type:"walletClient"}).extend(ZN)}var zr=(e=>(e.PROD="prod",e.STAGING="staging",e.DEV="dev",e.LOCAL="local",e))(zr||{});const XN=lv({id:1337,name:"Localhost",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),vv=lv({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://cloudflare-eth.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xce01f8eee7E479C928F8919abD53E553a36CeF67",blockCreated:19258213},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),L6=lv({id:11155111,name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc2.sepolia.org"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.etherscan.io",apiUrl:"https://api-sepolia.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc8Af999e38273D658BE1b921b88A9Ddf005769cC",blockCreated:5317080}},testnet:!0}),YN=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"beacon",type:"address"}],name:"BeaconUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint16",name:"valPerBlock",type:"uint16"},{indexed:!1,internalType:"uint16",name:"valPerBlockTarget",type:"uint16"}],name:"BlockParamsUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint8",name:"version",type:"uint8"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"ownerWallet",type:"address"},{indexed:!0,internalType:"address",name:"nodeWallet",type:"address"},{indexed:!1,internalType:"enum ValidatorV1.NodeType",name:"nodeType",type:"uint8"},{indexed:!1,internalType:"uint256",name:"nodeTokens",type:"uint256"},{indexed:!1,internalType:"string",name:"nodeApiBaseUrl",type:"string"}],name:"NodeAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"nodeWallet",type:"address"},{indexed:!1,internalType:"address",name:"reporterWallet",type:"address"},{indexed:!1,internalType:"address[]",name:"voters",type:"address[]"},{indexed:!1,internalType:"enum ValidatorV1.VoteAction",name:"voteAction",type:"uint8"}],name:"NodeReported",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"nodeWallet",type:"address"},{indexed:!1,internalType:"enum ValidatorV1.NodeStatus",name:"nodeStatus",type:"uint8"},{indexed:!1,internalType:"uint256",name:"nodeTokens",type:"uint256"}],name:"NodeStatusChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint16",name:"nodeRandomMinCount",type:"uint16"},{indexed:!1,internalType:"uint16",name:"nodeRandomPingCount",type:"uint16"}],name:"RandomParamsUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{inputs:[],name:"BAN_PERCENT",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"REPORTS_BEFORE_SLASH_S",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"REPORTS_BEFORE_SLASH_V",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"REPORT_THRESHOLD_PER_BLOCK",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"SLASHES_BEFORE_BAN_S",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"SLASHES_BEFORE_BAN_V",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"SLASH_PERCENT",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"acceptOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"dnodes",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getActiveVNodes",outputs:[{components:[{internalType:"address",name:"nodeWallet",type:"address"},{internalType:"string",name:"nodeApiBaseUrl",type:"string"}],internalType:"struct ValidatorV1.ActiveValidator[]",name:"",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDNodes",outputs:[{internalType:"address[]",name:"",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDNodesLength",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_nodeWallet",type:"address"}],name:"getNodeInfo",outputs:[{components:[{internalType:"address",name:"ownerWallet",type:"address"},{internalType:"address",name:"nodeWallet",type:"address"},{internalType:"enum ValidatorV1.NodeType",name:"nodeType",type:"uint8"},{internalType:"uint256",name:"nodeTokens",type:"uint256"},{internalType:"string",name:"nodeApiBaseUrl",type:"string"},{components:[{internalType:"uint16",name:"reportCounter",type:"uint16"},{internalType:"uint16",name:"slashCounter",type:"uint16"},{internalType:"uint128[]",name:"reportedInBlocks",type:"uint128[]"},{internalType:"address[]",name:"reportedBy",type:"address[]"},{internalType:"uint128[]",name:"reportedKeys",type:"uint128[]"}],internalType:"struct ValidatorV1.NodeCounters",name:"counters",type:"tuple"},{internalType:"enum ValidatorV1.NodeStatus",name:"status",type:"uint8"}],internalType:"struct ValidatorV1.NodeInfo",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSNodes",outputs:[{internalType:"address[]",name:"",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSNodesLength",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVNodes",outputs:[{internalType:"address[]",name:"",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVNodesLength",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint16",name:"protocolVersion_",type:"uint16"},{internalType:"address",name:"pushToken_",type:"address"},{internalType:"uint16",name:"valPerBlockTarget_",type:"uint16"},{internalType:"uint16",name:"nodeRandomMinCount_",type:"uint16"},{internalType:"uint16",name:"nodeRandomPingCount_",type:"uint16"},{internalType:"uint16",name:"REPORTS_BEFORE_SLASH_V_",type:"uint16"},{internalType:"uint16",name:"REPORTS_BEFORE_SLASH_S_",type:"uint16"},{internalType:"uint16",name:"SLASHES_BEFORE_BAN_V_",type:"uint16"},{internalType:"uint16",name:"SLASHES_BEFORE_BAN_S_",type:"uint16"},{internalType:"uint16",name:"SLASH_PERCENT_",type:"uint16"},{internalType:"uint16",name:"BAN_PERCENT_",type:"uint16"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"minStakeD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"minStakeS",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"minStakeV",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nodeMap",outputs:[{internalType:"address",name:"ownerWallet",type:"address"},{internalType:"address",name:"nodeWallet",type:"address"},{internalType:"enum ValidatorV1.NodeType",name:"nodeType",type:"uint8"},{internalType:"uint256",name:"nodeTokens",type:"uint256"},{internalType:"string",name:"nodeApiBaseUrl",type:"string"},{components:[{internalType:"uint16",name:"reportCounter",type:"uint16"},{internalType:"uint16",name:"slashCounter",type:"uint16"},{internalType:"uint128[]",name:"reportedInBlocks",type:"uint128[]"},{internalType:"address[]",name:"reportedBy",type:"address[]"},{internalType:"uint128[]",name:"reportedKeys",type:"uint128[]"}],internalType:"struct ValidatorV1.NodeCounters",name:"counters",type:"tuple"},{internalType:"enum ValidatorV1.NodeStatus",name:"status",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"nodeRandomMinCount",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"nodeRandomPingCount",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"pendingOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"protocolVersion",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"proxiableUUID",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from_",type:"address"},{internalType:"address",name:"to_",type:"address"},{internalType:"uint256",name:"amount_",type:"uint256"}],name:"redistributeStaked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"nodeTokens_",type:"uint256"},{internalType:"enum ValidatorV1.NodeType",name:"nodeType_",type:"uint8"},{internalType:"string",name:"nodeApiBaseUrl_",type:"string"},{internalType:"address",name:"nodeWallet_",type:"address"}],name:"registerNodeAndStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"enum ValidatorV1.NodeType",name:"targetNodeType_",type:"uint8"},{internalType:"bytes",name:"voteBlob_",type:"bytes"},{internalType:"bytes[]",name:"signatures_",type:"bytes[]"}],name:"reportNode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"addr_",type:"address"}],name:"setStorageContract",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"snodes",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"storageContract",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalFees",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalStaked",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to_",type:"address"},{internalType:"uint256",name:"amount_",type:"uint256"}],name:"unstakeFees",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"nodeWallet_",type:"address"}],name:"unstakeNode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint16",name:"valPerBlockTarget_",type:"uint16"}],name:"updateBlockParams",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint16",name:"nodeRandomMinCount_",type:"uint16"},{internalType:"uint16",name:"nodeRandomPingCount_",type:"uint16"}],name:"updateRandomParams",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"valPerBlock",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"valPerBlockTarget",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"vnodes",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"vnodesActive",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"}],Hm={ABIS:{VALIDATOR:YN},VALIDATOR:{[zr.PROD]:{NETWORK:vv,VALIDATOR_CONTRACT:"TODO"},[zr.STAGING]:{NETWORK:L6,VALIDATOR_CONTRACT:"TODO"},[zr.DEV]:{NETWORK:L6,VALIDATOR_CONTRACT:"0xb08d2cA537F6183138955eD4fCb012f94f681954"},[zr.LOCAL]:{NETWORK:XN,VALIDATOR_CONTRACT:"0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9"}}},Ft=class Ft{constructor(t,n,r){Se(this,"call",async(t,n=[],r=this.activeValidatorURL)=>await Ft.sendJsonRpcRequest(r,t,n));this.activeValidatorURL=t,this.env=n,this.validatorContractClient=r}};Se(Ft,"instance"),Se(Ft,"idCounter",0),Se(Ft,"initalize",async t=>{const n={env:(t==null?void 0:t.env)||zr.STAGING};if(!Ft.instance||Ft.instance.env!==n.env){const r=Ft.createValidatorContractClient(n.env),i=await Ft.getActiveValidator(r);Ft.instance=new Ft(i.nodeApiBaseUrl,n.env,r)}return Ft.instance}),Se(Ft,"createValidatorContractClient",t=>{const n=jN({chain:Hm.VALIDATOR[t].NETWORK,transport:cE()});return AL({abi:Hm.ABIS.VALIDATOR,address:Hm.VALIDATOR[t].VALIDATOR_CONTRACT,client:{public:n}})}),Se(Ft,"sendJsonRpcRequest",async(t,n,r)=>{const i={jsonrpc:"2.0",method:n,params:r,id:Ft.idCounter++},o=()=>t.includes(".local")?t.replace(".local",".localh"):t;try{const s=await Nt.post(`${o()}/api/v1/rpc`,i);if(s.data.error)throw console.error("JSON-RPC Error:",s.data.error),Error(s.data.error.message);return s.data.result}catch(s){throw console.error("Error sending JSON-RPC request:",s),s}}),Se(Ft,"ping",async t=>await Ft.sendJsonRpcRequest(t,"push_listening")),Se(Ft,"getActiveValidator",async t=>{const n=await t.read.getActiveVNodes();return EI(n)});let Pf=Ft;function QN(){let e=0,t=0;for(let r=0;r<28;r+=7){let i=this.buf[this.pos++];if(e|=(i&127)<>4,!(n&128))return this.assertBounds(),[e,t];for(let r=3;r<=31;r+=7){let i=this.buf[this.pos++];if(t|=(i&127)<>>o,a=!(!(s>>>7)&&t==0),l=(a?s|128:s)&255;if(n.push(l),!a)return}const r=e>>>28&15|(t&7)<<4,i=!!(t>>3);if(n.push((i?r|128:r)&255),!!i){for(let o=3;o<31;o=o+7){const s=t>>>o,a=!!(s>>>7),l=(a?s|128:s)&255;if(n.push(l),!a)return}n.push(t>>>31&1)}}const _h=4294967296;function B6(e){const t=e[0]==="-";t&&(e=e.slice(1));const n=1e6;let r=0,i=0;function o(s,a){const l=Number(e.slice(s,a));i*=n,r=r*n+l,r>=_h&&(i=i+(r/_h|0),r=r%_h)}return o(-24,-18),o(-18,-12),o(-12,-6),o(-6),t?FE(r,i):wv(r,i)}function JN(e,t){let n=wv(e,t);const r=n.hi&2147483648;r&&(n=FE(n.lo,n.hi));const i=DE(n.lo,n.hi);return r?"-"+i:i}function DE(e,t){if({lo:e,hi:t}=eM(e,t),t<=2097151)return String(_h*t+e);const n=e&16777215,r=(e>>>24|t<<8)&16777215,i=t>>16&65535;let o=n+r*6777216+i*6710656,s=r+i*8147497,a=i*2;const l=1e7;return o>=l&&(s+=Math.floor(o/l),o%=l),s>=l&&(a+=Math.floor(s/l),s%=l),a.toString()+N6(s)+N6(o)}function eM(e,t){return{lo:e>>>0,hi:t>>>0}}function wv(e,t){return{lo:e|0,hi:t|0}}function FE(e,t){return t=~t,e?e=~e+1:t+=1,wv(e,t)}const N6=e=>{const t=String(e);return"0000000".slice(t.length)+t};function M6(e,t){if(e>=0){for(;e>127;)t.push(e&127|128),e=e>>>7;t.push(e)}else{for(let n=0;n<9;n++)t.push(e&127|128),e=e>>7;t.push(1)}}function tM(){let e=this.buf[this.pos++],t=e&127;if(!(e&128))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<7,!(e&128))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<14,!(e&128))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<21,!(e&128))return this.assertBounds(),t;e=this.buf[this.pos++],t|=(e&15)<<28;for(let n=5;e&128&&n<10;n++)e=this.buf[this.pos++];if(e&128)throw new Error("invalid varint");return this.assertBounds(),t>>>0}var j6={};const ui=nM();function nM(){const e=new DataView(new ArrayBuffer(8));if(typeof BigInt=="function"&&typeof e.getBigInt64=="function"&&typeof e.getBigUint64=="function"&&typeof e.setBigInt64=="function"&&typeof e.setBigUint64=="function"&&(typeof process!="object"||typeof j6!="object"||j6.BUF_BIGINT_DISABLE!=="1")){const n=BigInt("-9223372036854775808"),r=BigInt("9223372036854775807"),i=BigInt("0"),o=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(s){const a=typeof s=="bigint"?s:BigInt(s);if(a>r||ao||a>>0)}raw(t){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(t),this}uint32(t){for(U6(t);t>127;)this.buf.push(t&127|128),t=t>>>7;return this.buf.push(t),this}int32(t){return Vm(t),M6(t,this.buf),this}bool(t){return this.buf.push(t?1:0),this}bytes(t){return this.uint32(t.byteLength),this.raw(t)}string(t){let n=this.encodeUtf8(t);return this.uint32(n.byteLength),this.raw(n)}float(t){lM(t);let n=new Uint8Array(4);return new DataView(n.buffer).setFloat32(0,t,!0),this.raw(n)}double(t){let n=new Uint8Array(8);return new DataView(n.buffer).setFloat64(0,t,!0),this.raw(n)}fixed32(t){U6(t);let n=new Uint8Array(4);return new DataView(n.buffer).setUint32(0,t,!0),this.raw(n)}sfixed32(t){Vm(t);let n=new Uint8Array(4);return new DataView(n.buffer).setInt32(0,t,!0),this.raw(n)}sint32(t){return Vm(t),t=(t<<1^t>>31)>>>0,M6(t,this.buf),this}sfixed64(t){let n=new Uint8Array(8),r=new DataView(n.buffer),i=ui.enc(t);return r.setInt32(0,i.lo,!0),r.setInt32(4,i.hi,!0),this.raw(n)}fixed64(t){let n=new Uint8Array(8),r=new DataView(n.buffer),i=ui.uEnc(t);return r.setInt32(0,i.lo,!0),r.setInt32(4,i.hi,!0),this.raw(n)}int64(t){let n=ui.enc(t);return zm(n.lo,n.hi,this.buf),this}sint64(t){let n=ui.enc(t),r=n.hi>>31,i=n.lo<<1^r,o=(n.hi<<1|n.lo>>>31)^r;return zm(i,o,this.buf),this}uint64(t){let n=ui.uEnc(t);return zm(n.lo,n.hi,this.buf),this}}class hs{constructor(t,n=UE().decodeUtf8){this.decodeUtf8=n,this.varint64=QN,this.uint32=tM,this.buf=t,this.len=t.length,this.pos=0,this.view=new DataView(t.buffer,t.byteOffset,t.byteLength)}tag(){let t=this.uint32(),n=t>>>3,r=t&7;if(n<=0||r<0||r>5)throw new Error("illegal tag: field no "+n+" wire type "+r);return[n,r]}skip(t,n){let r=this.pos;switch(t){case jo.Varint:for(;this.buf[this.pos++]&128;);break;case jo.Bit64:this.pos+=4;case jo.Bit32:this.pos+=4;break;case jo.LengthDelimited:let i=this.uint32();this.pos+=i;break;case jo.StartGroup:for(;;){const[o,s]=this.tag();if(s===jo.EndGroup){if(n!==void 0&&o!==n)throw new Error("invalid end group tag");break}this.skip(s,o)}break;default:throw new Error("cant skip wire type "+t)}return this.assertBounds(),this.buf.subarray(r,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let t=this.uint32();return t>>>1^-(t&1)}int64(){return ui.dec(...this.varint64())}uint64(){return ui.uDec(...this.varint64())}sint64(){let[t,n]=this.varint64(),r=-(t&1);return t=(t>>>1|(n&1)<<31)^r,n=n>>>1^r,ui.dec(t,n)}bool(){let[t,n]=this.varint64();return t!==0||n!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return ui.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return ui.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let t=this.uint32(),n=this.pos;return this.pos+=t,this.assertBounds(),this.buf.subarray(n,n+t)}string(){return this.decodeUtf8(this.bytes())}}function Vm(e){if(typeof e=="string")e=Number(e);else if(typeof e!="number")throw new Error("invalid int32: "+typeof e);if(!Number.isInteger(e)||e>sM||eoM||e<0)throw new Error("invalid uint32: "+e)}function lM(e){if(typeof e=="string"){const t=e;if(e=Number(e),isNaN(e)&&t!=="NaN")throw new Error("invalid float32: "+t)}else if(typeof e!="number")throw new Error("invalid float32: "+typeof e);if(Number.isFinite(e)&&(e>rM||e>>3){case 1:if(o!==8)break;i.type=n.uint32();continue;case 2:if(o!==18)break;i.category=n.string();continue;case 3:if(o!==26)break;i.sender=n.string();continue;case 4:if(o!==34)break;i.recipients.push(n.string());continue;case 5:if(o!==42)break;i.data=n.bytes();continue;case 6:if(o!==50)break;i.salt=n.bytes();continue;case 7:if(o!==58)break;i.apiToken=n.bytes();continue;case 8:if(o!==66)break;i.signature=n.bytes();continue;case 9:if(o!==74)break;i.fee=n.string();continue}if((o&7)===4||o===0)break;n.skip(o&7)}return i},fromJSON(e){return{type:Oo(e.type)?globalThis.Number(e.type):0,category:Oo(e.category)?globalThis.String(e.category):"",sender:Oo(e.sender)?globalThis.String(e.sender):"",recipients:globalThis.Array.isArray(e==null?void 0:e.recipients)?e.recipients.map(t=>globalThis.String(t)):[],data:Oo(e.data)?Xd(e.data):new Uint8Array(0),salt:Oo(e.salt)?Xd(e.salt):new Uint8Array(0),apiToken:Oo(e.apiToken)?Xd(e.apiToken):new Uint8Array(0),signature:Oo(e.signature)?Xd(e.signature):new Uint8Array(0),fee:Oo(e.fee)?globalThis.String(e.fee):""}},toJSON(e){var n;const t={};return e.type!==0&&(t.type=Math.round(e.type)),e.category!==""&&(t.category=e.category),e.sender!==""&&(t.sender=e.sender),(n=e.recipients)!=null&&n.length&&(t.recipients=e.recipients),e.data.length!==0&&(t.data=Yd(e.data)),e.salt.length!==0&&(t.salt=Yd(e.salt)),e.apiToken.length!==0&&(t.apiToken=Yd(e.apiToken)),e.signature.length!==0&&(t.signature=Yd(e.signature)),e.fee!==""&&(t.fee=e.fee),t},create(e){return wu.fromPartial(e??{})},fromPartial(e){var n;const t=H6();return t.type=e.type??0,t.category=e.category??"",t.sender=e.sender??"",t.recipients=((n=e.recipients)==null?void 0:n.map(r=>r))||[],t.data=e.data??new Uint8Array(0),t.salt=e.salt??new Uint8Array(0),t.apiToken=e.apiToken??new Uint8Array(0),t.signature=e.signature??new Uint8Array(0),t.fee=e.fee??"",t}};function Xd(e){if(globalThis.Buffer)return Uint8Array.from(globalThis.Buffer.from(e,"base64"));{const t=globalThis.atob(e),n=new Uint8Array(t.length);for(let r=0;r{t.push(globalThis.String.fromCharCode(n))}),globalThis.btoa(t.join(""))}}function Oo(e){return e!=null}const cM=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function uM(e){return typeof e=="string"&&cM.test(e)}function fM(e){if(!uM(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=t&255,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=t&255,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=t&255,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=t&255,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=t&255,n}var cn=[];for(var qm=0;qm<256;++qm)cn.push((qm+256).toString(16).slice(1));function dM(e,t=0){return(cn[e[t+0]]+cn[e[t+1]]+cn[e[t+2]]+cn[e[t+3]]+"-"+cn[e[t+4]]+cn[e[t+5]]+"-"+cn[e[t+6]]+cn[e[t+7]]+"-"+cn[e[t+8]]+cn[e[t+9]]+"-"+cn[e[t+10]]+cn[e[t+11]]+cn[e[t+12]]+cn[e[t+13]]+cn[e[t+14]]+cn[e[t+15]]).toLowerCase()}var Qd,hM=new Uint8Array(16);function pM(){if(!Qd&&(Qd=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Qd))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Qd(hM)}var mM=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const z6={randomUUID:mM};function gM(e,t,n){if(z6.randomUUID&&!t&&!e)return z6.randomUUID();e=e||{};var r=e.random||(e.rng||pM)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,dM(r)}var Qs=(e=>(e.INIT_DID="INIT_DID",e.INIT_SESSION_KEY="INIT_SESSION_KEY",e))(Qs||{});function W6(){return{did:"",masterPubKey:"",derivedKeyIndex:0,derivedPubKey:"",walletToEncDerivedKey:{}}}const xh={encode(e,t=new A0){return e.did!==""&&t.uint32(10).string(e.did),e.masterPubKey!==""&&t.uint32(18).string(e.masterPubKey),e.derivedKeyIndex!==0&&t.uint32(24).uint32(e.derivedKeyIndex),e.derivedPubKey!==""&&t.uint32(34).string(e.derivedPubKey),Object.entries(e.walletToEncDerivedKey).forEach(([n,r])=>{Z1.encode({key:n,value:r},t.uint32(50).fork()).join()}),t},decode(e,t){const n=e instanceof hs?e:new hs(e);let r=t===void 0?n.len:n.pos+t;const i=W6();for(;n.pos>>3){case 1:if(o!==10)break;i.did=n.string();continue;case 2:if(o!==18)break;i.masterPubKey=n.string();continue;case 3:if(o!==24)break;i.derivedKeyIndex=n.uint32();continue;case 4:if(o!==34)break;i.derivedPubKey=n.string();continue;case 6:if(o!==50)break;const s=Z1.decode(n,n.uint32());s.value!==void 0&&(i.walletToEncDerivedKey[s.key]=s.value);continue}if((o&7)===4||o===0)break;n.skip(o&7)}return i},fromJSON(e){return{did:fl(e.did)?globalThis.String(e.did):"",masterPubKey:fl(e.masterPubKey)?globalThis.String(e.masterPubKey):"",derivedKeyIndex:fl(e.derivedKeyIndex)?globalThis.Number(e.derivedKeyIndex):0,derivedPubKey:fl(e.derivedPubKey)?globalThis.String(e.derivedPubKey):"",walletToEncDerivedKey:yM(e.walletToEncDerivedKey)?Object.entries(e.walletToEncDerivedKey).reduce((t,[n,r])=>(t[n]=String(r),t),{}):{}}},toJSON(e){const t={};if(e.did!==""&&(t.did=e.did),e.masterPubKey!==""&&(t.masterPubKey=e.masterPubKey),e.derivedKeyIndex!==0&&(t.derivedKeyIndex=Math.round(e.derivedKeyIndex)),e.derivedPubKey!==""&&(t.derivedPubKey=e.derivedPubKey),e.walletToEncDerivedKey){const n=Object.entries(e.walletToEncDerivedKey);n.length>0&&(t.walletToEncDerivedKey={},n.forEach(([r,i])=>{t.walletToEncDerivedKey[r]=i}))}return t},create(e){return xh.fromPartial(e??{})},fromPartial(e){const t=W6();return t.did=e.did??"",t.masterPubKey=e.masterPubKey??"",t.derivedKeyIndex=e.derivedKeyIndex??0,t.derivedPubKey=e.derivedPubKey??"",t.walletToEncDerivedKey=Object.entries(e.walletToEncDerivedKey??{}).reduce((n,[r,i])=>(i!==void 0&&(n[r]=globalThis.String(i)),n),{}),t}};function V6(){return{key:"",value:""}}const Z1={encode(e,t=new A0){return e.key!==""&&t.uint32(10).string(e.key),e.value!==""&&t.uint32(18).string(e.value),t},decode(e,t){const n=e instanceof hs?e:new hs(e);let r=t===void 0?n.len:n.pos+t;const i=V6();for(;n.pos>>3){case 1:if(o!==10)break;i.key=n.string();continue;case 2:if(o!==18)break;i.value=n.string();continue}if((o&7)===4||o===0)break;n.skip(o&7)}return i},fromJSON(e){return{key:fl(e.key)?globalThis.String(e.key):"",value:fl(e.value)?globalThis.String(e.value):""}},toJSON(e){const t={};return e.key!==""&&(t.key=e.key),e.value!==""&&(t.value=e.value),t},create(e){return Z1.fromPartial(e??{})},fromPartial(e){const t=V6();return t.key=e.key??"",t.value=e.value??"",t}};function yM(e){return typeof e=="object"&&e!==null}function fl(e){return e!=null}function bM(e){switch(e){case 0:case"PUBLISH_KEY":return 0;case 1:case"REVOKE_KEY":return 1;case-1:case"UNRECOGNIZED":default:return-1}}function vM(e){switch(e){case 0:return"PUBLISH_KEY";case 1:return"REVOKE_KEY";case-1:default:return"UNRECOGNIZED"}}function q6(){return{keyIndex:0,keyAddress:"",action:0}}const Eh={encode(e,t=new A0){return e.keyIndex!==0&&t.uint32(8).int32(e.keyIndex),e.keyAddress!==""&&t.uint32(18).string(e.keyAddress),e.action!==0&&t.uint32(24).int32(e.action),t},decode(e,t){const n=e instanceof hs?e:new hs(e);let r=t===void 0?n.len:n.pos+t;const i=q6();for(;n.pos>>3){case 1:if(o!==8)break;i.keyIndex=n.int32();continue;case 2:if(o!==18)break;i.keyAddress=n.string();continue;case 3:if(o!==24)break;i.action=n.int32();continue}if((o&7)===4||o===0)break;n.skip(o&7)}return i},fromJSON(e){return{keyIndex:Gm(e.keyIndex)?globalThis.Number(e.keyIndex):0,keyAddress:Gm(e.keyAddress)?globalThis.String(e.keyAddress):"",action:Gm(e.action)?bM(e.action):0}},toJSON(e){const t={};return e.keyIndex!==0&&(t.keyIndex=Math.round(e.keyIndex)),e.keyAddress!==""&&(t.keyAddress=e.keyAddress),e.action!==0&&(t.action=vM(e.action)),t},create(e){return Eh.fromPartial(e??{})},fromPartial(e){const t=q6();return t.keyIndex=e.keyIndex??0,t.keyAddress=e.keyAddress??"",t.action=e.action??0,t}};function Gm(e){return e!=null}const[wM,_M]=Me.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),Ro=new Uint32Array(80),Lo=new Uint32Array(80);class xM extends Zb{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:t,Al:n,Bh:r,Bl:i,Ch:o,Cl:s,Dh:a,Dl:l,Eh:u,El:d,Fh:c,Fl:f,Gh:m,Gl:p,Hh:h,Hl:y}=this;return[t,n,r,i,o,s,a,l,u,d,c,f,m,p,h,y]}set(t,n,r,i,o,s,a,l,u,d,c,f,m,p,h,y){this.Ah=t|0,this.Al=n|0,this.Bh=r|0,this.Bl=i|0,this.Ch=o|0,this.Cl=s|0,this.Dh=a|0,this.Dl=l|0,this.Eh=u|0,this.El=d|0,this.Fh=c|0,this.Fl=f|0,this.Gh=m|0,this.Gl=p|0,this.Hh=h|0,this.Hl=y|0}process(t,n){for(let v=0;v<16;v++,n+=4)Ro[v]=t.getUint32(n),Lo[v]=t.getUint32(n+=4);for(let v=16;v<80;v++){const w=Ro[v-15]|0,E=Lo[v-15]|0,C=Me.rotrSH(w,E,1)^Me.rotrSH(w,E,8)^Me.shrSH(w,E,7),k=Me.rotrSL(w,E,1)^Me.rotrSL(w,E,8)^Me.shrSL(w,E,7),_=Ro[v-2]|0,S=Lo[v-2]|0,A=Me.rotrSH(_,S,19)^Me.rotrBH(_,S,61)^Me.shrSH(_,S,6),I=Me.rotrSL(_,S,19)^Me.rotrBL(_,S,61)^Me.shrSL(_,S,6),L=Me.add4L(k,I,Lo[v-7],Lo[v-16]),F=Me.add4H(L,C,A,Ro[v-7],Ro[v-16]);Ro[v]=F|0,Lo[v]=L|0}let{Ah:r,Al:i,Bh:o,Bl:s,Ch:a,Cl:l,Dh:u,Dl:d,Eh:c,El:f,Fh:m,Fl:p,Gh:h,Gl:y,Hh:g,Hl:b}=this;for(let v=0;v<80;v++){const w=Me.rotrSH(c,f,14)^Me.rotrSH(c,f,18)^Me.rotrBH(c,f,41),E=Me.rotrSL(c,f,14)^Me.rotrSL(c,f,18)^Me.rotrBL(c,f,41),C=c&m^~c&h,k=f&p^~f&y,_=Me.add5L(b,E,k,_M[v],Lo[v]),S=Me.add5H(_,g,w,C,wM[v],Ro[v]),A=_|0,I=Me.rotrSH(r,i,28)^Me.rotrBH(r,i,34)^Me.rotrBH(r,i,39),L=Me.rotrSL(r,i,28)^Me.rotrBL(r,i,34)^Me.rotrBL(r,i,39),F=r&o^r&a^o&a,N=i&s^i&l^s&l;g=h|0,b=y|0,h=m|0,y=p|0,m=c|0,p=f|0,{h:c,l:f}=Me.add(u|0,d|0,S|0,A|0),u=a|0,d=l|0,a=o|0,l=s|0,o=r|0,s=i|0;const R=Me.add3L(A,L,N);r=Me.add3H(R,S,I,F),i=R|0}({h:r,l:i}=Me.add(this.Ah|0,this.Al|0,r|0,i|0)),{h:o,l:s}=Me.add(this.Bh|0,this.Bl|0,o|0,s|0),{h:a,l}=Me.add(this.Ch|0,this.Cl|0,a|0,l|0),{h:u,l:d}=Me.add(this.Dh|0,this.Dl|0,u|0,d|0),{h:c,l:f}=Me.add(this.Eh|0,this.El|0,c|0,f|0),{h:m,l:p}=Me.add(this.Fh|0,this.Fl|0,m|0,p|0),{h,l:y}=Me.add(this.Gh|0,this.Gl|0,h|0,y|0),{h:g,l:b}=Me.add(this.Hh|0,this.Hl|0,g|0,b|0),this.set(r,i,o,s,a,l,u,d,c,f,m,p,h,y,g,b)}roundClean(){Ro.fill(0),Lo.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const G6=u0(()=>new xM);/*! scure-bip32 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) */const Jd=Mn.ProjectivePoint,Km=ex(y0);function K6(e){return BigInt(`0x${CO(e)}`)}function EM(e){return AO(e.toString(16).padStart(64,"0"))}const SM=f8("Bitcoin seed"),Zm={private:76066276,public:76067358},Xm=2147483648,kM=e=>kB(y0(e)),CM=e=>_l(e).getUint32(0,!1),eh=e=>{if(!Number.isSafeInteger(e)||e<0||e>2**32-1)throw new Error(`Invalid number=${e}. Should be from 0 to 2 ** 32 - 1`);const t=new Uint8Array(4);return _l(t).setUint32(0,e,!1),t};class qs{get fingerprint(){if(!this.pubHash)throw new Error("No publicKey set!");return CM(this.pubHash)}get identifier(){return this.pubHash}get pubKeyHash(){return this.pubHash}get privateKey(){return this.privKeyBytes||null}get publicKey(){return this.pubKey||null}get privateExtendedKey(){const t=this.privateKey;if(!t)throw new Error("No private key");return Km.encode(this.serialize(this.versions.private,vu(new Uint8Array([0]),t)))}get publicExtendedKey(){if(!this.pubKey)throw new Error("No public key");return Km.encode(this.serialize(this.versions.public,this.pubKey))}static fromMasterSeed(t,n=Zm){if(Hr(t),8*t.length<128||8*t.length>512)throw new Error(`HDKey: wrong seed length=${t.length}. Should be between 128 and 512 bits; 256 bits is advised)`);const r=dp(G6,SM,t);return new qs({versions:n,chainCode:r.slice(32),privateKey:r.slice(0,32)})}static fromExtendedKey(t,n=Zm){const r=Km.decode(t),i=_l(r),o=i.getUint32(0,!1),s={versions:n,depth:r[4],parentFingerprint:i.getUint32(5,!1),index:i.getUint32(9,!1),chainCode:r.slice(13,45)},a=r.slice(45),l=a[0]===0;if(o!==n[l?"private":"public"])throw new Error("Version mismatch");return l?new qs({...s,privateKey:a.slice(1)}):new qs({...s,publicKey:a})}static fromJSON(t){return qs.fromExtendedKey(t.xpriv)}constructor(t){if(this.depth=0,this.index=0,this.chainCode=null,this.parentFingerprint=0,!t||typeof t!="object")throw new Error("HDKey.constructor must not be called directly");if(this.versions=t.versions||Zm,this.depth=t.depth||0,this.chainCode=t.chainCode||null,this.index=t.index||0,this.parentFingerprint=t.parentFingerprint||0,!this.depth&&(this.parentFingerprint||this.index))throw new Error("HDKey: zero depth with non-zero index/parent fingerprint");if(t.publicKey&&t.privateKey)throw new Error("HDKey: publicKey and privateKey at same time.");if(t.privateKey){if(!Mn.utils.isValidPrivateKey(t.privateKey))throw new Error("Invalid private key");this.privKey=typeof t.privateKey=="bigint"?t.privateKey:K6(t.privateKey),this.privKeyBytes=EM(this.privKey),this.pubKey=Mn.getPublicKey(t.privateKey,!0)}else if(t.publicKey)this.pubKey=Jd.fromHex(t.publicKey).toRawBytes(!0);else throw new Error("HDKey: no public or private key provided");this.pubHash=kM(this.pubKey)}derive(t){if(!/^[mM]'?/.test(t))throw new Error('Path must start with "m" or "M"');if(/^[mM]'?$/.test(t))return this;const n=t.replace(/^[mM]'?\//,"").split("/");let r=this;for(const i of n){const o=/^(\d+)('?)$/.exec(i),s=o&&o[1];if(!o||o.length!==3||typeof s!="string")throw new Error(`Invalid child index: ${i}`);let a=+s;if(!Number.isSafeInteger(a)||a>=Xm)throw new Error("Invalid index");o[2]==="'"&&(a+=Xm),r=r.deriveChild(a)}return r}deriveChild(t){if(!this.pubKey||!this.chainCode)throw new Error("No publicKey or chainCode set");let n=eh(t);if(t>=Xm){const a=this.privateKey;if(!a)throw new Error("Could not derive hardened child key");n=vu(new Uint8Array([0]),a,n)}else n=vu(this.pubKey,n);const r=dp(G6,this.chainCode,n),i=K6(r.slice(0,32)),o=r.slice(32);if(!Mn.utils.isValidPrivateKey(i))throw new Error("Tweak bigger than curve order");const s={versions:this.versions,chainCode:o,depth:this.depth+1,parentFingerprint:this.fingerprint,index:t};try{if(this.privateKey){const a=In(this.privKey+i,Mn.CURVE.n);if(!Mn.utils.isValidPrivateKey(a))throw new Error("The tweak was out of range or the resulted private key is invalid");s.privateKey=a}else{const a=Jd.fromHex(this.pubKey).add(Jd.fromPrivateKey(i));if(a.equals(Jd.ZERO))throw new Error("The tweak was equal to negative P, which made the result key invalid");s.publicKey=a.toRawBytes(!0)}return new qs(s)}catch{return this.deriveChild(t+1)}}sign(t){if(!this.privateKey)throw new Error("No privateKey set!");return Hr(t,32),Mn.sign(t,this.privKey).toCompactRawBytes()}verify(t,n){if(Hr(t,32),Hr(n,64),!this.publicKey)throw new Error("No publicKey set!");let r;try{r=Mn.Signature.fromCompact(n)}catch{return!1}return Mn.verify(r,t,this.publicKey)}wipePrivateData(){return this.privKey=void 0,this.privKeyBytes&&(this.privKeyBytes.fill(0),this.privKeyBytes=void 0),this}toJSON(){return{xpriv:this.privateExtendedKey,xpub:this.publicExtendedKey}}serialize(t,n){if(!this.chainCode)throw new Error("No chainCode set");return Hr(n,33),vu(eh(t),new Uint8Array([this.depth]),eh(this.parentFingerprint),eh(this.index),this.chainCode,n)}}function AM(e){if(typeof e=="string"){if(!on(e,{strict:!1}))throw new Pn({address:e});return{address:e,type:"json-rpc"}}if(!on(e.address,{strict:!1}))throw new Pn({address:e.address});return{address:e.address,nonceManager:e.nonceManager,sign:e.sign,experimental_signAuthorization:e.experimental_signAuthorization,signMessage:e.signMessage,signTransaction:e.signTransaction,signTypedData:e.signTypedData,source:"custom",type:"local"}}async function hd({hash:e,privateKey:t,to:n="object"}){const{r,s:i,recovery:o}=Mn.sign(e.slice(2),t.slice(2)),s={r:Ae(r,{size:32}),s:Ae(i,{size:32}),v:o?28n:27n,yParity:o};return n==="bytes"||n==="hex"?NE({...s,to:n}):s}async function TM(e){const{contractAddress:t,chainId:n,nonce:r,privateKey:i,to:o="object"}=e,s=await hd({hash:R8({contractAddress:t,chainId:n,nonce:r}),privateKey:i,to:o});return o==="object"?{contractAddress:t,chainId:n,nonce:r,...s}:s}async function IM({message:e,privateKey:t}){return await hd({hash:fv(e),privateKey:t,to:"hex"})}async function $M(e){const{privateKey:t,transaction:n,serializer:r=BB}=e,i=n.type==="eip4844"?{...n,sidecars:!1}:n,o=await hd({hash:zt(r(i)),privateKey:t});return r(n,o)}async function PM(e){const{privateKey:t,...n}=e;return await hd({hash:gE(n),privateKey:t,to:"hex"})}function HE(e,t={}){const{nonceManager:n}=t,r=Te(Mn.getPublicKey(e.slice(2),!1)),i=I8(r);return{...AM({address:i,nonceManager:n,async sign({hash:s}){return hd({hash:s,privateKey:e,to:"hex"})},async experimental_signAuthorization(s){return TM({...s,privateKey:e})},async signMessage({message:s}){return IM({message:s,privateKey:e})},async signTransaction(s,{serializer:a}={}){return $M({privateKey:e,transaction:s,serializer:a})},async signTypedData(s){return PM({...s,privateKey:e})}}),publicKey:r,source:"privateKey"}}function OM(e,{accountIndex:t=0,addressIndex:n=0,changeIndex:r=0,path:i,...o}={}){const s=e.derive(i||`m/44'/60'/${t}'/${r}/${n}`);return{...HE(Te(s.privateKey),o),getHdKey:()=>s,source:"hd"}}function th(e,t={}){const n=PT(e);return OM(qs.fromMasterSeed(n),t)}const Rr=class Rr{constructor(t){Se(this,"createUnsigned",(t,n,r)=>wu.create({type:0,category:t,recipients:n,data:r,salt:fM(gM()),fee:"0"}));Se(this,"get",async(t=Math.floor(Date.now()/1e3),n="ASC",r=30,i=1,o)=>await this.validator.call("push_getTransactions",[t,n,r,i,o]));Se(this,"search",async t=>await this.validator.call("push_getTransactionByHash",[t]));Se(this,"send",async(t,n)=>{const r=await this.validator.call("push_getApiToken");let i;if(n){const o=Rr.serialize({...t,sender:n.sender,signature:new Uint8Array(0),apiToken:new Uint8Array(Buffer.from(r.apiToken,"base64"))}),a=await HE(n.privKey).signMessage({message:{raw:o}});i=Rr.serialize({...t,sender:n.sender,signature:Sr(a),apiToken:pb(Buffer.from(r.apiToken,"base64").toString("utf-8"))})}else i=Rr.serialize(t);return await this.validator.call("push_sendTransaction",[nr(i)],r.apiUrl)});this.validator=t}};Se(Rr,"initialize",async t=>{const n=await Pf.initalize({env:t});return new Rr(n)}),Se(Rr,"serialize",t=>{const n=wu.create(t);return wu.encode(n).finish()}),Se(Rr,"deserialize",t=>wu.decode(t)),Se(Rr,"serializeData",(t,n)=>{switch(n){case Qs.INIT_DID:{const r=t,i=xh.create(r);return xh.encode(i).finish()}case Qs.INIT_SESSION_KEY:{const r=t,i=Eh.create(r);return Eh.encode(i).finish()}default:throw new Error("Serialization Not Supported for given TxCateory")}}),Se(Rr,"deserializeData",(t,n)=>{switch(n){case Qs.INIT_DID:return xh.decode(t);case Qs.INIT_SESSION_KEY:return Eh.decode(t);default:throw new Error("Deserialization Not Supported for given TxCateory")}});let hp=Rr;var Of={};Object.defineProperty(Of,"__esModule",{value:!0});var _u=Of.bech32m=Of.bech32=void 0;const pp="qpzry9x8gf2tvdw0s3jn54khce6mua7l",zE={};for(let e=0;e>25;return(e&33554431)<<5^-(t>>0&1)&996825010^-(t>>1&1)&642813549^-(t>>2&1)&513874426^-(t>>3&1)&1027748829^-(t>>4&1)&705979059}function Z6(e){let t=1;for(let n=0;n126)return"Invalid prefix ("+e+")";t=Sl(t)^r>>5}t=Sl(t);for(let n=0;n=n;)o-=n,a.push(i>>o&s);if(r)o>0&&a.push(i<=t)return"Excess padding";if(i<l)throw new TypeError("Exceeds length limit");s=s.toLowerCase();let u=Z6(s);if(typeof u=="string")throw new Error(u);let d=s+"1";for(let c=0;c>5)throw new Error("Non 5-bit word");u=Sl(u)^f,d+=pp.charAt(f)}for(let c=0;c<6;++c)u=Sl(u);u^=t;for(let c=0;c<6;++c){const f=u>>(5-c)*5&31;d+=pp.charAt(f)}return d}function r(s,a){if(a=a||90,s.length<8)return s+" too short";if(s.length>a)return"Exceeds length limit";const l=s.toLowerCase(),u=s.toUpperCase();if(s!==l&&s!==u)return"Mixed-case string "+s;s=l;const d=s.lastIndexOf("1");if(d===-1)return"No separator character for "+s;if(d===0)return"Missing prefix for "+s;const c=s.slice(0,d),f=s.slice(d+1);if(f.length<6)return"Data too short";let m=Z6(c);if(typeof m=="string")return m;const p=[];for(let h=0;h=f.length)&&p.push(g)}return m!==t?"Invalid checksum for "+s:{prefix:c,words:p}}function i(s,a){const l=r(s,a);if(typeof l=="object")return l}function o(s,a){const l=r(s,a);if(typeof l=="object")return l;throw new Error(l)}return{decodeUnsafe:i,decode:o,encode:n,toWords:RM,fromWordsUnsafe:LM,fromWords:BM}}Of.bech32=WE("bech32");_u=Of.bech32m=WE("bech32m");var Sh=(e=>(e.DEVNET="devnet",e.TESTNET="testnet",e.MAINNET="mainnet",e))(Sh||{});const NM="push";class Js{}Se(Js,"evmToPush",t=>{try{const n=_u.toWords(Hs(fp(t).slice(2)));return _u.encode(NM,n)}catch{throw new Error("Invalid EVM address")}}),Se(Js,"pushToEvm",t=>{try{const n=_u.decode(t),r=new Uint8Array(_u.fromWords(n.words));return fp(`0x${nr(r)}`)}catch{throw new Error("Invalid Push address")}}),Se(Js,"toPushCAIP",(t,n=zr.STAGING)=>{let r;switch(n){case zr.LOCAL:case zr.DEV:{r=Sh.DEVNET;break}case zr.STAGING:{r=Sh.TESTNET;break}case zr.PROD:{r=Sh.MAINNET;break}default:throw Error("Invalid ENV")}return`push:${r}:${t}`});const Uu=class Uu{};Se(Uu,"initialize",async t=>Uu.convertViemWalletClient(t)),Se(Uu,"convertViemWalletClient",async t=>{try{const n=await t.account;if(!n)throw new Error("WalletClient Account Undefined");const r=await t.getChainId(),i=async o=>await t.signMessage({message:o,account:n});return{account:`eip155:${r}:${n.address}`,signMessage:i}}catch{throw new Error("Invalid WalletClient")}});let Nu=Uu;var xu=(e=>(e.V1="x25519-xsalsa20-poly1305",e.V2="aes256GcmHkdfSha256",e.V3="eip191-aes256-gcm-hkdf-sha256",e.V4="pgpv1:nft",e.V5="push:v5",e))(xu||{});const hl=class hl{constructor(t){Se(this,"hkdf",async(t,n)=>{const r=await crypto.subtle.importKey("raw",t,"HKDF",!1,["deriveKey"]);return crypto.subtle.deriveKey({name:"HKDF",hash:"SHA-256",salt:n,info:new ArrayBuffer(0)},r,{name:"AES-GCM",length:256},!0,["encrypt","decrypt"])});Se(this,"aesGcmEncryption",async(t,n,r)=>{const s=crypto.getRandomValues(new Uint8Array(32)),a=crypto.getRandomValues(new Uint8Array(12)),l=await this.hkdf(n,s),u={name:"AES-GCM",iv:a};r&&(u.additionalData=r);const d=await crypto.subtle.encrypt(u,l,t);return{ciphertext:nr(new Uint8Array(d)),salt:nr(s),nonce:nr(a)}});Se(this,"aesGcmDecryption",async(t,n,r)=>{const i=await this.hkdf(n,Hs(t.salt)),o={name:"AES-GCM",iv:Hs(t.nonce)};r&&(o.additionalData=r);const s=await crypto.subtle.decrypt(o,i,Hs(t.ciphertext));return new Uint8Array(s)});Se(this,"encryptV5",async t=>{const n=nr(await crypto.getRandomValues(new Uint8Array(32))),r=`Enable Push Network Profile @@ -2171,7 +2171,7 @@ Try polyfilling it using "@formatjs/intl-pluralrules" `,Ql.MISSING_INTL_API,s);var w=n.getPluralRules(t,{type:d.pluralType}).select(f-(d.offset||0));v=d.options[w]||d.options.other}if(!v)throw new d_(d.value,f,Object.keys(d.options),s);a.push.apply(a,Ch(v.value,t,n,r,i,f-(d.offset||0)));continue}}return qD(a)}function KD(e,t){return t?ot(ot(ot({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=ot(ot({},e[r]),t[r]||{}),n},{})):e}function ZD(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=KD(e[r],t[r]),n},ot({},e)):e}function ig(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function XD(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:ng(function(){for(var t,n=[],r=0;r0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])},e.__parse=MD,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();function YD(e,t){if(t==null)return;if(t in e)return e[t];const n=t.split(".");let r=e;for(let i=0;i0){const o=n.slice(i,n.length).join(".");if(o in r){r=r[o];break}}r=r[n[i]]}else r=void 0;return r}const qo={},QD=(e,t,n)=>n&&(t in qo||(qo[t]={}),e in qo[t]||(qo[t][e]=n),n),L7=(e,t)=>{if(t==null)return;if(t in qo&&e in qo[t])return qo[t][e];const n=yd(t);for(let r=0;r(n[e]=aD.all([n[e]||{},...t]),n))}pc([gd],([e])=>Object.keys(e));gd.subscribe(e=>Ov=e);const Th={};function nF(e,t){Th[e].delete(t),Th[e].size===0&&delete Th[e]}function N7(e){return Th[e]}function rF(e){return yd(e).map(t=>{const n=N7(t);return[t,n?[...n]:[]]}).filter(([,t])=>t.length>0)}function gp(e){return e==null?!1:yd(e).some(t=>{var n;return(n=N7(t))==null?void 0:n.size})}function iF(e,t){return Promise.all(t.map(r=>(nF(e,r),r().then(i=>i.default||i)))).then(r=>Ah(e,...r))}const cu={};function M7(e){if(!gp(e))return e in cu?cu[e]:Promise.resolve();const t=rF(e);return cu[e]=Promise.all(t.map(([n,r])=>iF(n,r))).then(()=>{if(gp(e))return M7(e);delete cu[e]}),cu[e]}var h_=Object.getOwnPropertySymbols,oF=Object.prototype.hasOwnProperty,sF=Object.prototype.propertyIsEnumerable,aF=(e,t)=>{var n={};for(var r in e)oF.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&h_)for(var r of h_(e))t.indexOf(r)<0&&sF.call(e,r)&&(n[r]=e[r]);return n};const lF={number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}};function cF({locale:e,id:t}){console.warn(`[svelte-i18n] The message "${t}" was not found in "${yd(e).join('", "')}".${gp(_s())?` Note: there are at least one loader still registered to this locale that wasn't executed.`:""}`)}const uF={fallbackLocale:null,loadingDelay:200,formats:lF,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},Eu=uF;function Jl(){return Eu}function fF(e){const t=e,{formats:n}=t,r=aF(t,["formats"]);let i=e.fallbackLocale;if(e.initialLocale)try{R7.resolveLocale(e.initialLocale)&&(i=e.initialLocale)}catch{console.warn(`[svelte-i18n] The initial locale "${e.initialLocale}" is not a valid locale.`)}return r.warnOnMissingMessages&&(delete r.warnOnMissingMessages,r.handleMissingMessage==null?r.handleMissingMessage=cF:console.warn('[svelte-i18n] The "warnOnMissingMessages" option is deprecated. Please use the "handleMissingMessage" option instead.')),Object.assign(Eu,r,{initialLocale:i}),n&&("number"in n&&Object.assign(Eu.formats.number,n.number),"date"in n&&Object.assign(Eu.formats.date,n.date),"time"in n&&Object.assign(Eu.formats.time,n.time)),Ta.set(i)}const og=$0(!1);var dF=Object.defineProperty,hF=Object.defineProperties,pF=Object.getOwnPropertyDescriptors,p_=Object.getOwnPropertySymbols,mF=Object.prototype.hasOwnProperty,gF=Object.prototype.propertyIsEnumerable,m_=(e,t,n)=>t in e?dF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yF=(e,t)=>{for(var n in t||(t={}))mF.call(t,n)&&m_(e,n,t[n]);if(p_)for(var n of p_(t))gF.call(t,n)&&m_(e,n,t[n]);return e},bF=(e,t)=>hF(e,pF(t));let sy;const yp=$0(null);function g_(e){return e.split("-").map((t,n,r)=>r.slice(0,n+1).join("-")).reverse()}function yd(e,t=Jl().fallbackLocale){const n=g_(e);return t?[...new Set([...n,...g_(t)])]:n}function _s(){return sy??void 0}yp.subscribe(e=>{sy=e??void 0,typeof window<"u"&&e!=null&&document.documentElement.setAttribute("lang",e)});const vF=e=>{if(e&&tF(e)&&gp(e)){const{loadingDelay:t}=Jl();let n;return typeof window<"u"&&_s()!=null&&t?n=window.setTimeout(()=>og.set(!0),t):og.set(!0),M7(e).then(()=>{yp.set(e)}).finally(()=>{clearTimeout(n),og.set(!1)})}return yp.set(e)},Ta=bF(yF({},yp),{set:vF}),wF=()=>typeof window>"u"?null:window.navigator.language||window.navigator.languages[0],O0=e=>{const t=Object.create(null);return r=>{const i=JSON.stringify(r);return i in t?t[i]:t[i]=e(r)}};var _F=Object.defineProperty,bp=Object.getOwnPropertySymbols,j7=Object.prototype.hasOwnProperty,D7=Object.prototype.propertyIsEnumerable,y_=(e,t,n)=>t in e?_F(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rv=(e,t)=>{for(var n in t||(t={}))j7.call(t,n)&&y_(e,n,t[n]);if(bp)for(var n of bp(t))D7.call(t,n)&&y_(e,n,t[n]);return e},mc=(e,t)=>{var n={};for(var r in e)j7.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&bp)for(var r of bp(e))t.indexOf(r)<0&&D7.call(e,r)&&(n[r]=e[r]);return n};const Mf=(e,t)=>{const{formats:n}=Jl();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},xF=O0(e=>{var t=e,{locale:n,format:r}=t,i=mc(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return r&&(i=Mf("number",r)),new Intl.NumberFormat(n,i)}),EF=O0(e=>{var t=e,{locale:n,format:r}=t,i=mc(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return r?i=Mf("date",r):Object.keys(i).length===0&&(i=Mf("date","short")),new Intl.DateTimeFormat(n,i)}),SF=O0(e=>{var t=e,{locale:n,format:r}=t,i=mc(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return r?i=Mf("time",r):Object.keys(i).length===0&&(i=Mf("time","short")),new Intl.DateTimeFormat(n,i)}),kF=(e={})=>{var t=e,{locale:n=_s()}=t,r=mc(t,["locale"]);return xF(Rv({locale:n},r))},CF=(e={})=>{var t=e,{locale:n=_s()}=t,r=mc(t,["locale"]);return EF(Rv({locale:n},r))},AF=(e={})=>{var t=e,{locale:n=_s()}=t,r=mc(t,["locale"]);return SF(Rv({locale:n},r))},TF=O0((e,t=_s())=>new R7(e,t,Jl().formats,{ignoreTag:Jl().ignoreTag})),IF=(e,t={})=>{var n,r,i,o;let s=t;typeof e=="object"&&(s=e,e=s.id);const{values:a,locale:l=_s(),default:u}=s;if(l==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let d=L7(e,l);if(!d)d=(o=(i=(r=(n=Jl()).handleMissingMessage)==null?void 0:r.call(n,{locale:l,id:e,defaultValue:u}))!=null?i:u)!=null?o:e;else if(typeof d!="string")return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof d}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),d;if(!a)return d;let c=d;try{c=TF(d,l).format(a)}catch(f){f instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,f.message)}return c},$F=(e,t)=>AF(t).format(e),PF=(e,t)=>CF(t).format(e),OF=(e,t)=>kF(t).format(e),RF=(e,t=_s())=>L7(e,t),xi=pc([Ta,gd],()=>IF);pc([Ta],()=>$F);pc([Ta],()=>PF);pc([Ta],()=>OF);pc([Ta,gd],()=>RF);let F7=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");var U7={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(self,()=>{return n={7629:(i,o,s)=>{const a=s(375),l=s(8571),u=s(9474),d=s(1687),c=s(8652),f=s(8160),m=s(3292),p=s(6354),h=s(8901),y=s(9708),g=s(6914),b=s(2294),v=s(6133),w=s(1152),E=s(8863),C=s(2036),k={Base:class{constructor(_){this.type=_,this.$_root=null,this._definition={},this._reset()}_reset(){this._ids=new b.Ids,this._preferences=null,this._refs=new v.Manager,this._cache=null,this._valids=null,this._invalids=null,this._flags={},this._rules=[],this._singleRules=new Map,this.$_terms={},this.$_temp={ruleset:null,whens:{}}}describe(){return a(typeof y.describe=="function","Manifest functionality disabled"),y.describe(this)}allow(){for(var _=arguments.length,S=new Array(_),A=0;A<_;A++)S[A]=arguments[A];return f.verifyFlat(S,"allow"),this._values(S,"_valids")}alter(_){a(_&&typeof _=="object"&&!Array.isArray(_),"Invalid targets argument"),a(!this._inRuleset(),"Cannot set alterations inside a ruleset");const S=this.clone();S.$_terms.alterations=S.$_terms.alterations||[];for(const A in _){const I=_[A];a(typeof I=="function","Alteration adjuster for",A,"must be a function"),S.$_terms.alterations.push({target:A,adjuster:I})}return S.$_temp.ruleset=!1,S}artifact(_){return a(_!==void 0,"Artifact cannot be undefined"),a(!this._cache,"Cannot set an artifact with a rule cache"),this.$_setFlag("artifact",_)}cast(_){return a(_===!1||typeof _=="string","Invalid to value"),a(_===!1||this._definition.cast[_],"Type",this.type,"does not support casting to",_),this.$_setFlag("cast",_===!1?void 0:_)}default(_,S){return this._default("default",_,S)}description(_){return a(_&&typeof _=="string","Description must be a non-empty string"),this.$_setFlag("description",_)}empty(_){const S=this.clone();return _!==void 0&&(_=S.$_compile(_,{override:!1})),S.$_setFlag("empty",_,{clone:!1})}error(_){return a(_,"Missing error"),a(_ instanceof Error||typeof _=="function","Must provide a valid Error object or a function"),this.$_setFlag("error",_)}example(_){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return a(_!==void 0,"Missing example"),f.assertOptions(S,["override"]),this._inner("examples",_,{single:!0,override:S.override})}external(_,S){return typeof _=="object"&&(a(!S,"Cannot combine options with description"),S=_.description,_=_.method),a(typeof _=="function","Method must be a function"),a(S===void 0||S&&typeof S=="string","Description must be a non-empty string"),this._inner("externals",{method:_,description:S},{single:!0})}failover(_,S){return this._default("failover",_,S)}forbidden(){return this.presence("forbidden")}id(_){return _?(a(typeof _=="string","id must be a non-empty string"),a(/^[^\.]+$/.test(_),"id cannot contain period character"),this.$_setFlag("id",_)):this.$_setFlag("id",void 0)}invalid(){for(var _=arguments.length,S=new Array(_),A=0;A<_;A++)S[A]=arguments[A];return this._values(S,"_invalids")}label(_){return a(_&&typeof _=="string","Label name must be a non-empty string"),this.$_setFlag("label",_)}meta(_){return a(_!==void 0,"Meta cannot be undefined"),this._inner("metas",_,{single:!0})}note(){for(var _=arguments.length,S=new Array(_),A=0;A<_;A++)S[A]=arguments[A];a(S.length,"Missing notes");for(const I of S)a(I&&typeof I=="string","Notes must be non-empty strings");return this._inner("notes",S)}only(){let _=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return a(typeof _=="boolean","Invalid mode:",_),this.$_setFlag("only",_)}optional(){return this.presence("optional")}prefs(_){a(_,"Missing preferences"),a(_.context===void 0,"Cannot override context"),a(_.externals===void 0,"Cannot override externals"),a(_.warnings===void 0,"Cannot override warnings"),a(_.debug===void 0,"Cannot override debug"),f.checkPreferences(_);const S=this.clone();return S._preferences=f.preferences(S._preferences,_),S}presence(_){return a(["optional","required","forbidden"].includes(_),"Unknown presence mode",_),this.$_setFlag("presence",_)}raw(){let _=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return this.$_setFlag("result",_?"raw":void 0)}result(_){return a(["raw","strip"].includes(_),"Unknown result mode",_),this.$_setFlag("result",_)}required(){return this.presence("required")}strict(_){const S=this.clone(),A=_!==void 0&&!_;return S._preferences=f.preferences(S._preferences,{convert:A}),S}strip(){let _=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return this.$_setFlag("result",_?"strip":void 0)}tag(){for(var _=arguments.length,S=new Array(_),A=0;A<_;A++)S[A]=arguments[A];a(S.length,"Missing tags");for(const I of S)a(I&&typeof I=="string","Tags must be non-empty strings");return this._inner("tags",S)}unit(_){return a(_&&typeof _=="string","Unit name must be a non-empty string"),this.$_setFlag("unit",_)}valid(){for(var _=arguments.length,S=new Array(_),A=0;A<_;A++)S[A]=arguments[A];f.verifyFlat(S,"valid");const I=this.allow(...S);return I.$_setFlag("only",!!I._valids,{clone:!1}),I}when(_,S){const A=this.clone();A.$_terms.whens||(A.$_terms.whens=[]);const I=m.when(A,_,S);if(!["any","link"].includes(A.type)){const L=I.is?[I]:I.switch;for(const F of L)a(!F.then||F.then.type==="any"||F.then.type===A.type,"Cannot combine",A.type,"with",F.then&&F.then.type),a(!F.otherwise||F.otherwise.type==="any"||F.otherwise.type===A.type,"Cannot combine",A.type,"with",F.otherwise&&F.otherwise.type)}return A.$_terms.whens.push(I),A.$_mutateRebuild()}cache(_){a(!this._inRuleset(),"Cannot set caching inside a ruleset"),a(!this._cache,"Cannot override schema cache"),a(this._flags.artifact===void 0,"Cannot cache a rule with an artifact");const S=this.clone();return S._cache=_||c.provider.provision(),S.$_temp.ruleset=!1,S}clone(){const _=Object.create(Object.getPrototypeOf(this));return this._assign(_)}concat(_){a(f.isSchema(_),"Invalid schema object"),a(this.type==="any"||_.type==="any"||_.type===this.type,"Cannot merge type",this.type,"with another type:",_.type),a(!this._inRuleset(),"Cannot concatenate onto a schema with open ruleset"),a(!_._inRuleset(),"Cannot concatenate a schema with open ruleset");let S=this.clone();if(this.type==="any"&&_.type!=="any"){const A=_.clone();for(const I of Object.keys(S))I!=="type"&&(A[I]=S[I]);S=A}S._ids.concat(_._ids),S._refs.register(_,v.toSibling),S._preferences=S._preferences?f.preferences(S._preferences,_._preferences):_._preferences,S._valids=C.merge(S._valids,_._valids,_._invalids),S._invalids=C.merge(S._invalids,_._invalids,_._valids);for(const A of _._singleRules.keys())S._singleRules.has(A)&&(S._rules=S._rules.filter(I=>I.keep||I.name!==A),S._singleRules.delete(A));for(const A of _._rules)_._definition.rules[A.method].multi||S._singleRules.set(A.name,A),S._rules.push(A);if(S._flags.empty&&_._flags.empty){S._flags.empty=S._flags.empty.concat(_._flags.empty);const A=Object.assign({},_._flags);delete A.empty,d(S._flags,A)}else if(_._flags.empty){S._flags.empty=_._flags.empty;const A=Object.assign({},_._flags);delete A.empty,d(S._flags,A)}else d(S._flags,_._flags);for(const A in _.$_terms){const I=_.$_terms[A];I?S.$_terms[A]?S.$_terms[A]=S.$_terms[A].concat(I):S.$_terms[A]=I.slice():S.$_terms[A]||(S.$_terms[A]=I)}return this.$_root._tracer&&this.$_root._tracer._combine(S,[this,_]),S.$_mutateRebuild()}extend(_){return a(!_.base,"Cannot extend type with another base"),h.type(this,_)}extract(_){return _=Array.isArray(_)?_:_.split("."),this._ids.reach(_)}fork(_,S){a(!this._inRuleset(),"Cannot fork inside a ruleset");let A=this;for(let I of[].concat(_))I=Array.isArray(I)?I:I.split("."),A=A._ids.fork(I,S,A);return A.$_temp.ruleset=!1,A}rule(_){const S=this._definition;f.assertOptions(_,Object.keys(S.modifiers)),a(this.$_temp.ruleset!==!1,"Cannot apply rules to empty ruleset or the last rule added does not support rule properties");const A=this.$_temp.ruleset===null?this._rules.length-1:this.$_temp.ruleset;a(A>=0&&AA.tailor(_),ref:!1}),S.$_temp.ruleset=!1,S.$_mutateRebuild()}tracer(){return w.location?w.location(this):this}validate(_,S){return E.entry(_,this,S)}validateAsync(_,S){return E.entryAsync(_,this,S)}$_addRule(_){typeof _=="string"&&(_={name:_}),a(_&&typeof _=="object","Invalid options"),a(_.name&&typeof _.name=="string","Invalid rule name");for(const F in _)a(F[0]!=="_","Cannot set private rule properties");const S=Object.assign({},_);S._resolve=[],S.method=S.method||S.name;const A=this._definition.rules[S.method],I=S.args;a(A,"Unknown rule",S.method);const L=this.clone();if(I){a(Object.keys(I).length===1||Object.keys(I).length===this._definition.rules[S.name].args.length,"Invalid rule definition for",this.type,S.name);for(const F in I){let N=I[F];if(A.argsByName){const R=A.argsByName.get(F);if(R.ref&&f.isResolvable(N))S._resolve.push(F),L.$_mutateRegister(N);else if(R.normalize&&(N=R.normalize(N),I[F]=N),R.assert){const B=f.validateArg(N,F,R);a(!B,B,"or reference")}}N!==void 0?I[F]=N:delete I[F]}}return A.multi||(L._ruleRemove(S.name,{clone:!1}),L._singleRules.set(S.name,S)),L.$_temp.ruleset===!1&&(L.$_temp.ruleset=null),A.priority?L._rules.unshift(S):L._rules.push(S),L}$_compile(_,S){return m.schema(this.$_root,_,S)}$_createError(_,S,A,I,L){let F=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};const N=F.flags!==!1?this._flags:{},R=F.messages?g.merge(this._definition.messages,F.messages):this._definition.messages;return new p.Report(_,S,A,N,R,I,L)}$_getFlag(_){return this._flags[_]}$_getRule(_){return this._singleRules.get(_)}$_mapLabels(_){return _=Array.isArray(_)?_:_.split("."),this._ids.labels(_)}$_match(_,S,A,I){(A=Object.assign({},A)).abortEarly=!0,A._externals=!1,S.snapshot();const L=!E.validate(_,this,S,A,I).errors;return S.restore(),L}$_modify(_){return f.assertOptions(_,["each","once","ref","schema"]),b.schema(this,_)||this}$_mutateRebuild(){return a(!this._inRuleset(),"Cannot add this rule inside a ruleset"),this._refs.reset(),this._ids.reset(),this.$_modify({each:(_,S)=>{let{source:A,name:I,path:L,key:F}=S;const N=this._definition[A][I]&&this._definition[A][I].register;N!==!1&&this.$_mutateRegister(_,{family:N,key:F})}}),this._definition.rebuild&&this._definition.rebuild(this),this.$_temp.ruleset=!1,this}$_mutateRegister(_){let{family:S,key:A}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this._refs.register(_,S),this._ids.register(_,{key:A})}$_property(_){return this._definition.properties[_]}$_reach(_){return this._ids.reach(_)}$_rootReferences(){return this._refs.roots()}$_setFlag(_,S){let A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};a(_[0]==="_"||!this._inRuleset(),"Cannot set flag inside a ruleset");const I=this._definition.flags[_]||{};if(u(S,I.default)&&(S=void 0),u(S,this._flags[_]))return this;const L=A.clone!==!1?this.clone():this;return S!==void 0?(L._flags[_]=S,L.$_mutateRegister(S)):delete L._flags[_],_[0]!=="_"&&(L.$_temp.ruleset=!1),L}$_parent(_){for(var S=arguments.length,A=new Array(S>1?S-1:0),I=1;I2&&arguments[2]!==void 0?arguments[2]:{};return f.assertOptions(A,"literal"),a(S!==void 0,"Missing",_,"value"),a(typeof S=="function"||!A.literal,"Only function value supports literal option"),typeof S=="function"&&A.literal&&(S={[f.symbols.literal]:!0,literal:S}),this.$_setFlag(_,S)}_generate(_,S,A){if(!this.$_terms.whens)return{schema:this};const I=[],L=[];for(let R=0;RW)break}const F=L.join(", ");if(S.mainstay.tracer.debug(S,"rule","when",F),!F)return{schema:this};if(!S.mainstay.tracer.active&&this.$_temp.whens[F])return{schema:this.$_temp.whens[F],id:F};let N=this;this._definition.generate&&(N=this._definition.generate(this,_,S,A));for(const R of I)N=N.concat(R);return this.$_root._tracer&&this.$_root._tracer._combine(N,[this,...I]),this.$_temp.whens[F]=N,{schema:N,id:F}}_inner(_,S){let A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};a(!this._inRuleset(),`Cannot set ${_} inside a ruleset`);const I=this.clone();return I.$_terms[_]&&!A.override||(I.$_terms[_]=[]),A.single?I.$_terms[_].push(S):I.$_terms[_].push(...S),I.$_temp.ruleset=!1,I}_inRuleset(){return this.$_temp.ruleset!==null&&this.$_temp.ruleset!==!1}_ruleRemove(_){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this._singleRules.has(_))return this;const A=S.clone!==!1?this.clone():this;A._singleRules.delete(_);const I=[];for(let L=0;L{const a=s(375),l=s(8571),u=s(8160),d={max:1e3,supported:new Set(["undefined","boolean","number","string"])};o.provider={provision:c=>new d.Cache(c)},d.Cache=class{constructor(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};u.assertOptions(c,["max"]),a(c.max===void 0||c.max&&c.max>0&&isFinite(c.max),"Invalid max cache size"),this._max=c.max||d.max,this._map=new Map,this._list=new d.List}get length(){return this._map.size}set(c,f){if(c!==null&&!d.supported.has(typeof c))return;let m=this._map.get(c);if(m)return m.value=f,void this._list.first(m);m=this._list.unshift({key:c,value:f}),this._map.set(c,m),this._compact()}get(c){const f=this._map.get(c);if(f)return this._list.first(f),l(f.value)}_compact(){if(this._map.size>this._max){const c=this._list.pop();this._map.delete(c.key)}}},d.List=class{constructor(){this.tail=null,this.head=null}unshift(c){return c.next=null,c.prev=this.head,this.head&&(this.head.next=c),this.head=c,this.tail||(this.tail=c),c}first(c){c!==this.head&&(this._remove(c),this.unshift(c))}pop(){return this._remove(this.tail)}_remove(c){const{next:f,prev:m}=c;return f.prev=m,m&&(m.next=f),c===this.tail&&(this.tail=f),c.prev=null,c.next=null,c}}},8160:(i,o,s)=>{const a=s(375),l=s(7916),u=s(5934);let d,c;const f={isoDate:/^(?:[-+]\d{2})?(?:\d{4}(?!\d{2}\b))(?:(-?)(?:(?:0[1-9]|1[0-2])(?:\1(?:[12]\d|0[1-9]|3[01]))?|W(?:[0-4]\d|5[0-2])(?:-?[1-7])?|(?:00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[1-6])))(?![T]$|[T][\d]+Z$)(?:[T\s](?:(?:(?:[01]\d|2[0-3])(?:(:?)[0-5]\d)?|24\:?00)(?:[.,]\d+(?!:))?)(?:\2[0-5]\d(?:[.,]\d+)?)?(?:[Z]|(?:[+-])(?:[01]\d|2[0-3])(?::?[0-5]\d)?)?)?)?$/};o.version=u.version,o.defaults={abortEarly:!0,allowUnknown:!1,artifacts:!1,cache:!0,context:null,convert:!0,dateFormat:"iso",errors:{escapeHtml:!1,label:"path",language:null,render:!0,stack:!1,wrap:{label:'"',array:"[]"}},externals:!0,messages:{},nonEnumerables:!1,noDefaults:!1,presence:"optional",skipFunctions:!1,stripUnknown:!1,warnings:!1},o.symbols={any:Symbol.for("@hapi/joi/schema"),arraySingle:Symbol("arraySingle"),deepDefault:Symbol("deepDefault"),errors:Symbol("errors"),literal:Symbol("literal"),override:Symbol("override"),parent:Symbol("parent"),prefs:Symbol("prefs"),ref:Symbol("ref"),template:Symbol("template"),values:Symbol("values")},o.assertOptions=function(m,p){let h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"Options";a(m&&typeof m=="object"&&!Array.isArray(m),"Options must be of type object");const y=Object.keys(m).filter(g=>!p.includes(g));a(y.length===0,`${h} contain unknown keys: ${y}`)},o.checkPreferences=function(m){c=c||s(3378);const p=c.preferences.validate(m);if(p.error)throw new l([p.error.details[0].message])},o.compare=function(m,p,h){switch(h){case"=":return m===p;case">":return m>p;case"<":return m=":return m>=p;case"<=":return m<=p}},o.default=function(m,p){return m===void 0?p:m},o.isIsoDate=function(m){return f.isoDate.test(m)},o.isNumber=function(m){return typeof m=="number"&&!isNaN(m)},o.isResolvable=function(m){return!!m&&(m[o.symbols.ref]||m[o.symbols.template])},o.isSchema=function(m){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const h=m&&m[o.symbols.any];return!!h&&(a(p.legacy||h.version===o.version,"Cannot mix different versions of joi schemas"),!0)},o.isValues=function(m){return m[o.symbols.values]},o.limit=function(m){return Number.isSafeInteger(m)&&m>=0},o.preferences=function(m,p){d=d||s(6914),m=m||{},p=p||{};const h=Object.assign({},m,p);return p.errors&&m.errors&&(h.errors=Object.assign({},m.errors,p.errors),h.errors.wrap=Object.assign({},m.errors.wrap,p.errors.wrap)),p.messages&&(h.messages=d.compile(p.messages,m.messages)),delete h[o.symbols.prefs],h},o.tryWithPath=function(m,p){let h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};try{return m()}catch(y){throw y.path!==void 0?y.path=p+"."+y.path:y.path=p,h.append&&(y.message=`${y.message} (${y.path})`),y}},o.validateArg=function(m,p,h){let{assert:y,message:g}=h;if(o.isSchema(y)){const b=y.validate(m);return b.error?b.error.message:void 0}if(!y(m))return p?`${p} ${g}`:g},o.verifyFlat=function(m,p){for(const h of m)a(!Array.isArray(h),"Method no longer accepts array arguments:",p)}},3292:(i,o,s)=>{const a=s(375),l=s(8160),u=s(6133),d={};o.schema=function(c,f){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};l.assertOptions(m,["appendPath","override"]);try{return d.schema(c,f,m)}catch(p){throw m.appendPath&&p.path!==void 0&&(p.message=`${p.message} (${p.path})`),p}},d.schema=function(c,f,m){a(f!==void 0,"Invalid undefined schema"),Array.isArray(f)&&(a(f.length,"Invalid empty array schema"),f.length===1&&(f=f[0]));const p=function(h){for(var y=arguments.length,g=new Array(y>1?y-1:0),b=1;b2&&arguments[2]!==void 0?arguments[2]:{};l.assertOptions(m,["legacy"]);const p=f&&f[l.symbols.any];if(p)return a(m.legacy||p.version===l.version,"Cannot mix different versions of joi schemas:",p.version,l.version),f;if(typeof f!="object"||!m.legacy)return o.schema(c,f,{appendPath:!0});const h=d.walk(f);return h?h.compile(h.root,f):o.schema(c,f,{appendPath:!0})},d.walk=function(c){if(typeof c!="object")return null;if(Array.isArray(c)){for(const m of c){const p=d.walk(m);if(p)return p}return null}const f=c[l.symbols.any];if(f)return{root:c[f.root],compile:f.compile};a(Object.getPrototypeOf(c)===Object.getPrototypeOf({}),"Schema can only contain plain objects");for(const m in c){const p=d.walk(c[m]);if(p)return p}return null},d.simple=function(c){return c===null||["boolean","string","number"].includes(typeof c)},o.when=function(c,f,m){if(m===void 0&&(a(f&&typeof f=="object","Missing options"),m=f,f=u.create(".")),Array.isArray(m)&&(m={switch:m}),l.assertOptions(m,["is","not","then","otherwise","switch","break"]),l.isSchema(f))return a(m.is===void 0,'"is" can not be used with a schema condition'),a(m.not===void 0,'"not" can not be used with a schema condition'),a(m.switch===void 0,'"switch" can not be used with a schema condition'),d.condition(c,{is:f,then:m.then,otherwise:m.otherwise,break:m.break});if(a(u.isRef(f)||typeof f=="string","Invalid condition:",f),a(m.not===void 0||m.is===void 0,'Cannot combine "is" with "not"'),m.switch===void 0){let h=m;m.not!==void 0&&(h={is:m.not,then:m.otherwise,otherwise:m.then,break:m.break});let y=h.is!==void 0?c.$_compile(h.is):c.$_root.invalid(null,!1,0,"").required();return a(h.then!==void 0||h.otherwise!==void 0,'options must have at least one of "then", "otherwise", or "switch"'),a(h.break===void 0||h.then===void 0||h.otherwise===void 0,"Cannot specify then, otherwise, and break all together"),m.is===void 0||u.isRef(m.is)||l.isSchema(m.is)||(y=y.required()),d.condition(c,{ref:o.ref(f),is:y,then:h.then,otherwise:h.otherwise,break:h.break})}a(Array.isArray(m.switch),'"switch" must be an array'),a(m.is===void 0,'Cannot combine "switch" with "is"'),a(m.not===void 0,'Cannot combine "switch" with "not"'),a(m.then===void 0,'Cannot combine "switch" with "then"');const p={ref:o.ref(f),switch:[],break:m.break};for(let h=0;h{const a=s(5688),l=s(8160),u=s(3328);o.Report=class{constructor(d,c,f,m,p,h,y){if(this.code=d,this.flags=m,this.messages=p,this.path=h.path,this.prefs=y,this.state=h,this.value=c,this.message=null,this.template=null,this.local=f||{},this.local.label=o.label(this.flags,this.state,this.prefs,this.messages),this.value===void 0||this.local.hasOwnProperty("value")||(this.local.value=this.value),this.path.length){const g=this.path[this.path.length-1];typeof g!="object"&&(this.local.key=g)}}_setTemplate(d){if(this.template=d,!this.flags.label&&this.path.length===0){const c=this._template(this.template,"root");c&&(this.local.label=c)}}toString(){if(this.message)return this.message;const d=this.code;if(!this.prefs.errors.render)return this.code;const c=this._template(this.template)||this._template(this.prefs.messages)||this._template(this.messages);return c===void 0?`Error code "${d}" is not defined, your custom type is missing the correct messages definition`:(this.message=c.render(this.value,this.state,this.prefs,this.local,{errors:this.prefs.errors,messages:[this.prefs.messages,this.messages]}),this.prefs.errors.label||(this.message=this.message.replace(/^"" /,"").trim()),this.message)}_template(d,c){return o.template(this.value,d,c||this.code,this.state,this.prefs)}},o.path=function(d){let c="";for(const f of d)typeof f!="object"&&(typeof f=="string"?(c&&(c+="."),c+=f):c+=`[${f}]`);return c},o.template=function(d,c,f,m,p){if(!c)return;if(u.isTemplate(c))return f!=="root"?c:null;let h=p.errors.language;if(l.isResolvable(h)&&(h=h.resolve(d,m,p)),h&&c[h]){if(c[h][f]!==void 0)return c[h][f];if(c[h]["*"]!==void 0)return c[h]["*"]}return c[f]?c[f]:c["*"]},o.label=function(d,c,f,m){if(d.label)return d.label;if(!f.errors.label)return"";let p=c.path;return f.errors.label==="key"&&c.path.length>1&&(p=c.path.slice(-1)),o.path(p)||o.template(null,f.messages,"root",c,f)||m&&o.template(null,m,"root",c,f)||"value"},o.process=function(d,c,f){if(!d)return null;const{override:m,message:p,details:h}=o.details(d);if(m)return m;if(f.errors.stack)return new o.ValidationError(p,h,c);const y=Error.stackTraceLimit;Error.stackTraceLimit=0;const g=new o.ValidationError(p,h,c);return Error.stackTraceLimit=y,g},o.details=function(d){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=[];const m=[];for(const p of d){if(p instanceof Error){if(c.override!==!1)return{override:p};const y=p.toString();f.push(y),m.push({message:y,type:"override",context:{error:p}});continue}const h=p.toString();f.push(h),m.push({message:h,path:p.path.filter(y=>typeof y!="object"),type:p.code,context:p.local})}return f.length>1&&(f=[...new Set(f)]),{message:f.join(". "),details:m}},o.ValidationError=class extends Error{constructor(d,c,f){super(d),this._original=f,this.details=c}static isError(d){return d instanceof o.ValidationError}},o.ValidationError.prototype.isJoi=!0,o.ValidationError.prototype.name="ValidationError",o.ValidationError.prototype.annotate=a.error},8901:(i,o,s)=>{const a=s(375),l=s(8571),u=s(8160),d=s(6914),c={};o.type=function(f,m){const p=Object.getPrototypeOf(f),h=l(p),y=f._assign(Object.create(h)),g=Object.assign({},m);delete g.base,h._definition=g;const b=p._definition||{};g.messages=d.merge(b.messages,g.messages),g.properties=Object.assign({},b.properties,g.properties),y.type=g.type,g.flags=Object.assign({},b.flags,g.flags);const v=Object.assign({},b.terms);if(g.terms)for(const k in g.terms){const _=g.terms[k];a(y.$_terms[k]===void 0,"Invalid term override for",g.type,k),y.$_terms[k]=_.init,v[k]=_}g.terms=v,g.args||(g.args=b.args),g.prepare=c.prepare(g.prepare,b.prepare),g.coerce&&(typeof g.coerce=="function"&&(g.coerce={method:g.coerce}),g.coerce.from&&!Array.isArray(g.coerce.from)&&(g.coerce={method:g.coerce.method,from:[].concat(g.coerce.from)})),g.coerce=c.coerce(g.coerce,b.coerce),g.validate=c.validate(g.validate,b.validate);const w=Object.assign({},b.rules);if(g.rules)for(const k in g.rules){const _=g.rules[k];a(typeof _=="object","Invalid rule definition for",g.type,k);let S=_.method;if(S===void 0&&(S=function(){return this.$_addRule(k)}),S&&(a(!h[k],"Rule conflict in",g.type,k),h[k]=S),a(!w[k],"Rule conflict in",g.type,k),w[k]=_,_.alias){const A=[].concat(_.alias);for(const I of A)h[I]=_.method}_.args&&(_.argsByName=new Map,_.args=_.args.map(A=>(typeof A=="string"&&(A={name:A}),a(!_.argsByName.has(A.name),"Duplicated argument name",A.name),u.isSchema(A.assert)&&(A.assert=A.assert.strict().label(A.name)),_.argsByName.set(A.name,A),A)))}g.rules=w;const E=Object.assign({},b.modifiers);if(g.modifiers)for(const k in g.modifiers){a(!h[k],"Rule conflict in",g.type,k);const _=g.modifiers[k];a(typeof _=="function","Invalid modifier definition for",g.type,k);const S=function(A){return this.rule({[k]:A})};h[k]=S,E[k]=_}if(g.modifiers=E,g.overrides){h._super=p,y.$_super={};for(const k in g.overrides)a(p[k],"Cannot override missing",k),g.overrides[k][u.symbols.parent]=p[k],y.$_super[k]=p[k].bind(y);Object.assign(h,g.overrides)}g.cast=Object.assign({},b.cast,g.cast);const C=Object.assign({},b.manifest,g.manifest);return C.build=c.build(g.manifest&&g.manifest.build,b.manifest&&b.manifest.build),g.manifest=C,g.rebuild=c.rebuild(g.rebuild,b.rebuild),y},c.build=function(f,m){return f&&m?function(p,h){return m(f(p,h),h)}:f||m},c.coerce=function(f,m){return f&&m?{from:f.from&&m.from?[...new Set([...f.from,...m.from])]:null,method(p,h){let y;if((!m.from||m.from.includes(typeof p))&&(y=m.method(p,h),y)){if(y.errors||y.value===void 0)return y;p=y.value}if(!f.from||f.from.includes(typeof p)){const g=f.method(p,h);if(g)return g}return y}}:f||m},c.prepare=function(f,m){return f&&m?function(p,h){const y=f(p,h);if(y){if(y.errors||y.value===void 0)return y;p=y.value}return m(p,h)||y}:f||m},c.rebuild=function(f,m){return f&&m?function(p){m(p),f(p)}:f||m},c.validate=function(f,m){return f&&m?function(p,h){const y=m(p,h);if(y){if(y.errors&&(!Array.isArray(y.errors)||y.errors.length))return y;p=y.value}return f(p,h)||y}:f||m}},5107:(i,o,s)=>{const a=s(375),l=s(8571),u=s(8652),d=s(8160),c=s(3292),f=s(6354),m=s(8901),p=s(9708),h=s(6133),y=s(3328),g=s(1152);let b;const v={types:{alternatives:s(4946),any:s(8068),array:s(546),boolean:s(4937),date:s(7500),function:s(390),link:s(8785),number:s(3832),object:s(8966),string:s(7417),symbol:s(8826)},aliases:{alt:"alternatives",bool:"boolean",func:"function"},root:function(){const w={_types:new Set(Object.keys(v.types))};for(const E of w._types)w[E]=function(){for(var C=arguments.length,k=new Array(C),_=0;_2?C-2:0),_=2;_2?C-2:0),_=2;_{const a=s(375),l=s(8571),u=s(3328);o.compile=function(d,c){if(typeof d=="string")return a(!c,"Cannot set single message string"),new u(d);if(u.isTemplate(d))return a(!c,"Cannot set single message template"),d;a(typeof d=="object"&&!Array.isArray(d),"Invalid message options"),c=c?l(c):{};for(let f in d){const m=d[f];if(f==="root"||u.isTemplate(m)){c[f]=m;continue}if(typeof m=="string"){c[f]=new u(m);continue}a(typeof m=="object"&&!Array.isArray(m),"Invalid message for",f);const p=f;for(f in c[p]=c[p]||{},m){const h=m[f];f==="root"||u.isTemplate(h)?c[p][f]=h:(a(typeof h=="string","Invalid message for",f,"in",p),c[p][f]=new u(h))}}return c},o.decompile=function(d){const c={};for(let f in d){const m=d[f];if(f==="root"){c.root=m;continue}if(u.isTemplate(m)){c[f]=m.describe({compact:!0});continue}const p=f;for(f in c[p]={},m){const h=m[f];f!=="root"?c[p][f]=h.describe({compact:!0}):c[p].root=h}}return c},o.merge=function(d,c){if(!d)return o.compile(c);if(!c)return d;if(typeof c=="string")return new u(c);if(u.isTemplate(c))return c;const f=l(d);for(let m in c){const p=c[m];if(m==="root"||u.isTemplate(p)){f[m]=p;continue}if(typeof p=="string"){f[m]=new u(p);continue}a(typeof p=="object"&&!Array.isArray(p),"Invalid message for",m);const h=m;for(m in f[h]=f[h]||{},p){const y=p[m];m==="root"||u.isTemplate(y)?f[h][m]=y:(a(typeof y=="string","Invalid message for",m,"in",h),f[h][m]=new u(y))}}return f}},2294:(i,o,s)=>{const a=s(375),l=s(8160),u=s(6133),d={};o.Ids=d.Ids=class{constructor(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}clone(){const c=new d.Ids;return c._byId=new Map(this._byId),c._byKey=new Map(this._byKey),c._schemaChain=this._schemaChain,c}concat(c){c._schemaChain&&(this._schemaChain=!0);for(const[f,m]of c._byId.entries())a(!this._byKey.has(f),"Schema id conflicts with existing key:",f),this._byId.set(f,m);for(const[f,m]of c._byKey.entries())a(!this._byId.has(f),"Schema key conflicts with existing id:",f),this._byKey.set(f,m)}fork(c,f,m){const p=this._collect(c);p.push({schema:m});const h=p.shift();let y={id:h.id,schema:f(h.schema)};a(l.isSchema(y.schema),"adjuster function failed to return a joi schema type");for(const g of p)y={id:g.id,schema:d.fork(g.schema,y.id,y.schema)};return y.schema}labels(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const m=c[0],p=this._get(m);if(!p)return[...f,...c].join(".");const h=c.slice(1);return f=[...f,p.schema._flags.label||m],h.length?p.schema._ids.labels(h,f):f.join(".")}reach(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const m=c[0],p=this._get(m);a(p,"Schema does not contain path",[...f,...c].join("."));const h=c.slice(1);return h.length?p.schema._ids.reach(h,[...f,m]):p.schema}register(c){let{key:f}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!c||!l.isSchema(c))return;(c.$_property("schemaChain")||c._ids._schemaChain)&&(this._schemaChain=!0);const m=c._flags.id;if(m){const p=this._byId.get(m);a(!p||p.schema===c,"Cannot add different schemas with the same id:",m),a(!this._byKey.has(m),"Schema id conflicts with existing key:",m),this._byId.set(m,{schema:c,id:m})}f&&(a(!this._byKey.has(f),"Schema already contains key:",f),a(!this._byId.has(f),"Schema key conflicts with existing id:",f),this._byKey.set(f,{schema:c,id:f}))}reset(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}_collect(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];const p=c[0],h=this._get(p);a(h,"Schema does not contain path",[...f,...c].join(".")),m=[h,...m];const y=c.slice(1);return y.length?h.schema._ids._collect(y,[...f,p],m):m}_get(c){return this._byId.get(c)||this._byKey.get(c)}},d.fork=function(c,f,m){const p=o.schema(c,{each:(h,y)=>{let{key:g}=y;if(f===(h._flags.id||g))return m},ref:!1});return p?p.$_mutateRebuild():c},o.schema=function(c,f){let m;for(const p in c._flags){if(p[0]==="_")continue;const h=d.scan(c._flags[p],{source:"flags",name:p},f);h!==void 0&&(m=m||c.clone(),m._flags[p]=h)}for(let p=0;p{const a=s(375),l=s(8571),u=s(9621),d=s(8160);let c;const f={symbol:Symbol("ref"),defaults:{adjust:null,in:!1,iterables:null,map:null,separator:".",type:"value"}};o.create=function(m){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};a(typeof m=="string","Invalid reference key:",m),d.assertOptions(p,["adjust","ancestor","in","iterables","map","prefix","render","separator"]),a(!p.prefix||typeof p.prefix=="object","options.prefix must be of type object");const h=Object.assign({},f.defaults,p);delete h.prefix;const y=h.separator,g=f.context(m,y,p.prefix);if(h.type=g.type,m=g.key,h.type==="value")if(g.root&&(a(!y||m[0]!==y,"Cannot specify relative path with root prefix"),h.ancestor="root",m||(m=null)),y&&y===m)m=null,h.ancestor=0;else if(h.ancestor!==void 0)a(!y||!m||m[0]!==y,"Cannot combine prefix with ancestor option");else{const[b,v]=f.ancestor(m,y);v&&(m=m.slice(v))===""&&(m=null),h.ancestor=b}return h.path=y?m===null?[]:m.split(y):[m],new f.Ref(h)},o.in=function(m){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return o.create(m,{...p,in:!0})},o.isRef=function(m){return!!m&&!!m[d.symbols.ref]},f.Ref=class{constructor(m){a(typeof m=="object","Invalid reference construction"),d.assertOptions(m,["adjust","ancestor","in","iterables","map","path","render","separator","type","depth","key","root","display"]),a([!1,void 0].includes(m.separator)||typeof m.separator=="string"&&m.separator.length===1,"Invalid separator"),a(!m.adjust||typeof m.adjust=="function","options.adjust must be a function"),a(!m.map||Array.isArray(m.map),"options.map must be an array"),a(!m.map||!m.adjust,"Cannot set both map and adjust options"),Object.assign(this,f.defaults,m),a(this.type==="value"||this.ancestor===void 0,"Non-value references cannot reference ancestors"),Array.isArray(this.map)&&(this.map=new Map(this.map)),this.depth=this.path.length,this.key=this.path.length?this.path.join(this.separator):null,this.root=this.path[0],this.updateDisplay()}resolve(m,p,h,y){let g=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{};return a(!this.in||g.in,"Invalid in() reference usage"),this.type==="global"?this._resolve(h.context,p,g):this.type==="local"?this._resolve(y,p,g):this.ancestor?this.ancestor==="root"?this._resolve(p.ancestors[p.ancestors.length-1],p,g):(a(this.ancestor<=p.ancestors.length,"Invalid reference exceeds the schema root:",this.display),this._resolve(p.ancestors[this.ancestor-1],p,g)):this._resolve(m,p,g)}_resolve(m,p,h){let y;if(this.type==="value"&&p.mainstay.shadow&&h.shadow!==!1&&(y=p.mainstay.shadow.get(this.absolute(p))),y===void 0&&(y=u(m,this.path,{iterables:this.iterables,functions:!0})),this.adjust&&(y=this.adjust(y)),this.map){const g=this.map.get(y);g!==void 0&&(y=g)}return p.mainstay&&p.mainstay.tracer.resolve(p,this,y),y}toString(){return this.display}absolute(m){return[...m.path.slice(0,-this.ancestor),...this.path]}clone(){return new f.Ref(this)}describe(){const m={path:this.path};this.type!=="value"&&(m.type=this.type),this.separator!=="."&&(m.separator=this.separator),this.type==="value"&&this.ancestor!==1&&(m.ancestor=this.ancestor),this.map&&(m.map=[...this.map]);for(const p of["adjust","iterables","render"])this[p]!==null&&this[p]!==void 0&&(m[p]=this[p]);return this.in!==!1&&(m.in=!0),{ref:m}}updateDisplay(){const m=this.key!==null?this.key:"";if(this.type!=="value")return void(this.display=`ref:${this.type}:${m}`);if(!this.separator)return void(this.display=`ref:${m}`);if(!this.ancestor)return void(this.display=`ref:${this.separator}${m}`);if(this.ancestor==="root")return void(this.display=`ref:root:${m}`);if(this.ancestor===1)return void(this.display=`ref:${m||".."}`);const p=new Array(this.ancestor+1).fill(this.separator).join("");this.display=`ref:${p}${m||""}`}},f.Ref.prototype[d.symbols.ref]=!0,o.build=function(m){return(m=Object.assign({},f.defaults,m)).type==="value"&&m.ancestor===void 0&&(m.ancestor=1),new f.Ref(m)},f.context=function(m,p){let h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(m=m.trim(),h){const y=h.global===void 0?"$":h.global;if(y!==p&&m.startsWith(y))return{key:m.slice(y.length),type:"global"};const g=h.local===void 0?"#":h.local;if(g!==p&&m.startsWith(g))return{key:m.slice(g.length),type:"local"};const b=h.root===void 0?"/":h.root;if(b!==p&&m.startsWith(b))return{key:m.slice(b.length),type:"value",root:!0}}return{key:m,type:"value"}},f.ancestor=function(m,p){if(!p)return[1,0];if(m[0]!==p)return[1,0];if(m[1]!==p)return[0,1];let h=2;for(;m[h]===p;)++h;return[h-1,h]},o.toSibling=0,o.toParent=1,o.Manager=class{constructor(){this.refs=[]}register(m,p){if(m)if(p=p===void 0?o.toParent:p,Array.isArray(m))for(const h of m)this.register(h,p);else if(d.isSchema(m))for(const h of m._refs.refs)h.ancestor-p>=0&&this.refs.push({ancestor:h.ancestor-p,root:h.root});else o.isRef(m)&&m.type==="value"&&m.ancestor-p>=0&&this.refs.push({ancestor:m.ancestor-p,root:m.root}),c=c||s(3328),c.isTemplate(m)&&this.register(m.refs(),p)}get length(){return this.refs.length}clone(){const m=new o.Manager;return m.refs=l(this.refs),m}reset(){this.refs=[]}roots(){return this.refs.filter(m=>!m.ancestor).map(m=>m.root)}}},3378:(i,o,s)=>{const a=s(5107),l={};l.wrap=a.string().min(1).max(2).allow(!1),o.preferences=a.object({allowUnknown:a.boolean(),abortEarly:a.boolean(),artifacts:a.boolean(),cache:a.boolean(),context:a.object(),convert:a.boolean(),dateFormat:a.valid("date","iso","string","time","utc"),debug:a.boolean(),errors:{escapeHtml:a.boolean(),label:a.valid("path","key",!1),language:[a.string(),a.object().ref()],render:a.boolean(),stack:a.boolean(),wrap:{label:l.wrap,array:l.wrap,string:l.wrap}},externals:a.boolean(),messages:a.object(),noDefaults:a.boolean(),nonEnumerables:a.boolean(),presence:a.valid("required","optional","forbidden"),skipFunctions:a.boolean(),stripUnknown:a.object({arrays:a.boolean(),objects:a.boolean()}).or("arrays","objects").allow(!0,!1),warnings:a.boolean()}).strict(),l.nameRx=/^[a-zA-Z0-9]\w*$/,l.rule=a.object({alias:a.array().items(a.string().pattern(l.nameRx)).single(),args:a.array().items(a.string(),a.object({name:a.string().pattern(l.nameRx).required(),ref:a.boolean(),assert:a.alternatives([a.function(),a.object().schema()]).conditional("ref",{is:!0,then:a.required()}),normalize:a.function(),message:a.string().when("assert",{is:a.function(),then:a.required()})})),convert:a.boolean(),manifest:a.boolean(),method:a.function().allow(!1),multi:a.boolean(),validate:a.function()}),o.extension=a.object({type:a.alternatives([a.string(),a.object().regex()]).required(),args:a.function(),cast:a.object().pattern(l.nameRx,a.object({from:a.function().maxArity(1).required(),to:a.function().minArity(1).maxArity(2).required()})),base:a.object().schema().when("type",{is:a.object().regex(),then:a.forbidden()}),coerce:[a.function().maxArity(3),a.object({method:a.function().maxArity(3).required(),from:a.array().items(a.string()).single()})],flags:a.object().pattern(l.nameRx,a.object({setter:a.string(),default:a.any()})),manifest:{build:a.function().arity(2)},messages:[a.object(),a.string()],modifiers:a.object().pattern(l.nameRx,a.function().minArity(1).maxArity(2)),overrides:a.object().pattern(l.nameRx,a.function()),prepare:a.function().maxArity(3),rebuild:a.function().arity(1),rules:a.object().pattern(l.nameRx,l.rule),terms:a.object().pattern(l.nameRx,a.object({init:a.array().allow(null).required(),manifest:a.object().pattern(/.+/,[a.valid("schema","single"),a.object({mapped:a.object({from:a.string().required(),to:a.string().required()}).required()})])})),validate:a.function().maxArity(3)}).strict(),o.extensions=a.array().items(a.object(),a.function().arity(1)).strict(),l.desc={buffer:a.object({buffer:a.string()}),func:a.object({function:a.function().required(),options:{literal:!0}}),override:a.object({override:!0}),ref:a.object({ref:a.object({type:a.valid("value","global","local"),path:a.array().required(),separator:a.string().length(1).allow(!1),ancestor:a.number().min(0).integer().allow("root"),map:a.array().items(a.array().length(2)).min(1),adjust:a.function(),iterables:a.boolean(),in:a.boolean(),render:a.boolean()}).required()}),regex:a.object({regex:a.string().min(3)}),special:a.object({special:a.valid("deep").required()}),template:a.object({template:a.string().required(),options:a.object()}),value:a.object({value:a.alternatives([a.object(),a.array()]).required()})},l.desc.entity=a.alternatives([a.array().items(a.link("...")),a.boolean(),a.function(),a.number(),a.string(),l.desc.buffer,l.desc.func,l.desc.ref,l.desc.regex,l.desc.special,l.desc.template,l.desc.value,a.link("/")]),l.desc.values=a.array().items(null,a.boolean(),a.function(),a.number().allow(1/0,-1/0),a.string().allow(""),a.symbol(),l.desc.buffer,l.desc.func,l.desc.override,l.desc.ref,l.desc.regex,l.desc.template,l.desc.value),l.desc.messages=a.object().pattern(/.+/,[a.string(),l.desc.template,a.object().pattern(/.+/,[a.string(),l.desc.template])]),o.description=a.object({type:a.string().required(),flags:a.object({cast:a.string(),default:a.any(),description:a.string(),empty:a.link("/"),failover:l.desc.entity,id:a.string(),label:a.string(),only:!0,presence:["optional","required","forbidden"],result:["raw","strip"],strip:a.boolean(),unit:a.string()}).unknown(),preferences:{allowUnknown:a.boolean(),abortEarly:a.boolean(),artifacts:a.boolean(),cache:a.boolean(),convert:a.boolean(),dateFormat:["date","iso","string","time","utc"],errors:{escapeHtml:a.boolean(),label:["path","key"],language:[a.string(),l.desc.ref],wrap:{label:l.wrap,array:l.wrap}},externals:a.boolean(),messages:l.desc.messages,noDefaults:a.boolean(),nonEnumerables:a.boolean(),presence:["required","optional","forbidden"],skipFunctions:a.boolean(),stripUnknown:a.object({arrays:a.boolean(),objects:a.boolean()}).or("arrays","objects").allow(!0,!1),warnings:a.boolean()},allow:l.desc.values,invalid:l.desc.values,rules:a.array().min(1).items({name:a.string().required(),args:a.object().min(1),keep:a.boolean(),message:[a.string(),l.desc.messages],warn:a.boolean()}),keys:a.object().pattern(/.*/,a.link("/")),link:l.desc.ref}).pattern(/^[a-z]\w*$/,a.any())},493:(i,o,s)=>{const a=s(8571),l=s(9621),u=s(8160),d={value:Symbol("value")};i.exports=d.State=class{constructor(c,f,m){this.path=c,this.ancestors=f,this.mainstay=m.mainstay,this.schemas=m.schemas,this.debug=null}localize(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;const p=new d.State(c,f,this);return m&&p.schemas&&(p.schemas=[d.schemas(m),...p.schemas]),p}nest(c,f){const m=new d.State(this.path,this.ancestors,this);return m.schemas=m.schemas&&[d.schemas(c),...m.schemas],m.debug=f,m}shadow(c,f){this.mainstay.shadow=this.mainstay.shadow||new d.Shadow,this.mainstay.shadow.set(this.path,c,f)}snapshot(){this.mainstay.shadow&&(this._snapshot=a(this.mainstay.shadow.node(this.path))),this.mainstay.snapshot()}restore(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0),this.mainstay.restore()}},d.schemas=function(c){return u.isSchema(c)?{schema:c}:c},d.Shadow=class{constructor(){this._values=null}set(c,f,m){if(!c.length||m==="strip"&&typeof c[c.length-1]=="number")return;this._values=this._values||new Map;let p=this._values;for(let h=0;h{const a=s(375),l=s(8571),u=s(5277),d=s(1447),c=s(8160),f=s(6354),m=s(6133),p={symbol:Symbol("template"),opens:new Array(1e3).join("\0"),closes:new Array(1e3).join(""),dateFormat:{date:Date.prototype.toDateString,iso:Date.prototype.toISOString,string:Date.prototype.toString,time:Date.prototype.toTimeString,utc:Date.prototype.toUTCString}};i.exports=p.Template=class{constructor(h,y){a(typeof h=="string","Template source must be a string"),a(!h.includes("\0")&&!h.includes(""),"Template source cannot contain reserved control characters"),this.source=h,this.rendered=h,this._template=null,this._settings=l(y),this._parse()}_parse(){if(!this.source.includes("{"))return;const h=p.encode(this.source),y=p.split(h);let g=!1;const b=[],v=y.shift();v&&b.push(v);for(const w of y){const E=w[0]!=="{",C=E?"}":"}}",k=w.indexOf(C);if(k===-1||w[1]==="{"){b.push(`{${p.decode(w)}`);continue}let _=w.slice(E?0:1,k);const S=_[0]===":";S&&(_=_.slice(1));const A=this._ref(p.decode(_),{raw:E,wrapped:S});b.push(A),typeof A!="string"&&(g=!0);const I=w.slice(k+C.length);I&&b.push(p.decode(I))}g?this._template=b:this.rendered=b.join("")}static date(h,y){return p.dateFormat[y.dateFormat].call(h)}describe(){let h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this._settings&&h.compact)return this.source;const y={template:this.source};return this._settings&&(y.options=this._settings),y}static build(h){return new p.Template(h.template,h.options)}isDynamic(){return!!this._template}static isTemplate(h){return!!h&&!!h[c.symbols.template]}refs(){if(!this._template)return;const h=[];for(const y of this._template)typeof y!="string"&&h.push(...y.refs);return h}resolve(h,y,g,b){return this._template&&this._template.length===1?this._part(this._template[0],h,y,g,b,{}):this.render(h,y,g,b)}_part(h){for(var y=arguments.length,g=new Array(y>1?y-1:0),b=1;b4&&arguments[4]!==void 0?arguments[4]:{};if(!this.isDynamic())return this.rendered;const w=[];for(const E of this._template)if(typeof E=="string")w.push(E);else{const C=this._part(E,h,y,g,b,v),k=p.stringify(C,h,y,g,b,v);if(k!==void 0){const _=E.raw||(v.errors&&v.errors.escapeHtml)===!1?k:u(k);w.push(p.wrap(_,E.wrapped&&g.errors.wrap.label))}}return w.join("")}_ref(h,y){let{raw:g,wrapped:b}=y;const v=[],w=C=>{const k=m.create(C,this._settings);return v.push(k),_=>k.resolve(..._)};try{var E=new d.Parser(h,{reference:w,functions:p.functions,constants:p.constants})}catch(C){throw C.message=`Invalid template variable "${h}" fails due to: ${C.message}`,C}if(E.single){if(E.single.type==="reference"){const C=v[0];return{ref:C,raw:g,refs:v,wrapped:b||C.type==="local"&&C.key==="label"}}return p.stringify(E.single.value)}return{formula:E,raw:g,refs:v}}toString(){return this.source}},p.Template.prototype[c.symbols.template]=!0,p.Template.prototype.isImmutable=!0,p.encode=function(h){return h.replace(/\\(\{+)/g,(y,g)=>p.opens.slice(0,g.length)).replace(/\\(\}+)/g,(y,g)=>p.closes.slice(0,g.length))},p.decode=function(h){return h.replace(/\u0000/g,"{").replace(/\u0001/g,"}")},p.split=function(h){const y=[];let g="";for(let b=0;b5&&arguments[5]!==void 0?arguments[5]:{};const E=typeof h,C=b&&b.errors&&b.errors.wrap||{};let k=!1;if(m.isRef(h)&&h.render&&(k=h.in,h=h.resolve(y,g,b,v,{in:h.in,...w})),h===null)return"null";if(E==="string")return p.wrap(h,w.arrayItems&&C.string);if(E==="number"||E==="function"||E==="symbol")return h.toString();if(E!=="object")return JSON.stringify(h);if(h instanceof Date)return p.Template.date(h,b);if(h instanceof Map){const S=[];for(const[A,I]of h.entries())S.push(`${A.toString()} -> ${I.toString()}`);h=S}if(!Array.isArray(h))return h.toString();const _=[];for(const S of h)_.push(p.stringify(S,y,g,b,v,{arrayItems:!0,...w}));return p.wrap(_.join(", "),!k&&C.array)},p.constants={true:!0,false:!1,null:null,second:1e3,minute:6e4,hour:36e5,day:864e5},p.functions={if:(h,y,g)=>h?y:g,length:h=>typeof h=="string"?h.length:h&&typeof h=="object"?Array.isArray(h)?h.length:Object.keys(h).length:null,msg(h){const[y,g,b,v,w]=this,E=w.messages;if(!E)return"";const C=f.template(y,E[0],h,g,b)||f.template(y,E[1],h,g,b);return C?C.render(y,g,b,v,w):""},number:h=>typeof h=="number"?h:typeof h=="string"?parseFloat(h):typeof h=="boolean"?h?1:0:h instanceof Date?h.getTime():null}},4946:(i,o,s)=>{const a=s(375),l=s(1687),u=s(8068),d=s(8160),c=s(3292),f=s(6354),m=s(6133),p={};i.exports=u.extend({type:"alternatives",flags:{match:{default:"any"}},terms:{matches:{init:[],register:m.toSibling}},args(h){for(var y=arguments.length,g=new Array(y>1?y-1:0),b=1;bf.details(S,{override:!1}))})};if(g._flags.match==="one")return C.length===1?{value:C[0]}:{errors:b("alternatives.one")};if(C.length!==g.$_terms.matches.length)return{errors:b("alternatives.all",{details:k.map(S=>f.details(S,{override:!1}))})};const _=S=>S.$_terms.matches.some(A=>A.schema.type==="object"||A.schema.type==="alternatives"&&_(A.schema));return _(g)?{value:C.reduce((S,A)=>l(S,A,{mergeArrays:!1}))}:{value:C[C.length-1]}}const E=[];for(let C=0;Cg.path[0]!=="is"?y.label(h):void 0,ref:!1})}},rebuild(h){h.$_modify({each:y=>{d.isSchema(y)&&y.type==="array"&&h.$_setFlag("_arrayItems",!0,{clone:!1})}})},manifest:{build(h,y){if(y.matches)for(const g of y.matches){const{schema:b,ref:v,is:w,not:E,then:C,otherwise:k}=g;h=b?h.try(b):v?h.conditional(v,{is:w,then:C,not:E,otherwise:k,switch:g.switch}):h.conditional(w,{then:C,otherwise:k})}return h}},messages:{"alternatives.all":"{{#label}} does not match all of the required types","alternatives.any":"{{#label}} does not match any of the allowed types","alternatives.match":"{{#label}} does not match any of the allowed types","alternatives.one":"{{#label}} matches more than one allowed type","alternatives.types":"{{#label}} must be one of {{#types}}"}}),p.errors=function(h,y){let{error:g,state:b}=y;if(!h.length)return{errors:g("alternatives.any")};if(h.length===1)return{errors:h[0].reports};const v=new Set,w=[];for(const{reports:E,schema:C}of h){if(E.length>1)return p.unmatched(h,g);const k=E[0];if(k instanceof f.Report==0)return p.unmatched(h,g);if(k.state.path.length!==b.path.length){w.push({type:C.type,report:k});continue}if(k.code==="any.only"){for(const A of k.local.valids)v.add(A);continue}const[_,S]=k.code.split(".");S==="base"?v.add(_):w.push({type:C.type,report:k})}return w.length?w.length===1?{errors:w[0].report}:p.unmatched(h,g):{errors:g("alternatives.types",{types:[...v]})}},p.unmatched=function(h,y){const g=[];for(const b of h)g.push(...b.reports);return{errors:y("alternatives.match",f.details(g,{override:!1}))}}},8068:(i,o,s)=>{const a=s(375),l=s(7629),u=s(8160),d=s(6914);i.exports=l.extend({type:"any",flags:{only:{default:!1}},terms:{alterations:{init:null},examples:{init:null},externals:{init:null},metas:{init:[]},notes:{init:[]},shared:{init:null},tags:{init:[]},whens:{init:null}},rules:{custom:{method(c,f){return a(typeof c=="function","Method must be a function"),a(f===void 0||f&&typeof f=="string","Description must be a non-empty string"),this.$_addRule({name:"custom",args:{method:c,description:f}})},validate(c,f,m){let{method:p}=m;try{return p(c,f)}catch(h){return f.error("any.custom",{error:h})}},args:["method","description"],multi:!0},messages:{method(c){return this.prefs({messages:c})}},shared:{method(c){a(u.isSchema(c)&&c._flags.id,"Schema must be a schema with an id");const f=this.clone();return f.$_terms.shared=f.$_terms.shared||[],f.$_terms.shared.push(c),f.$_mutateRegister(c),f}},warning:{method(c,f){return a(c&&typeof c=="string","Invalid warning code"),this.$_addRule({name:"warning",args:{code:c,local:f},warn:!0})},validate(c,f,m){let{code:p,local:h}=m;return f.error(p,h)},args:["code","local"],multi:!0}},modifiers:{keep(c){let f=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];c.keep=f},message(c,f){c.message=d.compile(f)},warn(c){let f=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];c.warn=f}},manifest:{build(c,f){for(const m in f){const p=f[m];if(["examples","externals","metas","notes","tags"].includes(m))for(const h of p)c=c[m.slice(0,-1)](h);else if(m!=="alterations")if(m!=="whens"){if(m==="shared")for(const h of p)c=c.shared(h)}else for(const h of p){const{ref:y,is:g,not:b,then:v,otherwise:w,concat:E}=h;c=E?c.concat(E):y?c.when(y,{is:g,not:b,then:v,otherwise:w,switch:h.switch,break:h.break}):c.when(g,{then:v,otherwise:w,break:h.break})}else{const h={};for(const{target:y,adjuster:g}of p)h[y]=g;c=c.alter(h)}}return c}},messages:{"any.custom":"{{#label}} failed custom validation because {{#error.message}}","any.default":"{{#label}} threw an error when running default method","any.failover":"{{#label}} threw an error when running failover method","any.invalid":"{{#label}} contains an invalid value","any.only":'{{#label}} must be {if(#valids.length == 1, "", "one of ")}{{#valids}}',"any.ref":"{{#label}} {{#arg}} references {{:#ref}} which {{#reason}}","any.required":"{{#label}} is required","any.unknown":"{{#label}} is not allowed"}})},546:(i,o,s)=>{const a=s(375),l=s(9474),u=s(9621),d=s(8068),c=s(8160),f=s(3292),m={};i.exports=d.extend({type:"array",flags:{single:{default:!1},sparse:{default:!1}},terms:{items:{init:[],manifest:"schema"},ordered:{init:[],manifest:"schema"},_exclusions:{init:[]},_inclusions:{init:[]},_requireds:{init:[]}},coerce:{from:"object",method(p,h){let{schema:y,state:g,prefs:b}=h;if(!Array.isArray(p))return;const v=y.$_getRule("sort");return v?m.sort(y,p,v.args.options,g,b):void 0}},validate(p,h){let{schema:y,error:g}=h;if(!Array.isArray(p)){if(y._flags.single){const b=[p];return b[c.symbols.arraySingle]=!0,{value:b}}return{errors:g("array.base")}}if(y.$_getRule("items")||y.$_terms.externals)return{value:p.slice()}},rules:{has:{method(p){p=this.$_compile(p,{appendPath:!0});const h=this.$_addRule({name:"has",args:{schema:p}});return h.$_mutateRegister(p),h},validate(p,h,y){let{state:g,prefs:b,error:v}=h,{schema:w}=y;const E=[p,...g.ancestors];for(let k=0;kthis.$_compile(h[b]),b,{append:!0});g.$_terms.items.push(v)}return g.$_mutateRebuild()},validate(p,h){let{schema:y,error:g,state:b,prefs:v,errorsArray:w}=h;const E=y.$_terms._requireds.slice(),C=y.$_terms.ordered.slice(),k=[...y.$_terms._inclusions,...E],_=!p[c.symbols.arraySingle];delete p[c.symbols.arraySingle];const S=w();let A=p.length;for(let I=0;I="})}},ordered:{method(){for(var p=arguments.length,h=new Array(p),y=0;ythis.$_compile(h[b]),b,{append:!0});m.validateSingle(v,g),g.$_mutateRegister(v),g.$_terms.ordered.push(v)}return g.$_mutateRebuild()}},single:{method(p){const h=p===void 0||!!p;return a(!h||!this._flags._arrayItems,"Cannot specify single rule when array has array items"),this.$_setFlag("single",h)}},sort:{method(){let p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};c.assertOptions(p,["by","order"]);const h={order:p.order||"ascending"};return p.by&&(h.by=f.ref(p.by,{ancestor:0}),a(!h.by.ancestor,"Cannot sort by ancestor")),this.$_addRule({name:"sort",args:{options:h}})},validate(p,h,y){let{error:g,state:b,prefs:v,schema:w}=h,{options:E}=y;const{value:C,errors:k}=m.sort(w,p,E,b,v);if(k)return k;for(let _=0;_1&&arguments[1]!==void 0?arguments[1]:{};a(!p||typeof p=="function"||typeof p=="string","comparator must be a function or a string"),c.assertOptions(h,["ignoreUndefined","separator"]);const y={name:"unique",args:{options:h,comparator:p}};if(p)if(typeof p=="string"){const g=c.default(h.separator,".");y.path=g?p.split(g):[p]}else y.comparator=p;return this.$_addRule(y)},validate(p,h,y,g){let{state:b,error:v,schema:w}=h,{comparator:E,options:C}=y,{comparator:k,path:_}=g;const S={string:Object.create(null),number:Object.create(null),undefined:Object.create(null),boolean:Object.create(null),object:new Map,function:new Map,custom:new Map},A=k||l,I=C.ignoreUndefined;for(let L=0;Lnew Set(p)}},rebuild(p){p.$_terms._inclusions=[],p.$_terms._exclusions=[],p.$_terms._requireds=[];for(const h of p.$_terms.items)m.validateSingle(h,p),h._flags.presence==="required"?p.$_terms._requireds.push(h):h._flags.presence==="forbidden"?p.$_terms._exclusions.push(h):p.$_terms._inclusions.push(h);for(const h of p.$_terms.ordered)m.validateSingle(h,p)},manifest:{build:(p,h)=>(h.items&&(p=p.items(...h.items)),h.ordered&&(p=p.ordered(...h.ordered)),p)},messages:{"array.base":"{{#label}} must be an array","array.excludes":"{{#label}} contains an excluded value","array.hasKnown":"{{#label}} does not contain at least one required match for type {:#patternLabel}","array.hasUnknown":"{{#label}} does not contain at least one required match","array.includes":"{{#label}} does not match any of the allowed types","array.includesRequiredBoth":"{{#label}} does not contain {{#knownMisses}} and {{#unknownMisses}} other required value(s)","array.includesRequiredKnowns":"{{#label}} does not contain {{#knownMisses}}","array.includesRequiredUnknowns":"{{#label}} does not contain {{#unknownMisses}} required value(s)","array.length":"{{#label}} must contain {{#limit}} items","array.max":"{{#label}} must contain less than or equal to {{#limit}} items","array.min":"{{#label}} must contain at least {{#limit}} items","array.orderedLength":"{{#label}} must contain at most {{#limit}} items","array.sort":"{{#label}} must be sorted in {#order} order by {{#by}}","array.sort.mismatching":"{{#label}} cannot be sorted due to mismatching types","array.sort.unsupported":"{{#label}} cannot be sorted due to unsupported type {#type}","array.sparse":"{{#label}} must not be a sparse array item","array.unique":"{{#label}} contains a duplicate value"}}),m.fillMissedErrors=function(p,h,y,g,b,v){const w=[];let E=0;for(const C of y){const k=C._flags.label;k?w.push(k):++E}w.length?E?h.push(p.$_createError("array.includesRequiredBoth",g,{knownMisses:w,unknownMisses:E},b,v)):h.push(p.$_createError("array.includesRequiredKnowns",g,{knownMisses:w},b,v)):h.push(p.$_createError("array.includesRequiredUnknowns",g,{unknownMisses:E},b,v))},m.fillOrderedErrors=function(p,h,y,g,b,v){const w=[];for(const E of y)E._flags.presence==="required"&&w.push(E);w.length&&m.fillMissedErrors(p,h,w,g,b,v)},m.fillDefault=function(p,h,y,g){const b=[];let v=!0;for(let w=p.length-1;w>=0;--w){const E=p[w],C=[h,...y.ancestors],k=E.$_validate(void 0,y.localize(y.path,C,E),g).value;if(v){if(k===void 0)continue;v=!1}b.unshift(k)}b.length&&h.push(...b)},m.fastSplice=function(p,h){let y=h;for(;y{let S=m.compare(k,_,w,E);if(S!==null||(y.by&&(k=y.by.resolve(k,g,b),_=y.by.resolve(_,g,b)),S=m.compare(k,_,w,E),S!==null))return S;const A=typeof k;if(A!==typeof _)throw p.$_createError("array.sort.mismatching",h,null,g,b);if(A!=="number"&&A!=="string")throw p.$_createError("array.sort.unsupported",h,{type:A},g,b);return A==="number"?(k-_)*v:k<_?w:E};try{return{value:h.slice().sort(C)}}catch(k){return{errors:k}}},m.compare=function(p,h,y,g){return p===h?0:p===void 0?1:h===void 0?-1:p===null?g:h===null?y:null}},4937:(i,o,s)=>{const a=s(375),l=s(8068),u=s(8160),d=s(2036),c={isBool:function(f){return typeof f=="boolean"}};i.exports=l.extend({type:"boolean",flags:{sensitive:{default:!1}},terms:{falsy:{init:null,manifest:"values"},truthy:{init:null,manifest:"values"}},coerce(f,m){let{schema:p}=m;if(typeof f!="boolean"){if(typeof f=="string"){const h=p._flags.sensitive?f:f.toLowerCase();f=h==="true"||h!=="false"&&f}return typeof f!="boolean"&&(f=p.$_terms.truthy&&p.$_terms.truthy.has(f,null,null,!p._flags.sensitive)||(!p.$_terms.falsy||!p.$_terms.falsy.has(f,null,null,!p._flags.sensitive))&&f),{value:f}}},validate(f,m){let{error:p}=m;if(typeof f!="boolean")return{value:f,errors:p("boolean.base")}},rules:{truthy:{method(){for(var f=arguments.length,m=new Array(f),p=0;p0&&arguments[0]!==void 0)||arguments[0];return this.$_setFlag("sensitive",f)}}},cast:{number:{from:c.isBool,to:(f,m)=>f?1:0},string:{from:c.isBool,to:(f,m)=>f?"true":"false"}},manifest:{build:(f,m)=>(m.truthy&&(f=f.truthy(...m.truthy)),m.falsy&&(f=f.falsy(...m.falsy)),f)},messages:{"boolean.base":"{{#label}} must be a boolean"}})},7500:(i,o,s)=>{const a=s(375),l=s(8068),u=s(8160),d=s(3328),c={isDate:function(f){return f instanceof Date}};i.exports=l.extend({type:"date",coerce:{from:["number","string"],method(f,m){let{schema:p}=m;return{value:c.parse(f,p._flags.format)||f}}},validate(f,m){let{schema:p,error:h,prefs:y}=m;if(f instanceof Date&&!isNaN(f.getTime()))return;const g=p._flags.format;return y.convert&&g&&typeof f=="string"?{value:f,errors:h("date.format",{format:g})}:{value:f,errors:h("date.base")}},rules:{compare:{method:!1,validate(f,m,p,h){let{date:y}=p,{name:g,operator:b,args:v}=h;const w=y==="now"?Date.now():y.getTime();return u.compare(f.getTime(),w,b)?f:m.error("date."+g,{limit:v.date,value:f})},args:[{name:"date",ref:!0,normalize:f=>f==="now"?f:c.parse(f),assert:f=>f!==null,message:"must have a valid date format"}]},format:{method(f){return a(["iso","javascript","unix"].includes(f),"Unknown date format",f),this.$_setFlag("format",f)}},greater:{method(f){return this.$_addRule({name:"greater",method:"compare",args:{date:f},operator:">"})}},iso:{method(){return this.format("iso")}},less:{method(f){return this.$_addRule({name:"less",method:"compare",args:{date:f},operator:"<"})}},max:{method(f){return this.$_addRule({name:"max",method:"compare",args:{date:f},operator:"<="})}},min:{method(f){return this.$_addRule({name:"min",method:"compare",args:{date:f},operator:">="})}},timestamp:{method(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"javascript";return a(["javascript","unix"].includes(f),'"type" must be one of "javascript, unix"'),this.format(f)}}},cast:{number:{from:c.isDate,to:(f,m)=>f.getTime()},string:{from:c.isDate,to(f,m){let{prefs:p}=m;return d.date(f,p)}}},messages:{"date.base":"{{#label}} must be a valid date","date.format":'{{#label}} must be in {msg("date.format." + #format) || #format} format',"date.greater":"{{#label}} must be greater than {{:#limit}}","date.less":"{{#label}} must be less than {{:#limit}}","date.max":"{{#label}} must be less than or equal to {{:#limit}}","date.min":"{{#label}} must be greater than or equal to {{:#limit}}","date.format.iso":"ISO 8601 date","date.format.javascript":"timestamp or number of milliseconds","date.format.unix":"timestamp or number of seconds"}}),c.parse=function(f,m){if(f instanceof Date)return f;if(typeof f!="string"&&(isNaN(f)||!isFinite(f))||/^\s*$/.test(f))return null;if(m==="iso")return u.isIsoDate(f)?c.date(f.toString()):null;const p=f;if(typeof f=="string"&&/^[+-]?\d+(\.\d+)?$/.test(f)&&(f=parseFloat(f)),m){if(m==="javascript")return c.date(1*f);if(m==="unix")return c.date(1e3*f);if(typeof p=="string")return null}return c.date(f)},c.date=function(f){const m=new Date(f);return isNaN(m.getTime())?null:m}},390:(i,o,s)=>{const a=s(375),l=s(7824);i.exports=l.extend({type:"function",properties:{typeof:"function"},rules:{arity:{method(u){return a(Number.isSafeInteger(u)&&u>=0,"n must be a positive integer"),this.$_addRule({name:"arity",args:{n:u}})},validate(u,d,c){let{n:f}=c;return u.length===f?u:d.error("function.arity",{n:f})}},class:{method(){return this.$_addRule("class")},validate:(u,d)=>/^\s*class\s/.test(u.toString())?u:d.error("function.class",{value:u})},minArity:{method(u){return a(Number.isSafeInteger(u)&&u>0,"n must be a strict positive integer"),this.$_addRule({name:"minArity",args:{n:u}})},validate(u,d,c){let{n:f}=c;return u.length>=f?u:d.error("function.minArity",{n:f})}},maxArity:{method(u){return a(Number.isSafeInteger(u)&&u>=0,"n must be a positive integer"),this.$_addRule({name:"maxArity",args:{n:u}})},validate(u,d,c){let{n:f}=c;return u.length<=f?u:d.error("function.maxArity",{n:f})}}},messages:{"function.arity":"{{#label}} must have an arity of {{#n}}","function.class":"{{#label}} must be a class","function.maxArity":"{{#label}} must have an arity lesser or equal to {{#n}}","function.minArity":"{{#label}} must have an arity greater or equal to {{#n}}"}})},7824:(i,o,s)=>{const a=s(978),l=s(375),u=s(8571),d=s(3652),c=s(8068),f=s(8160),m=s(3292),p=s(6354),h=s(6133),y=s(3328),g={renameDefaults:{alias:!1,multiple:!1,override:!1}};i.exports=c.extend({type:"_keys",properties:{typeof:"object"},flags:{unknown:{default:!1}},terms:{dependencies:{init:null},keys:{init:null,manifest:{mapped:{from:"schema",to:"key"}}},patterns:{init:null},renames:{init:null}},args:(b,v)=>b.keys(v),validate(b,v){let{schema:w,error:E,state:C,prefs:k}=v;if(!b||typeof b!==w.$_property("typeof")||Array.isArray(b))return{value:b,errors:E("object.base",{type:w.$_property("typeof")})};if(!(w.$_terms.renames||w.$_terms.dependencies||w.$_terms.keys||w.$_terms.patterns||w.$_terms.externals))return;b=g.clone(b,k);const _=[];if(w.$_terms.renames&&!g.rename(w,b,C,k,_))return{value:b,errors:_};if(!w.$_terms.keys&&!w.$_terms.patterns&&!w.$_terms.dependencies)return{value:b,errors:_};const S=new Set(Object.keys(b));if(w.$_terms.keys){const A=[b,...C.ancestors];for(const I of w.$_terms.keys){const L=I.key,F=b[L];S.delete(L);const N=C.localize([...C.path,L],A,I),R=I.schema.$_validate(F,N,k);if(R.errors){if(k.abortEarly)return{value:b,errors:R.errors};R.value!==void 0&&(b[L]=R.value),_.push(...R.errors)}else I.schema._flags.result==="strip"||R.value===void 0&&F!==void 0?delete b[L]:R.value!==void 0&&(b[L]=R.value)}}if(S.size||w._flags._hasPatternMatch){const A=g.unknown(w,b,S,_,C,k);if(A)return A}if(w.$_terms.dependencies)for(const A of w.$_terms.dependencies){if(A.key!==null&&g.isPresent(A.options)(A.key.resolve(b,C,k,null,{shadow:!1}))===!1)continue;const I=g.dependencies[A.rel](w,A,b,C,k);if(I){const L=w.$_createError(I.code,b,I.context,C,k);if(k.abortEarly)return{value:b,errors:L};_.push(L)}}return{value:b,errors:_}},rules:{and:{method(){for(var b=arguments.length,v=new Array(b),w=0;w!b.hasOwnProperty(w.key)):new g.Keys;for(const w in b)f.tryWithPath(()=>v.$_terms.keys.push({key:w,schema:this.$_compile(b[w])}),w)}else v.$_terms.keys=new g.Keys;else v.$_terms.keys=null;return v.$_mutateRebuild()}},length:{method(b){return this.$_addRule({name:"length",args:{limit:b},operator:"="})},validate(b,v,w,E){let{limit:C}=w,{name:k,operator:_,args:S}=E;return f.compare(Object.keys(b).length,C,_)?b:v.error("object."+k,{limit:S.limit,value:b})},args:[{name:"limit",ref:!0,assert:f.limit,message:"must be a positive integer"}]},max:{method(b){return this.$_addRule({name:"max",method:"length",args:{limit:b},operator:"<="})}},min:{method(b){return this.$_addRule({name:"min",method:"length",args:{limit:b},operator:">="})}},nand:{method(){for(var b=arguments.length,v=new Array(b),w=0;w2&&arguments[2]!==void 0?arguments[2]:{};const E=b instanceof RegExp;E||(b=this.$_compile(b,{appendPath:!0})),l(v!==void 0,"Invalid rule"),f.assertOptions(w,["fallthrough","matches"]),E&&l(!b.flags.includes("g")&&!b.flags.includes("y"),"pattern should not use global or sticky mode"),v=this.$_compile(v,{appendPath:!0});const C=this.clone();C.$_terms.patterns=C.$_terms.patterns||[];const k={[E?"regex":"schema"]:b,rule:v};return w.matches&&(k.matches=this.$_compile(w.matches),k.matches.type!=="array"&&(k.matches=k.matches.$_root.array().items(k.matches)),C.$_mutateRegister(k.matches),C.$_setFlag("_hasPatternMatch",!0,{clone:!1})),w.fallthrough&&(k.fallthrough=!0),C.$_terms.patterns.push(k),C.$_mutateRegister(v),C}},ref:{method(){return this.$_addRule("ref")},validate:(b,v)=>h.isRef(b)?b:v.error("object.refType",{value:b})},regex:{method(){return this.$_addRule("regex")},validate:(b,v)=>b instanceof RegExp?b:v.error("object.regex",{value:b})},rename:{method(b,v){let w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};l(typeof b=="string"||b instanceof RegExp,"Rename missing the from argument"),l(typeof v=="string"||v instanceof y,"Invalid rename to argument"),l(v!==b,"Cannot rename key to same name:",b),f.assertOptions(w,["alias","ignoreUndefined","override","multiple"]);const E=this.clone();E.$_terms.renames=E.$_terms.renames||[];for(const C of E.$_terms.renames)l(C.from!==b,"Cannot rename the same key multiple times");return v instanceof y&&E.$_mutateRegister(v),E.$_terms.renames.push({from:b,to:v,options:a(g.renameDefaults,w)}),E}},schema:{method(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"any";return this.$_addRule({name:"schema",args:{type:b}})},validate(b,v,w){let{type:E}=w;return!f.isSchema(b)||E!=="any"&&b.type!==E?v.error("object.schema",{type:E}):b}},unknown:{method(b){return this.$_setFlag("unknown",b!==!1)}},with:{method(b,v){let w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return g.dependency(this,"with",b,v,w)}},without:{method(b,v){let w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return g.dependency(this,"without",b,v,w)}},xor:{method(){for(var b=arguments.length,v=new Array(b),w=0;wv.add(w,{after:w.schema.$_rootReferences(),group:w.key}),w.key);b.$_terms.keys=new g.Keys(...v.nodes)}},manifest:{build(b,v){if(v.keys&&(b=b.keys(v.keys)),v.dependencies)for(const{rel:w,key:E=null,peers:C,options:k}of v.dependencies)b=g.dependency(b,w,E,C,k);if(v.patterns)for(const{regex:w,schema:E,rule:C,fallthrough:k,matches:_}of v.patterns)b=b.pattern(w||E,C,{fallthrough:k,matches:_});if(v.renames)for(const{from:w,to:E,options:C}of v.renames)b=b.rename(w,E,C);return b}},messages:{"object.and":"{{#label}} contains {{#presentWithLabels}} without its required peers {{#missingWithLabels}}","object.assert":'{{#label}} is invalid because {if(#subject.key, `"` + #subject.key + `" failed to ` + (#message || "pass the assertion test"), #message || "the assertion failed")}',"object.base":"{{#label}} must be of type {{#type}}","object.instance":"{{#label}} must be an instance of {{:#type}}","object.length":'{{#label}} must have {{#limit}} key{if(#limit == 1, "", "s")}',"object.max":'{{#label}} must have less than or equal to {{#limit}} key{if(#limit == 1, "", "s")}',"object.min":'{{#label}} must have at least {{#limit}} key{if(#limit == 1, "", "s")}',"object.missing":"{{#label}} must contain at least one of {{#peersWithLabels}}","object.nand":"{{:#mainWithLabel}} must not exist simultaneously with {{#peersWithLabels}}","object.oxor":"{{#label}} contains a conflict between optional exclusive peers {{#peersWithLabels}}","object.pattern.match":"{{#label}} keys failed to match pattern requirements","object.refType":"{{#label}} must be a Joi reference","object.regex":"{{#label}} must be a RegExp object","object.rename.multiple":"{{#label}} cannot rename {{:#from}} because multiple renames are disabled and another key was already renamed to {{:#to}}","object.rename.override":"{{#label}} cannot rename {{:#from}} because override is disabled and target {{:#to}} exists","object.schema":"{{#label}} must be a Joi schema of {{#type}} type","object.unknown":"{{#label}} is not allowed","object.with":"{{:#mainWithLabel}} missing required peer {{:#peerWithLabel}}","object.without":"{{:#mainWithLabel}} conflict with forbidden peer {{:#peerWithLabel}}","object.xor":"{{#label}} contains a conflict between exclusive peers {{#peersWithLabels}}"}}),g.clone=function(b,v){if(typeof b=="object"){if(v.nonEnumerables)return u(b,{shallow:!0});const E=Object.create(Object.getPrototypeOf(b));return Object.assign(E,b),E}const w=function(){for(var E=arguments.length,C=new Array(E),k=0;k1&&typeof E[E.length-1]=="object"?E.pop():{}),f.assertOptions(C,["separator","isPresent"]),E=[].concat(E);const k=f.default(C.separator,"."),_=[];for(const A of E)l(typeof A=="string",v,"peers must be strings"),_.push(m.ref(A,{separator:k,ancestor:0,prefix:!1}));w!==null&&(w=m.ref(w,{separator:k,ancestor:0,prefix:!1}));const S=b.clone();return S.$_terms.dependencies=S.$_terms.dependencies||[],S.$_terms.dependencies.push(new g.Dependency(v,w,_,E,C)),S},g.dependencies={and(b,v,w,E,C){const k=[],_=[],S=v.peers.length,A=g.isPresent(v.options);for(const I of v.peers)A(I.resolve(w,E,C,null,{shadow:!1}))===!1?k.push(I.key):_.push(I.key);if(k.length!==S&&_.length!==S)return{code:"object.and",context:{present:_,presentWithLabels:g.keysToLabels(b,_),missing:k,missingWithLabels:g.keysToLabels(b,k)}}},nand(b,v,w,E,C){const k=[],_=g.isPresent(v.options);for(const I of v.peers)_(I.resolve(w,E,C,null,{shadow:!1}))&&k.push(I.key);if(k.length!==v.peers.length)return;const S=v.paths[0],A=v.paths.slice(1);return{code:"object.nand",context:{main:S,mainWithLabel:g.keysToLabels(b,S),peers:A,peersWithLabels:g.keysToLabels(b,A)}}},or(b,v,w,E,C){const k=g.isPresent(v.options);for(const _ of v.peers)if(k(_.resolve(w,E,C,null,{shadow:!1})))return;return{code:"object.missing",context:{peers:v.paths,peersWithLabels:g.keysToLabels(b,v.paths)}}},oxor(b,v,w,E,C){const k=[],_=g.isPresent(v.options);for(const A of v.peers)_(A.resolve(w,E,C,null,{shadow:!1}))&&k.push(A.key);if(!k.length||k.length===1)return;const S={peers:v.paths,peersWithLabels:g.keysToLabels(b,v.paths)};return S.present=k,S.presentWithLabels=g.keysToLabels(b,k),{code:"object.oxor",context:S}},with(b,v,w,E,C){const k=g.isPresent(v.options);for(const _ of v.peers)if(k(_.resolve(w,E,C,null,{shadow:!1}))===!1)return{code:"object.with",context:{main:v.key.key,mainWithLabel:g.keysToLabels(b,v.key.key),peer:_.key,peerWithLabel:g.keysToLabels(b,_.key)}}},without(b,v,w,E,C){const k=g.isPresent(v.options);for(const _ of v.peers)if(k(_.resolve(w,E,C,null,{shadow:!1})))return{code:"object.without",context:{main:v.key.key,mainWithLabel:g.keysToLabels(b,v.key.key),peer:_.key,peerWithLabel:g.keysToLabels(b,_.key)}}},xor(b,v,w,E,C){const k=[],_=g.isPresent(v.options);for(const A of v.peers)_(A.resolve(w,E,C,null,{shadow:!1}))&&k.push(A.key);if(k.length===1)return;const S={peers:v.paths,peersWithLabels:g.keysToLabels(b,v.paths)};return k.length===0?{code:"object.missing",context:S}:(S.present=k,S.presentWithLabels=g.keysToLabels(b,k),{code:"object.xor",context:S})}},g.keysToLabels=function(b,v){return Array.isArray(v)?v.map(w=>b.$_mapLabels(w)):b.$_mapLabels(v)},g.isPresent=function(b){return typeof b.isPresent=="function"?b.isPresent:v=>v!==void 0},g.rename=function(b,v,w,E,C){const k={};for(const _ of b.$_terms.renames){const S=[],A=typeof _.from!="string";if(A)for(const I in v){if(v[I]===void 0&&_.options.ignoreUndefined||I===_.to)continue;const L=_.from.exec(I);L&&S.push({from:I,to:_.to,match:L})}else!Object.prototype.hasOwnProperty.call(v,_.from)||v[_.from]===void 0&&_.options.ignoreUndefined||S.push(_);for(const I of S){const L=I.from;let F=I.to;if(F instanceof y&&(F=F.render(v,w,E,I.match)),L!==F){if(!_.options.multiple&&k[F]&&(C.push(b.$_createError("object.rename.multiple",v,{from:L,to:F,pattern:A},w,E)),E.abortEarly)||Object.prototype.hasOwnProperty.call(v,F)&&!_.options.override&&!k[F]&&(C.push(b.$_createError("object.rename.override",v,{from:L,to:F,pattern:A},w,E)),E.abortEarly))return!1;v[L]===void 0?delete v[F]:v[F]=v[L],k[F]=!0,_.options.alias||delete v[L]}}}return!0},g.unknown=function(b,v,w,E,C,k){if(b.$_terms.patterns){let _=!1;const S=b.$_terms.patterns.map(I=>{if(I.matches)return _=!0,[]}),A=[v,...C.ancestors];for(const I of w){const L=v[I],F=[...C.path,I];for(let N=0;N{const a=s(375),l=s(8068),u=s(8160),d=s(3292),c=s(6354),f={};i.exports=l.extend({type:"link",properties:{schemaChain:!0},terms:{link:{init:null,manifest:"single",register:!1}},args:(m,p)=>m.ref(p),validate(m,p){let{schema:h,state:y,prefs:g}=p;a(h.$_terms.link,"Uninitialized link schema");const b=f.generate(h,m,y,g),v=h.$_terms.link[0].ref;return b.$_validate(m,y.nest(b,`link:${v.display}:${b.type}`),g)},generate:(m,p,h,y)=>f.generate(m,p,h,y),rules:{ref:{method(m){a(!this.$_terms.link,"Cannot reinitialize schema"),m=d.ref(m),a(m.type==="value"||m.type==="local","Invalid reference type:",m.type),a(m.type==="local"||m.ancestor==="root"||m.ancestor>0,"Link cannot reference itself");const p=this.clone();return p.$_terms.link=[{ref:m}],p}},relative:{method(){let m=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return this.$_setFlag("relative",m)}}},overrides:{concat(m){a(this.$_terms.link,"Uninitialized link schema"),a(u.isSchema(m),"Invalid schema object"),a(m.type!=="link","Cannot merge type link with another link");const p=this.clone();return p.$_terms.whens||(p.$_terms.whens=[]),p.$_terms.whens.push({concat:m}),p.$_mutateRebuild()}},manifest:{build:(m,p)=>(a(p.link,"Invalid link description missing link"),m.ref(p.link))}}),f.generate=function(m,p,h,y){let g=h.mainstay.links.get(m);if(g)return g._generate(p,h,y).schema;const b=m.$_terms.link[0].ref,{perspective:v,path:w}=f.perspective(b,h);f.assert(v,"which is outside of schema boundaries",b,m,h,y);try{g=w.length?v.$_reach(w):v}catch{f.assert(!1,"to non-existing schema",b,m,h,y)}return f.assert(g.type!=="link","which is another link",b,m,h,y),m._flags.relative||h.mainstay.links.set(m,g),g._generate(p,h,y).schema},f.perspective=function(m,p){if(m.type==="local"){for(const{schema:h,key:y}of p.schemas){if((h._flags.id||y)===m.path[0])return{perspective:h,path:m.path.slice(1)};if(h.$_terms.shared){for(const g of h.$_terms.shared)if(g._flags.id===m.path[0])return{perspective:g,path:m.path.slice(1)}}}return{perspective:null,path:null}}return m.ancestor==="root"?{perspective:p.schemas[p.schemas.length-1].schema,path:m.path}:{perspective:p.schemas[m.ancestor]&&p.schemas[m.ancestor].schema,path:m.path}},f.assert=function(m,p,h,y,g,b){m||a(!1,`"${c.label(y._flags,g,b)}" contains link reference "${h.display}" ${p}`)}},3832:(i,o,s)=>{const a=s(375),l=s(8068),u=s(8160),d={numberRx:/^\s*[+-]?(?:(?:\d+(?:\.\d*)?)|(?:\.\d+))(?:e([+-]?\d+))?\s*$/i,precisionRx:/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/,exponentialPartRegex:/[eE][+-]?\d+$/,leadingSignAndZerosRegex:/^[+-]?(0*)?/,dotRegex:/\./,trailingZerosRegex:/0+$/};i.exports=l.extend({type:"number",flags:{unsafe:{default:!1}},coerce:{from:"string",method(c,f){let{schema:m,error:p}=f;if(!c.match(d.numberRx))return;c=c.trim();const h={value:parseFloat(c)};if(h.value===0&&(h.value=0),!m._flags.unsafe)if(c.match(/e/i)){if(d.extractSignificantDigits(c)!==d.extractSignificantDigits(String(h.value)))return h.errors=p("number.unsafe"),h}else{const y=h.value.toString();if(y.match(/e/i))return h;if(y!==d.normalizeDecimal(c))return h.errors=p("number.unsafe"),h}return h}},validate(c,f){let{schema:m,error:p,prefs:h}=f;if(c===1/0||c===-1/0)return{value:c,errors:p("number.infinity")};if(!u.isNumber(c))return{value:c,errors:p("number.base")};const y={value:c};if(h.convert){const g=m.$_getRule("precision");if(g){const b=Math.pow(10,g.args.limit);y.value=Math.round(y.value*b)/b}}return y.value===0&&(y.value=0),!m._flags.unsafe&&(c>Number.MAX_SAFE_INTEGER||c"})}},integer:{method(){return this.$_addRule("integer")},validate:(c,f)=>Math.trunc(c)-c==0?c:f.error("number.integer")},less:{method(c){return this.$_addRule({name:"less",method:"compare",args:{limit:c},operator:"<"})}},max:{method(c){return this.$_addRule({name:"max",method:"compare",args:{limit:c},operator:"<="})}},min:{method(c){return this.$_addRule({name:"min",method:"compare",args:{limit:c},operator:">="})}},multiple:{method(c){return this.$_addRule({name:"multiple",args:{base:c}})},validate(c,f,m,p){let{base:h}=m;return c*(1/h)%1==0?c:f.error("number.multiple",{multiple:p.args.base,value:c})},args:[{name:"base",ref:!0,assert:c=>typeof c=="number"&&isFinite(c)&&c>0,message:"must be a positive number"}],multi:!0},negative:{method(){return this.sign("negative")}},port:{method(){return this.$_addRule("port")},validate:(c,f)=>Number.isSafeInteger(c)&&c>=0&&c<=65535?c:f.error("number.port")},positive:{method(){return this.sign("positive")}},precision:{method(c){return a(Number.isSafeInteger(c),"limit must be an integer"),this.$_addRule({name:"precision",args:{limit:c}})},validate(c,f,m){let{limit:p}=m;const h=c.toString().match(d.precisionRx);return Math.max((h[1]?h[1].length:0)-(h[2]?parseInt(h[2],10):0),0)<=p?c:f.error("number.precision",{limit:p,value:c})},convert:!0},sign:{method(c){return a(["negative","positive"].includes(c),"Invalid sign",c),this.$_addRule({name:"sign",args:{sign:c}})},validate(c,f,m){let{sign:p}=m;return p==="negative"&&c<0||p==="positive"&&c>0?c:f.error(`number.${p}`)}},unsafe:{method(){let c=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return a(typeof c=="boolean","enabled must be a boolean"),this.$_setFlag("unsafe",c)}}},cast:{string:{from:c=>typeof c=="number",to:(c,f)=>c.toString()}},messages:{"number.base":"{{#label}} must be a number","number.greater":"{{#label}} must be greater than {{#limit}}","number.infinity":"{{#label}} cannot be infinity","number.integer":"{{#label}} must be an integer","number.less":"{{#label}} must be less than {{#limit}}","number.max":"{{#label}} must be less than or equal to {{#limit}}","number.min":"{{#label}} must be greater than or equal to {{#limit}}","number.multiple":"{{#label}} must be a multiple of {{#multiple}}","number.negative":"{{#label}} must be a negative number","number.port":"{{#label}} must be a valid port","number.positive":"{{#label}} must be a positive number","number.precision":"{{#label}} must have no more than {{#limit}} decimal places","number.unsafe":"{{#label}} must be a safe number"}}),d.extractSignificantDigits=function(c){return c.replace(d.exponentialPartRegex,"").replace(d.dotRegex,"").replace(d.trailingZerosRegex,"").replace(d.leadingSignAndZerosRegex,"")},d.normalizeDecimal=function(c){return(c=c.replace(/^\+/,"").replace(/\.0*$/,"").replace(/^(-?)\.([^\.]*)$/,"$10.$2").replace(/^(-?)0+([0-9])/,"$1$2")).includes(".")&&c.endsWith("0")&&(c=c.replace(/0+$/,"")),c==="-0"?"0":c}},8966:(i,o,s)=>{const a=s(7824);i.exports=a.extend({type:"object",cast:{map:{from:l=>l&&typeof l=="object",to:(l,u)=>new Map(Object.entries(l))}}})},7417:(i,o,s)=>{const a=s(375),l=s(5380),u=s(1745),d=s(9959),c=s(6064),f=s(9926),m=s(5752),p=s(8068),h=s(8160),y={tlds:f instanceof Set&&{tlds:{allow:f,deny:null}},base64Regex:{true:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}==|[\w\-]{3}=)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/},false:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}(==)?|[\w\-]{3}=?)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}(==)?|[A-Za-z0-9+\/]{3}=?)?$/}},dataUriRegex:/^data:[\w+.-]+\/[\w+.-]+;((charset=[\w-]+|base64),)?(.*)$/,hexRegex:/^[a-f0-9]+$/i,ipRegex:d.regex({cidr:"forbidden"}).regex,isoDurationRegex:/^P(?!$)(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?$/,guidBrackets:{"{":"}","[":"]","(":")","":""},guidVersions:{uuidv1:"1",uuidv2:"2",uuidv3:"3",uuidv4:"4",uuidv5:"5"},guidSeparators:new Set([void 0,!0,!1,"-",":"]),normalizationForms:["NFC","NFD","NFKC","NFKD"]};i.exports=p.extend({type:"string",flags:{insensitive:{default:!1},truncate:{default:!1}},terms:{replacements:{init:null}},coerce:{from:"string",method(g,b){let{schema:v,state:w,prefs:E}=b;const C=v.$_getRule("normalize");C&&(g=g.normalize(C.args.form));const k=v.$_getRule("case");k&&(g=k.args.direction==="upper"?g.toLocaleUpperCase():g.toLocaleLowerCase());const _=v.$_getRule("trim");if(_&&_.args.enabled&&(g=g.trim()),v.$_terms.replacements)for(const A of v.$_terms.replacements)g=g.replace(A.pattern,A.replacement);const S=v.$_getRule("hex");if(S&&S.args.options.byteAligned&&g.length%2!=0&&(g=`0${g}`),v.$_getRule("isoDate")){const A=y.isoDate(g);A&&(g=A)}if(v._flags.truncate){const A=v.$_getRule("max");if(A){let I=A.args.limit;if(h.isResolvable(I)&&(I=I.resolve(g,w,E),!h.limit(I)))return{value:g,errors:v.$_createError("any.ref",I,{ref:A.args.limit,arg:"limit",reason:"must be a positive integer"},w,E)};g=g.slice(0,I)}}return{value:g}}},validate(g,b){let{schema:v,error:w}=b;if(typeof g!="string")return{value:g,errors:w("string.base")};if(g===""){const E=v.$_getRule("min");return E&&E.args.limit===0?void 0:{value:g,errors:w("string.empty")}}},rules:{alphanum:{method(){return this.$_addRule("alphanum")},validate:(g,b)=>/^[a-zA-Z0-9]+$/.test(g)?g:b.error("string.alphanum")},base64:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return h.assertOptions(g,["paddingRequired","urlSafe"]),g={urlSafe:!1,paddingRequired:!0,...g},a(typeof g.paddingRequired=="boolean","paddingRequired must be boolean"),a(typeof g.urlSafe=="boolean","urlSafe must be boolean"),this.$_addRule({name:"base64",args:{options:g}})},validate(g,b,v){let{options:w}=v;return y.base64Regex[w.paddingRequired][w.urlSafe].test(g)?g:b.error("string.base64")}},case:{method(g){return a(["lower","upper"].includes(g),"Invalid case:",g),this.$_addRule({name:"case",args:{direction:g}})},validate(g,b,v){let{direction:w}=v;return w==="lower"&&g===g.toLocaleLowerCase()||w==="upper"&&g===g.toLocaleUpperCase()?g:b.error(`string.${w}case`)},convert:!0},creditCard:{method(){return this.$_addRule("creditCard")},validate(g,b){let v=g.length,w=0,E=1;for(;v--;){const C=g.charAt(v)*E;w+=C-9*(C>9),E^=3}return w>0&&w%10==0?g:b.error("string.creditCard")}},dataUri:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return h.assertOptions(g,["paddingRequired"]),g={paddingRequired:!0,...g},a(typeof g.paddingRequired=="boolean","paddingRequired must be boolean"),this.$_addRule({name:"dataUri",args:{options:g}})},validate(g,b,v){let{options:w}=v;const E=g.match(y.dataUriRegex);return E&&(!E[2]||E[2]!=="base64"||y.base64Regex[w.paddingRequired].false.test(E[3]))?g:b.error("string.dataUri")}},domain:{method(g){g&&h.assertOptions(g,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const b=y.addressOptions(g);return this.$_addRule({name:"domain",args:{options:g},address:b})},validate(g,b,v,w){let{address:E}=w;return l.isValid(g,E)?g:b.error("string.domain")}},email:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};h.assertOptions(g,["allowFullyQualified","allowUnicode","ignoreLength","maxDomainSegments","minDomainSegments","multiple","separator","tlds"]),a(g.multiple===void 0||typeof g.multiple=="boolean","multiple option must be an boolean");const b=y.addressOptions(g),v=new RegExp(`\\s*[${g.separator?c(g.separator):","}]\\s*`);return this.$_addRule({name:"email",args:{options:g},regex:v,address:b})},validate(g,b,v,w){let{options:E}=v,{regex:C,address:k}=w;const _=E.multiple?g.split(C):[g],S=[];for(const A of _)u.isValid(A,k)||S.push(A);return S.length?b.error("string.email",{value:g,invalids:S}):g}},guid:{alias:"uuid",method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};h.assertOptions(g,["version","separator"]);let b="";if(g.version){const E=[].concat(g.version);a(E.length>=1,"version must have at least 1 valid version specified");const C=new Set;for(let k=0;k0&&arguments[0]!==void 0?arguments[0]:{};return h.assertOptions(g,["byteAligned"]),g={byteAligned:!1,...g},a(typeof g.byteAligned=="boolean","byteAligned must be boolean"),this.$_addRule({name:"hex",args:{options:g}})},validate(g,b,v){let{options:w}=v;return y.hexRegex.test(g)?w.byteAligned&&g.length%2!=0?b.error("string.hexAlign"):g:b.error("string.hex")}},hostname:{method(){return this.$_addRule("hostname")},validate:(g,b)=>l.isValid(g,{minDomainSegments:1})||y.ipRegex.test(g)?g:b.error("string.hostname")},insensitive:{method(){return this.$_setFlag("insensitive",!0)}},ip:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};h.assertOptions(g,["cidr","version"]);const{cidr:b,versions:v,regex:w}=d.regex(g),E=g.version?v:void 0;return this.$_addRule({name:"ip",args:{options:{cidr:b,version:E}},regex:w})},validate(g,b,v,w){let{options:E}=v,{regex:C}=w;return C.test(g)?g:E.version?b.error("string.ipVersion",{value:g,cidr:E.cidr,version:E.version}):b.error("string.ip",{value:g,cidr:E.cidr})}},isoDate:{method(){return this.$_addRule("isoDate")},validate(g,b){let{error:v}=b;return y.isoDate(g)?g:v("string.isoDate")}},isoDuration:{method(){return this.$_addRule("isoDuration")},validate:(g,b)=>y.isoDurationRegex.test(g)?g:b.error("string.isoDuration")},length:{method(g,b){return y.length(this,"length",g,"=",b)},validate(g,b,v,w){let{limit:E,encoding:C}=v,{name:k,operator:_,args:S}=w;const A=!C&&g.length;return h.compare(A,E,_)?g:b.error("string."+k,{limit:S.limit,value:g,encoding:C})},args:[{name:"limit",ref:!0,assert:h.limit,message:"must be a positive integer"},"encoding"]},lowercase:{method(){return this.case("lower")}},max:{method(g,b){return y.length(this,"max",g,"<=",b)},args:["limit","encoding"]},min:{method(g,b){return y.length(this,"min",g,">=",b)},args:["limit","encoding"]},normalize:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"NFC";return a(y.normalizationForms.includes(g),"normalization form must be one of "+y.normalizationForms.join(", ")),this.$_addRule({name:"normalize",args:{form:g}})},validate(g,b,v){let{error:w}=b,{form:E}=v;return g===g.normalize(E)?g:w("string.normalize",{value:g,form:E})},convert:!0},pattern:{alias:"regex",method(g){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};a(g instanceof RegExp,"regex must be a RegExp"),a(!g.flags.includes("g")&&!g.flags.includes("y"),"regex should not use global or sticky mode"),typeof b=="string"&&(b={name:b}),h.assertOptions(b,["invert","name"]);const v=["string.pattern",b.invert?".invert":"",b.name?".name":".base"].join("");return this.$_addRule({name:"pattern",args:{regex:g,options:b},errorCode:v})},validate(g,b,v,w){let{regex:E,options:C}=v,{errorCode:k}=w;return E.test(g)^C.invert?g:b.error(k,{name:C.name,regex:E,value:g})},args:["regex","options"],multi:!0},replace:{method(g,b){typeof g=="string"&&(g=new RegExp(c(g),"g")),a(g instanceof RegExp,"pattern must be a RegExp"),a(typeof b=="string","replacement must be a String");const v=this.clone();return v.$_terms.replacements||(v.$_terms.replacements=[]),v.$_terms.replacements.push({pattern:g,replacement:b}),v}},token:{method(){return this.$_addRule("token")},validate:(g,b)=>/^\w+$/.test(g)?g:b.error("string.token")},trim:{method(){let g=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return a(typeof g=="boolean","enabled must be a boolean"),this.$_addRule({name:"trim",args:{enabled:g}})},validate(g,b,v){let{enabled:w}=v;return w&&g!==g.trim()?b.error("string.trim"):g},convert:!0},truncate:{method(){let g=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return a(typeof g=="boolean","enabled must be a boolean"),this.$_setFlag("truncate",g)}},uppercase:{method(){return this.case("upper")}},uri:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};h.assertOptions(g,["allowRelative","allowQuerySquareBrackets","domain","relativeOnly","scheme"]),g.domain&&h.assertOptions(g.domain,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const{regex:b,scheme:v}=m.regex(g),w=g.domain?y.addressOptions(g.domain):null;return this.$_addRule({name:"uri",args:{options:g},regex:b,domain:w,scheme:v})},validate(g,b,v,w){let{options:E}=v,{regex:C,domain:k,scheme:_}=w;if(["http:/","https:/"].includes(g))return b.error("string.uri");const S=C.exec(g);if(S){const A=S[1]||S[2];return!k||E.allowRelative&&!A||l.isValid(A,k)?g:b.error("string.domain",{value:A})}return E.relativeOnly?b.error("string.uriRelativeOnly"):E.scheme?b.error("string.uriCustomScheme",{scheme:_,value:g}):b.error("string.uri")}}},manifest:{build(g,b){if(b.replacements)for(const{pattern:v,replacement:w}of b.replacements)g=g.replace(v,w);return g}},messages:{"string.alphanum":"{{#label}} must only contain alpha-numeric characters","string.base":"{{#label}} must be a string","string.base64":"{{#label}} must be a valid base64 string","string.creditCard":"{{#label}} must be a credit card","string.dataUri":"{{#label}} must be a valid dataUri string","string.domain":"{{#label}} must contain a valid domain name","string.email":"{{#label}} must be a valid email","string.empty":"{{#label}} is not allowed to be empty","string.guid":"{{#label}} must be a valid GUID","string.hex":"{{#label}} must only contain hexadecimal characters","string.hexAlign":"{{#label}} hex decoded representation must be byte aligned","string.hostname":"{{#label}} must be a valid hostname","string.ip":"{{#label}} must be a valid ip address with a {{#cidr}} CIDR","string.ipVersion":"{{#label}} must be a valid ip address of one of the following versions {{#version}} with a {{#cidr}} CIDR","string.isoDate":"{{#label}} must be in iso format","string.isoDuration":"{{#label}} must be a valid ISO 8601 duration","string.length":"{{#label}} length must be {{#limit}} characters long","string.lowercase":"{{#label}} must only contain lowercase characters","string.max":"{{#label}} length must be less than or equal to {{#limit}} characters long","string.min":"{{#label}} length must be at least {{#limit}} characters long","string.normalize":"{{#label}} must be unicode normalized in the {{#form}} form","string.token":"{{#label}} must only contain alpha-numeric and underscore characters","string.pattern.base":"{{#label}} with value {:[.]} fails to match the required pattern: {{#regex}}","string.pattern.name":"{{#label}} with value {:[.]} fails to match the {{#name}} pattern","string.pattern.invert.base":"{{#label}} with value {:[.]} matches the inverted pattern: {{#regex}}","string.pattern.invert.name":"{{#label}} with value {:[.]} matches the inverted {{#name}} pattern","string.trim":"{{#label}} must not have leading or trailing whitespace","string.uri":"{{#label}} must be a valid uri","string.uriCustomScheme":"{{#label}} must be a valid uri with a scheme matching the {{#scheme}} pattern","string.uriRelativeOnly":"{{#label}} must be a valid relative uri","string.uppercase":"{{#label}} must only contain uppercase characters"}}),y.addressOptions=function(g){if(!g||(a(g.minDomainSegments===void 0||Number.isSafeInteger(g.minDomainSegments)&&g.minDomainSegments>0,"minDomainSegments must be a positive integer"),a(g.maxDomainSegments===void 0||Number.isSafeInteger(g.maxDomainSegments)&&g.maxDomainSegments>0,"maxDomainSegments must be a positive integer"),g.tlds===!1))return g;if(g.tlds===!0||g.tlds===void 0)return a(y.tlds,"Built-in TLD list disabled"),Object.assign({},g,y.tlds);a(typeof g.tlds=="object","tlds must be true, false, or an object");const b=g.tlds.deny;if(b)return Array.isArray(b)&&(g=Object.assign({},g,{tlds:{deny:new Set(b)}})),a(g.tlds.deny instanceof Set,"tlds.deny must be an array, Set, or boolean"),a(!g.tlds.allow,"Cannot specify both tlds.allow and tlds.deny lists"),y.validateTlds(g.tlds.deny,"tlds.deny"),g;const v=g.tlds.allow;return v?v===!0?(a(y.tlds,"Built-in TLD list disabled"),Object.assign({},g,y.tlds)):(Array.isArray(v)&&(g=Object.assign({},g,{tlds:{allow:new Set(v)}})),a(g.tlds.allow instanceof Set,"tlds.allow must be an array, Set, or boolean"),y.validateTlds(g.tlds.allow,"tlds.allow"),g):g},y.validateTlds=function(g,b){for(const v of g)a(l.isValid(v,{minDomainSegments:1,maxDomainSegments:1}),`${b} must contain valid top level domain names`)},y.isoDate=function(g){if(!h.isIsoDate(g))return null;/.*T.*[+-]\d\d$/.test(g)&&(g+="00");const b=new Date(g);return isNaN(b.getTime())?null:b.toISOString()},y.length=function(g,b,v,w,E){return a(!E||!1,"Invalid encoding:",E),g.$_addRule({name:b,method:"length",args:{limit:v,encoding:E},operator:w})}},8826:(i,o,s)=>{const a=s(375),l=s(8068),u={};u.Map=class extends Map{slice(){return new u.Map(this)}},i.exports=l.extend({type:"symbol",terms:{map:{init:new u.Map}},coerce:{method(d,c){let{schema:f,error:m}=c;const p=f.$_terms.map.get(d);return p&&(d=p),f._flags.only&&typeof d!="symbol"?{value:d,errors:m("symbol.map",{map:f.$_terms.map})}:{value:d}}},validate(d,c){let{error:f}=c;if(typeof d!="symbol")return{value:d,errors:f("symbol.base")}},rules:{map:{method(d){d&&!d[Symbol.iterator]&&typeof d=="object"&&(d=Object.entries(d)),a(d&&d[Symbol.iterator],"Iterable must be an iterable or object");const c=this.clone(),f=[];for(const m of d){a(m&&m[Symbol.iterator],"Entry must be an iterable");const[p,h]=m;a(typeof p!="object"&&typeof p!="function"&&typeof p!="symbol","Key must not be of type object, function, or Symbol"),a(typeof h=="symbol","Value must be a Symbol"),c.$_terms.map.set(p,h),f.push(h)}return c.valid(...f)}}},manifest:{build:(d,c)=>(c.map&&(d=d.map(c.map)),d)},messages:{"symbol.base":"{{#label}} must be a symbol","symbol.map":"{{#label}} must be one of {{#map}}"}})},8863:(i,o,s)=>{const a=s(375),l=s(8571),u=s(738),d=s(9621),c=s(8160),f=s(6354),m=s(493),p={result:Symbol("result")};o.entry=function(h,y,g){let b=c.defaults;g&&(a(g.warnings===void 0,"Cannot override warnings preference in synchronous validation"),a(g.artifacts===void 0,"Cannot override artifacts preference in synchronous validation"),b=c.preferences(c.defaults,g));const v=p.entry(h,y,b);a(!v.mainstay.externals.length,"Schema with external rules must use validateAsync()");const w={value:v.value};return v.error&&(w.error=v.error),v.mainstay.warnings.length&&(w.warning=f.details(v.mainstay.warnings)),v.mainstay.debug&&(w.debug=v.mainstay.debug),v.mainstay.artifacts&&(w.artifacts=v.mainstay.artifacts),w},o.entryAsync=async function(h,y,g){let b=c.defaults;g&&(b=c.preferences(c.defaults,g));const v=p.entry(h,y,b),w=v.mainstay;if(v.error)throw w.debug&&(v.error.debug=w.debug),v.error;if(w.externals.length){let C=v.value;const k=[];for(const _ of w.externals){const S=_.state.path,A=_.schema.type==="link"?w.links.get(_.schema):null;let I,L,F=C;const N=S.length?[C]:[],R=S.length?d(h,S):h;if(S.length){I=S[S.length-1];let B=C;for(const V of S.slice(0,-1))B=B[V],N.unshift(B);L=N[0],F=L[I]}try{const B=(j,W)=>(A||_.schema).$_createError(j,F,W,_.state,b),V=await _.method(F,{schema:_.schema,linked:A,state:_.state,prefs:g,original:R,error:B,errorsArray:p.errorsArray,warn:(j,W)=>w.warnings.push((A||_.schema).$_createError(j,F,W,_.state,b)),message:(j,W)=>(A||_.schema).$_createError("external",F,W,_.state,b,{messages:j})});if(V===void 0||V===F)continue;if(V instanceof f.Report){if(w.tracer.log(_.schema,_.state,"rule","external","error"),k.push(V),b.abortEarly)break;continue}if(Array.isArray(V)&&V[c.symbols.errors]){if(w.tracer.log(_.schema,_.state,"rule","external","error"),k.push(...V),b.abortEarly)break;continue}L?(w.tracer.value(_.state,"rule",F,V,"external"),L[I]=V):(w.tracer.value(_.state,"rule",C,V,"external"),C=V)}catch(B){throw b.errors.label&&(B.message+=` (${_.label})`),B}}if(v.value=C,k.length)throw v.error=f.process(k,h,b),w.debug&&(v.error.debug=w.debug),v.error}if(!b.warnings&&!b.debug&&!b.artifacts)return v.value;const E={value:v.value};return w.warnings.length&&(E.warning=f.details(w.warnings)),w.debug&&(E.debug=w.debug),w.artifacts&&(E.artifacts=w.artifacts),E},p.Mainstay=class{constructor(h,y,g){this.externals=[],this.warnings=[],this.tracer=h,this.debug=y,this.links=g,this.shadow=null,this.artifacts=null,this._snapshots=[]}snapshot(){this._snapshots.push({externals:this.externals.slice(),warnings:this.warnings.slice()})}restore(){const h=this._snapshots.pop();this.externals=h.externals,this.warnings=h.warnings}},p.entry=function(h,y,g){const{tracer:b,cleanup:v}=p.tracer(y,g),w=g.debug?[]:null,E=y._ids._schemaChain?new Map:null,C=new p.Mainstay(b,w,E),k=y._ids._schemaChain?[{schema:y}]:null,_=new m([],[],{mainstay:C,schemas:k}),S=o.validate(h,y,_,g);v&&y.$_root.untrace();const A=f.process(S.errors,h,g);return{value:S.value,error:A,mainstay:C}},p.tracer=function(h,y){return h.$_root._tracer?{tracer:h.$_root._tracer._register(h)}:y.debug?(a(h.$_root.trace,"Debug mode not supported"),{tracer:h.$_root.trace()._register(h),cleanup:!0}):{tracer:p.ignore}},o.validate=function(h,y,g,b){let v=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{};if(y.$_terms.whens&&(y=y._generate(h,g,b).schema),y._preferences&&(b=p.prefs(y,b)),y._cache&&b.cache){const A=y._cache.get(h);if(g.mainstay.tracer.debug(g,"validate","cached",!!A),A)return A}const w=(A,I,L)=>y.$_createError(A,h,I,L||g,b),E={original:h,prefs:b,schema:y,state:g,error:w,errorsArray:p.errorsArray,warn:(A,I,L)=>g.mainstay.warnings.push(w(A,I,L)),message:(A,I)=>y.$_createError("custom",h,I,g,b,{messages:A})};g.mainstay.tracer.entry(y,g);const C=y._definition;if(C.prepare&&h!==void 0&&b.convert){const A=C.prepare(h,E);if(A){if(g.mainstay.tracer.value(g,"prepare",h,A.value),A.errors)return p.finalize(A.value,[].concat(A.errors),E);h=A.value}}if(C.coerce&&h!==void 0&&b.convert&&(!C.coerce.from||C.coerce.from.includes(typeof h))){const A=C.coerce.method(h,E);if(A){if(g.mainstay.tracer.value(g,"coerced",h,A.value),A.errors)return p.finalize(A.value,[].concat(A.errors),E);h=A.value}}const k=y._flags.empty;k&&k.$_match(p.trim(h,y),g.nest(k),c.defaults)&&(g.mainstay.tracer.value(g,"empty",h,void 0),h=void 0);const _=v.presence||y._flags.presence||(y._flags._endedSwitch?null:b.presence);if(h===void 0){if(_==="forbidden")return p.finalize(h,null,E);if(_==="required")return p.finalize(h,[y.$_createError("any.required",h,null,g,b)],E);if(_==="optional"){if(y._flags.default!==c.symbols.deepDefault)return p.finalize(h,null,E);g.mainstay.tracer.value(g,"default",h,{}),h={}}}else if(_==="forbidden")return p.finalize(h,[y.$_createError("any.unknown",h,null,g,b)],E);const S=[];if(y._valids){const A=y._valids.get(h,g,b,y._flags.insensitive);if(A)return b.convert&&(g.mainstay.tracer.value(g,"valids",h,A.value),h=A.value),g.mainstay.tracer.filter(y,g,"valid",A),p.finalize(h,null,E);if(y._flags.only){const I=y.$_createError("any.only",h,{valids:y._valids.values({display:!0})},g,b);if(b.abortEarly)return p.finalize(h,[I],E);S.push(I)}}if(y._invalids){const A=y._invalids.get(h,g,b,y._flags.insensitive);if(A){g.mainstay.tracer.filter(y,g,"invalid",A);const I=y.$_createError("any.invalid",h,{invalids:y._invalids.values({display:!0})},g,b);if(b.abortEarly)return p.finalize(h,[I],E);S.push(I)}}if(C.validate){const A=C.validate(h,E);if(A&&(g.mainstay.tracer.value(g,"base",h,A.value),h=A.value,A.errors)){if(!Array.isArray(A.errors))return S.push(A.errors),p.finalize(h,S,E);if(A.errors.length)return S.push(...A.errors),p.finalize(h,S,E)}}return y._rules.length?p.rules(h,S,E):p.finalize(h,S,E)},p.rules=function(h,y,g){const{schema:b,state:v,prefs:w}=g;for(const E of b._rules){const C=b._definition.rules[E.method];if(C.convert&&w.convert){v.mainstay.tracer.log(b,v,"rule",E.name,"full");continue}let k,_=E.args;if(E._resolve.length){_=Object.assign({},_);for(const A of E._resolve){const I=C.argsByName.get(A),L=_[A].resolve(h,v,w),F=I.normalize?I.normalize(L):L,N=c.validateArg(F,null,I);if(N){k=b.$_createError("any.ref",L,{arg:A,ref:_[A],reason:N},v,w);break}_[A]=F}}k=k||C.validate(h,g,_,E);const S=p.rule(k,E);if(S.errors){if(v.mainstay.tracer.log(b,v,"rule",E.name,"error"),E.warn){v.mainstay.warnings.push(...S.errors);continue}if(w.abortEarly)return p.finalize(h,S.errors,g);y.push(...S.errors)}else v.mainstay.tracer.log(b,v,"rule",E.name,"pass"),v.mainstay.tracer.value(v,"rule",h,S.value,E.name),h=S.value}return p.finalize(h,y,g)},p.rule=function(h,y){return h instanceof f.Report?(p.error(h,y),{errors:[h],value:null}):Array.isArray(h)&&h[c.symbols.errors]?(h.forEach(g=>p.error(g,y)),{errors:h,value:null}):{errors:null,value:h}},p.error=function(h,y){return y.message&&h._setTemplate(y.message),h},p.finalize=function(h,y,g){y=y||[];const{schema:b,state:v,prefs:w}=g;if(y.length){const C=p.default("failover",void 0,y,g);C!==void 0&&(v.mainstay.tracer.value(v,"failover",h,C),h=C,y=[])}if(y.length&&b._flags.error)if(typeof b._flags.error=="function"){y=b._flags.error(y),Array.isArray(y)||(y=[y]);for(const C of y)a(C instanceof Error||C instanceof f.Report,"error() must return an Error object")}else y=[b._flags.error];if(h===void 0){const C=p.default("default",h,y,g);v.mainstay.tracer.value(v,"default",h,C),h=C}if(b._flags.cast&&h!==void 0){const C=b._definition.cast[b._flags.cast];if(C.from(h)){const k=C.to(h,g);v.mainstay.tracer.value(v,"cast",h,k,b._flags.cast),h=k}}if(b.$_terms.externals&&w.externals&&w._externals!==!1)for(const{method:C}of b.$_terms.externals)v.mainstay.externals.push({method:C,schema:b,state:v,label:f.label(b._flags,v,w)});const E={value:h,errors:y.length?y:null};return b._flags.result&&(E.value=b._flags.result==="strip"?void 0:g.original,v.mainstay.tracer.value(v,b._flags.result,h,E.value),v.shadow(h,b._flags.result)),b._cache&&w.cache!==!1&&!b._refs.length&&b._cache.set(g.original,E),h===void 0||E.errors||b._flags.artifact===void 0||(v.mainstay.artifacts=v.mainstay.artifacts||new Map,v.mainstay.artifacts.has(b._flags.artifact)||v.mainstay.artifacts.set(b._flags.artifact,[]),v.mainstay.artifacts.get(b._flags.artifact).push(v.path)),E},p.prefs=function(h,y){const g=y===c.defaults;return g&&h._preferences[c.symbols.prefs]?h._preferences[c.symbols.prefs]:(y=c.preferences(y,h._preferences),g&&(h._preferences[c.symbols.prefs]=y),y)},p.default=function(h,y,g,b){const{schema:v,state:w,prefs:E}=b,C=v._flags[h];if(E.noDefaults||C===void 0)return y;if(w.mainstay.tracer.log(v,w,"rule",h,"full"),!C)return C;if(typeof C=="function"){const k=C.length?[l(w.ancestors[0]),b]:[];try{return C(...k)}catch(_){return void g.push(v.$_createError(`any.${h}`,null,{error:_},w,E))}}return typeof C!="object"?C:C[c.symbols.literal]?C.literal:c.isResolvable(C)?C.resolve(y,w,E):l(C)},p.trim=function(h,y){if(typeof h!="string")return h;const g=y.$_getRule("trim");return g&&g.args.enabled?h.trim():h},p.ignore={active:!1,debug:u,entry:u,filter:u,log:u,resolve:u,value:u},p.errorsArray=function(){const h=[];return h[c.symbols.errors]=!0,h}},2036:(i,o,s)=>{const a=s(375),l=s(9474),u=s(8160),d={};i.exports=d.Values=class{constructor(c,f){this._values=new Set(c),this._refs=new Set(f),this._lowercase=d.lowercases(c),this._override=!1}get length(){return this._values.size+this._refs.size}add(c,f){u.isResolvable(c)?this._refs.has(c)||(this._refs.add(c),f&&f.register(c)):this.has(c,null,null,!1)||(this._values.add(c),typeof c=="string"&&this._lowercase.set(c.toLowerCase(),c))}static merge(c,f,m){if(c=c||new d.Values,f){if(f._override)return f.clone();for(const p of[...f._values,...f._refs])c.add(p)}if(m)for(const p of[...m._values,...m._refs])c.remove(p);return c.length?c:null}remove(c){u.isResolvable(c)?this._refs.delete(c):(this._values.delete(c),typeof c=="string"&&this._lowercase.delete(c.toLowerCase()))}has(c,f,m,p){return!!this.get(c,f,m,p)}get(c,f,m,p){if(!this.length)return!1;if(this._values.has(c))return{value:c};if(typeof c=="string"&&c&&p){const h=this._lowercase.get(c.toLowerCase());if(h)return{value:h}}if(!this._refs.size&&typeof c!="object")return!1;if(typeof c=="object"){for(const h of this._values)if(l(h,c))return{value:h}}if(f)for(const h of this._refs){const y=h.resolve(c,f,m,null,{in:!0});if(y===void 0)continue;const g=h.in&&typeof y=="object"?Array.isArray(y)?y:Object.keys(y):[y];for(const b of g)if(typeof b==typeof c){if(p&&c&&typeof c=="string"){if(b.toLowerCase()===c.toLowerCase())return{value:b,ref:h}}else if(l(b,c))return{value:b,ref:h}}}return!1}override(){this._override=!0}values(c){if(c&&c.display){const f=[];for(const m of[...this._values,...this._refs])m!==void 0&&f.push(m);return f}return Array.from([...this._values,...this._refs])}clone(){const c=new d.Values(this._values,this._refs);return c._override=this._override,c}concat(c){a(!c._override,"Cannot concat override set of values");const f=new d.Values([...this._values,...c._values],[...this._refs,...c._refs]);return f._override=this._override,f}describe(){const c=[];this._override&&c.push({override:!0});for(const f of this._values.values())c.push(f&&typeof f=="object"?{value:f}:f);for(const f of this._refs.values())c.push(f.describe());return c}},d.Values.prototype[u.symbols.values]=!0,d.Values.prototype.slice=d.Values.prototype.clone,d.lowercases=function(c){const f=new Map;if(c)for(const m of c)typeof m=="string"&&f.set(m.toLowerCase(),m);return f}},978:(i,o,s)=>{const a=s(375),l=s(8571),u=s(1687),d=s(9621),c={};i.exports=function(f,m){let p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(a(f&&typeof f=="object","Invalid defaults value: must be an object"),a(!m||m===!0||typeof m=="object","Invalid source value: must be true, falsy or an object"),a(typeof p=="object","Invalid options: must be an object"),!m)return null;if(p.shallow)return c.applyToDefaultsWithShallow(f,m,p);const h=l(f);if(m===!0)return h;const y=p.nullOverride!==void 0&&p.nullOverride;return u(h,m,{nullOverride:y,mergeArrays:!1})},c.applyToDefaultsWithShallow=function(f,m,p){const h=p.shallow;a(Array.isArray(h),"Invalid keys");const y=new Map,g=m===!0?null:new Set;for(let w of h){w=Array.isArray(w)?w:w.split(".");const E=d(f,w);E&&typeof E=="object"?y.set(E,g&&d(m,w)||E):g&&g.add(w)}const b=l(f,{},y);if(!g)return b;for(const w of g)c.reachCopy(b,m,w);const v=p.nullOverride!==void 0&&p.nullOverride;return u(b,m,{nullOverride:v,mergeArrays:!1})},c.reachCopy=function(f,m,p){for(const g of p){if(!(g in m))return;const b=m[g];if(typeof b!="object"||b===null)return;m=b}const h=m;let y=f;for(let g=0;g{const a=s(7916);i.exports=function(l){if(!l){for(var u=arguments.length,d=new Array(u>1?u-1:0),c=1;c{const a=s(9621),l=s(4277),u=s(7043),d={needsProtoHack:new Set([l.set,l.map,l.weakSet,l.weakMap])};i.exports=d.clone=function(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(typeof c!="object"||c===null)return c;let p=d.clone,h=m;if(f.shallow){if(f.shallow!==!0)return d.cloneWithShallow(c,f);p=v=>v}else if(h){const v=h.get(c);if(v)return v}else h=new Map;const y=l.getInternalProto(c);if(y===l.buffer)return!1;if(y===l.date)return new Date(c.getTime());if(y===l.regex)return new RegExp(c);const g=d.base(c,y,f);if(g===c)return c;if(h&&h.set(c,g),y===l.set)for(const v of c)g.add(p(v,f,h));else if(y===l.map)for(const[v,w]of c)g.set(v,p(w,f,h));const b=u.keys(c,f);for(const v of b){if(v==="__proto__")continue;if(y===l.array&&v==="length"){g.length=c.length;continue}const w=Object.getOwnPropertyDescriptor(c,v);w?w.get||w.set?Object.defineProperty(g,v,w):w.enumerable?g[v]=p(c[v],f,h):Object.defineProperty(g,v,{enumerable:!1,writable:!0,configurable:!0,value:p(c[v],f,h)}):Object.defineProperty(g,v,{enumerable:!0,writable:!0,configurable:!0,value:p(c[v],f,h)})}return g},d.cloneWithShallow=function(c,f){const m=f.shallow;(f=Object.assign({},f)).shallow=!1;const p=new Map;for(const h of m){const y=a(c,h);typeof y!="object"&&typeof y!="function"||p.set(y,y)}return d.clone(c,f,p)},d.base=function(c,f,m){if(m.prototype===!1)return d.needsProtoHack.has(f)?new f.constructor:f===l.array?[]:{};const p=Object.getPrototypeOf(c);if(p&&p.isImmutable)return c;if(f===l.array){const h=[];return p!==f&&Object.setPrototypeOf(h,p),h}if(d.needsProtoHack.has(f)){const h=new p.constructor;return p!==f&&Object.setPrototypeOf(h,p),h}return Object.create(p)}},9474:(i,o,s)=>{const a=s(4277),l={mismatched:null};i.exports=function(u,d,c){return c=Object.assign({prototype:!0},c),!!l.isDeepEqual(u,d,c,[])},l.isDeepEqual=function(u,d,c,f){if(u===d)return u!==0||1/u==1/d;const m=typeof u;if(m!==typeof d||u===null||d===null)return!1;if(m==="function"){if(!c.deepFunction||u.toString()!==d.toString())return!1}else if(m!=="object")return u!=u&&d!=d;const p=l.getSharedType(u,d,!!c.prototype);switch(p){case a.buffer:return!1;case a.promise:return u===d;case a.regex:return u.toString()===d.toString();case l.mismatched:return!1}for(let h=f.length-1;h>=0;--h)if(f[h].isSame(u,d))return!0;f.push(new l.SeenEntry(u,d));try{return!!l.isDeepEqualObj(p,u,d,c,f)}finally{f.pop()}},l.getSharedType=function(u,d,c){if(c)return Object.getPrototypeOf(u)!==Object.getPrototypeOf(d)?l.mismatched:a.getInternalProto(u);const f=a.getInternalProto(u);return f!==a.getInternalProto(d)?l.mismatched:f},l.valueOf=function(u){const d=u.valueOf;if(d===void 0)return u;try{return d.call(u)}catch(c){return c}},l.hasOwnEnumerableProperty=function(u,d){return Object.prototype.propertyIsEnumerable.call(u,d)},l.isSetSimpleEqual=function(u,d){for(const c of Set.prototype.values.call(u))if(!Set.prototype.has.call(d,c))return!1;return!0},l.isDeepEqualObj=function(u,d,c,f,m){const{isDeepEqual:p,valueOf:h,hasOwnEnumerableProperty:y}=l,{keys:g,getOwnPropertySymbols:b}=Object;if(u===a.array){if(!f.part){if(d.length!==c.length)return!1;for(let k=0;k{const a=s(8761);i.exports=class extends Error{constructor(l){super(l.filter(u=>u!=="").map(u=>typeof u=="string"?u:u instanceof Error?u.message:a(u)).join(" ")||"Unknown error"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,o.assert)}}},5277:i=>{const o={};i.exports=function(s){if(!s)return"";let a="";for(let l=0;l=256?"&#"+s+";":`&#x${s.toString(16).padStart(2,"0")};`)},o.isSafe=function(s){return o.safeCharCodes.has(s)},o.namedHtml=new Map([[38,"&"],[60,"<"],[62,">"],[34,"""],[160," "],[162,"¢"],[163,"£"],[164,"¤"],[169,"©"],[174,"®"]]),o.safeCharCodes=function(){const s=new Set;for(let a=32;a<123;++a)(a>=97||a>=65&&a<=90||a>=48&&a<=57||a===32||a===46||a===44||a===45||a===58||a===95)&&s.add(a);return s}()},6064:i=>{i.exports=function(o){return o.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}},738:i=>{i.exports=function(){}},1687:(i,o,s)=>{const a=s(375),l=s(8571),u=s(7043),d={};i.exports=d.merge=function(c,f,m){if(a(c&&typeof c=="object","Invalid target value: must be an object"),a(f==null||typeof f=="object","Invalid source value: must be null, undefined, or an object"),!f)return c;if(m=Object.assign({nullOverride:!0,mergeArrays:!0},m),Array.isArray(f)){a(Array.isArray(c),"Cannot merge array onto an object"),m.mergeArrays||(c.length=0);for(let h=0;h{const a=s(375),l={};i.exports=function(u,d,c){if(d===!1||d==null)return u;typeof(c=c||{})=="string"&&(c={separator:c});const f=Array.isArray(d);a(!f||!c.separator,"Separator option is not valid for array-based chain");const m=f?d:d.split(c.separator||".");let p=u;for(let h=0;h{i.exports=function(){try{return JSON.stringify(...arguments)}catch(o){return"[Cannot display object: "+o.message+"]"}}},4277:(i,o)=>{const s={};o=i.exports={array:Array.prototype,buffer:!1,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype},s.typeMap=new Map([["[object Error]",o.error],["[object Map]",o.map],["[object Promise]",o.promise],["[object Set]",o.set],["[object WeakMap]",o.weakMap],["[object WeakSet]",o.weakSet]]),o.getInternalProto=function(a){if(Array.isArray(a))return o.array;if(a instanceof Date)return o.date;if(a instanceof RegExp)return o.regex;if(a instanceof Error)return o.error;const l=Object.prototype.toString.call(a);return s.typeMap.get(l)||o.generic}},7043:(i,o)=>{o.keys=function(s){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).symbols!==!1?Reflect.ownKeys(s):Object.getOwnPropertyNames(s)}},3652:(i,o,s)=>{const a=s(375),l={};o.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(u,d){const c=[].concat((d=d||{}).before||[]),f=[].concat(d.after||[]),m=d.group||"?",p=d.sort||0;a(!c.includes(m),`Item cannot come before itself: ${m}`),a(!c.includes("?"),"Item cannot come before unassociated items"),a(!f.includes(m),`Item cannot come after itself: ${m}`),a(!f.includes("?"),"Item cannot come after unassociated items"),Array.isArray(u)||(u=[u]);for(const h of u){const y={seq:this._items.length,sort:p,before:c,after:f,group:m,node:h};this._items.push(y)}if(!d.manual){const h=this._sort();a(h,"item",m!=="?"?`added into group ${m}`:"","created a dependencies error")}return this.nodes}merge(u){Array.isArray(u)||(u=[u]);for(const c of u)if(c)for(const f of c._items)this._items.push(Object.assign({},f));this._items.sort(l.mergeSort);for(let c=0;cu.sort===d.sort?0:u.sort{const a=s(443),l=s(2178),u={minDomainSegments:2,nonAsciiRx:/[^\x00-\x7f]/,domainControlRx:/[\x00-\x20@\:\/\\#!\$&\'\(\)\*\+,;=\?]/,tldSegmentRx:/^[a-zA-Z](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,domainSegmentRx:/^[a-zA-Z0-9](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,URL:a.URL||URL};o.analyze=function(d){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!d)return l.code("DOMAIN_NON_EMPTY_STRING");if(typeof d!="string")throw new Error("Invalid input: domain must be a string");if(d.length>256)return l.code("DOMAIN_TOO_LONG");if(u.nonAsciiRx.test(d)){if(c.allowUnicode===!1)return l.code("DOMAIN_INVALID_UNICODE_CHARS");d=d.normalize("NFC")}if(u.domainControlRx.test(d))return l.code("DOMAIN_INVALID_CHARS");d=u.punycode(d),c.allowFullyQualified&&d[d.length-1]==="."&&(d=d.slice(0,-1));const f=c.minDomainSegments||u.minDomainSegments,m=d.split(".");if(m.lengthc.maxDomainSegments)return l.code("DOMAIN_SEGMENTS_COUNT_MAX");const p=c.tlds;if(p){const h=m[m.length-1].toLowerCase();if(p.deny&&p.deny.has(h)||p.allow&&!p.allow.has(h))return l.code("DOMAIN_FORBIDDEN_TLDS")}for(let h=0;h63)return l.code("DOMAIN_LONG_SEGMENT");if(h{const a=s(9848),l=s(5380),u=s(2178),d={nonAsciiRx:/[^\x00-\x7f]/,encoder:new(a.TextEncoder||TextEncoder)};o.analyze=function(c,f){return d.email(c,f)},o.isValid=function(c,f){return!d.email(c,f)},d.email=function(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof c!="string")throw new Error("Invalid input: email must be a string");if(!c)return u.code("EMPTY_STRING");const m=!d.nonAsciiRx.test(c);if(!m){if(f.allowUnicode===!1)return u.code("FORBIDDEN_UNICODE");c=c.normalize("NFC")}const p=c.split("@");if(p.length!==2)return p.length>2?u.code("MULTIPLE_AT_CHAR"):u.code("MISSING_AT_CHAR");const[h,y]=p;if(!h)return u.code("EMPTY_LOCAL");if(!f.ignoreLength){if(c.length>254)return u.code("ADDRESS_TOO_LONG");if(d.encoder.encode(h).length>64)return u.code("LOCAL_TOO_LONG")}return d.local(h,m)||l.analyze(y,f)},d.local=function(c,f){const m=c.split(".");for(const p of m){if(!p.length)return u.code("EMPTY_LOCAL_SEGMENT");if(f){if(!d.atextRx.test(p))return u.code("INVALID_LOCAL_CHARS")}else for(const h of p){if(d.atextRx.test(h))continue;const y=d.binary(h);if(!d.atomRx.test(y))return u.code("INVALID_LOCAL_CHARS")}}},d.binary=function(c){return Array.from(d.encoder.encode(c)).map(f=>String.fromCharCode(f)).join("")},d.atextRx=/^[\w!#\$%&'\*\+\-/=\?\^`\{\|\}~]+$/,d.atomRx=new RegExp(["(?:[\\xc2-\\xdf][\\x80-\\xbf])","(?:\\xe0[\\xa0-\\xbf][\\x80-\\xbf])|(?:[\\xe1-\\xec][\\x80-\\xbf]{2})|(?:\\xed[\\x80-\\x9f][\\x80-\\xbf])|(?:[\\xee-\\xef][\\x80-\\xbf]{2})","(?:\\xf0[\\x90-\\xbf][\\x80-\\xbf]{2})|(?:[\\xf1-\\xf3][\\x80-\\xbf]{3})|(?:\\xf4[\\x80-\\x8f][\\x80-\\xbf]{2})"].join("|"))},2178:(i,o)=>{o.codes={EMPTY_STRING:"Address must be a non-empty string",FORBIDDEN_UNICODE:"Address contains forbidden Unicode characters",MULTIPLE_AT_CHAR:"Address cannot contain more than one @ character",MISSING_AT_CHAR:"Address must contain one @ character",EMPTY_LOCAL:"Address local part cannot be empty",ADDRESS_TOO_LONG:"Address too long",LOCAL_TOO_LONG:"Address local part too long",EMPTY_LOCAL_SEGMENT:"Address local part contains empty dot-separated segment",INVALID_LOCAL_CHARS:"Address local part contains invalid character",DOMAIN_NON_EMPTY_STRING:"Domain must be a non-empty string",DOMAIN_TOO_LONG:"Domain too long",DOMAIN_INVALID_UNICODE_CHARS:"Domain contains forbidden Unicode characters",DOMAIN_INVALID_CHARS:"Domain contains invalid character",DOMAIN_INVALID_TLDS_CHARS:"Domain contains invalid tld character",DOMAIN_SEGMENTS_COUNT:"Domain lacks the minimum required number of segments",DOMAIN_SEGMENTS_COUNT_MAX:"Domain contains too many segments",DOMAIN_FORBIDDEN_TLDS:"Domain uses forbidden TLD",DOMAIN_EMPTY_SEGMENT:"Domain contains empty dot-separated segment",DOMAIN_LONG_SEGMENT:"Domain contains dot-separated segment that is too long"},o.code=function(s){return{code:s,error:o.codes[s]}}},9959:(i,o,s)=>{const a=s(375),l=s(5752);o.regex=function(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};a(u.cidr===void 0||typeof u.cidr=="string","options.cidr must be a string");const d=u.cidr?u.cidr.toLowerCase():"optional";a(["required","optional","forbidden"].includes(d),"options.cidr must be one of required, optional, forbidden"),a(u.version===void 0||typeof u.version=="string"||Array.isArray(u.version),"options.version must be a string or an array of string");let c=u.version||["ipv4","ipv6","ipvfuture"];Array.isArray(c)||(c=[c]),a(c.length>=1,"options.version must have at least 1 version specified");for(let p=0;p{if(d==="forbidden")return l.ip[p];const h=`\\/${p==="ipv4"?l.ip.v4Cidr:l.ip.v6Cidr}`;return d==="required"?`${l.ip[p]}${h}`:`${l.ip[p]}(?:${h})?`}).join("|")})`,m=new RegExp(`^${f}$`);return{cidr:d,versions:c,regex:m,raw:f}}},5752:(i,o,s)=>{const a=s(375),l=s(6064),u={generate:function(){const d={},c="\\dA-Fa-f",f="["+c+"]",m="\\w-\\.~",p="!\\$&'\\(\\)\\*\\+,;=",h="%"+c,y=m+h+p+":@",g="["+y+"]",b="(?:0{0,2}\\d|0?[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";d.ipv4address="(?:"+b+"\\.){3}"+b;const v=f+"{1,4}",w="(?:"+v+":"+v+"|"+d.ipv4address+")",E="(?:"+v+":){6}"+w,C="::(?:"+v+":){5}"+w,k="(?:"+v+")?::(?:"+v+":){4}"+w,_="(?:(?:"+v+":){0,1}"+v+")?::(?:"+v+":){3}"+w,S="(?:(?:"+v+":){0,2}"+v+")?::(?:"+v+":){2}"+w,A="(?:(?:"+v+":){0,3}"+v+")?::"+v+":"+w,I="(?:(?:"+v+":){0,4}"+v+")?::"+w,L="(?:(?:"+v+":){0,5}"+v+")?::"+v,F="(?:(?:"+v+":){0,6}"+v+")?::";d.ipv4Cidr="(?:\\d|[1-2]\\d|3[0-2])",d.ipv6Cidr="(?:0{0,2}\\d|0?[1-9]\\d|1[01]\\d|12[0-8])",d.ipv6address="(?:"+E+"|"+C+"|"+k+"|"+_+"|"+S+"|"+A+"|"+I+"|"+L+"|"+F+")",d.ipvFuture="v"+f+"+\\.["+m+p+":]+",d.scheme="[a-zA-Z][a-zA-Z\\d+-\\.]*",d.schemeRegex=new RegExp(d.scheme);const N="["+m+h+p+":]*",R="["+m+h+p+"]{1,255}",B="(?:\\[(?:"+d.ipv6address+"|"+d.ipvFuture+")\\]|"+d.ipv4address+"|"+R+")",V="(?:"+N+"@)?"+B+"(?::\\d*)?",j="(?:"+N+"@)?("+B+")(?::\\d*)?",W=g+"*",Y=g+"+",te="(?:\\/"+W+")*",ae="\\/(?:"+Y+te+")?",Z=Y+te,pe="["+m+h+p+"@]+"+te,Ie="(?:\\/\\/\\/"+W+te+")";return d.hierPart="(?:(?:\\/\\/"+V+te+")|"+ae+"|"+Z+"|"+Ie+")",d.hierPartCapture="(?:(?:\\/\\/"+j+te+")|"+ae+"|"+Z+")",d.relativeRef="(?:(?:\\/\\/"+V+te+")|"+ae+"|"+pe+"|)",d.relativeRefCapture="(?:(?:\\/\\/"+j+te+")|"+ae+"|"+pe+"|)",d.query="["+y+"\\/\\?]*(?=#|$)",d.queryWithSquareBrackets="["+y+"\\[\\]\\/\\?]*(?=#|$)",d.fragment="["+y+"\\/\\?]*",d}};u.rfc3986=u.generate(),o.ip={v4Cidr:u.rfc3986.ipv4Cidr,v6Cidr:u.rfc3986.ipv6Cidr,ipv4:u.rfc3986.ipv4address,ipv6:u.rfc3986.ipv6address,ipvfuture:u.rfc3986.ipvFuture},u.createRegex=function(d){const c=u.rfc3986,f="(?:\\?"+(d.allowQuerySquareBrackets?c.queryWithSquareBrackets:c.query)+")?(?:#"+c.fragment+")?",m=d.domain?c.relativeRefCapture:c.relativeRef;if(d.relativeOnly)return u.wrap(m+f);let p="";if(d.scheme){a(d.scheme instanceof RegExp||typeof d.scheme=="string"||Array.isArray(d.scheme),"scheme must be a RegExp, String, or Array");const g=[].concat(d.scheme);a(g.length>=1,"scheme must have at least 1 scheme specified");const b=[];for(let v=0;v0&&arguments[0]!==void 0?arguments[0]:{};return d.scheme||d.allowRelative||d.relativeOnly||d.allowQuerySquareBrackets||d.domain?u.createRegex(d):u.uriRegex}},1447:(i,o)=>{const s={operators:["!","^","*","/","%","+","-","<","<=",">",">=","==","!=","&&","||","??"],operatorCharacters:["!","^","*","/","%","+","-","<","=",">","&","|","?"],operatorsOrder:[["^"],["*","/","%"],["+","-"],["<","<=",">",">="],["==","!="],["&&"],["||","??"]],operatorsPrefix:["!","n"],literals:{'"':'"',"`":"`","'":"'","[":"]"},numberRx:/^(?:[0-9]*(\.[0-9]*)?){1}$/,tokenRx:/^[\w\$\#\.\@\:\{\}]+$/,symbol:Symbol("formula"),settings:Symbol("settings")};o.Parser=class{constructor(a){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!l[s.settings]&&l.constants)for(const u in l.constants){const d=l.constants[u];if(d!==null&&!["boolean","number","string"].includes(typeof d))throw new Error(`Formula constant ${u} contains invalid ${typeof d} value type`)}this.settings=l[s.settings]?l:Object.assign({[s.settings]:!0,constants:{},functions:{}},l),this.single=null,this._parts=null,this._parse(a)}_parse(a){let l=[],u="",d=0,c=!1;const f=p=>{if(d)throw new Error("Formula missing closing parenthesis");const h=l.length?l[l.length-1]:null;if(c||u||p){if(h&&h.type==="reference"&&p===")")return h.type="function",h.value=this._subFormula(u,h.value),void(u="");if(p===")"){const y=new o.Parser(u,this.settings);l.push({type:"segment",value:y})}else if(c){if(c==="]")return l.push({type:"reference",value:u}),void(u="");l.push({type:"literal",value:u})}else if(s.operatorCharacters.includes(u))h&&h.type==="operator"&&s.operators.includes(h.value+u)?h.value+=u:l.push({type:"operator",value:u});else if(u.match(s.numberRx))l.push({type:"constant",value:parseFloat(u)});else if(this.settings.constants[u]!==void 0)l.push({type:"constant",value:this.settings.constants[u]});else{if(!u.match(s.tokenRx))throw new Error(`Formula contains invalid token: ${u}`);l.push({type:"reference",value:u})}u=""}};for(const p of a)c?p===c?(f(),c=!1):u+=p:d?p==="("?(u+=p,++d):p===")"?(--d,d?u+=p:f(p)):u+=p:p in s.literals?c=s.literals[p]:p==="("?(f(),++d):s.operatorCharacters.includes(p)?(f(),u=p,f()):p!==" "?u+=p:f();f(),l=l.map((p,h)=>p.type!=="operator"||p.value!=="-"||h&&l[h-1].type!=="operator"?p:{type:"operator",value:"n"});let m=!1;for(const p of l){if(p.type==="operator"){if(s.operatorsPrefix.includes(p.value))continue;if(!m)throw new Error("Formula contains an operator in invalid position");if(!s.operators.includes(p.value))throw new Error(`Formula contains an unknown operator ${p.value}`)}else if(m)throw new Error("Formula missing expected operator");m=!m}if(!m)throw new Error("Formula contains invalid trailing operator");l.length===1&&["reference","literal","constant"].includes(l[0].type)&&(this.single={type:l[0].type==="reference"?"reference":"value",value:l[0].value}),this._parts=l.map(p=>{if(p.type==="operator")return s.operatorsPrefix.includes(p.value)?p:p.value;if(p.type!=="reference")return p.value;if(this.settings.tokenRx&&!this.settings.tokenRx.test(p.value))throw new Error(`Formula contains invalid reference ${p.value}`);return this.settings.reference?this.settings.reference(p.value):s.reference(p.value)})}_subFormula(a,l){const u=this.settings.functions[l];if(typeof u!="function")throw new Error(`Formula contains unknown function ${l}`);let d=[];if(a){let c="",f=0,m=!1;const p=()=>{if(!c)throw new Error(`Formula contains function ${l} with invalid arguments ${a}`);d.push(c),c=""};for(let h=0;hnew o.Parser(c,this.settings)),function(c){const f=[];for(const m of d)f.push(m.evaluate(c));return u.call(c,...f)}}evaluate(a){const l=this._parts.slice();for(let u=l.length-2;u>=0;--u){const d=l[u];if(d&&d.type==="operator"){const c=l[u+1];l.splice(u+1,1);const f=s.evaluate(c,a);l[u]=s.single(d.value,f)}}return s.operatorsOrder.forEach(u=>{for(let d=1;d":return l>u;case">=":return l>=u;case"==":return l===u;case"!=":return l!==u;case"&&":return l&&u;case"||":return l||u}return null},s.exists=function(a){return a!=null}},9926:()=>{},5688:()=>{},9708:()=>{},1152:()=>{},443:()=>{},9848:()=>{},5934:i=>{i.exports={version:"17.9.1"}}},r={},function i(o){var s=r[o];if(s!==void 0)return s.exports;var a=r[o]={exports:{}};return n[o](a,a.exports,i),a.exports}(5107);var n,r})})(U7);var LF=U7.exports;const O=Sa(LF);class b_ extends Error{constructor(t){super(t.message),this.message=t.message,this.code=t.code,this.data=t.data}}const it=(e,t)=>{let n;e.request?n=e.request.bind(e):e.sendAsync&&(n=BF(e));const r=async({method:i,params:o})=>{const s=i;if(t&&t[s]===null)throw new b_({code:4200,message:`The Provider does not support the requested method: ${i}`});if(t&&t[s])return t[s]({baseRequest:n,params:o});if(n)return n({method:i,params:o});throw new b_({code:4200,message:`The Provider does not support the requested method: ${i}`})};return e.request=r,e},BF=e=>({method:t,params:n})=>new Promise((r,i)=>{e.sendAsync({id:0,jsonrpc:"2.0",method:t,params:n},(o,{result:s})=>{o?i(JSON.parse(o)):r(s??null)})});function H7(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function v_(e){return H7(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}const NF="2.12.0",MF=()=>`viem@${NF}`;let gc=class ay extends Error{constructor(t,n={}){var o;super(),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ViemError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:MF()});const r=n.cause instanceof ay?n.cause.details:(o=n.cause)!=null&&o.message?n.cause.message:n.details,i=n.cause instanceof ay&&n.cause.docsPath||n.docsPath;this.message=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...i?[`Docs: https://viem.sh${i}${n.docsSlug?`#${n.docsSlug}`:""}`]:[],...r?[`Details: ${r}`]:[],`Version: ${this.version}`].join(` -`),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=i,this.metaMessages=n.metaMessages,this.shortMessage=t}walk(t){return z7(this,t)}};function z7(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e?z7(e.cause,t):t?null:e}let RK=class extends gc{constructor({offset:t,position:n,size:r}){super(`Slice ${n==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${r}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SliceOffsetOutOfBoundsError"})}},W7=class extends gc{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeExceedsPaddingSizeError"})}};function yc(e,{dir:t,size:n=32}={}){return typeof e=="string"?jF(e,{dir:t,size:n}):DF(e,{dir:t,size:n})}function jF(e,{dir:t,size:n=32}={}){if(n===null)return e;const r=e.replace("0x","");if(r.length>n*2)throw new W7({size:Math.ceil(r.length/2),targetSize:n,type:"hex"});return`0x${r[t==="right"?"padEnd":"padStart"](n*2,"0")}`}function DF(e,{dir:t,size:n=32}={}){if(n===null)return e;if(e.length>n)throw new W7({size:e.length,targetSize:n,type:"bytes"});const r=new Uint8Array(n);for(let i=0;it)throw new HF({givenSize:v_(e),maxSize:t})}function ly(e,t){const n=typeof t=="string"?{to:t}:t,r=n.to;return r==="number"?WF(e,n):r==="bigint"?Lv(e,n):r==="string"?VF(e,n):r==="boolean"?zF(e,n):R0(e,n)}function Lv(e,t={}){const{signed:n}=t;t.size&&xs(e,{size:t.size});const r=BigInt(e);if(!n)return r;const i=(e.length-2)/2,o=(1n<t.toString(16).padStart(2,"0"));function jK(e,t={}){return typeof e=="number"||typeof e=="bigint"?Bv(e,t):typeof e=="string"?ZF(e,t):typeof e=="boolean"?GF(e,t):V7(e,t)}function GF(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(xs(n,{size:t.size}),yc(n,{size:t.size})):n}function V7(e,t={}){let n="";for(let i=0;io||i=Ui.zero&&e<=Ui.nine)return e-Ui.zero;if(e>=Ui.A&&e<=Ui.F)return e-(Ui.A-10);if(e>=Ui.a&&e<=Ui.f)return e-(Ui.a-10)}function R0(e,t={}){let n=e;t.size&&(xs(n,{size:t.size}),n=yc(n,{dir:"right",size:t.size}));let r=n.slice(2);r.length%2&&(r=`0${r}`);const i=r.length/2,o=new Uint8Array(i);for(let s=0,a=0;st){const[o,s,a]=[r.slice(0,t-1),r.slice(t-1,t),r.slice(t)],l=Math.round(+`${s}.${a}`);l>9?r=`${BigInt(o)+BigInt(1)}0`.padStart(o.length+1,"0"):r=`${o}${l}`,r.length>t&&(r=r.slice(1),n=`${BigInt(n)+1n}`),r=r.slice(0,t)}else r=r.padEnd(t,"0");return BigInt(`${i?"-":""}${n}${r}`)}function nU(e,t="wei"){return tU(e,q7[t])}const K7=e=>K7(),rU=e=>{const t=Lv(e);return G7(t)},Z7=e=>{if(!e)return e;const t=ly(e,"bigint");return G7(t)},iU=e=>{if(typeof e!="string"&&typeof e!="number")throw new Error("eth must be a string or number value");const t=typeof e=="number"?e.toString():e;return nU(t)},__=e=>Bv(e),oU=async e=>{const t=await ue(()=>import("./index-hcwXXuMg.js"),__vite__mapDeps([0,1])),{id:n,label:r,token:i,publicRpcUrl:o,blockExplorerUrl:s,rpcUrl:a}=e;switch(n){case"0x89":{const{polygon:l}=t;return l}case"0xa":{const{optimism:l}=t;return l}case"0xa4b1":{const{arbitrum:l}=t;return l}case"0x144":{const{zkSync:l}=t;return l}case"0x38":{const{bsc:l}=t;return l}case"0x1":{const{mainnet:l}=t;return l}case"0xaa36a7":{const{sepolia:l}=t;return l}case"0xfa":{const{fantom:l}=t;return l}case"0xa86a":{const{avalanche:l}=t;return l}case"0xa4ec":{const{celo:l}=t;return l}case"0x2105":{const{base:l}=t;return l}case"0x14a33":{const{baseGoerli:l}=t;return l}case"0x64":{const{gnosis:l}=t;return l}case"0x63564C40":{const{harmonyOne:l}=t;return l}case"0x27bc86aa":{const{degen:l}=t;return l}default:{const{extractChain:l,defineChain:u}=await ue(async()=>{const{extractChain:c,defineChain:f}=await import("./index-CdPQs6F4.js");return{extractChain:c,defineChain:f}},__vite__mapDeps([2,1])),d=l({chains:Object.values(t),id:ly(n,"number")});return d||u({id:ly(n,"number"),name:r??"",nativeCurrency:{decimals:18,name:i??"",symbol:i??""},rpcUrls:{default:{http:[a??"",o??""]}},blockExplorers:{default:{name:"Explorer",url:s??""}}})}}};var is;(function(e){e[e.ACCOUNT_ACCESS_REJECTED=4001]="ACCOUNT_ACCESS_REJECTED",e[e.ACCOUNT_ACCESS_ALREADY_REQUESTED=-32002]="ACCOUNT_ACCESS_ALREADY_REQUESTED",e[e.UNAUTHORIZED=4100]="UNAUTHORIZED",e[e.INVALID_PARAMS=-32602]="INVALID_PARAMS",e[e.UNSUPPORTED_METHOD=4200]="UNSUPPORTED_METHOD",e[e.DISCONNECTED=4900]="DISCONNECTED",e[e.CHAIN_DISCONNECTED=4901]="CHAIN_DISCONNECTED",e[e.CHAIN_NOT_ADDED=4902]="CHAIN_NOT_ADDED",e[e.DOES_NOT_EXIST=-32601]="DOES_NOT_EXIST",e[e.UNRECOGNIZED_CHAIN_ID=-32603]="UNRECOGNIZED_CHAIN_ID"})(is||(is={}));function Ot(e,t){const n=e.validate(t);return n.error?n:null}const Nv=O.alternatives().try(O.string().pattern(/^0x[0-9a-fA-F]+$/),O.number().positive()),Mv=O.string().valid("evm"),sU=O.object({address:O.string().required(),icon:O.string().optional()}),aU=O.object({namespace:Mv,id:Nv.required(),rpcUrl:O.string(),label:O.string(),token:O.string(),secondaryTokens:O.array().max(5).items(sU).optional(),icon:O.string(),color:O.string(),publicRpcUrl:O.string(),protectedRpcUrl:O.string(),blockExplorerUrl:O.string()});var vp={exports:{}};vp.exports;(function(e,t){var n=200,r="Expected a function",i="__lodash_hash_undefined__",o=1,s=2,a=1/0,l=9007199254740991,u="[object Arguments]",d="[object Array]",c="[object Boolean]",f="[object Date]",m="[object Error]",p="[object Function]",h="[object GeneratorFunction]",y="[object Map]",g="[object Number]",b="[object Object]",v="[object Promise]",w="[object RegExp]",E="[object Set]",C="[object String]",k="[object Symbol]",_="[object WeakMap]",S="[object ArrayBuffer]",A="[object DataView]",I="[object Float32Array]",L="[object Float64Array]",F="[object Int8Array]",N="[object Int16Array]",R="[object Int32Array]",B="[object Uint8Array]",V="[object Uint8ClampedArray]",j="[object Uint16Array]",W="[object Uint32Array]",Y=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,te=/^\w*$/,ae=/^\./,Z=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pe=/[\\^$.*+?()[\]{}|]/g,Ie=/\\(\\)?/g,_e=/^\[object .+?Constructor\]$/,Ce=/^(?:0|[1-9]\d*)$/,le={};le[I]=le[L]=le[F]=le[N]=le[R]=le[B]=le[V]=le[j]=le[W]=!0,le[u]=le[d]=le[S]=le[c]=le[A]=le[f]=le[m]=le[p]=le[y]=le[g]=le[b]=le[w]=le[E]=le[C]=le[_]=!1;var $e=typeof br=="object"&&br&&br.Object===Object&&br,rt=typeof self=="object"&&self&&self.Object===Object&&self,je=$e||rt||Function("return this")(),nt=t&&!t.nodeType&&t,Le=nt&&!0&&e&&!e.nodeType&&e,_t=Le&&Le.exports===nt,Kn=_t&&$e.process,Zr=function(){try{return Kn&&Kn.binding("util")}catch{}}(),Ss=Zr&&Zr.isTypedArray;function wc(x,T,P,D){for(var ne=-1,G=x?x.length:0;++ne-1}function Tc(x,T){var P=this.__data__,D=yo(P,x);return D<0?P.push([x,T]):P[D][1]=T,this}Xn.prototype.clear=kc,Xn.prototype.delete=Cc,Xn.prototype.get=Ac,Xn.prototype.has=Yn,Xn.prototype.set=Tc;function xn(x){var T=-1,P=x?x.length:0;for(this.clear();++TPe))return!1;var Ke=G.get(x);if(Ke&&G.get(T))return Ke==T;var Ve=-1,Ze=!0,Qe=ne&o?new Ti:void 0;for(G.set(x,T),G.set(T,x);++Ve-1&&x%1==0&&x-1&&x%1==0&&x<=l}function En(x){var T=typeof x;return!!x&&(T=="object"||T=="function")}function dr(x){return!!x&&typeof x=="object"}function Ri(x){return typeof x=="symbol"||dr(x)&&Kt.call(x)==k}var Fa=Ss?co(Ss):Hc;function U0(x){return x==null?"":qc(x)}function H0(x,T,P){var D=x==null?void 0:ni(x,T);return D===void 0?P:D}function Kc(x,T){return x!=null&&ri(x,T,Dc)}function Ua(x){return We(x)?Bc(x):zc(x)}function z0(x){return x}function W0(x){return Oi(x)?lo($(x)):Ns(x)}e.exports=z})(vp,vp.exports);var lU=vp.exports;const cU=Sa(lU);function cy(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function x_(e){return cy(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}const uU="2.12.0",UK=e=>e,HK=e=>e,fU=()=>`viem@${uU}`;class io extends Error{constructor(t,n={}){var o;super(),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ViemError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:fU()});const r=n.cause instanceof io?n.cause.details:(o=n.cause)!=null&&o.message?n.cause.message:n.details,i=n.cause instanceof io&&n.cause.docsPath||n.docsPath;this.message=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...i?[`Docs: https://viem.sh${i}${n.docsSlug?`#${n.docsSlug}`:""}`]:[],...r?[`Details: ${r}`]:[],`Version: ${this.version}`].join(` +`),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=i,this.metaMessages=n.metaMessages,this.shortMessage=t}walk(t){return z7(this,t)}};function z7(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e?z7(e.cause,t):t?null:e}let RK=class extends gc{constructor({offset:t,position:n,size:r}){super(`Slice ${n==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${r}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SliceOffsetOutOfBoundsError"})}},W7=class extends gc{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeExceedsPaddingSizeError"})}};function yc(e,{dir:t,size:n=32}={}){return typeof e=="string"?jF(e,{dir:t,size:n}):DF(e,{dir:t,size:n})}function jF(e,{dir:t,size:n=32}={}){if(n===null)return e;const r=e.replace("0x","");if(r.length>n*2)throw new W7({size:Math.ceil(r.length/2),targetSize:n,type:"hex"});return`0x${r[t==="right"?"padEnd":"padStart"](n*2,"0")}`}function DF(e,{dir:t,size:n=32}={}){if(n===null)return e;if(e.length>n)throw new W7({size:e.length,targetSize:n,type:"bytes"});const r=new Uint8Array(n);for(let i=0;it)throw new HF({givenSize:v_(e),maxSize:t})}function ly(e,t){const n=typeof t=="string"?{to:t}:t,r=n.to;return r==="number"?WF(e,n):r==="bigint"?Lv(e,n):r==="string"?VF(e,n):r==="boolean"?zF(e,n):R0(e,n)}function Lv(e,t={}){const{signed:n}=t;t.size&&xs(e,{size:t.size});const r=BigInt(e);if(!n)return r;const i=(e.length-2)/2,o=(1n<t.toString(16).padStart(2,"0"));function jK(e,t={}){return typeof e=="number"||typeof e=="bigint"?Bv(e,t):typeof e=="string"?ZF(e,t):typeof e=="boolean"?GF(e,t):V7(e,t)}function GF(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(xs(n,{size:t.size}),yc(n,{size:t.size})):n}function V7(e,t={}){let n="";for(let i=0;io||i=Ui.zero&&e<=Ui.nine)return e-Ui.zero;if(e>=Ui.A&&e<=Ui.F)return e-(Ui.A-10);if(e>=Ui.a&&e<=Ui.f)return e-(Ui.a-10)}function R0(e,t={}){let n=e;t.size&&(xs(n,{size:t.size}),n=yc(n,{dir:"right",size:t.size}));let r=n.slice(2);r.length%2&&(r=`0${r}`);const i=r.length/2,o=new Uint8Array(i);for(let s=0,a=0;st){const[o,s,a]=[r.slice(0,t-1),r.slice(t-1,t),r.slice(t)],l=Math.round(+`${s}.${a}`);l>9?r=`${BigInt(o)+BigInt(1)}0`.padStart(o.length+1,"0"):r=`${o}${l}`,r.length>t&&(r=r.slice(1),n=`${BigInt(n)+1n}`),r=r.slice(0,t)}else r=r.padEnd(t,"0");return BigInt(`${i?"-":""}${n}${r}`)}function nU(e,t="wei"){return tU(e,q7[t])}const K7=e=>K7(),rU=e=>{const t=Lv(e);return G7(t)},Z7=e=>{if(!e)return e;const t=ly(e,"bigint");return G7(t)},iU=e=>{if(typeof e!="string"&&typeof e!="number")throw new Error("eth must be a string or number value");const t=typeof e=="number"?e.toString():e;return nU(t)},__=e=>Bv(e),oU=async e=>{const t=await ue(()=>import("./index-BivK3ymw.js"),__vite__mapDeps([0,1])),{id:n,label:r,token:i,publicRpcUrl:o,blockExplorerUrl:s,rpcUrl:a}=e;switch(n){case"0x89":{const{polygon:l}=t;return l}case"0xa":{const{optimism:l}=t;return l}case"0xa4b1":{const{arbitrum:l}=t;return l}case"0x144":{const{zkSync:l}=t;return l}case"0x38":{const{bsc:l}=t;return l}case"0x1":{const{mainnet:l}=t;return l}case"0xaa36a7":{const{sepolia:l}=t;return l}case"0xfa":{const{fantom:l}=t;return l}case"0xa86a":{const{avalanche:l}=t;return l}case"0xa4ec":{const{celo:l}=t;return l}case"0x2105":{const{base:l}=t;return l}case"0x14a33":{const{baseGoerli:l}=t;return l}case"0x64":{const{gnosis:l}=t;return l}case"0x63564C40":{const{harmonyOne:l}=t;return l}case"0x27bc86aa":{const{degen:l}=t;return l}default:{const{extractChain:l,defineChain:u}=await ue(async()=>{const{extractChain:c,defineChain:f}=await import("./index-C9Hr7owJ.js");return{extractChain:c,defineChain:f}},__vite__mapDeps([2,1])),d=l({chains:Object.values(t),id:ly(n,"number")});return d||u({id:ly(n,"number"),name:r??"",nativeCurrency:{decimals:18,name:i??"",symbol:i??""},rpcUrls:{default:{http:[a??"",o??""]}},blockExplorers:{default:{name:"Explorer",url:s??""}}})}}};var is;(function(e){e[e.ACCOUNT_ACCESS_REJECTED=4001]="ACCOUNT_ACCESS_REJECTED",e[e.ACCOUNT_ACCESS_ALREADY_REQUESTED=-32002]="ACCOUNT_ACCESS_ALREADY_REQUESTED",e[e.UNAUTHORIZED=4100]="UNAUTHORIZED",e[e.INVALID_PARAMS=-32602]="INVALID_PARAMS",e[e.UNSUPPORTED_METHOD=4200]="UNSUPPORTED_METHOD",e[e.DISCONNECTED=4900]="DISCONNECTED",e[e.CHAIN_DISCONNECTED=4901]="CHAIN_DISCONNECTED",e[e.CHAIN_NOT_ADDED=4902]="CHAIN_NOT_ADDED",e[e.DOES_NOT_EXIST=-32601]="DOES_NOT_EXIST",e[e.UNRECOGNIZED_CHAIN_ID=-32603]="UNRECOGNIZED_CHAIN_ID"})(is||(is={}));function Ot(e,t){const n=e.validate(t);return n.error?n:null}const Nv=O.alternatives().try(O.string().pattern(/^0x[0-9a-fA-F]+$/),O.number().positive()),Mv=O.string().valid("evm"),sU=O.object({address:O.string().required(),icon:O.string().optional()}),aU=O.object({namespace:Mv,id:Nv.required(),rpcUrl:O.string(),label:O.string(),token:O.string(),secondaryTokens:O.array().max(5).items(sU).optional(),icon:O.string(),color:O.string(),publicRpcUrl:O.string(),protectedRpcUrl:O.string(),blockExplorerUrl:O.string()});var vp={exports:{}};vp.exports;(function(e,t){var n=200,r="Expected a function",i="__lodash_hash_undefined__",o=1,s=2,a=1/0,l=9007199254740991,u="[object Arguments]",d="[object Array]",c="[object Boolean]",f="[object Date]",m="[object Error]",p="[object Function]",h="[object GeneratorFunction]",y="[object Map]",g="[object Number]",b="[object Object]",v="[object Promise]",w="[object RegExp]",E="[object Set]",C="[object String]",k="[object Symbol]",_="[object WeakMap]",S="[object ArrayBuffer]",A="[object DataView]",I="[object Float32Array]",L="[object Float64Array]",F="[object Int8Array]",N="[object Int16Array]",R="[object Int32Array]",B="[object Uint8Array]",V="[object Uint8ClampedArray]",j="[object Uint16Array]",W="[object Uint32Array]",Y=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,te=/^\w*$/,ae=/^\./,Z=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pe=/[\\^$.*+?()[\]{}|]/g,Ie=/\\(\\)?/g,_e=/^\[object .+?Constructor\]$/,Ce=/^(?:0|[1-9]\d*)$/,le={};le[I]=le[L]=le[F]=le[N]=le[R]=le[B]=le[V]=le[j]=le[W]=!0,le[u]=le[d]=le[S]=le[c]=le[A]=le[f]=le[m]=le[p]=le[y]=le[g]=le[b]=le[w]=le[E]=le[C]=le[_]=!1;var $e=typeof br=="object"&&br&&br.Object===Object&&br,rt=typeof self=="object"&&self&&self.Object===Object&&self,je=$e||rt||Function("return this")(),nt=t&&!t.nodeType&&t,Le=nt&&!0&&e&&!e.nodeType&&e,_t=Le&&Le.exports===nt,Kn=_t&&$e.process,Zr=function(){try{return Kn&&Kn.binding("util")}catch{}}(),Ss=Zr&&Zr.isTypedArray;function wc(x,T,P,D){for(var ne=-1,G=x?x.length:0;++ne-1}function Tc(x,T){var P=this.__data__,D=yo(P,x);return D<0?P.push([x,T]):P[D][1]=T,this}Xn.prototype.clear=kc,Xn.prototype.delete=Cc,Xn.prototype.get=Ac,Xn.prototype.has=Yn,Xn.prototype.set=Tc;function xn(x){var T=-1,P=x?x.length:0;for(this.clear();++TPe))return!1;var Ke=G.get(x);if(Ke&&G.get(T))return Ke==T;var Ve=-1,Ze=!0,Qe=ne&o?new Ti:void 0;for(G.set(x,T),G.set(T,x);++Ve-1&&x%1==0&&x-1&&x%1==0&&x<=l}function En(x){var T=typeof x;return!!x&&(T=="object"||T=="function")}function dr(x){return!!x&&typeof x=="object"}function Ri(x){return typeof x=="symbol"||dr(x)&&Kt.call(x)==k}var Fa=Ss?co(Ss):Hc;function U0(x){return x==null?"":qc(x)}function H0(x,T,P){var D=x==null?void 0:ni(x,T);return D===void 0?P:D}function Kc(x,T){return x!=null&&ri(x,T,Dc)}function Ua(x){return We(x)?Bc(x):zc(x)}function z0(x){return x}function W0(x){return Oi(x)?lo($(x)):Ns(x)}e.exports=z})(vp,vp.exports);var lU=vp.exports;const cU=Sa(lU);function cy(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function x_(e){return cy(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}const uU="2.12.0",UK=e=>e,HK=e=>e,fU=()=>`viem@${uU}`;class io extends Error{constructor(t,n={}){var o;super(),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ViemError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:fU()});const r=n.cause instanceof io?n.cause.details:(o=n.cause)!=null&&o.message?n.cause.message:n.details,i=n.cause instanceof io&&n.cause.docsPath||n.docsPath;this.message=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...i?[`Docs: https://viem.sh${i}${n.docsSlug?`#${n.docsSlug}`:""}`]:[],...r?[`Details: ${r}`]:[],`Version: ${this.version}`].join(` `),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=i,this.metaMessages=n.metaMessages,this.shortMessage=t}walk(t){return X7(this,t)}}function X7(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e?X7(e.cause,t):t?null:e}class zK extends io{constructor({offset:t,position:n,size:r}){super(`Slice ${n==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${r}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SliceOffsetOutOfBoundsError"})}}class Y7 extends io{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeExceedsPaddingSizeError"})}}class WK extends io{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} is expected to be ${n} ${r} long, but is ${t} ${r} long.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidBytesLengthError"})}}function jv(e,{dir:t,size:n=32}={}){return typeof e=="string"?dU(e,{dir:t,size:n}):hU(e,{dir:t,size:n})}function dU(e,{dir:t,size:n=32}={}){if(n===null)return e;const r=e.replace("0x","");if(r.length>n*2)throw new Y7({size:Math.ceil(r.length/2),targetSize:n,type:"hex"});return`0x${r[t==="right"?"padEnd":"padStart"](n*2,"0")}`}function hU(e,{dir:t,size:n=32}={}){if(n===null)return e;if(e.length>n)throw new Y7({size:e.length,targetSize:n,type:"bytes"});const r=new Uint8Array(n);for(let i=0;it)throw new mU({givenSize:x_(e),maxSize:t})}function gU(e,t={}){const{signed:n}=t;t.size&&Dv(e,{size:t.size});const r=BigInt(e);if(!n)return r;const i=(e.length-2)/2,o=(1n<t.toString(16).padStart(2,"0"));function E_(e,t={}){return typeof e=="number"||typeof e=="bigint"?vU(e,t):typeof e=="string"?_U(e,t):typeof e=="boolean"?bU(e,t):Q7(e,t)}function bU(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(Dv(n,{size:t.size}),jv(n,{size:t.size})):n}function Q7(e,t={}){let n="";for(let i=0;io||i-1}function Os($,M){var z=this.__data__,ge=mo(z,$);return ge<0?(++this.size,z.push([$,M])):z[ge][1]=M,this}Zt.prototype.clear=Ps,Zt.prototype.delete=Ai,Zt.prototype.get=Sc,Zt.prototype.has=ho,Zt.prototype.set=Os;function Ir($){var M=-1,z=$==null?0:$.length;for(this.clear();++M1?z[Be-1]:void 0,Ge=Be>2?z[2]:void 0;for(Ue=$.length>3&&typeof Ue=="function"?(Be--,Ue):void 0,Ge&&Fc(z[0],z[1],Ge)&&(Ue=Be<3?void 0:Ue,Be=1),M=Object(M);++ge-1&&$%1==0&&$0){if(++M>=i)return arguments[0]}else M=0;return $.apply(void 0,arguments)}}function Ma($){if($!=null){try{return co.call($)}catch{}try{return $+""}catch{}}return""}function vo($,M){return $===M||$!==$&&M!==M}var wo=Ti(function(){return arguments}())?Ti:function($){return ri($)&&ur.call($,"callee")&&!Pa.call($,"callee")},_o=Array.isArray;function Ms($){return $!=null&&Xt($.length)&&!fr($)}function xo($){return ri($)&&Ms($)}var $i=As||Eo;function fr($){if(!Yt($))return!1;var M=go($);return M==m||M==p||M==u||M==v}function Xt($){return typeof $=="number"&&$>-1&&$%1==0&&$<=s}function Yt($){var M=typeof $;return $!=null&&(M=="object"||M=="function")}function ri($){return $!=null&&typeof $=="object"}function Pi($){if(!ri($)||go($)!=b)return!1;var M=Yr($);if(M===null)return!0;var z=ur.call(M,"constructor")&&M.constructor;return typeof z=="function"&&z instanceof z&&co.call(z)==xc}var Oi=nt?Kn(nt):Pc;function Gc($){return Mc($,ja($))}function ja($){return Ms($)?Tc($):Jn($)}var Da=jc(function($,M,z){ti($,M,z)});function js($){return function(){return $}}function Ds($){return $}function Eo(){return!1}e.exports=Da})(wp,wp.exports);var xU=wp.exports;const EU=Sa(xU);var J7={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(l,u,d){this.fn=l,this.context=u,this.once=d||!1}function o(l,u,d,c,f){if(typeof d!="function")throw new TypeError("The listener must be a function");var m=new i(d,c||l,f),p=n?n+u:u;return l._events[p]?l._events[p].fn?l._events[p]=[l._events[p],m]:l._events[p].push(m):(l._events[p]=m,l._eventsCount++),l}function s(l,u){--l._eventsCount===0?l._events=new r:delete l._events[u]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var u=[],d,c;if(this._eventsCount===0)return u;for(c in d=this._events)t.call(d,c)&&u.push(n?c.slice(1):c);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(d)):u},a.prototype.listeners=function(u){var d=n?n+u:u,c=this._events[d];if(!c)return[];if(c.fn)return[c.fn];for(var f=0,m=c.length,p=new Array(m);f @@ -2361,7 +2361,7 @@ Note: there are at least one loader still registered to this locale that wasn't `;function DU(){if(typeof window<"u"){const e=Fj.getParser(window.navigator.userAgent),t=e.getOS(),n=e.getBrowser(),{type:r}=e.getPlatform();return{type:r,os:t,browser:n}}else return{type:null,os:null,browser:null}}const FU=e=>e!=null;function Fv(e){return e.includes("11?`${e.slice(0,4)}…${e.slice(-6)}`:e}async function ZK(e){try{return await navigator.clipboard.writeText(e)}catch(t){console.error("Failed to copy: ",t)}}const n9=e=>typeof e=="number"?`0x${e.toString(16)}`:e;function UU(e){return e.map(t=>{var{id:n}=t,r=_p(t,["id"]);const i=n9(n);return Object.assign({id:i},r)})}function XK(e){return`0x${(e*1e9).toString(16)}`}const YK={"0x1":"Ethereum","0xaa36a7":"Sepolia","0x38":"Binance","0x89":"Polygon","0xfa":"Fantom","0xa":"OP Mainnet","0x45":"OP Kovan","0xa86a":"Avalanche","0xa4ec":"Celo","0x2105":"Base","0x14a33":"Base Goerli","0x64":"Gnosis","0x63564C40":"Harmony One","0xa4b1":"Arbitrum One","0xa4ba":"Arbitrum Nova","0x27bc86aa":"Degen","0x890":"SNAX"};function xp(e){switch(e){case"0x1":case"0x89":case"0xa":case"0xa4b1":case"0x144":return"0x1";case"0x5":return e;case"0xaa36a7":return e;default:return null}}const HU=async e=>{switch(e){case"0x89":case"0xa":case"0xa4b1":case"0x144":case"0x1":{const{mainnet:t}=await ue(async()=>{const{mainnet:n}=await import("./index-40a497ea-B-e4dja1.js");return{mainnet:n}},__vite__mapDeps([3,4]));return t}case"0xaa36a7":{const{sepolia:t}=await ue(async()=>{const{sepolia:n}=await import("./index-40a497ea-B-e4dja1.js");return{sepolia:n}},__vite__mapDeps([3,4]));return t}default:return null}},I_={main:"0x1",sepolia:"0xaa36a7",xdai:"0x64","bsc-main":"0x38","matic-main":"0x89","fantom-main":"0xfa","matic-mumbai":"0x80001",degen:"0x27bc86aa",SNAX:"0x890"},zU={"0x1":{icon:S_,color:"#627EEA"},"0xaa36a7":{icon:S_,color:"#627EEA"},"0x38":{icon:AU,color:"#F3BA2F"},"0x89":{icon:k_,color:"#8247E5"},"0xfa":{icon:TU,color:"#1969FF"},"0xa":{icon:C_,color:"#FF0420"},"0x45":{icon:C_,color:"#FF0420"},"0xa86a":{icon:IU,color:"#E84142"},"0xa4ec":{icon:$U,color:"#FBCC5C"},"0x64":{icon:PU,color:"#04795B"},"0x63564C40":{icon:OU,color:"#ffffff"},"0xa4b1":{icon:A_,color:"#33394B"},"0xa4ba":{icon:A_,color:"#33394B"},"0x2105":{icon:T_,color:"#0259F9"},"0x14a33":{icon:T_,color:"#0259F9"},"0x80001":{icon:k_,color:"#8247E5"},"0x27bc86aa":{icon:MU,color:"#a36dfe"},"0x890":{icon:jU,color:"#00D1FF"}},QK={icon:jf,color:"#33394B"};function JK(e){return e?zU[e.toLowerCase()]:void 0}function eZ(e,t){return!!t.find(({id:n,namespace:r})=>n===e.id&&r===e.namespace)}const tZ={pending:{backgroundColor:"var(--onboard-primary-700, var(--primary-700))",borderColor:"#6370E5",eventIcon:RU},success:{backgroundColor:"#052E17",borderColor:"var(--onboard-success-300, var(--success-300))",eventIcon:LU},error:{backgroundColor:"#FDB1B11A",borderColor:"var(--onboard-danger-300, var(--danger-300))",eventIcon:BU},hint:{backgroundColor:"var(--onboard-gray-500, var(--gray-500))",borderColor:"var(--onboard-gray-500, var(--gray-500))",iconColor:"var(--onboard-gray-100, var(--gray-100))",eventIcon:L0}},WU=e=>new Promise(t=>setTimeout(t,e));function B0(e){try{return localStorage.getItem(e)}catch{return null}}function N0(e,t){try{localStorage.setItem(e,t)}catch{return}}function r9(e){try{localStorage.removeItem(e)}catch{return}}let fn={svelteInstance:null,apiKey:void 0,device:DU(),initialWalletInit:[],gas:void 0,containerElements:{accountCenter:void 0,connectModal:void 0},unstoppableResolution:void 0,wagmi:void 0};function $_(e){fn=Object.assign(Object.assign({},fn),e)}const Do={wallets:[],walletModules:[],chains:[],accountCenter:{enabled:!0,position:"bottomRight",expanded:!1,minimal:!0},notify:{enabled:!0,transactionHandler:()=>{},position:"topRight",replacement:{gasPriceProbability:{speedup:80,cancel:95}}},notifications:[],locale:"",connect:{showSidebar:!0,disableClose:!1},appMetadata:null,wagmiConfig:null},gi={TERMS_AGREEMENT:"onboard.js:agreement",LAST_CONNECTED_WALLET:"onboard.js:last_connected_wallet"},Rt=768,nZ="https://rpc.blocknative.com/boost",rZ="https://docs.blocknative.com/blocknative-mev-protection/transaction-boost",i9="add_chains",o9="update_chains",s9="reset_store",a9="add_wallet",l9="update_wallet",c9="remove_wallet",u9="update_account",f9="update_account_center",d9="update_connect_modal",h9="set_wallet_modules",p9="set_locale",m9="update_notify",Uv="add_notification",g9="remove_notification",y9="update_balance",b9="update_app_metadata",v9="update_wagmi_config";function VU(e,t){const{type:n,payload:r}=t;switch(n){case i9:return Object.assign(Object.assign({},e),{chains:[...e.chains,...r]});case o9:{const i=r,o=e.chains,s=o.findIndex(a=>a.id===i.id);return o[s]=i,Object.assign(Object.assign({},e),{chains:o})}case a9:{const i=r,o=e.wallets.find(({label:s})=>s===i.label);return Object.assign(Object.assign({},e),{wallets:[o||r,...e.wallets.filter(({label:s})=>s!==i.label)]})}case l9:{const i=r,{id:o}=i,s=_p(i,["id"]),a=e.wallets.map(l=>l.label===o?Object.assign(Object.assign({},l),s):l);return Object.assign(Object.assign({},e),{wallets:a})}case c9:{const i=r;return Object.assign(Object.assign({},e),{wallets:e.wallets.filter(({label:o})=>o!==i.id)})}case u9:{const i=r,{id:o,address:s}=i,a=_p(i,["id","address"]),l=e.wallets.map(u=>(u.label===o&&(u.accounts=u.accounts.map(d=>d.address===s?Object.assign(Object.assign({},d),a):d)),u));return Object.assign(Object.assign({},e),{wallets:l})}case y9:{const i=r;return Object.assign(Object.assign({},e),{wallets:i})}case d9:{const i=r;return Object.assign(Object.assign({},e),{connect:Object.assign(Object.assign({},e.connect),i)})}case f9:{const i=r;return Object.assign(Object.assign({},e),{accountCenter:Object.assign(Object.assign({},e.accountCenter),i)})}case m9:{const i=r;return Object.assign(Object.assign({},e),{notify:Object.assign(Object.assign({},e.notify),i)})}case Uv:{const i=r,o=[...e.notifications],s=o.findIndex(({id:a})=>a===i.id);return s!==-1?o[s]=i:o.unshift(i),Object.assign(Object.assign({},e),{notifications:o})}case g9:{const i=r;return Object.assign(Object.assign({},e),{notifications:e.notifications.filter(o=>o.id!==i)})}case h9:return Object.assign(Object.assign({},e),{walletModules:r});case p9:return Ta.set(r),Object.assign(Object.assign({},e),{locale:r});case b9:{const i=r;return Object.assign(Object.assign({},e),{appMetadata:Object.assign(Object.assign(Object.assign({},e.appMetadata),i),{name:i.name||""})})}case v9:{const i=r;return Object.assign(Object.assign({},e),{wagmiConfig:i})}case s9:return Do;default:throw new Error(`Unknown type: ${n} in appStore reducer`)}}const M0=new pd(Do),Ep=new ao;Ep.subscribe(M0);function an(e){const t=M0.getValue();Ep.next(VU(t,e))}function qU(e){if(!e)return Ep.asObservable();if(!Object.keys(M0.getValue()).includes(String(e)))throw new Error(`key: ${e} does not exist on this store`);return Ep.asObservable().pipe(Lj(e),Iv(e),Zl(FU))}function GU(){return M0.getValue()}const xe={select:qU,get:GU};function ee(){}const bd=e=>e;function KU(e,t){for(const n in t)e[n]=t[n];return e}function ZU(e){return!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}function w9(e){return e()}function P_(){return Object.create(null)}function Ei(e){e.forEach(w9)}function Es(e){return typeof e=="function"}function Wt(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let ih;function ec(e,t){return ih||(ih=document.createElement("a")),ih.href=t,e===ih.href}function XU(e){return Object.keys(e).length===0}function YU(e,...t){if(e==null)return ee;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function wt(e,t,n){e.$$.on_destroy.push(YU(t,n))}function Hv(e,t,n,r){if(e){const i=_9(e,t,n,r);return e[0](i)}}function _9(e,t,n,r){return e[1]&&r?KU(n.ctx.slice(),e[1](r(t))):n.ctx}function zv(e,t,n,r){if(e[2]&&r){const i=e[2](r(n));if(t.dirty===void 0)return i;if(typeof i=="object"){const o=[],s=Math.max(t.dirty.length,i.length);for(let a=0;a32){const t=[],n=e.ctx.length/32;for(let r=0;rwindow.performance.now():()=>Date.now(),qv=x9?e=>requestAnimationFrame(e):ee;const Al=new Set;function E9(e){Al.forEach(t=>{t.c(e)||(Al.delete(t),t.f())}),Al.size!==0&&qv(E9)}function D0(e){let t;return Al.size===0&&qv(E9),{promise:new Promise(n=>{Al.add(t={c:e,f:n})}),abort(){Al.delete(t)}}}function H(e,t){e.appendChild(t)}function Vt(e,t,n){const r=Gv(e);if(!r.getElementById(t)){const i=K("style");i.id=t,i.textContent=n,S9(r,i)}}function Gv(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function QU(e){const t=K("style");return S9(Gv(e),t),t.sheet}function S9(e,t){return H(e.head||e,t),t.sheet}function oe(e,t,n){e.insertBefore(t,n||null)}function re(e){e.parentNode&&e.parentNode.removeChild(e)}function k9(e,t){for(let n=0;ne.removeEventListener(t,n,r)}function eH(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function U(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function tH(e){return Array.from(e.childNodes)}function tt(e,t){t=""+t,e.data!==t&&(e.data=t)}function Ka(e,t,n,r){n==null?e.style.removeProperty(t):e.style.setProperty(t,n,"")}function iZ(e,t,n){for(let r=0;r>>0}function iH(e,t){const n={stylesheet:QU(t),rules:{}};return Sp.set(e,n),n}function Df(e,t,n,r,i,o,s,a=0){const l=16.666/r;let u=`{ `;for(let y=0;y<=1;y+=l){const g=t+(n-t)*o(y);u+=y*100+`%{${s(g,1-g)}} `}const d=u+`100% {${s(n,1-n)}} -}`,c=`__svelte_${rH(d)}_${a}`,f=Gv(e),{stylesheet:m,rules:p}=Sp.get(f)||iH(f,e);p[c]||(p[c]=!0,m.insertRule(`@keyframes ${c} ${d}`,m.cssRules.length));const h=e.style.animation||"";return e.style.animation=`${h?`${h}, `:""}${c} ${r}ms linear ${i}ms 1 both`,kp+=1,c}function Ff(e,t){const n=(e.style.animation||"").split(", "),r=n.filter(t?o=>o.indexOf(t)<0:o=>o.indexOf("__svelte")===-1),i=n.length-r.length;i&&(e.style.animation=r.join(", "),kp-=i,kp||oH())}function oH(){qv(()=>{kp||(Sp.forEach(e=>{const{ownerNode:t}=e.stylesheet;t&&re(t)}),Sp.clear())})}function oZ(e,t,n,r){if(!t)return ee;const i=e.getBoundingClientRect();if(t.left===i.left&&t.right===i.right&&t.top===i.top&&t.bottom===i.bottom)return ee;const{delay:o=0,duration:s=300,easing:a=bd,start:l=j0()+o,end:u=l+s,tick:d=ee,css:c}=n(e,{from:t,to:i},r);let f=!0,m=!1,p;function h(){c&&(p=Df(e,0,1,s,o,a,c)),o||(m=!0)}function y(){c&&Ff(e,p),f=!1}return D0(g=>{if(!m&&g>=l&&(m=!0),m&&g>=u&&(d(1,0),y()),!f)return!1;if(m){const b=g-l,v=0+1*a(b/s);d(v,1-v)}return!0}),h(),d(0,1),y}function sZ(e){const t=getComputedStyle(e);if(t.position!=="absolute"&&t.position!=="fixed"){const{width:n,height:r}=t,i=e.getBoundingClientRect();e.style.position="absolute",e.style.width=n,e.style.height=r,sH(e,i)}}function sH(e,t){const n=e.getBoundingClientRect();if(t.left!==n.left||t.top!==n.top){const r=getComputedStyle(e),i=r.transform==="none"?"":r.transform;e.style.transform=`${i} translate(${t.left-n.left}px, ${t.top-n.top}px)`}}let Uf;function Zi(e){Uf=e}function Kv(){if(!Uf)throw new Error("Function called outside component initialization");return Uf}function aH(e){Kv().$$.on_mount.push(e)}function C9(e){Kv().$$.on_destroy.push(e)}function lH(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach(r=>r.call(this,t))}const Za=[],Cp=[];let Tl=[];const uy=[],cH=Promise.resolve();let fy=!1;function uH(){fy||(fy=!0,cH.then(Zv))}function Rn(e){Tl.push(e)}function fH(e){uy.push(e)}const sg=new Set;let Va=0;function Zv(){if(Va!==0)return;const e=Uf;do{try{for(;Vae.indexOf(r)===-1?t.push(r):n.push(r)),n.forEach(r=>r()),Tl=t}let uu;function Xv(){return uu||(uu=Promise.resolve(),uu.then(()=>{uu=null})),uu}function ua(e,t,n){e.dispatchEvent(nH(`${t?"intro":"outro"}${n}`))}const $h=new Set;let fi;function mt(){fi={r:0,c:[],p:fi}}function gt(){fi.r||Ei(fi.c),fi=fi.p}function X(e,t){e&&e.i&&($h.delete(e),e.i(t))}function ie(e,t,n,r){if(e&&e.o){if($h.has(e))return;$h.add(e),fi.c.push(()=>{$h.delete(e),r&&(n&&e.d(1),r())}),e.o(t)}else r&&r()}const Yv={duration:0};function Qv(e,t,n){const r={direction:"in"};let i=t(e,n,r),o=!1,s,a,l=0;function u(){s&&Ff(e,s)}function d(){const{delay:f=0,duration:m=300,easing:p=bd,tick:h=ee,css:y}=i||Yv;y&&(s=Df(e,0,1,m,f,p,y,l++)),h(0,1);const g=j0()+f,b=g+m;a&&a.abort(),o=!0,Rn(()=>ua(e,!0,"start")),a=D0(v=>{if(o){if(v>=b)return h(1,0),ua(e,!0,"end"),u(),o=!1;if(v>=g){const w=p((v-g)/m);h(w,1-w)}}return o})}let c=!1;return{start(){c||(c=!0,Ff(e),Es(i)?(i=i(r),Xv().then(d)):d())},invalidate(){c=!1},end(){o&&(u(),o=!1)}}}function aZ(e,t,n){const r={direction:"out"};let i=t(e,n,r),o=!0,s;const a=fi;a.r+=1;function l(){const{delay:u=0,duration:d=300,easing:c=bd,tick:f=ee,css:m}=i||Yv;m&&(s=Df(e,1,0,d,u,c,m));const p=j0()+u,h=p+d;Rn(()=>ua(e,!1,"start")),D0(y=>{if(o){if(y>=h)return f(0,1),ua(e,!1,"end"),--a.r||Ei(a.c),!1;if(y>=p){const g=c((y-p)/d);f(1-g,g)}}return o})}return Es(i)?Xv().then(()=>{i=i(r),l()}):l(),{end(u){u&&i.tick&&i.tick(1,0),o&&(s&&Ff(e,s),o=!1)}}}function L_(e,t,n,r){const i={direction:"both"};let o=t(e,n,i),s=r?0:1,a=null,l=null,u=null;function d(){u&&Ff(e,u)}function c(m,p){const h=m.b-s;return p*=Math.abs(h),{a:s,b:m.b,d:h,duration:p,start:m.start,end:m.start+p,group:m.group}}function f(m){const{delay:p=0,duration:h=300,easing:y=bd,tick:g=ee,css:b}=o||Yv,v={start:j0()+p,b:m};m||(v.group=fi,fi.r+=1),a||l?l=v:(b&&(d(),u=Df(e,s,m,h,p,y,b)),m&&g(0,1),a=c(v,h),Rn(()=>ua(e,m,"start")),D0(w=>{if(l&&w>l.start&&(a=c(l,h),l=null,ua(e,a.b,"start"),b&&(d(),u=Df(e,s,a.b,a.duration,0,y,o.css))),a){if(w>=a.end)g(s=a.b,1-s),ua(e,a.b,"end"),l||(a.b?d():--a.group.r||Ei(a.group.c)),a=null;else if(w>=a.start){const E=w-a.start;s=a.a+a.d*y(E/a.duration),g(s,1-s)}}return!!(a||l)}))}return{run(m){Es(o)?Xv().then(()=>{o=o(i),f(m)}):f(m)},end(){d(),a=l=null}}}function Ea(e,t){const n=t.token={};function r(i,o,s,a){if(t.token!==n)return;t.resolved=a;let l=t.ctx;s!==void 0&&(l=l.slice(),l[s]=a);const u=i&&(t.current=i)(l);let d=!1;t.block&&(t.blocks?t.blocks.forEach((c,f)=>{f!==o&&c&&(mt(),ie(c,1,1,()=>{t.blocks[f]===c&&(t.blocks[f]=null)}),gt())}):t.block.d(1),u.c(),X(u,1),u.m(t.mount(),t.anchor),d=!0),t.block=u,t.blocks&&(t.blocks[o]=u),d&&Zv()}if(ZU(e)){const i=Kv();if(e.then(o=>{Zi(i),r(t.then,1,t.value,o),Zi(null)},o=>{if(Zi(i),r(t.catch,2,t.error,o),Zi(null),!t.hasCatch)throw o}),t.current!==t.pending)return r(t.pending,0),!0}else{if(t.current!==t.then)return r(t.then,1,t.value,e),!0;t.resolved=e}}function vc(e,t,n){const r=t.slice(),{resolved:i}=e;e.current===e.then&&(r[e.value]=i),e.current===e.catch&&(r[e.error]=i),e.block.p(r,n)}function lZ(e,t){e.d(1),t.delete(e.key)}function pH(e,t){ie(e,1,1,()=>{t.delete(e.key)})}function cZ(e,t){e.f(),pH(e,t)}function uZ(e,t,n,r,i,o,s,a,l,u,d,c){let f=e.length,m=o.length,p=f;const h={};for(;p--;)h[e[p].key]=p;const y=[],g=new Map,b=new Map,v=[];for(p=m;p--;){const k=c(i,o,p),_=n(k);let S=s.get(_);S?v.push(()=>S.p(k,t)):(S=u(_,k),S.c()),g.set(_,y[p]=S),_ in h&&b.set(_,Math.abs(p-h[_]))}const w=new Set,E=new Set;function C(k){X(k,1),k.m(a,d),s.set(k.key,k),d=k.first,m--}for(;f&&m;){const k=y[m-1],_=e[f-1],S=k.key,A=_.key;k===_?(d=k.first,f--,m--):g.has(A)?!s.has(S)||w.has(S)?C(k):E.has(A)?f--:b.get(S)>b.get(A)?(E.add(S),C(k)):(w.add(A),f--):(l(_,s),f--)}for(;f--;){const k=e[f];g.has(k.key)||l(k,s)}for(;m;)C(y[m-1]);return Ei(v),y}function mH(e,t,n){const r=e.$$.props[t];r!==void 0&&(e.$$.bound[r]=n,n(e.$$.ctx[r]))}function ze(e){e&&e.c()}function De(e,t,n,r){const{fragment:i,after_update:o}=e.$$;i&&i.m(t,n),r||Rn(()=>{const s=e.$$.on_mount.map(w9).filter(Es);e.$$.on_destroy?e.$$.on_destroy.push(...s):Ei(s),e.$$.on_mount=[]}),o.forEach(Rn)}function Fe(e,t){const n=e.$$;n.fragment!==null&&(hH(n.after_update),Ei(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function gH(e,t){e.$$.dirty[0]===-1&&(Za.push(e),uH(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const p=m.length?m[0]:f;return u.ctx&&i(u.ctx[c],u.ctx[c]=p)&&(!u.skip_bound&&u.bound[c]&&u.bound[c](p),d&&gH(e,c)),f}):[],u.update(),d=!0,Ei(u.before_update),u.fragment=r?r(u.ctx):!1,t.target){if(t.hydrate){const c=tH(t.target);u.fragment&&u.fragment.l(c),c.forEach(re)}else u.fragment&&u.fragment.c();t.intro&&X(e.$$.fragment),De(e,t.target,t.anchor,t.customElement),Zv()}Zi(l)}class Gt{$destroy(){Fe(this,1),this.$destroy=ee}$on(t,n){if(!Es(n))return ee;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),()=>{const i=r.indexOf(n);i!==-1&&r.splice(i,1)}}$set(t){this.$$set&&!XU(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Jv=new ao,ew=new ao,jr=new pd({inProgress:!1,actionRequired:""}),tc=new pd(null),tw=xe.select("wallets").pipe(vi(1));Jv.pipe(h7(tw),Iv("1")).subscribe(e=>{e.forEach(({label:t})=>{ew.next(t)}),dz()});const ju=new pd([]);function yH(e){const t=ju.getValue(),n=t.findIndex(({hash:r})=>r===e.hash);if(n!==-1){const r=t.map((i,o)=>o===n?e:i);ju.next(r)}else ju.next([...t,e])}function fZ(e){const t=ju.getValue();ju.next(t.filter(n=>n.hash!==e))}const B_=Cj(()=>{const e=new ao;return C9(()=>{e.next()}),e.asObservable().pipe(Tv(1))}),dl={default:{"--w3o-background-color":"unset","--w3o-foreground-color":"unset","--w3o-text-color":"unset","--w3o-border-color":"unset","--w3o-action-color":"unset","--w3o-border-radius":"unset","--w3o-font-family":"inherit"},light:{"--w3o-background-color":"#ffffff","--w3o-foreground-color":"#EFF1FC","--w3o-text-color":"#1a1d26","--w3o-border-color":"#d0d4f7","--w3o-action-color":"#6370E5","--w3o-border-radius":"16px","--w3o-font-family":"inherit"},dark:{"--w3o-background-color":"#1A1D26","--w3o-foreground-color":"#242835","--w3o-text-color":"#EFF1FC","--w3o-border-color":"#33394B","--w3o-action-color":"#929bed","--w3o-border-radius":"16px","--w3o-font-family":"inherit"}},bH=e=>typeof e=="string"&&e==="system"?wH():vH(e),vH=e=>{if(typeof e=="string"&&e in dl)return dl[e];if(typeof e=="object")return e},Su=e=>{Object.keys(e).forEach(t=>{document.documentElement.style.setProperty(t,e[t]||null)})},wH=()=>{const e=window.matchMedia("(prefers-color-scheme: dark)");e.matches?Su(dl.dark):Su(dl.light),Q1(e,"change").pipe(Bf(Jv)).subscribe(t=>{t.matches?Su(dl.dark):Su(dl.light)})},ag=O.object().unknown(),_H=O.object({namespace:Mv.required(),id:Nv.required()}),xH=O.any().allow(O.object({name:O.string().required(),avatar:O.string(),contentHash:O.any().allow(O.string(),null),getText:O.function().arity(1).required()}),null),EH=O.any().allow(O.object({name:O.string().required()}),null),SH=O.any().allow(O.object({eth:O.number()}).unknown(),null),kH=O.any().allow(O.object({balance:O.string().required(),icon:O.string()}),null),CH=O.object({address:O.string().required(),ens:xH,uns:EH,balance:SH,secondaryTokens:kH}),AH=O.array().items(aU).unique((e,t)=>e.id===t.id).error(e=>e[0].code==="array.unique"?new Error(`There is a duplicate Chain ID in your Onboard Chains array: ${e}`):new Error(`${e}`)),TH=O.array().items(CH),A9=O.object({label:O.string(),icon:O.string(),provider:ag,instance:ag,accounts:TH,chains:O.array().items(_H),wagmiConnector:ag}).required().error(new Error("wallet must be defined")),IH=O.array().items(A9),T9=O.object({name:O.string().required(),url:O.string().uri().required()}),I9=O.object({version:O.string().required(),termsUrl:O.string().uri(),privacyUrl:O.string().uri()}),$H=O.object({name:O.string().required(),description:O.string().required(),icon:O.string(),logo:O.string(),gettingStartedGuide:O.string(),email:O.string(),appUrl:O.string(),explore:O.string(),recommendedInjectedWallets:O.array().items(T9),agreement:I9}),PH=O.object({name:O.string(),description:O.string(),icon:O.string(),logo:O.string(),gettingStartedGuide:O.string(),email:O.string(),appUrl:O.string(),explore:O.string(),recommendedInjectedWallets:O.array().items(T9),agreement:I9});O.object({label:O.string().required(),getInfo:O.function().arity(1).required(),getInterface:O.function().arity(1).required()});const $9=O.array().items(O.function()).required(),OH=O.string(),nw=O.string().valid("topRight","bottomRight","bottomLeft","topLeft"),N_=[70,80,90,95,99],Ap=O.object({transactionHandler:O.function(),enabled:O.boolean(),position:nw,replacement:O.object({gasPriceProbability:O.object({speedup:O.number().valid(...N_),cancel:O.number().valid(...N_)})})}),P9=O.object({desktop:Ap,mobile:Ap}),M_=O.object({enabled:O.boolean(),position:nw,minimal:O.boolean(),containerElement:O.string(),hideTransactionProtectionBtn:O.boolean(),transactionProtectionInfoLink:O.string()}),RH=O.object({enabled:O.boolean(),position:nw,expanded:O.boolean(),minimal:O.boolean(),hideTransactionProtectionBtn:O.boolean(),transactionProtectionInfoLink:O.string(),containerElement:O.string()}),O9=O.object({showSidebar:O.boolean(),disableClose:O.boolean(),autoConnectLastWallet:O.boolean(),autoConnectAllPreviousWallet:O.boolean(),iDontHaveAWalletLink:O.string(),wheresMyWalletLink:O.string(),removeWhereIsMyWalletWarning:O.boolean(),removeIDontHaveAWalletInfoLink:O.boolean(),disableUDResolution:O.boolean()}),LH=O.object({accountCenter:O.string(),connectModal:O.string()}),BH=O.object({"--w3o-background-color":O.string(),"--w3o-font-family":O.string(),"--w3o-foreground-color":O.string(),"--w3o-text-color":O.string(),"--w3o-border-color":O.string(),"--w3o-action-color":O.string(),"--w3o-border-radius":O.string()}),NH=O.string().valid("default","dark","light","system"),R9=O.alternatives().try(BH,NH),MH=O.object({wallets:$9,chains:AH.required(),appMetadata:$H,i18n:O.object().unknown(),apiKey:O.string(),accountCenter:O.object({desktop:M_,mobile:M_,hideTransactionProtectionBtn:O.boolean(),transactionProtectionInfoLink:O.string()}),notify:[P9,Ap],gas:O.object({get:O.function().required(),stream:O.function().required()}),wagmi:O.function(),connect:O9,containerElements:LH,transactionPreview:O.any(),theme:R9,disableFontDownload:O.boolean(),unstoppableResolution:O.function()}),jH=O.object({autoSelect:O.alternatives().try(O.object({label:O.string().required(),disableModals:O.boolean()}),O.string())}),DH=O.object({label:O.string().required()}).required(),FH=O.object({address:O.string().required(),icon:O.string().optional()}),UH=O.object({chainId:Nv.required(),chainNamespace:Mv,wallet:O.string(),rpcUrl:O.string(),label:O.string(),token:O.string(),protectedRpcUrl:O.string(),secondaryTokens:O.array().max(5).items(FH).optional()}),L9=O.object({key:O.string().required(),type:O.string().allow("pending","error","success","hint"),eventCode:O.string(),message:O.string().required(),id:O.string().required(),autoDismiss:O.number(),onClick:O.function(),link:O.string()}),HH=O.object({sendTransaction:O.function(),estimateGas:O.function(),gasPrice:O.function(),balance:O.alternatives(O.string(),O.number()),txDetails:O.object({value:O.alternatives(O.string(),O.number()),to:O.string(),from:O.string()}),txApproveReminderTimeout:O.number()}),zH=O.object({key:O.string(),type:O.string().allow("pending","error","success","hint"),eventCode:O.string(),message:O.string(),id:O.string(),autoDismiss:O.number(),onClick:O.function(),link:O.string()}),WH=O.object({id:O.string().required(),key:O.string().required(),type:O.string().allow("pending","error","success","hint").required(),eventCode:O.string().required(),message:O.string().required(),autoDismiss:O.number().required(),network:O.string().required(),startTime:O.number(),onClick:O.function(),link:O.string()}),VH=O.any().allow(L9,O.boolean().allow(!1));function rw(e){return Ot(A9,e)}function qH(e){return Ot(MH,e)}function GH(e){return Ot(jH,e)}function KH(e){return Ot(DH,e)}function B9(e,t){return Ot(O.string().required().label(t||"value"),e)}function N9(e){return Ot(UH,e)}function ZH(e){return Ot(RH,e)}function XH(e){return Ot(O9,e)}function YH(e){return Ot($9,e)}function QH(e){return Ot(OH,e)}function M9(e){return Ot(Ap,e)}function JH(e){return Ot(P9,e)}function ez(e){return Ot(VH,e)}function tz(e){return Ot(WH,e)}function nz(e){return Ot(HH,e)}function rz(e){return Ot(L9,e)}function j_(e){return Ot(zH,e)}function iz(e){return Ot(IH,e)}function oz(e){return Ot(R9,e)}function sz(e){return Ot(PH,e)}function az(e){const t={type:i9,payload:e.map(n=>{var{namespace:r="evm",id:i,rpcUrl:o}=n,s=_p(n,["namespace","id","rpcUrl"]);return Object.assign(Object.assign({},s),{namespace:r,id:i.toLowerCase(),rpcUrl:o?o.trim():null})})};an(t)}function j9(e){const{label:t,token:n,rpcUrl:r,id:i,namespace:o}=e,s=N9({label:t,token:n,rpcUrl:r,chainId:i,chainNamespace:o});if(s)throw s;an({type:o9,payload:e})}function dy(e){const t=rw(e);if(t)throw console.error(t),t;an({type:a9,payload:e})}function Du(e,t){const n=rw(t);if(n)throw console.error(n),n;const r={type:l9,payload:Object.assign({id:e},t)};an(r)}function lz(e){const t=B9(e,"wallet id");if(t)throw t;an({type:c9,payload:{id:e}})}function cz(e,t){const n=rw(e)||t&&B9(t,"address");if(n)throw n;if(t){const r=e.accounts.find(i=>i.address===t);r&&(e.accounts=[r,...e.accounts.filter(({address:i})=>i!==r.address)])}yz(e),dy(e)}function ku(e,t,n){const r={type:u9,payload:Object.assign({id:e,address:t},n)};an(r)}function D9(e){const t=ZH(e);if(t)throw t;an({type:f9,payload:e})}function uz(e){const t=XH(e);if(t)throw t;an({type:d9,payload:e})}function Ph(e){const t=M9(e);if(t)throw t;an({type:m9,payload:e})}function Xa(e){const t=tz(e);if(t)throw t;an({type:Uv,payload:e})}function lg(e){const t=rz(e);if(t)throw t;an({type:Uv,payload:e})}function fz(e){const t=j_(e);if(t)throw t;const n=`customNotification-${F7()}`,r=Object.assign(Object.assign({},e),{id:n,key:n});lg(r);const i=()=>{r.id&&F9(r.id)},o=s=>{const a=j_(e);if(a)throw a;const l=Object.assign(Object.assign({},s),{id:r.id,key:r.key});return lg(l),{dismiss:i,update:o}};return lg(r),{dismiss:i,update:o}}function F9(e){if(typeof e!="string")throw new Error("Notification id must be of type string");an({type:g9,payload:e})}function dz(){an({type:s9})}function U9(e){const t=YH(e);if(t)throw t;const n=mz(e),r=gz(n);an({type:h9,payload:r})}function hz(e){const t=QH(e);if(t)throw t;an({type:p9,payload:e})}function pz(e){const t=iz(e);if(t)throw t;an({type:y9,payload:e})}function mz(e){const{device:t}=fn;return t?e.reduce((n,r)=>{const i=r({device:t});return i&&n.push(...Array.isArray(i)?i:[i]),n},[]):[]}function gz(e){return e.filter((t,n)=>t&&e.findIndex(r=>r&&r.label===t.label)===n)}function H9(e){const t=oz(e);if(t)throw t;const n=bH(e);n&&Su(n)}function z9(e){const t=sz(e);if(t)throw t;an({type:b9,payload:e})}function W9(e){an({type:v9,payload:e})}function yz(e){const{wagmi:t}=fn;if(t)try{const{label:n}=e,{wagmiConnect:r,getWagmiConnector:i}=t,o=xe.get().wagmiConfig,s=i(n);r(o,{connector:s}).then(()=>{Du(n,{wagmiConnector:s})})}catch(n){console.error(`Error updating Wagmi connector on primary wallet switch ${n}`)}}async function bz(e){if(e){const i=GH(e);if(i)throw i}const{chains:t}=xe.get();if(!t.length)throw new Error("At least one chain must be set before attempting to connect a wallet");let{autoSelect:n}=e||{};n||(n={label:"",disableModals:!1}),n&&(typeof n=="string"||n.label)&&await WU(50),xe.get().walletModules.length||U9(fn.initialWalletInit),jr.next({autoSelect:typeof n=="string"?{label:n,disableModals:!1}:n,inProgress:!0});const r=jr.pipe(Zl(({inProgress:i,actionRequired:o})=>i===!1&&!o),h7(tw),Iv(1));return Lf(r)}var vz={selectingWallet:{header:"Available Wallets",sidebar:{heading:"",subheading:"Connect your wallet",paragraph:"Connecting your wallet is like “logging in” to Web3. Select your wallet from the options to get started.",IDontHaveAWallet:"I don't have a wallet"},recommendedWalletsPart1:"{app} only supports",recommendedWalletsPart2:"on this platform. Please use or install one of the supported wallets to continue",installWallet:"You do not have any wallets installed that {app} supports, please use a supported wallet",agreement:{agree:"I agree to the",terms:"Terms & Conditions",and:"and",privacy:"Privacy Policy"},whyDontISeeMyWallet:"Why don't I see my wallet?",learnMore:"Click here to learn more"},connectingWallet:{header:"{connectionRejected, select, false {Connecting to {wallet}...} other {Connection Rejected}}",sidebar:{subheading:"Approve Connection",paragraph:"Please approve the connection in your wallet and authorize access to continue."},mainText:"Connecting...",paragraph:"Make sure to select all accounts that you want to grant access to.",previousConnection:"{wallet} already has a pending connection request, please open the {wallet} app to login and connect.",rejectedText:"Connection Rejected!",rejectedCTA:"Click here to try again",primaryButton:"Back to wallets"},connectedWallet:{header:"Connection Successful",sidebar:{subheading:"Connection Successful!",paragraph:"Your wallet is now connected to {app}"},mainText:"Connected"}},wz={actionRequired:{heading:"Action required in {wallet}",paragraph:"Please switch the active account in your wallet.",linkText:"Learn more.",buttonText:"Okay"},switchChain:{heading:"Switch Chain",paragraph1:"{app} requires that you switch your wallet to the {nextNetworkName} network to continue.",paragraph2:"*Some wallets may not support changing networks. If you can not change networks in your wallet you may consider switching to a different wallet."},confirmDisconnectAll:{heading:"Disconnect all Wallets",description:"Are you sure that you would like to disconnect all your wallets?",confirm:"Confirm",cancel:"Cancel"},confirmTransactionProtection:{heading:"Enable Transaction Protection",description:"Protect RPC endpoints hide your transaction from front-running and sandwich bots.",link:"Learn more",enable:"Enable",dismiss:"Dismiss"}},_z={connectAnotherWallet:"Connect another Wallet",disconnectAllWallets:"Disconnect all Wallets",currentNetwork:"Current Network",enableTransactionProtection:"Enable Transaction Protection",appInfo:"App Info",learnMore:"Learn More",gettingStartedGuide:"Getting Started Guide",smartContracts:"Smart Contract(s)",explore:"Explore",poweredBy:"powered by",addAccount:"Add Account",setPrimaryAccount:"Set Primary Account",disconnectWallet:"Disconnect Wallet",copyAddress:"Copy Wallet address"},xz={transaction:{txRequest:"Your transaction is waiting for you to confirm",nsfFail:"You have insufficient funds for this transaction",txUnderpriced:"The gas price for your transaction is too low, try a higher gas price",txRepeat:"This could be a repeat transaction",txAwaitingApproval:"You have a previous transaction waiting for you to confirm",txConfirmReminder:"Please confirm your transaction to continue",txSendFail:"You rejected the transaction",txSent:"Your transaction has been sent to the network",txStallPending:"Your transaction has stalled before it was sent, please try again",txStuck:"Your transaction is stuck due to a nonce gap",txPool:"Your transaction has started",txStallConfirmed:"Your transaction has stalled and hasn't been confirmed",txSpeedUp:"Your transaction has been sped up",txCancel:"Your transaction is being canceled",txFailed:"Your transaction has failed",txConfirmed:"Your transaction has succeeded",txError:"Oops something went wrong, please try again",txReplaceError:"There was an error replacing your transaction, please try again"},watched:{txPool:"Your account is {verb} {formattedValue} {asset} {preposition} {counterpartyShortened}",txSpeedUp:"Transaction for {formattedValue} {asset} {preposition} {counterpartyShortened} has been sped up",txCancel:"Transaction for {formattedValue} {asset} {preposition} {counterpartyShortened} has been canceled",txConfirmed:"Your account successfully {verb} {formattedValue} {asset} {preposition} {counterpartyShortened}",txFailed:"Your account failed to {verb} {formattedValue} {asset} {preposition} {counterpartyShortened}",txStuck:"Your transaction is stuck due to a nonce gap"},time:{minutes:"min",seconds:"sec"}},Re={connect:vz,modals:wz,accountCenter:_z,notify:xz};const cg={};async function Ez(e){if(!e)return null;if(!cg[e.rpcUrl]){const t=await HU(e.id);if(!t)return null;const{createPublicClient:n,http:r}=await ue(async()=>{const{createPublicClient:o,http:s}=await import("./index-DkX1LEPK.js");return{createPublicClient:o,http:s}},[]),i=n({chain:t,transport:r()});cg[e.rpcUrl]=i}return cg[e.rpcUrl]}function V9(e){const t={method:"eth_requestAccounts"};return e.request(t)}function dZ(e){const t={method:"eth_selectAccounts"};return e.request(t)}function q9(e){return e.request({method:"eth_chainId"})}function G9(e){const{provider:t,disconnected$:n}=e;return f7(o=>{t.on("accountsChanged",o)},o=>{t.removeListener("accountsChanged",o)}).pipe(Bf(n))}function Sz(e){const{provider:t,disconnected$:n}=e;return f7(o=>{t.on("chainChanged",o)},o=>{t.removeListener("chainChanged",o)}).pipe(Bf(n))}function kz(e,t){const n=ew.pipe(Zl(o=>o===t),Tv(1)),r=G9({provider:e,disconnected$:n}).pipe(J1());r.subscribe(async([o])=>{var s;try{await Az(t)}catch(f){console.warn("Web3Onboard: Error whilst trying to sync connected accounts:",f)}if(!o){iw({label:t});return}const{wallets:a}=xe.get(),l=a.find(f=>f.label===t),u=l?l.accounts:[],[[d],c]=cU(u,f=>f.address===o);if(Du(t,{accounts:[d||{address:o,ens:null,uns:null,balance:null},...c]}),xe.get().notify.enabled&&!d){const f=await $p();if(f){const m=xe.get().wallets.find(p=>p.label===t);try{m&&f.subscribe({id:o,chainId:(s=m.chains[0])===null||s===void 0?void 0:s.id,type:"account"})}catch{}}}}),r.pipe(n_(async([o])=>{if(!o)return;const{wallets:s,chains:a}=xe.get(),l=s.find(v=>v.label===t);if(!l)return;const{chains:u,accounts:d}=l,[c]=u,f=a.find(({namespace:v,id:w})=>v==="evm"&&w===c.id);if(!f)return;const m=Tp(o,f),p=Ip(o,f),h=d.find(v=>v.address===o),y=a.find(({id:v})=>v===xp(c.id)),g=h&&h.ens?Promise.resolve(h.ens):y?hy(o,y):Promise.resolve(null),b=h&&h.uns?Promise.resolve(h.uns):y?py(o,y):Promise.resolve(null);return Promise.all([Promise.resolve(o),m,g,b,p])})).subscribe(o=>{if(!o)return;const[s,a,l,u,d]=o;ku(t,s,{balance:a,ens:l,uns:u,secondaryTokens:d})});const i=Sz({provider:e,disconnected$:n}).pipe(J1());i.subscribe(async o=>{const{wallets:s}=xe.get(),a=s.find(f=>f.label===t);if(!a)return;const{chains:l,accounts:u}=a,[d]=l;if(cy(o)||(o=E_(o)),o===d.id)return;if(xe.get().notify.enabled){const f=await $p();if(f){const m=xe.get().wallets.find(p=>p.label===t);if(!m)return;m.accounts.forEach(({address:p})=>{f.unsubscribe({id:p,chainId:m.chains[0].id,timeout:6e4})}),m.accounts.forEach(({address:p})=>{try{f.subscribe({id:p,chainId:o,type:"account"})}catch{}})}}const c=u.map(({address:f})=>({address:f,ens:null,uns:null,balance:null}));Du(t,{chains:[{namespace:"evm",id:o}],accounts:c})}),i.pipe(n_(async o=>{const{wallets:s,chains:a}=xe.get(),l=s.find(c=>c.label===t),u=(l==null?void 0:l.accounts)||[];cy(o)||(o=E_(o));const d=a.find(({namespace:c,id:f})=>c==="evm"&&f===o);return d?Promise.all(u.map(async({address:c})=>{const f=Tp(c,d),m=Ip(c,d),p=a.find(({id:E})=>E===xp(o)),h=p?hy(c,p):Promise.resolve(null),y=p?py(c,p):Promise.resolve(null),[g,b,v,w]=await Promise.all([f,h,y,m]);return{address:c,balance:g,ens:b,uns:v,secondaryTokens:w}})):Promise.resolve(null)})).subscribe(o=>{o&&Du(t,{accounts:o})}),n.subscribe(()=>{e.disconnect&&e.disconnect()})}async function hy(e,t){if(!t)return null;const n=await Ez(t);if(!n)return null;try{const r=await n.getEnsName({address:e});let i=null;if(r){const{labelhash:o,normalize:s}=await ue(async()=>{const{labelhash:f,normalize:m}=await import("./index-021f6a62-BcF70HI7.js").then(p=>p.y);return{labelhash:f,normalize:m}},[]).then(function(f){return f.i}),a=s(r),l=await n.getEnsResolver({name:a}),u=await n.getEnsAvatar({name:a}),d=o(a);i={name:r,avatar:u,contentHash:d,ensResolver:l,getText:async f=>await n.getEnsText({name:r,key:f})}}return i}catch(r){return console.error(r),null}}async function py(e,t){const{unstoppableResolution:n}=fn;if(!n||!K7()||!t)return null;try{return await n(e)}catch(r){return console.error(r),null}}async function Tp(e,t){if(!t)return null;const{wallets:n}=xe.get();try{const r=n.find(s=>!!s.provider);if(!r)return null;const o=await r.provider.request({method:"eth_getBalance",params:[e,"latest"]});return o?{[t.token||"eth"]:rU(o)}:null}catch(r){return console.error(r),null}}function F0(e,t){return e.request({method:"wallet_switchEthereumChain",params:[{chainId:t}]})}function K9(e,t){return e.request({method:"wallet_addEthereumChain",params:[{chainId:t.id,chainName:t.label,nativeCurrency:{name:t.label,symbol:t.token,decimals:18},rpcUrls:[t.publicRpcUrl||t.rpcUrl],blockExplorerUrls:t.blockExplorerUrl?[t.blockExplorerUrl]:null}]})}function hZ(e,t,n){return e.request({method:"wallet_addEthereumChain",params:[{chainId:t.id,chainName:t.label,nativeCurrency:{name:t.label,symbol:t.token,decimals:18},rpcUrls:[n],blockExplorerUrls:t.blockExplorerUrl?[t.blockExplorerUrl]:void 0}]})}async function Cz(e){try{const t=await e.request({method:"wallet_getPermissions"});return Array.isArray(t)?t:[]}catch{return[]}}async function Az(e){const t=xe.get().wallets.find(i=>i.label===e);if(!t)return;const r=(await Cz(t.provider)).find(({parentCapability:i})=>i==="eth_accounts");if(r){const{value:i}=r.caveats.find(({type:o})=>o==="restrictReturnedAccounts")||{value:null};if(i){const o=t.accounts.filter(({address:s})=>i.includes(s));Du(t.label,Object.assign(Object.assign({},t),{accounts:o}))}}}const Tz=async(e,t)=>{try{const{id:n}=t;return await K9(e,t),await F0(e,n),n}catch{return}},Iz=()=>({addOrSwitchChain:Tz,getChainId:q9,requestAccounts:V9,switchChain:F0});async function Z9(e){const{wallets:t,chains:n}=xe.get(),r=await Promise.all(t.map(async i=>{const o=n.find(({id:a})=>a===i.chains[0].id);if(!o)return;const s=await Promise.all(i.accounts.map(async a=>{const l=await Ip(a.address,o);if(!e||e.some(u=>u.toLowerCase()===a.address.toLowerCase())){const u=await Tp(a.address,o);return Object.assign(Object.assign({},a),{balance:u,secondaryTokens:l})}return Object.assign(Object.assign({},a),{secondaryTokens:l})}));return Object.assign(Object.assign({},i),{accounts:s})}));pz(r)}const Ip=async(e,t)=>{if(!t)return[];const n=t.rpcUrl;return!t.secondaryTokens||!t.secondaryTokens.length||!n?[]:await Promise.all(t.secondaryTokens.map(async i=>{try{const{createPublicClient:o,http:s}=await ue(async()=>{const{createPublicClient:p,http:h}=await import("./index-DkX1LEPK.js");return{createPublicClient:p,http:h}},[]),a=await oU(t),l=o({chain:a,transport:s(t.providerConnectionInfo&&t.providerConnectionInfo.url?t.providerConnectionInfo.url:n)}),u={abi:[{inputs:[{name:"owner",type:"address"}],name:"balanceOf",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],stateMutability:"view",type:"function"}],address:i.address},d=l.readContract(Object.assign(Object.assign({},u),{functionName:"balanceOf",args:[e]}))||"",c=l.readContract(Object.assign(Object.assign({},u),{functionName:"symbol",args:[]}))||"",[f,m]=await Promise.all([d,c]);return{name:m,balance:Z7(f.toString()),icon:i.icon}}catch(o){console.error(`There was an error fetching balance and/or symbol +}`,c=`__svelte_${rH(d)}_${a}`,f=Gv(e),{stylesheet:m,rules:p}=Sp.get(f)||iH(f,e);p[c]||(p[c]=!0,m.insertRule(`@keyframes ${c} ${d}`,m.cssRules.length));const h=e.style.animation||"";return e.style.animation=`${h?`${h}, `:""}${c} ${r}ms linear ${i}ms 1 both`,kp+=1,c}function Ff(e,t){const n=(e.style.animation||"").split(", "),r=n.filter(t?o=>o.indexOf(t)<0:o=>o.indexOf("__svelte")===-1),i=n.length-r.length;i&&(e.style.animation=r.join(", "),kp-=i,kp||oH())}function oH(){qv(()=>{kp||(Sp.forEach(e=>{const{ownerNode:t}=e.stylesheet;t&&re(t)}),Sp.clear())})}function oZ(e,t,n,r){if(!t)return ee;const i=e.getBoundingClientRect();if(t.left===i.left&&t.right===i.right&&t.top===i.top&&t.bottom===i.bottom)return ee;const{delay:o=0,duration:s=300,easing:a=bd,start:l=j0()+o,end:u=l+s,tick:d=ee,css:c}=n(e,{from:t,to:i},r);let f=!0,m=!1,p;function h(){c&&(p=Df(e,0,1,s,o,a,c)),o||(m=!0)}function y(){c&&Ff(e,p),f=!1}return D0(g=>{if(!m&&g>=l&&(m=!0),m&&g>=u&&(d(1,0),y()),!f)return!1;if(m){const b=g-l,v=0+1*a(b/s);d(v,1-v)}return!0}),h(),d(0,1),y}function sZ(e){const t=getComputedStyle(e);if(t.position!=="absolute"&&t.position!=="fixed"){const{width:n,height:r}=t,i=e.getBoundingClientRect();e.style.position="absolute",e.style.width=n,e.style.height=r,sH(e,i)}}function sH(e,t){const n=e.getBoundingClientRect();if(t.left!==n.left||t.top!==n.top){const r=getComputedStyle(e),i=r.transform==="none"?"":r.transform;e.style.transform=`${i} translate(${t.left-n.left}px, ${t.top-n.top}px)`}}let Uf;function Zi(e){Uf=e}function Kv(){if(!Uf)throw new Error("Function called outside component initialization");return Uf}function aH(e){Kv().$$.on_mount.push(e)}function C9(e){Kv().$$.on_destroy.push(e)}function lH(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach(r=>r.call(this,t))}const Za=[],Cp=[];let Tl=[];const uy=[],cH=Promise.resolve();let fy=!1;function uH(){fy||(fy=!0,cH.then(Zv))}function Rn(e){Tl.push(e)}function fH(e){uy.push(e)}const sg=new Set;let Va=0;function Zv(){if(Va!==0)return;const e=Uf;do{try{for(;Vae.indexOf(r)===-1?t.push(r):n.push(r)),n.forEach(r=>r()),Tl=t}let uu;function Xv(){return uu||(uu=Promise.resolve(),uu.then(()=>{uu=null})),uu}function ua(e,t,n){e.dispatchEvent(nH(`${t?"intro":"outro"}${n}`))}const $h=new Set;let fi;function mt(){fi={r:0,c:[],p:fi}}function gt(){fi.r||Ei(fi.c),fi=fi.p}function X(e,t){e&&e.i&&($h.delete(e),e.i(t))}function ie(e,t,n,r){if(e&&e.o){if($h.has(e))return;$h.add(e),fi.c.push(()=>{$h.delete(e),r&&(n&&e.d(1),r())}),e.o(t)}else r&&r()}const Yv={duration:0};function Qv(e,t,n){const r={direction:"in"};let i=t(e,n,r),o=!1,s,a,l=0;function u(){s&&Ff(e,s)}function d(){const{delay:f=0,duration:m=300,easing:p=bd,tick:h=ee,css:y}=i||Yv;y&&(s=Df(e,0,1,m,f,p,y,l++)),h(0,1);const g=j0()+f,b=g+m;a&&a.abort(),o=!0,Rn(()=>ua(e,!0,"start")),a=D0(v=>{if(o){if(v>=b)return h(1,0),ua(e,!0,"end"),u(),o=!1;if(v>=g){const w=p((v-g)/m);h(w,1-w)}}return o})}let c=!1;return{start(){c||(c=!0,Ff(e),Es(i)?(i=i(r),Xv().then(d)):d())},invalidate(){c=!1},end(){o&&(u(),o=!1)}}}function aZ(e,t,n){const r={direction:"out"};let i=t(e,n,r),o=!0,s;const a=fi;a.r+=1;function l(){const{delay:u=0,duration:d=300,easing:c=bd,tick:f=ee,css:m}=i||Yv;m&&(s=Df(e,1,0,d,u,c,m));const p=j0()+u,h=p+d;Rn(()=>ua(e,!1,"start")),D0(y=>{if(o){if(y>=h)return f(0,1),ua(e,!1,"end"),--a.r||Ei(a.c),!1;if(y>=p){const g=c((y-p)/d);f(1-g,g)}}return o})}return Es(i)?Xv().then(()=>{i=i(r),l()}):l(),{end(u){u&&i.tick&&i.tick(1,0),o&&(s&&Ff(e,s),o=!1)}}}function L_(e,t,n,r){const i={direction:"both"};let o=t(e,n,i),s=r?0:1,a=null,l=null,u=null;function d(){u&&Ff(e,u)}function c(m,p){const h=m.b-s;return p*=Math.abs(h),{a:s,b:m.b,d:h,duration:p,start:m.start,end:m.start+p,group:m.group}}function f(m){const{delay:p=0,duration:h=300,easing:y=bd,tick:g=ee,css:b}=o||Yv,v={start:j0()+p,b:m};m||(v.group=fi,fi.r+=1),a||l?l=v:(b&&(d(),u=Df(e,s,m,h,p,y,b)),m&&g(0,1),a=c(v,h),Rn(()=>ua(e,m,"start")),D0(w=>{if(l&&w>l.start&&(a=c(l,h),l=null,ua(e,a.b,"start"),b&&(d(),u=Df(e,s,a.b,a.duration,0,y,o.css))),a){if(w>=a.end)g(s=a.b,1-s),ua(e,a.b,"end"),l||(a.b?d():--a.group.r||Ei(a.group.c)),a=null;else if(w>=a.start){const E=w-a.start;s=a.a+a.d*y(E/a.duration),g(s,1-s)}}return!!(a||l)}))}return{run(m){Es(o)?Xv().then(()=>{o=o(i),f(m)}):f(m)},end(){d(),a=l=null}}}function Ea(e,t){const n=t.token={};function r(i,o,s,a){if(t.token!==n)return;t.resolved=a;let l=t.ctx;s!==void 0&&(l=l.slice(),l[s]=a);const u=i&&(t.current=i)(l);let d=!1;t.block&&(t.blocks?t.blocks.forEach((c,f)=>{f!==o&&c&&(mt(),ie(c,1,1,()=>{t.blocks[f]===c&&(t.blocks[f]=null)}),gt())}):t.block.d(1),u.c(),X(u,1),u.m(t.mount(),t.anchor),d=!0),t.block=u,t.blocks&&(t.blocks[o]=u),d&&Zv()}if(ZU(e)){const i=Kv();if(e.then(o=>{Zi(i),r(t.then,1,t.value,o),Zi(null)},o=>{if(Zi(i),r(t.catch,2,t.error,o),Zi(null),!t.hasCatch)throw o}),t.current!==t.pending)return r(t.pending,0),!0}else{if(t.current!==t.then)return r(t.then,1,t.value,e),!0;t.resolved=e}}function vc(e,t,n){const r=t.slice(),{resolved:i}=e;e.current===e.then&&(r[e.value]=i),e.current===e.catch&&(r[e.error]=i),e.block.p(r,n)}function lZ(e,t){e.d(1),t.delete(e.key)}function pH(e,t){ie(e,1,1,()=>{t.delete(e.key)})}function cZ(e,t){e.f(),pH(e,t)}function uZ(e,t,n,r,i,o,s,a,l,u,d,c){let f=e.length,m=o.length,p=f;const h={};for(;p--;)h[e[p].key]=p;const y=[],g=new Map,b=new Map,v=[];for(p=m;p--;){const k=c(i,o,p),_=n(k);let S=s.get(_);S?v.push(()=>S.p(k,t)):(S=u(_,k),S.c()),g.set(_,y[p]=S),_ in h&&b.set(_,Math.abs(p-h[_]))}const w=new Set,E=new Set;function C(k){X(k,1),k.m(a,d),s.set(k.key,k),d=k.first,m--}for(;f&&m;){const k=y[m-1],_=e[f-1],S=k.key,A=_.key;k===_?(d=k.first,f--,m--):g.has(A)?!s.has(S)||w.has(S)?C(k):E.has(A)?f--:b.get(S)>b.get(A)?(E.add(S),C(k)):(w.add(A),f--):(l(_,s),f--)}for(;f--;){const k=e[f];g.has(k.key)||l(k,s)}for(;m;)C(y[m-1]);return Ei(v),y}function mH(e,t,n){const r=e.$$.props[t];r!==void 0&&(e.$$.bound[r]=n,n(e.$$.ctx[r]))}function ze(e){e&&e.c()}function De(e,t,n,r){const{fragment:i,after_update:o}=e.$$;i&&i.m(t,n),r||Rn(()=>{const s=e.$$.on_mount.map(w9).filter(Es);e.$$.on_destroy?e.$$.on_destroy.push(...s):Ei(s),e.$$.on_mount=[]}),o.forEach(Rn)}function Fe(e,t){const n=e.$$;n.fragment!==null&&(hH(n.after_update),Ei(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function gH(e,t){e.$$.dirty[0]===-1&&(Za.push(e),uH(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const p=m.length?m[0]:f;return u.ctx&&i(u.ctx[c],u.ctx[c]=p)&&(!u.skip_bound&&u.bound[c]&&u.bound[c](p),d&&gH(e,c)),f}):[],u.update(),d=!0,Ei(u.before_update),u.fragment=r?r(u.ctx):!1,t.target){if(t.hydrate){const c=tH(t.target);u.fragment&&u.fragment.l(c),c.forEach(re)}else u.fragment&&u.fragment.c();t.intro&&X(e.$$.fragment),De(e,t.target,t.anchor,t.customElement),Zv()}Zi(l)}class Gt{$destroy(){Fe(this,1),this.$destroy=ee}$on(t,n){if(!Es(n))return ee;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),()=>{const i=r.indexOf(n);i!==-1&&r.splice(i,1)}}$set(t){this.$$set&&!XU(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Jv=new ao,ew=new ao,jr=new pd({inProgress:!1,actionRequired:""}),tc=new pd(null),tw=xe.select("wallets").pipe(vi(1));Jv.pipe(h7(tw),Iv("1")).subscribe(e=>{e.forEach(({label:t})=>{ew.next(t)}),dz()});const ju=new pd([]);function yH(e){const t=ju.getValue(),n=t.findIndex(({hash:r})=>r===e.hash);if(n!==-1){const r=t.map((i,o)=>o===n?e:i);ju.next(r)}else ju.next([...t,e])}function fZ(e){const t=ju.getValue();ju.next(t.filter(n=>n.hash!==e))}const B_=Cj(()=>{const e=new ao;return C9(()=>{e.next()}),e.asObservable().pipe(Tv(1))}),dl={default:{"--w3o-background-color":"unset","--w3o-foreground-color":"unset","--w3o-text-color":"unset","--w3o-border-color":"unset","--w3o-action-color":"unset","--w3o-border-radius":"unset","--w3o-font-family":"inherit"},light:{"--w3o-background-color":"#ffffff","--w3o-foreground-color":"#EFF1FC","--w3o-text-color":"#1a1d26","--w3o-border-color":"#d0d4f7","--w3o-action-color":"#6370E5","--w3o-border-radius":"16px","--w3o-font-family":"inherit"},dark:{"--w3o-background-color":"#1A1D26","--w3o-foreground-color":"#242835","--w3o-text-color":"#EFF1FC","--w3o-border-color":"#33394B","--w3o-action-color":"#929bed","--w3o-border-radius":"16px","--w3o-font-family":"inherit"}},bH=e=>typeof e=="string"&&e==="system"?wH():vH(e),vH=e=>{if(typeof e=="string"&&e in dl)return dl[e];if(typeof e=="object")return e},Su=e=>{Object.keys(e).forEach(t=>{document.documentElement.style.setProperty(t,e[t]||null)})},wH=()=>{const e=window.matchMedia("(prefers-color-scheme: dark)");e.matches?Su(dl.dark):Su(dl.light),Q1(e,"change").pipe(Bf(Jv)).subscribe(t=>{t.matches?Su(dl.dark):Su(dl.light)})},ag=O.object().unknown(),_H=O.object({namespace:Mv.required(),id:Nv.required()}),xH=O.any().allow(O.object({name:O.string().required(),avatar:O.string(),contentHash:O.any().allow(O.string(),null),getText:O.function().arity(1).required()}),null),EH=O.any().allow(O.object({name:O.string().required()}),null),SH=O.any().allow(O.object({eth:O.number()}).unknown(),null),kH=O.any().allow(O.object({balance:O.string().required(),icon:O.string()}),null),CH=O.object({address:O.string().required(),ens:xH,uns:EH,balance:SH,secondaryTokens:kH}),AH=O.array().items(aU).unique((e,t)=>e.id===t.id).error(e=>e[0].code==="array.unique"?new Error(`There is a duplicate Chain ID in your Onboard Chains array: ${e}`):new Error(`${e}`)),TH=O.array().items(CH),A9=O.object({label:O.string(),icon:O.string(),provider:ag,instance:ag,accounts:TH,chains:O.array().items(_H),wagmiConnector:ag}).required().error(new Error("wallet must be defined")),IH=O.array().items(A9),T9=O.object({name:O.string().required(),url:O.string().uri().required()}),I9=O.object({version:O.string().required(),termsUrl:O.string().uri(),privacyUrl:O.string().uri()}),$H=O.object({name:O.string().required(),description:O.string().required(),icon:O.string(),logo:O.string(),gettingStartedGuide:O.string(),email:O.string(),appUrl:O.string(),explore:O.string(),recommendedInjectedWallets:O.array().items(T9),agreement:I9}),PH=O.object({name:O.string(),description:O.string(),icon:O.string(),logo:O.string(),gettingStartedGuide:O.string(),email:O.string(),appUrl:O.string(),explore:O.string(),recommendedInjectedWallets:O.array().items(T9),agreement:I9});O.object({label:O.string().required(),getInfo:O.function().arity(1).required(),getInterface:O.function().arity(1).required()});const $9=O.array().items(O.function()).required(),OH=O.string(),nw=O.string().valid("topRight","bottomRight","bottomLeft","topLeft"),N_=[70,80,90,95,99],Ap=O.object({transactionHandler:O.function(),enabled:O.boolean(),position:nw,replacement:O.object({gasPriceProbability:O.object({speedup:O.number().valid(...N_),cancel:O.number().valid(...N_)})})}),P9=O.object({desktop:Ap,mobile:Ap}),M_=O.object({enabled:O.boolean(),position:nw,minimal:O.boolean(),containerElement:O.string(),hideTransactionProtectionBtn:O.boolean(),transactionProtectionInfoLink:O.string()}),RH=O.object({enabled:O.boolean(),position:nw,expanded:O.boolean(),minimal:O.boolean(),hideTransactionProtectionBtn:O.boolean(),transactionProtectionInfoLink:O.string(),containerElement:O.string()}),O9=O.object({showSidebar:O.boolean(),disableClose:O.boolean(),autoConnectLastWallet:O.boolean(),autoConnectAllPreviousWallet:O.boolean(),iDontHaveAWalletLink:O.string(),wheresMyWalletLink:O.string(),removeWhereIsMyWalletWarning:O.boolean(),removeIDontHaveAWalletInfoLink:O.boolean(),disableUDResolution:O.boolean()}),LH=O.object({accountCenter:O.string(),connectModal:O.string()}),BH=O.object({"--w3o-background-color":O.string(),"--w3o-font-family":O.string(),"--w3o-foreground-color":O.string(),"--w3o-text-color":O.string(),"--w3o-border-color":O.string(),"--w3o-action-color":O.string(),"--w3o-border-radius":O.string()}),NH=O.string().valid("default","dark","light","system"),R9=O.alternatives().try(BH,NH),MH=O.object({wallets:$9,chains:AH.required(),appMetadata:$H,i18n:O.object().unknown(),apiKey:O.string(),accountCenter:O.object({desktop:M_,mobile:M_,hideTransactionProtectionBtn:O.boolean(),transactionProtectionInfoLink:O.string()}),notify:[P9,Ap],gas:O.object({get:O.function().required(),stream:O.function().required()}),wagmi:O.function(),connect:O9,containerElements:LH,transactionPreview:O.any(),theme:R9,disableFontDownload:O.boolean(),unstoppableResolution:O.function()}),jH=O.object({autoSelect:O.alternatives().try(O.object({label:O.string().required(),disableModals:O.boolean()}),O.string())}),DH=O.object({label:O.string().required()}).required(),FH=O.object({address:O.string().required(),icon:O.string().optional()}),UH=O.object({chainId:Nv.required(),chainNamespace:Mv,wallet:O.string(),rpcUrl:O.string(),label:O.string(),token:O.string(),protectedRpcUrl:O.string(),secondaryTokens:O.array().max(5).items(FH).optional()}),L9=O.object({key:O.string().required(),type:O.string().allow("pending","error","success","hint"),eventCode:O.string(),message:O.string().required(),id:O.string().required(),autoDismiss:O.number(),onClick:O.function(),link:O.string()}),HH=O.object({sendTransaction:O.function(),estimateGas:O.function(),gasPrice:O.function(),balance:O.alternatives(O.string(),O.number()),txDetails:O.object({value:O.alternatives(O.string(),O.number()),to:O.string(),from:O.string()}),txApproveReminderTimeout:O.number()}),zH=O.object({key:O.string(),type:O.string().allow("pending","error","success","hint"),eventCode:O.string(),message:O.string(),id:O.string(),autoDismiss:O.number(),onClick:O.function(),link:O.string()}),WH=O.object({id:O.string().required(),key:O.string().required(),type:O.string().allow("pending","error","success","hint").required(),eventCode:O.string().required(),message:O.string().required(),autoDismiss:O.number().required(),network:O.string().required(),startTime:O.number(),onClick:O.function(),link:O.string()}),VH=O.any().allow(L9,O.boolean().allow(!1));function rw(e){return Ot(A9,e)}function qH(e){return Ot(MH,e)}function GH(e){return Ot(jH,e)}function KH(e){return Ot(DH,e)}function B9(e,t){return Ot(O.string().required().label(t||"value"),e)}function N9(e){return Ot(UH,e)}function ZH(e){return Ot(RH,e)}function XH(e){return Ot(O9,e)}function YH(e){return Ot($9,e)}function QH(e){return Ot(OH,e)}function M9(e){return Ot(Ap,e)}function JH(e){return Ot(P9,e)}function ez(e){return Ot(VH,e)}function tz(e){return Ot(WH,e)}function nz(e){return Ot(HH,e)}function rz(e){return Ot(L9,e)}function j_(e){return Ot(zH,e)}function iz(e){return Ot(IH,e)}function oz(e){return Ot(R9,e)}function sz(e){return Ot(PH,e)}function az(e){const t={type:i9,payload:e.map(n=>{var{namespace:r="evm",id:i,rpcUrl:o}=n,s=_p(n,["namespace","id","rpcUrl"]);return Object.assign(Object.assign({},s),{namespace:r,id:i.toLowerCase(),rpcUrl:o?o.trim():null})})};an(t)}function j9(e){const{label:t,token:n,rpcUrl:r,id:i,namespace:o}=e,s=N9({label:t,token:n,rpcUrl:r,chainId:i,chainNamespace:o});if(s)throw s;an({type:o9,payload:e})}function dy(e){const t=rw(e);if(t)throw console.error(t),t;an({type:a9,payload:e})}function Du(e,t){const n=rw(t);if(n)throw console.error(n),n;const r={type:l9,payload:Object.assign({id:e},t)};an(r)}function lz(e){const t=B9(e,"wallet id");if(t)throw t;an({type:c9,payload:{id:e}})}function cz(e,t){const n=rw(e)||t&&B9(t,"address");if(n)throw n;if(t){const r=e.accounts.find(i=>i.address===t);r&&(e.accounts=[r,...e.accounts.filter(({address:i})=>i!==r.address)])}yz(e),dy(e)}function ku(e,t,n){const r={type:u9,payload:Object.assign({id:e,address:t},n)};an(r)}function D9(e){const t=ZH(e);if(t)throw t;an({type:f9,payload:e})}function uz(e){const t=XH(e);if(t)throw t;an({type:d9,payload:e})}function Ph(e){const t=M9(e);if(t)throw t;an({type:m9,payload:e})}function Xa(e){const t=tz(e);if(t)throw t;an({type:Uv,payload:e})}function lg(e){const t=rz(e);if(t)throw t;an({type:Uv,payload:e})}function fz(e){const t=j_(e);if(t)throw t;const n=`customNotification-${F7()}`,r=Object.assign(Object.assign({},e),{id:n,key:n});lg(r);const i=()=>{r.id&&F9(r.id)},o=s=>{const a=j_(e);if(a)throw a;const l=Object.assign(Object.assign({},s),{id:r.id,key:r.key});return lg(l),{dismiss:i,update:o}};return lg(r),{dismiss:i,update:o}}function F9(e){if(typeof e!="string")throw new Error("Notification id must be of type string");an({type:g9,payload:e})}function dz(){an({type:s9})}function U9(e){const t=YH(e);if(t)throw t;const n=mz(e),r=gz(n);an({type:h9,payload:r})}function hz(e){const t=QH(e);if(t)throw t;an({type:p9,payload:e})}function pz(e){const t=iz(e);if(t)throw t;an({type:y9,payload:e})}function mz(e){const{device:t}=fn;return t?e.reduce((n,r)=>{const i=r({device:t});return i&&n.push(...Array.isArray(i)?i:[i]),n},[]):[]}function gz(e){return e.filter((t,n)=>t&&e.findIndex(r=>r&&r.label===t.label)===n)}function H9(e){const t=oz(e);if(t)throw t;const n=bH(e);n&&Su(n)}function z9(e){const t=sz(e);if(t)throw t;an({type:b9,payload:e})}function W9(e){an({type:v9,payload:e})}function yz(e){const{wagmi:t}=fn;if(t)try{const{label:n}=e,{wagmiConnect:r,getWagmiConnector:i}=t,o=xe.get().wagmiConfig,s=i(n);r(o,{connector:s}).then(()=>{Du(n,{wagmiConnector:s})})}catch(n){console.error(`Error updating Wagmi connector on primary wallet switch ${n}`)}}async function bz(e){if(e){const i=GH(e);if(i)throw i}const{chains:t}=xe.get();if(!t.length)throw new Error("At least one chain must be set before attempting to connect a wallet");let{autoSelect:n}=e||{};n||(n={label:"",disableModals:!1}),n&&(typeof n=="string"||n.label)&&await WU(50),xe.get().walletModules.length||U9(fn.initialWalletInit),jr.next({autoSelect:typeof n=="string"?{label:n,disableModals:!1}:n,inProgress:!0});const r=jr.pipe(Zl(({inProgress:i,actionRequired:o})=>i===!1&&!o),h7(tw),Iv(1));return Lf(r)}var vz={selectingWallet:{header:"Available Wallets",sidebar:{heading:"",subheading:"Connect your wallet",paragraph:"Connecting your wallet is like “logging in” to Web3. Select your wallet from the options to get started.",IDontHaveAWallet:"I don't have a wallet"},recommendedWalletsPart1:"{app} only supports",recommendedWalletsPart2:"on this platform. Please use or install one of the supported wallets to continue",installWallet:"You do not have any wallets installed that {app} supports, please use a supported wallet",agreement:{agree:"I agree to the",terms:"Terms & Conditions",and:"and",privacy:"Privacy Policy"},whyDontISeeMyWallet:"Why don't I see my wallet?",learnMore:"Click here to learn more"},connectingWallet:{header:"{connectionRejected, select, false {Connecting to {wallet}...} other {Connection Rejected}}",sidebar:{subheading:"Approve Connection",paragraph:"Please approve the connection in your wallet and authorize access to continue."},mainText:"Connecting...",paragraph:"Make sure to select all accounts that you want to grant access to.",previousConnection:"{wallet} already has a pending connection request, please open the {wallet} app to login and connect.",rejectedText:"Connection Rejected!",rejectedCTA:"Click here to try again",primaryButton:"Back to wallets"},connectedWallet:{header:"Connection Successful",sidebar:{subheading:"Connection Successful!",paragraph:"Your wallet is now connected to {app}"},mainText:"Connected"}},wz={actionRequired:{heading:"Action required in {wallet}",paragraph:"Please switch the active account in your wallet.",linkText:"Learn more.",buttonText:"Okay"},switchChain:{heading:"Switch Chain",paragraph1:"{app} requires that you switch your wallet to the {nextNetworkName} network to continue.",paragraph2:"*Some wallets may not support changing networks. If you can not change networks in your wallet you may consider switching to a different wallet."},confirmDisconnectAll:{heading:"Disconnect all Wallets",description:"Are you sure that you would like to disconnect all your wallets?",confirm:"Confirm",cancel:"Cancel"},confirmTransactionProtection:{heading:"Enable Transaction Protection",description:"Protect RPC endpoints hide your transaction from front-running and sandwich bots.",link:"Learn more",enable:"Enable",dismiss:"Dismiss"}},_z={connectAnotherWallet:"Connect another Wallet",disconnectAllWallets:"Disconnect all Wallets",currentNetwork:"Current Network",enableTransactionProtection:"Enable Transaction Protection",appInfo:"App Info",learnMore:"Learn More",gettingStartedGuide:"Getting Started Guide",smartContracts:"Smart Contract(s)",explore:"Explore",poweredBy:"powered by",addAccount:"Add Account",setPrimaryAccount:"Set Primary Account",disconnectWallet:"Disconnect Wallet",copyAddress:"Copy Wallet address"},xz={transaction:{txRequest:"Your transaction is waiting for you to confirm",nsfFail:"You have insufficient funds for this transaction",txUnderpriced:"The gas price for your transaction is too low, try a higher gas price",txRepeat:"This could be a repeat transaction",txAwaitingApproval:"You have a previous transaction waiting for you to confirm",txConfirmReminder:"Please confirm your transaction to continue",txSendFail:"You rejected the transaction",txSent:"Your transaction has been sent to the network",txStallPending:"Your transaction has stalled before it was sent, please try again",txStuck:"Your transaction is stuck due to a nonce gap",txPool:"Your transaction has started",txStallConfirmed:"Your transaction has stalled and hasn't been confirmed",txSpeedUp:"Your transaction has been sped up",txCancel:"Your transaction is being canceled",txFailed:"Your transaction has failed",txConfirmed:"Your transaction has succeeded",txError:"Oops something went wrong, please try again",txReplaceError:"There was an error replacing your transaction, please try again"},watched:{txPool:"Your account is {verb} {formattedValue} {asset} {preposition} {counterpartyShortened}",txSpeedUp:"Transaction for {formattedValue} {asset} {preposition} {counterpartyShortened} has been sped up",txCancel:"Transaction for {formattedValue} {asset} {preposition} {counterpartyShortened} has been canceled",txConfirmed:"Your account successfully {verb} {formattedValue} {asset} {preposition} {counterpartyShortened}",txFailed:"Your account failed to {verb} {formattedValue} {asset} {preposition} {counterpartyShortened}",txStuck:"Your transaction is stuck due to a nonce gap"},time:{minutes:"min",seconds:"sec"}},Re={connect:vz,modals:wz,accountCenter:_z,notify:xz};const cg={};async function Ez(e){if(!e)return null;if(!cg[e.rpcUrl]){const t=await HU(e.id);if(!t)return null;const{createPublicClient:n,http:r}=await ue(async()=>{const{createPublicClient:o,http:s}=await import("./index-uqrbdLfT.js");return{createPublicClient:o,http:s}},[]),i=n({chain:t,transport:r()});cg[e.rpcUrl]=i}return cg[e.rpcUrl]}function V9(e){const t={method:"eth_requestAccounts"};return e.request(t)}function dZ(e){const t={method:"eth_selectAccounts"};return e.request(t)}function q9(e){return e.request({method:"eth_chainId"})}function G9(e){const{provider:t,disconnected$:n}=e;return f7(o=>{t.on("accountsChanged",o)},o=>{t.removeListener("accountsChanged",o)}).pipe(Bf(n))}function Sz(e){const{provider:t,disconnected$:n}=e;return f7(o=>{t.on("chainChanged",o)},o=>{t.removeListener("chainChanged",o)}).pipe(Bf(n))}function kz(e,t){const n=ew.pipe(Zl(o=>o===t),Tv(1)),r=G9({provider:e,disconnected$:n}).pipe(J1());r.subscribe(async([o])=>{var s;try{await Az(t)}catch(f){console.warn("Web3Onboard: Error whilst trying to sync connected accounts:",f)}if(!o){iw({label:t});return}const{wallets:a}=xe.get(),l=a.find(f=>f.label===t),u=l?l.accounts:[],[[d],c]=cU(u,f=>f.address===o);if(Du(t,{accounts:[d||{address:o,ens:null,uns:null,balance:null},...c]}),xe.get().notify.enabled&&!d){const f=await $p();if(f){const m=xe.get().wallets.find(p=>p.label===t);try{m&&f.subscribe({id:o,chainId:(s=m.chains[0])===null||s===void 0?void 0:s.id,type:"account"})}catch{}}}}),r.pipe(n_(async([o])=>{if(!o)return;const{wallets:s,chains:a}=xe.get(),l=s.find(v=>v.label===t);if(!l)return;const{chains:u,accounts:d}=l,[c]=u,f=a.find(({namespace:v,id:w})=>v==="evm"&&w===c.id);if(!f)return;const m=Tp(o,f),p=Ip(o,f),h=d.find(v=>v.address===o),y=a.find(({id:v})=>v===xp(c.id)),g=h&&h.ens?Promise.resolve(h.ens):y?hy(o,y):Promise.resolve(null),b=h&&h.uns?Promise.resolve(h.uns):y?py(o,y):Promise.resolve(null);return Promise.all([Promise.resolve(o),m,g,b,p])})).subscribe(o=>{if(!o)return;const[s,a,l,u,d]=o;ku(t,s,{balance:a,ens:l,uns:u,secondaryTokens:d})});const i=Sz({provider:e,disconnected$:n}).pipe(J1());i.subscribe(async o=>{const{wallets:s}=xe.get(),a=s.find(f=>f.label===t);if(!a)return;const{chains:l,accounts:u}=a,[d]=l;if(cy(o)||(o=E_(o)),o===d.id)return;if(xe.get().notify.enabled){const f=await $p();if(f){const m=xe.get().wallets.find(p=>p.label===t);if(!m)return;m.accounts.forEach(({address:p})=>{f.unsubscribe({id:p,chainId:m.chains[0].id,timeout:6e4})}),m.accounts.forEach(({address:p})=>{try{f.subscribe({id:p,chainId:o,type:"account"})}catch{}})}}const c=u.map(({address:f})=>({address:f,ens:null,uns:null,balance:null}));Du(t,{chains:[{namespace:"evm",id:o}],accounts:c})}),i.pipe(n_(async o=>{const{wallets:s,chains:a}=xe.get(),l=s.find(c=>c.label===t),u=(l==null?void 0:l.accounts)||[];cy(o)||(o=E_(o));const d=a.find(({namespace:c,id:f})=>c==="evm"&&f===o);return d?Promise.all(u.map(async({address:c})=>{const f=Tp(c,d),m=Ip(c,d),p=a.find(({id:E})=>E===xp(o)),h=p?hy(c,p):Promise.resolve(null),y=p?py(c,p):Promise.resolve(null),[g,b,v,w]=await Promise.all([f,h,y,m]);return{address:c,balance:g,ens:b,uns:v,secondaryTokens:w}})):Promise.resolve(null)})).subscribe(o=>{o&&Du(t,{accounts:o})}),n.subscribe(()=>{e.disconnect&&e.disconnect()})}async function hy(e,t){if(!t)return null;const n=await Ez(t);if(!n)return null;try{const r=await n.getEnsName({address:e});let i=null;if(r){const{labelhash:o,normalize:s}=await ue(async()=>{const{labelhash:f,normalize:m}=await import("./index-021f6a62-BcF70HI7.js").then(p=>p.y);return{labelhash:f,normalize:m}},[]).then(function(f){return f.i}),a=s(r),l=await n.getEnsResolver({name:a}),u=await n.getEnsAvatar({name:a}),d=o(a);i={name:r,avatar:u,contentHash:d,ensResolver:l,getText:async f=>await n.getEnsText({name:r,key:f})}}return i}catch(r){return console.error(r),null}}async function py(e,t){const{unstoppableResolution:n}=fn;if(!n||!K7()||!t)return null;try{return await n(e)}catch(r){return console.error(r),null}}async function Tp(e,t){if(!t)return null;const{wallets:n}=xe.get();try{const r=n.find(s=>!!s.provider);if(!r)return null;const o=await r.provider.request({method:"eth_getBalance",params:[e,"latest"]});return o?{[t.token||"eth"]:rU(o)}:null}catch(r){return console.error(r),null}}function F0(e,t){return e.request({method:"wallet_switchEthereumChain",params:[{chainId:t}]})}function K9(e,t){return e.request({method:"wallet_addEthereumChain",params:[{chainId:t.id,chainName:t.label,nativeCurrency:{name:t.label,symbol:t.token,decimals:18},rpcUrls:[t.publicRpcUrl||t.rpcUrl],blockExplorerUrls:t.blockExplorerUrl?[t.blockExplorerUrl]:null}]})}function hZ(e,t,n){return e.request({method:"wallet_addEthereumChain",params:[{chainId:t.id,chainName:t.label,nativeCurrency:{name:t.label,symbol:t.token,decimals:18},rpcUrls:[n],blockExplorerUrls:t.blockExplorerUrl?[t.blockExplorerUrl]:void 0}]})}async function Cz(e){try{const t=await e.request({method:"wallet_getPermissions"});return Array.isArray(t)?t:[]}catch{return[]}}async function Az(e){const t=xe.get().wallets.find(i=>i.label===e);if(!t)return;const r=(await Cz(t.provider)).find(({parentCapability:i})=>i==="eth_accounts");if(r){const{value:i}=r.caveats.find(({type:o})=>o==="restrictReturnedAccounts")||{value:null};if(i){const o=t.accounts.filter(({address:s})=>i.includes(s));Du(t.label,Object.assign(Object.assign({},t),{accounts:o}))}}}const Tz=async(e,t)=>{try{const{id:n}=t;return await K9(e,t),await F0(e,n),n}catch{return}},Iz=()=>({addOrSwitchChain:Tz,getChainId:q9,requestAccounts:V9,switchChain:F0});async function Z9(e){const{wallets:t,chains:n}=xe.get(),r=await Promise.all(t.map(async i=>{const o=n.find(({id:a})=>a===i.chains[0].id);if(!o)return;const s=await Promise.all(i.accounts.map(async a=>{const l=await Ip(a.address,o);if(!e||e.some(u=>u.toLowerCase()===a.address.toLowerCase())){const u=await Tp(a.address,o);return Object.assign(Object.assign({},a),{balance:u,secondaryTokens:l})}return Object.assign(Object.assign({},a),{secondaryTokens:l})}));return Object.assign(Object.assign({},i),{accounts:s})}));pz(r)}const Ip=async(e,t)=>{if(!t)return[];const n=t.rpcUrl;return!t.secondaryTokens||!t.secondaryTokens.length||!n?[]:await Promise.all(t.secondaryTokens.map(async i=>{try{const{createPublicClient:o,http:s}=await ue(async()=>{const{createPublicClient:p,http:h}=await import("./index-uqrbdLfT.js");return{createPublicClient:p,http:h}},[]),a=await oU(t),l=o({chain:a,transport:s(t.providerConnectionInfo&&t.providerConnectionInfo.url?t.providerConnectionInfo.url:n)}),u={abi:[{inputs:[{name:"owner",type:"address"}],name:"balanceOf",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],stateMutability:"view",type:"function"}],address:i.address},d=l.readContract(Object.assign(Object.assign({},u),{functionName:"balanceOf",args:[e]}))||"",c=l.readContract(Object.assign(Object.assign({},u),{functionName:"symbol",args:[]}))||"",[f,m]=await Promise.all([d,c]);return{name:m,balance:Z7(f.toString()),icon:i.icon}}catch(o){console.error(`There was an error fetching balance and/or symbol for token contract: ${i.address} - ${o}`)}}))};function $z(e){const t=xe.get().notify.transactionHandler(e),n=ez(t);if(n)throw n;if(e.eventCode==="txConfirmed"){const i=[e.watchedAddress,e.counterparty].filter(Boolean);Z9(i)}const r=Pz(e,t);Xa(r),yH(e)}function Pz(e,t){const{id:n,hash:r,startTime:i,eventCode:o,direction:s,counterparty:a,value:l,asset:u,network:d}=e,c=X9(o),f=`${n||r}-${typeof t=="object"&&t.eventCode||o}`,m=a&&a.substring(0,4)+"..."+a.substring(a.length-4),p=Z7(l),h=a&&l?{messageId:`notify.watched['${o}']`,values:{verb:o==="txConfirmed"?s==="incoming"?"received":"sent":s==="incoming"?"receiving":"sending",formattedValue:p,preposition:s==="incoming"?"from":"to",counterpartyShortened:m,asset:u}}:{messageId:`notify.transaction['${o}']`,values:{formattedValue:p,asset:u}},y=Vj(xi),w=Re.notify[a?"watched":"transaction"][o],E=y(h.messageId,{values:h.values,default:w});let C={id:n||r,type:c,key:f,network:d,startTime:i||Date.now(),eventCode:o,message:E,autoDismiss:Oz(typeof t=="object"&&t.type||c)};return typeof t=="object"&&(C=Object.assign(Object.assign({},C),t)),C}function X9(e){switch(e){case"txSent":case"txPool":return"pending";case"txSpeedUp":case"txCancel":case"txRequest":case"txRepeat":case"txAwaitingApproval":case"txConfirmReminder":case"txStuck":return"hint";case"txError":case"txSendFail":case"txFailed":case"txDropped":case"nsfFail":case"txUnderpriced":return"error";case"txConfirmed":return"success";default:return"hint"}}function Oz(e){switch(e){case"success":case"hint":return 4e3;default:return 0}}let oh;async function $p(){var e;const{apiKey:t}=fn;if(!t)return null;if(!oh){const{default:n}=await ue(async()=>{const{default:r}=await import("./index-9rPnx63E.js");return{default:r}},[]);oh=n.multichain({apiKey:(e=fn.apiKey)!==null&&e!==void 0?e:""}),oh.transactions$.subscribe($z)}return oh}async function iw(e){const t=KH(e);if(t)throw t;const{label:n}=e;if(xe.get().notify.enabled){const o=await $p();if(o){const s=xe.get().wallets.find(a=>a.label===n);s&&s.accounts.forEach(({address:a})=>{o.unsubscribe({id:a,chainId:s.chains[0].id,timeout:6e4})})}}const{wagmi:r}=fn;if(r){const o=await r.wagmiDisconnectWallet(n);o&&W9(o)}ew.next(n),lz(n);const i=B0(gi.LAST_CONNECTED_WALLET);if(i)try{const o=JSON.parse(i);Array.isArray(o)&&o.indexOf(n)>=0&&N0(gi.LAST_CONNECTED_WALLET,JSON.stringify(o.filter(s=>s!==n))),typeof o=="string"&&o===n&&r9(gi.LAST_CONNECTED_WALLET)}catch(o){console.error(`There was an error disconnecting the last connected wallet from localStorage - Error: ${o}`)}return xe.get().wallets}async function Rz(e){const t=N9(e);if(t)throw t;const{wallets:n,chains:r}=xe.get(),{chainId:i,chainNamespace:o="evm",wallet:s,rpcUrl:a,label:l,token:u}=e,d=n9(i),c=r.find(({namespace:p,id:h})=>p===o&&h.toLowerCase()===d.toLowerCase());if(!c)throw new Error(`Chain with chainId: ${i} and chainNamespace: ${o} has not been set and must be added when Onboard is initialized.`);const f=s?n.find(({label:p})=>p===s):n[0];if(!f)throw new Error(s?`Wallet with label ${s} is not connected`:"A wallet must be connected before a chain can be set");const[m]=f.chains;if(m.namespace===o&&m.id===d)return!0;try{return await F0(f.provider,d),!0}catch(p){const{code:h}=p,y=tc.pipe(Zl(g=>g===null),md(()=>!1));if(h===is.CHAIN_NOT_ADDED||h===is.UNRECOGNIZED_CHAIN_ID)return(a||l||u)&&(a&&(c.rpcUrl=a),l&&(c.label=l),u&&(c.token=u),j9(c)),Lz(f,c,y,d);if(h===is.UNSUPPORTED_METHOD)return tc.next({chain:c}),Lf(y)}return!1}const Lz=async(e,t,n,r)=>{try{return await K9(e.provider,t),await F0(e.provider,r),!0}catch(i){const{code:o}=i;return o===is.ACCOUNT_ACCESS_REJECTED?!1:(tc.next({chain:t}),Lf(n))}};function Bz(e){if(e){const{en:t}=e,n=EU(Re,t||{});Ah("en",n),Object.keys(e).filter(i=>i!=="en").forEach(i=>{const o=e[i];o&&Ah(i,o)})}else Ah("en",Re);fF({fallbackLocale:"en",initialLocale:wF()})}var Nz=` @@ -2460,7 +2460,7 @@ Note: there are at least one loader still registered to this locale that wasn't bottom: var(--${S}-position-bottom, 0); right: var(--${S}-position-right, 0);`,bottomLeft:` bottom: var(--${S}-position-bottom, 0); - left: var(--${S}-position-left, 0);`}),E=u.enabled?ue(()=>import("./Index-a4a1058e-B94dMgcD.js"),__vite__mapDeps([5,6,7])).then(S=>S.default):Promise.resolve(null),C=c.enabled?ue(()=>import("./Index-8adb4124-_tXazQQp.js"),[]).then(S=>S.default):Promise.resolve(null),k=u.enabled&&y&&y.accountCenter,_=(S,A,I,L)=>{const F=S.attachShadow({mode:"open"});let R=document.querySelector("onboard-v2").shadowRoot.styleSheets;const B=new CSSStyleSheet;Object.values(R).forEach(W=>{Object.values(W.cssRules).forEach(te=>B.insertRule(te.cssText))}),F.adoptedStyleSheets=[B];const V=document.querySelector(A);if(V.appendChild(S),!V)throw new Error(`Element with query ${A} does not exist.`);(async()=>{let W=await I;W&&new W({target:F,props:{settings:L,mountInContainer:!0}})})()};if(k){const S=document.createElement("onboard-account-center");_(S,k,E,u)}return e.$$.update=()=>{e.$$.dirty&10&&n(0,r=!k&&u.enabled&&c.enabled&&c.position===u.position),e.$$.dirty&10&&n(7,i=h.type==="mobile"||u.position===c.position),e.$$.dirty&10&&n(18,o=c.position.includes("bottom")&&u.position.includes("bottom")||c.position.includes("top")&&u.position.includes("top")),e.$$.dirty&262158&&n(6,s=c.enabled&&(!u.enabled||k||c.position!==u.position&&h.type!=="mobile"||h.type==="mobile"&&!o||!d.length)),e.$$.dirty&262158&&n(5,a=u.enabled&&(!c.enabled||c.position!==u.position&&h.type!=="mobile"||h.type==="mobile"&&!o)&&d.length),e.$$.dirty&262159&&n(4,l=c.enabled&&u.enabled&&(r||h.type==="mobile"&&o)&&d.length)},[r,u,d,c,l,a,s,i,f,m,p,h,g,b,v,w,E,C,o]}class rq extends Gt{constructor(t){super(),qt(this,t,nq,tq,Wt,{},LV)}}let my;xe.select("notifications").subscribe(e=>{my=e});async function iq(e){const t=nz(e);if(t)throw t;const{sendTransaction:n,estimateGas:r,gasPrice:i,balance:o,txDetails:s,txApproveReminderTimeout:a}=e,l=a&&a>3e3?a:15e3,[u,d]=await cq(r||(()=>Promise.resolve("")),i||(()=>Promise.resolve(""))),c=sq(F7()),f=BigInt(s&&s.value||0);if(o&&u&&d){const y=BigInt(u)*BigInt(d)+f;__(y)>__(iU(o))&&Xa(fu("nsfFail",c))}const m=my.find(y=>y.eventCode==="txRequest");if(m){const g=fu("txAwaitingApproval",m.id);Xa(g)}if(setTimeout(()=>{const y=my.find(g=>g.id===c&&g.eventCode==="txRequest");if(y){const b=fu("txConfirmReminder",y.id);Xa(b)}},l),Xa(fu("txRequest",c)),!n)return c;let h;try{h=await n()}catch(y){const{eventCode:g,errorMsg:b}=lq(y);Xa(fu(g,c)),console.error(b);return}if(F9(c),h)return h}const fu=(e,t)=>({eventCode:e,type:X9(e),id:t,key:oq(t,e),message:aq(e),startTime:Date.now(),network:Object.keys(I_).find(n=>I_[n]===xe.get().chains[0].id),autoDismiss:0}),oq=(e,t)=>`${e}-${t}`,sq=e=>`${e}-preflight`,aq=e=>{const t=Re.notify;return t.transaction,t.transaction[e]};function lq(e){if(!e.stack||!e.message)return{eventCode:"txError",errorMsg:"An unknown error occurred"};const t=e.stack||e.message;return t.includes("User denied transaction signature")?{eventCode:"txSendFail",errorMsg:"User denied transaction signature"}:t.includes("transaction underpriced")?{eventCode:"txUnderpriced",errorMsg:"Transaction is under priced"}:{eventCode:"txError",errorMsg:t}}const cq=async(e,t)=>{if(!e||!t)return Promise.resolve([]);const n=e();if(!n.then)throw new Error("The `estimateGas` function must return a Promise");const r=t();if(!r.then)throw new Error("The `gasPrice` function must return a Promise");return Promise.all([n,r]).then(([i,o])=>{if(typeof i!="string")throw new Error(`The Promise returned from calling 'estimateGas' must resolve with a value of type 'string'. Received a value of: ${i} with a type: ${typeof i}`);if(typeof o!="string")throw new Error(`The Promise returned from calling 'gasPrice' must resolve with a value of type 'string'. Received a value of: ${o} with a type: ${typeof o}`);return[BigInt(i),BigInt(o)]}).catch(i=>{throw new Error(`There was an error getting gas estimates: ${i}`)})},Fu={connectWallet:bz,disconnectWallet:iw,setChain:Rz,state:{get:xe.get,select:xe.select,actions:{setWalletModules:U9,setLocale:hz,updateNotify:Ph,customNotification:fz,preflightNotifications:iq,updateBalances:Z9,updateAccountCenter:D9,setPrimaryWallet:cz,updateTheme:H9,updateAppMetadata:z9}}};function uq(e){if(typeof window>"u")return Fu;if(e){const w=qH(e);if(w)throw w}const{wallets:t,chains:n,appMetadata:r,i18n:i,accountCenter:o,apiKey:s,notify:a,gas:l,connect:u,containerElements:d,transactionPreview:c,theme:f,disableFontDownload:m,unstoppableResolution:p,wagmi:h}=e;d&&$_({containerElements:d});const{device:y,svelteInstance:g}=fn;if(g&&(console.warn("Re-initializing Onboard and resetting back to initial state"),Jv.next()),Bz(i),az(UU(n)),typeof u<"u"&&uz(u),typeof o<"u"){let w;const{hideTransactionProtectionBtn:E,transactionProtectionInfoLink:C}=o;y.type==="mobile"?w=Object.assign(Object.assign(Object.assign({},Do.accountCenter),{hideTransactionProtectionBtn:E,transactionProtectionInfoLink:C}),o.mobile?o.mobile:{}):o.desktop&&(w=Object.assign(Object.assign(Object.assign({},Do.accountCenter),{hideTransactionProtectionBtn:E,transactionProtectionInfoLink:C}),o.desktop)),typeof w<"u"&&D9(w)}let b;if(typeof h<"u"&&(b=h(Object.assign({disconnect:iw,updateChain:j9},Iz()))),typeof a<"u")if("desktop"in a||"mobile"in a){const w=JH(a);if(w)throw w;a&&a.desktop&&a.desktop.position&&o&&o.desktop&&o.desktop.position&&(a.desktop.position=o.desktop.position),a&&a.mobile&&a.mobile.position&&o&&o.mobile&&o.mobile.position&&(a.mobile.position=o.mobile.position);let E={};y.type==="mobile"&&a.mobile?E=Object.assign(Object.assign({},Do.notify),a.mobile):a.desktop&&(E=Object.assign(Object.assign({},Do.notify),a.desktop)),Ph(E)}else{const w=M9(a);if(w)throw w;const E=Object.assign(Object.assign({},Do.notify),a);Ph(E)}else{const w=Do.notify;Ph(w)}const v=g||hq(f||{},m||!1);if($_({svelteInstance:v,apiKey:s,initialWalletInit:t,gas:l,unstoppableResolution:p,wagmi:b}),r&&z9(r),s&&c&&console.error("Transaction Preview support has been removed and is no longer supported within Web3-Onboard"),f&&H9(f),u&&(u.autoConnectLastWallet||u.autoConnectAllPreviousWallet)){const w=B0(gi.LAST_CONNECTED_WALLET);try{const E=JSON.parse(w);E&&Array.isArray(E)&&E.length&&h3(E,u),E&&typeof E=="string"&&h3([E],u)}catch(E){E instanceof SyntaxError&&w&&Fu.connectWallet({autoSelect:{label:w,disableModals:!0}})}}return Fu}const fq=(e,t)=>t||document.body&&(getComputedStyle(document.body).getPropertyValue("--onboard-font-family-normal")||getComputedStyle(document.body).getPropertyValue("--w3o-font-family"))?!0:e?!!(typeof e=="object"&&e["--w3o-font-family"]):!1,dq=async()=>{const{InterVar:e}=await ue(async()=>{const{InterVar:n}=await import("./index-MsX5kOG8.js");return{InterVar:n}},[]),t=document.createElement("style");t.innerHTML=` + left: var(--${S}-position-left, 0);`}),E=u.enabled?ue(()=>import("./Index-a4a1058e-eVkqWWuo.js"),__vite__mapDeps([5,6,7])).then(S=>S.default):Promise.resolve(null),C=c.enabled?ue(()=>import("./Index-8adb4124-Byt0tLBB.js"),[]).then(S=>S.default):Promise.resolve(null),k=u.enabled&&y&&y.accountCenter,_=(S,A,I,L)=>{const F=S.attachShadow({mode:"open"});let R=document.querySelector("onboard-v2").shadowRoot.styleSheets;const B=new CSSStyleSheet;Object.values(R).forEach(W=>{Object.values(W.cssRules).forEach(te=>B.insertRule(te.cssText))}),F.adoptedStyleSheets=[B];const V=document.querySelector(A);if(V.appendChild(S),!V)throw new Error(`Element with query ${A} does not exist.`);(async()=>{let W=await I;W&&new W({target:F,props:{settings:L,mountInContainer:!0}})})()};if(k){const S=document.createElement("onboard-account-center");_(S,k,E,u)}return e.$$.update=()=>{e.$$.dirty&10&&n(0,r=!k&&u.enabled&&c.enabled&&c.position===u.position),e.$$.dirty&10&&n(7,i=h.type==="mobile"||u.position===c.position),e.$$.dirty&10&&n(18,o=c.position.includes("bottom")&&u.position.includes("bottom")||c.position.includes("top")&&u.position.includes("top")),e.$$.dirty&262158&&n(6,s=c.enabled&&(!u.enabled||k||c.position!==u.position&&h.type!=="mobile"||h.type==="mobile"&&!o||!d.length)),e.$$.dirty&262158&&n(5,a=u.enabled&&(!c.enabled||c.position!==u.position&&h.type!=="mobile"||h.type==="mobile"&&!o)&&d.length),e.$$.dirty&262159&&n(4,l=c.enabled&&u.enabled&&(r||h.type==="mobile"&&o)&&d.length)},[r,u,d,c,l,a,s,i,f,m,p,h,g,b,v,w,E,C,o]}class rq extends Gt{constructor(t){super(),qt(this,t,nq,tq,Wt,{},LV)}}let my;xe.select("notifications").subscribe(e=>{my=e});async function iq(e){const t=nz(e);if(t)throw t;const{sendTransaction:n,estimateGas:r,gasPrice:i,balance:o,txDetails:s,txApproveReminderTimeout:a}=e,l=a&&a>3e3?a:15e3,[u,d]=await cq(r||(()=>Promise.resolve("")),i||(()=>Promise.resolve(""))),c=sq(F7()),f=BigInt(s&&s.value||0);if(o&&u&&d){const y=BigInt(u)*BigInt(d)+f;__(y)>__(iU(o))&&Xa(fu("nsfFail",c))}const m=my.find(y=>y.eventCode==="txRequest");if(m){const g=fu("txAwaitingApproval",m.id);Xa(g)}if(setTimeout(()=>{const y=my.find(g=>g.id===c&&g.eventCode==="txRequest");if(y){const b=fu("txConfirmReminder",y.id);Xa(b)}},l),Xa(fu("txRequest",c)),!n)return c;let h;try{h=await n()}catch(y){const{eventCode:g,errorMsg:b}=lq(y);Xa(fu(g,c)),console.error(b);return}if(F9(c),h)return h}const fu=(e,t)=>({eventCode:e,type:X9(e),id:t,key:oq(t,e),message:aq(e),startTime:Date.now(),network:Object.keys(I_).find(n=>I_[n]===xe.get().chains[0].id),autoDismiss:0}),oq=(e,t)=>`${e}-${t}`,sq=e=>`${e}-preflight`,aq=e=>{const t=Re.notify;return t.transaction,t.transaction[e]};function lq(e){if(!e.stack||!e.message)return{eventCode:"txError",errorMsg:"An unknown error occurred"};const t=e.stack||e.message;return t.includes("User denied transaction signature")?{eventCode:"txSendFail",errorMsg:"User denied transaction signature"}:t.includes("transaction underpriced")?{eventCode:"txUnderpriced",errorMsg:"Transaction is under priced"}:{eventCode:"txError",errorMsg:t}}const cq=async(e,t)=>{if(!e||!t)return Promise.resolve([]);const n=e();if(!n.then)throw new Error("The `estimateGas` function must return a Promise");const r=t();if(!r.then)throw new Error("The `gasPrice` function must return a Promise");return Promise.all([n,r]).then(([i,o])=>{if(typeof i!="string")throw new Error(`The Promise returned from calling 'estimateGas' must resolve with a value of type 'string'. Received a value of: ${i} with a type: ${typeof i}`);if(typeof o!="string")throw new Error(`The Promise returned from calling 'gasPrice' must resolve with a value of type 'string'. Received a value of: ${o} with a type: ${typeof o}`);return[BigInt(i),BigInt(o)]}).catch(i=>{throw new Error(`There was an error getting gas estimates: ${i}`)})},Fu={connectWallet:bz,disconnectWallet:iw,setChain:Rz,state:{get:xe.get,select:xe.select,actions:{setWalletModules:U9,setLocale:hz,updateNotify:Ph,customNotification:fz,preflightNotifications:iq,updateBalances:Z9,updateAccountCenter:D9,setPrimaryWallet:cz,updateTheme:H9,updateAppMetadata:z9}}};function uq(e){if(typeof window>"u")return Fu;if(e){const w=qH(e);if(w)throw w}const{wallets:t,chains:n,appMetadata:r,i18n:i,accountCenter:o,apiKey:s,notify:a,gas:l,connect:u,containerElements:d,transactionPreview:c,theme:f,disableFontDownload:m,unstoppableResolution:p,wagmi:h}=e;d&&$_({containerElements:d});const{device:y,svelteInstance:g}=fn;if(g&&(console.warn("Re-initializing Onboard and resetting back to initial state"),Jv.next()),Bz(i),az(UU(n)),typeof u<"u"&&uz(u),typeof o<"u"){let w;const{hideTransactionProtectionBtn:E,transactionProtectionInfoLink:C}=o;y.type==="mobile"?w=Object.assign(Object.assign(Object.assign({},Do.accountCenter),{hideTransactionProtectionBtn:E,transactionProtectionInfoLink:C}),o.mobile?o.mobile:{}):o.desktop&&(w=Object.assign(Object.assign(Object.assign({},Do.accountCenter),{hideTransactionProtectionBtn:E,transactionProtectionInfoLink:C}),o.desktop)),typeof w<"u"&&D9(w)}let b;if(typeof h<"u"&&(b=h(Object.assign({disconnect:iw,updateChain:j9},Iz()))),typeof a<"u")if("desktop"in a||"mobile"in a){const w=JH(a);if(w)throw w;a&&a.desktop&&a.desktop.position&&o&&o.desktop&&o.desktop.position&&(a.desktop.position=o.desktop.position),a&&a.mobile&&a.mobile.position&&o&&o.mobile&&o.mobile.position&&(a.mobile.position=o.mobile.position);let E={};y.type==="mobile"&&a.mobile?E=Object.assign(Object.assign({},Do.notify),a.mobile):a.desktop&&(E=Object.assign(Object.assign({},Do.notify),a.desktop)),Ph(E)}else{const w=M9(a);if(w)throw w;const E=Object.assign(Object.assign({},Do.notify),a);Ph(E)}else{const w=Do.notify;Ph(w)}const v=g||hq(f||{},m||!1);if($_({svelteInstance:v,apiKey:s,initialWalletInit:t,gas:l,unstoppableResolution:p,wagmi:b}),r&&z9(r),s&&c&&console.error("Transaction Preview support has been removed and is no longer supported within Web3-Onboard"),f&&H9(f),u&&(u.autoConnectLastWallet||u.autoConnectAllPreviousWallet)){const w=B0(gi.LAST_CONNECTED_WALLET);try{const E=JSON.parse(w);E&&Array.isArray(E)&&E.length&&h3(E,u),E&&typeof E=="string"&&h3([E],u)}catch(E){E instanceof SyntaxError&&w&&Fu.connectWallet({autoSelect:{label:w,disableModals:!0}})}}return Fu}const fq=(e,t)=>t||document.body&&(getComputedStyle(document.body).getPropertyValue("--onboard-font-family-normal")||getComputedStyle(document.body).getPropertyValue("--w3o-font-family"))?!0:e?!!(typeof e=="object"&&e["--w3o-font-family"]):!1,dq=async()=>{const{InterVar:e}=await ue(async()=>{const{InterVar:n}=await import("./index-ANyCsgDC.js");return{InterVar:n}},[]),t=document.createElement("style");t.innerHTML=` ${e} `,document.body.appendChild(t)},h3=async(e,t)=>{const n=[],r=e;if(!t.autoConnectAllPreviousWallet)Fu.connectWallet({autoSelect:{label:r[0],disableModals:!0}}),n.push(r[0]);else for(let i=r.length;i--;)(await Fu.connectWallet({autoSelect:{label:r[i],disableModals:!0}})).some(s=>s.label===r[i])&&n.unshift(r[i]);N0(gi.LAST_CONNECTED_WALLET,JSON.stringify(n))};function hq(e,t){class n extends HTMLElement{constructor(){super()}}customElements.get("onboard-v2")||customElements.define("onboard-v2",n),fq(e,t)||dq();const r=document.createElement("onboard-v2"),i=r.attachShadow({mode:"open"});r.style.all="initial",i.innerHTML=` @@ -2564,4 +2564,4 @@ Note: there are at least one loader still registered to this locale that wasn't * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var nc=de;function yq(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var bq=typeof Object.is=="function"?Object.is:yq,vq=nc.useState,wq=nc.useEffect,_q=nc.useLayoutEffect,xq=nc.useDebugValue;function Eq(e,t){var n=t(),r=vq({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return _q(function(){i.value=n,i.getSnapshot=t,ug(i)&&o({inst:i})},[e,n,t]),wq(function(){return ug(i)&&o({inst:i}),e(function(){ug(i)&&o({inst:i})})},[e]),xq(n),n}function ug(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!bq(e,n)}catch{return!0}}function Sq(e,t){return t()}var kq=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Sq:Eq;iS.useSyncExternalStore=nc.useSyncExternalStore!==void 0?nc.useSyncExternalStore:kq;rS.exports=iS;var Cq=rS.exports;const Aq=(e=void 0)=>{const t=nS(),{select:n,get:r}=t.state,i=de.useCallback(a=>{const{unsubscribe:l}=e?n(e).subscribe(a):n().subscribe(a);return()=>l},[e]),o=de.useCallback(()=>{const a=r();return e?a[e]:a},[e]),s=()=>o();return Cq.useSyncExternalStore(i,o,s)},oS=()=>{const e=nS(),{connectWallet:t,disconnectWallet:n}=e,i=Aq("wallets")[0]||null,[o,s]=de.useState(!1),a=de.useCallback(async f=>{s(!0);const m=await t(f);return s(!1),m},[]),l=de.useCallback(async({label:f})=>{s(!0);const m=await n({label:f});return s(!1),m},[]),u=e.state.actions.updateBalances,d=e.state.actions.setWalletModules,c=e.state.actions.setPrimaryWallet;return[{wallet:i,connecting:o},a,l,u,d,c]},sS=({words:e,disabled:t,handleMnemonicChange:n})=>fe.jsx("div",{className:"grid grid-cols-3 gap-4 mb-6",children:e.map((r,i)=>fe.jsxs("div",{className:"flex items-center space-x-2",children:[fe.jsx("span",{className:"text-lg font-medium",children:`${i+1}.`}),fe.jsx("input",{type:"text",value:r,onChange:o=>n(i,o.target.value),placeholder:`Word ${i+1}`,className:"border p-2 rounded w-full text-center",disabled:t})]},i))});function Tq(){const[e,t]=de.useState(1),[n,r]=de.useState(null),[i,o]=de.useState(Array(12).fill("")),[{wallet:s,connecting:a},l,u]=oS(),[d,c]=de.useState(null),{dispatch:f}=hb(),m=Xf();de.useEffect(()=>{if(n!=null&&n.mnemonic){const w=n.mnemonic.split(" ");o(w)}},[n]);const p=()=>t(e+1),h=async()=>{if(n)try{await n.registerPushAccount(ps.APP_ENV),f({type:"INITIALIZE_WALLET",payload:n}),m("/")}catch(w){alert(w)}},y=async()=>{try{const w=await Rf.signUp();r(w)}catch(w){alert(w)}},g=()=>fe.jsxs("div",{className:"space-y-4 text-center",children:[fe.jsx("button",{onClick:async()=>{c("mnemonic"),await y()},className:"bg-blue-600 text-white px-6 py-3 rounded-lg w-64",children:"Using Mnemonic"}),fe.jsxs("button",{onClick:()=>c("social"),className:"border border-blue-600 text-blue-600 px-6 py-1 rounded-lg w-64",disabled:!0,children:["Social Login ",fe.jsx("br",{})," Coming Soon 🚀"]})]}),b=()=>{const w=()=>{const E=i.join(" ");navigator.clipboard.writeText(E).then(()=>alert("Copied to clipboard")).catch(()=>alert("Failed to copy"))};return fe.jsxs("div",{className:"text-center",children:[fe.jsx("h2",{className:"text-2xl mb-6",children:"Store Seed Phrase Safely"}),fe.jsx(sS,{words:i,disabled:!0}),fe.jsx("button",{className:"border border-blue-600 text-blue-600 px-4 py-2 rounded-lg w-30",onClick:w,children:"Copy"}),fe.jsx("p",{className:"mb-6 mt-20 text-gray-600",children:"Your wallet needs to be registered on the Push network to be able to send transactions on the network."}),fe.jsx("button",{className:"bg-blue-600 text-white px-6 py-3 rounded-lg w-40",onClick:p,children:"Next"})]})},v=()=>fe.jsxs("div",{className:"text-center space-y-6",children:[fe.jsx("div",{className:"flex flex-col items-center space-y-4",children:s&&s.provider?fe.jsxs("button",{className:"border border-blue-600 text-blue-600 px-6 py-1 rounded-md",onClick:()=>{u({label:s.label})},children:["Disconnect ",s.accounts[0].address]}):fe.jsx("button",{disabled:a,className:"bg-blue-600 text-white px-6 py-3 rounded-lg w-64",onClick:()=>l(),children:"Connect Web3 Account"})}),fe.jsxs("button",{onClick:h,className:"w-full py-3 bg-blue-600 text-white rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 flex items-center justify-center",children:[fe.jsx("svg",{className:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:fe.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 11V7a4 4 0 118 0m-4 8v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2z"})}),"Register Push Account"]})]});return fe.jsx("div",{className:"flex flex-col items-center justify-center",children:fe.jsxs("div",{className:"p-8 w-full max-w-lg",children:[e===1&&fe.jsxs(fe.Fragment,{children:[!d&&g(),d==="mnemonic"&&b()]}),e===2&&v()]})})}function Iq(){const[e,t]=de.useState(null),[n,r]=de.useState(Array(12).fill("")),[{wallet:i,connecting:o},s,a]=oS(),{dispatch:l}=hb(),u=Xf(),d=(h,y)=>{const g=[...n];g[h]=y,r(g)},c=async()=>{try{let h;switch(e){case"mnemonic":{h=await Rf.logInWithMnemonic(n.join(" "),ps.APP_ENV);break}case"wallet":{const[y]=await i.provider.request({method:"eth_requestAccounts"}),g=jE({account:y,chain:vv,transport:BL(i.provider)});h=await Rf.loginWithWallet(g,ps.APP_ENV);break}}l({type:"INITIALIZE_WALLET",payload:h}),u("/")}catch(h){alert(h)}},f=()=>fe.jsxs("div",{className:"space-y-4 text-center",children:[fe.jsx("button",{onClick:()=>t("mnemonic"),className:"bg-blue-600 text-white px-6 py-3 rounded-lg w-64",children:"Using Mnemonic"}),fe.jsx("button",{onClick:()=>t("wallet"),className:"bg-blue-600 text-white px-6 py-3 rounded-lg w-64",children:"Using Web3 Account"}),fe.jsxs("button",{onClick:()=>t("social"),className:"border border-blue-600 text-blue-600 px-6 py-1 rounded-lg w-64",disabled:!0,children:["Social Login ",fe.jsx("br",{})," Coming Soon 🚀"]})]}),m=()=>fe.jsxs("div",{className:"space-y-4",children:[fe.jsx(sS,{words:n,disabled:!1,handleMnemonicChange:d}),fe.jsxs("button",{onClick:c,disabled:n.some(h=>h===""),className:"w-full py-3 bg-blue-600 text-white rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 flex items-center justify-center",children:[fe.jsx("svg",{className:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:fe.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 11V7a4 4 0 118 0m-4 8v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2z"})}),"Unlock Push Account"]})]}),p=()=>fe.jsxs("div",{className:"text-center space-y-6",children:[fe.jsx("div",{className:"flex flex-col items-center space-y-4",children:i&&i.provider?fe.jsxs("button",{className:"border border-blue-600 text-blue-600 px-6 py-1 rounded-md",onClick:()=>{a({label:i.label})},children:["Disconnect ",i.accounts[0].address]}):fe.jsx("button",{disabled:o,className:"bg-blue-600 text-white px-6 py-3 rounded-lg w-64",onClick:()=>s(),children:"Connect Web3 Account"})}),fe.jsxs("button",{onClick:c,disabled:!i||!i.provider,className:"w-full py-3 bg-blue-600 text-white rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 flex items-center justify-center",children:[fe.jsx("svg",{className:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:fe.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 11V7a4 4 0 118 0m-4 8v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2z"})}),"Unlock Push Account"]})]});return fe.jsx("div",{className:"flex flex-col items-center justify-center",children:fe.jsxs("div",{className:"p-8 w-full max-w-lg",children:[!e&&f(),e==="mnemonic"&&m(),e==="wallet"&&p()]})})}function $q(){return fe.jsx(BA,{children:fe.jsxs("div",{className:"min-h-screen flex flex-col",children:[fe.jsx("h1",{className:"text-4xl font-bold mt-8 text-center",children:ps.APP_NAME}),fe.jsx("div",{className:"flex-1 flex items-center justify-center",children:fe.jsx(PA,{children:fe.jsxs(TA,{children:[fe.jsx(gu,{path:"/",element:fe.jsx(NA,{})}),fe.jsx(gu,{path:"/login",element:fe.jsx(Iq,{})}),fe.jsx(gu,{path:"/signup",element:fe.jsx(Tq,{})}),fe.jsx(gu,{path:"*",element:fe.jsx(CA,{to:"/"})})]})})})]})})}var Lp={exports:{}};Lp.exports;(function(e,t){var n=200,r="Expected a function",i="__lodash_hash_undefined__",o=1,s=2,a=1/0,l=9007199254740991,u="[object Arguments]",d="[object Array]",c="[object Boolean]",f="[object Date]",m="[object Error]",p="[object Function]",h="[object GeneratorFunction]",y="[object Map]",g="[object Number]",b="[object Object]",v="[object Promise]",w="[object RegExp]",E="[object Set]",C="[object String]",k="[object Symbol]",_="[object WeakMap]",S="[object ArrayBuffer]",A="[object DataView]",I="[object Float32Array]",L="[object Float64Array]",F="[object Int8Array]",N="[object Int16Array]",R="[object Int32Array]",B="[object Uint8Array]",V="[object Uint8ClampedArray]",j="[object Uint16Array]",W="[object Uint32Array]",Y=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,te=/^\w*$/,ae=/^\./,Z=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pe=/[\\^$.*+?()[\]{}|]/g,Ie=/\\(\\)?/g,_e=/^\[object .+?Constructor\]$/,Ce=/^(?:0|[1-9]\d*)$/,le={};le[I]=le[L]=le[F]=le[N]=le[R]=le[B]=le[V]=le[j]=le[W]=!0,le[u]=le[d]=le[S]=le[c]=le[A]=le[f]=le[m]=le[p]=le[y]=le[g]=le[b]=le[w]=le[E]=le[C]=le[_]=!1;var $e=typeof br=="object"&&br&&br.Object===Object&&br,rt=typeof self=="object"&&self&&self.Object===Object&&self,je=$e||rt||Function("return this")(),nt=t&&!t.nodeType&&t,Le=nt&&!0&&e&&!e.nodeType&&e,_t=Le&&Le.exports===nt,Kn=_t&&$e.process,Zr=function(){try{return Kn&&Kn.binding("util")}catch{}}(),Ss=Zr&&Zr.isTypedArray;function wc(x,T){var P=x?x.length:0;return!!P&&ks(x,T,0)>-1}function _c(x,T){for(var P=-1,D=x?x.length:0;++P-1}function Ls(x,T){var P=this.__data__,D=bo(P,x);return D<0?P.push([x,T]):P[D][1]=T,this}Yn.prototype.clear=Tc,Yn.prototype.delete=xn,Yn.prototype.get=Ic,Yn.prototype.has=mo,Yn.prototype.set=Ls;function Qn(x){var T=-1,P=x?x.length:0;for(this.clear();++T=n){var Ke=T?null:vo(x);if(Ke)return Yr(Ke);ce=!1,ne=xc,ke=new ti}else ke=T?[]:Pe;e:for(;++DPe))return!1;var Ke=G.get(x);if(Ke&&G.get(T))return Ke==T;var Ve=-1,Ze=!0,Qe=ne&o?new ti:void 0;for(G.set(x,T),G.set(T,x);++Ve-1&&x%1==0&&x-1&&x%1==0&&x<=l}function kt(x){var T=typeof x;return!!x&&(T=="object"||T=="function")}function En(x){return!!x&&typeof x=="object"}function dr(x){return typeof x=="symbol"||En(x)&&Qr.call(x)==k}var Ri=Ss?Ia(Ss):Hc;function Fa(x){return x==null?"":qc(x)}function U0(x,T,P){var D=x==null?void 0:ni(x,T);return D===void 0?P:D}function H0(x,T){return x!=null&&Yt(x,T,Dc)}function Kc(x){return Ge(x)?jc(x):zc(x)}function Ua(x){return x}function z0(){}function W0(x){return Pi(x)?ur(Eo(x)):Ns(x)}e.exports=M})(Lp,Lp.exports);var Pq=Lp.exports;const Oq=Sa(Pq);var he;(function(e){e.AlphaWallet="isAlphaWallet",e.ApexWallet="isApexWallet",e.AToken="isAToken",e.BifrostWallet="isBifrost",e.Binance="bbcSignTx",e.Bitpie="isBitpie",e.BlockWallet="isBlockWallet",e.Coinbase="isToshi",e.CoinbaseExtension="isCoinbaseWallet",e.Detected="request",e.Dcent="isDcentWallet",e.Exodus="isExodus",e.Frontier="isFrontier",e.Frame="isFrame",e.HuobiWallet="isHbWallet",e.HyperPay="isHyperPay",e.ImToken="isImToken",e.InfinityWallet="isInfinityWallet",e.Liquality="isLiquality",e.MeetOne="wallet",e.MetaMask="isMetaMask",e.MyKey="isMYKEY",e.OwnBit="isOwnbit",e.Status="isStatus",e.Trust="isTrust",e.TokenPocket="isTokenPocket",e.TP="isTp",e.WalletIo="isWalletIO",e.XDEFI="isXDEFI",e.OneInch="isOneInchIOSWallet",e.Tokenary="isTokenary",e.Tally="isTally",e.BraveWallet="isBraveWallet",e.Rabby="isRabby",e.MathWallet="isMathWallet",e.Bitget="isBitKeep",e.Sequence="isSequence",e.Core="isAvalanche",e.Opera="isOpera",e.Bitski="isBitski",e.Enkrypt="isEnkrypt",e.Phantom="isPhantom",e.OKXWallet="isOkxWallet",e.Zeal="isZeal",e.Zerion="isZerion",e.Rainbow="isRainbow",e.SafePal="isSafePal",e.DeFiWallet="isDeficonnectProvider",e.Safeheron="isSafeheron",e.Talisman="isTalisman",e.OneKey="isOneKey",e.Fordefi="isFordefi",e.Coin98Wallet="isCoin98",e.SubWallet="isSubWallet",e.Kayros="isKayros",e.FoxWallet="isFoxWallet",e.Lif3Wallet="isLif3Wallet",e.ZodiacPilot="isZodiacPilot",e.StableWallet="isStableWallet",e.Echooo="isEchooo",e.Keplr="keplr"})(he||(he={}));var sn;(function(e){e.Binance="https://www.bnbchain.org/ru/blog/binance-extension-wallet/",e.Bitget="https://web3.bitget.com/en/wallet-download",e.Coinbase="https://www.coinbase.com/wallet/downloads",e.MetaMask="https://metamask.io/download/",e.OKXWallet="https://okx.com/download",e.Phantom="https://phantom.app/ul/v1/connect",e.Talisman="https://www.talisman.xyz/",e.Trust="https://link.trustwallet.com",e.OneKey="https://onekey.so/download/",e.RoninWallet="https://wallet.skymavis.com/",e.Coin98Wallet="https://coin98.com/wallet/",e.SubWallet="https://www.subwallet.app/",e.Kayros="https://www.kayros.games/wallet/",e.XDEFI="https://xdefi.io/",e.FoxWallet="https://foxwallet.com/download",e.Lif3Wallet="https://lif3.com",e.Rabby="https://rabby.io",e.ZodiacPilot="https://pilot.gnosisguild.org/",e.Echooo="https://www.echooo.xyz",e.Keplr="https://www.keplr.app/download"})(sn||(sn={}));var we;(function(e){e.AlphaWallet="AlphaWallet",e.ApexWallet="Apex Wallet",e.AToken="AToken",e.BifrostWallet="Bifrost Wallet",e.Binance="Binance Smart Wallet",e.Bitpie="Bitpie",e.Bitski="Bitski",e.BlockWallet="BlockWallet",e.Brave="Brave Wallet",e.Coinbase="Coinbase Wallet",e.Dcent="D'CENT",e.Detected="Detected Wallet",e.Exodus="Exodus",e.Frame="Frame",e.Frontier="Frontier",e.HuobiWallet="Huobi Wallet",e.HyperPay="HyperPay",e.ImToken="imToken",e.InfinityWallet="Infinity Wallet",e.Liquality="Liquality",e.MeetOne="MeetOne",e.MetaMask="MetaMask",e.MyKey="MyKey",e.Opera="Opera Wallet",e.OwnBit="OwnBit",e.Status="Status Wallet",e.Trust="Trust Wallet",e.TokenPocket="TokenPocket",e.TP="TP Wallet",e.WalletIo="Wallet.io",e.XDEFI="XDEFI Wallet",e.OneInch="1inch Wallet",e.Tokenary="Tokenary Wallet",e.Tally="Taho",e.Rabby="Rabby Wallet",e.MathWallet="MathWallet",e.Bitget="Bitget Wallet",e.Sequence="Sequence",e.Core="Core",e.Enkrypt="Enkrypt",e.Zeal="Zeal",e.Phantom="Phantom",e.OKXWallet="OKX Wallet",e.Zerion="Zerion",e.Rainbow="Rainbow",e.SafePal="SafePal",e.DeFiWallet="DeFi Wallet",e.Safeheron="Safeheron",e.Talisman="Talisman",e.OneKey="OneKey",e.Fordefi="Fordefi",e.RoninWallet="Ronin Wallet",e.Coin98Wallet="Coin98 Wallet",e.SubWallet="SubWallet",e.Kayros="Kayros",e.FoxWallet="FoxWallet",e.Lif3Wallet="Lif3 Wallet",e.ZodiacPilot="Zodiac Pilot",e.StableWallet="StableWallet",e.Echooo="Echooo",e.Keplr="Keplr"})(we||(we={}));var me;(function(e){e.Ethereum="ethereum",e.Binance="BinanceChain",e.Tally="tally",e.Web3="web3",e.Arbitrum="arbitrum",e.XFI="xfi",e.Bitget="bitkeep",e.Avalanche="avalanche",e.Bitski="Bitski",e.Enkrypt="enkrypt",e.Zeal="zeal",e.Phantom="phantom",e.OKXWallet="okxwallet",e.Trust="trustwallet",e.Frontier="frontier",e.DeFiConnectProvider="deficonnectProvider",e.Safeheron="safeheron",e.Talisman="talismanEth",e.OneKey="$onekey",e.RoninWallet="ronin",e.Coin98Wallet="coin98",e.SubWallet="SubWallet",e.Kayros="kayros",e.FoxWallet="foxwallet",e.Echooo="echooo"})(me||(me={}));const jt=null;function Nn(e,t){return async()=>({provider:window.ethereum.providers&&Array.isArray(window.ethereum.providers)?Rq(e,t):window.ethereum})}function Rq(e,t){return window.ethereum.providers.find(n=>t?!!n[e]&&!aS(e,n):!!n[e])}function aS(e,t){return Object.values(he).filter(r=>r!==e&&r!==he.Detected).some(r=>!!t[r])}const Lq={label:we.MetaMask,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.MetaMask]&&!aS(he.MetaMask,e),getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./metamask-BnRi-VtU.js");return{default:e}},[])).default,getInterface:Nn(he.MetaMask,!0),platforms:["all"],externalUrl:sn.MetaMask},Bq={label:we.InfinityWallet,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.InfinityWallet],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./infinitywallet-B3Dl-7rf.js");return{default:e}},[])).default,getInterface:Nn(he.InfinityWallet),platforms:["desktop"]},Nq={label:we.Exodus,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Exodus],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./exodus-CokzJYSo.js");return{default:e}},[])).default,getInterface:Nn(he.Exodus),platforms:["all"]},Mq={label:we.Frontier,injectedNamespace:me.Frontier,checkProviderIdentity:({provider:e})=>!!e&&!!e.ethereum&&!!e.ethereum[he.Frontier],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./frontier-KVnJjdmQ.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.frontier.ethereum)}),platforms:["all"]},jq={label:we.Brave,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.BraveWallet],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./brave-BaDXvGW7.js");return{default:e}},[])).default,getInterface:Nn(he.BraveWallet),platforms:["all"]},Dq={label:we.Binance,injectedNamespace:me.Binance,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Binance],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./binance-DKfHEPwi.js");return{default:e}},[])).default,getInterface:async()=>{let e={...window.BinanceChain};window.BinanceChain=e;const t=window.BinanceChain.on.bind(window.BinanceChain);window.BinanceChain.on=(r,i)=>{r==="chainChanged"?t(r,o=>{i(`0x${parseInt(o).toString(16)}`)}):t(r,i)};const n=it(window.BinanceChain,{eth_chainId:({baseRequest:r})=>r({method:"eth_chainId"}).then(i=>`0x${parseInt(i).toString(16)}`),eth_selectAccounts:jt,wallet_switchEthereumChain:jt});return n.removeListener=(r,i)=>{},{provider:n}},platforms:["desktop"],externalUrl:sn.Binance},Fq={label:we.Coinbase,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Coinbase]||!!e&&!!e[he.CoinbaseExtension],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./coinbase-CrEj8Vm7.js");return{default:e}},[])).default,getInterface:async()=>{const{provider:e}=await Nn(he.CoinbaseExtension)(),t=e.on.bind(e);return e.on=(n,r)=>{n==="chainChanged"?t(n,i=>{r(`0x${parseInt(i).toString(16)}`)}):t(n,r)},{provider:e}},platforms:["all"],externalUrl:sn.Coinbase},Uq={label:we.Detected,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Detected],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./detected-B5TJ64kR.js");return{default:e}},[])).default,getInterface:async()=>({provider:window.ethereum}),platforms:["all"]},Hq={label:we.Trust,injectedNamespace:me.Trust,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Trust],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./trust-CmzsVbO9.js");return{default:e}},[])).default,getInterface:async()=>{const e=window.hasOwnProperty(me.Ethereum);let t;return e&&window[me.Ethereum].isTrust?t=window[me.Ethereum]:t=window[me.Trust],{provider:t}},platforms:["all"],externalUrl:sn.Trust},zq={label:we.Opera,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Opera],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./opera-BlUFsBw2.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.ethereum,{eth_requestAccounts:async({baseRequest:e})=>e({method:"eth_accounts"}),eth_selectAccounts:jt})}),platforms:["all"]},Wq={label:we.Status,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Status],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./status-DEbRpCSZ.js");return{default:e}},[])).default,getInterface:async()=>({provider:window.ethereum}),platforms:["mobile"]},Vq={label:we.AlphaWallet,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.AlphaWallet],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./alphawallet-BYxyLSyF.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.ethereum,{wallet_switchEthereumChain:jt,eth_selectAccounts:jt})}),platforms:["mobile"]},qq={label:we.ApexWallet,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.ApexWallet],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./apexwallet-NS7FlaY4.js");return{default:e}},[])).default,getInterface:async()=>({provider:window.ethereum}),platforms:["desktop","Chrome","Chromium","Microsoft Edge"]},Gq={label:we.AToken,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.AToken],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./atoken-CMEoSy7G.js");return{default:e}},[])).default,getInterface:async()=>({provider:window.ethereum}),platforms:["mobile"]},Kq={label:we.BifrostWallet,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.BifrostWallet],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./bifrostwallet-CzEJJq7Q.js");return{default:e}},[])).default,getInterface:Nn(he.BifrostWallet),platforms:["all"]},Zq={label:we.Bitpie,injectedNamespace:me.Ethereum,checkProviderIdentity:()=>!!window.Bitpie,getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./bitpie-BjtS8guf.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.ethereum,{wallet_switchEthereumChain:jt,eth_selectAccounts:jt})}),platforms:["mobile"]},Xq={label:we.BlockWallet,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.BlockWallet],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./blockwallet-Cv_NU9OT.js");return{default:e}},[])).default,getInterface:Nn(he.BlockWallet),platforms:["desktop"]},Yq={label:we.Frame,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Frame],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./frame-BNDnw4sb.js");return{default:e}},[])).default,getInterface:async()=>{const e=window.ethereum;if(!e||!e.connected)throw new Error("Frame App must be open with a hot wallet connected. If not installed first download the Frame App.");return{provider:e}},platforms:["desktop"]},Qq={label:we.HuobiWallet,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.HuobiWallet],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./huobiwallet-Ct6qXzy7.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.ethereum,{wallet_switchEthereumChain:jt,eth_selectAccounts:jt})}),platforms:["mobile"]},Jq={label:we.HyperPay,injectedNamespace:me.Ethereum,checkProviderIdentity:()=>!!window.hiWallet,getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./hyperpay-7nxffAdA.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.ethereum,{wallet_switchEthereumChain:jt,eth_selectAccounts:jt})}),platforms:["mobile"]},eG={label:we.ImToken,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.ImToken],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./imtoken-5GbbboMy.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.ethereum,{eth_selectAccounts:jt})}),platforms:["mobile"]},tG={label:we.Liquality,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Liquality],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./liquality-BIQsbXhN.js");return{default:e}},[])).default,getInterface:async()=>{const e=it(window.ethereum,{wallet_switchEthereumChain:jt,eth_selectAccounts:jt});return e.removeListener=(t,n)=>{},{provider:e}},platforms:["desktop"]},nG={label:we.MeetOne,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&e[he.MeetOne]==="MEETONE",getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./meetone-BWx30j-q.js");return{default:e}},[])).default,getInterface:async()=>({provider:window.ethereum}),platforms:["mobile"]},rG={label:we.MyKey,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.MyKey],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./mykey-DXV41ggG.js");return{default:e}},[])).default,getInterface:async()=>({provider:window.ethereum}),platforms:["mobile"]},iG={label:we.OwnBit,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.OwnBit],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./ownbit-BdTY-PH9.js");return{default:e}},[])).default,getInterface:async()=>{const e=it(window.ethereum,{eth_chainId:({baseRequest:t})=>t({method:"eth_chainId"}).then(n=>`0x${parseInt(n).toString(16)}`),wallet_switchEthereumChain:jt,eth_selectAccounts:jt});return e.removeListener=(t,n)=>{},e.on=(t,n)=>{},{provider:e}},platforms:["mobile"]},oG={label:we.TokenPocket,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.TokenPocket]&&!e[he.TP],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./tokenpocket-Dbi32VQr.js");return{default:e}},[])).default,getInterface:Nn(he.TokenPocket),platforms:["all"]},sG={label:we.TP,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.TP],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./tp-BbFFERM0.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.ethereum,{wallet_switchEthereumChain:jt,eth_selectAccounts:jt})}),platforms:["mobile"]},aG={label:we.XDEFI,injectedNamespace:me.XFI,checkProviderIdentity:({provider:e})=>e&&e.ethereum&&e.ethereum[he.XDEFI],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./xdefi-CpZ4LxGD.js");return{default:e}},[])).default,getInterface:async()=>({provider:window.xfi&&window.xfi.ethereum}),platforms:["all"],externalUrl:sn.XDEFI},lG={label:we.OneInch,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.OneInch],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./oneInch-Jk8tDDo8.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.ethereum)}),platforms:["mobile"]},cG={label:we.Tokenary,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Tokenary],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./tokenary-DSpo6s4M.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.ethereum)}),platforms:["all"]},uG={label:we.Tally,injectedNamespace:me.Tally,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Tally],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./tallywallet-CxbOvuj7.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.tally)}),platforms:["desktop"]},fG={label:we.Zeal,injectedNamespace:me.Zeal,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Zeal],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./zeal-b2F8mFyk.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.zeal)}),platforms:["desktop"]},dG={label:we.Rabby,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Rabby],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./rabby-CIHjwZn9.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.ethereum)}),platforms:["desktop","mobile"]},hG={label:we.MathWallet,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.MathWallet],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./mathwallet-47rJD3aJ.js");return{default:e}},[])).default,getInterface:Nn(he.MathWallet),platforms:["all"]},pG={label:we.Bitget,injectedNamespace:me.Bitget,checkProviderIdentity:({provider:e})=>!!e&&!!e.ethereum[he.Bitget],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./bitget-CGoh9UgG.js");return{default:e}},[])).default,getInterface:async()=>({provider:window.bitkeep&&window.bitkeep.ethereum}),platforms:["all"],externalUrl:sn.Bitget},mG={label:we.Sequence,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Sequence],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./sequence-Dec4m3rM.js");return{default:e}},[])).default,getInterface:async()=>({provider:window.ethereum}),platforms:["all"]},gG={label:we.Core,injectedNamespace:me.Avalanche,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Core],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./core-bAnGbZV0.js");return{default:e}},[])).default,getInterface:Nn(he.Core),platforms:["desktop","Chrome","Chromium","Microsoft Edge"]},yG={label:we.Bitski,injectedNamespace:me.Bitski,checkProviderIdentity:({provider:e})=>!!e&&!!e.getProvider&&!!e.getProvider().isBitski,getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./bitski-SmR6xDPs.js");return{default:e}},[])).default,getInterface:async()=>({provider:window.Bitski&&window.Bitski.getProvider&&window.Bitski.getProvider()}),platforms:["all"]},bG={label:we.Zerion,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Zerion],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./zerion-XrObZCmj.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.ethereum)}),platforms:["all"]},vG={label:we.Enkrypt,injectedNamespace:me.Enkrypt,checkProviderIdentity:({provider:e})=>!!e&&!!e.providers&&!!e.providers.ethereum,getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./enkrypt-8Yg7sLuK.js");return{default:e}},[])).default,getInterface:async()=>{const e=window.enkrypt.providers.ethereum.on.bind(window.enkrypt.providers.ethereum);window.enkrypt.providers.ethereum.on=(n,r)=>{n==="chainChanged"?e(n,i=>{r(`0x${parseInt(i).toString(16)}`)}):e(n,r)};const t=it(window.enkrypt.providers.ethereum,{eth_chainId:({baseRequest:n})=>n({method:"eth_chainId"}).then(r=>`0x${parseInt(r).toString(16)}`)});return t.removeListener=(n,r)=>{},{provider:t}},platforms:["all"]},wG={label:we.Phantom,injectedNamespace:me.Phantom,checkProviderIdentity:({provider:e})=>!!e&&!!e.ethereum&&!!e.ethereum[he.Phantom],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./phantom-Bq8oBCC9.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.phantom.ethereum)}),platforms:["all"],externalUrl:sn.Phantom},_G={label:we.SafePal,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.SafePal],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./safepal-1ALKnv5Z.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.ethereum)}),platforms:["all"]},xG={label:we.Rainbow,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Rainbow],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./rainbow-Bk0xXB-l.js");return{default:e}},[])).default,getInterface:Nn(he.Rainbow),platforms:["all"]},EG={label:we.OKXWallet,injectedNamespace:me.OKXWallet,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.OKXWallet],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./okxwallet-CRkGxbWO.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.okxwallet)}),platforms:["all"],externalUrl:sn.OKXWallet},SG={label:we.DeFiWallet,injectedNamespace:me.DeFiConnectProvider,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.DeFiWallet],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./defiwallet-BTfpwPtA.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.deficonnectProvider)}),platforms:["all"]},kG={label:we.Safeheron,injectedNamespace:me.Safeheron,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Safeheron],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./safeheron-CpAKyowH.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.safeheron)}),platforms:["desktop","Chrome","Chromium","Microsoft Edge"]},CG={label:we.Talisman,injectedNamespace:me.Talisman,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Talisman],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./talisman-Bvq7wiKe.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.talismanEth)}),platforms:["desktop"],externalUrl:sn.Talisman},AG={label:we.RoninWallet,injectedNamespace:me.RoninWallet,checkProviderIdentity:({provider:e})=>!!e,getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./roninwallet-CsrXM8Qy.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.ronin.provider)}),platforms:["all"],externalUrl:sn.RoninWallet},TG={label:we.OneKey,injectedNamespace:me.OneKey,checkProviderIdentity:({provider:e})=>!!e&&!!e.ethereum&&!!e.ethereum[he.OneKey],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./onekey-CGcUTfNZ.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.$onekey.ethereum)}),platforms:["all"],externalUrl:sn.OneKey},IG={label:we.Fordefi,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Fordefi],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./fordefi-CP4eKV3b.js");return{default:e}},[])).default,getInterface:Nn(he.Fordefi,!0),platforms:["desktop"]},$G={label:we.Coin98Wallet,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Coin98Wallet],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./coin98wallet-BPH2yV6a.js");return{default:e}},[])).default,getInterface:async()=>{const e=window.hasOwnProperty(me.Ethereum);let t;return e&&window[me.Ethereum].isCoin98?t=window[me.Ethereum]:t=window[me.Coin98Wallet].provider,{provider:t}},platforms:["all"],externalUrl:sn.Coin98Wallet},PG={label:we.SubWallet,injectedNamespace:me.SubWallet,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.SubWallet],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./subwallet-DrohCGOh.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.SubWallet)}),platforms:["all"],externalUrl:sn.SubWallet},OG={label:we.Kayros,injectedNamespace:me.Kayros,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Kayros],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./kayros-B17ntheB.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.kayros)}),platforms:["desktop"]},RG={label:we.FoxWallet,injectedNamespace:me.FoxWallet,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.FoxWallet],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./foxwallet-B9w1boRx.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.foxwallet)}),platforms:["mobile"]},LG={label:we.Lif3Wallet,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Lif3Wallet],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./lif3wallet-BMqlF6vP.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.ethereum,{wallet_switchEthereumChain:jt,eth_selectAccounts:jt})}),platforms:["mobile"]},BG={label:we.ZodiacPilot,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.ZodiacPilot],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./zodiacpilot-B8f4M6PL.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.ethereum)}),platforms:["desktop"],externalUrl:sn.ZodiacPilot},NG={label:we.StableWallet,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.StableWallet],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./stablewallet-2JDaqGCS.js");return{default:e}},[])).default,getInterface:Nn(he.StableWallet),platforms:["mobile"]},MG={label:we.Echooo,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Echooo],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./echooo-Dk4xaSlo.js");return{default:e}},[])).default,getInterface:Nn(he.Echooo),platforms:["all"],externalUrl:sn.Echooo},jG={label:we.Keplr,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Keplr],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./keplr-CxFTfpRB.js");return{default:e}},[])).default,getInterface:Nn(he.Keplr),platforms:["all"],externalUrl:sn.Keplr},DG=[fG,Nq,Mq,Lq,Kq,Dq,Fq,Uq,Hq,zq,Wq,Vq,qq,Gq,pG,Zq,Xq,jq,Yq,Qq,Jq,eG,tG,nG,rG,iG,oG,sG,aG,lG,cG,uG,dG,hG,mG,gG,yG,vG,wG,EG,bG,xG,_G,SG,Bq,kG,CG,TG,IG,AG,$G,PG,OG,RG,LG,BG,NG,MG,jG],FG=O.object({label:O.string().required(),getIcon:O.function().arity(0).required(),getInterface:O.function().maxArity(1).required(),injectedNamespace:O.string().required(),checkProviderIdentity:O.function().arity(1).required(),platforms:O.array().items(O.string()),externalUrl:O.string()}),UG=O.array().items(FG),HG=O.object().pattern(/\w+/,O.any().allow(O.boolean(),O.array().items(O.string())));O.object({custom:UG,filter:HG,displayUnavailable:[O.boolean(),O.array().items(O.string())],walletUnavailableMessage:O.function(),sort:O.function(),externalUrl:O.string(),disable6963Support:O.boolean()});const zG=O.object({uuid:O.string().required(),name:O.string().required(),icon:O.string().required(),rdns:O.string().required()}),WG=O.object({info:zG.required(),provider:O.object().required()}),VG=e=>Ot(WG,e),qG=({label:e,externalUrl:t})=>t?`Please install or switch to ${e} to continue`:`Please install or enable ${e} to continue`,GG=(e,t,n)=>{var r;return e?t({provider:e,device:n})?!0:!!((r=e.providers)!=null&&r.some(i=>t({provider:i,device:n}))):!1};function KG(e){if(!e)return!1;const t=/)<[^<]*)*<\/script>/gi,n=/\bon[a-z]+\s*=\s*["']?(?:javascript:)?/gi,r=/\b(href|xlink:href)\s*=\s*["']?javascript:/gi;return!!(t.test(e)||n.test(e)||r.test(e))}const lS=[];function ZG(){window.addEventListener("eip6963:announceProvider",e=>{const t=e,{detail:n}=t;if(!n)return;if(t){const a=VG(n);if(a&&a.error)throw a.error}const{info:r,provider:i}=n,{name:o,icon:s}=r;if(KG(s)){console.error(`The icon for injected wallet: ${o} contains executable JavaScript and has been blocked.`);return}lS.push({label:o,getIcon:async()=>s,getInterface:async()=>({provider:i}),platforms:["all"],eip6963Provider:i,checkProviderIdentity:({provider:a})=>!!a})}),window.dispatchEvent(new CustomEvent("eip6963:requestProvider"))}function XG(e){return typeof window>"u"?()=>null:(ZG(),t=>{const{device:n}=t,{custom:r=[],filter:i={},displayUnavailable:o,sort:s,walletUnavailableMessage:a}={},u=Oq([...r,...lS,...DG],({label:d})=>d).reduce((d,c)=>{const{label:f,platforms:m,injectedNamespace:p,checkProviderIdentity:h,eip6963Provider:y}=c,g=i[f],b=g===!1,v=y||window[p],w=GG(v,h,n);let E=!1;Array.isArray(g)&&(g.includes(n.type)||n.os&&g.includes(n.os.name))&&(E=!0),g==="unavailable"&&!w&&(E=!0);const C=!m.includes("all")&&n.type!==null&&!m.includes(n.type)&&!m.includes(n.os.name);return!b&&!E&&!C&&(w||o===!0||Array.isArray(o)&&o.length&&o.includes(c.label))&&d.push((o===!0||Array.isArray(o)&&o.length&&o.includes(c.label))&&!w?{...c,getInterface:async()=>{throw new Error(a?a(c):qG(c))}}:c),d},[]);if(u.length){const d=u.length>1,c=u.filter(f=>{const{label:m}=f;return!(m===we.Detected&&d)}).map(({label:f,getIcon:m,getInterface:p})=>({label:f,getIcon:m,getInterface:p})).sort((f,m)=>f.labelm.label?1:0);return s?s(c):c}return[]})}function YG({supportedWalletType:e="all",darkMode:t=!1,enableMobileWalletLink:n=!1,reloadOnDisconnect:r=!0}={}){return()=>({label:"Coinbase Wallet",getIcon:async()=>(await ue(async()=>{const{default:i}=await import("./icon-C3kbE38r.js");return{default:i}},[])).default,getInterface:async({chains:i,appMetadata:o})=>{(n||r||t)&&console.warn("darkMode, enableMobileWalletLink and reloadOnDisconnect init props are deprecated after version 2.2.7 of @web3-onboard/coinbase");const{name:s,icon:a}=o||{},{default:l}=await ue(async()=>{const{default:E}=await import("./index-J40BUt8X.js").then(C=>C.i);return{default:E}},__vite__mapDeps([8,9])),u=l.default?l.default:l,{isHex:d,toHex:c,createEIP1193Provider:f,fromHex:m}=await ue(async()=>{const{isHex:E,toHex:C,createEIP1193Provider:k,fromHex:_}=await import("./index-MsX5kOG8.js");return{isHex:E,toHex:C,createEIP1193Provider:k,fromHex:_}},[]),h=`data:image/svg+xml;base64,${window.btoa(a||"")}`,y=i.map(({id:E})=>m(E,"number")),g=new u({appName:s||"",appLogoUrl:h,appChainIds:y}),b=g.makeWeb3Provider({options:e}),v=b.on.bind(b);b.on=(E,C)=>(v(E,k=>{if(E==="chainChanged"){let _;d(k)?_=k:_=c(k),C(_);return}C(k)}),b);const w=f(b);return w.removeListener=(E,C)=>{},{provider:w,instance:g}}})}const Go={name:"Ether",symbol:"ETH",decimals:18},Bp={name:"Matic",symbol:"MATIC",decimals:18},cS={name:"Celo",symbol:"CELO",decimals:18},uS={name:"Binance Coin",symbol:"BNB",decimals:18},QG={name:"Fuse",symbol:"FUSE",decimals:18},JG={name:"Spark",symbol:"SPARK",decimals:18},eK={1:{urls:["https://eth.llamarpc.com"],nativeCurrency:Go,name:"Mainnet",blockExplorerUrls:["https://etherscan.io"]},56:{urls:["https://bsc-dataseed.binance.org/"],nativeCurrency:uS,name:"BNB Mainnet",blockExplorerUrls:["https://bscscan.com"]},1101:{urls:["https://rpc.polygon-zkevm.gateway.fm"],nativeCurrency:Bp,name:"Polygon zkEVM Mainnet",blockExplorerUrls:["https://zkevm.polygonscan.com/"]},10:{urls:["https://mainnet.optimism.io"],name:"Optimism",nativeCurrency:Go,blockExplorerUrls:["https://optimistic.etherscan.io"]},42161:{urls:["https://arb1.arbitrum.io/rpc"],name:"Arbitrum One",nativeCurrency:Go,blockExplorerUrls:["https://arbiscan.io"]},137:{urls:["https://polygon-rpc.com"],name:"Polygon Mainnet",nativeCurrency:Bp,blockExplorerUrls:["https://polygonscan.com"]},42220:{urls:["https://forno.celo.org"],name:"Celo",nativeCurrency:cS,blockExplorerUrls:["https://explorer.celo.org"]},122:{urls:["https://rpc.fuse.io"],name:"Fuse Mainnet",nativeCurrency:QG,blockExplorerUrls:["https://explorer.fuse.io/"]},7560:{name:"Cyber Mainnet",urls:["https://cyber.alt.technology/"],nativeCurrency:Go,blockExplorerUrls:["https://cyberscan.co/"]}},tK={11155111:{urls:["https://eth-sepolia.public.blastapi.io"],nativeCurrency:Go,name:"Sepolia",blockExplorerUrls:["https://sepolia.etherscan.io"]},11155420:{urls:["https://sepolia.optimism.io"],name:"Optimism Sepolia",nativeCurrency:Go,blockExplorerUrls:["https://sepolia-optimistic.etherscan.io"]},421614:{urls:["https://sepolia-rollup.arbitrum.io/rpc"],name:"Arbitrum Sepolia",nativeCurrency:Go,blockExplorerUrls:["https://sepolia.arbiscan.io/"]},80002:{urls:["https://polygon-amoy-bor-rpc.publicnode.com"],name:"Polygon Amoy",nativeCurrency:Bp,blockExplorerUrls:["https://www.oklink.com/amoy"]},44787:{urls:["https://alfajores-forno.celo-testnet.org"],name:"Celo Alfajores",nativeCurrency:cS,blockExplorerUrls:["https://alfajores-blockscout.celo-testnet.org"]},97:{name:"BNB Testnet",urls:["https://data-seed-prebsc-1-s1.binance.org:8545"],nativeCurrency:uS,blockExplorerUrls:[]},2442:{name:"Polygon zkEVM Testnet",urls:["https://rpc.cardona.zkevm-rpc.com"],nativeCurrency:Bp,blockExplorerUrls:["https://cardona-zkevm.polygonscan.com/"]},123:{name:"Fuse Testnet",urls:["https://rpc.fusespark.io"],nativeCurrency:JG,blockExplorerUrls:["https://explorer.fusespark.io/"]},111557560:{name:"Cyber Testnet",urls:["https://cyber-testnet.alt.technology/"],nativeCurrency:Go,blockExplorerUrls:["https://testnet.cyberscan.co/"]}},gy={...eK,...tK};Object.keys(gy).reduce((e,t)=>{const n=gy[Number(t)].urls;return n.length&&(e[Number(t)]=n),e},{});const nK=()=>{const e=[];return ps.ALLOWED_NETWORKS.forEach(t=>{const n=gy[t];e.push({id:Te(t),label:n.name,rpcUrl:n.urls[0],token:n.nativeCurrency.symbol})}),e},rK=O.object({handleUri:O.func().optional(),version:O.number().optional().custom((e,t)=>{if(e===1)console.warn("Version 1 of WalletConnect has been fully deprecated. This version of @web3-onboard/walletconnect only supports version 2");else if(e!==2&&e!==void 0)return t.error("any.invalid",{message:"Invalid version number. This version of @web3-onboard/walletconnect only supports version 2"});return e},"Custom version validation"),projectId:O.string().messages({"any.required":"WalletConnect version 2 requires a projectId. Please visit https://cloud.walletconnect.com to get one."}),dappUrl:O.string().optional().custom((e,t)=>e||t.message({message:"It is strongly recommended to supply a dappUrl as it is required by some wallets (i.e. MetaMask) to allow connection.",type:"any.custom"}),"Custom dappUrl validation"),requiredChains:O.array().items(O.number()).optional(),optionalChains:O.array().items(O.number()).optional(),qrModalOptions:O.object().optional(),additionalRequiredMethods:O.array().items(O.string()).optional(),additionalOptionalMethods:O.array().items(O.string()).optional()}),iK=(e,t)=>{const n=e.validate(t);return n.error?n:null},oK=e=>iK(rK,e),p3=["eth_sendTransaction","eth_signTransaction","personal_sign","eth_sign","eth_signTypedData","eth_signTypedData_v4","wallet_addEthereumChain","wallet_switchEthereumChain"];function sK(e){if(!e.projectId)throw new Error("WalletConnect requires a projectId. Please visit https://cloud.walletconnect.com to get one.");e.dappUrl||console.warn("It is strongly recommended to supply a dappUrl to the WalletConnect init object as it is required by some wallets (i.e. MetaMask) to allow connection.");const{projectId:t,handleUri:n,requiredChains:r,optionalChains:i,qrModalOptions:o,additionalRequiredMethods:s,additionalOptionalMethods:a,dappUrl:l}=e;let u;return()=>({label:"WalletConnect",getIcon:async()=>(await ue(async()=>{const{default:d}=await import("./icon-CKT6anLG.js");return{default:d}},[])).default,getInterface:async({chains:d,EventEmitter:c,appMetadata:f})=>{const{ProviderRpcError:m,ProviderRpcErrorCode:p}=await ue(async()=>{const{ProviderRpcError:N,ProviderRpcErrorCode:R}=await import("./index-MsX5kOG8.js");return{ProviderRpcError:N,ProviderRpcErrorCode:R}},[]),{default:h,REQUIRED_METHODS:y}=await ue(async()=>{const{default:N,REQUIRED_METHODS:R}=await import("./index.es-IxFjqeYu.js");return{default:N,REQUIRED_METHODS:R}},__vite__mapDeps([10,9])),{Subject:g,fromEvent:b}=await ue(async()=>{const{Subject:N,fromEvent:R}=await import("./index-DvN7N4_1.js");return{Subject:N,fromEvent:R}},__vite__mapDeps([6,7])),{takeUntil:v,take:w}=await ue(async()=>{const{takeUntil:N,take:R}=await import("./index-6w8_iIHZ.js").then(B=>B.i);return{takeUntil:N,take:R}},[]),E=()=>{if(!f)return;const N=l||f.explore||"";!N&&!N.length&&console.warn("It is strongly recommended to supply a dappUrl as it is required by some wallets (i.e. MetaMask) to allow connection.");const R={name:f.name,description:f.description||"",url:N,icons:[]};return f.icon!==void 0&&f.icon.length&&(R.icons=[f.icon]),f.logo!==void 0&&f.logo.length&&(R.icons=R.icons.length?[...R.icons,f.logo]:[f.logo]),R},C=Array.isArray(r)&&r.length&&r.every(N=>!isNaN(N))?r.map(N=>parseInt(N)):[],k=Array.isArray(i)&&i.length&&i.every(N=>!isNaN(N))?i.map(N=>parseInt(N)):d.map(({id:N})=>parseInt(N,16)),_=new Set(s&&Array.isArray(s)?[...s,...y]:y),S=Array.from(_),A=a&&Array.isArray(a)?[...a,...p3]:p3,I=await h.init({projectId:t,chains:C,methods:S,optionalChains:k,optionalMethods:A,showQrModal:!0,rpcMap:d.map(({id:N,rpcUrl:R})=>({id:N,rpcUrl:R})).reduce((N,{id:R,rpcUrl:B})=>(N[parseInt(R,16)]=B||"",N),{}),metadata:E(),qrModalOptions:o}),L=new c;class F{constructor({connector:R,chains:B}){this.emit=L.emit.bind(L),this.on=L.on.bind(L),this.removeListener=L.removeListener.bind(L),this.connector=R,this.chains=B,this.disconnected$=new g,b(this.connector,"accountsChanged",j=>j).pipe(v(this.disconnected$)).subscribe({next:j=>{const W=Array.isArray(j)?j:[j];this.emit("accountsChanged",W)},error:console.warn}),b(this.connector,"chainChanged",j=>j).pipe(v(this.disconnected$)).subscribe({next:j=>{const W=fg(j)?j:`0x${j.toString(16)}`;this.emit("chainChanged",W)},error:console.warn}),b(this.connector,"session_delete",j=>j).pipe(v(this.disconnected$)).subscribe({next:()=>{this.emit("accountsChanged",[]),this.disconnected$.next(!0),typeof localStorage<"u"&&localStorage.removeItem("walletconnect")},error:console.warn}),this.disconnect=()=>{this.connector.session&&(this.connector.disconnect(),u=null)},e&&n&&b(this.connector,"display_uri",j=>j).pipe(v(this.disconnected$)).subscribe(async j=>{try{n&&await n(j)}catch(W){throw`An error occurred when handling the URI. Error: ${W}`}}),(()=>{const j=this.connector.session;u=j,j&&(this.emit("accountsChanged",this.connector.accounts),this.emit("chainChanged",this.connector.chainId))})(),this.request=async({method:j,params:W})=>{if(j==="eth_chainId")return fg(this.connector.chainId)?this.connector.chainId:`0x${this.connector.chainId.toString(16)}`;if(j==="eth_requestAccounts")return new Promise(async(Y,te)=>{if(b(this.connector,"connect",ae=>ae).pipe(w(1)).subscribe({next:({chainId:ae})=>{this.emit("accountsChanged",this.connector.accounts);const Z=fg(ae)?ae:`0x${ae.toString(16)}`;this.emit("chainChanged",Z),Y(this.connector.accounts)},error:te}),!this.connector.session)await this.connector.connect().catch(ae=>{console.error("err creating new session: ",ae),te(new m({code:4001,message:"User rejected the request."}))});else{const ae=this.connector.accounts,Z=this.connector.chainId;u=this.connector.session;const pe=`0x${Z.toString(16)}`;return this.emit("chainChanged",pe),Y(ae)}});if(j==="eth_selectAccounts")throw new m({code:p.UNSUPPORTED_METHOD,message:`The Provider does not support the requested method: ${j}`});if(j=="wallet_switchEthereumChain"){if(!W)throw new m({code:p.INVALID_PARAMS,message:"The Provider requires a chainId to be passed in as an argument"});const Y=W[0];if(!Y.hasOwnProperty("chainId")||typeof Y.chainId>"u")throw new m({code:p.INVALID_PARAMS,message:"The Provider requires a chainId to be passed in as an argument"});return this.connector.request({method:"wallet_switchEthereumChain",params:[{chainId:Y.chainId}]})}return this.connector.request({method:j,params:W})}}}return{provider:new F({chains:d,connector:I}),instance:u}}})}const fg=e=>!(typeof e!="string"||!e.match(/^0x[0-9A-Fa-f]*$/));function aK(e){if(!e)throw new Error("WalletConnect requires an initialization object to be passed - see the official docs for an example: https://onboard.blocknative.com/docs/wallets/walletconnect");if(e){const t=oK(e);if(t)throw t}return sK(e)}const lK={projectId:"a9782e50cde6e67b10c297f1834e43ea",requiredChains:[ps.DEFAULT_CHAIN],optionalChains:ps.ALLOWED_NETWORKS,version:2},cK=aK(lK),m3="/assets/PushBlocknativeLogo-CCspGNrV.svg",uK=XG(),fK=YG(),dK=nK(),hK=mq({appMetadata:{name:ps.APP_NAME,icon:m3,logo:m3,description:"The Communication Protocol of Web3",explore:"https://app.push.org"},accountCenter:{desktop:{enabled:!1},mobile:{enabled:!1}},connect:{showSidebar:!0,autoConnectLastWallet:!0,removeWhereIsMyWalletWarning:!0,removeIDontHaveAWalletInfoLink:!0,disableClose:!1},containerElements:{},wallets:[uK,cK,fK],chains:dK,theme:"system"});dg.createRoot(document.getElementById("root")).render(fe.jsx(C3.StrictMode,{children:fe.jsx(gq,{web3Onboard:hK,children:fe.jsx($q,{})})}));export{xi as $,JK as A,rZ as B,Re as C,QK as D,He as E,Ka as F,ye as G,CU as H,eH as I,Es as J,uZ as K,pH as L,tt as M,Rn as N,L_ as O,pZ as P,mZ as Q,Ei as R,Gt as S,Cp as T,mH as U,fH as V,Hf as W,J9 as X,jf as Y,iw as Z,fn as _,Vt as a,FF as a$,hZ as a0,nZ as a1,lH as a2,bz as a3,KK as a4,Qv as a5,Pp as a6,aZ as a7,GK as a8,pd as a9,ju as aA,F9 as aB,fZ as aC,lg as aD,XK as aE,__ as aF,n9 as aG,tZ as aH,Ta as aI,b_ as aJ,it as aK,rU as aL,Z7 as aM,K7 as aN,iU as aO,oU as aP,nU as aQ,H7 as aR,jK as aS,ly as aT,Ot as aU,Nv as aV,Mv as aW,aU as aX,q7 as aY,FK as aZ,gc as a_,d7 as aa,k9 as ab,ow as ac,Rz as ad,dZ as ae,is as af,jr as ag,cz as ah,ZK as ai,eZ as aj,O_ as ak,iZ as al,lZ as am,YK as an,Ea as ao,vc as ap,Fv as aq,ec as ar,bc as as,sZ as at,sH as au,oZ as av,cZ as aw,Q9 as ax,zU as ay,I_ as az,ve as b,nj as b$,UF as b0,HF as b1,W7 as b2,RK as b3,YF as b4,R0 as b5,QF as b6,JF as b7,DK as b8,GF as b9,Sa as bA,mK as bB,br as bC,io as bD,x_ as bE,cy as bF,Dv as bG,jv as bH,vU as bI,E_ as bJ,zK as bK,dU as bL,bU as bM,_U as bN,Q7 as bO,gU as bP,VK as bQ,qK as bR,UK as bS,HK as bT,WK as bU,pU as bV,mU as bW,Y7 as bX,hU as bY,QE as bZ,PK as b_,V7 as ba,Bv as bb,ZF as bc,G7 as bd,eU as be,Lv as bf,zF as bg,WF as bh,VF as bi,yc as bj,DF as bk,jF as bl,tU as bm,v_ as bn,Ih as bo,J as bp,Ub as bq,hn as br,pR as bs,Qb as bt,_0 as bu,ro as bv,uc as bw,Bu as bx,Er as by,ue as bz,U as c,Tr as c0,Sj as c1,bj as c2,On as c3,Sv as c4,ao as c5,tj as c6,T0 as c7,Ev as c8,mp as c9,pi as cA,ms as cB,Y1 as cC,YE as cD,Ar as cE,kr as cF,I0 as ca,Lf as cb,vj as cc,ej as cd,Ym as ce,e_ as cf,Cj as cg,Q1 as ch,f7 as ci,yj as cj,KE as ck,kj as cl,Lj as cm,Zl as cn,md as co,Jm as cp,Av as cq,l7 as cr,Iv as cs,J1 as ct,c7 as cu,n_ as cv,Tv as cw,Bf as cx,h7 as cy,Kr as cz,oe as d,K as e,H as f,mt as g,ie as h,qt as i,gt as j,re as k,qn as l,xe as m,mi as n,vi as o,wt as p,C9 as q,ze as r,Wt as s,X as t,De as u,Fe as v,D9 as w,ee as x,ct as y,tw as z}; + */var nc=de;function yq(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var bq=typeof Object.is=="function"?Object.is:yq,vq=nc.useState,wq=nc.useEffect,_q=nc.useLayoutEffect,xq=nc.useDebugValue;function Eq(e,t){var n=t(),r=vq({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return _q(function(){i.value=n,i.getSnapshot=t,ug(i)&&o({inst:i})},[e,n,t]),wq(function(){return ug(i)&&o({inst:i}),e(function(){ug(i)&&o({inst:i})})},[e]),xq(n),n}function ug(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!bq(e,n)}catch{return!0}}function Sq(e,t){return t()}var kq=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Sq:Eq;iS.useSyncExternalStore=nc.useSyncExternalStore!==void 0?nc.useSyncExternalStore:kq;rS.exports=iS;var Cq=rS.exports;const Aq=(e=void 0)=>{const t=nS(),{select:n,get:r}=t.state,i=de.useCallback(a=>{const{unsubscribe:l}=e?n(e).subscribe(a):n().subscribe(a);return()=>l},[e]),o=de.useCallback(()=>{const a=r();return e?a[e]:a},[e]),s=()=>o();return Cq.useSyncExternalStore(i,o,s)},oS=()=>{const e=nS(),{connectWallet:t,disconnectWallet:n}=e,i=Aq("wallets")[0]||null,[o,s]=de.useState(!1),a=de.useCallback(async f=>{s(!0);const m=await t(f);return s(!1),m},[]),l=de.useCallback(async({label:f})=>{s(!0);const m=await n({label:f});return s(!1),m},[]),u=e.state.actions.updateBalances,d=e.state.actions.setWalletModules,c=e.state.actions.setPrimaryWallet;return[{wallet:i,connecting:o},a,l,u,d,c]},sS=({words:e,disabled:t,handleMnemonicChange:n})=>fe.jsx("div",{className:"grid grid-cols-3 gap-4 mb-6",children:e.map((r,i)=>fe.jsxs("div",{className:"flex items-center space-x-2",children:[fe.jsx("span",{className:"text-lg font-medium",children:`${i+1}.`}),fe.jsx("input",{type:"text",value:r,onChange:o=>n(i,o.target.value),placeholder:`Word ${i+1}`,className:"border p-2 rounded w-full text-center",disabled:t})]},i))});function Tq(){const[e,t]=de.useState(1),[n,r]=de.useState(null),[i,o]=de.useState(Array(12).fill("")),[{wallet:s,connecting:a},l,u]=oS(),[d,c]=de.useState(null),{dispatch:f}=hb(),m=Xf();de.useEffect(()=>{if(n!=null&&n.mnemonic){const w=n.mnemonic.split(" ");o(w)}},[n]);const p=()=>t(e+1),h=async()=>{if(n)try{await n.registerPushAccount(ps.APP_ENV),f({type:"INITIALIZE_WALLET",payload:n}),m("/")}catch(w){alert(w)}},y=async()=>{try{const w=await Rf.signUp();r(w)}catch(w){alert(w)}},g=()=>fe.jsxs("div",{className:"space-y-4 text-center",children:[fe.jsx("button",{onClick:async()=>{c("mnemonic"),await y()},className:"bg-blue-600 text-white px-6 py-3 rounded-lg w-64",children:"Using Mnemonic"}),fe.jsxs("button",{onClick:()=>c("social"),className:"border border-blue-600 text-blue-600 px-6 py-1 rounded-lg w-64",disabled:!0,children:["Social Login ",fe.jsx("br",{})," Coming Soon 🚀"]})]}),b=()=>{const w=()=>{const E=i.join(" ");navigator.clipboard.writeText(E).then(()=>alert("Copied to clipboard")).catch(()=>alert("Failed to copy"))};return fe.jsxs("div",{className:"text-center",children:[fe.jsx("h2",{className:"text-2xl mb-6",children:"Store Seed Phrase Safely"}),fe.jsx(sS,{words:i,disabled:!0}),fe.jsx("button",{className:"border border-blue-600 text-blue-600 px-4 py-2 rounded-lg w-30",onClick:w,children:"Copy"}),fe.jsx("p",{className:"mb-6 mt-20 text-gray-600",children:"Your wallet needs to be registered on the Push network to be able to send transactions on the network."}),fe.jsx("button",{className:"bg-blue-600 text-white px-6 py-3 rounded-lg w-40",onClick:p,children:"Next"})]})},v=()=>fe.jsxs("div",{className:"text-center space-y-6",children:[fe.jsx("div",{className:"flex flex-col items-center space-y-4",children:s&&s.provider?fe.jsxs("button",{className:"border border-blue-600 text-blue-600 px-6 py-1 rounded-md",onClick:()=>{u({label:s.label})},children:["Disconnect ",s.accounts[0].address]}):fe.jsx("button",{disabled:a,className:"bg-blue-600 text-white px-6 py-3 rounded-lg w-64",onClick:()=>l(),children:"Connect Web3 Account"})}),fe.jsxs("button",{onClick:h,className:"w-full py-3 bg-blue-600 text-white rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 flex items-center justify-center",children:[fe.jsx("svg",{className:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:fe.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 11V7a4 4 0 118 0m-4 8v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2z"})}),"Register Push Account"]})]});return fe.jsx("div",{className:"flex flex-col items-center justify-center",children:fe.jsxs("div",{className:"p-8 w-full max-w-lg",children:[e===1&&fe.jsxs(fe.Fragment,{children:[!d&&g(),d==="mnemonic"&&b()]}),e===2&&v()]})})}function Iq(){const[e,t]=de.useState(null),[n,r]=de.useState(Array(12).fill("")),[{wallet:i,connecting:o},s,a]=oS(),{dispatch:l}=hb(),u=Xf(),d=(h,y)=>{const g=[...n];g[h]=y,r(g)},c=async()=>{try{let h;switch(e){case"mnemonic":{h=await Rf.logInWithMnemonic(n.join(" "),ps.APP_ENV);break}case"wallet":{const[y]=await i.provider.request({method:"eth_requestAccounts"}),g=jE({account:y,chain:vv,transport:BL(i.provider)});h=await Rf.loginWithWallet(g,ps.APP_ENV);break}}l({type:"INITIALIZE_WALLET",payload:h}),u("/")}catch(h){alert(h)}},f=()=>fe.jsxs("div",{className:"space-y-4 text-center",children:[fe.jsx("button",{onClick:()=>t("mnemonic"),className:"bg-blue-600 text-white px-6 py-3 rounded-lg w-64",children:"Using Mnemonic"}),fe.jsx("button",{onClick:()=>t("wallet"),className:"bg-blue-600 text-white px-6 py-3 rounded-lg w-64",children:"Using Web3 Account"}),fe.jsxs("button",{onClick:()=>t("social"),className:"border border-blue-600 text-blue-600 px-6 py-1 rounded-lg w-64",disabled:!0,children:["Social Login ",fe.jsx("br",{})," Coming Soon 🚀"]})]}),m=()=>fe.jsxs("div",{className:"space-y-4",children:[fe.jsx(sS,{words:n,disabled:!1,handleMnemonicChange:d}),fe.jsxs("button",{onClick:c,disabled:n.some(h=>h===""),className:"w-full py-3 bg-blue-600 text-white rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 flex items-center justify-center",children:[fe.jsx("svg",{className:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:fe.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 11V7a4 4 0 118 0m-4 8v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2z"})}),"Unlock Push Account"]})]}),p=()=>fe.jsxs("div",{className:"text-center space-y-6",children:[fe.jsx("div",{className:"flex flex-col items-center space-y-4",children:i&&i.provider?fe.jsxs("button",{className:"border border-blue-600 text-blue-600 px-6 py-1 rounded-md",onClick:()=>{a({label:i.label})},children:["Disconnect ",i.accounts[0].address]}):fe.jsx("button",{disabled:o,className:"bg-blue-600 text-white px-6 py-3 rounded-lg w-64",onClick:()=>s(),children:"Connect Web3 Account"})}),fe.jsxs("button",{onClick:c,disabled:!i||!i.provider,className:"w-full py-3 bg-blue-600 text-white rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 flex items-center justify-center",children:[fe.jsx("svg",{className:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:fe.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 11V7a4 4 0 118 0m-4 8v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2z"})}),"Unlock Push Account"]})]});return fe.jsx("div",{className:"flex flex-col items-center justify-center",children:fe.jsxs("div",{className:"p-8 w-full max-w-lg",children:[!e&&f(),e==="mnemonic"&&m(),e==="wallet"&&p()]})})}function $q(){return fe.jsx(BA,{children:fe.jsxs("div",{className:"min-h-screen flex flex-col",children:[fe.jsx("h1",{className:"text-4xl font-bold mt-8 text-center",children:ps.APP_NAME}),fe.jsx("div",{className:"flex-1 flex items-center justify-center",children:fe.jsx(PA,{basename:"/push-keys",children:fe.jsxs(TA,{children:[fe.jsx(gu,{path:"/",element:fe.jsx(NA,{})}),fe.jsx(gu,{path:"/login",element:fe.jsx(Iq,{})}),fe.jsx(gu,{path:"/signup",element:fe.jsx(Tq,{})}),fe.jsx(gu,{path:"*",element:fe.jsx(CA,{to:"/"})})]})})})]})})}var Lp={exports:{}};Lp.exports;(function(e,t){var n=200,r="Expected a function",i="__lodash_hash_undefined__",o=1,s=2,a=1/0,l=9007199254740991,u="[object Arguments]",d="[object Array]",c="[object Boolean]",f="[object Date]",m="[object Error]",p="[object Function]",h="[object GeneratorFunction]",y="[object Map]",g="[object Number]",b="[object Object]",v="[object Promise]",w="[object RegExp]",E="[object Set]",C="[object String]",k="[object Symbol]",_="[object WeakMap]",S="[object ArrayBuffer]",A="[object DataView]",I="[object Float32Array]",L="[object Float64Array]",F="[object Int8Array]",N="[object Int16Array]",R="[object Int32Array]",B="[object Uint8Array]",V="[object Uint8ClampedArray]",j="[object Uint16Array]",W="[object Uint32Array]",Y=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,te=/^\w*$/,ae=/^\./,Z=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pe=/[\\^$.*+?()[\]{}|]/g,Ie=/\\(\\)?/g,_e=/^\[object .+?Constructor\]$/,Ce=/^(?:0|[1-9]\d*)$/,le={};le[I]=le[L]=le[F]=le[N]=le[R]=le[B]=le[V]=le[j]=le[W]=!0,le[u]=le[d]=le[S]=le[c]=le[A]=le[f]=le[m]=le[p]=le[y]=le[g]=le[b]=le[w]=le[E]=le[C]=le[_]=!1;var $e=typeof br=="object"&&br&&br.Object===Object&&br,rt=typeof self=="object"&&self&&self.Object===Object&&self,je=$e||rt||Function("return this")(),nt=t&&!t.nodeType&&t,Le=nt&&!0&&e&&!e.nodeType&&e,_t=Le&&Le.exports===nt,Kn=_t&&$e.process,Zr=function(){try{return Kn&&Kn.binding("util")}catch{}}(),Ss=Zr&&Zr.isTypedArray;function wc(x,T){var P=x?x.length:0;return!!P&&ks(x,T,0)>-1}function _c(x,T){for(var P=-1,D=x?x.length:0;++P-1}function Ls(x,T){var P=this.__data__,D=bo(P,x);return D<0?P.push([x,T]):P[D][1]=T,this}Yn.prototype.clear=Tc,Yn.prototype.delete=xn,Yn.prototype.get=Ic,Yn.prototype.has=mo,Yn.prototype.set=Ls;function Qn(x){var T=-1,P=x?x.length:0;for(this.clear();++T=n){var Ke=T?null:vo(x);if(Ke)return Yr(Ke);ce=!1,ne=xc,ke=new ti}else ke=T?[]:Pe;e:for(;++DPe))return!1;var Ke=G.get(x);if(Ke&&G.get(T))return Ke==T;var Ve=-1,Ze=!0,Qe=ne&o?new ti:void 0;for(G.set(x,T),G.set(T,x);++Ve-1&&x%1==0&&x-1&&x%1==0&&x<=l}function kt(x){var T=typeof x;return!!x&&(T=="object"||T=="function")}function En(x){return!!x&&typeof x=="object"}function dr(x){return typeof x=="symbol"||En(x)&&Qr.call(x)==k}var Ri=Ss?Ia(Ss):Hc;function Fa(x){return x==null?"":qc(x)}function U0(x,T,P){var D=x==null?void 0:ni(x,T);return D===void 0?P:D}function H0(x,T){return x!=null&&Yt(x,T,Dc)}function Kc(x){return Ge(x)?jc(x):zc(x)}function Ua(x){return x}function z0(){}function W0(x){return Pi(x)?ur(Eo(x)):Ns(x)}e.exports=M})(Lp,Lp.exports);var Pq=Lp.exports;const Oq=Sa(Pq);var he;(function(e){e.AlphaWallet="isAlphaWallet",e.ApexWallet="isApexWallet",e.AToken="isAToken",e.BifrostWallet="isBifrost",e.Binance="bbcSignTx",e.Bitpie="isBitpie",e.BlockWallet="isBlockWallet",e.Coinbase="isToshi",e.CoinbaseExtension="isCoinbaseWallet",e.Detected="request",e.Dcent="isDcentWallet",e.Exodus="isExodus",e.Frontier="isFrontier",e.Frame="isFrame",e.HuobiWallet="isHbWallet",e.HyperPay="isHyperPay",e.ImToken="isImToken",e.InfinityWallet="isInfinityWallet",e.Liquality="isLiquality",e.MeetOne="wallet",e.MetaMask="isMetaMask",e.MyKey="isMYKEY",e.OwnBit="isOwnbit",e.Status="isStatus",e.Trust="isTrust",e.TokenPocket="isTokenPocket",e.TP="isTp",e.WalletIo="isWalletIO",e.XDEFI="isXDEFI",e.OneInch="isOneInchIOSWallet",e.Tokenary="isTokenary",e.Tally="isTally",e.BraveWallet="isBraveWallet",e.Rabby="isRabby",e.MathWallet="isMathWallet",e.Bitget="isBitKeep",e.Sequence="isSequence",e.Core="isAvalanche",e.Opera="isOpera",e.Bitski="isBitski",e.Enkrypt="isEnkrypt",e.Phantom="isPhantom",e.OKXWallet="isOkxWallet",e.Zeal="isZeal",e.Zerion="isZerion",e.Rainbow="isRainbow",e.SafePal="isSafePal",e.DeFiWallet="isDeficonnectProvider",e.Safeheron="isSafeheron",e.Talisman="isTalisman",e.OneKey="isOneKey",e.Fordefi="isFordefi",e.Coin98Wallet="isCoin98",e.SubWallet="isSubWallet",e.Kayros="isKayros",e.FoxWallet="isFoxWallet",e.Lif3Wallet="isLif3Wallet",e.ZodiacPilot="isZodiacPilot",e.StableWallet="isStableWallet",e.Echooo="isEchooo",e.Keplr="keplr"})(he||(he={}));var sn;(function(e){e.Binance="https://www.bnbchain.org/ru/blog/binance-extension-wallet/",e.Bitget="https://web3.bitget.com/en/wallet-download",e.Coinbase="https://www.coinbase.com/wallet/downloads",e.MetaMask="https://metamask.io/download/",e.OKXWallet="https://okx.com/download",e.Phantom="https://phantom.app/ul/v1/connect",e.Talisman="https://www.talisman.xyz/",e.Trust="https://link.trustwallet.com",e.OneKey="https://onekey.so/download/",e.RoninWallet="https://wallet.skymavis.com/",e.Coin98Wallet="https://coin98.com/wallet/",e.SubWallet="https://www.subwallet.app/",e.Kayros="https://www.kayros.games/wallet/",e.XDEFI="https://xdefi.io/",e.FoxWallet="https://foxwallet.com/download",e.Lif3Wallet="https://lif3.com",e.Rabby="https://rabby.io",e.ZodiacPilot="https://pilot.gnosisguild.org/",e.Echooo="https://www.echooo.xyz",e.Keplr="https://www.keplr.app/download"})(sn||(sn={}));var we;(function(e){e.AlphaWallet="AlphaWallet",e.ApexWallet="Apex Wallet",e.AToken="AToken",e.BifrostWallet="Bifrost Wallet",e.Binance="Binance Smart Wallet",e.Bitpie="Bitpie",e.Bitski="Bitski",e.BlockWallet="BlockWallet",e.Brave="Brave Wallet",e.Coinbase="Coinbase Wallet",e.Dcent="D'CENT",e.Detected="Detected Wallet",e.Exodus="Exodus",e.Frame="Frame",e.Frontier="Frontier",e.HuobiWallet="Huobi Wallet",e.HyperPay="HyperPay",e.ImToken="imToken",e.InfinityWallet="Infinity Wallet",e.Liquality="Liquality",e.MeetOne="MeetOne",e.MetaMask="MetaMask",e.MyKey="MyKey",e.Opera="Opera Wallet",e.OwnBit="OwnBit",e.Status="Status Wallet",e.Trust="Trust Wallet",e.TokenPocket="TokenPocket",e.TP="TP Wallet",e.WalletIo="Wallet.io",e.XDEFI="XDEFI Wallet",e.OneInch="1inch Wallet",e.Tokenary="Tokenary Wallet",e.Tally="Taho",e.Rabby="Rabby Wallet",e.MathWallet="MathWallet",e.Bitget="Bitget Wallet",e.Sequence="Sequence",e.Core="Core",e.Enkrypt="Enkrypt",e.Zeal="Zeal",e.Phantom="Phantom",e.OKXWallet="OKX Wallet",e.Zerion="Zerion",e.Rainbow="Rainbow",e.SafePal="SafePal",e.DeFiWallet="DeFi Wallet",e.Safeheron="Safeheron",e.Talisman="Talisman",e.OneKey="OneKey",e.Fordefi="Fordefi",e.RoninWallet="Ronin Wallet",e.Coin98Wallet="Coin98 Wallet",e.SubWallet="SubWallet",e.Kayros="Kayros",e.FoxWallet="FoxWallet",e.Lif3Wallet="Lif3 Wallet",e.ZodiacPilot="Zodiac Pilot",e.StableWallet="StableWallet",e.Echooo="Echooo",e.Keplr="Keplr"})(we||(we={}));var me;(function(e){e.Ethereum="ethereum",e.Binance="BinanceChain",e.Tally="tally",e.Web3="web3",e.Arbitrum="arbitrum",e.XFI="xfi",e.Bitget="bitkeep",e.Avalanche="avalanche",e.Bitski="Bitski",e.Enkrypt="enkrypt",e.Zeal="zeal",e.Phantom="phantom",e.OKXWallet="okxwallet",e.Trust="trustwallet",e.Frontier="frontier",e.DeFiConnectProvider="deficonnectProvider",e.Safeheron="safeheron",e.Talisman="talismanEth",e.OneKey="$onekey",e.RoninWallet="ronin",e.Coin98Wallet="coin98",e.SubWallet="SubWallet",e.Kayros="kayros",e.FoxWallet="foxwallet",e.Echooo="echooo"})(me||(me={}));const jt=null;function Nn(e,t){return async()=>({provider:window.ethereum.providers&&Array.isArray(window.ethereum.providers)?Rq(e,t):window.ethereum})}function Rq(e,t){return window.ethereum.providers.find(n=>t?!!n[e]&&!aS(e,n):!!n[e])}function aS(e,t){return Object.values(he).filter(r=>r!==e&&r!==he.Detected).some(r=>!!t[r])}const Lq={label:we.MetaMask,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.MetaMask]&&!aS(he.MetaMask,e),getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./metamask-BnRi-VtU.js");return{default:e}},[])).default,getInterface:Nn(he.MetaMask,!0),platforms:["all"],externalUrl:sn.MetaMask},Bq={label:we.InfinityWallet,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.InfinityWallet],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./infinitywallet-B3Dl-7rf.js");return{default:e}},[])).default,getInterface:Nn(he.InfinityWallet),platforms:["desktop"]},Nq={label:we.Exodus,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Exodus],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./exodus-CokzJYSo.js");return{default:e}},[])).default,getInterface:Nn(he.Exodus),platforms:["all"]},Mq={label:we.Frontier,injectedNamespace:me.Frontier,checkProviderIdentity:({provider:e})=>!!e&&!!e.ethereum&&!!e.ethereum[he.Frontier],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./frontier-KVnJjdmQ.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.frontier.ethereum)}),platforms:["all"]},jq={label:we.Brave,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.BraveWallet],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./brave-BaDXvGW7.js");return{default:e}},[])).default,getInterface:Nn(he.BraveWallet),platforms:["all"]},Dq={label:we.Binance,injectedNamespace:me.Binance,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Binance],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./binance-DKfHEPwi.js");return{default:e}},[])).default,getInterface:async()=>{let e={...window.BinanceChain};window.BinanceChain=e;const t=window.BinanceChain.on.bind(window.BinanceChain);window.BinanceChain.on=(r,i)=>{r==="chainChanged"?t(r,o=>{i(`0x${parseInt(o).toString(16)}`)}):t(r,i)};const n=it(window.BinanceChain,{eth_chainId:({baseRequest:r})=>r({method:"eth_chainId"}).then(i=>`0x${parseInt(i).toString(16)}`),eth_selectAccounts:jt,wallet_switchEthereumChain:jt});return n.removeListener=(r,i)=>{},{provider:n}},platforms:["desktop"],externalUrl:sn.Binance},Fq={label:we.Coinbase,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Coinbase]||!!e&&!!e[he.CoinbaseExtension],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./coinbase-CrEj8Vm7.js");return{default:e}},[])).default,getInterface:async()=>{const{provider:e}=await Nn(he.CoinbaseExtension)(),t=e.on.bind(e);return e.on=(n,r)=>{n==="chainChanged"?t(n,i=>{r(`0x${parseInt(i).toString(16)}`)}):t(n,r)},{provider:e}},platforms:["all"],externalUrl:sn.Coinbase},Uq={label:we.Detected,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Detected],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./detected-B5TJ64kR.js");return{default:e}},[])).default,getInterface:async()=>({provider:window.ethereum}),platforms:["all"]},Hq={label:we.Trust,injectedNamespace:me.Trust,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Trust],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./trust-CmzsVbO9.js");return{default:e}},[])).default,getInterface:async()=>{const e=window.hasOwnProperty(me.Ethereum);let t;return e&&window[me.Ethereum].isTrust?t=window[me.Ethereum]:t=window[me.Trust],{provider:t}},platforms:["all"],externalUrl:sn.Trust},zq={label:we.Opera,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Opera],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./opera-BlUFsBw2.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.ethereum,{eth_requestAccounts:async({baseRequest:e})=>e({method:"eth_accounts"}),eth_selectAccounts:jt})}),platforms:["all"]},Wq={label:we.Status,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Status],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./status-DEbRpCSZ.js");return{default:e}},[])).default,getInterface:async()=>({provider:window.ethereum}),platforms:["mobile"]},Vq={label:we.AlphaWallet,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.AlphaWallet],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./alphawallet-BYxyLSyF.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.ethereum,{wallet_switchEthereumChain:jt,eth_selectAccounts:jt})}),platforms:["mobile"]},qq={label:we.ApexWallet,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.ApexWallet],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./apexwallet-NS7FlaY4.js");return{default:e}},[])).default,getInterface:async()=>({provider:window.ethereum}),platforms:["desktop","Chrome","Chromium","Microsoft Edge"]},Gq={label:we.AToken,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.AToken],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./atoken-CMEoSy7G.js");return{default:e}},[])).default,getInterface:async()=>({provider:window.ethereum}),platforms:["mobile"]},Kq={label:we.BifrostWallet,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.BifrostWallet],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./bifrostwallet-CzEJJq7Q.js");return{default:e}},[])).default,getInterface:Nn(he.BifrostWallet),platforms:["all"]},Zq={label:we.Bitpie,injectedNamespace:me.Ethereum,checkProviderIdentity:()=>!!window.Bitpie,getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./bitpie-BjtS8guf.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.ethereum,{wallet_switchEthereumChain:jt,eth_selectAccounts:jt})}),platforms:["mobile"]},Xq={label:we.BlockWallet,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.BlockWallet],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./blockwallet-Cv_NU9OT.js");return{default:e}},[])).default,getInterface:Nn(he.BlockWallet),platforms:["desktop"]},Yq={label:we.Frame,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Frame],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./frame-BNDnw4sb.js");return{default:e}},[])).default,getInterface:async()=>{const e=window.ethereum;if(!e||!e.connected)throw new Error("Frame App must be open with a hot wallet connected. If not installed first download the Frame App.");return{provider:e}},platforms:["desktop"]},Qq={label:we.HuobiWallet,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.HuobiWallet],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./huobiwallet-Ct6qXzy7.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.ethereum,{wallet_switchEthereumChain:jt,eth_selectAccounts:jt})}),platforms:["mobile"]},Jq={label:we.HyperPay,injectedNamespace:me.Ethereum,checkProviderIdentity:()=>!!window.hiWallet,getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./hyperpay-7nxffAdA.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.ethereum,{wallet_switchEthereumChain:jt,eth_selectAccounts:jt})}),platforms:["mobile"]},eG={label:we.ImToken,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.ImToken],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./imtoken-5GbbboMy.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.ethereum,{eth_selectAccounts:jt})}),platforms:["mobile"]},tG={label:we.Liquality,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Liquality],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./liquality-BIQsbXhN.js");return{default:e}},[])).default,getInterface:async()=>{const e=it(window.ethereum,{wallet_switchEthereumChain:jt,eth_selectAccounts:jt});return e.removeListener=(t,n)=>{},{provider:e}},platforms:["desktop"]},nG={label:we.MeetOne,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&e[he.MeetOne]==="MEETONE",getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./meetone-BWx30j-q.js");return{default:e}},[])).default,getInterface:async()=>({provider:window.ethereum}),platforms:["mobile"]},rG={label:we.MyKey,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.MyKey],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./mykey-DXV41ggG.js");return{default:e}},[])).default,getInterface:async()=>({provider:window.ethereum}),platforms:["mobile"]},iG={label:we.OwnBit,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.OwnBit],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./ownbit-BdTY-PH9.js");return{default:e}},[])).default,getInterface:async()=>{const e=it(window.ethereum,{eth_chainId:({baseRequest:t})=>t({method:"eth_chainId"}).then(n=>`0x${parseInt(n).toString(16)}`),wallet_switchEthereumChain:jt,eth_selectAccounts:jt});return e.removeListener=(t,n)=>{},e.on=(t,n)=>{},{provider:e}},platforms:["mobile"]},oG={label:we.TokenPocket,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.TokenPocket]&&!e[he.TP],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./tokenpocket-Dbi32VQr.js");return{default:e}},[])).default,getInterface:Nn(he.TokenPocket),platforms:["all"]},sG={label:we.TP,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.TP],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./tp-BbFFERM0.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.ethereum,{wallet_switchEthereumChain:jt,eth_selectAccounts:jt})}),platforms:["mobile"]},aG={label:we.XDEFI,injectedNamespace:me.XFI,checkProviderIdentity:({provider:e})=>e&&e.ethereum&&e.ethereum[he.XDEFI],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./xdefi-CpZ4LxGD.js");return{default:e}},[])).default,getInterface:async()=>({provider:window.xfi&&window.xfi.ethereum}),platforms:["all"],externalUrl:sn.XDEFI},lG={label:we.OneInch,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.OneInch],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./oneInch-Jk8tDDo8.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.ethereum)}),platforms:["mobile"]},cG={label:we.Tokenary,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Tokenary],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./tokenary-DSpo6s4M.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.ethereum)}),platforms:["all"]},uG={label:we.Tally,injectedNamespace:me.Tally,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Tally],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./tallywallet-CxbOvuj7.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.tally)}),platforms:["desktop"]},fG={label:we.Zeal,injectedNamespace:me.Zeal,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Zeal],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./zeal-b2F8mFyk.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.zeal)}),platforms:["desktop"]},dG={label:we.Rabby,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Rabby],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./rabby-CIHjwZn9.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.ethereum)}),platforms:["desktop","mobile"]},hG={label:we.MathWallet,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.MathWallet],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./mathwallet-47rJD3aJ.js");return{default:e}},[])).default,getInterface:Nn(he.MathWallet),platforms:["all"]},pG={label:we.Bitget,injectedNamespace:me.Bitget,checkProviderIdentity:({provider:e})=>!!e&&!!e.ethereum[he.Bitget],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./bitget-CGoh9UgG.js");return{default:e}},[])).default,getInterface:async()=>({provider:window.bitkeep&&window.bitkeep.ethereum}),platforms:["all"],externalUrl:sn.Bitget},mG={label:we.Sequence,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Sequence],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./sequence-Dec4m3rM.js");return{default:e}},[])).default,getInterface:async()=>({provider:window.ethereum}),platforms:["all"]},gG={label:we.Core,injectedNamespace:me.Avalanche,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Core],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./core-bAnGbZV0.js");return{default:e}},[])).default,getInterface:Nn(he.Core),platforms:["desktop","Chrome","Chromium","Microsoft Edge"]},yG={label:we.Bitski,injectedNamespace:me.Bitski,checkProviderIdentity:({provider:e})=>!!e&&!!e.getProvider&&!!e.getProvider().isBitski,getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./bitski-SmR6xDPs.js");return{default:e}},[])).default,getInterface:async()=>({provider:window.Bitski&&window.Bitski.getProvider&&window.Bitski.getProvider()}),platforms:["all"]},bG={label:we.Zerion,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Zerion],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./zerion-XrObZCmj.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.ethereum)}),platforms:["all"]},vG={label:we.Enkrypt,injectedNamespace:me.Enkrypt,checkProviderIdentity:({provider:e})=>!!e&&!!e.providers&&!!e.providers.ethereum,getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./enkrypt-8Yg7sLuK.js");return{default:e}},[])).default,getInterface:async()=>{const e=window.enkrypt.providers.ethereum.on.bind(window.enkrypt.providers.ethereum);window.enkrypt.providers.ethereum.on=(n,r)=>{n==="chainChanged"?e(n,i=>{r(`0x${parseInt(i).toString(16)}`)}):e(n,r)};const t=it(window.enkrypt.providers.ethereum,{eth_chainId:({baseRequest:n})=>n({method:"eth_chainId"}).then(r=>`0x${parseInt(r).toString(16)}`)});return t.removeListener=(n,r)=>{},{provider:t}},platforms:["all"]},wG={label:we.Phantom,injectedNamespace:me.Phantom,checkProviderIdentity:({provider:e})=>!!e&&!!e.ethereum&&!!e.ethereum[he.Phantom],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./phantom-Bq8oBCC9.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.phantom.ethereum)}),platforms:["all"],externalUrl:sn.Phantom},_G={label:we.SafePal,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.SafePal],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./safepal-1ALKnv5Z.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.ethereum)}),platforms:["all"]},xG={label:we.Rainbow,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Rainbow],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./rainbow-Bk0xXB-l.js");return{default:e}},[])).default,getInterface:Nn(he.Rainbow),platforms:["all"]},EG={label:we.OKXWallet,injectedNamespace:me.OKXWallet,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.OKXWallet],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./okxwallet-CRkGxbWO.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.okxwallet)}),platforms:["all"],externalUrl:sn.OKXWallet},SG={label:we.DeFiWallet,injectedNamespace:me.DeFiConnectProvider,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.DeFiWallet],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./defiwallet-BTfpwPtA.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.deficonnectProvider)}),platforms:["all"]},kG={label:we.Safeheron,injectedNamespace:me.Safeheron,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Safeheron],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./safeheron-CpAKyowH.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.safeheron)}),platforms:["desktop","Chrome","Chromium","Microsoft Edge"]},CG={label:we.Talisman,injectedNamespace:me.Talisman,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Talisman],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./talisman-Bvq7wiKe.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.talismanEth)}),platforms:["desktop"],externalUrl:sn.Talisman},AG={label:we.RoninWallet,injectedNamespace:me.RoninWallet,checkProviderIdentity:({provider:e})=>!!e,getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./roninwallet-CsrXM8Qy.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.ronin.provider)}),platforms:["all"],externalUrl:sn.RoninWallet},TG={label:we.OneKey,injectedNamespace:me.OneKey,checkProviderIdentity:({provider:e})=>!!e&&!!e.ethereum&&!!e.ethereum[he.OneKey],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./onekey-CGcUTfNZ.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.$onekey.ethereum)}),platforms:["all"],externalUrl:sn.OneKey},IG={label:we.Fordefi,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Fordefi],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./fordefi-CP4eKV3b.js");return{default:e}},[])).default,getInterface:Nn(he.Fordefi,!0),platforms:["desktop"]},$G={label:we.Coin98Wallet,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Coin98Wallet],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./coin98wallet-BPH2yV6a.js");return{default:e}},[])).default,getInterface:async()=>{const e=window.hasOwnProperty(me.Ethereum);let t;return e&&window[me.Ethereum].isCoin98?t=window[me.Ethereum]:t=window[me.Coin98Wallet].provider,{provider:t}},platforms:["all"],externalUrl:sn.Coin98Wallet},PG={label:we.SubWallet,injectedNamespace:me.SubWallet,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.SubWallet],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./subwallet-DrohCGOh.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.SubWallet)}),platforms:["all"],externalUrl:sn.SubWallet},OG={label:we.Kayros,injectedNamespace:me.Kayros,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Kayros],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./kayros-B17ntheB.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.kayros)}),platforms:["desktop"]},RG={label:we.FoxWallet,injectedNamespace:me.FoxWallet,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.FoxWallet],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./foxwallet-B9w1boRx.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.foxwallet)}),platforms:["mobile"]},LG={label:we.Lif3Wallet,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Lif3Wallet],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./lif3wallet-BMqlF6vP.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.ethereum,{wallet_switchEthereumChain:jt,eth_selectAccounts:jt})}),platforms:["mobile"]},BG={label:we.ZodiacPilot,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.ZodiacPilot],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./zodiacpilot-B8f4M6PL.js");return{default:e}},[])).default,getInterface:async()=>({provider:it(window.ethereum)}),platforms:["desktop"],externalUrl:sn.ZodiacPilot},NG={label:we.StableWallet,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.StableWallet],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./stablewallet-2JDaqGCS.js");return{default:e}},[])).default,getInterface:Nn(he.StableWallet),platforms:["mobile"]},MG={label:we.Echooo,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Echooo],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./echooo-Dk4xaSlo.js");return{default:e}},[])).default,getInterface:Nn(he.Echooo),platforms:["all"],externalUrl:sn.Echooo},jG={label:we.Keplr,injectedNamespace:me.Ethereum,checkProviderIdentity:({provider:e})=>!!e&&!!e[he.Keplr],getIcon:async()=>(await ue(async()=>{const{default:e}=await import("./keplr-CxFTfpRB.js");return{default:e}},[])).default,getInterface:Nn(he.Keplr),platforms:["all"],externalUrl:sn.Keplr},DG=[fG,Nq,Mq,Lq,Kq,Dq,Fq,Uq,Hq,zq,Wq,Vq,qq,Gq,pG,Zq,Xq,jq,Yq,Qq,Jq,eG,tG,nG,rG,iG,oG,sG,aG,lG,cG,uG,dG,hG,mG,gG,yG,vG,wG,EG,bG,xG,_G,SG,Bq,kG,CG,TG,IG,AG,$G,PG,OG,RG,LG,BG,NG,MG,jG],FG=O.object({label:O.string().required(),getIcon:O.function().arity(0).required(),getInterface:O.function().maxArity(1).required(),injectedNamespace:O.string().required(),checkProviderIdentity:O.function().arity(1).required(),platforms:O.array().items(O.string()),externalUrl:O.string()}),UG=O.array().items(FG),HG=O.object().pattern(/\w+/,O.any().allow(O.boolean(),O.array().items(O.string())));O.object({custom:UG,filter:HG,displayUnavailable:[O.boolean(),O.array().items(O.string())],walletUnavailableMessage:O.function(),sort:O.function(),externalUrl:O.string(),disable6963Support:O.boolean()});const zG=O.object({uuid:O.string().required(),name:O.string().required(),icon:O.string().required(),rdns:O.string().required()}),WG=O.object({info:zG.required(),provider:O.object().required()}),VG=e=>Ot(WG,e),qG=({label:e,externalUrl:t})=>t?`Please install or switch to ${e} to continue`:`Please install or enable ${e} to continue`,GG=(e,t,n)=>{var r;return e?t({provider:e,device:n})?!0:!!((r=e.providers)!=null&&r.some(i=>t({provider:i,device:n}))):!1};function KG(e){if(!e)return!1;const t=/)<[^<]*)*<\/script>/gi,n=/\bon[a-z]+\s*=\s*["']?(?:javascript:)?/gi,r=/\b(href|xlink:href)\s*=\s*["']?javascript:/gi;return!!(t.test(e)||n.test(e)||r.test(e))}const lS=[];function ZG(){window.addEventListener("eip6963:announceProvider",e=>{const t=e,{detail:n}=t;if(!n)return;if(t){const a=VG(n);if(a&&a.error)throw a.error}const{info:r,provider:i}=n,{name:o,icon:s}=r;if(KG(s)){console.error(`The icon for injected wallet: ${o} contains executable JavaScript and has been blocked.`);return}lS.push({label:o,getIcon:async()=>s,getInterface:async()=>({provider:i}),platforms:["all"],eip6963Provider:i,checkProviderIdentity:({provider:a})=>!!a})}),window.dispatchEvent(new CustomEvent("eip6963:requestProvider"))}function XG(e){return typeof window>"u"?()=>null:(ZG(),t=>{const{device:n}=t,{custom:r=[],filter:i={},displayUnavailable:o,sort:s,walletUnavailableMessage:a}={},u=Oq([...r,...lS,...DG],({label:d})=>d).reduce((d,c)=>{const{label:f,platforms:m,injectedNamespace:p,checkProviderIdentity:h,eip6963Provider:y}=c,g=i[f],b=g===!1,v=y||window[p],w=GG(v,h,n);let E=!1;Array.isArray(g)&&(g.includes(n.type)||n.os&&g.includes(n.os.name))&&(E=!0),g==="unavailable"&&!w&&(E=!0);const C=!m.includes("all")&&n.type!==null&&!m.includes(n.type)&&!m.includes(n.os.name);return!b&&!E&&!C&&(w||o===!0||Array.isArray(o)&&o.length&&o.includes(c.label))&&d.push((o===!0||Array.isArray(o)&&o.length&&o.includes(c.label))&&!w?{...c,getInterface:async()=>{throw new Error(a?a(c):qG(c))}}:c),d},[]);if(u.length){const d=u.length>1,c=u.filter(f=>{const{label:m}=f;return!(m===we.Detected&&d)}).map(({label:f,getIcon:m,getInterface:p})=>({label:f,getIcon:m,getInterface:p})).sort((f,m)=>f.labelm.label?1:0);return s?s(c):c}return[]})}function YG({supportedWalletType:e="all",darkMode:t=!1,enableMobileWalletLink:n=!1,reloadOnDisconnect:r=!0}={}){return()=>({label:"Coinbase Wallet",getIcon:async()=>(await ue(async()=>{const{default:i}=await import("./icon-C3kbE38r.js");return{default:i}},[])).default,getInterface:async({chains:i,appMetadata:o})=>{(n||r||t)&&console.warn("darkMode, enableMobileWalletLink and reloadOnDisconnect init props are deprecated after version 2.2.7 of @web3-onboard/coinbase");const{name:s,icon:a}=o||{},{default:l}=await ue(async()=>{const{default:E}=await import("./index-C2b3983o.js").then(C=>C.i);return{default:E}},__vite__mapDeps([8,9])),u=l.default?l.default:l,{isHex:d,toHex:c,createEIP1193Provider:f,fromHex:m}=await ue(async()=>{const{isHex:E,toHex:C,createEIP1193Provider:k,fromHex:_}=await import("./index-ANyCsgDC.js");return{isHex:E,toHex:C,createEIP1193Provider:k,fromHex:_}},[]),h=`data:image/svg+xml;base64,${window.btoa(a||"")}`,y=i.map(({id:E})=>m(E,"number")),g=new u({appName:s||"",appLogoUrl:h,appChainIds:y}),b=g.makeWeb3Provider({options:e}),v=b.on.bind(b);b.on=(E,C)=>(v(E,k=>{if(E==="chainChanged"){let _;d(k)?_=k:_=c(k),C(_);return}C(k)}),b);const w=f(b);return w.removeListener=(E,C)=>{},{provider:w,instance:g}}})}const Go={name:"Ether",symbol:"ETH",decimals:18},Bp={name:"Matic",symbol:"MATIC",decimals:18},cS={name:"Celo",symbol:"CELO",decimals:18},uS={name:"Binance Coin",symbol:"BNB",decimals:18},QG={name:"Fuse",symbol:"FUSE",decimals:18},JG={name:"Spark",symbol:"SPARK",decimals:18},eK={1:{urls:["https://eth.llamarpc.com"],nativeCurrency:Go,name:"Mainnet",blockExplorerUrls:["https://etherscan.io"]},56:{urls:["https://bsc-dataseed.binance.org/"],nativeCurrency:uS,name:"BNB Mainnet",blockExplorerUrls:["https://bscscan.com"]},1101:{urls:["https://rpc.polygon-zkevm.gateway.fm"],nativeCurrency:Bp,name:"Polygon zkEVM Mainnet",blockExplorerUrls:["https://zkevm.polygonscan.com/"]},10:{urls:["https://mainnet.optimism.io"],name:"Optimism",nativeCurrency:Go,blockExplorerUrls:["https://optimistic.etherscan.io"]},42161:{urls:["https://arb1.arbitrum.io/rpc"],name:"Arbitrum One",nativeCurrency:Go,blockExplorerUrls:["https://arbiscan.io"]},137:{urls:["https://polygon-rpc.com"],name:"Polygon Mainnet",nativeCurrency:Bp,blockExplorerUrls:["https://polygonscan.com"]},42220:{urls:["https://forno.celo.org"],name:"Celo",nativeCurrency:cS,blockExplorerUrls:["https://explorer.celo.org"]},122:{urls:["https://rpc.fuse.io"],name:"Fuse Mainnet",nativeCurrency:QG,blockExplorerUrls:["https://explorer.fuse.io/"]},7560:{name:"Cyber Mainnet",urls:["https://cyber.alt.technology/"],nativeCurrency:Go,blockExplorerUrls:["https://cyberscan.co/"]}},tK={11155111:{urls:["https://eth-sepolia.public.blastapi.io"],nativeCurrency:Go,name:"Sepolia",blockExplorerUrls:["https://sepolia.etherscan.io"]},11155420:{urls:["https://sepolia.optimism.io"],name:"Optimism Sepolia",nativeCurrency:Go,blockExplorerUrls:["https://sepolia-optimistic.etherscan.io"]},421614:{urls:["https://sepolia-rollup.arbitrum.io/rpc"],name:"Arbitrum Sepolia",nativeCurrency:Go,blockExplorerUrls:["https://sepolia.arbiscan.io/"]},80002:{urls:["https://polygon-amoy-bor-rpc.publicnode.com"],name:"Polygon Amoy",nativeCurrency:Bp,blockExplorerUrls:["https://www.oklink.com/amoy"]},44787:{urls:["https://alfajores-forno.celo-testnet.org"],name:"Celo Alfajores",nativeCurrency:cS,blockExplorerUrls:["https://alfajores-blockscout.celo-testnet.org"]},97:{name:"BNB Testnet",urls:["https://data-seed-prebsc-1-s1.binance.org:8545"],nativeCurrency:uS,blockExplorerUrls:[]},2442:{name:"Polygon zkEVM Testnet",urls:["https://rpc.cardona.zkevm-rpc.com"],nativeCurrency:Bp,blockExplorerUrls:["https://cardona-zkevm.polygonscan.com/"]},123:{name:"Fuse Testnet",urls:["https://rpc.fusespark.io"],nativeCurrency:JG,blockExplorerUrls:["https://explorer.fusespark.io/"]},111557560:{name:"Cyber Testnet",urls:["https://cyber-testnet.alt.technology/"],nativeCurrency:Go,blockExplorerUrls:["https://testnet.cyberscan.co/"]}},gy={...eK,...tK};Object.keys(gy).reduce((e,t)=>{const n=gy[Number(t)].urls;return n.length&&(e[Number(t)]=n),e},{});const nK=()=>{const e=[];return ps.ALLOWED_NETWORKS.forEach(t=>{const n=gy[t];e.push({id:Te(t),label:n.name,rpcUrl:n.urls[0],token:n.nativeCurrency.symbol})}),e},rK=O.object({handleUri:O.func().optional(),version:O.number().optional().custom((e,t)=>{if(e===1)console.warn("Version 1 of WalletConnect has been fully deprecated. This version of @web3-onboard/walletconnect only supports version 2");else if(e!==2&&e!==void 0)return t.error("any.invalid",{message:"Invalid version number. This version of @web3-onboard/walletconnect only supports version 2"});return e},"Custom version validation"),projectId:O.string().messages({"any.required":"WalletConnect version 2 requires a projectId. Please visit https://cloud.walletconnect.com to get one."}),dappUrl:O.string().optional().custom((e,t)=>e||t.message({message:"It is strongly recommended to supply a dappUrl as it is required by some wallets (i.e. MetaMask) to allow connection.",type:"any.custom"}),"Custom dappUrl validation"),requiredChains:O.array().items(O.number()).optional(),optionalChains:O.array().items(O.number()).optional(),qrModalOptions:O.object().optional(),additionalRequiredMethods:O.array().items(O.string()).optional(),additionalOptionalMethods:O.array().items(O.string()).optional()}),iK=(e,t)=>{const n=e.validate(t);return n.error?n:null},oK=e=>iK(rK,e),p3=["eth_sendTransaction","eth_signTransaction","personal_sign","eth_sign","eth_signTypedData","eth_signTypedData_v4","wallet_addEthereumChain","wallet_switchEthereumChain"];function sK(e){if(!e.projectId)throw new Error("WalletConnect requires a projectId. Please visit https://cloud.walletconnect.com to get one.");e.dappUrl||console.warn("It is strongly recommended to supply a dappUrl to the WalletConnect init object as it is required by some wallets (i.e. MetaMask) to allow connection.");const{projectId:t,handleUri:n,requiredChains:r,optionalChains:i,qrModalOptions:o,additionalRequiredMethods:s,additionalOptionalMethods:a,dappUrl:l}=e;let u;return()=>({label:"WalletConnect",getIcon:async()=>(await ue(async()=>{const{default:d}=await import("./icon-CKT6anLG.js");return{default:d}},[])).default,getInterface:async({chains:d,EventEmitter:c,appMetadata:f})=>{const{ProviderRpcError:m,ProviderRpcErrorCode:p}=await ue(async()=>{const{ProviderRpcError:N,ProviderRpcErrorCode:R}=await import("./index-ANyCsgDC.js");return{ProviderRpcError:N,ProviderRpcErrorCode:R}},[]),{default:h,REQUIRED_METHODS:y}=await ue(async()=>{const{default:N,REQUIRED_METHODS:R}=await import("./index.es-DEtxasS7.js");return{default:N,REQUIRED_METHODS:R}},__vite__mapDeps([10,9])),{Subject:g,fromEvent:b}=await ue(async()=>{const{Subject:N,fromEvent:R}=await import("./index-CmFE4F7-.js");return{Subject:N,fromEvent:R}},__vite__mapDeps([6,7])),{takeUntil:v,take:w}=await ue(async()=>{const{takeUntil:N,take:R}=await import("./index-D6EKpZiz.js").then(B=>B.i);return{takeUntil:N,take:R}},[]),E=()=>{if(!f)return;const N=l||f.explore||"";!N&&!N.length&&console.warn("It is strongly recommended to supply a dappUrl as it is required by some wallets (i.e. MetaMask) to allow connection.");const R={name:f.name,description:f.description||"",url:N,icons:[]};return f.icon!==void 0&&f.icon.length&&(R.icons=[f.icon]),f.logo!==void 0&&f.logo.length&&(R.icons=R.icons.length?[...R.icons,f.logo]:[f.logo]),R},C=Array.isArray(r)&&r.length&&r.every(N=>!isNaN(N))?r.map(N=>parseInt(N)):[],k=Array.isArray(i)&&i.length&&i.every(N=>!isNaN(N))?i.map(N=>parseInt(N)):d.map(({id:N})=>parseInt(N,16)),_=new Set(s&&Array.isArray(s)?[...s,...y]:y),S=Array.from(_),A=a&&Array.isArray(a)?[...a,...p3]:p3,I=await h.init({projectId:t,chains:C,methods:S,optionalChains:k,optionalMethods:A,showQrModal:!0,rpcMap:d.map(({id:N,rpcUrl:R})=>({id:N,rpcUrl:R})).reduce((N,{id:R,rpcUrl:B})=>(N[parseInt(R,16)]=B||"",N),{}),metadata:E(),qrModalOptions:o}),L=new c;class F{constructor({connector:R,chains:B}){this.emit=L.emit.bind(L),this.on=L.on.bind(L),this.removeListener=L.removeListener.bind(L),this.connector=R,this.chains=B,this.disconnected$=new g,b(this.connector,"accountsChanged",j=>j).pipe(v(this.disconnected$)).subscribe({next:j=>{const W=Array.isArray(j)?j:[j];this.emit("accountsChanged",W)},error:console.warn}),b(this.connector,"chainChanged",j=>j).pipe(v(this.disconnected$)).subscribe({next:j=>{const W=fg(j)?j:`0x${j.toString(16)}`;this.emit("chainChanged",W)},error:console.warn}),b(this.connector,"session_delete",j=>j).pipe(v(this.disconnected$)).subscribe({next:()=>{this.emit("accountsChanged",[]),this.disconnected$.next(!0),typeof localStorage<"u"&&localStorage.removeItem("walletconnect")},error:console.warn}),this.disconnect=()=>{this.connector.session&&(this.connector.disconnect(),u=null)},e&&n&&b(this.connector,"display_uri",j=>j).pipe(v(this.disconnected$)).subscribe(async j=>{try{n&&await n(j)}catch(W){throw`An error occurred when handling the URI. Error: ${W}`}}),(()=>{const j=this.connector.session;u=j,j&&(this.emit("accountsChanged",this.connector.accounts),this.emit("chainChanged",this.connector.chainId))})(),this.request=async({method:j,params:W})=>{if(j==="eth_chainId")return fg(this.connector.chainId)?this.connector.chainId:`0x${this.connector.chainId.toString(16)}`;if(j==="eth_requestAccounts")return new Promise(async(Y,te)=>{if(b(this.connector,"connect",ae=>ae).pipe(w(1)).subscribe({next:({chainId:ae})=>{this.emit("accountsChanged",this.connector.accounts);const Z=fg(ae)?ae:`0x${ae.toString(16)}`;this.emit("chainChanged",Z),Y(this.connector.accounts)},error:te}),!this.connector.session)await this.connector.connect().catch(ae=>{console.error("err creating new session: ",ae),te(new m({code:4001,message:"User rejected the request."}))});else{const ae=this.connector.accounts,Z=this.connector.chainId;u=this.connector.session;const pe=`0x${Z.toString(16)}`;return this.emit("chainChanged",pe),Y(ae)}});if(j==="eth_selectAccounts")throw new m({code:p.UNSUPPORTED_METHOD,message:`The Provider does not support the requested method: ${j}`});if(j=="wallet_switchEthereumChain"){if(!W)throw new m({code:p.INVALID_PARAMS,message:"The Provider requires a chainId to be passed in as an argument"});const Y=W[0];if(!Y.hasOwnProperty("chainId")||typeof Y.chainId>"u")throw new m({code:p.INVALID_PARAMS,message:"The Provider requires a chainId to be passed in as an argument"});return this.connector.request({method:"wallet_switchEthereumChain",params:[{chainId:Y.chainId}]})}return this.connector.request({method:j,params:W})}}}return{provider:new F({chains:d,connector:I}),instance:u}}})}const fg=e=>!(typeof e!="string"||!e.match(/^0x[0-9A-Fa-f]*$/));function aK(e){if(!e)throw new Error("WalletConnect requires an initialization object to be passed - see the official docs for an example: https://onboard.blocknative.com/docs/wallets/walletconnect");if(e){const t=oK(e);if(t)throw t}return sK(e)}const lK={projectId:"a9782e50cde6e67b10c297f1834e43ea",requiredChains:[ps.DEFAULT_CHAIN],optionalChains:ps.ALLOWED_NETWORKS,version:2},cK=aK(lK),m3="/push-keys/assets/PushBlocknativeLogo-CCspGNrV.svg",uK=XG(),fK=YG(),dK=nK(),hK=mq({appMetadata:{name:ps.APP_NAME,icon:m3,logo:m3,description:"The Communication Protocol of Web3",explore:"https://app.push.org"},accountCenter:{desktop:{enabled:!1},mobile:{enabled:!1}},connect:{showSidebar:!0,autoConnectLastWallet:!0,removeWhereIsMyWalletWarning:!0,removeIDontHaveAWalletInfoLink:!0,disableClose:!1},containerElements:{},wallets:[uK,cK,fK],chains:dK,theme:"system"});dg.createRoot(document.getElementById("root")).render(fe.jsx(C3.StrictMode,{children:fe.jsx(gq,{web3Onboard:hK,children:fe.jsx($q,{})})}));export{xi as $,JK as A,rZ as B,Re as C,QK as D,He as E,Ka as F,ye as G,CU as H,eH as I,Es as J,uZ as K,pH as L,tt as M,Rn as N,L_ as O,pZ as P,mZ as Q,Ei as R,Gt as S,Cp as T,mH as U,fH as V,Hf as W,J9 as X,jf as Y,iw as Z,fn as _,Vt as a,FF as a$,hZ as a0,nZ as a1,lH as a2,bz as a3,KK as a4,Qv as a5,Pp as a6,aZ as a7,GK as a8,pd as a9,ju as aA,F9 as aB,fZ as aC,lg as aD,XK as aE,__ as aF,n9 as aG,tZ as aH,Ta as aI,b_ as aJ,it as aK,rU as aL,Z7 as aM,K7 as aN,iU as aO,oU as aP,nU as aQ,H7 as aR,jK as aS,ly as aT,Ot as aU,Nv as aV,Mv as aW,aU as aX,q7 as aY,FK as aZ,gc as a_,d7 as aa,k9 as ab,ow as ac,Rz as ad,dZ as ae,is as af,jr as ag,cz as ah,ZK as ai,eZ as aj,O_ as ak,iZ as al,lZ as am,YK as an,Ea as ao,vc as ap,Fv as aq,ec as ar,bc as as,sZ as at,sH as au,oZ as av,cZ as aw,Q9 as ax,zU as ay,I_ as az,ve as b,nj as b$,UF as b0,HF as b1,W7 as b2,RK as b3,YF as b4,R0 as b5,QF as b6,JF as b7,DK as b8,GF as b9,Sa as bA,mK as bB,br as bC,io as bD,x_ as bE,cy as bF,Dv as bG,jv as bH,vU as bI,E_ as bJ,zK as bK,dU as bL,bU as bM,_U as bN,Q7 as bO,gU as bP,VK as bQ,qK as bR,UK as bS,HK as bT,WK as bU,pU as bV,mU as bW,Y7 as bX,hU as bY,QE as bZ,PK as b_,V7 as ba,Bv as bb,ZF as bc,G7 as bd,eU as be,Lv as bf,zF as bg,WF as bh,VF as bi,yc as bj,DF as bk,jF as bl,tU as bm,v_ as bn,Ih as bo,J as bp,Ub as bq,hn as br,pR as bs,Qb as bt,_0 as bu,ro as bv,uc as bw,Bu as bx,Er as by,ue as bz,U as c,Tr as c0,Sj as c1,bj as c2,On as c3,Sv as c4,ao as c5,tj as c6,T0 as c7,Ev as c8,mp as c9,pi as cA,ms as cB,Y1 as cC,YE as cD,Ar as cE,kr as cF,I0 as ca,Lf as cb,vj as cc,ej as cd,Ym as ce,e_ as cf,Cj as cg,Q1 as ch,f7 as ci,yj as cj,KE as ck,kj as cl,Lj as cm,Zl as cn,md as co,Jm as cp,Av as cq,l7 as cr,Iv as cs,J1 as ct,c7 as cu,n_ as cv,Tv as cw,Bf as cx,h7 as cy,Kr as cz,oe as d,K as e,H as f,mt as g,ie as h,qt as i,gt as j,re as k,qn as l,xe as m,mi as n,vi as o,wt as p,C9 as q,ze as r,Wt as s,X as t,De as u,Fe as v,D9 as w,ee as x,ct as y,tw as z}; diff --git a/assets/index-CdPQs6F4.js b/assets/index-C9Hr7owJ.js similarity index 94% rename from assets/index-CdPQs6F4.js rename to assets/index-C9Hr7owJ.js index e044fb7..dd2b70f 100644 --- a/assets/index-CdPQs6F4.js +++ b/assets/index-C9Hr7owJ.js @@ -1 +1 @@ -import{a_ as i,a$ as n,b0 as b,b2 as c,b1 as T,b3 as d,b4 as l,b9 as m,ba as f,aY as x,bd as p,be as E,aT as h,aZ as B,bf as g,bg as y,b5 as H,bh as u,bi as I,aR as S,b6 as v,bb as z,bj as k,bk as C,bl as O,aQ as R,bm as A,bn as L,b7 as U,bc as w,b8 as P,aS as q,bo as F}from"./index-BwZaYMab.js";import{F as j,a as G,I as K,b as N,c as D,d as J,T as M,q as Q,s as Y,u as Z,v as _,y as $,E as W,w as X,x as aa,B as sa,e as ea,C as ra,h as oa,j as ta,l as ia,f as na,D as ba,g as ca,i as Ta,k as da,n as la,o as ma,G as fa,H as xa,m as pa,r as Ea,K as ha,L as Ba,J as ga,M as ya,N as Ha,O as ua,z as Ia,A as Sa,p as va,t as za}from"./number-CDau7Bsv.js";function r({chains:a,id:s}){return a.find(e=>e.id===s)}export{i as BaseError,j as FeeCapTooHighError,n as IntegerOutOfRangeError,G as InvalidAddressError,K as InvalidChainIdError,b as InvalidHexBooleanError,N as InvalidLegacyVError,D as InvalidSerializableTransactionError,J as InvalidStorageKeySizeError,c as SizeExceedsPaddingSizeError,T as SizeOverflowError,d as SliceOffsetOutOfBoundsError,M as TipAboveFeeCapError,Q as assertTransactionEIP1559,Y as assertTransactionEIP2930,Z as assertTransactionLegacy,_ as blobsToCommitments,$ as blobsToProofs,l as boolToBytes,m as boolToHex,f as bytesToHex,W as checksumAddress,X as commitmentToVersionedHash,aa as commitmentsToVersionedHashes,sa as concatHex,ea as defineBlock,ra as defineChain,oa as defineTransaction,ta as defineTransactionReceipt,ia as defineTransactionRequest,x as etherUnits,r as extractChain,na as formatBlock,p as formatEther,ba as formatGwei,ca as formatLog,Ta as formatTransaction,da as formatTransactionReceipt,la as formatTransactionRequest,E as formatUnits,h as fromHex,ma as getTransactionType,B as gweiUnits,g as hexToBigInt,y as hexToBool,H as hexToBytes,u as hexToNumber,I as hexToString,fa as isAddress,S as isHex,xa as keccak256,pa as maxUint16,v as numberToBytes,z as numberToHex,k as pad,C as padBytes,O as padHex,R as parseEther,A as parseUnits,Ea as rpcTransactionType,ha as serializeAccessList,Ba as serializeTransaction,ga as sha256,L as size,ya as slice,Ha as sliceBytes,ua as sliceHex,U as stringToBytes,w as stringToHex,Ia as toBlobSidecars,Sa as toBlobs,P as toBytes,q as toHex,va as toRlp,za as transactionType,F as trim}; +import{a_ as i,a$ as n,b0 as b,b2 as c,b1 as T,b3 as d,b4 as l,b9 as m,ba as f,aY as x,bd as p,be as E,aT as h,aZ as B,bf as g,bg as y,b5 as H,bh as u,bi as I,aR as S,b6 as v,bb as z,bj as k,bk as C,bl as O,aQ as R,bm as A,bn as L,b7 as U,bc as w,b8 as P,aS as q,bo as F}from"./index-C6UBXeMY.js";import{F as j,a as G,I as K,b as N,c as D,d as J,T as M,q as Q,s as Y,u as Z,v as _,y as $,E as W,w as X,x as aa,B as sa,e as ea,C as ra,h as oa,j as ta,l as ia,f as na,D as ba,g as ca,i as Ta,k as da,n as la,o as ma,G as fa,H as xa,m as pa,r as Ea,K as ha,L as Ba,J as ga,M as ya,N as Ha,O as ua,z as Ia,A as Sa,p as va,t as za}from"./number-C2Dy0LFJ.js";function r({chains:a,id:s}){return a.find(e=>e.id===s)}export{i as BaseError,j as FeeCapTooHighError,n as IntegerOutOfRangeError,G as InvalidAddressError,K as InvalidChainIdError,b as InvalidHexBooleanError,N as InvalidLegacyVError,D as InvalidSerializableTransactionError,J as InvalidStorageKeySizeError,c as SizeExceedsPaddingSizeError,T as SizeOverflowError,d as SliceOffsetOutOfBoundsError,M as TipAboveFeeCapError,Q as assertTransactionEIP1559,Y as assertTransactionEIP2930,Z as assertTransactionLegacy,_ as blobsToCommitments,$ as blobsToProofs,l as boolToBytes,m as boolToHex,f as bytesToHex,W as checksumAddress,X as commitmentToVersionedHash,aa as commitmentsToVersionedHashes,sa as concatHex,ea as defineBlock,ra as defineChain,oa as defineTransaction,ta as defineTransactionReceipt,ia as defineTransactionRequest,x as etherUnits,r as extractChain,na as formatBlock,p as formatEther,ba as formatGwei,ca as formatLog,Ta as formatTransaction,da as formatTransactionReceipt,la as formatTransactionRequest,E as formatUnits,h as fromHex,ma as getTransactionType,B as gweiUnits,g as hexToBigInt,y as hexToBool,H as hexToBytes,u as hexToNumber,I as hexToString,fa as isAddress,S as isHex,xa as keccak256,pa as maxUint16,v as numberToBytes,z as numberToHex,k as pad,C as padBytes,O as padHex,R as parseEther,A as parseUnits,Ea as rpcTransactionType,ha as serializeAccessList,Ba as serializeTransaction,ga as sha256,L as size,ya as slice,Ha as sliceBytes,ua as sliceHex,U as stringToBytes,w as stringToHex,Ia as toBlobSidecars,Sa as toBlobs,P as toBytes,q as toHex,va as toRlp,za as transactionType,F as trim}; diff --git a/assets/index-DvN7N4_1.js b/assets/index-CmFE4F7-.js similarity index 85% rename from assets/index-DvN7N4_1.js rename to assets/index-CmFE4F7-.js index f64d4a4..bafca62 100644 --- a/assets/index-DvN7N4_1.js +++ b/assets/index-CmFE4F7-.js @@ -1 +1 @@ -import{bZ as t,b_ as n,b$ as o,c0 as i,c1 as u,c2 as b}from"./index-BwZaYMab.js";import{a9 as d,cc as f,cd as g,c3 as v,c6 as S,c5 as y,c8 as E,c7 as j,ce as k,cf as U,cl as x,ck as O,cg as w,aa as F,cm as M,cn as T,cb as A,ch as C,ci as P,ca as R,co as q,cp as B,cq as I,c9 as K,c4 as L,cr as N,cs as V,cj as W,ct as Y,o as Z,n as $,cu as z,cv as D,cw as G,cx as H,cy as J}from"./index-BwZaYMab.js";import{S as X,a as _,d as aa,s as sa}from"./index-6w8_iIHZ.js";function m(){for(var a=[],s=0;si.map(i=>d[i]); +import{bz as fe}from"./index-C6UBXeMY.js";const me=Symbol(),ee=Object.getPrototypeOf,G=new WeakMap,he=e=>e&&(G.has(e)?G.get(e):ee(e)===Object.prototype||ee(e)===Array.prototype),ge=e=>he(e)&&e[me]||null,te=(e,t=!0)=>{G.set(e,t)},z={BASE_URL:"/push-keys/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_APP_ENV:"dev",VITE_APP_WALLETCONNECT_PROJECT_ID:"a9782e50cde6e67b10c297f1834e43ea"},q=e=>typeof e=="object"&&e!==null,A=new WeakMap,x=new WeakSet,be=(e=Object.is,t=(n,g)=>new Proxy(n,g),s=n=>q(n)&&!x.has(n)&&(Array.isArray(n)||!(Symbol.iterator in n))&&!(n instanceof WeakMap)&&!(n instanceof WeakSet)&&!(n instanceof Error)&&!(n instanceof Number)&&!(n instanceof Date)&&!(n instanceof String)&&!(n instanceof RegExp)&&!(n instanceof ArrayBuffer),r=n=>{switch(n.status){case"fulfilled":return n.value;case"rejected":throw n.reason;default:throw n}},l=new WeakMap,c=(n,g,I=r)=>{const y=l.get(n);if((y==null?void 0:y[0])===g)return y[1];const v=Array.isArray(n)?[]:Object.create(Object.getPrototypeOf(n));return te(v,!0),l.set(n,[g,v]),Reflect.ownKeys(n).forEach(D=>{if(Object.getOwnPropertyDescriptor(v,D))return;const O=Reflect.get(n,D),M={value:O,enumerable:!0,configurable:!0};if(x.has(O))te(O,!1);else if(O instanceof Promise)delete M.value,M.get=()=>I(O);else if(A.has(O)){const[b,H]=A.get(O);M.value=c(b,H(),I)}Object.defineProperty(v,D,M)}),Object.preventExtensions(v)},m=new WeakMap,f=[1,1],W=n=>{if(!q(n))throw new Error("object required");const g=m.get(n);if(g)return g;let I=f[0];const y=new Set,v=(i,a=++f[0])=>{I!==a&&(I=a,y.forEach(o=>o(i,a)))};let D=f[1];const O=(i=++f[1])=>(D!==i&&!y.size&&(D=i,b.forEach(([a])=>{const o=a[1](i);o>I&&(I=o)})),I),M=i=>(a,o)=>{const h=[...a];h[1]=[i,...h[1]],v(h,o)},b=new Map,H=(i,a)=>{if((z?"production":void 0)!=="production"&&b.has(i))throw new Error("prop listener already exists");if(y.size){const o=a[3](M(i));b.set(i,[a,o])}else b.set(i,[a])},Z=i=>{var a;const o=b.get(i);o&&(b.delete(i),(a=o[1])==null||a.call(o))},ue=i=>(y.add(i),y.size===1&&b.forEach(([o,h],S)=>{if((z?"production":void 0)!=="production"&&h)throw new Error("remove already exists");const T=o[3](M(S));b.set(S,[o,T])}),()=>{y.delete(i),y.size===0&&b.forEach(([o,h],S)=>{h&&(h(),b.set(S,[o]))})}),J=Array.isArray(n)?[]:Object.create(Object.getPrototypeOf(n)),V=t(J,{deleteProperty(i,a){const o=Reflect.get(i,a);Z(a);const h=Reflect.deleteProperty(i,a);return h&&v(["delete",[a],o]),h},set(i,a,o,h){const S=Reflect.has(i,a),T=Reflect.get(i,a,h);if(S&&(e(T,o)||m.has(o)&&e(T,m.get(o))))return!0;Z(a),q(o)&&(o=ge(o)||o);let $=o;if(o instanceof Promise)o.then(C=>{o.status="fulfilled",o.value=C,v(["resolve",[a],C])}).catch(C=>{o.status="rejected",o.reason=C,v(["reject",[a],C])});else{!A.has(o)&&s(o)&&($=W(o));const C=!x.has($)&&A.get($);C&&H(a,C)}return Reflect.set(i,a,$,h),v(["set",[a],o,T]),!0}});m.set(n,V);const pe=[J,O,c,ue];return A.set(V,pe),Reflect.ownKeys(n).forEach(i=>{const a=Object.getOwnPropertyDescriptor(n,i);"value"in a&&(V[i]=n[i],delete a.value,delete a.writable),Object.defineProperty(J,i,a)}),V})=>[W,A,x,e,t,s,r,l,c,m,f],[ye]=be();function j(e={}){return ye(e)}function U(e,t,s){const r=A.get(e);(z?"production":void 0)!=="production"&&!r&&console.warn("Please use proxy object");let l;const c=[],m=r[3];let f=!1;const n=m(g=>{c.push(g),l||(l=Promise.resolve().then(()=>{l=void 0,f&&t(c.splice(0))}))});return f=!0,()=>{f=!1,n()}}function ve(e,t){const s=A.get(e);(z?"production":void 0)!=="production"&&!s&&console.warn("Please use proxy object");const[r,l,c]=s;return c(r,l(),t)}const d=j({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),de={state:d,subscribe(e){return U(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=de.state.data)==null?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},we=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),u=j({enabled:we,userSessionId:"",events:[],connectedWalletId:void 0}),Ie={state:u,subscribe(e){return U(u.events,()=>e(ve(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)}}},E=j({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),w={state:E,subscribe(e){return U(E,()=>e(E))},setChains(e){E.chains=e},setWalletConnectUri(e){E.walletConnectUri=e},setIsCustomDesktop(e){E.isCustomDesktop=e},setIsCustomMobile(e){E.isCustomMobile=e},setIsDataLoaded(e){E.isDataLoaded=e},setIsUiLoaded(e){E.isUiLoaded=e},setIsAuth(e){E.isAuth=e}},B=j({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}),N={state:B,subscribe(e){return U(B,()=>e(B))},setConfig(e){var t,s;Ie.initialize(),w.setChains(e.chains),w.setIsAuth(!!e.enableAuthMode),w.setIsCustomMobile(!!((t=e.mobileWallets)!=null&&t.length)),w.setIsCustomDesktop(!!((s=e.desktopWallets)!=null&&s.length)),p.setModalVersionInStorage(),Object.assign(B,e)}};var Ee=Object.defineProperty,se=Object.getOwnPropertySymbols,Le=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,ne=(e,t,s)=>t in e?Ee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,We=(e,t)=>{for(var s in t||(t={}))Le.call(t,s)&&ne(e,s,t[s]);if(se)for(var s of se(t))Oe.call(t,s)&&ne(e,s,t[s]);return e};const Q="https://explorer-api.walletconnect.com",X="wcm",Y="js-2.6.2";async function K(e,t){const s=We({sdkType:X,sdkVersion:Y},t),r=new URL(e,Q);return r.searchParams.append("projectId",N.state.projectId),Object.entries(s).forEach(([l,c])=>{c&&r.searchParams.append(l,String(c))}),(await fetch(r)).json()}const P={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`${Q}/w3m/v1/getWalletImage/${e}?projectId=${N.state.projectId}&sdkType=${X}&sdkVersion=${Y}`},getAssetImageUrl(e){return`${Q}/w3m/v1/getAssetImage/${e}?projectId=${N.state.projectId}&sdkType=${X}&sdkVersion=${Y}`}};var Ce=Object.defineProperty,oe=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,re=(e,t,s)=>t in e?Ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Me=(e,t)=>{for(var s in t||(t={}))Ae.call(t,s)&&re(e,s,t[s]);if(oe)for(var s of oe(t))je.call(t,s)&&re(e,s,t[s]);return e};const ae=p.isMobile(),L=j({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),Re={state:L,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=N.state;if(e==="NONE"||t==="ALL"&&!e)return L.recomendedWallets;if(p.isArray(e)){const s={recommendedIds:e.join(",")},{listings:r}=await P.getAllListings(s),l=Object.values(r);l.sort((c,m)=>{const f=e.indexOf(c.id),W=e.indexOf(m.id);return f-W}),L.recomendedWallets=l}else{const{chains:s,isAuth:r}=w.state,l=s==null?void 0:s.join(","),c=p.isArray(t),m={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}=ae?await P.getMobileListings(m):await P.getDesktopListings(m);L.recomendedWallets=Object.values(f)}return L.recomendedWallets},async getWallets(e){const t=Me({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:r}=N.state,{recomendedWallets:l}=L;if(r==="ALL")return L.wallets;l.length?t.excludedIds=l.map(I=>I.id).join(","):p.isArray(s)&&(t.excludedIds=s.join(",")),p.isArray(r)&&(t.excludedIds=[t.excludedIds,r].filter(Boolean).join(",")),w.state.isAuth&&(t.sdks="auth_v1");const{page:c,search:m}=e,{listings:f,total:W}=ae?await P.getMobileListings(t):await P.getDesktopListings(t),n=Object.values(f),g=m?"search":"wallets";return L[g]={listings:[...L[g].listings,...n],total:W,page:c??1},{listings:n,total:W}},getWalletImageUrl(e){return P.getWalletImageUrl(e)},getAssetImageUrl(e){return P.getAssetImageUrl(e)},resetSearch(){L.search={listings:[],total:0,page:1}}},k=j({open:!1}),F={state:k,subscribe(e){return U(k,()=>e(k))},async open(e){return new Promise(t=>{const{isUiLoaded:s,isDataLoaded:r}=w.state;if(p.removeWalletConnectDeepLink(),w.setWalletConnectUri(e==null?void 0:e.uri),w.setChains(e==null?void 0:e.chains),de.reset("ConnectWallet"),s&&r)k.open=!0,t();else{const l=setInterval(()=>{const c=w.state;c.isUiLoaded&&c.isDataLoaded&&(clearInterval(l),k.open=!0,t())},200)}})},close(){k.open=!1}};var Pe=Object.defineProperty,ie=Object.getOwnPropertySymbols,_e=Object.prototype.hasOwnProperty,Ue=Object.prototype.propertyIsEnumerable,le=(e,t,s)=>t in e?Pe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,De=(e,t)=>{for(var s in t||(t={}))_e.call(t,s)&&le(e,s,t[s]);if(ie)for(var s of ie(t))Ue.call(t,s)&&le(e,s,t[s]);return e};function Se(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const R=j({themeMode:Se()?"dark":"light"}),ce={state:R,subscribe(e){return U(R,()=>e(R))},setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(R.themeMode=t),s&&(R.themeVariables=De({},s))}},_=j({open:!1,message:"",variant:"success"}),Ve={state:_,subscribe(e){return U(_,()=>e(_))},openToast(e,t){_.open=!0,_.message=e,_.variant=t},closeToast(){_.open=!1}};class ke{constructor(t){this.openModal=F.open,this.closeModal=F.close,this.subscribeModal=F.subscribe,this.setTheme=ce.setThemeConfig,ce.setThemeConfig(t),N.setConfig(t),this.initUi()}async initUi(){if(typeof window<"u"){await fe(()=>import("./index-DBR7Q1I_.js"),__vite__mapDeps([0,1,2]));const t=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",t),w.setIsUiLoaded(!0)}}}const $e=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:ke},Symbol.toStringTag,{value:"Module"}));export{Ie as R,de as T,p as a,$e as i,ce as n,Ve as o,w as p,F as s,Re as t,N as y}; diff --git a/assets/index-DkX1LEPK.js b/assets/index-uqrbdLfT.js similarity index 99% rename from assets/index-DkX1LEPK.js rename to assets/index-uqrbdLfT.js index 296f912..2bc4f00 100644 --- a/assets/index-DkX1LEPK.js +++ b/assets/index-uqrbdLfT.js @@ -1,4 +1,4 @@ -import{bD as B,bE as U,bF as ne,bG as Se,bH as kn,bI as F,bJ as Fe,bK as zr,bL as Ae,bM as uo,bN as fo,bO as H,bP as tt,bQ as lo,bR as pe,bS as ho,bT as vt,bU as cr,bz as bo}from"./index-BwZaYMab.js";import{bV as Cu,bX as ju,bW as Ru,bY as Lu}from"./index-BwZaYMab.js";function po(e,t){const n=e.exec(t);return n==null?void 0:n.groups}const ur=/^tuple(?(\[(\d*)\])*)$/;function an(e){let t=e.type;if(ur.test(e.type)&&"components"in e){t="(";const n=e.components.length;for(let s=0;s{var s,o;return((s=e[t.name])==null?void 0:s.call(e,r))??((o=e[n])==null?void 0:o.call(e,r))??t(e,r)}}function ue(e,{includeName:t=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new $o(e.type);return`${e.name}(${Rt(e.inputs,{includeName:t})})`}function Rt(e,{includeName:t=!1}={}){return e?e.map(n=>yo(n,{includeName:t})).join(t?", ":","):""}function yo(e,{includeName:t}){return e.type.startsWith("tuple")?`(${Rt(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}class mo extends B{constructor({docsPath:t}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(` +import{bD as B,bE as U,bF as ne,bG as Se,bH as kn,bI as F,bJ as Fe,bK as zr,bL as Ae,bM as uo,bN as fo,bO as H,bP as tt,bQ as lo,bR as pe,bS as ho,bT as vt,bU as cr,bz as bo}from"./index-C6UBXeMY.js";import{bV as Cu,bX as ju,bW as Ru,bY as Lu}from"./index-C6UBXeMY.js";function po(e,t){const n=e.exec(t);return n==null?void 0:n.groups}const ur=/^tuple(?(\[(\d*)\])*)$/;function an(e){let t=e.type;if(ur.test(e.type)&&"components"in e){t="(";const n=e.components.length;for(let s=0;s{var s,o;return((s=e[t.name])==null?void 0:s.call(e,r))??((o=e[n])==null?void 0:o.call(e,r))??t(e,r)}}function ue(e,{includeName:t=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new $o(e.type);return`${e.name}(${Rt(e.inputs,{includeName:t})})`}function Rt(e,{includeName:t=!1}={}){return e?e.map(n=>yo(n,{includeName:t})).join(t?", ":","):""}function yo(e,{includeName:t}){return e.type.startsWith("tuple")?`(${Rt(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}class mo extends B{constructor({docsPath:t}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(` `),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorNotFoundError"})}}class fr extends B{constructor({docsPath:t}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(` `),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorParamsNotFoundError"})}}class Ur extends B{constructor({data:t,params:n,size:r}){super([`Data size of ${r} bytes is too small for given parameters.`].join(` `),{metaMessages:[`Params: (${Rt(n,{includeName:!0})})`,`Data: ${t} (${r} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t,this.params=n,this.size=r}}class Lt extends B{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingZeroDataError"})}}class wo extends B{constructor({expectedLength:t,givenLength:n,type:r}){super([`ABI encoding array length mismatch for type ${r}.`,`Expected length: ${t}`,`Given length: ${n}`].join(` diff --git a/assets/index.es-IxFjqeYu.js b/assets/index.es-DEtxasS7.js similarity index 99% rename from assets/index.es-IxFjqeYu.js rename to assets/index.es-DEtxasS7.js index a7f5256..e85455d 100644 --- a/assets/index.es-IxFjqeYu.js +++ b/assets/index.es-DEtxasS7.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BQOD_iIK.js","assets/index-BwZaYMab.js","assets/index-BgH4b0Mv.css"])))=>i.map(i=>d[i]); -import{bB as Lv,bC as ki,bA as Pd,bz as G8}from"./index-BwZaYMab.js";import{r as Od,i as Ih,e as Ki,G as Cd}from"./inherits_browser-DCQ5xBDd.js";var s1=function(r,e,t){if(t||arguments.length===2)for(var i=0,n=e.length,a;i"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new X8:typeof navigator<"u"?n4(navigator.userAgent):a4()}function i4(r){return r!==""&&t4.reduce(function(e,t){var i=t[0],n=t[1];if(e)return e;var a=n.exec(r);return!!a&&[i,a]},!1)}function n4(r){var e=i4(r);if(!e)return null;var t=e[0],i=e[1];if(t==="searchbot")return new Q8;var n=i[1]&&i[1].split(".").join("_").split("_").slice(0,3);n?n.lengthi.map(i=>d[i]); +import{bB as Lv,bC as ki,bA as Pd,bz as G8}from"./index-C6UBXeMY.js";import{r as Od,i as Ih,e as Ki,G as Cd}from"./inherits_browser-B1P7kPq9.js";var s1=function(r,e,t){if(t||arguments.length===2)for(var i=0,n=e.length,a;i"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new X8:typeof navigator<"u"?n4(navigator.userAgent):a4()}function i4(r){return r!==""&&t4.reduce(function(e,t){var i=t[0],n=t[1];if(e)return e;var a=n.exec(r);return!!a&&[i,a]},!1)}function n4(r){var e=i4(r);if(!e)return null;var t=e[0],i=e[1];if(t==="searchbot")return new Q8;var n=i[1]&&i[1].split(".").join("_").split("_").slice(0,3);n?n.length=$)return s;var X=l-Ta(x);if(X<1)return x;var ie=J?Ds(J,0,X).join(""):s.slice(0,X);if(R===t)return ie+x;if(J&&(X+=ie.length-X),Zu(R)){if(s.slice(X).search(R)){var ue,de=ie;for(R.global||(R=gu(R.source,Lt(bt.exec(R))+"g")),R.lastIndex=0;ue=R.exec(de);)var ge=ue.index;ie=ie.slice(0,ge===t?X:ge)}}else if(s.indexOf(bi(R),X)!=X){var De=ie.lastIndexOf(R);De>-1&&(ie=ie.slice(0,De))}return ie+x}function a8(s){return s=Lt(s),s&&Be.test(s)?s.replace(Et,Bm):s}var o8=Fa(function(s,o,l){return s+(l?" ":"")+o.toUpperCase()}),rl=ip("toUpperCase");function t1(s,o,l){return s=Lt(s),o=l?t:o,o===t?Om(s)?Um(s):_m(s):s.match(o)||[]}var r1=At(function(s,o){try{return vr(s,t,o)}catch(l){return Xu(l)?l:new dt(l)}}),c8=ts(function(s,o){return Pi(o,function(l){l=En(l),Zn(s,l,Yu(s[l],s))}),s});function f8(s){var o=s==null?0:s.length,l=nt();return s=o?Qt(s,function(x){if(typeof x[1]!="function")throw new Oi(c);return[l(x[0]),x[1]]}):[],At(function(x){for(var R=-1;++RI)return[];var l=g,x=qr(s,g);o=nt(o),s-=g;for(var R=lu(x,o);++l0||o<0)?new It(l):(s<0?l=l.takeRight(-s):s&&(l=l.drop(s)),o!==t&&(o=yt(o),l=o<0?l.dropRight(-o):l.take(o-s)),l)},It.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},It.prototype.toArray=function(){return this.take(g)},_n(It.prototype,function(s,o){var l=/^(?:filter|find|map|reject)|While$/.test(o),x=/^(?:head|last)$/.test(o),R=T[x?"take"+(o=="last"?"Right":""):o],$=x||/^find/.test(o);R&&(T.prototype[o]=function(){var J=this.__wrapped__,X=x?[1]:arguments,ie=J instanceof It,ue=X[0],de=ie||gt(J),ge=function(xt){var Rt=R.apply(T,As([xt],X));return x&&De?Rt[0]:Rt};de&&l&&typeof ue=="function"&&ue.length!=1&&(ie=de=!1);var De=this.__chain__,We=!!this.__actions__.length,ot=$&&!De,wt=ie&&!We;if(!$&&de){J=wt?J:new It(this);var ct=s.apply(J,X);return ct.__actions__.push({func:Nf,args:[ge],thisArg:t}),new Ci(ct,De)}return ot&&wt?s.apply(this,X):(ct=this.thru(ge),ot?x?ct.value()[0]:ct.value():ct)})}),Pi(["pop","push","shift","sort","splice","unshift"],function(s){var o=sf[s],l=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",x=/^(?:pop|shift)$/.test(s);T.prototype[s]=function(){var R=arguments;if(x&&!this.__chain__){var $=this.value();return o.apply(gt($)?$:[],R)}return this[l](function(J){return o.apply(gt(J)?J:[],R)})}}),_n(It.prototype,function(s,o){var l=T[o];if(l){var x=l.name+"";Ut.call(Ua,x)||(Ua[x]=[]),Ua[x].push({name:o,func:l})}}),Ua[Mf(t,Q).name]=[{name:"wrapper",func:t}],It.prototype.clone=a3,It.prototype.reverse=o3,It.prototype.value=c3,T.prototype.at=q6,T.prototype.chain=U6,T.prototype.commit=$6,T.prototype.next=z6,T.prototype.plant=j6,T.prototype.reverse=k6,T.prototype.toJSON=T.prototype.valueOf=T.prototype.value=H6,T.prototype.first=T.prototype.head,Co&&(T.prototype[Co]=F6),T},Ba=$m();nr?((nr.exports=Ba)._=Ba,kt._=Ba):Ct._=Ba}).call(nc)})(Md,Md.exports);var wN=Object.defineProperty,_N=Object.defineProperties,AN=Object.getOwnPropertyDescriptors,xv=Object.getOwnPropertySymbols,EN=Object.prototype.hasOwnProperty,xN=Object.prototype.propertyIsEnumerable,Sv=(r,e,t)=>e in r?wN(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Qf=(r,e)=>{for(var t in e||(e={}))EN.call(e,t)&&Sv(r,t,e[t]);if(xv)for(var t of xv(e))xN.call(e,t)&&Sv(r,t,e[t]);return r},SN=(r,e)=>_N(r,AN(e));function vn(r,e,t){var i;const n=cc(r);return((i=e.rpcMap)==null?void 0:i[n.reference])||`${yN}?chainId=${n.namespace}:${n.reference}&projectId=${t}`}function Ia(r){return r.includes(":")?r.split(":")[1]:r}function dm(r){return r.map(e=>`${e.split(":")[0]}:${e.split(":")[1]}`)}function MN(r,e){const t=Object.keys(e.namespaces).filter(n=>n.includes(r));if(!t.length)return[];const i=[];return t.forEach(n=>{const a=e.namespaces[n].accounts;i.push(...a)}),i}function Vl(r={},e={}){const t=Mv(r),i=Mv(e);return Md.exports.merge(t,i)}function Mv(r){var e,t,i,n;const a={};if(!wc(r))return a;for(const[c,u]of Object.entries(r)){const b=Xd(c)?[c]:u.chains,d=u.methods||[],m=u.events||[],A=u.rpcMap||{},O=oc(c);a[O]=SN(Qf(Qf({},a[O]),u),{chains:th(b,(e=a[O])==null?void 0:e.chains),methods:th(d,(t=a[O])==null?void 0:t.methods),events:th(m,(i=a[O])==null?void 0:i.events),rpcMap:Qf(Qf({},A),(n=a[O])==null?void 0:n.rpcMap)})}return a}function IN(r){return r.includes(":")?r.split(":")[2]:r}function Iv(r){const e={};for(const[t,i]of Object.entries(r)){const n=i.methods||[],a=i.events||[],c=i.accounts||[],u=Xd(t)?[t]:i.chains?i.chains:dm(i.accounts);e[t]={chains:u,methods:n,events:a,accounts:c}}return e}function Gl(r){return typeof r=="number"?r:r.includes("0x")?parseInt(r,16):(r=r.includes(":")?r.split(":")[1]:r,isNaN(Number(r))?r:Number(r))}const pm={},qt=r=>pm[r],Wl=(r,e)=>{pm[r]=e};class DN{constructor(e){this.name="polkadot",this.namespace=e.namespace,this.events=qt("events"),this.client=qt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(mn.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var i;const n=Ia(t);e[n]=this.createHttpProvider(n,(i=this.namespace.rpcMap)==null?void 0:i[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const i=this.createHttpProvider(e,t);i&&(this.httpProviders[e]=i)}createHttpProvider(e,t){const i=t||vn(e,this.namespace,this.client.core.projectId);if(!i)throw new Error(`No RPC url provided for chainId: ${e}`);return new bn(new Jn(i,qt("disableProviderPing")))}}var PN=Object.defineProperty,ON=Object.defineProperties,CN=Object.getOwnPropertyDescriptors,Dv=Object.getOwnPropertySymbols,RN=Object.prototype.hasOwnProperty,NN=Object.prototype.propertyIsEnumerable,Pv=(r,e,t)=>e in r?PN(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Ov=(r,e)=>{for(var t in e||(e={}))RN.call(e,t)&&Pv(r,t,e[t]);if(Dv)for(var t of Dv(e))NN.call(e,t)&&Pv(r,t,e[t]);return r},Cv=(r,e)=>ON(r,CN(e));class TN{constructor(e){this.name="eip155",this.namespace=e.namespace,this.events=qt("events"),this.client=qt("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(e){switch(e.request.method){case"eth_requestAccounts":return this.getAccounts();case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(e);case"eth_chainId":return parseInt(this.getDefaultChain());case"wallet_getCapabilities":return await this.getCapabilities(e)}return this.namespace.methods.includes(e.request.method)?await this.client.request(e):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(parseInt(e),t),this.chainId=parseInt(e),this.events.emit(mn.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,t){const i=t||vn(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!i)throw new Error(`No RPC url provided for chainId: ${e}`);return new bn(new Jn(i,qt("disableProviderPing")))}setHttpProvider(e,t){const i=this.createHttpProvider(e,t);i&&(this.httpProviders[e]=i)}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var i;const n=parseInt(Ia(t));e[n]=this.createHttpProvider(n,(i=this.namespace.rpcMap)==null?void 0:i[t])}),e}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}getHttpProvider(){const e=this.chainId,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}async handleSwitchChain(e){var t,i;let n=e.request.params?(t=e.request.params[0])==null?void 0:t.chainId:"0x0";n=n.startsWith("0x")?n:`0x${n}`;const a=parseInt(n,16);if(this.isChainApproved(a))this.setDefaultChain(`${a}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:n}]},chainId:(i=this.namespace.chains)==null?void 0:i[0]}),this.setDefaultChain(`${a}`);else throw new Error(`Failed to switch to chain 'eip155:${a}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(e){return this.namespace.chains.includes(`${this.name}:${e}`)}async getCapabilities(e){var t,i,n;const a=(i=(t=e.request)==null?void 0:t.params)==null?void 0:i[0];if(!a)throw new Error("Missing address parameter in `wallet_getCapabilities` request");const c=this.client.session.get(e.topic),u=((n=c==null?void 0:c.sessionProperties)==null?void 0:n.capabilities)||{};if(u!=null&&u[a])return u==null?void 0:u[a];const b=await this.client.request(e);try{await this.client.session.update(e.topic,{sessionProperties:Cv(Ov({},c.sessionProperties||{}),{capabilities:Cv(Ov({},u||{}),{[a]:b})})})}catch(d){console.warn("Failed to update session with capabilities",d)}return b}}class BN{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=qt("events"),this.client=qt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(mn.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var i;const n=Ia(t);e[n]=this.createHttpProvider(n,(i=this.namespace.rpcMap)==null?void 0:i[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const i=this.createHttpProvider(e,t);i&&(this.httpProviders[e]=i)}createHttpProvider(e,t){const i=t||vn(e,this.namespace,this.client.core.projectId);if(!i)throw new Error(`No RPC url provided for chainId: ${e}`);return new bn(new Jn(i,qt("disableProviderPing")))}}class LN{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=qt("events"),this.client=qt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(mn.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var i;const n=Ia(t);e[n]=this.createHttpProvider(n,(i=this.namespace.rpcMap)==null?void 0:i[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const i=this.createHttpProvider(e,t);i&&(this.httpProviders[e]=i)}createHttpProvider(e,t){const i=t||vn(e,this.namespace,this.client.core.projectId);if(!i)throw new Error(`No RPC url provided for chainId: ${e}`);return new bn(new Jn(i,qt("disableProviderPing")))}}class qN{constructor(e){this.name="algorand",this.namespace=e.namespace,this.events=qt("events"),this.client=qt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(!this.httpProviders[e]){const i=t||vn(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!i)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,i)}this.chainId=e,this.events.emit(mn.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var i;e[t]=this.createHttpProvider(t,(i=this.namespace.rpcMap)==null?void 0:i[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const i=this.createHttpProvider(e,t);i&&(this.httpProviders[e]=i)}createHttpProvider(e,t){const i=t||vn(e,this.namespace,this.client.core.projectId);return typeof i>"u"?void 0:new bn(new Jn(i,qt("disableProviderPing")))}}class UN{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=qt("events"),this.client=qt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(mn.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{const i=this.getCardanoRPCUrl(t),n=Ia(t);e[n]=this.createHttpProvider(n,i)}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}getCardanoRPCUrl(e){const t=this.namespace.rpcMap;if(t)return t[e]}setHttpProvider(e,t){const i=this.createHttpProvider(e,t);i&&(this.httpProviders[e]=i)}createHttpProvider(e,t){const i=t||this.getCardanoRPCUrl(e);if(!i)throw new Error(`No RPC url provided for chainId: ${e}`);return new bn(new Jn(i,qt("disableProviderPing")))}}class $N{constructor(e){this.name="elrond",this.namespace=e.namespace,this.events=qt("events"),this.client=qt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(mn.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var i;const n=Ia(t);e[n]=this.createHttpProvider(n,(i=this.namespace.rpcMap)==null?void 0:i[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const i=this.createHttpProvider(e,t);i&&(this.httpProviders[e]=i)}createHttpProvider(e,t){const i=t||vn(e,this.namespace,this.client.core.projectId);if(!i)throw new Error(`No RPC url provided for chainId: ${e}`);return new bn(new Jn(i,qt("disableProviderPing")))}}class zN{constructor(e){this.name="multiversx",this.namespace=e.namespace,this.events=qt("events"),this.client=qt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(mn.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var i;const n=Ia(t);e[n]=this.createHttpProvider(n,(i=this.namespace.rpcMap)==null?void 0:i[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const i=this.createHttpProvider(e,t);i&&(this.httpProviders[e]=i)}createHttpProvider(e,t){const i=t||vn(e,this.namespace,this.client.core.projectId);if(!i)throw new Error(`No RPC url provided for chainId: ${e}`);return new bn(new Jn(i,qt("disableProviderPing")))}}class FN{constructor(e){this.name="near",this.namespace=e.namespace,this.events=qt("events"),this.client=qt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const i=t||vn(`${this.name}:${e}`,this.namespace);if(!i)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,i)}this.events.emit(mn.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var i;e[t]=this.createHttpProvider(t,(i=this.namespace.rpcMap)==null?void 0:i[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const i=this.createHttpProvider(e,t);i&&(this.httpProviders[e]=i)}createHttpProvider(e,t){const i=t||vn(e,this.namespace);return typeof i>"u"?void 0:new bn(new Jn(i,qt("disableProviderPing")))}}class jN{constructor(e){this.name=Qa,this.namespace=e.namespace,this.events=qt("events"),this.client=qt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace.chains=[...new Set((this.namespace.chains||[]).concat(e.chains||[]))],this.namespace.accounts=[...new Set((this.namespace.accounts||[]).concat(e.accounts||[]))],this.namespace.methods=[...new Set((this.namespace.methods||[]).concat(e.methods||[]))],this.namespace.events=[...new Set((this.namespace.events||[]).concat(e.events||[]))],this.httpProviders=this.createHttpProviders()}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider(e.chainId).request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(mn.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){var e,t;const i={};return(t=(e=this.namespace)==null?void 0:e.accounts)==null||t.forEach(n=>{const a=cc(n);i[`${a.namespace}:${a.reference}`]=this.createHttpProvider(n)}),i}getHttpProvider(e){const t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const i=this.createHttpProvider(e,t);i&&(this.httpProviders[e]=i)}createHttpProvider(e,t){const i=t||vn(e,this.namespace,this.client.core.projectId);if(!i)throw new Error(`No RPC url provided for chainId: ${e}`);return new bn(new Jn(i,qt("disableProviderPing")))}}var kN=Object.defineProperty,HN=Object.defineProperties,KN=Object.getOwnPropertyDescriptors,Rv=Object.getOwnPropertySymbols,VN=Object.prototype.hasOwnProperty,GN=Object.prototype.propertyIsEnumerable,Nv=(r,e,t)=>e in r?kN(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Xf=(r,e)=>{for(var t in e||(e={}))VN.call(e,t)&&Nv(r,t,e[t]);if(Rv)for(var t of Rv(e))GN.call(e,t)&&Nv(r,t,e[t]);return r},Jl=(r,e)=>HN(r,KN(e));class s0{constructor(e){this.events=new Cd,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=e,this.logger=typeof(e==null?void 0:e.logger)<"u"&&typeof(e==null?void 0:e.logger)!="string"?e.logger:Bc(Wh({level:(e==null?void 0:e.logger)||Av})),this.disableProviderPing=(e==null?void 0:e.disableProviderPing)||!1}static async init(e){const t=new s0(e);return await t.initialize(),t}async request(e,t,i){const[n,a]=this.validateChain(t);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(n).request({request:Xf({},e),chainId:`${n}:${a}`,topic:this.session.topic,expiry:i})}sendAsync(e,t,i,n){const a=new Date().getTime();this.request(e,i,n).then(c=>t(null,Jh(a,c))).catch(c=>t(c,void 0))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:(e=this.session)==null?void 0:e.topic,reason:$t("USER_DISCONNECTED")}),await this.cleanup()}async connect(e){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(e),await this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}async authenticate(e,t){if(!this.client)throw new Error("Sign Client not initialized");this.setNamespaces(e),await this.cleanupPendingPairings();const{uri:i,response:n}=await this.client.authenticate(e,t);i&&(this.uri=i,this.events.emit("display_uri",i));const a=await n();if(this.session=a.session,this.session){const c=Iv(this.session.namespaces);this.namespaces=Vl(this.namespaces,c),this.persist("namespaces",this.namespaces),this.onConnect()}return a}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}removeListener(e,t){this.events.removeListener(e,t)}off(e,t){this.events.off(e,t)}get isWalletConnect(){return!0}async pair(e){this.shouldAbortPairingAttempt=!1;let t=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(t>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:i,approval:n}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});i&&(this.uri=i,this.events.emit("display_uri",i)),await n().then(a=>{this.session=a;const c=Iv(a.namespaces);this.namespaces=Vl(this.namespaces,c),this.persist("namespaces",this.namespaces)}).catch(a=>{if(a.message!==um)throw a;t++})}while(!this.session);return this.onConnect(),this.session}setDefaultChain(e,t){try{if(!this.session)return;const[i,n]=this.validateChain(e),a=this.getProvider(i);a.name===Qa?a.setDefaultChain(`${i}:${n}`,t):a.setDefaultChain(n,t)}catch(i){if(!/Please call connect/.test(i.message))throw i}}async cleanupPendingPairings(e={}){this.logger.info("Cleaning up inactive pairings...");const t=this.client.pairing.getAll();if(Hn(t)){for(const i of t)e.deletePairings?this.client.core.expirer.set(i.topic,0):await this.client.core.relayer.subscriber.unsubscribe(i.topic);this.logger.info(`Inactive pairings cleared: ${t.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces"),this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const e=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[e]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await oN.init({core:this.providerOpts.core,logger:this.providerOpts.logger||Av,relayUrl:this.providerOpts.relayUrl||vN,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name,customStoragePrefix:this.providerOpts.customStoragePrefix,telemetryEnabled:this.providerOpts.telemetryEnabled}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const e=[...new Set(Object.keys(this.session.namespaces).map(t=>oc(t)))];Wl("client",this.client),Wl("events",this.events),Wl("disableProviderPing",this.disableProviderPing),e.forEach(t=>{if(!this.session)return;const i=MN(t,this.session),n=dm(i),a=Vl(this.namespaces,this.optionalNamespaces),c=Jl(Xf({},a[t]),{accounts:i,chains:n});switch(t){case"eip155":this.rpcProviders[t]=new TN({namespace:c});break;case"algorand":this.rpcProviders[t]=new qN({namespace:c});break;case"solana":this.rpcProviders[t]=new BN({namespace:c});break;case"cosmos":this.rpcProviders[t]=new LN({namespace:c});break;case"polkadot":this.rpcProviders[t]=new DN({namespace:c});break;case"cip34":this.rpcProviders[t]=new UN({namespace:c});break;case"elrond":this.rpcProviders[t]=new $N({namespace:c});break;case"multiversx":this.rpcProviders[t]=new zN({namespace:c});break;case"near":this.rpcProviders[t]=new FN({namespace:c});break;default:this.rpcProviders[Qa]?this.rpcProviders[Qa].updateNamespace(c):this.rpcProviders[Qa]=new jN({namespace:c})}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",e=>{this.events.emit("session_ping",e)}),this.client.on("session_event",e=>{const{params:t}=e,{event:i}=t;if(i.name==="accountsChanged"){const n=i.data;n&&Hn(n)&&this.events.emit("accountsChanged",n.map(IN))}else if(i.name==="chainChanged"){const n=t.chainId,a=t.event.data,c=oc(n),u=Gl(n)!==Gl(a)?`${c}:${Gl(a)}`:n;this.onChainChanged(u)}else this.events.emit(i.name,i.data);this.events.emit("session_event",e)}),this.client.on("session_update",({topic:e,params:t})=>{var i;const{namespaces:n}=t,a=(i=this.client)==null?void 0:i.session.get(e);this.session=Jl(Xf({},a),{namespaces:n}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:t})}),this.client.on("session_delete",async e=>{await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",Jl(Xf({},$t("USER_DISCONNECTED")),{data:e.topic}))}),this.on(mn.DEFAULT_CHAIN_CHANGED,e=>{this.onChainChanged(e,!0)})}getProvider(e){return this.rpcProviders[e]||this.rpcProviders[Qa]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(e=>{var t;this.getProvider(e).updateNamespace((t=this.session)==null?void 0:t.namespaces[e])})}setNamespaces(e){const{namespaces:t,optionalNamespaces:i,sessionProperties:n}=e;t&&Object.keys(t).length&&(this.namespaces=t),i&&Object.keys(i).length&&(this.optionalNamespaces=i),this.sessionProperties=n,this.persist("namespaces",t),this.persist("optionalNamespaces",i)}validateChain(e){const[t,i]=(e==null?void 0:e.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[t,i];if(t&&!Object.keys(this.namespaces||{}).map(c=>oc(c)).includes(t))throw new Error(`Namespace '${t}' is not configured. Please call connect() first with namespace config.`);if(t&&i)return[t,i];const n=oc(Object.keys(this.namespaces)[0]),a=this.rpcProviders[n].getDefaultChain();return[n,a]}async requestAccounts(){const[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}onChainChanged(e,t=!1){if(!this.namespaces)return;const[i,n]=this.validateChain(e);n&&(t||this.getProvider(i).setDefaultChain(n),this.namespaces[i]?this.namespaces[i].defaultChain=n:this.namespaces[`${i}:${n}`]?this.namespaces[`${i}:${n}`].defaultChain=n:this.namespaces[`${i}:${n}`]={defaultChain:n},this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",n))}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(e,t){this.client.core.storage.setItem(`${Ev}/${e}`,t)}async getFromStore(e){return await this.client.core.storage.getItem(`${Ev}/${e}`)}}const WN=s0,JN="wc",YN="ethereum_provider",QN=`${JN}@2:${YN}:`,XN="https://rpc.walletconnect.com/v1/",Id=["eth_sendTransaction","personal_sign"],ZN=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode","wallet_sendCalls","wallet_getCapabilities","wallet_getCallsStatus","wallet_showCallsStatus"],Dd=["chainChanged","accountsChanged"],eT=["chainChanged","accountsChanged","message","disconnect","connect"];var tT=Object.defineProperty,rT=Object.defineProperties,iT=Object.getOwnPropertyDescriptors,Tv=Object.getOwnPropertySymbols,nT=Object.prototype.hasOwnProperty,sT=Object.prototype.propertyIsEnumerable,Bv=(r,e,t)=>e in r?tT(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Xa=(r,e)=>{for(var t in e||(e={}))nT.call(e,t)&&Bv(r,t,e[t]);if(Tv)for(var t of Tv(e))sT.call(e,t)&&Bv(r,t,e[t]);return r},Yl=(r,e)=>rT(r,iT(e));function Mh(r){return Number(r[0].split(":")[1])}function Zf(r){return`0x${r.toString(16)}`}function aT(r){const{chains:e,optionalChains:t,methods:i,optionalMethods:n,events:a,optionalEvents:c,rpcMap:u}=r;if(!Hn(e))throw new Error("Invalid chains");const b={chains:e,methods:i||Id,events:a||Dd,rpcMap:Xa({},e.length?{[Mh(e)]:u[Mh(e)]}:{})},d=a==null?void 0:a.filter(P=>!Dd.includes(P)),m=i==null?void 0:i.filter(P=>!Id.includes(P));if(!t&&!c&&!n&&!(d!=null&&d.length)&&!(m!=null&&m.length))return{required:e.length?b:void 0};const A=(d==null?void 0:d.length)&&(m==null?void 0:m.length)||!t,O={chains:[...new Set(A?b.chains.concat(t||[]):t)],methods:[...new Set(b.methods.concat(n!=null&&n.length?n:ZN))],events:[...new Set(b.events.concat(c!=null&&c.length?c:eT))],rpcMap:u};return{required:e.length?b:void 0,optional:t.length?O:void 0}}class gm{constructor(){this.events=new Ki.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=QN,this.on=(e,t)=>(this.events.on(e,t),this),this.once=(e,t)=>(this.events.once(e,t),this),this.removeListener=(e,t)=>(this.events.removeListener(e,t),this),this.off=(e,t)=>(this.events.off(e,t),this),this.parseAccount=e=>this.isCompatibleChainId(e)?this.parseAccountId(e).address:e,this.signer={},this.rpc={}}static async init(e){const t=new gm;return await t.initialize(e),t}async request(e,t){return await this.signer.request(e,this.formatChainId(this.chainId),t)}sendAsync(e,t,i){this.signer.sendAsync(e,t,this.formatChainId(this.chainId),i)}get connected(){return this.signer.client?this.signer.client.core.relayer.connected:!1}get connecting(){return this.signer.client?this.signer.client.core.relayer.connecting:!1}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(e){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(e);const{required:t,optional:i}=aT(this.rpc);try{const n=await new Promise(async(c,u)=>{var b;this.rpc.showQrModal&&((b=this.modal)==null||b.subscribeModal(d=>{!d.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),u(new Error("Connection request reset. Please try again.")))})),await this.signer.connect(Yl(Xa({namespaces:Xa({},t&&{[this.namespace]:t})},i&&{optionalNamespaces:{[this.namespace]:i}}),{pairingTopic:e==null?void 0:e.pairingTopic})).then(d=>{c(d)}).catch(d=>{u(new Error(d.message))})});if(!n)return;const a=U1(n.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:a),this.setAccounts(a),this.events.emit("connect",{chainId:Zf(this.chainId)})}catch(n){throw this.signer.logger.error(n),n}finally{this.modal&&this.modal.closeModal()}}async authenticate(e,t){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts({chains:e==null?void 0:e.chains});try{const i=await new Promise(async(a,c)=>{var u;this.rpc.showQrModal&&((u=this.modal)==null||u.subscribeModal(b=>{!b.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),c(new Error("Connection request reset. Please try again.")))})),await this.signer.authenticate(Yl(Xa({},e),{chains:this.rpc.chains}),t).then(b=>{a(b)}).catch(b=>{c(new Error(b.message))})}),n=i.session;if(n){const a=U1(n.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:a),this.setAccounts(a),this.events.emit("connect",{chainId:Zf(this.chainId)})}return i}catch(i){throw this.signer.logger.error(i),i}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",e=>{const{params:t}=e,{event:i}=t;i.name==="accountsChanged"?(this.accounts=this.parseAccounts(i.data),this.events.emit("accountsChanged",this.accounts)):i.name==="chainChanged"?this.setChainId(this.formatChainId(i.data)):this.events.emit(i.name,i.data),this.events.emit("session_event",e)}),this.signer.on("chainChanged",e=>{const t=parseInt(e);this.chainId=t,this.events.emit("chainChanged",Zf(this.chainId)),this.persist()}),this.signer.on("session_update",e=>{this.events.emit("session_update",e)}),this.signer.on("session_delete",e=>{this.reset(),this.events.emit("session_delete",e),this.events.emit("disconnect",Yl(Xa({},$t("USER_DISCONNECTED")),{data:e.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",e=>{var t,i;this.rpc.showQrModal&&((t=this.modal)==null||t.closeModal(),(i=this.modal)==null||i.openModal({uri:e})),this.events.emit("display_uri",e)})}switchEthereumChain(e){this.request({method:"wallet_switchEthereumChain",params:[{chainId:e.toString(16)}]})}isCompatibleChainId(e){return typeof e=="string"?e.startsWith(`${this.namespace}:`):!1}formatChainId(e){return`${this.namespace}:${e}`}parseChainId(e){return Number(e.split(":")[1])}setChainIds(e){const t=e.filter(i=>this.isCompatibleChainId(i)).map(i=>this.parseChainId(i));t.length&&(this.chainId=t[0],this.events.emit("chainChanged",Zf(this.chainId)),this.persist())}setChainId(e){if(this.isCompatibleChainId(e)){const t=this.parseChainId(e);this.chainId=t,this.switchEthereumChain(t)}}parseAccountId(e){const[t,i,n]=e.split(":");return{chainId:`${t}:${i}`,address:n}}setAccounts(e){this.accounts=e.filter(t=>this.parseChainId(this.parseAccountId(t).chainId)===this.chainId).map(t=>this.parseAccountId(t).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(e){var t,i;const n=(t=e==null?void 0:e.chains)!=null?t:[],a=(i=e==null?void 0:e.optionalChains)!=null?i:[],c=n.concat(a);if(!c.length)throw new Error("No chains specified in either `chains` or `optionalChains`");const u=n.length?(e==null?void 0:e.methods)||Id:[],b=n.length?(e==null?void 0:e.events)||Dd:[],d=(e==null?void 0:e.optionalMethods)||[],m=(e==null?void 0:e.optionalEvents)||[],A=(e==null?void 0:e.rpcMap)||this.buildRpcMap(c,e.projectId),O=(e==null?void 0:e.qrModalOptions)||void 0;return{chains:n==null?void 0:n.map(P=>this.formatChainId(P)),optionalChains:a.map(P=>this.formatChainId(P)),methods:u,events:b,optionalMethods:d,optionalEvents:m,rpcMap:A,showQrModal:!!(e!=null&&e.showQrModal),qrModalOptions:O,projectId:e.projectId,metadata:e.metadata}}buildRpcMap(e,t){const i={};return e.forEach(n=>{i[n]=this.getRpcUrl(n,t)}),i}async initialize(e){if(this.rpc=this.getRpcConfig(e),this.chainId=this.rpc.chains.length?Mh(this.rpc.chains):Mh(this.rpc.optionalChains),this.signer=await WN.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:e.disableProviderPing,relayUrl:e.relayUrl,storageOptions:e.storageOptions,customStoragePrefix:e.customStoragePrefix,telemetryEnabled:e.telemetryEnabled}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let t;try{const{WalletConnectModal:i}=await G8(()=>import("./index-BQOD_iIK.js").then(n=>n.i),__vite__mapDeps([0,1,2]));t=i}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(t)try{this.modal=new t(Xa({projectId:this.rpc.projectId},this.rpc.qrModalOptions))}catch(i){throw this.signer.logger.error(i),new Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(e){if(!e)return;const{chains:t,optionalChains:i,rpcMap:n}=e;t&&Hn(t)&&(this.rpc.chains=t.map(a=>this.formatChainId(a)),t.forEach(a=>{this.rpc.rpcMap[a]=(n==null?void 0:n[a])||this.getRpcUrl(a)})),i&&Hn(i)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=i==null?void 0:i.map(a=>this.formatChainId(a)),i.forEach(a=>{this.rpc.rpcMap[a]=(n==null?void 0:n[a])||this.getRpcUrl(a)}))}getRpcUrl(e,t){var i;return((i=this.rpc.rpcMap)==null?void 0:i[e])||`${XN}?chainId=eip155:${e}&projectId=${t||this.rpc.projectId}`}async loadPersistedSession(){if(this.session)try{const e=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),t=this.session.namespaces[`${this.namespace}:${e}`]?this.session.namespaces[`${this.namespace}:${e}`]:this.session.namespaces[this.namespace];this.setChainIds(e?[this.formatChainId(e)]:t==null?void 0:t.accounts),this.setAccounts(t==null?void 0:t.accounts)}catch(e){this.signer.logger.error("Failed to load persisted session, clearing state..."),this.signer.logger.error(e),await this.disconnect().catch(t=>this.signer.logger.warn(t))}}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(e){return typeof e=="string"||e instanceof String?[this.parseAccount(e)]:e.map(t=>this.parseAccount(t))}}export{eT as OPTIONAL_EVENTS,ZN as OPTIONAL_METHODS,Dd as REQUIRED_EVENTS,Id as REQUIRED_METHODS,gm as default}; +}`;var wt=r1(function(){return Bt($,We+"return "+ge).apply(t,J)});if(wt.source=ge,Xu(wt))throw wt;return wt}function e8(s){return Lt(s).toLowerCase()}function t8(s){return Lt(s).toUpperCase()}function r8(s,o,l){if(s=Lt(s),s&&(l||o===t))return u0(s);if(!s||!(o=bi(o)))return s;var x=tn(s),R=tn(o),$=l0(x,R),J=d0(x,R)+1;return Ds(x,$,J).join("")}function i8(s,o,l){if(s=Lt(s),s&&(l||o===t))return s.slice(0,g0(s)+1);if(!s||!(o=bi(o)))return s;var x=tn(s),R=d0(x,tn(o))+1;return Ds(x,0,R).join("")}function n8(s,o,l){if(s=Lt(s),s&&(l||o===t))return s.replace(it,"");if(!s||!(o=bi(o)))return s;var x=tn(s),R=l0(x,tn(o));return Ds(x,R).join("")}function s8(s,o){var l=le,x=L;if(Xt(o)){var R="separator"in o?o.separator:R;l="length"in o?yt(o.length):l,x="omission"in o?bi(o.omission):x}s=Lt(s);var $=s.length;if(Na(s)){var J=tn(s);$=J.length}if(l>=$)return s;var X=l-Ta(x);if(X<1)return x;var ie=J?Ds(J,0,X).join(""):s.slice(0,X);if(R===t)return ie+x;if(J&&(X+=ie.length-X),Zu(R)){if(s.slice(X).search(R)){var ue,de=ie;for(R.global||(R=gu(R.source,Lt(bt.exec(R))+"g")),R.lastIndex=0;ue=R.exec(de);)var ge=ue.index;ie=ie.slice(0,ge===t?X:ge)}}else if(s.indexOf(bi(R),X)!=X){var De=ie.lastIndexOf(R);De>-1&&(ie=ie.slice(0,De))}return ie+x}function a8(s){return s=Lt(s),s&&Be.test(s)?s.replace(Et,Bm):s}var o8=Fa(function(s,o,l){return s+(l?" ":"")+o.toUpperCase()}),rl=ip("toUpperCase");function t1(s,o,l){return s=Lt(s),o=l?t:o,o===t?Om(s)?Um(s):_m(s):s.match(o)||[]}var r1=At(function(s,o){try{return vr(s,t,o)}catch(l){return Xu(l)?l:new dt(l)}}),c8=ts(function(s,o){return Pi(o,function(l){l=En(l),Zn(s,l,Yu(s[l],s))}),s});function f8(s){var o=s==null?0:s.length,l=nt();return s=o?Qt(s,function(x){if(typeof x[1]!="function")throw new Oi(c);return[l(x[0]),x[1]]}):[],At(function(x){for(var R=-1;++RI)return[];var l=g,x=qr(s,g);o=nt(o),s-=g;for(var R=lu(x,o);++l0||o<0)?new It(l):(s<0?l=l.takeRight(-s):s&&(l=l.drop(s)),o!==t&&(o=yt(o),l=o<0?l.dropRight(-o):l.take(o-s)),l)},It.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},It.prototype.toArray=function(){return this.take(g)},_n(It.prototype,function(s,o){var l=/^(?:filter|find|map|reject)|While$/.test(o),x=/^(?:head|last)$/.test(o),R=T[x?"take"+(o=="last"?"Right":""):o],$=x||/^find/.test(o);R&&(T.prototype[o]=function(){var J=this.__wrapped__,X=x?[1]:arguments,ie=J instanceof It,ue=X[0],de=ie||gt(J),ge=function(xt){var Rt=R.apply(T,As([xt],X));return x&&De?Rt[0]:Rt};de&&l&&typeof ue=="function"&&ue.length!=1&&(ie=de=!1);var De=this.__chain__,We=!!this.__actions__.length,ot=$&&!De,wt=ie&&!We;if(!$&&de){J=wt?J:new It(this);var ct=s.apply(J,X);return ct.__actions__.push({func:Nf,args:[ge],thisArg:t}),new Ci(ct,De)}return ot&&wt?s.apply(this,X):(ct=this.thru(ge),ot?x?ct.value()[0]:ct.value():ct)})}),Pi(["pop","push","shift","sort","splice","unshift"],function(s){var o=sf[s],l=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",x=/^(?:pop|shift)$/.test(s);T.prototype[s]=function(){var R=arguments;if(x&&!this.__chain__){var $=this.value();return o.apply(gt($)?$:[],R)}return this[l](function(J){return o.apply(gt(J)?J:[],R)})}}),_n(It.prototype,function(s,o){var l=T[o];if(l){var x=l.name+"";Ut.call(Ua,x)||(Ua[x]=[]),Ua[x].push({name:o,func:l})}}),Ua[Mf(t,Q).name]=[{name:"wrapper",func:t}],It.prototype.clone=a3,It.prototype.reverse=o3,It.prototype.value=c3,T.prototype.at=q6,T.prototype.chain=U6,T.prototype.commit=$6,T.prototype.next=z6,T.prototype.plant=j6,T.prototype.reverse=k6,T.prototype.toJSON=T.prototype.valueOf=T.prototype.value=H6,T.prototype.first=T.prototype.head,Co&&(T.prototype[Co]=F6),T},Ba=$m();nr?((nr.exports=Ba)._=Ba,kt._=Ba):Ct._=Ba}).call(nc)})(Md,Md.exports);var wN=Object.defineProperty,_N=Object.defineProperties,AN=Object.getOwnPropertyDescriptors,xv=Object.getOwnPropertySymbols,EN=Object.prototype.hasOwnProperty,xN=Object.prototype.propertyIsEnumerable,Sv=(r,e,t)=>e in r?wN(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Qf=(r,e)=>{for(var t in e||(e={}))EN.call(e,t)&&Sv(r,t,e[t]);if(xv)for(var t of xv(e))xN.call(e,t)&&Sv(r,t,e[t]);return r},SN=(r,e)=>_N(r,AN(e));function vn(r,e,t){var i;const n=cc(r);return((i=e.rpcMap)==null?void 0:i[n.reference])||`${yN}?chainId=${n.namespace}:${n.reference}&projectId=${t}`}function Ia(r){return r.includes(":")?r.split(":")[1]:r}function dm(r){return r.map(e=>`${e.split(":")[0]}:${e.split(":")[1]}`)}function MN(r,e){const t=Object.keys(e.namespaces).filter(n=>n.includes(r));if(!t.length)return[];const i=[];return t.forEach(n=>{const a=e.namespaces[n].accounts;i.push(...a)}),i}function Vl(r={},e={}){const t=Mv(r),i=Mv(e);return Md.exports.merge(t,i)}function Mv(r){var e,t,i,n;const a={};if(!wc(r))return a;for(const[c,u]of Object.entries(r)){const b=Xd(c)?[c]:u.chains,d=u.methods||[],m=u.events||[],A=u.rpcMap||{},O=oc(c);a[O]=SN(Qf(Qf({},a[O]),u),{chains:th(b,(e=a[O])==null?void 0:e.chains),methods:th(d,(t=a[O])==null?void 0:t.methods),events:th(m,(i=a[O])==null?void 0:i.events),rpcMap:Qf(Qf({},A),(n=a[O])==null?void 0:n.rpcMap)})}return a}function IN(r){return r.includes(":")?r.split(":")[2]:r}function Iv(r){const e={};for(const[t,i]of Object.entries(r)){const n=i.methods||[],a=i.events||[],c=i.accounts||[],u=Xd(t)?[t]:i.chains?i.chains:dm(i.accounts);e[t]={chains:u,methods:n,events:a,accounts:c}}return e}function Gl(r){return typeof r=="number"?r:r.includes("0x")?parseInt(r,16):(r=r.includes(":")?r.split(":")[1]:r,isNaN(Number(r))?r:Number(r))}const pm={},qt=r=>pm[r],Wl=(r,e)=>{pm[r]=e};class DN{constructor(e){this.name="polkadot",this.namespace=e.namespace,this.events=qt("events"),this.client=qt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(mn.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var i;const n=Ia(t);e[n]=this.createHttpProvider(n,(i=this.namespace.rpcMap)==null?void 0:i[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const i=this.createHttpProvider(e,t);i&&(this.httpProviders[e]=i)}createHttpProvider(e,t){const i=t||vn(e,this.namespace,this.client.core.projectId);if(!i)throw new Error(`No RPC url provided for chainId: ${e}`);return new bn(new Jn(i,qt("disableProviderPing")))}}var PN=Object.defineProperty,ON=Object.defineProperties,CN=Object.getOwnPropertyDescriptors,Dv=Object.getOwnPropertySymbols,RN=Object.prototype.hasOwnProperty,NN=Object.prototype.propertyIsEnumerable,Pv=(r,e,t)=>e in r?PN(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Ov=(r,e)=>{for(var t in e||(e={}))RN.call(e,t)&&Pv(r,t,e[t]);if(Dv)for(var t of Dv(e))NN.call(e,t)&&Pv(r,t,e[t]);return r},Cv=(r,e)=>ON(r,CN(e));class TN{constructor(e){this.name="eip155",this.namespace=e.namespace,this.events=qt("events"),this.client=qt("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(e){switch(e.request.method){case"eth_requestAccounts":return this.getAccounts();case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(e);case"eth_chainId":return parseInt(this.getDefaultChain());case"wallet_getCapabilities":return await this.getCapabilities(e)}return this.namespace.methods.includes(e.request.method)?await this.client.request(e):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(parseInt(e),t),this.chainId=parseInt(e),this.events.emit(mn.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,t){const i=t||vn(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!i)throw new Error(`No RPC url provided for chainId: ${e}`);return new bn(new Jn(i,qt("disableProviderPing")))}setHttpProvider(e,t){const i=this.createHttpProvider(e,t);i&&(this.httpProviders[e]=i)}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var i;const n=parseInt(Ia(t));e[n]=this.createHttpProvider(n,(i=this.namespace.rpcMap)==null?void 0:i[t])}),e}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}getHttpProvider(){const e=this.chainId,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}async handleSwitchChain(e){var t,i;let n=e.request.params?(t=e.request.params[0])==null?void 0:t.chainId:"0x0";n=n.startsWith("0x")?n:`0x${n}`;const a=parseInt(n,16);if(this.isChainApproved(a))this.setDefaultChain(`${a}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:n}]},chainId:(i=this.namespace.chains)==null?void 0:i[0]}),this.setDefaultChain(`${a}`);else throw new Error(`Failed to switch to chain 'eip155:${a}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(e){return this.namespace.chains.includes(`${this.name}:${e}`)}async getCapabilities(e){var t,i,n;const a=(i=(t=e.request)==null?void 0:t.params)==null?void 0:i[0];if(!a)throw new Error("Missing address parameter in `wallet_getCapabilities` request");const c=this.client.session.get(e.topic),u=((n=c==null?void 0:c.sessionProperties)==null?void 0:n.capabilities)||{};if(u!=null&&u[a])return u==null?void 0:u[a];const b=await this.client.request(e);try{await this.client.session.update(e.topic,{sessionProperties:Cv(Ov({},c.sessionProperties||{}),{capabilities:Cv(Ov({},u||{}),{[a]:b})})})}catch(d){console.warn("Failed to update session with capabilities",d)}return b}}class BN{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=qt("events"),this.client=qt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(mn.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var i;const n=Ia(t);e[n]=this.createHttpProvider(n,(i=this.namespace.rpcMap)==null?void 0:i[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const i=this.createHttpProvider(e,t);i&&(this.httpProviders[e]=i)}createHttpProvider(e,t){const i=t||vn(e,this.namespace,this.client.core.projectId);if(!i)throw new Error(`No RPC url provided for chainId: ${e}`);return new bn(new Jn(i,qt("disableProviderPing")))}}class LN{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=qt("events"),this.client=qt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(mn.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var i;const n=Ia(t);e[n]=this.createHttpProvider(n,(i=this.namespace.rpcMap)==null?void 0:i[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const i=this.createHttpProvider(e,t);i&&(this.httpProviders[e]=i)}createHttpProvider(e,t){const i=t||vn(e,this.namespace,this.client.core.projectId);if(!i)throw new Error(`No RPC url provided for chainId: ${e}`);return new bn(new Jn(i,qt("disableProviderPing")))}}class qN{constructor(e){this.name="algorand",this.namespace=e.namespace,this.events=qt("events"),this.client=qt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(!this.httpProviders[e]){const i=t||vn(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!i)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,i)}this.chainId=e,this.events.emit(mn.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var i;e[t]=this.createHttpProvider(t,(i=this.namespace.rpcMap)==null?void 0:i[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const i=this.createHttpProvider(e,t);i&&(this.httpProviders[e]=i)}createHttpProvider(e,t){const i=t||vn(e,this.namespace,this.client.core.projectId);return typeof i>"u"?void 0:new bn(new Jn(i,qt("disableProviderPing")))}}class UN{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=qt("events"),this.client=qt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(mn.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{const i=this.getCardanoRPCUrl(t),n=Ia(t);e[n]=this.createHttpProvider(n,i)}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}getCardanoRPCUrl(e){const t=this.namespace.rpcMap;if(t)return t[e]}setHttpProvider(e,t){const i=this.createHttpProvider(e,t);i&&(this.httpProviders[e]=i)}createHttpProvider(e,t){const i=t||this.getCardanoRPCUrl(e);if(!i)throw new Error(`No RPC url provided for chainId: ${e}`);return new bn(new Jn(i,qt("disableProviderPing")))}}class $N{constructor(e){this.name="elrond",this.namespace=e.namespace,this.events=qt("events"),this.client=qt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(mn.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var i;const n=Ia(t);e[n]=this.createHttpProvider(n,(i=this.namespace.rpcMap)==null?void 0:i[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const i=this.createHttpProvider(e,t);i&&(this.httpProviders[e]=i)}createHttpProvider(e,t){const i=t||vn(e,this.namespace,this.client.core.projectId);if(!i)throw new Error(`No RPC url provided for chainId: ${e}`);return new bn(new Jn(i,qt("disableProviderPing")))}}class zN{constructor(e){this.name="multiversx",this.namespace=e.namespace,this.events=qt("events"),this.client=qt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(mn.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var i;const n=Ia(t);e[n]=this.createHttpProvider(n,(i=this.namespace.rpcMap)==null?void 0:i[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const i=this.createHttpProvider(e,t);i&&(this.httpProviders[e]=i)}createHttpProvider(e,t){const i=t||vn(e,this.namespace,this.client.core.projectId);if(!i)throw new Error(`No RPC url provided for chainId: ${e}`);return new bn(new Jn(i,qt("disableProviderPing")))}}class FN{constructor(e){this.name="near",this.namespace=e.namespace,this.events=qt("events"),this.client=qt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const i=t||vn(`${this.name}:${e}`,this.namespace);if(!i)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,i)}this.events.emit(mn.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var i;e[t]=this.createHttpProvider(t,(i=this.namespace.rpcMap)==null?void 0:i[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const i=this.createHttpProvider(e,t);i&&(this.httpProviders[e]=i)}createHttpProvider(e,t){const i=t||vn(e,this.namespace);return typeof i>"u"?void 0:new bn(new Jn(i,qt("disableProviderPing")))}}class jN{constructor(e){this.name=Qa,this.namespace=e.namespace,this.events=qt("events"),this.client=qt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace.chains=[...new Set((this.namespace.chains||[]).concat(e.chains||[]))],this.namespace.accounts=[...new Set((this.namespace.accounts||[]).concat(e.accounts||[]))],this.namespace.methods=[...new Set((this.namespace.methods||[]).concat(e.methods||[]))],this.namespace.events=[...new Set((this.namespace.events||[]).concat(e.events||[]))],this.httpProviders=this.createHttpProviders()}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider(e.chainId).request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(mn.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){var e,t;const i={};return(t=(e=this.namespace)==null?void 0:e.accounts)==null||t.forEach(n=>{const a=cc(n);i[`${a.namespace}:${a.reference}`]=this.createHttpProvider(n)}),i}getHttpProvider(e){const t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const i=this.createHttpProvider(e,t);i&&(this.httpProviders[e]=i)}createHttpProvider(e,t){const i=t||vn(e,this.namespace,this.client.core.projectId);if(!i)throw new Error(`No RPC url provided for chainId: ${e}`);return new bn(new Jn(i,qt("disableProviderPing")))}}var kN=Object.defineProperty,HN=Object.defineProperties,KN=Object.getOwnPropertyDescriptors,Rv=Object.getOwnPropertySymbols,VN=Object.prototype.hasOwnProperty,GN=Object.prototype.propertyIsEnumerable,Nv=(r,e,t)=>e in r?kN(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Xf=(r,e)=>{for(var t in e||(e={}))VN.call(e,t)&&Nv(r,t,e[t]);if(Rv)for(var t of Rv(e))GN.call(e,t)&&Nv(r,t,e[t]);return r},Jl=(r,e)=>HN(r,KN(e));class s0{constructor(e){this.events=new Cd,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=e,this.logger=typeof(e==null?void 0:e.logger)<"u"&&typeof(e==null?void 0:e.logger)!="string"?e.logger:Bc(Wh({level:(e==null?void 0:e.logger)||Av})),this.disableProviderPing=(e==null?void 0:e.disableProviderPing)||!1}static async init(e){const t=new s0(e);return await t.initialize(),t}async request(e,t,i){const[n,a]=this.validateChain(t);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(n).request({request:Xf({},e),chainId:`${n}:${a}`,topic:this.session.topic,expiry:i})}sendAsync(e,t,i,n){const a=new Date().getTime();this.request(e,i,n).then(c=>t(null,Jh(a,c))).catch(c=>t(c,void 0))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:(e=this.session)==null?void 0:e.topic,reason:$t("USER_DISCONNECTED")}),await this.cleanup()}async connect(e){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(e),await this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}async authenticate(e,t){if(!this.client)throw new Error("Sign Client not initialized");this.setNamespaces(e),await this.cleanupPendingPairings();const{uri:i,response:n}=await this.client.authenticate(e,t);i&&(this.uri=i,this.events.emit("display_uri",i));const a=await n();if(this.session=a.session,this.session){const c=Iv(this.session.namespaces);this.namespaces=Vl(this.namespaces,c),this.persist("namespaces",this.namespaces),this.onConnect()}return a}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}removeListener(e,t){this.events.removeListener(e,t)}off(e,t){this.events.off(e,t)}get isWalletConnect(){return!0}async pair(e){this.shouldAbortPairingAttempt=!1;let t=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(t>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:i,approval:n}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});i&&(this.uri=i,this.events.emit("display_uri",i)),await n().then(a=>{this.session=a;const c=Iv(a.namespaces);this.namespaces=Vl(this.namespaces,c),this.persist("namespaces",this.namespaces)}).catch(a=>{if(a.message!==um)throw a;t++})}while(!this.session);return this.onConnect(),this.session}setDefaultChain(e,t){try{if(!this.session)return;const[i,n]=this.validateChain(e),a=this.getProvider(i);a.name===Qa?a.setDefaultChain(`${i}:${n}`,t):a.setDefaultChain(n,t)}catch(i){if(!/Please call connect/.test(i.message))throw i}}async cleanupPendingPairings(e={}){this.logger.info("Cleaning up inactive pairings...");const t=this.client.pairing.getAll();if(Hn(t)){for(const i of t)e.deletePairings?this.client.core.expirer.set(i.topic,0):await this.client.core.relayer.subscriber.unsubscribe(i.topic);this.logger.info(`Inactive pairings cleared: ${t.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces"),this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const e=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[e]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await oN.init({core:this.providerOpts.core,logger:this.providerOpts.logger||Av,relayUrl:this.providerOpts.relayUrl||vN,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name,customStoragePrefix:this.providerOpts.customStoragePrefix,telemetryEnabled:this.providerOpts.telemetryEnabled}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const e=[...new Set(Object.keys(this.session.namespaces).map(t=>oc(t)))];Wl("client",this.client),Wl("events",this.events),Wl("disableProviderPing",this.disableProviderPing),e.forEach(t=>{if(!this.session)return;const i=MN(t,this.session),n=dm(i),a=Vl(this.namespaces,this.optionalNamespaces),c=Jl(Xf({},a[t]),{accounts:i,chains:n});switch(t){case"eip155":this.rpcProviders[t]=new TN({namespace:c});break;case"algorand":this.rpcProviders[t]=new qN({namespace:c});break;case"solana":this.rpcProviders[t]=new BN({namespace:c});break;case"cosmos":this.rpcProviders[t]=new LN({namespace:c});break;case"polkadot":this.rpcProviders[t]=new DN({namespace:c});break;case"cip34":this.rpcProviders[t]=new UN({namespace:c});break;case"elrond":this.rpcProviders[t]=new $N({namespace:c});break;case"multiversx":this.rpcProviders[t]=new zN({namespace:c});break;case"near":this.rpcProviders[t]=new FN({namespace:c});break;default:this.rpcProviders[Qa]?this.rpcProviders[Qa].updateNamespace(c):this.rpcProviders[Qa]=new jN({namespace:c})}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",e=>{this.events.emit("session_ping",e)}),this.client.on("session_event",e=>{const{params:t}=e,{event:i}=t;if(i.name==="accountsChanged"){const n=i.data;n&&Hn(n)&&this.events.emit("accountsChanged",n.map(IN))}else if(i.name==="chainChanged"){const n=t.chainId,a=t.event.data,c=oc(n),u=Gl(n)!==Gl(a)?`${c}:${Gl(a)}`:n;this.onChainChanged(u)}else this.events.emit(i.name,i.data);this.events.emit("session_event",e)}),this.client.on("session_update",({topic:e,params:t})=>{var i;const{namespaces:n}=t,a=(i=this.client)==null?void 0:i.session.get(e);this.session=Jl(Xf({},a),{namespaces:n}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:t})}),this.client.on("session_delete",async e=>{await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",Jl(Xf({},$t("USER_DISCONNECTED")),{data:e.topic}))}),this.on(mn.DEFAULT_CHAIN_CHANGED,e=>{this.onChainChanged(e,!0)})}getProvider(e){return this.rpcProviders[e]||this.rpcProviders[Qa]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(e=>{var t;this.getProvider(e).updateNamespace((t=this.session)==null?void 0:t.namespaces[e])})}setNamespaces(e){const{namespaces:t,optionalNamespaces:i,sessionProperties:n}=e;t&&Object.keys(t).length&&(this.namespaces=t),i&&Object.keys(i).length&&(this.optionalNamespaces=i),this.sessionProperties=n,this.persist("namespaces",t),this.persist("optionalNamespaces",i)}validateChain(e){const[t,i]=(e==null?void 0:e.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[t,i];if(t&&!Object.keys(this.namespaces||{}).map(c=>oc(c)).includes(t))throw new Error(`Namespace '${t}' is not configured. Please call connect() first with namespace config.`);if(t&&i)return[t,i];const n=oc(Object.keys(this.namespaces)[0]),a=this.rpcProviders[n].getDefaultChain();return[n,a]}async requestAccounts(){const[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}onChainChanged(e,t=!1){if(!this.namespaces)return;const[i,n]=this.validateChain(e);n&&(t||this.getProvider(i).setDefaultChain(n),this.namespaces[i]?this.namespaces[i].defaultChain=n:this.namespaces[`${i}:${n}`]?this.namespaces[`${i}:${n}`].defaultChain=n:this.namespaces[`${i}:${n}`]={defaultChain:n},this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",n))}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(e,t){this.client.core.storage.setItem(`${Ev}/${e}`,t)}async getFromStore(e){return await this.client.core.storage.getItem(`${Ev}/${e}`)}}const WN=s0,JN="wc",YN="ethereum_provider",QN=`${JN}@2:${YN}:`,XN="https://rpc.walletconnect.com/v1/",Id=["eth_sendTransaction","personal_sign"],ZN=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode","wallet_sendCalls","wallet_getCapabilities","wallet_getCallsStatus","wallet_showCallsStatus"],Dd=["chainChanged","accountsChanged"],eT=["chainChanged","accountsChanged","message","disconnect","connect"];var tT=Object.defineProperty,rT=Object.defineProperties,iT=Object.getOwnPropertyDescriptors,Tv=Object.getOwnPropertySymbols,nT=Object.prototype.hasOwnProperty,sT=Object.prototype.propertyIsEnumerable,Bv=(r,e,t)=>e in r?tT(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Xa=(r,e)=>{for(var t in e||(e={}))nT.call(e,t)&&Bv(r,t,e[t]);if(Tv)for(var t of Tv(e))sT.call(e,t)&&Bv(r,t,e[t]);return r},Yl=(r,e)=>rT(r,iT(e));function Mh(r){return Number(r[0].split(":")[1])}function Zf(r){return`0x${r.toString(16)}`}function aT(r){const{chains:e,optionalChains:t,methods:i,optionalMethods:n,events:a,optionalEvents:c,rpcMap:u}=r;if(!Hn(e))throw new Error("Invalid chains");const b={chains:e,methods:i||Id,events:a||Dd,rpcMap:Xa({},e.length?{[Mh(e)]:u[Mh(e)]}:{})},d=a==null?void 0:a.filter(P=>!Dd.includes(P)),m=i==null?void 0:i.filter(P=>!Id.includes(P));if(!t&&!c&&!n&&!(d!=null&&d.length)&&!(m!=null&&m.length))return{required:e.length?b:void 0};const A=(d==null?void 0:d.length)&&(m==null?void 0:m.length)||!t,O={chains:[...new Set(A?b.chains.concat(t||[]):t)],methods:[...new Set(b.methods.concat(n!=null&&n.length?n:ZN))],events:[...new Set(b.events.concat(c!=null&&c.length?c:eT))],rpcMap:u};return{required:e.length?b:void 0,optional:t.length?O:void 0}}class gm{constructor(){this.events=new Ki.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=QN,this.on=(e,t)=>(this.events.on(e,t),this),this.once=(e,t)=>(this.events.once(e,t),this),this.removeListener=(e,t)=>(this.events.removeListener(e,t),this),this.off=(e,t)=>(this.events.off(e,t),this),this.parseAccount=e=>this.isCompatibleChainId(e)?this.parseAccountId(e).address:e,this.signer={},this.rpc={}}static async init(e){const t=new gm;return await t.initialize(e),t}async request(e,t){return await this.signer.request(e,this.formatChainId(this.chainId),t)}sendAsync(e,t,i){this.signer.sendAsync(e,t,this.formatChainId(this.chainId),i)}get connected(){return this.signer.client?this.signer.client.core.relayer.connected:!1}get connecting(){return this.signer.client?this.signer.client.core.relayer.connecting:!1}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(e){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(e);const{required:t,optional:i}=aT(this.rpc);try{const n=await new Promise(async(c,u)=>{var b;this.rpc.showQrModal&&((b=this.modal)==null||b.subscribeModal(d=>{!d.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),u(new Error("Connection request reset. Please try again.")))})),await this.signer.connect(Yl(Xa({namespaces:Xa({},t&&{[this.namespace]:t})},i&&{optionalNamespaces:{[this.namespace]:i}}),{pairingTopic:e==null?void 0:e.pairingTopic})).then(d=>{c(d)}).catch(d=>{u(new Error(d.message))})});if(!n)return;const a=U1(n.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:a),this.setAccounts(a),this.events.emit("connect",{chainId:Zf(this.chainId)})}catch(n){throw this.signer.logger.error(n),n}finally{this.modal&&this.modal.closeModal()}}async authenticate(e,t){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts({chains:e==null?void 0:e.chains});try{const i=await new Promise(async(a,c)=>{var u;this.rpc.showQrModal&&((u=this.modal)==null||u.subscribeModal(b=>{!b.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),c(new Error("Connection request reset. Please try again.")))})),await this.signer.authenticate(Yl(Xa({},e),{chains:this.rpc.chains}),t).then(b=>{a(b)}).catch(b=>{c(new Error(b.message))})}),n=i.session;if(n){const a=U1(n.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:a),this.setAccounts(a),this.events.emit("connect",{chainId:Zf(this.chainId)})}return i}catch(i){throw this.signer.logger.error(i),i}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",e=>{const{params:t}=e,{event:i}=t;i.name==="accountsChanged"?(this.accounts=this.parseAccounts(i.data),this.events.emit("accountsChanged",this.accounts)):i.name==="chainChanged"?this.setChainId(this.formatChainId(i.data)):this.events.emit(i.name,i.data),this.events.emit("session_event",e)}),this.signer.on("chainChanged",e=>{const t=parseInt(e);this.chainId=t,this.events.emit("chainChanged",Zf(this.chainId)),this.persist()}),this.signer.on("session_update",e=>{this.events.emit("session_update",e)}),this.signer.on("session_delete",e=>{this.reset(),this.events.emit("session_delete",e),this.events.emit("disconnect",Yl(Xa({},$t("USER_DISCONNECTED")),{data:e.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",e=>{var t,i;this.rpc.showQrModal&&((t=this.modal)==null||t.closeModal(),(i=this.modal)==null||i.openModal({uri:e})),this.events.emit("display_uri",e)})}switchEthereumChain(e){this.request({method:"wallet_switchEthereumChain",params:[{chainId:e.toString(16)}]})}isCompatibleChainId(e){return typeof e=="string"?e.startsWith(`${this.namespace}:`):!1}formatChainId(e){return`${this.namespace}:${e}`}parseChainId(e){return Number(e.split(":")[1])}setChainIds(e){const t=e.filter(i=>this.isCompatibleChainId(i)).map(i=>this.parseChainId(i));t.length&&(this.chainId=t[0],this.events.emit("chainChanged",Zf(this.chainId)),this.persist())}setChainId(e){if(this.isCompatibleChainId(e)){const t=this.parseChainId(e);this.chainId=t,this.switchEthereumChain(t)}}parseAccountId(e){const[t,i,n]=e.split(":");return{chainId:`${t}:${i}`,address:n}}setAccounts(e){this.accounts=e.filter(t=>this.parseChainId(this.parseAccountId(t).chainId)===this.chainId).map(t=>this.parseAccountId(t).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(e){var t,i;const n=(t=e==null?void 0:e.chains)!=null?t:[],a=(i=e==null?void 0:e.optionalChains)!=null?i:[],c=n.concat(a);if(!c.length)throw new Error("No chains specified in either `chains` or `optionalChains`");const u=n.length?(e==null?void 0:e.methods)||Id:[],b=n.length?(e==null?void 0:e.events)||Dd:[],d=(e==null?void 0:e.optionalMethods)||[],m=(e==null?void 0:e.optionalEvents)||[],A=(e==null?void 0:e.rpcMap)||this.buildRpcMap(c,e.projectId),O=(e==null?void 0:e.qrModalOptions)||void 0;return{chains:n==null?void 0:n.map(P=>this.formatChainId(P)),optionalChains:a.map(P=>this.formatChainId(P)),methods:u,events:b,optionalMethods:d,optionalEvents:m,rpcMap:A,showQrModal:!!(e!=null&&e.showQrModal),qrModalOptions:O,projectId:e.projectId,metadata:e.metadata}}buildRpcMap(e,t){const i={};return e.forEach(n=>{i[n]=this.getRpcUrl(n,t)}),i}async initialize(e){if(this.rpc=this.getRpcConfig(e),this.chainId=this.rpc.chains.length?Mh(this.rpc.chains):Mh(this.rpc.optionalChains),this.signer=await WN.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:e.disableProviderPing,relayUrl:e.relayUrl,storageOptions:e.storageOptions,customStoragePrefix:e.customStoragePrefix,telemetryEnabled:e.telemetryEnabled}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let t;try{const{WalletConnectModal:i}=await G8(()=>import("./index-DkbPsACs.js").then(n=>n.i),__vite__mapDeps([0,1,2]));t=i}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(t)try{this.modal=new t(Xa({projectId:this.rpc.projectId},this.rpc.qrModalOptions))}catch(i){throw this.signer.logger.error(i),new Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(e){if(!e)return;const{chains:t,optionalChains:i,rpcMap:n}=e;t&&Hn(t)&&(this.rpc.chains=t.map(a=>this.formatChainId(a)),t.forEach(a=>{this.rpc.rpcMap[a]=(n==null?void 0:n[a])||this.getRpcUrl(a)})),i&&Hn(i)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=i==null?void 0:i.map(a=>this.formatChainId(a)),i.forEach(a=>{this.rpc.rpcMap[a]=(n==null?void 0:n[a])||this.getRpcUrl(a)}))}getRpcUrl(e,t){var i;return((i=this.rpc.rpcMap)==null?void 0:i[e])||`${XN}?chainId=eip155:${e}&projectId=${t||this.rpc.projectId}`}async loadPersistedSession(){if(this.session)try{const e=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),t=this.session.namespaces[`${this.namespace}:${e}`]?this.session.namespaces[`${this.namespace}:${e}`]:this.session.namespaces[this.namespace];this.setChainIds(e?[this.formatChainId(e)]:t==null?void 0:t.accounts),this.setAccounts(t==null?void 0:t.accounts)}catch(e){this.signer.logger.error("Failed to load persisted session, clearing state..."),this.signer.logger.error(e),await this.disconnect().catch(t=>this.signer.logger.warn(t))}}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(e){return typeof e=="string"||e instanceof String?[this.parseAccount(e)]:e.map(t=>this.parseAccount(t))}}export{eT as OPTIONAL_EVENTS,ZN as OPTIONAL_METHODS,Dd as REQUIRED_EVENTS,Id as REQUIRED_METHODS,gm as default}; diff --git a/assets/inherits_browser-DCQ5xBDd.js b/assets/inherits_browser-B1P7kPq9.js similarity index 99% rename from assets/inherits_browser-DCQ5xBDd.js rename to assets/inherits_browser-B1P7kPq9.js index 0859664..3baf654 100644 --- a/assets/inherits_browser-DCQ5xBDd.js +++ b/assets/inherits_browser-B1P7kPq9.js @@ -1 +1 @@ -import{bA as N,bB as R}from"./index-BwZaYMab.js";var h={exports:{}},a=typeof Reflect=="object"?Reflect:null,m=a&&typeof a.apply=="function"?a.apply:function(e,n,r){return Function.prototype.apply.call(e,n,r)},l;a&&typeof a.ownKeys=="function"?l=a.ownKeys:Object.getOwnPropertySymbols?l=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:l=function(e){return Object.getOwnPropertyNames(e)};function A(t){console&&console.warn&&console.warn(t)}var L=Number.isNaN||function(e){return e!==e};function o(){o.init.call(this)}h.exports=o;h.exports.once=T;o.EventEmitter=o;o.prototype._events=void 0;o.prototype._eventsCount=0;o.prototype._maxListeners=void 0;var y=10;function p(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return y},set:function(t){if(typeof t!="number"||t<0||L(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");y=t}});o.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};o.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||L(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function _(t){return t._maxListeners===void 0?o.defaultMaxListeners:t._maxListeners}o.prototype.getMaxListeners=function(){return _(this)};o.prototype.emit=function(e){for(var n=[],r=1;r0&&(s=n[0]),s instanceof Error)throw s;var u=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw u.context=s,u}var c=f[e];if(c===void 0)return!1;if(typeof c=="function")m(c,this,n);else for(var d=c.length,j=E(c,d),r=0;r0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=s.length,A(u)}return t}o.prototype.addListener=function(e,n){return g(this,e,n,!1)};o.prototype.on=o.prototype.addListener;o.prototype.prependListener=function(e,n){return g(this,e,n,!0)};function M(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function b(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=M.bind(r);return i.listener=n,r.wrapFn=i,i}o.prototype.once=function(e,n){return p(n),this.on(e,b(this,e,n)),this};o.prototype.prependOnceListener=function(e,n){return p(n),this.prependListener(e,b(this,e,n)),this};o.prototype.removeListener=function(e,n){var r,i,f,s,u;if(p(n),i=this._events,i===void 0)return this;if(r=i[e],r===void 0)return this;if(r===n||r.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,r.listener||n));else if(typeof r!="function"){for(f=-1,s=r.length-1;s>=0;s--)if(r[s]===n||r[s].listener===n){u=r[s].listener,f=s;break}if(f<0)return this;f===0?r.shift():C(r,f),r.length===1&&(i[e]=r[0]),i.removeListener!==void 0&&this.emit("removeListener",e,u||n)}return this};o.prototype.off=o.prototype.removeListener;o.prototype.removeAllListeners=function(e){var n,r,i;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[e]),this;if(arguments.length===0){var f=Object.keys(r),s;for(i=0;i=0;i--)this.removeListener(e,n[i]);return this};function w(t,e,n){var r=t._events;if(r===void 0)return[];var i=r[e];return i===void 0?[]:typeof i=="function"?n?[i.listener||i]:[i]:n?P(i):E(i,i.length)}o.prototype.listeners=function(e){return w(this,e,!0)};o.prototype.rawListeners=function(e){return w(this,e,!1)};o.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):x.call(t,e)};o.prototype.listenerCount=x;function x(t){var e=this._events;if(e!==void 0){var n=e[t];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}o.prototype.eventNames=function(){return this._eventsCount>0?l(this._events):[]};function E(t,e){for(var n=new Array(e),r=0;r0&&(s=n[0]),s instanceof Error)throw s;var u=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw u.context=s,u}var c=f[e];if(c===void 0)return!1;if(typeof c=="function")m(c,this,n);else for(var d=c.length,j=E(c,d),r=0;r0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=s.length,A(u)}return t}o.prototype.addListener=function(e,n){return g(this,e,n,!1)};o.prototype.on=o.prototype.addListener;o.prototype.prependListener=function(e,n){return g(this,e,n,!0)};function M(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function b(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=M.bind(r);return i.listener=n,r.wrapFn=i,i}o.prototype.once=function(e,n){return p(n),this.on(e,b(this,e,n)),this};o.prototype.prependOnceListener=function(e,n){return p(n),this.prependListener(e,b(this,e,n)),this};o.prototype.removeListener=function(e,n){var r,i,f,s,u;if(p(n),i=this._events,i===void 0)return this;if(r=i[e],r===void 0)return this;if(r===n||r.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,r.listener||n));else if(typeof r!="function"){for(f=-1,s=r.length-1;s>=0;s--)if(r[s]===n||r[s].listener===n){u=r[s].listener,f=s;break}if(f<0)return this;f===0?r.shift():C(r,f),r.length===1&&(i[e]=r[0]),i.removeListener!==void 0&&this.emit("removeListener",e,u||n)}return this};o.prototype.off=o.prototype.removeListener;o.prototype.removeAllListeners=function(e){var n,r,i;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[e]),this;if(arguments.length===0){var f=Object.keys(r),s;for(i=0;i=0;i--)this.removeListener(e,n[i]);return this};function w(t,e,n){var r=t._events;if(r===void 0)return[];var i=r[e];return i===void 0?[]:typeof i=="function"?n?[i.listener||i]:[i]:n?P(i):E(i,i.length)}o.prototype.listeners=function(e){return w(this,e,!0)};o.prototype.rawListeners=function(e){return w(this,e,!1)};o.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):x.call(t,e)};o.prototype.listenerCount=x;function x(t){var e=this._events;if(e!==void 0){var n=e[t];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}o.prototype.eventNames=function(){return this._eventsCount>0?l(this._events):[]};function E(t,e){for(var n=new Array(e),r=0;r0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function O(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function fe(e,t){ce(e);const s=t.outputLen;if(e.length>te&A)}:{h:Number(e>>te&A)|0,l:Number(e&A)|0}}function $e(e,t=!1){let s=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let i=0;ie<>>32-s,_e=(e,t,s)=>t<>>32-s,ke=(e,t,s)=>t<>>64-s,Ve=(e,t,s)=>e<>>64-s;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Se=e=>e instanceof Uint8Array,Ne=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),k=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),x=(e,t)=>e<<32-t|e>>>t,je=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!je)throw new Error("Non little-endian hardware is not supported");function Me(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function M(e){if(typeof e=="string"&&(e=Me(e)),!Se(e))throw new Error(`expected Uint8Array, got ${typeof e}`);return e}class ue{clone(){return this._cloneInto()}}function he(e){const t=n=>e().update(M(n)).digest(),s=e();return t.outputLen=s.outputLen,t.blockLen=s.blockLen,t.create=()=>e(),t}const[le,de,be]=[[],[],[]],Re=BigInt(0),U=BigInt(1),De=BigInt(2),Ke=BigInt(7),Xe=BigInt(256),We=BigInt(113);for(let e=0,t=U,s=1,n=0;e<24;e++){[s,n]=[n,(2*s+3*n)%5],le.push(2*(5*n+s)),de.push((e+1)*(e+2)/2%64);let i=Re;for(let r=0;r<7;r++)t=(t<>Ke)*We)%Xe,t&De&&(i^=U<<(U<s>32?ke(e,t,s):Ce(e,t,s),ie=(e,t,s)=>s>32?Ve(e,t,s):_e(e,t,s);function Ze(e,t=24){const s=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let o=0;o<10;o++)s[o]=e[o]^e[o+10]^e[o+20]^e[o+30]^e[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,c=(o+2)%10,u=s[c],l=s[c+1],f=se(u,l,1)^s[a],p=ie(u,l,1)^s[a+1];for(let d=0;d<50;d+=10)e[o+d]^=f,e[o+d+1]^=p}let i=e[2],r=e[3];for(let o=0;o<24;o++){const a=de[o],c=se(i,r,a),u=ie(i,r,a),l=le[o];i=e[l],r=e[l+1],e[l]=c,e[l+1]=u}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)s[a]=e[o+a];for(let a=0;a<10;a++)e[o+a]^=~s[(a+2)%10]&s[(a+4)%10]}e[0]^=Ye[n],e[1]^=Je[n]}s.fill(0)}class R extends ue{constructor(t,s,n,i=!1,r=24){if(super(),this.blockLen=t,this.suffix=s,this.outputLen=n,this.enableXOF=i,this.rounds=r,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,ee(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=Ne(this.state)}keccak(){Ze(this.state32,this.rounds),this.posOut=0,this.pos=0}update(t){O(this);const{blockLen:s,state:n}=this;t=M(t);const i=t.length;for(let r=0;r=n&&this.keccak();const o=Math.min(n-this.posOut,r-i);t.set(s.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return ee(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(fe(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:s,suffix:n,outputLen:i,rounds:r,enableXOF:o}=this;return t||(t=new R(s,n,i,o,r)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=r,t.suffix=n,t.outputLen=i,t.enableXOF=o,t.destroyed=this.destroyed,t}}const Qe=(e,t,s)=>he(()=>new R(t,e,s)),qe=Qe(1,136,256/8);function et(e,t){return qe(j(e,{strict:!1})?ae(e):e)}class H extends b{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAddressError"})}}class pe extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}set(t,s){return super.set(t,s),this.maxSize&&this.size>this.maxSize&&this.delete(this.keys().next().value),this}}const V=new pe(8192);function tt(e,t){if(V.has(`${e}.${t}`))return V.get(`${e}.${t}`);const s=e.substring(2).toLowerCase(),n=et(Ae(s)),i=s.split("");for(let o=0;o<40;o+=2)n[o>>1]>>4>=8&&i[o]&&(i[o]=i[o].toUpperCase()),(n[o>>1]&15)>=8&&i[o+1]&&(i[o+1]=i[o+1].toUpperCase());const r=`0x${i.join("")}`;return V.set(`${e}.${t}`,r),r}const st=/^0x[a-fA-F0-9]{40}$/,S=new pe(8192);function $(e,t){const{strict:s=!0}=t??{};if(S.has(e))return S.get(e);const n=st.test(e)?e.toLowerCase()===e?!0:s?tt(e)===e:!0:!1;return S.set(e,n),n}function D(e){return`0x${e.reduce((t,s)=>t+s.replace("0x",""),"")}`}function it(e,t,s,{strict:n}={}){return j(e,{strict:!1})?ot(e,t,s,{strict:n}):nt(e,t,s,{strict:n})}function xe(e,t,s){if(F(e)!==s-t)throw new Fe({offset:s,position:"end",size:F(e)})}function nt(e,t,s,{strict:n}={}){const i=e.slice(t,s);return n&&xe(i,t,s),i}function ot(e,t,s,{strict:n}={}){const i=`0x${e.replace("0x","").slice(t*2,s*2)}`;return n&&xe(i,t,s),i}class ne extends b{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NegativeOffsetError"})}}class rt extends b{constructor({length:t,position:s}){super(`Position \`${s}\` is out of bounds (\`0 < position < ${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PositionOutOfBoundsError"})}}class at extends b{constructor({count:t,limit:s}){super(`Recursive read limit of \`${s}\` exceeded (recursive read count: \`${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RecursiveReadLimitExceededError"})}}const ct={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new at({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new rt({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new ne({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new ne({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const s=t??this.position;return this.assertPosition(s+e-1),this.bytes.subarray(s,s+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const s=this.inspectBytes(e);return this.position+=t??e,s},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function ye(e,{recursiveReadLimit:t=8192}={}){const s=Object.create(ct);return s.bytes=e,s.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),s.positionReadCount=new Map,s.recursiveReadLimit=t,s}function N(e,t="wei"){return ze(e,Oe[t])}function ft(e){const t=Object.entries(e).map(([n,i])=>i===void 0||i===!1?null:[n,i]).filter(Boolean),s=t.reduce((n,[i])=>Math.max(n,i.length),0);return t.map(([n,i])=>` ${`${n}:`.padEnd(s+1)} ${i}`).join(` +import{aR as j,b8 as ae,a_ as b,b7 as Ae,bn as F,b3 as Fe,be as ze,aZ as Oe,ba as P,bb as w,bh as z,b5 as L,aS as h,bo as q}from"./index-C6UBXeMY.js";function ee(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function ce(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function O(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function fe(e,t){ce(e);const s=t.outputLen;if(e.length>te&A)}:{h:Number(e>>te&A)|0,l:Number(e&A)|0}}function $e(e,t=!1){let s=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let i=0;ie<>>32-s,_e=(e,t,s)=>t<>>32-s,ke=(e,t,s)=>t<>>64-s,Ve=(e,t,s)=>e<>>64-s;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Se=e=>e instanceof Uint8Array,Ne=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),k=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),x=(e,t)=>e<<32-t|e>>>t,je=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!je)throw new Error("Non little-endian hardware is not supported");function Me(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function M(e){if(typeof e=="string"&&(e=Me(e)),!Se(e))throw new Error(`expected Uint8Array, got ${typeof e}`);return e}class ue{clone(){return this._cloneInto()}}function he(e){const t=n=>e().update(M(n)).digest(),s=e();return t.outputLen=s.outputLen,t.blockLen=s.blockLen,t.create=()=>e(),t}const[le,de,be]=[[],[],[]],Re=BigInt(0),U=BigInt(1),De=BigInt(2),Ke=BigInt(7),Xe=BigInt(256),We=BigInt(113);for(let e=0,t=U,s=1,n=0;e<24;e++){[s,n]=[n,(2*s+3*n)%5],le.push(2*(5*n+s)),de.push((e+1)*(e+2)/2%64);let i=Re;for(let r=0;r<7;r++)t=(t<>Ke)*We)%Xe,t&De&&(i^=U<<(U<s>32?ke(e,t,s):Ce(e,t,s),ie=(e,t,s)=>s>32?Ve(e,t,s):_e(e,t,s);function Ze(e,t=24){const s=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let o=0;o<10;o++)s[o]=e[o]^e[o+10]^e[o+20]^e[o+30]^e[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,c=(o+2)%10,u=s[c],l=s[c+1],f=se(u,l,1)^s[a],p=ie(u,l,1)^s[a+1];for(let d=0;d<50;d+=10)e[o+d]^=f,e[o+d+1]^=p}let i=e[2],r=e[3];for(let o=0;o<24;o++){const a=de[o],c=se(i,r,a),u=ie(i,r,a),l=le[o];i=e[l],r=e[l+1],e[l]=c,e[l+1]=u}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)s[a]=e[o+a];for(let a=0;a<10;a++)e[o+a]^=~s[(a+2)%10]&s[(a+4)%10]}e[0]^=Ye[n],e[1]^=Je[n]}s.fill(0)}class R extends ue{constructor(t,s,n,i=!1,r=24){if(super(),this.blockLen=t,this.suffix=s,this.outputLen=n,this.enableXOF=i,this.rounds=r,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,ee(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=Ne(this.state)}keccak(){Ze(this.state32,this.rounds),this.posOut=0,this.pos=0}update(t){O(this);const{blockLen:s,state:n}=this;t=M(t);const i=t.length;for(let r=0;r=n&&this.keccak();const o=Math.min(n-this.posOut,r-i);t.set(s.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return ee(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(fe(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:s,suffix:n,outputLen:i,rounds:r,enableXOF:o}=this;return t||(t=new R(s,n,i,o,r)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=r,t.suffix=n,t.outputLen=i,t.enableXOF=o,t.destroyed=this.destroyed,t}}const Qe=(e,t,s)=>he(()=>new R(t,e,s)),qe=Qe(1,136,256/8);function et(e,t){return qe(j(e,{strict:!1})?ae(e):e)}class H extends b{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAddressError"})}}class pe extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}set(t,s){return super.set(t,s),this.maxSize&&this.size>this.maxSize&&this.delete(this.keys().next().value),this}}const V=new pe(8192);function tt(e,t){if(V.has(`${e}.${t}`))return V.get(`${e}.${t}`);const s=e.substring(2).toLowerCase(),n=et(Ae(s)),i=s.split("");for(let o=0;o<40;o+=2)n[o>>1]>>4>=8&&i[o]&&(i[o]=i[o].toUpperCase()),(n[o>>1]&15)>=8&&i[o+1]&&(i[o+1]=i[o+1].toUpperCase());const r=`0x${i.join("")}`;return V.set(`${e}.${t}`,r),r}const st=/^0x[a-fA-F0-9]{40}$/,S=new pe(8192);function $(e,t){const{strict:s=!0}=t??{};if(S.has(e))return S.get(e);const n=st.test(e)?e.toLowerCase()===e?!0:s?tt(e)===e:!0:!1;return S.set(e,n),n}function D(e){return`0x${e.reduce((t,s)=>t+s.replace("0x",""),"")}`}function it(e,t,s,{strict:n}={}){return j(e,{strict:!1})?ot(e,t,s,{strict:n}):nt(e,t,s,{strict:n})}function xe(e,t,s){if(F(e)!==s-t)throw new Fe({offset:s,position:"end",size:F(e)})}function nt(e,t,s,{strict:n}={}){const i=e.slice(t,s);return n&&xe(i,t,s),i}function ot(e,t,s,{strict:n}={}){const i=`0x${e.replace("0x","").slice(t*2,s*2)}`;return n&&xe(i,t,s),i}class ne extends b{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NegativeOffsetError"})}}class rt extends b{constructor({length:t,position:s}){super(`Position \`${s}\` is out of bounds (\`0 < position < ${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PositionOutOfBoundsError"})}}class at extends b{constructor({count:t,limit:s}){super(`Recursive read limit of \`${s}\` exceeded (recursive read count: \`${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RecursiveReadLimitExceededError"})}}const ct={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new at({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new rt({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new ne({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new ne({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const s=t??this.position;return this.assertPosition(s+e-1),this.bytes.subarray(s,s+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const s=this.inspectBytes(e);return this.position+=t??e,s},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function ye(e,{recursiveReadLimit:t=8192}={}){const s=Object.create(ct);return s.bytes=e,s.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),s.positionReadCount=new Map,s.recursiveReadLimit=t,s}function N(e,t="wei"){return ze(e,Oe[t])}function ft(e){const t=Object.entries(e).map(([n,i])=>i===void 0||i===!1?null:[n,i]).filter(Boolean),s=t.reduce((n,[i])=>Math.max(n,i.length),0);return t.map(([n,i])=>` ${`${n}:`.padEnd(s+1)} ${i}`).join(` `)}class ut extends b{constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidLegacyVError"})}}class ht extends b{constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",ft(t),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- a Legacy Transaction with `gasPrice`"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializableTransactionError"})}}class lt extends b{constructor({storageKey:t}){super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Math.floor((t.length-2)/2)} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStorageKeySizeError"})}}class C extends b{constructor({cause:t,maxFeePerGas:s}={}){super(`The fee cap (\`maxFeePerGas\`${s?` = ${N(s)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooHigh"})}}Object.defineProperty(C,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class me extends b{constructor({cause:t,maxPriorityFeePerGas:s,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${s?` = ${N(s)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${N(n)} gwei`:""}).`].join(` `),{cause:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TipAboveFeeCapError"})}}Object.defineProperty(me,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});function _(e,t){return({exclude:s,format:n})=>({exclude:s,format:i=>{const r=t(i);if(s)for(const o of s)delete r[o];return{...r,...n(i)}},type:e})}const dt={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3"};function bt(e){const t={};return typeof e.accessList<"u"&&(t.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(t.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?t.blobs=e.blobs.map(s=>P(s)):t.blobs=e.blobs),typeof e.data<"u"&&(t.data=e.data),typeof e.from<"u"&&(t.from=e.from),typeof e.gas<"u"&&(t.gas=w(e.gas)),typeof e.gasPrice<"u"&&(t.gasPrice=w(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(t.maxFeePerBlobGas=w(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(t.maxFeePerGas=w(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(t.maxPriorityFeePerGas=w(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(t.nonce=w(e.nonce)),typeof e.to<"u"&&(t.to=e.to),typeof e.type<"u"&&(t.type=dt[e.type]),typeof e.value<"u"&&(t.value=w(e.value)),t}const Dt=_("transactionRequest",bt),ge={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844"};function we(e){const t={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?z(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?z(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?ge[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return t.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof t.v=="bigint"){if(t.v===0n||t.v===27n)return 0;if(t.v===1n||t.v===28n)return 1;if(t.v>=35n)return t.v%2n===0n?1:0}})(),t.type==="legacy"&&(delete t.accessList,delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas,delete t.yParity),t.type==="eip2930"&&(delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),t.type==="eip1559"&&delete t.maxFeePerBlobGas,t}const Kt=_("transaction",we);function pt(e){var s;const t=(s=e.transactions)==null?void 0:s.map(n=>typeof n=="string"?n:we(n));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:t,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}const Xt=_("block",pt);function Pe(e){const{kzg:t}=e,s=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),n=typeof e.blobs[0]=="string"?e.blobs.map(r=>L(r)):e.blobs,i=[];for(const r of n)i.push(Uint8Array.from(t.blobToKzgCommitment(r)));return s==="bytes"?i:i.map(r=>P(r))}function Ie(e){const{kzg:t}=e,s=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),n=typeof e.blobs[0]=="string"?e.blobs.map(o=>L(o)):e.blobs,i=typeof e.commitments[0]=="string"?e.commitments.map(o=>L(o)):e.commitments,r=[];for(let o=0;oP(o))}function xt(e,t,s,n){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,s,n);const i=BigInt(32),r=BigInt(4294967295),o=Number(s>>i&r),a=Number(s&r),c=n?4:0,u=n?0:4;e.setUint32(t+c,o,n),e.setUint32(t+u,a,n)}class yt extends ue{constructor(t,s,n,i){super(),this.blockLen=t,this.outputLen=s,this.padOffset=n,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=k(this.buffer)}update(t){O(this);const{view:s,buffer:n,blockLen:i}=this;t=M(t);const r=t.length;for(let o=0;oi-o&&(this.process(n,0),o=0);for(let f=o;fl.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;fe&t^~e&s,gt=(e,t,s)=>e&t^e&s^t&s,wt=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),y=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),m=new Uint32Array(64);class Pt extends yt{constructor(){super(64,32,8,!1),this.A=y[0]|0,this.B=y[1]|0,this.C=y[2]|0,this.D=y[3]|0,this.E=y[4]|0,this.F=y[5]|0,this.G=y[6]|0,this.H=y[7]|0}get(){const{A:t,B:s,C:n,D:i,E:r,F:o,G:a,H:c}=this;return[t,s,n,i,r,o,a,c]}set(t,s,n,i,r,o,a,c){this.A=t|0,this.B=s|0,this.C=n|0,this.D=i|0,this.E=r|0,this.F=o|0,this.G=a|0,this.H=c|0}process(t,s){for(let f=0;f<16;f++,s+=4)m[f]=t.getUint32(s,!1);for(let f=16;f<64;f++){const p=m[f-15],d=m[f-2],G=x(p,7)^x(p,18)^p>>>3,I=x(d,17)^x(d,19)^d>>>10;m[f]=I+m[f-7]+G+m[f-16]|0}let{A:n,B:i,C:r,D:o,E:a,F:c,G:u,H:l}=this;for(let f=0;f<64;f++){const p=x(a,6)^x(a,11)^x(a,25),d=l+p+mt(a,c,u)+wt[f]+m[f]|0,I=(x(n,2)^x(n,13)^x(n,22))+gt(n,i,r)|0;l=u,u=c,c=a,a=o+d|0,o=r,r=i,i=n,n=d+I|0}n=n+this.A|0,i=i+this.B|0,r=r+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,u=u+this.G|0,l=l+this.H|0,this.set(n,i,r,o,a,c,u,l)}roundClean(){m.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const It=he(()=>new Pt);function Bt(e,t){const s=t||"hex",n=It(j(e,{strict:!1})?ae(e):e);return s==="bytes"?n:h(n)}function vt(e){const{commitment:t,version:s=1}=e,n=e.to??(typeof t=="string"?"hex":"bytes"),i=Bt(t,"bytes");return i.set([s],0),n==="bytes"?i:P(i)}function Ut(e){const{commitments:t,version:s}=e,n=e.to??(typeof t[0]=="string"?"hex":"bytes"),i=[];for(const r of t)i.push(vt({commitment:r,to:n,version:s}));return i}const oe=6,Be=32,K=4096,ve=Be*K,re=ve*oe-1-1*K*oe,Ue=1;class Lt extends b{constructor({maxSize:t,size:s}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${s} bytes`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BlobSizeTooLargeError"})}}class Le extends b{constructor(){super("Blob data must not be empty."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EmptyBlobError"})}}class Et extends b{constructor({hash:t,size:s}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${s}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidVersionedHashSizeError"})}}class Gt extends b{constructor({hash:t,version:s}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${Ue}`,`Received: ${s}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidVersionedHashVersionError"})}}function Tt(e){const t=e.to??(typeof e.data=="string"?"hex":"bytes"),s=typeof e.data=="string"?L(e.data):e.data,n=F(s);if(!n)throw new Le;if(n>re)throw new Lt({maxSize:re,size:n});const i=[];let r=!0,o=0;for(;r;){const a=ye(new Uint8Array(ve));let c=0;for(;ca.bytes):i.map(a=>P(a.bytes))}function At(e){const{data:t,kzg:s,to:n}=e,i=e.blobs??Tt({data:t,to:n}),r=e.commitments??Pe({blobs:i,kzg:s,to:n}),o=e.proofs??Ie({blobs:i,commitments:r,kzg:s,to:n}),a=[];for(let c=0;cEe(t))):Ht(e)}function Ot(e){const t=e.reduce((i,r)=>i+r.length,0),s=Ge(t);return{length:t<=55?1+t:1+s+t,encode(i){t<=55?i.pushByte(192+t):(i.pushByte(247+s),s===1?i.pushUint8(t):s===2?i.pushUint16(t):s===3?i.pushUint24(t):i.pushUint32(t));for(const{encode:r}of e)r(i)}}}function Ht(e){const t=typeof e=="string"?L(e):e,s=Ge(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+s+t.length,encode(i){t.length===1&&t[0]<128?i.pushBytes(t):t.length<=55?(i.pushByte(128+t.length),i.pushBytes(t)):(i.pushByte(183+s),s===1?i.pushUint8(t.length):s===2?i.pushUint16(t.length):s===3?i.pushUint24(t.length):i.pushUint32(t.length),i.pushBytes(t))}}}function Ge(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new b("Length is too large.")}const $t={"0x0":"reverted","0x1":"success"};function Ct(e){const t={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(s=>zt(s)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?z(e.transactionIndex):null,status:e.status?$t[e.status]:null,type:e.type?ge[e.type]||e.type:null};return e.blobGasPrice&&(t.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(t.blobGasUsed=BigInt(e.blobGasUsed)),t}const Yt=_("transactionReceipt",Ct);function _t(e){const{blobVersionedHashes:t}=e;if(t){if(t.length===0)throw new Le;for(const s of t){const n=F(s),i=z(it(s,0,1));if(n!==32)throw new Et({hash:s,size:n});if(i!==Ue)throw new Gt({hash:s,version:i})}}Te(e)}function Te(e){const{chainId:t,maxPriorityFeePerGas:s,maxFeePerGas:n,to:i}=e;if(t<=0)throw new X({chainId:t});if(i&&!$(i))throw new H({address:i});if(n&&n>2n**256n-1n)throw new C({maxFeePerGas:n});if(s&&n&&s>n)throw new me({maxFeePerGas:n,maxPriorityFeePerGas:s})}function kt(e){const{chainId:t,maxPriorityFeePerGas:s,gasPrice:n,maxFeePerGas:i,to:r}=e;if(t<=0)throw new X({chainId:t});if(r&&!$(r))throw new H({address:r});if(s||i)throw new b("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(n&&n>2n**256n-1n)throw new C({maxFeePerGas:n})}function Vt(e){const{chainId:t,maxPriorityFeePerGas:s,gasPrice:n,maxFeePerGas:i,to:r,accessList:o}=e;if(r&&!$(r))throw new H({address:r});if(typeof t<"u"&&t<=0)throw new X({chainId:t});if(s||i)throw new b("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(n&&n>2n**256n-1n)throw new C({maxFeePerGas:n});if(o)throw new b("`accessList` is not a valid Legacy Transaction attribute.")}function W(e){if(!e||e.length===0)return[];const t=[];for(let s=0;s"u"||typeof d>"u")){const g=typeof e.blobs[0]=="string"?e.blobs:e.blobs.map(v=>P(v)),T=e.kzg,B=Pe({blobs:g,kzg:T});if(typeof p>"u"&&(p=Ut({commitments:B})),typeof d>"u"){const v=Ie({blobs:g,commitments:B,kzg:T});d=At({blobs:g,commitments:B,proofs:v})}}const G=W(l),I=[h(s),i?h(i):"0x",u?h(u):"0x",c?h(c):"0x",n?h(n):"0x",r??"0x",o?h(o):"0x",f??"0x",G,a?h(a):"0x",p??[],...Y(e,t)],J=[],Z=[],Q=[];if(d)for(let g=0;g{if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(t.v===35n?0n:1n);if(s>0)return BigInt(s*2)+BigInt(35n+t.v-27n);const f=27n+(t.v===27n?0n:1n);if(t.v!==f)throw new ut({v:t.v});return f})();u=[...u,h(l),t.r,t.s]}else s>0&&(u=[...u,h(s),"0x","0x"]);return E(u)}function Y(e,t){const{r:s,s:n,v:i,yParity:r}=t??e;return typeof s>"u"?[]:typeof n>"u"?[]:typeof i>"u"&&typeof r>"u"?[]:[typeof r=="number"?r?h(1):"0x":i===0n?"0x":i===1n?h(1):i===27n?"0x":h(1),q(s),q(n)]}const Zt=2n**16n-1n;export{Tt as A,D as B,Wt as C,N as D,tt as E,C as F,$ as G,et as H,X as I,Bt as J,W as K,Jt as L,it as M,nt as N,ot as O,Y as P,me as T,H as a,ut as b,ht as c,lt as d,Xt as e,pt as f,zt as g,Kt as h,we as i,Yt as j,Ct as k,Dt as l,Zt as m,bt as n,Ft as o,E as p,Te as q,dt as r,kt as s,ge as t,Vt as u,Pe as v,vt as w,Ut as x,Ie as y,At as z}; diff --git a/index.html b/index.html index 2b72289..41510af 100644 --- a/index.html +++ b/index.html @@ -2,11 +2,11 @@ - + Push Wallet - - + +