"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1666,5832],{52084:function(e,a,r){r.d(a,{Z:function(){return m}});var t=r(92809),o=r(27361),l=r.n(o),i=r(43832),n=r(99956),s=r(41749),c=r(41120),d=(r(67294),r(47534)),u=r(85893),p=(0,c.Z)((function(e){return{root:function(a){var r;return r={minWidth:"25%"},(0,t.Z)(r,e.breakpoints.up("md"),{maxWidth:a.maxWidth?"25%":"none"}),(0,t.Z)(r,e.breakpoints.down("md"),{minWidth:"33%"}),r}}}));function m(e){var a=p(e),r=!!l()(e,"title[0][0].text",void 0)&&""!==l()(e,"title[0][0].text",void 0)&&l()(e,"title",""),t=!!e.rows;return(0,u.jsxs)(i.Z,{maxWidth:"xl",children:[r&&(0,u.jsx)(d.default,{data:{fields:r.map((function(e){return{text:e}}))},zeroB:!0,label:"center"}),(0,u.jsx)(n.Z,{pb:8,pt:8,children:(0,u.jsx)(s.Z,{container:!0,justifyContent:"center",alignItems:"stretch",spacing:t?0:2,children:e.children&&e.children.map((function(e,r){return(0,u.jsx)(s.Z,{item:!0,xs:12,md:!t,className:a.root,align:"center",children:e},r)}))})})]})}},51666:function(e,a,r){r.r(a),r.d(a,{default:function(){return re}});var t=r(67294),o=r(27361),l=r.n(o),i=r(41120),n=r(22318),s=r(89659),c=r(282),d=r(99956),u=r(43832),p=r(41749),m=r(47534),h=r(30266),g=r(80318),b=r(92809),v=r(809),x=r.n(v),y=r(18499),f=r(52161),j=r(73637),S=r(81395),M=r(85311),A=r(72063),C=r(85893);function k(e){return(0,C.jsx)(d.Z,{ml:1,mr:-3,children:e.valid&&e.value?(0,C.jsx)(j.Z,{in:!0,timeout:{enter:500},children:(0,C.jsx)(S.Z,{style:{color:"#4caf50"}})}):e.error?(0,C.jsx)(j.Z,{in:!0,timeout:{enter:500},children:(0,C.jsx)(A.Z,{color:"error"})}):(0,C.jsx)(M.Z,{style:{color:"transparent"}})})}var E=r(37895),P=(0,i.Z)((function(e){return{label:{fontSize:e.typography.form.label.fontSize,lineHeight:e.typography.form.label.lineHeight}}}));function Z(e){var a=P();return(0,C.jsxs)(p.Z,{container:!0,alignItems:"center",spacing:1,children:[(0,C.jsx)(p.Z,{item:!0,className:a.label,children:e.source.falseLabel||"False"}),(0,C.jsx)(p.Z,{item:!0,children:(0,C.jsx)(E.qL,{checked:e.checked,value:e.value,name:e.id,onChange:e.onChange,onKeyPress:function(e){"Enter"===e.key&&e.preventDefault()}})}),(0,C.jsx)(p.Z,{item:!0,className:a.label,children:e.source.trueLabel||"True"})]})}var N=r(34275),w=r(65402),L=r(97026),I=r(40074),O=r(41959);function q(e){var a=e.source;return(0,C.jsx)(E.E5,{"aria-label":e.id,"aria-describedby":e.id+"-helper-text",name:e.id,id:e.id,onKeyPress:function(e){"Enter"===e.key&&e.preventDefault()},value:e.value,onChange:e.onChange,children:Object.keys(a).map((function(r){return(0,C.jsx)(E.wD,{className:e.error?"radioError":"radioValid","aria-label":"".concat(a[r].label),"aria-roledescription":"radio","aria-checked":a[r].value===e.value,value:a[r].value,control:(0,C.jsx)(I.Z,{icon:(0,C.jsx)(O.Z,{style:{display:"none"}}),checkedIcon:(0,C.jsx)(O.Z,{style:{display:"none"}})}),label:a[r].label},r)}))})}var B=r(8720),R=r(30585),T=r(90747),U=r(52976),D=r(58885),_=r(4298);function F(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),r.push.apply(r,t)}return r}function G(e){for(var a=1;a3&&void 0!==arguments[3]?arguments[3]:65;if(!(""===a||a.length>=t)){if("text"===r){var o=a.trim();""!==o&&(0,B.Ol)(o)?je(e,o):Se(e,o)}"email"===r&&((0,B.oH)(a.trim())?je(e,a.trim()):Se(e,a.trim())),"password"===r&&((0,B.hi)(a)?je(e,a):Se(e,a)),"phone"===r&&((0,B.a$)(a.trim())?je(e,a.trim()):Se(e,a.trim())),"textarea"===r&&(0,B.L_)(e,a)}},je=function(e,a){return Ze(G(G({},Pe),{},(0,b.Z)({},e,G(G({},Pe[e]),{},{value:a,valid:!0,error:!1}))))},Se=function(e,a){return Ze(G(G({},Pe),{},(0,b.Z)({},e,G(G({},Pe[e]),{},{value:a,valid:!1,error:!0}))))},Me=function(e,a,r,t){Ze(G(G({},Pe),{},(0,b.Z)({},e,G(G({},Pe[e]),{},{value:a,error:""===a&&r||a.length>t,additionalErrorMessage:a.length>t?" Max "+t+" Characters":void 0,valid:(!r||a)&&(""!==a||!r)&&(!t||a.length<=t)}))))},Ae=(0,t.useState)(!1),Ce=Ae[0],ke=Ae[1];(0,t.useEffect)((function(){window.removeRecaptchaErrorMessage=function(){document.getElementById("recaptcha-helper-text").innerText=""}}));var Ee=(0,t.useState)({leadSource:{order:1,value:l,active:!0,hidden:!0,required:!1,valid:!0,error:!1},sbaId:{order:1,value:I,active:!0,hidden:!0,required:!1,valid:!0,error:!1},clubId:{order:1,value:O,active:!0,hidden:!0,required:!1,valid:!0,error:!1},firstName:{order:2,value:"",active:!0,required:!0,valid:!1,error:!1,type:"text",label:"PRE_COLLEGE"===i?"Student First Name":"First Name",errorMessage:"Please enter your first name.",maxChar:21},lastName:{order:3,value:"",active:!0,required:!0,valid:!1,error:!1,type:"text",label:"PRE_COLLEGE"===i?"Student Last Name":"Last Name",errorMessage:"Please enter your last name.",maxChar:31},email:{order:4,value:"",active:!0,required:!0,valid:!1,error:!1,type:"email",label:"PRE_COLLEGE"===i?"Student Email":"Email",errorMessage:"Please enter a valid email.",maxChar:50},country:{order:5,value:"placeholder",inputValue:"placeholder",hidden:ie,active:!ie,required:!ie,valid:!1,error:!1,type:"autoComplete",label:"Country",placeholder:"Select Country",sourceURL:"/rest/mocha/country",errorMessage:"Please select your country"},state:{order:6,value:"placeholder",inputValue:"placeholder",hidden:W,active:!W,required:!W,valid:!1,error:!1,type:"autoComplete",label:"State/Province",placeholder:"Select State",sourceURL:"/rest/mocha/stateprovince",errorMessage:"Please select your state",hideState:ne},roles:{order:7,value:"placeholder",active:"BARRONS"===i,required:!0,valid:!1,error:!1,type:"selectDropdown",label:"You are a:",placeholder:"Select Role",inputValue:"placeholder",sourceArray:(0,T.uJ)(),errorMessage:"Please select an option."},rolesOther:{order:8,value:"",active:!1,required:!1,valid:!0,error:!1,type:"text",label:"Enter your role",errorMessage:"Please enter your role.",maxChar:31},programs:{order:12,value:a||"placeholder",schoolType:r,inputValue:"placeholder",active:!0,hidden:!(!a&&"BARRONS"!==i),required:"BARRONS"!==i,valid:!(!a&&"BARRONS"!==i),error:!1,type:"selectDropdown",label:ge&&"fiu"===ge?"Course Interest":"Test Interest",placeholder:ge&&"fiu"===ge?"Select Course":"Select Test",sourceURL:function(e,a,r){var t="/rest/mocha/programs?brand=".concat(he);return"ALL"===a||e||(t=t+"&programType="+a),r&&(t=t+"&filter="+r),t}(A,i,Y),errorMessage:"Please select your test interest."},subjects:{order:13,value:[],inputValue:"placeholder",active:"BARRONS"===i,required:!0,valid:!!a,error:!1,type:"multiSelect",object:[],label:"Area of Interest",placeholder:"Select all that apply",sourceURL:"/rest/mocha/programSubjects?brand=barrons",errorMessage:"Please select your area of interest."},eduBackground:{order:15,value:"",active:"MED"===i,required:!1,valid:!0,error:!1,type:"radio",label:"Medical School Location",source:(0,T.zX)(),errorMessage:"Please select your school location."},schoolLocation:{order:17,value:"placeholder",inputValue:"placeholder",hidden:F,active:"MBE"===i,required:("MBE"!==i||!v)&&("MBE"===i&&!v),valid:!!v,error:!1,type:"autoComplete",label:"School Location",placeholder:"Select Location",sourceURL:"/rest/mocha/schoolLocation?countryCode=US",errorMessage:"Please select your school location."},schoolId:{order:18,value:"placeholder",inputValue:"placeholder",active:"MBE"===i,required:("MBE"!==i||!v)&&("MBE"===i&&!v),disabled:!0,refetchable:!0,valid:!!v,error:!1,type:"autoComplete",label:"School Name",placeholder:"Select School Name",errorMessage:"Please select your school name."},schoolName:{order:19,value:"",active:!1,required:!1,valid:!0,error:!1,type:"text",label:"Enter your school name here",errorMessage:"Please enter your school name.",maxChar:31},testDate:{order:21,value:"placeholder",active:"MBE"==i||"GRAD"===i||"NURSING"===i,required:!("GRAD"!==i&&"MED"!==i||M),hidden:V,valid:!0,error:!1,type:"selectDropdown",label:"When's Your Test",placeholder:"Select Date",inputValue:"placeholder",sourceArray:(0,T.Zk)(),errorMessage:"Please select your test date."},gradYear:{order:22,value:"placeholder",inputValue:"placeholder",active:"MBE"==i||"GRAD"===i||"PRE_COLLEGE"===i||"NURSING"===i,hidden:z,required:"MBE"===i||!("GRAD"!==i&&"MED"!==i||S),valid:"MBE"!==i,error:!1,type:"selectDropdown",label:"PRE_COLLEGE"===i?"Student Graduation Year":"Graduation Year",placeholder:"Select Year",sourceURL:"/rest/mocha/gradyear",errorMessage:"Please select your graduation year."},parentFirstName:{order:25,value:"",active:!1,required:!1,valid:!1,error:!1,type:"text",label:"Parent First Name",errorMessage:"Please enter your parent\u2019s first name.",maxChar:21},parentLastName:{order:26,value:"",active:!1,required:!1,valid:!1,error:!1,type:"text",label:"Parent Last Name",errorMessage:"Please enter your parent\u2019s last name.",maxChar:31},parentEmail:{order:27,value:"",active:!1,required:!1,valid:!1,error:!1,type:"email",label:"Parent Email",errorMessage:"Please enter a valid parent email.",maxChar:50},countryPR:{order:29,value:"US",checked:!1,active:!0,hidden:"CA"!==m&&"EU"!==m,required:!1,valid:!0,error:!1,type:"switch",label:(0,T.dm)(m),source:{falseLabel:"No",trueLabel:"Yes"},errorMessage:""},sendMarketingEmail:{order:31,value:!0,active:!0,hidden:!0,required:!1,valid:!0,error:!1,type:"checkbox",text:(0,T.U5)(m)},phone:{order:32,value:"",active:!K,required:!J,valid:!1,error:!1,type:"phone",label:"Phone Number",errorMessage:"Please enter a valid Phone number.",maxChar:50},ewc:{order:33,type:"checkbox",active:!0,required:!1,text:(0,T.fv)(l),errorMessage:"Please indicate that you accept",value:!1,valid:!1},description:{order:33,value:"",type:"textarea",active:le,required:le,label:"Comments/Questions",errorMessage:"Please enter comments/questions",error:!1,valid:!1},under13:{order:33,type:"checkbox",active:!(!a||!(0,T.FP)().includes(a)),required:!0,text:"I am 13 years or older.",errorMessage:"You must be 13 or older.",value:!1,valid:!1},under16:{order:34,type:"checkbox",active:"PRE_COLLEGE"===i,required:!0,text:"I am 13 years or older.",errorMessage:"You must be 13 or older.",value:!1,valid:!1},terms:{order:35,type:"checkbox",active:"PRE_COLLEGE"===i,required:!0,text:(0,T.BV)(),errorMessage:"Please indicate that you accept the Terms and Conditions",value:!1,valid:!1}}),Pe=Ee[0],Ze=Ee[1];(0,t.useEffect)((function(){"placeholder"!==Pe.schoolLocation.value&&Pe.programs.schoolType&&Ze(G(G({},Pe),{},(0,b.Z)({},"schoolId",G(G({},Pe.schoolId),{},{disabled:!1,sourceURL:"/rest/mocha/schoolId?type="+Pe.programs.schoolType+"&state="+Pe.schoolLocation.value}))))}),[Pe.schoolLocation.value,Pe.programs.schoolType]),(0,t.useEffect)((function(){if(he&&"Metis"===he&&!ie){var e=Pe.country.value;Ze(G(G({},Pe),{},"US"===e||"CA"===e?(0,b.Z)({},"state",G(G({},Pe.state),{},{disabled:!1,active:!0,required:!0,sourceURL:"/rest/mocha/schoolLocation?countryCode=".concat(e)})):(0,b.Z)({},"state",G(G({},Pe.state),{},{disabled:!0,active:!1,required:!1}))))}}),[Pe.country.value]);var Ne=(0,y.Db)(U.CREATE_LEAD),we=(0,g.Z)(Ne,2),Le=we[0],Ie=we[1],Oe=Ie.loading,qe=Ie.error,Be=function(){var e=(0,h.Z)(x().mark((function e(a){var r,t,o;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={firstName:a.firstName,lastName:a.lastName,email:a.email,roles:a.roles,leadSource:a.leadSource,sendMarketingEmail:a.sendMarketingEmail,countryPR:a.countryPR,eduBackground:a.eduBackground,programs:a.programs,subjects:a.subjects,graduationYear:a.gradYear,schoolName:a.schoolName,schoolLocation:a.schoolLocation,schoolId:a.schoolId,testDate:a.testDate,parentFirstName:a.parentFirstName,parentLastName:a.parentLastName,parentEmail:a.parentEmail,captcha:"123",sbaId:a.sbaId,clubId:a.clubId,tenant:ge,country:a.country,state:a.state,phoneNumber:a.phone,ewc:a.ewc,description:a.description,streetAddress:a.state&&a.country?"Please update":void 0,city:a.state&&a.country?"please update":void 0,zip:"10014",classCodes:pe,campaignContent:X,campaignMedium:Q,campaignName:$,campaignSource:ee,campaignTerm:ae,gclid:re,channelId:te,agent:oe},t=G(G({},r),{},{programCode:a.programs}),e.next=4,Le({variables:t,context:{keLeadForm:!0}});case 4:if(!P){e.next=11;break}return o=P,P.indexOf("programCode")>-1&&(o=(o=P.replaceAll("programCode",a.programs).toLowerCase()).replaceAll("country","US"===a.country?"us":"img").toLowerCase(),localStorage.setItem("input",JSON.stringify(r))),setTimeout((function(){return window.location.href=o}),500),e.abrupt("return",(0,C.jsx)(f.Z,{}));case 11:ke(!0);case 12:case"end":return e.stop()}}),e)})));return function(a){return e.apply(this,arguments)}}();return(0,C.jsx)(C.Fragment,{children:Oe?(0,C.jsx)(f.Z,{}):qe?(0,C.jsx)(d.Z,{textAlign:"center",mt:4,children:(0,C.jsx)(n.Z,{children:"Sorry, we are unable to process your submission right now."})}):Ce?(0,C.jsx)(d.Z,{textAlign:"center",mt:4,children:p||(0,C.jsx)(n.Z,{variant:"h4",children:"Thank you!"})}):(0,C.jsxs)("form",{noValidate:!0,autoComplete:"off",className:ce.leadForm,children:[Object.keys(Pe).filter((function(e){return!0===Pe[e].active&&!Pe[e].hidden})).sort((function(e,a){return Pe[e].order>Pe[a].order?1:-1})).map((function(a){var r=Pe[a];return(0,C.jsx)(j.Z,{in:!0,timeout:{enter:xe},children:(0,C.jsxs)(d.Z,{className:a,display:"flex",alignItems:"flex-start",mt:"parentFirstName"===a?6:0,children:[(0,C.jsxs)(E.__,{error:r.error,component:"radio"===r.type?"fieldset":void 0,children:[r.label&&(0,C.jsxs)(E.kK,{htmlFor:a,component:"radio"===r.type?"legend":"label",children:[r.required&&"* "," ",r.label]}),("text"===r.type||"password"===r.type||"email"===r.type||"phone"===r.type)&&(0,C.jsx)(w.Z,{required:r.required,maxChar:r.maxChar,id:a,error:r.error,value:r.value,updateFormState:function(e){return Me(a,e,r.required,r.maxChar)},onBlur:function(e){return fe(a,e.target.value,r.type,r.maxChar)}}),"textarea"===r.type&&(0,C.jsx)(E.Fy,{required:r.required,maxChar:r.maxChar,value:r.value,id:a,error:r.error,onChange:function(e){return Me(a,e.target.value,r.required,r.maxChar)},onBlur:function(e){return fe(a,e.target.value,r.type,r.maxChar)},rows:"4",multiline:!0,disableUnderline:!0,fullWidth:!0}),("autoComplete"===r.type||"selectDropdown"===r.type)&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(N.Z,G(G({},r),{},{id:a,onInputChange:function(e,t){e&&Ze(G(G({},Pe),{},(0,b.Z)({},a,G(G({},r),{},{inputValue:t,valid:"placeholder"!==t||!r.required}))))},onChange:function(e,t){var o,l,i=t.props?t.props:t;i.value&&Ze(G(G(G(G({},Pe),{},(0,b.Z)({},a,G(G(G({},r),{},{value:i.value},i.schooltype&&{schoolType:i.schooltype}),{},{inputValue:i.label,error:""===i.value&&r.required,valid:""!==i.value||!r.required})),("programs"===a||"schoolLocation"===a)&&(o={},(0,b.Z)(o,"schoolId",G(G({},Pe.schoolId),{},{value:void 0,inputValue:"placeholder",error:!1,valid:!r.required})),(0,b.Z)(o,"schoolName",G(G({},Pe.schoolName),{},{active:!1,value:""})),o)),"schoolId"===a&&(0,b.Z)({},"schoolName",G(G({},Pe.schoolName),{},{active:"1"===i.value,value:""}))),"roles"===a&&(l={},(0,b.Z)(l,"rolesOther",G(G({},Pe.rolesOther),{},{active:"other"===i.value,value:""})),(0,b.Z)(l,"gradYear",G(G({},Pe.gradYear),{},{active:i.value.indexOf("student")>0||"parent"===i.value,value:""},"parent"===i.value?{label:"Student Graduation Year"}:{label:"Graduation Year"})),l)))}})),"state"===a&&(0,C.jsx)(n.Z,{variant:"caption",className:ce.disclaimer,children:se})]}),"multiSelect"===r.type&&(0,C.jsx)(N.Z,G(G({},r),{},{id:a,onChange:function(e,t,o){e&&Ze(G(G({},Pe),{},(0,b.Z)({},a,G(G({},r),{},{value:e,error:""===e&&r.required,valid:""!==e||!r.required,object:o})),"subjects"===a&&(0,b.Z)({},"programs",G(G({},Pe.programs),{},{value:t}))))}})),"radio"===r.type&&(0,C.jsx)(q,{source:r.source,id:a,value:r.value,label:r.id,error:r.error,onChange:function(e){var t;Ze(G(G({},Pe),{},(0,b.Z)({},a,G(G({},r),{},{value:e.target.value,error:""===e.target.value&&r.required,valid:""!==e.target.value||!r.required})),"eduBackground"===a&&(t={},(0,b.Z)(t,"schoolLocation",G(G({},Pe.schoolLocation),{},{active:"Us Med"===e.target.value})),(0,b.Z)(t,"schoolId",G(G({},Pe.schoolId),{},{active:"Us Med"===e.target.value})),(0,b.Z)(t,"schoolName",G(G({},Pe.schoolName),{},{active:"Us Med"===e.target.value&&"1"===Pe.schoolId.value})),(0,b.Z)(t,"testDate",G(G({},Pe.testDate),{},{active:"Us Med"===e.target.value})),(0,b.Z)(t,"gradYear",G(G({},Pe.gradYear),{},{active:"Us Med"===e.target.value})),t)))}}),"switch"===r.type&&(0,C.jsx)(Z,{source:r.source,id:a,value:r.value,onChange:function(e){Ze(G(G({},Pe),{},(0,b.Z)({},a,G(G({},Pe[a]),{},{checked:e.target.checked,value:"countryPR"===a?e.target.checked?m:"US":e.target.checked})),"countryPR"===a&&(0,b.Z)({},"sendMarketingEmail",G(G({},Pe.sendMarketingEmail),{},{hidden:!e.target.checked,value:!e.target.checked}))))}}),"sendMarketingEmail"===a&&(0,C.jsx)(L.Z,{id:a,value:r.value,onChange:function(e){return Me(a,e.target.checked,r.required)},text:r.text}),("under13"===a||"under16"===a||"terms"===a||"ewc"===a&&Pe.phone.value.length>0)&&(0,C.jsx)(L.Z,{id:a,error:r.error,required:e.required,value:r.value,onChange:function(){return Me(a,!r.value,r.required)},text:r.text}),(0,C.jsxs)(R.Z,{id:a+"-helper-text",error:r.error,children:[r.error&&!r.additionalErrorMessage&&r.errorMessage," \xa0",r.error&&r.additionalErrorMessage&&r.additionalErrorMessage]})]}),(0,C.jsx)(d.Z,{mt:5,children:(0,C.jsx)(k,{valid:r.valid,error:r.error,value:r.value&&"placeholder"!==r.value})})]},a+"div")},a)})),be&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(_.default,{src:be.script_url}),(0,C.jsx)("div",{className:"g-recaptcha","data-sitekey":be.public_sitekey,"data-callback":"removeRecaptchaErrorMessage"}),(0,C.jsx)("p",{class:"MuiFormHelperText-root Mui-error",id:"recaptcha-helper-text"})]}),(0,C.jsx)(d.Z,{mt:2,className:ce.disclaimers,children:s}),(0,C.jsx)(d.Z,{mt:3,className:ce.submitBtnContainer,children:(0,C.jsx)(c.Z,{onClick:function(e){e.preventDefault();var a=Object.keys(Pe).filter((function(e){return Pe[e].active})),r=a.filter((function(e){return Pe[e].required&&!Pe[e].valid}));if(document.getElementById("formSlice").scrollIntoView({behavior:"smooth"}),r.length>0){var t={};r.map((function(e){return Object.assign(t,(0,b.Z)({},e,G(G({},Pe[e]),{},{error:!0})))})),Ze(G(G({},Pe),t))}else if(be&&""===window.grecaptcha.getResponse())document.getElementById("recaptcha-helper-text").innerText="Please check the reCAPTCHA.";else{var o={};a.map((function(e){if("schoolId"===e){var a=Pe[e].value;(a&&"1"!==a&&"placeholder"!==a||"1"===a&&""!==Pe.schoolName.value&&"placeholder"!==a)&&(Object.assign(o,(0,b.Z)({},e,a)),"1"!==a&&"placeholder"!==Pe[e].inputValue&&Object.assign(o,(0,b.Z)({},"schoolName",Pe.schoolId.inputValue)))}else if("sendMarketingEmail"===e)Object.assign(o,(0,b.Z)({},e,Pe[e].value));else if("roles"===e){var r="other"===Pe[e].value&&""!==Pe.rolesOther.value?Pe.rolesOther.value:Pe[e].value;Object.assign(o,(0,b.Z)({},e,[r]))}else"subjects"===e?Object.assign(o,(0,b.Z)({},e,JSON.stringify(Pe[e].value))):Pe[e].value&&"placeholder"!==Pe[e].value&&Object.assign(o,(0,b.Z)({},e,Pe[e].value))})),Be(o)}},color:"primary",type:"submit",variant:"contained",children:u})})]})})}var V=r(48122);function Y(e){var a=l()(e,"field"),r=e.classes,t=e.fObj;return(0,C.jsxs)("div",{style:{position:"relative"},children:[(0,C.jsx)("amp-bind-macro",{id:"stringifyArray",arguments:"arr",expression:"arr.join()"}),(0,C.jsx)("amp-bind-macro",{id:"stringifySubjects",arguments:"arr",expression:"arr.map(v => '\"' + v + '\"')"}),(0,C.jsx)("amp-bind-macro",{id:"toString",arguments:"arr",expression:"'[' + arr.reduce((r,v) => r+'{\"' + v.name + '\":[' + v.value + ']},', '') + ']'"}),(0,C.jsx)("amp-bind-macro",{id:"isProgramSelectedMacro",arguments:"v",expression:"programsBarronsAMPSelect == '' ? true : programsBarronsAMPSelect.indexOf(v) > -1 ? false : true "}),(0,C.jsx)("amp-bind-macro",{id:"doesProgramHaveChildren",arguments:"c",expression:"c.length > 0 ? true : false "}),(0,C.jsx)("input",{tabIndex:"-1","aria-hidden":!0,type:"text",id:a,name:a,className:"".concat(r.hidden," ").concat(r.input),required:t.required,defaultValue:"[]","data-amp-bind-value":"".concat(a,"Select")}),(0,C.jsx)("amp-selector",{layout:"container",multiple:!0,class:"amp-selector",on:"select: AMP.setState({\n ".concat(a,"Select: stringifyArray(event.selectedOptions)\n })\n "),children:(0,C.jsx)("amp-list",{layout:"fixed-height",height:"50",src:"amp-state:placeholder2","data-amp-bind-src":"".concat(a,"SrcUrl"),credentials:"include","single-item":!0,items:".",id:a+"select-list",children:(0,C.jsxs)("template",{type:"amp-mustache",children:[(0,C.jsx)("div",{id:a+"multiSelect",className:"".concat(r.textField," ").concat(r.multiselect," ","amp-list-div"),role:"button",tabIndex:"0",on:"tap:".concat(a+"select-list",".changeToLayoutContainer(),select-listb.changeToLayoutContainer(),list{{value}}.toggleVisibility,").concat(a+"multiSelect",".toggleClass(class='").concat(r.multiselectOpen,"')"),children:(0,C.jsx)("span",{"data-amp-bind-text":"".concat(a,"Select != '' ? ").concat(a,"Select.split(',').map(m => ' ' + m.split(':')[1]) : '").concat(t.placeholder,"'")})}),(0,C.jsxs)("div",{id:"list{{value}}",hidden:!0,className:r.multiselectList,children:[(0,C.jsx)("div",{className:r.placeholderwrapper,children:t.placeholder}),"{{#items}}",(0,C.jsx)("label",{htmlFor:"{{value}}program",children:(0,C.jsxs)("div",{className:r.checkboxwrapper,children:[(0,C.jsx)("input",{className:r.checkbox,type:"checkbox",id:"{{value}}program",option:"{{value}}:{{label}}"}),"{{label}}"]})}),"{{/items}}"]})]})})}),(0,C.jsx)("input",{tabIndex:"-1","aria-hidden":!0,type:"text",id:"subjectsAMP",name:"subjectsAMP",className:"".concat(r.hidden," ").concat(r.input),required:t.required,defaultValue:"[]","data-amp-bind-value":"toString(subjectsAMPSelect)"}),(0,C.jsx)(d.Z,{mt:5,children:(0,C.jsx)("amp-list",{layout:"fixed-height",height:"1",src:"amp-state:placeholder","data-amp-bind-src":"".concat(a,"SrcUrl"),credentials:"include","single-item":!0,items:".",id:"select-listb",children:(0,C.jsxs)("template",{type:"amp-mustache",children:["{{#items}}",(0,C.jsx)("div",{"data-amp-bind-hidden":"!doesProgramHaveChildren('{{children}}')",children:(0,C.jsxs)("div",{"data-amp-bind-hidden":"isProgramSelectedMacro('{{value}}')",children:[(0,C.jsxs)("span",{className:r.label,children:["{{label}}"," Subjects"]}),(0,C.jsxs)("amp-selector",{layout:"container",multiple:!0,on:"select: AMP.setState({\n subjectsAMPSelect: !subjectsAMPSelect ?\n [{name: '{{value}}', value: stringifySubjects(event.selectedOptions)}] :\n subjectsAMPSelect.filter(item => item.name == '{{value}}').length < 1 ? subjectsAMPSelect.concat([{ name: '{{value}}', value: stringifySubjects(event.selectedOptions)}]) :\n subjectsAMPSelect.map(item => item.name == '{{value}}' ? {name: '{{value}}', value: stringifySubjects(event.selectedOptions)} : item),\n })\n ",children:[(0,C.jsx)("div",{id:"{{value}}multiSelect",className:"".concat(r.textField," ").concat(r.multiselect," ","amp-list-div"),role:"button",tabIndex:"0",on:"tap:".concat(a+"select-listb",".changeToLayoutContainer(),list{{value}}.toggleVisibility,{{value}}multiSelect.toggleClass(class='").concat(r.multiselectOpen,"')"),children:(0,C.jsx)("span",{"data-amp-bind-text":"subjectsAMPSelect ? (subjectsAMPSelect.filter(s => s.name == '{{value}}').map(m => m.value)[0].length > 0 ? subjectsAMPSelect.filter(s => s.name == '{{value}}').map(m => m.value.map(v => ' ' + v.replace('\"','').replace('\"',''))) : '".concat(t.placeholder,"') : '").concat(t.placeholder,"'")})}),(0,C.jsxs)("div",{id:"list{{value}}",hidden:!0,className:r.multiselectList,children:[(0,C.jsx)("div",{className:r.placeholderwrapper,children:t.placeholder}),"{{#children}}",(0,C.jsx)("label",{htmlFor:"{{value}}subject",children:(0,C.jsxs)("div",{className:r.checkboxwrapper,children:[(0,C.jsx)("input",{className:r.checkbox,type:"checkbox",id:"{{value}}subject",option:"{{value}}"}),"{{value}}"]})}),"{{/children}}"]})]})]})}),"{{/items}}"]})})})]})}var K=(0,i.Z)((function(e){var a;return{submitBtnContainer:{"& .MuiButton-containedPrimary":(0,b.Z)({color:l()(e,"palette.form.btnColor"),backgroundColor:l()(e,"palette.form.btnBgColor"),"&:hover":{backgroundColor:l()(e,"palette.form.btnBgHoverColor"),color:l()(e,"palette.form.btnHoverColor")}},e.breakpoints.down("sm"),{width:l()(e,"palette.form.btnWidth")}),textAlign:l()(e,"palette.form.submitBtnAlignment","center"),marginBottom:l()(e,"palette.form.submitBtnMarginBtm")},leadForm:{backgroundColor:l()(e,"palette.form.bgColor"),padding:l()(e,"palette.form.padding"),borderTop:l()(e,"palette.form.borderTop"),"&.submitError":{"& .user-invalid ~ select, .user-invalid ~ .amp-list-div select, .user-invalid ~ .amp-selector .amp-list-div":{border:"1px solid "+e.palette.error.main,boxShadow:e.palette.error.main+" inset 0 0 0 1px",height:"50px"},"& .user-invalid":{border:"1px solid "+e.palette.error.main,boxShadow:e.palette.error.main+" inset 0 0 0 1px"}}},fieldWrapper:{display:"block",marginBottom:e.spacing(1),"&:focus-within > label":{color:e.palette.form.focusColor},"& .amp-list-div .amp-active":{top:0,left:0,transform:"none",borderRadius:4,border:"1px solid",width:"calc(100%)",height:"46px"},"& .amp-list-div .amp-active > div":{height:"40px",width:"40px",top:0,left:0,transform:"none",color:e.palette.form.focusColor},"& select":{"-moz-appearance":"none","-webkit-appearance":"none",appearance:"none",backgroundImage:"url(data:image/gif;base64,R0lGODlhZABkAKIFAP///8zMzJmZmWZmZjMzM////wAAAAAAACH5BAEAAAUALAAAAABkAGQAAAP/WLrc/jDKSau9OOvNu/9gKI5kaZ5oqq5s675wLM90bd94ru987//AoHBILBqPyKRy2QoElk5SgEB4IqdVkYBKtRaxXdCWGyaCud7NmFwOnskCzprd9r3Z8cycXt/d6XkWe3x9OH98gRODhIU1h4SJEAOMjGmOlJASi5iNMI+YkQybnFk0n5gDmqSEli6nlAMAiqt8rSuvjLEVo5y2KLiEuoK0dL4lwHzCF7yYxiLIdMoYzJTOH9Bs0nrEbNYc2GTaGtSVx9zhsmLnaCPgXOId5Kwh7lTwHvK11+v26SX5xTrUI3AvxCR+3h4MLCji4LqEDBb6U+HwXKgIEl9U5HbRqEFGGBuJdVwwkMBEjfwIjCwJ8URIWhdZ3ni5KpJMHDRJBbqZIyenODx1+ASVslSPoUXLAUGatJsQAEybGg0CVWozI1Wt6juSVSu7JF21tuwRtulYH2VTnv2R9txaIG1pvaUaNSCTCHGr3Z2Qd+teCX3JzL1CanCSU4aVPEoMBdFfgXgeewAzUrKFKZUta97MubPnz6BDix5NurTp06hTq17NurXr16ITAAA7) no-repeat calc(100% - 14px) 50%",backgroundSize:"14px",backgroundColor:l()(e,"palette.form.inputBgColor","transparent")}},fieldset:{border:"0",padding:"0"},label:{display:"block",lineHeight:l()(e,"typography.form.label.lineHeight"),marginBottom:l()(e,"palette.form.labelMarginBtm","4px"),fontWeight:l()(e,"palette.form.labelFontWeight","600"),fontSize:l()(e,"palette.form.labelFontSize")?l()(e,"palette.form.labelFontSize"):l()(e,"typography.form.label.fontSize")},errorMessage:{fontSize:l()(e,"typography.form.error.fontSize","14px"),lineHeight:l()(e,"typography.form.error.lineHeight")},hidden:{display:"block",width:"0px",height:"0px",opacity:"0",padding:"0",border:"0"},autocomplete:{width:"100%","& input":{background:"url(data:image/gif;base64,R0lGODlhZABkAKIFAP///8zMzJmZmWZmZjMzM////wAAAAAAACH5BAEAAAUALAAAAABkAGQAAAP/WLrc/jDKSau9OOvNu/9gKI5kaZ5oqq5s675wLM90bd94ru987//AoHBILBqPyKRy2QoElk5SgEB4IqdVkYBKtRaxXdCWGyaCud7NmFwOnskCzprd9r3Z8cycXt/d6XkWe3x9OH98gRODhIU1h4SJEAOMjGmOlJASi5iNMI+YkQybnFk0n5gDmqSEli6nlAMAiqt8rSuvjLEVo5y2KLiEuoK0dL4lwHzCF7yYxiLIdMoYzJTOH9Bs0nrEbNYc2GTaGtSVx9zhsmLnaCPgXOId5Kwh7lTwHvK11+v26SX5xTrUI3AvxCR+3h4MLCji4LqEDBb6U+HwXKgIEl9U5HbRqEFGGBuJdVwwkMBEjfwIjCwJ8URIWhdZ3ni5KpJMHDRJBbqZIyenODx1+ASVslSPoUXLAUGatJsQAEybGg0CVWozI1Wt6juSVSu7JF21tuwRtulYH2VTnv2R9txaIG1pvaUaNSCTCHGr3Z2Qd+teCX3JzL1CanCSU4aVPEoMBdFfgXgeewAzUrKFKZUta97MubPnz6BDix5NurTp06hTq17NurXr16ITAAA7) no-repeat calc(100% - 14px) 50%",backgroundSize:"14px"},"& > div":{marginTop:"-4px",marginBottom:"-4px",marginLeft:0,boxShadow:e.palette.form.focusColor+" inset 0 0 0 1px",border:e.palette.form.focusColor+" 1px solid",width:"calc(100%)",fontSize:l()(e,"typography.form.input.fontSize"),lineHeight:"3rem",padding:e.spacing(.5,0)}},textField:{fontSize:l()(e,"typography.form.input.fontSize"),lineHeight:l()(e,"typography.form.input.lineHeight"),borderRadius:4,position:"relative",backgroundColor:l()(e,"palette.form.inputBgColor","transparent"),border:"1px solid",width:"100%",padding:e.spacing(1.4),fontFamily:e.typography.body1.fontFamily,"&:focus":{boxShadow:e.palette.form.focusColor+" inset 0 0 0 1px",border:e.palette.form.focusColor+" 1px solid",outline:0},"&:disabled":{backgroundColor:e.palette.background.disabled}},multiselect:{textAlign:"left","-moz-appearance":"none","-webkit-appearance":"none",appearance:"none",background:"url(data:image/gif;base64,R0lGODlhZABkAKIFAP///8zMzJmZmWZmZjMzM////wAAAAAAACH5BAEAAAUALAAAAABkAGQAAAP/WLrc/jDKSau9OOvNu/9gKI5kaZ5oqq5s675wLM90bd94ru987//AoHBILBqPyKRy2QoElk5SgEB4IqdVkYBKtRaxXdCWGyaCud7NmFwOnskCzprd9r3Z8cycXt/d6XkWe3x9OH98gRODhIU1h4SJEAOMjGmOlJASi5iNMI+YkQybnFk0n5gDmqSEli6nlAMAiqt8rSuvjLEVo5y2KLiEuoK0dL4lwHzCF7yYxiLIdMoYzJTOH9Bs0nrEbNYc2GTaGtSVx9zhsmLnaCPgXOId5Kwh7lTwHvK11+v26SX5xTrUI3AvxCR+3h4MLCji4LqEDBb6U+HwXKgIEl9U5HbRqEFGGBuJdVwwkMBEjfwIjCwJ8URIWhdZ3ni5KpJMHDRJBbqZIyenODx1+ASVslSPoUXLAUGatJsQAEybGg0CVWozI1Wt6juSVSu7JF21tuwRtulYH2VTnv2R9txaIG1pvaUaNSCTCHGr3Z2Qd+teCX3JzL1CanCSU4aVPEoMBdFfgXgeewAzUrKFKZUta97MubPnz6BDix5NurTp06hTq17NurXr16ITAAA7) no-repeat calc(100% - 14px) 14px",backgroundSize:"14px"},multiselectOpen:{background:"url(data:image/gif;base64,R0lGODlhZABkAKIFAP///8zMzJmZmWZmZjMzM////wAAAAAAACH5BAEAAAUALAAAAABkAGQAAAP/WLrc/jDKSau9OOvNu/9gKI5kaZ5oqq5s675wLM90bd94ru987//AoNAFGACGrgHBiFwpCctj8/SERqelqvWKDWm33G7nCw6LM+Sy+VxJq9fsiPsNjzfm9KVdnu8P9g54fVB/gAqCg4SGiImKdoyNjmeQkZJYlJWWSJiZmkGcnZ4+oKGiO6Slpjioqao1rH+sAjywC7I6AqmFC7mlsze9obsMwZ2/NMWZww3JlccxzZHLDtGNzy7VidMP2YPXK91+F+F53yjkdNsS6G/mJexq6hPwZe4i9GDyFPhb9h/8VvRVAAjFHweCekAgNJgBoUAMCAPc0/UulcR/FE1E9OAwiMXGDR1VfISYEZxFkqUejhg5ryS2ky1TzmBJzSU0mNxk2kAoAZRKFgAv8pG2A5/Qno1+voB3NGYepTACDGKC8g3UGFLTSWlodUjWMlRBgm3yNeDWg1uu2igblqOrH1nb/mMIV66hu3jz6t3Lt6/fv4ADCx5MuLDhw4gTK17MuLHjx5AjS55cIQEAOw==) no-repeat calc(100% - 14px) 14px",backgroundSize:"14px"},multiselectList:{borderRadius:"0 0 4px 4px",borderTop:0,backgroundColor:l()(e,"palette.form.inputBgColor","transparent"),border:"1px solid",marginTop:"-2px"},checkbox:{marginLeft:0,marginRight:e.spacing(1.5),filter:e.palette.form.checkboxRotate,"&[selected]":{outline:"none"}},checkboxwrapper:{height:e.spacing(6),padding:e.spacing(1.5,2.5),"&:hover, &:focus-within":{backgroundColor:"rgba(0, 0, 0, 0.04)"}},placeholderwrapper:{height:e.spacing(6),padding:e.spacing(1.5,2.5),color:e.palette.background.hover},radioGroup:{display:"flex",flexDirection:"row"},radio:(a={border:"1px solid",padding:e.spacing(1),borderRight:0},(0,b.Z)(a,e.breakpoints.down("sm"),{padding:e.spacing(1,.5)}),(0,b.Z)(a,"&[option]:first-child",{borderTopLeftRadius:4,borderBottomLeftRadius:4}),(0,b.Z)(a,"&[option]:last-of-type",{borderTopRightRadius:4,borderBottomRightRadius:4,borderRight:"1px solid"}),(0,b.Z)(a,"&[option][selected]",{color:e.palette.text.secondary,outline:"none",fontFamily:e.masthead.highlightFontFamily,borderColor:e.palette.form.focusColor,backgroundColor:e.palette.form.focusColor}),a),switchlabel:{fontSize:e.typography.form.label.fontSize,lineHeight:e.typography.form.label.lineHeight},switch:{position:"relative",display:"inline-block",width:e.spacing(4),height:e.spacing(2),lineHeight:1,"& input":{opacity:0,width:0,height:0,"&:checked + span":{backgroundColor:e.palette.form.focusColor,borderColor:e.palette.form.focusColor},"&:focus + span":{boxShadow:"0 0 1px #2196F3"},"&:checked + span:before":{"-webkit-transform":"translateX(14px)","-ms-transform":"translateX(14px)",transform:"translateX(14px)"}}},slider:{position:"absolute",cursor:"pointer",top:"0",left:"0",right:"0",bottom:"0",borderRadius:e.spacing(2),backgroundColor:e.palette.background.mediumGray||e.palette.form.focusColor,transition:".4s","&::before":{position:"absolute",content:'" "',width:10,height:10,left:"4px",bottom:"3px",backgroundColor:"white",transition:".4s",borderRadius:"50%"}},consent:{"& p":{display:"inline"}}}})),W=r(95477);function J(e){var a=function(e){var a=e.condition,r=e.wrapper,t=e.children;return a?r(t):t},r=e.poiShortName,t=e.schoolType,o=e.schoolOptional,l=e.gradYearOptional,i=e.testDateOptional,s=e.ampFormDomain,u=e.cloudfrontViewerCountry,m=e.lead_source,h=void 0===m?"":m,g=e.bU,b=e.disclaimer,v=e.btn_label,x=e.thank_you_message,y=e.noShow,f=e.successPageRedirect,j=e.customPOI,S=e.tenant,M=e.hidePhone,A=e.stateProvinceHide,k=e.showDescription,E=K({tenant:S}),P=(0,V.mN)(),Z={firstName:{order:2,type:"text",value:"",active:!0,required:!0,label:"PRE_COLLEGE"===g?"Student First Name":"First Name",errorMessage:"Please enter your first name.",additionalErrorMessage:"Please don't use special characters or spaces only.",maxChar:21,pattern:B.BU},lastName:{order:3,type:"text",value:"",active:!0,required:!0,label:"PRE_COLLEGE"===g?"Student Last Name":"Last Name",errorMessage:"Please enter your last name.",additionalErrorMessage:"Please don't use special characters or spaces only.",maxChar:31,pattern:B.BU},email:{order:4,type:"email",value:"",active:!0,required:!0,label:"PRE_COLLEGE"===g?"Student Email":"Email",errorMessage:"Please enter your email address.",additionalErrorMessage:"Please enter a valid email.",maxChar:50,pattern:B.u},country:{order:5,type:"autocomplete",value:"placeholder",active:!0,required:!0,label:"Country",errorMessage:"Please select your country",hiddenMed:!1,placeholder:"Select Country",sourceURL:"".concat(s,"/rest/mocha/country")},state:{order:6,type:"autocomplete",value:"placeholder",hiddenMed:A,active:!A,required:!A,label:"State/Province",placeholder:"Select State",sourceURL:"".concat(s,"/rest/mocha/stateprovince"),errorMessage:"Please select your state"},roles:{order:7,value:"placeholder",active:"BARRONS"==g,required:!0,type:"shortSelect",label:"You are a:",placeholder:"Select Role",source:(0,T.uJ)(),errorMessage:"Please select an option."},rolesOther:{order:8,active:"BARRONS"==g,required:!1,type:"text",conditional:!0,label:"Enter your role",errorMessage:"Please enter your role.",additionalErrorMessage:"Please don't use special characters or spaces only.",pattern:B.BU,maxChar:31},programs:{order:12,type:"selectDropdown",conditional:!!r,defaultValue:r||void 0,active:"BARRONS"!==g,required:!0,label:"Test Interest",placeholder:"Select Test",sourceUrl:function(e,a,r){var t="".concat(s,"/rest/mocha/programs?brand=ktp");return"ALL"===a||e||(t=t+"&programType="+a),r&&(t=t+"&filter="+r),t}(y,g,j),ampState:"POI",errorMessage:"Please select your test interest."},programsBarronsAMP:{order:13,value:[],active:"BARRONS"===g,required:!0,defaultValue:["MCAT"],type:"multiSelect",object:[],label:"Area of Interest",placeholder:"Select all that apply",sourceUrl:"".concat(s,"/rest/mocha/programSubjects?brand=barrons"),errorMessage:"Please select your area of interest."},phone:{order:14,value:"",active:!M,required:!M,type:"phone",label:"Phone Number",errorMessage:"Please enter a valid Phone number.",maxChar:50,pattern:B.phoneRegexAMP},description:{order:14,value:"",active:k,required:k,type:"textarea",label:"Description",errorMessage:"Please enter a description",pattern:B.Um},eduBackground:{order:15,active:"MED"===g,required:!1,label:"Medical School Location",source:(0,T.zX)(),errorMessage:"Please select your school location."},schoolLocation:{order:17,type:"selectDropdown",value:"",active:"MED"===g||"MBE"===g,hiddenMed:"MED"===g,required:("MBE"!==g||!o)&&("MBE"===g&&!o),label:"School Location",placeholder:"Select Location",sourceUrl:"".concat(s,"/rest/mocha/schoolLocation?countryCode=US"),ampState:"SchoolLocation"},schoolId:{order:18,active:"MED"===g||"MBE"===g,hiddenMed:"MED"===g,required:("MBE"!==g||!o)&&("MBE"===g&&!o),type:"autocomplete",label:"School Name",sourceUrl:"".concat(s,"/rest/mocha/schoolId"),placeholder:"Select School Name",errorMessage:"Please select your school name."},schoolName:{order:19,active:"MED"===g||"MBE"===g,required:!1,type:"text",conditional:!0,label:"Enter your school name here",errorMessage:"Please enter your school name.",additionalErrorMessage:"Please don't use special characters or spaces only.",maxChar:31,pattern:B.BU},testDate:{order:21,type:"shortSelect",active:!y&&"PRE_COLLEGE"!==g,hiddenMed:!!("MED"===g&&l&&i||"MED"!==g||"GRAD"!==g),required:!("GRAD"!==g&&"MED"!==g||i),label:"When's Your Test",placeholder:"Select Date",source:(0,T.Zk)(),errorMessage:"Please select your test date."},gradYear:{order:9,type:"selectDropdown",active:!y,conditional:"BARRONS"===g,hiddenMed:!!("MED"===g&&l&&i||"MED"!==g||"GRAD"!==g),required:"MBE"===g||!("GRAD"!==g&&"MED"!==g||l),label:"PRE_COLLEGE"===g?"Student Graduation Year":"Graduation Year",placeholder:"Select Year",sourceUrl:"".concat(s,"/rest/mocha/gradyear"),ampState:"GradYear",errorMessage:"Please select your graduation year."},parentFirstName:{order:25,type:"text",active:!1,required:!1,label:"Parent First Name",errorMessage:"Please enter your parent\u2019s first name.",additionalErrorMessage:"Please don't use special characters or spaces only.",maxChar:21,pattern:B.BU},parentLastName:{order:26,type:"text",active:!1,required:!1,label:"Parent Last Name",errorMessage:"Please enter your parent\u2019s last name.",additionalErrorMessage:"Please don't use special characters or spaces only.",maxChar:31,pattern:B.BU},parentEmail:{order:27,type:"email",active:!1,required:!1,label:"Parent Email",errorMessage:"Please enter a valid parent email.",additionalErrorMessage:"Please enter a valid email.",maxChar:50,pattern:B.u},countryPR:{order:29,type:"switch",value:"US",active:!0,required:!1,label:(0,T.dm)(u),errorMessage:""},sendMarketingEmail:{order:31,type:"checkbox",value:"US"===u,active:!0,required:!1,text:(0,T.U5)(u)},under13:{order:33,type:"checkbox",active:!(!r||!(0,T.FP)().includes(r)),required:!0,text:"I am 13 years or older."},under16:{order:34,type:"checkbox",active:"PRE_COLLEGE"===g,required:!0,text:"I am 13 years or older."},terms:{order:35,type:"checkbox",active:"PRE_COLLEGE"===g,required:!0,text:(0,T.BV)()}};return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("amp-state",{id:"schoolType",children:(0,C.jsx)("script",{type:"application/json",dangerouslySetInnerHTML:{__html:'"'.concat(t||void 0,'"')}})}),(0,C.jsx)("amp-state",{id:"programsSelect",children:(0,C.jsx)("script",{type:"application/json",dangerouslySetInnerHTML:{__html:'"'.concat(r||"",'"')}})}),(0,C.jsx)("amp-state",{id:"programsBarronsAMPSelect",children:(0,C.jsx)("script",{type:"application/json",dangerouslySetInnerHTML:{__html:'"'.concat(r||"",'"')}})}),(0,C.jsx)("amp-state",{id:"placeholder",children:(0,C.jsx)("script",{type:"application/json",dangerouslySetInnerHTML:{__html:'{"items":[{"value":"select","label":"select"}]}'}})}),(0,C.jsx)("amp-state",{id:"placeholder2",children:(0,C.jsx)("script",{type:"application/json",dangerouslySetInnerHTML:{__html:'{"items":[]}'}})}),!Z.programs.defaultValue&&Z.schoolLocation.active&&(0,C.jsx)("amp-state",{id:"POI",src:"".concat(s,"/rest/mocha/programs?programType=").concat(g,"&brand=ktp")}),(0,C.jsx)("amp-state",{id:"programsSrcUrl",children:(0,C.jsx)("script",{type:"application/json",dangerouslySetInnerHTML:{__html:'"'.concat(Z.programs.sourceUrl,'"')}})}),(0,C.jsx)("amp-state",{id:"schoolLocationSrcUrl",children:(0,C.jsx)("script",{type:"application/json",dangerouslySetInnerHTML:{__html:'"'.concat(Z.schoolLocation.sourceUrl,'"')}})}),(0,C.jsx)("amp-state",{id:"gradYearSrcUrl",children:(0,C.jsx)("script",{type:"application/json",dangerouslySetInnerHTML:{__html:'"'.concat(Z.gradYear.sourceUrl,'"')}})}),(0,C.jsx)("amp-state",{id:"programsBarronsAMPSrcUrl",children:(0,C.jsx)("script",{type:"application/json",dangerouslySetInnerHTML:{__html:'"'.concat(Z.programsBarronsAMP.sourceUrl,'"')}})}),(0,C.jsxs)("form",{id:"leadForm",className:E.leadForm,method:"post","action-xhr":"".concat(s,"/rest/mocha/form"),encType:"application/x-www-form-urlencoded",target:"_top","custom-validation-reporting":"show-all-on-submit",on:"submit:submitting.show,fieldset.hide;submit-success:submitting.hide,submit-success.show;submit-error:submit-error.show;",children:[(0,C.jsx)("div",{id:"submitting",hidden:!0,children:(0,C.jsx)(d.Z,{textAlign:"center",mt:4,children:(0,C.jsx)(W.Z,{})})}),(0,C.jsx)("div",{id:"submit-error",hidden:!0,children:(0,C.jsx)(d.Z,{textAlign:"center",mt:4,children:(0,C.jsxs)(n.Z,{children:["Sorry, we are unable to process your submission right now. ",(0,C.jsx)("br",{})]})})}),(0,C.jsx)("div",{id:"submit-success",hidden:!0,children:f?P.push(f):(0,C.jsx)(d.Z,{textAlign:"center",mt:4,children:x||(0,C.jsx)(n.Z,{variant:"h4",children:"Thank you!"})})}),(0,C.jsxs)("fieldset",{id:"fieldset",className:E.fieldset,children:[(0,C.jsx)("input",{type:"text",id:"leadSource",name:"leadSource",tabIndex:"-1","aria-hidden":!0,className:E.hidden,defaultValue:h}),Object.keys(Z).filter((function(e){return!0===Z[e].active})).map((function(e){var r=Z[e];return(0,C.jsx)(a,{condition:r.hiddenMed||r.conditional||"countryPR"===e&&"US"===u,wrapper:function(a){return(0,C.jsx)("div",{hidden:!0,"data-amp-bind-hidden":"".concat(r.hiddenMed?"hiddenMed":"schoolName"===e?"hiddenSchool":"rolesOther"===e?"hiddenRoles":"gradYear"===e?"hiddenGradYear":null),children:a})},children:(0,C.jsxs)("div",{className:E.fieldWrapper,children:[r.label&&(0,C.jsxs)("label",{htmlFor:e,className:E.label,children:[r.required&&"* "," ",r.label]}),(0,C.jsxs)(d.Z,{className:E.inputBox,children:[("text"===r.type||"email"===r.type||"phone"===r.type)&&(0,C.jsx)(C.Fragment,{children:(0,C.jsx)("input",{type:r.type,className:E.textField,name:e,id:e,required:r.required,pattern:r.pattern,maxLength:r.maxChar,role:"text",tabIndex:"0",on:"tap:AMP.setState({updateState:true})"})}),"textarea"===r.type&&(0,C.jsx)(C.Fragment,{children:(0,C.jsx)("textarea",{type:r.type,className:E.textField,name:e,id:e,required:r.required,pattern:r.pattern,maxLength:r.maxChar,rows:"4",role:"text",tabIndex:"0",on:"tap:AMP.setState({updateState:true})"})}),"selectDropdown"===r.type&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("input",{tabIndex:"-1","aria-hidden":!0,type:"text",id:e,name:e,className:"".concat(E.hidden," ").concat(E.input),required:r.required,defaultValue:r.defaultValue,"data-amp-bind-value":"".concat(e,"Select")}),(0,C.jsx)("amp-list",{layout:"fixed-height",class:"amp-list-div",height:"50",src:"amp-state:placeholder","data-amp-bind-src":"".concat(e,"SrcUrl"),credentials:"include","single-item":!0,items:".",id:e+"select-list",children:(0,C.jsx)("template",{type:"amp-mustache",children:(0,C.jsxs)("select",{id:e+"select",tabIndex:"0",className:E.textField,disabled:!0,"data-amp-bind-disabled":"(!updateState)",on:"change:AMP.setState({".concat(e,"Select: event.value,")+("schoolLocation"===e?"schoolIdLink: '/rest/mocha/schoolId?type=' + schoolType + '&state=' + event.value,":"")+("programs"===e?"schoolType: POI.items.filter(x => x.value == event.value)[0].schoolType,\n schoolIdLink: '/rest/mocha/schoolId?type=' + POI.items.filter(x => x.value == event.value)[0].schoolType +'&state=' + schoolLocationSelect,":"")+"})",children:[(0,C.jsx)("option",{disabled:!0,selected:!0,value:null,children:r.placeholder}),"{{#items}}",(0,C.jsx)("option",{value:"{{value}}",children:"{{label}}"}),"{{/items}}"]})})})]}),"autocomplete"===r.type&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("input",{tabIndex:"-1","aria-hidden":!0,type:"text",id:e,name:e,className:E.hidden,required:r.required,"data-amp-bind-value":"".concat(e,"Select")}),(0,C.jsxs)("amp-autocomplete",{filter:"token-prefix","filter-value":"label",id:"".concat(r.type,"id"),"min-characters":"0",class:"".concat(E.autocomplete),"data-amp-bind-src":"schoolIdLink",src:r.sourceUrl,on:"change:AMP.setState({\n ".concat(e,"Select: event.value == '' ? '' : event.valueAsObject.value == null ? 1 : event.valueAsObject.value, \"hiddenSchool\": (event.valueAsObject.value == null || event.valueAsObject.value == 1) ? false : true, ").concat(e,'placeid: event.valueAsObject.value == null ? "My school is not on the list" : event.value\n })'),children:[(0,C.jsx)("input",{tabIndex:"0",type:"text",id:"".concat(e,"placeid"),"data-amp-bind-value":"".concat(e,"placeid"),className:E.textField,placeholder:r.placeholder,disabled:!0,"data-amp-bind-disabled":"(!schoolLocationSelect || (!programsSelect || programsSelect == 'undefined'))"}),(0,C.jsx)("template",{type:"amp-mustache",children:(0,C.jsx)("div",{"data-value":"{{label}}","data-json":"{{objToJson}}",children:"{{label}}"})})]})]}),"multiSelect"===r.type&&(0,C.jsx)(C.Fragment,{children:(0,C.jsx)(Y,{field:e,fObj:r,classes:E})}),"shortSelect"===r.type&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("input",{tabIndex:"-1","aria-hidden":!0,type:"text",id:e,name:e,className:E.hidden,required:r.required,"data-amp-bind-value":"".concat(e,"Select")}),(0,C.jsxs)("select",{id:e+"select",required:r.required,className:E.textField,on:"change:AMP.setState({".concat(e,"Select: event.value, ").concat("roles"===e?"hiddenRoles: ".concat("other"!=event.value,", hiddenGradYear: ").concat(!(event.value.indexOf("student")>0)):"","})"),children:[(0,C.jsx)("option",{disabled:!0,selected:!0,value:null,children:r.placeholder}),r.source.map((function(e){return(0,C.jsx)("option",{value:e.value,children:e.label},e.label)}))]})]}),"eduBackground"===e&&(0,C.jsx)("amp-selector",{class:E.radioGroup,name:e,on:"select:AMP.setState({radio: event.targetOption, hiddenMed: event.targetOption != 'Us Med', updateState: true})",children:r.source.map((function(e){return(0,C.jsx)("div",{tabIndex:"0",className:E.radio,option:e.value,children:e.label},e.label)}))}),"countryPR"===e&&(0,C.jsxs)(p.Z,{container:!0,alignItems:"center",spacing:1,children:[(0,C.jsx)(p.Z,{item:!0,className:E.switchlabel,children:"No"}),(0,C.jsx)(p.Z,{item:!0,children:(0,C.jsxs)("label",{className:E.switch,children:[(0,C.jsx)("input",{autoComplete:"off",tabIndex:"0",role:"checkbox",type:"checkbox",on:"tap:consent.toggleVisibility;change:AMP.setState({".concat(e,"Select: event.checked ? '").concat(u,"' : 'US', sendMarketingEmailChecked: event.checked ? false : true})")}),(0,C.jsx)("span",{className:E.slider})]})}),(0,C.jsx)(p.Z,{item:!0,className:E.switchlabel,children:"Yes"}),(0,C.jsx)("input",{autoComplete:"off",tabIndex:"-1","aria-hidden":!0,type:"text",id:"cPR",name:"cPR",className:E.hidden,required:r.required,defaultValue:"US","data-amp-bind-value":"".concat(e,"Select ? ").concat(e,'Select : "US" ')})]}),"sendMarketingEmail"===e&&(0,C.jsx)("div",{id:"consent",className:E.consent,hidden:!0,children:(0,C.jsxs)("p",{children:[(0,C.jsx)("input",{autoComplete:"off",type:"checkbox",tabIndex:"0",role:"checkbox",id:e,name:e,defaultChecked:!0,value:"yes","data-amp-bind-checked":"sendMarketingEmailChecked",on:"change:AMP.setState({sendMarketingEmailChecked: event.checked ? true : false})",className:E.checkbox}),r.text]})}),("under13"===e||"under16"===e||"terms"===e)&&(0,C.jsxs)("p",{children:[(0,C.jsx)("input",{type:"checkbox",tabIndex:"0",role:"checkbox",id:e,name:e,required:!0,className:E.checkbox}),r.text]})]}),(0,C.jsxs)(d.Z,{children:[(0,C.jsx)("span",{"visible-when-invalid":"valueMissing","validation-for":e,className:E.errorMessage,children:r.errorMessage}),(0,C.jsx)("span",{"visible-when-invalid":"patternMismatch","validation-for":e,className:E.errorMessage,children:r.additionalErrorMessage}),(0,C.jsx)("span",{"visible-when-invalid":"typeMismatch","validation-for":e,className:E.errorMessage,children:r.additionalErrorMessage}),"\xa0"]})]})},e)})),(0,C.jsx)(d.Z,{mt:2,className:E.disclaimers,children:b}),(0,C.jsx)(d.Z,{mt:6,className:E.submitBtnContainer,children:(0,C.jsx)(c.Z,{type:"submit",value:"Submit",variant:"contained",color:"primary",on:"tap:formSlice.scrollTo;tap:leadForm.toggleClass(class='submitError', force=true)",children:v})})]})]})]})}var X=r(46409),Q=r(68751),$=r(69135),ee=r(74619),ae=(0,i.Z)((function(e){return{root:function(a){return{background:"column-2"!==a.label&&"gray"===a.bgColor?e.palette.background.gray:e.palette.background.default}},bb:{margin:e.spacing(1)}}}));function re(e){var a=(0,$.useAmp)(),r=(0,D.Oc)(),t=r.config,o=r.country,i=r.query,h=r.cookies,g=i.ip,b=i.programT,v=i.schoolT,x=i.sbaId,y=i.clubId,f=i.campaignContent,j=i.campaignMedium,S=i.campaignName,M=i.campaignSource,A=i.campaignTerm,k=i.gclid,E=i.channelId,P=i.agent,Z=h.sbaId,N=h.clubId,w=h.campaignContent,L=h.campaignMedium,I=h.campaignName,O=h.campaignSource,q=h.campaignTerm,B=h.gclid,R=h.channelId,U=h.agent,_=t.ampFormDomain||"https://www.kaptest.com",F=t.hideState,G=t.hideStateMsg,H=t.hideCountry,V=l()(e,"data.primary.title"),Y=l()(e,"data.primary.description"),K=l()(e,"data.primary.btn_label[0].text")||"Submit",W=l()(e,"data.primary.lead_source[0].text"),re=b||l()(e,"data.primary.poi.type"),te=re&&re!==l()(e,"data.primary.business_unit")?re:l()(e,"data.primary.business_unit","GRAD"),oe=v||l()(e,"data.primary.poi.schoolType",void 0),le=l()(e,"data.primary.custom_poi",void 0),ie=l()(e,"data.primary.poi.shortName"),ne=l()(e,"data.primary.school_optional",!0),se=l()(e,"data.primary.school_hide",!1),ce=l()(e,"data.primary.grad_year_optional",!0),de=l()(e,"data.primary.grad_year_hide",!1),ue=l()(e,"data.primary.test_date_optional",!0),pe=l()(e,"data.primary.test_date_hide",!0),me=l()(e,"data.primary.success_page_url",void 0),he=x||Z||l()(e,"data.primary.sba_id",void 0),ge=y||N||l()(e,"data.primary.club_id",void 0),be="CA"===g||"EU"===g?g:(0,ee.z3)(o)?"EU":o,ve=l()(t,"theme"),xe="NO_SHOW"===l()(e,"data.primary.business_unit"),ye=l()(e,"label"),fe=ae({bgColor:l()(e,"data.primary.bg_color"),label:ye}),je=l()(e,"data.primary.hide_phone",!0),Se=l()(e,"data.primary.phone_optional",!0),Me=l()(e,"data.primary.state_province_hide",!0),Ae=l()(e,"data.primary.show_description",!1),Ce=f||w,ke=j||L,Ee=S||I,Pe=M||O,Ze=A||q,Ne=k||B,we=E||R,Le=P||U,Ie=(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(Q.Z,{render:l()(e,"data.primary.disclaimers")}),ve&&"fiu"!==ve?(0,C.jsxs)(n.Z,{gutterBottom:!0,children:["By clicking 'Submit', I agree to Kaplan's"," ",(0,C.jsxs)(s.Z,{href:"/terms-and-condition",color:"inherit",target:"_blank",children:[" ","terms and conditions"," "]})," "," and "," ",(0,C.jsxs)(s.Z,{href:"/privacy-policy",color:"inherit",target:"_blank",children:[" ","privacy policy"," "]}),"."]}):(0,T.BV)()]}),Oe=(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(Q.Z,{render:l()(e,"data.primary.msg")}),l()(e,"data.fields")&&e.data.fields.map((function(e,a){return e.btn_link&&(0,C.jsx)(c.Z,{component:X.Z,href:e.btn_link,passHref:!0,naked:!0,variant:"contained",color:e.btn_style,className:fe.bb,children:l()(e,"btn_label[0].text","Learn More")},a)}))]});return(0,C.jsx)("div",{className:"formSlice",id:"formSlice",children:(0,C.jsx)(d.Z,{py:8,className:fe.root,children:(0,C.jsxs)(u.Z,{maxWidth:"column-2"===ye?"xl":"md",children:[l()(V,"[0].text")&&"column-2"!==ye&&(0,C.jsx)(m.default,{data:{fields:[{text:V}]},zeroT:!0,zeroB:!0,label:"center"}),(0,C.jsxs)(p.Z,{container:!0,justifyContent:"center",spacing:"column-2"===ye?6:0,children:["column-2"===ye&&(0,C.jsxs)(p.Z,{item:!0,xs:11,md:6,children:[(0,C.jsx)(Q.Z,{render:V}),(0,C.jsx)(Q.Z,{render:Y})]}),(0,C.jsxs)(p.Z,{item:!0,xs:11,sm:"column-2"===ye?11:10,md:"column-2"===ye?6:7,children:[" ",a?(0,C.jsx)(J,{poiShortName:ie,schoolType:oe,cloudfrontViewerCountry:be,lead_source:W,bU:te,disclaimer:Ie,thank_you_message:Oe,btn_label:K,schoolOptional:ne,gradYearOptional:ce,testDateOptional:ue,ampFormDomain:_,noShow:xe,successPageRedirect:me,sbaId:he,clubId:ge,hideSchool:se,hideGradYear:de,hideTestDate:pe,customPOI:le,tenant:ve,hidePhone:je,stateProvinceHide:Me,phoneOptional:Se,campaignContent:Ce,campaignMedium:ke,campaignName:Ee,campaignSource:Pe,campaignTerm:Ze,gclid:Ne,channelId:we,agent:Le,showDescription:Ae,hideCountry:H,hideState:F,hideStateMsg:G}):(0,C.jsx)(z,{poiShortName:ie,schoolType:oe,cloudfrontViewerCountry:be,lead_source:W,bU:te,disclaimer:Ie,thank_you_message:Oe,btn_label:K,schoolOptional:ne,gradYearOptional:ce,testDateOptional:ue,noShow:xe,successPageRedirect:me,sbaId:he,clubId:ge,hideSchool:se,hideGradYear:de,hideTestDate:pe,customPOI:le,tenant:ve,hidePhone:je,stateProvinceHide:Me,phoneOptional:Se,campaignContent:Ce,campaignMedium:ke,campaignName:Ee,campaignSource:Pe,campaignTerm:Ze,gclid:Ne,channelId:we,agent:Le,showDescription:Ae,hideCountry:void 0!==H,hideState:F,hideStateMsg:G})]})]})]})})})}},47534:function(e,a,r){r.r(a),r.d(a,{default:function(){return v}});var t=r(99956),o=r(43832),l=r(41749),i=r(22318),n=r(41120),s=r(8920),c=(r(67294),r(68751)),d=r(27361),u=r.n(d),p=r(52084),m=r(71792),h=r(63457),g=r(85893),b=(0,n.Z)((function(e){return{root:function(a){return{background:"dark_black"===a.bgColor?e.palette.background.dark:"gray"===a.bgColor?e.palette.background.gray:"transparent","& .highlight":{color:e.palette.secondary.main}}},contrastTextColor:{color:e.palette.text.contrastText,"& *":{color:e.palette.text.contrastText},"& a":{color:e.palette.primary.main,textDecoration:"none","&:hover":{color:e.palette.text.hover,textDecoration:"none"}}},orderedlistbullet:{color:e.palette.text.tertiary,fontSize:42,lineHeight:.7,marginTop:7},col2:{backgroundColor:function(a){return"column-2-related"===a.label&&u()(e,"palette.background.gray")}}}}));function v(e){var a=e&&"SchedulerBodyGroup_text"===e.data.__typename,r=e.label?e.label:e.data&&e.data.label?e.data.label:"left",n=e.data&&e.data.fields,d=e.mini||e.minit||a?4:e.zeroT?0:8,v=e.mini||e.minib||a?4:e.zeroB?0:8,x=e.maxWidth?e.maxWidth:"left"===r||"index"===r||"center"===r&&1===n.length?"md":"xl",y=12/(r.match(/[2-3]/)||1),f=(0,s.Z)(),j=(0,h.Z)(f.breakpoints.down("sm")),S=12===y?2:"column-2-related"!==r||j?4:6,M=r.indexOf("center")>-1?"center":"left",A=u()(e,"data.primary.bg_color","white"),C="dark_black"===A,k=b({bgColor:A,label:r});return(0,g.jsx)("div",{className:"groupTextSlice",children:(0,g.jsx)(t.Z,{className:"".concat(k.root," ").concat(C&&k.contrastTextColor),children:"autogrid"===r?(0,g.jsx)(p.Z,{children:n&&n.map((function(e,a){return(0,g.jsx)("div",{children:(0,g.jsx)(c.Z,{render:e.text})},a)}))}):(0,g.jsx)(o.Z,{maxWidth:x,children:(0,g.jsx)(t.Z,{pt:d,pb:v,children:"index"===r?n&&n.map((function(e,a){return(0,g.jsxs)(l.Z,{container:!0,wrap:"nowrap",spacing:S,children:[(0,g.jsx)(l.Z,{item:!0,children:(0,g.jsx)(t.Z,{mt:1,mb:2,children:(0,g.jsx)(i.Z,{className:k.orderedlistbullet,children:a+1})})}),(0,g.jsx)(l.Z,{item:!0,xs:!0,children:(0,g.jsx)(t.Z,{mt:1,mb:2,children:(0,g.jsx)(c.Z,{render:e.text})})})]},a)})):"center"===r?(0,g.jsx)(l.Z,{container:!0,justifyContent:"center",children:n&&n.map((function(e,a){return(0,g.jsx)(l.Z,{item:!0,xs:12,sm:12,md:y,align:M,children:(0,g.jsx)(c.Z,{render:e.text})},a)}))}):(0,g.jsx)(l.Z,{container:!0,spacing:S,children:n&&n.map((function(e,a){return(0,g.jsx)(l.Z,{item:!0,xs:12,sm:12,md:y,align:M,className:1===a&&k.col2,children:(0,g.jsx)(c.Z,{render:e.text,htmlSerializer:m.y})},a)}))})})})})})}}}]);