1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[312],{6821:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/sign-in",function(){return n(6264)}])},6264:function(e,s,n){"use strict";n.r(s),n.d(s,{__N_SSP:function(){return x},default:function(){return h}});var t=n(5893),a=n(1261),r=n(3299),l=n(1664),i=n.n(l),o=n(1163),c=n.n(o),d=n(7294),m=n(7536),u=n(2920);n(1399);var x=!0;function h(e){let{csrfToken:s,providers:n}=e,{query:l}=(0,o.useRouter)(),[x,h]=d.useState(!1),{register:p,handleSubmit:f}=(0,m.cI)();(0,d.useEffect)(()=>{l.error&&((0,u.Am)("Oops! Something went wrong.",{type:"error"}),window.history.pushState({},document.title,window.location.pathname))},[l]);let b=e=>{(0,r.signIn)(e.id)},j=async e=>{h(!0);try{(0,r.signIn)("app-login",{email:e.email,password:e.password,redirect:!1}).then(e=>{let{ok:s,error:n}=e;s&&!n?c().push("/dashboard/portfolio/summary"):n&&(0,u.Am)(n,{type:"error"})}),setTimeout(()=>{h(!1)},850)}catch(e){h(!1)}};return(0,t.jsx)(a.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:"Sign In"}),(0,t.jsxs)("h2",{children:["Sign in with an existing account, or"," ",(0,t.jsx)(i(),{href:"/register",children:"create new account."})]})]}),(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(j),children:[(0,t.jsx)("input",{name:"csrfToken",...p("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,...p("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,...p("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.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:"Sign in"})})})]}),(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"}),(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:n.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=6821)}),_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.