1 line
85 KiB (Stored with Git LFS)
JavaScript
1 line
85 KiB (Stored with Git LFS)
JavaScript
window.zammadChatTemplates||(window.zammadChatTemplates={}),window.zammadChatTemplates.agent=function(e){e||(e={});var t=[],n=function(e){return e&&e.ecoSafe?e:void 0!==e&&null!=e?o(e):""},s=e.safe,o=e.escape;return e.safe=function(e){if(e&&e.ecoSafe)return e;void 0!==e&&null!=e||(e="");var t=new String(e);return t.ecoSafe=!0,t},o||(o=e.escape=function(e){return(""+e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}),function(){(function(){this.agent.avatar&&(t.push('\n<img class="zammad-chat-agent-avatar" src="'),t.push(n(this.agent.avatar)),t.push('">\n')),t.push('\n<span class="zammad-chat-agent-sentence">\n <span class="zammad-chat-agent-name">'),t.push(n(this.agent.name)),t.push("</span>\n</span>")}).call(this)}.call(e),e.safe=s,e.escape=o,t.join("")},function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).DOMPurify=t()}(this,function(){"use strict";var s=Object.hasOwnProperty,i=Object.setPrototypeOf,a=Object.isFrozen,o=Object.getPrototypeOf,r=Object.getOwnPropertyDescriptor,Me=Object.freeze,e=Object.seal,l=Object.create,t="undefined"!=typeof Reflect&&Reflect,c=t.apply,d=t.construct;c||(c=function(e,t,n){return e.apply(t,n)}),Me||(Me=function(e){return e}),e||(e=function(e){return e}),d||(d=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(t))))});var u,Re=h(Array.prototype.forEach),je=h(Array.prototype.pop),He=h(Array.prototype.push),Ne=h(String.prototype.toLowerCase),qe=h(String.prototype.match),Pe=h(String.prototype.replace),Fe=h(String.prototype.indexOf),We=h(String.prototype.trim),Be=h(RegExp.prototype.test),Ue=(u=TypeError,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return d(u,t)});function h(o){return function(e){for(var t=arguments.length,n=Array(1<t?t-1:0),s=1;s<t;s++)n[s-1]=arguments[s];return c(o,e,n)}}function Ke(e,t){i&&i(e,null);for(var n=t.length;n--;){var s=t[n];if("string"==typeof s){var o=Ne(s);o!==s&&(a(t)||(t[n]=o),s=o)}e[s]=!0}return e}function Ye(e){var t=l(null),n=void 0;for(n in e)c(s,e,[n])&&(t[n]=e[n]);return t}function Qe(e,t){for(;null!==e;){var n=r(e,t);if(n){if(n.get)return h(n.get);if("function"==typeof n.value)return h(n.value)}e=o(e)}return function(e){return console.warn("fallback value for",e),null}}var Ve=Me(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ge=Me(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ze=Me(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Xe=Me(["animate","color-profile","cursor","discard","fedropshadow","feimage","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),$e=Me(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),Je=Me(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),et=Me(["#text"]),tt=Me(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),nt=Me(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),st=Me(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ot=Me(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),it=e(/\{\{[\s\S]*|[\s\S]*\}\}/gm),at=e(/<%[\s\S]*|[\s\S]*%>/gm),rt=e(/^data-[\-\w.\u00B7-\uFFFF]/),lt=e(/^aria-[\-\w]+$/),ct=e(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),dt=e(/^(?:\w+script|data):/i),ut=e(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ht="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};function mt(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}return function t(){var c=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window,u=function(e){return t(e)};if(u.version="2.3.1",u.removed=[],!c||!c.document||9!==c.document.nodeType)return u.isSupported=!1,u;var d=c.document,a=c.document,h=c.DocumentFragment,e=c.HTMLTemplateElement,m=c.Node,r=c.Element,n=c.NodeFilter,s=c.NamedNodeMap,l=void 0===s?c.NamedNodeMap||c.MozNamedAttrMap:s,p=c.Text,g=c.Comment,f=c.DOMParser,o=c.trustedTypes,i=r.prototype,y=Qe(i,"cloneNode"),v=Qe(i,"nextSibling"),b=Qe(i,"childNodes"),w=Qe(i,"parentNode");if("function"==typeof e){var S=a.createElement("template");S.content&&S.content.ownerDocument&&(a=S.content.ownerDocument)}var T=function(e,t){if("object"!==(void 0===e?"undefined":ht(e))||"function"!=typeof e.createPolicy)return null;var n=null,s="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(s)&&(n=t.currentScript.getAttribute(s));var o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(o,d),C=T&&te?T.createHTML(""):"",k=a,z=k.implementation,A=k.createNodeIterator,L=k.createDocumentFragment,x=k.getElementsByTagName,O=d.importNode,E={};try{E=Ye(a).documentMode?a.documentMode:{}}catch(t){}var I={};u.isSupported="function"==typeof w&&z&&void 0!==z.createHTMLDocument&&9!==E;var _=it,D=at,M=rt,R=lt,j=dt,H=ut,N=ct,q=null,P=Ke({},[].concat(mt(Ve),mt(Ge),mt(Ze),mt($e),mt(et))),F=null,W=Ke({},[].concat(mt(tt),mt(nt),mt(st),mt(ot))),B=null,U=null,K=!0,Y=!0,Q=!1,V=!1,G=!1,Z=!1,X=!1,$=!1,J=!1,ee=!0,te=!1,ne=!0,se=!0,oe=!1,ie={},ae=null,re=Ke({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),le=null,ce=Ke({},["audio","video","img","source","image","track"]),de=null,ue=Ke({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),he="http://www.w3.org/1998/Math/MathML",me="http://www.w3.org/2000/svg",pe="http://www.w3.org/1999/xhtml",ge=pe,fe=!1,ye=null,ve=a.createElement("form"),be=function(e){ye&&ye===e||(e&&"object"===(void 0===e?"undefined":ht(e))||(e={}),e=Ye(e),q="ALLOWED_TAGS"in e?Ke({},e.ALLOWED_TAGS):P,F="ALLOWED_ATTR"in e?Ke({},e.ALLOWED_ATTR):W,de="ADD_URI_SAFE_ATTR"in e?Ke(Ye(ue),e.ADD_URI_SAFE_ATTR):ue,le="ADD_DATA_URI_TAGS"in e?Ke(Ye(ce),e.ADD_DATA_URI_TAGS):ce,ae="FORBID_CONTENTS"in e?Ke({},e.FORBID_CONTENTS):re,B="FORBID_TAGS"in e?Ke({},e.FORBID_TAGS):{},U="FORBID_ATTR"in e?Ke({},e.FORBID_ATTR):{},ie="USE_PROFILES"in e&&e.USE_PROFILES,K=!1!==e.ALLOW_ARIA_ATTR,Y=!1!==e.ALLOW_DATA_ATTR,Q=e.ALLOW_UNKNOWN_PROTOCOLS||!1,V=e.SAFE_FOR_TEMPLATES||!1,G=e.WHOLE_DOCUMENT||!1,$=e.RETURN_DOM||!1,J=e.RETURN_DOM_FRAGMENT||!1,ee=!1!==e.RETURN_DOM_IMPORT,te=e.RETURN_TRUSTED_TYPE||!1,X=e.FORCE_BODY||!1,ne=!1!==e.SANITIZE_DOM,se=!1!==e.KEEP_CONTENT,oe=e.IN_PLACE||!1,N=e.ALLOWED_URI_REGEXP||N,ge=e.NAMESPACE||pe,V&&(Y=!1),J&&($=!0),ie&&(q=Ke({},[].concat(mt(et))),F=[],!0===ie.html&&(Ke(q,Ve),Ke(F,tt)),!0===ie.svg&&(Ke(q,Ge),Ke(F,nt),Ke(F,ot)),!0===ie.svgFilters&&(Ke(q,Ze),Ke(F,nt),Ke(F,ot)),!0===ie.mathMl&&(Ke(q,$e),Ke(F,st),Ke(F,ot))),e.ADD_TAGS&&(q===P&&(q=Ye(q)),Ke(q,e.ADD_TAGS)),e.ADD_ATTR&&(F===W&&(F=Ye(F)),Ke(F,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&Ke(de,e.ADD_URI_SAFE_ATTR),e.FORBID_CONTENTS&&(ae===re&&(ae=Ye(ae)),Ke(ae,e.FORBID_CONTENTS)),se&&(q["#text"]=!0),G&&Ke(q,["html","head","body"]),q.table&&(Ke(q,["tbody"]),delete B.tbody),Me&&Me(e),ye=e)},we=Ke({},["mi","mo","mn","ms","mtext"]),Se=Ke({},["foreignobject","desc","title","annotation-xml"]),Te=Ke({},Ge);Ke(Te,Ze),Ke(Te,Xe);var Ce=Ke({},$e);Ke(Ce,Je);var ke=function(t){He(u.removed,{element:t});try{t.parentNode.removeChild(t)}catch(e){try{t.outerHTML=C}catch(e){t.remove()}}},ze=function(e,t){try{He(u.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){He(u.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!F[e])if($||J)try{ke(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Ae=function(e){var t=void 0,n=void 0;if(X)e="<remove></remove>"+e;else{var s=qe(e,/^[\r\n\t ]+/);n=s&&s[0]}var o=T?T.createHTML(e):e;if(ge===pe)try{t=(new f).parseFromString(o,"text/html")}catch(e){}if(!t||!t.documentElement){t=z.createDocument(ge,"template",null);try{t.documentElement.innerHTML=fe?"":o}catch(e){}}var i=t.body||t.documentElement;return e&&n&&i.insertBefore(a.createTextNode(n),i.childNodes[0]||null),ge===pe?x.call(t,G?"html":"body")[0]:G?t.documentElement:i},Le=function(e){return A.call(e.ownerDocument||e,e,n.SHOW_ELEMENT|n.SHOW_COMMENT|n.SHOW_TEXT,null,!1)},xe=function(e){return"object"===(void 0===m?"undefined":ht(m))?e instanceof m:e&&"object"===(void 0===e?"undefined":ht(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Oe=function(e,t,n){I[e]&&Re(I[e],function(e){e.call(u,t,n,ye)})},Ee=function(e){var t,n=void 0;if(Oe("beforeSanitizeElements",e,null),!((t=e)instanceof p||t instanceof g||"string"==typeof t.nodeName&&"string"==typeof t.textContent&&"function"==typeof t.removeChild&&t.attributes instanceof l&&"function"==typeof t.removeAttribute&&"function"==typeof t.setAttribute&&"string"==typeof t.namespaceURI&&"function"==typeof t.insertBefore))return ke(e),!0;if(qe(e.nodeName,/[\u0080-\uFFFF]/))return ke(e),!0;var s=Ne(e.nodeName);if(Oe("uponSanitizeElement",e,{tagName:s,allowedTags:q}),!xe(e.firstElementChild)&&(!xe(e.content)||!xe(e.content.firstElementChild))&&Be(/<[/\w]/g,e.innerHTML)&&Be(/<[/\w]/g,e.textContent))return ke(e),!0;if("select"===s&&Be(/<template/i,e.innerHTML))return ke(e),!0;if(!q[s]||B[s]){if(se&&!ae[s]){var o=w(e)||e.parentNode,i=b(e)||e.childNodes;if(i&&o)for(var a=i.length-1;0<=a;--a)o.insertBefore(y(i[a],!0),v(e))}return ke(e),!0}return e instanceof r&&!function(e){var t=w(e);t&&t.tagName||(t={namespaceURI:pe,tagName:"template"});var n=Ne(e.tagName),s=Ne(t.tagName);if(e.namespaceURI===me)return t.namespaceURI===pe?"svg"===n:t.namespaceURI===he?"svg"===n&&("annotation-xml"===s||we[s]):Boolean(Te[n]);if(e.namespaceURI===he)return t.namespaceURI===pe?"math"===n:t.namespaceURI===me?"math"===n&&Se[s]:Boolean(Ce[n]);if(e.namespaceURI===pe){if(t.namespaceURI===me&&!Se[s])return!1;if(t.namespaceURI===he&&!we[s])return!1;var o=Ke({},["title","style","font","a","script"]);return!Ce[n]&&(o[n]||!Te[n])}return!1}(e)?(ke(e),!0):"noscript"!==s&&"noembed"!==s||!Be(/<\/no(script|embed)/i,e.innerHTML)?(V&&3===e.nodeType&&(n=e.textContent,n=Pe(n,_," "),n=Pe(n,D," "),e.textContent!==n&&(He(u.removed,{element:e.cloneNode()}),e.textContent=n)),Oe("afterSanitizeElements",e,null),!1):(ke(e),!0)},Ie=function(e,t,n){if(ne&&("id"===t||"name"===t)&&(n in a||n in ve))return!1;if(Y&&!U[t]&&Be(M,t));else if(K&&Be(R,t));else{if(!F[t]||U[t])return!1;if(de[t]);else if(Be(N,Pe(n,H,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Fe(n,"data:")||!le[e])if(Q&&!Be(j,Pe(n,H,"")));else if(n)return!1}return!0},_e=function(e){var t=void 0,n=void 0,s=void 0,o=void 0;Oe("beforeSanitizeAttributes",e,null);var i=e.attributes;if(i){var a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:F};for(o=i.length;o--;){var r=t=i[o],l=r.name,c=r.namespaceURI;if(n=We(t.value),s=Ne(l),a.attrName=s,a.attrValue=n,a.keepAttr=!0,a.forceKeepAttr=void 0,Oe("uponSanitizeAttribute",e,a),n=a.attrValue,!a.forceKeepAttr&&(ze(l,e),a.keepAttr))if(Be(/\/>/i,n))ze(l,e);else{V&&(n=Pe(n,_," "),n=Pe(n,D," "));var d=e.nodeName.toLowerCase();if(Ie(d,s,n))try{c?e.setAttributeNS(c,l,n):e.setAttribute(l,n),je(u.removed)}catch(e){}}}Oe("afterSanitizeAttributes",e,null)}},De=function e(t){var n=void 0,s=Le(t);for(Oe("beforeSanitizeShadowDOM",t,null);n=s.nextNode();)Oe("uponSanitizeShadowNode",n,null),Ee(n)||(n.content instanceof h&&e(n.content),_e(n));Oe("afterSanitizeShadowDOM",t,null)};return u.sanitize=function(e,t){var n=void 0,s=void 0,o=void 0,i=void 0,a=void 0;if((fe=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!xe(e)){if("function"!=typeof e.toString)throw Ue("toString is not a function");if("string"!=typeof(e=e.toString()))throw Ue("dirty is not a string, aborting")}if(!u.isSupported){if("object"===ht(c.toStaticHTML)||"function"==typeof c.toStaticHTML){if("string"==typeof e)return c.toStaticHTML(e);if(xe(e))return c.toStaticHTML(e.outerHTML)}return e}if(Z||be(t),u.removed=[],"string"==typeof e&&(oe=!1),oe);else if(e instanceof m)1===(s=(n=Ae("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===s.nodeName||"HTML"===s.nodeName?n=s:n.appendChild(s);else{if(!$&&!V&&!G&&-1===e.indexOf("<"))return T&&te?T.createHTML(e):e;if(!(n=Ae(e)))return $?null:C}n&&X&&ke(n.firstChild);for(var r=Le(oe?e:n);o=r.nextNode();)3===o.nodeType&&o===i||Ee(o)||(o.content instanceof h&&De(o.content),_e(o),i=o);if(i=null,oe)return e;if($){if(J)for(a=L.call(n.ownerDocument);n.firstChild;)a.appendChild(n.firstChild);else a=n;return ee&&(a=O.call(d,a,!0)),a}var l=G?n.outerHTML:n.innerHTML;return V&&(l=Pe(l,_," "),l=Pe(l,D," ")),T&&te?T.createHTML(l):l},u.setConfig=function(e){be(e),Z=!0},u.clearConfig=function(){ye=null,Z=!1},u.isValidAttribute=function(e,t,n){ye||be({});var s=Ne(e),o=Ne(t);return Ie(s,o,n)},u.addHook=function(e,t){"function"==typeof t&&(I[e]=I[e]||[],He(I[e],t))},u.removeHook=function(e){I[e]&&je(I[e])},u.removeHooks=function(e){I[e]&&(I[e]=[])},u.removeAllHooks=function(){I={}},u}()});var extend=function(e,t){for(var n in t)hasProp.call(t,n)&&(e[n]=t[n]);function s(){this.constructor=e}return s.prototype=t.prototype,e.prototype=new s,e.__super__=t.prototype,e},hasProp={}.hasOwnProperty,bind=function(e,t){return function(){return e.apply(t,arguments)}},slice=[].slice;!function(O){var s,n,o,i,a,e,r,l,c,d;r=(d=document.getElementsByTagName("script"))[d.length-1],c=O.location.protocol.replace(":",""),r&&r.src&&(l=r.src.match(".*://([^:/]*).*")[1],c=r.src.match("(.*)://[^:/]*.*")[1]),n=function(){function e(e){var t,n,s;for(t in this.options={},n=this.defaults)s=n[t],this.options[t]=s;for(t in e)s=e[t],this.options[t]=s}return e.prototype.defaults={debug:!1},e}(),s=function(e){function t(e){t.__super__.constructor.call(this,e),this.log=new i({debug:this.options.debug,logPrefix:this.options.logPrefix||this.logPrefix})}return extend(t,n),t}(),i=function(e){function t(){return this.log=bind(this.log,this),this.error=bind(this.error,this),this.notice=bind(this.notice,this),this.debug=bind(this.debug,this),t.__super__.constructor.apply(this,arguments)}return extend(t,n),t.prototype.debug=function(){var e;if(e=1<=arguments.length?slice.call(arguments,0):[],this.options.debug)return this.log("debug",e)},t.prototype.notice=function(){var e;return e=1<=arguments.length?slice.call(arguments,0):[],this.log("notice",e)},t.prototype.error=function(){var e;return e=1<=arguments.length?slice.call(arguments,0):[],this.log("error",e)},t.prototype.log=function(e,t){var n,s,o,i,a;if(t.unshift("||"),t.unshift(e),t.unshift(this.options.logPrefix),console.log.apply(console,t),this.options.debug){for(a="",o=0,i=t.length;o<i;o++)a+=" ","object"==typeof(s=t[o])?a+=JSON.stringify(s):s&&s.toString?a+=s.toString():a+=s;return(n=document.querySelector(".js-chatLogDisplay"))?n.innerHTML="<div>"+a+"</div>"+n.innerHTML:void 0}},t}(),a=function(e){function t(){return this.stop=bind(this.stop,this),this.start=bind(this.start,this),t.__super__.constructor.apply(this,arguments)}return extend(t,s),t.prototype.timeoutStartedAt=null,t.prototype.logPrefix="timeout",t.prototype.defaults={debug:!1,timeout:4,timeoutIntervallCheck:.5},t.prototype.start=function(){var e,t,n;return this.stop(),t=new Date,e=function(){var e;if(e=new Date-new Date(t.getTime()+1e3*n.options.timeout*60),n.log.debug("Timeout check for "+n.options.timeout+" minutes (left "+e/1e3+" sec.)"),!(e<0))return n.stop(),n.options.callback()},(n=this).log.debug("Start timeout in "+this.options.timeout+" minutes"),this.intervallId=setInterval(e,1e3*this.options.timeoutIntervallCheck*60)},t.prototype.stop=function(){if(this.intervallId)return this.log.debug("Stop timeout of "+this.options.timeout+" minutes"),clearInterval(this.intervallId)},t}(),o=function(e){function t(){return 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),t.__super__.constructor.apply(this,arguments)}return extend(t,s),t.prototype.logPrefix="io",t.prototype.set=function(e){var t,n,s;for(t in n=[],e)s=e[t],n.push(this.options[t]=s);return n},t.prototype.connect=function(){var t,o,n,s;return this.log.debug("Connecting to "+this.options.host),this.ws=new O.WebSocket(""+this.options.host),this.ws.onopen=(t=this,function(e){return t.log.debug("onOpen",e),t.options.onOpen(e),t.ping()}),this.ws.onmessage=(o=this,function(e){var t,n,s;for(s=JSON.parse(e.data),o.log.debug("onMessage",e.data),t=0,n=s.length;t<n;t++)"pong"===s[t].event&&o.ping();if(o.options.onMessage)return o.options.onMessage(s)}),this.ws.onclose=(n=this,function(e){if(n.log.debug("close websocket connection",e),n.pingDelayId&&clearTimeout(n.pingDelayId),n.manualClose){if(n.log.debug("manual close, onClose callback"),n.manualClose=!1,n.options.onClose)return n.options.onClose(e)}else if(n.log.debug("error close, onError callback"),n.options.onError)return n.options.onError("Connection lost...")}),this.ws.onerror=(s=this,function(e){if(s.log.debug("onError",e),s.options.onError)return s.options.onError(e)})},t.prototype.close=function(){return this.log.debug("close websocket manually"),this.manualClose=!0,this.ws.close()},t.prototype.reconnect=function(){return this.log.debug("reconnect"),this.close(),this.connect()},t.prototype.send=function(e,t){var n;return null==t&&(t={}),this.log.debug("send",e,t),n=JSON.stringify({event:e,data:t}),this.ws.send(n)},t.prototype.ping=function(){var e,t;return e=function(){return t.send("ping")},(t=this).pingDelayId=setTimeout(e,29e3)},t}(),e=function(e){function n(e){return this.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.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.onKeydown=bind(this.onKeydown,this),this.onPaste=bind(this.onPaste,this),this.onDrop=bind(this.onDrop,this),this.render=bind(this.render,this),this.view=bind(this.view,this),this.T=bind(this.T,this),n.__super__.constructor.call(this,e),"undefined"!=typeof jQuery&&this.options.target instanceof jQuery&&(this.log.notice("Chat: target option is a jQuery object. jQuery is not a requirement for the chat any more."),this.options.target=this.options.target.get(0)),this.isFullscreen=O.matchMedia&&O.matchMedia("(max-width: 768px)").matches,this.scrollRoot=this.getScrollRoot(),O.WebSocket&&sessionStorage?this.options.chatId?(this.options.lang||(this.options.lang=document.documentElement.getAttribute("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("lang: "+this.options.lang)),this.options.host||this.detectHost(),this.loadCss(),this.io=new o(this.options),this.io.set({onOpen:this.render,onClose:this.onWebSocketClose,onMessage:this.onWebSocketMessage,onError:this.onError}),void this.io.connect()):(this.state="unsupported",void this.log.error("Chat: need chatId as option!")):(this.state="unsupported",void this.log.notice("Chat: Browser not supported!"))}return extend(n,s),n.prototype.defaults={chatId:void 0,show:!0,target:document.querySelector("body"),host:"",debug:!1,flat:!1,lang:void 0,cssAutoload:!0,cssUrl:void 0,fontSize:void 0,buttonClass:"open-zammad-chat",inactiveClass:"is-inactive",title:"<strong>Chat</strong> with us!",scrollHint:"Scroll down to see new messages",idleTimeout:6,idleTimeoutIntervallCheck:.5,inactiveTimeout:8,inactiveTimeoutIntervallCheck:.5,waitingListTimeout:4,waitingListTimeoutIntervallCheck:.5,onReady:void 0,onCloseAnimationEnd:void 0,onError:void 0,onOpenAnimationEnd:void 0,onConnectionReestablished:void 0,onSessionClosed:void 0,onConnectionEstablished:void 0,onCssLoaded:void 0},n.prototype.logPrefix="chat",n.prototype._messageCount=0,n.prototype.isOpen=!1,n.prototype.blinkOnlineInterval=null,n.prototype.stopBlinOnlineStateTimeout=null,n.prototype.showTimeEveryXMinutes=2,n.prototype.lastTimestamp=null,n.prototype.lastAddedType=null,n.prototype.inputDisabled=!1,n.prototype.inputTimeout=null,n.prototype.isTyping=!1,n.prototype.state="offline",n.prototype.initialQueueDelay=1e4,n.prototype.translations={da:{"<strong>Chat</strong> with us!":"<strong>Chat</strong> med os!","Scroll down to see new messages":"Scroll ned for at se nye beskeder",Online:"Online",Offline:"Offline",Connecting:"Forbinder","Connection re-established":"Forbindelse genoprettet",Today:"I dag",Send:"Send","Chat closed by %s":"Chat lukket af %s","Compose your message…":"Skriv en besked…","All colleagues are busy.":"Alle kollegaer er optaget.","You are on waiting list position <strong>%s</strong>.":"Du er i venteliste som nummer <strong>%s</strong>.","Start new conversation":"Start en ny samtale","Since you didn't respond in the last %s minutes your conversation with <strong>%s</strong> got closed.":"Da du ikke har svaret i de sidste %s minutter er din samtale med <strong>%s</strong> blevet lukket.","Since you didn't respond in the last %s minutes your conversation got closed.":"Da du ikke har svaret i de sidste %s minutter er din samtale blevet lukket.","We are sorry, it takes longer as expected to get an empty slot. Please try again later or send us an email. Thank you!":"Vi beklager, det tager længere end forventet at få en ledig plads. Prøv venligst igen senere eller send os en e-mail. På forhånd tak!"},de:{"<strong>Chat</strong> with us!":"<strong>Chatte</strong> mit uns!","Scroll down to see new messages":"Scrolle nach unten um neue Nachrichten zu sehen",Online:"Online",Offline:"Offline",Connecting:"Verbinden","Connection re-established":"Verbindung wiederhergestellt",Today:"Heute",Send:"Senden","Chat closed by %s":"Chat beendet von %s","Compose your message…":"Ihre Nachricht…","All colleagues are busy.":"Alle Kollegen sind belegt.","You are on waiting list position <strong>%s</strong>.":"Sie sind in der Warteliste an der Position <strong>%s</strong>.","Start new conversation":"Neue Konversation starten","Since you didn't respond in the last %s minutes your conversation with <strong>%s</strong> got closed.":"Da Sie in den letzten %s Minuten nichts geschrieben haben wurde Ihre Konversation mit <strong>%s</strong> geschlossen.","Since you didn't respond in the last %s minutes your conversation got closed.":"Da Sie in den letzten %s Minuten nichts geschrieben haben wurde Ihre Konversation geschlossen.","We are sorry, it takes longer as expected to get an empty slot. Please try again later or send us an email. Thank you!":"Es tut uns leid, es dauert länger als erwartet, um einen freien Platz zu erhalten. Bitte versuchen Sie es zu einem späteren Zeitpunkt noch einmal oder schicken Sie uns eine E-Mail. Vielen Dank!"},es:{"<strong>Chat</strong> with us!":"<strong>Chatee</strong> con nosotros!","Scroll down to see new messages":"Haga scroll hacia abajo para ver nuevos mensajes",Online:"En linea",Offline:"Desconectado",Connecting:"Conectando","Connection re-established":"Conexión restablecida",Today:"Hoy",Send:"Enviar","Chat closed by %s":"Chat cerrado por %s","Compose your message…":"Escriba su mensaje…","All colleagues are busy.":"Todos los agentes están ocupados.","You are on waiting list position <strong>%s</strong>.":"Usted está en la posición <strong>%s</strong> de la lista de espera.","Start new conversation":"Iniciar nueva conversación","Since you didn't respond in the last %s minutes your conversation with <strong>%s</strong> got closed.":"Puesto que usted no respondió en los últimos %s minutos su conversación con <strong>%s</strong> se ha cerrado.","Since you didn't respond in the last %s minutes your conversation got closed.":"Puesto que usted no respondió en los últimos %s minutos su conversación se ha cerrado.","We are sorry, it takes longer as expected to get an empty slot. Please try again later or send us an email. Thank you!":"Lo sentimos, se tarda más tiempo de lo esperado para ser atendido por un agente. Inténtelo de nuevo más tarde o envíenos un correo electrónico. ¡Gracias!"},fi:{"<strong>Chat</strong> with us!":"<strong>Keskustele</strong> kanssamme!","Scroll down to see new messages":"Rullaa alas nähdäksesi uudet viestit",Online:"Paikalla",Offline:"Poissa",Connecting:"Yhdistetään","Connection re-established":"Yhteys muodostettu uudelleen",Today:"Tänään",Send:"Lähetä","Chat closed by %s":"%s sulki keskustelun","Compose your message…":"Luo viestisi…","All colleagues are busy.":"Kaikki kollegat ovat varattuja.","You are on waiting list position <strong>%s</strong>.":"Olet odotuslistalla sijalla <strong>%s</strong>.","Start new conversation":"Aloita uusi keskustelu","Since you didn't respond in the last %s minutes your conversation with <strong>%s</strong> got closed.":"Koska et vastannut viimeiseen %s minuuttiin, keskustelusi <strong>%s</strong> kanssa suljettiin.","Since you didn't respond in the last %s minutes your conversation got closed.":"Koska et vastannut viimeiseen %s minuuttiin, keskustelusi suljettiin.","We are sorry, it takes longer as expected to get an empty slot. Please try again later or send us an email. Thank you!":"Olemme pahoillamme, tyhjän paikan vapautumisessa kestää odotettua pidempään. Ole hyvä ja yritä myöhemmin uudestaan tai lähetä meille sähköpostia. Kiitos!"},fr:{"<strong>Chat</strong> with us!":"<strong>Chattez</strong> avec nous!","Scroll down to see new messages":"Faites défiler pour lire les nouveaux messages",Online:"En-ligne",Offline:"Hors-ligne",Connecting:"Connexion en cours","Connection re-established":"Connexion rétablie",Today:"Aujourdhui",Send:"Envoyer","Chat closed by %s":"Chat fermé par %s","Compose your message…":"Composez votre message…","All colleagues are busy.":"Tous les collaborateurs sont occupés actuellement.","You are on waiting list position <strong>%s</strong>.":"Vous êtes actuellement en position <strong>%s</strong> dans la file d'attente.","Start new conversation":"Démarrer une nouvelle conversation","Since you didn't respond in the last %s minutes your conversation with <strong>%s</strong> got closed.":"Si vous ne répondez pas dans les <strong>%s</strong> minutes, votre conversation avec %s sera fermée.","Since you didn't respond in the last %s minutes your conversation got closed.":"Si vous ne répondez pas dans les %s minutes, votre conversation va être fermée.","We are sorry, it takes longer as expected to get an empty slot. Please try again later or send us an email. Thank you!":"Nous sommes désolés, il faut plus de temps que prévu pour obtenir un emplacement vide. Veuillez réessayer ultérieurement ou nous envoyer un courriel. Nous vous remercions!"},he:{"<strong>Chat</strong> with us!":"<strong>שוחח</strong>איתנו!","Scroll down to see new messages":"גלול מטה כדי לראות הודעות חדשות",Online:"מחובר",Offline:"מנותק",Connecting:"מתחבר","Connection re-established":"החיבור שוחזר",Today:"היום",Send:"שלח","Chat closed by %s":'הצאט נסגר ע"י %s',"Compose your message…":"כתוב את ההודעה שלך …","All colleagues are busy.":"כל הנציגים תפוסים","You are on waiting list position <strong>%s</strong>.":"מיקומך בתור <strong>%s</strong>.","Start new conversation":"התחל שיחה חדשה","Since you didn't respond in the last %s minutes your conversation with <strong>%s</strong> got closed.":"מכיוון שלא הגבת במהלך %s דקות השיחה שלך עם <strong>%s</strong> נסגרה.","Since you didn't respond in the last %s minutes your conversation got closed.":"מכיוון שלא הגבת במהלך %s הדקות האחרונות השיחה שלך נסגרה.","We are sorry, it takes longer as expected to get an empty slot. Please try again later or send us an email. Thank you!":'מצטערים, הזמן לקבלת נציג ארוך מהרגיל. נסה שוב מאוחר יותר או שלח לנו דוא"ל. תודה!'},hu:{"<strong>Chat</strong> with us!":"<strong>Chatelj</strong> velünk!","Scroll down to see new messages":"Görgess lejjebb az újabb üzenetekért",Online:"Online",Offline:"Offline",Connecting:"Csatlakozás","Connection re-established":"Újracsatlakozás",Today:"Ma",Send:"Küldés","Chat closed by %s":"A beszélgetést lezárta %s","Compose your message…":"Írj üzenetet…","All colleagues are busy.":"Jelenleg minden kollégánk elfoglalt.","You are on waiting list position <strong>%s</strong>.":"A várólistán a <strong>%s</strong>. pozícióban várakozol.","Start new conversation":"Új beszélgetés indítása","Since you didn't respond in the last %s minutes your conversation with <strong>%s</strong> got closed.":"Mivel %s perce nem érkezett újabb üzenet, ezért a <strong>%s</strong> kollégával folytatott beszéletést lezártuk.","Since you didn't respond in the last %s minutes your conversation got closed.":"Mivel %s perce nem érkezett válasz, a beszélgetés lezárult.","We are sorry, it takes longer as expected to get an empty slot. Please try again later or send us an email. Thank you!":"Sajnáljuk, de a várakozási idő hosszabb a szokásosnál. Kérlek próbáld újra, vagy írd meg kérdésed emailben. Köszönjük!"},nl:{"<strong>Chat</strong> with us!":"<strong>Chat</strong> met ons!","Scroll down to see new messages":"Scrol naar beneden om nieuwe berichten te zien",Online:"Online",Offline:"Offline",Connecting:"Verbinden","Connection re-established":"Verbinding herstelt",Today:"Vandaag",Send:"Verzenden","Chat closed by %s":"Chat gesloten door %s","Compose your message…":"Typ uw bericht…","All colleagues are busy.":"Alle medewerkers zijn bezet.","You are on waiting list position <strong>%s</strong>.":"U bent <strong>%s</strong> in de wachtrij.","Start new conversation":"Nieuwe conversatie starten","Since you didn't respond in the last %s minutes your conversation with <strong>%s</strong> got closed.":"Omdat u in de laatste %s minuten niets geschreven heeft wordt de conversatie met <strong>%s</strong> gesloten.","Since you didn't respond in the last %s minutes your conversation got closed.":"Omdat u in de laatste %s minuten niets geschreven heeft is de conversatie gesloten.","We are sorry, it takes longer as expected to get an empty slot. Please try again later or send us an email. Thank you!":"Het spijt ons, het duurt langer dan verwacht om te antwoorden. Alstublieft probeer het later nogmaals of stuur ons een email. Hartelijk dank!"},it:{"<strong>Chat</strong> with us!":"<strong>Chatta</strong> con noi!","Scroll down to see new messages":"Scorrere verso il basso per vedere i nuovi messaggi",Online:"Online",Offline:"Offline",Connecting:"Collegamento","Connection re-established":"Collegamento ristabilito",Today:"Oggi",Send:"Invio","Chat closed by %s":"Conversazione chiusa da %s","Compose your message…":"Comporre il tuo messaggio…","All colleagues are busy.":"Tutti i colleghi sono occupati.","You are on waiting list position <strong>%s</strong>.":"Siete in posizione lista d' attesa <strong>%s</strong>.","Start new conversation":"Avviare una nuova conversazione","Since you didn't respond in the last %s minutes your conversation with <strong>%s</strong> got closed.":"Dal momento che non hai risposto negli ultimi %s minuti la tua conversazione con <strong>%s</strong> si è chiusa.","Since you didn't respond in the last %s minutes your conversation got closed.":"Dal momento che non hai risposto negli ultimi %s minuti la tua conversazione si è chiusa.","We are sorry, it takes longer as expected to get an empty slot. Please try again later or send us an email. Thank you!":"Ci dispiace, ci vuole più tempo come previsto per ottenere uno slot vuoto. Per favore riprova più tardi o inviaci un' e-mail. Grazie!"},pl:{"<strong>Chat</strong> with us!":"<strong>Czatuj</strong> z nami!","Scroll down to see new messages":"Przewiń w dół, aby wyświetlić nowe wiadomości",Online:"Online",Offline:"Offline",Connecting:"Łączenie","Connection re-established":"Ponowne nawiązanie połączenia",Today:"dzisiejszy",Send:"Wyślij","Chat closed by %s":"Czat zamknięty przez %s","Compose your message…":"Utwórz swoją wiadomość…","All colleagues are busy.":"Wszyscy konsultanci są zajęci.","You are on waiting list position <strong>%s</strong>.":"Na liście oczekujących znajduje się pozycja <strong>%s</strong>.","Start new conversation":"Rozpoczęcie nowej konwersacji","Since you didn't respond in the last %s minutes your conversation with <strong>%s</strong> got closed.":"Ponieważ w ciągu ostatnich %s minut nie odpowiedziałeś, Twoja rozmowa z <strong>%s</strong> została zamknięta.","Since you didn't respond in the last %s minutes your conversation got closed.":"Ponieważ nie odpowiedziałeś w ciągu ostatnich %s minut, Twoja rozmowa została zamknięta.","We are sorry, it takes longer as expected to get an empty slot. Please try again later or send us an email. Thank you!":"Przykro nam, ale to trwa dłużej niż się spodziewamy. Spróbuj ponownie później lub wyślij nam wiadomość e-mail. Dziękuję!"},"pt-br":{"<strong>Chat</strong> with us!":"<strong>Chat</strong> fale conosco!","Scroll down to see new messages":"Role para baixo, para ver nosvas mensagens",Online:"Online",Offline:"Desconectado",Connecting:"Conectando","Connection re-established":"Conexão restabelecida",Today:"Hoje",Send:"Enviar","Chat closed by %s":"Chat encerrado por %s","Compose your message…":"Escreva sua mensagem…","All colleagues are busy.":"Todos os agentes estão ocupados.","You are on waiting list position <strong>%s</strong>.":"Você está na posição <strong>%s</strong> na fila de espera.","Start new conversation":"Iniciar uma nova conversa","Since you didn't respond in the last %s minutes your conversation with <strong>%s</strong> got closed.":"Como você não respondeu nos últimos %s minutos sua conversa com <strong>%s</strong> foi encerrada.","Since you didn't respond in the last %s minutes your conversation got closed.":"Como você não respondeu nos últimos %s minutos sua conversa foi encerrada.","We are sorry, it takes longer as expected to get an empty slot. Please try again later or send us an email. Thank you!":"Desculpe, mas o tempo de espera por um agente foi excedido. Tente novamente mais tarde ou nós envie um email. Obrigado"},"zh-cn":{"<strong>Chat</strong> with us!":"发起<strong>即时对话</strong>!","Scroll down to see new messages":"向下滚动以查看新消息",Online:"在线",Offline:"离线",Connecting:"连接中","Connection re-established":"正在重新建立连接",Today:"今天",Send:"发送","Chat closed by %s":"Chat closed by %s","Compose your message…":"正在输入信息…","All colleagues are busy.":"所有工作人员都在忙碌中.","You are on waiting list position <strong>%s</strong>.":"您目前的等候位置是第 <strong>%s</strong> 位.","Start new conversation":"开始新的会话","Since you didn't respond in the last %s minutes your conversation with <strong>%s</strong> got closed.":"由于您超过 %s 分钟没有回复, 您与 <strong>%s</strong> 的会话已被关闭.","Since you didn't respond in the last %s minutes your conversation got closed.":"由于您超过 %s 分钟没有任何回复, 该对话已被关闭.","We are sorry, it takes longer as expected to get an empty slot. Please try again later or send us an email. Thank you!":"非常抱歉, 目前需要等候更长的时间才能接入对话, 请稍后重试或向我们发送电子邮件. 谢谢!"},"zh-tw":{"<strong>Chat</strong> with us!":"開始<strong>即時對话</strong>!","Scroll down to see new messages":"向下滑動以查看新訊息",Online:"線上",Offline:"离线",Connecting:"連線中","Connection re-established":"正在重新建立連線中",Today:"今天",Send:"發送","Chat closed by %s":"Chat closed by %s","Compose your message…":"正在輸入訊息…","All colleagues are busy.":"所有服務人員都在忙碌中.","You are on waiting list position <strong>%s</strong>.":"你目前的等候位置是第 <strong>%s</strong> 順位.","Start new conversation":"開始新的對話","Since you didn't respond in the last %s minutes your conversation with <strong>%s</strong> got closed.":"由於你超過 %s 分鐘沒有回應, 你與 <strong>%s</strong> 的對話已被關閉.","Since you didn't respond in the last %s minutes your conversation got closed.":"由於你超過 %s 分鐘沒有任何回應, 該對話已被關閉.","We are sorry, it takes longer as expected to get an empty slot. Please try again later or send us an email. Thank you!":"非常抱歉, 當前需要等候更長的時間方可排入對話程序, 請稍後重試或向我們寄送電子郵件. 謝謝!"},ru:{"<strong>Chat</strong> with us!":"Напишите нам!","Scroll down to see new messages":"Прокрутите, чтобы увидеть новые сообщения",Online:"Онлайн",Offline:"Оффлайн",Connecting:"Подключение","Connection re-established":"Подключение восстановлено",Today:"Сегодня",Send:"Отправить","Chat closed by %s":"%s закрыл чат","Compose your message…":"Напишите сообщение…","All colleagues are busy.":"Все сотрудники заняты","You are on waiting list position <strong>%s</strong>.":"Вы в списке ожидания под номером <strong>%s</strong>","Start new conversation":"Начать новую переписку.","Since you didn't respond in the last %s minutes your conversation with %s got closed.":"Поскольку вы не отвечали в течение последних %s минут, ваш разговор с %s был закрыт.","Since you didn't respond in the last %s minutes your conversation got closed.":"Поскольку вы не отвечали в течение последних %s минут, ваш разговор был закрыт.","We are sorry, it takes longer as expected to get an empty slot. Please try again later or send us an email. Thank you!":"К сожалению, ожидание свободного места требует больше времени. Повторите попытку позже или отправьте нам электронное письмо. Спасибо!"},sv:{"<strong>Chat</strong> with us!":"<strong>Chatta</strong> med oss!","Scroll down to see new messages":"Rulla ner för att se nya meddelanden",Online:"Online",Offline:"Offline",Connecting:"Ansluter","Connection re-established":"Anslutningen återupprättas",Today:"I dag",Send:"Skicka","Chat closed by %s":"Chatt stängd av %s","Compose your message…":"Skriv ditt meddelande…","All colleagues are busy.":"Alla kollegor är upptagna.","You are on waiting list position <strong>%s</strong>.":"Du är på väntelistan som position <strong>%s</strong>.","Start new conversation":"Starta ny konversation","Since you didn't respond in the last %s minutes your conversation with <strong>%s</strong> got closed.":"Eftersom du inte svarat inom %s minuterna i din konversation med <strong>%s</strong> så stängdes chatten.","Since you didn't respond in the last %s minutes your conversation got closed.":"Då du inte svarat inom de senaste %s minuterna så avslutades din chatt.","We are sorry, it takes longer as expected to get an empty slot. Please try again later or send us an email. Thank you!":"Vi är ledsna, det tar längre tid som förväntat att få en ledig plats. Försök igen senare eller skicka ett e-postmeddelande till oss. Tack!"},no:{"<strong>Chat</strong> with us!":"<strong>Chat</strong> med oss!","Scroll down to see new messages":"Bla ned for å se nye meldinger",Online:"Pålogget",Offline:"Avlogget",Connecting:"Koble til","Connection re-established":"Tilkoblingen er gjenopprettet",Today:"I dag",Send:"Send","Chat closed by %s":"Chat avsluttes om %s","Compose your message…":"Skriv din melding…","All colleagues are busy.":"Alle våre kolleger er for øyeblikket opptatt.","You are on waiting list position <strong>%s</strong>.":"Du står nå i kø og er nr. <strong>%s</strong> på ventelisten.","Start new conversation":"Start en ny samtale","Since you didn't respond in the last %s minutes your conversation with <strong>%s</strong> got closed.":"Ettersom du ikke har respondert i løpet av de siste %s minuttene av samtalen, vil samtalen med <strong>%s</strong> nå avsluttes.","Since you didn't respond in the last %s minutes your conversation got closed.":"Ettersom du ikke har respondert i løpet av de siste %s minuttene, har samtalen nå blitt avsluttet.","We are sorry, it takes longer as expected to get an empty slot. Please try again later or send us an email. Thank you!":"Vi beklager, men det tar lengre tid enn vanlig å få en ledig plass i vår chat. Vennligst prøv igjen på et senere tidspunkt eller send oss en e-post. Tusen takk!"},nb:{"<strong>Chat</strong> with us!":"<strong>Chat</strong> med oss!","Scroll down to see new messages":"Bla ned for å se nye meldinger",Online:"Pålogget",Offline:"Avlogget",Connecting:"Koble til","Connection re-established":"Tilkoblingen er gjenopprettet",Today:"I dag",Send:"Send","Chat closed by %s":"Chat avsluttes om %s","Compose your message…":"Skriv din melding…","All colleagues are busy.":"Alle våre kolleger er for øyeblikket opptatt.","You are on waiting list position <strong>%s</strong>.":"Du står nå i kø og er nr. <strong>%s</strong> på ventelisten.","Start new conversation":"Start en ny samtale","Since you didn't respond in the last %s minutes your conversation with <strong>%s</strong> got closed.":"Ettersom du ikke har respondert i løpet av de siste %s minuttene av samtalen, vil samtalen med <strong>%s</strong> nå avsluttes.","Since you didn't respond in the last %s minutes your conversation got closed.":"Ettersom du ikke har respondert i løpet av de siste %s minuttene, har samtalen nå blitt avsluttet.","We are sorry, it takes longer as expected to get an empty slot. Please try again later or send us an email. Thank you!":"Vi beklager, men det tar lengre tid enn vanlig å få en ledig plass i vår chat. Vennligst prøv igjen på et senere tidspunkt eller send oss en e-post. Tusen takk!"},el:{"<strong>Chat</strong> with us!":"<strong>Επικοινωνήστε</strong> μαζί μας!","Scroll down to see new messages":"Μεταβείτε κάτω για να δείτε τα νέα μηνύματα",Online:"Σε σύνδεση",Offline:"Αποσυνδεμένος",Connecting:"Σύνδεση","Connection re-established":"Η σύνδεση αποκαταστάθηκε",Today:"Σήμερα",Send:"Αποστολή","Chat closed by %s":"Η συνομιλία έκλεισε από τον/την %s","Compose your message…":"Γράψτε το μήνυμα σας…","All colleagues are busy.":"Όλοι οι συνάδελφοι μας είναι απασχολημένοι.","You are on waiting list position <strong>%s</strong>.":"Βρίσκεστε σε λίστα αναμονής στη θέση <strong>%s</strong>.","Start new conversation":"Έναρξη νέας συνομιλίας","Since you didn't respond in the last %s minutes your conversation with <strong>%s</strong> got closed.":"Από τη στιγμή που δεν απαντήσατε τα τελευταία %s λεπτά η συνομιλία σας με τον/την <strong>%s</strong> έκλεισε.","Since you didn't respond in the last %s minutes your conversation got closed.":"Από τη στιγμή που δεν απαντήσατε τα τελευταία %s λεπτά η συνομιλία σας έκλεισε.","We are sorry, it takes longer as expected to get an empty slot. Please try again later or send us an email. Thank you!":"Λυπούμαστε που χρειάζεται περισσότερος χρόνος από τον αναμενόμενο για να βρεθεί μία κενή θέση. Παρακαλούμε δοκιμάστε ξανά αργότερα ή στείλτε μας ένα email. Ευχαριστούμε!"}},n.prototype.sessionId=void 0,n.prototype.scrolledToBottom=!0,n.prototype.scrollSnapTolerance=10,n.prototype.richTextFormatKey={66:!0,73:!0,85:!0,83:!0},n.prototype.T=function(){var e,t,n,s,o,i;if(o=arguments[0],t=2<=arguments.length?slice.call(arguments,1):[],this.options.lang&&"en"!==this.options.lang&&(this.translations[this.options.lang]?((i=this.translations[this.options.lang])[o]||this.log.notice("Translation needed for '"+o+"'"),o=i[o]||o):this.log.notice("Translation '"+this.options.lang+"' needed!")),t)for(n=0,s=t.length;n<s;n++)e=t[n],o=o.replace(/%s/,e);return o},n.prototype.view=function(t){return n=this,function(e){return e||(e={}),e.T=n.T,e.background=n.options.background,e.flat=n.options.flat,e.fontSize=n.options.fontSize,O.zammadChatTemplates[t](e)};var n},n.prototype.getScrollRoot=function(){var e,t,n;return"scrollingElement"in document?document.scrollingElement:(t=document.documentElement,n=parseInt(t.pageYOffset,10),t.pageYOffset=n+1,e=parseInt(t.pageYOffset,10),(t.pageYOffset=n)<e?t:document.body)},n.prototype.render=function(){var e;return this.el&&document.querySelector(".zammad-chat")||this.renderBase(),(e=document.querySelector("."+this.options.buttonClass))&&e.classList.add(this.options.inactiveClass),this.setAgentOnlineState("online"),this.log.debug("widget rendered"),this.startTimeoutObservers(),this.idleTimeout.start(),this.sessionId=sessionStorage.getItem("sessionId"),this.send("chat_status_customer",{session_id:this.sessionId,url:O.location.href})},n.prototype.renderBase=function(){return this.el&&this.el.remove(),this.options.target.insertAdjacentHTML("beforeend",this.view("chat")({title:this.options.title,scrollHint:this.options.scrollHint})),this.el=this.options.target.querySelector(".zammad-chat"),this.input=this.el.querySelector(".zammad-chat-input"),this.body=this.el.querySelector(".zammad-chat-body"),this.el.querySelector(".js-chat-open").addEventListener("click",this.open),this.el.querySelector(".js-chat-toggle").addEventListener("click",this.toggle),this.el.querySelector(".js-chat-status").addEventListener("click",this.stopPropagation),this.el.querySelector(".zammad-chat-controls").addEventListener("submit",this.onSubmit),this.body.addEventListener("scroll",this.detectScrolledtoBottom),this.el.querySelector(".zammad-scroll-hint").addEventListener("click",this.onScrollHintClick),this.input.addEventListener("keydown",this.onKeydown),this.input.addEventListener("input",this.onInput),this.input.addEventListener("paste",this.onPaste),this.input.addEventListener("drop",this.onDrop),O.addEventListener("beforeunload",this.onLeaveTemporary),O.addEventListener("hashchange",(e=this,function(){if(!e.isOpen)return e.idleTimeout.start();e.sessionId&&e.send("chat_session_notice",{session_id:e.sessionId,message:O.location.href})}));var e},n.prototype.stopPropagation=function(e){return e.stopPropagation()},n.prototype.onDrop=function(e){var t,n,s,a,r,l;if(e.stopPropagation(),e.preventDefault(),O.dataTransfer)t=O.dataTransfer;else{if(!e.dataTransfer)throw"No clipboardData support";t=e.dataTransfer}if(a=e.clientX,r=e.clientY,(n=t.files[0]).type.match("image.*"))return(s=new FileReader).onload=(l=this,function(e){var t;return t=function(e,t){var n,s,o,i;return l.isRetina()&&(t/=2),i=e,(n=new Image).style.width="100%",n.style.maxWidth=t+"px",n.src=i,document.caretPositionFromPoint?(s=document.caretPositionFromPoint(a,r),(o=document.createRange()).setStart(s.offsetNode,s.offset),o.collapse(),o.insertNode(n)):document.caretRangeFromPoint?(o=document.caretRangeFromPoint(a,r)).insertNode(n):console.log("could not find carat")},l.resizeImage(e.target.result,460,"auto",2,"image/jpeg","auto",t)}),s.readAsDataURL(n)},n.prototype.onPaste=function(t){var n,s,e,o,i,a,r,l,c,d,u,h,m,p,g,f,y,v,b,w,S,T,C,k,z,A,L,x;if(t.stopPropagation(),t.preventDefault(),t.clipboardData)n=t.clipboardData;else if(O.clipboardData)n=O.clipboardData;else{if(!t.clipboardData)throw"No clipboardData support";n=t.clipboardData}if(a=!1,n&&n.items&&n.items[0]&&("file"!==(r=n.items[0]).kind||"image/png"!==r.type&&"image/jpeg"!==r.type||(i=r.getAsFile(),(w=new FileReader).onload=(x=this,function(e){var t;return t=function(e,t){var n;return x.isRetina()&&(t/=2),(n=new Image).style.width="100%",n.style.maxWidth=t+"px",n.src=e,document.execCommand("insertHTML",!1,n)},x.resizeImage(e.target.result,460,"auto",2,"image/jpeg","auto",t)}),w.readAsDataURL(i),a=!0)),!a){s=L=void 0;try{L=n.getData("text/html"),s="html",L&&0!==L.length||(s="text",L=n.getData("text/plain")),L&&0!==L.length||(s="text2",L=n.getData("text"))}catch(e){t=e,console.log("Sorry, can't insert markup because browser is not supporting it."),s="text3",L=n.getData("text")}if("text"!==s&&"text2"!==s&&"text3"!==s||(L=(L="<div>"+L.replace(/\n/g,"</div><div>")+"</div>").replace(/<div><\/div>/g,"<div><br></div>")),console.log("p",s,L),"html"===s){for(e=document.createElement("div"),A=DOMPurify.sanitize(L),this.log.debug("sanitized HTML clipboard",A),e.innerHTML=A,f=!1,o=L,z=new RegExp("<(/w|w):[A-Za-z]"),o.match(z)&&(f=!0,o=o.replace(z,"")),z=new RegExp("<(/o|o):[A-Za-z]"),o.match(z)&&(f=!0,o=o.replace(z,"")),f&&(e=this.wordFilter(e)),l=0,u=(S=e.childNodes).length;l<u;l++)8===(v=S[l]).nodeType&&v.remove();for(c=0,h=(T=e.querySelectorAll("a, font, small, time, form, label")).length;c<h;c++)(v=T[c]).outerHTML=v.innerHTML;for("div",d=0,m=(C=e.querySelectorAll("textarea")).length;d<m;d++)b=(v=C[d]).outerHTML,z=new RegExp("<"+v.tagName,"i"),y=b.replace(z,"<div"),z=new RegExp("</"+v.tagName,"i"),y=y.replace(z,"</div"),v.outerHTML=y;for(g=0,p=(k=e.querySelectorAll("font, img, svg, input, select, button, style, applet, embed, noframes, canvas, script, frame, iframe, meta, link, title, head, fieldset")).length;g<p;g++)(v=k[g]).remove();this.removeAttributes(e),L=e.innerHTML}return"text3"===s?this.pasteHtmlAtCaret(L):document.execCommand("insertHTML",!1,L),!0}},n.prototype.onKeydown=function(e){var t;if(this.inputDisabled||e.shiftKey||13!==e.keyCode||(e.preventDefault(),this.sendMessage()),t=!1,(e.altKey||e.ctrlKey||!e.metaKey)&&(e.altKey||!e.ctrlKey||e.metaKey)||(t=!0),t&&this.richTextFormatKey[e.keyCode]){if(e.preventDefault(),66===e.keyCode)return document.execCommand("bold"),!0;if(73===e.keyCode)return document.execCommand("italic"),!0;if(85===e.keyCode)return document.execCommand("underline"),!0;if(83===e.keyCode)return document.execCommand("strikeThrough"),!0}},n.prototype.send=function(e,t){return null==t&&(t={}),t.chat_id=this.options.chatId,this.io.send(e,t)},n.prototype.onWebSocketMessage=function(e){var t,n,s;for(t=0,n=e.length;t<n;t++)switch(s=e[t],this.log.debug("ws:onmessage",s),s.event){case"chat_error":this.log.notice(s.data),s.data&&"chat_disabled"===s.data.state&&this.destroy({remove:!0});break;case"chat_session_message":if(s.data.self_written)return;this.receiveMessage(s.data);break;case"chat_session_typing":if(s.data.self_written)return;this.onAgentTypingStart();break;case"chat_session_start":this.onConnectionEstablished(s.data);break;case"chat_session_queue":this.onQueueScreen(s.data);break;case"chat_session_closed":case"chat_session_left":this.onSessionClosed(s.data);break;case"chat_status_customer":switch(s.data.state){case"online":this.sessionId=void 0,!this.options.cssAutoload||this.cssLoaded?this.onReady():this.socketReady=!0;break;case"offline":this.onError("Zammad Chat: No agent online");break;case"chat_disabled":this.onError("Zammad Chat: Chat is disabled");break;case"no_seats_available":this.onError("Zammad Chat: Too many clients in queue. Clients in queue: "+s.data.queue);break;case"reconnect":this.onReopenSession(s.data)}}},n.prototype.onReady=function(){var e,t;if(this.log.debug("widget ready for use"),(t=document.querySelector("."+this.options.buttonClass))&&(t.addEventListener("click",this.open),t.classList.remove(this.options.inactiveClass)),"function"==typeof(e=this.options).onReady&&e.onReady(),this.options.show)return this.show()},n.prototype.onError=function(e){var t,n;return this.log.debug(e),this.addStatus(e),(n=document.querySelector("."+this.options.buttonClass))&&n.classList.add("zammad-chat-is-hidden"),this.isOpen?(this.disableInput(),this.destroy({remove:!1})):this.destroy({remove:!0}),"function"==typeof(t=this.options).onError?t.onError(e):void 0},n.prototype.onReopenSession=function(e){var t,n,s,o,i;if(this.log.debug("old messages",e.session),this.inactiveTimeout.start(),i=sessionStorage.getItem("unfinished_message"),e.agent){for(this.onConnectionEstablished(e),t=0,n=(o=e.session).length;t<n;t++)s=o[t],this.renderMessage({message:s.content,id:s.id,from:s.created_by_id?"agent":"customer"});i&&(this.input.innerHTML=i)}if(e.position&&this.onQueue(e),this.show(),this.open(),this.scrollToBottom(),i)return this.input.focus()},n.prototype.onInput=function(){var e,t,n;for(e=0,t=(n=this.el.querySelectorAll(".zammad-chat-message--unread")).length;e<t;e++)n[e].classList.remove("zammad-chat-message--unread");return sessionStorage.setItem("unfinished_message",this.input.innerHTML),this.onTyping()},n.prototype.onTyping=function(){if(!(this.isTyping&&this.isTyping>new Date((new Date).getTime()-1500)))return this.isTyping=new Date,this.send("chat_session_typing",{session_id:this.sessionId}),this.inactiveTimeout.start()},n.prototype.onSubmit=function(e){return e.preventDefault(),this.sendMessage()},n.prototype.sendMessage=function(){var e,t;if(e=this.input.innerHTML)return this.inactiveTimeout.start(),sessionStorage.removeItem("unfinished_message"),t=this.view("message")({message:e,from:"customer",id:this._messageCount++,unreadClass:""}),this.maybeAddTimestamp(),this.el.querySelector(".zammad-chat-message--typing")?(this.lastAddedType="typing-placeholder",this.el.querySelector(".zammad-chat-message--typing").insertAdjacentHTML("beforebegin",t)):(this.lastAddedType="message--customer",this.body.insertAdjacentHTML("beforeend",t)),this.input.innerHTML="",this.scrollToBottom(),this.send("chat_session_message",{content:e,id:this._messageCount,session_id:this.sessionId})},n.prototype.receiveMessage=function(e){return this.inactiveTimeout.start(),this.onAgentTypingEnd(),this.maybeAddTimestamp(),this.renderMessage({message:e.message.content,id:e.id,from:"agent"}),this.scrollToBottom({showHint:!0})},n.prototype.renderMessage=function(e){return this.lastAddedType="message--"+e.from,e.unreadClass=document.hidden?" zammad-chat-message--unread":"",this.body.insertAdjacentHTML("beforeend",this.view("message")(e))},n.prototype.open=function(){var e;if(!this.isOpen)return this.isOpen=!0,this.log.debug("open widget"),this.show(),this.sessionId||this.showLoader(),this.el.classList.add("zammad-chat-is-open"),e=this.el.clientHeight-this.el.querySelector(".zammad-chat-header").offsetHeight,this.el.style.transform="translateY("+e+"px)",this.el.clientHeight,this.sessionId?(this.el.style.transform="",this.onOpenAnimationEnd()):(this.el.addEventListener("transitionend",this.onOpenAnimationEnd),this.el.classList.add("zammad-chat--animate"),this.el.clientHeight,this.el.style.transform="",this.send("chat_session_init",{url:O.location.href}));this.log.debug("widget already open, block")},n.prototype.onOpenAnimationEnd=function(){var e;return this.el.removeEventListener("transitionend",this.onOpenAnimationEnd),this.el.classList.remove("zammad-chat--animate"),this.idleTimeout.stop(),this.isFullscreen&&this.disableScrollOnRoot(),"function"==typeof(e=this.options).onOpenAnimationEnd?e.onOpenAnimationEnd():void 0},n.prototype.sessionClose=function(){return this.send("chat_session_close",{session_id:this.sessionId}),this.inactiveTimeout.stop(),this.waitingListTimeout.stop(),sessionStorage.removeItem("unfinished_message"),this.onInitialQueueDelayId&&clearTimeout(this.onInitialQueueDelayId),this.setSessionId(void 0)},n.prototype.toggle=function(e){return this.isOpen?this.close(e):this.open(e)},n.prototype.close=function(e){var t;if(this.isOpen)return this.initDelayId&&clearTimeout(this.initDelayId),this.sessionId&&(this.log.debug("session close before widget close"),this.sessionClose()),this.log.debug("close widget"),e&&e.stopPropagation(),this.isFullscreen&&this.enableScrollOnRoot(),t=this.el.clientHeight-this.el.querySelector(".zammad-chat-header").offsetHeight,this.el.addEventListener("transitionend",this.onCloseAnimationEnd),this.el.classList.add("zammad-chat--animate"),document.offsetHeight,this.el.style.transform="translateY("+t+"px)";this.log.debug("can't close widget, it's not open")},n.prototype.onCloseAnimationEnd=function(){var e;return this.el.removeEventListener("transitionend",this.onCloseAnimationEnd),this.el.classList.remove("zammad-chat-is-open","zammad-chat--animate"),this.el.style.transform="",this.showLoader(),this.el.querySelector(".zammad-chat-welcome").classList.remove("zammad-chat-is-hidden"),this.el.querySelector(".zammad-chat-agent").classList.add("zammad-chat-is-hidden"),this.el.querySelector(".zammad-chat-agent-status").classList.add("zammad-chat-is-hidden"),this.isOpen=!1,"function"==typeof(e=this.options).onCloseAnimationEnd&&e.onCloseAnimationEnd(),this.io.reconnect()},n.prototype.onWebSocketClose=function(){if(!this.isOpen)return this.el?(this.el.classList.remove("zammad-chat-is-shown"),this.el.classList.remove("zammad-chat-is-loaded")):void 0},n.prototype.show=function(){if("offline"!==this.state)return this.el.classList.add("zammad-chat-is-loaded"),this.el.classList.add("zammad-chat-is-shown")},n.prototype.disableInput=function(){return this.inputDisabled=!0,this.input.setAttribute("contenteditable",!1),this.el.querySelector(".zammad-chat-send").disabled=!0,this.io.close()},n.prototype.enableInput=function(){return this.inputDisabled=!1,this.input.setAttribute("contenteditable",!0),this.el.querySelector(".zammad-chat-send").disabled=!1},n.prototype.hideModal=function(){return this.el.querySelector(".zammad-chat-modal").innerHTML=""},n.prototype.onQueueScreen=function(e){var t,n;if(this.setSessionId(e.session_id),t=function(){return n.onQueue(e),n.waitingListTimeout.start()},!(n=this).initialQueueDelay||this.onInitialQueueDelayId)return this.onInitialQueueDelayId&&clearTimeout(this.onInitialQueueDelayId),t();this.onInitialQueueDelayId=setTimeout(t,this.initialQueueDelay)},n.prototype.onQueue=function(e){return this.log.notice("onQueue",e.position),this.inQueue=!0,this.el.querySelector(".zammad-chat-modal").innerHTML=this.view("waiting")({position:e.position})},n.prototype.onAgentTypingStart=function(){if(this.stopTypingId&&clearTimeout(this.stopTypingId),this.stopTypingId=setTimeout(this.onAgentTypingEnd,3e3),!this.el.querySelector(".zammad-chat-message--typing")&&(this.maybeAddTimestamp(),this.body.insertAdjacentHTML("beforeend",this.view("typingIndicator")()),this.isVisible(this.el.querySelector(".zammad-chat-message--typing"),!0)))return this.scrollToBottom()},n.prototype.onAgentTypingEnd=function(){if(this.el.querySelector(".zammad-chat-message--typing"))return this.el.querySelector(".zammad-chat-message--typing").remove()},n.prototype.onLeaveTemporary=function(){if(this.sessionId)return this.send("chat_session_leave_temporary",{session_id:this.sessionId})},n.prototype.maybeAddTimestamp=function(){var e,t,n;if(n=Date.now(),!this.lastTimestamp||n-this.lastTimestamp>6e4*this.showTimeEveryXMinutes)return e=this.T("Today"),t=(new Date).toTimeString().substr(0,5),"timestamp"===this.lastAddedType?(this.updateLastTimestamp(e,t),this.lastTimestamp=n):(this.body.insertAdjacentHTML("beforeend",this.view("timestamp")({label:e,time:t})),this.lastTimestamp=n,this.lastAddedType="timestamp",this.scrollToBottom())},n.prototype.updateLastTimestamp=function(e,t){var n;if(this.el&&(n=this.el.querySelectorAll(".zammad-chat-body .zammad-chat-timestamp")))return n[n.length-1].outerHTML=this.view("timestamp")({label:e,time:t})},n.prototype.addStatus=function(e){if(this.el)return this.maybeAddTimestamp(),this.body.insertAdjacentHTML("beforeend",this.view("status")({status:e})),this.scrollToBottom()},n.prototype.detectScrolledtoBottom=function(){var e;if(e=this.body.scrollTop+this.body.offsetHeight,this.scrolledToBottom=Math.abs(e-this.body.scrollHeight)<=this.scrollSnapTolerance,this.scrolledToBottom)return this.el.querySelector(".zammad-scroll-hint").classList.add("is-hidden")},n.prototype.showScrollHint=function(){return this.el.querySelector(".zammad-scroll-hint").classList.remove("is-hidden"),this.body.scrollTop=this.body.scrollTop+this.el.querySelector(".zammad-scroll-hint").offsetHeight},n.prototype.onScrollHintClick=function(){return this.body.scrollTo({top:this.body.scrollHeight,behavior:"smooth"})},n.prototype.scrollToBottom=function(e){var t;return t=(null!=e?e:{showHint:!1}).showHint,this.scrolledToBottom?this.body.scrollTop=this.body.scrollHeight:t?this.showScrollHint():void 0},n.prototype.destroy=function(e){var t;return null==e&&(e={}),this.log.debug("destroy widget",e),this.setAgentOnlineState("offline"),e.remove&&this.el&&(this.el.remove(),(t=document.querySelector("."+this.options.buttonClass))&&(t.classList.add(this.options.inactiveClass),t.style.display="none")),this.waitingListTimeout&&this.waitingListTimeout.stop(),this.inactiveTimeout&&this.inactiveTimeout.stop(),this.idleTimeout&&this.idleTimeout.stop(),this.io.close()},n.prototype.reconnect=function(){return this.log.notice("reconnecting"),this.disableInput(),this.lastAddedType="status",this.setAgentOnlineState("connecting"),this.addStatus(this.T("Connection lost"))},n.prototype.onConnectionReestablished=function(){var e;return this.lastAddedType="status",this.setAgentOnlineState("online"),this.addStatus(this.T("Connection re-established")),"function"==typeof(e=this.options).onConnectionReestablished?e.onConnectionReestablished():void 0},n.prototype.onSessionClosed=function(e){var t;return this.addStatus(this.T("Chat closed by %s",e.realname)),this.disableInput(),this.setAgentOnlineState("offline"),this.inactiveTimeout.stop(),"function"==typeof(t=this.options).onSessionClosed?t.onSessionClosed(e):void 0},n.prototype.setSessionId=function(e){return void 0===(this.sessionId=e)?sessionStorage.removeItem("sessionId"):sessionStorage.setItem("sessionId",e)},n.prototype.onConnectionEstablished=function(e){var t;return this.onInitialQueueDelayId&&clearTimeout(this.onInitialQueueDelayId),this.inQueue=!1,e.agent&&(this.agent=e.agent),e.session_id&&this.setSessionId(e.session_id),this.body.innerHTML="",this.el.querySelector(".zammad-chat-agent").innerHTML=this.view("agent")({agent:this.agent}),this.enableInput(),this.hideModal(),this.el.querySelector(".zammad-chat-welcome").classList.add("zammad-chat-is-hidden"),this.el.querySelector(".zammad-chat-agent").classList.remove("zammad-chat-is-hidden"),this.el.querySelector(".zammad-chat-agent-status").classList.remove("zammad-chat-is-hidden"),this.isFullscreen||this.input.focus(),this.setAgentOnlineState("online"),this.waitingListTimeout.stop(),this.idleTimeout.stop(),this.inactiveTimeout.start(),"function"==typeof(t=this.options).onConnectionEstablished?t.onConnectionEstablished(e):void 0},n.prototype.showCustomerTimeout=function(){return this.el.querySelector(".zammad-chat-modal").innerHTML=this.view("customer_timeout")({agent:this.agent.name,delay:this.options.inactiveTimeout}),this.el.querySelector(".js-restart").addEventListener("click",function(){return location.reload()}),this.sessionClose()},n.prototype.showWaitingListTimeout=function(){return this.el.querySelector(".zammad-chat-modal").innerHTML=this.view("waiting_list_timeout")({delay:this.options.watingListTimeout}),this.el.querySelector(".js-restart").addEventListener("click",function(){return location.reload()}),this.sessionClose()},n.prototype.showLoader=function(){return this.el.querySelector(".zammad-chat-modal").innerHTML=this.view("loader")()},n.prototype.setAgentOnlineState=function(e){var t;if(this.state=e,this.el)return t=e.charAt(0).toUpperCase()+e.slice(1),this.el.querySelector(".zammad-chat-agent-status").dataset.status=e,this.el.querySelector(".zammad-chat-agent-status").textContent=this.T(t)},n.prototype.detectHost=function(){var e;return e="ws://","https"===c&&(e="wss://"),this.options.host=""+e+l+"/ws"},n.prototype.loadCss=function(){var e,t,n;if(this.options.cssAutoload)return(n=this.options.cssUrl)||(n=this.options.host.replace(/^wss/i,"https").replace(/^ws/i,"http").replace(/\/ws$/i,""),n+="/assets/chat/chat.css"),this.log.debug("load css from '"+n+"'"),t="@import url('"+n+"');",(e=document.createElement("link")).onload=this.onCssLoaded,e.rel="stylesheet",e.href="data:text/css,"+escape(t),document.getElementsByTagName("head")[0].appendChild(e)},n.prototype.onCssLoaded=function(){var e;return this.cssLoaded=!0,this.socketReady&&this.onReady(),"function"==typeof(e=this.options).onCssLoaded?e.onCssLoaded():void 0},n.prototype.startTimeoutObservers=function(){var e,t,n;return this.idleTimeout=new a({logPrefix:"idleTimeout",debug:this.options.debug,timeout:this.options.idleTimeout,timeoutIntervallCheck:this.options.idleTimeoutIntervallCheck,callback:(e=this,function(){return e.log.debug("Idle timeout reached, hide widget",new Date),e.destroy({remove:!0})})}),this.inactiveTimeout=new a({logPrefix:"inactiveTimeout",debug:this.options.debug,timeout:this.options.inactiveTimeout,timeoutIntervallCheck:this.options.inactiveTimeoutIntervallCheck,callback:(t=this,function(){return t.log.debug("Inactive timeout reached, show timeout screen.",new Date),t.showCustomerTimeout(),t.destroy({remove:!1})})}),this.waitingListTimeout=new a({logPrefix:"waitingListTimeout",debug:this.options.debug,timeout:this.options.waitingListTimeout,timeoutIntervallCheck:this.options.waitingListTimeoutIntervallCheck,callback:(n=this,function(){return n.log.debug("Waiting list timeout reached, show timeout screen.",new Date),n.showWaitingListTimeout(),n.destroy({remove:!1})})})},n.prototype.disableScrollOnRoot=function(){return this.rootScrollOffset=this.scrollRoot.scrollTop,this.scrollRoot.style.overflow="hidden",this.scrollRoot.style.position="fixed"},n.prototype.enableScrollOnRoot=function(){return this.scrollRoot.scrollTop=this.rootScrollOffset,this.scrollRoot.style.overflow="",this.scrollRoot.style.position=""},n.prototype.isVisible=function(e,n,s,o){var i,a,r,l,c,d,u,h,m,p;if(!(e.length<1))return p=O.innerWidth,m=O.innerHeight,o=o||"both",a=!0!==s||t.offsetWidth*t.offsetHeight,u=0<=(d=e.getBoundingClientRect()).top&&d.top<m,i=0<d.bottom&&d.bottom<=m,l=0<=d.left&&d.left<p,c=0<d.right&&d.right<=p,h=n?u||i:u&&i,r=n?l||c:l&&c,"both"===o?a&&h&&r:"vertical"===o?a&&h:"horizontal"===o?a&&r:void 0},n.prototype.isRetina=function(){var e;return!!O.matchMedia&&((e=O.matchMedia("only screen and (min--moz-device-pixel-ratio: 1.3), only screen and (-o-min-device-pixel-ratio: 2.6/2), only screen and (-webkit-min-device-pixel-ratio: 1.3), only screen and (min-device-pixel-ratio: 1.3), only screen and (min-resolution: 1.3dppx)"))&&e.matches||1<O.devicePixelRatio)},n.prototype.resizeImage=function(e,i,a,r,l,c,d,t){var u;return null==i&&(i="auto"),null==a&&(a="auto"),null==r&&(r=1),null==t&&(t=!0),(u=new Image).onload=function(){var e,t,n,s,o;return n=u.width,t=u.height,console.log("ImageService","current size",n,t),"auto"===a&&"auto"===i&&(i=n,a=t),"auto"===a&&(a=t/(n/i)),"auto"===i&&(i=t/(n/a)),o=!1,i<n||a<t?(o=!0,i*=r,a*=r):(i=n,a=t),(e=document.createElement("canvas")).width=i,e.height=a,e.getContext("2d").drawImage(u,0,0,i,a),"auto"===c&&(c=i<200&&a<200?1:i<400&&a<400?.9:i<600&&a<600?.8:i<900&&a<900?.7:.6),s=e.toDataURL(l,c),o?(console.log("ImageService","resize",i/r,a/r,c,.75*s.length/1024/1024,"in mb"),void d(s,i/r,a/r,!0)):(console.log("ImageService","no resize",i,a,c,.75*s.length/1024/1024,"in mb"),d(s,i,a,!1))},u.src=e},n.prototype.pasteHtmlAtCaret=function(e){var t,n,s,o,i,a;if(i=a=void 0,O.getSelection){if((a=O.getSelection()).getRangeAt&&a.rangeCount){for((i=a.getRangeAt(0)).deleteContents(),(t=document.createElement("div")).innerHTML=e,n=document.createDocumentFragment(o,s);o=t.firstChild;)s=n.appendChild(o);if(i.insertNode(n),s)return(i=i.cloneRange()).setStartAfter(s),i.collapse(!0),a.removeAllRanges(),a.addRange(i)}}else if(document.selection&&"Control"!==document.selection.type)return document.selection.createRange().pasteHTML(e)},n.prototype.wordFilter=function(e){var t,n,s,o,i,a,r,l,c,d,u,h,m,p,g,f,y,v,b,w,S,T,C,k,z,A,L,x,O,E,I,_,D,M,R,j,H,N,q,P;for(t=(t=(t=(t=(t=e.html()).replace(/<!--[\s\S]+?-->/gi,"")).replace(/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,"")).replace(/<(\/?)s>/gi,"<$1strike>")).replace(/ /gi," "),e.innerHTML=t,i=0,c=(A=e.querySelectorAll("p")).length;i<c;i++)q=(T=A[i]).getAttribute("style"),(b=/mso-list:\w+ \w+([0-9]+)/.exec(q))&&(T.dataset._listLevel=parseInt(b[1],10));for(C=null,a=l=0,d=(L=e.querySelectorAll("p")).length;a<d;a++)if(void 0!==(n=(T=L[a]).dataset._listLevel)){if(P=T.textContent,y="<ul></ul>",/^\s*\w+\./.test(P)&&(y=(b=/([0-9])\./.exec(P))?null!=(O=1<(N=parseInt(b[1],10)))?O:'<ol start="'+N+{'"></ol>':"<ol></ol>"}:"<ol></ol>"),l<n&&(0===l&&(T.insertAdjacentHTML("beforebegin",y),C=T.previousElementSibling),C.insertAdjacentHTML("beforeend",y)),n<l)for(o=r=E=o,I=l-n;E<=I?r<=I:I<=r;o=E<=I?++r:--r)C=C.parentNode;T.querySelector("span:first")&&T.querySelector("span:first").remove(),C.insertAdjacentHTML("beforeend","<li>"+T.innerHTML+"</li>"),T.remove(),l=n}else l=0;for(v=0,u=(_=e.querySelectorAll("[style]")).length;v<u;v++)(s=_[v]).removeAttribute("style");for(w=0,h=(D=e.querySelectorAll("[align]")).length;w<h;w++)(s=D[w]).removeAttribute("align");for(S=0,m=(M=e.querySelectorAll("span")).length;S<m;S++)(s=M[S]).outerHTML=s.innerHTML;for(k=0,p=(R=e.querySelectorAll("span:empty")).length;k<p;k++)(s=R[k]).remove();for(z=0,g=(j=e.querySelectorAll("[class^='Mso']")).length;z<g;z++)(s=j[z]).removeAttribute("class");for(H=0,f=(x=e.querySelectorAll("p:empty")).length;H<f;H++)(s=x[H]).remove();return e},n.prototype.removeAttribute=function(e){var t,n,s,o,i;if(e){for(i=[],n=0,s=(o=e.attributes).length;n<s;n++)t=o[n],i.push(e.removeAttribute(t.name));return i}},n.prototype.removeAttributes=function(e){var t,n,s,o;for(t=0,n=(o=e.querySelectorAll("*")).length;t<n;t++)s=o[t],this.removeAttribute(s);return e},n}(),O.ZammadChat=e}(window),window.zammadChatTemplates||(window.zammadChatTemplates={}),window.zammadChatTemplates.chat=function(e){e||(e={});var t=[],n=function(e){return e&&e.ecoSafe?e:void 0!==e&&null!=e?o(e):""},s=e.safe,o=e.escape;return e.safe=function(e){if(e&&e.ecoSafe)return e;void 0!==e&&null!=e||(e="");var t=new String(e);return t.ecoSafe=!0,t},o||(o=e.escape=function(e){return(""+e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}),function(){(function(){t.push('<div class="zammad-chat'),this.flat&&t.push(n(" zammad-chat--flat")),t.push('"'),this.fontSize&&t.push(n(" style='font-size: "+this.fontSize+"'")),t.push('>\n <div class="zammad-chat-header js-chat-open"'),this.background&&t.push(n(" style='background: "+this.background+"'")),t.push('>\n <div class="zammad-chat-header-controls js-chat-toggle">\n <span class="zammad-chat-agent-status zammad-chat-is-hidden js-chat-status" data-status="online"></span>\n <span class="zammad-chat-header-icon">\n <svg class="zammad-chat-header-icon-open" width="13" height="7" viewBox="0 0 13 7"><path d="M10.807 7l1.4-1.428-5-4.9L6.5-.02l-.7.7-4.9 4.9 1.414 1.413L6.5 2.886 10.807 7z" fill-rule="evenodd"/></svg>\n <svg class="zammad-chat-header-icon-close" width="13" height="13" viewBox="0 0 13 13"><path d="m2.241.12l-2.121 2.121 4.243 4.243-4.243 4.243 2.121 2.121 4.243-4.243 4.243 4.243 2.121-2.121-4.243-4.243 4.243-4.243-2.121-2.121-4.243 4.243-4.243-4.243" fill-rule="evenodd"/></svg>\n </span>\n </div>\n <div class="zammad-chat-agent zammad-chat-is-hidden">\n </div>\n <div class="zammad-chat-welcome">\n <svg class="zammad-chat-icon" viewBox="0 0 24 24" width="24" height="24"><path d="M2 5C2 4 3 3 4 3h16c1 0 2 1 2 2v10C22 16 21 17 20 17H4C3 17 2 16 2 15V5zM12 17l6 4v-4h-6z"/></svg>\n <span class="zammad-chat-welcome-text">'),t.push(this.T(this.title)),t.push('</span>\n </div>\n </div>\n <div class="zammad-chat-modal"></div>\n <div class="zammad-scroll-hint is-hidden">\n <svg class="zammad-scroll-hint-icon" width="20" height="18" viewBox="0 0 20 18"><path d="M0,2.00585866 C0,0.898053512 0.898212381,0 1.99079514,0 L18.0092049,0 C19.1086907,0 20,0.897060126 20,2.00585866 L20,11.9941413 C20,13.1019465 19.1017876,14 18.0092049,14 L1.99079514,14 C0.891309342,14 0,13.1029399 0,11.9941413 L0,2.00585866 Z M10,14 L16,18 L16,14 L10,14 Z" fill-rule="evenodd"/></svg>\n '),t.push(this.T(this.scrollHint)),t.push('\n </div>\n <div class="zammad-chat-body"></div>\n <form class="zammad-chat-controls">\n <div class="zammad-chat-input" rows="1" placeholder="'),t.push(this.T("Compose your message…")),t.push('" contenteditable="true"></div>\n <button type="submit" class="zammad-chat-button zammad-chat-send"'),this.background&&t.push(n(" style='background: "+this.background+"'")),t.push(">"),t.push(this.T("Send")),t.push("</button>\n </form>\n</div>")}).call(this)}.call(e),e.safe=s,e.escape=o,t.join("")},window.zammadChatTemplates||(window.zammadChatTemplates={}),window.zammadChatTemplates.customer_timeout=function(e){e||(e={});var t=[],n=e.safe,s=e.escape;return e.safe=function(e){if(e&&e.ecoSafe)return e;void 0!==e&&null!=e||(e="");var t=new String(e);return t.ecoSafe=!0,t},s||(s=e.escape=function(e){return(""+e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}),function(){(function(){var e;t.push('<div class="zammad-chat-modal-text">\n '),this.agent?(t.push("\n "),t.push(this.T("Since you didn't respond in the last %s minutes your conversation with <strong>%s</strong> got closed.",this.delay,this.agent))):(t.push("\n "),t.push(this.T("Since you didn't respond in the last %s minutes your conversation got closed.",this.delay))),t.push("\n "),t.push('\n <br>\n <div class="zammad-chat-button js-restart"'),this.background&&t.push((e=" style='background: "+this.background+"'")&&e.ecoSafe?e:void 0!==e&&null!=e?s(e):""),t.push(">"),t.push(this.T("Start new conversation")),t.push("</div>\n</div>")}).call(this)}.call(e),e.safe=n,e.escape=s,t.join("")},window.zammadChatTemplates||(window.zammadChatTemplates={}),window.zammadChatTemplates.loader=function(e){e||(e={});var t=[],n=e.safe,s=e.escape;return e.safe=function(e){if(e&&e.ecoSafe)return e;void 0!==e&&null!=e||(e="");var t=new String(e);return t.ecoSafe=!0,t},s||(s=e.escape=function(e){return(""+e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}),function(){(function(){t.push('<span class="zammad-chat-loading-animation">\n <span class="zammad-chat-loading-circle"></span>\n <span class="zammad-chat-loading-circle"></span>\n <span class="zammad-chat-loading-circle"></span>\n</span>\n<span class="zammad-chat-modal-text">'),t.push(this.T("Connecting")),t.push("</span>")}).call(this)}.call(e),e.safe=n,e.escape=s,t.join("")},window.zammadChatTemplates||(window.zammadChatTemplates={}),window.zammadChatTemplates.message=function(e){e||(e={});var t=[],n=function(e){return e&&e.ecoSafe?e:void 0!==e&&null!=e?o(e):""},s=e.safe,o=e.escape;return e.safe=function(e){if(e&&e.ecoSafe)return e;void 0!==e&&null!=e||(e="");var t=new String(e);return t.ecoSafe=!0,t},o||(o=e.escape=function(e){return(""+e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}),function(){(function(){t.push('<div class="zammad-chat-message zammad-chat-message--'),t.push(n(this.from)),t.push(n(this.unreadClass)),t.push('">\n <span class="zammad-chat-message-body"'),this.background&&"customer"===this.from&&t.push(n(" style='background: "+this.background+"'")),t.push(">"),t.push(this.message),t.push("</span>\n</div>")}).call(this)}.call(e),e.safe=s,e.escape=o,t.join("")},window.zammadChatTemplates||(window.zammadChatTemplates={}),window.zammadChatTemplates.status=function(e){e||(e={});var t=[],n=e.safe,s=e.escape;return e.safe=function(e){if(e&&e.ecoSafe)return e;void 0!==e&&null!=e||(e="");var t=new String(e);return t.ecoSafe=!0,t},s||(s=e.escape=function(e){return(""+e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}),function(){(function(){t.push('<div class="zammad-chat-status">\n <div class="zammad-chat-status-inner">\n '),t.push(this.status),t.push("\n </div>\n</div>")}).call(this)}.call(e),e.safe=n,e.escape=s,t.join("")},window.zammadChatTemplates||(window.zammadChatTemplates={}),window.zammadChatTemplates.timestamp=function(e){e||(e={});var t=[],n=function(e){return e&&e.ecoSafe?e:void 0!==e&&null!=e?o(e):""},s=e.safe,o=e.escape;return e.safe=function(e){if(e&&e.ecoSafe)return e;void 0!==e&&null!=e||(e="");var t=new String(e);return t.ecoSafe=!0,t},o||(o=e.escape=function(e){return(""+e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}),function(){(function(){t.push('<div class="zammad-chat-timestamp"><strong>'),t.push(n(this.label)),t.push("</strong> "),t.push(n(this.time)),t.push("</div>")}).call(this)}.call(e),e.safe=s,e.escape=o,t.join("")},window.zammadChatTemplates||(window.zammadChatTemplates={}),window.zammadChatTemplates.typingIndicator=function(e){e||(e={});var t=[],n=e.safe,s=e.escape;return e.safe=function(e){if(e&&e.ecoSafe)return e;void 0!==e&&null!=e||(e="");var t=new String(e);return t.ecoSafe=!0,t},s||(s=e.escape=function(e){return(""+e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}),function(){(function(){t.push('<div class="zammad-chat-message zammad-chat-message--typing zammad-chat-message--agent">\n <span class="zammad-chat-message-body">\n <span class="zammad-chat-loading-animation">\n <span class="zammad-chat-loading-circle"></span>\n <span class="zammad-chat-loading-circle"></span>\n <span class="zammad-chat-loading-circle"></span>\n </span>\n </span>\n</div>')}).call(this)}.call(e),e.safe=n,e.escape=s,t.join("")},window.zammadChatTemplates||(window.zammadChatTemplates={}),window.zammadChatTemplates.waiting=function(e){e||(e={});var t=[],n=e.safe,s=e.escape;return e.safe=function(e){if(e&&e.ecoSafe)return e;void 0!==e&&null!=e||(e="");var t=new String(e);return t.ecoSafe=!0,t},s||(s=e.escape=function(e){return(""+e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}),function(){(function(){t.push('<div class="zammad-chat-modal-text">\n <span class="zammad-chat-loading-animation">\n <span class="zammad-chat-loading-circle"></span>\n <span class="zammad-chat-loading-circle"></span>\n <span class="zammad-chat-loading-circle"></span>\n </span>\n '),t.push(this.T("All colleagues are busy.")),t.push("<br>\n "),t.push(this.T("You are on waiting list position <strong>%s</strong>.",this.position)),t.push("\n</div>")}).call(this)}.call(e),e.safe=n,e.escape=s,t.join("")},window.zammadChatTemplates||(window.zammadChatTemplates={}),window.zammadChatTemplates.waiting_list_timeout=function(e){e||(e={});var t=[],n=e.safe,s=e.escape;return e.safe=function(e){if(e&&e.ecoSafe)return e;void 0!==e&&null!=e||(e="");var t=new String(e);return t.ecoSafe=!0,t},s||(s=e.escape=function(e){return(""+e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}),function(){(function(){var e;t.push('<div class="zammad-chat-modal-text">\n '),t.push(this.T("We are sorry, it takes longer as expected to get an empty slot. Please try again later or send us an email. Thank you!")),t.push('\n <br>\n <div class="zammad-chat-button js-restart"'),this.background&&t.push((e=" style='background: "+this.background+"'")&&e.ecoSafe?e:void 0!==e&&null!=e?s(e):""),t.push(">"),t.push(this.T("Start new conversation")),t.push("</div>\n</div>")}).call(this)}.call(e),e.safe=n,e.escape=s,t.join("")};
|