@dcl/auth-site 1.7.4-12754855196.commit-288d488 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- import{l as fe,_ as pe}from"./index-39542650.js";const me=Symbol(),Z=Object.getPrototypeOf,J=new WeakMap,he=e=>e&&(J.has(e)?J.get(e):Z(e)===Object.prototype||Z(e)===Array.prototype),ge=e=>he(e)&&e[me]||null,ee=(e,t=!0)=>{J.set(e,t)},q=e=>typeof e=="object"&&e!==null,C=new WeakMap,x=new WeakSet,ye=(e=Object.is,t=(o,g)=>new Proxy(o,g),s=o=>q(o)&&!x.has(o)&&(Array.isArray(o)||!(Symbol.iterator in o))&&!(o instanceof WeakMap)&&!(o instanceof WeakSet)&&!(o instanceof Error)&&!(o instanceof Number)&&!(o instanceof Date)&&!(o instanceof String)&&!(o instanceof RegExp)&&!(o instanceof ArrayBuffer),n=o=>{switch(o.status){case"fulfilled":return o.value;case"rejected":throw o.reason;default:throw o}},c=new WeakMap,l=(o,g,b=n)=>{const y=c.get(o);if((y==null?void 0:y[0])===g)return y[1];const v=Array.isArray(o)?[]:Object.create(Object.getPrototypeOf(o));return ee(v,!0),c.set(o,[g,v]),Reflect.ownKeys(o).forEach(U=>{if(Object.getOwnPropertyDescriptor(v,U))return;const O=Reflect.get(o,U),P={value:O,enumerable:!0,configurable:!0};if(x.has(O))ee(O,!1);else if(O instanceof Promise)delete P.value,P.get=()=>b(O);else if(C.has(O)){const[w,z]=C.get(O);P.value=l(w,z(),b)}Object.defineProperty(v,U,P)}),Object.preventExtensions(v)},d=new WeakMap,f=[1,1],L=o=>{if(!q(o))throw new Error("object required");const g=d.get(o);if(g)return g;let b=f[0];const y=new Set,v=(i,a=++f[0])=>{b!==a&&(b=a,y.forEach(r=>r(i,a)))};let U=f[1];const O=(i=++f[1])=>(U!==i&&!y.size&&(U=i,w.forEach(([a])=>{const r=a[1](i);r>b&&(b=r)})),b),P=i=>(a,r)=>{const h=[...a];h[1]=[i,...h[1]],v(h,r)},w=new Map,z=(i,a)=>{if(y.size){const r=a[3](P(i));w.set(i,[a,r])}else w.set(i,[a])},X=i=>{var a;const r=w.get(i);r&&(w.delete(i),(a=r[1])==null||a.call(r))},de=i=>(y.add(i),y.size===1&&w.forEach(([r,h],j)=>{const $=r[3](P(j));w.set(j,[r,$])}),()=>{y.delete(i),y.size===0&&w.forEach(([r,h],j)=>{h&&(h(),w.set(j,[r]))})}),H=Array.isArray(o)?[]:Object.create(Object.getPrototypeOf(o)),k=t(H,{deleteProperty(i,a){const r=Reflect.get(i,a);X(a);const h=Reflect.deleteProperty(i,a);return h&&v(["delete",[a],r]),h},set(i,a,r,h){const j=Reflect.has(i,a),$=Reflect.get(i,a,h);if(j&&(e($,r)||d.has(r)&&e($,d.get(r))))return!0;X(a),q(r)&&(r=ge(r)||r);let V=r;if(r instanceof Promise)r.then(W=>{r.status="fulfilled",r.value=W,v(["resolve",[a],W])}).catch(W=>{r.status="rejected",r.reason=W,v(["reject",[a],W])});else{!C.has(r)&&s(r)&&(V=L(r));const W=!x.has(V)&&C.get(V);W&&z(a,W)}return Reflect.set(i,a,V,h),v(["set",[a],r,$]),!0}});d.set(o,k);const ue=[H,O,l,de];return C.set(k,ue),Reflect.ownKeys(o).forEach(i=>{const a=Object.getOwnPropertyDescriptor(o,i);"value"in a&&(k[i]=o[i],delete a.value,delete a.writable),Object.defineProperty(H,i,a)}),k})=>[L,C,x,e,t,s,n,c,l,d,f],[ve]=ye();function A(e={}){return ve(e)}function M(e,t,s){const n=C.get(e);let c;const l=[],d=n[3];let f=!1;const o=d(g=>{if(l.push(g),s){t(l.splice(0));return}c||(c=Promise.resolve().then(()=>{c=void 0,f&&t(l.splice(0))}))});return f=!0,()=>{f=!1,o()}}function we(e,t){const s=C.get(e),[n,c,l]=s;return l(n,c(),t)}const u=A({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),ce={state:u,subscribe(e){return M(u,()=>e(u))},push(e,t){e!==u.view&&(u.view=e,t&&(u.data=t),u.history.push(e))},reset(e){u.view=e,u.history=[e]},replace(e){u.history.length>1&&(u.history[u.history.length-1]=e,u.view=e)},goBack(){if(u.history.length>1){u.history.pop();const[e]=u.history.slice(-1);u.view=e}},setData(e){u.data=e}},m={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 m.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const e=navigator.userAgent.toLowerCase();return m.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},isTelegram(){return typeof window<"u"&&(!!window.TelegramWebviewProxy||!!window.Telegram||!!window.TelegramWebviewProxyProto)},formatNativeUrl(e,t,s){if(m.isHttpUrl(e))return this.formatUniversalUrl(e,t,s);let n=e;n.includes("://")||(n=e.replaceAll("/","").replaceAll(":",""),n=`${n}://`),n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,s);const c=encodeURIComponent(t);return`${n}wc?uri=${c}`},formatUniversalUrl(e,t,s){if(!m.isHttpUrl(e))return this.formatNativeUrl(e,t,s);let n=e;if(n.startsWith("https://t.me")){const l=fe.from(t).toString("base64").replace(/[=]/g,"");n.endsWith("/")&&(n=n.slice(0,-1)),this.setWalletConnectDeepLink(n,s);const d=new URL(n);return d.searchParams.set("startapp",l),d.toString()}n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,s);const c=encodeURIComponent(t);return`${n}wc?uri=${c}`},async wait(e){return new Promise(t=>{setTimeout(t,e)})},openHref(e,t){const s=this.isTelegram()?"_blank":t;window.open(e,s,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(m.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(m.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(m.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(m.WCM_VERSION,"2.7.0")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=(e=ce.state.data)==null?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},Ee=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),p=A({enabled:Ee,userSessionId:"",events:[],connectedWalletId:void 0}),be={state:p,subscribe(e){return M(p.events,()=>e(we(p.events[p.events.length-1])))},initialize(){p.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(p.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){p.connectedWalletId=e},click(e){if(p.enabled){const t={type:"CLICK",name:e.name,userSessionId:p.userSessionId,timestamp:Date.now(),data:e};p.events.push(t)}},track(e){if(p.enabled){const t={type:"TRACK",name:e.name,userSessionId:p.userSessionId,timestamp:Date.now(),data:e};p.events.push(t)}},view(e){if(p.enabled){const t={type:"VIEW",name:e.name,userSessionId:p.userSessionId,timestamp:Date.now(),data:e};p.events.push(t)}}},I=A({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),E={state:I,subscribe(e){return M(I,()=>e(I))},setChains(e){I.chains=e},setWalletConnectUri(e){I.walletConnectUri=e},setIsCustomDesktop(e){I.isCustomDesktop=e},setIsCustomMobile(e){I.isCustomMobile=e},setIsDataLoaded(e){I.isDataLoaded=e},setIsUiLoaded(e){I.isUiLoaded=e},setIsAuth(e){I.isAuth=e}},B=A({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),T={state:B,subscribe(e){return M(B,()=>e(B))},setConfig(e){var t,s;be.initialize(),E.setChains(e.chains),E.setIsAuth(!!e.enableAuthMode),E.setIsCustomMobile(!!((t=e.mobileWallets)!=null&&t.length)),E.setIsCustomDesktop(!!((s=e.desktopWallets)!=null&&s.length)),m.setModalVersionInStorage(),Object.assign(B,e)}};var Ie=Object.defineProperty,te=Object.getOwnPropertySymbols,_e=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,se=(e,t,s)=>t in e?Ie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Le=(e,t)=>{for(var s in t||(t={}))_e.call(t,s)&&se(e,s,t[s]);if(te)for(var s of te(t))Oe.call(t,s)&&se(e,s,t[s]);return e};const Y="https://explorer-api.walletconnect.com",G="wcm",Q="js-2.7.0";async function K(e,t){const s=Le({sdkType:G,sdkVersion:Q},t),n=new URL(e,Y);return n.searchParams.append("projectId",T.state.projectId),Object.entries(s).forEach(([l,d])=>{d&&n.searchParams.append(l,String(d))}),(await fetch(n)).json()}const S={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`${Y}/w3m/v1/getWalletImage/${e}?projectId=${T.state.projectId}&sdkType=${G}&sdkVersion=${Q}`},getAssetImageUrl(e){return`${Y}/w3m/v1/getAssetImage/${e}?projectId=${T.state.projectId}&sdkType=${G}&sdkVersion=${Q}`}};var We=Object.defineProperty,ne=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,oe=(e,t,s)=>t in e?We(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Pe=(e,t)=>{for(var s in t||(t={}))Ce.call(t,s)&&oe(e,s,t[s]);if(ne)for(var s of ne(t))Ae.call(t,s)&&oe(e,s,t[s]);return e};const re=m.isMobile(),_=A({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),Ne={state:_,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=T.state;if(e==="NONE"||t==="ALL"&&!e)return _.recomendedWallets;if(m.isArray(e)){const n={recommendedIds:e.join(",")},{listings:c}=await S.getAllListings(n),l=Object.values(c);l.sort((d,f)=>{const L=e.indexOf(d.id),o=e.indexOf(f.id);return L-o}),_.recomendedWallets=l}else{const{chains:s,isAuth:n}=E.state,c=s==null?void 0:s.join(","),l=m.isArray(t),d={page:1,sdks:n?"auth_v1":void 0,entries:m.RECOMMENDED_WALLET_AMOUNT,chains:c,version:2,excludedIds:l?t.join(","):void 0},{listings:f}=re?await S.getMobileListings(d):await S.getDesktopListings(d);_.recomendedWallets=Object.values(f)}return _.recomendedWallets},async getWallets(e){const t=Pe({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:n}=T.state,{recomendedWallets:c}=_;if(n==="ALL")return _.wallets;c.length?t.excludedIds=c.map(b=>b.id).join(","):m.isArray(s)&&(t.excludedIds=s.join(",")),m.isArray(n)&&(t.excludedIds=[t.excludedIds,n].filter(Boolean).join(",")),E.state.isAuth&&(t.sdks="auth_v1");const{page:l,search:d}=e,{listings:f,total:L}=re?await S.getMobileListings(t):await S.getDesktopListings(t),o=Object.values(f),g=d?"search":"wallets";return _[g]={listings:[..._[g].listings,...o],total:L,page:l??1},{listings:o,total:L}},getWalletImageUrl(e){return S.getWalletImageUrl(e)},getAssetImageUrl(e){return S.getAssetImageUrl(e)},resetSearch(){_.search={listings:[],total:0,page:1}}},R=A({open:!1}),F={state:R,subscribe(e){return M(R,()=>e(R))},async open(e){return new Promise(t=>{const{isUiLoaded:s,isDataLoaded:n}=E.state;if(m.removeWalletConnectDeepLink(),E.setWalletConnectUri(e==null?void 0:e.uri),E.setChains(e==null?void 0:e.chains),ce.reset("ConnectWallet"),s&&n)R.open=!0,t();else{const c=setInterval(()=>{const l=E.state;l.isUiLoaded&&l.isDataLoaded&&(clearInterval(c),R.open=!0,t())},200)}})},close(){R.open=!1}};var Se=Object.defineProperty,ae=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable,ie=(e,t,s)=>t in e?Se(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Ue=(e,t)=>{for(var s in t||(t={}))De.call(t,s)&&ie(e,s,t[s]);if(ae)for(var s of ae(t))Me.call(t,s)&&ie(e,s,t[s]);return e};function je(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const N=A({themeMode:je()?"dark":"light"}),le={state:N,subscribe(e){return M(N,()=>e(N))},setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(N.themeMode=t),s&&(N.themeVariables=Ue({},s))}},D=A({open:!1,message:"",variant:"success"}),ke={state:D,subscribe(e){return M(D,()=>e(D))},openToast(e,t){D.open=!0,D.message=e,D.variant=t},closeToast(){D.open=!1}};class Re{constructor(t){this.openModal=F.open,this.closeModal=F.close,this.subscribeModal=F.subscribe,this.setTheme=le.setThemeConfig,le.setThemeConfig(t),T.setConfig(t),this.initUi()}async initUi(){if(typeof window<"u"){await pe(()=>import("./index-2e8db189.js"),["assets/index-2e8db189.js","assets/index-39542650.js","assets/index-8d58d025.css"]);const t=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",t),E.setIsUiLoaded(!0)}}}const Ve=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:Re},Symbol.toStringTag,{value:"Module"}));export{m as C,Ne as E,F as M,E as O,ce as R,le as T,ke as a,be as b,T as c,Ve as i};
2
- //# sourceMappingURL=index-6c0f4072.js.map
1
+ import{l as fe,_ as pe}from"./index-91bdab09.js";const he=Symbol(),Z=Object.getPrototypeOf,J=new WeakMap,me=e=>e&&(J.has(e)?J.get(e):Z(e)===Object.prototype||Z(e)===Array.prototype),ge=e=>me(e)&&e[he]||null,ee=(e,t=!0)=>{J.set(e,t)},q=e=>typeof e=="object"&&e!==null,C=new WeakMap,x=new WeakSet,ye=(e=Object.is,t=(r,g)=>new Proxy(r,g),s=r=>q(r)&&!x.has(r)&&(Array.isArray(r)||!(Symbol.iterator in r))&&!(r instanceof WeakMap)&&!(r instanceof WeakSet)&&!(r instanceof Error)&&!(r instanceof Number)&&!(r instanceof Date)&&!(r instanceof String)&&!(r instanceof RegExp)&&!(r instanceof ArrayBuffer),n=r=>{switch(r.status){case"fulfilled":return r.value;case"rejected":throw r.reason;default:throw r}},c=new WeakMap,l=(r,g,b=n)=>{const y=c.get(r);if((y==null?void 0:y[0])===g)return y[1];const v=Array.isArray(r)?[]:Object.create(Object.getPrototypeOf(r));return ee(v,!0),c.set(r,[g,v]),Reflect.ownKeys(r).forEach(U=>{if(Object.getOwnPropertyDescriptor(v,U))return;const O=Reflect.get(r,U),P={value:O,enumerable:!0,configurable:!0};if(x.has(O))ee(O,!1);else if(O instanceof Promise)delete P.value,P.get=()=>b(O);else if(C.has(O)){const[w,z]=C.get(O);P.value=l(w,z(),b)}Object.defineProperty(v,U,P)}),Object.preventExtensions(v)},d=new WeakMap,f=[1,1],L=r=>{if(!q(r))throw new Error("object required");const g=d.get(r);if(g)return g;let b=f[0];const y=new Set,v=(i,a=++f[0])=>{b!==a&&(b=a,y.forEach(o=>o(i,a)))};let U=f[1];const O=(i=++f[1])=>(U!==i&&!y.size&&(U=i,w.forEach(([a])=>{const o=a[1](i);o>b&&(b=o)})),b),P=i=>(a,o)=>{const m=[...a];m[1]=[i,...m[1]],v(m,o)},w=new Map,z=(i,a)=>{if(y.size){const o=a[3](P(i));w.set(i,[a,o])}else w.set(i,[a])},X=i=>{var a;const o=w.get(i);o&&(w.delete(i),(a=o[1])==null||a.call(o))},de=i=>(y.add(i),y.size===1&&w.forEach(([o,m],j)=>{const $=o[3](P(j));w.set(j,[o,$])}),()=>{y.delete(i),y.size===0&&w.forEach(([o,m],j)=>{m&&(m(),w.set(j,[o]))})}),H=Array.isArray(r)?[]:Object.create(Object.getPrototypeOf(r)),k=t(H,{deleteProperty(i,a){const o=Reflect.get(i,a);X(a);const m=Reflect.deleteProperty(i,a);return m&&v(["delete",[a],o]),m},set(i,a,o,m){const j=Reflect.has(i,a),$=Reflect.get(i,a,m);if(j&&(e($,o)||d.has(o)&&e($,d.get(o))))return!0;X(a),q(o)&&(o=ge(o)||o);let V=o;if(o instanceof Promise)o.then(W=>{o.status="fulfilled",o.value=W,v(["resolve",[a],W])}).catch(W=>{o.status="rejected",o.reason=W,v(["reject",[a],W])});else{!C.has(o)&&s(o)&&(V=L(o));const W=!x.has(V)&&C.get(V);W&&z(a,W)}return Reflect.set(i,a,V,m),v(["set",[a],o,$]),!0}});d.set(r,k);const ue=[H,O,l,de];return C.set(k,ue),Reflect.ownKeys(r).forEach(i=>{const a=Object.getOwnPropertyDescriptor(r,i);"value"in a&&(k[i]=r[i],delete a.value,delete a.writable),Object.defineProperty(H,i,a)}),k})=>[L,C,x,e,t,s,n,c,l,d,f],[ve]=ye();function A(e={}){return ve(e)}function M(e,t,s){const n=C.get(e);let c;const l=[],d=n[3];let f=!1;const r=d(g=>{if(l.push(g),s){t(l.splice(0));return}c||(c=Promise.resolve().then(()=>{c=void 0,f&&t(l.splice(0))}))});return f=!0,()=>{f=!1,r()}}function we(e,t){const s=C.get(e),[n,c,l]=s;return l(n,c(),t)}const u=A({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),ce={state:u,subscribe(e){return M(u,()=>e(u))},push(e,t){e!==u.view&&(u.view=e,t&&(u.data=t),u.history.push(e))},reset(e){u.view=e,u.history=[e]},replace(e){u.history.length>1&&(u.history[u.history.length-1]=e,u.view=e)},goBack(){if(u.history.length>1){u.history.pop();const[e]=u.history.slice(-1);u.view=e}},setData(e){u.data=e}},h={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 h.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const e=navigator.userAgent.toLowerCase();return h.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},isTelegram(){return typeof window<"u"&&(!!window.TelegramWebviewProxy||!!window.Telegram||!!window.TelegramWebviewProxyProto)},formatNativeUrl(e,t,s){if(h.isHttpUrl(e))return this.formatUniversalUrl(e,t,s);let n=e;n.includes("://")||(n=e.replaceAll("/","").replaceAll(":",""),n=`${n}://`),n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,s);const c=encodeURIComponent(t);return`${n}wc?uri=${c}`},formatUniversalUrl(e,t,s){if(!h.isHttpUrl(e))return this.formatNativeUrl(e,t,s);let n=e;if(n.startsWith("https://t.me")){const l=fe.from(t).toString("base64").replace(/[=]/g,"");n.endsWith("/")&&(n=n.slice(0,-1)),this.setWalletConnectDeepLink(n,s);const d=new URL(n);return d.searchParams.set("startapp",l),d.toString()}n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,s);const c=encodeURIComponent(t);return`${n}wc?uri=${c}`},async wait(e){return new Promise(t=>{setTimeout(t,e)})},openHref(e,t){const s=this.isTelegram()?"_blank":t;window.open(e,s,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(h.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(h.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(h.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(h.WCM_VERSION,"2.7.0")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=(e=ce.state.data)==null?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},Ee=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),p=A({enabled:Ee,userSessionId:"",events:[],connectedWalletId:void 0}),be={state:p,subscribe(e){return M(p.events,()=>e(we(p.events[p.events.length-1])))},initialize(){p.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(p.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){p.connectedWalletId=e},click(e){if(p.enabled){const t={type:"CLICK",name:e.name,userSessionId:p.userSessionId,timestamp:Date.now(),data:e};p.events.push(t)}},track(e){if(p.enabled){const t={type:"TRACK",name:e.name,userSessionId:p.userSessionId,timestamp:Date.now(),data:e};p.events.push(t)}},view(e){if(p.enabled){const t={type:"VIEW",name:e.name,userSessionId:p.userSessionId,timestamp:Date.now(),data:e};p.events.push(t)}}},I=A({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),E={state:I,subscribe(e){return M(I,()=>e(I))},setChains(e){I.chains=e},setWalletConnectUri(e){I.walletConnectUri=e},setIsCustomDesktop(e){I.isCustomDesktop=e},setIsCustomMobile(e){I.isCustomMobile=e},setIsDataLoaded(e){I.isDataLoaded=e},setIsUiLoaded(e){I.isUiLoaded=e},setIsAuth(e){I.isAuth=e}},B=A({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),T={state:B,subscribe(e){return M(B,()=>e(B))},setConfig(e){var t,s;be.initialize(),E.setChains(e.chains),E.setIsAuth(!!e.enableAuthMode),E.setIsCustomMobile(!!((t=e.mobileWallets)!=null&&t.length)),E.setIsCustomDesktop(!!((s=e.desktopWallets)!=null&&s.length)),h.setModalVersionInStorage(),Object.assign(B,e)}};var Ie=Object.defineProperty,te=Object.getOwnPropertySymbols,_e=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,se=(e,t,s)=>t in e?Ie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Le=(e,t)=>{for(var s in t||(t={}))_e.call(t,s)&&se(e,s,t[s]);if(te)for(var s of te(t))Oe.call(t,s)&&se(e,s,t[s]);return e};const Y="https://explorer-api.walletconnect.com",G="wcm",Q="js-2.7.0";async function K(e,t){const s=Le({sdkType:G,sdkVersion:Q},t),n=new URL(e,Y);return n.searchParams.append("projectId",T.state.projectId),Object.entries(s).forEach(([l,d])=>{d&&n.searchParams.append(l,String(d))}),(await fetch(n)).json()}const S={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`${Y}/w3m/v1/getWalletImage/${e}?projectId=${T.state.projectId}&sdkType=${G}&sdkVersion=${Q}`},getAssetImageUrl(e){return`${Y}/w3m/v1/getAssetImage/${e}?projectId=${T.state.projectId}&sdkType=${G}&sdkVersion=${Q}`}};var We=Object.defineProperty,ne=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,re=(e,t,s)=>t in e?We(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Pe=(e,t)=>{for(var s in t||(t={}))Ce.call(t,s)&&re(e,s,t[s]);if(ne)for(var s of ne(t))Ae.call(t,s)&&re(e,s,t[s]);return e};const oe=h.isMobile(),_=A({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),Ne={state:_,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=T.state;if(e==="NONE"||t==="ALL"&&!e)return _.recomendedWallets;if(h.isArray(e)){const n={recommendedIds:e.join(",")},{listings:c}=await S.getAllListings(n),l=Object.values(c);l.sort((d,f)=>{const L=e.indexOf(d.id),r=e.indexOf(f.id);return L-r}),_.recomendedWallets=l}else{const{chains:s,isAuth:n}=E.state,c=s==null?void 0:s.join(","),l=h.isArray(t),d={page:1,sdks:n?"auth_v1":void 0,entries:h.RECOMMENDED_WALLET_AMOUNT,chains:c,version:2,excludedIds:l?t.join(","):void 0},{listings:f}=oe?await S.getMobileListings(d):await S.getDesktopListings(d);_.recomendedWallets=Object.values(f)}return _.recomendedWallets},async getWallets(e){const t=Pe({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:n}=T.state,{recomendedWallets:c}=_;if(n==="ALL")return _.wallets;c.length?t.excludedIds=c.map(b=>b.id).join(","):h.isArray(s)&&(t.excludedIds=s.join(",")),h.isArray(n)&&(t.excludedIds=[t.excludedIds,n].filter(Boolean).join(",")),E.state.isAuth&&(t.sdks="auth_v1");const{page:l,search:d}=e,{listings:f,total:L}=oe?await S.getMobileListings(t):await S.getDesktopListings(t),r=Object.values(f),g=d?"search":"wallets";return _[g]={listings:[..._[g].listings,...r],total:L,page:l??1},{listings:r,total:L}},getWalletImageUrl(e){return S.getWalletImageUrl(e)},getAssetImageUrl(e){return S.getAssetImageUrl(e)},resetSearch(){_.search={listings:[],total:0,page:1}}},R=A({open:!1}),F={state:R,subscribe(e){return M(R,()=>e(R))},async open(e){return new Promise(t=>{const{isUiLoaded:s,isDataLoaded:n}=E.state;if(h.removeWalletConnectDeepLink(),E.setWalletConnectUri(e==null?void 0:e.uri),E.setChains(e==null?void 0:e.chains),ce.reset("ConnectWallet"),s&&n)R.open=!0,t();else{const c=setInterval(()=>{const l=E.state;l.isUiLoaded&&l.isDataLoaded&&(clearInterval(c),R.open=!0,t())},200)}})},close(){R.open=!1}};var Se=Object.defineProperty,ae=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable,ie=(e,t,s)=>t in e?Se(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Ue=(e,t)=>{for(var s in t||(t={}))De.call(t,s)&&ie(e,s,t[s]);if(ae)for(var s of ae(t))Me.call(t,s)&&ie(e,s,t[s]);return e};function je(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const N=A({themeMode:je()?"dark":"light"}),le={state:N,subscribe(e){return M(N,()=>e(N))},setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(N.themeMode=t),s&&(N.themeVariables=Ue({},s))}},D=A({open:!1,message:"",variant:"success"}),ke={state:D,subscribe(e){return M(D,()=>e(D))},openToast(e,t){D.open=!0,D.message=e,D.variant=t},closeToast(){D.open=!1}};class Re{constructor(t){this.openModal=F.open,this.closeModal=F.close,this.subscribeModal=F.subscribe,this.setTheme=le.setThemeConfig,le.setThemeConfig(t),T.setConfig(t),this.initUi()}async initUi(){if(typeof window<"u"){await pe(()=>import("./index-70b9d292.js"),["assets/index-70b9d292.js","assets/index-91bdab09.js","assets/index-b28e33c3.css"]);const t=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",t),E.setIsUiLoaded(!0)}}}const Ve=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:Re},Symbol.toStringTag,{value:"Module"}));export{h as C,Ne as E,F as M,E as O,ce as R,le as T,ke as a,be as b,T as c,Ve as i};
2
+ //# sourceMappingURL=index-35e0d472.js.map
@@ -1 +1 @@
1
- {"version":3,"mappings":"iDAAK,MAAYA,GAAE,SAAuDC,EAAE,OAAO,eAAeC,EAAE,IAAI,QAAQC,GAAE,GAAG,IAAID,EAAE,IAAI,CAAC,EAAEA,EAAE,IAAI,CAAC,EAAED,EAAE,CAAC,IAAI,OAAO,WAAWA,EAAE,CAAC,IAAI,MAAM,WAAmqDG,GAAE,GAAGD,GAAE,CAAC,GAAG,EAAEH,EAAC,GAAG,KAAKK,GAAE,CAAC,EAAE,EAAE,KAAK,CAACH,EAAE,IAAI,EAAE,CAAC,CAAC,ECE33DI,EAAYC,GAAM,OAAOA,GAAM,UAAYA,IAAM,KACjDC,EAAgC,IAAI,QACpCC,EAAyB,IAAI,QAC7BC,GAAqB,CAACC,EAAW,OAAO,GAAIC,EAAW,CAACC,EAAQC,IAAY,IAAI,MAAMD,EAAQC,CAAO,EAAGC,EAAYR,GAAMD,EAASC,CAAC,GAAK,CAACE,EAAO,IAAIF,CAAC,IAAM,MAAM,QAAQA,CAAC,GAAK,EAAE,OAAO,YAAYA,KAAO,EAAEA,aAAa,UAAY,EAAEA,aAAa,UAAY,EAAEA,aAAa,QAAU,EAAEA,aAAa,SAAW,EAAEA,aAAa,OAAS,EAAEA,aAAa,SAAW,EAAEA,aAAa,SAAW,EAAEA,aAAa,aAAcS,EAAwBC,GAAY,CACtc,OAAQA,EAAQ,OAAM,CACpB,IAAK,YACH,OAAOA,EAAQ,MACjB,IAAK,WACH,MAAMA,EAAQ,OAChB,QACE,MAAMA,CACT,CACH,EAAGC,EAA4B,IAAI,QAAWC,EAAiB,CAACN,EAAQO,EAASC,EAAgBL,IAAyB,CACxH,MAAMM,EAAQJ,EAAU,IAAIL,CAAM,EAClC,IAAKS,GAAS,KAAO,OAASA,EAAM,CAAC,KAAOF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ACT,QAAS,SACX,CAAC,EACK2G,GAAY,CAChB,MAAAD,EACA,UAAUxG,EAAU,CAClB,OAAOD,EAAUyG,EAAO,IAAMxG,EAASwG,CAAK,CAAC,CAC9C,EACD,UAAUE,EAASC,EAAS,CAC1BH,EAAM,KAAO,GACbA,EAAM,QAAUE,EAChBF,EAAM,QAAUG,CACjB,EACD,YAAa,CACXH,EAAM,KAAO,EACd,CACH,ECjhBA,MAAMI,EAAmB,CACvB,YAAYlE,EAAQ,CAClB,KAAK,UAAY8C,EAAU,KAC3B,KAAK,WAAaA,EAAU,MAC5B,KAAK,eAAiBA,EAAU,UAChC,KAAK,SAAWY,GAAU,eAC1BA,GAAU,eAAe1D,CAAM,EAC/BD,EAAW,UAAUC,CAAM,EAC3B,KAAK,OAAM,CACZ,CACD,MAAM,QAAS,CACb,GAAI,OAAO,OAAW,IAAa,CACjC,aAAM,OAAO,qBAAyB,uFACtC,MAAMmE,EAAQ,SAAS,cAAc,WAAW,EAChD,SAAS,KAAK,sBAAsB,YAAaA,CAAK,EACtD7E,EAAY,cAAc,EAAI,CAC/B,CACF,CACH","names":["t","s","c","l","y","h","isObject","x","proxyStateMap","refSet","buildProxyFunction","objectIs","newProxy","target","handler","canProxy","defaultHandlePromise","promise","snapCache","createSnapshot","version","handlePromise","cache","snap","markToTrack","key","value","desc","target2","ensureVersion","proxyCache","versionHolder","proxyFunction","initialObject","found","listeners","notifyUpdate","op","nextVersion","listener","checkVersion","nextCheckVersion","propProxyStates","propProxyState","propVersion","createPropListener","prop","newOp","addPropListener","remove","removePropListener","_a","entry","addListener","prevRemove","baseObject","proxyObject","prevValue","deleted","receiver","hasPrevValue","getUntracked","nextValue","v","e","childProxyState","proxyState","defaultProxyFunction","proxy","subscribe","callback","notifyInSync","ops","isListenerActive","removeListener","snapshot","state$7","RouterCtrl","view","data","last","CoreUtil","ua","url","appUrl","wcUri","name","safeAppUrl","encodedWcUrl","formattedUri","Buffer","miliseconds","resolve","href","adjustedTarget","routerData","isEnabled","state$6","EventsCtrl","connectedWalletId","event","state$5","OptionsCtrl","chains","walletConnectUri","isCustomDesktop","isCustomMobile","isDataLoaded","isUiLoaded","isAuth","state$4","ConfigCtrl","config","_b","__defProp$2","__getOwnPropSymbols$2","__hasOwnProp$2","__propIsEnum$2","__defNormalProp$2","obj","__spreadValues$2","a","b","W3M_API","SDK_TYPE","SDK_VERSION","fetchListings","endpoint","params","allParams","ExplorerUtil","imageId","__defProp$1","__getOwnPropSymbols$1","__hasOwnProp$1","__propIsEnum$1","__defNormalProp$1","__spreadValues$1","isMobile","state$3","ExplorerCtrl","explorerRecommendedWalletIds","explorerExcludedWalletIds","listings","listingsArr","aIndex","bIndex","chainsFilter","isExcluded","extendedParams","recomendedWallets","wallet","page","search","listingsObj","total","type","state$2","ModalCtrl","options","interval","opts","__defProp","__getOwnPropSymbols","__hasOwnProp","__propIsEnum","__defNormalProp","__spreadValues","isDarkMode","state$1","ThemeCtrl","theme","themeMode","themeVariables","state","ToastCtrl","message","variant","WalletConnectModal","modal"],"sources":["../../node_modules/proxy-compare/dist/index.modern.js","../../node_modules/valtio/esm/vanilla.mjs","../../node_modules/@walletconnect/modal-core/dist/index.js","../../node_modules/@walletconnect/modal/dist/index.js"],"sourcesContent":["const e=Symbol(),t=Symbol(),r=\"a\",n=\"w\";let o=(e,t)=>new Proxy(e,t);const s=Object.getPrototypeOf,c=new WeakMap,l=e=>e&&(c.has(e)?c.get(e):s(e)===Object.prototype||s(e)===Array.prototype),f=e=>\"object\"==typeof e&&null!==e,i=e=>{if(Array.isArray(e))return Array.from(e);const t=Object.getOwnPropertyDescriptors(e);return Object.values(t).forEach(e=>{e.configurable=!0}),Object.create(s(e),t)},u=e=>e[t]||e,a=(s,c,f,p)=>{if(!l(s))return s;let g=p&&p.get(s);if(!g){const e=u(s);g=(e=>Object.values(Object.getOwnPropertyDescriptors(e)).some(e=>!e.configurable&&!e.writable))(e)?[e,i(e)]:[e],null==p||p.set(s,g)}const[y,h]=g;let w=f&&f.get(y);return w&&w[1].f===!!h||(w=((o,s)=>{const c={f:s};let l=!1;const f=(e,t)=>{if(!l){let s=c[r].get(o);if(s||(s={},c[r].set(o,s)),e===n)s[n]=!0;else{let r=s[e];r||(r=new Set,s[e]=r),r.add(t)}}},i={get:(e,n)=>n===t?o:(f(\"k\",n),a(Reflect.get(e,n),c[r],c.c,c.t)),has:(t,n)=>n===e?(l=!0,c[r].delete(o),!0):(f(\"h\",n),Reflect.has(t,n)),getOwnPropertyDescriptor:(e,t)=>(f(\"o\",t),Reflect.getOwnPropertyDescriptor(e,t)),ownKeys:e=>(f(n),Reflect.ownKeys(e))};return s&&(i.set=i.deleteProperty=()=>!1),[i,c]})(y,!!h),w[1].p=o(h||y,w[0]),f&&f.set(y,w)),w[1][r]=c,w[1].c=f,w[1].t=p,w[1].p},p=(e,t,r,o)=>{if(Object.is(e,t))return!1;if(!f(e)||!f(t))return!0;const s=r.get(u(e));if(!s)return!0;if(o){const r=o.get(e);if(r&&r.n===t)return r.g;o.set(e,{n:t,g:!1})}let c=null;try{for(const r of s.h||[])if(c=Reflect.has(e,r)!==Reflect.has(t,r),c)return c;if(!0===s[n]){if(c=((e,t)=>{const r=Reflect.ownKeys(e),n=Reflect.ownKeys(t);return r.length!==n.length||r.some((e,t)=>e!==n[t])})(e,t),c)return c}else for(const r of s.o||[])if(c=!!Reflect.getOwnPropertyDescriptor(e,r)!=!!Reflect.getOwnPropertyDescriptor(t,r),c)return c;for(const n of s.k||[])if(c=p(e[n],t[n],r,o),c)return c;return null===c&&(c=!0),c}finally{o&&o.set(e,{n:t,g:c})}},g=t=>!!l(t)&&e in t,y=e=>l(e)&&e[t]||null,h=(e,t=!0)=>{c.set(e,t)},w=(e,t,r)=>{const o=[],s=new WeakSet,c=(e,l)=>{if(s.has(e))return;f(e)&&s.add(e);const i=f(e)&&t.get(u(e));if(i){var a,p;if(null==(a=i.h)||a.forEach(e=>{const t=`:has(${String(e)})`;o.push(l?[...l,t]:[t])}),!0===i[n]){const e=\":ownKeys\";o.push(l?[...l,e]:[e])}else{var g;null==(g=i.o)||g.forEach(e=>{const t=`:hasOwn(${String(e)})`;o.push(l?[...l,t]:[t])})}null==(p=i.k)||p.forEach(t=>{r&&!(\"value\"in(Object.getOwnPropertyDescriptor(e,t)||{}))||c(e[t],l?[...l,t]:[t])})}else l&&o.push(l)};return c(e),o},O=e=>{o=e};export{w as affectedToPathList,a as createProxy,y as getUntracked,p as isChanged,h as markToTrack,O as replaceNewProxy,g as trackMemo};\n//# sourceMappingURL=index.modern.mjs.map\n","import { markToTrack, getUntracked } from 'proxy-compare';\n\nconst isObject = (x) => typeof x === \"object\" && x !== null;\nconst proxyStateMap = /* @__PURE__ */ new WeakMap();\nconst refSet = /* @__PURE__ */ new WeakSet();\nconst buildProxyFunction = (objectIs = Object.is, newProxy = (target, handler) => new Proxy(target, handler), canProxy = (x) => isObject(x) && !refSet.has(x) && (Array.isArray(x) || !(Symbol.iterator in x)) && !(x instanceof WeakMap) && !(x instanceof WeakSet) && !(x instanceof Error) && !(x instanceof Number) && !(x instanceof Date) && !(x instanceof String) && !(x instanceof RegExp) && !(x instanceof ArrayBuffer), defaultHandlePromise = (promise) => {\n switch (promise.status) {\n case \"fulfilled\":\n return promise.value;\n case \"rejected\":\n throw promise.reason;\n default:\n throw promise;\n }\n}, snapCache = /* @__PURE__ */ new WeakMap(), createSnapshot = (target, version, handlePromise = defaultHandlePromise) => {\n const cache = snapCache.get(target);\n if ((cache == null ? void 0 : cache[0]) === version) {\n return cache[1];\n }\n const snap = Array.isArray(target) ? [] : Object.create(Object.getPrototypeOf(target));\n markToTrack(snap, true);\n snapCache.set(target, [version, snap]);\n Reflect.ownKeys(target).forEach((key) => {\n if (Object.getOwnPropertyDescriptor(snap, key)) {\n return;\n }\n const value = Reflect.get(target, key);\n const desc = {\n value,\n enumerable: true,\n // This is intentional to avoid copying with proxy-compare.\n // It's still non-writable, so it avoids assigning a value.\n configurable: true\n };\n if (refSet.has(value)) {\n markToTrack(value, false);\n } else if (value instanceof Promise) {\n delete desc.value;\n desc.get = () => handlePromise(value);\n } else if (proxyStateMap.has(value)) {\n const [target2, ensureVersion] = proxyStateMap.get(\n value\n );\n desc.value = createSnapshot(\n target2,\n ensureVersion(),\n handlePromise\n );\n }\n Object.defineProperty(snap, key, desc);\n });\n return Object.preventExtensions(snap);\n}, proxyCache = /* @__PURE__ */ new WeakMap(), versionHolder = [1, 1], proxyFunction = (initialObject) => {\n if (!isObject(initialObject)) {\n throw new Error(\"object required\");\n }\n const found = proxyCache.get(initialObject);\n if (found) {\n return found;\n }\n let version = versionHolder[0];\n const listeners = /* @__PURE__ */ new Set();\n const notifyUpdate = (op, nextVersion = ++versionHolder[0]) => {\n if (version !== nextVersion) {\n version = nextVersion;\n listeners.forEach((listener) => listener(op, nextVersion));\n }\n };\n let checkVersion = versionHolder[1];\n const ensureVersion = (nextCheckVersion = ++versionHolder[1]) => {\n if (checkVersion !== nextCheckVersion && !listeners.size) {\n checkVersion = nextCheckVersion;\n propProxyStates.forEach(([propProxyState]) => {\n const propVersion = propProxyState[1](nextCheckVersion);\n if (propVersion > version) {\n version = propVersion;\n }\n });\n }\n return version;\n };\n const createPropListener = (prop) => (op, nextVersion) => {\n const newOp = [...op];\n newOp[1] = [prop, ...newOp[1]];\n notifyUpdate(newOp, nextVersion);\n };\n const propProxyStates = /* @__PURE__ */ new Map();\n const addPropListener = (prop, propProxyState) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && propProxyStates.has(prop)) {\n throw new Error(\"prop listener already exists\");\n }\n if (listeners.size) {\n const remove = propProxyState[3](createPropListener(prop));\n propProxyStates.set(prop, [propProxyState, remove]);\n } else {\n propProxyStates.set(prop, [propProxyState]);\n }\n };\n const removePropListener = (prop) => {\n var _a;\n const entry = propProxyStates.get(prop);\n if (entry) {\n propProxyStates.delete(prop);\n (_a = entry[1]) == null ? void 0 : _a.call(entry);\n }\n };\n const addListener = (listener) => {\n listeners.add(listener);\n if (listeners.size === 1) {\n propProxyStates.forEach(([propProxyState, prevRemove], prop) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && prevRemove) {\n throw new Error(\"remove already exists\");\n }\n const remove = propProxyState[3](createPropListener(prop));\n propProxyStates.set(prop, [propProxyState, remove]);\n });\n }\n const removeListener = () => {\n listeners.delete(listener);\n if (listeners.size === 0) {\n propProxyStates.forEach(([propProxyState, remove], prop) => {\n if (remove) {\n remove();\n propProxyStates.set(prop, [propProxyState]);\n }\n });\n }\n };\n return removeListener;\n };\n const baseObject = Array.isArray(initialObject) ? [] : Object.create(Object.getPrototypeOf(initialObject));\n const handler = {\n deleteProperty(target, prop) {\n const prevValue = Reflect.get(target, prop);\n removePropListener(prop);\n const deleted = Reflect.deleteProperty(target, prop);\n if (deleted) {\n notifyUpdate([\"delete\", [prop], prevValue]);\n }\n return deleted;\n },\n set(target, prop, value, receiver) {\n const hasPrevValue = Reflect.has(target, prop);\n const prevValue = Reflect.get(target, prop, receiver);\n if (hasPrevValue && (objectIs(prevValue, value) || proxyCache.has(value) && objectIs(prevValue, proxyCache.get(value)))) {\n return true;\n }\n removePropListener(prop);\n if (isObject(value)) {\n value = getUntracked(value) || value;\n }\n let nextValue = value;\n if (value instanceof Promise) {\n value.then((v) => {\n value.status = \"fulfilled\";\n value.value = v;\n notifyUpdate([\"resolve\", [prop], v]);\n }).catch((e) => {\n value.status = \"rejected\";\n value.reason = e;\n notifyUpdate([\"reject\", [prop], e]);\n });\n } else {\n if (!proxyStateMap.has(value) && canProxy(value)) {\n nextValue = proxyFunction(value);\n }\n const childProxyState = !refSet.has(nextValue) && proxyStateMap.get(nextValue);\n if (childProxyState) {\n addPropListener(prop, childProxyState);\n }\n }\n Reflect.set(target, prop, nextValue, receiver);\n notifyUpdate([\"set\", [prop], value, prevValue]);\n return true;\n }\n };\n const proxyObject = newProxy(baseObject, handler);\n proxyCache.set(initialObject, proxyObject);\n const proxyState = [\n baseObject,\n ensureVersion,\n createSnapshot,\n addListener\n ];\n proxyStateMap.set(proxyObject, proxyState);\n Reflect.ownKeys(initialObject).forEach((key) => {\n const desc = Object.getOwnPropertyDescriptor(\n initialObject,\n key\n );\n if (\"value\" in desc) {\n proxyObject[key] = initialObject[key];\n delete desc.value;\n delete desc.writable;\n }\n Object.defineProperty(baseObject, key, desc);\n });\n return proxyObject;\n}) => [\n // public functions\n proxyFunction,\n // shared state\n proxyStateMap,\n refSet,\n // internal things\n objectIs,\n newProxy,\n canProxy,\n defaultHandlePromise,\n snapCache,\n createSnapshot,\n proxyCache,\n versionHolder\n];\nconst [defaultProxyFunction] = buildProxyFunction();\nfunction proxy(initialObject = {}) {\n return defaultProxyFunction(initialObject);\n}\nfunction getVersion(proxyObject) {\n const proxyState = proxyStateMap.get(proxyObject);\n return proxyState == null ? void 0 : proxyState[1]();\n}\nfunction subscribe(proxyObject, callback, notifyInSync) {\n const proxyState = proxyStateMap.get(proxyObject);\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !proxyState) {\n console.warn(\"Please use proxy object\");\n }\n let promise;\n const ops = [];\n const addListener = proxyState[3];\n let isListenerActive = false;\n const listener = (op) => {\n ops.push(op);\n if (notifyInSync) {\n callback(ops.splice(0));\n return;\n }\n if (!promise) {\n promise = Promise.resolve().then(() => {\n promise = void 0;\n if (isListenerActive) {\n callback(ops.splice(0));\n }\n });\n }\n };\n const removeListener = addListener(listener);\n isListenerActive = true;\n return () => {\n isListenerActive = false;\n removeListener();\n };\n}\nfunction snapshot(proxyObject, handlePromise) {\n const proxyState = proxyStateMap.get(proxyObject);\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !proxyState) {\n console.warn(\"Please use proxy object\");\n }\n const [target, ensureVersion, createSnapshot] = proxyState;\n return createSnapshot(target, ensureVersion(), handlePromise);\n}\nfunction ref(obj) {\n refSet.add(obj);\n return obj;\n}\nconst unstable_buildProxyFunction = buildProxyFunction;\n\nexport { getVersion, proxy, ref, snapshot, subscribe, unstable_buildProxyFunction };\n","import { proxy, subscribe, snapshot } from 'valtio/vanilla';\n\nconst state$7 = proxy({\n history: [\"ConnectWallet\"],\n view: \"ConnectWallet\",\n data: void 0\n});\nconst RouterCtrl = {\n state: state$7,\n subscribe(callback) {\n return subscribe(state$7, () => callback(state$7));\n },\n push(view, data) {\n if (view !== state$7.view) {\n state$7.view = view;\n if (data) {\n state$7.data = data;\n }\n state$7.history.push(view);\n }\n },\n reset(view) {\n state$7.view = view;\n state$7.history = [view];\n },\n replace(view) {\n if (state$7.history.length > 1) {\n state$7.history[state$7.history.length - 1] = view;\n state$7.view = view;\n }\n },\n goBack() {\n if (state$7.history.length > 1) {\n state$7.history.pop();\n const [last] = state$7.history.slice(-1);\n state$7.view = last;\n }\n },\n setData(data) {\n state$7.data = data;\n }\n};\n\nconst CoreUtil = {\n WALLETCONNECT_DEEPLINK_CHOICE: \"WALLETCONNECT_DEEPLINK_CHOICE\",\n WCM_VERSION: \"WCM_VERSION\",\n RECOMMENDED_WALLET_AMOUNT: 9,\n isMobile() {\n if (typeof window !== \"undefined\") {\n return Boolean(\n window.matchMedia(\"(pointer:coarse)\").matches || /Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)\n );\n }\n return false;\n },\n isAndroid() {\n return CoreUtil.isMobile() && navigator.userAgent.toLowerCase().includes(\"android\");\n },\n isIos() {\n const ua = navigator.userAgent.toLowerCase();\n return CoreUtil.isMobile() && (ua.includes(\"iphone\") || ua.includes(\"ipad\"));\n },\n isHttpUrl(url) {\n return url.startsWith(\"http://\") || url.startsWith(\"https://\");\n },\n isArray(data) {\n return Array.isArray(data) && data.length > 0;\n },\n isTelegram() {\n return typeof window !== \"undefined\" && // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (Boolean(window.TelegramWebviewProxy) || // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Boolean(window.Telegram) || // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Boolean(window.TelegramWebviewProxyProto));\n },\n formatNativeUrl(appUrl, wcUri, name) {\n if (CoreUtil.isHttpUrl(appUrl)) {\n return this.formatUniversalUrl(appUrl, wcUri, name);\n }\n let safeAppUrl = appUrl;\n if (!safeAppUrl.includes(\"://\")) {\n safeAppUrl = appUrl.replaceAll(\"/\", \"\").replaceAll(\":\", \"\");\n safeAppUrl = `${safeAppUrl}://`;\n }\n if (!safeAppUrl.endsWith(\"/\")) {\n safeAppUrl = `${safeAppUrl}/`;\n }\n this.setWalletConnectDeepLink(safeAppUrl, name);\n const encodedWcUrl = encodeURIComponent(wcUri);\n return `${safeAppUrl}wc?uri=${encodedWcUrl}`;\n },\n formatUniversalUrl(appUrl, wcUri, name) {\n if (!CoreUtil.isHttpUrl(appUrl)) {\n return this.formatNativeUrl(appUrl, wcUri, name);\n }\n let safeAppUrl = appUrl;\n if (safeAppUrl.startsWith(\"https://t.me\")) {\n const formattedUri = Buffer.from(wcUri).toString(\"base64\").replace(/[=]/g, \"\");\n if (safeAppUrl.endsWith(\"/\")) {\n safeAppUrl = safeAppUrl.slice(0, -1);\n }\n this.setWalletConnectDeepLink(safeAppUrl, name);\n const url = new URL(safeAppUrl);\n url.searchParams.set(\"startapp\", formattedUri);\n const link = url.toString();\n return link;\n }\n if (!safeAppUrl.endsWith(\"/\")) {\n safeAppUrl = `${safeAppUrl}/`;\n }\n this.setWalletConnectDeepLink(safeAppUrl, name);\n const encodedWcUrl = encodeURIComponent(wcUri);\n return `${safeAppUrl}wc?uri=${encodedWcUrl}`;\n },\n async wait(miliseconds) {\n return new Promise((resolve) => {\n setTimeout(resolve, miliseconds);\n });\n },\n openHref(href, target) {\n const adjustedTarget = this.isTelegram() ? \"_blank\" : target;\n window.open(href, adjustedTarget, \"noreferrer noopener\");\n },\n setWalletConnectDeepLink(href, name) {\n try {\n localStorage.setItem(CoreUtil.WALLETCONNECT_DEEPLINK_CHOICE, JSON.stringify({ href, name }));\n } catch (e) {\n console.info(\"Unable to set WalletConnect deep link\");\n }\n },\n setWalletConnectAndroidDeepLink(wcUri) {\n try {\n const [href] = wcUri.split(\"?\");\n localStorage.setItem(\n CoreUtil.WALLETCONNECT_DEEPLINK_CHOICE,\n JSON.stringify({ href, name: \"Android\" })\n );\n } catch (e) {\n console.info(\"Unable to set WalletConnect android deep link\");\n }\n },\n removeWalletConnectDeepLink() {\n try {\n localStorage.removeItem(CoreUtil.WALLETCONNECT_DEEPLINK_CHOICE);\n } catch (e) {\n console.info(\"Unable to remove WalletConnect deep link\");\n }\n },\n setModalVersionInStorage() {\n try {\n if (typeof localStorage !== \"undefined\") {\n localStorage.setItem(CoreUtil.WCM_VERSION, \"2.7.0\");\n }\n } catch (e) {\n console.info(\"Unable to set Web3Modal version in storage\");\n }\n },\n getWalletRouterData() {\n var _a;\n const routerData = (_a = RouterCtrl.state.data) == null ? void 0 : _a.Wallet;\n if (!routerData) {\n throw new Error('Missing \"Wallet\" view data');\n }\n return routerData;\n }\n};\n\nconst isEnabled = typeof location !== \"undefined\" && (location.hostname.includes(\"localhost\") || location.protocol.includes(\"https\"));\nconst state$6 = proxy({\n enabled: isEnabled,\n userSessionId: \"\",\n events: [],\n connectedWalletId: void 0\n});\nconst EventsCtrl = {\n state: state$6,\n subscribe(callback) {\n return subscribe(state$6.events, () => callback(snapshot(state$6.events[state$6.events.length - 1])));\n },\n initialize() {\n if (state$6.enabled && typeof (crypto == null ? void 0 : crypto.randomUUID) !== \"undefined\") {\n state$6.userSessionId = crypto.randomUUID();\n }\n },\n setConnectedWalletId(connectedWalletId) {\n state$6.connectedWalletId = connectedWalletId;\n },\n click(data) {\n if (state$6.enabled) {\n const event = {\n type: \"CLICK\",\n name: data.name,\n userSessionId: state$6.userSessionId,\n timestamp: Date.now(),\n data\n };\n state$6.events.push(event);\n }\n },\n track(data) {\n if (state$6.enabled) {\n const event = {\n type: \"TRACK\",\n name: data.name,\n userSessionId: state$6.userSessionId,\n timestamp: Date.now(),\n data\n };\n state$6.events.push(event);\n }\n },\n view(data) {\n if (state$6.enabled) {\n const event = {\n type: \"VIEW\",\n name: data.name,\n userSessionId: state$6.userSessionId,\n timestamp: Date.now(),\n data\n };\n state$6.events.push(event);\n }\n }\n};\n\nconst state$5 = proxy({\n chains: void 0,\n walletConnectUri: void 0,\n isAuth: false,\n isCustomDesktop: false,\n isCustomMobile: false,\n isDataLoaded: false,\n isUiLoaded: false\n});\nconst OptionsCtrl = {\n state: state$5,\n subscribe(callback) {\n return subscribe(state$5, () => callback(state$5));\n },\n setChains(chains) {\n state$5.chains = chains;\n },\n setWalletConnectUri(walletConnectUri) {\n state$5.walletConnectUri = walletConnectUri;\n },\n setIsCustomDesktop(isCustomDesktop) {\n state$5.isCustomDesktop = isCustomDesktop;\n },\n setIsCustomMobile(isCustomMobile) {\n state$5.isCustomMobile = isCustomMobile;\n },\n setIsDataLoaded(isDataLoaded) {\n state$5.isDataLoaded = isDataLoaded;\n },\n setIsUiLoaded(isUiLoaded) {\n state$5.isUiLoaded = isUiLoaded;\n },\n setIsAuth(isAuth) {\n state$5.isAuth = isAuth;\n }\n};\n\nconst state$4 = proxy({\n projectId: \"\",\n mobileWallets: void 0,\n desktopWallets: void 0,\n walletImages: void 0,\n chains: void 0,\n enableAuthMode: false,\n enableExplorer: true,\n explorerExcludedWalletIds: void 0,\n explorerRecommendedWalletIds: void 0,\n termsOfServiceUrl: void 0,\n privacyPolicyUrl: void 0\n});\nconst ConfigCtrl = {\n state: state$4,\n subscribe(callback) {\n return subscribe(state$4, () => callback(state$4));\n },\n setConfig(config) {\n var _a, _b;\n EventsCtrl.initialize();\n OptionsCtrl.setChains(config.chains);\n OptionsCtrl.setIsAuth(Boolean(config.enableAuthMode));\n OptionsCtrl.setIsCustomMobile(Boolean((_a = config.mobileWallets) == null ? void 0 : _a.length));\n OptionsCtrl.setIsCustomDesktop(Boolean((_b = config.desktopWallets) == null ? void 0 : _b.length));\n CoreUtil.setModalVersionInStorage();\n Object.assign(state$4, config);\n }\n};\n\nvar __defProp$2 = Object.defineProperty;\nvar __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$2 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$2 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$2 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n if (__getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(b)) {\n if (__propIsEnum$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n }\n return a;\n};\nconst W3M_API = \"https://explorer-api.walletconnect.com\";\nconst SDK_TYPE = \"wcm\";\nconst SDK_VERSION = `js-${\"2.7.0\"}`;\nasync function fetchListings(endpoint, params) {\n const allParams = __spreadValues$2({ sdkType: SDK_TYPE, sdkVersion: SDK_VERSION }, params);\n const url = new URL(endpoint, W3M_API);\n url.searchParams.append(\"projectId\", ConfigCtrl.state.projectId);\n Object.entries(allParams).forEach(([key, value]) => {\n if (value) {\n url.searchParams.append(key, String(value));\n }\n });\n const request = await fetch(url);\n return request.json();\n}\nconst ExplorerUtil = {\n async getDesktopListings(params) {\n return fetchListings(\"/w3m/v1/getDesktopListings\", params);\n },\n async getMobileListings(params) {\n return fetchListings(\"/w3m/v1/getMobileListings\", params);\n },\n async getInjectedListings(params) {\n return fetchListings(\"/w3m/v1/getInjectedListings\", params);\n },\n async getAllListings(params) {\n return fetchListings(\"/w3m/v1/getAllListings\", params);\n },\n getWalletImageUrl(imageId) {\n return `${W3M_API}/w3m/v1/getWalletImage/${imageId}?projectId=${ConfigCtrl.state.projectId}&sdkType=${SDK_TYPE}&sdkVersion=${SDK_VERSION}`;\n },\n getAssetImageUrl(imageId) {\n return `${W3M_API}/w3m/v1/getAssetImage/${imageId}?projectId=${ConfigCtrl.state.projectId}&sdkType=${SDK_TYPE}&sdkVersion=${SDK_VERSION}`;\n }\n};\n\nvar __defProp$1 = Object.defineProperty;\nvar __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$1 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$1 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$1 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n if (__getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(b)) {\n if (__propIsEnum$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n }\n return a;\n};\nconst isMobile = CoreUtil.isMobile();\nconst state$3 = proxy({\n wallets: { listings: [], total: 0, page: 1 },\n search: { listings: [], total: 0, page: 1 },\n recomendedWallets: []\n});\nconst ExplorerCtrl = {\n state: state$3,\n async getRecomendedWallets() {\n const { explorerRecommendedWalletIds, explorerExcludedWalletIds } = ConfigCtrl.state;\n if (explorerRecommendedWalletIds === \"NONE\" || explorerExcludedWalletIds === \"ALL\" && !explorerRecommendedWalletIds) {\n return state$3.recomendedWallets;\n }\n if (CoreUtil.isArray(explorerRecommendedWalletIds)) {\n const recommendedIds = explorerRecommendedWalletIds.join(\",\");\n const params = { recommendedIds };\n const { listings } = await ExplorerUtil.getAllListings(params);\n const listingsArr = Object.values(listings);\n listingsArr.sort((a, b) => {\n const aIndex = explorerRecommendedWalletIds.indexOf(a.id);\n const bIndex = explorerRecommendedWalletIds.indexOf(b.id);\n return aIndex - bIndex;\n });\n state$3.recomendedWallets = listingsArr;\n } else {\n const { chains, isAuth } = OptionsCtrl.state;\n const chainsFilter = chains == null ? void 0 : chains.join(\",\");\n const isExcluded = CoreUtil.isArray(explorerExcludedWalletIds);\n const params = {\n page: 1,\n sdks: isAuth ? \"auth_v1\" : void 0,\n entries: CoreUtil.RECOMMENDED_WALLET_AMOUNT,\n chains: chainsFilter,\n version: 2,\n excludedIds: isExcluded ? explorerExcludedWalletIds.join(\",\") : void 0\n };\n const { listings } = isMobile ? await ExplorerUtil.getMobileListings(params) : await ExplorerUtil.getDesktopListings(params);\n state$3.recomendedWallets = Object.values(listings);\n }\n return state$3.recomendedWallets;\n },\n async getWallets(params) {\n const extendedParams = __spreadValues$1({}, params);\n const { explorerRecommendedWalletIds, explorerExcludedWalletIds } = ConfigCtrl.state;\n const { recomendedWallets } = state$3;\n if (explorerExcludedWalletIds === \"ALL\") {\n return state$3.wallets;\n }\n if (recomendedWallets.length) {\n extendedParams.excludedIds = recomendedWallets.map((wallet) => wallet.id).join(\",\");\n } else if (CoreUtil.isArray(explorerRecommendedWalletIds)) {\n extendedParams.excludedIds = explorerRecommendedWalletIds.join(\",\");\n }\n if (CoreUtil.isArray(explorerExcludedWalletIds)) {\n extendedParams.excludedIds = [extendedParams.excludedIds, explorerExcludedWalletIds].filter(Boolean).join(\",\");\n }\n if (OptionsCtrl.state.isAuth) {\n extendedParams.sdks = \"auth_v1\";\n }\n const { page, search } = params;\n const { listings: listingsObj, total } = isMobile ? await ExplorerUtil.getMobileListings(extendedParams) : await ExplorerUtil.getDesktopListings(extendedParams);\n const listings = Object.values(listingsObj);\n const type = search ? \"search\" : \"wallets\";\n state$3[type] = {\n listings: [...state$3[type].listings, ...listings],\n total,\n page: page != null ? page : 1\n };\n return { listings, total };\n },\n getWalletImageUrl(imageId) {\n return ExplorerUtil.getWalletImageUrl(imageId);\n },\n getAssetImageUrl(imageId) {\n return ExplorerUtil.getAssetImageUrl(imageId);\n },\n resetSearch() {\n state$3.search = { listings: [], total: 0, page: 1 };\n }\n};\n\nconst state$2 = proxy({\n open: false\n});\nconst ModalCtrl = {\n state: state$2,\n subscribe(callback) {\n return subscribe(state$2, () => callback(state$2));\n },\n async open(options) {\n return new Promise((resolve) => {\n const { isUiLoaded, isDataLoaded } = OptionsCtrl.state;\n CoreUtil.removeWalletConnectDeepLink();\n OptionsCtrl.setWalletConnectUri(options == null ? void 0 : options.uri);\n OptionsCtrl.setChains(options == null ? void 0 : options.chains);\n RouterCtrl.reset(\"ConnectWallet\");\n if (isUiLoaded && isDataLoaded) {\n state$2.open = true;\n resolve();\n } else {\n const interval = setInterval(() => {\n const opts = OptionsCtrl.state;\n if (opts.isUiLoaded && opts.isDataLoaded) {\n clearInterval(interval);\n state$2.open = true;\n resolve();\n }\n }, 200);\n }\n });\n },\n close() {\n state$2.open = false;\n }\n};\n\nvar __defProp = Object.defineProperty;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nfunction isDarkMode() {\n return typeof matchMedia !== \"undefined\" && matchMedia(\"(prefers-color-scheme: dark)\").matches;\n}\nconst state$1 = proxy({\n themeMode: isDarkMode() ? \"dark\" : \"light\"\n});\nconst ThemeCtrl = {\n state: state$1,\n subscribe(callback) {\n return subscribe(state$1, () => callback(state$1));\n },\n setThemeConfig(theme) {\n const { themeMode, themeVariables } = theme;\n if (themeMode) {\n state$1.themeMode = themeMode;\n }\n if (themeVariables) {\n state$1.themeVariables = __spreadValues({}, themeVariables);\n }\n }\n};\n\nconst state = proxy({\n open: false,\n message: \"\",\n variant: \"success\"\n});\nconst ToastCtrl = {\n state,\n subscribe(callback) {\n return subscribe(state, () => callback(state));\n },\n openToast(message, variant) {\n state.open = true;\n state.message = message;\n state.variant = variant;\n },\n closeToast() {\n state.open = false;\n }\n};\n\nexport { ConfigCtrl, CoreUtil, EventsCtrl, ExplorerCtrl, ModalCtrl, OptionsCtrl, RouterCtrl, ThemeCtrl, ToastCtrl };\n//# sourceMappingURL=index.js.map\n","import { ModalCtrl, ThemeCtrl, ConfigCtrl, OptionsCtrl } from '@walletconnect/modal-core';\n\nclass WalletConnectModal {\n constructor(config) {\n this.openModal = ModalCtrl.open;\n this.closeModal = ModalCtrl.close;\n this.subscribeModal = ModalCtrl.subscribe;\n this.setTheme = ThemeCtrl.setThemeConfig;\n ThemeCtrl.setThemeConfig(config);\n ConfigCtrl.setConfig(config);\n this.initUi();\n }\n async initUi() {\n if (typeof window !== \"undefined\") {\n await import('@walletconnect/modal-ui');\n const modal = document.createElement(\"wcm-modal\");\n document.body.insertAdjacentElement(\"beforeend\", modal);\n OptionsCtrl.setIsUiLoaded(true);\n }\n }\n}\n\nexport { WalletConnectModal };\n//# sourceMappingURL=index.js.map\n"],"file":"assets/index-6c0f4072.js"}
1
+ {"version":3,"mappings":"iDAAK,MAAYA,GAAE,SAAuDC,EAAE,OAAO,eAAeC,EAAE,IAAI,QAAQC,GAAE,GAAG,IAAID,EAAE,IAAI,CAAC,EAAEA,EAAE,IAAI,CAAC,EAAED,EAAE,CAAC,IAAI,OAAO,WAAWA,EAAE,CAAC,IAAI,MAAM,WAAmqDG,GAAE,GAAGD,GAAE,CAAC,GAAG,EAAEH,EAAC,GAAG,KAAKK,GAAE,CAAC,EAAE,EAAE,KAAK,CAACH,EAAE,IAAI,EAAE,CAAC,CAAC,ECE33DI,EAAYC,GAAM,OAAOA,GAAM,UAAYA,IAAM,KACjDC,EAAgC,IAAI,QACpCC,EAAyB,IAAI,QAC7BC,GAAqB,CAACC,EAAW,OAAO,GAAIC,EAAW,CAACC,EAAQC,IAAY,IAAI,MAAMD,EAAQC,CAAO,EAAGC,EAAYR,GAAMD,EAASC,CAAC,GAAK,CAACE,EAAO,IAAIF,CAAC,IAAM,MAAM,QAAQA,CAAC,GAAK,EAAE,OAA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T,EACA,SAAS+C,IAAa,CACpB,OAAO,OAAO,WAAe,KAAe,WAAW,8BAA8B,EAAE,OACzF,CACA,MAAMC,EAAUrG,EAAM,CACpB,UAAWoG,KAAe,OAAS,OACrC,CAAC,EACKE,GAAY,CAChB,MAAOD,EACP,UAAUnG,EAAU,CAClB,OAAOD,EAAUoG,EAAS,IAAMnG,EAASmG,CAAO,CAAC,CAClD,EACD,eAAeE,EAAO,CACpB,KAAM,CAAE,UAAAC,EAAW,eAAAC,CAAgB,EAAGF,EAClCC,IACFH,EAAQ,UAAYG,GAElBC,IACFJ,EAAQ,eAAiBF,GAAe,CAAE,EAAEM,CAAc,EAE7D,CACH,EAEMC,EAAQ1G,EAAM,CAClB,KAAM,GACN,QAAS,GACT,QAAS,SACX,CAAC,EACK2G,GAAY,CAChB,MAAAD,EACA,UAAUxG,EAAU,CAClB,OAAOD,EAAUyG,EAAO,IAAMxG,EAASwG,CAAK,CAAC,CAC9C,EACD,UAAUE,EAASC,EAAS,CAC1BH,EAAM,KAAO,GACbA,EAAM,QAAUE,EAChBF,EAAM,QAAUG,CACjB,EACD,YAAa,CACXH,EAAM,KAAO,EACd,CACH,ECjhBA,MAAMI,EAAmB,CACvB,YAAYlE,EAAQ,CAClB,KAAK,UAAY8C,EAAU,KAC3B,KAAK,WAAaA,EAAU,MAC5B,KAAK,eAAiBA,EAAU,UAChC,KAAK,SAAWY,GAAU,eAC1BA,GAAU,eAAe1D,CAAM,EAC/BD,EAAW,UAAUC,CAAM,EAC3B,KAAK,OAAM,CACZ,CACD,MAAM,QAAS,CACb,GAAI,OAAO,OAAW,IAAa,CACjC,aAAM,OAAO,qBAAyB,uFACtC,MAAMmE,EAAQ,SAAS,cAAc,WAAW,EAChD,SAAS,KAAK,sBAAsB,YAAaA,CAAK,EACtD7E,EAAY,cAAc,EAAI,CAC/B,CACF,CACH","names":["t","s","c","l","y","h","isObject","x","proxyStateMap","refSet","buildProxyFunction","objectIs","newProxy","target","handler","canProxy","defaultHandlePromise","promise","snapCache","createSnapshot","version","handlePromise","cache","snap","markToTrack","key","value","desc","target2","ensureVersion","proxyCache","versionHolder","proxyFunction","initialObject","found","listeners","notifyUpdate","op","nextVersion","listener","checkVersion","nextCheckVersion","propProxyStates","propProxyState","propVersion","createPropListener","prop","newOp","addPropListener","remove","removePropListener","_a","entry","addListener","prevRemove","baseObject","proxyObject","prevValue","deleted","receiver","hasPrevValue","getUntracked","nextValue","v","e","childProxyState","proxyState","defaultProxyFunction","proxy","subscribe","callback","notifyInSync","ops","isListenerActive","removeListener","snapshot","state$7","RouterCtrl","view","data","last","CoreUtil","ua","url","appUrl","wcUri","name","safeAppUrl","encodedWcUrl","formattedUri","Buffer","miliseconds","resolve","href","adjustedTarget","routerData","isEnabled","state$6","EventsCtrl","connectedWalletId","event","state$5","OptionsCtrl","chains","walletConnectUri","isCustomDesktop","isCustomMobile","isDataLoaded","isUiLoaded","isAuth","state$4","ConfigCtrl","config","_b","__defProp$2","__getOwnPropSymbols$2","__hasOwnProp$2","__propIsEnum$2","__defNormalProp$2","obj","__spreadValues$2","a","b","W3M_API","SDK_TYPE","SDK_VERSION","fetchListings","endpoint","params","allParams","ExplorerUtil","imageId","__defProp$1","__getOwnPropSymbols$1","__hasOwnProp$1","__propIsEnum$1","__defNormalProp$1","__spreadValues$1","isMobile","state$3","ExplorerCtrl","explorerRecommendedWalletIds","explorerExcludedWalletIds","listings","listingsArr","aIndex","bIndex","chainsFilter","isExcluded","extendedParams","recomendedWallets","wallet","page","search","listingsObj","total","type","state$2","ModalCtrl","options","interval","opts","__defProp","__getOwnPropSymbols","__hasOwnProp","__propIsEnum","__defNormalProp","__spreadValues","isDarkMode","state$1","ThemeCtrl","theme","themeMode","themeVariables","state","ToastCtrl","message","variant","WalletConnectModal","modal"],"sources":["../../node_modules/proxy-compare/dist/index.modern.js","../../node_modules/valtio/esm/vanilla.mjs","../../node_modules/@walletconnect/modal-core/dist/index.js","../../node_modules/@walletconnect/modal/dist/index.js"],"sourcesContent":["const e=Symbol(),t=Symbol(),r=\"a\",n=\"w\";let o=(e,t)=>new Proxy(e,t);const s=Object.getPrototypeOf,c=new WeakMap,l=e=>e&&(c.has(e)?c.get(e):s(e)===Object.prototype||s(e)===Array.prototype),f=e=>\"object\"==typeof e&&null!==e,i=e=>{if(Array.isArray(e))return Array.from(e);const t=Object.getOwnPropertyDescriptors(e);return Object.values(t).forEach(e=>{e.configurable=!0}),Object.create(s(e),t)},u=e=>e[t]||e,a=(s,c,f,p)=>{if(!l(s))return s;let g=p&&p.get(s);if(!g){const e=u(s);g=(e=>Object.values(Object.getOwnPropertyDescriptors(e)).some(e=>!e.configurable&&!e.writable))(e)?[e,i(e)]:[e],null==p||p.set(s,g)}const[y,h]=g;let w=f&&f.get(y);return w&&w[1].f===!!h||(w=((o,s)=>{const c={f:s};let l=!1;const f=(e,t)=>{if(!l){let s=c[r].get(o);if(s||(s={},c[r].set(o,s)),e===n)s[n]=!0;else{let r=s[e];r||(r=new Set,s[e]=r),r.add(t)}}},i={get:(e,n)=>n===t?o:(f(\"k\",n),a(Reflect.get(e,n),c[r],c.c,c.t)),has:(t,n)=>n===e?(l=!0,c[r].delete(o),!0):(f(\"h\",n),Reflect.has(t,n)),getOwnPropertyDescriptor:(e,t)=>(f(\"o\",t),Reflect.getOwnPropertyDescriptor(e,t)),ownKeys:e=>(f(n),Reflect.ownKeys(e))};return s&&(i.set=i.deleteProperty=()=>!1),[i,c]})(y,!!h),w[1].p=o(h||y,w[0]),f&&f.set(y,w)),w[1][r]=c,w[1].c=f,w[1].t=p,w[1].p},p=(e,t,r,o)=>{if(Object.is(e,t))return!1;if(!f(e)||!f(t))return!0;const s=r.get(u(e));if(!s)return!0;if(o){const r=o.get(e);if(r&&r.n===t)return r.g;o.set(e,{n:t,g:!1})}let c=null;try{for(const r of s.h||[])if(c=Reflect.has(e,r)!==Reflect.has(t,r),c)return c;if(!0===s[n]){if(c=((e,t)=>{const r=Reflect.ownKeys(e),n=Reflect.ownKeys(t);return r.length!==n.length||r.some((e,t)=>e!==n[t])})(e,t),c)return c}else for(const r of s.o||[])if(c=!!Reflect.getOwnPropertyDescriptor(e,r)!=!!Reflect.getOwnPropertyDescriptor(t,r),c)return c;for(const n of s.k||[])if(c=p(e[n],t[n],r,o),c)return c;return null===c&&(c=!0),c}finally{o&&o.set(e,{n:t,g:c})}},g=t=>!!l(t)&&e in t,y=e=>l(e)&&e[t]||null,h=(e,t=!0)=>{c.set(e,t)},w=(e,t,r)=>{const o=[],s=new WeakSet,c=(e,l)=>{if(s.has(e))return;f(e)&&s.add(e);const i=f(e)&&t.get(u(e));if(i){var a,p;if(null==(a=i.h)||a.forEach(e=>{const t=`:has(${String(e)})`;o.push(l?[...l,t]:[t])}),!0===i[n]){const e=\":ownKeys\";o.push(l?[...l,e]:[e])}else{var g;null==(g=i.o)||g.forEach(e=>{const t=`:hasOwn(${String(e)})`;o.push(l?[...l,t]:[t])})}null==(p=i.k)||p.forEach(t=>{r&&!(\"value\"in(Object.getOwnPropertyDescriptor(e,t)||{}))||c(e[t],l?[...l,t]:[t])})}else l&&o.push(l)};return c(e),o},O=e=>{o=e};export{w as affectedToPathList,a as createProxy,y as getUntracked,p as isChanged,h as markToTrack,O as replaceNewProxy,g as trackMemo};\n//# sourceMappingURL=index.modern.mjs.map\n","import { markToTrack, getUntracked } from 'proxy-compare';\n\nconst isObject = (x) => typeof x === \"object\" && x !== null;\nconst proxyStateMap = /* @__PURE__ */ new WeakMap();\nconst refSet = /* @__PURE__ */ new WeakSet();\nconst buildProxyFunction = (objectIs = Object.is, newProxy = (target, handler) => new Proxy(target, handler), canProxy = (x) => isObject(x) && !refSet.has(x) && (Array.isArray(x) || !(Symbol.iterator in x)) && !(x instanceof WeakMap) && !(x instanceof WeakSet) && !(x instanceof Error) && !(x instanceof Number) && !(x instanceof Date) && !(x instanceof String) && !(x instanceof RegExp) && !(x instanceof ArrayBuffer), defaultHandlePromise = (promise) => {\n switch (promise.status) {\n case \"fulfilled\":\n return promise.value;\n case \"rejected\":\n throw promise.reason;\n default:\n throw promise;\n }\n}, snapCache = /* @__PURE__ */ new WeakMap(), createSnapshot = (target, version, handlePromise = defaultHandlePromise) => {\n const cache = snapCache.get(target);\n if ((cache == null ? void 0 : cache[0]) === version) {\n return cache[1];\n }\n const snap = Array.isArray(target) ? [] : Object.create(Object.getPrototypeOf(target));\n markToTrack(snap, true);\n snapCache.set(target, [version, snap]);\n Reflect.ownKeys(target).forEach((key) => {\n if (Object.getOwnPropertyDescriptor(snap, key)) {\n return;\n }\n const value = Reflect.get(target, key);\n const desc = {\n value,\n enumerable: true,\n // This is intentional to avoid copying with proxy-compare.\n // It's still non-writable, so it avoids assigning a value.\n configurable: true\n };\n if (refSet.has(value)) {\n markToTrack(value, false);\n } else if (value instanceof Promise) {\n delete desc.value;\n desc.get = () => handlePromise(value);\n } else if (proxyStateMap.has(value)) {\n const [target2, ensureVersion] = proxyStateMap.get(\n value\n );\n desc.value = createSnapshot(\n target2,\n ensureVersion(),\n handlePromise\n );\n }\n Object.defineProperty(snap, key, desc);\n });\n return Object.preventExtensions(snap);\n}, proxyCache = /* @__PURE__ */ new WeakMap(), versionHolder = [1, 1], proxyFunction = (initialObject) => {\n if (!isObject(initialObject)) {\n throw new Error(\"object required\");\n }\n const found = proxyCache.get(initialObject);\n if (found) {\n return found;\n }\n let version = versionHolder[0];\n const listeners = /* @__PURE__ */ new Set();\n const notifyUpdate = (op, nextVersion = ++versionHolder[0]) => {\n if (version !== nextVersion) {\n version = nextVersion;\n listeners.forEach((listener) => listener(op, nextVersion));\n }\n };\n let checkVersion = versionHolder[1];\n const ensureVersion = (nextCheckVersion = ++versionHolder[1]) => {\n if (checkVersion !== nextCheckVersion && !listeners.size) {\n checkVersion = nextCheckVersion;\n propProxyStates.forEach(([propProxyState]) => {\n const propVersion = propProxyState[1](nextCheckVersion);\n if (propVersion > version) {\n version = propVersion;\n }\n });\n }\n return version;\n };\n const createPropListener = (prop) => (op, nextVersion) => {\n const newOp = [...op];\n newOp[1] = [prop, ...newOp[1]];\n notifyUpdate(newOp, nextVersion);\n };\n const propProxyStates = /* @__PURE__ */ new Map();\n const addPropListener = (prop, propProxyState) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && propProxyStates.has(prop)) {\n throw new Error(\"prop listener already exists\");\n }\n if (listeners.size) {\n const remove = propProxyState[3](createPropListener(prop));\n propProxyStates.set(prop, [propProxyState, remove]);\n } else {\n propProxyStates.set(prop, [propProxyState]);\n }\n };\n const removePropListener = (prop) => {\n var _a;\n const entry = propProxyStates.get(prop);\n if (entry) {\n propProxyStates.delete(prop);\n (_a = entry[1]) == null ? void 0 : _a.call(entry);\n }\n };\n const addListener = (listener) => {\n listeners.add(listener);\n if (listeners.size === 1) {\n propProxyStates.forEach(([propProxyState, prevRemove], prop) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && prevRemove) {\n throw new Error(\"remove already exists\");\n }\n const remove = propProxyState[3](createPropListener(prop));\n propProxyStates.set(prop, [propProxyState, remove]);\n });\n }\n const removeListener = () => {\n listeners.delete(listener);\n if (listeners.size === 0) {\n propProxyStates.forEach(([propProxyState, remove], prop) => {\n if (remove) {\n remove();\n propProxyStates.set(prop, [propProxyState]);\n }\n });\n }\n };\n return removeListener;\n };\n const baseObject = Array.isArray(initialObject) ? [] : Object.create(Object.getPrototypeOf(initialObject));\n const handler = {\n deleteProperty(target, prop) {\n const prevValue = Reflect.get(target, prop);\n removePropListener(prop);\n const deleted = Reflect.deleteProperty(target, prop);\n if (deleted) {\n notifyUpdate([\"delete\", [prop], prevValue]);\n }\n return deleted;\n },\n set(target, prop, value, receiver) {\n const hasPrevValue = Reflect.has(target, prop);\n const prevValue = Reflect.get(target, prop, receiver);\n if (hasPrevValue && (objectIs(prevValue, value) || proxyCache.has(value) && objectIs(prevValue, proxyCache.get(value)))) {\n return true;\n }\n removePropListener(prop);\n if (isObject(value)) {\n value = getUntracked(value) || value;\n }\n let nextValue = value;\n if (value instanceof Promise) {\n value.then((v) => {\n value.status = \"fulfilled\";\n value.value = v;\n notifyUpdate([\"resolve\", [prop], v]);\n }).catch((e) => {\n value.status = \"rejected\";\n value.reason = e;\n notifyUpdate([\"reject\", [prop], e]);\n });\n } else {\n if (!proxyStateMap.has(value) && canProxy(value)) {\n nextValue = proxyFunction(value);\n }\n const childProxyState = !refSet.has(nextValue) && proxyStateMap.get(nextValue);\n if (childProxyState) {\n addPropListener(prop, childProxyState);\n }\n }\n Reflect.set(target, prop, nextValue, receiver);\n notifyUpdate([\"set\", [prop], value, prevValue]);\n return true;\n }\n };\n const proxyObject = newProxy(baseObject, handler);\n proxyCache.set(initialObject, proxyObject);\n const proxyState = [\n baseObject,\n ensureVersion,\n createSnapshot,\n addListener\n ];\n proxyStateMap.set(proxyObject, proxyState);\n Reflect.ownKeys(initialObject).forEach((key) => {\n const desc = Object.getOwnPropertyDescriptor(\n initialObject,\n key\n );\n if (\"value\" in desc) {\n proxyObject[key] = initialObject[key];\n delete desc.value;\n delete desc.writable;\n }\n Object.defineProperty(baseObject, key, desc);\n });\n return proxyObject;\n}) => [\n // public functions\n proxyFunction,\n // shared state\n proxyStateMap,\n refSet,\n // internal things\n objectIs,\n newProxy,\n canProxy,\n defaultHandlePromise,\n snapCache,\n createSnapshot,\n proxyCache,\n versionHolder\n];\nconst [defaultProxyFunction] = buildProxyFunction();\nfunction proxy(initialObject = {}) {\n return defaultProxyFunction(initialObject);\n}\nfunction getVersion(proxyObject) {\n const proxyState = proxyStateMap.get(proxyObject);\n return proxyState == null ? void 0 : proxyState[1]();\n}\nfunction subscribe(proxyObject, callback, notifyInSync) {\n const proxyState = proxyStateMap.get(proxyObject);\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !proxyState) {\n console.warn(\"Please use proxy object\");\n }\n let promise;\n const ops = [];\n const addListener = proxyState[3];\n let isListenerActive = false;\n const listener = (op) => {\n ops.push(op);\n if (notifyInSync) {\n callback(ops.splice(0));\n return;\n }\n if (!promise) {\n promise = Promise.resolve().then(() => {\n promise = void 0;\n if (isListenerActive) {\n callback(ops.splice(0));\n }\n });\n }\n };\n const removeListener = addListener(listener);\n isListenerActive = true;\n return () => {\n isListenerActive = false;\n removeListener();\n };\n}\nfunction snapshot(proxyObject, handlePromise) {\n const proxyState = proxyStateMap.get(proxyObject);\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !proxyState) {\n console.warn(\"Please use proxy object\");\n }\n const [target, ensureVersion, createSnapshot] = proxyState;\n return createSnapshot(target, ensureVersion(), handlePromise);\n}\nfunction ref(obj) {\n refSet.add(obj);\n return obj;\n}\nconst unstable_buildProxyFunction = buildProxyFunction;\n\nexport { getVersion, proxy, ref, snapshot, subscribe, unstable_buildProxyFunction };\n","import { proxy, subscribe, snapshot } from 'valtio/vanilla';\n\nconst state$7 = proxy({\n history: [\"ConnectWallet\"],\n view: \"ConnectWallet\",\n data: void 0\n});\nconst RouterCtrl = {\n state: state$7,\n subscribe(callback) {\n return subscribe(state$7, () => callback(state$7));\n },\n push(view, data) {\n if (view !== state$7.view) {\n state$7.view = view;\n if (data) {\n state$7.data = data;\n }\n state$7.history.push(view);\n }\n },\n reset(view) {\n state$7.view = view;\n state$7.history = [view];\n },\n replace(view) {\n if (state$7.history.length > 1) {\n state$7.history[state$7.history.length - 1] = view;\n state$7.view = view;\n }\n },\n goBack() {\n if (state$7.history.length > 1) {\n state$7.history.pop();\n const [last] = state$7.history.slice(-1);\n state$7.view = last;\n }\n },\n setData(data) {\n state$7.data = data;\n }\n};\n\nconst CoreUtil = {\n WALLETCONNECT_DEEPLINK_CHOICE: \"WALLETCONNECT_DEEPLINK_CHOICE\",\n WCM_VERSION: \"WCM_VERSION\",\n RECOMMENDED_WALLET_AMOUNT: 9,\n isMobile() {\n if (typeof window !== \"undefined\") {\n return Boolean(\n window.matchMedia(\"(pointer:coarse)\").matches || /Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)\n );\n }\n return false;\n },\n isAndroid() {\n return CoreUtil.isMobile() && navigator.userAgent.toLowerCase().includes(\"android\");\n },\n isIos() {\n const ua = navigator.userAgent.toLowerCase();\n return CoreUtil.isMobile() && (ua.includes(\"iphone\") || ua.includes(\"ipad\"));\n },\n isHttpUrl(url) {\n return url.startsWith(\"http://\") || url.startsWith(\"https://\");\n },\n isArray(data) {\n return Array.isArray(data) && data.length > 0;\n },\n isTelegram() {\n return typeof window !== \"undefined\" && // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (Boolean(window.TelegramWebviewProxy) || // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Boolean(window.Telegram) || // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Boolean(window.TelegramWebviewProxyProto));\n },\n formatNativeUrl(appUrl, wcUri, name) {\n if (CoreUtil.isHttpUrl(appUrl)) {\n return this.formatUniversalUrl(appUrl, wcUri, name);\n }\n let safeAppUrl = appUrl;\n if (!safeAppUrl.includes(\"://\")) {\n safeAppUrl = appUrl.replaceAll(\"/\", \"\").replaceAll(\":\", \"\");\n safeAppUrl = `${safeAppUrl}://`;\n }\n if (!safeAppUrl.endsWith(\"/\")) {\n safeAppUrl = `${safeAppUrl}/`;\n }\n this.setWalletConnectDeepLink(safeAppUrl, name);\n const encodedWcUrl = encodeURIComponent(wcUri);\n return `${safeAppUrl}wc?uri=${encodedWcUrl}`;\n },\n formatUniversalUrl(appUrl, wcUri, name) {\n if (!CoreUtil.isHttpUrl(appUrl)) {\n return this.formatNativeUrl(appUrl, wcUri, name);\n }\n let safeAppUrl = appUrl;\n if (safeAppUrl.startsWith(\"https://t.me\")) {\n const formattedUri = Buffer.from(wcUri).toString(\"base64\").replace(/[=]/g, \"\");\n if (safeAppUrl.endsWith(\"/\")) {\n safeAppUrl = safeAppUrl.slice(0, -1);\n }\n this.setWalletConnectDeepLink(safeAppUrl, name);\n const url = new URL(safeAppUrl);\n url.searchParams.set(\"startapp\", formattedUri);\n const link = url.toString();\n return link;\n }\n if (!safeAppUrl.endsWith(\"/\")) {\n safeAppUrl = `${safeAppUrl}/`;\n }\n this.setWalletConnectDeepLink(safeAppUrl, name);\n const encodedWcUrl = encodeURIComponent(wcUri);\n return `${safeAppUrl}wc?uri=${encodedWcUrl}`;\n },\n async wait(miliseconds) {\n return new Promise((resolve) => {\n setTimeout(resolve, miliseconds);\n });\n },\n openHref(href, target) {\n const adjustedTarget = this.isTelegram() ? \"_blank\" : target;\n window.open(href, adjustedTarget, \"noreferrer noopener\");\n },\n setWalletConnectDeepLink(href, name) {\n try {\n localStorage.setItem(CoreUtil.WALLETCONNECT_DEEPLINK_CHOICE, JSON.stringify({ href, name }));\n } catch (e) {\n console.info(\"Unable to set WalletConnect deep link\");\n }\n },\n setWalletConnectAndroidDeepLink(wcUri) {\n try {\n const [href] = wcUri.split(\"?\");\n localStorage.setItem(\n CoreUtil.WALLETCONNECT_DEEPLINK_CHOICE,\n JSON.stringify({ href, name: \"Android\" })\n );\n } catch (e) {\n console.info(\"Unable to set WalletConnect android deep link\");\n }\n },\n removeWalletConnectDeepLink() {\n try {\n localStorage.removeItem(CoreUtil.WALLETCONNECT_DEEPLINK_CHOICE);\n } catch (e) {\n console.info(\"Unable to remove WalletConnect deep link\");\n }\n },\n setModalVersionInStorage() {\n try {\n if (typeof localStorage !== \"undefined\") {\n localStorage.setItem(CoreUtil.WCM_VERSION, \"2.7.0\");\n }\n } catch (e) {\n console.info(\"Unable to set Web3Modal version in storage\");\n }\n },\n getWalletRouterData() {\n var _a;\n const routerData = (_a = RouterCtrl.state.data) == null ? void 0 : _a.Wallet;\n if (!routerData) {\n throw new Error('Missing \"Wallet\" view data');\n }\n return routerData;\n }\n};\n\nconst isEnabled = typeof location !== \"undefined\" && (location.hostname.includes(\"localhost\") || location.protocol.includes(\"https\"));\nconst state$6 = proxy({\n enabled: isEnabled,\n userSessionId: \"\",\n events: [],\n connectedWalletId: void 0\n});\nconst EventsCtrl = {\n state: state$6,\n subscribe(callback) {\n return subscribe(state$6.events, () => callback(snapshot(state$6.events[state$6.events.length - 1])));\n },\n initialize() {\n if (state$6.enabled && typeof (crypto == null ? void 0 : crypto.randomUUID) !== \"undefined\") {\n state$6.userSessionId = crypto.randomUUID();\n }\n },\n setConnectedWalletId(connectedWalletId) {\n state$6.connectedWalletId = connectedWalletId;\n },\n click(data) {\n if (state$6.enabled) {\n const event = {\n type: \"CLICK\",\n name: data.name,\n userSessionId: state$6.userSessionId,\n timestamp: Date.now(),\n data\n };\n state$6.events.push(event);\n }\n },\n track(data) {\n if (state$6.enabled) {\n const event = {\n type: \"TRACK\",\n name: data.name,\n userSessionId: state$6.userSessionId,\n timestamp: Date.now(),\n data\n };\n state$6.events.push(event);\n }\n },\n view(data) {\n if (state$6.enabled) {\n const event = {\n type: \"VIEW\",\n name: data.name,\n userSessionId: state$6.userSessionId,\n timestamp: Date.now(),\n data\n };\n state$6.events.push(event);\n }\n }\n};\n\nconst state$5 = proxy({\n chains: void 0,\n walletConnectUri: void 0,\n isAuth: false,\n isCustomDesktop: false,\n isCustomMobile: false,\n isDataLoaded: false,\n isUiLoaded: false\n});\nconst OptionsCtrl = {\n state: state$5,\n subscribe(callback) {\n return subscribe(state$5, () => callback(state$5));\n },\n setChains(chains) {\n state$5.chains = chains;\n },\n setWalletConnectUri(walletConnectUri) {\n state$5.walletConnectUri = walletConnectUri;\n },\n setIsCustomDesktop(isCustomDesktop) {\n state$5.isCustomDesktop = isCustomDesktop;\n },\n setIsCustomMobile(isCustomMobile) {\n state$5.isCustomMobile = isCustomMobile;\n },\n setIsDataLoaded(isDataLoaded) {\n state$5.isDataLoaded = isDataLoaded;\n },\n setIsUiLoaded(isUiLoaded) {\n state$5.isUiLoaded = isUiLoaded;\n },\n setIsAuth(isAuth) {\n state$5.isAuth = isAuth;\n }\n};\n\nconst state$4 = proxy({\n projectId: \"\",\n mobileWallets: void 0,\n desktopWallets: void 0,\n walletImages: void 0,\n chains: void 0,\n enableAuthMode: false,\n enableExplorer: true,\n explorerExcludedWalletIds: void 0,\n explorerRecommendedWalletIds: void 0,\n termsOfServiceUrl: void 0,\n privacyPolicyUrl: void 0\n});\nconst ConfigCtrl = {\n state: state$4,\n subscribe(callback) {\n return subscribe(state$4, () => callback(state$4));\n },\n setConfig(config) {\n var _a, _b;\n EventsCtrl.initialize();\n OptionsCtrl.setChains(config.chains);\n OptionsCtrl.setIsAuth(Boolean(config.enableAuthMode));\n OptionsCtrl.setIsCustomMobile(Boolean((_a = config.mobileWallets) == null ? void 0 : _a.length));\n OptionsCtrl.setIsCustomDesktop(Boolean((_b = config.desktopWallets) == null ? void 0 : _b.length));\n CoreUtil.setModalVersionInStorage();\n Object.assign(state$4, config);\n }\n};\n\nvar __defProp$2 = Object.defineProperty;\nvar __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$2 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$2 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$2 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n if (__getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(b)) {\n if (__propIsEnum$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n }\n return a;\n};\nconst W3M_API = \"https://explorer-api.walletconnect.com\";\nconst SDK_TYPE = \"wcm\";\nconst SDK_VERSION = `js-${\"2.7.0\"}`;\nasync function fetchListings(endpoint, params) {\n const allParams = __spreadValues$2({ sdkType: SDK_TYPE, sdkVersion: SDK_VERSION }, params);\n const url = new URL(endpoint, W3M_API);\n url.searchParams.append(\"projectId\", ConfigCtrl.state.projectId);\n Object.entries(allParams).forEach(([key, value]) => {\n if (value) {\n url.searchParams.append(key, String(value));\n }\n });\n const request = await fetch(url);\n return request.json();\n}\nconst ExplorerUtil = {\n async getDesktopListings(params) {\n return fetchListings(\"/w3m/v1/getDesktopListings\", params);\n },\n async getMobileListings(params) {\n return fetchListings(\"/w3m/v1/getMobileListings\", params);\n },\n async getInjectedListings(params) {\n return fetchListings(\"/w3m/v1/getInjectedListings\", params);\n },\n async getAllListings(params) {\n return fetchListings(\"/w3m/v1/getAllListings\", params);\n },\n getWalletImageUrl(imageId) {\n return `${W3M_API}/w3m/v1/getWalletImage/${imageId}?projectId=${ConfigCtrl.state.projectId}&sdkType=${SDK_TYPE}&sdkVersion=${SDK_VERSION}`;\n },\n getAssetImageUrl(imageId) {\n return `${W3M_API}/w3m/v1/getAssetImage/${imageId}?projectId=${ConfigCtrl.state.projectId}&sdkType=${SDK_TYPE}&sdkVersion=${SDK_VERSION}`;\n }\n};\n\nvar __defProp$1 = Object.defineProperty;\nvar __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$1 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$1 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$1 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n if (__getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(b)) {\n if (__propIsEnum$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n }\n return a;\n};\nconst isMobile = CoreUtil.isMobile();\nconst state$3 = proxy({\n wallets: { listings: [], total: 0, page: 1 },\n search: { listings: [], total: 0, page: 1 },\n recomendedWallets: []\n});\nconst ExplorerCtrl = {\n state: state$3,\n async getRecomendedWallets() {\n const { explorerRecommendedWalletIds, explorerExcludedWalletIds } = ConfigCtrl.state;\n if (explorerRecommendedWalletIds === \"NONE\" || explorerExcludedWalletIds === \"ALL\" && !explorerRecommendedWalletIds) {\n return state$3.recomendedWallets;\n }\n if (CoreUtil.isArray(explorerRecommendedWalletIds)) {\n const recommendedIds = explorerRecommendedWalletIds.join(\",\");\n const params = { recommendedIds };\n const { listings } = await ExplorerUtil.getAllListings(params);\n const listingsArr = Object.values(listings);\n listingsArr.sort((a, b) => {\n const aIndex = explorerRecommendedWalletIds.indexOf(a.id);\n const bIndex = explorerRecommendedWalletIds.indexOf(b.id);\n return aIndex - bIndex;\n });\n state$3.recomendedWallets = listingsArr;\n } else {\n const { chains, isAuth } = OptionsCtrl.state;\n const chainsFilter = chains == null ? void 0 : chains.join(\",\");\n const isExcluded = CoreUtil.isArray(explorerExcludedWalletIds);\n const params = {\n page: 1,\n sdks: isAuth ? \"auth_v1\" : void 0,\n entries: CoreUtil.RECOMMENDED_WALLET_AMOUNT,\n chains: chainsFilter,\n version: 2,\n excludedIds: isExcluded ? explorerExcludedWalletIds.join(\",\") : void 0\n };\n const { listings } = isMobile ? await ExplorerUtil.getMobileListings(params) : await ExplorerUtil.getDesktopListings(params);\n state$3.recomendedWallets = Object.values(listings);\n }\n return state$3.recomendedWallets;\n },\n async getWallets(params) {\n const extendedParams = __spreadValues$1({}, params);\n const { explorerRecommendedWalletIds, explorerExcludedWalletIds } = ConfigCtrl.state;\n const { recomendedWallets } = state$3;\n if (explorerExcludedWalletIds === \"ALL\") {\n return state$3.wallets;\n }\n if (recomendedWallets.length) {\n extendedParams.excludedIds = recomendedWallets.map((wallet) => wallet.id).join(\",\");\n } else if (CoreUtil.isArray(explorerRecommendedWalletIds)) {\n extendedParams.excludedIds = explorerRecommendedWalletIds.join(\",\");\n }\n if (CoreUtil.isArray(explorerExcludedWalletIds)) {\n extendedParams.excludedIds = [extendedParams.excludedIds, explorerExcludedWalletIds].filter(Boolean).join(\",\");\n }\n if (OptionsCtrl.state.isAuth) {\n extendedParams.sdks = \"auth_v1\";\n }\n const { page, search } = params;\n const { listings: listingsObj, total } = isMobile ? await ExplorerUtil.getMobileListings(extendedParams) : await ExplorerUtil.getDesktopListings(extendedParams);\n const listings = Object.values(listingsObj);\n const type = search ? \"search\" : \"wallets\";\n state$3[type] = {\n listings: [...state$3[type].listings, ...listings],\n total,\n page: page != null ? page : 1\n };\n return { listings, total };\n },\n getWalletImageUrl(imageId) {\n return ExplorerUtil.getWalletImageUrl(imageId);\n },\n getAssetImageUrl(imageId) {\n return ExplorerUtil.getAssetImageUrl(imageId);\n },\n resetSearch() {\n state$3.search = { listings: [], total: 0, page: 1 };\n }\n};\n\nconst state$2 = proxy({\n open: false\n});\nconst ModalCtrl = {\n state: state$2,\n subscribe(callback) {\n return subscribe(state$2, () => callback(state$2));\n },\n async open(options) {\n return new Promise((resolve) => {\n const { isUiLoaded, isDataLoaded } = OptionsCtrl.state;\n CoreUtil.removeWalletConnectDeepLink();\n OptionsCtrl.setWalletConnectUri(options == null ? void 0 : options.uri);\n OptionsCtrl.setChains(options == null ? void 0 : options.chains);\n RouterCtrl.reset(\"ConnectWallet\");\n if (isUiLoaded && isDataLoaded) {\n state$2.open = true;\n resolve();\n } else {\n const interval = setInterval(() => {\n const opts = OptionsCtrl.state;\n if (opts.isUiLoaded && opts.isDataLoaded) {\n clearInterval(interval);\n state$2.open = true;\n resolve();\n }\n }, 200);\n }\n });\n },\n close() {\n state$2.open = false;\n }\n};\n\nvar __defProp = Object.defineProperty;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nfunction isDarkMode() {\n return typeof matchMedia !== \"undefined\" && matchMedia(\"(prefers-color-scheme: dark)\").matches;\n}\nconst state$1 = proxy({\n themeMode: isDarkMode() ? \"dark\" : \"light\"\n});\nconst ThemeCtrl = {\n state: state$1,\n subscribe(callback) {\n return subscribe(state$1, () => callback(state$1));\n },\n setThemeConfig(theme) {\n const { themeMode, themeVariables } = theme;\n if (themeMode) {\n state$1.themeMode = themeMode;\n }\n if (themeVariables) {\n state$1.themeVariables = __spreadValues({}, themeVariables);\n }\n }\n};\n\nconst state = proxy({\n open: false,\n message: \"\",\n variant: \"success\"\n});\nconst ToastCtrl = {\n state,\n subscribe(callback) {\n return subscribe(state, () => callback(state));\n },\n openToast(message, variant) {\n state.open = true;\n state.message = message;\n state.variant = variant;\n },\n closeToast() {\n state.open = false;\n }\n};\n\nexport { ConfigCtrl, CoreUtil, EventsCtrl, ExplorerCtrl, ModalCtrl, OptionsCtrl, RouterCtrl, ThemeCtrl, ToastCtrl };\n//# sourceMappingURL=index.js.map\n","import { ModalCtrl, ThemeCtrl, ConfigCtrl, OptionsCtrl } from '@walletconnect/modal-core';\n\nclass WalletConnectModal {\n constructor(config) {\n this.openModal = ModalCtrl.open;\n this.closeModal = ModalCtrl.close;\n this.subscribeModal = ModalCtrl.subscribe;\n this.setTheme = ThemeCtrl.setThemeConfig;\n ThemeCtrl.setThemeConfig(config);\n ConfigCtrl.setConfig(config);\n this.initUi();\n }\n async initUi() {\n if (typeof window !== \"undefined\") {\n await import('@walletconnect/modal-ui');\n const modal = document.createElement(\"wcm-modal\");\n document.body.insertAdjacentElement(\"beforeend\", modal);\n OptionsCtrl.setIsUiLoaded(true);\n }\n }\n}\n\nexport { WalletConnectModal };\n//# sourceMappingURL=index.js.map\n"],"file":"assets/index-35e0d472.js"}
@@ -1,4 +1,4 @@
1
- import{T as xt,M as re,R as N,E as k,C as x,a as X,b as Wo,O as Z,c as ht}from"./index-6c0f4072.js";import"./index-39542650.js";/**
1
+ import{T as xt,M as re,R as N,E as k,C as x,a as X,b as Wo,O as Z,c as ht}from"./index-35e0d472.js";import"./index-91bdab09.js";/**
2
2
  * @license
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
@@ -52,4 +52,4 @@ The chosen QR Code version cannot contain this amount of data.
52
52
  Minimum version required to store current data is: `+i+`.
53
53
  `);const s=Oi(t,r,o),l=ye.getSymbolSize(t),a=new gi(l);return $i(a,t),_i(a),Ci(a,t),Ne(a,r,0),t>=7&&Ei(a,t),Ai(a,s),isNaN(n)&&(n=Ke.getBestMask(a,Ne.bind(null,a,r))),Ke.applyMask(n,a),Ne(a,r,n),{modules:a,version:t,errorCorrectionLevel:r,maskPattern:n,segments:o}}po.create=function(t,r){if(typeof t>"u"||t==="")throw new Error("No input text");let n=De.M,o,i;return typeof r<"u"&&(n=De.from(r.errorCorrectionLevel,De.M),o=de.from(r.version),i=Ke.from(r.maskPattern),r.toSJISFunc&&ye.setToSJISFunction(r.toSJISFunc)),Ii(t,o,n,i)};var Po={},br={};(function(e){function t(r){if(typeof r=="number"&&(r=r.toString()),typeof r!="string")throw new Error("Color should be defined as hex string");let n=r.slice().replace("#","").split("");if(n.length<3||n.length===5||n.length>8)throw new Error("Invalid hex color: "+r);(n.length===3||n.length===4)&&(n=Array.prototype.concat.apply([],n.map(function(i){return[i,i]}))),n.length===6&&n.push("F","F");const o=parseInt(n.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:o&255,hex:"#"+n.slice(0,6).join("")}}e.getOptions=function(n){n||(n={}),n.color||(n.color={});const o=typeof n.margin>"u"||n.margin===null||n.margin<0?4:n.margin,i=n.width&&n.width>=21?n.width:void 0,s=n.scale||4;return{width:i,scale:i?4:s,margin:o,color:{dark:t(n.color.dark||"#000000ff"),light:t(n.color.light||"#ffffffff")},type:n.type,rendererOpts:n.rendererOpts||{}}},e.getScale=function(n,o){return o.width&&o.width>=n+o.margin*2?o.width/(n+o.margin*2):o.scale},e.getImageWidth=function(n,o){const i=e.getScale(n,o);return Math.floor((n+o.margin*2)*i)},e.qrToImageData=function(n,o,i){const s=o.modules.size,l=o.modules.data,a=e.getScale(s,i),c=Math.floor((s+i.margin*2)*a),d=i.margin*a,b=[i.color.light,i.color.dark];for(let h=0;h<c;h++)for(let p=0;p<c;p++){let g=(h*c+p)*4,f=i.color.light;if(h>=d&&p>=d&&h<c-d&&p<c-d){const A=Math.floor((h-d)/a),u=Math.floor((p-d)/a);f=b[l[A*s+u]?1:0]}n[g++]=f.r,n[g++]=f.g,n[g++]=f.b,n[g]=f.a}}})(br);(function(e){const t=br;function r(o,i,s){o.clearRect(0,0,i.width,i.height),i.style||(i.style={}),i.height=s,i.width=s,i.style.height=s+"px",i.style.width=s+"px"}function n(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(i,s,l){let a=l,c=s;typeof a>"u"&&(!s||!s.getContext)&&(a=s,s=void 0),s||(c=n()),a=t.getOptions(a);const d=t.getImageWidth(i.modules.size,a),b=c.getContext("2d"),h=b.createImageData(d,d);return t.qrToImageData(h.data,i,a),r(b,c,d),b.putImageData(h,0,0),c},e.renderToDataURL=function(i,s,l){let a=l;typeof a>"u"&&(!s||!s.getContext)&&(a=s,s=void 0),a||(a={});const c=e.render(i,s,a),d=a.type||"image/png",b=a.rendererOpts||{};return c.toDataURL(d,b.quality)}})(Po);var Io={};const Ti=br;function Fr(e,t){const r=e.a/255,n=t+'="'+e.hex+'"';return r<1?n+" "+t+'-opacity="'+r.toFixed(2).slice(1)+'"':n}function Be(e,t,r){let n=e+t;return typeof r<"u"&&(n+=" "+r),n}function Mi(e,t,r){let n="",o=0,i=!1,s=0;for(let l=0;l<e.length;l++){const a=Math.floor(l%t),c=Math.floor(l/t);!a&&!i&&(i=!0),e[l]?(s++,l>0&&a>0&&e[l-1]||(n+=i?Be("M",a+r,.5+c+r):Be("m",o,0),o=0,i=!1),a+1<t&&e[l+1]||(n+=Be("h",s),s=0)):o++}return n}Io.render=function(t,r,n){const o=Ti.getOptions(r),i=t.modules.size,s=t.modules.data,l=i+o.margin*2,a=o.color.light.a?"<path "+Fr(o.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",c="<path "+Fr(o.color.dark,"stroke")+' d="'+Mi(s,i,o.margin)+'"/>',d='viewBox="0 0 '+l+" "+l+'"',h='<svg xmlns="http://www.w3.org/2000/svg" '+(o.width?'width="'+o.width+'" height="'+o.width+'" ':"")+d+' shape-rendering="crispEdges">'+a+c+`</svg>
54
54
  `;return typeof n=="function"&&n(null,h),h};const Si=Vn,Qe=po,To=Po,Ri=Io;function yr(e,t,r,n,o){const i=[].slice.call(arguments,1),s=i.length,l=typeof i[s-1]=="function";if(!l&&!Si())throw new Error("Callback required as last argument");if(l){if(s<2)throw new Error("Too few arguments provided");s===2?(o=r,r=t,t=n=void 0):s===3&&(t.getContext&&typeof o>"u"?(o=n,n=void 0):(o=n,n=r,r=t,t=void 0))}else{if(s<1)throw new Error("Too few arguments provided");return s===1?(r=t,t=n=void 0):s===2&&!t.getContext&&(n=r,r=t,t=void 0),new Promise(function(a,c){try{const d=Qe.create(r,n);a(e(d,t,n))}catch(d){c(d)}})}try{const a=Qe.create(r,n);o(null,e(a,t,n))}catch(a){o(a)}}Kt.create=Qe.create;Kt.toCanvas=yr.bind(null,To.render);Kt.toDataURL=yr.bind(null,To.renderToDataURL);Kt.toString=yr.bind(null,function(e,t,r){return Ri.render(e,r)});var Di=Object.defineProperty,Vr=Object.getOwnPropertySymbols,Li=Object.prototype.hasOwnProperty,Ni=Object.prototype.propertyIsEnumerable,Zr=(e,t,r)=>t in e?Di(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,We=(e,t)=>{for(var r in t||(t={}))Li.call(t,r)&&Zr(e,r,t[r]);if(Vr)for(var r of Vr(t))Ni.call(t,r)&&Zr(e,r,t[r]);return e};function Bi(){var e;const t=(e=xt.state.themeMode)!=null?e:"dark",n={light:{foreground:{1:"rgb(20,20,20)",2:"rgb(121,134,134)",3:"rgb(158,169,169)"},background:{1:"rgb(255,255,255)",2:"rgb(241,243,243)",3:"rgb(228,231,231)"},overlay:"rgba(0,0,0,0.1)"},dark:{foreground:{1:"rgb(228,231,231)",2:"rgb(148,158,158)",3:"rgb(110,119,119)"},background:{1:"rgb(20,20,20)",2:"rgb(39,42,42)",3:"rgb(59,64,64)"},overlay:"rgba(255,255,255,0.1)"}}[t];return{"--wcm-color-fg-1":n.foreground[1],"--wcm-color-fg-2":n.foreground[2],"--wcm-color-fg-3":n.foreground[3],"--wcm-color-bg-1":n.background[1],"--wcm-color-bg-2":n.background[2],"--wcm-color-bg-3":n.background[3],"--wcm-color-overlay":n.overlay}}function qr(){return{"--wcm-accent-color":"#3396FF","--wcm-accent-fill-color":"#FFFFFF","--wcm-z-index":"89","--wcm-background-color":"#3396FF","--wcm-background-border-radius":"8px","--wcm-container-border-radius":"30px","--wcm-wallet-icon-border-radius":"15px","--wcm-wallet-icon-large-border-radius":"30px","--wcm-wallet-icon-small-border-radius":"7px","--wcm-input-border-radius":"28px","--wcm-button-border-radius":"10px","--wcm-notification-border-radius":"36px","--wcm-secondary-button-border-radius":"28px","--wcm-icon-button-border-radius":"50%","--wcm-button-hover-highlight-border-radius":"10px","--wcm-text-big-bold-size":"20px","--wcm-text-big-bold-weight":"600","--wcm-text-big-bold-line-height":"24px","--wcm-text-big-bold-letter-spacing":"-0.03em","--wcm-text-big-bold-text-transform":"none","--wcm-text-xsmall-bold-size":"10px","--wcm-text-xsmall-bold-weight":"700","--wcm-text-xsmall-bold-line-height":"12px","--wcm-text-xsmall-bold-letter-spacing":"0.02em","--wcm-text-xsmall-bold-text-transform":"uppercase","--wcm-text-xsmall-regular-size":"12px","--wcm-text-xsmall-regular-weight":"600","--wcm-text-xsmall-regular-line-height":"14px","--wcm-text-xsmall-regular-letter-spacing":"-0.03em","--wcm-text-xsmall-regular-text-transform":"none","--wcm-text-small-thin-size":"14px","--wcm-text-small-thin-weight":"500","--wcm-text-small-thin-line-height":"16px","--wcm-text-small-thin-letter-spacing":"-0.03em","--wcm-text-small-thin-text-transform":"none","--wcm-text-small-regular-size":"14px","--wcm-text-small-regular-weight":"600","--wcm-text-small-regular-line-height":"16px","--wcm-text-small-regular-letter-spacing":"-0.03em","--wcm-text-small-regular-text-transform":"none","--wcm-text-medium-regular-size":"16px","--wcm-text-medium-regular-weight":"600","--wcm-text-medium-regular-line-height":"20px","--wcm-text-medium-regular-letter-spacing":"-0.03em","--wcm-text-medium-regular-text-transform":"none","--wcm-font-family":"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif","--wcm-font-feature-settings":"'tnum' on, 'lnum' on, 'case' on","--wcm-success-color":"rgb(38,181,98)","--wcm-error-color":"rgb(242, 90, 103)","--wcm-overlay-background-color":"rgba(0, 0, 0, 0.3)","--wcm-overlay-backdrop-filter":"none"}}const O={getPreset(e){return qr()[e]},setTheme(){const e=document.querySelector(":root"),{themeVariables:t}=xt.state;if(e){const r=We(We(We({},Bi()),qr()),t);Object.entries(r).forEach(([n,o])=>e.style.setProperty(n,o))}},globalCss:I`*,::after,::before{margin:0;padding:0;box-sizing:border-box;font-style:normal;text-rendering:optimizeSpeed;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-tap-highlight-color:transparent;backface-visibility:hidden}button{cursor:pointer;display:flex;justify-content:center;align-items:center;position:relative;border:none;background-color:transparent;transition:all .2s ease}@media (hover:hover) and (pointer:fine){button:active{transition:all .1s ease;transform:scale(.93)}}button::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;transition:background-color,.2s ease}button:disabled{cursor:not-allowed}button svg,button wcm-text{position:relative;z-index:1}input{border:none;outline:0;appearance:none}img{display:block}::selection{color:var(--wcm-accent-fill-color);background:var(--wcm-accent-color)}`},Wi=I`button{border-radius:var(--wcm-secondary-button-border-radius);height:28px;padding:0 10px;background-color:var(--wcm-accent-color)}button path{fill:var(--wcm-accent-fill-color)}button::after{border-radius:inherit;border:1px solid var(--wcm-color-overlay)}button:disabled::after{background-color:transparent}.wcm-icon-left svg{margin-right:5px}.wcm-icon-right svg{margin-left:5px}button:active::after{background-color:var(--wcm-color-overlay)}.wcm-ghost,.wcm-ghost:active::after,.wcm-outline{background-color:transparent}.wcm-ghost:active{opacity:.5}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}.wcm-ghost:hover::after{background-color:transparent}.wcm-ghost:hover{opacity:.5}}button:disabled{background-color:var(--wcm-color-bg-3);pointer-events:none}.wcm-ghost::after{border-color:transparent}.wcm-ghost path{fill:var(--wcm-color-fg-2)}.wcm-outline path{fill:var(--wcm-accent-color)}.wcm-outline:disabled{background-color:transparent;opacity:.5}`;var Ui=Object.defineProperty,ji=Object.getOwnPropertyDescriptor,Mt=(e,t,r,n)=>{for(var o=n>1?void 0:n?ji(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Ui(t,r,o),o};let ot=class extends E{constructor(){super(...arguments),this.disabled=!1,this.iconLeft=void 0,this.iconRight=void 0,this.onClick=()=>null,this.variant="default"}render(){const e={"wcm-icon-left":this.iconLeft!==void 0,"wcm-icon-right":this.iconRight!==void 0,"wcm-ghost":this.variant==="ghost","wcm-outline":this.variant==="outline"};let t="inverse";return this.variant==="ghost"&&(t="secondary"),this.variant==="outline"&&(t="accent"),m`<button class="${G(e)}" ?disabled="${this.disabled}" @click="${this.onClick}">${this.iconLeft}<wcm-text variant="small-regular" color="${t}"><slot></slot></wcm-text>${this.iconRight}</button>`}};ot.styles=[O.globalCss,Wi];Mt([_({type:Boolean})],ot.prototype,"disabled",2);Mt([_()],ot.prototype,"iconLeft",2);Mt([_()],ot.prototype,"iconRight",2);Mt([_()],ot.prototype,"onClick",2);Mt([_()],ot.prototype,"variant",2);ot=Mt([P("wcm-button")],ot);const ki=I`:host{display:inline-block}button{padding:0 15px 1px;height:40px;border-radius:var(--wcm-button-border-radius);color:var(--wcm-accent-fill-color);background-color:var(--wcm-accent-color)}button::after{content:'';top:0;bottom:0;left:0;right:0;position:absolute;background-color:transparent;border-radius:inherit;transition:background-color .2s ease;border:1px solid var(--wcm-color-overlay)}button:active::after{background-color:var(--wcm-color-overlay)}button:disabled{padding-bottom:0;background-color:var(--wcm-color-bg-3);color:var(--wcm-color-fg-3)}.wcm-secondary{color:var(--wcm-accent-color);background-color:transparent}.wcm-secondary::after{display:none}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}}`;var Hi=Object.defineProperty,zi=Object.getOwnPropertyDescriptor,xr=(e,t,r,n)=>{for(var o=n>1?void 0:n?zi(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Hi(t,r,o),o};let zt=class extends E{constructor(){super(...arguments),this.disabled=!1,this.variant="primary"}render(){const e={"wcm-secondary":this.variant==="secondary"};return m`<button ?disabled="${this.disabled}" class="${G(e)}"><slot></slot></button>`}};zt.styles=[O.globalCss,ki];xr([_({type:Boolean})],zt.prototype,"disabled",2);xr([_()],zt.prototype,"variant",2);zt=xr([P("wcm-button-big")],zt);const Fi=I`:host{background-color:var(--wcm-color-bg-2);border-top:1px solid var(--wcm-color-bg-3)}div{padding:10px 20px;display:inherit;flex-direction:inherit;align-items:inherit;width:inherit;justify-content:inherit}`;var Vi=Object.defineProperty,Zi=Object.getOwnPropertyDescriptor,qi=(e,t,r,n)=>{for(var o=n>1?void 0:n?Zi(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Vi(t,r,o),o};let Ge=class extends E{render(){return m`<div><slot></slot></div>`}};Ge.styles=[O.globalCss,Fi];Ge=qi([P("wcm-info-footer")],Ge);const T={CROSS_ICON:L`<svg width="12" height="12" viewBox="0 0 12 12"><path d="M9.94 11A.75.75 0 1 0 11 9.94L7.414 6.353a.5.5 0 0 1 0-.708L11 2.061A.75.75 0 1 0 9.94 1L6.353 4.586a.5.5 0 0 1-.708 0L2.061 1A.75.75 0 0 0 1 2.06l3.586 3.586a.5.5 0 0 1 0 .708L1 9.939A.75.75 0 1 0 2.06 11l3.586-3.586a.5.5 0 0 1 .708 0L9.939 11Z" fill="#fff"/></svg>`,WALLET_CONNECT_LOGO:L`<svg width="178" height="29" viewBox="0 0 178 29" id="wcm-wc-logo"><path d="M10.683 7.926c5.284-5.17 13.85-5.17 19.134 0l.636.623a.652.652 0 0 1 0 .936l-2.176 2.129a.343.343 0 0 1-.478 0l-.875-.857c-3.686-3.607-9.662-3.607-13.348 0l-.937.918a.343.343 0 0 1-.479 0l-2.175-2.13a.652.652 0 0 1 0-.936l.698-.683Zm23.633 4.403 1.935 1.895a.652.652 0 0 1 0 .936l-8.73 8.543a.687.687 0 0 1-.956 0L20.37 17.64a.172.172 0 0 0-.239 0l-6.195 6.063a.687.687 0 0 1-.957 0l-8.73-8.543a.652.652 0 0 1 0-.936l1.936-1.895a.687.687 0 0 1 .957 0l6.196 6.064a.172.172 0 0 0 .239 0l6.195-6.064a.687.687 0 0 1 .957 0l6.196 6.064a.172.172 0 0 0 .24 0l6.195-6.064a.687.687 0 0 1 .956 0ZM48.093 20.948l2.338-9.355c.139-.515.258-1.07.416-1.942.12.872.258 1.427.357 1.942l2.022 9.355h4.181l3.528-13.874h-3.21l-1.943 8.523a24.825 24.825 0 0 0-.456 2.457c-.158-.931-.317-1.625-.495-2.438l-1.883-8.542h-4.201l-2.042 8.542a41.204 41.204 0 0 0-.475 2.438 41.208 41.208 0 0 0-.476-2.438l-1.903-8.542h-3.349l3.508 13.874h4.083ZM63.33 21.304c1.585 0 2.596-.654 3.11-1.605-.059.297-.078.595-.078.892v.357h2.655V15.22c0-2.735-1.248-4.32-4.3-4.32-2.636 0-4.36 1.466-4.52 3.487h2.914c.1-.891.734-1.426 1.705-1.426.911 0 1.407.515 1.407 1.11 0 .435-.258.693-1.03.792l-1.388.159c-2.061.257-3.825 1.01-3.825 3.19 0 1.982 1.645 3.092 3.35 3.092Zm.891-2.041c-.773 0-1.348-.436-1.348-1.19 0-.733.655-1.09 1.645-1.268l.674-.119c.575-.118.892-.218 1.09-.396v.912c0 1.228-.892 2.06-2.06 2.06ZM70.398 7.074v13.874h2.874V7.074h-2.874ZM74.934 7.074v13.874h2.874V7.074h-2.874ZM84.08 21.304c2.735 0 4.5-1.546 4.697-3.567h-2.893c-.139.892-.892 1.387-1.804 1.387-1.228 0-2.12-.99-2.14-2.358h6.897v-.555c0-3.21-1.764-5.312-4.816-5.312-2.933 0-4.994 2.062-4.994 5.173 0 3.37 2.12 5.232 5.053 5.232Zm-2.16-6.421c.119-1.11.932-1.922 2.081-1.922 1.11 0 1.883.772 1.903 1.922H81.92ZM94.92 21.146c.633 0 1.248-.1 1.525-.179v-2.18c-.218.04-.475.06-.693.06-1.05 0-1.427-.595-1.427-1.566v-3.805h2.338v-2.24h-2.338V7.788H91.47v3.448H89.37v2.24h2.1v4.201c0 2.3 1.15 3.469 3.45 3.469ZM104.62 21.304c3.924 0 6.302-2.299 6.599-5.608h-3.111c-.238 1.803-1.506 3.032-3.369 3.032-2.2 0-3.746-1.784-3.746-4.796 0-2.953 1.605-4.638 3.805-4.638 1.883 0 2.953 1.15 3.171 2.834h3.191c-.317-3.448-2.854-5.41-6.342-5.41-3.984 0-7.036 2.695-7.036 7.214 0 4.677 2.676 7.372 6.838 7.372ZM117.449 21.304c2.993 0 5.114-1.882 5.114-5.172 0-3.23-2.121-5.233-5.114-5.233-2.972 0-5.093 2.002-5.093 5.233 0 3.29 2.101 5.172 5.093 5.172Zm0-2.22c-1.327 0-2.18-1.09-2.18-2.952 0-1.903.892-2.973 2.18-2.973 1.308 0 2.2 1.07 2.2 2.973 0 1.862-.872 2.953-2.2 2.953ZM126.569 20.948v-5.689c0-1.208.753-2.1 1.823-2.1 1.011 0 1.606.773 1.606 2.06v5.729h2.873v-6.144c0-2.339-1.229-3.905-3.428-3.905-1.526 0-2.458.734-2.953 1.606a5.31 5.31 0 0 0 .079-.892v-.377h-2.874v9.712h2.874ZM137.464 20.948v-5.689c0-1.208.753-2.1 1.823-2.1 1.011 0 1.606.773 1.606 2.06v5.729h2.873v-6.144c0-2.339-1.228-3.905-3.428-3.905-1.526 0-2.458.734-2.953 1.606a5.31 5.31 0 0 0 .079-.892v-.377h-2.874v9.712h2.874ZM149.949 21.304c2.735 0 4.499-1.546 4.697-3.567h-2.893c-.139.892-.892 1.387-1.804 1.387-1.228 0-2.12-.99-2.14-2.358h6.897v-.555c0-3.21-1.764-5.312-4.816-5.312-2.933 0-4.994 2.062-4.994 5.173 0 3.37 2.12 5.232 5.053 5.232Zm-2.16-6.421c.119-1.11.932-1.922 2.081-1.922 1.11 0 1.883.772 1.903 1.922h-3.984ZM160.876 21.304c3.013 0 4.658-1.645 4.975-4.201h-2.874c-.099 1.07-.713 1.982-2.001 1.982-1.309 0-2.2-1.21-2.2-2.993 0-1.942 1.03-2.933 2.259-2.933 1.209 0 1.803.872 1.883 1.882h2.873c-.218-2.358-1.823-4.142-4.776-4.142-2.874 0-5.153 1.903-5.153 5.193 0 3.25 1.923 5.212 5.014 5.212ZM172.067 21.146c.634 0 1.248-.1 1.526-.179v-2.18c-.218.04-.476.06-.694.06-1.05 0-1.427-.595-1.427-1.566v-3.805h2.339v-2.24h-2.339V7.788h-2.854v3.448h-2.1v2.24h2.1v4.201c0 2.3 1.15 3.469 3.449 3.469Z" fill="#fff"/></svg>`,WALLET_CONNECT_ICON:L`<svg width="28" height="20" viewBox="0 0 28 20"><g clip-path="url(#a)"><path d="M7.386 6.482c3.653-3.576 9.575-3.576 13.228 0l.44.43a.451.451 0 0 1 0 .648L19.55 9.033a.237.237 0 0 1-.33 0l-.606-.592c-2.548-2.496-6.68-2.496-9.228 0l-.648.634a.237.237 0 0 1-.33 0L6.902 7.602a.451.451 0 0 1 0-.647l.483-.473Zm16.338 3.046 1.339 1.31a.451.451 0 0 1 0 .648l-6.035 5.909a.475.475 0 0 1-.662 0L14.083 13.2a.119.119 0 0 0-.166 0l-4.283 4.194a.475.475 0 0 1-.662 0l-6.035-5.91a.451.451 0 0 1 0-.647l1.338-1.31a.475.475 0 0 1 .662 0l4.283 4.194c.046.044.12.044.166 0l4.283-4.194a.475.475 0 0 1 .662 0l4.283 4.194c.046.044.12.044.166 0l4.283-4.194a.475.475 0 0 1 .662 0Z" fill="#000000"/></g><defs><clipPath id="a"><path fill="#ffffff" d="M0 0h28v20H0z"/></clipPath></defs></svg>`,WALLET_CONNECT_ICON_COLORED:L`<svg width="96" height="96" fill="none"><path fill="#fff" d="M25.322 33.597c12.525-12.263 32.83-12.263 45.355 0l1.507 1.476a1.547 1.547 0 0 1 0 2.22l-5.156 5.048a.814.814 0 0 1-1.134 0l-2.074-2.03c-8.737-8.555-22.903-8.555-31.64 0l-2.222 2.175a.814.814 0 0 1-1.134 0l-5.156-5.049a1.547 1.547 0 0 1 0-2.22l1.654-1.62Zm56.019 10.44 4.589 4.494a1.547 1.547 0 0 1 0 2.22l-20.693 20.26a1.628 1.628 0 0 1-2.267 0L48.283 56.632a.407.407 0 0 0-.567 0L33.03 71.012a1.628 1.628 0 0 1-2.268 0L10.07 50.75a1.547 1.547 0 0 1 0-2.22l4.59-4.494a1.628 1.628 0 0 1 2.267 0l14.687 14.38c.156.153.41.153.567 0l14.685-14.38a1.628 1.628 0 0 1 2.268 0l14.687 14.38c.156.153.41.153.567 0l14.686-14.38a1.628 1.628 0 0 1 2.268 0Z"/><path stroke="#000" d="M25.672 33.954c12.33-12.072 32.325-12.072 44.655 0l1.508 1.476a1.047 1.047 0 0 1 0 1.506l-5.157 5.048a.314.314 0 0 1-.434 0l-2.074-2.03c-8.932-8.746-23.409-8.746-32.34 0l-2.222 2.174a.314.314 0 0 1-.434 0l-5.157-5.048a1.047 1.047 0 0 1 0-1.506l1.655-1.62Zm55.319 10.44 4.59 4.494a1.047 1.047 0 0 1 0 1.506l-20.694 20.26a1.128 1.128 0 0 1-1.568 0l-14.686-14.38a.907.907 0 0 0-1.267 0L32.68 70.655a1.128 1.128 0 0 1-1.568 0L10.42 50.394a1.047 1.047 0 0 1 0-1.506l4.59-4.493a1.128 1.128 0 0 1 1.567 0l14.687 14.379a.907.907 0 0 0 1.266 0l-.35-.357.35.357 14.686-14.38a1.128 1.128 0 0 1 1.568 0l14.687 14.38a.907.907 0 0 0 1.267 0l14.686-14.38a1.128 1.128 0 0 1 1.568 0Z"/></svg>`,BACK_ICON:L`<svg width="10" height="18" viewBox="0 0 10 18"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.735.179a.75.75 0 0 1 .087 1.057L2.92 8.192a1.25 1.25 0 0 0 0 1.617l5.902 6.956a.75.75 0 1 1-1.144.97L1.776 10.78a2.75 2.75 0 0 1 0-3.559L7.678.265A.75.75 0 0 1 8.735.18Z" fill="#fff"/></svg>`,COPY_ICON:L`<svg width="24" height="24" fill="none"><path fill="#fff" fill-rule="evenodd" d="M7.01 7.01c.03-1.545.138-2.5.535-3.28A5 5 0 0 1 9.73 1.545C10.8 1 12.2 1 15 1c2.8 0 4.2 0 5.27.545a5 5 0 0 1 2.185 2.185C23 4.8 23 6.2 23 9c0 2.8 0 4.2-.545 5.27a5 5 0 0 1-2.185 2.185c-.78.397-1.735.505-3.28.534l-.001.01c-.03 1.54-.138 2.493-.534 3.27a5 5 0 0 1-2.185 2.186C13.2 23 11.8 23 9 23c-2.8 0-4.2 0-5.27-.545a5 5 0 0 1-2.185-2.185C1 19.2 1 17.8 1 15c0-2.8 0-4.2.545-5.27A5 5 0 0 1 3.73 7.545C4.508 7.149 5.46 7.04 7 7.01h.01ZM15 15.5c-1.425 0-2.403-.001-3.162-.063-.74-.06-1.139-.172-1.427-.319a3.5 3.5 0 0 1-1.53-1.529c-.146-.288-.257-.686-.318-1.427C8.501 11.403 8.5 10.425 8.5 9c0-1.425.001-2.403.063-3.162.06-.74.172-1.139.318-1.427a3.5 3.5 0 0 1 1.53-1.53c.288-.146.686-.257 1.427-.318.759-.062 1.737-.063 3.162-.063 1.425 0 2.403.001 3.162.063.74.06 1.139.172 1.427.318a3.5 3.5 0 0 1 1.53 1.53c.146.288.257.686.318 1.427.062.759.063 1.737.063 3.162 0 1.425-.001 2.403-.063 3.162-.06.74-.172 1.139-.319 1.427a3.5 3.5 0 0 1-1.529 1.53c-.288.146-.686.257-1.427.318-.759.062-1.737.063-3.162.063ZM7 8.511c-.444.009-.825.025-1.162.052-.74.06-1.139.172-1.427.318a3.5 3.5 0 0 0-1.53 1.53c-.146.288-.257.686-.318 1.427-.062.759-.063 1.737-.063 3.162 0 1.425.001 2.403.063 3.162.06.74.172 1.139.318 1.427a3.5 3.5 0 0 0 1.53 1.53c.288.146.686.257 1.427.318.759.062 1.737.063 3.162.063 1.425 0 2.403-.001 3.162-.063.74-.06 1.139-.172 1.427-.319a3.5 3.5 0 0 0 1.53-1.53c.146-.287.257-.685.318-1.426.027-.337.043-.718.052-1.162H15c-2.8 0-4.2 0-5.27-.545a5 5 0 0 1-2.185-2.185C7 13.2 7 11.8 7 9v-.489Z" clip-rule="evenodd"/></svg>`,RETRY_ICON:L`<svg width="15" height="16" viewBox="0 0 15 16"><path d="M6.464 2.03A.75.75 0 0 0 5.403.97L2.08 4.293a1 1 0 0 0 0 1.414L5.403 9.03a.75.75 0 0 0 1.06-1.06L4.672 6.177a.25.25 0 0 1 .177-.427h2.085a4 4 0 1 1-3.93 4.746c-.077-.407-.405-.746-.82-.746-.414 0-.755.338-.7.748a5.501 5.501 0 1 0 5.45-6.248H4.848a.25.25 0 0 1-.177-.427L6.464 2.03Z" fill="#fff"/></svg>`,DESKTOP_ICON:L`<svg width="16" height="16" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 5.98c0-1.85 0-2.775.394-3.466a3 3 0 0 1 1.12-1.12C2.204 1 3.13 1 4.98 1h6.04c1.85 0 2.775 0 3.466.394a3 3 0 0 1 1.12 1.12C16 3.204 16 4.13 16 5.98v1.04c0 1.85 0 2.775-.394 3.466a3 3 0 0 1-1.12 1.12C13.796 12 12.87 12 11.02 12H4.98c-1.85 0-2.775 0-3.466-.394a3 3 0 0 1-1.12-1.12C0 9.796 0 8.87 0 7.02V5.98ZM4.98 2.5h6.04c.953 0 1.568.001 2.034.043.446.04.608.108.69.154a1.5 1.5 0 0 1 .559.56c.046.08.114.243.154.69.042.465.043 1.08.043 2.033v1.04c0 .952-.001 1.568-.043 2.034-.04.446-.108.608-.154.69a1.499 1.499 0 0 1-.56.559c-.08.046-.243.114-.69.154-.466.042-1.08.043-2.033.043H4.98c-.952 0-1.568-.001-2.034-.043-.446-.04-.608-.108-.69-.154a1.5 1.5 0 0 1-.559-.56c-.046-.08-.114-.243-.154-.69-.042-.465-.043-1.08-.043-2.033V5.98c0-.952.001-1.568.043-2.034.04-.446.108-.608.154-.69a1.5 1.5 0 0 1 .56-.559c.08-.046.243-.114.69-.154.465-.042 1.08-.043 2.033-.043Z" fill="#fff"/><path d="M4 14.25a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1-.75-.75Z" fill="#fff"/></svg>`,MOBILE_ICON:L`<svg width="16" height="16" viewBox="0 0 16 16"><path d="M6.75 5a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Z" fill="#fff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M3 4.98c0-1.85 0-2.775.394-3.466a3 3 0 0 1 1.12-1.12C5.204 0 6.136 0 8 0s2.795 0 3.486.394a3 3 0 0 1 1.12 1.12C13 2.204 13 3.13 13 4.98v6.04c0 1.85 0 2.775-.394 3.466a3 3 0 0 1-1.12 1.12C10.796 16 9.864 16 8 16s-2.795 0-3.486-.394a3 3 0 0 1-1.12-1.12C3 13.796 3 12.87 3 11.02V4.98Zm8.5 0v6.04c0 .953-.001 1.568-.043 2.034-.04.446-.108.608-.154.69a1.499 1.499 0 0 1-.56.559c-.08.045-.242.113-.693.154-.47.042-1.091.043-2.05.043-.959 0-1.58-.001-2.05-.043-.45-.04-.613-.109-.693-.154a1.5 1.5 0 0 1-.56-.56c-.046-.08-.114-.243-.154-.69-.042-.466-.043-1.08-.043-2.033V4.98c0-.952.001-1.568.043-2.034.04-.446.108-.608.154-.69a1.5 1.5 0 0 1 .56-.559c.08-.045.243-.113.693-.154C6.42 1.501 7.041 1.5 8 1.5c.959 0 1.58.001 2.05.043.45.04.613.109.693.154a1.5 1.5 0 0 1 .56.56c.046.08.114.243.154.69.042.465.043 1.08.043 2.033Z" fill="#fff"/></svg>`,ARROW_DOWN_ICON:L`<svg width="14" height="14" viewBox="0 0 14 14"><path d="M2.28 7.47a.75.75 0 0 0-1.06 1.06l5.25 5.25a.75.75 0 0 0 1.06 0l5.25-5.25a.75.75 0 0 0-1.06-1.06l-3.544 3.543a.25.25 0 0 1-.426-.177V.75a.75.75 0 0 0-1.5 0v10.086a.25.25 0 0 1-.427.176L2.28 7.47Z" fill="#fff"/></svg>`,ARROW_UP_RIGHT_ICON:L`<svg width="15" height="14" fill="none"><path d="M4.5 1.75A.75.75 0 0 1 5.25 1H12a1.5 1.5 0 0 1 1.5 1.5v6.75a.75.75 0 0 1-1.5 0V4.164a.25.25 0 0 0-.427-.176L4.061 11.5A.75.75 0 0 1 3 10.44l7.513-7.513a.25.25 0 0 0-.177-.427H5.25a.75.75 0 0 1-.75-.75Z" fill="#fff"/></svg>`,ARROW_RIGHT_ICON:L`<svg width="6" height="14" viewBox="0 0 6 14"><path fill-rule="evenodd" clip-rule="evenodd" d="M2.181 1.099a.75.75 0 0 1 1.024.279l2.433 4.258a2.75 2.75 0 0 1 0 2.729l-2.433 4.257a.75.75 0 1 1-1.303-.744L4.335 7.62a1.25 1.25 0 0 0 0-1.24L1.902 2.122a.75.75 0 0 1 .28-1.023Z" fill="#fff"/></svg>`,QRCODE_ICON:L`<svg width="25" height="24" viewBox="0 0 25 24"><path d="M23.748 9a.748.748 0 0 0 .748-.752c-.018-2.596-.128-4.07-.784-5.22a6 6 0 0 0-2.24-2.24c-1.15-.656-2.624-.766-5.22-.784a.748.748 0 0 0-.752.748c0 .414.335.749.748.752 1.015.007 1.82.028 2.494.088.995.09 1.561.256 1.988.5.7.398 1.28.978 1.679 1.678.243.427.41.993.498 1.988.061.675.082 1.479.09 2.493a.753.753 0 0 0 .75.749ZM3.527.788C4.677.132 6.152.022 8.747.004A.748.748 0 0 1 9.5.752a.753.753 0 0 1-.749.752c-1.014.007-1.818.028-2.493.088-.995.09-1.561.256-1.988.5-.7.398-1.28.978-1.679 1.678-.243.427-.41.993-.499 1.988-.06.675-.081 1.479-.088 2.493A.753.753 0 0 1 1.252 9a.748.748 0 0 1-.748-.752c.018-2.596.128-4.07.784-5.22a6 6 0 0 1 2.24-2.24ZM1.252 15a.748.748 0 0 0-.748.752c.018 2.596.128 4.07.784 5.22a6 6 0 0 0 2.24 2.24c1.15.656 2.624.766 5.22.784a.748.748 0 0 0 .752-.748.753.753 0 0 0-.749-.752c-1.014-.007-1.818-.028-2.493-.089-.995-.089-1.561-.255-1.988-.498a4.5 4.5 0 0 1-1.679-1.68c-.243-.426-.41-.992-.499-1.987-.06-.675-.081-1.479-.088-2.493A.753.753 0 0 0 1.252 15ZM22.996 15.749a.753.753 0 0 1 .752-.749c.415 0 .751.338.748.752-.018 2.596-.128 4.07-.784 5.22a6 6 0 0 1-2.24 2.24c-1.15.656-2.624.766-5.22.784a.748.748 0 0 1-.752-.748c0-.414.335-.749.748-.752 1.015-.007 1.82-.028 2.494-.089.995-.089 1.561-.255 1.988-.498a4.5 4.5 0 0 0 1.679-1.68c.243-.426.41-.992.498-1.987.061-.675.082-1.479.09-2.493Z" fill="#fff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M7 4a2.5 2.5 0 0 0-2.5 2.5v2A2.5 2.5 0 0 0 7 11h2a2.5 2.5 0 0 0 2.5-2.5v-2A2.5 2.5 0 0 0 9 4H7Zm2 1.5H7a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1ZM13.5 6.5A2.5 2.5 0 0 1 16 4h2a2.5 2.5 0 0 1 2.5 2.5v2A2.5 2.5 0 0 1 18 11h-2a2.5 2.5 0 0 1-2.5-2.5v-2Zm2.5-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1ZM7 13a2.5 2.5 0 0 0-2.5 2.5v2A2.5 2.5 0 0 0 7 20h2a2.5 2.5 0 0 0 2.5-2.5v-2A2.5 2.5 0 0 0 9 13H7Zm2 1.5H7a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1Z" fill="#fff"/><path d="M13.5 15.5c0-.465 0-.697.038-.89a2 2 0 0 1 1.572-1.572C15.303 13 15.535 13 16 13v2.5h-2.5ZM18 13c.465 0 .697 0 .89.038a2 2 0 0 1 1.572 1.572c.038.193.038.425.038.89H18V13ZM18 17.5h2.5c0 .465 0 .697-.038.89a2 2 0 0 1-1.572 1.572C18.697 20 18.465 20 18 20v-2.5ZM13.5 17.5H16V20c-.465 0-.697 0-.89-.038a2 2 0 0 1-1.572-1.572c-.038-.193-.038-.425-.038-.89Z" fill="#fff"/></svg>`,SCAN_ICON:L`<svg width="16" height="16" fill="none"><path fill="#fff" d="M10 15.216c0 .422.347.763.768.74 1.202-.064 2.025-.222 2.71-.613a5.001 5.001 0 0 0 1.865-1.866c.39-.684.549-1.507.613-2.709a.735.735 0 0 0-.74-.768.768.768 0 0 0-.76.732c-.009.157-.02.306-.032.447-.073.812-.206 1.244-.384 1.555-.31.545-.761.996-1.306 1.306-.311.178-.743.311-1.555.384-.141.013-.29.023-.447.032a.768.768 0 0 0-.732.76ZM10 .784c0 .407.325.737.732.76.157.009.306.02.447.032.812.073 1.244.206 1.555.384a3.5 3.5 0 0 1 1.306 1.306c.178.311.311.743.384 1.555.013.142.023.29.032.447a.768.768 0 0 0 .76.732.734.734 0 0 0 .74-.768c-.064-1.202-.222-2.025-.613-2.71A5 5 0 0 0 13.477.658c-.684-.39-1.507-.549-2.709-.613a.735.735 0 0 0-.768.74ZM5.232.044A.735.735 0 0 1 6 .784a.768.768 0 0 1-.732.76c-.157.009-.305.02-.447.032-.812.073-1.244.206-1.555.384A3.5 3.5 0 0 0 1.96 3.266c-.178.311-.311.743-.384 1.555-.013.142-.023.29-.032.447A.768.768 0 0 1 .784 6a.735.735 0 0 1-.74-.768c.064-1.202.222-2.025.613-2.71A5 5 0 0 1 2.523.658C3.207.267 4.03.108 5.233.044ZM5.268 14.456a.768.768 0 0 1 .732.76.734.734 0 0 1-.768.74c-1.202-.064-2.025-.222-2.71-.613a5 5 0 0 1-1.865-1.866c-.39-.684-.549-1.507-.613-2.709A.735.735 0 0 1 .784 10c.407 0 .737.325.76.732.009.157.02.306.032.447.073.812.206 1.244.384 1.555a3.5 3.5 0 0 0 1.306 1.306c.311.178.743.311 1.555.384.142.013.29.023.447.032Z"/></svg>`,CHECKMARK_ICON:L`<svg width="13" height="12" viewBox="0 0 13 12"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.155.132a.75.75 0 0 1 .232 1.035L5.821 11.535a1 1 0 0 1-1.626.09L.665 7.21a.75.75 0 1 1 1.17-.937L4.71 9.867a.25.25 0 0 0 .406-.023L11.12.364a.75.75 0 0 1 1.035-.232Z" fill="#fff"/></svg>`,SEARCH_ICON:L`<svg width="20" height="21"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.432 13.992c-.354-.353-.91-.382-1.35-.146a5.5 5.5 0 1 1 2.265-2.265c-.237.441-.208.997.145 1.35l3.296 3.296a.75.75 0 1 1-1.06 1.061l-3.296-3.296Zm.06-5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z" fill="#949E9E"/></svg>`,WALLET_PLACEHOLDER:L`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><g clip-path="url(#q)"><path id="wallet-placeholder-fill" fill="#fff" d="M0 24.9c0-9.251 0-13.877 1.97-17.332a15 15 0 0 1 5.598-5.597C11.023 0 15.648 0 24.9 0h10.2c9.252 0 13.877 0 17.332 1.97a15 15 0 0 1 5.597 5.598C60 11.023 60 15.648 60 24.9v10.2c0 9.252 0 13.877-1.97 17.332a15.001 15.001 0 0 1-5.598 5.597C48.977 60 44.352 60 35.1 60H24.9c-9.251 0-13.877 0-17.332-1.97a15 15 0 0 1-5.597-5.598C0 48.977 0 44.352 0 35.1V24.9Z"/><path id="wallet-placeholder-dash" stroke="#000" stroke-dasharray="4 4" stroke-width="1.5" d="M.04 41.708a231.598 231.598 0 0 1-.039-4.403l.75-.001L.75 35.1v-2.55H0v-5.1h.75V24.9l.001-2.204h-.75c.003-1.617.011-3.077.039-4.404l.75.016c.034-1.65.099-3.08.218-4.343l-.746-.07c.158-1.678.412-3.083.82-4.316l.713.236c.224-.679.497-1.296.827-1.875a14.25 14.25 0 0 1 1.05-1.585L3.076 5.9A15 15 0 0 1 5.9 3.076l.455.596a14.25 14.25 0 0 1 1.585-1.05c.579-.33 1.196-.603 1.875-.827l-.236-.712C10.812.674 12.217.42 13.895.262l.07.746C15.23.89 16.66.824 18.308.79l-.016-.75C19.62.012 21.08.004 22.695.001l.001.75L24.9.75h2.55V0h5.1v.75h2.55l2.204.001v-.75c1.617.003 3.077.011 4.404.039l-.016.75c1.65.034 3.08.099 4.343.218l.07-.746c1.678.158 3.083.412 4.316.82l-.236.713c.679.224 1.296.497 1.875.827a14.24 14.24 0 0 1 1.585 1.05l.455-.596A14.999 14.999 0 0 1 56.924 5.9l-.596.455c.384.502.735 1.032 1.05 1.585.33.579.602 1.196.827 1.875l.712-.236c.409 1.233.663 2.638.822 4.316l-.747.07c.119 1.264.184 2.694.218 4.343l.75-.016c.028 1.327.036 2.787.039 4.403l-.75.001.001 2.204v2.55H60v5.1h-.75v2.55l-.001 2.204h.75a231.431 231.431 0 0 1-.039 4.404l-.75-.016c-.034 1.65-.099 3.08-.218 4.343l.747.07c-.159 1.678-.413 3.083-.822 4.316l-.712-.236a10.255 10.255 0 0 1-.827 1.875 14.242 14.242 0 0 1-1.05 1.585l.596.455a14.997 14.997 0 0 1-2.824 2.824l-.455-.596c-.502.384-1.032.735-1.585 1.05-.579.33-1.196.602-1.875.827l.236.712c-1.233.409-2.638.663-4.316.822l-.07-.747c-1.264.119-2.694.184-4.343.218l.016.75c-1.327.028-2.787.036-4.403.039l-.001-.75-2.204.001h-2.55V60h-5.1v-.75H24.9l-2.204-.001v.75a231.431 231.431 0 0 1-4.404-.039l.016-.75c-1.65-.034-3.08-.099-4.343-.218l-.07.747c-1.678-.159-3.083-.413-4.316-.822l.236-.712a10.258 10.258 0 0 1-1.875-.827 14.252 14.252 0 0 1-1.585-1.05l-.455.596A14.999 14.999 0 0 1 3.076 54.1l.596-.455a14.24 14.24 0 0 1-1.05-1.585 10.259 10.259 0 0 1-.827-1.875l-.712.236C.674 49.188.42 47.783.262 46.105l.746-.07C.89 44.77.824 43.34.79 41.692l-.75.016Z"/><path fill="#fff" fill-rule="evenodd" d="M35.643 32.145c-.297-.743-.445-1.114-.401-1.275a.42.42 0 0 1 .182-.27c.134-.1.463-.1 1.123-.1.742 0 1.499.046 2.236-.05a6 6 0 0 0 5.166-5.166c.051-.39.051-.855.051-1.784 0-.928 0-1.393-.051-1.783a6 6 0 0 0-5.166-5.165c-.39-.052-.854-.052-1.783-.052h-7.72c-4.934 0-7.401 0-9.244 1.051a8 8 0 0 0-2.985 2.986C16.057 22.28 16.003 24.58 16 29 15.998 31.075 16 33.15 16 35.224A7.778 7.778 0 0 0 23.778 43H28.5c1.394 0 2.09 0 2.67-.116a6 6 0 0 0 4.715-4.714c.115-.58.115-1.301.115-2.744 0-1.31 0-1.964-.114-2.49a4.998 4.998 0 0 0-.243-.792Z" clip-rule="evenodd"/><path fill="#9EA9A9" fill-rule="evenodd" d="M37 18h-7.72c-2.494 0-4.266.002-5.647.126-1.361.122-2.197.354-2.854.728a6.5 6.5 0 0 0-2.425 2.426c-.375.657-.607 1.492-.729 2.853-.11 1.233-.123 2.777-.125 4.867 0 .7 0 1.05.097 1.181.096.13.182.181.343.2.163.02.518-.18 1.229-.581a6.195 6.195 0 0 1 3.053-.8H37c.977 0 1.32-.003 1.587-.038a4.5 4.5 0 0 0 3.874-3.874c.036-.268.039-.611.039-1.588 0-.976-.003-1.319-.038-1.587a4.5 4.5 0 0 0-3.875-3.874C38.32 18.004 37.977 18 37 18Zm-7.364 12.5h-7.414a4.722 4.722 0 0 0-4.722 4.723 6.278 6.278 0 0 0 6.278 6.278H28.5c1.466 0 1.98-.008 2.378-.087a4.5 4.5 0 0 0 3.535-3.536c.08-.397.087-.933.087-2.451 0-1.391-.009-1.843-.08-2.17a3.5 3.5 0 0 0-2.676-2.676c-.328-.072-.762-.08-2.108-.08Z" clip-rule="evenodd"/></g><defs><clipPath id="q"><path fill="#fff" d="M0 0h60v60H0z"/></clipPath></defs></svg>`,GLOBE_ICON:L`<svg width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="#fff" fill-rule="evenodd" d="M15.5 8a7.5 7.5 0 1 1-15 0 7.5 7.5 0 0 1 15 0Zm-2.113.75c.301 0 .535.264.47.558a6.01 6.01 0 0 1-2.867 3.896c-.203.116-.42-.103-.334-.32.409-1.018.691-2.274.797-3.657a.512.512 0 0 1 .507-.477h1.427Zm.47-2.058c.065.294-.169.558-.47.558H11.96a.512.512 0 0 1-.507-.477c-.106-1.383-.389-2.638-.797-3.656-.087-.217.13-.437.333-.32a6.01 6.01 0 0 1 2.868 3.895Zm-4.402.558c.286 0 .515-.24.49-.525-.121-1.361-.429-2.534-.83-3.393-.279-.6-.549-.93-.753-1.112a.535.535 0 0 0-.724 0c-.204.182-.474.513-.754 1.112-.4.859-.708 2.032-.828 3.393a.486.486 0 0 0 .49.525h2.909Zm-5.415 0c.267 0 .486-.21.507-.477.106-1.383.389-2.638.797-3.656.087-.217-.13-.437-.333-.32a6.01 6.01 0 0 0-2.868 3.895c-.065.294.169.558.47.558H4.04ZM2.143 9.308c-.065-.294.169-.558.47-.558H4.04c.267 0 .486.21.507.477.106 1.383.389 2.639.797 3.657.087.217-.13.436-.333.32a6.01 6.01 0 0 1-2.868-3.896Zm3.913-.033a.486.486 0 0 1 .49-.525h2.909c.286 0 .515.24.49.525-.121 1.361-.428 2.535-.83 3.394-.279.6-.549.93-.753 1.112a.535.535 0 0 1-.724 0c-.204-.182-.474-.513-.754-1.112-.4-.859-.708-2.033-.828-3.394Z" clip-rule="evenodd"/></svg>`},Ki=I`.wcm-toolbar-placeholder{top:0;bottom:0;left:0;right:0;width:100%;position:absolute;display:block;pointer-events:none;height:100px;border-radius:calc(var(--wcm-background-border-radius) * .9);background-color:var(--wcm-background-color);background-position:center;background-size:cover}.wcm-toolbar{height:38px;display:flex;position:relative;margin:5px 15px 5px 5px;justify-content:space-between;align-items:center}.wcm-toolbar img,.wcm-toolbar svg{height:28px;object-position:left center;object-fit:contain}#wcm-wc-logo path{fill:var(--wcm-accent-fill-color)}button{width:28px;height:28px;border-radius:var(--wcm-icon-button-border-radius);border:0;display:flex;justify-content:center;align-items:center;cursor:pointer;background-color:var(--wcm-color-bg-1);box-shadow:0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-bg-2)}button svg{display:block;object-position:center}button path{fill:var(--wcm-color-fg-1)}.wcm-toolbar div{display:flex}@media(hover:hover){button:hover{background-color:var(--wcm-color-bg-2)}}`;var Yi=Object.defineProperty,Qi=Object.getOwnPropertyDescriptor,Gi=(e,t,r,n)=>{for(var o=n>1?void 0:n?Qi(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Yi(t,r,o),o};let Je=class extends E{render(){return m`<div class="wcm-toolbar-placeholder"></div><div class="wcm-toolbar">${T.WALLET_CONNECT_LOGO} <button @click="${re.close}">${T.CROSS_ICON}</button></div>`}};Je.styles=[O.globalCss,Ki];Je=Gi([P("wcm-modal-backcard")],Je);const Ji=I`main{padding:20px;padding-top:0;width:100%}`;var Xi=Object.defineProperty,ts=Object.getOwnPropertyDescriptor,es=(e,t,r,n)=>{for(var o=n>1?void 0:n?ts(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Xi(t,r,o),o};let Xe=class extends E{render(){return m`<main><slot></slot></main>`}};Xe.styles=[O.globalCss,Ji];Xe=es([P("wcm-modal-content")],Xe);const rs=I`footer{padding:10px;display:flex;flex-direction:column;align-items:inherit;justify-content:inherit;border-top:1px solid var(--wcm-color-bg-2)}`;var os=Object.defineProperty,ns=Object.getOwnPropertyDescriptor,is=(e,t,r,n)=>{for(var o=n>1?void 0:n?ns(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&os(t,r,o),o};let tr=class extends E{render(){return m`<footer><slot></slot></footer>`}};tr.styles=[O.globalCss,rs];tr=is([P("wcm-modal-footer")],tr);const ss=I`header{display:flex;justify-content:center;align-items:center;padding:20px;position:relative}.wcm-border{border-bottom:1px solid var(--wcm-color-bg-2);margin-bottom:20px}header button{padding:15px 20px}header button:active{opacity:.5}@media(hover:hover){header button:hover{opacity:.5}}.wcm-back-btn{position:absolute;left:0}.wcm-action-btn{position:absolute;right:0}path{fill:var(--wcm-accent-color)}`;var ls=Object.defineProperty,as=Object.getOwnPropertyDescriptor,Qt=(e,t,r,n)=>{for(var o=n>1?void 0:n?as(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&ls(t,r,o),o};let ft=class extends E{constructor(){super(...arguments),this.title="",this.onAction=void 0,this.actionIcon=void 0,this.border=!1}backBtnTemplate(){return m`<button class="wcm-back-btn" @click="${N.goBack}">${T.BACK_ICON}</button>`}actionBtnTemplate(){return m`<button class="wcm-action-btn" @click="${this.onAction}">${this.actionIcon}</button>`}render(){const e={"wcm-border":this.border},t=N.state.history.length>1,r=this.title?m`<wcm-text variant="big-bold">${this.title}</wcm-text>`:m`<slot></slot>`;return m`<header class="${G(e)}">${t?this.backBtnTemplate():null} ${r} ${this.onAction?this.actionBtnTemplate():null}</header>`}};ft.styles=[O.globalCss,ss];Qt([_()],ft.prototype,"title",2);Qt([_()],ft.prototype,"onAction",2);Qt([_()],ft.prototype,"actionIcon",2);Qt([_({type:Boolean})],ft.prototype,"border",2);ft=Qt([P("wcm-modal-header")],ft);const $={MOBILE_BREAKPOINT:600,WCM_RECENT_WALLET_DATA:"WCM_RECENT_WALLET_DATA",EXPLORER_WALLET_URL:"https://explorer.walletconnect.com/?type=wallet",getShadowRootElement(e,t){const r=e.renderRoot.querySelector(t);if(!r)throw new Error(`${t} not found`);return r},getWalletIcon({id:e,image_id:t}){const{walletImages:r}=ht.state;return r!=null&&r[e]?r[e]:t?k.getWalletImageUrl(t):""},getWalletName(e,t=!1){return t&&e.length>8?`${e.substring(0,8)}..`:e},isMobileAnimation(){return window.innerWidth<=$.MOBILE_BREAKPOINT},async preloadImage(e){const t=new Promise((r,n)=>{const o=new Image;o.onload=r,o.onerror=n,o.crossOrigin="anonymous",o.src=e});return Promise.race([t,x.wait(3e3)])},getErrorMessage(e){return e instanceof Error?e.message:"Unknown Error"},debounce(e,t=500){let r;return(...n)=>{function o(){e(...n)}r&&clearTimeout(r),r=setTimeout(o,t)}},handleMobileLinking(e,t="_self"){const{walletConnectUri:r}=Z.state,{mobile:n,name:o}=e,i=n==null?void 0:n.native,s=n==null?void 0:n.universal;$.setRecentWallet(e);function l(a){if(i){const c=x.formatNativeUrl(i,a,o);x.openHref(c,t)}else if(s){const c=x.formatUniversalUrl(s,a,o);x.openHref(c,t)}}r&&l(r)},handleAndroidLinking(){const{walletConnectUri:e}=Z.state;e&&(x.setWalletConnectAndroidDeepLink(e),x.openHref(e,x.isTelegram()?"_blank":"_self"))},async handleUriCopy(){const{walletConnectUri:e}=Z.state;if(e)try{await navigator.clipboard.writeText(e),X.openToast("Link copied","success")}catch{X.openToast("Failed to copy","error")}},getCustomImageUrls(){const{walletImages:e}=ht.state,t=Object.values(e??{});return Object.values(t)},truncate(e,t=8){return e.length<=t?e:`${e.substring(0,4)}...${e.substring(e.length-4)}`},setRecentWallet(e){try{localStorage.setItem($.WCM_RECENT_WALLET_DATA,JSON.stringify(e))}catch{console.info("Unable to set recent wallet")}},getRecentWallet(){try{const e=localStorage.getItem($.WCM_RECENT_WALLET_DATA);return e?JSON.parse(e):void 0}catch{console.info("Unable to get recent wallet")}},caseSafeIncludes(e,t){return e.toUpperCase().includes(t.toUpperCase())},openWalletExplorerUrl(){x.openHref($.EXPLORER_WALLET_URL,"_blank")},getCachedRouterWalletPlatforms(){const{desktop:e,mobile:t}=x.getWalletRouterData(),r=!!(e!=null&&e.native),n=!!(e!=null&&e.universal),o=!!(t!=null&&t.native)||!!(t!=null&&t.universal);return{isDesktop:r,isMobile:o,isWeb:n}},goToConnectingView(e){N.setData({Wallet:e});const t=x.isMobile(),{isDesktop:r,isWeb:n,isMobile:o}=$.getCachedRouterWalletPlatforms();t?o?(N.push("MobileConnecting"),!x.isAndroid()&&x.isTelegram()&&this.handleMobileLinking(e,"_blank")):n?N.push("WebConnecting"):N.push("InstallWallet"):r?N.push("DesktopConnecting"):n?N.push("WebConnecting"):o?N.push("MobileQrcodeConnecting"):N.push("InstallWallet")}},cs=I`.wcm-router{overflow:hidden;will-change:transform}.wcm-content{display:flex;flex-direction:column}`;var ds=Object.defineProperty,hs=Object.getOwnPropertyDescriptor,$r=(e,t,r,n)=>{for(var o=n>1?void 0:n?hs(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&ds(t,r,o),o};let Ft=class extends E{constructor(){super(),this.view=N.state.view,this.prevView=N.state.view,this.unsubscribe=void 0,this.oldHeight="0px",this.resizeObserver=void 0,this.unsubscribe=N.subscribe(e=>{this.view!==e.view&&this.onChangeRoute()})}firstUpdated(){this.resizeObserver=new ResizeObserver(([e])=>{const t=`${e.contentRect.height}px`;this.oldHeight!=="0px"&&dt(this.routerEl,{height:[this.oldHeight,t]},{duration:.2}),this.oldHeight=t}),this.resizeObserver.observe(this.contentEl)}disconnectedCallback(){var e,t;(e=this.unsubscribe)==null||e.call(this),(t=this.resizeObserver)==null||t.disconnect()}get routerEl(){return $.getShadowRootElement(this,".wcm-router")}get contentEl(){return $.getShadowRootElement(this,".wcm-content")}viewTemplate(){switch(this.view){case"ConnectWallet":return m`<wcm-connect-wallet-view></wcm-connect-wallet-view>`;case"DesktopConnecting":return m`<wcm-desktop-connecting-view></wcm-desktop-connecting-view>`;case"MobileConnecting":return m`<wcm-mobile-connecting-view></wcm-mobile-connecting-view>`;case"WebConnecting":return m`<wcm-web-connecting-view></wcm-web-connecting-view>`;case"MobileQrcodeConnecting":return m`<wcm-mobile-qr-connecting-view></wcm-mobile-qr-connecting-view>`;case"WalletExplorer":return m`<wcm-wallet-explorer-view></wcm-wallet-explorer-view>`;case"Qrcode":return m`<wcm-qrcode-view></wcm-qrcode-view>`;case"InstallWallet":return m`<wcm-install-wallet-view></wcm-install-wallet-view>`;default:return m`<div>Not Found</div>`}}async onChangeRoute(){await dt(this.routerEl,{opacity:[1,0],scale:[1,1.02]},{duration:.15,delay:.1}).finished,this.view=N.state.view,dt(this.routerEl,{opacity:[0,1],scale:[.99,1]},{duration:.37,delay:.05})}render(){return m`<div class="wcm-router"><div class="wcm-content">${this.viewTemplate()}</div></div>`}};Ft.styles=[O.globalCss,cs];$r([H()],Ft.prototype,"view",2);$r([H()],Ft.prototype,"prevView",2);Ft=$r([P("wcm-modal-router")],Ft);const us=I`div{height:36px;width:max-content;display:flex;justify-content:center;align-items:center;padding:9px 15px 11px;position:absolute;top:12px;box-shadow:0 6px 14px -6px rgba(10,16,31,.3),0 10px 32px -4px rgba(10,16,31,.15);z-index:2;left:50%;transform:translateX(-50%);pointer-events:none;backdrop-filter:blur(20px) saturate(1.8);-webkit-backdrop-filter:blur(20px) saturate(1.8);border-radius:var(--wcm-notification-border-radius);border:1px solid var(--wcm-color-overlay);background-color:var(--wcm-color-overlay)}svg{margin-right:5px}@-moz-document url-prefix(){div{background-color:var(--wcm-color-bg-3)}}.wcm-success path{fill:var(--wcm-accent-color)}.wcm-error path{fill:var(--wcm-error-color)}`;var ms=Object.defineProperty,fs=Object.getOwnPropertyDescriptor,Mo=(e,t,r,n)=>{for(var o=n>1?void 0:n?fs(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&ms(t,r,o),o};let he=class extends E{constructor(){super(),this.open=!1,this.unsubscribe=void 0,this.timeout=void 0,this.unsubscribe=X.subscribe(e=>{e.open?(this.open=!0,this.timeout=setTimeout(()=>X.closeToast(),2200)):(this.open=!1,clearTimeout(this.timeout))})}disconnectedCallback(){var e;(e=this.unsubscribe)==null||e.call(this),clearTimeout(this.timeout),X.closeToast()}render(){const{message:e,variant:t}=X.state,r={"wcm-success":t==="success","wcm-error":t==="error"};return this.open?m`<div class="${G(r)}">${t==="success"?T.CHECKMARK_ICON:null} ${t==="error"?T.CROSS_ICON:null}<wcm-text variant="small-regular">${e}</wcm-text></div>`:null}};he.styles=[O.globalCss,us];Mo([H()],he.prototype,"open",2);he=Mo([P("wcm-modal-toast")],he);const ps=.1,Kr=2.5,Q=7;function Ue(e,t,r){return e===t?!1:(e-t<0?t-e:e-t)<=r+ps}function gs(e,t){const r=Array.prototype.slice.call(Kt.create(e,{errorCorrectionLevel:t}).modules.data,0),n=Math.sqrt(r.length);return r.reduce((o,i,s)=>(s%n===0?o.push([i]):o[o.length-1].push(i))&&o,[])}const ws={generate(e,t,r){const n="#141414",o="#ffffff",i=[],s=gs(e,"Q"),l=t/s.length,a=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];a.forEach(({x:g,y:f})=>{const A=(s.length-Q)*l*g,u=(s.length-Q)*l*f,y=.45;for(let w=0;w<a.length;w+=1){const v=l*(Q-w*2);i.push(L`<rect fill="${w%2===0?n:o}" height="${v}" rx="${v*y}" ry="${v*y}" width="${v}" x="${A+l*w}" y="${u+l*w}">`)}});const c=Math.floor((r+25)/l),d=s.length/2-c/2,b=s.length/2+c/2-1,h=[];s.forEach((g,f)=>{g.forEach((A,u)=>{if(s[f][u]&&!(f<Q&&u<Q||f>s.length-(Q+1)&&u<Q||f<Q&&u>s.length-(Q+1))&&!(f>d&&f<b&&u>d&&u<b)){const y=f*l+l/2,w=u*l+l/2;h.push([y,w])}})});const p={};return h.forEach(([g,f])=>{p[g]?p[g].push(f):p[g]=[f]}),Object.entries(p).map(([g,f])=>{const A=f.filter(u=>f.every(y=>!Ue(u,y,l)));return[Number(g),A]}).forEach(([g,f])=>{f.forEach(A=>{i.push(L`<circle cx="${g}" cy="${A}" fill="${n}" r="${l/Kr}">`)})}),Object.entries(p).filter(([g,f])=>f.length>1).map(([g,f])=>{const A=f.filter(u=>f.some(y=>Ue(u,y,l)));return[Number(g),A]}).map(([g,f])=>{f.sort((u,y)=>u<y?-1:1);const A=[];for(const u of f){const y=A.find(w=>w.some(v=>Ue(u,v,l)));y?y.push(u):A.push([u])}return[g,A.map(u=>[u[0],u[u.length-1]])]}).forEach(([g,f])=>{f.forEach(([A,u])=>{i.push(L`<line x1="${g}" x2="${g}" y1="${A}" y2="${u}" stroke="${n}" stroke-width="${l/(Kr/2)}" stroke-linecap="round">`)})}),i}},vs=I`@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}div{position:relative;user-select:none;display:block;overflow:hidden;aspect-ratio:1/1;animation:fadeIn ease .2s}.wcm-dark{background-color:#fff;border-radius:var(--wcm-container-border-radius);padding:18px;box-shadow:0 2px 5px #000}svg:first-child,wcm-wallet-image{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{width:25%;height:25%;border-radius:var(--wcm-wallet-icon-border-radius)}svg:first-child{transform:translateY(-50%) translateX(-50%) scale(.9)}svg:first-child path:first-child{fill:var(--wcm-accent-color)}svg:first-child path:last-child{stroke:var(--wcm-color-overlay)}`;var bs=Object.defineProperty,ys=Object.getOwnPropertyDescriptor,St=(e,t,r,n)=>{for(var o=n>1?void 0:n?ys(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&bs(t,r,o),o};let nt=class extends E{constructor(){super(...arguments),this.uri="",this.size=0,this.imageId=void 0,this.walletId=void 0,this.imageUrl=void 0}svgTemplate(){const t=xt.state.themeMode==="light"?this.size:this.size-18*2;return L`<svg height="${t}" width="${t}">${ws.generate(this.uri,t,t/4)}</svg>`}render(){const e={"wcm-dark":xt.state.themeMode==="dark"};return m`<div style="${`width: ${this.size}px`}" class="${G(e)}">${this.walletId||this.imageUrl?m`<wcm-wallet-image walletId="${j(this.walletId)}" imageId="${j(this.imageId)}" imageUrl="${j(this.imageUrl)}"></wcm-wallet-image>`:T.WALLET_CONNECT_ICON_COLORED} ${this.svgTemplate()}</div>`}};nt.styles=[O.globalCss,vs];St([_()],nt.prototype,"uri",2);St([_({type:Number})],nt.prototype,"size",2);St([_()],nt.prototype,"imageId",2);St([_()],nt.prototype,"walletId",2);St([_()],nt.prototype,"imageUrl",2);nt=St([P("wcm-qrcode")],nt);const xs=I`:host{position:relative;height:28px;width:80%}input{width:100%;height:100%;line-height:28px!important;border-radius:var(--wcm-input-border-radius);font-style:normal;font-family:-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,Ubuntu,'Helvetica Neue',sans-serif;font-feature-settings:'case' on;font-weight:500;font-size:16px;letter-spacing:-.03em;padding:0 10px 0 34px;transition:.2s all ease;color:var(--wcm-color-fg-1);background-color:var(--wcm-color-bg-3);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay);caret-color:var(--wcm-accent-color)}input::placeholder{color:var(--wcm-color-fg-2)}svg{left:10px;top:4px;pointer-events:none;position:absolute;width:20px;height:20px}input:focus-within{box-shadow:inset 0 0 0 1px var(--wcm-accent-color)}path{fill:var(--wcm-color-fg-2)}`;var $s=Object.defineProperty,_s=Object.getOwnPropertyDescriptor,So=(e,t,r,n)=>{for(var o=n>1?void 0:n?_s(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&$s(t,r,o),o};let ue=class extends E{constructor(){super(...arguments),this.onChange=()=>null}render(){return m`<input type="text" @input="${this.onChange}" placeholder="Search wallets"> ${T.SEARCH_ICON}`}};ue.styles=[O.globalCss,xs];So([_()],ue.prototype,"onChange",2);ue=So([P("wcm-search-input")],ue);const Cs=I`@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}100%{stroke-dasharray:90,150;stroke-dashoffset:-124}}svg{animation:rotate 2s linear infinite;display:flex;justify-content:center;align-items:center}svg circle{stroke-linecap:round;animation:dash 1.5s ease infinite;stroke:var(--wcm-accent-color)}`;var Es=Object.defineProperty,As=Object.getOwnPropertyDescriptor,Os=(e,t,r,n)=>{for(var o=n>1?void 0:n?As(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Es(t,r,o),o};let er=class extends E{render(){return m`<svg viewBox="0 0 50 50" width="24" height="24"><circle cx="25" cy="25" r="20" fill="none" stroke-width="4" stroke="#fff"/></svg>`}};er.styles=[O.globalCss,Cs];er=Os([P("wcm-spinner")],er);const Ps=I`span{font-style:normal;font-family:var(--wcm-font-family);font-feature-settings:var(--wcm-font-feature-settings)}.wcm-xsmall-bold{font-family:var(--wcm-text-xsmall-bold-font-family);font-weight:var(--wcm-text-xsmall-bold-weight);font-size:var(--wcm-text-xsmall-bold-size);line-height:var(--wcm-text-xsmall-bold-line-height);letter-spacing:var(--wcm-text-xsmall-bold-letter-spacing);text-transform:var(--wcm-text-xsmall-bold-text-transform)}.wcm-xsmall-regular{font-family:var(--wcm-text-xsmall-regular-font-family);font-weight:var(--wcm-text-xsmall-regular-weight);font-size:var(--wcm-text-xsmall-regular-size);line-height:var(--wcm-text-xsmall-regular-line-height);letter-spacing:var(--wcm-text-xsmall-regular-letter-spacing);text-transform:var(--wcm-text-xsmall-regular-text-transform)}.wcm-small-thin{font-family:var(--wcm-text-small-thin-font-family);font-weight:var(--wcm-text-small-thin-weight);font-size:var(--wcm-text-small-thin-size);line-height:var(--wcm-text-small-thin-line-height);letter-spacing:var(--wcm-text-small-thin-letter-spacing);text-transform:var(--wcm-text-small-thin-text-transform)}.wcm-small-regular{font-family:var(--wcm-text-small-regular-font-family);font-weight:var(--wcm-text-small-regular-weight);font-size:var(--wcm-text-small-regular-size);line-height:var(--wcm-text-small-regular-line-height);letter-spacing:var(--wcm-text-small-regular-letter-spacing);text-transform:var(--wcm-text-small-regular-text-transform)}.wcm-medium-regular{font-family:var(--wcm-text-medium-regular-font-family);font-weight:var(--wcm-text-medium-regular-weight);font-size:var(--wcm-text-medium-regular-size);line-height:var(--wcm-text-medium-regular-line-height);letter-spacing:var(--wcm-text-medium-regular-letter-spacing);text-transform:var(--wcm-text-medium-regular-text-transform)}.wcm-big-bold{font-family:var(--wcm-text-big-bold-font-family);font-weight:var(--wcm-text-big-bold-weight);font-size:var(--wcm-text-big-bold-size);line-height:var(--wcm-text-big-bold-line-height);letter-spacing:var(--wcm-text-big-bold-letter-spacing);text-transform:var(--wcm-text-big-bold-text-transform)}:host(*){color:var(--wcm-color-fg-1)}.wcm-color-primary{color:var(--wcm-color-fg-1)}.wcm-color-secondary{color:var(--wcm-color-fg-2)}.wcm-color-tertiary{color:var(--wcm-color-fg-3)}.wcm-color-inverse{color:var(--wcm-accent-fill-color)}.wcm-color-accnt{color:var(--wcm-accent-color)}.wcm-color-error{color:var(--wcm-error-color)}`;var Is=Object.defineProperty,Ts=Object.getOwnPropertyDescriptor,_r=(e,t,r,n)=>{for(var o=n>1?void 0:n?Ts(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Is(t,r,o),o};let Vt=class extends E{constructor(){super(...arguments),this.variant="medium-regular",this.color="primary"}render(){const e={"wcm-big-bold":this.variant==="big-bold","wcm-medium-regular":this.variant==="medium-regular","wcm-small-regular":this.variant==="small-regular","wcm-small-thin":this.variant==="small-thin","wcm-xsmall-regular":this.variant==="xsmall-regular","wcm-xsmall-bold":this.variant==="xsmall-bold","wcm-color-primary":this.color==="primary","wcm-color-secondary":this.color==="secondary","wcm-color-tertiary":this.color==="tertiary","wcm-color-inverse":this.color==="inverse","wcm-color-accnt":this.color==="accent","wcm-color-error":this.color==="error"};return m`<span><slot class="${G(e)}"></slot></span>`}};Vt.styles=[O.globalCss,Ps];_r([_()],Vt.prototype,"variant",2);_r([_()],Vt.prototype,"color",2);Vt=_r([P("wcm-text")],Vt);const Ms=I`button{width:100%;height:100%;border-radius:var(--wcm-button-hover-highlight-border-radius);display:flex;align-items:flex-start}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}button>div{width:80px;padding:5px 0;display:flex;flex-direction:column;align-items:center}wcm-text{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}wcm-wallet-image{height:60px;width:60px;transition:all .2s ease;border-radius:var(--wcm-wallet-icon-border-radius);margin-bottom:5px}.wcm-sublabel{margin-top:2px}`;var Ss=Object.defineProperty,Rs=Object.getOwnPropertyDescriptor,lt=(e,t,r,n)=>{for(var o=n>1?void 0:n?Rs(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Ss(t,r,o),o};let q=class extends E{constructor(){super(...arguments),this.onClick=()=>null,this.name="",this.walletId="",this.label=void 0,this.imageId=void 0,this.installed=!1,this.recent=!1}sublabelTemplate(){return this.recent?m`<wcm-text class="wcm-sublabel" variant="xsmall-bold" color="tertiary">RECENT</wcm-text>`:this.installed?m`<wcm-text class="wcm-sublabel" variant="xsmall-bold" color="tertiary">INSTALLED</wcm-text>`:null}handleClick(){Wo.click({name:"WALLET_BUTTON",walletId:this.walletId}),this.onClick()}render(){var e;return m`<button @click="${this.handleClick.bind(this)}"><div><wcm-wallet-image walletId="${this.walletId}" imageId="${j(this.imageId)}"></wcm-wallet-image><wcm-text variant="xsmall-regular">${(e=this.label)!=null?e:$.getWalletName(this.name,!0)}</wcm-text>${this.sublabelTemplate()}</div></button>`}};q.styles=[O.globalCss,Ms];lt([_()],q.prototype,"onClick",2);lt([_()],q.prototype,"name",2);lt([_()],q.prototype,"walletId",2);lt([_()],q.prototype,"label",2);lt([_()],q.prototype,"imageId",2);lt([_({type:Boolean})],q.prototype,"installed",2);lt([_({type:Boolean})],q.prototype,"recent",2);q=lt([P("wcm-wallet-button")],q);const Ds=I`:host{display:block}div{overflow:hidden;position:relative;border-radius:inherit;width:100%;height:100%;background-color:var(--wcm-color-overlay)}svg{position:relative;width:100%;height:100%}div::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;border-radius:inherit;border:1px solid var(--wcm-color-overlay)}div img{width:100%;height:100%;object-fit:cover;object-position:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;var Ls=Object.defineProperty,Ns=Object.getOwnPropertyDescriptor,xe=(e,t,r,n)=>{for(var o=n>1?void 0:n?Ns(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Ls(t,r,o),o};let It=class extends E{constructor(){super(...arguments),this.walletId="",this.imageId=void 0,this.imageUrl=void 0}render(){var e;const t=(e=this.imageUrl)!=null&&e.length?this.imageUrl:$.getWalletIcon({id:this.walletId,image_id:this.imageId});return m`${t.length?m`<div><img crossorigin="anonymous" src="${t}" alt="${this.id}"></div>`:T.WALLET_PLACEHOLDER}`}};It.styles=[O.globalCss,Ds];xe([_()],It.prototype,"walletId",2);xe([_()],It.prototype,"imageId",2);xe([_()],It.prototype,"imageUrl",2);It=xe([P("wcm-wallet-image")],It);var Bs=Object.defineProperty,Ws=Object.getOwnPropertyDescriptor,Ro=(e,t,r,n)=>{for(var o=n>1?void 0:n?Ws(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Bs(t,r,o),o};let rr=class extends E{constructor(){super(),this.preload=!0,this.preloadData()}async loadImages(e){try{e!=null&&e.length&&await Promise.all(e.map(async t=>$.preloadImage(t)))}catch{console.info("Unsuccessful attempt at preloading some images",e)}}async preloadListings(){if(ht.state.enableExplorer){await k.getRecomendedWallets(),Z.setIsDataLoaded(!0);const{recomendedWallets:e}=k.state,t=e.map(r=>$.getWalletIcon(r));await this.loadImages(t)}else Z.setIsDataLoaded(!0)}async preloadCustomImages(){const e=$.getCustomImageUrls();await this.loadImages(e)}async preloadData(){try{this.preload&&(this.preload=!1,await Promise.all([this.preloadListings(),this.preloadCustomImages()]))}catch(e){console.error(e),X.openToast("Failed preloading","error")}}};Ro([H()],rr.prototype,"preload",2);rr=Ro([P("wcm-explorer-context")],rr);var Us=Object.defineProperty,js=Object.getOwnPropertyDescriptor,ks=(e,t,r,n)=>{for(var o=n>1?void 0:n?js(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Us(t,r,o),o};let Yr=class extends E{constructor(){super(),this.unsubscribeTheme=void 0,O.setTheme(),this.unsubscribeTheme=xt.subscribe(O.setTheme)}disconnectedCallback(){var e;(e=this.unsubscribeTheme)==null||e.call(this)}};Yr=ks([P("wcm-theme-context")],Yr);const Hs=I`@keyframes scroll{0%{transform:translate3d(0,0,0)}100%{transform:translate3d(calc(-70px * 9),0,0)}}.wcm-slider{position:relative;overflow-x:hidden;padding:10px 0;margin:0 -20px;width:calc(100% + 40px)}.wcm-track{display:flex;width:calc(70px * 18);animation:scroll 20s linear infinite;opacity:.7}.wcm-track svg{margin:0 5px}wcm-wallet-image{width:60px;height:60px;margin:0 5px;border-radius:var(--wcm-wallet-icon-border-radius)}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-title{display:flex;align-items:center;margin-bottom:10px}.wcm-title svg{margin-right:6px}.wcm-title path{fill:var(--wcm-accent-color)}wcm-modal-footer .wcm-title{padding:0 10px}wcm-button-big{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);filter:drop-shadow(0 0 17px var(--wcm-color-bg-1))}wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-info-footer wcm-text{text-align:center;margin-bottom:15px}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;var zs=Object.defineProperty,Fs=Object.getOwnPropertyDescriptor,Vs=(e,t,r,n)=>{for(var o=n>1?void 0:n?Fs(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&zs(t,r,o),o};let or=class extends E{onGoToQrcode(){N.push("Qrcode")}render(){const{recomendedWallets:e}=k.state,t=[...e,...e],r=x.RECOMMENDED_WALLET_AMOUNT*2;return m`<wcm-modal-header title="Connect your wallet" .onAction="${this.onGoToQrcode}" .actionIcon="${T.QRCODE_ICON}"></wcm-modal-header><wcm-modal-content><div class="wcm-title">${T.MOBILE_ICON}<wcm-text variant="small-regular" color="accent">WalletConnect</wcm-text></div><div class="wcm-slider"><div class="wcm-track">${[...Array(r)].map((n,o)=>{const i=t[o%t.length];return i?m`<wcm-wallet-image walletId="${i.id}" imageId="${i.image_id}"></wcm-wallet-image>`:T.WALLET_PLACEHOLDER})}</div><wcm-button-big @click="${$.handleAndroidLinking}"><wcm-text variant="medium-regular" color="inverse">Select Wallet</wcm-text></wcm-button-big></div></wcm-modal-content><wcm-info-footer><wcm-text color="secondary" variant="small-thin">Choose WalletConnect to see supported apps on your device</wcm-text></wcm-info-footer>`}};or.styles=[O.globalCss,Hs];or=Vs([P("wcm-android-wallet-selection")],or);const Zs=I`@keyframes loading{to{stroke-dashoffset:0}}@keyframes shake{10%,90%{transform:translate3d(-1px,0,0)}20%,80%{transform:translate3d(1px,0,0)}30%,50%,70%{transform:translate3d(-2px,0,0)}40%,60%{transform:translate3d(2px,0,0)}}:host{display:flex;flex-direction:column;align-items:center}div{position:relative;width:110px;height:110px;display:flex;justify-content:center;align-items:center;margin:40px 0 20px 0;transform:translate3d(0,0,0)}svg{position:absolute;width:110px;height:110px;fill:none;stroke:transparent;stroke-linecap:round;stroke-width:2px;top:0;left:0}use{stroke:var(--wcm-accent-color);animation:loading 1s linear infinite}wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:90px;height:90px}wcm-text{margin-bottom:40px}.wcm-error svg{stroke:var(--wcm-error-color)}.wcm-error use{display:none}.wcm-error{animation:shake .4s cubic-bezier(.36,.07,.19,.97) both}.wcm-stale svg,.wcm-stale use{display:none}`;var qs=Object.defineProperty,Ks=Object.getOwnPropertyDescriptor,Rt=(e,t,r,n)=>{for(var o=n>1?void 0:n?Ks(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&qs(t,r,o),o};let it=class extends E{constructor(){super(...arguments),this.walletId=void 0,this.imageId=void 0,this.isError=!1,this.isStale=!1,this.label=""}svgLoaderTemplate(){var e,t;const i=(t=(e=xt.state.themeVariables)==null?void 0:e["--wcm-wallet-icon-large-border-radius"])!=null?t:O.getPreset("--wcm-wallet-icon-large-border-radius");let s=0;i.includes("%")?s=88/100*parseInt(i,10):s=parseInt(i,10),s*=1.17;const l=317-s*1.57,a=425-s*1.8;return m`<svg viewBox="0 0 110 110" width="110" height="110"><rect id="wcm-loader" x="2" y="2" width="106" height="106" rx="${s}"/><use xlink:href="#wcm-loader" stroke-dasharray="106 ${l}" stroke-dashoffset="${a}"></use></svg>`}render(){const e={"wcm-error":this.isError,"wcm-stale":this.isStale};return m`<div class="${G(e)}">${this.svgLoaderTemplate()}<wcm-wallet-image walletId="${j(this.walletId)}" imageId="${j(this.imageId)}"></wcm-wallet-image></div><wcm-text variant="medium-regular" color="${this.isError?"error":"primary"}">${this.isError?"Connection declined":this.label}</wcm-text>`}};it.styles=[O.globalCss,Zs];Rt([_()],it.prototype,"walletId",2);Rt([_()],it.prototype,"imageId",2);Rt([_({type:Boolean})],it.prototype,"isError",2);Rt([_({type:Boolean})],it.prototype,"isStale",2);Rt([_()],it.prototype,"label",2);it=Rt([P("wcm-connector-waiting")],it);const yt={manualWallets(){var e,t;const{mobileWallets:r,desktopWallets:n}=ht.state,o=(e=yt.recentWallet())==null?void 0:e.id,i=x.isMobile()?r:n,s=i==null?void 0:i.filter(l=>o!==l.id);return(t=x.isMobile()?s==null?void 0:s.map(({id:l,name:a,links:c})=>({id:l,name:a,mobile:c,links:c})):s==null?void 0:s.map(({id:l,name:a,links:c})=>({id:l,name:a,desktop:c,links:c})))!=null?t:[]},recentWallet(){return $.getRecentWallet()},recomendedWallets(e=!1){var t;const r=e||(t=yt.recentWallet())==null?void 0:t.id,{recomendedWallets:n}=k.state;return n.filter(i=>r!==i.id)}},rt={onConnecting(e){$.goToConnectingView(e)},manualWalletsTemplate(){return yt.manualWallets().map(t=>m`<wcm-wallet-button walletId="${t.id}" name="${t.name}" .onClick="${()=>this.onConnecting(t)}"></wcm-wallet-button>`)},recomendedWalletsTemplate(e=!1){return yt.recomendedWallets(e).map(r=>m`<wcm-wallet-button name="${r.name}" walletId="${r.id}" imageId="${r.image_id}" .onClick="${()=>this.onConnecting(r)}"></wcm-wallet-button>`)},recentWalletTemplate(){const e=yt.recentWallet();if(e)return m`<wcm-wallet-button name="${e.name}" walletId="${e.id}" imageId="${j(e.image_id)}" .recent="${!0}" .onClick="${()=>this.onConnecting(e)}"></wcm-wallet-button>`}},Ys=I`.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-desktop-title,.wcm-mobile-title{display:flex;align-items:center}.wcm-mobile-title{justify-content:space-between;margin-bottom:20px;margin-top:-10px}.wcm-desktop-title{margin-bottom:10px;padding:0 10px}.wcm-subtitle{display:flex;align-items:center}.wcm-subtitle:last-child path{fill:var(--wcm-color-fg-3)}.wcm-desktop-title svg,.wcm-mobile-title svg{margin-right:6px}.wcm-desktop-title path,.wcm-mobile-title path{fill:var(--wcm-accent-color)}`;var Qs=Object.defineProperty,Gs=Object.getOwnPropertyDescriptor,Js=(e,t,r,n)=>{for(var o=n>1?void 0:n?Gs(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Qs(t,r,o),o};let nr=class extends E{render(){const{explorerExcludedWalletIds:e,enableExplorer:t}=ht.state,r=e!=="ALL"&&t,n=rt.manualWalletsTemplate(),o=rt.recomendedWalletsTemplate();let s=[rt.recentWalletTemplate(),...n,...o];s=s.filter(Boolean);const l=s.length>4||r;let a=[];l?a=s.slice(0,3):a=s;const c=!!a.length;return m`<wcm-modal-header .border="${!0}" title="Connect your wallet" .onAction="${$.handleUriCopy}" .actionIcon="${T.COPY_ICON}"></wcm-modal-header><wcm-modal-content><div class="wcm-mobile-title"><div class="wcm-subtitle">${T.MOBILE_ICON}<wcm-text variant="small-regular" color="accent">Mobile</wcm-text></div><div class="wcm-subtitle">${T.SCAN_ICON}<wcm-text variant="small-regular" color="secondary">Scan with your wallet</wcm-text></div></div><wcm-walletconnect-qr></wcm-walletconnect-qr></wcm-modal-content>${c?m`<wcm-modal-footer><div class="wcm-desktop-title">${T.DESKTOP_ICON}<wcm-text variant="small-regular" color="accent">Desktop</wcm-text></div><div class="wcm-grid">${a} ${l?m`<wcm-view-all-wallets-button></wcm-view-all-wallets-button>`:null}</div></wcm-modal-footer>`:null}`}};nr.styles=[O.globalCss,Ys];nr=Js([P("wcm-desktop-wallet-selection")],nr);const Xs=I`div{background-color:var(--wcm-color-bg-2);padding:10px 20px 15px 20px;border-top:1px solid var(--wcm-color-bg-3);text-align:center}a{color:var(--wcm-accent-color);text-decoration:none;transition:opacity .2s ease-in-out;display:inline}a:active{opacity:.8}@media(hover:hover){a:hover{opacity:.8}}`;var tl=Object.defineProperty,el=Object.getOwnPropertyDescriptor,rl=(e,t,r,n)=>{for(var o=n>1?void 0:n?el(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&tl(t,r,o),o};let ir=class extends E{render(){const{termsOfServiceUrl:e,privacyPolicyUrl:t}=ht.state;return e??t?m`<div><wcm-text variant="small-regular" color="secondary">By connecting your wallet to this app, you agree to the app's ${e?m`<a href="${e}" target="_blank" rel="noopener noreferrer">Terms of Service</a>`:null} ${e&&t?"and":null} ${t?m`<a href="${t}" target="_blank" rel="noopener noreferrer">Privacy Policy</a>`:null}</wcm-text></div>`:null}};ir.styles=[O.globalCss,Xs];ir=rl([P("wcm-legal-notice")],ir);const ol=I`div{display:grid;grid-template-columns:repeat(4,80px);margin:0 -10px;justify-content:space-between;row-gap:10px}`;var nl=Object.defineProperty,il=Object.getOwnPropertyDescriptor,sl=(e,t,r,n)=>{for(var o=n>1?void 0:n?il(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&nl(t,r,o),o};let sr=class extends E{onQrcode(){N.push("Qrcode")}render(){const{explorerExcludedWalletIds:e,enableExplorer:t}=ht.state,r=e!=="ALL"&&t,n=rt.manualWalletsTemplate(),o=rt.recomendedWalletsTemplate();let s=[rt.recentWalletTemplate(),...n,...o];s=s.filter(Boolean);const l=s.length>8||r;let a=[];l?a=s.slice(0,7):a=s;const c=!!a.length;return m`<wcm-modal-header title="Connect your wallet" .onAction="${this.onQrcode}" .actionIcon="${T.QRCODE_ICON}"></wcm-modal-header>${c?m`<wcm-modal-content><div>${a} ${l?m`<wcm-view-all-wallets-button></wcm-view-all-wallets-button>`:null}</div></wcm-modal-content>`:null}`}};sr.styles=[O.globalCss,ol];sr=sl([P("wcm-mobile-wallet-selection")],sr);const ll=I`:host{all:initial}.wcm-overlay{top:0;bottom:0;left:0;right:0;position:fixed;z-index:var(--wcm-z-index);overflow:hidden;display:flex;justify-content:center;align-items:center;opacity:0;pointer-events:none;background-color:var(--wcm-overlay-background-color);backdrop-filter:var(--wcm-overlay-backdrop-filter)}@media(max-height:720px) and (orientation:landscape){.wcm-overlay{overflow:scroll;align-items:flex-start;padding:20px 0}}.wcm-active{pointer-events:auto}.wcm-container{position:relative;max-width:360px;width:100%;outline:0;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) var(--wcm-container-border-radius) var(--wcm-container-border-radius);border:1px solid var(--wcm-color-overlay);overflow:hidden}.wcm-card{width:100%;position:relative;border-radius:var(--wcm-container-border-radius);overflow:hidden;box-shadow:0 6px 14px -6px rgba(10,16,31,.12),0 10px 32px -4px rgba(10,16,31,.1),0 0 0 1px var(--wcm-color-overlay);background-color:var(--wcm-color-bg-1);color:var(--wcm-color-fg-1)}@media(max-width:600px){.wcm-container{max-width:440px;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) 0 0}.wcm-card{border-radius:var(--wcm-container-border-radius) var(--wcm-container-border-radius) 0 0}.wcm-overlay{align-items:flex-end}}@media(max-width:440px){.wcm-container{border:0}}`;var al=Object.defineProperty,cl=Object.getOwnPropertyDescriptor,Cr=(e,t,r,n)=>{for(var o=n>1?void 0:n?cl(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&al(t,r,o),o};let Zt=class extends E{constructor(){super(),this.open=!1,this.active=!1,this.unsubscribeModal=void 0,this.abortController=void 0,this.unsubscribeModal=re.subscribe(e=>{e.open?this.onOpenModalEvent():this.onCloseModalEvent()})}disconnectedCallback(){var e;(e=this.unsubscribeModal)==null||e.call(this)}get overlayEl(){return $.getShadowRootElement(this,".wcm-overlay")}get containerEl(){return $.getShadowRootElement(this,".wcm-container")}toggleBodyScroll(e){if(document.querySelector("body"))if(e){const r=document.getElementById("wcm-styles");r==null||r.remove()}else document.head.insertAdjacentHTML("beforeend",'<style id="wcm-styles">html,body{touch-action:none;overflow:hidden;overscroll-behavior:contain;}</style>')}onCloseModal(e){e.target===e.currentTarget&&re.close()}onOpenModalEvent(){this.toggleBodyScroll(!1),this.addKeyboardEvents(),this.open=!0,setTimeout(async()=>{const e=$.isMobileAnimation()?{y:["50vh","0vh"]}:{scale:[.98,1]},t=.1,r=.2;await Promise.all([dt(this.overlayEl,{opacity:[0,1]},{delay:t,duration:r}).finished,dt(this.containerEl,e,{delay:t,duration:r}).finished]),this.active=!0},0)}async onCloseModalEvent(){this.toggleBodyScroll(!0),this.removeKeyboardEvents();const e=$.isMobileAnimation()?{y:["0vh","50vh"]}:{scale:[1,.98]},t=.2;await Promise.all([dt(this.overlayEl,{opacity:[1,0]},{duration:t}).finished,dt(this.containerEl,e,{duration:t}).finished]),this.containerEl.removeAttribute("style"),this.active=!1,this.open=!1}addKeyboardEvents(){this.abortController=new AbortController,window.addEventListener("keydown",e=>{var t;e.key==="Escape"?re.close():e.key==="Tab"&&((t=e.target)!=null&&t.tagName.includes("wcm-")||this.containerEl.focus())},this.abortController),this.containerEl.focus()}removeKeyboardEvents(){var e;(e=this.abortController)==null||e.abort(),this.abortController=void 0}render(){const e={"wcm-overlay":!0,"wcm-active":this.active};return m`<wcm-explorer-context></wcm-explorer-context><wcm-theme-context></wcm-theme-context><div id="wcm-modal" class="${G(e)}" @click="${this.onCloseModal}" role="alertdialog" aria-modal="true"><div class="wcm-container" tabindex="0">${this.open?m`<wcm-modal-backcard></wcm-modal-backcard><div class="wcm-card"><wcm-modal-router></wcm-modal-router><wcm-modal-toast></wcm-modal-toast></div>`:null}</div></div>`}};Zt.styles=[O.globalCss,ll];Cr([H()],Zt.prototype,"open",2);Cr([H()],Zt.prototype,"active",2);Zt=Cr([P("wcm-modal")],Zt);const dl=I`div{display:flex;margin-top:15px}slot{display:inline-block;margin:0 5px}wcm-button{margin:0 5px}`;var hl=Object.defineProperty,ul=Object.getOwnPropertyDescriptor,Gt=(e,t,r,n)=>{for(var o=n>1?void 0:n?ul(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&hl(t,r,o),o};let pt=class extends E{constructor(){super(...arguments),this.isMobile=!1,this.isDesktop=!1,this.isWeb=!1,this.isRetry=!1}onMobile(){x.isMobile()?N.replace("MobileConnecting"):N.replace("MobileQrcodeConnecting")}onDesktop(){N.replace("DesktopConnecting")}onWeb(){N.replace("WebConnecting")}render(){return m`<div>${this.isRetry?m`<slot></slot>`:null} ${this.isMobile?m`<wcm-button .onClick="${this.onMobile}" .iconLeft="${T.MOBILE_ICON}" variant="outline">Mobile</wcm-button>`:null} ${this.isDesktop?m`<wcm-button .onClick="${this.onDesktop}" .iconLeft="${T.DESKTOP_ICON}" variant="outline">Desktop</wcm-button>`:null} ${this.isWeb?m`<wcm-button .onClick="${this.onWeb}" .iconLeft="${T.GLOBE_ICON}" variant="outline">Web</wcm-button>`:null}</div>`}};pt.styles=[O.globalCss,dl];Gt([_({type:Boolean})],pt.prototype,"isMobile",2);Gt([_({type:Boolean})],pt.prototype,"isDesktop",2);Gt([_({type:Boolean})],pt.prototype,"isWeb",2);Gt([_({type:Boolean})],pt.prototype,"isRetry",2);pt=Gt([P("wcm-platform-selection")],pt);const ml=I`button{display:flex;flex-direction:column;padding:5px 10px;border-radius:var(--wcm-button-hover-highlight-border-radius);height:100%;justify-content:flex-start}.wcm-icons{width:60px;height:60px;display:flex;flex-wrap:wrap;padding:7px;border-radius:var(--wcm-wallet-icon-border-radius);justify-content:space-between;align-items:center;margin-bottom:5px;background-color:var(--wcm-color-bg-2);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}.wcm-icons img{width:21px;height:21px;object-fit:cover;object-position:center;border-radius:calc(var(--wcm-wallet-icon-border-radius)/ 2);border:1px solid var(--wcm-color-overlay)}.wcm-icons svg{width:21px;height:21px}.wcm-icons img:nth-child(1),.wcm-icons img:nth-child(2),.wcm-icons svg:nth-child(1),.wcm-icons svg:nth-child(2){margin-bottom:4px}wcm-text{width:100%;text-align:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;var fl=Object.defineProperty,pl=Object.getOwnPropertyDescriptor,gl=(e,t,r,n)=>{for(var o=n>1?void 0:n?pl(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&fl(t,r,o),o};let lr=class extends E{onClick(){N.push("WalletExplorer")}render(){const{recomendedWallets:e}=k.state,t=yt.manualWallets(),r=[...e,...t].reverse().slice(0,4);return m`<button @click="${this.onClick}"><div class="wcm-icons">${r.map(n=>{const o=$.getWalletIcon(n);if(o)return m`<img crossorigin="anonymous" src="${o}">`;const i=$.getWalletIcon({id:n.id});return i?m`<img crossorigin="anonymous" src="${i}">`:T.WALLET_PLACEHOLDER})} ${[...Array(4-r.length)].map(()=>T.WALLET_PLACEHOLDER)}</div><wcm-text variant="xsmall-regular">View All</wcm-text></button>`}};lr.styles=[O.globalCss,ml];lr=gl([P("wcm-view-all-wallets-button")],lr);const wl=I`.wcm-qr-container{width:100%;display:flex;justify-content:center;align-items:center;aspect-ratio:1/1}`;var vl=Object.defineProperty,bl=Object.getOwnPropertyDescriptor,$e=(e,t,r,n)=>{for(var o=n>1?void 0:n?bl(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&vl(t,r,o),o};let Tt=class extends E{constructor(){super(),this.walletId="",this.imageId="",this.uri="",setTimeout(()=>{const{walletConnectUri:e}=Z.state;this.uri=e},0)}get overlayEl(){return $.getShadowRootElement(this,".wcm-qr-container")}render(){return m`<div class="wcm-qr-container">${this.uri?m`<wcm-qrcode size="${this.overlayEl.offsetWidth}" uri="${this.uri}" walletId="${j(this.walletId)}" imageId="${j(this.imageId)}"></wcm-qrcode>`:m`<wcm-spinner></wcm-spinner>`}</div>`}};Tt.styles=[O.globalCss,wl];$e([_()],Tt.prototype,"walletId",2);$e([_()],Tt.prototype,"imageId",2);$e([H()],Tt.prototype,"uri",2);Tt=$e([P("wcm-walletconnect-qr")],Tt);var yl=Object.defineProperty,xl=Object.getOwnPropertyDescriptor,$l=(e,t,r,n)=>{for(var o=n>1?void 0:n?xl(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&yl(t,r,o),o};let ar=class extends E{viewTemplate(){return x.isAndroid()&&!x.isTelegram()?m`<wcm-android-wallet-selection></wcm-android-wallet-selection>`:x.isMobile()?m`<wcm-mobile-wallet-selection></wcm-mobile-wallet-selection>`:m`<wcm-desktop-wallet-selection></wcm-desktop-wallet-selection>`}render(){return m`${this.viewTemplate()}<wcm-legal-notice></wcm-legal-notice>`}};ar.styles=[O.globalCss];ar=$l([P("wcm-connect-wallet-view")],ar);const _l=I`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;var Cl=Object.defineProperty,El=Object.getOwnPropertyDescriptor,Do=(e,t,r,n)=>{for(var o=n>1?void 0:n?El(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Cl(t,r,o),o};let me=class extends E{constructor(){super(),this.isError=!1,this.openDesktopApp()}onFormatAndRedirect(e){const{desktop:t,name:r}=x.getWalletRouterData(),n=t==null?void 0:t.native,o=t==null?void 0:t.universal;if(n){const i=x.formatNativeUrl(n,e,r);x.openHref(i,"_self")}else if(o){const i=x.formatUniversalUrl(o,e,r);x.openHref(i,"_blank")}}openDesktopApp(){const{walletConnectUri:e}=Z.state,t=x.getWalletRouterData();$.setRecentWallet(t),e&&this.onFormatAndRedirect(e)}render(){const{name:e,id:t,image_id:r}=x.getWalletRouterData(),{isMobile:n,isWeb:o}=$.getCachedRouterWalletPlatforms();return m`<wcm-modal-header title="${e}" .onAction="${$.handleUriCopy}" .actionIcon="${T.COPY_ICON}"></wcm-modal-header><wcm-modal-content><wcm-connector-waiting walletId="${t}" imageId="${j(r)}" label="${`Continue in ${e}...`}" .isError="${this.isError}"></wcm-connector-waiting></wcm-modal-content><wcm-info-footer><wcm-text color="secondary" variant="small-thin">${`Connection can continue loading if ${e} is not installed on your device`}</wcm-text><wcm-platform-selection .isMobile="${n}" .isWeb="${o}" .isRetry="${!0}"><wcm-button .onClick="${this.openDesktopApp.bind(this)}" .iconRight="${T.RETRY_ICON}">Retry</wcm-button></wcm-platform-selection></wcm-info-footer>`}};me.styles=[O.globalCss,_l];Do([H()],me.prototype,"isError",2);me=Do([P("wcm-desktop-connecting-view")],me);const Al=I`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}wcm-button{margin-top:15px}`;var Ol=Object.defineProperty,Pl=Object.getOwnPropertyDescriptor,Il=(e,t,r,n)=>{for(var o=n>1?void 0:n?Pl(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Ol(t,r,o),o};let cr=class extends E{onInstall(e){e&&x.openHref(e,"_blank")}render(){const{name:e,id:t,image_id:r,homepage:n}=x.getWalletRouterData();return m`<wcm-modal-header title="${e}"></wcm-modal-header><wcm-modal-content><wcm-connector-waiting walletId="${t}" imageId="${j(r)}" label="Not Detected" .isStale="${!0}"></wcm-connector-waiting></wcm-modal-content><wcm-info-footer><wcm-text color="secondary" variant="small-thin">${`Download ${e} to continue. If multiple browser extensions are installed, disable non ${e} ones and try again`}</wcm-text><wcm-button .onClick="${()=>this.onInstall(n)}" .iconLeft="${T.ARROW_DOWN_ICON}">Download</wcm-button></wcm-info-footer>`}};cr.styles=[O.globalCss,Al];cr=Il([P("wcm-install-wallet-view")],cr);const Tl=I`wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:96px;height:96px;margin-bottom:20px}wcm-info-footer{display:flex;width:100%}.wcm-app-store{justify-content:space-between}.wcm-app-store wcm-wallet-image{margin-right:10px;margin-bottom:0;width:28px;height:28px;border-radius:var(--wcm-wallet-icon-small-border-radius)}.wcm-app-store div{display:flex;align-items:center}.wcm-app-store wcm-button{margin-right:-10px}.wcm-note{flex-direction:column;align-items:center;padding:5px 0}.wcm-note wcm-text{text-align:center}wcm-platform-selection{margin-top:-15px}.wcm-note wcm-text{margin-top:15px}.wcm-note wcm-text span{color:var(--wcm-accent-color)}`;var Ml=Object.defineProperty,Sl=Object.getOwnPropertyDescriptor,Lo=(e,t,r,n)=>{for(var o=n>1?void 0:n?Sl(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Ml(t,r,o),o};let fe=class extends E{constructor(){super(),this.isError=!1,this.openMobileApp()}onFormatAndRedirect(e,t=!1){const{mobile:r,name:n}=x.getWalletRouterData(),o=r==null?void 0:r.native,i=r==null?void 0:r.universal,s=x.isTelegram()?"_blank":"_self";if(e=x.isTelegram()&&x.isAndroid()?encodeURIComponent(e):e,o&&!t){const l=x.formatNativeUrl(o,e,n);x.openHref(l,s)}else if(i){const l=x.formatUniversalUrl(i,e,n);x.openHref(l,s)}}openMobileApp(e=!1){const{walletConnectUri:t}=Z.state,r=x.getWalletRouterData();t&&this.onFormatAndRedirect(t,e),$.setRecentWallet(r)}onGoToAppStore(e){e&&x.openHref(e,"_blank")}render(){const{name:e,id:t,image_id:r,app:n,mobile:o}=x.getWalletRouterData(),{isWeb:i}=$.getCachedRouterWalletPlatforms(),s=n==null?void 0:n.ios,l=o==null?void 0:o.universal;return m`<wcm-modal-header title="${e}"></wcm-modal-header><wcm-modal-content><wcm-connector-waiting walletId="${t}" imageId="${j(r)}" label="Tap 'Open' to continue…" .isError="${this.isError}"></wcm-connector-waiting></wcm-modal-content><wcm-info-footer class="wcm-note"><wcm-platform-selection .isWeb="${i}" .isRetry="${!0}"><wcm-button .onClick="${()=>this.openMobileApp(!1)}" .iconRight="${T.RETRY_ICON}">Retry</wcm-button></wcm-platform-selection>${l?m`<wcm-text color="secondary" variant="small-thin">Still doesn't work? <span tabindex="0" @click="${()=>this.openMobileApp(!0)}">Try this alternate link</span></wcm-text>`:null}</wcm-info-footer><wcm-info-footer class="wcm-app-store"><div><wcm-wallet-image walletId="${t}" imageId="${j(r)}"></wcm-wallet-image><wcm-text>${`Get ${e}`}</wcm-text></div><wcm-button .iconRight="${T.ARROW_RIGHT_ICON}" .onClick="${()=>this.onGoToAppStore(s)}" variant="ghost">App Store</wcm-button></wcm-info-footer>`}};fe.styles=[O.globalCss,Tl];Lo([H()],fe.prototype,"isError",2);fe=Lo([P("wcm-mobile-connecting-view")],fe);const Rl=I`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;var Dl=Object.defineProperty,Ll=Object.getOwnPropertyDescriptor,Nl=(e,t,r,n)=>{for(var o=n>1?void 0:n?Ll(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Dl(t,r,o),o};let dr=class extends E{render(){const{name:e,id:t,image_id:r}=x.getWalletRouterData(),{isDesktop:n,isWeb:o}=$.getCachedRouterWalletPlatforms();return m`<wcm-modal-header title="${e}" .onAction="${$.handleUriCopy}" .actionIcon="${T.COPY_ICON}"></wcm-modal-header><wcm-modal-content><wcm-walletconnect-qr walletId="${t}" imageId="${j(r)}"></wcm-walletconnect-qr></wcm-modal-content><wcm-info-footer><wcm-text color="secondary" variant="small-thin">${`Scan this QR Code with your phone's camera or inside ${e} app`}</wcm-text><wcm-platform-selection .isDesktop="${n}" .isWeb="${o}"></wcm-platform-selection></wcm-info-footer>`}};dr.styles=[O.globalCss,Rl];dr=Nl([P("wcm-mobile-qr-connecting-view")],dr);var Bl=Object.defineProperty,Wl=Object.getOwnPropertyDescriptor,Ul=(e,t,r,n)=>{for(var o=n>1?void 0:n?Wl(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Bl(t,r,o),o};let hr=class extends E{render(){return m`<wcm-modal-header title="Scan the code" .onAction="${$.handleUriCopy}" .actionIcon="${T.COPY_ICON}"></wcm-modal-header><wcm-modal-content><wcm-walletconnect-qr></wcm-walletconnect-qr></wcm-modal-content>`}};hr.styles=[O.globalCss];hr=Ul([P("wcm-qrcode-view")],hr);const jl=I`wcm-modal-content{height:clamp(200px,60vh,600px);display:block;overflow:scroll;scrollbar-width:none;position:relative;margin-top:1px}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between;margin:-15px -10px;padding-top:20px}wcm-modal-content::after,wcm-modal-content::before{content:'';position:fixed;pointer-events:none;z-index:1;width:100%;height:20px;opacity:1}wcm-modal-content::before{box-shadow:0 -1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(var(--wcm-color-bg-1),rgba(255,255,255,0))}wcm-modal-content::after{box-shadow:0 1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(rgba(255,255,255,0),var(--wcm-color-bg-1));top:calc(100% - 20px)}wcm-modal-content::-webkit-scrollbar{display:none}.wcm-placeholder-block{display:flex;justify-content:center;align-items:center;height:100px;overflow:hidden}.wcm-empty,.wcm-loading{display:flex}.wcm-loading .wcm-placeholder-block{height:100%}.wcm-end-reached .wcm-placeholder-block{height:0;opacity:0}.wcm-empty .wcm-placeholder-block{opacity:1;height:100%}wcm-wallet-button{margin:calc((100% - 60px)/ 3) 0}`;var kl=Object.defineProperty,Hl=Object.getOwnPropertyDescriptor,Jt=(e,t,r,n)=>{for(var o=n>1?void 0:n?Hl(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&kl(t,r,o),o};const je=40;let gt=class extends E{constructor(){super(...arguments),this.loading=!k.state.wallets.listings.length,this.firstFetch=!k.state.wallets.listings.length,this.search="",this.endReached=!1,this.intersectionObserver=void 0,this.searchDebounce=$.debounce(e=>{e.length>=1?(this.firstFetch=!0,this.endReached=!1,this.search=e,k.resetSearch(),this.fetchWallets()):this.search&&(this.search="",this.endReached=this.isLastPage(),k.resetSearch())})}firstUpdated(){this.createPaginationObserver()}disconnectedCallback(){var e;(e=this.intersectionObserver)==null||e.disconnect()}get placeholderEl(){return $.getShadowRootElement(this,".wcm-placeholder-block")}createPaginationObserver(){this.intersectionObserver=new IntersectionObserver(([e])=>{e.isIntersecting&&!(this.search&&this.firstFetch)&&this.fetchWallets()}),this.intersectionObserver.observe(this.placeholderEl)}isLastPage(){const{wallets:e,search:t}=k.state,{listings:r,total:n}=this.search?t:e;return n<=je||r.length>=n}async fetchWallets(){var e;const{wallets:t,search:r}=k.state,{listings:n,total:o,page:i}=this.search?r:t;if(!this.endReached&&(this.firstFetch||o>je&&n.length<o))try{this.loading=!0;const s=(e=Z.state.chains)==null?void 0:e.join(","),{listings:l}=await k.getWallets({page:this.firstFetch?1:i+1,entries:je,search:this.search,version:2,chains:s}),a=l.map(c=>$.getWalletIcon(c));await Promise.all([...a.map(async c=>$.preloadImage(c)),x.wait(300)]),this.endReached=this.isLastPage()}catch(s){console.error(s),X.openToast($.getErrorMessage(s),"error")}finally{this.loading=!1,this.firstFetch=!1}}onConnect(e){x.isAndroid()?$.handleMobileLinking(e):$.goToConnectingView(e)}onSearchChange(e){const{value:t}=e.target;this.searchDebounce(t)}render(){const{wallets:e,search:t}=k.state,{listings:r}=this.search?t:e,n=this.loading&&!r.length,o=this.search.length>=3;let i=rt.manualWalletsTemplate(),s=rt.recomendedWalletsTemplate(!0);o&&(i=i.filter(({values:c})=>$.caseSafeIncludes(c[0],this.search)),s=s.filter(({values:c})=>$.caseSafeIncludes(c[0],this.search)));const l=!this.loading&&!r.length&&!s.length,a={"wcm-loading":n,"wcm-end-reached":this.endReached||!this.loading,"wcm-empty":l};return m`<wcm-modal-header><wcm-search-input .onChange="${this.onSearchChange.bind(this)}"></wcm-search-input></wcm-modal-header><wcm-modal-content class="${G(a)}"><div class="wcm-grid">${n?null:i} ${n?null:s} ${n?null:r.map(c=>m`${c?m`<wcm-wallet-button imageId="${c.image_id}" name="${c.name}" walletId="${c.id}" .onClick="${()=>this.onConnect(c)}"></wcm-wallet-button>`:null}`)}</div><div class="wcm-placeholder-block">${l?m`<wcm-text variant="big-bold" color="secondary">No results found</wcm-text>`:null} ${!l&&this.loading?m`<wcm-spinner></wcm-spinner>`:null}</div></wcm-modal-content>`}};gt.styles=[O.globalCss,jl];Jt([H()],gt.prototype,"loading",2);Jt([H()],gt.prototype,"firstFetch",2);Jt([H()],gt.prototype,"search",2);Jt([H()],gt.prototype,"endReached",2);gt=Jt([P("wcm-wallet-explorer-view")],gt);const zl=I`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;var Fl=Object.defineProperty,Vl=Object.getOwnPropertyDescriptor,No=(e,t,r,n)=>{for(var o=n>1?void 0:n?Vl(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Fl(t,r,o),o};let pe=class extends E{constructor(){super(),this.isError=!1,this.openWebWallet()}onFormatAndRedirect(e){const{desktop:t,name:r}=x.getWalletRouterData(),n=t==null?void 0:t.universal;if(n){const o=x.formatUniversalUrl(n,e,r);x.openHref(o,"_blank")}}openWebWallet(){const{walletConnectUri:e}=Z.state,t=x.getWalletRouterData();$.setRecentWallet(t),e&&this.onFormatAndRedirect(e)}render(){const{name:e,id:t,image_id:r}=x.getWalletRouterData(),{isMobile:n,isDesktop:o}=$.getCachedRouterWalletPlatforms(),i=x.isMobile();return m`<wcm-modal-header title="${e}" .onAction="${$.handleUriCopy}" .actionIcon="${T.COPY_ICON}"></wcm-modal-header><wcm-modal-content><wcm-connector-waiting walletId="${t}" imageId="${j(r)}" label="${`Continue in ${e}...`}" .isError="${this.isError}"></wcm-connector-waiting></wcm-modal-content><wcm-info-footer><wcm-text color="secondary" variant="small-thin">${`${e} web app has opened in a new tab. Go there, accept the connection, and come back`}</wcm-text><wcm-platform-selection .isMobile="${n}" .isDesktop="${i?!1:o}" .isRetry="${!0}"><wcm-button .onClick="${this.openWebWallet.bind(this)}" .iconRight="${T.RETRY_ICON}">Retry</wcm-button></wcm-platform-selection></wcm-info-footer>`}};pe.styles=[O.globalCss,zl];No([H()],pe.prototype,"isError",2);pe=No([P("wcm-web-connecting-view")],pe);export{Zt as WcmModal,nt as WcmQrCode};
55
- //# sourceMappingURL=index-2e8db189.js.map
55
+ //# sourceMappingURL=index-70b9d292.js.map