(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3533],{20084:(e,s,a)=>{"use strict";a.r(s),a.d(s,{default:()=>g});var r=a(37876),l=a(14232),n=a(89099),t=a(54587),i=a.n(t),o=a(48230),d=a.n(o);a(72232);var c=a(3945),A=a(38580),u=a(1785),h=a(23875),w=a(31777),p=a(99186);let g=()=>{let e=(0,w.wA)(),s=(0,n.useRouter)(),a=(0,l.useRef)(null),{token:t}=s.query,[o,g]=(0,l.useState)({newPass:"",cnfPass:""}),[f,m]=(0,l.useState)(""),P=async a=>{a.preventDefault();let{newPass:r,cnfPass:l}=o,n=(0,h.Oj)(r);if(n&&r===l){let a=await (0,u.R_)(e((0,p.Sx)({password:r,token:t})),"Validating...","Password has been updated successfully!");if(null==a?void 0:a.error)return;s.push("/adminpanel")}else n?(0,u.Ax)("Passwords do not match."):(0,u.Ax)("Password must contain at least one digit, uppercase, lowercase, and special character.")};return(0,r.jsx)("div",{className:"login-wrapper",children:(0,r.jsxs)("div",{className:"login-outer",children:[(0,r.jsxs)("div",{className:"login-inner",children:[(0,r.jsx)("div",{className:"login-logo",children:(0,r.jsx)(i(),{src:A.A,height:100,width:100,alt:"Lokmanya Logo"})}),(0,r.jsxs)("form",{className:"input-fields",onSubmit:P,children:[(0,r.jsx)(c.FO,{type:"password",id:"newPass",label:"New Password",value:o.newPass,onChange:e=>g({...o,newPass:e.target.value}),error:f,onFocus:()=>m(null),icon:!1,isPass:!0,placeholder:"Type your new password",required:!0}),(0,r.jsx)(c.FO,{type:"password",id:"cnfPass",label:"Confirm Password",value:o.cnfPass,onChange:e=>g({...o,cnfPass:e.target.value}),error:f,onFocus:()=>m(null),icon:!1,isPass:!0,placeholder:"Type confirm password",required:!0}),(0,r.jsx)(c.jn,{type:"submit",children:"Submit"})]}),(0,r.jsx)("div",{className:"forget-pass",children:(0,r.jsx)(d(),{href:"/adminpanel",legacyBehavior:!0,children:(0,r.jsx)("a",{ref:a,children:"Back to login"})})})]}),(0,r.jsx)("div",{className:"copyright",children:(0,r.jsxs)("span",{children:["\xa9 ",new Date().getFullYear()," Lokmanya Hospital. All Right Reserved. Powered by"," ",(0,r.jsx)("a",{href:"https://www.hatsoffdigital.com/",target:"_blank",rel:"noopener noreferrer",children:"Hats-Off"})]})})]})})}},23875:(e,s,a)=>{"use strict";a.d(s,{Bs:()=>r,DT:()=>n,Oj:()=>l});let r=e=>{let s=!1,a=!!parseInt(e);return""!==e&&(a&&""!==e?s=!!(8===e.length&&/^\d+\.?\d*$/.test(e)):""!==e&&(s=!!e.toLowerCase().match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|.(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)),s)},l=e=>/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*])(?=.*[a-zA-Z]).{8,}$/g.test(e),n=e=>e.match(/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)},38580:(e,s,a)=>{"use strict";a.d(s,{A:()=>r});let r={src:"/_next/static/media/lokmanya-logo.ed39e4b9.webp",height:462,width:2348,blurDataURL:"data:image/webp;base64,UklGRmQAAABXRUJQVlA4WAoAAAAQAAAABwAAAQAAQUxQSBEAAAAAbD9hiHKHd3lRQGFkVFRhPQBWUDggLAAAAPABAJ0BKggAAgACQDglpAJ0fwAYS+WOAAD+9rM/qXkmSEPxjqofBDXnYAAA",blurWidth:8,blurHeight:2}},48768:(e,s,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/login/ChangePassword",function(){return a(20084)}])}},e=>{var s=s=>e(e.s=s);e.O(0,[636,6593,8792],()=>s(48768)),_N_E=e.O()}]);
//# sourceMappingURL=ChangePassword-e232d228e45a4b6f.js.map