1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7537],{40961:(e,s,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/reset-password",function(){return r(49691)}])},49691:(e,s,r)=>{"use strict";r.r(s),r.d(s,{default:()=>g});var t=r(37876),a=r(14232),n=r(96145),o=r(3645),l=r(53869),i=r(91408),d=r(81220),c=r(89099),x=r(88754);let m=i.Ik().shape({password:i.Yj().required("Password is required").min(8,"Password must be at least 8 characters"),confirmPassword:i.Yj().required("Confirm password is required").oneOf([i.KR("password"),null],"Passwords do not match")}),h=e=>{let{className:s=""}=e;return(0,t.jsxs)("svg",{className:s,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("rect",{x:"4",y:"10.5",width:"16",height:"10",rx:"2"}),(0,t.jsx)("path",{d:"M7.5 10.5V7a4.5 4.5 0 0 1 9 0v3.5"})]})},p=e=>{let{className:s="",onClick:r}=e;return(0,t.jsxs)("svg",{className:s,onClick:r,width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7Z"}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"3"})]})},u=e=>{let{className:s="",onClick:r}=e;return(0,t.jsxs)("svg",{className:s,onClick:r,width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M3 3l18 18"}),(0,t.jsx)("path",{d:"M10.6 5.2A10.6 10.6 0 0 1 12 5c6.5 0 10 7 10 7a17.9 17.9 0 0 1-3.4 4.3M6.6 6.6C4 8.3 2 12 2 12s3.5 7 10 7a10 10 0 0 0 4.4-1"}),(0,t.jsx)("path",{d:"M9.9 10a3 3 0 0 0 4.1 4.1"})]})},w=e=>{let{className:s=""}=e;return(0,t.jsxs)("svg",{className:s,width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M12 3.5 5 6v5.5c0 4.5 3 7.5 7 9 4-1.5 7-4.5 7-9V6l-7-2.5Z"}),(0,t.jsx)("path",{d:"m9 12 2 2 4-4"})]})},f=e=>{let{email:s}=e,r=(0,c.useRouter)(),[i,f]=(0,a.useState)({password:"",confirmPassword:""}),[g,j]=(0,a.useState)(null),[y,N]=(0,a.useState)({passwordShow:!1,confirmPasswordShow:!1}),[b,k]=(0,a.useState)(""),[v,S]=(0,a.useState)(!1);(0,a.useEffect)(()=>{""!==b&&setTimeout(()=>{k(""),r.push("/login")},1e3)},[b,r]);let C=e=>{let{target:s}=e,{type:r,checked:t,name:a}=s,n="checkbox"===r?t:s.value;f({...i,[a]:n})},_=async e=>{e.preventDefault();try{await m.validate(i,{abortEarly:!1}),j({})}catch(s){let e={};s.inner?s.inner.forEach(s=>{e[s.path]=s.message}):e[s.path]=s.message,j(e);return}try{let e=new FormData;e.append("email",s),e.append("password",i.password),e.append("password_confirmation",i.confirmPassword),S(!0);let r=await (0,d.xw)(e);r.error?(j(r.message),S(!1)):k("Password changed successfully")}catch(e){S(!1),j(e.response.data.message)}},P=e=>{N({...y,[e]:!y[e]})},{password:E,confirmPassword:L}=i,A=(0,t.jsxs)("div",{className:"hidden items-center gap-3 md:flex",children:[(0,t.jsx)("span",{className:"text-sm text-grey",children:"Remember your password?"}),(0,t.jsx)(n.N_,{href:"/login",className:"rounded-lg border border-primary px-5 py-2 text-sm font-medium text-primary hover:bg-primary/5 transition-colors",children:"Sign in"})]}),M=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("form",{onSubmit:_,autoComplete:"off",className:"mt-6 space-y-5 md:mt-8",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(n.JU,{className:"mb-1.5 block text-sm font-medium text-black",children:"New password"}),(0,t.jsx)(n.pd,{type:y.passwordShow?"text":"password",placeholder:"Enter a new password",autoComplete:"new-password",name:"password",value:E,onChange:C,className:"w-full h-12 pl-11 pr-11 text-sm text-black border border-dividerGrey rounded-lg outline-none focus:ring-2 focus:primary",prefix:(0,t.jsx)("span",{className:"absolute left-4 top-1/2 -translate-y-1/2",children:(0,t.jsx)(h,{className:"inline-block text-grey"})}),suffix:(0,t.jsx)("span",{className:"absolute right-4 top-1/2 -translate-y-1/2 cursor-pointer",children:y.passwordShow?(0,t.jsx)(u,{onClick:()=>P("passwordShow"),className:"inline-block text-grey"}):(0,t.jsx)(p,{onClick:()=>P("passwordShow"),className:"inline-block text-grey"})})}),(null==g?void 0:g.password)&&(0,t.jsx)("p",{className:"mt-1 text-12 text-red",children:g.password})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.JU,{className:"mb-1.5 block text-sm font-medium text-black",children:"Confirm new password"}),(0,t.jsx)(n.pd,{type:y.confirmPasswordShow?"text":"password",placeholder:"Re-enter your new password",autoComplete:"new-password",name:"confirmPassword",value:L,onChange:C,className:"w-full h-12 pl-11 pr-11 text-sm text-black border border-dividerGrey rounded-lg outline-none focus:ring-2 focus:primary",prefix:(0,t.jsx)("span",{className:"absolute left-4 top-1/2 -translate-y-1/2",children:(0,t.jsx)(h,{className:"inline-block text-grey"})}),suffix:(0,t.jsx)("span",{className:"absolute right-4 top-1/2 -translate-y-1/2 cursor-pointer",children:y.confirmPasswordShow?(0,t.jsx)(u,{onClick:()=>P("confirmPasswordShow"),className:"inline-block text-grey"}):(0,t.jsx)(p,{onClick:()=>P("confirmPasswordShow"),className:"inline-block text-grey"})})}),(null==g?void 0:g.confirmPassword)&&(0,t.jsx)("p",{className:"mt-1 text-12 text-red",children:g.confirmPassword})]}),(0,t.jsx)(n.$n,{type:"submit",disabled:v,className:"flex w-full h-12 items-center justify-center gap-2 text-sm font-semibold bg-primary text-white rounded-lg transition",children:v?(0,t.jsx)("div",{className:"flex items-center justify-center",children:(0,t.jsx)(n.aH,{})}):"Change password"}),"string"==typeof g&&(0,t.jsx)("span",{className:"flex justify-center text-sm text-red",children:g}),b&&(0,t.jsx)("span",{className:"flex justify-center text-sm text-green",children:b})]}),(0,t.jsxs)("div",{className:"my-6 flex items-center gap-3",children:[(0,t.jsx)("span",{className:"h-px flex-1 bg-dividerGrey"}),(0,t.jsx)("span",{className:"text-xs text-grey",children:"or"}),(0,t.jsx)("span",{className:"h-px flex-1 bg-dividerGrey"})]}),(0,t.jsxs)("div",{className:"mb-6 text-center text-sm text-grey md:hidden",children:["Remember your password?"," ",(0,t.jsx)(n.N_,{href:"/login",className:"font-medium text-primary hover:underline",children:"Sign in"})]}),(0,t.jsxs)("div",{className:"flex items-start gap-3 rounded-lg bg-bgSkyBlue/30 p-4",children:[(0,t.jsx)("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary",children:(0,t.jsx)(w,{})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-semibold text-black",children:"Your data is safe with us."}),(0,t.jsx)("p",{className:"text-xs text-grey",children:"We value your privacy and keep your information secure."})]})]}),(0,t.jsxs)("div",{className:"mt-6 rounded-lg bg-bgSkyBlue/30 p-4 lg:hidden text-center",children:[(0,t.jsx)("p",{className:"text-sm font-bold text-black",children:"Download the Velaflow App"}),(0,t.jsx)("p",{className:"mt-1 text-xs text-grey",children:"Stay connected anytime, anywhere."}),(0,t.jsxs)("div",{className:"mt-3 flex items-center justify-center gap-3",children:[(0,t.jsx)(n.N_,{href:x.qc,target:"_blank",children:(0,t.jsx)(n.Zc,{src:"/images/app-store-badge.png",alt:"Download on the App Store",width:130,height:39,className:"h-9 w-auto object-contain"})}),(0,t.jsx)(n.N_,{href:x.Wh,target:"_blank",children:(0,t.jsx)(n.Zc,{src:"/images/google-play-badge.png",alt:"Get it on Google Play",width:130,height:39,className:"h-9 w-auto object-contain"})})]})]}),(0,t.jsxs)("div",{className:"mt-8 text-center text-xs text-grey",children:[(0,t.jsx)(n.N_,{href:x.pk,className:"text-primary hover:underline",children:"Privacy Policy"}),(0,t.jsx)("span",{className:"mx-2",children:"|"}),(0,t.jsx)(n.N_,{href:x.gu,className:"text-primary hover:underline",children:"Terms of Service"}),(0,t.jsxs)("p",{className:"mt-1",children:["\xa9 ",new Date().getFullYear()," Velaflow. All rights reserved."]})]})]});return(0,t.jsx)(l.A,{leftSide:(0,t.jsx)(o.A,{variant:"rich"}),rightSide:M,rightSideHeading:"Change password",rightSideSubText:"Cho
1ose a new password for your Velaflow account.",topRight:A,splitAtLg:!0})};function g(){let{email:e}=(0,c.useRouter)().query;return(0,t.jsx)(f,{email:e})}}},e=>{e.O(0,[1408,1950,8729,636,6593,8792],()=>e(e.s=40961)),_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.