(window.webpackJsonp=window.webpackJsonp||[]).push([[60],{2111:function(e,t){e.exports={functional:!0,render(e,t){const{_c:r,_v:n,data:data,children:o=[]}=t,{class:c,staticClass:l,style:style,staticStyle:d,attrs:m={},...v}=data;return r("svg",{class:[c,l],style:[style,d],attrs:Object.assign({width:"30",height:"26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m),...v},o.concat([r("path",{attrs:{d:"M12.389 5.561c1.148-2.032 4.076-2.032 5.224 0l8.415 14.9c1.13 2-.315 4.476-2.612 4.476H6.586c-2.298 0-3.743-2.476-2.613-4.476l8.416-14.9z",fill:"#ABAFB5"}}),r("path",{attrs:{d:"M15.863 11.007h-1.72l.135 6.483h1.448l.136-6.483zM15 20.192c.57 0 1.045-.396 1.045-.889 0-.484-.475-.884-1.045-.884-.575 0-1.046.4-1.046.884 0 .493.47.889 1.046.889z",fill:"#fff"}})]))}}},4225:function(e,t){e.exports={functional:!0,render(e,t){const{_c:r,_v:n,data:data,children:o=[]}=t,{class:c,staticClass:l,style:style,staticStyle:d,attrs:m={},...v}=data;return r("svg",{class:[c,l],style:[style,d],attrs:Object.assign({width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m),...v},o.concat([r("path",{attrs:{d:"M18.857 11.935l2.139 3.704M14.454 13.993l.667 3.783M9.537 13.992l-.667 3.783M5.138 11.932L2.99 15.653M3 9.832c1.576 1.951 4.466 4.418 9 4.418s7.424-2.467 9-4.418",stroke:"#858A93","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}})]))}}},4226:function(e,t,r){e.exports={}},4227:function(e,t,r){e.exports={}},4228:function(e,t,r){e.exports={}},4229:function(e,t,r){e.exports={}},4230:function(e,t,r){e.exports={}},4231:function(e,t,r){e.exports={}},4235:function(e,t,r){var map={"./icon-payment-card-american-express.svg":3604,"./icon-payment-card-discover.svg":4236,"./icon-payment-card-mastercard.svg":3605,"./icon-payment-card-paypal.svg":3625,"./icon-payment-card-visa.svg":3626};function n(e){var t=o(e);return r(t)}function o(e){if(!r.o(map,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return map[e]}n.keys=function(){return Object.keys(map)},n.resolve=o,e.exports=n,n.id=4235},4237:function(e,t,r){e.exports={}},4238:function(e,t,r){e.exports={}},4239:function(e,t,r){e.exports={}},4242:function(e,t,r){e.exports={}},4243:function(e,t,r){e.exports={}},4244:function(e,t,r){e.exports={}},4504:function(e,t,r){"use strict";r(4226)},4505:function(e,t,r){"use strict";r(4227)},4506:function(e,t,r){"use strict";r(4228)},4507:function(e,t,r){"use strict";r(4229)},4508:function(e,t,r){"use strict";r(4230)},4509:function(e,t,r){"use strict";r(4231)},4510:function(e,t,r){"use strict";r(4237)},4511:function(e,t,r){"use strict";r(4238)},4512:function(e,t,r){"use strict";r(4239)},4513:function(e,t,r){"use strict";r(4242)},4514:function(e,t,r){"use strict";r(4243)},4515:function(e,t,r){"use strict";r(4244)},4951:function(e,t,r){"use strict";r.r(t);var n=r(4),o=r(3),c=(r(17),r(24),r(11),r(7),r(9),r(14),r(15),r(483)),l=(r(20),r(56),r(94)),d=r(1318),m=(r(44),r(28),r(36),r(491)),v=(r(179),r(532)),f=r.n(v),h=r(4225),y=r.n(h),_={components:{IconEye:f.a,IconEyeClosed:y.a},props:{name:{type:String,required:!1,default:"password"},invalid:{type:String,required:!1,default:""}},data:function(){return{password:"",strength:"",strengthText:"",visiblePassword:!1}},methods:{calculateStrength:function(){this.password.length<6&&(this.strength="short",this.strengthText="Too short"),this.password.length>=6&&(this.password.match(/[a-z]/)||this.password.match(/\d+/)||this.password.match(/.[!,@,#,$,%,^,&,*,?,_,~,-,(,)]/))&&(this.strength="weak",this.strengthText="Weak password"),this.password.length>=6&&(this.password.match(/[a-z]/)&&this.password.match(/\d+/)||this.password.match(/\d+/)&&this.password.match(/.[!,@,#,$,%,^,&,*,?,_,~,-,(,)]/)||this.password.match(/[a-z]/)&&this.password.match(/.[!,@,#,$,%,^,&,*,?,_,~,-,(,)]/))&&(this.strength="good",this.strengthText="Good password"),this.password.length>=6&&this.password.match(/[a-z]/)&&this.password.match(/\d+/)&&this.password.match(/.[!,@,#,$,%,^,&,*,?,_,~,-,(,)]/)&&(this.strength="strong",this.strengthText="Strong password"),this.strength&&this.$emit("strength",{strength:this.strength,text:this.strengthText})}}},C=(r(4504),r(73)),k=Object(C.a)(_,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"input-group password-input",class:{"invalid-field":e.invalid||e.strengthText}},[t("label",{staticClass:"required",attrs:{for:e.name}},[e._v("Password")]),e._v(" "),"checkbox"==(e.visiblePassword?"text":"password")?t("input",e._b({directives:[{name:"model",rawName:"v-model",value:e.password,expression:"password"}],class:{"invalid-field":e.invalid},attrs:{id:e.name,name:e.name,autocomplete:"current-password",placeholder:"Password",type:"checkbox"},domProps:{checked:Array.isArray(e.password)?e._i(e.password,null)>-1:e.password},on:{input:function(p){return e.$emit("input",p.target.value)},keyup:e.calculateStrength,change:function(t){var r=e.password,n=t.target,o=!!n.checked;if(Array.isArray(r)){var c=e._i(r,null);n.checked?c<0&&(e.password=r.concat([null])):c>-1&&(e.password=r.slice(0,c).concat(r.slice(c+1)))}else e.password=o}}},"input",e.$attrs,!1)):"radio"==(e.visiblePassword?"text":"password")?t("input",e._b({directives:[{name:"model",rawName:"v-model",value:e.password,expression:"password"}],class:{"invalid-field":e.invalid},attrs:{id:e.name,name:e.name,autocomplete:"current-password",placeholder:"Password",type:"radio"},domProps:{checked:e._q(e.password,null)},on:{input:function(p){return e.$emit("input",p.target.value)},keyup:e.calculateStrength,change:function(t){e.password=null}}},"input",e.$attrs,!1)):t("input",e._b({directives:[{name:"model",rawName:"v-model",value:e.password,expression:"password"}],class:{"invalid-field":e.invalid},attrs:{id:e.name,name:e.name,autocomplete:"current-password",placeholder:"Password",type:e.visiblePassword?"text":"password"},domProps:{value:e.password},on:{input:[function(t){t.target.composing||(e.password=t.target.value)},function(p){return e.$emit("input",p.target.value)}],keyup:e.calculateStrength}},"input",e.$attrs,!1)),e._v(" "),t(e.visiblePassword?"IconEye":"IconEyeClosed",{tag:"Component",staticClass:"icon-eye",on:{click:function(t){e.visiblePassword=!e.visiblePassword}}}),e._v(" "),e.strengthText&&e.password?t("small",{staticClass:"alert",class:e.strength},[e._v(e._s(e.strengthText))]):e._e()],1)}),[],!1,null,null,null).exports,w=r(1299),x={components:{FacebookIcon:r.n(w).a},props:{keepMeLoggedIn:Boolean,errored:Boolean,campaign:Boolean,termsAgreed:Boolean,formType:{type:String,default:""}},mounted:function(){var e=this;return Object(o.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.loadFacebookSDK(document,"script","facebook-jssdk");case 2:return t.next=4,e.initFacebook();case 4:case"end":return t.stop()}}),t)})))()},methods:{logInWithFacebook:function(){var e=this;return Object(o.a)(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.$root.$emit("check");case 2:return e.errored||((r=Object.keys(localStorage).find((function(e){return e.includes("fblst_")})))&&localStorage.removeItem(r),window.FB.login(function(){var t=Object(o.a)(regeneratorRuntime.mark((function t(r){var n,o,c;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("connected"!==r.status){t.next=7;break}return n=r.authResponse.accessToken,t.next=4,e.$axios.$post("/auth/social/facebook?rkey=".concat(e.$route.query.rkey,"&checkout=true"),{token:n,coursePurchase:"individual-course"===e.$route.query.ptype});case 4:(o=t.sent)&&o.businessAccount&&e.$store.dispatch("auth/setUserInfo",o),o&&o.user&&(o.user.registered&&(c="".concat(e.$store.state.tracking.sessionId).concat(Date.now()),dataLayer.push({event:"FreeSignup",signupType:"Facebook",eventID:c}),e.$tracking.sendEvent({dataLayerEvent:"SignUp",destinationUrl:e.$router.currentRoute.fullPath,eventID:c,capi:!0,userAgent:navigator.userAgent})),e.$store.dispatch("auth/setUserInfo",o.user),e.$emit("login"));case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),{scope:"public_profile, email"})),t.abrupt("return",!1);case 4:case"end":return t.stop()}}),t)})))()},initFacebook:function(){var e=this;return Object(o.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:window.fbAsyncInit=function(){window.FB.init({appId:e.$config.facebookApiKey,cookie:!0,version:"v9.0"})};case 1:case"end":return t.stop()}}),t)})))()},loadFacebookSDK:function(e,s,t){return Object(o.a)(regeneratorRuntime.mark((function r(){var n,o;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(o=e.getElementsByTagName(s)[0],!e.getElementById(t)){r.next=3;break}return r.abrupt("return");case 3:(n=e.createElement(s)).id=t,n.src="https://connect.facebook.net/en_US/sdk.js",o.parentNode.insertBefore(n,o);case 7:case"end":return r.stop()}}),r)})))()},checkTerms:function(){this.$root.$emit("check-terms",!0)},socialSignUp:function(){this.termsAgreed&&this.logInWithFacebook(),this.checkTerms()}}},P=x,$=(r(4505),Object(C.a)(P,(function(){var e=this,t=e._self._c;return t("a",e._g({attrs:{title:"login"===e.formType?"Login with Facebook":"Sign up with Facebook"}},"login"===e.formType?{click:e.logInWithFacebook}:{click:e.socialSignUp}),[t("FacebookIcon"),e._v(" "),t("span",[e._v("\n    Facebook\n  ")])],1)}),[],!1,null,"882d55d6",null).exports),I=r(1298),A={components:{IconGoogle:r.n(I).a},props:{keepMeLoggedIn:Boolean,errored:Boolean,campaign:Boolean,termsAgreed:Boolean,formType:{type:String,default:""}},mounted:function(){var e=this;return Object(o.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.$pollValue((function(){return void 0!==window.google}));case 2:window.google&&(window.google.accounts.id.initialize({client_id:e.$config.googleApiKey,callback:e.handleCredentialResponse}),window.google.accounts.id.renderButton(e.$refs.signinBtn,{}));case 3:case"end":return t.stop()}}),t)})))()},methods:{checkTerms:function(){this.$root.$emit("check-terms",!0)},handleCredentialResponse:function(e){var t=this;return Object(o.a)(regeneratorRuntime.mark((function r(){var n,o,c;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return"signup"===t.formType&&t.checkTerms(),n=e.credential,r.next=4,t.$root.$emit("check");case 4:if(t.errored){r.next=10;break}return r.next=7,t.$axios.$post("/auth/social/google?rkey=".concat(t.$route.query.rkey,"&checkout=true"),{token:n,coursePurchase:"individual-course"===t.$route.query.ptype});case 7:(o=r.sent)&&o.businessAccount&&t.$store.dispatch("auth/setUserInfo",o),o&&o.user&&(o.user.registered&&(c="".concat(t.$store.state.tracking.sessionId).concat(Date.now()),dataLayer.push({event:"FreeSignup",signupType:"Google",eventID:c}),t.$tracking.sendEvent({dataLayerEvent:"SignUp",destinationUrl:t.$router.currentRoute.fullPath,eventID:c,capi:!0,userAgent:navigator.userAgent})),t.$store.dispatch("auth/setUserInfo",o.user),t.$emit("login"));case 10:case"end":return r.stop()}}),r)})))()}}},O=(r(4506),Object(C.a)(A,(function(){var e=this,t=e._self._c;return t("div",[t("span",{ref:"signinBtn",staticClass:"invisible"}),e._v(" "),t("a",{class:{visible:e.termsAgreed||"login"===e.formType},attrs:{href:"#social-login",title:"Login with Google"}},[t("IconGoogle"),e._v(" Google\n  ")],1),e._v(" "),t("a",{staticClass:"fake",class:{visible:!e.termsAgreed&&"signup"===e.formType},attrs:{href:"#social-login",title:"Sign up with Google"},on:{click:function(t){return t.preventDefault(),e.checkTerms.apply(null,arguments)}}},[t("IconGoogle"),e._v(" Google\n  ")],1)])}),[],!1,null,"85b79b20",null)),S=O.exports,T=(r(21),r(96),r(1300)),N={components:{LinkedinIcon:r.n(T).a},props:{keepMeLoggedIn:Boolean,errored:Boolean,campaign:Boolean,termsAgreed:Boolean,formType:{type:String,default:""}},methods:{linkedinLogin:function(){var e=this;return Object(o.a)(regeneratorRuntime.mark((function t(){var r,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.$root.$emit("check");case 2:r=e.$route.path.replace(/^\/|\/$/g,""),n=Object.entries(e.$route.query).map((function(i){return i[1]?"".concat(i[0],"=").concat(i[1]):""})).join(","),"signup"!==e.formType||e.errored?"login"===e.formType&&(window.location="https://www.linkedin.com/oauth/v2/authorization?response_type=code&scope=".concat(encodeURI("r_liteprofile r_emailaddress"),"&client_id=").concat(e.$config.linkedinApiKey,"&redirect_uri=").concat(encodeURI("".concat(e.$config.siteUrl,"/").concat(r)),"&state=").concat(n)):window.location="https://www.linkedin.com/oauth/v2/authorization?response_type=code&scope=".concat(encodeURI("r_liteprofile r_emailaddress"),"&client_id=").concat(e.$config.linkedinApiKey,"&redirect_uri=").concat(encodeURI("".concat(e.$config.siteUrl,"/").concat(r)),"&state=").concat(n);case 5:case"end":return t.stop()}}),t)})))()},checkTerms:function(){this.$root.$emit("check-terms",!0)},socialSignUp:function(){this.termsAgreed&&this.linkedinLogin(),this.checkTerms()}}},j=(r(4507),Object(C.a)(N,(function(){var e=this,t=e._self._c;return t("a",e._g({attrs:{title:"login"===e.formType?"Login with LinkedIn":"Sign up with LinkedIn"}},"login"===e.formType?{click:e.linkedinLogin}:{click:e.socialSignUp}),[t("LinkedinIcon"),e._v(" "),t("span",[e._v("\n    LinkedIn\n  ")])],1)}),[],!1,null,"d3c9cd76",null).exports),E=r(3603),L=r.n(E);function D(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,r)}return t}function B(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?D(Object(source),!0).forEach((function(t){Object(n.a)(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):D(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}var R={components:{Password:k,FacebookLoginButton:$,GoogleLoginButton:S,LinkedinLoginButton:j,IconQuestion:L.a,Tooltip:m.a},data:function(){return{accountCheckout:{invoice:!1,companyName:"",companyId:"",vat:"",termsAgreed:!1,checkout:!0},passwordValidateInfo:"",passwordValidateText:"",emailAlert:"",passwordAlert:"",lastNameAlert:"",firstNameAlert:"",companyNameAlert:"",companyIdAlert:"",vatAlert:"",formType:"signup",signedUp:!1,termsError:!1,loading:!1}},computed:B(B({},Object(l.c)("checkout",["order","account","paymentInfo"])),{},{email:{get:function(){return this.account.email},set:function(e){this.$store.commit("checkout/setAccountEmail",e)}},password:{get:function(){return this.account.password},set:function(e){this.$store.commit("checkout/setAccountPassword",e)}},firstName:{get:function(){return this.account.firstName},set:function(e){this.$store.commit("checkout/setAccountFirstName",e)}},lastName:{get:function(){return this.account.lastName},set:function(e){this.$store.commit("checkout/setAccountLastName",e)}},canRegister:function(){var e=!this.accountCheckout.invoice&&!this.order.business||this.accountCheckout.companyName&&this.accountCheckout.companyId&&this.accountCheckout.companyId;return this.email&&this.password&&this.password.length>=6&&this.firstName&&this.lastName&&this.accountCheckout.termsAgreed&&e&&!this.loading}}),created:function(){var e=this;return Object(o.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$root.$on("check-terms",(function(){e.checkTerms()}));case 1:case"end":return t.stop()}}),t)})))()},mounted:function(){var e=this;if(this.$route.query.error&&"business"===this.$route.query.error){this.$store.commit("auth/setLoginAlert",!0);var t=B({},this.$route.query);delete t.error,this.$router.replace({query:t})}var r=function(){window.location.pathname.includes("/checkout/")&&e.$validEmail(e.email)&&navigator.sendBeacon("".concat(window.$nuxt.$config.backendUrl,"/payments/checkout/cart"),new Blob([JSON.stringify({plan:e.paymentInfo.plan.name,type:"no-user",email:e.email,firstName:e.firstName,lastName:e.lastName})],{type:"application/json"}))};document.addEventListener(this.$getBrowserVisibilityProp(),(function(){e.$getBrowserDocumentHiddenProp()&&document.visibilityState===e.$getBrowserDocumentHiddenProp()&&r()})),this.$getBrowserVisibilityProp()||window.addEventListener("pagehide",(function(){r()}))},methods:{checkTerms:function(){return this.accountCheckout.termsAgreed?(this.termsError=!1,this.termsError):(this.termsError=!0,this.termsError)},continueCheckout:function(){var e=this;return Object(o.a)(regeneratorRuntime.mark((function t(){var data,r,n,o,c,l;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,e.signedUp){t.next=12;break}if(e.$validEmail(e.email.trim())){t.next=6;break}return e.emailAlert="Invalid email",e.$store.commit("checkout/setExistingEmail",""),t.abrupt("return");case 6:if(e.firstName){t.next=9;break}return e.firstNameAlert="Invalid First Name",t.abrupt("return");case 9:if(e.lastName){t.next=12;break}return e.lastNameAlert="Invalid Last Name",t.abrupt("return");case 12:if(!e.accountCheckout.invoice&&!e.order.business){t.next=19;break}if(e.accountCheckout.companyName){t.next=16;break}return e.companyNameAlert="Invalid Company Name",t.abrupt("return");case 16:if(e.accountCheckout.companyId){t.next=19;break}return e.companyIdAlert="Invalid Company ID",t.abrupt("return");case 19:if(e.accountCheckout.termsAgreed){t.next=22;break}return e.termsError=!0,t.abrupt("return");case 22:if(data=B(B({},e.accountCheckout),{},{name:"".concat(e.firstName," ").concat(e.lastName),email:e.email.trim(),password:e.password,firstName:e.firstName,lastName:e.lastName,rkey:e.$route.query.rkey,noError:!0,coursePurchase:"individual-course"===e.$route.query.ptype}),!e.order.business){t.next=40;break}return e.loading=!0,t.next=27,e.$axios.$post("/business/admin/signup",data,{noError:!0}).catch((function(e){return e.response.data}));case 27:if(r=t.sent,e.loading=!1,!r||"emailAlreadyTaken"!==r.error){t.next=33;break}return e.emailAlert="This email is already registered. Please log in.",e.$store.commit("checkout/setExistingEmail",data.email),t.abrupt("return");case 33:if(e.$store.commit("checkout/setExistingEmail",""),!r||"vatInvalid"!==r.error){t.next=37;break}return e.vatAlert="Invalid Vat Number",t.abrupt("return");case 37:return r&&r.accessToken&&r.refreshToken&&e.$store.dispatch("auth/setUserInfo",r.user),e.$emit("continue"),t.abrupt("return");case 40:if(e.signedUp){t.next=53;break}return t.next=43,e.$store.dispatch("auth/register",data);case 43:if(!(n=t.sent)||"emailAlreadyTaken"!==n.error){t.next=48;break}return e.emailAlert="This email is already registered. Please log in.",e.$store.commit("checkout/setExistingEmail",data.email),t.abrupt("return");case 48:if(e.$store.commit("checkout/setExistingEmail",""),!n||"error"!==n.status){t.next=52;break}return e.emailAlert=n.message,t.abrupt("return");case 52:n&&"error"!==n.status&&(o="".concat(e.$store.state.tracking.sessionId).concat(Date.now()),dataLayer.push({event:"FreeSignup",signupType:"Direct",eventID:o}),e.$tracking.sendEvent({dataLayerEvent:"SignUp",destinationUrl:e.$router.currentRoute.fullPath,eventID:o,capi:!0,userAgent:navigator.userAgent}),e.signedUp=!0);case 53:if(!e.signedUp){t.next=66;break}if(!data.invoice){t.next=65;break}return t.prev=55,t.next=58,e.$axios.$post("/payments/invoices",data,{noError:!0});case 58:t.next=65;break;case 60:if(t.prev=60,t.t0=t.catch(55),"vatInvalid"!==(null===t.t0||void 0===t.t0||null===(c=t.t0.response)||void 0===c||null===(l=c.data)||void 0===l?void 0:l.error)){t.next=65;break}return e.vatAlert="Invalid Vat Number",t.abrupt("return");case 65:e.$emit("continue");case 66:t.next=71;break;case 68:t.prev=68,t.t1=t.catch(0),console.log("catch err => ",t.t1);case 71:case"end":return t.stop()}}),t,null,[[0,68],[55,60]])})))()}}},F=(r(4508),Object(C.a)(R,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"checkout-account"},[t("p",{staticClass:"h6"},[e._v("\n    Sign Up\n  ")]),e._v(" "),e.order.business?e._e():[t("div",{staticClass:"social-login-buttons"},[t("div",{staticClass:"social-btn google-btn"},[t("GoogleLoginButton",{attrs:{"form-type":e.formType,errored:e.termsError,"terms-agreed":e.accountCheckout.termsAgreed},on:{check:e.checkTerms,login:function(t){return e.$emit("continue")}}})],1),e._v(" "),t("div",{staticClass:"social-btn"},[t("FacebookLoginButton",{attrs:{"form-type":e.formType,errored:e.termsError,"terms-agreed":e.accountCheckout.termsAgreed},on:{check:e.checkTerms,login:function(t){return e.$emit("continue")}}})],1),e._v(" "),t("div",{staticClass:"social-btn"},[t("LinkedinLoginButton",{attrs:{"form-type":e.formType,errored:e.termsError,"terms-agreed":e.accountCheckout.termsAgreed},on:{check:e.checkTerms,login:function(t){return e.$emit("continue")}}})],1)]),e._v(" "),e.$store.state.auth.loginAlert?t("small",{staticClass:"alert-error"},[e._v("Please use your company email address to log in to your business account.")]):e._e(),e._v(" "),t("span",{staticClass:"or-line"},[e._v("or")])],e._v(" "),t("form",{staticClass:"account-details-form",attrs:{autocomplete:"chrome-off"},on:{submit:function(t){return t.preventDefault(),e.continueCheckout.apply(null,arguments)}}},[t("div",{staticClass:"input-group email-input",class:{"invalid-field":e.emailAlert}},[t("label",{staticClass:"required",attrs:{for:"checkout-email"}},[e._v("Email")]),e._v(" "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.email,expression:"email"}],class:{"invalid-field":e.emailAlert},attrs:{id:"checkout-email",type:"text",name:"checkout-email",autocomplete:"email",placeholder:"Email address","data-event":"".concat(e.$route.query.plan,"_email.click"),"data-direct-send":""},domProps:{value:e.email},on:{input:[function(t){t.target.composing||(e.email=t.target.value)},function(t){e.emailAlert=""}]}}),e._v(" "),e.emailAlert?t("small",{staticClass:"alert"},[e._v(e._s(e.emailAlert))]):e._e()]),e._v(" "),t("Password",{on:{input:function(p){return e.password=p}}}),e._v(" "),t("div",{staticClass:"input-group"},[t("label",{staticClass:"required",attrs:{for:"fname"}},[e._v("First Name")]),e._v(" "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.firstName,expression:"firstName"}],class:{"invalid-field":e.firstNameAlert},attrs:{id:"fname",type:"text",name:"fname",autocomplete:"given-name",placeholder:"Your First Name","data-event":"".concat(e.$route.query.plan,"_firstname.click"),"data-direct-send":""},domProps:{value:e.firstName},on:{input:[function(t){t.target.composing||(e.firstName=t.target.value)},function(t){e.firstNameAlert=""}]}}),e._v(" "),e.firstNameAlert?t("small",{staticClass:"alert"},[e._v(e._s(e.firstNameAlert))]):e._e()]),e._v(" "),t("div",{staticClass:"input-group"},[t("label",{staticClass:"required",attrs:{for:"lname"}},[e._v("Last Name")]),e._v(" "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.lastName,expression:"lastName"}],class:{"invalid-field":e.lastNameAlert},attrs:{id:"lname",type:"text",name:"lname",autocomplete:"family-name",placeholder:"Your Last Name","data-event":"".concat(e.$route.query.plan,"_lastname.click"),"data-direct-send":""},domProps:{value:e.lastName},on:{input:[function(t){t.target.composing||(e.lastName=t.target.value)},function(t){e.lastNameAlert=""}]}}),e._v(" "),e.lastNameAlert?t("small",{staticClass:"alert"},[e._v(e._s(e.lastNameAlert))]):e._e()]),e._v(" "),e.order.business?e._e():t("div",{staticClass:"input-group checkbox"},[t("div",[t("input",{directives:[{name:"model",rawName:"v-model",value:e.accountCheckout.invoice,expression:"accountCheckout.invoice"}],staticClass:"custom-checkbox reverse-colors",attrs:{id:"invoice",type:"checkbox","data-event":"".concat(e.$route.query.plan,"_needinvoice.click"),"data-direct-send":""},domProps:{checked:Array.isArray(e.accountCheckout.invoice)?e._i(e.accountCheckout.invoice,null)>-1:e.accountCheckout.invoice},on:{change:function(t){var r=e.accountCheckout.invoice,n=t.target,o=!!n.checked;if(Array.isArray(r)){var c=e._i(r,null);n.checked?c<0&&e.$set(e.accountCheckout,"invoice",r.concat([null])):c>-1&&e.$set(e.accountCheckout,"invoice",r.slice(0,c).concat(r.slice(c+1)))}else e.$set(e.accountCheckout,"invoice",o)}}}),e._v(" "),t("label",{attrs:{for:"invoice"}},[e._v("\n          I need an invoice\n        ")])])]),e._v(" "),e.accountCheckout.invoice||e.order.business?t("div",{staticClass:"invoice-info account-details-form"},[t("div",{staticClass:"input-group"},[t("label",{staticClass:"required",attrs:{for:"companyName"}},[e._v("Company Name")]),e._v(" "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.accountCheckout.companyName,expression:"accountCheckout.companyName"}],class:{"invalid-field":e.companyNameAlert},attrs:{id:"companyName",type:"text",name:"companyName",autocomplete:"organization",placeholder:"Company Name"},domProps:{value:e.accountCheckout.companyName},on:{input:[function(t){t.target.composing||e.$set(e.accountCheckout,"companyName",t.target.value)},function(t){e.lastNameAlert=""}]}}),e._v(" "),e.companyNameAlert?t("small",{staticClass:"alert"},[e._v(e._s(e.companyNameAlert))]):e._e()]),e._v(" "),t("div",{staticClass:"input-group"},[t("div",{staticClass:"companyId-question-icon"},[t("label",{staticClass:"required",attrs:{for:"companyId"}},[e._v("Company ID")]),e._v(" "),t("div",{staticClass:"question-icon"},[t("IconQuestion"),e._v(" "),t("Tooltip",[t("ul",[t("li",[e._v("\n                  USA - EIN (Employer Identification Number)\n                ")]),e._v(" "),t("li",[e._v("\n                  India - CIN (Corporate Identification Number)\n                ")]),e._v(" "),t("li",[e._v("\n                  Canada - BN (Business Number)\n                ")]),e._v(" "),t("li",[e._v("\n                  Australia - ACN (Australian Company Number)\n                ")]),e._v(" "),t("li",[e._v("\n                  Europe - EUID (European Unique Identifier)\n                ")])])])],1)]),e._v(" "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.accountCheckout.companyId,expression:"accountCheckout.companyId"}],class:{"invalid-field":e.companyIdAlert},attrs:{id:"companyId",type:"text",name:"companyId",autocomplete:"organization",placeholder:"Company ID"},domProps:{value:e.accountCheckout.companyId},on:{input:[function(t){t.target.composing||e.$set(e.accountCheckout,"companyId",t.target.value)},function(t){e.companyIdAlert=""}]}}),e._v(" "),e.companyIdAlert?t("small",{staticClass:"alert"},[e._v(e._s(e.companyIdAlert))]):e._e()]),e._v(" "),t("div",{staticClass:"input-group"},[t("label",{attrs:{for:"vat"}},[e._v("EU/UK VAT Number (optional)")]),e._v(" "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.accountCheckout.vat,expression:"accountCheckout.vat"}],class:{"invalid-field":e.vatAlert},attrs:{id:"vat",type:"text",name:"vat",autocomplete:"organization",placeholder:"Number"},domProps:{value:e.accountCheckout.vat},on:{input:[function(t){t.target.composing||e.$set(e.accountCheckout,"vat",t.target.value)},function(t){e.vatAlert=""}]}}),e._v(" "),e.vatAlert?t("small",{staticClass:"alert"},[e._v(e._s(e.vatAlert))]):e._e()])]):e._e(),e._v(" "),t("div",{staticClass:"input-group checkbox"},[t("div",{class:{error:e.termsError}},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.accountCheckout.termsAgreed,expression:"accountCheckout.termsAgreed"}],staticClass:"custom-checkbox reverse-colors",attrs:{id:"terms",type:"checkbox","data-event":"".concat(e.$route.query.plan,"_agreewithterms.click"),"data-direct-send":""},domProps:{checked:Array.isArray(e.accountCheckout.termsAgreed)?e._i(e.accountCheckout.termsAgreed,null)>-1:e.accountCheckout.termsAgreed},on:{change:[function(t){var r=e.accountCheckout.termsAgreed,n=t.target,o=!!n.checked;if(Array.isArray(r)){var c=e._i(r,null);n.checked?c<0&&e.$set(e.accountCheckout,"termsAgreed",r.concat([null])):c>-1&&e.$set(e.accountCheckout,"termsAgreed",r.slice(0,c).concat(r.slice(c+1)))}else e.$set(e.accountCheckout,"termsAgreed",o)},function(t){e.termsError=!1}]}}),e._v(" "),t("label",{attrs:{for:"terms"}},[e._v("\n          I agree with "+e._s(e.$config.platformName)+"’s\n          "),t("nuxt-link",{staticClass:"link-accent",attrs:{target:"_blank",to:"/terms-of-use/"}},[e._v("Terms of Use")]),e._v("\n          and\n          "),t("nuxt-link",{staticClass:"link-accent",attrs:{target:"_blank",to:"/privacy-policy/"}},[e._v("Privacy Policy")]),t("span",{staticClass:"label-required"},[e._v("*")])],1)]),e._v(" "),e.termsError?t("small",{staticClass:"alert alert-privacy"},[e._v("Please agree to the terms of use and privacy policy")]):e._e()]),e._v(" "),t("button",{staticClass:"btn-primary btn-lg submit h6",attrs:{type:"submit",disabled:!e.canRegister&&"ds"===e.$config.platform,"data-event":"".concat(e.$route.query.plan,"_continue.click"),"data-direct-send":""}},[e._v("\n      Continue\n    ")])],1)],2)}),[],!1,null,null,null)),z=F.exports;function U(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,r)}return t}var Q={components:{FacebookLoginButton:$,GoogleLoginButton:S,LinkedinLoginButton:j,IconEye:f.a,IconEyeClosed:y.a},data:function(){return{visiblePassword:!1,email:"",password:"",formType:"login",emailAlert:"",passwordAlert:""}},computed:function(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?U(Object(source),!0).forEach((function(t){Object(n.a)(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):U(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}({},Object(l.c)("checkout",["order","existingEmail"])),mounted:function(){this.email=this.existingEmail},methods:{login:function(){var e=this;return Object(o.a)(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.email&&e.password){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,e.$store.dispatch("auth/login",{email:e.email,password:e.password});case 4:(r=t.sent)&&("error"!==r.status?e.$emit("continue"):"error"===r.status&&(e.emailAlert="",e.passwordAlert="","incorrectPassword"===r.error?e.passwordAlert=r.message:"error"===r.status&&(e.emailAlert=r.message)));case 6:case"end":return t.stop()}}),t)})))()}}},M=Q,V=(r(4509),Object(C.a)(M,(function(){var e=this,t=e._self._c;return t("div",[t("p",{staticClass:"h6"},[e._v("\n    Log In to Your Profile\n  ")]),e._v(" "),e.order.business?e._e():[t("div",{staticClass:"social-login-buttons"},[t("div",{staticClass:"social-btn google-btn"},[t("GoogleLoginButton",{attrs:{"form-type":e.formType},on:{login:function(t){return e.$emit("continue")}}})],1),e._v(" "),t("div",{staticClass:"social-btn"},[t("FacebookLoginButton",{attrs:{"form-type":e.formType},on:{login:function(t){return e.$emit("continue")}}})],1),e._v(" "),t("div",{staticClass:"social-btn"},[t("LinkedinLoginButton",{attrs:{"form-type":e.formType},on:{login:function(t){return e.$emit("continue")}}})],1)]),e._v(" "),e.$store.state.auth.loginAlert?t("small",{staticClass:"alert-error"},[e._v("Please use your company email address to log in to your business account.")]):e._e(),e._v(" "),t("span",{staticClass:"or-line"},[e._v("or")])],e._v(" "),t("form",{staticClass:"login-form",attrs:{method:"post"},on:{submit:function(t){return t.preventDefault(),e.login.apply(null,arguments)}}},[t("div",{staticClass:"input-group"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.email,expression:"email"}],class:{"invalid-field":e.emailAlert},attrs:{id:"email",type:"email",name:"email",autocomplete:"username",placeholder:"Email"},domProps:{value:e.email},on:{input:function(t){t.target.composing||(e.email=t.target.value)}}}),e._v(" "),e.emailAlert?t("small",{staticClass:"alert"},[e._v(e._s(e.emailAlert))]):e._e()]),e._v(" "),t("div",{staticClass:"input-group"},["checkbox"==(e.visiblePassword?"text":"password")?t("input",{directives:[{name:"model",rawName:"v-model",value:e.password,expression:"password"}],class:{"invalid-field":e.passwordAlert},attrs:{id:"password",name:"password",autocomplete:"current-password",placeholder:"Password",type:"checkbox"},domProps:{checked:Array.isArray(e.password)?e._i(e.password,null)>-1:e.password},on:{change:function(t){var r=e.password,n=t.target,o=!!n.checked;if(Array.isArray(r)){var c=e._i(r,null);n.checked?c<0&&(e.password=r.concat([null])):c>-1&&(e.password=r.slice(0,c).concat(r.slice(c+1)))}else e.password=o}}}):"radio"==(e.visiblePassword?"text":"password")?t("input",{directives:[{name:"model",rawName:"v-model",value:e.password,expression:"password"}],class:{"invalid-field":e.passwordAlert},attrs:{id:"password",name:"password",autocomplete:"current-password",placeholder:"Password",type:"radio"},domProps:{checked:e._q(e.password,null)},on:{change:function(t){e.password=null}}}):t("input",{directives:[{name:"model",rawName:"v-model",value:e.password,expression:"password"}],class:{"invalid-field":e.passwordAlert},attrs:{id:"password",name:"password",autocomplete:"current-password",placeholder:"Password",type:e.visiblePassword?"text":"password"},domProps:{value:e.password},on:{input:function(t){t.target.composing||(e.password=t.target.value)}}}),e._v(" "),e.passwordAlert?t("small",{staticClass:"alert"},[e._v(e._s(e.passwordAlert))]):e._e(),e._v(" "),t(e.visiblePassword?"IconEye":"IconEyeClosed",{tag:"Component",staticClass:"icon-eye",on:{click:function(t){e.visiblePassword=!e.visiblePassword}}})],1),e._v(" "),t("button",{staticClass:"btn-primary submit btn-lg",attrs:{disabled:!e.email||!e.password}},[e._v("\n      Login\n    ")])])],2)}),[],!1,null,"5554ca73",null)),Y=V.exports,G=r(497),K=r(2988),H=r.n(K),W=r(3623),Z=r.n(W),J=r(4232),X=r.n(J),ee=r(4233),te=r.n(ee),re=r(4234),ae=r.n(re),ne=r(3624),oe=r.n(ne);function se(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,r)}return t}function ie(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?se(Object(source),!0).forEach((function(t){Object(n.a)(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):se(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}var ce={components:{IconCheck:H.a,IconPaypalLogo:Z.a,IconCreditCardCheckout:X.a,IconLock:te.a,IconPerson:ae.a,IconQuestion:L.a,IconArrow:oe.a},filters:{formatDate:function(e){return new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}},data:function(){return{stepThree:!1}},computed:ie(ie(ie({},Object(l.c)("checkout",["chargify","paymentInfo","loadingChargify","loading","order","currentTab","countriesStates"])),Object(l.b)("checkout",["errors","currency"])),{},{countries:function(){return G.b.sort((function(a,b){return a.country.localeCompare(b.country)}))},cardIcon:function(){return!!["visa","mastercard","discover","american-express"].includes(this.paymentInfo.card.type)&&r(4235)("./icon-payment-card-".concat(this.paymentInfo.card.type,".svg"))},nameOnCard:{get:function(){return this.paymentInfo.card.name},set:function(e){this.stepThree||(this.$store.dispatch("dataLayer/addEvent",{event:"checkoutStep",value:3}),this.stepThree=!0),this.$store.commit("checkout/setCardName",e)}},country:{get:function(){return this.paymentInfo.card.country},set:function(e){this.stepThree||(this.$store.dispatch("dataLayer/addEvent",{event:"checkoutStep",value:3}),this.stepThree=!0),this.$store.commit("checkout/setCountry",e)}},state:{get:function(){return this.paymentInfo.card.state},set:function(e){this.stepThree||(this.$store.dispatch("dataLayer/addEvent",{event:"checkoutStep",value:3}),this.stepThree=!0),this.$store.commit("checkout/setState",e)}},zip:{get:function(){return this.paymentInfo.card.zip},set:function(e){this.stepThree||(this.$store.dispatch("dataLayer/addEvent",{event:"checkoutStep",value:3}),this.stepThree=!0),this.$store.commit("checkout/setZip",e)}},invoice:{get:function(){return this.paymentInfo.invoice||this.order.business}},address:{get:function(){return this.paymentInfo.card.address},set:function(e){this.$store.commit("checkout/setAddress",e)}},city:{get:function(){return this.paymentInfo.card.city},set:function(e){this.$store.commit("checkout/setCity",e)}},paymentProfile:function(){return!!this.order.paymentInfo&&this.order.paymentInfo.paymentProfileId},cardPaymentChargifyConfig:function(){return{type:"card",fields:ie({number:{selector:".card-number-wrapper",label:" ",required:!0,message:" ",style:{input:{backgroundColor:"ds"===this.$config.platform?"#4B5461":"#283454",paddingTop:"6px",paddingBottom:"6px",paddingLeft:"52px",paddingRight:"75px",border:"ds"===this.$config.platform?"1px solid #565E6A":"1px solid #4D5469",fontSize:"18px",color:"#FFF",placeholder:{color:"#ABAFB5"}},label:{fontSize:"14px",color:"#FFF"},message:{fontSize:"14px",color:"#E04A4A"}}},firstName:{selector:".card-firstname",required:!0},lastName:{selector:".card-lastname",required:!0},month:{selector:".card-expiration-month",label:" ",required:!0,next_focus:"year",message:" ",style:{input:ie(ie(ie({backgroundColor:"ds"===this.$config.platform?"#4B5461":"#283454",paddingTop:"6px",paddingBottom:"6px",paddingLeft:"16px",border:"ds"===this.$config.platform?"none":"1px solid #4D5469"},"fa"===this.$config.platform&&{height:"51px"}),"fa"===this.$config.platform&&{borderRight:"none"}),{},{borderRadius:"5px",borderTopRightRadius:"0px",borderBottomRightRadius:"0px",fontSize:"18px",color:"#FFF",placeholder:{color:"#ABAFB5"}}),label:{fontSize:"14px",color:"#FFF"},message:{fontSize:"14px",color:"#E04A4A"}}},year:{label:" ",required:!0,message:" ",selector:".card-expiration-year",style:{input:ie(ie(ie({backgroundColor:"ds"===this.$config.platform?"#4B5461":"#283454",paddingTop:"6px",paddingBottom:"6px",paddingLeft:"0px",border:"ds"===this.$config.platform?"none":"1px solid #4D5469"},"fa"===this.$config.platform&&{height:"51px"}),"fa"===this.$config.platform&&{borderLeft:"none"}),{},{borderRadius:"5px",borderTopLeftRadius:"0px",borderBottomLeftRadius:"0px",fontSize:"18px",color:"#FFF",placeholder:{color:"#ABAFB5"}}),label:{fontSize:"14px",color:"#FFF"},message:{fontSize:"14px",color:"#E04A4A"}}},cvv:{selector:".card-cvv-wrapper",label:" ",required:!0,message:" ",style:{input:ie(ie(ie({backgroundColor:"ds"===this.$config.platform?"#4B5461":"#283454",paddingTop:"6px",paddingBottom:"6px",paddingLeft:"16px",border:"ds"===this.$config.platform?"none":"1px solid #4D5469",borderRadius:"5px"},"ds"===this.$config.platform&&{borderTopRightRadius:"0px"}),"ds"===this.$config.platform&&{borderBottomRightRadius:"0px"}),{},{fontSize:"18px",color:"#FFF",placeholder:{color:"#ABAFB5"}}),label:{fontSize:"14px",color:"#FFF"},message:{fontSize:"14px",color:"#E04A4A"}}},country:{selector:".card-country",required:!0},zip:{selector:".card-zip",required:!0}},this.invoice?{address:{selector:".invoice-address",required:!0},city:{selector:".invoice-city",required:!0}}:{})}},paypalPaymentChargifyConfig:function(){return{type:"pay_pal",selector:".pay-pal-wrapper",selectorForPayPalButton:"#pay-pal",fields:ie({country:{selector:".card-country",required:!0},zip:{selector:".card-zip",required:!0}},this.invoice?{address:{selector:".invoice-address",required:!0},city:{selector:".invoice-city",required:!0}}:{})}}}),watch:{currentTab:function(e){var t=this;"payment"===e&&(this.chargify&&this.chargify.unload(),setTimeout((function(){t.loadChargifyForm()}),1e3))},currency:function(){"pay_pal"===this.paymentInfo.method&&this.loadChargifyForm()}},created:function(){"payment"===this.currentTab&&this.loadChargifyForm()},mounted:function(){var e=this,t=function(){navigator.sendBeacon("".concat(window.$nuxt.$config.backendUrl,"/payments/checkout/cart"),new Blob([JSON.stringify({plan:e.paymentInfo.plan.name,type:e.order.upgrade?"upgrade":"new-subscription"})],{type:"application/json"}))};document.addEventListener(this.$getBrowserVisibilityProp(),(function(){e.$getBrowserDocumentHiddenProp()&&document.visibilityState===e.$getBrowserDocumentHiddenProp()&&t()})),this.$getBrowserVisibilityProp()||window.addEventListener("pagehide",(function(){t()}))},methods:{saving:function(){var e=this;return Object(o.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.$store.dispatch("checkout/fetchOrderSummary",{clearZip:""===e.paymentInfo.card.zip,withoutLoading:!0});case 2:case"end":return t.stop()}}),t)})))()},setPaymentMethod:function(e){var t=this;"pay_pal"===e&&"INR"===this.currency.value||(this.$store.commit("checkout/setPaymentMethod",e),this.$nextTick((function(){return t.loadChargifyForm()})))},loadChargifyForm:function(){var e=this;return Object(o.a)(regeneratorRuntime.mark((function t(){var r,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("pay_pal"!==e.paymentInfo.method||"INR"!==e.currency.value){t.next=2;break}return t.abrupt("return");case 2:return e.$pollValue((function(){return"undefined"!=typeof Chargify})),t.next=5,e.$pollValue((function(){return e.paymentInfo.securityToken}));case 5:e.chargify&&e.chargify.unload(),e.$store.commit("checkout/setLoadingChargify",!0),e.$store.commit("checkout/initChargify"),r="card"===e.paymentInfo.method?e.cardPaymentChargifyConfig:e.paypalPaymentChargifyConfig,"pay_pal"===e.paymentInfo.method&&(n="","pay_pal"!==e.order.paymentInfo.paymentType&&"pay_pal"!==e.paymentInfo.method||!e.order.paymentInfo.paymentProfileId||"USD"===e.currency.value||"USD"===e.order.paymentInfo.currency||(n="_".concat(e.currency.value)),r.gatewayHandle="gateway_handle_braintree".concat(n)),e.chargify.load(ie({publicKey:e.order.business?e.$config.chargify.b2bPublicKey:e.$config.chargify.publicKey,serverHost:e.order.business?e.$config.chargify.b2bServerHost:e.$config.chargify.serverHost,securityToken:e.paymentInfo.securityToken},r),{onCardTypeDetected:function(t){e.$store.commit("checkout/setCardType",t),e.$store.dispatch("dataLayer/addEvent",{event:"checkoutStep",value:3})},onPayPalAuthorized:function(){e.$store.dispatch("dataLayer/addEvent",{event:"checkoutStep",value:4}),e.$store.dispatch("checkout/getChargifyTokenAndPay")},onPayPalError:function(t){var r="".concat(e.$route.query.plan,"_completepayment.click");window.$nuxt.$tracking.sendAsyncEvent(r,{status:"fail",error:t})}}).then((function(){return e.$store.commit("checkout/setLoadingChargify",!1)}));case 11:case"end":return t.stop()}}),t)})))()}}},le=(r(4510),Object(C.a)(ce,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"checkout-payment"},[e.order.business&&e.order.trial?t("div",{staticClass:"trial-message"},[t("p",[e._v("\n      $0 due until "+e._s(e._f("formatDate")(e.order.nextBilling))+". Recurring billing will start only after your 14-day free trial ends.\n      You can cancel anytime from your Account Settings.\n    ")]),e._v(" "),t("p",[e._v("\n      Tiered pricing will provide you with automated discount for the higher number of subscriptions you add. The price of each subscription is assessed within its tier. For example, buying 3 subscriptions will cost $1009.20 (2*$348 + 1*$313.20).\n    ")]),e._v(" "),e._m(0)]):e._e(),e._v(" "),t("p",{staticClass:"select"},[e._v("\n    Select a payment method\n  ")]),e._v(" "),t("div",{staticClass:"payment-tabs",class:{loading:e.loading}},[t("div",{staticClass:"payment-tab",class:{active:"card"===e.paymentInfo.method},attrs:{"data-event":"".concat(e.$route.query.plan,"_creditcard.click"),"data-direct-send":""},on:{click:function(t){return e.setPaymentMethod("card")}}},[t("div",{staticClass:"tab"},[e._m(1),e._v(" "),"card"===e.paymentInfo.method?t("div",{staticClass:"icon-check"},[t("IconCheck")],1):t("div",{staticClass:"circle"})])]),e._v(" "),t("div",{staticClass:"payment-tab",class:{active:"pay_pal"===e.paymentInfo.method,disabled:"INR"===e.currency.value},attrs:{"data-event":"".concat(e.$route.query.plan,"_paypal.click"),"data-direct-send":""},on:{click:function(t){return e.setPaymentMethod("pay_pal")}}},[t("div",{staticClass:"tab"},[t("div",{staticClass:"payment-info"},[t("div",{staticClass:"payment-name"},[t("IconPaypalLogo"),e._v(" PayPal\n          ")],1)]),e._v(" "),"pay_pal"===e.paymentInfo.method?t("div",{staticClass:"icon-check"},[t("IconCheck")],1):t("div",{staticClass:"circle"})]),e._v(" "),"INR"===e.currency.value?t("div",{staticClass:"tooltip"},[e._v("\n        This payment method is not supported for the selected currency. To pay via PayPal, please choose another currency.\n      ")]):e._e()])]),e._v(" "),t("div",{staticClass:"form-wrapper"},["card"===e.paymentInfo.method?t("div",{staticClass:"payment-card"},[t("form",{staticClass:"payment-form",attrs:{id:"payment-form-card",autocomplete:"chrome-off"}},[t("div",{staticClass:"host-field"},[t("input",{staticClass:"host-input",attrs:{type:"hidden","data-chargify":"firstName"},domProps:{value:e.paymentInfo.card.firstName}})]),e._v(" "),t("div",{staticClass:"host-field"},[t("input",{staticClass:"host-input",attrs:{type:"hidden","data-chargify":"lastName"},domProps:{value:e.paymentInfo.card.lastName}})]),e._v(" "),t("div",{staticClass:"host-field"},[t("input",{staticClass:"host-input",attrs:{type:"hidden","data-chargify":"state"},domProps:{value:e.paymentInfo.card.state||"unknown state"}})]),e._v(" "),t("div",{staticClass:"host-field"},[t("input",{staticClass:"host-input",attrs:{type:"hidden","data-chargify":"address"},domProps:{value:e.paymentInfo.card.address||e.paymentInfo.card.country}})]),e._v(" "),t("div",{staticClass:"host-field"},[t("input",{staticClass:"host-input",attrs:{type:"hidden","data-chargify":"city"},domProps:{value:e.paymentInfo.card.city||"unknown city"}})]),e._v(" "),t("div",{staticClass:"host-field"},[t("input",{staticClass:"host-input",attrs:{type:"hidden","data-chargify":"country"},domProps:{value:e.paymentInfo.card.country}})]),e._v(" "),t("div",{staticClass:"host-field"},[t("input",{staticClass:"host-input",attrs:{type:"hidden","data-chargify":"zip"},domProps:{value:e.paymentInfo.card.zip}})]),e._v(" "),t("div",{staticClass:"input-group card-number",class:{invalid:e.errors(["card","number"]).any}},[t("label",{staticClass:"required"},[e._v("Card Number")]),e._v(" "),t("div",{staticClass:"card-number-wrapper",class:{invalid:e.errors(["card","number"]).any}},[t("div",{staticClass:"icon-card"},[t("IconCreditCardCheckout")],1),e._v(" "),e.paymentInfo.card.type?t("div",{staticClass:"icon-card-type"},[t(e.cardIcon,{tag:"Component"})],1):t("IconLock",{staticClass:"icon-lock"})],1),e._v(" "),e.errors(["card","number"]).message?t("small",{staticClass:"alert"},[e._v(e._s(e.errors(["card","number"]).message))]):e._e()]),e._v(" "),t("div",{staticClass:"input-group card-name"},[t("label",{staticClass:"required",attrs:{for:"name"}},[e._v("Name on card")]),e._v(" "),t("div",{staticClass:"card-name-input-holder"},[t("IconPerson",{staticClass:"icon-person"}),e._v(" "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.nameOnCard,expression:"nameOnCard"}],class:{invalid:e.errors(["firstName","lastName"]).any},attrs:{id:"name",type:"text",name:"name",placeholder:"Name On Card","data-event":"".concat(e.$route.query.plan,"_nameoncard.click"),"data-direct-send":""},domProps:{value:e.nameOnCard},on:{input:function(t){t.target.composing||(e.nameOnCard=t.target.value)}}})],1),e._v(" "),t("div",{staticClass:"hidden card-firstname"}),e._v(" "),t("div",{staticClass:"hidden card-lastname"})]),e._v(" "),t("div",{staticClass:"input-group card-expiration"},[t("label",{staticClass:"required"},[e._v("Expires on")]),e._v(" "),t("div",{staticClass:"card-expiration-wrapper",class:{invalid:e.errors(["year","month"]).any}},[t("div",{staticClass:"card-expiration-month"}),e._v(" "),t("div",{staticClass:"card-expiration-year"}),e._v(" "),t("div",{staticClass:"card-expiration-slash"},[e._v("\n              /\n            ")])])]),e._v(" "),t("div",{staticClass:"input-group cvv"},[t("label",{staticClass:"required",attrs:{for:"cvv"}},[e._v("CVV/CVC")]),e._v(" "),t("div",{staticClass:"tooltip-holder cvv"},[t("IconQuestion",{staticClass:"icon-question"}),e._v(" "),t("div",{staticClass:"tooltip"},[e._v("\n              A 3-digit security code is usually found on the back of your card. American Express cards have a 4-digit code located on the front.\n            ")])],1),e._v(" "),t("div",{staticClass:"card-cvv-wrapper",class:{invalid:e.errors(["cvv","security code"]).any}}),e._v(" "),e.errors(["cvv","security code"]).message?t("small",{staticClass:"alert"},[e._v(e._s(e.errors(["cvv","security code"]).message))]):e._e()]),e._v(" "),e.invoice?t("div",{staticClass:"invoice-info"},[t("h2",{staticClass:"h6"},[e._v("\n            Company Billing Address\n          ")]),e._v(" "),t("div",{staticClass:"input-group address"},[t("label",{staticClass:"required",attrs:{for:"address"}},[e._v("Address")]),e._v(" "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.address,expression:"address"}],class:{invalid:e.errors("address").any},attrs:{id:"address",type:"text",name:"address",disabled:e.paymentProfile||e.loading||e.loadingChargify,placeholder:"Company Address"},domProps:{value:e.address},on:{input:function(t){t.target.composing||(e.address=t.target.value)}}}),e._v(" "),t("div",{staticClass:"hidden invoice-address"})]),e._v(" "),t("div",{staticClass:"input-group city"},[t("label",{staticClass:"required",attrs:{for:"city"}},[e._v("City")]),e._v(" "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.city,expression:"city"}],class:{invalid:e.errors("city").any},attrs:{id:"city",type:"text",name:"city",disabled:e.paymentProfile||e.loading||e.loadingChargify,placeholder:"Select City"},domProps:{value:e.city},on:{input:function(t){t.target.composing||(e.city=t.target.value)}}}),e._v(" "),t("div",{staticClass:"hidden invoice-city"})]),e._v(" "),t("div",{staticClass:"input-group zip-code-invoice"},[t("label",{staticClass:"required",attrs:{for:"zip-code"}},[e._v("Zip Code")]),e._v(" "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.zip,expression:"zip"}],class:{invalid:e.errors("zip").any},attrs:{id:"zip-code",type:"text",name:"zip-code",disabled:e.loading||e.loadingChargify||e.paymentProfile,placeholder:"Zip Code"},domProps:{value:e.zip},on:{change:e.saving,input:function(t){t.target.composing||(e.zip=t.target.value)}}}),e._v(" "),t("div",{staticClass:"hidden card-zip"})])]):e._e(),e._v(" "),t("div",{staticClass:"country"},[t("IconArrow"),e._v(" "),t("label",{staticClass:"required"},[e._v("Country")]),e._v(" "),t("select",{directives:[{name:"model",rawName:"v-model",value:e.country,expression:"country"}],staticClass:"form-control",class:{invalid:e.errors("country").any},attrs:{disabled:e.loading||e.loadingChargify||e.paymentProfile||e.order.countryDisabled,"data-event":"".concat(e.$route.query.plan,"_country.click"),"data-direct-send":""},on:{change:[function(t){var r=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.country=t.target.multiple?r:r[0]},e.saving]}},[t("option",{attrs:{disabled:"",hidden:"",value:""}},[e._v("\n              Select Country\n            ")]),e._v(" "),e._l(e.countries,(function(r,n){return t("option",{key:n,domProps:{value:r.alpha2}},[e._v("\n              "+e._s(r.country)+"\n            ")])}))],2),e._v(" "),t("div",{staticClass:"hidden card-country"})],1),e._v(" "),e.countriesStates[e.country]?t("div",{staticClass:"state"},[t("IconArrow"),e._v(" "),t("label",{staticClass:"required"},[e._v("State")]),e._v(" "),t("select",{directives:[{name:"model",rawName:"v-model",value:e.state,expression:"state"}],staticClass:"form-control",class:{invalid:e.errors("state").any},attrs:{disabled:e.loading||e.loadingChargify||e.paymentProfile},on:{change:[function(t){var r=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.state=t.target.multiple?r:r[0]},e.saving]}},[t("option",{attrs:{disabled:"",hidden:"",value:""}},[e._v("\n              Select State\n            ")]),e._v(" "),e._l(e.countriesStates[e.country],(function(r,n){return t("option",{key:n,domProps:{value:r.abbreviation}},[e._v("\n              "+e._s(r.name)+"\n            ")])}))],2)],1):e._e(),e._v(" "),e.invoice?e._e():t("div",{staticClass:"input-group zip-code",class:{hidden:!e.country,disabled:e.paymentProfile}},[t("label",{staticClass:"required",attrs:{for:"zip-code"}},[e._v("Zip Code")]),e._v(" "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.zip,expression:"zip"}],class:{invalid:e.country&&e.errors("zip").any},attrs:{id:"zip-code",type:"text",placeholder:"Zip Code",disabled:e.loading||e.loadingChargify||e.paymentProfile,"data-direct-send":"","data-event":"".concat(e.$route.query.plan,"_zip.click"),name:"zip-code"},domProps:{value:e.zip},on:{change:e.saving,input:function(t){t.target.composing||(e.zip=t.target.value)}}}),e._v(" "),t("div",{staticClass:"hidden card-zip"})])])]):t("div",{staticClass:"payment-paypal"},[t("p",[e._v("\n        The safer, easier way to pay, Pay Pal uses data encryption and anti-fraud technology to help keep your information secure.\n      ")]),e._v(" "),t("form",{staticClass:"payment-form",attrs:{id:"payment-form-pay_pal",autocomplete:"chrome-off"}},[t("div",{staticClass:"pay-pal-wrapper"}),e._v(" "),t("div",{staticClass:"host-field"},[t("input",{staticClass:"host-input",attrs:{type:"hidden","data-chargify":"state"},domProps:{value:e.paymentInfo.card.state||"unknown state"}})]),e._v(" "),t("div",{staticClass:"host-field"},[t("input",{staticClass:"host-input",attrs:{type:"hidden","data-chargify":"address"},domProps:{value:e.paymentInfo.card.address||e.paymentInfo.card.country}})]),e._v(" "),t("div",{staticClass:"host-field"},[t("input",{staticClass:"host-input",attrs:{type:"hidden","data-chargify":"city"},domProps:{value:e.paymentInfo.card.city||"unknown city"}})]),e._v(" "),t("div",{staticClass:"host-field"},[t("input",{staticClass:"host-input",attrs:{type:"hidden","data-chargify":"country"},domProps:{value:e.paymentInfo.card.country}})]),e._v(" "),t("div",{staticClass:"host-field"},[t("input",{staticClass:"host-input",attrs:{type:"hidden","data-chargify":"zip"},domProps:{value:e.paymentInfo.card.zip}})]),e._v(" "),t("div",{directives:[{name:"show",rawName:"v-show",value:e.invoice,expression:"invoice"}],staticClass:"invoice-info"},[t("h2",{staticClass:"h6"},[e._v("\n            Company Billing Address\n          ")]),e._v(" "),t("div",{staticClass:"input-group address"},[t("label",{staticClass:"required",attrs:{for:"address"}},[e._v("Address")]),e._v(" "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.address,expression:"address"}],class:{invalid:e.errors("address").any},attrs:{id:"address",type:"text",name:"address",disabled:e.paymentProfile||e.loading||e.loadingChargify,placeholder:"Company Address"},domProps:{value:e.address},on:{input:function(t){t.target.composing||(e.address=t.target.value)}}}),e._v(" "),t("div",{staticClass:"hidden invoice-address"})]),e._v(" "),t("div",{staticClass:"input-group city"},[t("label",{staticClass:"required",attrs:{for:"city"}},[e._v("City")]),e._v(" "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.city,expression:"city"}],class:{invalid:e.errors("city").any},attrs:{id:"city",type:"text",name:"city",disabled:e.paymentProfile||e.loading||e.loadingChargify,placeholder:"Select City"},domProps:{value:e.city},on:{input:function(t){t.target.composing||(e.city=t.target.value)}}}),e._v(" "),t("div",{staticClass:"hidden invoice-city"})]),e._v(" "),t("div",{staticClass:"input-group zip-code-invoice"},[t("label",{staticClass:"required",attrs:{for:"zip-code"}},[e._v("Zip Code")]),e._v(" "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.zip,expression:"zip"}],class:{invalid:e.errors("zip").any},attrs:{id:"zip-code",type:"text",name:"zip-code",disabled:e.loading||e.loadingChargify||e.paymentProfile,placeholder:"Zip Code"},domProps:{value:e.zip},on:{change:e.saving,input:function(t){t.target.composing||(e.zip=t.target.value)}}}),e._v(" "),t("div",{staticClass:"hidden card-zip"})])]),e._v(" "),t("div",{staticClass:"country"},[t("IconArrow"),e._v(" "),t("label",{staticClass:"required"},[e._v("Country")]),e._v(" "),t("select",{directives:[{name:"model",rawName:"v-model",value:e.country,expression:"country"}],staticClass:"form-control",class:{invalid:e.errors("country").any},attrs:{disabled:e.loading||e.loadingChargify||e.paymentProfile||e.order.countryDisabled},on:{change:[function(t){var r=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.country=t.target.multiple?r:r[0]},e.saving]}},[t("option",{attrs:{disabled:"",hidden:"",value:""}},[e._v("\n              Select Country\n            ")]),e._v(" "),e._l(e.countries,(function(r,n){return t("option",{key:n,domProps:{value:r.alpha2}},[e._v("\n              "+e._s(r.country)+"\n            ")])}))],2),e._v(" "),t("div",{staticClass:"hidden card-country"})],1),e._v(" "),e.countriesStates[e.country]?t("div",{staticClass:"state"},[t("IconArrow"),e._v(" "),t("label",{staticClass:"required"},[e._v("State")]),e._v(" "),t("select",{directives:[{name:"model",rawName:"v-model",value:e.state,expression:"state"}],staticClass:"form-control",class:{invalid:e.errors("state").any},attrs:{disabled:e.loading||e.loadingChargify||e.paymentProfile},on:{change:[function(t){var r=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.state=t.target.multiple?r:r[0]},e.saving]}},[t("option",{attrs:{disabled:"",hidden:"",value:""}},[e._v("\n              Select State\n            ")]),e._v(" "),e._l(e.countriesStates[e.country],(function(r,n){return t("option",{key:n,domProps:{value:r.abbreviation}},[e._v("\n              "+e._s(r.name)+"\n            ")])}))],2)],1):e._e(),e._v(" "),e.country&&!e.invoice?t("div",{staticClass:"input-group zip-code"},[t("label",{staticClass:"required",attrs:{for:"zip-code"}},[e._v("Zip Code")]),e._v(" "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.zip,expression:"zip"}],class:{invalid:e.errors("zip").any},attrs:{id:"zip-code",type:"text",name:"zip-code",disabled:e.loading||e.loadingChargify||e.paymentProfile,placeholder:""},domProps:{value:e.zip},on:{change:e.saving,input:function(t){t.target.composing||(e.zip=t.target.value)}}}),e._v(" "),t("div",{staticClass:"hidden card-zip"})]):e._e()])])])])}),[function(){var e=this,t=e._self._c;return t("p",[e._v("\n      Tier 1: 1-2 Subscriptions: ("),t("strong",[e._v("$348.00")]),e._v(" each) "),t("br"),e._v("\n      Tier 2: 3-5 Subscriptions: ("),t("strong",[e._v("$313.20")]),e._v(" each) "),t("br"),e._v("\n      Tier 3: 6-10 Subscriptions: ("),t("strong",[e._v("$278.40")]),e._v(" each) "),t("br"),e._v("\n      Tier 4: 11-20 Subscriptions: ("),t("strong",[e._v("$243.60")]),e._v(" each) "),t("br"),e._v("\n      Tier 5: 21-30 Subscriptions: ("),t("strong",[e._v("$226.20")]),e._v(" each) "),t("br")])},function(){var e=this._self._c;return e("div",{staticClass:"payment-info"},[e("div",{staticClass:"payment-name"},[this._v("\n            Credit or Debit card\n          ")])])}],!1,null,null,null).exports),ue=r(2678),de=r.n(ue),pe=r(2679),me=r.n(pe),ve=r(2063),fe=r.n(ve),he=r(2111),ye=r.n(he),ge=(r(12),{props:{type:{type:String,default:"page"}},data:function(){return{loading:!0,visible:!0}},methods:{start:function(){var e=this;return Object(o.a)(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=function(){return new Promise((function(){setTimeout(Object(o.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.loading=!0;case 1:case"end":return t.stop()}}),t)}))),100)}))},!e.visible){t.next=4;break}return t.next=4,r();case 4:case"end":return t.stop()}}),t)})))()},finish:function(){var e=this;return Object(o.a)(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=function(){return new Promise((function(){setTimeout(Object(o.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.loading=!1;case 1:case"end":return t.stop()}}),t)}))),1200)}))},t.next=3,r();case 3:e.visible=!1;case 4:case"end":return t.stop()}}),t)})))()}}}),_e=(r(4511),Object(C.a)(ge,(function(){var e=this,t=e._self._c;return e.visible?t("div",{staticClass:"loader-mask",class:{show:e.loading,element:"page"!==e.type}},[t("svg",{staticClass:"loader",attrs:{"xmlns:svg":"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.0",viewBox:"0 0 128 128","xml:space":"preserve"}},[t("g",[t("circle",{attrs:{cx:"16",cy:"64",r:"16",fill:"#ffffff","fill-opacity":"1"}}),e._v(" "),t("circle",{attrs:{cx:"16",cy:"64",r:"14.344",fill:"#ffffff","fill-opacity":"1",transform:"rotate(45 64 64)"}}),e._v(" "),t("circle",{attrs:{cx:"16",cy:"64",r:"12.531",fill:"#ffffff","fill-opacity":"1",transform:"rotate(90 64 64)"}}),e._v(" "),t("circle",{attrs:{cx:"16",cy:"64",r:"10.75",fill:"#ffffff","fill-opacity":"1",transform:"rotate(135 64 64)"}}),e._v(" "),t("circle",{attrs:{cx:"16",cy:"64",r:"10.063",fill:"#ffffff","fill-opacity":"1",transform:"rotate(180 64 64)"}}),e._v(" "),t("circle",{attrs:{cx:"16",cy:"64",r:"8.063",fill:"#ffffff","fill-opacity":"1",transform:"rotate(225 64 64)"}}),e._v(" "),t("circle",{attrs:{cx:"16",cy:"64",r:"6.438",fill:"#ffffff","fill-opacity":"1",transform:"rotate(270 64 64)"}}),e._v(" "),t("circle",{attrs:{cx:"16",cy:"64",r:"5.375",fill:"#ffffff","fill-opacity":"1",transform:"rotate(315 64 64)"}}),e._v(" "),t("animateTransform",{attrs:{attributeName:"transform",type:"rotate",values:"0 64 64;315 64 64;270 64 64;225 64 64;180 64 64;135 64 64;90 64 64;45 64 64",calcMode:"discrete",dur:"720ms",repeatCount:"indefinite"}})],1)])]):e._e()}),[],!1,null,null,null).exports);function be(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,r)}return t}function Ce(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?be(Object(source),!0).forEach((function(t){Object(n.a)(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):be(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}var ke={components:{IconMinus:de.a,IconPlus:me.a,IconArrow:oe.a,IconQuestion:L.a,IconClose:fe.a,Loader:_e,IconWarning:ye.a},filters:{formatDate:function(e){return new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}},data:function(){return{course:this.$route.query.course,plan:this.$route.query.plan,rkey:this.$route.query.rkey,expanded:!1,dropdownOpen:!1,hasPromoCode:!1}},computed:Ce(Ce(Ce({},Object(l.c)("checkout",["chargify","paymentInfo","order","currentTab","loadingChargify","loading"])),Object(l.b)({selectedCurrency:"checkout/currency"})),{},{showCurrencyDropdown:function(){return"fa"!==this.$config.platform&&(this.selectedCurrency&&!this.order.business&&!this.order.coins&&!this.order.upgrade&&!this.order.extend&&!(this.hasPaymentProfile&&"pay_pal"===this.paymentInfo.method))},coupon:{get:function(){return this.paymentInfo.plan.coupon.value},set:function(e){this.$store.commit("checkout/setCoupon",e)}},showPayPalButton:function(){return"pay_pal"===this.paymentInfo.method&&!this.hasPaymentProfile||"pay_pal"===this.paymentInfo.method&&this.paymentInfo.edit},hasPaymentProfile:function(){return this.order.paymentInfo&&this.order.paymentInfo.paymentProfileId},hasSufficientQuantity:function(){return!this.order.business||this.paymentInfo.plan.quantity>=this.minQuantity&&this.paymentInfo.plan.quantity<=this.maxQuantity},maxQuantity:function(){return this.order.coins?1e4:this.order.changeAllocation?30-this.order.currentQuantity:30},minQuantity:function(){return!this.order.changeAllocation&&this.order.business?2:1},showChangedInUSDInfo:function(){return("pay_pal"!==this.paymentInfo.method||"pay_pal"!==this.order.paymentInfo.paymentType||!this.order.paymentInfo.paymentProfileId||"USD"===this.selectedCurrency.value)&&(!(this.order.coins||this.order.upgrade||this.order.extend)&&("ds"===this.$config.platform&&"USD"!==this.selectedCurrency.value))}}),watch:{currentTab:function(e){"payment"===e&&(this.expanded=!0,this.$store.dispatch("checkout/setPaymentCart",{type:"new-subscription"}))}},mounted:function(){var e=this;this.$root.$on("emit-click",(function(t){t.target.closest(".currency")&&!t.target.classList.contains("currency")||(e.dropdownOpen=!1)})),this.coupon&&this.$route.query.coupon&&(this.hasPromoCode=!0)},methods:{removeCode:function(){var e=this;return Object(o.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.coupon="",e.$store.commit("checkout/setCouponRemoved",!0),t.next=4,e.$store.dispatch("checkout/fetchOrderSummary",{action:"removeCoupon"});case 4:e.hasPromoCode=!1;case 5:case"end":return t.stop()}}),t)})))()},expandSection:function(e){"desktop"!==this.$store.state.layout&&"payment"!==this.currentTab&&(e.target.classList.contains("currency")||e.target.closest(".currency")||(this.expanded=!this.expanded,this.$emit("expand",this.expanded)))},setQuantity:function(e){var t=+e.key;t||"Backspace"===e.key||"Delete"===e.key||0===t||"ArrowRight"===e.key||"ArrowLeft"===e.key||e.preventDefault()},setQuantityInState:function(e){var t=this;setTimeout((function(){var r=+e.target.value;r>t.maxQuantity?r=t.maxQuantity:r<t.minQuantity&&(r=t.minQuantity),e.target.value=r,t.$store.commit("checkout/setQuantity",{quantity:r,input:!0})}),1600)}}},we=(r(4512),Object(C.a)(ke,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"order-summary",class:{expanded:e.expanded||"payment"===e.currentTab||e.order.upgrade,"on-payment":"payment"===e.currentTab&&!e.order.upgrade}},[t("div",{staticClass:"heading",on:{click:function(t){return e.expandSection(t)}}},[t("h2",{staticClass:"h5"},[e._v("\n      Order Summary\n      "),e.$store.state.auth.user?e._e():t("IconArrow",{staticClass:"expand-arrow"})],1),e._v(" "),t("div",{staticClass:"total-price"},[e._v("\n      "+e._s(e._f("formatCurrency")(e.order.total,e.selectedCurrency))+"\n    ")]),e._v(" "),e.loading&&e.order.coins?t("Loader",{staticClass:"order-summary-loader coins",attrs:{type:"element"}}):e._e(),e._v(" "),e.showCurrencyDropdown?t("div",{staticClass:"currency",class:{loading:e.loading},on:{click:function(t){e.dropdownOpen=!e.dropdownOpen}}},[t("div",[e._v("\n        "+e._s(e.selectedCurrency.text)+"\n        "),t("IconArrow")],1),e._v(" "),t("ul",{directives:[{name:"show",rawName:"v-show",value:e.dropdownOpen,expression:"dropdownOpen"}]},[e._l(e.$store.getters["checkout/currencies"],(function(r,n){return["card"===e.paymentInfo.method||"pay_pal"===e.paymentInfo.method&&"INR"!==n?t("li",{key:n,on:{click:function(t){return e.$store.dispatch("checkout/setCurrency",n)}}},[e._v("\n            "+e._s(r)+" "+e._s(n)+"\n          ")]):e._e()]}))],2)]):e._e()],1),e._v(" "),t("div",{staticClass:"content"},[e.rkey||e.order.coins||e.order.coupon.hidden||["yt-campaign","rsc-campaign"].includes(e.$route.query.page)?e._e():t("div",{staticClass:"promo-code",class:{loading:e.loading}},[e.loading?t("Loader",{staticClass:"order-summary-loader",attrs:{type:"element"}}):e._e(),e._v(" "),e.order.coupon.applied?t("div",{staticClass:"promo-applied"},[t("p",[e._v("Promo Code applied: ")]),e._v(" "),t("span",{staticClass:"promo-discount"},[e._v(e._s(e.coupon)+" "),t("IconClose",{on:{click:e.removeCode}})],1)]):e.hasPromoCode?t("div",{staticClass:"promo-input-wrapper"},[t("div",{staticClass:"promo-input"},[t("div",[t("input",{directives:[{name:"model",rawName:"v-model",value:e.coupon,expression:"coupon"}],class:{invalid:e.order.coupon.value&&!e.order.coupon.applied},attrs:{type:"text",placeholder:"Enter Promo Code"},domProps:{value:e.coupon},on:{input:function(t){t.target.composing||(e.coupon=t.target.value)}}}),e._v(" "),e.order.coupon.value&&!e.order.coupon.applied?t("span",[e._v("Promo code not found")]):e._e()]),e._v(" "),t("button",{staticClass:"btn-primary btn-lg",attrs:{"data-event":"".concat(e.$route.query.plan,"_promocode.click"),"data-direct-send":""},on:{click:function(t){e.$store.dispatch("checkout/fetchOrderSummary"),e.$store.commit("checkout/setCouponRemoved",!1)}}},[e._v("\n            Apply\n          ")])]),e._v(" "),t("div",{staticClass:"promo-text",on:{click:function(t){e.hasPromoCode=!1,e.coupon=""}}},[e._v("\n          I don’t have a promo code\n        ")])]):e.order.changeAllocation?e._e():t("div",{staticClass:"promo-text",on:{click:function(t){e.hasPromoCode=!0}}},[e._v("\n        I have a promo code\n      ")])],1),e._v(" "),e.order.business||e.order.coins?t("div",{staticClass:"subscriptions-quantity-widget"},[t("div",{staticClass:"subscriptions-quantity"},[e.order.business?[e._v("\n          Subscriptions\n        ")]:e.order.coins?[e._v("\n          Coins\n        ")]:e._e(),e._v(" "),t("div",{staticClass:"quantity-widget"},[t("IconMinus",{staticClass:"decrease",class:{disabled:e.maxQuantity<=e.minQuantity||e.paymentInfo.plan.quantity<=e.minQuantity},on:{click:function(t){return e.$store.commit("checkout/setQuantity",{quantity:-1})}}}),e._v(" "),t("input",{staticClass:"quantity",class:{coins:e.order.coins},attrs:{type:"text"},domProps:{value:e.maxQuantity<e.paymentInfo.plan.quantity?e.maxQuantity:e.paymentInfo.plan.quantity},on:{keydown:e.setQuantity,keyup:e.setQuantityInState}}),e._v(" "),t("IconPlus",{staticClass:"increase",class:{disabled:e.paymentInfo.plan.quantity>=e.maxQuantity},on:{click:function(t){return e.$store.commit("checkout/setQuantity",{quantity:1})}}})],1)],2),e._v(" "),e.paymentInfo.plan.quantity>=e.maxQuantity&&e.order.business?t("div",{staticClass:"quantity-warning support"},[e._v("\n        If you want to purchase more than 30 subscriptions, please\n        "),t("span",{on:{click:function(t){return e.$store.dispatch("modals/open",{name:"contact-".concat(e.$store.state.auth.user?"support":"sales")})}}},[e._v("\n          contact "+e._s(e.$store.state.auth.user?"support":"sales"))])]):e._e()]):e._e(),e._v(" "),t("div",{staticClass:"order-details"},[e.order.course?[e._m(0),e._v(" "),t("div",{staticClass:"details-row highlight"},[t("div",[e._v(e._s(e.order.plan.name))]),e._v(" "),t("div",[e._v(e._s(e._f("formatCurrency")(e.order.plan.price,e.selectedCurrency)))])]),e._v(" "),t("br"),e._v(" "),t("br")]:[t("div",{directives:[{name:"show",rawName:"v-show",value:!e.order.coins,expression:"!order.coins"}],staticClass:"details-row title"},[t("div",[e._v("Plan")]),e._v(" "),t("div",[e._v("Price")])]),e._v(" "),t("div",{directives:[{name:"show",rawName:"v-show",value:!e.order.coins,expression:"!order.coins"}],staticClass:"details-row highlight"},[t("div",[e._v(e._s(e.order.plan.name))]),e._v(" "),t("div",[e._v("\n            "+e._s(e._f("formatCurrency")(e.order.plan.pricePerMonth||e.order.plan.pricePerYear||e.order.plan.price,e.selectedCurrency))+"\n            "),e.order.business?t("span",{staticClass:"business-price-desc"},[e._v("\n              "+e._s(e.order.monthly?"month":"year")+"/user\n            ")]):e.order.lifetime?e._e():[e._v("\n              /month\n            ")]],2)]),e._v(" "),"lifetime"!==e.$route.query.plan||"lifetime"===e.$route.query.plan&&e.order.coupon.applied?t("hr"):e._e(),e._v(" "),e.order.plan.saving.pre?t("div",{staticClass:"details-row"},[t("div",[e._v("Base price")]),e._v(" "),t("div",[e._v(e._s(e._f("formatCurrency")(e.order.plan.saving.pre,e.selectedCurrency)))])]):e._e(),e._v(" "),e.order.plan.saving.percent&&!e.order.coupon.applied?t("div",{staticClass:"details-row savings"},[t("div",[e._v(e._s(e.order.plan.name)+" Savings "),t("span",{staticClass:"promo-discount"},[e._v(e._s(e.order.plan.saving.percent)+"%")])]),e._v(" "),t("div",[e._v("-"+e._s(e._f("formatCurrency")(e.order.plan.saving.amount,e.selectedCurrency)))])]):e._e(),e._v(" "),+e.order.plan.saving.tieredPricing?t("div",{staticClass:"details-row"},[t("div",[e._v("Tiered Pricing Savings")]),e._v(" "),t("div",[e._v("-"+e._s(e._f("formatCurrency")(e.order.plan.saving.tieredPricing,e.selectedCurrency)))])]):e._e(),e._v(" "),+e.order.plan.saving.proration?t("div",{staticClass:"details-row"},[t("div",[e._v("Proration Savings")]),e._v(" "),t("div",[e._v("-"+e._s(e._f("formatCurrency")(e.order.plan.saving.proration,e.selectedCurrency)))])]):e._e(),e._v(" "),e.order.coins&&+e.order.coinSavings?t("div",{staticClass:"details-row"},[t("div",[e._v("Coin Savings")]),e._v(" "),t("div",[e._v("-"+e._s(e._f("formatCurrency")(e.order.coinSavings,e.selectedCurrency)))])]):e._e()],e._v(" "),e.order.coins&&e.order.coupon.applied?t("div",{staticClass:"details-row promo"},[t("div",[e._v("Benefit Savings "),t("span",{staticClass:"promo-discount"},[e._v(e._s(e.order.coupon.discountPercent)+"%")])]),e._v(" "),t("div",[e._v("-"+e._s(e._f("formatCurrency")(e.order.discount,e.selectedCurrency)))])]):e.order.coupon.applied?t("div",{staticClass:"details-row promo"},[t("div",[e._v("Promo Code Savings "),t("span",{staticClass:"promo-discount"},[e._v(e._s(e.order.coupon.discountPercent)+"%")])]),e._v(" "),t("div",[e._v("-"+e._s(e._f("formatCurrency")(e.order.discount,e.selectedCurrency)))])]):e._e(),e._v(" "),t("hr",{staticClass:"pre-subtotal"}),e._v(" "),t("div",{staticClass:"details-row subtotal"},[t("div",[e._v("Subtotal")]),e._v(" "),t("div",[e._v(e._s(e._f("formatCurrency")(e.order.subtotal,e.selectedCurrency)))])]),e._v(" "),t("div",{staticClass:"details-row tooltip-holder"},[t("div",[e._v("\n          Tax "),t("IconQuestion",{staticClass:"icon-question"}),e._v(" "),t("div",{staticClass:"tooltip"},[e._v("\n            Depending on your country of residence, additional tax may be applied.\n          ")])],1),e._v(" "),t("div",[e._v(e._s(e._f("formatCurrency")(e.order.tax,e.selectedCurrency)))])]),e._v(" "),e.order.proratedCredit?t("div",{staticClass:"details-row tooltip-holder"},[t("div",[e._v("\n          Prorated Credit "),t("IconQuestion",{staticClass:"icon-question"}),e._v(" "),t("div",{staticClass:"tooltip"},[e._v("\n            Prorated credit for (Subscription Plans) "+e._s(e.order.plan.current)+"\n          ")])],1),e._v(" "),t("div",[e._v("-"+e._s(e._f("formatCurrency")(e.order.proratedCredit,e.selectedCurrency)))])]):e._e(),e._v(" "),t("hr"),e._v(" "),t("div",{staticClass:"details-row total"},[t("div",[e.order.business&&e.order.trial?[e._v("\n            Pay Now\n          ")]:[e._v("\n            Total\n          ")]],2),e._v(" "),t("div",[e._v(e._s(e._f("formatCurrency")(e.order.total,e.selectedCurrency)))])])],2),e._v(" "),e.showChangedInUSDInfo?t("div",{staticClass:"currency-alert"},[e._v("\n      *Shown in "+e._s(e.selectedCurrency.value)+", but charged in USD\n    ")]):e._e(),e._v(" "),"fa"===e.$config.platform||e.order.coins&&"USD"===e.selectedCurrency.value?t("div",{staticClass:"currency-alert"},[e._v("\n      *Prices are in USD\n    ")]):e._e(),e._v(" "),t("div",{staticClass:"charge",class:{important:e.order.business&&e.order.trial||e.order.freeAccess}},[e.order.business&&e.order.trial||e.order.freeAccess?[t("IconWarning",{staticClass:"icon"}),e._v(" "),e.order.business&&e.order.trial?[e._v("\n          You will be charged "+e._s(e._f("formatCurrency")(e.order.totalAfterTrial,e.selectedCurrency))+" on "+e._s(e._f("formatDate")(e.order.nextBilling))+".\n        ")]:e.order.freeAccess?[e._v("\n          You will be charged "+e._s(e._f("formatCurrency")(e.order.totalAfterFreeAccess,e.selectedCurrency))+" on "+e._s(e._f("formatDate")(e.order.nextBilling))+".\n        ")]:e._e()]:[e._v("\n        You will be charged "+e._s(e._f("formatCurrency")(e.order.total,e.selectedCurrency))+" today.\n        "),e.order.course||e.order.lifetime?[e._v("\n          This one-off payment provides you with lifetime access\n        ")]:e.order.coins?[e._v("\n          Coin purchases are non-refundable\n        ")]:[e._v("\n          Your next billing date will be on "+e._s(e._f("formatDate")(e.order.nextBilling))+".\n        ")]]],2),e._v(" "),"payment"===e.currentTab?t("div",{staticClass:"payment"},["card"===e.paymentInfo.method||"pay_pal"===e.paymentInfo.method&&!e.paymentInfo.edit&&e.hasPaymentProfile?t("button",{staticClass:"btn-primary btn-lg order-button",attrs:{disabled:e.loading||e.loadingChargify||!e.$store.state.auth.user||"payment"!==e.currentTab||!e.hasSufficientQuantity,"data-event":"".concat(e.$route.query.plan,"_completepayment.click"),"data-async-event":"","data-direct-send":""},on:{click:function(t){return e.$store.dispatch("checkout/getChargifyTokenAndPay")}}},[e._v("\n        Complete Payment\n      ")]):e._e(),e._v(" "),t("div",{directives:[{name:"show",rawName:"v-show",value:e.showPayPalButton,expression:"showPayPalButton"}],class:{show:e.showPayPalButton},attrs:{id:"pay-pal",disabled:e.loading||e.loadingChargify||!e.$store.state.auth.user||"payment"!==e.currentTab||"INR"===e.selectedCurrency.value||!e.hasSufficientQuantity}}),e._v(" "),e.$store.state.auth.user?t("div",{staticClass:"support"},[e._v("\n        Need help? "),t("span",{on:{click:function(t){return e.$store.dispatch("modals/open",{name:"feedback"})}}},[e._v("Contact support")])]):e._e()]):e._e()])])}),[function(){var e=this,t=e._self._c;return t("div",{staticClass:"details-row title"},[t("div",[e._v("Course")]),e._v(" "),t("div",[e._v("Price")])])}],!1,null,null,null).exports),xe=r(3626),Pe=r.n(xe),$e=r(3605),Ie=r.n($e),Ae=r(3604),Oe=r.n(Ae),Se=r(3625),Te=r.n(Se),Ne=r(4240),je=r.n(Ne),qe=r(4241),Ee=r.n(qe),Le=r(3627),De=r.n(Le),Be={components:{IconSecureStripe:je.a,IconSecurePaypal:Ee.a,IconNortonSecured:De.a},props:{title:{type:String,default:"Safe and Secure checkout"},className:{type:String,default:""}}},Re=(r(4513),Object(C.a)(Be,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"secure-section",class:Object(n.a)({},e.className,e.className)},[t("p",{staticClass:"title"},[e._v("\n    Safe and Secure checkout\n  ")]),e._v(" "),t("div",{staticClass:"secure-icons"},[t("IconNortonSecured",{staticClass:"icon-norton-secured"}),e._v(" "),t("IconSecureStripe"),e._v(" "),t("IconSecurePaypal")],1)])}),[],!1,null,"1f83be87",null).exports);function Fe(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,r)}return t}function ze(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?Fe(Object(source),!0).forEach((function(t){Object(n.a)(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):Fe(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}var Ue={components:{AccountForm:z,LoginForm:Y,Payment:le,OrderSummary:we,IconCheck:H.a,IconVisa:Pe.a,IconMastercard:Ie.a,IconAmericanExpress:Oe.a,IconPaypal:Te.a,IconPaypalLogo:Z.a,Loader:_e,SecureIcons:Re,Badges:d.a},data:function(){return{tabs:{account:{name:"Account",id:1},payment:{name:"Payment",id:2}},loginForm:!1,accountVerified:this.$store.state.auth.user,clickedSection:null}},head:function(){var e=this.order.plan.name,t="Checkout - ".concat(e);return{titleTemplate:"".concat(t,"%s")}},computed:ze(ze({},Object(l.c)("checkout",["order","paymentInfo","loadingChargify"])),{},{cardIcon:function(){if(this.order.paymentInfo){var e=this.order.paymentInfo.cardType;if(["visa","discover"].includes(e))return r(4235)("./icon-payment-card-".concat(e,".svg"));if("master"===e)return r(3605);if("american_express"===e)return r(3604)}return!1},maskedCardNumber:function(){return this.order.paymentInfo?this.order.paymentInfo.maskedCardNumber:""},currentTab:{get:function(){return this.$store.state.checkout.currentTab},set:function(e){this.dispatchDataEvent(!0),this.$store.commit("checkout/setCurrentTab",e)}},paymentProfile:function(){return!!this.order.paymentInfo&&this.order.paymentInfo.paymentProfileId}}),mounted:function(){var e=this;this.$nextTick((function(){window.addEventListener("scroll",e.handleScroll),e.$once("hook:beforeDestroy",(function(){return window.removeEventListener("scroll",e.handleScroll)}))})),this.accountVerified||this.$store.commit("checkout/setLoadingChargify",!1),this.$store.commit("dataLayer/resetRegistered"),this.dispatchDataEvent()},methods:{handleScroll:function(){if("mobile"===this.$store.state.layout&&this.clickedSection){var e="lms"===this.$config.project?-64:-68,t=this.clickedSection.getBoundingClientRect().top+window.pageYOffset+e;t<window.pageYOffset&&window.scrollTo({top:t,behavior:"instant"})}},changeTab:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"payment";!(arguments.length>1&&void 0!==arguments[1]&&arguments[1])&&(this.currentTab===t||"account"===t&&this.accountVerified||"payment"===t&&!this.$store.state.auth.user)||(this.currentTab=t,"mobile"===this.$store.state.layout&&setTimeout((function(){var t=document.querySelector(".step.active");e.scrollToSection(t)}),200))},scrollToSection:function(element){var e=this,t="lms"===this.$config.project?-64:-68,r=element.getBoundingClientRect().top+window.scrollY-t;this.clickedSection=element,window.scrollTo({top:r,behavior:"smooth"}),setTimeout((function(){e.clickedSection=null}),500)},loggedSuccessfully:function(){var e=this;return Object(o.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.accountVerified=!0,e.$store.commit("checkout/setLoadingChargify",!0),t.next=4,e.$store.dispatch("checkout/fetchOrderSummary",{loggedIn:!0});case 4:e.changeTab("payment",!0);case 5:case"end":return t.stop()}}),t)})))()},orderSummaryExpanded:function(e){var t=this;e?(document.querySelector(".steps-holder").classList.add("summary-expanded"),setTimeout((function(){var e=document.querySelector(".order-summary"),r="lms"===t.$config.project?-64:-68;window.scrollTo({top:e.getBoundingClientRect().top+window.pageYOffset+r,behavior:"smooth"})}),300)):document.querySelector(".steps-holder").classList.remove("summary-expanded")},dispatchDataEvent:function(e){var t=this.tabs[this.currentTab].id,r={event:"checkoutStep",value:t};[1,2].includes(t)&&(!e||e&&!dataLayer.find((function(e){return"eec.checkout"===e.event})))&&(r={event:"checkout",value:{step:t,planTitle:this.order.plan.name,extId:this.order.plan.extId,price:this.order.plan.price}}),this.$store.dispatch("dataLayer/addEvent",r)}}},Qe=Ue;r(4514);function Me(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,r)}return t}function Ve(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?Me(Object(source),!0).forEach((function(t){Object(n.a)(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):Me(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}var Ye={components:{Checkout:Object(C.a)(Qe,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"container"},[t("div",{staticClass:"checkout"},[t("h1",{staticClass:"h2"},[e._v("\n      Checkout\n    ")]),e._v(" "),t("div",{staticClass:"tabs"},[t("div",{staticClass:"tab",class:{active:"account"===e.currentTab}},[t("span",[e._v("1")]),e._v("\n        Account\n      ")]),e._v(" "),t("div",{staticClass:"progress-bar",class:{full:"payment"===e.currentTab}},[t("div")]),e._v(" "),t("div",{staticClass:"tab",class:{active:"payment"===e.currentTab}},[t("span",[e._v("2")]),e._v("\n        Payment\n      ")])]),e._v(" "),t("div",{staticClass:"row"},[t("div",{staticClass:"col col-8 steps-holder",class:[e.currentTab,e.order.upgrade||e.order.extend?"verified":""]},[t("div",{staticClass:"step",class:{active:"account"===e.currentTab,verified:e.accountVerified},on:{click:function(t){return e.changeTab("account")}}},[t("div",{staticClass:"heading"},[t("h2",{staticClass:"h5"},[e.accountVerified?[t("div",{staticClass:"icon-check"},[t("IconCheck")],1),e._v("\n                "+e._s("1. Account Details - ".concat(e.$store.state.auth.user.name))+"\n              ")]:[e._v("\n                1. Account details\n              ")]],2),e._v(" "),e.loginForm?t("div",[e._v("\n              Don't have an account? "),t("a",{staticClass:"link-accent",on:{click:function(t){e.loginForm=!1,e.$store.commit("auth/setLoginAlert",!1)}}},[e._v("\n                Sign up\n              ")])]):t("div",[e._v("\n              Already have an account? "),t("a",{staticClass:"link-accent",on:{click:function(t){e.loginForm=!0,e.$store.commit("auth/setLoginAlert",!1)}}},[e._v("\n                Login\n              ")])])]),e._v(" "),t("div",{staticClass:"content"},[e.loginForm?t("LoginForm",{on:{continue:e.loggedSuccessfully}}):t("AccountForm",{on:{continue:e.loggedSuccessfully}})],1)]),e._v(" "),t("div",{staticClass:"step",class:{active:"payment"===e.currentTab&&(!e.order.upgrade&&!e.order.extend&&!e.paymentProfile||e.paymentInfo.edit),verified:e.order.upgrade||e.order.extend||e.paymentProfile},on:{click:function(t){return e.changeTab("payment")}}},[t("div",{staticClass:"heading"},[t("h2",{staticClass:"h5",class:[e.paymentProfile&&e.paymentInfo.edit?"back-button":""]},[!e.order.upgrade&&!e.paymentProfile||e.paymentInfo.edit?e._e():t("div",{staticClass:"icon-check"},[t("IconCheck")],1),e._v("\n              2. Payment\n\n              "),e.paymentProfile&&e.paymentInfo.edit?t("span",{on:{click:function(t){return e.$store.commit("checkout/setPaymentInfoEdit",!1)}}},[e._v("\n                Go back\n              ")]):e._e()]),e._v(" "),!e.paymentProfile||e.paymentProfile&&e.paymentInfo.edit?t("div",{staticClass:"payment-icons"},[t("IconVisa"),e._v(" "),t("IconMastercard"),e._v(" "),t("IconAmericanExpress"),e._v(" "),t("span",{staticClass:"paypal"},[t("IconPaypal")],1)],1):e._e()]),e._v(" "),e.paymentProfile&&!e.paymentInfo.edit?t("div",{staticClass:"payment-verified"},[t("div",{staticClass:"card"},["card"===e.paymentInfo.method?[t(e.cardIcon,{tag:"component"}),e._v("\n                "+e._s(e.maskedCardNumber)+"\n              ")]:"pay_pal"===e.paymentInfo.method?[t("IconPaypalLogo"),e._v(" PayPal\n              ")]:e._e()],2),e._v(" "),t("span",{on:{click:function(t){return e.$store.commit("checkout/setPaymentInfoEdit",!0)}}},[e._v("\n              Change\n            ")])]):e._e(),e._v(" "),t("div",{staticClass:"content"},[t("Payment",{staticClass:"payment"})],1)]),e._v(" "),e.order.coins||(e.order.upgrade||e.order.extend||e.order.changeAllocation||e.order.business&&!e.order.trial)&&!e.paymentInfo.edit?t("div",{staticClass:"important-information",class:{coins:e.order.coins}},[t("h2",{staticClass:"h5"},[e._v("\n            Buy More, Save More\n          ")]),e._v(" "),e.order.coins?t("div",{staticClass:"coins-info"},[t("p",{staticClass:"body-2"},[e._v("\n              We offer а volume-based pricing system that gives you a more significant discount when buying coins in bulk. The more coins you buy, the lower the price per coin. Please allow some time for your coin purchases to appear in your account.\n            ")]),e._v(" "),t("h3",{staticClass:"h6"},[e._v("\n              Tiered coin pricing\n            ")]),e._v(" "),e._m(0)]):e.order.changeAllocation?t("div",{staticClass:"allocation-change-info"},[t("p",{staticClass:"body-2"},[e._v("\n              Tiered pricing will provide you with automated discount for the higher number of subscriptions you add. The price of each subscription is assessed within its tier. For example, buying 3 subscriptions will cost $"+e._s(2*e.order.prices[0].price+e.order.prices[1].price)+" (2*"+e._s(e.order.prices[0].priceFormatted)+" + 1*"+e._s(e.order.prices[1].priceFormatted)+"). "),t("br"),e._v(" "),t("br"),e._v(" "),e._l(e.order.prices,(function(r,n){return t("span",{key:n},[e._v("\n                "+e._s(r.startingQuantity)+"-"+e._s(r.endingQuantity)+" Subscriptions "),t("strong",[e._v(e._s(r.priceFormatted))]),e._v(" each "),t("br")])}))],2),e._v(" "),t("h2",{staticClass:"h5"},[e._v("\n              Current Subscriptions information\n            ")]),e._v(" "),t("p",{staticClass:"body-2"},[e._v("\n              Proration will further reduce the prices of new subscriptions to match the remaining period of your current ones.\n            ")]),e._v(" "),t("p",{staticClass:"body-2 current-subscriptions"},[e._v("\n              Number of current subscriptions: "),t("span",[e._v(e._s(e.order.currentQuantity))])])]):e.order.business&&!e.order.trial?t("p",{staticClass:"body-2"},[e._v("\n            Tiered pricing will provide you with automated discount for the higher number of subscriptions you add. The price of each subscription is assessed within its tier. For example, buying 3 subscriptions will cost $"+e._s(2*e.order.prices[0].price+e.order.prices[1].price)+" (2*"+e._s(e.order.prices[0].priceFormatted)+" + 1*"+e._s(e.order.prices[1].priceFormatted)+"). "),t("br"),e._v(" "),t("br"),e._v(" "),e._l(e.order.prices,(function(r,n){return t("span",{key:n},[e._v("\n              "+e._s(r.startingQuantity)+"-"+e._s(r.endingQuantity)+" Subscriptions "),t("strong",[e._v(e._s(r.priceFormatted))]),e._v(" each "),t("br")])}))],2):t("p",{staticClass:"body-2"},[e._v("\n            "+e._s(e.order.extend?"Your subscription will be extended for a period of ".concat(e.order.plan.period," ").concat(1===e.order.plan.period?"month":"months"," immediately after you complete this payment."):"Your subscription will be upgraded to the ".concat(e.order.plan.name," immediately after you complete this payment."))+"\n          ")])]):e._e(),e._v(" "),e.loadingChargify?t("Loader",{staticClass:"payment-form-loader",attrs:{type:"element"}}):e._e(),e._v(" "),t("SecureIcons",{staticClass:"secure-icons"})],1),e._v(" "),t("div",{staticClass:"col col-4"},[e.order.preview?t("OrderSummary",{on:{expand:e.orderSummaryExpanded}}):e._e(),e._v(" "),"mobile"!==e.$store.state.layout||"account"!==e.currentTab?t("Badges",{staticClass:"checkout-badges",attrs:{"hide-money-back":e.order.coins,"info-icon":"question"}}):e._e(),e._v(" "),t("SecureIcons",{staticClass:"secure-icons",attrs:{"class-name":"mobile"}})],1)])])])}),[function(){var e=this,t=e._self._c;return t("ol",{staticClass:"price-list"},[t("li",[t("div",[e._v("1 - 9 coins: "),t("span",[e._v("$1")]),e._v(" each")])]),e._v(" "),t("li",[t("div",[e._v("10 - 24 coins: "),t("span",[e._v("$0.9")]),e._v(" each")])]),e._v(" "),t("li",[t("div",[e._v("25 - 49 coins: "),t("span",[e._v("$0.8")]),e._v(" each")])]),e._v(" "),t("li",[t("div",[e._v("50 - 99 coins: "),t("span",[e._v("$0.7")]),e._v(" each")])]),e._v(" "),t("li",[t("div",[e._v("100+ coins: "),t("span",[e._v("$0.6")]),e._v(" each")])])])}],!1,null,null,null).exports},mixins:[c.a],beforeRouteLeave:function(e,t,r){var n=this;return Object(o.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("account"!==n.$store.state.checkout.currentTab){t.next=5;break}return t.next=3,n.$store.dispatch("checkout/setPaymentCart",{type:"no-user",email:n.$store.state.checkout.account.email,firstName:n.$store.state.checkout.account.firstName,lastName:n.$store.state.checkout.account.lastName});case 3:t.next=8;break;case 5:if("payment"!==n.$store.state.checkout.currentTab){t.next=8;break}return t.next=8,n.$store.dispatch("checkout/setPaymentCart",{type:n.$store.state.checkout.order.upgrade?"upgrade":"new-subscription"});case 8:if(!["/start-learning/","/resources-center/offer/"].includes(e.path)){t.next=11;break}return window.location.href=e.path,t.abrupt("return",!0);case 11:return t.abrupt("return",r());case 12:case"end":return t.stop()}}),t)})))()},asyncData:function(e){return Object(o.a)(regeneratorRuntime.mark((function t(){var r,n,o,c,l,d,m,v,f,h,y,_,C,k,w;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.$axios,n=e.$config,o=e.store,c=e.route,l=e.redirect,c.query.plan||c.query.course){t.next=3;break}return t.abrupt("return",l("/pricing/"));case 3:if("coins"!==c.query.plan){t.next=5;break}return t.abrupt("return",l("/pricing/"));case 5:if(!c.query.msg||"successful"!==c.query.msg||!o.getters["auth/user"].id){t.next=9;break}if("coins"!==c.query.plan){t.next=8;break}return t.abrupt("return",l("".concat(n.lmsUrl,"/coins/")));case 8:return t.abrupt("return",l("".concat(n.lmsUrl,"/thank-you/?subscribe=true")));case 9:return(d=+c.query.quantity||1)>30&&"coins"!==c.query.plan?d=30:d<2&&"coins"!==c.query.plan&&(d=2),o.commit("checkout/setQuantity",{quantity:d,input:!0}),m=c.query,v=m.plan,f=m.coupon,h=m.rkey,y=m.promo,_=m.page,C=m.ptype,t.next=15,o.dispatch("checkout/fetchOrderSummary",{plan:v,coupon:f,rkey:h,promo:y,page:_,ptype:C});case 15:t.next=37;break;case 20:if("extend-no-better-price"!==k.type){t.next=22;break}return t.abrupt("return",l("/pricing/?alert=".concat(k.type,"&currentPlan=").concat(c.query.plan)));case 22:if("course-purchased"!==k.type){t.next=24;break}return t.abrupt("return",l("/pricing/?alert=".concat(k.type)));case 24:if(!k.existingLifetime){t.next=26;break}return t.abrupt("return",l("/pricing/?alert=existing-lifetime"));case 26:if(!k.lifetime){t.next=28;break}return t.abrupt("return",l("/pricing/?alert=lifetime"));case 28:if(!k.notChargify){t.next=30;break}return t.abrupt("return",l("/pricing/?alert=fs-not-allowed"));case 30:if(!k.invalidEmail){t.next=32;break}return t.abrupt("return",l("/pricing/?alert=invalid-email"));case 32:if(!k.redirect){t.next=34;break}return t.abrupt("return",l("/checkout/?plan=".concat(k.redirect)));case 34:return t.abrupt("return",l("/pricing/"));case 35:if(!k.invalidKey){t.next=37;break}return t.abrupt("return",l("/checkout/?plan=annual"));case 37:return t.next=39,r.$get("/pages/".concat(c.fullPath)).catch((function(){return!1}));case 39:return w=t.sent,t.abrupt("return",{page:w});case 41:case"end":return t.stop()}}),t)})))()},head:function(){var e=this.$linkedDataLoad([{key:"WebSite"},{key:"WebPage",values:this.page}]);return{titleTemplate:"Checkout%s",link:[{rel:"canonical",href:this.canonicalURL()}],meta:this.metaProps(Ve(Ve({},this.page),{},{robots:"noindex, nofollow"})),script:[{src:"https://js.chargify.com/latest/chargify.js",async:!0,type:"text/javascript"},e]}},created:function(){this.$route.query.msg&&this.$store.dispatch("modals/open",{name:"payment-taking-longer"})}},Ge=(r(4515),Object(C.a)(Ye,(function(){var e=this._self._c;return e("div",{staticClass:"checkout-page"},[e("Checkout")],1)}),[],!1,null,"c49fa696",null));t.default=Ge.exports},532:function(e,t){e.exports={functional:!0,render(e,t){const{_c:r,_v:n,data:data,children:o=[]}=t,{class:c,staticClass:l,style:style,staticStyle:d,attrs:m={},...v}=data;return r("svg",{class:[c,l],style:[style,d],attrs:Object.assign({width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m),...v},o.concat([r("path",{attrs:{d:"M12 5.25C4.5 5.25 1.5 12 1.5 12s3 6.75 10.5 6.75S22.5 12 22.5 12s-3-6.75-10.5-6.75z",stroke:"#858A93","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}}),r("path",{attrs:{d:"M12 15.75a3.75 3.75 0 100-7.5 3.75 3.75 0 000 7.5z",stroke:"#858A93","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}})]))}}}}]);
//# sourceMappingURL=9fa3ca1.js.map