4495331f805913be8b5b4e7af5c5520cfb647287b86543f855a0ac44fcb3c77a

Source Code:

!function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,n){var i;
/*!
 * EventEmitter v5.2.8 - git.io/ee
 * Unlicense - http://unlicense.org/
 * Oliver Caldwell - https://oli.me.uk/
 * @preserve
 */!function(t){"use strict";function o(){}var s=o.prototype,r=t.EventEmitter;function a(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function c(e){return function(){return this[e].apply(this,arguments)}}s.getListeners=function(e){var t,n,i=this._getEvents();if(e instanceof RegExp)for(n in t={},i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n]);else t=i[e]||(i[e]=[]);return t},s.flattenListeners=function(e){var t,n=[];for(t=0;t<e.length;t+=1)n.push(e[t].listener);return n},s.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&((t={})[e]=n),t||n},s.addListener=function(e,t){if(!function e(t){return"function"==typeof t||t instanceof RegExp||!(!t||"object"!=typeof t)&&e(t.listener)}(t))throw new TypeError("listener must be a function");var n,i=this.getListenersAsObject(e),o="object"==typeof t;for(n in i)i.hasOwnProperty(n)&&-1===a(i[n],t)&&i[n].push(o?t:{listener:t,once:!1});return this},s.on=c("addListener"),s.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},s.once=c("addOnceListener"),s.defineEvent=function(e){return this.getListeners(e),this},s.defineEvents=function(e){for(var t=0;t<e.length;t+=1)this.defineEvent(e[t]);return this},s.removeListener=function(e,t){var n,i,o=this.getListenersAsObject(e);for(i in o)o.hasOwnProperty(i)&&-1!==(n=a(o[i],t))&&o[i].splice(n,1);return this},s.off=c("removeListener"),s.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},s.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},s.manipulateListeners=function(e,t,n){var i,o,s=e?this.removeListener:this.addListener,r=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(i=n.length;i--;)s.call(this,t,n[i]);else for(i in t)t.hasOwnProperty(i)&&(o=t[i])&&("function"==typeof o?s.call(this,i,o):r.call(this,i,o));return this},s.removeEvent=function(e){var t,n=typeof e,i=this._getEvents();if("string"===n)delete i[e];else if(e instanceof RegExp)for(t in i)i.hasOwnProperty(t)&&e.test(t)&&delete i[t];else delete this._events;return this},s.removeAllListeners=c("removeEvent"),s.emitEvent=function(e,t){var n,i,o,s,r=this.getListenersAsObject(e);for(s in r)if(r.hasOwnProperty(s))for(n=r[s].slice(0),o=0;o<n.length;o++)!0===(i=n[o]).once&&this.removeListener(e,i.listener),i.listener.apply(this,t||[])===this._getOnceReturnValue()&&this.removeListener(e,i.listener);return this},s.trigger=c("emitEvent"),s.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},s.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},s._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},s._getEvents=function(){return this._events||(this._events={})},o.noConflict=function(){return t.EventEmitter=r,o},void 0===(i=function(){return o}.call(t,n,t,e))||(e.exports=i)}("undefined"!=typeof window?window:this||{})},function(e,t,n){"use strict";n.r(t),n.d(t,"validCallbacks",(function(){return p}));var i=n(0),o=n.n(i);const s=()=>{};window.RocketChat=window.RocketChat||{_:[]};const r={};let a,c,u,d,l=[],h=!1,f=!1;const p=["chat-maximized","chat-minimized","chat-started","chat-ended","pre-chat-form-submit","offline-form-submit","show-widget","hide-widget","assign-agent","agent-status-change","queue-position-change","no-agent-online"],m=new o.a;function g(e,t){return-1!==p.indexOf(e)&&m.on(e,t)}function w(e,t){void 0!==t?m.emit(e,t):m.emit(e)}function v(e,t){if(!h)return l.push([e,t]);const n={src:"rocketchat",fn:e,args:t};c.contentWindow.postMessage(n,"*")}const y=e=>{f&&e?(d=document.documentElement.scrollTop,u=document.body.style.cssText,document.body.style.cssText+=`overflow: hidden; height: 100%; width: 100%; position: fixed; top: ${d}px;`):(document.body.style.cssText=u,f&&(document.documentElement.scrollTop=d)),e?(a.style.left=f?"0":"auto",a.style.width=f?"100%":"397px",a.style.height=f?"100%":"627px"):(a.style.left="auto",a.style.width="86px",a.style.height="86px")},b=()=>{"opened"!==a.dataset.state&&(y(!0),a.dataset.state="opened",c.focus(),w("chat-maximized"))};function x(){"closed"!==a.dataset.state&&(y(!1),a.dataset.state="closed",w("chat-minimized"))}const E={popup:null,ready(){h=!0,l.length>0&&(l.forEach((function(e){v.apply(this,e)})),l=[])},minimizeWindow(){x()},restoreWindow(){E.popup&&!0!==E.popup.closed&&(E.popup.close(),E.popup=null),b()},openPopout(){x(),E.popup=window.open(`${r.url}${r.url.lastIndexOf("?")>-1?"&":"?"}mode=popout`,"livechat-popout","width=365, height=525, toolbars=no"),E.popup.focus()},openWidget(){b()},removeWidget(){document.body.removeChild(a)},callback(e,t){w(e,t)},showWidget(){c.style.display="initial",w("show-widget")},hideWidget(){c.style.display="none",w("hide-widget")}};function L(e){v("pageVisited",{change:e,location:JSON.parse(JSON.stringify(document.location)),title:document.title})}function O(e,t,n){void 0===n&&(n=!0),v("setCustomField",[e,t,n])}function k(e){v("setTheme",e)}function C(e){v("setDepartment",e)}function R(e){v("setGuestToken",e)}function _(e){v("setGuestName",e)}function W(e){v("setGuestEmail",e)}function j(e){v("registerGuest",e)}function P(e){v("setAgent",e)}function z(e){v("setLanguage",e)}const A={href:null,title:null},T=e=>{e&&(r.url=e,(e=>{(a=document.createElement("div")).className="rocketchat-widget",a.style.position="fixed",a.style.width="86px",a.style.height="86px",a.style.maxHeight="100vh",a.style.bottom="0",a.style.right="0",a.style.zIndex="12345",a.dataset.state="closed";const t=document.createElement("div");t.className="rocketchat-container",t.style.width="100%",t.style.height="100%",(c=document.createElement("iframe")).id="rocketchat-iframe",c.allowTransparency="true",c.src=e,c.style.width="100%",c.style.height="100%",c.style.border="none",c.style.backgroundColor="transparent",t.appendChild(c),a.appendChild(t),document.body.appendChild(a);const n=({matches:e})=>{a&&(f=e,y("opened"===a.dataset.state),v("setExpanded",f))},i=window.matchMedia("screen and (max-device-width: 480px)");i.addListener(n),n(i)})(e),window.addEventListener("message",e=>{if("object"==typeof e.data&&void 0!==e.data.src&&"rocketchat"===e.data.src&&void 0!==E[e.data.fn]&&"function"==typeof E[e.data.fn]){const t=[].concat(e.data.args||[]);s(`api.${e.data.fn}`,...t),E[e.data.fn].apply(null,t)}},!1),setInterval(()=>{document.location.href!==A.href&&(L("url"),A.href=document.location.href),document.title!==A.title&&(L("title"),A.title=document.title)},800))};void 0!==window.initRocket&&(console.warn("initRocket is now deprecated. Please update the livechat code."),T(window.initRocket[0])),void 0!==window.RocketChat.url&&T(window.RocketChat.url);const S=window.RocketChat._;window.RocketChat._.push=function(e){e.call(window.RocketChat.livechat)},window.RocketChat=window.RocketChat._.push,window.RocketChat.livechat={pageVisited:L,setCustomField:O,initialize:function(e){for(const t in e)switch(t){case"customField":const{key:n,value:i,overwrite:o}=e[t];O(n,i,o);continue;case"setCustomFields":if(!Array.isArray(e[t])){console.log("Error: Invalid parameters. Value must be an array of objects");continue}e[t].forEach(e=>{const{key:t,value:n,overwrite:i}=e;O(t,n,i)});continue;case"theme":k(e[t]);continue;case"department":C(e[t]);continue;case"guestToken":R(e[t]);continue;case"guestName":_(e[t]);continue;case"guestEmail":W(e[t]);continue;case"registerGuest":j(e[t]);continue;case"language":z(e[t]);continue;case"agent":P(e[t]);continue;default:continue}},setTheme:k,setDepartment:C,clearDepartment:function(){v("clearDepartment")},setGuestToken:R,setGuestName:_,setGuestEmail:W,setAgent:P,registerGuest:j,setLanguage:z,showWidget:function(){v("showWidget")},hideWidget:function(){v("hideWidget")},maximizeWidget:function(){v("maximizeWidget")},minimizeWidget:function(){v("minimizeWidget")},onChatMaximized(e){g("chat-maximized",e)},onChatMinimized(e){g("chat-minimized",e)},onChatStarted(e){g("chat-started",e)},onChatEnded(e){g("chat-ended",e)},onPrechatFormSubmit(e){g("pre-chat-form-submit",e)},onOfflineFormSubmit(e){g("offline-form-submit",e)},onWidgetShown(e){g("show-widget",e)},onWidgetHidden(e){g("hide-widget",e)},onAssignAgent(e){g("assign-agent",e)},onAgentStatusChange(e){g("agent-status-change",e)},onQueuePositionChange(e){g("queue-position-change",e)},onServiceOffline(e){g("no-agent-online",e)}},S.forEach(e=>{e.call(window.RocketChat.livechat)})}]);