"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1642],{39412:function(e,n,t){t.r(n),t.d(n,{default:function(){return R}});var r=t(59499),i=t(50029),a=t(64687),o=t.n(a),l=t(67294),s=t(87066),c=t(87103),u=t(96827),d=t(53964),m=t(53418),p=t(19521),h=(0,p.iv)(["&:after{content:'*';vertical-align:middle;margin-left:0.3rem;color:",";}"],function(e){return e.theme.colors.blue}),g=(0,p.ZP)(c.l0).withConfig({displayName:"FormLayout",componentId:"sc-kzoyx-0"})(["display:grid;grid-gap:2rem 2rem;text-align:left;grid-template-columns:1fr;width:100%;margin:2rem auto;@media only screen and (max-width:","){padding:0 2rem;}@media only screen and (max-width:","){padding:0 0;}"],function(e){return e.theme.breakpoints.desktop960},function(e){return e.theme.breakpoints.smtablet}),f=p.ZP.div.withConfig({displayName:"NotificationBox",componentId:"sc-kzoyx-1"})(["margin-top:3rem;text-align:left;"]),x=p.ZP.div.withConfig({displayName:"InputContainer",componentId:"sc-kzoyx-2"})(["label{text-align:left;font-size:",";",";}input,select{width:100%;padding-bottom:1rem;&:focus{border:1px solid #0f62fa;}}input[type='checkbox'],input[type='radio']{margin-right:1.5rem;width:auto;}"],function(e){return e.theme.fonts.textSmall},function(e){return e.required&&h}),y=p.ZP.label.withConfig({displayName:"OptInContainer",componentId:"sc-kzoyx-3"})(["display:flex;align-items:center;font-size:",";input[type='checkbox']{margin-right:1rem;min-width:3rem;}"],function(e){return e.theme.fonts.textSmall}),j=p.ZP.div.withConfig({displayName:"EmployeeCountContainer",componentId:"sc-kzoyx-4"})(["display:flex;flex-direction:column;justify-content:center;align-items:center;gap:1rem;",";"],function(e){return e.required&&"\n p {\n ".concat(h,";\n } \n ")}),b=p.ZP.div.withConfig({displayName:"EmployeeCountOptions",componentId:"sc-kzoyx-5"})(["display:grid;grid-template-columns:repeat(2,1fr);gap:1.5rem 2rem;margin:0 auto;@media only screen and (max-width:","){max-width:100%;}@media only screen and (max-width:","){width:100%;grid-template-columns:1fr;gap:1rem;}"],function(e){return e.theme.breakpoints.desktop960},function(e){return e.theme.breakpoints.smphone}),v=p.ZP.div.withConfig({displayName:"EmployeeCountOption",componentId:"sc-kzoyx-6"})(["display:flex;align-items:center;min-width:10rem;input[type='radio']{margin-right:1rem;}label{white-space:nowrap;}"]),C=p.ZP.div.withConfig({displayName:"SubmitContainer",componentId:"sc-kzoyx-7"})(["display:flex;flex-direction:column;justify-content:center;align-items:center;margin:0 auto 0 auto;max-width:36rem;p{font-size:",";text-align:center;margin:0 auto 2rem auto;}"],function(e){return e.theme.fonts.textSmall}),k=p.ZP.span.withConfig({displayName:"ErrorMessage",componentId:"sc-kzoyx-8"})(["display:inline-block;color:",";font-size:",";padding-top:1rem;"],function(e){return e.theme.colors.red},function(e){return e.theme.fonts.textSmall}),N=p.ZP.div.withConfig({displayName:"PhoneExtensionContainer",componentId:"sc-kzoyx-9"})(["display:flex;.mod-phone{flex:6.3;}.mod-extension{padding-left:1.2rem;flex:4;}"]),w=t(70440),q=t(7013),O=t(63570),P=t(67619),_=t(41011),Z=t(96469),B=t(6693),I=t(85893);function S(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function F(e){for(var n=1;n;:[\]]{1,50}$/.test(e)}).required("Please enter your first name."),lastName:u.Z_().test("is-special-character","Please enter a valid name",function(e){return/^[\w'\-,.][^0-9_!¡?÷?¿/\\+=@#$%ˆ&*(){}|~<>;:[\]]{1,50}$/.test(e)}).required("Please enter your last name."),title:u.Z_().required("Please select a title."),email:u.Z_().email("Please enter a valid email address.").required("Please enter your email address."),phone:u.Z_().test("is-number-phone","The phone number is not valid. +1 (123)456-7890",function(e){return/^[-+() 0-9]+$/.test(e)}).required("Please enter your phone number."),company:u.Z_().required("Please enter your company name."),country:u.Z_().required("Please select your country."),quantity:u.Z_().required("Please select an option.")}),R=function(e){var n,t=e.formTitle,a=e.pageLocation,u=e.formName,p=e.submitButtonLarge,h=e.dataAt,S=(0,l.useState)("inital"),R=S[0],T=S[1],D=(0,l.useRef)(null),A=(0,l.useRef)(null),M=(0,l.useRef)(null),V=(0,l.useRef)(null),$=(0,l.useRef)(null),H=(0,l.useRef)(null),J=(0,l.useRef)(null),K=(0,l.useRef)(null),U=(0,l.useState)(),W=U[0],G=U[1];return"complete"===R?null:"pending"===R?(0,I.jsx)(f,{children:(0,I.jsx)(w.LoadingBubbles,{})}):"success"===R?(0,I.jsx)(f,{children:(0,I.jsxs)(w.Notice.Success,{visible:!0,onClose:function(){return T("inital")},children:[(0,I.jsxs)(w.Notice.Body,{children:[(0,I.jsx)("p",{children:(0,I.jsx)("strong",{children:"Thank you for contacting us."})}),(0,I.jsx)("p",{children:"A member of our team will get back to you as soon as possible."})]}),(0,I.jsx)(w.Notice.CloseButton,{onClick:function(){return T("complete")}})]})}):"error"===R?(0,I.jsx)(f,{children:(0,I.jsxs)(w.Notice.Error,{visible:!0,onClose:function(){return T("inital")},children:[(0,I.jsx)(w.Notice.Body,{children:(0,I.jsxs)("p",{children:[(0,I.jsx)("strong",{children:"There was an error submitting the form"}),", please refresh the page to try again."]})}),(0,I.jsx)(w.Notice.CloseButton,{onClick:function(){return T("initial")}})]})}):(0,I.jsx)(c.J9,{initialValues:{firstName:"",lastName:"",email:"",title:"",company:"",country:"United States",phone:"",quantity:"",department:"sales",gatrackid:"",gaclientid:"",gacampaign:"",gamedium:"",gasource:"",gauserid:"",optin:!1,formName:"",ext:""},validationSchema:L,onSubmit:(n=(0,i.Z)(o().mark(function e(n){var i,l,c,d,m,p,h,g,f,x,y,j,b,v,C,k,N,w,O,I;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(l=n.company,c=n.email,d=n.firstName,m=n.lastName,p=n.phone,h=n.country,g=n.quantity,f=n.title,x=n.gaclientid,y=n.gauserid,j=n.optin,b=n.ext,T("pending"),!(W||(null==b?void 0:b.length)>20)){e.next=4;break}return e.abrupt("return",T("success"));case 4:return e.next=6,(0,Z.W)();case 6:return v=e.sent,e.prev=7,e.next=10,s.Z.post("/api/crm/inbound-lead",{email:c,firstName:d,lastName:m,phone:p,country:h,jobTitle:f,companyName:l,source:(null==v?void 0:v.gasource)||u||"contact_sales_form",firstMedium:(null==v?void 0:v.gamedium)||"",firstCampaign:(null==v?void 0:v.gacampaign)||"",firstAdClickId:(null==v?void 0:v.gclid)||"",context:{type:B.KP.LEAD,eventTitle:null!=u?u:"contact_sales_form",details:"Number of Employees: ".concat(g),referrer:(null==v?void 0:v.referrer)||document.referrer}});case 10:T("success"),e.next=18;break;case 13:return e.prev=13,e.t0=e.catch(7),console.error("Error creating inbound lead",e.t0),T("error"),e.abrupt("return");case 18:if(window.dataLayer.push({event:"formSubmission",enhanced_conversion_data:{email:"".concat(c.trim())}}),C="contact_sales_form","enterprise-lander"===a&&(C="enterprise_contact_form"),"government-lander"===a&&(C="government_contact_form"),i={},(0,r.Z)(i,C,{}),(0,r.Z)(i,"membership",{}),k=i,("enterprise-lander"===a||"government-lander"===a)&&(k[C].call_to_action=t),"contact_sales_form"!==C){e.next=40;break}return N=(0,_.i)(),e.next=28,s.Z.post("/api/request-ip");case 28:return w=e.sent.data,e.next=32,(0,P.U)({email:c});case 32:O=e.sent.hashedEmail,k.membership=F(F({},N),{},{email:O,ipaddress:w}),k[C].phone=p,k[C].email=O,k[C].first_name=d,k[C].last_name=m,k[C].country=h;case 40:if(k[C].job_title=f,k[C].company=l,k[C].number_of_employees=g,(0,q.w)(C,k),j){e.next=46;break}return e.abrupt("return");case 46:return e.prev=46,e.next=49,s.Z.post("/api/klaviyo/create-profile",{email:c,firstName:d,lastName:m,hasAgreedToNewsOptIn:!0,metadata:F(F(F(F(F({source:"contact_sales_form",referrer:null!==(I=null==v?void 0:v.referrer)&&void 0!==I?I:document.referrer},v.gacampaign&&{campaignIds:v.gacampaign}),x&&{clientId:x}),v.gamedium&&{medium:v.gamedium}),y&&{userId:y}),v.gclid&&{trackId:v.gclid})},{headers:{"Content-Type":"applicationhttps://www.cbtnuggets.com/json","klaviyo-profile-key":"c2985f7b-09db-4d47-8e05-70e23e32d662"}});case 49:e.next=54;break;case 51:e.prev=51,e.t1=e.catch(46),console.error("Error creating Klaviyo profile:",e.t1);case 54:case"end":return e.stop()}},e,null,[[7,13],[46,51]])})),function(e){return n.apply(this,arguments)}),children:function(e){var n=e.errors,t=e.touched,r=e.handleBlur,i=e.values,a=e.handleChange,o=e.setFieldValue,l=e.isSubmitting,s=function(){if(null!==M.current&&null!==V.current&&null!==$.current&&null!==H.current&&null!==K.current&&null!==J.current){var e="undefined"!==M.current.value?M.current.value:null,n="undefined"!==V.current.value?V.current.value:null,t="undefined"!==$.current.value?$.current.value:null,r="undefined"!==H.current.value?H.current.value:null,i="undefined"!==K.current.value?K.current.value:null,a="undefined"!==J.current.value?J.current.value:null;o("gaclientid",e),o("gacampaign",n),o("gamedium",t),o("gasource",r),o("gauserid",i),o("gatrackid",a)}},c=function(e,n){o(e,n.target.checked),s()};return(0,I.jsxs)(g,{children:[(0,I.jsx)("input",{type:"hidden",name:"gaCid",id:"gaCid",ref:D}),(0,I.jsx)("input",{type:"hidden",name:"gaHid",id:"gaHid",ref:A}),(0,I.jsx)("input",{type:"hidden",name:"gaclientid",id:"gaclientid",ref:M}),(0,I.jsx)("input",{type:"hidden",name:"gacampaign",id:"gacampaign",ref:V}),(0,I.jsx)("input",{type:"hidden",name:"gamedium",id:"gamedium",ref:$}),(0,I.jsx)("input",{type:"hidden",name:"gasource",id:"gasource",ref:H}),(0,I.jsx)("input",{type:"hidden",name:"gatrackid",id:"gatrackid",ref:J}),(0,I.jsx)("input",{type:"hidden",name:"gauserid",id:"gauserid",ref:K}),(0,I.jsxs)(x,{required:!0,children:[(0,I.jsx)(w.Form.Input,{label:"First name",id:"firstName",name:"firstName",type:"text",maxLength:50,onBlur:r,value:i.firstName,onChange:a,crossOrigin:""}),t.firstName&&n.firstName&&(0,I.jsxs)(k,{children:[" ",n.firstName," "]})]}),(0,I.jsxs)(x,{required:!0,children:[(0,I.jsx)(w.Form.Input,{label:"Last name",id:"lastName",name:"lastName",type:"text",maxLength:50,onBlur:r,value:i.lastName,onChange:a,crossOrigin:""}),t.lastName&&n.lastName&&(0,I.jsxs)(k,{children:[" ",n.lastName," "]})]}),(0,I.jsxs)(x,{required:!0,children:[(0,I.jsxs)(w.Form.Select.Basic,{"aria-label":"Select Title",id:"title",name:"title",label:"Title",defaultValue:i.title,onChange:a,onBlur:r,children:[(0,I.jsx)("option",{value:"",children:"Choose..."}),(0,I.jsx)("option",{value:"administrator",children:"Administrator"}),(0,I.jsx)("option",{value:"analyst",children:"Analyst"}),(0,I.jsx)("option",{value:"architect",children:"Architect"}),(0,I.jsx)("option",{value:"assistantDirector",children:"Assistant Director"}),(0,I.jsx)("option",{value:"assistantManager",children:"Assistant Manager"}),(0,I.jsx)("option",{value:"assistantVP",children:"Assistant VP"}),(0,I.jsx)("option",{value:"cio",children:"CIO (or other C-level)"}),(0,I.jsx)("option",{value:"coordinator",children:"Coordinator"}),(0,I.jsx)("option",{value:"director",children:"Director"}),(0,I.jsx)("option",{value:"engineer",children:"Engineer"}),(0,I.jsx)("option",{value:"manager",children:"Manager"}),(0,I.jsx)("option",{value:"projectManager",children:"Project Manager"}),(0,I.jsx)("option",{value:"specialist",children:"Specialist"}),(0,I.jsx)("option",{value:"technician",children:"Tech/Technician"}),(0,I.jsx)("option",{value:"vp",children:"VP"})]}),t.title&&n.title&&(0,I.jsxs)(k,{children:[" ",n.title," "]})]}),(0,I.jsxs)(x,{required:!0,children:[(0,I.jsx)(w.Form.Input,{label:"Work Email",name:"email",type:"email",maxLength:50,onChange:a,onBlur:r,value:i.email,crossOrigin:""}),t.email&&n.email&&(0,I.jsxs)(k,{children:[" ",n.email," "]})]}),(0,I.jsxs)(x,{required:!0,children:[(0,I.jsx)(w.Form.Input,{label:"Company",name:"company",type:"text",maxLength:50,onChange:a,onBlur:r,value:i.company,crossOrigin:""}),t.company&&n.company&&(0,I.jsxs)(k,{children:[" ",n.company," "]})]}),(0,I.jsxs)(N,{children:[(0,I.jsxs)(x,{required:!0,className:"mod-phone",children:[(0,I.jsx)(w.Form.Input,{label:"Phone",name:"phone",type:"phone",maxLength:70,onChange:a,onBlur:r,value:i.phone,crossOrigin:""}),t.phone&&n.phone&&(0,I.jsxs)(k,{children:[" ",n.phone," "]})]}),(0,I.jsx)(x,{className:"mod-extension",children:(0,I.jsx)(w.Form.Input,{label:"Ext. (opt)",name:"ext",type:"text",maxLength:30,onChange:a,onBlur:r,value:i.ext,crossOrigin:""})})]}),(0,I.jsxs)(x,{required:!0,children:[(0,I.jsx)(w.Form.Select.Basic,{label:"Country",name:"country",onChange:a,onBlur:r,value:i.country,children:d.J.map(function(e){return(0,I.jsx)("option",{value:e,children:e},e)})}),t.country&&n.country&&(0,I.jsxs)(k,{children:[" ",n.country," "]})]}),(0,I.jsxs)(y,{children:[(0,I.jsx)(w.Form.Checkbox,{name:"optIn",id:"optIn",onChange:function(e){return c("optin",e)},"aria-label":"Opt into CBT Nuggets news and resources emailer.",crossOrigin:""}),"Send me CBT Nuggets IT training news and resources. (optional)"]}),(0,I.jsxs)(j,{required:!0,children:[(0,I.jsx)("p",{className:"employee-count",children:"How many employees would you like to train?"}),(0,I.jsxs)(b,{children:[(0,I.jsxs)(v,{children:[(0,I.jsx)(w.Form.Radio,{"aria-label":"Company size is between 2-4",name:"quantity",id:"quantity",value:"2-4",checked:"2-4"===i.quantity,onChange:a,onBlur:r,crossOrigin:""}),(0,I.jsx)(w.StyledLabel.Right,{htmlFor:"quantity",changeCursorOnDisabled:!0,children:"2-4"})]}),(0,I.jsxs)(v,{children:[(0,I.jsx)(w.Form.Radio,{"aria-label":"Company size is between 5-20",name:"quantity",id:"quantity",value:z,checked:z===i.quantity,onChange:a,onBlur:r,crossOrigin:""}),(0,I.jsx)(w.StyledLabel.Right,{htmlFor:"quantity",changeCursorOnDisabled:!0,children:z})]}),(0,I.jsxs)(v,{children:[(0,I.jsx)(w.Form.Radio,{"aria-label":"Company size is 20+",name:"quantity",id:"quantity",value:"20+",checked:"20+"===i.quantity,onChange:a,onBlur:r,crossOrigin:""}),(0,I.jsx)(w.StyledLabel.Right,{htmlFor:"quantity",changeCursorOnDisabled:!0,children:"20+"})]}),(0,I.jsxs)(v,{children:[(0,I.jsx)(w.Form.Radio,{"aria-label":"Company size is 100+",name:"quantity",id:"quantity",value:E,checked:E===i.quantity,onChange:a,onBlur:r,crossOrigin:""}),(0,I.jsx)(w.StyledLabel.Right,{htmlFor:"quantity",changeCursorOnDisabled:!0,children:E})]})]}),t.quantity&&n.quantity&&(0,I.jsxs)(k,{children:[" ",n.quantity," "]})]}),(0,I.jsx)(O.R5,{tabIndex:-1,onChange:function(e){return G(e.target.value)}}),(0,I.jsxs)(C,{children:[(0,I.jsxs)("p",{children:["By submitting this form you agree that you have read, understood, and are able to consent to our"," ",(0,I.jsx)(m.l7,{href:"/privacy",children:"privacy policy"}),"."]}),p?(0,I.jsx)(w.ButtonBrand.PrimaryLarge,{"aria-label":"Submit form",type:"submit","data-at":null!=h?h:"signup-form-submit",disabled:l,children:"Submit"}):(0,I.jsx)(w.ButtonBrand.Primary,{"aria-label":"Submit form",type:"submit","data-at":null!=h?h:"signup-form-submit",disabled:l,children:"Submit"})]})]})}})}},83618:function(e,n,t){t.d(n,{Z:function(){return l}});var r=t(14666),i=t(28811),a=t(2937),o=t(14882);function l(e){return(0,r.Z)(e)||(0,i.Z)(e)||(0,a.Z)(e)||(0,o.Z)()}}}]);