PageSourceSearch

https://static.kinguin.net/madka/41.61.7/dist/vendors-37b2a536.d9096ad3e32e1e0c220f.js

js kinguin.net collected 2026-09-24 15:32:41 UTC 33,460 bytes, 468 lines download raw bytes

1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[3794],{280516:(e,t,i)=>{i.d(t,{o:()=>g});var n=i(212618),s=i(925707),o=i(160031),a=i(495884),r=i(773337),c=i(451454),l=i(757019),d=i(596396),u=i(693571);i(460310),i(684197),i(945090),i(387138),i(846524);const h=n.AH`
2  :host > wui-grid {
3    max-height: 360px;
4    overflow: auto;
5  }
6
7  wui-flex {
8    transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);
9    will-change: opacity;
10  }
11
12  wui-grid::-webkit-scrollbar {
13    display: none;
14  }
15
16  wui-flex.disabled {
17    opacity: 0.3;
18    pointer-events: none;
19    user-select: none;
20  }
21`;var p=function(e,t,i,n){var s,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let g=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.selectedCurrency=a.aG.state.purchaseCurrencies,this.tokens=a.aG.state.purchaseCurrencies,this.tokenImages=r.j.state.tokenImages,this.checked=c.o.state.isLegalCheckboxChecked,this.unsubscribe.push(a.aG.subscribe(e=>{this.selectedCurrency=e.purchaseCurrencies,this.tokens=e.purchaseCurrencies}),r.j.subscribeKey("tokenImages",e=>this.tokenImages=e),c.o.subscribeKey("isLegalCheckboxChecked",e=>{this.checked=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const{termsConditionsUrl:e,privacyPolicyUrl:t}=l.H.state,i=l.H.state.features?.legalCheckbox,s=Boolean(e||t)&&Boolean(i)&&!this.checked;return n.qy`
22      <w3m-legal-checkbox></w3m-legal-checkbox>
23      <wui-flex
24        flexDirection="column"
25        .padding=${["0","s","s","s"]}
26        gap="xs"
27        class=${(0,o.J)(s?"disabled":void 0)}
28      >
29        ${this.currenciesTemplate(s)}
30      </wui-flex>
31      <w3m-legal-footer></w3m-legal-footer>
32    `}currenciesTemplate(e=!1){return this.tokens.map(t=>n.qy`
33        <wui-list-item
34          imageSrc=${(0,o.J)(this.tokenImages?.[t.symbol])}
35          @click=${()=>this.selectToken(t)}
36          variant="image"
37          tabIdx=${(0,o.J)(e?-1:void 0)}
38        >
39          <wui-flex gap="3xs" alignItems="center">
40            <wui-text variant="paragraph-500" color="fg-100">${t.name}</wui-text>
41            <wui-text variant="small-400" color="fg-200">${t.symbol}</wui-text>
42          </wui-flex>
43        </wui-list-item>
44      `)}selectToken(e){e&&(a.aG.setPurchaseCurrency(e),d.W.close())}};g.styles=h,p([(0,s.wk)()],g.prototype,"selectedCurrency",void 0),p([(0,s.wk)()],g.prototype,"tokens",void 0),p([(0,s.wk)()],g.prototype,"tokenImages",void 0),p([(0,s.wk)()],g.prototype,"checked",void 0),g=p([(0,u.EM)("w3m-onramp-token-select-view")],g)},379905:(e,t,i)=>{i.d(t,{M:()=>R});var n=i(212618),s=i(925707),o=i(153720),a=i(824376),r=i(975910),c=i(806056),l=i(236010),d=i(863450),u=i(757019),h=i(879177),p=i(808577),g=i(527601),w=i(121871),m=i(127508),b=i(226742),f=i(778508),y=i(693571),v=(i(823501),i(150905),i(658461),i(51636),i(77616),i(246026),i(684197),i(495726),i(487713),i(945090),i(335306)),x=i(231035);const C=n.AH`
45  :host {
46    --connect-scroll--top-opacity: 0;
47    --connect-scroll--bottom-opacity: 0;
48  }
49
50  .balance-amount {
51    flex: 1;
52  }
53
54  .wallet-list {
55    scrollbar-width: none;
56    overflow-y: scroll;
57    overflow-x: hidden;
58    transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);
59    will-change: opacity;
60    mask-image: linear-gradient(
61      to bottom,
62      rgba(0, 0, 0, calc(1 - var(--connect-scroll--top-opacity))) 0px,
63      rgba(200, 200, 200, calc(1 - var(--connect-scroll--top-opacity))) 1px,
64      black 40px,
65      black calc(100% - 40px),
66      rgba(155, 155, 155, calc(1 - var(--connect-scroll--bottom-opacity))) calc(100% - 1px),
67      rgba(0, 0, 0, calc(1 - var(--connect-scroll--bottom-opacity))) 100%
68    );
69  }
70
71  .active-wallets {
72    background-color: var(--wui-color-gray-glass-002);
73    border-radius: var(--wui-border-radius-xs);
74  }
75
76  .active-wallets-box {
77    height: 330px;
78  }
79
80  .empty-wallet-list-box {
81    height: 400px;
82  }
83
84  .empty-box {
85    width: 100%;
86    padding: var(--wui-spacing-l);
87    background-color: var(--wui-color-gray-glass-002);
88    border-radius: var(--wui-border-radius-xs);
89  }
90
91  wui-separator {
92    margin: var(--wui-spacing-xs) 0 var(--wui-spacing-xs) 0;
93  }
94
95  .active-connection {
96    padding: var(--wui-spacing-xs);
97  }
98
99  .recent-connection {
100    padding: var(--wui-spacing-xs) 0 var(--wui-spacing-xs) 0;
101  }
102
103  @media (max-width: 430px) {
104    .active-wallets-box,
105    .empty-wallet-list-box {
106      height: auto;
107      max-height: clamp(360px, 470px, 80vh);
108    }
109  }
110`;var A=function(e,t,i,n){var s,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};const k={START:4,END:6},$={SIZE:"md",ICON:"lightbulb"},S=50,I=[0,1],E={eip155:"ethereum",solana:"solana",bip122:"bitcoin"},T=[{namespace:"eip155",icon:E.eip155,label:"EVM"},{namespace:"solana",icon:E.solana,label:"Solana"},{namespace:"bip122",icon:E.bip122,label:"Bitcoin"}],N={eip155:{title:"Add EVM Wallet",description:"Add your first EVM wallet"},solana:{title:"Add Solana Wallet",description:"Add your first Solana wallet"},bip122:{title:"Add Bitcoin Wallet",description:"Add your first Bitcoin wallet"}};let R=class extends n.WF{constructor(){super(),this.unsubscribers=[],this.currentTab=0,this.namespace=c.W.state.activeChain,this.namespaces=Array.from(c.W.state.chains.keys()),this.caipAddress=void 0,this.profileName=void 0,this.activeConnectorIds=l.a.state.activeConnectorIds,this.lastSelectedAddress="",this.lastSelectedConnectorId="",this.isSwitching=!1,this.caipNetwork=c.W.state.activeCaipNetwork,this.user=d.U.state.user,this.remoteFeatures=u.H.state.remoteFeatures,this.tabWidth="",this.currentTab=this.namespace?this.namespaces.indexOf(this.namespace):0,this.caipAddress=c.W.getAccountData(this.namespace)?.caipAddress,this.profileName=c.W.getAccountData(this.namespace)?.profileName,this.unsubscribers.push(h.x.subscribeKey("connections",()=>this.onConnectionsChange()),h.x.subscribeKey("recentConnections",()=>this.requestUpdate()),l.a.subscribeKey("activeConnectorIds",e=>{this.activeConnectorIds=e}),c.W.subscribeKey("activeCaipNetwork",e=>this.caipNetwork=e),d.U.subscribeKey("user",e=>this.user=e),u.H.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e)),this.chainListener=c.W.subscribeChainProp("accountState",e=>{this.caipAddress=e?.caipAddress,this.profileName=e?.profileName},this.namespace)}
110disconnectedCallback(){this.unsubscribers.forEach(e=>e()),this.resizeObserver?.disconnect(),this.tabsResizeObserver?.disconnect(),this.removeScrollListener(),this.chainListener?.()}firstUpdated(){const e=this.shadowRoot?.querySelector(".wallet-list"),t=this.shadowRoot?.querySelector("wui-tabs");if(!e)return;const i=()=>this.updateScrollOpacity(e);if(requestAnimationFrame(i),e.addEventListener("scroll",i),this.resizeObserver=new ResizeObserver(i),this.resizeObserver.observe(e),i(),t){const e=()=>{const e=T.filter(e=>this.namespaces.includes(e.namespace)).length;if(e>1){const t=this.getBoundingClientRect()?.width,i=(t-32-8)/e;this.tabWidth=`${i}px`,this.requestUpdate()}};this.tabsResizeObserver=new ResizeObserver(e),this.tabsResizeObserver.observe(this),e()}}render(){const e=this.namespace;if(!e)throw new Error("Namespace is not set");return n.qy`
111      <wui-flex flexDirection="column" .padding=${["0","l","l","l"]} gap="l">
112        ${this.renderTabs()} ${this.renderHeader(e)} ${this.renderConnections(e)}
113        ${this.renderAddConnectionButton(e)}
114      </wui-flex>
115    `}renderTabs(){const e=T.filter(e=>this.namespaces.includes(e.namespace));return e.length>1?n.qy`
116        <wui-tabs
117          .onTabChange=${e=>this.handleTabChange(e)}
118          .activeTab=${this.currentTab}
119          localTabWidth=${this.tabWidth}
120          .tabs=${e}
121        ></wui-tabs>
122      `:null}renderHeader(e){const t=this.getActiveConnections(e).flatMap(({accounts:e})=>e).length+(this.caipAddress?1:0);return n.qy`
123      <wui-flex alignItems="center" columnGap="3xs">
124        <wui-icon
125          name=${E[e]??E.eip155}
126          size="lg"
127        ></wui-icon>
128        <wui-text color="fg-200" variant="small-400"
129          >${t>1?"Wallets":"Wallet"}</wui-text
130        >
131        <wui-text
132          color="fg-100"
133          variant="small-400"
134          class="balance-amount"
135          data-testid="balance-amount"
136        >
137          ${t}
138        </wui-text>
139        <wui-link
140          color="fg-200"
141          @click=${()=>h.x.disconnect({namespace:e})}
142          ?disabled=${!this.hasAnyConnections(e)}
143          data-testid="disconnect-all-button"
144        >
145          Disconnect All
146        </wui-link>
147      </wui-flex>
148    `}renderConnections(e){const t=this.hasAnyConnections(e),i={"wallet-list":!0,"active-wallets-box":t,"empty-wallet-list-box":!t};return n.qy`
149      <wui-flex flexDirection="column" class=${(0,o.H)(i)} rowGap="s">
150        ${t?this.renderActiveConnections(e):this.renderEmptyState(e)}
151      </wui-flex>
152    `}renderActiveConnections(e){const t=this.getActiveConnections(e),i=this.activeConnectorIds[e],s=this.getPlainAddress();return n.qy`
153      ${s||i||t.length>0?n.qy`<wui-flex
154            flexDirection="column"
155            .padding=${["l","0","xs","0"]}
156            class="active-wallets"
157          >
158            ${this.renderActiveProfile(e)} ${this.renderActiveConnectionsList(e)}
159          </wui-flex>`:null}
160      ${this.renderRecentConnections(e)}
161    `}renderActiveProfile(e){const t=this.activeConnectorIds[e];if(!t)return null;const{connections:i}=p.b.getConnectionsData(e),s=l.a.getConnectorById(t),o=g.$.getConnectorImage(s),r=this.getPlainAddress();if(!r)return null;const c=e===a.o.CHAIN.BITCOIN,d=x.X.getAuthData({connectorId:t,accounts:[]}),u=this.getActiveConnections(e).flatMap(e=>e.accounts).length>0,h=i.find(e=>e.connectorId===t),w=h?.accounts.filter(e=>!v.y.isLowerCaseMatch(e.address,r));return n.qy`
162      <wui-flex flexDirection="column" .padding=${["0","l","0","l"]}>
163        <wui-active-profile-wallet-item
164          address=${r}
165          alt=${s?.name}
166          .content=${this.getProfileContent({address:r,connections:i,connectorId:t,namespace:e})}
167          .charsStart=${k.START}
168          .charsEnd=${k.END}
169          .icon=${d.icon}
170          .iconSize=${d.iconSize}
171          .iconBadge=${this.isSmartAccount(r)?$.ICON:void 0}
172          .iconBadgeSize=${this.isSmartAccount(r)?$.SIZE:void 0}
173          imageSrc=${o}
174          ?enableMoreButton=${d.isAuth}
175          @copy=${()=>this.handleCopyAddress(r)}
176          @disconnect=${()=>this.handleDisconnect(e,{id:t})}
177          @switch=${()=>{c&&h&&w?.[0]&&this.handleSwitchWallet(h,w[0].address,e)}}
178          @externalLink=${()=>this.handleExternalLink(r)}
179          @more=${()=>this.handleMore()}
180          data-testid="wui-active-profile-wallet-item"
181        ></wui-active-profile-wallet-item>
182        ${u?n.qy`<wui-separator></wui-separator>`:null}
183      </wui-flex>
184    `}renderActiveConnectionsList(e){const t=this.getActiveConnections(e);return 0===t.length?null:n.qy`
185      <wui-flex flexDirection="column" .padding=${["0","xs","0","xs"]}>
186        ${this.renderConnectionList(t,!1,e)}
187      </wui-flex>
188    `}renderRecentConnections(e){const{recentConnections:t}=p.b.getConnectionsData(e);return 0===t.flatMap(e=>e.accounts).length?null:n.qy`
189      <wui-flex flexDirection="column" .padding=${["0","xs","0","xs"]} rowGap="xs">
190        <wui-text color="fg-200" variant="micro-500" data-testid="recently-connected-text"
191          >RECENTLY CONNECTED</wui-text
192        >
193        <wui-flex flexDirection="column" .padding=${["0","xs","0","xs"]}>
194          ${this.renderConnectionList(t,!0,e)}
195        </wui-flex>
196      </wui-flex>
197    `}renderConnectionList(e,t,i){return e.filter(e=>e.accounts.length>0).map((e,s)=>{const o=l.a.getConnectorById(e.connectorId),a=g.$.getConnectorImage(o)??"",r=x.X.getAuthData(e);return e.accounts.map((o,c)=>{const l=0!==s||0!==c,d=this.isAccountLoading(e.connectorId,o.address);return n.qy`
198            <wui-flex flexDirection="column">
199              ${l?n.qy`<wui-separator></wui-separator>`:null}
200              <wui-inactive-profile-wallet-item
201                address=${o.address}
202                alt=${e.connectorId}
203                buttonLabel=${t?"Connect":"Switch"}
204                buttonVariant=${t?"neutral":"accent"}
205                rightIcon=${t?"bin":"off"}
206                rightIconSize="sm"
207                class=${t?"recent-connection":"active-connection"}
208                data-testid=${t?"recent-connection":"active-connection"}
209                imageSrc=${a}
210                .iconBadge=${this.isSmartAccount(o.address)?$.ICON:void 0}
211                .iconBadgeSize=${this.isSmartAccount(o.address)?$.SIZE:void 0}
212                .icon=${r.icon}
213                .iconSize=${r.iconSize}
214                .loading=${d}
215                .showBalance=${!1}
216                .charsStart=${k.START}
217                .charsEnd=${k.END}
218                @buttonClick=${()=>this.handleSwitchWallet(e,o.address,i)}
219                @iconClick=${()=>this.handleWalletAction({connection:e,address:o.address,isRecentConnection:t,namespace:i})}
220              ></wui-inactive-profile-wallet-item>
221            </wui-flex>
222          `})})}renderAddConnectionButton(e){if(!this.isMultiWalletEnabled()&&this.caipAddress)return null;if(!this.hasAnyConnections(e))return null;const{title:t}=this.getChainLabelInfo(e);return n.qy`
223      <wui-list-item
224        variant="icon"
225        iconVariant="overlay"
226        icon="plus"
227        iconSize="sm"
228        ?chevron=${!0}
229        @click=${()=>this.handleAddConnection(e)}
230        data-testid="add-connection-button"
231      >
232        <wui-text variant="paragraph-500" color="fg-200">${t}</wui-text>
233      </wui-list-item>
234    `}renderEmptyState(e){const{title:t,description:i}=this.getChainLabelInfo(e);return n.qy`
235      <wui-flex alignItems="flex-start" class="empty-template" data-testid="empty-template">
236        <wui-flex
237          flexDirection="column"
238          alignItems="center"
239          justifyContent="center"
240          rowGap="s"
241          class="empty-box"
242        >
243          <wui-icon-box
244            size="lg"
245            icon="wallet"
246            background="gray"
247            iconColor="fg-200"
248            backgroundColor="glass-002"
249          ></wui-icon-box>
250
251          <wui-flex flexDirection="column" alignItems="center" justifyContent="center" gap="3xs">
252            <wui-text color="fg-100" variant="paragraph-500" data-testid="empty-state-text"
253              >No wallet connected</wui-text
254            >
255            <wui-text color="fg-200" variant="tiny-500" data-testid="empty-state-description"
256              >${i}</wui-text
257            >
258          </wui-flex>
259
260          <wui-button
261            variant="neutral"
262            size="md"
263            @click=${()=>this.handleAddConnection(e)}
264            data-testid="empty-state-button"
265          >
266            <wui-icon color="inherit" slot="iconLeft" name="plus"></wui-icon>
267            ${t}
268          </wui-button>
268
269        </wui-flex>
270      </wui-flex>
271    `}handleTabChange(e){const t=this.namespaces[e];t&&(this.chainListener?.(),this.currentTab=this.namespaces.indexOf(t),this.namespace=t,this.caipAddress=c.W.getAccountData(t)?.caipAddress,this.profileName=c.W.getAccountData(t)?.profileName,this.chainListener=c.W.subscribeChainProp("accountState",e=>{this.caipAddress=e?.caipAddress},t))}async handleSwitchWallet(e,t,i){try{this.isSwitching=!0,this.lastSelectedConnectorId=e.connectorId,this.lastSelectedAddress=t,await h.x.switchConnection({connection:e,address:t,namespace:i,closeModalOnConnect:!1,onChange({hasSwitchedAccount:e,hasSwitchedWallet:t}){t?w.P.showSuccess("Wallet switched"):e&&w.P.showSuccess("Account switched")}})}catch(e){w.P.showError("Failed to switch wallet")}finally{this.isSwitching=!1}}handleWalletAction(e){const{connection:t,address:i,isRecentConnection:n,namespace:s}=e;n?(m.i.deleteAddressFromConnection({connectorId:t.connectorId,address:i,namespace:s}),h.x.syncStorageConnections(),w.P.showSuccess("Wallet deleted")):this.handleDisconnect(s,{id:t.connectorId})}async handleDisconnect(e,{id:t}){try{await h.x.disconnect({id:t,namespace:e}),w.P.showSuccess("Wallet disconnected")}catch{w.P.showError("Failed to disconnect wallet")}}handleCopyAddress(e){b.w.copyToClopboard(e),w.P.showSuccess("Address copied")}handleMore(){f.I.push("AccountSettings")}handleExternalLink(e){const t=this.caipNetwork?.blockExplorers?.default.url;t&&b.w.openHref(`${t}/address/${e}`,"_blank")}handleAddConnection(e){l.a.setFilterByNamespace(e),f.I.push("Connect")}getChainLabelInfo(e){return N[e]??{title:"Add Wallet",description:"Add your first wallet"}}isSmartAccount(e){if(!this.namespace)return!1;const t=this.user?.accounts?.find(e=>"smartAccount"===e.type);return!(!t||!e)&&v.y.isLowerCaseMatch(t.address,e)}getPlainAddress(){return this.caipAddress?b.w.getPlainAddress(this.caipAddress):void 0}getActiveConnections(e){const t=this.activeConnectorIds[e],{connections:i}=p.b.getConnectionsData(e),[n]=i.filter(e=>v.y.isLowerCaseMatch(e.connectorId,t));if(!t)return i;const s=e===a.o.CHAIN.BITCOIN,{address:o}=this.caipAddress?r.C.parseCaipAddress(this.caipAddress):{};let c=[...o?[o]:[]];return s&&n&&(c=n.accounts.map(e=>e.address)||[]),p.b.excludeConnectorAddressFromConnections({connectorId:t,addresses:c,connections:i})}hasAnyConnections(e){const t=this.getActiveConnections(e),{recentConnections:i}=p.b.getConnectionsData(e);return Boolean(this.caipAddress)||t.length>0||i.length>0}isAccountLoading(e,t){return v.y.isLowerCaseMatch(this.lastSelectedConnectorId,e)&&v.y.isLowerCaseMatch(this.lastSelectedAddress,t)&&this.isSwitching}getProfileContent(e){const{address:t,connections:i,connectorId:n,namespace:s}=e,[o]=i.filter(e=>v.y.isLowerCaseMatch(e.connectorId,n));if(s===a.o.CHAIN.BITCOIN&&o?.accounts.every(e=>"string"==typeof e.type))return this.getBitcoinProfileContent(o.accounts,t);const r=x.X.getAuthData({connectorId:n,accounts:[]});return[{address:t,tagLabel:"Active",tagVariant:"success",enableButton:!0,profileName:this.profileName,buttonType:"disconnect",buttonLabel:"Disconnect",buttonVariant:"neutral",...r.isAuth?{description:this.isSmartAccount(t)?"Smart Account":"EOA Account"}:{}}]}getBitcoinProfileContent(e,t){const i=e.length>1,n=this.getPlainAddress();return e.map(e=>{const s=v.y.isLowerCaseMatch(e.address,n);let o="PAYMENT";return"ordinal"===e.type&&(o="ORDINALS"),{address:e.address,tagLabel:v.y.isLowerCaseMatch(e.address,t)?"Active":void 0,tagVariant:v.y.isLowerCaseMatch(e.address,t)?"success":void 0,enableButton:!0,...i?{label:o,alignItems:"flex-end",buttonType:s?"disconnect":"switch",buttonLabel:s?"Disconnect":"Switch",buttonVariant:s?"neutral":"accent"}:{alignItems:"center",buttonType:"disconnect",buttonLabel:"Disconnect",buttonVariant:"neutral"}}})}removeScrollListener(){const e=this.shadowRoot?.querySelector(".wallet-list");e&&e.removeEventListener("scroll",()=>this.handleConnectListScroll())}handleConnectListScroll(){const e=this.shadowRoot?.querySelector(".wallet-list");e&&this.updateScrollOpacity(e)}isMultiWalletEnabled(){return Boolean(this.remoteFeatures?.multiWallet)}updateScrollOpacity(e){e.style.setProperty("--connect-scroll--top-opacity",y.z8.interpolate([0,S],I,e.scrollTop).toString()),e.style.setProperty("--connect-scroll--bottom-opacity",y.z8.interpolate([0,S],I,e.scrollHeight-e.scrollTop-e.offsetHeight).toString())}onConnectionsChange(){if(this.isMultiWalletEnabled()&&this.namespace){const{connections:e}=p.b.getConnectionsData(this.namespace);0===e.length&&f.I.reset("ProfileWallets")}this.requestUpdate()}};R.styles=C,A([(0,s.wk)()],R.prototype,"currentTab",void 0),A([(0,s.wk)()],R.prototype,"namespace",void 0),A([(0,s.wk)()],R.prototype,"namespaces",void 0),A([(0,s.wk)()],R.prototype,"caipAddress",void 0),A([(0,s.wk)()],R.prototype,"profileName",void 0),A([(0,s.wk)()],R.prototype,"activeConnectorIds",void 0),A([(0,s.wk)()],R.prototype,"lastSelectedAddress",void 0),A([(0,s.wk)()],R.prototype,"lastSelectedConnectorId",void 0),A([(0,s.wk)()],R.prototype,"isSwitching",void 0),A([(0,s.wk)()],R.prototype,"caipNetwork",void 0),A([(0,s.wk)()],R.prototype,"user",void 0),A([(0,s.wk)()],R.prototype,"remoteFeatures",void 0),A([(0,s.wk)()],R.prototype,"tabWidth",void 0),R=A([(0,y.EM)("w3m-profile-wallets-view")],R)},543694:(e,t,i)=>{i.d(t,{u:()=>y});var n=i(212618),s=i(925707),o=i(607610),a=i(824376),r=i(741913),c=i(863450),l=i(226742),d=i(390184),u=i(974496),h=i(806056),p=i(121871),g=i(693571),w=(i(93812),i(460310),i(51636),i(264865),i(793373),i(638253),i(945090),i(110152)),m=i(234558);const b=n.AH`
272  wui-flex {
273    width: 100%;
274  }
275
276  .suggestion {
277    border: none;
278    width: 100%;
279    display: flex;
280    justify-content: space-between;
281    align-items: center;
282    background: var(--wui-color-gray-glass-002);
283    border-radius: var(--wui-border-radius-xs);
284    padding: var(--wui-spacing-m);
285  }
286
287  .suggestion:disabled {
288    opacity: 0.5;
289    cursor: default;
290  }
291
292  .suggestion:focus-visible:not(:disabled) {
293    outline: 1px solid var(--wui-color-gray-glass-020);
294    background-color: var(--wui-color-gray-glass-005);
295  }
296
297  .suggestion:hover:not(:disabled) {
298    background-color: var(--wui-color-gray-glass-005);
299  }
300
301  .suggested-name {
302    max-width: 75%;
303    overflow: hidden;
304    text-overflow: ellipsis;
305    white-space: nowrap;
306  }
307
308  form {
309    width: 100%;
310    position: relative;
311  }
312
313  .input-submit-button,
314  .input-loading-spinner {
315    position: absolute;
316    top: 26px;
317    transform: translateY(-50%);
318    right: 10px;
319  }
320`;var f=function(e,t,i,n){var s,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let y=class extends n.WF{constructor(){super(),this.formRef=(0,o._)(),this.usubscribe=[],this.name="",this.error="",this.loading=r.f.state.loading,this.suggestions=r.f.state.suggestions,this.profileName=c.U.state.profileName,this.onDebouncedNameInputChange=l.w.debounce(e=>{e.length<4?this.error="Name must be at least 4 characters long":m.y.isValidReownName(e)?(this.error="",r.f.getSuggestions(e)):this.error="The value is not a valid username"}),this.usubscribe.push(r.f.subscribe(e=>{this.suggestions=e.suggestions,this.loading=e.loading}),c.U.subscribeKey("profileName",e=>{this.profileName=e,e&&(this.error="You already own a name")}))}firstUpdated(){this.formRef.value?.addEventListener("keydown",this.onEnterKey.bind(this))}disconnectedCallback(){super.disconnectedCallback(),this.usubscribe.forEach(e
320=>e()),this.formRef.value?.removeEventListener("keydown",this.onEnterKey.bind(this))}render(){return n.qy`
321      <wui-flex
322        flexDirection="column"
323        alignItems="center"
324        gap="m"
325        .padding=${["0","s","m","s"]}
326      >
327        <form ${(0,o.K)(this.formRef)} @submit=${this.onSubmitName.bind(this)}>
328          <wui-ens-input
329            @inputChange=${this.onNameInputChange.bind(this)}
330            .errorMessage=${this.error}
331            .value=${this.name}
332            .onKeyDown=${this.onKeyDown.bind(this)}
333          >
334          </wui-ens-input>
335          ${this.submitButtonTemplate()}
336          <input type="submit" hidden />
337        </form>
338        ${this.templateSuggestions()}
339      </wui-flex>
340    `}submitButtonTemplate(){const e=this.suggestions.find(e=>e.name?.split(".")?.[0]===this.name&&e.registered);if(this.loading)return n.qy`<wui-loading-spinner
341        class="input-loading-spinner"
342        color="fg-200"
343      ></wui-loading-spinner>`;const t=`${this.name}${a.o.WC_NAME_SUFFIX}`;return n.qy`
344      <wui-icon-link
345        .disabled=${e}
346        class="input-submit-button"
347        size="sm"
348        icon="chevronRight"
349        iconColor=${e?"fg-200":"accent-100"}
350        @click=${()=>this.onSubmitName(t)}
351      >
352      </wui-icon-link>
353    `}onNameInputChange(e){const t=m.y.validateReownName(e.detail||"");this.name=t,this.onDebouncedNameInputChange(t)}onKeyDown(e){1!==e.key.length||m.y.isValidReownName(e.key)||e.preventDefault()}nameSuggestionTagTemplate(e){return this.loading?n.qy`<wui-loading-spinner color="fg-200"></wui-loading-spinner>`:e.registered?n.qy`<wui-tag variant="shade" size="lg">Registered</wui-tag>`:n.qy`<wui-tag variant="success" size="lg">Available</wui-tag>`}templateSuggestions(){return!this.name||this.name.length<4||this.error?null:n.qy`<wui-flex flexDirection="column" gap="xxs" alignItems="center">
354      ${this.suggestions.map(e=>n.qy`<button
355            .disabled=${e.registered||this.loading}
356            data-testid="account-name-suggestion"
357            class="suggestion"
358            @click=${()=>this.onSubmitName(e.name)}
359          >
360            <wui-text color="fg-100" variant="paragraph-400" class="suggested-name">
361              ${e.name}</wui-text
362            >${this.nameSuggestionTagTemplate(e)}
363          </button>`)}
364    </wui-flex>`}isAllowedToSubmit(e){const t=e.split(".")?.[0],i=this.suggestions.find(e=>e.name?.split(".")?.[0]===t&&e.registered);return!this.loading&&!this.error&&!this.profileName&&t&&r.f.validateName(t)&&!i}async onSubmitName(e){try{if(!this.isAllowedToSubmit(e))return;d.E.sendEvent({type:"track",event:"REGISTER_NAME_INITIATED",properties:{isSmartAccount:(0,u.lj)(h.W.state.activeChain)===w.Vl.ACCOUNT_TYPES.SMART_ACCOUNT,ensName:e}}),await r.f.registerName(e),d.E.sendEvent({type:"track",event:"REGISTER_NAME_SUCCESS",properties:{isSmartAccount:(0,u.lj)(h.W.state.activeChain)===w.Vl.ACCOUNT_TYPES.SMART_ACCOUNT,ensName:e}})}catch(t){p.P.showError(t.message),d.E.sendEvent({type:"track",event:"REGISTER_NAME_ERROR",properties:{isSmartAccount:(0,u.lj)(h.W.state.activeChain)===w.Vl.ACCOUNT_TYPES.SMART_ACCOUNT,ensName:e,error:t?.message||"Unknown error"}})}}onEnterKey(e){if("Enter"===e.key&&this.name&&this.isAllowedToSubmit(this.name)){const e=`${this.name}${a.o.WC_NAME_SUFFIX}`;this.onSubmitName(e)}}};y.styles=b,f([(0,s.MZ)()],y.prototype,"errorMessage",void 0),f([(0,s.wk)()],y.prototype,"name",void 0),f([(0,s.wk)()],y.prototype,"error",void 0),f([(0,s.wk)()],y.prototype,"loading",void 0),f([(0,s.wk)()],y.prototype,"suggestions",void 0),f([(0,s.wk)()],y.prototype,"profileName",void 0),y=f([(0,g.EM)("w3m-register-account-name-view")],y)},596032:(e,t,i)=>{i.d(t,{I:()=>d});var n=i(212618),s=i(645839),o=i(226742),a=i(778508),r=i(693571);i(658461),i(460310),i(51636),i(77616),i(744373),i(945090);const c=n.AH`
365  .continue-button-container {
366    width: 100%;
367  }
368`;var l=function(e,t,i,n){var s,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let d=class extends n.WF{render(){return n.qy`
369      <wui-flex
370        flexDirection="column"
371        alignItems="center"
372        gap="xxl"
373        .padding=${["0","0","l","0"]}
374      >
375        ${this.onboardingTemplate()} ${this.buttonsTemplate()}
376        <wui-link
377          @click=${()=>{o.w.openHref(s.T.URLS.FAQ,"_blank")}}
378        >
379          Learn more
380          <wui-icon color="inherit" slot="iconRight" name="externalLink"></wui-icon>
381        </wui-link>
382      </wui-flex>
383    `}onboardingTemplate(){return n.qy` <wui-flex
384      flexDirection="column"
385      gap="xxl"
386      alignItems="center"
387      .padding=${["0","xxl","0","xxl"]}
388    >
389      <wui-flex gap="s" alignItems="center" justifyContent="center">
390        <wui-icon-box
391          size="xl"
392          iconcolor="success-100"
393          backgroundcolor="success-100"
394          icon="checkmark"
395          background="opaque"
396        ></wui-icon-box>
397      </wui-flex>
398      <wui-flex flexDirection="column" alignItems="center" gap="s">
399        <wui-text align="center" variant="medium-600" color="fg-100">
400          Account name chosen successfully
401        </wui-text>
402        <wui-text align="center" variant="paragraph-400" color="fg-100">
403          You can now fund your account and trade crypto
404        </wui-text>
405      </wui-flex>
406    </wui-flex>`}buttonsTemplate(){return n.qy`<wui-flex
407      .padding=${["0","2l","0","2l"]}
408      gap="s"
409      class="continue-button-container"
410    >
411      <wui-button fullWidth size="lg" borderRadius="xs" @click=${this.redirectToAccount.bind(this)}
412        >Let's Go!
413      </wui-button>
413
414    </wui-flex>`}redirectToAccount(){a.I.replace("Account")}};d.styles=c,d=l([(0,r.EM)("w3m-register-account-name-success-view")],d)},821967:(e,t,i)=>{i.d(t,{G:()=>g});var n=i(212618),s=i(925707),o=i(778508),a=i(806056),r=i(495884),c=i(390184),l=i(226742),d=i(974496),u=i(693571),h=(i(460310),i(110152)),p=(i(190444),i(753261),function(e,t,i,n){var s,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a});let g=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.providers=r.aG.state.providers,this.unsubscribe.push(r.aG.subscribeKey("providers",e=>{this.providers=e}))}render(){return n.qy`
415      <wui-flex flexDirection="column" .padding=${["0","s","s","s"]} gap="xs">
416        ${this.onRampProvidersTemplate()}
417      </wui-flex>
418      <w3m-onramp-providers-footer></w3m-onramp-providers-footer>
419    `}onRampProvidersTemplate(){return this.providers.filter(e=>e.supportedChains.includes(a.W.state.activeChain??"eip155")).map(e=>n.qy`
420          <w3m-onramp-provider-item
421            label=${e.label}
422            name=${e.name}
423            feeRange=${e.feeRange}
424            @click=${()=>{this.onClickProvider(e)}}
425            ?disabled=${!e.url}
426            data-testid=${`onramp-provider-${e.name}`}
427          ></w3m-onramp-provider-item>
428        `)}onClickProvider(e){r.aG.setSelectedProvider(e),o.I.push("BuyInProgress"),l.w.openHref(r.aG.state.selectedProvider?.url||e.url,"popupWindow","width=600,height=800,scrollbars=yes"),c.E.sendEvent({type:"track",event:"SELECT_BUY_PROVIDER",properties:{provider:e.name,isSmartAccount:(0,d.lj)(a.W.state.activeChain)===h.Vl.ACCOUNT_TYPES.SMART_ACCOUNT}})}};p([(0,s.wk)()],g.prototype,"providers",void 0),g=p([(0,u.EM)("w3m-onramp-providers-view")],g)},856834:(e,t,i)=>{i.d(t,{m:()=>g});var n=i(212618),s=i(925707),o=i(160031),a=i(495884),r=i(773337),c=i(451454),l=i(757019),d=i(596396),u=i(693571);i(460310),i(684197),i(945090),i(387138),i(846524);const h=n.AH`
429  :host > wui-grid {
430    max-height: 360px;
431    overflow: auto;
432  }
433
434  wui-flex {
435    transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);
436    will-change: opacity;
437  }
438
439  wui-grid::-webkit-scrollbar {
440    display: none;
441  }
442
443  wui-flex.disabled {
444    opacity: 0.3;
445    pointer-events: none;
446    user-select: none;
447  }
448`;var p=function(e,t,i,n){var s,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let g=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.selectedCurrency=a.aG.state.paymentCurrency,this.currencies=a.aG.state.paymentCurrencies,this.currencyImages=r.j.state.currencyImages,this.checked=c.o.state.isLegalCheckboxChecked,this.unsubscribe.push(a.aG.subscribe(e=>{this.selectedCurrency=e.paymentCurrency,this.currencies=e.paymentCurrencies}),r.j.subscribeKey("currencyImages",e=>this.currencyImages=e),c.o.subscribeKey("isLegalCheckboxChecked",e=>{this.checked=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const{termsConditionsUrl:e,privacyPolicyUrl:t}=l.H.state,i=l.H.state.features?.legalCheckbox,s=Boolean(e||t)&&Boolean(i)&&!this.checked;return n.qy`
449      <w3m-legal-checkbox></w3m-legal-checkbox>
450      <wui-flex
451        flexDirection="column"
452        .padding=${["0","s","s","s"]}
453        gap="xs"
454        class=${(0,o.J)(s?"disabled":void 0)}
455      >
456        ${this.currenciesTemplate(s)}
457      </wui-flex>
458      <w3m-legal-footer></w3m-legal-footer>
459    `}currenciesTemplate(e=!1){return this.currencies.map(t=>n.qy`
460        <wui-list-item
461          imageSrc=${(0,o.J)(this.currencyImages?.[t.id])}
462          @click=${()=>this.selectCurrency(t)}
463          variant="image"
464          tabIdx=${(0,o.J)(e?-1:void 0)}
465        >
466          <wui-text variant="paragraph-500" color="fg-100">${t.id}</wui-text>
467        </wui-list-item>
468      `)}selectCurrency(e){e&&(a.aG.setPaymentCurrency(e),d.W.close())}};g.styles=h,p([(0,s.wk)()],g.prototype,"selectedCurrency",void 0),p([(0,s.wk)()],g.prototype,"currencies",void 0),p([(0,s.wk)()],g.prototype,"currencyImages",void 0),p([(0,s.wk)()],g.prototype,"checked",void 0),g=p([(0,u.EM)("w3m-onramp-fiat-select-view")],g)}}]);

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.