")),console.log("p",n,L),"html"===n){for(y=!1,o=(e=document.createElement("div")).innerHTML=L,k=new RegExp("<(/w|w):[A-Za-z]"),o.match(k)&&(y=!0,o=o.replace(k,"")),k=new RegExp("<(/o|o):[A-Za-z]"),o.match(k)&&(y=!0,o=o.replace(k,"")),y&&(e=this.wordFilter(e)),l=0,h=(S=e.childNodes).length;l
new Date((new Date).getTime()-1500)))return this.isTyping=new Date,this.send("chat_session_typing",{session_id:this.sessionId}),this.inactiveTimeout.start()},g.prototype.onSubmit=function(e){return e.preventDefault(),this.sendMessage()},g.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})},g.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})},g.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))},g.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:I.location.href}));this.log.debug("widget already open, block")},g.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},g.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)},g.prototype.toggle=function(e){return this.isOpen?this.close(e):this.open(e)},g.prototype.close=function(e){var t;if(this.isOpen){if(this.initDelayId&&clearTimeout(this.initDelayId),this.sessionId)return this.log.debug("close widget"),e&&e.stopPropagation(),this.sessionClose(),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 without sessionId")}else this.log.debug("can't close widget, it's not open")},g.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()},g.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},g.prototype.show=function(){if("offline"!==this.state)return this.el.classList.add("zammad-chat-is-loaded"),this.el.classList.add("zammad-chat-is-shown")},g.prototype.disableInput=function(){return this.input.disabled=!0,this.el.querySelector(".zammad-chat-send").disabled=!0},g.prototype.enableInput=function(){return this.input.disabled=!1,this.el.querySelector(".zammad-chat-send").disabled=!1},g.prototype.hideModal=function(){return this.el.querySelector(".zammad-chat-modal").innerHTML=""},g.prototype.onQueueScreen=function(e){var t,s;if(this.setSessionId(e.session_id),t=function(){return s.onQueue(e),s.waitingListTimeout.start()},!(s=this).initialQueueDelay||this.onInitialQueueDelayId)return this.onInitialQueueDelayId&&clearTimeout(this.onInitialQueueDelayId),t();this.onInitialQueueDelayId=setTimeout(t,this.initialQueueDelay)},g.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})},g.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()},g.prototype.onAgentTypingEnd=function(){if(this.el.querySelector(".zammad-chat-message--typing"))return this.el.querySelector(".zammad-chat-message--typing").remove()},g.prototype.onLeaveTemporary=function(){if(this.sessionId)return this.send("chat_session_leave_temporary",{session_id:this.sessionId})},g.prototype.maybeAddTimestamp=function(){var e,t,s;if(s=Date.now(),!this.lastTimestamp||s-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=s):(this.body.insertAdjacentHTML("beforeend",this.view("timestamp")({label:e,time:t})),this.lastTimestamp=s,this.lastAddedType="timestamp",this.scrollToBottom())},g.prototype.updateLastTimestamp=function(e,t){var s;if(this.el&&(s=this.el.querySelectorAll(".zammad-chat-body .zammad-chat-timestamp")))return s[s.length-1].outerHTML=this.view("timestamp")({label:e,time:t})},g.prototype.addStatus=function(e){if(this.el)return this.maybeAddTimestamp(),this.body.insertAdjacentHTML("beforeend",this.view("status")({status:e})),this.scrollToBottom()},g.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")},g.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},g.prototype.onScrollHintClick=function(){return this.body.scrollTo({top:this.body.scrollHeight,behavior:"smooth"})},g.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},g.prototype.destroy=function(e){return null==e&&(e={}),this.log.debug("destroy widget",e),this.setAgentOnlineState("offline"),e.remove&&this.el&&this.el.remove(),this.waitingListTimeout&&this.waitingListTimeout.stop(),this.inactiveTimeout&&this.inactiveTimeout.stop(),this.idleTimeout&&this.idleTimeout.stop(),this.io.close()},g.prototype.reconnect=function(){return this.log.notice("reconnecting"),this.disableInput(),this.lastAddedType="status",this.setAgentOnlineState("connecting"),this.addStatus(this.T("Connection lost"))},g.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},g.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},g.prototype.setSessionId=function(e){return void 0===(this.sessionId=e)?sessionStorage.removeItem("sessionId"):sessionStorage.setItem("sessionId",e)},g.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},g.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()},g.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()},g.prototype.showLoader=function(){return this.el.querySelector(".zammad-chat-modal").innerHTML=this.view("loader")()},g.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)},g.prototype.detectHost=function(){var e;return e="ws://","https"===l&&(e="wss://"),this.options.host=""+e+r+"/ws"},g.prototype.loadCss=function(){var e,t,s;if(this.options.cssAutoload)return(s=this.options.cssUrl)||(s=this.options.host.replace(/^wss/i,"https").replace(/^ws/i,"http").replace(/\/ws/i,""),s+="/assets/chat/chat.css"),this.log.debug("load css from '"+s+"'"),t="@import url('"+s+"');",(e=document.createElement("link")).onload=this.onCssLoaded,e.rel="stylesheet",e.href="data:text/css,"+escape(t),document.getElementsByTagName("head")[0].appendChild(e)},g.prototype.onCssLoaded=function(){var e;return this.cssLoaded=!0,this.socketReady&&this.onReady(),"function"==typeof(e=this.options).onCssLoaded?e.onCssLoaded():void 0},g.prototype.startTimeoutObservers=function(){var e,t,s;return this.idleTimeout=new i({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 i({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 i({logPrefix:"waitingListTimeout",debug:this.options.debug,timeout:this.options.waitingListTimeout,timeoutIntervallCheck:this.options.waitingListTimeoutIntervallCheck,callback:(s=this,function(){return s.log.debug("Waiting list timeout reached, show timeout screen.",new Date),s.showWaitingListTimeout(),s.destroy({remove:!1})})})},g.prototype.disableScrollOnRoot=function(){return this.rootScrollOffset=this.scrollRoot.scrollTop,this.scrollRoot.style.overflow="hidden",this.scrollRoot.style.position="fixed"},g.prototype.enableScrollOnRoot=function(){return this.scrollRoot.scrollTop=this.rootScrollOffset,this.scrollRoot.style.overflow="",this.scrollRoot.style.position=""},g.prototype.isVisible=function(e,s,n,o){var i,a,r,l,c,d,h,u,p,m;if(!(e.length<1))return m=I.innerWidth,p=I.innerHeight,o=o||"both",a=!0!==n||t.offsetWidth*t.offsetHeight,h=0<=(d=e.getBoundingClientRect()).top&&d.top/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=(L=e.querySelectorAll("p")).length;i",/^\s*\w+\./.test(W)&&(f=(b=/([0-9])\./.exec(W))?null!=(E=1<(P=parseInt(b[1],10)))?E:'
':"
"}:"
"),l"+T.innerHTML+""),T.remove(),l=s}else l=0;for(v=0,h=(_=e.querySelectorAll("[style]")).length;v/g,">").replace(/"/g,""")}),function(){(function(){t.push('\n \n \n \n\n'),t.push(this.T("Connecting")),t.push("")}).call(this)}.call(e),e.safe=s,e.escape=n,t.join("")},window.zammadChatTemplates||(window.zammadChatTemplates={}),window.zammadChatTemplates.message=function(e){function t(e){return e&&e.ecoSafe?e:void 0!==e&&null!=e?o(e):""}var s=[],n=(e=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,""")}),function(){(function(){s.push('\n "),s.push(this.message),s.push("\n
")}).call(this)}.call(e),e.safe=n,e.escape=o,s.join("")},window.zammadChatTemplates||(window.zammadChatTemplates={}),window.zammadChatTemplates.status=function(e){var t=[],s=(e=e||{}).safe,n=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},n=n||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}),function(){(function(){t.push('\n
\n '),t.push(this.status),t.push("\n
\n
")}).call(this)}.call(e),e.safe=s,e.escape=n,t.join("")},window.zammadChatTemplates||(window.zammadChatTemplates={}),window.zammadChatTemplates.timestamp=function(e){function t(e){return e&&e.ecoSafe?e:void 0!==e&&null!=e?o(e):""}var s=[],n=(e=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,""")}),function(){(function(){s.push(''),s.push(t(this.label)),s.push(" "),s.push(t(this.time)),s.push("
")}).call(this)}.call(e),e.safe=n,e.escape=o,s.join("")},window.zammadChatTemplates||(window.zammadChatTemplates={}),window.zammadChatTemplates.typingIndicator=function(e){var t=[],s=(e=e||{}).safe,n=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},n=n||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}),function(){(function(){t.push('\n \n \n \n \n \n \n \n
')}).call(this)}.call(e),e.safe=s,e.escape=n,t.join("")},window.zammadChatTemplates||(window.zammadChatTemplates={}),window.zammadChatTemplates.waiting=function(e){var t=[],s=(e=e||{}).safe,n=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},n=n||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}),function(){(function(){t.push('\n \n \n \n \n \n '),t.push(this.T("All colleagues are busy.")),t.push("
\n "),t.push(this.T("You are on waiting list position %s.",this.position)),t.push("\n
")}).call(this)}.call(e),e.safe=s,e.escape=n,t.join("")},window.zammadChatTemplates||(window.zammadChatTemplates={}),window.zammadChatTemplates.waiting_list_timeout=function(e){var t=[],s=(e=e||{}).safe,n=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},n=n||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}),function(){(function(){var e;t.push('\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
\n
"),t.push(this.T("Start new conversation")),t.push("
\n
")}).call(this)}.call(e),e.safe=s,e.escape=n,t.join("")};
\ No newline at end of file
diff --git a/public/assets/chat/chat.coffee b/public/assets/chat/chat.coffee
index 06354bc06..991f10ac6 100644
--- a/public/assets/chat/chat.coffee
+++ b/public/assets/chat/chat.coffee
@@ -278,6 +278,23 @@ do($ = window.jQuery, window) ->
'Since you didn\'t respond in the last %s minutes your conversation with %s got closed.': 'Si vous ne répondez pas dans les %s minutes, votre conversation avec %s va être 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. Je vous remercie!'
+ 'he':
+ 'Chat 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 %s.': 'מיקומך בתור %s.'
+ '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!': 'מצטערים, הזמן לקבלת נציג ארוך מהרגיל. נסה שוב מאוחר יותר או שלח לנו דוא"ל. תודה!'
'nl':
'Chat with us!': 'Chat met ons!'
'Scroll down to see new messages': 'Scrol naar beneden om nieuwe berichten te zien'
diff --git a/public/assets/chat/chat.js b/public/assets/chat/chat.js
index c93a08324..f9d290eae 100644
--- a/public/assets/chat/chat.js
+++ b/public/assets/chat/chat.js
@@ -59,6 +59,170 @@ window.zammadChatTemplates["agent"] = function(__obj) {
return __out.join('');
};
+if (!window.zammadChatTemplates) {
+ window.zammadChatTemplates = {};
+}
+window.zammadChatTemplates["chat"] = function(__obj) {
+ if (!__obj) __obj = {};
+ var __out = [], __capture = function(callback) {
+ var out = __out, result;
+ __out = [];
+ callback.call(this);
+ result = __out.join('');
+ __out = out;
+ return __safe(result);
+ }, __sanitize = function(value) {
+ if (value && value.ecoSafe) {
+ return value;
+ } else if (typeof value !== 'undefined' && value != null) {
+ return __escape(value);
+ } else {
+ return '';
+ }
+ }, __safe, __objSafe = __obj.safe, __escape = __obj.escape;
+ __safe = __obj.safe = function(value) {
+ if (value && value.ecoSafe) {
+ return value;
+ } else {
+ if (!(typeof value !== 'undefined' && value != null)) value = '';
+ var result = new String(value);
+ result.ecoSafe = true;
+ return result;
+ }
+ };
+ if (!__escape) {
+ __escape = __obj.escape = function(value) {
+ return ('' + value)
+ .replace(/&/g, '&')
+ .replace(//g, '>')
+ .replace(/"/g, '"');
+ };
+ }
+ (function() {
+ (function() {
+ __out.push('');
+
+ }).call(this);
+
+ }).call(__obj);
+ __obj.safe = __objSafe, __obj.escape = __escape;
+ return __out.join('');
+};
+
+if (!window.zammadChatTemplates) {
+ window.zammadChatTemplates = {};
+}
+window.zammadChatTemplates["customer_timeout"] = function(__obj) {
+ if (!__obj) __obj = {};
+ var __out = [], __capture = function(callback) {
+ var out = __out, result;
+ __out = [];
+ callback.call(this);
+ result = __out.join('');
+ __out = out;
+ return __safe(result);
+ }, __sanitize = function(value) {
+ if (value && value.ecoSafe) {
+ return value;
+ } else if (typeof value !== 'undefined' && value != null) {
+ return __escape(value);
+ } else {
+ return '';
+ }
+ }, __safe, __objSafe = __obj.safe, __escape = __obj.escape;
+ __safe = __obj.safe = function(value) {
+ if (value && value.ecoSafe) {
+ return value;
+ } else {
+ if (!(typeof value !== 'undefined' && value != null)) value = '';
+ var result = new String(value);
+ result.ecoSafe = true;
+ return result;
+ }
+ };
+ if (!__escape) {
+ __escape = __obj.escape = function(value) {
+ return ('' + value)
+ .replace(/&/g, '&')
+ .replace(//g, '>')
+ .replace(/"/g, '"');
+ };
+ }
+ (function() {
+ (function() {
+ __out.push('\n ');
+
+ if (this.agent) {
+ __out.push('\n ');
+ __out.push(this.T('Since you didn\'t respond in the last %s minutes your conversation with
%s got closed.', this.delay, this.agent));
+ __out.push('\n ');
+ } else {
+ __out.push('\n ');
+ __out.push(this.T('Since you didn\'t respond in the last %s minutes your conversation got closed.', this.delay));
+ __out.push('\n ');
+ }
+
+ __out.push('\n
\n
');
+
+ __out.push(this.T('Start new conversation'));
+
+ __out.push('
\n
');
+
+ }).call(this);
+
+ }).call(__obj);
+ __obj.safe = __objSafe, __obj.escape = __escape;
+ return __out.join('');
+};
+
var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
slice = [].slice,
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
@@ -468,6 +632,24 @@ var bind = function(fn, me){ return function(){ return fn.apply(me, arguments);
'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. Je vous remercie!'
},
+ 'he': {
+ 'Chat 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 %s.': 'מיקומך בתור %s.',
+ '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!': 'מצטערים, הזמן לקבלת נציג ארוך מהרגיל. נסה שוב מאוחר יותר או שלח לנו דוא"ל. תודה!'
+ },
'nl': {
'Chat with us!': 'Chat met ons!',
'Scroll down to see new messages': 'Scrol naar beneden om nieuwe berichten te zien',
@@ -1988,170 +2170,6 @@ var bind = function(fn, me){ return function(){ return fn.apply(me, arguments);
return window.ZammadChat = ZammadChat;
})(window.jQuery, window);
-if (!window.zammadChatTemplates) {
- window.zammadChatTemplates = {};
-}
-window.zammadChatTemplates["chat"] = function(__obj) {
- if (!__obj) __obj = {};
- var __out = [], __capture = function(callback) {
- var out = __out, result;
- __out = [];
- callback.call(this);
- result = __out.join('');
- __out = out;
- return __safe(result);
- }, __sanitize = function(value) {
- if (value && value.ecoSafe) {
- return value;
- } else if (typeof value !== 'undefined' && value != null) {
- return __escape(value);
- } else {
- return '';
- }
- }, __safe, __objSafe = __obj.safe, __escape = __obj.escape;
- __safe = __obj.safe = function(value) {
- if (value && value.ecoSafe) {
- return value;
- } else {
- if (!(typeof value !== 'undefined' && value != null)) value = '';
- var result = new String(value);
- result.ecoSafe = true;
- return result;
- }
- };
- if (!__escape) {
- __escape = __obj.escape = function(value) {
- return ('' + value)
- .replace(/&/g, '&')
- .replace(//g, '>')
- .replace(/"/g, '"');
- };
- }
- (function() {
- (function() {
- __out.push('');
-
- }).call(this);
-
- }).call(__obj);
- __obj.safe = __objSafe, __obj.escape = __escape;
- return __out.join('');
-};
-
-if (!window.zammadChatTemplates) {
- window.zammadChatTemplates = {};
-}
-window.zammadChatTemplates["customer_timeout"] = function(__obj) {
- if (!__obj) __obj = {};
- var __out = [], __capture = function(callback) {
- var out = __out, result;
- __out = [];
- callback.call(this);
- result = __out.join('');
- __out = out;
- return __safe(result);
- }, __sanitize = function(value) {
- if (value && value.ecoSafe) {
- return value;
- } else if (typeof value !== 'undefined' && value != null) {
- return __escape(value);
- } else {
- return '';
- }
- }, __safe, __objSafe = __obj.safe, __escape = __obj.escape;
- __safe = __obj.safe = function(value) {
- if (value && value.ecoSafe) {
- return value;
- } else {
- if (!(typeof value !== 'undefined' && value != null)) value = '';
- var result = new String(value);
- result.ecoSafe = true;
- return result;
- }
- };
- if (!__escape) {
- __escape = __obj.escape = function(value) {
- return ('' + value)
- .replace(/&/g, '&')
- .replace(//g, '>')
- .replace(/"/g, '"');
- };
- }
- (function() {
- (function() {
- __out.push('\n ');
-
- if (this.agent) {
- __out.push('\n ');
- __out.push(this.T('Since you didn\'t respond in the last %s minutes your conversation with
%s got closed.', this.delay, this.agent));
- __out.push('\n ');
- } else {
- __out.push('\n ');
- __out.push(this.T('Since you didn\'t respond in the last %s minutes your conversation got closed.', this.delay));
- __out.push('\n ');
- }
-
- __out.push('\n
\n
');
-
- __out.push(this.T('Start new conversation'));
-
- __out.push('
\n
');
-
- }).call(this);
-
- }).call(__obj);
- __obj.safe = __objSafe, __obj.escape = __escape;
- return __out.join('');
-};
-
if (!window.zammadChatTemplates) {
window.zammadChatTemplates = {};
}
diff --git a/public/assets/chat/chat.min.js b/public/assets/chat/chat.min.js
index 0b714390b..ebad98504 100644
--- a/public/assets/chat/chat.min.js
+++ b/public/assets/chat/chat.min.js
@@ -1 +1 @@
-window.zammadChatTemplates||(window.zammadChatTemplates={}),window.zammadChatTemplates.agent=function(t){function e(t){return t&&t.ecoSafe?t:void 0!==t&&null!=t?o(t):""}var s=[],n=(t=t||{}).safe,o=t.escape;return t.safe=function(t){if(t&&t.ecoSafe)return t;void 0!==t&&null!=t||(t="");var e=new String(t);return e.ecoSafe=!0,e},o=o||(t.escape=function(t){return(""+t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}),function(){(function(){this.agent.avatar&&(s.push('\n\n')),s.push('\n\n '),s.push(e(this.agent.name)),s.push("\n")}).call(this)}.call(t),t.safe=n,t.escape=o,s.join("")};var bind=function(t,e){return function(){return t.apply(e,arguments)}},slice=[].slice,extend=function(t,e){for(var s in e)hasProp.call(e,s)&&(t[s]=e[s]);function n(){this.constructor=t}return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},hasProp={}.hasOwnProperty;!function(_,E){var t,e,s,n,o,i,a,r;function l(t){this.options=_.extend({},this.defaults,t),this.log=new s({debug:this.options.debug,logPrefix:this.options.logPrefix||this.logPrefix})}function d(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=_.extend({},this.defaults,t)}function c(t){this.stop=bind(this.stop,this),this.start=bind(this.start,this),c.__super__.constructor.call(this,t)}function h(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),h.__super__.constructor.call(this,t)}function u(t){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.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=_.extend({},this.defaults,t),u.__super__.constructor.call(this,this.options),this.isFullscreen=E.matchMedia&&E.matchMedia("(max-width: 768px)").matches,this.scrollRoot=_(this.getScrollRoot()),_?E.WebSocket&&sessionStorage?this.options.chatId?(this.options.lang||(this.options.lang=_("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("lang: "+this.options.lang)),this.options.host||this.detectHost(),this.loadCss(),this.io=new e(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!")):(this.state="unsupported",void this.log.notice("Chat: no jquery found!"))}o=(r=document.getElementsByTagName("script"))[r.length-1],a=E.location.protocol.replace(":",""),o&&o.src&&(i=o.src.match(".*://([^:/]*).*")[1],a=o.src.match("(.*)://[^:/]*.*")[1]),l.prototype.defaults={debug:!1},t=l,d.prototype.defaults={debug:!1},d.prototype.debug=function(){var t;if(t=1<=arguments.length?slice.call(arguments,0):[],this.options.debug)return this.log("debug",t)},d.prototype.notice=function(){var t;return t=1<=arguments.length?slice.call(arguments,0):[],this.log("notice",t)},d.prototype.error=function(){var t;return t=1<=arguments.length?slice.call(arguments,0):[],this.log("error",t)},d.prototype.log=function(t,e){var s,n,o,i;if(e.unshift("||"),e.unshift(t),e.unshift(this.options.logPrefix),console.log.apply(console,e),this.options.debug){for(i="",n=0,o=e.length;n"+i+"