(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["7f332a7d"],{3981:function(e,t,i){},5177:function(e,t,i){"use strict";var s=i("1528"),a=s["a"].setScrollPosition,r=function(){var e=document.querySelector(".q-field-with-error");a(window,e.offsetTop,750)};t["a"]={methods:{scrollToError:function(){return window.setTimeout(function(){r()},250),!1}}}},7957:function(e,t,i){"use strict";var s=i("3981"),a=i.n(s);a.a},bab1:function(e,t,i){"use strict";i.r(t);var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("q-page",{staticClass:"checkout-identification row",attrs:{"data-test":e.CypressTarget("IdentificationPage"),padding:""}},[i("div",{staticClass:"col-xs-12 col-sm-12 col-md-12 col-lg-10"},[i("div",{staticClass:"row"},[i("div",{staticClass:"col-xs-12"},[i("h3",{staticClass:"no-margin checkout-identification-title",attrs:{"data-test":e.CypressTarget("DynamicName")}},[e._v("\n          "+e._s(e.$t("label.greetingsName",{name:e.userName}))+"\n        ")]),e.hideLogoff?e._e():i("p",{staticClass:"q-mt-sm checkout-identification-sub-title"},[e._v("\n          "+e._s(e.$t("label.notYou"))+"\n          "),i("router-link",{class:"text-"+e.SET_COLOR.primary,attrs:{"data-test":e.CypressTarget("NotYouLink"),to:e.checkoutLogin,replace:""}},[e._v("\n            "+e._s(e.$t("label.changeUser"))+"\n          ")])],1)])]),i("div",{staticClass:"row justify-start gutter-sm"},[i("div",{class:e.hideAddressForm?"col-xs-12 offset-md-3 col-md-6":"col-xs-12 col-sm-12 col-md-6"},[i("q-card",{staticClass:"relative-position checkout-identification-card-form",attrs:{"data-test":e.CypressTarget("UserCard")}},[i("q-card-title",[e._v(e._s(e.$t("label.userInformation")))]),i("q-card-main",[i(e.identificationForm.user,{ref:"userForm",tag:"component",attrs:{"is-new-user":e.newUser,value:e.userData.information,"fields-settings":e.userFieldsSettings,"can-edit-cpf":e.canEditCPF,"can-edit-name":e.canEditName,"can-edit":e.canUserEditForm,"external-loading":e.externalLoading,"edit-mode":e.isLogged,"imperial-system":e.isImperialSystem,"age-rating":e.ageRating},on:{input:function(t){e.userData.information=t},blur:e.checkForExistingUser}}),i("div",{staticClass:"campos-dinamicos"},[e.shouldShowQuestions?i("form-dynamic",{ref:"dynamicForm",attrs:{"can-edit":e.canUserEditForm,fields:e.userFields,value:e.userValues,"get-upload-url":e.getUploadUrl},on:{input:e.answerQuestions}}):e._e()],1)],1),i("br"),i("br"),e.canUserEditForm?e._e():i("q-card-separator"),e.canUserEditForm?e._e():i("q-card-actions",[i("div",{staticClass:"col-xs-12 col-sm-12 content-start",attrs:{"data-test":e.CypressTarget("Buttons")}},[i("q-btn",{attrs:{"data-test":e.CypressTarget("EditForm"),color:"dark",flat:"",dense:"",rounded:""},on:{click:e.changeUserData}},[e._v("\n                "+e._s(e.$t("button.change"))+"\n              ")])],1)]),i("q-inner-loading",{attrs:{visible:e.loading||e.externalLoading}},[i("q-spinner",{attrs:{color:e.SET_COLOR.primary,size:"50px"}})],1)],1)],1),i("div",{class:e.hideAddressForm?"hidden":"col-xs-12 col-sm-12 col-md-6"},[i("q-card",{staticClass:"relative-position checkout-identification-card-form",attrs:{"data-test":e.CypressTarget("AddressCard")}},[i("q-card-title",[e._v(e._s(e.$t("label.userAddress")))]),i("q-card-main",[i(e.identificationForm.address,{ref:"addressForm",tag:"component",attrs:{value:e.userData.address,"fields-settings":e.addressFieldsSettings,"external-loading":e.externalLoading,"can-edit":e.canUserEditForm,"edit-mode":e.isLogged},on:{input:function(t){e.userData.address=t}}})],1),i("br"),i("br"),e.canUserEditForm?e._e():i("q-card-separator"),e.canUserEditForm?e._e():i("q-card-actions",[i("div",{staticClass:"col-xs-12 col-sm-12 content-start",attrs:{"data-test":e.CypressTarget("Buttons")}},[i("q-btn",{attrs:{"data-test":e.CypressTarget("EditForm"),color:"dark",flat:"",dense:"",rounded:""},on:{click:e.changeUserData}},[e._v("\n                "+e._s(e.$t("button.change"))+"\n              ")])],1)]),i("q-inner-loading",{attrs:{visible:e.loading}},[i("q-spinner",{attrs:{color:e.SET_COLOR.primary,size:"50px"}})],1)],1)],1)]),i("div",{staticClass:"campos-dinamicos"},[i("form-user-extra",{ref:"extraForm",attrs:{value:e.getUserExtras,"can-edit":e.canUserEditForm,"edit-mode":e.isLogged,"unchecked-fields":!0},on:{input:function(t){e.userData.extra=t}}})],1),i("div",{staticClass:"row q-mt-md",staticStyle:{"justify-content":"flex-end !important"}},[i("div",{staticClass:"col-xs-12 col-sm-12 col-md-6"},[i("p",{staticClass:"q-caption q-pr-md q-pl-md text-faded"},[e._v("\n          This site is protected by reCAPTCHA and the Google\n          "),i("a",{attrs:{href:"https://policies.google.com/privacy"}},[e._v("Privacy Policy")]),e._v(" and\n          "),i("a",{attrs:{href:"https://policies.google.com/terms"}},[e._v("Terms of Service")]),e._v(" apply.\n        ")])]),i("div",{staticClass:"col-xs-12 col-sm-12 col-md-6 self-end"},[i("q-field",{attrs:{"data-test":e.CypressTarget("Buttons")}},[i("q-btn",{staticClass:"full-width",attrs:{"data-test":e.CypressTarget("Payment"),color:e.SET_COLOR_BUTTON.primary,"text-color":e.SET_COLOR_BUTTON.text.primary,label:e.advanceText,loading:e.isLoading||e.sendingData,disable:e.needValidation||e.sendingData,"icon-right":"fa fa-arrow-right",rounded:""},on:{click:e.setClientForPaymentWithoutToken}})],1)],1)])]),i("login-pin-modal",{attrs:{"save-local":!1},on:{userLoggedIn:e.validLogin,"close-dialog":function(t){e.openSelect=!1}},model:{value:e.openSelect,callback:function(t){e.openSelect=t},expression:"openSelect"}}),i("login-pin-modal",{attrs:{"save-local":!1},on:{userLoggedIn:e.setBuyer,"close-dialog":function(t){e.openSelectNewUser=!1},input:e.cancelPinModal},model:{value:e.openSelectNewUser,callback:function(t){e.openSelectNewUser=t},expression:"openSelectNewUser"}}),e.userNotValidated?i("user-not-validated",{model:{value:e.userNotValidated,callback:function(t){e.userNotValidated=t},expression:"userNotValidated"}}):e._e(),i("recaptcha-modal",{on:{"on-validation":e.setClientForPayment},model:{value:e.recaptchaModalIsOpen,callback:function(t){e.recaptchaModalIsOpen=t},expression:"recaptchaModalIsOpen"}})],1)},a=[];s._withStripped=!0;i("ac6a");var r=i("895c"),n=i.n(r),o=(i("a481"),i("96cf"),i("c973")),d=i.n(o),c=(i("28a5"),i("7f7f"),i("3156")),l=i.n(c),u=i("2a2d"),h=i("1fe0"),m=i("2f62"),g=i("57d5"),p=i("8c25"),f=i("5177"),v=i("240e"),b=i("9a10"),k=i("0d54"),x=i("0cc0"),F=i("c5ce"),$=i("4b58"),C={name:"CheckoutIdentification",components:{UserNotValidated:function(){return i.e("2d20959c").then(i.bind(null,"a94b"))},FormUserExtra:function(){return Promise.all([i.e("vuelidate"),i.e("2d0af66b"),i.e("2cc6a69e")]).then(i.bind(null,"1721"))},FormDynamic:function(){return Promise.all([i.e("vuelidate"),i.e("2d0aab74"),i.e("2d228866")]).then(i.bind(null,"da0c"))},LoginPinModal:function(){return Promise.all([i.e("vuelidate"),i.e("2d0ba4f6")]).then(i.bind(null,"3751"))},RecaptchaModal:x["a"]},mixins:[p["a"],f["a"],b["a"],F["a"],$["a"]],data:function(){return{userData:l()({},k["b"]),canEdit:!1,canEditCPF:!1,canEditName:!1,externalLoading:!1,openSelect:!1,openSelectNewUser:!1,newUser:this.$route.params.newUser,form:{brazilian:{user:function(){return Promise.all([i.e("vuelidate"),i.e("fnando"),i.e("2d0af66b"),i.e("2d225805"),i.e("9ccdcb76")]).then(i.bind(null,"4264"))},address:function(){return Promise.all([i.e("vuelidate"),i.e("2d0af66b"),i.e("2d0db7d6"),i.e("48f9b984"),i.e("2d0c8e2f")]).then(i.bind(null,"5790"))}},foreigner:{user:function(){return Promise.all([i.e("vuelidate"),i.e("2d0af66b"),i.e("2d0e546c")]).then(i.bind(null,"9494"))},address:function(){return Promise.all([i.e("vuelidate"),i.e("2d0af66b"),i.e("2d0db7d6"),i.e("2d21ee69")]).then(i.bind(null,"d810"))}}},needValidation:!1,userNotValidated:!1,sendingData:!1,hideAddressForm:!1,fieldsSettings:{name:{isRequired:!0,isEnabled:!0},cpf:{isRequired:!0,isEnabled:!0},birthdate:{isRequired:!0,isEnabled:!0},gender:{isRequired:!1,isEnabled:!0},email:{isRequired:!0,isEnabled:!0},phone1:{isRequired:!0,isEnabled:!0},phone2:{isRequired:!1,isEnabled:!0},address:{isRequired:!0,isEnabled:!0},address2:{isRequired:!1,isEnabled:!0},district:{isRequired:!0,isEnabled:!0},city:{isRequired:!0,isEnabled:!0},state:{isRequired:!0,isEnabled:!0},country:{isRequired:!0,isEnabled:!0},zipcode:{isRequired:!0,isEnabled:!0},address_number:{isRequired:!0,isEnabled:!0},document_number:{isRequired:!0,isEnabled:!0}},addressFieldsSettings:{},userFieldsSettings:{},ageRating:{},recaptchaModalIsOpen:!1}},computed:l()({},Object(m["c"])("settings",["entity"]),Object(m["c"])("menu",["hideLogoff"]),Object(m["c"])("validation",{validationPending:"pending"}),Object(m["c"])("user",["getUserAddress","getUserInformation","getUserExtras","orderBuyerInfo","isGuestUser","isBrazilian","isForeigner","customerCode","loading"]),Object(m["c"])("ticketShoppingCart",{itemsInCart:"itemsInCart",cartFinalTotal:"cartFinalTotal",cartOrderCode:"cartOrderCode",cartLoading:"loading"}),Object(m["c"])("authentication",["isLogged","userAuthenticationData"]),Object(m["c"])("delivery",["hasDeliveryMethod"]),Object(m["c"])("customFields",["hasCustomFields","hasEventsFields","hasUserFields","userFields","userValues"]),{isLoading:function(){return this.validationPending||this.loading||this.cartLoading||this.needValidation},checkoutLogin:function(){return{name:g["l"],params:{switched:!0}}},isImperialSystem:function(){return this.userData.address.country===v["b"]},canUserEditForm:function(){return!(!this.$route.params.email||!this.newUser)||this.isLogged},userName:function(){if(this.userData.information.name){var e=this.userData.information.name.split(" ");return e.length>1?"".concat(e[0]," ").concat(e[1]):"".concat(e[0])}return this.$t("label.newUser")},userLanguage:function(){return this.isForeigner?"en-us":this.SET_LANGUAGE},identificationForm:function(){return!1===this.userData.information.isForeigner?this.form.brazilian:this.form.foreigner},advanceText:function(){return this.hasEventsFields||this.SET_CONFIG.checkout.seatName.active?this.$t("button.next"):this.hasDeliveryMethod?this.$t("button.delivery"):this.cartFinalTotal>0?this.$t("button.pay"):this.$t("button.concludeOrder")},shouldShowQuestions:function(){return this.hasUserFields&&this.canEdit}}),watch:{userData:{handler:function(e){this.changeUserState(e)},deep:!0,imediate:!0},isLoading:{handler:function(e,t){t&&!e&&this.setUserInitialData()},imediate:!0}},created:function(){var e=d()(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:document.title="".concat(this.SET_PAGE_NAME," | ").concat(this.$t("page.checkoutIdentification"));case 1:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),beforeMount:function(){var e=d()(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.validLogin();case 2:return this.itemsInCart?this.$route.params.fromLogin||this.$router.replace({name:g["l"]}):this.$router.replace("/"),this.setUserInitialData(),this.externalLoading=!0,e.next=7,this.getFieldsSettings({entityCode:this.entity,token:this.userAuthenticationData.token});case 7:this.fieldsSettings=e.sent,this.addressFieldsSettings={address:this.fieldsSettings.address,zipcode:this.fieldsSettings.zipcode,address2:this.fieldsSettings.address2,address_number:this.fieldsSettings.address_number,district:this.fieldsSettings.district,city:this.fieldsSettings.city,state:this.fieldsSettings.state,country:this.fieldsSettings.country},this.userFieldsSettings={name:this.fieldsSettings.name,email:this.fieldsSettings.email,cpf:this.fieldsSettings.cpf,birthdate:this.fieldsSettings.birthdate,phone1:this.fieldsSettings.phone1,phone2:this.fieldsSettings.phone2,gender:this.fieldsSettings.gender,facebook_id:this.fieldsSettings.facebook_id,document_number:this.fieldsSettings.document_number},this.setHideAddressForm(),this.externalLoading=!1;case 12:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),mounted:function(){var e=d()(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return this.$tracker.pageView({page:this.$route.path,title:this.$t("page.checkoutIdentification")}),this.resetCustomFields(),this.userData.information.facebook_id=this.$route.params.facebook_id,e.next=5,this.getAgeRating({orderCode:this.cartOrderCode});case 5:this.ageRating=e.sent;case 6:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),methods:l()({},Object(m["b"])("user",["loadedData","guestLogin","setUserData","getUserData","logoutUser","changeUserState","updateUserData","createNewUserData","setUserToken","userCountry"]),Object(m["b"])("customFields",["getFieldsSettings","getCustomFields","answerQuestions","saveCustomFields","getCustomFieldsValues","getUploadUrl"]),Object(m["b"])("customFields",{resetCustomFields:"reset"}),Object(m["b"])("authentication",["setUser"]),Object(m["b"])("ticketShoppingCart",["setOrderBuyer","getAgeRating"]),Object(m["b"])("validation",["fetchOrderValidation","validateOrder"]),{toggleRecaptchaModal:function(){this.recaptchaModalIsOpen=!this.recaptchaModalIsOpen},checkForExistingUser:Object(h["a"])(function(e){var t=this,i=e.field,s=e.value;return!("email"!==i||"email"===i&&!s||this.$refs.userForm&&this.$refs.userForm.$v.tempData&&this.$refs.userForm.$v.tempData.email.$error)&&(this.guestLogin({email:s,commitToState:!1}).then(function(e){t.$q.dialog({title:t.$t("dialog.foundUserInIdentification.title"),message:t.$t("dialog.foundUserInIdentification.msg",{email:s}),ok:!0,cancel:!0,preventClose:!0,noEscDismiss:!1,color:"dark"}).then(function(){t.newUser=!1,t.resetCustomFields(),t.setUserData(e),t.setUserInitialData()}).catch(function(){t.loadedData(),t.userData.information.email=""})}).catch(function(e){Object(u["a"])(e)}),!0)},250),setHideAddressForm:function(){var e=this,t=!0,i=n()(this.addressFieldsSettings);i.length>0&&i.forEach(function(i){var s=e.addressFieldsSettings[i];s&&(t=t&&!s.isEnabled)}),this.hideAddressForm=t},setUserInitialData:function(){this.userData.information=this.getUserInformation,this.userData.address=this.getUserAddress,this.userData.extra=this.getUserExtras,this.$route.params.cpf&&!this.userData.information.cpf&&(this.userData.information.cpf=this.$route.params.cpf),this.$route.params.email&&!this.userData.information.email&&(this.userData.information.email=this.$route.params.email),this.$route.params.facebook_id&&!this.userData.information.facebook_id&&(this.userData.information.facebook_id=this.$route.params.facebook_id),this.$route.params.name&&!this.userData.information.name&&(this.userData.information.name=this.$route.params.name),this.canEditCPF=""===this.userData.information.cpf,this.canEditName=""===this.userData.information.name},changeUserData:function(){this.setUser({email:this.getUserInformation.email,cpf:this.getUserInformation.cpf})&&(this.openSelect=!0)},validLogin:function(){var e=d()(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return this.isLogged&&this.setUserToken(this.userAuthenticationData.token),e.next=3,this.getUserData();case 3:return e.next=5,this.getCustomFields({orderCode:this.cartOrderCode,token:this.userAuthenticationData.token});case 5:if(this.isGuestUser){e.next=8;break}return e.next=8,this.getCustomFieldsValues({orderCode:this.cartOrderCode,customerCode:this.customerCode});case 8:this.openSelect=!1,this.canEdit=!0;case 10:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),validateForm:function(){var e=d()(regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(this.$refs.userForm&&this.$refs.addressForm){e.next=2;break}return e.abrupt("return",!1);case 2:if(this.$refs.userForm.$v.$touch(),!this.$refs.userForm.$v.$error){e.next=5;break}return e.abrupt("return",!1);case 5:return this.$refs.addressForm.touchForm(),this.$refs.extraForm.touchForm(),e.next=9,this.$nextTick();case 9:if(t=this.$refs.userForm.validateForm()||this.$refs.addressForm.validateForm()||this.$refs.extraForm.validateForm(),!this.hasUserFields){e.next=15;break}if(this.$refs.dynamicForm){e.next=13;break}return e.abrupt("return",!1);case 13:return this.$refs.dynamicForm.touchForm(),e.abrupt("return",!(t||this.$refs.dynamicForm.validateForm()));case 15:return e.abrupt("return",!t);case 16:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),setClientForPaymentWithoutToken:function(){this.setClientForPayment()},setClientForPayment:function(){var e=d()(regeneratorRuntime.mark(function e(){var t,i,s,a,r=this,n=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:void 0,e.next=3,this.validateForm();case 3:if(i=e.sent,!this.canUserEditForm||i){e.next=6;break}return e.abrupt("return",this.scrollToError());case 6:if(i){e.next=9;break}return this.$q.dialog({title:this.$t("dialog.incompleteRegistration.title"),message:this.$t("dialog.incompleteRegistration.msg"),color:"dark",ok:!0,preventClose:!0,noBackdropDismiss:!0,noEscDismiss:!0}).then(function(){r.changeUserData()}),e.abrupt("return",!1);case 9:if(s=l()({},this.userData),a=this.$store.state.settings.config.useExclusiveOptinRule,a&&(s.extra={optMailMarketing:!0}),this.changeUserState(s),this.sendingData=!0,!this.isLogged){e.next=16;break}return e.abrupt("return",this.updateUserData().then(function(){var e=d()(regeneratorRuntime.mark(function e(i){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(!1===i){e.next=4;break}return e.next=3,r.setBuyer(t);case 3:r.nextStep();case 4:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()).catch(function(e){var t,i,s,a,n,o;if(r.sendingData=!1,401===(null===e||void 0===e?void 0:null===(t=e.response)||void 0===t?void 0:t.status))r.toggleRecaptchaModal();else if(403===(null===e||void 0===e?void 0:null===(i=e.response)||void 0===i?void 0:i.status)){var d,c;r.isCouponMaxUsedErrorMessage(null===e||void 0===e?void 0:null===(d=e.response)||void 0===d?void 0:null===(c=d.data)||void 0===c?void 0:c.message)&&r.clearCoupon(e.response.data.message)}else"error.server.buyer.incomplete"===(null===e||void 0===e?void 0:null===(s=e.response)||void 0===s?void 0:null===(a=s.data)||void 0===a?void 0:a.message)?r.$q.dialog({title:r.$t("dialog.incompleteRegistration.title"),message:r.$t("dialog.incompleteRegistration.msg"),color:"dark",ok:!0}):"dialog.invalidBirthDate.msg"===(null===e||void 0===e?void 0:null===(n=e.response)||void 0===n?void 0:null===(o=n.data)||void 0===o?void 0:o.message)?r.$q.dialog({title:r.$t("dialog.invalidBirthDate.title"),message:r.$t("dialog.invalidBirthDate.msg"),color:"dark",ok:!0}):r.$q.dialog({title:r.$t("dialog.errorRegistration.title"),message:r.$t("dialog.errorRegistration.msg"),color:"dark",ok:!0})}));case 16:if(!this.isGuestUser||this.isLogged){e.next=19;break}return this.sendingData=!1,e.abrupt("return",this.setBuyer(t).catch(function(e){var t,i,s;401===(null===e||void 0===e?void 0:null===(t=e.response)||void 0===t?void 0:t.status)?r.toggleRecaptchaModal():"error.server.buyer.incomplete"===(null===e||void 0===e?void 0:null===(i=e.response)||void 0===i?void 0:null===(s=i.data)||void 0===s?void 0:s.message)?r.$q.dialog({title:r.$t("dialog.incompleteRegistration.title"),message:r.$t("dialog.incompleteRegistration.msg"),color:"dark",ok:!0}):r.$q.dialog({title:r.$t("dialog.errorRegistration.title"),message:r.$t("dialog.errorRegistration.msg"),color:"dark",ok:!0})}));case 19:return e.abrupt("return",this.createNewUserData().then(d()(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(r.$tracker.completeRegistration(r.$t("page.checkoutIdentification")),""===r.userAuthenticationData.token){e.next=6;break}return e.next=4,r.setBuyer(t);case 4:e.next=8;break;case 6:r.openSelectNewUser=!0,r.sendingData=!1;case 8:case"end":return e.stop()}},e)}))).catch(function(e){var t,i,s;401===(null===e||void 0===e?void 0:null===(t=e.response)||void 0===t?void 0:t.status)?r.toggleRecaptchaModal():"error.server.buyer.incomplete"===(null===e||void 0===e?void 0:null===(i=e.response)||void 0===i?void 0:null===(s=i.data)||void 0===s?void 0:s.message)&&r.$q.dialog({title:r.$t("dialog.incompleteRegistration.title"),message:r.$t("dialog.incompleteRegistration.msg"),color:"dark",ok:!0})}));case 20:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),cancelPinModal:function(){return!1},nextStep:function(){return!!this.isLogged&&(this.hasEventsFields?this.$router.replace({name:g["f"]}):this.SET_CONFIG.checkout.seatName.active?this.$router.replace({name:g["w"]}):this.hasDeliveryMethod?this.$router.replace({name:g["i"]}):this.$router.replace({name:g["n"]}))},setBuyer:function(){var e=d()(regeneratorRuntime.mark(function e(){var t,i,s,a,r,n,o,d=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return t=d.length>0&&void 0!==d[0]?d[0]:void 0,e.prev=1,this.$tracker.checkoutStep({step:3,stepName:"identification",option:"identification",coupon:"",value:this.isGuestUser&&!this.isLogged?"oldCustomer":"newCustomer",products:this.getTrackerCartItems()}),e.next=5,this.saveCustomFields({orderCode:this.cartOrderCode});case 5:if(!this.isLogged){e.next=8;break}return e.next=8,this.setOrderBuyer({token:this.userAuthenticationData.token,recaptchaToken:t});case 8:return e.next=10,this.fetchOrderValidation({cartOrderCode:this.cartOrderCode,token:this.userAuthenticationData.token});case 10:if(i=e.sent,!this.isLogged){e.next=55;break}if(i.status){e.next=55;break}return this.needValidation=!0,e.prev=14,e.prev=15,e.next=18,this.$q.dialog({title:this.$t("text.validation.title"),message:this.$t("text.validation.field.phone"),cancel:!0,preventClose:!0,noBackdropDismiss:!0,noEscDismiss:!0,options:{type:"radio",model:"phone1",items:i.data.map(function(e){return{label:e.value,value:e.field}})}});case 18:if(s=e.sent,s){e.next=21;break}throw new Error("Empty selection");case 21:e.next=29;break;case 23:return e.prev=23,e.t0=e["catch"](15),this.$q.notify({message:this.$t("text.validation.error.requiredField"),timeout:5e3,type:"negative"}),this.sendingData=!1,this.needValidation=!1,e.abrupt("return",!1);case 29:return e.prev=29,e.next=32,this.$q.dialog({title:this.$t("text.validation.title"),message:this.$t("text.validation.type.pinCode"),cancel:!0,preventClose:!0,noBackdropDismiss:!0,noEscDismiss:!0,prompt:{model:"",type:"text"}});case 32:if(a=e.sent,a){e.next=35;break}throw new Error("Empty value");case 35:e.next=43;break;case 37:return e.prev=37,e.t1=e["catch"](29),this.$q.notify({message:this.$t("text.validation.error.requiredValue"),timeout:5e3,type:"negative"}),this.sendingData=!1,this.needValidation=!1,e.abrupt("return",!1);case 43:return e.next=45,this.validateOrder({cartOrderCode:this.cartOrderCode,data:[{field:s,value:a}],token:this.userAuthenticationData.token});case 45:e.next=51;break;case 47:return e.prev=47,e.t2=e["catch"](14),s&&a&&(this.userNotValidated=!0),e.abrupt("return",!1);case 51:return e.prev=51,this.needValidation=!1,this.sendingData=!1,e.finish(51);case 55:return e.abrupt("return",!1);case 58:if(e.prev=58,e.t3=e["catch"](1),401!==(null===e.t3||void 0===e.t3?void 0:null===(r=e.t3.response)||void 0===r?void 0:r.status)){e.next=64;break}throw e.t3;case 64:return e.next=66,this.dialogServerError(this.$t((null===e.t3||void 0===e.t3?void 0:null===(n=e.t3.response)||void 0===n?void 0:null===(o=n.data)||void 0===o?void 0:o.message)||e.t3));case 66:return this.logoutUser(),e.abrupt("return",this.$router.replace({name:g["d"]}));case 68:case"end":return e.stop()}},e,this,[[1,58],[14,47,51,55],[15,23],[29,37]])}));return function(){return e.apply(this,arguments)}}(),validate:function(e){e&&(this.isVerified=!0,this.nextStep())}})},y=C,D=(i("7957"),i("2877")),U=Object(D["a"])(y,s,a,!1,null,null,null);U.options.__file="identification.vue";t["default"]=U.exports}}]);
//# sourceMappingURL=7f332a7d.1e20f8fa.2024-10-22T18:36:13.257Z.js.map