"use strict";(()=>{vare={};e.id=6827,e.ids=[3220,6827],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){returnfunctione(t,s){returnsint?t[s]:"then"int&&"function"==typeoft.then?t.then(t=>e(t,s)):"function"==typeoft&&"default"===s?t:void0}}})},24952:(e,t,s)=>{s.r(t),s.d(t,{config:()=>N,default:()=>E,getServerSideProps:()=>A,getStaticPaths:()=>b,getStaticProps:()=>D,reportWebVitals:()=>L,routeModule:()=>q,unstable_getServerProps:()=>M,unstable_getServerSideProps:()=>w,unstable_getStaticParams:()=>I,unstable_getStaticPaths:()=>k,unstable_getStaticProps:()=>O});varr={};s.r(r),s.d(r,{SendPassResetContext:()=>P,default:()=>j,getServerSideProps:()=>y});vara=s(63865),n=s(9455),i=s(30671),o=s(49407),l=s(89600),c=s(8732),u=s(82015),d=s.n(u),p=s(71457),m=s(87472),f=s(32415),h=s(20048),g=s.n(h),_=s(63715),x=s(13002);letS=(0,s(82544).A)("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);functionv({message:e}){return(0,c.jsxs)("div",{className:"info gray",children:[(0,c.jsx)(S,{}),(0,c.jsx)("span",{className:"font-normal",children:e})]})}letP=d().createContext({});functionj(e){lett="Cloudbased SQL data management system | Datasquirel",s="Datasquirel is a fast and efficient cloud-based SQL data management system that takes away the entire hassle of dealing with data both locally and across different platforms.",r=(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("title",{children:t}),(0,c.jsx)("meta",{name:"description",content:s}),(0,c.jsx)(m.A,{pageTitle:t,pageDescription:s,pagePathname:"/"})]}),[a,n]=d().useState(!1),[i,o]=d().useState(!1);return(0,c.jsx)(p.A,{head:r,user:e.user,children:(0,c.jsx)(P.Provider,{value:{user:e.user},children:(0,c.jsx)("main",{children:(0,c.jsxs)("section",{children:[a&&(0,c.jsx)(f.A,{}),i?(0,c.jsx)(x.A,{message:"Email Sent. Please check your email address and follow the link provided",className:"whitespace-nowrap"}):(0,c.jsx)("div",{className:"paper",children:(0,c.jsxs)("div",{className:"max-w-xl flex-col items-stretch",children:[(0,c.jsx)("h1",{className:"m-0 text-4xl",children:"Send Password Reset Link"}),(0,c.jsx)("span",{children:"Please enter your email address to receive a password reset link"}),(0,c.jsxs)("form",{className:"w-full flex flex-col items-stretch gap-4",onSubmit:e=>{n(!0),e.preventDefault();lett=e.target["email-address"].value;(0,_.A)(`/api/sendPasswordResetLink?email=${t}`).then(e=>{console.log(e),setTimeout(()=>{n(!1)},500),e.success&&o(!0)})},children:[(0,c.jsx)("input",{type:"text",autoComplete:"email",name:"email-address",id:"email-address",className:"w-full",placeholder:"Email Address",defaultValue:e?.user?.logged_in_status?e.user.email:"",required:!0}),(0,c.jsx)("button",{children:"Send password reset Email"}),(0,c.jsx)(v,{message:"Please note that this link will expire after 1 hour"})]})]})})]})})})})}asyncfunctiony({req:e,res:t}){lets=awaitg()(e,t);returns?.social_login?{redirect:{destination:"/",permanent:!1}}:{props:{user:s}}}letE=(0,i.M)(r,"default"),D=(0,i.M)(r,"getStaticProps"),b=(0,i.M)(r,"getStaticPaths"),A=(0,i.M)(r,"getServerSideProps"),N=(0,i.M)(r,"config"),L=(0,i.M)(r,"reportWebVitals"),O=(0,i.M)(r,"unstable_getStaticProps"),k=(0,i.M)(r,"unstable_getStaticPaths"),I=(0,i.M)(r,"unstable_getStaticParams"),M=(0,i.M)(r,"unstable_getServerProps"),w=(0,i.M)(r,"unstable_getServerSideProps"),q=newa.PagesRouteModule({definition:{kind:n.A.PAGES,page:"/send-password-reset-link",pathname:"/send-password-reset-link",bundlePath:"",filename:""},components:{App:l.default,Document:o.default},userland:r})},13002:(e,t,s)=>{s.d(t,{A:()=>a});varr=s(8732);functiona({message:e,className:t}){return(0,r.jsxs)("div",{className:"info green"+(t?" "+t:""),children:[(0,r.jsx)("img",{src:"/images/checkmark.svg",alt:"Warning Image Icon",width:22,className:"-my-2"}),(0,r.jsx)("span",{children:e})]})}s(82015)},20048:(e,t,s)=>{s(81630);letr=s(67216),a=s(77463),n=s(29021),i=s(6505);asyncfunctiono(e,t,s,o){let{keyCookieName:l,csrfCookieName:c}=i();if(!e.cookies?.