',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 Pa.a.find(t,function(t){return t&&t.name===e.message.author})}},q("chat",["moduleEnabled"])),components:{VRuntimeTemplate:ec,actionButton:rc}},ac={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 oc=n("mUJo")(ic,ac,!1,function(e){n("PLV2")},"data-v-7421063f",null).exports,cc={name:"message-queue-position",props:{message:{required:!0,type:Object}},computed:o()({},q("chat/queue",["position"]))},sc={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 uc=n("mUJo")(cc,sc,!1,function(e){n("IsRk")},"data-v-893fa8ea",null).exports,lc={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)}}},q("chat",{additionalData:function(e){return e.survey.additionalData}}))},fc={render:function(){var e=this.$createElement;return(this._self._c||e)("div")},staticRenderFns:[]};var dc=n("mUJo")(lc,fc,!1,function(e){n("f1Jv")},"data-v-339a1a34",null).exports,hc={name:"survey-stars",extends:dc},pc={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 mc={name:"survey-faces",extends:dc},vc={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 _c={name:"survey-numbers",extends:dc},Mc={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 yc={name:"message-survey",computed:{surveyComponent:function(){return{stars:"survey-stars",faces:"survey-faces",numbers:"survey-numbers"}[d.chat.survey.type]||null}},components:{surveyStars:n("mUJo")(hc,pc,!1,function(e){n("pGb5")},"data-v-59ae8b26",null).exports,surveyFaces:n("mUJo")(mc,vc,!1,function(e){n("GZIq")},"data-v-3800e235",null).exports,surveyNumbers:n("mUJo")(_c,Mc,!1,function(e){n("1e5W")},"data-v-692a4601",null).exports}},gc={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:[]},bc=n("mUJo")(yc,gc,!1,null,null,null).exports,zc={name:"message-system",props:{message:{required:!0,type:Object}},data:function(){}},Lc={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 Ac=n("mUJo")(zc,Lc,!1,function(e){n("qwnw")},"data-v-0e5c6e93",null).exports,wc={name:"message-warning",props:{message:{required:!0,type:Object}},components:{messageText:oc}},Tc={render:function(){var e=this.$createElement;return(this._self._c||e)("message-text",{attrs:{message:this.message}})},staticRenderFns:[]};var Sc=n("mUJo")(wc,Tc,!1,function(e){n("1yq0")},"data-v-f3676756",null).exports,Cc={name:"room",data:function(){return{autoScrollEnabled:!0,moduleChatBot:"ChatBot",botName:d.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()({},q({messages:function(e){return e.chat.conversation.messages}}),q("chat",["controls","moduleEnabled","socketReconnecting"]),q("chat/conversation",["showSendMessage","showExpertWriting","expert"])),directives:{autoScrollMessages:Eo},components:{connectionProblemsInformative:To,chatControls:Ro,videoParticipants:qo,confirmStartVideoChat:Fo,sendMessage:Zo,messageText:oc,messageQueuePosition:uc,messageSurvey:bc,messageSystem:Ac,messageWarning:Sc}},xc={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 kc=n("mUJo")(Cc,xc,!1,function(e){n("348U")},"data-v-39997bec",null).exports,Oc={render:function(){var e=this.$createElement;return(this._self._c||e)("div",{staticClass:"row"},[this._t("default")],2)},staticRenderFns:[]};var Ec=n("mUJo")({name:"row"},Oc,!1,function(e){n("eE9i")},"data-v-124ea590",null).exports,Nc=n("ZRhR"),Hc=n.n(Nc),Dc={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 Yc=n("mUJo")(Vc,qc,!1,function(e){n("1THW")},"data-v-3a502839",null).exports,Ic={props:{side:{required:!1,default:"bottom",type:String}}},Fc={props:{layout:{required:!1,default:"default",type:String}}},Wc={name:"btn-dropdown",props:{showCaretIcon:{required:!1,default:!0,type:Boolean}},mixins:[Ic,Fc],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=Ha()(Ea.a.mark(function t(i){var a,o;return Ea.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 os()(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&&Bs.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=Ha()(Ea.a.mark(function e(t){return Ea.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("ChatBot"!==a.chat.moduleEnabled){e.next=3;break}return Bs.replace({path:"/chat/final",query:{fromBot:!0}}),e.abrupt("return",t());case 3:if(d.chat.survey.enable){e.next=6;break}return Bs.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,chatBotContext:n.context,fromChatBot:!0})).then(e).catch(c)})},stop:function(e){var t,n=this,r=e.dispatch,i=e.rootState;return new Qa.a((t=Ha()(Ea.a.mark(function e(t,a){var o;return Ea.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)}))}}},ss={namespaced:!0,state:{position:0,moduleThatEnqueued:d.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=Ha()(Ea.a.mark(function e(t){var a;return Ea.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}),Bs.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=Ha()(Ea.a.mark(function e(t,n){return Ea.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}),Bs.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"),Bs.replace({path:"/chat/final",query:{fromQueue:1}})}}},us={STORE_PARTICIPANT:function(e,t){var n=e.participants;c.default.set(n,t.identity,t)},RESET_PARTICIPANTS:function(e){e.participants={}}},ls=n("WxTP"),fs=n.n(ls),ds={namespaced:!0,state:Qc,getters:{},mutations:es,actions:ts,modules:{buttons:ns,conversation:cs,queue:ss,video:{namespaced:!0,state:{participants:{}},getters:{},mutations:us,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=Ha()(Ea.a.mark(function e(t){return Ea.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=Ha()(Ea.a.mark(function e(n){return Ea.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=Ha()(Ea.a.mark(function e(n){return Ea.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=Ha()(Ea.a.mark(function e(n){return Ea.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=Ha()(Ea.a.mark(function e(n){return Ea.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"}},Y("customer",{addsAttachmentFile:"CREATE_FORM_ATTACHMENT",removeAttachmentFile:"REMOVE_FORM_ATTACHMENT",setAttachmentValue:"SET_FORM_ATTACHMENT_VALUE",concatAttachments:"CONCAT_ATTACHMENTS"}),{submit:function(){var e=this;return Ha()(Ea.a.mark(function t(){var n;return Ea.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(n=t.sent,e.validatedRecaptcha){t.next=7;break}return t.abrupt("return",e.errorRecaptcha=!0);case 7:if(n){t.next=9;break}return t.abrupt("return");case 9:t.next=14;break;case 11:return t.prev=11,t.t0=t.catch(1),t.abrupt("return");case 14:e.loading=!0,e.error=!1,e.validatedRecaptcha=!1,e.errorRecaptcha=!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 21:case"end":return t.stop()}},t,e,[[1,11]])}))()},updateConcatQuestion:Pa.a.debounce(function(e,t){this.concatQuestion[e].value=t,this.updateFormField(e,t)}),concatenateQuestion:function(){var e=this;return Ha()(Ea.a.mark(function t(){var n,r;return Ea.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(0!=ps()(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.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;Pa.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":""},siteKey:function(){return d.recaptcha.siteKey}},q({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/CNPJ",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:_s,VueRecaptcha:_o}},ys={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||e.errorRecaptcha?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("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._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:"phone",expression:"'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("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(" "),n("v-field-container",[n("v-label",[e._v(e._s(e.$t("Anexo")))]),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",[n("vue-recaptcha",{ref:"recaptcha",staticClass:"g-recaptcha",attrs:{sitekey:e.siteKey,loadRecaptchaScript:!0},on:{verify:e.onVerify,expired:e.onExpired}}),e._v(" "),e.errorRecaptcha?n("v-field-error",[e._v(e._s(e.$t("Captcha n\xe3o foi preenchido.")))]):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 gs=n("mUJo")(Ms,ys,!1,function(e){n("acpu")},"data-v-a0322da4",null).exports,bs={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()({},q("email",["protocol"]),q("customer",{name:function(e){return e.form.name}}))},zs={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 Ls=[{path:"/email",component:gs,meta:{name:"email",title:"Fale conosco!",titleIcon:["far","envelope"]}},{path:"/email/final",component:n("mUJo")(bs,zs,!1,function(e){n("YZyN")},"data-v-456b4016",null).exports,meta:{name:"email",title:"Fale conosco!",titleIcon:["far","envelope"]}}],As={namespaced:!0,state:{categoriesDefault:[{value:375657,label:"Cadastro"},{value:396572,label:"Cart\xe3o Atacad\xe3o"},{value:375659,label:"Como Funciona"},{value:375661,label:"Envio de Pedidos"},{value:375663,label:"Formas de pagamento"},{value:382562,label:"Imprensa"},{value:396844,label:"Lojas F\xedsicas Atacad\xe3o"},{value:382558,label:"LGPD"},{value:375665,label:"Meus pedidos"},{value:382560,label:"Pol\xedtica de Privacidade"},{value:375669,label:"Prazo de entrega e Frete"},{value:375671,label:"Produtos e Pe\xe7as"},{value:375673,label:"Vendendo Online no Atacad\xe3o"},{value:375667,label:"Outros assuntos"}],protocol:0},getters:{},mutations:{SET_PROTOCOL:function(e,t){e.protocol=t},RESET_PROTOCOL:function(e){e.protocol=0}},actions:{}},ws={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))}}}},Ts={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(Hc()(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=ps()(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:{}},Ss={name:"error",computed:{error:function(){return this.$store.state.customer.error}},methods:{redirectToStartPage:function(){var e=this.$localStorage.get("lastPage");e&&"error"!==e||(e=d.startModule),this.$router.replace("/"+e+"/")}},mounted:function(){this.error.code||this.redirectToStartPage()}},Cs={render:function(){var e=this.$createElement;return(this._self._c||e)("div")},staticRenderFns:[]};var xs=[{path:"/error",component:n("mUJo")(Ss,Cs,!1,function(e){n("0Yym")},"data-v-256fddb8",null).exports,meta:{name:"error",layout:{empty:!0,fluid:!0}}}],ks={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 Os=[{path:"/telefone",component:n("mUJo")({name:"telefone"},ks,!1,function(e){n("YUVh")},"data-v-5b52481c",null).exports,meta:{name:"telefone",title:"Nossos Telefones",titleIcon:["fas","phone"]}}],Es={ai:eo,chat:ds,email:As,customer:Ts,telefone:{namespaced:!0,state:{},getters:{},mutations:{},actions:{}}},Ns={methods:{enterLink:function(){return this.$sdk.Chat.enqueued?"/chat/queue":this.$sdk.Chat.talking||this.$sdk.ChatBot.Authentication.authenticated?"/chat/room":"/ai"}}},Hs={name:"avatar",mixins:[Ns,Go]},Ds={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 Ps={name:"avatar-icon",mixins:[Ns]},Rs={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 js={name:"avatar",mixins:[Ns]},Vs={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 qs={name:"avatar",computed:{avatarComponent:function(){return{text:"avatar-text",icon:"avatar-icon","text-icon":"avatar-text-icon"}[d.isMobile?"icon":d.avatar.type]||null}},components:{avatarText:n("mUJo")(Hs,Ds,!1,function(e){n("1gmp")},"data-v-6cb0b2f0",null).exports,avatarIcon:n("mUJo")(Ps,Rs,!1,function(e){n("HyhY")},"data-v-5d1c15ea",null).exports,avatarTextIcon:n("mUJo")(js,Vs,!1,function(e){n("zL/y")},"data-v-0d8eb041",null).exports}},Ys={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:[]},Is=[{path:"/avatar",component:n("mUJo")(qs,Ys,!1,null,null,null).exports,meta:{name:"avatar",layout:{empty:!0,fluid:!0}}}],Fs=[].concat(Hc()(Ka),Hc()(Zc),Hc()(Ls),Hc()(Is),Hc()(Os),Hc()(xs)),Ws={customer:ws,chat:ro};c.default.use(ka);var Bs=new ka({routes:Fs}),Xs=function(e){Object.defineProperty(e,"$sdk",{get:function(){return se}})},$s=function e(t,n){if(!e._vm)throw"Vm not defined";return t(e._vm,n)},Us=$s;$s.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(Us);var Gs=Us,Ks=[Xs,function(e){Object.defineProperty(e,"$dispatcher",{get:function(){return Gs}})}];c.default.use($);var Js=new $.Store({modules:Es,plugins:Ks}),Zs=n("rkdX"),Qs=n.n(Zs),eu=n("afBD"),tu=n.n(eu),nu=(n("eZEL"),[]),ru={"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();nu.forEach(function(e){var t;return(t=window.parentIFrame).sendMessage.apply(t,Hc()(e))})},onMessage:function(e){var t=e.split(":");if("eaction"===t[0]){var n=t[1];ru[n]&&ru[n].apply(ru,[window.iFrameResizer.$vue].concat(Hc()(t.slice(2))))}}};var iu=function(){function e(){Qs()(this,e)}return tu()(e,[{key:"sendMessage",value:function(){for(var e,t=arguments.length,n=Array(t),r=0;r