PageSourceSearch

https://ripplemind.com/_next/static/chunks/pages/forgot-password-v…/[user_id]-3ecc76ecd473a27a.js

js ripplemind.com collected 2026-10-06 13:16:13 UTC 4,808 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[613],{20635:function(e,s,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/forgot-password-verify/[random_number]/[user_id]",function(){return r(82186)}])},82186:function(e,s,r){"use strict";r.r(s),r.d(s,{default:function(){return x}});var n=r(85893),o=r(59417),t=r(99603),a=r(88446),d=r(11163),l=r(67294),i=r(86501),c=r(48583),u=r(94543),w=r(9008),p=r.n(w),m=e=>{let{random_number:s,user_id:r}=e,w=(0,l.useRef)(null),m=(0,c.Dv)(u.ZP),[x,_]=(0,l.useState)(""),[f,g]=(0,l.useState)(!1),[v,h]=(0,l.useState)({random_string:"",new_password:""}),[N,j]=(0,l.useState)({random_number:"",new_password:""}),[b,y]=(0,l.useState)({loading:!1,success:"",error:""}),[E,P]=(0,l.useState)({loading:!1,success:"",error:""}),C=(0,d.useRouter)();(0,l.useEffect)(()=>{m.isLoggedIn&&C.push("/")}),(0,l.useEffect)(()=>{"string"==typeof s&&h({...v,random_string:s})},[]);let S=async e=>{try{let e=!1,s={random_string:"",new_password:""};s.random_string="","string"!=typeof v.random_string?(s.random_string="Not a valid varification code",e=!0):30!==v.random_string.length&&(s.random_string="Invalid code length",e=!0),s.new_password="";let r=v.new_password.toUpperCase();if([...v.new_password].some(e=>r.includes(e))?[...v.new_password].some(e=>"1,2,3,4,5,6,7,8,9,0".includes(e))?"string"!=typeof v.new_password?(s.new_password="Not a valid passowrd",e=!0):v.new_password.length<8&&(s.new_password="Need atleast 8 character",e=!0):(s.new_password="Need at least one number",e=!0):(s.new_password="Need at least one Upper Case character",e=!0),j({...N,...s}),e)return!0;return!1}catch(e){console.error(e)}};(0,l.useEffect)(()=>{S(v.new_password)},[v.new_password]);let Z=async()=>{try{let e=await S(v.new_password);if(e){P({loading:!1,success:"",error:"something went wrong"});return}P({loading:!0,success:"",error:""});let s={random_string:v.random_string,new_password:v.new_password};await a.Z.post("/user/forgot-password-verify",{...s}).then(e=>{var s,r;(null==e?void 0:e.status)===404?i.ZP.error(null==e?void 0:null===(s=e.data)||void 0===s?void 0:s.message):(null==e?void 0:e.status)===200?(i.ZP.success(null==e?void 0:null===(r=e.data)||void 0===r?void 0:r.message),C.push("/login")):i.ZP.error("Internal Server Error")}).catch(e=>{var s,r,n,o;400===e.response.status?i.ZP.error(null==e?void 0:null===(s=e.response)||void 0===s?void 0:null===(r=s.data)||void 0===r?void 0:r.message):500===e.response.status?i.ZP.error(null==e?void 0:null===(n=e.response)||void 0===n?void 0:null===(o=n.data)||void 0===o?void 0:o.message):i.ZP.error("Internal Server Error")}),P({loading:!1,success:"success",error:""})}catch(e){console.error(e),P({loading:!1,success:"error",error:""})}},k=()=>{g(e=>!e)};return(0,n.jsxs)("div",{className:"md:mx-28 flex justify-center items-center",children:[(0,n.jsx)(p(),{children:(0,n.jsx)("title",{children:"Forgot Password-Verify"})}),(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:"border md:w-1/2 text-lg",children:[(0,n.jsxs)("div",{className:"border-b-2 flex justify-between p-2",children:[(0,n.jsx)("h1",{children:"Enter New Password"}),(null==N?void 0:N.new_password.length)!==0?(0,n.jsxs)("div",{className:"text-red-500 text-end",children:[(0,n.jsx)(t.G,{icon:o.RLE}),(0,n.jsx)("span",{className:"px-1",children:null==N?void 0:N.new_password})]}):(null==N?void 0:N.random_number.length)!==0?(0,n.jsxs)("div",{className:"text-red-500 text-end",children:[(0,n.jsx)(t.G,{icon:o.RLE}),(0,n.jsx)("span",{className:"px-1",children:null==N?void 0:N.random_number})]}):""]}),(0,n.jsxs)("div",{className:"flex p-2 px-3  mt-7",children:[(0,n.jsx)("div",{className:"border p-3",children:(0,n.jsx)(t.G,{icon:o.DD4})}),(0,n.jsxs)("div",{className:"border p-3   flex  w-full",children:[(0,n.jsx)("input",{ref:w,onChange:e=>{let s=e.target.value,r="";for(let e=0;e<s.length;e++){let n=s[e].charCodeAt(0);32===n||(r+=s[e])}h({...v,new_password:r})},className:"outline-none w-full",type:f?"text":"password",placeholder:"New Password"}),(0,n.jsx)("div",{className:"  flex items-center px-3",children:(0,n.jsx)("button",{className:"",onClick:()=>k(),children:!1===f?(0,n.jsx)(t.G,{icon:o.Mdf,className:" rounded px-4 text-sm text-gray-400 font-mono curs
1or-pointer"}):(0,n.jsx)(t.G,{icon:o.Aq,className:" rounded px-4 text-sm text-gray-400 font-mono cursor-pointer"})})})]})]}),(0,n.jsx)("div",{className:"flex justify-center p-2",children:(0,n.jsxs)("button",{onClick:Z,className:"bg-green-500 text-white rounded-lg p-2",children:[(0,n.jsx)(t.G,{icon:o.mNB})," Update Password"]})})]})})]})},x=function(){let e=(0,d.useRouter)(),{random_number:s,user_id:r}=e.query;if(s&&r)return(0,n.jsx)(m,{random_number:s,user_id:r})}},9008:function(e,s,r){e.exports=r(42636)}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=20635)}),_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.