(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8004],{67468:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>A});var n=t(95155),i=t(12115),a=t(20063),s=t(97322),l=t(80851),c=t(23315),o=t(4474),u=t(78010),d=t(91871),h=t(52619),x=t.n(h);let g=()=>{let e=(0,a.useRouter)(),r=(0,a.useSearchParams)().get("error");return(0,i.useEffect)(()=>{let r=setTimeout(()=>{e.push("/auth/signin")},3e3);return()=>clearTimeout(r)},[e]),(0,n.jsx)(s.A,{maxWidth:"sm",children:(0,n.jsxs)(l.A,{sx:{marginTop:8,display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center"},children:[(0,n.jsx)(c.A,{variant:"h4",gutterBottom:!0,color:"primary",children:"Authentication Error"}),(0,n.jsxs)(l.A,{sx:{display:"flex",alignItems:"center",mb:3},children:[(0,n.jsx)(o.A,{size:20,sx:{mr:2}}),(0,n.jsx)(c.A,{variant:"body1",children:"Redirecting to login page..."})]}),r&&(0,n.jsxs)(u.A,{severity:"error",sx:{width:"100%",mb:3},children:[(0,n.jsxs)(c.A,{variant:"subtitle2",gutterBottom:!0,children:["Error: ",r]}),(e=>{switch(e){case"OAuthSignin":return"There was an error during OAuth sign in. Please try again.";case"OAuthCallback":return"There was an error during OAuth callback. Please try again.";case"OAuthCreateAccount":return"Could not create OAuth account. Please try again.";case"OAuthAccountNotLinked":return"This email is already associated with another account. Please sign in with your original provider.";case"CredentialsSignin":return"Sign in failed. Check your credentials.";default:return"An error occurred during authentication. Please try again."}})(r)]}),(0,n.jsxs)(l.A,{sx:{mt:3},children:[(0,n.jsx)(c.A,{variant:"body2",color:"text.secondary",gutterBottom:!0,children:"You will be automatically redirected to the login page in a few seconds."}),(0,n.jsxs)(l.A,{sx:{mt:2,display:"flex",gap:2,justifyContent:"center"},children:[(0,n.jsx)(d.A,{variant:"contained",onClick:()=>e.push("/auth/signin"),children:"Go to Login Now"}),(0,n.jsx)(d.A,{variant:"outlined",component:x(),href:"/",children:"Go Home"})]})]})]})})},A=()=>(0,n.jsx)(i.Suspense,{fallback:(0,n.jsx)(s.A,{maxWidth:"sm",children:(0,n.jsxs)(l.A,{sx:{marginTop:8,display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center"},children:[(0,n.jsx)(o.A,{}),(0,n.jsx)(c.A,{variant:"h6",sx:{mt:2},children:"Loading..."})]})}),children:(0,n.jsx)(g,{})})},72443:(e,r,t)=>{Promise.resolve().then(t.bind(t,67468))}},e=>{e.O(0,[922,8010,176,957,8441,1255,7358],()=>e(e.s=72443)),_N_E=e.O()}]);