"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2218],{67726:function(e,n,r){r.d(n,{Z:function(){return I}}),r(67294);var t,a=r(12549),i=r(4730),s=r(87103),o=r(70440),l=r(59499),c=r(50029),u=r(64687),d=r.n(u);r(35666);var m=r(87066),h=r(96827),f=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"success!",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"page.formSubmit","page.formSubmit":{name:e,type:"ajax",valid:!0,message:n,data:r}})},p=r(7013),g={mapPropsToValues:function(e){var n=e.tag,r=n.title;return{email:"",first:"",last:"",required:"",role:"",course:n.course,title:r,formName:n.formName||"ultimate_cert_guide",receive_news:!1,leadSource:e.leadSource||"blog"}},validationSchema:h.Ry().shape({email:h.Z_().trim().email("Please enter a valid email address.").required("Please enter your email address."),first:h.Z_().required("Please enter your first name."),last:h.Z_().required("Please enter your last name."),role:h.Z_().required("Please choose your role.")}),handleSubmit:(t=(0,c.Z)(d().mark(function e(n,r){var t,a,i,s,o,c,u,h,g,x,v,y,j;return d().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=r.setStatus,a=n.email,i=n.required,s=n.role,o=n.receive_news,c=n.first,u=n.last,h=n.title,g=n.course,x=n.formName,v=n.leadSource,""!==i){e.next=20;break}return t("pending"),y="study_plan_download",(j=(0,l.Z)({},y,{}))[y].plan_id=g,j[y].plan_name=h,j[y].job_title=s,(0,p.w)(y,j),e.prev=10,e.next=13,(0,m.Z)({method:"POST",url:"/api/site-gateway/v1/business/communique",headers:{"Content-Type":"applicationhttps://www.cbtnuggets.com/json"},data:{form_name:x,email:"".concat(a.trim()),optin:"".concat(o),best_describes:s,first_name:c,last_name:u,course:g,lead_source:v}});case 13:t("success"),f(x,"Success!"),e.next=20;break;case 17:e.prev=17,e.t0=e.catch(10),t("error");case 20:case"end":return e.stop()}},e,null,[[10,17]])})),function(e,n){return t.apply(this,arguments)})},x=r(19521),v=x.ZP.section.withConfig({displayName:"Container",componentId:"sc-16au7r0-0"})(["&&{border-top:"," solid ",";border-bottom:"," solid ",";padding:",";img{height:58px;width:46px;}p.agreement-text{margin-bottom:0;color:",";}.formError{color:",";margin:0;font-size:",";}label{font-family:",";input,select{max-width:43rem;width:100%;}}.receive_news{max-width:3rem;}}"],function(e){return e.showDividers?"0.1rem":"0"},function(e){return e.theme.greyBorder},function(e){return e.showDividers?"0.1rem":"0"},function(e){return e.theme.greyBorder},function(e){return e.showDividers?"2.35rem 0":"0"},function(e){return e.theme.colors.tertiary},function(e){return e.theme.red},function(e){return e.theme.smallFont},function(e){return e.theme.fontFamily}),y=x.ZP.div.withConfig({displayName:"InputContainer",componentId:"sc-16au7r0-1"})(["padding:1rem 0;display:",";"],function(e){return e.honeypot?"none":"block"}),j=x.ZP.div.withConfig({displayName:"InputContainerFlex",componentId:"sc-16au7r0-2"})(["padding:2rem 0;display:flex;align-items:center;"]),b=x.ZP.div.withConfig({displayName:"SuccessContainer",componentId:"sc-16au7r0-3"})(["text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;overflow:hidden;"]),w=x.ZP.p.withConfig({displayName:"SuccessHeader",componentId:"sc-16au7r0-4"})(["text-transform:uppercase;letter-spacing:0.13rem;text-shadow:0 0.2rem 0.2rem 0 ",";margin-bottom:0;font-size:",";"],function(e){return e.theme.primary},function(e){return e.theme.smallFont}),C=x.ZP.p.withConfig({displayName:"SuccessMessage",componentId:"sc-16au7r0-5"})(["font-size:2.4rem;font-weight:600;"]),S=r(85893),_=["tag","submitButtonText","leadSource"],N=(0,s.j0)(g)(function(e){var n=e.tag,r=e.submitButtonText,t=e.leadSource,a=(0,i.Z)(e,_),s=n.title,l=n.description,c=n.course,u=n.formName,d=n.successMessage;return"pending"===a.status?(0,S.jsx)(o.LoadingBubbles,{}):"error"===a.status?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)("p",{children:"Uh oh!"}),(0,S.jsx)("p",{className:"lead",children:"There was an error submitting your email, please try again."})]}):"success"===a.status?(0,S.jsxs)(b,{children:[(0,S.jsx)("svg",{height:"35",viewBox:"0 0 35 35",width:"35",xmlns:"http://www.w3.org/2000/svg",children:(0,S.jsxs)("g",{fill:"none",fillRule:"evenodd",children:[(0,S.jsx)("circle",{cx:"17.5",cy:"17.5",fill:"#008558",r:"17.5"}),(0,S.jsxs)("g",{transform:"translate(5 6)",children:[(0,S.jsx)("path",{d:"m0 0h24v24h-24z"}),(0,S.jsx)("path",{d:"m10.9565217 18-6.4565217-6.4209275 2.02304348-2.01189057 4.43347822 4.39476817 8.0204348-7.9619501 2.0230435 2.01189061z",fill:"#fff"})]})]})}),(0,S.jsx)(w,{children:"Success!"}),d&&(0,S.jsx)(C,{className:"lead",children:d}),(0,S.jsx)(C,{className:"lead",children:"Check your email."})]}):(0,S.jsxs)("form",{onSubmit:a.handleSubmit,children:[s&&(0,S.jsx)("h2",{children:s}),l&&(0,S.jsx)("p",{className:"description",children:l}),(0,S.jsx)("input",{name:"course",type:"hidden",value:c}),(0,S.jsx)("input",{name:"formName",type:"hidden",value:u}),(0,S.jsx)("input",{name:"leadSource",type:"hidden",value:t}),(0,S.jsxs)(y,{children:[(0,S.jsx)(o.Form.Input,{label:"First Name",id:"first",className:"first",name:"first",type:"text",onChange:a.handleChange,onBlur:a.handleBlur,maxLength:50,crossOrigin:""}),a.errors.first&&a.touched.first&&(0,S.jsxs)("span",{className:"formError",children:[a.errors.first,(0,S.jsx)("br",{})]})]}),(0,S.jsx)(y,{honeypot:!0,children:(0,S.jsx)(o.Form.Input,{style:{display:"none"},label:"Required",id:"required",className:"required",name:"required",type:"text",onChange:a.handleChange,onBlur:a.handleBlur,crossOrigin:""})}),(0,S.jsxs)(y,{children:[(0,S.jsx)(o.Form.Input,{label:"Last Name",id:"last",className:"last",name:"last",type:"text",onChange:a.handleChange,onBlur:a.handleBlur,maxLength:50,crossOrigin:""}),a.errors.last&&a.touched.last&&(0,S.jsxs)("span",{className:"formError",children:[a.errors.last,(0,S.jsx)("br",{})]})]}),(0,S.jsxs)(y,{children:[(0,S.jsx)(o.Form.Input,{label:"Email",id:"email",className:"email",name:"email",type:"text",onChange:function(e){e.target.value=e.target.value.trim(),a.handleChange(e)},onBlur:a.handleBlur,maxLength:50,crossOrigin:""}),a.errors.email&&a.touched.email&&(0,S.jsxs)("span",{className:"formError",children:[a.errors.email,(0,S.jsx)("br",{})]})]}),(0,S.jsx)(y,{children:(0,S.jsxs)(o.Form.Select.Basic,{label:"What is your job role?",id:"role",className:"role",name:"role",onChange:a.handleChange,onBlur:a.handleBlur,children:[(0,S.jsx)("option",{value:"",children:"Select..."}),(0,S.jsx)("option",{value:"I'm an IT pro looking to sharpen my skills or earn a certification",children:"I'm an IT pro looking to sharpen my skills or earn a certification"}),(0,S.jsx)("option",{value:"I lead an IT team and am looking for training solutions",children:"I lead an IT team and am looking for training solutions"}),(0,S.jsx)("option",{value:"I'm not an IT pro, but interested in entering the field",children:"I'm not an IT pro, but interested in entering the field"}),(0,S.jsx)("option",{value:"Other",children:"Other"})]})}),a.errors.role&&a.touched.role&&(0,S.jsxs)("span",{className:"formError",children:[a.errors.role,(0,S.jsx)("br",{})]}),(0,S.jsxs)(j,{children:[(0,S.jsx)(o.Form.Checkbox,{id:"receive_news",name:"receive_news",onChange:a.handleChange,onBlur:a.handleBlur,crossOrigin:""}),(0,S.jsx)(o.StyledLabel.Right,{htmlFor:"receive_news",children:"Send me CBT Nuggets IT training news and resources. (optional)"})]}),(0,S.jsx)(o.ButtonBrand.Primary,{className:"logged-in",children:void 0===r?"Submit":r}),"CCNATraining"===n.course?(0,S.jsxs)("p",{className:"description agreement-text",children:["By submitting this form you agree to the ",(0,S.jsx)("a",{href:"/assets/pdf/CCNA-Coming-Soon-Social-Media-Contest-Rules.pdf",children:"contest rules"})," and"," ",(0,S.jsx)("a",{href:"/privacy",children:"privacy policy"})]}):(0,S.jsxs)("p",{className:"description agreement-text",children:["By submitting this form you agree that you have read, understood, and are able to consent to our ",(0,S.jsx)("a",{href:"/privacy",children:"privacy policy"}),"."]})]})}),I=function(e){var n=e.tag,r=e.submitButtonText,t=e.showDividers,i=e.leadSource,s="CertGuideDownload"===n.type;return(0,S.jsxs)(v,{showDividers:void 0===t||t,children:[s?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(a.Z,{src:"/assets/_next/static/0c249816739af145bb8a64634bfe464b.png",alt:"Download"}),(0,S.jsx)("p",{children:"Download"})]}):null,(0,S.jsx)(N,{tag:n,submitButtonText:r,leadSource:void 0===i?"blog":i})]})}},28874:function(e,n,r){r.d(n,{bV:function(){return t}});var t=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=window;r&&e&&setTimeout(function(){r._klOnsite=r._klOnsite||[],r._klOnsite.push(["openForm",e])},n)}},48089:function(e,n,r){r.d(n,{Z:function(){return d}});var t=r(67294),a=r(19521),i=r(28874),s=r(7013),o=r(6693),l=r(9714),c=r(85893),u=a.ZP.div.withConfig({displayName:"FormKlaviyoFlyoutContainer",componentId:"sc-92e138-0"})(["[aria-label='Close dialog']{display:",";}"],function(e){return e.$hideCloseButton?"none":"block"}),d=function(e){var n=e.formKlaviyoId,r=e.gaEventNames,a=(0,t.useRef)(null),d=(0,t.useState)(!1),m=d[0],h=d[1],f=(0,t.useState)(!1),p=f[0],g=f[1];return((0,t.useEffect)(function(){h((0,l.gs)("marketing"));var e=function(e){h(!0===e.detail.marketing)};return window.addEventListener("cbt_consent_update",e),function(){window.removeEventListener("cbt_consent_update",e)}},[]),(0,t.useEffect)(function(){if(m&&!p&&!(!a.current||null!==(e=a.current)&&void 0!==e&&e.hasChildNodes())){var e;if(document.querySelector('script[src*="klaviyo.js"]'))g(!0),(0,i.bV)(n),o();else{var t=document.createElement("script");t.defer=!0,t.src="https://static.klaviyo.com/onsitehttps://www.cbtnuggets.com/js/klaviyo.js?company_id=UzuaHr",document.head.appendChild(t),t.onload=function(){g(!0),(0,i.bV)(n),o()}}}function o(){var e=setInterval(function(){var t=document.querySelector('[data-testid="FLYOUT"]');if(t&&a.current){if(t.style.animation="none",t.style.transition="none",a.current.appendChild(t),!(null!=r&&r.length)){clearInterval(e);return}var i=document.querySelector('[data-testid="klaviyo-form-'.concat(n,'"]')),o=null==i?void 0:i.querySelectorAll("button.needsclick"),l=null==o?void 0:o.item(o.length-1);l&&l.addEventListener("click",function(){var e=null==i?void 0:i.querySelectorAll('[role="alert"]');e&&0!==e.length||r.forEach(function(e){(0,s.w)(e)})}),clearInterval(e);return}},100)}},[n,r,m,p]),n&&m)?(0,c.jsx)(u,{ref:a,className:"klaviyo-form-".concat(n),$hideCloseButton:!!(null==r?void 0:r.length)||o.hv.includes(n)}):null}},6693:function(e,n,r){r.d(n,{KP:function(){return l},hv:function(){return s},ij:function(){return i},y$:function(){return o}}),r(83454).env.REVALIDATION_IN_SECONDS;var t,a,i=27,s=["SnwkFL","Sec5NV","SU7QtQ"],o=((t={}).UTM_FIRST="utm_first",t.UTM_LAST="utm_last",t.FIRST_PAGE_VIEW="first_page",t.REFERRER_FIRST="referrer",t),l=((a={}).LEAD="lead",a.CASE="case",a)}}]);