(window.tawkJsonp=window.tawkJsonp||[]).push([["chunk-48f3b594"],{"3bc8":function(t,e,i){"use strict";(function(t){var a=i("5a60"),s=i("2f62"),n=i("f0b0"),r=i("2966"),o=i("87dd");function l(t){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function h(t){for(var e=1;ewindow.innerWidth&&(t=window.innerWidth-this.previewXOffset),"".concat(t,"px")},frameHeight:function(){return"".concat((this.height+45)*this.zoomRatio,"px")},previewYOffset:function(){var t=this.mobileBrowserName?this.minMobile:this.minDesktop,e=this.mobileBrowserName?this.yOffsetMobile:this.yOffset;return this.isCenter?e:(t.height+this.padding+e)*this.zoomRatio},previewXOffset:function(){var t=this.mobileBrowserName?this.minMobile:this.minDesktop,e=this.mobileBrowserName?this.xOffsetMobile:this.xOffset;return this.isCenter?(t.height+this.padding+e)*this.zoomRatio:e*this.zoomRatio},styleObject:function(){var t={"position:":"fixed !important;","height:":"".concat(this.frameHeight," !important;"),"width:":"".concat(this.frameWidth," !important;"),"min-height:":"".concat(this.frameHeight," !important;"),"min-width:":"".concat(this.frameWidth," !important;"),"max-height:":"".concat(this.frameHeight," !important;"),"max-width:":"".concat(this.frameWidth," !important;")};return this.isCenter?(t["top:"]="calc(50% + ".concat(this.previewYOffset,"px);"),t["transform:"]="translate(0, -50%) !important;",t["-webkit-transform:"]="translate(0, -50%) !important;"):this.isBottom?t["bottom:"]="".concat(this.previewYOffset,"px;"):t["top:"]="".concat(this.previewYOffset,"px;"),this.isRight?t["right:"]="".concat(this.previewXOffset,"px !important;"):t["left:"]="".concat(this.previewXOffset,"px !important;"),this.isVisible?t["display:"]="block !important;":t["display:"]="none !important;",h(h({},this.genericStyles),t)},inputPlaceholder:function(){var t,e=this.states[this.pageStatus];if(e&&e.body&&e.body.length)for(var i=0;i0)},isSurveyOptionOnly:function(){var t=!0;return this.messages.filter((function(e){(!e.surveyObj||e.surveyObj&&0!==e.surveyObj.question.length)&&(t=!1)})),t},getSurveyOptions:function(){var t={};if(this.messages.length){var e=this.messages.length-1,i=this.messages[e];i.surveyObj&&i.surveyObj.question.length&&((t=i.surveyObj).senderType=i.senderType)}return t}}),data:function(){return{backgroundColor:this.$store.getters["widget/headerBgColor"],cssLink:"".concat("https://embed.tawk.to/_s/v4/app/65cc2ba794a","/css/message-preview.css"),isVisible:!1,messages:[],isDuration:!0,height:100,isLive:!0,padding:20,isDraggedOver:!1,textAreaHeight:18,key:n.Helper.generateUUID()}},watch:{incomingMessage:function(t,e){"min"===this.chatWindowState&&t&&"v"!==t.senderType&&(!e||!e.cver||e.cver&&e.cver0&&(this.isBottom?this.messages[0].showProfile=!0:this.messages[this.messages.length-1].showProfile=!0)),this.messages.length>0)this.messages[this.messages.length-1].ownerId===t.ownerId&&(t.showProfile=!1);this.isBottom?this.messages.push(t):this.messages.unshift(t),this.recalculateHeight()}},recalculateHeight:function(){var t=this;setTimeout((function(){t.height=t.$refs["tawk-message-preview-content"].clientHeight+10;var e=window.innerHeight-t.previewYOffset-t.$refs["tawk-chatinput-container"].clientHeight-45;t.$refs["tawk-chat-message-container"].style["max-height"]="".concat(e*t.zoomRatio,"px"),t.$refs["tawk-chat-message-container"].scrollTop=999999999,t.scaleContent()}),1e3)},limitMessageLength:function(t,e){var i=0;if(t.length>e)for(i=0;i"===t.substring(a,a+1)){e-=1;break}}else i++;return t.substring(0,e)+(t.length>e?"[...]":"")},emojiOpened:function(t){t?this.$refs["tawk-message-preview-content"].clientHeight=0?(this.textAreaHeight=t,this.height=this.$refs["tawk-message-preview-content"].clientHeight+10+t):this.recalculateHeight())},messageTyping:function(e){t.Tawk_Window.chatManager.sendMessagePreview(e)},sendMessage:function(e){var i=e.message,a=e.attachments;this.maximizeWidget(),t.Tawk_Window.chatManager.sendMessage({message:i,attachments:a}),this.clearMessages()},ratingClicked:function(e){this.maximizeWidget(),t.Tawk_Window.chatManager.changeRating(e),this.clearMessages()},filesAdded:function(){this.height=this.$refs["tawk-message-preview-content"].clientHeight+10+66},filesRemoved:function(){this.recalculateHeight()},sendFiles:function(e){t.Tawk_Window.chatManager.uploadFiles(e),this.clearMessages(),this.maximizeWidget()},dragover:function(t){this.isLiveChatFeatureEnabled&&this.features.upload&&(t.preventDefault(),this.isDraggedOver=!0,this.recalculateHeight())},dragleave:function(t){this.isLiveChatFeatureEnabled&&this.features.upload&&(t.preventDefault(),t.currentTarget.contains(t.relatedTarget)||(this.isDraggedOver=!1,this.recalculateHeight()))},drop:function(t){this.isLiveChatFeatureEnabled&&this.features.upload&&(t.preventDefault(),this.isDraggedOver=!1,this.$refs["tawk-chatinput"]&&this.$refs["tawk-chatinput"].$refs&&this.$refs["tawk-chatinput"].$refs.fileupload&&(this.$refs["tawk-chatinput"].$refs.fileupload.files=t.dataTransfer.files,this.$refs["tawk-chatinput"].onFileUpload()))},dismissPreview:function(e,i){if(e&&e.stopPropagation(),this.messages.length){if(!i){var a=this.messages[this.messages.length-1];if(!a||!a.timeStamp)return;t.Tawk_Window.app.$socket.publish("visitorChatDismiss",{timestamp:a.timeStamp},(function(){}))}this.clearMessages()}},scaleContent:function(){if(this.mobileBrowserName){var e,i=this.isRight?"right":"left";if(e=this.isBottom?"bottom":"top",!t.Tawk_Window.isMobileOptimizedWebsite){var a="scale(".concat(this.zoomRatio,")"),s="-moz-transform: ".concat(a,";\n\t\t\t\t\t\t\t-webkit-transform: ").concat(a,";\n\t\t\t\t\t\t\t-o-transform: ").concat(a,";\n\t\t\t\t\t\t\t-ms-transform: ").concat(a,";\n\t\t\t\t\t\t\ttransform: ").concat(a,";"),n="-moz-transform-origin: ".concat(e," ").concat(i,";\n\t\t\t\t\t\t\t\t-webkit-transform-origin: ").concat(e," ").concat(i,";\n\t\t\t\t\t\t\t\t-o-transform-orgin: ").concat(e," ").concat(i,";\n\t\t\t\t\t\t\t\t-ms-transform-origin: ").concat(e," ").concat(i,";\n\t\t\t\t\t\t\t\ttransform-origin: ").concat(e," ").concat(i);this.$refs["tawk-message-preview-content"].style.cssText+=s+n;var r=parseInt(this.frameWidth.replace("px",""),10);r&&(r/=this.zoomRatio),this.$refs["tawk-message-preview"].style.width="".concat(r,"px")}}},loaded:function(){var e,i=this;e=this.$refs["tawk-message-preview"]?parseFloat(getComputedStyle(this.$refs["tawk-message-preview"]).fontSize):16,this.textAreaHeight=e+2,t.Tawk_Window.eventBus.$on("resetState",(function(){i.clearMessages()}))},paste:function(t){var e,i=(t.originalEvent||t).clipboardData;i&&((e=i.files).length&&!this.features.upload||e&&e.length&&(this.$refs["tawk-chatinput"].$refs.fileupload.files=e,this.$refs["tawk-chatinput"].onFileUpload()))},submitSurvey:function(e){t.Tawk_Window.chatManager.sendMessage({message:e})}}),mounted:function(){var e=this;window.addEventListener("resize",this.recalculateHeight),t.Tawk_Window.eventBus.$on("dismissPreview",(function(t){t.ts&&e.dismissPreview(null,!0)})),t.Tawk_Window.eventBus.$on("switchWidget",(function(){e.key=n.Helper.generateUUID()}))},beforeDestroy:function(){window.removeEventListener("resize",this.recalculateHeight),t.Tawk_Window.eventBus.$off("dismissPreview")}}}).call(this,i("c8ba"))},"6b5b":function(t,e,i){"use strict";i.r(e);var a=i("3bc8").a,s=i("2877"),n=Object(s.a)(a,(function(){var t=this,e=t._self._c;return e("i-frame",{key:t.key,attrs:{width:t.frameWidth,height:t.frameHeight,cssLink:t.cssLink,styleObject:t.styleObject}},[e("div",{staticClass:"tawk-flex",staticStyle:{width:"100%",height:"100%"},style:{"justify-content":"".concat(t.isRight?"flex-end":"flex-start")}},[e("div",{ref:"tawk-message-preview",staticClass:"tawk-flex tawk-message-preview tawk-fadeIn",class:[t.isBottom?"tawk-flex-bottom":"tawk-flex-top"],style:{width:"".concat(t.width,"px"),"justify-content":"".concat(t.isRight?"flex-end":"flex-start")},attrs:{id:"tawk-message-preview"},on:{dragover:t.dragover,dragleave:t.dragleave,drop:t.drop,paste:t.paste}},[e("div",{ref:"tawk-message-preview-content",staticClass:"tawk-message-preview-content",attrs:{id:"tawk-message-preview-content"}},[t.isLiveChatFeatureEnabled&&!t.isSurveyOptionOnly?e("tawk-card",{directives:[{name:"tawk-tooltip",rawName:"v-tawk-tooltip"}],staticClass:"tawk-message-preview-close tawk-box-shadow-xsmall",attrs:{id:"tawk-mpreview-close",role:"button",tabindex:"0","data-text":"".concat(t.$i18n("bubble","attention_grabber")),"aria-label":"".concat(t.$i18n("bubble","attention_grabber"))},on:{click:t.dismissPreview}},[e("tawk-icon",{attrs:{type:"close"}})],1):t._e(),t.incomingCall?e("div",{staticClass:"tawk-message-box tawk-call-card tawk-flex tawk-flex-bottom"},[e("tawk-card",{staticClass:"tawk-box-shadow-xsmall tawk-message tawk-margin-auto-left tawk-call-card",attrs:{size:"xsmall"}},[e("call-widget",{attrs:{fullVersion:!1}})],1)],1):t._e(),e("div",{directives:[{name:"show",rawName:"v-show",value:!t.incomingCall&&t.isLiveChatFeatureEnabled,expression:"!incomingCall &&\n\t\t\t\t\t\t\tisLiveChatFeatureEnabled"}]},[e("div",{ref:"tawk-chat-message-container",staticClass:"tawk-chat-message-container",attrs:{id:"tawk-chat-message-container",role:"button",tabindex:"0"},on:{click:t.maximizeWidget}},[e("transition-group",{attrs:{name:"list"}},t._l(t.messages,(function(i,a){return e("div",{key:a,staticClass:"tawk-margin-xsmall-bottom"},[i.surveyObj?[i.surveyObj.question.length?e("div",{staticClass:"tawk-message-box tawk-flex tawk-flex-bottom"},[i.showProfile?e("tawk-avatar",{staticClass:"tawk-box-shadow-small",attrs:{src:i.profileImage,alt:"".concat(t.$i18n("chat","agent_profile_image")),size:"small"}}):t._e(),e("tawk-card",{staticClass:"tawk-box-shadow-xsmall tawk-message tawk-margin-auto-left",class:[i.showProfile?"tawk-has-avatar":""],attrs:{size:"xsmall"}},[i.isUpload?e("div",{staticStyle:{"padding-bottom":"20px"}},[i.fileType?e("div",["image"===i.fileType?e("tawk-image",{attrs:{src:i.fileLink,alt:i.fileName,position:"center"},on:{imageLoaded:function(e){return t.recalculateHeight()}}}):t._e(),"video"===i.fileType?e("tawk-video",{attrs:{content:{source:"selfhosted",url:i.fileLink,options:{controls:"",mute:!0,loop:!1,startTime:"0"}}}}):t._e(),"audio"===i.fileType?e("audio",{staticStyle:{width:"100%",height:"30px"},attrs:{controls:""}},[e("source",{attrs:{src:i.fileLink,type:i.data.file.mimetype}})]):t._e(),e("div",{staticClass:"tawk-flex",staticStyle:{"margin-top":"10px"}},[e("span",{staticClass:"tawk-text-truncate tawk-flex-1"},[t._v(" "+t._s(i.fileName)+" ")]),e("span",{staticClass:"tawk-flex-none",staticStyle:{padding:"0 5px"}},[t._v(" "+t._s(i.humanizeFileSize)+" ")]),e("a",{staticClass:"tawk-flex-none",attrs:{href:i.fileLink,target:"_blank"}},[t._v(" "+t._s(t.$i18n("chat","download"))+" "),e("tawk-icon",{attrs:{type:"download",size:"small"}})],1)])],1):e("div",[e("b",[t._v(t._s(i.fileName))]),e("div",{staticClass:"tawk-flex",staticStyle:{"margin-top":"10px"}},[e("span",{staticClass:"tawk-flex-none"},[t._v(" "+t._s(i.humanizeFileSize)+" ")]),e("a",{staticClass:"tawk-flex-none tawk-margin-auto-left",attrs:{href:i.fileLink,target:"_blank"}},[t._v(" "+t._s(t.$i18n("chat","download"))+" "),e("tawk-icon",{attrs:{type:"download",size:"small"}})],1)])])]):e("div",{staticClass:"tawk-text-regular-3",staticStyle:{"padding-bottom":"20px"}},[e("tawk-emoji",{attrs:{emoji:i.surveyObj?i.surveyObj.question:i.snippet,enabled:t.emojiEnabled}})],1),e("div",{staticClass:"tawk-flex tawk-text-regular-2 tawk-text-grey-2"},[e("div",{staticClass:"flex-auto"},[t._v(t._s(i.name)+" ")]),e("div",{staticClass:"flex-none tawk-margin-auto-left"},[e("tawk-timeago",{staticClass:"tawk-text-regular-1 tawk-text-grey-2",attrs:{datetime:i.time,isDuration:t.isDuration,isLive:t.isLive}})],1)])])],1):t._e()]:e("div",{staticClass:"tawk-message-box tawk-flex tawk-flex-bottom"},[i.showProfile?e("tawk-avatar",{staticClass:"tawk-box-shadow-small",attrs:{src:i.profileImage,alt:"".concat(t.$i18n("chat","agent_profile_image")),size:"small"}}):t._e(),e("tawk-card",{staticClass:"tawk-box-shadow-xsmall tawk-message tawk-margin-auto-left",class:[i.showProfile?"tawk-has-avatar":""],attrs:{size:"xsmall"}},[[i.attchs||i.surveyObj||i.snippet?e("tawk-chat-bubble",{staticClass:"tawk-message-preview-chat-bubble",attrs:{attachments:i.attchs},on:{imageLoaded:t.imageLoaded}},[i.surveyObj||i.snippet?e("tawk-emoji",{attrs:{emoji:i.surveyObj?i.surveyObj.question:i.snippet,enabled:t.emojiEnabled}}):t._e()],1):e("div",{staticClass:"tawk-margin-xsmall-bottom"},[e("tawk-icon",{attrs:{type:"attach-file",size:"small"}}),t._v(" "+t._s(t.$i18n("chat","sent_form"))+" ")],1)],e("div",{staticClass:"tawk-flex tawk-text-regular-2 tawk-text-grey-2"},[e("div",{staticClass:"flex-auto"},[t._v(t._s(i.name)+" ")]),e("div",{staticClass:"flex-none tawk-margin-auto-left"},[e("tawk-timeago",{staticClass:"tawk-text-regular-1 tawk-text-grey-2",attrs:{datetime:i.time,isDuration:t.isDuration,isLive:t.isLive}})],1)])],2)],1)],2)})),0),Object.keys(t.getSurveyOptions).length&&"v"!==t.getSurveyOptions.senderType?e("div",[e("survey-options",{staticClass:"tawk-message",attrs:{options:t.getSurveyOptions.options},on:{selectSurvey:t.submitSurvey}})],1):t._e()],1),e("transition",{attrs:{name:"fade-enter"}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.showInputField&&!t.isSurveyOptionOnly,expression:"showInputField && !isSurveyOptionOnly"}]},[e("tawk-card",{ref:"tawk-chatinput-container",staticClass:"tawk-chatinput-container tawk-box-shadow-xsmall",class:[t.isDraggedOver?"has-dragover":""],attrs:{size:"xsmall",id:"tawk-chatinput-container"}},[t.isDraggedOver?e("div",{staticClass:"tawk-dragover-container",attrs:{id:"tawk-dragover-container"}},[e("tawk-icon",{attrs:{type:"attach-file",size:"xlarge"}}),e("p",[t._v(t._s(t.$i18n("rollover","uploadFile")))])],1):t._e(),e("tawk-chat-input",{ref:"tawk-chatinput",attrs:{features:t.features,placeholder:t.inputPlaceholder},on:{emojiPreview:t.emojiOpened,textareaResized:t.textareaResized,messageTyping:t.messageTyping,sendMessage:t.sendMessage,ratingClicked:t.ratingClicked,filesAdded:t.filesAdded,sendFiles:t.sendFiles}})],1)],1)])],1)],1)])])])}),[],!1,null,null,null);e.default=n.exports}}]);