1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f36fb294-4c73-4db9-b6ef-23f7cd6f911c",e._sentryDebugIdIdentifier="sentry-dbid-f36fb294-4c73-4db9-b6ef-23f7cd6f911c")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9070],{13541:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/verify-email",function(){return i(61987)}])},61987:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return j}});var o=i(85893),r=i(40645),s=i.n(r),a=i(67294),n=i(11163),d=i(9008),l=i.n(d),c=i(41664),x=i.n(c),f=i(33299),p=i(23432),m=i(86691),g=i(23603),u=i(53645),y=i(43832),b=i(15928),h=i(27695);function j(){let e=(0,n.useRouter)(),{token:t,pending:i,email:r}=e.query;console.log("\uD83D\uDD0D [verify-email MOUNT] Component mounted! Router isReady:",e.isReady,"Query params:",{token:!!t,pending:i,queryEmail:r});let[d,c]=(0,a.useState)("loading"),[j,S]=(0,a.useState)(""),[w,D]=(0,a.useState)(!1),[N,k]=(0,a.useState)(""),[v,z]=(0,a.useState)(""),[E,C]=(0,a.useState)(""),[F,R]=(0,a.useState)(!1),[I,B]=(0,a.useState)(""),[P,A]=(0,a.useState)(!1),[_,W]=(0,a.useState)(5),T=async t=>{if(t.preventDefault(),!E){B("Please enter your password");return}A(!0),B("");try{let t=await (0,f.signIn)("credentials",{email:v,password:E,redirect:!1});if(null==t?void 0:t.error)B("Invalid password. Please try again.");else try{let t=await fetch("/api/user/profile");if(t.ok){let i=await t.json(),o="TEACHER"===i.role?"/onboarding/teacher":"PARENT"===i.role?"/onboarding/parent":"PLATFORM_ADMIN"===i.role?"/platform-admin":"SCHOOL_ADMIN"===i.role?"/school-admin":"/onboarding/welcome";e.push(o)}else e.push("/onboarding/welcome")}catch(t){e.push("/onboarding/welcome")}}catch(e){B("Something went wrong. Please try again.")}finally{A(!1)}},O=async()=>{if(!r){k("Email not available. Please try signing up again.");return}D(!0),k("");try{let e=await fetch("/api/auth/resend-verification",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:r})}),t=await e.json();e.ok?k("Verification email sent! Check your inbox."):k(t.message||"Failed to resend. Please try again.")}catch(e){k("Something went wrong. Please try again.")}finally{D(!1)}};return(0,a.useEffect)(()=>{if(!e.isReady){console.log("\uD83D\uDD0D [verify-email] Router not ready yet");return}let{token:t,pending:i}=e.query;if(console.log("\uD83D\uDD0D [verify-email] Page loaded with params:",{token:t?"".concat(String(t).substring(0,20),"..."):"NONE",pending:i}),"true"===i){console.log("\uD83D\uDD0D [verify-email] Showing pending state (user just signed up)"),c("pending"),S("We've sent a verification link to your email address.");return}if(!t){console.log("â [verify-email] ERROR: No token in URL"),c("error"),S("No verification link provided. Please check your email.");return}(async function(){console.log("\uD83D\uDE80 [verify-email] Starting verification with token:",String(t).substring(0,20)+"..."),c("loading");try{let e="/api/auth/verify-email?token=".concat(t);console.log("\uD83D\uDCE1 [verify-email] Calling API:",e);let i=await fetch(e);console.log("\uD83D\uDCE1 [verify-email] API response status:",i.status);let o=await i.json();console.log("\uD83D\uDCE1 [verify-email] API response data:",o),i.ok?(o.alreadyVerified?(console.log("â
[verify-email] Email was already verified"),c("already-verified"),S("Your email is already verified.")):(console.log("â
[verify-email] Email verified successfully!"),c("success"),S(o.message||"Email verified successfully!")),o.email&&z(o.email)):(console.log("â [verify-email] API error:",o.message),c("error"),S(o.message||"Verification failed."))}catch(e){console.error("â [verify-email] Exception:",e),c("error"),S("Something went wrong. Please try again.")}})()},[e.isReady,e.query]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(l(),{children:(0,o.jsx)("title",{className:"jsx-532d500bfc6d5d04",children:"Verify Email | Unipply"})}),(0,o.jsx)("div",{style:{minHeight:"100vh",background:"linear-gradient(135deg, #FAFAFA 0%, #F5F5F7 100%)",display:"flex",alignItems:"center",justifyContent:"center",padding:"20px"},className:"jsx-532d500bfc6d5d04",children:(0,o.jsxs)("div",{style:{background:"#fff",borderRadius:"24px",border:"3px solid #000",boxShadow:"8px 8px 0px #000",padding:"48px",maxWidth:"480px",width:"100%",textAlign:"center"},className:"jsx-532d500bfc6d5d04",children:[(0,o.jsx)("h1",{style:{fontSize:"28px",fontWeight:900,letterSpacing:"0.1em",textTransform:"uppercase",marginBottom:"32px"},className:"jsx-532d500bfc6d5d04",children:"UNIPPLY"}),"loading"===d&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{style:{width:"80px",height:"80px",background:"linear-gradient(135deg, #4ECDC4 0%, #44A08D 100%)",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 24px",border:"3px solid #000",boxShadow:"4px 4px 0px #000"},className:"jsx-532d500bfc6d5d04",children:(0,o.jsx)(p.Z,{size:36,color:"#fff",style:{animation:"spin 1s linear infinite"}})}),(0,o.jsx)("h2",{style:{fontSize:"24px",fontWeight:900,marginBottom:"12px"},className:"jsx-532d500bfc6d5d04",children:"Verifying Your Email..."}),(0,o.jsx)("p",{style:{color:"#666"},className:"jsx-532d500bfc6d5d04",children:"Please wait a moment."})]}),"pending"===d&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{style:{background:"linear-gradient(135deg, #FFE66D 0%, #FFD93D 100%)",border:"3px solid #000",borderRadius:"12px",padding:"16px",marginBottom:"32px",textAlign:"left"},className:"jsx-532d500bfc6d5d04",children:[(0,o.jsx)("p",{style:{margin:0,fontSize:"14px",fontWeight:700,color:"#000",textTransform:"uppercase",letterSpacing:"0.05em"},className:"jsx-532d500bfc6d5d04",children:"â ï¸ Email Verification Required"}),(0,o.jsx)("p",{style:{margin:"8px 0 0",fontSize:"13px",color:"#333",fontWeight:500},className:"jsx-532d500bfc6d5d04",children:"You must verify your email to access your account and complete onboarding."})]}),(0,o.jsx)("div",{style:{width:"80px",height:"80px",background:"linear-gradient(135deg, #4ECDC4 0%, #44A08D 100%)",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 24px",border:"3px solid #000",boxShadow:"4px 4px 0px #000"},className:"jsx-532d500bfc6d5d04",children:(0,o.jsx)(m.Z,{size:36,color:"#fff"})}),(0,o.jsx)("h2",{style:{fontSize:"24px",fontWeight:900,marginBottom:"12px"},className:"jsx-532d500bfc6d5d04",children:"Check Your Email \uD83D\uDCE7"}
1),(0,o.jsx)("p",{style:{color:"#666",marginBottom:"16px",fontSize:"16px",fontWeight:500},className:"jsx-532d500bfc6d5d04",children:j}),(0,o.jsxs)("p",{style:{color:"#888",fontSize:"14px",marginBottom:"32px"},className:"jsx-532d500bfc6d5d04",children:[(0,o.jsx)("strong",{style:{color:"#000"},className:"jsx-532d500bfc6d5d04",children:"Next step:"})," Click the verification link in the email to verify your account.",(0,o.jsx)("br",{className:"jsx-532d500bfc6d5d04"}),(0,o.jsx)("span",{style:{fontSize:"12px"},className:"jsx-532d500bfc6d5d04",children:"Don't see the email? Check your spam folder."})]}),(0,o.jsxs)("button",{onClick:O,disabled:w,style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",background:w?"#ccc":"#f5f5f5",color:"#333",padding:"12px 24px",fontSize:"14px",fontWeight:600,border:"2px solid #000",borderRadius:"12px",cursor:w?"not-allowed":"pointer",margin:"0 auto 16px",boxShadow:"3px 3px 0px #000"},className:"jsx-532d500bfc6d5d04",children:[w?(0,o.jsx)(p.Z,{size:18,style:{animation:"spin 1s linear infinite"}}):(0,o.jsx)(g.Z,{size:18}),w?"Sending...":"Resend Verification Email"]}),N&&(0,o.jsx)("p",{style:{color:N.includes("sent")?"#22c55e":"#ef4444",fontSize:"14px",marginBottom:"24px"},className:"jsx-532d500bfc6d5d04",children:N}),(0,o.jsx)(x(),{href:"/auth",style:{display:"inline-block",color:"#666",fontSize:"14px",textDecoration:"underline"},children:"Back to Sign In"})]}),"success"===d&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{style:{width:"80px",height:"80px",background:"linear-gradient(135deg, #4ECDC4 0%, #44A08D 100%)",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 24px",border:"3px solid #000",boxShadow:"4px 4px 0px #000"},className:"jsx-532d500bfc6d5d04",children:(0,o.jsx)(u.Z,{size:36,color:"#fff"})}),(0,o.jsx)("h2",{style:{fontSize:"24px",fontWeight:900,marginBottom:"12px"},className:"jsx-532d500bfc6d5d04",children:"Email Verified! \uD83C\uDF89"}),(0,o.jsx)("p",{style:{color:"#666",marginBottom:"8px"},className:"jsx-532d500bfc6d5d04",children:j}),(0,o.jsx)("p",{style:{color:"#888",fontSize:"14px",marginBottom:"24px"},className:"jsx-532d500bfc6d5d04",children:"Enter your password to continue to Unipply"}),(0,o.jsxs)("form",{onSubmit:T,style:{width:"100%"},className:"jsx-532d500bfc6d5d04",children:[(0,o.jsxs)("div",{style:{marginBottom:"16px",textAlign:"left"},className:"jsx-532d500bfc6d5d04",children:[(0,o.jsx)("label",{style:{display:"block",fontSize:"14px",fontWeight:600,marginBottom:"8px",color:"#333"},className:"jsx-532d500bfc6d5d04",children:"Email"}),(0,o.jsx)("input",{type:"email",value:v,disabled:!0,style:{width:"100%",padding:"14px 16px",fontSize:"16px",border:"2px solid #e0e0e0",borderRadius:"12px",background:"#f5f5f5",color:"#666",boxSizing:"border-box"},className:"jsx-532d500bfc6d5d04"})]}),(0,o.jsxs)("div",{style:{marginBottom:"24px",textAlign:"left"},className:"jsx-532d500bfc6d5d04",children:[(0,o.jsx)("label",{style:{display:"block",fontSize:"14px",fontWeight:600,marginBottom:"8px",color:"#333"},className:"jsx-532d500bfc6d5d04",children:"Password"}),(0,o.jsxs)("div",{style:{position:"relative"},className:"jsx-532d500bfc6d5d04",children:[(0,o.jsx)("input",{type:F?"text":"password",value:E,onChange:e=>C(e.target.value),placeholder:"Enter your password",autoFocus:!0,style:{width:"100%",padding:"14px 48px 14px 16px",fontSize:"16px",border:"2px solid #000",borderRadius:"12px",boxSizing:"border-box"},className:"jsx-532d500bfc6d5d04"}),(0,o.jsx)("button",{type:"button",onClick:()=>R(!F),style:{position:"absolute",right:"14px",top:"50%",transform:"translateY(-50%)",background:"none",border:"none",cursor:"pointer",padding:"4px"},className:"jsx-532d500bfc6d5d04",children:F?(0,o.jsx)(y.Z,{size:20,color:"#666"}):(0,o.jsx)(b.Z,{size:20,color:"#666"})})]})]}),I&&(0,o.jsx)("p",{style:{color:"#ef4444",fontSize:"14px",marginBottom:"16px",textAlign:"center"},className:"jsx-532d500bfc6d5d04",children:I}),(0,o.jsxs)("button",{type:"submit",disabled:P,style:{width:"100%",background:P?"#666":"#000",color:"#fff",padding:"16px 40px",fontSize:"16px",fontWeight:700,border:"none",borderRadius:"12px",textTransform:"uppercase",letterSpacing:"0.05em",boxShadow:"4px 4px 0px rgba(0,0,0,0.2)",cursor:P?"not-allowed":"pointer",display:"flex",alignItems:"center",justifyContent:"center",gap:"8px"},className:"jsx-532d500bfc6d5d04",children:[P&&(0,o.jsx)(p.Z,{size:18,style:{animation:"spin 1s linear infinite"}}),P?"Signing In...":"Continue to Unipply"]})]})]}),"already-verified"===d&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{style:{width:"80px",height:"80px",background:"linear-gradient(135deg, #FFE66D 0%, #FFD93D 100%)",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 24px",border:"3px solid #000",boxShadow:"4px 4px 0px #000"},className:"jsx-532d500bfc6d5d04",children:(0,o.jsx)(m.Z,{size:36,color:"#000"})}),(0,o.jsx)("h2",{style:{fontSize:"24px",fontWeight:900,marginBottom:"12px"},className:"jsx-532d500bfc6d5d04",children:"Already Verified"}),(0,o.jsx)("p",{style:{color:"#666",marginBottom:"32px"},className:"jsx-532d500bfc6d5d04",children:j}
1),(0,o.jsx)(x(),{href:"/auth",style:{display:"inline-block",background:"#000",color:"#fff",padding:"16px 40px",fontSize:"16px",fontWeight:700,textDecoration:"none",borderRadius:"12px",textTransform:"uppercase",letterSpacing:"0.05em",boxShadow:"4px 4px 0px rgba(0,0,0,0.2)"},children:"Sign In"})]}),"error"===d&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{style:{width:"80px",height:"80px",background:"linear-gradient(135deg, #FF6B6B 0%, #FF5252 100%)",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 24px",border:"3px solid #000",boxShadow:"4px 4px 0px #000"},className:"jsx-532d500bfc6d5d04",children:(0,o.jsx)(h.Z,{size:36,color:"#fff"})}),(0,o.jsx)("h2",{style:{fontSize:"24px",fontWeight:900,marginBottom:"12px"},className:"jsx-532d500bfc6d5d04",children:"Verification Failed"}),(0,o.jsx)("p",{style:{color:"#666",marginBottom:"32px"},className:"jsx-532d500bfc6d5d04",children:j}),(0,o.jsx)(x(),{href:"/auth",style:{display:"inline-block",background:"#000",color:"#fff",padding:"16px 40px",fontSize:"16px",fontWeight:700,textDecoration:"none",borderRadius:"12px",textTransform:"uppercase",letterSpacing:"0.05em",boxShadow:"4px 4px 0px rgba(0,0,0,0.2)"},children:"Back to Sign In"})]})]})}),(0,o.jsx)(s(),{id:"532d500bfc6d5d04",children:"@-webkit-keyframes spin{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-moz-keyframes spin{from{-moz-transform:rotate(0deg);transform:rotate(0deg)}to{-moz-transform:rotate(360deg);transform:rotate(360deg)}}@-o-keyframes spin{from{-o-transform:rotate(0deg);transform:rotate(0deg)}to{-o-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spin{from{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);-moz-transform:rotate(360deg);-o-transform:rotate(360deg);transform:rotate(360deg)}}"})]})}}},function(e){e.O(0,[5129,2888,9774,179],function(){return e(e.s=13541)}),_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.