',o=n.indexOf(":"+t+":")>-1?":"+t+":":t;return n=n.replace(o,a),i}),"
"+n+"
"},buttons:function(){return this.message.context&&this.message.context.buttons||[]},expert:function(){var e=this;if("expert"!==this.message.from)return null;var t=this.$store.state.chat.conversation.experts;return Ra.a.find(t,function(t){return t&&t.name===e.message.author})}},D("chat",["moduleEnabled"])),components:{VRuntimeTemplate:Uo,actionButton:Wo}},Yo={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"message-text",class:["-"+e.message.from]},["expert"===e.message.from?n("div",{staticClass:"avatar"},[e.expert&&e.expert.image?e._e():n("font-awesome-icon",{attrs:{icon:["fas","user"]}}),e._v(" "),e.expert&&e.expert.image?n("img",{attrs:{src:e.expert.image,alt:e.expert?e.expert.name:e.$t("Atendimento")}}):e._e()],1):e._e(),e._v(" "),n("div",{staticClass:"content"},[n("v-runtime-template",{attrs:{template:e.content}}),e._v(" "),e.buttons.length>0?n("div",{staticClass:"buttons"},e._l(e.buttons,function(e,t){return n("action-button",{key:t,attrs:{settings:e}})})):e._e()],1),e._v(" "),n("div",{staticClass:"info"},[e._v("\n "+e._s(e._f("moment")(e.message.date,"DD/MM/YYYY HH:mm:ss"))+" - "+e._s(e.moduleChatBot===e.moduleEnabled&&"customer"!==e.message.from?e.botName:e.message.author)+"\n\n "),"expert"!==e.message.from&&"warning"!==e.message.from?n("span",{staticClass:"status",class:{"-active":"read"===e.message.status}},[n("font-awesome-icon",{staticClass:"icon",attrs:{icon:"check"}}),e._v(" "),"read"===e.message.status?n("font-awesome-icon",{staticClass:"icon",attrs:{icon:"check"}}):e._e()],1):e._e()])])},staticRenderFns:[]};var Jo=n("mUJo")(Go,Yo,!1,function(e){n("PLV2")},"data-v-7421063f",null).exports,Ko={name:"message-queue-position",props:{message:{required:!0,type:Object}},computed:o()({},D("chat/queue",["position"]))},Zo={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-card",{staticClass:"card"},[n("p",[e._v("\n "+e._s(e.$t("Oi {name}!",{name:e.name}))+"\n "),n("strong",[e._v(e._s(e.$t("Voc\xea \xe9 o {position}\xba da fila",{position:e.position})))])]),e._v(" "),n("p",[e._v("\n "+e._s(e.$t("Em breve um de nossos atendentes ficar\xe1 dispon\xedvel para te atender :)"))+"\n ")]),e._v(" "),n("div",{attrs:{slot:"footer"},slot:"footer"},[n("v-button",{attrs:{type:"button",layout:"secondary","text-lower":!0},on:{click:e.cancel}},[e._v(e._s(e.$t("Cancelar")))])],1)])},staticRenderFns:[]};var Qo=n("mUJo")(Ko,Zo,!1,function(e){n("IsRk")},"data-v-893fa8ea",null).exports,ec={name:"survey-base",methods:{updateMessageAdditionalData:_.debounce(function(e){this.$store.commit("chat/SET_SURVEY_ADDITIONAL_DATA",{"Coment\xe1rio":e})},100),sendSurvey:function(){var e=this;return this.$store.dispatch("chat/sendSurvey").then(function(){e.$store.commit("chat/RESET_SURVEY"),e.$router.replace("/chat/final")}).catch(function(){return null})}},computed:o()({option:{get:function(){return this.$store.state.chat.survey.option},set:function(e){this.$store.commit("chat/SET_SURVEY_OPTION",e)}}},D("chat",{additionalData:function(e){return e.survey.additionalData}}))},tc={render:function(){var e=this.$createElement;return(this._self._c||e)("div")},staticRenderFns:[]};var nc=n("mUJo")(ec,tc,!1,function(e){n("f1Jv")},"data-v-339a1a34",null).exports,rc={name:"survey-stars",extends:nc},ic={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"survey-stars"},[n("h2",{staticClass:"title"},[e._v(e._s(e.$t("Voc\xea gostou do seu atendimento?")))]),e._v(" "),n("div",{staticClass:"rate"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.option,expression:"option"}],staticClass:"field",attrs:{type:"radio",id:"survey-answer-5",name:"Rate"},domProps:{value:5,checked:e._q(e.option,5)},on:{change:function(t){e.option=5}}}),e._v(" "),n("label",{staticClass:"answer",class:{"-voted":5===e.option},attrs:{for:"survey-answer-5",title:e.$t("Muito Satisfat\xf3rio")}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.option,expression:"option"}],staticClass:"field",attrs:{type:"radio",id:"survey-option-4",name:"Rate"},domProps:{value:4,checked:e._q(e.option,4)},on:{change:function(t){e.option=4}}}),e._v(" "),n("label",{staticClass:"answer",class:{"-voted":4===e.option},attrs:{for:"survey-option-4",title:e.$t("Satisfat\xf3rio")}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.option,expression:"option"}],staticClass:"field",attrs:{type:"radio",id:"survey-option-3",name:"Rate"},domProps:{value:3,checked:e._q(e.option,3)},on:{change:function(t){e.option=3}}}),e._v(" "),n("label",{staticClass:"answer",class:{"-voted":3===e.option},attrs:{for:"survey-option-3",title:e.$t("Razo\xe1vel")}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.option,expression:"option"}],staticClass:"field",attrs:{type:"radio",id:"survey-option-2",name:"Rate"},domProps:{value:2,checked:e._q(e.option,2)},on:{change:function(t){e.option=2}}}),e._v(" "),n("label",{staticClass:"answer",class:{"-voted":2===e.option},attrs:{for:"survey-option-2",title:e.$t("Indiferente")}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.option,expression:"option"}],staticClass:"field",attrs:{type:"radio",id:"survey-option-1",name:"Rate"},domProps:{value:1,checked:e._q(e.option,1)},on:{change:function(t){e.option=1}}}),e._v(" "),n("label",{staticClass:"answer",class:{"-voted":1===e.option},attrs:{for:"survey-option-1",title:e.$t("Pouco Satisfat\xf3rio")}})]),e._v(" "),e.option?n("div",{staticClass:"comment"},[n("h3",{staticClass:"title"},[e._v(e._s(e.$t("Obrigado pela avalia\xe7\xe3o")))]),e._v(" "),n("p",[e._v("\n "+e._s(e.$t("Quer deixar uma mensagem?"))+"\n ")]),e._v(" "),n("v-textarea",{staticClass:"field",attrs:{placeholder:e.$t("Deixe uma mensagem de avalia\xe7\xe3o"),value:e.additionalData["Coment\xe1rio"]},on:{input:function(t){e.updateMessageAdditionalData(t.target.value)}}}),e._v(" "),n("div",{staticClass:"actions"},[n("v-button",{attrs:{layout:"primary",disabled:!e.option},on:{click:e.sendSurvey}},[e._v(e._s(e.$t("Enviar")))])],1)],1):e._e(),e._v(" "),n("div",{staticClass:"actions"},[n("v-button",{attrs:{layout:"secondary",link:!0},on:{click:function(t){e.$router.replace("/chat/final")}}},[n("small",[e._v(e._s(e.$t("Concluir sem responder")))])])],1)])},staticRenderFns:[]};var ac={name:"survey-faces",extends:nc},oc={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"survey-faces"},[n("h2",{staticClass:"title"},[e._v(e._s(e.$t("Voc\xea gostou do seu atendimento?")))]),e._v(" "),n("div",{staticClass:"rate"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.option,expression:"option"}],staticClass:"field",attrs:{type:"radio",id:"survey-answer-5",name:"Rate"},domProps:{value:5,checked:e._q(e.option,5)},on:{change:function(t){e.option=5}}}),e._v(" "),n("label",{staticClass:"answer -option5",class:{"-voted":5===e.option},attrs:{for:"survey-answer-5",title:e.$t("Muito Satisfat\xf3rio")}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.option,expression:"option"}],staticClass:"field",attrs:{type:"radio",id:"survey-option-4",name:"Rate"},domProps:{value:4,checked:e._q(e.option,4)},on:{change:function(t){e.option=4}}}),e._v(" "),n("label",{staticClass:"answer -option4",class:{"-voted":4===e.option},attrs:{for:"survey-option-4",title:e.$t("Satisfat\xf3rio")}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.option,expression:"option"}],staticClass:"field",attrs:{type:"radio",id:"survey-option-3",name:"Rate"},domProps:{value:3,checked:e._q(e.option,3)},on:{change:function(t){e.option=3}}}),e._v(" "),n("label",{staticClass:"answer -option3",class:{"-voted":3===e.option},attrs:{for:"survey-option-3",title:e.$t("Razo\xe1vel")}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.option,expression:"option"}],staticClass:"field",attrs:{type:"radio",id:"survey-option-2",name:"Rate"},domProps:{value:2,checked:e._q(e.option,2)},on:{change:function(t){e.option=2}}}),e._v(" "),n("label",{staticClass:"answer -option2",class:{"-voted":2===e.option},attrs:{for:"survey-option-2",title:e.$t("Indiferente")}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.option,expression:"option"}],staticClass:"field",attrs:{type:"radio",id:"survey-option-1",name:"Rate"},domProps:{value:1,checked:e._q(e.option,1)},on:{change:function(t){e.option=1}}}),e._v(" "),n("label",{staticClass:"answer -option1",class:{"-voted":1===e.option},attrs:{for:"survey-option-1",title:e.$t("Pouco Satisfat\xf3rio")}})]),e._v(" "),e.option?n("div",{staticClass:"comment"},[n("h3",{staticClass:"title"},[e._v(e._s(e.$t("Obrigado pela avalia\xe7\xe3o")))]),e._v(" "),n("p",[e._v("\n "+e._s(e.$t("Quer deixar uma mensagem?"))+"\n ")]),e._v(" "),n("v-textarea",{staticClass:"field",attrs:{placeholder:e.$t("Deixe uma mensagem de avalia\xe7\xe3o"),value:e.additionalData["Coment\xe1rio"]},on:{input:function(t){e.updateMessageAdditionalData(t.target.value)}}}),e._v(" "),n("div",{staticClass:"actions"},[n("v-button",{attrs:{layout:"primary",disabled:!e.option},on:{click:e.sendSurvey}},[e._v(e._s(e.$t("Enviar")))])],1)],1):e._e(),e._v(" "),n("div",{staticClass:"actions"},[n("v-button",{attrs:{layout:"secondary",link:!0},on:{click:function(t){e.$router.replace("/chat/final")}}},[n("small",[e._v(e._s(e.$t("Concluir sem responder")))])])],1)])},staticRenderFns:[]};var cc={name:"survey-numbers",extends:nc},sc={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"survey-numbers"},[n("h2",{staticClass:"title"},[e._v(e._s(e.$t("Voc\xea gostou do seu atendimento?")))]),e._v(" "),n("div",{staticClass:"rate"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.option,expression:"option"}],staticClass:"field",attrs:{type:"radio",id:"survey-option-1",name:"Rate"},domProps:{value:1,checked:e._q(e.option,1)},on:{change:function(t){e.option=1}}}),e._v(" "),n("label",{staticClass:"answer",class:{"-voted":1===e.option},attrs:{for:"survey-option-1",title:1}},[e._v("1")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.option,expression:"option"}],staticClass:"field",attrs:{type:"radio",id:"survey-option-2",name:"Rate"},domProps:{value:2,checked:e._q(e.option,2)},on:{change:function(t){e.option=2}}}),e._v(" "),n("label",{staticClass:"answer",class:{"-voted":2===e.option},attrs:{for:"survey-option-2",title:2}},[e._v("2")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.option,expression:"option"}],staticClass:"field",attrs:{type:"radio",id:"survey-option-3",name:"Rate"},domProps:{value:3,checked:e._q(e.option,3)},on:{change:function(t){e.option=3}}}),e._v(" "),n("label",{staticClass:"answer",class:{"-voted":3===e.option},attrs:{for:"survey-option-3",title:3}},[e._v("3")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.option,expression:"option"}],staticClass:"field",attrs:{type:"radio",id:"survey-option-4",name:"Rate"},domProps:{value:4,checked:e._q(e.option,4)},on:{change:function(t){e.option=4}}}),e._v(" "),n("label",{staticClass:"answer",class:{"-voted":4===e.option},attrs:{for:"survey-option-4",title:4}},[e._v("4")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.option,expression:"option"}],staticClass:"field",attrs:{type:"radio",id:"survey-answer-5",name:"Rate"},domProps:{value:5,checked:e._q(e.option,5)},on:{change:function(t){e.option=5}}}),e._v(" "),n("label",{staticClass:"answer",class:{"-voted":5===e.option},attrs:{for:"survey-answer-5",title:5}},[e._v("5")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.option,expression:"option"}],staticClass:"field",attrs:{type:"radio",id:"survey-option-6",name:"Rate"},domProps:{value:6,checked:e._q(e.option,6)},on:{change:function(t){e.option=6}}}),e._v(" "),n("label",{staticClass:"answer",class:{"-voted":6===e.option},attrs:{for:"survey-option-6",title:6}},[e._v("6")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.option,expression:"option"}],staticClass:"field",attrs:{type:"radio",id:"survey-option-7",name:"Rate"},domProps:{value:7,checked:e._q(e.option,7)},on:{change:function(t){e.option=7}}}),e._v(" "),n("label",{staticClass:"answer",class:{"-voted":7===e.option},attrs:{for:"survey-option-7",title:7}},[e._v("7")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.option,expression:"option"}],staticClass:"field",attrs:{type:"radio",id:"survey-option-8",name:"Rate"},domProps:{value:8,checked:e._q(e.option,8)},on:{change:function(t){e.option=8}}}),e._v(" "),n("label",{staticClass:"answer",class:{"-voted":8===e.option},attrs:{for:"survey-option-8",title:8}},[e._v("8")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.option,expression:"option"}],staticClass:"field",attrs:{type:"radio",id:"survey-option-9",name:"Rate"},domProps:{value:9,checked:e._q(e.option,9)},on:{change:function(t){e.option=9}}}),e._v(" "),n("label",{staticClass:"answer",class:{"-voted":9===e.option},attrs:{for:"survey-option-9",title:9}},[e._v("9")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.option,expression:"option"}],staticClass:"field",attrs:{type:"radio",id:"survey-answer-10",name:"Rate"},domProps:{value:10,checked:e._q(e.option,10)},on:{change:function(t){e.option=10}}}),e._v(" "),n("label",{staticClass:"answer",class:{"-voted":10===e.option},attrs:{for:"survey-answer-10",title:10}},[e._v("10")])]),e._v(" "),e.option?n("div",{staticClass:"comment"},[n("h3",{staticClass:"title"},[e._v(e._s(e.$t("Obrigado pela avalia\xe7\xe3o")))]),e._v(" "),n("p",[e._v("\n "+e._s(e.$t("Quer deixar uma mensagem?"))+"\n ")]),e._v(" "),n("v-textarea",{staticClass:"field",attrs:{placeholder:e.$t("Deixe uma mensagem de avalia\xe7\xe3o"),value:e.additionalData["Coment\xe1rio"]},on:{input:function(t){e.updateMessageAdditionalData(t.target.value)}}}),e._v(" "),n("div",{staticClass:"actions"},[n("v-button",{attrs:{layout:"primary",disabled:!e.option},on:{click:e.sendSurvey}},[e._v(e._s(e.$t("Enviar")))])],1)],1):e._e(),e._v(" "),n("div",{staticClass:"actions"},[n("v-button",{attrs:{layout:"secondary",link:!0},on:{click:function(t){e.$router.replace("/chat/final")}}},[n("small",[e._v(e._s(e.$t("Concluir sem responder")))])])],1)])},staticRenderFns:[]};var lc={name:"message-survey",computed:{surveyComponent:function(){return{stars:"survey-stars",faces:"survey-faces",numbers:"survey-numbers"}[h.chat.survey.type]||null}},components:{surveyStars:n("mUJo")(rc,ic,!1,function(e){n("pGb5")},"data-v-59ae8b26",null).exports,surveyFaces:n("mUJo")(ac,oc,!1,function(e){n("GZIq")},"data-v-3800e235",null).exports,surveyNumbers:n("mUJo")(cc,sc,!1,function(e){n("1e5W")},"data-v-692a4601",null).exports}},uc={render:function(){var e=this.$createElement;return(this._self._c||e)(this.surveyComponent,this._g(this._b({tag:"component"},"component",this.$attrs,!1),this.$listeners))},staticRenderFns:[]},fc=n("mUJo")(lc,uc,!1,null,null,null).exports,hc={name:"message-system",props:{message:{required:!0,type:Object}},data:function(){}},dc={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"message-system"},[t("div",{staticClass:"content"},[this._v("\n "+this._s(this.message.content)+"\n ")])])},staticRenderFns:[]};var pc=n("mUJo")(hc,dc,!1,function(e){n("qwnw")},"data-v-0e5c6e93",null).exports,vc={name:"message-warning",props:{message:{required:!0,type:Object}},components:{messageText:Jo}},mc={render:function(){var e=this.$createElement;return(this._self._c||e)("message-text",{attrs:{message:this.message}})},staticRenderFns:[]};var gc=n("mUJo")(vc,mc,!1,function(e){n("1yq0")},"data-v-f3676756",null).exports,yc={name:"room",data:function(){return{autoScrollEnabled:!0,moduleChatBot:"ChatBot",botName:h.chat.bot.name,isOnline:!0}},methods:{messageComponent:function(e){return{text:"message-text",survey:"message-survey",system:"message-system","queue-position":"message-queue-position",warning:"message-warning"}[e.type]||null},toggleAutoScroll:function(){this.autoScrollEnabled=!this.autoScrollEnabled},online:function(){this.isOnline=!0},offline:function(){this.isOnline=!1}},computed:o()({},D({messages:function(e){return e.chat.conversation.messages}}),D("chat",["controls","moduleEnabled","socketReconnecting"]),D("chat/conversation",["showSendMessage","showExpertWriting","expert"])),directives:{autoScrollMessages:zo},components:{connectionProblemsInformative:mo,chatControls:Eo,videoParticipants:Ao,confirmStartVideoChat:Ho,sendMessage:$o,messageText:Jo,messageQueuePosition:Qo,messageSurvey:fc,messageSystem:pc,messageWarning:gc}},bc={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"chat-room",class:{"-videoroom":e.controls.videoChat}},[n("chat-controls",{staticClass:"controls"}),e._v(" "),e.controls.videoChat?n("video-participants"):e._e(),e._v(" "),n("div",{directives:[{name:"auto-scroll-messages",rawName:"v-auto-scroll-messages",value:{enabled:e.controls.autoScroll,messages:e.messages,delay:500,offsetTop:15},expression:"{enabled: controls.autoScroll, messages: messages, delay: 500, offsetTop: 15}"}],staticClass:"body"},[!e.isOnline||e.socketReconnecting?n("div",{staticClass:"reconnect-modal"},[n("connection-problems-informative",{on:{online:e.online,offline:e.offline}})],1):e._e(),e._v(" "),n("transition-group",{attrs:{name:"fade"}},e._l(e.messages,function(t){return n(e.messageComponent(t),{key:t.id,ref:"message-"+t.id,refInFor:!0,tag:"component",attrs:{message:t,id:"message-"+t.id}})}))],1),e._v(" "),n("div",{staticClass:"footer"},[e.showSendMessage?n("send-message"):e._e(),e._v(" "),e.showExpertWriting&&e.showSendMessage?n("p",{staticClass:"expertWriting"},[e._v("\n "+e._s(e.$t((e.moduleEnabled===e.moduleChatBot?e.botName:"Operador")+" digitando"))+"\n ")]):e._e()],1),e._v(" "),e.controls.confirmStartVideoChat?n("confirm-start-video-chat"):e._e()],1)},staticRenderFns:[]};var _c=n("mUJo")(yc,bc,!1,function(e){n("348U")},"data-v-39997bec",null).exports,Cc={render:function(){var e=this.$createElement;return(this._self._c||e)("div",{staticClass:"row"},[this._t("default")],2)},staticRenderFns:[]};var zc=n("mUJo")({name:"row"},Cc,!1,function(e){n("eE9i")},"data-v-124ea590",null).exports,Sc=n("ZRhR"),xc=n.n(Sc),wc={methods:{propagateClick:function(){for(var e=arguments.length,t=Array(e),n=0;n0?n("p",[e._v(e._s(e.error.message.details))]):e._e()]),e._v(" "),n("div",{staticClass:"block"},[n("v-button",{attrs:{type:"button",layout:"secondary"},on:{click:e.redirectToChatForm}},[e._v(e._s(e.$t("Tentar novamente")))])],1)])},staticRenderFns:[]};var Oc=n("mUJo")(kc,Ac,!1,function(e){n("rhQX")},"data-v-2e2a8d2f",null).exports,Lc={props:{side:{required:!1,default:"bottom",type:String}}},Hc={props:{layout:{required:!1,default:"default",type:String}}},Nc={name:"btn-dropdown",props:{showCaretIcon:{required:!1,default:!0,type:Boolean}},mixins:[Lc,Hc],data:function(){return{showOptions:!1}},methods:{toggleShowOptionsAndNotifyClick:function(){this.showOptions=!this.showOptions;for(var e=arguments.length,t=Array(e),n=0;n5e3?(alert("Tamanho do arquivo muito grande!"),a()):n.$sdk.Chat.sendAttachment(t).then((o=Na()(La.a.mark(function t(i){var a,o;return La.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return a=i.file,t.next=3,r("formatMessage",{id:i.id,content:a.name,type:"text"});case 3:return o=t.sent,t.next=6,r("storeMessage",o);case 6:return t.abrupt("return",e());case 7:case"end":return t.stop()}},t,n)})),function(e){return o.apply(this,arguments)})).catch(a);var o})},sendMessageRead:function(e,t){var n=this;return Jc()(e),new Qa.a(function(e,r){n.$sdk.Chat.sendMessageRead(t).then(e).catch(r)})},showStarted:function(e,t){var n=e.commit,r=e.dispatch,i=e.rootState,a=t.restored,o=t.expert;return new Qa.a(function(e,t){var c=i.chat.moduleEnabled,s=i.route.path;return n("chat/DISABLE_LOADING",null,{root:!0}),n("chat/queue/RESET_POSITION",null,{root:!0}),n("STORE_EXPERT",o),n("SHOW_SEND_MESSAGE"),"/chat/room"!==s&&Ps.replace("/chat/room"),"Chat"===c||a?e():r("chat/conversation/sendBlankMessage",null,{root:!0}).then(e).catch(t)})},showFinished:function(e){var t,n=this,r=e.dispatch,i=e.commit,a=e.rootState;return new Qa.a((t=Na()(La.a.mark(function e(t){return La.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("ChatBot"!==a.chat.moduleEnabled){e.next=3;break}return Ps.replace({path:"/chat/final",query:{fromBot:!0}}),e.abrupt("return",t());case 3:if(h.chat.survey.enable){e.next=6;break}return Ps.replace({path:"/chat/final"}),e.abrupt("return",t());case 6:if(!a.chat.ignoreNextSurvey){e.next=9;break}return i("chat/REMOVE_IGNORE_NEXT_SURVEY",null,{root:!0}),e.abrupt("return",t());case 9:return e.next=11,i("HIDE_SEND_MESSAGE");case 11:return e.next=13,r("chat/showSurveyMessage",null,{root:!0});case 13:return e.abrupt("return",t());case 14:case"end":return e.stop()}},e,n)})),function(e){return t.apply(this,arguments)}))},hideSendMessageUntilNextMessage:function(e){var t=this,n=e.state,r=e.commit;return new Qa.a(function(e){r("SET_DISABLE_SEND_MESSAGE",!0);var i=t.watch(function(){return n.messages},function(){return r("SET_DISABLE_SEND_MESSAGE",!1),i()});return e()})},redirectToExpert:function(e){var t=this,n=e.state,r=e.commit,i=e.dispatch,a=e.rootState;return new Qa.a(function(e,c){return r("chat/queue/SET_MODULE_THAT_ENQUEUED","ChatBot",{root:!0}),r("chat/SET_MODULE_ENABLED","Chat",{root:!0}),r("chat/IGNORE_NEXT_SURVEY",null,{root:!0}),t.$sdk.ChatBot.stopConversation(),i("start",o()({},a.customer.form,{chatBotProtocol:n.protocol,chatBotId:n.idBot,fromChatBot:!0})).then(e).catch(c)})},stop:function(e){var t,n=this,r=e.dispatch,i=e.rootState;return new Qa.a((t=Na()(La.a.mark(function e(t,a){var o;return La.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!i.chat.controls.videoChat){e.next=3;break}return e.next=3,r("chat/video/hangup",{local:!0},{root:!0});case 3:return o=i.chat.moduleEnabled,e.abrupt("return",n.$sdk[o].stopConversation().then(t).catch(a));case 5:case"end":return e.stop()}},e,n)})),function(e,n){return t.apply(this,arguments)}))}}},Zc={namespaced:!0,state:{position:0,moduleThatEnqueued:h.chat.initialModule},getters:{},mutations:{SET_POSITION:function(e,t){e.position=parseInt(t)},RESET_POSITION:function(e){e.position=0},SET_MODULE_THAT_ENQUEUED:function(e,t){e.moduleThatEnqueued=t}},actions:{sendPositionMessage:function(e){var t,n=this,r=e.commit,i=e.dispatch;return new Qa.a((t=Na()(La.a.mark(function e(t){var a;return La.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i("chat/conversation/formatMessage",{content:"",type:"queue-position",from:"system"},{root:!0});case 2:return a=e.sent,r("chat/conversation/STORE_MESSAGE",a,{root:!0}),e.abrupt("return",t());case 5:case"end":return e.stop()}},e,n)})),function(e){return t.apply(this,arguments)}))},showEnqueued:function(e,t){var n=e.state,r=e.commit,i=(e.dispatch,t.position);return new Qa.a(function(e,t){n.moduleThatEnqueued;return r("SET_POSITION",i),r("chat/DISABLE_LOADING",null,{root:!0}),Ps.replace("/chat/queue"),e()})},showEnqueuedFailed:function(e,t){var n,r=this,i=(e.state,e.commit),a=(e.dispatch,t.error);return new Qa.a((n=Na()(La.a.mark(function e(t,n){return La.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i("chat/SET_ERROR",a,{root:!0}),i("chat/DISABLE_LOADING",null,{root:!0}),Ps.replace("/chat/stopped"),e.abrupt("return",t());case 4:case"end":return e.stop()}},e,r)})),function(e,t){return n.apply(this,arguments)}))},showDequeued:function(e){(0,e.commit)("RESET_POSITION"),Ps.replace({path:"/chat/final",query:{fromQueue:1}})}}},Qc={STORE_PARTICIPANT:function(e,t){var n=e.participants;c.default.set(n,t.identity,t)},RESET_PARTICIPANTS:function(e){e.participants={}}},es=n("WxTP"),ts=n.n(es),ns={namespaced:!0,state:qc,getters:{},mutations:Uc,actions:Bc,modules:{buttons:Xc,conversation:Kc,queue:Zc,video:{namespaced:!0,state:{participants:{}},getters:{},mutations:Qc,actions:{start:function(e,t){var n=e.commit;return new Qa.a(function(e){return n("chat/SET_VALUE_CONTROLS_ITEM",{item:"videoChat",value:!0},{root:!0}),n("STORE_PARTICIPANT",o()({},t.localParticipant,{identity:"local",local:!0})),e()})},hangup:function(e){var t,n=this,r=e.commit,i=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).local;return new Qa.a((t=Na()(La.a.mark(function e(t){return La.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!i){e.next=3;break}return e.next=3,n.$sdk.Chat.Video.turnOff();case 3:return r("chat/SET_VALUE_CONTROLS_ITEM",{item:"videoChat",value:!1},{root:!0}),r("RESET_PARTICIPANTS"),e.abrupt("return",t());case 6:case"end":return e.stop()}},e,n)})),function(e){return t.apply(this,arguments)}))},showInvite:function(e){var t=e.commit;return new Qa.a(function(e){return t("chat/SET_VALUE_CONTROLS_ITEM",{item:"confirmStartVideoChat",value:!0},{root:!0}),e()})},abortInvite:function(e){var t=e.commit;return new Qa.a(function(e){return t("chat/SET_VALUE_CONTROLS_ITEM",{item:"confirmStartVideoChat",value:!1},{root:!0}),e()})},acceptInvite:function(e){var t=this,n=e.commit;return new Qa.a(function(e,r){t.$sdk.Chat.Video.accept().then(function(){return e()}).catch(r).finally(function(){n("chat/SET_VALUE_CONTROLS_ITEM",{item:"confirmStartVideoChat",value:!1},{root:!0})})})},rejectInvite:function(e){var t=this,n=e.commit;return new Qa.a(function(e,r){t.$sdk.Chat.Video.reject().then(function(){return e()}).catch(r).finally(function(){n("chat/SET_VALUE_CONTROLS_ITEM",{item:"confirmStartVideoChat",value:!1},{root:!0})})})},mute:function(e,t){var n,r=this,i=e.commit;return new Qa.a((n=Na()(La.a.mark(function e(n){return La.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.local){e.next=3;break}return e.next=3,r.$sdk.Chat.Video.mute();case 3:return i("chat/SET_VALUE_CONTROLS_ITEM",{item:"sound",value:!1},{root:!0}),e.abrupt("return",n());case 5:case"end":return e.stop()}},e,r)})),function(e){return n.apply(this,arguments)}))},unmute:function(e,t){var n,r=this,i=e.commit;return new Qa.a((n=Na()(La.a.mark(function e(n){return La.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.local){e.next=3;break}return e.next=3,r.$sdk.Chat.Video.unmute();case 3:return i("chat/SET_VALUE_CONTROLS_ITEM",{item:"sound",value:!0},{root:!0}),e.abrupt("return",n());case 5:case"end":return e.stop()}},e,r)})),function(e){return n.apply(this,arguments)}))},hide:function(e,t){var n,r=this,i=e.commit;return new Qa.a((n=Na()(La.a.mark(function e(n){return La.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.local){e.next=3;break}return e.next=3,r.$sdk.Chat.Video.hide();case 3:return i("chat/SET_VALUE_CONTROLS_ITEM",{item:"video",value:!1},{root:!0}),e.abrupt("return",n());case 5:case"end":return e.stop()}},e,r)})),function(e){return n.apply(this,arguments)}))},unhide:function(e,t){var n,r=this,i=e.commit;return new Qa.a((n=Na()(La.a.mark(function e(n){return La.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.local){e.next=3;break}return e.next=3,r.$sdk.Chat.Video.unhide();case 3:return i("chat/SET_VALUE_CONTROLS_ITEM",{item:"video",value:!0},{root:!0}),e.abrupt("return",n());case 5:case"end":return e.stop()}},e,r)})),function(e){return n.apply(this,arguments)}))},fullscreen:function(){var e=["webkit","moz","ms","o",""];return function(t,n){for(var r=0,i=null;r=1?"upload-delete-self-form":"v-upload"}},j("customer",{addsAttachmentFile:"CREATE_FORM_ATTACHMENT",removeAttachmentFile:"REMOVE_FORM_ATTACHMENT",setAttachmentValue:"SET_FORM_ATTACHMENT_VALUE",concatAttachments:"CONCAT_ATTACHMENTS"}),{submit:function(){var e=this;return Na()(La.a.mark(function t(){return La.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e.validationCounter=0,t.prev=1,t.next=4,e.validateFields();case 4:if(t.sent){t.next=7;break}return t.abrupt("return");case 7:t.next=12;break;case 9:return t.prev=9,t.t0=t.catch(1),t.abrupt("return");case 12:e.loading=!0,e.error=!1,e.concatenateQuestion(),e.concatAttachments(),e.$sdk.Email.submit(e.form).then(function(t){e.loading=!1,e.resetUpload=!0,e.$store.commit("email/SET_PROTOCOL",t.protocol),e.$router.replace("/email/final")}).catch(function(t){e.loading=!1,e.error=t.message||!1,t.code===e.$sdk.Errors.EMAIL.CODES.VALIDATION_ERROR&&e.showSubmitValidationErrors(t.errors)});case 17:case"end":return t.stop()}},t,e,[[1,9]])}))()},updateConcatQuestion:Ra.a.debounce(function(e,t){this.concatQuestion[e].value=t,this.updateFormField(e,t)}),concatenateQuestion:function(){var e=this;return Na()(La.a.mark(function t(){var n,r;return La.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(0!=is()(e.concatQuestion)){t.next=2;break}return t.abrupt("return");case 2:for(r in n="",e.concatQuestion)""!=e.concatQuestion[r].value&&null!=e.concatQuestion[r].value&&(n+=e.$t(e.concatQuestion[r].label)+": "+e.concatQuestion[r].value+"
");return n+="
"+e.$t("Mensagem")+":
"+e.form.question,e.updateFormField("question",n),t.next=8,e.$store.commit("customer/SET_FORM_FIELD",{field:"question",value:n});case 8:case"end":return t.stop()}},t,e)}))()},showSubmitValidationErrors:function(e){var t=this;Ra.a.forEach(e,function(e,n){var r=e[0],i=n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();t.errors.add(i,r)})},resetRadioChilds:function(e){var t=this,n=[];return!!(e&&(e.forEach(function(e){e.children&&n.push(e.children)}),n.length>0))&&(n.forEach(function(e){t.$store.commit("customer/SET_FORM_FIELD",{field:e,value:null})}),!0)}}),computed:o()({canShowAlertError:function(){return Boolean(this.error)},obrigatorioRequired:function(){return this.form.subAttachments.obrigatorioAttachment.filter(function(e){return e.name}).length!==this.form.subAttachments.obrigatorioAttachment.length?"required":""}},D({pageType:function(e){return e.customer.pageType},form:function(e){return e.customer.form},attachmentCounter:function(e){return e.customer.attachmentCounter},categories:function(e){return"default"!=e.customer.pageType?e.email.categories[e.customer.pageType]:e.email.categoriesDefault},reclamacaoCategories:function(e){return e.email.reclamacaoCategories},tipoPessoa:function(e){return e.email.tipoPessoa},regiao:function(e){return e.email.regiao}})),mounted:function(){this.$store.commit("email/RESET_PROTOCOL")},created:function(){var e={pt_BR:{name:"Nome",email:"E-mail",FieldU:"CPF",FieldA:"Telefone",ProtocoloFieldA:"N\xfamero do Pedido",mainCategory:"Assunto",reclamacaoCategories:"Sub-assunto",obrigatorioAttachment:"Anexo",question:"Mensagem"},es:{name:"Nombre",email:"E-mail",FieldA:"Tel\xe9fono",FieldU:"Documento",mainCategory:"Asunto",reclamacaoCategories:"Asunto secundario",question:"Mesaje"},en:{name:"Name",email:"E-mail",FieldA:"Phone",FieldU:"Document",mainCategory:"Subject",reclamacaoCategories:"Second Subject",question:"Message"}},t=this.$root.locale;this.$validator.localize("pt_BR",{attributes:e.pt_BR}),this.$validator.localize("en",{attributes:e.en}),this.$validator.localize("es",{attributes:e.es}),this.$validator.localize(t)},components:{uploadDeleteSelfForm:cs}},ls={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"email-form"},[n("p",{staticClass:"_textsmall"},[n("i",[e._v("\n "+e._s(e.$t("Ol\xe1! Preencha o formul\xe1rio e retornaremos seu email!"))+"\n ")])]),e._v(" "),e.errors.count()>0?n("v-alert",{attrs:{layout:"danger"}},[e._v("\n "+e._s(e.$t("Ocorreu algum erro no envio de seu e-mail."))+"\n "),n("br"),e._v("\n "+e._s(e.$t("Por favor, verifique se existe algum erro nos campos abaixo e tente novamente!"))+"\n ")]):e._e(),e._v(" "),e.error?n("v-alert",{attrs:{layout:"danger"}},[e._v("\n "+e._s(e.$t(e.error))+"\n ")]):e._e(),e._v(" "),n("form",{staticClass:"form",on:{submit:function(t){return t.preventDefault(),e.submit(t)}}},[n("v-field-container",[n("v-label",[e._v(e._s(e.$t("Nome"))+"*")]),e._v(" "),n("v-input",{directives:[{name:"validate",rawName:"v-validate",value:"required|min:3",expression:"'required|min:3'"}],attrs:{id:"name",name:"name",placeholder:e.$t("Digite seu Nome"),value:e.form.name},on:{input:function(t){e.updateFormField("name",t.target.value)}}}),e._v(" "),e.errors.has("name")?n("v-field-error",[e._v(e._s(e.errors.first("name")))]):e._e()],1),e._v(" "),n("v-field-container",[n("v-label",[e._v(e._s(e.$t("E-mail"))+"*")]),e._v(" "),n("v-input",{directives:[{name:"validate",rawName:"v-validate",value:"required|min:3|email",expression:"'required|min:3|email'"}],attrs:{id:"email",name:"email",type:"email",placeholder:e.$t("Digite seu E-mail"),value:e.form.email},on:{input:function(t){e.updateFormField("email",t.target.value)}}}),e._v(" "),e.errors.has("email")?n("v-field-error",[e._v(e._s(e.errors.first("email")))]):e._e()],1),e._v(" "),n("v-field-container",[n("v-label",[e._v(e._s(e.$t("Telefone"))+"*")]),e._v(" "),n("v-input",{directives:[{name:"mask",rawName:"v-mask",value:["(##) ####-####","(##) #####-####"],expression:"['(##) ####-####', '(##) #####-####']"},{name:"validate",rawName:"v-validate",value:"required|phone",expression:"'required|phone'"}],attrs:{id:"FieldA",name:"FieldA",placeholder:e.$t("Digite seu Telefone"),value:e.form.FieldA},on:{input:function(t){e.updateFormField("FieldA",t.target.value)}}}),e._v(" "),e.errors.has("FieldA")?n("v-field-error",[e._v(e._s(e.errors.first("FieldA")))]):e._e()],1),e._v(" "),n("v-field-container",[n("v-label",[e._v(e._s(e.$t("Pessoa F\xedsica ou Pessoa Jur\xeddica?"))+"*")]),e._v(" "),n("v-radio-list",{ref:"ProtocoloFieldC",attrs:{options:e.tipoPessoa,name:"ProtocoloFieldC",checked:e.form.ProtocoloFieldC,validate:"required"},on:{input:function(t){e.updateRadioField("ProtocoloFieldC",t,e.$refs.ProtocoloFieldC.options)}}}),e._v(" "),e.errors.has("ProtocoloFieldC")?n("v-field-error",[e._v(e._s(e.errors.first("ProtocoloFieldC")))]):e._e()],1),e._v(" "),"Pessoa F\xedsica"==e.form.ProtocoloFieldC?n("v-field-container",[n("v-label",[e._v(e._s(e.$t("CPF/CNPJ"))+"*")]),e._v(" "),n("v-input",{directives:[{name:"mask",rawName:"v-mask",value:["###.###.###-##","##.###.###/####-##"],expression:"['###.###.###-##', '##.###.###/####-##']"},{name:"validate",rawName:"v-validate",value:"required|cpfcnpj",expression:"'required|cpfcnpj'"}],attrs:{id:"FieldU",name:"FieldU",type:"text",placeholder:e.$t("Digite seu CPF/CNPJ"),value:e.form.FieldU},on:{input:function(t){e.updateFormField("FieldU",t.target.value)}}}),e._v(" "),e.errors.has("FieldU")?n("v-field-error",[e._v(e._s(e.errors.first("FieldU")))]):e._e()],1):e._e(),e._v(" "),n("v-field-container",[n("v-label",[e._v(e._s(e.$t("N\xfamero do Pedido"))+"*")]),e._v(" "),n("v-input",{directives:[{name:"validate",rawName:"v-validate",value:"required",expression:"'required'"}],key:"ProtocoloFieldA",attrs:{id:"ProtocoloFieldA",name:"ProtocoloFieldA",type:"text",placeholder:e.$t("Digite o N\xfamero do Pedido"),value:e.form.ProtocoloFieldA},on:{input:function(t){e.updateFormField("ProtocoloFieldA",t.target.value)}}}),e._v(" "),e.errors.has("ProtocoloFieldA")?n("v-field-error",[e._v(e._s(e.errors.first("ProtocoloFieldA")))]):e._e()],1),e._v(" "),n("v-field-container",[n("v-label",[e._v(e._s(e.$t("Assunto"))+"*")]),e._v(" "),n("v-select2",{attrs:{id:"mainCategory",name:"mainCategory",value:e.form.mainCategory,placeholder:e.$t("Escolha um Assunto"),hasError:e.errors.has("mainCategory"),options:e.categories,validate:"select"},on:{input:function(t){e.updateSelectField("mainCategory",t)}}}),e._v(" "),e.errors.has("mainCategory")?n("v-field-error",[e._v(e._s(e.errors.first("mainCategory")))]):e._e()],1),e._v(" "),"reclamacao"==e.form.mainCategory?n("v-field-container",[n("v-label",[e._v(e._s(e.$t("Sub-assunto"))+"*")]),e._v(" "),n("v-select2",{attrs:{id:"reclamacaoCategories",name:"reclamacaoCategories",value:e.form.reclamacaoCategories,placeholder:e.$t("Escolha um sub-assunto"),hasError:e.errors.has("reclamacaoCategories"),options:e.reclamacaoCategories,validate:"select"},on:{input:function(t){e.updateSelectField("reclamacaoCategories",t)}}}),e._v(" "),e.errors.has("reclamacaoCategories")?n("v-field-error",[e._v(e._s(e.errors.first("reclamacaoCategories")))]):e._e()],1):e._e(),e._v(" "),n("v-field-container",[n("v-label",[e._v(e._s(e.$t("Regi\xe3o"))+"*")]),e._v(" "),n("v-radio-list",{ref:"regiao",staticClass:"-columns",attrs:{options:e.regiao,name:"regiao",checked:e.form.regiao,validate:"required"},on:{input:function(t){e.updateRadioField("regiao",t,e.$refs.regiao.options,"concat")}}}),e._v(" "),e.errors.has("regiao")?n("v-field-error",[e._v(e._s(e.errors.first("regiao")))]):e._e()],1),e._v(" "),n("v-field-container",[n("v-label",[e._v(e._s(e.$t("Bairro")))]),e._v(" "),n("v-input",{attrs:{id:"bairro",name:"bairro",type:"text",placeholder:e.$t("Digite seu Bairro"),value:e.form.bairro},on:{input:function(t){e.updateConcatQuestion("bairro",t.target.value)}}}),e._v(" "),e.errors.has("bairro")?n("v-field-error",[e._v(e._s(e.errors.first("bairro")))]):e._e()],1),e._v(" "),n("v-field-container",[n("v-label",[e._v(e._s(e.$t("Anexo Obrigat\xf3rio"))+"*")]),e._v(" "),n("v-field-container",{attrs:{"no-margin":!0,group:!0}},[e._l(e.form.subAttachments.obrigatorioAttachment,function(t,r){return n(e.attachmentComponent(r),{directives:[{name:"validate",rawName:"v-validate",value:e.obrigatorioRequired,expression:"obrigatorioRequired"}],key:r,tag:"component",attrs:{id:"attachments-"+r,name:"obrigatorioAttachment",file:t,placeholder:e.$t("Adicione alguma foto ou arquivo"),"reset-upload":e.resetUpload},on:{select:function(t){e.setAttachmentValue({name:"obrigatorioAttachment",key:r,value:t})},delete:function(t){e.removeAttachmentFile({name:"obrigatorioAttachment",key:r})}}})}),e._v(" "),n("v-button",{directives:[{name:"show",rawName:"v-show",value:e.form.subAttachments&&e.form.subAttachments.obrigatorioAttachment.length<=4,expression:"form.subAttachments && form.subAttachments.obrigatorioAttachment.length <= 4"}],staticClass:"_floatright",attrs:{type:"button",link:!0,layout:"primary",size:"small"},on:{click:function(t){e.addsAttachmentFile("obrigatorioAttachment")}}},[e._v(e._s(e.$t("Adicionar mais")))]),e._v(" "),e.errors.has("obrigatorioAttachment")?n("v-field-error",[e._v(e._s(e.errors.first("obrigatorioAttachment")))]):e._e()],2)],1),e._v(" "),n("v-field-container",[n("v-label",[e._v(e._s(e.$t("Anexo Opcional")))]),e._v(" "),n("v-field-container",{attrs:{"no-margin":!0,group:!0}},[e._l(e.form.subAttachments.opcionalAttachment,function(t,r){return n(e.attachmentComponent(r),{key:r,tag:"component",attrs:{id:"attachments-"+r,file:t,name:"opcionalAttachment",placeholder:e.$t("Adicione alguma foto ou arquivo"),"reset-upload":e.resetUpload},on:{select:function(t){e.setAttachmentValue({name:"opcionalAttachment",key:r,value:t})},delete:function(t){e.removeAttachmentFile({name:"opcionalAttachment",key:r})}}})}),e._v(" "),n("v-button",{directives:[{name:"show",rawName:"v-show",value:e.form.subAttachments&&e.form.subAttachments.opcionalAttachment.length<=4,expression:"form.subAttachments && form.subAttachments.opcionalAttachment.length <= 4"}],staticClass:"_floatright",attrs:{type:"button",link:!0,layout:"primary",size:"small"},on:{click:function(t){e.addsAttachmentFile("opcionalAttachment")}}},[e._v(e._s(e.$t("Adicionar mais")))]),e._v(" "),e.errors.has("opcionalAttachment")?n("v-field-error",[e._v(e._s(e.errors.first("opcionalAttachment")))]):e._e()],2)],1),e._v(" "),n("v-field-container",[n("v-label",[e._v(e._s(e.$t("Mensagem"))+"*")]),e._v(" "),n("v-textarea",{directives:[{name:"validate",rawName:"v-validate",value:"required|min:3",expression:"'required|min:3'"}],staticClass:"fieldQuestion",attrs:{id:"question",name:"question",value:e.form.question,placeholder:e.$t("Digite aqui sua mensagem")},on:{input:function(t){e.updateFormField("question",t.target.value)}}}),e._v(" "),e.errors.has("question")?n("v-field-error",[e._v(e._s(e.errors.first("question")))]):e._e()],1),e._v(" "),n("v-field-container",{attrs:{submit:!0}},[n("p",{staticClass:"_infotext"},[e._v("* "+e._s(e.$t("Campos de preenchimento obrigat\xf3rio")))]),e._v(" "),n("v-button",{attrs:{type:"submit",icon:e.loading?["fas","spinner"]:null,"pulse-icon":!0,disabled:e.loading}},[e._v(e._s(e.$t("Enviar")))])],1)],1)],1)},staticRenderFns:[]};var us=n("mUJo")(ss,ls,!1,function(e){n("v9hH")},"data-v-f78270a2",null).exports,fs={name:"email-final",methods:{sendNewEmail:_.debounce(function(){this.$store.commit("email/RESET_PROTOCOL"),this.$store.commit("customer/RESET_FORM"),oo.a.$emit("resetSelecion"),this.$router.replace("/email")},150)},computed:o()({},D("email",["protocol"]),D("customer",{name:function(e){return e.form.name}}))},hs={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"email-final"},[n("v-alert",{attrs:{layout:"success"}},[e._v("\n "+e._s(e.$t("Muito obrigado, {name},",{name:e.name}))+"\n "),e.protocol?n("span",[e._v(e._s(e.$t("o seu n\xfamero de protocolo \xe9 {protocol},",{protocol:e.protocol})))]):e._e(),e._v("\n "+e._s(e.$t(" sua mensagem foi recebida com sucesso, responderemos em breve."))+"\n ")]),e._v(" "),n("div",{staticClass:"actions"},[n("v-button",{attrs:{type:"primary",icon:["fas","envelope"]},on:{click:function(t){e.sendNewEmail()}}},[n("i",[e._v(e._s(e.$t("Enviar outro e-mail")))])])],1)],1)},staticRenderFns:[]};var ds=[{path:"/email",component:us,meta:{name:"email",title:"Fale conosco!",titleIcon:["far","envelope"]}},{path:"/email/final",component:n("mUJo")(fs,hs,!1,function(e){n("YZyN")},"data-v-456b4016",null).exports,meta:{name:"email",title:"Fale conosco!",titleIcon:["far","envelope"]}}],ps={namespaced:!0,state:{categories:{fisica:[{label:"fisica - Como funciona",value:243078},{label:"fisica - Reclama\xe7\xe3o",value:"reclamacao",enableSubItems:!0}],online:[{label:"online - Como funciona",value:243078},{label:"online - Reclama\xe7\xe3o",value:"reclamacao",enableSubItems:!0}]},categoriesDefault:[{label:"Informa\xe7\xe3o",value:123978},{label:"Reclama\xe7\xe3o",value:"reclamacao",enableSubItems:!0},{label:"Solicita\xe7\xe3o",value:"solicitacao",enableSubItems:!0},{label:"Elogio",value:348547}],reclamacaoCategories:[{label:"Entrega",value:348555},{label:"Pedido",value:348557},{label:"Produto",value:348559}],tipoPessoa:[{label:"Pessoa F\xedsica",value:"pessoaFisica",children:["FieldU"]},{label:"Pessoa Jur\xeddica",value:"pessoaJuridica"}],regiao:[{label:"Capital de S\xe3o Paulo",value:"capital"},{label:"Interior de S\xe3o Paulo",value:"interior"}],protocol:0},getters:{},mutations:{SET_PROTOCOL:function(e,t){e.protocol=t},RESET_PROTOCOL:function(e){e.protocol=0}},actions:{}},vs={formUpdate:{name:"form-update",namespaced:!0,directive:{bind:function(e,t,n){var r="select"===e.tagName.toLowerCase()?"change":"input";e.addEventListener(r,_.debounce(function(){return n.context.$store.commit("customer/SET_FORM_FIELD",{field:t.arg,value:e.value})},200))}}}},ms={namespaced:!0,state:{pageType:"",form:{subAttachments:{obrigatorioAttachment:[{name:"",content:""}],opcionalAttachment:[{name:"",content:""}]}},error:{}},getters:{},mutations:{SET_FORM_FIELD:function(e,t){var n=t.field,r=t.value;c.default.set(e.form,n,r)},CREATE_FORM_ATTACHMENT:function(e,t){e.form.subAttachments[t].length>=5||e.form.subAttachments[t].push({name:"",content:""})},REMOVE_FORM_ATTACHMENT:function(e,t){var n=t.name,r=t.key;if(e.form.subAttachments[n]){var i=[].concat(xc()(e.form.subAttachments[n]));i.splice(r,1),c.default.set(e.form.subAttachments,n,i)}},SET_FORM_ATTACHMENT_VALUE:function(e,t){var n=t.name,r=t.key,i=t.value;e.form.subAttachments[n]||c.default.set(e.form.subAttachments,n,[]),c.default.set(e.form.subAttachments[n],r,i)},CONCAT_ATTACHMENTS:function(e){e.form.attachments=[],_.forEach(e.form.subAttachments,function(t,n){e.form.attachments=_.concat(e.form.attachments,t)})},RESET_FORM:function(e){var t=e.form.subAttachments,n=is()(t);e.form={},e.form.subAttachments=t,n.forEach(function(t){c.default.set(e.form.subAttachments[t],name,[{name:"",content:""}])})},SET_ERROR:function(e,t){e.error=t},SET_PAGE_TYPE:function(e,t){e.pageType=t}},actions:{}},gs={name:"error",computed:{error:function(){return this.$store.state.customer.error}},methods:{redirectToStartPage:function(){var e=this.$localStorage.get("lastPage");e&&"error"!==e||(e=h.startModule),this.$router.replace("/"+e+"/")}},mounted:function(){this.error.code||this.redirectToStartPage()}},ys={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"error"},[n("h1",{staticClass:"title"},[e._v(e._s(e.$t("Um erro foi encontrado"))+"!")]),e._v(" "),n("p",[n("strong",[e._v(e._s(e.$t("C\xf3digo"))+":")]),e._v("\n "+e._s(e.error.code)+"\n ")]),e._v(" "),n("p",[n("strong",[e._v(e._s(e.$t("Mensagem"))+":")]),e._v("\n "+e._s(e.error.msg)+"\n ")])])},staticRenderFns:[]};var bs=[{path:"/error",component:n("mUJo")(gs,ys,!1,function(e){n("2nz4")},"data-v-7444488f",null).exports,meta:{name:"error",layout:{empty:!0,fluid:!0}}}],_s={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"phone-page"},[n("p",{staticClass:"_textsmall"},[n("i",[e._v(e._s(e.$t("Entre em contato ligando para qualquer um dos n\xfameros abaixo:")))])]),e._v(" "),n("div",{staticClass:"phone-block"},[n("div",{staticClass:"title"},[e._v(e._s(e.$t("Telefones")))]),e._v(" "),e._m(0),e._v(" "),e._m(1)]),e._v(" "),n("div",{staticClass:"phone-block"},[n("div",{staticClass:"title"},[e._v(e._s(e.$t("Whatsapp")))]),e._v(" "),e._m(2)]),e._v(" "),n("p",[e._v(e._s(e.$t("Segunda a Sexta-feira: 9h \xe0s 20h "))),n("br"),e._v(e._s(e.$t("S\xe1bado: 9h \xe0s 18h")))])])},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"phone"},[t("a",{attrs:{href:"tel://11-3323-3456"}},[this._v("+55 (11) 3323-3456")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"phone"},[t("a",{attrs:{href:"tel://11-3323-3457"}},[this._v("+55 (11) 3323-3457")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"phone"},[t("a",{attrs:{href:"https://api.whatsapp.com/send?phone=+5511999999999"}},[this._v("+55 (11) 99999-9999")])])}]};var Cs=[{path:"/telefone",component:n("mUJo")({name:"telefone"},_s,!1,function(e){n("YUVh")},"data-v-5b52481c",null).exports,meta:{name:"telefone",title:"Nossos Telefones",titleIcon:["fas","phone"]}}],zs={ai:eo,chat:ns,email:ps,customer:ms,telefone:{namespaced:!0,state:{},getters:{},mutations:{},actions:{}}},Ss={methods:{enterLink:function(){return this.$sdk.Chat.enqueued?"/chat/queue":this.$sdk.Chat.talking||this.$sdk.ChatBot.Authentication.authenticated?"/chat/room":"/chat"}}},xs={name:"avatar",mixins:[Ss,Fo]},ws={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"central-avatar",class:{"-isSafari":e.isSafari}},[n("v-button",{staticClass:"action",attrs:{shadow:!0},on:{click:function(t){e.$router.replace(e.enterLink())}}},[e._v(e._s(e.$t("Precisa de Ajuda?")))])],1)},staticRenderFns:[]};var Ms={name:"avatar-icon",mixins:[Ss]},Es={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"central-avatar"},[n("v-button",{staticClass:"action",attrs:{shadow:!0,icon:["far","comment"],onlyIcon:!0,size:"large"},on:{click:function(t){e.$router.replace(e.enterLink())}}})],1)},staticRenderFns:[]};var Ts={name:"avatar",mixins:[Ss]},ks={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"central-avatar"},[n("v-button",{staticClass:"action",attrs:{shadow:!0,icon:["far","comment"]},on:{click:function(t){e.$router.replace(e.enterLink())}}},[e._v(e._s(e.$t("Precisa de Ajuda?")))])],1)},staticRenderFns:[]};var As={name:"avatar",computed:{avatarComponent:function(){return{text:"avatar-text",icon:"avatar-icon","text-icon":"avatar-text-icon"}[h.isMobile?"icon":h.avatar.type]||null}},components:{avatarText:n("mUJo")(xs,ws,!1,function(e){n("1gmp")},"data-v-6cb0b2f0",null).exports,avatarIcon:n("mUJo")(Ms,Es,!1,function(e){n("HyhY")},"data-v-5d1c15ea",null).exports,avatarTextIcon:n("mUJo")(Ts,ks,!1,function(e){n("zL/y")},"data-v-0d8eb041",null).exports}},Os={render:function(){var e=this.$createElement;return(this._self._c||e)(this.avatarComponent,this._g(this._b({tag:"component"},"component",this.$attrs,!1),this.$listeners))},staticRenderFns:[]},Ls=[{path:"/avatar",component:n("mUJo")(As,Os,!1,null,null,null).exports,meta:{name:"avatar",layout:{empty:!0,fluid:!0}}}],Hs=[].concat(xc()(Ja),xc()($c),xc()(ds),xc()(Ls),xc()(Cs),xc()(bs)),Ns={customer:vs,chat:ro};c.default.use(Aa);var Ps=new Aa({routes:Hs}),Rs=function(e){Object.defineProperty(e,"$sdk",{get:function(){return se}})},Vs=function e(t,n){if(!e._vm)throw"Vm not defined";return t(e._vm,n)},Is=Vs;Vs.install=function(e){e.mixin({beforeCreate:function(){this.$options.dispatcher?(this._dispatcherRoot=this,this._dispatcher=this.$options.dispatcher,this._dispatcher._vm||(this._dispatcher._vm=this._dispatcherRoot)):this._dispatcherRoot=this.$parent&&this.$parent._dispatcherRoot||this}}),Object.defineProperty(e.prototype,"$dispatcher",{get:function(){return this._dispatcherRoot._dispatcher}})},c.default.use(Is);var Fs=Is,Ds=[Rs,function(e){Object.defineProperty(e,"$dispatcher",{get:function(){return Fs}})}];c.default.use(W);var js=new W.Store({modules:zs,plugins:Ds}),$s=n("rkdX"),qs=n.n($s),Us=n("afBD"),Bs=n.n(Us),Xs=(n("eZEL"),[]),Ws={"change-route":function(e,t){return e.$router.replace(t)},"set-form":function(e,t,n){return e.$store.commit("customer/SET_FORM_FIELD",{field:t,value:n})},"submit-question":function(e,t){return e.$store.commit("ai/SET_QUERY",t),e.$store.dispatch("ai/search",t)},"set-locale":function(e,t){e.$root.locale=t,e.$validator.localize(t)}};window.iFrameResizer={widthCalculationMethod:"taggedElement",heightCalculationMethod:"taggedElement",onReady:function(){window.parentIFrame.getId();Xs.forEach(function(e){var t;return(t=window.parentIFrame).sendMessage.apply(t,xc()(e))})},onMessage:function(e){var t=e.split(":");if("eaction"===t[0]){var n=t[1];Ws[n]&&Ws[n].apply(Ws,[window.iFrameResizer.$vue].concat(xc()(t.slice(2))))}}};var Gs=function(){function e(){qs()(this,e)}return Bs()(e,[{key:"sendMessage",value:function(){for(var e,t=arguments.length,n=Array(t),r=0;r