PageSourceSearch

https://learn.inpronunci.com/assets/index-8YK1lmUl.js

js inpronunci.com collected 2026-10-01 23:52:04 UTC 2,424 bytes, 1 lines download raw bytes

1import{u as L,r as n,c as M,j as e,H as g,E as x,B as I,s as N,b as k}from"./index-D_ov2XtU.js";import{L as z}from"./index--Fy_oj57.js";import{u as A}from"./index.esm-CKhx5HNg.js";import{I as P}from"./index-IIrXsTFk.js";import{h as R,a as Z}from"./httpPostHook-Bf7QIMSN.js";import{s as c}from"./styles.module-Vel4p6bw.js";import"./index-jHKES0IC.js";import"./styles.module-CqFLH2wj.js";const J=()=>{var p,w,f,h;const v=L(),[o,d]=n.useState(!1),[r,u]=n.useState(!1),[l,b]=n.useState(!1),S=(w=(p=M())==null?void 0:p.search)==null?void 0:w.replace("?q=",""),{httpPost:E,loading:j}=R(),{register:m,formState:{errors:s},handleSubmit:y}=A();n.useEffect(()=>{l&&v("/password-changed")},[l]);const C=a=>{if(a.password!==a.confirmPassword){N("Password and confirm password should be same"),k(!1);return}else{let t=new FormData;t.append("password",a.password),E(`${Z.setPassword}/${S}`,t).then(i=>{i!=null&&i.status&&b(!0)})}};return e.jsx(z,{title:"Set New Password",subTitle:"New password must be different from your previous used passwords.",children:e.jsxs("form",{onSubmit:y(C),className:c.formContainer,children:[e.jsx(P,{label:"Password",type:o?"text":"password",placeholder:"Enter your password",showIcon:!0,...m("password",{required:"Please enter password",minLength:{value:8,message:"Must be 8 characters"},maxLength:{value:12,message:"Must not exceed 12 characters"},validate:a=>[/[a-z]/,/[A-Z]/,/[0-9]/,/[^a-zA-Z0-9]/].every(t=>t.test(a))||"Must include lowercase, uppercase, number, and special characters"}),inputExtraClass:c.rowReverse,showError:s==null?void 0:s.password,errorMessage:(f=s==null?void 0:s.password)==null?void 0:f.message,children:o?e.jsx(g,{onClick:()=>d(!o)}):e.jsx(x,{onClick:()=>d(!o)})}),e.jsx(P,{label:"Confirm Password",type:r?"text":"password",placeholder:"Enter your password",showIcon:!0,...m("confirmPassword",{required:"Please confirm password",minLength:{value:8,message:"Must be 8 characters"},maxLength:{value:12,message:"Must not exceed 12 characters"},validate:a=>[/[a-z]/,/[A-Z]/,/[0-9]/,/[^a-zA-Z0-9]/].every(t=>t.test(a))||"Must include lowercase, uppercase, number, and special characters"}),inputExtraClass:c.rowReverse,showError:s==null?void 0:s.confirmPassword,errorMessage:(h=s==null?void 0:s.confirmPassword)==null?void 0:h.message,children:r?e.jsx(g,{onClick:()=>u(!r)}):e.jsx(x,{onClick:()=>u(!r)})}),e.jsx(I,{label:"Reset Password",isLoading:j})]})})};export{J as default};

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.