PageSourceSearch

https://arccommunity.com/_next/static/chunks/pages/connect-f646d4448cd1c7f6.js

js arccommunity.com collected 2026-10-04 12:53:44 UTC 6,671 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7784],{39327:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/connect",function(){return s(45186)}])},45186:function(e,t,s){"use strict";s.r(t);var n=s(85893),a=s(67294),l=s(6154),c=s(82668),i=s(19792),o=s(9008),r=s.n(o),m=s(40861);let d={fontFamily:m.F.body.style.fontFamily},u=()=>{let[e,t]=(0,a.useState)(void 0);return(0,a.useEffect)(()=>{void 0!==window.ethereum?t(!0):t(!1)},[e]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(r(),{children:[(0,n.jsx)("link",{href:"/styles/connect.css",rel:"stylesheet"}),(0,n.jsx)("link",{href:"/styles/bootstrap.css",rel:"stylesheet"})]}),(0,n.jsx)("div",{className:"connect",style:d,children:!0===e?(0,n.jsx)(x,{}):!1===e?(0,n.jsx)(g,{}):(0,n.jsx)(h,{})})]})};u.getLayout=i.emptyLayout;let h=()=>(0,n.jsx)("div",{className:"vh-100 d-flex justify-content-center align-items-center",children:(0,n.jsx)("div",{className:"loader"})}),x=()=>{let e="metamaskOtp",[t,s]=(0,a.useState)(!0),[i,o]=(0,a.useState)(!1),[r,m]=(0,a.useState)(!1),[d,u]=(0,a.useState)(!1),[h,x]=(0,a.useState)(""),g=()=>{let t=document.getElementsByName(e),s="";for(let e in t)try{let n=t[e].value;n&&n.length&&(s+=n)}catch(e){}return s},p=(e,t)=>{l.Z.post("api/v1/verify_web_login",{auth_id:e,signature:t}).then(e=>{o(!1),m(!0)}).catch(e=>{o(!1),u(!0),s(!0),x("Failed to verify signed message, please try again.")})},f=(e,t,n)=>{ethereum.request({method:"personal_sign",params:[t,e]}).then(e=>{p(n,e)}).catch(e=>{console.log(e.message),o(!1),u(!0),s(!0),x(e.message)})},v=(e,t)=>{l.Z.post("api/v1/web_login",{auth_id:e,wallet_id:t}).then(s=>{let{token_hash:n,message:a}=s.data.data;f(t,a,e)}).catch(e=>{console.log(e.message),o(!1),u(!0),s(!0),x(e.message)})},y=e=>{ethereum.request({method:"eth_requestAccounts"}).then(t=>{v(e,t[0])}).catch(e=>{console.log(e),o(!1),u(!0),s(!0),x(e.message)})},N=async e=>{o(!0);let t=g();l.Z.post("api/v1/verify_otp",{otp:t}).then(t=>{let{auth_id:s}=t.data.data;e.preventDefault(),y(s)}).catch(e=>{console.log(e.message),o(!1),u(!0),s(!0),x("Invalid code, please try again.")}),e.preventDefault()},w=e=>{let{value:t}=e.target,n=e.currentTarget.nextElementSibling;e.currentTarget.previousElementSibling,t.length?(null!=n?n.focus():s(!1),u(!1)):s(!0)},b=e=>{var t;let{value:n}=e.target;if((null==e?void 0:null===(t=e.nativeEvent)||void 0===t?void 0:t.code)==="Backspace"&&!n.length){let t=e.currentTarget.previousElementSibling;null!=t&&t.focus(),s(!0)}};return r?(0,n.jsx)(j,{}):(0,n.jsxs)("div",{className:"vh-100 d-flex justify-content-center align-items-center flex-column",children:[(0,n.jsxs)("div",{className:"d-flex flex-column justify-content-center align-items-center mid-view",children:[(0,n.jsx)("div",{className:"asset",children:(0,n.jsx)("img",{src:c.Z.Metamask})}),(0,n.jsxs)("div",{className:"heading",children:[" Connecting MetaMask wallet",(0,n.jsx)("br",{}),"via desktop browser "]}),i?(0,n.jsx)("div",{className:"loader-view",children:(0,n.jsx)("div",{className:"loader"})}):(0,n.jsxs)("div",{className:"d-flex flex-column justify-content-center align-items-center",children:[(0,n.jsx)("p",{className:"line-text",children:"Enter the code from your phone here."}),(0,n.jsxs)("div",{className:d?"otpInput-error":"otpInput",children:[(0,n.jsx)("input",{type:"text",maxLength:1,onChange:w,onKeyDown:b,name:e}),(0,n.jsx)("input",{type:"text",maxLength:1,onChange:w,onKeyDown:b,name:e}),(0,n.jsx)("input",{type:"text",maxLength:1,onChange:w,onKeyDown:b,name:e}),(0,n.jsx)("input",{type:"text",maxLength:1,onChange:w,onKeyDown:b,name:e}),(0,n.jsx)("input",{type:"text",maxLength:1,onChange:w,onKeyDown:b,name:e}),(0,n.jsx)("input",{type:"text",maxLength:1,onChange:w,onKeyDown:b,name:e})]}),d?(0,n.jsx)("p",{className:"error-text",children:h}):(0,n.jsx)(n.Fragment,{})]}),(0,n.jsx)("div",{className:"w-100",children:i?(0,n.jsx)("p",{className:"d-flex justify-content-center loading-text",children:"LOADING"}):(0,n.jsx)("button",{type:"submit",disabled:t,className:"w-100 btn btn-dark shadow-none sumit-button",onClick:N,children:"Submit"})})]}),(0,n.jsxs)("div",{className:"footer-container",children:[(0,n.jsx)("div",{className:"footer-text",children:"For technical issues, contact us at"}),(0,n.jsx)("a",{href:"mailto:[email protected]",target:"_blank",className:"footer-email",children:"[email protected]"})]})]})},j=()=>(0,n.jsxs)("div",{className:"vh-100 d-flex justify-content-center align-items-center flex-column",children:[(0,n.jsxs)("div",{className:"d-flex flex-column justify-content-center align-items-center mid-view",children:[(0,n.jsx)("div",{className:"asset",children:(0,n.jsx)("img",{src:c.Z.Metamask})}),(0,n.jsx)("div",{className:"heading",children:" Your MetaMask wallet is successfully connected! "}),(0,n.jsx)("div",{className:"asset",children:(0,n.jsx)("img",{className:"success-tick",src:c.Z.Success})}),(0,n.jsx)("p",{className:"success-text",children:"You may now close this window and head back to the app."})]}),(0,n.jsxs)("div",{className:"footer-container",children:[(0,n.jsx)("div",{className:"footer-text",children:"For technical issues, contact us at"}),(0,n.jsx)("a",{href:"mailto:[email protected]",target:"_blank",className:"footer-email",children:"[email protected]"})]})]}),g=()=>{let e=e=>{window.location.reload(),e.preventDefault()};return(0,n.jsxs)("div",{className:"vh-100 d-flex justify-content-center align-items-center flex-column",children:[(0,n.jsxs)("div",{className:"d-flex flex-column justify-content-center align-items-center mid-view",children:[(0,n.jsx)("div",{className:"asset",children:(0,n.jsx)("div",{className:"circle",children:(0,n.jsx)("div",{className:"warning-icon",children:(0,n.jsx)("img",{src:c.Z.Warning})})})}),(0,n.jsxs)("div",{className:"heading",children:[" MetaMask plugin is",(0,n.jsx)("br",{}),"not installed "]}),(0,n.jsx)("p",{className:"line-text",children:"Go to"}),(0,n.jsx)("a",{className:"description",href:"https://metamask.io/download/",target:"_blank",children:"https://metamask.io/download/"}),(0,n.jsx)("p",{className:"line-text",children:"and install MetaMask plugin. Refresh once done."}),(0,n.jsx)("div",{className:"w-100",children:(0,n.jsx)("button",{type:"submit",className:"w-100 btn btn-dark shadow-none",onClick:e,children:"Refresh"})})]}),(0,n.jsxs)("div",{className:"footer-container",children:[(0,n.jsx)("div",{className:"footer-text",children:"For technical issues, contact us at"}),(0,n.jsx)("a",{href:"mailto:[email protected]",target:"_blank",className:"footer-email",children:"[email protected]"})]})]})};t.default=u}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=39327)}),_N_E=e.O()}]);

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.