PageSourceSearch

https://hpump.trade/assets/embedded-wallet-CYdkUSvF.js

js hpump.trade collected 2026-10-09 03:01:52 UTC 13,383 bytes, 194 lines download raw bytes

1import{b9 as x,ba as f,bb as R,bc as l,bd as U,be as E,bf as W,bg as A,bh as j,bi as $,bj as c,bk as h,bl as I,bm as D,bn as y,bo as S,bp as M,bq as P}from"./index-BAyIIpI_.js";import{r as p,c as g,n as w,o as k}from"./if-defined-kbgsGL5y.js";import{N as z}from"./index-CVL62vQj.js";import{e as H,n as V}from"./ref-Bu-5vWHh.js";import"./index-DC3s17Ag.js";import"./index-BZ5exR2o.js";import"./index-3YF_4PVq.js";import"./index-BJfbkgQY.js";import"./index-BtcGs5ui.js";import"./index-XdIETs1h.js";import"./index-By0gTj-Q.js";import"./index-D-e8kLF1.js";const F=x`
2  div {
3    width: 100%;
4  }
5
6  [data-ready='false'] {
7    transform: scale(1.05);
8  }
9
10  @media (max-width: 430px) {
11    [data-ready='false'] {
12      transform: translateY(-50px);
13    }
14  }
15`;var O=function(r,e,t,n){var s=arguments.length,i=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(i=(s<3?o(i):s>3?o(e,t,i):o(e,t))||i);return s>3&&i&&Object.defineProperty(e,t,i),i};const T=600,N=360,B=64;let v=class extends f{constructor(){super(),this.bodyObserver=void 0,this.unsubscribe=[],this.iframe=document.getElementById("w3m-iframe"),this.ready=!1,this.unsubscribe.push(R.subscribeKey("open",e=>{e||this.onHideIframe()}),R.subscribeKey("shake",e=>{e?this.iframe.style.animation="w3m-shake 500ms var(--wui-ease-out-power-2)":this.iframe.style.animation="none"}))}disconnectedCallback(){this.onHideIframe(),this.unsubscribe.forEach(e=>e()),this.bodyObserver?.unobserve(window.document.body)}async firstUpdated(){await this.syncTheme(),this.iframe.style.display="block";const e=this?.renderRoot?.querySelector("div");this.bodyObserver=new ResizeObserver(t=>{const s=t?.[0]?.contentBoxSize?.[0]?.inlineSize;this.iframe.style.height=`${T}px`,e.style.height=`${T}px`,s&&s<=430?(this.iframe.style.width="100%",this.iframe.style.left="0px",this.iframe.style.bottom="0px",this.iframe.style.top="unset"):(this.iframe.style.width=`${N}px`,this.iframe.style.left=`calc(50% - ${N/2}px)`,this.iframe.style.top=`calc(50% - ${T/2}px + ${B/2}px)`,this.iframe.style.bottom="unset"),this.ready=!0,this.onShowIframe()}),this.bodyObserver.observe(window.document.body)}render(){return l`<div data-ready=${this.ready} id="w3m-frame-container"></div>`}onShowIframe(){const e=window.innerWidth<=430;this.iframe.style.animation=e?"w3m-iframe-zoom-in-mobile 200ms var(--wui-ease-out-power-2)":"w3m-iframe-zoom-in 200ms var(--wui-ease-out-power-2)"}onHideIframe(){this.iframe.style.display="none",this.iframe.style.animation="w3m-iframe-fade-out 200ms var(--wui-ease-out-power-2)"}async syncTheme(){const e=U.getAuthConnector();if(e){const t=E.getSnapshot().themeMode,n=E.getSnapshot().themeVariables;await e.provider.syncTheme({themeVariables:n,w3mThemeVariables:W(n,t)})}}};v.styles=F;O([p()],v.prototype,"ready",void 0);v=O([g("w3m-approve-transaction-view")],v);var G=function(r,e,t,n){var s=arguments.length,i=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(i=(s<3?o(i):s>3?o(e,t,i):o(e,t))||i);return s>3&&i&&Object.defineProperty(e,t,i),i};let _=class extends f{render(){return l`
16      <wui-flex flexDirection="column" alignItems="center" gap="xl" padding="xl">
17        <wui-text variant="paragraph-400" color="fg-100">Follow the instructions on</wui-text>
18        <wui-chip
19          icon="externalLink"
20          variant="fill"
21          href=${A.SECURE_SITE_DASHBOARD}
22          imageSrc=${A.SECURE_SITE_FAVICON}
23          data-testid="w3m-secure-website-button"
24        >
25        </wui-chip>
26        <wui-text variant="small-400" color="fg-200">
27          You will have to reconnect for security reasons
28        </wui-text>
29      </wui-flex>
30    `}};_=G([g("w3m-upgrade-wallet-view")],_);const Y=x`
31  :host {
32    position: relative;
33    width: 100%;
34    display: inline-block;
35    color: var(--wui-color-fg-275);
36  }
37
38  .error {
39    margin: var(--wui-spacing-xxs) var(--wui-spacing-m) var(--wui-spacing-0) var(--wui-spacing-m);
40  }
41
42  .base-name {
43    position: absolute;
44    right: 45px;
45    top: 15px;
46    text-align: right;
47  }
48`;var b=function(r,e,t,n){var s=arguments.length,i=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(i=(s<3?o(i):s>3?o(e,t,i):o(e,t))||i);return s>3&&i&&Object.defineProperty(e,t,i),i};let d=class extends f{constructor(){super(...arguments),this.disabled=!1,this.loading=!1}render(){return l`
49      <wui-input-text
50        value=${k(this.value)}
51        ?disabled=${this.disabled}
52        .value=${this.value||""}
53        data-testid="wui-ens-input"
54        inputRightPadding="5xl"
55      >
56        ${this.baseNameTemplate()} ${this.errorTemplate()}${this.loadingTemplate()}
57      </wui-input-text>
58    `}baseNameTemplate(){return l`<wui-text variant="paragraph-400" color="fg-200" class="base-name">
59      ${$.WC_NAME_SUFFIX}
60    </wui-text>`}loadingTemplate(){return this.loading?l`<wui-loading-spinner size="md" color="accent-100"></wui-loading-spinner>`:null}errorTemplate(){return this.errorMessage?l`<wui-text variant="tiny-500" color="error-100" class="error"
61        >${this.errorMessage}</wui-text
62      >`:null}};d.styles=[j,Y];b([w()],d.prototype,"errorMessage",void 0);b([w({type:Boolean})],d.prototype,"disabled",void 0);b([w()],d.prototype,"value",void 0);b([w({type:Boolean})],d.prototype,"loading",void 0);d=b([g("wui-ens-input")],d);const L=x`
63  wui-flex {
64    width: 100%;
65  }
66
67  .suggestion {
68    background: var(--wui-color-gray-glass-002);
69    border-radius: var(--wui-border-radius-xs);
70  }
71
72  .suggestion:hover {
73    background-color: var(--wui-color-gray-glass-005);
74    cursor: pointer;
75  }
76
77  .suggested-name {
78    max-width: 75%;
79    overflow: hidden;
80    text-overflow: ellipsis;
81    white-space: nowrap;
82  }
83
84  form {
85    width: 100%;
86  }
87
88  wui-icon-link {
89    position: absolute;
90    right: 20px;
91    transform: translateY(11px);
92  }
93`;var m=function(r,e,t,n){var s=arguments.length,i=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(i=(s<3?o(i):s>3?o(e,t,i):o(e,t))||i);return s>3&&i&&Object.defineProperty(e,t,i),i};let u=class extends f{constructor(){super(),this.formRef=H(),this.usubscribe=[],this.name="",this.error="",this.loading=c.state.loading,this.suggestions=c.state.suggestions,this.registered=!1,this.profileName=h.state.profileName,this.onDebouncedNameInputChange=I.debounce(e=>{c.validateName(e)?(this.error="",this.name=e,c.getSuggestions(e),c.isNameRegistered(e).then(t=>{this.registered=t})):e.length<4?this.error="Name must be at least 4 characters long":this.error="Can only contain letters, numbers and - characters"}),this.usubscribe.push(c.subscribe(e=>{this.suggestions=e.suggestions,this.loading=e.loading}),h.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
93=>e()),this.formRef.value?.removeEventListener("keydown",this.onEnterKey.bind(this))}render(){return l`
94      <wui-flex
95        flexDirection="column"
96        alignItems="center"
97        gap="m"
98        .padding=${["0","s","m","s"]}
99      >
100        <form ${V(this.formRef)} @submit=${this.onSubmitName.bind(this)}>
101          <wui-ens-input
102            @inputChange=${this.onNameInputChange.bind(this)}
103            .errorMessage=${this.error}
104            .value=${this.name}
105          >
106          </wui-ens-input>
107          ${this.submitButtonTemplate()}
108          <input type="submit" hidden />
109        </form>
110        ${this.templateSuggestions()}
111      </wui-flex>
112    `}submitButtonTemplate(){return this.isAllowedToSubmit()?l`
113          <wui-icon-link
114            size="sm"
115            icon="chevronRight"
116            iconcolor="accent-100"
117            @click=${this.onSubmitName.bind(this)}
118          >
119          </wui-icon-link>
120        `:null}onSelectSuggestion(e){return()=>{this.name=e,this.registered=!1,this.requestUpdate()}}onNameInputChange(e){this.onDebouncedNameInputChange(e.detail)}nameSuggestionTagTemplate(){return this.loading?l`<wui-loading-spinner size="lg" color="fg-100"></wui-loading-spinner>`:this.registered?l`<wui-tag variant="shade" size="lg">Registered</wui-tag>`:l`<wui-tag variant="success" size="lg">Available</wui-tag>`}templateSuggestions(){if(!this.name||this.name.length<4||this.error)return null;const e=this.registered?this.suggestions.filter(t=>t.name!==this.name):[];return l`<wui-flex flexDirection="column" gap="xxs" alignItems="center">
121      <wui-flex
122        data-testid="account-name-suggestion"
123        .padding=${["m","m","m","m"]}
124        justifyContent="space-between"
125        class="suggestion"
126        @click=${this.onSubmitName.bind(this)}
127      >
128        <wui-text color="fg-100" variant="paragraph-400" class="suggested-name">
129          ${this.name}</wui-text
130        >${this.nameSuggestionTagTemplate()}
131      </wui-flex>
132      ${e.map(t=>this.availableNameTemplate(t.name))}
133    </wui-flex>`}availableNameTemplate(e){return l` <wui-flex
134      data-testid="account-name-suggestion"
135      .padding=${["m","m","m","m"]}
136      justifyContent="space-between"
137      class="suggestion"
138      @click=${this.onSelectSuggestion(e)}
139    >
140      <wui-text color="fg-100" variant="paragraph-400" class="suggested-name">
141        ${e}
142      </wui-text>
143      <wui-tag variant="success" size="lg">Available</wui-tag>
144    </wui-flex>`}isAllowedToSubmit(){return!this.loading&&!this.registered&&!this.error&&!this.profileName&&c.validateName(this.name)}async onSubmitName(){const e=D.state.activeChain;try{if(!this.isAllowedToSubmit())return;const t=`${this.name}${$.WC_NAME_SUFFIX}`;y.sendEvent({type:"track",event:"REGISTER_NAME_INITIATED",properties:{isSmartAccount:h.state.preferredAccountTypes?.[e]===S.ACCOUNT_TYPES.SMART_ACCOUNT,ensName:t}}),await c.registerName(t),y.sendEvent({type:"track",event:"REGISTER_NAME_SUCCESS",properties:{isSmartAccount:h.state.preferredAccountTypes?.[e]===S.ACCOUNT_TYPES.SMART_ACCOUNT,ensName:t}})}catch(t){M.showError(t.message),y.sendEvent({type:"track",event:"REGISTER_NAME_ERROR",properties:{isSmartAccount:h.state.preferredAccountTypes?.[e]===S.ACCOUNT_TYPES.SMART_ACCOUNT,ensName:`${this.name}${$.WC_NAME_SUFFIX}`,error:t?.message||"Unknown error"}})}}onEnterKey(e){e.key==="Enter"&&this.isAllowedToSubmit()&&this.onSubmitName()}};u.styles=L;m([w()],u.prototype,"errorMessage",void 0);m([p()],u.prototype,"name",void 0);m([p()],u.prototype,"error",void 0);m([p()],u.prototype,"loading",void 0);m([p()],u.prototype,"suggestions",void 0);m([p()],u.prototype,"registered",void 0);m([p()],u.prototype,"profileName",void 0);u=m([g("w3m-register-account-name-view")],u);const K=x`
145  .continue-button-container {
146    width: 100%;
147  }
148`;var q=function(r,e,t,n){var s=arguments.length,i=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(i=(s<3?o(i):s>3?o(e,t,i):o(e,t))||i);return s>3&&i&&Object.defineProperty(e,t,i),i};let C=class extends f{render(){return l`
149      <wui-flex
150        flexDirection="column"
151        alignItems="center"
152        gap="xxl"
153        .padding=${["0","0","l","0"]}
154      >
155        ${this.onboardingTemplate()} ${this.buttonsTemplate()}
156        <wui-link
157          @click=${()=>{I.openHref(z.URLS.FAQ,"_blank")}}
158        >
159          Learn more
160          <wui-icon color="inherit" slot="iconRight" name="externalLink"></wui-icon>
161        </wui-link>
162      </wui-flex>
163    `}onboardingTemplate(){return l` <wui-flex
164      flexDirection="column"
165      gap="xxl"
166      alignItems="center"
167      .padding=${["0","xxl","0","xxl"]}
168    >
169      <wui-flex gap="s" alignItems="center" justifyContent="center">
170        <wui-icon-box
171          size="xl"
172          iconcolor="success-100"
173          backgroundcolor="success-100"
174          icon="checkmark"
175          background="opaque"
176        ></wui-icon-box>
177      </wui-flex>
178      <wui-flex flexDirection="column" alignItems="center" gap="s">
179        <wui-text align="center" variant="medium-600" color="fg-100">
180          Account name chosen successfully
181        </wui-text>
182        <wui-text align="center" variant="paragraph-400" color="fg-100">
183          You can now fund your account and trade crypto
184        </wui-text>
185      </wui-flex>
186    </wui-flex>`}buttonsTemplate(){return l`<wui-flex
187      .padding=${["0","2l","0","2l"]}
188      gap="s"
189      class="continue-button-container"
190    >
191      <wui-button fullWidth size="lg" borderRadius="xs" @click=${this.redirectToAccount.bind(this)}
192        >Let's Go!
193      </wui-button>
193
194    </wui-flex>`}redirectToAccount(){P.replace("Account")}};C.styles=K;C=q([g("w3m-register-account-name-success-view")],C);export{v as W3mApproveTransactionView,C as W3mRegisterAccountNameSuccess,u as W3mRegisterAccountNameView,_ as W3mUpgradeWalletView};

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.