1"use strict";(self.webpackChunkreact_saas_template=self.webpackChunkreact_saas_template||[]).push([[7321],{47321:(e,a,t)=>{t.r(a),t.d(a,{default:()=>x});var n=t(65043),i=t(56258),o=t(24836),r=t(88446),s=t(85865),p=t(65761),d=t(57256),l=t(40854),c=t.n(l),g=t(93222),m=t(70579);const x=(0,d.A)((e=>({"@keyframes slideInUp":{"0%":{transform:"translateY(30px)",opacity:0},"100%":{transform:"translateY(0)",opacity:1}},"@keyframes fadeInScale":{"0%":{transform:"scale(0.9)",opacity:0},"100%":{transform:"scale(1)",opacity:1}},wrapper:{minHeight:"100vh",background:"dark"===e.palette.mode?"linear-gradient(135deg, #0f0f23 0%, #1a1a2e 100%)":"linear-gradient(135deg, #667eea 0%, #764ba2 100%)",display:"flex",alignItems:"center",justifyContent:"center",padding:e.spacing(2),position:"relative",overflow:"hidden","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,background:"radial-gradient(circle at 20% 80%, ".concat(e.palette.primary.main,"20 0%, transparent 50%),\n radial-gradient(circle at 80% 20%, ").concat(e.palette.secondary.main,"20 0%, transparent 50%)"),zIndex:0},[e.breakpoints.down("sm")]:{padding:e.spacing(1.5)},[e.breakpoints.down("xs")]:{padding:e.spacing(1)}},container:{position:"relative",zIndex:1,width:"100%",maxWidth:"420px",margin:"0 auto",[e.breakpoints.down("md")]:{maxWidth:"380px"},[e.breakpoints.down("sm")]:{maxWidth:"350px"},[e.breakpoints.down("xs")]:{maxWidth:"320px"}},resetContainer:{background:"dark"===e.palette.mode?"rgba(255, 255, 255, 0.05)":"rgba(255, 255, 255, 0.95)",backdropFilter:"blur(20px)",borderRadius:"24px",border:"1px solid ".concat("dark"===e.palette.mode?"rgba(255, 255, 255, 0.1)":"rgba(255, 255, 255, 0.3)"),boxShadow:"dark"===e.palette.mode?"0 20px 40px rgba(0, 0, 0, 0.3), 0 8px 16px rgba(0, 0, 0, 0.15)":"0 20px 40px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.05)",padding:e.spacing(5,6),display:"flex",flexDirection:"column",gap:e.spacing(3),animation:"fadeInScale 0.8s ease-out",maxHeight:"90vh",overflow:"auto",[e.breakpoints.down("md")]:{borderRadius:"20px",padding:e.spacing(4,5),gap:e.spacing(2.5),maxHeight:"92vh"},[e.breakpoints.down("sm")]:{borderRadius:"18px",padding:e.spacing(3.5,4),gap:e.spacing(2),maxHeight:"95vh"},[e.breakpoints.down("xs")]:{borderRadius:"16px",padding:e.spacing(3,3.5),gap:e.spacing(1.5)}},logoContainer:{display:"flex",justifyContent:"center",marginBottom:e.spacing(2),animation:"slideInUp 0.8s ease-out 0.1s both","& img":{maxWidth:"190px",height:"auto",filter:"dark"===e.palette.mode?"brightness(1.1)":"none"},[e.breakpoints.down("md")]:{marginBottom:e.spacing(1.5),"& img":{maxWidth:"170px"}},[e.breakpoints.down("sm")]:{marginBottom:e.spacing(1),"& img":{maxWidth:"150px"}},[e.breakpoints.down("xs")]:{marginBottom:e.spacing(.5),"& img":{maxWidth:"130px"}}},headerText:{textAlign:"center",animation:"slideInUp 0.8s ease-out 0.2s both","& h1":{fontSize:"36px",fontWeight:700,background:"dark"===e.palette.mode?"linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%)":"linear-gradient(135deg, #1a1a1a 0%, #4a4a4a 100%)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text",marginBottom:e.spacing(1),lineHeight:1.2},"& .MuiTypography-body1":{color:"dark"===e.palette.mode?"rgba(255, 255, 255, 0.7)":"rgba(71, 85, 105, 0.8)",fontSize:"16px",fontWeight:400},[e.breakpoints.down("md")]:{"& h1":{fontSize:"32px"},"& .MuiTypography-body1":{fontSize:"15px"}},[e.breakpoints.down("sm")]:{"& h1":{fontSize:"28px"},"& .MuiTypography-body1":{fontSize:"14px"}},[e.breakpoints.down("xs")]:{"& h1":{fontSize:"24px"},"& .MuiTypography-body1":{fontSize:"13px"}}},inputWrapper:{display:"flex",flexDirection:"column",gap:e.spacing(2.5),animation:"slideInUp 0.8s ease-out 0.3s both",[e.breakpoints.down("md")]:{gap:e.spacing(2.2)},[e.breakpoints.down("sm")]:{gap:e.spacing(2)},[e.breakpoints.down("xs")]:{gap:e.spacing(1.8)}},inputContainer:{position:"relative",background:"dark"===e.palette.mode?"rgba(255, 255, 255, 0.08)":"rgba(248, 250, 252, 0.8)",borderRadius:"18px",border:"2px solid ".concat("dark"===e.palette.mode?"rgba(255, 255, 255, 0.1)":"rgba(148, 163,
1184, 0.2)"),padding:e.spacing(2.5,3),transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)","&:focus-within":{borderColor:e.palette.primary.main,background:"dark"===e.palette.mode?"rgba(255, 255, 255, 0.12)":"rgba(255, 255, 255, 0.9)",transform:"translateY(-2px)",boxShadow:"0 8px 25px ".concat(e.palette.primary.main,"20")},"& .MuiInput-root":{fontSize:"16px",fontWeight:500,color:"dark"===e.palette.mode?"#ffffff":"#1e293b"},"& .MuiInput-input::placeholder":{color:"dark"===e.palette.mode?"rgba(255, 255, 255, 0.5)":"rgba(100, 116, 139, 0.7)",opacity:1},[e.breakpoints.down("md")]:{borderRadius:"16px",padding:e.spacing(2.2,2.8),"& .MuiInput-root":{fontSize:"15px"}},[e.breakpoints.down("sm")]:{borderRadius:"14px",padding:e.spacing(2,2.5),"& .MuiInput-root":{fontSize:"14px"}},[e.breakpoints.down("xs")]:{borderRadius:"12px",padding:e.spacing(1.8,2.2),"& .MuiInput-root":{fontSize:"14px"}}},svgContainer:{position:"absolute",right:e.spacing(3),top:"50%",transform:"translateY(-50%)",cursor:"pointer",padding:e.spacing(.5),borderRadius:"8px",transition:"all 0.3s ease",color:"dark"===e.palette.mode?"rgba(255, 255, 255, 0.6)":"rgba(100, 116, 139, 0.7)","&:hover":{background:"dark"===e.palette.mode?"rgba(255, 255, 255, 0.1)":"rgba(148, 163, 184, 0.1)",color:e.palette.primary.main},[e.breakpoints.down("md")]:{right:e.spacing(2.5),padding:e.spacing(.4)},[e.breakpoints.down("sm")]:{right:e.spacing(2.2),padding:e.spacing(.3)},[e.breakpoints.down("xs")]:{right:e.spacing(2)}},resetButton:{background:"linear-gradient(135deg, ".concat(e.palette.primary.main," 0%, ").concat(e.palette.primary.dark," 100%)"),color:"#ffffff",borderRadius:"18px",padding:e.spacing(2.5,3),fontSize:"16px",fontWeight:600,textTransform:"none",boxShadow:"0 8px 20px ".concat(e.palette.primary.main,"30"),border:"none",cursor:"pointer",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",marginTop:e.spacing(1),animation:"slideInUp 0.8s ease-out 0.4s both","&:hover":{transform:"translateY(-3px)",boxShadow:"0 12px 28px ".concat(e.palette.primary.main,"40"),background:"linear-gradient(135deg, ".concat(e.palette.primary.dark," 0%, ").concat(e.palette.primary.main," 100%)")},"&:active":{transform:"translateY(-1px)"},"&:disabled":{background:"dark"===e.palette.mode?"rgba(255, 255, 255, 0.08)":"rgba(148, 163, 184, 0.25)",color:"dark"===e.palette.mode?"rgba(255, 255, 255, 0.25)":"rgba(148, 163, 184, 0.5)",transform:"none",boxShadow:"none"},[e.breakpoints.down("md")]:{borderRadius:"16px",padding:e.spacing(2.2,2.8),fontSize:"15px"},[e.breakpoints.down("sm")]:{borderRadius:"14px",padding:e.spacing(2,2.5),fontSize:"14px"},[e.breakpoints.down("xs")]:{borderRadius:"12px",padding:e.spacing(1.8,2.2),fontSize:"13px"}},bottomText:{display:"flex",gap:e.spacing(1.5),color:"dark"===e.palette.mode?"rgba(255, 255, 255, 0.6)":"rgba(71, 85, 105, 0.7)",fontSize:"15px",textAlign:"center",justifyContent:"center",marginTop:e.spacing(2),paddingTop:e.spacing(2),borderTop:"1px solid ".concat("dark"===e.palette.mode?"rgba(255, 255, 255, 0.08)":"rgba(148, 163, 184, 0.15)"),animation:"slideInUp 0.8s ease-out 0.5s both","& a":{textDecoration:"none",color:e.palette.primary.main,fontWeight:600,transition:"all 0.3s ease",position:"relative","&::after":{content:'""',position:"absolute",bottom:"-2px",left:0,width:"0",height:"2px",background:e.palette.primary.main,transition:"width 0.3s ease"},"&:hover":{color:e.palette.primary.dark,transform:"translateY(-1px)","&::after":{width:"100%"}}},[e.breakpoints.down("md")]:{gap:e.spacing(1.2),fontSize:"14px",marginTop:e.spacing(1.5)},[e.breakpoints.down("sm")]:{gap:e.spacing(1),fontSize:"13px",marginTop:e.spacing(1.2),flexDirection:"column"},[e.breakpoints.down("xs")]:{fontSize:"12px",marginTop:e.spacing(1)}},error:{color:"#ef4444",fontSize:"14px",marginTop:e.spacing(.5),animation:"slideInUp 0.3s ease-out",[e.breakpoints.down("sm")]:{fontSize:"13px"},[e.breakpoints.down("xs")]:{fontSize:"12px"}},success:{textAlign:"center",color:e.palette.success.main,animation:"slideInUp 0.8s ease-out","& h2":{fontSize:"24px",fontWeight:600,marginBottom:e.spacing(1)},"& p":{fontSize:"16px",opacity:.8},[e.breakpoints.down("sm")]:{"& h2":{fontSize:"20px"},"& p":{fontSize:"14px"}}}})),{withTheme:!0})((e=>{let{classes:a,theme:t}=e;
1const d=(0,g.useHistory)(),[l,x]=(0,n.useState)(!1),[h,u]=(0,n.useState)(""),[b,f]=(0,n.useState)(""),[w,k]=(0,n.useState)(!1),[v,C]=(0,n.useState)(!1),[y,j]=(0,n.useState)(""),[S,z]=(0,n.useState)(!1),I=(0,n.useCallback)((async()=>{if(j(""),h&&b?h!==b?(j("Passwords do not match"),0):!(h.length<6)||(j("Password must be at least 6 characters long"),0):(j("Both password fields are required"),0)){x(!0);try{const e=window.location.pathname.split("/"),a=e[2],t=e[3];if(!a||!t)return j("Invalid reset link - missing user ID or token"),void x(!1);const n={userID:a,userToken:t,password:h};console.log("Sending reset data:",{userID:a,userToken:t,password:"***"});(await c().post("/api/users/reset-password",n)).data.success&&(z(!0),setTimeout((()=>{d.push("/auth/login")}),3e3))}catch(t){var e,a;console.error("Password reset error:",t),j((null===(e=t.response)||void 0===e||null===(a=e.data)||void 0===a?void 0:a.message)||"An error occurred while resetting password")}finally{x(!1)}}}),[h,b,d]);return S?(0,m.jsx)(i.A,{in:!0,timeout:800,children:(0,m.jsx)("div",{className:a.wrapper,children:(0,m.jsx)("div",{className:a.container,children:(0,m.jsx)(o.A,{direction:"up",in:!0,timeout:600,children:(0,m.jsxs)("div",{className:a.resetContainer,children:[(0,m.jsx)("div",{className:a.logoContainer,children:(0,m.jsx)(r.A,{href:"/",children:(0,m.jsx)("img",{src:"light"===t.palette.mode?"/images/hugo_logo.svg":"/images/hugo_logo_white.svg",alt:"Hugo Logo"})})}),(0,m.jsxs)("div",{className:a.success,children:[(0,m.jsx)(s.A,{variant:"h2",component:"h2",children:"Password Reset Successful!"}),(0,m.jsx)(s.A,{variant:"body1",children:"Your password has been successfully reset. You will be redirected to the login page shortly."})]})]})})})})}):(0,m.jsx)(i.A,{in:!0,timeout:800,children:(0,m.jsx)("div",{className:a.wrapper,children:(0,m.jsx)("div",{className:a.container,children:(0,m.jsx)(o.A,{direction:"up",in:!0,timeout:600,children:(0,m.jsxs)("div",{className:a.resetContainer,children:[(0,m.jsx)("div",{className:a.logoContainer,children:(0,m.jsx)(r.A,{href:"/",children:(0,m.jsx)("img",{src:"light"===t.palette.mode?"/images/hugo_logo.svg":"/images/hugo_logo_white.svg",alt:"Hugo Logo"})})}),(0,m.jsxs)("div",{className:a.headerText,children:[(0,m.jsx)(s.A,{variant:"h1",component:"h1",children:"Reset Password"}),(0,m.jsx)(s.A,{variant:"body1",children:"Enter your new password below"})]}),(0,m.jsxs)("form",{onSubmit:e=>{e.preventDefault(),I()},children:[(0,m.jsxs)("div",{className:a.inputWrapper,children:[(0,m.jsxs)("div",{className:a.inputContainer,children:[(0,m.jsx)(p.A,{disableUnderline:!0,fullWidth:!0,type:w?"text":"password",placeholder:"New Password",value:h,onChange:e=>{u(e.target.value),y&&j("")}}),(0,m.jsx)("div",{className:a.svgContainer,onClick:()=>k(!w),children:w?(0,m.jsx)("svg",{width:"20",height:"16",viewBox:"0 0 30 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,m.jsx)("path",{d:"M14.9982 15.4013C16.4982 15.4013 17.7732 14.8763 18.8232 13.8263C19.8732 12.7763 20.3982 11.5013 20.3982 10.0013C20.3982 8.5013 19.8732 7.2263 18.8232 6.1763C17.7732 5.1263 16.4982 4.6013 14.9982 4.6013C13.4982 4.6013 12.2232 5.1263 11.1732 6.1763C10.1232 7.2263 9.59818 8.5013 9.59818 10.0013C9.59818 11.5013 10.1232 12.7763 11.1732 13.8263C12.2232 14.8763 13.4982 15.4013 14.9982 15.4013Z",fill:"currentColor"})}):(0,m.jsxs)("svg",{width:"20",height:"16",viewBox:"0 0 30 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,m.jsx)("path",{d:"M15 19.3346C12.0833 19.3346 9.48959 18.518 7.21875 16.8846C4.94792 15.2513 3.16667 13.0569 1.875 10.3013L1.66667 9.98464L1.875 9.66797C3.16667 6.91797 4.94792 4.72797 7.21875 3.09797C9.48959 1.46797 12.0833 0.651302 15 0.651302C17.9167 0.651302 20.5104 1.46797 22.7812 3.09797C25.0521 4.72797 26.8333 6.91797 28.125 9.66797L28.3333 9.98464L28.125 10.3013C26.8333 13.0569 25.0521 15.2513 22.7812 16.8846C20.5104 18.518 17.9167 19.3346 15 19.3346Z",fill:"currentColor"}),(0,m.jsx)("path",{d:"M3.33333 18.3346L26.6667 1.66797",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})})]}),(0,m.jsxs)("div",{className:a.inputContainer,children:[(0,m.jsx)(p.A,{disableUnderline:!0,fullWidth:!0,type:v?"text":"password",placeholder:"Confirm Password",value:b,onChange:e=>{f(e.target.value),y&&j("")}}),(0,m.jsx)("div",{className:a.svgContainer,onClick:()=>C(!v),children:v?(0,m.jsx)("svg",{width:"20",height:"16",viewBox:"0 0 30 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,m.jsx)("path",{d:"M14.9982 15.4013C16.4982 15.4013 17.7732 14.8763 18.8232 13.8263C19.8732 12.7763 20.3982 11.5013 20.3982 10.0013C20.3982 8.5013 19.8732 7.2263 18.8232 6.1763C17.7732 5.1263 16.4982 4.6013 14.9982 4.6013C13.4982 4.6013 12.2232 5.1263 11.1732 6.1763C10.1232 7.2263 9.59818 8.5013 9.59818 10.0013C9.59818 11.5013 10.1232 12.7763 11.1732 13.8263C12.2232 14.8763 13.4982 15.4013 14.9982 15.4013Z",fill:"currentColor"})}):(0,m.jsxs)("svg",{width:"20",height:"16",viewBox:"0 0 30 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,m.jsx)("path",{d:"M15 19.3346C12.0833 19.3346 9.48959 18.518 7.21875 16.8846C4.94792 15.2513 3.16667 13.0569 1.875 10.3013L1.66667 9.98464L1.875 9.66797C3.16667 6.91797 4.94792 4.72797 7.21875 3.09797C9.48959 1.46797 12.0833 0.651302 15 0.651302C17.9167 0.651302 20.5104 1.46797 22.7812 3.09797C25.0521 4.72797 26.8333 6.91797 28.125 9.66797L28.3333 9.98464L28.125 10.3013C26.8333 13.0569 25.0521 15.2513 22.7812 16.8846C20.5104 18.518 17.9167 19.3346 15 19.3346Z",fill:"currentColor"}),(0,m.jsx)("path",{d:"M3.33333 18.3346L26.6667 1.66797",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})})]})]}),y&&(0,m.jsx)(s.A,{className:a.error,children:y}),(0,m.jsx)("button",{type:"submit",className:a.resetButton,disabled:l,children:l?"Resetting Password...":"Reset Password"})]}),(0,m.jsxs)("div",{className:a.bottomText,children:[(0,m.jsx)("span",{children:"Remember your password?"}),(0,m.jsx)(r.A,{href:"/auth/login",children:"Sign In"})]})]})})})})})}))}}]); 2//# sourceMappingURL=7321.4df85e03.chunk.js.map
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.