diff --git a/lhc_web/design/defaulttheme/js/widgetv2/6b5f759b84269b244c78.js.map b/lhc_web/design/defaulttheme/js/widgetv2/6b5f759b84269b244c78.js.map deleted file mode 100644 index 65b4b48a51..0000000000 --- a/lhc_web/design/defaulttheme/js/widgetv2/6b5f759b84269b244c78.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"6b5f759b84269b244c78.js","mappings":"mNAsPMA,EAAgB,IAnPhBC,WAEF,cAAc,eACVC,KAAKC,OAAS,GACdD,KAAKE,mBAAqB,KAC1BF,KAAKG,gBAAkB,KACvBH,KAAKI,WAAa,KAClBJ,KAAKK,WAAa,KAClBL,KAAKM,mBAAqB,GAE1BN,KAAKO,qBAAuB,KAC5BP,KAAKQ,oBAAsB,KAC3BR,KAAKS,sBAAwB,KAC7BT,KAAKU,UAAW,EAChBV,KAAKW,YAAa,E,wCAGtB,SAAUV,EAAQG,EAAYC,GAAY,WACtCL,KAAKC,OAASA,EACdD,KAAKI,WAAaA,EAClBJ,KAAKK,WAAaA,EAEdL,KAAKI,WAAWQ,OAAOC,OAAS,EAChCb,KAAKc,YAAYd,KAAKI,WAAWQ,QAEjCZ,KAAKe,iBAGyB,IAA9Bf,KAAKI,WAAWY,YAChBhB,KAAKiB,gBAAgBjB,KAAKI,WAAWY,YAIzChB,KAAKI,WAAWc,aAAaC,YAAY,YAAY,WACjD,EAAKJ,eAAe,CAACK,KAAM,OAG/BpB,KAAKI,WAAWc,aAAaC,YAAY,cAAc,WACnD,EAAKL,YAAY,EAAKV,WAAWQ,WAGrCZ,KAAKI,WAAWc,aAAaC,YAAY,mBAAmB,WACxD,EAAKF,gBAAgB,EAAKb,WAAWY,eAGzChB,KAAKI,WAAWc,aAAaC,YAAY,wBAAwB,WAC7D,EAAKJ,eAAe,CAACK,KAAM,OAG/BpB,KAAKI,WAAWc,aAAaC,YAAY,WAAW,WAC/C,EAAKJ,eAAe,CAACK,KAAM,OAGhCpB,KAAKI,WAAWiB,aAAaC,WAAU,SAAC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Aa,EAAK5C,sBAClB,EAAKA,qBAAuBgE,YAAY,WAjBxC,EAAKC,eAAe,CAAC,OAAWjD,EAAK8C,OAAQ,WAAeS,EAAKE,GAAI,YAAiBF,EAAK1C,YAAa,KAASb,EAAK+C,KAAM,YAAgBQ,EAAK7B,cAEjJE,aAAa,EAAK5C,sBAEbuE,EAAKW,aACN,CAAC,YAAY,YAAY,QAAQ,SAAS,WAAW,QAAQZ,SAAQ,SAACc,GAClET,EAAAA,EAAAA,SAA0B,oBAAoBS,MAGlD,CAAC,YAAY,SAAS,aAAa,YAAYd,SAAQ,SAACc,GACpDT,EAAAA,EAAAA,SAA0B,oBAAoBS,SAO6B,IAAhBb,EAAKc,YAG5E,EAAKF,4BAEL,CAAC,YAAY,YAAY,QAAQ,SAAS,WAAW,QAAQb,SAAQ,SAACQ,GAC9DH,EAAAA,EAAAA,OAAwBnB,OAAQsB,EAAO,EAAKK,0BAA2B,oBAAoBL,MAGnG,CAAC,YAAY,SAAS,aAAa,YAAYR,SAAQ,SAACQ,GACpDH,EAAAA,EAAAA,OAAwB5C,SAAU+C,EAAO,EAAKK,0BAA2B,oBAAoBL,mB,EAzOvHtF","sources":["webpack://LiveHelperChat/./src/util/proactiveChat.js"],"sourcesContent":["import {helperFunctions} from '../lib/helperFunctions';\nimport {domEventsHandler} from '../util/domEventsHandler';\n\nclass _proactiveChat {\n\n constructor() {\n this.params = {};\n this.timeoutStatuscheck = null;\n this.timeoutActivity = null;\n this.attributes = null;\n this.chatEvents = null;\n this.dynamicInvitations = [];\n\n this.iddleTimeoutActivity = null;\n this.checkMessageTimeout = null;\n this.nextRescheduleTimeout = null;\n this.initCall = true;\n this.inProgress = false;\n }\n\n setParams(params, attributes, chatEvents) {\n this.params = params;\n this.attributes = attributes;\n this.chatEvents = chatEvents;\n\n if (this.attributes.events.length > 0) {\n this.storeEvents(this.attributes.events);\n } else {\n this.initInvitation();\n }\n\n if (this.attributes.conversion != '') {\n this.storeConversion(this.attributes.conversion);\n }\n\n // check invitaiton then tag is added\n this.attributes.eventEmitter.addListener('tagAdded', () => {\n this.initInvitation({init: 0});\n });\n\n this.attributes.eventEmitter.addListener('eventAdded', () => {\n this.storeEvents(this.attributes.events);\n });\n\n this.attributes.eventEmitter.addListener('conversionAdded', () => {\n this.storeConversion(this.attributes.conversion);\n });\n\n this.attributes.eventEmitter.addListener('checkMessageOperator', () => {\n this.initInvitation({init: 0});\n });\n\n this.attributes.eventEmitter.addListener('endChat', () => {\n this.initInvitation({init: 0});\n });\n\n this.attributes.onlineStatus.subscribe((data) => {\n if (data == true) {\n this.initInvitation({init: 0});\n } else {\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n if (!chatParams['id'] && this.attributes.proactive.invitation) {\n this.attributes.proactive = {};\n if (this.attributes.mainWidget.isLoaded !== false) {\n this.chatEvents.sendChildEvent('proactive', [{}]);\n }\n this.attributes.mainWidget.hideInvitation();\n this.attributes.eventEmitter.emitEvent('closeWidget', [{'sender' : 'closeButton'}]);\n }\n }\n });\n }\n\n showInvitation(params, init) {\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n\n // Show invitation only if widget is not open\n if ((init === 0 && (this.attributes.widgetStatus.value === true && !this.attributes.mode == 'embed')) || chatParams['id']) {\n return;\n }\n\n if (params.inject_html && params.invitation) {\n var th = document.getElementsByTagName('head')[0];\n var s = document.createElement('script');\n s.setAttribute('type','text/javascript');\n s.setAttribute('src', this.attributes.LHC_API.args.lhc_base_url + this.attributes['lang'] + 'chat/htmlsnippet/'+params.invitation+'/inv/0/?ts='+Date.now());\n th.appendChild(s);\n }\n\n if (!params.only_inject) {\n this.attributes.proactive = params;\n\n if (this.attributes.mainWidget.isLoaded === false) {\n this.attributes.mainWidget.bootstrap();\n } else {\n this.chatEvents.sendChildEvent('proactive', [params]);\n }\n\n clearTimeout(this.checkMessageTimeout);\n clearTimeout(this.nextRescheduleTimeout);\n }\n }\n\n storeEvents(events) {\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n if (!chatParams['id'] && this.attributes['onlineStatus'].value == true) {\n helperFunctions.makeRequest(this.attributes.LHC_API.args.lhc_base_url + this.attributes['lang'] + 'chat/logevent/(vid)/' + this.attributes.userSession.getVID(), {params: {'data' : JSON.stringify(events)}}, (data) => {\n this.initInvitation({init: 0});\n })\n }\n }\n\n storeConversion(conversion) {\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n if (!chatParams['id'] && this.attributes['onlineStatus'].value == true) {\n helperFunctions.makeRequest(this.attributes.LHC_API.args.lhc_base_url + this.attributes['lang'] + 'widgetrestapi/logconversions/(vid)/' + this.attributes.userSession.getVID(), {params: {'data' : JSON.stringify(conversion)}}, (data) => {\n\n });\n }\n }\n\n initInvitation(paramsExecution) {\n\n if (this.inProgress == true) {\n return ;\n }\n\n clearTimeout(this.checkMessageTimeout);\n\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n\n const init = (paramsExecution && paramsExecution['init'] === 0) ? 0 : 1;\n\n if (!chatParams['id'] && this.attributes['onlineStatus'].value == true) {\n\n this.inProgress = true;\n\n let params = {\n 'vid': this.attributes.userSession.getVID(),\n 'dep': this.attributes.department.join(',')\n };\n\n if (this.attributes.LHC_API.args.priority) {\n params['priority'] = this.attributes.LHC_API.args.priority;\n }\n\n if (this.attributes.LHC_API.args.operator) {\n params['operator'] = this.attributes.LHC_API.args.operator;\n }\n\n if (this.attributes['identifier']) {\n params['idnt'] = this.attributes['identifier']\n }\n\n if (this.attributes['tag']) {\n params['tag'] = this.attributes['tag']\n }\n\n if (this.attributes['langOverride']) {\n params['lang'] = this.attributes['langOverride']\n }\n\n params['l'] = encodeURIComponent(window.location.href.substring(window.location.protocol.length));\n params['dt'] = encodeURIComponent(document.title);\n params['init'] = this.initCall == true ? 1 : init;\n\n this.initCall = false;\n\n helperFunctions.makeRequest(this.attributes.LHC_API.args.lhc_base_url + this.attributes['lang'] + 'widgetrestapi/checkinvitation', {params: params}, (data) => {\n\n this.inProgress = false;\n \n if (data.invitation) {\n const params = {'vid_id' : data.vid_id, 'invitation' : data.invitation, 'inject_html' : data.inject_html, 'qinv' : data.qinv};\n setTimeout(() => {\n this.showInvitation(params, init);\n }, this.attributes.widgetStatus.value === true ? 0 : (data.delay || 0));\n } else {\n if (this.attributes.LHC_API.args.check_messages) {\n this.checkMessageTimeout = setTimeout(() => {\n this.initInvitation({init: 0});\n },this.params['interval'] * 1000);\n }\n }\n\n if (data.next_reschedule) {\n this.nextRescheduleTimeout = setTimeout(() => {\n this.initInvitation({init: 0});\n }, data.next_reschedule);\n }\n\n if (data.dynamic) {\n data.dynamic.forEach((item) => {\n this.dynamicInvitations.push(item.id);\n if (item.type === 1) {\n domEventsHandler.listen(document, 'mouseout', (e) => {\n e = e ? e : window.event;\n var from = e.relatedTarget || e.toElement;\n if (!from || from.nodeName == \"HTML\") {\n this.showInvitation({'vid_id' : data.vid_id, 'invitation' : item.id, 'inject_html' : item.inject_html, 'qinv' : data.qinv, 'only_inject' : item.only_inject});\n if (!item.every_time) {\n domEventsHandler.unlisten('lhc_inv_mouse_out_'+item.id);\n }\n }\n }, 'lhc_inv_mouse_out_' + item.id);\n } else if (item.type === 2) {\n\n var iddleTimeout = () => {\n\n this.showInvitation({'vid_id' : data.vid_id, 'invitation' : item.id, 'inject_html' : item.inject_html, 'qinv' : data.qinv, 'only_inject' : item.only_inject});\n\n clearTimeout(this.iddleTimeoutActivity);\n\n if (!item.every_time) {\n ['mousemove','mousedown','click','scroll','keypress','load'].forEach((element) => {\n domEventsHandler.unlisten('lhc_inv_iddl_win_'+element);\n });\n\n ['mousemove','scroll','touchstart','touchend'].forEach((element) => {\n domEventsHandler.unlisten('lhc_inv_iddl_doc_'+element);\n });\n }\n };\n\n this.iddleTimeoutActivityReset = () => {\n clearTimeout(this.iddleTimeoutActivity);\n this.iddleTimeoutActivity = setTimeout( () => { iddleTimeout(); }, item.iddle_for *1000);\n }\n\n this.iddleTimeoutActivityReset();\n\n ['mousemove','mousedown','click','scroll','keypress','load'].forEach((event) => {\n domEventsHandler.listen(window, event, this.iddleTimeoutActivityReset, 'lhc_inv_iddl_win_'+event);\n });\n\n ['mousemove','scroll','touchstart','touchend'].forEach((event) => {\n domEventsHandler.listen(document, event, this.iddleTimeoutActivityReset, 'lhc_inv_iddl_doc_'+event);\n });\n }\n })\n }\n });\n }\n }\n}\n\nconst proactiveChat = new _proactiveChat();\nexport {proactiveChat};\n\n"],"names":["proactiveChat","_proactiveChat","this","params","timeoutStatuscheck","timeoutActivity","attributes","chatEvents","dynamicInvitations","iddleTimeoutActivity","checkMessageTimeout","nextRescheduleTimeout","initCall","inProgress","events","length","storeEvents","initInvitation","conversion","storeConversion","eventEmitter","addListener","init","onlineStatus","subscribe","data","getSessionAttributes","proactive","invitation","mainWidget","isLoaded","sendChildEvent","hideInvitation","emitEvent","chatParams","widgetStatus","value","mode","inject_html","th","document","getElementsByTagName","s","createElement","setAttribute","LHC_API","args","lhc_base_url","Date","now","appendChild","only_inject","bootstrap","clearTimeout","helperFunctions","userSession","getVID","JSON","stringify","paramsExecution","department","join","priority","operator","encodeURIComponent","window","location","href","substring","protocol","title","vid_id","qinv","setTimeout","showInvitation","delay","check_messages","next_reschedule","dynamic","forEach","item","push","id","type","domEventsHandler","e","from","event","relatedTarget","toElement","nodeName","every_time","iddleTimeoutActivityReset","element","iddle_for"],"sourceRoot":""} \ No newline at end of file diff --git a/lhc_web/design/defaulttheme/js/widgetv2/a5b21cc17552b167a2f1.js.map b/lhc_web/design/defaulttheme/js/widgetv2/a5b21cc17552b167a2f1.js.map deleted file mode 100644 index bdbb7c0e60..0000000000 --- a/lhc_web/design/defaulttheme/js/widgetv2/a5b21cc17552b167a2f1.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"a5b21cc17552b167a2f1.js","mappings":"+NAIaA,EAAb,WACI,WAAYC,IAAQ,eAEhBC,KAAKC,WAAa,GAClBD,KAAKE,QAAS,EACdF,KAAKG,YAAa,EAClBH,KAAKI,gBAAiB,EACtBJ,KAAKK,QAAS,EACdL,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S,kBA4JI,SAAMC,QAEwB,IAAfA,IAA6C,IAAfA,IACrC3E,KAAKC,WAAW2E,YAAYC,IAAMC,KAAKC,MAAMN,KAAKC,MAAQ,KAC1D1E,KAAKC,WAAW+E,eAAeC,wBAAwBjF,KAAKC,WAAW2E,YAAYM,wBACnFlF,KAAKE,QAAS,GAGlBF,KAAKO,KAAK0C,OAES,GAAfjD,KAAKK,QACLL,KAAKC,WAAW2C,aAAaC,UAAU,SAAU,IAGrD7C,KAAKK,QAAS,IA1KtB,kBA6KI,WAE+B,GAAvBL,KAAKM,gBAA0C,GAAfN,KAAKE,QAAqC,GAAnBF,KAAKG,YAA6C,GAAvBH,KAAKI,gBAAgE,GAAtCJ,KAAKC,WAAWqE,aAAa5C,SAI9G,IAAhC1B,KAAKC,WAAWkF,aAChBnF,KAAKO,KAAK0D,OACS,GAAfjE,KAAKK,QACLL,KAAKC,WAAW2C,aAAaC,UAAU,SAAU,IAErD7C,KAAKK,QAAS,IAEdL,KAAKO,KAAK0C,OACS,GAAfjD,KAAKK,QACLL,KAAKC,WAAW2C,aAAaC,UAAU,SAAU,IAErD7C,KAAKK,QAAS,QA9L1B","sources":["webpack://LiveHelperChat/./src/lib/widgets/needhelpWidget.js"],"sourcesContent":["import {settings} from '../settings.js';\nimport {UIConstructorIframe} from '../UIConstructorIframe';\nimport {helperFunctions} from '../helperFunctions';\n\nexport class needhelpWidget{\n constructor(prefix) {\n\n this.attributes = {};\n this.hidden = false;\n this.widgetOpen = false;\n this.invitationOpen = false;\n this.nhOpen = false;\n this.delayProcessed = false;\n\n this.cont = new UIConstructorIframe((prefix || 'lhc')+'_needhelp_widget_v2', helperFunctions.getAbstractStyle({\n zindex: \"2147483639\",\n width: \"320px\",\n height: \"135px\",\n position: \"fixed\",\n display: \"none\",\n }), null, \"iframe\");\n\n this.loadStatus = {main : false, theme: false, status: false};\n }\n \n checkLoadStatus() {\n if (this.loadStatus['theme'] == true && this.loadStatus['main'] == true && this.loadStatus['status'] == true) {\n this.cont.elmDomDoc.body.style.display = \"\";\n }\n }\n \n init(attributes, settings) {\n\n this.attributes = attributes;\n\n var placement = {bottom: (70 + this.attributes.widgetDimesions.value.wbottom) +\"px\", right: (65+this.attributes.widgetDimesions.value.wright) + \"px\"};\n\n var leftPosition = false;\n\n if (attributes.position_placement == 'bottom_left' || attributes.position_placement == 'full_height_left') {\n placement = {bottom: (70 + this.attributes.widgetDimesions.value.wbottom) +\"px\", left: (65+this.attributes.widgetDimesions.value.wright) + \"px\"};\n leftPosition = true;\n } else if (attributes.position_placement == 'middle_left') {\n placement = {bottom: \"calc(50% + 35px)\", left: (65+this.attributes.widgetDimesions.value.wright) + \"px\"};\n leftPosition = true;\n } else if (attributes.position_placement == 'middle_right') {\n placement = {bottom: \"calc(50% + 35px)\", right: (65+this.attributes.widgetDimesions.value.wright) + \"px\"};\n }\n\n this.cont.massRestyle(placement);\n\n this.attributes = attributes;\n\n this.cont.tmpl = settings['html'].replace('{dev_type}',(this.attributes.isMobile === true ? 'lhc-mobile' : 'lhc-desktop'));\n this.cont.bodyId = 'need-help';\n \n if (this.cont.constructUIIframe('', this.attributes.staticJS['dir']) === null){\n return null;\n }\n \n // Content invisible untill media loads\n this.cont.elmDomDoc.body.style.display = \"none\";\n \n this.cont.elmDom.className += this.attributes.isMobile === true ? ' lhc-mobile' : ' lhc-desktop';\n\n this.cont.attachUserEventListener(\"click\", function (e) {\n attributes.eventEmitter.emitEvent('nhClicked', [{'event': e, 'sender' : 'closeButton'}]);\n attributes.eventEmitter.emitEvent('showWidget', [{'event': e}]);\n }, \"start-chat-btn\",'nhstrt');\n\n var _that = this;\n\n this.cont.attachUserEventListener(\"click\", function (a) {\n attributes.eventEmitter.emitEvent('nhClosed', [{'sender' : 'closeButton'}]);\n a.stopPropagation();\n _that.hide(true);\n }, \"close-need-help-btn\",'nhcls');\n\n if (settings.dimensions) {\n if (leftPosition == true && settings.dimensions['right']) {\n settings.dimensions['left'] = settings.dimensions['right'];\n delete settings.dimensions['right'];\n }\n this.cont.massRestyle(settings.dimensions);\n }\n\n this.cont.insertCssRemoteFile({onload: () => {this.loadStatus['main'] = true; this.checkLoadStatus()},crossOrigin : \"anonymous\", href : this.attributes.staticJS['widget_css']}, true);\n\n if (this.attributes.isMobile == true) {\n this.cont.insertCssRemoteFile({crossOrigin : \"anonymous\", href : this.attributes.staticJS['widget_mobile_css']});\n }\n\n if (this.attributes.theme) {\n this.cont.insertCssRemoteFile({onload: () => {this.loadStatus['theme'] = true; this.checkLoadStatus()}, id : \"lhc-theme-needhelp\", crossOrigin : \"anonymous\", href : this.attributes.LHC_API.args.lhc_base_url + '/widgetrestapi/themeneedhelp/' + this.attributes.theme + '?v=' + this.attributes.theme_v}, true);\n } else {\n this.loadStatus['theme'] = true;\n this.checkLoadStatus();\n }\n\n // Show need help only if status widget is loaded\n attributes.sload.subscribe((data) => {if(data){this.loadStatus['status'] = true; this.checkLoadStatus()}});\n\n if (!settings['ap']) {\n attributes.eventEmitter.addListener('showInvitation', () => {\n this.invitationOpen = true;\n this.hide();\n });\n\n attributes.eventEmitter.addListener('chatStarted', () => {\n this.hide(true);\n });\n\n attributes.eventEmitter.addListener('hideInvitation', () => {\n this.invitationOpen = false;\n this.show();\n });\n\n attributes.eventEmitter.addListener('cancelInvitation', () => {\n this.invitationOpen = false;\n this.show();\n });\n\n attributes.msgsnippet_status.subscribe((data) => {\n data == true && this.hide(true);\n });\n\n attributes.shidden.subscribe((data) => {\n data ? this.hide(false) : this.show();\n });\n }\n\n setTimeout(() => {\n\n this.delayProcessed = true;\n\n attributes.widgetStatus.subscribe((data) => {\n data == true ? (this.widgetOpen = true,this.hide()) : (this.widgetOpen = false,this.show());\n });\n\n attributes.onlineStatus.subscribe((data) => {\n if (data == false) {\n let needHide = this.hidden;\n this.hide();\n // Show next time only if it was not hidden already\n if (needHide === false) {\n this.hidden = false;\n }\n } else {\n this.show();\n }\n });\n\n }, settings.delay);\n\n attributes.eventEmitter.addListener('reloadWidget',() => {\n this.cont.insertCssRemoteFile({onload: () => {this.loadStatus['theme'] = true; this.checkLoadStatus()}, id : \"lhc-theme-needhelp\", crossOrigin : \"anonymous\", href : this.attributes.LHC_API.args.lhc_base_url + '/widgetrestapi/themeneedhelp/' + this.attributes.theme + '?v=' + Date.now()}, true);\n });\n\n }\n\n hide (persistent) {\n\n if (typeof persistent !== 'undefined' && persistent === true) {\n this.attributes.userSession.hnh = Math.round(Date.now() / 1000);\n this.attributes.storageHandler.storeSessionInformation(this.attributes.userSession.getSessionAttributes());\n this.hidden = true;\n }\n\n this.cont.hide();\n\n if (this.nhOpen == true) {\n this.attributes.eventEmitter.emitEvent('nhHide', []);\n }\n\n this.nhOpen = false;\n }\n\n show () {\n\n if (this.delayProcessed == false || this.hidden == true || this.widgetOpen == true || this.invitationOpen == true || this.attributes.onlineStatus.value == false) {\n return;\n }\n\n if (this.attributes.hideOffline === false) {\n this.cont.show();\n if (this.nhOpen == false) {\n this.attributes.eventEmitter.emitEvent('nhShow', []);\n }\n this.nhOpen = true;\n } else {\n this.cont.hide();\n if (this.nhOpen == true) {\n this.attributes.eventEmitter.emitEvent('nhHide', []);\n }\n this.nhOpen = false;\n }\n }\n}"],"names":["needhelpWidget","prefix","this","attributes","hidden","widgetOpen","invitationOpen","nhOpen","delayProcessed","cont","UIConstructorIframe","helperFunctions","zindex","width","height","position","display","loadStatus","main","theme","status","elmDomDoc","body","style","settings","placement","bottom","widgetDimesions","value","wbottom","right","wright","leftPosition","position_placement","left","massRestyle","tmpl","replace","isMobile","bodyId","constructUIIframe","staticJS","elmDom","className","attachUserEventListener","e","eventEmitter","emitEvent","_that","a","stopPropagation","hide","dimensions","insertCssRemoteFile","onload","checkLoadStatus","crossOrigin","href","id","LHC_API","args","lhc_base_url","theme_v","sload","subscribe","data","addListener","show","msgsnippet_status","shidden","setTimeout","widgetStatus","onlineStatus","needHide","delay","Date","now","persistent","userSession","hnh","Math","round","storageHandler","storeSessionInformation","getSessionAttributes","hideOffline"],"sourceRoot":""} \ No newline at end of file diff --git a/lhc_web/design/defaulttheme/js/widgetv2/a5b21cc17552b167a2f1.js b/lhc_web/design/defaulttheme/js/widgetv2/b10c9440ec454caf8cbd.js similarity index 76% rename from lhc_web/design/defaulttheme/js/widgetv2/a5b21cc17552b167a2f1.js rename to lhc_web/design/defaulttheme/js/widgetv2/b10c9440ec454caf8cbd.js index 24eaaaeaae..207a60211e 100644 --- a/lhc_web/design/defaulttheme/js/widgetv2/a5b21cc17552b167a2f1.js +++ b/lhc_web/design/defaulttheme/js/widgetv2/b10c9440ec454caf8cbd.js @@ -1,2 +1,2 @@ -"use strict";(self.webpackChunkLiveHelperChat=self.webpackChunkLiveHelperChat||[]).push([[821],{6821:function(t,e,i){i.r(e),i.d(e,{needhelpWidget:function(){return a}});var s=i(5671),n=i(3144),o=(i(7761),i(3031)),h=i(2137),a=function(){function t(e){(0,s.Z)(this,t),this.attributes={},this.hidden=!1,this.widgetOpen=!1,this.invitationOpen=!1,this.nhOpen=!1,this.delayProcessed=!1,this.cont=new o.a((e||"lhc")+"_needhelp_widget_v2",h.a.getAbstractStyle({zindex:"2147483639",width:"320px",height:"135px",position:"fixed",display:"none"}),null,"iframe"),this.loadStatus={main:!1,theme:!1,status:!1}}return(0,n.Z)(t,[{key:"checkLoadStatus",value:function(){1==this.loadStatus.theme&&1==this.loadStatus.main&&1==this.loadStatus.status&&(this.cont.elmDomDoc.body.style.display="")}},{key:"init",value:function(t,e){var i=this;this.attributes=t;var s={bottom:70+this.attributes.widgetDimesions.value.wbottom+"px",right:65+this.attributes.widgetDimesions.value.wright+"px"},n=!1;if("bottom_left"==t.position_placement||"full_height_left"==t.position_placement?(s={bottom:70+this.attributes.widgetDimesions.value.wbottom+"px",left:65+this.attributes.widgetDimesions.value.wright+"px"},n=!0):"middle_left"==t.position_placement?(s={bottom:"calc(50% + 35px)",left:65+this.attributes.widgetDimesions.value.wright+"px"},n=!0):"middle_right"==t.position_placement&&(s={bottom:"calc(50% + 35px)",right:65+this.attributes.widgetDimesions.value.wright+"px"}),this.cont.massRestyle(s),this.attributes=t,this.cont.tmpl=e.html.replace("{dev_type}",!0===this.attributes.isMobile?"lhc-mobile":"lhc-desktop"),this.cont.bodyId="need-help",null===this.cont.constructUIIframe("",this.attributes.staticJS.dir))return null;this.cont.elmDomDoc.body.style.display="none",this.cont.elmDom.className+=!0===this.attributes.isMobile?" lhc-mobile":" lhc-desktop",this.cont.attachUserEventListener("click",(function(e){t.eventEmitter.emitEvent("nhClicked",[{event:e,sender:"closeButton"}]),t.eventEmitter.emitEvent("showWidget",[{event:e}])}),"start-chat-btn","nhstrt");var o=this;this.cont.attachUserEventListener("click",(function(e){t.eventEmitter.emitEvent("nhClosed",[{sender:"closeButton"}]),e.stopPropagation(),o.hide(!0)}),"close-need-help-btn","nhcls"),e.dimensions&&(1==n&&e.dimensions.right&&(e.dimensions.left=e.dimensions.right,delete e.dimensions.right),this.cont.massRestyle(e.dimensions)),this.cont.insertCssRemoteFile({onload:function(){i.loadStatus.main=!0,i.checkLoadStatus()},crossOrigin:"anonymous",href:this.attributes.staticJS.widget_css},!0),1==this.attributes.isMobile&&this.cont.insertCssRemoteFile({crossOrigin:"anonymous",href:this.attributes.staticJS.widget_mobile_css}),this.attributes.theme?this.cont.insertCssRemoteFile({onload:function(){i.loadStatus.theme=!0,i.checkLoadStatus()},id:"lhc-theme-needhelp",crossOrigin:"anonymous",href:this.attributes.LHC_API.args.lhc_base_url+"/widgetrestapi/themeneedhelp/"+this.attributes.theme+"?v="+this.attributes.theme_v},!0):(this.loadStatus.theme=!0,this.checkLoadStatus()),t.sload.subscribe((function(t){t&&(i.loadStatus.status=!0,i.checkLoadStatus())})),e.ap||(t.eventEmitter.addListener("showInvitation",(function(){i.invitationOpen=!0,i.hide()})),t.eventEmitter.addListener("chatStarted",(function(){i.hide(!0)})),t.eventEmitter.addListener("hideInvitation",(function(){i.invitationOpen=!1,i.show()})),t.eventEmitter.addListener("cancelInvitation",(function(){i.invitationOpen=!1,i.show()})),t.msgsnippet_status.subscribe((function(t){1==t&&i.hide(!0)})),t.shidden.subscribe((function(t){t?i.hide(!1):i.show()}))),setTimeout((function(){i.delayProcessed=!0,t.widgetStatus.subscribe((function(t){1==t?(i.widgetOpen=!0,i.hide()):(i.widgetOpen=!1,i.show())})),t.onlineStatus.subscribe((function(t){if(0==t){var e=i.hidden;i.hide(),!1===e&&(i.hidden=!1)}else i.show()}))}),e.delay),t.eventEmitter.addListener("reloadWidget",(function(){i.cont.insertCssRemoteFile({onload:function(){i.loadStatus.theme=!0,i.checkLoadStatus()},id:"lhc-theme-needhelp",crossOrigin:"anonymous",href:i.attributes.LHC_API.args.lhc_base_url+"/widgetrestapi/themeneedhelp/"+i.attributes.theme+"?v="+Date.now()},!0)}))}},{key:"hide",value:function(t){void 0!==t&&!0===t&&(this.attributes.userSession.hnh=Math.round(Date.now()/1e3),this.attributes.storageHandler.storeSessionInformation(this.attributes.userSession.getSessionAttributes()),this.hidden=!0),this.cont.hide(),1==this.nhOpen&&this.attributes.eventEmitter.emitEvent("nhHide",[]),this.nhOpen=!1}},{key:"show",value:function(){0!=this.delayProcessed&&1!=this.hidden&&1!=this.widgetOpen&&1!=this.invitationOpen&&0!=this.attributes.onlineStatus.value&&(!1===this.attributes.hideOffline?(this.cont.show(),0==this.nhOpen&&this.attributes.eventEmitter.emitEvent("nhShow",[]),this.nhOpen=!0):(this.cont.hide(),1==this.nhOpen&&this.attributes.eventEmitter.emitEvent("nhHide",[]),this.nhOpen=!1))}}]),t}()}}]); -//# sourceMappingURL=a5b21cc17552b167a2f1.js.map \ No newline at end of file +"use strict";(self.webpackChunkLiveHelperChat=self.webpackChunkLiveHelperChat||[]).push([[821],{6821:function(t,e,i){i.r(e),i.d(e,{needhelpWidget:function(){return a}});var s=i(5671),n=i(3144),o=(i(7761),i(3031)),h=i(2137),a=function(){function t(e){(0,s.Z)(this,t),this.attributes={},this.hidden=!1,this.widgetOpen=!1,this.invitationOpen=!1,this.nhOpen=!1,this.delayProcessed=!1,this.cont=new o.a((e||"lhc")+"_needhelp_widget_v2",h.a.getAbstractStyle({zindex:"2147483639",width:"320px",height:"135px",position:"fixed",display:"none"}),null,"iframe"),this.loadStatus={main:!1,theme:!1,status:!1}}return(0,n.Z)(t,[{key:"checkLoadStatus",value:function(){1==this.loadStatus.theme&&1==this.loadStatus.main&&1==this.loadStatus.status&&(this.cont.elmDomDoc.body.style.display="")}},{key:"init",value:function(t,e){var i=this;this.attributes=t;var s={bottom:70+this.attributes.widgetDimesions.value.wbottom+"px",right:65+this.attributes.widgetDimesions.value.wright+"px"},n=!1;if("bottom_left"==t.position_placement||"full_height_left"==t.position_placement?(s={bottom:70+this.attributes.widgetDimesions.value.wbottom+"px",left:65+this.attributes.widgetDimesions.value.wright+"px"},n=!0):"middle_left"==t.position_placement?(s={bottom:"calc(50% + 35px)",left:65+this.attributes.widgetDimesions.value.wright+"px"},n=!0):"middle_right"==t.position_placement&&(s={bottom:"calc(50% + 35px)",right:65+this.attributes.widgetDimesions.value.wright+"px"}),this.cont.massRestyle(s),this.attributes=t,this.cont.tmpl=e.html.replace("{dev_type}",!0===this.attributes.isMobile?"lhc-mobile":"lhc-desktop"),this.cont.bodyId="need-help",null===this.cont.constructUIIframe("",this.attributes.staticJS.dir))return null;this.cont.elmDomDoc.body.style.display="none",this.cont.elmDom.className+=!0===this.attributes.isMobile?" lhc-mobile":" lhc-desktop",this.cont.attachUserEventListener("click",(function(e){t.eventEmitter.emitEvent("nhClicked",[{event:e,sender:"closeButton"}]),t.eventEmitter.emitEvent("showWidget",[{event:e}])}),"start-chat-btn","nhstrt");var o=this;this.cont.attachUserEventListener("click",(function(e){t.eventEmitter.emitEvent("nhClosed",[{sender:"closeButton"}]),e.stopPropagation(),o.hide(!0)}),"close-need-help-btn","nhcls"),e.dimensions&&(1==n&&e.dimensions.right&&(e.dimensions.left=e.dimensions.right,delete e.dimensions.right),this.cont.massRestyle(e.dimensions)),this.cont.insertCssRemoteFile({onload:function(){i.loadStatus.main=!0,i.checkLoadStatus()},crossOrigin:"anonymous",href:this.attributes.staticJS.widget_css},!0),1==this.attributes.isMobile&&this.cont.insertCssRemoteFile({crossOrigin:"anonymous",href:this.attributes.staticJS.widget_mobile_css}),this.attributes.theme?this.cont.insertCssRemoteFile({onload:function(){i.loadStatus.theme=!0,i.checkLoadStatus()},id:"lhc-theme-needhelp",crossOrigin:"anonymous",href:this.attributes.LHC_API.args.lhc_base_url+"/widgetrestapi/themeneedhelp/"+this.attributes.theme+"?v="+this.attributes.theme_v},!0):(this.loadStatus.theme=!0,this.checkLoadStatus()),t.sload.subscribe((function(t){t&&(i.loadStatus.status=!0,i.checkLoadStatus())})),e.ap||(t.eventEmitter.addListener("showInvitation",(function(){i.invitationOpen=!0,i.hide()})),t.eventEmitter.addListener("chatStarted",(function(){i.hide(!0)})),t.eventEmitter.addListener("hideInvitation",(function(){i.invitationOpen=!1,i.show()})),t.eventEmitter.addListener("cancelInvitation",(function(){i.invitationOpen=!1,i.show()})),t.msgsnippet_status.subscribe((function(t){1==t&&i.hide(!0)})),t.shidden.subscribe((function(t){t?i.hide(!1):i.show()}))),setTimeout((function(){i.delayProcessed=!0,t.widgetStatus.subscribe((function(t){1==t?(i.widgetOpen=!0,i.hide()):(i.widgetOpen=!1,i.show())})),t.onlineStatus.subscribe((function(t){if(0==t){var e=i.hidden;i.hide(),!1===e&&(i.hidden=!1)}else i.show()}))}),e.delay+this.attributes.status_delay),t.eventEmitter.addListener("reloadWidget",(function(){i.cont.insertCssRemoteFile({onload:function(){i.loadStatus.theme=!0,i.checkLoadStatus()},id:"lhc-theme-needhelp",crossOrigin:"anonymous",href:i.attributes.LHC_API.args.lhc_base_url+"/widgetrestapi/themeneedhelp/"+i.attributes.theme+"?v="+Date.now()},!0)}))}},{key:"hide",value:function(t){void 0!==t&&!0===t&&(this.attributes.userSession.hnh=Math.round(Date.now()/1e3),this.attributes.storageHandler.storeSessionInformation(this.attributes.userSession.getSessionAttributes()),this.hidden=!0),this.cont.hide(),1==this.nhOpen&&this.attributes.eventEmitter.emitEvent("nhHide",[]),this.nhOpen=!1}},{key:"show",value:function(){0!=this.delayProcessed&&1!=this.hidden&&1!=this.widgetOpen&&1!=this.invitationOpen&&0!=this.attributes.onlineStatus.value&&(!1===this.attributes.hideOffline?(this.cont.show(),0==this.nhOpen&&this.attributes.eventEmitter.emitEvent("nhShow",[]),this.nhOpen=!0):(this.cont.hide(),1==this.nhOpen&&this.attributes.eventEmitter.emitEvent("nhHide",[]),this.nhOpen=!1))}}]),t}()}}]); +//# sourceMappingURL=b10c9440ec454caf8cbd.js.map \ No newline at end of file diff --git a/lhc_web/design/defaulttheme/js/widgetv2/b10c9440ec454caf8cbd.js.map b/lhc_web/design/defaulttheme/js/widgetv2/b10c9440ec454caf8cbd.js.map new file mode 100644 index 0000000000..f8dca83ec3 --- /dev/null +++ b/lhc_web/design/defaulttheme/js/widgetv2/b10c9440ec454caf8cbd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"b10c9440ec454caf8cbd.js","mappings":"+NAIaA,EAAb,WACI,WAAYC,IAAQ,eAEhBC,KAAKC,WAAa,GAClBD,KAAKE,QAAS,EACdF,KAAKG,YAAa,EAClBH,KAAKI,gBAAiB,EACtBJ,KAAKK,QAAS,EACdL,KAAKM,gBAAiB,EAEtBN,KAAKO,KAAO,IAAIC,EAAAA,GAAqBT,GAAU,OAAO,sBAAuBU,EAAAA,EAAAA,iBAAiC,CAC1GC,OAAQ,aACRC,MAAO,QACPC,OAAQ,QACRC,SAAU,QACVC,QAAS,SACT,KAAM,UAEVd,KAAKe,WAAa,CAACC,MAAO,EAAOC,OAAO,EAAOC,QAAQ,GAlB/D,8CAqBI,WACoC,GAA5BlB,KAAKe,WAAL,OAA+D,GAA3Bf,KAAKe,WAAL,MAAgE,GAA7Bf,KAAKe,WAAL,SACvEf,KAAKO,KAAKY,UAAUC,KAAKC,MAAMP,QAAU,MAvBrD,kBA2BI,SAAKb,EAAYqB,GAAU,WAEvBtB,KAAKC,WAAaA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,KAAKC,WAAWqE,aAAa5C,SAI9G,IAAhC1B,KAAKC,WAAWkF,aAChBnF,KAAKO,KAAK0D,OACS,GAAfjE,KAAKK,QACLL,KAAKC,WAAW2C,aAAaC,UAAU,SAAU,IAErD7C,KAAKK,QAAS,IAEdL,KAAKO,KAAK0C,OACS,GAAfjD,KAAKK,QACLL,KAAKC,WAAW2C,aAAaC,UAAU,SAAU,IAErD7C,KAAKK,QAAS,QA9L1B","sources":["webpack://LiveHelperChat/./src/lib/widgets/needhelpWidget.js"],"sourcesContent":["import {settings} from '../settings.js';\nimport {UIConstructorIframe} from '../UIConstructorIframe';\nimport {helperFunctions} from '../helperFunctions';\n\nexport class needhelpWidget{\n constructor(prefix) {\n\n this.attributes = {};\n this.hidden = false;\n this.widgetOpen = false;\n this.invitationOpen = false;\n this.nhOpen = false;\n this.delayProcessed = false;\n\n this.cont = new UIConstructorIframe((prefix || 'lhc')+'_needhelp_widget_v2', helperFunctions.getAbstractStyle({\n zindex: \"2147483639\",\n width: \"320px\",\n height: \"135px\",\n position: \"fixed\",\n display: \"none\",\n }), null, \"iframe\");\n\n this.loadStatus = {main : false, theme: false, status: false};\n }\n \n checkLoadStatus() {\n if (this.loadStatus['theme'] == true && this.loadStatus['main'] == true && this.loadStatus['status'] == true) {\n this.cont.elmDomDoc.body.style.display = \"\";\n }\n }\n \n init(attributes, settings) {\n\n this.attributes = attributes;\n\n var placement = {bottom: (70 + this.attributes.widgetDimesions.value.wbottom) +\"px\", right: (65+this.attributes.widgetDimesions.value.wright) + \"px\"};\n\n var leftPosition = false;\n\n if (attributes.position_placement == 'bottom_left' || attributes.position_placement == 'full_height_left') {\n placement = {bottom: (70 + this.attributes.widgetDimesions.value.wbottom) +\"px\", left: (65+this.attributes.widgetDimesions.value.wright) + \"px\"};\n leftPosition = true;\n } else if (attributes.position_placement == 'middle_left') {\n placement = {bottom: \"calc(50% + 35px)\", left: (65+this.attributes.widgetDimesions.value.wright) + \"px\"};\n leftPosition = true;\n } else if (attributes.position_placement == 'middle_right') {\n placement = {bottom: \"calc(50% + 35px)\", right: (65+this.attributes.widgetDimesions.value.wright) + \"px\"};\n }\n\n this.cont.massRestyle(placement);\n\n this.attributes = attributes;\n\n this.cont.tmpl = settings['html'].replace('{dev_type}',(this.attributes.isMobile === true ? 'lhc-mobile' : 'lhc-desktop'));\n this.cont.bodyId = 'need-help';\n \n if (this.cont.constructUIIframe('', this.attributes.staticJS['dir']) === null){\n return null;\n }\n \n // Content invisible untill media loads\n this.cont.elmDomDoc.body.style.display = \"none\";\n \n this.cont.elmDom.className += this.attributes.isMobile === true ? ' lhc-mobile' : ' lhc-desktop';\n\n this.cont.attachUserEventListener(\"click\", function (e) {\n attributes.eventEmitter.emitEvent('nhClicked', [{'event': e, 'sender' : 'closeButton'}]);\n attributes.eventEmitter.emitEvent('showWidget', [{'event': e}]);\n }, \"start-chat-btn\",'nhstrt');\n\n var _that = this;\n\n this.cont.attachUserEventListener(\"click\", function (a) {\n attributes.eventEmitter.emitEvent('nhClosed', [{'sender' : 'closeButton'}]);\n a.stopPropagation();\n _that.hide(true);\n }, \"close-need-help-btn\",'nhcls');\n\n if (settings.dimensions) {\n if (leftPosition == true && settings.dimensions['right']) {\n settings.dimensions['left'] = settings.dimensions['right'];\n delete settings.dimensions['right'];\n }\n this.cont.massRestyle(settings.dimensions);\n }\n\n this.cont.insertCssRemoteFile({onload: () => {this.loadStatus['main'] = true; this.checkLoadStatus()},crossOrigin : \"anonymous\", href : this.attributes.staticJS['widget_css']}, true);\n\n if (this.attributes.isMobile == true) {\n this.cont.insertCssRemoteFile({crossOrigin : \"anonymous\", href : this.attributes.staticJS['widget_mobile_css']});\n }\n\n if (this.attributes.theme) {\n this.cont.insertCssRemoteFile({onload: () => {this.loadStatus['theme'] = true; this.checkLoadStatus()}, id : \"lhc-theme-needhelp\", crossOrigin : \"anonymous\", href : this.attributes.LHC_API.args.lhc_base_url + '/widgetrestapi/themeneedhelp/' + this.attributes.theme + '?v=' + this.attributes.theme_v}, true);\n } else {\n this.loadStatus['theme'] = true;\n this.checkLoadStatus();\n }\n\n // Show need help only if status widget is loaded\n attributes.sload.subscribe((data) => {if(data){this.loadStatus['status'] = true; this.checkLoadStatus()}});\n\n if (!settings['ap']) {\n attributes.eventEmitter.addListener('showInvitation', () => {\n this.invitationOpen = true;\n this.hide();\n });\n\n attributes.eventEmitter.addListener('chatStarted', () => {\n this.hide(true);\n });\n\n attributes.eventEmitter.addListener('hideInvitation', () => {\n this.invitationOpen = false;\n this.show();\n });\n\n attributes.eventEmitter.addListener('cancelInvitation', () => {\n this.invitationOpen = false;\n this.show();\n });\n\n attributes.msgsnippet_status.subscribe((data) => {\n data == true && this.hide(true);\n });\n\n attributes.shidden.subscribe((data) => {\n data ? this.hide(false) : this.show();\n });\n }\n\n setTimeout(() => {\n\n this.delayProcessed = true;\n\n attributes.widgetStatus.subscribe((data) => {\n data == true ? (this.widgetOpen = true,this.hide()) : (this.widgetOpen = false,this.show());\n });\n\n attributes.onlineStatus.subscribe((data) => {\n if (data == false) {\n let needHide = this.hidden;\n this.hide();\n // Show next time only if it was not hidden already\n if (needHide === false) {\n this.hidden = false;\n }\n } else {\n this.show();\n }\n });\n\n }, settings.delay + this.attributes['status_delay']);\n\n attributes.eventEmitter.addListener('reloadWidget',() => {\n this.cont.insertCssRemoteFile({onload: () => {this.loadStatus['theme'] = true; this.checkLoadStatus()}, id : \"lhc-theme-needhelp\", crossOrigin : \"anonymous\", href : this.attributes.LHC_API.args.lhc_base_url + '/widgetrestapi/themeneedhelp/' + this.attributes.theme + '?v=' + Date.now()}, true);\n });\n\n }\n\n hide (persistent) {\n\n if (typeof persistent !== 'undefined' && persistent === true) {\n this.attributes.userSession.hnh = Math.round(Date.now() / 1000);\n this.attributes.storageHandler.storeSessionInformation(this.attributes.userSession.getSessionAttributes());\n this.hidden = true;\n }\n\n this.cont.hide();\n\n if (this.nhOpen == true) {\n this.attributes.eventEmitter.emitEvent('nhHide', []);\n }\n\n this.nhOpen = false;\n }\n\n show () {\n\n if (this.delayProcessed == false || this.hidden == true || this.widgetOpen == true || this.invitationOpen == true || this.attributes.onlineStatus.value == false) {\n return;\n }\n\n if (this.attributes.hideOffline === false) {\n this.cont.show();\n if (this.nhOpen == false) {\n this.attributes.eventEmitter.emitEvent('nhShow', []);\n }\n this.nhOpen = true;\n } else {\n this.cont.hide();\n if (this.nhOpen == true) {\n this.attributes.eventEmitter.emitEvent('nhHide', []);\n }\n this.nhOpen = false;\n }\n }\n}"],"names":["needhelpWidget","prefix","this","attributes","hidden","widgetOpen","invitationOpen","nhOpen","delayProcessed","cont","UIConstructorIframe","helperFunctions","zindex","width","height","position","display","loadStatus","main","theme","status","elmDomDoc","body","style","settings","placement","bottom","widgetDimesions","value","wbottom","right","wright","leftPosition","position_placement","left","massRestyle","tmpl","replace","isMobile","bodyId","constructUIIframe","staticJS","elmDom","className","attachUserEventListener","e","eventEmitter","emitEvent","_that","a","stopPropagation","hide","dimensions","insertCssRemoteFile","onload","checkLoadStatus","crossOrigin","href","id","LHC_API","args","lhc_base_url","theme_v","sload","subscribe","data","addListener","show","msgsnippet_status","shidden","setTimeout","widgetStatus","onlineStatus","needHide","delay","Date","now","persistent","userSession","hnh","Math","round","storageHandler","storeSessionInformation","getSessionAttributes","hideOffline"],"sourceRoot":""} \ No newline at end of file diff --git a/lhc_web/design/defaulttheme/js/widgetv2/6b5f759b84269b244c78.js b/lhc_web/design/defaulttheme/js/widgetv2/c9aa29f9fd71f320cdd6.js similarity index 72% rename from lhc_web/design/defaulttheme/js/widgetv2/6b5f759b84269b244c78.js rename to lhc_web/design/defaulttheme/js/widgetv2/c9aa29f9fd71f320cdd6.js index 2734795346..95919a046a 100644 --- a/lhc_web/design/defaulttheme/js/widgetv2/6b5f759b84269b244c78.js +++ b/lhc_web/design/defaulttheme/js/widgetv2/c9aa29f9fd71f320cdd6.js @@ -1,2 +1,2 @@ -"use strict";(self.webpackChunkLiveHelperChat=self.webpackChunkLiveHelperChat||[]).push([[530],{2530:function(t,i,e){e.r(i),e.d(i,{proactiveChat:function(){return r}});var s=e(5671),n=e(3144),a=e(2137),o=e(593),r=new(function(){function t(){(0,s.Z)(this,t),this.params={},this.timeoutStatuscheck=null,this.timeoutActivity=null,this.attributes=null,this.chatEvents=null,this.dynamicInvitations=[],this.iddleTimeoutActivity=null,this.checkMessageTimeout=null,this.nextRescheduleTimeout=null,this.initCall=!0,this.inProgress=!1}return(0,n.Z)(t,[{key:"setParams",value:function(t,i,e){var s=this;this.params=t,this.attributes=i,this.chatEvents=e,this.attributes.events.length>0?this.storeEvents(this.attributes.events):this.initInvitation(),""!=this.attributes.conversion&&this.storeConversion(this.attributes.conversion),this.attributes.eventEmitter.addListener("tagAdded",(function(){s.initInvitation({init:0})})),this.attributes.eventEmitter.addListener("eventAdded",(function(){s.storeEvents(s.attributes.events)})),this.attributes.eventEmitter.addListener("conversionAdded",(function(){s.storeConversion(s.attributes.conversion)})),this.attributes.eventEmitter.addListener("checkMessageOperator",(function(){s.initInvitation({init:0})})),this.attributes.eventEmitter.addListener("endChat",(function(){s.initInvitation({init:0})})),this.attributes.onlineStatus.subscribe((function(t){1==t?s.initInvitation({init:0}):!s.attributes.userSession.getSessionAttributes().id&&s.attributes.proactive.invitation&&(s.attributes.proactive={},!1!==s.attributes.mainWidget.isLoaded&&s.chatEvents.sendChildEvent("proactive",[{}]),s.attributes.mainWidget.hideInvitation(),s.attributes.eventEmitter.emitEvent("closeWidget",[{sender:"closeButton"}]))}))}},{key:"showInvitation",value:function(t,i){var e=this.attributes.userSession.getSessionAttributes();if(!(0===i&&!0===this.attributes.widgetStatus.value&&"embed"==!this.attributes.mode||e.id)){if(t.inject_html&&t.invitation){var s=document.getElementsByTagName("head")[0],n=document.createElement("script");n.setAttribute("type","text/javascript"),n.setAttribute("src",this.attributes.LHC_API.args.lhc_base_url+this.attributes.lang+"chat/htmlsnippet/"+t.invitation+"/inv/0/?ts="+Date.now()),s.appendChild(n)}t.only_inject||(this.attributes.proactive=t,!1===this.attributes.mainWidget.isLoaded?this.attributes.mainWidget.bootstrap():this.chatEvents.sendChildEvent("proactive",[t]),clearTimeout(this.checkMessageTimeout),clearTimeout(this.nextRescheduleTimeout))}}},{key:"storeEvents",value:function(t){var i=this;this.attributes.userSession.getSessionAttributes().id||1!=this.attributes.onlineStatus.value||a.a.makeRequest(this.attributes.LHC_API.args.lhc_base_url+this.attributes.lang+"chat/logevent/(vid)/"+this.attributes.userSession.getVID(),{params:{data:JSON.stringify(t)}},(function(t){i.initInvitation({init:0})}))}},{key:"storeConversion",value:function(t){this.attributes.userSession.getSessionAttributes().id||1!=this.attributes.onlineStatus.value||a.a.makeRequest(this.attributes.LHC_API.args.lhc_base_url+this.attributes.lang+"widgetrestapi/logconversions/(vid)/"+this.attributes.userSession.getVID(),{params:{data:JSON.stringify(t)}},(function(t){}))}},{key:"initInvitation",value:function(t){var i=this;if(1!=this.inProgress){clearTimeout(this.checkMessageTimeout);var e=this.attributes.userSession.getSessionAttributes(),s=t&&0===t.init?0:1;if(!e.id&&1==this.attributes.onlineStatus.value){this.inProgress=!0;var n={vid:this.attributes.userSession.getVID(),dep:this.attributes.department.join(",")};this.attributes.LHC_API.args.priority&&(n.priority=this.attributes.LHC_API.args.priority),this.attributes.LHC_API.args.operator&&(n.operator=this.attributes.LHC_API.args.operator),this.attributes.identifier&&(n.idnt=this.attributes.identifier),this.attributes.tag&&(n.tag=this.attributes.tag),this.attributes.langOverride&&(n.lang=this.attributes.langOverride),n.l=encodeURIComponent(window.location.href.substring(window.location.protocol.length)),n.dt=encodeURIComponent(document.title),n.init=1==this.initCall?1:s,this.initCall=!1,a.a.makeRequest(this.attributes.LHC_API.args.lhc_base_url+this.attributes.lang+"widgetrestapi/checkinvitation",{params:n},(function(t){if(i.inProgress=!1,t.invitation){var e={vid_id:t.vid_id,invitation:t.invitation,inject_html:t.inject_html,qinv:t.qinv};setTimeout((function(){i.showInvitation(e,s)}),!0===i.attributes.widgetStatus.value?0:t.delay||0)}else i.attributes.LHC_API.args.check_messages&&(i.checkMessageTimeout=setTimeout((function(){i.initInvitation({init:0})}),1e3*i.params.interval));t.next_reschedule&&(i.nextRescheduleTimeout=setTimeout((function(){i.initInvitation({init:0})}),t.next_reschedule)),t.dynamic&&t.dynamic.forEach((function(e){i.dynamicInvitations.push(e.id),1===e.type?o.U.listen(document,"mouseout",(function(s){var n=(s=s||window.event).relatedTarget||s.toElement;n&&"HTML"!=n.nodeName||(i.showInvitation({vid_id:t.vid_id,invitation:e.id,inject_html:e.inject_html,qinv:t.qinv,only_inject:e.only_inject}),e.every_time||o.U.unlisten("lhc_inv_mouse_out_"+e.id))}),"lhc_inv_mouse_out_"+e.id):2===e.type&&(i.iddleTimeoutActivityReset=function(){clearTimeout(i.iddleTimeoutActivity),i.iddleTimeoutActivity=setTimeout((function(){i.showInvitation({vid_id:t.vid_id,invitation:e.id,inject_html:e.inject_html,qinv:t.qinv,only_inject:e.only_inject}),clearTimeout(i.iddleTimeoutActivity),e.every_time||(["mousemove","mousedown","click","scroll","keypress","load"].forEach((function(t){o.U.unlisten("lhc_inv_iddl_win_"+t)})),["mousemove","scroll","touchstart","touchend"].forEach((function(t){o.U.unlisten("lhc_inv_iddl_doc_"+t)})))}),1e3*e.iddle_for)},i.iddleTimeoutActivityReset(),["mousemove","mousedown","click","scroll","keypress","load"].forEach((function(t){o.U.listen(window,t,i.iddleTimeoutActivityReset,"lhc_inv_iddl_win_"+t)})),["mousemove","scroll","touchstart","touchend"].forEach((function(t){o.U.listen(document,t,i.iddleTimeoutActivityReset,"lhc_inv_iddl_doc_"+t)})))}))}))}}}}]),t}())}}]); -//# sourceMappingURL=6b5f759b84269b244c78.js.map \ No newline at end of file +"use strict";(self.webpackChunkLiveHelperChat=self.webpackChunkLiveHelperChat||[]).push([[530],{2530:function(t,i,e){e.r(i),e.d(i,{proactiveChat:function(){return r}});var s=e(5671),n=e(3144),a=e(2137),o=e(593),r=new(function(){function t(){(0,s.Z)(this,t),this.params={},this.timeoutStatuscheck=null,this.timeoutActivity=null,this.attributes=null,this.chatEvents=null,this.dynamicInvitations=[],this.iddleTimeoutActivity=null,this.checkMessageTimeout=null,this.nextRescheduleTimeout=null,this.initCall=!0,this.inProgress=!1}return(0,n.Z)(t,[{key:"setParams",value:function(t,i,e){var s=this;this.params=t,this.attributes=i,this.chatEvents=e,this.attributes.events.length>0?this.storeEvents(this.attributes.events):this.initInvitation(),""!=this.attributes.conversion&&this.storeConversion(this.attributes.conversion),this.attributes.eventEmitter.addListener("tagAdded",(function(){s.initInvitation({init:0})})),this.attributes.eventEmitter.addListener("eventAdded",(function(){s.storeEvents(s.attributes.events)})),this.attributes.eventEmitter.addListener("conversionAdded",(function(){s.storeConversion(s.attributes.conversion)})),this.attributes.eventEmitter.addListener("checkMessageOperator",(function(){s.initInvitation({init:0})})),this.attributes.eventEmitter.addListener("endChat",(function(){s.initInvitation({init:0})})),this.attributes.onlineStatus.subscribe((function(t){1==t?s.initInvitation({init:0}):!s.attributes.userSession.getSessionAttributes().id&&s.attributes.proactive.invitation&&(s.attributes.proactive={},!1!==s.attributes.mainWidget.isLoaded&&s.chatEvents.sendChildEvent("proactive",[{}]),s.attributes.mainWidget.hideInvitation(),s.attributes.eventEmitter.emitEvent("closeWidget",[{sender:"closeButton"}]))}))}},{key:"showInvitation",value:function(t,i){var e=this.attributes.userSession.getSessionAttributes();if(!(0===i&&!0===this.attributes.widgetStatus.value&&"embed"==!this.attributes.mode||e.id)){if(t.inject_html&&t.invitation){var s=document.getElementsByTagName("head")[0],n=document.createElement("script");n.setAttribute("type","text/javascript"),n.setAttribute("src",this.attributes.LHC_API.args.lhc_base_url+this.attributes.lang+"chat/htmlsnippet/"+t.invitation+"/inv/0/?ts="+Date.now()),s.appendChild(n)}t.only_inject||(this.attributes.proactive=t,!1===this.attributes.mainWidget.isLoaded?this.attributes.mainWidget.bootstrap():this.chatEvents.sendChildEvent("proactive",[t]),clearTimeout(this.checkMessageTimeout),clearTimeout(this.nextRescheduleTimeout))}}},{key:"storeEvents",value:function(t){var i=this;this.attributes.userSession.getSessionAttributes().id||1!=this.attributes.onlineStatus.value||a.a.makeRequest(this.attributes.LHC_API.args.lhc_base_url+this.attributes.lang+"chat/logevent/(vid)/"+this.attributes.userSession.getVID(),{params:{data:JSON.stringify(t)}},(function(t){i.initInvitation({init:0})}))}},{key:"storeConversion",value:function(t){this.attributes.userSession.getSessionAttributes().id||1!=this.attributes.onlineStatus.value||a.a.makeRequest(this.attributes.LHC_API.args.lhc_base_url+this.attributes.lang+"widgetrestapi/logconversions/(vid)/"+this.attributes.userSession.getVID(),{params:{data:JSON.stringify(t)}},(function(t){}))}},{key:"initInvitation",value:function(t){var i=this;if(1!=this.inProgress){clearTimeout(this.checkMessageTimeout);var e=this.attributes.userSession.getSessionAttributes(),s=t&&0===t.init?0:1;if(!e.id&&1==this.attributes.onlineStatus.value){this.inProgress=!0;var n={vid:this.attributes.userSession.getVID(),dep:this.attributes.department.join(",")};this.attributes.LHC_API.args.priority&&(n.priority=this.attributes.LHC_API.args.priority),this.attributes.LHC_API.args.operator&&(n.operator=this.attributes.LHC_API.args.operator),this.attributes.identifier&&(n.idnt=this.attributes.identifier),this.attributes.tag&&(n.tag=this.attributes.tag),this.attributes.langOverride&&(n.lang=this.attributes.langOverride),n.l=encodeURIComponent(window.location.href.substring(window.location.protocol.length)),n.dt=encodeURIComponent(document.title),n.init=1==this.initCall?1:s,this.initCall=!1,a.a.makeRequest(this.attributes.LHC_API.args.lhc_base_url+this.attributes.lang+"widgetrestapi/checkinvitation",{params:n},(function(t){if(i.inProgress=!1,t.invitation){var e={vid_id:t.vid_id,invitation:t.invitation,inject_html:t.inject_html,qinv:t.qinv};setTimeout((function(){i.showInvitation(e,s)}),!0===i.attributes.widgetStatus.value?0:t.delay?t.delay+i.attributes.status_delay:i.attributes.status_delay)}else i.attributes.LHC_API.args.check_messages&&(i.checkMessageTimeout=setTimeout((function(){i.initInvitation({init:0})}),1e3*i.params.interval));t.next_reschedule&&(i.nextRescheduleTimeout=setTimeout((function(){i.initInvitation({init:0})}),t.next_reschedule)),t.dynamic&&t.dynamic.forEach((function(e){i.dynamicInvitations.push(e.id),1===e.type?o.U.listen(document,"mouseout",(function(s){var n=(s=s||window.event).relatedTarget||s.toElement;n&&"HTML"!=n.nodeName||(i.showInvitation({vid_id:t.vid_id,invitation:e.id,inject_html:e.inject_html,qinv:t.qinv,only_inject:e.only_inject}),e.every_time||o.U.unlisten("lhc_inv_mouse_out_"+e.id))}),"lhc_inv_mouse_out_"+e.id):2===e.type&&(i.iddleTimeoutActivityReset=function(){clearTimeout(i.iddleTimeoutActivity),i.iddleTimeoutActivity=setTimeout((function(){i.showInvitation({vid_id:t.vid_id,invitation:e.id,inject_html:e.inject_html,qinv:t.qinv,only_inject:e.only_inject}),clearTimeout(i.iddleTimeoutActivity),e.every_time||(["mousemove","mousedown","click","scroll","keypress","load"].forEach((function(t){o.U.unlisten("lhc_inv_iddl_win_"+t)})),["mousemove","scroll","touchstart","touchend"].forEach((function(t){o.U.unlisten("lhc_inv_iddl_doc_"+t)})))}),1e3*e.iddle_for)},i.iddleTimeoutActivityReset(),["mousemove","mousedown","click","scroll","keypress","load"].forEach((function(t){o.U.listen(window,t,i.iddleTimeoutActivityReset,"lhc_inv_iddl_win_"+t)})),["mousemove","scroll","touchstart","touchend"].forEach((function(t){o.U.listen(document,t,i.iddleTimeoutActivityReset,"lhc_inv_iddl_doc_"+t)})))}))}))}}}}]),t}())}}]); +//# sourceMappingURL=c9aa29f9fd71f320cdd6.js.map \ No newline at end of file diff --git a/lhc_web/design/defaulttheme/js/widgetv2/c9aa29f9fd71f320cdd6.js.map b/lhc_web/design/defaulttheme/js/widgetv2/c9aa29f9fd71f320cdd6.js.map new file mode 100644 index 0000000000..2d9396c70c --- /dev/null +++ b/lhc_web/design/defaulttheme/js/widgetv2/c9aa29f9fd71f320cdd6.js.map @@ -0,0 +1 @@ +{"version":3,"file":"c9aa29f9fd71f320cdd6.js","mappings":"mNAsPMA,E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E,EAAKW,aACN,CAAC,YAAY,YAAY,QAAQ,SAAS,WAAW,QAAQZ,SAAQ,SAACc,GAClET,EAAAA,EAAAA,SAA0B,oBAAoBS,MAGlD,CAAC,YAAY,SAAS,aAAa,YAAYd,SAAQ,SAACc,GACpDT,EAAAA,EAAAA,SAA0B,oBAAoBS,SAO6B,IAAhBb,EAAKc,YAG5E,EAAKF,4BAEL,CAAC,YAAY,YAAY,QAAQ,SAAS,WAAW,QAAQb,SAAQ,SAACQ,GAC9DH,EAAAA,EAAAA,OAAwBnB,OAAQsB,EAAO,EAAKK,0BAA2B,oBAAoBL,MAGnG,CAAC,YAAY,SAAS,aAAa,YAAYR,SAAQ,SAACQ,GACpDH,EAAAA,EAAAA,OAAwB5C,SAAU+C,EAAO,EAAKK,0BAA2B,oBAAoBL,mB,EAzOvHtF","sources":["webpack://LiveHelperChat/./src/util/proactiveChat.js"],"sourcesContent":["import {helperFunctions} from '../lib/helperFunctions';\nimport {domEventsHandler} from '../util/domEventsHandler';\n\nclass _proactiveChat {\n\n constructor() {\n this.params = {};\n this.timeoutStatuscheck = null;\n this.timeoutActivity = null;\n this.attributes = null;\n this.chatEvents = null;\n this.dynamicInvitations = [];\n\n this.iddleTimeoutActivity = null;\n this.checkMessageTimeout = null;\n this.nextRescheduleTimeout = null;\n this.initCall = true;\n this.inProgress = false;\n }\n\n setParams(params, attributes, chatEvents) {\n this.params = params;\n this.attributes = attributes;\n this.chatEvents = chatEvents;\n\n if (this.attributes.events.length > 0) {\n this.storeEvents(this.attributes.events);\n } else {\n this.initInvitation();\n }\n\n if (this.attributes.conversion != '') {\n this.storeConversion(this.attributes.conversion);\n }\n\n // check invitaiton then tag is added\n this.attributes.eventEmitter.addListener('tagAdded', () => {\n this.initInvitation({init: 0});\n });\n\n this.attributes.eventEmitter.addListener('eventAdded', () => {\n this.storeEvents(this.attributes.events);\n });\n\n this.attributes.eventEmitter.addListener('conversionAdded', () => {\n this.storeConversion(this.attributes.conversion);\n });\n\n this.attributes.eventEmitter.addListener('checkMessageOperator', () => {\n this.initInvitation({init: 0});\n });\n\n this.attributes.eventEmitter.addListener('endChat', () => {\n this.initInvitation({init: 0});\n });\n\n this.attributes.onlineStatus.subscribe((data) => {\n if (data == true) {\n this.initInvitation({init: 0});\n } else {\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n if (!chatParams['id'] && this.attributes.proactive.invitation) {\n this.attributes.proactive = {};\n if (this.attributes.mainWidget.isLoaded !== false) {\n this.chatEvents.sendChildEvent('proactive', [{}]);\n }\n this.attributes.mainWidget.hideInvitation();\n this.attributes.eventEmitter.emitEvent('closeWidget', [{'sender' : 'closeButton'}]);\n }\n }\n });\n }\n\n showInvitation(params, init) {\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n\n // Show invitation only if widget is not open\n if ((init === 0 && (this.attributes.widgetStatus.value === true && !this.attributes.mode == 'embed')) || chatParams['id']) {\n return;\n }\n\n if (params.inject_html && params.invitation) {\n var th = document.getElementsByTagName('head')[0];\n var s = document.createElement('script');\n s.setAttribute('type','text/javascript');\n s.setAttribute('src', this.attributes.LHC_API.args.lhc_base_url + this.attributes['lang'] + 'chat/htmlsnippet/'+params.invitation+'/inv/0/?ts='+Date.now());\n th.appendChild(s);\n }\n\n if (!params.only_inject) {\n this.attributes.proactive = params;\n\n if (this.attributes.mainWidget.isLoaded === false) {\n this.attributes.mainWidget.bootstrap();\n } else {\n this.chatEvents.sendChildEvent('proactive', [params]);\n }\n\n clearTimeout(this.checkMessageTimeout);\n clearTimeout(this.nextRescheduleTimeout);\n }\n }\n\n storeEvents(events) {\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n if (!chatParams['id'] && this.attributes['onlineStatus'].value == true) {\n helperFunctions.makeRequest(this.attributes.LHC_API.args.lhc_base_url + this.attributes['lang'] + 'chat/logevent/(vid)/' + this.attributes.userSession.getVID(), {params: {'data' : JSON.stringify(events)}}, (data) => {\n this.initInvitation({init: 0});\n })\n }\n }\n\n storeConversion(conversion) {\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n if (!chatParams['id'] && this.attributes['onlineStatus'].value == true) {\n helperFunctions.makeRequest(this.attributes.LHC_API.args.lhc_base_url + this.attributes['lang'] + 'widgetrestapi/logconversions/(vid)/' + this.attributes.userSession.getVID(), {params: {'data' : JSON.stringify(conversion)}}, (data) => {\n\n });\n }\n }\n\n initInvitation(paramsExecution) {\n\n if (this.inProgress == true) {\n return ;\n }\n\n clearTimeout(this.checkMessageTimeout);\n\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n\n const init = (paramsExecution && paramsExecution['init'] === 0) ? 0 : 1;\n\n if (!chatParams['id'] && this.attributes['onlineStatus'].value == true) {\n\n this.inProgress = true;\n\n let params = {\n 'vid': this.attributes.userSession.getVID(),\n 'dep': this.attributes.department.join(',')\n };\n\n if (this.attributes.LHC_API.args.priority) {\n params['priority'] = this.attributes.LHC_API.args.priority;\n }\n\n if (this.attributes.LHC_API.args.operator) {\n params['operator'] = this.attributes.LHC_API.args.operator;\n }\n\n if (this.attributes['identifier']) {\n params['idnt'] = this.attributes['identifier']\n }\n\n if (this.attributes['tag']) {\n params['tag'] = this.attributes['tag']\n }\n\n if (this.attributes['langOverride']) {\n params['lang'] = this.attributes['langOverride']\n }\n\n params['l'] = encodeURIComponent(window.location.href.substring(window.location.protocol.length));\n params['dt'] = encodeURIComponent(document.title);\n params['init'] = this.initCall == true ? 1 : init;\n\n this.initCall = false;\n\n helperFunctions.makeRequest(this.attributes.LHC_API.args.lhc_base_url + this.attributes['lang'] + 'widgetrestapi/checkinvitation', {params: params}, (data) => {\n\n this.inProgress = false;\n \n if (data.invitation) {\n const params = {'vid_id' : data.vid_id, 'invitation' : data.invitation, 'inject_html' : data.inject_html, 'qinv' : data.qinv};\n setTimeout(() => {\n this.showInvitation(params, init);\n }, this.attributes.widgetStatus.value === true ? 0 : (data.delay ? data.delay + this.attributes['status_delay'] : this.attributes['status_delay']));\n } else {\n if (this.attributes.LHC_API.args.check_messages) {\n this.checkMessageTimeout = setTimeout(() => {\n this.initInvitation({init: 0});\n },this.params['interval'] * 1000);\n }\n }\n\n if (data.next_reschedule) {\n this.nextRescheduleTimeout = setTimeout(() => {\n this.initInvitation({init: 0});\n }, data.next_reschedule);\n }\n\n if (data.dynamic) {\n data.dynamic.forEach((item) => {\n this.dynamicInvitations.push(item.id);\n if (item.type === 1) {\n domEventsHandler.listen(document, 'mouseout', (e) => {\n e = e ? e : window.event;\n var from = e.relatedTarget || e.toElement;\n if (!from || from.nodeName == \"HTML\") {\n this.showInvitation({'vid_id' : data.vid_id, 'invitation' : item.id, 'inject_html' : item.inject_html, 'qinv' : data.qinv, 'only_inject' : item.only_inject});\n if (!item.every_time) {\n domEventsHandler.unlisten('lhc_inv_mouse_out_'+item.id);\n }\n }\n }, 'lhc_inv_mouse_out_' + item.id);\n } else if (item.type === 2) {\n\n var iddleTimeout = () => {\n\n this.showInvitation({'vid_id' : data.vid_id, 'invitation' : item.id, 'inject_html' : item.inject_html, 'qinv' : data.qinv, 'only_inject' : item.only_inject});\n\n clearTimeout(this.iddleTimeoutActivity);\n\n if (!item.every_time) {\n ['mousemove','mousedown','click','scroll','keypress','load'].forEach((element) => {\n domEventsHandler.unlisten('lhc_inv_iddl_win_'+element);\n });\n\n ['mousemove','scroll','touchstart','touchend'].forEach((element) => {\n domEventsHandler.unlisten('lhc_inv_iddl_doc_'+element);\n });\n }\n };\n\n this.iddleTimeoutActivityReset = () => {\n clearTimeout(this.iddleTimeoutActivity);\n this.iddleTimeoutActivity = setTimeout( () => { iddleTimeout(); }, item.iddle_for *1000);\n }\n\n this.iddleTimeoutActivityReset();\n\n ['mousemove','mousedown','click','scroll','keypress','load'].forEach((event) => {\n domEventsHandler.listen(window, event, this.iddleTimeoutActivityReset, 'lhc_inv_iddl_win_'+event);\n });\n\n ['mousemove','scroll','touchstart','touchend'].forEach((event) => {\n domEventsHandler.listen(document, event, this.iddleTimeoutActivityReset, 'lhc_inv_iddl_doc_'+event);\n });\n }\n })\n }\n });\n }\n }\n}\n\nconst proactiveChat = new _proactiveChat();\nexport {proactiveChat};\n\n"],"names":["proactiveChat","_proactiveChat","this","params","timeoutStatuscheck","timeoutActivity","attributes","chatEvents","dynamicInvitations","iddleTimeoutActivity","checkMessageTimeout","nextRescheduleTimeout","initCall","inProgress","events","length","storeEvents","initInvitation","conversion","storeConversion","eventEmitter","addListener","init","onlineStatus","subscribe","data","getSessionAttributes","proactive","invitation","mainWidget","isLoaded","sendChildEvent","hideInvitation","emitEvent","chatParams","widgetStatus","value","mode","inject_html","th","document","getElementsByTagName","s","createElement","setAttribute","LHC_API","args","lhc_base_url","Date","now","appendChild","only_inject","bootstrap","clearTimeout","helperFunctions","userSession","getVID","JSON","stringify","paramsExecution","department","join","priority","operator","encodeURIComponent","window","location","href","substring","protocol","title","vid_id","qinv","setTimeout","showInvitation","delay","check_messages","next_reschedule","dynamic","forEach","item","push","id","type","domEventsHandler","e","from","event","relatedTarget","toElement","nodeName","every_time","iddleTimeoutActivityReset","element","iddle_for"],"sourceRoot":""} \ No newline at end of file diff --git a/lhc_web/design/defaulttheme/js/widgetv2/index.js b/lhc_web/design/defaulttheme/js/widgetv2/index.js index 084941c48e..bcfed0e4ef 100644 --- a/lhc_web/design/defaulttheme/js/widgetv2/index.js +++ b/lhc_web/design/defaulttheme/js/widgetv2/index.js @@ -1,3 +1,3 @@ /*! For license information please see index.js.LICENSE.txt */ -(function(){var __webpack_modules__={9272:function(t,e,i){"use strict";var n=i(723),s=[],r=[],o=n.makeRequestCallFromTimer((function(){if(r.length)throw r.shift()}));function a(t){var e;(e=s.length?s.pop():new u).task=t,n(e)}function u(){this.task=null}t.exports=a,u.prototype.call=function(){try{this.task.call()}catch(t){a.onerror?a.onerror(t):(r.push(t),o())}finally{this.task=null,s[s.length]=this}}},723:function(t,e,i){"use strict";function n(t){r.length||s(),r[r.length]=t}t.exports=n;var s,r=[],o=0;function a(){for(;o1024){for(var e=0,i=r.length-o;e',null===this.cont.constructUIIframe("",this.attributes.staticJS.dir,this.attributes.staticJS.cl,this.attributes.hhtml))return this.isLoaded=!0,null;this.cont.elmDom.className=!0===this.attributes.isMobile?"lhc-mobile lhc-mode-"+this.attributes.mode:"lhc-desktop lhc-mode-"+this.attributes.mode,this.attributes.cont_ss&&(this.originalCSS=this.cont.elmDom.style.cssText,this.cont.elmDom.style.cssText+=this.attributes.cont_ss)}},{key:"init",value:function(t,e){var i=this;if(this.attributes=t,null===this.makeContent())return null;!this.attributes.userSession.getSessionAttributes().id&&e||this.bootstrap(),this.toggleVisibilityWrap=function(t){i.toggleVisibility(t)},t.widgetStatus.subscribe(this.toggleVisibilityWrap),this.monitorDimensionsWrap=function(t){i.monitorDimensions(t)},"px"==t.widgetDimesions.valueInternal.units&&0==this.attributes.isMobile&&"embed"!=this.attributes.mode&&"full_height_right"!=this.attributes.position_placement&&"full_height_left"!=this.attributes.position_placement&&(this.screenAttributesUpdate=function(){window.innerHeight0&&this.attributes.staticJS.ex_js.forEach((function(e){t.cont.insertJSFile(e,!1)})))}},{key:"toggleVisibility",value:function(t){0==t?this.hide():this.show()}},{key:"monitorDimensions",value:function(t){this.width=t.width_override||t.width_soverride||t.width,this.height=t.height_override||t.height_soverride||t.height,this.bottom=t.bottom_override?t.bottom_override+(t.wbottom?t.wbottom:0):30+(!0===this.attributes.clinst?70:0)+(t.wbottom?t.wbottom:0),this.right=t.right_override?t.right_override+(t.wright_inv?t.wright_inv:0):30+(t.wright?t.wright:0),this.units=t.width_override||t.height_override||t.bottom_override||t.right_override?"px":t.units,this.resize(),this.bottom_override=!!t.bottom_override}},{key:"hide",value:function(){this.cont.hide()}},{key:"hideInvitation",value:function(){this.attributes.cont_ss&&(this.cont.elmDom.style.cssText+=this.attributes.cont_ss)}},{key:"showInvitation",value:function(){this.attributes.cont_ss&&(this.cont.elmDom.style.cssText=this.originalCSS),this.show()}},{key:"show",value:function(){!1===this.isLoaded&&this.bootstrap(),this.cont.show()}}]),t}()},5962:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{f:function(){return mainWidgetPopup}});var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5671),_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(3144),mainWidgetPopup=function(){function mainWidgetPopup(){(0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__.Z)(this,mainWidgetPopup),this.attributes={},this.width=null,this.height=null,this.units="px",this.freeup()}return(0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__.Z)(mainWidgetPopup,[{key:"freeup",value:function(){this.cont={}}},{key:"parseOptions",value:function(){var t=new Array,e="";if(void 0!==this.attributes){if(void 0!==this.attributes.LHCChatOptions.attr&&this.attributes.LHCChatOptions.attr.length>0)for(var i in this.attributes.LHCChatOptions.attr)void 0!==this.attributes.LHCChatOptions.attr[i]&&void 0!==this.attributes.LHCChatOptions.attr[i].type&&t.push("name[]="+encodeURIComponent(this.attributes.LHCChatOptions.attr[i].name)+"&encattr[]="+(void 0!==this.attributes.LHCChatOptions.attr[i].encrypted&&1==this.attributes.LHCChatOptions.attr[i].encrypted?"t":"f")+"&value[]="+encodeURIComponent(this.attributes.LHCChatOptions.attr[i].value)+"&type[]="+encodeURIComponent(this.attributes.LHCChatOptions.attr[i].type)+"&size[]="+encodeURIComponent(this.attributes.LHCChatOptions.attr[i].size)+"&req[]="+(void 0!==this.attributes.LHCChatOptions.attr[i].req&&1==this.attributes.LHCChatOptions.attr[i].req?"t":"f")+"&sh[]="+(void 0===this.attributes.LHCChatOptions.attr[i].show||"on"!=this.attributes.LHCChatOptions.attr[i].show&&"off"!=this.attributes.LHCChatOptions.attr[i].show?"b":this.attributes.LHCChatOptions.attr[i].show));if(void 0!==this.attributes.LHCChatOptions.attr_prefill&&this.attributes.LHCChatOptions.attr_prefill.length>0)for(var i in this.attributes.LHCChatOptions.attr_prefill)void 0!==this.attributes.LHCChatOptions.attr_prefill[i]&&void 0!==this.attributes.LHCChatOptions.attr_prefill[i].name&&t.push("prefill["+this.attributes.LHCChatOptions.attr_prefill[i].name+"]="+encodeURIComponent(this.attributes.LHCChatOptions.attr_prefill[i].value));if(void 0!==this.attributes.LHCChatOptions.attr_prefill_admin&&this.attributes.LHCChatOptions.attr_prefill_admin.length>0)for(var i in this.attributes.LHCChatOptions.attr_prefill_admin)void 0!==this.attributes.LHCChatOptions.attr_prefill_admin[i]&&t.push("value_items_admin["+this.attributes.LHCChatOptions.attr_prefill_admin[i].index+"]="+encodeURIComponent(this.attributes.LHCChatOptions.attr_prefill_admin[i].value));t.length>0&&(e="&"+t.join("&"))}return e}},{key:"init",value:function(t,e,i){if(this.cont.elementReferrerPopup&&!1===this.cont.elementReferrerPopup.closed)void 0!==i&&"undefined"!==i.event&&i.event.preventDefault(),this.cont.elementReferrerPopup.focus();else{this.attributes=t;var n={static_chat:this.attributes.userSession.getSessionAttributes()},s="";n.static_chat.id&&n.static_chat.hash&&(s=s+"/(id)/"+n.static_chat.id+"/(hash)/"+n.static_chat.hash),null!==this.attributes.theme&&(s=s+"/(theme)/"+this.attributes.theme),null!==n.static_chat.vid&&!0===this.attributes.storageHandler.cookieEnabled&&(s=s+"/(vid)/"+n.static_chat.vid),this.attributes.isMobile&&(s+="/(mobile)/true"),this.attributes.department.length>0&&(s=s+"/(department)/"+this.attributes.department.join("/")),""!=this.attributes.identifier&&(s=s+"/(identifier)/"+this.attributes.identifier),this.attributes.operator&&(s=s+"/(operator)/"+this.attributes.operator),this.attributes.survey&&(s=s+"/(survey)/"+this.attributes.survey),this.attributes.bot_id&&(s=s+"/(bot)/"+this.attributes.bot_id),this.attributes.trigger_id&&(s=s+"/(trigger)/"+this.attributes.trigger_id),this.attributes.subject_id&&(s=s+"/(subject)/"+this.attributes.subject_id),this.attributes.priority&&(s=s+"/(priority)/"+this.attributes.priority),"lhc"!=this.attributes.prefixLowercase&&(s=s+"/(scope)/"+this.attributes.prefixLowercase),s=s+"/(sound)/"+(1==this.attributes.toggleSound.value?1:0),this.attributes.proactive.invitation&&(s=s+"/(inv)/"+this.attributes.proactive.invitation,"popup"==this.attributes.mode&&this.attributes.storageHandler.setSessionStorage(this.attributes.prefixStorage+"_invt",1));var r=this.attributes.storageHandler.getLocalStorage(this.attributes.prefixStorage+"_dfs");r&&(s=s+"/(fs)/"+parseInt(r)),!0===this.attributes.leaveMessage&&(s+="/(leaveamessage)/true"),s=null!==this.attributes.userSession.getSessionReferrer()&&""!=this.attributes.userSession.getSessionReferrer()?s+"?ses_ref="+this.attributes.userSession.getSessionReferrer()+this.parseOptions():s+"?"+this.parseOptions();var o=void 0!==window.screenLeft?window.screenLeft:window.screenX,a=void 0!==window.screenTop?window.screenTop:window.screenY,u=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,c=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height,h=u/window.screen.availWidth,l=(u-parseInt(this.attributes.popupDimesnions.pwidth))/2/h+o,d=(c-parseInt(this.attributes.popupDimesnions.pheight))/2/h+a,p="scrollbars=yes,menubar=1,resizable=1,width="+this.attributes.popupDimesnions.pwidth+",height="+this.attributes.popupDimesnions.pheight+",top="+d+",left="+l,m=window.open("",this.attributes.prefixStorage+"_popup_v2",p),_=!1,f=!1;try{!m||m.closed||void 0===m.closed||"about:blank"===m.location.href?(m=this.cont.elementReferrerPopup=window.open(this.attributes.base_url+this.attributes.lang+"chat/start"+s,this.attributes.prefixStorage+"_popup_v2",p),f=!0):_=!0}catch(t){_=!0}if(!m||m.closed||void 0===m.closed)try{this.attributes.viewHandler.cont.getElementById("status-icon").href=this.attributes.base_url+this.attributes.lang+"chat/start"+s}catch(t){alert("You have disabled popups!")}else 1==f?(void 0!==e&&!1===this.attributes.kcw&&e.sendChildEvent("endedChat",[{sender:"endButton"}]),void 0!==i&&"undefined"!==i.event&&i.event.preventDefault()):!0===_&&(this.cont.elementReferrerPopup=m,m.focus(),void 0!==i&&"undefined"!==i.event&&i.event.preventDefault())}}},{key:"sendParameters",value:function sendParameters(chatEvents){if(this.cont.elementReferrerPopup&&!1===this.cont.elementReferrerPopup.closed){var js_vars=this.attributes.jsVars.value,js_args={},currentVar=null;for(var index in js_vars)try{currentVar=eval(js_vars[index].var),null!=currentVar&&""!==currentVar&&(js_args[js_vars[index].id]=currentVar)}catch(t){}chatEvents.sendChildEvent("jsVars",[js_args])}}}]),mainWidgetPopup}()},3678:function(t,e,i){"use strict";i.d(e,{T:function(){return a}});var n=i(5671),s=i(3144),r=(i(7761),i(3031)),o=i(2137),a=function(){function t(e){(0,n.Z)(this,t),this.attributes={},this.controlMode=!1,this.cont=new r.a((e||"lhc")+"_status_widget_v2",o.a.getAbstractStyle({zindex:"2147483640",width:"95px",height:"95px",position:"fixed",display:"none",maxheight:"95px",maxwidth:"95px",minheight:"95px",minwidth:"95px"}),null,"iframe"),this.loadStatus={main:!1,theme:!1,font:!0,widget:!1,shidden:!1},this.lload=!1,this.unread_counter=0}return(0,s.Z)(t,[{key:"toggleOfflineIcon",value:function(t){var e=this.cont.getElementById("status-icon");t?(this.attributes.leaveMessage||this.show(),o.a.removeClass(e,"offline-status")):this.attributes.leaveMessage?o.a.addClass(e,"offline-status"):this.hide()}},{key:"checkLoadStatus",value:function(){1==this.loadStatus.theme&&1==this.loadStatus.main&&1==this.loadStatus.font&&1==this.loadStatus.widget&&0==this.loadStatus.shidden&&(this.cont.getElementById("lhc_status_container").style.display="",this.attributes.sload.next(!0))}},{key:"init",value:function(t,e){var i=this;this.attributes=t;var n={bottom:10+this.attributes.widgetDimesions.value.sbottom+"px",right:10+this.attributes.widgetDimesions.value.sright+"px"};if("bottom_left"==t.position_placement||"full_height_left"==t.position_placement?n={bottom:10+this.attributes.widgetDimesions.value.sbottom+"px",left:10+this.attributes.widgetDimesions.value.sright+"px"}:"middle_right"==t.position_placement?n={bottom:"calc(50% - 45px)",right:10+this.attributes.widgetDimesions.value.sright+"px"}:"middle_left"==t.position_placement&&(n={bottom:"calc(50% - 45px)",left:10+this.attributes.widgetDimesions.value.sright+"px"}),this.cont.massRestyle(n),this.cont.tmpl='',null===this.cont.constructUIIframe(""))return null;this.cont.elmDom.className=!0===this.attributes.isMobile?"lhc-mobile":"lhc-desktop";var s=this;this.lload=!!e,!0===this.lload?this.loadStatus.widget=!0:t.wloaded.subscribe((function(t){t&&(i.loadStatus.widget=!0,i.checkLoadStatus())})),t.shidden.subscribe((function(t){t?i.attributes.userSession.getSessionAttributes().id||1==i.attributes.widgetStatus.value||(i.loadStatus.shidden=!0,i.hide()):(i.loadStatus.shidden=!1,i.checkLoadStatus(),i.show())})),this.cont.attachUserEventListener("click",(function(e){!1===t.onlineStatus.value&&t.eventEmitter.emitEvent("offlineClickAction"),!1===t.onlineStatus.value&&null!==t.offline_redirect?(document.location=t.offline_redirect,e.preventDefault()):1==s.controlMode?(t.eventEmitter.emitEvent("closeWidget",[{sender:"closeButton",mode:"control"}]),e.preventDefault()):(t.eventEmitter.emitEvent("showWidget",[{event:e}]),t.eventEmitter.emitEvent("clickAction"))}),"lhc_status_container","minifiedclick"),this.attributes.staticJS.fontCSS&&this.cont.insertCssRemoteFile({crossOrigin:"anonymous",href:this.attributes.staticJS.fontCSS}),this.attributes.staticJS.font_status&&this.cont.insertCssRemoteFile({onload:function(){i.loadStatus.font=!0,i.checkLoadStatus()},as:"font",rel:"preload",type:"font/woff",crossOrigin:"anonymous",href:this.attributes.staticJS.font_status}),this.attributes.theme?(this.loadStatus.theme=!1,this.cont.insertCssRemoteFile({onload:function(){i.loadStatus.theme=!0,i.checkLoadStatus()},id:"lhc-theme-status",crossOrigin:"anonymous",href:this.attributes.LHC_API.args.lhc_base_url+"/widgetrestapi/themestatus/"+this.attributes.theme+"?v="+this.attributes.theme_v},!0)):this.loadStatus.theme=!0,this.cont.insertCssRemoteFile({onload:function(){i.loadStatus.main=!0,i.checkLoadStatus()},crossOrigin:"anonymous",href:this.attributes.staticJS.status_css}),this.attributes.staticJS.page_css&&o.a.insertCssRemoteFile({crossOrigin:"anonymous",id:"lhc-theme-page",href:this.attributes.LHC_API.args.lhc_base_url+"/widgetrestapi/themepage/"+this.attributes.theme+"?v="+this.attributes.theme_v}),t.onlineStatus.subscribe((function(t){return i.toggleOfflineIcon(t)})),t.widgetStatus.subscribe((function(t){if("popup"!==i.attributes.mode){var e=i.attributes.userSession.getSessionAttributes();1==t||!i.attributes.leaveMessage&&0==i.attributes.onlineStatus.value&&!e.id?i.hide():i.show()}})),"popup"===this.attributes.mode&&this.show();var r=t.storageHandler.getSessionStorage(this.attributes.prefixStorage+"_unr");t.eventEmitter.addListener("unread_message",(function(t){var e=t&&t.otm;e&&(e=parseInt(e),e+=i.unread_counter),i.attributes.unread_counter.next(e),i.showUnreadIndicator(e)})),null!==r&&(t.eventEmitter.emitEvent("unread_message",[{otm:r,init:!0}]),null===r||isNaN(r)||(this.unread_counter=parseInt(r))),t.eventEmitter.addListener("reloadWidget",(function(){i.attributes.theme>0&&i.cont.insertCssRemoteFile({crossOrigin:"anonymous",id:"lhc-theme-status",href:i.attributes.LHC_API.args.lhc_base_url+"/widgetrestapi/themestatus/"+i.attributes.theme+"?v="+Date.now()},!0),o.a.insertCssRemoteFile({crossOrigin:"anonymous",id:"lhc-theme-page",href:i.attributes.LHC_API.args.lhc_base_url+"/widgetrestapi/themepage/"+i.attributes.theme+"?v="+Date.now()})}))}},{key:"hide",value:function(){if(this.removeUnreadIndicator(),!0===this.attributes.clinst&&0==this.attributes.isMobile){var t=this.attributes.userSession.getSessionAttributes();if((1==this.attributes.leaveMessage||1==this.attributes.onlineStatus.value||t.id)&&(("api"!=this.attributes.position||"api"==this.attributes.position&&!0!==this.attributes.hide_status&&(t.id&&t.hash||1==this.attributes.widgetStatus.value))&&(!0!==this.attributes.hide_status||t.id&&t.hash)&&this.cont.show(),!0!==this.attributes.hide_status||t.id&&t.hash||1==this.attributes.widgetStatus.value)){if(1==this.attributes.widgetStatus.value){this.controlMode=!0;var e=this.cont.getElementById("status-icon");o.a.addClass(e,"close-status")}return}}this.cont.hide()}},{key:"showUnreadIndicator",value:function(t){var e=t||"!",i=this.cont.getElementById("lhc_status_container");o.a.addClass(i,"has-uread-message");var n=this.cont.getElementById("unread-msg-number");n&&(n.innerText=e),this.attributes.storageHandler&&this.attributes.storageHandler.setSessionStorage(this.attributes.prefixStorage+"_unr",e)}},{key:"removeUnreadIndicator",value:function(){var t=this.cont.getElementById("lhc_status_container");o.a.removeClass(t,"has-uread-message"),this.attributes.storageHandler&&this.attributes.storageHandler.removeSessionStorage(this.attributes.prefixStorage+"_unr"),this.attributes.eventEmitter.emitEvent("remove_unread_indicator",[]),this.attributes.unread_counter.next(0),this.unread_counter=0}},{key:"show",value:function(){if(!1===this.attributes.hideOffline){var t=this.attributes.userSession.getSessionAttributes();if(!0===this.attributes.clinst&&0==this.attributes.isMobile&&1!=this.attributes.widgetStatus.value){var e=this.cont.getElementById("status-icon");o.a.removeClass(e,"close-status"),this.controlMode=!1}"api"!=this.attributes.position||"api"==this.attributes.position&&!0!==this.attributes.hide_status&&t.id&&t.hash?this.cont.show():!0===this.attributes.clinst&&1!=this.attributes.widgetStatus.value&&this.cont.hide()}else this.cont.hide()}}]),t}()},6349:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{Z:function(){return chatEventsHandler}});var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5671),_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(3144),chatEventsHandler=function(){function chatEventsHandler(t){(0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__.Z)(this,chatEventsHandler),this.attributes=t}return(0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__.Z)(chatEventsHandler,[{key:"getJSVarsValues",value:function getJSVarsValues(jsVars){var js_args={};if(jsVars.length>0){var currentVar=null;for(var index in jsVars)try{currentVar=eval("window."+jsVars[index].var),null!=currentVar&&""!==currentVar&&(js_args[jsVars[index].id]=currentVar)}catch(t){}return js_args}return js_args}},{key:"getInitAttributes",value:function(){var t={onlineStatus:this.attributes.onlineStatus.value,toggleSound:this.attributes.toggleSound.value,widgetStatus:this.attributes.widgetStatus.value,jsVars:this.getJSVarsValues(this.attributes.jsVars.value),isMobile:this.attributes.isMobile,department:this.attributes.department,product:this.attributes.product,theme:this.attributes.theme,theme_v:this.attributes.theme_v,base_url:this.attributes.base_url,mode:this.attributes.mode,captcha:this.attributes.captcha,staticJS:this.attributes.staticJS,static_chat:this.attributes.userSession.getSessionAttributes(),domain_lhc:this.attributes.domain_lhc,leave_message:this.attributes.leaveMessage,scope_prefix:this.attributes.prefixLowercase};if(1==this.attributes.fresh&&(t.static_chat.id&&delete t.static_chat.id,t.static_chat.hash&&delete t.static_chat.hash),""!=this.attributes.bot_id&&(t.bot_id=this.attributes.bot_id),""!=this.attributes.trigger_id&&(t.trigger_id=this.attributes.trigger_id),""!=this.attributes.subject_id&&(t.subject_id=this.attributes.subject_id),""!=this.attributes.priority&&(t.priority=this.attributes.priority),null!==this.attributes.phash&&(t.phash=this.attributes.phash),null!==this.attributes.survey&&(t.survey=this.attributes.survey),null!==this.attributes.pvhash&&(t.pvhash=this.attributes.pvhash),null!==this.attributes.operator&&(t.operator=this.attributes.operator),null!==this.attributes.profile_pic&&(t.profile_pic=this.attributes.profile_pic),""!=this.attributes.lang&&(t.lang=this.attributes.lang),this.attributes.proactive.invitation&&(t.proactive=this.attributes.proactive),null!==this.attributes.dep_default&&(t.dep_default=this.attributes.dep_default),this.attributes.LHCChatOptions&&this.attributes.LHCChatOptions.attr){var e=this.attributes.LHCChatOptions.attr,i=[];e.forEach((function(t,e){i.push({show:void 0===t.show||"on"!=t.show&&"off"!=t.show?"b":t.show,value:t.value,index:e,name:t.name,class:"form-control form-control-sm",type:t.type,identifier:"additional_"+e,placeholder:"",width:t.size||6,encrypted:t.encrypted||!1,required:t.req||!1,label:t.name})})),t.CUSTOM_FIELDS=i}if(this.attributes.LHCChatOptions&&this.attributes.LHCChatOptions.attr_prefill){e=this.attributes.LHCChatOptions.attr_prefill;var n=[];e.forEach((function(t){"email"==t.name?n.push({Email:t.value}):"username"==t.name?n.push({Username:t.value}):"phone"==t.name?n.push({Phone:t.value}):"question"==t.name&&n.push({Question:t.value})})),n=n.concat(this.attributes.userSession.getPrefillVars()),t.attr_prefill=n}else t.attr_prefill=this.attributes.userSession.getPrefillVars();if(this.attributes.LHCChatOptions&&this.attributes.LHCChatOptions.attr_prefill_admin){e=this.attributes.LHCChatOptions.attr_prefill_admin;var s=[];e.forEach((function(t){s.push({value:t.value,index:t.index})})),t.attr_prefill_admin=s}return null!==this.attributes.userSession.getSessionReferrer()&&(t.ses_ref=this.attributes.userSession.getSessionReferrer()),t}},{key:"sendChildCommand",value:function(t){this.attributes.mainWidget.cont.elmDom&&this.attributes.mainWidget.cont.elmDom.contentWindow&&this.attributes.mainWidget.cont.elmDom.contentWindow.postMessage(t,this.attributes.isIE?"*":"/"),this.attributes.popupWidget.cont.elementReferrerPopup&&!1===this.attributes.popupWidget.cont.elementReferrerPopup.closed&&this.attributes.popupWidget.cont.elementReferrerPopup.postMessage(t,"*")}},{key:"sendReadyEvent",value:function(t){var e=this.getInitAttributes();!0!==t&&this.attributes.mainWidget.cont.elmDom&&this.attributes.mainWidget.cont.elmDom.contentWindow&&this.attributes.mainWidget.cont.elmDom.contentWindow.postMessage("lhc_init:"+JSON.stringify(e),this.attributes.isIE?"*":"/")}},{key:"sendChildEvent",value:function(t,e,i){void 0===i&&(i="lhc_event"),this.sendChildCommand(i+":"+t+"::"+JSON.stringify(e))}}]),chatEventsHandler}()},593:function(t,e,i){"use strict";i.d(e,{U:function(){return r}});var n=i(5671),s=i(3144),r=new(function(){function t(){(0,n.Z)(this,t),this.events={}}return(0,s.Z)(t,[{key:"attachEvent",value:function(t,e,i){var n=this,s=function(e){i.call(t,n.getEvent(e))};return t.attachEvent("on"+e,s),s}},{key:"unlisten",value:function(t){var e;this.events[t]&&(e=this.events[t],this.events[t]=null,this.removeEventHandler(e.element,e.eventName,e.eventListener))}},{key:"listen",value:function(t,e,i,n){var s;if(n){if(this.events[n]&&(s=this.events[n],this.events[n]=null,this.removeEventHandler(s.element,s.eventName,s.eventListener)),t.addEventListener)t.addEventListener(e,i,!1);else{if(!document.attachEvent)return null;i=this.attachEvent(t,e,i)}return this.events[n]={element:t,eventName:e,eventListener:i},i}}},{key:"removeEventHandler",value:function(t,e,i){document.removeEventListener?t.removeEventListener(e,i,!1):t.detachEvent("on"+e,i)}},{key:"getEvent",value:function(t){var e=t||_this.event;if(!e)for(t=this.getEvent.caller;t&&(!(e=t.arguments[0])||Event!=e.constructor);)t=t.caller;return e}}]),t}())},6419:function(t,e,i){"use strict";i.d(e,{h:function(){return r}});var n=i(5671),s=i(3144),r=function(){function t(e,i){(0,n.Z)(this,t),this.valueInternal=e,this.listeners=[],this.params=i||{}}return(0,s.Z)(t,[{key:"value",get:function(){return this.valueInternal},set:function(t){this.next(t)}},{key:"next",value:function(t){this.valueInternal=t,this.callListeners()}},{key:"nextPropertySilent",value:function(t,e){this.valueInternal[t]=e}},{key:"nextProperty",value:function(t,e){this.valueInternal[t]=e,this.callListeners()}},{key:"callListeners",value:function(){var t=this;this.listeners.forEach((function(e){e&&"function"==typeof e&&e(t.valueInternal)}))}},{key:"unsubscribe",value:function(t){-1!==this.listeners.indexOf(t)&&this.listeners.splice(this.listeners.indexOf(t),1)}},{key:"subscribe",value:function(t){this.listeners.push(t),this.params.ignore_sub||t(this.valueInternal)}}]),t}()},5545:function(t,e,i){"use strict";i.d(e,{Q:function(){return r}});var n=i(5671),s=i(3144),r=function(){function t(e,i,s,r){(0,n.Z)(this,t),this.window=e,this.cookieEnabled=!1,this.cookiesSupportChecked=!1,1==r&&this.checkCookiesSupport(),this.domain=i,this.secureCookie=!1,this.cookiePerPage=!1,this.prefix=s||"lhc"}return(0,s.Z)(t,[{key:"checkCookiesSupport",value:function(){if(!0===this.cookiesSupportChecked)return this.cookieEnabled;this.cookiesSupportChecked=!0;try{this.hasSessionStorage=!!this.window.sessionStorage}catch(t){this.hasSessionStorage=!1}try{this.hasLocalStorage=!!this.window.localStorage}catch(t){this.hasLocalStorage=!1}try{document.cookie="cookietest=1",this.cookieEnabled=-1!==document.cookie.indexOf("cookietest="),document.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT"}catch(t){}return this.cookieEnabled}},{key:"setCookieDomain",value:function(t){this.domain=t}},{key:"setCookiePerPage",value:function(t){this.cookiePerPage=t}},{key:"getCookieDomain",value:function(){return this.domain?"."+this.domain:null}},{key:"setSecureCookie",value:function(t){this.secureCookie=t}},{key:"setHTTPCookie",value:function(t,e,i,n){if(!1!==this.cookieEnabled){var s="";i||((i=new Date).setTime(i.getTime()+15552e6),s="; expires="+i.toGMTString()),document.cookie=t+"="+e+s+(!1===this.cookiePerPage?"; path=/":!0===this.cookiePerPage?"":"; path="+this.cookiePerPage)+(this.secureCookie?";secure":"")+(n?";domain="+n:"")+";SameSite=Lax"}}},{key:"getHTTPCookie",value:function(t){if(!1===this.cookieEnabled)return[];var e,i,n=[],s=t+"=",r=document.cookie.split(";");for(t=0,e=r.length;t0){var e=this.getVars();for(var i in this.jsVars)if(this.jsVars[i].type&&e[this.jsVars[i].id]){var n={};n[this.jsVars[i].type]=e[this.jsVars[i].id],t.push(n)}}return t}},{key:"getVars",value:function getVars(){if(this.jsVars.length>0){var js_args={},currentVar=null;for(var index in this.jsVars)try{currentVar=-1!==this.jsVars[index].var.indexOf("lhc_var.")?this.attributes.lhc_var[this.jsVars[index].var.replace("lhc_var.","")]||null:eval(this.jsVars[index].var),null!=currentVar&&""!==currentVar&&(js_args[this.jsVars[index].id]=currentVar)}catch(t){}return js_args}return null}},{key:"getAppendVariables",value:function(){var t="";return null!==this.vid&&(t=t+"/(vid)/"+this.vid),null!==this.hash&&null!==this.id&&(t=t+"/(hash)/"+this.id+"_"+this.hash),t}},{key:"updateJSVars",value:function(t,e){var i=this.getVars(t),n=new XMLHttpRequest;n.open("POST",this.attributes.LHC_API.args.lhc_base_url+"/chat/updatejsvars"+this.getAppendVariables(),!0),n.setRequestHeader("Content-type","application/x-www-form-urlencoded"),n.send("data="+encodeURIComponent(this.JSON.stringify(i))),void 0!==e&&null===this.hash&&null===this.id&&e(i,this.getPrefillVars())}},{key:"setChatInformation",value:function(t,e){this.id=t.id,this.hash=t.hash,null===this.id||e||(this.hnh=Math.round(Date.now()/1e3))}}]),userSession}()},891:function(t,e,i){"use strict";i.r(e),i.d(e,{default:function(){return b}});var n=/iPhone/i,s=/iPod/i,r=/iPad/i,o=/\biOS-universal(?:.+)Mac\b/i,a=/\bAndroid(?:.+)Mobile\b/i,u=/Android/i,c=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,h=/Silk/i,l=/Windows Phone/i,d=/\bWindows(?:.+)ARM\b/i,p=/BlackBerry/i,m=/BB10/i,_=/Opera Mini/i,f=/\b(CriOS|Chrome)(?:.+)Mobile/i,g=/Mobile(?:.+)Firefox\b/i,v=function(t){return void 0!==t&&"MacIntel"===t.platform&&"number"==typeof t.maxTouchPoints&&t.maxTouchPoints>1&&"undefined"==typeof MSStream};function b(t){var e={userAgent:"",platform:"",maxTouchPoints:0};t||"undefined"==typeof navigator?"string"==typeof t?e.userAgent=t:t&&t.userAgent&&(e={userAgent:t.userAgent,platform:t.platform,maxTouchPoints:t.maxTouchPoints||0}):e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0};var i=e.userAgent,b=i.split("[FBAN");void 0!==b[1]&&(i=b[0]),void 0!==(b=i.split("Twitter"))[1]&&(i=b[0]);var w=function(t){return function(e){return e.test(t)}}(i),y={apple:{phone:w(n)&&!w(l),ipod:w(s),tablet:!w(n)&&(w(r)||v(e))&&!w(l),universal:w(o),device:(w(n)||w(s)||w(r)||w(o)||v(e))&&!w(l)},amazon:{phone:w(c),tablet:!w(c)&&w(h),device:w(c)||w(h)},android:{phone:!w(l)&&w(c)||!w(l)&&w(a),tablet:!w(l)&&!w(c)&&!w(a)&&(w(h)||w(u)),device:!w(l)&&(w(c)||w(h)||w(a)||w(u))||w(/\bokhttp\b/i)},windows:{phone:w(l),tablet:w(d),device:w(l)||w(d)},other:{blackberry:w(p),blackberry10:w(m),opera:w(_),firefox:w(g),chrome:w(f),device:w(p)||w(m)||w(_)||w(g)||w(f)},any:!1,phone:!1,tablet:!1};return y.any=y.apple.device||y.android.device||y.windows.device||y.other.device,y.phone=y.apple.phone||y.android.phone||y.windows.phone,y.tablet=y.apple.tablet||y.android.tablet||y.windows.tablet,y}},8259:function(t,e,i){"use strict";t.exports=i(2159)},3434:function(t,e,i){"use strict";var n=i(723);function s(){}var r=null,o={};function a(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("Promise constructor's argument is not a function");this._U=0,this._V=0,this._W=null,this._X=null,t!==s&&p(t,this)}function u(t,e){for(;3===t._V;)t=t._W;if(a._Y&&a._Y(t),0===t._V)return 0===t._U?(t._U=1,void(t._X=e)):1===t._U?(t._U=2,void(t._X=[t._X,e])):void t._X.push(e);!function(t,e){n((function(){var i=1===t._V?e.onFulfilled:e.onRejected;if(null!==i){var n=function(t,e){try{return t(e)}catch(t){return r=t,o}}(i,t._W);n===o?h(e.promise,r):c(e.promise,n)}else 1===t._V?c(e.promise,t._W):h(e.promise,t._W)}))}(t,e)}function c(t,e){if(e===t)return h(t,new TypeError("A promise cannot be resolved with itself."));if(e&&("object"==typeof e||"function"==typeof e)){var i=function(t){try{return t.then}catch(t){return r=t,o}}(e);if(i===o)return h(t,r);if(i===t.then&&e instanceof a)return t._V=3,t._W=e,void l(t);if("function"==typeof i)return void p(i.bind(e),t)}t._V=1,t._W=e,l(t)}function h(t,e){t._V=2,t._W=e,a._Z&&a._Z(t,e),l(t)}function l(t){if(1===t._U&&(u(t,t._X),t._X=null),2===t._U){for(var e=0;e "+e+") {","args = new Array(arguments.length + 1);","for (var i = 0; i < arguments.length; i++) {","args[i] = arguments[i];","}","}","return new Promise(function (rs, rj) {","var cb = "+r+";","var res;","switch (argLength) {",i.concat(["extra"]).map((function(t,e){return"case "+e+":res = fn.call("+["self"].concat(i.slice(0,e)).concat("cb").join(",")+");break;"})).join(""),"default:","args[argLength] = cb;","res = fn.apply(self, args);","}","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],o)(n,t)}(t)};var r="function (err, res) {if (err) { rj(err); } else { rs(res); }}";n.nodeify=function(t){return function(){var e=Array.prototype.slice.call(arguments),i="function"==typeof e[e.length-1]?e.pop():null,r=this;try{return t.apply(this,arguments).nodeify(i,r)}catch(t){if(null==i)return new n((function(e,i){i(t)}));s((function(){i.call(r,t)}))}}},n.prototype.nodeify=function(t,e){if("function"!=typeof t)return this;this.then((function(i){s((function(){t.call(e,null,i)}))}),(function(i){s((function(){t.call(e,i)}))}))}},3690:function(t,e,i){"use strict";var n=i(3434);t.exports=n,n.enableSynchronous=function(){n.prototype.isPending=function(){return 0==this.getState()},n.prototype.isFulfilled=function(){return 1==this.getState()},n.prototype.isRejected=function(){return 2==this.getState()},n.prototype.getValue=function(){if(3===this._V)return this._W.getValue();if(!this.isFulfilled())throw new Error("Cannot get a value of an unfulfilled promise.");return this._W},n.prototype.getReason=function(){if(3===this._V)return this._W.getReason();if(!this.isRejected())throw new Error("Cannot get a rejection reason of a non-rejected promise.");return this._W},n.prototype.getState=function(){return 3===this._V?this._W.getState():-1===this._V||-2===this._V?0:this._V}},n.disableSynchronous=function(){n.prototype.isPending=void 0,n.prototype.isFulfilled=void 0,n.prototype.isRejected=void 0,n.prototype.getValue=void 0,n.prototype.getReason=void 0,n.prototype.getState=void 0}},4795:function(t,e,i){var n;!function(e){"use strict";function s(){}var r=s.prototype,o=e.EventEmitter;function a(t,e){for(var i=t.length;i--;)if(t[i].listener===e)return i;return-1}function u(t){return function(){return this[t].apply(this,arguments)}}function c(t){return"function"==typeof t||t instanceof RegExp||!(!t||"object"!=typeof t)&&c(t.listener)}r.getListeners=function(t){var e,i,n=this._getEvents();if(t instanceof RegExp)for(i in e={},n)n.hasOwnProperty(i)&&t.test(i)&&(e[i]=n[i]);else e=n[t]||(n[t]=[]);return e},r.flattenListeners=function(t){var e,i=[];for(e=0;e0&&x.userSession.setupVarsMonitoring(t.js_vars,(function(t,e){L.sendChildEvent("jsVars",[t,e])}))),"widget"!=x.mode&&"popup"!=x.mode||x.viewHandler.init(x,t.ll),"api"==x.position&&"embed"==x.mode||x.mainWidget.init(x,t.ll),"widget"!=x.mode&&"popup"!=x.mode||D.cont.show(),x.loadcb&&x.loadcb(x),t.init_calls&&(x.init_calls=t.init_calls),x.proactive_interval=t.chat_ui.proactive_interval,t.disable_proactive||"widget"!=x.mode&&"popup"!=x.mode&&"embed"!=x.mode||void 0!==o.args.proactive&&!0!==o.args.proactive||null!==x.storageHandler.getSessionStorage(w+"_invt")||H(),x.init_calls.length>0&&x.init_calls.forEach((function(t){"nodeJSChat"==t.extension&&Promise.all([__webpack_require__.e(8),__webpack_require__.e(417)]).then(__webpack_require__.bind(__webpack_require__,9417)).then((function(e){e.nodeJSChat.setParams(t.params,x,L)}))})));else{if(t.terminate)return;x.userSession.setVID(t.vid),x.terminated=!0,m.removeById(x.prefixLowercase+"_container_v2"),m.removeById(x.prefixLowercase+"_status_widget_v2");var e=document.createElement("script");e.type=n.type,e.id=x.prefixLowercase+"-js-reload",e.async=!0,n.getAttribute("scope")&&e.setAttribute("scope",n.getAttribute("scope")),e.src=n.getAttribute("src")+"&r="+(new Date).getHours()+(new Date).getMinutes();var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(e,s)}})),x.eventEmitter.addListener("closeWidget",(function(t){x.widgetStatus.next(!1),L.sendChildEvent("closedWidget",[t])})),x.eventEmitter.addListener("sendChildEvent",(function(t){void 0!==t.boot?x.mainWidget.bootstrap():1==x.mainWidget.isLoaded&&1==i.loaded?L.sendChildEvent(t.cmd,[t.arg]):x.childCommands.push(t)})),x.eventEmitter.addListener("sendChildExtEvent",(function(t){void 0!==t.boot?x.mainWidget.bootstrap():1==x.mainWidget.isLoaded&&1==i.loaded?L.sendChildEvent(t.cmd,[t.arg],"lhc_load_ext"):x.childExtCommands.push(t)})),x.eventEmitter.addListener("toggleSound",(function(){var t=!x.toggleSound.value;x.toggleSound.next(t)})),x.eventEmitter.addListener("enableCookies",(function(){if(!0===f.checkCookiesSupport()){var t=x.userSession.getSessionAttributes();void 0!==t.hnh&&delete t.hnh,x.storageHandler.storeSessionInformation(t),void 0!==o.args.orig&&(x.mode=o.args.mode=o.args.orig.mode,o.args.proactive=o.args.orig.proactive,o.args.check_messages=o.args.orig.check_messages,m.makeRequest(o.args.lhc_base_url+x.lang+"widgetrestapi/settings",{params:P()},(function(t){x.eventEmitter.emitEvent("sendChildEvent",[{cmd:"attr_set",arg:{type:"attr_set",attr:["mode"],data:x.mode}}]),"widget"==x.mode&&null!==x.nh&&I(x.nh),"widget"!=x.mode&&"popup"!=x.mode||void 0!==o.args.proactive&&!0!==o.args.proactive||null!==x.storageHandler.getSessionStorage(w+"_invt")||H()})))}})),x.eventEmitter.addListener("endChatCookies",(function(t){(!1===x.kcw||t&&1==t.force)&&(x.userSession.setChatInformation({id:null,hash:null}),x.storageHandler.storeSessionInformation(x.userSession.getSessionAttributes()),x.proactive={})})),x.eventEmitter.addListener("endChat",(function(t){x.userSession.setChatInformation({id:null,hash:null}),x.storageHandler.storeSessionInformation(x.userSession.getSessionAttributes()),x.proactive={},"popup"==x.mode||t&&t.show_start||x.widgetStatus.next(!1),x.viewHandler&&(x.viewHandler.removeUnreadIndicator(),x.eventEmitter.emitEvent("hide_msg_snippet")),x.widgetDimesions.nextProperty("height_override",null),L.sendChildEvent("endedChat",[{sender:"endButton",survey:x.survey}]),("embed"==x.mode||t&&t.show_start)&&x.eventEmitter.emitEvent("showWidget",[{sender:"closeButton"}]),"popup"==x.mode&&x.popupWidget.freeup()})),x.eventEmitter.addListener("showWidget",(function(t){x.mainWidget.hideInvitation(),x.widgetStatus.next(!0),"popup"==x.mode?(x.popupWidget.init(x,L,t),x.viewHandler.removeUnreadIndicator(),x.mainWidget.hide()):void 0!==t&&void 0!==t.event&&t.event.preventDefault(),L.sendChildEvent("shownWidget",[{sender:"closeButton"}])})),x.eventEmitter.addListener("addTag",(function(t){x.tag=""!=x.tag?x.tag+","+t:t,x.eventEmitter.emitEvent("tagAdded")})),x.eventEmitter.addListener("addEvent",(function(t){x.events=t,x.eventEmitter.emitEvent("eventAdded")})),x.eventEmitter.addListener("addConversion",(function(t){x.conversion=t,x.eventEmitter.emitEvent("conversionAdded")})),x.eventEmitter.addListener("openPopup",(function(){x.popupWidget.init(x,L),x.viewHandler.removeUnreadIndicator(),L.sendChildEvent("shownWidget",[{sender:"closeButton"}]),x.widgetStatus.next(!1)})),x.eventEmitter.addListener("chatStarted",(function(t,e){x.widgetDimesions.nextProperty("height_override",null),"popup"===e&&!0!==x.kcw||x.userSession.setChatInformation(t,x.nh&&x.nh.ap),"popup"==e&&x.mainWidget.hide(),!1!==x.fresh||"popup"===e&&!0!==x.kcw||x.storageHandler.storeSessionInformation(x.userSession.getSessionAttributes())})),x.eventEmitter.addListener("subscribeEvent",(function(t){x.chatNotifications.setPublicKey(t.pk,x.eventEmitter),x.chatNotifications.sendNotification()})),x.eventEmitter.addListener("subcribedEvent",(function(t){L.sendChildEvent("subcribedEvent",[t])})),x.widgetStatus.subscribe((function(t){"popup"!==x.mode&&("embed"!==x.mode&&x.storageHandler.setSessionStorage(w+"_ws",t),L.sendChildEvent("widgetStatus",[t]))})),x.toggleSound.subscribe((function(t){x.storageHandler.setSessionStorage(w+"_sound",t)})),x.onlineStatus.subscribe((function(t){L.sendChildEvent("onlineStatus",[t])})),x.eventEmitter.addListener("screenshot",(function(t){m.makeScreenshot(x.staticJS.screenshot,t)})),x.eventEmitter.addListener("screenshare",(function(t){__webpack_require__.e(398).then(__webpack_require__.bind(__webpack_require__,7398)).then((function(e){e.screenShare.setParams(t||{},x,L)}))})),x.eventEmitter.addListener("location",(function(t){document.location=t})),x.eventEmitter.addListener("terminated",(function(t){x.terminated=!0,m.removeById(x.prefixLowercase+"_container_v2"),m.removeById(x.prefixLowercase+"_status_widget_v2")})),x.eventEmitter.addListener("showInvitation",(function(t){x.widgetDimesions.nextProperty("bottom_override",75),x.widgetDimesions.nextProperty("right_override",75),x.mainWidget.showInvitation()})),x.eventEmitter.addListener("hideAction",(function(t){x.mainWidget.hide()})),x.eventEmitter.addListener("showAction",(function(t){x.mainWidget.show()})),x.eventEmitter.addListener("zoomImage",(function(t){__webpack_require__.e(335).then(__webpack_require__.bind(__webpack_require__,2335)).then((function(e){e.zoomImage.setParams(t||{},x,L)}))})),x.eventEmitter.addListener("hideInvitation",(function(t){x.mainWidget.hideInvitation(),t.full?(x.eventEmitter.emitEvent("showWidget",[{sender:"closeButton"}]),x.eventEmitter.emitEvent("fullInvitation",[t])):x.eventEmitter.emitEvent("cancelInvitation",[])})),x.eventEmitter.addListener("msgSnippet",(function(t){if("widget"==x.mode&&!1===x.widgetStatus.value){if(t.full_widget)return void x.eventEmitter.emitEvent("showWidget",[{sender:"closeButton"}]);"api"==x.position&&x.viewHandler&&x.viewHandler.show(),__webpack_require__.e(213).then(__webpack_require__.bind(__webpack_require__,7213)).then((function(e){x.msgSnippet?x.msgSnippet.showSnippet(t,!0):(x.msgSnippet=new e.msgSnippetWidget(x.prefixLowercase),D.cont.elmDom.appendChild(x.msgSnippet.cont.constructUI(),!0),x.msgSnippet.init(x,t)),x.eventEmitter.emitEvent("unread_message",[{otm:1}])}))}})),x.eventEmitter.addListener("unread_message",(function(t){t&&t.msg_body&&!x.msgSnippet&&__webpack_require__.e(213).then(__webpack_require__.bind(__webpack_require__,7213)).then((function(e){x.msgSnippet||(x.msgSnippet=new e.msgSnippetWidget(x.prefixLowercase),D.cont.elmDom.appendChild(x.msgSnippet.cont.constructUI(),!0),x.msgSnippet.init(x,t))}))})),x.originalTitle=document.title,x.blinkInterval=null,x.eventEmitter.addListener("change_language",(function(t){x.lang=t.lng.replace("/","")+"/"})),x.eventEmitter.addListener("unread_message_title",(function(t){clearInterval(x.blinkInterval),0==t.status?x.blinkInterval=setInterval((function(){document.title=Math.round((new Date).getTime()/1e3)%2?"💬 "+x.originalTitle:x.originalTitle}),1e3):(x.focused=!0,document.title=x.originalTitle)})),x.eventEmitter.addListener("widgetHeight",(function(t){if(t.reset_height)return x.widgetDimesions.nextProperty("height_override",null),x.widgetDimesions.nextProperty("bottom_override",null),x.widgetDimesions.nextProperty("right_override",null),void x.widgetDimesions.nextProperty("width_override",null);if(t.force_height||t.force_width||t.force_bottom||t.force_right)return t.force_height&&x.widgetDimesions.nextProperty("height_override",t.force_height),t.force_width&&x.widgetDimesions.nextProperty("width_override",t.force_width),t.force_right&&x.widgetDimesions.nextProperty("right_override",t.force_right),void(t.force_bottom&&x.widgetDimesions.nextProperty("bottom_override",t.force_bottom));if("widget"==x.mode&&0==x.isMobile){var i=document,n=i.documentElement,s=i.getElementsByTagName("body")[0],r=e.innerHeight||n.clientHeight||s.clientHeight;parseInt(t.height)>x.widgetDimesions.value.height&&r>parseInt(t.height)?x.widgetDimesions.nextProperty("height_override",parseInt(t.height)):x.widgetDimesions.value.height_override&&x.widgetDimesions.value.height_override>r&&x.widgetDimesions.nextProperty("height_override",null)}}));var j=!1;try{j="serviceWorker"in navigator}catch(t){}if(!0===j)try{navigator.serviceWorker.addEventListener("message",(function(t){try{void 0!==t.data.lhc_ch&&void 0!==t.data.lhc_cid&&(x.widgetStatus.next(!0),"popup"==x.mode?(x.userSession.setChatInformation({id:t.data.lhc_cid,hash:t.data.lhc_ch}),x.eventEmitter.emitEvent("unread_message")):(L.sendChildEvent("shownWidget",[{sender:"closeButton"}]),L.sendChildEvent("reopenNotification",[{id:t.data.lhc_cid,hash:t.data.lhc_ch}])))}catch(t){if(!r)throw Error("lhc : "+t.message);r.log(t.message,"index.js",t.lineNumber||t.line,t.stack)}}))}catch(t){}var q=function(t){if(!0!==x.terminated&&"string"==typeof t.data&&!t.data.indexOf(x.prefixLowercase+"::")){var e=t.data.split("::");if(void 0!==t.origin&&"about:"!=t.origin){var n=t.origin.replace("http://","").replace("https://","").replace(/:(\d+)$/,"");if(n!==document.domain&&x.domain_lhc!==n&&"started"!==e[1]&&"isstarted"!==e[1])return}if("ready"==e[1]){L.sendReadyEvent("true"==e[2]),x.storageHandler.getSessionStorage(w+"_screenshare")&&x.eventEmitter.emitEvent("screenshare",[{auto_start:!0}]);var s=function(t){var e="focus"===t.type;x.focused=e,L.sendChildEvent("focus_changed",[{status:e}])};window.addEventListener("focus",s),window.addEventListener("blur",s),window.addEventListener("pageshow",s),window.addEventListener("pagehide",s),i.loaded=!0,L.sendChildEvent("ext_modules",[x.staticJS.ex_cb_js]),x.childExtCommands.forEach((function(t){L.sendChildEvent(t.cmd,[t.arg],"lhc_load_ext")})),x.childCommands.forEach((function(t){L.sendChildEvent(t.cmd,[t.arg])})),null!==x.react_attr&&x.react_attr.forEach((function(t){L.sendChildEvent("attr_set",[{type:"attr_set",attr:t.k,data:t.v}])}))}else"ready_popup"==e[1]?x.popupWidget.sendParameters(L):"isstarted"==e[1]?x.eventEmitter.emitEvent("terminated",[]):"started"==e[1]?x.hide_parent?x.eventEmitter.emitEvent("terminated",[]):t.source.postMessage("lhc::isstarted","*"):x.eventEmitter.emitEvent(e[1],JSON.parse(e[2]))}};window.addEventListener?window.addEventListener("message",q,!1):window.attachEvent?window.attachEvent("onmessage",q):document.attachEvent&&document.attachEvent("onmessage",q)},c=function(){!0!==i.ready&&(document.body&&(i.ready=!0),i.init=u,o.args.before_init&&o.args.before_init(i),o.args.manual_init||u())},h=__webpack_require__(593).U;c(),!i.ready||(h.listen(document,"DOMContentLoaded",(function(){c()}),"domloaded"),h.listen(document,"readystatechange",(function(){("complete"===document.readyState||"interactive"===document.readyState&&document.body)&&c()}),"domstatechange"),h.listen(e,"load",(function(){c()}),"windowload"))}.call(this,e["$_"+s],e[s+"_API"])}catch(t){if(!r)throw Error("lhc : "+t.message);r.log(t.message,"index.js",t.lineNumber||t.line,t.stack)}}}(window)}(),this.LiveHelperChat=__webpack_exports__.LiveHelperChatDefault})(); +(function(){var __webpack_modules__={9272:function(t,e,i){"use strict";var n=i(723),s=[],r=[],o=n.makeRequestCallFromTimer((function(){if(r.length)throw r.shift()}));function a(t){var e;(e=s.length?s.pop():new u).task=t,n(e)}function u(){this.task=null}t.exports=a,u.prototype.call=function(){try{this.task.call()}catch(t){a.onerror?a.onerror(t):(r.push(t),o())}finally{this.task=null,s[s.length]=this}}},723:function(t,e,i){"use strict";function n(t){r.length||s(),r[r.length]=t}t.exports=n;var s,r=[],o=0;function a(){for(;o1024){for(var e=0,i=r.length-o;e',null===this.cont.constructUIIframe("",this.attributes.staticJS.dir,this.attributes.staticJS.cl,this.attributes.hhtml))return this.isLoaded=!0,null;this.cont.elmDom.className=!0===this.attributes.isMobile?"lhc-mobile lhc-mode-"+this.attributes.mode:"lhc-desktop lhc-mode-"+this.attributes.mode,this.attributes.cont_ss&&(this.originalCSS=this.cont.elmDom.style.cssText,this.cont.elmDom.style.cssText+=this.attributes.cont_ss)}},{key:"init",value:function(t,e){var i=this;if(this.attributes=t,null===this.makeContent())return null;!this.attributes.userSession.getSessionAttributes().id&&e||this.bootstrap(),this.toggleVisibilityWrap=function(t){i.toggleVisibility(t)},t.widgetStatus.subscribe(this.toggleVisibilityWrap),this.monitorDimensionsWrap=function(t){i.monitorDimensions(t)},"px"==t.widgetDimesions.valueInternal.units&&0==this.attributes.isMobile&&"embed"!=this.attributes.mode&&"full_height_right"!=this.attributes.position_placement&&"full_height_left"!=this.attributes.position_placement&&(this.screenAttributesUpdate=function(){window.innerHeight0&&this.attributes.staticJS.ex_js.forEach((function(e){t.cont.insertJSFile(e,!1)})))}},{key:"toggleVisibility",value:function(t){0==t?this.hide():this.show()}},{key:"monitorDimensions",value:function(t){this.width=t.width_override||t.width_soverride||t.width,this.height=t.height_override||t.height_soverride||t.height,this.bottom=t.bottom_override?t.bottom_override+(t.wbottom?t.wbottom:0):30+(!0===this.attributes.clinst?70:0)+(t.wbottom?t.wbottom:0),this.right=t.right_override?t.right_override+(t.wright_inv?t.wright_inv:0):30+(t.wright?t.wright:0),this.units=t.width_override||t.height_override||t.bottom_override||t.right_override?"px":t.units,this.resize(),this.bottom_override=!!t.bottom_override}},{key:"hide",value:function(){this.cont.hide()}},{key:"hideInvitation",value:function(){this.attributes.cont_ss&&(this.cont.elmDom.style.cssText+=this.attributes.cont_ss)}},{key:"showInvitation",value:function(){this.attributes.cont_ss&&(this.cont.elmDom.style.cssText=this.originalCSS),this.show()}},{key:"show",value:function(){!1===this.isLoaded&&this.bootstrap(),this.cont.show()}}]),t}()},5962:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{f:function(){return mainWidgetPopup}});var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5671),_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(3144),mainWidgetPopup=function(){function mainWidgetPopup(){(0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__.Z)(this,mainWidgetPopup),this.attributes={},this.width=null,this.height=null,this.units="px",this.freeup()}return(0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__.Z)(mainWidgetPopup,[{key:"freeup",value:function(){this.cont={}}},{key:"parseOptions",value:function(){var t=new Array,e="";if(void 0!==this.attributes){if(void 0!==this.attributes.LHCChatOptions.attr&&this.attributes.LHCChatOptions.attr.length>0)for(var i in this.attributes.LHCChatOptions.attr)void 0!==this.attributes.LHCChatOptions.attr[i]&&void 0!==this.attributes.LHCChatOptions.attr[i].type&&t.push("name[]="+encodeURIComponent(this.attributes.LHCChatOptions.attr[i].name)+"&encattr[]="+(void 0!==this.attributes.LHCChatOptions.attr[i].encrypted&&1==this.attributes.LHCChatOptions.attr[i].encrypted?"t":"f")+"&value[]="+encodeURIComponent(this.attributes.LHCChatOptions.attr[i].value)+"&type[]="+encodeURIComponent(this.attributes.LHCChatOptions.attr[i].type)+"&size[]="+encodeURIComponent(this.attributes.LHCChatOptions.attr[i].size)+"&req[]="+(void 0!==this.attributes.LHCChatOptions.attr[i].req&&1==this.attributes.LHCChatOptions.attr[i].req?"t":"f")+"&sh[]="+(void 0===this.attributes.LHCChatOptions.attr[i].show||"on"!=this.attributes.LHCChatOptions.attr[i].show&&"off"!=this.attributes.LHCChatOptions.attr[i].show?"b":this.attributes.LHCChatOptions.attr[i].show));if(void 0!==this.attributes.LHCChatOptions.attr_prefill&&this.attributes.LHCChatOptions.attr_prefill.length>0)for(var i in this.attributes.LHCChatOptions.attr_prefill)void 0!==this.attributes.LHCChatOptions.attr_prefill[i]&&void 0!==this.attributes.LHCChatOptions.attr_prefill[i].name&&t.push("prefill["+this.attributes.LHCChatOptions.attr_prefill[i].name+"]="+encodeURIComponent(this.attributes.LHCChatOptions.attr_prefill[i].value));if(void 0!==this.attributes.LHCChatOptions.attr_prefill_admin&&this.attributes.LHCChatOptions.attr_prefill_admin.length>0)for(var i in this.attributes.LHCChatOptions.attr_prefill_admin)void 0!==this.attributes.LHCChatOptions.attr_prefill_admin[i]&&t.push("value_items_admin["+this.attributes.LHCChatOptions.attr_prefill_admin[i].index+"]="+encodeURIComponent(this.attributes.LHCChatOptions.attr_prefill_admin[i].value));t.length>0&&(e="&"+t.join("&"))}return e}},{key:"init",value:function(t,e,i){if(this.cont.elementReferrerPopup&&!1===this.cont.elementReferrerPopup.closed)void 0!==i&&"undefined"!==i.event&&i.event.preventDefault(),this.cont.elementReferrerPopup.focus();else{this.attributes=t;var n={static_chat:this.attributes.userSession.getSessionAttributes()},s="";n.static_chat.id&&n.static_chat.hash&&(s=s+"/(id)/"+n.static_chat.id+"/(hash)/"+n.static_chat.hash),null!==this.attributes.theme&&(s=s+"/(theme)/"+this.attributes.theme),null!==n.static_chat.vid&&!0===this.attributes.storageHandler.cookieEnabled&&(s=s+"/(vid)/"+n.static_chat.vid),this.attributes.isMobile&&(s+="/(mobile)/true"),this.attributes.department.length>0&&(s=s+"/(department)/"+this.attributes.department.join("/")),""!=this.attributes.identifier&&(s=s+"/(identifier)/"+this.attributes.identifier),this.attributes.operator&&(s=s+"/(operator)/"+this.attributes.operator),this.attributes.survey&&(s=s+"/(survey)/"+this.attributes.survey),this.attributes.bot_id&&(s=s+"/(bot)/"+this.attributes.bot_id),this.attributes.trigger_id&&(s=s+"/(trigger)/"+this.attributes.trigger_id),this.attributes.subject_id&&(s=s+"/(subject)/"+this.attributes.subject_id),this.attributes.priority&&(s=s+"/(priority)/"+this.attributes.priority),"lhc"!=this.attributes.prefixLowercase&&(s=s+"/(scope)/"+this.attributes.prefixLowercase),s=s+"/(sound)/"+(1==this.attributes.toggleSound.value?1:0),this.attributes.proactive.invitation&&(s=s+"/(inv)/"+this.attributes.proactive.invitation,"popup"==this.attributes.mode&&this.attributes.storageHandler.setSessionStorage(this.attributes.prefixStorage+"_invt",1));var r=this.attributes.storageHandler.getLocalStorage(this.attributes.prefixStorage+"_dfs");r&&(s=s+"/(fs)/"+parseInt(r)),!0===this.attributes.leaveMessage&&(s+="/(leaveamessage)/true"),s=null!==this.attributes.userSession.getSessionReferrer()&&""!=this.attributes.userSession.getSessionReferrer()?s+"?ses_ref="+this.attributes.userSession.getSessionReferrer()+this.parseOptions():s+"?"+this.parseOptions();var o=void 0!==window.screenLeft?window.screenLeft:window.screenX,a=void 0!==window.screenTop?window.screenTop:window.screenY,u=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,c=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height,h=u/window.screen.availWidth,l=(u-parseInt(this.attributes.popupDimesnions.pwidth))/2/h+o,d=(c-parseInt(this.attributes.popupDimesnions.pheight))/2/h+a,p="scrollbars=yes,menubar=1,resizable=1,width="+this.attributes.popupDimesnions.pwidth+",height="+this.attributes.popupDimesnions.pheight+",top="+d+",left="+l,m=window.open("",this.attributes.prefixStorage+"_popup_v2",p),_=!1,f=!1;try{!m||m.closed||void 0===m.closed||"about:blank"===m.location.href?(m=this.cont.elementReferrerPopup=window.open(this.attributes.base_url+this.attributes.lang+"chat/start"+s,this.attributes.prefixStorage+"_popup_v2",p),f=!0):_=!0}catch(t){_=!0}if(!m||m.closed||void 0===m.closed)try{this.attributes.viewHandler.cont.getElementById("status-icon").href=this.attributes.base_url+this.attributes.lang+"chat/start"+s}catch(t){alert("You have disabled popups!")}else 1==f?(void 0!==e&&!1===this.attributes.kcw&&e.sendChildEvent("endedChat",[{sender:"endButton"}]),void 0!==i&&"undefined"!==i.event&&i.event.preventDefault()):!0===_&&(this.cont.elementReferrerPopup=m,m.focus(),void 0!==i&&"undefined"!==i.event&&i.event.preventDefault())}}},{key:"sendParameters",value:function sendParameters(chatEvents){if(this.cont.elementReferrerPopup&&!1===this.cont.elementReferrerPopup.closed){var js_vars=this.attributes.jsVars.value,js_args={},currentVar=null;for(var index in js_vars)try{currentVar=eval(js_vars[index].var),null!=currentVar&&""!==currentVar&&(js_args[js_vars[index].id]=currentVar)}catch(t){}chatEvents.sendChildEvent("jsVars",[js_args])}}}]),mainWidgetPopup}()},3678:function(t,e,i){"use strict";i.d(e,{T:function(){return a}});var n=i(5671),s=i(3144),r=(i(7761),i(3031)),o=i(2137),a=function(){function t(e){(0,n.Z)(this,t),this.attributes={},this.controlMode=!1,this.showDelay=null,this.statusDelayProcessed=!1,this.cont=new r.a((e||"lhc")+"_status_widget_v2",o.a.getAbstractStyle({zindex:"2147483640",width:"95px",height:"95px",position:"fixed",display:"none",maxheight:"95px",maxwidth:"95px",minheight:"95px",minwidth:"95px"}),null,"iframe"),this.loadStatus={main:!1,theme:!1,font:!0,widget:!1,shidden:!1},this.lload=!1,this.unread_counter=0}return(0,s.Z)(t,[{key:"toggleOfflineIcon",value:function(t){var e=this.cont.getElementById("status-icon");t?(this.attributes.leaveMessage||this.show(),o.a.removeClass(e,"offline-status")):this.attributes.leaveMessage?o.a.addClass(e,"offline-status"):this.hide()}},{key:"checkLoadStatus",value:function(){1==this.loadStatus.theme&&1==this.loadStatus.main&&1==this.loadStatus.font&&1==this.loadStatus.widget&&0==this.loadStatus.shidden&&(this.cont.getElementById("lhc_status_container").style.display="",this.attributes.sload.next(!0))}},{key:"init",value:function(t,e){var i=this;this.attributes=t;var n={bottom:10+this.attributes.widgetDimesions.value.sbottom+"px",right:10+this.attributes.widgetDimesions.value.sright+"px"};if("bottom_left"==t.position_placement||"full_height_left"==t.position_placement?n={bottom:10+this.attributes.widgetDimesions.value.sbottom+"px",left:10+this.attributes.widgetDimesions.value.sright+"px"}:"middle_right"==t.position_placement?n={bottom:"calc(50% - 45px)",right:10+this.attributes.widgetDimesions.value.sright+"px"}:"middle_left"==t.position_placement&&(n={bottom:"calc(50% - 45px)",left:10+this.attributes.widgetDimesions.value.sright+"px"}),this.cont.massRestyle(n),this.cont.tmpl='',null===this.cont.constructUIIframe(""))return null;this.cont.elmDom.className=!0===this.attributes.isMobile?"lhc-mobile":"lhc-desktop";var s=this;this.lload=!!e,!0===this.lload?this.loadStatus.widget=!0:t.wloaded.subscribe((function(t){t&&(i.loadStatus.widget=!0,i.checkLoadStatus())})),t.shidden.subscribe((function(t){t?i.attributes.userSession.getSessionAttributes().id||1==i.attributes.widgetStatus.value||(i.loadStatus.shidden=!0,i.hide()):(i.loadStatus.shidden=!1,i.checkLoadStatus(),i.show())})),this.cont.attachUserEventListener("click",(function(e){!1===t.onlineStatus.value&&t.eventEmitter.emitEvent("offlineClickAction"),!1===t.onlineStatus.value&&null!==t.offline_redirect?(document.location=t.offline_redirect,e.preventDefault()):1==s.controlMode?(t.eventEmitter.emitEvent("closeWidget",[{sender:"closeButton",mode:"control"}]),e.preventDefault()):(t.eventEmitter.emitEvent("showWidget",[{event:e}]),t.eventEmitter.emitEvent("clickAction"))}),"lhc_status_container","minifiedclick"),this.attributes.staticJS.fontCSS&&this.cont.insertCssRemoteFile({crossOrigin:"anonymous",href:this.attributes.staticJS.fontCSS}),this.attributes.staticJS.font_status&&this.cont.insertCssRemoteFile({onload:function(){i.loadStatus.font=!0,i.checkLoadStatus()},as:"font",rel:"preload",type:"font/woff",crossOrigin:"anonymous",href:this.attributes.staticJS.font_status}),this.attributes.theme?(this.loadStatus.theme=!1,this.cont.insertCssRemoteFile({onload:function(){i.loadStatus.theme=!0,i.checkLoadStatus()},id:"lhc-theme-status",crossOrigin:"anonymous",href:this.attributes.LHC_API.args.lhc_base_url+"/widgetrestapi/themestatus/"+this.attributes.theme+"?v="+this.attributes.theme_v},!0)):this.loadStatus.theme=!0,this.cont.insertCssRemoteFile({onload:function(){i.loadStatus.main=!0,i.checkLoadStatus()},crossOrigin:"anonymous",href:this.attributes.staticJS.status_css}),this.attributes.staticJS.page_css&&o.a.insertCssRemoteFile({crossOrigin:"anonymous",id:"lhc-theme-page",href:this.attributes.LHC_API.args.lhc_base_url+"/widgetrestapi/themepage/"+this.attributes.theme+"?v="+this.attributes.theme_v}),t.onlineStatus.subscribe((function(t){return i.toggleOfflineIcon(t)})),t.widgetStatus.subscribe((function(t){if("popup"!==i.attributes.mode){var e=i.attributes.userSession.getSessionAttributes();1==t||!i.attributes.leaveMessage&&0==i.attributes.onlineStatus.value&&!e.id?i.hide():i.show()}})),"popup"===this.attributes.mode&&this.show();var r=t.storageHandler.getSessionStorage(this.attributes.prefixStorage+"_unr");t.eventEmitter.addListener("unread_message",(function(t){var e=t&&t.otm;e&&(e=parseInt(e),e+=i.unread_counter),i.attributes.unread_counter.next(e),i.showUnreadIndicator(e)})),null!==r&&(t.eventEmitter.emitEvent("unread_message",[{otm:r,init:!0}]),null===r||isNaN(r)||(this.unread_counter=parseInt(r))),t.eventEmitter.addListener("reloadWidget",(function(){i.attributes.theme>0&&i.cont.insertCssRemoteFile({crossOrigin:"anonymous",id:"lhc-theme-status",href:i.attributes.LHC_API.args.lhc_base_url+"/widgetrestapi/themestatus/"+i.attributes.theme+"?v="+Date.now()},!0),o.a.insertCssRemoteFile({crossOrigin:"anonymous",id:"lhc-theme-page",href:i.attributes.LHC_API.args.lhc_base_url+"/widgetrestapi/themepage/"+i.attributes.theme+"?v="+Date.now()})}))}},{key:"hide",value:function(){if(this.removeUnreadIndicator(),!0===this.attributes.clinst&&0==this.attributes.isMobile){var t=this.attributes.userSession.getSessionAttributes();if((1==this.attributes.leaveMessage||1==this.attributes.onlineStatus.value||t.id)&&(("api"!=this.attributes.position||"api"==this.attributes.position&&!0!==this.attributes.hide_status&&(t.id&&t.hash||1==this.attributes.widgetStatus.value))&&(!0!==this.attributes.hide_status||t.id&&t.hash)&&this.cont.show(),!0!==this.attributes.hide_status||t.id&&t.hash||1==this.attributes.widgetStatus.value)){if(1==this.attributes.widgetStatus.value){this.controlMode=!0;var e=this.cont.getElementById("status-icon");o.a.addClass(e,"close-status")}return}}clearTimeout(this.showDelay),this.statusDelayProcessed=!0,this.cont.hide()}},{key:"showUnreadIndicator",value:function(t){var e=t||"!",i=this.cont.getElementById("lhc_status_container");o.a.addClass(i,"has-uread-message");var n=this.cont.getElementById("unread-msg-number");n&&(n.innerText=e),this.attributes.storageHandler&&this.attributes.storageHandler.setSessionStorage(this.attributes.prefixStorage+"_unr",e)}},{key:"removeUnreadIndicator",value:function(){var t=this.cont.getElementById("lhc_status_container");o.a.removeClass(t,"has-uread-message"),this.attributes.storageHandler&&this.attributes.storageHandler.removeSessionStorage(this.attributes.prefixStorage+"_unr"),this.attributes.eventEmitter.emitEvent("remove_unread_indicator",[]),this.attributes.unread_counter.next(0),this.unread_counter=0}},{key:"show",value:function(){var t=this;if(!1===this.attributes.hideOffline){var e=this.attributes.userSession.getSessionAttributes();if(!0===this.attributes.clinst&&0==this.attributes.isMobile&&1!=this.attributes.widgetStatus.value){var i=this.cont.getElementById("status-icon");o.a.removeClass(i,"close-status"),this.controlMode=!1}if("api"!=this.attributes.position||"api"==this.attributes.position&&!0!==this.attributes.hide_status&&e.id&&e.hash){clearTimeout(this.showDelay);var n=this.attributes.userSession.getSessionAttributes();this.showDelay=setTimeout((function(){t.cont.show(),t.statusDelayProcessed=!0}),1==this.statusDelayProcessed||n.id&&n.hash?0:this.attributes.status_delay)}else!0===this.attributes.clinst&&1!=this.attributes.widgetStatus.value&&this.cont.hide()}else this.cont.hide()}}]),t}()},6349:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{Z:function(){return chatEventsHandler}});var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5671),_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(3144),chatEventsHandler=function(){function chatEventsHandler(t){(0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__.Z)(this,chatEventsHandler),this.attributes=t}return(0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__.Z)(chatEventsHandler,[{key:"getJSVarsValues",value:function getJSVarsValues(jsVars){var js_args={};if(jsVars.length>0){var currentVar=null;for(var index in jsVars)try{currentVar=eval("window."+jsVars[index].var),null!=currentVar&&""!==currentVar&&(js_args[jsVars[index].id]=currentVar)}catch(t){}return js_args}return js_args}},{key:"getInitAttributes",value:function(){var t={onlineStatus:this.attributes.onlineStatus.value,toggleSound:this.attributes.toggleSound.value,widgetStatus:this.attributes.widgetStatus.value,jsVars:this.getJSVarsValues(this.attributes.jsVars.value),isMobile:this.attributes.isMobile,department:this.attributes.department,product:this.attributes.product,theme:this.attributes.theme,theme_v:this.attributes.theme_v,base_url:this.attributes.base_url,mode:this.attributes.mode,captcha:this.attributes.captcha,staticJS:this.attributes.staticJS,static_chat:this.attributes.userSession.getSessionAttributes(),domain_lhc:this.attributes.domain_lhc,leave_message:this.attributes.leaveMessage,scope_prefix:this.attributes.prefixLowercase};if(1==this.attributes.fresh&&(t.static_chat.id&&delete t.static_chat.id,t.static_chat.hash&&delete t.static_chat.hash),""!=this.attributes.bot_id&&(t.bot_id=this.attributes.bot_id),""!=this.attributes.trigger_id&&(t.trigger_id=this.attributes.trigger_id),""!=this.attributes.subject_id&&(t.subject_id=this.attributes.subject_id),""!=this.attributes.priority&&(t.priority=this.attributes.priority),null!==this.attributes.phash&&(t.phash=this.attributes.phash),null!==this.attributes.survey&&(t.survey=this.attributes.survey),null!==this.attributes.pvhash&&(t.pvhash=this.attributes.pvhash),null!==this.attributes.operator&&(t.operator=this.attributes.operator),null!==this.attributes.profile_pic&&(t.profile_pic=this.attributes.profile_pic),""!=this.attributes.lang&&(t.lang=this.attributes.lang),this.attributes.proactive.invitation&&(t.proactive=this.attributes.proactive),null!==this.attributes.dep_default&&(t.dep_default=this.attributes.dep_default),this.attributes.LHCChatOptions&&this.attributes.LHCChatOptions.attr){var e=this.attributes.LHCChatOptions.attr,i=[];e.forEach((function(t,e){i.push({show:void 0===t.show||"on"!=t.show&&"off"!=t.show?"b":t.show,value:t.value,index:e,name:t.name,class:"form-control form-control-sm",type:t.type,identifier:"additional_"+e,placeholder:"",width:t.size||6,encrypted:t.encrypted||!1,required:t.req||!1,label:t.name})})),t.CUSTOM_FIELDS=i}if(this.attributes.LHCChatOptions&&this.attributes.LHCChatOptions.attr_prefill){e=this.attributes.LHCChatOptions.attr_prefill;var n=[];e.forEach((function(t){"email"==t.name?n.push({Email:t.value}):"username"==t.name?n.push({Username:t.value}):"phone"==t.name?n.push({Phone:t.value}):"question"==t.name&&n.push({Question:t.value})})),n=n.concat(this.attributes.userSession.getPrefillVars()),t.attr_prefill=n}else t.attr_prefill=this.attributes.userSession.getPrefillVars();if(this.attributes.LHCChatOptions&&this.attributes.LHCChatOptions.attr_prefill_admin){e=this.attributes.LHCChatOptions.attr_prefill_admin;var s=[];e.forEach((function(t){s.push({value:t.value,index:t.index})})),t.attr_prefill_admin=s}return null!==this.attributes.userSession.getSessionReferrer()&&(t.ses_ref=this.attributes.userSession.getSessionReferrer()),t}},{key:"sendChildCommand",value:function(t){this.attributes.mainWidget.cont.elmDom&&this.attributes.mainWidget.cont.elmDom.contentWindow&&this.attributes.mainWidget.cont.elmDom.contentWindow.postMessage(t,this.attributes.isIE?"*":"/"),this.attributes.popupWidget.cont.elementReferrerPopup&&!1===this.attributes.popupWidget.cont.elementReferrerPopup.closed&&this.attributes.popupWidget.cont.elementReferrerPopup.postMessage(t,"*")}},{key:"sendReadyEvent",value:function(t){var e=this.getInitAttributes();!0!==t&&this.attributes.mainWidget.cont.elmDom&&this.attributes.mainWidget.cont.elmDom.contentWindow&&this.attributes.mainWidget.cont.elmDom.contentWindow.postMessage("lhc_init:"+JSON.stringify(e),this.attributes.isIE?"*":"/")}},{key:"sendChildEvent",value:function(t,e,i){void 0===i&&(i="lhc_event"),this.sendChildCommand(i+":"+t+"::"+JSON.stringify(e))}}]),chatEventsHandler}()},593:function(t,e,i){"use strict";i.d(e,{U:function(){return r}});var n=i(5671),s=i(3144),r=new(function(){function t(){(0,n.Z)(this,t),this.events={}}return(0,s.Z)(t,[{key:"attachEvent",value:function(t,e,i){var n=this,s=function(e){i.call(t,n.getEvent(e))};return t.attachEvent("on"+e,s),s}},{key:"unlisten",value:function(t){var e;this.events[t]&&(e=this.events[t],this.events[t]=null,this.removeEventHandler(e.element,e.eventName,e.eventListener))}},{key:"listen",value:function(t,e,i,n){var s;if(n){if(this.events[n]&&(s=this.events[n],this.events[n]=null,this.removeEventHandler(s.element,s.eventName,s.eventListener)),t.addEventListener)t.addEventListener(e,i,!1);else{if(!document.attachEvent)return null;i=this.attachEvent(t,e,i)}return this.events[n]={element:t,eventName:e,eventListener:i},i}}},{key:"removeEventHandler",value:function(t,e,i){document.removeEventListener?t.removeEventListener(e,i,!1):t.detachEvent("on"+e,i)}},{key:"getEvent",value:function(t){var e=t||_this.event;if(!e)for(t=this.getEvent.caller;t&&(!(e=t.arguments[0])||Event!=e.constructor);)t=t.caller;return e}}]),t}())},6419:function(t,e,i){"use strict";i.d(e,{h:function(){return r}});var n=i(5671),s=i(3144),r=function(){function t(e,i){(0,n.Z)(this,t),this.valueInternal=e,this.listeners=[],this.params=i||{}}return(0,s.Z)(t,[{key:"value",get:function(){return this.valueInternal},set:function(t){this.next(t)}},{key:"next",value:function(t){this.valueInternal=t,this.callListeners()}},{key:"nextPropertySilent",value:function(t,e){this.valueInternal[t]=e}},{key:"nextProperty",value:function(t,e){this.valueInternal[t]=e,this.callListeners()}},{key:"callListeners",value:function(){var t=this;this.listeners.forEach((function(e){e&&"function"==typeof e&&e(t.valueInternal)}))}},{key:"unsubscribe",value:function(t){-1!==this.listeners.indexOf(t)&&this.listeners.splice(this.listeners.indexOf(t),1)}},{key:"subscribe",value:function(t){this.listeners.push(t),this.params.ignore_sub||t(this.valueInternal)}}]),t}()},5545:function(t,e,i){"use strict";i.d(e,{Q:function(){return r}});var n=i(5671),s=i(3144),r=function(){function t(e,i,s,r){(0,n.Z)(this,t),this.window=e,this.cookieEnabled=!1,this.cookiesSupportChecked=!1,1==r&&this.checkCookiesSupport(),this.domain=i,this.secureCookie=!1,this.cookiePerPage=!1,this.prefix=s||"lhc"}return(0,s.Z)(t,[{key:"checkCookiesSupport",value:function(){if(!0===this.cookiesSupportChecked)return this.cookieEnabled;this.cookiesSupportChecked=!0;try{this.hasSessionStorage=!!this.window.sessionStorage}catch(t){this.hasSessionStorage=!1}try{this.hasLocalStorage=!!this.window.localStorage}catch(t){this.hasLocalStorage=!1}try{document.cookie="cookietest=1",this.cookieEnabled=-1!==document.cookie.indexOf("cookietest="),document.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT"}catch(t){}return this.cookieEnabled}},{key:"setCookieDomain",value:function(t){this.domain=t}},{key:"setCookiePerPage",value:function(t){this.cookiePerPage=t}},{key:"getCookieDomain",value:function(){return this.domain?"."+this.domain:null}},{key:"setSecureCookie",value:function(t){this.secureCookie=t}},{key:"setHTTPCookie",value:function(t,e,i,n){if(!1!==this.cookieEnabled){var s="";i||((i=new Date).setTime(i.getTime()+15552e6),s="; expires="+i.toGMTString()),document.cookie=t+"="+e+s+(!1===this.cookiePerPage?"; path=/":!0===this.cookiePerPage?"":"; path="+this.cookiePerPage)+(this.secureCookie?";secure":"")+(n?";domain="+n:"")+";SameSite=Lax"}}},{key:"getHTTPCookie",value:function(t){if(!1===this.cookieEnabled)return[];var e,i,n=[],s=t+"=",r=document.cookie.split(";");for(t=0,e=r.length;t0){var e=this.getVars();for(var i in this.jsVars)if(this.jsVars[i].type&&e[this.jsVars[i].id]){var n={};n[this.jsVars[i].type]=e[this.jsVars[i].id],t.push(n)}}return t}},{key:"getVars",value:function getVars(){if(this.jsVars.length>0){var js_args={},currentVar=null;for(var index in this.jsVars)try{currentVar=-1!==this.jsVars[index].var.indexOf("lhc_var.")?this.attributes.lhc_var[this.jsVars[index].var.replace("lhc_var.","")]||null:eval(this.jsVars[index].var),null!=currentVar&&""!==currentVar&&(js_args[this.jsVars[index].id]=currentVar)}catch(t){}return js_args}return null}},{key:"getAppendVariables",value:function(){var t="";return null!==this.vid&&(t=t+"/(vid)/"+this.vid),null!==this.hash&&null!==this.id&&(t=t+"/(hash)/"+this.id+"_"+this.hash),t}},{key:"updateJSVars",value:function(t,e){var i=this.getVars(t),n=new XMLHttpRequest;n.open("POST",this.attributes.LHC_API.args.lhc_base_url+"/chat/updatejsvars"+this.getAppendVariables(),!0),n.setRequestHeader("Content-type","application/x-www-form-urlencoded"),n.send("data="+encodeURIComponent(this.JSON.stringify(i))),void 0!==e&&null===this.hash&&null===this.id&&e(i,this.getPrefillVars())}},{key:"setChatInformation",value:function(t,e){this.id=t.id,this.hash=t.hash,null===this.id||e||(this.hnh=Math.round(Date.now()/1e3))}}]),userSession}()},891:function(t,e,i){"use strict";i.r(e),i.d(e,{default:function(){return b}});var n=/iPhone/i,s=/iPod/i,r=/iPad/i,o=/\biOS-universal(?:.+)Mac\b/i,a=/\bAndroid(?:.+)Mobile\b/i,u=/Android/i,c=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,h=/Silk/i,l=/Windows Phone/i,d=/\bWindows(?:.+)ARM\b/i,p=/BlackBerry/i,m=/BB10/i,_=/Opera Mini/i,f=/\b(CriOS|Chrome)(?:.+)Mobile/i,g=/Mobile(?:.+)Firefox\b/i,v=function(t){return void 0!==t&&"MacIntel"===t.platform&&"number"==typeof t.maxTouchPoints&&t.maxTouchPoints>1&&"undefined"==typeof MSStream};function b(t){var e={userAgent:"",platform:"",maxTouchPoints:0};t||"undefined"==typeof navigator?"string"==typeof t?e.userAgent=t:t&&t.userAgent&&(e={userAgent:t.userAgent,platform:t.platform,maxTouchPoints:t.maxTouchPoints||0}):e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0};var i=e.userAgent,b=i.split("[FBAN");void 0!==b[1]&&(i=b[0]),void 0!==(b=i.split("Twitter"))[1]&&(i=b[0]);var w=function(t){return function(e){return e.test(t)}}(i),y={apple:{phone:w(n)&&!w(l),ipod:w(s),tablet:!w(n)&&(w(r)||v(e))&&!w(l),universal:w(o),device:(w(n)||w(s)||w(r)||w(o)||v(e))&&!w(l)},amazon:{phone:w(c),tablet:!w(c)&&w(h),device:w(c)||w(h)},android:{phone:!w(l)&&w(c)||!w(l)&&w(a),tablet:!w(l)&&!w(c)&&!w(a)&&(w(h)||w(u)),device:!w(l)&&(w(c)||w(h)||w(a)||w(u))||w(/\bokhttp\b/i)},windows:{phone:w(l),tablet:w(d),device:w(l)||w(d)},other:{blackberry:w(p),blackberry10:w(m),opera:w(_),firefox:w(g),chrome:w(f),device:w(p)||w(m)||w(_)||w(g)||w(f)},any:!1,phone:!1,tablet:!1};return y.any=y.apple.device||y.android.device||y.windows.device||y.other.device,y.phone=y.apple.phone||y.android.phone||y.windows.phone,y.tablet=y.apple.tablet||y.android.tablet||y.windows.tablet,y}},8259:function(t,e,i){"use strict";t.exports=i(2159)},3434:function(t,e,i){"use strict";var n=i(723);function s(){}var r=null,o={};function a(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("Promise constructor's argument is not a function");this._U=0,this._V=0,this._W=null,this._X=null,t!==s&&p(t,this)}function u(t,e){for(;3===t._V;)t=t._W;if(a._Y&&a._Y(t),0===t._V)return 0===t._U?(t._U=1,void(t._X=e)):1===t._U?(t._U=2,void(t._X=[t._X,e])):void t._X.push(e);!function(t,e){n((function(){var i=1===t._V?e.onFulfilled:e.onRejected;if(null!==i){var n=function(t,e){try{return t(e)}catch(t){return r=t,o}}(i,t._W);n===o?h(e.promise,r):c(e.promise,n)}else 1===t._V?c(e.promise,t._W):h(e.promise,t._W)}))}(t,e)}function c(t,e){if(e===t)return h(t,new TypeError("A promise cannot be resolved with itself."));if(e&&("object"==typeof e||"function"==typeof e)){var i=function(t){try{return t.then}catch(t){return r=t,o}}(e);if(i===o)return h(t,r);if(i===t.then&&e instanceof a)return t._V=3,t._W=e,void l(t);if("function"==typeof i)return void p(i.bind(e),t)}t._V=1,t._W=e,l(t)}function h(t,e){t._V=2,t._W=e,a._Z&&a._Z(t,e),l(t)}function l(t){if(1===t._U&&(u(t,t._X),t._X=null),2===t._U){for(var e=0;e "+e+") {","args = new Array(arguments.length + 1);","for (var i = 0; i < arguments.length; i++) {","args[i] = arguments[i];","}","}","return new Promise(function (rs, rj) {","var cb = "+r+";","var res;","switch (argLength) {",i.concat(["extra"]).map((function(t,e){return"case "+e+":res = fn.call("+["self"].concat(i.slice(0,e)).concat("cb").join(",")+");break;"})).join(""),"default:","args[argLength] = cb;","res = fn.apply(self, args);","}","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],o)(n,t)}(t)};var r="function (err, res) {if (err) { rj(err); } else { rs(res); }}";n.nodeify=function(t){return function(){var e=Array.prototype.slice.call(arguments),i="function"==typeof e[e.length-1]?e.pop():null,r=this;try{return t.apply(this,arguments).nodeify(i,r)}catch(t){if(null==i)return new n((function(e,i){i(t)}));s((function(){i.call(r,t)}))}}},n.prototype.nodeify=function(t,e){if("function"!=typeof t)return this;this.then((function(i){s((function(){t.call(e,null,i)}))}),(function(i){s((function(){t.call(e,i)}))}))}},3690:function(t,e,i){"use strict";var n=i(3434);t.exports=n,n.enableSynchronous=function(){n.prototype.isPending=function(){return 0==this.getState()},n.prototype.isFulfilled=function(){return 1==this.getState()},n.prototype.isRejected=function(){return 2==this.getState()},n.prototype.getValue=function(){if(3===this._V)return this._W.getValue();if(!this.isFulfilled())throw new Error("Cannot get a value of an unfulfilled promise.");return this._W},n.prototype.getReason=function(){if(3===this._V)return this._W.getReason();if(!this.isRejected())throw new Error("Cannot get a rejection reason of a non-rejected promise.");return this._W},n.prototype.getState=function(){return 3===this._V?this._W.getState():-1===this._V||-2===this._V?0:this._V}},n.disableSynchronous=function(){n.prototype.isPending=void 0,n.prototype.isFulfilled=void 0,n.prototype.isRejected=void 0,n.prototype.getValue=void 0,n.prototype.getReason=void 0,n.prototype.getState=void 0}},4795:function(t,e,i){var n;!function(e){"use strict";function s(){}var r=s.prototype,o=e.EventEmitter;function a(t,e){for(var i=t.length;i--;)if(t[i].listener===e)return i;return-1}function u(t){return function(){return this[t].apply(this,arguments)}}function c(t){return"function"==typeof t||t instanceof RegExp||!(!t||"object"!=typeof t)&&c(t.listener)}r.getListeners=function(t){var e,i,n=this._getEvents();if(t instanceof RegExp)for(i in e={},n)n.hasOwnProperty(i)&&t.test(i)&&(e[i]=n[i]);else e=n[t]||(n[t]=[]);return e},r.flattenListeners=function(t){var e,i=[];for(e=0;e0&&x.userSession.setupVarsMonitoring(t.js_vars,(function(t,e){L.sendChildEvent("jsVars",[t,e])}))),"widget"!=x.mode&&"popup"!=x.mode||x.viewHandler.init(x,t.ll),"api"==x.position&&"embed"==x.mode||x.mainWidget.init(x,t.ll),"widget"!=x.mode&&"popup"!=x.mode||D.cont.show(),x.loadcb&&x.loadcb(x),t.init_calls&&(x.init_calls=t.init_calls),x.proactive_interval=t.chat_ui.proactive_interval,t.disable_proactive||"widget"!=x.mode&&"popup"!=x.mode&&"embed"!=x.mode||void 0!==o.args.proactive&&!0!==o.args.proactive||null!==x.storageHandler.getSessionStorage(w+"_invt")||H(),x.init_calls.length>0&&x.init_calls.forEach((function(t){"nodeJSChat"==t.extension&&Promise.all([__webpack_require__.e(8),__webpack_require__.e(417)]).then(__webpack_require__.bind(__webpack_require__,9417)).then((function(e){e.nodeJSChat.setParams(t.params,x,L)}))})));else{if(t.terminate)return;x.userSession.setVID(t.vid),x.terminated=!0,m.removeById(x.prefixLowercase+"_container_v2"),m.removeById(x.prefixLowercase+"_status_widget_v2");var e=document.createElement("script");e.type=n.type,e.id=x.prefixLowercase+"-js-reload",e.async=!0,n.getAttribute("scope")&&e.setAttribute("scope",n.getAttribute("scope")),e.src=n.getAttribute("src")+"&r="+(new Date).getHours()+(new Date).getMinutes();var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(e,s)}})),x.eventEmitter.addListener("closeWidget",(function(t){x.widgetStatus.next(!1),L.sendChildEvent("closedWidget",[t])})),x.eventEmitter.addListener("sendChildEvent",(function(t){void 0!==t.boot?x.mainWidget.bootstrap():1==x.mainWidget.isLoaded&&1==i.loaded?L.sendChildEvent(t.cmd,[t.arg]):x.childCommands.push(t)})),x.eventEmitter.addListener("sendChildExtEvent",(function(t){void 0!==t.boot?x.mainWidget.bootstrap():1==x.mainWidget.isLoaded&&1==i.loaded?L.sendChildEvent(t.cmd,[t.arg],"lhc_load_ext"):x.childExtCommands.push(t)})),x.eventEmitter.addListener("toggleSound",(function(){var t=!x.toggleSound.value;x.toggleSound.next(t)})),x.eventEmitter.addListener("enableCookies",(function(){if(!0===f.checkCookiesSupport()){var t=x.userSession.getSessionAttributes();void 0!==t.hnh&&delete t.hnh,x.storageHandler.storeSessionInformation(t),void 0!==o.args.orig&&(x.mode=o.args.mode=o.args.orig.mode,o.args.proactive=o.args.orig.proactive,o.args.check_messages=o.args.orig.check_messages,m.makeRequest(o.args.lhc_base_url+x.lang+"widgetrestapi/settings",{params:P()},(function(t){x.eventEmitter.emitEvent("sendChildEvent",[{cmd:"attr_set",arg:{type:"attr_set",attr:["mode"],data:x.mode}}]),"widget"==x.mode&&null!==x.nh&&I(x.nh),"widget"!=x.mode&&"popup"!=x.mode||void 0!==o.args.proactive&&!0!==o.args.proactive||null!==x.storageHandler.getSessionStorage(w+"_invt")||H()})))}})),x.eventEmitter.addListener("endChatCookies",(function(t){(!1===x.kcw||t&&1==t.force)&&(x.userSession.setChatInformation({id:null,hash:null}),x.storageHandler.storeSessionInformation(x.userSession.getSessionAttributes()),x.proactive={})})),x.eventEmitter.addListener("endChat",(function(t){x.userSession.setChatInformation({id:null,hash:null}),x.storageHandler.storeSessionInformation(x.userSession.getSessionAttributes()),x.proactive={},"popup"==x.mode||t&&t.show_start||x.widgetStatus.next(!1),x.viewHandler&&(x.viewHandler.removeUnreadIndicator(),x.eventEmitter.emitEvent("hide_msg_snippet")),x.widgetDimesions.nextProperty("height_override",null),L.sendChildEvent("endedChat",[{sender:"endButton",survey:x.survey}]),("embed"==x.mode||t&&t.show_start)&&x.eventEmitter.emitEvent("showWidget",[{sender:"closeButton"}]),"popup"==x.mode&&x.popupWidget.freeup()})),x.eventEmitter.addListener("showWidget",(function(t){x.mainWidget.hideInvitation(),x.widgetStatus.next(!0),"popup"==x.mode?(x.popupWidget.init(x,L,t),x.viewHandler.removeUnreadIndicator(),x.mainWidget.hide()):void 0!==t&&void 0!==t.event&&t.event.preventDefault(),L.sendChildEvent("shownWidget",[{sender:"closeButton"}])})),x.eventEmitter.addListener("addTag",(function(t){x.tag=""!=x.tag?x.tag+","+t:t,x.eventEmitter.emitEvent("tagAdded")})),x.eventEmitter.addListener("addEvent",(function(t){x.events=t,x.eventEmitter.emitEvent("eventAdded")})),x.eventEmitter.addListener("addConversion",(function(t){x.conversion=t,x.eventEmitter.emitEvent("conversionAdded")})),x.eventEmitter.addListener("openPopup",(function(){x.popupWidget.init(x,L),x.viewHandler.removeUnreadIndicator(),L.sendChildEvent("shownWidget",[{sender:"closeButton"}]),x.widgetStatus.next(!1)})),x.eventEmitter.addListener("chatStarted",(function(t,e){x.widgetDimesions.nextProperty("height_override",null),"popup"===e&&!0!==x.kcw||x.userSession.setChatInformation(t,x.nh&&x.nh.ap),"popup"==e&&x.mainWidget.hide(),!1!==x.fresh||"popup"===e&&!0!==x.kcw||x.storageHandler.storeSessionInformation(x.userSession.getSessionAttributes())})),x.eventEmitter.addListener("subscribeEvent",(function(t){x.chatNotifications.setPublicKey(t.pk,x.eventEmitter),x.chatNotifications.sendNotification()})),x.eventEmitter.addListener("subcribedEvent",(function(t){L.sendChildEvent("subcribedEvent",[t])})),x.widgetStatus.subscribe((function(t){"popup"!==x.mode&&("embed"!==x.mode&&x.storageHandler.setSessionStorage(w+"_ws",t),L.sendChildEvent("widgetStatus",[t]))})),x.toggleSound.subscribe((function(t){x.storageHandler.setSessionStorage(w+"_sound",t)})),x.onlineStatus.subscribe((function(t){L.sendChildEvent("onlineStatus",[t])})),x.eventEmitter.addListener("screenshot",(function(t){m.makeScreenshot(x.staticJS.screenshot,t)})),x.eventEmitter.addListener("screenshare",(function(t){__webpack_require__.e(398).then(__webpack_require__.bind(__webpack_require__,7398)).then((function(e){e.screenShare.setParams(t||{},x,L)}))})),x.eventEmitter.addListener("location",(function(t){document.location=t})),x.eventEmitter.addListener("terminated",(function(t){x.terminated=!0,m.removeById(x.prefixLowercase+"_container_v2"),m.removeById(x.prefixLowercase+"_status_widget_v2")})),x.eventEmitter.addListener("showInvitation",(function(t){x.widgetDimesions.nextProperty("bottom_override",75),x.widgetDimesions.nextProperty("right_override",75),x.mainWidget.showInvitation()})),x.eventEmitter.addListener("hideAction",(function(t){x.mainWidget.hide()})),x.eventEmitter.addListener("showAction",(function(t){x.mainWidget.show()})),x.eventEmitter.addListener("zoomImage",(function(t){__webpack_require__.e(335).then(__webpack_require__.bind(__webpack_require__,2335)).then((function(e){e.zoomImage.setParams(t||{},x,L)}))})),x.eventEmitter.addListener("hideInvitation",(function(t){x.mainWidget.hideInvitation(),t.full?(x.eventEmitter.emitEvent("showWidget",[{sender:"closeButton"}]),x.eventEmitter.emitEvent("fullInvitation",[t])):x.eventEmitter.emitEvent("cancelInvitation",[])})),x.eventEmitter.addListener("msgSnippet",(function(t){if("widget"==x.mode&&!1===x.widgetStatus.value){if(t.full_widget)return void x.eventEmitter.emitEvent("showWidget",[{sender:"closeButton"}]);"api"==x.position&&x.viewHandler&&x.viewHandler.show(),__webpack_require__.e(213).then(__webpack_require__.bind(__webpack_require__,7213)).then((function(e){x.msgSnippet?x.msgSnippet.showSnippet(t,!0):(x.msgSnippet=new e.msgSnippetWidget(x.prefixLowercase),D.cont.elmDom.appendChild(x.msgSnippet.cont.constructUI(),!0),x.msgSnippet.init(x,t)),x.eventEmitter.emitEvent("unread_message",[{otm:1}])}))}})),x.eventEmitter.addListener("unread_message",(function(t){t&&t.msg_body&&!x.msgSnippet&&__webpack_require__.e(213).then(__webpack_require__.bind(__webpack_require__,7213)).then((function(e){x.msgSnippet||(x.msgSnippet=new e.msgSnippetWidget(x.prefixLowercase),D.cont.elmDom.appendChild(x.msgSnippet.cont.constructUI(),!0),x.msgSnippet.init(x,t))}))})),x.originalTitle=document.title,x.blinkInterval=null,x.eventEmitter.addListener("change_language",(function(t){x.lang=t.lng.replace("/","")+"/"})),x.eventEmitter.addListener("unread_message_title",(function(t){clearInterval(x.blinkInterval),0==t.status?x.blinkInterval=setInterval((function(){document.title=Math.round((new Date).getTime()/1e3)%2?"💬 "+x.originalTitle:x.originalTitle}),1e3):(x.focused=!0,document.title=x.originalTitle)})),x.eventEmitter.addListener("widgetHeight",(function(t){if(t.reset_height)return x.widgetDimesions.nextProperty("height_override",null),x.widgetDimesions.nextProperty("bottom_override",null),x.widgetDimesions.nextProperty("right_override",null),void x.widgetDimesions.nextProperty("width_override",null);if(t.force_height||t.force_width||t.force_bottom||t.force_right)return t.force_height&&x.widgetDimesions.nextProperty("height_override",t.force_height),t.force_width&&x.widgetDimesions.nextProperty("width_override",t.force_width),t.force_right&&x.widgetDimesions.nextProperty("right_override",t.force_right),void(t.force_bottom&&x.widgetDimesions.nextProperty("bottom_override",t.force_bottom));if("widget"==x.mode&&0==x.isMobile){var i=document,n=i.documentElement,s=i.getElementsByTagName("body")[0],r=e.innerHeight||n.clientHeight||s.clientHeight;parseInt(t.height)>x.widgetDimesions.value.height&&r>parseInt(t.height)?x.widgetDimesions.nextProperty("height_override",parseInt(t.height)):x.widgetDimesions.value.height_override&&x.widgetDimesions.value.height_override>r&&x.widgetDimesions.nextProperty("height_override",null)}}));var j=!1;try{j="serviceWorker"in navigator}catch(t){}if(!0===j)try{navigator.serviceWorker.addEventListener("message",(function(t){try{void 0!==t.data.lhc_ch&&void 0!==t.data.lhc_cid&&(x.widgetStatus.next(!0),"popup"==x.mode?(x.userSession.setChatInformation({id:t.data.lhc_cid,hash:t.data.lhc_ch}),x.eventEmitter.emitEvent("unread_message")):(L.sendChildEvent("shownWidget",[{sender:"closeButton"}]),L.sendChildEvent("reopenNotification",[{id:t.data.lhc_cid,hash:t.data.lhc_ch}])))}catch(t){if(!r)throw Error("lhc : "+t.message);r.log(t.message,"index.js",t.lineNumber||t.line,t.stack)}}))}catch(t){}var T=function(t){if(!0!==x.terminated&&"string"==typeof t.data&&!t.data.indexOf(x.prefixLowercase+"::")){var e=t.data.split("::");if(void 0!==t.origin&&"about:"!=t.origin){var n=t.origin.replace("http://","").replace("https://","").replace(/:(\d+)$/,"");if(n!==document.domain&&x.domain_lhc!==n&&"started"!==e[1]&&"isstarted"!==e[1])return}if("ready"==e[1]){L.sendReadyEvent("true"==e[2]),x.storageHandler.getSessionStorage(w+"_screenshare")&&x.eventEmitter.emitEvent("screenshare",[{auto_start:!0}]);var s=function(t){var e="focus"===t.type;x.focused=e,L.sendChildEvent("focus_changed",[{status:e}])};window.addEventListener("focus",s),window.addEventListener("blur",s),window.addEventListener("pageshow",s),window.addEventListener("pagehide",s),i.loaded=!0,L.sendChildEvent("ext_modules",[x.staticJS.ex_cb_js]),x.childExtCommands.forEach((function(t){L.sendChildEvent(t.cmd,[t.arg],"lhc_load_ext")})),x.childCommands.forEach((function(t){L.sendChildEvent(t.cmd,[t.arg])})),null!==x.react_attr&&x.react_attr.forEach((function(t){L.sendChildEvent("attr_set",[{type:"attr_set",attr:t.k,data:t.v}])}))}else"ready_popup"==e[1]?x.popupWidget.sendParameters(L):"isstarted"==e[1]?x.eventEmitter.emitEvent("terminated",[]):"started"==e[1]?x.hide_parent?x.eventEmitter.emitEvent("terminated",[]):t.source.postMessage("lhc::isstarted","*"):x.eventEmitter.emitEvent(e[1],JSON.parse(e[2]))}};window.addEventListener?window.addEventListener("message",T,!1):window.attachEvent?window.attachEvent("onmessage",T):document.attachEvent&&document.attachEvent("onmessage",T)},c=function(){!0!==i.ready&&(document.body&&(i.ready=!0),i.init=u,o.args.before_init&&o.args.before_init(i),o.args.manual_init||u())},h=__webpack_require__(593).U;c(),!i.ready||(h.listen(document,"DOMContentLoaded",(function(){c()}),"domloaded"),h.listen(document,"readystatechange",(function(){("complete"===document.readyState||"interactive"===document.readyState&&document.body)&&c()}),"domstatechange"),h.listen(e,"load",(function(){c()}),"windowload"))}.call(this,e["$_"+s],e[s+"_API"])}catch(t){if(!r)throw Error("lhc : "+t.message);r.log(t.message,"index.js",t.lineNumber||t.line,t.stack)}}}(window)}(),this.LiveHelperChat=__webpack_exports__.LiveHelperChatDefault})(); //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lhc_web/design/defaulttheme/js/widgetv2/index.js.map b/lhc_web/design/defaulttheme/js/widgetv2/index.js.map index e28b4b3ab3..fa1316b664 100644 --- a/lhc_web/design/defaulttheme/js/widgetv2/index.js.map +++ b/lhc_web/design/defaulttheme/js/widgetv2/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","mappings":";uEAGA,IAAIA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OAAO9d,YAAY,iBAAiB,KAG1C2V,EAAiB/nB,aAAa4C,UAAUyT,EAAM,GAAIjU,KAAK2F,MAAMsO,EAAM,OAIvEhW,OAAOuK,iBACPvK,OAAOuK,iBAAiB,UAAWklB,GAAgB,GAC5CzvB,OAAO0S,YACd1S,OAAO0S,YAAY,YAAa+c,GACzB/1B,SAASgZ,aAChBhZ,SAASgZ,YAAY,YAAa+c,IAItCK,EAAU,YAGQ,IAAd9J,EAAIG,QAKJzsB,SAASuC,OACT+pB,EAAIG,OAAQ,GAGhBH,EAAIpV,KAAOA,EAEPjG,EAAQC,KAAKmlB,aACbplB,EAAQC,KAAKmlB,YAAY/J,GAG7Brb,EAAQC,KAAKolB,aAAepf,MAG1Bqf,EAAgB5J,oBAAAA,KAAAA,EAErByJ,KAAY9J,EAAIG,QAAW8J,EAAcC,OAAOx2B,SAAU,oBAAoB,WAC3Eo2B,MACD,aACCG,EAAcC,OAAOx2B,SAAU,oBAAoB,YAC9C,aAAeA,SAAS8N,YAAc,gBAAkB9N,SAAS8N,YAAc9N,SAASuC,OAAS6zB,MACnG,kBACHG,EAAcC,OAAOtc,EAAQ,QAAQ,WACjCkc,MACD,gBAERh4B,KAAKJ,KAAMkc,EAAO,KAAO0R,GAAc1R,EAAO0R,EAAc,SAEjE,MAAO1oB,GACL,IAAI2oB,EAAqF,MAAMrG,MAAM,SAAWtiB,EAAEgL,SAApG2d,EAASzoB,IAAIF,EAAEgL,QAAS,WAAYhL,EAAE6oB,YAAc7oB,EAAEipB,KAAMjpB,EAAE8oB,SA3hCpF,CA8hCG1lB","sources":["webpack://LiveHelperChat/./node_modules/asap/browser-asap.js","webpack://LiveHelperChat/./node_modules/asap/browser-raw.js","webpack://LiveHelperChat/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://LiveHelperChat/./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js","webpack://LiveHelperChat/./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack://LiveHelperChat/./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","webpack://LiveHelperChat/./src/lib/UIConstructorIframe.js","webpack://LiveHelperChat/./node_modules/@babel/runtime/helpers/esm/inherits.js","webpack://LiveHelperChat/./src/lib/UIConsturctor.js","webpack://LiveHelperChat/./src/lib/chatNotifications.js","webpack://LiveHelperChat/./src/lib/helperFunctions.js","webpack://LiveHelperChat/./src/lib/settings.js","webpack://LiveHelperChat/./src/lib/widgets/containerChat.js","webpack://LiveHelperChat/./src/lib/widgets/mainWidget.js","webpack://LiveHelperChat/./src/lib/widgets/mainWidgetPopup.js","webpack://LiveHelperChat/./src/lib/widgets/statusWidget.js","webpack://LiveHelperChat/./src/util/chatEventsHandler.js","webpack://LiveHelperChat/./src/util/domEventsHandler.js","webpack://LiveHelperChat/./src/util/monitoredVariable.js","webpack://LiveHelperChat/./src/util/storageHandler.js","webpack://LiveHelperChat/./src/util/userSession.js","webpack://LiveHelperChat/./node_modules/ismobilejs/esm/isMobile.js","webpack://LiveHelperChat/./node_modules/promise/index.js","webpack://LiveHelperChat/./node_modules/promise/lib/core.js","webpack://LiveHelperChat/./node_modules/promise/lib/done.js","webpack://LiveHelperChat/./node_modules/promise/lib/es6-extensions.js","webpack://LiveHelperChat/./node_modules/promise/lib/finally.js","webpack://LiveHelperChat/./node_modules/promise/lib/index.js","webpack://LiveHelperChat/./node_modules/promise/lib/node-extensions.js","webpack://LiveHelperChat/./node_modules/promise/lib/synchronous.js","webpack://LiveHelperChat/./node_modules/wolfy87-eventemitter/EventEmitter.js","webpack://LiveHelperChat/./node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack://LiveHelperChat/./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://LiveHelperChat/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://LiveHelperChat/webpack/bootstrap","webpack://LiveHelperChat/webpack/runtime/load script","webpack://LiveHelperChat/webpack/runtime/compat get default export","webpack://LiveHelperChat/webpack/runtime/define property getters","webpack://LiveHelperChat/webpack/runtime/ensure chunk","webpack://LiveHelperChat/webpack/runtime/get javascript chunk filename","webpack://LiveHelperChat/webpack/runtime/global","webpack://LiveHelperChat/webpack/runtime/hasOwnProperty shorthand","webpack://LiveHelperChat/webpack/runtime/make namespace object","webpack://LiveHelperChat/webpack/runtime/publicPath","webpack://LiveHelperChat/webpack/runtime/jsonp chunk loading","webpack://LiveHelperChat/./src/index.js"],"sourcesContent":["\"use strict\";\n\n// rawAsap provides everything we need except exception management.\nvar rawAsap = require(\"./raw\");\n// RawTasks are recycled to reduce GC churn.\nvar freeTasks = [];\n// We queue errors to ensure they are thrown in right order (FIFO).\n// Array-as-queue is good enough here, since we are just dealing with exceptions.\nvar pendingErrors = [];\nvar requestErrorThrow = rawAsap.makeRequestCallFromTimer(throwFirstError);\n\nfunction throwFirstError() {\n if (pendingErrors.length) {\n throw pendingErrors.shift();\n }\n}\n\n/**\n * Calls a task as soon as possible after returning, in its own event, with priority\n * over other events like animation, reflow, and repaint. An error thrown from an\n * event will not interrupt, nor even substantially slow down the processing of\n * other events, but will be rather postponed to a lower priority event.\n * @param {{call}} task A callable object, typically a function that takes no\n * arguments.\n */\nmodule.exports = asap;\nfunction asap(task) {\n var rawTask;\n if (freeTasks.length) {\n rawTask = freeTasks.pop();\n } else {\n rawTask = new RawTask();\n }\n rawTask.task = task;\n rawAsap(rawTask);\n}\n\n// We wrap tasks with recyclable task objects. A task object implements\n// `call`, just like a function.\nfunction RawTask() {\n this.task = null;\n}\n\n// The sole purpose of wrapping the task is to catch the exception and recycle\n// the task object after its single use.\nRawTask.prototype.call = function () {\n try {\n this.task.call();\n } catch (error) {\n if (asap.onerror) {\n // This hook exists purely for testing purposes.\n // Its name will be periodically randomized to break any code that\n // depends on its existence.\n asap.onerror(error);\n } else {\n // In a web browser, exceptions are not fatal. However, to avoid\n // slowing down the queue of pending tasks, we rethrow the error in a\n // lower priority turn.\n pendingErrors.push(error);\n requestErrorThrow();\n }\n } finally {\n this.task = null;\n freeTasks[freeTasks.length] = this;\n }\n};\n","\"use strict\";\n\n// Use the fastest means possible to execute a task in its own turn, with\n// priority over other events including IO, animation, reflow, and redraw\n// events in browsers.\n//\n// An exception thrown by a task will permanently interrupt the processing of\n// subsequent tasks. The higher level `asap` function ensures that if an\n// exception is thrown by a task, that the task queue will continue flushing as\n// soon as possible, but if you use `rawAsap` directly, you are responsible to\n// either ensure that no exceptions are thrown from your task, or to manually\n// call `rawAsap.requestFlush` if an exception is thrown.\nmodule.exports = rawAsap;\nfunction rawAsap(task) {\n if (!queue.length) {\n requestFlush();\n flushing = true;\n }\n // Equivalent to push, but avoids a function call.\n queue[queue.length] = task;\n}\n\nvar queue = [];\n// Once a flush has been requested, no further calls to `requestFlush` are\n// necessary until the next `flush` completes.\nvar flushing = false;\n// `requestFlush` is an implementation-specific method that attempts to kick\n// off a `flush` event as quickly as possible. `flush` will attempt to exhaust\n// the event queue before yielding to the browser's own event loop.\nvar requestFlush;\n// The position of the next task to execute in the task queue. This is\n// preserved between calls to `flush` so that it can be resumed if\n// a task throws an exception.\nvar index = 0;\n// If a task schedules additional tasks recursively, the task queue can grow\n// unbounded. To prevent memory exhaustion, the task queue will periodically\n// truncate already-completed tasks.\nvar capacity = 1024;\n\n// The flush function processes all tasks that have been scheduled with\n// `rawAsap` unless and until one of those tasks throws an exception.\n// If a task throws an exception, `flush` ensures that its state will remain\n// consistent and will resume where it left off when called again.\n// However, `flush` does not make any arrangements to be called again if an\n// exception is thrown.\nfunction flush() {\n while (index < queue.length) {\n var currentIndex = index;\n // Advance the index before calling the task. This ensures that we will\n // begin flushing on the next task the task throws an error.\n index = index + 1;\n queue[currentIndex].call();\n // Prevent leaking memory for long chains of recursive calls to `asap`.\n // If we call `asap` within tasks scheduled by `asap`, the queue will\n // grow, but to avoid an O(n) walk for every task we execute, we don't\n // shift tasks off the queue after they have been executed.\n // Instead, we periodically shift 1024 tasks off the queue.\n if (index > capacity) {\n // Manually shift all values starting at the index back to the\n // beginning of the queue.\n for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {\n queue[scan] = queue[scan + index];\n }\n queue.length -= index;\n index = 0;\n }\n }\n queue.length = 0;\n index = 0;\n flushing = false;\n}\n\n// `requestFlush` is implemented using a strategy based on data collected from\n// every available SauceLabs Selenium web driver worker at time of writing.\n// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593\n\n// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that\n// have WebKitMutationObserver but not un-prefixed MutationObserver.\n// Must use `global` or `self` instead of `window` to work in both frames and web\n// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.\n\n/* globals self */\nvar scope = typeof global !== \"undefined\" ? global : self;\nvar BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver;\n\n// MutationObservers are desirable because they have high priority and work\n// reliably everywhere they are implemented.\n// They are implemented in all modern browsers.\n//\n// - Android 4-4.3\n// - Chrome 26-34\n// - Firefox 14-29\n// - Internet Explorer 11\n// - iPad Safari 6-7.1\n// - iPhone Safari 7-7.1\n// - Safari 6-7\nif (typeof BrowserMutationObserver === \"function\") {\n requestFlush = makeRequestCallFromMutationObserver(flush);\n\n// MessageChannels are desirable because they give direct access to the HTML\n// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera\n// 11-12, and in web workers in many engines.\n// Although message channels yield to any queued rendering and IO tasks, they\n// would be better than imposing the 4ms delay of timers.\n// However, they do not work reliably in Internet Explorer or Safari.\n\n// Internet Explorer 10 is the only browser that has setImmediate but does\n// not have MutationObservers.\n// Although setImmediate yields to the browser's renderer, it would be\n// preferrable to falling back to setTimeout since it does not have\n// the minimum 4ms penalty.\n// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and\n// Desktop to a lesser extent) that renders both setImmediate and\n// MessageChannel useless for the purposes of ASAP.\n// https://github.com/kriskowal/q/issues/396\n\n// Timers are implemented universally.\n// We fall back to timers in workers in most engines, and in foreground\n// contexts in the following browsers.\n// However, note that even this simple case requires nuances to operate in a\n// broad spectrum of browsers.\n//\n// - Firefox 3-13\n// - Internet Explorer 6-9\n// - iPad Safari 4.3\n// - Lynx 2.8.7\n} else {\n requestFlush = makeRequestCallFromTimer(flush);\n}\n\n// `requestFlush` requests that the high priority event queue be flushed as\n// soon as possible.\n// This is useful to prevent an error thrown in a task from stalling the event\n// queue if the exception handled by Node.js’s\n// `process.on(\"uncaughtException\")` or by a domain.\nrawAsap.requestFlush = requestFlush;\n\n// To request a high priority event, we induce a mutation observer by toggling\n// the text of a text node between \"1\" and \"-1\".\nfunction makeRequestCallFromMutationObserver(callback) {\n var toggle = 1;\n var observer = new BrowserMutationObserver(callback);\n var node = document.createTextNode(\"\");\n observer.observe(node, {characterData: true});\n return function requestCall() {\n toggle = -toggle;\n node.data = toggle;\n };\n}\n\n// The message channel technique was discovered by Malte Ubl and was the\n// original foundation for this library.\n// http://www.nonblocking.io/2011/06/windownexttick.html\n\n// Safari 6.0.5 (at least) intermittently fails to create message ports on a\n// page's first load. Thankfully, this version of Safari supports\n// MutationObservers, so we don't need to fall back in that case.\n\n// function makeRequestCallFromMessageChannel(callback) {\n// var channel = new MessageChannel();\n// channel.port1.onmessage = callback;\n// return function requestCall() {\n// channel.port2.postMessage(0);\n// };\n// }\n\n// For reasons explained above, we are also unable to use `setImmediate`\n// under any circumstances.\n// Even if we were, there is another bug in Internet Explorer 10.\n// It is not sufficient to assign `setImmediate` to `requestFlush` because\n// `setImmediate` must be called *by name* and therefore must be wrapped in a\n// closure.\n// Never forget.\n\n// function makeRequestCallFromSetImmediate(callback) {\n// return function requestCall() {\n// setImmediate(callback);\n// };\n// }\n\n// Safari 6.0 has a problem where timers will get lost while the user is\n// scrolling. This problem does not impact ASAP because Safari 6.0 supports\n// mutation observers, so that implementation is used instead.\n// However, if we ever elect to use timers in Safari, the prevalent work-around\n// is to add a scroll event listener that calls for a flush.\n\n// `setTimeout` does not call the passed callback if the delay is less than\n// approximately 7 in web workers in Firefox 8 through 18, and sometimes not\n// even then.\n\nfunction makeRequestCallFromTimer(callback) {\n return function requestCall() {\n // We dispatch a timeout with a specified delay of 0 for engines that\n // can reliably accommodate that request. This will usually be snapped\n // to a 4 milisecond delay, but once we're flushing, there's no delay\n // between events.\n var timeoutHandle = setTimeout(handleTimer, 0);\n // However, since this timer gets frequently dropped in Firefox\n // workers, we enlist an interval handle that will try to fire\n // an event 20 times per second until it succeeds.\n var intervalHandle = setInterval(handleTimer, 50);\n\n function handleTimer() {\n // Whichever timer succeeds will cancel both timers and\n // execute the callback.\n clearTimeout(timeoutHandle);\n clearInterval(intervalHandle);\n callback();\n }\n };\n}\n\n// This is for `asap.js` only.\n// Its name will be periodically randomized to break any code that depends on\n// its existence.\nrawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;\n\n// ASAP was originally a nextTick shim included in Q. This was factored out\n// into this ASAP package. It was later adapted to RSVP which made further\n// amendments. These decisions, particularly to marginalize MessageChannel and\n// to capture the MutationObserver implementation in a closure, were integrated\n// back into ASAP proper.\n// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js\n","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","import _typeof from \"./typeof.js\";\nimport assertThisInitialized from \"./assertThisInitialized.js\";\nexport default function _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n\n return assertThisInitialized(self);\n}","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","import {UIConsturctor} from './UIConsturctor';\nimport {helperFunctions} from './helperFunctions';\n\nexport class UIConstructorIframe extends UIConsturctor {\n\n constructor(elementId, style, attributes, tagname, documentRef) {\n super(elementId, style, attributes, tagname, documentRef);\n this.bodyId = '';\n }\n\n constructUIIframe(style, dir, cl, header) {\n\n if (typeof dir === 'undefined'){\n dir = 'ltr';\n }\n\n if (typeof cl === 'undefined'){\n cl = 'en';\n }\n\n if (typeof header === 'undefined'){\n header = '';\n }\n\n this.elmDomDoc = helperFunctions.getDocument(this.elmDom);\n if (this.elmDomDoc === null) return null;\n\n try {\n this.elmDomDoc.getElementsByTagName(\"head\")[0].innerHTML = ''+header;\n\n if (this.bodyId != '') {\n this.elmDomDoc.body.id = this.bodyId;\n }\n\n var html = this.elmDomDoc.getElementsByTagName(\"html\")[0];\n html.setAttribute(\"lang\", cl);\n html.setAttribute(\"dir\", dir);\n\n var nodeDoctype = document.implementation.createDocumentType(\n 'html',\n '',\n ''\n );\n\n if (this.elmDomDoc.doctype) {\n this.elmDomDoc.replaceChild(nodeDoctype, this.elmDomDoc.doctype);\n } else {\n this.elmDomDoc.insertBefore(nodeDoctype, this.elmDomDoc.childNodes[0]);\n }\n\n } catch (e) {\n console.log(e);\n }\n\n this.insertCssFile(style);\n this.insertContent();\n };\n\n insertContent () {\n this.elmDomDoc.body.innerHTML = this.tmpl\n };\n};\n\n","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}","import {helperFunctions} from './helperFunctions';\nimport {settings} from './settings.js';\nimport {domEventsHandler} from '../util/domEventsHandler';\n\nexport class UIConsturctor {\n constructor(elementId, style, attributes, tagname, documentRef) {\n var f = this;\n this.elementId = elementId || \"\";\n this.style = style || \"\";\n this.tagName = tagname || \"div\";\n this.tmpl = \"\";\n this.elmDom = null;\n this.elmDomDoc = documentRef || document;\n this.attributes = {};\n this.classNames = [];\n\n this.elementId && (this.attributes.id = this.elementId);\n\n attributes && Object.keys(attributes).forEach(function (attr) {\n f.attributes[attr] = attributes[attr]\n })\n }\n\n constructUI(a) {\n this.elmDomDoc =\n a || this.elmDomDoc;\n this.elmDom = helperFunctions.initElement(this.elmDomDoc, this.tagName, this.attributes, this.style, this.tmpl);\n this.elmDom.className += this.classNames.join(\" \");\n return this.elmDom\n };\n\n restyle(attr, style) {\n style && (this.elmDom ? this.elmDom.style.cssText += \";\" + attr + \":\" + style : this.style += \";\" + attr + \":\" + style)\n };\n\n attachUserEventListener(a, c, d, k) {\n var e;\n if (e = d ? this.getElementById(d) : this.elmDom) d = a.split(\" \"), 1 < d.length ? d.forEach(function (a) {\n domEventsHandler.listen(e, a, c, a + k)\n }) : domEventsHandler.listen(e, a, c, k)\n };\n\n getElementById(a) {\n return this.elmDom ? this.elmDomDoc.getElementById(a) : null\n };\n\n hide() {\n this.restyle(\"display\", \"none !important\");\n }\n\n show() {\n this.restyle(\"display\", \"block !important\");\n }\n\n insertCssFile(style, reset) {\n var d = this.elmDomDoc.getElementsByTagName(\"head\")[0],\n k = this.elmDomDoc.createDocumentFragment(),\n e = helperFunctions.initElement(this.elmDomDoc, \"style\", {type: \"text/css\"}),\n f = this.elmDomDoc.createTextNode(reset ? style : settings.ResetStyle + \"\" + style);\n k.appendChild(e);\n d.appendChild(k);\n e.styleSheet ? e.styleSheet.cssText = f.nodeValue : e.appendChild(f)\n }\n\n insertCssRemoteFile(attr) {\n\n var elm = null;\n\n if (attr.id && attr.href && (elm = this.elmDomDoc.getElementById(attr.id)) !== null) {\n elm.href = attr.href\n return;\n }\n\n var d = this.elmDomDoc.getElementsByTagName(\"head\")[0],\n k = this.elmDomDoc.createDocumentFragment(),\n e = this.elmDomDoc.createElement('link');\n\n e.rel = \"stylesheet\";\n e.crossOrigin = \"*\";\n\n for (var b in attr) e[b] = attr[b];\n\n k.appendChild(e);\n d.appendChild(k);\n }\n\n insertJSFile(src, async, loadcb, attr) {\n var d = this.elmDomDoc.getElementsByTagName(\"head\")[0],\n k = this.elmDomDoc.createDocumentFragment(),\n e = this.elmDomDoc.createElement('script');\n\n e.type = 'text/javascript';\n if (typeof async === 'undefined' || async === true) {\n e.async = true;\n }\n\n e.crossOrigin = \"*\";\n e.src = src;\n\n if (loadcb) {\n e.onload = loadcb;\n }\n\n if (attr) {\n Object.keys(attr).forEach(key => {\n e.setAttribute(key,attr[key]);\n })\n }\n\n k.appendChild(e);\n d.appendChild(k);\n }\n\n massRestyle(a) {\n for (var b in a) a.hasOwnProperty(b) && this.restyle(b, a[b])\n }\n};\n\n","\nclass _chatNotifications {\n constructor() {\n this.isNotificationsSubscribed = false;\n this.applicationServerPublicKey = null;\n this.eventEmitter = null;\n }\n\n setPublicKey(publicKey, eventEmitter) {\n this.applicationServerPublicKey = publicKey\n this.eventEmitter = eventEmitter\n }\n\n sendNotification() {\n\n var that = this;\n var applicationServerPublicKey = this.applicationServerPublicKey;\n\n var swRegistration = null;\n\n if (!('serviceWorker' in navigator) || !('PushManager' in window)) {\n alert(\"This browser does not support desktop notification\");\n return;\n }\n\n // Let's check if the browser supports notifications\n if (!(\"Notification\" in window)) {\n alert(\"This browser does not support desktop notification\");\n return;\n }\n // Let's check whether notification permissions have already been granted\n else if (Notification.permission === \"granted\") {\n // If it's okay let's create a notification\n //\n }\n // Otherwise, we need to ask the user for permission\n else if (Notification.permission !== \"denied\") {\n Notification.requestPermission(function (permission) {\n // If the user accepts, let's create a notification\n if (permission !== \"granted\") {\n alert('Sorry but you have denied notification!');\n return;\n }\n });\n } else if (Notification.permission === \"denied\") {\n alert('Sorry but you have denied notification!');\n return;\n }\n\n function urlB64ToUint8Array(base64String) {\n var padding = '='.repeat((4 - base64String.length % 4) % 4);\n var base64 = (base64String + padding)\n .replace(/\\-/g, '+')\n .replace(/_/g, '/');\n\n var rawData = window.atob(base64);\n var outputArray = new Uint8Array(rawData.length);\n\n for (var i = 0; i < rawData.length; ++i) {\n outputArray[i] = rawData.charCodeAt(i);\n }\n return outputArray;\n }\n\n function updateSubscriptionOnServer(subscription, subscribe) {\n if (subscription === null) {\n return;\n }\n\n var key = subscription.getKey('p256dh');\n var token = subscription.getKey('auth');\n var contentEncoding = (PushManager.supportedContentEncodings || ['aesgcm'])[0];\n\n var payload = JSON.stringify({\n endpoint: subscription.endpoint,\n publicKey: key ? btoa(String.fromCharCode.apply(null, new Uint8Array(key))) : null,\n authToken: token ? btoa(String.fromCharCode.apply(null, new Uint8Array(token))) : null,\n contentEncoding : contentEncoding\n });\n\n that.eventEmitter.emitEvent('subcribedEvent', [{'payload' : payload}]);\n }\n\n var that = this;\n\n function subscribeUser() {\n var applicationServerKey = urlB64ToUint8Array(applicationServerPublicKey);\n swRegistration.pushManager.subscribe({\n 'userVisibleOnly': true,\n 'applicationServerKey': applicationServerKey\n }).then(function(subscription) {\n updateSubscriptionOnServer(subscription, true);\n that.isNotificationsSubscribed = true;\n });\n }\n\n function unsubscribeUser() {\n swRegistration.pushManager.getSubscription().then(function(subscription) {\n if (subscription) {\n updateSubscriptionOnServer(subscription,false);\n return subscription.unsubscribe();\n }\n }).then(function() {\n alert('You have unsubscribed!');\n that.isNotificationsSubscribed = false;\n });\n }\n\n function initializeUI() {\n // Set the initial subscription value\n swRegistration.pushManager.getSubscription().then(function(subscription) {\n that.isNotificationsSubscribed = !(subscription === null);\n if (that.isNotificationsSubscribed) {\n subscribeUser();\n } else {\n subscribeUser();\n }\n });\n }\n\n // At last, if the user has denied notifications, and you\n // want to be respectful there is no need to bother them any more.\n navigator.serviceWorker.register('/sw.lhc.js?v=2').then(function(swReg) {\n swRegistration = swReg;\n initializeUI();\n });\n\n }\n\n};\n\nconst chatNotifications = new _chatNotifications();\nexport { chatNotifications };","\nclass _helperFunctions {\n constructor() {\n }\n\n initElement(a, c, b, k, s) {\n var e;\n a = a.createElement(c);\n b = b || {};\n for (e in b) a[e] = b[e];\n s && \"iframe\" !== c && (a.innerHTML = s);\n k && (a.style.cssText = k);\n return a\n };\n \n getDocument(a) {\n return a.contentWindow ? a.contentWindow.document : a.contentDocument ? a.contentDocument : a.document ? a.document : null\n };\n\n removeById(EId)\n {\n var EObj = null;\n return(EObj = document.getElementById(EId)) ? EObj.parentNode.removeChild(EObj) : false;\n }\n\n // Returns time zone offset\n getTzOffset() {\n try {\n return Intl.DateTimeFormat().resolvedOptions().timeZone;\n } catch (e) {\n Date.prototype.stdTimezoneOffset = function() {\n var jan = new Date(this.getFullYear(), 0, 1);\n var jul = new Date(this.getFullYear(), 6, 1);\n return Math.max(jan.getTimezoneOffset(), jul.getTimezoneOffset());\n };\n\n Date.prototype.dst = function() {\n return this.getTimezoneOffset() < this.stdTimezoneOffset();\n };\n\n var today = new Date();\n var timeZoneOffset = 0;\n\n if (today.dst()) {\n timeZoneOffset = today.getTimezoneOffset();\n } else {\n timeZoneOffset = today.getTimezoneOffset()-60;\n };\n\n return (timeZoneOffset/60)*-1;\n }\n };\n\n getAbstractStyle(params) {\n return [\n \"outline: \" + (params.outline ? params.outline : \"none\") + \" !important; \",\n \"visibility: \" + (params.visibility ? params.visibility : \"visible\") + \" !important; \",\n \"resize: \" + (params.resize ? params.resize : \"none\") + \" !important; \",\n \"box-shadow: \" + (params.boxshadow ? params.boxshadow : \"none\") + \" ; \",\n \"overflow: \" + (params.overflow ? params.overflow : \"visible\") + \" ; \",\n \"background : \" + (params.background ? params.background : \"none\") + \" !important; \",\n \"opacity : \" + (params.opacity ? params.opacity : \"1\") + \" !important; \",\n \"filter : alpha(opacity=\" + (params.opacity ? 100 * params.opacity : \"100\") + \") !important; \",\n \"-ms-filter : progid:DXImageTransform.Microsoft.Alpha(Opacity\" + (params.opacity ? params.opacity : \"1\") + \") !important; \",\n \"-moz-opacity : \" + (params.opacity ? params.opacity : \"1\") + \" !important; \",\n \"-khtml-opacity : \" + (params.opacity ? params.opacity : \"1\") + \" !important; \",\n \"top : \" + (params.top ? params.top : \"auto\") + \"; \",\n \"right : \" + (params.right ? params.right : \"auto\") + \"; \",\n \"bottom : \" + (params.bottom ? params.bottom : \"auto\") + \"; \",\n \"left : \" + (params.left ? params.left : \"auto\") + \"; \",\n \"position : \" + (params.position ? params.position : \"absolute\") + \" !important; \",\n \"border : \" + (params.border ? params.border : \"0\") + \" !important; \",\n \"min-height : \" + (params.minheight ? params.minheight : \"auto\") + \"; \",\n \"min-width : \" + (params.minwidth ? params.minwidth : \"auto\") + \"; \",\n \"max-height : \" + (params.maxheight ? params.maxheight : \"none\") + \"; \",\n \"max-width : \" + (params.maxwidth ? params.maxwidth : \"none\") + \"; \",\n \"padding : \" + (params.padding ? params.padding : \"0\") + \" !important; \",\n \"margin : \" + (params.margin ? params.margin : \"0\") + \" !important; \",\n \"-moz-transition-property : \" + (params.transition ? params.transition : \"none\") + \" !important; \",\n \"-webkit-transition-property : \" + (params.transition ? params.transition : \"none\") + \" !important; \",\n \"-o-transition-property : \" + (params.transition ? params.transition : \"none\") + \" !important; \",\n \"transition-property : \" + (params.transition ? params.transition : \"none\") + \" !important; \",\n \"transform : \" + (params.transform ? params.transform : \"none\") + \" !important; \",\n \"-webkit-transform : \" + (params.transform ? params.transform : \"none\") + \" !important; \",\n \"-ms-transform : \" + (params.transform ? params.transform : \"none\") + \" !important; \",\n \"width : \" + (params.width ? params.width : \"auto\") + \" ; \",\n \"height : \" + (params.height ? params.height : \"auto\") + \" ; \",\n \"display : \" + (params.display ? params.display : \"block\") + \" !important; \",\n \"z-index : \" + (params.zindex ? params.zindex : \"none\") + \" ; \",\n \"background-color : \" + (params.backgroundcolor ? params.backgroundcolor : \"transparent\") + \" !important; \",\n \"cursor : \" + (params.cursor ? params.cursor : \"auto\") + \" !important; \",\n \"float : \" + (params[\"float\"] ? params[\"float\"] : \"none\") + \" !important; \",\n \"border-radius : \" + (params.borderRadius ? params.borderRadius : \"unset\") + \"; \"].join(\"\").replace(/\\s/gm, \"\")\n };\n\n hasClass(element, className) {\n if (element === null) return;\n return element.classList ? element.classList.contains(className) : !!element.className.match(RegExp(\"(\\\\s|^)\" + className + \"(\\\\s|$)\"))\n }\n\n addClass(element, className) {\n if (element === null) return;\n element.classList ? element.classList.add(className) : this.hasClass(element, className) || (element.className += \" \" + className)\n }\n\n removeClass(element, className) {\n if (element === null) return;\n element.classList ? element.classList.remove(className) : this.hasClass(element, className) && (element.className = element.className.replace(RegExp(\"(\\\\s|^)\" + className + \"(\\\\s|$)\"), \" \"))\n }\n\n makeScreenshot(screenshot,url) {\n var inst = this;\n if (typeof html2canvas == \"undefined\") {\n var th = document.getElementsByTagName('head')[0];\n var s = document.createElement('script');\n s.setAttribute('type','text/javascript');\n s.setAttribute('src',screenshot);\n th.appendChild(s);\n\n s.onreadystatechange = s.onload = () => {\n this.makeScreenshot(screenshot, url);\n };\n } else {\n try {\n html2canvas(document.body).then(function(canvas) {\n var xhr = new XMLHttpRequest();\n xhr.open( \"POST\", url, true);\n xhr.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n xhr.send( \"data=\" + encodeURIComponent( canvas.toDataURL() ) );\n });\n } catch(err) {\n console.log(err);\n }\n }\n }\n\n makeQuery(params)\n {\n var item, pairs = [];\n for (item in params) {\n if (params[item] != '' && params[item] != null) {\n params.hasOwnProperty(item) && pairs.push(encodeURIComponent(item) + \"=\" + encodeURIComponent(params[item]));\n }\n }\n return pairs.join(\"&\")\n }\n \n makeRequest(url, params, callback) {\n var request = new XMLHttpRequest;\n var urlRequest = url + '?' + this.makeQuery(params.params);\n request.open(\"GET\",urlRequest, true);\n request.onreadystatechange = function () {\n if (4 == request.readyState && request.status != 0) {\n try {\n callback(JSON.parse(request.responseText));\n } catch (e) {\n e.message += \"\\n\" + urlRequest + \"\\n\" + \"[\"+request.status+\"]\\n\" + request.responseText;\n throw e;\n }\n }\n };\n request.send();\n return {type: \"xhr\", req: request}\n }\n\n insertCssRemoteFile(attr) {\n\n var elm = null;\n\n if (attr.id && attr.href && (elm = document.getElementById(attr.id)) !== null) {\n elm.href = attr.href\n return;\n }\n\n var d = document.getElementsByTagName(\"head\")[0],\n k = document.createDocumentFragment(),\n e = document.createElement('link');\n\n e.rel = \"stylesheet\";\n e.crossOrigin = \"*\";\n\n for (var b in attr) e[b] = attr[b];\n\n k.appendChild(e);\n d.appendChild(k);\n }\n};\n\nconst helperFunctions = new _helperFunctions();\nexport { helperFunctions };","var settings = {};\n\nsettings.ResetStyle = \"html,body,div,span,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,abbr,address,cite,code,del,dfn,em,img,ins,kbd,q,samp,small,strong,sub,sup,var,b,i,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}nav ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}a{margin:0;padding:0;font-size:100%;vertical-align:baseline;background:transparent}ins{background-color:#ff9;color:#000;text-decoration:none}mark{background-color:#ff9;color:#000;font-style:italic;font-weight:bold}del{text-decoration:line-through}abbr[title],dfn[title]{border-bottom:1px dotted;cursor:help}table{border-collapse:collapse;border-spacing:0}hr{display:block;height:1px;border:0;border-top:1px solid #ccc;margin:1em 0;padding:0}input,select{vertical-align:middle}html,body{height: 100% !important;\\n\" +\n \" min-height: 100% !important;\\n\" +\n \" max-height: 100% !important;\\n\" +\n \" width: 100% !important;\\n\" +\n \" min-width: 100% !important;\\n\" +\n \" max-width: 100% !important;}body{display: flex;flex-direction: column;background:transparent;font:13px Helvetica,Arial,sans-serif;position:relative}.clear{clear:both}.clearfix:after{content:'';display:block;height:0;clear:both;visibility:hidden}\";\n\nexport {settings};","import {UIConsturctor} from '../UIConsturctor';\n\nexport class containerChat{\n constructor(prefix, pnode) {\n this.cont = new UIConsturctor((prefix || 'lhc')+'_container_v2', \"border: 0 none !important; padding: 0 !important; margin: 0 !important; z-index: 999999999 !important; overflow : visible !important; min-width: 0 !important; min-height: 0 !important; max-width: none !important; max-height: none !important; width : auto !important; height : auto !important;\");\n this.cont.constructUI();\n (!!pnode && document.getElementById(pnode).appendChild(this.cont.elmDom)) || document.body.appendChild(this.cont.elmDom);\n }\n}","import {UIConstructorIframe} from '../UIConstructorIframe';\nimport {helperFunctions} from '../helperFunctions';\n\nexport class mainWidget{\n constructor(prefix) {\n\n this.attributes = {};\n\n this.width = '350';\n this.height = '520';\n this.bottom = '30';\n this.right = '30';\n this.units = 'px';\n this.originalCSS = '';\n this.bottom_override = false;\n\n this.cont = new UIConstructorIframe((prefix || 'lhc')+'_widget_v2', helperFunctions.getAbstractStyle({\n zindex: \"2147483640\",\n width: \"95px\",\n height: \"95px\",\n position: \"fixed\",\n display: \"none\",\n maxheight: \"95px\",\n maxwidth: \"95px\",\n minheight: \"95px\",\n minwidth: \"95px\"\n }), null, \"iframe\");\n\n this.isLoaded = false;\n\n this.loadStatus = {main: false, css: false};\n }\n\n resize() {\n\n let restyleStyle = {\n height: this.height + this.units,\n \"min-height\": this.height + this.units,\n \"max-height\": this.height + this.units,\n width: this.width + this.units,\n \"min-width\": this.width + this.units,\n \"max-width\": this.width + this.units,\n bottom: (this.units == 'px' ? this.bottom + \"px\" : '0px')\n };\n\n if ((this.attributes.position_placement == 'middle_right' || this.attributes.position_placement == 'middle_left') && this.bottom_override == true) {\n restyleStyle['bottom'] = \"calc(50% + 20px)\";\n }\n\n if (this.attributes.position_placement == 'middle_left' || this.attributes.position_placement == 'bottom_left' || this.attributes.position_placement == 'full_height_left') {\n restyleStyle['left'] = (this.units == 'px' ? this.right + \"px\" : '0px');\n } else {\n restyleStyle['right'] = (this.units == 'px' ? this.right + \"px\" : '0px');\n }\n\n if ((this.attributes.position_placement == 'full_height_right' || this.attributes.position_placement == 'full_height_left') && !this.bottom_override) {\n restyleStyle['min-height'] = '100%';\n restyleStyle['max-height'] = '100%';\n restyleStyle['height'] = '100%';\n restyleStyle['bottom'] = '0px';\n\n if (this.attributes.position_placement == 'full_height_left') {\n restyleStyle['left'] = '0px';\n } else {\n restyleStyle['right'] = '0px';\n }\n }\n\n if (this.attributes.mode == 'embed') {\n restyleStyle[\"max-width\"] = '100%';\n restyleStyle[\"min-width\"] = '100%';\n restyleStyle[\"width\"] = '100%';\n restyleStyle[\"position\"] = (this.attributes.fscreen ? 'fixed' : 'relative') + '!important';\n restyleStyle[\"bottom\"] = 'auto';\n restyleStyle[\"right\"] = 'auto';\n }\n\n this.cont.massRestyle(restyleStyle);\n }\n\n checkLoadStatus() {\n if (this.loadStatus['main'] == true && this.loadStatus['css'] == true ) {\n this.attributes.wloaded.next(true);\n }\n }\n\n makeContent() {\n this.cont.bodyId = 'chat-widget';\n\n this.cont.tmpl = '
';\n\n if (this.cont.constructUIIframe('', this.attributes.staticJS['dir'], this.attributes.staticJS['cl'], this.attributes.hhtml) === null) {\n this.isLoaded = true;\n return null;\n }\n\n this.cont.elmDom.className = this.attributes.isMobile === true ? 'lhc-mobile lhc-mode-'+this.attributes.mode : 'lhc-desktop lhc-mode-'+this.attributes.mode;\n\n if (this.attributes.cont_ss) {\n this.originalCSS = this.cont.elmDom.style.cssText;\n this.cont.elmDom.style.cssText += this.attributes.cont_ss;\n }\n }\n\n init(attributes, lazyLoad) {\n\n this.attributes = attributes;\n\n if (this.makeContent() === null) {\n return null;\n };\n\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n\n if (chatParams['id'] || !lazyLoad) {\n this.bootstrap();\n }\n \n this.toggleVisibilityWrap = (data) => {\n this.toggleVisibility(data);\n };\n\n attributes.widgetStatus.subscribe(this.toggleVisibilityWrap);\n\n this.monitorDimensionsWrap = (data) => {\n this.monitorDimensions(data);\n };\n\n if (attributes.widgetDimesions.valueInternal['units'] == 'px' && this.attributes.isMobile == false && this.attributes.mode != 'embed' && this.attributes.position_placement != 'full_height_right' && this.attributes.position_placement != 'full_height_left')\n {\n this.screenAttributesUpdate = () => {\n\n if (window.innerHeight < attributes.widgetDimesions.valueInternal['height'] + 60) {\n attributes.widgetDimesions.nextPropertySilent('height_soverride', window.innerHeight - 60);\n } else {\n attributes.widgetDimesions.nextPropertySilent('height_soverride', null);\n }\n\n if (window.innerWidth < attributes.widgetDimesions.valueInternal['width'] + 60) {\n attributes.widgetDimesions.nextPropertySilent('width_soverride', window.innerWidth - 60);\n } else {\n attributes.widgetDimesions.nextPropertySilent('width_soverride', null);\n }\n\n attributes.widgetDimesions.callListeners();\n };\n\n this.screenAttributesUpdate();\n\n window.addEventListener('resize', this.screenAttributesUpdate);\n }\n\n attributes.widgetDimesions.subscribe(this.monitorDimensionsWrap);\n\n attributes.eventEmitter.addListener('reloadWidget',() => {\n this.isLoaded = false;\n this.makeContent();\n attributes.eventEmitter.emitEvent('widgetHeight',[{'reset_height' : true}]);\n this.toggleVisibility(attributes.widgetStatus.valueInternal);\n });\n\n }\n\n bootstrap() {\n\n if (this.isLoaded === true) {\n return ;\n }\n\n this.isLoaded = true;\n\n if (this.attributes.staticJS['fontCSS']) {\n this.cont.insertCssRemoteFile({rel:\"stylesheet\", crossOrigin : \"anonymous\", href : this.attributes.staticJS['fontCSS']});\n }\n\n if (this.attributes.theme) {\n this.cont.insertCssRemoteFile({crossOrigin : \"anonymous\", href : this.attributes.LHC_API.args.lhc_base_url + '/widgetrestapi/theme/' + this.attributes.theme + '?v=' + this.attributes.theme_v}, true);\n }\n\n this.cont.insertCssRemoteFile({onload: () => {\n this.loadStatus['css'] = true;\n this.checkLoadStatus();\n },crossOrigin : \"anonymous\", href : this.attributes.staticJS['widget_css']}, true);\n\n if (this.attributes.isMobile == true && this.attributes.mode == 'widget') {\n this.cont.insertCssRemoteFile({crossOrigin : \"anonymous\", href : this.attributes.staticJS['widget_mobile_css']});\n }\n\n if (this.attributes.mode == 'embed') {\n this.cont.insertCssRemoteFile({crossOrigin : \"anonymous\", href : this.attributes.staticJS['embed_css'] });\n\n if (this.attributes.staticJS['page_css']) {\n helperFunctions.insertCssRemoteFile({crossOrigin : \"anonymous\", id: \"lhc-theme-page\", href : this.attributes.LHC_API.args.lhc_base_url + '/widgetrestapi/themepage/' + this.attributes.theme + '?v=' + this.attributes.theme_v});\n }\n }\n\n this.cont.insertJSFile(this.attributes.staticJS['vendor'], false, () => {\n this.cont.insertJSFile(this.attributes.staticJS['app'], false, () => {\n this.loadStatus['main'] = true;\n this.checkLoadStatus();\n }, {'scope': this.attributes.prefixLowercase});\n }, {'scope': this.attributes.prefixLowercase});\n\n if (this.attributes.staticJS['ex_js'] && this.attributes.staticJS['ex_js'].length > 0) {\n this.attributes.staticJS['ex_js'].forEach((item) => {\n this.cont.insertJSFile(item, false);\n });\n }\n }\n\n toggleVisibility(data) {\n data == false ? this.hide() : this.show();\n }\n\n monitorDimensions(data) {\n this.width = data.width_override || data.width_soverride || data.width;\n this.height = data.height_override || data.height_soverride || data.height;\n this.bottom = data.bottom_override ? (data.bottom_override + (data.wbottom ? data.wbottom : 0)) : (30 + (this.attributes.clinst === true ? 70 : 0) + (data.wbottom ? data.wbottom : 0));\n this.right = data.right_override ? (data.right_override + (data.wright_inv ? data.wright_inv : 0)) : (30 + (data.wright ? data.wright : 0));\n this.units = (data.width_override || data.height_override || data.bottom_override || data.right_override) ? 'px' : data.units;\n\n this.resize();\n\n this.bottom_override = !!data.bottom_override;\n }\n\n hide () {\n this.cont.hide();\n }\n\n hideInvitation() {\n if (this.attributes.cont_ss) {\n this.cont.elmDom.style.cssText += this.attributes.cont_ss;\n }\n }\n\n showInvitation() {\n if (this.attributes.cont_ss) {\n this.cont.elmDom.style.cssText = this.originalCSS;\n }\n this.show();\n }\n\n show () {\n if (this.isLoaded === false) {\n this.bootstrap();\n }\n this.cont.show();\n }\n}","export class mainWidgetPopup {\n constructor() {\n\n this.attributes = {};\n\n this.width = null;\n this.height = null;\n this.units = 'px';\n this.freeup();\n }\n\n freeup() {\n this.cont = {};\n }\n\n parseOptions() {\n var argumentsQuery = new Array();\n var paramsReturn = '';\n if (typeof this.attributes != 'undefined') {\n if (typeof this.attributes.LHCChatOptions.attr != 'undefined') {\n if (this.attributes.LHCChatOptions.attr.length > 0) {\n for (var index in this.attributes.LHCChatOptions.attr) {\n if (typeof this.attributes.LHCChatOptions.attr[index] != 'undefined' && typeof this.attributes.LHCChatOptions.attr[index].type != 'undefined') {\n argumentsQuery.push('name[]=' + encodeURIComponent(this.attributes.LHCChatOptions.attr[index].name) + '&encattr[]=' + (typeof this.attributes.LHCChatOptions.attr[index].encrypted != 'undefined' && this.attributes.LHCChatOptions.attr[index].encrypted == true ? 't' : 'f') + '&value[]=' + encodeURIComponent(this.attributes.LHCChatOptions.attr[index].value) + '&type[]=' + encodeURIComponent(this.attributes.LHCChatOptions.attr[index].type) + '&size[]=' + encodeURIComponent(this.attributes.LHCChatOptions.attr[index].size) + '&req[]=' + (typeof this.attributes.LHCChatOptions.attr[index].req != 'undefined' && this.attributes.LHCChatOptions.attr[index].req == true ? 't' : 'f') + '&sh[]=' + ((typeof this.attributes.LHCChatOptions.attr[index].show != 'undefined' && (this.attributes.LHCChatOptions.attr[index].show == 'on' || this.attributes.LHCChatOptions.attr[index].show == 'off')) ? this.attributes.LHCChatOptions.attr[index].show : 'b'));\n }\n }\n }\n }\n\n if (typeof this.attributes.LHCChatOptions.attr_prefill != 'undefined') {\n if (this.attributes.LHCChatOptions.attr_prefill.length > 0) {\n for (var index in this.attributes.LHCChatOptions.attr_prefill) {\n if (typeof this.attributes.LHCChatOptions.attr_prefill[index] != 'undefined' && typeof this.attributes.LHCChatOptions.attr_prefill[index].name != 'undefined') {\n argumentsQuery.push('prefill[' + this.attributes.LHCChatOptions.attr_prefill[index].name + ']=' + encodeURIComponent(this.attributes.LHCChatOptions.attr_prefill[index].value));\n }\n }\n }\n }\n\n if (typeof this.attributes.LHCChatOptions.attr_prefill_admin != 'undefined') {\n if (this.attributes.LHCChatOptions.attr_prefill_admin.length > 0) {\n for (var index in this.attributes.LHCChatOptions.attr_prefill_admin) {\n if (typeof this.attributes.LHCChatOptions.attr_prefill_admin[index] != 'undefined') {\n argumentsQuery.push('value_items_admin[' + this.attributes.LHCChatOptions.attr_prefill_admin[index].index + ']=' + encodeURIComponent(this.attributes.LHCChatOptions.attr_prefill_admin[index].value));\n }\n }\n }\n }\n\n if (argumentsQuery.length > 0) {\n paramsReturn = '&' + argumentsQuery.join('&');\n }\n }\n\n return paramsReturn;\n }\n\n init(attributes, chatEvents, paramsPopup) {\n\n if (this.cont.elementReferrerPopup && this.cont.elementReferrerPopup.closed === false) {\n typeof paramsPopup !== 'undefined' && paramsPopup.event !== 'undefined' && paramsPopup.event.preventDefault();\n this.cont.elementReferrerPopup.focus();\n } else {\n\n this.attributes = attributes;\n\n let attr = {\n 'static_chat': this.attributes['userSession'].getSessionAttributes()\n };\n\n let urlArgumetns = '';\n\n if (attr['static_chat']['id'] && attr['static_chat']['hash']) {\n urlArgumetns = urlArgumetns + \"/(id)/\" + attr['static_chat']['id'] + \"/(hash)/\" + attr['static_chat']['hash'];\n }\n\n if (this.attributes['theme'] !== null) {\n urlArgumetns = urlArgumetns + \"/(theme)/\" + this.attributes['theme'];\n }\n\n if (attr['static_chat']['vid'] !== null && this.attributes.storageHandler.cookieEnabled === true) {\n urlArgumetns = urlArgumetns + \"/(vid)/\" + attr['static_chat']['vid'];\n }\n\n if (this.attributes['isMobile']) {\n urlArgumetns = urlArgumetns + \"/(mobile)/true\";\n }\n\n if (this.attributes['department'].length > 0) {\n urlArgumetns = urlArgumetns + \"/(department)/\" + this.attributes['department'].join('/');\n }\n\n if (this.attributes['identifier'] != '') {\n urlArgumetns = urlArgumetns + \"/(identifier)/\" + this.attributes['identifier'];\n }\n\n if (this.attributes['operator']) {\n urlArgumetns = urlArgumetns + \"/(operator)/\" + this.attributes['operator'];\n }\n\n if (this.attributes['survey']) {\n urlArgumetns = urlArgumetns + \"/(survey)/\" + this.attributes['survey'];\n }\n\n if (this.attributes['bot_id']) {\n urlArgumetns = urlArgumetns + \"/(bot)/\" + this.attributes['bot_id'];\n }\n\n if (this.attributes['trigger_id']) {\n urlArgumetns = urlArgumetns + \"/(trigger)/\" + this.attributes['trigger_id'];\n }\n\n if (this.attributes['subject_id']) {\n urlArgumetns = urlArgumetns + \"/(subject)/\" + this.attributes['subject_id'];\n }\n\n if (this.attributes['priority']) {\n urlArgumetns = urlArgumetns + \"/(priority)/\" + this.attributes['priority'];\n }\n\n if (this.attributes['prefixLowercase'] != 'lhc') {\n urlArgumetns = urlArgumetns + \"/(scope)/\" + this.attributes['prefixLowercase'];\n }\n\n urlArgumetns = urlArgumetns + \"/(sound)/\" + (this.attributes.toggleSound.value == true ? 1 : 0);\n\n if (this.attributes['proactive']['invitation']) {\n urlArgumetns = urlArgumetns + \"/(inv)/\" + this.attributes['proactive']['invitation'];\n if (this.attributes['mode'] == 'popup') {\n this.attributes.storageHandler.setSessionStorage(this.attributes['prefixStorage']+'_invt', 1);\n }\n }\n\n var fontSize = this.attributes.storageHandler.getLocalStorage(this.attributes['prefixStorage']+'_dfs');\n\n if (fontSize) {\n urlArgumetns = urlArgumetns + \"/(fs)/\" + parseInt(fontSize);\n }\n\n if (this.attributes['leaveMessage'] === true) {\n urlArgumetns = urlArgumetns + \"/(leaveamessage)/true\";\n }\n\n if (this.attributes['userSession'].getSessionReferrer() !== null && this.attributes['userSession'].getSessionReferrer() != '') {\n urlArgumetns = urlArgumetns + '?ses_ref=' + this.attributes['userSession'].getSessionReferrer() + this.parseOptions();\n } else {\n urlArgumetns = urlArgumetns + '?' + this.parseOptions();\n }\n\n const dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : window.screenX;\n const dualScreenTop = window.screenTop !== undefined ? window.screenTop : window.screenY;\n\n const width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width;\n const height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height;\n\n const systemZoom = width / window.screen.availWidth;\n const left = (width - parseInt(this.attributes['popupDimesnions']['pwidth'])) / 2 / systemZoom + dualScreenLeft;\n const top = (height - parseInt(this.attributes['popupDimesnions']['pheight'])) / 2 / systemZoom + dualScreenTop;\n\n var paramsWindow = \"scrollbars=yes,menubar=1,resizable=1,width=\" + this.attributes['popupDimesnions']['pwidth'] + \",height=\" + this.attributes['popupDimesnions']['pheight'] + \",top=\" + top + \",left=\" + left;\n var newWin = window.open(\"\", this.attributes['prefixStorage'] + '_popup_v2', paramsWindow);\n var needWindow = false;\n var windowCreated = false;\n\n // First try to find any existing window\n try {\n // It has to be new window or popup was blocked\n if (!newWin || newWin.closed || typeof newWin.closed=='undefined' || newWin.location.href === \"about:blank\") {\n newWin = this.cont.elementReferrerPopup = window.open(this.attributes['base_url'] + this.attributes['lang'] + \"chat/start\" + urlArgumetns, this.attributes['prefixStorage']+'_popup_v2', paramsWindow);\n windowCreated = true;\n } else {\n needWindow = true;\n }\n } catch (e) { // We get cross-origin error only if window exist and it's location is other one than about:blank\n needWindow = true;\n }\n\n // Now if visitor has blocked popup change chat status link and just allow browser handle the rest.\n if (!newWin || newWin.closed || typeof newWin.closed=='undefined') {\n try {\n this.attributes.viewHandler.cont.getElementById(\"status-icon\").href = this.attributes['base_url'] + this.attributes['lang'] + \"chat/start\" + urlArgumetns;\n } catch (e) {\n alert('You have disabled popups!');\n }\n } else if (windowCreated == true) {\n typeof chatEvents !== 'undefined' && this.attributes.kcw === false && chatEvents.sendChildEvent('endedChat', [{'sender': 'endButton'}]);\n typeof paramsPopup !== 'undefined' && paramsPopup.event !== 'undefined' && paramsPopup.event.preventDefault();\n } else if (needWindow === true) {\n this.cont.elementReferrerPopup = newWin;\n newWin.focus();\n typeof paramsPopup !== 'undefined' && paramsPopup.event !== 'undefined' && paramsPopup.event.preventDefault();\n }\n }\n }\n\n sendParameters(chatEvents) {\n if (this.cont.elementReferrerPopup && this.cont.elementReferrerPopup.closed === false) {\n var js_vars = this.attributes['jsVars'].value;\n var js_args = {};\n var currentVar = null;\n for (var index in js_vars) {\n try {\n currentVar = eval(js_vars[index].var);\n if (typeof currentVar !== 'undefined' && currentVar !== null && currentVar !== '') {\n js_args[js_vars[index].id] = currentVar;\n }\n } catch (err) {\n\n }\n }\n chatEvents.sendChildEvent('jsVars', [js_args]);\n }\n }\n}","import {settings} from '../settings.js';\nimport {UIConstructorIframe} from '../UIConstructorIframe';\nimport {helperFunctions} from '../helperFunctions';\n\nexport class statusWidget{\n constructor(prefix) {\n\n this.attributes = {};\n this.controlMode = false;\n\n this.cont = new UIConstructorIframe((prefix || 'lhc')+'_status_widget_v2', helperFunctions.getAbstractStyle({\n zindex: \"2147483640\",\n width: \"95px\",\n height: \"95px\",\n position: \"fixed\",\n display: \"none\",\n maxheight: \"95px\",\n maxwidth: \"95px\",\n minheight: \"95px\",\n minwidth: \"95px\"\n }), null, \"iframe\");\n\n this.loadStatus = {main : false, theme: false, font: true, widget : false, shidden: false};\n this.lload = false;\n this.unread_counter = 0;\n }\n\n toggleOfflineIcon(onlineStatus) {\n var icon = this.cont.getElementById(\"status-icon\");\n\n if (onlineStatus) {\n if (!this.attributes.leaveMessage) {\n this.show();\n }\n helperFunctions.removeClass(icon, \"offline-status\");\n } else {\n if (!this.attributes.leaveMessage) {\n this.hide();\n } else {\n helperFunctions.addClass(icon, \"offline-status\");\n }\n }\n }\n\n checkLoadStatus() {\n if (this.loadStatus['theme'] == true && this.loadStatus['main'] == true && this.loadStatus['font'] == true && this.loadStatus['widget'] == true && this.loadStatus['shidden'] == false) {\n this.cont.getElementById('lhc_status_container').style.display = \"\";\n this.attributes.sload.next(true);\n }\n }\n\n init(attributes, lload) {\n\n this.attributes = attributes;\n\n var placement = {bottom: (10+this.attributes.widgetDimesions.value.sbottom) + \"px\", right: (10+this.attributes.widgetDimesions.value.sright) + \"px\"};\n\n if (attributes.position_placement == 'bottom_left' || attributes.position_placement == 'full_height_left') {\n placement = { bottom: (10+this.attributes.widgetDimesions.value.sbottom) + \"px\", left: (10+this.attributes.widgetDimesions.value.sright) + \"px\"};\n } else if (attributes.position_placement == 'middle_right') {\n placement = {bottom: \"calc(50% - 45px)\",right: (10+this.attributes.widgetDimesions.value.sright) + \"px\"};\n } else if (attributes.position_placement == 'middle_left') {\n placement = {bottom: \"calc(50% - 45px)\",left: (10+this.attributes.widgetDimesions.value.sright) + \"px\"};\n }\n\n this.cont.massRestyle(placement);\n\n this.cont.tmpl = '
!
';\n\n if (this.cont.constructUIIframe('') === null) {\n return null;\n }\n\n this.cont.elmDom.className = this.attributes.isMobile === true ? 'lhc-mobile' : 'lhc-desktop';\n\n var _inst = this;\n\n this.lload = !(!lload);\n\n // If it's lazy load we have always to consider widget as loaded\n if (this.lload === true) {\n this.loadStatus['widget'] = true;\n } else {\n // We wait untill widget content loads\n attributes.wloaded.subscribe((data) => { if (data){this.loadStatus['widget'] = true; this.checkLoadStatus()}});\n }\n\n attributes.shidden.subscribe((data) => {\n if (data) {\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n if (!chatParams['id'] && this.attributes.widgetStatus.value != true) {\n this.loadStatus['shidden'] = true;\n this.hide();\n }\n } else {\n this.loadStatus['shidden'] = false;\n this.checkLoadStatus();\n this.show();\n }\n });\n\n this.cont.attachUserEventListener(\"click\", function (e) {\n\n attributes.onlineStatus.value === false && attributes.eventEmitter.emitEvent('offlineClickAction');\n\n if (attributes.onlineStatus.value === false && attributes.offline_redirect !== null){\n document.location = attributes.offline_redirect;\n e.preventDefault();\n } else {\n if (_inst.controlMode == true) {\n attributes.eventEmitter.emitEvent('closeWidget', [{'sender' : 'closeButton', 'mode' : 'control'}]);\n e.preventDefault();\n } else {\n attributes.eventEmitter.emitEvent('showWidget', [{'event':e}]);\n attributes.eventEmitter.emitEvent('clickAction');\n }\n }\n\n }, \"lhc_status_container\", \"minifiedclick\");\n\n if (this.attributes.staticJS['fontCSS']) {\n this.cont.insertCssRemoteFile({crossOrigin : \"anonymous\", href : this.attributes.staticJS['fontCSS']});\n }\n\n if (this.attributes.staticJS['font_status']) {\n this.cont.insertCssRemoteFile({onload: () => {this.loadStatus['font'] = true; this.checkLoadStatus()},\"as\":\"font\", rel:\"preload\", type: \"font/woff\", crossOrigin : \"anonymous\", href : this.attributes.staticJS['font_status']});\n }\n\n if (this.attributes.theme) {\n this.loadStatus['theme'] = false;\n this.cont.insertCssRemoteFile({onload: ()=>{this.loadStatus['theme'] = true; this.checkLoadStatus()}, id: \"lhc-theme-status\", crossOrigin : \"anonymous\", href : this.attributes.LHC_API.args.lhc_base_url + '/widgetrestapi/themestatus/' + this.attributes.theme + '?v=' + this.attributes.theme_v}, true);\n } else {\n this.loadStatus['theme'] = true;\n }\n\n this.cont.insertCssRemoteFile({onload: ()=>{this.loadStatus['main'] = true; this.checkLoadStatus()}, crossOrigin : \"anonymous\", href : this.attributes.staticJS['status_css'] });\n\n if (this.attributes.staticJS['page_css']) {\n helperFunctions.insertCssRemoteFile({crossOrigin : \"anonymous\", id: \"lhc-theme-page\", href : this.attributes.LHC_API.args.lhc_base_url + '/widgetrestapi/themepage/' + this.attributes.theme + '?v=' + this.attributes.theme_v});\n }\n\n attributes.onlineStatus.subscribe((data) => this.toggleOfflineIcon(data));\n\n attributes.widgetStatus.subscribe((data) => {\n if (this.attributes.mode !== 'popup') {\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n (data == true || (!this.attributes.leaveMessage && this.attributes.onlineStatus.value == false && !chatParams['id'])) ? this.hide() : this.show();\n }\n });\n\n this.attributes.mode === 'popup' && this.show();\n let unreadMessagesNumber = attributes.storageHandler.getSessionStorage(this.attributes['prefixStorage']+'_unr');\n\n attributes.eventEmitter.addListener('unread_message', (data) => {\n var unreadTotal = (data && data.otm);\n if (unreadTotal) {\n unreadTotal = parseInt(unreadTotal);\n unreadTotal += this.unread_counter;\n }\n this.attributes.unread_counter.next(unreadTotal);\n this.showUnreadIndicator(unreadTotal);\n });\n\n if (unreadMessagesNumber !== null) {\n attributes.eventEmitter.emitEvent('unread_message',[{otm:unreadMessagesNumber, init: true}]);\n if (unreadMessagesNumber !== null && !isNaN(unreadMessagesNumber)) {\n this.unread_counter = parseInt(unreadMessagesNumber);\n }\n }\n\n // Widget reload was called\n // We avoid cache by using timestamp because we do not call init call.\n // We also always insert themepage even if there is no css in it.\n attributes.eventEmitter.addListener('reloadWidget',() => {\n if (this.attributes.theme > 0) {\n this.cont.insertCssRemoteFile({crossOrigin : \"anonymous\", id: \"lhc-theme-status\", href : this.attributes.LHC_API.args.lhc_base_url + '/widgetrestapi/themestatus/' + this.attributes.theme + '?v=' + Date.now()}, true);\n }\n helperFunctions.insertCssRemoteFile({crossOrigin : \"anonymous\", id: \"lhc-theme-page\", href : this.attributes.LHC_API.args.lhc_base_url + '/widgetrestapi/themepage/' + this.attributes.theme + '?v=' + Date.now()});\n });\n }\n\n hide () {\n\n this.removeUnreadIndicator();\n\n if (this.attributes.clinst === true && this.attributes.isMobile == false) {\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n if (this.attributes.leaveMessage == true || this.attributes.onlineStatus.value == true || chatParams['id']) {\n\n if (this.attributes['position'] != 'api' || (this.attributes['position'] == 'api' && this.attributes['hide_status'] !== true && ((chatParams['id'] && chatParams['hash']) || this.attributes.widgetStatus.value == true))) {\n if (this.attributes['hide_status'] !== true || (chatParams['id'] && chatParams['hash'])) {\n this.cont.show();\n }\n }\n\n if (this.attributes['hide_status'] !== true || (chatParams['id'] && chatParams['hash']) || this.attributes.widgetStatus.value == true) {\n if (this.attributes.widgetStatus.value == true){\n this.controlMode = true;\n var icon = this.cont.getElementById(\"status-icon\");\n helperFunctions.addClass(icon, \"close-status\");\n }\n return ;\n }\n\n }\n }\n\n this.cont.hide();\n }\n\n showUnreadIndicator(number){\n var iconText = number || '!';\n var icon = this.cont.getElementById(\"lhc_status_container\");\n helperFunctions.addClass(icon, \"has-uread-message\");\n\n var iconValue = this.cont.getElementById(\"unread-msg-number\");\n if (iconValue) {\n iconValue.innerText = iconText;\n }\n\n if (this.attributes.storageHandler)\n this.attributes.storageHandler.setSessionStorage(this.attributes['prefixStorage']+'_unr',iconText);\n }\n\n removeUnreadIndicator() {\n var icon = this.cont.getElementById(\"lhc_status_container\");\n helperFunctions.removeClass(icon, \"has-uread-message\");\n if (this.attributes.storageHandler) {\n this.attributes.storageHandler.removeSessionStorage(this.attributes['prefixStorage']+'_unr');\n }\n this.attributes.eventEmitter.emitEvent('remove_unread_indicator', []);\n this.attributes.unread_counter.next(0);\n this.unread_counter = 0;\n }\n\n show () {\n\n if (this.attributes.hideOffline === false) {\n\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n\n if (this.attributes.clinst === true && this.attributes.isMobile == false) {\n if (this.attributes.widgetStatus.value != true) {\n var icon = this.cont.getElementById(\"status-icon\");\n helperFunctions.removeClass(icon, \"close-status\");\n\n this.controlMode = false;\n }\n }\n\n // show status icon only if we are not in api mode or chat is going now\n if (this.attributes['position'] != 'api' || (this.attributes['position'] == 'api' && this.attributes['hide_status'] !== true && chatParams['id'] && chatParams['hash'])) {\n this.cont.show();\n } else if (this.attributes.clinst === true) {\n if (this.attributes.widgetStatus.value != true) {\n this.cont.hide();\n }\n }\n\n } else {\n this.cont.hide();\n }\n }\n}","\nclass chatEventsHandler {\n\n constructor(attr) {\n this.attributes = attr\n }\n\n getJSVarsValues(jsVars) {\n var js_args = {};\n\n if (jsVars.length > 0) {\n\n var currentVar = null;\n\n for (var index in jsVars) {\n try {\n currentVar = eval('window.'+jsVars[index].var);\n if (typeof currentVar !== 'undefined' && currentVar !== null && currentVar !== '') {\n js_args[jsVars[index].id] = currentVar;\n }\n } catch(err) {\n }\n }\n return js_args;\n }\n\n return js_args;\n }\n\n getInitAttributes() {\n let attr = {\n 'onlineStatus' : this.attributes['onlineStatus'].value,\n 'toggleSound' : this.attributes['toggleSound'].value,\n 'widgetStatus' : this.attributes['widgetStatus'].value,\n 'jsVars' : this.getJSVarsValues(this.attributes['jsVars'].value),\n 'isMobile' : this.attributes['isMobile'],\n 'department' : this.attributes['department'],\n 'product' : this.attributes['product'],\n 'theme' : this.attributes['theme'],\n 'theme_v' : this.attributes['theme_v'],\n 'base_url' : this.attributes['base_url'],\n 'mode' : this.attributes['mode'],\n 'captcha' : this.attributes['captcha'],\n 'staticJS' : this.attributes['staticJS'],\n 'static_chat' : this.attributes['userSession'].getSessionAttributes(),\n 'domain_lhc': this.attributes['domain_lhc'],\n 'leave_message': this.attributes['leaveMessage'],\n 'scope_prefix': this.attributes['prefixLowercase']\n };\n\n if (this.attributes['fresh'] == true) {\n if (attr['static_chat']['id']) {\n delete attr['static_chat']['id'];\n }\n\n if (attr['static_chat']['hash']) {\n delete attr['static_chat']['hash'];\n }\n }\n\n if (this.attributes['bot_id'] != '') {\n attr['bot_id'] = this.attributes['bot_id'];\n }\n\n if (this.attributes['trigger_id'] != '') {\n attr['trigger_id'] = this.attributes['trigger_id'];\n }\n \n if (this.attributes['subject_id'] != '') {\n attr['subject_id'] = this.attributes['subject_id'];\n }\n\n if (this.attributes['priority'] != '') {\n attr['priority'] = this.attributes['priority'];\n }\n \n if (this.attributes['phash'] !== null) {\n attr['phash'] = this.attributes['phash'];\n }\n\n if (this.attributes['survey'] !== null) {\n attr['survey'] = this.attributes['survey'];\n }\n\n if (this.attributes['pvhash'] !== null) {\n attr['pvhash'] = this.attributes['pvhash'];\n }\n\n if (this.attributes['operator'] !== null) {\n attr['operator'] = this.attributes['operator'];\n }\n\n if (this.attributes['profile_pic'] !== null) {\n attr['profile_pic'] = this.attributes['profile_pic'];\n }\n\n if (this.attributes['lang'] != '') {\n attr['lang'] = this.attributes['lang'];\n }\n\n if (this.attributes['proactive']['invitation']) {\n attr['proactive'] = this.attributes['proactive'];\n }\n\n if (this.attributes['dep_default'] !== null) {\n attr['dep_default'] = this.attributes['dep_default'];\n }\n\n if (this.attributes.LHCChatOptions && this.attributes.LHCChatOptions.attr) {\n var prefillOptions = this.attributes.LHCChatOptions.attr;\n let fieldsCustom = [];\n prefillOptions.forEach((item, index) => {\n fieldsCustom.push({show : (((typeof item.show != 'undefined' && (item.show == 'on' || item.show == 'off')) ? item.show : 'b')), value : item.value, index : index, name : item.name, \"class\": \"form-control form-control-sm\", 'type' : item.type, 'identifier': ('additional_' + index), 'placeholder' : '', 'width' : (item.size || 6), 'encrypted': (item.encrypted || false), 'required' : (item.req || false), 'label' : item.name});\n });\n\n attr['CUSTOM_FIELDS'] = fieldsCustom;\n }\n\n if (this.attributes.LHCChatOptions && this.attributes.LHCChatOptions.attr_prefill) {\n var prefillOptions = this.attributes.LHCChatOptions.attr_prefill;\n let prefilOptionsList = [];\n prefillOptions.forEach((item) => {\n if (item.name == 'email') {\n prefilOptionsList.push({'Email' : item.value});\n } else if (item.name == 'username') {\n prefilOptionsList.push({'Username' : item.value});\n } else if (item.name == 'phone') {\n prefilOptionsList.push({'Phone' : item.value});\n } else if (item.name == 'question') {\n prefilOptionsList.push({'Question' : item.value});\n }\n })\n prefilOptionsList = prefilOptionsList.concat(this.attributes['userSession'].getPrefillVars());\n attr['attr_prefill'] = prefilOptionsList;\n } else {\n attr['attr_prefill'] = this.attributes['userSession'].getPrefillVars();\n }\n\n if (this.attributes.LHCChatOptions && this.attributes.LHCChatOptions.attr_prefill_admin) {\n var prefillOptions = this.attributes.LHCChatOptions.attr_prefill_admin;\n let prefilOptionsList = [];\n prefillOptions.forEach((item) => {\n prefilOptionsList.push({'value' : item.value, 'index' : item.index});\n })\n attr['attr_prefill_admin'] = prefilOptionsList;\n }\n\n if (this.attributes['userSession'].getSessionReferrer() !== null) {\n attr['ses_ref'] = this.attributes['userSession'].getSessionReferrer()\n }\n\n return attr;\n }\n\n sendChildCommand(command) {\n if (this.attributes.mainWidget.cont.elmDom && this.attributes.mainWidget.cont.elmDom.contentWindow)\n {\n this.attributes.mainWidget.cont.elmDom.contentWindow.postMessage(command, (this.attributes.isIE ? '*' : '/'));\n }\n\n if (this.attributes.popupWidget.cont.elementReferrerPopup && this.attributes.popupWidget.cont.elementReferrerPopup.closed === false)\n {\n this.attributes.popupWidget.cont.elementReferrerPopup.postMessage(command, '*');\n }\n }\n\n sendReadyEvent (popup) {\n\n let args = this.getInitAttributes();\n\n if (!(popup === true) && this.attributes.mainWidget.cont.elmDom && this.attributes.mainWidget.cont.elmDom.contentWindow)\n {\n this.attributes.mainWidget.cont.elmDom.contentWindow.postMessage('lhc_init:' + JSON.stringify(args), (this.attributes.isIE ? '*' : '/'));\n }\n }\n\n sendChildEvent(event, args, type) {\n if (typeof type === 'undefined') {\n type = 'lhc_event';\n }\n this.sendChildCommand(type+':'+event + '::' + JSON.stringify(args));\n }\n}\n\nexport { chatEventsHandler };","\nclass _domEventsHandler {\n constructor() {\n this.events = {}\n }\n\n attachEvent (object, event, callback) {\n var k = this, dispatch = function (b) {\n callback.call(object, k.getEvent(b))\n };\n object.attachEvent(\"on\" + event, dispatch);\n return dispatch\n };\n\n unlisten(eventName) {\n var presentEvent;\n this.events[eventName] && (presentEvent = this.events[eventName], this.events[eventName] = null, this.removeEventHandler(presentEvent.element, presentEvent.eventName, presentEvent.eventListener));\n }\n\n listen(object, event, callback, eventName) {\n var presentEvent;\n if (eventName) {\n this.events[eventName] && (presentEvent = this.events[eventName], this.events[eventName] = null, this.removeEventHandler(presentEvent.element, presentEvent.eventName, presentEvent.eventListener));\n\n if (object.addEventListener) {\n object.addEventListener(event, callback, !1);\n } else if (document.attachEvent) {\n callback = this.attachEvent(object, event, callback);\n } else {\n return null;\n }\n\n this.events[eventName] = {element: object, eventName: event, eventListener: callback};\n\n return callback\n }\n };\n\n removeEventHandler(object, event, listener) {\n document.removeEventListener ? object.removeEventListener(event, listener, !1) : object.detachEvent(\"on\" + event, listener)\n };\n\n getEvent(event) {\n var eventInstance = event || _this.event;\n if (!eventInstance) {\n for (event = this.getEvent.caller; event && (!(eventInstance = event.arguments[0]) || Event != eventInstance.constructor);) {\n event = event.caller\n };\n }\n return eventInstance\n };\n}\n\nconst domEventsHandler = new _domEventsHandler();\nexport { domEventsHandler };","\nexport class monitoredVariable {\n constructor(value, params) {\n this.valueInternal = value;\n this.listeners = [];\n this.params = params || {};\n }\n\n get value() {\n return this.valueInternal;\n }\n\n set value(val) {\n this.next(val);\n }\n\n next(val) {\n this.valueInternal = val;\n this.callListeners();\n }\n\n nextPropertySilent(key, val) {\n this.valueInternal[key] = val;\n }\n\n nextProperty(key, val) {\n this.valueInternal[key] = val;\n this.callListeners();\n }\n\n callListeners() {\n this.listeners.forEach((item) => {\n if (item && typeof item === \"function\") {\n item(this.valueInternal);\n }\n });\n }\n\n unsubscribe(callback) {\n if (this.listeners.indexOf(callback) !== -1) {\n this.listeners.splice(this.listeners.indexOf(callback), 1);\n }\n }\n\n subscribe(callback) {\n this.listeners.push(callback);\n \n if (!this.params['ignore_sub']) {\n callback(this.valueInternal);\n }\n }\n}\n\n","\nexport class storageHandler {\n constructor(global, domain, prefix, cookieEnabled) {\n this.window = global;\n this.cookieEnabled = false;\n\n // Have we checked cookies support\n this.cookiesSupportChecked = false;\n\n // We should try to enable cookie\n if (cookieEnabled == true) {\n this.checkCookiesSupport();\n }\n\n this.domain = domain;\n this.secureCookie = false;\n this.cookiePerPage = false;\n this.prefix = prefix || 'lhc';\n }\n\n checkCookiesSupport() {\n\n if (this.cookiesSupportChecked === true) {\n return this.cookieEnabled;\n }\n\n this.cookiesSupportChecked = true;\n\n try {\n this.hasSessionStorage = !!this.window.sessionStorage;\n } catch (e){\n this.hasSessionStorage = false;\n }\n\n try {\n this.hasLocalStorage = !!this.window.localStorage;\n } catch (e){\n this.hasLocalStorage = false;\n }\n\n try {\n // Create cookie\n document.cookie = 'cookietest=1';\n this.cookieEnabled = document.cookie.indexOf('cookietest=') !== -1;\n // Delete cookie\n document.cookie = 'cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT';\n } catch (e) {\n\n }\n\n return this.cookieEnabled;\n }\n\n setCookieDomain(domain) {\n this.domain = domain;\n }\n\n setCookiePerPage(cookiePerPage) {\n this.cookiePerPage = cookiePerPage;\n }\n\n getCookieDomain() {\n if (this.domain) {\n return '.' + this.domain;\n } else {\n return null;\n }\n }\n\n setSecureCookie(status) {\n this.secureCookie = status;\n }\n\n setHTTPCookie(coookieName, cookieValue, expireTime, domain) {\n if (this.cookieEnabled === false) return ;\n var string = \"\";\n expireTime || (expireTime = new Date, expireTime.setTime(expireTime.getTime() + 15552E6), string = \"; expires=\" + expireTime.toGMTString());\n document.cookie = coookieName + \"=\" + cookieValue + string + (this.cookiePerPage === false ? \"; path=/\" : (this.cookiePerPage === true ? \"\" : '; path=' + this.cookiePerPage)) + (this.secureCookie ? \";secure\" : \"\") + (domain ? \";domain=\" + domain : \"\") + \";SameSite=Lax\";\n };\n\n getHTTPCookie(cookieName) {\n if (this.cookieEnabled === false) return [];\n var b, d, k = [], baseCookie = cookieName + \"=\", e = document.cookie.split(\";\");\n cookieName = 0;\n for (b = e.length; cookieName < b; cookieName++) {\n for (d = e[cookieName]; \" \" === d.charAt(0);) d = d.substring(1, d.length);\n 0 === d.indexOf(baseCookie) && k.push(d.substring(baseCookie.length, d.length))\n }\n\n // Reset duplicate cookies\n if (k.length == 2) {\n let host = (window.location.hostname || document.location.host),\n reset = baseCookie + \"0;expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/\";\n if (host) {\n document.cookie = reset;\n document.cookie = reset + \"; domain=.\" + host;\n }\n }\n\n return k;\n };\n\n setSessionStorage(key, value) {\n if (this.hasSessionStorage && sessionStorage.setItem) try {\n sessionStorage.setItem(key, value)\n } catch (d) {\n }\n }\n\n removeSessionStorage(key) {\n if (this.hasSessionStorage && sessionStorage.removeItem) try {\n sessionStorage.removeItem(key)\n } catch (d) {\n }\n }\n\n getSessionStorage(a) {\n return this.hasSessionStorage && sessionStorage.getItem ?\n sessionStorage.getItem(a) : null\n }\n\n setLocalStorage(key, value) {\n if (this.hasLocalStorage && localStorage.setItem) try {\n localStorage.setItem(key, value)\n } catch (d) {\n }\n }\n\n getLocalStorage(a) {\n return this.hasLocalStorage && localStorage.getItem ?\n localStorage.getItem(a) : null\n }\n\n removeLocalStorage(key) {\n if (this.hasLocalStorage && localStorage.removeItem) try {\n localStorage.removeItem(key)\n } catch (d) {\n }\n }\n\n setSessionReferer(ref) {\n if (!this.getSessionStorage(this.prefix+'_ref')) {\n this.setSessionStorage(this.prefix+'_ref',ref);\n }\n }\n\n getSessionReferrer() {\n return this.getSessionStorage(this.prefix+'_ref');\n }\n\n getSessionInformation() {\n var a;\n this.sessionInformation && (a = this.sessionInformation);\n a || (a = this.getHTTPCookie(this.prefix + \"_per\")[0]);\n return this.parseSessionInformation(a)\n };\n\n getStoreValue(sessionInformation)\n {\n let pairs = [];\n Object.keys(sessionInformation).forEach(key => {\n let value = sessionInformation[key];\n pairs.push(key + '|' + value);\n });\n return pairs.join('|');\n }\n\n storeSessionInformation(sessionInformation) {\n this.setHTTPCookie(this.prefix+\"_per\", this.getStoreValue(sessionInformation), false, this.getCookieDomain());\n this.sessionInformation = sessionInformation;\n };\n\n parseSessionInformation(content) {\n // Check was it stored as our format or JSON.\n if (content && content.indexOf('|') !== -1) {\n let contentReturn = {};\n let parts = content.split('|');\n\n for (var i = 0; i < parts.length / 2; i++) {\n contentReturn[parts[i * 2]] = parts[(i * 2) + 1];\n }\n\n return contentReturn;\n } else {\n if (content) {\n return JSON.parse(unescape(content))\n } else {\n return {};\n }\n }\n\n };\n}\n\n","\nexport class userSession {\n\n constructor() {\n this.vid = null;\n this.hnh = null;\n\n this.attributes = {};\n this.ref = null;\n this.id = null;\n this.hash = null;\n this.jsVars = [];\n this.updateVarsTimeout = null;\n this.JSON = {\n parse: window.JSON && (window.JSON.parse || window.JSON.decode) || String.prototype.evalJSON && function(str){return String(str).evalJSON();} || $.parseJSON || $.evalJSON,\n stringify: Object.toJSON || window.JSON && (window.JSON.stringify || window.JSON.encode) || $.toJSON\n };\n }\n\n setAttributes(attributes) {\n this.attributes = attributes;\n }\n\n setSessionReferrer(ref) {\n this.ref = ref;\n }\n\n getSessionReferrer() {\n return this.ref;\n }\n\n getVID() {\n return this.vid;\n }\n\n setVID(vid) {\n this.vid = vid;\n }\n\n setSessionInformation(params) {\n this.vid = params['vid'] || null;\n this.hnh = params['hnh'] || null;\n this.hash = params['hash'] || null;\n this.id = params['id'] || null;\n }\n\n getSessionAttributes() {\n var attr = {};\n\n if (this.vid !== null) {\n attr['vid'] = this.vid;\n }\n\n if (this.hnh !== null) {\n attr['hnh'] = this.hnh;\n }\n\n if (this.id !== null) {\n attr['id'] = this.id;\n }\n\n if (this.hash !== null) {\n attr['hash'] = this.hash;\n }\n\n return attr\n }\n\n setupVarsMonitoring(jsVars, cb) {\n this.jsVars = jsVars;\n\n // Try to monitor variable if it's lhc_var\n try {\n\n if (this.attributes.lhc_var !== null)\n {\n var validator = {\n set: (obj, prop, value) => {\n // The default behavior to store the value\n obj[prop] = value;\n\n clearTimeout(this.updateVarsTimeout);\n this.updateVarsTimeout = setTimeout( () =>{ this.updateJSVars(obj, cb); },1000);\n\n // Indicate success\n return true;\n }\n };\n\n this.attributes.lhc_var = new Proxy(this.attributes.lhc_var,validator);\n\n // Convert argument or global lhc_var to a reference\n if (this.attributes.LHC_API.args.lhc_var) {\n this.attributes.LHC_API.args.lhc_var = this.attributes.lhc_var;\n } else if (lhc_var) {\n lhc_var = this.attributes.lhc_var;\n }\n\n // Update vars initially\n this.updateJSVars(this.attributes.lhc_var);\n\n } else if (typeof LHCChatOptions !== 'undefined' && typeof LHCChatOptions.attr_prefill !== 'undefined') {\n\n var lhc_var_prefill = {};\n\n LHCChatOptions.attr_prefill.forEach( (item) => {\n if (item.name && item.value) {\n lhc_var_prefill['prefill_'+item.name] = item.value;\n }\n });\n\n var xhr = new XMLHttpRequest();\n xhr.open( \"POST\", this.attributes.LHC_API.args.lhc_base_url + '/chat/updatejsvars' + this.getAppendVariables(), true);\n xhr.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n xhr.send( \"data=\" + encodeURIComponent( this.JSON.stringify(lhc_var_prefill) ) );\n }\n\n } catch(err) {\n console.log(err);\n };\n }\n\n getPrefillVars() {\n let varsReturn = [];\n if (this.jsVars.length > 0) {\n var varsSet = this.getVars();\n for (var jsVarData in this.jsVars) {\n if (this.jsVars[jsVarData].type && varsSet[this.jsVars[jsVarData].id]) {\n var item = {};\n item[this.jsVars[jsVarData].type] = varsSet[this.jsVars[jsVarData].id];\n varsReturn.push(item);\n }\n }\n }\n return varsReturn;\n }\n\n getVars() {\n if (this.jsVars.length > 0) {\n var js_args = {};\n var currentVar = null;\n\n for (var index in this.jsVars) {\n try {\n\n if (this.jsVars[index].var.indexOf('lhc_var.') !== -1) {\n currentVar = this.attributes.lhc_var[this.jsVars[index].var.replace('lhc_var.','')] || null;\n } else {\n currentVar = eval(this.jsVars[index].var);\n }\n\n if (typeof currentVar !== 'undefined' && currentVar !== null && currentVar !== '') {\n js_args[this.jsVars[index].id] = currentVar;\n }\n } catch(err) {\n\n }\n }\n\n return js_args;\n }\n return null;\n }\n\n getAppendVariables(){\n var append = '';\n\n if (this.vid !== null) {\n append = append + '/(vid)/' + this.vid ;\n }\n\n if (this.hash !== null && this.id !== null) {\n append = append + '/(hash)/' + this.id + '_' + this.hash;\n }\n\n return append;\n }\n\n updateJSVars(vars, cb) {\n\n let varsJSON = this.getVars(vars);\n\n var xhr = new XMLHttpRequest();\n xhr.open( \"POST\", this.attributes.LHC_API.args.lhc_base_url + '/chat/updatejsvars' + this.getAppendVariables(), true);\n xhr.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n xhr.send( \"data=\" + encodeURIComponent( this.JSON.stringify(varsJSON) ) );\n\n if (typeof cb !== 'undefined' && this.hash === null && this.id === null) {\n cb(varsJSON, this.getPrefillVars());\n }\n }\n\n setChatInformation(data, alwaysPersistentNeedHelp) {\n this.id = data.id;\n this.hash = data.hash;\n // Hide only chat starts otherwise don't touch it.\n if (this.id !== null && !alwaysPersistentNeedHelp) {\n this.hnh = Math.round(Date.now() / 1000);\n }\n }\n\n}","var appleIphone = /iPhone/i;\nvar appleIpod = /iPod/i;\nvar appleTablet = /iPad/i;\nvar appleUniversal = /\\biOS-universal(?:.+)Mac\\b/i;\nvar androidPhone = /\\bAndroid(?:.+)Mobile\\b/i;\nvar androidTablet = /Android/i;\nvar amazonPhone = /(?:SD4930UR|\\bSilk(?:.+)Mobile\\b)/i;\nvar amazonTablet = /Silk/i;\nvar windowsPhone = /Windows Phone/i;\nvar windowsTablet = /\\bWindows(?:.+)ARM\\b/i;\nvar otherBlackBerry = /BlackBerry/i;\nvar otherBlackBerry10 = /BB10/i;\nvar otherOpera = /Opera Mini/i;\nvar otherChrome = /\\b(CriOS|Chrome)(?:.+)Mobile/i;\nvar otherFirefox = /Mobile(?:.+)Firefox\\b/i;\nvar isAppleTabletOnIos13 = function (navigator) {\n return (typeof navigator !== 'undefined' &&\n navigator.platform === 'MacIntel' &&\n typeof navigator.maxTouchPoints === 'number' &&\n navigator.maxTouchPoints > 1 &&\n typeof MSStream === 'undefined');\n};\nfunction createMatch(userAgent) {\n return function (regex) { return regex.test(userAgent); };\n}\nexport default function isMobile(param) {\n var nav = {\n userAgent: '',\n platform: '',\n maxTouchPoints: 0\n };\n if (!param && typeof navigator !== 'undefined') {\n nav = {\n userAgent: navigator.userAgent,\n platform: navigator.platform,\n maxTouchPoints: navigator.maxTouchPoints || 0\n };\n }\n else if (typeof param === 'string') {\n nav.userAgent = param;\n }\n else if (param && param.userAgent) {\n nav = {\n userAgent: param.userAgent,\n platform: param.platform,\n maxTouchPoints: param.maxTouchPoints || 0\n };\n }\n var userAgent = nav.userAgent;\n var tmp = userAgent.split('[FBAN');\n if (typeof tmp[1] !== 'undefined') {\n userAgent = tmp[0];\n }\n tmp = userAgent.split('Twitter');\n if (typeof tmp[1] !== 'undefined') {\n userAgent = tmp[0];\n }\n var match = createMatch(userAgent);\n var result = {\n apple: {\n phone: match(appleIphone) && !match(windowsPhone),\n ipod: match(appleIpod),\n tablet: !match(appleIphone) &&\n (match(appleTablet) || isAppleTabletOnIos13(nav)) &&\n !match(windowsPhone),\n universal: match(appleUniversal),\n device: (match(appleIphone) ||\n match(appleIpod) ||\n match(appleTablet) ||\n match(appleUniversal) ||\n isAppleTabletOnIos13(nav)) &&\n !match(windowsPhone)\n },\n amazon: {\n phone: match(amazonPhone),\n tablet: !match(amazonPhone) && match(amazonTablet),\n device: match(amazonPhone) || match(amazonTablet)\n },\n android: {\n phone: (!match(windowsPhone) && match(amazonPhone)) ||\n (!match(windowsPhone) && match(androidPhone)),\n tablet: !match(windowsPhone) &&\n !match(amazonPhone) &&\n !match(androidPhone) &&\n (match(amazonTablet) || match(androidTablet)),\n device: (!match(windowsPhone) &&\n (match(amazonPhone) ||\n match(amazonTablet) ||\n match(androidPhone) ||\n match(androidTablet))) ||\n match(/\\bokhttp\\b/i)\n },\n windows: {\n phone: match(windowsPhone),\n tablet: match(windowsTablet),\n device: match(windowsPhone) || match(windowsTablet)\n },\n other: {\n blackberry: match(otherBlackBerry),\n blackberry10: match(otherBlackBerry10),\n opera: match(otherOpera),\n firefox: match(otherFirefox),\n chrome: match(otherChrome),\n device: match(otherBlackBerry) ||\n match(otherBlackBerry10) ||\n match(otherOpera) ||\n match(otherFirefox) ||\n match(otherChrome)\n },\n any: false,\n phone: false,\n tablet: false\n };\n result.any =\n result.apple.device ||\n result.android.device ||\n result.windows.device ||\n result.other.device;\n result.phone =\n result.apple.phone || result.android.phone || result.windows.phone;\n result.tablet =\n result.apple.tablet || result.android.tablet || result.windows.tablet;\n return result;\n}\n//# sourceMappingURL=isMobile.js.map","'use strict';\n\nmodule.exports = require('./lib')\n","'use strict';\n\nvar asap = require('asap/raw');\n\nfunction noop() {}\n\n// States:\n//\n// 0 - pending\n// 1 - fulfilled with _value\n// 2 - rejected with _value\n// 3 - adopted the state of another promise, _value\n//\n// once the state is no longer pending (0) it is immutable\n\n// All `_` prefixed properties will be reduced to `_{random number}`\n// at build time to obfuscate them and discourage their use.\n// We don't use symbols or Object.defineProperty to fully hide them\n// because the performance isn't good enough.\n\n\n// to avoid using try/catch inside critical functions, we\n// extract them to here.\nvar LAST_ERROR = null;\nvar IS_ERROR = {};\nfunction getThen(obj) {\n try {\n return obj.then;\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nfunction tryCallOne(fn, a) {\n try {\n return fn(a);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\nfunction tryCallTwo(fn, a, b) {\n try {\n fn(a, b);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nmodule.exports = Promise;\n\nfunction Promise(fn) {\n if (typeof this !== 'object') {\n throw new TypeError('Promises must be constructed via new');\n }\n if (typeof fn !== 'function') {\n throw new TypeError('Promise constructor\\'s argument is not a function');\n }\n this._U = 0;\n this._V = 0;\n this._W = null;\n this._X = null;\n if (fn === noop) return;\n doResolve(fn, this);\n}\nPromise._Y = null;\nPromise._Z = null;\nPromise._0 = noop;\n\nPromise.prototype.then = function(onFulfilled, onRejected) {\n if (this.constructor !== Promise) {\n return safeThen(this, onFulfilled, onRejected);\n }\n var res = new Promise(noop);\n handle(this, new Handler(onFulfilled, onRejected, res));\n return res;\n};\n\nfunction safeThen(self, onFulfilled, onRejected) {\n return new self.constructor(function (resolve, reject) {\n var res = new Promise(noop);\n res.then(resolve, reject);\n handle(self, new Handler(onFulfilled, onRejected, res));\n });\n}\nfunction handle(self, deferred) {\n while (self._V === 3) {\n self = self._W;\n }\n if (Promise._Y) {\n Promise._Y(self);\n }\n if (self._V === 0) {\n if (self._U === 0) {\n self._U = 1;\n self._X = deferred;\n return;\n }\n if (self._U === 1) {\n self._U = 2;\n self._X = [self._X, deferred];\n return;\n }\n self._X.push(deferred);\n return;\n }\n handleResolved(self, deferred);\n}\n\nfunction handleResolved(self, deferred) {\n asap(function() {\n var cb = self._V === 1 ? deferred.onFulfilled : deferred.onRejected;\n if (cb === null) {\n if (self._V === 1) {\n resolve(deferred.promise, self._W);\n } else {\n reject(deferred.promise, self._W);\n }\n return;\n }\n var ret = tryCallOne(cb, self._W);\n if (ret === IS_ERROR) {\n reject(deferred.promise, LAST_ERROR);\n } else {\n resolve(deferred.promise, ret);\n }\n });\n}\nfunction resolve(self, newValue) {\n // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n if (newValue === self) {\n return reject(\n self,\n new TypeError('A promise cannot be resolved with itself.')\n );\n }\n if (\n newValue &&\n (typeof newValue === 'object' || typeof newValue === 'function')\n ) {\n var then = getThen(newValue);\n if (then === IS_ERROR) {\n return reject(self, LAST_ERROR);\n }\n if (\n then === self.then &&\n newValue instanceof Promise\n ) {\n self._V = 3;\n self._W = newValue;\n finale(self);\n return;\n } else if (typeof then === 'function') {\n doResolve(then.bind(newValue), self);\n return;\n }\n }\n self._V = 1;\n self._W = newValue;\n finale(self);\n}\n\nfunction reject(self, newValue) {\n self._V = 2;\n self._W = newValue;\n if (Promise._Z) {\n Promise._Z(self, newValue);\n }\n finale(self);\n}\nfunction finale(self) {\n if (self._U === 1) {\n handle(self, self._X);\n self._X = null;\n }\n if (self._U === 2) {\n for (var i = 0; i < self._X.length; i++) {\n handle(self, self._X[i]);\n }\n self._X = null;\n }\n}\n\nfunction Handler(onFulfilled, onRejected, promise){\n this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n this.promise = promise;\n}\n\n/**\n * Take a potentially misbehaving resolver function and make sure\n * onFulfilled and onRejected are only called once.\n *\n * Makes no guarantees about asynchrony.\n */\nfunction doResolve(fn, promise) {\n var done = false;\n var res = tryCallTwo(fn, function (value) {\n if (done) return;\n done = true;\n resolve(promise, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(promise, reason);\n });\n if (!done && res === IS_ERROR) {\n done = true;\n reject(promise, LAST_ERROR);\n }\n}\n","'use strict';\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\nPromise.prototype.done = function (onFulfilled, onRejected) {\n var self = arguments.length ? this.then.apply(this, arguments) : this;\n self.then(null, function (err) {\n setTimeout(function () {\n throw err;\n }, 0);\n });\n};\n","'use strict';\n\n//This file contains the ES6 extensions to the core Promises/A+ API\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\n\n/* Static Functions */\n\nvar TRUE = valuePromise(true);\nvar FALSE = valuePromise(false);\nvar NULL = valuePromise(null);\nvar UNDEFINED = valuePromise(undefined);\nvar ZERO = valuePromise(0);\nvar EMPTYSTRING = valuePromise('');\n\nfunction valuePromise(value) {\n var p = new Promise(Promise._0);\n p._V = 1;\n p._W = value;\n return p;\n}\nPromise.resolve = function (value) {\n if (value instanceof Promise) return value;\n\n if (value === null) return NULL;\n if (value === undefined) return UNDEFINED;\n if (value === true) return TRUE;\n if (value === false) return FALSE;\n if (value === 0) return ZERO;\n if (value === '') return EMPTYSTRING;\n\n if (typeof value === 'object' || typeof value === 'function') {\n try {\n var then = value.then;\n if (typeof then === 'function') {\n return new Promise(then.bind(value));\n }\n } catch (ex) {\n return new Promise(function (resolve, reject) {\n reject(ex);\n });\n }\n }\n return valuePromise(value);\n};\n\nvar iterableToArray = function (iterable) {\n if (typeof Array.from === 'function') {\n // ES2015+, iterables exist\n iterableToArray = Array.from;\n return Array.from(iterable);\n }\n\n // ES5, only arrays and array-likes exist\n iterableToArray = function (x) { return Array.prototype.slice.call(x); };\n return Array.prototype.slice.call(iterable);\n}\n\nPromise.all = function (arr) {\n var args = iterableToArray(arr);\n\n return new Promise(function (resolve, reject) {\n if (args.length === 0) return resolve([]);\n var remaining = args.length;\n function res(i, val) {\n if (val && (typeof val === 'object' || typeof val === 'function')) {\n if (val instanceof Promise && val.then === Promise.prototype.then) {\n while (val._V === 3) {\n val = val._W;\n }\n if (val._V === 1) return res(i, val._W);\n if (val._V === 2) reject(val._W);\n val.then(function (val) {\n res(i, val);\n }, reject);\n return;\n } else {\n var then = val.then;\n if (typeof then === 'function') {\n var p = new Promise(then.bind(val));\n p.then(function (val) {\n res(i, val);\n }, reject);\n return;\n }\n }\n }\n args[i] = val;\n if (--remaining === 0) {\n resolve(args);\n }\n }\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n};\n\nPromise.reject = function (value) {\n return new Promise(function (resolve, reject) {\n reject(value);\n });\n};\n\nPromise.race = function (values) {\n return new Promise(function (resolve, reject) {\n iterableToArray(values).forEach(function(value){\n Promise.resolve(value).then(resolve, reject);\n });\n });\n};\n\n/* Prototype Methods */\n\nPromise.prototype['catch'] = function (onRejected) {\n return this.then(null, onRejected);\n};\n","'use strict';\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\nPromise.prototype.finally = function (f) {\n return this.then(function (value) {\n return Promise.resolve(f()).then(function () {\n return value;\n });\n }, function (err) {\n return Promise.resolve(f()).then(function () {\n throw err;\n });\n });\n};\n","'use strict';\n\nmodule.exports = require('./core.js');\nrequire('./done.js');\nrequire('./finally.js');\nrequire('./es6-extensions.js');\nrequire('./node-extensions.js');\nrequire('./synchronous.js');\n","'use strict';\n\n// This file contains then/promise specific extensions that are only useful\n// for node.js interop\n\nvar Promise = require('./core.js');\nvar asap = require('asap');\n\nmodule.exports = Promise;\n\n/* Static Functions */\n\nPromise.denodeify = function (fn, argumentCount) {\n if (\n typeof argumentCount === 'number' && argumentCount !== Infinity\n ) {\n return denodeifyWithCount(fn, argumentCount);\n } else {\n return denodeifyWithoutCount(fn);\n }\n};\n\nvar callbackFn = (\n 'function (err, res) {' +\n 'if (err) { rj(err); } else { rs(res); }' +\n '}'\n);\nfunction denodeifyWithCount(fn, argumentCount) {\n var args = [];\n for (var i = 0; i < argumentCount; i++) {\n args.push('a' + i);\n }\n var body = [\n 'return function (' + args.join(',') + ') {',\n 'var self = this;',\n 'return new Promise(function (rs, rj) {',\n 'var res = fn.call(',\n ['self'].concat(args).concat([callbackFn]).join(','),\n ');',\n 'if (res &&',\n '(typeof res === \"object\" || typeof res === \"function\") &&',\n 'typeof res.then === \"function\"',\n ') {rs(res);}',\n '});',\n '};'\n ].join('');\n return Function(['Promise', 'fn'], body)(Promise, fn);\n}\nfunction denodeifyWithoutCount(fn) {\n var fnLength = Math.max(fn.length - 1, 3);\n var args = [];\n for (var i = 0; i < fnLength; i++) {\n args.push('a' + i);\n }\n var body = [\n 'return function (' + args.join(',') + ') {',\n 'var self = this;',\n 'var args;',\n 'var argLength = arguments.length;',\n 'if (arguments.length > ' + fnLength + ') {',\n 'args = new Array(arguments.length + 1);',\n 'for (var i = 0; i < arguments.length; i++) {',\n 'args[i] = arguments[i];',\n '}',\n '}',\n 'return new Promise(function (rs, rj) {',\n 'var cb = ' + callbackFn + ';',\n 'var res;',\n 'switch (argLength) {',\n args.concat(['extra']).map(function (_, index) {\n return (\n 'case ' + (index) + ':' +\n 'res = fn.call(' + ['self'].concat(args.slice(0, index)).concat('cb').join(',') + ');' +\n 'break;'\n );\n }).join(''),\n 'default:',\n 'args[argLength] = cb;',\n 'res = fn.apply(self, args);',\n '}',\n \n 'if (res &&',\n '(typeof res === \"object\" || typeof res === \"function\") &&',\n 'typeof res.then === \"function\"',\n ') {rs(res);}',\n '});',\n '};'\n ].join('');\n\n return Function(\n ['Promise', 'fn'],\n body\n )(Promise, fn);\n}\n\nPromise.nodeify = function (fn) {\n return function () {\n var args = Array.prototype.slice.call(arguments);\n var callback =\n typeof args[args.length - 1] === 'function' ? args.pop() : null;\n var ctx = this;\n try {\n return fn.apply(this, arguments).nodeify(callback, ctx);\n } catch (ex) {\n if (callback === null || typeof callback == 'undefined') {\n return new Promise(function (resolve, reject) {\n reject(ex);\n });\n } else {\n asap(function () {\n callback.call(ctx, ex);\n })\n }\n }\n }\n};\n\nPromise.prototype.nodeify = function (callback, ctx) {\n if (typeof callback != 'function') return this;\n\n this.then(function (value) {\n asap(function () {\n callback.call(ctx, null, value);\n });\n }, function (err) {\n asap(function () {\n callback.call(ctx, err);\n });\n });\n};\n","'use strict';\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\nPromise.enableSynchronous = function () {\n Promise.prototype.isPending = function() {\n return this.getState() == 0;\n };\n\n Promise.prototype.isFulfilled = function() {\n return this.getState() == 1;\n };\n\n Promise.prototype.isRejected = function() {\n return this.getState() == 2;\n };\n\n Promise.prototype.getValue = function () {\n if (this._V === 3) {\n return this._W.getValue();\n }\n\n if (!this.isFulfilled()) {\n throw new Error('Cannot get a value of an unfulfilled promise.');\n }\n\n return this._W;\n };\n\n Promise.prototype.getReason = function () {\n if (this._V === 3) {\n return this._W.getReason();\n }\n\n if (!this.isRejected()) {\n throw new Error('Cannot get a rejection reason of a non-rejected promise.');\n }\n\n return this._W;\n };\n\n Promise.prototype.getState = function () {\n if (this._V === 3) {\n return this._W.getState();\n }\n if (this._V === -1 || this._V === -2) {\n return 0;\n }\n\n return this._V;\n };\n};\n\nPromise.disableSynchronous = function() {\n Promise.prototype.isPending = undefined;\n Promise.prototype.isFulfilled = undefined;\n Promise.prototype.isRejected = undefined;\n Promise.prototype.getValue = undefined;\n Promise.prototype.getReason = undefined;\n Promise.prototype.getState = undefined;\n};\n","/*!\n * EventEmitter v5.2.9 - git.io/ee\n * Unlicense - http://unlicense.org/\n * Oliver Caldwell - https://oli.me.uk/\n * @preserve\n */\n\n;(function (exports) {\n 'use strict';\n\n /**\n * Class for managing events.\n * Can be extended to provide event functionality in other classes.\n *\n * @class EventEmitter Manages event registering and emitting.\n */\n function EventEmitter() {}\n\n // Shortcuts to improve speed and size\n var proto = EventEmitter.prototype;\n var originalGlobalValue = exports.EventEmitter;\n\n /**\n * Finds the index of the listener for the event in its storage array.\n *\n * @param {Function[]} listeners Array of listeners to search through.\n * @param {Function} listener Method to look for.\n * @return {Number} Index of the specified listener, -1 if not found\n * @api private\n */\n function indexOfListener(listeners, listener) {\n var i = listeners.length;\n while (i--) {\n if (listeners[i].listener === listener) {\n return i;\n }\n }\n\n return -1;\n }\n\n /**\n * Alias a method while keeping the context correct, to allow for overwriting of target method.\n *\n * @param {String} name The name of the target method.\n * @return {Function} The aliased method\n * @api private\n */\n function alias(name) {\n return function aliasClosure() {\n return this[name].apply(this, arguments);\n };\n }\n\n /**\n * Returns the listener array for the specified event.\n * Will initialise the event object and listener arrays if required.\n * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them.\n * Each property in the object response is an array of listener functions.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Function[]|Object} All listener functions for the event.\n */\n proto.getListeners = function getListeners(evt) {\n var events = this._getEvents();\n var response;\n var key;\n\n // Return a concatenated array of all matching events if\n // the selector is a regular expression.\n if (evt instanceof RegExp) {\n response = {};\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n response[key] = events[key];\n }\n }\n }\n else {\n response = events[evt] || (events[evt] = []);\n }\n\n return response;\n };\n\n /**\n * Takes a list of listener objects and flattens it into a list of listener functions.\n *\n * @param {Object[]} listeners Raw listener objects.\n * @return {Function[]} Just the listener functions.\n */\n proto.flattenListeners = function flattenListeners(listeners) {\n var flatListeners = [];\n var i;\n\n for (i = 0; i < listeners.length; i += 1) {\n flatListeners.push(listeners[i].listener);\n }\n\n return flatListeners;\n };\n\n /**\n * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Object} All listener functions for an event in an object.\n */\n proto.getListenersAsObject = function getListenersAsObject(evt) {\n var listeners = this.getListeners(evt);\n var response;\n\n if (listeners instanceof Array) {\n response = {};\n response[evt] = listeners;\n }\n\n return response || listeners;\n };\n\n function isValidListener (listener) {\n if (typeof listener === 'function' || listener instanceof RegExp) {\n return true\n } else if (listener && typeof listener === 'object') {\n return isValidListener(listener.listener)\n } else {\n return false\n }\n }\n\n /**\n * Adds a listener function to the specified event.\n * The listener will not be added if it is a duplicate.\n * If the listener returns true then it will be removed after it is called.\n * If you pass a regular expression as the event name then the listener will be added to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListener = function addListener(evt, listener) {\n if (!isValidListener(listener)) {\n throw new TypeError('listener must be a function');\n }\n\n var listeners = this.getListenersAsObject(evt);\n var listenerIsWrapped = typeof listener === 'object';\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) {\n listeners[key].push(listenerIsWrapped ? listener : {\n listener: listener,\n once: false\n });\n }\n }\n\n return this;\n };\n\n /**\n * Alias of addListener\n */\n proto.on = alias('addListener');\n\n /**\n * Semi-alias of addListener. It will add a listener that will be\n * automatically removed after its first execution.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addOnceListener = function addOnceListener(evt, listener) {\n return this.addListener(evt, {\n listener: listener,\n once: true\n });\n };\n\n /**\n * Alias of addOnceListener.\n */\n proto.once = alias('addOnceListener');\n\n /**\n * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad.\n * You need to tell it what event names should be matched by a regex.\n *\n * @param {String} evt Name of the event to create.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvent = function defineEvent(evt) {\n this.getListeners(evt);\n return this;\n };\n\n /**\n * Uses defineEvent to define multiple events.\n *\n * @param {String[]} evts An array of event names to define.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvents = function defineEvents(evts) {\n for (var i = 0; i < evts.length; i += 1) {\n this.defineEvent(evts[i]);\n }\n return this;\n };\n\n /**\n * Removes a listener function from the specified event.\n * When passed a regular expression as the event name, it will remove the listener from all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to remove the listener from.\n * @param {Function} listener Method to remove from the event.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListener = function removeListener(evt, listener) {\n var listeners = this.getListenersAsObject(evt);\n var index;\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key)) {\n index = indexOfListener(listeners[key], listener);\n\n if (index !== -1) {\n listeners[key].splice(index, 1);\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of removeListener\n */\n proto.off = alias('removeListener');\n\n /**\n * Adds listeners in bulk using the manipulateListeners method.\n * If you pass an object as the first argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added.\n * You can also pass it a regular expression to add the array of listeners to all events that match it.\n * Yeah, this function does quite a bit. That's probably a bad thing.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListeners = function addListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(false, evt, listeners);\n };\n\n /**\n * Removes listeners in bulk using the manipulateListeners method.\n * If you pass an object as the first argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be removed.\n * You can also pass it a regular expression to remove the listeners from all events that match it.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListeners = function removeListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(true, evt, listeners);\n };\n\n /**\n * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level.\n * The first argument will determine if the listeners are removed (true) or added (false).\n * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be added/removed.\n * You can also pass it a regular expression to manipulate the listeners of all events that match it.\n *\n * @param {Boolean} remove True if you want to remove listeners, false if you want to add.\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add/remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) {\n var i;\n var value;\n var single = remove ? this.removeListener : this.addListener;\n var multiple = remove ? this.removeListeners : this.addListeners;\n\n // If evt is an object then pass each of its properties to this method\n if (typeof evt === 'object' && !(evt instanceof RegExp)) {\n for (i in evt) {\n if (evt.hasOwnProperty(i) && (value = evt[i])) {\n // Pass the single listener straight through to the singular method\n if (typeof value === 'function') {\n single.call(this, i, value);\n }\n else {\n // Otherwise pass back to the multiple function\n multiple.call(this, i, value);\n }\n }\n }\n }\n else {\n // So evt must be a string\n // And listeners must be an array of listeners\n // Loop over it and pass each one to the multiple method\n i = listeners.length;\n while (i--) {\n single.call(this, evt, listeners[i]);\n }\n }\n\n return this;\n };\n\n /**\n * Removes all listeners from a specified event.\n * If you do not specify an event then all listeners will be removed.\n * That means every event will be emptied.\n * You can also pass a regex to remove all events that match it.\n *\n * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeEvent = function removeEvent(evt) {\n var type = typeof evt;\n var events = this._getEvents();\n var key;\n\n // Remove different things depending on the state of evt\n if (type === 'string') {\n // Remove all listeners for the specified event\n delete events[evt];\n }\n else if (evt instanceof RegExp) {\n // Remove all events matching the regex.\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n delete events[key];\n }\n }\n }\n else {\n // Remove all listeners in all events\n delete this._events;\n }\n\n return this;\n };\n\n /**\n * Alias of removeEvent.\n *\n * Added to mirror the node API.\n */\n proto.removeAllListeners = alias('removeEvent');\n\n /**\n * Emits an event of your choice.\n * When emitted, every listener attached to that event will be executed.\n * If you pass the optional argument array then those arguments will be passed to every listener upon execution.\n * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately.\n * So they will not arrive within the array on the other side, they will be separate.\n * You can also pass a regular expression to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {Array} [args] Optional array of arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emitEvent = function emitEvent(evt, args) {\n var listenersMap = this.getListenersAsObject(evt);\n var listeners;\n var listener;\n var i;\n var key;\n var response;\n\n for (key in listenersMap) {\n if (listenersMap.hasOwnProperty(key)) {\n listeners = listenersMap[key].slice(0);\n\n for (i = 0; i < listeners.length; i++) {\n // If the listener returns true then it shall be removed from the event\n // The function is executed either with a basic call or an apply if there is an args array\n listener = listeners[i];\n\n if (listener.once === true) {\n this.removeListener(evt, listener.listener);\n }\n\n response = listener.listener.apply(this, args || []);\n\n if (response === this._getOnceReturnValue()) {\n this.removeListener(evt, listener.listener);\n }\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of emitEvent\n */\n proto.trigger = alias('emitEvent');\n\n /**\n * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on.\n * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {...*} Optional additional arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emit = function emit(evt) {\n var args = Array.prototype.slice.call(arguments, 1);\n return this.emitEvent(evt, args);\n };\n\n /**\n * Sets the current value to check against when executing listeners. If a\n * listeners return value matches the one set here then it will be removed\n * after execution. This value defaults to true.\n *\n * @param {*} value The new value to check for when executing listeners.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.setOnceReturnValue = function setOnceReturnValue(value) {\n this._onceReturnValue = value;\n return this;\n };\n\n /**\n * Fetches the current value to check against when executing listeners. If\n * the listeners return value matches this one then it should be removed\n * automatically. It will return true by default.\n *\n * @return {*|Boolean} The current value to check for or the default, true.\n * @api private\n */\n proto._getOnceReturnValue = function _getOnceReturnValue() {\n if (this.hasOwnProperty('_onceReturnValue')) {\n return this._onceReturnValue;\n }\n else {\n return true;\n }\n };\n\n /**\n * Fetches the events object and creates one if required.\n *\n * @return {Object} The events storage object.\n * @api private\n */\n proto._getEvents = function _getEvents() {\n return this._events || (this._events = {});\n };\n\n /**\n * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version.\n *\n * @return {Function} Non conflicting EventEmitter class.\n */\n EventEmitter.noConflict = function noConflict() {\n exports.EventEmitter = originalGlobalValue;\n return EventEmitter;\n };\n\n // Expose the class either via AMD, CommonJS or the global object\n if (typeof define === 'function' && define.amd) {\n define(function () {\n return EventEmitter;\n });\n }\n else if (typeof module === 'object' && module.exports){\n module.exports = EventEmitter;\n }\n else {\n exports.EventEmitter = EventEmitter;\n }\n}(typeof window !== 'undefined' ? window : this || {}));\n","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var inProgress = {};\nvar dataWebpackPrefix = \"LiveHelperChat:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = function(url, done, key, chunkId) {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\t\tscript.src = url;\n\t\tif (script.src.indexOf(window.location.origin + '/') !== 0) {\n\t\t\tscript.crossOrigin = \"anonymous\";\n\t\t}\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = function(prev, event) {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach(function(fn) { return fn(event); });\n\t\tif(prev) return prev(event);\n\t}\n\t;\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = function(chunkId) {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce(function(promises, key) {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = function(chunkId) {\n\t// return url for filenames based on template\n\treturn \"\" + {\"8\":\"6d3de043cfb6e40e6a85\",\"81\":\"75d1d932aa8416f0bf23\",\"213\":\"82d024432640e184cab5\",\"335\":\"94e75bc034e279cb1a5d\",\"398\":\"16da6b6586a6fd6028ae\",\"417\":\"507f464a966a8359428a\",\"530\":\"6b5f759b84269b244c78\",\"783\":\"a68fc3eccb8af7392e9f\",\"821\":\"a5b21cc17552b167a2f1\"}[chunkId] + \".js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.p = \"./\";","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t179: 0\n};\n\n__webpack_require__.f.j = function(chunkId, promises) {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise(function(resolve, reject) { installedChunkData = installedChunks[chunkId] = [resolve, reject]; });\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = function(event) {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkIds[i]] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkLiveHelperChat\"] = self[\"webpackChunkLiveHelperChat\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","(function (global) {\n\n var currentScript = document.currentScript || (function() {\n var scripts = document.getElementsByTagName('script');\n return scripts[scripts.length - 1];\n })();\n\n var scopeScript = currentScript.getAttribute('scope') || 'LHC';\n\n if (/google|baidu|bing|msn|duckduckbot|teoma|slurp|yandex|Chrome-Lighthouse/i.test(navigator.userAgent)) {\n return;\n }\n\n if (!global[scopeScript+'_API']) {\n if (global['LHC_API']) {\n global[scopeScript+'_API'] = global['LHC_API'];\n } else {\n return;\n }\n }\n\n var lhcError = {\n log : function(message, filename, lineNumber, stack, column) {\n var e;\n e = {};\n e.message = message || \"\";\n e.message += \"\\n\" + global.navigator.userAgent;\n e.location = location && location.href ? location.href : \"\";\n e.file = filename || \"\";\n e.line = lineNumber || \"\";\n e.column = column || \"\";\n e.stack = stack ? JSON.stringify(stack) : \"\";\n e.stack = e.stack.replace(/(\\r\\n|\\n|\\r)/gm, \"\");\n var xhr = new XMLHttpRequest();\n xhr.open( \"POST\", global[scopeScript+'_API']['args']['lhc_base_url'] + 'audit/logjserror', true);\n xhr.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n xhr.send( \"data=\" + encodeURIComponent( JSON.stringify(e) ) );\n }\n }\n\n try {\n\n window.addEventListener('error', function (e) {\n if (lhcError && e.filename.indexOf(global[scopeScript+'_API']['args']['lhc_base_url'].replace('index.php/')) !== -1) {\n lhcError.log(e.message, e.filename, e.lineNumber || e.lineno, e.error.stack, e.colno);\n }\n })\n\n global['$_' + scopeScript + '_Instance'] = null;\n global['$_' + scopeScript + '_Debug'] = false;\n global['$_' + scopeScript] = global['$_' + scopeScript] || {};\n\n (function (lhc, LHC_API) {\n\n lhc.loaded = false;\n lhc.connected = false;\n lhc.ready = false;\n lhc.version = 207;\n\n const isMobileItem = require('ismobilejs');\n var isMobile = isMobileItem.default(global.navigator.userAgent).phone;\n\n lhc.isMobile = isMobile;\n\n var init = () => {\n\n if (!global.Promise) {\n global.Promise = require('promise');\n }\n\n var BehaviorSubject = require('./util/monitoredVariable').monitoredVariable;\n var EventEmitter = require('wolfy87-eventemitter');\n\n var statusWidget = require('./lib/widgets/statusWidget').statusWidget;\n var mainWidget = require('./lib/widgets/mainWidget').mainWidget;\n var mainWidgetPopup = require('./lib/widgets/mainWidgetPopup').mainWidgetPopup;\n var containerChat = require('./lib/widgets/containerChat').containerChat;\n var helperFunctions = require('./lib/helperFunctions').helperFunctions;\n var userSession = require('./util/userSession').userSession;\n var storageHandler = require('./util/storageHandler').storageHandler;\n var chatNotifications = require('./lib/chatNotifications').chatNotifications;\n var chatEventsHandler = require('./util/chatEventsHandler').chatEventsHandler;\n\n LHC_API.args = LHC_API.args || {};\n\n if (typeof LHC_API.args.mobile_view !== 'undefined') {\n lhc.isMobile = isMobile = LHC_API.args.mobile_view;\n }\n\n const prefixLowercase = scopeScript.toLowerCase();\n const prefixStorage = (prefixLowercase && LHC_API.args.scope_storage ? prefixLowercase : 'lhc');\n const cookieEnabledUser = typeof LHC_API.args.cookie_enabled !== 'undefined' ? LHC_API.args.cookie_enabled : true;\n const userMode = LHC_API.args.mode || 'widget';\n\n var storageHandler = new storageHandler(global, LHC_API.args.domain || null, prefixStorage, cookieEnabledUser);\n\n // Cookies are disabled and it's required for us to work. So switch to mode where cookies are not required\n if (storageHandler.cookieEnabled === false && userMode == 'widget') {\n LHC_API.args.orig = {}\n LHC_API.args.orig.mode = LHC_API.args.mode;\n LHC_API.args.orig.proactive = LHC_API.args.proactive;\n LHC_API.args.orig.check_messages = LHC_API.args.check_messages;\n\n LHC_API.args.mode = 'popup';\n LHC_API.args.proactive = false;\n LHC_API.args.check_messages = false;\n }\n\n if (LHC_API.args.cookie_per_page) {\n storageHandler.setCookiePerPage(LHC_API.args.cookie_per_page);\n }\n\n var referrer = (document.referrer) ? document.referrer.substr(document.referrer.indexOf('://') + 1) : '';\n var location = (document.location) ? encodeURIComponent(window.location.href.substring(window.location.protocol.length)) : '';\n\n storageHandler.setSessionReferer(referrer);\n\n referrer = referrer ? encodeURIComponent(referrer) : '';\n\n var languageOverride = '';\n\n if (storageHandler.getLocalStorage(prefixStorage+'_lng')) {\n languageOverride = LHC_API.args.lang = storageHandler.getLocalStorage(prefixStorage+'_lng');\n }\n\n if (LHC_API.args.lang) {\n LHC_API.args.lang = LHC_API.args.lang.replace('/', '') + '/';\n }\n\n // Main attributes\n var attributesWidget = {\n terminated: false,\n prefixLowercase: prefixLowercase,\n prefixStorage: prefixStorage,\n prefixScope: scopeScript,\n cookie_enabled: cookieEnabledUser,\n LHC_API: LHC_API,\n viewHandler: null,\n msgSnippet: null,\n react_attr: LHC_API.args.react_attr || null,\n hide_parent: LHC_API.args.hide_parent || false,\n hide_iframe: LHC_API.args.hide_iframe || false,\n hide_status: LHC_API.args.hide_status || null,\n mainWidget: new mainWidget(prefixLowercase),\n popupWidget: new mainWidgetPopup(),\n chatNotifications: chatNotifications,\n jsVars: new BehaviorSubject(true),\n onlineStatus: new BehaviorSubject(true),\n wloaded: new BehaviorSubject(false),\n sload: new BehaviorSubject(false),\n shidden: new BehaviorSubject(LHC_API.args.hide_status || false),\n msgsnippet_status: new BehaviorSubject(false),\n unread_counter: new BehaviorSubject(0),\n widgetStatus: new BehaviorSubject((storageHandler.getSessionStorage(prefixStorage + '_ws') === 'true' || (LHC_API.args.mode && LHC_API.args.mode == 'embed'))),\n eventEmitter: new EventEmitter(),\n toggleSound: new BehaviorSubject(storageHandler.getSessionStorage(prefixStorage + '_sound') === 'true', {'ignore_sub': true}),\n hideOffline: false,\n fscreen: LHC_API.args.fscreen || false,\n isMobile: isMobile,\n isIE: (navigator.userAgent.toUpperCase().indexOf(\"TRIDENT/\") != -1 || navigator.userAgent.toUpperCase().indexOf(\"MSIE\") != -1 || typeof Object.assign !== 'function'),\n fresh: LHC_API.args.fresh || false,\n popupDimesnions: {pheight: (LHC_API.args.pheight || 520), pwidth: (LHC_API.args.pwidth || 500)},\n leaveMessage: LHC_API.args.leaveamessage || null,\n department: LHC_API.args.department || [],\n dep_default: LHC_API.args.dep_default || null,\n product: LHC_API.args.product || [],\n theme: typeof LHC_API.args.theme !== 'undefined' ? (typeof LHC_API.args.theme === 'object' ? LHC_API.args.theme.join(',') : LHC_API.args.theme) : null,\n theme_v: null,\n domain: LHC_API.args.domain || null,\n domain_lhc: null,\n instance_id: 0,\n profile_pic: LHC_API.args.profile_pic || null,\n position: LHC_API.args.position || 'bottom_right',\n position_placement: LHC_API.args.position_placement || 'bottom_right',\n base_url: LHC_API.args.lhc_base_url,\n mode: LHC_API.args.mode || 'widget',\n tag: LHC_API.args.tag || '',\n proactive: {},\n captcha: null,\n focused: true,\n clinst: false,\n kcw: LHC_API.args.kcw || false,\n offline_redirect: LHC_API.args.offline_redirect || null,\n identifier: LHC_API.args.identifier || '',\n proactive_interval: null,\n lang: LHC_API.args.lang || '',\n langOverride: languageOverride,\n subject_id: LHC_API.args.subject_id || '',\n bot_id: LHC_API.args.bot_id || '',\n trigger_id: LHC_API.args.trigger_id || '',\n priority: LHC_API.args.priority || null,\n events: LHC_API.args.events || [],\n conversion: LHC_API.args.conversion || '',\n hhtml: LHC_API.args.hhtml || '',\n survey: LHC_API.args.survey || null,\n operator: LHC_API.args.operator || null,\n phash: LHC_API.args.phash || null,\n pvhash: LHC_API.args.pvhash || null,\n // Login Objects\n userSession: new userSession(),\n storageHandler: storageHandler,\n staticJS: {},\n nh : null, // Need help data\n init_calls: [],\n childCommands: [],\n childExtCommands: [],\n lhc_var: (LHC_API.args.lhc_var || (typeof lhc_var !== 'undefined' ? lhc_var : null)),\n loadcb: LHC_API.args.loadcb || null,\n LHCChatOptions: global[scopeScript + 'ChatOptions'] || {}\n };\n\n attributesWidget.widgetDimesions = new BehaviorSubject({\n sright: (LHC_API.args.sright || 0),\n sbottom: (LHC_API.args.sbottom || 0),\n wright_inv: 0,\n wbottom: 0,\n wright: 0,\n width: ((isMobile || attributesWidget.fscreen) ? 100 : (LHC_API.args.wwidth || 350)),\n height: ((isMobile || attributesWidget.fscreen) ? 100 : (LHC_API.args.wheight || 520)),\n units: ((isMobile || attributesWidget.fscreen) ? '%' : 'px')\n });\n\n var chatEvents = new chatEventsHandler(attributesWidget);\n\n lhc.eventListener = attributesWidget.eventEmitter;\n lhc.attributes = attributesWidget;\n\n attributesWidget.userSession.setAttributes(attributesWidget);\n attributesWidget.userSession.setSessionInformation(attributesWidget.storageHandler.getSessionInformation());\n attributesWidget.userSession.setSessionReferrer(storageHandler.getSessionReferrer());\n\n if (attributesWidget.mode == 'widget' || attributesWidget.mode == 'popup') {\n\n var containerChatObj = new containerChat(attributesWidget.prefixLowercase, LHC_API.args.pnode || null);\n\n attributesWidget.viewHandler = new statusWidget(attributesWidget.prefixLowercase);\n containerChatObj.cont.elmDom.appendChild(attributesWidget.viewHandler.cont.constructUI(), !0);\n\n if (attributesWidget.mode == 'widget' || attributesWidget.mode == 'popup') {\n containerChatObj.cont.elmDom.appendChild(attributesWidget.mainWidget.cont.constructUI(), !0);\n }\n\n } else {\n var embedWrapper = document.getElementById(attributesWidget.prefixLowercase + '_status_container_page');\n if (embedWrapper !== null) {\n embedWrapper.appendChild(attributesWidget.mainWidget.cont.constructUI());\n embedWrapper.style.height = (LHC_API.args.wheight || 520) + 'px';\n } else {\n attributesWidget.position = 'api';\n }\n }\n\n function getArguments(){\n return {\n 'cd': (storageHandler.cookieEnabled === false ? 1 : null),\n 'vid': (LHC_API.args.UUID || attributesWidget.userSession.getVID()),\n 'hnh': attributesWidget.userSession.hnh,\n 'tz': helperFunctions.getTzOffset(),\n 'r': referrer,\n 'l': location,\n 'dt': encodeURIComponent(document.title),\n 'ie': attributesWidget.isIE,\n 'dep': attributesWidget.department.join(','),\n 'idnt': attributesWidget.identifier,\n 'tag': attributesWidget.tag,\n 'theme': attributesWidget.theme,\n 'mode': attributesWidget.mode,\n 'pos': attributesWidget.position\n };\n }\n\n function showNeedHelp(nh) {\n import('./lib/widgets/needhelpWidget').then((module) => {\n var needhelpWidget = new module.needhelpWidget(attributesWidget.prefixLowercase);\n containerChatObj.cont.elmDom.appendChild(needhelpWidget.cont.constructUI(), !0);\n needhelpWidget.init(attributesWidget, nh);\n });\n }\n\n function showProactive(){\n import('./util/proactiveChat').then((module) => {\n module.proactiveChat.setParams({\n 'interval': attributesWidget.proactive_interval\n }, attributesWidget, chatEvents);\n });\n }\n\n helperFunctions.makeRequest(LHC_API.args.lhc_base_url + attributesWidget.lang + 'widgetrestapi/settings', {\n params: getArguments()\n }, (data) => {\n\n if (lhc.version !== data.wv && document.getElementById(attributesWidget.prefixLowercase+'-js-reload') === null) {\n\n if (data.terminate) {\n return;\n }\n\n attributesWidget.userSession.setVID(data.vid);\n\n // Mark script as terminated\n attributesWidget.terminated = true;\n\n // Remove legacy dom\n helperFunctions.removeById(attributesWidget.prefixLowercase+'_container_v2');\n helperFunctions.removeById(attributesWidget.prefixLowercase+'_status_widget_v2');\n\n // Create new embed script\n var po = document.createElement(\"script\");\n po.type = currentScript.type;\n po.id = attributesWidget.prefixLowercase+'-js-reload';\n po.async = true;\n if (currentScript.getAttribute('scope')) { po.setAttribute('scope',currentScript.getAttribute('scope')); }\n\n // Expires cache\n po.src = currentScript.getAttribute('src') + '&r='+ (new Date()).getHours() + (new Date()).getMinutes();\n var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);\n return;\n }\n\n if (data.terminate || ((!attributesWidget.leaveMessage && data.chat_ui.leaveamessage === false) && data.isOnline === false)) {\n\n if (LHC_API.args.offline_redirect && attributesWidget.mode == 'embed') {\n document.location = LHC_API.args.offline_redirect;\n }\n\n if (data.terminate) {\n return;\n }\n }\n\n // Send event that lhc has started\n // So parent page informs back that it has lhc\n if ((attributesWidget.hide_parent || attributesWidget.hide_iframe || (data.chat_ui && (data.chat_ui.hide_iframe || data.chat_ui.hide_parent))) && window.location != window.parent.location && window.parent.closed === false) {\n window.parent.postMessage('lhc::started','*');\n }\n\n attributesWidget.leaveMessage = attributesWidget.leaveMessage || data.chat_ui.leaveamessage;\n\n if (data.department) {\n attributesWidget.department = data.department;\n }\n\n __webpack_public_path__ = data.chunks_location + \"/\";\n\n if (data.secure_cookie) {\n attributesWidget.storageHandler.setSecureCookie(true);\n }\n\n if (data.domain) {\n attributesWidget.storageHandler.setCookieDomain(data.domain);\n }\n\n if (data.siteaccess) {\n attributesWidget.lang = data.siteaccess;\n }\n\n if (data.static) {\n attributesWidget.staticJS = data.static;\n }\n\n if (data.pdim) {\n attributesWidget.popupDimesnions = data.pdim;\n }\n\n if (data.survey_id) {\n attributesWidget.survey = data.survey_id;\n }\n\n if (data.domain_lhc) {\n attributesWidget.domain_lhc = data.domain_lhc;\n }\n\n if (data.cont_css) {\n attributesWidget.cont_ss = data.cont_css;\n }\n\n if (data.wposition) {\n attributesWidget.position_placement = data.wposition;\n }\n\n attributesWidget.captcha = {hash: data.hash, ts: data.hash_ts};\n attributesWidget.userSession.setVID(data.vid);\n\n // Store session\n attributesWidget.storageHandler.storeSessionInformation(attributesWidget.userSession.getSessionAttributes());\n\n attributesWidget.hideOffline = data.hideOffline;\n attributesWidget.onlineStatus.next(data.isOnline);\n\n if (data.theme) {\n attributesWidget.theme = data.theme;\n attributesWidget.theme_v = data.theme_v;\n }\n\n if (data.chat_ui) {\n\n if (data.chat_ui.hide_parent) {\n attributesWidget.hide_parent = true;\n }\n\n if ((data.chat_ui.fscreen && attributesWidget.mode == 'embed') || attributesWidget.fscreen) {\n attributesWidget.widgetDimesions.nextProperty('width', 100);\n attributesWidget.widgetDimesions.nextProperty('height', 100);\n attributesWidget.widgetDimesions.nextProperty('units', '%');\n attributesWidget.fscreen = isMobile = attributesWidget.isMobile = true;\n }\n\n if (data.chat_ui.wheight && !isMobile) {\n attributesWidget.widgetDimesions.nextProperty('height', data.chat_ui.wheight);\n }\n\n if (data.chat_ui.wwidth && !isMobile) {\n attributesWidget.widgetDimesions.nextProperty('width', data.chat_ui.wwidth);\n }\n\n if (data.chat_ui.hhtml) {\n attributesWidget.hhtml = data.chat_ui.hhtml;\n }\n\n if (data.chat_ui.kcw) {\n attributesWidget.kcw = true;\n }\n\n if (data.chat_ui.clinst) {\n attributesWidget.clinst = true;\n }\n\n if (data.chat_ui.wbottom) {\n attributesWidget.widgetDimesions.nextProperty('wbottom', data.chat_ui.wbottom);\n }\n\n if (data.chat_ui.sbottom) {\n attributesWidget.widgetDimesions.nextProperty('sbottom', data.chat_ui.sbottom);\n }\n\n if (data.chat_ui.sright) {\n attributesWidget.widgetDimesions.nextProperty('sright', data.chat_ui.sright);\n }\n\n if (data.chat_ui.wright) {\n attributesWidget.widgetDimesions.nextProperty('wright', data.chat_ui.wright);\n }\n\n if (data.chat_ui.wright_inv) {\n attributesWidget.widgetDimesions.nextProperty('wright_inv', data.chat_ui.wright_inv);\n }\n\n if (data.chat_ui.mobile_popup && isMobile) {\n attributesWidget.mode = 'popup';\n }\n\n if (data.chat_ui.sound_enabled && storageHandler.getSessionStorage(prefixStorage + '_sound') === null) {\n attributesWidget.toggleSound.next(true);\n }\n\n if (data.instance_id) {\n attributesWidget.instance_id = data.instance_id;\n }\n\n if (data.chat_ui.check_status) {\n import('./util/activityMonitoring').then((module) => {\n module.activityMonitoring.setParams({\n 'timeout': data.chat_ui.check_status,\n 'track_mouse': data.chat_ui.track_mouse,\n 'track_activity': data.chat_ui.track_activity\n }, attributesWidget);\n });\n }\n\n if (data.ga) {\n import('./util/analyticEvents').then((module) => {\n module.analyticEvents.setParams({\n 'ga': data.ga\n }, attributesWidget);\n });\n }\n }\n\n if (data.nh && attributesWidget.fresh === false && attributesWidget['position'] != 'api') {\n attributesWidget.nh = data.nh;\n if (attributesWidget.mode == 'widget' || attributesWidget.mode == 'popup') {\n if (data.nh.ap || attributesWidget.userSession.id === null) {\n showNeedHelp(data.nh);\n }\n }\n }\n\n if (data.js_vars) {\n // Javascript custom variables init\n // Extensions can listen for these\n attributesWidget.jsVars.next(data.js_vars);\n\n // Monitor js vars if required\n if (data.js_vars.length > 0) {\n attributesWidget.userSession.setupVarsMonitoring(data.js_vars, (vars, prefillVars) => {\n chatEvents.sendChildEvent('jsVars', [vars, prefillVars]);\n });\n }\n }\n\n // Init main widgets\n if (attributesWidget.mode == 'widget' || attributesWidget.mode == 'popup') {\n attributesWidget.viewHandler.init(attributesWidget, data.ll);\n }\n\n if (!(attributesWidget.position == 'api' && attributesWidget.mode == 'embed')) {\n attributesWidget.mainWidget.init(attributesWidget, data.ll);\n }\n\n // Show status widget\n if (attributesWidget.mode == 'widget' || attributesWidget.mode == 'popup') {\n containerChatObj.cont.show();\n }\n\n if (attributesWidget.loadcb) {\n attributesWidget.loadcb(attributesWidget);\n }\n\n if (data.init_calls) {\n attributesWidget.init_calls = data.init_calls;\n }\n\n attributesWidget.proactive_interval = data.chat_ui.proactive_interval;\n\n if (!data.disable_proactive && (attributesWidget.mode == 'widget' || attributesWidget.mode == 'popup' || attributesWidget.mode == 'embed') && (typeof LHC_API.args.proactive === 'undefined' || LHC_API.args.proactive === true) && attributesWidget.storageHandler.getSessionStorage(prefixStorage + '_invt') === null) {\n showProactive();\n }\n\n if (attributesWidget.init_calls.length > 0) {\n attributesWidget.init_calls.forEach((item) => {\n if (item.extension == 'nodeJSChat') {\n import('./util/nodeJSChat').then((module) => {\n module.nodeJSChat.setParams(item.params, attributesWidget, chatEvents);\n });\n }\n });\n }\n\n })\n\n // Widget Hide event\n attributesWidget.eventEmitter.addListener('closeWidget', function (params) {\n attributesWidget.widgetStatus.next(false);\n chatEvents.sendChildEvent('closedWidget', [params]);\n });\n\n // Send event to the child instantly\n attributesWidget.eventEmitter.addListener('sendChildEvent', function (params) {\n if (typeof params['boot'] !== 'undefined') {\n attributesWidget.mainWidget.bootstrap();\n } else {\n if (attributesWidget.mainWidget.isLoaded == true && lhc.loaded == true) {\n chatEvents.sendChildEvent(params['cmd'], [params['arg']]);\n } else {\n attributesWidget.childCommands.push(params);\n }\n }\n });\n\n // Send smart event to the child\n attributesWidget.eventEmitter.addListener('sendChildExtEvent', function (params) {\n if (typeof params['boot'] !== 'undefined') {\n attributesWidget.mainWidget.bootstrap();\n } else {\n if (attributesWidget.mainWidget.isLoaded == true && lhc.loaded == true) {\n chatEvents.sendChildEvent(params['cmd'], [params['arg']], 'lhc_load_ext');\n } else {\n attributesWidget.childExtCommands.push(params);\n }\n }\n });\n\n // Toggle sound user\n attributesWidget.eventEmitter.addListener('toggleSound', function () {\n var newValue = !attributesWidget.toggleSound.value;\n attributesWidget.toggleSound.next(newValue);\n });\n\n // Toggle cookies policy\n attributesWidget.eventEmitter.addListener('enableCookies', function () {\n\n // Check does cookies are supported in genreal\n if (storageHandler.checkCookiesSupport() === true) {\n // Store session\n var sessionAtrribute = attributesWidget.userSession.getSessionAttributes();\n if (typeof sessionAtrribute.hnh !== 'undefined') { delete sessionAtrribute['hnh']; }\n attributesWidget.storageHandler.storeSessionInformation(sessionAtrribute);\n\n if (typeof LHC_API.args.orig !== 'undefined') {\n\n attributesWidget.mode = LHC_API.args.mode = LHC_API.args.orig.mode;\n LHC_API.args.proactive = LHC_API.args.orig.proactive;\n LHC_API.args.check_messages = LHC_API.args.orig.check_messages;\n\n helperFunctions.makeRequest(LHC_API.args.lhc_base_url + attributesWidget.lang + 'widgetrestapi/settings', {\n params: getArguments()\n }, (data) => {\n // Change mode for react app\n attributesWidget.eventEmitter.emitEvent('sendChildEvent',[{'cmd' : 'attr_set', 'arg' : {'type':'attr_set','attr': ['mode'], data : attributesWidget.mode}}]);\n\n // Show need help widget if it's required\n if (attributesWidget.mode == 'widget' && attributesWidget.nh !== null) {\n showNeedHelp(attributesWidget.nh);\n }\n\n // Enable proactive if it's required\n if ((attributesWidget.mode == 'widget' || attributesWidget.mode == 'popup') && (typeof LHC_API.args.proactive === 'undefined' || LHC_API.args.proactive === true) && attributesWidget.storageHandler.getSessionStorage(prefixStorage + '_invt') === null) {\n showProactive();\n }\n });\n }\n }\n });\n\n\n // Clear chat cookies if there is any\n // Then popup finishes loading it calls this to clean up chat cookies. So visitor can start new chat.\n attributesWidget.eventEmitter.addListener('endChatCookies', function (params) {\n if (attributesWidget.kcw === false || (params && params['force'] == true)) {\n attributesWidget.userSession.setChatInformation({'id': null, 'hash': null});\n attributesWidget.storageHandler.storeSessionInformation(attributesWidget.userSession.getSessionAttributes());\n attributesWidget.proactive = {};\n }\n });\n\n attributesWidget.eventEmitter.addListener('endChat', function (params) {\n\n attributesWidget.userSession.setChatInformation({'id': null, 'hash': null});\n attributesWidget.storageHandler.storeSessionInformation(attributesWidget.userSession.getSessionAttributes());\n\n attributesWidget.proactive = {};\n\n if (attributesWidget.mode != 'popup' && (!params || !params['show_start'])) {\n attributesWidget.widgetStatus.next(false);\n }\n\n if (attributesWidget.viewHandler) {\n attributesWidget.viewHandler.removeUnreadIndicator();\n attributesWidget.eventEmitter.emitEvent('hide_msg_snippet');\n }\n\n attributesWidget.widgetDimesions.nextProperty('height_override', null);\n\n chatEvents.sendChildEvent('endedChat', [{'sender': 'endButton', 'survey' : attributesWidget.survey}]);\n\n if (attributesWidget.mode == 'embed' || (params && params['show_start'])) {\n attributesWidget.eventEmitter.emitEvent('showWidget', [{'sender': 'closeButton'}]);\n }\n\n if (attributesWidget.mode == 'popup') {\n attributesWidget.popupWidget.freeup();\n }\n });\n\n // Widget show event\n attributesWidget.eventEmitter.addListener('showWidget', function (params) {\n\n // Just to restyle if needed\n attributesWidget.mainWidget.hideInvitation();\n\n attributesWidget.widgetStatus.next(true);\n\n if (attributesWidget.mode == 'popup') {\n attributesWidget.popupWidget.init(attributesWidget, chatEvents, params);\n\n attributesWidget.viewHandler.removeUnreadIndicator();\n\n attributesWidget.mainWidget.hide();\n } else if (typeof params !== 'undefined' && typeof params.event !== 'undefined') {\n params.event.preventDefault();\n }\n\n chatEvents.sendChildEvent('shownWidget', [{'sender': 'closeButton'}]);\n });\n\n // Add tag listener\n attributesWidget.eventEmitter.addListener('addTag', function (tag) {\n attributesWidget.tag = attributesWidget.tag != '' ? attributesWidget.tag + ',' + tag : tag;\n attributesWidget.eventEmitter.emitEvent('tagAdded');\n });\n\n // Events\n attributesWidget.eventEmitter.addListener('addEvent', function (events) {\n attributesWidget.events = events;\n attributesWidget.eventEmitter.emitEvent('eventAdded');\n });\n\n // Conversions\n attributesWidget.eventEmitter.addListener('addConversion', function (conversion) {\n attributesWidget.conversion = conversion;\n attributesWidget.eventEmitter.emitEvent('conversionAdded');\n });\n\n // Popup open event\n attributesWidget.eventEmitter.addListener('openPopup', function () {\n\n attributesWidget.popupWidget.init(attributesWidget, chatEvents);\n\n attributesWidget.viewHandler.removeUnreadIndicator();\n\n chatEvents.sendChildEvent('shownWidget', [{'sender': 'closeButton'}]);\n\n attributesWidget.widgetStatus.next(false);\n });\n\n // Chat started event received\n // Store chat information if it's not popup mode.\n attributesWidget.eventEmitter.addListener('chatStarted', function (data, mode) {\n\n attributesWidget.widgetDimesions.nextProperty('height_override', null);\n\n if (mode !== 'popup' || attributesWidget.kcw === true) {\n attributesWidget.userSession.setChatInformation(data, attributesWidget.nh && attributesWidget.nh.ap);\n }\n\n if (mode == 'popup') {\n attributesWidget.mainWidget.hide();\n }\n\n // Store information permanently\n if (attributesWidget.fresh === false && (mode !== 'popup' || attributesWidget.kcw === true)) {\n attributesWidget.storageHandler.storeSessionInformation(attributesWidget.userSession.getSessionAttributes());\n }\n });\n\n // Subscribe event\n attributesWidget.eventEmitter.addListener('subscribeEvent', function (data) {\n attributesWidget.chatNotifications.setPublicKey(data.pk, attributesWidget.eventEmitter);\n attributesWidget.chatNotifications.sendNotification();\n });\n\n // User has subscribed to notifications\n // Send back child subscription information\n attributesWidget.eventEmitter.addListener('subcribedEvent', function (data) {\n chatEvents.sendChildEvent('subcribedEvent', [data]);\n });\n\n // Track widget status changes\n attributesWidget.widgetStatus.subscribe((data) => {\n if (attributesWidget.mode !== 'popup') {\n if (attributesWidget.mode !== 'embed') {\n // Do not store open status in local storage because embed is always open\n attributesWidget.storageHandler.setSessionStorage(prefixStorage + '_ws', data);\n }\n chatEvents.sendChildEvent('widgetStatus', [data]);\n }\n });\n\n // Store sound settings\n attributesWidget.toggleSound.subscribe((data) => {\n attributesWidget.storageHandler.setSessionStorage(prefixStorage + '_sound', data);\n });\n\n attributesWidget.onlineStatus.subscribe((data) => {\n chatEvents.sendChildEvent('onlineStatus', [data]);\n });\n\n attributesWidget.eventEmitter.addListener('screenshot', (data) => {\n helperFunctions.makeScreenshot(attributesWidget.staticJS['screenshot'], data);\n });\n\n attributesWidget.eventEmitter.addListener('screenshare', (data) => {\n import('./util/screenShare').then((module) => {\n module.screenShare.setParams((data || {}), attributesWidget, chatEvents);\n });\n });\n\n attributesWidget.eventEmitter.addListener('location', (data) => {\n document.location = data;\n });\n\n attributesWidget.eventEmitter.addListener('terminated', (data) => {\n attributesWidget.terminated = true;\n // Remove legacy dom\n helperFunctions.removeById(attributesWidget.prefixLowercase+'_container_v2');\n helperFunctions.removeById(attributesWidget.prefixLowercase+'_status_widget_v2');\n });\n\n attributesWidget.eventEmitter.addListener('showInvitation', (data) => {\n attributesWidget.widgetDimesions.nextProperty('bottom_override', 75);\n attributesWidget.widgetDimesions.nextProperty('right_override', 75);\n attributesWidget.mainWidget.showInvitation();\n });\n\n attributesWidget.eventEmitter.addListener('hideAction', (data) => {\n attributesWidget.mainWidget.hide();\n });\n\n attributesWidget.eventEmitter.addListener('showAction', (data) => {\n attributesWidget.mainWidget.show();\n });\n\n attributesWidget.eventEmitter.addListener('zoomImage', (data) => {\n import('./util/zoomImage').then((module) => {\n module.zoomImage.setParams((data || {}), attributesWidget, chatEvents);\n });\n });\n\n attributesWidget.eventEmitter.addListener('hideInvitation', (data) => {\n attributesWidget.mainWidget.hideInvitation();\n if (data.full) {\n attributesWidget.eventEmitter.emitEvent('showWidget', [{'sender': 'closeButton'}]);\n attributesWidget.eventEmitter.emitEvent('fullInvitation', [data]);\n } else {\n attributesWidget.eventEmitter.emitEvent('cancelInvitation', []);\n }\n });\n\n attributesWidget.eventEmitter.addListener('msgSnippet', (data) => {\n if (attributesWidget.mode == 'widget' && attributesWidget.widgetStatus.value === false) {\n\n if (data.full_widget) {\n attributesWidget.eventEmitter.emitEvent('showWidget', [{'sender': 'closeButton'}]);\n return;\n }\n\n attributesWidget.position == 'api' && attributesWidget.viewHandler && attributesWidget.viewHandler.show();\n\n import('./lib/widgets/msgSnippetWidget').then((module) => {\n if (!attributesWidget.msgSnippet) {\n attributesWidget.msgSnippet = new module.msgSnippetWidget(attributesWidget.prefixLowercase);\n containerChatObj.cont.elmDom.appendChild(attributesWidget.msgSnippet.cont.constructUI(), !0);\n attributesWidget.msgSnippet.init(attributesWidget, data);\n } else {\n attributesWidget.msgSnippet.showSnippet(data, true);\n }\n attributesWidget.eventEmitter.emitEvent('unread_message',[{otm: 1}]);\n });\n }\n });\n\n attributesWidget.eventEmitter.addListener('unread_message', (data) => {\n if (data && data.msg_body && !attributesWidget.msgSnippet) {\n import('./lib/widgets/msgSnippetWidget').then((module) => {\n if (!attributesWidget.msgSnippet) {\n attributesWidget.msgSnippet = new module.msgSnippetWidget(attributesWidget.prefixLowercase);\n containerChatObj.cont.elmDom.appendChild(attributesWidget.msgSnippet.cont.constructUI(), !0);\n attributesWidget.msgSnippet.init(attributesWidget, data);\n }\n });\n }\n });\n\n attributesWidget.originalTitle = document.title;\n attributesWidget.blinkInterval = null;\n\n attributesWidget.eventEmitter.addListener('change_language', (data) => {\n attributesWidget.lang = data.lng.replace('/', '') + '/';\n });\n\n attributesWidget.eventEmitter.addListener('unread_message_title', (data) => {\n clearInterval(attributesWidget.blinkInterval);\n if (data.status == false) {\n attributesWidget.blinkInterval = setInterval(() => {\n document.title = (Math.round(new Date().getTime() / 1000) % 2) ? '💬 ' + attributesWidget.originalTitle : attributesWidget.originalTitle;\n }, 1000);\n } else {\n attributesWidget.focused = true;\n document.title = attributesWidget.originalTitle;\n }\n });\n\n attributesWidget.eventEmitter.addListener('widgetHeight', (data) => {\n\n if (data.reset_height) {\n attributesWidget.widgetDimesions.nextProperty('height_override', null);\n attributesWidget.widgetDimesions.nextProperty('bottom_override', null);\n attributesWidget.widgetDimesions.nextProperty('right_override', null);\n attributesWidget.widgetDimesions.nextProperty('width_override', null);\n return;\n }\n\n if (data.force_height || data.force_width || data.force_bottom || data.force_right) {\n data.force_height && attributesWidget.widgetDimesions.nextProperty('height_override', data.force_height);\n data.force_width && attributesWidget.widgetDimesions.nextProperty('width_override', data.force_width);\n data.force_right && attributesWidget.widgetDimesions.nextProperty('right_override', data.force_right);\n data.force_bottom && attributesWidget.widgetDimesions.nextProperty('bottom_override', data.force_bottom);\n return;\n }\n\n if (attributesWidget.mode == 'widget' && attributesWidget.isMobile == false) {\n var d = document,\n e = d.documentElement,\n g = d.getElementsByTagName('body')[0],\n y = global.innerHeight || e.clientHeight || g.clientHeight;\n if (parseInt(data.height) > attributesWidget.widgetDimesions.value['height'] && y > parseInt(data.height)) {\n attributesWidget.widgetDimesions.nextProperty('height_override', parseInt(data.height));\n } else if (attributesWidget.widgetDimesions.value['height_override'] && attributesWidget.widgetDimesions.value['height_override'] > y) {\n attributesWidget.widgetDimesions.nextProperty('height_override', null);\n }\n }\n });\n\n var serviceWorkerAvailable = false;\n try {\n serviceWorkerAvailable = ('serviceWorker' in navigator);\n } catch (e) {\n // Worker not available\n }\n\n if (serviceWorkerAvailable === true) {\n try {\n navigator.serviceWorker.addEventListener('message', function (event) {\n try {\n if (typeof event.data.lhc_ch !== 'undefined' && typeof event.data.lhc_cid !== 'undefined') {\n attributesWidget.widgetStatus.next(true);\n if (attributesWidget.mode == 'popup') {\n attributesWidget.userSession.setChatInformation({\n 'id': event.data.lhc_cid,\n 'hash': event.data.lhc_ch\n });\n attributesWidget.eventEmitter.emitEvent('unread_message');\n } else {\n chatEvents.sendChildEvent('shownWidget', [{'sender': 'closeButton'}]);\n chatEvents.sendChildEvent('reopenNotification', [{\n 'id': event.data.lhc_cid,\n 'hash': event.data.lhc_ch\n }]);\n }\n }\n } catch (e) {\n if (lhcError) lhcError.log(e.message, \"index.js\", e.lineNumber || e.line, e.stack); else throw Error(\"lhc : \" + e.message);\n }\n });\n } catch (e) {\n // Ignore sandbox error\n }\n }\n\n // Listed for post messages\n const handleMessages = (e) => {\n\n if (attributesWidget.terminated === true || typeof e.data !== 'string' || e.data.indexOf(attributesWidget.prefixLowercase + '::')) {\n return;\n }\n\n const parts = e.data.split('::');\n\n if (typeof e.origin !== 'undefined' && e.origin != 'about:') {\n var originDomain = e.origin.replace(\"http://\", \"\").replace(\"https://\", \"\").replace(/:(\\d+)$/, '');\n\n // We allow to send events only from chat installation or page where script is embeded.\n if (originDomain !== document.domain && attributesWidget.domain_lhc !== originDomain && parts[1] !== 'started' && parts[1] !== 'isstarted') {\n return;\n }\n }\n\n if (parts[1] == 'ready') {\n\n chatEvents.sendReadyEvent(parts[2] == 'true');\n\n if (attributesWidget.storageHandler.getSessionStorage(prefixStorage + '_screenshare')) {\n attributesWidget.eventEmitter.emitEvent('screenshare', [{'auto_start': true}]);\n }\n\n const focusChangeCb = (e) => {\n const focused = e.type === \"focus\";\n attributesWidget.focused = focused;\n chatEvents.sendChildEvent('focus_changed', [{'status': focused}]);\n };\n\n window.addEventListener('focus', focusChangeCb);\n window.addEventListener('blur', focusChangeCb);\n window.addEventListener('pageshow', focusChangeCb);\n window.addEventListener('pagehide', focusChangeCb);\n\n // App is fully loaded\n lhc.loaded = true;\n\n chatEvents.sendChildEvent('ext_modules', [attributesWidget.staticJS['ex_cb_js']]);\n\n // send child commands if there is any\n attributesWidget.childExtCommands.forEach((params) => {\n chatEvents.sendChildEvent(params['cmd'], [params['arg']], 'lhc_load_ext');\n });\n\n // send child commands if there is any\n attributesWidget.childCommands.forEach((params) => {\n chatEvents.sendChildEvent(params['cmd'], [params['arg']]);\n });\n\n if (attributesWidget.react_attr !== null) {\n attributesWidget.react_attr.forEach(item => {\n chatEvents.sendChildEvent('attr_set',[{\n 'type':'attr_set','attr': item['k'],\n data : item['v']\n }]);\n })\n }\n\n } else if (parts[1] == 'ready_popup') {\n attributesWidget.popupWidget.sendParameters(chatEvents);\n } else if (parts[1] == 'isstarted') {\n // Parent window has LHC, terminate present instance\n attributesWidget.eventEmitter.emitEvent('terminated', []);\n } else if (parts[1] == 'started') {\n if (attributesWidget.hide_parent) {\n attributesWidget.eventEmitter.emitEvent('terminated', []);\n } else {\n e.source.postMessage('lhc::isstarted','*');\n }\n } else {\n attributesWidget.eventEmitter.emitEvent(parts[1], JSON.parse(parts[2]));\n }\n };\n\n if (window.addEventListener) {\n window.addEventListener(\"message\", handleMessages, false);\n } else if (window.attachEvent) {\n window.attachEvent(\"onmessage\", handleMessages);\n } else if (document.attachEvent) {\n document.attachEvent(\"onmessage\", handleMessages);\n }\n };\n\n var preInit = () => {\n\n // Avoid multiple times execution\n if (lhc.ready === true) {\n return;\n }\n\n // we have found document body so we can continue\n if (document.body) {\n lhc.ready = true;\n }\n\n lhc.init = init;\n\n if (LHC_API.args.before_init) {\n LHC_API.args.before_init(lhc);\n }\n\n LHC_API.args.manual_init || init();\n };\n\n const eventsHandler = require('./util/domEventsHandler').domEventsHandler;\n\n (preInit(), !lhc.ready) || (eventsHandler.listen(document, \"DOMContentLoaded\", function () {\n preInit();\n }, \"domloaded\"),\n eventsHandler.listen(document, \"readystatechange\", function () {\n (\"complete\" === document.readyState || \"interactive\" === document.readyState && document.body) && preInit();\n }, \"domstatechange\"),\n eventsHandler.listen(global, \"load\", function () {\n preInit();\n }, \"windowload\"));\n\n }).call(this, global['$_' + scopeScript], global[scopeScript + '_API']);\n\n } catch (e) {\n if (lhcError) lhcError.log(e.message, \"index.js\", e.lineNumber || e.line, e.stack); else throw Error(\"lhc : \" + e.message);\n }\n\n})(window);"],"names":["rawAsap","freeTasks","pendingErrors","requestErrorThrow","makeRequestCallFromTimer","length","shift","asap","task","rawTask","pop","RawTask","this","module","exports","prototype","call","error","onerror","push","queue","requestFlush","index","flush","currentIndex","scan","newLength","toggle","observer","node","scope","g","self","BrowserMutationObserver","MutationObserver","WebKitMutationObserver","callback","timeoutHandle","setTimeout","handleTimer","intervalHandle","setInterval","clearTimeout","clearInterval","document","createTextNode","observe","characterData","data","_setPrototypeOf","o","p","Object","setPrototypeOf","__proto__","_possibleConstructorReturn","TypeError","ReferenceError","_getPrototypeOf","getPrototypeOf","UIConstructorIframe","subClass","superClass","create","constructor","value","writable","configurable","defineProperty","elementId","style","attributes","tagname","documentRef","bodyId","dir","cl","header","elmDomDoc","helperFunctions","elmDom","getElementsByTagName","innerHTML","body","id","html","setAttribute","nodeDoctype","implementation","createDocumentType","doctype","replaceChild","insertBefore","childNodes","e","console","log","insertCssFile","insertContent","tmpl","UIConsturctor","f","tagName","classNames","keys","forEach","attr","a","className","join","cssText","c","d","k","getElementById","split","domEventsHandler","restyle","reset","createDocumentFragment","type","settings","appendChild","styleSheet","nodeValue","elm","href","createElement","b","rel","crossOrigin","src","async","loadcb","onload","key","hasOwnProperty","chatNotifications","_chatNotifications","isNotificationsSubscribed","applicationServerPublicKey","eventEmitter","publicKey","that","swRegistration","navigator","window","Notification","permission","requestPermission","alert","serviceWorker","register","then","swReg","pushManager","getSubscription","subscription","applicationServerKey","base64String","base64","repeat","replace","rawData","atob","outputArray","Uint8Array","i","charCodeAt","urlB64ToUint8Array","subscribe","getKey","token","contentEncoding","PushManager","supportedContentEncodings","payload","JSON","stringify","endpoint","btoa","String","fromCharCode","apply","authToken","emitEvent","updateSubscriptionOnServer","_helperFunctions","s","contentWindow","contentDocument","EId","EObj","parentNode","removeChild","Intl","DateTimeFormat","resolvedOptions","timeZone","Date","stdTimezoneOffset","jan","getFullYear","jul","Math","max","getTimezoneOffset","dst","today","params","outline","visibility","resize","boxshadow","overflow","background","opacity","top","right","bottom","left","position","border","minheight","minwidth","maxheight","maxwidth","padding","margin","transition","transform","width","height","display","zindex","backgroundcolor","cursor","borderRadius","element","classList","contains","match","RegExp","add","hasClass","remove","screenshot","url","html2canvas","th","onreadystatechange","makeScreenshot","canvas","xhr","XMLHttpRequest","open","setRequestHeader","send","encodeURIComponent","toDataURL","err","item","pairs","request","urlRequest","makeQuery","readyState","status","parse","responseText","message","req","containerChat","prefix","pnode","cont","constructUI","mainWidget","units","originalCSS","bottom_override","isLoaded","loadStatus","main","css","restyleStyle","position_placement","mode","fscreen","massRestyle","wloaded","next","isMobile","constructUIIframe","staticJS","hhtml","cont_ss","lazyLoad","makeContent","getSessionAttributes","bootstrap","toggleVisibilityWrap","toggleVisibility","widgetStatus","monitorDimensionsWrap","monitorDimensions","widgetDimesions","valueInternal","screenAttributesUpdate","innerHeight","nextPropertySilent","innerWidth","callListeners","addEventListener","addListener","insertCssRemoteFile","theme","LHC_API","args","lhc_base_url","theme_v","checkLoadStatus","insertJSFile","prefixLowercase","hide","show","width_override","width_soverride","height_override","height_soverride","wbottom","clinst","right_override","wright_inv","wright","mainWidgetPopup","freeup","argumentsQuery","Array","paramsReturn","LHCChatOptions","name","encrypted","size","attr_prefill","attr_prefill_admin","chatEvents","paramsPopup","elementReferrerPopup","closed","event","preventDefault","focus","urlArgumetns","storageHandler","cookieEnabled","toggleSound","setSessionStorage","fontSize","getLocalStorage","parseInt","getSessionReferrer","parseOptions","dualScreenLeft","undefined","screenLeft","screenX","dualScreenTop","screenTop","screenY","documentElement","clientWidth","screen","clientHeight","systemZoom","availWidth","paramsWindow","newWin","needWindow","windowCreated","location","viewHandler","kcw","sendChildEvent","sendParameters","js_vars","js_args","currentVar","eval","var","statusWidget","controlMode","font","widget","shidden","lload","unread_counter","onlineStatus","icon","leaveMessage","sload","placement","sbottom","sright","_inst","attachUserEventListener","offline_redirect","toggleOfflineIcon","chatParams","unreadMessagesNumber","getSessionStorage","unreadTotal","otm","showUnreadIndicator","init","isNaN","now","removeUnreadIndicator","number","iconText","iconValue","innerText","removeSessionStorage","hideOffline","chatEventsHandler","getJSVarsValues","jsVars","prefillOptions","fieldsCustom","prefilOptionsList","concat","getPrefillVars","command","postMessage","isIE","popupWidget","popup","getInitAttributes","sendChildCommand","_domEventsHandler","events","object","dispatch","getEvent","attachEvent","eventName","presentEvent","removeEventHandler","eventListener","listener","removeEventListener","detachEvent","eventInstance","_this","caller","arguments","Event","monitoredVariable","listeners","val","indexOf","splice","global","domain","cookiesSupportChecked","checkCookiesSupport","secureCookie","cookiePerPage","hasSessionStorage","sessionStorage","hasLocalStorage","localStorage","cookie","coookieName","cookieValue","expireTime","string","setTime","getTime","toGMTString","cookieName","baseCookie","charAt","substring","host","hostname","setItem","removeItem","getItem","ref","sessionInformation","getHTTPCookie","parseSessionInformation","setHTTPCookie","getStoreValue","getCookieDomain","content","contentReturn","parts","unescape","userSession","vid","hnh","hash","updateVarsTimeout","decode","evalJSON","str","$","parseJSON","toJSON","encode","cb","lhc_var","validator","set","obj","prop","updateJSVars","Proxy","lhc_var_prefill","getAppendVariables","varsReturn","varsSet","getVars","jsVarData","append","vars","varsJSON","alwaysPersistentNeedHelp","round","appleIphone","appleIpod","appleTablet","appleUniversal","androidPhone","androidTablet","amazonPhone","amazonTablet","windowsPhone","windowsTablet","otherBlackBerry","otherBlackBerry10","otherOpera","otherChrome","otherFirefox","isAppleTabletOnIos13","platform","maxTouchPoints","MSStream","param","nav","userAgent","tmp","regex","test","createMatch","result","apple","phone","ipod","tablet","universal","device","amazon","android","windows","other","blackberry","blackberry10","opera","firefox","chrome","any","noop","LAST_ERROR","IS_ERROR","Promise","fn","_U","_V","_W","_X","doResolve","handle","deferred","_Y","onFulfilled","onRejected","ret","ex","tryCallOne","reject","promise","resolve","handleResolved","newValue","getThen","finale","bind","_Z","Handler","done","res","reason","tryCallTwo","_0","safeThen","TRUE","valuePromise","FALSE","NULL","UNDEFINED","ZERO","EMPTYSTRING","iterableToArray","iterable","from","x","slice","all","arr","remaining","race","values","finally","denodeify","argumentCount","Infinity","callbackFn","Function","denodeifyWithCount","fnLength","map","_","denodeifyWithoutCount","nodeify","ctx","enableSynchronous","isPending","getState","isFulfilled","isRejected","getValue","Error","getReason","disableSynchronous","EventEmitter","proto","originalGlobalValue","indexOfListener","alias","isValidListener","getListeners","evt","response","_getEvents","flattenListeners","flatListeners","getListenersAsObject","listenerIsWrapped","once","on","addOnceListener","defineEvent","defineEvents","evts","removeListener","off","addListeners","manipulateListeners","removeListeners","single","multiple","removeEvent","_events","removeAllListeners","listenersMap","_getOnceReturnValue","trigger","emit","setOnceReturnValue","_onceReturnValue","noConflict","_classCallCheck","instance","Constructor","_defineProperties","target","props","descriptor","enumerable","_createClass","protoProps","staticProps","_typeof","Symbol","iterator","__webpack_module_cache__","inProgress","dataWebpackPrefix","__webpack_require__","moduleId","cachedModule","__webpack_modules__","m","n","getter","__esModule","definition","get","chunkId","reduce","promises","u","globalThis","l","script","needAttach","scripts","getAttribute","charset","timeout","nc","origin","onScriptComplete","prev","doneFns","head","r","toStringTag","installedChunks","j","installedChunkData","errorType","realSrc","webpackJsonpCallback","parentChunkLoadingFunction","chunkIds","moreModules","runtime","some","chunkLoadingGlobal","currentScript","scopeScript","lhcError","filename","lineNumber","stack","column","file","line","lineno","colno","lhc","loaded","connected","ready","version","require","default","BehaviorSubject","mobile_view","toLowerCase","prefixStorage","scope_storage","cookieEnabledUser","cookie_enabled","userMode","orig","proactive","check_messages","cookie_per_page","setCookiePerPage","referrer","substr","protocol","setSessionReferer","languageOverride","lang","attributesWidget","terminated","prefixScope","msgSnippet","react_attr","hide_parent","hide_iframe","hide_status","msgsnippet_status","toUpperCase","assign","fresh","popupDimesnions","pheight","pwidth","leaveamessage","department","dep_default","product","domain_lhc","instance_id","profile_pic","base_url","tag","captcha","focused","identifier","proactive_interval","langOverride","subject_id","bot_id","trigger_id","priority","conversion","survey","operator","phash","pvhash","nh","init_calls","childCommands","childExtCommands","wwidth","wheight","setAttributes","setSessionInformation","getSessionInformation","setSessionReferrer","containerChatObj","embedWrapper","getArguments","UUID","getVID","getTzOffset","title","showNeedHelp","needhelpWidget","showProactive","proactiveChat","setParams","makeRequest","wv","terminate","chat_ui","isOnline","parent","__webpack_public_path__","chunks_location","secure_cookie","setSecureCookie","setCookieDomain","siteaccess","static","pdim","survey_id","cont_css","wposition","ts","hash_ts","setVID","storeSessionInformation","nextProperty","mobile_popup","sound_enabled","check_status","activityMonitoring","track_mouse","track_activity","ga","analyticEvents","ap","setupVarsMonitoring","prefillVars","ll","disable_proactive","extension","nodeJSChat","removeById","po","getHours","getMinutes","sessionAtrribute","setChatInformation","hideInvitation","setPublicKey","pk","sendNotification","screenShare","showInvitation","zoomImage","full","full_widget","showSnippet","msgSnippetWidget","msg_body","originalTitle","blinkInterval","lng","reset_height","force_height","force_width","force_bottom","force_right","y","serviceWorkerAvailable","lhc_ch","lhc_cid","handleMessages","originDomain","sendReadyEvent","focusChangeCb","source","preInit","before_init","manual_init","eventsHandler","listen"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"index.js","mappings":";uEAGA,IAAIA,EAAU,EAAQ,KAElBC,EAAY,GAGZC,EAAgB,GAChBC,EAAoBH,EAAQI,0BAEhC,WACI,GAAIF,EAAcG,OACd,MAAMH,EAAcI,WAa5B,SAASC,EAAKC,GACV,IAAIC,GAEAA,EADAR,EAAUI,OACAJ,EAAUS,MAEV,IAAIC,GAEVH,KAAOA,EACfR,EAAQS,GAKZ,SAASE,IACLC,KAAKJ,KAAO,KAfhBK,EAAOC,QAAUP,EAoBjBI,EAAQI,UAAUC,KAAO,WACrB,IACIJ,KAAKJ,KAAKQ,OACZ,MAAOC,GACDV,EAAKW,QAILX,EAAKW,QAAQD,IAKbf,EAAciB,KAAKF,GACnBd,KAEN,QACES,KAAKJ,KAAO,KACZP,EAAUA,EAAUI,QAAUO,yCClDtC,SAASZ,EAAQQ,GACRY,EAAMf,QACPgB,IAIJD,EAAMA,EAAMf,QAAUG,EAP1BK,EAAOC,QAAUd,EAUjB,IAOIqB,EAPAD,EAAQ,GAWRE,EAAQ,EAYZ,SAASC,IACL,KAAOD,EAAQF,EAAMf,QAAQ,CACzB,IAA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AY,YAAagd,GACzBl2B,SAASkZ,aAChBlZ,SAASkZ,YAAY,YAAagd,IAItCK,EAAU,YAGQ,IAAd/J,EAAIG,QAKJ3sB,SAASuC,OACTiqB,EAAIG,OAAQ,GAGhBH,EAAIpV,KAAOA,EAEPnG,EAAQC,KAAKslB,aACbvlB,EAAQC,KAAKslB,YAAYhK,GAG7Bvb,EAAQC,KAAKulB,aAAerf,MAG1Bsf,EAAgB7J,oBAAAA,KAAAA,EAErB0J,KAAY/J,EAAIG,QAAW+J,EAAcC,OAAO32B,SAAU,oBAAoB,WAC3Eu2B,MACD,aACCG,EAAcC,OAAO32B,SAAU,oBAAoB,YAC9C,aAAeA,SAAS8N,YAAc,gBAAkB9N,SAAS8N,YAAc9N,SAASuC,OAASg0B,MACnG,kBACHG,EAAcC,OAAOvc,EAAQ,QAAQ,WACjCmc,MACD,gBAERn4B,KAAKJ,KAAMoc,EAAO,KAAO0R,GAAc1R,EAAO0R,EAAc,SAEjE,MAAO5oB,GACL,IAAI6oB,EAAqF,MAAMrG,MAAM,SAAWxiB,EAAEgL,SAApG6d,EAAS3oB,IAAIF,EAAEgL,QAAS,WAAYhL,EAAE+oB,YAAc/oB,EAAEmpB,KAAMnpB,EAAEgpB,SAhiCpF,CAmiCG5lB","sources":["webpack://LiveHelperChat/./node_modules/asap/browser-asap.js","webpack://LiveHelperChat/./node_modules/asap/browser-raw.js","webpack://LiveHelperChat/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://LiveHelperChat/./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js","webpack://LiveHelperChat/./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack://LiveHelperChat/./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","webpack://LiveHelperChat/./src/lib/UIConstructorIframe.js","webpack://LiveHelperChat/./node_modules/@babel/runtime/helpers/esm/inherits.js","webpack://LiveHelperChat/./src/lib/UIConsturctor.js","webpack://LiveHelperChat/./src/lib/chatNotifications.js","webpack://LiveHelperChat/./src/lib/helperFunctions.js","webpack://LiveHelperChat/./src/lib/settings.js","webpack://LiveHelperChat/./src/lib/widgets/containerChat.js","webpack://LiveHelperChat/./src/lib/widgets/mainWidget.js","webpack://LiveHelperChat/./src/lib/widgets/mainWidgetPopup.js","webpack://LiveHelperChat/./src/lib/widgets/statusWidget.js","webpack://LiveHelperChat/./src/util/chatEventsHandler.js","webpack://LiveHelperChat/./src/util/domEventsHandler.js","webpack://LiveHelperChat/./src/util/monitoredVariable.js","webpack://LiveHelperChat/./src/util/storageHandler.js","webpack://LiveHelperChat/./src/util/userSession.js","webpack://LiveHelperChat/./node_modules/ismobilejs/esm/isMobile.js","webpack://LiveHelperChat/./node_modules/promise/index.js","webpack://LiveHelperChat/./node_modules/promise/lib/core.js","webpack://LiveHelperChat/./node_modules/promise/lib/done.js","webpack://LiveHelperChat/./node_modules/promise/lib/es6-extensions.js","webpack://LiveHelperChat/./node_modules/promise/lib/finally.js","webpack://LiveHelperChat/./node_modules/promise/lib/index.js","webpack://LiveHelperChat/./node_modules/promise/lib/node-extensions.js","webpack://LiveHelperChat/./node_modules/promise/lib/synchronous.js","webpack://LiveHelperChat/./node_modules/wolfy87-eventemitter/EventEmitter.js","webpack://LiveHelperChat/./node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack://LiveHelperChat/./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://LiveHelperChat/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://LiveHelperChat/webpack/bootstrap","webpack://LiveHelperChat/webpack/runtime/load script","webpack://LiveHelperChat/webpack/runtime/compat get default export","webpack://LiveHelperChat/webpack/runtime/define property getters","webpack://LiveHelperChat/webpack/runtime/ensure chunk","webpack://LiveHelperChat/webpack/runtime/get javascript chunk filename","webpack://LiveHelperChat/webpack/runtime/global","webpack://LiveHelperChat/webpack/runtime/hasOwnProperty shorthand","webpack://LiveHelperChat/webpack/runtime/make namespace object","webpack://LiveHelperChat/webpack/runtime/publicPath","webpack://LiveHelperChat/webpack/runtime/jsonp chunk loading","webpack://LiveHelperChat/./src/index.js"],"sourcesContent":["\"use strict\";\n\n// rawAsap provides everything we need except exception management.\nvar rawAsap = require(\"./raw\");\n// RawTasks are recycled to reduce GC churn.\nvar freeTasks = [];\n// We queue errors to ensure they are thrown in right order (FIFO).\n// Array-as-queue is good enough here, since we are just dealing with exceptions.\nvar pendingErrors = [];\nvar requestErrorThrow = rawAsap.makeRequestCallFromTimer(throwFirstError);\n\nfunction throwFirstError() {\n if (pendingErrors.length) {\n throw pendingErrors.shift();\n }\n}\n\n/**\n * Calls a task as soon as possible after returning, in its own event, with priority\n * over other events like animation, reflow, and repaint. An error thrown from an\n * event will not interrupt, nor even substantially slow down the processing of\n * other events, but will be rather postponed to a lower priority event.\n * @param {{call}} task A callable object, typically a function that takes no\n * arguments.\n */\nmodule.exports = asap;\nfunction asap(task) {\n var rawTask;\n if (freeTasks.length) {\n rawTask = freeTasks.pop();\n } else {\n rawTask = new RawTask();\n }\n rawTask.task = task;\n rawAsap(rawTask);\n}\n\n// We wrap tasks with recyclable task objects. A task object implements\n// `call`, just like a function.\nfunction RawTask() {\n this.task = null;\n}\n\n// The sole purpose of wrapping the task is to catch the exception and recycle\n// the task object after its single use.\nRawTask.prototype.call = function () {\n try {\n this.task.call();\n } catch (error) {\n if (asap.onerror) {\n // This hook exists purely for testing purposes.\n // Its name will be periodically randomized to break any code that\n // depends on its existence.\n asap.onerror(error);\n } else {\n // In a web browser, exceptions are not fatal. However, to avoid\n // slowing down the queue of pending tasks, we rethrow the error in a\n // lower priority turn.\n pendingErrors.push(error);\n requestErrorThrow();\n }\n } finally {\n this.task = null;\n freeTasks[freeTasks.length] = this;\n }\n};\n","\"use strict\";\n\n// Use the fastest means possible to execute a task in its own turn, with\n// priority over other events including IO, animation, reflow, and redraw\n// events in browsers.\n//\n// An exception thrown by a task will permanently interrupt the processing of\n// subsequent tasks. The higher level `asap` function ensures that if an\n// exception is thrown by a task, that the task queue will continue flushing as\n// soon as possible, but if you use `rawAsap` directly, you are responsible to\n// either ensure that no exceptions are thrown from your task, or to manually\n// call `rawAsap.requestFlush` if an exception is thrown.\nmodule.exports = rawAsap;\nfunction rawAsap(task) {\n if (!queue.length) {\n requestFlush();\n flushing = true;\n }\n // Equivalent to push, but avoids a function call.\n queue[queue.length] = task;\n}\n\nvar queue = [];\n// Once a flush has been requested, no further calls to `requestFlush` are\n// necessary until the next `flush` completes.\nvar flushing = false;\n// `requestFlush` is an implementation-specific method that attempts to kick\n// off a `flush` event as quickly as possible. `flush` will attempt to exhaust\n// the event queue before yielding to the browser's own event loop.\nvar requestFlush;\n// The position of the next task to execute in the task queue. This is\n// preserved between calls to `flush` so that it can be resumed if\n// a task throws an exception.\nvar index = 0;\n// If a task schedules additional tasks recursively, the task queue can grow\n// unbounded. To prevent memory exhaustion, the task queue will periodically\n// truncate already-completed tasks.\nvar capacity = 1024;\n\n// The flush function processes all tasks that have been scheduled with\n// `rawAsap` unless and until one of those tasks throws an exception.\n// If a task throws an exception, `flush` ensures that its state will remain\n// consistent and will resume where it left off when called again.\n// However, `flush` does not make any arrangements to be called again if an\n// exception is thrown.\nfunction flush() {\n while (index < queue.length) {\n var currentIndex = index;\n // Advance the index before calling the task. This ensures that we will\n // begin flushing on the next task the task throws an error.\n index = index + 1;\n queue[currentIndex].call();\n // Prevent leaking memory for long chains of recursive calls to `asap`.\n // If we call `asap` within tasks scheduled by `asap`, the queue will\n // grow, but to avoid an O(n) walk for every task we execute, we don't\n // shift tasks off the queue after they have been executed.\n // Instead, we periodically shift 1024 tasks off the queue.\n if (index > capacity) {\n // Manually shift all values starting at the index back to the\n // beginning of the queue.\n for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {\n queue[scan] = queue[scan + index];\n }\n queue.length -= index;\n index = 0;\n }\n }\n queue.length = 0;\n index = 0;\n flushing = false;\n}\n\n// `requestFlush` is implemented using a strategy based on data collected from\n// every available SauceLabs Selenium web driver worker at time of writing.\n// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593\n\n// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that\n// have WebKitMutationObserver but not un-prefixed MutationObserver.\n// Must use `global` or `self` instead of `window` to work in both frames and web\n// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.\n\n/* globals self */\nvar scope = typeof global !== \"undefined\" ? global : self;\nvar BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver;\n\n// MutationObservers are desirable because they have high priority and work\n// reliably everywhere they are implemented.\n// They are implemented in all modern browsers.\n//\n// - Android 4-4.3\n// - Chrome 26-34\n// - Firefox 14-29\n// - Internet Explorer 11\n// - iPad Safari 6-7.1\n// - iPhone Safari 7-7.1\n// - Safari 6-7\nif (typeof BrowserMutationObserver === \"function\") {\n requestFlush = makeRequestCallFromMutationObserver(flush);\n\n// MessageChannels are desirable because they give direct access to the HTML\n// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera\n// 11-12, and in web workers in many engines.\n// Although message channels yield to any queued rendering and IO tasks, they\n// would be better than imposing the 4ms delay of timers.\n// However, they do not work reliably in Internet Explorer or Safari.\n\n// Internet Explorer 10 is the only browser that has setImmediate but does\n// not have MutationObservers.\n// Although setImmediate yields to the browser's renderer, it would be\n// preferrable to falling back to setTimeout since it does not have\n// the minimum 4ms penalty.\n// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and\n// Desktop to a lesser extent) that renders both setImmediate and\n// MessageChannel useless for the purposes of ASAP.\n// https://github.com/kriskowal/q/issues/396\n\n// Timers are implemented universally.\n// We fall back to timers in workers in most engines, and in foreground\n// contexts in the following browsers.\n// However, note that even this simple case requires nuances to operate in a\n// broad spectrum of browsers.\n//\n// - Firefox 3-13\n// - Internet Explorer 6-9\n// - iPad Safari 4.3\n// - Lynx 2.8.7\n} else {\n requestFlush = makeRequestCallFromTimer(flush);\n}\n\n// `requestFlush` requests that the high priority event queue be flushed as\n// soon as possible.\n// This is useful to prevent an error thrown in a task from stalling the event\n// queue if the exception handled by Node.js’s\n// `process.on(\"uncaughtException\")` or by a domain.\nrawAsap.requestFlush = requestFlush;\n\n// To request a high priority event, we induce a mutation observer by toggling\n// the text of a text node between \"1\" and \"-1\".\nfunction makeRequestCallFromMutationObserver(callback) {\n var toggle = 1;\n var observer = new BrowserMutationObserver(callback);\n var node = document.createTextNode(\"\");\n observer.observe(node, {characterData: true});\n return function requestCall() {\n toggle = -toggle;\n node.data = toggle;\n };\n}\n\n// The message channel technique was discovered by Malte Ubl and was the\n// original foundation for this library.\n// http://www.nonblocking.io/2011/06/windownexttick.html\n\n// Safari 6.0.5 (at least) intermittently fails to create message ports on a\n// page's first load. Thankfully, this version of Safari supports\n// MutationObservers, so we don't need to fall back in that case.\n\n// function makeRequestCallFromMessageChannel(callback) {\n// var channel = new MessageChannel();\n// channel.port1.onmessage = callback;\n// return function requestCall() {\n// channel.port2.postMessage(0);\n// };\n// }\n\n// For reasons explained above, we are also unable to use `setImmediate`\n// under any circumstances.\n// Even if we were, there is another bug in Internet Explorer 10.\n// It is not sufficient to assign `setImmediate` to `requestFlush` because\n// `setImmediate` must be called *by name* and therefore must be wrapped in a\n// closure.\n// Never forget.\n\n// function makeRequestCallFromSetImmediate(callback) {\n// return function requestCall() {\n// setImmediate(callback);\n// };\n// }\n\n// Safari 6.0 has a problem where timers will get lost while the user is\n// scrolling. This problem does not impact ASAP because Safari 6.0 supports\n// mutation observers, so that implementation is used instead.\n// However, if we ever elect to use timers in Safari, the prevalent work-around\n// is to add a scroll event listener that calls for a flush.\n\n// `setTimeout` does not call the passed callback if the delay is less than\n// approximately 7 in web workers in Firefox 8 through 18, and sometimes not\n// even then.\n\nfunction makeRequestCallFromTimer(callback) {\n return function requestCall() {\n // We dispatch a timeout with a specified delay of 0 for engines that\n // can reliably accommodate that request. This will usually be snapped\n // to a 4 milisecond delay, but once we're flushing, there's no delay\n // between events.\n var timeoutHandle = setTimeout(handleTimer, 0);\n // However, since this timer gets frequently dropped in Firefox\n // workers, we enlist an interval handle that will try to fire\n // an event 20 times per second until it succeeds.\n var intervalHandle = setInterval(handleTimer, 50);\n\n function handleTimer() {\n // Whichever timer succeeds will cancel both timers and\n // execute the callback.\n clearTimeout(timeoutHandle);\n clearInterval(intervalHandle);\n callback();\n }\n };\n}\n\n// This is for `asap.js` only.\n// Its name will be periodically randomized to break any code that depends on\n// its existence.\nrawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;\n\n// ASAP was originally a nextTick shim included in Q. This was factored out\n// into this ASAP package. It was later adapted to RSVP which made further\n// amendments. These decisions, particularly to marginalize MessageChannel and\n// to capture the MutationObserver implementation in a closure, were integrated\n// back into ASAP proper.\n// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js\n","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","import _typeof from \"./typeof.js\";\nimport assertThisInitialized from \"./assertThisInitialized.js\";\nexport default function _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n\n return assertThisInitialized(self);\n}","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","import {UIConsturctor} from './UIConsturctor';\nimport {helperFunctions} from './helperFunctions';\n\nexport class UIConstructorIframe extends UIConsturctor {\n\n constructor(elementId, style, attributes, tagname, documentRef) {\n super(elementId, style, attributes, tagname, documentRef);\n this.bodyId = '';\n }\n\n constructUIIframe(style, dir, cl, header) {\n\n if (typeof dir === 'undefined'){\n dir = 'ltr';\n }\n\n if (typeof cl === 'undefined'){\n cl = 'en';\n }\n\n if (typeof header === 'undefined'){\n header = '';\n }\n\n this.elmDomDoc = helperFunctions.getDocument(this.elmDom);\n if (this.elmDomDoc === null) return null;\n\n try {\n this.elmDomDoc.getElementsByTagName(\"head\")[0].innerHTML = ''+header;\n\n if (this.bodyId != '') {\n this.elmDomDoc.body.id = this.bodyId;\n }\n\n var html = this.elmDomDoc.getElementsByTagName(\"html\")[0];\n html.setAttribute(\"lang\", cl);\n html.setAttribute(\"dir\", dir);\n\n var nodeDoctype = document.implementation.createDocumentType(\n 'html',\n '',\n ''\n );\n\n if (this.elmDomDoc.doctype) {\n this.elmDomDoc.replaceChild(nodeDoctype, this.elmDomDoc.doctype);\n } else {\n this.elmDomDoc.insertBefore(nodeDoctype, this.elmDomDoc.childNodes[0]);\n }\n\n } catch (e) {\n console.log(e);\n }\n\n this.insertCssFile(style);\n this.insertContent();\n };\n\n insertContent () {\n this.elmDomDoc.body.innerHTML = this.tmpl\n };\n};\n\n","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}","import {helperFunctions} from './helperFunctions';\nimport {settings} from './settings.js';\nimport {domEventsHandler} from '../util/domEventsHandler';\n\nexport class UIConsturctor {\n constructor(elementId, style, attributes, tagname, documentRef) {\n var f = this;\n this.elementId = elementId || \"\";\n this.style = style || \"\";\n this.tagName = tagname || \"div\";\n this.tmpl = \"\";\n this.elmDom = null;\n this.elmDomDoc = documentRef || document;\n this.attributes = {};\n this.classNames = [];\n\n this.elementId && (this.attributes.id = this.elementId);\n\n attributes && Object.keys(attributes).forEach(function (attr) {\n f.attributes[attr] = attributes[attr]\n })\n }\n\n constructUI(a) {\n this.elmDomDoc =\n a || this.elmDomDoc;\n this.elmDom = helperFunctions.initElement(this.elmDomDoc, this.tagName, this.attributes, this.style, this.tmpl);\n this.elmDom.className += this.classNames.join(\" \");\n return this.elmDom\n };\n\n restyle(attr, style) {\n style && (this.elmDom ? this.elmDom.style.cssText += \";\" + attr + \":\" + style : this.style += \";\" + attr + \":\" + style)\n };\n\n attachUserEventListener(a, c, d, k) {\n var e;\n if (e = d ? this.getElementById(d) : this.elmDom) d = a.split(\" \"), 1 < d.length ? d.forEach(function (a) {\n domEventsHandler.listen(e, a, c, a + k)\n }) : domEventsHandler.listen(e, a, c, k)\n };\n\n getElementById(a) {\n return this.elmDom ? this.elmDomDoc.getElementById(a) : null\n };\n\n hide() {\n this.restyle(\"display\", \"none !important\");\n }\n\n show() {\n this.restyle(\"display\", \"block !important\");\n }\n\n insertCssFile(style, reset) {\n var d = this.elmDomDoc.getElementsByTagName(\"head\")[0],\n k = this.elmDomDoc.createDocumentFragment(),\n e = helperFunctions.initElement(this.elmDomDoc, \"style\", {type: \"text/css\"}),\n f = this.elmDomDoc.createTextNode(reset ? style : settings.ResetStyle + \"\" + style);\n k.appendChild(e);\n d.appendChild(k);\n e.styleSheet ? e.styleSheet.cssText = f.nodeValue : e.appendChild(f)\n }\n\n insertCssRemoteFile(attr) {\n\n var elm = null;\n\n if (attr.id && attr.href && (elm = this.elmDomDoc.getElementById(attr.id)) !== null) {\n elm.href = attr.href\n return;\n }\n\n var d = this.elmDomDoc.getElementsByTagName(\"head\")[0],\n k = this.elmDomDoc.createDocumentFragment(),\n e = this.elmDomDoc.createElement('link');\n\n e.rel = \"stylesheet\";\n e.crossOrigin = \"*\";\n\n for (var b in attr) e[b] = attr[b];\n\n k.appendChild(e);\n d.appendChild(k);\n }\n\n insertJSFile(src, async, loadcb, attr) {\n var d = this.elmDomDoc.getElementsByTagName(\"head\")[0],\n k = this.elmDomDoc.createDocumentFragment(),\n e = this.elmDomDoc.createElement('script');\n\n e.type = 'text/javascript';\n if (typeof async === 'undefined' || async === true) {\n e.async = true;\n }\n\n e.crossOrigin = \"*\";\n e.src = src;\n\n if (loadcb) {\n e.onload = loadcb;\n }\n\n if (attr) {\n Object.keys(attr).forEach(key => {\n e.setAttribute(key,attr[key]);\n })\n }\n\n k.appendChild(e);\n d.appendChild(k);\n }\n\n massRestyle(a) {\n for (var b in a) a.hasOwnProperty(b) && this.restyle(b, a[b])\n }\n};\n\n","\nclass _chatNotifications {\n constructor() {\n this.isNotificationsSubscribed = false;\n this.applicationServerPublicKey = null;\n this.eventEmitter = null;\n }\n\n setPublicKey(publicKey, eventEmitter) {\n this.applicationServerPublicKey = publicKey\n this.eventEmitter = eventEmitter\n }\n\n sendNotification() {\n\n var that = this;\n var applicationServerPublicKey = this.applicationServerPublicKey;\n\n var swRegistration = null;\n\n if (!('serviceWorker' in navigator) || !('PushManager' in window)) {\n alert(\"This browser does not support desktop notification\");\n return;\n }\n\n // Let's check if the browser supports notifications\n if (!(\"Notification\" in window)) {\n alert(\"This browser does not support desktop notification\");\n return;\n }\n // Let's check whether notification permissions have already been granted\n else if (Notification.permission === \"granted\") {\n // If it's okay let's create a notification\n //\n }\n // Otherwise, we need to ask the user for permission\n else if (Notification.permission !== \"denied\") {\n Notification.requestPermission(function (permission) {\n // If the user accepts, let's create a notification\n if (permission !== \"granted\") {\n alert('Sorry but you have denied notification!');\n return;\n }\n });\n } else if (Notification.permission === \"denied\") {\n alert('Sorry but you have denied notification!');\n return;\n }\n\n function urlB64ToUint8Array(base64String) {\n var padding = '='.repeat((4 - base64String.length % 4) % 4);\n var base64 = (base64String + padding)\n .replace(/\\-/g, '+')\n .replace(/_/g, '/');\n\n var rawData = window.atob(base64);\n var outputArray = new Uint8Array(rawData.length);\n\n for (var i = 0; i < rawData.length; ++i) {\n outputArray[i] = rawData.charCodeAt(i);\n }\n return outputArray;\n }\n\n function updateSubscriptionOnServer(subscription, subscribe) {\n if (subscription === null) {\n return;\n }\n\n var key = subscription.getKey('p256dh');\n var token = subscription.getKey('auth');\n var contentEncoding = (PushManager.supportedContentEncodings || ['aesgcm'])[0];\n\n var payload = JSON.stringify({\n endpoint: subscription.endpoint,\n publicKey: key ? btoa(String.fromCharCode.apply(null, new Uint8Array(key))) : null,\n authToken: token ? btoa(String.fromCharCode.apply(null, new Uint8Array(token))) : null,\n contentEncoding : contentEncoding\n });\n\n that.eventEmitter.emitEvent('subcribedEvent', [{'payload' : payload}]);\n }\n\n var that = this;\n\n function subscribeUser() {\n var applicationServerKey = urlB64ToUint8Array(applicationServerPublicKey);\n swRegistration.pushManager.subscribe({\n 'userVisibleOnly': true,\n 'applicationServerKey': applicationServerKey\n }).then(function(subscription) {\n updateSubscriptionOnServer(subscription, true);\n that.isNotificationsSubscribed = true;\n });\n }\n\n function unsubscribeUser() {\n swRegistration.pushManager.getSubscription().then(function(subscription) {\n if (subscription) {\n updateSubscriptionOnServer(subscription,false);\n return subscription.unsubscribe();\n }\n }).then(function() {\n alert('You have unsubscribed!');\n that.isNotificationsSubscribed = false;\n });\n }\n\n function initializeUI() {\n // Set the initial subscription value\n swRegistration.pushManager.getSubscription().then(function(subscription) {\n that.isNotificationsSubscribed = !(subscription === null);\n if (that.isNotificationsSubscribed) {\n subscribeUser();\n } else {\n subscribeUser();\n }\n });\n }\n\n // At last, if the user has denied notifications, and you\n // want to be respectful there is no need to bother them any more.\n navigator.serviceWorker.register('/sw.lhc.js?v=2').then(function(swReg) {\n swRegistration = swReg;\n initializeUI();\n });\n\n }\n\n};\n\nconst chatNotifications = new _chatNotifications();\nexport { chatNotifications };","\nclass _helperFunctions {\n constructor() {\n }\n\n initElement(a, c, b, k, s) {\n var e;\n a = a.createElement(c);\n b = b || {};\n for (e in b) a[e] = b[e];\n s && \"iframe\" !== c && (a.innerHTML = s);\n k && (a.style.cssText = k);\n return a\n };\n \n getDocument(a) {\n return a.contentWindow ? a.contentWindow.document : a.contentDocument ? a.contentDocument : a.document ? a.document : null\n };\n\n removeById(EId)\n {\n var EObj = null;\n return(EObj = document.getElementById(EId)) ? EObj.parentNode.removeChild(EObj) : false;\n }\n\n // Returns time zone offset\n getTzOffset() {\n try {\n return Intl.DateTimeFormat().resolvedOptions().timeZone;\n } catch (e) {\n Date.prototype.stdTimezoneOffset = function() {\n var jan = new Date(this.getFullYear(), 0, 1);\n var jul = new Date(this.getFullYear(), 6, 1);\n return Math.max(jan.getTimezoneOffset(), jul.getTimezoneOffset());\n };\n\n Date.prototype.dst = function() {\n return this.getTimezoneOffset() < this.stdTimezoneOffset();\n };\n\n var today = new Date();\n var timeZoneOffset = 0;\n\n if (today.dst()) {\n timeZoneOffset = today.getTimezoneOffset();\n } else {\n timeZoneOffset = today.getTimezoneOffset()-60;\n };\n\n return (timeZoneOffset/60)*-1;\n }\n };\n\n getAbstractStyle(params) {\n return [\n \"outline: \" + (params.outline ? params.outline : \"none\") + \" !important; \",\n \"visibility: \" + (params.visibility ? params.visibility : \"visible\") + \" !important; \",\n \"resize: \" + (params.resize ? params.resize : \"none\") + \" !important; \",\n \"box-shadow: \" + (params.boxshadow ? params.boxshadow : \"none\") + \" ; \",\n \"overflow: \" + (params.overflow ? params.overflow : \"visible\") + \" ; \",\n \"background : \" + (params.background ? params.background : \"none\") + \" !important; \",\n \"opacity : \" + (params.opacity ? params.opacity : \"1\") + \" !important; \",\n \"filter : alpha(opacity=\" + (params.opacity ? 100 * params.opacity : \"100\") + \") !important; \",\n \"-ms-filter : progid:DXImageTransform.Microsoft.Alpha(Opacity\" + (params.opacity ? params.opacity : \"1\") + \") !important; \",\n \"-moz-opacity : \" + (params.opacity ? params.opacity : \"1\") + \" !important; \",\n \"-khtml-opacity : \" + (params.opacity ? params.opacity : \"1\") + \" !important; \",\n \"top : \" + (params.top ? params.top : \"auto\") + \"; \",\n \"right : \" + (params.right ? params.right : \"auto\") + \"; \",\n \"bottom : \" + (params.bottom ? params.bottom : \"auto\") + \"; \",\n \"left : \" + (params.left ? params.left : \"auto\") + \"; \",\n \"position : \" + (params.position ? params.position : \"absolute\") + \" !important; \",\n \"border : \" + (params.border ? params.border : \"0\") + \" !important; \",\n \"min-height : \" + (params.minheight ? params.minheight : \"auto\") + \"; \",\n \"min-width : \" + (params.minwidth ? params.minwidth : \"auto\") + \"; \",\n \"max-height : \" + (params.maxheight ? params.maxheight : \"none\") + \"; \",\n \"max-width : \" + (params.maxwidth ? params.maxwidth : \"none\") + \"; \",\n \"padding : \" + (params.padding ? params.padding : \"0\") + \" !important; \",\n \"margin : \" + (params.margin ? params.margin : \"0\") + \" !important; \",\n \"-moz-transition-property : \" + (params.transition ? params.transition : \"none\") + \" !important; \",\n \"-webkit-transition-property : \" + (params.transition ? params.transition : \"none\") + \" !important; \",\n \"-o-transition-property : \" + (params.transition ? params.transition : \"none\") + \" !important; \",\n \"transition-property : \" + (params.transition ? params.transition : \"none\") + \" !important; \",\n \"transform : \" + (params.transform ? params.transform : \"none\") + \" !important; \",\n \"-webkit-transform : \" + (params.transform ? params.transform : \"none\") + \" !important; \",\n \"-ms-transform : \" + (params.transform ? params.transform : \"none\") + \" !important; \",\n \"width : \" + (params.width ? params.width : \"auto\") + \" ; \",\n \"height : \" + (params.height ? params.height : \"auto\") + \" ; \",\n \"display : \" + (params.display ? params.display : \"block\") + \" !important; \",\n \"z-index : \" + (params.zindex ? params.zindex : \"none\") + \" ; \",\n \"background-color : \" + (params.backgroundcolor ? params.backgroundcolor : \"transparent\") + \" !important; \",\n \"cursor : \" + (params.cursor ? params.cursor : \"auto\") + \" !important; \",\n \"float : \" + (params[\"float\"] ? params[\"float\"] : \"none\") + \" !important; \",\n \"border-radius : \" + (params.borderRadius ? params.borderRadius : \"unset\") + \"; \"].join(\"\").replace(/\\s/gm, \"\")\n };\n\n hasClass(element, className) {\n if (element === null) return;\n return element.classList ? element.classList.contains(className) : !!element.className.match(RegExp(\"(\\\\s|^)\" + className + \"(\\\\s|$)\"))\n }\n\n addClass(element, className) {\n if (element === null) return;\n element.classList ? element.classList.add(className) : this.hasClass(element, className) || (element.className += \" \" + className)\n }\n\n removeClass(element, className) {\n if (element === null) return;\n element.classList ? element.classList.remove(className) : this.hasClass(element, className) && (element.className = element.className.replace(RegExp(\"(\\\\s|^)\" + className + \"(\\\\s|$)\"), \" \"))\n }\n\n makeScreenshot(screenshot,url) {\n var inst = this;\n if (typeof html2canvas == \"undefined\") {\n var th = document.getElementsByTagName('head')[0];\n var s = document.createElement('script');\n s.setAttribute('type','text/javascript');\n s.setAttribute('src',screenshot);\n th.appendChild(s);\n\n s.onreadystatechange = s.onload = () => {\n this.makeScreenshot(screenshot, url);\n };\n } else {\n try {\n html2canvas(document.body).then(function(canvas) {\n var xhr = new XMLHttpRequest();\n xhr.open( \"POST\", url, true);\n xhr.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n xhr.send( \"data=\" + encodeURIComponent( canvas.toDataURL() ) );\n });\n } catch(err) {\n console.log(err);\n }\n }\n }\n\n makeQuery(params)\n {\n var item, pairs = [];\n for (item in params) {\n if (params[item] != '' && params[item] != null) {\n params.hasOwnProperty(item) && pairs.push(encodeURIComponent(item) + \"=\" + encodeURIComponent(params[item]));\n }\n }\n return pairs.join(\"&\")\n }\n \n makeRequest(url, params, callback) {\n var request = new XMLHttpRequest;\n var urlRequest = url + '?' + this.makeQuery(params.params);\n request.open(\"GET\",urlRequest, true);\n request.onreadystatechange = function () {\n if (4 == request.readyState && request.status != 0) {\n try {\n callback(JSON.parse(request.responseText));\n } catch (e) {\n e.message += \"\\n\" + urlRequest + \"\\n\" + \"[\"+request.status+\"]\\n\" + request.responseText;\n throw e;\n }\n }\n };\n request.send();\n return {type: \"xhr\", req: request}\n }\n\n insertCssRemoteFile(attr) {\n\n var elm = null;\n\n if (attr.id && attr.href && (elm = document.getElementById(attr.id)) !== null) {\n elm.href = attr.href\n return;\n }\n\n var d = document.getElementsByTagName(\"head\")[0],\n k = document.createDocumentFragment(),\n e = document.createElement('link');\n\n e.rel = \"stylesheet\";\n e.crossOrigin = \"*\";\n\n for (var b in attr) e[b] = attr[b];\n\n k.appendChild(e);\n d.appendChild(k);\n }\n};\n\nconst helperFunctions = new _helperFunctions();\nexport { helperFunctions };","var settings = {};\n\nsettings.ResetStyle = \"html,body,div,span,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,abbr,address,cite,code,del,dfn,em,img,ins,kbd,q,samp,small,strong,sub,sup,var,b,i,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}nav ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}a{margin:0;padding:0;font-size:100%;vertical-align:baseline;background:transparent}ins{background-color:#ff9;color:#000;text-decoration:none}mark{background-color:#ff9;color:#000;font-style:italic;font-weight:bold}del{text-decoration:line-through}abbr[title],dfn[title]{border-bottom:1px dotted;cursor:help}table{border-collapse:collapse;border-spacing:0}hr{display:block;height:1px;border:0;border-top:1px solid #ccc;margin:1em 0;padding:0}input,select{vertical-align:middle}html,body{height: 100% !important;\\n\" +\n \" min-height: 100% !important;\\n\" +\n \" max-height: 100% !important;\\n\" +\n \" width: 100% !important;\\n\" +\n \" min-width: 100% !important;\\n\" +\n \" max-width: 100% !important;}body{display: flex;flex-direction: column;background:transparent;font:13px Helvetica,Arial,sans-serif;position:relative}.clear{clear:both}.clearfix:after{content:'';display:block;height:0;clear:both;visibility:hidden}\";\n\nexport {settings};","import {UIConsturctor} from '../UIConsturctor';\n\nexport class containerChat{\n constructor(prefix, pnode) {\n this.cont = new UIConsturctor((prefix || 'lhc')+'_container_v2', \"border: 0 none !important; padding: 0 !important; margin: 0 !important; z-index: 999999999 !important; overflow : visible !important; min-width: 0 !important; min-height: 0 !important; max-width: none !important; max-height: none !important; width : auto !important; height : auto !important;\");\n this.cont.constructUI();\n (!!pnode && document.getElementById(pnode).appendChild(this.cont.elmDom)) || document.body.appendChild(this.cont.elmDom);\n }\n}","import {UIConstructorIframe} from '../UIConstructorIframe';\nimport {helperFunctions} from '../helperFunctions';\n\nexport class mainWidget{\n constructor(prefix) {\n\n this.attributes = {};\n\n this.width = '350';\n this.height = '520';\n this.bottom = '30';\n this.right = '30';\n this.units = 'px';\n this.originalCSS = '';\n this.bottom_override = false;\n\n this.cont = new UIConstructorIframe((prefix || 'lhc')+'_widget_v2', helperFunctions.getAbstractStyle({\n zindex: \"2147483640\",\n width: \"95px\",\n height: \"95px\",\n position: \"fixed\",\n display: \"none\",\n maxheight: \"95px\",\n maxwidth: \"95px\",\n minheight: \"95px\",\n minwidth: \"95px\"\n }), null, \"iframe\");\n\n this.isLoaded = false;\n\n this.loadStatus = {main: false, css: false};\n }\n\n resize() {\n\n let restyleStyle = {\n height: this.height + this.units,\n \"min-height\": this.height + this.units,\n \"max-height\": this.height + this.units,\n width: this.width + this.units,\n \"min-width\": this.width + this.units,\n \"max-width\": this.width + this.units,\n bottom: (this.units == 'px' ? this.bottom + \"px\" : '0px')\n };\n\n if ((this.attributes.position_placement == 'middle_right' || this.attributes.position_placement == 'middle_left') && this.bottom_override == true) {\n restyleStyle['bottom'] = \"calc(50% + 20px)\";\n }\n\n if (this.attributes.position_placement == 'middle_left' || this.attributes.position_placement == 'bottom_left' || this.attributes.position_placement == 'full_height_left') {\n restyleStyle['left'] = (this.units == 'px' ? this.right + \"px\" : '0px');\n } else {\n restyleStyle['right'] = (this.units == 'px' ? this.right + \"px\" : '0px');\n }\n\n if ((this.attributes.position_placement == 'full_height_right' || this.attributes.position_placement == 'full_height_left') && !this.bottom_override) {\n restyleStyle['min-height'] = '100%';\n restyleStyle['max-height'] = '100%';\n restyleStyle['height'] = '100%';\n restyleStyle['bottom'] = '0px';\n\n if (this.attributes.position_placement == 'full_height_left') {\n restyleStyle['left'] = '0px';\n } else {\n restyleStyle['right'] = '0px';\n }\n }\n\n if (this.attributes.mode == 'embed') {\n restyleStyle[\"max-width\"] = '100%';\n restyleStyle[\"min-width\"] = '100%';\n restyleStyle[\"width\"] = '100%';\n restyleStyle[\"position\"] = (this.attributes.fscreen ? 'fixed' : 'relative') + '!important';\n restyleStyle[\"bottom\"] = 'auto';\n restyleStyle[\"right\"] = 'auto';\n }\n\n this.cont.massRestyle(restyleStyle);\n }\n\n checkLoadStatus() {\n if (this.loadStatus['main'] == true && this.loadStatus['css'] == true ) {\n this.attributes.wloaded.next(true);\n }\n }\n\n makeContent() {\n this.cont.bodyId = 'chat-widget';\n\n this.cont.tmpl = '
';\n\n if (this.cont.constructUIIframe('', this.attributes.staticJS['dir'], this.attributes.staticJS['cl'], this.attributes.hhtml) === null) {\n this.isLoaded = true;\n return null;\n }\n\n this.cont.elmDom.className = this.attributes.isMobile === true ? 'lhc-mobile lhc-mode-'+this.attributes.mode : 'lhc-desktop lhc-mode-'+this.attributes.mode;\n\n if (this.attributes.cont_ss) {\n this.originalCSS = this.cont.elmDom.style.cssText;\n this.cont.elmDom.style.cssText += this.attributes.cont_ss;\n }\n }\n\n init(attributes, lazyLoad) {\n\n this.attributes = attributes;\n\n if (this.makeContent() === null) {\n return null;\n };\n\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n\n if (chatParams['id'] || !lazyLoad) {\n this.bootstrap();\n }\n \n this.toggleVisibilityWrap = (data) => {\n this.toggleVisibility(data);\n };\n\n attributes.widgetStatus.subscribe(this.toggleVisibilityWrap);\n\n this.monitorDimensionsWrap = (data) => {\n this.monitorDimensions(data);\n };\n\n if (attributes.widgetDimesions.valueInternal['units'] == 'px' && this.attributes.isMobile == false && this.attributes.mode != 'embed' && this.attributes.position_placement != 'full_height_right' && this.attributes.position_placement != 'full_height_left')\n {\n this.screenAttributesUpdate = () => {\n\n if (window.innerHeight < attributes.widgetDimesions.valueInternal['height'] + 60) {\n attributes.widgetDimesions.nextPropertySilent('height_soverride', window.innerHeight - 60);\n } else {\n attributes.widgetDimesions.nextPropertySilent('height_soverride', null);\n }\n\n if (window.innerWidth < attributes.widgetDimesions.valueInternal['width'] + 60) {\n attributes.widgetDimesions.nextPropertySilent('width_soverride', window.innerWidth - 60);\n } else {\n attributes.widgetDimesions.nextPropertySilent('width_soverride', null);\n }\n\n attributes.widgetDimesions.callListeners();\n };\n\n this.screenAttributesUpdate();\n\n window.addEventListener('resize', this.screenAttributesUpdate);\n }\n\n attributes.widgetDimesions.subscribe(this.monitorDimensionsWrap);\n\n attributes.eventEmitter.addListener('reloadWidget',() => {\n this.isLoaded = false;\n this.makeContent();\n attributes.eventEmitter.emitEvent('widgetHeight',[{'reset_height' : true}]);\n this.toggleVisibility(attributes.widgetStatus.valueInternal);\n });\n\n }\n\n bootstrap() {\n\n if (this.isLoaded === true) {\n return ;\n }\n\n this.isLoaded = true;\n\n if (this.attributes.staticJS['fontCSS']) {\n this.cont.insertCssRemoteFile({rel:\"stylesheet\", crossOrigin : \"anonymous\", href : this.attributes.staticJS['fontCSS']});\n }\n\n if (this.attributes.theme) {\n this.cont.insertCssRemoteFile({crossOrigin : \"anonymous\", href : this.attributes.LHC_API.args.lhc_base_url + '/widgetrestapi/theme/' + this.attributes.theme + '?v=' + this.attributes.theme_v}, true);\n }\n\n this.cont.insertCssRemoteFile({onload: () => {\n this.loadStatus['css'] = true;\n this.checkLoadStatus();\n },crossOrigin : \"anonymous\", href : this.attributes.staticJS['widget_css']}, true);\n\n if (this.attributes.isMobile == true && this.attributes.mode == 'widget') {\n this.cont.insertCssRemoteFile({crossOrigin : \"anonymous\", href : this.attributes.staticJS['widget_mobile_css']});\n }\n\n if (this.attributes.mode == 'embed') {\n this.cont.insertCssRemoteFile({crossOrigin : \"anonymous\", href : this.attributes.staticJS['embed_css'] });\n\n if (this.attributes.staticJS['page_css']) {\n helperFunctions.insertCssRemoteFile({crossOrigin : \"anonymous\", id: \"lhc-theme-page\", href : this.attributes.LHC_API.args.lhc_base_url + '/widgetrestapi/themepage/' + this.attributes.theme + '?v=' + this.attributes.theme_v});\n }\n }\n\n this.cont.insertJSFile(this.attributes.staticJS['vendor'], false, () => {\n this.cont.insertJSFile(this.attributes.staticJS['app'], false, () => {\n this.loadStatus['main'] = true;\n this.checkLoadStatus();\n }, {'scope': this.attributes.prefixLowercase});\n }, {'scope': this.attributes.prefixLowercase});\n\n if (this.attributes.staticJS['ex_js'] && this.attributes.staticJS['ex_js'].length > 0) {\n this.attributes.staticJS['ex_js'].forEach((item) => {\n this.cont.insertJSFile(item, false);\n });\n }\n }\n\n toggleVisibility(data) {\n data == false ? this.hide() : this.show();\n }\n\n monitorDimensions(data) {\n this.width = data.width_override || data.width_soverride || data.width;\n this.height = data.height_override || data.height_soverride || data.height;\n this.bottom = data.bottom_override ? (data.bottom_override + (data.wbottom ? data.wbottom : 0)) : (30 + (this.attributes.clinst === true ? 70 : 0) + (data.wbottom ? data.wbottom : 0));\n this.right = data.right_override ? (data.right_override + (data.wright_inv ? data.wright_inv : 0)) : (30 + (data.wright ? data.wright : 0));\n this.units = (data.width_override || data.height_override || data.bottom_override || data.right_override) ? 'px' : data.units;\n\n this.resize();\n\n this.bottom_override = !!data.bottom_override;\n }\n\n hide () {\n this.cont.hide();\n }\n\n hideInvitation() {\n if (this.attributes.cont_ss) {\n this.cont.elmDom.style.cssText += this.attributes.cont_ss;\n }\n }\n\n showInvitation() {\n if (this.attributes.cont_ss) {\n this.cont.elmDom.style.cssText = this.originalCSS;\n }\n this.show();\n }\n\n show () {\n if (this.isLoaded === false) {\n this.bootstrap();\n }\n this.cont.show();\n }\n}","export class mainWidgetPopup {\n constructor() {\n\n this.attributes = {};\n\n this.width = null;\n this.height = null;\n this.units = 'px';\n this.freeup();\n }\n\n freeup() {\n this.cont = {};\n }\n\n parseOptions() {\n var argumentsQuery = new Array();\n var paramsReturn = '';\n if (typeof this.attributes != 'undefined') {\n if (typeof this.attributes.LHCChatOptions.attr != 'undefined') {\n if (this.attributes.LHCChatOptions.attr.length > 0) {\n for (var index in this.attributes.LHCChatOptions.attr) {\n if (typeof this.attributes.LHCChatOptions.attr[index] != 'undefined' && typeof this.attributes.LHCChatOptions.attr[index].type != 'undefined') {\n argumentsQuery.push('name[]=' + encodeURIComponent(this.attributes.LHCChatOptions.attr[index].name) + '&encattr[]=' + (typeof this.attributes.LHCChatOptions.attr[index].encrypted != 'undefined' && this.attributes.LHCChatOptions.attr[index].encrypted == true ? 't' : 'f') + '&value[]=' + encodeURIComponent(this.attributes.LHCChatOptions.attr[index].value) + '&type[]=' + encodeURIComponent(this.attributes.LHCChatOptions.attr[index].type) + '&size[]=' + encodeURIComponent(this.attributes.LHCChatOptions.attr[index].size) + '&req[]=' + (typeof this.attributes.LHCChatOptions.attr[index].req != 'undefined' && this.attributes.LHCChatOptions.attr[index].req == true ? 't' : 'f') + '&sh[]=' + ((typeof this.attributes.LHCChatOptions.attr[index].show != 'undefined' && (this.attributes.LHCChatOptions.attr[index].show == 'on' || this.attributes.LHCChatOptions.attr[index].show == 'off')) ? this.attributes.LHCChatOptions.attr[index].show : 'b'));\n }\n }\n }\n }\n\n if (typeof this.attributes.LHCChatOptions.attr_prefill != 'undefined') {\n if (this.attributes.LHCChatOptions.attr_prefill.length > 0) {\n for (var index in this.attributes.LHCChatOptions.attr_prefill) {\n if (typeof this.attributes.LHCChatOptions.attr_prefill[index] != 'undefined' && typeof this.attributes.LHCChatOptions.attr_prefill[index].name != 'undefined') {\n argumentsQuery.push('prefill[' + this.attributes.LHCChatOptions.attr_prefill[index].name + ']=' + encodeURIComponent(this.attributes.LHCChatOptions.attr_prefill[index].value));\n }\n }\n }\n }\n\n if (typeof this.attributes.LHCChatOptions.attr_prefill_admin != 'undefined') {\n if (this.attributes.LHCChatOptions.attr_prefill_admin.length > 0) {\n for (var index in this.attributes.LHCChatOptions.attr_prefill_admin) {\n if (typeof this.attributes.LHCChatOptions.attr_prefill_admin[index] != 'undefined') {\n argumentsQuery.push('value_items_admin[' + this.attributes.LHCChatOptions.attr_prefill_admin[index].index + ']=' + encodeURIComponent(this.attributes.LHCChatOptions.attr_prefill_admin[index].value));\n }\n }\n }\n }\n\n if (argumentsQuery.length > 0) {\n paramsReturn = '&' + argumentsQuery.join('&');\n }\n }\n\n return paramsReturn;\n }\n\n init(attributes, chatEvents, paramsPopup) {\n\n if (this.cont.elementReferrerPopup && this.cont.elementReferrerPopup.closed === false) {\n typeof paramsPopup !== 'undefined' && paramsPopup.event !== 'undefined' && paramsPopup.event.preventDefault();\n this.cont.elementReferrerPopup.focus();\n } else {\n\n this.attributes = attributes;\n\n let attr = {\n 'static_chat': this.attributes['userSession'].getSessionAttributes()\n };\n\n let urlArgumetns = '';\n\n if (attr['static_chat']['id'] && attr['static_chat']['hash']) {\n urlArgumetns = urlArgumetns + \"/(id)/\" + attr['static_chat']['id'] + \"/(hash)/\" + attr['static_chat']['hash'];\n }\n\n if (this.attributes['theme'] !== null) {\n urlArgumetns = urlArgumetns + \"/(theme)/\" + this.attributes['theme'];\n }\n\n if (attr['static_chat']['vid'] !== null && this.attributes.storageHandler.cookieEnabled === true) {\n urlArgumetns = urlArgumetns + \"/(vid)/\" + attr['static_chat']['vid'];\n }\n\n if (this.attributes['isMobile']) {\n urlArgumetns = urlArgumetns + \"/(mobile)/true\";\n }\n\n if (this.attributes['department'].length > 0) {\n urlArgumetns = urlArgumetns + \"/(department)/\" + this.attributes['department'].join('/');\n }\n\n if (this.attributes['identifier'] != '') {\n urlArgumetns = urlArgumetns + \"/(identifier)/\" + this.attributes['identifier'];\n }\n\n if (this.attributes['operator']) {\n urlArgumetns = urlArgumetns + \"/(operator)/\" + this.attributes['operator'];\n }\n\n if (this.attributes['survey']) {\n urlArgumetns = urlArgumetns + \"/(survey)/\" + this.attributes['survey'];\n }\n\n if (this.attributes['bot_id']) {\n urlArgumetns = urlArgumetns + \"/(bot)/\" + this.attributes['bot_id'];\n }\n\n if (this.attributes['trigger_id']) {\n urlArgumetns = urlArgumetns + \"/(trigger)/\" + this.attributes['trigger_id'];\n }\n\n if (this.attributes['subject_id']) {\n urlArgumetns = urlArgumetns + \"/(subject)/\" + this.attributes['subject_id'];\n }\n\n if (this.attributes['priority']) {\n urlArgumetns = urlArgumetns + \"/(priority)/\" + this.attributes['priority'];\n }\n\n if (this.attributes['prefixLowercase'] != 'lhc') {\n urlArgumetns = urlArgumetns + \"/(scope)/\" + this.attributes['prefixLowercase'];\n }\n\n urlArgumetns = urlArgumetns + \"/(sound)/\" + (this.attributes.toggleSound.value == true ? 1 : 0);\n\n if (this.attributes['proactive']['invitation']) {\n urlArgumetns = urlArgumetns + \"/(inv)/\" + this.attributes['proactive']['invitation'];\n if (this.attributes['mode'] == 'popup') {\n this.attributes.storageHandler.setSessionStorage(this.attributes['prefixStorage']+'_invt', 1);\n }\n }\n\n var fontSize = this.attributes.storageHandler.getLocalStorage(this.attributes['prefixStorage']+'_dfs');\n\n if (fontSize) {\n urlArgumetns = urlArgumetns + \"/(fs)/\" + parseInt(fontSize);\n }\n\n if (this.attributes['leaveMessage'] === true) {\n urlArgumetns = urlArgumetns + \"/(leaveamessage)/true\";\n }\n\n if (this.attributes['userSession'].getSessionReferrer() !== null && this.attributes['userSession'].getSessionReferrer() != '') {\n urlArgumetns = urlArgumetns + '?ses_ref=' + this.attributes['userSession'].getSessionReferrer() + this.parseOptions();\n } else {\n urlArgumetns = urlArgumetns + '?' + this.parseOptions();\n }\n\n const dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : window.screenX;\n const dualScreenTop = window.screenTop !== undefined ? window.screenTop : window.screenY;\n\n const width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width;\n const height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height;\n\n const systemZoom = width / window.screen.availWidth;\n const left = (width - parseInt(this.attributes['popupDimesnions']['pwidth'])) / 2 / systemZoom + dualScreenLeft;\n const top = (height - parseInt(this.attributes['popupDimesnions']['pheight'])) / 2 / systemZoom + dualScreenTop;\n\n var paramsWindow = \"scrollbars=yes,menubar=1,resizable=1,width=\" + this.attributes['popupDimesnions']['pwidth'] + \",height=\" + this.attributes['popupDimesnions']['pheight'] + \",top=\" + top + \",left=\" + left;\n var newWin = window.open(\"\", this.attributes['prefixStorage'] + '_popup_v2', paramsWindow);\n var needWindow = false;\n var windowCreated = false;\n\n // First try to find any existing window\n try {\n // It has to be new window or popup was blocked\n if (!newWin || newWin.closed || typeof newWin.closed=='undefined' || newWin.location.href === \"about:blank\") {\n newWin = this.cont.elementReferrerPopup = window.open(this.attributes['base_url'] + this.attributes['lang'] + \"chat/start\" + urlArgumetns, this.attributes['prefixStorage']+'_popup_v2', paramsWindow);\n windowCreated = true;\n } else {\n needWindow = true;\n }\n } catch (e) { // We get cross-origin error only if window exist and it's location is other one than about:blank\n needWindow = true;\n }\n\n // Now if visitor has blocked popup change chat status link and just allow browser handle the rest.\n if (!newWin || newWin.closed || typeof newWin.closed=='undefined') {\n try {\n this.attributes.viewHandler.cont.getElementById(\"status-icon\").href = this.attributes['base_url'] + this.attributes['lang'] + \"chat/start\" + urlArgumetns;\n } catch (e) {\n alert('You have disabled popups!');\n }\n } else if (windowCreated == true) {\n typeof chatEvents !== 'undefined' && this.attributes.kcw === false && chatEvents.sendChildEvent('endedChat', [{'sender': 'endButton'}]);\n typeof paramsPopup !== 'undefined' && paramsPopup.event !== 'undefined' && paramsPopup.event.preventDefault();\n } else if (needWindow === true) {\n this.cont.elementReferrerPopup = newWin;\n newWin.focus();\n typeof paramsPopup !== 'undefined' && paramsPopup.event !== 'undefined' && paramsPopup.event.preventDefault();\n }\n }\n }\n\n sendParameters(chatEvents) {\n if (this.cont.elementReferrerPopup && this.cont.elementReferrerPopup.closed === false) {\n var js_vars = this.attributes['jsVars'].value;\n var js_args = {};\n var currentVar = null;\n for (var index in js_vars) {\n try {\n currentVar = eval(js_vars[index].var);\n if (typeof currentVar !== 'undefined' && currentVar !== null && currentVar !== '') {\n js_args[js_vars[index].id] = currentVar;\n }\n } catch (err) {\n\n }\n }\n chatEvents.sendChildEvent('jsVars', [js_args]);\n }\n }\n}","import {settings} from '../settings.js';\nimport {UIConstructorIframe} from '../UIConstructorIframe';\nimport {helperFunctions} from '../helperFunctions';\n\nexport class statusWidget{\n constructor(prefix) {\n\n this.attributes = {};\n this.controlMode = false;\n this.showDelay = null;\n this.statusDelayProcessed = false;\n\n this.cont = new UIConstructorIframe((prefix || 'lhc')+'_status_widget_v2', helperFunctions.getAbstractStyle({\n zindex: \"2147483640\",\n width: \"95px\",\n height: \"95px\",\n position: \"fixed\",\n display: \"none\",\n maxheight: \"95px\",\n maxwidth: \"95px\",\n minheight: \"95px\",\n minwidth: \"95px\"\n }), null, \"iframe\");\n\n this.loadStatus = {main : false, theme: false, font: true, widget : false, shidden: false};\n this.lload = false;\n this.unread_counter = 0;\n }\n\n toggleOfflineIcon(onlineStatus) {\n var icon = this.cont.getElementById(\"status-icon\");\n\n if (onlineStatus) {\n if (!this.attributes.leaveMessage) {\n this.show();\n }\n helperFunctions.removeClass(icon, \"offline-status\");\n } else {\n if (!this.attributes.leaveMessage) {\n this.hide();\n } else {\n helperFunctions.addClass(icon, \"offline-status\");\n }\n }\n }\n\n checkLoadStatus() {\n if (this.loadStatus['theme'] == true && this.loadStatus['main'] == true && this.loadStatus['font'] == true && this.loadStatus['widget'] == true && this.loadStatus['shidden'] == false) {\n this.cont.getElementById('lhc_status_container').style.display = \"\";\n this.attributes.sload.next(true);\n }\n }\n\n init(attributes, lload) {\n\n this.attributes = attributes;\n\n var placement = {bottom: (10+this.attributes.widgetDimesions.value.sbottom) + \"px\", right: (10+this.attributes.widgetDimesions.value.sright) + \"px\"};\n\n if (attributes.position_placement == 'bottom_left' || attributes.position_placement == 'full_height_left') {\n placement = { bottom: (10+this.attributes.widgetDimesions.value.sbottom) + \"px\", left: (10+this.attributes.widgetDimesions.value.sright) + \"px\"};\n } else if (attributes.position_placement == 'middle_right') {\n placement = {bottom: \"calc(50% - 45px)\",right: (10+this.attributes.widgetDimesions.value.sright) + \"px\"};\n } else if (attributes.position_placement == 'middle_left') {\n placement = {bottom: \"calc(50% - 45px)\",left: (10+this.attributes.widgetDimesions.value.sright) + \"px\"};\n }\n\n this.cont.massRestyle(placement);\n\n this.cont.tmpl = '
!
';\n\n if (this.cont.constructUIIframe('') === null) {\n return null;\n }\n\n this.cont.elmDom.className = this.attributes.isMobile === true ? 'lhc-mobile' : 'lhc-desktop';\n\n var _inst = this;\n\n this.lload = !(!lload);\n\n // If it's lazy load we have always to consider widget as loaded\n if (this.lload === true) {\n this.loadStatus['widget'] = true;\n } else {\n // We wait untill widget content loads\n attributes.wloaded.subscribe((data) => { if (data){this.loadStatus['widget'] = true; this.checkLoadStatus()}});\n }\n\n attributes.shidden.subscribe((data) => {\n if (data) {\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n if (!chatParams['id'] && this.attributes.widgetStatus.value != true) {\n this.loadStatus['shidden'] = true;\n this.hide();\n }\n } else {\n this.loadStatus['shidden'] = false;\n this.checkLoadStatus();\n this.show();\n }\n });\n\n this.cont.attachUserEventListener(\"click\", function (e) {\n\n attributes.onlineStatus.value === false && attributes.eventEmitter.emitEvent('offlineClickAction');\n\n if (attributes.onlineStatus.value === false && attributes.offline_redirect !== null){\n document.location = attributes.offline_redirect;\n e.preventDefault();\n } else {\n if (_inst.controlMode == true) {\n attributes.eventEmitter.emitEvent('closeWidget', [{'sender' : 'closeButton', 'mode' : 'control'}]);\n e.preventDefault();\n } else {\n attributes.eventEmitter.emitEvent('showWidget', [{'event':e}]);\n attributes.eventEmitter.emitEvent('clickAction');\n }\n }\n\n }, \"lhc_status_container\", \"minifiedclick\");\n\n if (this.attributes.staticJS['fontCSS']) {\n this.cont.insertCssRemoteFile({crossOrigin : \"anonymous\", href : this.attributes.staticJS['fontCSS']});\n }\n\n if (this.attributes.staticJS['font_status']) {\n this.cont.insertCssRemoteFile({onload: () => {this.loadStatus['font'] = true; this.checkLoadStatus()},\"as\":\"font\", rel:\"preload\", type: \"font/woff\", crossOrigin : \"anonymous\", href : this.attributes.staticJS['font_status']});\n }\n\n if (this.attributes.theme) {\n this.loadStatus['theme'] = false;\n this.cont.insertCssRemoteFile({onload: ()=>{this.loadStatus['theme'] = true; this.checkLoadStatus()}, id: \"lhc-theme-status\", crossOrigin : \"anonymous\", href : this.attributes.LHC_API.args.lhc_base_url + '/widgetrestapi/themestatus/' + this.attributes.theme + '?v=' + this.attributes.theme_v}, true);\n } else {\n this.loadStatus['theme'] = true;\n }\n\n this.cont.insertCssRemoteFile({onload: ()=>{this.loadStatus['main'] = true; this.checkLoadStatus()}, crossOrigin : \"anonymous\", href : this.attributes.staticJS['status_css'] });\n\n if (this.attributes.staticJS['page_css']) {\n helperFunctions.insertCssRemoteFile({crossOrigin : \"anonymous\", id: \"lhc-theme-page\", href : this.attributes.LHC_API.args.lhc_base_url + '/widgetrestapi/themepage/' + this.attributes.theme + '?v=' + this.attributes.theme_v});\n }\n\n attributes.onlineStatus.subscribe((data) => this.toggleOfflineIcon(data));\n\n attributes.widgetStatus.subscribe((data) => {\n if (this.attributes.mode !== 'popup') {\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n (data == true || (!this.attributes.leaveMessage && this.attributes.onlineStatus.value == false && !chatParams['id'])) ? this.hide() : this.show();\n }\n });\n\n this.attributes.mode === 'popup' && this.show();\n let unreadMessagesNumber = attributes.storageHandler.getSessionStorage(this.attributes['prefixStorage']+'_unr');\n\n attributes.eventEmitter.addListener('unread_message', (data) => {\n var unreadTotal = (data && data.otm);\n if (unreadTotal) {\n unreadTotal = parseInt(unreadTotal);\n unreadTotal += this.unread_counter;\n }\n this.attributes.unread_counter.next(unreadTotal);\n this.showUnreadIndicator(unreadTotal);\n });\n\n if (unreadMessagesNumber !== null) {\n attributes.eventEmitter.emitEvent('unread_message',[{otm:unreadMessagesNumber, init: true}]);\n if (unreadMessagesNumber !== null && !isNaN(unreadMessagesNumber)) {\n this.unread_counter = parseInt(unreadMessagesNumber);\n }\n }\n\n // Widget reload was called\n // We avoid cache by using timestamp because we do not call init call.\n // We also always insert themepage even if there is no css in it.\n attributes.eventEmitter.addListener('reloadWidget',() => {\n if (this.attributes.theme > 0) {\n this.cont.insertCssRemoteFile({crossOrigin : \"anonymous\", id: \"lhc-theme-status\", href : this.attributes.LHC_API.args.lhc_base_url + '/widgetrestapi/themestatus/' + this.attributes.theme + '?v=' + Date.now()}, true);\n }\n helperFunctions.insertCssRemoteFile({crossOrigin : \"anonymous\", id: \"lhc-theme-page\", href : this.attributes.LHC_API.args.lhc_base_url + '/widgetrestapi/themepage/' + this.attributes.theme + '?v=' + Date.now()});\n });\n }\n\n hide () {\n\n this.removeUnreadIndicator();\n\n if (this.attributes.clinst === true && this.attributes.isMobile == false) {\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n if (this.attributes.leaveMessage == true || this.attributes.onlineStatus.value == true || chatParams['id']) {\n\n if (this.attributes['position'] != 'api' || (this.attributes['position'] == 'api' && this.attributes['hide_status'] !== true && ((chatParams['id'] && chatParams['hash']) || this.attributes.widgetStatus.value == true))) {\n if (this.attributes['hide_status'] !== true || (chatParams['id'] && chatParams['hash'])) {\n this.cont.show();\n }\n }\n\n if (this.attributes['hide_status'] !== true || (chatParams['id'] && chatParams['hash']) || this.attributes.widgetStatus.value == true) {\n if (this.attributes.widgetStatus.value == true){\n this.controlMode = true;\n var icon = this.cont.getElementById(\"status-icon\");\n helperFunctions.addClass(icon, \"close-status\");\n }\n return ;\n }\n\n }\n }\n\n clearTimeout(this.showDelay);\n this.statusDelayProcessed = true;\n this.cont.hide();\n }\n\n showUnreadIndicator(number){\n var iconText = number || '!';\n var icon = this.cont.getElementById(\"lhc_status_container\");\n helperFunctions.addClass(icon, \"has-uread-message\");\n\n var iconValue = this.cont.getElementById(\"unread-msg-number\");\n if (iconValue) {\n iconValue.innerText = iconText;\n }\n\n if (this.attributes.storageHandler)\n this.attributes.storageHandler.setSessionStorage(this.attributes['prefixStorage']+'_unr',iconText);\n }\n\n removeUnreadIndicator() {\n var icon = this.cont.getElementById(\"lhc_status_container\");\n helperFunctions.removeClass(icon, \"has-uread-message\");\n if (this.attributes.storageHandler) {\n this.attributes.storageHandler.removeSessionStorage(this.attributes['prefixStorage']+'_unr');\n }\n this.attributes.eventEmitter.emitEvent('remove_unread_indicator', []);\n this.attributes.unread_counter.next(0);\n this.unread_counter = 0;\n }\n\n show () {\n\n if (this.attributes.hideOffline === false) {\n\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n\n if (this.attributes.clinst === true && this.attributes.isMobile == false) {\n if (this.attributes.widgetStatus.value != true) {\n var icon = this.cont.getElementById(\"status-icon\");\n helperFunctions.removeClass(icon, \"close-status\");\n\n this.controlMode = false;\n }\n }\n\n // show status icon only if we are not in api mode or chat is going now\n if (this.attributes['position'] != 'api' || (this.attributes['position'] == 'api' && this.attributes['hide_status'] !== true && chatParams['id'] && chatParams['hash'])) {\n\n clearTimeout(this.showDelay);\n \n const chatParams = this.attributes['userSession'].getSessionAttributes();\n\n this.showDelay = setTimeout(() => {\n this.cont.show();\n this.statusDelayProcessed = true;\n }, (this.statusDelayProcessed == true || (chatParams['id'] && chatParams['hash'])) ? 0 : this.attributes['status_delay']);\n\n } else if (this.attributes.clinst === true) {\n if (this.attributes.widgetStatus.value != true) {\n this.cont.hide();\n }\n }\n\n } else {\n this.cont.hide();\n }\n }\n}","\nclass chatEventsHandler {\n\n constructor(attr) {\n this.attributes = attr\n }\n\n getJSVarsValues(jsVars) {\n var js_args = {};\n\n if (jsVars.length > 0) {\n\n var currentVar = null;\n\n for (var index in jsVars) {\n try {\n currentVar = eval('window.'+jsVars[index].var);\n if (typeof currentVar !== 'undefined' && currentVar !== null && currentVar !== '') {\n js_args[jsVars[index].id] = currentVar;\n }\n } catch(err) {\n }\n }\n return js_args;\n }\n\n return js_args;\n }\n\n getInitAttributes() {\n let attr = {\n 'onlineStatus' : this.attributes['onlineStatus'].value,\n 'toggleSound' : this.attributes['toggleSound'].value,\n 'widgetStatus' : this.attributes['widgetStatus'].value,\n 'jsVars' : this.getJSVarsValues(this.attributes['jsVars'].value),\n 'isMobile' : this.attributes['isMobile'],\n 'department' : this.attributes['department'],\n 'product' : this.attributes['product'],\n 'theme' : this.attributes['theme'],\n 'theme_v' : this.attributes['theme_v'],\n 'base_url' : this.attributes['base_url'],\n 'mode' : this.attributes['mode'],\n 'captcha' : this.attributes['captcha'],\n 'staticJS' : this.attributes['staticJS'],\n 'static_chat' : this.attributes['userSession'].getSessionAttributes(),\n 'domain_lhc': this.attributes['domain_lhc'],\n 'leave_message': this.attributes['leaveMessage'],\n 'scope_prefix': this.attributes['prefixLowercase']\n };\n\n if (this.attributes['fresh'] == true) {\n if (attr['static_chat']['id']) {\n delete attr['static_chat']['id'];\n }\n\n if (attr['static_chat']['hash']) {\n delete attr['static_chat']['hash'];\n }\n }\n\n if (this.attributes['bot_id'] != '') {\n attr['bot_id'] = this.attributes['bot_id'];\n }\n\n if (this.attributes['trigger_id'] != '') {\n attr['trigger_id'] = this.attributes['trigger_id'];\n }\n \n if (this.attributes['subject_id'] != '') {\n attr['subject_id'] = this.attributes['subject_id'];\n }\n\n if (this.attributes['priority'] != '') {\n attr['priority'] = this.attributes['priority'];\n }\n \n if (this.attributes['phash'] !== null) {\n attr['phash'] = this.attributes['phash'];\n }\n\n if (this.attributes['survey'] !== null) {\n attr['survey'] = this.attributes['survey'];\n }\n\n if (this.attributes['pvhash'] !== null) {\n attr['pvhash'] = this.attributes['pvhash'];\n }\n\n if (this.attributes['operator'] !== null) {\n attr['operator'] = this.attributes['operator'];\n }\n\n if (this.attributes['profile_pic'] !== null) {\n attr['profile_pic'] = this.attributes['profile_pic'];\n }\n\n if (this.attributes['lang'] != '') {\n attr['lang'] = this.attributes['lang'];\n }\n\n if (this.attributes['proactive']['invitation']) {\n attr['proactive'] = this.attributes['proactive'];\n }\n\n if (this.attributes['dep_default'] !== null) {\n attr['dep_default'] = this.attributes['dep_default'];\n }\n\n if (this.attributes.LHCChatOptions && this.attributes.LHCChatOptions.attr) {\n var prefillOptions = this.attributes.LHCChatOptions.attr;\n let fieldsCustom = [];\n prefillOptions.forEach((item, index) => {\n fieldsCustom.push({show : (((typeof item.show != 'undefined' && (item.show == 'on' || item.show == 'off')) ? item.show : 'b')), value : item.value, index : index, name : item.name, \"class\": \"form-control form-control-sm\", 'type' : item.type, 'identifier': ('additional_' + index), 'placeholder' : '', 'width' : (item.size || 6), 'encrypted': (item.encrypted || false), 'required' : (item.req || false), 'label' : item.name});\n });\n\n attr['CUSTOM_FIELDS'] = fieldsCustom;\n }\n\n if (this.attributes.LHCChatOptions && this.attributes.LHCChatOptions.attr_prefill) {\n var prefillOptions = this.attributes.LHCChatOptions.attr_prefill;\n let prefilOptionsList = [];\n prefillOptions.forEach((item) => {\n if (item.name == 'email') {\n prefilOptionsList.push({'Email' : item.value});\n } else if (item.name == 'username') {\n prefilOptionsList.push({'Username' : item.value});\n } else if (item.name == 'phone') {\n prefilOptionsList.push({'Phone' : item.value});\n } else if (item.name == 'question') {\n prefilOptionsList.push({'Question' : item.value});\n }\n })\n prefilOptionsList = prefilOptionsList.concat(this.attributes['userSession'].getPrefillVars());\n attr['attr_prefill'] = prefilOptionsList;\n } else {\n attr['attr_prefill'] = this.attributes['userSession'].getPrefillVars();\n }\n\n if (this.attributes.LHCChatOptions && this.attributes.LHCChatOptions.attr_prefill_admin) {\n var prefillOptions = this.attributes.LHCChatOptions.attr_prefill_admin;\n let prefilOptionsList = [];\n prefillOptions.forEach((item) => {\n prefilOptionsList.push({'value' : item.value, 'index' : item.index});\n })\n attr['attr_prefill_admin'] = prefilOptionsList;\n }\n\n if (this.attributes['userSession'].getSessionReferrer() !== null) {\n attr['ses_ref'] = this.attributes['userSession'].getSessionReferrer()\n }\n\n return attr;\n }\n\n sendChildCommand(command) {\n if (this.attributes.mainWidget.cont.elmDom && this.attributes.mainWidget.cont.elmDom.contentWindow)\n {\n this.attributes.mainWidget.cont.elmDom.contentWindow.postMessage(command, (this.attributes.isIE ? '*' : '/'));\n }\n\n if (this.attributes.popupWidget.cont.elementReferrerPopup && this.attributes.popupWidget.cont.elementReferrerPopup.closed === false)\n {\n this.attributes.popupWidget.cont.elementReferrerPopup.postMessage(command, '*');\n }\n }\n\n sendReadyEvent (popup) {\n\n let args = this.getInitAttributes();\n\n if (!(popup === true) && this.attributes.mainWidget.cont.elmDom && this.attributes.mainWidget.cont.elmDom.contentWindow)\n {\n this.attributes.mainWidget.cont.elmDom.contentWindow.postMessage('lhc_init:' + JSON.stringify(args), (this.attributes.isIE ? '*' : '/'));\n }\n }\n\n sendChildEvent(event, args, type) {\n if (typeof type === 'undefined') {\n type = 'lhc_event';\n }\n this.sendChildCommand(type+':'+event + '::' + JSON.stringify(args));\n }\n}\n\nexport { chatEventsHandler };","\nclass _domEventsHandler {\n constructor() {\n this.events = {}\n }\n\n attachEvent (object, event, callback) {\n var k = this, dispatch = function (b) {\n callback.call(object, k.getEvent(b))\n };\n object.attachEvent(\"on\" + event, dispatch);\n return dispatch\n };\n\n unlisten(eventName) {\n var presentEvent;\n this.events[eventName] && (presentEvent = this.events[eventName], this.events[eventName] = null, this.removeEventHandler(presentEvent.element, presentEvent.eventName, presentEvent.eventListener));\n }\n\n listen(object, event, callback, eventName) {\n var presentEvent;\n if (eventName) {\n this.events[eventName] && (presentEvent = this.events[eventName], this.events[eventName] = null, this.removeEventHandler(presentEvent.element, presentEvent.eventName, presentEvent.eventListener));\n\n if (object.addEventListener) {\n object.addEventListener(event, callback, !1);\n } else if (document.attachEvent) {\n callback = this.attachEvent(object, event, callback);\n } else {\n return null;\n }\n\n this.events[eventName] = {element: object, eventName: event, eventListener: callback};\n\n return callback\n }\n };\n\n removeEventHandler(object, event, listener) {\n document.removeEventListener ? object.removeEventListener(event, listener, !1) : object.detachEvent(\"on\" + event, listener)\n };\n\n getEvent(event) {\n var eventInstance = event || _this.event;\n if (!eventInstance) {\n for (event = this.getEvent.caller; event && (!(eventInstance = event.arguments[0]) || Event != eventInstance.constructor);) {\n event = event.caller\n };\n }\n return eventInstance\n };\n}\n\nconst domEventsHandler = new _domEventsHandler();\nexport { domEventsHandler };","\nexport class monitoredVariable {\n constructor(value, params) {\n this.valueInternal = value;\n this.listeners = [];\n this.params = params || {};\n }\n\n get value() {\n return this.valueInternal;\n }\n\n set value(val) {\n this.next(val);\n }\n\n next(val) {\n this.valueInternal = val;\n this.callListeners();\n }\n\n nextPropertySilent(key, val) {\n this.valueInternal[key] = val;\n }\n\n nextProperty(key, val) {\n this.valueInternal[key] = val;\n this.callListeners();\n }\n\n callListeners() {\n this.listeners.forEach((item) => {\n if (item && typeof item === \"function\") {\n item(this.valueInternal);\n }\n });\n }\n\n unsubscribe(callback) {\n if (this.listeners.indexOf(callback) !== -1) {\n this.listeners.splice(this.listeners.indexOf(callback), 1);\n }\n }\n\n subscribe(callback) {\n this.listeners.push(callback);\n \n if (!this.params['ignore_sub']) {\n callback(this.valueInternal);\n }\n }\n}\n\n","\nexport class storageHandler {\n constructor(global, domain, prefix, cookieEnabled) {\n this.window = global;\n this.cookieEnabled = false;\n\n // Have we checked cookies support\n this.cookiesSupportChecked = false;\n\n // We should try to enable cookie\n if (cookieEnabled == true) {\n this.checkCookiesSupport();\n }\n\n this.domain = domain;\n this.secureCookie = false;\n this.cookiePerPage = false;\n this.prefix = prefix || 'lhc';\n }\n\n checkCookiesSupport() {\n\n if (this.cookiesSupportChecked === true) {\n return this.cookieEnabled;\n }\n\n this.cookiesSupportChecked = true;\n\n try {\n this.hasSessionStorage = !!this.window.sessionStorage;\n } catch (e){\n this.hasSessionStorage = false;\n }\n\n try {\n this.hasLocalStorage = !!this.window.localStorage;\n } catch (e){\n this.hasLocalStorage = false;\n }\n\n try {\n // Create cookie\n document.cookie = 'cookietest=1';\n this.cookieEnabled = document.cookie.indexOf('cookietest=') !== -1;\n // Delete cookie\n document.cookie = 'cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT';\n } catch (e) {\n\n }\n\n return this.cookieEnabled;\n }\n\n setCookieDomain(domain) {\n this.domain = domain;\n }\n\n setCookiePerPage(cookiePerPage) {\n this.cookiePerPage = cookiePerPage;\n }\n\n getCookieDomain() {\n if (this.domain) {\n return '.' + this.domain;\n } else {\n return null;\n }\n }\n\n setSecureCookie(status) {\n this.secureCookie = status;\n }\n\n setHTTPCookie(coookieName, cookieValue, expireTime, domain) {\n if (this.cookieEnabled === false) return ;\n var string = \"\";\n expireTime || (expireTime = new Date, expireTime.setTime(expireTime.getTime() + 15552E6), string = \"; expires=\" + expireTime.toGMTString());\n document.cookie = coookieName + \"=\" + cookieValue + string + (this.cookiePerPage === false ? \"; path=/\" : (this.cookiePerPage === true ? \"\" : '; path=' + this.cookiePerPage)) + (this.secureCookie ? \";secure\" : \"\") + (domain ? \";domain=\" + domain : \"\") + \";SameSite=Lax\";\n };\n\n getHTTPCookie(cookieName) {\n if (this.cookieEnabled === false) return [];\n var b, d, k = [], baseCookie = cookieName + \"=\", e = document.cookie.split(\";\");\n cookieName = 0;\n for (b = e.length; cookieName < b; cookieName++) {\n for (d = e[cookieName]; \" \" === d.charAt(0);) d = d.substring(1, d.length);\n 0 === d.indexOf(baseCookie) && k.push(d.substring(baseCookie.length, d.length))\n }\n\n // Reset duplicate cookies\n if (k.length == 2) {\n let host = (window.location.hostname || document.location.host),\n reset = baseCookie + \"0;expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/\";\n if (host) {\n document.cookie = reset;\n document.cookie = reset + \"; domain=.\" + host;\n }\n }\n\n return k;\n };\n\n setSessionStorage(key, value) {\n if (this.hasSessionStorage && sessionStorage.setItem) try {\n sessionStorage.setItem(key, value)\n } catch (d) {\n }\n }\n\n removeSessionStorage(key) {\n if (this.hasSessionStorage && sessionStorage.removeItem) try {\n sessionStorage.removeItem(key)\n } catch (d) {\n }\n }\n\n getSessionStorage(a) {\n return this.hasSessionStorage && sessionStorage.getItem ?\n sessionStorage.getItem(a) : null\n }\n\n setLocalStorage(key, value) {\n if (this.hasLocalStorage && localStorage.setItem) try {\n localStorage.setItem(key, value)\n } catch (d) {\n }\n }\n\n getLocalStorage(a) {\n return this.hasLocalStorage && localStorage.getItem ?\n localStorage.getItem(a) : null\n }\n\n removeLocalStorage(key) {\n if (this.hasLocalStorage && localStorage.removeItem) try {\n localStorage.removeItem(key)\n } catch (d) {\n }\n }\n\n setSessionReferer(ref) {\n if (!this.getSessionStorage(this.prefix+'_ref')) {\n this.setSessionStorage(this.prefix+'_ref',ref);\n }\n }\n\n getSessionReferrer() {\n return this.getSessionStorage(this.prefix+'_ref');\n }\n\n getSessionInformation() {\n var a;\n this.sessionInformation && (a = this.sessionInformation);\n a || (a = this.getHTTPCookie(this.prefix + \"_per\")[0]);\n return this.parseSessionInformation(a)\n };\n\n getStoreValue(sessionInformation)\n {\n let pairs = [];\n Object.keys(sessionInformation).forEach(key => {\n let value = sessionInformation[key];\n pairs.push(key + '|' + value);\n });\n return pairs.join('|');\n }\n\n storeSessionInformation(sessionInformation) {\n this.setHTTPCookie(this.prefix+\"_per\", this.getStoreValue(sessionInformation), false, this.getCookieDomain());\n this.sessionInformation = sessionInformation;\n };\n\n parseSessionInformation(content) {\n // Check was it stored as our format or JSON.\n if (content && content.indexOf('|') !== -1) {\n let contentReturn = {};\n let parts = content.split('|');\n\n for (var i = 0; i < parts.length / 2; i++) {\n contentReturn[parts[i * 2]] = parts[(i * 2) + 1];\n }\n\n return contentReturn;\n } else {\n if (content) {\n return JSON.parse(unescape(content))\n } else {\n return {};\n }\n }\n\n };\n}\n\n","\nexport class userSession {\n\n constructor() {\n this.vid = null;\n this.hnh = null;\n\n this.attributes = {};\n this.ref = null;\n this.id = null;\n this.hash = null;\n this.jsVars = [];\n this.updateVarsTimeout = null;\n this.JSON = {\n parse: window.JSON && (window.JSON.parse || window.JSON.decode) || String.prototype.evalJSON && function(str){return String(str).evalJSON();} || $.parseJSON || $.evalJSON,\n stringify: Object.toJSON || window.JSON && (window.JSON.stringify || window.JSON.encode) || $.toJSON\n };\n }\n\n setAttributes(attributes) {\n this.attributes = attributes;\n }\n\n setSessionReferrer(ref) {\n this.ref = ref;\n }\n\n getSessionReferrer() {\n return this.ref;\n }\n\n getVID() {\n return this.vid;\n }\n\n setVID(vid) {\n this.vid = vid;\n }\n\n setSessionInformation(params) {\n this.vid = params['vid'] || null;\n this.hnh = params['hnh'] || null;\n this.hash = params['hash'] || null;\n this.id = params['id'] || null;\n }\n\n getSessionAttributes() {\n var attr = {};\n\n if (this.vid !== null) {\n attr['vid'] = this.vid;\n }\n\n if (this.hnh !== null) {\n attr['hnh'] = this.hnh;\n }\n\n if (this.id !== null) {\n attr['id'] = this.id;\n }\n\n if (this.hash !== null) {\n attr['hash'] = this.hash;\n }\n\n return attr\n }\n\n setupVarsMonitoring(jsVars, cb) {\n this.jsVars = jsVars;\n\n // Try to monitor variable if it's lhc_var\n try {\n\n if (this.attributes.lhc_var !== null)\n {\n var validator = {\n set: (obj, prop, value) => {\n // The default behavior to store the value\n obj[prop] = value;\n\n clearTimeout(this.updateVarsTimeout);\n this.updateVarsTimeout = setTimeout( () =>{ this.updateJSVars(obj, cb); },1000);\n\n // Indicate success\n return true;\n }\n };\n\n this.attributes.lhc_var = new Proxy(this.attributes.lhc_var,validator);\n\n // Convert argument or global lhc_var to a reference\n if (this.attributes.LHC_API.args.lhc_var) {\n this.attributes.LHC_API.args.lhc_var = this.attributes.lhc_var;\n } else if (lhc_var) {\n lhc_var = this.attributes.lhc_var;\n }\n\n // Update vars initially\n this.updateJSVars(this.attributes.lhc_var);\n\n } else if (typeof LHCChatOptions !== 'undefined' && typeof LHCChatOptions.attr_prefill !== 'undefined') {\n\n var lhc_var_prefill = {};\n\n LHCChatOptions.attr_prefill.forEach( (item) => {\n if (item.name && item.value) {\n lhc_var_prefill['prefill_'+item.name] = item.value;\n }\n });\n\n var xhr = new XMLHttpRequest();\n xhr.open( \"POST\", this.attributes.LHC_API.args.lhc_base_url + '/chat/updatejsvars' + this.getAppendVariables(), true);\n xhr.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n xhr.send( \"data=\" + encodeURIComponent( this.JSON.stringify(lhc_var_prefill) ) );\n }\n\n } catch(err) {\n console.log(err);\n };\n }\n\n getPrefillVars() {\n let varsReturn = [];\n if (this.jsVars.length > 0) {\n var varsSet = this.getVars();\n for (var jsVarData in this.jsVars) {\n if (this.jsVars[jsVarData].type && varsSet[this.jsVars[jsVarData].id]) {\n var item = {};\n item[this.jsVars[jsVarData].type] = varsSet[this.jsVars[jsVarData].id];\n varsReturn.push(item);\n }\n }\n }\n return varsReturn;\n }\n\n getVars() {\n if (this.jsVars.length > 0) {\n var js_args = {};\n var currentVar = null;\n\n for (var index in this.jsVars) {\n try {\n\n if (this.jsVars[index].var.indexOf('lhc_var.') !== -1) {\n currentVar = this.attributes.lhc_var[this.jsVars[index].var.replace('lhc_var.','')] || null;\n } else {\n currentVar = eval(this.jsVars[index].var);\n }\n\n if (typeof currentVar !== 'undefined' && currentVar !== null && currentVar !== '') {\n js_args[this.jsVars[index].id] = currentVar;\n }\n } catch(err) {\n\n }\n }\n\n return js_args;\n }\n return null;\n }\n\n getAppendVariables(){\n var append = '';\n\n if (this.vid !== null) {\n append = append + '/(vid)/' + this.vid ;\n }\n\n if (this.hash !== null && this.id !== null) {\n append = append + '/(hash)/' + this.id + '_' + this.hash;\n }\n\n return append;\n }\n\n updateJSVars(vars, cb) {\n\n let varsJSON = this.getVars(vars);\n\n var xhr = new XMLHttpRequest();\n xhr.open( \"POST\", this.attributes.LHC_API.args.lhc_base_url + '/chat/updatejsvars' + this.getAppendVariables(), true);\n xhr.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n xhr.send( \"data=\" + encodeURIComponent( this.JSON.stringify(varsJSON) ) );\n\n if (typeof cb !== 'undefined' && this.hash === null && this.id === null) {\n cb(varsJSON, this.getPrefillVars());\n }\n }\n\n setChatInformation(data, alwaysPersistentNeedHelp) {\n this.id = data.id;\n this.hash = data.hash;\n // Hide only chat starts otherwise don't touch it.\n if (this.id !== null && !alwaysPersistentNeedHelp) {\n this.hnh = Math.round(Date.now() / 1000);\n }\n }\n\n}","var appleIphone = /iPhone/i;\nvar appleIpod = /iPod/i;\nvar appleTablet = /iPad/i;\nvar appleUniversal = /\\biOS-universal(?:.+)Mac\\b/i;\nvar androidPhone = /\\bAndroid(?:.+)Mobile\\b/i;\nvar androidTablet = /Android/i;\nvar amazonPhone = /(?:SD4930UR|\\bSilk(?:.+)Mobile\\b)/i;\nvar amazonTablet = /Silk/i;\nvar windowsPhone = /Windows Phone/i;\nvar windowsTablet = /\\bWindows(?:.+)ARM\\b/i;\nvar otherBlackBerry = /BlackBerry/i;\nvar otherBlackBerry10 = /BB10/i;\nvar otherOpera = /Opera Mini/i;\nvar otherChrome = /\\b(CriOS|Chrome)(?:.+)Mobile/i;\nvar otherFirefox = /Mobile(?:.+)Firefox\\b/i;\nvar isAppleTabletOnIos13 = function (navigator) {\n return (typeof navigator !== 'undefined' &&\n navigator.platform === 'MacIntel' &&\n typeof navigator.maxTouchPoints === 'number' &&\n navigator.maxTouchPoints > 1 &&\n typeof MSStream === 'undefined');\n};\nfunction createMatch(userAgent) {\n return function (regex) { return regex.test(userAgent); };\n}\nexport default function isMobile(param) {\n var nav = {\n userAgent: '',\n platform: '',\n maxTouchPoints: 0\n };\n if (!param && typeof navigator !== 'undefined') {\n nav = {\n userAgent: navigator.userAgent,\n platform: navigator.platform,\n maxTouchPoints: navigator.maxTouchPoints || 0\n };\n }\n else if (typeof param === 'string') {\n nav.userAgent = param;\n }\n else if (param && param.userAgent) {\n nav = {\n userAgent: param.userAgent,\n platform: param.platform,\n maxTouchPoints: param.maxTouchPoints || 0\n };\n }\n var userAgent = nav.userAgent;\n var tmp = userAgent.split('[FBAN');\n if (typeof tmp[1] !== 'undefined') {\n userAgent = tmp[0];\n }\n tmp = userAgent.split('Twitter');\n if (typeof tmp[1] !== 'undefined') {\n userAgent = tmp[0];\n }\n var match = createMatch(userAgent);\n var result = {\n apple: {\n phone: match(appleIphone) && !match(windowsPhone),\n ipod: match(appleIpod),\n tablet: !match(appleIphone) &&\n (match(appleTablet) || isAppleTabletOnIos13(nav)) &&\n !match(windowsPhone),\n universal: match(appleUniversal),\n device: (match(appleIphone) ||\n match(appleIpod) ||\n match(appleTablet) ||\n match(appleUniversal) ||\n isAppleTabletOnIos13(nav)) &&\n !match(windowsPhone)\n },\n amazon: {\n phone: match(amazonPhone),\n tablet: !match(amazonPhone) && match(amazonTablet),\n device: match(amazonPhone) || match(amazonTablet)\n },\n android: {\n phone: (!match(windowsPhone) && match(amazonPhone)) ||\n (!match(windowsPhone) && match(androidPhone)),\n tablet: !match(windowsPhone) &&\n !match(amazonPhone) &&\n !match(androidPhone) &&\n (match(amazonTablet) || match(androidTablet)),\n device: (!match(windowsPhone) &&\n (match(amazonPhone) ||\n match(amazonTablet) ||\n match(androidPhone) ||\n match(androidTablet))) ||\n match(/\\bokhttp\\b/i)\n },\n windows: {\n phone: match(windowsPhone),\n tablet: match(windowsTablet),\n device: match(windowsPhone) || match(windowsTablet)\n },\n other: {\n blackberry: match(otherBlackBerry),\n blackberry10: match(otherBlackBerry10),\n opera: match(otherOpera),\n firefox: match(otherFirefox),\n chrome: match(otherChrome),\n device: match(otherBlackBerry) ||\n match(otherBlackBerry10) ||\n match(otherOpera) ||\n match(otherFirefox) ||\n match(otherChrome)\n },\n any: false,\n phone: false,\n tablet: false\n };\n result.any =\n result.apple.device ||\n result.android.device ||\n result.windows.device ||\n result.other.device;\n result.phone =\n result.apple.phone || result.android.phone || result.windows.phone;\n result.tablet =\n result.apple.tablet || result.android.tablet || result.windows.tablet;\n return result;\n}\n//# sourceMappingURL=isMobile.js.map","'use strict';\n\nmodule.exports = require('./lib')\n","'use strict';\n\nvar asap = require('asap/raw');\n\nfunction noop() {}\n\n// States:\n//\n// 0 - pending\n// 1 - fulfilled with _value\n// 2 - rejected with _value\n// 3 - adopted the state of another promise, _value\n//\n// once the state is no longer pending (0) it is immutable\n\n// All `_` prefixed properties will be reduced to `_{random number}`\n// at build time to obfuscate them and discourage their use.\n// We don't use symbols or Object.defineProperty to fully hide them\n// because the performance isn't good enough.\n\n\n// to avoid using try/catch inside critical functions, we\n// extract them to here.\nvar LAST_ERROR = null;\nvar IS_ERROR = {};\nfunction getThen(obj) {\n try {\n return obj.then;\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nfunction tryCallOne(fn, a) {\n try {\n return fn(a);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\nfunction tryCallTwo(fn, a, b) {\n try {\n fn(a, b);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nmodule.exports = Promise;\n\nfunction Promise(fn) {\n if (typeof this !== 'object') {\n throw new TypeError('Promises must be constructed via new');\n }\n if (typeof fn !== 'function') {\n throw new TypeError('Promise constructor\\'s argument is not a function');\n }\n this._U = 0;\n this._V = 0;\n this._W = null;\n this._X = null;\n if (fn === noop) return;\n doResolve(fn, this);\n}\nPromise._Y = null;\nPromise._Z = null;\nPromise._0 = noop;\n\nPromise.prototype.then = function(onFulfilled, onRejected) {\n if (this.constructor !== Promise) {\n return safeThen(this, onFulfilled, onRejected);\n }\n var res = new Promise(noop);\n handle(this, new Handler(onFulfilled, onRejected, res));\n return res;\n};\n\nfunction safeThen(self, onFulfilled, onRejected) {\n return new self.constructor(function (resolve, reject) {\n var res = new Promise(noop);\n res.then(resolve, reject);\n handle(self, new Handler(onFulfilled, onRejected, res));\n });\n}\nfunction handle(self, deferred) {\n while (self._V === 3) {\n self = self._W;\n }\n if (Promise._Y) {\n Promise._Y(self);\n }\n if (self._V === 0) {\n if (self._U === 0) {\n self._U = 1;\n self._X = deferred;\n return;\n }\n if (self._U === 1) {\n self._U = 2;\n self._X = [self._X, deferred];\n return;\n }\n self._X.push(deferred);\n return;\n }\n handleResolved(self, deferred);\n}\n\nfunction handleResolved(self, deferred) {\n asap(function() {\n var cb = self._V === 1 ? deferred.onFulfilled : deferred.onRejected;\n if (cb === null) {\n if (self._V === 1) {\n resolve(deferred.promise, self._W);\n } else {\n reject(deferred.promise, self._W);\n }\n return;\n }\n var ret = tryCallOne(cb, self._W);\n if (ret === IS_ERROR) {\n reject(deferred.promise, LAST_ERROR);\n } else {\n resolve(deferred.promise, ret);\n }\n });\n}\nfunction resolve(self, newValue) {\n // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n if (newValue === self) {\n return reject(\n self,\n new TypeError('A promise cannot be resolved with itself.')\n );\n }\n if (\n newValue &&\n (typeof newValue === 'object' || typeof newValue === 'function')\n ) {\n var then = getThen(newValue);\n if (then === IS_ERROR) {\n return reject(self, LAST_ERROR);\n }\n if (\n then === self.then &&\n newValue instanceof Promise\n ) {\n self._V = 3;\n self._W = newValue;\n finale(self);\n return;\n } else if (typeof then === 'function') {\n doResolve(then.bind(newValue), self);\n return;\n }\n }\n self._V = 1;\n self._W = newValue;\n finale(self);\n}\n\nfunction reject(self, newValue) {\n self._V = 2;\n self._W = newValue;\n if (Promise._Z) {\n Promise._Z(self, newValue);\n }\n finale(self);\n}\nfunction finale(self) {\n if (self._U === 1) {\n handle(self, self._X);\n self._X = null;\n }\n if (self._U === 2) {\n for (var i = 0; i < self._X.length; i++) {\n handle(self, self._X[i]);\n }\n self._X = null;\n }\n}\n\nfunction Handler(onFulfilled, onRejected, promise){\n this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n this.promise = promise;\n}\n\n/**\n * Take a potentially misbehaving resolver function and make sure\n * onFulfilled and onRejected are only called once.\n *\n * Makes no guarantees about asynchrony.\n */\nfunction doResolve(fn, promise) {\n var done = false;\n var res = tryCallTwo(fn, function (value) {\n if (done) return;\n done = true;\n resolve(promise, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(promise, reason);\n });\n if (!done && res === IS_ERROR) {\n done = true;\n reject(promise, LAST_ERROR);\n }\n}\n","'use strict';\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\nPromise.prototype.done = function (onFulfilled, onRejected) {\n var self = arguments.length ? this.then.apply(this, arguments) : this;\n self.then(null, function (err) {\n setTimeout(function () {\n throw err;\n }, 0);\n });\n};\n","'use strict';\n\n//This file contains the ES6 extensions to the core Promises/A+ API\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\n\n/* Static Functions */\n\nvar TRUE = valuePromise(true);\nvar FALSE = valuePromise(false);\nvar NULL = valuePromise(null);\nvar UNDEFINED = valuePromise(undefined);\nvar ZERO = valuePromise(0);\nvar EMPTYSTRING = valuePromise('');\n\nfunction valuePromise(value) {\n var p = new Promise(Promise._0);\n p._V = 1;\n p._W = value;\n return p;\n}\nPromise.resolve = function (value) {\n if (value instanceof Promise) return value;\n\n if (value === null) return NULL;\n if (value === undefined) return UNDEFINED;\n if (value === true) return TRUE;\n if (value === false) return FALSE;\n if (value === 0) return ZERO;\n if (value === '') return EMPTYSTRING;\n\n if (typeof value === 'object' || typeof value === 'function') {\n try {\n var then = value.then;\n if (typeof then === 'function') {\n return new Promise(then.bind(value));\n }\n } catch (ex) {\n return new Promise(function (resolve, reject) {\n reject(ex);\n });\n }\n }\n return valuePromise(value);\n};\n\nvar iterableToArray = function (iterable) {\n if (typeof Array.from === 'function') {\n // ES2015+, iterables exist\n iterableToArray = Array.from;\n return Array.from(iterable);\n }\n\n // ES5, only arrays and array-likes exist\n iterableToArray = function (x) { return Array.prototype.slice.call(x); };\n return Array.prototype.slice.call(iterable);\n}\n\nPromise.all = function (arr) {\n var args = iterableToArray(arr);\n\n return new Promise(function (resolve, reject) {\n if (args.length === 0) return resolve([]);\n var remaining = args.length;\n function res(i, val) {\n if (val && (typeof val === 'object' || typeof val === 'function')) {\n if (val instanceof Promise && val.then === Promise.prototype.then) {\n while (val._V === 3) {\n val = val._W;\n }\n if (val._V === 1) return res(i, val._W);\n if (val._V === 2) reject(val._W);\n val.then(function (val) {\n res(i, val);\n }, reject);\n return;\n } else {\n var then = val.then;\n if (typeof then === 'function') {\n var p = new Promise(then.bind(val));\n p.then(function (val) {\n res(i, val);\n }, reject);\n return;\n }\n }\n }\n args[i] = val;\n if (--remaining === 0) {\n resolve(args);\n }\n }\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n};\n\nPromise.reject = function (value) {\n return new Promise(function (resolve, reject) {\n reject(value);\n });\n};\n\nPromise.race = function (values) {\n return new Promise(function (resolve, reject) {\n iterableToArray(values).forEach(function(value){\n Promise.resolve(value).then(resolve, reject);\n });\n });\n};\n\n/* Prototype Methods */\n\nPromise.prototype['catch'] = function (onRejected) {\n return this.then(null, onRejected);\n};\n","'use strict';\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\nPromise.prototype.finally = function (f) {\n return this.then(function (value) {\n return Promise.resolve(f()).then(function () {\n return value;\n });\n }, function (err) {\n return Promise.resolve(f()).then(function () {\n throw err;\n });\n });\n};\n","'use strict';\n\nmodule.exports = require('./core.js');\nrequire('./done.js');\nrequire('./finally.js');\nrequire('./es6-extensions.js');\nrequire('./node-extensions.js');\nrequire('./synchronous.js');\n","'use strict';\n\n// This file contains then/promise specific extensions that are only useful\n// for node.js interop\n\nvar Promise = require('./core.js');\nvar asap = require('asap');\n\nmodule.exports = Promise;\n\n/* Static Functions */\n\nPromise.denodeify = function (fn, argumentCount) {\n if (\n typeof argumentCount === 'number' && argumentCount !== Infinity\n ) {\n return denodeifyWithCount(fn, argumentCount);\n } else {\n return denodeifyWithoutCount(fn);\n }\n};\n\nvar callbackFn = (\n 'function (err, res) {' +\n 'if (err) { rj(err); } else { rs(res); }' +\n '}'\n);\nfunction denodeifyWithCount(fn, argumentCount) {\n var args = [];\n for (var i = 0; i < argumentCount; i++) {\n args.push('a' + i);\n }\n var body = [\n 'return function (' + args.join(',') + ') {',\n 'var self = this;',\n 'return new Promise(function (rs, rj) {',\n 'var res = fn.call(',\n ['self'].concat(args).concat([callbackFn]).join(','),\n ');',\n 'if (res &&',\n '(typeof res === \"object\" || typeof res === \"function\") &&',\n 'typeof res.then === \"function\"',\n ') {rs(res);}',\n '});',\n '};'\n ].join('');\n return Function(['Promise', 'fn'], body)(Promise, fn);\n}\nfunction denodeifyWithoutCount(fn) {\n var fnLength = Math.max(fn.length - 1, 3);\n var args = [];\n for (var i = 0; i < fnLength; i++) {\n args.push('a' + i);\n }\n var body = [\n 'return function (' + args.join(',') + ') {',\n 'var self = this;',\n 'var args;',\n 'var argLength = arguments.length;',\n 'if (arguments.length > ' + fnLength + ') {',\n 'args = new Array(arguments.length + 1);',\n 'for (var i = 0; i < arguments.length; i++) {',\n 'args[i] = arguments[i];',\n '}',\n '}',\n 'return new Promise(function (rs, rj) {',\n 'var cb = ' + callbackFn + ';',\n 'var res;',\n 'switch (argLength) {',\n args.concat(['extra']).map(function (_, index) {\n return (\n 'case ' + (index) + ':' +\n 'res = fn.call(' + ['self'].concat(args.slice(0, index)).concat('cb').join(',') + ');' +\n 'break;'\n );\n }).join(''),\n 'default:',\n 'args[argLength] = cb;',\n 'res = fn.apply(self, args);',\n '}',\n \n 'if (res &&',\n '(typeof res === \"object\" || typeof res === \"function\") &&',\n 'typeof res.then === \"function\"',\n ') {rs(res);}',\n '});',\n '};'\n ].join('');\n\n return Function(\n ['Promise', 'fn'],\n body\n )(Promise, fn);\n}\n\nPromise.nodeify = function (fn) {\n return function () {\n var args = Array.prototype.slice.call(arguments);\n var callback =\n typeof args[args.length - 1] === 'function' ? args.pop() : null;\n var ctx = this;\n try {\n return fn.apply(this, arguments).nodeify(callback, ctx);\n } catch (ex) {\n if (callback === null || typeof callback == 'undefined') {\n return new Promise(function (resolve, reject) {\n reject(ex);\n });\n } else {\n asap(function () {\n callback.call(ctx, ex);\n })\n }\n }\n }\n};\n\nPromise.prototype.nodeify = function (callback, ctx) {\n if (typeof callback != 'function') return this;\n\n this.then(function (value) {\n asap(function () {\n callback.call(ctx, null, value);\n });\n }, function (err) {\n asap(function () {\n callback.call(ctx, err);\n });\n });\n};\n","'use strict';\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\nPromise.enableSynchronous = function () {\n Promise.prototype.isPending = function() {\n return this.getState() == 0;\n };\n\n Promise.prototype.isFulfilled = function() {\n return this.getState() == 1;\n };\n\n Promise.prototype.isRejected = function() {\n return this.getState() == 2;\n };\n\n Promise.prototype.getValue = function () {\n if (this._V === 3) {\n return this._W.getValue();\n }\n\n if (!this.isFulfilled()) {\n throw new Error('Cannot get a value of an unfulfilled promise.');\n }\n\n return this._W;\n };\n\n Promise.prototype.getReason = function () {\n if (this._V === 3) {\n return this._W.getReason();\n }\n\n if (!this.isRejected()) {\n throw new Error('Cannot get a rejection reason of a non-rejected promise.');\n }\n\n return this._W;\n };\n\n Promise.prototype.getState = function () {\n if (this._V === 3) {\n return this._W.getState();\n }\n if (this._V === -1 || this._V === -2) {\n return 0;\n }\n\n return this._V;\n };\n};\n\nPromise.disableSynchronous = function() {\n Promise.prototype.isPending = undefined;\n Promise.prototype.isFulfilled = undefined;\n Promise.prototype.isRejected = undefined;\n Promise.prototype.getValue = undefined;\n Promise.prototype.getReason = undefined;\n Promise.prototype.getState = undefined;\n};\n","/*!\n * EventEmitter v5.2.9 - git.io/ee\n * Unlicense - http://unlicense.org/\n * Oliver Caldwell - https://oli.me.uk/\n * @preserve\n */\n\n;(function (exports) {\n 'use strict';\n\n /**\n * Class for managing events.\n * Can be extended to provide event functionality in other classes.\n *\n * @class EventEmitter Manages event registering and emitting.\n */\n function EventEmitter() {}\n\n // Shortcuts to improve speed and size\n var proto = EventEmitter.prototype;\n var originalGlobalValue = exports.EventEmitter;\n\n /**\n * Finds the index of the listener for the event in its storage array.\n *\n * @param {Function[]} listeners Array of listeners to search through.\n * @param {Function} listener Method to look for.\n * @return {Number} Index of the specified listener, -1 if not found\n * @api private\n */\n function indexOfListener(listeners, listener) {\n var i = listeners.length;\n while (i--) {\n if (listeners[i].listener === listener) {\n return i;\n }\n }\n\n return -1;\n }\n\n /**\n * Alias a method while keeping the context correct, to allow for overwriting of target method.\n *\n * @param {String} name The name of the target method.\n * @return {Function} The aliased method\n * @api private\n */\n function alias(name) {\n return function aliasClosure() {\n return this[name].apply(this, arguments);\n };\n }\n\n /**\n * Returns the listener array for the specified event.\n * Will initialise the event object and listener arrays if required.\n * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them.\n * Each property in the object response is an array of listener functions.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Function[]|Object} All listener functions for the event.\n */\n proto.getListeners = function getListeners(evt) {\n var events = this._getEvents();\n var response;\n var key;\n\n // Return a concatenated array of all matching events if\n // the selector is a regular expression.\n if (evt instanceof RegExp) {\n response = {};\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n response[key] = events[key];\n }\n }\n }\n else {\n response = events[evt] || (events[evt] = []);\n }\n\n return response;\n };\n\n /**\n * Takes a list of listener objects and flattens it into a list of listener functions.\n *\n * @param {Object[]} listeners Raw listener objects.\n * @return {Function[]} Just the listener functions.\n */\n proto.flattenListeners = function flattenListeners(listeners) {\n var flatListeners = [];\n var i;\n\n for (i = 0; i < listeners.length; i += 1) {\n flatListeners.push(listeners[i].listener);\n }\n\n return flatListeners;\n };\n\n /**\n * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Object} All listener functions for an event in an object.\n */\n proto.getListenersAsObject = function getListenersAsObject(evt) {\n var listeners = this.getListeners(evt);\n var response;\n\n if (listeners instanceof Array) {\n response = {};\n response[evt] = listeners;\n }\n\n return response || listeners;\n };\n\n function isValidListener (listener) {\n if (typeof listener === 'function' || listener instanceof RegExp) {\n return true\n } else if (listener && typeof listener === 'object') {\n return isValidListener(listener.listener)\n } else {\n return false\n }\n }\n\n /**\n * Adds a listener function to the specified event.\n * The listener will not be added if it is a duplicate.\n * If the listener returns true then it will be removed after it is called.\n * If you pass a regular expression as the event name then the listener will be added to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListener = function addListener(evt, listener) {\n if (!isValidListener(listener)) {\n throw new TypeError('listener must be a function');\n }\n\n var listeners = this.getListenersAsObject(evt);\n var listenerIsWrapped = typeof listener === 'object';\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) {\n listeners[key].push(listenerIsWrapped ? listener : {\n listener: listener,\n once: false\n });\n }\n }\n\n return this;\n };\n\n /**\n * Alias of addListener\n */\n proto.on = alias('addListener');\n\n /**\n * Semi-alias of addListener. It will add a listener that will be\n * automatically removed after its first execution.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addOnceListener = function addOnceListener(evt, listener) {\n return this.addListener(evt, {\n listener: listener,\n once: true\n });\n };\n\n /**\n * Alias of addOnceListener.\n */\n proto.once = alias('addOnceListener');\n\n /**\n * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad.\n * You need to tell it what event names should be matched by a regex.\n *\n * @param {String} evt Name of the event to create.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvent = function defineEvent(evt) {\n this.getListeners(evt);\n return this;\n };\n\n /**\n * Uses defineEvent to define multiple events.\n *\n * @param {String[]} evts An array of event names to define.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvents = function defineEvents(evts) {\n for (var i = 0; i < evts.length; i += 1) {\n this.defineEvent(evts[i]);\n }\n return this;\n };\n\n /**\n * Removes a listener function from the specified event.\n * When passed a regular expression as the event name, it will remove the listener from all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to remove the listener from.\n * @param {Function} listener Method to remove from the event.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListener = function removeListener(evt, listener) {\n var listeners = this.getListenersAsObject(evt);\n var index;\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key)) {\n index = indexOfListener(listeners[key], listener);\n\n if (index !== -1) {\n listeners[key].splice(index, 1);\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of removeListener\n */\n proto.off = alias('removeListener');\n\n /**\n * Adds listeners in bulk using the manipulateListeners method.\n * If you pass an object as the first argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added.\n * You can also pass it a regular expression to add the array of listeners to all events that match it.\n * Yeah, this function does quite a bit. That's probably a bad thing.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListeners = function addListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(false, evt, listeners);\n };\n\n /**\n * Removes listeners in bulk using the manipulateListeners method.\n * If you pass an object as the first argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be removed.\n * You can also pass it a regular expression to remove the listeners from all events that match it.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListeners = function removeListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(true, evt, listeners);\n };\n\n /**\n * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level.\n * The first argument will determine if the listeners are removed (true) or added (false).\n * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be added/removed.\n * You can also pass it a regular expression to manipulate the listeners of all events that match it.\n *\n * @param {Boolean} remove True if you want to remove listeners, false if you want to add.\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add/remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) {\n var i;\n var value;\n var single = remove ? this.removeListener : this.addListener;\n var multiple = remove ? this.removeListeners : this.addListeners;\n\n // If evt is an object then pass each of its properties to this method\n if (typeof evt === 'object' && !(evt instanceof RegExp)) {\n for (i in evt) {\n if (evt.hasOwnProperty(i) && (value = evt[i])) {\n // Pass the single listener straight through to the singular method\n if (typeof value === 'function') {\n single.call(this, i, value);\n }\n else {\n // Otherwise pass back to the multiple function\n multiple.call(this, i, value);\n }\n }\n }\n }\n else {\n // So evt must be a string\n // And listeners must be an array of listeners\n // Loop over it and pass each one to the multiple method\n i = listeners.length;\n while (i--) {\n single.call(this, evt, listeners[i]);\n }\n }\n\n return this;\n };\n\n /**\n * Removes all listeners from a specified event.\n * If you do not specify an event then all listeners will be removed.\n * That means every event will be emptied.\n * You can also pass a regex to remove all events that match it.\n *\n * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeEvent = function removeEvent(evt) {\n var type = typeof evt;\n var events = this._getEvents();\n var key;\n\n // Remove different things depending on the state of evt\n if (type === 'string') {\n // Remove all listeners for the specified event\n delete events[evt];\n }\n else if (evt instanceof RegExp) {\n // Remove all events matching the regex.\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n delete events[key];\n }\n }\n }\n else {\n // Remove all listeners in all events\n delete this._events;\n }\n\n return this;\n };\n\n /**\n * Alias of removeEvent.\n *\n * Added to mirror the node API.\n */\n proto.removeAllListeners = alias('removeEvent');\n\n /**\n * Emits an event of your choice.\n * When emitted, every listener attached to that event will be executed.\n * If you pass the optional argument array then those arguments will be passed to every listener upon execution.\n * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately.\n * So they will not arrive within the array on the other side, they will be separate.\n * You can also pass a regular expression to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {Array} [args] Optional array of arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emitEvent = function emitEvent(evt, args) {\n var listenersMap = this.getListenersAsObject(evt);\n var listeners;\n var listener;\n var i;\n var key;\n var response;\n\n for (key in listenersMap) {\n if (listenersMap.hasOwnProperty(key)) {\n listeners = listenersMap[key].slice(0);\n\n for (i = 0; i < listeners.length; i++) {\n // If the listener returns true then it shall be removed from the event\n // The function is executed either with a basic call or an apply if there is an args array\n listener = listeners[i];\n\n if (listener.once === true) {\n this.removeListener(evt, listener.listener);\n }\n\n response = listener.listener.apply(this, args || []);\n\n if (response === this._getOnceReturnValue()) {\n this.removeListener(evt, listener.listener);\n }\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of emitEvent\n */\n proto.trigger = alias('emitEvent');\n\n /**\n * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on.\n * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {...*} Optional additional arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emit = function emit(evt) {\n var args = Array.prototype.slice.call(arguments, 1);\n return this.emitEvent(evt, args);\n };\n\n /**\n * Sets the current value to check against when executing listeners. If a\n * listeners return value matches the one set here then it will be removed\n * after execution. This value defaults to true.\n *\n * @param {*} value The new value to check for when executing listeners.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.setOnceReturnValue = function setOnceReturnValue(value) {\n this._onceReturnValue = value;\n return this;\n };\n\n /**\n * Fetches the current value to check against when executing listeners. If\n * the listeners return value matches this one then it should be removed\n * automatically. It will return true by default.\n *\n * @return {*|Boolean} The current value to check for or the default, true.\n * @api private\n */\n proto._getOnceReturnValue = function _getOnceReturnValue() {\n if (this.hasOwnProperty('_onceReturnValue')) {\n return this._onceReturnValue;\n }\n else {\n return true;\n }\n };\n\n /**\n * Fetches the events object and creates one if required.\n *\n * @return {Object} The events storage object.\n * @api private\n */\n proto._getEvents = function _getEvents() {\n return this._events || (this._events = {});\n };\n\n /**\n * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version.\n *\n * @return {Function} Non conflicting EventEmitter class.\n */\n EventEmitter.noConflict = function noConflict() {\n exports.EventEmitter = originalGlobalValue;\n return EventEmitter;\n };\n\n // Expose the class either via AMD, CommonJS or the global object\n if (typeof define === 'function' && define.amd) {\n define(function () {\n return EventEmitter;\n });\n }\n else if (typeof module === 'object' && module.exports){\n module.exports = EventEmitter;\n }\n else {\n exports.EventEmitter = EventEmitter;\n }\n}(typeof window !== 'undefined' ? window : this || {}));\n","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var inProgress = {};\nvar dataWebpackPrefix = \"LiveHelperChat:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = function(url, done, key, chunkId) {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\t\tscript.src = url;\n\t\tif (script.src.indexOf(window.location.origin + '/') !== 0) {\n\t\t\tscript.crossOrigin = \"anonymous\";\n\t\t}\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = function(prev, event) {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach(function(fn) { return fn(event); });\n\t\tif(prev) return prev(event);\n\t}\n\t;\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = function(chunkId) {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce(function(promises, key) {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = function(chunkId) {\n\t// return url for filenames based on template\n\treturn \"\" + {\"8\":\"6d3de043cfb6e40e6a85\",\"81\":\"75d1d932aa8416f0bf23\",\"213\":\"82d024432640e184cab5\",\"335\":\"94e75bc034e279cb1a5d\",\"398\":\"16da6b6586a6fd6028ae\",\"417\":\"507f464a966a8359428a\",\"530\":\"c9aa29f9fd71f320cdd6\",\"783\":\"a68fc3eccb8af7392e9f\",\"821\":\"b10c9440ec454caf8cbd\"}[chunkId] + \".js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.p = \"./\";","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t179: 0\n};\n\n__webpack_require__.f.j = function(chunkId, promises) {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise(function(resolve, reject) { installedChunkData = installedChunks[chunkId] = [resolve, reject]; });\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = function(event) {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkIds[i]] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkLiveHelperChat\"] = self[\"webpackChunkLiveHelperChat\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","(function (global) {\n\n var currentScript = document.currentScript || (function() {\n var scripts = document.getElementsByTagName('script');\n return scripts[scripts.length - 1];\n })();\n\n var scopeScript = currentScript.getAttribute('scope') || 'LHC';\n\n if (/google|baidu|bing|msn|duckduckbot|teoma|slurp|yandex|Chrome-Lighthouse/i.test(navigator.userAgent)) {\n return;\n }\n\n if (!global[scopeScript+'_API']) {\n if (global['LHC_API']) {\n global[scopeScript+'_API'] = global['LHC_API'];\n } else {\n return;\n }\n }\n\n var lhcError = {\n log : function(message, filename, lineNumber, stack, column) {\n var e;\n e = {};\n e.message = message || \"\";\n e.message += \"\\n\" + global.navigator.userAgent;\n e.location = location && location.href ? location.href : \"\";\n e.file = filename || \"\";\n e.line = lineNumber || \"\";\n e.column = column || \"\";\n e.stack = stack ? JSON.stringify(stack) : \"\";\n e.stack = e.stack.replace(/(\\r\\n|\\n|\\r)/gm, \"\");\n var xhr = new XMLHttpRequest();\n xhr.open( \"POST\", global[scopeScript+'_API']['args']['lhc_base_url'] + 'audit/logjserror', true);\n xhr.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n xhr.send( \"data=\" + encodeURIComponent( JSON.stringify(e) ) );\n }\n }\n\n try {\n\n window.addEventListener('error', function (e) {\n if (lhcError && e.filename.indexOf(global[scopeScript+'_API']['args']['lhc_base_url'].replace('index.php/')) !== -1) {\n lhcError.log(e.message, e.filename, e.lineNumber || e.lineno, e.error.stack, e.colno);\n }\n })\n\n global['$_' + scopeScript + '_Instance'] = null;\n global['$_' + scopeScript + '_Debug'] = false;\n global['$_' + scopeScript] = global['$_' + scopeScript] || {};\n\n (function (lhc, LHC_API) {\n\n lhc.loaded = false;\n lhc.connected = false;\n lhc.ready = false;\n lhc.version = 208;\n\n const isMobileItem = require('ismobilejs');\n var isMobile = isMobileItem.default(global.navigator.userAgent).phone;\n\n lhc.isMobile = isMobile;\n\n var init = () => {\n\n if (!global.Promise) {\n global.Promise = require('promise');\n }\n\n var BehaviorSubject = require('./util/monitoredVariable').monitoredVariable;\n var EventEmitter = require('wolfy87-eventemitter');\n\n var statusWidget = require('./lib/widgets/statusWidget').statusWidget;\n var mainWidget = require('./lib/widgets/mainWidget').mainWidget;\n var mainWidgetPopup = require('./lib/widgets/mainWidgetPopup').mainWidgetPopup;\n var containerChat = require('./lib/widgets/containerChat').containerChat;\n var helperFunctions = require('./lib/helperFunctions').helperFunctions;\n var userSession = require('./util/userSession').userSession;\n var storageHandler = require('./util/storageHandler').storageHandler;\n var chatNotifications = require('./lib/chatNotifications').chatNotifications;\n var chatEventsHandler = require('./util/chatEventsHandler').chatEventsHandler;\n\n LHC_API.args = LHC_API.args || {};\n\n if (typeof LHC_API.args.mobile_view !== 'undefined') {\n lhc.isMobile = isMobile = LHC_API.args.mobile_view;\n }\n\n const prefixLowercase = scopeScript.toLowerCase();\n const prefixStorage = (prefixLowercase && LHC_API.args.scope_storage ? prefixLowercase : 'lhc');\n const cookieEnabledUser = typeof LHC_API.args.cookie_enabled !== 'undefined' ? LHC_API.args.cookie_enabled : true;\n const userMode = LHC_API.args.mode || 'widget';\n\n var storageHandler = new storageHandler(global, LHC_API.args.domain || null, prefixStorage, cookieEnabledUser);\n\n // Cookies are disabled and it's required for us to work. So switch to mode where cookies are not required\n if (storageHandler.cookieEnabled === false && userMode == 'widget') {\n LHC_API.args.orig = {}\n LHC_API.args.orig.mode = LHC_API.args.mode;\n LHC_API.args.orig.proactive = LHC_API.args.proactive;\n LHC_API.args.orig.check_messages = LHC_API.args.check_messages;\n\n LHC_API.args.mode = 'popup';\n LHC_API.args.proactive = false;\n LHC_API.args.check_messages = false;\n }\n\n if (LHC_API.args.cookie_per_page) {\n storageHandler.setCookiePerPage(LHC_API.args.cookie_per_page);\n }\n\n var referrer = (document.referrer) ? document.referrer.substr(document.referrer.indexOf('://') + 1) : '';\n var location = (document.location) ? encodeURIComponent(window.location.href.substring(window.location.protocol.length)) : '';\n\n storageHandler.setSessionReferer(referrer);\n\n referrer = referrer ? encodeURIComponent(referrer) : '';\n\n var languageOverride = '';\n\n if (storageHandler.getLocalStorage(prefixStorage+'_lng')) {\n languageOverride = LHC_API.args.lang = storageHandler.getLocalStorage(prefixStorage+'_lng');\n }\n\n if (LHC_API.args.lang) {\n LHC_API.args.lang = LHC_API.args.lang.replace('/', '') + '/';\n }\n\n // Main attributes\n var attributesWidget = {\n terminated: false,\n prefixLowercase: prefixLowercase,\n prefixStorage: prefixStorage,\n prefixScope: scopeScript,\n cookie_enabled: cookieEnabledUser,\n LHC_API: LHC_API,\n viewHandler: null,\n msgSnippet: null,\n react_attr: LHC_API.args.react_attr || null,\n hide_parent: LHC_API.args.hide_parent || false,\n hide_iframe: LHC_API.args.hide_iframe || false,\n hide_status: LHC_API.args.hide_status || null,\n mainWidget: new mainWidget(prefixLowercase),\n popupWidget: new mainWidgetPopup(),\n chatNotifications: chatNotifications,\n jsVars: new BehaviorSubject(true),\n onlineStatus: new BehaviorSubject(true),\n wloaded: new BehaviorSubject(false),\n sload: new BehaviorSubject(false),\n shidden: new BehaviorSubject(LHC_API.args.hide_status || false),\n msgsnippet_status: new BehaviorSubject(false),\n unread_counter: new BehaviorSubject(0),\n widgetStatus: new BehaviorSubject((storageHandler.getSessionStorage(prefixStorage + '_ws') === 'true' || (LHC_API.args.mode && LHC_API.args.mode == 'embed'))),\n eventEmitter: new EventEmitter(),\n toggleSound: new BehaviorSubject(storageHandler.getSessionStorage(prefixStorage + '_sound') === 'true', {'ignore_sub': true}),\n hideOffline: false,\n fscreen: LHC_API.args.fscreen || false,\n isMobile: isMobile,\n isIE: (navigator.userAgent.toUpperCase().indexOf(\"TRIDENT/\") != -1 || navigator.userAgent.toUpperCase().indexOf(\"MSIE\") != -1 || typeof Object.assign !== 'function'),\n fresh: LHC_API.args.fresh || false,\n popupDimesnions: {pheight: (LHC_API.args.pheight || 520), pwidth: (LHC_API.args.pwidth || 500)},\n leaveMessage: LHC_API.args.leaveamessage || null,\n department: LHC_API.args.department || [],\n dep_default: LHC_API.args.dep_default || null,\n product: LHC_API.args.product || [],\n theme: typeof LHC_API.args.theme !== 'undefined' ? (typeof LHC_API.args.theme === 'object' ? LHC_API.args.theme.join(',') : LHC_API.args.theme) : null,\n theme_v: null,\n domain: LHC_API.args.domain || null,\n domain_lhc: null,\n instance_id: 0,\n profile_pic: LHC_API.args.profile_pic || null,\n position: LHC_API.args.position || 'bottom_right',\n position_placement: LHC_API.args.position_placement || 'bottom_right',\n base_url: LHC_API.args.lhc_base_url,\n mode: LHC_API.args.mode || 'widget',\n tag: LHC_API.args.tag || '',\n status_delay: LHC_API.args.status_delay || 0,\n proactive: {},\n captcha: null,\n focused: true,\n clinst: false,\n kcw: LHC_API.args.kcw || false,\n offline_redirect: LHC_API.args.offline_redirect || null,\n identifier: LHC_API.args.identifier || '',\n proactive_interval: null,\n lang: LHC_API.args.lang || '',\n langOverride: languageOverride,\n subject_id: LHC_API.args.subject_id || '',\n bot_id: LHC_API.args.bot_id || '',\n trigger_id: LHC_API.args.trigger_id || '',\n priority: LHC_API.args.priority || null,\n events: LHC_API.args.events || [],\n conversion: LHC_API.args.conversion || '',\n hhtml: LHC_API.args.hhtml || '',\n survey: LHC_API.args.survey || null,\n operator: LHC_API.args.operator || null,\n phash: LHC_API.args.phash || null,\n pvhash: LHC_API.args.pvhash || null,\n // Login Objects\n userSession: new userSession(),\n storageHandler: storageHandler,\n staticJS: {},\n nh : null, // Need help data\n init_calls: [],\n childCommands: [],\n childExtCommands: [],\n lhc_var: (LHC_API.args.lhc_var || (typeof lhc_var !== 'undefined' ? lhc_var : null)),\n loadcb: LHC_API.args.loadcb || null,\n LHCChatOptions: global[scopeScript + 'ChatOptions'] || {}\n };\n\n attributesWidget.widgetDimesions = new BehaviorSubject({\n sright: (LHC_API.args.sright || 0),\n sbottom: (LHC_API.args.sbottom || 0),\n wright_inv: 0,\n wbottom: 0,\n wright: 0,\n width: ((isMobile || attributesWidget.fscreen) ? 100 : (LHC_API.args.wwidth || 350)),\n height: ((isMobile || attributesWidget.fscreen) ? 100 : (LHC_API.args.wheight || 520)),\n units: ((isMobile || attributesWidget.fscreen) ? '%' : 'px')\n });\n\n var chatEvents = new chatEventsHandler(attributesWidget);\n\n lhc.eventListener = attributesWidget.eventEmitter;\n lhc.attributes = attributesWidget;\n\n attributesWidget.userSession.setAttributes(attributesWidget);\n attributesWidget.userSession.setSessionInformation(attributesWidget.storageHandler.getSessionInformation());\n attributesWidget.userSession.setSessionReferrer(storageHandler.getSessionReferrer());\n\n if (attributesWidget.mode == 'widget' || attributesWidget.mode == 'popup') {\n\n var containerChatObj = new containerChat(attributesWidget.prefixLowercase, LHC_API.args.pnode || null);\n\n attributesWidget.viewHandler = new statusWidget(attributesWidget.prefixLowercase);\n containerChatObj.cont.elmDom.appendChild(attributesWidget.viewHandler.cont.constructUI(), !0);\n\n if (attributesWidget.mode == 'widget' || attributesWidget.mode == 'popup') {\n containerChatObj.cont.elmDom.appendChild(attributesWidget.mainWidget.cont.constructUI(), !0);\n }\n\n } else {\n var embedWrapper = document.getElementById(attributesWidget.prefixLowercase + '_status_container_page');\n if (embedWrapper !== null) {\n embedWrapper.appendChild(attributesWidget.mainWidget.cont.constructUI());\n embedWrapper.style.height = (LHC_API.args.wheight || 520) + 'px';\n } else {\n attributesWidget.position = 'api';\n }\n }\n\n function getArguments(){\n return {\n 'cd': (storageHandler.cookieEnabled === false ? 1 : null),\n 'vid': (LHC_API.args.UUID || attributesWidget.userSession.getVID()),\n 'hnh': attributesWidget.userSession.hnh,\n 'tz': helperFunctions.getTzOffset(),\n 'r': referrer,\n 'l': location,\n 'dt': encodeURIComponent(document.title),\n 'ie': attributesWidget.isIE,\n 'dep': attributesWidget.department.join(','),\n 'idnt': attributesWidget.identifier,\n 'tag': attributesWidget.tag,\n 'theme': attributesWidget.theme,\n 'mode': attributesWidget.mode,\n 'pos': attributesWidget.position\n };\n }\n\n function showNeedHelp(nh) {\n import('./lib/widgets/needhelpWidget').then((module) => {\n var needhelpWidget = new module.needhelpWidget(attributesWidget.prefixLowercase);\n containerChatObj.cont.elmDom.appendChild(needhelpWidget.cont.constructUI(), !0);\n needhelpWidget.init(attributesWidget, nh);\n });\n }\n\n function showProactive(){\n import('./util/proactiveChat').then((module) => {\n module.proactiveChat.setParams({\n 'interval': attributesWidget.proactive_interval\n }, attributesWidget, chatEvents);\n });\n }\n\n helperFunctions.makeRequest(LHC_API.args.lhc_base_url + attributesWidget.lang + 'widgetrestapi/settings', {\n params: getArguments()\n }, (data) => {\n\n if (lhc.version !== data.wv && document.getElementById(attributesWidget.prefixLowercase+'-js-reload') === null) {\n\n if (data.terminate) {\n return;\n }\n\n attributesWidget.userSession.setVID(data.vid);\n\n // Mark script as terminated\n attributesWidget.terminated = true;\n\n // Remove legacy dom\n helperFunctions.removeById(attributesWidget.prefixLowercase+'_container_v2');\n helperFunctions.removeById(attributesWidget.prefixLowercase+'_status_widget_v2');\n\n // Create new embed script\n var po = document.createElement(\"script\");\n po.type = currentScript.type;\n po.id = attributesWidget.prefixLowercase+'-js-reload';\n po.async = true;\n if (currentScript.getAttribute('scope')) { po.setAttribute('scope',currentScript.getAttribute('scope')); }\n\n // Expires cache\n po.src = currentScript.getAttribute('src') + '&r='+ (new Date()).getHours() + (new Date()).getMinutes();\n var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);\n return;\n }\n\n if (data.terminate || ((!attributesWidget.leaveMessage && data.chat_ui.leaveamessage === false) && data.isOnline === false)) {\n\n if (LHC_API.args.offline_redirect && attributesWidget.mode == 'embed') {\n document.location = LHC_API.args.offline_redirect;\n }\n\n if (data.terminate) {\n return;\n }\n }\n\n // Send event that lhc has started\n // So parent page informs back that it has lhc\n if ((attributesWidget.hide_parent || attributesWidget.hide_iframe || (data.chat_ui && (data.chat_ui.hide_iframe || data.chat_ui.hide_parent))) && window.location != window.parent.location && window.parent.closed === false) {\n window.parent.postMessage('lhc::started','*');\n }\n\n attributesWidget.leaveMessage = attributesWidget.leaveMessage || data.chat_ui.leaveamessage;\n\n if (data.department) {\n attributesWidget.department = data.department;\n }\n\n __webpack_public_path__ = data.chunks_location + \"/\";\n\n if (data.secure_cookie) {\n attributesWidget.storageHandler.setSecureCookie(true);\n }\n\n if (data.domain) {\n attributesWidget.storageHandler.setCookieDomain(data.domain);\n }\n\n if (data.siteaccess) {\n attributesWidget.lang = data.siteaccess;\n }\n\n if (data.static) {\n attributesWidget.staticJS = data.static;\n }\n\n if (data.pdim) {\n attributesWidget.popupDimesnions = data.pdim;\n }\n\n if (data.survey_id) {\n attributesWidget.survey = data.survey_id;\n }\n\n if (data.domain_lhc) {\n attributesWidget.domain_lhc = data.domain_lhc;\n }\n\n if (data.cont_css) {\n attributesWidget.cont_ss = data.cont_css;\n }\n\n if (data.wposition) {\n attributesWidget.position_placement = data.wposition;\n }\n\n attributesWidget.captcha = {hash: data.hash, ts: data.hash_ts};\n attributesWidget.userSession.setVID(data.vid);\n\n // Store session\n attributesWidget.storageHandler.storeSessionInformation(attributesWidget.userSession.getSessionAttributes());\n\n attributesWidget.hideOffline = data.hideOffline;\n attributesWidget.onlineStatus.next(data.isOnline);\n\n if (data.theme) {\n attributesWidget.theme = data.theme;\n attributesWidget.theme_v = data.theme_v;\n }\n\n if (data.chat_ui) {\n\n if (data.chat_ui.hide_parent) {\n attributesWidget.hide_parent = true;\n }\n\n if ((data.chat_ui.fscreen && attributesWidget.mode == 'embed') || attributesWidget.fscreen) {\n attributesWidget.widgetDimesions.nextProperty('width', 100);\n attributesWidget.widgetDimesions.nextProperty('height', 100);\n attributesWidget.widgetDimesions.nextProperty('units', '%');\n attributesWidget.fscreen = isMobile = attributesWidget.isMobile = true;\n }\n\n if (data.chat_ui.wheight && !isMobile) {\n attributesWidget.widgetDimesions.nextProperty('height', data.chat_ui.wheight);\n }\n\n if (data.chat_ui.wwidth && !isMobile) {\n attributesWidget.widgetDimesions.nextProperty('width', data.chat_ui.wwidth);\n }\n\n if (data.chat_ui.hhtml) {\n attributesWidget.hhtml = data.chat_ui.hhtml;\n }\n\n if (data.chat_ui.status_delay) {\n attributesWidget.status_delay = data.chat_ui.status_delay;\n }\n\n if (data.chat_ui.kcw) {\n attributesWidget.kcw = true;\n }\n\n if (data.chat_ui.clinst) {\n attributesWidget.clinst = true;\n }\n\n if (data.chat_ui.wbottom) {\n attributesWidget.widgetDimesions.nextProperty('wbottom', data.chat_ui.wbottom);\n }\n\n if (data.chat_ui.sbottom) {\n attributesWidget.widgetDimesions.nextProperty('sbottom', data.chat_ui.sbottom);\n }\n\n if (data.chat_ui.sright) {\n attributesWidget.widgetDimesions.nextProperty('sright', data.chat_ui.sright);\n }\n\n if (data.chat_ui.wright) {\n attributesWidget.widgetDimesions.nextProperty('wright', data.chat_ui.wright);\n }\n\n if (data.chat_ui.wright_inv) {\n attributesWidget.widgetDimesions.nextProperty('wright_inv', data.chat_ui.wright_inv);\n }\n\n if (data.chat_ui.mobile_popup && isMobile) {\n attributesWidget.mode = 'popup';\n }\n\n if (data.chat_ui.sound_enabled && storageHandler.getSessionStorage(prefixStorage + '_sound') === null) {\n attributesWidget.toggleSound.next(true);\n }\n\n if (data.instance_id) {\n attributesWidget.instance_id = data.instance_id;\n }\n\n if (data.chat_ui.check_status) {\n import('./util/activityMonitoring').then((module) => {\n module.activityMonitoring.setParams({\n 'timeout': data.chat_ui.check_status,\n 'track_mouse': data.chat_ui.track_mouse,\n 'track_activity': data.chat_ui.track_activity\n }, attributesWidget);\n });\n }\n\n if (data.ga) {\n import('./util/analyticEvents').then((module) => {\n module.analyticEvents.setParams({\n 'ga': data.ga\n }, attributesWidget);\n });\n }\n }\n\n if (data.nh && attributesWidget.fresh === false && attributesWidget['position'] != 'api') {\n attributesWidget.nh = data.nh;\n if (attributesWidget.mode == 'widget' || attributesWidget.mode == 'popup') {\n if (data.nh.ap || attributesWidget.userSession.id === null) {\n showNeedHelp(data.nh);\n }\n }\n }\n\n if (data.js_vars) {\n // Javascript custom variables init\n // Extensions can listen for these\n attributesWidget.jsVars.next(data.js_vars);\n\n // Monitor js vars if required\n if (data.js_vars.length > 0) {\n attributesWidget.userSession.setupVarsMonitoring(data.js_vars, (vars, prefillVars) => {\n chatEvents.sendChildEvent('jsVars', [vars, prefillVars]);\n });\n }\n }\n\n // Init main widgets\n if (attributesWidget.mode == 'widget' || attributesWidget.mode == 'popup') {\n attributesWidget.viewHandler.init(attributesWidget, data.ll);\n }\n\n if (!(attributesWidget.position == 'api' && attributesWidget.mode == 'embed')) {\n attributesWidget.mainWidget.init(attributesWidget, data.ll);\n }\n\n // Show status widget\n if (attributesWidget.mode == 'widget' || attributesWidget.mode == 'popup') {\n containerChatObj.cont.show();\n }\n\n if (attributesWidget.loadcb) {\n attributesWidget.loadcb(attributesWidget);\n }\n\n if (data.init_calls) {\n attributesWidget.init_calls = data.init_calls;\n }\n\n attributesWidget.proactive_interval = data.chat_ui.proactive_interval;\n\n if (!data.disable_proactive && (attributesWidget.mode == 'widget' || attributesWidget.mode == 'popup' || attributesWidget.mode == 'embed') && (typeof LHC_API.args.proactive === 'undefined' || LHC_API.args.proactive === true) && attributesWidget.storageHandler.getSessionStorage(prefixStorage + '_invt') === null) {\n showProactive();\n }\n\n if (attributesWidget.init_calls.length > 0) {\n attributesWidget.init_calls.forEach((item) => {\n if (item.extension == 'nodeJSChat') {\n import('./util/nodeJSChat').then((module) => {\n module.nodeJSChat.setParams(item.params, attributesWidget, chatEvents);\n });\n }\n });\n }\n\n })\n\n // Widget Hide event\n attributesWidget.eventEmitter.addListener('closeWidget', function (params) {\n attributesWidget.widgetStatus.next(false);\n chatEvents.sendChildEvent('closedWidget', [params]);\n });\n\n // Send event to the child instantly\n attributesWidget.eventEmitter.addListener('sendChildEvent', function (params) {\n if (typeof params['boot'] !== 'undefined') {\n attributesWidget.mainWidget.bootstrap();\n } else {\n if (attributesWidget.mainWidget.isLoaded == true && lhc.loaded == true) {\n chatEvents.sendChildEvent(params['cmd'], [params['arg']]);\n } else {\n attributesWidget.childCommands.push(params);\n }\n }\n });\n\n // Send smart event to the child\n attributesWidget.eventEmitter.addListener('sendChildExtEvent', function (params) {\n if (typeof params['boot'] !== 'undefined') {\n attributesWidget.mainWidget.bootstrap();\n } else {\n if (attributesWidget.mainWidget.isLoaded == true && lhc.loaded == true) {\n chatEvents.sendChildEvent(params['cmd'], [params['arg']], 'lhc_load_ext');\n } else {\n attributesWidget.childExtCommands.push(params);\n }\n }\n });\n\n // Toggle sound user\n attributesWidget.eventEmitter.addListener('toggleSound', function () {\n var newValue = !attributesWidget.toggleSound.value;\n attributesWidget.toggleSound.next(newValue);\n });\n\n // Toggle cookies policy\n attributesWidget.eventEmitter.addListener('enableCookies', function () {\n\n // Check does cookies are supported in genreal\n if (storageHandler.checkCookiesSupport() === true) {\n // Store session\n var sessionAtrribute = attributesWidget.userSession.getSessionAttributes();\n if (typeof sessionAtrribute.hnh !== 'undefined') { delete sessionAtrribute['hnh']; }\n attributesWidget.storageHandler.storeSessionInformation(sessionAtrribute);\n\n if (typeof LHC_API.args.orig !== 'undefined') {\n\n attributesWidget.mode = LHC_API.args.mode = LHC_API.args.orig.mode;\n LHC_API.args.proactive = LHC_API.args.orig.proactive;\n LHC_API.args.check_messages = LHC_API.args.orig.check_messages;\n\n helperFunctions.makeRequest(LHC_API.args.lhc_base_url + attributesWidget.lang + 'widgetrestapi/settings', {\n params: getArguments()\n }, (data) => {\n // Change mode for react app\n attributesWidget.eventEmitter.emitEvent('sendChildEvent',[{'cmd' : 'attr_set', 'arg' : {'type':'attr_set','attr': ['mode'], data : attributesWidget.mode}}]);\n\n // Show need help widget if it's required\n if (attributesWidget.mode == 'widget' && attributesWidget.nh !== null) {\n showNeedHelp(attributesWidget.nh);\n }\n\n // Enable proactive if it's required\n if ((attributesWidget.mode == 'widget' || attributesWidget.mode == 'popup') && (typeof LHC_API.args.proactive === 'undefined' || LHC_API.args.proactive === true) && attributesWidget.storageHandler.getSessionStorage(prefixStorage + '_invt') === null) {\n showProactive();\n }\n });\n }\n }\n });\n\n\n // Clear chat cookies if there is any\n // Then popup finishes loading it calls this to clean up chat cookies. So visitor can start new chat.\n attributesWidget.eventEmitter.addListener('endChatCookies', function (params) {\n if (attributesWidget.kcw === false || (params && params['force'] == true)) {\n attributesWidget.userSession.setChatInformation({'id': null, 'hash': null});\n attributesWidget.storageHandler.storeSessionInformation(attributesWidget.userSession.getSessionAttributes());\n attributesWidget.proactive = {};\n }\n });\n\n attributesWidget.eventEmitter.addListener('endChat', function (params) {\n\n attributesWidget.userSession.setChatInformation({'id': null, 'hash': null});\n attributesWidget.storageHandler.storeSessionInformation(attributesWidget.userSession.getSessionAttributes());\n\n attributesWidget.proactive = {};\n\n if (attributesWidget.mode != 'popup' && (!params || !params['show_start'])) {\n attributesWidget.widgetStatus.next(false);\n }\n\n if (attributesWidget.viewHandler) {\n attributesWidget.viewHandler.removeUnreadIndicator();\n attributesWidget.eventEmitter.emitEvent('hide_msg_snippet');\n }\n\n attributesWidget.widgetDimesions.nextProperty('height_override', null);\n\n chatEvents.sendChildEvent('endedChat', [{'sender': 'endButton', 'survey' : attributesWidget.survey}]);\n\n if (attributesWidget.mode == 'embed' || (params && params['show_start'])) {\n attributesWidget.eventEmitter.emitEvent('showWidget', [{'sender': 'closeButton'}]);\n }\n\n if (attributesWidget.mode == 'popup') {\n attributesWidget.popupWidget.freeup();\n }\n });\n\n // Widget show event\n attributesWidget.eventEmitter.addListener('showWidget', function (params) {\n\n // Just to restyle if needed\n attributesWidget.mainWidget.hideInvitation();\n\n attributesWidget.widgetStatus.next(true);\n\n if (attributesWidget.mode == 'popup') {\n attributesWidget.popupWidget.init(attributesWidget, chatEvents, params);\n\n attributesWidget.viewHandler.removeUnreadIndicator();\n\n attributesWidget.mainWidget.hide();\n } else if (typeof params !== 'undefined' && typeof params.event !== 'undefined') {\n params.event.preventDefault();\n }\n\n chatEvents.sendChildEvent('shownWidget', [{'sender': 'closeButton'}]);\n });\n\n // Add tag listener\n attributesWidget.eventEmitter.addListener('addTag', function (tag) {\n attributesWidget.tag = attributesWidget.tag != '' ? attributesWidget.tag + ',' + tag : tag;\n attributesWidget.eventEmitter.emitEvent('tagAdded');\n });\n\n // Events\n attributesWidget.eventEmitter.addListener('addEvent', function (events) {\n attributesWidget.events = events;\n attributesWidget.eventEmitter.emitEvent('eventAdded');\n });\n\n // Conversions\n attributesWidget.eventEmitter.addListener('addConversion', function (conversion) {\n attributesWidget.conversion = conversion;\n attributesWidget.eventEmitter.emitEvent('conversionAdded');\n });\n\n // Popup open event\n attributesWidget.eventEmitter.addListener('openPopup', function () {\n\n attributesWidget.popupWidget.init(attributesWidget, chatEvents);\n\n attributesWidget.viewHandler.removeUnreadIndicator();\n\n chatEvents.sendChildEvent('shownWidget', [{'sender': 'closeButton'}]);\n\n attributesWidget.widgetStatus.next(false);\n });\n\n // Chat started event received\n // Store chat information if it's not popup mode.\n attributesWidget.eventEmitter.addListener('chatStarted', function (data, mode) {\n\n attributesWidget.widgetDimesions.nextProperty('height_override', null);\n\n if (mode !== 'popup' || attributesWidget.kcw === true) {\n attributesWidget.userSession.setChatInformation(data, attributesWidget.nh && attributesWidget.nh.ap);\n }\n\n if (mode == 'popup') {\n attributesWidget.mainWidget.hide();\n }\n\n // Store information permanently\n if (attributesWidget.fresh === false && (mode !== 'popup' || attributesWidget.kcw === true)) {\n attributesWidget.storageHandler.storeSessionInformation(attributesWidget.userSession.getSessionAttributes());\n }\n });\n\n // Subscribe event\n attributesWidget.eventEmitter.addListener('subscribeEvent', function (data) {\n attributesWidget.chatNotifications.setPublicKey(data.pk, attributesWidget.eventEmitter);\n attributesWidget.chatNotifications.sendNotification();\n });\n\n // User has subscribed to notifications\n // Send back child subscription information\n attributesWidget.eventEmitter.addListener('subcribedEvent', function (data) {\n chatEvents.sendChildEvent('subcribedEvent', [data]);\n });\n\n // Track widget status changes\n attributesWidget.widgetStatus.subscribe((data) => {\n if (attributesWidget.mode !== 'popup') {\n if (attributesWidget.mode !== 'embed') {\n // Do not store open status in local storage because embed is always open\n attributesWidget.storageHandler.setSessionStorage(prefixStorage + '_ws', data);\n }\n chatEvents.sendChildEvent('widgetStatus', [data]);\n }\n });\n\n // Store sound settings\n attributesWidget.toggleSound.subscribe((data) => {\n attributesWidget.storageHandler.setSessionStorage(prefixStorage + '_sound', data);\n });\n\n attributesWidget.onlineStatus.subscribe((data) => {\n chatEvents.sendChildEvent('onlineStatus', [data]);\n });\n\n attributesWidget.eventEmitter.addListener('screenshot', (data) => {\n helperFunctions.makeScreenshot(attributesWidget.staticJS['screenshot'], data);\n });\n\n attributesWidget.eventEmitter.addListener('screenshare', (data) => {\n import('./util/screenShare').then((module) => {\n module.screenShare.setParams((data || {}), attributesWidget, chatEvents);\n });\n });\n\n attributesWidget.eventEmitter.addListener('location', (data) => {\n document.location = data;\n });\n\n attributesWidget.eventEmitter.addListener('terminated', (data) => {\n attributesWidget.terminated = true;\n // Remove legacy dom\n helperFunctions.removeById(attributesWidget.prefixLowercase+'_container_v2');\n helperFunctions.removeById(attributesWidget.prefixLowercase+'_status_widget_v2');\n });\n\n attributesWidget.eventEmitter.addListener('showInvitation', (data) => {\n attributesWidget.widgetDimesions.nextProperty('bottom_override', 75);\n attributesWidget.widgetDimesions.nextProperty('right_override', 75);\n attributesWidget.mainWidget.showInvitation();\n });\n\n attributesWidget.eventEmitter.addListener('hideAction', (data) => {\n attributesWidget.mainWidget.hide();\n });\n\n attributesWidget.eventEmitter.addListener('showAction', (data) => {\n attributesWidget.mainWidget.show();\n });\n\n attributesWidget.eventEmitter.addListener('zoomImage', (data) => {\n import('./util/zoomImage').then((module) => {\n module.zoomImage.setParams((data || {}), attributesWidget, chatEvents);\n });\n });\n\n attributesWidget.eventEmitter.addListener('hideInvitation', (data) => {\n attributesWidget.mainWidget.hideInvitation();\n if (data.full) {\n attributesWidget.eventEmitter.emitEvent('showWidget', [{'sender': 'closeButton'}]);\n attributesWidget.eventEmitter.emitEvent('fullInvitation', [data]);\n } else {\n attributesWidget.eventEmitter.emitEvent('cancelInvitation', []);\n }\n });\n\n attributesWidget.eventEmitter.addListener('msgSnippet', (data) => {\n if (attributesWidget.mode == 'widget' && attributesWidget.widgetStatus.value === false) {\n\n if (data.full_widget) {\n attributesWidget.eventEmitter.emitEvent('showWidget', [{'sender': 'closeButton'}]);\n return;\n }\n\n attributesWidget.position == 'api' && attributesWidget.viewHandler && attributesWidget.viewHandler.show();\n\n import('./lib/widgets/msgSnippetWidget').then((module) => {\n if (!attributesWidget.msgSnippet) {\n attributesWidget.msgSnippet = new module.msgSnippetWidget(attributesWidget.prefixLowercase);\n containerChatObj.cont.elmDom.appendChild(attributesWidget.msgSnippet.cont.constructUI(), !0);\n attributesWidget.msgSnippet.init(attributesWidget, data);\n } else {\n attributesWidget.msgSnippet.showSnippet(data, true);\n }\n attributesWidget.eventEmitter.emitEvent('unread_message',[{otm: 1}]);\n });\n }\n });\n\n attributesWidget.eventEmitter.addListener('unread_message', (data) => {\n if (data && data.msg_body && !attributesWidget.msgSnippet) {\n import('./lib/widgets/msgSnippetWidget').then((module) => {\n if (!attributesWidget.msgSnippet) {\n attributesWidget.msgSnippet = new module.msgSnippetWidget(attributesWidget.prefixLowercase);\n containerChatObj.cont.elmDom.appendChild(attributesWidget.msgSnippet.cont.constructUI(), !0);\n attributesWidget.msgSnippet.init(attributesWidget, data);\n }\n });\n }\n });\n\n attributesWidget.originalTitle = document.title;\n attributesWidget.blinkInterval = null;\n\n attributesWidget.eventEmitter.addListener('change_language', (data) => {\n attributesWidget.lang = data.lng.replace('/', '') + '/';\n });\n\n attributesWidget.eventEmitter.addListener('unread_message_title', (data) => {\n clearInterval(attributesWidget.blinkInterval);\n if (data.status == false) {\n attributesWidget.blinkInterval = setInterval(() => {\n document.title = (Math.round(new Date().getTime() / 1000) % 2) ? '💬 ' + attributesWidget.originalTitle : attributesWidget.originalTitle;\n }, 1000);\n } else {\n attributesWidget.focused = true;\n document.title = attributesWidget.originalTitle;\n }\n });\n\n attributesWidget.eventEmitter.addListener('widgetHeight', (data) => {\n\n if (data.reset_height) {\n attributesWidget.widgetDimesions.nextProperty('height_override', null);\n attributesWidget.widgetDimesions.nextProperty('bottom_override', null);\n attributesWidget.widgetDimesions.nextProperty('right_override', null);\n attributesWidget.widgetDimesions.nextProperty('width_override', null);\n return;\n }\n\n if (data.force_height || data.force_width || data.force_bottom || data.force_right) {\n data.force_height && attributesWidget.widgetDimesions.nextProperty('height_override', data.force_height);\n data.force_width && attributesWidget.widgetDimesions.nextProperty('width_override', data.force_width);\n data.force_right && attributesWidget.widgetDimesions.nextProperty('right_override', data.force_right);\n data.force_bottom && attributesWidget.widgetDimesions.nextProperty('bottom_override', data.force_bottom);\n return;\n }\n\n if (attributesWidget.mode == 'widget' && attributesWidget.isMobile == false) {\n var d = document,\n e = d.documentElement,\n g = d.getElementsByTagName('body')[0],\n y = global.innerHeight || e.clientHeight || g.clientHeight;\n if (parseInt(data.height) > attributesWidget.widgetDimesions.value['height'] && y > parseInt(data.height)) {\n attributesWidget.widgetDimesions.nextProperty('height_override', parseInt(data.height));\n } else if (attributesWidget.widgetDimesions.value['height_override'] && attributesWidget.widgetDimesions.value['height_override'] > y) {\n attributesWidget.widgetDimesions.nextProperty('height_override', null);\n }\n }\n });\n\n var serviceWorkerAvailable = false;\n try {\n serviceWorkerAvailable = ('serviceWorker' in navigator);\n } catch (e) {\n // Worker not available\n }\n\n if (serviceWorkerAvailable === true) {\n try {\n navigator.serviceWorker.addEventListener('message', function (event) {\n try {\n if (typeof event.data.lhc_ch !== 'undefined' && typeof event.data.lhc_cid !== 'undefined') {\n attributesWidget.widgetStatus.next(true);\n if (attributesWidget.mode == 'popup') {\n attributesWidget.userSession.setChatInformation({\n 'id': event.data.lhc_cid,\n 'hash': event.data.lhc_ch\n });\n attributesWidget.eventEmitter.emitEvent('unread_message');\n } else {\n chatEvents.sendChildEvent('shownWidget', [{'sender': 'closeButton'}]);\n chatEvents.sendChildEvent('reopenNotification', [{\n 'id': event.data.lhc_cid,\n 'hash': event.data.lhc_ch\n }]);\n }\n }\n } catch (e) {\n if (lhcError) lhcError.log(e.message, \"index.js\", e.lineNumber || e.line, e.stack); else throw Error(\"lhc : \" + e.message);\n }\n });\n } catch (e) {\n // Ignore sandbox error\n }\n }\n\n // Listed for post messages\n const handleMessages = (e) => {\n\n if (attributesWidget.terminated === true || typeof e.data !== 'string' || e.data.indexOf(attributesWidget.prefixLowercase + '::')) {\n return;\n }\n\n const parts = e.data.split('::');\n\n if (typeof e.origin !== 'undefined' && e.origin != 'about:') {\n var originDomain = e.origin.replace(\"http://\", \"\").replace(\"https://\", \"\").replace(/:(\\d+)$/, '');\n\n // We allow to send events only from chat installation or page where script is embeded.\n if (originDomain !== document.domain && attributesWidget.domain_lhc !== originDomain && parts[1] !== 'started' && parts[1] !== 'isstarted') {\n return;\n }\n }\n\n if (parts[1] == 'ready') {\n\n chatEvents.sendReadyEvent(parts[2] == 'true');\n\n if (attributesWidget.storageHandler.getSessionStorage(prefixStorage + '_screenshare')) {\n attributesWidget.eventEmitter.emitEvent('screenshare', [{'auto_start': true}]);\n }\n\n const focusChangeCb = (e) => {\n const focused = e.type === \"focus\";\n attributesWidget.focused = focused;\n chatEvents.sendChildEvent('focus_changed', [{'status': focused}]);\n };\n\n window.addEventListener('focus', focusChangeCb);\n window.addEventListener('blur', focusChangeCb);\n window.addEventListener('pageshow', focusChangeCb);\n window.addEventListener('pagehide', focusChangeCb);\n\n // App is fully loaded\n lhc.loaded = true;\n\n chatEvents.sendChildEvent('ext_modules', [attributesWidget.staticJS['ex_cb_js']]);\n\n // send child commands if there is any\n attributesWidget.childExtCommands.forEach((params) => {\n chatEvents.sendChildEvent(params['cmd'], [params['arg']], 'lhc_load_ext');\n });\n\n // send child commands if there is any\n attributesWidget.childCommands.forEach((params) => {\n chatEvents.sendChildEvent(params['cmd'], [params['arg']]);\n });\n\n if (attributesWidget.react_attr !== null) {\n attributesWidget.react_attr.forEach(item => {\n chatEvents.sendChildEvent('attr_set',[{\n 'type':'attr_set','attr': item['k'],\n data : item['v']\n }]);\n })\n }\n\n } else if (parts[1] == 'ready_popup') {\n attributesWidget.popupWidget.sendParameters(chatEvents);\n } else if (parts[1] == 'isstarted') {\n // Parent window has LHC, terminate present instance\n attributesWidget.eventEmitter.emitEvent('terminated', []);\n } else if (parts[1] == 'started') {\n if (attributesWidget.hide_parent) {\n attributesWidget.eventEmitter.emitEvent('terminated', []);\n } else {\n e.source.postMessage('lhc::isstarted','*');\n }\n } else {\n attributesWidget.eventEmitter.emitEvent(parts[1], JSON.parse(parts[2]));\n }\n };\n\n if (window.addEventListener) {\n window.addEventListener(\"message\", handleMessages, false);\n } else if (window.attachEvent) {\n window.attachEvent(\"onmessage\", handleMessages);\n } else if (document.attachEvent) {\n document.attachEvent(\"onmessage\", handleMessages);\n }\n };\n\n var preInit = () => {\n\n // Avoid multiple times execution\n if (lhc.ready === true) {\n return;\n }\n\n // we have found document body so we can continue\n if (document.body) {\n lhc.ready = true;\n }\n\n lhc.init = init;\n\n if (LHC_API.args.before_init) {\n LHC_API.args.before_init(lhc);\n }\n\n LHC_API.args.manual_init || init();\n };\n\n const eventsHandler = require('./util/domEventsHandler').domEventsHandler;\n\n (preInit(), !lhc.ready) || (eventsHandler.listen(document, \"DOMContentLoaded\", function () {\n preInit();\n }, \"domloaded\"),\n eventsHandler.listen(document, \"readystatechange\", function () {\n (\"complete\" === document.readyState || \"interactive\" === document.readyState && document.body) && preInit();\n }, \"domstatechange\"),\n eventsHandler.listen(global, \"load\", function () {\n preInit();\n }, \"windowload\"));\n\n }).call(this, global['$_' + scopeScript], global[scopeScript + '_API']);\n\n } catch (e) {\n if (lhcError) lhcError.log(e.message, \"index.js\", e.lineNumber || e.line, e.stack); else throw Error(\"lhc : \" + e.message);\n }\n\n})(window);"],"names":["rawAsap","freeTasks","pendingErrors","requestErrorThrow","makeRequestCallFromTimer","length","shift","asap","task","rawTask","pop","RawTask","this","module","exports","prototype","call","error","onerror","push","queue","requestFlush","index","flush","currentIndex","scan","newLength","toggle","observer","node","scope","g","self","BrowserMutationObserver","MutationObserver","WebKitMutationObserver","callback","timeoutHandle","setTimeout","handleTimer","intervalHandle","setInterval","clearTimeout","clearInterval","document","createTextNode","observe","characterData","data","_setPrototypeOf","o","p","Object","setPrototypeOf","__proto__","_possibleConstructorReturn","TypeError","ReferenceError","_getPrototypeOf","getPrototypeOf","UIConstructorIframe","subClass","superClass","create","constructor","value","writable","configurable","defineProperty","elementId","style","attributes","tagname","documentRef","bodyId","dir","cl","header","elmDomDoc","helperFunctions","elmDom","getElementsByTagName","innerHTML","body","id","html","setAttribute","nodeDoctype","implementation","createDocumentType","doctype","replaceChild","insertBefore","childNodes","e","console","log","insertCssFile","insertContent","tmpl","UIConsturctor","f","tagName","classNames","keys","forEach","attr","a","className","join","cssText","c","d","k","getElementById","split","domEventsHandler","restyle","reset","createDocumentFragment","type","settings","appendChild","styleSheet","nodeValue","elm","href","createElement","b","rel","crossOrigin","src","async","loadcb","onload","key","hasOwnProperty","chatNotifications","_chatNotifications","isNotificationsSubscribed","applicationServerPublicKey","eventEmitter","publicKey","that","swRegistration","navigator","window","Notification","permission","requestPermission","alert","serviceWorker","register","then","swReg","pushManager","getSubscription","subscription","applicationServerKey","base64String","base64","repeat","replace","rawData","atob","outputArray","Uint8Array","i","charCodeAt","urlB64ToUint8Array","subscribe","getKey","token","contentEncoding","PushManager","supportedContentEncodings","payload","JSON","stringify","endpoint","btoa","String","fromCharCode","apply","authToken","emitEvent","updateSubscriptionOnServer","_helperFunctions","s","contentWindow","contentDocument","EId","EObj","parentNode","removeChild","Intl","DateTimeFormat","resolvedOptions","timeZone","Date","stdTimezoneOffset","jan","getFullYear","jul","Math","max","getTimezoneOffset","dst","today","params","outline","visibility","resize","boxshadow","overflow","background","opacity","top","right","bottom","left","position","border","minheight","minwidth","maxheight","maxwidth","padding","margin","transition","transform","width","height","display","zindex","backgroundcolor","cursor","borderRadius","element","classList","contains","match","RegExp","add","hasClass","remove","screenshot","url","html2canvas","th","onreadystatechange","makeScreenshot","canvas","xhr","XMLHttpRequest","open","setRequestHeader","send","encodeURIComponent","toDataURL","err","item","pairs","request","urlRequest","makeQuery","readyState","status","parse","responseText","message","req","containerChat","prefix","pnode","cont","constructUI","mainWidget","units","originalCSS","bottom_override","isLoaded","loadStatus","main","css","restyleStyle","position_placement","mode","fscreen","massRestyle","wloaded","next","isMobile","constructUIIframe","staticJS","hhtml","cont_ss","lazyLoad","makeContent","getSessionAttributes","bootstrap","toggleVisibilityWrap","toggleVisibility","widgetStatus","monitorDimensionsWrap","monitorDimensions","widgetDimesions","valueInternal","screenAttributesUpdate","innerHeight","nextPropertySilent","innerWidth","callListeners","addEventListener","addListener","insertCssRemoteFile","theme","LHC_API","args","lhc_base_url","theme_v","checkLoadStatus","insertJSFile","prefixLowercase","hide","show","width_override","width_soverride","height_override","height_soverride","wbottom","clinst","right_override","wright_inv","wright","mainWidgetPopup","freeup","argumentsQuery","Array","paramsReturn","LHCChatOptions","name","encrypted","size","attr_prefill","attr_prefill_admin","chatEvents","paramsPopup","elementReferrerPopup","closed","event","preventDefault","focus","urlArgumetns","storageHandler","cookieEnabled","toggleSound","setSessionStorage","fontSize","getLocalStorage","parseInt","getSessionReferrer","parseOptions","dualScreenLeft","undefined","screenLeft","screenX","dualScreenTop","screenTop","screenY","documentElement","clientWidth","screen","clientHeight","systemZoom","availWidth","paramsWindow","newWin","needWindow","windowCreated","location","viewHandler","kcw","sendChildEvent","sendParameters","js_vars","js_args","currentVar","eval","var","statusWidget","controlMode","showDelay","statusDelayProcessed","font","widget","shidden","lload","unread_counter","onlineStatus","icon","leaveMessage","sload","placement","sbottom","sright","_inst","attachUserEventListener","offline_redirect","toggleOfflineIcon","chatParams","unreadMessagesNumber","getSessionStorage","unreadTotal","otm","showUnreadIndicator","init","isNaN","now","removeUnreadIndicator","number","iconText","iconValue","innerText","removeSessionStorage","hideOffline","chatEventsHandler","getJSVarsValues","jsVars","prefillOptions","fieldsCustom","prefilOptionsList","concat","getPrefillVars","command","postMessage","isIE","popupWidget","popup","getInitAttributes","sendChildCommand","_domEventsHandler","events","object","dispatch","getEvent","attachEvent","eventName","presentEvent","removeEventHandler","eventListener","listener","removeEventListener","detachEvent","eventInstance","_this","caller","arguments","Event","monitoredVariable","listeners","val","indexOf","splice","global","domain","cookiesSupportChecked","checkCookiesSupport","secureCookie","cookiePerPage","hasSessionStorage","sessionStorage","hasLocalStorage","localStorage","cookie","coookieName","cookieValue","expireTime","string","setTime","getTime","toGMTString","cookieName","baseCookie","charAt","substring","host","hostname","setItem","removeItem","getItem","ref","sessionInformation","getHTTPCookie","parseSessionInformation","setHTTPCookie","getStoreValue","getCookieDomain","content","contentReturn","parts","unescape","userSession","vid","hnh","hash","updateVarsTimeout","decode","evalJSON","str","$","parseJSON","toJSON","encode","cb","lhc_var","validator","set","obj","prop","updateJSVars","Proxy","lhc_var_prefill","getAppendVariables","varsReturn","varsSet","getVars","jsVarData","append","vars","varsJSON","alwaysPersistentNeedHelp","round","appleIphone","appleIpod","appleTablet","appleUniversal","androidPhone","androidTablet","amazonPhone","amazonTablet","windowsPhone","windowsTablet","otherBlackBerry","otherBlackBerry10","otherOpera","otherChrome","otherFirefox","isAppleTabletOnIos13","platform","maxTouchPoints","MSStream","param","nav","userAgent","tmp","regex","test","createMatch","result","apple","phone","ipod","tablet","universal","device","amazon","android","windows","other","blackberry","blackberry10","opera","firefox","chrome","any","noop","LAST_ERROR","IS_ERROR","Promise","fn","_U","_V","_W","_X","doResolve","handle","deferred","_Y","onFulfilled","onRejected","ret","ex","tryCallOne","reject","promise","resolve","handleResolved","newValue","getThen","finale","bind","_Z","Handler","done","res","reason","tryCallTwo","_0","safeThen","TRUE","valuePromise","FALSE","NULL","UNDEFINED","ZERO","EMPTYSTRING","iterableToArray","iterable","from","x","slice","all","arr","remaining","race","values","finally","denodeify","argumentCount","Infinity","callbackFn","Function","denodeifyWithCount","fnLength","map","_","denodeifyWithoutCount","nodeify","ctx","enableSynchronous","isPending","getState","isFulfilled","isRejected","getValue","Error","getReason","disableSynchronous","EventEmitter","proto","originalGlobalValue","indexOfListener","alias","isValidListener","getListeners","evt","response","_getEvents","flattenListeners","flatListeners","getListenersAsObject","listenerIsWrapped","once","on","addOnceListener","defineEvent","defineEvents","evts","removeListener","off","addListeners","manipulateListeners","removeListeners","single","multiple","removeEvent","_events","removeAllListeners","listenersMap","_getOnceReturnValue","trigger","emit","setOnceReturnValue","_onceReturnValue","noConflict","_classCallCheck","instance","Constructor","_defineProperties","target","props","descriptor","enumerable","_createClass","protoProps","staticProps","_typeof","Symbol","iterator","__webpack_module_cache__","inProgress","dataWebpackPrefix","__webpack_require__","moduleId","cachedModule","__webpack_modules__","m","n","getter","__esModule","definition","get","chunkId","reduce","promises","u","globalThis","l","script","needAttach","scripts","getAttribute","charset","timeout","nc","origin","onScriptComplete","prev","doneFns","head","r","toStringTag","installedChunks","j","installedChunkData","errorType","realSrc","webpackJsonpCallback","parentChunkLoadingFunction","chunkIds","moreModules","runtime","some","chunkLoadingGlobal","currentScript","scopeScript","lhcError","filename","lineNumber","stack","column","file","line","lineno","colno","lhc","loaded","connected","ready","version","require","default","BehaviorSubject","mobile_view","toLowerCase","prefixStorage","scope_storage","cookieEnabledUser","cookie_enabled","userMode","orig","proactive","check_messages","cookie_per_page","setCookiePerPage","referrer","substr","protocol","setSessionReferer","languageOverride","lang","attributesWidget","terminated","prefixScope","msgSnippet","react_attr","hide_parent","hide_iframe","hide_status","msgsnippet_status","toUpperCase","assign","fresh","popupDimesnions","pheight","pwidth","leaveamessage","department","dep_default","product","domain_lhc","instance_id","profile_pic","base_url","tag","status_delay","captcha","focused","identifier","proactive_interval","langOverride","subject_id","bot_id","trigger_id","priority","conversion","survey","operator","phash","pvhash","nh","init_calls","childCommands","childExtCommands","wwidth","wheight","setAttributes","setSessionInformation","getSessionInformation","setSessionReferrer","containerChatObj","embedWrapper","getArguments","UUID","getVID","getTzOffset","title","showNeedHelp","needhelpWidget","showProactive","proactiveChat","setParams","makeRequest","wv","terminate","chat_ui","isOnline","parent","__webpack_public_path__","chunks_location","secure_cookie","setSecureCookie","setCookieDomain","siteaccess","static","pdim","survey_id","cont_css","wposition","ts","hash_ts","setVID","storeSessionInformation","nextProperty","mobile_popup","sound_enabled","check_status","activityMonitoring","track_mouse","track_activity","ga","analyticEvents","ap","setupVarsMonitoring","prefillVars","ll","disable_proactive","extension","nodeJSChat","removeById","po","getHours","getMinutes","sessionAtrribute","setChatInformation","hideInvitation","setPublicKey","pk","sendNotification","screenShare","showInvitation","zoomImage","full","full_widget","showSnippet","msgSnippetWidget","msg_body","originalTitle","blinkInterval","lng","reset_height","force_height","force_width","force_bottom","force_right","y","serviceWorkerAvailable","lhc_ch","lhc_cid","handleMessages","originDomain","sendReadyEvent","focusChangeCb","source","preInit","before_init","manual_init","eventsHandler","listen"],"sourceRoot":""} \ No newline at end of file diff --git a/lhc_web/design/defaulttheme/widget/wrapper/dist/6b5f759b84269b244c78.js.map b/lhc_web/design/defaulttheme/widget/wrapper/dist/6b5f759b84269b244c78.js.map deleted file mode 100644 index 65b4b48a51..0000000000 --- a/lhc_web/design/defaulttheme/widget/wrapper/dist/6b5f759b84269b244c78.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"6b5f759b84269b244c78.js","mappings":"mNAsPMA,EAAgB,IAnPhBC,WAEF,cAAc,eACVC,KAAKC,OAAS,GACdD,KAAKE,mBAAqB,KAC1BF,KAAKG,gBAAkB,KACvBH,KAAKI,WAAa,KAClBJ,KAAKK,WAAa,KAClBL,KAAKM,mBAAqB,GAE1BN,KAAKO,qBAAuB,KAC5BP,KAAKQ,oBAAsB,KAC3BR,KAAKS,sBAAwB,KAC7BT,KAAKU,UAAW,EAChBV,KAAKW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,EAAAA,OAAwBnB,OAAQsB,EAAO,EAAKK,0BAA2B,oBAAoBL,MAGnG,CAAC,YAAY,SAAS,aAAa,YAAYR,SAAQ,SAACQ,GACpDH,EAAAA,EAAAA,OAAwB5C,SAAU+C,EAAO,EAAKK,0BAA2B,oBAAoBL,mB,EAzOvHtF","sources":["webpack://LiveHelperChat/./src/util/proactiveChat.js"],"sourcesContent":["import {helperFunctions} from '../lib/helperFunctions';\nimport {domEventsHandler} from '../util/domEventsHandler';\n\nclass _proactiveChat {\n\n constructor() {\n this.params = {};\n this.timeoutStatuscheck = null;\n this.timeoutActivity = null;\n this.attributes = null;\n this.chatEvents = null;\n this.dynamicInvitations = [];\n\n this.iddleTimeoutActivity = null;\n this.checkMessageTimeout = null;\n this.nextRescheduleTimeout = null;\n this.initCall = true;\n this.inProgress = false;\n }\n\n setParams(params, attributes, chatEvents) {\n this.params = params;\n this.attributes = attributes;\n this.chatEvents = chatEvents;\n\n if (this.attributes.events.length > 0) {\n this.storeEvents(this.attributes.events);\n } else {\n this.initInvitation();\n }\n\n if (this.attributes.conversion != '') {\n this.storeConversion(this.attributes.conversion);\n }\n\n // check invitaiton then tag is added\n this.attributes.eventEmitter.addListener('tagAdded', () => {\n this.initInvitation({init: 0});\n });\n\n this.attributes.eventEmitter.addListener('eventAdded', () => {\n this.storeEvents(this.attributes.events);\n });\n\n this.attributes.eventEmitter.addListener('conversionAdded', () => {\n this.storeConversion(this.attributes.conversion);\n });\n\n this.attributes.eventEmitter.addListener('checkMessageOperator', () => {\n this.initInvitation({init: 0});\n });\n\n this.attributes.eventEmitter.addListener('endChat', () => {\n this.initInvitation({init: 0});\n });\n\n this.attributes.onlineStatus.subscribe((data) => {\n if (data == true) {\n this.initInvitation({init: 0});\n } else {\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n if (!chatParams['id'] && this.attributes.proactive.invitation) {\n this.attributes.proactive = {};\n if (this.attributes.mainWidget.isLoaded !== false) {\n this.chatEvents.sendChildEvent('proactive', [{}]);\n }\n this.attributes.mainWidget.hideInvitation();\n this.attributes.eventEmitter.emitEvent('closeWidget', [{'sender' : 'closeButton'}]);\n }\n }\n });\n }\n\n showInvitation(params, init) {\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n\n // Show invitation only if widget is not open\n if ((init === 0 && (this.attributes.widgetStatus.value === true && !this.attributes.mode == 'embed')) || chatParams['id']) {\n return;\n }\n\n if (params.inject_html && params.invitation) {\n var th = document.getElementsByTagName('head')[0];\n var s = document.createElement('script');\n s.setAttribute('type','text/javascript');\n s.setAttribute('src', this.attributes.LHC_API.args.lhc_base_url + this.attributes['lang'] + 'chat/htmlsnippet/'+params.invitation+'/inv/0/?ts='+Date.now());\n th.appendChild(s);\n }\n\n if (!params.only_inject) {\n this.attributes.proactive = params;\n\n if (this.attributes.mainWidget.isLoaded === false) {\n this.attributes.mainWidget.bootstrap();\n } else {\n this.chatEvents.sendChildEvent('proactive', [params]);\n }\n\n clearTimeout(this.checkMessageTimeout);\n clearTimeout(this.nextRescheduleTimeout);\n }\n }\n\n storeEvents(events) {\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n if (!chatParams['id'] && this.attributes['onlineStatus'].value == true) {\n helperFunctions.makeRequest(this.attributes.LHC_API.args.lhc_base_url + this.attributes['lang'] + 'chat/logevent/(vid)/' + this.attributes.userSession.getVID(), {params: {'data' : JSON.stringify(events)}}, (data) => {\n this.initInvitation({init: 0});\n })\n }\n }\n\n storeConversion(conversion) {\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n if (!chatParams['id'] && this.attributes['onlineStatus'].value == true) {\n helperFunctions.makeRequest(this.attributes.LHC_API.args.lhc_base_url + this.attributes['lang'] + 'widgetrestapi/logconversions/(vid)/' + this.attributes.userSession.getVID(), {params: {'data' : JSON.stringify(conversion)}}, (data) => {\n\n });\n }\n }\n\n initInvitation(paramsExecution) {\n\n if (this.inProgress == true) {\n return ;\n }\n\n clearTimeout(this.checkMessageTimeout);\n\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n\n const init = (paramsExecution && paramsExecution['init'] === 0) ? 0 : 1;\n\n if (!chatParams['id'] && this.attributes['onlineStatus'].value == true) {\n\n this.inProgress = true;\n\n let params = {\n 'vid': this.attributes.userSession.getVID(),\n 'dep': this.attributes.department.join(',')\n };\n\n if (this.attributes.LHC_API.args.priority) {\n params['priority'] = this.attributes.LHC_API.args.priority;\n }\n\n if (this.attributes.LHC_API.args.operator) {\n params['operator'] = this.attributes.LHC_API.args.operator;\n }\n\n if (this.attributes['identifier']) {\n params['idnt'] = this.attributes['identifier']\n }\n\n if (this.attributes['tag']) {\n params['tag'] = this.attributes['tag']\n }\n\n if (this.attributes['langOverride']) {\n params['lang'] = this.attributes['langOverride']\n }\n\n params['l'] = encodeURIComponent(window.location.href.substring(window.location.protocol.length));\n params['dt'] = encodeURIComponent(document.title);\n params['init'] = this.initCall == true ? 1 : init;\n\n this.initCall = false;\n\n helperFunctions.makeRequest(this.attributes.LHC_API.args.lhc_base_url + this.attributes['lang'] + 'widgetrestapi/checkinvitation', {params: params}, (data) => {\n\n this.inProgress = false;\n \n if (data.invitation) {\n const params = {'vid_id' : data.vid_id, 'invitation' : data.invitation, 'inject_html' : data.inject_html, 'qinv' : data.qinv};\n setTimeout(() => {\n this.showInvitation(params, init);\n }, this.attributes.widgetStatus.value === true ? 0 : (data.delay || 0));\n } else {\n if (this.attributes.LHC_API.args.check_messages) {\n this.checkMessageTimeout = setTimeout(() => {\n this.initInvitation({init: 0});\n },this.params['interval'] * 1000);\n }\n }\n\n if (data.next_reschedule) {\n this.nextRescheduleTimeout = setTimeout(() => {\n this.initInvitation({init: 0});\n }, data.next_reschedule);\n }\n\n if (data.dynamic) {\n data.dynamic.forEach((item) => {\n this.dynamicInvitations.push(item.id);\n if (item.type === 1) {\n domEventsHandler.listen(document, 'mouseout', (e) => {\n e = e ? e : window.event;\n var from = e.relatedTarget || e.toElement;\n if (!from || from.nodeName == \"HTML\") {\n this.showInvitation({'vid_id' : data.vid_id, 'invitation' : item.id, 'inject_html' : item.inject_html, 'qinv' : data.qinv, 'only_inject' : item.only_inject});\n if (!item.every_time) {\n domEventsHandler.unlisten('lhc_inv_mouse_out_'+item.id);\n }\n }\n }, 'lhc_inv_mouse_out_' + item.id);\n } else if (item.type === 2) {\n\n var iddleTimeout = () => {\n\n this.showInvitation({'vid_id' : data.vid_id, 'invitation' : item.id, 'inject_html' : item.inject_html, 'qinv' : data.qinv, 'only_inject' : item.only_inject});\n\n clearTimeout(this.iddleTimeoutActivity);\n\n if (!item.every_time) {\n ['mousemove','mousedown','click','scroll','keypress','load'].forEach((element) => {\n domEventsHandler.unlisten('lhc_inv_iddl_win_'+element);\n });\n\n ['mousemove','scroll','touchstart','touchend'].forEach((element) => {\n domEventsHandler.unlisten('lhc_inv_iddl_doc_'+element);\n });\n }\n };\n\n this.iddleTimeoutActivityReset = () => {\n clearTimeout(this.iddleTimeoutActivity);\n this.iddleTimeoutActivity = setTimeout( () => { iddleTimeout(); }, item.iddle_for *1000);\n }\n\n this.iddleTimeoutActivityReset();\n\n ['mousemove','mousedown','click','scroll','keypress','load'].forEach((event) => {\n domEventsHandler.listen(window, event, this.iddleTimeoutActivityReset, 'lhc_inv_iddl_win_'+event);\n });\n\n ['mousemove','scroll','touchstart','touchend'].forEach((event) => {\n domEventsHandler.listen(document, event, this.iddleTimeoutActivityReset, 'lhc_inv_iddl_doc_'+event);\n });\n }\n })\n }\n });\n }\n }\n}\n\nconst proactiveChat = new _proactiveChat();\nexport {proactiveChat};\n\n"],"names":["proactiveChat","_proactiveChat","this","params","timeoutStatuscheck","timeoutActivity","attributes","chatEvents","dynamicInvitations","iddleTimeoutActivity","checkMessageTimeout","nextRescheduleTimeout","initCall","inProgress","events","length","storeEvents","initInvitation","conversion","storeConversion","eventEmitter","addListener","init","onlineStatus","subscribe","data","getSessionAttributes","proactive","invitation","mainWidget","isLoaded","sendChildEvent","hideInvitation","emitEvent","chatParams","widgetStatus","value","mode","inject_html","th","document","getElementsByTagName","s","createElement","setAttribute","LHC_API","args","lhc_base_url","Date","now","appendChild","only_inject","bootstrap","clearTimeout","helperFunctions","userSession","getVID","JSON","stringify","paramsExecution","department","join","priority","operator","encodeURIComponent","window","location","href","substring","protocol","title","vid_id","qinv","setTimeout","showInvitation","delay","check_messages","next_reschedule","dynamic","forEach","item","push","id","type","domEventsHandler","e","from","event","relatedTarget","toElement","nodeName","every_time","iddleTimeoutActivityReset","element","iddle_for"],"sourceRoot":""} \ No newline at end of file diff --git a/lhc_web/design/defaulttheme/widget/wrapper/dist/a5b21cc17552b167a2f1.js.map b/lhc_web/design/defaulttheme/widget/wrapper/dist/a5b21cc17552b167a2f1.js.map deleted file mode 100644 index bdbb7c0e60..0000000000 --- a/lhc_web/design/defaulttheme/widget/wrapper/dist/a5b21cc17552b167a2f1.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"a5b21cc17552b167a2f1.js","mappings":"+NAIaA,EAAb,WACI,WAAYC,IAAQ,eAEhBC,KAAKC,WAAa,GAClBD,KAAKE,QAAS,EACdF,KAAKG,YAAa,EAClBH,KAAKI,gBAAiB,EACtBJ,KAAKK,QAAS,EACdL,KAAKM,gBAAiB,EAEtBN,KAAKO,KAAO,IAAIC,EAAAA,GAAqBT,GAAU,OAAO,sBAAuBU,EAAAA,EAAAA,iBAAiC,CAC1GC,OAAQ,aACRC,MAAO,QACPC,OAAQ,QACRC,SAAU,QACVC,QAAS,SACT,KAAM,UAEVd,KAAKe,WAAa,CAACC,MAAO,EAAOC,OAAO,EAAOC,QAAQ,GAlB/D,8CAqBI,WACoC,GAA5BlB,KAAKe,WAAL,OAA+D,GAA3Bf,KAAKe,WAAL,MAAgE,GAA7Bf,KAAKe,WAAL,SACvEf,KAAKO,KAAKY,UAAUC,KAAKC,MAAMP,QAAU,MAvBrD,kBA2BI,SAAKb,EAAYqB,GAAU,WAEvBtB,KAAKC,WAAaA,EAElB,IAAIsB,EAAY,CAACC,OAAS,GAAKxB,KAAKC,WAAWwB,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0D,OACS,GAAfjE,KAAKK,QACLL,KAAKC,WAAW2C,aAAaC,UAAU,SAAU,IAErD7C,KAAKK,QAAS,IAEdL,KAAKO,KAAK0C,OACS,GAAfjD,KAAKK,QACLL,KAAKC,WAAW2C,aAAaC,UAAU,SAAU,IAErD7C,KAAKK,QAAS,QA9L1B","sources":["webpack://LiveHelperChat/./src/lib/widgets/needhelpWidget.js"],"sourcesContent":["import {settings} from '../settings.js';\nimport {UIConstructorIframe} from '../UIConstructorIframe';\nimport {helperFunctions} from '../helperFunctions';\n\nexport class needhelpWidget{\n constructor(prefix) {\n\n this.attributes = {};\n this.hidden = false;\n this.widgetOpen = false;\n this.invitationOpen = false;\n this.nhOpen = false;\n this.delayProcessed = false;\n\n this.cont = new UIConstructorIframe((prefix || 'lhc')+'_needhelp_widget_v2', helperFunctions.getAbstractStyle({\n zindex: \"2147483639\",\n width: \"320px\",\n height: \"135px\",\n position: \"fixed\",\n display: \"none\",\n }), null, \"iframe\");\n\n this.loadStatus = {main : false, theme: false, status: false};\n }\n \n checkLoadStatus() {\n if (this.loadStatus['theme'] == true && this.loadStatus['main'] == true && this.loadStatus['status'] == true) {\n this.cont.elmDomDoc.body.style.display = \"\";\n }\n }\n \n init(attributes, settings) {\n\n this.attributes = attributes;\n\n var placement = {bottom: (70 + this.attributes.widgetDimesions.value.wbottom) +\"px\", right: (65+this.attributes.widgetDimesions.value.wright) + \"px\"};\n\n var leftPosition = false;\n\n if (attributes.position_placement == 'bottom_left' || attributes.position_placement == 'full_height_left') {\n placement = {bottom: (70 + this.attributes.widgetDimesions.value.wbottom) +\"px\", left: (65+this.attributes.widgetDimesions.value.wright) + \"px\"};\n leftPosition = true;\n } else if (attributes.position_placement == 'middle_left') {\n placement = {bottom: \"calc(50% + 35px)\", left: (65+this.attributes.widgetDimesions.value.wright) + \"px\"};\n leftPosition = true;\n } else if (attributes.position_placement == 'middle_right') {\n placement = {bottom: \"calc(50% + 35px)\", right: (65+this.attributes.widgetDimesions.value.wright) + \"px\"};\n }\n\n this.cont.massRestyle(placement);\n\n this.attributes = attributes;\n\n this.cont.tmpl = settings['html'].replace('{dev_type}',(this.attributes.isMobile === true ? 'lhc-mobile' : 'lhc-desktop'));\n this.cont.bodyId = 'need-help';\n \n if (this.cont.constructUIIframe('', this.attributes.staticJS['dir']) === null){\n return null;\n }\n \n // Content invisible untill media loads\n this.cont.elmDomDoc.body.style.display = \"none\";\n \n this.cont.elmDom.className += this.attributes.isMobile === true ? ' lhc-mobile' : ' lhc-desktop';\n\n this.cont.attachUserEventListener(\"click\", function (e) {\n attributes.eventEmitter.emitEvent('nhClicked', [{'event': e, 'sender' : 'closeButton'}]);\n attributes.eventEmitter.emitEvent('showWidget', [{'event': e}]);\n }, \"start-chat-btn\",'nhstrt');\n\n var _that = this;\n\n this.cont.attachUserEventListener(\"click\", function (a) {\n attributes.eventEmitter.emitEvent('nhClosed', [{'sender' : 'closeButton'}]);\n a.stopPropagation();\n _that.hide(true);\n }, \"close-need-help-btn\",'nhcls');\n\n if (settings.dimensions) {\n if (leftPosition == true && settings.dimensions['right']) {\n settings.dimensions['left'] = settings.dimensions['right'];\n delete settings.dimensions['right'];\n }\n this.cont.massRestyle(settings.dimensions);\n }\n\n this.cont.insertCssRemoteFile({onload: () => {this.loadStatus['main'] = true; this.checkLoadStatus()},crossOrigin : \"anonymous\", href : this.attributes.staticJS['widget_css']}, true);\n\n if (this.attributes.isMobile == true) {\n this.cont.insertCssRemoteFile({crossOrigin : \"anonymous\", href : this.attributes.staticJS['widget_mobile_css']});\n }\n\n if (this.attributes.theme) {\n this.cont.insertCssRemoteFile({onload: () => {this.loadStatus['theme'] = true; this.checkLoadStatus()}, id : \"lhc-theme-needhelp\", crossOrigin : \"anonymous\", href : this.attributes.LHC_API.args.lhc_base_url + '/widgetrestapi/themeneedhelp/' + this.attributes.theme + '?v=' + this.attributes.theme_v}, true);\n } else {\n this.loadStatus['theme'] = true;\n this.checkLoadStatus();\n }\n\n // Show need help only if status widget is loaded\n attributes.sload.subscribe((data) => {if(data){this.loadStatus['status'] = true; this.checkLoadStatus()}});\n\n if (!settings['ap']) {\n attributes.eventEmitter.addListener('showInvitation', () => {\n this.invitationOpen = true;\n this.hide();\n });\n\n attributes.eventEmitter.addListener('chatStarted', () => {\n this.hide(true);\n });\n\n attributes.eventEmitter.addListener('hideInvitation', () => {\n this.invitationOpen = false;\n this.show();\n });\n\n attributes.eventEmitter.addListener('cancelInvitation', () => {\n this.invitationOpen = false;\n this.show();\n });\n\n attributes.msgsnippet_status.subscribe((data) => {\n data == true && this.hide(true);\n });\n\n attributes.shidden.subscribe((data) => {\n data ? this.hide(false) : this.show();\n });\n }\n\n setTimeout(() => {\n\n this.delayProcessed = true;\n\n attributes.widgetStatus.subscribe((data) => {\n data == true ? (this.widgetOpen = true,this.hide()) : (this.widgetOpen = false,this.show());\n });\n\n attributes.onlineStatus.subscribe((data) => {\n if (data == false) {\n let needHide = this.hidden;\n this.hide();\n // Show next time only if it was not hidden already\n if (needHide === false) {\n this.hidden = false;\n }\n } else {\n this.show();\n }\n });\n\n }, settings.delay);\n\n attributes.eventEmitter.addListener('reloadWidget',() => {\n this.cont.insertCssRemoteFile({onload: () => {this.loadStatus['theme'] = true; this.checkLoadStatus()}, id : \"lhc-theme-needhelp\", crossOrigin : \"anonymous\", href : this.attributes.LHC_API.args.lhc_base_url + '/widgetrestapi/themeneedhelp/' + this.attributes.theme + '?v=' + Date.now()}, true);\n });\n\n }\n\n hide (persistent) {\n\n if (typeof persistent !== 'undefined' && persistent === true) {\n this.attributes.userSession.hnh = Math.round(Date.now() / 1000);\n this.attributes.storageHandler.storeSessionInformation(this.attributes.userSession.getSessionAttributes());\n this.hidden = true;\n }\n\n this.cont.hide();\n\n if (this.nhOpen == true) {\n this.attributes.eventEmitter.emitEvent('nhHide', []);\n }\n\n this.nhOpen = false;\n }\n\n show () {\n\n if (this.delayProcessed == false || this.hidden == true || this.widgetOpen == true || this.invitationOpen == true || this.attributes.onlineStatus.value == false) {\n return;\n }\n\n if (this.attributes.hideOffline === false) {\n this.cont.show();\n if (this.nhOpen == false) {\n this.attributes.eventEmitter.emitEvent('nhShow', []);\n }\n this.nhOpen = true;\n } else {\n this.cont.hide();\n if (this.nhOpen == true) {\n this.attributes.eventEmitter.emitEvent('nhHide', []);\n }\n this.nhOpen = false;\n }\n }\n}"],"names":["needhelpWidget","prefix","this","attributes","hidden","widgetOpen","invitationOpen","nhOpen","delayProcessed","cont","UIConstructorIframe","helperFunctions","zindex","width","height","position","display","loadStatus","main","theme","status","elmDomDoc","body","style","settings","placement","bottom","widgetDimesions","value","wbottom","right","wright","leftPosition","position_placement","left","massRestyle","tmpl","replace","isMobile","bodyId","constructUIIframe","staticJS","elmDom","className","attachUserEventListener","e","eventEmitter","emitEvent","_that","a","stopPropagation","hide","dimensions","insertCssRemoteFile","onload","checkLoadStatus","crossOrigin","href","id","LHC_API","args","lhc_base_url","theme_v","sload","subscribe","data","addListener","show","msgsnippet_status","shidden","setTimeout","widgetStatus","onlineStatus","needHide","delay","Date","now","persistent","userSession","hnh","Math","round","storageHandler","storeSessionInformation","getSessionAttributes","hideOffline"],"sourceRoot":""} \ No newline at end of file diff --git a/lhc_web/design/defaulttheme/widget/wrapper/dist/a5b21cc17552b167a2f1.js b/lhc_web/design/defaulttheme/widget/wrapper/dist/b10c9440ec454caf8cbd.js similarity index 76% rename from lhc_web/design/defaulttheme/widget/wrapper/dist/a5b21cc17552b167a2f1.js rename to lhc_web/design/defaulttheme/widget/wrapper/dist/b10c9440ec454caf8cbd.js index 24eaaaeaae..207a60211e 100644 --- a/lhc_web/design/defaulttheme/widget/wrapper/dist/a5b21cc17552b167a2f1.js +++ b/lhc_web/design/defaulttheme/widget/wrapper/dist/b10c9440ec454caf8cbd.js @@ -1,2 +1,2 @@ -"use strict";(self.webpackChunkLiveHelperChat=self.webpackChunkLiveHelperChat||[]).push([[821],{6821:function(t,e,i){i.r(e),i.d(e,{needhelpWidget:function(){return a}});var s=i(5671),n=i(3144),o=(i(7761),i(3031)),h=i(2137),a=function(){function t(e){(0,s.Z)(this,t),this.attributes={},this.hidden=!1,this.widgetOpen=!1,this.invitationOpen=!1,this.nhOpen=!1,this.delayProcessed=!1,this.cont=new o.a((e||"lhc")+"_needhelp_widget_v2",h.a.getAbstractStyle({zindex:"2147483639",width:"320px",height:"135px",position:"fixed",display:"none"}),null,"iframe"),this.loadStatus={main:!1,theme:!1,status:!1}}return(0,n.Z)(t,[{key:"checkLoadStatus",value:function(){1==this.loadStatus.theme&&1==this.loadStatus.main&&1==this.loadStatus.status&&(this.cont.elmDomDoc.body.style.display="")}},{key:"init",value:function(t,e){var i=this;this.attributes=t;var s={bottom:70+this.attributes.widgetDimesions.value.wbottom+"px",right:65+this.attributes.widgetDimesions.value.wright+"px"},n=!1;if("bottom_left"==t.position_placement||"full_height_left"==t.position_placement?(s={bottom:70+this.attributes.widgetDimesions.value.wbottom+"px",left:65+this.attributes.widgetDimesions.value.wright+"px"},n=!0):"middle_left"==t.position_placement?(s={bottom:"calc(50% + 35px)",left:65+this.attributes.widgetDimesions.value.wright+"px"},n=!0):"middle_right"==t.position_placement&&(s={bottom:"calc(50% + 35px)",right:65+this.attributes.widgetDimesions.value.wright+"px"}),this.cont.massRestyle(s),this.attributes=t,this.cont.tmpl=e.html.replace("{dev_type}",!0===this.attributes.isMobile?"lhc-mobile":"lhc-desktop"),this.cont.bodyId="need-help",null===this.cont.constructUIIframe("",this.attributes.staticJS.dir))return null;this.cont.elmDomDoc.body.style.display="none",this.cont.elmDom.className+=!0===this.attributes.isMobile?" lhc-mobile":" lhc-desktop",this.cont.attachUserEventListener("click",(function(e){t.eventEmitter.emitEvent("nhClicked",[{event:e,sender:"closeButton"}]),t.eventEmitter.emitEvent("showWidget",[{event:e}])}),"start-chat-btn","nhstrt");var o=this;this.cont.attachUserEventListener("click",(function(e){t.eventEmitter.emitEvent("nhClosed",[{sender:"closeButton"}]),e.stopPropagation(),o.hide(!0)}),"close-need-help-btn","nhcls"),e.dimensions&&(1==n&&e.dimensions.right&&(e.dimensions.left=e.dimensions.right,delete e.dimensions.right),this.cont.massRestyle(e.dimensions)),this.cont.insertCssRemoteFile({onload:function(){i.loadStatus.main=!0,i.checkLoadStatus()},crossOrigin:"anonymous",href:this.attributes.staticJS.widget_css},!0),1==this.attributes.isMobile&&this.cont.insertCssRemoteFile({crossOrigin:"anonymous",href:this.attributes.staticJS.widget_mobile_css}),this.attributes.theme?this.cont.insertCssRemoteFile({onload:function(){i.loadStatus.theme=!0,i.checkLoadStatus()},id:"lhc-theme-needhelp",crossOrigin:"anonymous",href:this.attributes.LHC_API.args.lhc_base_url+"/widgetrestapi/themeneedhelp/"+this.attributes.theme+"?v="+this.attributes.theme_v},!0):(this.loadStatus.theme=!0,this.checkLoadStatus()),t.sload.subscribe((function(t){t&&(i.loadStatus.status=!0,i.checkLoadStatus())})),e.ap||(t.eventEmitter.addListener("showInvitation",(function(){i.invitationOpen=!0,i.hide()})),t.eventEmitter.addListener("chatStarted",(function(){i.hide(!0)})),t.eventEmitter.addListener("hideInvitation",(function(){i.invitationOpen=!1,i.show()})),t.eventEmitter.addListener("cancelInvitation",(function(){i.invitationOpen=!1,i.show()})),t.msgsnippet_status.subscribe((function(t){1==t&&i.hide(!0)})),t.shidden.subscribe((function(t){t?i.hide(!1):i.show()}))),setTimeout((function(){i.delayProcessed=!0,t.widgetStatus.subscribe((function(t){1==t?(i.widgetOpen=!0,i.hide()):(i.widgetOpen=!1,i.show())})),t.onlineStatus.subscribe((function(t){if(0==t){var e=i.hidden;i.hide(),!1===e&&(i.hidden=!1)}else i.show()}))}),e.delay),t.eventEmitter.addListener("reloadWidget",(function(){i.cont.insertCssRemoteFile({onload:function(){i.loadStatus.theme=!0,i.checkLoadStatus()},id:"lhc-theme-needhelp",crossOrigin:"anonymous",href:i.attributes.LHC_API.args.lhc_base_url+"/widgetrestapi/themeneedhelp/"+i.attributes.theme+"?v="+Date.now()},!0)}))}},{key:"hide",value:function(t){void 0!==t&&!0===t&&(this.attributes.userSession.hnh=Math.round(Date.now()/1e3),this.attributes.storageHandler.storeSessionInformation(this.attributes.userSession.getSessionAttributes()),this.hidden=!0),this.cont.hide(),1==this.nhOpen&&this.attributes.eventEmitter.emitEvent("nhHide",[]),this.nhOpen=!1}},{key:"show",value:function(){0!=this.delayProcessed&&1!=this.hidden&&1!=this.widgetOpen&&1!=this.invitationOpen&&0!=this.attributes.onlineStatus.value&&(!1===this.attributes.hideOffline?(this.cont.show(),0==this.nhOpen&&this.attributes.eventEmitter.emitEvent("nhShow",[]),this.nhOpen=!0):(this.cont.hide(),1==this.nhOpen&&this.attributes.eventEmitter.emitEvent("nhHide",[]),this.nhOpen=!1))}}]),t}()}}]); -//# sourceMappingURL=a5b21cc17552b167a2f1.js.map \ No newline at end of file +"use strict";(self.webpackChunkLiveHelperChat=self.webpackChunkLiveHelperChat||[]).push([[821],{6821:function(t,e,i){i.r(e),i.d(e,{needhelpWidget:function(){return a}});var s=i(5671),n=i(3144),o=(i(7761),i(3031)),h=i(2137),a=function(){function t(e){(0,s.Z)(this,t),this.attributes={},this.hidden=!1,this.widgetOpen=!1,this.invitationOpen=!1,this.nhOpen=!1,this.delayProcessed=!1,this.cont=new o.a((e||"lhc")+"_needhelp_widget_v2",h.a.getAbstractStyle({zindex:"2147483639",width:"320px",height:"135px",position:"fixed",display:"none"}),null,"iframe"),this.loadStatus={main:!1,theme:!1,status:!1}}return(0,n.Z)(t,[{key:"checkLoadStatus",value:function(){1==this.loadStatus.theme&&1==this.loadStatus.main&&1==this.loadStatus.status&&(this.cont.elmDomDoc.body.style.display="")}},{key:"init",value:function(t,e){var i=this;this.attributes=t;var s={bottom:70+this.attributes.widgetDimesions.value.wbottom+"px",right:65+this.attributes.widgetDimesions.value.wright+"px"},n=!1;if("bottom_left"==t.position_placement||"full_height_left"==t.position_placement?(s={bottom:70+this.attributes.widgetDimesions.value.wbottom+"px",left:65+this.attributes.widgetDimesions.value.wright+"px"},n=!0):"middle_left"==t.position_placement?(s={bottom:"calc(50% + 35px)",left:65+this.attributes.widgetDimesions.value.wright+"px"},n=!0):"middle_right"==t.position_placement&&(s={bottom:"calc(50% + 35px)",right:65+this.attributes.widgetDimesions.value.wright+"px"}),this.cont.massRestyle(s),this.attributes=t,this.cont.tmpl=e.html.replace("{dev_type}",!0===this.attributes.isMobile?"lhc-mobile":"lhc-desktop"),this.cont.bodyId="need-help",null===this.cont.constructUIIframe("",this.attributes.staticJS.dir))return null;this.cont.elmDomDoc.body.style.display="none",this.cont.elmDom.className+=!0===this.attributes.isMobile?" lhc-mobile":" lhc-desktop",this.cont.attachUserEventListener("click",(function(e){t.eventEmitter.emitEvent("nhClicked",[{event:e,sender:"closeButton"}]),t.eventEmitter.emitEvent("showWidget",[{event:e}])}),"start-chat-btn","nhstrt");var o=this;this.cont.attachUserEventListener("click",(function(e){t.eventEmitter.emitEvent("nhClosed",[{sender:"closeButton"}]),e.stopPropagation(),o.hide(!0)}),"close-need-help-btn","nhcls"),e.dimensions&&(1==n&&e.dimensions.right&&(e.dimensions.left=e.dimensions.right,delete e.dimensions.right),this.cont.massRestyle(e.dimensions)),this.cont.insertCssRemoteFile({onload:function(){i.loadStatus.main=!0,i.checkLoadStatus()},crossOrigin:"anonymous",href:this.attributes.staticJS.widget_css},!0),1==this.attributes.isMobile&&this.cont.insertCssRemoteFile({crossOrigin:"anonymous",href:this.attributes.staticJS.widget_mobile_css}),this.attributes.theme?this.cont.insertCssRemoteFile({onload:function(){i.loadStatus.theme=!0,i.checkLoadStatus()},id:"lhc-theme-needhelp",crossOrigin:"anonymous",href:this.attributes.LHC_API.args.lhc_base_url+"/widgetrestapi/themeneedhelp/"+this.attributes.theme+"?v="+this.attributes.theme_v},!0):(this.loadStatus.theme=!0,this.checkLoadStatus()),t.sload.subscribe((function(t){t&&(i.loadStatus.status=!0,i.checkLoadStatus())})),e.ap||(t.eventEmitter.addListener("showInvitation",(function(){i.invitationOpen=!0,i.hide()})),t.eventEmitter.addListener("chatStarted",(function(){i.hide(!0)})),t.eventEmitter.addListener("hideInvitation",(function(){i.invitationOpen=!1,i.show()})),t.eventEmitter.addListener("cancelInvitation",(function(){i.invitationOpen=!1,i.show()})),t.msgsnippet_status.subscribe((function(t){1==t&&i.hide(!0)})),t.shidden.subscribe((function(t){t?i.hide(!1):i.show()}))),setTimeout((function(){i.delayProcessed=!0,t.widgetStatus.subscribe((function(t){1==t?(i.widgetOpen=!0,i.hide()):(i.widgetOpen=!1,i.show())})),t.onlineStatus.subscribe((function(t){if(0==t){var e=i.hidden;i.hide(),!1===e&&(i.hidden=!1)}else i.show()}))}),e.delay+this.attributes.status_delay),t.eventEmitter.addListener("reloadWidget",(function(){i.cont.insertCssRemoteFile({onload:function(){i.loadStatus.theme=!0,i.checkLoadStatus()},id:"lhc-theme-needhelp",crossOrigin:"anonymous",href:i.attributes.LHC_API.args.lhc_base_url+"/widgetrestapi/themeneedhelp/"+i.attributes.theme+"?v="+Date.now()},!0)}))}},{key:"hide",value:function(t){void 0!==t&&!0===t&&(this.attributes.userSession.hnh=Math.round(Date.now()/1e3),this.attributes.storageHandler.storeSessionInformation(this.attributes.userSession.getSessionAttributes()),this.hidden=!0),this.cont.hide(),1==this.nhOpen&&this.attributes.eventEmitter.emitEvent("nhHide",[]),this.nhOpen=!1}},{key:"show",value:function(){0!=this.delayProcessed&&1!=this.hidden&&1!=this.widgetOpen&&1!=this.invitationOpen&&0!=this.attributes.onlineStatus.value&&(!1===this.attributes.hideOffline?(this.cont.show(),0==this.nhOpen&&this.attributes.eventEmitter.emitEvent("nhShow",[]),this.nhOpen=!0):(this.cont.hide(),1==this.nhOpen&&this.attributes.eventEmitter.emitEvent("nhHide",[]),this.nhOpen=!1))}}]),t}()}}]); +//# sourceMappingURL=b10c9440ec454caf8cbd.js.map \ No newline at end of file diff --git a/lhc_web/design/defaulttheme/widget/wrapper/dist/b10c9440ec454caf8cbd.js.map b/lhc_web/design/defaulttheme/widget/wrapper/dist/b10c9440ec454caf8cbd.js.map new file mode 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AAK+D,YAId3C,EAASkD,MAAQxE,KAAKC,WAAL,cAEpBA,EAAW2C,aAAaoB,YAAY,gBAAe,WAC/C,EAAKzD,KAAK4C,oBAAoB,CAACC,OAAQ,WAAO,EAAKrC,WAAL,OAA2B,EAAM,EAAKsC,mBAAoBG,GAAK,qBAAsBF,YAAc,YAAcC,KAAO,EAAKtD,WAAWwD,QAAQC,KAAKC,aAAe,gCAAkC,EAAK1D,WAAWgB,MAAQ,MAAQwD,KAAKC,QAAQ,QAvJ7S,kBA4JI,SAAMC,QAEwB,IAAfA,IAA6C,IAAfA,IACrC3E,KAAKC,WAAW2E,YAAYC,IAAMC,KAAKC,MAAMN,KAAKC,MAAQ,KAC1D1E,KAAKC,WAAW+E,eAAeC,wBAAwBjF,KAAKC,WAAW2E,YAAYM,wBACnFlF,KAAKE,QAAS,GAGlBF,KAAKO,KAAK0C,OAES,GAAfjD,KAAKK,QACLL,KAAKC,WAAW2C,aAAaC,UAAU,SAAU,IAGrD7C,KAAKK,QAAS,IA1KtB,kBA6KI,WAE+B,GAAvBL,KAAKM,gBAA0C,GAAfN,KAAKE,QAAqC,GAAnBF,KAAKG,YAA6C,GAAvBH,KAAKI,gBAAgE,GAAtCJ,KAAKC,WAAWqE,aAAa5C,SAI9G,IAAhC1B,KAAKC,WAAWkF,aAChBnF,KAAKO,KAAK0D,OACS,GAAfjE,KAAKK,QACLL,KAAKC,WAAW2C,aAAaC,UAAU,SAAU,IAErD7C,KAAKK,QAAS,IAEdL,KAAKO,KAAK0C,OACS,GAAfjD,KAAKK,QACLL,KAAKC,WAAW2C,aAAaC,UAAU,SAAU,IAErD7C,KAAKK,QAAS,QA9L1B","sources":["webpack://LiveHelperChat/./src/lib/widgets/needhelpWidget.js"],"sourcesContent":["import {settings} from '../settings.js';\nimport {UIConstructorIframe} from '../UIConstructorIframe';\nimport {helperFunctions} from '../helperFunctions';\n\nexport class needhelpWidget{\n constructor(prefix) {\n\n this.attributes = {};\n this.hidden = false;\n this.widgetOpen = false;\n this.invitationOpen = false;\n this.nhOpen = false;\n this.delayProcessed = false;\n\n this.cont = new UIConstructorIframe((prefix || 'lhc')+'_needhelp_widget_v2', helperFunctions.getAbstractStyle({\n zindex: \"2147483639\",\n width: \"320px\",\n height: \"135px\",\n position: \"fixed\",\n display: \"none\",\n }), null, \"iframe\");\n\n this.loadStatus = {main : false, theme: false, status: false};\n }\n \n checkLoadStatus() {\n if (this.loadStatus['theme'] == true && this.loadStatus['main'] == true && this.loadStatus['status'] == true) {\n this.cont.elmDomDoc.body.style.display = \"\";\n }\n }\n \n init(attributes, settings) {\n\n this.attributes = attributes;\n\n var placement = {bottom: (70 + this.attributes.widgetDimesions.value.wbottom) +\"px\", right: (65+this.attributes.widgetDimesions.value.wright) + \"px\"};\n\n var leftPosition = false;\n\n if (attributes.position_placement == 'bottom_left' || attributes.position_placement == 'full_height_left') {\n placement = {bottom: (70 + this.attributes.widgetDimesions.value.wbottom) +\"px\", left: (65+this.attributes.widgetDimesions.value.wright) + \"px\"};\n leftPosition = true;\n } else if (attributes.position_placement == 'middle_left') {\n placement = {bottom: \"calc(50% + 35px)\", left: (65+this.attributes.widgetDimesions.value.wright) + \"px\"};\n leftPosition = true;\n } else if (attributes.position_placement == 'middle_right') {\n placement = {bottom: \"calc(50% + 35px)\", right: (65+this.attributes.widgetDimesions.value.wright) + \"px\"};\n }\n\n this.cont.massRestyle(placement);\n\n this.attributes = attributes;\n\n this.cont.tmpl = settings['html'].replace('{dev_type}',(this.attributes.isMobile === true ? 'lhc-mobile' : 'lhc-desktop'));\n this.cont.bodyId = 'need-help';\n \n if (this.cont.constructUIIframe('', this.attributes.staticJS['dir']) === null){\n return null;\n }\n \n // Content invisible untill media loads\n this.cont.elmDomDoc.body.style.display = \"none\";\n \n this.cont.elmDom.className += this.attributes.isMobile === true ? ' lhc-mobile' : ' lhc-desktop';\n\n this.cont.attachUserEventListener(\"click\", function (e) {\n attributes.eventEmitter.emitEvent('nhClicked', [{'event': e, 'sender' : 'closeButton'}]);\n attributes.eventEmitter.emitEvent('showWidget', [{'event': e}]);\n }, \"start-chat-btn\",'nhstrt');\n\n var _that = this;\n\n this.cont.attachUserEventListener(\"click\", function (a) {\n attributes.eventEmitter.emitEvent('nhClosed', [{'sender' : 'closeButton'}]);\n a.stopPropagation();\n _that.hide(true);\n }, \"close-need-help-btn\",'nhcls');\n\n if (settings.dimensions) {\n if (leftPosition == true && settings.dimensions['right']) {\n settings.dimensions['left'] = settings.dimensions['right'];\n delete settings.dimensions['right'];\n }\n this.cont.massRestyle(settings.dimensions);\n }\n\n this.cont.insertCssRemoteFile({onload: () => {this.loadStatus['main'] = true; this.checkLoadStatus()},crossOrigin : \"anonymous\", href : this.attributes.staticJS['widget_css']}, true);\n\n if (this.attributes.isMobile == true) {\n this.cont.insertCssRemoteFile({crossOrigin : \"anonymous\", href : this.attributes.staticJS['widget_mobile_css']});\n }\n\n if (this.attributes.theme) {\n this.cont.insertCssRemoteFile({onload: () => {this.loadStatus['theme'] = true; this.checkLoadStatus()}, id : \"lhc-theme-needhelp\", crossOrigin : \"anonymous\", href : this.attributes.LHC_API.args.lhc_base_url + '/widgetrestapi/themeneedhelp/' + this.attributes.theme + '?v=' + this.attributes.theme_v}, true);\n } else {\n this.loadStatus['theme'] = true;\n this.checkLoadStatus();\n }\n\n // Show need help only if status widget is loaded\n attributes.sload.subscribe((data) => {if(data){this.loadStatus['status'] = true; this.checkLoadStatus()}});\n\n if (!settings['ap']) {\n attributes.eventEmitter.addListener('showInvitation', () => {\n this.invitationOpen = true;\n this.hide();\n });\n\n attributes.eventEmitter.addListener('chatStarted', () => {\n this.hide(true);\n });\n\n attributes.eventEmitter.addListener('hideInvitation', () => {\n this.invitationOpen = false;\n this.show();\n });\n\n attributes.eventEmitter.addListener('cancelInvitation', () => {\n this.invitationOpen = false;\n this.show();\n });\n\n attributes.msgsnippet_status.subscribe((data) => {\n data == true && this.hide(true);\n });\n\n attributes.shidden.subscribe((data) => {\n data ? this.hide(false) : this.show();\n });\n }\n\n setTimeout(() => {\n\n this.delayProcessed = true;\n\n attributes.widgetStatus.subscribe((data) => {\n data == true ? (this.widgetOpen = true,this.hide()) : (this.widgetOpen = false,this.show());\n });\n\n attributes.onlineStatus.subscribe((data) => {\n if (data == false) {\n let needHide = this.hidden;\n this.hide();\n // Show next time only if it was not hidden already\n if (needHide === false) {\n this.hidden = false;\n }\n } else {\n this.show();\n }\n });\n\n }, settings.delay + this.attributes['status_delay']);\n\n attributes.eventEmitter.addListener('reloadWidget',() => {\n this.cont.insertCssRemoteFile({onload: () => {this.loadStatus['theme'] = true; this.checkLoadStatus()}, id : \"lhc-theme-needhelp\", crossOrigin : \"anonymous\", href : this.attributes.LHC_API.args.lhc_base_url + '/widgetrestapi/themeneedhelp/' + this.attributes.theme + '?v=' + Date.now()}, true);\n });\n\n }\n\n hide (persistent) {\n\n if (typeof persistent !== 'undefined' && persistent === true) {\n this.attributes.userSession.hnh = Math.round(Date.now() / 1000);\n this.attributes.storageHandler.storeSessionInformation(this.attributes.userSession.getSessionAttributes());\n this.hidden = true;\n }\n\n this.cont.hide();\n\n if (this.nhOpen == true) {\n this.attributes.eventEmitter.emitEvent('nhHide', []);\n }\n\n this.nhOpen = false;\n }\n\n show () {\n\n if (this.delayProcessed == false || this.hidden == true || this.widgetOpen == true || this.invitationOpen == true || this.attributes.onlineStatus.value == false) {\n return;\n }\n\n if (this.attributes.hideOffline === false) {\n this.cont.show();\n if (this.nhOpen == false) {\n this.attributes.eventEmitter.emitEvent('nhShow', []);\n }\n this.nhOpen = true;\n } else {\n this.cont.hide();\n if (this.nhOpen == true) {\n this.attributes.eventEmitter.emitEvent('nhHide', []);\n }\n this.nhOpen = false;\n }\n }\n}"],"names":["needhelpWidget","prefix","this","attributes","hidden","widgetOpen","invitationOpen","nhOpen","delayProcessed","cont","UIConstructorIframe","helperFunctions","zindex","width","height","position","display","loadStatus","main","theme","status","elmDomDoc","body","style","settings","placement","bottom","widgetDimesions","value","wbottom","right","wright","leftPosition","position_placement","left","massRestyle","tmpl","replace","isMobile","bodyId","constructUIIframe","staticJS","elmDom","className","attachUserEventListener","e","eventEmitter","emitEvent","_that","a","stopPropagation","hide","dimensions","insertCssRemoteFile","onload","checkLoadStatus","crossOrigin","href","id","LHC_API","args","lhc_base_url","theme_v","sload","subscribe","data","addListener","show","msgsnippet_status","shidden","setTimeout","widgetStatus","onlineStatus","needHide","delay","Date","now","persistent","userSession","hnh","Math","round","storageHandler","storeSessionInformation","getSessionAttributes","hideOffline"],"sourceRoot":""} \ No newline at end of file diff --git a/lhc_web/design/defaulttheme/widget/wrapper/dist/6b5f759b84269b244c78.js b/lhc_web/design/defaulttheme/widget/wrapper/dist/c9aa29f9fd71f320cdd6.js similarity index 72% rename from lhc_web/design/defaulttheme/widget/wrapper/dist/6b5f759b84269b244c78.js rename to lhc_web/design/defaulttheme/widget/wrapper/dist/c9aa29f9fd71f320cdd6.js index 2734795346..95919a046a 100644 --- a/lhc_web/design/defaulttheme/widget/wrapper/dist/6b5f759b84269b244c78.js +++ b/lhc_web/design/defaulttheme/widget/wrapper/dist/c9aa29f9fd71f320cdd6.js @@ -1,2 +1,2 @@ -"use strict";(self.webpackChunkLiveHelperChat=self.webpackChunkLiveHelperChat||[]).push([[530],{2530:function(t,i,e){e.r(i),e.d(i,{proactiveChat:function(){return r}});var s=e(5671),n=e(3144),a=e(2137),o=e(593),r=new(function(){function t(){(0,s.Z)(this,t),this.params={},this.timeoutStatuscheck=null,this.timeoutActivity=null,this.attributes=null,this.chatEvents=null,this.dynamicInvitations=[],this.iddleTimeoutActivity=null,this.checkMessageTimeout=null,this.nextRescheduleTimeout=null,this.initCall=!0,this.inProgress=!1}return(0,n.Z)(t,[{key:"setParams",value:function(t,i,e){var s=this;this.params=t,this.attributes=i,this.chatEvents=e,this.attributes.events.length>0?this.storeEvents(this.attributes.events):this.initInvitation(),""!=this.attributes.conversion&&this.storeConversion(this.attributes.conversion),this.attributes.eventEmitter.addListener("tagAdded",(function(){s.initInvitation({init:0})})),this.attributes.eventEmitter.addListener("eventAdded",(function(){s.storeEvents(s.attributes.events)})),this.attributes.eventEmitter.addListener("conversionAdded",(function(){s.storeConversion(s.attributes.conversion)})),this.attributes.eventEmitter.addListener("checkMessageOperator",(function(){s.initInvitation({init:0})})),this.attributes.eventEmitter.addListener("endChat",(function(){s.initInvitation({init:0})})),this.attributes.onlineStatus.subscribe((function(t){1==t?s.initInvitation({init:0}):!s.attributes.userSession.getSessionAttributes().id&&s.attributes.proactive.invitation&&(s.attributes.proactive={},!1!==s.attributes.mainWidget.isLoaded&&s.chatEvents.sendChildEvent("proactive",[{}]),s.attributes.mainWidget.hideInvitation(),s.attributes.eventEmitter.emitEvent("closeWidget",[{sender:"closeButton"}]))}))}},{key:"showInvitation",value:function(t,i){var e=this.attributes.userSession.getSessionAttributes();if(!(0===i&&!0===this.attributes.widgetStatus.value&&"embed"==!this.attributes.mode||e.id)){if(t.inject_html&&t.invitation){var s=document.getElementsByTagName("head")[0],n=document.createElement("script");n.setAttribute("type","text/javascript"),n.setAttribute("src",this.attributes.LHC_API.args.lhc_base_url+this.attributes.lang+"chat/htmlsnippet/"+t.invitation+"/inv/0/?ts="+Date.now()),s.appendChild(n)}t.only_inject||(this.attributes.proactive=t,!1===this.attributes.mainWidget.isLoaded?this.attributes.mainWidget.bootstrap():this.chatEvents.sendChildEvent("proactive",[t]),clearTimeout(this.checkMessageTimeout),clearTimeout(this.nextRescheduleTimeout))}}},{key:"storeEvents",value:function(t){var i=this;this.attributes.userSession.getSessionAttributes().id||1!=this.attributes.onlineStatus.value||a.a.makeRequest(this.attributes.LHC_API.args.lhc_base_url+this.attributes.lang+"chat/logevent/(vid)/"+this.attributes.userSession.getVID(),{params:{data:JSON.stringify(t)}},(function(t){i.initInvitation({init:0})}))}},{key:"storeConversion",value:function(t){this.attributes.userSession.getSessionAttributes().id||1!=this.attributes.onlineStatus.value||a.a.makeRequest(this.attributes.LHC_API.args.lhc_base_url+this.attributes.lang+"widgetrestapi/logconversions/(vid)/"+this.attributes.userSession.getVID(),{params:{data:JSON.stringify(t)}},(function(t){}))}},{key:"initInvitation",value:function(t){var i=this;if(1!=this.inProgress){clearTimeout(this.checkMessageTimeout);var e=this.attributes.userSession.getSessionAttributes(),s=t&&0===t.init?0:1;if(!e.id&&1==this.attributes.onlineStatus.value){this.inProgress=!0;var n={vid:this.attributes.userSession.getVID(),dep:this.attributes.department.join(",")};this.attributes.LHC_API.args.priority&&(n.priority=this.attributes.LHC_API.args.priority),this.attributes.LHC_API.args.operator&&(n.operator=this.attributes.LHC_API.args.operator),this.attributes.identifier&&(n.idnt=this.attributes.identifier),this.attributes.tag&&(n.tag=this.attributes.tag),this.attributes.langOverride&&(n.lang=this.attributes.langOverride),n.l=encodeURIComponent(window.location.href.substring(window.location.protocol.length)),n.dt=encodeURIComponent(document.title),n.init=1==this.initCall?1:s,this.initCall=!1,a.a.makeRequest(this.attributes.LHC_API.args.lhc_base_url+this.attributes.lang+"widgetrestapi/checkinvitation",{params:n},(function(t){if(i.inProgress=!1,t.invitation){var e={vid_id:t.vid_id,invitation:t.invitation,inject_html:t.inject_html,qinv:t.qinv};setTimeout((function(){i.showInvitation(e,s)}),!0===i.attributes.widgetStatus.value?0:t.delay||0)}else i.attributes.LHC_API.args.check_messages&&(i.checkMessageTimeout=setTimeout((function(){i.initInvitation({init:0})}),1e3*i.params.interval));t.next_reschedule&&(i.nextRescheduleTimeout=setTimeout((function(){i.initInvitation({init:0})}),t.next_reschedule)),t.dynamic&&t.dynamic.forEach((function(e){i.dynamicInvitations.push(e.id),1===e.type?o.U.listen(document,"mouseout",(function(s){var n=(s=s||window.event).relatedTarget||s.toElement;n&&"HTML"!=n.nodeName||(i.showInvitation({vid_id:t.vid_id,invitation:e.id,inject_html:e.inject_html,qinv:t.qinv,only_inject:e.only_inject}),e.every_time||o.U.unlisten("lhc_inv_mouse_out_"+e.id))}),"lhc_inv_mouse_out_"+e.id):2===e.type&&(i.iddleTimeoutActivityReset=function(){clearTimeout(i.iddleTimeoutActivity),i.iddleTimeoutActivity=setTimeout((function(){i.showInvitation({vid_id:t.vid_id,invitation:e.id,inject_html:e.inject_html,qinv:t.qinv,only_inject:e.only_inject}),clearTimeout(i.iddleTimeoutActivity),e.every_time||(["mousemove","mousedown","click","scroll","keypress","load"].forEach((function(t){o.U.unlisten("lhc_inv_iddl_win_"+t)})),["mousemove","scroll","touchstart","touchend"].forEach((function(t){o.U.unlisten("lhc_inv_iddl_doc_"+t)})))}),1e3*e.iddle_for)},i.iddleTimeoutActivityReset(),["mousemove","mousedown","click","scroll","keypress","load"].forEach((function(t){o.U.listen(window,t,i.iddleTimeoutActivityReset,"lhc_inv_iddl_win_"+t)})),["mousemove","scroll","touchstart","touchend"].forEach((function(t){o.U.listen(document,t,i.iddleTimeoutActivityReset,"lhc_inv_iddl_doc_"+t)})))}))}))}}}}]),t}())}}]); -//# sourceMappingURL=6b5f759b84269b244c78.js.map \ No newline at end of file +"use strict";(self.webpackChunkLiveHelperChat=self.webpackChunkLiveHelperChat||[]).push([[530],{2530:function(t,i,e){e.r(i),e.d(i,{proactiveChat:function(){return r}});var s=e(5671),n=e(3144),a=e(2137),o=e(593),r=new(function(){function t(){(0,s.Z)(this,t),this.params={},this.timeoutStatuscheck=null,this.timeoutActivity=null,this.attributes=null,this.chatEvents=null,this.dynamicInvitations=[],this.iddleTimeoutActivity=null,this.checkMessageTimeout=null,this.nextRescheduleTimeout=null,this.initCall=!0,this.inProgress=!1}return(0,n.Z)(t,[{key:"setParams",value:function(t,i,e){var s=this;this.params=t,this.attributes=i,this.chatEvents=e,this.attributes.events.length>0?this.storeEvents(this.attributes.events):this.initInvitation(),""!=this.attributes.conversion&&this.storeConversion(this.attributes.conversion),this.attributes.eventEmitter.addListener("tagAdded",(function(){s.initInvitation({init:0})})),this.attributes.eventEmitter.addListener("eventAdded",(function(){s.storeEvents(s.attributes.events)})),this.attributes.eventEmitter.addListener("conversionAdded",(function(){s.storeConversion(s.attributes.conversion)})),this.attributes.eventEmitter.addListener("checkMessageOperator",(function(){s.initInvitation({init:0})})),this.attributes.eventEmitter.addListener("endChat",(function(){s.initInvitation({init:0})})),this.attributes.onlineStatus.subscribe((function(t){1==t?s.initInvitation({init:0}):!s.attributes.userSession.getSessionAttributes().id&&s.attributes.proactive.invitation&&(s.attributes.proactive={},!1!==s.attributes.mainWidget.isLoaded&&s.chatEvents.sendChildEvent("proactive",[{}]),s.attributes.mainWidget.hideInvitation(),s.attributes.eventEmitter.emitEvent("closeWidget",[{sender:"closeButton"}]))}))}},{key:"showInvitation",value:function(t,i){var e=this.attributes.userSession.getSessionAttributes();if(!(0===i&&!0===this.attributes.widgetStatus.value&&"embed"==!this.attributes.mode||e.id)){if(t.inject_html&&t.invitation){var s=document.getElementsByTagName("head")[0],n=document.createElement("script");n.setAttribute("type","text/javascript"),n.setAttribute("src",this.attributes.LHC_API.args.lhc_base_url+this.attributes.lang+"chat/htmlsnippet/"+t.invitation+"/inv/0/?ts="+Date.now()),s.appendChild(n)}t.only_inject||(this.attributes.proactive=t,!1===this.attributes.mainWidget.isLoaded?this.attributes.mainWidget.bootstrap():this.chatEvents.sendChildEvent("proactive",[t]),clearTimeout(this.checkMessageTimeout),clearTimeout(this.nextRescheduleTimeout))}}},{key:"storeEvents",value:function(t){var i=this;this.attributes.userSession.getSessionAttributes().id||1!=this.attributes.onlineStatus.value||a.a.makeRequest(this.attributes.LHC_API.args.lhc_base_url+this.attributes.lang+"chat/logevent/(vid)/"+this.attributes.userSession.getVID(),{params:{data:JSON.stringify(t)}},(function(t){i.initInvitation({init:0})}))}},{key:"storeConversion",value:function(t){this.attributes.userSession.getSessionAttributes().id||1!=this.attributes.onlineStatus.value||a.a.makeRequest(this.attributes.LHC_API.args.lhc_base_url+this.attributes.lang+"widgetrestapi/logconversions/(vid)/"+this.attributes.userSession.getVID(),{params:{data:JSON.stringify(t)}},(function(t){}))}},{key:"initInvitation",value:function(t){var i=this;if(1!=this.inProgress){clearTimeout(this.checkMessageTimeout);var e=this.attributes.userSession.getSessionAttributes(),s=t&&0===t.init?0:1;if(!e.id&&1==this.attributes.onlineStatus.value){this.inProgress=!0;var n={vid:this.attributes.userSession.getVID(),dep:this.attributes.department.join(",")};this.attributes.LHC_API.args.priority&&(n.priority=this.attributes.LHC_API.args.priority),this.attributes.LHC_API.args.operator&&(n.operator=this.attributes.LHC_API.args.operator),this.attributes.identifier&&(n.idnt=this.attributes.identifier),this.attributes.tag&&(n.tag=this.attributes.tag),this.attributes.langOverride&&(n.lang=this.attributes.langOverride),n.l=encodeURIComponent(window.location.href.substring(window.location.protocol.length)),n.dt=encodeURIComponent(document.title),n.init=1==this.initCall?1:s,this.initCall=!1,a.a.makeRequest(this.attributes.LHC_API.args.lhc_base_url+this.attributes.lang+"widgetrestapi/checkinvitation",{params:n},(function(t){if(i.inProgress=!1,t.invitation){var e={vid_id:t.vid_id,invitation:t.invitation,inject_html:t.inject_html,qinv:t.qinv};setTimeout((function(){i.showInvitation(e,s)}),!0===i.attributes.widgetStatus.value?0:t.delay?t.delay+i.attributes.status_delay:i.attributes.status_delay)}else i.attributes.LHC_API.args.check_messages&&(i.checkMessageTimeout=setTimeout((function(){i.initInvitation({init:0})}),1e3*i.params.interval));t.next_reschedule&&(i.nextRescheduleTimeout=setTimeout((function(){i.initInvitation({init:0})}),t.next_reschedule)),t.dynamic&&t.dynamic.forEach((function(e){i.dynamicInvitations.push(e.id),1===e.type?o.U.listen(document,"mouseout",(function(s){var n=(s=s||window.event).relatedTarget||s.toElement;n&&"HTML"!=n.nodeName||(i.showInvitation({vid_id:t.vid_id,invitation:e.id,inject_html:e.inject_html,qinv:t.qinv,only_inject:e.only_inject}),e.every_time||o.U.unlisten("lhc_inv_mouse_out_"+e.id))}),"lhc_inv_mouse_out_"+e.id):2===e.type&&(i.iddleTimeoutActivityReset=function(){clearTimeout(i.iddleTimeoutActivity),i.iddleTimeoutActivity=setTimeout((function(){i.showInvitation({vid_id:t.vid_id,invitation:e.id,inject_html:e.inject_html,qinv:t.qinv,only_inject:e.only_inject}),clearTimeout(i.iddleTimeoutActivity),e.every_time||(["mousemove","mousedown","click","scroll","keypress","load"].forEach((function(t){o.U.unlisten("lhc_inv_iddl_win_"+t)})),["mousemove","scroll","touchstart","touchend"].forEach((function(t){o.U.unlisten("lhc_inv_iddl_doc_"+t)})))}),1e3*e.iddle_for)},i.iddleTimeoutActivityReset(),["mousemove","mousedown","click","scroll","keypress","load"].forEach((function(t){o.U.listen(window,t,i.iddleTimeoutActivityReset,"lhc_inv_iddl_win_"+t)})),["mousemove","scroll","touchstart","touchend"].forEach((function(t){o.U.listen(document,t,i.iddleTimeoutActivityReset,"lhc_inv_iddl_doc_"+t)})))}))}))}}}}]),t}())}}]); +//# sourceMappingURL=c9aa29f9fd71f320cdd6.js.map \ No newline at end of file diff --git a/lhc_web/design/defaulttheme/widget/wrapper/dist/c9aa29f9fd71f320cdd6.js.map b/lhc_web/design/defaulttheme/widget/wrapper/dist/c9aa29f9fd71f320cdd6.js.map new file mode 100644 index 0000000000..2d9396c70c --- /dev/null +++ b/lhc_web/design/defaulttheme/widget/wrapper/dist/c9aa29f9fd71f320cdd6.js.map @@ -0,0 +1 @@ +{"version":3,"file":"c9aa29f9fd71f320cdd6.js","mappings":"mNAsPMA,EAAgB,IAnPhBC,WAEF,cAAc,eACVC,KAAKC,OAAS,GACdD,KAAKE,mBAAqB,KAC1BF,KAAKG,gBAAkB,KACvBH,KAAKI,WAAa,KAClBJ,KAAKK,WAAa,KAClBL,KAAKM,mBAAqB,GAE1BN,KAAKO,qBAAuB,KAC5BP,KAAKQ,oBAAsB,KAC3BR,KAAKS,sBAAwB,KAC7BT,KAAKU,UAAW,EAChBV,KAAKW,YAAa,E,wCAGtB,SAAUV,EAAQG,EAAYC,GAAY,WACtCL,KAAKC,OAASA,EACdD,KAAKI,WAAaA,EAClBJ,KAAKK,WAAaA,EAEdL,KAAKI,WAAWQ,OAAOC,OAAS,EAChCb,KAAKc,YAAYd,KAAKI,WAAWQ,Q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,OAAwB5C,SAAU+C,EAAO,EAAKK,0BAA2B,oBAAoBL,mB,EAzOvHtF","sources":["webpack://LiveHelperChat/./src/util/proactiveChat.js"],"sourcesContent":["import {helperFunctions} from '../lib/helperFunctions';\nimport {domEventsHandler} from '../util/domEventsHandler';\n\nclass _proactiveChat {\n\n constructor() {\n this.params = {};\n this.timeoutStatuscheck = null;\n this.timeoutActivity = null;\n this.attributes = null;\n this.chatEvents = null;\n this.dynamicInvitations = [];\n\n this.iddleTimeoutActivity = null;\n this.checkMessageTimeout = null;\n this.nextRescheduleTimeout = null;\n this.initCall = true;\n this.inProgress = false;\n }\n\n setParams(params, attributes, chatEvents) {\n this.params = params;\n this.attributes = attributes;\n this.chatEvents = chatEvents;\n\n if (this.attributes.events.length > 0) {\n this.storeEvents(this.attributes.events);\n } else {\n this.initInvitation();\n }\n\n if (this.attributes.conversion != '') {\n this.storeConversion(this.attributes.conversion);\n }\n\n // check invitaiton then tag is added\n this.attributes.eventEmitter.addListener('tagAdded', () => {\n this.initInvitation({init: 0});\n });\n\n this.attributes.eventEmitter.addListener('eventAdded', () => {\n this.storeEvents(this.attributes.events);\n });\n\n this.attributes.eventEmitter.addListener('conversionAdded', () => {\n this.storeConversion(this.attributes.conversion);\n });\n\n this.attributes.eventEmitter.addListener('checkMessageOperator', () => {\n this.initInvitation({init: 0});\n });\n\n this.attributes.eventEmitter.addListener('endChat', () => {\n this.initInvitation({init: 0});\n });\n\n this.attributes.onlineStatus.subscribe((data) => {\n if (data == true) {\n this.initInvitation({init: 0});\n } else {\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n if (!chatParams['id'] && this.attributes.proactive.invitation) {\n this.attributes.proactive = {};\n if (this.attributes.mainWidget.isLoaded !== false) {\n this.chatEvents.sendChildEvent('proactive', [{}]);\n }\n this.attributes.mainWidget.hideInvitation();\n this.attributes.eventEmitter.emitEvent('closeWidget', [{'sender' : 'closeButton'}]);\n }\n }\n });\n }\n\n showInvitation(params, init) {\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n\n // Show invitation only if widget is not open\n if ((init === 0 && (this.attributes.widgetStatus.value === true && !this.attributes.mode == 'embed')) || chatParams['id']) {\n return;\n }\n\n if (params.inject_html && params.invitation) {\n var th = document.getElementsByTagName('head')[0];\n var s = document.createElement('script');\n s.setAttribute('type','text/javascript');\n s.setAttribute('src', this.attributes.LHC_API.args.lhc_base_url + this.attributes['lang'] + 'chat/htmlsnippet/'+params.invitation+'/inv/0/?ts='+Date.now());\n th.appendChild(s);\n }\n\n if (!params.only_inject) {\n this.attributes.proactive = params;\n\n if (this.attributes.mainWidget.isLoaded === false) {\n this.attributes.mainWidget.bootstrap();\n } else {\n this.chatEvents.sendChildEvent('proactive', [params]);\n }\n\n clearTimeout(this.checkMessageTimeout);\n clearTimeout(this.nextRescheduleTimeout);\n }\n }\n\n storeEvents(events) {\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n if (!chatParams['id'] && this.attributes['onlineStatus'].value == true) {\n helperFunctions.makeRequest(this.attributes.LHC_API.args.lhc_base_url + this.attributes['lang'] + 'chat/logevent/(vid)/' + this.attributes.userSession.getVID(), {params: {'data' : JSON.stringify(events)}}, (data) => {\n this.initInvitation({init: 0});\n })\n }\n }\n\n storeConversion(conversion) {\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n if (!chatParams['id'] && this.attributes['onlineStatus'].value == true) {\n helperFunctions.makeRequest(this.attributes.LHC_API.args.lhc_base_url + this.attributes['lang'] + 'widgetrestapi/logconversions/(vid)/' + this.attributes.userSession.getVID(), {params: {'data' : JSON.stringify(conversion)}}, (data) => {\n\n });\n }\n }\n\n initInvitation(paramsExecution) {\n\n if (this.inProgress == true) {\n return ;\n }\n\n clearTimeout(this.checkMessageTimeout);\n\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n\n const init = (paramsExecution && paramsExecution['init'] === 0) ? 0 : 1;\n\n if (!chatParams['id'] && this.attributes['onlineStatus'].value == true) {\n\n this.inProgress = true;\n\n let params = {\n 'vid': this.attributes.userSession.getVID(),\n 'dep': this.attributes.department.join(',')\n };\n\n if (this.attributes.LHC_API.args.priority) {\n params['priority'] = this.attributes.LHC_API.args.priority;\n }\n\n if (this.attributes.LHC_API.args.operator) {\n params['operator'] = this.attributes.LHC_API.args.operator;\n }\n\n if (this.attributes['identifier']) {\n params['idnt'] = this.attributes['identifier']\n }\n\n if (this.attributes['tag']) {\n params['tag'] = this.attributes['tag']\n }\n\n if (this.attributes['langOverride']) {\n params['lang'] = this.attributes['langOverride']\n }\n\n params['l'] = encodeURIComponent(window.location.href.substring(window.location.protocol.length));\n params['dt'] = encodeURIComponent(document.title);\n params['init'] = this.initCall == true ? 1 : init;\n\n this.initCall = false;\n\n helperFunctions.makeRequest(this.attributes.LHC_API.args.lhc_base_url + this.attributes['lang'] + 'widgetrestapi/checkinvitation', {params: params}, (data) => {\n\n this.inProgress = false;\n \n if (data.invitation) {\n const params = {'vid_id' : data.vid_id, 'invitation' : data.invitation, 'inject_html' : data.inject_html, 'qinv' : data.qinv};\n setTimeout(() => {\n this.showInvitation(params, init);\n }, this.attributes.widgetStatus.value === true ? 0 : (data.delay ? data.delay + this.attributes['status_delay'] : this.attributes['status_delay']));\n } else {\n if (this.attributes.LHC_API.args.check_messages) {\n this.checkMessageTimeout = setTimeout(() => {\n this.initInvitation({init: 0});\n },this.params['interval'] * 1000);\n }\n }\n\n if (data.next_reschedule) {\n this.nextRescheduleTimeout = setTimeout(() => {\n this.initInvitation({init: 0});\n }, data.next_reschedule);\n }\n\n if (data.dynamic) {\n data.dynamic.forEach((item) => {\n this.dynamicInvitations.push(item.id);\n if (item.type === 1) {\n domEventsHandler.listen(document, 'mouseout', (e) => {\n e = e ? e : window.event;\n var from = e.relatedTarget || e.toElement;\n if (!from || from.nodeName == \"HTML\") {\n this.showInvitation({'vid_id' : data.vid_id, 'invitation' : item.id, 'inject_html' : item.inject_html, 'qinv' : data.qinv, 'only_inject' : item.only_inject});\n if (!item.every_time) {\n domEventsHandler.unlisten('lhc_inv_mouse_out_'+item.id);\n }\n }\n }, 'lhc_inv_mouse_out_' + item.id);\n } else if (item.type === 2) {\n\n var iddleTimeout = () => {\n\n this.showInvitation({'vid_id' : data.vid_id, 'invitation' : item.id, 'inject_html' : item.inject_html, 'qinv' : data.qinv, 'only_inject' : item.only_inject});\n\n clearTimeout(this.iddleTimeoutActivity);\n\n if (!item.every_time) {\n ['mousemove','mousedown','click','scroll','keypress','load'].forEach((element) => {\n domEventsHandler.unlisten('lhc_inv_iddl_win_'+element);\n });\n\n ['mousemove','scroll','touchstart','touchend'].forEach((element) => {\n domEventsHandler.unlisten('lhc_inv_iddl_doc_'+element);\n });\n }\n };\n\n this.iddleTimeoutActivityReset = () => {\n clearTimeout(this.iddleTimeoutActivity);\n this.iddleTimeoutActivity = setTimeout( () => { iddleTimeout(); }, item.iddle_for *1000);\n }\n\n this.iddleTimeoutActivityReset();\n\n ['mousemove','mousedown','click','scroll','keypress','load'].forEach((event) => {\n domEventsHandler.listen(window, event, this.iddleTimeoutActivityReset, 'lhc_inv_iddl_win_'+event);\n });\n\n ['mousemove','scroll','touchstart','touchend'].forEach((event) => {\n domEventsHandler.listen(document, event, this.iddleTimeoutActivityReset, 'lhc_inv_iddl_doc_'+event);\n });\n }\n })\n }\n });\n }\n }\n}\n\nconst proactiveChat = new _proactiveChat();\nexport {proactiveChat};\n\n"],"names":["proactiveChat","_proactiveChat","this","params","timeoutStatuscheck","timeoutActivity","attributes","chatEvents","dynamicInvitations","iddleTimeoutActivity","checkMessageTimeout","nextRescheduleTimeout","initCall","inProgress","events","length","storeEvents","initInvitation","conversion","storeConversion","eventEmitter","addListener","init","onlineStatus","subscribe","data","getSessionAttributes","proactive","invitation","mainWidget","isLoaded","sendChildEvent","hideInvitation","emitEvent","chatParams","widgetStatus","value","mode","inject_html","th","document","getElementsByTagName","s","createElement","setAttribute","LHC_API","args","lhc_base_url","Date","now","appendChild","only_inject","bootstrap","clearTimeout","helperFunctions","userSession","getVID","JSON","stringify","paramsExecution","department","join","priority","operator","encodeURIComponent","window","location","href","substring","protocol","title","vid_id","qinv","setTimeout","showInvitation","delay","check_messages","next_reschedule","dynamic","forEach","item","push","id","type","domEventsHandler","e","from","event","relatedTarget","toElement","nodeName","every_time","iddleTimeoutActivityReset","element","iddle_for"],"sourceRoot":""} \ No newline at end of file diff --git a/lhc_web/design/defaulttheme/widget/wrapper/dist/index.js b/lhc_web/design/defaulttheme/widget/wrapper/dist/index.js index 084941c48e..bcfed0e4ef 100644 --- a/lhc_web/design/defaulttheme/widget/wrapper/dist/index.js +++ b/lhc_web/design/defaulttheme/widget/wrapper/dist/index.js @@ -1,3 +1,3 @@ /*! For license information please see index.js.LICENSE.txt */ -(function(){var __webpack_modules__={9272:function(t,e,i){"use strict";var n=i(723),s=[],r=[],o=n.makeRequestCallFromTimer((function(){if(r.length)throw r.shift()}));function a(t){var e;(e=s.length?s.pop():new u).task=t,n(e)}function u(){this.task=null}t.exports=a,u.prototype.call=function(){try{this.task.call()}catch(t){a.onerror?a.onerror(t):(r.push(t),o())}finally{this.task=null,s[s.length]=this}}},723:function(t,e,i){"use strict";function n(t){r.length||s(),r[r.length]=t}t.exports=n;var s,r=[],o=0;function a(){for(;o1024){for(var e=0,i=r.length-o;e',null===this.cont.constructUIIframe("",this.attributes.staticJS.dir,this.attributes.staticJS.cl,this.attributes.hhtml))return this.isLoaded=!0,null;this.cont.elmDom.className=!0===this.attributes.isMobile?"lhc-mobile lhc-mode-"+this.attributes.mode:"lhc-desktop lhc-mode-"+this.attributes.mode,this.attributes.cont_ss&&(this.originalCSS=this.cont.elmDom.style.cssText,this.cont.elmDom.style.cssText+=this.attributes.cont_ss)}},{key:"init",value:function(t,e){var i=this;if(this.attributes=t,null===this.makeContent())return null;!this.attributes.userSession.getSessionAttributes().id&&e||this.bootstrap(),this.toggleVisibilityWrap=function(t){i.toggleVisibility(t)},t.widgetStatus.subscribe(this.toggleVisibilityWrap),this.monitorDimensionsWrap=function(t){i.monitorDimensions(t)},"px"==t.widgetDimesions.valueInternal.units&&0==this.attributes.isMobile&&"embed"!=this.attributes.mode&&"full_height_right"!=this.attributes.position_placement&&"full_height_left"!=this.attributes.position_placement&&(this.screenAttributesUpdate=function(){window.innerHeight0&&this.attributes.staticJS.ex_js.forEach((function(e){t.cont.insertJSFile(e,!1)})))}},{key:"toggleVisibility",value:function(t){0==t?this.hide():this.show()}},{key:"monitorDimensions",value:function(t){this.width=t.width_override||t.width_soverride||t.width,this.height=t.height_override||t.height_soverride||t.height,this.bottom=t.bottom_override?t.bottom_override+(t.wbottom?t.wbottom:0):30+(!0===this.attributes.clinst?70:0)+(t.wbottom?t.wbottom:0),this.right=t.right_override?t.right_override+(t.wright_inv?t.wright_inv:0):30+(t.wright?t.wright:0),this.units=t.width_override||t.height_override||t.bottom_override||t.right_override?"px":t.units,this.resize(),this.bottom_override=!!t.bottom_override}},{key:"hide",value:function(){this.cont.hide()}},{key:"hideInvitation",value:function(){this.attributes.cont_ss&&(this.cont.elmDom.style.cssText+=this.attributes.cont_ss)}},{key:"showInvitation",value:function(){this.attributes.cont_ss&&(this.cont.elmDom.style.cssText=this.originalCSS),this.show()}},{key:"show",value:function(){!1===this.isLoaded&&this.bootstrap(),this.cont.show()}}]),t}()},5962:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{f:function(){return mainWidgetPopup}});var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5671),_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(3144),mainWidgetPopup=function(){function mainWidgetPopup(){(0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__.Z)(this,mainWidgetPopup),this.attributes={},this.width=null,this.height=null,this.units="px",this.freeup()}return(0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__.Z)(mainWidgetPopup,[{key:"freeup",value:function(){this.cont={}}},{key:"parseOptions",value:function(){var t=new Array,e="";if(void 0!==this.attributes){if(void 0!==this.attributes.LHCChatOptions.attr&&this.attributes.LHCChatOptions.attr.length>0)for(var i in this.attributes.LHCChatOptions.attr)void 0!==this.attributes.LHCChatOptions.attr[i]&&void 0!==this.attributes.LHCChatOptions.attr[i].type&&t.push("name[]="+encodeURIComponent(this.attributes.LHCChatOptions.attr[i].name)+"&encattr[]="+(void 0!==this.attributes.LHCChatOptions.attr[i].encrypted&&1==this.attributes.LHCChatOptions.attr[i].encrypted?"t":"f")+"&value[]="+encodeURIComponent(this.attributes.LHCChatOptions.attr[i].value)+"&type[]="+encodeURIComponent(this.attributes.LHCChatOptions.attr[i].type)+"&size[]="+encodeURIComponent(this.attributes.LHCChatOptions.attr[i].size)+"&req[]="+(void 0!==this.attributes.LHCChatOptions.attr[i].req&&1==this.attributes.LHCChatOptions.attr[i].req?"t":"f")+"&sh[]="+(void 0===this.attributes.LHCChatOptions.attr[i].show||"on"!=this.attributes.LHCChatOptions.attr[i].show&&"off"!=this.attributes.LHCChatOptions.attr[i].show?"b":this.attributes.LHCChatOptions.attr[i].show));if(void 0!==this.attributes.LHCChatOptions.attr_prefill&&this.attributes.LHCChatOptions.attr_prefill.length>0)for(var i in this.attributes.LHCChatOptions.attr_prefill)void 0!==this.attributes.LHCChatOptions.attr_prefill[i]&&void 0!==this.attributes.LHCChatOptions.attr_prefill[i].name&&t.push("prefill["+this.attributes.LHCChatOptions.attr_prefill[i].name+"]="+encodeURIComponent(this.attributes.LHCChatOptions.attr_prefill[i].value));if(void 0!==this.attributes.LHCChatOptions.attr_prefill_admin&&this.attributes.LHCChatOptions.attr_prefill_admin.length>0)for(var i in this.attributes.LHCChatOptions.attr_prefill_admin)void 0!==this.attributes.LHCChatOptions.attr_prefill_admin[i]&&t.push("value_items_admin["+this.attributes.LHCChatOptions.attr_prefill_admin[i].index+"]="+encodeURIComponent(this.attributes.LHCChatOptions.attr_prefill_admin[i].value));t.length>0&&(e="&"+t.join("&"))}return e}},{key:"init",value:function(t,e,i){if(this.cont.elementReferrerPopup&&!1===this.cont.elementReferrerPopup.closed)void 0!==i&&"undefined"!==i.event&&i.event.preventDefault(),this.cont.elementReferrerPopup.focus();else{this.attributes=t;var n={static_chat:this.attributes.userSession.getSessionAttributes()},s="";n.static_chat.id&&n.static_chat.hash&&(s=s+"/(id)/"+n.static_chat.id+"/(hash)/"+n.static_chat.hash),null!==this.attributes.theme&&(s=s+"/(theme)/"+this.attributes.theme),null!==n.static_chat.vid&&!0===this.attributes.storageHandler.cookieEnabled&&(s=s+"/(vid)/"+n.static_chat.vid),this.attributes.isMobile&&(s+="/(mobile)/true"),this.attributes.department.length>0&&(s=s+"/(department)/"+this.attributes.department.join("/")),""!=this.attributes.identifier&&(s=s+"/(identifier)/"+this.attributes.identifier),this.attributes.operator&&(s=s+"/(operator)/"+this.attributes.operator),this.attributes.survey&&(s=s+"/(survey)/"+this.attributes.survey),this.attributes.bot_id&&(s=s+"/(bot)/"+this.attributes.bot_id),this.attributes.trigger_id&&(s=s+"/(trigger)/"+this.attributes.trigger_id),this.attributes.subject_id&&(s=s+"/(subject)/"+this.attributes.subject_id),this.attributes.priority&&(s=s+"/(priority)/"+this.attributes.priority),"lhc"!=this.attributes.prefixLowercase&&(s=s+"/(scope)/"+this.attributes.prefixLowercase),s=s+"/(sound)/"+(1==this.attributes.toggleSound.value?1:0),this.attributes.proactive.invitation&&(s=s+"/(inv)/"+this.attributes.proactive.invitation,"popup"==this.attributes.mode&&this.attributes.storageHandler.setSessionStorage(this.attributes.prefixStorage+"_invt",1));var r=this.attributes.storageHandler.getLocalStorage(this.attributes.prefixStorage+"_dfs");r&&(s=s+"/(fs)/"+parseInt(r)),!0===this.attributes.leaveMessage&&(s+="/(leaveamessage)/true"),s=null!==this.attributes.userSession.getSessionReferrer()&&""!=this.attributes.userSession.getSessionReferrer()?s+"?ses_ref="+this.attributes.userSession.getSessionReferrer()+this.parseOptions():s+"?"+this.parseOptions();var o=void 0!==window.screenLeft?window.screenLeft:window.screenX,a=void 0!==window.screenTop?window.screenTop:window.screenY,u=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,c=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height,h=u/window.screen.availWidth,l=(u-parseInt(this.attributes.popupDimesnions.pwidth))/2/h+o,d=(c-parseInt(this.attributes.popupDimesnions.pheight))/2/h+a,p="scrollbars=yes,menubar=1,resizable=1,width="+this.attributes.popupDimesnions.pwidth+",height="+this.attributes.popupDimesnions.pheight+",top="+d+",left="+l,m=window.open("",this.attributes.prefixStorage+"_popup_v2",p),_=!1,f=!1;try{!m||m.closed||void 0===m.closed||"about:blank"===m.location.href?(m=this.cont.elementReferrerPopup=window.open(this.attributes.base_url+this.attributes.lang+"chat/start"+s,this.attributes.prefixStorage+"_popup_v2",p),f=!0):_=!0}catch(t){_=!0}if(!m||m.closed||void 0===m.closed)try{this.attributes.viewHandler.cont.getElementById("status-icon").href=this.attributes.base_url+this.attributes.lang+"chat/start"+s}catch(t){alert("You have disabled popups!")}else 1==f?(void 0!==e&&!1===this.attributes.kcw&&e.sendChildEvent("endedChat",[{sender:"endButton"}]),void 0!==i&&"undefined"!==i.event&&i.event.preventDefault()):!0===_&&(this.cont.elementReferrerPopup=m,m.focus(),void 0!==i&&"undefined"!==i.event&&i.event.preventDefault())}}},{key:"sendParameters",value:function sendParameters(chatEvents){if(this.cont.elementReferrerPopup&&!1===this.cont.elementReferrerPopup.closed){var js_vars=this.attributes.jsVars.value,js_args={},currentVar=null;for(var index in js_vars)try{currentVar=eval(js_vars[index].var),null!=currentVar&&""!==currentVar&&(js_args[js_vars[index].id]=currentVar)}catch(t){}chatEvents.sendChildEvent("jsVars",[js_args])}}}]),mainWidgetPopup}()},3678:function(t,e,i){"use strict";i.d(e,{T:function(){return a}});var n=i(5671),s=i(3144),r=(i(7761),i(3031)),o=i(2137),a=function(){function t(e){(0,n.Z)(this,t),this.attributes={},this.controlMode=!1,this.cont=new r.a((e||"lhc")+"_status_widget_v2",o.a.getAbstractStyle({zindex:"2147483640",width:"95px",height:"95px",position:"fixed",display:"none",maxheight:"95px",maxwidth:"95px",minheight:"95px",minwidth:"95px"}),null,"iframe"),this.loadStatus={main:!1,theme:!1,font:!0,widget:!1,shidden:!1},this.lload=!1,this.unread_counter=0}return(0,s.Z)(t,[{key:"toggleOfflineIcon",value:function(t){var e=this.cont.getElementById("status-icon");t?(this.attributes.leaveMessage||this.show(),o.a.removeClass(e,"offline-status")):this.attributes.leaveMessage?o.a.addClass(e,"offline-status"):this.hide()}},{key:"checkLoadStatus",value:function(){1==this.loadStatus.theme&&1==this.loadStatus.main&&1==this.loadStatus.font&&1==this.loadStatus.widget&&0==this.loadStatus.shidden&&(this.cont.getElementById("lhc_status_container").style.display="",this.attributes.sload.next(!0))}},{key:"init",value:function(t,e){var i=this;this.attributes=t;var n={bottom:10+this.attributes.widgetDimesions.value.sbottom+"px",right:10+this.attributes.widgetDimesions.value.sright+"px"};if("bottom_left"==t.position_placement||"full_height_left"==t.position_placement?n={bottom:10+this.attributes.widgetDimesions.value.sbottom+"px",left:10+this.attributes.widgetDimesions.value.sright+"px"}:"middle_right"==t.position_placement?n={bottom:"calc(50% - 45px)",right:10+this.attributes.widgetDimesions.value.sright+"px"}:"middle_left"==t.position_placement&&(n={bottom:"calc(50% - 45px)",left:10+this.attributes.widgetDimesions.value.sright+"px"}),this.cont.massRestyle(n),this.cont.tmpl='',null===this.cont.constructUIIframe(""))return null;this.cont.elmDom.className=!0===this.attributes.isMobile?"lhc-mobile":"lhc-desktop";var s=this;this.lload=!!e,!0===this.lload?this.loadStatus.widget=!0:t.wloaded.subscribe((function(t){t&&(i.loadStatus.widget=!0,i.checkLoadStatus())})),t.shidden.subscribe((function(t){t?i.attributes.userSession.getSessionAttributes().id||1==i.attributes.widgetStatus.value||(i.loadStatus.shidden=!0,i.hide()):(i.loadStatus.shidden=!1,i.checkLoadStatus(),i.show())})),this.cont.attachUserEventListener("click",(function(e){!1===t.onlineStatus.value&&t.eventEmitter.emitEvent("offlineClickAction"),!1===t.onlineStatus.value&&null!==t.offline_redirect?(document.location=t.offline_redirect,e.preventDefault()):1==s.controlMode?(t.eventEmitter.emitEvent("closeWidget",[{sender:"closeButton",mode:"control"}]),e.preventDefault()):(t.eventEmitter.emitEvent("showWidget",[{event:e}]),t.eventEmitter.emitEvent("clickAction"))}),"lhc_status_container","minifiedclick"),this.attributes.staticJS.fontCSS&&this.cont.insertCssRemoteFile({crossOrigin:"anonymous",href:this.attributes.staticJS.fontCSS}),this.attributes.staticJS.font_status&&this.cont.insertCssRemoteFile({onload:function(){i.loadStatus.font=!0,i.checkLoadStatus()},as:"font",rel:"preload",type:"font/woff",crossOrigin:"anonymous",href:this.attributes.staticJS.font_status}),this.attributes.theme?(this.loadStatus.theme=!1,this.cont.insertCssRemoteFile({onload:function(){i.loadStatus.theme=!0,i.checkLoadStatus()},id:"lhc-theme-status",crossOrigin:"anonymous",href:this.attributes.LHC_API.args.lhc_base_url+"/widgetrestapi/themestatus/"+this.attributes.theme+"?v="+this.attributes.theme_v},!0)):this.loadStatus.theme=!0,this.cont.insertCssRemoteFile({onload:function(){i.loadStatus.main=!0,i.checkLoadStatus()},crossOrigin:"anonymous",href:this.attributes.staticJS.status_css}),this.attributes.staticJS.page_css&&o.a.insertCssRemoteFile({crossOrigin:"anonymous",id:"lhc-theme-page",href:this.attributes.LHC_API.args.lhc_base_url+"/widgetrestapi/themepage/"+this.attributes.theme+"?v="+this.attributes.theme_v}),t.onlineStatus.subscribe((function(t){return i.toggleOfflineIcon(t)})),t.widgetStatus.subscribe((function(t){if("popup"!==i.attributes.mode){var e=i.attributes.userSession.getSessionAttributes();1==t||!i.attributes.leaveMessage&&0==i.attributes.onlineStatus.value&&!e.id?i.hide():i.show()}})),"popup"===this.attributes.mode&&this.show();var r=t.storageHandler.getSessionStorage(this.attributes.prefixStorage+"_unr");t.eventEmitter.addListener("unread_message",(function(t){var e=t&&t.otm;e&&(e=parseInt(e),e+=i.unread_counter),i.attributes.unread_counter.next(e),i.showUnreadIndicator(e)})),null!==r&&(t.eventEmitter.emitEvent("unread_message",[{otm:r,init:!0}]),null===r||isNaN(r)||(this.unread_counter=parseInt(r))),t.eventEmitter.addListener("reloadWidget",(function(){i.attributes.theme>0&&i.cont.insertCssRemoteFile({crossOrigin:"anonymous",id:"lhc-theme-status",href:i.attributes.LHC_API.args.lhc_base_url+"/widgetrestapi/themestatus/"+i.attributes.theme+"?v="+Date.now()},!0),o.a.insertCssRemoteFile({crossOrigin:"anonymous",id:"lhc-theme-page",href:i.attributes.LHC_API.args.lhc_base_url+"/widgetrestapi/themepage/"+i.attributes.theme+"?v="+Date.now()})}))}},{key:"hide",value:function(){if(this.removeUnreadIndicator(),!0===this.attributes.clinst&&0==this.attributes.isMobile){var t=this.attributes.userSession.getSessionAttributes();if((1==this.attributes.leaveMessage||1==this.attributes.onlineStatus.value||t.id)&&(("api"!=this.attributes.position||"api"==this.attributes.position&&!0!==this.attributes.hide_status&&(t.id&&t.hash||1==this.attributes.widgetStatus.value))&&(!0!==this.attributes.hide_status||t.id&&t.hash)&&this.cont.show(),!0!==this.attributes.hide_status||t.id&&t.hash||1==this.attributes.widgetStatus.value)){if(1==this.attributes.widgetStatus.value){this.controlMode=!0;var e=this.cont.getElementById("status-icon");o.a.addClass(e,"close-status")}return}}this.cont.hide()}},{key:"showUnreadIndicator",value:function(t){var e=t||"!",i=this.cont.getElementById("lhc_status_container");o.a.addClass(i,"has-uread-message");var n=this.cont.getElementById("unread-msg-number");n&&(n.innerText=e),this.attributes.storageHandler&&this.attributes.storageHandler.setSessionStorage(this.attributes.prefixStorage+"_unr",e)}},{key:"removeUnreadIndicator",value:function(){var t=this.cont.getElementById("lhc_status_container");o.a.removeClass(t,"has-uread-message"),this.attributes.storageHandler&&this.attributes.storageHandler.removeSessionStorage(this.attributes.prefixStorage+"_unr"),this.attributes.eventEmitter.emitEvent("remove_unread_indicator",[]),this.attributes.unread_counter.next(0),this.unread_counter=0}},{key:"show",value:function(){if(!1===this.attributes.hideOffline){var t=this.attributes.userSession.getSessionAttributes();if(!0===this.attributes.clinst&&0==this.attributes.isMobile&&1!=this.attributes.widgetStatus.value){var e=this.cont.getElementById("status-icon");o.a.removeClass(e,"close-status"),this.controlMode=!1}"api"!=this.attributes.position||"api"==this.attributes.position&&!0!==this.attributes.hide_status&&t.id&&t.hash?this.cont.show():!0===this.attributes.clinst&&1!=this.attributes.widgetStatus.value&&this.cont.hide()}else this.cont.hide()}}]),t}()},6349:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{Z:function(){return chatEventsHandler}});var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5671),_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(3144),chatEventsHandler=function(){function chatEventsHandler(t){(0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__.Z)(this,chatEventsHandler),this.attributes=t}return(0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__.Z)(chatEventsHandler,[{key:"getJSVarsValues",value:function getJSVarsValues(jsVars){var js_args={};if(jsVars.length>0){var currentVar=null;for(var index in jsVars)try{currentVar=eval("window."+jsVars[index].var),null!=currentVar&&""!==currentVar&&(js_args[jsVars[index].id]=currentVar)}catch(t){}return js_args}return js_args}},{key:"getInitAttributes",value:function(){var t={onlineStatus:this.attributes.onlineStatus.value,toggleSound:this.attributes.toggleSound.value,widgetStatus:this.attributes.widgetStatus.value,jsVars:this.getJSVarsValues(this.attributes.jsVars.value),isMobile:this.attributes.isMobile,department:this.attributes.department,product:this.attributes.product,theme:this.attributes.theme,theme_v:this.attributes.theme_v,base_url:this.attributes.base_url,mode:this.attributes.mode,captcha:this.attributes.captcha,staticJS:this.attributes.staticJS,static_chat:this.attributes.userSession.getSessionAttributes(),domain_lhc:this.attributes.domain_lhc,leave_message:this.attributes.leaveMessage,scope_prefix:this.attributes.prefixLowercase};if(1==this.attributes.fresh&&(t.static_chat.id&&delete t.static_chat.id,t.static_chat.hash&&delete t.static_chat.hash),""!=this.attributes.bot_id&&(t.bot_id=this.attributes.bot_id),""!=this.attributes.trigger_id&&(t.trigger_id=this.attributes.trigger_id),""!=this.attributes.subject_id&&(t.subject_id=this.attributes.subject_id),""!=this.attributes.priority&&(t.priority=this.attributes.priority),null!==this.attributes.phash&&(t.phash=this.attributes.phash),null!==this.attributes.survey&&(t.survey=this.attributes.survey),null!==this.attributes.pvhash&&(t.pvhash=this.attributes.pvhash),null!==this.attributes.operator&&(t.operator=this.attributes.operator),null!==this.attributes.profile_pic&&(t.profile_pic=this.attributes.profile_pic),""!=this.attributes.lang&&(t.lang=this.attributes.lang),this.attributes.proactive.invitation&&(t.proactive=this.attributes.proactive),null!==this.attributes.dep_default&&(t.dep_default=this.attributes.dep_default),this.attributes.LHCChatOptions&&this.attributes.LHCChatOptions.attr){var e=this.attributes.LHCChatOptions.attr,i=[];e.forEach((function(t,e){i.push({show:void 0===t.show||"on"!=t.show&&"off"!=t.show?"b":t.show,value:t.value,index:e,name:t.name,class:"form-control form-control-sm",type:t.type,identifier:"additional_"+e,placeholder:"",width:t.size||6,encrypted:t.encrypted||!1,required:t.req||!1,label:t.name})})),t.CUSTOM_FIELDS=i}if(this.attributes.LHCChatOptions&&this.attributes.LHCChatOptions.attr_prefill){e=this.attributes.LHCChatOptions.attr_prefill;var n=[];e.forEach((function(t){"email"==t.name?n.push({Email:t.value}):"username"==t.name?n.push({Username:t.value}):"phone"==t.name?n.push({Phone:t.value}):"question"==t.name&&n.push({Question:t.value})})),n=n.concat(this.attributes.userSession.getPrefillVars()),t.attr_prefill=n}else t.attr_prefill=this.attributes.userSession.getPrefillVars();if(this.attributes.LHCChatOptions&&this.attributes.LHCChatOptions.attr_prefill_admin){e=this.attributes.LHCChatOptions.attr_prefill_admin;var s=[];e.forEach((function(t){s.push({value:t.value,index:t.index})})),t.attr_prefill_admin=s}return null!==this.attributes.userSession.getSessionReferrer()&&(t.ses_ref=this.attributes.userSession.getSessionReferrer()),t}},{key:"sendChildCommand",value:function(t){this.attributes.mainWidget.cont.elmDom&&this.attributes.mainWidget.cont.elmDom.contentWindow&&this.attributes.mainWidget.cont.elmDom.contentWindow.postMessage(t,this.attributes.isIE?"*":"/"),this.attributes.popupWidget.cont.elementReferrerPopup&&!1===this.attributes.popupWidget.cont.elementReferrerPopup.closed&&this.attributes.popupWidget.cont.elementReferrerPopup.postMessage(t,"*")}},{key:"sendReadyEvent",value:function(t){var e=this.getInitAttributes();!0!==t&&this.attributes.mainWidget.cont.elmDom&&this.attributes.mainWidget.cont.elmDom.contentWindow&&this.attributes.mainWidget.cont.elmDom.contentWindow.postMessage("lhc_init:"+JSON.stringify(e),this.attributes.isIE?"*":"/")}},{key:"sendChildEvent",value:function(t,e,i){void 0===i&&(i="lhc_event"),this.sendChildCommand(i+":"+t+"::"+JSON.stringify(e))}}]),chatEventsHandler}()},593:function(t,e,i){"use strict";i.d(e,{U:function(){return r}});var n=i(5671),s=i(3144),r=new(function(){function t(){(0,n.Z)(this,t),this.events={}}return(0,s.Z)(t,[{key:"attachEvent",value:function(t,e,i){var n=this,s=function(e){i.call(t,n.getEvent(e))};return t.attachEvent("on"+e,s),s}},{key:"unlisten",value:function(t){var e;this.events[t]&&(e=this.events[t],this.events[t]=null,this.removeEventHandler(e.element,e.eventName,e.eventListener))}},{key:"listen",value:function(t,e,i,n){var s;if(n){if(this.events[n]&&(s=this.events[n],this.events[n]=null,this.removeEventHandler(s.element,s.eventName,s.eventListener)),t.addEventListener)t.addEventListener(e,i,!1);else{if(!document.attachEvent)return null;i=this.attachEvent(t,e,i)}return this.events[n]={element:t,eventName:e,eventListener:i},i}}},{key:"removeEventHandler",value:function(t,e,i){document.removeEventListener?t.removeEventListener(e,i,!1):t.detachEvent("on"+e,i)}},{key:"getEvent",value:function(t){var e=t||_this.event;if(!e)for(t=this.getEvent.caller;t&&(!(e=t.arguments[0])||Event!=e.constructor);)t=t.caller;return e}}]),t}())},6419:function(t,e,i){"use strict";i.d(e,{h:function(){return r}});var n=i(5671),s=i(3144),r=function(){function t(e,i){(0,n.Z)(this,t),this.valueInternal=e,this.listeners=[],this.params=i||{}}return(0,s.Z)(t,[{key:"value",get:function(){return this.valueInternal},set:function(t){this.next(t)}},{key:"next",value:function(t){this.valueInternal=t,this.callListeners()}},{key:"nextPropertySilent",value:function(t,e){this.valueInternal[t]=e}},{key:"nextProperty",value:function(t,e){this.valueInternal[t]=e,this.callListeners()}},{key:"callListeners",value:function(){var t=this;this.listeners.forEach((function(e){e&&"function"==typeof e&&e(t.valueInternal)}))}},{key:"unsubscribe",value:function(t){-1!==this.listeners.indexOf(t)&&this.listeners.splice(this.listeners.indexOf(t),1)}},{key:"subscribe",value:function(t){this.listeners.push(t),this.params.ignore_sub||t(this.valueInternal)}}]),t}()},5545:function(t,e,i){"use strict";i.d(e,{Q:function(){return r}});var n=i(5671),s=i(3144),r=function(){function t(e,i,s,r){(0,n.Z)(this,t),this.window=e,this.cookieEnabled=!1,this.cookiesSupportChecked=!1,1==r&&this.checkCookiesSupport(),this.domain=i,this.secureCookie=!1,this.cookiePerPage=!1,this.prefix=s||"lhc"}return(0,s.Z)(t,[{key:"checkCookiesSupport",value:function(){if(!0===this.cookiesSupportChecked)return this.cookieEnabled;this.cookiesSupportChecked=!0;try{this.hasSessionStorage=!!this.window.sessionStorage}catch(t){this.hasSessionStorage=!1}try{this.hasLocalStorage=!!this.window.localStorage}catch(t){this.hasLocalStorage=!1}try{document.cookie="cookietest=1",this.cookieEnabled=-1!==document.cookie.indexOf("cookietest="),document.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT"}catch(t){}return this.cookieEnabled}},{key:"setCookieDomain",value:function(t){this.domain=t}},{key:"setCookiePerPage",value:function(t){this.cookiePerPage=t}},{key:"getCookieDomain",value:function(){return this.domain?"."+this.domain:null}},{key:"setSecureCookie",value:function(t){this.secureCookie=t}},{key:"setHTTPCookie",value:function(t,e,i,n){if(!1!==this.cookieEnabled){var s="";i||((i=new Date).setTime(i.getTime()+15552e6),s="; expires="+i.toGMTString()),document.cookie=t+"="+e+s+(!1===this.cookiePerPage?"; path=/":!0===this.cookiePerPage?"":"; path="+this.cookiePerPage)+(this.secureCookie?";secure":"")+(n?";domain="+n:"")+";SameSite=Lax"}}},{key:"getHTTPCookie",value:function(t){if(!1===this.cookieEnabled)return[];var e,i,n=[],s=t+"=",r=document.cookie.split(";");for(t=0,e=r.length;t0){var e=this.getVars();for(var i in this.jsVars)if(this.jsVars[i].type&&e[this.jsVars[i].id]){var n={};n[this.jsVars[i].type]=e[this.jsVars[i].id],t.push(n)}}return t}},{key:"getVars",value:function getVars(){if(this.jsVars.length>0){var js_args={},currentVar=null;for(var index in this.jsVars)try{currentVar=-1!==this.jsVars[index].var.indexOf("lhc_var.")?this.attributes.lhc_var[this.jsVars[index].var.replace("lhc_var.","")]||null:eval(this.jsVars[index].var),null!=currentVar&&""!==currentVar&&(js_args[this.jsVars[index].id]=currentVar)}catch(t){}return js_args}return null}},{key:"getAppendVariables",value:function(){var t="";return null!==this.vid&&(t=t+"/(vid)/"+this.vid),null!==this.hash&&null!==this.id&&(t=t+"/(hash)/"+this.id+"_"+this.hash),t}},{key:"updateJSVars",value:function(t,e){var i=this.getVars(t),n=new XMLHttpRequest;n.open("POST",this.attributes.LHC_API.args.lhc_base_url+"/chat/updatejsvars"+this.getAppendVariables(),!0),n.setRequestHeader("Content-type","application/x-www-form-urlencoded"),n.send("data="+encodeURIComponent(this.JSON.stringify(i))),void 0!==e&&null===this.hash&&null===this.id&&e(i,this.getPrefillVars())}},{key:"setChatInformation",value:function(t,e){this.id=t.id,this.hash=t.hash,null===this.id||e||(this.hnh=Math.round(Date.now()/1e3))}}]),userSession}()},891:function(t,e,i){"use strict";i.r(e),i.d(e,{default:function(){return b}});var n=/iPhone/i,s=/iPod/i,r=/iPad/i,o=/\biOS-universal(?:.+)Mac\b/i,a=/\bAndroid(?:.+)Mobile\b/i,u=/Android/i,c=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,h=/Silk/i,l=/Windows Phone/i,d=/\bWindows(?:.+)ARM\b/i,p=/BlackBerry/i,m=/BB10/i,_=/Opera Mini/i,f=/\b(CriOS|Chrome)(?:.+)Mobile/i,g=/Mobile(?:.+)Firefox\b/i,v=function(t){return void 0!==t&&"MacIntel"===t.platform&&"number"==typeof t.maxTouchPoints&&t.maxTouchPoints>1&&"undefined"==typeof MSStream};function b(t){var e={userAgent:"",platform:"",maxTouchPoints:0};t||"undefined"==typeof navigator?"string"==typeof t?e.userAgent=t:t&&t.userAgent&&(e={userAgent:t.userAgent,platform:t.platform,maxTouchPoints:t.maxTouchPoints||0}):e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0};var i=e.userAgent,b=i.split("[FBAN");void 0!==b[1]&&(i=b[0]),void 0!==(b=i.split("Twitter"))[1]&&(i=b[0]);var w=function(t){return function(e){return e.test(t)}}(i),y={apple:{phone:w(n)&&!w(l),ipod:w(s),tablet:!w(n)&&(w(r)||v(e))&&!w(l),universal:w(o),device:(w(n)||w(s)||w(r)||w(o)||v(e))&&!w(l)},amazon:{phone:w(c),tablet:!w(c)&&w(h),device:w(c)||w(h)},android:{phone:!w(l)&&w(c)||!w(l)&&w(a),tablet:!w(l)&&!w(c)&&!w(a)&&(w(h)||w(u)),device:!w(l)&&(w(c)||w(h)||w(a)||w(u))||w(/\bokhttp\b/i)},windows:{phone:w(l),tablet:w(d),device:w(l)||w(d)},other:{blackberry:w(p),blackberry10:w(m),opera:w(_),firefox:w(g),chrome:w(f),device:w(p)||w(m)||w(_)||w(g)||w(f)},any:!1,phone:!1,tablet:!1};return y.any=y.apple.device||y.android.device||y.windows.device||y.other.device,y.phone=y.apple.phone||y.android.phone||y.windows.phone,y.tablet=y.apple.tablet||y.android.tablet||y.windows.tablet,y}},8259:function(t,e,i){"use strict";t.exports=i(2159)},3434:function(t,e,i){"use strict";var n=i(723);function s(){}var r=null,o={};function a(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("Promise constructor's argument is not a function");this._U=0,this._V=0,this._W=null,this._X=null,t!==s&&p(t,this)}function u(t,e){for(;3===t._V;)t=t._W;if(a._Y&&a._Y(t),0===t._V)return 0===t._U?(t._U=1,void(t._X=e)):1===t._U?(t._U=2,void(t._X=[t._X,e])):void t._X.push(e);!function(t,e){n((function(){var i=1===t._V?e.onFulfilled:e.onRejected;if(null!==i){var n=function(t,e){try{return t(e)}catch(t){return r=t,o}}(i,t._W);n===o?h(e.promise,r):c(e.promise,n)}else 1===t._V?c(e.promise,t._W):h(e.promise,t._W)}))}(t,e)}function c(t,e){if(e===t)return h(t,new TypeError("A promise cannot be resolved with itself."));if(e&&("object"==typeof e||"function"==typeof e)){var i=function(t){try{return t.then}catch(t){return r=t,o}}(e);if(i===o)return h(t,r);if(i===t.then&&e instanceof a)return t._V=3,t._W=e,void l(t);if("function"==typeof i)return void p(i.bind(e),t)}t._V=1,t._W=e,l(t)}function h(t,e){t._V=2,t._W=e,a._Z&&a._Z(t,e),l(t)}function l(t){if(1===t._U&&(u(t,t._X),t._X=null),2===t._U){for(var e=0;e "+e+") {","args = new Array(arguments.length + 1);","for (var i = 0; i < arguments.length; i++) {","args[i] = arguments[i];","}","}","return new Promise(function (rs, rj) {","var cb = "+r+";","var res;","switch (argLength) {",i.concat(["extra"]).map((function(t,e){return"case "+e+":res = fn.call("+["self"].concat(i.slice(0,e)).concat("cb").join(",")+");break;"})).join(""),"default:","args[argLength] = cb;","res = fn.apply(self, args);","}","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],o)(n,t)}(t)};var r="function (err, res) {if (err) { rj(err); } else { rs(res); }}";n.nodeify=function(t){return function(){var e=Array.prototype.slice.call(arguments),i="function"==typeof e[e.length-1]?e.pop():null,r=this;try{return t.apply(this,arguments).nodeify(i,r)}catch(t){if(null==i)return new n((function(e,i){i(t)}));s((function(){i.call(r,t)}))}}},n.prototype.nodeify=function(t,e){if("function"!=typeof t)return this;this.then((function(i){s((function(){t.call(e,null,i)}))}),(function(i){s((function(){t.call(e,i)}))}))}},3690:function(t,e,i){"use strict";var n=i(3434);t.exports=n,n.enableSynchronous=function(){n.prototype.isPending=function(){return 0==this.getState()},n.prototype.isFulfilled=function(){return 1==this.getState()},n.prototype.isRejected=function(){return 2==this.getState()},n.prototype.getValue=function(){if(3===this._V)return this._W.getValue();if(!this.isFulfilled())throw new Error("Cannot get a value of an unfulfilled promise.");return this._W},n.prototype.getReason=function(){if(3===this._V)return this._W.getReason();if(!this.isRejected())throw new Error("Cannot get a rejection reason of a non-rejected promise.");return this._W},n.prototype.getState=function(){return 3===this._V?this._W.getState():-1===this._V||-2===this._V?0:this._V}},n.disableSynchronous=function(){n.prototype.isPending=void 0,n.prototype.isFulfilled=void 0,n.prototype.isRejected=void 0,n.prototype.getValue=void 0,n.prototype.getReason=void 0,n.prototype.getState=void 0}},4795:function(t,e,i){var n;!function(e){"use strict";function s(){}var r=s.prototype,o=e.EventEmitter;function a(t,e){for(var i=t.length;i--;)if(t[i].listener===e)return i;return-1}function u(t){return function(){return this[t].apply(this,arguments)}}function c(t){return"function"==typeof t||t instanceof RegExp||!(!t||"object"!=typeof t)&&c(t.listener)}r.getListeners=function(t){var e,i,n=this._getEvents();if(t instanceof RegExp)for(i in e={},n)n.hasOwnProperty(i)&&t.test(i)&&(e[i]=n[i]);else e=n[t]||(n[t]=[]);return e},r.flattenListeners=function(t){var e,i=[];for(e=0;e0&&x.userSession.setupVarsMonitoring(t.js_vars,(function(t,e){L.sendChildEvent("jsVars",[t,e])}))),"widget"!=x.mode&&"popup"!=x.mode||x.viewHandler.init(x,t.ll),"api"==x.position&&"embed"==x.mode||x.mainWidget.init(x,t.ll),"widget"!=x.mode&&"popup"!=x.mode||D.cont.show(),x.loadcb&&x.loadcb(x),t.init_calls&&(x.init_calls=t.init_calls),x.proactive_interval=t.chat_ui.proactive_interval,t.disable_proactive||"widget"!=x.mode&&"popup"!=x.mode&&"embed"!=x.mode||void 0!==o.args.proactive&&!0!==o.args.proactive||null!==x.storageHandler.getSessionStorage(w+"_invt")||H(),x.init_calls.length>0&&x.init_calls.forEach((function(t){"nodeJSChat"==t.extension&&Promise.all([__webpack_require__.e(8),__webpack_require__.e(417)]).then(__webpack_require__.bind(__webpack_require__,9417)).then((function(e){e.nodeJSChat.setParams(t.params,x,L)}))})));else{if(t.terminate)return;x.userSession.setVID(t.vid),x.terminated=!0,m.removeById(x.prefixLowercase+"_container_v2"),m.removeById(x.prefixLowercase+"_status_widget_v2");var e=document.createElement("script");e.type=n.type,e.id=x.prefixLowercase+"-js-reload",e.async=!0,n.getAttribute("scope")&&e.setAttribute("scope",n.getAttribute("scope")),e.src=n.getAttribute("src")+"&r="+(new Date).getHours()+(new Date).getMinutes();var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(e,s)}})),x.eventEmitter.addListener("closeWidget",(function(t){x.widgetStatus.next(!1),L.sendChildEvent("closedWidget",[t])})),x.eventEmitter.addListener("sendChildEvent",(function(t){void 0!==t.boot?x.mainWidget.bootstrap():1==x.mainWidget.isLoaded&&1==i.loaded?L.sendChildEvent(t.cmd,[t.arg]):x.childCommands.push(t)})),x.eventEmitter.addListener("sendChildExtEvent",(function(t){void 0!==t.boot?x.mainWidget.bootstrap():1==x.mainWidget.isLoaded&&1==i.loaded?L.sendChildEvent(t.cmd,[t.arg],"lhc_load_ext"):x.childExtCommands.push(t)})),x.eventEmitter.addListener("toggleSound",(function(){var t=!x.toggleSound.value;x.toggleSound.next(t)})),x.eventEmitter.addListener("enableCookies",(function(){if(!0===f.checkCookiesSupport()){var t=x.userSession.getSessionAttributes();void 0!==t.hnh&&delete t.hnh,x.storageHandler.storeSessionInformation(t),void 0!==o.args.orig&&(x.mode=o.args.mode=o.args.orig.mode,o.args.proactive=o.args.orig.proactive,o.args.check_messages=o.args.orig.check_messages,m.makeRequest(o.args.lhc_base_url+x.lang+"widgetrestapi/settings",{params:P()},(function(t){x.eventEmitter.emitEvent("sendChildEvent",[{cmd:"attr_set",arg:{type:"attr_set",attr:["mode"],data:x.mode}}]),"widget"==x.mode&&null!==x.nh&&I(x.nh),"widget"!=x.mode&&"popup"!=x.mode||void 0!==o.args.proactive&&!0!==o.args.proactive||null!==x.storageHandler.getSessionStorage(w+"_invt")||H()})))}})),x.eventEmitter.addListener("endChatCookies",(function(t){(!1===x.kcw||t&&1==t.force)&&(x.userSession.setChatInformation({id:null,hash:null}),x.storageHandler.storeSessionInformation(x.userSession.getSessionAttributes()),x.proactive={})})),x.eventEmitter.addListener("endChat",(function(t){x.userSession.setChatInformation({id:null,hash:null}),x.storageHandler.storeSessionInformation(x.userSession.getSessionAttributes()),x.proactive={},"popup"==x.mode||t&&t.show_start||x.widgetStatus.next(!1),x.viewHandler&&(x.viewHandler.removeUnreadIndicator(),x.eventEmitter.emitEvent("hide_msg_snippet")),x.widgetDimesions.nextProperty("height_override",null),L.sendChildEvent("endedChat",[{sender:"endButton",survey:x.survey}]),("embed"==x.mode||t&&t.show_start)&&x.eventEmitter.emitEvent("showWidget",[{sender:"closeButton"}]),"popup"==x.mode&&x.popupWidget.freeup()})),x.eventEmitter.addListener("showWidget",(function(t){x.mainWidget.hideInvitation(),x.widgetStatus.next(!0),"popup"==x.mode?(x.popupWidget.init(x,L,t),x.viewHandler.removeUnreadIndicator(),x.mainWidget.hide()):void 0!==t&&void 0!==t.event&&t.event.preventDefault(),L.sendChildEvent("shownWidget",[{sender:"closeButton"}])})),x.eventEmitter.addListener("addTag",(function(t){x.tag=""!=x.tag?x.tag+","+t:t,x.eventEmitter.emitEvent("tagAdded")})),x.eventEmitter.addListener("addEvent",(function(t){x.events=t,x.eventEmitter.emitEvent("eventAdded")})),x.eventEmitter.addListener("addConversion",(function(t){x.conversion=t,x.eventEmitter.emitEvent("conversionAdded")})),x.eventEmitter.addListener("openPopup",(function(){x.popupWidget.init(x,L),x.viewHandler.removeUnreadIndicator(),L.sendChildEvent("shownWidget",[{sender:"closeButton"}]),x.widgetStatus.next(!1)})),x.eventEmitter.addListener("chatStarted",(function(t,e){x.widgetDimesions.nextProperty("height_override",null),"popup"===e&&!0!==x.kcw||x.userSession.setChatInformation(t,x.nh&&x.nh.ap),"popup"==e&&x.mainWidget.hide(),!1!==x.fresh||"popup"===e&&!0!==x.kcw||x.storageHandler.storeSessionInformation(x.userSession.getSessionAttributes())})),x.eventEmitter.addListener("subscribeEvent",(function(t){x.chatNotifications.setPublicKey(t.pk,x.eventEmitter),x.chatNotifications.sendNotification()})),x.eventEmitter.addListener("subcribedEvent",(function(t){L.sendChildEvent("subcribedEvent",[t])})),x.widgetStatus.subscribe((function(t){"popup"!==x.mode&&("embed"!==x.mode&&x.storageHandler.setSessionStorage(w+"_ws",t),L.sendChildEvent("widgetStatus",[t]))})),x.toggleSound.subscribe((function(t){x.storageHandler.setSessionStorage(w+"_sound",t)})),x.onlineStatus.subscribe((function(t){L.sendChildEvent("onlineStatus",[t])})),x.eventEmitter.addListener("screenshot",(function(t){m.makeScreenshot(x.staticJS.screenshot,t)})),x.eventEmitter.addListener("screenshare",(function(t){__webpack_require__.e(398).then(__webpack_require__.bind(__webpack_require__,7398)).then((function(e){e.screenShare.setParams(t||{},x,L)}))})),x.eventEmitter.addListener("location",(function(t){document.location=t})),x.eventEmitter.addListener("terminated",(function(t){x.terminated=!0,m.removeById(x.prefixLowercase+"_container_v2"),m.removeById(x.prefixLowercase+"_status_widget_v2")})),x.eventEmitter.addListener("showInvitation",(function(t){x.widgetDimesions.nextProperty("bottom_override",75),x.widgetDimesions.nextProperty("right_override",75),x.mainWidget.showInvitation()})),x.eventEmitter.addListener("hideAction",(function(t){x.mainWidget.hide()})),x.eventEmitter.addListener("showAction",(function(t){x.mainWidget.show()})),x.eventEmitter.addListener("zoomImage",(function(t){__webpack_require__.e(335).then(__webpack_require__.bind(__webpack_require__,2335)).then((function(e){e.zoomImage.setParams(t||{},x,L)}))})),x.eventEmitter.addListener("hideInvitation",(function(t){x.mainWidget.hideInvitation(),t.full?(x.eventEmitter.emitEvent("showWidget",[{sender:"closeButton"}]),x.eventEmitter.emitEvent("fullInvitation",[t])):x.eventEmitter.emitEvent("cancelInvitation",[])})),x.eventEmitter.addListener("msgSnippet",(function(t){if("widget"==x.mode&&!1===x.widgetStatus.value){if(t.full_widget)return void x.eventEmitter.emitEvent("showWidget",[{sender:"closeButton"}]);"api"==x.position&&x.viewHandler&&x.viewHandler.show(),__webpack_require__.e(213).then(__webpack_require__.bind(__webpack_require__,7213)).then((function(e){x.msgSnippet?x.msgSnippet.showSnippet(t,!0):(x.msgSnippet=new e.msgSnippetWidget(x.prefixLowercase),D.cont.elmDom.appendChild(x.msgSnippet.cont.constructUI(),!0),x.msgSnippet.init(x,t)),x.eventEmitter.emitEvent("unread_message",[{otm:1}])}))}})),x.eventEmitter.addListener("unread_message",(function(t){t&&t.msg_body&&!x.msgSnippet&&__webpack_require__.e(213).then(__webpack_require__.bind(__webpack_require__,7213)).then((function(e){x.msgSnippet||(x.msgSnippet=new e.msgSnippetWidget(x.prefixLowercase),D.cont.elmDom.appendChild(x.msgSnippet.cont.constructUI(),!0),x.msgSnippet.init(x,t))}))})),x.originalTitle=document.title,x.blinkInterval=null,x.eventEmitter.addListener("change_language",(function(t){x.lang=t.lng.replace("/","")+"/"})),x.eventEmitter.addListener("unread_message_title",(function(t){clearInterval(x.blinkInterval),0==t.status?x.blinkInterval=setInterval((function(){document.title=Math.round((new Date).getTime()/1e3)%2?"💬 "+x.originalTitle:x.originalTitle}),1e3):(x.focused=!0,document.title=x.originalTitle)})),x.eventEmitter.addListener("widgetHeight",(function(t){if(t.reset_height)return x.widgetDimesions.nextProperty("height_override",null),x.widgetDimesions.nextProperty("bottom_override",null),x.widgetDimesions.nextProperty("right_override",null),void x.widgetDimesions.nextProperty("width_override",null);if(t.force_height||t.force_width||t.force_bottom||t.force_right)return t.force_height&&x.widgetDimesions.nextProperty("height_override",t.force_height),t.force_width&&x.widgetDimesions.nextProperty("width_override",t.force_width),t.force_right&&x.widgetDimesions.nextProperty("right_override",t.force_right),void(t.force_bottom&&x.widgetDimesions.nextProperty("bottom_override",t.force_bottom));if("widget"==x.mode&&0==x.isMobile){var i=document,n=i.documentElement,s=i.getElementsByTagName("body")[0],r=e.innerHeight||n.clientHeight||s.clientHeight;parseInt(t.height)>x.widgetDimesions.value.height&&r>parseInt(t.height)?x.widgetDimesions.nextProperty("height_override",parseInt(t.height)):x.widgetDimesions.value.height_override&&x.widgetDimesions.value.height_override>r&&x.widgetDimesions.nextProperty("height_override",null)}}));var j=!1;try{j="serviceWorker"in navigator}catch(t){}if(!0===j)try{navigator.serviceWorker.addEventListener("message",(function(t){try{void 0!==t.data.lhc_ch&&void 0!==t.data.lhc_cid&&(x.widgetStatus.next(!0),"popup"==x.mode?(x.userSession.setChatInformation({id:t.data.lhc_cid,hash:t.data.lhc_ch}),x.eventEmitter.emitEvent("unread_message")):(L.sendChildEvent("shownWidget",[{sender:"closeButton"}]),L.sendChildEvent("reopenNotification",[{id:t.data.lhc_cid,hash:t.data.lhc_ch}])))}catch(t){if(!r)throw Error("lhc : "+t.message);r.log(t.message,"index.js",t.lineNumber||t.line,t.stack)}}))}catch(t){}var q=function(t){if(!0!==x.terminated&&"string"==typeof t.data&&!t.data.indexOf(x.prefixLowercase+"::")){var e=t.data.split("::");if(void 0!==t.origin&&"about:"!=t.origin){var n=t.origin.replace("http://","").replace("https://","").replace(/:(\d+)$/,"");if(n!==document.domain&&x.domain_lhc!==n&&"started"!==e[1]&&"isstarted"!==e[1])return}if("ready"==e[1]){L.sendReadyEvent("true"==e[2]),x.storageHandler.getSessionStorage(w+"_screenshare")&&x.eventEmitter.emitEvent("screenshare",[{auto_start:!0}]);var s=function(t){var e="focus"===t.type;x.focused=e,L.sendChildEvent("focus_changed",[{status:e}])};window.addEventListener("focus",s),window.addEventListener("blur",s),window.addEventListener("pageshow",s),window.addEventListener("pagehide",s),i.loaded=!0,L.sendChildEvent("ext_modules",[x.staticJS.ex_cb_js]),x.childExtCommands.forEach((function(t){L.sendChildEvent(t.cmd,[t.arg],"lhc_load_ext")})),x.childCommands.forEach((function(t){L.sendChildEvent(t.cmd,[t.arg])})),null!==x.react_attr&&x.react_attr.forEach((function(t){L.sendChildEvent("attr_set",[{type:"attr_set",attr:t.k,data:t.v}])}))}else"ready_popup"==e[1]?x.popupWidget.sendParameters(L):"isstarted"==e[1]?x.eventEmitter.emitEvent("terminated",[]):"started"==e[1]?x.hide_parent?x.eventEmitter.emitEvent("terminated",[]):t.source.postMessage("lhc::isstarted","*"):x.eventEmitter.emitEvent(e[1],JSON.parse(e[2]))}};window.addEventListener?window.addEventListener("message",q,!1):window.attachEvent?window.attachEvent("onmessage",q):document.attachEvent&&document.attachEvent("onmessage",q)},c=function(){!0!==i.ready&&(document.body&&(i.ready=!0),i.init=u,o.args.before_init&&o.args.before_init(i),o.args.manual_init||u())},h=__webpack_require__(593).U;c(),!i.ready||(h.listen(document,"DOMContentLoaded",(function(){c()}),"domloaded"),h.listen(document,"readystatechange",(function(){("complete"===document.readyState||"interactive"===document.readyState&&document.body)&&c()}),"domstatechange"),h.listen(e,"load",(function(){c()}),"windowload"))}.call(this,e["$_"+s],e[s+"_API"])}catch(t){if(!r)throw Error("lhc : "+t.message);r.log(t.message,"index.js",t.lineNumber||t.line,t.stack)}}}(window)}(),this.LiveHelperChat=__webpack_exports__.LiveHelperChatDefault})(); +(function(){var __webpack_modules__={9272:function(t,e,i){"use strict";var n=i(723),s=[],r=[],o=n.makeRequestCallFromTimer((function(){if(r.length)throw r.shift()}));function a(t){var e;(e=s.length?s.pop():new u).task=t,n(e)}function u(){this.task=null}t.exports=a,u.prototype.call=function(){try{this.task.call()}catch(t){a.onerror?a.onerror(t):(r.push(t),o())}finally{this.task=null,s[s.length]=this}}},723:function(t,e,i){"use strict";function n(t){r.length||s(),r[r.length]=t}t.exports=n;var s,r=[],o=0;function a(){for(;o1024){for(var e=0,i=r.length-o;e',null===this.cont.constructUIIframe("",this.attributes.staticJS.dir,this.attributes.staticJS.cl,this.attributes.hhtml))return this.isLoaded=!0,null;this.cont.elmDom.className=!0===this.attributes.isMobile?"lhc-mobile lhc-mode-"+this.attributes.mode:"lhc-desktop lhc-mode-"+this.attributes.mode,this.attributes.cont_ss&&(this.originalCSS=this.cont.elmDom.style.cssText,this.cont.elmDom.style.cssText+=this.attributes.cont_ss)}},{key:"init",value:function(t,e){var i=this;if(this.attributes=t,null===this.makeContent())return null;!this.attributes.userSession.getSessionAttributes().id&&e||this.bootstrap(),this.toggleVisibilityWrap=function(t){i.toggleVisibility(t)},t.widgetStatus.subscribe(this.toggleVisibilityWrap),this.monitorDimensionsWrap=function(t){i.monitorDimensions(t)},"px"==t.widgetDimesions.valueInternal.units&&0==this.attributes.isMobile&&"embed"!=this.attributes.mode&&"full_height_right"!=this.attributes.position_placement&&"full_height_left"!=this.attributes.position_placement&&(this.screenAttributesUpdate=function(){window.innerHeight0&&this.attributes.staticJS.ex_js.forEach((function(e){t.cont.insertJSFile(e,!1)})))}},{key:"toggleVisibility",value:function(t){0==t?this.hide():this.show()}},{key:"monitorDimensions",value:function(t){this.width=t.width_override||t.width_soverride||t.width,this.height=t.height_override||t.height_soverride||t.height,this.bottom=t.bottom_override?t.bottom_override+(t.wbottom?t.wbottom:0):30+(!0===this.attributes.clinst?70:0)+(t.wbottom?t.wbottom:0),this.right=t.right_override?t.right_override+(t.wright_inv?t.wright_inv:0):30+(t.wright?t.wright:0),this.units=t.width_override||t.height_override||t.bottom_override||t.right_override?"px":t.units,this.resize(),this.bottom_override=!!t.bottom_override}},{key:"hide",value:function(){this.cont.hide()}},{key:"hideInvitation",value:function(){this.attributes.cont_ss&&(this.cont.elmDom.style.cssText+=this.attributes.cont_ss)}},{key:"showInvitation",value:function(){this.attributes.cont_ss&&(this.cont.elmDom.style.cssText=this.originalCSS),this.show()}},{key:"show",value:function(){!1===this.isLoaded&&this.bootstrap(),this.cont.show()}}]),t}()},5962:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{f:function(){return mainWidgetPopup}});var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5671),_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(3144),mainWidgetPopup=function(){function mainWidgetPopup(){(0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__.Z)(this,mainWidgetPopup),this.attributes={},this.width=null,this.height=null,this.units="px",this.freeup()}return(0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__.Z)(mainWidgetPopup,[{key:"freeup",value:function(){this.cont={}}},{key:"parseOptions",value:function(){var t=new Array,e="";if(void 0!==this.attributes){if(void 0!==this.attributes.LHCChatOptions.attr&&this.attributes.LHCChatOptions.attr.length>0)for(var i in this.attributes.LHCChatOptions.attr)void 0!==this.attributes.LHCChatOptions.attr[i]&&void 0!==this.attributes.LHCChatOptions.attr[i].type&&t.push("name[]="+encodeURIComponent(this.attributes.LHCChatOptions.attr[i].name)+"&encattr[]="+(void 0!==this.attributes.LHCChatOptions.attr[i].encrypted&&1==this.attributes.LHCChatOptions.attr[i].encrypted?"t":"f")+"&value[]="+encodeURIComponent(this.attributes.LHCChatOptions.attr[i].value)+"&type[]="+encodeURIComponent(this.attributes.LHCChatOptions.attr[i].type)+"&size[]="+encodeURIComponent(this.attributes.LHCChatOptions.attr[i].size)+"&req[]="+(void 0!==this.attributes.LHCChatOptions.attr[i].req&&1==this.attributes.LHCChatOptions.attr[i].req?"t":"f")+"&sh[]="+(void 0===this.attributes.LHCChatOptions.attr[i].show||"on"!=this.attributes.LHCChatOptions.attr[i].show&&"off"!=this.attributes.LHCChatOptions.attr[i].show?"b":this.attributes.LHCChatOptions.attr[i].show));if(void 0!==this.attributes.LHCChatOptions.attr_prefill&&this.attributes.LHCChatOptions.attr_prefill.length>0)for(var i in this.attributes.LHCChatOptions.attr_prefill)void 0!==this.attributes.LHCChatOptions.attr_prefill[i]&&void 0!==this.attributes.LHCChatOptions.attr_prefill[i].name&&t.push("prefill["+this.attributes.LHCChatOptions.attr_prefill[i].name+"]="+encodeURIComponent(this.attributes.LHCChatOptions.attr_prefill[i].value));if(void 0!==this.attributes.LHCChatOptions.attr_prefill_admin&&this.attributes.LHCChatOptions.attr_prefill_admin.length>0)for(var i in this.attributes.LHCChatOptions.attr_prefill_admin)void 0!==this.attributes.LHCChatOptions.attr_prefill_admin[i]&&t.push("value_items_admin["+this.attributes.LHCChatOptions.attr_prefill_admin[i].index+"]="+encodeURIComponent(this.attributes.LHCChatOptions.attr_prefill_admin[i].value));t.length>0&&(e="&"+t.join("&"))}return e}},{key:"init",value:function(t,e,i){if(this.cont.elementReferrerPopup&&!1===this.cont.elementReferrerPopup.closed)void 0!==i&&"undefined"!==i.event&&i.event.preventDefault(),this.cont.elementReferrerPopup.focus();else{this.attributes=t;var n={static_chat:this.attributes.userSession.getSessionAttributes()},s="";n.static_chat.id&&n.static_chat.hash&&(s=s+"/(id)/"+n.static_chat.id+"/(hash)/"+n.static_chat.hash),null!==this.attributes.theme&&(s=s+"/(theme)/"+this.attributes.theme),null!==n.static_chat.vid&&!0===this.attributes.storageHandler.cookieEnabled&&(s=s+"/(vid)/"+n.static_chat.vid),this.attributes.isMobile&&(s+="/(mobile)/true"),this.attributes.department.length>0&&(s=s+"/(department)/"+this.attributes.department.join("/")),""!=this.attributes.identifier&&(s=s+"/(identifier)/"+this.attributes.identifier),this.attributes.operator&&(s=s+"/(operator)/"+this.attributes.operator),this.attributes.survey&&(s=s+"/(survey)/"+this.attributes.survey),this.attributes.bot_id&&(s=s+"/(bot)/"+this.attributes.bot_id),this.attributes.trigger_id&&(s=s+"/(trigger)/"+this.attributes.trigger_id),this.attributes.subject_id&&(s=s+"/(subject)/"+this.attributes.subject_id),this.attributes.priority&&(s=s+"/(priority)/"+this.attributes.priority),"lhc"!=this.attributes.prefixLowercase&&(s=s+"/(scope)/"+this.attributes.prefixLowercase),s=s+"/(sound)/"+(1==this.attributes.toggleSound.value?1:0),this.attributes.proactive.invitation&&(s=s+"/(inv)/"+this.attributes.proactive.invitation,"popup"==this.attributes.mode&&this.attributes.storageHandler.setSessionStorage(this.attributes.prefixStorage+"_invt",1));var r=this.attributes.storageHandler.getLocalStorage(this.attributes.prefixStorage+"_dfs");r&&(s=s+"/(fs)/"+parseInt(r)),!0===this.attributes.leaveMessage&&(s+="/(leaveamessage)/true"),s=null!==this.attributes.userSession.getSessionReferrer()&&""!=this.attributes.userSession.getSessionReferrer()?s+"?ses_ref="+this.attributes.userSession.getSessionReferrer()+this.parseOptions():s+"?"+this.parseOptions();var o=void 0!==window.screenLeft?window.screenLeft:window.screenX,a=void 0!==window.screenTop?window.screenTop:window.screenY,u=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,c=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height,h=u/window.screen.availWidth,l=(u-parseInt(this.attributes.popupDimesnions.pwidth))/2/h+o,d=(c-parseInt(this.attributes.popupDimesnions.pheight))/2/h+a,p="scrollbars=yes,menubar=1,resizable=1,width="+this.attributes.popupDimesnions.pwidth+",height="+this.attributes.popupDimesnions.pheight+",top="+d+",left="+l,m=window.open("",this.attributes.prefixStorage+"_popup_v2",p),_=!1,f=!1;try{!m||m.closed||void 0===m.closed||"about:blank"===m.location.href?(m=this.cont.elementReferrerPopup=window.open(this.attributes.base_url+this.attributes.lang+"chat/start"+s,this.attributes.prefixStorage+"_popup_v2",p),f=!0):_=!0}catch(t){_=!0}if(!m||m.closed||void 0===m.closed)try{this.attributes.viewHandler.cont.getElementById("status-icon").href=this.attributes.base_url+this.attributes.lang+"chat/start"+s}catch(t){alert("You have disabled popups!")}else 1==f?(void 0!==e&&!1===this.attributes.kcw&&e.sendChildEvent("endedChat",[{sender:"endButton"}]),void 0!==i&&"undefined"!==i.event&&i.event.preventDefault()):!0===_&&(this.cont.elementReferrerPopup=m,m.focus(),void 0!==i&&"undefined"!==i.event&&i.event.preventDefault())}}},{key:"sendParameters",value:function sendParameters(chatEvents){if(this.cont.elementReferrerPopup&&!1===this.cont.elementReferrerPopup.closed){var js_vars=this.attributes.jsVars.value,js_args={},currentVar=null;for(var index in js_vars)try{currentVar=eval(js_vars[index].var),null!=currentVar&&""!==currentVar&&(js_args[js_vars[index].id]=currentVar)}catch(t){}chatEvents.sendChildEvent("jsVars",[js_args])}}}]),mainWidgetPopup}()},3678:function(t,e,i){"use strict";i.d(e,{T:function(){return a}});var n=i(5671),s=i(3144),r=(i(7761),i(3031)),o=i(2137),a=function(){function t(e){(0,n.Z)(this,t),this.attributes={},this.controlMode=!1,this.showDelay=null,this.statusDelayProcessed=!1,this.cont=new r.a((e||"lhc")+"_status_widget_v2",o.a.getAbstractStyle({zindex:"2147483640",width:"95px",height:"95px",position:"fixed",display:"none",maxheight:"95px",maxwidth:"95px",minheight:"95px",minwidth:"95px"}),null,"iframe"),this.loadStatus={main:!1,theme:!1,font:!0,widget:!1,shidden:!1},this.lload=!1,this.unread_counter=0}return(0,s.Z)(t,[{key:"toggleOfflineIcon",value:function(t){var e=this.cont.getElementById("status-icon");t?(this.attributes.leaveMessage||this.show(),o.a.removeClass(e,"offline-status")):this.attributes.leaveMessage?o.a.addClass(e,"offline-status"):this.hide()}},{key:"checkLoadStatus",value:function(){1==this.loadStatus.theme&&1==this.loadStatus.main&&1==this.loadStatus.font&&1==this.loadStatus.widget&&0==this.loadStatus.shidden&&(this.cont.getElementById("lhc_status_container").style.display="",this.attributes.sload.next(!0))}},{key:"init",value:function(t,e){var i=this;this.attributes=t;var n={bottom:10+this.attributes.widgetDimesions.value.sbottom+"px",right:10+this.attributes.widgetDimesions.value.sright+"px"};if("bottom_left"==t.position_placement||"full_height_left"==t.position_placement?n={bottom:10+this.attributes.widgetDimesions.value.sbottom+"px",left:10+this.attributes.widgetDimesions.value.sright+"px"}:"middle_right"==t.position_placement?n={bottom:"calc(50% - 45px)",right:10+this.attributes.widgetDimesions.value.sright+"px"}:"middle_left"==t.position_placement&&(n={bottom:"calc(50% - 45px)",left:10+this.attributes.widgetDimesions.value.sright+"px"}),this.cont.massRestyle(n),this.cont.tmpl='',null===this.cont.constructUIIframe(""))return null;this.cont.elmDom.className=!0===this.attributes.isMobile?"lhc-mobile":"lhc-desktop";var s=this;this.lload=!!e,!0===this.lload?this.loadStatus.widget=!0:t.wloaded.subscribe((function(t){t&&(i.loadStatus.widget=!0,i.checkLoadStatus())})),t.shidden.subscribe((function(t){t?i.attributes.userSession.getSessionAttributes().id||1==i.attributes.widgetStatus.value||(i.loadStatus.shidden=!0,i.hide()):(i.loadStatus.shidden=!1,i.checkLoadStatus(),i.show())})),this.cont.attachUserEventListener("click",(function(e){!1===t.onlineStatus.value&&t.eventEmitter.emitEvent("offlineClickAction"),!1===t.onlineStatus.value&&null!==t.offline_redirect?(document.location=t.offline_redirect,e.preventDefault()):1==s.controlMode?(t.eventEmitter.emitEvent("closeWidget",[{sender:"closeButton",mode:"control"}]),e.preventDefault()):(t.eventEmitter.emitEvent("showWidget",[{event:e}]),t.eventEmitter.emitEvent("clickAction"))}),"lhc_status_container","minifiedclick"),this.attributes.staticJS.fontCSS&&this.cont.insertCssRemoteFile({crossOrigin:"anonymous",href:this.attributes.staticJS.fontCSS}),this.attributes.staticJS.font_status&&this.cont.insertCssRemoteFile({onload:function(){i.loadStatus.font=!0,i.checkLoadStatus()},as:"font",rel:"preload",type:"font/woff",crossOrigin:"anonymous",href:this.attributes.staticJS.font_status}),this.attributes.theme?(this.loadStatus.theme=!1,this.cont.insertCssRemoteFile({onload:function(){i.loadStatus.theme=!0,i.checkLoadStatus()},id:"lhc-theme-status",crossOrigin:"anonymous",href:this.attributes.LHC_API.args.lhc_base_url+"/widgetrestapi/themestatus/"+this.attributes.theme+"?v="+this.attributes.theme_v},!0)):this.loadStatus.theme=!0,this.cont.insertCssRemoteFile({onload:function(){i.loadStatus.main=!0,i.checkLoadStatus()},crossOrigin:"anonymous",href:this.attributes.staticJS.status_css}),this.attributes.staticJS.page_css&&o.a.insertCssRemoteFile({crossOrigin:"anonymous",id:"lhc-theme-page",href:this.attributes.LHC_API.args.lhc_base_url+"/widgetrestapi/themepage/"+this.attributes.theme+"?v="+this.attributes.theme_v}),t.onlineStatus.subscribe((function(t){return i.toggleOfflineIcon(t)})),t.widgetStatus.subscribe((function(t){if("popup"!==i.attributes.mode){var e=i.attributes.userSession.getSessionAttributes();1==t||!i.attributes.leaveMessage&&0==i.attributes.onlineStatus.value&&!e.id?i.hide():i.show()}})),"popup"===this.attributes.mode&&this.show();var r=t.storageHandler.getSessionStorage(this.attributes.prefixStorage+"_unr");t.eventEmitter.addListener("unread_message",(function(t){var e=t&&t.otm;e&&(e=parseInt(e),e+=i.unread_counter),i.attributes.unread_counter.next(e),i.showUnreadIndicator(e)})),null!==r&&(t.eventEmitter.emitEvent("unread_message",[{otm:r,init:!0}]),null===r||isNaN(r)||(this.unread_counter=parseInt(r))),t.eventEmitter.addListener("reloadWidget",(function(){i.attributes.theme>0&&i.cont.insertCssRemoteFile({crossOrigin:"anonymous",id:"lhc-theme-status",href:i.attributes.LHC_API.args.lhc_base_url+"/widgetrestapi/themestatus/"+i.attributes.theme+"?v="+Date.now()},!0),o.a.insertCssRemoteFile({crossOrigin:"anonymous",id:"lhc-theme-page",href:i.attributes.LHC_API.args.lhc_base_url+"/widgetrestapi/themepage/"+i.attributes.theme+"?v="+Date.now()})}))}},{key:"hide",value:function(){if(this.removeUnreadIndicator(),!0===this.attributes.clinst&&0==this.attributes.isMobile){var t=this.attributes.userSession.getSessionAttributes();if((1==this.attributes.leaveMessage||1==this.attributes.onlineStatus.value||t.id)&&(("api"!=this.attributes.position||"api"==this.attributes.position&&!0!==this.attributes.hide_status&&(t.id&&t.hash||1==this.attributes.widgetStatus.value))&&(!0!==this.attributes.hide_status||t.id&&t.hash)&&this.cont.show(),!0!==this.attributes.hide_status||t.id&&t.hash||1==this.attributes.widgetStatus.value)){if(1==this.attributes.widgetStatus.value){this.controlMode=!0;var e=this.cont.getElementById("status-icon");o.a.addClass(e,"close-status")}return}}clearTimeout(this.showDelay),this.statusDelayProcessed=!0,this.cont.hide()}},{key:"showUnreadIndicator",value:function(t){var e=t||"!",i=this.cont.getElementById("lhc_status_container");o.a.addClass(i,"has-uread-message");var n=this.cont.getElementById("unread-msg-number");n&&(n.innerText=e),this.attributes.storageHandler&&this.attributes.storageHandler.setSessionStorage(this.attributes.prefixStorage+"_unr",e)}},{key:"removeUnreadIndicator",value:function(){var t=this.cont.getElementById("lhc_status_container");o.a.removeClass(t,"has-uread-message"),this.attributes.storageHandler&&this.attributes.storageHandler.removeSessionStorage(this.attributes.prefixStorage+"_unr"),this.attributes.eventEmitter.emitEvent("remove_unread_indicator",[]),this.attributes.unread_counter.next(0),this.unread_counter=0}},{key:"show",value:function(){var t=this;if(!1===this.attributes.hideOffline){var e=this.attributes.userSession.getSessionAttributes();if(!0===this.attributes.clinst&&0==this.attributes.isMobile&&1!=this.attributes.widgetStatus.value){var i=this.cont.getElementById("status-icon");o.a.removeClass(i,"close-status"),this.controlMode=!1}if("api"!=this.attributes.position||"api"==this.attributes.position&&!0!==this.attributes.hide_status&&e.id&&e.hash){clearTimeout(this.showDelay);var n=this.attributes.userSession.getSessionAttributes();this.showDelay=setTimeout((function(){t.cont.show(),t.statusDelayProcessed=!0}),1==this.statusDelayProcessed||n.id&&n.hash?0:this.attributes.status_delay)}else!0===this.attributes.clinst&&1!=this.attributes.widgetStatus.value&&this.cont.hide()}else this.cont.hide()}}]),t}()},6349:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{Z:function(){return chatEventsHandler}});var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5671),_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(3144),chatEventsHandler=function(){function chatEventsHandler(t){(0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__.Z)(this,chatEventsHandler),this.attributes=t}return(0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__.Z)(chatEventsHandler,[{key:"getJSVarsValues",value:function getJSVarsValues(jsVars){var js_args={};if(jsVars.length>0){var currentVar=null;for(var index in jsVars)try{currentVar=eval("window."+jsVars[index].var),null!=currentVar&&""!==currentVar&&(js_args[jsVars[index].id]=currentVar)}catch(t){}return js_args}return js_args}},{key:"getInitAttributes",value:function(){var t={onlineStatus:this.attributes.onlineStatus.value,toggleSound:this.attributes.toggleSound.value,widgetStatus:this.attributes.widgetStatus.value,jsVars:this.getJSVarsValues(this.attributes.jsVars.value),isMobile:this.attributes.isMobile,department:this.attributes.department,product:this.attributes.product,theme:this.attributes.theme,theme_v:this.attributes.theme_v,base_url:this.attributes.base_url,mode:this.attributes.mode,captcha:this.attributes.captcha,staticJS:this.attributes.staticJS,static_chat:this.attributes.userSession.getSessionAttributes(),domain_lhc:this.attributes.domain_lhc,leave_message:this.attributes.leaveMessage,scope_prefix:this.attributes.prefixLowercase};if(1==this.attributes.fresh&&(t.static_chat.id&&delete t.static_chat.id,t.static_chat.hash&&delete t.static_chat.hash),""!=this.attributes.bot_id&&(t.bot_id=this.attributes.bot_id),""!=this.attributes.trigger_id&&(t.trigger_id=this.attributes.trigger_id),""!=this.attributes.subject_id&&(t.subject_id=this.attributes.subject_id),""!=this.attributes.priority&&(t.priority=this.attributes.priority),null!==this.attributes.phash&&(t.phash=this.attributes.phash),null!==this.attributes.survey&&(t.survey=this.attributes.survey),null!==this.attributes.pvhash&&(t.pvhash=this.attributes.pvhash),null!==this.attributes.operator&&(t.operator=this.attributes.operator),null!==this.attributes.profile_pic&&(t.profile_pic=this.attributes.profile_pic),""!=this.attributes.lang&&(t.lang=this.attributes.lang),this.attributes.proactive.invitation&&(t.proactive=this.attributes.proactive),null!==this.attributes.dep_default&&(t.dep_default=this.attributes.dep_default),this.attributes.LHCChatOptions&&this.attributes.LHCChatOptions.attr){var e=this.attributes.LHCChatOptions.attr,i=[];e.forEach((function(t,e){i.push({show:void 0===t.show||"on"!=t.show&&"off"!=t.show?"b":t.show,value:t.value,index:e,name:t.name,class:"form-control form-control-sm",type:t.type,identifier:"additional_"+e,placeholder:"",width:t.size||6,encrypted:t.encrypted||!1,required:t.req||!1,label:t.name})})),t.CUSTOM_FIELDS=i}if(this.attributes.LHCChatOptions&&this.attributes.LHCChatOptions.attr_prefill){e=this.attributes.LHCChatOptions.attr_prefill;var n=[];e.forEach((function(t){"email"==t.name?n.push({Email:t.value}):"username"==t.name?n.push({Username:t.value}):"phone"==t.name?n.push({Phone:t.value}):"question"==t.name&&n.push({Question:t.value})})),n=n.concat(this.attributes.userSession.getPrefillVars()),t.attr_prefill=n}else t.attr_prefill=this.attributes.userSession.getPrefillVars();if(this.attributes.LHCChatOptions&&this.attributes.LHCChatOptions.attr_prefill_admin){e=this.attributes.LHCChatOptions.attr_prefill_admin;var s=[];e.forEach((function(t){s.push({value:t.value,index:t.index})})),t.attr_prefill_admin=s}return null!==this.attributes.userSession.getSessionReferrer()&&(t.ses_ref=this.attributes.userSession.getSessionReferrer()),t}},{key:"sendChildCommand",value:function(t){this.attributes.mainWidget.cont.elmDom&&this.attributes.mainWidget.cont.elmDom.contentWindow&&this.attributes.mainWidget.cont.elmDom.contentWindow.postMessage(t,this.attributes.isIE?"*":"/"),this.attributes.popupWidget.cont.elementReferrerPopup&&!1===this.attributes.popupWidget.cont.elementReferrerPopup.closed&&this.attributes.popupWidget.cont.elementReferrerPopup.postMessage(t,"*")}},{key:"sendReadyEvent",value:function(t){var e=this.getInitAttributes();!0!==t&&this.attributes.mainWidget.cont.elmDom&&this.attributes.mainWidget.cont.elmDom.contentWindow&&this.attributes.mainWidget.cont.elmDom.contentWindow.postMessage("lhc_init:"+JSON.stringify(e),this.attributes.isIE?"*":"/")}},{key:"sendChildEvent",value:function(t,e,i){void 0===i&&(i="lhc_event"),this.sendChildCommand(i+":"+t+"::"+JSON.stringify(e))}}]),chatEventsHandler}()},593:function(t,e,i){"use strict";i.d(e,{U:function(){return r}});var n=i(5671),s=i(3144),r=new(function(){function t(){(0,n.Z)(this,t),this.events={}}return(0,s.Z)(t,[{key:"attachEvent",value:function(t,e,i){var n=this,s=function(e){i.call(t,n.getEvent(e))};return t.attachEvent("on"+e,s),s}},{key:"unlisten",value:function(t){var e;this.events[t]&&(e=this.events[t],this.events[t]=null,this.removeEventHandler(e.element,e.eventName,e.eventListener))}},{key:"listen",value:function(t,e,i,n){var s;if(n){if(this.events[n]&&(s=this.events[n],this.events[n]=null,this.removeEventHandler(s.element,s.eventName,s.eventListener)),t.addEventListener)t.addEventListener(e,i,!1);else{if(!document.attachEvent)return null;i=this.attachEvent(t,e,i)}return this.events[n]={element:t,eventName:e,eventListener:i},i}}},{key:"removeEventHandler",value:function(t,e,i){document.removeEventListener?t.removeEventListener(e,i,!1):t.detachEvent("on"+e,i)}},{key:"getEvent",value:function(t){var e=t||_this.event;if(!e)for(t=this.getEvent.caller;t&&(!(e=t.arguments[0])||Event!=e.constructor);)t=t.caller;return e}}]),t}())},6419:function(t,e,i){"use strict";i.d(e,{h:function(){return r}});var n=i(5671),s=i(3144),r=function(){function t(e,i){(0,n.Z)(this,t),this.valueInternal=e,this.listeners=[],this.params=i||{}}return(0,s.Z)(t,[{key:"value",get:function(){return this.valueInternal},set:function(t){this.next(t)}},{key:"next",value:function(t){this.valueInternal=t,this.callListeners()}},{key:"nextPropertySilent",value:function(t,e){this.valueInternal[t]=e}},{key:"nextProperty",value:function(t,e){this.valueInternal[t]=e,this.callListeners()}},{key:"callListeners",value:function(){var t=this;this.listeners.forEach((function(e){e&&"function"==typeof e&&e(t.valueInternal)}))}},{key:"unsubscribe",value:function(t){-1!==this.listeners.indexOf(t)&&this.listeners.splice(this.listeners.indexOf(t),1)}},{key:"subscribe",value:function(t){this.listeners.push(t),this.params.ignore_sub||t(this.valueInternal)}}]),t}()},5545:function(t,e,i){"use strict";i.d(e,{Q:function(){return r}});var n=i(5671),s=i(3144),r=function(){function t(e,i,s,r){(0,n.Z)(this,t),this.window=e,this.cookieEnabled=!1,this.cookiesSupportChecked=!1,1==r&&this.checkCookiesSupport(),this.domain=i,this.secureCookie=!1,this.cookiePerPage=!1,this.prefix=s||"lhc"}return(0,s.Z)(t,[{key:"checkCookiesSupport",value:function(){if(!0===this.cookiesSupportChecked)return this.cookieEnabled;this.cookiesSupportChecked=!0;try{this.hasSessionStorage=!!this.window.sessionStorage}catch(t){this.hasSessionStorage=!1}try{this.hasLocalStorage=!!this.window.localStorage}catch(t){this.hasLocalStorage=!1}try{document.cookie="cookietest=1",this.cookieEnabled=-1!==document.cookie.indexOf("cookietest="),document.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT"}catch(t){}return this.cookieEnabled}},{key:"setCookieDomain",value:function(t){this.domain=t}},{key:"setCookiePerPage",value:function(t){this.cookiePerPage=t}},{key:"getCookieDomain",value:function(){return this.domain?"."+this.domain:null}},{key:"setSecureCookie",value:function(t){this.secureCookie=t}},{key:"setHTTPCookie",value:function(t,e,i,n){if(!1!==this.cookieEnabled){var s="";i||((i=new Date).setTime(i.getTime()+15552e6),s="; expires="+i.toGMTString()),document.cookie=t+"="+e+s+(!1===this.cookiePerPage?"; path=/":!0===this.cookiePerPage?"":"; path="+this.cookiePerPage)+(this.secureCookie?";secure":"")+(n?";domain="+n:"")+";SameSite=Lax"}}},{key:"getHTTPCookie",value:function(t){if(!1===this.cookieEnabled)return[];var e,i,n=[],s=t+"=",r=document.cookie.split(";");for(t=0,e=r.length;t0){var e=this.getVars();for(var i in this.jsVars)if(this.jsVars[i].type&&e[this.jsVars[i].id]){var n={};n[this.jsVars[i].type]=e[this.jsVars[i].id],t.push(n)}}return t}},{key:"getVars",value:function getVars(){if(this.jsVars.length>0){var js_args={},currentVar=null;for(var index in this.jsVars)try{currentVar=-1!==this.jsVars[index].var.indexOf("lhc_var.")?this.attributes.lhc_var[this.jsVars[index].var.replace("lhc_var.","")]||null:eval(this.jsVars[index].var),null!=currentVar&&""!==currentVar&&(js_args[this.jsVars[index].id]=currentVar)}catch(t){}return js_args}return null}},{key:"getAppendVariables",value:function(){var t="";return null!==this.vid&&(t=t+"/(vid)/"+this.vid),null!==this.hash&&null!==this.id&&(t=t+"/(hash)/"+this.id+"_"+this.hash),t}},{key:"updateJSVars",value:function(t,e){var i=this.getVars(t),n=new XMLHttpRequest;n.open("POST",this.attributes.LHC_API.args.lhc_base_url+"/chat/updatejsvars"+this.getAppendVariables(),!0),n.setRequestHeader("Content-type","application/x-www-form-urlencoded"),n.send("data="+encodeURIComponent(this.JSON.stringify(i))),void 0!==e&&null===this.hash&&null===this.id&&e(i,this.getPrefillVars())}},{key:"setChatInformation",value:function(t,e){this.id=t.id,this.hash=t.hash,null===this.id||e||(this.hnh=Math.round(Date.now()/1e3))}}]),userSession}()},891:function(t,e,i){"use strict";i.r(e),i.d(e,{default:function(){return b}});var n=/iPhone/i,s=/iPod/i,r=/iPad/i,o=/\biOS-universal(?:.+)Mac\b/i,a=/\bAndroid(?:.+)Mobile\b/i,u=/Android/i,c=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,h=/Silk/i,l=/Windows Phone/i,d=/\bWindows(?:.+)ARM\b/i,p=/BlackBerry/i,m=/BB10/i,_=/Opera Mini/i,f=/\b(CriOS|Chrome)(?:.+)Mobile/i,g=/Mobile(?:.+)Firefox\b/i,v=function(t){return void 0!==t&&"MacIntel"===t.platform&&"number"==typeof t.maxTouchPoints&&t.maxTouchPoints>1&&"undefined"==typeof MSStream};function b(t){var e={userAgent:"",platform:"",maxTouchPoints:0};t||"undefined"==typeof navigator?"string"==typeof t?e.userAgent=t:t&&t.userAgent&&(e={userAgent:t.userAgent,platform:t.platform,maxTouchPoints:t.maxTouchPoints||0}):e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0};var i=e.userAgent,b=i.split("[FBAN");void 0!==b[1]&&(i=b[0]),void 0!==(b=i.split("Twitter"))[1]&&(i=b[0]);var w=function(t){return function(e){return e.test(t)}}(i),y={apple:{phone:w(n)&&!w(l),ipod:w(s),tablet:!w(n)&&(w(r)||v(e))&&!w(l),universal:w(o),device:(w(n)||w(s)||w(r)||w(o)||v(e))&&!w(l)},amazon:{phone:w(c),tablet:!w(c)&&w(h),device:w(c)||w(h)},android:{phone:!w(l)&&w(c)||!w(l)&&w(a),tablet:!w(l)&&!w(c)&&!w(a)&&(w(h)||w(u)),device:!w(l)&&(w(c)||w(h)||w(a)||w(u))||w(/\bokhttp\b/i)},windows:{phone:w(l),tablet:w(d),device:w(l)||w(d)},other:{blackberry:w(p),blackberry10:w(m),opera:w(_),firefox:w(g),chrome:w(f),device:w(p)||w(m)||w(_)||w(g)||w(f)},any:!1,phone:!1,tablet:!1};return y.any=y.apple.device||y.android.device||y.windows.device||y.other.device,y.phone=y.apple.phone||y.android.phone||y.windows.phone,y.tablet=y.apple.tablet||y.android.tablet||y.windows.tablet,y}},8259:function(t,e,i){"use strict";t.exports=i(2159)},3434:function(t,e,i){"use strict";var n=i(723);function s(){}var r=null,o={};function a(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("Promise constructor's argument is not a function");this._U=0,this._V=0,this._W=null,this._X=null,t!==s&&p(t,this)}function u(t,e){for(;3===t._V;)t=t._W;if(a._Y&&a._Y(t),0===t._V)return 0===t._U?(t._U=1,void(t._X=e)):1===t._U?(t._U=2,void(t._X=[t._X,e])):void t._X.push(e);!function(t,e){n((function(){var i=1===t._V?e.onFulfilled:e.onRejected;if(null!==i){var n=function(t,e){try{return t(e)}catch(t){return r=t,o}}(i,t._W);n===o?h(e.promise,r):c(e.promise,n)}else 1===t._V?c(e.promise,t._W):h(e.promise,t._W)}))}(t,e)}function c(t,e){if(e===t)return h(t,new TypeError("A promise cannot be resolved with itself."));if(e&&("object"==typeof e||"function"==typeof e)){var i=function(t){try{return t.then}catch(t){return r=t,o}}(e);if(i===o)return h(t,r);if(i===t.then&&e instanceof a)return t._V=3,t._W=e,void l(t);if("function"==typeof i)return void p(i.bind(e),t)}t._V=1,t._W=e,l(t)}function h(t,e){t._V=2,t._W=e,a._Z&&a._Z(t,e),l(t)}function l(t){if(1===t._U&&(u(t,t._X),t._X=null),2===t._U){for(var e=0;e "+e+") {","args = new Array(arguments.length + 1);","for (var i = 0; i < arguments.length; i++) {","args[i] = arguments[i];","}","}","return new Promise(function (rs, rj) {","var cb = "+r+";","var res;","switch (argLength) {",i.concat(["extra"]).map((function(t,e){return"case "+e+":res = fn.call("+["self"].concat(i.slice(0,e)).concat("cb").join(",")+");break;"})).join(""),"default:","args[argLength] = cb;","res = fn.apply(self, args);","}","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],o)(n,t)}(t)};var r="function (err, res) {if (err) { rj(err); } else { rs(res); }}";n.nodeify=function(t){return function(){var e=Array.prototype.slice.call(arguments),i="function"==typeof e[e.length-1]?e.pop():null,r=this;try{return t.apply(this,arguments).nodeify(i,r)}catch(t){if(null==i)return new n((function(e,i){i(t)}));s((function(){i.call(r,t)}))}}},n.prototype.nodeify=function(t,e){if("function"!=typeof t)return this;this.then((function(i){s((function(){t.call(e,null,i)}))}),(function(i){s((function(){t.call(e,i)}))}))}},3690:function(t,e,i){"use strict";var n=i(3434);t.exports=n,n.enableSynchronous=function(){n.prototype.isPending=function(){return 0==this.getState()},n.prototype.isFulfilled=function(){return 1==this.getState()},n.prototype.isRejected=function(){return 2==this.getState()},n.prototype.getValue=function(){if(3===this._V)return this._W.getValue();if(!this.isFulfilled())throw new Error("Cannot get a value of an unfulfilled promise.");return this._W},n.prototype.getReason=function(){if(3===this._V)return this._W.getReason();if(!this.isRejected())throw new Error("Cannot get a rejection reason of a non-rejected promise.");return this._W},n.prototype.getState=function(){return 3===this._V?this._W.getState():-1===this._V||-2===this._V?0:this._V}},n.disableSynchronous=function(){n.prototype.isPending=void 0,n.prototype.isFulfilled=void 0,n.prototype.isRejected=void 0,n.prototype.getValue=void 0,n.prototype.getReason=void 0,n.prototype.getState=void 0}},4795:function(t,e,i){var n;!function(e){"use strict";function s(){}var r=s.prototype,o=e.EventEmitter;function a(t,e){for(var i=t.length;i--;)if(t[i].listener===e)return i;return-1}function u(t){return function(){return this[t].apply(this,arguments)}}function c(t){return"function"==typeof t||t instanceof RegExp||!(!t||"object"!=typeof t)&&c(t.listener)}r.getListeners=function(t){var e,i,n=this._getEvents();if(t instanceof RegExp)for(i in e={},n)n.hasOwnProperty(i)&&t.test(i)&&(e[i]=n[i]);else e=n[t]||(n[t]=[]);return e},r.flattenListeners=function(t){var e,i=[];for(e=0;e0&&x.userSession.setupVarsMonitoring(t.js_vars,(function(t,e){L.sendChildEvent("jsVars",[t,e])}))),"widget"!=x.mode&&"popup"!=x.mode||x.viewHandler.init(x,t.ll),"api"==x.position&&"embed"==x.mode||x.mainWidget.init(x,t.ll),"widget"!=x.mode&&"popup"!=x.mode||D.cont.show(),x.loadcb&&x.loadcb(x),t.init_calls&&(x.init_calls=t.init_calls),x.proactive_interval=t.chat_ui.proactive_interval,t.disable_proactive||"widget"!=x.mode&&"popup"!=x.mode&&"embed"!=x.mode||void 0!==o.args.proactive&&!0!==o.args.proactive||null!==x.storageHandler.getSessionStorage(w+"_invt")||H(),x.init_calls.length>0&&x.init_calls.forEach((function(t){"nodeJSChat"==t.extension&&Promise.all([__webpack_require__.e(8),__webpack_require__.e(417)]).then(__webpack_require__.bind(__webpack_require__,9417)).then((function(e){e.nodeJSChat.setParams(t.params,x,L)}))})));else{if(t.terminate)return;x.userSession.setVID(t.vid),x.terminated=!0,m.removeById(x.prefixLowercase+"_container_v2"),m.removeById(x.prefixLowercase+"_status_widget_v2");var e=document.createElement("script");e.type=n.type,e.id=x.prefixLowercase+"-js-reload",e.async=!0,n.getAttribute("scope")&&e.setAttribute("scope",n.getAttribute("scope")),e.src=n.getAttribute("src")+"&r="+(new Date).getHours()+(new Date).getMinutes();var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(e,s)}})),x.eventEmitter.addListener("closeWidget",(function(t){x.widgetStatus.next(!1),L.sendChildEvent("closedWidget",[t])})),x.eventEmitter.addListener("sendChildEvent",(function(t){void 0!==t.boot?x.mainWidget.bootstrap():1==x.mainWidget.isLoaded&&1==i.loaded?L.sendChildEvent(t.cmd,[t.arg]):x.childCommands.push(t)})),x.eventEmitter.addListener("sendChildExtEvent",(function(t){void 0!==t.boot?x.mainWidget.bootstrap():1==x.mainWidget.isLoaded&&1==i.loaded?L.sendChildEvent(t.cmd,[t.arg],"lhc_load_ext"):x.childExtCommands.push(t)})),x.eventEmitter.addListener("toggleSound",(function(){var t=!x.toggleSound.value;x.toggleSound.next(t)})),x.eventEmitter.addListener("enableCookies",(function(){if(!0===f.checkCookiesSupport()){var t=x.userSession.getSessionAttributes();void 0!==t.hnh&&delete t.hnh,x.storageHandler.storeSessionInformation(t),void 0!==o.args.orig&&(x.mode=o.args.mode=o.args.orig.mode,o.args.proactive=o.args.orig.proactive,o.args.check_messages=o.args.orig.check_messages,m.makeRequest(o.args.lhc_base_url+x.lang+"widgetrestapi/settings",{params:P()},(function(t){x.eventEmitter.emitEvent("sendChildEvent",[{cmd:"attr_set",arg:{type:"attr_set",attr:["mode"],data:x.mode}}]),"widget"==x.mode&&null!==x.nh&&I(x.nh),"widget"!=x.mode&&"popup"!=x.mode||void 0!==o.args.proactive&&!0!==o.args.proactive||null!==x.storageHandler.getSessionStorage(w+"_invt")||H()})))}})),x.eventEmitter.addListener("endChatCookies",(function(t){(!1===x.kcw||t&&1==t.force)&&(x.userSession.setChatInformation({id:null,hash:null}),x.storageHandler.storeSessionInformation(x.userSession.getSessionAttributes()),x.proactive={})})),x.eventEmitter.addListener("endChat",(function(t){x.userSession.setChatInformation({id:null,hash:null}),x.storageHandler.storeSessionInformation(x.userSession.getSessionAttributes()),x.proactive={},"popup"==x.mode||t&&t.show_start||x.widgetStatus.next(!1),x.viewHandler&&(x.viewHandler.removeUnreadIndicator(),x.eventEmitter.emitEvent("hide_msg_snippet")),x.widgetDimesions.nextProperty("height_override",null),L.sendChildEvent("endedChat",[{sender:"endButton",survey:x.survey}]),("embed"==x.mode||t&&t.show_start)&&x.eventEmitter.emitEvent("showWidget",[{sender:"closeButton"}]),"popup"==x.mode&&x.popupWidget.freeup()})),x.eventEmitter.addListener("showWidget",(function(t){x.mainWidget.hideInvitation(),x.widgetStatus.next(!0),"popup"==x.mode?(x.popupWidget.init(x,L,t),x.viewHandler.removeUnreadIndicator(),x.mainWidget.hide()):void 0!==t&&void 0!==t.event&&t.event.preventDefault(),L.sendChildEvent("shownWidget",[{sender:"closeButton"}])})),x.eventEmitter.addListener("addTag",(function(t){x.tag=""!=x.tag?x.tag+","+t:t,x.eventEmitter.emitEvent("tagAdded")})),x.eventEmitter.addListener("addEvent",(function(t){x.events=t,x.eventEmitter.emitEvent("eventAdded")})),x.eventEmitter.addListener("addConversion",(function(t){x.conversion=t,x.eventEmitter.emitEvent("conversionAdded")})),x.eventEmitter.addListener("openPopup",(function(){x.popupWidget.init(x,L),x.viewHandler.removeUnreadIndicator(),L.sendChildEvent("shownWidget",[{sender:"closeButton"}]),x.widgetStatus.next(!1)})),x.eventEmitter.addListener("chatStarted",(function(t,e){x.widgetDimesions.nextProperty("height_override",null),"popup"===e&&!0!==x.kcw||x.userSession.setChatInformation(t,x.nh&&x.nh.ap),"popup"==e&&x.mainWidget.hide(),!1!==x.fresh||"popup"===e&&!0!==x.kcw||x.storageHandler.storeSessionInformation(x.userSession.getSessionAttributes())})),x.eventEmitter.addListener("subscribeEvent",(function(t){x.chatNotifications.setPublicKey(t.pk,x.eventEmitter),x.chatNotifications.sendNotification()})),x.eventEmitter.addListener("subcribedEvent",(function(t){L.sendChildEvent("subcribedEvent",[t])})),x.widgetStatus.subscribe((function(t){"popup"!==x.mode&&("embed"!==x.mode&&x.storageHandler.setSessionStorage(w+"_ws",t),L.sendChildEvent("widgetStatus",[t]))})),x.toggleSound.subscribe((function(t){x.storageHandler.setSessionStorage(w+"_sound",t)})),x.onlineStatus.subscribe((function(t){L.sendChildEvent("onlineStatus",[t])})),x.eventEmitter.addListener("screenshot",(function(t){m.makeScreenshot(x.staticJS.screenshot,t)})),x.eventEmitter.addListener("screenshare",(function(t){__webpack_require__.e(398).then(__webpack_require__.bind(__webpack_require__,7398)).then((function(e){e.screenShare.setParams(t||{},x,L)}))})),x.eventEmitter.addListener("location",(function(t){document.location=t})),x.eventEmitter.addListener("terminated",(function(t){x.terminated=!0,m.removeById(x.prefixLowercase+"_container_v2"),m.removeById(x.prefixLowercase+"_status_widget_v2")})),x.eventEmitter.addListener("showInvitation",(function(t){x.widgetDimesions.nextProperty("bottom_override",75),x.widgetDimesions.nextProperty("right_override",75),x.mainWidget.showInvitation()})),x.eventEmitter.addListener("hideAction",(function(t){x.mainWidget.hide()})),x.eventEmitter.addListener("showAction",(function(t){x.mainWidget.show()})),x.eventEmitter.addListener("zoomImage",(function(t){__webpack_require__.e(335).then(__webpack_require__.bind(__webpack_require__,2335)).then((function(e){e.zoomImage.setParams(t||{},x,L)}))})),x.eventEmitter.addListener("hideInvitation",(function(t){x.mainWidget.hideInvitation(),t.full?(x.eventEmitter.emitEvent("showWidget",[{sender:"closeButton"}]),x.eventEmitter.emitEvent("fullInvitation",[t])):x.eventEmitter.emitEvent("cancelInvitation",[])})),x.eventEmitter.addListener("msgSnippet",(function(t){if("widget"==x.mode&&!1===x.widgetStatus.value){if(t.full_widget)return void x.eventEmitter.emitEvent("showWidget",[{sender:"closeButton"}]);"api"==x.position&&x.viewHandler&&x.viewHandler.show(),__webpack_require__.e(213).then(__webpack_require__.bind(__webpack_require__,7213)).then((function(e){x.msgSnippet?x.msgSnippet.showSnippet(t,!0):(x.msgSnippet=new e.msgSnippetWidget(x.prefixLowercase),D.cont.elmDom.appendChild(x.msgSnippet.cont.constructUI(),!0),x.msgSnippet.init(x,t)),x.eventEmitter.emitEvent("unread_message",[{otm:1}])}))}})),x.eventEmitter.addListener("unread_message",(function(t){t&&t.msg_body&&!x.msgSnippet&&__webpack_require__.e(213).then(__webpack_require__.bind(__webpack_require__,7213)).then((function(e){x.msgSnippet||(x.msgSnippet=new e.msgSnippetWidget(x.prefixLowercase),D.cont.elmDom.appendChild(x.msgSnippet.cont.constructUI(),!0),x.msgSnippet.init(x,t))}))})),x.originalTitle=document.title,x.blinkInterval=null,x.eventEmitter.addListener("change_language",(function(t){x.lang=t.lng.replace("/","")+"/"})),x.eventEmitter.addListener("unread_message_title",(function(t){clearInterval(x.blinkInterval),0==t.status?x.blinkInterval=setInterval((function(){document.title=Math.round((new Date).getTime()/1e3)%2?"💬 "+x.originalTitle:x.originalTitle}),1e3):(x.focused=!0,document.title=x.originalTitle)})),x.eventEmitter.addListener("widgetHeight",(function(t){if(t.reset_height)return x.widgetDimesions.nextProperty("height_override",null),x.widgetDimesions.nextProperty("bottom_override",null),x.widgetDimesions.nextProperty("right_override",null),void x.widgetDimesions.nextProperty("width_override",null);if(t.force_height||t.force_width||t.force_bottom||t.force_right)return t.force_height&&x.widgetDimesions.nextProperty("height_override",t.force_height),t.force_width&&x.widgetDimesions.nextProperty("width_override",t.force_width),t.force_right&&x.widgetDimesions.nextProperty("right_override",t.force_right),void(t.force_bottom&&x.widgetDimesions.nextProperty("bottom_override",t.force_bottom));if("widget"==x.mode&&0==x.isMobile){var i=document,n=i.documentElement,s=i.getElementsByTagName("body")[0],r=e.innerHeight||n.clientHeight||s.clientHeight;parseInt(t.height)>x.widgetDimesions.value.height&&r>parseInt(t.height)?x.widgetDimesions.nextProperty("height_override",parseInt(t.height)):x.widgetDimesions.value.height_override&&x.widgetDimesions.value.height_override>r&&x.widgetDimesions.nextProperty("height_override",null)}}));var j=!1;try{j="serviceWorker"in navigator}catch(t){}if(!0===j)try{navigator.serviceWorker.addEventListener("message",(function(t){try{void 0!==t.data.lhc_ch&&void 0!==t.data.lhc_cid&&(x.widgetStatus.next(!0),"popup"==x.mode?(x.userSession.setChatInformation({id:t.data.lhc_cid,hash:t.data.lhc_ch}),x.eventEmitter.emitEvent("unread_message")):(L.sendChildEvent("shownWidget",[{sender:"closeButton"}]),L.sendChildEvent("reopenNotification",[{id:t.data.lhc_cid,hash:t.data.lhc_ch}])))}catch(t){if(!r)throw Error("lhc : "+t.message);r.log(t.message,"index.js",t.lineNumber||t.line,t.stack)}}))}catch(t){}var T=function(t){if(!0!==x.terminated&&"string"==typeof t.data&&!t.data.indexOf(x.prefixLowercase+"::")){var e=t.data.split("::");if(void 0!==t.origin&&"about:"!=t.origin){var n=t.origin.replace("http://","").replace("https://","").replace(/:(\d+)$/,"");if(n!==document.domain&&x.domain_lhc!==n&&"started"!==e[1]&&"isstarted"!==e[1])return}if("ready"==e[1]){L.sendReadyEvent("true"==e[2]),x.storageHandler.getSessionStorage(w+"_screenshare")&&x.eventEmitter.emitEvent("screenshare",[{auto_start:!0}]);var s=function(t){var e="focus"===t.type;x.focused=e,L.sendChildEvent("focus_changed",[{status:e}])};window.addEventListener("focus",s),window.addEventListener("blur",s),window.addEventListener("pageshow",s),window.addEventListener("pagehide",s),i.loaded=!0,L.sendChildEvent("ext_modules",[x.staticJS.ex_cb_js]),x.childExtCommands.forEach((function(t){L.sendChildEvent(t.cmd,[t.arg],"lhc_load_ext")})),x.childCommands.forEach((function(t){L.sendChildEvent(t.cmd,[t.arg])})),null!==x.react_attr&&x.react_attr.forEach((function(t){L.sendChildEvent("attr_set",[{type:"attr_set",attr:t.k,data:t.v}])}))}else"ready_popup"==e[1]?x.popupWidget.sendParameters(L):"isstarted"==e[1]?x.eventEmitter.emitEvent("terminated",[]):"started"==e[1]?x.hide_parent?x.eventEmitter.emitEvent("terminated",[]):t.source.postMessage("lhc::isstarted","*"):x.eventEmitter.emitEvent(e[1],JSON.parse(e[2]))}};window.addEventListener?window.addEventListener("message",T,!1):window.attachEvent?window.attachEvent("onmessage",T):document.attachEvent&&document.attachEvent("onmessage",T)},c=function(){!0!==i.ready&&(document.body&&(i.ready=!0),i.init=u,o.args.before_init&&o.args.before_init(i),o.args.manual_init||u())},h=__webpack_require__(593).U;c(),!i.ready||(h.listen(document,"DOMContentLoaded",(function(){c()}),"domloaded"),h.listen(document,"readystatechange",(function(){("complete"===document.readyState||"interactive"===document.readyState&&document.body)&&c()}),"domstatechange"),h.listen(e,"load",(function(){c()}),"windowload"))}.call(this,e["$_"+s],e[s+"_API"])}catch(t){if(!r)throw Error("lhc : "+t.message);r.log(t.message,"index.js",t.lineNumber||t.line,t.stack)}}}(window)}(),this.LiveHelperChat=__webpack_exports__.LiveHelperChatDefault})(); //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lhc_web/design/defaulttheme/widget/wrapper/dist/index.js.map b/lhc_web/design/defaulttheme/widget/wrapper/dist/index.js.map index e28b4b3ab3..fa1316b664 100644 --- a/lhc_web/design/defaulttheme/widget/wrapper/dist/index.js.map +++ b/lhc_web/design/defaulttheme/widget/wrapper/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","mappings":";uEAGA,IAAIA,EAAU,EAAQ,KAElBC,EAAY,GAGZC,EAAgB,GAChBC,EAAoBH,EAAQI,0BAEhC,WACI,GAAIF,EAAcG,OACd,MAAMH,EAAcI,WAa5B,SAASC,EAAKC,GACV,IAAIC,GAEAA,EADAR,EAAUI,OACAJ,EAAUS,MAEV,IAAIC,GAEVH,KAAOA,EACfR,EAAQS,GAKZ,SAASE,IACLC,KAAKJ,KAAO,KAfhBK,EAAOC,QAAUP,EAoBjBI,EAAQI,UAAUC,KAAO,WACrB,IACIJ,KAAKJ,KAAKQ,OACZ,MAAOC,GACDV,EAAKW,QAILX,EAAKW,QAAQD,IAKbf,EAAciB,KAAKF,GACnBd,KAEN,QAC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b,EAAQC,KAAKolB,aAAepf,MAG1Bqf,EAAgB5J,oBAAAA,KAAAA,EAErByJ,KAAY9J,EAAIG,QAAW8J,EAAcC,OAAOx2B,SAAU,oBAAoB,WAC3Eo2B,MACD,aACCG,EAAcC,OAAOx2B,SAAU,oBAAoB,YAC9C,aAAeA,SAAS8N,YAAc,gBAAkB9N,SAAS8N,YAAc9N,SAASuC,OAAS6zB,MACnG,kBACHG,EAAcC,OAAOtc,EAAQ,QAAQ,WACjCkc,MACD,gBAERh4B,KAAKJ,KAAMkc,EAAO,KAAO0R,GAAc1R,EAAO0R,EAAc,SAEjE,MAAO1oB,GACL,IAAI2oB,EAAqF,MAAMrG,MAAM,SAAWtiB,EAAEgL,SAApG2d,EAASzoB,IAAIF,EAAEgL,QAAS,WAAYhL,EAAE6oB,YAAc7oB,EAAEipB,KAAMjpB,EAAE8oB,SA3hCpF,CA8hCG1lB","sources":["webpack://LiveHelperChat/./node_modules/asap/browser-asap.js","webpack://LiveHelperChat/./node_modules/asap/browser-raw.js","webpack://LiveHelperChat/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://LiveHelperChat/./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js","webpack://LiveHelperChat/./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack://LiveHelperChat/./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","webpack://LiveHelperChat/./src/lib/UIConstructorIframe.js","webpack://LiveHelperChat/./node_modules/@babel/runtime/helpers/esm/inherits.js","webpack://LiveHelperChat/./src/lib/UIConsturctor.js","webpack://LiveHelperChat/./src/lib/chatNotifications.js","webpack://LiveHelperChat/./src/lib/helperFunctions.js","webpack://LiveHelperChat/./src/lib/settings.js","webpack://LiveHelperChat/./src/lib/widgets/containerChat.js","webpack://LiveHelperChat/./src/lib/widgets/mainWidget.js","webpack://LiveHelperChat/./src/lib/widgets/mainWidgetPopup.js","webpack://LiveHelperChat/./src/lib/widgets/statusWidget.js","webpack://LiveHelperChat/./src/util/chatEventsHandler.js","webpack://LiveHelperChat/./src/util/domEventsHandler.js","webpack://LiveHelperChat/./src/util/monitoredVariable.js","webpack://LiveHelperChat/./src/util/storageHandler.js","webpack://LiveHelperChat/./src/util/userSession.js","webpack://LiveHelperChat/./node_modules/ismobilejs/esm/isMobile.js","webpack://LiveHelperChat/./node_modules/promise/index.js","webpack://LiveHelperChat/./node_modules/promise/lib/core.js","webpack://LiveHelperChat/./node_modules/promise/lib/done.js","webpack://LiveHelperChat/./node_modules/promise/lib/es6-extensions.js","webpack://LiveHelperChat/./node_modules/promise/lib/finally.js","webpack://LiveHelperChat/./node_modules/promise/lib/index.js","webpack://LiveHelperChat/./node_modules/promise/lib/node-extensions.js","webpack://LiveHelperChat/./node_modules/promise/lib/synchronous.js","webpack://LiveHelperChat/./node_modules/wolfy87-eventemitter/EventEmitter.js","webpack://LiveHelperChat/./node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack://LiveHelperChat/./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://LiveHelperChat/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://LiveHelperChat/webpack/bootstrap","webpack://LiveHelperChat/webpack/runtime/load script","webpack://LiveHelperChat/webpack/runtime/compat get default export","webpack://LiveHelperChat/webpack/runtime/define property getters","webpack://LiveHelperChat/webpack/runtime/ensure chunk","webpack://LiveHelperChat/webpack/runtime/get javascript chunk filename","webpack://LiveHelperChat/webpack/runtime/global","webpack://LiveHelperChat/webpack/runtime/hasOwnProperty shorthand","webpack://LiveHelperChat/webpack/runtime/make namespace object","webpack://LiveHelperChat/webpack/runtime/publicPath","webpack://LiveHelperChat/webpack/runtime/jsonp chunk loading","webpack://LiveHelperChat/./src/index.js"],"sourcesContent":["\"use strict\";\n\n// rawAsap provides everything we need except exception management.\nvar rawAsap = require(\"./raw\");\n// RawTasks are recycled to reduce GC churn.\nvar freeTasks = [];\n// We queue errors to ensure they are thrown in right order (FIFO).\n// Array-as-queue is good enough here, since we are just dealing with exceptions.\nvar pendingErrors = [];\nvar requestErrorThrow = rawAsap.makeRequestCallFromTimer(throwFirstError);\n\nfunction throwFirstError() {\n if (pendingErrors.length) {\n throw pendingErrors.shift();\n }\n}\n\n/**\n * Calls a task as soon as possible after returning, in its own event, with priority\n * over other events like animation, reflow, and repaint. An error thrown from an\n * event will not interrupt, nor even substantially slow down the processing of\n * other events, but will be rather postponed to a lower priority event.\n * @param {{call}} task A callable object, typically a function that takes no\n * arguments.\n */\nmodule.exports = asap;\nfunction asap(task) {\n var rawTask;\n if (freeTasks.length) {\n rawTask = freeTasks.pop();\n } else {\n rawTask = new RawTask();\n }\n rawTask.task = task;\n rawAsap(rawTask);\n}\n\n// We wrap tasks with recyclable task objects. A task object implements\n// `call`, just like a function.\nfunction RawTask() {\n this.task = null;\n}\n\n// The sole purpose of wrapping the task is to catch the exception and recycle\n// the task object after its single use.\nRawTask.prototype.call = function () {\n try {\n this.task.call();\n } catch (error) {\n if (asap.onerror) {\n // This hook exists purely for testing purposes.\n // Its name will be periodically randomized to break any code that\n // depends on its existence.\n asap.onerror(error);\n } else {\n // In a web browser, exceptions are not fatal. However, to avoid\n // slowing down the queue of pending tasks, we rethrow the error in a\n // lower priority turn.\n pendingErrors.push(error);\n requestErrorThrow();\n }\n } finally {\n this.task = null;\n freeTasks[freeTasks.length] = this;\n }\n};\n","\"use strict\";\n\n// Use the fastest means possible to execute a task in its own turn, with\n// priority over other events including IO, animation, reflow, and redraw\n// events in browsers.\n//\n// An exception thrown by a task will permanently interrupt the processing of\n// subsequent tasks. The higher level `asap` function ensures that if an\n// exception is thrown by a task, that the task queue will continue flushing as\n// soon as possible, but if you use `rawAsap` directly, you are responsible to\n// either ensure that no exceptions are thrown from your task, or to manually\n// call `rawAsap.requestFlush` if an exception is thrown.\nmodule.exports = rawAsap;\nfunction rawAsap(task) {\n if (!queue.length) {\n requestFlush();\n flushing = true;\n }\n // Equivalent to push, but avoids a function call.\n queue[queue.length] = task;\n}\n\nvar queue = [];\n// Once a flush has been requested, no further calls to `requestFlush` are\n// necessary until the next `flush` completes.\nvar flushing = false;\n// `requestFlush` is an implementation-specific method that attempts to kick\n// off a `flush` event as quickly as possible. `flush` will attempt to exhaust\n// the event queue before yielding to the browser's own event loop.\nvar requestFlush;\n// The position of the next task to execute in the task queue. This is\n// preserved between calls to `flush` so that it can be resumed if\n// a task throws an exception.\nvar index = 0;\n// If a task schedules additional tasks recursively, the task queue can grow\n// unbounded. To prevent memory exhaustion, the task queue will periodically\n// truncate already-completed tasks.\nvar capacity = 1024;\n\n// The flush function processes all tasks that have been scheduled with\n// `rawAsap` unless and until one of those tasks throws an exception.\n// If a task throws an exception, `flush` ensures that its state will remain\n// consistent and will resume where it left off when called again.\n// However, `flush` does not make any arrangements to be called again if an\n// exception is thrown.\nfunction flush() {\n while (index < queue.length) {\n var currentIndex = index;\n // Advance the index before calling the task. This ensures that we will\n // begin flushing on the next task the task throws an error.\n index = index + 1;\n queue[currentIndex].call();\n // Prevent leaking memory for long chains of recursive calls to `asap`.\n // If we call `asap` within tasks scheduled by `asap`, the queue will\n // grow, but to avoid an O(n) walk for every task we execute, we don't\n // shift tasks off the queue after they have been executed.\n // Instead, we periodically shift 1024 tasks off the queue.\n if (index > capacity) {\n // Manually shift all values starting at the index back to the\n // beginning of the queue.\n for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {\n queue[scan] = queue[scan + index];\n }\n queue.length -= index;\n index = 0;\n }\n }\n queue.length = 0;\n index = 0;\n flushing = false;\n}\n\n// `requestFlush` is implemented using a strategy based on data collected from\n// every available SauceLabs Selenium web driver worker at time of writing.\n// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593\n\n// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that\n// have WebKitMutationObserver but not un-prefixed MutationObserver.\n// Must use `global` or `self` instead of `window` to work in both frames and web\n// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.\n\n/* globals self */\nvar scope = typeof global !== \"undefined\" ? global : self;\nvar BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver;\n\n// MutationObservers are desirable because they have high priority and work\n// reliably everywhere they are implemented.\n// They are implemented in all modern browsers.\n//\n// - Android 4-4.3\n// - Chrome 26-34\n// - Firefox 14-29\n// - Internet Explorer 11\n// - iPad Safari 6-7.1\n// - iPhone Safari 7-7.1\n// - Safari 6-7\nif (typeof BrowserMutationObserver === \"function\") {\n requestFlush = makeRequestCallFromMutationObserver(flush);\n\n// MessageChannels are desirable because they give direct access to the HTML\n// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera\n// 11-12, and in web workers in many engines.\n// Although message channels yield to any queued rendering and IO tasks, they\n// would be better than imposing the 4ms delay of timers.\n// However, they do not work reliably in Internet Explorer or Safari.\n\n// Internet Explorer 10 is the only browser that has setImmediate but does\n// not have MutationObservers.\n// Although setImmediate yields to the browser's renderer, it would be\n// preferrable to falling back to setTimeout since it does not have\n// the minimum 4ms penalty.\n// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and\n// Desktop to a lesser extent) that renders both setImmediate and\n// MessageChannel useless for the purposes of ASAP.\n// https://github.com/kriskowal/q/issues/396\n\n// Timers are implemented universally.\n// We fall back to timers in workers in most engines, and in foreground\n// contexts in the following browsers.\n// However, note that even this simple case requires nuances to operate in a\n// broad spectrum of browsers.\n//\n// - Firefox 3-13\n// - Internet Explorer 6-9\n// - iPad Safari 4.3\n// - Lynx 2.8.7\n} else {\n requestFlush = makeRequestCallFromTimer(flush);\n}\n\n// `requestFlush` requests that the high priority event queue be flushed as\n// soon as possible.\n// This is useful to prevent an error thrown in a task from stalling the event\n// queue if the exception handled by Node.js’s\n// `process.on(\"uncaughtException\")` or by a domain.\nrawAsap.requestFlush = requestFlush;\n\n// To request a high priority event, we induce a mutation observer by toggling\n// the text of a text node between \"1\" and \"-1\".\nfunction makeRequestCallFromMutationObserver(callback) {\n var toggle = 1;\n var observer = new BrowserMutationObserver(callback);\n var node = document.createTextNode(\"\");\n observer.observe(node, {characterData: true});\n return function requestCall() {\n toggle = -toggle;\n node.data = toggle;\n };\n}\n\n// The message channel technique was discovered by Malte Ubl and was the\n// original foundation for this library.\n// http://www.nonblocking.io/2011/06/windownexttick.html\n\n// Safari 6.0.5 (at least) intermittently fails to create message ports on a\n// page's first load. Thankfully, this version of Safari supports\n// MutationObservers, so we don't need to fall back in that case.\n\n// function makeRequestCallFromMessageChannel(callback) {\n// var channel = new MessageChannel();\n// channel.port1.onmessage = callback;\n// return function requestCall() {\n// channel.port2.postMessage(0);\n// };\n// }\n\n// For reasons explained above, we are also unable to use `setImmediate`\n// under any circumstances.\n// Even if we were, there is another bug in Internet Explorer 10.\n// It is not sufficient to assign `setImmediate` to `requestFlush` because\n// `setImmediate` must be called *by name* and therefore must be wrapped in a\n// closure.\n// Never forget.\n\n// function makeRequestCallFromSetImmediate(callback) {\n// return function requestCall() {\n// setImmediate(callback);\n// };\n// }\n\n// Safari 6.0 has a problem where timers will get lost while the user is\n// scrolling. This problem does not impact ASAP because Safari 6.0 supports\n// mutation observers, so that implementation is used instead.\n// However, if we ever elect to use timers in Safari, the prevalent work-around\n// is to add a scroll event listener that calls for a flush.\n\n// `setTimeout` does not call the passed callback if the delay is less than\n// approximately 7 in web workers in Firefox 8 through 18, and sometimes not\n// even then.\n\nfunction makeRequestCallFromTimer(callback) {\n return function requestCall() {\n // We dispatch a timeout with a specified delay of 0 for engines that\n // can reliably accommodate that request. This will usually be snapped\n // to a 4 milisecond delay, but once we're flushing, there's no delay\n // between events.\n var timeoutHandle = setTimeout(handleTimer, 0);\n // However, since this timer gets frequently dropped in Firefox\n // workers, we enlist an interval handle that will try to fire\n // an event 20 times per second until it succeeds.\n var intervalHandle = setInterval(handleTimer, 50);\n\n function handleTimer() {\n // Whichever timer succeeds will cancel both timers and\n // execute the callback.\n clearTimeout(timeoutHandle);\n clearInterval(intervalHandle);\n callback();\n }\n };\n}\n\n// This is for `asap.js` only.\n// Its name will be periodically randomized to break any code that depends on\n// its existence.\nrawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;\n\n// ASAP was originally a nextTick shim included in Q. This was factored out\n// into this ASAP package. It was later adapted to RSVP which made further\n// amendments. These decisions, particularly to marginalize MessageChannel and\n// to capture the MutationObserver implementation in a closure, were integrated\n// back into ASAP proper.\n// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js\n","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","import _typeof from \"./typeof.js\";\nimport assertThisInitialized from \"./assertThisInitialized.js\";\nexport default function _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n\n return assertThisInitialized(self);\n}","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","import {UIConsturctor} from './UIConsturctor';\nimport {helperFunctions} from './helperFunctions';\n\nexport class UIConstructorIframe extends UIConsturctor {\n\n constructor(elementId, style, attributes, tagname, documentRef) {\n super(elementId, style, attributes, tagname, documentRef);\n this.bodyId = '';\n }\n\n constructUIIframe(style, dir, cl, header) {\n\n if (typeof dir === 'undefined'){\n dir = 'ltr';\n }\n\n if (typeof cl === 'undefined'){\n cl = 'en';\n }\n\n if (typeof header === 'undefined'){\n header = '';\n }\n\n this.elmDomDoc = helperFunctions.getDocument(this.elmDom);\n if (this.elmDomDoc === null) return null;\n\n try {\n this.elmDomDoc.getElementsByTagName(\"head\")[0].innerHTML = ''+header;\n\n if (this.bodyId != '') {\n this.elmDomDoc.body.id = this.bodyId;\n }\n\n var html = this.elmDomDoc.getElementsByTagName(\"html\")[0];\n html.setAttribute(\"lang\", cl);\n html.setAttribute(\"dir\", dir);\n\n var nodeDoctype = document.implementation.createDocumentType(\n 'html',\n '',\n ''\n );\n\n if (this.elmDomDoc.doctype) {\n this.elmDomDoc.replaceChild(nodeDoctype, this.elmDomDoc.doctype);\n } else {\n this.elmDomDoc.insertBefore(nodeDoctype, this.elmDomDoc.childNodes[0]);\n }\n\n } catch (e) {\n console.log(e);\n }\n\n this.insertCssFile(style);\n this.insertContent();\n };\n\n insertContent () {\n this.elmDomDoc.body.innerHTML = this.tmpl\n };\n};\n\n","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}","import {helperFunctions} from './helperFunctions';\nimport {settings} from './settings.js';\nimport {domEventsHandler} from '../util/domEventsHandler';\n\nexport class UIConsturctor {\n constructor(elementId, style, attributes, tagname, documentRef) {\n var f = this;\n this.elementId = elementId || \"\";\n this.style = style || \"\";\n this.tagName = tagname || \"div\";\n this.tmpl = \"\";\n this.elmDom = null;\n this.elmDomDoc = documentRef || document;\n this.attributes = {};\n this.classNames = [];\n\n this.elementId && (this.attributes.id = this.elementId);\n\n attributes && Object.keys(attributes).forEach(function (attr) {\n f.attributes[attr] = attributes[attr]\n })\n }\n\n constructUI(a) {\n this.elmDomDoc =\n a || this.elmDomDoc;\n this.elmDom = helperFunctions.initElement(this.elmDomDoc, this.tagName, this.attributes, this.style, this.tmpl);\n this.elmDom.className += this.classNames.join(\" \");\n return this.elmDom\n };\n\n restyle(attr, style) {\n style && (this.elmDom ? this.elmDom.style.cssText += \";\" + attr + \":\" + style : this.style += \";\" + attr + \":\" + style)\n };\n\n attachUserEventListener(a, c, d, k) {\n var e;\n if (e = d ? this.getElementById(d) : this.elmDom) d = a.split(\" \"), 1 < d.length ? d.forEach(function (a) {\n domEventsHandler.listen(e, a, c, a + k)\n }) : domEventsHandler.listen(e, a, c, k)\n };\n\n getElementById(a) {\n return this.elmDom ? this.elmDomDoc.getElementById(a) : null\n };\n\n hide() {\n this.restyle(\"display\", \"none !important\");\n }\n\n show() {\n this.restyle(\"display\", \"block !important\");\n }\n\n insertCssFile(style, reset) {\n var d = this.elmDomDoc.getElementsByTagName(\"head\")[0],\n k = this.elmDomDoc.createDocumentFragment(),\n e = helperFunctions.initElement(this.elmDomDoc, \"style\", {type: \"text/css\"}),\n f = this.elmDomDoc.createTextNode(reset ? style : settings.ResetStyle + \"\" + style);\n k.appendChild(e);\n d.appendChild(k);\n e.styleSheet ? e.styleSheet.cssText = f.nodeValue : e.appendChild(f)\n }\n\n insertCssRemoteFile(attr) {\n\n var elm = null;\n\n if (attr.id && attr.href && (elm = this.elmDomDoc.getElementById(attr.id)) !== null) {\n elm.href = attr.href\n return;\n }\n\n var d = this.elmDomDoc.getElementsByTagName(\"head\")[0],\n k = this.elmDomDoc.createDocumentFragment(),\n e = this.elmDomDoc.createElement('link');\n\n e.rel = \"stylesheet\";\n e.crossOrigin = \"*\";\n\n for (var b in attr) e[b] = attr[b];\n\n k.appendChild(e);\n d.appendChild(k);\n }\n\n insertJSFile(src, async, loadcb, attr) {\n var d = this.elmDomDoc.getElementsByTagName(\"head\")[0],\n k = this.elmDomDoc.createDocumentFragment(),\n e = this.elmDomDoc.createElement('script');\n\n e.type = 'text/javascript';\n if (typeof async === 'undefined' || async === true) {\n e.async = true;\n }\n\n e.crossOrigin = \"*\";\n e.src = src;\n\n if (loadcb) {\n e.onload = loadcb;\n }\n\n if (attr) {\n Object.keys(attr).forEach(key => {\n e.setAttribute(key,attr[key]);\n })\n }\n\n k.appendChild(e);\n d.appendChild(k);\n }\n\n massRestyle(a) {\n for (var b in a) a.hasOwnProperty(b) && this.restyle(b, a[b])\n }\n};\n\n","\nclass _chatNotifications {\n constructor() {\n this.isNotificationsSubscribed = false;\n this.applicationServerPublicKey = null;\n this.eventEmitter = null;\n }\n\n setPublicKey(publicKey, eventEmitter) {\n this.applicationServerPublicKey = publicKey\n this.eventEmitter = eventEmitter\n }\n\n sendNotification() {\n\n var that = this;\n var applicationServerPublicKey = this.applicationServerPublicKey;\n\n var swRegistration = null;\n\n if (!('serviceWorker' in navigator) || !('PushManager' in window)) {\n alert(\"This browser does not support desktop notification\");\n return;\n }\n\n // Let's check if the browser supports notifications\n if (!(\"Notification\" in window)) {\n alert(\"This browser does not support desktop notification\");\n return;\n }\n // Let's check whether notification permissions have already been granted\n else if (Notification.permission === \"granted\") {\n // If it's okay let's create a notification\n //\n }\n // Otherwise, we need to ask the user for permission\n else if (Notification.permission !== \"denied\") {\n Notification.requestPermission(function (permission) {\n // If the user accepts, let's create a notification\n if (permission !== \"granted\") {\n alert('Sorry but you have denied notification!');\n return;\n }\n });\n } else if (Notification.permission === \"denied\") {\n alert('Sorry but you have denied notification!');\n return;\n }\n\n function urlB64ToUint8Array(base64String) {\n var padding = '='.repeat((4 - base64String.length % 4) % 4);\n var base64 = (base64String + padding)\n .replace(/\\-/g, '+')\n .replace(/_/g, '/');\n\n var rawData = window.atob(base64);\n var outputArray = new Uint8Array(rawData.length);\n\n for (var i = 0; i < rawData.length; ++i) {\n outputArray[i] = rawData.charCodeAt(i);\n }\n return outputArray;\n }\n\n function updateSubscriptionOnServer(subscription, subscribe) {\n if (subscription === null) {\n return;\n }\n\n var key = subscription.getKey('p256dh');\n var token = subscription.getKey('auth');\n var contentEncoding = (PushManager.supportedContentEncodings || ['aesgcm'])[0];\n\n var payload = JSON.stringify({\n endpoint: subscription.endpoint,\n publicKey: key ? btoa(String.fromCharCode.apply(null, new Uint8Array(key))) : null,\n authToken: token ? btoa(String.fromCharCode.apply(null, new Uint8Array(token))) : null,\n contentEncoding : contentEncoding\n });\n\n that.eventEmitter.emitEvent('subcribedEvent', [{'payload' : payload}]);\n }\n\n var that = this;\n\n function subscribeUser() {\n var applicationServerKey = urlB64ToUint8Array(applicationServerPublicKey);\n swRegistration.pushManager.subscribe({\n 'userVisibleOnly': true,\n 'applicationServerKey': applicationServerKey\n }).then(function(subscription) {\n updateSubscriptionOnServer(subscription, true);\n that.isNotificationsSubscribed = true;\n });\n }\n\n function unsubscribeUser() {\n swRegistration.pushManager.getSubscription().then(function(subscription) {\n if (subscription) {\n updateSubscriptionOnServer(subscription,false);\n return subscription.unsubscribe();\n }\n }).then(function() {\n alert('You have unsubscribed!');\n that.isNotificationsSubscribed = false;\n });\n }\n\n function initializeUI() {\n // Set the initial subscription value\n swRegistration.pushManager.getSubscription().then(function(subscription) {\n that.isNotificationsSubscribed = !(subscription === null);\n if (that.isNotificationsSubscribed) {\n subscribeUser();\n } else {\n subscribeUser();\n }\n });\n }\n\n // At last, if the user has denied notifications, and you\n // want to be respectful there is no need to bother them any more.\n navigator.serviceWorker.register('/sw.lhc.js?v=2').then(function(swReg) {\n swRegistration = swReg;\n initializeUI();\n });\n\n }\n\n};\n\nconst chatNotifications = new _chatNotifications();\nexport { chatNotifications };","\nclass _helperFunctions {\n constructor() {\n }\n\n initElement(a, c, b, k, s) {\n var e;\n a = a.createElement(c);\n b = b || {};\n for (e in b) a[e] = b[e];\n s && \"iframe\" !== c && (a.innerHTML = s);\n k && (a.style.cssText = k);\n return a\n };\n \n getDocument(a) {\n return a.contentWindow ? a.contentWindow.document : a.contentDocument ? a.contentDocument : a.document ? a.document : null\n };\n\n removeById(EId)\n {\n var EObj = null;\n return(EObj = document.getElementById(EId)) ? EObj.parentNode.removeChild(EObj) : false;\n }\n\n // Returns time zone offset\n getTzOffset() {\n try {\n return Intl.DateTimeFormat().resolvedOptions().timeZone;\n } catch (e) {\n Date.prototype.stdTimezoneOffset = function() {\n var jan = new Date(this.getFullYear(), 0, 1);\n var jul = new Date(this.getFullYear(), 6, 1);\n return Math.max(jan.getTimezoneOffset(), jul.getTimezoneOffset());\n };\n\n Date.prototype.dst = function() {\n return this.getTimezoneOffset() < this.stdTimezoneOffset();\n };\n\n var today = new Date();\n var timeZoneOffset = 0;\n\n if (today.dst()) {\n timeZoneOffset = today.getTimezoneOffset();\n } else {\n timeZoneOffset = today.getTimezoneOffset()-60;\n };\n\n return (timeZoneOffset/60)*-1;\n }\n };\n\n getAbstractStyle(params) {\n return [\n \"outline: \" + (params.outline ? params.outline : \"none\") + \" !important; \",\n \"visibility: \" + (params.visibility ? params.visibility : \"visible\") + \" !important; \",\n \"resize: \" + (params.resize ? params.resize : \"none\") + \" !important; \",\n \"box-shadow: \" + (params.boxshadow ? params.boxshadow : \"none\") + \" ; \",\n \"overflow: \" + (params.overflow ? params.overflow : \"visible\") + \" ; \",\n \"background : \" + (params.background ? params.background : \"none\") + \" !important; \",\n \"opacity : \" + (params.opacity ? params.opacity : \"1\") + \" !important; \",\n \"filter : alpha(opacity=\" + (params.opacity ? 100 * params.opacity : \"100\") + \") !important; \",\n \"-ms-filter : progid:DXImageTransform.Microsoft.Alpha(Opacity\" + (params.opacity ? params.opacity : \"1\") + \") !important; \",\n \"-moz-opacity : \" + (params.opacity ? params.opacity : \"1\") + \" !important; \",\n \"-khtml-opacity : \" + (params.opacity ? params.opacity : \"1\") + \" !important; \",\n \"top : \" + (params.top ? params.top : \"auto\") + \"; \",\n \"right : \" + (params.right ? params.right : \"auto\") + \"; \",\n \"bottom : \" + (params.bottom ? params.bottom : \"auto\") + \"; \",\n \"left : \" + (params.left ? params.left : \"auto\") + \"; \",\n \"position : \" + (params.position ? params.position : \"absolute\") + \" !important; \",\n \"border : \" + (params.border ? params.border : \"0\") + \" !important; \",\n \"min-height : \" + (params.minheight ? params.minheight : \"auto\") + \"; \",\n \"min-width : \" + (params.minwidth ? params.minwidth : \"auto\") + \"; \",\n \"max-height : \" + (params.maxheight ? params.maxheight : \"none\") + \"; \",\n \"max-width : \" + (params.maxwidth ? params.maxwidth : \"none\") + \"; \",\n \"padding : \" + (params.padding ? params.padding : \"0\") + \" !important; \",\n \"margin : \" + (params.margin ? params.margin : \"0\") + \" !important; \",\n \"-moz-transition-property : \" + (params.transition ? params.transition : \"none\") + \" !important; \",\n \"-webkit-transition-property : \" + (params.transition ? params.transition : \"none\") + \" !important; \",\n \"-o-transition-property : \" + (params.transition ? params.transition : \"none\") + \" !important; \",\n \"transition-property : \" + (params.transition ? params.transition : \"none\") + \" !important; \",\n \"transform : \" + (params.transform ? params.transform : \"none\") + \" !important; \",\n \"-webkit-transform : \" + (params.transform ? params.transform : \"none\") + \" !important; \",\n \"-ms-transform : \" + (params.transform ? params.transform : \"none\") + \" !important; \",\n \"width : \" + (params.width ? params.width : \"auto\") + \" ; \",\n \"height : \" + (params.height ? params.height : \"auto\") + \" ; \",\n \"display : \" + (params.display ? params.display : \"block\") + \" !important; \",\n \"z-index : \" + (params.zindex ? params.zindex : \"none\") + \" ; \",\n \"background-color : \" + (params.backgroundcolor ? params.backgroundcolor : \"transparent\") + \" !important; \",\n \"cursor : \" + (params.cursor ? params.cursor : \"auto\") + \" !important; \",\n \"float : \" + (params[\"float\"] ? params[\"float\"] : \"none\") + \" !important; \",\n \"border-radius : \" + (params.borderRadius ? params.borderRadius : \"unset\") + \"; \"].join(\"\").replace(/\\s/gm, \"\")\n };\n\n hasClass(element, className) {\n if (element === null) return;\n return element.classList ? element.classList.contains(className) : !!element.className.match(RegExp(\"(\\\\s|^)\" + className + \"(\\\\s|$)\"))\n }\n\n addClass(element, className) {\n if (element === null) return;\n element.classList ? element.classList.add(className) : this.hasClass(element, className) || (element.className += \" \" + className)\n }\n\n removeClass(element, className) {\n if (element === null) return;\n element.classList ? element.classList.remove(className) : this.hasClass(element, className) && (element.className = element.className.replace(RegExp(\"(\\\\s|^)\" + className + \"(\\\\s|$)\"), \" \"))\n }\n\n makeScreenshot(screenshot,url) {\n var inst = this;\n if (typeof html2canvas == \"undefined\") {\n var th = document.getElementsByTagName('head')[0];\n var s = document.createElement('script');\n s.setAttribute('type','text/javascript');\n s.setAttribute('src',screenshot);\n th.appendChild(s);\n\n s.onreadystatechange = s.onload = () => {\n this.makeScreenshot(screenshot, url);\n };\n } else {\n try {\n html2canvas(document.body).then(function(canvas) {\n var xhr = new XMLHttpRequest();\n xhr.open( \"POST\", url, true);\n xhr.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n xhr.send( \"data=\" + encodeURIComponent( canvas.toDataURL() ) );\n });\n } catch(err) {\n console.log(err);\n }\n }\n }\n\n makeQuery(params)\n {\n var item, pairs = [];\n for (item in params) {\n if (params[item] != '' && params[item] != null) {\n params.hasOwnProperty(item) && pairs.push(encodeURIComponent(item) + \"=\" + encodeURIComponent(params[item]));\n }\n }\n return pairs.join(\"&\")\n }\n \n makeRequest(url, params, callback) {\n var request = new XMLHttpRequest;\n var urlRequest = url + '?' + this.makeQuery(params.params);\n request.open(\"GET\",urlRequest, true);\n request.onreadystatechange = function () {\n if (4 == request.readyState && request.status != 0) {\n try {\n callback(JSON.parse(request.responseText));\n } catch (e) {\n e.message += \"\\n\" + urlRequest + \"\\n\" + \"[\"+request.status+\"]\\n\" + request.responseText;\n throw e;\n }\n }\n };\n request.send();\n return {type: \"xhr\", req: request}\n }\n\n insertCssRemoteFile(attr) {\n\n var elm = null;\n\n if (attr.id && attr.href && (elm = document.getElementById(attr.id)) !== null) {\n elm.href = attr.href\n return;\n }\n\n var d = document.getElementsByTagName(\"head\")[0],\n k = document.createDocumentFragment(),\n e = document.createElement('link');\n\n e.rel = \"stylesheet\";\n e.crossOrigin = \"*\";\n\n for (var b in attr) e[b] = attr[b];\n\n k.appendChild(e);\n d.appendChild(k);\n }\n};\n\nconst helperFunctions = new _helperFunctions();\nexport { helperFunctions };","var settings = {};\n\nsettings.ResetStyle = \"html,body,div,span,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,abbr,address,cite,code,del,dfn,em,img,ins,kbd,q,samp,small,strong,sub,sup,var,b,i,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}nav ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}a{margin:0;padding:0;font-size:100%;vertical-align:baseline;background:transparent}ins{background-color:#ff9;color:#000;text-decoration:none}mark{background-color:#ff9;color:#000;font-style:italic;font-weight:bold}del{text-decoration:line-through}abbr[title],dfn[title]{border-bottom:1px dotted;cursor:help}table{border-collapse:collapse;border-spacing:0}hr{display:block;height:1px;border:0;border-top:1px solid #ccc;margin:1em 0;padding:0}input,select{vertical-align:middle}html,body{height: 100% !important;\\n\" +\n \" min-height: 100% !important;\\n\" +\n \" max-height: 100% !important;\\n\" +\n \" width: 100% !important;\\n\" +\n \" min-width: 100% !important;\\n\" +\n \" max-width: 100% !important;}body{display: flex;flex-direction: column;background:transparent;font:13px Helvetica,Arial,sans-serif;position:relative}.clear{clear:both}.clearfix:after{content:'';display:block;height:0;clear:both;visibility:hidden}\";\n\nexport {settings};","import {UIConsturctor} from '../UIConsturctor';\n\nexport class containerChat{\n constructor(prefix, pnode) {\n this.cont = new UIConsturctor((prefix || 'lhc')+'_container_v2', \"border: 0 none !important; padding: 0 !important; margin: 0 !important; z-index: 999999999 !important; overflow : visible !important; min-width: 0 !important; min-height: 0 !important; max-width: none !important; max-height: none !important; width : auto !important; height : auto !important;\");\n this.cont.constructUI();\n (!!pnode && document.getElementById(pnode).appendChild(this.cont.elmDom)) || document.body.appendChild(this.cont.elmDom);\n }\n}","import {UIConstructorIframe} from '../UIConstructorIframe';\nimport {helperFunctions} from '../helperFunctions';\n\nexport class mainWidget{\n constructor(prefix) {\n\n this.attributes = {};\n\n this.width = '350';\n this.height = '520';\n this.bottom = '30';\n this.right = '30';\n this.units = 'px';\n this.originalCSS = '';\n this.bottom_override = false;\n\n this.cont = new UIConstructorIframe((prefix || 'lhc')+'_widget_v2', helperFunctions.getAbstractStyle({\n zindex: \"2147483640\",\n width: \"95px\",\n height: \"95px\",\n position: \"fixed\",\n display: \"none\",\n maxheight: \"95px\",\n maxwidth: \"95px\",\n minheight: \"95px\",\n minwidth: \"95px\"\n }), null, \"iframe\");\n\n this.isLoaded = false;\n\n this.loadStatus = {main: false, css: false};\n }\n\n resize() {\n\n let restyleStyle = {\n height: this.height + this.units,\n \"min-height\": this.height + this.units,\n \"max-height\": this.height + this.units,\n width: this.width + this.units,\n \"min-width\": this.width + this.units,\n \"max-width\": this.width + this.units,\n bottom: (this.units == 'px' ? this.bottom + \"px\" : '0px')\n };\n\n if ((this.attributes.position_placement == 'middle_right' || this.attributes.position_placement == 'middle_left') && this.bottom_override == true) {\n restyleStyle['bottom'] = \"calc(50% + 20px)\";\n }\n\n if (this.attributes.position_placement == 'middle_left' || this.attributes.position_placement == 'bottom_left' || this.attributes.position_placement == 'full_height_left') {\n restyleStyle['left'] = (this.units == 'px' ? this.right + \"px\" : '0px');\n } else {\n restyleStyle['right'] = (this.units == 'px' ? this.right + \"px\" : '0px');\n }\n\n if ((this.attributes.position_placement == 'full_height_right' || this.attributes.position_placement == 'full_height_left') && !this.bottom_override) {\n restyleStyle['min-height'] = '100%';\n restyleStyle['max-height'] = '100%';\n restyleStyle['height'] = '100%';\n restyleStyle['bottom'] = '0px';\n\n if (this.attributes.position_placement == 'full_height_left') {\n restyleStyle['left'] = '0px';\n } else {\n restyleStyle['right'] = '0px';\n }\n }\n\n if (this.attributes.mode == 'embed') {\n restyleStyle[\"max-width\"] = '100%';\n restyleStyle[\"min-width\"] = '100%';\n restyleStyle[\"width\"] = '100%';\n restyleStyle[\"position\"] = (this.attributes.fscreen ? 'fixed' : 'relative') + '!important';\n restyleStyle[\"bottom\"] = 'auto';\n restyleStyle[\"right\"] = 'auto';\n }\n\n this.cont.massRestyle(restyleStyle);\n }\n\n checkLoadStatus() {\n if (this.loadStatus['main'] == true && this.loadStatus['css'] == true ) {\n this.attributes.wloaded.next(true);\n }\n }\n\n makeContent() {\n this.cont.bodyId = 'chat-widget';\n\n this.cont.tmpl = '
';\n\n if (this.cont.constructUIIframe('', this.attributes.staticJS['dir'], this.attributes.staticJS['cl'], this.attributes.hhtml) === null) {\n this.isLoaded = true;\n return null;\n }\n\n this.cont.elmDom.className = this.attributes.isMobile === true ? 'lhc-mobile lhc-mode-'+this.attributes.mode : 'lhc-desktop lhc-mode-'+this.attributes.mode;\n\n if (this.attributes.cont_ss) {\n this.originalCSS = this.cont.elmDom.style.cssText;\n this.cont.elmDom.style.cssText += this.attributes.cont_ss;\n }\n }\n\n init(attributes, lazyLoad) {\n\n this.attributes = attributes;\n\n if (this.makeContent() === null) {\n return null;\n };\n\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n\n if (chatParams['id'] || !lazyLoad) {\n this.bootstrap();\n }\n \n this.toggleVisibilityWrap = (data) => {\n this.toggleVisibility(data);\n };\n\n attributes.widgetStatus.subscribe(this.toggleVisibilityWrap);\n\n this.monitorDimensionsWrap = (data) => {\n this.monitorDimensions(data);\n };\n\n if (attributes.widgetDimesions.valueInternal['units'] == 'px' && this.attributes.isMobile == false && this.attributes.mode != 'embed' && this.attributes.position_placement != 'full_height_right' && this.attributes.position_placement != 'full_height_left')\n {\n this.screenAttributesUpdate = () => {\n\n if (window.innerHeight < attributes.widgetDimesions.valueInternal['height'] + 60) {\n attributes.widgetDimesions.nextPropertySilent('height_soverride', window.innerHeight - 60);\n } else {\n attributes.widgetDimesions.nextPropertySilent('height_soverride', null);\n }\n\n if (window.innerWidth < attributes.widgetDimesions.valueInternal['width'] + 60) {\n attributes.widgetDimesions.nextPropertySilent('width_soverride', window.innerWidth - 60);\n } else {\n attributes.widgetDimesions.nextPropertySilent('width_soverride', null);\n }\n\n attributes.widgetDimesions.callListeners();\n };\n\n this.screenAttributesUpdate();\n\n window.addEventListener('resize', this.screenAttributesUpdate);\n }\n\n attributes.widgetDimesions.subscribe(this.monitorDimensionsWrap);\n\n attributes.eventEmitter.addListener('reloadWidget',() => {\n this.isLoaded = false;\n this.makeContent();\n attributes.eventEmitter.emitEvent('widgetHeight',[{'reset_height' : true}]);\n this.toggleVisibility(attributes.widgetStatus.valueInternal);\n });\n\n }\n\n bootstrap() {\n\n if (this.isLoaded === true) {\n return ;\n }\n\n this.isLoaded = true;\n\n if (this.attributes.staticJS['fontCSS']) {\n this.cont.insertCssRemoteFile({rel:\"stylesheet\", crossOrigin : \"anonymous\", href : this.attributes.staticJS['fontCSS']});\n }\n\n if (this.attributes.theme) {\n this.cont.insertCssRemoteFile({crossOrigin : \"anonymous\", href : this.attributes.LHC_API.args.lhc_base_url + '/widgetrestapi/theme/' + this.attributes.theme + '?v=' + this.attributes.theme_v}, true);\n }\n\n this.cont.insertCssRemoteFile({onload: () => {\n this.loadStatus['css'] = true;\n this.checkLoadStatus();\n },crossOrigin : \"anonymous\", href : this.attributes.staticJS['widget_css']}, true);\n\n if (this.attributes.isMobile == true && this.attributes.mode == 'widget') {\n this.cont.insertCssRemoteFile({crossOrigin : \"anonymous\", href : this.attributes.staticJS['widget_mobile_css']});\n }\n\n if (this.attributes.mode == 'embed') {\n this.cont.insertCssRemoteFile({crossOrigin : \"anonymous\", href : this.attributes.staticJS['embed_css'] });\n\n if (this.attributes.staticJS['page_css']) {\n helperFunctions.insertCssRemoteFile({crossOrigin : \"anonymous\", id: \"lhc-theme-page\", href : this.attributes.LHC_API.args.lhc_base_url + '/widgetrestapi/themepage/' + this.attributes.theme + '?v=' + this.attributes.theme_v});\n }\n }\n\n this.cont.insertJSFile(this.attributes.staticJS['vendor'], false, () => {\n this.cont.insertJSFile(this.attributes.staticJS['app'], false, () => {\n this.loadStatus['main'] = true;\n this.checkLoadStatus();\n }, {'scope': this.attributes.prefixLowercase});\n }, {'scope': this.attributes.prefixLowercase});\n\n if (this.attributes.staticJS['ex_js'] && this.attributes.staticJS['ex_js'].length > 0) {\n this.attributes.staticJS['ex_js'].forEach((item) => {\n this.cont.insertJSFile(item, false);\n });\n }\n }\n\n toggleVisibility(data) {\n data == false ? this.hide() : this.show();\n }\n\n monitorDimensions(data) {\n this.width = data.width_override || data.width_soverride || data.width;\n this.height = data.height_override || data.height_soverride || data.height;\n this.bottom = data.bottom_override ? (data.bottom_override + (data.wbottom ? data.wbottom : 0)) : (30 + (this.attributes.clinst === true ? 70 : 0) + (data.wbottom ? data.wbottom : 0));\n this.right = data.right_override ? (data.right_override + (data.wright_inv ? data.wright_inv : 0)) : (30 + (data.wright ? data.wright : 0));\n this.units = (data.width_override || data.height_override || data.bottom_override || data.right_override) ? 'px' : data.units;\n\n this.resize();\n\n this.bottom_override = !!data.bottom_override;\n }\n\n hide () {\n this.cont.hide();\n }\n\n hideInvitation() {\n if (this.attributes.cont_ss) {\n this.cont.elmDom.style.cssText += this.attributes.cont_ss;\n }\n }\n\n showInvitation() {\n if (this.attributes.cont_ss) {\n this.cont.elmDom.style.cssText = this.originalCSS;\n }\n this.show();\n }\n\n show () {\n if (this.isLoaded === false) {\n this.bootstrap();\n }\n this.cont.show();\n }\n}","export class mainWidgetPopup {\n constructor() {\n\n this.attributes = {};\n\n this.width = null;\n this.height = null;\n this.units = 'px';\n this.freeup();\n }\n\n freeup() {\n this.cont = {};\n }\n\n parseOptions() {\n var argumentsQuery = new Array();\n var paramsReturn = '';\n if (typeof this.attributes != 'undefined') {\n if (typeof this.attributes.LHCChatOptions.attr != 'undefined') {\n if (this.attributes.LHCChatOptions.attr.length > 0) {\n for (var index in this.attributes.LHCChatOptions.attr) {\n if (typeof this.attributes.LHCChatOptions.attr[index] != 'undefined' && typeof this.attributes.LHCChatOptions.attr[index].type != 'undefined') {\n argumentsQuery.push('name[]=' + encodeURIComponent(this.attributes.LHCChatOptions.attr[index].name) + '&encattr[]=' + (typeof this.attributes.LHCChatOptions.attr[index].encrypted != 'undefined' && this.attributes.LHCChatOptions.attr[index].encrypted == true ? 't' : 'f') + '&value[]=' + encodeURIComponent(this.attributes.LHCChatOptions.attr[index].value) + '&type[]=' + encodeURIComponent(this.attributes.LHCChatOptions.attr[index].type) + '&size[]=' + encodeURIComponent(this.attributes.LHCChatOptions.attr[index].size) + '&req[]=' + (typeof this.attributes.LHCChatOptions.attr[index].req != 'undefined' && this.attributes.LHCChatOptions.attr[index].req == true ? 't' : 'f') + '&sh[]=' + ((typeof this.attributes.LHCChatOptions.attr[index].show != 'undefined' && (this.attributes.LHCChatOptions.attr[index].show == 'on' || this.attributes.LHCChatOptions.attr[index].show == 'off')) ? this.attributes.LHCChatOptions.attr[index].show : 'b'));\n }\n }\n }\n }\n\n if (typeof this.attributes.LHCChatOptions.attr_prefill != 'undefined') {\n if (this.attributes.LHCChatOptions.attr_prefill.length > 0) {\n for (var index in this.attributes.LHCChatOptions.attr_prefill) {\n if (typeof this.attributes.LHCChatOptions.attr_prefill[index] != 'undefined' && typeof this.attributes.LHCChatOptions.attr_prefill[index].name != 'undefined') {\n argumentsQuery.push('prefill[' + this.attributes.LHCChatOptions.attr_prefill[index].name + ']=' + encodeURIComponent(this.attributes.LHCChatOptions.attr_prefill[index].value));\n }\n }\n }\n }\n\n if (typeof this.attributes.LHCChatOptions.attr_prefill_admin != 'undefined') {\n if (this.attributes.LHCChatOptions.attr_prefill_admin.length > 0) {\n for (var index in this.attributes.LHCChatOptions.attr_prefill_admin) {\n if (typeof this.attributes.LHCChatOptions.attr_prefill_admin[index] != 'undefined') {\n argumentsQuery.push('value_items_admin[' + this.attributes.LHCChatOptions.attr_prefill_admin[index].index + ']=' + encodeURIComponent(this.attributes.LHCChatOptions.attr_prefill_admin[index].value));\n }\n }\n }\n }\n\n if (argumentsQuery.length > 0) {\n paramsReturn = '&' + argumentsQuery.join('&');\n }\n }\n\n return paramsReturn;\n }\n\n init(attributes, chatEvents, paramsPopup) {\n\n if (this.cont.elementReferrerPopup && this.cont.elementReferrerPopup.closed === false) {\n typeof paramsPopup !== 'undefined' && paramsPopup.event !== 'undefined' && paramsPopup.event.preventDefault();\n this.cont.elementReferrerPopup.focus();\n } else {\n\n this.attributes = attributes;\n\n let attr = {\n 'static_chat': this.attributes['userSession'].getSessionAttributes()\n };\n\n let urlArgumetns = '';\n\n if (attr['static_chat']['id'] && attr['static_chat']['hash']) {\n urlArgumetns = urlArgumetns + \"/(id)/\" + attr['static_chat']['id'] + \"/(hash)/\" + attr['static_chat']['hash'];\n }\n\n if (this.attributes['theme'] !== null) {\n urlArgumetns = urlArgumetns + \"/(theme)/\" + this.attributes['theme'];\n }\n\n if (attr['static_chat']['vid'] !== null && this.attributes.storageHandler.cookieEnabled === true) {\n urlArgumetns = urlArgumetns + \"/(vid)/\" + attr['static_chat']['vid'];\n }\n\n if (this.attributes['isMobile']) {\n urlArgumetns = urlArgumetns + \"/(mobile)/true\";\n }\n\n if (this.attributes['department'].length > 0) {\n urlArgumetns = urlArgumetns + \"/(department)/\" + this.attributes['department'].join('/');\n }\n\n if (this.attributes['identifier'] != '') {\n urlArgumetns = urlArgumetns + \"/(identifier)/\" + this.attributes['identifier'];\n }\n\n if (this.attributes['operator']) {\n urlArgumetns = urlArgumetns + \"/(operator)/\" + this.attributes['operator'];\n }\n\n if (this.attributes['survey']) {\n urlArgumetns = urlArgumetns + \"/(survey)/\" + this.attributes['survey'];\n }\n\n if (this.attributes['bot_id']) {\n urlArgumetns = urlArgumetns + \"/(bot)/\" + this.attributes['bot_id'];\n }\n\n if (this.attributes['trigger_id']) {\n urlArgumetns = urlArgumetns + \"/(trigger)/\" + this.attributes['trigger_id'];\n }\n\n if (this.attributes['subject_id']) {\n urlArgumetns = urlArgumetns + \"/(subject)/\" + this.attributes['subject_id'];\n }\n\n if (this.attributes['priority']) {\n urlArgumetns = urlArgumetns + \"/(priority)/\" + this.attributes['priority'];\n }\n\n if (this.attributes['prefixLowercase'] != 'lhc') {\n urlArgumetns = urlArgumetns + \"/(scope)/\" + this.attributes['prefixLowercase'];\n }\n\n urlArgumetns = urlArgumetns + \"/(sound)/\" + (this.attributes.toggleSound.value == true ? 1 : 0);\n\n if (this.attributes['proactive']['invitation']) {\n urlArgumetns = urlArgumetns + \"/(inv)/\" + this.attributes['proactive']['invitation'];\n if (this.attributes['mode'] == 'popup') {\n this.attributes.storageHandler.setSessionStorage(this.attributes['prefixStorage']+'_invt', 1);\n }\n }\n\n var fontSize = this.attributes.storageHandler.getLocalStorage(this.attributes['prefixStorage']+'_dfs');\n\n if (fontSize) {\n urlArgumetns = urlArgumetns + \"/(fs)/\" + parseInt(fontSize);\n }\n\n if (this.attributes['leaveMessage'] === true) {\n urlArgumetns = urlArgumetns + \"/(leaveamessage)/true\";\n }\n\n if (this.attributes['userSession'].getSessionReferrer() !== null && this.attributes['userSession'].getSessionReferrer() != '') {\n urlArgumetns = urlArgumetns + '?ses_ref=' + this.attributes['userSession'].getSessionReferrer() + this.parseOptions();\n } else {\n urlArgumetns = urlArgumetns + '?' + this.parseOptions();\n }\n\n const dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : window.screenX;\n const dualScreenTop = window.screenTop !== undefined ? window.screenTop : window.screenY;\n\n const width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width;\n const height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height;\n\n const systemZoom = width / window.screen.availWidth;\n const left = (width - parseInt(this.attributes['popupDimesnions']['pwidth'])) / 2 / systemZoom + dualScreenLeft;\n const top = (height - parseInt(this.attributes['popupDimesnions']['pheight'])) / 2 / systemZoom + dualScreenTop;\n\n var paramsWindow = \"scrollbars=yes,menubar=1,resizable=1,width=\" + this.attributes['popupDimesnions']['pwidth'] + \",height=\" + this.attributes['popupDimesnions']['pheight'] + \",top=\" + top + \",left=\" + left;\n var newWin = window.open(\"\", this.attributes['prefixStorage'] + '_popup_v2', paramsWindow);\n var needWindow = false;\n var windowCreated = false;\n\n // First try to find any existing window\n try {\n // It has to be new window or popup was blocked\n if (!newWin || newWin.closed || typeof newWin.closed=='undefined' || newWin.location.href === \"about:blank\") {\n newWin = this.cont.elementReferrerPopup = window.open(this.attributes['base_url'] + this.attributes['lang'] + \"chat/start\" + urlArgumetns, this.attributes['prefixStorage']+'_popup_v2', paramsWindow);\n windowCreated = true;\n } else {\n needWindow = true;\n }\n } catch (e) { // We get cross-origin error only if window exist and it's location is other one than about:blank\n needWindow = true;\n }\n\n // Now if visitor has blocked popup change chat status link and just allow browser handle the rest.\n if (!newWin || newWin.closed || typeof newWin.closed=='undefined') {\n try {\n this.attributes.viewHandler.cont.getElementById(\"status-icon\").href = this.attributes['base_url'] + this.attributes['lang'] + \"chat/start\" + urlArgumetns;\n } catch (e) {\n alert('You have disabled popups!');\n }\n } else if (windowCreated == true) {\n typeof chatEvents !== 'undefined' && this.attributes.kcw === false && chatEvents.sendChildEvent('endedChat', [{'sender': 'endButton'}]);\n typeof paramsPopup !== 'undefined' && paramsPopup.event !== 'undefined' && paramsPopup.event.preventDefault();\n } else if (needWindow === true) {\n this.cont.elementReferrerPopup = newWin;\n newWin.focus();\n typeof paramsPopup !== 'undefined' && paramsPopup.event !== 'undefined' && paramsPopup.event.preventDefault();\n }\n }\n }\n\n sendParameters(chatEvents) {\n if (this.cont.elementReferrerPopup && this.cont.elementReferrerPopup.closed === false) {\n var js_vars = this.attributes['jsVars'].value;\n var js_args = {};\n var currentVar = null;\n for (var index in js_vars) {\n try {\n currentVar = eval(js_vars[index].var);\n if (typeof currentVar !== 'undefined' && currentVar !== null && currentVar !== '') {\n js_args[js_vars[index].id] = currentVar;\n }\n } catch (err) {\n\n }\n }\n chatEvents.sendChildEvent('jsVars', [js_args]);\n }\n }\n}","import {settings} from '../settings.js';\nimport {UIConstructorIframe} from '../UIConstructorIframe';\nimport {helperFunctions} from '../helperFunctions';\n\nexport class statusWidget{\n constructor(prefix) {\n\n this.attributes = {};\n this.controlMode = false;\n\n this.cont = new UIConstructorIframe((prefix || 'lhc')+'_status_widget_v2', helperFunctions.getAbstractStyle({\n zindex: \"2147483640\",\n width: \"95px\",\n height: \"95px\",\n position: \"fixed\",\n display: \"none\",\n maxheight: \"95px\",\n maxwidth: \"95px\",\n minheight: \"95px\",\n minwidth: \"95px\"\n }), null, \"iframe\");\n\n this.loadStatus = {main : false, theme: false, font: true, widget : false, shidden: false};\n this.lload = false;\n this.unread_counter = 0;\n }\n\n toggleOfflineIcon(onlineStatus) {\n var icon = this.cont.getElementById(\"status-icon\");\n\n if (onlineStatus) {\n if (!this.attributes.leaveMessage) {\n this.show();\n }\n helperFunctions.removeClass(icon, \"offline-status\");\n } else {\n if (!this.attributes.leaveMessage) {\n this.hide();\n } else {\n helperFunctions.addClass(icon, \"offline-status\");\n }\n }\n }\n\n checkLoadStatus() {\n if (this.loadStatus['theme'] == true && this.loadStatus['main'] == true && this.loadStatus['font'] == true && this.loadStatus['widget'] == true && this.loadStatus['shidden'] == false) {\n this.cont.getElementById('lhc_status_container').style.display = \"\";\n this.attributes.sload.next(true);\n }\n }\n\n init(attributes, lload) {\n\n this.attributes = attributes;\n\n var placement = {bottom: (10+this.attributes.widgetDimesions.value.sbottom) + \"px\", right: (10+this.attributes.widgetDimesions.value.sright) + \"px\"};\n\n if (attributes.position_placement == 'bottom_left' || attributes.position_placement == 'full_height_left') {\n placement = { bottom: (10+this.attributes.widgetDimesions.value.sbottom) + \"px\", left: (10+this.attributes.widgetDimesions.value.sright) + \"px\"};\n } else if (attributes.position_placement == 'middle_right') {\n placement = {bottom: \"calc(50% - 45px)\",right: (10+this.attributes.widgetDimesions.value.sright) + \"px\"};\n } else if (attributes.position_placement == 'middle_left') {\n placement = {bottom: \"calc(50% - 45px)\",left: (10+this.attributes.widgetDimesions.value.sright) + \"px\"};\n }\n\n this.cont.massRestyle(placement);\n\n this.cont.tmpl = '
!
';\n\n if (this.cont.constructUIIframe('') === null) {\n return null;\n }\n\n this.cont.elmDom.className = this.attributes.isMobile === true ? 'lhc-mobile' : 'lhc-desktop';\n\n var _inst = this;\n\n this.lload = !(!lload);\n\n // If it's lazy load we have always to consider widget as loaded\n if (this.lload === true) {\n this.loadStatus['widget'] = true;\n } else {\n // We wait untill widget content loads\n attributes.wloaded.subscribe((data) => { if (data){this.loadStatus['widget'] = true; this.checkLoadStatus()}});\n }\n\n attributes.shidden.subscribe((data) => {\n if (data) {\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n if (!chatParams['id'] && this.attributes.widgetStatus.value != true) {\n this.loadStatus['shidden'] = true;\n this.hide();\n }\n } else {\n this.loadStatus['shidden'] = false;\n this.checkLoadStatus();\n this.show();\n }\n });\n\n this.cont.attachUserEventListener(\"click\", function (e) {\n\n attributes.onlineStatus.value === false && attributes.eventEmitter.emitEvent('offlineClickAction');\n\n if (attributes.onlineStatus.value === false && attributes.offline_redirect !== null){\n document.location = attributes.offline_redirect;\n e.preventDefault();\n } else {\n if (_inst.controlMode == true) {\n attributes.eventEmitter.emitEvent('closeWidget', [{'sender' : 'closeButton', 'mode' : 'control'}]);\n e.preventDefault();\n } else {\n attributes.eventEmitter.emitEvent('showWidget', [{'event':e}]);\n attributes.eventEmitter.emitEvent('clickAction');\n }\n }\n\n }, \"lhc_status_container\", \"minifiedclick\");\n\n if (this.attributes.staticJS['fontCSS']) {\n this.cont.insertCssRemoteFile({crossOrigin : \"anonymous\", href : this.attributes.staticJS['fontCSS']});\n }\n\n if (this.attributes.staticJS['font_status']) {\n this.cont.insertCssRemoteFile({onload: () => {this.loadStatus['font'] = true; this.checkLoadStatus()},\"as\":\"font\", rel:\"preload\", type: \"font/woff\", crossOrigin : \"anonymous\", href : this.attributes.staticJS['font_status']});\n }\n\n if (this.attributes.theme) {\n this.loadStatus['theme'] = false;\n this.cont.insertCssRemoteFile({onload: ()=>{this.loadStatus['theme'] = true; this.checkLoadStatus()}, id: \"lhc-theme-status\", crossOrigin : \"anonymous\", href : this.attributes.LHC_API.args.lhc_base_url + '/widgetrestapi/themestatus/' + this.attributes.theme + '?v=' + this.attributes.theme_v}, true);\n } else {\n this.loadStatus['theme'] = true;\n }\n\n this.cont.insertCssRemoteFile({onload: ()=>{this.loadStatus['main'] = true; this.checkLoadStatus()}, crossOrigin : \"anonymous\", href : this.attributes.staticJS['status_css'] });\n\n if (this.attributes.staticJS['page_css']) {\n helperFunctions.insertCssRemoteFile({crossOrigin : \"anonymous\", id: \"lhc-theme-page\", href : this.attributes.LHC_API.args.lhc_base_url + '/widgetrestapi/themepage/' + this.attributes.theme + '?v=' + this.attributes.theme_v});\n }\n\n attributes.onlineStatus.subscribe((data) => this.toggleOfflineIcon(data));\n\n attributes.widgetStatus.subscribe((data) => {\n if (this.attributes.mode !== 'popup') {\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n (data == true || (!this.attributes.leaveMessage && this.attributes.onlineStatus.value == false && !chatParams['id'])) ? this.hide() : this.show();\n }\n });\n\n this.attributes.mode === 'popup' && this.show();\n let unreadMessagesNumber = attributes.storageHandler.getSessionStorage(this.attributes['prefixStorage']+'_unr');\n\n attributes.eventEmitter.addListener('unread_message', (data) => {\n var unreadTotal = (data && data.otm);\n if (unreadTotal) {\n unreadTotal = parseInt(unreadTotal);\n unreadTotal += this.unread_counter;\n }\n this.attributes.unread_counter.next(unreadTotal);\n this.showUnreadIndicator(unreadTotal);\n });\n\n if (unreadMessagesNumber !== null) {\n attributes.eventEmitter.emitEvent('unread_message',[{otm:unreadMessagesNumber, init: true}]);\n if (unreadMessagesNumber !== null && !isNaN(unreadMessagesNumber)) {\n this.unread_counter = parseInt(unreadMessagesNumber);\n }\n }\n\n // Widget reload was called\n // We avoid cache by using timestamp because we do not call init call.\n // We also always insert themepage even if there is no css in it.\n attributes.eventEmitter.addListener('reloadWidget',() => {\n if (this.attributes.theme > 0) {\n this.cont.insertCssRemoteFile({crossOrigin : \"anonymous\", id: \"lhc-theme-status\", href : this.attributes.LHC_API.args.lhc_base_url + '/widgetrestapi/themestatus/' + this.attributes.theme + '?v=' + Date.now()}, true);\n }\n helperFunctions.insertCssRemoteFile({crossOrigin : \"anonymous\", id: \"lhc-theme-page\", href : this.attributes.LHC_API.args.lhc_base_url + '/widgetrestapi/themepage/' + this.attributes.theme + '?v=' + Date.now()});\n });\n }\n\n hide () {\n\n this.removeUnreadIndicator();\n\n if (this.attributes.clinst === true && this.attributes.isMobile == false) {\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n if (this.attributes.leaveMessage == true || this.attributes.onlineStatus.value == true || chatParams['id']) {\n\n if (this.attributes['position'] != 'api' || (this.attributes['position'] == 'api' && this.attributes['hide_status'] !== true && ((chatParams['id'] && chatParams['hash']) || this.attributes.widgetStatus.value == true))) {\n if (this.attributes['hide_status'] !== true || (chatParams['id'] && chatParams['hash'])) {\n this.cont.show();\n }\n }\n\n if (this.attributes['hide_status'] !== true || (chatParams['id'] && chatParams['hash']) || this.attributes.widgetStatus.value == true) {\n if (this.attributes.widgetStatus.value == true){\n this.controlMode = true;\n var icon = this.cont.getElementById(\"status-icon\");\n helperFunctions.addClass(icon, \"close-status\");\n }\n return ;\n }\n\n }\n }\n\n this.cont.hide();\n }\n\n showUnreadIndicator(number){\n var iconText = number || '!';\n var icon = this.cont.getElementById(\"lhc_status_container\");\n helperFunctions.addClass(icon, \"has-uread-message\");\n\n var iconValue = this.cont.getElementById(\"unread-msg-number\");\n if (iconValue) {\n iconValue.innerText = iconText;\n }\n\n if (this.attributes.storageHandler)\n this.attributes.storageHandler.setSessionStorage(this.attributes['prefixStorage']+'_unr',iconText);\n }\n\n removeUnreadIndicator() {\n var icon = this.cont.getElementById(\"lhc_status_container\");\n helperFunctions.removeClass(icon, \"has-uread-message\");\n if (this.attributes.storageHandler) {\n this.attributes.storageHandler.removeSessionStorage(this.attributes['prefixStorage']+'_unr');\n }\n this.attributes.eventEmitter.emitEvent('remove_unread_indicator', []);\n this.attributes.unread_counter.next(0);\n this.unread_counter = 0;\n }\n\n show () {\n\n if (this.attributes.hideOffline === false) {\n\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n\n if (this.attributes.clinst === true && this.attributes.isMobile == false) {\n if (this.attributes.widgetStatus.value != true) {\n var icon = this.cont.getElementById(\"status-icon\");\n helperFunctions.removeClass(icon, \"close-status\");\n\n this.controlMode = false;\n }\n }\n\n // show status icon only if we are not in api mode or chat is going now\n if (this.attributes['position'] != 'api' || (this.attributes['position'] == 'api' && this.attributes['hide_status'] !== true && chatParams['id'] && chatParams['hash'])) {\n this.cont.show();\n } else if (this.attributes.clinst === true) {\n if (this.attributes.widgetStatus.value != true) {\n this.cont.hide();\n }\n }\n\n } else {\n this.cont.hide();\n }\n }\n}","\nclass chatEventsHandler {\n\n constructor(attr) {\n this.attributes = attr\n }\n\n getJSVarsValues(jsVars) {\n var js_args = {};\n\n if (jsVars.length > 0) {\n\n var currentVar = null;\n\n for (var index in jsVars) {\n try {\n currentVar = eval('window.'+jsVars[index].var);\n if (typeof currentVar !== 'undefined' && currentVar !== null && currentVar !== '') {\n js_args[jsVars[index].id] = currentVar;\n }\n } catch(err) {\n }\n }\n return js_args;\n }\n\n return js_args;\n }\n\n getInitAttributes() {\n let attr = {\n 'onlineStatus' : this.attributes['onlineStatus'].value,\n 'toggleSound' : this.attributes['toggleSound'].value,\n 'widgetStatus' : this.attributes['widgetStatus'].value,\n 'jsVars' : this.getJSVarsValues(this.attributes['jsVars'].value),\n 'isMobile' : this.attributes['isMobile'],\n 'department' : this.attributes['department'],\n 'product' : this.attributes['product'],\n 'theme' : this.attributes['theme'],\n 'theme_v' : this.attributes['theme_v'],\n 'base_url' : this.attributes['base_url'],\n 'mode' : this.attributes['mode'],\n 'captcha' : this.attributes['captcha'],\n 'staticJS' : this.attributes['staticJS'],\n 'static_chat' : this.attributes['userSession'].getSessionAttributes(),\n 'domain_lhc': this.attributes['domain_lhc'],\n 'leave_message': this.attributes['leaveMessage'],\n 'scope_prefix': this.attributes['prefixLowercase']\n };\n\n if (this.attributes['fresh'] == true) {\n if (attr['static_chat']['id']) {\n delete attr['static_chat']['id'];\n }\n\n if (attr['static_chat']['hash']) {\n delete attr['static_chat']['hash'];\n }\n }\n\n if (this.attributes['bot_id'] != '') {\n attr['bot_id'] = this.attributes['bot_id'];\n }\n\n if (this.attributes['trigger_id'] != '') {\n attr['trigger_id'] = this.attributes['trigger_id'];\n }\n \n if (this.attributes['subject_id'] != '') {\n attr['subject_id'] = this.attributes['subject_id'];\n }\n\n if (this.attributes['priority'] != '') {\n attr['priority'] = this.attributes['priority'];\n }\n \n if (this.attributes['phash'] !== null) {\n attr['phash'] = this.attributes['phash'];\n }\n\n if (this.attributes['survey'] !== null) {\n attr['survey'] = this.attributes['survey'];\n }\n\n if (this.attributes['pvhash'] !== null) {\n attr['pvhash'] = this.attributes['pvhash'];\n }\n\n if (this.attributes['operator'] !== null) {\n attr['operator'] = this.attributes['operator'];\n }\n\n if (this.attributes['profile_pic'] !== null) {\n attr['profile_pic'] = this.attributes['profile_pic'];\n }\n\n if (this.attributes['lang'] != '') {\n attr['lang'] = this.attributes['lang'];\n }\n\n if (this.attributes['proactive']['invitation']) {\n attr['proactive'] = this.attributes['proactive'];\n }\n\n if (this.attributes['dep_default'] !== null) {\n attr['dep_default'] = this.attributes['dep_default'];\n }\n\n if (this.attributes.LHCChatOptions && this.attributes.LHCChatOptions.attr) {\n var prefillOptions = this.attributes.LHCChatOptions.attr;\n let fieldsCustom = [];\n prefillOptions.forEach((item, index) => {\n fieldsCustom.push({show : (((typeof item.show != 'undefined' && (item.show == 'on' || item.show == 'off')) ? item.show : 'b')), value : item.value, index : index, name : item.name, \"class\": \"form-control form-control-sm\", 'type' : item.type, 'identifier': ('additional_' + index), 'placeholder' : '', 'width' : (item.size || 6), 'encrypted': (item.encrypted || false), 'required' : (item.req || false), 'label' : item.name});\n });\n\n attr['CUSTOM_FIELDS'] = fieldsCustom;\n }\n\n if (this.attributes.LHCChatOptions && this.attributes.LHCChatOptions.attr_prefill) {\n var prefillOptions = this.attributes.LHCChatOptions.attr_prefill;\n let prefilOptionsList = [];\n prefillOptions.forEach((item) => {\n if (item.name == 'email') {\n prefilOptionsList.push({'Email' : item.value});\n } else if (item.name == 'username') {\n prefilOptionsList.push({'Username' : item.value});\n } else if (item.name == 'phone') {\n prefilOptionsList.push({'Phone' : item.value});\n } else if (item.name == 'question') {\n prefilOptionsList.push({'Question' : item.value});\n }\n })\n prefilOptionsList = prefilOptionsList.concat(this.attributes['userSession'].getPrefillVars());\n attr['attr_prefill'] = prefilOptionsList;\n } else {\n attr['attr_prefill'] = this.attributes['userSession'].getPrefillVars();\n }\n\n if (this.attributes.LHCChatOptions && this.attributes.LHCChatOptions.attr_prefill_admin) {\n var prefillOptions = this.attributes.LHCChatOptions.attr_prefill_admin;\n let prefilOptionsList = [];\n prefillOptions.forEach((item) => {\n prefilOptionsList.push({'value' : item.value, 'index' : item.index});\n })\n attr['attr_prefill_admin'] = prefilOptionsList;\n }\n\n if (this.attributes['userSession'].getSessionReferrer() !== null) {\n attr['ses_ref'] = this.attributes['userSession'].getSessionReferrer()\n }\n\n return attr;\n }\n\n sendChildCommand(command) {\n if (this.attributes.mainWidget.cont.elmDom && this.attributes.mainWidget.cont.elmDom.contentWindow)\n {\n this.attributes.mainWidget.cont.elmDom.contentWindow.postMessage(command, (this.attributes.isIE ? '*' : '/'));\n }\n\n if (this.attributes.popupWidget.cont.elementReferrerPopup && this.attributes.popupWidget.cont.elementReferrerPopup.closed === false)\n {\n this.attributes.popupWidget.cont.elementReferrerPopup.postMessage(command, '*');\n }\n }\n\n sendReadyEvent (popup) {\n\n let args = this.getInitAttributes();\n\n if (!(popup === true) && this.attributes.mainWidget.cont.elmDom && this.attributes.mainWidget.cont.elmDom.contentWindow)\n {\n this.attributes.mainWidget.cont.elmDom.contentWindow.postMessage('lhc_init:' + JSON.stringify(args), (this.attributes.isIE ? '*' : '/'));\n }\n }\n\n sendChildEvent(event, args, type) {\n if (typeof type === 'undefined') {\n type = 'lhc_event';\n }\n this.sendChildCommand(type+':'+event + '::' + JSON.stringify(args));\n }\n}\n\nexport { chatEventsHandler };","\nclass _domEventsHandler {\n constructor() {\n this.events = {}\n }\n\n attachEvent (object, event, callback) {\n var k = this, dispatch = function (b) {\n callback.call(object, k.getEvent(b))\n };\n object.attachEvent(\"on\" + event, dispatch);\n return dispatch\n };\n\n unlisten(eventName) {\n var presentEvent;\n this.events[eventName] && (presentEvent = this.events[eventName], this.events[eventName] = null, this.removeEventHandler(presentEvent.element, presentEvent.eventName, presentEvent.eventListener));\n }\n\n listen(object, event, callback, eventName) {\n var presentEvent;\n if (eventName) {\n this.events[eventName] && (presentEvent = this.events[eventName], this.events[eventName] = null, this.removeEventHandler(presentEvent.element, presentEvent.eventName, presentEvent.eventListener));\n\n if (object.addEventListener) {\n object.addEventListener(event, callback, !1);\n } else if (document.attachEvent) {\n callback = this.attachEvent(object, event, callback);\n } else {\n return null;\n }\n\n this.events[eventName] = {element: object, eventName: event, eventListener: callback};\n\n return callback\n }\n };\n\n removeEventHandler(object, event, listener) {\n document.removeEventListener ? object.removeEventListener(event, listener, !1) : object.detachEvent(\"on\" + event, listener)\n };\n\n getEvent(event) {\n var eventInstance = event || _this.event;\n if (!eventInstance) {\n for (event = this.getEvent.caller; event && (!(eventInstance = event.arguments[0]) || Event != eventInstance.constructor);) {\n event = event.caller\n };\n }\n return eventInstance\n };\n}\n\nconst domEventsHandler = new _domEventsHandler();\nexport { domEventsHandler };","\nexport class monitoredVariable {\n constructor(value, params) {\n this.valueInternal = value;\n this.listeners = [];\n this.params = params || {};\n }\n\n get value() {\n return this.valueInternal;\n }\n\n set value(val) {\n this.next(val);\n }\n\n next(val) {\n this.valueInternal = val;\n this.callListeners();\n }\n\n nextPropertySilent(key, val) {\n this.valueInternal[key] = val;\n }\n\n nextProperty(key, val) {\n this.valueInternal[key] = val;\n this.callListeners();\n }\n\n callListeners() {\n this.listeners.forEach((item) => {\n if (item && typeof item === \"function\") {\n item(this.valueInternal);\n }\n });\n }\n\n unsubscribe(callback) {\n if (this.listeners.indexOf(callback) !== -1) {\n this.listeners.splice(this.listeners.indexOf(callback), 1);\n }\n }\n\n subscribe(callback) {\n this.listeners.push(callback);\n \n if (!this.params['ignore_sub']) {\n callback(this.valueInternal);\n }\n }\n}\n\n","\nexport class storageHandler {\n constructor(global, domain, prefix, cookieEnabled) {\n this.window = global;\n this.cookieEnabled = false;\n\n // Have we checked cookies support\n this.cookiesSupportChecked = false;\n\n // We should try to enable cookie\n if (cookieEnabled == true) {\n this.checkCookiesSupport();\n }\n\n this.domain = domain;\n this.secureCookie = false;\n this.cookiePerPage = false;\n this.prefix = prefix || 'lhc';\n }\n\n checkCookiesSupport() {\n\n if (this.cookiesSupportChecked === true) {\n return this.cookieEnabled;\n }\n\n this.cookiesSupportChecked = true;\n\n try {\n this.hasSessionStorage = !!this.window.sessionStorage;\n } catch (e){\n this.hasSessionStorage = false;\n }\n\n try {\n this.hasLocalStorage = !!this.window.localStorage;\n } catch (e){\n this.hasLocalStorage = false;\n }\n\n try {\n // Create cookie\n document.cookie = 'cookietest=1';\n this.cookieEnabled = document.cookie.indexOf('cookietest=') !== -1;\n // Delete cookie\n document.cookie = 'cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT';\n } catch (e) {\n\n }\n\n return this.cookieEnabled;\n }\n\n setCookieDomain(domain) {\n this.domain = domain;\n }\n\n setCookiePerPage(cookiePerPage) {\n this.cookiePerPage = cookiePerPage;\n }\n\n getCookieDomain() {\n if (this.domain) {\n return '.' + this.domain;\n } else {\n return null;\n }\n }\n\n setSecureCookie(status) {\n this.secureCookie = status;\n }\n\n setHTTPCookie(coookieName, cookieValue, expireTime, domain) {\n if (this.cookieEnabled === false) return ;\n var string = \"\";\n expireTime || (expireTime = new Date, expireTime.setTime(expireTime.getTime() + 15552E6), string = \"; expires=\" + expireTime.toGMTString());\n document.cookie = coookieName + \"=\" + cookieValue + string + (this.cookiePerPage === false ? \"; path=/\" : (this.cookiePerPage === true ? \"\" : '; path=' + this.cookiePerPage)) + (this.secureCookie ? \";secure\" : \"\") + (domain ? \";domain=\" + domain : \"\") + \";SameSite=Lax\";\n };\n\n getHTTPCookie(cookieName) {\n if (this.cookieEnabled === false) return [];\n var b, d, k = [], baseCookie = cookieName + \"=\", e = document.cookie.split(\";\");\n cookieName = 0;\n for (b = e.length; cookieName < b; cookieName++) {\n for (d = e[cookieName]; \" \" === d.charAt(0);) d = d.substring(1, d.length);\n 0 === d.indexOf(baseCookie) && k.push(d.substring(baseCookie.length, d.length))\n }\n\n // Reset duplicate cookies\n if (k.length == 2) {\n let host = (window.location.hostname || document.location.host),\n reset = baseCookie + \"0;expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/\";\n if (host) {\n document.cookie = reset;\n document.cookie = reset + \"; domain=.\" + host;\n }\n }\n\n return k;\n };\n\n setSessionStorage(key, value) {\n if (this.hasSessionStorage && sessionStorage.setItem) try {\n sessionStorage.setItem(key, value)\n } catch (d) {\n }\n }\n\n removeSessionStorage(key) {\n if (this.hasSessionStorage && sessionStorage.removeItem) try {\n sessionStorage.removeItem(key)\n } catch (d) {\n }\n }\n\n getSessionStorage(a) {\n return this.hasSessionStorage && sessionStorage.getItem ?\n sessionStorage.getItem(a) : null\n }\n\n setLocalStorage(key, value) {\n if (this.hasLocalStorage && localStorage.setItem) try {\n localStorage.setItem(key, value)\n } catch (d) {\n }\n }\n\n getLocalStorage(a) {\n return this.hasLocalStorage && localStorage.getItem ?\n localStorage.getItem(a) : null\n }\n\n removeLocalStorage(key) {\n if (this.hasLocalStorage && localStorage.removeItem) try {\n localStorage.removeItem(key)\n } catch (d) {\n }\n }\n\n setSessionReferer(ref) {\n if (!this.getSessionStorage(this.prefix+'_ref')) {\n this.setSessionStorage(this.prefix+'_ref',ref);\n }\n }\n\n getSessionReferrer() {\n return this.getSessionStorage(this.prefix+'_ref');\n }\n\n getSessionInformation() {\n var a;\n this.sessionInformation && (a = this.sessionInformation);\n a || (a = this.getHTTPCookie(this.prefix + \"_per\")[0]);\n return this.parseSessionInformation(a)\n };\n\n getStoreValue(sessionInformation)\n {\n let pairs = [];\n Object.keys(sessionInformation).forEach(key => {\n let value = sessionInformation[key];\n pairs.push(key + '|' + value);\n });\n return pairs.join('|');\n }\n\n storeSessionInformation(sessionInformation) {\n this.setHTTPCookie(this.prefix+\"_per\", this.getStoreValue(sessionInformation), false, this.getCookieDomain());\n this.sessionInformation = sessionInformation;\n };\n\n parseSessionInformation(content) {\n // Check was it stored as our format or JSON.\n if (content && content.indexOf('|') !== -1) {\n let contentReturn = {};\n let parts = content.split('|');\n\n for (var i = 0; i < parts.length / 2; i++) {\n contentReturn[parts[i * 2]] = parts[(i * 2) + 1];\n }\n\n return contentReturn;\n } else {\n if (content) {\n return JSON.parse(unescape(content))\n } else {\n return {};\n }\n }\n\n };\n}\n\n","\nexport class userSession {\n\n constructor() {\n this.vid = null;\n this.hnh = null;\n\n this.attributes = {};\n this.ref = null;\n this.id = null;\n this.hash = null;\n this.jsVars = [];\n this.updateVarsTimeout = null;\n this.JSON = {\n parse: window.JSON && (window.JSON.parse || window.JSON.decode) || String.prototype.evalJSON && function(str){return String(str).evalJSON();} || $.parseJSON || $.evalJSON,\n stringify: Object.toJSON || window.JSON && (window.JSON.stringify || window.JSON.encode) || $.toJSON\n };\n }\n\n setAttributes(attributes) {\n this.attributes = attributes;\n }\n\n setSessionReferrer(ref) {\n this.ref = ref;\n }\n\n getSessionReferrer() {\n return this.ref;\n }\n\n getVID() {\n return this.vid;\n }\n\n setVID(vid) {\n this.vid = vid;\n }\n\n setSessionInformation(params) {\n this.vid = params['vid'] || null;\n this.hnh = params['hnh'] || null;\n this.hash = params['hash'] || null;\n this.id = params['id'] || null;\n }\n\n getSessionAttributes() {\n var attr = {};\n\n if (this.vid !== null) {\n attr['vid'] = this.vid;\n }\n\n if (this.hnh !== null) {\n attr['hnh'] = this.hnh;\n }\n\n if (this.id !== null) {\n attr['id'] = this.id;\n }\n\n if (this.hash !== null) {\n attr['hash'] = this.hash;\n }\n\n return attr\n }\n\n setupVarsMonitoring(jsVars, cb) {\n this.jsVars = jsVars;\n\n // Try to monitor variable if it's lhc_var\n try {\n\n if (this.attributes.lhc_var !== null)\n {\n var validator = {\n set: (obj, prop, value) => {\n // The default behavior to store the value\n obj[prop] = value;\n\n clearTimeout(this.updateVarsTimeout);\n this.updateVarsTimeout = setTimeout( () =>{ this.updateJSVars(obj, cb); },1000);\n\n // Indicate success\n return true;\n }\n };\n\n this.attributes.lhc_var = new Proxy(this.attributes.lhc_var,validator);\n\n // Convert argument or global lhc_var to a reference\n if (this.attributes.LHC_API.args.lhc_var) {\n this.attributes.LHC_API.args.lhc_var = this.attributes.lhc_var;\n } else if (lhc_var) {\n lhc_var = this.attributes.lhc_var;\n }\n\n // Update vars initially\n this.updateJSVars(this.attributes.lhc_var);\n\n } else if (typeof LHCChatOptions !== 'undefined' && typeof LHCChatOptions.attr_prefill !== 'undefined') {\n\n var lhc_var_prefill = {};\n\n LHCChatOptions.attr_prefill.forEach( (item) => {\n if (item.name && item.value) {\n lhc_var_prefill['prefill_'+item.name] = item.value;\n }\n });\n\n var xhr = new XMLHttpRequest();\n xhr.open( \"POST\", this.attributes.LHC_API.args.lhc_base_url + '/chat/updatejsvars' + this.getAppendVariables(), true);\n xhr.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n xhr.send( \"data=\" + encodeURIComponent( this.JSON.stringify(lhc_var_prefill) ) );\n }\n\n } catch(err) {\n console.log(err);\n };\n }\n\n getPrefillVars() {\n let varsReturn = [];\n if (this.jsVars.length > 0) {\n var varsSet = this.getVars();\n for (var jsVarData in this.jsVars) {\n if (this.jsVars[jsVarData].type && varsSet[this.jsVars[jsVarData].id]) {\n var item = {};\n item[this.jsVars[jsVarData].type] = varsSet[this.jsVars[jsVarData].id];\n varsReturn.push(item);\n }\n }\n }\n return varsReturn;\n }\n\n getVars() {\n if (this.jsVars.length > 0) {\n var js_args = {};\n var currentVar = null;\n\n for (var index in this.jsVars) {\n try {\n\n if (this.jsVars[index].var.indexOf('lhc_var.') !== -1) {\n currentVar = this.attributes.lhc_var[this.jsVars[index].var.replace('lhc_var.','')] || null;\n } else {\n currentVar = eval(this.jsVars[index].var);\n }\n\n if (typeof currentVar !== 'undefined' && currentVar !== null && currentVar !== '') {\n js_args[this.jsVars[index].id] = currentVar;\n }\n } catch(err) {\n\n }\n }\n\n return js_args;\n }\n return null;\n }\n\n getAppendVariables(){\n var append = '';\n\n if (this.vid !== null) {\n append = append + '/(vid)/' + this.vid ;\n }\n\n if (this.hash !== null && this.id !== null) {\n append = append + '/(hash)/' + this.id + '_' + this.hash;\n }\n\n return append;\n }\n\n updateJSVars(vars, cb) {\n\n let varsJSON = this.getVars(vars);\n\n var xhr = new XMLHttpRequest();\n xhr.open( \"POST\", this.attributes.LHC_API.args.lhc_base_url + '/chat/updatejsvars' + this.getAppendVariables(), true);\n xhr.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n xhr.send( \"data=\" + encodeURIComponent( this.JSON.stringify(varsJSON) ) );\n\n if (typeof cb !== 'undefined' && this.hash === null && this.id === null) {\n cb(varsJSON, this.getPrefillVars());\n }\n }\n\n setChatInformation(data, alwaysPersistentNeedHelp) {\n this.id = data.id;\n this.hash = data.hash;\n // Hide only chat starts otherwise don't touch it.\n if (this.id !== null && !alwaysPersistentNeedHelp) {\n this.hnh = Math.round(Date.now() / 1000);\n }\n }\n\n}","var appleIphone = /iPhone/i;\nvar appleIpod = /iPod/i;\nvar appleTablet = /iPad/i;\nvar appleUniversal = /\\biOS-universal(?:.+)Mac\\b/i;\nvar androidPhone = /\\bAndroid(?:.+)Mobile\\b/i;\nvar androidTablet = /Android/i;\nvar amazonPhone = /(?:SD4930UR|\\bSilk(?:.+)Mobile\\b)/i;\nvar amazonTablet = /Silk/i;\nvar windowsPhone = /Windows Phone/i;\nvar windowsTablet = /\\bWindows(?:.+)ARM\\b/i;\nvar otherBlackBerry = /BlackBerry/i;\nvar otherBlackBerry10 = /BB10/i;\nvar otherOpera = /Opera Mini/i;\nvar otherChrome = /\\b(CriOS|Chrome)(?:.+)Mobile/i;\nvar otherFirefox = /Mobile(?:.+)Firefox\\b/i;\nvar isAppleTabletOnIos13 = function (navigator) {\n return (typeof navigator !== 'undefined' &&\n navigator.platform === 'MacIntel' &&\n typeof navigator.maxTouchPoints === 'number' &&\n navigator.maxTouchPoints > 1 &&\n typeof MSStream === 'undefined');\n};\nfunction createMatch(userAgent) {\n return function (regex) { return regex.test(userAgent); };\n}\nexport default function isMobile(param) {\n var nav = {\n userAgent: '',\n platform: '',\n maxTouchPoints: 0\n };\n if (!param && typeof navigator !== 'undefined') {\n nav = {\n userAgent: navigator.userAgent,\n platform: navigator.platform,\n maxTouchPoints: navigator.maxTouchPoints || 0\n };\n }\n else if (typeof param === 'string') {\n nav.userAgent = param;\n }\n else if (param && param.userAgent) {\n nav = {\n userAgent: param.userAgent,\n platform: param.platform,\n maxTouchPoints: param.maxTouchPoints || 0\n };\n }\n var userAgent = nav.userAgent;\n var tmp = userAgent.split('[FBAN');\n if (typeof tmp[1] !== 'undefined') {\n userAgent = tmp[0];\n }\n tmp = userAgent.split('Twitter');\n if (typeof tmp[1] !== 'undefined') {\n userAgent = tmp[0];\n }\n var match = createMatch(userAgent);\n var result = {\n apple: {\n phone: match(appleIphone) && !match(windowsPhone),\n ipod: match(appleIpod),\n tablet: !match(appleIphone) &&\n (match(appleTablet) || isAppleTabletOnIos13(nav)) &&\n !match(windowsPhone),\n universal: match(appleUniversal),\n device: (match(appleIphone) ||\n match(appleIpod) ||\n match(appleTablet) ||\n match(appleUniversal) ||\n isAppleTabletOnIos13(nav)) &&\n !match(windowsPhone)\n },\n amazon: {\n phone: match(amazonPhone),\n tablet: !match(amazonPhone) && match(amazonTablet),\n device: match(amazonPhone) || match(amazonTablet)\n },\n android: {\n phone: (!match(windowsPhone) && match(amazonPhone)) ||\n (!match(windowsPhone) && match(androidPhone)),\n tablet: !match(windowsPhone) &&\n !match(amazonPhone) &&\n !match(androidPhone) &&\n (match(amazonTablet) || match(androidTablet)),\n device: (!match(windowsPhone) &&\n (match(amazonPhone) ||\n match(amazonTablet) ||\n match(androidPhone) ||\n match(androidTablet))) ||\n match(/\\bokhttp\\b/i)\n },\n windows: {\n phone: match(windowsPhone),\n tablet: match(windowsTablet),\n device: match(windowsPhone) || match(windowsTablet)\n },\n other: {\n blackberry: match(otherBlackBerry),\n blackberry10: match(otherBlackBerry10),\n opera: match(otherOpera),\n firefox: match(otherFirefox),\n chrome: match(otherChrome),\n device: match(otherBlackBerry) ||\n match(otherBlackBerry10) ||\n match(otherOpera) ||\n match(otherFirefox) ||\n match(otherChrome)\n },\n any: false,\n phone: false,\n tablet: false\n };\n result.any =\n result.apple.device ||\n result.android.device ||\n result.windows.device ||\n result.other.device;\n result.phone =\n result.apple.phone || result.android.phone || result.windows.phone;\n result.tablet =\n result.apple.tablet || result.android.tablet || result.windows.tablet;\n return result;\n}\n//# sourceMappingURL=isMobile.js.map","'use strict';\n\nmodule.exports = require('./lib')\n","'use strict';\n\nvar asap = require('asap/raw');\n\nfunction noop() {}\n\n// States:\n//\n// 0 - pending\n// 1 - fulfilled with _value\n// 2 - rejected with _value\n// 3 - adopted the state of another promise, _value\n//\n// once the state is no longer pending (0) it is immutable\n\n// All `_` prefixed properties will be reduced to `_{random number}`\n// at build time to obfuscate them and discourage their use.\n// We don't use symbols or Object.defineProperty to fully hide them\n// because the performance isn't good enough.\n\n\n// to avoid using try/catch inside critical functions, we\n// extract them to here.\nvar LAST_ERROR = null;\nvar IS_ERROR = {};\nfunction getThen(obj) {\n try {\n return obj.then;\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nfunction tryCallOne(fn, a) {\n try {\n return fn(a);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\nfunction tryCallTwo(fn, a, b) {\n try {\n fn(a, b);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nmodule.exports = Promise;\n\nfunction Promise(fn) {\n if (typeof this !== 'object') {\n throw new TypeError('Promises must be constructed via new');\n }\n if (typeof fn !== 'function') {\n throw new TypeError('Promise constructor\\'s argument is not a function');\n }\n this._U = 0;\n this._V = 0;\n this._W = null;\n this._X = null;\n if (fn === noop) return;\n doResolve(fn, this);\n}\nPromise._Y = null;\nPromise._Z = null;\nPromise._0 = noop;\n\nPromise.prototype.then = function(onFulfilled, onRejected) {\n if (this.constructor !== Promise) {\n return safeThen(this, onFulfilled, onRejected);\n }\n var res = new Promise(noop);\n handle(this, new Handler(onFulfilled, onRejected, res));\n return res;\n};\n\nfunction safeThen(self, onFulfilled, onRejected) {\n return new self.constructor(function (resolve, reject) {\n var res = new Promise(noop);\n res.then(resolve, reject);\n handle(self, new Handler(onFulfilled, onRejected, res));\n });\n}\nfunction handle(self, deferred) {\n while (self._V === 3) {\n self = self._W;\n }\n if (Promise._Y) {\n Promise._Y(self);\n }\n if (self._V === 0) {\n if (self._U === 0) {\n self._U = 1;\n self._X = deferred;\n return;\n }\n if (self._U === 1) {\n self._U = 2;\n self._X = [self._X, deferred];\n return;\n }\n self._X.push(deferred);\n return;\n }\n handleResolved(self, deferred);\n}\n\nfunction handleResolved(self, deferred) {\n asap(function() {\n var cb = self._V === 1 ? deferred.onFulfilled : deferred.onRejected;\n if (cb === null) {\n if (self._V === 1) {\n resolve(deferred.promise, self._W);\n } else {\n reject(deferred.promise, self._W);\n }\n return;\n }\n var ret = tryCallOne(cb, self._W);\n if (ret === IS_ERROR) {\n reject(deferred.promise, LAST_ERROR);\n } else {\n resolve(deferred.promise, ret);\n }\n });\n}\nfunction resolve(self, newValue) {\n // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n if (newValue === self) {\n return reject(\n self,\n new TypeError('A promise cannot be resolved with itself.')\n );\n }\n if (\n newValue &&\n (typeof newValue === 'object' || typeof newValue === 'function')\n ) {\n var then = getThen(newValue);\n if (then === IS_ERROR) {\n return reject(self, LAST_ERROR);\n }\n if (\n then === self.then &&\n newValue instanceof Promise\n ) {\n self._V = 3;\n self._W = newValue;\n finale(self);\n return;\n } else if (typeof then === 'function') {\n doResolve(then.bind(newValue), self);\n return;\n }\n }\n self._V = 1;\n self._W = newValue;\n finale(self);\n}\n\nfunction reject(self, newValue) {\n self._V = 2;\n self._W = newValue;\n if (Promise._Z) {\n Promise._Z(self, newValue);\n }\n finale(self);\n}\nfunction finale(self) {\n if (self._U === 1) {\n handle(self, self._X);\n self._X = null;\n }\n if (self._U === 2) {\n for (var i = 0; i < self._X.length; i++) {\n handle(self, self._X[i]);\n }\n self._X = null;\n }\n}\n\nfunction Handler(onFulfilled, onRejected, promise){\n this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n this.promise = promise;\n}\n\n/**\n * Take a potentially misbehaving resolver function and make sure\n * onFulfilled and onRejected are only called once.\n *\n * Makes no guarantees about asynchrony.\n */\nfunction doResolve(fn, promise) {\n var done = false;\n var res = tryCallTwo(fn, function (value) {\n if (done) return;\n done = true;\n resolve(promise, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(promise, reason);\n });\n if (!done && res === IS_ERROR) {\n done = true;\n reject(promise, LAST_ERROR);\n }\n}\n","'use strict';\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\nPromise.prototype.done = function (onFulfilled, onRejected) {\n var self = arguments.length ? this.then.apply(this, arguments) : this;\n self.then(null, function (err) {\n setTimeout(function () {\n throw err;\n }, 0);\n });\n};\n","'use strict';\n\n//This file contains the ES6 extensions to the core Promises/A+ API\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\n\n/* Static Functions */\n\nvar TRUE = valuePromise(true);\nvar FALSE = valuePromise(false);\nvar NULL = valuePromise(null);\nvar UNDEFINED = valuePromise(undefined);\nvar ZERO = valuePromise(0);\nvar EMPTYSTRING = valuePromise('');\n\nfunction valuePromise(value) {\n var p = new Promise(Promise._0);\n p._V = 1;\n p._W = value;\n return p;\n}\nPromise.resolve = function (value) {\n if (value instanceof Promise) return value;\n\n if (value === null) return NULL;\n if (value === undefined) return UNDEFINED;\n if (value === true) return TRUE;\n if (value === false) return FALSE;\n if (value === 0) return ZERO;\n if (value === '') return EMPTYSTRING;\n\n if (typeof value === 'object' || typeof value === 'function') {\n try {\n var then = value.then;\n if (typeof then === 'function') {\n return new Promise(then.bind(value));\n }\n } catch (ex) {\n return new Promise(function (resolve, reject) {\n reject(ex);\n });\n }\n }\n return valuePromise(value);\n};\n\nvar iterableToArray = function (iterable) {\n if (typeof Array.from === 'function') {\n // ES2015+, iterables exist\n iterableToArray = Array.from;\n return Array.from(iterable);\n }\n\n // ES5, only arrays and array-likes exist\n iterableToArray = function (x) { return Array.prototype.slice.call(x); };\n return Array.prototype.slice.call(iterable);\n}\n\nPromise.all = function (arr) {\n var args = iterableToArray(arr);\n\n return new Promise(function (resolve, reject) {\n if (args.length === 0) return resolve([]);\n var remaining = args.length;\n function res(i, val) {\n if (val && (typeof val === 'object' || typeof val === 'function')) {\n if (val instanceof Promise && val.then === Promise.prototype.then) {\n while (val._V === 3) {\n val = val._W;\n }\n if (val._V === 1) return res(i, val._W);\n if (val._V === 2) reject(val._W);\n val.then(function (val) {\n res(i, val);\n }, reject);\n return;\n } else {\n var then = val.then;\n if (typeof then === 'function') {\n var p = new Promise(then.bind(val));\n p.then(function (val) {\n res(i, val);\n }, reject);\n return;\n }\n }\n }\n args[i] = val;\n if (--remaining === 0) {\n resolve(args);\n }\n }\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n};\n\nPromise.reject = function (value) {\n return new Promise(function (resolve, reject) {\n reject(value);\n });\n};\n\nPromise.race = function (values) {\n return new Promise(function (resolve, reject) {\n iterableToArray(values).forEach(function(value){\n Promise.resolve(value).then(resolve, reject);\n });\n });\n};\n\n/* Prototype Methods */\n\nPromise.prototype['catch'] = function (onRejected) {\n return this.then(null, onRejected);\n};\n","'use strict';\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\nPromise.prototype.finally = function (f) {\n return this.then(function (value) {\n return Promise.resolve(f()).then(function () {\n return value;\n });\n }, function (err) {\n return Promise.resolve(f()).then(function () {\n throw err;\n });\n });\n};\n","'use strict';\n\nmodule.exports = require('./core.js');\nrequire('./done.js');\nrequire('./finally.js');\nrequire('./es6-extensions.js');\nrequire('./node-extensions.js');\nrequire('./synchronous.js');\n","'use strict';\n\n// This file contains then/promise specific extensions that are only useful\n// for node.js interop\n\nvar Promise = require('./core.js');\nvar asap = require('asap');\n\nmodule.exports = Promise;\n\n/* Static Functions */\n\nPromise.denodeify = function (fn, argumentCount) {\n if (\n typeof argumentCount === 'number' && argumentCount !== Infinity\n ) {\n return denodeifyWithCount(fn, argumentCount);\n } else {\n return denodeifyWithoutCount(fn);\n }\n};\n\nvar callbackFn = (\n 'function (err, res) {' +\n 'if (err) { rj(err); } else { rs(res); }' +\n '}'\n);\nfunction denodeifyWithCount(fn, argumentCount) {\n var args = [];\n for (var i = 0; i < argumentCount; i++) {\n args.push('a' + i);\n }\n var body = [\n 'return function (' + args.join(',') + ') {',\n 'var self = this;',\n 'return new Promise(function (rs, rj) {',\n 'var res = fn.call(',\n ['self'].concat(args).concat([callbackFn]).join(','),\n ');',\n 'if (res &&',\n '(typeof res === \"object\" || typeof res === \"function\") &&',\n 'typeof res.then === \"function\"',\n ') {rs(res);}',\n '});',\n '};'\n ].join('');\n return Function(['Promise', 'fn'], body)(Promise, fn);\n}\nfunction denodeifyWithoutCount(fn) {\n var fnLength = Math.max(fn.length - 1, 3);\n var args = [];\n for (var i = 0; i < fnLength; i++) {\n args.push('a' + i);\n }\n var body = [\n 'return function (' + args.join(',') + ') {',\n 'var self = this;',\n 'var args;',\n 'var argLength = arguments.length;',\n 'if (arguments.length > ' + fnLength + ') {',\n 'args = new Array(arguments.length + 1);',\n 'for (var i = 0; i < arguments.length; i++) {',\n 'args[i] = arguments[i];',\n '}',\n '}',\n 'return new Promise(function (rs, rj) {',\n 'var cb = ' + callbackFn + ';',\n 'var res;',\n 'switch (argLength) {',\n args.concat(['extra']).map(function (_, index) {\n return (\n 'case ' + (index) + ':' +\n 'res = fn.call(' + ['self'].concat(args.slice(0, index)).concat('cb').join(',') + ');' +\n 'break;'\n );\n }).join(''),\n 'default:',\n 'args[argLength] = cb;',\n 'res = fn.apply(self, args);',\n '}',\n \n 'if (res &&',\n '(typeof res === \"object\" || typeof res === \"function\") &&',\n 'typeof res.then === \"function\"',\n ') {rs(res);}',\n '});',\n '};'\n ].join('');\n\n return Function(\n ['Promise', 'fn'],\n body\n )(Promise, fn);\n}\n\nPromise.nodeify = function (fn) {\n return function () {\n var args = Array.prototype.slice.call(arguments);\n var callback =\n typeof args[args.length - 1] === 'function' ? args.pop() : null;\n var ctx = this;\n try {\n return fn.apply(this, arguments).nodeify(callback, ctx);\n } catch (ex) {\n if (callback === null || typeof callback == 'undefined') {\n return new Promise(function (resolve, reject) {\n reject(ex);\n });\n } else {\n asap(function () {\n callback.call(ctx, ex);\n })\n }\n }\n }\n};\n\nPromise.prototype.nodeify = function (callback, ctx) {\n if (typeof callback != 'function') return this;\n\n this.then(function (value) {\n asap(function () {\n callback.call(ctx, null, value);\n });\n }, function (err) {\n asap(function () {\n callback.call(ctx, err);\n });\n });\n};\n","'use strict';\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\nPromise.enableSynchronous = function () {\n Promise.prototype.isPending = function() {\n return this.getState() == 0;\n };\n\n Promise.prototype.isFulfilled = function() {\n return this.getState() == 1;\n };\n\n Promise.prototype.isRejected = function() {\n return this.getState() == 2;\n };\n\n Promise.prototype.getValue = function () {\n if (this._V === 3) {\n return this._W.getValue();\n }\n\n if (!this.isFulfilled()) {\n throw new Error('Cannot get a value of an unfulfilled promise.');\n }\n\n return this._W;\n };\n\n Promise.prototype.getReason = function () {\n if (this._V === 3) {\n return this._W.getReason();\n }\n\n if (!this.isRejected()) {\n throw new Error('Cannot get a rejection reason of a non-rejected promise.');\n }\n\n return this._W;\n };\n\n Promise.prototype.getState = function () {\n if (this._V === 3) {\n return this._W.getState();\n }\n if (this._V === -1 || this._V === -2) {\n return 0;\n }\n\n return this._V;\n };\n};\n\nPromise.disableSynchronous = function() {\n Promise.prototype.isPending = undefined;\n Promise.prototype.isFulfilled = undefined;\n Promise.prototype.isRejected = undefined;\n Promise.prototype.getValue = undefined;\n Promise.prototype.getReason = undefined;\n Promise.prototype.getState = undefined;\n};\n","/*!\n * EventEmitter v5.2.9 - git.io/ee\n * Unlicense - http://unlicense.org/\n * Oliver Caldwell - https://oli.me.uk/\n * @preserve\n */\n\n;(function (exports) {\n 'use strict';\n\n /**\n * Class for managing events.\n * Can be extended to provide event functionality in other classes.\n *\n * @class EventEmitter Manages event registering and emitting.\n */\n function EventEmitter() {}\n\n // Shortcuts to improve speed and size\n var proto = EventEmitter.prototype;\n var originalGlobalValue = exports.EventEmitter;\n\n /**\n * Finds the index of the listener for the event in its storage array.\n *\n * @param {Function[]} listeners Array of listeners to search through.\n * @param {Function} listener Method to look for.\n * @return {Number} Index of the specified listener, -1 if not found\n * @api private\n */\n function indexOfListener(listeners, listener) {\n var i = listeners.length;\n while (i--) {\n if (listeners[i].listener === listener) {\n return i;\n }\n }\n\n return -1;\n }\n\n /**\n * Alias a method while keeping the context correct, to allow for overwriting of target method.\n *\n * @param {String} name The name of the target method.\n * @return {Function} The aliased method\n * @api private\n */\n function alias(name) {\n return function aliasClosure() {\n return this[name].apply(this, arguments);\n };\n }\n\n /**\n * Returns the listener array for the specified event.\n * Will initialise the event object and listener arrays if required.\n * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them.\n * Each property in the object response is an array of listener functions.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Function[]|Object} All listener functions for the event.\n */\n proto.getListeners = function getListeners(evt) {\n var events = this._getEvents();\n var response;\n var key;\n\n // Return a concatenated array of all matching events if\n // the selector is a regular expression.\n if (evt instanceof RegExp) {\n response = {};\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n response[key] = events[key];\n }\n }\n }\n else {\n response = events[evt] || (events[evt] = []);\n }\n\n return response;\n };\n\n /**\n * Takes a list of listener objects and flattens it into a list of listener functions.\n *\n * @param {Object[]} listeners Raw listener objects.\n * @return {Function[]} Just the listener functions.\n */\n proto.flattenListeners = function flattenListeners(listeners) {\n var flatListeners = [];\n var i;\n\n for (i = 0; i < listeners.length; i += 1) {\n flatListeners.push(listeners[i].listener);\n }\n\n return flatListeners;\n };\n\n /**\n * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Object} All listener functions for an event in an object.\n */\n proto.getListenersAsObject = function getListenersAsObject(evt) {\n var listeners = this.getListeners(evt);\n var response;\n\n if (listeners instanceof Array) {\n response = {};\n response[evt] = listeners;\n }\n\n return response || listeners;\n };\n\n function isValidListener (listener) {\n if (typeof listener === 'function' || listener instanceof RegExp) {\n return true\n } else if (listener && typeof listener === 'object') {\n return isValidListener(listener.listener)\n } else {\n return false\n }\n }\n\n /**\n * Adds a listener function to the specified event.\n * The listener will not be added if it is a duplicate.\n * If the listener returns true then it will be removed after it is called.\n * If you pass a regular expression as the event name then the listener will be added to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListener = function addListener(evt, listener) {\n if (!isValidListener(listener)) {\n throw new TypeError('listener must be a function');\n }\n\n var listeners = this.getListenersAsObject(evt);\n var listenerIsWrapped = typeof listener === 'object';\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) {\n listeners[key].push(listenerIsWrapped ? listener : {\n listener: listener,\n once: false\n });\n }\n }\n\n return this;\n };\n\n /**\n * Alias of addListener\n */\n proto.on = alias('addListener');\n\n /**\n * Semi-alias of addListener. It will add a listener that will be\n * automatically removed after its first execution.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addOnceListener = function addOnceListener(evt, listener) {\n return this.addListener(evt, {\n listener: listener,\n once: true\n });\n };\n\n /**\n * Alias of addOnceListener.\n */\n proto.once = alias('addOnceListener');\n\n /**\n * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad.\n * You need to tell it what event names should be matched by a regex.\n *\n * @param {String} evt Name of the event to create.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvent = function defineEvent(evt) {\n this.getListeners(evt);\n return this;\n };\n\n /**\n * Uses defineEvent to define multiple events.\n *\n * @param {String[]} evts An array of event names to define.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvents = function defineEvents(evts) {\n for (var i = 0; i < evts.length; i += 1) {\n this.defineEvent(evts[i]);\n }\n return this;\n };\n\n /**\n * Removes a listener function from the specified event.\n * When passed a regular expression as the event name, it will remove the listener from all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to remove the listener from.\n * @param {Function} listener Method to remove from the event.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListener = function removeListener(evt, listener) {\n var listeners = this.getListenersAsObject(evt);\n var index;\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key)) {\n index = indexOfListener(listeners[key], listener);\n\n if (index !== -1) {\n listeners[key].splice(index, 1);\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of removeListener\n */\n proto.off = alias('removeListener');\n\n /**\n * Adds listeners in bulk using the manipulateListeners method.\n * If you pass an object as the first argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added.\n * You can also pass it a regular expression to add the array of listeners to all events that match it.\n * Yeah, this function does quite a bit. That's probably a bad thing.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListeners = function addListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(false, evt, listeners);\n };\n\n /**\n * Removes listeners in bulk using the manipulateListeners method.\n * If you pass an object as the first argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be removed.\n * You can also pass it a regular expression to remove the listeners from all events that match it.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListeners = function removeListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(true, evt, listeners);\n };\n\n /**\n * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level.\n * The first argument will determine if the listeners are removed (true) or added (false).\n * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be added/removed.\n * You can also pass it a regular expression to manipulate the listeners of all events that match it.\n *\n * @param {Boolean} remove True if you want to remove listeners, false if you want to add.\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add/remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) {\n var i;\n var value;\n var single = remove ? this.removeListener : this.addListener;\n var multiple = remove ? this.removeListeners : this.addListeners;\n\n // If evt is an object then pass each of its properties to this method\n if (typeof evt === 'object' && !(evt instanceof RegExp)) {\n for (i in evt) {\n if (evt.hasOwnProperty(i) && (value = evt[i])) {\n // Pass the single listener straight through to the singular method\n if (typeof value === 'function') {\n single.call(this, i, value);\n }\n else {\n // Otherwise pass back to the multiple function\n multiple.call(this, i, value);\n }\n }\n }\n }\n else {\n // So evt must be a string\n // And listeners must be an array of listeners\n // Loop over it and pass each one to the multiple method\n i = listeners.length;\n while (i--) {\n single.call(this, evt, listeners[i]);\n }\n }\n\n return this;\n };\n\n /**\n * Removes all listeners from a specified event.\n * If you do not specify an event then all listeners will be removed.\n * That means every event will be emptied.\n * You can also pass a regex to remove all events that match it.\n *\n * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeEvent = function removeEvent(evt) {\n var type = typeof evt;\n var events = this._getEvents();\n var key;\n\n // Remove different things depending on the state of evt\n if (type === 'string') {\n // Remove all listeners for the specified event\n delete events[evt];\n }\n else if (evt instanceof RegExp) {\n // Remove all events matching the regex.\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n delete events[key];\n }\n }\n }\n else {\n // Remove all listeners in all events\n delete this._events;\n }\n\n return this;\n };\n\n /**\n * Alias of removeEvent.\n *\n * Added to mirror the node API.\n */\n proto.removeAllListeners = alias('removeEvent');\n\n /**\n * Emits an event of your choice.\n * When emitted, every listener attached to that event will be executed.\n * If you pass the optional argument array then those arguments will be passed to every listener upon execution.\n * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately.\n * So they will not arrive within the array on the other side, they will be separate.\n * You can also pass a regular expression to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {Array} [args] Optional array of arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emitEvent = function emitEvent(evt, args) {\n var listenersMap = this.getListenersAsObject(evt);\n var listeners;\n var listener;\n var i;\n var key;\n var response;\n\n for (key in listenersMap) {\n if (listenersMap.hasOwnProperty(key)) {\n listeners = listenersMap[key].slice(0);\n\n for (i = 0; i < listeners.length; i++) {\n // If the listener returns true then it shall be removed from the event\n // The function is executed either with a basic call or an apply if there is an args array\n listener = listeners[i];\n\n if (listener.once === true) {\n this.removeListener(evt, listener.listener);\n }\n\n response = listener.listener.apply(this, args || []);\n\n if (response === this._getOnceReturnValue()) {\n this.removeListener(evt, listener.listener);\n }\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of emitEvent\n */\n proto.trigger = alias('emitEvent');\n\n /**\n * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on.\n * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {...*} Optional additional arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emit = function emit(evt) {\n var args = Array.prototype.slice.call(arguments, 1);\n return this.emitEvent(evt, args);\n };\n\n /**\n * Sets the current value to check against when executing listeners. If a\n * listeners return value matches the one set here then it will be removed\n * after execution. This value defaults to true.\n *\n * @param {*} value The new value to check for when executing listeners.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.setOnceReturnValue = function setOnceReturnValue(value) {\n this._onceReturnValue = value;\n return this;\n };\n\n /**\n * Fetches the current value to check against when executing listeners. If\n * the listeners return value matches this one then it should be removed\n * automatically. It will return true by default.\n *\n * @return {*|Boolean} The current value to check for or the default, true.\n * @api private\n */\n proto._getOnceReturnValue = function _getOnceReturnValue() {\n if (this.hasOwnProperty('_onceReturnValue')) {\n return this._onceReturnValue;\n }\n else {\n return true;\n }\n };\n\n /**\n * Fetches the events object and creates one if required.\n *\n * @return {Object} The events storage object.\n * @api private\n */\n proto._getEvents = function _getEvents() {\n return this._events || (this._events = {});\n };\n\n /**\n * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version.\n *\n * @return {Function} Non conflicting EventEmitter class.\n */\n EventEmitter.noConflict = function noConflict() {\n exports.EventEmitter = originalGlobalValue;\n return EventEmitter;\n };\n\n // Expose the class either via AMD, CommonJS or the global object\n if (typeof define === 'function' && define.amd) {\n define(function () {\n return EventEmitter;\n });\n }\n else if (typeof module === 'object' && module.exports){\n module.exports = EventEmitter;\n }\n else {\n exports.EventEmitter = EventEmitter;\n }\n}(typeof window !== 'undefined' ? window : this || {}));\n","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var inProgress = {};\nvar dataWebpackPrefix = \"LiveHelperChat:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = function(url, done, key, chunkId) {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\t\tscript.src = url;\n\t\tif (script.src.indexOf(window.location.origin + '/') !== 0) {\n\t\t\tscript.crossOrigin = \"anonymous\";\n\t\t}\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = function(prev, event) {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach(function(fn) { return fn(event); });\n\t\tif(prev) return prev(event);\n\t}\n\t;\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = function(chunkId) {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce(function(promises, key) {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = function(chunkId) {\n\t// return url for filenames based on template\n\treturn \"\" + {\"8\":\"6d3de043cfb6e40e6a85\",\"81\":\"75d1d932aa8416f0bf23\",\"213\":\"82d024432640e184cab5\",\"335\":\"94e75bc034e279cb1a5d\",\"398\":\"16da6b6586a6fd6028ae\",\"417\":\"507f464a966a8359428a\",\"530\":\"6b5f759b84269b244c78\",\"783\":\"a68fc3eccb8af7392e9f\",\"821\":\"a5b21cc17552b167a2f1\"}[chunkId] + \".js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.p = \"./\";","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t179: 0\n};\n\n__webpack_require__.f.j = function(chunkId, promises) {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise(function(resolve, reject) { installedChunkData = installedChunks[chunkId] = [resolve, reject]; });\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = function(event) {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkIds[i]] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkLiveHelperChat\"] = self[\"webpackChunkLiveHelperChat\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","(function (global) {\n\n var currentScript = document.currentScript || (function() {\n var scripts = document.getElementsByTagName('script');\n return scripts[scripts.length - 1];\n })();\n\n var scopeScript = currentScript.getAttribute('scope') || 'LHC';\n\n if (/google|baidu|bing|msn|duckduckbot|teoma|slurp|yandex|Chrome-Lighthouse/i.test(navigator.userAgent)) {\n return;\n }\n\n if (!global[scopeScript+'_API']) {\n if (global['LHC_API']) {\n global[scopeScript+'_API'] = global['LHC_API'];\n } else {\n return;\n }\n }\n\n var lhcError = {\n log : function(message, filename, lineNumber, stack, column) {\n var e;\n e = {};\n e.message = message || \"\";\n e.message += \"\\n\" + global.navigator.userAgent;\n e.location = location && location.href ? location.href : \"\";\n e.file = filename || \"\";\n e.line = lineNumber || \"\";\n e.column = column || \"\";\n e.stack = stack ? JSON.stringify(stack) : \"\";\n e.stack = e.stack.replace(/(\\r\\n|\\n|\\r)/gm, \"\");\n var xhr = new XMLHttpRequest();\n xhr.open( \"POST\", global[scopeScript+'_API']['args']['lhc_base_url'] + 'audit/logjserror', true);\n xhr.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n xhr.send( \"data=\" + encodeURIComponent( JSON.stringify(e) ) );\n }\n }\n\n try {\n\n window.addEventListener('error', function (e) {\n if (lhcError && e.filename.indexOf(global[scopeScript+'_API']['args']['lhc_base_url'].replace('index.php/')) !== -1) {\n lhcError.log(e.message, e.filename, e.lineNumber || e.lineno, e.error.stack, e.colno);\n }\n })\n\n global['$_' + scopeScript + '_Instance'] = null;\n global['$_' + scopeScript + '_Debug'] = false;\n global['$_' + scopeScript] = global['$_' + scopeScript] || {};\n\n (function (lhc, LHC_API) {\n\n lhc.loaded = false;\n lhc.connected = false;\n lhc.ready = false;\n lhc.version = 207;\n\n const isMobileItem = require('ismobilejs');\n var isMobile = isMobileItem.default(global.navigator.userAgent).phone;\n\n lhc.isMobile = isMobile;\n\n var init = () => {\n\n if (!global.Promise) {\n global.Promise = require('promise');\n }\n\n var BehaviorSubject = require('./util/monitoredVariable').monitoredVariable;\n var EventEmitter = require('wolfy87-eventemitter');\n\n var statusWidget = require('./lib/widgets/statusWidget').statusWidget;\n var mainWidget = require('./lib/widgets/mainWidget').mainWidget;\n var mainWidgetPopup = require('./lib/widgets/mainWidgetPopup').mainWidgetPopup;\n var containerChat = require('./lib/widgets/containerChat').containerChat;\n var helperFunctions = require('./lib/helperFunctions').helperFunctions;\n var userSession = require('./util/userSession').userSession;\n var storageHandler = require('./util/storageHandler').storageHandler;\n var chatNotifications = require('./lib/chatNotifications').chatNotifications;\n var chatEventsHandler = require('./util/chatEventsHandler').chatEventsHandler;\n\n LHC_API.args = LHC_API.args || {};\n\n if (typeof LHC_API.args.mobile_view !== 'undefined') {\n lhc.isMobile = isMobile = LHC_API.args.mobile_view;\n }\n\n const prefixLowercase = scopeScript.toLowerCase();\n const prefixStorage = (prefixLowercase && LHC_API.args.scope_storage ? prefixLowercase : 'lhc');\n const cookieEnabledUser = typeof LHC_API.args.cookie_enabled !== 'undefined' ? LHC_API.args.cookie_enabled : true;\n const userMode = LHC_API.args.mode || 'widget';\n\n var storageHandler = new storageHandler(global, LHC_API.args.domain || null, prefixStorage, cookieEnabledUser);\n\n // Cookies are disabled and it's required for us to work. So switch to mode where cookies are not required\n if (storageHandler.cookieEnabled === false && userMode == 'widget') {\n LHC_API.args.orig = {}\n LHC_API.args.orig.mode = LHC_API.args.mode;\n LHC_API.args.orig.proactive = LHC_API.args.proactive;\n LHC_API.args.orig.check_messages = LHC_API.args.check_messages;\n\n LHC_API.args.mode = 'popup';\n LHC_API.args.proactive = false;\n LHC_API.args.check_messages = false;\n }\n\n if (LHC_API.args.cookie_per_page) {\n storageHandler.setCookiePerPage(LHC_API.args.cookie_per_page);\n }\n\n var referrer = (document.referrer) ? document.referrer.substr(document.referrer.indexOf('://') + 1) : '';\n var location = (document.location) ? encodeURIComponent(window.location.href.substring(window.location.protocol.length)) : '';\n\n storageHandler.setSessionReferer(referrer);\n\n referrer = referrer ? encodeURIComponent(referrer) : '';\n\n var languageOverride = '';\n\n if (storageHandler.getLocalStorage(prefixStorage+'_lng')) {\n languageOverride = LHC_API.args.lang = storageHandler.getLocalStorage(prefixStorage+'_lng');\n }\n\n if (LHC_API.args.lang) {\n LHC_API.args.lang = LHC_API.args.lang.replace('/', '') + '/';\n }\n\n // Main attributes\n var attributesWidget = {\n terminated: false,\n prefixLowercase: prefixLowercase,\n prefixStorage: prefixStorage,\n prefixScope: scopeScript,\n cookie_enabled: cookieEnabledUser,\n LHC_API: LHC_API,\n viewHandler: null,\n msgSnippet: null,\n react_attr: LHC_API.args.react_attr || null,\n hide_parent: LHC_API.args.hide_parent || false,\n hide_iframe: LHC_API.args.hide_iframe || false,\n hide_status: LHC_API.args.hide_status || null,\n mainWidget: new mainWidget(prefixLowercase),\n popupWidget: new mainWidgetPopup(),\n chatNotifications: chatNotifications,\n jsVars: new BehaviorSubject(true),\n onlineStatus: new BehaviorSubject(true),\n wloaded: new BehaviorSubject(false),\n sload: new BehaviorSubject(false),\n shidden: new BehaviorSubject(LHC_API.args.hide_status || false),\n msgsnippet_status: new BehaviorSubject(false),\n unread_counter: new BehaviorSubject(0),\n widgetStatus: new BehaviorSubject((storageHandler.getSessionStorage(prefixStorage + '_ws') === 'true' || (LHC_API.args.mode && LHC_API.args.mode == 'embed'))),\n eventEmitter: new EventEmitter(),\n toggleSound: new BehaviorSubject(storageHandler.getSessionStorage(prefixStorage + '_sound') === 'true', {'ignore_sub': true}),\n hideOffline: false,\n fscreen: LHC_API.args.fscreen || false,\n isMobile: isMobile,\n isIE: (navigator.userAgent.toUpperCase().indexOf(\"TRIDENT/\") != -1 || navigator.userAgent.toUpperCase().indexOf(\"MSIE\") != -1 || typeof Object.assign !== 'function'),\n fresh: LHC_API.args.fresh || false,\n popupDimesnions: {pheight: (LHC_API.args.pheight || 520), pwidth: (LHC_API.args.pwidth || 500)},\n leaveMessage: LHC_API.args.leaveamessage || null,\n department: LHC_API.args.department || [],\n dep_default: LHC_API.args.dep_default || null,\n product: LHC_API.args.product || [],\n theme: typeof LHC_API.args.theme !== 'undefined' ? (typeof LHC_API.args.theme === 'object' ? LHC_API.args.theme.join(',') : LHC_API.args.theme) : null,\n theme_v: null,\n domain: LHC_API.args.domain || null,\n domain_lhc: null,\n instance_id: 0,\n profile_pic: LHC_API.args.profile_pic || null,\n position: LHC_API.args.position || 'bottom_right',\n position_placement: LHC_API.args.position_placement || 'bottom_right',\n base_url: LHC_API.args.lhc_base_url,\n mode: LHC_API.args.mode || 'widget',\n tag: LHC_API.args.tag || '',\n proactive: {},\n captcha: null,\n focused: true,\n clinst: false,\n kcw: LHC_API.args.kcw || false,\n offline_redirect: LHC_API.args.offline_redirect || null,\n identifier: LHC_API.args.identifier || '',\n proactive_interval: null,\n lang: LHC_API.args.lang || '',\n langOverride: languageOverride,\n subject_id: LHC_API.args.subject_id || '',\n bot_id: LHC_API.args.bot_id || '',\n trigger_id: LHC_API.args.trigger_id || '',\n priority: LHC_API.args.priority || null,\n events: LHC_API.args.events || [],\n conversion: LHC_API.args.conversion || '',\n hhtml: LHC_API.args.hhtml || '',\n survey: LHC_API.args.survey || null,\n operator: LHC_API.args.operator || null,\n phash: LHC_API.args.phash || null,\n pvhash: LHC_API.args.pvhash || null,\n // Login Objects\n userSession: new userSession(),\n storageHandler: storageHandler,\n staticJS: {},\n nh : null, // Need help data\n init_calls: [],\n childCommands: [],\n childExtCommands: [],\n lhc_var: (LHC_API.args.lhc_var || (typeof lhc_var !== 'undefined' ? lhc_var : null)),\n loadcb: LHC_API.args.loadcb || null,\n LHCChatOptions: global[scopeScript + 'ChatOptions'] || {}\n };\n\n attributesWidget.widgetDimesions = new BehaviorSubject({\n sright: (LHC_API.args.sright || 0),\n sbottom: (LHC_API.args.sbottom || 0),\n wright_inv: 0,\n wbottom: 0,\n wright: 0,\n width: ((isMobile || attributesWidget.fscreen) ? 100 : (LHC_API.args.wwidth || 350)),\n height: ((isMobile || attributesWidget.fscreen) ? 100 : (LHC_API.args.wheight || 520)),\n units: ((isMobile || attributesWidget.fscreen) ? '%' : 'px')\n });\n\n var chatEvents = new chatEventsHandler(attributesWidget);\n\n lhc.eventListener = attributesWidget.eventEmitter;\n lhc.attributes = attributesWidget;\n\n attributesWidget.userSession.setAttributes(attributesWidget);\n attributesWidget.userSession.setSessionInformation(attributesWidget.storageHandler.getSessionInformation());\n attributesWidget.userSession.setSessionReferrer(storageHandler.getSessionReferrer());\n\n if (attributesWidget.mode == 'widget' || attributesWidget.mode == 'popup') {\n\n var containerChatObj = new containerChat(attributesWidget.prefixLowercase, LHC_API.args.pnode || null);\n\n attributesWidget.viewHandler = new statusWidget(attributesWidget.prefixLowercase);\n containerChatObj.cont.elmDom.appendChild(attributesWidget.viewHandler.cont.constructUI(), !0);\n\n if (attributesWidget.mode == 'widget' || attributesWidget.mode == 'popup') {\n containerChatObj.cont.elmDom.appendChild(attributesWidget.mainWidget.cont.constructUI(), !0);\n }\n\n } else {\n var embedWrapper = document.getElementById(attributesWidget.prefixLowercase + '_status_container_page');\n if (embedWrapper !== null) {\n embedWrapper.appendChild(attributesWidget.mainWidget.cont.constructUI());\n embedWrapper.style.height = (LHC_API.args.wheight || 520) + 'px';\n } else {\n attributesWidget.position = 'api';\n }\n }\n\n function getArguments(){\n return {\n 'cd': (storageHandler.cookieEnabled === false ? 1 : null),\n 'vid': (LHC_API.args.UUID || attributesWidget.userSession.getVID()),\n 'hnh': attributesWidget.userSession.hnh,\n 'tz': helperFunctions.getTzOffset(),\n 'r': referrer,\n 'l': location,\n 'dt': encodeURIComponent(document.title),\n 'ie': attributesWidget.isIE,\n 'dep': attributesWidget.department.join(','),\n 'idnt': attributesWidget.identifier,\n 'tag': attributesWidget.tag,\n 'theme': attributesWidget.theme,\n 'mode': attributesWidget.mode,\n 'pos': attributesWidget.position\n };\n }\n\n function showNeedHelp(nh) {\n import('./lib/widgets/needhelpWidget').then((module) => {\n var needhelpWidget = new module.needhelpWidget(attributesWidget.prefixLowercase);\n containerChatObj.cont.elmDom.appendChild(needhelpWidget.cont.constructUI(), !0);\n needhelpWidget.init(attributesWidget, nh);\n });\n }\n\n function showProactive(){\n import('./util/proactiveChat').then((module) => {\n module.proactiveChat.setParams({\n 'interval': attributesWidget.proactive_interval\n }, attributesWidget, chatEvents);\n });\n }\n\n helperFunctions.makeRequest(LHC_API.args.lhc_base_url + attributesWidget.lang + 'widgetrestapi/settings', {\n params: getArguments()\n }, (data) => {\n\n if (lhc.version !== data.wv && document.getElementById(attributesWidget.prefixLowercase+'-js-reload') === null) {\n\n if (data.terminate) {\n return;\n }\n\n attributesWidget.userSession.setVID(data.vid);\n\n // Mark script as terminated\n attributesWidget.terminated = true;\n\n // Remove legacy dom\n helperFunctions.removeById(attributesWidget.prefixLowercase+'_container_v2');\n helperFunctions.removeById(attributesWidget.prefixLowercase+'_status_widget_v2');\n\n // Create new embed script\n var po = document.createElement(\"script\");\n po.type = currentScript.type;\n po.id = attributesWidget.prefixLowercase+'-js-reload';\n po.async = true;\n if (currentScript.getAttribute('scope')) { po.setAttribute('scope',currentScript.getAttribute('scope')); }\n\n // Expires cache\n po.src = currentScript.getAttribute('src') + '&r='+ (new Date()).getHours() + (new Date()).getMinutes();\n var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);\n return;\n }\n\n if (data.terminate || ((!attributesWidget.leaveMessage && data.chat_ui.leaveamessage === false) && data.isOnline === false)) {\n\n if (LHC_API.args.offline_redirect && attributesWidget.mode == 'embed') {\n document.location = LHC_API.args.offline_redirect;\n }\n\n if (data.terminate) {\n return;\n }\n }\n\n // Send event that lhc has started\n // So parent page informs back that it has lhc\n if ((attributesWidget.hide_parent || attributesWidget.hide_iframe || (data.chat_ui && (data.chat_ui.hide_iframe || data.chat_ui.hide_parent))) && window.location != window.parent.location && window.parent.closed === false) {\n window.parent.postMessage('lhc::started','*');\n }\n\n attributesWidget.leaveMessage = attributesWidget.leaveMessage || data.chat_ui.leaveamessage;\n\n if (data.department) {\n attributesWidget.department = data.department;\n }\n\n __webpack_public_path__ = data.chunks_location + \"/\";\n\n if (data.secure_cookie) {\n attributesWidget.storageHandler.setSecureCookie(true);\n }\n\n if (data.domain) {\n attributesWidget.storageHandler.setCookieDomain(data.domain);\n }\n\n if (data.siteaccess) {\n attributesWidget.lang = data.siteaccess;\n }\n\n if (data.static) {\n attributesWidget.staticJS = data.static;\n }\n\n if (data.pdim) {\n attributesWidget.popupDimesnions = data.pdim;\n }\n\n if (data.survey_id) {\n attributesWidget.survey = data.survey_id;\n }\n\n if (data.domain_lhc) {\n attributesWidget.domain_lhc = data.domain_lhc;\n }\n\n if (data.cont_css) {\n attributesWidget.cont_ss = data.cont_css;\n }\n\n if (data.wposition) {\n attributesWidget.position_placement = data.wposition;\n }\n\n attributesWidget.captcha = {hash: data.hash, ts: data.hash_ts};\n attributesWidget.userSession.setVID(data.vid);\n\n // Store session\n attributesWidget.storageHandler.storeSessionInformation(attributesWidget.userSession.getSessionAttributes());\n\n attributesWidget.hideOffline = data.hideOffline;\n attributesWidget.onlineStatus.next(data.isOnline);\n\n if (data.theme) {\n attributesWidget.theme = data.theme;\n attributesWidget.theme_v = data.theme_v;\n }\n\n if (data.chat_ui) {\n\n if (data.chat_ui.hide_parent) {\n attributesWidget.hide_parent = true;\n }\n\n if ((data.chat_ui.fscreen && attributesWidget.mode == 'embed') || attributesWidget.fscreen) {\n attributesWidget.widgetDimesions.nextProperty('width', 100);\n attributesWidget.widgetDimesions.nextProperty('height', 100);\n attributesWidget.widgetDimesions.nextProperty('units', '%');\n attributesWidget.fscreen = isMobile = attributesWidget.isMobile = true;\n }\n\n if (data.chat_ui.wheight && !isMobile) {\n attributesWidget.widgetDimesions.nextProperty('height', data.chat_ui.wheight);\n }\n\n if (data.chat_ui.wwidth && !isMobile) {\n attributesWidget.widgetDimesions.nextProperty('width', data.chat_ui.wwidth);\n }\n\n if (data.chat_ui.hhtml) {\n attributesWidget.hhtml = data.chat_ui.hhtml;\n }\n\n if (data.chat_ui.kcw) {\n attributesWidget.kcw = true;\n }\n\n if (data.chat_ui.clinst) {\n attributesWidget.clinst = true;\n }\n\n if (data.chat_ui.wbottom) {\n attributesWidget.widgetDimesions.nextProperty('wbottom', data.chat_ui.wbottom);\n }\n\n if (data.chat_ui.sbottom) {\n attributesWidget.widgetDimesions.nextProperty('sbottom', data.chat_ui.sbottom);\n }\n\n if (data.chat_ui.sright) {\n attributesWidget.widgetDimesions.nextProperty('sright', data.chat_ui.sright);\n }\n\n if (data.chat_ui.wright) {\n attributesWidget.widgetDimesions.nextProperty('wright', data.chat_ui.wright);\n }\n\n if (data.chat_ui.wright_inv) {\n attributesWidget.widgetDimesions.nextProperty('wright_inv', data.chat_ui.wright_inv);\n }\n\n if (data.chat_ui.mobile_popup && isMobile) {\n attributesWidget.mode = 'popup';\n }\n\n if (data.chat_ui.sound_enabled && storageHandler.getSessionStorage(prefixStorage + '_sound') === null) {\n attributesWidget.toggleSound.next(true);\n }\n\n if (data.instance_id) {\n attributesWidget.instance_id = data.instance_id;\n }\n\n if (data.chat_ui.check_status) {\n import('./util/activityMonitoring').then((module) => {\n module.activityMonitoring.setParams({\n 'timeout': data.chat_ui.check_status,\n 'track_mouse': data.chat_ui.track_mouse,\n 'track_activity': data.chat_ui.track_activity\n }, attributesWidget);\n });\n }\n\n if (data.ga) {\n import('./util/analyticEvents').then((module) => {\n module.analyticEvents.setParams({\n 'ga': data.ga\n }, attributesWidget);\n });\n }\n }\n\n if (data.nh && attributesWidget.fresh === false && attributesWidget['position'] != 'api') {\n attributesWidget.nh = data.nh;\n if (attributesWidget.mode == 'widget' || attributesWidget.mode == 'popup') {\n if (data.nh.ap || attributesWidget.userSession.id === null) {\n showNeedHelp(data.nh);\n }\n }\n }\n\n if (data.js_vars) {\n // Javascript custom variables init\n // Extensions can listen for these\n attributesWidget.jsVars.next(data.js_vars);\n\n // Monitor js vars if required\n if (data.js_vars.length > 0) {\n attributesWidget.userSession.setupVarsMonitoring(data.js_vars, (vars, prefillVars) => {\n chatEvents.sendChildEvent('jsVars', [vars, prefillVars]);\n });\n }\n }\n\n // Init main widgets\n if (attributesWidget.mode == 'widget' || attributesWidget.mode == 'popup') {\n attributesWidget.viewHandler.init(attributesWidget, data.ll);\n }\n\n if (!(attributesWidget.position == 'api' && attributesWidget.mode == 'embed')) {\n attributesWidget.mainWidget.init(attributesWidget, data.ll);\n }\n\n // Show status widget\n if (attributesWidget.mode == 'widget' || attributesWidget.mode == 'popup') {\n containerChatObj.cont.show();\n }\n\n if (attributesWidget.loadcb) {\n attributesWidget.loadcb(attributesWidget);\n }\n\n if (data.init_calls) {\n attributesWidget.init_calls = data.init_calls;\n }\n\n attributesWidget.proactive_interval = data.chat_ui.proactive_interval;\n\n if (!data.disable_proactive && (attributesWidget.mode == 'widget' || attributesWidget.mode == 'popup' || attributesWidget.mode == 'embed') && (typeof LHC_API.args.proactive === 'undefined' || LHC_API.args.proactive === true) && attributesWidget.storageHandler.getSessionStorage(prefixStorage + '_invt') === null) {\n showProactive();\n }\n\n if (attributesWidget.init_calls.length > 0) {\n attributesWidget.init_calls.forEach((item) => {\n if (item.extension == 'nodeJSChat') {\n import('./util/nodeJSChat').then((module) => {\n module.nodeJSChat.setParams(item.params, attributesWidget, chatEvents);\n });\n }\n });\n }\n\n })\n\n // Widget Hide event\n attributesWidget.eventEmitter.addListener('closeWidget', function (params) {\n attributesWidget.widgetStatus.next(false);\n chatEvents.sendChildEvent('closedWidget', [params]);\n });\n\n // Send event to the child instantly\n attributesWidget.eventEmitter.addListener('sendChildEvent', function (params) {\n if (typeof params['boot'] !== 'undefined') {\n attributesWidget.mainWidget.bootstrap();\n } else {\n if (attributesWidget.mainWidget.isLoaded == true && lhc.loaded == true) {\n chatEvents.sendChildEvent(params['cmd'], [params['arg']]);\n } else {\n attributesWidget.childCommands.push(params);\n }\n }\n });\n\n // Send smart event to the child\n attributesWidget.eventEmitter.addListener('sendChildExtEvent', function (params) {\n if (typeof params['boot'] !== 'undefined') {\n attributesWidget.mainWidget.bootstrap();\n } else {\n if (attributesWidget.mainWidget.isLoaded == true && lhc.loaded == true) {\n chatEvents.sendChildEvent(params['cmd'], [params['arg']], 'lhc_load_ext');\n } else {\n attributesWidget.childExtCommands.push(params);\n }\n }\n });\n\n // Toggle sound user\n attributesWidget.eventEmitter.addListener('toggleSound', function () {\n var newValue = !attributesWidget.toggleSound.value;\n attributesWidget.toggleSound.next(newValue);\n });\n\n // Toggle cookies policy\n attributesWidget.eventEmitter.addListener('enableCookies', function () {\n\n // Check does cookies are supported in genreal\n if (storageHandler.checkCookiesSupport() === true) {\n // Store session\n var sessionAtrribute = attributesWidget.userSession.getSessionAttributes();\n if (typeof sessionAtrribute.hnh !== 'undefined') { delete sessionAtrribute['hnh']; }\n attributesWidget.storageHandler.storeSessionInformation(sessionAtrribute);\n\n if (typeof LHC_API.args.orig !== 'undefined') {\n\n attributesWidget.mode = LHC_API.args.mode = LHC_API.args.orig.mode;\n LHC_API.args.proactive = LHC_API.args.orig.proactive;\n LHC_API.args.check_messages = LHC_API.args.orig.check_messages;\n\n helperFunctions.makeRequest(LHC_API.args.lhc_base_url + attributesWidget.lang + 'widgetrestapi/settings', {\n params: getArguments()\n }, (data) => {\n // Change mode for react app\n attributesWidget.eventEmitter.emitEvent('sendChildEvent',[{'cmd' : 'attr_set', 'arg' : {'type':'attr_set','attr': ['mode'], data : attributesWidget.mode}}]);\n\n // Show need help widget if it's required\n if (attributesWidget.mode == 'widget' && attributesWidget.nh !== null) {\n showNeedHelp(attributesWidget.nh);\n }\n\n // Enable proactive if it's required\n if ((attributesWidget.mode == 'widget' || attributesWidget.mode == 'popup') && (typeof LHC_API.args.proactive === 'undefined' || LHC_API.args.proactive === true) && attributesWidget.storageHandler.getSessionStorage(prefixStorage + '_invt') === null) {\n showProactive();\n }\n });\n }\n }\n });\n\n\n // Clear chat cookies if there is any\n // Then popup finishes loading it calls this to clean up chat cookies. So visitor can start new chat.\n attributesWidget.eventEmitter.addListener('endChatCookies', function (params) {\n if (attributesWidget.kcw === false || (params && params['force'] == true)) {\n attributesWidget.userSession.setChatInformation({'id': null, 'hash': null});\n attributesWidget.storageHandler.storeSessionInformation(attributesWidget.userSession.getSessionAttributes());\n attributesWidget.proactive = {};\n }\n });\n\n attributesWidget.eventEmitter.addListener('endChat', function (params) {\n\n attributesWidget.userSession.setChatInformation({'id': null, 'hash': null});\n attributesWidget.storageHandler.storeSessionInformation(attributesWidget.userSession.getSessionAttributes());\n\n attributesWidget.proactive = {};\n\n if (attributesWidget.mode != 'popup' && (!params || !params['show_start'])) {\n attributesWidget.widgetStatus.next(false);\n }\n\n if (attributesWidget.viewHandler) {\n attributesWidget.viewHandler.removeUnreadIndicator();\n attributesWidget.eventEmitter.emitEvent('hide_msg_snippet');\n }\n\n attributesWidget.widgetDimesions.nextProperty('height_override', null);\n\n chatEvents.sendChildEvent('endedChat', [{'sender': 'endButton', 'survey' : attributesWidget.survey}]);\n\n if (attributesWidget.mode == 'embed' || (params && params['show_start'])) {\n attributesWidget.eventEmitter.emitEvent('showWidget', [{'sender': 'closeButton'}]);\n }\n\n if (attributesWidget.mode == 'popup') {\n attributesWidget.popupWidget.freeup();\n }\n });\n\n // Widget show event\n attributesWidget.eventEmitter.addListener('showWidget', function (params) {\n\n // Just to restyle if needed\n attributesWidget.mainWidget.hideInvitation();\n\n attributesWidget.widgetStatus.next(true);\n\n if (attributesWidget.mode == 'popup') {\n attributesWidget.popupWidget.init(attributesWidget, chatEvents, params);\n\n attributesWidget.viewHandler.removeUnreadIndicator();\n\n attributesWidget.mainWidget.hide();\n } else if (typeof params !== 'undefined' && typeof params.event !== 'undefined') {\n params.event.preventDefault();\n }\n\n chatEvents.sendChildEvent('shownWidget', [{'sender': 'closeButton'}]);\n });\n\n // Add tag listener\n attributesWidget.eventEmitter.addListener('addTag', function (tag) {\n attributesWidget.tag = attributesWidget.tag != '' ? attributesWidget.tag + ',' + tag : tag;\n attributesWidget.eventEmitter.emitEvent('tagAdded');\n });\n\n // Events\n attributesWidget.eventEmitter.addListener('addEvent', function (events) {\n attributesWidget.events = events;\n attributesWidget.eventEmitter.emitEvent('eventAdded');\n });\n\n // Conversions\n attributesWidget.eventEmitter.addListener('addConversion', function (conversion) {\n attributesWidget.conversion = conversion;\n attributesWidget.eventEmitter.emitEvent('conversionAdded');\n });\n\n // Popup open event\n attributesWidget.eventEmitter.addListener('openPopup', function () {\n\n attributesWidget.popupWidget.init(attributesWidget, chatEvents);\n\n attributesWidget.viewHandler.removeUnreadIndicator();\n\n chatEvents.sendChildEvent('shownWidget', [{'sender': 'closeButton'}]);\n\n attributesWidget.widgetStatus.next(false);\n });\n\n // Chat started event received\n // Store chat information if it's not popup mode.\n attributesWidget.eventEmitter.addListener('chatStarted', function (data, mode) {\n\n attributesWidget.widgetDimesions.nextProperty('height_override', null);\n\n if (mode !== 'popup' || attributesWidget.kcw === true) {\n attributesWidget.userSession.setChatInformation(data, attributesWidget.nh && attributesWidget.nh.ap);\n }\n\n if (mode == 'popup') {\n attributesWidget.mainWidget.hide();\n }\n\n // Store information permanently\n if (attributesWidget.fresh === false && (mode !== 'popup' || attributesWidget.kcw === true)) {\n attributesWidget.storageHandler.storeSessionInformation(attributesWidget.userSession.getSessionAttributes());\n }\n });\n\n // Subscribe event\n attributesWidget.eventEmitter.addListener('subscribeEvent', function (data) {\n attributesWidget.chatNotifications.setPublicKey(data.pk, attributesWidget.eventEmitter);\n attributesWidget.chatNotifications.sendNotification();\n });\n\n // User has subscribed to notifications\n // Send back child subscription information\n attributesWidget.eventEmitter.addListener('subcribedEvent', function (data) {\n chatEvents.sendChildEvent('subcribedEvent', [data]);\n });\n\n // Track widget status changes\n attributesWidget.widgetStatus.subscribe((data) => {\n if (attributesWidget.mode !== 'popup') {\n if (attributesWidget.mode !== 'embed') {\n // Do not store open status in local storage because embed is always open\n attributesWidget.storageHandler.setSessionStorage(prefixStorage + '_ws', data);\n }\n chatEvents.sendChildEvent('widgetStatus', [data]);\n }\n });\n\n // Store sound settings\n attributesWidget.toggleSound.subscribe((data) => {\n attributesWidget.storageHandler.setSessionStorage(prefixStorage + '_sound', data);\n });\n\n attributesWidget.onlineStatus.subscribe((data) => {\n chatEvents.sendChildEvent('onlineStatus', [data]);\n });\n\n attributesWidget.eventEmitter.addListener('screenshot', (data) => {\n helperFunctions.makeScreenshot(attributesWidget.staticJS['screenshot'], data);\n });\n\n attributesWidget.eventEmitter.addListener('screenshare', (data) => {\n import('./util/screenShare').then((module) => {\n module.screenShare.setParams((data || {}), attributesWidget, chatEvents);\n });\n });\n\n attributesWidget.eventEmitter.addListener('location', (data) => {\n document.location = data;\n });\n\n attributesWidget.eventEmitter.addListener('terminated', (data) => {\n attributesWidget.terminated = true;\n // Remove legacy dom\n helperFunctions.removeById(attributesWidget.prefixLowercase+'_container_v2');\n helperFunctions.removeById(attributesWidget.prefixLowercase+'_status_widget_v2');\n });\n\n attributesWidget.eventEmitter.addListener('showInvitation', (data) => {\n attributesWidget.widgetDimesions.nextProperty('bottom_override', 75);\n attributesWidget.widgetDimesions.nextProperty('right_override', 75);\n attributesWidget.mainWidget.showInvitation();\n });\n\n attributesWidget.eventEmitter.addListener('hideAction', (data) => {\n attributesWidget.mainWidget.hide();\n });\n\n attributesWidget.eventEmitter.addListener('showAction', (data) => {\n attributesWidget.mainWidget.show();\n });\n\n attributesWidget.eventEmitter.addListener('zoomImage', (data) => {\n import('./util/zoomImage').then((module) => {\n module.zoomImage.setParams((data || {}), attributesWidget, chatEvents);\n });\n });\n\n attributesWidget.eventEmitter.addListener('hideInvitation', (data) => {\n attributesWidget.mainWidget.hideInvitation();\n if (data.full) {\n attributesWidget.eventEmitter.emitEvent('showWidget', [{'sender': 'closeButton'}]);\n attributesWidget.eventEmitter.emitEvent('fullInvitation', [data]);\n } else {\n attributesWidget.eventEmitter.emitEvent('cancelInvitation', []);\n }\n });\n\n attributesWidget.eventEmitter.addListener('msgSnippet', (data) => {\n if (attributesWidget.mode == 'widget' && attributesWidget.widgetStatus.value === false) {\n\n if (data.full_widget) {\n attributesWidget.eventEmitter.emitEvent('showWidget', [{'sender': 'closeButton'}]);\n return;\n }\n\n attributesWidget.position == 'api' && attributesWidget.viewHandler && attributesWidget.viewHandler.show();\n\n import('./lib/widgets/msgSnippetWidget').then((module) => {\n if (!attributesWidget.msgSnippet) {\n attributesWidget.msgSnippet = new module.msgSnippetWidget(attributesWidget.prefixLowercase);\n containerChatObj.cont.elmDom.appendChild(attributesWidget.msgSnippet.cont.constructUI(), !0);\n attributesWidget.msgSnippet.init(attributesWidget, data);\n } else {\n attributesWidget.msgSnippet.showSnippet(data, true);\n }\n attributesWidget.eventEmitter.emitEvent('unread_message',[{otm: 1}]);\n });\n }\n });\n\n attributesWidget.eventEmitter.addListener('unread_message', (data) => {\n if (data && data.msg_body && !attributesWidget.msgSnippet) {\n import('./lib/widgets/msgSnippetWidget').then((module) => {\n if (!attributesWidget.msgSnippet) {\n attributesWidget.msgSnippet = new module.msgSnippetWidget(attributesWidget.prefixLowercase);\n containerChatObj.cont.elmDom.appendChild(attributesWidget.msgSnippet.cont.constructUI(), !0);\n attributesWidget.msgSnippet.init(attributesWidget, data);\n }\n });\n }\n });\n\n attributesWidget.originalTitle = document.title;\n attributesWidget.blinkInterval = null;\n\n attributesWidget.eventEmitter.addListener('change_language', (data) => {\n attributesWidget.lang = data.lng.replace('/', '') + '/';\n });\n\n attributesWidget.eventEmitter.addListener('unread_message_title', (data) => {\n clearInterval(attributesWidget.blinkInterval);\n if (data.status == false) {\n attributesWidget.blinkInterval = setInterval(() => {\n document.title = (Math.round(new Date().getTime() / 1000) % 2) ? '💬 ' + attributesWidget.originalTitle : attributesWidget.originalTitle;\n }, 1000);\n } else {\n attributesWidget.focused = true;\n document.title = attributesWidget.originalTitle;\n }\n });\n\n attributesWidget.eventEmitter.addListener('widgetHeight', (data) => {\n\n if (data.reset_height) {\n attributesWidget.widgetDimesions.nextProperty('height_override', null);\n attributesWidget.widgetDimesions.nextProperty('bottom_override', null);\n attributesWidget.widgetDimesions.nextProperty('right_override', null);\n attributesWidget.widgetDimesions.nextProperty('width_override', null);\n return;\n }\n\n if (data.force_height || data.force_width || data.force_bottom || data.force_right) {\n data.force_height && attributesWidget.widgetDimesions.nextProperty('height_override', data.force_height);\n data.force_width && attributesWidget.widgetDimesions.nextProperty('width_override', data.force_width);\n data.force_right && attributesWidget.widgetDimesions.nextProperty('right_override', data.force_right);\n data.force_bottom && attributesWidget.widgetDimesions.nextProperty('bottom_override', data.force_bottom);\n return;\n }\n\n if (attributesWidget.mode == 'widget' && attributesWidget.isMobile == false) {\n var d = document,\n e = d.documentElement,\n g = d.getElementsByTagName('body')[0],\n y = global.innerHeight || e.clientHeight || g.clientHeight;\n if (parseInt(data.height) > attributesWidget.widgetDimesions.value['height'] && y > parseInt(data.height)) {\n attributesWidget.widgetDimesions.nextProperty('height_override', parseInt(data.height));\n } else if (attributesWidget.widgetDimesions.value['height_override'] && attributesWidget.widgetDimesions.value['height_override'] > y) {\n attributesWidget.widgetDimesions.nextProperty('height_override', null);\n }\n }\n });\n\n var serviceWorkerAvailable = false;\n try {\n serviceWorkerAvailable = ('serviceWorker' in navigator);\n } catch (e) {\n // Worker not available\n }\n\n if (serviceWorkerAvailable === true) {\n try {\n navigator.serviceWorker.addEventListener('message', function (event) {\n try {\n if (typeof event.data.lhc_ch !== 'undefined' && typeof event.data.lhc_cid !== 'undefined') {\n attributesWidget.widgetStatus.next(true);\n if (attributesWidget.mode == 'popup') {\n attributesWidget.userSession.setChatInformation({\n 'id': event.data.lhc_cid,\n 'hash': event.data.lhc_ch\n });\n attributesWidget.eventEmitter.emitEvent('unread_message');\n } else {\n chatEvents.sendChildEvent('shownWidget', [{'sender': 'closeButton'}]);\n chatEvents.sendChildEvent('reopenNotification', [{\n 'id': event.data.lhc_cid,\n 'hash': event.data.lhc_ch\n }]);\n }\n }\n } catch (e) {\n if (lhcError) lhcError.log(e.message, \"index.js\", e.lineNumber || e.line, e.stack); else throw Error(\"lhc : \" + e.message);\n }\n });\n } catch (e) {\n // Ignore sandbox error\n }\n }\n\n // Listed for post messages\n const handleMessages = (e) => {\n\n if (attributesWidget.terminated === true || typeof e.data !== 'string' || e.data.indexOf(attributesWidget.prefixLowercase + '::')) {\n return;\n }\n\n const parts = e.data.split('::');\n\n if (typeof e.origin !== 'undefined' && e.origin != 'about:') {\n var originDomain = e.origin.replace(\"http://\", \"\").replace(\"https://\", \"\").replace(/:(\\d+)$/, '');\n\n // We allow to send events only from chat installation or page where script is embeded.\n if (originDomain !== document.domain && attributesWidget.domain_lhc !== originDomain && parts[1] !== 'started' && parts[1] !== 'isstarted') {\n return;\n }\n }\n\n if (parts[1] == 'ready') {\n\n chatEvents.sendReadyEvent(parts[2] == 'true');\n\n if (attributesWidget.storageHandler.getSessionStorage(prefixStorage + '_screenshare')) {\n attributesWidget.eventEmitter.emitEvent('screenshare', [{'auto_start': true}]);\n }\n\n const focusChangeCb = (e) => {\n const focused = e.type === \"focus\";\n attributesWidget.focused = focused;\n chatEvents.sendChildEvent('focus_changed', [{'status': focused}]);\n };\n\n window.addEventListener('focus', focusChangeCb);\n window.addEventListener('blur', focusChangeCb);\n window.addEventListener('pageshow', focusChangeCb);\n window.addEventListener('pagehide', focusChangeCb);\n\n // App is fully loaded\n lhc.loaded = true;\n\n chatEvents.sendChildEvent('ext_modules', [attributesWidget.staticJS['ex_cb_js']]);\n\n // send child commands if there is any\n attributesWidget.childExtCommands.forEach((params) => {\n chatEvents.sendChildEvent(params['cmd'], [params['arg']], 'lhc_load_ext');\n });\n\n // send child commands if there is any\n attributesWidget.childCommands.forEach((params) => {\n chatEvents.sendChildEvent(params['cmd'], [params['arg']]);\n });\n\n if (attributesWidget.react_attr !== null) {\n attributesWidget.react_attr.forEach(item => {\n chatEvents.sendChildEvent('attr_set',[{\n 'type':'attr_set','attr': item['k'],\n data : item['v']\n }]);\n })\n }\n\n } else if (parts[1] == 'ready_popup') {\n attributesWidget.popupWidget.sendParameters(chatEvents);\n } else if (parts[1] == 'isstarted') {\n // Parent window has LHC, terminate present instance\n attributesWidget.eventEmitter.emitEvent('terminated', []);\n } else if (parts[1] == 'started') {\n if (attributesWidget.hide_parent) {\n attributesWidget.eventEmitter.emitEvent('terminated', []);\n } else {\n e.source.postMessage('lhc::isstarted','*');\n }\n } else {\n attributesWidget.eventEmitter.emitEvent(parts[1], JSON.parse(parts[2]));\n }\n };\n\n if (window.addEventListener) {\n window.addEventListener(\"message\", handleMessages, false);\n } else if (window.attachEvent) {\n window.attachEvent(\"onmessage\", handleMessages);\n } else if (document.attachEvent) {\n document.attachEvent(\"onmessage\", handleMessages);\n }\n };\n\n var preInit = () => {\n\n // Avoid multiple times execution\n if (lhc.ready === true) {\n return;\n }\n\n // we have found document body so we can continue\n if (document.body) {\n lhc.ready = true;\n }\n\n lhc.init = init;\n\n if (LHC_API.args.before_init) {\n LHC_API.args.before_init(lhc);\n }\n\n LHC_API.args.manual_init || init();\n };\n\n const eventsHandler = require('./util/domEventsHandler').domEventsHandler;\n\n (preInit(), !lhc.ready) || (eventsHandler.listen(document, \"DOMContentLoaded\", function () {\n preInit();\n }, \"domloaded\"),\n eventsHandler.listen(document, \"readystatechange\", function () {\n (\"complete\" === document.readyState || \"interactive\" === document.readyState && document.body) && preInit();\n }, \"domstatechange\"),\n eventsHandler.listen(global, \"load\", function () {\n preInit();\n }, \"windowload\"));\n\n }).call(this, global['$_' + scopeScript], global[scopeScript + '_API']);\n\n } catch (e) {\n if (lhcError) lhcError.log(e.message, \"index.js\", e.lineNumber || e.line, e.stack); else throw Error(\"lhc : \" + e.message);\n }\n\n})(window);"],"names":["rawAsap","freeTasks","pendingErrors","requestErrorThrow","makeRequestCallFromTimer","length","shift","asap","task","rawTask","pop","RawTask","this","module","exports","prototype","call","error","onerror","push","queue","requestFlush","index","flush","currentIndex","scan","newLength","toggle","observer","node","scope","g","self","BrowserMutationObserver","MutationObserver","WebKitMutationObserver","callback","timeoutHandle","setTimeout","handleTimer","intervalHandle","setInterval","clearTimeout","clearInterval","document","createTextNode","observe","characterData","data","_setPrototypeOf","o","p","Object","setPrototypeOf","__proto__","_possibleConstructorReturn","TypeError","ReferenceError","_getPrototypeOf","getPrototypeOf","UIConstructorIframe","subClass","superClass","create","constructor","value","writable","configurable","defineProperty","elementId","style","attributes","tagname","documentRef","bodyId","dir","cl","header","elmDomDoc","helperFunctions","elmDom","getElementsByTagName","innerHTML","body","id","html","setAttribute","nodeDoctype","implementation","createDocumentType","doctype","replaceChild","insertBefore","childNodes","e","console","log","insertCssFile","insertContent","tmpl","UIConsturctor","f","tagName","classNames","keys","forEach","attr","a","className","join","cssText","c","d","k","getElementById","split","domEventsHandler","restyle","reset","createDocumentFragment","type","settings","appendChild","styleSheet","nodeValue","elm","href","createElement","b","rel","crossOrigin","src","async","loadcb","onload","key","hasOwnProperty","chatNotifications","_chatNotifications","isNotificationsSubscribed","applicationServerPublicKey","eventEmitter","publicKey","that","swRegistration","navigator","window","Notification","permission","requestPermission","alert","serviceWorker","register","then","swReg","pushManager","getSubscription","subscription","applicationServerKey","base64String","base64","repeat","replace","rawData","atob","outputArray","Uint8Array","i","charCodeAt","urlB64ToUint8Array","subscribe","getKey","token","contentEncoding","PushManager","supportedContentEncodings","payload","JSON","stringify","endpoint","btoa","String","fromCharCode","apply","authToken","emitEvent","updateSubscriptionOnServer","_helperFunctions","s","contentWindow","contentDocument","EId","EObj","parentNode","removeChild","Intl","DateTimeFormat","resolvedOptions","timeZone","Date","stdTimezoneOffset","jan","getFullYear","jul","Math","max","getTimezoneOffset","dst","today","params","outline","visibility","resize","boxshadow","overflow","background","opacity","top","right","bottom","left","position","border","minheight","minwidth","maxheight","maxwidth","padding","margin","transition","transform","width","height","display","zindex","backgroundcolor","cursor","borderRadius","element","classList","contains","match","RegExp","add","hasClass","remove","screenshot","url","html2canvas","th","onreadystatechange","makeScreenshot","canvas","xhr","XMLHttpRequest","open","setRequestHeader","send","encodeURIComponent","toDataURL","err","item","pairs","request","urlRequest","makeQuery","readyState","status","parse","responseText","message","req","containerChat","prefix","pnode","cont","constructUI","mainWidget","units","originalCSS","bottom_override","isLoaded","loadStatus","main","css","restyleStyle","position_placement","mode","fscreen","massRestyle","wloaded","next","isMobile","constructUIIframe","staticJS","hhtml","cont_ss","lazyLoad","makeContent","getSessionAttributes","bootstrap","toggleVisibilityWrap","toggleVisibility","widgetStatus","monitorDimensionsWrap","monitorDimensions","widgetDimesions","valueInternal","screenAttributesUpdate","innerHeight","nextPropertySilent","innerWidth","callListeners","addEventListener","addListener","insertCssRemoteFile","theme","LHC_API","args","lhc_base_url","theme_v","checkLoadStatus","insertJSFile","prefixLowercase","hide","show","width_override","width_soverride","height_override","height_soverride","wbottom","clinst","right_override","wright_inv","wright","mainWidgetPopup","freeup","argumentsQuery","Array","paramsReturn","LHCChatOptions","name","encrypted","size","attr_prefill","attr_prefill_admin","chatEvents","paramsPopup","elementReferrerPopup","closed","event","preventDefault","focus","urlArgumetns","storageHandler","cookieEnabled","toggleSound","setSessionStorage","fontSize","getLocalStorage","parseInt","getSessionReferrer","parseOptions","dualScreenLeft","undefined","screenLeft","screenX","dualScreenTop","screenTop","screenY","documentElement","clientWidth","screen","clientHeight","systemZoom","availWidth","paramsWindow","newWin","needWindow","windowCreated","location","viewHandler","kcw","sendChildEvent","sendParameters","js_vars","js_args","currentVar","eval","var","statusWidget","controlMode","font","widget","shidden","lload","unread_counter","onlineStatus","icon","leaveMessage","sload","placement","sbottom","sright","_inst","attachUserEventListener","offline_redirect","toggleOfflineIcon","chatParams","unreadMessagesNumber","getSessionStorage","unreadTotal","otm","showUnreadIndicator","init","isNaN","now","removeUnreadIndicator","number","iconText","iconValue","innerText","removeSessionStorage","hideOffline","chatEventsHandler","getJSVarsValues","jsVars","prefillOptions","fieldsCustom","prefilOptionsList","concat","getPrefillVars","command","postMessage","isIE","popupWidget","popup","getInitAttributes","sendChildCommand","_domEventsHandler","events","object","dispatch","getEvent","attachEvent","eventName","presentEvent","removeEventHandler","eventListener","listener","removeEventListener","detachEvent","eventInstance","_this","caller","arguments","Event","monitoredVariable","listeners","val","indexOf","splice","global","domain","cookiesSupportChecked","checkCookiesSupport","secureCookie","cookiePerPage","hasSessionStorage","sessionStorage","hasLocalStorage","localStorage","cookie","coookieName","cookieValue","expireTime","string","setTime","getTime","toGMTString","cookieName","baseCookie","charAt","substring","host","hostname","setItem","removeItem","getItem","ref","sessionInformation","getHTTPCookie","parseSessionInformation","setHTTPCookie","getStoreValue","getCookieDomain","content","contentReturn","parts","unescape","userSession","vid","hnh","hash","updateVarsTimeout","decode","evalJSON","str","$","parseJSON","toJSON","encode","cb","lhc_var","validator","set","obj","prop","updateJSVars","Proxy","lhc_var_prefill","getAppendVariables","varsReturn","varsSet","getVars","jsVarData","append","vars","varsJSON","alwaysPersistentNeedHelp","round","appleIphone","appleIpod","appleTablet","appleUniversal","androidPhone","androidTablet","amazonPhone","amazonTablet","windowsPhone","windowsTablet","otherBlackBerry","otherBlackBerry10","otherOpera","otherChrome","otherFirefox","isAppleTabletOnIos13","platform","maxTouchPoints","MSStream","param","nav","userAgent","tmp","regex","test","createMatch","result","apple","phone","ipod","tablet","universal","device","amazon","android","windows","other","blackberry","blackberry10","opera","firefox","chrome","any","noop","LAST_ERROR","IS_ERROR","Promise","fn","_U","_V","_W","_X","doResolve","handle","deferred","_Y","onFulfilled","onRejected","ret","ex","tryCallOne","reject","promise","resolve","handleResolved","newValue","getThen","finale","bind","_Z","Handler","done","res","reason","tryCallTwo","_0","safeThen","TRUE","valuePromise","FALSE","NULL","UNDEFINED","ZERO","EMPTYSTRING","iterableToArray","iterable","from","x","slice","all","arr","remaining","race","values","finally","denodeify","argumentCount","Infinity","callbackFn","Function","denodeifyWithCount","fnLength","map","_","denodeifyWithoutCount","nodeify","ctx","enableSynchronous","isPending","getState","isFulfilled","isRejected","getValue","Error","getReason","disableSynchronous","EventEmitter","proto","originalGlobalValue","indexOfListener","alias","isValidListener","getListeners","evt","response","_getEvents","flattenListeners","flatListeners","getListenersAsObject","listenerIsWrapped","once","on","addOnceListener","defineEvent","defineEvents","evts","removeListener","off","addListeners","manipulateListeners","removeListeners","single","multiple","removeEvent","_events","removeAllListeners","listenersMap","_getOnceReturnValue","trigger","emit","setOnceReturnValue","_onceReturnValue","noConflict","_classCallCheck","instance","Constructor","_defineProperties","target","props","descriptor","enumerable","_createClass","protoProps","staticProps","_typeof","Symbol","iterator","__webpack_module_cache__","inProgress","dataWebpackPrefix","__webpack_require__","moduleId","cachedModule","__webpack_modules__","m","n","getter","__esModule","definition","get","chunkId","reduce","promises","u","globalThis","l","script","needAttach","scripts","getAttribute","charset","timeout","nc","origin","onScriptComplete","prev","doneFns","head","r","toStringTag","installedChunks","j","installedChunkData","errorType","realSrc","webpackJsonpCallback","parentChunkLoadingFunction","chunkIds","moreModules","runtime","some","chunkLoadingGlobal","currentScript","scopeScript","lhcError","filename","lineNumber","stack","column","file","line","lineno","colno","lhc","loaded","connected","ready","version","require","default","BehaviorSubject","mobile_view","toLowerCase","prefixStorage","scope_storage","cookieEnabledUser","cookie_enabled","userMode","orig","proactive","check_messages","cookie_per_page","setCookiePerPage","referrer","substr","protocol","setSessionReferer","languageOverride","lang","attributesWidget","terminated","prefixScope","msgSnippet","react_attr","hide_parent","hide_iframe","hide_status","msgsnippet_status","toUpperCase","assign","fresh","popupDimesnions","pheight","pwidth","leaveamessage","department","dep_default","product","domain_lhc","instance_id","profile_pic","base_url","tag","captcha","focused","identifier","proactive_interval","langOverride","subject_id","bot_id","trigger_id","priority","conversion","survey","operator","phash","pvhash","nh","init_calls","childCommands","childExtCommands","wwidth","wheight","setAttributes","setSessionInformation","getSessionInformation","setSessionReferrer","containerChatObj","embedWrapper","getArguments","UUID","getVID","getTzOffset","title","showNeedHelp","needhelpWidget","showProactive","proactiveChat","setParams","makeRequest","wv","terminate","chat_ui","isOnline","parent","__webpack_public_path__","chunks_location","secure_cookie","setSecureCookie","setCookieDomain","siteaccess","static","pdim","survey_id","cont_css","wposition","ts","hash_ts","setVID","storeSessionInformation","nextProperty","mobile_popup","sound_enabled","check_status","activityMonitoring","track_mouse","track_activity","ga","analyticEvents","ap","setupVarsMonitoring","prefillVars","ll","disable_proactive","extension","nodeJSChat","removeById","po","getHours","getMinutes","sessionAtrribute","setChatInformation","hideInvitation","setPublicKey","pk","sendNotification","screenShare","showInvitation","zoomImage","full","full_widget","showSnippet","msgSnippetWidget","msg_body","originalTitle","blinkInterval","lng","reset_height","force_height","force_width","force_bottom","force_right","y","serviceWorkerAvailable","lhc_ch","lhc_cid","handleMessages","originDomain","sendReadyEvent","focusChangeCb","source","preInit","before_init","manual_init","eventsHandler","listen"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"index.js","mappings":";uEAGA,IAAIA,EAAU,EAAQ,KAElBC,EAAY,GAGZC,EAAgB,GAChBC,EAAoBH,EAAQI,0BAEhC,WACI,GAAIF,EAAcG,OACd,MAAMH,EAAcI,WAa5B,SAASC,EAAKC,GACV,IAAIC,GAEAA,EADAR,EAAUI,OACAJ,EAAUS,MAEV,IAAIC,GAEVH,KAAOA,EACfR,EAAQS,GAKZ,SAASE,IACLC,KAAKJ,KAAO,KAfhBK,EAAOC,QAAUP,EAoBjBI,EAAQI,UAAUC,KAAO,WACrB,IACIJ,KAAKJ,KAAKQ,OACZ,MAAOC,GACDV,EAAKW,QAILX,EAAKW,QAAQD,IAKbf,EAAciB,KAAKF,GACnBd,KAEN,QACES,KAAKJ,KAAO,KACZP,EAAUA,EAAUI,QAAUO,yCClDtC,SAASZ,EAAQQ,GACRY,EAAMf,QACPgB,IAIJD,EAAMA,EAAMf,QAAUG,EAP1BK,EAAOC,QAAUd,EAUjB,IAOIqB,EAPAD,EAAQ,GAWRE,EAAQ,EAYZ,SAASC,IACL,KAAOD,EAAQF,EAAMf,QAAQ,CACzB,IAAImB,EAAeF,EAUnB,GAPAA,GAAgB,EAChBF,EAAMI,GAAcR,OAMhBM,EApBG,KAoBe,CAGlB,IAAK,IAAIG,EAAO,EAAGC,EAAYN,EAAMf,OAASiB,EAAOG,EAAOC,EAAWD,IACnEL,EAAMK,GAAQL,EAAMK,EAAOH,GAE/BF,EAAMf,QAAUiB,EAChBA,EAAQ,GAGhBF,EAAMf,OAAS,EACfiB,EAAQ,EAcZ,IA0DQK,EACAC,EACAC,EA5DJC,OAA0B,IAAX,EAAAC,EAAyB,EAAAA,EAASC,KACjDC,EAA0BH,EAAMI,kBAAoBJ,EAAMK,uBA2G9D,SAAS/B,EAAyBgC,GAC9B,OAAO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S8N,YAAc,gBAAkB9N,SAAS8N,YAAc9N,SAASuC,OAASg0B,MACnG,kBACHG,EAAcC,OAAOvc,EAAQ,QAAQ,WACjCmc,MACD,gBAERn4B,KAAKJ,KAAMoc,EAAO,KAAO0R,GAAc1R,EAAO0R,EAAc,SAEjE,MAAO5oB,GACL,IAAI6oB,EAAqF,MAAMrG,MAAM,SAAWxiB,EAAEgL,SAApG6d,EAAS3oB,IAAIF,EAAEgL,QAAS,WAAYhL,EAAE+oB,YAAc/oB,EAAEmpB,KAAMnpB,EAAEgpB,SAhiCpF,CAmiCG5lB","sources":["webpack://LiveHelperChat/./node_modules/asap/browser-asap.js","webpack://LiveHelperChat/./node_modules/asap/browser-raw.js","webpack://LiveHelperChat/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://LiveHelperChat/./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js","webpack://LiveHelperChat/./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack://LiveHelperChat/./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","webpack://LiveHelperChat/./src/lib/UIConstructorIframe.js","webpack://LiveHelperChat/./node_modules/@babel/runtime/helpers/esm/inherits.js","webpack://LiveHelperChat/./src/lib/UIConsturctor.js","webpack://LiveHelperChat/./src/lib/chatNotifications.js","webpack://LiveHelperChat/./src/lib/helperFunctions.js","webpack://LiveHelperChat/./src/lib/settings.js","webpack://LiveHelperChat/./src/lib/widgets/containerChat.js","webpack://LiveHelperChat/./src/lib/widgets/mainWidget.js","webpack://LiveHelperChat/./src/lib/widgets/mainWidgetPopup.js","webpack://LiveHelperChat/./src/lib/widgets/statusWidget.js","webpack://LiveHelperChat/./src/util/chatEventsHandler.js","webpack://LiveHelperChat/./src/util/domEventsHandler.js","webpack://LiveHelperChat/./src/util/monitoredVariable.js","webpack://LiveHelperChat/./src/util/storageHandler.js","webpack://LiveHelperChat/./src/util/userSession.js","webpack://LiveHelperChat/./node_modules/ismobilejs/esm/isMobile.js","webpack://LiveHelperChat/./node_modules/promise/index.js","webpack://LiveHelperChat/./node_modules/promise/lib/core.js","webpack://LiveHelperChat/./node_modules/promise/lib/done.js","webpack://LiveHelperChat/./node_modules/promise/lib/es6-extensions.js","webpack://LiveHelperChat/./node_modules/promise/lib/finally.js","webpack://LiveHelperChat/./node_modules/promise/lib/index.js","webpack://LiveHelperChat/./node_modules/promise/lib/node-extensions.js","webpack://LiveHelperChat/./node_modules/promise/lib/synchronous.js","webpack://LiveHelperChat/./node_modules/wolfy87-eventemitter/EventEmitter.js","webpack://LiveHelperChat/./node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack://LiveHelperChat/./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://LiveHelperChat/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://LiveHelperChat/webpack/bootstrap","webpack://LiveHelperChat/webpack/runtime/load script","webpack://LiveHelperChat/webpack/runtime/compat get default export","webpack://LiveHelperChat/webpack/runtime/define property getters","webpack://LiveHelperChat/webpack/runtime/ensure chunk","webpack://LiveHelperChat/webpack/runtime/get javascript chunk filename","webpack://LiveHelperChat/webpack/runtime/global","webpack://LiveHelperChat/webpack/runtime/hasOwnProperty shorthand","webpack://LiveHelperChat/webpack/runtime/make namespace object","webpack://LiveHelperChat/webpack/runtime/publicPath","webpack://LiveHelperChat/webpack/runtime/jsonp chunk loading","webpack://LiveHelperChat/./src/index.js"],"sourcesContent":["\"use strict\";\n\n// rawAsap provides everything we need except exception management.\nvar rawAsap = require(\"./raw\");\n// RawTasks are recycled to reduce GC churn.\nvar freeTasks = [];\n// We queue errors to ensure they are thrown in right order (FIFO).\n// Array-as-queue is good enough here, since we are just dealing with exceptions.\nvar pendingErrors = [];\nvar requestErrorThrow = rawAsap.makeRequestCallFromTimer(throwFirstError);\n\nfunction throwFirstError() {\n if (pendingErrors.length) {\n throw pendingErrors.shift();\n }\n}\n\n/**\n * Calls a task as soon as possible after returning, in its own event, with priority\n * over other events like animation, reflow, and repaint. An error thrown from an\n * event will not interrupt, nor even substantially slow down the processing of\n * other events, but will be rather postponed to a lower priority event.\n * @param {{call}} task A callable object, typically a function that takes no\n * arguments.\n */\nmodule.exports = asap;\nfunction asap(task) {\n var rawTask;\n if (freeTasks.length) {\n rawTask = freeTasks.pop();\n } else {\n rawTask = new RawTask();\n }\n rawTask.task = task;\n rawAsap(rawTask);\n}\n\n// We wrap tasks with recyclable task objects. A task object implements\n// `call`, just like a function.\nfunction RawTask() {\n this.task = null;\n}\n\n// The sole purpose of wrapping the task is to catch the exception and recycle\n// the task object after its single use.\nRawTask.prototype.call = function () {\n try {\n this.task.call();\n } catch (error) {\n if (asap.onerror) {\n // This hook exists purely for testing purposes.\n // Its name will be periodically randomized to break any code that\n // depends on its existence.\n asap.onerror(error);\n } else {\n // In a web browser, exceptions are not fatal. However, to avoid\n // slowing down the queue of pending tasks, we rethrow the error in a\n // lower priority turn.\n pendingErrors.push(error);\n requestErrorThrow();\n }\n } finally {\n this.task = null;\n freeTasks[freeTasks.length] = this;\n }\n};\n","\"use strict\";\n\n// Use the fastest means possible to execute a task in its own turn, with\n// priority over other events including IO, animation, reflow, and redraw\n// events in browsers.\n//\n// An exception thrown by a task will permanently interrupt the processing of\n// subsequent tasks. The higher level `asap` function ensures that if an\n// exception is thrown by a task, that the task queue will continue flushing as\n// soon as possible, but if you use `rawAsap` directly, you are responsible to\n// either ensure that no exceptions are thrown from your task, or to manually\n// call `rawAsap.requestFlush` if an exception is thrown.\nmodule.exports = rawAsap;\nfunction rawAsap(task) {\n if (!queue.length) {\n requestFlush();\n flushing = true;\n }\n // Equivalent to push, but avoids a function call.\n queue[queue.length] = task;\n}\n\nvar queue = [];\n// Once a flush has been requested, no further calls to `requestFlush` are\n// necessary until the next `flush` completes.\nvar flushing = false;\n// `requestFlush` is an implementation-specific method that attempts to kick\n// off a `flush` event as quickly as possible. `flush` will attempt to exhaust\n// the event queue before yielding to the browser's own event loop.\nvar requestFlush;\n// The position of the next task to execute in the task queue. This is\n// preserved between calls to `flush` so that it can be resumed if\n// a task throws an exception.\nvar index = 0;\n// If a task schedules additional tasks recursively, the task queue can grow\n// unbounded. To prevent memory exhaustion, the task queue will periodically\n// truncate already-completed tasks.\nvar capacity = 1024;\n\n// The flush function processes all tasks that have been scheduled with\n// `rawAsap` unless and until one of those tasks throws an exception.\n// If a task throws an exception, `flush` ensures that its state will remain\n// consistent and will resume where it left off when called again.\n// However, `flush` does not make any arrangements to be called again if an\n// exception is thrown.\nfunction flush() {\n while (index < queue.length) {\n var currentIndex = index;\n // Advance the index before calling the task. This ensures that we will\n // begin flushing on the next task the task throws an error.\n index = index + 1;\n queue[currentIndex].call();\n // Prevent leaking memory for long chains of recursive calls to `asap`.\n // If we call `asap` within tasks scheduled by `asap`, the queue will\n // grow, but to avoid an O(n) walk for every task we execute, we don't\n // shift tasks off the queue after they have been executed.\n // Instead, we periodically shift 1024 tasks off the queue.\n if (index > capacity) {\n // Manually shift all values starting at the index back to the\n // beginning of the queue.\n for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {\n queue[scan] = queue[scan + index];\n }\n queue.length -= index;\n index = 0;\n }\n }\n queue.length = 0;\n index = 0;\n flushing = false;\n}\n\n// `requestFlush` is implemented using a strategy based on data collected from\n// every available SauceLabs Selenium web driver worker at time of writing.\n// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593\n\n// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that\n// have WebKitMutationObserver but not un-prefixed MutationObserver.\n// Must use `global` or `self` instead of `window` to work in both frames and web\n// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.\n\n/* globals self */\nvar scope = typeof global !== \"undefined\" ? global : self;\nvar BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver;\n\n// MutationObservers are desirable because they have high priority and work\n// reliably everywhere they are implemented.\n// They are implemented in all modern browsers.\n//\n// - Android 4-4.3\n// - Chrome 26-34\n// - Firefox 14-29\n// - Internet Explorer 11\n// - iPad Safari 6-7.1\n// - iPhone Safari 7-7.1\n// - Safari 6-7\nif (typeof BrowserMutationObserver === \"function\") {\n requestFlush = makeRequestCallFromMutationObserver(flush);\n\n// MessageChannels are desirable because they give direct access to the HTML\n// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera\n// 11-12, and in web workers in many engines.\n// Although message channels yield to any queued rendering and IO tasks, they\n// would be better than imposing the 4ms delay of timers.\n// However, they do not work reliably in Internet Explorer or Safari.\n\n// Internet Explorer 10 is the only browser that has setImmediate but does\n// not have MutationObservers.\n// Although setImmediate yields to the browser's renderer, it would be\n// preferrable to falling back to setTimeout since it does not have\n// the minimum 4ms penalty.\n// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and\n// Desktop to a lesser extent) that renders both setImmediate and\n// MessageChannel useless for the purposes of ASAP.\n// https://github.com/kriskowal/q/issues/396\n\n// Timers are implemented universally.\n// We fall back to timers in workers in most engines, and in foreground\n// contexts in the following browsers.\n// However, note that even this simple case requires nuances to operate in a\n// broad spectrum of browsers.\n//\n// - Firefox 3-13\n// - Internet Explorer 6-9\n// - iPad Safari 4.3\n// - Lynx 2.8.7\n} else {\n requestFlush = makeRequestCallFromTimer(flush);\n}\n\n// `requestFlush` requests that the high priority event queue be flushed as\n// soon as possible.\n// This is useful to prevent an error thrown in a task from stalling the event\n// queue if the exception handled by Node.js’s\n// `process.on(\"uncaughtException\")` or by a domain.\nrawAsap.requestFlush = requestFlush;\n\n// To request a high priority event, we induce a mutation observer by toggling\n// the text of a text node between \"1\" and \"-1\".\nfunction makeRequestCallFromMutationObserver(callback) {\n var toggle = 1;\n var observer = new BrowserMutationObserver(callback);\n var node = document.createTextNode(\"\");\n observer.observe(node, {characterData: true});\n return function requestCall() {\n toggle = -toggle;\n node.data = toggle;\n };\n}\n\n// The message channel technique was discovered by Malte Ubl and was the\n// original foundation for this library.\n// http://www.nonblocking.io/2011/06/windownexttick.html\n\n// Safari 6.0.5 (at least) intermittently fails to create message ports on a\n// page's first load. Thankfully, this version of Safari supports\n// MutationObservers, so we don't need to fall back in that case.\n\n// function makeRequestCallFromMessageChannel(callback) {\n// var channel = new MessageChannel();\n// channel.port1.onmessage = callback;\n// return function requestCall() {\n// channel.port2.postMessage(0);\n// };\n// }\n\n// For reasons explained above, we are also unable to use `setImmediate`\n// under any circumstances.\n// Even if we were, there is another bug in Internet Explorer 10.\n// It is not sufficient to assign `setImmediate` to `requestFlush` because\n// `setImmediate` must be called *by name* and therefore must be wrapped in a\n// closure.\n// Never forget.\n\n// function makeRequestCallFromSetImmediate(callback) {\n// return function requestCall() {\n// setImmediate(callback);\n// };\n// }\n\n// Safari 6.0 has a problem where timers will get lost while the user is\n// scrolling. This problem does not impact ASAP because Safari 6.0 supports\n// mutation observers, so that implementation is used instead.\n// However, if we ever elect to use timers in Safari, the prevalent work-around\n// is to add a scroll event listener that calls for a flush.\n\n// `setTimeout` does not call the passed callback if the delay is less than\n// approximately 7 in web workers in Firefox 8 through 18, and sometimes not\n// even then.\n\nfunction makeRequestCallFromTimer(callback) {\n return function requestCall() {\n // We dispatch a timeout with a specified delay of 0 for engines that\n // can reliably accommodate that request. This will usually be snapped\n // to a 4 milisecond delay, but once we're flushing, there's no delay\n // between events.\n var timeoutHandle = setTimeout(handleTimer, 0);\n // However, since this timer gets frequently dropped in Firefox\n // workers, we enlist an interval handle that will try to fire\n // an event 20 times per second until it succeeds.\n var intervalHandle = setInterval(handleTimer, 50);\n\n function handleTimer() {\n // Whichever timer succeeds will cancel both timers and\n // execute the callback.\n clearTimeout(timeoutHandle);\n clearInterval(intervalHandle);\n callback();\n }\n };\n}\n\n// This is for `asap.js` only.\n// Its name will be periodically randomized to break any code that depends on\n// its existence.\nrawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;\n\n// ASAP was originally a nextTick shim included in Q. This was factored out\n// into this ASAP package. It was later adapted to RSVP which made further\n// amendments. These decisions, particularly to marginalize MessageChannel and\n// to capture the MutationObserver implementation in a closure, were integrated\n// back into ASAP proper.\n// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js\n","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","import _typeof from \"./typeof.js\";\nimport assertThisInitialized from \"./assertThisInitialized.js\";\nexport default function _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n\n return assertThisInitialized(self);\n}","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","import {UIConsturctor} from './UIConsturctor';\nimport {helperFunctions} from './helperFunctions';\n\nexport class UIConstructorIframe extends UIConsturctor {\n\n constructor(elementId, style, attributes, tagname, documentRef) {\n super(elementId, style, attributes, tagname, documentRef);\n this.bodyId = '';\n }\n\n constructUIIframe(style, dir, cl, header) {\n\n if (typeof dir === 'undefined'){\n dir = 'ltr';\n }\n\n if (typeof cl === 'undefined'){\n cl = 'en';\n }\n\n if (typeof header === 'undefined'){\n header = '';\n }\n\n this.elmDomDoc = helperFunctions.getDocument(this.elmDom);\n if (this.elmDomDoc === null) return null;\n\n try {\n this.elmDomDoc.getElementsByTagName(\"head\")[0].innerHTML = ''+header;\n\n if (this.bodyId != '') {\n this.elmDomDoc.body.id = this.bodyId;\n }\n\n var html = this.elmDomDoc.getElementsByTagName(\"html\")[0];\n html.setAttribute(\"lang\", cl);\n html.setAttribute(\"dir\", dir);\n\n var nodeDoctype = document.implementation.createDocumentType(\n 'html',\n '',\n ''\n );\n\n if (this.elmDomDoc.doctype) {\n this.elmDomDoc.replaceChild(nodeDoctype, this.elmDomDoc.doctype);\n } else {\n this.elmDomDoc.insertBefore(nodeDoctype, this.elmDomDoc.childNodes[0]);\n }\n\n } catch (e) {\n console.log(e);\n }\n\n this.insertCssFile(style);\n this.insertContent();\n };\n\n insertContent () {\n this.elmDomDoc.body.innerHTML = this.tmpl\n };\n};\n\n","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}","import {helperFunctions} from './helperFunctions';\nimport {settings} from './settings.js';\nimport {domEventsHandler} from '../util/domEventsHandler';\n\nexport class UIConsturctor {\n constructor(elementId, style, attributes, tagname, documentRef) {\n var f = this;\n this.elementId = elementId || \"\";\n this.style = style || \"\";\n this.tagName = tagname || \"div\";\n this.tmpl = \"\";\n this.elmDom = null;\n this.elmDomDoc = documentRef || document;\n this.attributes = {};\n this.classNames = [];\n\n this.elementId && (this.attributes.id = this.elementId);\n\n attributes && Object.keys(attributes).forEach(function (attr) {\n f.attributes[attr] = attributes[attr]\n })\n }\n\n constructUI(a) {\n this.elmDomDoc =\n a || this.elmDomDoc;\n this.elmDom = helperFunctions.initElement(this.elmDomDoc, this.tagName, this.attributes, this.style, this.tmpl);\n this.elmDom.className += this.classNames.join(\" \");\n return this.elmDom\n };\n\n restyle(attr, style) {\n style && (this.elmDom ? this.elmDom.style.cssText += \";\" + attr + \":\" + style : this.style += \";\" + attr + \":\" + style)\n };\n\n attachUserEventListener(a, c, d, k) {\n var e;\n if (e = d ? this.getElementById(d) : this.elmDom) d = a.split(\" \"), 1 < d.length ? d.forEach(function (a) {\n domEventsHandler.listen(e, a, c, a + k)\n }) : domEventsHandler.listen(e, a, c, k)\n };\n\n getElementById(a) {\n return this.elmDom ? this.elmDomDoc.getElementById(a) : null\n };\n\n hide() {\n this.restyle(\"display\", \"none !important\");\n }\n\n show() {\n this.restyle(\"display\", \"block !important\");\n }\n\n insertCssFile(style, reset) {\n var d = this.elmDomDoc.getElementsByTagName(\"head\")[0],\n k = this.elmDomDoc.createDocumentFragment(),\n e = helperFunctions.initElement(this.elmDomDoc, \"style\", {type: \"text/css\"}),\n f = this.elmDomDoc.createTextNode(reset ? style : settings.ResetStyle + \"\" + style);\n k.appendChild(e);\n d.appendChild(k);\n e.styleSheet ? e.styleSheet.cssText = f.nodeValue : e.appendChild(f)\n }\n\n insertCssRemoteFile(attr) {\n\n var elm = null;\n\n if (attr.id && attr.href && (elm = this.elmDomDoc.getElementById(attr.id)) !== null) {\n elm.href = attr.href\n return;\n }\n\n var d = this.elmDomDoc.getElementsByTagName(\"head\")[0],\n k = this.elmDomDoc.createDocumentFragment(),\n e = this.elmDomDoc.createElement('link');\n\n e.rel = \"stylesheet\";\n e.crossOrigin = \"*\";\n\n for (var b in attr) e[b] = attr[b];\n\n k.appendChild(e);\n d.appendChild(k);\n }\n\n insertJSFile(src, async, loadcb, attr) {\n var d = this.elmDomDoc.getElementsByTagName(\"head\")[0],\n k = this.elmDomDoc.createDocumentFragment(),\n e = this.elmDomDoc.createElement('script');\n\n e.type = 'text/javascript';\n if (typeof async === 'undefined' || async === true) {\n e.async = true;\n }\n\n e.crossOrigin = \"*\";\n e.src = src;\n\n if (loadcb) {\n e.onload = loadcb;\n }\n\n if (attr) {\n Object.keys(attr).forEach(key => {\n e.setAttribute(key,attr[key]);\n })\n }\n\n k.appendChild(e);\n d.appendChild(k);\n }\n\n massRestyle(a) {\n for (var b in a) a.hasOwnProperty(b) && this.restyle(b, a[b])\n }\n};\n\n","\nclass _chatNotifications {\n constructor() {\n this.isNotificationsSubscribed = false;\n this.applicationServerPublicKey = null;\n this.eventEmitter = null;\n }\n\n setPublicKey(publicKey, eventEmitter) {\n this.applicationServerPublicKey = publicKey\n this.eventEmitter = eventEmitter\n }\n\n sendNotification() {\n\n var that = this;\n var applicationServerPublicKey = this.applicationServerPublicKey;\n\n var swRegistration = null;\n\n if (!('serviceWorker' in navigator) || !('PushManager' in window)) {\n alert(\"This browser does not support desktop notification\");\n return;\n }\n\n // Let's check if the browser supports notifications\n if (!(\"Notification\" in window)) {\n alert(\"This browser does not support desktop notification\");\n return;\n }\n // Let's check whether notification permissions have already been granted\n else if (Notification.permission === \"granted\") {\n // If it's okay let's create a notification\n //\n }\n // Otherwise, we need to ask the user for permission\n else if (Notification.permission !== \"denied\") {\n Notification.requestPermission(function (permission) {\n // If the user accepts, let's create a notification\n if (permission !== \"granted\") {\n alert('Sorry but you have denied notification!');\n return;\n }\n });\n } else if (Notification.permission === \"denied\") {\n alert('Sorry but you have denied notification!');\n return;\n }\n\n function urlB64ToUint8Array(base64String) {\n var padding = '='.repeat((4 - base64String.length % 4) % 4);\n var base64 = (base64String + padding)\n .replace(/\\-/g, '+')\n .replace(/_/g, '/');\n\n var rawData = window.atob(base64);\n var outputArray = new Uint8Array(rawData.length);\n\n for (var i = 0; i < rawData.length; ++i) {\n outputArray[i] = rawData.charCodeAt(i);\n }\n return outputArray;\n }\n\n function updateSubscriptionOnServer(subscription, subscribe) {\n if (subscription === null) {\n return;\n }\n\n var key = subscription.getKey('p256dh');\n var token = subscription.getKey('auth');\n var contentEncoding = (PushManager.supportedContentEncodings || ['aesgcm'])[0];\n\n var payload = JSON.stringify({\n endpoint: subscription.endpoint,\n publicKey: key ? btoa(String.fromCharCode.apply(null, new Uint8Array(key))) : null,\n authToken: token ? btoa(String.fromCharCode.apply(null, new Uint8Array(token))) : null,\n contentEncoding : contentEncoding\n });\n\n that.eventEmitter.emitEvent('subcribedEvent', [{'payload' : payload}]);\n }\n\n var that = this;\n\n function subscribeUser() {\n var applicationServerKey = urlB64ToUint8Array(applicationServerPublicKey);\n swRegistration.pushManager.subscribe({\n 'userVisibleOnly': true,\n 'applicationServerKey': applicationServerKey\n }).then(function(subscription) {\n updateSubscriptionOnServer(subscription, true);\n that.isNotificationsSubscribed = true;\n });\n }\n\n function unsubscribeUser() {\n swRegistration.pushManager.getSubscription().then(function(subscription) {\n if (subscription) {\n updateSubscriptionOnServer(subscription,false);\n return subscription.unsubscribe();\n }\n }).then(function() {\n alert('You have unsubscribed!');\n that.isNotificationsSubscribed = false;\n });\n }\n\n function initializeUI() {\n // Set the initial subscription value\n swRegistration.pushManager.getSubscription().then(function(subscription) {\n that.isNotificationsSubscribed = !(subscription === null);\n if (that.isNotificationsSubscribed) {\n subscribeUser();\n } else {\n subscribeUser();\n }\n });\n }\n\n // At last, if the user has denied notifications, and you\n // want to be respectful there is no need to bother them any more.\n navigator.serviceWorker.register('/sw.lhc.js?v=2').then(function(swReg) {\n swRegistration = swReg;\n initializeUI();\n });\n\n }\n\n};\n\nconst chatNotifications = new _chatNotifications();\nexport { chatNotifications };","\nclass _helperFunctions {\n constructor() {\n }\n\n initElement(a, c, b, k, s) {\n var e;\n a = a.createElement(c);\n b = b || {};\n for (e in b) a[e] = b[e];\n s && \"iframe\" !== c && (a.innerHTML = s);\n k && (a.style.cssText = k);\n return a\n };\n \n getDocument(a) {\n return a.contentWindow ? a.contentWindow.document : a.contentDocument ? a.contentDocument : a.document ? a.document : null\n };\n\n removeById(EId)\n {\n var EObj = null;\n return(EObj = document.getElementById(EId)) ? EObj.parentNode.removeChild(EObj) : false;\n }\n\n // Returns time zone offset\n getTzOffset() {\n try {\n return Intl.DateTimeFormat().resolvedOptions().timeZone;\n } catch (e) {\n Date.prototype.stdTimezoneOffset = function() {\n var jan = new Date(this.getFullYear(), 0, 1);\n var jul = new Date(this.getFullYear(), 6, 1);\n return Math.max(jan.getTimezoneOffset(), jul.getTimezoneOffset());\n };\n\n Date.prototype.dst = function() {\n return this.getTimezoneOffset() < this.stdTimezoneOffset();\n };\n\n var today = new Date();\n var timeZoneOffset = 0;\n\n if (today.dst()) {\n timeZoneOffset = today.getTimezoneOffset();\n } else {\n timeZoneOffset = today.getTimezoneOffset()-60;\n };\n\n return (timeZoneOffset/60)*-1;\n }\n };\n\n getAbstractStyle(params) {\n return [\n \"outline: \" + (params.outline ? params.outline : \"none\") + \" !important; \",\n \"visibility: \" + (params.visibility ? params.visibility : \"visible\") + \" !important; \",\n \"resize: \" + (params.resize ? params.resize : \"none\") + \" !important; \",\n \"box-shadow: \" + (params.boxshadow ? params.boxshadow : \"none\") + \" ; \",\n \"overflow: \" + (params.overflow ? params.overflow : \"visible\") + \" ; \",\n \"background : \" + (params.background ? params.background : \"none\") + \" !important; \",\n \"opacity : \" + (params.opacity ? params.opacity : \"1\") + \" !important; \",\n \"filter : alpha(opacity=\" + (params.opacity ? 100 * params.opacity : \"100\") + \") !important; \",\n \"-ms-filter : progid:DXImageTransform.Microsoft.Alpha(Opacity\" + (params.opacity ? params.opacity : \"1\") + \") !important; \",\n \"-moz-opacity : \" + (params.opacity ? params.opacity : \"1\") + \" !important; \",\n \"-khtml-opacity : \" + (params.opacity ? params.opacity : \"1\") + \" !important; \",\n \"top : \" + (params.top ? params.top : \"auto\") + \"; \",\n \"right : \" + (params.right ? params.right : \"auto\") + \"; \",\n \"bottom : \" + (params.bottom ? params.bottom : \"auto\") + \"; \",\n \"left : \" + (params.left ? params.left : \"auto\") + \"; \",\n \"position : \" + (params.position ? params.position : \"absolute\") + \" !important; \",\n \"border : \" + (params.border ? params.border : \"0\") + \" !important; \",\n \"min-height : \" + (params.minheight ? params.minheight : \"auto\") + \"; \",\n \"min-width : \" + (params.minwidth ? params.minwidth : \"auto\") + \"; \",\n \"max-height : \" + (params.maxheight ? params.maxheight : \"none\") + \"; \",\n \"max-width : \" + (params.maxwidth ? params.maxwidth : \"none\") + \"; \",\n \"padding : \" + (params.padding ? params.padding : \"0\") + \" !important; \",\n \"margin : \" + (params.margin ? params.margin : \"0\") + \" !important; \",\n \"-moz-transition-property : \" + (params.transition ? params.transition : \"none\") + \" !important; \",\n \"-webkit-transition-property : \" + (params.transition ? params.transition : \"none\") + \" !important; \",\n \"-o-transition-property : \" + (params.transition ? params.transition : \"none\") + \" !important; \",\n \"transition-property : \" + (params.transition ? params.transition : \"none\") + \" !important; \",\n \"transform : \" + (params.transform ? params.transform : \"none\") + \" !important; \",\n \"-webkit-transform : \" + (params.transform ? params.transform : \"none\") + \" !important; \",\n \"-ms-transform : \" + (params.transform ? params.transform : \"none\") + \" !important; \",\n \"width : \" + (params.width ? params.width : \"auto\") + \" ; \",\n \"height : \" + (params.height ? params.height : \"auto\") + \" ; \",\n \"display : \" + (params.display ? params.display : \"block\") + \" !important; \",\n \"z-index : \" + (params.zindex ? params.zindex : \"none\") + \" ; \",\n \"background-color : \" + (params.backgroundcolor ? params.backgroundcolor : \"transparent\") + \" !important; \",\n \"cursor : \" + (params.cursor ? params.cursor : \"auto\") + \" !important; \",\n \"float : \" + (params[\"float\"] ? params[\"float\"] : \"none\") + \" !important; \",\n \"border-radius : \" + (params.borderRadius ? params.borderRadius : \"unset\") + \"; \"].join(\"\").replace(/\\s/gm, \"\")\n };\n\n hasClass(element, className) {\n if (element === null) return;\n return element.classList ? element.classList.contains(className) : !!element.className.match(RegExp(\"(\\\\s|^)\" + className + \"(\\\\s|$)\"))\n }\n\n addClass(element, className) {\n if (element === null) return;\n element.classList ? element.classList.add(className) : this.hasClass(element, className) || (element.className += \" \" + className)\n }\n\n removeClass(element, className) {\n if (element === null) return;\n element.classList ? element.classList.remove(className) : this.hasClass(element, className) && (element.className = element.className.replace(RegExp(\"(\\\\s|^)\" + className + \"(\\\\s|$)\"), \" \"))\n }\n\n makeScreenshot(screenshot,url) {\n var inst = this;\n if (typeof html2canvas == \"undefined\") {\n var th = document.getElementsByTagName('head')[0];\n var s = document.createElement('script');\n s.setAttribute('type','text/javascript');\n s.setAttribute('src',screenshot);\n th.appendChild(s);\n\n s.onreadystatechange = s.onload = () => {\n this.makeScreenshot(screenshot, url);\n };\n } else {\n try {\n html2canvas(document.body).then(function(canvas) {\n var xhr = new XMLHttpRequest();\n xhr.open( \"POST\", url, true);\n xhr.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n xhr.send( \"data=\" + encodeURIComponent( canvas.toDataURL() ) );\n });\n } catch(err) {\n console.log(err);\n }\n }\n }\n\n makeQuery(params)\n {\n var item, pairs = [];\n for (item in params) {\n if (params[item] != '' && params[item] != null) {\n params.hasOwnProperty(item) && pairs.push(encodeURIComponent(item) + \"=\" + encodeURIComponent(params[item]));\n }\n }\n return pairs.join(\"&\")\n }\n \n makeRequest(url, params, callback) {\n var request = new XMLHttpRequest;\n var urlRequest = url + '?' + this.makeQuery(params.params);\n request.open(\"GET\",urlRequest, true);\n request.onreadystatechange = function () {\n if (4 == request.readyState && request.status != 0) {\n try {\n callback(JSON.parse(request.responseText));\n } catch (e) {\n e.message += \"\\n\" + urlRequest + \"\\n\" + \"[\"+request.status+\"]\\n\" + request.responseText;\n throw e;\n }\n }\n };\n request.send();\n return {type: \"xhr\", req: request}\n }\n\n insertCssRemoteFile(attr) {\n\n var elm = null;\n\n if (attr.id && attr.href && (elm = document.getElementById(attr.id)) !== null) {\n elm.href = attr.href\n return;\n }\n\n var d = document.getElementsByTagName(\"head\")[0],\n k = document.createDocumentFragment(),\n e = document.createElement('link');\n\n e.rel = \"stylesheet\";\n e.crossOrigin = \"*\";\n\n for (var b in attr) e[b] = attr[b];\n\n k.appendChild(e);\n d.appendChild(k);\n }\n};\n\nconst helperFunctions = new _helperFunctions();\nexport { helperFunctions };","var settings = {};\n\nsettings.ResetStyle = \"html,body,div,span,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,abbr,address,cite,code,del,dfn,em,img,ins,kbd,q,samp,small,strong,sub,sup,var,b,i,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}nav ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}a{margin:0;padding:0;font-size:100%;vertical-align:baseline;background:transparent}ins{background-color:#ff9;color:#000;text-decoration:none}mark{background-color:#ff9;color:#000;font-style:italic;font-weight:bold}del{text-decoration:line-through}abbr[title],dfn[title]{border-bottom:1px dotted;cursor:help}table{border-collapse:collapse;border-spacing:0}hr{display:block;height:1px;border:0;border-top:1px solid #ccc;margin:1em 0;padding:0}input,select{vertical-align:middle}html,body{height: 100% !important;\\n\" +\n \" min-height: 100% !important;\\n\" +\n \" max-height: 100% !important;\\n\" +\n \" width: 100% !important;\\n\" +\n \" min-width: 100% !important;\\n\" +\n \" max-width: 100% !important;}body{display: flex;flex-direction: column;background:transparent;font:13px Helvetica,Arial,sans-serif;position:relative}.clear{clear:both}.clearfix:after{content:'';display:block;height:0;clear:both;visibility:hidden}\";\n\nexport {settings};","import {UIConsturctor} from '../UIConsturctor';\n\nexport class containerChat{\n constructor(prefix, pnode) {\n this.cont = new UIConsturctor((prefix || 'lhc')+'_container_v2', \"border: 0 none !important; padding: 0 !important; margin: 0 !important; z-index: 999999999 !important; overflow : visible !important; min-width: 0 !important; min-height: 0 !important; max-width: none !important; max-height: none !important; width : auto !important; height : auto !important;\");\n this.cont.constructUI();\n (!!pnode && document.getElementById(pnode).appendChild(this.cont.elmDom)) || document.body.appendChild(this.cont.elmDom);\n }\n}","import {UIConstructorIframe} from '../UIConstructorIframe';\nimport {helperFunctions} from '../helperFunctions';\n\nexport class mainWidget{\n constructor(prefix) {\n\n this.attributes = {};\n\n this.width = '350';\n this.height = '520';\n this.bottom = '30';\n this.right = '30';\n this.units = 'px';\n this.originalCSS = '';\n this.bottom_override = false;\n\n this.cont = new UIConstructorIframe((prefix || 'lhc')+'_widget_v2', helperFunctions.getAbstractStyle({\n zindex: \"2147483640\",\n width: \"95px\",\n height: \"95px\",\n position: \"fixed\",\n display: \"none\",\n maxheight: \"95px\",\n maxwidth: \"95px\",\n minheight: \"95px\",\n minwidth: \"95px\"\n }), null, \"iframe\");\n\n this.isLoaded = false;\n\n this.loadStatus = {main: false, css: false};\n }\n\n resize() {\n\n let restyleStyle = {\n height: this.height + this.units,\n \"min-height\": this.height + this.units,\n \"max-height\": this.height + this.units,\n width: this.width + this.units,\n \"min-width\": this.width + this.units,\n \"max-width\": this.width + this.units,\n bottom: (this.units == 'px' ? this.bottom + \"px\" : '0px')\n };\n\n if ((this.attributes.position_placement == 'middle_right' || this.attributes.position_placement == 'middle_left') && this.bottom_override == true) {\n restyleStyle['bottom'] = \"calc(50% + 20px)\";\n }\n\n if (this.attributes.position_placement == 'middle_left' || this.attributes.position_placement == 'bottom_left' || this.attributes.position_placement == 'full_height_left') {\n restyleStyle['left'] = (this.units == 'px' ? this.right + \"px\" : '0px');\n } else {\n restyleStyle['right'] = (this.units == 'px' ? this.right + \"px\" : '0px');\n }\n\n if ((this.attributes.position_placement == 'full_height_right' || this.attributes.position_placement == 'full_height_left') && !this.bottom_override) {\n restyleStyle['min-height'] = '100%';\n restyleStyle['max-height'] = '100%';\n restyleStyle['height'] = '100%';\n restyleStyle['bottom'] = '0px';\n\n if (this.attributes.position_placement == 'full_height_left') {\n restyleStyle['left'] = '0px';\n } else {\n restyleStyle['right'] = '0px';\n }\n }\n\n if (this.attributes.mode == 'embed') {\n restyleStyle[\"max-width\"] = '100%';\n restyleStyle[\"min-width\"] = '100%';\n restyleStyle[\"width\"] = '100%';\n restyleStyle[\"position\"] = (this.attributes.fscreen ? 'fixed' : 'relative') + '!important';\n restyleStyle[\"bottom\"] = 'auto';\n restyleStyle[\"right\"] = 'auto';\n }\n\n this.cont.massRestyle(restyleStyle);\n }\n\n checkLoadStatus() {\n if (this.loadStatus['main'] == true && this.loadStatus['css'] == true ) {\n this.attributes.wloaded.next(true);\n }\n }\n\n makeContent() {\n this.cont.bodyId = 'chat-widget';\n\n this.cont.tmpl = '
';\n\n if (this.cont.constructUIIframe('', this.attributes.staticJS['dir'], this.attributes.staticJS['cl'], this.attributes.hhtml) === null) {\n this.isLoaded = true;\n return null;\n }\n\n this.cont.elmDom.className = this.attributes.isMobile === true ? 'lhc-mobile lhc-mode-'+this.attributes.mode : 'lhc-desktop lhc-mode-'+this.attributes.mode;\n\n if (this.attributes.cont_ss) {\n this.originalCSS = this.cont.elmDom.style.cssText;\n this.cont.elmDom.style.cssText += this.attributes.cont_ss;\n }\n }\n\n init(attributes, lazyLoad) {\n\n this.attributes = attributes;\n\n if (this.makeContent() === null) {\n return null;\n };\n\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n\n if (chatParams['id'] || !lazyLoad) {\n this.bootstrap();\n }\n \n this.toggleVisibilityWrap = (data) => {\n this.toggleVisibility(data);\n };\n\n attributes.widgetStatus.subscribe(this.toggleVisibilityWrap);\n\n this.monitorDimensionsWrap = (data) => {\n this.monitorDimensions(data);\n };\n\n if (attributes.widgetDimesions.valueInternal['units'] == 'px' && this.attributes.isMobile == false && this.attributes.mode != 'embed' && this.attributes.position_placement != 'full_height_right' && this.attributes.position_placement != 'full_height_left')\n {\n this.screenAttributesUpdate = () => {\n\n if (window.innerHeight < attributes.widgetDimesions.valueInternal['height'] + 60) {\n attributes.widgetDimesions.nextPropertySilent('height_soverride', window.innerHeight - 60);\n } else {\n attributes.widgetDimesions.nextPropertySilent('height_soverride', null);\n }\n\n if (window.innerWidth < attributes.widgetDimesions.valueInternal['width'] + 60) {\n attributes.widgetDimesions.nextPropertySilent('width_soverride', window.innerWidth - 60);\n } else {\n attributes.widgetDimesions.nextPropertySilent('width_soverride', null);\n }\n\n attributes.widgetDimesions.callListeners();\n };\n\n this.screenAttributesUpdate();\n\n window.addEventListener('resize', this.screenAttributesUpdate);\n }\n\n attributes.widgetDimesions.subscribe(this.monitorDimensionsWrap);\n\n attributes.eventEmitter.addListener('reloadWidget',() => {\n this.isLoaded = false;\n this.makeContent();\n attributes.eventEmitter.emitEvent('widgetHeight',[{'reset_height' : true}]);\n this.toggleVisibility(attributes.widgetStatus.valueInternal);\n });\n\n }\n\n bootstrap() {\n\n if (this.isLoaded === true) {\n return ;\n }\n\n this.isLoaded = true;\n\n if (this.attributes.staticJS['fontCSS']) {\n this.cont.insertCssRemoteFile({rel:\"stylesheet\", crossOrigin : \"anonymous\", href : this.attributes.staticJS['fontCSS']});\n }\n\n if (this.attributes.theme) {\n this.cont.insertCssRemoteFile({crossOrigin : \"anonymous\", href : this.attributes.LHC_API.args.lhc_base_url + '/widgetrestapi/theme/' + this.attributes.theme + '?v=' + this.attributes.theme_v}, true);\n }\n\n this.cont.insertCssRemoteFile({onload: () => {\n this.loadStatus['css'] = true;\n this.checkLoadStatus();\n },crossOrigin : \"anonymous\", href : this.attributes.staticJS['widget_css']}, true);\n\n if (this.attributes.isMobile == true && this.attributes.mode == 'widget') {\n this.cont.insertCssRemoteFile({crossOrigin : \"anonymous\", href : this.attributes.staticJS['widget_mobile_css']});\n }\n\n if (this.attributes.mode == 'embed') {\n this.cont.insertCssRemoteFile({crossOrigin : \"anonymous\", href : this.attributes.staticJS['embed_css'] });\n\n if (this.attributes.staticJS['page_css']) {\n helperFunctions.insertCssRemoteFile({crossOrigin : \"anonymous\", id: \"lhc-theme-page\", href : this.attributes.LHC_API.args.lhc_base_url + '/widgetrestapi/themepage/' + this.attributes.theme + '?v=' + this.attributes.theme_v});\n }\n }\n\n this.cont.insertJSFile(this.attributes.staticJS['vendor'], false, () => {\n this.cont.insertJSFile(this.attributes.staticJS['app'], false, () => {\n this.loadStatus['main'] = true;\n this.checkLoadStatus();\n }, {'scope': this.attributes.prefixLowercase});\n }, {'scope': this.attributes.prefixLowercase});\n\n if (this.attributes.staticJS['ex_js'] && this.attributes.staticJS['ex_js'].length > 0) {\n this.attributes.staticJS['ex_js'].forEach((item) => {\n this.cont.insertJSFile(item, false);\n });\n }\n }\n\n toggleVisibility(data) {\n data == false ? this.hide() : this.show();\n }\n\n monitorDimensions(data) {\n this.width = data.width_override || data.width_soverride || data.width;\n this.height = data.height_override || data.height_soverride || data.height;\n this.bottom = data.bottom_override ? (data.bottom_override + (data.wbottom ? data.wbottom : 0)) : (30 + (this.attributes.clinst === true ? 70 : 0) + (data.wbottom ? data.wbottom : 0));\n this.right = data.right_override ? (data.right_override + (data.wright_inv ? data.wright_inv : 0)) : (30 + (data.wright ? data.wright : 0));\n this.units = (data.width_override || data.height_override || data.bottom_override || data.right_override) ? 'px' : data.units;\n\n this.resize();\n\n this.bottom_override = !!data.bottom_override;\n }\n\n hide () {\n this.cont.hide();\n }\n\n hideInvitation() {\n if (this.attributes.cont_ss) {\n this.cont.elmDom.style.cssText += this.attributes.cont_ss;\n }\n }\n\n showInvitation() {\n if (this.attributes.cont_ss) {\n this.cont.elmDom.style.cssText = this.originalCSS;\n }\n this.show();\n }\n\n show () {\n if (this.isLoaded === false) {\n this.bootstrap();\n }\n this.cont.show();\n }\n}","export class mainWidgetPopup {\n constructor() {\n\n this.attributes = {};\n\n this.width = null;\n this.height = null;\n this.units = 'px';\n this.freeup();\n }\n\n freeup() {\n this.cont = {};\n }\n\n parseOptions() {\n var argumentsQuery = new Array();\n var paramsReturn = '';\n if (typeof this.attributes != 'undefined') {\n if (typeof this.attributes.LHCChatOptions.attr != 'undefined') {\n if (this.attributes.LHCChatOptions.attr.length > 0) {\n for (var index in this.attributes.LHCChatOptions.attr) {\n if (typeof this.attributes.LHCChatOptions.attr[index] != 'undefined' && typeof this.attributes.LHCChatOptions.attr[index].type != 'undefined') {\n argumentsQuery.push('name[]=' + encodeURIComponent(this.attributes.LHCChatOptions.attr[index].name) + '&encattr[]=' + (typeof this.attributes.LHCChatOptions.attr[index].encrypted != 'undefined' && this.attributes.LHCChatOptions.attr[index].encrypted == true ? 't' : 'f') + '&value[]=' + encodeURIComponent(this.attributes.LHCChatOptions.attr[index].value) + '&type[]=' + encodeURIComponent(this.attributes.LHCChatOptions.attr[index].type) + '&size[]=' + encodeURIComponent(this.attributes.LHCChatOptions.attr[index].size) + '&req[]=' + (typeof this.attributes.LHCChatOptions.attr[index].req != 'undefined' && this.attributes.LHCChatOptions.attr[index].req == true ? 't' : 'f') + '&sh[]=' + ((typeof this.attributes.LHCChatOptions.attr[index].show != 'undefined' && (this.attributes.LHCChatOptions.attr[index].show == 'on' || this.attributes.LHCChatOptions.attr[index].show == 'off')) ? this.attributes.LHCChatOptions.attr[index].show : 'b'));\n }\n }\n }\n }\n\n if (typeof this.attributes.LHCChatOptions.attr_prefill != 'undefined') {\n if (this.attributes.LHCChatOptions.attr_prefill.length > 0) {\n for (var index in this.attributes.LHCChatOptions.attr_prefill) {\n if (typeof this.attributes.LHCChatOptions.attr_prefill[index] != 'undefined' && typeof this.attributes.LHCChatOptions.attr_prefill[index].name != 'undefined') {\n argumentsQuery.push('prefill[' + this.attributes.LHCChatOptions.attr_prefill[index].name + ']=' + encodeURIComponent(this.attributes.LHCChatOptions.attr_prefill[index].value));\n }\n }\n }\n }\n\n if (typeof this.attributes.LHCChatOptions.attr_prefill_admin != 'undefined') {\n if (this.attributes.LHCChatOptions.attr_prefill_admin.length > 0) {\n for (var index in this.attributes.LHCChatOptions.attr_prefill_admin) {\n if (typeof this.attributes.LHCChatOptions.attr_prefill_admin[index] != 'undefined') {\n argumentsQuery.push('value_items_admin[' + this.attributes.LHCChatOptions.attr_prefill_admin[index].index + ']=' + encodeURIComponent(this.attributes.LHCChatOptions.attr_prefill_admin[index].value));\n }\n }\n }\n }\n\n if (argumentsQuery.length > 0) {\n paramsReturn = '&' + argumentsQuery.join('&');\n }\n }\n\n return paramsReturn;\n }\n\n init(attributes, chatEvents, paramsPopup) {\n\n if (this.cont.elementReferrerPopup && this.cont.elementReferrerPopup.closed === false) {\n typeof paramsPopup !== 'undefined' && paramsPopup.event !== 'undefined' && paramsPopup.event.preventDefault();\n this.cont.elementReferrerPopup.focus();\n } else {\n\n this.attributes = attributes;\n\n let attr = {\n 'static_chat': this.attributes['userSession'].getSessionAttributes()\n };\n\n let urlArgumetns = '';\n\n if (attr['static_chat']['id'] && attr['static_chat']['hash']) {\n urlArgumetns = urlArgumetns + \"/(id)/\" + attr['static_chat']['id'] + \"/(hash)/\" + attr['static_chat']['hash'];\n }\n\n if (this.attributes['theme'] !== null) {\n urlArgumetns = urlArgumetns + \"/(theme)/\" + this.attributes['theme'];\n }\n\n if (attr['static_chat']['vid'] !== null && this.attributes.storageHandler.cookieEnabled === true) {\n urlArgumetns = urlArgumetns + \"/(vid)/\" + attr['static_chat']['vid'];\n }\n\n if (this.attributes['isMobile']) {\n urlArgumetns = urlArgumetns + \"/(mobile)/true\";\n }\n\n if (this.attributes['department'].length > 0) {\n urlArgumetns = urlArgumetns + \"/(department)/\" + this.attributes['department'].join('/');\n }\n\n if (this.attributes['identifier'] != '') {\n urlArgumetns = urlArgumetns + \"/(identifier)/\" + this.attributes['identifier'];\n }\n\n if (this.attributes['operator']) {\n urlArgumetns = urlArgumetns + \"/(operator)/\" + this.attributes['operator'];\n }\n\n if (this.attributes['survey']) {\n urlArgumetns = urlArgumetns + \"/(survey)/\" + this.attributes['survey'];\n }\n\n if (this.attributes['bot_id']) {\n urlArgumetns = urlArgumetns + \"/(bot)/\" + this.attributes['bot_id'];\n }\n\n if (this.attributes['trigger_id']) {\n urlArgumetns = urlArgumetns + \"/(trigger)/\" + this.attributes['trigger_id'];\n }\n\n if (this.attributes['subject_id']) {\n urlArgumetns = urlArgumetns + \"/(subject)/\" + this.attributes['subject_id'];\n }\n\n if (this.attributes['priority']) {\n urlArgumetns = urlArgumetns + \"/(priority)/\" + this.attributes['priority'];\n }\n\n if (this.attributes['prefixLowercase'] != 'lhc') {\n urlArgumetns = urlArgumetns + \"/(scope)/\" + this.attributes['prefixLowercase'];\n }\n\n urlArgumetns = urlArgumetns + \"/(sound)/\" + (this.attributes.toggleSound.value == true ? 1 : 0);\n\n if (this.attributes['proactive']['invitation']) {\n urlArgumetns = urlArgumetns + \"/(inv)/\" + this.attributes['proactive']['invitation'];\n if (this.attributes['mode'] == 'popup') {\n this.attributes.storageHandler.setSessionStorage(this.attributes['prefixStorage']+'_invt', 1);\n }\n }\n\n var fontSize = this.attributes.storageHandler.getLocalStorage(this.attributes['prefixStorage']+'_dfs');\n\n if (fontSize) {\n urlArgumetns = urlArgumetns + \"/(fs)/\" + parseInt(fontSize);\n }\n\n if (this.attributes['leaveMessage'] === true) {\n urlArgumetns = urlArgumetns + \"/(leaveamessage)/true\";\n }\n\n if (this.attributes['userSession'].getSessionReferrer() !== null && this.attributes['userSession'].getSessionReferrer() != '') {\n urlArgumetns = urlArgumetns + '?ses_ref=' + this.attributes['userSession'].getSessionReferrer() + this.parseOptions();\n } else {\n urlArgumetns = urlArgumetns + '?' + this.parseOptions();\n }\n\n const dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : window.screenX;\n const dualScreenTop = window.screenTop !== undefined ? window.screenTop : window.screenY;\n\n const width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width;\n const height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height;\n\n const systemZoom = width / window.screen.availWidth;\n const left = (width - parseInt(this.attributes['popupDimesnions']['pwidth'])) / 2 / systemZoom + dualScreenLeft;\n const top = (height - parseInt(this.attributes['popupDimesnions']['pheight'])) / 2 / systemZoom + dualScreenTop;\n\n var paramsWindow = \"scrollbars=yes,menubar=1,resizable=1,width=\" + this.attributes['popupDimesnions']['pwidth'] + \",height=\" + this.attributes['popupDimesnions']['pheight'] + \",top=\" + top + \",left=\" + left;\n var newWin = window.open(\"\", this.attributes['prefixStorage'] + '_popup_v2', paramsWindow);\n var needWindow = false;\n var windowCreated = false;\n\n // First try to find any existing window\n try {\n // It has to be new window or popup was blocked\n if (!newWin || newWin.closed || typeof newWin.closed=='undefined' || newWin.location.href === \"about:blank\") {\n newWin = this.cont.elementReferrerPopup = window.open(this.attributes['base_url'] + this.attributes['lang'] + \"chat/start\" + urlArgumetns, this.attributes['prefixStorage']+'_popup_v2', paramsWindow);\n windowCreated = true;\n } else {\n needWindow = true;\n }\n } catch (e) { // We get cross-origin error only if window exist and it's location is other one than about:blank\n needWindow = true;\n }\n\n // Now if visitor has blocked popup change chat status link and just allow browser handle the rest.\n if (!newWin || newWin.closed || typeof newWin.closed=='undefined') {\n try {\n this.attributes.viewHandler.cont.getElementById(\"status-icon\").href = this.attributes['base_url'] + this.attributes['lang'] + \"chat/start\" + urlArgumetns;\n } catch (e) {\n alert('You have disabled popups!');\n }\n } else if (windowCreated == true) {\n typeof chatEvents !== 'undefined' && this.attributes.kcw === false && chatEvents.sendChildEvent('endedChat', [{'sender': 'endButton'}]);\n typeof paramsPopup !== 'undefined' && paramsPopup.event !== 'undefined' && paramsPopup.event.preventDefault();\n } else if (needWindow === true) {\n this.cont.elementReferrerPopup = newWin;\n newWin.focus();\n typeof paramsPopup !== 'undefined' && paramsPopup.event !== 'undefined' && paramsPopup.event.preventDefault();\n }\n }\n }\n\n sendParameters(chatEvents) {\n if (this.cont.elementReferrerPopup && this.cont.elementReferrerPopup.closed === false) {\n var js_vars = this.attributes['jsVars'].value;\n var js_args = {};\n var currentVar = null;\n for (var index in js_vars) {\n try {\n currentVar = eval(js_vars[index].var);\n if (typeof currentVar !== 'undefined' && currentVar !== null && currentVar !== '') {\n js_args[js_vars[index].id] = currentVar;\n }\n } catch (err) {\n\n }\n }\n chatEvents.sendChildEvent('jsVars', [js_args]);\n }\n }\n}","import {settings} from '../settings.js';\nimport {UIConstructorIframe} from '../UIConstructorIframe';\nimport {helperFunctions} from '../helperFunctions';\n\nexport class statusWidget{\n constructor(prefix) {\n\n this.attributes = {};\n this.controlMode = false;\n this.showDelay = null;\n this.statusDelayProcessed = false;\n\n this.cont = new UIConstructorIframe((prefix || 'lhc')+'_status_widget_v2', helperFunctions.getAbstractStyle({\n zindex: \"2147483640\",\n width: \"95px\",\n height: \"95px\",\n position: \"fixed\",\n display: \"none\",\n maxheight: \"95px\",\n maxwidth: \"95px\",\n minheight: \"95px\",\n minwidth: \"95px\"\n }), null, \"iframe\");\n\n this.loadStatus = {main : false, theme: false, font: true, widget : false, shidden: false};\n this.lload = false;\n this.unread_counter = 0;\n }\n\n toggleOfflineIcon(onlineStatus) {\n var icon = this.cont.getElementById(\"status-icon\");\n\n if (onlineStatus) {\n if (!this.attributes.leaveMessage) {\n this.show();\n }\n helperFunctions.removeClass(icon, \"offline-status\");\n } else {\n if (!this.attributes.leaveMessage) {\n this.hide();\n } else {\n helperFunctions.addClass(icon, \"offline-status\");\n }\n }\n }\n\n checkLoadStatus() {\n if (this.loadStatus['theme'] == true && this.loadStatus['main'] == true && this.loadStatus['font'] == true && this.loadStatus['widget'] == true && this.loadStatus['shidden'] == false) {\n this.cont.getElementById('lhc_status_container').style.display = \"\";\n this.attributes.sload.next(true);\n }\n }\n\n init(attributes, lload) {\n\n this.attributes = attributes;\n\n var placement = {bottom: (10+this.attributes.widgetDimesions.value.sbottom) + \"px\", right: (10+this.attributes.widgetDimesions.value.sright) + \"px\"};\n\n if (attributes.position_placement == 'bottom_left' || attributes.position_placement == 'full_height_left') {\n placement = { bottom: (10+this.attributes.widgetDimesions.value.sbottom) + \"px\", left: (10+this.attributes.widgetDimesions.value.sright) + \"px\"};\n } else if (attributes.position_placement == 'middle_right') {\n placement = {bottom: \"calc(50% - 45px)\",right: (10+this.attributes.widgetDimesions.value.sright) + \"px\"};\n } else if (attributes.position_placement == 'middle_left') {\n placement = {bottom: \"calc(50% - 45px)\",left: (10+this.attributes.widgetDimesions.value.sright) + \"px\"};\n }\n\n this.cont.massRestyle(placement);\n\n this.cont.tmpl = '
!
';\n\n if (this.cont.constructUIIframe('') === null) {\n return null;\n }\n\n this.cont.elmDom.className = this.attributes.isMobile === true ? 'lhc-mobile' : 'lhc-desktop';\n\n var _inst = this;\n\n this.lload = !(!lload);\n\n // If it's lazy load we have always to consider widget as loaded\n if (this.lload === true) {\n this.loadStatus['widget'] = true;\n } else {\n // We wait untill widget content loads\n attributes.wloaded.subscribe((data) => { if (data){this.loadStatus['widget'] = true; this.checkLoadStatus()}});\n }\n\n attributes.shidden.subscribe((data) => {\n if (data) {\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n if (!chatParams['id'] && this.attributes.widgetStatus.value != true) {\n this.loadStatus['shidden'] = true;\n this.hide();\n }\n } else {\n this.loadStatus['shidden'] = false;\n this.checkLoadStatus();\n this.show();\n }\n });\n\n this.cont.attachUserEventListener(\"click\", function (e) {\n\n attributes.onlineStatus.value === false && attributes.eventEmitter.emitEvent('offlineClickAction');\n\n if (attributes.onlineStatus.value === false && attributes.offline_redirect !== null){\n document.location = attributes.offline_redirect;\n e.preventDefault();\n } else {\n if (_inst.controlMode == true) {\n attributes.eventEmitter.emitEvent('closeWidget', [{'sender' : 'closeButton', 'mode' : 'control'}]);\n e.preventDefault();\n } else {\n attributes.eventEmitter.emitEvent('showWidget', [{'event':e}]);\n attributes.eventEmitter.emitEvent('clickAction');\n }\n }\n\n }, \"lhc_status_container\", \"minifiedclick\");\n\n if (this.attributes.staticJS['fontCSS']) {\n this.cont.insertCssRemoteFile({crossOrigin : \"anonymous\", href : this.attributes.staticJS['fontCSS']});\n }\n\n if (this.attributes.staticJS['font_status']) {\n this.cont.insertCssRemoteFile({onload: () => {this.loadStatus['font'] = true; this.checkLoadStatus()},\"as\":\"font\", rel:\"preload\", type: \"font/woff\", crossOrigin : \"anonymous\", href : this.attributes.staticJS['font_status']});\n }\n\n if (this.attributes.theme) {\n this.loadStatus['theme'] = false;\n this.cont.insertCssRemoteFile({onload: ()=>{this.loadStatus['theme'] = true; this.checkLoadStatus()}, id: \"lhc-theme-status\", crossOrigin : \"anonymous\", href : this.attributes.LHC_API.args.lhc_base_url + '/widgetrestapi/themestatus/' + this.attributes.theme + '?v=' + this.attributes.theme_v}, true);\n } else {\n this.loadStatus['theme'] = true;\n }\n\n this.cont.insertCssRemoteFile({onload: ()=>{this.loadStatus['main'] = true; this.checkLoadStatus()}, crossOrigin : \"anonymous\", href : this.attributes.staticJS['status_css'] });\n\n if (this.attributes.staticJS['page_css']) {\n helperFunctions.insertCssRemoteFile({crossOrigin : \"anonymous\", id: \"lhc-theme-page\", href : this.attributes.LHC_API.args.lhc_base_url + '/widgetrestapi/themepage/' + this.attributes.theme + '?v=' + this.attributes.theme_v});\n }\n\n attributes.onlineStatus.subscribe((data) => this.toggleOfflineIcon(data));\n\n attributes.widgetStatus.subscribe((data) => {\n if (this.attributes.mode !== 'popup') {\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n (data == true || (!this.attributes.leaveMessage && this.attributes.onlineStatus.value == false && !chatParams['id'])) ? this.hide() : this.show();\n }\n });\n\n this.attributes.mode === 'popup' && this.show();\n let unreadMessagesNumber = attributes.storageHandler.getSessionStorage(this.attributes['prefixStorage']+'_unr');\n\n attributes.eventEmitter.addListener('unread_message', (data) => {\n var unreadTotal = (data && data.otm);\n if (unreadTotal) {\n unreadTotal = parseInt(unreadTotal);\n unreadTotal += this.unread_counter;\n }\n this.attributes.unread_counter.next(unreadTotal);\n this.showUnreadIndicator(unreadTotal);\n });\n\n if (unreadMessagesNumber !== null) {\n attributes.eventEmitter.emitEvent('unread_message',[{otm:unreadMessagesNumber, init: true}]);\n if (unreadMessagesNumber !== null && !isNaN(unreadMessagesNumber)) {\n this.unread_counter = parseInt(unreadMessagesNumber);\n }\n }\n\n // Widget reload was called\n // We avoid cache by using timestamp because we do not call init call.\n // We also always insert themepage even if there is no css in it.\n attributes.eventEmitter.addListener('reloadWidget',() => {\n if (this.attributes.theme > 0) {\n this.cont.insertCssRemoteFile({crossOrigin : \"anonymous\", id: \"lhc-theme-status\", href : this.attributes.LHC_API.args.lhc_base_url + '/widgetrestapi/themestatus/' + this.attributes.theme + '?v=' + Date.now()}, true);\n }\n helperFunctions.insertCssRemoteFile({crossOrigin : \"anonymous\", id: \"lhc-theme-page\", href : this.attributes.LHC_API.args.lhc_base_url + '/widgetrestapi/themepage/' + this.attributes.theme + '?v=' + Date.now()});\n });\n }\n\n hide () {\n\n this.removeUnreadIndicator();\n\n if (this.attributes.clinst === true && this.attributes.isMobile == false) {\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n if (this.attributes.leaveMessage == true || this.attributes.onlineStatus.value == true || chatParams['id']) {\n\n if (this.attributes['position'] != 'api' || (this.attributes['position'] == 'api' && this.attributes['hide_status'] !== true && ((chatParams['id'] && chatParams['hash']) || this.attributes.widgetStatus.value == true))) {\n if (this.attributes['hide_status'] !== true || (chatParams['id'] && chatParams['hash'])) {\n this.cont.show();\n }\n }\n\n if (this.attributes['hide_status'] !== true || (chatParams['id'] && chatParams['hash']) || this.attributes.widgetStatus.value == true) {\n if (this.attributes.widgetStatus.value == true){\n this.controlMode = true;\n var icon = this.cont.getElementById(\"status-icon\");\n helperFunctions.addClass(icon, \"close-status\");\n }\n return ;\n }\n\n }\n }\n\n clearTimeout(this.showDelay);\n this.statusDelayProcessed = true;\n this.cont.hide();\n }\n\n showUnreadIndicator(number){\n var iconText = number || '!';\n var icon = this.cont.getElementById(\"lhc_status_container\");\n helperFunctions.addClass(icon, \"has-uread-message\");\n\n var iconValue = this.cont.getElementById(\"unread-msg-number\");\n if (iconValue) {\n iconValue.innerText = iconText;\n }\n\n if (this.attributes.storageHandler)\n this.attributes.storageHandler.setSessionStorage(this.attributes['prefixStorage']+'_unr',iconText);\n }\n\n removeUnreadIndicator() {\n var icon = this.cont.getElementById(\"lhc_status_container\");\n helperFunctions.removeClass(icon, \"has-uread-message\");\n if (this.attributes.storageHandler) {\n this.attributes.storageHandler.removeSessionStorage(this.attributes['prefixStorage']+'_unr');\n }\n this.attributes.eventEmitter.emitEvent('remove_unread_indicator', []);\n this.attributes.unread_counter.next(0);\n this.unread_counter = 0;\n }\n\n show () {\n\n if (this.attributes.hideOffline === false) {\n\n const chatParams = this.attributes['userSession'].getSessionAttributes();\n\n if (this.attributes.clinst === true && this.attributes.isMobile == false) {\n if (this.attributes.widgetStatus.value != true) {\n var icon = this.cont.getElementById(\"status-icon\");\n helperFunctions.removeClass(icon, \"close-status\");\n\n this.controlMode = false;\n }\n }\n\n // show status icon only if we are not in api mode or chat is going now\n if (this.attributes['position'] != 'api' || (this.attributes['position'] == 'api' && this.attributes['hide_status'] !== true && chatParams['id'] && chatParams['hash'])) {\n\n clearTimeout(this.showDelay);\n \n const chatParams = this.attributes['userSession'].getSessionAttributes();\n\n this.showDelay = setTimeout(() => {\n this.cont.show();\n this.statusDelayProcessed = true;\n }, (this.statusDelayProcessed == true || (chatParams['id'] && chatParams['hash'])) ? 0 : this.attributes['status_delay']);\n\n } else if (this.attributes.clinst === true) {\n if (this.attributes.widgetStatus.value != true) {\n this.cont.hide();\n }\n }\n\n } else {\n this.cont.hide();\n }\n }\n}","\nclass chatEventsHandler {\n\n constructor(attr) {\n this.attributes = attr\n }\n\n getJSVarsValues(jsVars) {\n var js_args = {};\n\n if (jsVars.length > 0) {\n\n var currentVar = null;\n\n for (var index in jsVars) {\n try {\n currentVar = eval('window.'+jsVars[index].var);\n if (typeof currentVar !== 'undefined' && currentVar !== null && currentVar !== '') {\n js_args[jsVars[index].id] = currentVar;\n }\n } catch(err) {\n }\n }\n return js_args;\n }\n\n return js_args;\n }\n\n getInitAttributes() {\n let attr = {\n 'onlineStatus' : this.attributes['onlineStatus'].value,\n 'toggleSound' : this.attributes['toggleSound'].value,\n 'widgetStatus' : this.attributes['widgetStatus'].value,\n 'jsVars' : this.getJSVarsValues(this.attributes['jsVars'].value),\n 'isMobile' : this.attributes['isMobile'],\n 'department' : this.attributes['department'],\n 'product' : this.attributes['product'],\n 'theme' : this.attributes['theme'],\n 'theme_v' : this.attributes['theme_v'],\n 'base_url' : this.attributes['base_url'],\n 'mode' : this.attributes['mode'],\n 'captcha' : this.attributes['captcha'],\n 'staticJS' : this.attributes['staticJS'],\n 'static_chat' : this.attributes['userSession'].getSessionAttributes(),\n 'domain_lhc': this.attributes['domain_lhc'],\n 'leave_message': this.attributes['leaveMessage'],\n 'scope_prefix': this.attributes['prefixLowercase']\n };\n\n if (this.attributes['fresh'] == true) {\n if (attr['static_chat']['id']) {\n delete attr['static_chat']['id'];\n }\n\n if (attr['static_chat']['hash']) {\n delete attr['static_chat']['hash'];\n }\n }\n\n if (this.attributes['bot_id'] != '') {\n attr['bot_id'] = this.attributes['bot_id'];\n }\n\n if (this.attributes['trigger_id'] != '') {\n attr['trigger_id'] = this.attributes['trigger_id'];\n }\n \n if (this.attributes['subject_id'] != '') {\n attr['subject_id'] = this.attributes['subject_id'];\n }\n\n if (this.attributes['priority'] != '') {\n attr['priority'] = this.attributes['priority'];\n }\n \n if (this.attributes['phash'] !== null) {\n attr['phash'] = this.attributes['phash'];\n }\n\n if (this.attributes['survey'] !== null) {\n attr['survey'] = this.attributes['survey'];\n }\n\n if (this.attributes['pvhash'] !== null) {\n attr['pvhash'] = this.attributes['pvhash'];\n }\n\n if (this.attributes['operator'] !== null) {\n attr['operator'] = this.attributes['operator'];\n }\n\n if (this.attributes['profile_pic'] !== null) {\n attr['profile_pic'] = this.attributes['profile_pic'];\n }\n\n if (this.attributes['lang'] != '') {\n attr['lang'] = this.attributes['lang'];\n }\n\n if (this.attributes['proactive']['invitation']) {\n attr['proactive'] = this.attributes['proactive'];\n }\n\n if (this.attributes['dep_default'] !== null) {\n attr['dep_default'] = this.attributes['dep_default'];\n }\n\n if (this.attributes.LHCChatOptions && this.attributes.LHCChatOptions.attr) {\n var prefillOptions = this.attributes.LHCChatOptions.attr;\n let fieldsCustom = [];\n prefillOptions.forEach((item, index) => {\n fieldsCustom.push({show : (((typeof item.show != 'undefined' && (item.show == 'on' || item.show == 'off')) ? item.show : 'b')), value : item.value, index : index, name : item.name, \"class\": \"form-control form-control-sm\", 'type' : item.type, 'identifier': ('additional_' + index), 'placeholder' : '', 'width' : (item.size || 6), 'encrypted': (item.encrypted || false), 'required' : (item.req || false), 'label' : item.name});\n });\n\n attr['CUSTOM_FIELDS'] = fieldsCustom;\n }\n\n if (this.attributes.LHCChatOptions && this.attributes.LHCChatOptions.attr_prefill) {\n var prefillOptions = this.attributes.LHCChatOptions.attr_prefill;\n let prefilOptionsList = [];\n prefillOptions.forEach((item) => {\n if (item.name == 'email') {\n prefilOptionsList.push({'Email' : item.value});\n } else if (item.name == 'username') {\n prefilOptionsList.push({'Username' : item.value});\n } else if (item.name == 'phone') {\n prefilOptionsList.push({'Phone' : item.value});\n } else if (item.name == 'question') {\n prefilOptionsList.push({'Question' : item.value});\n }\n })\n prefilOptionsList = prefilOptionsList.concat(this.attributes['userSession'].getPrefillVars());\n attr['attr_prefill'] = prefilOptionsList;\n } else {\n attr['attr_prefill'] = this.attributes['userSession'].getPrefillVars();\n }\n\n if (this.attributes.LHCChatOptions && this.attributes.LHCChatOptions.attr_prefill_admin) {\n var prefillOptions = this.attributes.LHCChatOptions.attr_prefill_admin;\n let prefilOptionsList = [];\n prefillOptions.forEach((item) => {\n prefilOptionsList.push({'value' : item.value, 'index' : item.index});\n })\n attr['attr_prefill_admin'] = prefilOptionsList;\n }\n\n if (this.attributes['userSession'].getSessionReferrer() !== null) {\n attr['ses_ref'] = this.attributes['userSession'].getSessionReferrer()\n }\n\n return attr;\n }\n\n sendChildCommand(command) {\n if (this.attributes.mainWidget.cont.elmDom && this.attributes.mainWidget.cont.elmDom.contentWindow)\n {\n this.attributes.mainWidget.cont.elmDom.contentWindow.postMessage(command, (this.attributes.isIE ? '*' : '/'));\n }\n\n if (this.attributes.popupWidget.cont.elementReferrerPopup && this.attributes.popupWidget.cont.elementReferrerPopup.closed === false)\n {\n this.attributes.popupWidget.cont.elementReferrerPopup.postMessage(command, '*');\n }\n }\n\n sendReadyEvent (popup) {\n\n let args = this.getInitAttributes();\n\n if (!(popup === true) && this.attributes.mainWidget.cont.elmDom && this.attributes.mainWidget.cont.elmDom.contentWindow)\n {\n this.attributes.mainWidget.cont.elmDom.contentWindow.postMessage('lhc_init:' + JSON.stringify(args), (this.attributes.isIE ? '*' : '/'));\n }\n }\n\n sendChildEvent(event, args, type) {\n if (typeof type === 'undefined') {\n type = 'lhc_event';\n }\n this.sendChildCommand(type+':'+event + '::' + JSON.stringify(args));\n }\n}\n\nexport { chatEventsHandler };","\nclass _domEventsHandler {\n constructor() {\n this.events = {}\n }\n\n attachEvent (object, event, callback) {\n var k = this, dispatch = function (b) {\n callback.call(object, k.getEvent(b))\n };\n object.attachEvent(\"on\" + event, dispatch);\n return dispatch\n };\n\n unlisten(eventName) {\n var presentEvent;\n this.events[eventName] && (presentEvent = this.events[eventName], this.events[eventName] = null, this.removeEventHandler(presentEvent.element, presentEvent.eventName, presentEvent.eventListener));\n }\n\n listen(object, event, callback, eventName) {\n var presentEvent;\n if (eventName) {\n this.events[eventName] && (presentEvent = this.events[eventName], this.events[eventName] = null, this.removeEventHandler(presentEvent.element, presentEvent.eventName, presentEvent.eventListener));\n\n if (object.addEventListener) {\n object.addEventListener(event, callback, !1);\n } else if (document.attachEvent) {\n callback = this.attachEvent(object, event, callback);\n } else {\n return null;\n }\n\n this.events[eventName] = {element: object, eventName: event, eventListener: callback};\n\n return callback\n }\n };\n\n removeEventHandler(object, event, listener) {\n document.removeEventListener ? object.removeEventListener(event, listener, !1) : object.detachEvent(\"on\" + event, listener)\n };\n\n getEvent(event) {\n var eventInstance = event || _this.event;\n if (!eventInstance) {\n for (event = this.getEvent.caller; event && (!(eventInstance = event.arguments[0]) || Event != eventInstance.constructor);) {\n event = event.caller\n };\n }\n return eventInstance\n };\n}\n\nconst domEventsHandler = new _domEventsHandler();\nexport { domEventsHandler };","\nexport class monitoredVariable {\n constructor(value, params) {\n this.valueInternal = value;\n this.listeners = [];\n this.params = params || {};\n }\n\n get value() {\n return this.valueInternal;\n }\n\n set value(val) {\n this.next(val);\n }\n\n next(val) {\n this.valueInternal = val;\n this.callListeners();\n }\n\n nextPropertySilent(key, val) {\n this.valueInternal[key] = val;\n }\n\n nextProperty(key, val) {\n this.valueInternal[key] = val;\n this.callListeners();\n }\n\n callListeners() {\n this.listeners.forEach((item) => {\n if (item && typeof item === \"function\") {\n item(this.valueInternal);\n }\n });\n }\n\n unsubscribe(callback) {\n if (this.listeners.indexOf(callback) !== -1) {\n this.listeners.splice(this.listeners.indexOf(callback), 1);\n }\n }\n\n subscribe(callback) {\n this.listeners.push(callback);\n \n if (!this.params['ignore_sub']) {\n callback(this.valueInternal);\n }\n }\n}\n\n","\nexport class storageHandler {\n constructor(global, domain, prefix, cookieEnabled) {\n this.window = global;\n this.cookieEnabled = false;\n\n // Have we checked cookies support\n this.cookiesSupportChecked = false;\n\n // We should try to enable cookie\n if (cookieEnabled == true) {\n this.checkCookiesSupport();\n }\n\n this.domain = domain;\n this.secureCookie = false;\n this.cookiePerPage = false;\n this.prefix = prefix || 'lhc';\n }\n\n checkCookiesSupport() {\n\n if (this.cookiesSupportChecked === true) {\n return this.cookieEnabled;\n }\n\n this.cookiesSupportChecked = true;\n\n try {\n this.hasSessionStorage = !!this.window.sessionStorage;\n } catch (e){\n this.hasSessionStorage = false;\n }\n\n try {\n this.hasLocalStorage = !!this.window.localStorage;\n } catch (e){\n this.hasLocalStorage = false;\n }\n\n try {\n // Create cookie\n document.cookie = 'cookietest=1';\n this.cookieEnabled = document.cookie.indexOf('cookietest=') !== -1;\n // Delete cookie\n document.cookie = 'cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT';\n } catch (e) {\n\n }\n\n return this.cookieEnabled;\n }\n\n setCookieDomain(domain) {\n this.domain = domain;\n }\n\n setCookiePerPage(cookiePerPage) {\n this.cookiePerPage = cookiePerPage;\n }\n\n getCookieDomain() {\n if (this.domain) {\n return '.' + this.domain;\n } else {\n return null;\n }\n }\n\n setSecureCookie(status) {\n this.secureCookie = status;\n }\n\n setHTTPCookie(coookieName, cookieValue, expireTime, domain) {\n if (this.cookieEnabled === false) return ;\n var string = \"\";\n expireTime || (expireTime = new Date, expireTime.setTime(expireTime.getTime() + 15552E6), string = \"; expires=\" + expireTime.toGMTString());\n document.cookie = coookieName + \"=\" + cookieValue + string + (this.cookiePerPage === false ? \"; path=/\" : (this.cookiePerPage === true ? \"\" : '; path=' + this.cookiePerPage)) + (this.secureCookie ? \";secure\" : \"\") + (domain ? \";domain=\" + domain : \"\") + \";SameSite=Lax\";\n };\n\n getHTTPCookie(cookieName) {\n if (this.cookieEnabled === false) return [];\n var b, d, k = [], baseCookie = cookieName + \"=\", e = document.cookie.split(\";\");\n cookieName = 0;\n for (b = e.length; cookieName < b; cookieName++) {\n for (d = e[cookieName]; \" \" === d.charAt(0);) d = d.substring(1, d.length);\n 0 === d.indexOf(baseCookie) && k.push(d.substring(baseCookie.length, d.length))\n }\n\n // Reset duplicate cookies\n if (k.length == 2) {\n let host = (window.location.hostname || document.location.host),\n reset = baseCookie + \"0;expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/\";\n if (host) {\n document.cookie = reset;\n document.cookie = reset + \"; domain=.\" + host;\n }\n }\n\n return k;\n };\n\n setSessionStorage(key, value) {\n if (this.hasSessionStorage && sessionStorage.setItem) try {\n sessionStorage.setItem(key, value)\n } catch (d) {\n }\n }\n\n removeSessionStorage(key) {\n if (this.hasSessionStorage && sessionStorage.removeItem) try {\n sessionStorage.removeItem(key)\n } catch (d) {\n }\n }\n\n getSessionStorage(a) {\n return this.hasSessionStorage && sessionStorage.getItem ?\n sessionStorage.getItem(a) : null\n }\n\n setLocalStorage(key, value) {\n if (this.hasLocalStorage && localStorage.setItem) try {\n localStorage.setItem(key, value)\n } catch (d) {\n }\n }\n\n getLocalStorage(a) {\n return this.hasLocalStorage && localStorage.getItem ?\n localStorage.getItem(a) : null\n }\n\n removeLocalStorage(key) {\n if (this.hasLocalStorage && localStorage.removeItem) try {\n localStorage.removeItem(key)\n } catch (d) {\n }\n }\n\n setSessionReferer(ref) {\n if (!this.getSessionStorage(this.prefix+'_ref')) {\n this.setSessionStorage(this.prefix+'_ref',ref);\n }\n }\n\n getSessionReferrer() {\n return this.getSessionStorage(this.prefix+'_ref');\n }\n\n getSessionInformation() {\n var a;\n this.sessionInformation && (a = this.sessionInformation);\n a || (a = this.getHTTPCookie(this.prefix + \"_per\")[0]);\n return this.parseSessionInformation(a)\n };\n\n getStoreValue(sessionInformation)\n {\n let pairs = [];\n Object.keys(sessionInformation).forEach(key => {\n let value = sessionInformation[key];\n pairs.push(key + '|' + value);\n });\n return pairs.join('|');\n }\n\n storeSessionInformation(sessionInformation) {\n this.setHTTPCookie(this.prefix+\"_per\", this.getStoreValue(sessionInformation), false, this.getCookieDomain());\n this.sessionInformation = sessionInformation;\n };\n\n parseSessionInformation(content) {\n // Check was it stored as our format or JSON.\n if (content && content.indexOf('|') !== -1) {\n let contentReturn = {};\n let parts = content.split('|');\n\n for (var i = 0; i < parts.length / 2; i++) {\n contentReturn[parts[i * 2]] = parts[(i * 2) + 1];\n }\n\n return contentReturn;\n } else {\n if (content) {\n return JSON.parse(unescape(content))\n } else {\n return {};\n }\n }\n\n };\n}\n\n","\nexport class userSession {\n\n constructor() {\n this.vid = null;\n this.hnh = null;\n\n this.attributes = {};\n this.ref = null;\n this.id = null;\n this.hash = null;\n this.jsVars = [];\n this.updateVarsTimeout = null;\n this.JSON = {\n parse: window.JSON && (window.JSON.parse || window.JSON.decode) || String.prototype.evalJSON && function(str){return String(str).evalJSON();} || $.parseJSON || $.evalJSON,\n stringify: Object.toJSON || window.JSON && (window.JSON.stringify || window.JSON.encode) || $.toJSON\n };\n }\n\n setAttributes(attributes) {\n this.attributes = attributes;\n }\n\n setSessionReferrer(ref) {\n this.ref = ref;\n }\n\n getSessionReferrer() {\n return this.ref;\n }\n\n getVID() {\n return this.vid;\n }\n\n setVID(vid) {\n this.vid = vid;\n }\n\n setSessionInformation(params) {\n this.vid = params['vid'] || null;\n this.hnh = params['hnh'] || null;\n this.hash = params['hash'] || null;\n this.id = params['id'] || null;\n }\n\n getSessionAttributes() {\n var attr = {};\n\n if (this.vid !== null) {\n attr['vid'] = this.vid;\n }\n\n if (this.hnh !== null) {\n attr['hnh'] = this.hnh;\n }\n\n if (this.id !== null) {\n attr['id'] = this.id;\n }\n\n if (this.hash !== null) {\n attr['hash'] = this.hash;\n }\n\n return attr\n }\n\n setupVarsMonitoring(jsVars, cb) {\n this.jsVars = jsVars;\n\n // Try to monitor variable if it's lhc_var\n try {\n\n if (this.attributes.lhc_var !== null)\n {\n var validator = {\n set: (obj, prop, value) => {\n // The default behavior to store the value\n obj[prop] = value;\n\n clearTimeout(this.updateVarsTimeout);\n this.updateVarsTimeout = setTimeout( () =>{ this.updateJSVars(obj, cb); },1000);\n\n // Indicate success\n return true;\n }\n };\n\n this.attributes.lhc_var = new Proxy(this.attributes.lhc_var,validator);\n\n // Convert argument or global lhc_var to a reference\n if (this.attributes.LHC_API.args.lhc_var) {\n this.attributes.LHC_API.args.lhc_var = this.attributes.lhc_var;\n } else if (lhc_var) {\n lhc_var = this.attributes.lhc_var;\n }\n\n // Update vars initially\n this.updateJSVars(this.attributes.lhc_var);\n\n } else if (typeof LHCChatOptions !== 'undefined' && typeof LHCChatOptions.attr_prefill !== 'undefined') {\n\n var lhc_var_prefill = {};\n\n LHCChatOptions.attr_prefill.forEach( (item) => {\n if (item.name && item.value) {\n lhc_var_prefill['prefill_'+item.name] = item.value;\n }\n });\n\n var xhr = new XMLHttpRequest();\n xhr.open( \"POST\", this.attributes.LHC_API.args.lhc_base_url + '/chat/updatejsvars' + this.getAppendVariables(), true);\n xhr.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n xhr.send( \"data=\" + encodeURIComponent( this.JSON.stringify(lhc_var_prefill) ) );\n }\n\n } catch(err) {\n console.log(err);\n };\n }\n\n getPrefillVars() {\n let varsReturn = [];\n if (this.jsVars.length > 0) {\n var varsSet = this.getVars();\n for (var jsVarData in this.jsVars) {\n if (this.jsVars[jsVarData].type && varsSet[this.jsVars[jsVarData].id]) {\n var item = {};\n item[this.jsVars[jsVarData].type] = varsSet[this.jsVars[jsVarData].id];\n varsReturn.push(item);\n }\n }\n }\n return varsReturn;\n }\n\n getVars() {\n if (this.jsVars.length > 0) {\n var js_args = {};\n var currentVar = null;\n\n for (var index in this.jsVars) {\n try {\n\n if (this.jsVars[index].var.indexOf('lhc_var.') !== -1) {\n currentVar = this.attributes.lhc_var[this.jsVars[index].var.replace('lhc_var.','')] || null;\n } else {\n currentVar = eval(this.jsVars[index].var);\n }\n\n if (typeof currentVar !== 'undefined' && currentVar !== null && currentVar !== '') {\n js_args[this.jsVars[index].id] = currentVar;\n }\n } catch(err) {\n\n }\n }\n\n return js_args;\n }\n return null;\n }\n\n getAppendVariables(){\n var append = '';\n\n if (this.vid !== null) {\n append = append + '/(vid)/' + this.vid ;\n }\n\n if (this.hash !== null && this.id !== null) {\n append = append + '/(hash)/' + this.id + '_' + this.hash;\n }\n\n return append;\n }\n\n updateJSVars(vars, cb) {\n\n let varsJSON = this.getVars(vars);\n\n var xhr = new XMLHttpRequest();\n xhr.open( \"POST\", this.attributes.LHC_API.args.lhc_base_url + '/chat/updatejsvars' + this.getAppendVariables(), true);\n xhr.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n xhr.send( \"data=\" + encodeURIComponent( this.JSON.stringify(varsJSON) ) );\n\n if (typeof cb !== 'undefined' && this.hash === null && this.id === null) {\n cb(varsJSON, this.getPrefillVars());\n }\n }\n\n setChatInformation(data, alwaysPersistentNeedHelp) {\n this.id = data.id;\n this.hash = data.hash;\n // Hide only chat starts otherwise don't touch it.\n if (this.id !== null && !alwaysPersistentNeedHelp) {\n this.hnh = Math.round(Date.now() / 1000);\n }\n }\n\n}","var appleIphone = /iPhone/i;\nvar appleIpod = /iPod/i;\nvar appleTablet = /iPad/i;\nvar appleUniversal = /\\biOS-universal(?:.+)Mac\\b/i;\nvar androidPhone = /\\bAndroid(?:.+)Mobile\\b/i;\nvar androidTablet = /Android/i;\nvar amazonPhone = /(?:SD4930UR|\\bSilk(?:.+)Mobile\\b)/i;\nvar amazonTablet = /Silk/i;\nvar windowsPhone = /Windows Phone/i;\nvar windowsTablet = /\\bWindows(?:.+)ARM\\b/i;\nvar otherBlackBerry = /BlackBerry/i;\nvar otherBlackBerry10 = /BB10/i;\nvar otherOpera = /Opera Mini/i;\nvar otherChrome = /\\b(CriOS|Chrome)(?:.+)Mobile/i;\nvar otherFirefox = /Mobile(?:.+)Firefox\\b/i;\nvar isAppleTabletOnIos13 = function (navigator) {\n return (typeof navigator !== 'undefined' &&\n navigator.platform === 'MacIntel' &&\n typeof navigator.maxTouchPoints === 'number' &&\n navigator.maxTouchPoints > 1 &&\n typeof MSStream === 'undefined');\n};\nfunction createMatch(userAgent) {\n return function (regex) { return regex.test(userAgent); };\n}\nexport default function isMobile(param) {\n var nav = {\n userAgent: '',\n platform: '',\n maxTouchPoints: 0\n };\n if (!param && typeof navigator !== 'undefined') {\n nav = {\n userAgent: navigator.userAgent,\n platform: navigator.platform,\n maxTouchPoints: navigator.maxTouchPoints || 0\n };\n }\n else if (typeof param === 'string') {\n nav.userAgent = param;\n }\n else if (param && param.userAgent) {\n nav = {\n userAgent: param.userAgent,\n platform: param.platform,\n maxTouchPoints: param.maxTouchPoints || 0\n };\n }\n var userAgent = nav.userAgent;\n var tmp = userAgent.split('[FBAN');\n if (typeof tmp[1] !== 'undefined') {\n userAgent = tmp[0];\n }\n tmp = userAgent.split('Twitter');\n if (typeof tmp[1] !== 'undefined') {\n userAgent = tmp[0];\n }\n var match = createMatch(userAgent);\n var result = {\n apple: {\n phone: match(appleIphone) && !match(windowsPhone),\n ipod: match(appleIpod),\n tablet: !match(appleIphone) &&\n (match(appleTablet) || isAppleTabletOnIos13(nav)) &&\n !match(windowsPhone),\n universal: match(appleUniversal),\n device: (match(appleIphone) ||\n match(appleIpod) ||\n match(appleTablet) ||\n match(appleUniversal) ||\n isAppleTabletOnIos13(nav)) &&\n !match(windowsPhone)\n },\n amazon: {\n phone: match(amazonPhone),\n tablet: !match(amazonPhone) && match(amazonTablet),\n device: match(amazonPhone) || match(amazonTablet)\n },\n android: {\n phone: (!match(windowsPhone) && match(amazonPhone)) ||\n (!match(windowsPhone) && match(androidPhone)),\n tablet: !match(windowsPhone) &&\n !match(amazonPhone) &&\n !match(androidPhone) &&\n (match(amazonTablet) || match(androidTablet)),\n device: (!match(windowsPhone) &&\n (match(amazonPhone) ||\n match(amazonTablet) ||\n match(androidPhone) ||\n match(androidTablet))) ||\n match(/\\bokhttp\\b/i)\n },\n windows: {\n phone: match(windowsPhone),\n tablet: match(windowsTablet),\n device: match(windowsPhone) || match(windowsTablet)\n },\n other: {\n blackberry: match(otherBlackBerry),\n blackberry10: match(otherBlackBerry10),\n opera: match(otherOpera),\n firefox: match(otherFirefox),\n chrome: match(otherChrome),\n device: match(otherBlackBerry) ||\n match(otherBlackBerry10) ||\n match(otherOpera) ||\n match(otherFirefox) ||\n match(otherChrome)\n },\n any: false,\n phone: false,\n tablet: false\n };\n result.any =\n result.apple.device ||\n result.android.device ||\n result.windows.device ||\n result.other.device;\n result.phone =\n result.apple.phone || result.android.phone || result.windows.phone;\n result.tablet =\n result.apple.tablet || result.android.tablet || result.windows.tablet;\n return result;\n}\n//# sourceMappingURL=isMobile.js.map","'use strict';\n\nmodule.exports = require('./lib')\n","'use strict';\n\nvar asap = require('asap/raw');\n\nfunction noop() {}\n\n// States:\n//\n// 0 - pending\n// 1 - fulfilled with _value\n// 2 - rejected with _value\n// 3 - adopted the state of another promise, _value\n//\n// once the state is no longer pending (0) it is immutable\n\n// All `_` prefixed properties will be reduced to `_{random number}`\n// at build time to obfuscate them and discourage their use.\n// We don't use symbols or Object.defineProperty to fully hide them\n// because the performance isn't good enough.\n\n\n// to avoid using try/catch inside critical functions, we\n// extract them to here.\nvar LAST_ERROR = null;\nvar IS_ERROR = {};\nfunction getThen(obj) {\n try {\n return obj.then;\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nfunction tryCallOne(fn, a) {\n try {\n return fn(a);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\nfunction tryCallTwo(fn, a, b) {\n try {\n fn(a, b);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nmodule.exports = Promise;\n\nfunction Promise(fn) {\n if (typeof this !== 'object') {\n throw new TypeError('Promises must be constructed via new');\n }\n if (typeof fn !== 'function') {\n throw new TypeError('Promise constructor\\'s argument is not a function');\n }\n this._U = 0;\n this._V = 0;\n this._W = null;\n this._X = null;\n if (fn === noop) return;\n doResolve(fn, this);\n}\nPromise._Y = null;\nPromise._Z = null;\nPromise._0 = noop;\n\nPromise.prototype.then = function(onFulfilled, onRejected) {\n if (this.constructor !== Promise) {\n return safeThen(this, onFulfilled, onRejected);\n }\n var res = new Promise(noop);\n handle(this, new Handler(onFulfilled, onRejected, res));\n return res;\n};\n\nfunction safeThen(self, onFulfilled, onRejected) {\n return new self.constructor(function (resolve, reject) {\n var res = new Promise(noop);\n res.then(resolve, reject);\n handle(self, new Handler(onFulfilled, onRejected, res));\n });\n}\nfunction handle(self, deferred) {\n while (self._V === 3) {\n self = self._W;\n }\n if (Promise._Y) {\n Promise._Y(self);\n }\n if (self._V === 0) {\n if (self._U === 0) {\n self._U = 1;\n self._X = deferred;\n return;\n }\n if (self._U === 1) {\n self._U = 2;\n self._X = [self._X, deferred];\n return;\n }\n self._X.push(deferred);\n return;\n }\n handleResolved(self, deferred);\n}\n\nfunction handleResolved(self, deferred) {\n asap(function() {\n var cb = self._V === 1 ? deferred.onFulfilled : deferred.onRejected;\n if (cb === null) {\n if (self._V === 1) {\n resolve(deferred.promise, self._W);\n } else {\n reject(deferred.promise, self._W);\n }\n return;\n }\n var ret = tryCallOne(cb, self._W);\n if (ret === IS_ERROR) {\n reject(deferred.promise, LAST_ERROR);\n } else {\n resolve(deferred.promise, ret);\n }\n });\n}\nfunction resolve(self, newValue) {\n // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n if (newValue === self) {\n return reject(\n self,\n new TypeError('A promise cannot be resolved with itself.')\n );\n }\n if (\n newValue &&\n (typeof newValue === 'object' || typeof newValue === 'function')\n ) {\n var then = getThen(newValue);\n if (then === IS_ERROR) {\n return reject(self, LAST_ERROR);\n }\n if (\n then === self.then &&\n newValue instanceof Promise\n ) {\n self._V = 3;\n self._W = newValue;\n finale(self);\n return;\n } else if (typeof then === 'function') {\n doResolve(then.bind(newValue), self);\n return;\n }\n }\n self._V = 1;\n self._W = newValue;\n finale(self);\n}\n\nfunction reject(self, newValue) {\n self._V = 2;\n self._W = newValue;\n if (Promise._Z) {\n Promise._Z(self, newValue);\n }\n finale(self);\n}\nfunction finale(self) {\n if (self._U === 1) {\n handle(self, self._X);\n self._X = null;\n }\n if (self._U === 2) {\n for (var i = 0; i < self._X.length; i++) {\n handle(self, self._X[i]);\n }\n self._X = null;\n }\n}\n\nfunction Handler(onFulfilled, onRejected, promise){\n this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n this.promise = promise;\n}\n\n/**\n * Take a potentially misbehaving resolver function and make sure\n * onFulfilled and onRejected are only called once.\n *\n * Makes no guarantees about asynchrony.\n */\nfunction doResolve(fn, promise) {\n var done = false;\n var res = tryCallTwo(fn, function (value) {\n if (done) return;\n done = true;\n resolve(promise, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(promise, reason);\n });\n if (!done && res === IS_ERROR) {\n done = true;\n reject(promise, LAST_ERROR);\n }\n}\n","'use strict';\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\nPromise.prototype.done = function (onFulfilled, onRejected) {\n var self = arguments.length ? this.then.apply(this, arguments) : this;\n self.then(null, function (err) {\n setTimeout(function () {\n throw err;\n }, 0);\n });\n};\n","'use strict';\n\n//This file contains the ES6 extensions to the core Promises/A+ API\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\n\n/* Static Functions */\n\nvar TRUE = valuePromise(true);\nvar FALSE = valuePromise(false);\nvar NULL = valuePromise(null);\nvar UNDEFINED = valuePromise(undefined);\nvar ZERO = valuePromise(0);\nvar EMPTYSTRING = valuePromise('');\n\nfunction valuePromise(value) {\n var p = new Promise(Promise._0);\n p._V = 1;\n p._W = value;\n return p;\n}\nPromise.resolve = function (value) {\n if (value instanceof Promise) return value;\n\n if (value === null) return NULL;\n if (value === undefined) return UNDEFINED;\n if (value === true) return TRUE;\n if (value === false) return FALSE;\n if (value === 0) return ZERO;\n if (value === '') return EMPTYSTRING;\n\n if (typeof value === 'object' || typeof value === 'function') {\n try {\n var then = value.then;\n if (typeof then === 'function') {\n return new Promise(then.bind(value));\n }\n } catch (ex) {\n return new Promise(function (resolve, reject) {\n reject(ex);\n });\n }\n }\n return valuePromise(value);\n};\n\nvar iterableToArray = function (iterable) {\n if (typeof Array.from === 'function') {\n // ES2015+, iterables exist\n iterableToArray = Array.from;\n return Array.from(iterable);\n }\n\n // ES5, only arrays and array-likes exist\n iterableToArray = function (x) { return Array.prototype.slice.call(x); };\n return Array.prototype.slice.call(iterable);\n}\n\nPromise.all = function (arr) {\n var args = iterableToArray(arr);\n\n return new Promise(function (resolve, reject) {\n if (args.length === 0) return resolve([]);\n var remaining = args.length;\n function res(i, val) {\n if (val && (typeof val === 'object' || typeof val === 'function')) {\n if (val instanceof Promise && val.then === Promise.prototype.then) {\n while (val._V === 3) {\n val = val._W;\n }\n if (val._V === 1) return res(i, val._W);\n if (val._V === 2) reject(val._W);\n val.then(function (val) {\n res(i, val);\n }, reject);\n return;\n } else {\n var then = val.then;\n if (typeof then === 'function') {\n var p = new Promise(then.bind(val));\n p.then(function (val) {\n res(i, val);\n }, reject);\n return;\n }\n }\n }\n args[i] = val;\n if (--remaining === 0) {\n resolve(args);\n }\n }\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n};\n\nPromise.reject = function (value) {\n return new Promise(function (resolve, reject) {\n reject(value);\n });\n};\n\nPromise.race = function (values) {\n return new Promise(function (resolve, reject) {\n iterableToArray(values).forEach(function(value){\n Promise.resolve(value).then(resolve, reject);\n });\n });\n};\n\n/* Prototype Methods */\n\nPromise.prototype['catch'] = function (onRejected) {\n return this.then(null, onRejected);\n};\n","'use strict';\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\nPromise.prototype.finally = function (f) {\n return this.then(function (value) {\n return Promise.resolve(f()).then(function () {\n return value;\n });\n }, function (err) {\n return Promise.resolve(f()).then(function () {\n throw err;\n });\n });\n};\n","'use strict';\n\nmodule.exports = require('./core.js');\nrequire('./done.js');\nrequire('./finally.js');\nrequire('./es6-extensions.js');\nrequire('./node-extensions.js');\nrequire('./synchronous.js');\n","'use strict';\n\n// This file contains then/promise specific extensions that are only useful\n// for node.js interop\n\nvar Promise = require('./core.js');\nvar asap = require('asap');\n\nmodule.exports = Promise;\n\n/* Static Functions */\n\nPromise.denodeify = function (fn, argumentCount) {\n if (\n typeof argumentCount === 'number' && argumentCount !== Infinity\n ) {\n return denodeifyWithCount(fn, argumentCount);\n } else {\n return denodeifyWithoutCount(fn);\n }\n};\n\nvar callbackFn = (\n 'function (err, res) {' +\n 'if (err) { rj(err); } else { rs(res); }' +\n '}'\n);\nfunction denodeifyWithCount(fn, argumentCount) {\n var args = [];\n for (var i = 0; i < argumentCount; i++) {\n args.push('a' + i);\n }\n var body = [\n 'return function (' + args.join(',') + ') {',\n 'var self = this;',\n 'return new Promise(function (rs, rj) {',\n 'var res = fn.call(',\n ['self'].concat(args).concat([callbackFn]).join(','),\n ');',\n 'if (res &&',\n '(typeof res === \"object\" || typeof res === \"function\") &&',\n 'typeof res.then === \"function\"',\n ') {rs(res);}',\n '});',\n '};'\n ].join('');\n return Function(['Promise', 'fn'], body)(Promise, fn);\n}\nfunction denodeifyWithoutCount(fn) {\n var fnLength = Math.max(fn.length - 1, 3);\n var args = [];\n for (var i = 0; i < fnLength; i++) {\n args.push('a' + i);\n }\n var body = [\n 'return function (' + args.join(',') + ') {',\n 'var self = this;',\n 'var args;',\n 'var argLength = arguments.length;',\n 'if (arguments.length > ' + fnLength + ') {',\n 'args = new Array(arguments.length + 1);',\n 'for (var i = 0; i < arguments.length; i++) {',\n 'args[i] = arguments[i];',\n '}',\n '}',\n 'return new Promise(function (rs, rj) {',\n 'var cb = ' + callbackFn + ';',\n 'var res;',\n 'switch (argLength) {',\n args.concat(['extra']).map(function (_, index) {\n return (\n 'case ' + (index) + ':' +\n 'res = fn.call(' + ['self'].concat(args.slice(0, index)).concat('cb').join(',') + ');' +\n 'break;'\n );\n }).join(''),\n 'default:',\n 'args[argLength] = cb;',\n 'res = fn.apply(self, args);',\n '}',\n \n 'if (res &&',\n '(typeof res === \"object\" || typeof res === \"function\") &&',\n 'typeof res.then === \"function\"',\n ') {rs(res);}',\n '});',\n '};'\n ].join('');\n\n return Function(\n ['Promise', 'fn'],\n body\n )(Promise, fn);\n}\n\nPromise.nodeify = function (fn) {\n return function () {\n var args = Array.prototype.slice.call(arguments);\n var callback =\n typeof args[args.length - 1] === 'function' ? args.pop() : null;\n var ctx = this;\n try {\n return fn.apply(this, arguments).nodeify(callback, ctx);\n } catch (ex) {\n if (callback === null || typeof callback == 'undefined') {\n return new Promise(function (resolve, reject) {\n reject(ex);\n });\n } else {\n asap(function () {\n callback.call(ctx, ex);\n })\n }\n }\n }\n};\n\nPromise.prototype.nodeify = function (callback, ctx) {\n if (typeof callback != 'function') return this;\n\n this.then(function (value) {\n asap(function () {\n callback.call(ctx, null, value);\n });\n }, function (err) {\n asap(function () {\n callback.call(ctx, err);\n });\n });\n};\n","'use strict';\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\nPromise.enableSynchronous = function () {\n Promise.prototype.isPending = function() {\n return this.getState() == 0;\n };\n\n Promise.prototype.isFulfilled = function() {\n return this.getState() == 1;\n };\n\n Promise.prototype.isRejected = function() {\n return this.getState() == 2;\n };\n\n Promise.prototype.getValue = function () {\n if (this._V === 3) {\n return this._W.getValue();\n }\n\n if (!this.isFulfilled()) {\n throw new Error('Cannot get a value of an unfulfilled promise.');\n }\n\n return this._W;\n };\n\n Promise.prototype.getReason = function () {\n if (this._V === 3) {\n return this._W.getReason();\n }\n\n if (!this.isRejected()) {\n throw new Error('Cannot get a rejection reason of a non-rejected promise.');\n }\n\n return this._W;\n };\n\n Promise.prototype.getState = function () {\n if (this._V === 3) {\n return this._W.getState();\n }\n if (this._V === -1 || this._V === -2) {\n return 0;\n }\n\n return this._V;\n };\n};\n\nPromise.disableSynchronous = function() {\n Promise.prototype.isPending = undefined;\n Promise.prototype.isFulfilled = undefined;\n Promise.prototype.isRejected = undefined;\n Promise.prototype.getValue = undefined;\n Promise.prototype.getReason = undefined;\n Promise.prototype.getState = undefined;\n};\n","/*!\n * EventEmitter v5.2.9 - git.io/ee\n * Unlicense - http://unlicense.org/\n * Oliver Caldwell - https://oli.me.uk/\n * @preserve\n */\n\n;(function (exports) {\n 'use strict';\n\n /**\n * Class for managing events.\n * Can be extended to provide event functionality in other classes.\n *\n * @class EventEmitter Manages event registering and emitting.\n */\n function EventEmitter() {}\n\n // Shortcuts to improve speed and size\n var proto = EventEmitter.prototype;\n var originalGlobalValue = exports.EventEmitter;\n\n /**\n * Finds the index of the listener for the event in its storage array.\n *\n * @param {Function[]} listeners Array of listeners to search through.\n * @param {Function} listener Method to look for.\n * @return {Number} Index of the specified listener, -1 if not found\n * @api private\n */\n function indexOfListener(listeners, listener) {\n var i = listeners.length;\n while (i--) {\n if (listeners[i].listener === listener) {\n return i;\n }\n }\n\n return -1;\n }\n\n /**\n * Alias a method while keeping the context correct, to allow for overwriting of target method.\n *\n * @param {String} name The name of the target method.\n * @return {Function} The aliased method\n * @api private\n */\n function alias(name) {\n return function aliasClosure() {\n return this[name].apply(this, arguments);\n };\n }\n\n /**\n * Returns the listener array for the specified event.\n * Will initialise the event object and listener arrays if required.\n * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them.\n * Each property in the object response is an array of listener functions.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Function[]|Object} All listener functions for the event.\n */\n proto.getListeners = function getListeners(evt) {\n var events = this._getEvents();\n var response;\n var key;\n\n // Return a concatenated array of all matching events if\n // the selector is a regular expression.\n if (evt instanceof RegExp) {\n response = {};\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n response[key] = events[key];\n }\n }\n }\n else {\n response = events[evt] || (events[evt] = []);\n }\n\n return response;\n };\n\n /**\n * Takes a list of listener objects and flattens it into a list of listener functions.\n *\n * @param {Object[]} listeners Raw listener objects.\n * @return {Function[]} Just the listener functions.\n */\n proto.flattenListeners = function flattenListeners(listeners) {\n var flatListeners = [];\n var i;\n\n for (i = 0; i < listeners.length; i += 1) {\n flatListeners.push(listeners[i].listener);\n }\n\n return flatListeners;\n };\n\n /**\n * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Object} All listener functions for an event in an object.\n */\n proto.getListenersAsObject = function getListenersAsObject(evt) {\n var listeners = this.getListeners(evt);\n var response;\n\n if (listeners instanceof Array) {\n response = {};\n response[evt] = listeners;\n }\n\n return response || listeners;\n };\n\n function isValidListener (listener) {\n if (typeof listener === 'function' || listener instanceof RegExp) {\n return true\n } else if (listener && typeof listener === 'object') {\n return isValidListener(listener.listener)\n } else {\n return false\n }\n }\n\n /**\n * Adds a listener function to the specified event.\n * The listener will not be added if it is a duplicate.\n * If the listener returns true then it will be removed after it is called.\n * If you pass a regular expression as the event name then the listener will be added to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListener = function addListener(evt, listener) {\n if (!isValidListener(listener)) {\n throw new TypeError('listener must be a function');\n }\n\n var listeners = this.getListenersAsObject(evt);\n var listenerIsWrapped = typeof listener === 'object';\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) {\n listeners[key].push(listenerIsWrapped ? listener : {\n listener: listener,\n once: false\n });\n }\n }\n\n return this;\n };\n\n /**\n * Alias of addListener\n */\n proto.on = alias('addListener');\n\n /**\n * Semi-alias of addListener. It will add a listener that will be\n * automatically removed after its first execution.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addOnceListener = function addOnceListener(evt, listener) {\n return this.addListener(evt, {\n listener: listener,\n once: true\n });\n };\n\n /**\n * Alias of addOnceListener.\n */\n proto.once = alias('addOnceListener');\n\n /**\n * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad.\n * You need to tell it what event names should be matched by a regex.\n *\n * @param {String} evt Name of the event to create.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvent = function defineEvent(evt) {\n this.getListeners(evt);\n return this;\n };\n\n /**\n * Uses defineEvent to define multiple events.\n *\n * @param {String[]} evts An array of event names to define.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvents = function defineEvents(evts) {\n for (var i = 0; i < evts.length; i += 1) {\n this.defineEvent(evts[i]);\n }\n return this;\n };\n\n /**\n * Removes a listener function from the specified event.\n * When passed a regular expression as the event name, it will remove the listener from all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to remove the listener from.\n * @param {Function} listener Method to remove from the event.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListener = function removeListener(evt, listener) {\n var listeners = this.getListenersAsObject(evt);\n var index;\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key)) {\n index = indexOfListener(listeners[key], listener);\n\n if (index !== -1) {\n listeners[key].splice(index, 1);\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of removeListener\n */\n proto.off = alias('removeListener');\n\n /**\n * Adds listeners in bulk using the manipulateListeners method.\n * If you pass an object as the first argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added.\n * You can also pass it a regular expression to add the array of listeners to all events that match it.\n * Yeah, this function does quite a bit. That's probably a bad thing.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListeners = function addListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(false, evt, listeners);\n };\n\n /**\n * Removes listeners in bulk using the manipulateListeners method.\n * If you pass an object as the first argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be removed.\n * You can also pass it a regular expression to remove the listeners from all events that match it.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListeners = function removeListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(true, evt, listeners);\n };\n\n /**\n * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level.\n * The first argument will determine if the listeners are removed (true) or added (false).\n * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be added/removed.\n * You can also pass it a regular expression to manipulate the listeners of all events that match it.\n *\n * @param {Boolean} remove True if you want to remove listeners, false if you want to add.\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add/remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) {\n var i;\n var value;\n var single = remove ? this.removeListener : this.addListener;\n var multiple = remove ? this.removeListeners : this.addListeners;\n\n // If evt is an object then pass each of its properties to this method\n if (typeof evt === 'object' && !(evt instanceof RegExp)) {\n for (i in evt) {\n if (evt.hasOwnProperty(i) && (value = evt[i])) {\n // Pass the single listener straight through to the singular method\n if (typeof value === 'function') {\n single.call(this, i, value);\n }\n else {\n // Otherwise pass back to the multiple function\n multiple.call(this, i, value);\n }\n }\n }\n }\n else {\n // So evt must be a string\n // And listeners must be an array of listeners\n // Loop over it and pass each one to the multiple method\n i = listeners.length;\n while (i--) {\n single.call(this, evt, listeners[i]);\n }\n }\n\n return this;\n };\n\n /**\n * Removes all listeners from a specified event.\n * If you do not specify an event then all listeners will be removed.\n * That means every event will be emptied.\n * You can also pass a regex to remove all events that match it.\n *\n * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeEvent = function removeEvent(evt) {\n var type = typeof evt;\n var events = this._getEvents();\n var key;\n\n // Remove different things depending on the state of evt\n if (type === 'string') {\n // Remove all listeners for the specified event\n delete events[evt];\n }\n else if (evt instanceof RegExp) {\n // Remove all events matching the regex.\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n delete events[key];\n }\n }\n }\n else {\n // Remove all listeners in all events\n delete this._events;\n }\n\n return this;\n };\n\n /**\n * Alias of removeEvent.\n *\n * Added to mirror the node API.\n */\n proto.removeAllListeners = alias('removeEvent');\n\n /**\n * Emits an event of your choice.\n * When emitted, every listener attached to that event will be executed.\n * If you pass the optional argument array then those arguments will be passed to every listener upon execution.\n * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately.\n * So they will not arrive within the array on the other side, they will be separate.\n * You can also pass a regular expression to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {Array} [args] Optional array of arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emitEvent = function emitEvent(evt, args) {\n var listenersMap = this.getListenersAsObject(evt);\n var listeners;\n var listener;\n var i;\n var key;\n var response;\n\n for (key in listenersMap) {\n if (listenersMap.hasOwnProperty(key)) {\n listeners = listenersMap[key].slice(0);\n\n for (i = 0; i < listeners.length; i++) {\n // If the listener returns true then it shall be removed from the event\n // The function is executed either with a basic call or an apply if there is an args array\n listener = listeners[i];\n\n if (listener.once === true) {\n this.removeListener(evt, listener.listener);\n }\n\n response = listener.listener.apply(this, args || []);\n\n if (response === this._getOnceReturnValue()) {\n this.removeListener(evt, listener.listener);\n }\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of emitEvent\n */\n proto.trigger = alias('emitEvent');\n\n /**\n * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on.\n * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {...*} Optional additional arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emit = function emit(evt) {\n var args = Array.prototype.slice.call(arguments, 1);\n return this.emitEvent(evt, args);\n };\n\n /**\n * Sets the current value to check against when executing listeners. If a\n * listeners return value matches the one set here then it will be removed\n * after execution. This value defaults to true.\n *\n * @param {*} value The new value to check for when executing listeners.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.setOnceReturnValue = function setOnceReturnValue(value) {\n this._onceReturnValue = value;\n return this;\n };\n\n /**\n * Fetches the current value to check against when executing listeners. If\n * the listeners return value matches this one then it should be removed\n * automatically. It will return true by default.\n *\n * @return {*|Boolean} The current value to check for or the default, true.\n * @api private\n */\n proto._getOnceReturnValue = function _getOnceReturnValue() {\n if (this.hasOwnProperty('_onceReturnValue')) {\n return this._onceReturnValue;\n }\n else {\n return true;\n }\n };\n\n /**\n * Fetches the events object and creates one if required.\n *\n * @return {Object} The events storage object.\n * @api private\n */\n proto._getEvents = function _getEvents() {\n return this._events || (this._events = {});\n };\n\n /**\n * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version.\n *\n * @return {Function} Non conflicting EventEmitter class.\n */\n EventEmitter.noConflict = function noConflict() {\n exports.EventEmitter = originalGlobalValue;\n return EventEmitter;\n };\n\n // Expose the class either via AMD, CommonJS or the global object\n if (typeof define === 'function' && define.amd) {\n define(function () {\n return EventEmitter;\n });\n }\n else if (typeof module === 'object' && module.exports){\n module.exports = EventEmitter;\n }\n else {\n exports.EventEmitter = EventEmitter;\n }\n}(typeof window !== 'undefined' ? window : this || {}));\n","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var inProgress = {};\nvar dataWebpackPrefix = \"LiveHelperChat:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = function(url, done, key, chunkId) {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\t\tscript.src = url;\n\t\tif (script.src.indexOf(window.location.origin + '/') !== 0) {\n\t\t\tscript.crossOrigin = \"anonymous\";\n\t\t}\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = function(prev, event) {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach(function(fn) { return fn(event); });\n\t\tif(prev) return prev(event);\n\t}\n\t;\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = function(chunkId) {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce(function(promises, key) {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = function(chunkId) {\n\t// return url for filenames based on template\n\treturn \"\" + {\"8\":\"6d3de043cfb6e40e6a85\",\"81\":\"75d1d932aa8416f0bf23\",\"213\":\"82d024432640e184cab5\",\"335\":\"94e75bc034e279cb1a5d\",\"398\":\"16da6b6586a6fd6028ae\",\"417\":\"507f464a966a8359428a\",\"530\":\"c9aa29f9fd71f320cdd6\",\"783\":\"a68fc3eccb8af7392e9f\",\"821\":\"b10c9440ec454caf8cbd\"}[chunkId] + \".js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.p = \"./\";","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t179: 0\n};\n\n__webpack_require__.f.j = function(chunkId, promises) {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise(function(resolve, reject) { installedChunkData = installedChunks[chunkId] = [resolve, reject]; });\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = function(event) {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkIds[i]] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkLiveHelperChat\"] = self[\"webpackChunkLiveHelperChat\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","(function (global) {\n\n var currentScript = document.currentScript || (function() {\n var scripts = document.getElementsByTagName('script');\n return scripts[scripts.length - 1];\n })();\n\n var scopeScript = currentScript.getAttribute('scope') || 'LHC';\n\n if (/google|baidu|bing|msn|duckduckbot|teoma|slurp|yandex|Chrome-Lighthouse/i.test(navigator.userAgent)) {\n return;\n }\n\n if (!global[scopeScript+'_API']) {\n if (global['LHC_API']) {\n global[scopeScript+'_API'] = global['LHC_API'];\n } else {\n return;\n }\n }\n\n var lhcError = {\n log : function(message, filename, lineNumber, stack, column) {\n var e;\n e = {};\n e.message = message || \"\";\n e.message += \"\\n\" + global.navigator.userAgent;\n e.location = location && location.href ? location.href : \"\";\n e.file = filename || \"\";\n e.line = lineNumber || \"\";\n e.column = column || \"\";\n e.stack = stack ? JSON.stringify(stack) : \"\";\n e.stack = e.stack.replace(/(\\r\\n|\\n|\\r)/gm, \"\");\n var xhr = new XMLHttpRequest();\n xhr.open( \"POST\", global[scopeScript+'_API']['args']['lhc_base_url'] + 'audit/logjserror', true);\n xhr.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n xhr.send( \"data=\" + encodeURIComponent( JSON.stringify(e) ) );\n }\n }\n\n try {\n\n window.addEventListener('error', function (e) {\n if (lhcError && e.filename.indexOf(global[scopeScript+'_API']['args']['lhc_base_url'].replace('index.php/')) !== -1) {\n lhcError.log(e.message, e.filename, e.lineNumber || e.lineno, e.error.stack, e.colno);\n }\n })\n\n global['$_' + scopeScript + '_Instance'] = null;\n global['$_' + scopeScript + '_Debug'] = false;\n global['$_' + scopeScript] = global['$_' + scopeScript] || {};\n\n (function (lhc, LHC_API) {\n\n lhc.loaded = false;\n lhc.connected = false;\n lhc.ready = false;\n lhc.version = 208;\n\n const isMobileItem = require('ismobilejs');\n var isMobile = isMobileItem.default(global.navigator.userAgent).phone;\n\n lhc.isMobile = isMobile;\n\n var init = () => {\n\n if (!global.Promise) {\n global.Promise = require('promise');\n }\n\n var BehaviorSubject = require('./util/monitoredVariable').monitoredVariable;\n var EventEmitter = require('wolfy87-eventemitter');\n\n var statusWidget = require('./lib/widgets/statusWidget').statusWidget;\n var mainWidget = require('./lib/widgets/mainWidget').mainWidget;\n var mainWidgetPopup = require('./lib/widgets/mainWidgetPopup').mainWidgetPopup;\n var containerChat = require('./lib/widgets/containerChat').containerChat;\n var helperFunctions = require('./lib/helperFunctions').helperFunctions;\n var userSession = require('./util/userSession').userSession;\n var storageHandler = require('./util/storageHandler').storageHandler;\n var chatNotifications = require('./lib/chatNotifications').chatNotifications;\n var chatEventsHandler = require('./util/chatEventsHandler').chatEventsHandler;\n\n LHC_API.args = LHC_API.args || {};\n\n if (typeof LHC_API.args.mobile_view !== 'undefined') {\n lhc.isMobile = isMobile = LHC_API.args.mobile_view;\n }\n\n const prefixLowercase = scopeScript.toLowerCase();\n const prefixStorage = (prefixLowercase && LHC_API.args.scope_storage ? prefixLowercase : 'lhc');\n const cookieEnabledUser = typeof LHC_API.args.cookie_enabled !== 'undefined' ? LHC_API.args.cookie_enabled : true;\n const userMode = LHC_API.args.mode || 'widget';\n\n var storageHandler = new storageHandler(global, LHC_API.args.domain || null, prefixStorage, cookieEnabledUser);\n\n // Cookies are disabled and it's required for us to work. So switch to mode where cookies are not required\n if (storageHandler.cookieEnabled === false && userMode == 'widget') {\n LHC_API.args.orig = {}\n LHC_API.args.orig.mode = LHC_API.args.mode;\n LHC_API.args.orig.proactive = LHC_API.args.proactive;\n LHC_API.args.orig.check_messages = LHC_API.args.check_messages;\n\n LHC_API.args.mode = 'popup';\n LHC_API.args.proactive = false;\n LHC_API.args.check_messages = false;\n }\n\n if (LHC_API.args.cookie_per_page) {\n storageHandler.setCookiePerPage(LHC_API.args.cookie_per_page);\n }\n\n var referrer = (document.referrer) ? document.referrer.substr(document.referrer.indexOf('://') + 1) : '';\n var location = (document.location) ? encodeURIComponent(window.location.href.substring(window.location.protocol.length)) : '';\n\n storageHandler.setSessionReferer(referrer);\n\n referrer = referrer ? encodeURIComponent(referrer) : '';\n\n var languageOverride = '';\n\n if (storageHandler.getLocalStorage(prefixStorage+'_lng')) {\n languageOverride = LHC_API.args.lang = storageHandler.getLocalStorage(prefixStorage+'_lng');\n }\n\n if (LHC_API.args.lang) {\n LHC_API.args.lang = LHC_API.args.lang.replace('/', '') + '/';\n }\n\n // Main attributes\n var attributesWidget = {\n terminated: false,\n prefixLowercase: prefixLowercase,\n prefixStorage: prefixStorage,\n prefixScope: scopeScript,\n cookie_enabled: cookieEnabledUser,\n LHC_API: LHC_API,\n viewHandler: null,\n msgSnippet: null,\n react_attr: LHC_API.args.react_attr || null,\n hide_parent: LHC_API.args.hide_parent || false,\n hide_iframe: LHC_API.args.hide_iframe || false,\n hide_status: LHC_API.args.hide_status || null,\n mainWidget: new mainWidget(prefixLowercase),\n popupWidget: new mainWidgetPopup(),\n chatNotifications: chatNotifications,\n jsVars: new BehaviorSubject(true),\n onlineStatus: new BehaviorSubject(true),\n wloaded: new BehaviorSubject(false),\n sload: new BehaviorSubject(false),\n shidden: new BehaviorSubject(LHC_API.args.hide_status || false),\n msgsnippet_status: new BehaviorSubject(false),\n unread_counter: new BehaviorSubject(0),\n widgetStatus: new BehaviorSubject((storageHandler.getSessionStorage(prefixStorage + '_ws') === 'true' || (LHC_API.args.mode && LHC_API.args.mode == 'embed'))),\n eventEmitter: new EventEmitter(),\n toggleSound: new BehaviorSubject(storageHandler.getSessionStorage(prefixStorage + '_sound') === 'true', {'ignore_sub': true}),\n hideOffline: false,\n fscreen: LHC_API.args.fscreen || false,\n isMobile: isMobile,\n isIE: (navigator.userAgent.toUpperCase().indexOf(\"TRIDENT/\") != -1 || navigator.userAgent.toUpperCase().indexOf(\"MSIE\") != -1 || typeof Object.assign !== 'function'),\n fresh: LHC_API.args.fresh || false,\n popupDimesnions: {pheight: (LHC_API.args.pheight || 520), pwidth: (LHC_API.args.pwidth || 500)},\n leaveMessage: LHC_API.args.leaveamessage || null,\n department: LHC_API.args.department || [],\n dep_default: LHC_API.args.dep_default || null,\n product: LHC_API.args.product || [],\n theme: typeof LHC_API.args.theme !== 'undefined' ? (typeof LHC_API.args.theme === 'object' ? LHC_API.args.theme.join(',') : LHC_API.args.theme) : null,\n theme_v: null,\n domain: LHC_API.args.domain || null,\n domain_lhc: null,\n instance_id: 0,\n profile_pic: LHC_API.args.profile_pic || null,\n position: LHC_API.args.position || 'bottom_right',\n position_placement: LHC_API.args.position_placement || 'bottom_right',\n base_url: LHC_API.args.lhc_base_url,\n mode: LHC_API.args.mode || 'widget',\n tag: LHC_API.args.tag || '',\n status_delay: LHC_API.args.status_delay || 0,\n proactive: {},\n captcha: null,\n focused: true,\n clinst: false,\n kcw: LHC_API.args.kcw || false,\n offline_redirect: LHC_API.args.offline_redirect || null,\n identifier: LHC_API.args.identifier || '',\n proactive_interval: null,\n lang: LHC_API.args.lang || '',\n langOverride: languageOverride,\n subject_id: LHC_API.args.subject_id || '',\n bot_id: LHC_API.args.bot_id || '',\n trigger_id: LHC_API.args.trigger_id || '',\n priority: LHC_API.args.priority || null,\n events: LHC_API.args.events || [],\n conversion: LHC_API.args.conversion || '',\n hhtml: LHC_API.args.hhtml || '',\n survey: LHC_API.args.survey || null,\n operator: LHC_API.args.operator || null,\n phash: LHC_API.args.phash || null,\n pvhash: LHC_API.args.pvhash || null,\n // Login Objects\n userSession: new userSession(),\n storageHandler: storageHandler,\n staticJS: {},\n nh : null, // Need help data\n init_calls: [],\n childCommands: [],\n childExtCommands: [],\n lhc_var: (LHC_API.args.lhc_var || (typeof lhc_var !== 'undefined' ? lhc_var : null)),\n loadcb: LHC_API.args.loadcb || null,\n LHCChatOptions: global[scopeScript + 'ChatOptions'] || {}\n };\n\n attributesWidget.widgetDimesions = new BehaviorSubject({\n sright: (LHC_API.args.sright || 0),\n sbottom: (LHC_API.args.sbottom || 0),\n wright_inv: 0,\n wbottom: 0,\n wright: 0,\n width: ((isMobile || attributesWidget.fscreen) ? 100 : (LHC_API.args.wwidth || 350)),\n height: ((isMobile || attributesWidget.fscreen) ? 100 : (LHC_API.args.wheight || 520)),\n units: ((isMobile || attributesWidget.fscreen) ? '%' : 'px')\n });\n\n var chatEvents = new chatEventsHandler(attributesWidget);\n\n lhc.eventListener = attributesWidget.eventEmitter;\n lhc.attributes = attributesWidget;\n\n attributesWidget.userSession.setAttributes(attributesWidget);\n attributesWidget.userSession.setSessionInformation(attributesWidget.storageHandler.getSessionInformation());\n attributesWidget.userSession.setSessionReferrer(storageHandler.getSessionReferrer());\n\n if (attributesWidget.mode == 'widget' || attributesWidget.mode == 'popup') {\n\n var containerChatObj = new containerChat(attributesWidget.prefixLowercase, LHC_API.args.pnode || null);\n\n attributesWidget.viewHandler = new statusWidget(attributesWidget.prefixLowercase);\n containerChatObj.cont.elmDom.appendChild(attributesWidget.viewHandler.cont.constructUI(), !0);\n\n if (attributesWidget.mode == 'widget' || attributesWidget.mode == 'popup') {\n containerChatObj.cont.elmDom.appendChild(attributesWidget.mainWidget.cont.constructUI(), !0);\n }\n\n } else {\n var embedWrapper = document.getElementById(attributesWidget.prefixLowercase + '_status_container_page');\n if (embedWrapper !== null) {\n embedWrapper.appendChild(attributesWidget.mainWidget.cont.constructUI());\n embedWrapper.style.height = (LHC_API.args.wheight || 520) + 'px';\n } else {\n attributesWidget.position = 'api';\n }\n }\n\n function getArguments(){\n return {\n 'cd': (storageHandler.cookieEnabled === false ? 1 : null),\n 'vid': (LHC_API.args.UUID || attributesWidget.userSession.getVID()),\n 'hnh': attributesWidget.userSession.hnh,\n 'tz': helperFunctions.getTzOffset(),\n 'r': referrer,\n 'l': location,\n 'dt': encodeURIComponent(document.title),\n 'ie': attributesWidget.isIE,\n 'dep': attributesWidget.department.join(','),\n 'idnt': attributesWidget.identifier,\n 'tag': attributesWidget.tag,\n 'theme': attributesWidget.theme,\n 'mode': attributesWidget.mode,\n 'pos': attributesWidget.position\n };\n }\n\n function showNeedHelp(nh) {\n import('./lib/widgets/needhelpWidget').then((module) => {\n var needhelpWidget = new module.needhelpWidget(attributesWidget.prefixLowercase);\n containerChatObj.cont.elmDom.appendChild(needhelpWidget.cont.constructUI(), !0);\n needhelpWidget.init(attributesWidget, nh);\n });\n }\n\n function showProactive(){\n import('./util/proactiveChat').then((module) => {\n module.proactiveChat.setParams({\n 'interval': attributesWidget.proactive_interval\n }, attributesWidget, chatEvents);\n });\n }\n\n helperFunctions.makeRequest(LHC_API.args.lhc_base_url + attributesWidget.lang + 'widgetrestapi/settings', {\n params: getArguments()\n }, (data) => {\n\n if (lhc.version !== data.wv && document.getElementById(attributesWidget.prefixLowercase+'-js-reload') === null) {\n\n if (data.terminate) {\n return;\n }\n\n attributesWidget.userSession.setVID(data.vid);\n\n // Mark script as terminated\n attributesWidget.terminated = true;\n\n // Remove legacy dom\n helperFunctions.removeById(attributesWidget.prefixLowercase+'_container_v2');\n helperFunctions.removeById(attributesWidget.prefixLowercase+'_status_widget_v2');\n\n // Create new embed script\n var po = document.createElement(\"script\");\n po.type = currentScript.type;\n po.id = attributesWidget.prefixLowercase+'-js-reload';\n po.async = true;\n if (currentScript.getAttribute('scope')) { po.setAttribute('scope',currentScript.getAttribute('scope')); }\n\n // Expires cache\n po.src = currentScript.getAttribute('src') + '&r='+ (new Date()).getHours() + (new Date()).getMinutes();\n var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);\n return;\n }\n\n if (data.terminate || ((!attributesWidget.leaveMessage && data.chat_ui.leaveamessage === false) && data.isOnline === false)) {\n\n if (LHC_API.args.offline_redirect && attributesWidget.mode == 'embed') {\n document.location = LHC_API.args.offline_redirect;\n }\n\n if (data.terminate) {\n return;\n }\n }\n\n // Send event that lhc has started\n // So parent page informs back that it has lhc\n if ((attributesWidget.hide_parent || attributesWidget.hide_iframe || (data.chat_ui && (data.chat_ui.hide_iframe || data.chat_ui.hide_parent))) && window.location != window.parent.location && window.parent.closed === false) {\n window.parent.postMessage('lhc::started','*');\n }\n\n attributesWidget.leaveMessage = attributesWidget.leaveMessage || data.chat_ui.leaveamessage;\n\n if (data.department) {\n attributesWidget.department = data.department;\n }\n\n __webpack_public_path__ = data.chunks_location + \"/\";\n\n if (data.secure_cookie) {\n attributesWidget.storageHandler.setSecureCookie(true);\n }\n\n if (data.domain) {\n attributesWidget.storageHandler.setCookieDomain(data.domain);\n }\n\n if (data.siteaccess) {\n attributesWidget.lang = data.siteaccess;\n }\n\n if (data.static) {\n attributesWidget.staticJS = data.static;\n }\n\n if (data.pdim) {\n attributesWidget.popupDimesnions = data.pdim;\n }\n\n if (data.survey_id) {\n attributesWidget.survey = data.survey_id;\n }\n\n if (data.domain_lhc) {\n attributesWidget.domain_lhc = data.domain_lhc;\n }\n\n if (data.cont_css) {\n attributesWidget.cont_ss = data.cont_css;\n }\n\n if (data.wposition) {\n attributesWidget.position_placement = data.wposition;\n }\n\n attributesWidget.captcha = {hash: data.hash, ts: data.hash_ts};\n attributesWidget.userSession.setVID(data.vid);\n\n // Store session\n attributesWidget.storageHandler.storeSessionInformation(attributesWidget.userSession.getSessionAttributes());\n\n attributesWidget.hideOffline = data.hideOffline;\n attributesWidget.onlineStatus.next(data.isOnline);\n\n if (data.theme) {\n attributesWidget.theme = data.theme;\n attributesWidget.theme_v = data.theme_v;\n }\n\n if (data.chat_ui) {\n\n if (data.chat_ui.hide_parent) {\n attributesWidget.hide_parent = true;\n }\n\n if ((data.chat_ui.fscreen && attributesWidget.mode == 'embed') || attributesWidget.fscreen) {\n attributesWidget.widgetDimesions.nextProperty('width', 100);\n attributesWidget.widgetDimesions.nextProperty('height', 100);\n attributesWidget.widgetDimesions.nextProperty('units', '%');\n attributesWidget.fscreen = isMobile = attributesWidget.isMobile = true;\n }\n\n if (data.chat_ui.wheight && !isMobile) {\n attributesWidget.widgetDimesions.nextProperty('height', data.chat_ui.wheight);\n }\n\n if (data.chat_ui.wwidth && !isMobile) {\n attributesWidget.widgetDimesions.nextProperty('width', data.chat_ui.wwidth);\n }\n\n if (data.chat_ui.hhtml) {\n attributesWidget.hhtml = data.chat_ui.hhtml;\n }\n\n if (data.chat_ui.status_delay) {\n attributesWidget.status_delay = data.chat_ui.status_delay;\n }\n\n if (data.chat_ui.kcw) {\n attributesWidget.kcw = true;\n }\n\n if (data.chat_ui.clinst) {\n attributesWidget.clinst = true;\n }\n\n if (data.chat_ui.wbottom) {\n attributesWidget.widgetDimesions.nextProperty('wbottom', data.chat_ui.wbottom);\n }\n\n if (data.chat_ui.sbottom) {\n attributesWidget.widgetDimesions.nextProperty('sbottom', data.chat_ui.sbottom);\n }\n\n if (data.chat_ui.sright) {\n attributesWidget.widgetDimesions.nextProperty('sright', data.chat_ui.sright);\n }\n\n if (data.chat_ui.wright) {\n attributesWidget.widgetDimesions.nextProperty('wright', data.chat_ui.wright);\n }\n\n if (data.chat_ui.wright_inv) {\n attributesWidget.widgetDimesions.nextProperty('wright_inv', data.chat_ui.wright_inv);\n }\n\n if (data.chat_ui.mobile_popup && isMobile) {\n attributesWidget.mode = 'popup';\n }\n\n if (data.chat_ui.sound_enabled && storageHandler.getSessionStorage(prefixStorage + '_sound') === null) {\n attributesWidget.toggleSound.next(true);\n }\n\n if (data.instance_id) {\n attributesWidget.instance_id = data.instance_id;\n }\n\n if (data.chat_ui.check_status) {\n import('./util/activityMonitoring').then((module) => {\n module.activityMonitoring.setParams({\n 'timeout': data.chat_ui.check_status,\n 'track_mouse': data.chat_ui.track_mouse,\n 'track_activity': data.chat_ui.track_activity\n }, attributesWidget);\n });\n }\n\n if (data.ga) {\n import('./util/analyticEvents').then((module) => {\n module.analyticEvents.setParams({\n 'ga': data.ga\n }, attributesWidget);\n });\n }\n }\n\n if (data.nh && attributesWidget.fresh === false && attributesWidget['position'] != 'api') {\n attributesWidget.nh = data.nh;\n if (attributesWidget.mode == 'widget' || attributesWidget.mode == 'popup') {\n if (data.nh.ap || attributesWidget.userSession.id === null) {\n showNeedHelp(data.nh);\n }\n }\n }\n\n if (data.js_vars) {\n // Javascript custom variables init\n // Extensions can listen for these\n attributesWidget.jsVars.next(data.js_vars);\n\n // Monitor js vars if required\n if (data.js_vars.length > 0) {\n attributesWidget.userSession.setupVarsMonitoring(data.js_vars, (vars, prefillVars) => {\n chatEvents.sendChildEvent('jsVars', [vars, prefillVars]);\n });\n }\n }\n\n // Init main widgets\n if (attributesWidget.mode == 'widget' || attributesWidget.mode == 'popup') {\n attributesWidget.viewHandler.init(attributesWidget, data.ll);\n }\n\n if (!(attributesWidget.position == 'api' && attributesWidget.mode == 'embed')) {\n attributesWidget.mainWidget.init(attributesWidget, data.ll);\n }\n\n // Show status widget\n if (attributesWidget.mode == 'widget' || attributesWidget.mode == 'popup') {\n containerChatObj.cont.show();\n }\n\n if (attributesWidget.loadcb) {\n attributesWidget.loadcb(attributesWidget);\n }\n\n if (data.init_calls) {\n attributesWidget.init_calls = data.init_calls;\n }\n\n attributesWidget.proactive_interval = data.chat_ui.proactive_interval;\n\n if (!data.disable_proactive && (attributesWidget.mode == 'widget' || attributesWidget.mode == 'popup' || attributesWidget.mode == 'embed') && (typeof LHC_API.args.proactive === 'undefined' || LHC_API.args.proactive === true) && attributesWidget.storageHandler.getSessionStorage(prefixStorage + '_invt') === null) {\n showProactive();\n }\n\n if (attributesWidget.init_calls.length > 0) {\n attributesWidget.init_calls.forEach((item) => {\n if (item.extension == 'nodeJSChat') {\n import('./util/nodeJSChat').then((module) => {\n module.nodeJSChat.setParams(item.params, attributesWidget, chatEvents);\n });\n }\n });\n }\n\n })\n\n // Widget Hide event\n attributesWidget.eventEmitter.addListener('closeWidget', function (params) {\n attributesWidget.widgetStatus.next(false);\n chatEvents.sendChildEvent('closedWidget', [params]);\n });\n\n // Send event to the child instantly\n attributesWidget.eventEmitter.addListener('sendChildEvent', function (params) {\n if (typeof params['boot'] !== 'undefined') {\n attributesWidget.mainWidget.bootstrap();\n } else {\n if (attributesWidget.mainWidget.isLoaded == true && lhc.loaded == true) {\n chatEvents.sendChildEvent(params['cmd'], [params['arg']]);\n } else {\n attributesWidget.childCommands.push(params);\n }\n }\n });\n\n // Send smart event to the child\n attributesWidget.eventEmitter.addListener('sendChildExtEvent', function (params) {\n if (typeof params['boot'] !== 'undefined') {\n attributesWidget.mainWidget.bootstrap();\n } else {\n if (attributesWidget.mainWidget.isLoaded == true && lhc.loaded == true) {\n chatEvents.sendChildEvent(params['cmd'], [params['arg']], 'lhc_load_ext');\n } else {\n attributesWidget.childExtCommands.push(params);\n }\n }\n });\n\n // Toggle sound user\n attributesWidget.eventEmitter.addListener('toggleSound', function () {\n var newValue = !attributesWidget.toggleSound.value;\n attributesWidget.toggleSound.next(newValue);\n });\n\n // Toggle cookies policy\n attributesWidget.eventEmitter.addListener('enableCookies', function () {\n\n // Check does cookies are supported in genreal\n if (storageHandler.checkCookiesSupport() === true) {\n // Store session\n var sessionAtrribute = attributesWidget.userSession.getSessionAttributes();\n if (typeof sessionAtrribute.hnh !== 'undefined') { delete sessionAtrribute['hnh']; }\n attributesWidget.storageHandler.storeSessionInformation(sessionAtrribute);\n\n if (typeof LHC_API.args.orig !== 'undefined') {\n\n attributesWidget.mode = LHC_API.args.mode = LHC_API.args.orig.mode;\n LHC_API.args.proactive = LHC_API.args.orig.proactive;\n LHC_API.args.check_messages = LHC_API.args.orig.check_messages;\n\n helperFunctions.makeRequest(LHC_API.args.lhc_base_url + attributesWidget.lang + 'widgetrestapi/settings', {\n params: getArguments()\n }, (data) => {\n // Change mode for react app\n attributesWidget.eventEmitter.emitEvent('sendChildEvent',[{'cmd' : 'attr_set', 'arg' : {'type':'attr_set','attr': ['mode'], data : attributesWidget.mode}}]);\n\n // Show need help widget if it's required\n if (attributesWidget.mode == 'widget' && attributesWidget.nh !== null) {\n showNeedHelp(attributesWidget.nh);\n }\n\n // Enable proactive if it's required\n if ((attributesWidget.mode == 'widget' || attributesWidget.mode == 'popup') && (typeof LHC_API.args.proactive === 'undefined' || LHC_API.args.proactive === true) && attributesWidget.storageHandler.getSessionStorage(prefixStorage + '_invt') === null) {\n showProactive();\n }\n });\n }\n }\n });\n\n\n // Clear chat cookies if there is any\n // Then popup finishes loading it calls this to clean up chat cookies. So visitor can start new chat.\n attributesWidget.eventEmitter.addListener('endChatCookies', function (params) {\n if (attributesWidget.kcw === false || (params && params['force'] == true)) {\n attributesWidget.userSession.setChatInformation({'id': null, 'hash': null});\n attributesWidget.storageHandler.storeSessionInformation(attributesWidget.userSession.getSessionAttributes());\n attributesWidget.proactive = {};\n }\n });\n\n attributesWidget.eventEmitter.addListener('endChat', function (params) {\n\n attributesWidget.userSession.setChatInformation({'id': null, 'hash': null});\n attributesWidget.storageHandler.storeSessionInformation(attributesWidget.userSession.getSessionAttributes());\n\n attributesWidget.proactive = {};\n\n if (attributesWidget.mode != 'popup' && (!params || !params['show_start'])) {\n attributesWidget.widgetStatus.next(false);\n }\n\n if (attributesWidget.viewHandler) {\n attributesWidget.viewHandler.removeUnreadIndicator();\n attributesWidget.eventEmitter.emitEvent('hide_msg_snippet');\n }\n\n attributesWidget.widgetDimesions.nextProperty('height_override', null);\n\n chatEvents.sendChildEvent('endedChat', [{'sender': 'endButton', 'survey' : attributesWidget.survey}]);\n\n if (attributesWidget.mode == 'embed' || (params && params['show_start'])) {\n attributesWidget.eventEmitter.emitEvent('showWidget', [{'sender': 'closeButton'}]);\n }\n\n if (attributesWidget.mode == 'popup') {\n attributesWidget.popupWidget.freeup();\n }\n });\n\n // Widget show event\n attributesWidget.eventEmitter.addListener('showWidget', function (params) {\n\n // Just to restyle if needed\n attributesWidget.mainWidget.hideInvitation();\n\n attributesWidget.widgetStatus.next(true);\n\n if (attributesWidget.mode == 'popup') {\n attributesWidget.popupWidget.init(attributesWidget, chatEvents, params);\n\n attributesWidget.viewHandler.removeUnreadIndicator();\n\n attributesWidget.mainWidget.hide();\n } else if (typeof params !== 'undefined' && typeof params.event !== 'undefined') {\n params.event.preventDefault();\n }\n\n chatEvents.sendChildEvent('shownWidget', [{'sender': 'closeButton'}]);\n });\n\n // Add tag listener\n attributesWidget.eventEmitter.addListener('addTag', function (tag) {\n attributesWidget.tag = attributesWidget.tag != '' ? attributesWidget.tag + ',' + tag : tag;\n attributesWidget.eventEmitter.emitEvent('tagAdded');\n });\n\n // Events\n attributesWidget.eventEmitter.addListener('addEvent', function (events) {\n attributesWidget.events = events;\n attributesWidget.eventEmitter.emitEvent('eventAdded');\n });\n\n // Conversions\n attributesWidget.eventEmitter.addListener('addConversion', function (conversion) {\n attributesWidget.conversion = conversion;\n attributesWidget.eventEmitter.emitEvent('conversionAdded');\n });\n\n // Popup open event\n attributesWidget.eventEmitter.addListener('openPopup', function () {\n\n attributesWidget.popupWidget.init(attributesWidget, chatEvents);\n\n attributesWidget.viewHandler.removeUnreadIndicator();\n\n chatEvents.sendChildEvent('shownWidget', [{'sender': 'closeButton'}]);\n\n attributesWidget.widgetStatus.next(false);\n });\n\n // Chat started event received\n // Store chat information if it's not popup mode.\n attributesWidget.eventEmitter.addListener('chatStarted', function (data, mode) {\n\n attributesWidget.widgetDimesions.nextProperty('height_override', null);\n\n if (mode !== 'popup' || attributesWidget.kcw === true) {\n attributesWidget.userSession.setChatInformation(data, attributesWidget.nh && attributesWidget.nh.ap);\n }\n\n if (mode == 'popup') {\n attributesWidget.mainWidget.hide();\n }\n\n // Store information permanently\n if (attributesWidget.fresh === false && (mode !== 'popup' || attributesWidget.kcw === true)) {\n attributesWidget.storageHandler.storeSessionInformation(attributesWidget.userSession.getSessionAttributes());\n }\n });\n\n // Subscribe event\n attributesWidget.eventEmitter.addListener('subscribeEvent', function (data) {\n attributesWidget.chatNotifications.setPublicKey(data.pk, attributesWidget.eventEmitter);\n attributesWidget.chatNotifications.sendNotification();\n });\n\n // User has subscribed to notifications\n // Send back child subscription information\n attributesWidget.eventEmitter.addListener('subcribedEvent', function (data) {\n chatEvents.sendChildEvent('subcribedEvent', [data]);\n });\n\n // Track widget status changes\n attributesWidget.widgetStatus.subscribe((data) => {\n if (attributesWidget.mode !== 'popup') {\n if (attributesWidget.mode !== 'embed') {\n // Do not store open status in local storage because embed is always open\n attributesWidget.storageHandler.setSessionStorage(prefixStorage + '_ws', data);\n }\n chatEvents.sendChildEvent('widgetStatus', [data]);\n }\n });\n\n // Store sound settings\n attributesWidget.toggleSound.subscribe((data) => {\n attributesWidget.storageHandler.setSessionStorage(prefixStorage + '_sound', data);\n });\n\n attributesWidget.onlineStatus.subscribe((data) => {\n chatEvents.sendChildEvent('onlineStatus', [data]);\n });\n\n attributesWidget.eventEmitter.addListener('screenshot', (data) => {\n helperFunctions.makeScreenshot(attributesWidget.staticJS['screenshot'], data);\n });\n\n attributesWidget.eventEmitter.addListener('screenshare', (data) => {\n import('./util/screenShare').then((module) => {\n module.screenShare.setParams((data || {}), attributesWidget, chatEvents);\n });\n });\n\n attributesWidget.eventEmitter.addListener('location', (data) => {\n document.location = data;\n });\n\n attributesWidget.eventEmitter.addListener('terminated', (data) => {\n attributesWidget.terminated = true;\n // Remove legacy dom\n helperFunctions.removeById(attributesWidget.prefixLowercase+'_container_v2');\n helperFunctions.removeById(attributesWidget.prefixLowercase+'_status_widget_v2');\n });\n\n attributesWidget.eventEmitter.addListener('showInvitation', (data) => {\n attributesWidget.widgetDimesions.nextProperty('bottom_override', 75);\n attributesWidget.widgetDimesions.nextProperty('right_override', 75);\n attributesWidget.mainWidget.showInvitation();\n });\n\n attributesWidget.eventEmitter.addListener('hideAction', (data) => {\n attributesWidget.mainWidget.hide();\n });\n\n attributesWidget.eventEmitter.addListener('showAction', (data) => {\n attributesWidget.mainWidget.show();\n });\n\n attributesWidget.eventEmitter.addListener('zoomImage', (data) => {\n import('./util/zoomImage').then((module) => {\n module.zoomImage.setParams((data || {}), attributesWidget, chatEvents);\n });\n });\n\n attributesWidget.eventEmitter.addListener('hideInvitation', (data) => {\n attributesWidget.mainWidget.hideInvitation();\n if (data.full) {\n attributesWidget.eventEmitter.emitEvent('showWidget', [{'sender': 'closeButton'}]);\n attributesWidget.eventEmitter.emitEvent('fullInvitation', [data]);\n } else {\n attributesWidget.eventEmitter.emitEvent('cancelInvitation', []);\n }\n });\n\n attributesWidget.eventEmitter.addListener('msgSnippet', (data) => {\n if (attributesWidget.mode == 'widget' && attributesWidget.widgetStatus.value === false) {\n\n if (data.full_widget) {\n attributesWidget.eventEmitter.emitEvent('showWidget', [{'sender': 'closeButton'}]);\n return;\n }\n\n attributesWidget.position == 'api' && attributesWidget.viewHandler && attributesWidget.viewHandler.show();\n\n import('./lib/widgets/msgSnippetWidget').then((module) => {\n if (!attributesWidget.msgSnippet) {\n attributesWidget.msgSnippet = new module.msgSnippetWidget(attributesWidget.prefixLowercase);\n containerChatObj.cont.elmDom.appendChild(attributesWidget.msgSnippet.cont.constructUI(), !0);\n attributesWidget.msgSnippet.init(attributesWidget, data);\n } else {\n attributesWidget.msgSnippet.showSnippet(data, true);\n }\n attributesWidget.eventEmitter.emitEvent('unread_message',[{otm: 1}]);\n });\n }\n });\n\n attributesWidget.eventEmitter.addListener('unread_message', (data) => {\n if (data && data.msg_body && !attributesWidget.msgSnippet) {\n import('./lib/widgets/msgSnippetWidget').then((module) => {\n if (!attributesWidget.msgSnippet) {\n attributesWidget.msgSnippet = new module.msgSnippetWidget(attributesWidget.prefixLowercase);\n containerChatObj.cont.elmDom.appendChild(attributesWidget.msgSnippet.cont.constructUI(), !0);\n attributesWidget.msgSnippet.init(attributesWidget, data);\n }\n });\n }\n });\n\n attributesWidget.originalTitle = document.title;\n attributesWidget.blinkInterval = null;\n\n attributesWidget.eventEmitter.addListener('change_language', (data) => {\n attributesWidget.lang = data.lng.replace('/', '') + '/';\n });\n\n attributesWidget.eventEmitter.addListener('unread_message_title', (data) => {\n clearInterval(attributesWidget.blinkInterval);\n if (data.status == false) {\n attributesWidget.blinkInterval = setInterval(() => {\n document.title = (Math.round(new Date().getTime() / 1000) % 2) ? '💬 ' + attributesWidget.originalTitle : attributesWidget.originalTitle;\n }, 1000);\n } else {\n attributesWidget.focused = true;\n document.title = attributesWidget.originalTitle;\n }\n });\n\n attributesWidget.eventEmitter.addListener('widgetHeight', (data) => {\n\n if (data.reset_height) {\n attributesWidget.widgetDimesions.nextProperty('height_override', null);\n attributesWidget.widgetDimesions.nextProperty('bottom_override', null);\n attributesWidget.widgetDimesions.nextProperty('right_override', null);\n attributesWidget.widgetDimesions.nextProperty('width_override', null);\n return;\n }\n\n if (data.force_height || data.force_width || data.force_bottom || data.force_right) {\n data.force_height && attributesWidget.widgetDimesions.nextProperty('height_override', data.force_height);\n data.force_width && attributesWidget.widgetDimesions.nextProperty('width_override', data.force_width);\n data.force_right && attributesWidget.widgetDimesions.nextProperty('right_override', data.force_right);\n data.force_bottom && attributesWidget.widgetDimesions.nextProperty('bottom_override', data.force_bottom);\n return;\n }\n\n if (attributesWidget.mode == 'widget' && attributesWidget.isMobile == false) {\n var d = document,\n e = d.documentElement,\n g = d.getElementsByTagName('body')[0],\n y = global.innerHeight || e.clientHeight || g.clientHeight;\n if (parseInt(data.height) > attributesWidget.widgetDimesions.value['height'] && y > parseInt(data.height)) {\n attributesWidget.widgetDimesions.nextProperty('height_override', parseInt(data.height));\n } else if (attributesWidget.widgetDimesions.value['height_override'] && attributesWidget.widgetDimesions.value['height_override'] > y) {\n attributesWidget.widgetDimesions.nextProperty('height_override', null);\n }\n }\n });\n\n var serviceWorkerAvailable = false;\n try {\n serviceWorkerAvailable = ('serviceWorker' in navigator);\n } catch (e) {\n // Worker not available\n }\n\n if (serviceWorkerAvailable === true) {\n try {\n navigator.serviceWorker.addEventListener('message', function (event) {\n try {\n if (typeof event.data.lhc_ch !== 'undefined' && typeof event.data.lhc_cid !== 'undefined') {\n attributesWidget.widgetStatus.next(true);\n if (attributesWidget.mode == 'popup') {\n attributesWidget.userSession.setChatInformation({\n 'id': event.data.lhc_cid,\n 'hash': event.data.lhc_ch\n });\n attributesWidget.eventEmitter.emitEvent('unread_message');\n } else {\n chatEvents.sendChildEvent('shownWidget', [{'sender': 'closeButton'}]);\n chatEvents.sendChildEvent('reopenNotification', [{\n 'id': event.data.lhc_cid,\n 'hash': event.data.lhc_ch\n }]);\n }\n }\n } catch (e) {\n if (lhcError) lhcError.log(e.message, \"index.js\", e.lineNumber || e.line, e.stack); else throw Error(\"lhc : \" + e.message);\n }\n });\n } catch (e) {\n // Ignore sandbox error\n }\n }\n\n // Listed for post messages\n const handleMessages = (e) => {\n\n if (attributesWidget.terminated === true || typeof e.data !== 'string' || e.data.indexOf(attributesWidget.prefixLowercase + '::')) {\n return;\n }\n\n const parts = e.data.split('::');\n\n if (typeof e.origin !== 'undefined' && e.origin != 'about:') {\n var originDomain = e.origin.replace(\"http://\", \"\").replace(\"https://\", \"\").replace(/:(\\d+)$/, '');\n\n // We allow to send events only from chat installation or page where script is embeded.\n if (originDomain !== document.domain && attributesWidget.domain_lhc !== originDomain && parts[1] !== 'started' && parts[1] !== 'isstarted') {\n return;\n }\n }\n\n if (parts[1] == 'ready') {\n\n chatEvents.sendReadyEvent(parts[2] == 'true');\n\n if (attributesWidget.storageHandler.getSessionStorage(prefixStorage + '_screenshare')) {\n attributesWidget.eventEmitter.emitEvent('screenshare', [{'auto_start': true}]);\n }\n\n const focusChangeCb = (e) => {\n const focused = e.type === \"focus\";\n attributesWidget.focused = focused;\n chatEvents.sendChildEvent('focus_changed', [{'status': focused}]);\n };\n\n window.addEventListener('focus', focusChangeCb);\n window.addEventListener('blur', focusChangeCb);\n window.addEventListener('pageshow', focusChangeCb);\n window.addEventListener('pagehide', focusChangeCb);\n\n // App is fully loaded\n lhc.loaded = true;\n\n chatEvents.sendChildEvent('ext_modules', [attributesWidget.staticJS['ex_cb_js']]);\n\n // send child commands if there is any\n attributesWidget.childExtCommands.forEach((params) => {\n chatEvents.sendChildEvent(params['cmd'], [params['arg']], 'lhc_load_ext');\n });\n\n // send child commands if there is any\n attributesWidget.childCommands.forEach((params) => {\n chatEvents.sendChildEvent(params['cmd'], [params['arg']]);\n });\n\n if (attributesWidget.react_attr !== null) {\n attributesWidget.react_attr.forEach(item => {\n chatEvents.sendChildEvent('attr_set',[{\n 'type':'attr_set','attr': item['k'],\n data : item['v']\n }]);\n })\n }\n\n } else if (parts[1] == 'ready_popup') {\n attributesWidget.popupWidget.sendParameters(chatEvents);\n } else if (parts[1] == 'isstarted') {\n // Parent window has LHC, terminate present instance\n attributesWidget.eventEmitter.emitEvent('terminated', []);\n } else if (parts[1] == 'started') {\n if (attributesWidget.hide_parent) {\n attributesWidget.eventEmitter.emitEvent('terminated', []);\n } else {\n e.source.postMessage('lhc::isstarted','*');\n }\n } else {\n attributesWidget.eventEmitter.emitEvent(parts[1], JSON.parse(parts[2]));\n }\n };\n\n if (window.addEventListener) {\n window.addEventListener(\"message\", handleMessages, false);\n } else if (window.attachEvent) {\n window.attachEvent(\"onmessage\", handleMessages);\n } else if (document.attachEvent) {\n document.attachEvent(\"onmessage\", handleMessages);\n }\n };\n\n var preInit = () => {\n\n // Avoid multiple times execution\n if (lhc.ready === true) {\n return;\n }\n\n // we have found document body so we can continue\n if (document.body) {\n lhc.ready = true;\n }\n\n lhc.init = init;\n\n if (LHC_API.args.before_init) {\n LHC_API.args.before_init(lhc);\n }\n\n LHC_API.args.manual_init || init();\n };\n\n const eventsHandler = require('./util/domEventsHandler').domEventsHandler;\n\n (preInit(), !lhc.ready) || (eventsHandler.listen(document, \"DOMContentLoaded\", function () {\n preInit();\n }, \"domloaded\"),\n eventsHandler.listen(document, \"readystatechange\", function () {\n (\"complete\" === document.readyState || \"interactive\" === document.readyState && document.body) && preInit();\n }, \"domstatechange\"),\n eventsHandler.listen(global, \"load\", function () {\n preInit();\n }, \"windowload\"));\n\n }).call(this, global['$_' + scopeScript], global[scopeScript + '_API']);\n\n } catch (e) {\n if (lhcError) lhcError.log(e.message, \"index.js\", e.lineNumber || e.line, e.stack); else throw Error(\"lhc : \" + e.message);\n }\n\n})(window);"],"names":["rawAsap","freeTasks","pendingErrors","requestErrorThrow","makeRequestCallFromTimer","length","shift","asap","task","rawTask","pop","RawTask","this","module","exports","prototype","call","error","onerror","push","queue","requestFlush","index","flush","currentIndex","scan","newLength","toggle","observer","node","scope","g","self","BrowserMutationObserver","MutationObserver","WebKitMutationObserver","callback","timeoutHandle","setTimeout","handleTimer","intervalHandle","setInterval","clearTimeout","clearInterval","document","createTextNode","observe","characterData","data","_setPrototypeOf","o","p","Object","setPrototypeOf","__proto__","_possibleConstructorReturn","TypeError","ReferenceError","_getPrototypeOf","getPrototypeOf","UIConstructorIframe","subClass","superClass","create","constructor","value","writable","configurable","defineProperty","elementId","style","attributes","tagname","documentRef","bodyId","dir","cl","header","elmDomDoc","helperFunctions","elmDom","getElementsByTagName","innerHTML","body","id","html","setAttribute","nodeDoctype","implementation","createDocumentType","doctype","replaceChild","insertBefore","childNodes","e","console","log","insertCssFile","insertContent","tmpl","UIConsturctor","f","tagName","classNames","keys","forEach","attr","a","className","join","cssText","c","d","k","getElementById","split","domEventsHandler","restyle","reset","createDocumentFragment","type","settings","appendChild","styleSheet","nodeValue","elm","href","createElement","b","rel","crossOrigin","src","async","loadcb","onload","key","hasOwnProperty","chatNotifications","_chatNotifications","isNotificationsSubscribed","applicationServerPublicKey","eventEmitter","publicKey","that","swRegistration","navigator","window","Notification","permission","requestPermission","alert","serviceWorker","register","then","swReg","pushManager","getSubscription","subscription","applicationServerKey","base64String","base64","repeat","replace","rawData","atob","outputArray","Uint8Array","i","charCodeAt","urlB64ToUint8Array","subscribe","getKey","token","contentEncoding","PushManager","supportedContentEncodings","payload","JSON","stringify","endpoint","btoa","String","fromCharCode","apply","authToken","emitEvent","updateSubscriptionOnServer","_helperFunctions","s","contentWindow","contentDocument","EId","EObj","parentNode","removeChild","Intl","DateTimeFormat","resolvedOptions","timeZone","Date","stdTimezoneOffset","jan","getFullYear","jul","Math","max","getTimezoneOffset","dst","today","params","outline","visibility","resize","boxshadow","overflow","background","opacity","top","right","bottom","left","position","border","minheight","minwidth","maxheight","maxwidth","padding","margin","transition","transform","width","height","display","zindex","backgroundcolor","cursor","borderRadius","element","classList","contains","match","RegExp","add","hasClass","remove","screenshot","url","html2canvas","th","onreadystatechange","makeScreenshot","canvas","xhr","XMLHttpRequest","open","setRequestHeader","send","encodeURIComponent","toDataURL","err","item","pairs","request","urlRequest","makeQuery","readyState","status","parse","responseText","message","req","containerChat","prefix","pnode","cont","constructUI","mainWidget","units","originalCSS","bottom_override","isLoaded","loadStatus","main","css","restyleStyle","position_placement","mode","fscreen","massRestyle","wloaded","next","isMobile","constructUIIframe","staticJS","hhtml","cont_ss","lazyLoad","makeContent","getSessionAttributes","bootstrap","toggleVisibilityWrap","toggleVisibility","widgetStatus","monitorDimensionsWrap","monitorDimensions","widgetDimesions","valueInternal","screenAttributesUpdate","innerHeight","nextPropertySilent","innerWidth","callListeners","addEventListener","addListener","insertCssRemoteFile","theme","LHC_API","args","lhc_base_url","theme_v","checkLoadStatus","insertJSFile","prefixLowercase","hide","show","width_override","width_soverride","height_override","height_soverride","wbottom","clinst","right_override","wright_inv","wright","mainWidgetPopup","freeup","argumentsQuery","Array","paramsReturn","LHCChatOptions","name","encrypted","size","attr_prefill","attr_prefill_admin","chatEvents","paramsPopup","elementReferrerPopup","closed","event","preventDefault","focus","urlArgumetns","storageHandler","cookieEnabled","toggleSound","setSessionStorage","fontSize","getLocalStorage","parseInt","getSessionReferrer","parseOptions","dualScreenLeft","undefined","screenLeft","screenX","dualScreenTop","screenTop","screenY","documentElement","clientWidth","screen","clientHeight","systemZoom","availWidth","paramsWindow","newWin","needWindow","windowCreated","location","viewHandler","kcw","sendChildEvent","sendParameters","js_vars","js_args","currentVar","eval","var","statusWidget","controlMode","showDelay","statusDelayProcessed","font","widget","shidden","lload","unread_counter","onlineStatus","icon","leaveMessage","sload","placement","sbottom","sright","_inst","attachUserEventListener","offline_redirect","toggleOfflineIcon","chatParams","unreadMessagesNumber","getSessionStorage","unreadTotal","otm","showUnreadIndicator","init","isNaN","now","removeUnreadIndicator","number","iconText","iconValue","innerText","removeSessionStorage","hideOffline","chatEventsHandler","getJSVarsValues","jsVars","prefillOptions","fieldsCustom","prefilOptionsList","concat","getPrefillVars","command","postMessage","isIE","popupWidget","popup","getInitAttributes","sendChildCommand","_domEventsHandler","events","object","dispatch","getEvent","attachEvent","eventName","presentEvent","removeEventHandler","eventListener","listener","removeEventListener","detachEvent","eventInstance","_this","caller","arguments","Event","monitoredVariable","listeners","val","indexOf","splice","global","domain","cookiesSupportChecked","checkCookiesSupport","secureCookie","cookiePerPage","hasSessionStorage","sessionStorage","hasLocalStorage","localStorage","cookie","coookieName","cookieValue","expireTime","string","setTime","getTime","toGMTString","cookieName","baseCookie","charAt","substring","host","hostname","setItem","removeItem","getItem","ref","sessionInformation","getHTTPCookie","parseSessionInformation","setHTTPCookie","getStoreValue","getCookieDomain","content","contentReturn","parts","unescape","userSession","vid","hnh","hash","updateVarsTimeout","decode","evalJSON","str","$","parseJSON","toJSON","encode","cb","lhc_var","validator","set","obj","prop","updateJSVars","Proxy","lhc_var_prefill","getAppendVariables","varsReturn","varsSet","getVars","jsVarData","append","vars","varsJSON","alwaysPersistentNeedHelp","round","appleIphone","appleIpod","appleTablet","appleUniversal","androidPhone","androidTablet","amazonPhone","amazonTablet","windowsPhone","windowsTablet","otherBlackBerry","otherBlackBerry10","otherOpera","otherChrome","otherFirefox","isAppleTabletOnIos13","platform","maxTouchPoints","MSStream","param","nav","userAgent","tmp","regex","test","createMatch","result","apple","phone","ipod","tablet","universal","device","amazon","android","windows","other","blackberry","blackberry10","opera","firefox","chrome","any","noop","LAST_ERROR","IS_ERROR","Promise","fn","_U","_V","_W","_X","doResolve","handle","deferred","_Y","onFulfilled","onRejected","ret","ex","tryCallOne","reject","promise","resolve","handleResolved","newValue","getThen","finale","bind","_Z","Handler","done","res","reason","tryCallTwo","_0","safeThen","TRUE","valuePromise","FALSE","NULL","UNDEFINED","ZERO","EMPTYSTRING","iterableToArray","iterable","from","x","slice","all","arr","remaining","race","values","finally","denodeify","argumentCount","Infinity","callbackFn","Function","denodeifyWithCount","fnLength","map","_","denodeifyWithoutCount","nodeify","ctx","enableSynchronous","isPending","getState","isFulfilled","isRejected","getValue","Error","getReason","disableSynchronous","EventEmitter","proto","originalGlobalValue","indexOfListener","alias","isValidListener","getListeners","evt","response","_getEvents","flattenListeners","flatListeners","getListenersAsObject","listenerIsWrapped","once","on","addOnceListener","defineEvent","defineEvents","evts","removeListener","off","addListeners","manipulateListeners","removeListeners","single","multiple","removeEvent","_events","removeAllListeners","listenersMap","_getOnceReturnValue","trigger","emit","setOnceReturnValue","_onceReturnValue","noConflict","_classCallCheck","instance","Constructor","_defineProperties","target","props","descriptor","enumerable","_createClass","protoProps","staticProps","_typeof","Symbol","iterator","__webpack_module_cache__","inProgress","dataWebpackPrefix","__webpack_require__","moduleId","cachedModule","__webpack_modules__","m","n","getter","__esModule","definition","get","chunkId","reduce","promises","u","globalThis","l","script","needAttach","scripts","getAttribute","charset","timeout","nc","origin","onScriptComplete","prev","doneFns","head","r","toStringTag","installedChunks","j","installedChunkData","errorType","realSrc","webpackJsonpCallback","parentChunkLoadingFunction","chunkIds","moreModules","runtime","some","chunkLoadingGlobal","currentScript","scopeScript","lhcError","filename","lineNumber","stack","column","file","line","lineno","colno","lhc","loaded","connected","ready","version","require","default","BehaviorSubject","mobile_view","toLowerCase","prefixStorage","scope_storage","cookieEnabledUser","cookie_enabled","userMode","orig","proactive","check_messages","cookie_per_page","setCookiePerPage","referrer","substr","protocol","setSessionReferer","languageOverride","lang","attributesWidget","terminated","prefixScope","msgSnippet","react_attr","hide_parent","hide_iframe","hide_status","msgsnippet_status","toUpperCase","assign","fresh","popupDimesnions","pheight","pwidth","leaveamessage","department","dep_default","product","domain_lhc","instance_id","profile_pic","base_url","tag","status_delay","captcha","focused","identifier","proactive_interval","langOverride","subject_id","bot_id","trigger_id","priority","conversion","survey","operator","phash","pvhash","nh","init_calls","childCommands","childExtCommands","wwidth","wheight","setAttributes","setSessionInformation","getSessionInformation","setSessionReferrer","containerChatObj","embedWrapper","getArguments","UUID","getVID","getTzOffset","title","showNeedHelp","needhelpWidget","showProactive","proactiveChat","setParams","makeRequest","wv","terminate","chat_ui","isOnline","parent","__webpack_public_path__","chunks_location","secure_cookie","setSecureCookie","setCookieDomain","siteaccess","static","pdim","survey_id","cont_css","wposition","ts","hash_ts","setVID","storeSessionInformation","nextProperty","mobile_popup","sound_enabled","check_status","activityMonitoring","track_mouse","track_activity","ga","analyticEvents","ap","setupVarsMonitoring","prefillVars","ll","disable_proactive","extension","nodeJSChat","removeById","po","getHours","getMinutes","sessionAtrribute","setChatInformation","hideInvitation","setPublicKey","pk","sendNotification","screenShare","showInvitation","zoomImage","full","full_widget","showSnippet","msgSnippetWidget","msg_body","originalTitle","blinkInterval","lng","reset_height","force_height","force_width","force_bottom","force_right","y","serviceWorkerAvailable","lhc_ch","lhc_cid","handleMessages","originDomain","sendReadyEvent","focusChangeCb","source","preInit","before_init","manual_init","eventsHandler","listen"],"sourceRoot":""} \ No newline at end of file diff --git a/lhc_web/design/defaulttheme/widget/wrapper/src/index.js b/lhc_web/design/defaulttheme/widget/wrapper/src/index.js index 95b7bb9290..e3fb6609a9 100644 --- a/lhc_web/design/defaulttheme/widget/wrapper/src/index.js +++ b/lhc_web/design/defaulttheme/widget/wrapper/src/index.js @@ -55,7 +55,7 @@ lhc.loaded = false; lhc.connected = false; lhc.ready = false; - lhc.version = 207; + lhc.version = 208; const isMobileItem = require('ismobilejs'); var isMobile = isMobileItem.default(global.navigator.userAgent).phone; @@ -175,6 +175,7 @@ base_url: LHC_API.args.lhc_base_url, mode: LHC_API.args.mode || 'widget', tag: LHC_API.args.tag || '', + status_delay: LHC_API.args.status_delay || 0, proactive: {}, captcha: null, focused: true, @@ -417,6 +418,10 @@ attributesWidget.hhtml = data.chat_ui.hhtml; } + if (data.chat_ui.status_delay) { + attributesWidget.status_delay = data.chat_ui.status_delay; + } + if (data.chat_ui.kcw) { attributesWidget.kcw = true; } diff --git a/lhc_web/design/defaulttheme/widget/wrapper/src/lib/widgets/needhelpWidget.js b/lhc_web/design/defaulttheme/widget/wrapper/src/lib/widgets/needhelpWidget.js index 63d6554a51..c4b1ef5995 100644 --- a/lhc_web/design/defaulttheme/widget/wrapper/src/lib/widgets/needhelpWidget.js +++ b/lhc_web/design/defaulttheme/widget/wrapper/src/lib/widgets/needhelpWidget.js @@ -150,7 +150,7 @@ export class needhelpWidget{ } }); - }, settings.delay); + }, settings.delay + this.attributes['status_delay']); attributes.eventEmitter.addListener('reloadWidget',() => { this.cont.insertCssRemoteFile({onload: () => {this.loadStatus['theme'] = true; this.checkLoadStatus()}, id : "lhc-theme-needhelp", crossOrigin : "anonymous", href : this.attributes.LHC_API.args.lhc_base_url + '/widgetrestapi/themeneedhelp/' + this.attributes.theme + '?v=' + Date.now()}, true); diff --git a/lhc_web/design/defaulttheme/widget/wrapper/src/lib/widgets/statusWidget.js b/lhc_web/design/defaulttheme/widget/wrapper/src/lib/widgets/statusWidget.js index e13e73c251..9ecb3ffe23 100644 --- a/lhc_web/design/defaulttheme/widget/wrapper/src/lib/widgets/statusWidget.js +++ b/lhc_web/design/defaulttheme/widget/wrapper/src/lib/widgets/statusWidget.js @@ -7,6 +7,8 @@ export class statusWidget{ this.attributes = {}; this.controlMode = false; + this.showDelay = null; + this.statusDelayProcessed = false; this.cont = new UIConstructorIframe((prefix || 'lhc')+'_status_widget_v2', helperFunctions.getAbstractStyle({ zindex: "2147483640", @@ -205,6 +207,8 @@ export class statusWidget{ } } + clearTimeout(this.showDelay); + this.statusDelayProcessed = true; this.cont.hide(); } @@ -250,7 +254,16 @@ export class statusWidget{ // show status icon only if we are not in api mode or chat is going now if (this.attributes['position'] != 'api' || (this.attributes['position'] == 'api' && this.attributes['hide_status'] !== true && chatParams['id'] && chatParams['hash'])) { - this.cont.show(); + + clearTimeout(this.showDelay); + + const chatParams = this.attributes['userSession'].getSessionAttributes(); + + this.showDelay = setTimeout(() => { + this.cont.show(); + this.statusDelayProcessed = true; + }, (this.statusDelayProcessed == true || (chatParams['id'] && chatParams['hash'])) ? 0 : this.attributes['status_delay']); + } else if (this.attributes.clinst === true) { if (this.attributes.widgetStatus.value != true) { this.cont.hide(); diff --git a/lhc_web/design/defaulttheme/widget/wrapper/src/util/proactiveChat.js b/lhc_web/design/defaulttheme/widget/wrapper/src/util/proactiveChat.js index 157a92a1e7..789f6b1bd5 100644 --- a/lhc_web/design/defaulttheme/widget/wrapper/src/util/proactiveChat.js +++ b/lhc_web/design/defaulttheme/widget/wrapper/src/util/proactiveChat.js @@ -174,7 +174,7 @@ class _proactiveChat { const params = {'vid_id' : data.vid_id, 'invitation' : data.invitation, 'inject_html' : data.inject_html, 'qinv' : data.qinv}; setTimeout(() => { this.showInvitation(params, init); - }, this.attributes.widgetStatus.value === true ? 0 : (data.delay || 0)); + }, this.attributes.widgetStatus.value === true ? 0 : (data.delay ? data.delay + this.attributes['status_delay'] : this.attributes['status_delay'])); } else { if (this.attributes.LHC_API.args.check_messages) { this.checkMessageTimeout = setTimeout(() => { diff --git a/lhc_web/modules/lhwidgetrestapi/settings.php b/lhc_web/modules/lhwidgetrestapi/settings.php index c366f48991..89403bdae2 100644 --- a/lhc_web/modules/lhwidgetrestapi/settings.php +++ b/lhc_web/modules/lhwidgetrestapi/settings.php @@ -227,6 +227,8 @@ $pageCSS = false; +$outputResponse['chat_ui']['status_delay'] = 0; + if (isset($outputResponse['theme'])) { $theme = erLhAbstractModelWidgetTheme::fetch($outputResponse['theme']); @@ -246,6 +248,10 @@ $outputResponse['chat_ui']['wwidth'] = (int)$theme->bot_configuration_array['wwidth']; } + if ($theme->show_status_delay > 0) { + $outputResponse['chat_ui']['status_delay'] = (int)$theme->show_status_delay * 1000; + } + if (isset($theme->bot_configuration_array['wheight']) && $theme->bot_configuration_array['wheight'] > 0) { $outputResponse['chat_ui']['wheight'] = (int)$theme->bot_configuration_array['wheight']; } @@ -493,7 +499,7 @@ $ts = time(); // Wrapper version -$outputResponse['wv'] = 207; +$outputResponse['wv'] = 208; // React APP versions $outputResponse['v'] = 269;