/*! For license information please see LICENSES */ (window.webpackJsonp=window.webpackJsonp||[]).push([[9,79],{1027:function(t,e,r){"use strict";r.r(e);var o=r(1),n=r(158),c=r(958);function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function m(){m=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function d(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{d({},"")}catch(t){d=function(t,e,r){return t[e]=r}}function h(t,e,r,o){var i=e&&e.prototype instanceof E?e:E,a=Object.create(i.prototype),c=new j(o||[]);return n(a,"_invoke",{value:O(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var v="suspendedStart",_="suspendedYield",y="executing",s="completed",w={};function E(){}function x(){}function C(){}var p={};d(p,a,(function(){return this}));var R=Object.getPrototypeOf,L=R&&R(R(S([])));L&&L!==r&&o.call(L,a)&&(p=L);var g=C.prototype=E.prototype=Object.create(p);function k(t){["next","throw","return"].forEach((function(e){d(t,e,(function(t){return this._invoke(e,t)}))}))}function D(t,e){function r(n,c,i,a){var m=f(t[n],t,c);if("throw"!==m.type){var u=m.arg,d=u.value;return d&&"object"==l(d)&&o.call(d,"__await")?e.resolve(d.__await).then((function(t){r("next",t,i,a)}),(function(t){r("throw",t,i,a)})):e.resolve(d).then((function(t){u.value=t,i(u)}),(function(t){return r("throw",t,i,a)}))}a(m.arg)}var c;n(this,"_invoke",{value:function(t,o){function n(){return new e((function(e,n){r(t,o,e,n)}))}return c=c?c.then(n,n):n()}})}function O(e,r,o){var n=v;return function(i,a){if(n===y)throw new Error("Generator is already running");if(n===s){if("throw"===i)throw a;return{value:t,done:!0}}for(o.method=i,o.arg=a;;){var c=o.delegate;if(c){var u=P(c,o);if(u){if(u===w)continue;return u}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(n===v)throw n=s,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);n=y;var p=f(e,r,o);if("normal"===p.type){if(n=o.done?s:_,p.arg===w)continue;return{value:p.arg,done:o.done}}"throw"===p.type&&(n=s,o.method="throw",o.arg=p.arg)}}}function P(e,r){var o=r.method,n=e.iterator[o];if(n===t)return r.delegate=null,"throw"===o&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==o&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+o+"' method")),w;var i=f(n,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,w;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,w):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,w)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function S(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function r(){for(;++n=0;--c){var i=this.tryEntries[c],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(l&&u){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),w}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var o=r.completion;if("throw"===o.type){var n=o.arg;T(r)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,o){return this.delegate={iterator:S(e),resultName:r,nextLoc:o},"next"===this.method&&(this.arg=t),w}},e}function d(t,e,r,o,n,c,l){try{var m=t[c](l),d=m.value}catch(t){return void r(t)}m.done?e(d):Promise.resolve(d).then(o,n)}o.default.directive("mask",n.mask);var h={name:"ContactUs",components:{DialogResult:c.default},fetch:function(){var t,e=this;return(t=m().mark((function t(){return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.$axios.request({method:"get",url:"/v2/front/struct/menus/tipo-solicitacao"}).then((function(t){e.menuTypesRequests=t.data.menu})).catch((function(t){console.error(t.response.data.error)}));case 2:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(o,n){var c=t.apply(e,r);function l(t){d(c,o,n,l,m,"next",t)}function m(t){d(c,o,n,l,m,"throw",t)}l(void 0)}))})()},data:function(){return{menuTypesRequests:null,selectedOptionTypeRequest:"",name:"",email:"",phone:"",order:"",message:"",cpf:"",address:"",terms:"accepted",typeRequestError:"",nameError:"",emailError:"",phoneError:"",orderError:"",messageError:"",cpfError:"",termsError:"",success:!1,loading:!1,showDialogResult:!1}},props:{pageData:{type:Object,required:!0}},watch:{name:function(){this.nameError=""},email:function(){this.emailError=""},phone:function(){this.phoneError=""},message:function(){this.messageError=""},cpf:function(){this.cpfError=""},selectedOptionTypeRequest:function(){this.typeRequestError=""}},methods:{submitForm:function(){var t=this;!this.loading&&this.validateForm()&&(this.loading=!0,this.$axios.request({method:"post",url:"/v2/front/form/contact",data:{hashEmail:"contato/formulario",assunto:this.selectedOptionTypeRequest,nome:this.name,email:this.email,contato:this.phone.replace(/[\s()-]/g,""),mensagem:this.order?"\n Nº do pedido: ".concat(this.order,"\n Mensagem: ").concat(this.message,"\n CPF: ").concat(this.cpf,"\n Endereço: ").concat(this.address,"\n "):"Mensagem: ".concat(this.message)}}).then((function(e){t.success=!0,t.showDialogResult=!0,t.loading=!1,t.clearData()})).catch((function(){t.success=!1,t.showDialogResult=!0,t.loading=!1})))},validateForm:function(){var t=!0;return this.selectedOptionTypeRequest.trim()||(t=!1,this.typeRequestError="Esse campo é obrigatório"),this.name.trim()||(t=!1,this.nameError="Esse campo é obrigatório"),this.email.trim()?this.isValidEmail(this.email)||(t=!1,this.emailError="Digite um e-mail válido"):(t=!1,this.emailError="Esse campo é obrigatório"),this.phone.trim()?this.phone.trim().length<9&&(t=!1,this.phoneError="Mínimo de 8 dígitos"):(t=!1,this.phoneError="Esse campo é obrigatório"),this.cpf.trim().length<14&&(t=!1,this.cpfError="Necessário 11 dígitos"),this.message.trim()||(t=!1,this.messageError="Esse campo é obrigatório"),t},clearData:function(){this.selectedOptionTypeRequest="",this.name="",this.email="",this.phone="",this.order="",this.cpf="",this.address="",this.message="",this.terms="accepted",this.typeRequestError="",this.nameError="",this.emailError="",this.phoneError="",this.orderError="",this.cpfError="",this.messageError="",this.termsError=""},isValidEmail:function(t){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)}}},f=h,v=(r(973),r(974),r(0)),component=Object(v.a)(f,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"form-contact default-institutional"},[e("div",{staticClass:"default-institutional"},[e("h1",[t._v("\n "+t._s(t.pageData.conteudo.pagina.nome)+"\n ")]),t._v(" "),e("div",{domProps:{innerHTML:t._s(t.pageData.conteudo.pagina.descricao)}})]),t._v(" "),e("div",{staticClass:"form-contact-us-wrapper"},[e("form",{staticClass:"form-contact-us",attrs:{novalidate:""},on:{submit:function(e){return e.preventDefault(),t.submitForm.apply(null,arguments)}}},[t.menuTypesRequests?e("div",{staticClass:"form-contact-us-type-request"},[e("transition",{attrs:{name:"error"}},[t.typeRequestError?e("span",{staticClass:"text-error"},[t._v(t._s(t.typeRequestError))]):t._e()]),t._v(" "),e("p",{class:{error:t.typeRequestError}},[t._v("\n Selecione o tipo de solicitação* \n ")]),t._v(" "),e("div",{staticClass:"form-contact-us-type-request-itens"},t._l(t.menuTypesRequests,(function(option,r){return e("div",{key:r},[e("label",[e("input",{directives:[{name:"model",rawName:"v-model",value:t.selectedOptionTypeRequest,expression:"selectedOptionTypeRequest"}],attrs:{type:"radio"},domProps:{value:option.label,checked:t._q(t.selectedOptionTypeRequest,option.label)},on:{change:function(e){t.selectedOptionTypeRequest=option.label}}}),t._v("\n "+t._s(option.label)+"\n ")])])})),0)],1):t._e(),t._v(" "),e("div",{staticClass:"form-contact-us-row"},[e("div",{staticClass:"form-contact-us__group"},[e("label",{attrs:{for:"name"}},[t._v("\n Seu nome*\n\n "),e("transition",{attrs:{name:"error"}},[t.nameError?e("span",[t._v(t._s(t.nameError))]):t._e()])],1),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.name,expression:"name"}],staticClass:"form-contact-us__input",class:{error:t.nameError},attrs:{id:"name",type:"text",placeholder:"Fulano(a) da Silva"},domProps:{value:t.name},on:{input:function(e){e.target.composing||(t.name=e.target.value)}}})]),t._v(" "),e("div",{staticClass:"form-contact-us__group"},[e("label",{attrs:{for:"email"}},[t._v("\n Seu email*\n\n "),e("transition",{attrs:{name:"error"}},[t.emailError?e("span",[t._v(t._s(t.emailError))]):t._e()])],1),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.email,expression:"email"}],staticClass:"form-contact-us__input",class:{error:t.emailError},attrs:{id:"email",type:"email",placeholder:"Fulano.da.silva@email.com"},domProps:{value:t.email},on:{input:function(e){e.target.composing||(t.email=e.target.value)}}})])]),t._v(" "),e("div",{staticClass:"form-contact-us-row"},[e("div",{staticClass:"form-contact-us__group phone"},[e("label",{attrs:{for:"phone"}},[t._v("\n Seu telefone*\n\n "),e("transition",{attrs:{name:"error"}},[t.phoneError?e("span",[t._v(t._s(t.phoneError))]):t._e()])],1),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.phone,expression:"phone"},{name:"mask",rawName:"v-mask",value:["####-####","####-#####","(##) ####-####","(##) ####-#####","(##) # ####-####"],expression:"['####-####', '####-#####', '(##) ####-####', '(##) ####-#####', '(##) # ####-####']"}],staticClass:"form-contact-us__input",class:{error:t.phoneError},attrs:{id:"phone",type:"tel",placeholder:"(00) 9 0000-0000"},domProps:{value:t.phone},on:{input:function(e){e.target.composing||(t.phone=e.target.value)}}})]),t._v(" "),e("div",{staticClass:"form-contact-us__group order"},[e("label",{attrs:{for:"order"}},[t._v("\n Nº do pedido\n\n "),e("transition",{attrs:{name:"error"}},[t.orderError?e("span",[t._v(t._s(t.orderError))]):t._e()])],1),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.order,expression:"order"}],staticClass:"form-contact-us__input",class:{error:t.orderError},attrs:{id:"order",type:"tel",placeholder:"EX: 1234567",pattern:"[0-9]*"},domProps:{value:t.order},on:{input:[function(e){e.target.composing||(t.order=e.target.value)},function(e){t.order=e.target.value.replace(/[^0-9]/g,"")}]}})])]),t._v(" "),e("div",{staticClass:"form-contact-us-row"},[e("div",{staticClass:"form-contact-us__group cpf"},[e("label",{attrs:{for:"cpf"}},[t._v("\n CPF*\n\n "),e("transition",{attrs:{name:"error"}},[t.cpfError?e("span",[t._v(t._s(t.cpfError))]):t._e()])],1),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.cpf,expression:"cpf"},{name:"mask",rawName:"v-mask",value:["###.###.###-##"],expression:"['###.###.###-##']"}],staticClass:"form-contact-us__input",class:{error:t.cpfError},attrs:{id:"cpf",type:"text",placeholder:"000.000.000-00"},domProps:{value:t.cpf},on:{input:function(e){e.target.composing||(t.cpf=e.target.value)}}})]),t._v(" "),e("div",{staticClass:"form-contact-us__group address"},[e("label",{attrs:{for:"address"}},[t._v(" \n Endereço \n ")]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.address,expression:"address"}],staticClass:"form-contact-us__input",attrs:{id:"address",type:"text",placeholder:"endereço"},domProps:{value:t.address},on:{input:function(e){e.target.composing||(t.address=e.target.value)}}})])]),t._v(" "),e("div",{staticClass:"form-contact-us__textarea"},[e("label",{attrs:{for:"message"}},[t._v("\n Escreva aqui sua mensagem*\n\n "),e("transition",{attrs:{name:"error"}},[t.messageError?e("span",[t._v(t._s(t.messageError))]):t._e()])],1),t._v(" "),e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.message,expression:"message"}],class:{error:t.messageError},attrs:{id:"message",maxlength:"1000",placeholder:"Escreva seu comentário aqui"},domProps:{value:t.message},on:{input:function(e){e.target.composing||(t.message=e.target.value)}}}),t._v(" "),e("span",{staticClass:"form-contact-us__length"},[t._v(t._s(t.message.length)+"/1000")])]),t._v(" "),e("span",{staticClass:"form-contact-us__required"},[t._v("*Campos obrigatórios")]),t._v(" "),e("div",{staticClass:"form-contact-us__bottom"},[e("div",{staticClass:"form-contact-us__radio"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.terms,expression:"terms"}],attrs:{id:"terms",type:"radio",name:"terms",value:"accepted"},domProps:{checked:t._q(t.terms,"accepted")},on:{change:function(e){t.terms="accepted"}}}),t._v(" "),e("div",{staticClass:"form-contact-us__custom-radio"}),t._v(" "),e("label",{staticClass:"form-contact-us__radio-label",attrs:{for:"terms"}},[t._v("\n Li e concordo com os termos da "),e("nuxt-link",{attrs:{to:"/pagina/politica-de-privacidade/"}},[t._v("Política de Privacidade")])],1)]),t._v(" "),e("button",{staticClass:"form-contact-us__button",attrs:{type:"submit"}},[t.loading?[e("div",{staticClass:"spinner"})]:[t._v("\n Enviar mensagem\n ")]],2)])])]),t._v(" "),e("DialogResult",{attrs:{showDialogResult:t.showDialogResult,success:t.success},on:{"update:showDialogResult":function(e){t.showDialogResult=e},"update:show-dialog-result":function(e){t.showDialogResult=e}}})],1)}),[],!1,null,"2eacd7b2",null);e.default=component.exports},827:function(t,e,r){t.exports={}},880:function(t,e,r){"use strict";r(827)},899:function(t,e,r){t.exports={}},900:function(t,e,r){t.exports={}},958:function(t,e,r){"use strict";r.r(e);var o={name:"DialogResult",props:{showDialogResult:Boolean,success:Boolean},data:function(){return{showDialogResultWrapper:!1}},methods:{closeshowDialogResult:function(){this.showDialogResultWrapper=!1},beforeEnterWrapper:function(){this.showDialogResultWrapper=!0,document.body.classList.add("locked")},afterLeaveWrapper:function(){this.$emit("update:showDialogResult",!1),document.body.classList.remove("locked")}}},n=(r(880),r(0)),component=Object(n.a)(o,(function(){var t=this,e=t._self._c;return e("transition",{attrs:{name:"transition-dialog-wrapper"},on:{"before-enter":t.beforeEnterWrapper}},[t.showDialogResult?e("div",{staticClass:"dialog-wrapper",on:{click:function(e){return e.target!==e.currentTarget?null:t.closeshowDialogResult.apply(null,arguments)}}},[e("transition",{attrs:{name:"transition-dialog"},on:{"after-leave":t.afterLeaveWrapper}},[t.showDialogResultWrapper?e("div",{staticClass:"dialog"},[e("div",{staticClass:"dialog-header"},[t.success?e("p",{staticClass:"result-dialog__title"},[t._v("\n Mensagem enviada com "),e("span",[t._v("sucesso")]),t._v("!\n ")]):e("p",{staticClass:"result-dialog__title error"},[e("span",[t._v("Falha")]),t._v(" no envio da mensagem\n ")]),t._v(" "),e("button",{staticClass:"dialog__close",on:{click:t.closeshowDialogResult}},[e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"}},[e("path",{attrs:{stroke:"#B8BEB6","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"m6 6 12 12m0-12L6 18"}})])])]),t._v(" "),e("div",{staticClass:"dialog-body"},[t.success?e("p",{staticClass:"result-dialog__description"},[t._v("\n Obrigado por entrar em contato conosco! Sua mensagem foi enviada com sucesso e nossa equipe responderá o mais rápido possível\n ")]):e("p",{staticClass:"result-dialog__description"},[t._v("\n Ops! Parece que houve um problema ao enviar sua mensagem. Por favor, "),e("span",[t._v("tente novamente mais tarde")]),t._v(".\n ")]),t._v(" "),e("button",{staticClass:"result-dialog__button",on:{click:t.closeshowDialogResult}},[t._v("\n OK\n ")])])]):t._e()])],1):t._e()])}),[],!1,null,"1b52537b",null);e.default=component.exports},973:function(t,e,r){"use strict";r(899)},974:function(t,e,r){"use strict";r(900)}}]);