1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[4862],{1396:(e,t,i)=>{i.d(t,{G:()=>s});var r=i(212618),n=i(693571);i(460310),i(188287);const a=r.AH` 2 :host > wui-flex:first-child { 3 height: 500px; 4 overflow-y: auto; 5 overflow-x: hidden; 6 scrollbar-width: none; 7 } 8 9 :host > wui-flex:first-child::-webkit-scrollbar { 10 display: none; 11 } 12`;var o=function(e,t,i,r){var n,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(a<3?n(o):a>3?n(t,i,o):n(t,i))||o);return a>3&&o&&Object.defineProperty(t,i,o),o};let s=class extends r.WF{render(){return r.qy` 13 <wui-flex flexDirection="column" .padding=${["0","m","m","m"]} gap="s"> 14 <w3m-activity-list page="activity"></w3m-activity-list> 15 </wui-flex> 16 `}};s.styles=a,s=o([(0,n.EM)("w3m-transactions-view")],s)},70800:(e,t,i)=>{i.d(t,{o:()=>h});var r=i(212618),n=i(925707),a=i(308351),o=i(226742),s=i(732498),l=i(806056),c=i(778508),u=i(693571);i(460310),i(51636),i(77616),i(312965),i(744373),i(859625),i(495726),i(945090);const d=r.AH` 17 .contentContainer { 18 height: 440px; 19 overflow: scroll; 20 scrollbar-width: none; 21 } 22 23 .contentContainer::-webkit-scrollbar {
24 display: none; 25 } 26 27 wui-icon-box { 28 width: 40px; 29 height: 40px; 30 border-radius: var(--wui-border-radius-xxs); 31 } 32`;var w=function(e,t,i,r){var n,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(a<3?n(o):a>3?n(t,i,o):n(t,i))||o);return a>3&&o&&Object.defineProperty(t,i,o),o};let h=class extends r.WF{constructor(){super(),this.unsubscribe=[],this.tokenBalances=a.R.state.tokenBalances,this.search="",this.onDebouncedSearch=o.w.debounce(e=>{this.search=e}),this.fetchBalancesAndNetworkPrice(),this.unsubscribe.push(a.R.subscribe(e=>{this.tokenBalances=e.tokenBalances}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return r.qy` 33 <wui-flex flexDirection="column"> 34 ${this.templateSearchInput()} <wui-separator></wui-separator> ${this.templateTokens()} 35 </wui-flex> 36 `}async fetchBalancesAndNetworkPrice(){this.tokenBalances&&0!==this.tokenBalances?.length||(await this.fetchBalances(),await this.fetchNetworkPrice())}async fetchBalances(){await a.R.fetchTokenBalance(),a.R.fetchNetworkBalance()}async fetchNetworkPrice(){await s.GN.getNetworkTokenPrice()}templateSearchInput(){return r.qy` 37 <wui-flex gap="xs" padding="s"> 38 <wui-input-text 39 @inputChange=${this.onInputChange.bind(this)} 40 class="network-search-input" 41 size="sm" 42 placeholder="Search token" 43 icon="search" 44 ></wui-input-text> 45 </wui-flex> 46 `}templateTokens(){return this.tokens=this.tokenBalances?.filter(e=>e.chainId===l.W.state.activeCaipNetwork?.caipNetworkId),this.search?this.filteredTokens=this.tokenBalances?.filter(e=>e.name.toLowerCase().includes(this.search.toLowerCase())):this.filteredTokens=this.tokens,r.qy` 47 <wui-flex 48 class="contentContainer" 49 flexDirection="column" 50 .padding=${["0","s","0","s"]} 51 > 52 <wui-flex justifyContent="flex-start" .padding=${["m","s","s","s"]}> 53 <wui-text variant="paragraph-500" color="fg-200">Your tokens</wui-text> 54 </wui-flex> 55 <wui-flex flexDirection="column" gap="xs"> 56 ${this.filteredTokens&&this.filteredTokens.length>0?this.filteredTokens.map(e=>r.qy`<wui-list-token 57 @click=${this.handleTokenClick.bind(this,e)} 58 ?clickable=${!0} 59 tokenName=${e.name} 60 tokenImageUrl=${e.iconUrl} 61 tokenAmount=${e.quantity.numeric} 62 tokenValue=${e.value} 63 tokenCurrency=${e.symbol} 64 ></wui-list-token>`):r.qy`<wui-flex 65 .padding=${["4xl","0","0","0"]} 66 alignItems="center" 67 flexDirection="column" 68 gap="l" 69 > 70 <wui-icon-box 71 icon="coinPlaceholder" 72 size="inherit" 73 iconColor="fg-200" 74 backgroundColor="fg-200" 75 iconSize="lg" 76 ></wui-icon-box> 77 <wui-flex 78 class="textContent" 79 gap="xs" 80 flexDirection="column" 81 justifyContent="center" 82 flexDirection="column" 83 > 84 <wui-text variant="paragraph-500" align="center" color="fg-100" 85 >No tokens found</wui-text 86 > 87 <wui-text variant="small-400" align="center" color="fg-200" 88 >Your tokens will appear here</wui-text 89 > 90 </wui-flex> 91 <wui-link @click=${this.onBuyClick.bind(this)}>Buy</wui-link> 92 </wui-flex>`} 93 </wui-flex> 94 </wui-flex> 95 `}onBuyClick(){c.I.push("OnRampProviders")}onInputChange(e){this.onDebouncedSearch(e.detail)}handleTokenClick(e){a.R.setToken(e),a.R.setTokenAmount(void 0),c.I.goBack()}};h.styles=d,w([(0,n.wk)()],h.prototype,"tokenBalances",void 0),w([(0,n.wk)()],h.prototype,"tokens",void 0),w([(0,n.wk)()],h.prototype,"filteredTokens",void 0),w([(0,n.wk)()],h.prototype,"search",void 0),h=w([(0,u.EM)("w3m-wallet-send-select-token-view")],h)},76556:(e,t,i)=>{i.d(t,{v:()=>c});var r=i(778508),n=i(390184),a=i(226742),o=i(693571),s=i(661123),l=function(e,t,i,r){var n,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(a<3?n(o):a>3?n(t,i,o):n(t,i))||o);return a>3&&o&&Object.defineProperty(t,i,o),o};let c=class extends s.H{constructor(){super(),this.email=r.I.state.data?.email,this.onOtpSubmit=async e=>{try{this.authConnector&&(await this.authConnector.provider.updateEmailPrimaryOtp({otp:e}),n.E.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),r.I.replace("UpdateEmailSecondaryOtp",r.I.state.data))}catch(e){throw n.E.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL",properties:{message:a.w.parseError(e)}}),e}},this.onStartOver=()=>{r.I.replace("UpdateEmailWallet",r.I.state.data)}}};c=l([(0,o.EM)("w3m-update-email-primary-otp-view")],c)},124784:(e,t,i)=>{i.d(t,{k:()=>m});var r=i(212618),n=i(925707),a=i(308351),o=i(806056),s=i(121871),l=i(778508),c=i(390184),u=i(974496),d=i(693571),w=(i(658461),i(460310),i(51636),i(900493),i(945090),i(110152));i(717968);const h=r.AH` 96 wui-avatar, 97 wui-image { 98 display: ruby; 99 width: 32px; 100 height: 32px; 101 border-radius: var(--wui-border-radius-3xl); 102 } 103 104 .sendButton { 105 width: 70%; 106 --local-width: 100% !important; 107 --local-border-radius: var(--wui-border-radius-xs) !important; 108 } 109 110 .cancelButton { 111 width: 30%; 112 --local-width: 100% !important; 113 --local-border-radius: var(--wui-border-radius-xs) !important; 114 } 115`;var p=i(496763),f=function(e,t,i,r){var n,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(a<3?n(o):a>3?n(t,i,o):n(t,i))||o);return a>3&&o&&Object.defineProperty(t,i,o),o};let m=class extends r.WF{constructor(){super(),this.unsubscribe=[],this.token=a.R.state.token,this.sendTokenAmount=a.R.state.sendTokenAmount,this.receiverAddress=a.R.state.receiverAddress,this.receiverProfileName=a.R.state.receiverProfileName,this.receiverProfileImageUrl=a.R.state.receiverProfileImageUrl,this.caipNetwork=o.W.state.activeCaipNetwork,this.loading=a.R.state.loading,this.unsubscribe.push(a.R.subscribe(e=>{this.token=e.token,this.sendTokenAmount=e.sendTokenAmount,this.receiverAddress=e.receiverAddress,this.receiverProfileName=e.receiverProfileName,this.receiverProfileImageUrl=e.receiverProfileImageUrl,this.loading=e.loading}),o.W.subscribeKey("activeCaipNetwork",e=>this.caipNetwork=e))}
115disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return r.qy` <wui-flex flexDirection="column" .padding=${["0","l","l","l"]}> 116 <wui-flex gap="xs" flexDirection="column" .padding=${["0","xs","0","xs"]}> 117 <wui-flex alignItems="center" justifyContent="space-between"> 118 <wui-flex flexDirection="column" gap="4xs"> 119 <wui-text variant="small-400" color="fg-150">Send</wui-text> 120 ${this.sendValueTemplate()} 121 </wui-flex> 122 <wui-preview-item 123 text="${this.sendTokenAmount?d.Zv.roundNumber(this.sendTokenAmount,6,5):"unknown"} ${this.token?.symbol}" 124 .imageSrc=${this.token?.iconUrl} 125 ></wui-preview-item> 126 </wui-flex> 127 <wui-flex> 128 <wui-icon color="fg-200" size="md" name="arrowBottom"></wui-icon> 129 </wui-flex> 130 <wui-flex alignItems="center" justifyContent="space-between"> 131 <wui-text variant="small-400" color="fg-150">To</wui-text> 132 <wui-preview-item 133 text="${this.receiverProfileName?d.Zv.getTruncateString({string:this.receiverProfileName,charsStart:20,charsEnd:0,truncate:"end"}):d.Zv.getTruncateString({string:this.receiverAddress?this.receiverAddress:"",charsStart:4,charsEnd:4,truncate:"middle"})}" 134 address=${this.receiverAddress??""} 135 .imageSrc=${this.receiverProfileImageUrl??void 0} 136 .isAddress=${!0} 137 ></wui-preview-item> 138 </wui-flex> 139 </wui-flex> 140 <wui-flex flexDirection="column" .padding=${["xxl","0","0","0"]}> 141 <w3m-wallet-send-details 142 .caipNetwork=${this.caipNetwork} 143 .receiverAddress=${this.receiverAddress} 144 ></w3m-wallet-send-details> 145 <wui-flex justifyContent="center" gap="xxs" .padding=${["s","0","0","0"]}> 146 <wui-icon size="sm" color="fg-200" name="warningCircle"></wui-icon> 147 <wui-text variant="small-400" color="fg-200">Review transaction carefully</wui-text> 148 </wui-flex> 149 <wui-flex justifyContent="center" gap="s" .padding=${["l","0","0","0"]}> 150 <wui-button 151 class="cancelButton" 152 @click=${this.onCancelClick.bind(this)} 153 size="lg" 154 variant="neutral" 155 > 156 Cancel 157 </wui-button> 158 <wui-button 159 class="sendButton" 160 @click=${this.onSendClick.bind(this)} 161 size="lg" 162 variant="main" 163 .loading=${this.loading} 164 > 165 Send 166 </wui-button> 167 </wui-flex> 168 </wui-flex></wui-flex 169 >`}sendValueTemplate(){if(this.token&&this.sendTokenAmount){const e=this.token.price*this.sendTokenAmount;return r.qy`<wui-text variant="paragraph-400" color="fg-100" 170 >$${e.toFixed(2)}</wui-text 171 >`}return null}async onSendClick(){if(this.sendTokenAmount&&this.receiverAddress)try{await a.R.sendToken(),s.P.showSuccess("Transaction started"),l.I.replace("Account")}catch(e){s.P.showError("Failed to send transaction. Please try again."),p.error("SendController:sendToken - failed to send transaction",e);const t=e instanceof Error?e.message:"Unknown error";c.E.sendEvent({type:"track",event:"SEND_ERROR",properties:{message:t,isSmartAccount:(0,u.lj)(o.W.state.activeChain)===w.Vl.ACCOUNT_TYPES.SMART_ACCOUNT,token:this.token?.symbol||"",amount:this.sendTokenAmount,network:o.W.state.activeCaipNetwork?.caipNetworkId||""}})}else s.P.showError("Please enter a valid amount and receiver address")}onCancelClick(){l.I.goBack()}};m.styles=h,f([(0,n.wk)()],m.prototype,"token",void 0),f([(0,n.wk)()],m.prototype,"sendTokenAmount",void 0),f([(0,n.wk)()],m.prototype,"receiverAddress",void 0),f([(0,n.wk)()],m.prototype,"receiverProfileName",void 0),f([(0,n.wk)()],m.prototype,"receiverProfileImageUrl",void 0),f([(0,n.wk)()],m.prototype,"caipNetwork",void 0),f([(0,n.wk)()],m.prototype,"loading",void 0),m=f([(0,d.EM)("w3m-wallet-send-preview-view")],m)},270327:(e,t,i)=>{i.d(t,{_:()=>s});var r=i(212618),n=i(562944),a=i(693571),o=(i(271391),i(460310),i(945090),function(e,t,i,r){var n,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(a<3?n(o):a>3?n(t,i,o):n(t,i))||o);return a>3&&o&&Object.defineProperty(t,i,o),o});let s=class extends r.WF{render(){return r.qy` 172 <wui-flex flexDirection="column" alignItems="center" gap="xl" padding="xl"> 173 <wui-text variant="paragraph-400" color="fg-100">Follow the instructions on</wui-text> 174 <wui-chip 175 icon="externalLink" 176 variant="fill" 177 href=${n.oU.SECURE_SITE_DASHBOARD} 178 imageSrc=${n.oU.SECURE_SITE_FAVICON} 179 data-testid="w3m-secure-website-button" 180 > 181 </wui-chip> 182 <wui-text variant="small-400" color="fg-200"> 183 You will have to reconnect for security reasons 184 </wui-text> 185 </wui-flex> 186 `}};s=o([(0,a.EM)("w3m-upgrade-wallet-view")],s)},295600:(e,t,i)=>{i.d(t,{J:()=>c});var r=i(778508),n=i(390184),a=i(226742),o=i(693571),s=i(661123),l=function(e,t,i,r){var n,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(a<3?n(o):a>3?n(t,i,o):n(t,i))||o);return a>3&&o&&Object.defineProperty(t,i,o),o};let c=class extends s.H{constructor(){super(),this.email=r.I.state.data?.newEmail,this.redirectView=r.I.state.data?.redirectView,this.onOtpSubmit=async e=>{try{this.authConnector&&(await this.authConnector.provider.updateEmailSecondaryOtp({otp:e}),n.E.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),this.redirectView&&r.I.reset(this.redirectView))}catch(e){throw n.E.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL",properties:{message:a.w.parseError(e)}}),e}},this.onStartOver=()=>{r.I.replace("UpdateEmailWallet",r.I.state.data)}}};c=l([(0,o.EM)("w3m-update-email-secondary-otp-view")],c)},343171:(e,t,i)=>{i.d(t,{a:()=>l});var r=i(212618),n=i(226742),a=i(693571),o=(i(658461),i(460310),i(51636),i(354073),function(e,t,i,r){var n,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(a<3?n(o):a>3?n(t,i,o):n(t,i))||o);return a>3&&o&&Object.defineProperty(t,i,o),o});const s=[{images:["network","layers","system"],title:"The systemâs nuts and bolts",text:"A network is what brings the blockchain to life, as this technical infrastru
186cture allows apps to access the ledger and smart contract services."},{images:["noun","defiAlt","dao"],title:"Designed for different uses",text:"Each network is designed differently, and may therefore suit certain apps and experiences."}];let l=class extends r.WF{render(){return r.qy` 187 <wui-flex 188 flexDirection="column" 189 .padding=${["xxl","xl","xl","xl"]} 190 alignItems="center" 191 gap="xl" 192 > 193 <w3m-help-widget .data=${s}></w3m-help-widget> 194 <wui-button 195 variant="main" 196 size="md" 197 @click=${()=>{n.w.openHref("https://ethereum.org/en/developers/docs/networks/","_blank")}} 198 > 199 Learn more 200 <wui-icon color="inherit" slot="iconRight" name="externalLink"></wui-icon> 201 </wui-button> 202 </wui-flex> 203 `}};l=o([(0,a.EM)("w3m-what-is-a-network-view")],l)},366283:(e,t,i)=>{i.d(t,{P:()=>h});var r=i(212618),n=i(160031),a=i(806056),o=i(226742),s=i(974496),l=i(527601),c=i(693571),u=(i(111895),i(460310),i(983546),i(110152));const d=r.AH` 204 :host > wui-flex { 205 max-height: clamp(360px, 540px, 80vh); 206 overflow: scroll; 207 scrollbar-width: none; 208 } 209 210 :host > wui-flex::-webkit-scrollbar {
211 display: none; 212 } 213`;var w=function(e,t,i,r){var n,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(a<3?n(o):a>3?n(t,i,o):n(t,i))||o);return a>3&&o&&Object.defineProperty(t,i,o),o};let h=class extends r.WF{constructor(){super(),this.unsubscribe=[]}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return r.qy` <wui-flex 214 flexDirection="column" 215 .padding=${["xs","s","m","s"]} 216 gap="xs" 217 > 218 <wui-banner 219 icon="warningCircle" 220 text="You can only receive assets on these networks" 221 ></wui-banner> 222 ${this.networkTemplate()} 223 </wui-flex>`}networkTemplate(){const e=a.W.getAllRequestedCaipNetworks(),t=a.W.getAllApprovedCaipNetworkIds(),i=a.W.state.activeCaipNetwork,c=a.W.checkIfSmartAccountEnabled();let d=o.w.sortRequestedNetworks(t,e);if(c&&(0,s.lj)(i?.chainNamespace)===u.Vl.ACCOUNT_TYPES.SMART_ACCOUNT){if(!i)return null;d=[i]}return d.filter(e=>e.chainNamespace===i?.chainNamespace).map(e=>r.qy` 224 <wui-list-network 225 imageSrc=${(0,n.J)(l.$.getNetworkImage(e))} 226 name=${e.name??"Unknown"} 227 ?transparent=${!0} 228 > 229 </wui-list-network> 230 `)}};h.styles=d,h=w([(0,c.EM)("w3m-wallet-compatible-networks-view")],h)},440069:(e,t,i)=>{i.d(t,{Y:()=>h});var r=i(212618),n=i(925707),a=i(308351),o=i(732498),s=i(778508),l=i(226742),c=i(806056),u=i(693571);i(658461),i(460310),i(77616),i(489508),i(670387);const d=r.AH` 231 :host { 232 display: block; 233 } 234 235 wui-flex { 236 position: relative; 237 } 238 239 wui-icon-box { 240 width: 40px; 241 height: 40px; 242 border-radius: var(--wui-border-radius-xs) !important; 243 border: 5px solid var(--wui-color-bg-125); 244 background: var(--wui-color-bg-175); 245 position: absolute; 246 top: 50%; 247 left: 50%; 248 transform: translate(-50%, -50%); 249 z-index: 3; 250 } 251 252 wui-button { 253 --local-border-radius: var(--wui-border-radius-xs) !important; 254 } 255 256 .inputContainer { 257 height: fit-content; 258 } 259`;var w=function(e,t,i,r){var n,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(a<3?n(o):a>3?n(t,i,o):n(t,i))||o);return a>3&&o&&Object.defineProperty(t,i,o),o};let h=class extends r.WF{constructor(){super(),this.unsubscribe=[],this.token=a.R.state.token,this.sendTokenAmount=a.R.state.sendTokenAmount,this.receiverAddress=a.R.state.receiverAddress,this.receiverProfileName=a.R.state.receiverProfileName,this.loading=a.R.state.loading,this.message="Preview Send",this.token&&(this.fetchBalances(),this.fetchNetworkPrice()),this.unsubscribe.push(a.R.subscribe(e=>{this.token=e.token,this.sendTokenAmount=e.sendTokenAmount,this.receiverAddress=e.receiverAddress,this.receiverProfileName=e.receiverProfileName,this.loading=e.loading}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return this.getMessage(),r.qy` <wui-flex flexDirection="column" .padding=${["0","l","l","l"]}> 260 <wui-flex class="inputContainer" gap="xs" flexDirection="column"> 261 <w3m-input-token 262 .token=${this.token} 263 .sendTokenAmount=${this.sendTokenAmount} 264 ></w3m-input-token> 265 <wui-icon-box 266 size="inherit" 267 backgroundColor="fg-300" 268 iconSize="lg" 269 iconColor="fg-250" 270 background="opaque" 271 icon="arrowBottom" 272 ></wui-icon-box> 273 <w3m-input-address 274 .value=${this.receiverProfileName?this.receiverProfileName:this.receiverAddress} 275 ></w3m-input-address> 276 </wui-flex> 277 <wui-flex .margin=${["l","0","0","0"]}> 278 <wui-button 279 @click=${this.onButtonClick.bind(this)} 280 ?disabled=${!this.message.startsWith("Preview Send")} 281 size="lg" 282 variant="main" 283 ?loading=${this.loading} 284 fullWidth 285 > 286 ${this.message} 287 </wui-button>
287 288 </wui-flex> 289 </wui-flex>`}async fetchBalances(){await a.R.fetchTokenBalance(),a.R.fetchNetworkBalance()}async fetchNetworkPrice(){await o.GN.getNetworkTokenPrice()}onButtonClick(){s.I.push("WalletSendPreview")}getMessage(){if(this.message="Preview Send",this.receiverAddress&&!l.w.isAddress(this.receiverAddress,c.W.state.activeChain)&&(this.message="Invalid Address"),this.receiverAddress||(this.message="Add Address"),this.sendTokenAmount&&this.token&&this.sendTokenAmount>Number(this.token.quantity.numeric)&&(this.message="Insufficient Funds"),this.sendTokenAmount||(this.message="Add Amount"),this.sendTokenAmount&&this.token?.price){this.sendTokenAmount*this.token.price||(this.message="Incorrect Value")}this.token||(this.message="Select Token")}};h.styles=d,w([(0,n.wk)()],h.prototype,"token",void 0),w([(0,n.wk)()],h.prototype,"sendTokenAmount",void 0),w([(0,n.wk)()],h.prototype,"receiverAddress",void 0),w([(0,n.wk)()],h.prototype,"receiverProfileName",void 0),w([(0,n.wk)()],h.prototype,"loading",void 0),w([(0,n.wk)()],h.prototype,"message",void 0),h=w([(0,u.EM)("w3m-wallet-send-view")],h)},548649:(e,t,i)=>{i.d(t,{W:()=>s});var r=i(212618),n=i(778508),a=i(693571),o=(i(658461),i(460310),i(51636),i(945090),i(300089),function(e,t,i,r){var n,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(a<3?n(o):a>3?n(t,i,o):n(t,i))||o);return a>3&&o&&Object.defineProperty(t,i,o),o});let s=class extends r.WF{render(){return r.qy` 290 <wui-flex 291 flexDirection="column" 292 .padding=${["xxl","3xl","xl","3xl"]} 293 alignItems="center" 294 gap="xl" 295 > 296 <wui-visual name="onrampCard"></wui-visual> 297 <wui-flex flexDirection="column" gap="xs" alignItems="center"> 298 <wui-text align="center" variant="paragraph-500" color="fg-100"> 299 Quickly and easily buy digital assets! 300 </wui-text> 301 <wui-text align="center" variant="small-400" color="fg-200"> 302 Simply select your preferred onramp provider and add digital assets to your account 303 using your credit card or bank transfer 304 </wui-text> 305 </wui-flex> 306 <wui-button @click=${n.I.goBack}> 307 <wui-icon size="sm" color="inherit" name="add" slot="iconLeft"></wui-icon> 308 Buy 309 </wui-button> 310 </wui-flex> 311 `}};s=o([(0,a.EM)("w3m-what-is-a-buy-view")],s)},555172:(e,t,i)=>{i.d(t,{Z:()=>v});var r=i(212618),n=i(925707),a=i(160031),o=i(863450),s=i(806056),l=i(121871),c=i(527601),u=i(568996),d=i(974496),w=i(778508),h=i(226742),p=i(693571),f=(i(218396),i(20720),i(460310),i(651178),i(945090),i(110152));const m=r.AH` 312 wui-compatible-network { 313 margin-top: var(--wui-spacing-l); 314 } 315`;var g=function(e,t,i,r){var n,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(a<3?n(o):a>3?n(t,i,o):n(t,i))||o);return a>3&&o&&Object.defineProperty(t,i,o),o};let v=class extends r.WF{constructor(){super(),this.unsubscribe=[],this.address=o.U.state.address,this.profileName=o.U.state.profileName,this.network=s.W.state.activeCaipNetwork,this.unsubscribe.push(o.U.subscribe(e=>{e.address?(this.address=e.address,this.profileName=e.profileName):l.P.showError("Account not found")}),s.W.subscribeKey("activeCaipNetwork",e=>{e?.id&&(this.network=e)}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){if(!this.address)throw new Error("w3m-wallet-receive-view: No account provided");const e=c.$.getNetworkImage(this.network);return r.qy` <wui-flex 316 flexDirection="column" 317 .padding=${["0","l","l","l"]} 318 alignItems="center" 319 > 320 <wui-chip-button 321 data-testid="receive-address-copy-button" 322 @click=${this.onCopyClick.bind(this)} 323 text=${p.Zv.getTruncateString({string:this.profileName||this.address||"",charsStart:this.profileName?18:4,charsEnd:this.profileName?0:4,truncate:this.profileName?"end":"middle"})} 324 icon="copy" 325 size="sm" 326 imageSrc=${e||""} 327 variant="gray" 328 ></wui-chip-button>
328 329 <wui-flex 330 flexDirection="column" 331 .padding=${["l","0","0","0"]} 332 alignItems="center" 333 gap="s" 334 > 335 <wui-qr-code 336 size=${232} 337 theme=${u.W.state.themeMode} 338 uri=${this.address} 339 ?arenaClear=${!0} 340 color=${(0,a.J)(u.W.state.themeVariables["--w3m-qr-color"])} 341 data-testid="wui-qr-code" 342 ></wui-qr-code> 343 <wui-text variant="paragraph-500" color="fg-100" align="center"> 344 Copy your address or scan this QR code 345 </wui-text> 346 </wui-flex> 347 ${this.networkTemplate()} 348 </wui-flex>`}networkTemplate(){const e=s.W.getAllRequestedCaipNetworks(),t=s.W.checkIfSmartAccountEnabled(),i=s.W.state.activeCaipNetwork,n=e.filter(e=>e?.chainNamespace===i?.chainNamespace);if((0,d.lj)(i?.chainNamespace)===f.Vl.ACCOUNT_TYPES.SMART_ACCOUNT&&t)return i?r.qy`<wui-compatible-network 349 @click=${this.onReceiveClick.bind(this)} 350 text="Only receive assets on this network" 351 .networkImages=${[c.$.getNetworkImage(i)??""]} 352 ></wui-compatible-network>`:null;const a=n?.filter(e=>e?.assets?.imageId)?.slice(0,5),o=a.map(c.$.getNetworkImage).filter(Boolean);return r.qy`<wui-compatible-network 353 @click=${this.onReceiveClick.bind(this)} 354 text="Only receive assets on these networks" 355 .networkImages=${o} 356 ></wui-compatible-network>`}onReceiveClick(){w.I.push("WalletCompatibleNetworks")}onCopyClick(){try{this.address&&(h.w.copyToClopboard(this.address),l.P.showSuccess("Address copied"))}catch{l.P.showError("Failed to copy")}}};v.styles=m,g([(0,n.wk)()],v.prototype,"address",void 0),g([(0,n.wk)()],v.prototype,"profileName",void 0),g([(0,n.wk)()],v.prototype,"network",void 0),v=g([(0,p.EM)("w3m-wallet-receive-view")],v)},695417:(e,t,i)=>{i.d(t,{B:()=>h});var r=i(212618),n=i(925707),a=i(607610),o=i(236010),s=i(778508),l=i(390184),c=i(121871),u=i(693571);i(658461),i(163092),i(460310);const d=r.AH` 357 wui-email-input { 358 width: 100%; 359 } 360 361 form { 362 width: 100%; 363 display: block; 364 position: relative; 365 } 366`;var w=function(e,t,i,r){var n,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(a<3?n(o):a>3?n(t,i,o):n(t,i))||o);return a>3&&o&&Object.defineProperty(t,i,o),o};let h=class extends r.WF{constructor(){super(...arguments),this.formRef=(0,a._)(),this.initialEmail=s.I.state.data?.email??"",this.redirectView=s.I.state.data?.redirectView,this.email="",this.loading=!1}firstUpdated(){this.formRef.value?.addEventListener("keydown",e=>{"Enter"===e.key&&this.onSubmitEmail(e)})}render(){return r.qy` 367 <wui-flex flexDirection="column" padding="m" gap="m"> 368 <form ${(0,a.K)(this.formRef)} @submit=${this.onSubmitEmail.bind(this)}> 369 <wui-email-input 370 value=${this.initialEmail} 371 .disabled=${this.loading} 372 @inputChange=${this.onEmailInputChange.bind(this)} 373 > 374 </wui-email-input> 375 <input type="submit" hidden /> 376 </form> 377 ${this.buttonsTemplate()} 378 </wui-flex> 379 `}onEmailInputChange(e){this.email=e.detail}async onSubmitEmail(e){try{if(this.loading)return;this.loading=!0,e.preventDefault();const t=o.a.getAuthConnector();if(!t)throw new Error("w3m-update-email-wallet: Auth connector not found");const i=await t.provider.updateEmail({email:this.email});l.E.sendEvent({type:"track",event:"EMAIL_EDIT"}),"VERIFY_SECONDARY_OTP"===i.action?s.I.push("UpdateEmailSecondaryOtp",{email:this.initialEmail,newEmail:this.email,redirectView:this.redirectView}):s.I.push("UpdateEmailPrimaryOtp",{email:this.initialEmail,newEmail:this.email,redirectView:this.redirectView})}catch(e){c.P.showError(e),this.loading=!1}}buttonsTemplate(){const e=!this.loading&&this.email.length>3&&this.email!==this.initialEmail;return this.redirectView?r.qy` 380 <wui-flex gap="s"> 381 <wui-button size="md" variant="neutral" fullWidth @click=${s.I.goBack}> 382 Cancel 383 </wui-button>
383 384 385 <wui-button 386 size="md" 387 variant="main" 388 fullWidth 389 @click=${this.onSubmitEmail.bind(this)} 390 .disabled=${!e} 391 .loading=${this.loading} 392 > 393 Save 394 </wui-button> 395 </wui-flex> 396 `:r.qy` 397 <wui-button 398 size="md" 399 variant="main" 400 fullWidth 401 @click=${this.onSubmitEmail.bind(this)} 402 .disabled=${!e} 403 .loading=${this.loading} 404 > 405 Save 406 </wui-button> 407 `}};h.styles=d,w([(0,n.wk)()],h.prototype,"email",void 0),w([(0,n.wk)()],h.prototype,"loading",void 0),h=w([(0,u.EM)("w3m-update-email-wallet-view")],h)},891778:(e,t,i)=>{i.d(t,{s:()=>p});var r=i(212618),n=i(925707),a=i(160031),o=i(824376),s=i(778508),l=i(806056),c=i(236010),u=i(693571);const d=r.AH` 408 @keyframes shake { 409 0% { 410 transform: translateX(0); 411 } 412 25% { 413 transform: translateX(3px); 414 } 415 50% { 416 transform: translateX(-3px); 417 } 418 75% { 419 transform: translateX(3px); 420 } 421 100% { 422 transform: translateX(0); 423 } 424 } 425 426 wui-flex:first-child:not(:only-child) { 427 position: relative; 428 } 429 430 wui-loading-thumbnail { 431 position: absolute; 432 } 433 434 wui-visual { 435 width: var(--wui-wallet-image-size-lg); 436 height: var(--wui-wallet-image-size-lg); 437 border-radius: calc(var(--wui-border-radius-5xs) * 9 - var(--wui-border-radius-xxs)); 438 position: relative; 439 overflow: hidden; 440 } 441 442 wui-visual::after { 443 content: ''; 444 display: block; 445 width: 100%; 446 height: 100%; 447 position: absolute; 448 inset: 0; 449 border-radius: calc(var(--wui-border-radius-5xs) * 9 - var(--wui-border-radius-xxs)); 450 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005); 451 } 452 453 wui-icon-box { 454 position: absolute; 455 right: calc(var(--wui-spacing-3xs) * -1); 456 bottom: calc(var(--wui-spacing-3xs) * -1); 457 opacity: 0; 458 transform: scale(0.5); 459 transition: 460 opacity var(--wui-ease-out-power-2) var(--wui-duration-lg), 461 transform var(--wui-ease-out-power-2) var(--wui-duration-lg); 462 will-change: opacity, transform; 463 } 464 465 wui-text[align='center'] { 466 width: 100%; 467 padding: 0px var(--wui-spacing-l); 468 } 469 470 [data-error='true'] wui-icon-box { 471 opacity: 1; 472 transform: scale(1); 473 } 474 475 [data-error='true'] > wui-flex:first-child { 476 animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both; 477 } 478 479 [data-retry='false'] wui-link { 480 display: none; 481 } 482 483 [data-retry='true'] wui-link { 484 display: block; 485 opacity: 1; 486 } 487 488 wui-link { 489 padding: var(--wui-spacing-4xs) var(--wui-spacing-xxs); 490 } 491 492 .capitalize { 493 text-transform: capitalize; 494 } 495`;var w=function(e,t,i,r){var n,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(a<3?n(o):a>3?n(t,i,o):n(t,i))||o);return a>3&&o&&Object.defineProperty(t,i,o),o};const h={eip155:"eth",solana:"solana",bip122:"bitcoin",polkadot:void 0};let p=class extends r.WF{constructor(){super(...arguments),this.unsubscribe=[],this.switchToChain=s.I.state.data?.switchToChain,this.caipNetwork=s.I.state.data?.network,this.activeChain=l.W.state.activeChain}firstUpdated(){this.unsubscribe.push(l.W.subscribeKey("activeChain",e=>this.activeChain=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const e=this.switchToChain?o.o.CHAIN_NAME_MAP[this.switchToChain]:"supported";if(!this.switchToChain)return null;const t=o.o.CHAIN_NAME_MAP[this.switchToChain];return r.qy` 496 <wui-flex 497 flexDirection="column" 498 alignItems="center" 499 .padding=${["3xl","xl","xl","xl"]} 500 gap="xl" 501 > 502 <wui-flex justifyContent="center" flexDirection="column" alignItems="center" gap="xl"> 503 <wui-visual name=${(0,a.J)(h[this.switchToChain])}></wui-visual> 504 <wui-text 505 data-testid=${`w3m-switch-active-chain-to-${t}`} 506 variant="paragraph-500" 507 color="fg-100" 508 align="center" 509 >Switch to <span class="capitalize">${t}</span></wui-text 510 > 511 <wui-text variant="small-400" color="fg-200" align="center"> 512 Connected wallet doesn't support connecting to ${e} chain. You 513 need to connect with a different wallet. 514 </wui-text> 515 <wui-button 516 data-testid="w3m-switch-active-chain-button" 517 size="md" 518 @click=${this.switchActiveChain.bind(this)} 519 >Switch</wui-button 520 > 521 </wui-flex> 522 </wui-flex> 523 `}async switchActiveChain(){this.switchToChain&&(l.W.setIsSwitchingNamespace(!0),c.a.setFilterByNamespace(this.switchToChain),this.caipNetwork?await l.W.switchActiveNetwork(this.caipNetwork):l.W.setActiveNamespace(this.switchToChain),s.I.reset("Connect"))}};p.styles=d,w([(0,n.MZ)()],p.prototype,"activeChain",void 0),p=w([(0,u.EM)("w3m-switch-active-chain-view")],p)},923832:(e,t,i)=>{i.d(t,{N:()=>c});var r=i(212618),n=i(778508),a=i(390184),o=i(693571),s=(i(658461),i(460310),i(51636),i(354073),function(e,t,i,r){var n,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(a<3?n(o):a>3?n(t,i,o):n(t,i))||o);return a>3&&o&&Object.defineProperty(t,i,o),o});const l=[{images:["login","profile","lock"],title:"One login for all of web3",text:"Log in to any app by connecting your wallet. Say goodbye to countless passwords!"},{images:["defi","nft","eth"],title:"A home for your digital assets",text:"A wallet lets you store, send and receive digital assets like cryptocurrencies and NFTs."},{images:["browser","noun","dao"],title:"Your gateway to a new web",text:"With your wallet, you can explore and interact with DeFi, NFTs, DAOs, and much more."}];let c=class extends r.WF{render(){return r.qy` 524 <wui-flex 525 flexDirection="column" 526 .padding=${["xxl","xl","xl","xl"]} 527 alignItems="center" 528 gap="xl" 529 > 530 <w3m-help-widget .data=${l}></w3m-help-widget> 531 <wui-button variant="main" size="md" @click=${this.onGetWallet.bind(this)}> 532 <wui-icon color="inherit" slot="iconLeft" name="wallet"></wui-icon> 533 Get a wallet 534 </wui-button>
534 535 </wui-flex> 536 `}onGetWallet(){a.E.sendEvent({type:"track",event:"CLICK_GET_WALLET"}),n.I.push("GetWallet")}};c=s([(0,o.EM)("w3m-what-is-a-wallet-view")],c)},998896:(e,t,i)=>{i.d(t,{N:()=>b});var r=i(212618),n=i(925707),a=i(160031),o=i(778508),s=i(757019),l=i(773337),c=i(806056),u=i(226742),d=i(562944),w=i(527601),h=i(879177),p=i(236010),f=i(121871),m=i(390184),g=i(863450),v=i(693571);i(460310),i(51636),i(684197),i(983546),i(495726),i(945090);const k=r.AH` 537 :host > wui-flex { 538 max-height: clamp(360px, 540px, 80vh); 539 overflow: scroll; 540 scrollbar-width: none; 541 } 542 543 :host > wui-flex::-webkit-scrollbar { 544 display: none; 545 } 546`;var x=function(e,t,i,r){var n,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(a<3?n(o):a>3?n(t,i,o):n(t,i))||o);return a>3&&o&&Object.defineProperty(t,i,o),o};let b=class extends r.WF{constructor(){super(),this.swapUnsupportedChain=o.I.state.data?.swapUnsupportedChain,this.unsubscribe=[],this.disconnecting=!1,this.remoteFeatures=s.H.state.remoteFeatures,this.unsubscribe.push(l.j.subscribeNetworkImages(()=>this.requestUpdate()),s.H.subscribeKey("remoteFeatures",e=>{this.remoteFeatures=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return r.qy` 547 <wui-flex class="container" flexDirection="column" gap="0"> 548 <wui-flex 549 class="container" 550 flexDirection="column" 551 .padding=${["m","xl","xs","xl"]} 552 alignItems="center" 553 gap="xl" 554 > 555 ${this.descriptionTemplate()} 556 </wui-flex> 557 558 <wui-flex flexDirection="column" padding="s" gap="xs"> 559 ${this.networksTemplate()} 560 </wui-flex> 561 562 <wui-separator text="or"></wui-separator> 563 <wui-flex flexDirection="column" padding="s" gap="xs"> 564 <wui-list-item 565 variant="icon" 566 iconVariant="overlay" 567 icon="disconnect" 568 ?chevron=${!1} 569 .loading=${this.disconnecting} 570 @click=${this.onDisconnect.bind(this)} 571 data-testid="disconnect-button" 572 > 573 <wui-text variant="paragraph-500" color="fg-200">Disconnect</wui-text> 574 </wui-list-item> 575 </wui-flex> 576 </wui-flex> 577 `}descriptionTemplate(){return this.swapUnsupportedChain?r.qy` 578 <wui-text variant="small-400" color="fg-200" align="center"> 579 The swap feature doesnât support your current network. Switch to an available option to 580 continue. 581 </wui-text> 582 `:r.qy` 583 <wui-text variant="small-400" color="fg-200" align="center"> 584 This app doesnât support your current network. Switch to an available option to continue. 585 </wui-text> 586 `}networksTemplate(){const e=c.W.getAllRequestedCaipNetworks(),t=c.W.getAllApprovedCaipNetworkIds(),i=u.w.sortRequestedNetworks(t,e);return(this.swapUnsupportedChain?i.filter(e=>d.oU.SWAP_SUPPORTED_NETWORKS.includes(e.caipNetworkId)):i).map(e=>r.qy` 587 <wui-list-network 588 imageSrc=${(0,a.J)(w.$.getNetworkImage(e))} 589 name=${e.name??"Unknown"} 590 @click=${()=>this.onSwitchNetwork(e)} 591 > 592 </wui-list-network> 593 `)}async onDisconnect(){try{this.disconnecting=!0;const e=c.W.state.activeChain,t=h.x.getConnections(e).length>0,i=e&&p.a.state.activeConnectorIds[e],r=this.remoteFeatures?.multiWallet;await h.x.disconnect(r?{id:i,namespace:e}:{}),t&&r&&(o.I.push("ProfileWallets"),f.P.showSuccess("Wallet deleted"))}catch{m.E.sendEvent({type:"track",event:"DISCONNECT_ERROR",properties:{message:"Failed to disconnect"}}),f.P.showError("Failed to disconnect")}finally{this.disconnecting=!1}}async onSwitchNetwork(e){const t=g.U.state.caipAddress,i=c.W.getAllApprovedCaipNetworkIds(),r=(c.W.getNetworkProp("supportsAllNetworks",e.chainNamespace),o.I.state.data);t?i?.includes(e.caipNetworkId)?await c.W.switchActiveNetwork(e):o.I.push("SwitchNetwork",{...r,network:e}):t||(c.W.setActiveCaipNetwork(e),o.I.push("Connect"))}};b.styles=k,x([(0,n.wk)()],b.prototype,"disconnecting",void 0),x([(0,n.wk)()],b.prototype,"remoteFeatures",void 0),b=x([(0,v.EM
593)("w3m-unsupported-chain-view")],b)}}]);
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.