window.zammadChatTemplates||(window.zammadChatTemplates={}),window.zammadChatTemplates.agent=function(t){functione(t){returnt&&t.ecoSafe?t:void0!==t&&null!=t?o(t):""}vars=[],n=(t=t||{}).safe,o=t.escape,o=(t.safe=function(t){if(t&&t.ecoSafe)returnt;void0!==t&&null!=t||(t="");t=newString(t);returnt.ecoSafe=!0,t},o||(t.escape=function(t){return(""+t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}));returnfunction(){!function(){this.agent.avatar&&(s.push('\n<img class="zammad-chat-agent-avatar" src="'),s.push(e(this.agent.avatar)),s.push('">\n')),s.push('\n<span class="zammad-chat-agent-sentence">\n <span class="zammad-chat-agent-name">'),s.push(e(this.agent.name)),s.push("</span>\n</span>")}.call(this)}.call(t),t.safe=n,t.escape=o,s.join("")};varbind=function(t,e){returnfunction(){returnt.apply(e,arguments)}},slice=[].slice,extend=function(t,e){for(varsine)hasProp.call(e,s)&&(t[s]=e[s]);functionn(){this.constructor=t}returnn.prototype=e.prototype,t.prototype=newn,t.__super__=e.prototype,t},hasProp={}.hasOwnProperty;!function(p,m){vare,s,n,t,o,i;functiona(t){this.options=p.extend({},this.defaults,t),this.log=news({debug:this.options.debug,logPrefix:this.options.logPrefix||this.logPrefix})}functionr(t){this.log=bind(this.log,this),this.error=bind(this.error,this),this.notice=bind(this.notice,this),this.debug=bind(this.debug,this),this.options=p.extend({},this.defaults,t)}functionl(t){this.stop=bind(this.stop,this),this.start=bind(this.start,this),l.__super__.constructor.call(this,t)}functiond(t){this.ping=bind(this.ping,this),this.send=bind(this.send,this),this.reconnect=bind(this.reconnect,this),this.close=bind(this.close,this),this.connect=bind(this.connect,this),this.set=bind(this.set,this),d.__super__.constructor.call(this,t)}functionc(t){returnthis.removeAttributes=bind(this.removeAttributes,this),this.startTimeoutObservers=bind(this.startTimeoutObservers,this),this.onCssLoaded=bind(this.onCssLoaded,this),this.setAgentOnlineState=bind(this.setAgentOnlineState,this),this.onConnectionEstablished=bind(this.onConnectionEstablished,this),this.setSessionId=bind(this.setSessionId,this),this.onConnectionReestablished=bind(this.onConnectionReestablished,this),this.reconnect=bind(this.reconnect,this),this.destroy=bind(this.destroy,this),this.onScrollHintClick=bind(this.onScrollHintClick,this),this.detectScrolledtoBottom=bind(this.detectScrolledtoBottom,this),this.onLeaveTemporary=bind(this.onLeaveTemporary,this),this.onAgentTypingEnd=bind(this.onAgentTypingEnd,this),this.onAgentTypingStart=bind(this.onAgentTypingStart,this),this.onQueue=bind(this.onQueue,this),this.onQueueScreen=bind(this.onQueueScreen,this),this.onWebSocketClose=bind(this.onWebSocketClose,this),this.onCloseAnimationEnd=bind(this.onCloseAnimationEnd,this),this.close=bind(this.close,this),this.toggle=bind(this.toggle,this),this.sessionClose=bind(this.sessionClose,this),this.onOpenAnimationEnd=bind(this.onOpenAnimationEnd,this),this.open=bind(this.open,this),this.renderMessage=bind(this.renderMessage,this),this.receiveMessage=bind(this.receiveMessage,this),this.onSubmit=bind(this.onSubmit,this),this.onFocus=bind(this.onFocus,this),this.onInput=bind(this.onInput,this),this.onReopenSession=bind(this.onReopenSession,this),this.onError=bind(this.onError,this),this.onWebSocketMessage=bind(this.onWebSocketMessage,this),this.send=bind(this.send,this),this.checkForEnter=bind(this.checkForEnter,this),this.render=bind(this.render,this),this.view=bind(this.view,this),this.T=bind(this.T,this),this.options=p.extend({},this.defaults,t),c.__super__.constructor.call(this,this.options),this.isFullscreen=m.matchMedia&&m.matchMedia("(max-width: 768px)").matches,this.scrollRoot=p(this.getScrollRoot()),p?m.WebSocket&&sessionStorage?this.options.chatId?(this.options.lang||(this.options.lang=p("html").attr("lang")),this.options.lang&&(this.translations[this.options.lang]||(this.log.debug("lang: No "+this.options.lang+" found, try first two letters"),this.options.lang=this.options.lang.replace(/-.+?$/,"")),this.log.debug(