1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9978],{1868:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(17963).A)("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])},8728:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(17963).A)("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]])},11508:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(17963).A)("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},12764:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/Components/login",function(){return s(17953)}])},17953:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>y});var r=s(3576),a=s(62701),n=s(37876),l=s(14232),i=s(14e3),o=s(83981),c=s(11508),d=s(8728),u=s(1868),m=s(56732),h=s(30860),x=s(54196),g=s(54587),p=s.n(g);function y(e){let{onLogin:t}=e,s=(0,i.useRouter)(),[g,y]=(0,l.useState)({email:"",password:""}),[f,b]=(0,l.useState)(!1),[w,v]=(0,l.useState)(!1),[j,N]=(0,l.useState)(null),k=e=>{let{name:t,value:s}=e.target;y(e=>(0,a._)((0,r._)({},e),{[t]:s})),j&&N(null)},A=async e=>{e.preventDefault(),v(!0),N(null);try{let e=await fetch("".concat(x.Qs,"auth"),{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(g)}),r=await e.json();e.ok&&r.status?(N({type:"success",text:"Login successful! Redirecting..."}),t(r.data),setTimeout(()=>{s.push("/admin")},1e3)):N({type:"error",text:r.message||"Invalid credentials. Please try again."})}catch(e){console.error("Login error:",e),N({type:"error",text:"Network error. Please check your connection and try again."})}finally{v(!1)}};return(0,n.jsxs)("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-blue-50 via-white to-blue-50",children:[(0,n.jsx)("div",{className:"absolute inset-0 bg-grid-pattern opacity-5"}),(0,n.jsxs)("div",{className:"relative w-full max-w-md",children:[(0,n.jsxs)("div",{className:"bg-white rounded-2xl shadow-2xl border border-gray-100 overflow-hidden",children:[(0,n.jsxs)("div",{className:"bg-gradient-to-r from-blue-600 to-blue-700 px-8 py-8 text-center",children:[(0,n.jsx)("div",{className:"mb-4",children:(0,n.jsx)("div",{className:"w-20 h-20 mx-auto bg-white rounded-full flex items-center justify-center shadow-lg",children:(0,n.jsx)(p(),{src:"/image/mimt/hero-section/college-logo.webp",height:50,width:50,alt:"Mangalmay Logo"})})}),(0,n.jsx)("h1",{className:"text-2xl font-novaBold text-white mb-2",children:"Admin Portal"}),(0,n.jsx)("p",{className:"text-blue-100 text-sm font-novaReg",children:"Sign in to access your dashboard"})]}),(0,n.jsxs)("div",{className:"px-8 py-8",children:[j&&(0,n.jsxs)("div",{className:"mb-6 p-4 rounded-lg flex items-center space-x-3 ".concat("success"===j.type?"bg-green-50 border border-green-200 text-green-800":"bg-red-50 border border-red-200 text-red-800"),children:["success"===j.type?(0,n.jsx)(o.A,{className:"h-5 w-5 flex-shrink-0"}):(0,n.jsx)(c.A,{className:"h-5 w-5 flex-shrink-0"}),(0,n.jsx)("span",{className:"text-sm font-medium",children:j.text})]}),(0,n.jsxs)("form",{onSubmit:A,className:"space-y-6",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{htmlFor:"email",className:"block text-sm font-novaSemi text-gray-700 mb-2",children:"Email Address"}),(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,n.jsx)(d.A,{className:"h-5 w-5 text-gray-400"})}),(0,n.jsx)("input",{id:"email",name:"email",type:"email",required:!0,value:g.email,onChange:k,className:"w-full pl-10 pr-4 py-3 border border-gray-300 font-novaReg rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-colors duration-200 bg-gray-50 focus:bg-white",placeholder:"[email protected]"})]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{htmlFor:"password",className:"block text-sm font-novaSemi text-gray-700 mb-2",children:"Password"}),(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,n.jsx)(u.A,{className:"h-5 w-5 text-gray-400"})}),(0,n.jsx)("input",{id:"password",name:"password",type:f?"text":"password",required:!0,value:g.password,onChange:k,className:"w-full pl-10 pr-12 py-3 border border-gray-300 font-novaReg rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-colors duration-200 bg-gray-50 focus:bg-white",placeholder:"Enter your password"}),(0,n.jsx)("button",{type:"button",onClick:()=>b(!f),className:"absolute inset-y-0 right-0 pr-3 flex items-center",children:f?(0,n.jsx)(m.A,{className:"h-5 w-5 text-gray-400 hover:text-gray-600"}):(0,n.jsx)(h.A,{className:"h-5 w-5 text-gray-400 hover:text-gray-600"})})]})]}),(0,n.jsx)("button",{type:"submit",disabled:w,className:"w-full bg-gradient-to-r from-blue-600 to-blue-700 text-white py-3 px-4 roun
1ded-lg font-novaSemi hover:from-blue-700 hover:to-blue-800 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center space-x-2",children:w?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"animate-spin rounded-full h-5 w-5 border-2 border-white border-t-transparent"}),(0,n.jsx)("span",{children:"Signing In..."})]}):(0,n.jsx)("span",{children:"Sign In to Dashboard"})})]}),(0,n.jsx)("div",{className:"mt-8 text-center",children:(0,n.jsx)("p",{className:"text-xs text-gray-500 font-novaReg",children:"Secure admin access for Mangalmay Institute of Technology"})})]})]}),(0,n.jsx)("div",{className:"mt-6 text-center",children:(0,n.jsxs)("p",{className:"text-sm text-gray-600 flex items-center justify-center font-novaReg space-x-2",children:[(0,n.jsx)(u.A,{className:"h-4 w-4"}),(0,n.jsx)("span",{children:"Your connection is secure and encrypted"})]})})]})]})}},17963:(e,t,s)=>{"use strict";s.d(t,{A:()=>d});var r=s(3576),a=s(65699),n=s(14232);let l=function(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return t.filter((e,t,s)=>!!e&&s.indexOf(e)===t).join(" ")};var i=s(62701),o={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let c=(0,n.forwardRef)((e,t)=>{var{color:s="currentColor",size:c=24,strokeWidth:d=2,absoluteStrokeWidth:u,className:m="",children:h,iconNode:x}=e,g=(0,a._)(e,["color","size","strokeWidth","absoluteStrokeWidth","className","children","iconNode"]);return(0,n.createElement)("svg",(0,r._)((0,i._)((0,r._)({ref:t},o),{width:c,height:c,stroke:s,strokeWidth:u?24*Number(d)/Number(c):d,className:l("lucide",m)}),g),[...x.map(e=>{let[t,s]=e;return(0,n.createElement)(t,s)}),...Array.isArray(h)?h:[h]])}),d=(e,t)=>{let s=(0,n.forwardRef)((s,i)=>{var{className:o}=s,d=(0,a._)(s,["className"]);return(0,n.createElement)(c,(0,r._)({ref:i,iconNode:t,className:l("lucide-".concat(e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),o)},d))});return s.displayName="".concat(e),s}},30860:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(17963).A)("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},54196:(e,t,s)=>{"use strict";s.d(t,{CY:()=>n,Ir:()=>a,Qs:()=>r});let r="https://sea-lion-app-zhe9q.ondigitalocean.app/api/",a="https://mangalmay.sfo3.cdn.digitaloceanspaces.com",n="https://www.mangalmay.org/"},56732:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(17963).A)("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]])},83981:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(17963).A)("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]])}},e=>{e.O(0,[4e3,4587,636,6593,8792],()=>e(e.s=12764)),_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.