PageSourceSearch

https://www.whitehalltraining.com/_next/static/chunks/pages/forgotpassword-ae8928694f80bad0.js

js whitehalltraining.com collected 2026-10-04 13:29:50 UTC 5,926 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5765],{48871:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/forgotpassword",function(){return l(37542)}])},77293:function(e,s,l){"use strict";var t=l(67294),a=l(80320);let i=e=>{let[s,l]=(0,t.useState)(()=>a.Z.initFields(e)),[i,r]=(0,t.useState)(()=>a.Z.initErrors(e)),[n,o]=(0,t.useState)(()=>a.Z.initValidate(e)),[c,m]=(0,t.useState)(!1),[u,d]=(0,t.useState)("");(0,t.useEffect)(()=>{c&&x()},[s]);let f=(e,t)=>{l({...s,[e]:t}),d(e)},g=e=>{if(!e||"object"!=typeof e)return;let t={...s};Object.keys(e).forEach(s=>{let l=e[s];t[s]=l}),l(t)},h=(e,s)=>{let l={...n};l[e].custom=s,o(l),c&&x()},p=e=>{let{name:t,type:a,value:i,checked:r}=e.target,n=i;("checkbox"==a||"radio"==a)&&(n=r?i:""),l({...s,[t]:n}),d(t)},N=()=>(m(!0),x()),x=()=>{let e=!0,l={};try{return Object.keys(n).forEach(t=>{let i=n[t],r=s[t],o=i.req||""!=r;if(i.req&&""===r)l[t]=i.req,e=!1;else if(i.notNull&&null===r)l[t]=i.notNull,e=!1;else if(i.email&&o&&!a.Z.isEmail(r))l[t]=i.email,e=!1;else if(i.sameAs&&o&&r!=i.sameAs.value)l[t]=i.sameAs.message,e=!1;else if(i.sameAsField&&o&&r!=s[i.sameAsField.value])l[t]=i.sameAsField.message,e=!1;else if(i.min&&o&&Number(i.min.value)>Number(r.length))l[t]=i.min.message,e=!1;else if(i.max&&o&&i.max.value<Number(r.length))l[t]=i.max.message,e=!1;else if(i.et&&o&&(!a.Z.isAllNumeric(r)||Number(r)!==Number(i.et.value)))l[t]=i.et.message,e=!1;else if(i.net&&o&&(!a.Z.isAllNumeric(r)||Number(r)===Number(i.net.value)))l[t]=i.net.message,e=!1;else if(i.lt&&o&&(!a.Z.isAllNumeric(r)||Number(i.lt.value)<=Number(r)))l[t]=i.lt.message,e=!1;else if(i.lte&&o&&(!a.Z.isAllNumeric(r)||Number(r)>Number(i.lte.value)))l[t]=i.lte.message,e=!1;else if(i.gt&&o&&(!a.Z.isAllNumeric(r)||Number(i.gt.value)>=Number(r)))l[t]=i.gt.message,e=!1;else if(i.gte&&o&&(!a.Z.isAllNumeric(r)||Number(r)<Number(i.gte.value)))l[t]=i.gte.message,e=!1;else if(i.type&&"number"==i.type.value&&o&&!a.Z.isAllNumeric(r))l[t]=i.type.message,e=!1;else if(i.type&&"+-number"==i.type.value&&o&&!a.Z.isNumeric(r))l[t]=i.type.message,e=!1;else if(i.type&&"+float"==i.type.value&&o&&!a.Z.isFloat(r))l[t]=i.type.message,e=!1;else if(i.type&&"text"==i.type.value&&o&&null!=r&&""!==r.replace(/[a-zA-Z]/g,""))l[t]=i.type.message,e=!1;else if(i.regExp&&o&&!a.Z.isPattern(i.regExp.pattern,r))l[t]=i.regExp.message,e=!1;else if(i.bool){let c=i.bool.value;(""===c&&""===r||"true"===c&&!0!==r||"false"===c&&!1!==r)&&(l[t]=i.bool.message,e=!1)}else i.objValReq&&""===a.Z.objectLevel(r,i.objValReq.obj)?(l[t]=i.objValReq.message,e=!1):""!=i.custom&&(l[t]=i.custom,e=!1)}),r(l),e}catch(t){return alert("An error occurred in validate - "+t.message),!1}};return{fields:s,errors:i,isField:u,setValue:f,setMultiValue:g,setError:h,handleChange:p,handleSubmit:N,handleReset:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];m(!1),r({}),s.includes("values")&&l(a.Z.initFields(e))}}};s.Z=i},37542:function(e,s,l){"use strict";l.r(s),l.d(s,{default:function(){return g}});var t=l(85893),a=l(35861),i=l(41664),r=l.n(i),n=l(11163),o=l(67294),c=l(17690),m=l(77293),u=l(64745),d=l(9008),f=l.n(d);function g(){let{fields:e,errors:s,setValue:l,handleChange:i,handleSubmit:d}=(0,m.Z)({email:{validate:["req#Email is required","email#Please enter a valid email address"]}}),g=(0,n.useRouter)(),[h,p]=(0,o.useState)(!1),[N,x]=(0,o.useState)(""),{cartItems:b}=(0,o.useContext)(c.A9),{addUser:v,addEmail:j}=(0,o.useContext)(a.S),y=e=>{e.preventDefault(),d()&&w()},w=async()=>{try{p(!0),x("");let s={email:e.email},l={method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)};window.location.host,fetch("".concat(u.Mr,"/forgotpassword"),l).then(e=>e.json()).then(async s=>{p(!1),console.log({data:s}),s&&s.message?(j(e.email),g.push("/otp?pass=true")):(null==s?void 0:s.error)&&x(null==s?void 0:s.error)})}catch(t){p(!1)}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f(),{children:(0,t.jsx)("title",{children:"Forgot Password"})}),(0,t.jsx)("div",{className:"container-fluid p-0",children:(0,t.jsxs)("div",{className:"banner-section",children:[(0,t.jsx)("div",{className:"banner-top"}),(0,t.jsx)("div",{className:"banner-bottom"}),(0,t.jsx)("div",{className:"container",children:(0,t.jsx)("div",{className:"row",children:(0,t.jsx)("div",{className:"col-md-5 mx-auto",children:(0,t.jsxs)("div",{className:"register-form-wrap p-0",children:[(0,t.jsxs)("div",{className:"login-form-wrap",children:[(0,t.jsx)("h1",{className:"form-label mb-0",children:"Forgot Password ?"}),(0,t.jsxs)("p",{className:"text-center",style:{paddingTop:"5px",color:"#141a42",fontSize:"14px"},children:["Check your ",(0,t.jsx)("strong",{children:"spam"})," folder if OTP is delayed. Resend OTP is enabled after ",(0,t.jsx)("strong",{children:"4 minutes"}),". For help, email"," ",(0,t.jsx)("a",{href:"mailto:[email protected]",style:{fontWeight:"600"},children:"[email protected]"})," ","or call us."]}),(0,t.jsx)("p",{className:"text-center",style:{color:"red"},children:N}),(0,t.jsxs)("div",{className:"pt-3",children:[(0,t.jsx)("input",{type:"email",className:"form-control mb-4",placeholder:"Email Address",name:"email",value:e.email,onChange:i,onKeyPress:function(e){"Enter"===e.key&&y(e)}}),(0,t.jsx)("p",{style:{color:"red"},children:s.email}),(0,t.jsx)("button",{className:"signup-login-btn mb-2 py-3 w-100",onClick:e=>y(e),children:h?"Progressing...":"Submit"}),(0,t.jsx)("div",{className:"text-center my-2",children:(0,t.jsx)(r(),{href:"/login",className:"forget-pass-txt",children:"Back"})})]})]}),(0,t.jsxs)("div",{className:"login-footer",children:[(0,t.jsx)("p",{className:"login-foot-txt",children:"Don't have an account?"}),(0,t.jsx)(r(),{href:"signup",className:"signup-link",children:"Signup"}),(0,t.jsx)("p",{className:"login-foot-txt",children:"Now"})]})]})})})})]})})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=48871)}),_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.