var _sc_chatConfig={server:"https://live.steam.eu.com",unallowedChatExtensions:"bat,exe,cmd,sh,php,pl,cgi,386,dll,com,torrent,js,app,jar,pif,vb,vbscript,wsf,asp,cer,csr,jsp,drv,sys,ade,adp,bas,chm,cpl,crt,csh,fxp,hlp,hta,inf,ins,isp,jse,htaccess,htpasswd,ksh,lnk,mdb,mde,mdt,mdw,msc,msi,msp,mst,ops,pcd,prg,reg,scr,sct,shb,shs,url,vbe,vbs,wsc,wsf,wsh",customerDomain:"steam"},_sc=function(){var e,t;e=this,t=function(){return n=[function(e,t,a){"use strict";function n(e,t){"object"===(void 0===e?"undefined":s(e))&&(t=e,e=void 0),t=t||{};var a=o(e),n=a.source,i=a.id,e=a.path,e=c[i]&&e in c[i].nsps,i=t.forceNew||t["force new connection"]||!1===t.multiplex||e?(l("ignoring socket cache for %s",n),r(n,t)):(c[i]||(l("new io instance for %s",n),c[i]=r(n,t)),c[i]);return a.query&&!t.query?t.query=a.query:t&&"object"===s(t.query)&&(t.query=function(e){var t,a=[];for(t in e)e.hasOwnProperty(t)&&a.push(encodeURIComponent(t)+"="+encodeURIComponent(e[t]));return a.join("&")}(t.query)),i.socket(a.path,t)}var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=a(1),i=a(7),r=a(17),l=a(3)("socket.io-client");e.exports=t=n;var c=t.managers={};t.protocol=i.protocol,t.connect=n,t.Manager=a(17),t.Socket=a(44)},function(e,t,a){!function(n){"use strict";var i=a(2),s=a(3)("socket.io-client:url");e.exports=function(e,t){var a=e;return t=t||n.location,"string"==typeof(e=null==e?t.protocol+"//"+t.host:e)&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?t.protocol+e:t.host+e),/^(https?|wss?):\/\//.test(e)||(s("protocol-less url %s",e),e=void 0!==t?t.protocol+"//"+e:"https://"+e),s("parse %s",e),a=i(e)),a.port||(/^(http|ws)$/.test(a.protocol)?a.port="80":/^(http|ws)s$/.test(a.protocol)&&(a.port="443")),a.path=a.path||"/",e=-1!==a.host.indexOf(":")?"["+a.host+"]":a.host,a.id=a.protocol+"://"+e+":"+a.port,a.href=a.protocol+"://"+e+(t&&t.port===a.port?"":":"+a.port),a}}.call(t,function(){return this}())},function(e,t){var r=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,l=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];e.exports=function(e){var t=e,a=e.indexOf("["),n=e.indexOf("]");-1!=a&&-1!=n&&(e=e.substring(0,a)+e.substring(a,n).replace(/:/g,";")+e.substring(n,e.length));for(var i=r.exec(e||""),s={},o=14;o--;)s[l[o]]=i[o]||"";return-1!=a&&-1!=n&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s}},function(a,i,n){!function(e){function t(){try{return i.storage.debug}catch(e){}if(void 0!==e&&"env"in e)return e.env.DEBUG}(i=a.exports=n(5)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},i.formatArgs=function(){var e=arguments,t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+i.humanize(this.diff),!t)return e;var t="color: "+this.color,e=[e[0],t,"color: inherit"].concat(Array.prototype.slice.call(e,1)),a=0,n=0;return e[0].replace(/%[a-z%]/g,function(e){"%%"!==e&&(a++,"%c"===e&&(n=a))}),e.splice(n,0,t),e},i.save=function(e){try{null==e?i.storage.removeItem("debug"):i.storage.debug=e}catch(e){}},i.load=t,i.useColors=function(){return"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)},i.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),i.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],i.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},i.enable(t())}.call(i,n(4))},function(e,t){function a(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function i(t){if(c===setTimeout)return setTimeout(t,0);if((c===a||!c)&&setTimeout)return c=setTimeout,setTimeout(t,0);try{return c(t,0)}catch(e){try{return c.call(null,t,0)}catch(e){return c.call(this,t,0)}}}function s(){m&&p&&(m=!1,p.length?h=p.concat(h):u=-1,h.length&&o())}function o(){if(!m){var e=i(s);m=!0;for(var t=h.length;t;){for(p=h,h=[];++u=this._reconnectionAttempts?(p("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1):(e=this.backoff.duration(),p("will wait %dms before reconnect attempt",e),this.reconnecting=!0,t=setTimeout(function(){a.skipReconnect||(p("attempting reconnect"),a.emitAll("reconnect_attempt",a.backoff.attempts),a.emitAll("reconnecting",a.backoff.attempts),a.skipReconnect||a.open(function(e){e?(p("reconnect attempt error"),a.reconnecting=!1,a.reconnect(),a.emitAll("reconnect_error",e.data)):(p("reconnect success"),a.onreconnect())}))},e),this.subs.push({destroy:function(){clearTimeout(t)}}))},n.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)}},function(e,t,a){e.exports=a(19)},function(e,t,a){e.exports=a(20),e.exports.parser=a(27)},function(t,e,c){!function(a){function p(e,t){if(!(this instanceof p))return new p(e,t);t=t||{},e&&"object"==typeof e&&(t=e,e=null),e?(e=o(e),t.hostname=e.host,t.secure="https"===e.protocol||"wss"===e.protocol,t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=o(t.host).host),this.secure=null!=t.secure?t.secure:a.location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.agent=t.agent||!1,this.hostname=t.hostname||(a.location?location.hostname:"localhost"),this.port=t.port||(a.location&&location.port?location.port:this.secure?443:80),this.query=t.query||{},"string"==typeof this.query&&(this.query=l.decode(this.query)),this.upgrade=!1!==t.upgrade,this.path=(t.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!t.forceJSONP,this.jsonp=!1!==t.jsonp,this.forceBase64=!!t.forceBase64,this.enablesXDR=!!t.enablesXDR,this.timestampParam=t.timestampParam||"t",this.timestampRequests=t.timestampRequests,this.transports=t.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=t.policyPort||843,this.rememberUpgrade=t.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=t.onlyBinaryUpgrades,this.perMessageDeflate=!1!==t.perMessageDeflate&&(t.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=t.pfx||null,this.key=t.key||null,this.passphrase=t.passphrase||null,this.cert=t.cert||null,this.ca=t.ca||null,this.ciphers=t.ciphers||null,this.rejectUnauthorized=void 0===t.rejectUnauthorized?null:t.rejectUnauthorized,this.forceNode=!!t.forceNode;e="object"==typeof a&&a;e.global===e&&(t.extraHeaders&&0>t&63|128)}function n(){if(r<=l)throw Error("Invalid byte index");var e=255&i[l];if(l++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}var e=("object"==typeof a&&a&&a.exports,"object"==typeof d&&d);e.global!==e&&e.window;var i,r,l,c=String.fromCharCode,t={version:"1.0.0",encode:function(e){for(var t=s(e),a=t.length,n=-1,i="";++n>6&31|192):0==(4294901760&e)?(t=c(e>>12&15|224),t+=o(e,6)):0==(4292870144&e)&&(t=c(e>>18&7|240),t+=o(e,12),t+=o(e,6)),t+c(63&e|128)}(t[n]);return i},decode:function(e){i=s(e),r=i.length,l=0;for(var t,a=[];!1!==(t=function(){var e,t;if(r>>10&1023|55296),t=56320|1023&t),i+=c(t);return i}(a)}};void 0===(m=function(){return t}.call(p,h,p,a))||(a.exports=m)}()}.call(p,h(12)(e),function(){return this}())},function(e,t){!function(){"use strict";for(var s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=new Uint8Array(256),e=0;e>2],n+=s[(3&t[i])<<4|t[i+1]>>4],n+=s[(15&t[i+1])<<2|t[i+2]>>6],n+=s[63&t[i+2]];return a%3==2?n=n.substring(0,n.length-1)+"=":a%3==1&&(n=n.substring(0,n.length-2)+"=="),n},t.decode=function(e){var t,a,n,i,s=.75*e.length,o=e.length,r=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);for(var s=new ArrayBuffer(s),l=new Uint8Array(s),c=0;c>4,l[r++]=(15&a)<<4|n>>2,l[r++]=(3&n)<<6|63&i;return s}}()},function(o,e){!function(e){function i(e){for(var t=0;t';i=document.createElement(e)}catch(e){(i=document.createElement("iframe")).name=l.iframeId,i.src="javascript:0"}i.id=l.iframeId,l.form.appendChild(i),l.iframe=i}var i,s,o,r,l=this;this.form||(s=document.createElement("form"),o=document.createElement("textarea"),r=this.iframeId="eio_iframe_"+this.index,s.className="socketio",s.style.position="absolute",s.style.top="-1000px",s.style.left="-1000px",s.target=r,s.method="POST",s.setAttribute("accept-charset","utf-8"),o.name="d",s.appendChild(o),document.body.appendChild(s),this.form=s,this.area=o),this.form.action=this.uri(),n(),e=e.replace(d,"\\\n"),this.area.value=e.replace(c,"\\n");try{this.form.submit()}catch(e){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===l.iframe.readyState&&a()}:this.iframe.onload=a}}.call(e,function(){return this}())},function(p,e,h){!function(s){function e(e){e&&e.forceBase64&&(this.supportsBinary=!1),this.perMessageDeflate=e.perMessageDeflate,this.usingBrowserWebSocket=c&&!e.forceNode,this.usingBrowserWebSocket||(d=t),a.call(this,e)}var t,a=h(26),o=h(27),n=h(36),i=h(37),r=h(38),l=h(3)("engine.io-client:websocket"),c=s.WebSocket||s.MozWebSocket;if("undefined"==typeof window)try{t=h(41)}catch(e){}var d=c;d||"undefined"!=typeof window||(d=t),i(p.exports=e,a),e.prototype.name="websocket",e.prototype.supportsBinary=!0,e.prototype.doOpen=function(){if(this.check()){var e=this.uri(),t={agent:this.agent,perMessageDeflate:this.perMessageDeflate};t.pfx=this.pfx,t.key=this.key,t.passphrase=this.passphrase,t.cert=this.cert,t.ca=this.ca,t.ciphers=this.ciphers,t.rejectUnauthorized=this.rejectUnauthorized,this.extraHeaders&&(t.headers=this.extraHeaders),this.localAddress&&(t.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket?new d(e):new d(e,void 0,t)}catch(e){return this.emit("error",e)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},e.prototype.addEventListeners=function(){var t=this;this.ws.onopen=function(){t.onOpen()},this.ws.onclose=function(){t.onClose()},this.ws.onmessage=function(e){t.onData(e.data)},this.ws.onerror=function(e){t.onError("websocket error",e)}},e.prototype.write=function(e){var n=this;this.writable=!1;for(var i=e.length,t=0,a=i;t1e3*$.cqd.nobodyAvailableAfterSeconds&&T&&(x.waitingForSupport.style.display="none",1!=$.cqd.callMeBackSetting||!H||1!=$.cqd.unaivalableCallback&&null!=$.cqd.unaivalableCallback?null!=x.noAgentAvailableDOM&&x.noAgentAvailableDOM.classList.contains("_steamlive_chat_no-agent-available--hide")&&0==O&&Na(f.NO_AGENT_AVAILABLE):(x.nobodyAvailable.style.display="block",x.callBackFormContainerBody.insertBefore(x.nobodyAvailable,x.callBackFormContainerBody.firstChild),he(v.CALLMEBACK))),B||s(tsFirstContact)&&tsFirstContact+1e3*$.cqd.autoChatSeconds<(new Date).getTime()&&(V("autoChatFired",!0),B=!0,$.cqd.isInOpeningHour&&!$.cqd.inClosingDay||h||1!=Ee()?$.cqd.isInOpeningHour&&!$.cqd.inClosingDay&&void 0!==$.cqd.openChatOnDevice&&(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?-1==$.cqd.openChatOnDevice||-2==$.cqd.openChatOnDevice||-1==$.cqd.showOnDevices||h||ut():1==$.cqd.openChatOnDevice||-2==$.cqd.openChatOnDevice||1==$.cqd.showOnDevices||h||ut()):0==$.cqd.chatPopUp&&ut())},ee=function(){return J("_sc_userId")};function te(){var e;null==(e=J("lastMsgIdx"))&&(e=0),e={surveyPID:$.cqd.surveyPID,targetType:2,targetPID:$.cqd.chatQueuePID,relatedEntity:$.userId,generationDate:Math.round(Date.now()/1e3),lastMsgIdx:e},x.surveyFrame.src="https://"+$.cqd.callcenterName.trim()+"."+g+".eu.com/externalSurvey.aspx?surveyParams="+encodeURIComponent((e=JSON.stringify(e),window.btoa(unescape(encodeURIComponent(e))))),document.body.appendChild(x.surveyPopUpBg),document.body.appendChild(x.surveyPopUp)}function ae(){document.body.removeChild(x.surveyPopUpBg),document.body.removeChild(x.surveyPopUp)}function ne(){x.divConfirmEmail.parentNode.removeChild(x.divConfirmEmail)}function ie(){var e=x.emailTranscriptInput.value;if(void 0===e||null==e||""==e||!Pt(e.trim()))return x.emailTranscriptInputWrapper.classList.add("_steamlive_email-transcript-input-wrapper--error"),x.emailTranscriptInput.focus(),0;x.emailTranscriptInputWrapper.classList.remove("_steamlive_email-transcript-input-wrapper--error"),aa();var t="Message log for queue : "+$.cqd.title;void 0!==$.cqd.emailSubject&&""!=$.cqd.emailSubject&&(t=$.cqd.emailSubject),Te(),le({email:e,sub:t,msg:J("chatTranscript")})}function se(){x.trRating.style.display="none",x.trLog.style.display="block",x.tdLog.style.display="block",oa()}function oe(){x.divAlert.style.display="none"}function re(e){V("steamBotAlias",(F=e).alias),V("steamBotAvatar",F.avatar)}var le=function(e){var t,a=new XMLHttpRequest,n="noreply@steam.eu";void 0!==$.cqd.replyTo&&""!=$.cqd.replyTo&&Pt($.cqd.replyTo)&&(n=$.cqd.replyTo,n=(n=void 0!==$.cqd.replyToName&&""!=$.cqd.replyToName?$.cqd.replyToName+" <"+$.cqd.replyTo+">":n).replace(/&/g," ").replace(/%/g," ").replace(/#/g," ").replace(/"/g," ")),t="&sub="+e.sub.replace(//g,"").replace(/%/g," ").replace(/#/g," ")+"&to="+e.email+"&from="+n+"&msg="+encodeURIComponent(e.msg)+"&steamliveChatAction=sendMsgLog",a.open("GET",E+"/s/callMeback?"+t,!0),a.setRequestHeader("Content-Type","application/json"),a.onload=function(){200===a.status&&("ok"==a.responseText.toLowerCase()?Na(f.EMAIL_TRANSCRIPT_SUCCESS_ALERT):Na(f.EMAIL_TRANSCRIPT_ERROR_ALERT),console.log(a.responseText))},a.send()},ce=function(e,t){x.divAlert.innerHTML="",x.divAlertBody=document.createElement("div"),x.divAlertTxt=document.createElement("div"),x.divAlertBody.className="_steamlive_chat_alertBody",x.divAlertTxt.className="_steamlive_chat_alertTxt",x.divCloseAlert=document.createElement("div"),x.divCloseAlert.style.width="20px",x.divCloseAlert.style.height="20px",x.divCloseAlert.style.color="#ddd",x.divCloseAlert.style.cursor="pointer",x.divCloseAlert.style.position="relative",x.divCloseAlert.style.left="90%",x.divCloseAlert.innerHTML="
X
",x.divCloseAlert.onclick=oe,x.divAlertBody.appendChild(x.divCloseAlert),x.divAlertBody.appendChild(x.divAlertTxt),x.divAlert.appendChild(x.divAlertBody),x.divAlertTxt.innerHTML+=e,x.divAlert.onclick=oe,""!=t&&(x.divAlertBody.innerHTML+=""),x.divAlert.style.display="flex",("none"!=x.trRating.style.display?x.tdRating:x.tdLog).appendChild(x.divAlert)},de=function(e,t){(t||z)&&($.lastMsgIdx=-1,$.userId="",$.msgLog=[],Tt=-1,V("chatTranscript",""),V("msgLog","")),Zt(e),fa()},pe=function(){null!==J("steamBotAlias")&&(F.alias=J("steamBotAlias"),F.avatar=J("steamBotAvatar"))},he=function e(t){x.chatInputWrapper.style.display="none",x.btnSendChat.style.display="none",x.startMessage.style.display="none",x.waitingForSupport.style.display="none",x.divAlert.style.display="none",x.nobodyAvailable.style.display="none",x.log.style.display="none",x.msgInput.disabled=!0,x.btnSendChat.disabled=!0,x.chatLeft.style.display="none",x.statusButtons.btnEditDetails.style.display="none",x.statusButtons.cancelForm.style.display="none",x.statusButtons.btnJoinLeave.style.display="flex",x.iconCloseChat.style.display="none",x.trRating.style.display="none",1!=$.cqd.emailTranscript?x.toolbarButtonsWrapper.classList.add("_steamlive_chat_edit-contact-only"):x.toolbarButtonsWrapper.classList.remove("_steamlive_chat_edit-contact-only"),x.divConfirmEmail.style.display="none",null!=x.fileinputContainer&&(x.fileinputContainer.style.display="none",x.fileinputContainer.disabled=!0),x.statusButtons.btnJoinLeave.className="_steamlive_chat_btn_newChatButton",x.startMessageFormWrapper.contains(x.editContactInfoBtnWrapper)&&x.startMessageFormWrapper.removeChild(x.editContactInfoBtnWrapper),ba(),t===v.UNTOUCHED?D&&(x.startMessage.style.display="block",x.statusButtons.btnJoinLeave.style.display="none",x.iconCloseChat.style.display="none"):t===v.FILL_IN_DETAILS?(Be()&&!Me()&&Yt(1),D&&(x.startMessage.style.display="block",x.statusButtons.btnJoinLeave.style.display="none",x.iconCloseChat.style.display="none")):t===v.CALLMEBACK?(x.startMessage.style.display="block",x.nobodyAvailable.style.display="block",x.waitingForSupportText.style.display="none",x.statusButtons.btnJoinLeave.style.display="none",x.iconCloseChat.style.display="none",Yt(2),x.startMessageFormWrapper.contains(x.startChatMessage)&&x.startMessageFormWrapper.removeChild(x.startChatMessage),t=v.QUIT):t===v.EDIT_DETAILS?(x.startMessage.style.display="block",x.startMessageFormWrapper.contains(x.startChatMessage)&&x.startMessageFormWrapper.removeChild(x.startChatMessage),x.startMessageFormWrapper.appendChild(x.editContactInfoBtnWrapper),Ca()):t===v.WAITING_FOR_AGENT?Be()&&!Me()&&(x.statusButtons.btnJoinLeave.style.display="flex",x.iconCloseChat.style.display="block",we()<=1?(Se(),Ca(),x.waitingForSupport.style.display="flex",x.waitingForSupportText.style.display="block"):(Le(),x.waitingForSupport.style.display="none",e(v.CHATTING)),x.trLog.style.display="block",x.tdLog.style.display="block",D&&(x.statusButtons.btnEditDetails.style.display="flex"),x.statusButtons.btnJoinLeave.innerHTML=Dt("leaveChat")):t===v.TRANSFER_TO_AGENT?(x.statusButtons.btnJoinLeave.style.display="flex",we()<=2?T&&(x.waitingForSupport.style.display="flex",x.waitingForSupportText.style.display="block"):(Le(),x.waitingForSupport.style.display="none",e(v.CHATTING)),x.trLog.style.display="table-row",x.tdLog.style.display="block",D&&(x.statusButtons.btnEditDetails.style.display="flex"),x.statusButtons.btnJoinLeave.innerHTML=Dt("leaveChat")):t===v.CHATTING?(D&&(x.statusButtons.btnEditDetails.style.display="flex"),x.openingHoursWrapper.style.display="none",x.trLog.style.display="block",x.tdLog.style.display="block",x.log.style.display="block",x.msgInput.disabled=!1,x.btnSendChat.disabled=!1,x.chatInputWrapper.style.display="flex",x.btnSendChat.style.display="block",null!=x.fileinputContainer&&(x.fileinputContainer.disabled=!1,x.fileinputContainer.style.display="block"),x.statusButtons.btnJoinLeave.innerHTML=Dt("leaveChat"),x.iconCloseChat.style.display="block",Ha(),Ca()):t===v.QUIT&&(!Be()||Me()?(x.log.style.display="none",x.trRating.style.display="none",x.startMessage.style.display="block"):(Yt(1),x.trLog.style.display="block",x.tdLog.style.display="block",x.log.style.display="block"),x.statusButtons.btnJoinLeave.innerHTML=Dt("reopenChat"),x.iconCloseChat.style.display="none",1==J("_sc_b")?Na(f.BANNED_SESSION):(Na(f.CHAT_RATING),Ca())),t!==v.QUIT&&t!==v.UNTOUCHED||!0===r&&!1===o&&(Te(),w.disconnect()),Qt(!0),V("mode",t),u=t,at()};window.dataLayer=window.dataLayer||[];function me(){dataLayer.push(arguments)}var ue,ge=function(e){try{if(void 0!==$.cqd.active&&0==$.cqd.active)return!1;var t,a,n;void 0!==$.cqd.analytics&&1==$.cqd.analytics&&((t=document.createElement("script")).onload=function(){me("js",new Date),me("config",$.cqd.analyticsTrackingCode),me("event","Chat loaded",{event_action:"Chat loaded",event_category:"Chat Pop-up",event_label:Date.now()})},t.src="https://www.googletagmanager.com/gtag/js?id="+$.cqd.analyticsTrackingCode,document.head.appendChild(t)),Ht($.cqd.forceLanguage),x.editContactSpan.title=x.editContactSpan.textContent=Dt("editDetails"),x.emailTranscriptSpan.title=x.emailTranscriptSpan.textContent=Dt("emailTranscript"),x.startChatMessageP.innerHTML=Dt("clickStartChat"),x.btnSaveEditContactInfo.textContent=Dt("save"),x.btnCancelEditContactInfo.textContent=Dt("cancel"),fe(),x.callMeBackSuccess.innerHTML=Dt("informationSent"),x.statusButtons.btnEditDetails.innerHTML=Dt("editDetails"),x.title.innerHTML="",x.title.appendChild(x.agentImage),x.txtTitle.innerHTML=$.cqd.title,x.txtTitle.setAttribute("title",$.cqd.title),x.title.appendChild(x.txtTitle),x.title.appendChild(x.iconMinimizeChat),x.title.appendChild(x.iconWideChat),x.title.appendChild(x.iconCloseChat),x.waitingForSupportText.innerHTML=$.cqd.waitingForSupportText,x.nobodyAvailable.innerHTML=$.cqd.nobodyAvailableText,x.statusButtons.btnEditDetails.innerHTML=Dt("editDetails"),1==$.cqd.callMeBackSetting&&H?(x.btnCloseOpeningHours.onclick=function(){Ce(!1),Ta()},x.btnCloseOpeningHours.innerHTML=Dt("fillCallBackInformation"),""!=$.cqd.callMebackText&&void 0!==$.cqd.callMebackText?(x.callMebackButton.innerHTML=$.cqd.callMebackText,x.btnCloseOpeningHours.innerHTML=$.cqd.callMebackText):x.callMebackButton.innerHTML=Dt("callMeBack")):x.btnCloseOpeningHours.innerHTML=Dt("close"),x.btnShowOpeningHoursDetails.innerHTML=Dt("showAll"),x.msgInput.placeholder=Dt("msgPlaceholder"),x.chatLeft.innerHTML=Dt("chatLeft"),""!=$.cqd.msgPlaceHolder&&(x.msgInput.placeholder=$.cqd.msgPlaceHolder),x.openingHours.innerHTML="",void 0!==$.cqd.msgStartChat&&""!=$.cqd.msgStartChat&&(x.startChatMessageP.innerHTML=$.cqd.msgStartChat),void 0!==$.cqd.inClosingDay&&(Me()?(x.openingHoursWrapper.style.display="none",x.openingHours.style.display="none",x.iconCloseChat.style.display="none",Na(f.CLOSING_DAY),ba()):null!==(a=Fe())?((n=document.createElement("div")).className="_steamlive_chat_OpeningHoursTableWrapper",n.classList.add(je($.cqd.chatColorSchemeID)),n.appendChild(a),n.appendChild(x.btnShowOpeningHoursDetails),x.openingHours.innerHTML="
"+$.cqd.outsideWorkingHoursText+"
"+Dt("openingHours")+"
("+$.cqd.chatTimezone+")
",x.openingHours.appendChild(n),x.openingHours.appendChild(x.btnCloseOpeningHours),Be()?Ce(!1):u!==v.WAITING_FOR_AGENT&&u!==v.CHATTING&&(Ce(!0),x.statusButtons.btnJoinLeave.style.display="none",x.iconCloseChat.style.display="none")):Ce(!1)),et(e),$.cqd.isInOpeningHour&&!$.cqd.inClosingDay||void 0!==$.cqd.chatPopUp&&(1==$.cqd.chatPopUp?dt():h||ut()),Da(),/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?void 0!==$.cqd.showOnDevices&&-1==$.cqd.showOnDevices&&xa():void 0!==$.cqd.showOnDevices&&1==$.cqd.showOnDevices&&xa(),p=ye(),Qt(e),void 0===x.fileinputContainer&&(x.fileinputContainer=document.createElement("label")),void 0!==$.cqd.attachment&&1==$.cqd.attachment&&Be()&&!Me()&&(x.fileinput=document.createElement("input"),x.fileinput.type="file",x.fileinput.className="_steamlive_chat_fileinput",x.fileinputContainer.className="_steamlive_chat_fileinputContainer",x.fileinputImg=document.createElement("span"),x.fileinputImg.className="_steamlive_chat_fileinputImg",x.fileinputImg.innerHTML='',x.fileNameContainer=document.createElement("div"),x.fileName=document.createElement("div"),x.closeFileName=document.createElement("div"),x.fileNameContainer.className="_steamlive_chat_fileNameContainer",x.fileName.className="_steamlive_chat_fileName",x.closeFileName.className="_steamlive_chat_closeFileName",x.closeFileName.innerHTML="X",x.closeFileName.onclick=ve,x.fileNameContainer.appendChild(x.fileName),x.fileNameContainer.appendChild(x.closeFileName),x.fileinputContainer.appendChild(x.fileNameContainer),x.fileinputContainer.appendChild(x.fileinput),x.chatInputWrapper.appendChild(x.fileinputImg),x.fileinputImg.onclick=Re,x.fileinput.onchange=qe,x.fileinput.addEventListener("dragover",function(e){return(e=e||event).preventDefault(),0},!1)),x.msg.appendChild(x.fileinputContainer),x.contactInfoHeading.innerHTML=Dt("contactInformation"),x.btnSendTranscript.innerHTML=Dt("emailTranscript"),1!=$.cqd.emailTranscript?x.toolbarButtonsWrapper.classList.add("_steamlive_chat_edit-contact-only"):x.toolbarButtonsWrapper.classList.remove("_steamlive_chat_edit-contact-only"),function(){if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){if(-1==$.cqd.showTriggerMsgOnDevices)return}else if(1==$.cqd.showTriggerMsgOnDevices)return;null==T||T||1!=$.cqd.triggerMessages||null==$.cqd.triggerMessageText||""==$.cqd.triggerMessageText.trim()||(triggerSetting=JSON.parse($.cqd.triggerMessageText.trim()),function e(t){null!=t[La]&&0==t[La].active?(La++,e(t)):setTimeout(function(){Sa(t[La].message),setTimeout(function(){Ia(),null!=t[++La]&&e(t)},1e3*t[La].duration)},1e3*t[La].delay)}(triggerSetting))}()}catch(e){console.log(e)}},ve=function(e){e.preventDefault(),e.stopPropagation(),x.fileName.innerHTML="",x.fileNameContainer.style.display="none",A=null},fe=function(){if(L=[],x.inputName.value=J("_sc_name"),x.inputEmail.value=J("_sc_email"),void 0!==$.cqd.websiteBoxpid&&0<$.cqd.websiteBoxpid&&((l=ze("","boxPID_"+$.cqd.websiteBoxpid,void 0,void 0,"websitebox")).type="hidden",x.formContainer.appendChild(l),V("boxPID_"+$.cqd.websiteBoxpid,window.location.href),Ut()),void 0!==$.cqd.id){if(null!=$.cqd.contactFormJsonData[0]&&"{}"!=$.cqd.contactFormJsonData[0]&&""!=$.cqd.contactFormJsonData[0]){x.inputName.style.display="none",x.inputEmail.style.display="none";var e=JSON.parse($.cqd.contactFormJsonData);for(d in e){var t,a=e[d][0];for(t in a)"2"===a[t][0].type?"name"==a[t][0].default?(a[t][0].showInContactForm&&(x.formContainer.removeChild(x.inputName),x.inputName=ze(a[t][0].caption,"name",a[t][0].mandatory,a[t][0].length,"boxPID_"+t),x.formContainer.appendChild(x.inputName)),a[t][0].showInCallMeBack&&(x.callBackFormContainerBody.appendChild(ze(a[t][0].caption,"callMeBack_name",a[t][0].mandatory,a[t][0].length,"callMeBack_boxPID_"+t)),L.push("boxPID_"+t))):"email"==a[t][0].default?(a[t][0].showInContactForm&&(x.formContainer.removeChild(x.inputEmail),x.inputEmail=ze(a[t][0].caption,"email",a[t][0].mandatory,a[t][0].length,"boxPID_"+t),x.formContainer.appendChild(x.inputEmail)),a[t][0].showInCallMeBack&&(x.callBackFormContainerBody.appendChild(ze(a[t][0].caption,"callMeBack_email",a[t][0].mandatory,a[t][0].length,"callMeBack_boxPID_"+t)),L.push("boxPID_"+t))):(a[t][0].showInContactForm&&x.formContainer.appendChild(ze(a[t][0].caption,"boxPID_"+t,a[t][0].mandatory,a[t][0].length)),a[t][0].showInCallMeBack&&(x.callBackFormContainerBody.appendChild(ze(a[t][0].caption,"callMeBack_boxPID_"+t,a[t][0].mandatory,a[t][0].length)),L.push("boxPID_"+t))):"4"===a[t][0].type?(a[t][0].showInContactForm&&x.formContainer.appendChild(We(a[t][0].caption,"boxPID_"+t,a[t][0].mandatory)),a[t][0].showInCallMeBack&&(x.callBackFormContainerBody.appendChild(We(a[t][0].caption,"callMeBack_boxPID_"+t,a[t][0].mandatory)),L.push("boxPID_"+t))):"3"===a[t][0].type?(a[t][0].showInContactForm&&x.formContainer.appendChild(Ge(a[t][0].caption,"boxPID_"+t,a[t][0].mandatory,a[t][0].options)),a[t][0].showInCallMeBack&&(x.callBackFormContainerBody.appendChild(Ge(a[t][0].caption,"callMeBack_boxPID_"+t,a[t][0].mandatory,a[t][0].options)),L.push("boxPID_"+t))):"5"===a[t][0].type&&(a[t][0].showInContactForm&&x.formContainer.appendChild(Je(a[t][0].caption,"boxPID_"+t,a[t][0].mandatory)),a[t][0].showInCallMeBack&&(x.callBackFormContainerBody.appendChild(Je(a[t][0].caption,"callMeBack_boxPID_"+t,a[t][0].mandatory)),L.push("boxPID_"+t))),1==a[t][0].showInCallMeBack&&(H=!0),1==a[t][0].showInContactForm&&(D=!0)}D?J("mode")==v.FILL_IN_DETAILS&&he(v.FILL_IN_DETAILS):(x.statusButtons.btnEditDetails.style.display="none",x.contactInfoHeading.style.display="none",x.toolbarButtonsWrapper.classList.add("_steamlive_chat_email-transcript-only"),Na(f.START_CHAT)),Be()&&!Me()?(x.startMessageFormWrapper.contains(x.callBackFormContainer)&&x.startMessageFormWrapper.removeChild(x.callBackFormContainer),D||x.startMessageFormWrapper.contains(x.startChatMessage)||(x.startMessageFormWrapper.style.display="none")):Yt(2),0==$.cqd.callMeBackSetting&&(x.callBackFormContainer.innerHTML=""),Ut()}else x.startMessageFormWrapper.contains(x.startChatMessage)||(x.startMessageFormWrapper.style.display="none"),x.statusButtons.btnEditDetails.style.display="none",x.contactInfoHeading.style.display="none",x.toolbarButtonsWrapper.classList.add("_steamlive_chat_email-transcript-only"),Na(f.START_CHAT);if(H&&1==$.cqd.callMeBackSetting){var n=document.createElement("div"),s=ze(Dt("callBackDate"),"callMeBackDate",1,20,"callMeBack_callMeBackDate","date"),i=new Date,o=i.getDate(),r=i.getMonth()+1,l=i.getFullYear();s.value=i=l+"-"+(r=r<10?"0"+r:r)+"-"+(o=o<10?"0"+o:o);for(var c=new Array,d=0;d<24;d++)c.push({pid:Jt(d,2),caption:Jt(d,2),enabled:!1});for(var p=new Array,d=0;d<60;d+=15)p.push({pid:Jt(d,2),caption:Jt(d,2),enabled:!1});if(void 0!==$.cqd.callbackHours){var h=JSON.parse($.cqd.callbackHours).callbackHours;if(0=h[d].callbackHourStart&&hourOption<=h[d].callbackHourEnd&&(c[j].enabled=!0)}else for(d=0;d=t[e].callbackHourStart&&hourOption<=t[e].callbackHourEnd&&(c[j].enabled=!0);var n=document.createElement("option");n.value=0,n.text="* "+Dt("hoursTime"),n.style.color="#464646",u.appendChild(n);for(var i,e=0;e=t[e].callbackHourStart&&hourOption<=t[e].callbackHourEnd&&(p[j].enabled=!0);var n=document.createElement("option");n.value=0,n.text="* "+Dt("minutesTime"),n.style.color="#464646",g.appendChild(n);for(var i,e=0;eChat Transcript",t.appendChild(a),e.appendChild(t),e.style.width="1000px",e.style.fontFamily=$.cqd.chatFontFamily,1==$.cqd.fontItalic&&(e.style.fontStyle="italic"),1==$.cqd.fontBold&&(e.style.fontWeight="bold");for(var o,r,l,c=0;c/g,"").replace(/%/g," ").replace(/#/g," ")),divSender.innerHTML+="
"+o+"
"):n[c].uId===$.userId?divSender.innerHTML+="
"+J("_sc_name").replace(/&/g," ").replace(//g,"").replace(/%/g," ").replace(/#/g," ")+"
":divSender.innerHTML+="
Support
",n[c].uId,$.userId,r.style.margin="5px",r.style.padding="5px",r.style.paddingLeft="10px",leftCellMessage.style.width="200px",leftCellMessage.appendChild(divSender),rightCellMessage.appendChild(r)),0<=n[c].m.indexOf("{file}")&&(l=JSON.parse(n[c].m.replace("{file}","")),n[c].m=l.filename),n[c].uId,$.userId,r.innerHTML+=n[c].m.replace(/&/g," ").replace(//g,"").replace(/%/g," ").replace(/#/g," ")+"
",(c===n.length-1||null!==n[c+1]&&void 0!==n[c+1])&&(c===n.length-1||12e4"+Dt("msgSentAt")+" "+l.toLocaleString()+"
")),i=n[c].ts,s=n[c].uId);V("chatTranscript",e.outerHTML)},ke=function(){x.log.innerHTML="";for(var e,t,a,n,i,s,o=document.createElement("div"),r=$.msgLog,l=-1,c=null,d=0;d',i.classList.add(Ue()))),a.className="_steamlive_chat_divMsgContainer",t.className="_steamlive_chat_divMsgWrapper",divMsgDateDiv.className="_steamlive_chat_divMsgDateDiv",1==$.cqd.chatAvatar&&a.appendChild(i),a.appendChild(e),o.appendChild(a);try{void 0!==J("transferTime")&&null!=r[d-1]&&Number(J("transferTime"))>=r[d-1].ts&&Number(J("transferTime"))<=r[d].ts&&((n=document.createElement("div")).className="_steamlive_chat_divMsgtransferDiv",n.innerHTML=""+Dt("transferredChat")+"",o.appendChild(n))}catch(e){}null!=r[d-1]&&(0==d||1<=d&&36e5",divMsgDateDiv.style.color="#"+$.cqd.chatReceiverTextColor,divMsgDateDiv.style.borderColor="#"+$.cqd.chatReceiverTextColor,o.insertBefore(divMsgDateDiv,a)),r[d].uId===$.userId?(e.className="_steamlive_chat_message r",i.className=i.className+" _steamlive_chat_avatar r",t.style.backgroundColor="#"+$.cqd.chatSenderbackgroundColor,t.style.color="#"+$.cqd.chatSenderTextColor,t.style.borderColor="#"+$.cqd.chatSenderborderColor):(e.className="_steamlive_chat_message l",i.className=i.className+" _steamlive_chat_avatar l",t.style.backgroundColor="#"+$.cqd.chatReceiverbackgroundColor,t.style.color="#"+$.cqd.chatReceiverTextColor,t.style.borderColor="#"+$.cqd.chatReceiverborderColor),e.style.fontSize=$.cqd.chatFontSize,e.appendChild(t),e.onmouseover=xt,e.onmouseleave=Et,e.onclick=Bt,void 0!==M[r[d].uId]&&void 0!==M[r[d].uId].alias?null!=(i=M[r[d].uId].alias)&&0==i.toLowerCase().startsWith("visitor_")&&(t.innerHTML="
"+i+"
"):r[d].uId===$.userId?t.innerHTML="
"+J("_sc_name")+"
":t.innerHTML="
"+("steamBot"==r[d].uId?r[d].userName:"Support")+"
"}r[d].uId===$.userId?t.innerHTML+=wt(r[d].m.replace(/&/g,"&").replace(//g,">"),"#"+$.cqd.chatSenderTextColor)+"
":t.innerHTML+=wt(r[d].m,"#"+$.cqd.chatReceiverTextColor)+"
",(d===r.length-1||null!==r[d+1]&&void 0!==r[d+1])&&(d===r.length-1||12e4"+Dt("msgSentAt")+" "+s.toLocaleString()+"
")),l=r[d].ts,c=r[d].uId}Tt=r[r.length-1].ts}void 0!==x.log.children[0]?x.log.insertBefore(o,x.log.children[0]):x.log.appendChild(o),x.log.scrollTop=x.log.scrollHeight},xe=function e(){try{z&&unpauseFlowChart()}catch(e){console.log(e)}return!(!Be()||Me())&&(!Ft()&&(!1===r&&!1===o?Zt(e):u===v.UNTOUCHED?he(v.FILL_IN_DETAILS):u!==v.FILL_IN_DETAILS&&u!==v.QUIT||he(v.WAITING_FOR_AGENT),void Ea()))},Ee=function(){return 1==$.cqd.virtualAgents&&-1!=$.cqd.vaPID&&0!=$.cqd.vaStatus},Be=function(){return!!Ee()||$.cqd.isInOpeningHour},Me=function(){return!Ee()&&$.cqd.inClosingDay},Le=function(){null!=M[$.userId]&&(M[$.userId].alias=x.inputName.value),!0===l&&!0===r&&w.emit("requestSupport",Rt())},Se=function(){q||(null===b&&(b=(new Date).getTime(),V("tsWaitingForSupport",b)),!0===l&&!0===r&&(q=!0,w.emit("requestSupport",Rt())))},Ie=function(){var e,t;x.frame=document.createElement("iframe"),x.frame.src="javascript:void(document.write('') )",xa(),x.frame.style.right="30px",x.frame.style.position="fixed",x.frame.frameBorder=0,x.frame.style.zIndex="2147483647",x.frame.className="_steamlive_chat_frame",x.frame.style.backgroundColor="#F5F5F5",x.frame.style.boxShadow="0 8px 10px -5px #0003, 0 16px 24px 2px #00000024, 0 6px 30px 5px #0000001f",z?(x.frame.style.bottom="0px",x.frame.style.width="350px",x.frame.style.maxWidth="350px",x.frame.style.minHeight="547px",x.frame.style.borderRadius="14px 14px 0 0"):(x.frame.style.width="400px",x.frame.style.maxWidth="400px",x.frame.style.height="600px",x.frame.style.maxHeight="calc(100% - 50px)",x.frame.style.borderRadius="14px",x.frame.style.bottom="30px"),x.main=document.createElement("div"),x.main.className="_steamlive_chat_main",x.main.style.display="none",x.main.addEventListener("click",rt),x.chatContainer=document.createElement("div"),x.chatContainer.classList.add("_steamlive_chat_container"),z&&(x.frame.classList.add("_steamlive_chat_frame_preview"),x.main.classList.add("_steamlive_chat_main_preview"),x.chatContainer.classList.add("_steamlive_chat_container_preview")),x.chatToolbarButtons=document.createElement("div"),x.trLog=document.createElement("div"),x.trMsg=document.createElement("div"),x.trStatus=document.createElement("div"),x.trRating=document.createElement("div"),x.closeChatConfirmation=Ke(),x.emailTranscriptDOM=ea(),x.emailTranscriptAlertDOM=na(),x.chatRatingDOM=sa(),x.chatRateSentDOM=ua(),x.reopenChatFormDOM=va(),x.bannedSessionDOM=ya(),x.closingDayDOM=wa(),x.noAgentAvailableDOM=(t=document.createElement("div"),n=document.createElement("div"),e=document.createElement("img"),a=document.createElement("div"),t.classList.add("_steamlive_chat_no-agent-available","_steamlive_chat_no-agent-available--hide"),n.classList.add("_steamlive_chat_no-agent-available-modal"),e.classList.add("_steamlive_chat_no-agent-available-icon"),a.classList.add("_steamlive_chat_no-agent-available-message"),n.appendChild(e),n.appendChild(a),t.appendChild(n),x.noAgentAvailableIcon=e,x.noAgentAvailableMessage=a,t),x.startChatDOM=(n=document.createElement("div"),e=document.createElement("div"),a=document.createElement("img"),t=document.createElement("button"),n.classList.add("_steamlive_chat_start-chat","_steamlive_chat_start-chat--hide"),e.classList.add("_steamlive_chat_start-chat-modal"),a.classList.add("_steamlive_chat_start-chat-icon"),t.classList.add("_steamlive_chat_start-chat-button"),t.addEventListener("click",xe),e.appendChild(a),e.appendChild(t),n.appendChild(e),x.startChatIcon=a,x.startChatButton=t,n),x.minimizeCloseBtnDOM=function(){var e=document.createElement("button");e.classList.add("_steamlive_chat_close-chat-button"),e.innerHTML='',0==Gt()&&(e.style.display="none");return e.addEventListener("click",function(){Xe(),he(v.QUIT),xa()}),e}(),x.triggerMessage=(a=document.createElement("div"),t=document.createElement("button"),n=document.createElement("div"),a.classList.add("_steamlive_chat-trigger-message-wrapper","_steamlive_chat-trigger-message-wrapper--hide"),t.classList.add("_steamlive_chat-trigger-message-close-btn"),n.classList.add("_steamlive_chat-trigger-message-text"),t.innerHTML='',a.addEventListener("click",rt),t.addEventListener("click",function(e){e.stopPropagation(),Ia()}),a.appendChild(t),a.appendChild(n),x.triggerMessageText=n,a),x.minimizeAgentImage=((n=document.createElement("img")).classList.add("_steamlive_chat_minimizeAgentImage"),n.style.display="none",n.addEventListener("click",rt),n.addEventListener("error",Aa),n),x.chatToolbar=document.createElement("div"),x.tdLog=document.createElement("div"),x.msg=document.createElement("div"),x.msg.className="_steamlive_chat_status_msg_td",x.tdStatus=document.createElement("div"),x.tdStatus.className="_steamlive_chat_status_td",x.tdRating=document.createElement("div"),x.toolbarTriggerBtnWrapper=document.createElement("div"),x.chatToolbarTriggerBtn=document.createElement("button"),x.toolbarButtonsShadow=document.createElement("div"),x.toolbarButtonsWrapper=document.createElement("div"),x.editContactInfoBtn=document.createElement("button"),x.emailTranscriptBtn=document.createElement("button"),x.divActionsContainer=document.createElement("div"),x.divChatSessionEnded=document.createElement("div"),x.divRatingMessage=document.createElement("div"),x.divChatActions=document.createElement("div"),x.divCommentMsg=document.createElement("div"),x.divCommentArea=document.createElement("TEXTAREA"),x.btnSendFeedBack=Qe(Dt("sendFeedBack"),X),x.btnNoFeedBack=Qe(Dt("noThanks"),se),x.surveyButton=Qe(Dt("fillSurvey"),te),x.surveyPopUp=document.createElement("div"),x.surveyPopUpHeader=document.createElement("div"),x.surveyPopUpFooter=document.createElement("div"),x.surveyPopUpBg=document.createElement("div"),x.surveyPopUpHeaderCloseBtn=document.createElement("div"),x.surveyPopUpFooterCloseBtn=document.createElement("div"),x.surveyFrame=document.createElement("iframe"),x.divChatLike=document.createElement("div"),x.divChatdisLike=document.createElement("div"),x.divChatRatingStar1=document.createElement("div"),x.divChatRatingStar2=document.createElement("div"),x.divChatRatingStar3=document.createElement("div"),x.divChatRatingStar4=document.createElement("div"),x.divChatRatingStar5=document.createElement("div"),x.divChatRatingStarsContainer=document.createElement("div"),x.divChatLike.innerHTML='',x.divChatdisLike.innerHTML='',x.divChatRatingStar1.innerHTML='',x.divChatRatingStar2.innerHTML='',x.divChatRatingStar3.innerHTML='',x.divChatRatingStar4.innerHTML='',x.divChatRatingStar5.innerHTML='',x.divChatLike.className="_steamlive_chat_like",x.divChatdisLike.className="_steamlive_chat_dislike",x.divChatRatingStar1.className="_steamlive_chat_starRating _steamlive_chat_starRating1",x.divChatRatingStar2.className="_steamlive_chat_starRating _steamlive_chat_starRating2",x.divChatRatingStar3.className="_steamlive_chat_starRating _steamlive_chat_starRating3",x.divChatRatingStar4.className="_steamlive_chat_starRating _steamlive_chat_starRating4",x.divChatRatingStar5.className="_steamlive_chat_starRating _steamlive_chat_starRating5",x.toolbarTriggerBtnWrapper.className="_steamlive_chat_toolbar-trigger-wrapper",x.chatToolbarTriggerBtn.className="_steamlive_chat_toolbar-trigger",x.toolbarButtonsShadow.className="_steamlive_chat_toolbar-buttons-shadow",x.toolbarButtonsWrapper.className="_steamlive_chat_toolbar-buttons-wrapper",x.editContactInfoBtn.className="_steamlive_chat_toolbar-btn _steamlive_chat_toolbar-btn--left",x.emailTranscriptBtn.className="_steamlive_chat_toolbar-btn _steamlive_chat_toolbar-btn--right",x.trRating.className="_steamlive_chat_rating",x.divChatActions.className="_steamlive_chat_ratingActions",x.divActionsContainer.className="_steamlive_chat_ratingActionsContainer",x.divChatSessionEnded.className="_steamlive_chat_divChatSessionEnded",x.divRatingMessage.className="_steamlive_chat_divRatingMessage",x.divCommentMsg.className="_steamlive_chat_divLeaveComment",x.divCommentArea.className="_steamlive_chat_commentArea",x.btnSendFeedBack.className="_steamlive_chat_btn_newChatButton _steamlive_chat_btn_newChatPrimaryButton _steamlive_chat_btnSendFeedBack",x.surveyButton.className="_steamlive_chat_btn_newChatButton _steamlive_chat_btn_newChatPrimaryButton _steamlive_chat_btnSurvey",x.btnNoFeedBack.className="_steamlive_chat_btn_newChatButton _steamlive_chat_btnNoFeedBack",x.surveyPopUp.className="_steamlive_chat_surveyPopUp",x.surveyPopUpBg.className="_steamlive_chat_surveyPopUpBg",x.surveyPopUpHeader.className="_steamlive_chat_surveyPopUpHeader",x.surveyPopUpFooter.className="_steamlive_chat_surveyPopUpFooter",x.surveyPopUpHeaderCloseBtn.className="_steamlive_chat_surveyPopUpHeaderCloseBtn",x.surveyPopUpFooterCloseBtn.className="_steamlive_chat_surveyPopUpFooterCloseBtn",x.surveyFrame.id="_steamlive_chat_surveyFrame",x.surveyFrame.className="_steamlive_chat_surveyFrame",x.chatToolbarTriggerBtn.innerHTML='';var a=document.createElement("span");a.textContent=Dt("editDetails"),x.editContactInfoBtn.innerHTML='',x.editContactInfoBtn.appendChild(a),x.editContactInfoBtn.addEventListener("click",Ye);var n=document.createElement("span");n.textContent=Dt("emailTranscript"),x.emailTranscriptBtn.innerHTML='',x.emailTranscriptBtn.appendChild(n),x.emailTranscriptBtn.addEventListener("click",function(){Ne(),Na(f.EMAIL_TRANSCRIPT)}),x.editContactSpan=a,x.emailTranscriptSpan=n,x.chatToolbarTriggerBtn.onclick=Ae,x.divChatLike.onclick=Z,x.divChatdisLike.onclick=Z,x.surveyPopUpHeaderCloseBtn.onclick=ae,x.surveyPopUpFooterCloseBtn.onclick=ae,x.divChatRatingStar1.onclick=Z,x.divChatRatingStar2.onclick=Z,x.divChatRatingStar3.onclick=Z,x.divChatRatingStar4.onclick=Z,x.divChatRatingStar5.onclick=Z,x.surveyContainer=document.createElement("div"),x.surveyContainer.className="_steamlive_chat_surveyContainer",x.surveyText=document.createElement("div"),x.surveyText.className="_steamlive_chat_surveyText",x.surveyTitle=document.createElement("div"),x.surveyTitle.className="_steamlive_chat_surveyTitle",x.surveyTitle.innerHTML="Your opinion matters",x.surveyText.innerHTML="Please fill this survey",x.surveyPopUpFooterCloseBtn.innerHTML="Close survey",x.surveyContainer.appendChild(x.surveyTitle),x.surveyContainer.appendChild(x.surveyText),x.surveyContainer.appendChild(x.surveyButton),x.divActionsContainer.appendChild(x.divChatSessionEnded),x.divActionsContainer.appendChild(x.divRatingMessage),x.divActionsContainer.appendChild(x.divChatActions),x.divActionsContainer.appendChild(x.divCommentMsg),x.divActionsContainer.appendChild(x.divCommentArea),x.divActionsContainer.appendChild(x.btnSendFeedBack),x.divActionsContainer.appendChild(x.btnNoFeedBack),x.divChatRatingStarsContainer.appendChild(x.divChatRatingStar1),x.divChatRatingStarsContainer.appendChild(x.divChatRatingStar2),x.divChatRatingStarsContainer.appendChild(x.divChatRatingStar3),x.divChatRatingStarsContainer.appendChild(x.divChatRatingStar4),x.divChatRatingStarsContainer.appendChild(x.divChatRatingStar5),x.tdRating.appendChild(x.divActionsContainer),x.tdRating.appendChild(x.surveyContainer),x.trLog.appendChild(x.tdLog),x.trMsg.appendChild(x.msg),x.trStatus.appendChild(x.tdStatus),x.trRating.appendChild(x.tdRating),x.surveyPopUpHeader.appendChild(x.surveyPopUpHeaderCloseBtn),x.surveyPopUpFooter.appendChild(x.surveyPopUpFooterCloseBtn),x.surveyPopUp.appendChild(x.surveyPopUpHeader),x.surveyPopUp.appendChild(x.surveyFrame),x.surveyPopUp.appendChild(x.surveyPopUpFooter),x.chatToolbarButtons.className="_steamlive_chat_toolbar-buttons",x.trLog.className="_steamlive_chat_tableRowLog",x.trMsg.className="_steamlive_chat_tableRowMsg",x.trStatus.className="_steamlive_chat_tableRowStatus",x.toolbarTriggerBtnWrapper.appendChild(x.chatToolbarTriggerBtn),x.chatToolbarButtons.appendChild(x.toolbarTriggerBtnWrapper),x.chatToolbarButtons.appendChild(x.toolbarButtonsShadow),x.toolbarButtonsShadow.appendChild(x.toolbarButtonsWrapper),x.toolbarButtonsWrapper.appendChild(x.editContactInfoBtn),x.toolbarButtonsWrapper.appendChild(x.emailTranscriptBtn),x.chatContainer.appendChild(x.chatToolbar),x.chatContainer.appendChild(x.chatToolbarButtons),x.chatContainer.appendChild(x.trRating),x.chatContainer.appendChild(x.trLog),x.chatContainer.appendChild(x.trMsg),x.chatContainer.appendChild(x.trStatus),x.chatContainer.appendChild(x.closeChatConfirmation),x.chatContainer.appendChild(x.emailTranscriptDOM),x.chatContainer.appendChild(x.emailTranscriptAlertDOM),x.chatContainer.appendChild(x.chatRatingDOM),x.chatContainer.appendChild(x.chatRateSentDOM),x.chatContainer.appendChild(x.reopenChatFormDOM),x.chatContainer.appendChild(x.bannedSessionDOM),x.chatContainer.appendChild(x.closingDayDOM),x.chatContainer.appendChild(x.noAgentAvailableDOM),x.chatContainer.appendChild(x.startChatDOM),x.trRating.style.display="none",x.main.appendChild(x.chatContainer),x.log=document.createElement("div"),x.log.style.display="none",x.log.className="_steamlive_chat_logdiv",x.startChatMessage=document.createElement("div"),x.startChatMessage.className="startChatMessage",x.startChatMessage.onclick=xe,x.startChatMessageText=document.createElement("div"),x.startChatMessageText.className="startChatMessageText",x.startChatMessageP=document.createElement("p"),x.startChatMessageP.innerHTML=Dt("clickStartChat"),x.startChatMessageText.appendChild(x.startChatMessageP),x.startChatMessageIcon=document.createElement("div"),x.startChatMessage.appendChild(x.startChatMessageIcon),x.startChatMessage.appendChild(x.startChatMessageText),x.startMessage=document.createElement("div"),x.formContainer=document.createElement("div"),x.formContainer.className="formContainer",x.contactInfoHeading=document.createElement("h4"),x.contactInfoHeading.innerHTML="Contact information",x.contactInfoHeading.className="_steamlive_chat_contactInfoHeading",x.callBackFormContainer=document.createElement("div"),x.callBackFormContainer.className="callBackFormContainer",x.callBackFormContainerBody=document.createElement("div"),x.callBackFormContainerBody.className="callBackFormContainerBody",x.callBackFormContainer.appendChild(x.callBackFormContainerBody),x.inputName=ze(Dt("yourName"),"name"),x.inputEmail=ze(Dt("yourEmail"),"email"),x.editContactInfoBtnWrapper=document.createElement("div"),x.btnSaveEditContactInfo=document.createElement("button"),x.btnCancelEditContactInfo=document.createElement("button"),x.editContactInfoBtnWrapper.classList.add("_steamlive_chat_editContactInfoBtnWrapper"),x.btnSaveEditContactInfo.classList.add("_steamlive_chat_btnSaveEditContactInfo"),x.btnCancelEditContactInfo.classList.add("_steamlive_chat_btnCancelEditContactInfo"),x.btnSaveEditContactInfo.textContent=Dt("save"),x.btnCancelEditContactInfo.textContent=Dt("cancel"),x.editContactInfoBtnWrapper.appendChild(x.btnCancelEditContactInfo),x.editContactInfoBtnWrapper.appendChild(x.btnSaveEditContactInfo),x.btnSaveEditContactInfo.addEventListener("click",function(){Ze()}),x.btnCancelEditContactInfo.addEventListener("click",function(){x.startMessage.style.display="none",Ot()}),x.formContainer.appendChild(x.contactInfoHeading),x.formContainer.appendChild(x.inputName),x.formContainer.appendChild(x.inputEmail),x.startMessageFormWrapper=document.createElement("div"),x.startMessageFormWrapper.className="_steamlive_chat_startChatFormWrapper",x.startMessageFormWrapper.appendChild(x.formContainer),x.startMessageFormWrapper.appendChild(x.startChatMessage),x.startMessage.appendChild(x.startMessageFormWrapper),x.startMessage.style.display="none",x.startMessage.className="_steamlive_chat_startMessage",x.waitingForSupport=document.createElement("div"),x.waitingForSupport.className="_steamlive_chat_waitingForSupport",x.waitingForSupport.style.display="none",x.waitingForSupportImg=document.createElement("img"),x.waitingForSupportImg.className="_steamlive_chat_waitingForSupportImg",x.waitingForSupportImg.setAttribute("src",E+"/waiting-agent.gif"),x.waitingForSupportText=document.createElement("div"),x.waitingForSupportText.className="_steamlive_chat_waitingForSupportText",x.waitingForSupportWrapper=document.createElement("div"),x.waitingForSupportWrapper.className="_steamlive_chat_waitingForSupportWrapper",x.waitingForSupportWrapper.appendChild(x.waitingForSupportImg),x.waitingForSupportWrapper.appendChild(x.waitingForSupportText),x.waitingForSupport.appendChild(x.waitingForSupportWrapper),x.divAlert=document.createElement("div"),x.divAlert.className="_steamlive_chat_alert",x.divAlert.innerHTML="",x.divAlert.style.display="none",x.emojisPopup=document.createElement("div"),x.emojisPopup.className="_steamlive_chat_emojis_popup",x.emojisPopup.innerHTML="",x.emojisPopup.style.display="none",x.divConfirmEmail=document.createElement("div"),x.divConfirmEmail.className="_steamlive_chat_ConfirmEmail",x.divConfirmEmail.innerHTML="",x.tanscriptTo=document.createElement("input"),x.tanscriptTo.className="_steamlive_chat_tanscriptTo",x.btnSendTranscript=Qe(Dt("emailTranscript"),ie),x.btnSendTranscript.className="_steamlive_chat_btn_newChatButton _steamlive_chat_sendTranscript",x.cancelTranscript=document.createElement("div"),x.cancelTranscript.style.width="20px",x.cancelTranscript.style.height="20px",x.cancelTranscript.style.cursor="pointer",x.cancelTranscript.style.position="absolute",x.cancelTranscript.style.top="3px",x.cancelTranscript.style.right="3px",x.cancelTranscript.innerHTML="",x.cancelTranscript.onclick=ne,x.divConfirmEmail.appendChild(x.cancelTranscript),x.divConfirmEmail.appendChild(x.tanscriptTo),x.divConfirmEmail.appendChild(x.btnSendTranscript),x.nobodyAvailable=document.createElement("div"),x.nobodyAvailable.className="_steamlive_chat_nobodyAvailable",x.nobodyAvailable.innerHTML="",x.chatLeft=document.createElement("div"),x.chatLeft.className="_steamlive_chat_chatLeft",x.chatLeft.innerHTML=Dt("chatLeft"),x.chatLeft.style.display="none",x.tdLog.appendChild(x.waitingForSupport),x.tdLog.appendChild(x.startMessage),x.tdLog.appendChild(x.log),x.tdLog.className="_steamlive_chat_log",x.title=document.createElement("div"),x.title.className="_steamlive_chat_title_div",x.chatToolbar.className="_steamlive_chat_title",x.chatToolbar.appendChild(x.title),x.agentImage=document.createElement("div"),x.agentImage.className="_steamlive_chat_agent_img",x.txtTitle=document.createElement("span"),x.iconMinimizeChat=document.createElement("div"),x.iconMinimizeChat.className="_steamlive_minimize_chat_icon_white",x.iconMinimizeChat.innerHTML='',x.iconMinimizeChat.onclick=lt,x.title.appendChild(x.iconMinimizeChat),x.iconWideChat=document.createElement("div"),x.iconWideChat.className="_steamlive_wide_chat_icon_white",x.iconWideChat.innerHTML='',x.iconWideChat.onclick=ct,x.title.appendChild(x.iconWideChat),x.iconCloseChat=document.createElement("div"),x.iconCloseChat.className="_steamlive_close_chat_icon_white",x.iconCloseChat.innerHTML='',x.iconCloseChat.onclick=function(){O=!0,Na(f.CONFIRM_CLOSE_CHAT)},x.title.appendChild(x.iconCloseChat),x.msgInput=document.createElement("textarea"),x.msgInput.className="_steamlive_chat_sendMessage",x.msgInput.placeholder=Dt("msgPlaceholder"),x.msgInput.addEventListener("input",function(){x.msgInput.scrollHeight>x.msgInput.offsetHeight&&x.msgInput.offsetHeight<48&&(x.msgInput.style.height=x.msgInput.scrollHeight+"px"),""==x.msgInput.value&&(x.msgInput.style.height="24px")}),x.msgInput.onkeyup=st,x.msgInput.addEventListener("focus",ot),x.btnSendChat=document.createElement("span"),x.btnSendChat.className="_steamlive_chat_btnSendChat",x.btnSendChat.innerHTML='',x.btnSendChat.onclick=function(e){e.which=13,e.keyCode=13,st(e)},x.chatInputWrapper=document.createElement("div"),x.chatInputWrapper.className="_steamlive_chat_chatInputWrapper",x.chatInputWrapper.appendChild(x.msgInput),x.emojisInput=document.createElement("div"),x.emojisInput.className="_steamlive_chat_emojisInput",x.emojisInput.innerHTML='',x.emojisInput.onclick=Kt,x.chatInputWrapper.appendChild(x.emojisInput),x.sendChatContainer=document.createElement("div"),x.sendChatContainer.className="_steamlive_chat_sendChatContainer",x.sendChatContainer.appendChild(x.chatInputWrapper),x.sendChatContainer.appendChild(x.btnSendChat),x.msg.appendChild(x.sendChatContainer),x.msgInput.autofocus=!0,x.msg.appendChild(x.chatLeft),x.status=document.createElement("div"),x.status.className="_steamlive_chat_status",x.statusButtons=document.createElement("div"),x.statusButtons.className="_steamlive_chat_statusButtons",x.statusButtons.btnJoinLeave=Qe(Dt("leaveChat"),Ze,"newChatButton"),x.statusButtons.btnJoinLeave.className="_steamlive_chat_btn_newChatButton",x.statusButtons.btnEditDetails=Qe(Dt("editDetails"),Ye,"newChatButton _steamlive_chat_btn_newChatPrimaryButton"),x.statusButtons.btnEditDetails.className="_steamlive_chat_btn_newChatButton _steamlive_chat_btn_newChatPrimaryButton",x.statusButtons.cancelForm=Qe(Dt("cancel"),Ot,"newChatButton"),x.statusButtons.cancelForm.className="_steamlive_chat_btn_newChatButton",x.poweredBy=document.createElement("div"),x.poweredBy.className="_steamlive_chat_poweredby",x.poweredBy.innerHTML='Powered by ',x.poweredBy.onclick=function(e){window.open("https://www.callcenter-software.com/","_blank").focus()},x.statusButtons.appendChild(x.statusButtons.btnEditDetails),x.statusButtons.appendChild(x.statusButtons.btnJoinLeave),x.statusButtons.appendChild(x.statusButtons.cancelForm),x.status.appendChild(x.poweredBy),x.status.appendChild(x.statusButtons),x.tdStatus.appendChild(x.status),x.openingHoursWrapper=document.createElement("div"),x.openingHours=document.createElement("div"),x.openingHoursWrapper.className="_steamlive_chat_opening-hours-wrapper",x.openingHours.className="_steamlive_chat_openingHours",x.btnCloseOpeningHours=Qe(Dt("close"),function(e){e.stopPropagation(),dt()}.bind(this)),x.btnCloseOpeningHours.className="_steamlive_chat_btn-closing-opening-hours",x.btnShowOpeningHoursDetails=Qe(Dt("showAll"),function(){!function(){for(var e=x.openingHours.getElementsByClassName("_steamlive_chat_openingHours_Row"),t=0;t',x.bannedIcon=document.createElement("div"),x.bannedIcon.className="_steamlive_chat_bannedIcon",x.bannedIcon.innerHTML='',document.body.appendChild(x.frame),x.frame.contentDocument.open(),x.frame.contentDocument.close(),z||(x.frame.contentDocument.body.appendChild(x.triggerMessage),x.frame.contentDocument.body.appendChild(x.minimizeCloseBtnDOM),0==Gt()&&(x.frame.contentDocument.body.addEventListener("mouseenter",Ba),x.frame.contentDocument.body.addEventListener("mouseleave",Ma))),x.frame.contentDocument.body.appendChild(x.minimizeAgentImage),x.frame.contentDocument.body.appendChild(x.main);n=document.createElement("link");n.href=E+"/css",n.rel="stylesheet",n.type="text/css",x.frame.contentDocument.body.appendChild(n),x.callMeBackSuccess=document.createElement("div"),x.callMeBackSuccess.className="_steamlive_chat_callMeBack_Success",x.surveyPopUpBg.style.width="100%",x.surveyPopUpBg.style.top="0px",x.surveyPopUpBg.style.left="0px",x.surveyPopUpBg.style.height="100%",x.surveyPopUpBg.style.backgroundColor="#000",x.surveyPopUpBg.style.opacity="0.5",x.surveyPopUpBg.style.zIndex="2147483648",Gt()?x.surveyPopUpBg.style.position="fixed":x.surveyPopUpBg.style.position="absolute",x.surveyPopUp.style.left="0",x.surveyPopUp.style.right="0",x.surveyPopUp.style.marginLeft="auto",x.surveyPopUp.style.marginRight="auto",x.surveyPopUp.style.backgroundColor="#fff",x.surveyPopUp.style.zIndex="2147483649",Gt()?(x.surveyPopUp.style.width="100%",x.surveyPopUp.style.height="100%",x.surveyPopUp.style.top="0%",x.surveyPopUp.style.position="fixed"):(x.surveyPopUp.style.height="80%",x.surveyPopUp.style.width="80%",x.surveyPopUp.style.top="10%",x.surveyPopUp.style.position="absolute"),x.surveyPopUpHeader.style.height="35px",x.surveyPopUpHeader.style.paddingTop="10px",x.surveyPopUpHeader.style.paddingLeft="10px",x.surveyPopUpHeader.style.fontSize="20px",x.surveyPopUpHeader.style.color="#fff",x.surveyPopUpHeader.style.textAlign="left",x.surveyPopUpHeader.style.backgroundColor="#4C384D",x.surveyFrame.style.width="100%",x.surveyFrame.style.height="calc(100% - 100px)",x.surveyFrame.style.border="none",x.surveyPopUpFooter.style.height="50px",x.surveyPopUpFooter.style.width="100%",x.surveyPopUpHeaderCloseBtn.style.float="right",x.surveyPopUpHeaderCloseBtn.style.height="20px",x.surveyPopUpHeaderCloseBtn.style.width="20px",x.surveyPopUpHeaderCloseBtn.style.margin="5px",x.surveyPopUpHeaderCloseBtn.style.marginRight="15px",x.surveyPopUpHeaderCloseBtn.style.cursor="pointer",x.surveyPopUpHeaderCloseBtn.innerHTML='',x.surveyPopUpFooterCloseBtn.style.backgroundColor="#4C384D",x.surveyPopUpFooterCloseBtn.style.borderColor="#4C384D",x.surveyPopUpFooterCloseBtn.style.color="#fff",x.surveyPopUpFooterCloseBtn.style.height="20px",x.surveyPopUpFooterCloseBtn.style.padding="10px",x.surveyPopUpFooterCloseBtn.style.marginRight="15px",x.surveyPopUpFooterCloseBtn.style.textAlign="center",x.surveyPopUpFooterCloseBtn.style.borderRadius="4px",x.surveyPopUpFooterCloseBtn.style.cursor="pointer",Gt()?(x.surveyPopUpFooterCloseBtn.style.margin="auto",x.surveyPopUpFooterCloseBtn.style.width="90%"):(x.surveyPopUpFooterCloseBtn.style.margin="5px",x.surveyPopUpFooterCloseBtn.style.width="90px",x.surveyPopUpFooterCloseBtn.style.float="right")};function Ae(){x.chatToolbarButtons.classList.contains(m.TOOLBAR_BUTTONS_EXPANDED)?Ne():x.chatToolbarButtons.classList.add(m.TOOLBAR_BUTTONS_EXPANDED)}function Ne(){x.chatToolbarButtons.classList.remove(m.TOOLBAR_BUTTONS_EXPANDED)}function He(e){e.preventDefault(),e.stopPropagation(),M={},Xe(),he(v.QUIT)}function De(e,t){e.classList.remove(t)}var qe=function(){if(!0===l&&!0===r)return void 0!==y&&0<=y.split(",").indexOf(this.files[0].name.split(".").pop())?(A=null,x.fileNameContainer.style.display="block",x.fileNameContainer.style.backgroundColor="#ED5B56",x.fileName.innerHTML=Dt("noneAllowedExtension"),0):void 0!==$.cqd.chatAttachmentSize&&$.cqd.chatAttachmentSize
"+'
'+t.outerHTML+a.outerHTML+"
"+n.outerHTML+i.outerHTML+"
",t=e.querySelector("#close-chat-confirmation-msg"),a=e.querySelector("#close-chat-are-u-sure"),n=e.querySelector("#_steamlive_close-chat-btn-yes"),i=e.querySelector("#_steamlive_close-chat-btn-no"),n.addEventListener("click",He),i.addEventListener("click",function(){O=!1,$e()}),x.closeChatConfirmationMessage=t,x.areYouSureCloseChatConfirmation=a,x.yesBtnCloseChatConfirmation=n,x.noBtnCloseChatConfirmation=i,e},Qe=function(e,t,a){var n=document.createElement("div");return n.innerHTML=e,n.onclick=t,n.className="_steamlive_chat_btn_"+(a||1),n},et=function(e){if(void 0!==$.cqd.active&&0==$.cqd.active)return!1;T||pt(),x.startMessageFormWrapper.classList.add(je($.cqd.chatColorSchemeID)),x.formContainer.classList.add(je($.cqd.chatColorSchemeID)),x.log.classList.add(je($.cqd.chatColorSchemeID)),x.callBackFormContainerBody.classList.add(je($.cqd.chatColorSchemeID)),x.msgInput.classList.add(je($.cqd.chatColorSchemeID)),tt(),x.main.style.display="block",e&&Da()},tt=function(){x.main.style.borderColor="#"+$.cqd.color3,x.title.style.backgroundColor="#"+$.cqd.color1,x.title.style.color="#"+$.cqd.color2,""==$.cqd.startChatMsgBGcolor?x.startChatMessage.style.backgroundColor="#"+$.cqd.color1:x.startChatMessage.style.backgroundColor="#"+$.cqd.startChatMsgBGcolor,""==$.cqd.startChatMsgTextcolor?x.startChatMessage.style.color="#"+$.cqd.color2:x.startChatMessage.style.color="#"+$.cqd.startChatMsgTextcolor,""==$.cqd.noAgentAvailableBGcolor?x.nobodyAvailable.style.backgroundColor="#"+$.cqd.color1:x.nobodyAvailable.style.backgroundColor="#"+$.cqd.noAgentAvailableBGcolor,""==$.cqd.noAgentAvailablecolor?x.nobodyAvailable.style.color="#"+$.cqd.color2:x.nobodyAvailable.style.color="#"+$.cqd.noAgentAvailablecolor,""==$.cqd.noAgentAvailableBordercolor?x.nobodyAvailable.style.borderColor="#"+$.cqd.color3:x.nobodyAvailable.style.color="#"+$.cqd.noAgentAvailablecolor,void 0!==$.cqd.fontBold&&1==$.cqd.fontBold&&(x.chatContainer.style.fontWeight="bold"),void 0!==$.cqd.fontItalic&&1==$.cqd.fontItalic&&(x.chatContainer.style.fontStyle="italic"),"undefined"!=typeof _customCSS&&""!=_customCSS.trim()&&((t=document.createElement("link")).href=_customCSS,t.rel="stylesheet",t.type="text/css",x.frame.contentDocument.body.appendChild(t)),x.btnSendChat.style.backgroundColor="#"+$.cqd.color1,x.surveyPopUpHeader.style.backgroundColor="#"+$.cqd.color1,x.surveyPopUpFooterCloseBtn.style.backgroundColor="#"+$.cqd.color1,x.surveyPopUpFooterCloseBtn.style.borderColor="#"+$.cqd.color1,x.fileNameContainer&&(x.fileNameContainer.style.backgroundColor="#"+$.cqd.color1),x.waitingForSupportImg.classList.add(Ue()),x.emojisInput.classList.add(Ue()),nt(),it();var e=document.createElement("style"),t=$.cqd.triggerMessageColor?$.cqd.triggerMessageColor.replace("#",""):$.cqd.color1;e.innerHTML="._steamlive_chat_startMessage_input:focus {border-color: #"+$.cqd.color1+" !important;}._steamlive_chat_btn_newChatButton._steamlive_chat_btn_newChatButton {background-color: #"+($.cqd.chatButtonsTextcolor||$.cqd.color2)+" !important;color: #"+($.cqd.chatButtonsBGcolor||$.cqd.color2)+" !important;border-color: #"+($.cqd.chatButtonsBordercolor||$.cqd.color2)+" !important;}._steamlive_chat_btn_newChatPrimaryButton._steamlive_chat_btn_newChatButton {background-color: #"+($.cqd.chatButtonsBGcolor||$.cqd.color2)+" !important;color: #"+($.cqd.chatButtonsTextcolor||$.cqd.color1)+" !important;;border-color: #"+($.cqd.chatButtonsBordercolor||$.cqd.color2)+" !important;}._steamlive_chat_scroll {scrollbar-color: #"+$.cqd.color1+" #ddd !important;}._steamlive_chat_scroll::-webkit-scrollbar-thumb {background-color: #"+$.cqd.color1+" !important;}.steamChat_multipleCHoices_choice {color: #"+$.cqd.chatReceiverTextColor+";border-color: #"+$.cqd.chatReceiverTextColor+";}.steamChat_multipleCHoices_choice:hover, .steamChat_multipleCHoices_chosen {background-color: #"+$.cqd.chatReceiverTextColor+";color: #"+$.cqd.chatReceiverbackgroundColor+";border-color: #"+$.cqd.chatReceiverbackgroundColor+";}._steamlive_chat_Svgtheme {fill: #"+$.cqd.color1+" !important;}._steamlive_chat_toolbar-buttons::after {background-color: #"+$.cqd.color1+" !important;}._steamlive_chat_toolbar-trigger:hover {background-color: #"+$.cqd.color1+" !important;}._steamlive_chat_toolbar-btn:not(:disabled):hover {background-color: #"+$.cqd.color1+" !important;color: #"+$.cqd.color2+" !important;}._steamlive_chat_toolbar-btn--left {border-right-color: #"+$.cqd.color1+" !important;}._steamlive_chat_toolbar-buttons--expanded ._steamlive_chat_toolbar-trigger-wrapper {background-color: #"+$.cqd.color1+" !important;}._steamlive_chat_main._steamlive_chat_main_minimized {background-color: #"+$.cqd.color1+" !important;}._steamlive_email-transcript-send-btn,._steamlive_chat-rating-submit-btn,._steamlive_chat_rate-sent-chat-again-btn,._steamlive_chat_reopen-chat-form-new-btn,._steamlive_chat_btn-closing-opening-hours,._steamlive_chat_btnSaveEditContactInfo,._steamlive_chat-rating-survey-btn,._steamlive_chat_start-chat-button,._steamlive_email-transcript-resume-chat {background-color: #"+$.cqd.color1+" !important;color: #"+$.cqd.color2+" !important;}._steamlive_chat_closing-day-icon svg path {fill: #"+$.cqd.color1+" !important;}._steamlive_chat-trigger-message-wrapper {background-color: #"+t+" !important;}._steamlive_chat-trigger-message-wrapper::after {border-top: 10px solid #"+t+" !important;}",x.main.appendChild(e),at()},at=function(){z&&(x.iconMinimizeChat.style.display="none",x.iconCloseChat.style.display="none",x.iconWideChat.style.display="none",x.txtTitle.style.display="none",x.trStatus.style.display="none",x.main.style.borderRadius="unset",x.divAlert.style.bottom="0px",x.divAlert.style.height="calc(100% - 35px)")},nt=function(){var e=document.createElement("link");e.rel="stylesheet",e.type="text/css",e.media="all",void 0!==$.cqd.chatFontFamily&&""!=$.cqd.chatFontFamily?"Arial"==$.cqd.chatFontFamily||"Verdana"==$.cqd.chatFontFamily?x.main.style.fontFamily="'"+$.cqd.chatFontFamily+"'":(e.href="https://fonts.googleapis.com/css?family="+$.cqd.chatFontFamily+"&display=fallback",x.main.style.fontFamily="'"+$.cqd.chatFontFamily.replace(/\+/g," ")+"'"):e.href="https://fonts.googleapis.com/css?family=Roboto&display=fallback",x.main.appendChild(e)},it=function(){"number"==typeof $.cqd.iconsTheme&&1==$.cqd.iconsTheme&&(x.iconWideChat.className="_steamlive_wide_chat_icon_dark",x.iconMinimizeChat.className="_steamlive_minimize_chat_icon_dark",x.iconCloseChat.className="_steamlive_close_chat_icon_dark")},st=function(e){if(!0!==l||!0!==r)return Nt("Not connected; please wait a moment before sending your message"),!1;if(13!==e.which&&13!==e.keyCode||e.shiftKey)ft();else if(null!=A&&!0===l&&!0===r&&(t=new XMLHttpRequest,o="randId"+Math.round(9999999999*Math.random())+9999999999,c=document.createElement("div"),d=document.createElement("div"),p=document.createElement("div"),A.randId=o,h={filename:A.name,randid:o,sender:"user"},(I[o]=t).upload&&(t.upload.onprogress=function(e){for(var t,a,n=e.position||e.loaded,i=e.totalSize||e.total,s=0;s"+Dt("done")+"!":(t=document.createElement("div"),a=document.createElement("div"),t.className="_steamlive_chat_attachment_progress_bar",a.className="_steamlive_chat_attachment_progress_bar_value",a.style.width=n/i*100+"%",a.style.backgroundColor="#"+$.cqd.color1,t.appendChild(a),x.log.getElementsByClassName(o)[s].innerHTML=t.outerHTML)},t.upload.onloadstart=function(e){var t=new Date;d.className="_steamlive_chat_divMsgContainer";var a=document.createElement("div");a.className="_steamlive_chat_upload_attachment_container";var n=document.createElement("div");n.className="_steamlive_chat_upload_attachment_icon",n.innerHTML='';var i=document.createElement("div");i.className="_steamlive_chat_attachment_name",i.innerHTML=h.filename.replace(/"/g,"");var s=document.createElement("div");s.className="_steamlive_chat_attachment_cancel _steamlive_chat_attachment_cancel"+h.randid,s.innerHTML='';var o=document.createElement("div");o.className="user_file_"+$.userId+" "+h.randid;var r=document.createElement("div");r.className="_steamlive_chat_timestampR",r.innerHTML="
"+t.toLocaleTimeString()+"
",c.className="_steamlive_chat_message r _steamlive_chat_upload_attachment",p.style.backgroundColor="#"+$.cqd.chatSenderbackgroundColor,p.style.color="#"+$.cqd.chatSenderTextColor,p.style.borderColor="#"+$.cqd.chatSenderborderColor,p.style.fontSize=$.cqd.chatFontSize,a.appendChild(n),a.appendChild(i),a.appendChild(o),a.appendChild(s),c.appendChild(a),c.appendChild(r),d.appendChild(c),x.log.appendChild(d);for(var l=0;l"+Dt("uploadCanceled")+"!"},t.upload.onerror=function(e){console.log(e);for(var t=0;t"+Dt("uploadFailed")+"!"},t.upload.onload=function(e){console.log("onload")},t.upload.ontimeout=function(e){console.log(e);for(var t=0;t"+Dt("uploadFailed")+"!"},t.upload.onloadend=function(e){var t=e.position||e.loaded;t==(e.totalSize||e.total)&&0!=t&&(d.remove(),w.emit("msg",{msg:"{file}"+JSON.stringify(h),rId:$.userId}))}),t.open("post",E+"/upload",!0),(e=new FormData).append("foldername",$.userId),e.append(o,A),t.send(e),A=null,x.fileNameContainer.style.display="none",x.fileName.innerHTML=""),yt())return x.msgInput.value="",!(x.msgInput.style.height="24px");var t,o,c,d,p,h},ot=function(){!0===r&&!1===o&&w.emit("markAsRead",{rId:$.userId,by:2})},rt=function(){!1===T&&ut()},lt=function(e){e.preventDefault(),e.stopPropagation(),dt()},ct=function(e){e.preventDefault(),e.stopPropagation(),0==x.main.classList.contains("chatMaximized")?(x.main.classList.add("chatMaximized"),x.iconWideChat.innerHTML='',z?(x.frame.style.width="90%",x.frame.style.maxWidth="830px"):(x.frame.style.width="500px",x.frame.style.maxWidth="500px",x.frame.style.height="700px",x.frame.style.maxHeight="calc(100% - 50px)")):(x.main.classList.remove("chatMaximized"),x.iconWideChat.innerHTML='',z?(x.frame.style.width="350px",x.frame.style.maxWidth="350px"):(x.frame.style.width="400px",x.frame.style.maxWidth="400px",x.frame.style.height="600px",x.frame.style.maxHeight="calc(100% - 50px)"))},dt=function(){V("opened",T=!1),pt(),Qt(!0)},pt=function(){switch(x.frame.style.right="40px",x.frame.style.bottom="40px",x.main.classList.add("_steamlive_chat_main_minimized"),x.main.classList.remove("chatMaximized"),x.frame.style.minWidth="",x.frame.style.maxWidth="",x.frame.style.minHeight="",x.frame.style.maxHeight="",x.frame.style.borderRadius="",x.frame.style.boxShadow="",x.frame.style.borderRadius="",x.frame.style.backgroundColor="",x.frame.contentDocument.body.classList.remove("_steamlive_chat_main_minimized_small"),x.frame.contentDocument.body.classList.remove("_steamlive_chat_main_minimized_large"),x.frame.contentDocument.body.classList.remove("_steamlive_chat_main_minimized_medium"),Gt()&&Ba(),$.cqd.widgetSize){case 1:case"1":x.frame.style.width="62px",x.frame.style.height="62px",x.frame.contentDocument.body.classList.add("_steamlive_chat_main_minimized_small");break;case 3:case"3":x.frame.style.width="82px",x.frame.style.height="82px",x.frame.contentDocument.body.classList.add("_steamlive_chat_main_minimized_large");break;default:$.cqd.widgetSize=2,x.frame.style.width="80px",x.frame.style.height="80px",x.frame.contentDocument.body.classList.add("_steamlive_chat_main_minimized_medium")}null!=R&&null!=R.avatar&&1==$.cqd.chatAvatar&&1==$.cqd.avatarType?ht(R.avatar):null!=$.cqd.widgetPicture&&""!=$.cqd.widgetPicture?ht($.cqd.widgetPicture):mt()},ht=function(e){x.minimizeAgentImage.style.display="block",x.minimizeAgentImage.src=e},mt=function(){x.minimizeAgentImage.style.display="none",x.main.style.backgroundImage='url("data:image/svg+xml,%3Csvg version="1.1" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="m21.149 14.211a7.538 7.538 0 0 0 1.43-4.3972c-0.002576-4.496-4.064-8.1537-9.0564-8.1537a9.4746 9.4746 0 0 0-7.252 3.2807 10.487 10.487 0 0 1 4.4659-0.9868c5.3763 0 9.7503 3.9695 9.7503 8.846a8.2637 8.2637 0 0 1-1.8233 5.1435 18.249 18.249 0 0 0 3.5161 0.92152 0.33151 0.33151 0 0 0 0.04895 0 0.34783 0.34783 0 0 0 0.24648-0.59431c-0.68105-0.67762-1.1543-2.117-1.326-4.0597z" fill="%23fff"/%3E%3Cpath d="m10.769 4.644c-4.9924 0-9.0538 3.6578-9.0538 8.1537a7.5388 7.5388 0 0 0 1.43 4.3972c-0.17778 1.9427-0.64756 3.3821-1.3278 4.0623a0.34783 0.34783 0 0 0 0.24648 0.59431 0.32378 0.32378 0 0 0 0.048094 0 16.129 16.129 0 0 0 4.9855-1.5974 9.8242 9.8242 0 0 0 3.6715 0.69995c4.9924 0 9.0538-3.6578 9.0538-8.1537 0-4.496-4.0606-8.1563-9.0538-8.1563zm-2.2639 5.3677h4.8756a0.34826 0.34826 0 0 1 0 0.69651h-4.8747a0.34826 0.34826 0 0 1 0-0.69651zm6.7908 5.5721h-8.7051a0.34826 0.34826 0 0 1 0-0.69651h8.706a0.34826 0.34826 0 0 1 0 0.69651zm0-2.4374h-8.7051a0.34826 0.34826 0 0 1 0-0.69651h8.706a0.34826 0.34826 0 0 1 0 0.69651z" fill="%23fff"/%3E%3C/svg%3E%0A")'},ut=function(){V("opened",T=!0),x.minimizeAgentImage.style.display="none",x.main.classList.remove("_steamlive_chat_main_minimized"),x.main.style.backgroundImage="",x.frame.style.maxHeight="calc(100% - 50px)",x.frame.contentDocument.body.classList.remove("_steamlive_chat_main_minimized_small"),x.frame.contentDocument.body.classList.remove("_steamlive_chat_main_minimized_large"),x.frame.contentDocument.body.classList.remove("_steamlive_chat_main_minimized_medium"),Ia(),gt(),he(u),x.iconWideChat.style.display="",x.iconMinimizeChat.style.display="";var e=J("mode");e!=v.WAITING_FOR_AGENT&&e!=v.CHATTING||(x.iconCloseChat.style.display="block"),Be()||Me()?Ce(!1):(Ce(!0),x.statusButtons.btnJoinLeave.style.display="none",x.iconCloseChat.style.display="none"),0==z&&Be()&&!Me()&&u==v.QUIT&&Na(f.REOPEN_CHAT_FORM),St(),at()},gt=function(){x.frame.style.right="30px",x.frame.style.transform="none",x.frame.style.height="",x.frame.contentDocument.body.style.width="",x.frame.style.backgroundColor="#F5F5F5",z?(x.frame.style.bottom="0px",x.frame.style.width="350px",x.frame.style.maxWidth="350px",x.frame.style.minHeight="547px",x.frame.style.borderRadius="14px 14px 0 0"):(x.frame.style.bottom="30px",x.frame.style.width="400px",x.frame.style.maxWidth="400px",x.frame.style.height="600px",x.frame.style.borderRadius="14px",x.frame.style.boxShadow="0 8px 10px -5px #0003, 0 16px 24px 2px #00000024, 0 6px 30px 5px #0000001f",Ma()),x.callBackFormContainer.style.display="",x.txtTitle.style.fontSize="",x.title.style.height="",x.txtTitle.style.display="block"},vt=null,ft=function(){var e;!0===l&&!0===r&&(1==$.cqd.sneakPeek?(e=x.msgInput.value,w.emit("istyping",{msg:e})):(null===vt||5e3',t=document.createElement("div"),1==$.cqd.chatAvatar&&(e.bot?""!=e.avatar?t.style.backgroundImage="url("+e.avatar+")":""!==F.avatar?t.style.backgroundImage="url("+F.avatar+")":t.style.backgroundImage="url("+E+"/chat_bot.svg)":void 0!==e.avatar&&1==$.cqd.avatarType?t.style.backgroundImage="url("+e.avatar+")":void 0!==e.avatar&&void 0!==$.cqd.defaultAvatar&&""!=$.cqd.defaultAvatar?t.style.backgroundImage="url("+$.cqd.defaultAvatar+")":(t.innerHTML='',t.classList.add(Ue())),t.className=t.className+" _steamlive_chat_avatar l",e.divIsTyping.appendChild(t)),e.divIsTyping.appendChild(a)),x.log.appendChild(e.divIsTyping),x.log.scrollTop=x.log.scrollHeight,null!==e.timeoutIsTyping&&clearTimeout(e.timeoutIsTyping),e.timeoutIsTyping=setTimeout(function(){_t(e,!1)},5e3)}else{e.isTyping=!1;try{x.log.removeChild(e.divIsTyping)}catch(e){}}}function Ct(e,t){var a=0;try{if(null==e)return a;if("none"==e.style.display)return a;var n=window.getComputedStyle(e).getPropertyValue(t),a=void 0!==n&&null!=n&&parseInt(n)||0}catch(e){a=0}return a}function bt(e){e?(zt=window.scrollY,x.frame.style.backgroundColor="#F5F5F5",x.frame.style.verticalAlign="text-bottom",x.frame.style.top="0",x.frame.style.left="0",x.frame.style.width="100%",x.frame.style.height="100%",x.frame.style.position="fixed",x.frame.style.zIndex="16000003",x.frame.style.minWidth="100%",x.frame.style.minHeight="100%",x.frame.style.maxWidth="100%",x.frame.style.maxHeight="100%",x.frame.style.opacity="1",x.frame.style.overflow="scroll",x.frame.style.webkitOverflowScrolling="touch",Da(),x.startChatMessage.style.position=""):(x.frame.style.top="",x.frame.style.left="",x.frame.style.zIndex="16000003",x.frame.style.minWidth="auto",x.frame.style.opacity="1",3===Wt()&&(x.frame.style.maxHeight="150px"),null!=zt&&window.scrollTo(0,zt))}var wt=function(t,a){return t.replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi,function(e){return 0<=t.indexOf("src='"+e)||0<=t.indexOf('src="'+e)?e:''+e+""})},Tt=-1,kt=function(e){-1==e.i&&(e.i=-1==$.lastMsgIdx?0:$.lastMsgIdx+1);var t=new Date;(e.i>$.lastMsgIdx||0==e.i)&&(p=e.i,$.lastMsgIdx=p,V("lastMsgIdx",$.lastMsgIdx),e.ts=t.getTime(),$.msgLog[e.i]=e),V("msgLog",JSON.stringify($.msgLog));var a=document.createElement("div"),n=document.createElement("div"),i=document.createElement("div"),s=document.createElement("div"),o=document.createElement("div");n.className="_steamlive_chat_divMsgWrapper",null!=e.currentAction&&(z&&(a.style.cursor="pointer"),a.dataset.botAction=e.currentAction),"steamBot"==e.uId&&1==$.cqd.chatAvatar?void 0!==M[e.uId]&&void 0!==M[e.uId].avatar&&""!=M[e.uId].avatar?i.style.backgroundImage="url("+M[e.uId].avatar+")":""!==F.avatar?i.style.backgroundImage="url("+F.avatar+")":i.style.backgroundImage="url("+E+"/chat_bot.svg)":void 0!==M[e.uId]&&1==$.cqd.chatAvatar&&(void 0!==M[e.uId].avatar&&1==$.cqd.avatarType?i.style.backgroundImage="url("+M[e.uId].avatar+")":void 0!==M[e.uId].avatar&&void 0!==$.cqd.defaultAvatar&&""!=$.cqd.defaultAvatar?i.style.backgroundImage="url("+$.cqd.defaultAvatar+")":(i.innerHTML='',i.classList.add(Ue()))),s.className="_steamlive_chat_divMsgContainer",o.className="_steamlive_chat_divMsgDateDiv";Math.round(Math.random());var r,l,c,d,p,h,m,u,g,v,f=[];if(e.m.indexOf("{file}")<0?e.uId===$.userId?g=document.createTextNode(e.m):(0<=e.m.indexOf("steamChat_multipleCHoices_message")&&(e.m=e.m.replace(/steamChat_multipleCHoices_choice/g,"steamChat_multipleCHoices_choice steamChat_multipleCHoices_choice_"+e.i)),(g=document.createElement("div")).innerHTML=e.m):("agent"==(C=JSON.parse(e.m.replace("{file}",""))).sender?((v=document.createElement("div")).className="_steamlive_chat_attachment_container",(r=document.createElement("div")).className="_steamlive_chat_attachment_name",r.innerHTML=C.filename.replace(/"/g,""),(l=document.createElement("div")).className="_steamlive_chat_btn_newChatButton _steamlive_chat_btn_newChatPrimaryButton _steamlive_chat_attachment_download"+C.randid,l.style.display="inline-block",l.style.marginTop="6px",l.innerHTML=Dt("download"),(u=document.createElement("div")).className="user_file_"+$.userId+" "+C.randid,/\.(bmp|gif|ico|cur|jpg|jpeg|jfif|png|webp)$/i.test(C.filename)&&((c=document.createElement("div")).className="_steamlive_chat_img_wrapper",c.setAttribute("img-loading","true"),(d=document.createElement("div")).className="_steamlive_chat_img_loading",(p=document.createElement("span")).className="_steamlive_chat_img_loading_text",p.innerHTML=Dt("loadingImage"),(h=document.createElement("img")).className="_steamlive_chat_img",d.appendChild(p),c.appendChild(d),c.appendChild(h),v.appendChild(c),Lt($.userId,C.randid,v)),v.appendChild(r),v.appendChild(l)):((v=document.createElement("div")).className="_steamlive_chat_attachment_container",/image.*/.test(P.type)?((h=document.createElement("img")).className="_steamlive_chat_img",(m=new FileReader).onload=function(){n.querySelector("._steamlive_chat_img").setAttribute("src",m.result)},m.readAsDataURL(P),n.className="_steamlive_chat_divMsgWrapper _steamlive_chat_transparent_background",v.appendChild(h)):v.appendChild(document.createTextNode(C.filename.replace(/"/g,""))),(u=document.createElement("div")).className="user_file_"+$.userId+" "+C.randid,document.createElement("div").innerHTML=Dt("done")+" !"),v.appendChild(u),g=v),e.uId===$.userId){n.appendChild(g);var y=document.createElement("div");y.className="_steamlive_chat_timestampR",y.innerHTML="
"+t.toLocaleTimeString()+"
",n.innerHTML=wt(n.innerHTML.replace(/\r?\n/g,"
"),"#"+$.cqd.chatSenderTextColor),f.push(n),f.push(y),a.className="_steamlive_chat_message r",i.className=i.className+" _steamlive_chat_avatar r",n.style.backgroundColor="#"+$.cqd.chatSenderbackgroundColor,n.style.color="#"+$.cqd.chatSenderTextColor,n.style.borderColor="#"+$.cqd.chatSenderborderColor}else{void 0!==M[e.uId]?((v=document.createElement("div")).className="_steamlive_chat_msg_username",v.innerHTML=M[e.uId].alias,(y=document.createElement("div")).className="_steamlive_chat_timestampL",y.innerHTML="
"+t.toLocaleTimeString()+"
",n.appendChild(v),n.appendChild(g),e.m.indexOf("{file}")<0&&(n.innerHTML=wt(n.innerHTML.replace(/\r?\n/g,"
"),"#"+$.cqd.chatReceiverTextColor)),f.push(n),f.push(y),_t(M[e.uId],!1)):(void 0!==e.userName?n.innerHTML=e.userName+": ":n.innerHTML="Support: ",n.appendChild(g),e.m.indexOf("{file}")<0&&(n.innerHTML=wt(n.innerHTML.replace(/\r?\n/g,"
"),"#"+$.cqd.chatReceiverTextColor)),f.push(n)),a.className="_steamlive_chat_message l",i.className=i.className+" _steamlive_chat_avatar l",n.style.backgroundColor="#"+$.cqd.chatReceiverbackgroundColor,n.style.color="#"+$.cqd.chatReceiverTextColor,n.style.borderColor="#"+$.cqd.chatReceiverborderColor;try{U.roomMessage&&(U.roomMessage.currentTime=0),U.roomMessage.play()}catch(e){console.log(e)}}a.style.fontSize=$.cqd.chatFontSize,a.onmouseover=xt,a.onmouseleave=Et,a.onclick=Bt;for(var _=0;_",o.style.color="#"+$.cqd.chatReceiverTextColor,o.style.borderColor="#"+$.cqd.chatReceiverTextColor,x.log.appendChild(o)),x.log.contains(x.youWillBeHelpedByDOM)&&x.log.removeChild(x.youWillBeHelpedByDOM),x.log.appendChild(s),x.log.scrollTop=x.log.scrollHeight,0<=e.m.indexOf("{file}"))for(var C=JSON.parse(e.m.replace("{file}","")),_=0;_"+Dt("done")+"!":(a=document.createElement("div"),n=document.createElement("div"),a.className="_steamlive_chat_attachment_progress_bar",n.className="_steamlive_chat_attachment_progress_bar_value",n.style.width=i/s*100+"%",n.style.backgroundColor="#"+$.cqd.color1,a.appendChild(n),x.log.getElementsByClassName(o)[t].innerHTML=a.outerHTML)}}),r.onload=function(e){var t,a,n,i=r.response;void 0!==window.navigator.msSaveBlob?window.navigator.msSaveBlob(i,s):(t=window.URL||window.webkitURL,a=t.createObjectURL(i),!s||void 0===(n=document.createElement("a")).download?window.location=a:(n.href=a,n.download=s,document.body.appendChild(n),n.click()),setTimeout(function(){t.revokeObjectURL(a)},100))},r.send()},Lt=function(e,t,n){var i=new XMLHttpRequest;i.open("GET",E+"/previewImg?file="+e+"/"+t,!0),i.responseType="blob",i.onload=function(e){var t=i.response,a=(window.URL||window.webkitURL).createObjectURL(t),t=n.querySelector("._steamlive_chat_img_wrapper");t.querySelector("._steamlive_chat_img").src=a,t.setAttribute("img-loading","false")},i.send()},St=function(){_=0,clearInterval(C),V("unreadMessages",0)},It=function(e){_+=e,null!==C&&clearInterval(C),C=setInterval(At,500),V("unreadMessages",_)},At=function(){},Nt=function(e){var t=document.createElement("div");t.innerHTML=e+"
",t.className="_steamlive_chat_log_debug",x.log.scrollTop=x.log.scrollHeight},Ht=function(e){var t=["en","nl","fr","de","es"];return k=null,"-1"!=e&&""!==e&&null!=e&&-1Thank you",optional:"optional",rateCommentInputPlaceholder:"Type Your Comment Here...",hoursTime:"hours",minutesTime:"minutes",banMessage:"You were banned from this chat.",done:"Done",uploadFailed:"Upload failed",uploadCanceled:"Upload canceled",noneAllowedExtension:"Unallowed extension",fileTooBig:"File exceeds size limit",loadingImage:"Loading image",download:"Download",startChatHint:"The team typically answers in few minutes",contactInformation:"Contact information",openingHours:"Opening hours",sessionMessage:"Continue current session or start a new one?",currentSession:"Reopen previous session",newSession:"Open a new session",transferredChat:"Transferred chat",fillSurvey:"Fill Survey",surveyFilled:"Survey filled",surveyTitle:"Your opinion matters",surveyMsg:"Please fill this survey",yes:"Yes",no:"No",closeChatConfirmation:"This action will end this chat session",areYouSure:"Are you sure ?",sendEmailTranscript:"Send Email transcript",emailLabel:"Email*",send:"Send",invalidEmail:"Invalid email address",errorEmailNotSent:"Your email could not be sent",resumeChat:"Resume chat",endChatSession:"End chat session",questionRateChat:"Would you like to rate this chat?",minimiseChat:"Minimise chat",closeToday:"Today, we are closed",helpedBy:"You will be helped by",noAgentAvailable:"No agent available now",newSessionMessage:"Open new chat session",previousSessionMessage:"Open the previous chat session"},nl:{msgPlaceholder:"Typ uw bericht en druk op enter",msgSentAt:"Verzonden op",leaveChat:"Chat stoppen",startChat:"Chat starten",clickStartChat:"Klik hier om te beginnen met chatten!",yourName:"Uw naam",yourEmail:"Uw e-mail adres",chatLeft:"De chat sessie is afgerond.",editDetails:" Bewerk gegevens ",joinLeaveYou:"Je hebt ",joinLeaveOther:" heeft ",joinedText:" de chat geopened...",leaveText:" de chat verlaten... ",close:"sluiten",days:["Maandag","Dinsdag","Woensdag","Donderdag","Vrijdag","Zaterdag","Zondag"],closed:"gesloten",isTyping:"is aan het typen",startChatImage:"/startchat_nl.png",showAll:"Toon alles",informationSent:"Uw informatie is verstuurd!",callMeBack:"Bel me terug",callBackDate:"Terugbel datum",fillCallBackInformation:"Vul Terugbellen informatie",save:"Opslaan",cancel:"Cancel",reopenChat:"Chat heropenen",chatSessionEnded:"De chat sessie is beëindigd",rateMessage:"Hoe zou je deze chat waarderen?",commentMessage:"Laat een reactie achter",sendFeedBack:"Stuur feedback",emailTranscript:"Email transcript",noThanks:"Nee, bedankt",ratingSent:"Uw beoordeling is verzonden!
Dank u wel!",optional:"optioneel",rateCommentInputPlaceholder:"Begin met typen...",hoursTime:"uren",banMessage:"Je bent uit deze chat verbannen.",done:"Klaar",uploadFailed:"Upload mislukt",uploadCanceled:"Upload geannuleerd",noneAllowedExtension:"Geen toegestaan extensie",fileTooBig:"Bestand overschrijdt de maximale grootte",loadingImage:"Afbeelding laden",download:"Download",minutesTime:"minuten",startChatHint:"Het team antwoord normaal binnen een paar minuten",contactInformation:"Contactgegevens",openingHours:"openingstijden",sessionMessage:"Doorgaan met huidige sessie of nieuwe starten?",currentSession:"Huidige sessie",newSession:"Nieuwe sessie",transferredChat:"Doorverbonden chat",fillSurvey:"Enquête invullen",surveyFilled:"enquête ingevuld",surveyTitle:"Jouw mening telt",surveyMsg:"Vul deze enquête in",yes:"Ja",no:"Nee",closeChatConfirmation:"Deze actie beëindigt deze chatsessie",areYouSure:"Weet je het zeker ?",sendEmailTranscript:"Stuur e-mailtranscript",emailLabel:"E-mail*",send:"Versturen",invalidEmail:"Ongeldig e-mailadres",errorEmailNotSent:"Uw e-mail kon niet worden verzonden",resumeChat:"Chat hervatten",endChatSession:"Chatsessie beëindigen",questionRateChat:"Wil je deze chat beoordelen?",minimiseChat:"Chat minimaliseren",closeToday:"Vandaag zijn wij gesloten",helpedBy:"U wordt geholpen door",noAgentAvailable:"Geen agent beschikbaar nu",newSessionMessage:"Open een nieuwe chatsessie",previousSessionMessage:"Open de vorige chatsessie"},fr:{msgPlaceholder:"Veuillez saisir votre message puis appuyez sur ENTRER",msgSentAt:"Envoyé le",leaveChat:"Terminer",startChat:"Démarrer le chat",clickStartChat:"Cliquez ici pour commencer votre chat!",yourName:"Votre nom",yourEmail:"Votre adresse email",chatLeft:"La session de chat est terminée.",editDetails:"Modifier mes infos",joinLeaveYou:"Vous avez ",joinLeaveOther:" a ",joinedText:" rejoint le chat...",leaveText:" quitté le chat... ",close:"fermer",days:["Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi","Dimanche"],closed:"Fermé",isTyping:"est en train d'écrire",startChatImage:"/startchat.png",showAll:"Montrer tout",informationSent:"Vos informations ont été envoyées!",callMeBack:"Rappellez moi",callBackDate:"Date de rappel",fillCallBackInformation:"Remplir les informations de rappel",save:"Enregistrer",cancel:"Annuler",reopenChat:"Réouvrir le chat",chatSessionEnded:"La session est terminée",rateMessage:"Comment voudriez-vous évaluer ce chat?",commentMessage:"laisser un commentaire",sendFeedBack:"Évaluer",emailTranscript:"Envoyer la transcription",noThanks:"Non, merci",ratingSent:"Votre évaluation a été envoyée!!
Merci",optional:"optionnel",rateCommentInputPlaceholder:"Saisissez votre commentaire ici...",hoursTime:"heurs",banMessage:"Vous avez été banni de ce chat.",done:"Terminé",uploadFailed:"Échec du téléchargement",uploadCanceled:"Téléchargement annulé",noneAllowedExtension:"Extension non autorisée",fileTooBig:"Le fichier dépasse la taille limite",loadingImage:"chargement de l'image",download:"Télécharger",minutesTime:"minutes",startChatHint:"L'équipe réponds typiquement en quelques minutes",contactInformation:"Informations de contact",openingHours:"Horaires d'ouvertures",sessionMessage:"Continuer la session actuelle ou commencer une nouvelle session?",currentSession:"Session actuelle",newSession:"Nouvelle session",transferredChat:"Chat transférée",fillSurvey:"Remplir le sondage",surveyFilled:"Sondage rempli",surveyTitle:"Votre avis compte",surveyMsg:"Merci de remplir ce sondage",yes:"Oui",no:"Non",closeChatConfirmation:"Cette action mettra fin à cette session de chat",areYouSure:"Êtes-vous sûr ?",sendEmailTranscript:"Envoyer la transcription par e-mail",emailLabel:"Email*",send:"Envoyer",invalidEmail:"Adresse e-mail invalide",errorEmailNotSent:"Votre email n'a pas pu être envoyé",resumeChat:"Reprendre le chat",endChatSession:"Terminer la session de chat",questionRateChat:"Souhaitez-vous évaluer ce chat ?",minimiseChat:"Réduire le chat",closeToday:"Aujourd'hui, nous sommes fermés",helpedBy:"Vous serez aidé par",noAgentAvailable:"Aucun agent disponible actuellement",newSessionMessage:"Ouvrir une nouvelle session de chat",previousSessionMessage:"Ouvrir la session de chat précédente"},de:{msgPlaceholder:"Geben Sie Ihre Nachricht und drücken Sie Enter",msgSentAt:"Gesendet am",leaveChat:"Chat abschlieβen",startChat:"Chat starten",clickStartChat:"Klicken Sie hier, um Ihren Chat zu starten!",yourName:"Ihre Name",yourEmail:"Ihre E-Mail-Adresse",chatLeft:"Die Chat-Sitzung wurde abgeschlossen.",editDetails:" Daten bearbeiten",joinLeaveYou:"Du hast",joinLeaveOther:" hat ",joinedText:"diesen Chat geöffnet…",leaveText:"diesen Chat schlieβen…",close:"schließen",days:["Montag","Dienstag","Mittwoch","Donnestag","Freitag","Samstag","Sonntag"],closed:"geschlossen",isTyping:"macht Texteingabe",startChatImage:"/startchat.png",showAll:"Alles anzeigen",informationSent:"Ihre Information wurde gesendet!",callMeBack:"Rufen Sie mich zurück",callBackDate:"Rückrufdatum",fillCallBackInformation:"Rückrufinformation eingeben",save:"Speichern",cancel:"Abbrechen",reopenChat:"Chat erneut öffnen",chatSessionEnded:"Die Chat-Sitzung wurde beendet",rateMessage:"Wie würden Sie diesen Chat bewerten?",commentMessage:"Hinterlassen Sie einen Kommentar",sendFeedBack:"Feedback senden",emailTranscript:"E-Mail-Transkript",noThanks:"Nein danke",ratingSent:"Ihre Bewertung wurde eingesendet!
Vielen Dank!",optional:"optional",rateCommentInputPlaceholder:"Geben Sie hier Ihren Kommentar ein...",hoursTime:"Stunden",banMessage:"Sie sind von diesem Chat verboten.",done:"Fertig",uploadFailed:"Upload fehlgeschlagen",uploadCanceled:"Upload abgebrochen",noneAllowedExtension:"Nicht erlaubte Erweiterung",fileTooBig:"Datei überschreitet die maximale Größe",loadingImage:"Bild wird geladen",download:"Herunterladen",minutesTime:"Minuten",startChatHint:"Das Team antwortet normalerweise in wenigen Minuten",contactInformation:"Kontakt Informationen",openingHours:"Öffnungszeiten",sessionMessage:"Aktuelle Sitzung fortsetzen oder neue starten?",currentSession:"Aktuelle Sitzung",newSession:"Neue Sitzung",transferredChat:"übertragener Chat",fillSurvey:"Umfrage ausfüllen",surveyFilled:"Umfrage ausgefüllt",surveyTitle:"Deine Meinung zählt",surveyMsg:"Bitte füllen Sie diese Umfrage aus",yes:"Ja",no:"Nein",closeChatConfirmation:"Diese Aktion beendet diese Chatsitzung",areYouSure:"Bist du sicher ?",sendEmailTranscript:"E-Mail-Transkript senden",emailLabel:"Email*",send:"Senden",invalidEmail:"Ungültige E-Mail-Adresse",errorEmailNotSent:"Ihre E-Mail konnte nicht gesendet werden",resumeChat:"Setzen Sie den Chat fort",endChatSession:"Chatsitzung beenden",questionRateChat:"Möchten Sie diesen Chat bewerten?",minimiseChat:"Chat minimieren",closeToday:"Heute haben wir geschlossen",helpedBy:"Ihnen wird geholfen",noAgentAvailable:"Derzeit ist kein Agent verfügbar",newSessionMessage:"Öffne eine neue Chat-Sitzung",previousSessionMessage:"Öffne die vorherige Chat-Sitzung"},es:{msgPlaceholder:"Escriba su mensaje y presione enter",msgSentAt:"Enviado",leaveChat:"Detener chat",startChat:"Iniciar chat",clickStartChat:"¡Haga clic aquí para iniciar su chat!",yourName:"Su nombre",yourEmail:"Su dirección de correo electrónico",chatLeft:"La sesión de chat se ha completado",editDetails:"Editar datos",joinLeaveYou:"Tienes",joinLeaveOther:"tiene",joinedText:"abrió el chat...",leaveText:"dejó el chat...",close:"Cerrar",days:["Lunes","Martes","Miércoles","Jueves","Viernes","Sábado","Domingo"],closed:"cerrado",isTyping:"está escribiendo",startChatImage:"/startchat.png",showAll:"Mostrar todo / toda",informationSent:"Su información ha sido enviada!",callMeBack:"Llámame",callBackDate:"Fecha de devolución de llamada",fillCallBackInformation:"Ingrese la información de devolución de llamada",save:"Guardar",cancel:"Cancelar",reopenChat:"Reabrir chat",chatSessionEnded:"La sesión de chat ha terminado",rateMessage:"¿Cómo evaluaria este chat?",commentMessage:"Deje un comentario",sendFeedBack:"Enviar comentarios",emailTranscript:"Transcripción del correo electrónico",noThanks:"No gracias",ratingSent:"¡Su comentario ha sido enviado!
¡Gracias!",optional:"opcional",rateCommentInputPlaceholder:"Escribe tu comentario aquí...",hoursTime:"horas",banMessage:"Ha sido excluido de este chat",done:"Listo",uploadFailed:"Carga fallida",uploadCanceled:"Carga cancelada",noneAllowedExtension:"No se permite la extensión",fileTooBig:"El archivo excede la capacidad maxima",loadingImage:"Cargando imagen",download:"Descargar",minutesTime:"minutos",startChatHint:"El equipo suele responder en pocos minutos.",contactInformation:"Información del contacto",openingHours:"horario de apertura",sessionMessage:"¿Continuar la sesión actual o iniciar una nueva?",currentSession:"Sesión actual",newSession:"Nueva sesión",transferredChat:"Chat transferido",fillSurvey:"Rellenar encuesta",surveyFilled:"Encuesta llena",surveyTitle:"Tu opinion importa",surveyMsg:"Por favor complete esta encuesta",yes:"Sí",no:"No",closeChatConfirmation:"Esta acción finalizará esta sesión de chat.",areYouSure:"¿Estas seguro?",sendEmailTranscript:"Enviar transcripción de correo electrónico",emailLabel:"Correo electrónico*",send:"Enviar",invalidEmail:"Dirección de correo electrónico no válida",errorEmailNotSent:"Su correo electrónico no pudo ser enviado",resumeChat:"Reanudar chat",endChatSession:"Finalizar sesión de chat",questionRateChat:"¿Te gustaría calificar este chat?",minimiseChat:"Minimizar chat",closeToday:"Hoy estamos cerrados",helpedBy:"Serás ayudado por",noAgentAvailable:"Ningún agente disponible ahora",newSessionMessage:"Abrir una nueva sesión de chat",previousSessionMessage:"Abrir la sesión de chat anterior"}},Rt=function(){for(var e={},t=x.startMessage.getElementsByTagName("input"),a=0;a()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)},jt=function(){for(var e=x.startMessage.getElementsByTagName("input"),t=0;t"+Dt("transferredChat")+"",V("transferTime",Tt),x.log.appendChild(x.transferMsg)):he(v.WAITING_FOR_AGENT)),e.uId===$.userId&&he(v.QUIT),x.log.contains(x.youWillBeHelpedByDOM)&&x.log.removeChild(x.youWillBeHelpedByDOM))}),w.on("msg",function(e){null!=M.steamBot&&null!=M.steamBot.messageDelay&&(G=Number(M.steamBot.messageDelay)),"steamBot"==e.uId?(_t(M.steamBot,!0),setTimeout(function(){try{z&&highLightFlowChart(e)}catch(e){console.log(e)}kt(e)},G)):kt(e)}),w.on("msgHist",function(e){be(e.arrMsg)}),w.on("banned",function(e){void 0!==$.cqd.banSession&&1==$.cqd.banSession&&(V("_sc_b","1"),Na(f.BANNED_SESSION))}),w.on("markAsRead",function(e){if(1==e.byUser)for(var t=x.log.getElementsByClassName("_steamlive_chat_msg_readStatus"),a=0;a"+$.cqd.outsideWorkingHoursText+"
"+Dt("openingHours")+"
("+$.cqd.chatTimezone+")",x.openingHours.appendChild(t),x.openingHours.appendChild(x.btnCloseOpeningHours),$.cqd.isInOpeningHour?Ce(!1):(Ce(!0),x.statusButtons.btnJoinLeave.style.display="none",x.iconCloseChat.style.display="none",x.statusButtons.btnEditDetails.style.display="none",Be||(x.msg.style.display="none"),x.waitingForSupport.style.display="none",x.nobodyAvailable.style.display="none")):Ce(!1)}var $t=function(e,t){e.stopPropagation();e=x.msgInput.selectionStart;x.msgInput.value=x.msgInput.value.slice(0,e)+t.innerHTML+x.msgInput.value.slice(e),x.msgInput.selectionStart=e+t.innerHTML.length,x.msgInput.scrollHeight>x.msgInput.offsetHeight&&x.msgInput.offsetHeight<48&&(x.msgInput.style.height=x.msgInput.scrollHeight+"px")},Kt=function(){x.emojisPopup.innerHTML="",x.emojisPopupBody=document.createElement("div"),x.emojisPopupBody.className="_steamlive_chat_emojis_body",x.emojisArrow=document.createElement("div"),x.emojisArrow.className="_steamlive_chat_emojis_arrow",x.emojisPopupBody.appendChild(x.emojisContainer),x.emojisPopup.appendChild(x.emojisPopupBody),x.emojisPopup.appendChild(x.emojisArrow),x.emojisPopup.onclick=function(){x.emojisPopup.style.display="none"},x.emojisPopup.style.display="flex",("none"!=x.trRating.style.display?x.tdRating:x.tdLog).appendChild(x.emojisPopup)},Qt=function(e){var t,a,n,i,s;e&&/Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)&&T?(bt(!0),t=(n=x.chatContainer.children)[0],i=n[2],n[3],a=n[4],window.getComputedStyle(x.main.getElementsByClassName("_steamlive_chat_title_div")[0]),a.getElementsByClassName("_steamlive_chat_btn_1")[0],s=x.startMessage.getElementsByClassName("startChatMessage")[0],x.main.getElementsByClassName("formContainer")[0],n=x.main.getElementsByClassName("_steamlive_chat_logdiv")[0],i.getElementsByClassName("_steamlive_chat_log")[0],i=Ct(t,"height")+Ct(a,"height")+Ct(s,"height")+Ct(s,"margin-top"),s=Ct(a,"height"),formContainerHeight=p-i-s,n.style.width="100%",ye(),Ct(a,"height"),Ct(t,"height"),Ct(x.msgInput,"height"),Ct(x.msgInput,"margin-top"),Ct(x.chatLeft,"height"),x.chatLeft.style.display,/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?(x.btnCloseOpeningHours.style.width="94%",x.btnCloseOpeningHours.style.bottom="0px",x.btnCloseOpeningHours.style.height="30px"):(x.btnCloseOpeningHours.style.top=(p+Ct(x.openingHours,"height"))/2+"px",x.btnCloseOpeningHours.style.height="30px",x.btnCloseOpeningHours.style.width="88%",x.btnCloseOpeningHours.style.marginTop="0px",x.btnCloseOpeningHours.style.marginRight="9px")):e&&/Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)&&!T&&bt(!1),e&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)&&(x.iconWideChat.className="hidden",x.frame.style.webkitOverflowScrolling="touch",null==document.querySelector('meta[name="viewport"]')&&((e=document.createElement("meta")).name="viewport",e.content="width=device-width, initial-scale=1.0, user-scalable=0 , maximum-scale=1.0",document.getElementsByTagName("head")[0].appendChild(e),document.getElementsByTagName("body")[0].style.margin="0px"),/iPhone|iPad|iPod/i.test(navigator.userAgent)&&(document.querySelector('meta[name="viewport"]').content="width=device-width, initial-scale=1.0, user-scalable=0 , maximum-scale=1.0"))},ea=function(){var e=document.createElement("div"),t=document.createElement("div"),a=document.createElement("h4"),n=document.createElement("div"),i=document.createElement("label"),s=document.createElement("input"),o=document.createElement("div"),r=document.createElement("button"),l=document.createElement("button");return e.classList.add("_steamlive_email-transcript-wrapper","_steamlive_email-transcript-wrapper--hide"),t.classList.add("_steamlive_email-transcript-modal"),a.classList.add("_steamlive_email-transcript-header"),n.classList.add("_steamlive_email-transcript-input-wrapper"),i.classList.add("_steamlive_email-transcript-label"),s.classList.add("_steamlive_email-transcript-input"),o.classList.add("_steamlive_email-transcript-input-error"),r.classList.add("_steamlive_email-transcript-send-btn"),l.classList.add("_steamlive_email-transcript-cancel-btn"),a.textContent=Dt("sendEmailTranscript"),i.textContent=Dt("emailLabel"),r.textContent=Dt("send"),o.textContent=Dt("invalidEmail"),l.innerHTML='',n.appendChild(i),n.appendChild(s),n.appendChild(o),t.appendChild(a),t.appendChild(l),t.appendChild(n),t.appendChild(r),e.appendChild(t),s.addEventListener("input",ta),s.addEventListener("blur",ta),r.addEventListener("click",ie),l.addEventListener("click",aa),x.emailTranscriptInputWrapper=n,x.emailTranscriptInput=s,x.emailTranscriptHeader=a,x.emailTranscriptLabel=i,x.emailTranscriptSendBtn=r,x.emailTranscriptInputError=o,e},ta=function(e){var t=x.emailTranscriptInput.value;"blur"==e.type||"input"==e.type&&1==x.emailTranscriptInputWrapper.touched?(x.emailTranscriptInputWrapper.touched=!0,void 0!==t&&null!=t&&""!=t&&Pt(t.trim())?x.emailTranscriptInputWrapper.classList.remove("_steamlive_email-transcript-input-wrapper--error"):x.emailTranscriptInputWrapper.classList.add("_steamlive_email-transcript-input-wrapper--error")):"input"==e.type&&Pt(t.trim())&&x.emailTranscriptInputWrapper.classList.remove("_steamlive_email-transcript-input-wrapper--error")},aa=function(){x.emailTranscriptInputWrapper.touched=!1,x.emailTranscriptInputWrapper.classList.remove("_steamlive_email-transcript-input-wrapper--error"),x.emailTranscriptDOM.classList.add("_steamlive_email-transcript-wrapper--hide")},na=function(){var e=document.createElement("div"),t=document.createElement("div"),a=document.createElement("div"),n=document.createElement("img"),i=document.createElement("div"),s=document.createElement("div"),o=document.createElement("button"),r=document.createElement("button"),l=document.createElement("button");return e.classList.add("_steamlive_email-transcript-alert","_steamlive_email-transcript-alert--hide"),t.classList.add("_steamlive_email-transcript-alert-wrapper"),a.classList.add("_steamlive_email-transcript-alert-img-wrapper"),n.classList.add("_steamlive_email-transcript-alert-img"),i.classList.add("_steamlive_email-transcript-alert-text"),s.classList.add("_steamlive_email-transcript-error-heading"),o.classList.add("_steamlive_email-transcript-resume-chat"),r.classList.add("_steamlive_email-transcript-end-chat"),l.classList.add("_steamlive_email-transcript-cancel-btn"),s.textContent=Dt("errorEmailNotSent"),o.textContent=Dt("resumeChat"),r.textContent=Dt("endChatSession"),o.addEventListener("click",function(){de(Ze,!1),ia()}),r.addEventListener("click",function(){Xe(),Na(f.CHAT_RATING)}),l.innerHTML='',l.addEventListener("click",ia),a.appendChild(n),a.appendChild(s),a.appendChild(i),t.appendChild(l),t.appendChild(a),t.appendChild(o),t.appendChild(r),e.appendChild(t),x.emailTranscriptAlertImg=n,x.emailTranscriptAlertText=i,x.emailTranscriptErrorHeading=s,x.emailTranscriptResumeChat=o,x.emailTranscriptEndChat=r,e},ia=function(){x.emailTranscriptAlertImg.src="",x.emailTranscriptAlertText.textContent="",x.emailTranscriptAlertDOM.classList.add("_steamlive_email-transcript-alert--hide"),x.emailTranscriptAlertDOM.classList.remove("_steamlive_email-transcript-alert-success","_steamlive_email-transcript-error")},sa=function(){var e=document.createElement("div"),t=document.createElement("div"),a=document.createElement("div"),n=document.createElement("h4"),i=document.createElement("div"),s=document.createElement("label"),o=document.createElement("div"),r=document.createElement("label"),l=document.createElement("textarea"),c=document.createElement("div"),d=document.createElement("button"),p=document.createElement("button"),h=document.createElement("button"),m=document.createElement("div"),u=document.createElement("h4"),g=document.createElement("div"),v=document.createElement("button");return e.classList.add("_steamlive_chat-rating","_steamlive_chat-rating--hide"),t.classList.add("_steamlive_chat-rating-modal"),a.classList.add("_steamlive_chat-rating-wrapper","_steamlive_chat-rating-wrapper--hide"),n.classList.add("_steamlive_chat-rating-header"),i.classList.add("_steamlive_chat-rating-rate-wrapper"),s.classList.add("_steamlive_chat-rating-rate-label"),o.classList.add("_steamlive_chat-rating-comment-wrapper"),r.classList.add("_steamlive_chat-rating-comment-label"),l.classList.add("_steamlive_chat-rating-comment-textarea"),c.classList.add("_steamlive_chat-rating-footer-btn-wrapper"),d.classList.add("_steamlive_chat-rating-submit-btn"),p.classList.add("_steamlive_chat-rating-cancel-btn"),h.classList.add("_steamlive_chat-rating-cancel-icon-btn"),m.classList.add("_steamlive_chat-rating-survey-wrapper","_steamlive_chat-rating-survey-wrapper--hide"),u.classList.add("_steamlive_chat-rating-survey-title"),g.classList.add("_steamlive_chat-rating-survey-text"),v.classList.add("_steamlive_chat-rating-survey-btn"),n.textContent=Dt("chatSessionEnded"),s.textContent=Dt("questionRateChat"),r.textContent=Dt("commentMessage"),d.textContent=Dt("sendFeedBack"),p.textContent=Dt("noThanks"),u.innerHTML=Dt("surveyTitle"),g.innerHTML=Dt("surveyMsg"),v.innerHTML=Dt("fillSurvey"),h.innerHTML='',i.appendChild(s),o.appendChild(r),o.appendChild(l),c.appendChild(d),c.appendChild(p),a.appendChild(h),a.appendChild(n),a.appendChild(i),a.appendChild(o),a.appendChild(c),m.appendChild(u),m.appendChild(g),m.appendChild(v),t.appendChild(a),t.appendChild(m),e.appendChild(t),d.addEventListener("click",function(e){e.stopPropagation(),ma()}),p.addEventListener("click",function(e){e.stopPropagation(),dt()}),h.addEventListener("click",oa),v.addEventListener("click",te),x.chatRatingWrapper=a,x.chatRatingSurveyWrapper=m,x.chatRatingRateLabel=s,x.chatRatingRateWrapper=i,x.chatRatingCommentTextarea=l,x.chatRatingSurveyBtn=v,x.chatRatingHeader=n,x.chatRatingCommentLabel=r,x.chatRatingSubmitBtn=d,x.chatRatingCancelBtn=p,x.chatRatingSurveyTitle=u,x.chatRatingSurveyText=g,e},oa=function(){x.chatRatingDOM.classList.add("_steamlive_chat-rating--hide")},ra=function(){switch(x.chatRatingRateWrapper.innerHTML="",x.chatRatingRateWrapper.appendChild(x.chatRatingRateLabel),$.cqd.ratingType){case 0:case"0":var e=document.createElement("div"),t=document.createElement("button"),a=document.createElement("button");e.classList.add("_steamlive_chat-rating-rate-btn-wrapper"),t.classList.add("_steamlive_chat-rating-rate-like"),a.classList.add("_steamlive_chat-rating-rate-dislike"),t.innerHTML='',a.innerHTML='',t.setAttribute("data-is-active",0),a.setAttribute("data-is-active",0),t.addEventListener("click",la),a.addEventListener("click",ca),e.appendChild(t),e.appendChild(a),x.chatRatingRateWrapper.appendChild(e),x.chatRatingRateLike=t,x.chatRatingRateDislike=a;break;case 1:case"1":var n=document.createElement("div");n.classList.add("_steamlive_chat-rating-stars-wrapper");for(let e=1;e<=5;e++){var i=document.createElement("button");i.id="_steamlive_chat_rate-star-"+e,i.setAttribute("data-index",e),i.setAttribute("data-is-active",1),i.classList.add("_steamlive_chat-rating-star-btn","_steamlive_chat-rating-star-btn--active"),i.addEventListener("click",da),i.addEventListener("mouseenter",pa),i.addEventListener("mouseleave",ha),i.innerHTML='',n.appendChild(i)}x.chatRatingRateWrapper.appendChild(n)}},la=function(){x.chatRatingRateLike.innerHTML='',x.chatRatingRateDislike.innerHTML='',x.chatRatingRateLike.setAttribute("data-is-active",1),x.chatRatingRateDislike.setAttribute("data-is-active",0),V("rateLike",1)},ca=function(){x.chatRatingRateLike.innerHTML='',x.chatRatingRateDislike.innerHTML='',x.chatRatingRateLike.setAttribute("data-is-active",0),x.chatRatingRateDislike.setAttribute("data-is-active",1),V("rateLike",0)},da=function(e){for(var t,e=e.currentTarget,a=parseInt(e.dataset.index),n=1;n<=a;n++)(t=x.frame.contentDocument.getElementById("_steamlive_chat_rate-star-"+n)).setAttribute("data-is-active",1),t.classList.add("_steamlive_chat-rating-star-btn--active");for(;n<=5;n++)(t=x.frame.contentDocument.getElementById("_steamlive_chat_rate-star-"+n)).setAttribute("data-is-active",0),t.classList.remove("_steamlive_chat-rating-star-btn--active");V("rateStars",a)},pa=function(e){for(var e=e.currentTarget,t=parseInt(e.dataset.index),a=1;a<=t;a++)x.frame.contentDocument.getElementById("_steamlive_chat_rate-star-"+a).classList.add("_steamlive_chat-rating-star-btn--active")},ha=function(){for(var e=1;e<=5;e++){var t=x.frame.contentDocument.getElementById("_steamlive_chat_rate-star-"+e);"0"==t.dataset.isActive&&t.classList.remove("_steamlive_chat-rating-star-btn--active")}},ma=function(){var e=-2;switch($.cqd.ratingType){case 0:case"0":var t=J("rateLike");0==t&&(e=-1),1==t&&(e=1);break;case 1:case"1":t=parseInt(J("rateStars"));isNaN(t)||(e=10*t)}var a=new XMLHttpRequest,n=(n="campagnePID="+$.cqd.campagnePID+"&projectPID="+$.cqd.projectPID+"&callcenterPID="+$.cqd.callcenterPID)+"&comment="+x.chatRatingCommentTextarea.value.replace(/#/g," ")+"&rating="+e+"&rId="+$.userId+"&steamliveChatAction=sendFeedBack";a.onload=function(){200===a.status&&console.log(a.responseText)},a.open("GET",E+"/s/sendFeedBack?"+n,!0),a.setRequestHeader("Content-Type","application/json"),a.send(),Na(f.CHAT_RATE_SENT),oa()},ua=function(){var e=document.createElement("div"),t=document.createElement("div"),a=document.createElement("button"),n=document.createElement("img"),i=document.createElement("button");return e.classList.add("_steamlive_chat_rate-sent","_steamlive_chat_rate-sent--hide"),t.classList.add("_steamlive_chat_rate-sent-modal"),a.classList.add("_steamlive_chat_rate-sent-cancel-btn"),n.classList.add("_steamlive_chat_rate-sent-icon"),i.classList.add("_steamlive_chat_rate-sent-chat-again-btn"),i.textContent=Dt("minimiseChat"),i.addEventListener("click",function(e){e.stopPropagation(),dt()}),a.innerHTML='',a.addEventListener("click",ga),t.appendChild(a),t.appendChild(n),t.appendChild(i),e.appendChild(t),x.chatRateSentIcon=n,x.chatRateCloseChatBtn=i,e},ga=function(){x.chatRateSentIcon.src="",x.chatRateSentDOM.classList.add("_steamlive_chat_rate-sent--hide")},va=function(){var e=document.createElement("div"),t=document.createElement("div"),a=document.createElement("button"),n=document.createElement("div"),i=document.createElement("button"),s=document.createElement("button");return e.classList.add("_steamlive_chat_reopen-chat-form","_steamlive_chat_reopen-chat-form--hide"),t.classList.add("_steamlive_chat_reopen-chat-form-modal"),a.classList.add("_steamlive_chat_reopen-chat-form-cancel-btn"),n.classList.add("_steamlive_chat_reopen-chat-form-label"),i.classList.add("_steamlive_chat_reopen-chat-form-current-btn"),s.classList.add("_steamlive_chat_reopen-chat-form-new-btn"),n.textContent=Dt("sessionMessage"),i.textContent=Dt("currentSession"),s.textContent=Dt("newSession"),a.innerHTML='',a.addEventListener("click",fa),i.addEventListener("click",function(){de(Ze,!1)}),s.addEventListener("click",function(){de(Ze,!0)}),t.appendChild(a),t.appendChild(n),e.appendChild(t),x.reopenChatFormModal=t,x.reopenChatFormLabel=n,x.reopenChatFormCurrentSessionBtn=i,x.reopenChatFormNewSessionBtn=s,e},fa=function(){x.reopenChatFormDOM.classList.add("_steamlive_chat_reopen-chat-form--hide")},ya=function(){var e=document.createElement("div"),t=document.createElement("div"),a=document.createElement("img"),n=document.createElement("div");return e.classList.add("_steamlive_chat_banned-session","_steamlive_chat_banned-session--hide"),t.classList.add("_steamlive_chat_banned-session-modal"),a.classList.add("_steamlive_chat_banned-session-icon"),n.classList.add("_steamlive_chat_banned-session-message"),t.appendChild(a),t.appendChild(n),e.appendChild(t),x.bannedSessionIcon=a,x.bannedSessionMessage=n,e},_a=function(){x.bannedSessionDOM.classList.add("_steamlive_chat_banned-session--hide"),x.bannedSessionIcon.src=""},Ca=function(){0!=z||!D&&1!=$.cqd.emailTranscript||x.chatToolbarButtons.classList.remove(m.TOOLBAR_BUTTONS_HIDE)},ba=function(){x.chatToolbarButtons.classList.remove(m.TOOLBAR_BUTTONS_EXPANDED),x.chatToolbarButtons.classList.add(m.TOOLBAR_BUTTONS_HIDE)},wa=function(){var e=document.createElement("div"),t=document.createElement("div"),a=document.createElement("div"),n=document.createElement("div");return e.classList.add("_steamlive_chat_closing-day","_steamlive_chat_closing-day--hide"),t.classList.add("_steamlive_chat_closing-day-modal"),a.classList.add("_steamlive_chat_closing-day-icon"),n.classList.add("_steamlive_chat_closing-day-message"),a.innerHTML='',t.appendChild(a),t.appendChild(n),e.appendChild(t),x.closingDayModal=t,x.closingDayMessage=n,e},Ta=function(){x.closingDayDOM.classList.add("_steamlive_chat_closing-day--hide")},ka=function(e){var t=document.createElement("div"),a=document.createElement("div"),n=document.createElement("div"),i=document.createElement("div"),s=document.createElement("div"),o=document.createElement("div");return t.classList.add("_steamlive_chat_youWillBeHelpedBy"),a.classList.add("_steamlive_chat_youWillBeHelpedByWrapper"),n.classList.add("_steamlive_chat_youWillBeHelpedByImg"),i.classList.add("_steamlive_chat_youWillBeHelpedByInfoWrapper"),s.classList.add("_steamlive_chat_youWillBeHelpedByLabel"),o.classList.add("_steamlive_chat_youWillBeHelpedByAgentName"),void 0!==$.cqd.helpedByText&&""!==$.cqd.helpedByText?s.textContent=$.cqd.helpedByText:s.textContent=Dt("helpedBy"),o.textContent=e.alias,1==$.cqd.chatAvatar&&(void 0!==e.avatar&&1==$.cqd.avatarType?n.style.backgroundImage="url("+e.avatar+")":void 0!==e.avatar&&void 0!==$.cqd.defaultAvatar&&""!=$.cqd.defaultAvatar?n.style.backgroundImage="url("+$.cqd.defaultAvatar+")":n.style.backgroundImage="url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72.38 72.45'%3E%3Cg %3E%3Cg %3E%3Cpath fill='%23"+$.cqd.color1+"' d='M36.18,72.45a36.23,36.23,0,1,1,36.2-36.11A36.29,36.29,0,0,1,36.18,72.45ZM62.07,59.21C72.67,48,75,27.5,61.93,13a34.59,34.59,0,0,0-51.25-.24c-13.19,14.32-11.23,35-.31,46.55a11.13,11.13,0,0,1,3.72-4.13,57.94,57.94,0,0,1,11.6-6.32,13.78,13.78,0,0,0,2.44-1.27,3,3,0,0,0,1.24-3.12,7.1,7.1,0,0,0-1.81-3.27c-4.35-5.66-6.46-12-5.21-19.13a12.88,12.88,0,0,1,7.87-10.2,15.75,15.75,0,0,1,8.42-1.05,12.6,12.6,0,0,1,8.7,4.77c3.19,4.13,3.66,8.9,2.88,13.84a23.9,23.9,0,0,1-4.95,11.18,13.43,13.43,0,0,0-2,3.6A3.07,3.07,0,0,0,44.67,48a13.38,13.38,0,0,0,2,1.1C49,50.11,51.25,51,53.45,52,56.89,53.71,60.19,55.62,62.07,59.21Z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E\")"),t.appendChild(a),a.appendChild(n),a.appendChild(i),i.appendChild(s),i.appendChild(o),t};function xa(){x.frame.style.display="none"}function Ea(){x.startChatDOM.classList.add("_steamlive_chat_start-chat--hide"),x.startChatIcon.src=""}function Ba(){T||(x.minimizeCloseBtnDOM.style.display="block")}function Ma(){x.minimizeCloseBtnDOM.style.display="none"}var La=0;function Sa(n){T||(h=!0,setTimeout(()=>{if(!T){x.triggerMessageText.textContent="",x.triggerMessageText.textContent=n.replace(/<\s/,"<"),x.triggerMessage.classList.add("_steamlive_chat-trigger-message-wrapper--fadein"),setTimeout(function(){T||(x.triggerMessage.classList.remove("_steamlive_chat-trigger-message-wrapper--hide"),x.triggerMessage.classList.remove("_steamlive_chat-trigger-message-wrapper--fadein"))},1e3),x.triggerMessageText.style.fontFamily="sans-serif";var e=125;switch($.cqd.widgetSize){case 1:case"1":e=120;break;case 3:case"3":e=130}x.frame.style.width="412px",x.frame.style.height=e+"px";var t=0;switch($.cqd.widgetSize){case 1:case"1":t=x.triggerMessage.offsetHeight;break;default:t=x.triggerMessage.offsetHeight+6}42{"surveySuccess"==e.data&&(x.chatRatingSurveyBtn.style.backgroundColor="green",x.chatRatingSurveyBtn.style.borderColor="green",x.chatRatingSurveyBtn.textContent=Dt("surveyFilled")+" ✔",V("SurveyFilled",1))},!1),1==J("SurveyFilled")&&(x.chatRatingSurveyBtn.style.backgroundColor="green",x.chatRatingSurveyBtn.style.borderColor="green",x.chatRatingSurveyBtn.textContent=Dt("surveyFilled")+" ✔")));break;case f.CHAT_RATE_SENT:x.chatRateSentIcon.src=E+"/success-check.gif",x.chatRateSentDOM.classList.remove("_steamlive_chat_rate-sent--hide"),x.chatRateCloseChatBtn.textContent=Dt("minimiseChat");break;case f.REOPEN_CHAT_FORM:!function(){switch(x.reopenChatFormDOM.classList.remove("_steamlive_chat_reopen-chat-form--hide"),x.reopenChatFormCurrentSessionBtn.textContent=Dt("currentSession"),x.reopenChatFormNewSessionBtn.textContent=Dt("newSession"),x.reopenChatFormModal.contains(x.reopenChatFormNewSessionBtn)&&x.reopenChatFormModal.removeChild(x.reopenChatFormNewSessionBtn),x.reopenChatFormModal.contains(x.reopenChatFormCurrentSessionBtn)&&x.reopenChatFormModal.removeChild(x.reopenChatFormCurrentSessionBtn),$.cqd.chatSessionPopup){case 1:case"1":x.reopenChatFormModal.appendChild(x.reopenChatFormNewSessionBtn),x.reopenChatFormLabel.textContent=Dt("newSessionMessage");break;case 2:case"2":x.reopenChatFormModal.appendChild(x.reopenChatFormCurrentSessionBtn),x.reopenChatFormLabel.textContent=Dt("previousSessionMessage");break;default:x.reopenChatFormLabel.textContent=Dt("sessionMessage"),x.reopenChatFormModal.appendChild(x.reopenChatFormNewSessionBtn),x.reopenChatFormModal.appendChild(x.reopenChatFormCurrentSessionBtn)}}();break;case f.BANNED_SESSION:void 0!==$.cqd.banSession&&1==$.cqd.banSession&&(x.bannedSessionDOM.classList.remove("_steamlive_chat_banned-session--hide"),x.bannedSessionIcon.src=E+"/banned-icon.gif",void 0!==$.cqd.banMessage&&""!=$.cqd.banMessage.trim()?x.bannedSessionMessage.textContent=$.cqd.banMessage:x.bannedSessionMessage.textContent=Dt("banMessage"));break;case f.CLOSING_DAY:null!=$.cqd.closingDaysText&&""!=$.cqd.closingDaysText?x.closingDayMessage.textContent=$.cqd.closingDaysText:x.closingDayMessage.textContent=Dt("closeToday"),x.closingDayModal.appendChild(x.btnCloseOpeningHours),x.closingDayDOM.classList.remove("_steamlive_chat_closing-day--hide");break;case f.NO_AGENT_AVAILABLE:x.noAgentAvailableDOM.classList.remove("_steamlive_chat_no-agent-available--hide"),x.noAgentAvailableIcon.src=E+"/no-agent-available.gif",void 0!==$.cqd.nobodyAvailableText&&""!=$.cqd.nobodyAvailableText.trim()?x.noAgentAvailableMessage.textContent=$.cqd.nobodyAvailableText:x.noAgentAvailableMessage.textContent=Dt("noAgentAvailable");break;case f.START_CHAT:x.startChatDOM.classList.remove("_steamlive_chat_start-chat--hide"),x.startChatIcon.src=E+"/start-chatting.gif",void 0!==$.cqd.msgStartChat&&""!=$.cqd.msgStartChat?x.startChatButton.textContent=$.cqd.msgStartChat:x.startChatButton.textContent=Dt("startChat");break;case f.EDIT_CONTACT_INFO:}var t,a};function Ha(){$e(),aa(),ia(),oa(),ga(),fa(),_a(),Ta(),x.noAgentAvailableDOM.classList.add("_steamlive_chat_no-agent-available--hide"),x.noAgentAvailableIcon.src="",Ea()}function Da(){var e;z?x.frame.style.display="":void 0!==$.cqd.active&&0!=$.cqd.active&&(x.frame.style.display="",void 0!==(e=$.cqd.chatVisibilityOnClose)&&($.cqd.isInOpeningHour&&!$.cqd.inClosingDay||0==e||!(1==e&&Gt()||2==e&&!Gt()||3==e)?x.frame.style.display="":xa()))}Ht(),u=parseInt(J("mode")||u,10),b=parseInt(J("tsWaitingForSupport"),10)||null,Ie(),function(){N=[128512,128513,128514,128515,128516,128517,128518,128519,128520,128521,128522,128523,128524,128525,128526,128527,128528,128529,128530,128531,128532,128533,128534,128535,128536,128537,128538,128539,128540,128541,128542,128543,128544,128545,128546,128547,128548,128549,128550,128551,128552,128553,128554,128555,128556,128557,128558,128559,128560,128561,128562,128563,128564,128565,128566,128567,128577,128578,128579,128580,129296,129297,129298,129299,129300,129301,129312,129313,129314,129315,129316,129317,129319,129320,129321,129322,129323,129324,129325,129326],x.emojisContainer=document.createElement("div"),x.emojisContainer.className="_steamlive_chat_emojisContainer";for(var e=0;e