PageSourceSearch

https://www.whitehalltraining.com/_next/static/chunks/pages/contact-660cb349805fd73d.js

js whitehalltraining.com collected 2026-10-04 13:29:18 UTC 8,263 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9335],{81382:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/contact",function(){return l(99493)}])},77293:function(e,s,l){"use strict";var a=l(67294),r=l(80320);let t=e=>{let[s,l]=(0,a.useState)(()=>r.Z.initFields(e)),[t,i]=(0,a.useState)(()=>r.Z.initErrors(e)),[n,c]=(0,a.useState)(()=>r.Z.initValidate(e)),[m,o]=(0,a.useState)(!1),[d,u]=(0,a.useState)("");(0,a.useEffect)(()=>{m&&j()},[s]);let h=(e,a)=>{l({...s,[e]:a}),u(e)},b=e=>{if(!e||"object"!=typeof e)return;let a={...s};Object.keys(e).forEach(s=>{let l=e[s];a[s]=l}),l(a)},N=(e,s)=>{let l={...n};l[e].custom=s,c(l),m&&j()},p=e=>{let{name:a,type:r,value:t,checked:i}=e.target,n=t;("checkbox"==r||"radio"==r)&&(n=i?t:""),l({...s,[a]:n}),u(a)},x=()=>(o(!0),j()),j=()=>{let e=!0,l={};try{return Object.keys(n).forEach(a=>{let t=n[a],i=s[a],c=t.req||""!=i;if(t.req&&""===i)l[a]=t.req,e=!1;else if(t.notNull&&null===i)l[a]=t.notNull,e=!1;else if(t.email&&c&&!r.Z.isEmail(i))l[a]=t.email,e=!1;else if(t.sameAs&&c&&i!=t.sameAs.value)l[a]=t.sameAs.message,e=!1;else if(t.sameAsField&&c&&i!=s[t.sameAsField.value])l[a]=t.sameAsField.message,e=!1;else if(t.min&&c&&Number(t.min.value)>Number(i.length))l[a]=t.min.message,e=!1;else if(t.max&&c&&t.max.value<Number(i.length))l[a]=t.max.message,e=!1;else if(t.et&&c&&(!r.Z.isAllNumeric(i)||Number(i)!==Number(t.et.value)))l[a]=t.et.message,e=!1;
1else if(t.net&&c&&(!r.Z.isAllNumeric(i)||Number(i)===Number(t.net.value)))l[a]=t.net.message,e=!1;else if(t.lt&&c&&(!r.Z.isAllNumeric(i)||Number(t.lt.value)<=Number(i)))l[a]=t.lt.message,e=!1;else if(t.lte&&c&&(!r.Z.isAllNumeric(i)||Number(i)>Number(t.lte.value)))l[a]=t.lte.message,e=!1;else if(t.gt&&c&&(!r.Z.isAllNumeric(i)||Number(t.gt.value)>=Number(i)))l[a]=t.gt.message,e=!1;else if(t.gte&&c&&(!r.Z.isAllNumeric(i)||Number(i)<Number(t.gte.value)))l[a]=t.gte.message,e=!1;else if(t.type&&"number"==t.type.value&&c&&!r.Z.isAllNumeric(i))l[a]=t.type.message,e=!1;else if(t.type&&"+-number"==t.type.value&&c&&!r.Z.isNumeric(i))l[a]=t.type.message,e=!1;else if(t.type&&"+float"==t.type.value&&c&&!r.Z.isFloat(i))l[a]=t.type.message,e=!1;else if(t.type&&"text"==t.type.value&&c&&null!=i&&""!==i.replace(/[a-zA-Z]/g,""))l[a]=t.type.message,e=!1;else if(t.regExp&&c&&!r.Z.isPattern(t.regExp.pattern,i))l[a]=t.regExp.message,e=!1;else if(t.bool){let m=t.bool.value;(""===m&&""===i||"true"===m&&!0!==i||"false"===m&&!1!==i)&&(l[a]=t.bool.message,e=!1)}else t.objValReq&&""===r.Z.objectLevel(i,t.objValReq.obj)?(l[a]=t.objValReq.message,e=!1):""!=t.custom&&(l[a]=t.custom,e=!1)}),i(l),e}catch(a){return alert("An error occurred in validate - "+a.message),!1}};return{fields:s,errors:t,isField:d,setValue:h,setMultiValue:b,setError:N,handleChange:p,handleSubmit:x,handleReset:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];o(!1),i({}),s.includes("values")&&l(r.Z.initFields(e))}}};s.Z=t},99493:function(e,s,l){"use strict";l.r(s),l.d(s,{default:function(){return u}});var a=l(85893),r=l(9008),t=l.n(r),i=l(67294),n=l(77293),c=l(64745),m=l(11163),o=l(8137),d=l(35861);function u(){let e=(0,m.useRouter)(),{user:s,token:l,email:r,authHydrated:u}=(0,i.useContext)(d.S),h=(0,i.useRef)(!1),[b,N]=(0,i.useState)({}),{fields:p,errors:x,handleChange:j,handleSubmit:g,setMultiValue:f,handleReset:v}=(0,n.Z)({name:{validate:["req#Name is required"]},email:{validate:["req#Email is required","email#Please enter a valid email address"]},phone:{validate:[]},message:{validate:["req#Message is required"]}}),[y,w]=(0,i.useState)(!1),[E,A]=(0,i.useState)("");(0,i.useEffect)(()=>{if(!e.isReady||!u||h.current)return;let{reason:a,course:t,licenses:i}=e.query;if("bulk_licenses"!==a||!t||!i)return;let n=Array.isArray(t)?t[0]:t,c=Number(Array.isArray(i)?i[0]:i)||0,m={message:(0,o.O_)(n,c)};l&&Object.assign(m,(0,o.S0)(s,r)),f(m),N({source:"bulk_licenses",course:n,licenses:String(c)}),h.current=!0},[e.isReady,e.query,u,l,s,r]);let Z=e=>{e.preventDefault(),g()&&S()},S=async()=>{try{w(!0);let e={name:p.name,email:p.email,phone:p.phone,message:p.message,...b},s={method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)};fetch("".concat(c.Mr,"/contact"),s).then(e=>e.json()).then(e=>{A("Thank you for your submission. Our team will be in touch shortly"),w(!1),f({name:"",email:"",phone:"",message:""}),v()}).catch(e=>{console.log("error ",e),w(!1),A("There was a problem. Please drop mail to [email protected]")})}catch(l){w(!1),console.log(l)}};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t(),{children:(0,a.jsx)("title",{children:"Contact Us"})}),(0,a.jsx)("div",{className:"container-fluid p-0",children:(0,a.jsxs)("div",{className:"banner-section p-5",children:[(0,a.jsx)("div",{className:"banner-top"}),(0,a.jsx)("div",{className:"container banner-content-wrap",children:(0,a.jsx)("div",{className:"row d-flex align-items-center mt-0",children:(0,a.jsx)("div",{className:"col-md-7 mt-4",children:(0,a.jsx)("h1",{className:"banner-txt2",children:"Contact Us"})})})})]})}),(0,a.jsx)("div",{className:"container-fluid py-5",children:(0,a.jsx)("div",{className:"container",children:(0,a.jsxs)("div",{className:"row gy-4",children:[(0,a.jsx)("div",{className:"col-md-7 contact-detail-wrap",children:(0,a.jsx)("div",{className:"row",children:(0,a.jsx)("div",{className:"col-7 contact-detail-wrap mb-5",children:(0,a.jsxs)("div",{className:"row py-3 pb-4",children:[(0,a.jsxs)("div",{className:"col-md-6",children:[(0,a.jsx)("label",{className:"contact-label pb-3",children:"Telephone"}),(0,a.jsxs)("p",{className:"mb-0",children:[(0,a.jsx)("strong",{children:"UK:"})," ",(0,a.jsx)("a",{href:"tel:+442070997432",children:"+44 20 7099 7432"})]}),(0,a.jsxs)("p",{children:[(0,a.jsx)("strong",{children:"US:"})," ",(0,a.jsx)("a",{href:"tel:+18882198636",children:"+1 888 219 8636"})]})]}),(0,a.jsxs)("div",{className:"col-12 border-top-bottom py-3",children:[(0,a.jsx)("label",{className:"contact-label",children:"Email"}),(0,a.jsx)("p",{className:"contact-email",children:(0,a.jsx)("a",{href:"mailto:[email protected]",className:"course-list-note underline",children:"[email protected]"})})]}),(0,a.jsxs)("div",{className:"col-12 py-3",children:[(0,a.jsx)("label",{className:"contact-label pb-3",children:"Office"}),(0,a.jsxs)("p",{children:["Clavering, ",(0,a.jsx)("br",{}),"Darkes Lane,",(0,a.jsx)("br",{})," Potters Bar,",(0,a.jsx)("br",{})," England, EN6 1DB"]})]})]})})})}),(0,a.jsx)("div",{className:"col-md-5 basket-summary px-0 ms-auto",children:(0,a.jsxs)("div",{className:"gclp-price-card",children:[(0,a.jsx)("div",{className:"header",children:(0,a.jsx)("p",{className:"title",children:"Send an Email"})}),(0,a.jsxs)("div",{className:"body",children:[E&&(0,a.jsx)("div",{className:"alert alert-warning fw-bold",role:"alert",children:E}),(0,a.jsxs)("div",{className:"mb-3",children:[(0,a.jsx)("label",{htmlFor:"name",className:"form-label",children:"Full Name"}),(0,a.jsx)("input",{type:"text",className:"form-control",id:"name",placeholder:"Your Name",name:"name",value:p.name,onChange:j}),(0,a.jsx)("p",{style:{color:"red"},children:x.name})]}),(0,a.jsxs)("div",{className:"mb-3",children:[(0,a.jsx)("label",{htmlFor:"email",className:"form-label",children:"Email Address"}),(0,a.jsx)("input",{type:"email",className:"form-control",id:"email",placeholder:"Your Email",n
1ame:"email",value:p.email,onChange:j}),(0,a.jsx)("p",{style:{color:"red"},children:x.email})]}),(0,a.jsxs)("div",{className:"mb-3",children:[(0,a.jsx)("label",{htmlFor:"phone",className:"form-label",children:"Telephone"}),(0,a.jsx)("input",{type:"text",className:"form-control",id:"phone",placeholder:"Your Phone number",name:"phone",value:p.phone,onChange:j})]}),(0,a.jsxs)("div",{className:"mb-3",children:[(0,a.jsx)("label",{htmlFor:"message",className:"form-label",children:"Message"}),(0,a.jsx)("textarea",{className:"form-control",id:"message",placeholder:"How can we help you",rows:3,name:"message",value:p.message,onChange:j}),(0,a.jsx)("p",{style:{color:"red"},children:x.message})]}),(0,a.jsx)("button",{className:"wh-primary-btn w-100 mb-3",onClick:e=>Z(e),children:y?"Processing...":"Send"})]})]})})]})})})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=81382)}),_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.