1import{i as t,e,r as i,a as o,x as r,C as n,A as a,O as s,b as l,E as c,R as u,c as d,d as h,f as p,S as g,g as w,W as f,h as b,j as v,T as m,k as y,M as x,l as $,m as k,n as C,o as R}from"./chunk-C74OP4fS.js";import{n as I,c as E,o as T,r as P,U as j,e as O,f as S,a as L}from"./chunk-BzFVculG.js";import{g as z}from"./chunk-Gmj5k1uE.js";import"./chunk-ZLwEzXoy.js";import"./chunk-64Y5F-uU.js";import"./chunk-CdSArBFG.js";const A=t` 2 :host { 3 position: relative; 4 background-color: var(--wui-color-gray-glass-002); 5 display: flex; 6 justify-content: center; 7 align-items: center; 8 width: var(--local-size); 9 height: var(--local-size); 10 border-radius: inherit; 11 border-radius: var(--local-border-radius); 12 } 13 14 :host > wui-flex { 15 overflow: hidden; 16 border-radius: inherit; 17 border-radius: var(--local-border-radius); 18 } 19 20 :host::after { 21 content: ''; 22 position: absolute; 23 top: 0; 24 bottom: 0; 25 left: 0; 26 right: 0; 27 border-radius: inherit; 28 border: 1px solid var(--wui-color-gray-glass-010); 29 pointer-events: none; 30 } 31 32 :host([name='Extension'])::after { 33 border: 1px solid var(--wui-color-accent-glass-010); 34 } 35 36 :host([data-wallet-icon='allWallets']) { 37 background-color: var(--wui-all-wallets-bg-100); 38 } 39 40 :host([data-wallet-icon='allWallets'])::after { 41 border: 1px solid var(--wui-color-accent-glass-010); 42 } 43 44 wui-icon[data-parent-size='inherit'] { 45 width: 75%; 46 height: 75%; 47 align-items: center; 48 } 49 50 wui-icon[data-parent-size='sm'] { 51 width: 18px; 52 height: 18px; 53 } 54 55 wui-icon[data-parent-size='md'] { 56 width: 24px; 57 height: 24px; 58 } 59 60 wui-icon[data-parent-size='lg'] { 61 width: 42px; 62 height: 42px; 63 } 64 65 wui-icon[data-parent-size='full'] { 66 width: 100%; 67 height: 100%; 68 } 69 70 :host > wui-icon-box { 71 position: absolute; 72 overflow: hidden; 73 right: -1px; 74 bottom: -2px; 75 z-index: 1; 76 border: 2px solid var(--wui-color-bg-150, #1e1f1f); 77 padding: 1px; 78 } 79`;var B=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let W=class extends o{constructor(){super(...arguments),this.size="md",this.name="",this.installed=!1,this.badgeSize="xs"}render(){let t="xxs";return t="lg"===this.size?"m":"md"===this.size?"xs":"xxs",this.style.cssText=`\n --local-border-radius: var(--wui-border-radius-${t});\n --local-size: var(--wui-wallet-image-size-${this.size});\n `,this.walletIcon&&(this.dataset.walletIcon=this.walletIcon),r` 80 <wui-flex justifyContent="center" alignItems="center"> ${this.templateVisual()} </wui-flex> 81 `}templateVisual(){return this.imageSrc?r`<wui-image src=${this.imageSrc} alt=${this.name}></wui-image>`:this.walletIcon?r`<wui-icon 82 data-parent-size="md" 83 size="md" 84 color="inherit" 85 name=${this.walletIcon} 86 ></wui-icon>`:r`<wui-icon 87 data-parent-size=${this.size} 88 size="inherit" 89 color="inherit" 90 name="walletPlaceholder" 91 ></wui-icon>`}};W.styles=[e,i,A],B([I()],W.prototype,"size",void 0),B([I()],W.prototype,"name",void 0),B([I()],W.prototype,"imageSrc",void 0),B([I()],W.prototype,"walletIcon",void 0),B([I({type:Boolean})],W.prototype,"installed",void 0),B([I()],W.prototype,"badgeSize",void 0),W=B([E("wui-wallet-image")],W);const D=t` 92 :host { 93 position: relative; 94 border-radius: var(--wui-border-radius-xxs); 95 width: 40px; 96 height: 40px; 97 overflow: hidden; 98 background: var(--wui-color-gray-glass-002); 99 display: flex; 100 justify-content: center; 101 align-items: center; 102 flex-wrap: wrap; 103 gap: var(--wui-spacing-4xs); 104 padding: 3.75px !important; 105 } 106 107 :host::after { 108 content: ''; 109 position: absolute; 110 top: 0; 111 bottom: 0; 112 left: 0; 113 right: 0; 114 border-radius: inherit; 115 border: 1px solid var(--wui-color-gray-glass-010); 116 pointer-events: none; 117 } 118 119 :host > wui-wallet-image { 120 width: 14px; 121 height: 14px; 122 border-radius: var(--wui-border-radius-5xs); 123 } 124 125 :host > wui-flex { 126 padding: 2px; 127 position: fixed; 128 overflow: hidden; 129 left: 34px; 130 bottom: 8px; 131 background: var(--dark-background-150, #1e1f1f); 132 border-radius: 50%; 133 z-index: 2; 134 display: flex; 135 } 136`;
136var N=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let M=class extends o{constructor(){super(...arguments),this.walletImages=[]}render(){const t=this.walletImages.length<4;return r`${this.walletImages.slice(0,4).map(({src:t,walletName:e})=>r` 137 <wui-wallet-image 138 size="inherit" 139 imageSrc=${t} 140 name=${T(e)} 141 ></wui-wallet-image> 142 `)} 143 ${t?[...Array(4-this.walletImages.length)].map(()=>r` <wui-wallet-image size="inherit" name=""></wui-wallet-image>`):null} 144 <wui-flex> 145 <wui-icon-box 146 size="xxs" 147 iconSize="xxs" 148 iconcolor="success-100" 149 backgroundcolor="success-100" 150 icon="checkmark" 151 background="opaque" 152 ></wui-icon-box> 153 </wui-flex>`}};M.styles=[i,D],N([I({type:Array})],M.prototype,"walletImages",void 0),M=N([E("wui-all-wallets-image")],M);const U=t` 154 button { 155 column-gap: var(--wui-spacing-s); 156 padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs); 157 width: 100%; 158 background-color: var(--wui-color-gray-glass-002); 159 border-radius: var(--wui-border-radius-xs); 160 color: var(--wui-color-fg-100); 161 } 162 163 button > wui-text:nth-child(2) { 164 display: flex; 165 flex: 1; 166 } 167 168 button:disabled { 169 background-color: var(--wui-color-gray-glass-015); 170 color: var(--wui-color-gray-glass-015); 171 } 172 173 button:disabled > wui-tag { 174 background-color: var(--wui-color-gray-glass-010); 175 color: var(--wui-color-fg-300); 176 } 177 178 wui-icon { 179 color: var(--wui-color-fg-200) !important; 180 } 181`;var _=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let q=class extends o{constructor(){super(...arguments),this.walletImages=[],this.imageSrc="",this.name="",this.tabIdx=void 0,this.installed=!1,this.disabled=!1,this.showAllWallets=!1,this.loading=!1,this.loadingSpinnerColor="accent-100"}render(){return r` 182 <button ?disabled=${this.disabled} tabindex=${T(this.tabIdx)}> 183 ${this.templateAllWallets()} ${this.templateWalletImage()} 184 <wui-text variant="paragraph-500" color="inherit">${this.name}</wui-text> 185 ${this.templateStatus()} 186 </button> 187 `}templateAllWallets(){return this.showAllWallets&&this.imageSrc?r` <wui-all-wallets-image .imageeSrc=${this.imageSrc}> </wui-all-wallets-image> `:this.showAllWallets&&this.walletIcon?r` <wui-wallet-image .walletIcon=${this.walletIcon} size="sm"> </wui-wallet-image> `:null}templateWalletImage(){return!this.showAllWallets&&this.imageSrc?r`<wui-wallet-image 188 size="sm" 189 imageSrc=${this.imageSrc} 190 name=${this.name} 191 .installed=${this.installed} 192 ></wui-wallet-image>`:this.showAllWallets||this.imageSrc?null:r`<wui-wallet-image size="sm" name=${this.name}></wui-wallet-image>`}templateStatus(){return this.loading?r`<wui-loading-spinner 193 size="lg" 194 color=${this.loadingSpinnerColor} 195 ></wui-loading-spinner>`:this.tagLabel&&this.tagVariant?r`<wui-tag variant=${this.tagVariant}>${this.tagLabel}</wui-tag>`:this.icon?r`<wui-icon color="inherit" size="sm" name=${this.icon}></wui-icon>`:null}};q.styles=[i,e,U],_([I({type:Array})],q.prototype,"walletImages",void 0),_([I()],q.prototype,"imageSrc",void 0),_([I()],q.prototype,"name",void 0),_([I()],q.prototype,"tagLabel",void 0),_([I()],q.prototype,"tagVariant",void 0),_([I()],q.prototype,"icon",void 0),_([I()],q.prototype,"walletIcon",void 0),_([I()],q.prototype,"tabIdx",void 0),_([I({type:Boolean})],q.prototype,"installed",void 0),_([I({type:Boolean})],q.prototype,"disabled",void 0),_([I({type:Boolean})],q.prototype,"showAllWallets",void 0),_([I({type:Boolean})],q.prototype,"loading",void 0),_([I({type:String})],q.prototype,"loadingSpinnerColor",void 0),q=_([E("wui-list-wallet")],q);
195var K=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let H=class extends o{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=n.state.connectors,this.count=a.state.count,this.filteredCount=a.state.filteredWallets.length,this.isFetchingRecommendedWallets=a.state.isFetchingRecommendedWallets,this.unsubscribe.push(n.subscribeKey("connectors",t=>this.connectors=t),a.subscribeKey("count",t=>this.count=t),a.subscribeKey("filteredWallets",t=>this.filteredCount=t.length),a.subscribeKey("isFetchingRecommendedWallets",t=>this.isFetchingRecommendedWallets=t))}disconnectedCallback(){this.unsubscribe.forEach(t=>t())}render(){const t=this.connectors.find(t=>"walletConnect"===t.id),{allWallets:e}=s.state;if(!t||"HIDE"===e)return null;if("ONLY_MOBILE"===e&&!l.isMobile())return null;const i=a.state.featured.length,o=this.count+i,n=o<10?o:10*Math.floor(o/10),c=this.filteredCount>0?this.filteredCount:n;let u=`${c}`;return this.filteredCount>0?u=`${this.filteredCount}`:c<o&&(u=`${c}+`),r` 196 <wui-list-wallet 197 name="All Wallets" 198 walletIcon="allWallets" 199 showAllWallets 200 @click=${this.onAllWallets.bind(this)} 201 tagLabel=${u} 202 tagVariant="shade" 203 data-testid="all-wallets" 204 tabIdx=${T(this.tabIdx)} 205 .loading=${this.isFetchingRecommendedWallets} 206 loadingSpinnerColor=${this.isFetchingRecommendedWallets?"fg-300":"accent-100"} 207 ></wui-list-wallet> 208 `}onAllWallets(){c.sendEvent({type:"track",event:"CLICK_ALL_WALLETS"}),u.push("AllWallets")}};K([I()],H.prototype,"tabIdx",void 0),K([P()],H.prototype,"connectors",void 0),K([P()],H.prototype,"count",void 0),K([P()],H.prototype,"filteredCount",void 0),K([P()],H.prototype,"isFetchingRecommendedWallets",void 0),H=K([E("w3m-all-wallets-widget")],H);var V=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let F=class extends o{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=n.state.connectors,this.unsubscribe.push(n.subscribeKey("connectors",t=>this.connectors=t))}disconnectedCallback(){this.unsubscribe.forEach(t=>t())}render(){const t=this.connectors.filter(t=>"ANNOUNCED"===t.type);return(null==t?void 0:t.length)?r` 209 <wui-flex flexDirection="column" gap="xs"> 210 ${t.filter(d.showConnector).map(t=>r` 211 <wui-list-wallet 212 imageSrc=${T(h.getConnectorImage(t))} 213 name=${t.name??"Unknown"} 214 @click=${()=>this.onConnector(t)} 215 tagVariant="success" 216 tagLabel="installed" 217 data-testid=${`wallet-selector-${t.id}`} 218 .installed=${!0} 219 tabIdx=${T(this.tabIdx)} 220 > 221 </wui-list-wallet> 222 `)} 223 </wui-flex> 224 `:(this.style.cssText="display: none",null)}onConnector(t){"walletConnect"===t.id?l.isMobile()?u.push("AllWallets"):u.push("ConnectingWalletConnect"):u.push("ConnectingExternal",{connector:t})}};V([I()],F.prototype,"tabIdx",void 0),V([P()],F.prototype,"connectors",void 0),F=V([E("w3m-connect-announced-widget")],F);var Y=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let G=class extends o{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=n.state.connectors,this.loading=!1,this.unsubscribe.push(n.subscribeKey("connectors",t=>this.connectors=t)),l.isTelegram()&&l.isIos()&&(this.loading=!p.state.wcUri,this.unsubscribe.push(p.subscribeKey("wcUri",t=>this.loading=!t)))}disconnectedCallback(){this.unsubscribe.forEach(t=>t())}render(){const{customWallets:t}=s.state;if(!(null==t?void 0:t.length))return this.style.cssText="display: none",null;const e=this.filterOutDuplicateWallets(t);
224return r`<wui-flex flexDirection="column" gap="xs"> 225 ${e.map(t=>r` 226 <wui-list-wallet 227 imageSrc=${T(h.getWalletImage(t))} 228 name=${t.name??"Unknown"} 229 @click=${()=>this.onConnectWallet(t)} 230 data-testid=${`wallet-selector-${t.id}`} 231 tabIdx=${T(this.tabIdx)} 232 ?loading=${this.loading} 233 > 234 </wui-list-wallet> 235 `)} 236 </wui-flex>`}filterOutDuplicateWallets(t){const e=g.getRecentWallets(),i=this.connectors.map(t=>{var e;return null==(e=t.info)?void 0:e.rdns}).filter(Boolean),o=e.map(t=>t.rdns).filter(Boolean),r=i.concat(o);if(r.includes("io.metamask.mobile")&&l.isMobile()){const t=r.indexOf("io.metamask.mobile");r[t]="io.metamask"}return t.filter(t=>!r.includes(String(null==t?void 0:t.rdns)))}onConnectWallet(t){this.loading||u.push("ConnectingWalletConnect",{wallet:t})}};Y([I()],G.prototype,"tabIdx",void 0),Y([P()],G.prototype,"connectors",void 0),Y([P()],G.prototype,"loading",void 0),G=Y([E("w3m-connect-custom-widget")],G);var J=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let Q=class extends o{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=n.state.connectors,this.unsubscribe.push(n.subscribeKey("connectors",t=>this.connectors=t))}disconnectedCallback(){this.unsubscribe.forEach(t=>t())}render(){const t=this.connectors.filter(t=>"EXTERNAL"===t.type).filter(d.showConnector).filter(t=>t.id!==w.CONNECTOR_ID.COINBASE_SDK);return(null==t?void 0:t.length)?r` 237 <wui-flex flexDirection="column" gap="xs"> 238 ${t.map(t=>r` 239 <wui-list-wallet 240 imageSrc=${T(h.getConnectorImage(t))} 241 .installed=${!0} 242 name=${t.name??"Unknown"} 243 data-testid=${`wallet-selector-external-${t.id}`} 244 @click=${()=>this.onConnector(t)} 245 tabIdx=${T(this.tabIdx)} 246 > 247 </wui-list-wallet> 248 `)} 249 </wui-flex> 250 `:(this.style.cssText="display: none",null)}onConnector(t){u.push("ConnectingExternal",{connector:t})}};J([I()],Q.prototype,"tabIdx",void 0),J([P()],Q.prototype,"connectors",void 0),Q=J([E("w3m-connect-external-widget")],Q);var X=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let Z=class extends o{constructor(){super(...arguments),this.tabIdx=void 0,this.wallets=[]}render(){return this.wallets.length?r` 251 <wui-flex flexDirection="column" gap="xs"> 252 ${this.wallets.map(t=>r` 253 <wui-list-wallet 254 data-testid=${`wallet-selector-featured-${t.id}`} 255 imageSrc=${T(h.getWalletImage(t))} 256 name=${t.name??"Unknown"} 257 @click=${()=>this.onConnectWallet(t)} 258 tabIdx=${T(this.tabIdx)} 259 > 260 </wui-list-wallet> 261 `)} 262 </wui-flex> 263 `:(this.style.cssText="display: none",null)}onConnectWallet(t){n.selectWalletConnector(t)}};X([I()],Z.prototype,"tabIdx",void 0),X([I()],Z.prototype,"wallets",void 0),Z=X([E("w3m-connect-featured-widget")],Z);var tt=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let et=class extends o{constructor(){super(...arguments),this.tabIdx=void 0,this.connectors=[]}render(){const t=this.connectors.filter(d.showConnector);return 0===t.length?(this.style.cssText="display: none",null):r` 264 <wui-flex flexDirection="column" gap="xs"> 265 ${t.map(t=>r` 266 <wui-list-wallet 267 imageSrc=${T(h.getConnectorImage(t))} 268 .installed=${!0} 269 name=${t.name??"Unknown"} 270 tagVariant="success" 271 tagLabel="installed" 272 data-testid=${`wallet-selector-${t.id}`} 273 @click=${()=>this.onConnector(t)} 274 tabIdx=${T(this.tabIdx)} 275 > 276 </wui-list-wallet> 277 `)} 278 </wui-flex> 279 `}
279onConnector(t){n.setActiveConnector(t),u.push("ConnectingExternal",{connector:t})}};tt([I()],et.prototype,"tabIdx",void 0),tt([I()],et.prototype,"connectors",void 0),et=tt([E("w3m-connect-injected-widget")],et);var it=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let ot=class extends o{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=n.state.connectors,this.unsubscribe.push(n.subscribeKey("connectors",t=>this.connectors=t))}disconnectedCallback(){this.unsubscribe.forEach(t=>t())}render(){const t=this.connectors.filter(t=>"MULTI_CHAIN"===t.type&&"WalletConnect"!==t.name);return(null==t?void 0:t.length)?r` 280 <wui-flex flexDirection="column" gap="xs"> 281 ${t.map(t=>r` 282 <wui-list-wallet 283 imageSrc=${T(h.getConnectorImage(t))} 284 .installed=${!0} 285 name=${t.name??"Unknown"} 286 tagVariant="shade" 287 tagLabel="multichain" 288 data-testid=${`wallet-selector-${t.id}`} 289 @click=${()=>this.onConnector(t)} 290 tabIdx=${T(this.tabIdx)} 291 > 292 </wui-list-wallet> 293 `)} 294 </wui-flex> 295 `:(this.style.cssText="display: none",null)}onConnector(t){n.setActiveConnector(t),u.push("ConnectingMultiChain")}};it([I()],ot.prototype,"tabIdx",void 0),it([P()],ot.prototype,"connectors",void 0),ot=it([E("w3m-connect-multi-chain-widget")],ot);var rt=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let nt=class extends o{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=n.state.connectors,this.loading=!1,this.unsubscribe.push(n.subscribeKey("connectors",t=>this.connectors=t)),l.isTelegram()&&l.isIos()&&(this.loading=!p.state.wcUri,this.unsubscribe.push(p.subscribeKey("wcUri",t=>this.loading=!t)))}render(){const t=g.getRecentWallets().filter(t=>!f.isExcluded(t)).filter(t=>!this.hasWalletConnector(t)).filter(t=>this.isWalletCompatibleWithCurrentChain(t));return t.length?r` 296 <wui-flex flexDirection="column" gap="xs"> 297 ${t.map(t=>r` 298 <wui-list-wallet 299 imageSrc=${T(h.getWalletImage(t))} 300 name=${t.name??"Unknown"} 301 @click=${()=>this.onConnectWallet(t)} 302 tagLabel="recent" 303 tagVariant="shade" 304 tabIdx=${T(this.tabIdx)} 305 ?loading=${this.loading} 306 > 307 </wui-list-wallet> 308 `)} 309 </wui-flex> 310 `:(this.style.cssText="display: none",null)}onConnectWallet(t){this.loading||n.selectWalletConnector(t)}hasWalletConnector(t){return this.connectors.some(e=>e.id===t.id||e.name===t.name)}isWalletCompatibleWithCurrentChain(t){const e=b.state.activeChain;return!e||!t.chains||t.chains.some(t=>{const i=t.split(":")[0];return e===i})}};rt([I()],nt.prototype,"tabIdx",void 0),rt([P()],nt.prototype,"connectors",void 0),rt([P()],nt.prototype,"loading",void 0),nt=rt([E("w3m-connect-recent-widget")],nt);var at=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let st=class extends o{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.wallets=[],this.loading=!1,l.isTelegram()&&l.isIos()&&(this.loading=!p.state.wcUri,this.unsubscribe.push(p.subscribeKey("wcUri",t=>this.loading=!t)))}render(){const{connectors:t}=n.state,{customWallets:e,featuredWalletIds:i}=s.state,o=g.getRecentWallets(),a=t.find(t=>"walletConnect"===t.id),l=t.filter(t=>"INJECTED"===t.type||"ANNOUNCED"===t.type||"MULTI_CHAIN"===t.type).filter(t=>"Browser Wallet"!==t.name);if(!a)return null;if(i||e||!this.wallets.length)return this.style.cssText="display: none",null;const c=l.length+o.length,u=Math.max(0,2-c),d=f.filterOutDuplicateWallets(this.wallets).slice(0,u);return d.length?r` 311 <wui-flex flexDirection="column" gap="xs"> 312 ${d.map(t=>r` 313 <wui-list-wallet 314 imageSrc=${T(h.getWalletImage(t))}
315 name=${(null==t?void 0:t.name)??"Unknown"} 316 @click=${()=>this.onConnectWallet(t)} 317 tabIdx=${T(this.tabIdx)} 318 ?loading=${this.loading} 319 > 320 </wui-list-wallet> 321 `)} 322 </wui-flex> 323 `:(this.style.cssText="display: none",null)}onConnectWallet(t){if(this.loading)return;const e=n.getConnector(t.id,t.rdns);e?u.push("ConnectingExternal",{connector:e}):u.push("ConnectingWalletConnect",{wallet:t})}};at([I()],st.prototype,"tabIdx",void 0),at([I()],st.prototype,"wallets",void 0),at([P()],st.prototype,"loading",void 0),st=at([E("w3m-connect-recommended-widget")],st);var lt=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let ct=class extends o{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=n.state.connectors,this.connectorImages=v.state.connectorImages,this.unsubscribe.push(n.subscribeKey("connectors",t=>this.connectors=t),v.subscribeKey("connectorImages",t=>this.connectorImages=t))}disconnectedCallback(){this.unsubscribe.forEach(t=>t())}render(){if(l.isMobile())return this.style.cssText="display: none",null;const t=this.connectors.find(t=>"walletConnect"===t.id);if(!t)return this.style.cssText="display: none",null;const e=t.imageUrl||this.connectorImages[(null==t?void 0:t.imageId)??""];return r` 324 <wui-list-wallet 325 imageSrc=${T(e)} 326 name=${t.name??"Unknown"} 327 @click=${()=>this.onConnector(t)} 328 tagLabel="qr code" 329 tagVariant="main" 330 tabIdx=${T(this.tabIdx)} 331 data-testid="wallet-selector-walletconnect" 332 > 333 </wui-list-wallet> 334 `}onConnector(t){n.setActiveConnector(t),u.push("ConnectingWalletConnect")}};lt([I()],ct.prototype,"tabIdx",void 0),lt([P()],ct.prototype,"connectors",void 0),lt([P()],ct.prototype,"connectorImages",void 0),ct=lt([E("w3m-connect-walletconnect-widget")],ct);const ut=t` 335 :host { 336 margin-top: var(--wui-spacing-3xs); 337 } 338 wui-separator { 339 margin: var(--wui-spacing-m) calc(var(--wui-spacing-m) * -1) var(--wui-spacing-xs) 340 calc(var(--wui-spacing-m) * -1); 341 width: calc(100% + var(--wui-spacing-s) * 2); 342 } 343`;var dt=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let ht=class extends o{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=n.state.connectors,this.recommended=a.state.recommended,this.featured=a.state.featured,this.unsubscribe.push(n.subscribeKey("connectors",t=>this.connectors=t),a.subscribeKey("recommended",t=>this.recommended=t),a.subscribeKey("featured",t=>this.featured=t))}disconnectedCallback(){this.unsubscribe.forEach(t=>t())}render(){return r` 344 <wui-flex flexDirection="column" gap="xs"> ${this.connectorListTemplate()} </wui-flex> 345 `}connectorListTemplate(){const{custom:t,recent:e,announced:i,injected:o,multiChain:n,recommended:a,featured:s,external:l}=d.getConnectorsByType(this.connectors,this.recommended,this.featured);return d.getConnectorTypeOrder({custom:t,recent:e,announced:i,injected:o,multiChain:n,recommended:a,featured:s,external:l}).map(t=>{switch(t){case"injected":return r` 346 ${n.length?r`<w3m-connect-multi-chain-widget 347 tabIdx=${T(this.tabIdx)} 348 ></w3m-connect-multi-chain-widget>`:null} 349 ${i.length?r`<w3m-connect-announced-widget 350 tabIdx=${T(this.tabIdx)} 351 ></w3m-connect-announced-widget>`:null} 352 ${o.length?r`<w3m-connect-injected-widget 353 .connectors=${o} 354 tabIdx=${T(this.tabIdx)} 355 ></w3m-connect-injected-widget>`:null} 356 `;
356case"walletConnect":return r`<w3m-connect-walletconnect-widget 357 tabIdx=${T(this.tabIdx)} 358 ></w3m-connect-walletconnect-widget>`;case"recent":return r`<w3m-connect-recent-widget 359 tabIdx=${T(this.tabIdx)} 360 ></w3m-connect-recent-widget>`;case"featured":return r`<w3m-connect-featured-widget 361 .wallets=${s} 362 tabIdx=${T(this.tabIdx)} 363 ></w3m-connect-featured-widget>`;case"custom":return r`<w3m-connect-custom-widget 364 tabIdx=${T(this.tabIdx)} 365 ></w3m-connect-custom-widget>`;case"external":return r`<w3m-connect-external-widget 366 tabIdx=${T(this.tabIdx)} 367 ></w3m-connect-external-widget>`;case"recommended":return r`<w3m-connect-recommended-widget 368 .wallets=${a} 369 tabIdx=${T(this.tabIdx)} 370 ></w3m-connect-recommended-widget>`;default:return null}})}};ht.styles=ut,dt([I()],ht.prototype,"tabIdx",void 0),dt([P()],ht.prototype,"connectors",void 0),dt([P()],ht.prototype,"recommended",void 0),dt([P()],ht.prototype,"featured",void 0),ht=dt([E("w3m-connector-list")],ht);const pt=t` 371 :host { 372 display: inline-flex; 373 background-color: var(--wui-color-gray-glass-002); 374 border-radius: var(--wui-border-radius-3xl); 375 padding: var(--wui-spacing-3xs); 376 position: relative; 377 height: 36px; 378 min-height: 36px; 379 overflow: hidden; 380 } 381 382 :host::before { 383 content: ''; 384 position: absolute; 385 pointer-events: none; 386 top: 4px; 387 left: 4px; 388 display: block; 389 width: var(--local-tab-width); 390 height: 28px; 391 border-radius: var(--wui-border-radius-3xl); 392 background-color: var(--wui-color-gray-glass-002); 393 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002); 394 transform: translateX(calc(var(--local-tab) * var(--local-tab-width))); 395 transition: transform var(--wui-ease-out-power-1) var(--wui-duration-md); 396 will-change: background-color, opacity; 397 } 398 399 :host([data-type='flex'])::before { 400 left: 3px; 401 transform: translateX(calc((var(--local-tab) * 34px) + (var(--local-tab) * 4px))); 402 } 403 404 :host([data-type='flex']) { 405 display: flex; 406 padding: 0px 0px 0px 12px; 407 gap: 4px; 408 } 409 410 :host([data-type='flex']) > button > wui-text { 411 position: absolute; 412 left: 18px; 413 opacity: 0; 414 } 415 416 button[data-active='true'] > wui-icon, 417 button[data-active='true'] > wui-text { 418 color: var(--wui-color-fg-100); 419 } 420 421 button[data-active='false'] > wui-icon, 422 button[data-active='false'] > wui-text { 423 color: var(--wui-color-fg-200); 424 } 425 426 button[data-active='true']:disabled, 427 button[data-active='false']:disabled { 428 background-color: transparent; 429 opacity: 0.5; 430 cursor: not-allowed; 431 } 432 433 button[data-active='true']:disabled > wui-text { 434 color: var(--wui-color-fg-200); 435 } 436 437 button[data-active='false']:disabled > wui-text { 438 color: var(--wui-color-fg-300); 439 } 440 441 button > wui-icon, 442 button > wui-text { 443 pointer-events: none; 444 transition: color var(--wui-e ase-out-power-1) var(--wui-duration-md); 445 will-change: color; 446 } 447 448 button { 449 width: var(--local-tab-width); 450 transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md); 451 will-change: background-color; 452 } 453 454 :host([data-type='flex']) > button { 455 width: 34px; 456 position: relative; 457 display: flex; 458 justify-content: flex-start; 459 } 460 461 button:hover:enabled, 462 button:active:enabled { 463 background-color: transparent !important; 464 } 465 466 button:hover:enabled > wui-icon, 467 button:active:enabled > wui-icon { 468 transition: all var(--wui-ease-out-power-1) var(--wui-duration-lg); 469 color: var(--wui-color-fg-125); 470 } 471 472 button:hover:enabled > wui-text, 473 button:active:enabled > wui-text { 474 transition: all var(--wui-ease-out-power-1) var(--wui-duration-lg); 475 color: var(--wui-color-fg-125); 476 } 477 478 button { 479 border-radius: var(--wui-border-radius-3xl); 480 } 481`;var gt=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let wt=class extends o{constructor(){super(...arguments),this.tabs=[],this.onTabChange=()=>null,this.buttons=[],this.disabled=!1,this.localTabWidth="100px",this.activeTab=0,this.isDense=!1}render(){return this.isDense=this.tabs.length>3,this.style.cssText=`\n --local-tab: ${this.activeTab};\n --local-tab-width: ${this.localTabWidth};\n `,this.dataset.type=this.isDense?"flex":"block",this.tabs.map((t,e)=>{var i;const o=e===this.activeTab;return r` 482 <button 483 ?disabled=${this.disabled} 484 @click=${()=>this.onTabClick(e)} 485 data-active=${o} 486 data-testid="tab-${null==(i=t.label)?void 0:i.toLowerCase()}" 487 > 488 ${this.iconTemplate(t)}
488 489 <wui-text variant="small-600" color="inherit"> ${t.label} </wui-text> 490 </button> 491 `})}firstUpdated(){this.shadowRoot&&this.isDense&&(this.buttons=[...this.shadowRoot.querySelectorAll("button")],setTimeout(()=>{this.animateTabs(0,!0)},0))}iconTemplate(t){return t.icon?r`<wui-icon size="xs" color="inherit" name=${t.icon}></wui-icon>`:null}onTabClick(t){this.buttons&&this.animateTabs(t,!1),this.activeTab=t,this.onTabChange(t)}animateTabs(t,e){const i=this.buttons[this.activeTab],o=this.buttons[t],r=null==i?void 0:i.querySelector("wui-text"),n=null==o?void 0:o.querySelector("wui-text"),a=null==o?void 0:o.getBoundingClientRect(),s=null==n?void 0:n.getBoundingClientRect();i&&r&&!e&&t!==this.activeTab&&(r.animate([{opacity:0}],{duration:50,easing:"ease",fill:"forwards"}),i.animate([{width:"34px"}],{duration:500,easing:"ease",fill:"forwards"})),o&&a&&s&&n&&(t!==this.activeTab||e)&&(this.localTabWidth=`${Math.round(a.width+s.width)+6}px`,o.animate([{width:`${a.width+s.width}px`}],{duration:e?0:500,fill:"forwards",easing:"ease"}),n.animate([{opacity:1}],{duration:e?0:125,delay:e?0:200,fill:"forwards",easing:"ease"}))}};wt.styles=[i,e,pt],gt([I({type:Array})],wt.prototype,"tabs",void 0),gt([I()],wt.prototype,"onTabChange",void 0),gt([I({type:Array})],wt.prototype,"buttons",void 0),gt([I({type:Boolean})],wt.prototype,"disabled",void 0),gt([I()],wt.prototype,"localTabWidth",void 0),gt([P()],wt.prototype,"activeTab",void 0),gt([P()],wt.prototype,"isDense",void 0),wt=gt([E("wui-tabs")],wt);var ft=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let bt=class extends o{constructor(){super(...arguments),this.platformTabs=[],this.unsubscribe=[],this.platforms=[],this.onSelectPlatfrom=void 0}disconnectCallback(){this.unsubscribe.forEach(t=>t())}render(){const t=this.generateTabs();return r` 492 <wui-flex justifyContent="center" .padding=${["0","0","l","0"]}> 493 <wui-tabs .tabs=${t} .onTabChange=${this.onTabChange.bind(this)}></wui-tabs> 494 </wui-flex> 495 `}generateTabs(){const t=this.platforms.map(t=>"browser"===t?{label:"Browser",icon:"extension",platform:"browser"}:"mobile"===t?{label:"Mobile",icon:"mobile",platform:"mobile"}:"qrcode"===t?{label:"Mobile",icon:"mobile",platform:"qrcode"}:"web"===t?{label:"Webapp",icon:"browser",platform:"web"}:"desktop"===t?{label:"Desktop",icon:"desktop",platform:"desktop"}:{label:"Browser",icon:"extension",platform:"unsupported"});return this.platformTabs=t.map(({platform:t})=>t),t}onTabChange(t){var e;const i=this.platformTabs[t];i&&(null==(e=this.onSelectPlatfrom)||e.call(this,i))}};ft([I({type:Array})],bt.prototype,"platforms",void 0),ft([I()],bt.prototype,"onSelectPlatfrom",void 0),bt=ft([E("w3m-connecting-header")],bt);const vt=t` 496 :host { 497 width: var(--local-width); 498 position: relative; 499 } 500 501 button { 502 border: none; 503 border-radius: var(--local-border-radius); 504 width: var(--local-width); 505 white-space: nowrap; 506 } 507 508 /* -- Sizes --------------------------------------------------- */ 509 button[data-size='md'] { 510 padding: 8.2px var(--wui-spacing-l) 9px var(--wui-spacing-l); 511 height: 36px; 512 } 513 514 button[data-size='md'][data-icon-left='true'][data-icon-right='false'] { 515 padding: 8.2px var(--wui-spacing-l) 9px var(--wui-spacing-s); 516 } 517 518 button[data-size='md'][data-icon-right='true'][data-icon-left='false'] { 519 padding: 8.2px var(--wui-spacing-s) 9px var(--wui-spacing-l); 520 } 521 522 button[data-size='lg'] { 523 padding: var(--wui-spacing-m) var(--wui-spacing-2l); 524 height: 48px; 525 } 526 527 /* -- Variants --------------------------------------------------------- */ 528 button[data-variant='main'] { 529 background-color: var(--wui-color-accent-100); 530 color: var(--wui-color-inverse-100); 531 border: none; 532 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010); 533 } 534 535 button[data-variant='inverse'] { 536 background-color: var(--wui-color-inverse-100); 537 color: var(--wui-color-inverse-000); 538 border: none; 539 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010); 540 } 541 542 button[data-variant='accent'] { 543 background-color: var(--wui-color-accent-glass-010); 544 color: var(--wui-color-accent-100); 545 border: none; 546 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005); 547 } 548 549 button[data-variant='accent-error'] { 550 background: var(--wui-color-error-glass-015); 551 color: var(--wui-color-error-100); 552 border: none; 553 box-shadow: inset 0 0 0 1px var(--wui-color-error-glass-010); 554 } 555 556 button[data-variant='accent-success'] { 557 background: var(--wui-color-success-glass-015); 558 color: var(--wui-color-success-100); 559 border: none; 560 box-shadow: inset 0 0 0 1px var(--wui-color-success-glass-010); 561 } 562 563 button[data-variant='neutral'] { 564 background: transparent; 565 color: var(--wui-color-fg-100); 566 border: none; 567 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005); 568 } 569 570 /* -- Focus states --------------------------------------------------- */ 571 button[data-variant='main']:focus-visible:enabled { 572 background-color: var(--wui-color-accent-090); 573 box-shadow: 574 inset 0 0 0 1px var(--wui-color-accent-100), 575 0 0 0 4px var(--wui-color-accent-glass-020); 576 } 577 button[data-variant='inverse']:focus-visible:enabled { 578 background-color: var(--wui-color-inverse-100); 579 box-shadow: 580 inset 0 0 0 1px var(--wui-color-gray-glass-010), 581 0 0 0 4px var(--wui-color-accent-glass-020); 582 } 583 button[data-variant='accent']:focus-visible:enabled { 584 background-color: var(--wui-color-accent-glass-010); 585 box-shadow: 586 inset 0 0 0 1px var(--wui-color-accent-100), 587 0 0 0 4px var(--wui-color-accent-glass-020); 588 } 589 button[data-variant='accent-error']:focus-visible:enabled { 590 background: var(--wui-color-error-glass-015); 591 box-shadow: 592 inset 0 0 0 1px var(--wui-color-error-100), 593 0 0 0 4px var(--wui-color-error-glass-020); 594 } 595 button[data-variant='accent-success']:focus-visible:enabled { 596 background: var(--wui-color-success-glass-015); 597 box-shadow: 598 inset 0 0 0 1px var(--wui-color-success-100), 599 0 0 0 4px var(--wui-color-success-glass-020); 600 } 601 button[data-variant='neutral']:focus-visible:enabled { 602 background: var(--wui-color-gray-glass-005); 603 box-shadow: 604 inset 0 0 0 1px var(--wui-color-gray-glass-010), 605 0 0 0 4px var(--wui-color-gray-glass-002); 606 } 607 608 /* -- Hover & Active states ----------------------------------------------------------- */ 609 @media (hover: hover) and (pointer: fine) { 610 button[data-variant='main']:hover:enabled { 611 background-color: var(--wui-color-accent-090); 612 } 613 614 button[data-variant='main']:active:enabled { 615 background-color: var(--wui-color-accent-080); 616 } 617 618 button[data-variant='accent']:hover:enabled { 619 background-color: var(--wui-color-accent-glass-015); 620 } 621 622 button[data-variant='accent']:active:enabled { 623 background-color: var(--wui-color-accent-glass-020); 624 } 625 626 button[data-variant='accent-error']:hover:enabled { 627 background: var(--wui-color-error-glass-020); 628 color: var(--wui-color-error-100); 629 } 630 631 button[data-variant='accent-error']:active:enabled { 632 background: var(--wui-color-error-glass-030); 633 color: var(--wui-color-error-100); 634 } 635 636 button[data-variant='accent-success']:hover:enabled { 637 background: var(--wui-color-success-glass-020); 638 color: var(--wui-color-success-100); 639 } 640 641 button[data-variant='accent-success']:active:enabled { 642 background: var(--wui-color-success-glass-030); 643 color: var(--wui-color-success-100); 644 } 645 646 button[data-variant='neutral']:hover:enabled { 647 background: var(--wui-color-gray-glass-002); 648 } 649 650 button[data-variant='neutral']:active:enabled { 651 background: var(--wui-color-gray-glass-005); 652 } 653 654 button[data-size='lg'][data-icon-left='true'][data-icon-right='false'] { 655 padding-left: var(--wui-spacing-m); 656 } 657 658 button[data-size='lg'][data-icon-right='true'][data-icon-left='false'] { 659 padding-right: var(--wui-spacing-m); 660 } 661 } 662 663 /* -- Disabled state --------------------------------------------------- */ 664 button:disabled { 665 background-color: var(--wui-color-gray-glass-002); 666 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002); 667 color: var(--wui-color-gray-glass-020);
668 cursor: not-allowed; 669 } 670 671 button > wui-text { 672 transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md); 673 will-change: opacity; 674 opacity: var(--local-opacity-100); 675 } 676 677 ::slotted(*) { 678 transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md); 679 will-change: opacity; 680 opacity: var(--local-opacity-100); 681 } 682 683 wui-loading-spinner { 684 position: absolute; 685 left: 50%; 686 top: 50%; 687 transform: translate(-50%, -50%); 688 opacity: var(--local-opacity-000); 689 } 690`;var mt=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const yt={main:"inverse-100",inverse:"inverse-000",accent:"accent-100","accent-error":"error-100","accent-success":"success-100",neutral:"fg-100",disabled:"gray-glass-020"},xt={lg:"paragraph-600",md:"small-600"},$t={lg:"md",md:"md"};let kt=class extends o{constructor(){super(...arguments),this.size="lg",this.disabled=!1,this.fullWidth=!1,this.loading=!1,this.variant="main",this.hasIconLeft=!1,this.hasIconRight=!1,this.borderRadius="m"}render(){this.style.cssText=`\n --local-width: ${this.fullWidth?"100%":"auto"};\n --local-opacity-100: ${this.loading?0:1};\n --local-opacity-000: ${this.loading?1:0};\n --local-border-radius: var(--wui-border-radius-${this.borderRadius});\n `;const t=this.textVariant??xt[this.size];return r` 691 <button 692 data-variant=${this.variant} 693 data-icon-left=${this.hasIconLeft} 694 data-icon-right=${this.hasIconRight} 695 data-size=${this.size} 696 ?disabled=${this.disabled} 697 > 698 ${this.loadingTemplate()} 699 <slot name="iconLeft" @slotchange=${()=>this.handleSlotLeftChange()}></slot> 700 <wui-text variant=${t} color="inherit"> 701 <slot></slot> 702 </wui-text> 703 <slot name="iconRight" @slotchange=${()=>this.handleSlotRightChange()}></slot> 704 </button> 705 `}handleSlotLeftChange(){this.hasIconLeft=!0}handleSlotRightChange(){this.hasIconRight=!0}loadingTemplate(){if(this.loading){const t=$t[this.size],e=this.disabled?yt.disabled:yt[this.variant];return r`<wui-loading-spinner color=${e} size=${t}></wui-loading-spinner>`}return r``}};kt.styles=[i,e,vt],mt([I()],kt.prototype,"size",void 0),mt([I({type:Boolean})],kt.prototype,"disabled",void 0),mt([I({type:Boolean})],kt.prototype,"fullWidth",void 0),mt([I({type:Boolean})],kt.prototype,"loading",void 0),mt([I()],kt.prototype,"variant",void 0),mt([I({type:Boolean})],kt.prototype,"hasIconLeft",void 0),mt([I({type:Boolean})],kt.prototype,"hasIconRight",void 0),mt([I()],kt.prototype,"borderRadius",void 0),mt([I()],kt.prototype,"textVariant",void 0),kt=mt([E("wui-button")],kt);const Ct=t` 706 button { 707 padding: var(--wui-spacing-4xs) var(--wui-spacing-xxs); 708 border-radius: var(--wui-border-radius-3xs); 709 background-color: transparent; 710 color: var(--wui-color-accent-100); 711 } 712 713 button:disabled { 714 background-color: transparent; 715 color: var(--wui-color-gray-glass-015); 716 } 717 718 button:hover { 719 background-color: var(--wui-color-gray-glass-005); 720 } 721`;var Rt=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let It=class extends o{constructor(){super(...arguments),this.tabIdx=void 0,this.disabled=!1,this.color="inherit"}render(){return r` 722 <button ?disabled=${this.disabled} tabindex=${T(this.tabIdx)}> 723 <slot name="iconLeft"></slot> 724 <wui-text variant="small-600" color=${this.color}> 725 <slot></slot> 726 </wui-text> 727 <slot name="iconRight"></slot> 728 </button> 729 `}};It.styles=[i,e,Ct],Rt([I()],It.prototype,"tabIdx",void 0),Rt([I({type:Boolean})],It.prototype,"disabled",void 0),Rt([I()],It.prototype,"color",void 0),It=Rt([E("wui-link")],It);const Et=t` 730 :host { 731 display: block; 732 width: var(--wui-box-size-md); 733 height: var(--wui-box-size-md); 734 } 735 736 svg { 737 width: var(--wui-box-size-md); 738 height: var(--wui-box-size-md); 739 } 740 741 rect { 742 fill: none; 743 stroke: var(--wui-color-accent-100); 744 stroke-width: 4px; 745 stroke-linecap: round; 746 animation: dash 1s linear infinite; 747 } 748 749 @keyframes dash { 750 to { 751 stroke-dashoffset: 0px; 752 } 753 } 754`;
754var Tt=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let Pt=class extends o{constructor(){super(...arguments),this.radius=36}render(){return this.svgLoaderTemplate()}svgLoaderTemplate(){const t=this.radius>50?50:this.radius,e=36-t;return r` 755 <svg viewBox="0 0 110 110" width="110" height="110"> 756 <rect 757 x="2" 758 y="2" 759 width="106" 760 height="106" 761 rx=${t} 762 stroke-dasharray="${116+e} ${245+e}" 763 stroke-dashoffset=${360+1.75*e} 764 /> 765 </svg> 766 `}};Pt.styles=[i,Et],Tt([I({type:Number})],Pt.prototype,"radius",void 0),Pt=Tt([E("wui-loading-thumbnail")],Pt);const jt=t` 767 button { 768 border: none; 769 border-radius: var(--wui-border-radius-3xl); 770 } 771 772 button[data-variant='main'] { 773 background-color: var(--wui-color-accent-100); 774 color: var(--wui-color-inverse-100); 775 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010); 776 } 777 778 button[data-variant='accent'] { 779 background-color: var(--wui-color-accent-glass-010); 780 color: var(--wui-color-accent-100); 781 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005); 782 } 783 784 button[data-variant='gray'] { 785 background-color: transparent; 786 color: var(--wui-color-fg-200); 787 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010); 788 } 789 790 button[data-variant='shade'] { 791 background-color: transparent; 792 color: var(--wui-color-accent-100); 793 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010); 794 } 795 796 button[data-size='sm'] { 797 height: 32px; 798 padding: 0 var(--wui-spacing-s); 799 } 800 801 button[data-size='md'] { 802 height: 40px; 803 padding: 0 var(--wui-spacing-l); 804 } 805 806 button[data-size='sm'] > wui-image { 807 width: 16px; 808 height: 16px; 809 } 810 811 button[data-size='md'] > wui-image { 812 width: 24px; 813 height: 24px; 814 } 815 816 button[data-size='sm'] > wui-icon { 817 width: 12px; 818 height: 12px; 819 } 820 821 button[data-size='md'] > wui-icon { 822 width: 14px; 823 height: 14px; 824 } 825 826 wui-image { 827 border-radius: var(--wui-border-radius-3xl); 828 overflow: hidden; 829 } 830 831 button.disabled > wui-icon, 832 button.disabled > wui-image { 833 filter: grayscale(1); 834 } 835 836 button[data-variant='main'] > wui-image { 837 box-shadow: inset 0 0 0 1px var(--wui-color-accent-090); 838 } 839 840 button[data-variant='shade'] > wui-image, 841 button[data-variant='gray'] > wui-image { 842 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010); 843 } 844 845 @media (hover: hover) and (pointer: fine) { 846 button[data-variant='main']:focus-visible { 847 background-color: var(--wui-color-accent-090); 848 } 849 850 button[data-variant='main']:hover:enabled { 851 background-color: var(--wui-color-accent-090); 852 } 853 854 button[data-variant='main']:active:enabled { 855 background-color: var(--wui-color-accent-080); 856 } 857 858 button[data-variant='accent']:hover:enabled { 859 background-color: var(--wui-color-accent-glass-015); 860 } 861 862 button[data-variant='accent']:active:enabled { 863 background-color: var(--wui-color-accent-glass-020); 864 } 865 866 button[data-variant='shade']:focus-visible, 867 button[data-variant='gray']:focus-visible, 868 button[data-variant='shade']:hover, 869 button[data-variant='gray']:hover { 870 background-color: var(--wui-color-gray-glass-002); 871 } 872 873 button[data-variant='gray']:active, 874 button[data-variant='shade']:active { 875 background-color: var(--wui-color-gray-glass-005); 876 } 877 } 878 879 button.disabled { 880 color: var(--wui-color-gray-glass-020); 881 background-color: var(--wui-color-gray-glass-002); 882 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002); 883 pointer-events: none; 884 } 885`;var Ot=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let St=class extends o{constructor(){super(...arguments),this.variant="accent",this.imageSrc="",this.disabled=!1,this.icon="externalLink",this.size="md",this.text=""}render(){const t="sm"===this.size?"small-600":"paragraph-600";return r` 886 <button 887 class=${this.disabled?"disabled":""} 888 data-variant=${this.variant} 889 data-size=${this.size} 890 > 891 ${this.imageSrc?r`<wui-image src=${this.imageSrc}></wui-image>`:null} 892 <wui-text variant=${t} color="inherit"> ${this.text} </wui-text> 893 <wui-icon name=${this.icon} color="inherit" size="inherit"></wui-icon> 894 </button> 895 `}};St.styles=[i,e,jt],Ot([I()],St.prototype,"variant",void 0),Ot([I()],St.prototype,"imageSrc",void 0),Ot([I({type:Boolean})],St.prototype,"disabled",void 0),Ot([I()],St.prototype,"icon",void 0),Ot([I()],St.prototype,"size",void 0),Ot([I()],St.prototype,"text",void 0),St=Ot([E("wui-chip-button")],St);const Lt=t` 896 wui-flex { 897 width: 100%; 898 background-color: var(--wui-color-gray-glass-002); 899 border-radius: var(--wui-border-radius-xs); 900 } 901`;
901var zt=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let At=class extends o{constructor(){super(...arguments),this.disabled=!1,this.label="",this.buttonLabel=""}render(){return r` 902 <wui-flex 903 justifyContent="space-between" 904 alignItems="center" 905 .padding=${["1xs","2l","1xs","2l"]} 906 > 907 <wui-text variant="paragraph-500" color="fg-200">${this.label}</wui-text> 908 <wui-chip-button size="sm" variant="shade" text=${this.buttonLabel} icon="chevronRight"> 909 </wui-chip-button> 910 </wui-flex> 911 `}};At.styles=[i,e,Lt],zt([I({type:Boolean})],At.prototype,"disabled",void 0),zt([I()],At.prototype,"label",void 0),zt([I()],At.prototype,"buttonLabel",void 0),At=zt([E("wui-cta-button")],At);const Bt=t` 912 :host { 913 display: block; 914 padding: 0 var(--wui-spacing-xl) var(--wui-spacing-xl); 915 } 916`;var Wt=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let Dt=class extends o{constructor(){super(...arguments),this.wallet=void 0}render(){if(!this.wallet)return this.style.display="none",null;const{name:t,app_store:e,play_store:i,chrome_store:o,homepage:n}=this.wallet,a=l.isMobile(),s=l.isIos(),c=l.isAndroid(),d=[e,i,n,o].filter(Boolean).length>1,h=j.getTruncateString({string:t,charsStart:12,charsEnd:0,truncate:"end"});return d&&!a?r` 917 <wui-cta-button 918 label=${`Don't have ${h}?`} 919 buttonLabel="Get" 920 @click=${()=>u.push("Downloads",{wallet:this.wallet})} 921 ></wui-cta-button> 922 `:!d&&n?r` 923 <wui-cta-button 924 label=${`Don't have ${h}?`} 925 buttonLabel="Get" 926 @click=${this.onHomePage.bind(this)} 927 ></wui-cta-button> 928 `:e&&s?r` 929 <wui-cta-button 930 label=${`Don't have ${h}?`} 931 buttonLabel="Get" 932 @click=${this.onAppStore.bind(this)} 933 ></wui-cta-button> 934 `:i&&c?r` 935 <wui-cta-button 936 label=${`Don't have ${h}?`} 937 buttonLabel="Get" 938 @click=${this.onPlayStore.bind(this)} 939 ></wui-cta-button> 940 `:(this.style.display="none",null)}onAppStore(){var t;(null==(t=this.wallet)?void 0:t.app_store)&&l.openHref(this.wallet.app_store,"_blank")}onPlayStore(){var t;(null==(t=this.wallet)?void 0:t.play_store)&&l.openHref(this.wallet.play_store,"_blank")}onHomePage(){var t;(null==(t=this.wallet)?void 0:t.homepage)&&l.openHref(this.wallet.homepage,"_blank")}};Dt.styles=[Bt],Wt([I({type:Object})],Dt.prototype,"wallet",void 0),Dt=Wt([E("w3m-mobile-download-links")],Dt);const Nt=t` 941 @keyframes shake { 942 0% { 943 transform: translateX(0); 944 } 945 25% { 946 transform: translateX(3px); 947 } 948 50% { 949 transform: translateX(-3px); 950 } 951 75% { 952 transform: translateX(3px); 953 } 954 100% { 955 transform: translateX(0); 956 } 957 } 958 959 wui-flex:first-child:not(:only-child) { 960 position: relative; 961 } 962 963 wui-loading-thumbnail { 964 position: absolute; 965 } 966 967 wui-icon-box { 968 position: absolute; 969 right: calc(var(--wui-spacing-3xs) * -1); 970 bottom: calc(var(--wui-spacing-3xs) * -1); 971 opacity: 0; 972 transform: scale(0.5); 973 transition-property: opacity, transform; 974 transition-duration: var(--wui-duration-lg); 975 transition-timing-function: var(--wui-ease-out-power-2); 976 will-change: opacity, transform; 977 } 978 979 wui-text[align='center'] { 980 width: 100%; 981 padding: 0px var(--wui-spacing-l); 982 } 983 984 [data-error='true'] wui-icon-box { 985 opacity: 1; 986 transform: scale(1); 987 } 988 989 [data-error='true'] > wui-flex:first-child { 990 animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both; 991 } 992 993 [data-retry='false'] wui-link { 994 display: none; 995 } 996 997 [data-retry='true'] wui-link { 998 display: block; 999 opacity: 1; 1000 } 1001`;
1001var Mt=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class Ut extends o{constructor(){var t,e,i,o,r;super(),this.wallet=null==(t=u.state.data)?void 0:t.wallet,this.connector=null==(e=u.state.data)?void 0:e.connector,this.timeout=void 0,this.secondaryBtnIcon="refresh",this.onConnect=void 0,this.onRender=void 0,this.onAutoConnect=void 0,this.isWalletConnect=!0,this.unsubscribe=[],this.imageSrc=h.getWalletImage(this.wallet)??h.getConnectorImage(this.connector),this.name=(null==(i=this.wallet)?void 0:i.name)??(null==(o=this.connector)?void 0:o.name)??"Wallet",this.isRetrying=!1,this.uri=p.state.wcUri,this.error=p.state.wcError,this.ready=!1,this.showRetry=!1,this.secondaryBtnLabel="Try again",this.secondaryLabel="Accept connection request in the wallet",this.isLoading=!1,this.isMobile=!1,this.onRetry=void 0,this.unsubscribe.push(p.subscribeKey("wcUri",t=>{var e;this.uri=t,this.isRetrying&&this.onRetry&&(this.isRetrying=!1,null==(e=this.onConnect)||e.call(this))}),p.subscribeKey("wcError",t=>this.error=t)),(l.isTelegram()||l.isSafari())&&l.isIos()&&p.state.wcUri&&(null==(r=this.onConnect)||r.call(this))}firstUpdated(){var t;null==(t=this.onAutoConnect)||t.call(this),this.showRetry=!this.onAutoConnect}disconnectedCallback(){this.unsubscribe.forEach(t=>t()),p.setWcError(!1),clearTimeout(this.timeout)}render(){var t;null==(t=this.onRender)||t.call(this),this.onShowRetry();const e=this.error?"Connection can be declined if a previous request is still active":this.secondaryLabel;let i=`Continue in ${this.name}`;return this.error&&(i="Connection declined"),r` 1002 <wui-flex 1003 data-error=${T(this.error)} 1004 data-retry=${this.showRetry} 1005 flexDirection="column" 1006 alignItems="center" 1007 .padding=${["3xl","xl","xl","xl"]} 1008 gap="xl" 1009 > 1010 <wui-flex justifyContent="center" alignItems="center"> 1011 <wui-wallet-image size="lg" imageSrc=${T(this.imageSrc)}></wui-wallet-image> 1012 1013 ${this.error?null:this.loaderTemplate()} 1014 1015 <wui-icon-box 1016 backgroundColor="error-100" 1017 background="opaque" 1018 iconColor="error-100" 1019 icon="close" 1020 size="sm" 1021 border 1022 borderColor="wui-color-bg-125" 1023 ></wui-icon-box> 1024 </wui-flex> 1025 1026 <wui-flex flexDirection="column" alignItems="center" gap="xs"> 1027 <wui-text variant="paragraph-500" color=${this.error?"error-100":"fg-100"}> 1028 ${i} 1029 </wui-text> 1030 <wui-text align="center" variant="small-500" color="fg-200">${e}</wui-text> 1031 </wui-flex> 1032 1033 ${this.secondaryBtnLabel?r` 1034 <wui-button 1035 variant="accent" 1036 size="md" 1037 ?disabled=${this.isRetrying||this.isLoading} 1038 @click=${this.onTryAgain.bind(this)} 1039 data-testid="w3m-connecting-widget-secondary-button" 1040 > 1041 <wui-icon color="inherit" slot="iconLeft" name=${this.secondaryBtnIcon}></wui-icon> 1042 ${this.secondaryBtnLabel} 1043 </wui-button> 1044 `:null} 1045 </wui-flex> 1046 1047 ${this.isWalletConnect?r` 1048 <wui-flex .padding=${["0","xl","xl","xl"]} justifyContent="center"> 1049 <wui-link @click=${this.onCopyUri} color="fg-200" data-testid="wui-link-copy"> 1050 <wui-icon size="xs" color="fg-200" slot="iconLeft" name="copy"></wui-icon> 1051 Copy link 1052 </wui-link> 1053 </wui-flex> 1054 `:null} 1055 1056 <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links> 1057 `}onShowRetry(){var t;if(this.error&&!this.showRetry){this.showRetry=!0;const e=null==(t=this.shadowRoot)?void 0:t.querySelector("wui-button");null==e||e.animate([{opacity:0},{opacity:1}],{fill:"forwards",easing:"ease"})}}onTryAgain(){var t,e;p.setWcError(!1),this.onRetry?(this.isRetrying=!0,null==(t=this.onRetry)||t.call(this)):null==(e=this.onConnect)||e.call(this)}loaderTemplate(){const t=m.state.themeVariables["--w3m-border-radius-master"],e=t?parseInt(t.replace("px",""),10):4;
1057return r`<wui-loading-thumbnail radius=${9*e}></wui-loading-thumbnail>`}onCopyUri(){try{this.uri&&(l.copyToClopboard(this.uri),y.showSuccess("Link copied"))}catch{y.showError("Failed to copy")}}}Ut.styles=Nt,Mt([P()],Ut.prototype,"isRetrying",void 0),Mt([P()],Ut.prototype,"uri",void 0),Mt([P()],Ut.prototype,"error",void 0),Mt([P()],Ut.prototype,"ready",void 0),Mt([P()],Ut.prototype,"showRetry",void 0),Mt([P()],Ut.prototype,"secondaryBtnLabel",void 0),Mt([P()],Ut.prototype,"secondaryLabel",void 0),Mt([P()],Ut.prototype,"isLoading",void 0),Mt([I({type:Boolean})],Ut.prototype,"isMobile",void 0),Mt([I()],Ut.prototype,"onRetry",void 0);let _t=class extends Ut{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-browser: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onAutoConnect=this.onConnectProxy.bind(this),c.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser"}})}async onConnectProxy(){var t;try{this.error=!1;const{connectors:e}=n.state,i=e.find(t=>{var e,i,o;return"ANNOUNCED"===t.type&&(null==(e=t.info)?void 0:e.rdns)===(null==(i=this.wallet)?void 0:i.rdns)||"INJECTED"===t.type||t.name===(null==(o=this.wallet)?void 0:o.name)});if(!i)throw new Error("w3m-connecting-wc-browser: No connector found");await p.connectExternal(i,i.chain),x.close(),c.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"browser",name:(null==(t=this.wallet)?void 0:t.name)||"Unknown"}})}catch(e){c.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:(null==e?void 0:e.message)??"Unknown"}}),this.error=!0}}};_t=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a}([E("w3m-connecting-wc-browser")],_t);let qt=class extends Ut{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-desktop: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onRender=this.onRenderProxy.bind(this),c.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"desktop"}})}onRenderProxy(){var t;!this.ready&&this.uri&&(this.ready=!0,null==(t=this.onConnect)||t.call(this))}onConnectProxy(){var t;if((null==(t=this.wallet)?void 0:t.desktop_link)&&this.uri)try{this.error=!1;const{desktop_link:t,name:e}=this.wallet,{redirect:i,href:o}=l.formatNativeUrl(t,this.uri);p.setWcLinking({name:e,href:o}),p.setRecentWallet(this.wallet),l.openHref(i,"_blank")}catch{this.error=!0}}};qt=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a}([E("w3m-connecting-wc-desktop")],qt);var Kt=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let Ht=class extends Ut{constructor(){if(super(),this.btnLabelTimeout=void 0,this.redirectDeeplink=void 0,this.redirectUniversalLink=void 0,this.target=void 0,this.preferUniversalLinks=s.state.experimental_preferUniversalLinks,this.isLoading=!0,this.onConnect=()=>{var t;if((null==(t=this.wallet)?void 0:t.mobile_link)&&this.uri)try{this.error=!1;const{mobile_link:t,link_mode:e,name:i}=this.wallet,{redirect:o,redirectUniversalLink:r,href:n}=l.formatNativeUrl(t,this.uri,e);this.redirectDeeplink=o,this.redirectUniversalLink=r,this.target=l.isIframe()?"_top":"_self",p.setWcLinking({name:i,href:n}),p.setRecentWallet(this.wallet),this.preferUniversalLinks&&this.redirectUniversalLink?l.openHref(this.redirectUniversalLink,this.target):l.openHref(this.redirectDeeplink,this.target)}catch(e){c.sendEvent({type:"track",event:"CONNECT_PROXY_ERROR",properties:{message:e instanceof Error?e.message:"Error parsing the deeplink",uri:this.uri,mobile_link:this.wallet.mobile_link,name:this.wallet.name}}),this.error=!0}},!this.wallet)throw new Error("w3m-connecting-wc-mobile: No wallet provided");this.secondaryBtnLabel="Open",this.secondaryLabel=$.CONNECT_LABELS.MOBILE,this.secondaryBtnIcon="externalLink",this.onHandleURI(),this.unsubscribe.push(p.subscribeKey("wcUri",()=>{this.onHandleURI()})),c.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"mobile"}})}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.btnLabelTimeout)}onHandleURI(){var t;this.isLoading=!this.uri,!this.ready&&this.uri&&(this.ready=!0,null==(t=this.onConnect)||t.call(this))}onTryAgain(){var t;p.setWcError(!1),null==(t=this.onConnect)||t.call(this)}};Kt([P()],Ht.prototype,"redirectDeeplink",void 0),Kt([P()],Ht.prototype,"redirectUniversalLink",void 0),Kt([P()],Ht.prototype,"target",void 0),Kt([P()],Ht.prototype,"preferUniversalLinks",void 0),Kt([P()],Ht.prototype,"isLoading",void 0),Ht=Kt([E("w3m-connecting-wc-mobile")],Ht);var Vt,Ft,Yt={};var Gt,Jt={},Qt={};function Xt(){if(Gt)return Qt;let t;Gt=1;const e=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return Qt.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},Qt.getSymbolTotalCodewords=function(t){return e[t]},Qt.getBCHDigit=function(t){let e=0;for(;0!==t;)e++,t>>>=1;return e},Qt.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');t=e},Qt.isKanjiModeEnabled=function(){return void 0!==t},Qt.toSJIS=function(e){return t(e)},Qt}var Zt,te,ee,ie,oe,re={};function ne(){return Zt||(Zt=1,(t=re).L={bit:1},t.M={bit:0},t.Q={bit:3}
vendor: 5,031 bytes, line 1057
1057,t.H={bit:2},t.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},t.from=function(e,i){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(o){return i}}),re;var t}var ae,se={};var le,ce={};var ue,de={};var he,pe={};function ge(){if(he)return pe;he=1;const t=ne(),e=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],i=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return pe.getBlocksCount=function(i,o){switch(o){case t.L:return e[4*(i-1)+0];case t.M:return e[4*(i-1)+1];case t.Q:return e[4*(i-1)+2];case t.H:return e[4*(i-1)+3];default:return}},pe.getTotalCodewordsCount=function(e,o){switch(o){case t.L:return i[4*(e-1)+0];case t.M:return i[4*(e-1)+1];case t.Q:return i[4*(e-1)+2];case t.H:return i[4*(e-1)+3];default:return}},pe}var we,fe,be,ve,me={},ye={};function xe(){return fe||(fe=1,function(t){const e=function(){if(we)return ye;we=1;const t=new Uint8Array(512),e=new Uint8Array(256);return function(){let i=1;for(let o=0;o<255;o++)t[o]=i,e[i]=o,i<<=1,256&i&&(i^=285);for(let e=255;e<512;e++)t[e]=t[e-255]}(),ye.log=function(t){if(t<1)throw new Error("log("+t+")");return e[t]},ye.exp=function(e){return t[e]},ye.mul=function(i,o){return 0===i||0===o?0:t[e[i]+e[o]]},ye}();t.mul=function(t,i){const o=new Uint8Array(t.length+i.length-1);for(let r=0;r<t.length;r++)for(let n=0;n<i.length;n++)o[r+n]^=e.mul(t[r],i[n]);return o},t.mod=function(t,i){let o=new Uint8Array(t);for(;o.length-i.length>=0;){const t=o[0];for(let n=0;n<i.length;n++)o[n]^=e.mul(i[n],t);let r=0;for(;r<o.length&&0===o[r];)r++;o=o.slice(r)}return o},t.generateECPolynomial=function(i){let o=new Uint8Array([1]);for(let r=0;r<i;r++)o=t.mul(o,new Uint8Array([1,e.exp(r)]));return o}}(me)),me}var $e,ke={},Ce={},Re={};function Ie(){return $e||($e=1,Re.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),Re}var Ee,Te,Pe,je={};function Oe(){if(Ee)return je;Ee=1;const t="[0-9]+";let e="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";e=e.replace(/u/g,"\\u");const i="(?:(?![A-Z0-9 $%*+\\-./:]|"+e+")(?:.|[\r\n]))+";je.KANJI=new RegExp(e,"g"),je.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),je.BYTE=new RegExp(i,"g"),je.NUMERIC=new RegExp(t,"g"),je.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const o=new RegExp("^"+e+"$"),r=new RegExp("^"+t+"$"),n=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return je.testKanji=function(t){return o.test(t)},je.testNumeric=function(t){return r.test(t)},je.testAlphanumeric=function(t){return n.test(t)},je}function Se(){return Te||(Te=1,function(t){const e=Ie(),i=Oe();t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(t,i){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!e.isValid(i))throw new Error("Invalid version: "+i);return i>=1&&i<10?t.ccBits[0]:i<27?t.ccBits[1]:t.ccBits[2]},t.getBestModeForData=function(e){return i.testNumeric(e)?t.NUMERIC:i.testAlphanumeric(e)?t.ALPHANUMERIC:i.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},t.isValid=function(t){return t&&t.bit&&t.ccBits},t.from=function(e,i){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(o){return i}}}(Ce)),Ce}function Le(){return Pe||(Pe=1,function(t){const e=Xt(),i=ge(),o=ne(),r=Se(),n=Ie(),a=e.getBCHDigit
1057(7973);function s(t,e){return r.getCharCountIndicator(t,e)+4}function l(t,e){let i=0;return t.forEach(function(t){const o=s(t.mode,e);i+=o+t.getBitsLength()}),i}t.from=function(t,e){return n.isValid(t)?parseInt(t,10):e},t.getCapacity=function(t,o,a){if(!n.isValid(t))throw new Error("Invalid QR Code version");void 0===a&&(a=r.BYTE);const l=8*(e.getSymbolTotalCodewords(t)-i.getTotalCodewordsCount(t,o));if(a===r.MIXED)return l;const c=l-s(a,t);switch(a){case r.NUMERIC:return Math.floor(c/10*3);case r.ALPHANUMERIC:return Math.floor(c/11*2);case r.KANJI:return Math.floor(c/13);case r.BYTE:default:return Math.floor(c/8)}},t.getBestVersionForData=function(e,i){let n;const a=o.from(i,o.M);if(Array.isArray(e)){if(e.length>1)return function(e,i){for(let o=1;o<=40;o++)if(l(e,o)<=t.getCapacity(o,i,r.MIXED))return o}(e,a);if(0===e.length)return 1;n=e[0]}else n=e;return function(e,i,o){for(let r=1;r<=40;r++)if(i<=t.getCapacity(r,o,e))return r}(n.mode,n.getLength(),a)},t.getEncodedBits=function(t){if(!n.isValid(t)||t<7)throw new Error("Invalid QR Code version");let i=t<<12;for(;e.getBCHDigit(i)-a>=0;)i^=7973<<e.getBCHDigit(i)-a;return t<<12|i}}(ke)),ke}var ze,Ae={};var Be,We,De,Ne,Me,Ue,_e,qe,Ke,He,Ve={};function Fe(){if(qe)return _e;qe=1;const t=Ue?Me:(Ue=1,Me=function(t){for(var e=[],i=t.length,o=0;o<i;o++){var r=t.charCodeAt(o);if(r>=55296&&r<=56319&&i>o+1){var n=t.charCodeAt(o+1);n>=56320&&n<=57343&&(r=1024*(r-55296)+n-56320+65536,o+=1)}r<128?e.push(r):r<2048?(e.push(r>>6|192),e.push(63&r|128)):r<55296||r>=57344&&r<65536?(e.push(r>>12|224),e.push(r>>6&63|128),e.push(63&r|128)):r>=65536&&r<=1114111?(e.push(r>>18|240),e.push(r>>12&63|128),e.push(r>>6&63|128),e.push(63&r|128)):e.push(239,191,189)}return new Uint8Array(e).buffer}),e=Se();function i(i){this.mode=e.BYTE,"string"==typeof i&&(i=t(i)),this.data=new Uint8Array(i)}return i.getBitsLength=function(t){return 8*t},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){for(let e=0,i=this.data.length;e<i;e++)t.put(this.data[e],8)},_e=i}var Ye,Ge,Je,Qe={exports:{}};function Xe(){return Ge||(Ge=1,function(t){const e=Se(),i=function(){if(We)return Be;We=1;const t=Se();function e(e){this.mode=t.NUMERIC,this.data=e.toString()}return e.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(t){let e,i,o;for(e=0;e+3<=this.data.length;e+=3)i=this.data.substr(e,3),o=parseInt(i,10),t.put(o,10);const r=this.data.length-e;r>0&&(i=this.data.substr(e),o=parseInt(i,10),t.put(o,3*r+1))},Be=e}(),o=function(){if(Ne)return De;Ne=1;const t=Se(),e=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function i(e){this.mode=t.ALPHANUMERIC,this.data=e}return i.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){let i;for(i=0;i+2<=this.data.length;i+=2){let o=45*e.indexOf(this.data[i]);
vendor: 15,403 bytes, line 1057
1057o+=e.indexOf(this.data[i+1]),t.put(o,11)}this.data.length%2&&t.put(e.indexOf(this.data[i]),6)},De=i}(),r=Fe(),n=function(){if(He)return Ke;He=1;const t=Se(),e=Xt();function i(e){this.mode=t.KANJI,this.data=e}return i.getBitsLength=function(t){return 13*t},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){let i;for(i=0;i<this.data.length;i++){let o=e.toSJIS(this.data[i]);if(o>=33088&&o<=40956)o-=33088;else{if(!(o>=57408&&o<=60351))throw new Error("Invalid SJIS character: "+this.data[i]+"\nMake sure your charset is UTF-8");o-=49472}o=192*(o>>>8&255)+(255&o),t.put(o,13)}},Ke=i}(),a=Oe(),s=Xt(),l=function(){return Ye?Qe.exports:(Ye=1,Qe.exports=t={single_source_shortest_paths:function(e,i,o){var r={},n={};n[i]=0;var a,s,l,c,u,d,h,p=t.PriorityQueue.make();for(p.push(i,0);!p.empty();)for(l in s=(a=p.pop()).value,c=a.cost,u=e[s]||{})u.hasOwnProperty(l)&&(d=c+u[l],h=n[l],(void 0===n[l]||h>d)&&(n[l]=d,p.push(l,d),r[l]=s));if(void 0!==o&&void 0===n[o]){var g=["Could not find a path from ",i," to ",o,"."].join("");throw new Error(g)}return r},extract_shortest_path_from_predecessor_list:function(t,e){for(var i=[],o=e;o;)i.push(o),t[o],o=t[o];return i.reverse(),i},find_path:function(e,i,o){var r=t.single_source_shortest_paths(e,i,o);return t.extract_shortest_path_from_predecessor_list(r,o)},PriorityQueue:{make:function(e){var i,o=t.PriorityQueue,r={};for(i in e=e||{},o)o.hasOwnProperty(i)&&(r[i]=o[i]);return r.queue=[],r.sorter=e.sorter||o.default_sorter,r},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var i={value:t,cost:e};this.queue.push(i),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}});var t}();function c(t){return unescape(encodeURIComponent(t)).length}function u(t,e,i){const o=[];let r;for(;null!==(r=t.exec(i));)o.push({data:r[0],index:r.index,mode:e,length:r[0].length});return o}function d(t){const i=u(a.NUMERIC,e.NUMERIC,t),o=u(a.ALPHANUMERIC,e.ALPHANUMERIC,t);let r,n;s.isKanjiModeEnabled()?(r=u(a.BYTE,e.BYTE,t),n=u(a.KANJI,e.KANJI,t)):(r=u(a.BYTE_KANJI,e.BYTE,t),n=[]);return i.concat(o,r,n).sort(function(t,e){return t.index-e.index}).map(function(t){return{data:t.data,mode:t.mode,length:t.length}})}function h(t,a){switch(a){case e.NUMERIC:return i.getBitsLength(t);case e.ALPHANUMERIC:return o.getBitsLength(t);case e.KANJI:return n.getBitsLength(t);case e.BYTE:return r.getBitsLength(t)}}function p(t,a){let l;const c=e.getBestModeForData(t);if(l=e.from(a,c),l!==e.BYTE&&l.bit<c.bit)throw new Error('"'+t+'" cannot be encoded with mode '+e.toString(l)+".\n Suggested mode is: "+e.toString(c));switch(l!==e.KANJI||s.isKanjiModeEnabled()||(l=e.BYTE),l){case e.NUMERIC:return new i(t);case e.ALPHANUMERIC:return new o(t);case e.KANJI:return new n(t);case e.BYTE:return new r(t)}}t.fromArray=function(t){return t.reduce(function(t,e){return"string"==typeof e?t.push(p(e,null)):e.data&&t.push(p(e.data,e.mode)),t},[])},t.fromString=function(i,o){const r=function(t){const i=[];for(let o=0;o<t.length;o++){const r=t[o];switch(r.mode){case e.NUMERIC:i.push([r,{data:r.data,mode:e.ALPHANUMERIC,length:r.length},{data:r.data,mode:e.BYTE,length:r.length}]);break;case e.ALPHANUMERIC:i.push([r,{data:r.data,mode:e.BYTE,length:r.length}]);break;case e.KANJI:i.push([r,{data:r.data,mode:e.BYTE,length:c(r.data)}]);break;case e.BYTE:i.push([{data:r.data,mode:e.BYTE,length:c(r.data)}])}}return i}(d(i,s.isKanjiModeEnabled())),n=function(t,i){const o={},r={start:{}};let n=["start"];for(let a=0;a<t.length;a++){const s=t[a],l=[];for(let t=0;t<s.length;t++){const c=s[t],u=""+a+t;l.push(u),o[u]={node:c,lastCount:0},r[u]={};for(let t=0;t<n.length;t++){const a=n[t];o[a]&&o[a].node.mode===c.mode?(r[a][u]=h(o[a].lastCount+c.length,c.mode)-h(o[a].lastCount,c.mode),o[a].lastCount+=c.length):(o[a]&&(o[a].lastCount=c.length),r[a][u]=h(c.length,c.mode)+4+e.getCharCountIndicator(c.mode,i))}}n=l}for(let e=0;e<n.length;e++)r[n[e]].end=0;return{map:r,table:o}}(r,o),a=l.find_path(n.map,"start","end"),u=[];for(let t=1;t<a.length-1;t++)u.push(n.table[a[t]].node);return t.fromArray(function(t){return t.reduce(function(t,e){const i=t.length-1>=0?t[t.length-1]:null;return i&&i.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)},[])}(u))},t.rawSplit=function(e){return t.fromArray(d(e,s.isKanjiModeEnabled()))}}(Ve)),Ve}function Ze(){if(Je)return Jt;Je=1;const t=Xt(),e=ne(),i=function(){if(ee)return te;function t(){this.buffer=[],this.length=0}return ee=1,t.prototype={get:function(t){const e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(let i=0;i<e;i++)this.putBit(1==(t>>>e-i-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},te=t}(),o=function(){if(oe)return ie;function t(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return oe=1,t.prototype.set=function(t,e,i,o){const r=t*this.size+e;this.data[r]=i,o&&(this.reservedBit[r]=!0)},t.prototype.get=function(t,e){return this.data[t*this.size+e]},t.prototype.xor=function(t,e,i){this.data[t*this.size+e]^=i},t.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},ie=t}(),r=(ae||(ae=1,function(t){const e=Xt().getSymbolSize;t.getRowColCoords=function(t){if(1===t)return[];const i=Math.floor(t/7)+2,o=e(t),r=145===o?26:2*Math.ceil((o-13)/(2*i-2)),n=[o-7];for(let e=1;e<i-1;e++)n[e]=n[e-1]-r;return n.push(6),n.reverse()},t.getPositions=function(e){const i=[],o=t.getRowColCoords(e),r=o.length;for(let t=0;t<r;t++)for(let e=0;e<r;e++)0===t&&0===e||0===t&&e===r-1||t===r-1&&0===e||i.push([o[t],o[e]]);return i}}(se)),se),n=function(){if(le)return ce;le=1;const t=Xt().getSymbolSize;return ce.getPositions=function(e){const i=t(e);return[[0,0],[i-7,0],[0,i-7]]},ce}(),a=(ue||(ue=1,function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e=3,i=3,o=40,r=10;function n(e,i,o){switch(e){case t.Patterns.PATTERN000:return(i+o)%2==0;case t.Patterns.PATTERN001:return i%2==0;case t.Patterns.PATTERN010:return o%3==0;case t.Patterns.PATTERN011:return(i+o)%3==0;case t.Patterns.PATTERN100:return(Math.floor(i/2)+Math.floor(o/3))%2==0;case t.Patterns.PATTERN101:return i*o%2+i*o%3==0;case t.Patterns.PATTERN110:return(i*o%2+i*o%3)%2==0;case t.Patterns.PATTERN111:return(i*o%3+(i+o)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(t){const i=t.size;let o=0,r=0,n=0,a=null,s=null;for(let l=0;l<i;l++){r=n=0,a=s=null;for(let c=0;c<i;c++){let i=t.get(l,c);i===a?r++:(r>=5&&(o+=e+(r-5)),a=i,r=1),i=t.get(c,l),i===s?n++:(n>=5&&(o+=e+(n-5)),s=i,n=1)}r>=5&&(o+=e+(r-5)),n>=5&&(o+=e+(n-5))}return o},t.getPenaltyN2=function(t){const e=t.size;let o=0;for(let i=0;i<e-1;i++)for(let r=0;r<e-1;r++){const e=t.get(i,r)+t.get(i,r+1)+t.get(i+1,r)+t.get(i+1,r+1);4!==e&&0!==e||o++}return o*i},t.getPenaltyN3=function(t){const e=t.size;let i=0,r=0,n=0;for(let o=0;o<e;o++){r=n=0;for(let a=0;a<e;a++)r=r<<1&2047|t.get(o,a),a>=10&&(1488===r||93===r)&&i++,n=n<<1&2047|t.get(a,o),a>=10&&(1488===n||93===n)&&i++}return i*o},t.getPenaltyN4=function(t){let e=0;const i=t.data.length;for(let o=0;o<i;o++)e+=t.data[o];return Math.abs(Math.ceil(100*e/i/5)-10)*r},t.applyMask=function(t,e){const i=e.size;for(let o=0;o<i;o++)for(let r=0;r<i;r++)e.isReserved(r,o)||e.xor(r,o,n(t,r,o))},t.getBestMask=function(e,i){const o=Object.keys(t.Patterns).length;let r=0,n=1/0;for(let a=0;a<o;a++){i(a),t.applyMask(a,e);const o=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(a,e),o<n&&(n=o,r=a)}return r}}(de)),de),s=ge(),l=function(){if(ve)return be;ve=1;const t=xe();function e(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}return e.prototype.initialize=function(e){this.degree=e,this.genPoly=t.generateECPolynomial(this.degree)},e.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const i=new Uint8Array(e.length+this.degree);i.set(e);const o=t.mod(i,this.genPoly),r=this.degree-o.length;if(r>0){const t=new Uint8Array(this.degree);return t.set(o,r),t}return o},be=e}(),c=Le(),u=function(){if(ze)return Ae;ze=1;const t=Xt(),e=t.getBCHDigit(1335);return Ae.getEncodedBits=function(i,o){const r=i.bit<<3|o;let n=r<<10;for(;t.getBCHDigit(n)-e>=0;)n^=1335<<t.getBCHDigit(n)-e;return 21522^(r<<10|n)},Ae}(),d=Se(),h=Xe();function p(t,e,i){const o=t.size,r=u.getEncodedBits(e,i);let n,a;for(n=0;n<15;n++)a=1==(r>>n&1),n<6?t.set(n,8,a,!0):n<8?t.set(n+1,8,a,!0):t.set(o-15+n,8,a,!0),n<8?t.set(8,o-n-1,a,!0):n<9?t.set(8,15-n-1+1,a,!0):t.set(8,15-n-1,a,!0);t.set(o-8,8,1,!0)}function g(e,o,r){const n=new i;r.forEach(function(t){n.put(t.mode.bit,4),n.put(t.getLength(),d.getCharCountIndicator(t.mode,e)),t.write(n)});const a=8*(t.getSymbolTotalCodewords(e)-s.getTotalCodewordsCount(e,o));for(n.getLengthInBits()+4<=a&&n.put(0,4);n.getLengthInBits()%8!=0;)n.putBit(0);const c=(a-n.getLengthInBits())/8;for(let t=0;t<c;t++)n.put(t%2?17:236,8);return function(e,i,o){const r=t.getSymbolTotalCodewords(i),n=s.getTotalCodewordsCount(i,o),a=r-n,c=s.getBlocksCount(i,o),u=r%c,d=c-u,h=Math.floor(r/c),p=Math.floor(a/c),g=p+1,w=h-p,f=new l(w);let b=0;const v=new Array(c),m=new Array(c);let y=0;const x=new Uint8Array(e.buffer);for(let t=0;t<c;t++){const e=t<d?p:g;v[t]=x.slice(b,b+e),m[t]=f.encode(v[t]),b+=e,y=Math.max(y,e)}const $=new Uint8Array(r);let k,C,R=0;for(k=0;k<y;k++)for(C=0;C<c;C++)k<v[C].length&&($[R++]=v[C][k]);for(k=0;k<w;k++)for(C=0;C<c;C++)$[R++]=m[C][k];return $}(n,e,o)}function w(e,i,s,l){let u;if(Array.isArray(e))u=h.fromArray(e);else{if("string"!=typeof e)throw new Error("Invalid data");{let t=i;if(!t){const i=h.rawSplit(e);t=c.getBestVersionForData(i,s)}u=h.fromString(e,t||40)}}const d=c.getBestVersionForData(u,s);if(!d)throw new Error("The amount of data is too big to be stored in a QR Code");if(i){if(i<d)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+d+".\n")}else i=d;const w=g(i,s,u),f=t.getSymbolSize(i),b=new o(f);return function(t,e){const i=t.size,o=n.getPositions(e);for(let r=0;r<o.length;r++){const e=o[r][0],n=o[r][1];for(let o=-1;o<=7;o++)if(!(e+o<=-1||i<=e+o))for(let r=-1;r<=7;r++)n+r<=-1||i<=n+r||(o>=0&&o<=6&&(0===r||6===r)||r>=0&&r<=6&&(0===o||6===o)||o>=2&&o<=4&&r>=2&&r<=4?t.set(e+o,n+r,!0,!0):t.set(e+o,n+r,!1,!0))}}(b,i),function(t){const e=t.size;for(let i=8;i<e-8;i++){const e=i%2==0;t.set(i,6,e,!0),t.set(6,i,e,!0)}}(b),function(t,e){const i=r.getPositions(e);for(let o=0;o<i.length;o++){const e=i[o][0],r=i[o][1];for(let i=-2;i<=2;i++)for(let o=-2;o<=2;o++)-2===i||2===i||-2===o||2===o||0===i&&0===o?t.set(e+i,r+o,!0,!0):t.set(e+i,r+o,!1,!0)}}(b,i),p(b,s,0),i>=7&&function(t,e){const i=t.size,o=c.getEncodedBits(e);let r,n,a;for(let s=0;s<18;s++)r=Math.floor(s/3),n=s%3+i-8-3,a=1==(o>>s&1),t.set(r,n,a,!0),t.set(n,r,a,!0)}(b,i),function(t,e){const i=t.size;let o=-1,r=i-1,n=7,a=0;for(let s=i-1;s>0;s-=2)for(6===s&&s--;;){for(let i=0;i<2;i++)if(!t.isReserved(r,s-i)){let o=!1;a<e.length&&(o=1==(e[a]>>>n&1)),t.set(r,s-i,o),n--,-1===n&&(a++,n=7)}if(r+=o,r<0||i<=r){r-=o,o=-o;break}}}(b,w),isNaN(l)&&(l=a.getBestMask(b,p.bind(null,b,s))),a.applyMask(l,b),p(b,s,l),{modules:b,version:i,errorCorrectionLevel:s,maskPattern:l,segments:u}}return Jt.create=function(i,o){if(void 0===i||""===i)throw new Error("No input text");let r,n,s=e.M;return void 0!==o&&(s=e.from(o.errorCorrectionLevel,e.M),r=c.from(o.version),n=a.from(o.maskPattern),o.toSJISFunc&&t.setToSJISFunction(o.toSJISFunc)),w(i,r,s,n)},Jt}var ti,ei,ii={},oi={};function ri(){return ti||(ti=1,function(t){function e(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");let e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map(function(t){return[t,t]}))),6===e.length&&e.push("F","F");const i=parseInt(e.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:255&i,hex:"#"+e.slice(0,6).join("")}}t.getOptions=function(t){t||(t={}),t.color||(t.color={});const i=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,o=t.width&&t.width>=21?t.width:void 0,r=t.scale||4;return{width:o,scale:o?4:r,margin:i,color:{dark:e(t.color.dark||"#000000ff"),light:e(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},t.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},t.getImageWidth=function(e,i){const o=t.getScale(e,i);return Math.floor((e+2*i.margin)*o)},t.qrToImageData=function(e,i,o){const r=i.modules.size,n=i.modules.data,a=t.getScale(r,o),s=Math.floor((r+2*o.margin)*a),l=o.margin*a,c=[o.color.light,o.color.dark];for(let t=0;t<s;t++)for(let i=0;i<s;i++){let u=4*(t*s+i),d=o.color.light;if(t>=l&&i>=l&&t<s-l&&i<s-l){d=c[n[Math.floor((t-l)/a)*r+Math.floor((i-l)/a)]?1:0]}e[u++]=d.r,e[u++]=d.g,e[u++]=d.b,e[u]=d.a}}}(oi)),oi}function ni(){return ei||(ei=1,function(t){const e=ri();t.render=function(t,i,o){let r=o,n=i;void 0!==r||i&&i.getContext||(r=i,i=void 0),i||(n=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),r=e.getOptions(r);const a=e.getImageWidth(t.modules.size,r),s=n.getContext("2d"),l=s.createImageData(a,a);return e.qrToImageData(l.data,t,r),function(t,e,i){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=i,e.width=i,e.style.height=i+"px",e.style.width=i+"px"}(s,n,a),s.putImageData(l,0,0),n},t.renderToDataURL=function(e,i,o){let r=o;void 0!==r||i&&i.getContext||(r=i,i=void 0),r||(r={});const n=t.render(e,i,r),a=r.type||"image/png",s=r.rendererOpts||{};return n.toDataURL(a,s.quality)}}(ii)),ii}var ai,si,li={};function ci(){if(ai)return li;ai=1;const t=ri();function e(t,e){const i=t.a/255,o=e+'="'+t.hex+'"';return i<1?o+" "+e+'-opacity="'+i.toFixed(2).slice(1)+'"':o}function i(t,e,i){let o=t+e;return void 0!==i&&(o+=" "+i),o}return li.render=function(o,r,n){const a=t.getOptions(r),s=o.modules.size,l=o.modules.data,c=s+2*a.margin,u=a.color.light.a?"<path "+e(a.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",d="<path "+e(a.color.dark,"stroke")+' d="'+function(t,e,o){let r="",n=0,a=!1,s=0;for(let l=0;l<t.length;l++){const c=Math.floor(l%e),u=Math.floor(l/e);c||a||(a=!0),t[l]?(s++,l>0&&c>0&&t[l-1]||(r+=a?i("M",c+o,.5+u+o):i("m",n,0),n=0,a=!1),c+1<e&&t[l+1]||(r+=i("h",s),s=0)):n++}return r}(l,s,a.margin)+'"/>',h='viewBox="0 0 '+c+" "+c+'"',p='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+h+' shape-rendering="crispEdges">'+u+d+"</svg>\n";return"function"==typeof n&&n(null,p),p},li}const ui=z(function(){if(si)return Yt;si=1;const t=Ft?Vt:(Ft=1,Vt=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}),e=Ze(),i=ni(),o=ci();
1057function r(i,o,r,n,a){const s=[].slice.call(arguments,1),l=s.length,c="function"==typeof s[l-1];if(!c&&!t())throw new Error("Callback required as last argument");if(!c){if(l<1)throw new Error("Too few arguments provided");return 1===l?(r=o,o=n=void 0):2!==l||o.getContext||(n=r,r=o,o=void 0),new Promise(function(t,a){try{const a=e.create(r,n);t(i(a,o,n))}catch(s){a(s)}})}if(l<2)throw new Error("Too few arguments provided");2===l?(a=r,r=o,o=n=void 0):3===l&&(o.getContext&&void 0===a?(a=n,n=void 0):(a=n,n=r,r=o,o=void 0));try{const t=e.create(r,n);a(null,i(t,o,n))}catch(u){a(u)}}return Yt.create=e.create,Yt.toCanvas=r.bind(null,i.render),Yt.toDataURL=r.bind(null,i.renderToDataURL),Yt.toString=r.bind(null,function(t,e,i){return o.render(t,i)}),Yt}());function di(t,e,i){if(t===e)return!1;return(t-e<0?e-t:t-e)<=i+.1}const hi={generate({uri:t,size:e,logoSize:i,dotColor:o="#141414"}){const r=[],n=function(t,e){const i=Array.prototype.slice.call(ui.create(t,{errorCorrectionLevel:e}).modules.data,0),o=Math.sqrt(i.length);return i.reduce((t,e,i)=>(i%o===0?t.push([e]):t[t.length-1].push(e))&&t,[])}(t,"Q"),a=e/n.length,s=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];s.forEach(({x:t,y:e})=>{const i=(n.length-7)*a*t,l=(n.length-7)*a*e,c=.45;for(let n=0;n<s.length;n+=1){const t=a*(7-2*n);r.push(k` 1058 <rect 1059 fill=${2===n?o:"transparent"} 1060 width=${0===n?t-5:t} 1061 rx= ${0===n?(t-5)*c:t*c} 1062 ry= ${0===n?(t-5)*c:t*c} 1063 stroke=${o} 1064 stroke-width=${0===n?5:0} 1065 height=${0===n?t-5:t} 1066 x= ${0===n?l+a*n+2.5:l+a*n} 1067 y= ${0===n?i+a*n+2.5:i+a*n} 1068 /> 1069 `)}});const l=Math.floor((i+25)/a),c=n.length/2-l/2,u=n.length/2+l/2-1,d=[];n.forEach((t,e)=>{t.forEach((t,i)=>{if(n[e][i]&&!(e<7&&i<7||e>n.length-8&&i<7||e<7&&i>n.length-8||e>c&&e<u&&i>c&&i<u)){const t=e*a+a/2,o=i*a+a/2;d.push([t,o])}})});const h={};return d.forEach(([t,e])=>{var i;h[t]?null==(i=h[t])||i.push(e):h[t]=[e]}),Object.entries(h).map(([t,e])=>{const i=e.filter(t=>e.every(e=>!di(t,e,a)));return[Number(t),i]}).forEach(([t,e])=>{e.forEach(e=>{r.push(k`<circle cx=${t} cy=${e} fill=${o} r=${a/2.5} />`)})}),Object.entries(h).filter(([t,e])=>e.length>1).map(([t,e])=>{const i=e.filter(t=>e.some(e=>di(t,e,a)));return[Number(t),i]}).map(([t,e])=>{e.sort((t,e)=>t<e?-1:1);const i=[];for(const o of e){const t=i.find(t=>t.some(t=>di(o,t,a)));t?t.push(o):i.push([o])}return[t,i.map(t=>[t[0],t[t.length-1]])]}).forEach(([t,e])=>{e.forEach(([e,i])=>{r.push(k` 1070 <line 1071 x1=${t} 1072 x2=${t} 1073 y1=${e} 1074 y2=${i} 1075 stroke=${o} 1076 stroke-width=${a/1.25} 1077 stroke-linecap="round" 1078 /> 1079 `)})}),r}},pi=t` 1080 :host { 1081 position: relative; 1082 user-select: none; 1083 display: block; 1084 overflow: hidden; 1085 aspect-ratio: 1 / 1; 1086 width: var(--local-size); 1087 } 1088 1089 :host([data-theme='dark']) { 1090 border-radius: clamp(0px, var(--wui-border-radius-l), 40px); 1091 background-color: var(--wui-color-inverse-100); 1092 padding: var(--wui-spacing-l); 1093 } 1094 1095 :host([data-theme='light']) { 1096 box-shadow: 0 0 0 1px var(--wui-color-bg-125); 1097 background-color: var(--wui-color-bg-125); 1098 } 1099 1100 :host([data-clear='true']) > wui-icon { 1101 display: none; 1102 } 1103 1104 svg:first-child, 1105 wui-image, 1106 wui-icon { 1107 position: absolute; 1108 top: 50%; 1109 left: 50%; 1110 transform: translateY(-50%) translateX(-50%); 1111 } 1112 1113 wui-image { 1114 width: 25%; 1115 height: 25%; 1116 border-radius: var(--wui-border-radius-xs); 1117 } 1118 1119 wui-icon { 1120 width: 100%; 1121 height: 100%; 1122 color: var(--local-icon-color) !important; 1123 transform: translateY(-50%) translateX(-50%) scale(0.25); 1124 } 1125`;var gi=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let wi=class extends o{constructor(){super(...arguments),this.uri="",this.size=0,this.theme="dark",this.imageSrc=void 0,this.alt=void 0,this.arenaClear=void 0,this.farcaster=void 0}render(){return this.dataset.theme=this.theme,this.dataset.clear=String(this.arenaClear),this.style.cssText=`\n --local-size: ${this.size}px;\n --local-icon-color: ${this.color??"#3396ff"}\n `,r`${this.templateVisual()} ${this.templateSvg()}`}templateSvg(){const t="light"===this.theme?this.size:this.size-32;return k` 1126 <svg height=${t} width=${t}> 1127 ${hi.generate({uri:this.uri,size:t,logoSize:this.arenaClear?0:t/4,dotColor:this.color})} 1128 </svg> 1129 `}templateVisual(){return this.imageSrc?r`<wui-image src=${this.imageSrc} alt=${this.alt??"logo"}></wui-image>`:this.farcaster?r`<wui-icon 1130 class="farcaster" 1131 size="inherit" 1132 color="inherit" 1133 name="farcaster" 1134 ></wui-icon>`:r`<wui-icon size="inherit" color="inherit" name="walletConnect"></wui-icon>`}};wi.styles=[i,pi],gi([I()],wi.prototype,"uri",void 0),gi([I({type:Number})],wi.prototype,"size",void 0),gi([I()],wi.prototype,"theme",void 0),gi([I()],wi.prototype,"imageSrc",void 0),gi([I()],wi.prototype,"alt",void 0),gi([I()],wi.prototype,"color",void 0),gi([I({type:Boolean})],wi.prototype,"arenaClear",void 0),gi([I({type:Boolean})],wi.prototype,"farcaster",void 0),wi=gi([E("wui-qr-code")],wi);const fi=t` 1135 :host { 1136 display: block; 1137 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005); 1138 background: linear-gradient( 1139 120deg, 1140 var(--wui-color-bg-200) 5%, 1141 var(--wui-color-bg-200) 48%, 1142 var(--wui-color-bg-300) 55%, 1143 var(--wui-color-bg-300) 60%, 1144 var(--wui-color-bg-300) calc(60% + 10px), 1145 var(--wui-color-bg-200) calc(60% + 12px), 1146 var(--wui-color-bg-200) 100% 1147 ); 1148 background-size: 250%; 1149 animation: shimmer 3s linear infinite reverse; 1150 } 1151 1152 :host([variant='light']) { 1153 background: linear-gradient( 1154 120deg, 1155 var(--wui-color-bg-150) 5%, 1156 var(--wui-color-bg-150) 48%, 1157 var(--wui-color-bg-200) 55%, 1158 var(--wui-color-bg-200) 60%, 1159 var(--wui-color-bg-200) calc(60% + 10px), 1160 var(--wui-color-bg-150) calc(60% + 12px), 1161 var(--wui-color-bg-150) 100% 1162 ); 1163 background-size: 250%; 1164 } 1165 1166 @keyframes shimmer { 1167 from { 1168 background-position: -250% 0; 1169 } 1170 to { 1171 background-position: 250% 0; 1172 } 1173 } 1174`;
1174var bi=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let vi=class extends o{constructor(){super(...arguments),this.width="",this.height="",this.borderRadius="m",this.variant="default"}render(){return this.style.cssText=`\n width: ${this.width};\n height: ${this.height};\n border-radius: clamp(0px,var(--wui-border-radius-${this.borderRadius}), 40px);\n `,r`<slot></slot>`}};vi.styles=[fi],bi([I()],vi.prototype,"width",void 0),bi([I()],vi.prototype,"height",void 0),bi([I()],vi.prototype,"borderRadius",void 0),bi([I()],vi.prototype,"variant",void 0),vi=bi([E("wui-shimmer")],vi);const mi=t` 1175 .reown-logo { 1176 height: var(--wui-spacing-xxl); 1177 } 1178 1179 a { 1180 text-decoration: none; 1181 cursor: pointer; 1182 } 1183 1184 a:hover { 1185 opacity: 0.9; 1186 } 1187`;let yi=class extends o{render(){return r` 1188 <a 1189 data-testid="ux-branding-reown" 1190 href=${"https://reown.com"} 1191 rel="noreferrer" 1192 target="_blank" 1193 style="text-decoration: none;" 1194 > 1195 <wui-flex 1196 justifyContent="center" 1197 alignItems="center" 1198 gap="xs" 1199 .padding=${["0","0","l","0"]} 1200 > 1201 <wui-text variant="small-500" color="fg-100"> UX by </wui-text> 1202 <wui-icon name="reown" size="xxxl" class="reown-logo"></wui-icon> 1203 </wui-flex> 1204 </a> 1205 `}};yi.styles=[i,e,mi],yi=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a}([E("wui-ux-by-reown")],yi);const xi=t` 1206 @keyframes fadein { 1207 from { 1208 opacity: 0; 1209 } 1210 to { 1211 opacity: 1; 1212 } 1213 } 1214 1215 wui-shimmer { 1216 width: 100%; 1217 aspect-ratio: 1 / 1; 1218 border-radius: clamp(0px, var(--wui-border-radius-l), 40px) !important; 1219 } 1220 1221 wui-qr-code { 1222 opacity: 0; 1223 animation-duration: 200ms; 1224 animation-timing-function: ease; 1225 animation-name: fadein; 1226 animation-fill-mode: forwards; 1227 } 1228`;let $i=class extends Ut{constructor(){var t;super(),this.forceUpdate=()=>{this.requestUpdate()},window.addEventListener("resize",this.forceUpdate),c.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:(null==(t=this.wallet)?void 0:t.name)??"WalletConnect",platform:"qrcode"}})}disconnectedCallback(){var t;super.disconnectedCallback(),null==(t=this.unsubscribe)||t.forEach(t=>t()),window.removeEventListener("resize",this.forceUpdate)}render(){return this.onRenderProxy(),r` 1229 <wui-flex 1230 flexDirection="column" 1231 alignItems="center" 1232 .padding=${["0","xl","xl","xl"]} 1233 gap="xl" 1234 > 1235 <wui-shimmer borderRadius="l" width="100%"> ${this.qrCodeTemplate()} </wui-shimmer> 1236 1237 <wui-text variant="paragraph-500" color="fg-100"> 1238 Scan this QR Code with your phone 1239 </wui-text> 1240 ${this.copyTemplate()} 1241 </wui-flex> 1242 <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links> 1243 `}onRenderProxy(){!this.ready&&this.uri&&(this.timeout=setTimeout(()=>{this.ready=!0},200))}qrCodeTemplate(){if(!this.uri||!this.ready)return null;const t=this.getBoundingClientRect().width-40,e=this.wallet?this.wallet.name:void 0;return p.setWcLinking(void 0),p.setRecentWallet(this.wallet),r` <wui-qr-code 1244 size=${t} 1245 theme=${m.state.themeMode} 1246 uri=${this.uri} 1247 imageSrc=${T(h.getWalletImage(this.wallet))} 1248 color=${T(m.state.themeVariables["--w3m-qr-color"])} 1249 alt=${T(e)} 1250 data-testid="wui-qr-code" 1251 ></wui-qr-code>`}copyTemplate(){const t=!this.uri||!this.ready;
1251return r`<wui-link 1252 .disabled=${t} 1253 @click=${this.onCopyUri} 1254 color="fg-200" 1255 data-testid="copy-wc2-uri" 1256 > 1257 <wui-icon size="xs" color="fg-200" slot="iconLeft" name="copy"></wui-icon> 1258 Copy link 1259 </wui-link>`}};$i.styles=xi,$i=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a}([E("w3m-connecting-wc-qrcode")],$i);let ki=class extends o{constructor(){var t;if(super(),this.wallet=null==(t=u.state.data)?void 0:t.wallet,!this.wallet)throw new Error("w3m-connecting-wc-unsupported: No wallet provided");c.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser"}})}render(){return r` 1260 <wui-flex 1261 flexDirection="column" 1262 alignItems="center" 1263 .padding=${["3xl","xl","xl","xl"]} 1264 gap="xl" 1265 > 1266 <wui-wallet-image 1267 size="lg" 1268 imageSrc=${T(h.getWalletImage(this.wallet))} 1269 ></wui-wallet-image> 1270 1271 <wui-text variant="paragraph-500" color="fg-100">Not Detected</wui-text> 1272 </wui-flex> 1273 1274 <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links> 1275 `}};ki=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a}([E("w3m-connecting-wc-unsupported")],ki);var Ci=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let Ri=class extends Ut{constructor(){if(super(),this.isLoading=!0,!this.wallet)throw new Error("w3m-connecting-wc-web: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.secondaryBtnLabel="Open",this.secondaryLabel=$.CONNECT_LABELS.MOBILE,this.secondaryBtnIcon="externalLink",this.updateLoadingState(),this.unsubscribe.push(p.subscribeKey("wcUri",()=>{this.updateLoadingState()})),c.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"web"}})}updateLoadingState(){this.isLoading=!this.uri}onConnectProxy(){var t;if((null==(t=this.wallet)?void 0:t.webapp_link)&&this.uri)try{this.error=!1;const{webapp_link:t,name:e}=this.wallet,{redirect:i,href:o}=l.formatUniversalUrl(t,this.uri);p.setWcLinking({name:e,href:o}),p.setRecentWallet(this.wallet),l.openHref(i,"_blank")}catch{this.error=!0}}};Ci([P()],Ri.prototype,"isLoading",void 0),Ri=Ci([E("w3m-connecting-wc-web")],Ri);var Ii=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let Ei=class extends o{constructor(){var t;super(),this.wallet=null==(t=u.state.data)?void 0:t.wallet,this.unsubscribe=[],this.platform=void 0,this.platforms=[],this.isSiwxEnabled=Boolean(s.state.siwx),this.remoteFeatures=s.state.remoteFeatures,this.determinePlatforms(),this.initializeConnection(),this.unsubscribe.push(s.subscribeKey("remoteFeatures",t=>this.remoteFeatures=t))}disconnectedCallback(){this.unsubscribe.forEach(t=>t())}render(){return r` 1276 ${this.headerTemplate()} 1277 <div>${this.platformTemplate()}</div> 1278 ${this.reownBrandingTemplate()} 1279 `}reownBrandingTemplate(){var t;return(null==(t=this.remoteFeatures)?void 0:t.reownBranding)?r`<wui-ux-by-reown></wui-ux-by-reown>`:null}async initializeConnection(t=!1){if("browser"!==this.platform&&(!s.state.manualWCControl||t))try{const{wcPairingExpiry:e,status:i}=p.state;(t||s.state.enableEmbedded||l.isPairingExpired(e)||"connecting"===i)&&(await p.connectWalletConnect(),this.isSiwxEnabled||x.close())}catch(e){c.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:(null==e?void 0:e.message)??"
1279Unknown"}}),p.setWcError(!0),y.showError(e.message??"Connection error"),p.resetWcConnection(),u.goBack()}}determinePlatforms(){if(!this.wallet)return this.platforms.push("qrcode"),void(this.platform="qrcode");if(this.platform)return;const{mobile_link:t,desktop_link:e,webapp_link:i,injected:o,rdns:r}=this.wallet,n=null==o?void 0:o.map(({injected_id:t})=>t).filter(Boolean),a=[...r?[r]:n??[]],c=!s.state.isUniversalProvider&&a.length,u=t,d=i,h=p.checkInstalled(a),g=c&&h,w=e&&!l.isMobile();g&&!b.state.noAdapters&&this.platforms.push("browser"),u&&this.platforms.push(l.isMobile()?"mobile":"qrcode"),d&&this.platforms.push("web"),w&&this.platforms.push("desktop"),g||!c||b.state.noAdapters||this.platforms.push("unsupported"),this.platform=this.platforms[0]}platformTemplate(){switch(this.platform){case"browser":return r`<w3m-connecting-wc-browser></w3m-connecting-wc-browser>`;case"web":return r`<w3m-connecting-wc-web></w3m-connecting-wc-web>`;case"desktop":return r` 1280 <w3m-connecting-wc-desktop .onRetry=${()=>this.initializeConnection(!0)}> 1281 </w3m-connecting-wc-desktop> 1282 `;case"mobile":return r` 1283 <w3m-connecting-wc-mobile isMobile .onRetry=${()=>this.initializeConnection(!0)}> 1284 </w3m-connecting-wc-mobile> 1285 `;case"qrcode":return r`<w3m-connecting-wc-qrcode></w3m-connecting-wc-qrcode>`;default:return r`<w3m-connecting-wc-unsupported></w3m-connecting-wc-unsupported>`}}headerTemplate(){return this.platforms.length>1?r` 1286 <w3m-connecting-header 1287 .platforms=${this.platforms} 1288 .onSelectPlatfrom=${this.onSelectPlatform.bind(this)} 1289 > 1290 </w3m-connecting-header> 1291 `:null}async onSelectPlatform(t){var e;const i=null==(e=this.shadowRoot)?void 0:e.querySelector("div");i&&(await i.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.platform=t,i.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}};Ii([P()],Ei.prototype,"platform",void 0),Ii([P()],Ei.prototype,"platforms",void 0),Ii([P()],Ei.prototype,"isSiwxEnabled",void 0),Ii([P()],Ei.prototype,"remoteFeatures",void 0),Ei=Ii([E("w3m-connecting-wc-view")],Ei);var Ti=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let Pi=class extends o{constructor(){super(...arguments),this.isMobile=l.isMobile()}render(){if(this.isMobile){const{featured:t,recommended:e}=a.state,{customWallets:i}=s.state,o=g.getRecentWallets(),n=t.length||e.length||(null==i?void 0:i.length)||o.length;
1291return r`<wui-flex 1292 flexDirection="column" 1293 gap="xs" 1294 .margin=${["3xs","s","s","s"]} 1295 > 1296 ${n?r`<w3m-connector-list></w3m-connector-list>`:null} 1297 <w3m-all-wallets-widget></w3m-all-wallets-widget> 1298 </wui-flex>`}return r`<wui-flex flexDirection="column" .padding=${["0","0","l","0"]}> 1299 <w3m-connecting-wc-view></w3m-connecting-wc-view> 1300 <wui-flex flexDirection="column" .padding=${["0","m","0","m"]}> 1301 <w3m-all-wallets-widget></w3m-all-wallets-widget> </wui-flex 1302 ></wui-flex>`}};Ti([P()],Pi.prototype,"isMobile",void 0),Pi=Ti([E("w3m-connecting-wc-basic-view")],Pi); 1303/** 1304 * @license 1305 * Copyright 2020 Google LLC 1306 * SPDX-License-Identifier: BSD-3-Clause 1307 */ 1308const ji=()=>new Oi;class Oi{}const Si=new WeakMap,Li=O(class extends S{render(t){return C}update(t,[e]){var i;const o=e!==this.G;return o&&void 0!==this.G&&this.rt(void 0),(o||this.lt!==this.ct)&&(this.G=e,this.ht=null==(i=t.options)?void 0:i.host,this.rt(this.ct=t.element)),C}rt(t){if(this.isConnected||(t=void 0),"function"==typeof this.G){const e=this.ht??globalThis;let i=Si.get(e);void 0===i&&(i=new WeakMap,Si.set(e,i)),void 0!==i.get(this.G)&&this.G.call(this.ht,void 0),i.set(this.G,t),void 0!==t&&this.G.call(this.ht,t)}else this.G.value=t}get lt(){var t,e;return"function"==typeof this.G?null==(t=Si.get(this.ht??globalThis))?void 0:t.get(this.G):null==(e=this.G)?void 0:e.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),zi=t` 1309 :host { 1310 display: flex; 1311 align-items: center; 1312 justify-content: center; 1313 } 1314 1315 label { 1316 position: relative; 1317 display: inline-block; 1318 width: 32px; 1319 height: 22px; 1320 } 1321 1322 input { 1323 width: 0; 1324 height: 0; 1325 opacity: 0; 1326 } 1327 1328 span { 1329 position: absolute; 1330 cursor: pointer; 1331 top: 0; 1332 left: 0; 1333 right: 0; 1334 bottom: 0; 1335 background-color: var(--wui-color-blue-100); 1336 border-width: 1px; 1337 border-style: solid; 1338 border-color: var(--wui-color-gray-glass-002); 1339 border-radius: 999px; 1340 transition: 1341 background-color var(--wui-ease-inout-power-1) var(--wui-duration-md), 1342 border-color var(--wui-ease-inout-power-1) var(--wui-duration-md); 1343 will-change: background-color, border-color; 1344 } 1345 1346 span:before { 1347 position: absolute; 1348 content: ''; 1349 height: 16px; 1350 width: 16px; 1351 left: 3px; 1352 top: 2px; 1353 background-color: var(--wui-color-inverse-100); 1354 transition: transform var(--wui-ease-inout-power-1) var(--wui-duration-lg); 1355 will-change: transform; 1356 border-radius: 50%; 1357 } 1358 1359 input:checked + span { 1360 border-color: var(--wui-color-gray-glass-005); 1361 background-color: var(--wui-color-blue-100); 1362 } 1363 1364 input:not(:checked) + span { 1365 background-color: var(--wui-color-gray-glass-010); 1366 } 1367 1368 input:checked + span:before { 1369 transform: translateX(calc(100% - 7px)); 1370 } 1371`;var Ai=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let Bi=class extends o{constructor(){super(...arguments),this.inputElementRef=ji(),this.checked=void 0}render(){return r` 1372 <label> 1373 <input 1374 ${Li(this.inputElementRef)} 1375 type="checkbox" 1376 ?checked=${T(this.checked)} 1377 @change=${this.dispatchChangeEvent.bind(this)} 1378 /> 1379 <span></span> 1380 </label> 1381 `}dispatchChangeEvent(){var t;this.dispatchEvent(new CustomEvent("switchChange",{detail:null==(t=this.inputElementRef.value)?void 0:t.checked,bubbles:!0,composed:!0}))}};Bi.styles=[i,e,R,zi],Ai([I({type:Boolean})],Bi.prototype,"checked",void 0),Bi=Ai([E("wui-switch")],Bi);const Wi=t` 1382 :host { 1383 height: 100%; 1384 } 1385 1386 button { 1387 display: flex; 1388 align-items: center; 1389 justify-content: center; 1390 column-gap: var(--wui-spacing-1xs); 1391 padding: var(--wui-spacing-xs) var(--wui-spacing-s); 1392 background-color: var(--wui-color-gray-glass-002); 1393 border-radius: var(--wui-border-radius-xs); 1394 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002); 1395 transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md); 1396 will-change: background-color; 1397 cursor: pointer; 1398 } 1399 1400 wui-switch { 1401 pointer-events: none; 1402 } 1403`;
1403var Di=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let Ni=class extends o{constructor(){super(...arguments),this.checked=void 0}render(){return r` 1404 <button> 1405 <wui-icon size="xl" name="walletConnectBrown"></wui-icon> 1406 <wui-switch ?checked=${T(this.checked)}></wui-switch> 1407 </button> 1408 `}};Ni.styles=[i,e,Wi],Di([I({type:Boolean})],Ni.prototype,"checked",void 0),Ni=Di([E("wui-certified-switch")],Ni);const Mi=t` 1409 button { 1410 background-color: var(--wui-color-fg-300); 1411 border-radius: var(--wui-border-radius-4xs); 1412 width: 16px; 1413 height: 16px; 1414 } 1415 1416 button:disabled { 1417 background-color: var(--wui-color-bg-300); 1418 } 1419 1420 wui-icon { 1421 color: var(--wui-color-bg-200) !important; 1422 } 1423 1424 button:focus-visible { 1425 background-color: var(--wui-color-fg-250); 1426 border: 1px solid var(--wui-color-accent-100); 1427 } 1428 1429 @media (hover: hover) and (pointer: fine) { 1430 button:hover:enabled { 1431 background-color: var(--wui-color-fg-250); 1432 } 1433 1434 button:active:enabled { 1435 background-color: var(--wui-color-fg-225); 1436 } 1437 } 1438`;var Ui=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let _i=class extends o{constructor(){super(...arguments),this.icon="copy"}render(){return r` 1439 <button> 1440 <wui-icon color="inherit" size="xxs" name=${this.icon}></wui-icon> 1441 </button> 1442 `}};_i.styles=[i,e,Mi],Ui([I()],_i.prototype,"icon",void 0),_i=Ui([E("wui-input-element")],_i);const qi=t` 1443 :host { 1444 position: relative; 1445 width: 100%; 1446 display: inline-block; 1447 color: var(--wui-color-fg-275); 1448 } 1449 1450 input { 1451 width: 100%; 1452 border-radius: var(--wui-border-radius-xs); 1453 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002); 1454 background: var(--wui-color-gray-glass-002); 1455 font-size: var(--wui-font-size-paragraph); 1456 letter-spacing: var(--wui-letter-spacing-paragraph); 1457 color: var(--wui-color-fg-100); 1458 transition: 1459 background-color var(--wui-ease-inout-power-1) var(--wui-duration-md), 1460 border-color var(--wui-ease-inout-power-1) var(--wui-duration-md), 1461 box-shadow var(--wui-ease-inout-power-1) var(--wui-duration-md); 1462 will-change: background-color, border-color, box-shadow; 1463 caret-color: var(--wui-color-accent-100); 1464 } 1465 1466 input:disabled { 1467 cursor: not-allowed; 1468 border: 1px solid var(--wui-color-gray-glass-010); 1469 } 1470 1471 input:disabled::placeholder, 1472 input:disabled + wui-icon { 1473 color: var(--wui-color-fg-300); 1474 } 1475 1476 input::placeholder { 1477 color: var(--wui-color-fg-275); 1478 } 1479 1480 input:focus:enabled { 1481 background-color: var(--wui-color-gray-glass-005); 1482 -webkit-box-shadow: 1483 inset 0 0 0 1px var(--wui-color-accent-100), 1484 0px 0px 0px 4px var(--wui-box-shadow-blue); 1485 -moz-box-shadow: 1486 inset 0 0 0 1px var(--wui-color-accent-100), 1487 0px 0px 0px 4px var(--wui-box-shadow-blue); 1488 box-shadow: 1489 inset 0 0 0 1px var(--wui-color-accent-100), 1490 0px 0px 0px 4px var(--wui-box-shadow-blue); 1491 } 1492 1493 input:hover:enabled { 1494 background-color: var(--wui-color-gray-glass-005); 1495 } 1496 1497 wui-icon { 1498 position: absolute; 1499 top: 50%; 1500 transform: translateY(-50%); 1501 pointer-events: none; 1502 } 1503 1504 .wui-size-sm { 1505 padding: 9px var(--wui-spacing-m) 10px var(--wui-spacing-s); 1506 } 1507 1508 wui-icon + .wui-size-sm { 1509 padding: 9px var(--wui-spacing-m) 10px 36px; 1510 } 1511 1512 wui-icon[data-input='sm'] { 1513 left: var(--wui-spacing-s); 1514 } 1515 1516 .wui-size-md { 1517 padding: 15px var(--wui-spacing-m) var(--wui-spacing-l) var(--wui-spacing-m); 1518 } 1519 1520 wui-icon + .wui-size-md, 1521 wui-loading-spinner + .wui-size-md { 1522 padding: 10.5px var(--wui-spacing-3xl) 10.5px var(--wui-spacing-3xl); 1523 } 1524 1525 wui-icon[data-input='md'] { 1526 left: var(--wui-spacing-l); 1527 } 1528 1529 .wui-size-lg { 1530 padding: var(--wui-spacing-s) var(--wui-spacing-s) var(--wui-spacing-s) var(--wui-spacing-l); 1531 letter-spacing: var(--wui-letter-spacing-medium-title); 1532 font-size: var(--wui-font-size-medium-title); 1533 font-weight: var(--wui-font-weight-light); 1534 line-height: 130%; 1535 color: var(--wui-color-fg-100); 1536 height: 64px; 1537 } 1538 1539 .wui-padding-right-xs { 1540 padding-right: var(--wui-spacing-xs); 1541 } 1542 1543 .wui-padding-right-s { 1544 padding-right: var(--wui-spacing-s); 1545 } 1546 1547 .wui-padding-right-m { 1548 padding-right: var(--wui-spacing-m); 1549 } 1550 1551 .wui-padding-right-l { 1552 padding-right: var(--wui-spacing-l); 1553 } 1554 1555 .wui-padding-right-xl { 1556 padding-right: var(--wui-spacing-xl); 1557 } 1558 1559 .wui-padding-right-2xl { 1560 padding-right: var(--wui-spacing-2xl); 1561 } 1562 1563 .wui-padding-right-3xl { 1564 padding-right: var(--wui-spacing-3xl); 1565 } 1566 1567 .wui-padding-right-4xl { 1568 padding-right: var(--wui-spacing-4xl); 1569 } 1570 1571 .wui-padding-right-5xl { 1572 padding-right: var(--wui-spacing-5xl); 1573 } 1574 1575 wui-icon + .wui-size-lg, 1576 wui-loading-spinner + .wui-size-lg { 1577 padding-left: 50px; 1578 } 1579 1580 wui-icon[data-input='lg'] { 1581 left: var(--wui-spacing-l); 1582 } 1583 1584 .wui-size-mdl { 1585 padding: 17.25px var(--wui-spacing-m) 17.25px var(--wui-spacing-m); 1586 } 1587 wui-icon + .wui-size-mdl, 1588 wui-loading-spinner + .wui-size-mdl { 1589 padding: 17.25px var(--wui-spacing-3xl) 17.25px 40px; 1590 } 1591 wui-icon[data-input='mdl'] { 1592 left: var(--wui-spacing-m); 1593 } 1594 1595 input:placeholder-shown ~ ::slotted(wui-input-element), 1596 input:placeholder-shown ~ ::slotted(wui-icon) { 1597 opacity: 0; 1598 pointer-events: none; 1599 } 1600 1601 input::-webkit-outer-spin-button, 1602 input::-webkit-inner-spin-button { 1603 -webkit-appearance: none; 1604 margin: 0; 1605 } 1606 1607 input[type='number'] { 1608 -moz-appearance: textfield; 1609 } 1610 1611 ::slotted(wui-input-element), 1612 ::slotted(wui-icon) { 1613 position: absolute; 1614 top: 50%; 1615 transform: translateY(-50%); 1616 } 1617 1618 ::slotted(wui-input-element) { 1619 right: var(--wui-spacing-m); 1620 } 1621 1622 ::slotted(wui-icon) { 1623 right: 0px; 1624 } 1625`;
1625var Ki=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let Hi=class extends o{constructor(){super(...arguments),this.inputElementRef=ji(),this.size="md",this.disabled=!1,this.placeholder="",this.type="text",this.value=""}render(){const t=`wui-padding-right-${this.inputRightPadding}`,e=`wui-size-${this.size}`,i={[e]:!0,[t]:Boolean(this.inputRightPadding)};return r`${this.templateIcon()} 1626 <input 1627 data-testid="wui-input-text" 1628 ${Li(this.inputElementRef)} 1629 class=${L(i)} 1630 type=${this.type} 1631 enterkeyhint=${T(this.enterKeyHint)} 1632 ?disabled=${this.disabled} 1633 placeholder=${this.placeholder} 1634 @input=${this.dispatchInputChangeEvent.bind(this)} 1635 .value=${this.value||""} 1636 tabindex=${T(this.tabIdx)} 1637 /> 1638 <slot></slot>`}templateIcon(){return this.icon?r`<wui-icon 1639 data-input=${this.size} 1640 size=${this.size} 1641 color="inherit" 1642 name=${this.icon} 1643 ></wui-icon>`:null}dispatchInputChangeEvent(){var t;this.dispatchEvent(new CustomEvent("inputChange",{detail:null==(t=this.inputElementRef.value)?void 0:t.value,bubbles:!0,composed:!0}))}};Hi.styles=[i,e,qi],Ki([I()],Hi.prototype,"size",void 0),Ki([I()],Hi.prototype,"icon",void 0),Ki([I({type:Boolean})],Hi.prototype,"disabled",void 0),Ki([I()],Hi.prototype,"placeholder",void 0),Ki([I()],Hi.prototype,"type",void 0),Ki([I()],Hi.prototype,"keyHint",void 0),Ki([I()],Hi.prototype,"value",void 0),Ki([I()],Hi.prototype,"inputRightPadding",void 0),Ki([I()],Hi.prototype,"tabIdx",void 0),Hi=Ki([E("wui-input-text")],Hi);const Vi=t` 1644 :host { 1645 position: relative; 1646 display: inline-block; 1647 width: 100%; 1648 } 1649`;let Fi=class extends o{constructor(){super(...arguments),this.inputComponentRef=ji()}render(){return r` 1650 <wui-input-text 1651 ${Li(this.inputComponentRef)} 1652 placeholder="Search wallet" 1653 icon="search" 1654 type="search" 1655 enterKeyHint="search" 1656 size="sm" 1657 > 1658 <wui-input-element @click=${this.clearValue} icon="close"></wui-input-element> 1659 </wui-input-text> 1660 `}clearValue(){const t=this.inputComponentRef.value,e=null==t?void 0:t.inputElementRef.value;e&&(e.value="",e.focus(),e.dispatchEvent(new Event("input")))}};Fi.styles=[i,Vi],Fi=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a}([E("wui-search-bar")],Fi);const Yi=k`<svg viewBox="0 0 48 54" fill="none"> 1661 <path 1662 d="M43.4605 10.7248L28.0485 1.61089C25.5438 0.129705 22.4562 0.129705 19.9515 1.61088L4.53951 10.7248C2.03626 12.2051 0.5 14.9365 0.5 17.886V36.1139C0.5 39.0635 2.03626 41.7949 4.53951 43.2752L19.9515 52.3891C22.4562 53.8703 25.5438 53.8703 28.0485 52.3891L43.4605 43.2752C45.9637 41.7949 47.5 39.0635 47.5 36.114V17.8861C47.5 14.9365 45.9637 12.2051 43.4605 10.7248Z" 1663 /> 1664</svg>`,Gi=t` 1665 :host { 1666 display: flex; 1667 flex-direction: column; 1668 align-items: center; 1669 width: 104px; 1670 row-gap: var(--wui-spacing-xs); 1671 padding: var(--wui-spacing-xs) 10px; 1672 background-color: var(--wui-color-gray-glass-002); 1673 border-radius: clamp(0px, var(--wui-border-radius-xs), 20px); 1674 position: relative; 1675 } 1676 1677 wui-shimmer[data-type='network'] { 1678 border: none; 1679 -webkit-clip-path: var(--wui-path-network); 1680 clip-path: var(--wui-path-network); 1681 } 1682 1683 svg { 1684 position: absolute; 1685 width: 48px; 1686 height: 54px; 1687 z-index: 1; 1688 } 1689 1690 svg > path { 1691 stroke: var(--wui-color-gray-glass-010); 1692 stroke-width: 1px; 1693 } 1694 1695 @media (max-width: 350px) { 1696 :host { 1697 width: 100%; 1698 } 1699 } 1700`;var Ji=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let Qi=class extends o{constructor(){super(...arguments),this.type="wallet"}render(){return r` 1701 ${this.shimmerTemplate()} 1702 <wui-shimmer width="56px" height="20px" borderRadius="xs"></wui-shimmer> 1703 `}shimmerTemplate(){return"network"===this.type?r` <wui-shimmer 1704 data-type=${this.type} 1705 width="48px" 1706 height="54px" 1707 borderRadius="xs" 1708 ></wui-shimmer> 1709 ${Yi}`:r`<wui-shimmer width="56px" height="56px" borderRadius="xs"></wui-shimmer>`}};Qi.styles=[i,e,Gi],Ji([I()],Qi.prototype,"type",void 0),Qi=Ji([E("wui-card-select-loader")],Qi);const Xi=t` 1710 :host { 1711 display: grid; 1712 width: inherit; 1713 height: inherit; 1714 } 1715`;
1715var Zi=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let to=class extends o{render(){return this.style.cssText=`\n grid-template-rows: ${this.gridTemplateRows};\n grid-template-columns: ${this.gridTemplateColumns};\n justify-items: ${this.justifyItems};\n align-items: ${this.alignItems};\n justify-content: ${this.justifyContent};\n align-content: ${this.alignContent};\n column-gap: ${this.columnGap&&`var(--wui-spacing-${this.columnGap})`};\n row-gap: ${this.rowGap&&`var(--wui-spacing-${this.rowGap})`};\n gap: ${this.gap&&`var(--wui-spacing-${this.gap})`};\n padding-top: ${this.padding&&j.getSpacingStyles(this.padding,0)};\n padding-right: ${this.padding&&j.getSpacingStyles(this.padding,1)};\n padding-bottom: ${this.padding&&j.getSpacingStyles(this.padding,2)};\n padding-left: ${this.padding&&j.getSpacingStyles(this.padding,3)};\n margin-top: ${this.margin&&j.getSpacingStyles(this.margin,0)};\n margin-right: ${this.margin&&j.getSpacingStyles(this.margin,1)};\n margin-bottom: ${this.margin&&j.getSpacingStyles(this.margin,2)};\n margin-left: ${this.margin&&j.getSpacingStyles(this.margin,3)};\n `,r`<slot></slot>`}};to.styles=[i,Xi],Zi([I()],to.prototype,"gridTemplateRows",void 0),Zi([I()],to.prototype,"gridTemplateColumns",void 0),Zi([I()],to.prototype,"justifyItems",void 0),Zi([I()],to.prototype,"alignItems",void 0),Zi([I()],to.prototype,"justifyContent",void 0),Zi([I()],to.prototype,"alignContent",void 0),Zi([I()],to.prototype,"columnGap",void 0),Zi([I()],to.prototype,"rowGap",void 0),Zi([I()],to.prototype,"gap",void 0),Zi([I()],to.prototype,"padding",void 0),Zi([I()],to.prototype,"margin",void 0),to=Zi([E("wui-grid")],to);const eo=t` 1716 button { 1717 display: flex; 1718 flex-direction: column; 1719 justify-content: center; 1720 align-items: center; 1721 cursor: pointer; 1722 width: 104px; 1723 row-gap: var(--wui-spacing-xs); 1724 padding: var(--wui-spacing-s) var(--wui-spacing-0); 1725 background-color: var(--wui-color-gray-glass-002); 1726 border-radius: clamp(0px, var(--wui-border-radius-xs), 20px); 1727 transition: 1728 color var(--wui-duration-lg) var(--wui-ease-out-power-1), 1729 background-color var(--wui-duration-lg) var(--wui-ease-out-power-1), 1730 border-radius var(--wui-duration-lg) var(--wui-ease-out-power-1); 1731 will-change: background-color, color, border-radius; 1732 outline: none; 1733 border: none; 1734 } 1735 1736 button > wui-flex > wui-text { 1737 color: var(--wui-color-fg-100); 1738 max-width: 86px; 1739 white-space: nowrap; 1740 overflow: hidden; 1741 text-overflow: ellipsis; 1742 justify-content: center; 1743 } 1744 1745 button > wui-flex > wui-text.certified { 1746 max-width: 66px; 1747 } 1748 1749 button:hover:enabled { 1750 background-color: var(--wui-color-gray-glass-005); 1751 } 1752 1753 button:disabled > wui-flex > wui-text { 1754 color: var(--wui-color-gray-glass-015); 1755 } 1756 1757 [data-selected='true'] { 1758 background-color: var(--wui-color-accent-glass-020); 1759 } 1760 1761 @media (hover: hover) and (pointer: fine) { 1762 [data-selected='true']:hover:enabled { 1763 background-color: var(--wui-color-accent-glass-015); 1764 } 1765 } 1766 1767 [data-selected='true']:active:enabled { 1768 background-color: var(--wui-color-accent-glass-010); 1769 } 1770 1771 @media (max-width: 350px) { 1772 button { 1773 width: 100%; 1774 } 1775 } 1776`;var io=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let oo=class extends o{constructor(){super(),this.observer=new IntersectionObserver(()=>{}),this.visible=!1,this.imageSrc=void 0,this.imageLoading=!1,this.wallet=void 0,this.observer=new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting?(this.visible=!0,this.fetchImageSrc()):this.visible=!1})},{threshold:.01})}firstUpdated(){this.observer.observe(this)}disconnectedCallback(){this.observer.disconnect()}render(){var t,e;const i="certified"===(null==(t=this.wallet)?void 0:t.badge_type);return r` 1777 <button> 1778 ${this.imageTemplate()} 1779 <wui-flex flexDirection="row" alignItems="center" justifyContent="center" gap="3xs"> 1780 <wui-text 1781 variant="tiny-500" 1782 color="inherit" 1783 class=${T(i?"certified":void 0)} 1784 >${null==(e=this.wallet)?void 0:e.name}</wui-text 1785 > 1786 ${i?r`<wui-icon size="sm" name="walletConnectBrown"></wui-icon>`:null} 1787 </wui-flex> 1788 </button> 1789 `}imageTemplate(){var t,e;return!this.visible&&!this.imageSrc||this.imageLoading?this.shimmerTemplate():r` 1790 <wui-wallet-image 1791 size="md" 1792 imageSrc=${T(this.imageSrc)} 1793 name=${null==(t=this.wallet)?void 0:t.name} 1794 .installed=${null==(e=this.wallet)?void 0:e.installed} 1795 badgeSize="sm" 1796 > 1797 </wui-wallet-image> 1798 `}
1798shimmerTemplate(){return r`<wui-shimmer width="56px" height="56px" borderRadius="xs"></wui-shimmer>`}async fetchImageSrc(){this.wallet&&(this.imageSrc=h.getWalletImage(this.wallet),this.imageSrc||(this.imageLoading=!0,this.imageSrc=await h.fetchWalletImage(this.wallet.image_id),this.imageLoading=!1))}};oo.styles=eo,io([P()],oo.prototype,"visible",void 0),io([P()],oo.prototype,"imageSrc",void 0),io([P()],oo.prototype,"imageLoading",void 0),io([I()],oo.prototype,"wallet",void 0),oo=io([E("w3m-all-wallets-list-item")],oo);const ro=t` 1799 wui-grid { 1800 max-height: clamp(360px, 400px, 80vh); 1801 overflow: scroll; 1802 scrollbar-width: none; 1803 grid-auto-rows: min-content; 1804 grid-template-columns: repeat(auto-fill, 104px); 1805 } 1806 1807 @media (max-width: 350px) { 1808 wui-grid { 1809 grid-template-columns: repeat(2, 1fr); 1810 } 1811 } 1812 1813 wui-grid[data-scroll='false'] { 1814 overflow: hidden; 1815 } 1816 1817 wui-grid::-webkit-scrollbar { 1818 display: none; 1819 } 1820 1821 wui-loading-spinner { 1822 padding-top: var(--wui-spacing-l); 1823 padding-bottom: var(--wui-spacing-l); 1824 justify-content: center; 1825 grid-column: 1 / span 4; 1826 } 1827`;var no=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const ao="local-paginator";let so=class extends o{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.loading=!a.state.wallets.length,this.wallets=a.state.wallets,this.recommended=a.state.recommended,this.featured=a.state.featured,this.filteredWallets=a.state.filteredWallets,this.unsubscribe.push(a.subscribeKey("wallets",t=>this.wallets=t),a.subscribeKey("recommended",t=>this.recommended=t),a.subscribeKey("featured",t=>this.featured=t),a.subscribeKey("filteredWallets",t=>this.filteredWallets=t))}firstUpdated(){this.initialFetch(),this.createPaginationObserver()}disconnectedCallback(){var t;this.unsubscribe.forEach(t=>t()),null==(t=this.paginationObserver)||t.disconnect()}render(){return r` 1828 <wui-grid 1829 data-scroll=${!this.loading} 1830 .padding=${["0","s","s","s"]} 1831 columnGap="xxs" 1832 rowGap="l" 1833 justifyContent="space-between" 1834 > 1835 ${this.loading?this.shimmerTemplate(16):this.walletsTemplate()} 1836 ${this.paginationLoaderTemplate()} 1837 </wui-grid> 1838 `}async initialFetch(){var t;this.loading=!0;const e=null==(t=this.shadowRoot)?void 0:t.querySelector("wui-grid");e&&(await a.fetchWalletsByPage({page:1}),await e.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.loading=!1,e.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}shimmerTemplate(t,e){return[...Array(t)].map(()=>r` 1839 <wui-card-select-loader type="wallet" id=${T(e)}></wui-card-select-loader> 1840 `)}walletsTemplate(){var t;const e=(null==(t=this.filteredWallets)?void 0:t.length)>0?l.uniqueBy([...this.featured,...this.recommended,...this.filteredWallets],"id"):l.uniqueBy([...this.featured,...this.recommended,...this.wallets],"id");return f.markWalletsAsInstalled(e).map(t=>r` 1841 <w3m-all-wallets-list-item 1842 @click=${()=>this.onConnectWallet(t)} 1843 .wallet=${t} 1844 ></w3m-all-wallets-list-item> 1845 `)}paginationLoaderTemplate(){const{wallets:t,recommended:e,featured:i,count:o}=a.state,r=window.innerWidth<352?3:4,n=t.length+e.length;let s=Math.ceil(n/r)*r-n+r;return s-=t.length?i.length%r:0,0===o&&i.length>0?null:0===o||[...i,...t,...e].length<o?this.shimmerTemplate(s,ao):null}createPaginationObserver(){var t;const e=null==(t=this.shadowRoot)?void 0:t.querySelector(`#${ao}`);e&&(this.paginationObserver=new IntersectionObserver(([t])=>{if((null==t?void 0:t.isIntersecting)&&!this.loading){const{page:t,count:e,wallets:i}=a.state;i.length<e&&a.fetchWalletsByPage({page:t+1})}}),this.paginationObserver.observe(e))}onConnectWallet(t){n.selectWalletConnector(t)}};so.styles=ro,no([P()],so.prototype,"loading",void 0),no([P()],so.prototype,"wallets",void 0),no([P()],so.prototype,"recommended",void 0),no([P()],so.prototype,"featured",void 0),no([P()],so.prototype,"filteredWallets",void 0),so=no([E("w3m-all-wallets-list")],so);const lo=t` 1846 wui-grid, 1847 wui-loading-spinner, 1848 wui-flex { 1849 height: 360px; 1850 } 1851 1852 wui-grid { 1853 overflow: scroll; 1854 scrollbar-width: none; 1855 grid-auto-rows: min-content; 1856 grid-template-columns: repeat(auto-fill, 104px); 1857 } 1858 1859 wui-grid[data-scroll='false'] { 1860 overflow: hidden; 1861 } 1862 1863 wui-grid::-webkit-scrollbar {
1864 display: none; 1865 } 1866 1867 wui-loading-spinner { 1868 justify-content: center; 1869 align-items: center; 1870 } 1871 1872 @media (max-width: 350px) { 1873 wui-grid { 1874 grid-template-columns: repeat(2, 1fr); 1875 } 1876 } 1877`;var co=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let uo=class extends o{constructor(){super(...arguments),this.prevQuery="",this.prevBadge=void 0,this.loading=!0,this.query=""}render(){return this.onSearch(),this.loading?r`<wui-loading-spinner color="accent-100"></wui-loading-spinner>`:this.walletsTemplate()}async onSearch(){this.query.trim()===this.prevQuery.trim()&&this.badge===this.prevBadge||(this.prevQuery=this.query,this.prevBadge=this.badge,this.loading=!0,await a.searchWallet({search:this.query,badge:this.badge}),this.loading=!1)}walletsTemplate(){const{search:t}=a.state,e=f.markWalletsAsInstalled(t);return t.length?r` 1878 <wui-grid 1879 data-testid="wallet-list" 1880 .padding=${["0","s","s","s"]} 1881 rowGap="l" 1882 columnGap="xs" 1883 justifyContent="space-between" 1884 > 1885 ${e.map(t=>r` 1886 <w3m-all-wallets-list-item 1887 @click=${()=>this.onConnectWallet(t)} 1888 .wallet=${t} 1889 data-testid="wallet-search-item-${t.id}" 1890 ></w3m-all-wallets-list-item> 1891 `)} 1892 </wui-grid> 1893 `:r` 1894 <wui-flex 1895 data-testid="no-wallet-found" 1896 justifyContent="center" 1897 alignItems="center" 1898 gap="s" 1899 flexDirection="column" 1900 > 1901 <wui-icon-box 1902 size="lg" 1903 iconColor="fg-200" 1904 backgroundColor="fg-300" 1905 icon="wallet" 1906 background="transparent" 1907 ></wui-icon-box> 1908 <wui-text data-testid="no-wallet-found-text" color="fg-200" variant="paragraph-500"> 1909 No Wallet found 1910 </wui-text> 1911 </wui-flex> 1912 `}onConnectWallet(t){n.selectWalletConnector(t)}};uo.styles=lo,co([P()],uo.prototype,"loading",void 0),co([I()],uo.prototype,"query",void 0),co([I()],uo.prototype,"badge",void 0),uo=co([E("w3m-all-wallets-search")],uo);var ho=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let po=class extends o{constructor(){super(...arguments),this.search="",this.onDebouncedSearch=l.debounce(t=>{this.search=t})}render(){const t=this.search.length>=2;return r` 1913 <wui-flex .padding=${["0","s","s","s"]} gap="xs"> 1914 <wui-search-bar @inputChange=${this.onInputChange.bind(this)}></wui-search-bar> 1915 <wui-certified-switch 1916 ?checked=${this.badge} 1917 @click=${this.onClick.bind(this)} 1918 data-testid="wui-certified-switch" 1919 ></wui-certified-switch> 1920 ${this.qrButtonTemplate()} 1921 </wui-flex> 1922 ${t||this.badge?r`<w3m-all-wallets-search 1923 query=${this.search} 1924 badge=${T(this.badge)} 1925 ></w3m-all-wallets-search>`:r`<w3m-all-wallets-list badge=${T(this.badge)}></w3m-all-wallets-list>`} 1926 `}onInputChange(t){this.onDebouncedSearch(t.detail)}onClick(){"certified"!==this.badge?(this.badge="certified",y.showSvg("Only WalletConnect certified",{icon:"walletConnectBrown",iconColor:"accent-100"})):this.badge=void 0}qrButtonTemplate(){return l.isMobile()?r` 1927 <wui-icon-box 1928 size="lg" 1929 iconSize="xl" 1930 iconColor="accent-100" 1931 backgroundColor="accent-100" 1932 icon="qrCode" 1933 background="transparent" 1934 border 1935 borderColor="wui-accent-glass-010" 1936 @click=${this.onWalletConnectQr.bind(this)} 1937 ></wui-icon-box> 1938 `:null}onWalletConnectQr(){u.push("ConnectingWalletConnect")}};ho([P()],po.prototype,"search",void 0),ho([P()],po.prototype,"badge",void 0),po=ho([E("w3m-all-wallets-view")],po);const go=t` 1939 button { 1940 column-gap: var(--wui-spacing-s); 1941 padding: 11px 18px 11px var(--wui-spacing-s); 1942 width: 100%; 1943 background-color: var(--wui-color-gray-glass-002); 1944 border-radius: var(--wui-border-radius-xs); 1945 color: var(--wui-color-fg-250); 1946 transition: 1947 color var(--wui-ease-out-power-1) var(--wui-duration-md), 1948 background-color var(--wui-ease-out-power-1) var(--wui-duration-md); 1949 will-change: color, background-color; 1950 } 1951 1952 button[data-iconvariant='square'], 1953 button[data-iconvariant='square-blue'] { 1954 padding: 6px 18px 6px 9px; 1955 } 1956 1957 button > wui-flex { 1958 flex: 1; 1959 } 1960 1961 button > wui-image { 1962 width: 32px; 1963 height: 32px; 1964 box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005); 1965 border-radius: var(--wui-border-radius-3xl); 1966 } 1967 1968 button > wui-icon { 1969 width: 36px; 1970 height: 36px; 1971 transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md); 1972 will-change: opacity; 1973 } 1974 1975 button > wui-icon-box[data-variant='blue'] { 1976 box-shadow: 0 0 0 2px var(--wui-color-accent-glass-005); 1977 } 1978 1979 button > wui-icon-box[data-variant='overlay'] { 1980 box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005); 1981 } 1982 1983 button > wui-icon-box[data-variant='square-blue'] { 1984 border-radius: var(--wui-border-radius-3xs); 1985 position: relative; 1986 border: none; 1987 width: 36px; 1988 height: 36px; 1989 } 1990 1991 button > wui-icon-box[data-variant='square-blue']::after { 1992 content: ''; 1993 position: absolute; 1994 top: 0; 1995 bottom: 0; 1996 left: 0; 1997 right: 0; 1998 border-radius: inherit; 1999 border: 1px solid var(--wui-color-accent-glass-010); 2000 pointer-events: none; 2001 } 2002 2003 button > wui-icon:last-child { 2004 width: 14px; 2005 height: 14px; 2006 } 2007 2008 button:disabled { 2009 color: var(--wui-color-gray-glass-020); 2010 } 2011 2012 button[data-loading='true'] > wui-icon { 2013 opacity: 0; 2014 } 2015 2016 wui-loading-spinner { 2017 position: absolute; 2018 right: 18px; 2019 top: 50%; 2020 transform: translateY(-50%); 2021 } 2022`;
2022var wo=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let fo=class extends o{constructor(){super(...arguments),this.tabIdx=void 0,this.variant="icon",this.disabled=!1,this.imageSrc=void 0,this.alt=void 0,this.chevron=!1,this.loading=!1}render(){return r` 2023 <button 2024 ?disabled=${!!this.loading||Boolean(this.disabled)} 2025 data-loading=${this.loading} 2026 data-iconvariant=${T(this.iconVariant)} 2027 tabindex=${T(this.tabIdx)} 2028 > 2029 ${this.loadingTemplate()} ${this.visualTemplate()} 2030 <wui-flex gap="3xs"> 2031 <slot></slot> 2032 </wui-flex> 2033 ${this.chevronTemplate()} 2034 </button> 2035 `}visualTemplate(){if("image"===this.variant&&this.imageSrc)return r`<wui-image src=${this.imageSrc} alt=${this.alt??"list item"}></wui-image>`;if("square"===this.iconVariant&&this.icon&&"icon"===this.variant)return r`<wui-icon name=${this.icon}></wui-icon>`;if("icon"===this.variant&&this.icon&&this.iconVariant){const t=["blue","square-blue"].includes(this.iconVariant)?"accent-100":"fg-200",e="square-blue"===this.iconVariant?"mdl":"md",i=this.iconSize?this.iconSize:e;return r` 2036 <wui-icon-box 2037 data-variant=${this.iconVariant} 2038 icon=${this.icon} 2039 iconSize=${i} 2040 background="transparent" 2041 iconColor=${t} 2042 backgroundColor=${t} 2043 size=${e} 2044 ></wui-icon-box> 2045 `}return null}loadingTemplate(){return this.loading?r`<wui-loading-spinner 2046 data-testid="wui-list-item-loading-spinner" 2047 color="fg-300" 2048 ></wui-loading-spinner>`:r``}chevronTemplate(){return this.chevron?r`<wui-icon size="inherit" color="fg-200" name="chevronRight"></wui-icon>`:null}};fo.styles=[i,e,go],wo([I()],fo.prototype,"icon",void 0),wo([I()],fo.prototype,"iconSize",void 0),wo([I()],fo.prototype,"tabIdx",void 0),wo([I()],fo.prototype,"variant",void 0),wo([I()],fo.prototype,"iconVariant",void 0),wo([I({type:Boolean})],fo.prototype,"disabled",void 0),wo([I()],fo.prototype,"imageSrc",void 0),wo([I()],fo.prototype,"alt",void 0),wo([I({type:Boolean})],fo.prototype,"chevron",void 0),wo([I({type:Boolean})],fo.prototype,"loading",void 0),fo=wo([E("wui-list-item")],fo);let bo=class extends o{constructor(){var t;super(...arguments),this.wallet=null==(t=u.state.data)?void 0:t.wallet}render(){if(!this.wallet)throw new Error("w3m-downloads-view");return r` 2049 <wui-flex gap="xs" flexDirection="column" .padding=${["s","s","l","s"]}> 2050 ${this.chromeTemplate()} ${this.iosTemplate()} ${this.androidTemplate()} 2051 ${this.homepageTemplate()} 2052 </wui-flex> 2053 `}chromeTemplate(){var t;return(null==(t=this.wallet)?void 0:t.chrome_store)?r`<wui-list-item 2054 variant="icon" 2055 icon="chromeStore" 2056 iconVariant="square" 2057 @click=${this.onChromeStore.bind(this)} 2058 chevron 2059 > 2060 <wui-text variant="paragraph-500" color="fg-100">Chrome Extension</wui-text> 2061 </wui-list-item>`:null}iosTemplate(){var t;return(null==(t=this.wallet)?void 0:t.app_store)?r`<wui-list-item 2062 variant="icon" 2063 icon="appStore" 2064 iconVariant="square" 2065 @click=${this.onAppStore.bind(this)} 2066 chevron 2067 > 2068 <wui-text variant="paragraph-500" color="fg-100">iOS App</wui-text> 2069 </wui-list-item>`:null}androidTemplate(){var t;return(null==(t=this.wallet)?void 0:t.play_store)?r`<wui-list-item 2070 variant="icon" 2071 icon="playStore" 2072 iconVariant="square" 2073 @click=${this.onPlayStore.bind(this)} 2074 chevron 2075 > 2076 <wui-text variant="paragraph-500" color="fg-100">Android App</wui-text> 2077 </wui-list-item>`:null}homepageTemplate(){var t;return(null==(t=this.wallet)?void 0:t.homepage)?r` 2078 <wui-list-item 2079 variant="icon" 2080 icon="browser" 2081 iconVariant="square-blue" 2082 @click=${this.onHomePage.bind(this)} 2083 chevron 2084 > 2085 <wui-text variant="paragraph-500" color="fg-100">Website</wui-text> 2086 </wui-list-item> 2087 `:null}onChromeStore(){var t;(null==(t=this.wallet)?void 0:t.chrome_store)&&l.openHref(this.wallet.chrome_store,"_blank")}onAppStore(){var t;(null==(t=this.wallet)?void 0:t.app_store)&&l.openHref(this.wallet.app_store,"_blank")}onPlayStore(){var t;(null==(t=this.wallet)?void 0:t.play_store)&&l.openHref(this.wallet.play_store,"_blank")}onHomePage(){var t;(null==(t=this.wallet)?void 0:t.homepage)&&l.openHref(this.wallet.homepage,"_blank")}};
2087bo=function(t,e,i,o){var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a}([E("w3m-downloads-view")],bo);export{po as W3mAllWalletsView,Pi as W3mConnectingWcBasicView,bo as W3mDownloadsView};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.