!function(e){!function(e){!function(e){!function(e){e.AjaxService=class{constructor(e){this.apiKey=e}get(e,t){var i=new XMLHttpRequest;i.open("GET",e),i.setRequestHeader("X-Gnatta-WebChat-ApiKey",this.apiKey),i.onreadystatechange=()=>{4===i.readyState&&t(JSON.parse(i.responseText))},i.send()}put(e,t,i){var n=new XMLHttpRequest;n.open("PUT",e,!0),n.setRequestHeader("Content-type","application/json"),n.setRequestHeader("X-Gnatta-WebChat-ApiKey",this.apiKey),n.onreadystatechange=()=>{if(4===n.readyState&&200===n.status){var e=n.responseText?JSON.parse(n.responseText):null;i(e)}},n.send(t)}post(e,t,i,n){var a=new XMLHttpRequest;a.open("POST",e+t,!0),a.setRequestHeader("Content-type","application/json"),a.setRequestHeader("X-Gnatta-WebChat-ApiKey",this.apiKey),a.onreadystatechange=()=>{4===a.readyState&&200===a.status&&n(JSON.parse(a.responseText))},a.send(i)}}}(e.Services||(e.Services={}))}(e.WebChat||(e.WebChat={}))}(e.Web||(e.Web={}))}(Gnatta||(Gnatta={})),function(e){!function(e){!function(e){!function(e){e.ChatService=class{constructor(t,i){this.settings=t,this.log=i,this.ajaxService=new e.AjaxService(this.settings.apiKey)}initialise(e){this.getInstances((t=>{this.chatInstances=t,e()}))}registerInstance(e,t,i,n){this.chatConfigurations=i,this.chatConfigurations.length>0&&(this.chatConfigurations.forEach((i=>{i.visitId=t,i.originatorId=e,i.onConfigurationReady=n})),this.ajaxService.put(this.settings.apiHost+"/api/availability/chaturl",JSON.stringify({}),(e=>{this.chatUrl=e,this.getAvailabilityAndShowButton()})))}registerFirstMessage(e,t){const i={Message:t};this.ajaxService.put(this.settings.apiHost+`/api/originator/visit/${e}/first-message`,JSON.stringify(i),null)}getInstance(e){const t=this.chatInstances.filter((t=>t.id.toLowerCase()===e.toLowerCase()));return t.length>0?t[0]:null}handleAvailabilityCheckTimeout(){setTimeout((()=>{this.getAvailabilityAndShowButton()}),this.chatConfigurations[0].pollInterval)}getAvailabilityAndShowButton(){var e=[];this.chatConfigurations.forEach((t=>e.push({id:t.id}))),this.ajaxService.put(this.settings.apiHost+"/api/availability",JSON.stringify(e),(e=>{this.chatConfigurations.forEach((t=>{e.forEach((e=>{t.id.toUpperCase()===e.id.toUpperCase()&&this.chatInstances.forEach((i=>{i.id.toUpperCase()===t.id.toUpperCase()&&(this.renderButtonStatus(t,e.status),"Available"!==e.status&&i.fallbackEnabled?t.onConfigurationReady({config:t,href:`${this.chatUrl}/#/emailFallback/${t.id}/${this.settings.apiKey}/${t.originatorId}/${t.visitId}`,domain:this.chatUrl,enabled:!0}):t.onConfigurationReady({config:t,href:`${this.chatUrl}/#/${t.id}/${this.settings.apiKey}/${t.originatorId}/${t.visitId}`,domain:this.chatUrl,enabled:"Available"===e.status}))}))}))})),this.handleAvailabilityCheckTimeout()}))}renderButtonStatus(e,t){switch(t){case"Available":this.removeCssClass(e.availableElement,"hidden"),this.addCssClass(e.busyElement,"hidden"),this.addCssClass(e.offlineElement,"hidden"),this.showElement(e.availableElement),this.hideElement(e.busyElement),this.hideElement(e.offlineElement);break;case"Offline":this.removeCssClass(e.offlineElement,"hidden"),this.addCssClass(e.busyElement,"hidden"),this.addCssClass(e.availableElement,"hidden"),this.showElement(e.offlineElement),this.hideElement(e.busyElement),this.hideElement(e.availableElement);break;default:e.hideBusy?(this.removeCssClass(e.availableElement,"hidden"),this.addCssClass(e.busyElement,"hidden"),this.addCssClass(e.offlineElement,"hidden"),this.showElement(e.availableElement),this.hideElement(e.busyElement),this.hideElement(e.offlineElement)):(this.removeCssClass(e.busyElement,"hidden"),this.addCssClass(e.availableElement,"hidden"),this.addCssClass(e.offlineElement,"hidden"),this.showElement(e.busyElement),this.hideElement(e.availableElement),this.hideElement(e.offlineElement))}}addCssClass(e,t){if(null!==e){const i=document.getElementById(e);i.className.indexOf(t)<0&&(i.className=i.className.trim()+" "+t)}}removeCssClass(e,t){if(null!==e){const i=document.getElementById(e);i.className=i.className.replace(t,"").trim()}}hideElement(e){if(null!==e){document.getElementById(e).setAttribute("style","display:none !important;")}}showElement(e){if(null!==e){document.getElementById(e).setAttribute("style","")}}getInstances(e){this.ajaxService.get(`${this.settings.apiHost}/api/instance`,(t=>{e(t)}))}}}(e.Services||(e.Services={}))}(e.WebChat||(e.WebChat={}))}(e.Web||(e.Web={}))}(Gnatta||(Gnatta={})),function(e){!function(e){!function(e){!function(e){e.CookieService=class{create(e,t,i,n){let a;if(n){const e=new Date;e.setTime(e.getTime()+24*n*60*60*1e3),a="; expires="+e.toUTCString()}else a="";document.cookie=e+"="+t+a+";"+i+";path=/"}get(e){const t=document.cookie.match("(^|;) ?"+e+"=([^;]*)(;|$)");return t?t[2]:null}delete(e,t){this.create(e,"",t,-1)}}}(e.Services||(e.Services={}))}(e.WebChat||(e.WebChat={}))}(e.Web||(e.Web={}))}(Gnatta||(Gnatta={})),function(e){!function(e){!function(e){!function(e){e.VisitModel=class{constructor(e,t,i,n){this.Id=e,this.PageUrl=t,this.Source=i,this.Type=n}}}(e.Models||(e.Models={}))}(e.WebChat||(e.WebChat={}))}(e.Web||(e.Web={}))}(Gnatta||(Gnatta={})),function(e){!function(e){!function(e){!function(e){e.UserAgentModel=class{constructor(){this.BrowserCodeName=navigator.appCodeName,this.BrowserName=navigator.appName,this.BrowserVersion=navigator.appVersion,this.Platform=navigator.platform,this.FullUserAgent=navigator.userAgent,this.UserLanguage=navigator.userLanguage,this.SupportsDownloads=this.doesBrowserSupportDownloadAttachments()}doesBrowserSupportDownloadAttachments(){var e=document.getElementsByTagName("a");return null!=e&&e.length>0?void 0!==e[0].download||null!=navigator.msSaveOrOpenBlob:void 0!==document.createElement("a").download||null!=navigator.msSaveOrOpenBlob}}}(e.Models||(e.Models={}))}(e.WebChat||(e.WebChat={}))}(e.Web||(e.Web={}))}(Gnatta||(Gnatta={})),function(e){!function(e){!function(e){!function(e){e.OriginatorModel=class{constructor(e,t){this.UserAgent=e,this.Visits=new Array,this.Visits.push(t)}}}(e.Models||(e.Models={}))}(e.WebChat||(e.WebChat={}))}(e.Web||(e.Web={}))}(Gnatta||(Gnatta={})),function(e){!function(e){!function(e){!function(t){var i=e.Models.OriginatorModel,n=e.Models.UserAgentModel;t.WebChatOriginatorFactory=class{constructor(e){this.log=e}create(e){return new i(new n,e)}}}(e.Factories||(e.Factories={}))}(e.WebChat||(e.WebChat={}))}(e.Web||(e.Web={}))}(Gnatta||(Gnatta={})),function(e){!function(e){!function(e){!function(e){e.OriginatorResponseModel=class{constructor(e,t){this.originatorId=e,this.visitId=t}}}(e.Models||(e.Models={}))}(e.WebChat||(e.WebChat={}))}(e.Web||(e.Web={}))}(Gnatta||(Gnatta={})),function(e){!function(e){!function(e){!function(t){var i=e.Factories.WebChatOriginatorFactory,n=e.Services.AjaxService,a=e.Services.CookieService,s=e.Models.OriginatorResponseModel,o=e.Models.VisitModel;t.CreateOriginatorTrackingCommand=class{constructor(e,t){this.settings=e,this.log=t,this.webChatOriginatorFactory=new i(this.log),this.ajaxService=new n(this.settings.apiKey),this.cookieService=new a}execute(e,t){const i=this,n=this.webChatOriginatorFactory.create(new o(null,window.location.href,window.location.hostname,"website"));this.ajaxService.put(this.settings.apiHost+"/api/originator/create",JSON.stringify(n),(e=>{const n=window.location.hostname;i.cookieService.create(i.settings.originatorCookieKey,e.id,n,2),t(new s(e.id,e.visitId))}))}}}(e.Commands||(e.Commands={}))}(e.WebChat||(e.WebChat={}))}(e.Web||(e.Web={}))}(Gnatta||(Gnatta={})),function(e){!function(e){!function(e){!function(t){var i=e.Models.OriginatorResponseModel,n=e.Services.AjaxService,a=e.Factories.WebChatOriginatorFactory,s=e.Models.VisitModel;t.AddVisitToOriginatorTrackingCommand=class{constructor(e,t){this.settings=e,this.log=t,this.ajaxService=new n(this.settings.apiKey),this.webChatOriginatorFactory=new a(this.log)}execute(e,t){const n=this.webChatOriginatorFactory.create(new s(null,window.location.href,window.location.hostname,"website"));this.ajaxService.post(this.settings.apiHost+"/api/originator/visit/",e,JSON.stringify(n),(n=>{t(new i(e,n.visitId))}))}}}(e.Commands||(e.Commands={}))}(e.WebChat||(e.WebChat={}))}(e.Web||(e.Web={}))}(Gnatta||(Gnatta={})),function(e){!function(e){!function(e){!function(t){var i=e.Commands.CreateOriginatorTrackingCommand,n=e.Commands.AddVisitToOriginatorTrackingCommand;t.OriginatorTrackingCommandFactory=class{constructor(e,t){this.settings=e,this.log=t}create(e){return null==e?new i(this.settings,this.log):new n(this.settings,this.log)}}}(e.Factories||(e.Factories={}))}(e.WebChat||(e.WebChat={}))}(e.Web||(e.Web={}))}(Gnatta||(Gnatta={})),function(e){!function(e){!function(e){!function(t){var i=e.Factories.OriginatorTrackingCommandFactory;t.OriginatorTrackingService=class{constructor(e,n){this.settings=e,this.log=n,this.cookieService=new t.CookieService,this.originatorTrackingCommandFactory=new i(this.settings,this.log)}track(e){const t=this.cookieService.get(this.settings.originatorCookieKey),i=this.originatorTrackingCommandFactory.create(t);return null==i?null:i.execute(t,e)}}}(e.Services||(e.Services={}))}(e.WebChat||(e.WebChat={}))}(e.Web||(e.Web={}))}(Gnatta||(Gnatta={})),function(e){!function(e){!function(e){!function(e){!function(e){e[e.Info=0]="Info",e[e.Debug=1]="Debug",e[e.Warning=2]="Warning",e[e.Error=3]="Error",e[e.None=4]="None"}(e.LogLevel||(e.LogLevel={}));e.LogLevel}(e.Enums||(e.Enums={}))}(e.WebChat||(e.WebChat={}))}(e.Web||(e.Web={}))}(Gnatta||(Gnatta={}));var Gnatta,LogLevel=Gnatta.Web.WebChat.Enums.LogLevel;!function(e){!function(e){!function(e){!function(e){e.LoggerService=class{constructor(e,t){this.console=e,this.logLevel=t,null==t&&(this.logLevel=LogLevel.None)}info(e){this.log(e,LogLevel.Info)}debug(e){this.log(e,LogLevel.Debug)}warning(e){this.log(e,LogLevel.Warning)}error(e){this.log(e,LogLevel.Error)}log(e,t){t>=this.logLevel&&this.console.log(`${LogLevel[t].toUpperCase()}: ${e}`)}}}(e.Services||(e.Services={}))}(e.WebChat||(e.WebChat={}))}(e.Web||(e.Web={}))}(Gnatta||(Gnatta={})),function(e){!function(e){!function(e){!function(e){e.DynamicDataModel=class{constructor(e,t,i){this.OriginatorId=e,this.VisitId=t,this.DynamicData=i}}}(e.Models||(e.Models={}))}(e.WebChat||(e.WebChat={}))}(e.Web||(e.Web={}))}(Gnatta||(Gnatta={})),function(e){!function(e){!function(e){!function(t){var i=e.Models.DynamicDataModel;t.DynamicDataService=class{constructor(e,i,n){this.apiHost=e,this.apiKey=i,this.originatorId=n,this.ajaxService=new t.AjaxService(i),this.cookieService=new t.CookieService}putData(e,t){if(t.length>=1){const n=new i(this.originatorId,e,t);this.ajaxService.put(this.apiHost+"/api/dynamicdata",JSON.stringify(n),(e=>e))}}}}(e.Services||(e.Services={}))}(e.WebChat||(e.WebChat={}))}(e.Web||(e.Web={}))}(Gnatta||(Gnatta={})),function(e){!function(e){!function(e){!function(t){var i=e.Services.CookieService;t.InlineChatSessionTrackingService=class{constructor(){this.activeSessionCookieKey="GnattaActiveChatSession",this.cookieService=new i}storeActiveChat(e){this.cookieService.create(this.activeSessionCookieKey,e,this.cookieDomain(),0)}relaunchInlineChat(e,t){const i=this.cookieService.get(this.activeSessionCookieKey);null!==i&&e(i,t)}removeActiveChat(){this.cookieService.delete(this.activeSessionCookieKey,this.cookieDomain())}cookieDomain(){return window.location.hostname}}}(e.Services||(e.Services={}))}(e.WebChat||(e.WebChat={}))}(e.Web||(e.Web={}))}(Gnatta||(Gnatta={})),function(e){!function(e){!function(e){!function(t){var i=e.Services.AjaxService;t.UpdateOriginatorCommand=class{constructor(e,t){this.apiHost=e,this.ajaxService=new i(t)}execute(e,t){this.ajaxService.put(this.apiHost+"/api/originator/"+e,JSON.stringify(t),(()=>{}))}}}(e.Commands||(e.Commands={}))}(e.WebChat||(e.WebChat={}))}(e.Web||(e.Web={}))}(Gnatta||(Gnatta={})),function(e){!function(e){!function(e){!function(e){e.UpdateOriginatorModel=class{constructor(e,t){this.name=e,this.emailAddress=t}}}(e.Models||(e.Models={}))}(e.WebChat||(e.WebChat={}))}(e.Web||(e.Web={}))}(Gnatta||(Gnatta={})),function(e){!function(e){!function(e){!function(e){e.EventHandlerModel=class{constructor(e,t){this.key=e,this.callback=t}}}(e.Models||(e.Models={}))}(e.WebChat||(e.WebChat={}))}(e.Web||(e.Web={}))}(Gnatta||(Gnatta={})),function(e){!function(e){!function(e){!function(e){!function(e){e[e.Started=0]="Started",e[e.Opened=1]="Opened",e[e.Assigned=2]="Assigned",e[e.Finished=3]="Finished"}(e.Event||(e.Event={}));e.Event}(e.Enums||(e.Enums={}))}(e.WebChat||(e.WebChat={}))}(e.Web||(e.Web={}))}(Gnatta||(Gnatta={})),function(e){!function(t){!function(t){var i=t.Services.ChatService,n=t.Services.OriginatorTrackingService,a=t.Models.EventHandlerModel,s=t.Services.LoggerService,o=t.Services.DynamicDataService,r=e.Web.WebChat.Services.CookieService,c=e.Web.WebChat.Services.InlineChatSessionTrackingService,l=t.Models.UpdateOriginatorModel,h=t.Commands.UpdateOriginatorCommand,d=e.Web.WebChat.Enums.Event;t.Init=class{constructor(e){this.options=e,this.log=new s(console,e.logLevel),this.cookieService=new r,this.dynamicDataCache=[],this.chatConfigurations=[],this.chatInstancesDetail=[],this.waitingTrackingResponses=[],this.existingOriginatorResult=null,this.inlineChatFrameId="inline-gnatta-webchat",this.inlineChatSessionTrackingService=new c,this.originatorId="",this.eventHandlers=[]}startTracking(){const e=this;this.originatorTrackingService=new n(this.options,this.log),this.originatorTrackingService.track((t=>{e.originatorId=t.originatorId,e.existingOriginatorResult=t,e.waitingTrackingResponses.forEach((e=>{e(t)})),this.sendDynamicData(t.originatorId,t.visitId)}))}bindButtons(e){const t=this;this.chatConfigurations.forEach((i=>{e===i.availableElement&&null!=e&&(t.bindButton(i.availableElement),t.bindButton(i.busyElement),t.bindButton(i.offlineElement))}))}bindButton(e){const t=this;document.getElementById(e).addEventListener("click",(()=>{const i=t.chatInstancesDetail.filter((t=>t.config.availableElement===e||t.config.busyElement===e||t.config.offlineElement===e))[0];if(i&&(i.enabled||i.config.hideBusy)){if(i.config.firstMessageElementId&&i.config.firstMessageElementId.length>0){const e=document.getElementById(i.config.firstMessageElementId).value;t.chatService.registerFirstMessage(i.config.visitId,e)}t.launchChat(t.chatService.getInstance(i.config.id),i.href),t.handleEvent(d.Opened.toString())}}),!1)}handleEvent(e){const t=this.eventHandlers.find((t=>t.key===e));return t?Promise.resolve(t.callback()):Promise.resolve()}launchChat(e,t){if(e&&e.inlineMode){var i=document.getElementById(this.inlineChatFrameId);i?i.parentElement.classList.contains("gnatta-inline-webchat-collapse")&&(i.parentElement.classList.remove("gnatta-inline-webchat-collapse"),i.parentElement.classList.add("gnatta-inline-webchat")):(this.launchInlineChat(t,this.inlineChatFrameId),this.inlineChatSessionTrackingService.storeActiveChat(t))}else window.open(t,"__gnatta-chat-popup-window_"+e.id,"width=400,height=600").focus()}launchInlineChat(e,t){const i=document.createElement("div"),n=document.createElement("iframe");i.appendChild(n),n.src=e;var a=(new r).get("InlineChatIsMinimized");i.className=a?"gnatta-inline-webchat-collapse":"gnatta-inline-webchat",n.id=t;const s=430,o=900;if(Math.min(window.innerWidth,window.innerHeight)<=s&&Math.max(window.innerWidth,window.innerHeight)<=o){const e=document.createElement("meta");e.name="viewport",e.content="width=device-width, height=device-height,initial-scale=1.0, maximum-scale=1.0, user-scalable=no",document.getElementsByTagName("head")[0].appendChild(e),i.classList.add("fullscreen"),a||window.parent.postMessage({command:"inline-chat-window-maximise"},"*")}document.body.appendChild(i)}killInlineChat(){const e=document.getElementById(this.inlineChatFrameId);e&&(document.body.removeChild(e.parentElement),this.inlineChatSessionTrackingService.removeActiveChat())}redirectTo(e){const t=String(e||"");t.startsWith("/")&&(document.location.href=t)}reset(){const e=document.getElementById(this.inlineChatFrameId);e&&document.body.removeChild(e.parentElement),this.handleEvent(d.Finished.toString()).then((()=>{this.inlineChatSessionTrackingService.removeActiveChat(),this.chatService.initialise((()=>{this.startTracking()})),this.autoDisplay()}))}autoDisplay(){const e=this,t=t=>{null!==t.originatorId&&null!=t.visitId&&setTimeout((()=>{let i=e.chatConfigurations[0];i.visitId=t.visitId,e.chatConfigurations[0]=i,e.chatService.registerInstance(t.originatorId,t.visitId,e.chatConfigurations,(t=>{for(var i=e.chatInstancesDetail.length;i--;)e.chatInstancesDetail[i].config.id===t.config.id&&e.chatInstancesDetail[i].config.availableElement===t.config.availableElement&&e.chatInstancesDetail.splice(i,1);e.chatInstancesDetail.push(t)})),setTimeout((()=>{e.bindButtons(i.availableElement)}),300)}),0)};null!==this.existingOriginatorResult?t(this.existingOriginatorResult):e.waitingTrackingResponses.push(t)}handleMessages(e){if(!this.chatInstancesDetail.filter((t=>t.domain.toLowerCase()===e.origin.toLowerCase()))[0])return;const t=document.getElementById(this.inlineChatFrameId),i=t&&t.parentElement;switch(e.data.command){case"get-minimised":return void e.source.postMessage({command:"is-minimised",minimised:this.cookieService.get("InlineChatIsMinimized")},e.origin);case"chat-started":return void this.handleEvent(d.Started.toString());case"chat-assigned":return void this.handleEvent(d.Assigned.toString());case"restart-chat-session":return this.reset(),void this.cookieService.delete("InlineChatIsMinimized","");case"end-chat-session":return void this.inlineChatSessionTrackingService.removeActiveChat();case"inline-chat-window-minimise":return i&&(i.classList.remove("gnatta-inline-webchat"),i.classList.add("gnatta-inline-webchat-collapse"),this.toggleInlineChatScrollLock(i,!1)),void this.cookieService.create("InlineChatIsMinimized","true","",0);case"inline-chat-window-maximise":return i&&(i.classList.remove("gnatta-inline-webchat-collapse"),i.classList.add("gnatta-inline-webchat"),this.toggleInlineChatScrollLock(i,!0)),void this.cookieService.delete("InlineChatIsMinimized","");case"inline-chat-window-close":return this.killInlineChat(),i&&this.toggleInlineChatScrollLock(i,!1),void this.cookieService.delete("InlineChatIsMinimized","");case"window-redirect":return this.redirectTo(e.data.completionRedirectUrl),void this.inlineChatSessionTrackingService.removeActiveChat()}}toggleInlineChatScrollLock(e,t){if(e.classList.contains("fullscreen")){const e=document.getElementsByTagName("html")[0],i=document.getElementsByTagName("body")[0];t?(e.classList.add("gnatta-inline-webchat-host-fullscreen"),i.classList.add("gnatta-inline-webchat-host-fullscreen")):(e.classList.remove("gnatta-inline-webchat-host-fullscreen"),i.classList.remove("gnatta-inline-webchat-host-fullscreen"))}}sendDynamicData(e,t){const i=this,n=i.cookieService.get("GnattaWebChatApiKey"),a=i.cookieService.get("GnattaApiHost");null!==e&&null!==n&&null!=a&&(this.timeout=setTimeout((()=>{new o(a,n,e).putData(t,i.dynamicDataCache),i.dynamicDataCache=[],i.sendDynamicData(e,t)}),500))}updateOriginator(e,t){const i=this;if(!i.originatorId)return;const n=i.cookieService.get("GnattaWebChatApiKey"),a=i.cookieService.get("GnattaApiHost");if(null===n||null==a)return;const s=new h(a,n),o=new l(e,t);s.execute(i.originatorId,o)}display(e,t,i,n,a){const s=this,o=null!=a&&null!=a.delay?a.delay:0,r=r=>{null!==r.originatorId&&null!=r.visitId&&setTimeout((()=>{const o={id:e,availableElement:t,busyElement:i,offlineElement:n,firstMessageElementId:a?a.firstMessageElementId:null,pollInterval:1e4,originatorId:r.originatorId,visitId:r.visitId,status:"Busy",hideBusy:a&&a.hideBusy,onConfigurationReady:null};s.chatConfigurations.push(o),s.chatService.registerInstance(r.originatorId,r.visitId,s.chatConfigurations,(e=>{for(var t=s.chatInstancesDetail.length;t--;)s.chatInstancesDetail[t].config.id===e.config.id&&s.chatInstancesDetail[t].config.availableElement===e.config.availableElement&&s.chatInstancesDetail.splice(t,1);s.chatInstancesDetail.push(e)})),setTimeout((()=>{s.bindButtons(t)}),300)}),1e3*o)};null!==this.existingOriginatorResult?r(this.existingOriginatorResult):s.waitingTrackingResponses.push(r)}setup(e,t){this.options.apiKey=e,this.options.apiHost=t;const n=window.location.hostname;this.cookieService.create("GnattaWebChatApiKey",e,n,365),this.cookieService.create("GnattaApiHost",t,n,365);null===this.cookieService.get("GnattaActiveChatSession")&&(this.existingOriginatorResult=null,this.waitingTrackingResponses=[],clearTimeout(this.timeout)),this.chatService=new i(this.options,this.log),window.addEventListener("message",(e=>this.handleMessages(e)),!1),this.chatService.initialise((()=>{this.startTracking(),this.inlineChatSessionTrackingService.relaunchInlineChat(this.launchInlineChat,this.inlineChatFrameId)}))}set(e,t){this.dynamicDataCache.push({typeId:e,value:t})}setOriginator(e,t){this.updateOriginator(e,t)}start(e,t){this.setup(e,t)}register(e,t,i,n){this.display(e,t,i,n)}registerWithOptions(e,t,i,n,a){this.display(e,t,i,n,a)}configure(e,t){this.setup(e,t)}initiate(e,t,i,n,a){this.display(e,t,i,n,a)}on(e,t){const i=d[e].toString();null!==i&&(this.eventHandlers.some((e=>e.key===i))&&(this.eventHandlers=this.eventHandlers.filter((e=>e.key!==i))),this.eventHandlers.push(new a(i,t)))}}}(t.WebChat||(t.WebChat={}))}(e.Web||(e.Web={}))}(Gnatta||(Gnatta={}));var gnatta=new Gnatta.Web.WebChat.Init({apiHost:"",apiKey:"",logLevel:Gnatta.Web.WebChat.Enums.LogLevel.Info,originatorCookieKey:"GnattaWebChatOriginator",chatUrl:""});