1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[495],{4722:function(e,s,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/register",function(){return r(972)}])},972:function(e,s,r){"use strict";r.r(s),r.d(s,{__N_SSP:function(){return x},default:function(){return p}});var t=r(5893),n=r(1261),a=r(3299),l=r(1664),i=r.n(l),o=r(1163),d=r.n(o),c=r(7294),m=r(7536),u=r(2920);r(1399);var x=!0;function p(e){let{csrfToken:s,providers:r}=e,{query:l}=(0,o.useRouter)(),[x,p]=c.useState(!1),{register:h,handleSubmit:f}=(0,m.cI)(),b=e=>{(0,a.signIn)(e.id)};(0,c.useEffect)(()=>{l.error&&((0,u.Am)("Oops! Something went wrong.",{type:"error"}),window.history.pushState({},document.title,window.location.pathname))},[l]);let w=async e=>{if(e.password===e.confirmPassword){p(!0);try{(0,a.signIn)("app-register",{email:e.email,password:e.password,redirect:!1}).then(e=>{let{ok:s,error:r}=e;s&&!r?d().push("/dashboard/portfolio/summary"):r&&(0,u.Am)(r,{type:"error"})}),setTimeout(()=>{p(!1)},850)}catch(e){p(!1)}}else(0,u.Am)("Passwords must match",{type:"error"})};return(0,t.jsx)(n.Z,{children:(0,t.jsxs)("div",{className:"min-h-screen flex flex-col sm:px-6 lg:px-8",children:[(0,t.jsxs)("div",{className:" flex flex-col justify-center sm:px-6 lg:px-8",children:[(0,t.jsxs)("div",{className:"sm:mx-auto sm:w-full sm:max-w-md text-center",children:[(0,t.jsx)("h1",{className:"text-xl font-bold leading-7 text-gray-900 sm:leading-9 sm:truncate",children:"Register"}),(0,t.jsxs)("h2",{children:["Create a new account, or ",(0,t.jsx)(i(),{href:"/sign-in",children:"log in."})]})]}),(0,t.jsx)("div",{className:"mt-6 sm:mx-auto sm:w-full sm:max-w-md",children:(0,t.jsxs)("div",{className:"px-4 mx-2 rounded-sm sm:px-10",children:[(0,t.jsxs)("form",{className:"text-center my-12",onSubmit:f(w),children:[(0,t.jsx)("input",{name:"csrfToken",...h("csrfToken"),type:"hidden",defaultValue:s,hidden:!0}),(0,t.jsxs)("div",{className:"",children:[(0,t.jsx)("label",{htmlFor:"email",className:"block text-sm font-medium text-neutral-400",children:"Email address"}),(0,t.jsx)("div",{className:"mt-1",children:(0,t.jsx)("input",{id:"email",name:"email",type:"email",autoComplete:"email",required:!0,...h("email"),className:"appearance-none w-full font-medium py-3 border-b border-t-0 border-l-0 border-r-0 border-dashed outline-none text-xl text-center leading-6 bg-transparent placeholder-gray-500 focus:outline-none focus:placeholder-gray-400 transition duration-150 ease-in-out"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"mt-8",children:(0,t.jsx)("label",{htmlFor:"password",className:"block text-sm font-medium text-neutral-400",children:"Password"})}),(0,t.jsx)("div",{className:"mt-1",children:(0,t.jsx)("input",{id:"password",name:"password",type:"password",autoComplete:"current-password",minLength:6,required:!0,...h("password"),className:"appearance-none w-full font-medium py-3 border-b border-t-0 border-l-0 border-r-0 border-dashed outline-none text-xl text-center leading-6 bg-transparent placeholder-gray-500 focus:outline-none focus:placeholder-gray-400 transition duration-150 ease-in-out"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"mt-8",children:(0,t.jsx)("label",{htmlFor:"confirm-password",className:"block text-sm font-medium text-neutral-400",children:"Confirm Password"})}),(0,t.jsx)("div",{className:"mt-1",children:(0,t.jsx)("input",{id:"confirm-password",name:"confirm-password",type:"password",minLength:6,required:!0,...h("confirmPassword"),className:"appearance-none w-full font-medium py-3 border-b border-t-0 border-l-0 border-r-0 border-dashed outline-none text-xl text-center leading-6 bg-transparent placeholder-gray-500 focus:outline-none focus:placeholder-gray-400 transition duration-150 ease-in-out"})})]}),(0,t.jsx)("div",{className:"mt-8 space-y-2 flex justify-center",children:(0,t.jsx)("button",{type:"submit",disabled:x,className:"button button__md button__primary w-full h-10",children:x?(0,t.jsx)("img",{src:"/assets/loading.svg",alt:"loading icon"}):(0,t.jsx)("p",{children:"Register"})})})]}),(0,t.jsxs)("section",{className:"mt-8 text-center",children:[(0,t.jsxs)("div",{className:"flex flex-col mb-3",children:[(0,t.jsx)("hr",{className:"h-0 border-t mt
1-1"}),(0,t.jsx)("div",{className:"-mt-3 text-sm text-center",children:(0,t.jsx)("span",{className:"px-2 bg-white",children:"Or with"})})]}),(0,t.jsx)("div",{className:"",children:r.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>b(e),className:"button button__secondary inline-flex space-x-2 w-full h-10",children:[(0,t.jsx)("img",{className:"w-6 h-6",src:"/assets/".concat(e.id,".svg"),alt:"login provider icon"}),(0,t.jsx)("p",{children:e.name})]},e))})]})]})})]}),(0,t.jsx)(u.Ix,{})]})})}}},function(e){e.O(0,[664,355,261,774,888,179],function(){return e(e.s=4722)}),_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.