indigitall-web-chat 1.3.1 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/web-chat.js +1 -1
package/package.json
CHANGED
package/web-chat.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see web-chat.js.LICENSE.txt */
|
|
2
|
-
(()=>{var __webpack_modules__={1962:e=>{function t(){}e.exports=function(e,n,o){var r=!1;return o=o||t,i.count=e,0===e?n():i;function i(e,t){if(i.count<=0)throw new Error("after called too many times");--i.count,e?(r=!0,n(e),n=o):0!==i.count||r||n(null,t)}}},1042:e=>{e.exports=function(e,t,n){var o=e.byteLength;if(t=t||0,n=n||o,e.slice)return e.slice(t,n);if(t<0&&(t+=o),n<0&&(n+=o),n>o&&(n=o),t>=o||t>=n||0===o)return new ArrayBuffer(0);for(var r=new Uint8Array(e),i=new Uint8Array(n-t),s=t,a=0;s<n;s++,a++)i[a]=r[s];return i.buffer}},9145:e=>{function t(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}e.exports=t,t.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-n:e+n}return 0|Math.min(e,this.max)},t.prototype.reset=function(){this.attempts=0},t.prototype.setMin=function(e){this.ms=e},t.prototype.setMax=function(e){this.max=e},t.prototype.setJitter=function(e){this.jitter=e}},5733:(e,t)=>{!function(e){"use strict";t.encode=function(t){var n,o=new Uint8Array(t),r=o.length,i="";for(n=0;n<r;n+=3)i+=e[o[n]>>2],i+=e[(3&o[n])<<4|o[n+1]>>4],i+=e[(15&o[n+1])<<2|o[n+2]>>6],i+=e[63&o[n+2]];return r%3==2?i=i.substring(0,i.length-1)+"=":r%3==1&&(i=i.substring(0,i.length-2)+"=="),i},t.decode=function(t){var n,o,r,i,s,a=.75*t.length,c=t.length,l=0;"="===t[t.length-1]&&(a--,"="===t[t.length-2]&&a--);var u=new ArrayBuffer(a),p=new Uint8Array(u);for(n=0;n<c;n+=4)o=e.indexOf(t[n]),r=e.indexOf(t[n+1]),i=e.indexOf(t[n+2]),s=e.indexOf(t[n+3]),p[l++]=o<<2|r>>4,p[l++]=(15&r)<<4|i>>2,p[l++]=(3&i)<<6|63&s;return u}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")},7108:e=>{var t=void 0!==t?t:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder&&MozBlobBuilder,n=function(){try{return 2===new Blob(["hi"]).size}catch(e){return!1}}(),o=n&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(e){return!1}}(),r=t&&t.prototype.append&&t.prototype.getBlob;function i(e){return e.map((function(e){if(e.buffer instanceof ArrayBuffer){var t=e.buffer;if(e.byteLength!==t.byteLength){var n=new Uint8Array(e.byteLength);n.set(new Uint8Array(t,e.byteOffset,e.byteLength)),t=n.buffer}return t}return e}))}function s(e,n){n=n||{};var o=new t;return i(e).forEach((function(e){o.append(e)})),n.type?o.getBlob(n.type):o.getBlob()}function a(e,t){return new Blob(i(e),t||{})}"undefined"!=typeof Blob&&(s.prototype=Blob.prototype,a.prototype=Blob.prototype),e.exports=n?o?Blob:a:r?s:void 0},8821:e=>{var t=[].slice;e.exports=function(e,n){if("string"==typeof n&&(n=e[n]),"function"!=typeof n)throw new Error("bind() requires a function");var o=t.call(arguments,2);return function(){return n.apply(e,o.concat(t.call(arguments)))}}},292:e=>{e.exports=function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},2751:function(e,t,n){var o;e.exports=o=o||function(e,t){var o;if("undefined"!=typeof window&&window.crypto&&(o=window.crypto),!o&&"undefined"!=typeof window&&window.msCrypto&&(o=window.msCrypto),!o&&void 0!==n.g&&n.g.crypto&&(o=n.g.crypto),!o)try{o=n(Object(function(){var e=new Error("Cannot find module 'crypto'");throw e.code="MODULE_NOT_FOUND",e}()))}catch(e){}var r=function(){if(o){if("function"==typeof o.getRandomValues)try{return o.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof o.randomBytes)try{return o.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),s={},a=s.lib={},c=a.Base={extend:function(e){var t=i(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},l=a.WordArray=c.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||p).stringify(this)},concat:function(e){var t=this.words,n=e.words,o=this.sigBytes,r=e.sigBytes;if(this.clamp(),o%4)for(var i=0;i<r;i++){var s=n[i>>>2]>>>24-i%4*8&255;t[o+i>>>2]|=s<<24-(o+i)%4*8}else for(i=0;i<r;i+=4)t[o+i>>>2]=n[i>>>2];return this.sigBytes+=r,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=c.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(r());return new l.init(t,e)}}),u=s.enc={},p=u.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,o=[],r=0;r<n;r++){var i=t[r>>>2]>>>24-r%4*8&255;o.push((i>>>4).toString(16)),o.push((15&i).toString(16))}return o.join("")},parse:function(e){for(var t=e.length,n=[],o=0;o<t;o+=2)n[o>>>3]|=parseInt(e.substr(o,2),16)<<24-o%8*4;return new l.init(n,t/2)}},d=u.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,o=[],r=0;r<n;r++){var i=t[r>>>2]>>>24-r%4*8&255;o.push(String.fromCharCode(i))}return o.join("")},parse:function(e){for(var t=e.length,n=[],o=0;o<t;o++)n[o>>>2]|=(255&e.charCodeAt(o))<<24-o%4*8;return new l.init(n,t)}},h=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(d.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return d.parse(unescape(encodeURIComponent(e)))}},f=a.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=h.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,o=this._data,r=o.words,i=o.sigBytes,s=this.blockSize,a=i/(4*s),c=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,u=e.min(4*c,i);if(c){for(var p=0;p<c;p+=s)this._doProcessBlock(r,p);n=r.splice(0,c),o.sigBytes-=u}return new l.init(n,u)},clone:function(){var e=c.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),g=(a.Hasher=f.extend({cfg:c.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new g.HMAC.init(e,n).finalize(t)}}}),s.algo={});return s}(Math)},6948:function(e,t,n){var o;e.exports=(o=n(2751),n(6846),n(5498),o.HmacSHA256)},5498:function(e,t,n){var o,r,i;e.exports=(r=(o=n(2751)).lib.Base,i=o.enc.Utf8,void(o.algo.HMAC=r.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=i.parse(t));var n=e.blockSize,o=4*n;t.sigBytes>o&&(t=e.finalize(t)),t.clamp();for(var r=this._oKey=t.clone(),s=this._iKey=t.clone(),a=r.words,c=s.words,l=0;l<n;l++)a[l]^=1549556828,c[l]^=909522486;r.sigBytes=s.sigBytes=o,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,n=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(n))}})))},6846:function(e,t,n){var o;e.exports=(o=n(2751),function(e){var t=o,n=t.lib,r=n.WordArray,i=n.Hasher,s=t.algo,a=[],c=[];!function(){function t(t){for(var n=e.sqrt(t),o=2;o<=n;o++)if(!(t%o))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var o=2,r=0;r<64;)t(o)&&(r<8&&(a[r]=n(e.pow(o,.5))),c[r]=n(e.pow(o,1/3)),r++),o++}();var l=[],u=s.SHA256=i.extend({_doReset:function(){this._hash=new r.init(a.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,o=n[0],r=n[1],i=n[2],s=n[3],a=n[4],u=n[5],p=n[6],d=n[7],h=0;h<64;h++){if(h<16)l[h]=0|e[t+h];else{var f=l[h-15],g=(f<<25|f>>>7)^(f<<14|f>>>18)^f>>>3,y=l[h-2],m=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;l[h]=g+l[h-7]+m+l[h-16]}var M=o&r^o&i^r&i,b=(o<<30|o>>>2)^(o<<19|o>>>13)^(o<<10|o>>>22),v=d+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&u^~a&p)+c[h]+l[h];d=p,p=u,u=a,a=s+v|0,s=i,i=r,r=o,o=v+(b+M)|0}n[0]=n[0]+o|0,n[1]=n[1]+r|0,n[2]=n[2]+i|0,n[3]=n[3]+s|0,n[4]=n[4]+a|0,n[5]=n[5]+u|0,n[6]=n[6]+p|0,n[7]=n[7]+d|0},_doFinalize:function(){var t=this._data,n=t.words,o=8*this._nDataBytes,r=8*t.sigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=e.floor(o/4294967296),n[15+(r+64>>>9<<4)]=o,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=i._createHelper(u),t.HmacSHA256=i._createHmacHelper(u)}(Math),o.SHA256)},7705:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,o,r,i=e[1]||"",s=e[3];if(!s)return i;if(t&&"function"==typeof btoa){var a=(n=s,o=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),"/*# ".concat(r," */")),c=s.sources.map((function(e){return"/*# sourceURL=".concat(s.sourceRoot||"").concat(e," */")}));return[i].concat(c).concat([a]).join("\n")}return[i].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,o){"string"==typeof e&&(e=[[null,e,""]]);var r={};if(o)for(var i=0;i<this.length;i++){var s=this[i][0];null!=s&&(r[s]=!0)}for(var a=0;a<e.length;a++){var c=[].concat(e[a]);o&&r[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),t.push(c))}},t}},8678:e=>{e.exports="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")()},7409:(e,t,n)=>{e.exports=n(2477),e.exports.parser=n(5570)},2477:(e,t,n)=>{var o=n(8047),r=n(2420),i=n(986)("engine.io-client:socket"),s=n(8486),a=n(5570),c=n(9026),l=n(5877);function u(e,t){if(!(this instanceof u))return new u(e,t);t=t||{},e&&"object"==typeof e&&(t=e,e=null),e?(e=c(e),t.hostname=e.host,t.secure="https"===e.protocol||"wss"===e.protocol,t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=c(t.host).host),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.agent=t.agent||!1,this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?443:80),this.query=t.query||{},"string"==typeof this.query&&(this.query=l.decode(this.query)),this.upgrade=!1!==t.upgrade,this.path=(t.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!t.forceJSONP,this.jsonp=!1!==t.jsonp,this.forceBase64=!!t.forceBase64,this.enablesXDR=!!t.enablesXDR,this.withCredentials=!1!==t.withCredentials,this.timestampParam=t.timestampParam||"t",this.timestampRequests=t.timestampRequests,this.transports=t.transports||["polling","websocket"],this.transportOptions=t.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=t.policyPort||843,this.rememberUpgrade=t.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=t.onlyBinaryUpgrades,this.perMessageDeflate=!1!==t.perMessageDeflate&&(t.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=t.pfx||null,this.key=t.key||null,this.passphrase=t.passphrase||null,this.cert=t.cert||null,this.ca=t.ca||null,this.ciphers=t.ciphers||null,this.rejectUnauthorized=void 0===t.rejectUnauthorized||t.rejectUnauthorized,this.forceNode=!!t.forceNode,this.isReactNative="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),("undefined"==typeof self||this.isReactNative)&&(t.extraHeaders&&Object.keys(t.extraHeaders).length>0&&(this.extraHeaders=t.extraHeaders),t.localAddress&&(this.localAddress=t.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}e.exports=u,u.priorWebsocketSuccess=!1,r(u.prototype),u.protocol=a.protocol,u.Socket=u,u.Transport=n(8664),u.transports=n(8047),u.parser=n(5570),u.prototype.createTransport=function(e){i('creating transport "%s"',e);var t=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}(this.query);t.EIO=a.protocol,t.transport=e;var n=this.transportOptions[e]||{};return this.id&&(t.sid=this.id),new o[e]({query:t,socket:this,agent:n.agent||this.agent,hostname:n.hostname||this.hostname,port:n.port||this.port,secure:n.secure||this.secure,path:n.path||this.path,forceJSONP:n.forceJSONP||this.forceJSONP,jsonp:n.jsonp||this.jsonp,forceBase64:n.forceBase64||this.forceBase64,enablesXDR:n.enablesXDR||this.enablesXDR,withCredentials:n.withCredentials||this.withCredentials,timestampRequests:n.timestampRequests||this.timestampRequests,timestampParam:n.timestampParam||this.timestampParam,policyPort:n.policyPort||this.policyPort,pfx:n.pfx||this.pfx,key:n.key||this.key,passphrase:n.passphrase||this.passphrase,cert:n.cert||this.cert,ca:n.ca||this.ca,ciphers:n.ciphers||this.ciphers,rejectUnauthorized:n.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:n.perMessageDeflate||this.perMessageDeflate,extraHeaders:n.extraHeaders||this.extraHeaders,forceNode:n.forceNode||this.forceNode,localAddress:n.localAddress||this.localAddress,requestTimeout:n.requestTimeout||this.requestTimeout,protocols:n.protocols||void 0,isReactNative:this.isReactNative})},u.prototype.open=function(){var e;if(this.rememberUpgrade&&u.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length){var t=this;return void setTimeout((function(){t.emit("error","No transports available")}),0)}e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(e){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)},u.prototype.setTransport=function(e){i("setting transport %s",e.name);var t=this;this.transport&&(i("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",(function(){t.onDrain()})).on("packet",(function(e){t.onPacket(e)})).on("error",(function(e){t.onError(e)})).on("close",(function(){t.onClose("transport close")}))},u.prototype.probe=function(e){i('probing transport "%s"',e);var t=this.createTransport(e,{probe:1}),n=!1,o=this;function r(){if(o.onlyBinaryUpgrades){var r=!this.supportsBinary&&o.transport.supportsBinary;n=n||r}n||(i('probe transport "%s" opened',e),t.send([{type:"ping",data:"probe"}]),t.once("packet",(function(r){if(!n)if("pong"===r.type&&"probe"===r.data){if(i('probe transport "%s" pong',e),o.upgrading=!0,o.emit("upgrading",t),!t)return;u.priorWebsocketSuccess="websocket"===t.name,i('pausing current transport "%s"',o.transport.name),o.transport.pause((function(){n||"closed"!==o.readyState&&(i("changing transport and sending upgrade packet"),d(),o.setTransport(t),t.send([{type:"upgrade"}]),o.emit("upgrade",t),t=null,o.upgrading=!1,o.flush())}))}else{i('probe transport "%s" failed',e);var s=new Error("probe error");s.transport=t.name,o.emit("upgradeError",s)}})))}function s(){n||(n=!0,d(),t.close(),t=null)}function a(n){var r=new Error("probe error: "+n);r.transport=t.name,s(),i('probe transport "%s" failed because of error: %s',e,n),o.emit("upgradeError",r)}function c(){a("transport closed")}function l(){a("socket closed")}function p(e){t&&e.name!==t.name&&(i('"%s" works - aborting "%s"',e.name,t.name),s())}function d(){t.removeListener("open",r),t.removeListener("error",a),t.removeListener("close",c),o.removeListener("close",l),o.removeListener("upgrading",p)}u.priorWebsocketSuccess=!1,t.once("open",r),t.once("error",a),t.once("close",c),this.once("close",l),this.once("upgrading",p),t.open()},u.prototype.onOpen=function(){if(i("socket open"),this.readyState="open",u.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){i("starting upgrade probes");for(var e=0,t=this.upgrades.length;e<t;e++)this.probe(this.upgrades[e])}},u.prototype.onPacket=function(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(i('socket receive: type "%s", data "%s"',e.type,e.data),this.emit("packet",e),this.emit("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emit("data",e.data),this.emit("message",e.data)}else i('packet received with socket readyState "%s"',this.readyState)},u.prototype.onHandshake=function(e){this.emit("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.onOpen(),"closed"!==this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},u.prototype.onHeartbeat=function(e){clearTimeout(this.pingTimeoutTimer);var t=this;t.pingTimeoutTimer=setTimeout((function(){"closed"!==t.readyState&&t.onClose("ping timeout")}),e||t.pingInterval+t.pingTimeout)},u.prototype.setPing=function(){var e=this;clearTimeout(e.pingIntervalTimer),e.pingIntervalTimer=setTimeout((function(){i("writing ping packet - expecting pong within %sms",e.pingTimeout),e.ping(),e.onHeartbeat(e.pingTimeout)}),e.pingInterval)},u.prototype.ping=function(){var e=this;this.sendPacket("ping",(function(){e.emit("ping")}))},u.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},u.prototype.flush=function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(i("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},u.prototype.write=u.prototype.send=function(e,t,n){return this.sendPacket("message",e,t,n),this},u.prototype.sendPacket=function(e,t,n,o){if("function"==typeof t&&(o=t,t=void 0),"function"==typeof n&&(o=n,n=null),"closing"!==this.readyState&&"closed"!==this.readyState){(n=n||{}).compress=!1!==n.compress;var r={type:e,data:t,options:n};this.emit("packetCreate",r),this.writeBuffer.push(r),o&&this.once("flush",o),this.flush()}},u.prototype.close=function(){if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";var e=this;this.writeBuffer.length?this.once("drain",(function(){this.upgrading?o():t()})):this.upgrading?o():t()}function t(){e.onClose("forced close"),i("socket closing - telling transport to close"),e.transport.close()}function n(){e.removeListener("upgrade",n),e.removeListener("upgradeError",n),t()}function o(){e.once("upgrade",n),e.once("upgradeError",n)}return this},u.prototype.onError=function(e){i("socket error %j",e),u.priorWebsocketSuccess=!1,this.emit("error",e),this.onClose("transport error",e)},u.prototype.onClose=function(e,t){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(i('socket close with reason: "%s"',e),clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",e,t),this.writeBuffer=[],this.prevBufferLen=0)},u.prototype.filterUpgrades=function(e){for(var t=[],n=0,o=e.length;n<o;n++)~s(this.transports,e[n])&&t.push(e[n]);return t}},8664:(e,t,n)=>{var o=n(5570),r=n(2420);function i(e){this.path=e.path,this.hostname=e.hostname,this.port=e.port,this.secure=e.secure,this.query=e.query,this.timestampParam=e.timestampParam,this.timestampRequests=e.timestampRequests,this.readyState="",this.agent=e.agent||!1,this.socket=e.socket,this.enablesXDR=e.enablesXDR,this.withCredentials=e.withCredentials,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.forceNode=e.forceNode,this.isReactNative=e.isReactNative,this.extraHeaders=e.extraHeaders,this.localAddress=e.localAddress}e.exports=i,r(i.prototype),i.prototype.onError=function(e,t){var n=new Error(e);return n.type="TransportError",n.description=t,this.emit("error",n),this},i.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this},i.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},i.prototype.send=function(e){if("open"!==this.readyState)throw new Error("Transport not open");this.write(e)},i.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},i.prototype.onData=function(e){var t=o.decodePacket(e,this.socket.binaryType);this.onPacket(t)},i.prototype.onPacket=function(e){this.emit("packet",e)},i.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},8047:(e,t,n)=>{var o=n(1573),r=n(114),i=n(7344),s=n(8351);t.polling=function(e){var t=!1,n=!1,s=!1!==e.jsonp;if("undefined"!=typeof location){var a="https:"===location.protocol,c=location.port;c||(c=a?443:80),t=e.hostname!==location.hostname||c!==e.port,n=e.secure!==a}if(e.xdomain=t,e.xscheme=n,"open"in new o(e)&&!e.forceJSONP)return new r(e);if(!s)throw new Error("JSONP disabled");return new i(e)},t.websocket=s},7344:(e,t,n)=>{var o=n(5763),r=n(292),i=n(8678);e.exports=u;var s,a=/\n/g,c=/\\n/g;function l(){}function u(e){o.call(this,e),this.query=this.query||{},s||(s=i.___eio=i.___eio||[]),this.index=s.length;var t=this;s.push((function(e){t.onData(e)})),this.query.j=this.index,"function"==typeof addEventListener&&addEventListener("beforeunload",(function(){t.script&&(t.script.onerror=l)}),!1)}r(u,o),u.prototype.supportsBinary=!1,u.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),o.prototype.doClose.call(this)},u.prototype.doPoll=function(){var e=this,t=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),t.async=!0,t.src=this.uri(),t.onerror=function(t){e.onError("jsonp poll error",t)};var n=document.getElementsByTagName("script")[0];n?n.parentNode.insertBefore(t,n):(document.head||document.body).appendChild(t),this.script=t,"undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent)&&setTimeout((function(){var e=document.createElement("iframe");document.body.appendChild(e),document.body.removeChild(e)}),100)},u.prototype.doWrite=function(e,t){var n=this;if(!this.form){var o,r=document.createElement("form"),i=document.createElement("textarea"),s=this.iframeId="eio_iframe_"+this.index;r.className="socketio",r.style.position="absolute",r.style.top="-1000px",r.style.left="-1000px",r.target=s,r.method="POST",r.setAttribute("accept-charset","utf-8"),i.name="d",r.appendChild(i),document.body.appendChild(r),this.form=r,this.area=i}function l(){u(),t()}function u(){if(n.iframe)try{n.form.removeChild(n.iframe)}catch(e){n.onError("jsonp polling iframe removal error",e)}try{var e='<iframe src="javascript:0" name="'+n.iframeId+'">';o=document.createElement(e)}catch(e){(o=document.createElement("iframe")).name=n.iframeId,o.src="javascript:0"}o.id=n.iframeId,n.form.appendChild(o),n.iframe=o}this.form.action=this.uri(),u(),e=e.replace(c,"\\\n"),this.area.value=e.replace(a,"\\n");try{this.form.submit()}catch(e){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===n.iframe.readyState&&l()}:this.iframe.onload=l}},114:(e,t,n)=>{var o=n(1573),r=n(5763),i=n(2420),s=n(292),a=n(986)("engine.io-client:polling-xhr"),c=n(8678);function l(){}function u(e){if(r.call(this,e),this.requestTimeout=e.requestTimeout,this.extraHeaders=e.extraHeaders,"undefined"!=typeof location){var t="https:"===location.protocol,n=location.port;n||(n=t?443:80),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||n!==e.port,this.xs=e.secure!==t}}function p(e){this.method=e.method||"GET",this.uri=e.uri,this.xd=!!e.xd,this.xs=!!e.xs,this.async=!1!==e.async,this.data=void 0!==e.data?e.data:null,this.agent=e.agent,this.isBinary=e.isBinary,this.supportsBinary=e.supportsBinary,this.enablesXDR=e.enablesXDR,this.withCredentials=e.withCredentials,this.requestTimeout=e.requestTimeout,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.extraHeaders=e.extraHeaders,this.create()}function d(){for(var e in p.requests)p.requests.hasOwnProperty(e)&&p.requests[e].abort()}e.exports=u,e.exports.Request=p,s(u,r),u.prototype.supportsBinary=!0,u.prototype.request=function(e){return(e=e||{}).uri=this.uri(),e.xd=this.xd,e.xs=this.xs,e.agent=this.agent||!1,e.supportsBinary=this.supportsBinary,e.enablesXDR=this.enablesXDR,e.withCredentials=this.withCredentials,e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized,e.requestTimeout=this.requestTimeout,e.extraHeaders=this.extraHeaders,new p(e)},u.prototype.doWrite=function(e,t){var n="string"!=typeof e&&void 0!==e,o=this.request({method:"POST",data:e,isBinary:n}),r=this;o.on("success",t),o.on("error",(function(e){r.onError("xhr post error",e)})),this.sendXhr=o},u.prototype.doPoll=function(){a("xhr poll");var e=this.request(),t=this;e.on("data",(function(e){t.onData(e)})),e.on("error",(function(e){t.onError("xhr poll error",e)})),this.pollXhr=e},i(p.prototype),p.prototype.create=function(){var e={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized;var t=this.xhr=new o(e),n=this;try{a("xhr open %s: %s",this.method,this.uri),t.open(this.method,this.uri,this.async);try{if(this.extraHeaders)for(var r in t.setDisableHeaderCheck&&t.setDisableHeaderCheck(!0),this.extraHeaders)this.extraHeaders.hasOwnProperty(r)&&t.setRequestHeader(r,this.extraHeaders[r])}catch(e){}if("POST"===this.method)try{this.isBinary?t.setRequestHeader("Content-type","application/octet-stream"):t.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{t.setRequestHeader("Accept","*/*")}catch(e){}"withCredentials"in t&&(t.withCredentials=this.withCredentials),this.requestTimeout&&(t.timeout=this.requestTimeout),this.hasXDR()?(t.onload=function(){n.onLoad()},t.onerror=function(){n.onError(t.responseText)}):t.onreadystatechange=function(){if(2===t.readyState)try{var e=t.getResponseHeader("Content-Type");(n.supportsBinary&&"application/octet-stream"===e||"application/octet-stream; charset=UTF-8"===e)&&(t.responseType="arraybuffer")}catch(e){}4===t.readyState&&(200===t.status||1223===t.status?n.onLoad():setTimeout((function(){n.onError("number"==typeof t.status?t.status:0)}),0))},a("xhr data %s",this.data),t.send(this.data)}catch(e){return void setTimeout((function(){n.onError(e)}),0)}"undefined"!=typeof document&&(this.index=p.requestsCount++,p.requests[this.index]=this)},p.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},p.prototype.onData=function(e){this.emit("data",e),this.onSuccess()},p.prototype.onError=function(e){this.emit("error",e),this.cleanup(!0)},p.prototype.cleanup=function(e){if(void 0!==this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=l:this.xhr.onreadystatechange=l,e)try{this.xhr.abort()}catch(e){}"undefined"!=typeof document&&delete p.requests[this.index],this.xhr=null}},p.prototype.onLoad=function(){var e;try{var t;try{t=this.xhr.getResponseHeader("Content-Type")}catch(e){}e=("application/octet-stream"===t||"application/octet-stream; charset=UTF-8"===t)&&this.xhr.response||this.xhr.responseText}catch(e){this.onError(e)}null!=e&&this.onData(e)},p.prototype.hasXDR=function(){return"undefined"!=typeof XDomainRequest&&!this.xs&&this.enablesXDR},p.prototype.abort=function(){this.cleanup()},p.requestsCount=0,p.requests={},"undefined"!=typeof document&&("function"==typeof attachEvent?attachEvent("onunload",d):"function"==typeof addEventListener&&addEventListener("onpagehide"in c?"pagehide":"unload",d,!1))},5763:(e,t,n)=>{var o=n(8664),r=n(5877),i=n(5570),s=n(292),a=n(9289),c=n(986)("engine.io-client:polling");e.exports=u;var l=null!=new(n(1573))({xdomain:!1}).responseType;function u(e){var t=e&&e.forceBase64;l&&!t||(this.supportsBinary=!1),o.call(this,e)}s(u,o),u.prototype.name="polling",u.prototype.doOpen=function(){this.poll()},u.prototype.pause=function(e){var t=this;function n(){c("paused"),t.readyState="paused",e()}if(this.readyState="pausing",this.polling||!this.writable){var o=0;this.polling&&(c("we are currently polling - waiting to pause"),o++,this.once("pollComplete",(function(){c("pre-pause polling complete"),--o||n()}))),this.writable||(c("we are currently writing - waiting to pause"),o++,this.once("drain",(function(){c("pre-pause writing complete"),--o||n()})))}else n()},u.prototype.poll=function(){c("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},u.prototype.onData=function(e){var t=this;c("polling got data %s",e),i.decodePayload(e,this.socket.binaryType,(function(e,n,o){if("opening"===t.readyState&&"open"===e.type&&t.onOpen(),"close"===e.type)return t.onClose(),!1;t.onPacket(e)})),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():c('ignoring poll - transport state "%s"',this.readyState))},u.prototype.doClose=function(){var e=this;function t(){c("writing close packet"),e.write([{type:"close"}])}"open"===this.readyState?(c("transport open - closing"),t()):(c("transport not open - deferring close"),this.once("open",t))},u.prototype.write=function(e){var t=this;this.writable=!1;var n=function(){t.writable=!0,t.emit("drain")};i.encodePayload(e,this.supportsBinary,(function(e){t.doWrite(e,n)}))},u.prototype.uri=function(){var e=this.query||{},t=this.secure?"https":"http",n="";return!1!==this.timestampRequests&&(e[this.timestampParam]=a()),this.supportsBinary||e.sid||(e.b64=1),e=r.encode(e),this.port&&("https"===t&&443!==Number(this.port)||"http"===t&&80!==Number(this.port))&&(n=":"+this.port),e.length&&(e="?"+e),t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+e}},8351:(e,t,n)=>{var o,r,i=n(8664),s=n(5570),a=n(5877),c=n(292),l=n(9289),u=n(986)("engine.io-client:websocket");if("undefined"!=typeof WebSocket?o=WebSocket:"undefined"!=typeof self&&(o=self.WebSocket||self.MozWebSocket),"undefined"==typeof window)try{r=n(418)}catch(e){}var p=o||r;function d(e){e&&e.forceBase64&&(this.supportsBinary=!1),this.perMessageDeflate=e.perMessageDeflate,this.usingBrowserWebSocket=o&&!e.forceNode,this.protocols=e.protocols,this.usingBrowserWebSocket||(p=r),i.call(this,e)}e.exports=d,c(d,i),d.prototype.name="websocket",d.prototype.supportsBinary=!0,d.prototype.doOpen=function(){if(this.check()){var e=this.uri(),t=this.protocols,n={};this.isReactNative||(n.agent=this.agent,n.perMessageDeflate=this.perMessageDeflate,n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized),this.extraHeaders&&(n.headers=this.extraHeaders),this.localAddress&&(n.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket&&!this.isReactNative?t?new p(e,t):new p(e):new p(e,t,n)}catch(e){return this.emit("error",e)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},d.prototype.addEventListeners=function(){var e=this;this.ws.onopen=function(){e.onOpen()},this.ws.onclose=function(){e.onClose()},this.ws.onmessage=function(t){e.onData(t.data)},this.ws.onerror=function(t){e.onError("websocket error",t)}},d.prototype.write=function(e){var t=this;this.writable=!1;for(var n=e.length,o=0,r=n;o<r;o++)!function(e){s.encodePacket(e,t.supportsBinary,(function(o){if(!t.usingBrowserWebSocket){var r={};e.options&&(r.compress=e.options.compress),t.perMessageDeflate&&("string"==typeof o?Buffer.byteLength(o):o.length)<t.perMessageDeflate.threshold&&(r.compress=!1)}try{t.usingBrowserWebSocket?t.ws.send(o):t.ws.send(o,r)}catch(e){u("websocket closed before onclose event")}--n||(t.emit("flush"),setTimeout((function(){t.writable=!0,t.emit("drain")}),0))}))}(e[o])},d.prototype.onClose=function(){i.prototype.onClose.call(this)},d.prototype.doClose=function(){void 0!==this.ws&&this.ws.close()},d.prototype.uri=function(){var e=this.query||{},t=this.secure?"wss":"ws",n="";return this.port&&("wss"===t&&443!==Number(this.port)||"ws"===t&&80!==Number(this.port))&&(n=":"+this.port),this.timestampRequests&&(e[this.timestampParam]=l()),this.supportsBinary||(e.b64=1),(e=a.encode(e)).length&&(e="?"+e),t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+e},d.prototype.check=function(){return!(!p||"__initialize"in p&&this.name===d.prototype.name)}},1573:(e,t,n)=>{var o=n(1018),r=n(8678);e.exports=function(e){var t=e.xdomain,n=e.xscheme,i=e.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!t||o))return new XMLHttpRequest}catch(e){}try{if("undefined"!=typeof XDomainRequest&&!n&&i)return new XDomainRequest}catch(e){}if(!t)try{return new(r[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}}},2420:e=>{function t(e){if(e)return function(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}(e)}e.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,o=this._callbacks["$"+e];if(!o)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var r=0;r<o.length;r++)if((n=o[r])===t||n.fn===t){o.splice(r,1);break}return 0===o.length&&delete this._callbacks["$"+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],o=1;o<arguments.length;o++)t[o-1]=arguments[o];if(n){o=0;for(var r=(n=n.slice(0)).length;o<r;++o)n[o].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}},986:(e,t,n)=>{function o(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}(t=e.exports=n(736)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),n){var o="color: "+this.color;e.splice(1,0,o,"color: inherit");var r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(i=r))})),e.splice(i,0,o)}},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=o,t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(o())},736:(e,t,n)=>{function o(e){var n;function o(){if(o.enabled){var e=o,r=+new Date,i=r-(n||r);e.diff=i,e.prev=n,e.curr=r,n=r;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var c=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,o){if("%%"===n)return n;c++;var r=t.formatters[o];if("function"==typeof r){var i=s[c];n=r.call(e,i),s.splice(c,1),c--}return n})),t.formatArgs.call(e,s);var l=o.log||t.log||console.log.bind(console);l.apply(e,s)}}return o.namespace=e,o.enabled=t.enabled(e),o.useColors=t.useColors(),o.color=function(e){var n,o=0;for(n in e)o=(o<<5)-o+e.charCodeAt(n),o|=0;return t.colors[Math.abs(o)%t.colors.length]}(e),o.destroy=r,"function"==typeof t.init&&t.init(o),t.instances.push(o),o}function r(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}(t=e.exports=o.debug=o.default=o).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){var n;t.save(e),t.names=[],t.skips=[];var o=("string"==typeof e?e:"").split(/[\s,]+/),r=o.length;for(n=0;n<r;n++)o[n]&&("-"===(e=o[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){var i=t.instances[n];i.enabled=t.enabled(i.namespace)}},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,o;for(n=0,o=t.skips.length;n<o;n++)if(t.skips[n].test(e))return!1;for(n=0,o=t.names.length;n<o;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(7660),t.instances=[],t.names=[],t.skips=[],t.formatters={}},7660:e=>{var t=1e3,n=60*t,o=60*n,r=24*o;function i(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}e.exports=function(e,s){s=s||{};var a,c=typeof e;if("string"===c&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var i=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(i){var s=parseFloat(i[1]);switch((i[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"days":case"day":case"d":return s*r;case"hours":case"hour":case"hrs":case"hr":case"h":return s*o;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(e);if("number"===c&&!1===isNaN(e))return s.long?i(a=e,r,"day")||i(a,o,"hour")||i(a,n,"minute")||i(a,t,"second")||a+" ms":function(e){return e>=r?Math.round(e/r)+"d":e>=o?Math.round(e/o)+"h":e>=n?Math.round(e/n)+"m":e>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},5570:(e,t,n)=>{var o,r=n(1888),i=n(310),s=n(1042),a=n(1962),c=n(6326);"undefined"!=typeof ArrayBuffer&&(o=n(5733));var l="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),u="undefined"!=typeof navigator&&/PhantomJS/i.test(navigator.userAgent),p=l||u;t.protocol=3;var d=t.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},h=r(d),f={type:"error",data:"parser error"},g=n(7108);function y(e,t,n){for(var o=new Array(e.length),r=a(e.length,n),i=function(e,n,r){t(n,(function(t,n){o[e]=n,r(t,o)}))},s=0;s<e.length;s++)i(s,e[s],r)}t.encodePacket=function(e,n,o,r){"function"==typeof n&&(r=n,n=!1),"function"==typeof o&&(r=o,o=null);var i=void 0===e.data?void 0:e.data.buffer||e.data;if("undefined"!=typeof ArrayBuffer&&i instanceof ArrayBuffer)return function(e,n,o){if(!n)return t.encodeBase64Packet(e,o);var r=e.data,i=new Uint8Array(r),s=new Uint8Array(1+r.byteLength);s[0]=d[e.type];for(var a=0;a<i.length;a++)s[a+1]=i[a];return o(s.buffer)}(e,n,r);if(void 0!==g&&i instanceof g)return function(e,n,o){if(!n)return t.encodeBase64Packet(e,o);if(p)return function(e,n,o){if(!n)return t.encodeBase64Packet(e,o);var r=new FileReader;return r.onload=function(){t.encodePacket({type:e.type,data:r.result},n,!0,o)},r.readAsArrayBuffer(e.data)}(e,n,o);var r=new Uint8Array(1);return r[0]=d[e.type],o(new g([r.buffer,e.data]))}(e,n,r);if(i&&i.base64)return function(e,n){return n("b"+t.packets[e.type]+e.data.data)}(e,r);var s=d[e.type];return void 0!==e.data&&(s+=o?c.encode(String(e.data),{strict:!1}):String(e.data)),r(""+s)},t.encodeBase64Packet=function(e,n){var o,r="b"+t.packets[e.type];if(void 0!==g&&e.data instanceof g){var i=new FileReader;return i.onload=function(){var e=i.result.split(",")[1];n(r+e)},i.readAsDataURL(e.data)}try{o=String.fromCharCode.apply(null,new Uint8Array(e.data))}catch(t){for(var s=new Uint8Array(e.data),a=new Array(s.length),c=0;c<s.length;c++)a[c]=s[c];o=String.fromCharCode.apply(null,a)}return r+=btoa(o),n(r)},t.decodePacket=function(e,n,o){if(void 0===e)return f;if("string"==typeof e){if("b"===e.charAt(0))return t.decodeBase64Packet(e.substr(1),n);if(o&&!1===(e=function(e){try{e=c.decode(e,{strict:!1})}catch(e){return!1}return e}(e)))return f;var r=e.charAt(0);return Number(r)==r&&h[r]?e.length>1?{type:h[r],data:e.substring(1)}:{type:h[r]}:f}r=new Uint8Array(e)[0];var i=s(e,1);return g&&"blob"===n&&(i=new g([i])),{type:h[r],data:i}},t.decodeBase64Packet=function(e,t){var n=h[e.charAt(0)];if(!o)return{type:n,data:{base64:!0,data:e.substr(1)}};var r=o.decode(e.substr(1));return"blob"===t&&g&&(r=new g([r])),{type:n,data:r}},t.encodePayload=function(e,n,o){"function"==typeof n&&(o=n,n=null);var r=i(e);return n&&r?g&&!p?t.encodePayloadAsBlob(e,o):t.encodePayloadAsArrayBuffer(e,o):e.length?void y(e,(function(e,o){t.encodePacket(e,!!r&&n,!1,(function(e){o(null,function(e){return e.length+":"+e}(e))}))}),(function(e,t){return o(t.join(""))})):o("0:")},t.decodePayload=function(e,n,o){if("string"!=typeof e)return t.decodePayloadAsBinary(e,n,o);var r;if("function"==typeof n&&(o=n,n=null),""===e)return o(f,0,1);for(var i,s,a="",c=0,l=e.length;c<l;c++){var u=e.charAt(c);if(":"===u){if(""===a||a!=(i=Number(a)))return o(f,0,1);if(a!=(s=e.substr(c+1,i)).length)return o(f,0,1);if(s.length){if(r=t.decodePacket(s,n,!1),f.type===r.type&&f.data===r.data)return o(f,0,1);if(!1===o(r,c+i,l))return}c+=i,a=""}else a+=u}return""!==a?o(f,0,1):void 0},t.encodePayloadAsArrayBuffer=function(e,n){if(!e.length)return n(new ArrayBuffer(0));y(e,(function(e,n){t.encodePacket(e,!0,!0,(function(e){return n(null,e)}))}),(function(e,t){var o=t.reduce((function(e,t){var n;return e+(n="string"==typeof t?t.length:t.byteLength).toString().length+n+2}),0),r=new Uint8Array(o),i=0;return t.forEach((function(e){var t="string"==typeof e,n=e;if(t){for(var o=new Uint8Array(e.length),s=0;s<e.length;s++)o[s]=e.charCodeAt(s);n=o.buffer}r[i++]=t?0:1;var a=n.byteLength.toString();for(s=0;s<a.length;s++)r[i++]=parseInt(a[s]);for(r[i++]=255,o=new Uint8Array(n),s=0;s<o.length;s++)r[i++]=o[s]})),n(r.buffer)}))},t.encodePayloadAsBlob=function(e,n){y(e,(function(e,n){t.encodePacket(e,!0,!0,(function(e){var t=new Uint8Array(1);if(t[0]=1,"string"==typeof e){for(var o=new Uint8Array(e.length),r=0;r<e.length;r++)o[r]=e.charCodeAt(r);e=o.buffer,t[0]=0}var i=(e instanceof ArrayBuffer?e.byteLength:e.size).toString(),s=new Uint8Array(i.length+1);for(r=0;r<i.length;r++)s[r]=parseInt(i[r]);if(s[i.length]=255,g){var a=new g([t.buffer,s.buffer,e]);n(null,a)}}))}),(function(e,t){return n(new g(t))}))},t.decodePayloadAsBinary=function(e,n,o){"function"==typeof n&&(o=n,n=null);for(var r=e,i=[];r.byteLength>0;){for(var a=new Uint8Array(r),c=0===a[0],l="",u=1;255!==a[u];u++){if(l.length>310)return o(f,0,1);l+=a[u]}r=s(r,2+l.length),l=parseInt(l);var p=s(r,0,l);if(c)try{p=String.fromCharCode.apply(null,new Uint8Array(p))}catch(e){var d=new Uint8Array(p);for(p="",u=0;u<d.length;u++)p+=String.fromCharCode(d[u])}i.push(p),r=s(r,l)}var h=i.length;i.forEach((function(e,r){o(t.decodePacket(e,n,!0),r,h)}))}},1888:e=>{e.exports=Object.keys||function(e){var t=[],n=Object.prototype.hasOwnProperty;for(var o in e)n.call(e,o)&&t.push(o);return t}},6326:e=>{var t,n,o,r=String.fromCharCode;function i(e){for(var t,n,o=[],r=0,i=e.length;r<i;)(t=e.charCodeAt(r++))>=55296&&t<=56319&&r<i?56320==(64512&(n=e.charCodeAt(r++)))?o.push(((1023&t)<<10)+(1023&n)+65536):(o.push(t),r--):o.push(t);return o}function s(e,t){if(e>=55296&&e<=57343){if(t)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function a(e,t){return r(e>>t&63|128)}function c(e,t){if(0==(4294967168&e))return r(e);var n="";return 0==(4294965248&e)?n=r(e>>6&31|192):0==(4294901760&e)?(s(e,t)||(e=65533),n=r(e>>12&15|224),n+=a(e,6)):0==(4292870144&e)&&(n=r(e>>18&7|240),n+=a(e,12),n+=a(e,6)),n+r(63&e|128)}function l(){if(o>=n)throw Error("Invalid byte index");var e=255&t[o];if(o++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function u(e){var r,i;if(o>n)throw Error("Invalid byte index");if(o==n)return!1;if(r=255&t[o],o++,0==(128&r))return r;if(192==(224&r)){if((i=(31&r)<<6|l())>=128)return i;throw Error("Invalid continuation byte")}if(224==(240&r)){if((i=(15&r)<<12|l()<<6|l())>=2048)return s(i,e)?i:65533;throw Error("Invalid continuation byte")}if(240==(248&r)&&(i=(7&r)<<18|l()<<12|l()<<6|l())>=65536&&i<=1114111)return i;throw Error("Invalid UTF-8 detected")}e.exports={version:"2.1.2",encode:function(e,t){for(var n=!1!==(t=t||{}).strict,o=i(e),r=o.length,s=-1,a="";++s<r;)a+=c(o[s],n);return a},decode:function(e,s){var a=!1!==(s=s||{}).strict;t=i(e),n=t.length,o=0;for(var c,l=[];!1!==(c=u(a));)l.push(c);return function(e){for(var t,n=e.length,o=-1,i="";++o<n;)(t=e[o])>65535&&(i+=r((t-=65536)>>>10&1023|55296),t=56320|1023&t),i+=r(t);return i}(l)}}},310:(e,t,n)=>{var o=n(6368),r=Object.prototype.toString,i="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===r.call(Blob),s="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===r.call(File);e.exports=function e(t){if(!t||"object"!=typeof t)return!1;if(o(t)){for(var n=0,r=t.length;n<r;n++)if(e(t[n]))return!0;return!1}if("function"==typeof Buffer&&Buffer.isBuffer&&Buffer.isBuffer(t)||"function"==typeof ArrayBuffer&&t instanceof ArrayBuffer||i&&t instanceof Blob||s&&t instanceof File)return!0;if(t.toJSON&&"function"==typeof t.toJSON&&1===arguments.length)return e(t.toJSON(),!0);for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)&&e(t[a]))return!0;return!1}},1018:e=>{try{e.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){e.exports=!1}},8486:e=>{var t=[].indexOf;e.exports=function(e,n){if(t)return e.indexOf(n);for(var o=0;o<e.length;++o)if(e[o]===n)return o;return-1}},6368:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},5877:(e,t)=>{t.encode=function(e){var t="";for(var n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t},t.decode=function(e){for(var t={},n=e.split("&"),o=0,r=n.length;o<r;o++){var i=n[o].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}},9026:e=>{var t=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,n=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];e.exports=function(e){var o,r,i=e,s=e.indexOf("["),a=e.indexOf("]");-1!=s&&-1!=a&&(e=e.substring(0,s)+e.substring(s,a).replace(/:/g,";")+e.substring(a,e.length));for(var c,l,u=t.exec(e||""),p={},d=14;d--;)p[n[d]]=u[d]||"";return-1!=s&&-1!=a&&(p.source=i,p.host=p.host.substring(1,p.host.length-1).replace(/;/g,":"),p.authority=p.authority.replace("[","").replace("]","").replace(/;/g,":"),p.ipv6uri=!0),p.pathNames=(o=p.path,r=o.replace(/\/{2,9}/g,"/").split("/"),"/"!=o.substr(0,1)&&0!==o.length||r.splice(0,1),"/"==o.substr(o.length-1,1)&&r.splice(r.length-1,1),r),p.queryKey=(c=p.query,l={},c.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(e,t,n){t&&(l[t]=n)})),l),p}},1352:(e,t,n)=>{var o=n(4550),r=n(3416),i=n(7501),s=n(5925)("socket.io-client");e.exports=t=c;var a=t.managers={};function c(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,r=o(e),c=r.source,l=r.id,u=r.path,p=a[l]&&u in a[l].nsps;return t.forceNew||t["force new connection"]||!1===t.multiplex||p?(s("ignoring socket cache for %s",c),n=i(c,t)):(a[l]||(s("new io instance for %s",c),a[l]=i(c,t)),n=a[l]),r.query&&!t.query&&(t.query=r.query),n.socket(r.path,t)}t.protocol=r.protocol,t.connect=c,t.Manager=n(7501),t.Socket=n(6479)},7501:(e,t,n)=>{var o=n(7409),r=n(6479),i=n(6621),s=n(3416),a=n(8807),c=n(8821),l=n(5925)("socket.io-client:manager"),u=n(8486),p=n(9145),d=Object.prototype.hasOwnProperty;function h(e,t){if(!(this instanceof h))return new h(e,t);e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.nsps={},this.subs=[],this.opts=t,this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor||.5),this.backoff=new p({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this.readyState="closed",this.uri=e,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var n=t.parser||s;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this.autoConnect=!1!==t.autoConnect,this.autoConnect&&this.open()}e.exports=h,h.prototype.emitAll=function(){for(var e in this.emit.apply(this,arguments),this.nsps)d.call(this.nsps,e)&&this.nsps[e].emit.apply(this.nsps[e],arguments)},h.prototype.updateSocketIds=function(){for(var e in this.nsps)d.call(this.nsps,e)&&(this.nsps[e].id=this.generateId(e))},h.prototype.generateId=function(e){return("/"===e?"":e+"#")+this.engine.id},i(h.prototype),h.prototype.reconnection=function(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection},h.prototype.reconnectionAttempts=function(e){return arguments.length?(this._reconnectionAttempts=e,this):this._reconnectionAttempts},h.prototype.reconnectionDelay=function(e){return arguments.length?(this._reconnectionDelay=e,this.backoff&&this.backoff.setMin(e),this):this._reconnectionDelay},h.prototype.randomizationFactor=function(e){return arguments.length?(this._randomizationFactor=e,this.backoff&&this.backoff.setJitter(e),this):this._randomizationFactor},h.prototype.reconnectionDelayMax=function(e){return arguments.length?(this._reconnectionDelayMax=e,this.backoff&&this.backoff.setMax(e),this):this._reconnectionDelayMax},h.prototype.timeout=function(e){return arguments.length?(this._timeout=e,this):this._timeout},h.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},h.prototype.open=h.prototype.connect=function(e,t){if(l("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;l("opening %s",this.uri),this.engine=o(this.uri,this.opts);var n=this.engine,r=this;this.readyState="opening",this.skipReconnect=!1;var i=a(n,"open",(function(){r.onopen(),e&&e()})),s=a(n,"error",(function(t){if(l("connect_error"),r.cleanup(),r.readyState="closed",r.emitAll("connect_error",t),e){var n=new Error("Connection error");n.data=t,e(n)}else r.maybeReconnectOnOpen()}));if(!1!==this._timeout){var c=this._timeout;l("connect attempt will timeout after %d",c),0===c&&i.destroy();var u=setTimeout((function(){l("connect attempt timed out after %d",c),i.destroy(),n.close(),n.emit("error","timeout"),r.emitAll("connect_timeout",c)}),c);this.subs.push({destroy:function(){clearTimeout(u)}})}return this.subs.push(i),this.subs.push(s),this},h.prototype.onopen=function(){l("open"),this.cleanup(),this.readyState="open",this.emit("open");var e=this.engine;this.subs.push(a(e,"data",c(this,"ondata"))),this.subs.push(a(e,"ping",c(this,"onping"))),this.subs.push(a(e,"pong",c(this,"onpong"))),this.subs.push(a(e,"error",c(this,"onerror"))),this.subs.push(a(e,"close",c(this,"onclose"))),this.subs.push(a(this.decoder,"decoded",c(this,"ondecoded")))},h.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},h.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},h.prototype.ondata=function(e){this.decoder.add(e)},h.prototype.ondecoded=function(e){this.emit("packet",e)},h.prototype.onerror=function(e){l("error",e),this.emitAll("error",e)},h.prototype.socket=function(e,t){var n=this.nsps[e];if(!n){n=new r(this,e,t),this.nsps[e]=n;var o=this;n.on("connecting",i),n.on("connect",(function(){n.id=o.generateId(e)})),this.autoConnect&&i()}function i(){~u(o.connecting,n)||o.connecting.push(n)}return n},h.prototype.destroy=function(e){var t=u(this.connecting,e);~t&&this.connecting.splice(t,1),this.connecting.length||this.close()},h.prototype.packet=function(e){l("writing packet %j",e);var t=this;e.query&&0===e.type&&(e.nsp+="?"+e.query),t.encoding?t.packetBuffer.push(e):(t.encoding=!0,this.encoder.encode(e,(function(n){for(var o=0;o<n.length;o++)t.engine.write(n[o],e.options);t.encoding=!1,t.processPacketQueue()})))},h.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var e=this.packetBuffer.shift();this.packet(e)}},h.prototype.cleanup=function(){l("cleanup");for(var e=this.subs.length,t=0;t<e;t++)this.subs.shift().destroy();this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},h.prototype.close=h.prototype.disconnect=function(){l("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"===this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},h.prototype.onclose=function(e){l("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",e),this._reconnection&&!this.skipReconnect&&this.reconnect()},h.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var e=this;if(this.backoff.attempts>=this._reconnectionAttempts)l("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var t=this.backoff.duration();l("will wait %dms before reconnect attempt",t),this.reconnecting=!0;var n=setTimeout((function(){e.skipReconnect||(l("attempting reconnect"),e.emitAll("reconnect_attempt",e.backoff.attempts),e.emitAll("reconnecting",e.backoff.attempts),e.skipReconnect||e.open((function(t){t?(l("reconnect attempt error"),e.reconnecting=!1,e.reconnect(),e.emitAll("reconnect_error",t.data)):(l("reconnect success"),e.onreconnect())})))}),t);this.subs.push({destroy:function(){clearTimeout(n)}})}},h.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)}},8807:e=>{e.exports=function(e,t,n){return e.on(t,n),{destroy:function(){e.removeListener(t,n)}}}},6479:(e,t,n)=>{var o=n(3416),r=n(6621),i=n(2459),s=n(8807),a=n(8821),c=n(5925)("socket.io-client:socket"),l=n(5877),u=n(310);e.exports=h;var p={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},d=r.prototype.emit;function h(e,t,n){this.io=e,this.nsp=t,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,this.flags={},n&&n.query&&(this.query=n.query),this.io.autoConnect&&this.open()}r(h.prototype),h.prototype.subEvents=function(){if(!this.subs){var e=this.io;this.subs=[s(e,"open",a(this,"onopen")),s(e,"packet",a(this,"onpacket")),s(e,"close",a(this,"onclose"))]}},h.prototype.open=h.prototype.connect=function(){return this.connected||(this.subEvents(),this.io.reconnecting||this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting")),this},h.prototype.send=function(){var e=i(arguments);return e.unshift("message"),this.emit.apply(this,e),this},h.prototype.emit=function(e){if(p.hasOwnProperty(e))return d.apply(this,arguments),this;var t=i(arguments),n={type:(void 0!==this.flags.binary?this.flags.binary:u(t))?o.BINARY_EVENT:o.EVENT,data:t,options:{}};return n.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof t[t.length-1]&&(c("emitting packet with ack id %d",this.ids),this.acks[this.ids]=t.pop(),n.id=this.ids++),this.connected?this.packet(n):this.sendBuffer.push(n),this.flags={},this},h.prototype.packet=function(e){e.nsp=this.nsp,this.io.packet(e)},h.prototype.onopen=function(){if(c("transport is open - connecting"),"/"!==this.nsp)if(this.query){var e="object"==typeof this.query?l.encode(this.query):this.query;c("sending connect packet with query %s",e),this.packet({type:o.CONNECT,query:e})}else this.packet({type:o.CONNECT})},h.prototype.onclose=function(e){c("close (%s)",e),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",e)},h.prototype.onpacket=function(e){var t=e.nsp===this.nsp,n=e.type===o.ERROR&&"/"===e.nsp;if(t||n)switch(e.type){case o.CONNECT:this.onconnect();break;case o.EVENT:case o.BINARY_EVENT:this.onevent(e);break;case o.ACK:case o.BINARY_ACK:this.onack(e);break;case o.DISCONNECT:this.ondisconnect();break;case o.ERROR:this.emit("error",e.data)}},h.prototype.onevent=function(e){var t=e.data||[];c("emitting event %j",t),null!=e.id&&(c("attaching ack callback to event"),t.push(this.ack(e.id))),this.connected?d.apply(this,t):this.receiveBuffer.push(t)},h.prototype.ack=function(e){var t=this,n=!1;return function(){if(!n){n=!0;var r=i(arguments);c("sending ack %j",r),t.packet({type:u(r)?o.BINARY_ACK:o.ACK,id:e,data:r})}}},h.prototype.onack=function(e){var t=this.acks[e.id];"function"==typeof t?(c("calling ack %s with %j",e.id,e.data),t.apply(this,e.data),delete this.acks[e.id]):c("bad ack %s",e.id)},h.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},h.prototype.emitBuffered=function(){var e;for(e=0;e<this.receiveBuffer.length;e++)d.apply(this,this.receiveBuffer[e]);for(this.receiveBuffer=[],e=0;e<this.sendBuffer.length;e++)this.packet(this.sendBuffer[e]);this.sendBuffer=[]},h.prototype.ondisconnect=function(){c("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},h.prototype.destroy=function(){if(this.subs){for(var e=0;e<this.subs.length;e++)this.subs[e].destroy();this.subs=null}this.io.destroy(this)},h.prototype.close=h.prototype.disconnect=function(){return this.connected&&(c("performing disconnect (%s)",this.nsp),this.packet({type:o.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},h.prototype.compress=function(e){return this.flags.compress=e,this},h.prototype.binary=function(e){return this.flags.binary=e,this}},4550:(e,t,n)=>{var o=n(9026),r=n(5925)("socket.io-client:url");e.exports=function(e,t){var n=e;t=t||"undefined"!=typeof location&&location,null==e&&(e=t.protocol+"//"+t.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?t.protocol+e:t.host+e),/^(https?|wss?):\/\//.test(e)||(r("protocol-less url %s",e),e=void 0!==t?t.protocol+"//"+e:"https://"+e),r("parse %s",e),n=o(e)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";var i=-1!==n.host.indexOf(":")?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+i+":"+n.port,n.href=n.protocol+"://"+i+(t&&t.port===n.port?"":":"+n.port),n}},6621:e=>{function t(e){if(e)return function(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}(e)}e.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,o=this._callbacks["$"+e];if(!o)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var r=0;r<o.length;r++)if((n=o[r])===t||n.fn===t){o.splice(r,1);break}return 0===o.length&&delete this._callbacks["$"+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],o=1;o<arguments.length;o++)t[o-1]=arguments[o];if(n){o=0;for(var r=(n=n.slice(0)).length;o<r;++o)n[o].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}},5925:(e,t,n)=>{function o(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}(t=e.exports=n(3153)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),n){var o="color: "+this.color;e.splice(1,0,o,"color: inherit");var r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(i=r))})),e.splice(i,0,o)}},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=o,t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(o())},3153:(e,t,n)=>{function o(e){var n;function o(){if(o.enabled){var e=o,r=+new Date,i=r-(n||r);e.diff=i,e.prev=n,e.curr=r,n=r;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var c=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,o){if("%%"===n)return n;c++;var r=t.formatters[o];if("function"==typeof r){var i=s[c];n=r.call(e,i),s.splice(c,1),c--}return n})),t.formatArgs.call(e,s);var l=o.log||t.log||console.log.bind(console);l.apply(e,s)}}return o.namespace=e,o.enabled=t.enabled(e),o.useColors=t.useColors(),o.color=function(e){var n,o=0;for(n in e)o=(o<<5)-o+e.charCodeAt(n),o|=0;return t.colors[Math.abs(o)%t.colors.length]}(e),o.destroy=r,"function"==typeof t.init&&t.init(o),t.instances.push(o),o}function r(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}(t=e.exports=o.debug=o.default=o).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){var n;t.save(e),t.names=[],t.skips=[];var o=("string"==typeof e?e:"").split(/[\s,]+/),r=o.length;for(n=0;n<r;n++)o[n]&&("-"===(e=o[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){var i=t.instances[n];i.enabled=t.enabled(i.namespace)}},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,o;for(n=0,o=t.skips.length;n<o;n++)if(t.skips[n].test(e))return!1;for(n=0,o=t.names.length;n<o;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(119),t.instances=[],t.names=[],t.skips=[],t.formatters={}},119:e=>{var t=1e3,n=60*t,o=60*n,r=24*o;function i(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}e.exports=function(e,s){s=s||{};var a,c=typeof e;if("string"===c&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var i=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(i){var s=parseFloat(i[1]);switch((i[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"days":case"day":case"d":return s*r;case"hours":case"hour":case"hrs":case"hr":case"h":return s*o;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(e);if("number"===c&&!1===isNaN(e))return s.long?i(a=e,r,"day")||i(a,o,"hour")||i(a,n,"minute")||i(a,t,"second")||a+" ms":function(e){return e>=r?Math.round(e/r)+"d":e>=o?Math.round(e/o)+"h":e>=n?Math.round(e/n)+"m":e>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},4031:(e,t,n)=>{var o=n(6368),r=n(2660),i=Object.prototype.toString,s="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===i.call(Blob),a="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===i.call(File);function c(e,t){if(!e)return e;if(r(e)){var n={_placeholder:!0,num:t.length};return t.push(e),n}if(o(e)){for(var i=new Array(e.length),s=0;s<e.length;s++)i[s]=c(e[s],t);return i}if("object"==typeof e&&!(e instanceof Date)){for(var a in i={},e)i[a]=c(e[a],t);return i}return e}function l(e,t){if(!e)return e;if(e&&e._placeholder)return t[e.num];if(o(e))for(var n=0;n<e.length;n++)e[n]=l(e[n],t);else if("object"==typeof e)for(var r in e)e[r]=l(e[r],t);return e}t.deconstructPacket=function(e){var t=[],n=e.data,o=e;return o.data=c(n,t),o.attachments=t.length,{packet:o,buffers:t}},t.reconstructPacket=function(e,t){return e.data=l(e.data,t),e.attachments=void 0,e},t.removeBlobs=function(e,t){var n=0,i=e;!function e(c,l,u){if(!c)return c;if(s&&c instanceof Blob||a&&c instanceof File){n++;var p=new FileReader;p.onload=function(){u?u[l]=this.result:i=this.result,--n||t(i)},p.readAsArrayBuffer(c)}else if(o(c))for(var d=0;d<c.length;d++)e(c[d],d,c);else if("object"==typeof c&&!r(c))for(var h in c)e(c[h],h,c)}(i),n||t(i)}},3416:(e,t,n)=>{var o=n(5925)("socket.io-parser"),r=n(6621),i=n(4031),s=n(6368),a=n(2660);function c(){}t.protocol=4,t.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],t.CONNECT=0,t.DISCONNECT=1,t.EVENT=2,t.ACK=3,t.ERROR=4,t.BINARY_EVENT=5,t.BINARY_ACK=6,t.Encoder=c,t.Decoder=p;var l=t.ERROR+'"encode error"';function u(e){var n=""+e.type;if(t.BINARY_EVENT!==e.type&&t.BINARY_ACK!==e.type||(n+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(n+=e.nsp+","),null!=e.id&&(n+=e.id),null!=e.data){var r=function(e){try{return JSON.stringify(e)}catch(e){return!1}}(e.data);if(!1===r)return l;n+=r}return o("encoded %j as %s",e,n),n}function p(){this.reconstructor=null}function d(e){this.reconPack=e,this.buffers=[]}function h(e){return{type:t.ERROR,data:"parser error: "+e}}c.prototype.encode=function(e,n){o("encoding packet %j",e),t.BINARY_EVENT===e.type||t.BINARY_ACK===e.type?function(e,t){i.removeBlobs(e,(function(e){var n=i.deconstructPacket(e),o=u(n.packet),r=n.buffers;r.unshift(o),t(r)}))}(e,n):n([u(e)])},r(p.prototype),p.prototype.add=function(e){var n;if("string"==typeof e)n=function(e){var n=0,r={type:Number(e.charAt(0))};if(null==t.types[r.type])return h("unknown packet type "+r.type);if(t.BINARY_EVENT===r.type||t.BINARY_ACK===r.type){for(var i=n+1;"-"!==e.charAt(++n)&&n!=e.length;);var a=e.substring(i,n);if(a!=Number(a)||"-"!==e.charAt(n))throw new Error("Illegal attachments");r.attachments=Number(a)}if("/"===e.charAt(n+1)){for(i=n+1;++n&&","!==(l=e.charAt(n))&&n!==e.length;);r.nsp=e.substring(i,n)}else r.nsp="/";var c=e.charAt(n+1);if(""!==c&&Number(c)==c){for(i=n+1;++n;){var l;if(null==(l=e.charAt(n))||Number(l)!=l){--n;break}if(n===e.length)break}r.id=Number(e.substring(i,n+1))}if(e.charAt(++n)){var u=function(e){try{return JSON.parse(e)}catch(e){return!1}}(e.substr(n));if(!1===u||r.type!==t.ERROR&&!s(u))return h("invalid payload");r.data=u}return o("decoded %s as %j",e,r),r}(e),t.BINARY_EVENT===n.type||t.BINARY_ACK===n.type?(this.reconstructor=new d(n),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",n)):this.emit("decoded",n);else{if(!a(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");(n=this.reconstructor.takeBinaryData(e))&&(this.reconstructor=null,this.emit("decoded",n))}},p.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},d.prototype.takeBinaryData=function(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){var t=i.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null},d.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},2660:e=>{e.exports=function(e){return t&&Buffer.isBuffer(e)||n&&(e instanceof ArrayBuffer||function(e){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer}(e))};var t="function"==typeof Buffer&&"function"==typeof Buffer.isBuffer,n="function"==typeof ArrayBuffer},2459:e=>{e.exports=function(e,t){for(var n=[],o=(t=t||0)||0;o<e.length;o++)n[o-t]=e[o];return n}},9289:e=>{"use strict";var t,n="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),o={},r=0,i=0;function s(e){var t="";do{t=n[e%64]+t,e=Math.floor(e/64)}while(e>0);return t}function a(){var e=s(+new Date);return e!==t?(r=0,t=e):e+"."+s(r++)}for(;i<64;i++)o[n[i]]=i;a.encode=s,a.decode=function(e){var t=0;for(i=0;i<e.length;i++)t=64*t+o[e.charAt(i)];return t},e.exports=a},7881:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var crypto_js_hmac_sha256__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(6948),crypto_js_hmac_sha256__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(crypto_js_hmac_sha256__WEBPACK_IMPORTED_MODULE_0__);function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}var MessageUtils=function(){function MessageUtils(){_classCallCheck(this,MessageUtils)}return _createClass(MessageUtils,null,[{key:"getTime",value:function(e){var t=new Date;e&&(t=new Date(e));var n=t.getHours(),o=t.getMinutes(),r=n>9?n:" 0".concat(n),i=o>9?o:"0".concat(o);return"".concat(r,":").concat(i)}},{key:"generateId",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))}},{key:"encryptText",value:function(e,t){return String(crypto_js_hmac_sha256__WEBPACK_IMPORTED_MODULE_0___default()(e,t)).substring(0,64)}},{key:"mergeObjects",value:function(e,t){var n={};for(var o in e)void 0!==n[o]&&null!==n[o]||(n[o]=e[o]);for(var r in t)void 0===t[r]&&null===t[r]||(n[r]=t[r]);return n}},{key:"boldText",value:function boldText(text,identifier,htmltag){var array=text.split(identifier),previous="",previous_i,i;for(i=0;i<array.length;i++)i%2||0!=i&&(previous_i=eval(i-1),array[previous_i]="<"+htmltag+">"+previous+"</"+htmltag+">"),previous=array[i];var newtext="";for(i=0;i<array.length;i++)newtext+=array[i];return newtext}},{key:"parseMessage",value:function(e,t){return this.boldText(this.parseLink(e,t),"*","b").replace(/\n/g,"<br/>")}},{key:"parseLink",value:function(e,t){return e.replace(/([^\S]|^)(((https?\:\/\/)|(www\.))(\S+))/gi,(function(e,n,o){var r=o;return r.match("^https?://")||(r="http://"+r),n+"<a ".concat(t?'style="color:inherit;"':"",' href="')+r+'" target="_blank">'+o+"</a>"}))}}]),MessageUtils}();const __WEBPACK_DEFAULT_EXPORT__=MessageUtils},1315:(e,t,n)=>{(t=n(7705)(!1)).push([e.id,"@supports (-webkit-touch-callout: none) {\n /* CSS specific to iOS devices */\n #chat-container input {\n transform: translateZ(0px);\n user-select: auto;\n -webkit-user-select: auto;\n -webkit-appearance: none;\n -webkit-transform: translateZ(0px);\n box-sizing: border-box;\n border: 0;\n color: black;\n }\n}\n@supports not (-webkit-touch-callout: none) {\n /* CSS for other than iOS devices */\n #chat-container input {\n padding: 10px 20px;\n box-sizing: border-box;\n border: 0;\n display: block;\n width: 100%;\n color: black;\n }\n}\n#chat-container {\n font-family: 'Nunito', sans-serif;\n position: fixed;\n right: 0;\n bottom: 0;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n /* max-height: calc(var(--vhchat, 1vh) * 95); */\n /* max-height: 90vh; */\n max-width: 100vw;\n}\n#chat-window {\n transition-property: height, transform;\n transition-duration: 0.5s;\n margin-left:auto;\n}\n.visible-chat-window {\n border-radius: 10px;\n display: flex;\n background: rgb(246, 246, 247);\n flex-direction:column;\n height: 620px;\n max-height: calc(var(--vhchat, 1vh) * 90);\n flex-grow:100;\n max-width: 320px;\n padding: 0;\n color: #555;\n justify-content: space-between;\n -webkit-box-shadow: 3px 6px 14px 0px rgba(133,116,133,1);\n -moz-box-shadow: 3px 6px 14px 0px rgba(133,116,133,1);\n box-shadow: 3px 6px 14px 0px rgba(133,116,133,1);\n transform-origin: 100% 100%;\n}\n\n.visible-chat-window-fullscreen {\n display: flex;\n background: rgb(246, 246, 247);\n flex-direction:column;\n height: 620px;\n flex-grow:100;\n color: #555;\n justify-content: space-between;\n -webkit-box-shadow: 3px 6px 14px 0px rgba(133,116,133,1);\n -moz-box-shadow: 3px 6px 14px 0px rgba(133,116,133,1);\n box-shadow: 3px 6px 14px 0px rgba(133,116,133,1);\n transform-origin: 100% 100%;\n\n}\n\n#output {\n overflow-y: auto;\n width: 100%;\n padding: 0.5em;\n outline: black solid 0px;\n background: transparent;\n box-sizing: border-box;\n overscroll-behavior: contain;\n}\n\n#actions p {\n padding: 14px 0;\n margin: 0 20px;\n border-bottom: 1px solid #e9e9e9;\n}\n\n#chat-input-box {\n width: 100%;\n height: 60px;\n /* line-height: 60px; */\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items:center;\n background-color: white;\n}\n\n.button-component-div{\n border: none; \n padding: 0px !important;\n text-decoration: none;\n text-align:center;\n font-size: 16px;\n /* margin-top: 10px; */\n border-radius: 10px;\n cursor: pointer;\n background-color: white;\n}\n\n/* .button-component-label{\n text-align: left;\n text-decoration: none;\n display: inline-block;\n font-size: 16px; \n color: #5cc5f8!important;\n} */\n\n.button-component-label{\n text-align: center;\n text-decoration: none;\n display: inline-block;\n font-size: 16px; \n color: #5cc5f8!important;\n}\n\n#chat-container button {\n background-color: transparent;\n border: 0;\n cursor: pointer;\n}\n#send {\n max-width: 55px;\n outline: none;\n margin-right:15px;\n}\n#chat-bubble {\n margin: 0;\n padding: 0;\n transition: transform 0.5s;\n}\n#message {\n width: 260px;\n height: 21px;\n padding-top: 17.5px;\n padding-bottom: 17.5px;\n padding-left: 14px;\n outline: none;\n padding-right: 14px;\n}\n.message-box {\n margin-top: 5px;\n margin-bottom: 5px;\n width: fit-content;\n padding: 14px;\n border-radius: 6px;\n}\n.message-box-document {\n margin-top: 5px;\n margin-bottom: 5px;\n width: 100%;\n /* padding: 14px;\n border-radius: 6px; */\n}\n\n.message-box-own {\n margin-top: 5px;\n margin-bottom: 5px;\n width: fit-content;\n padding: 14px;\n border-radius: 6px;\n}\n.message-box-container {\n margin-top:10px;\n margin-bottom: 10px;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n}\n.message-box-container-own {\n margin-top:10px;\n margin-bottom: 10px;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n}\n.message-span {\n margin: 0;\n}\n.message-header-span {\n color: #aaa;\n}\n#chat-header {\n width: 100%;\n padding-right:13px;\n padding-left: 13px;\n height: 50px;\n background-color: white;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n box-sizing: border-box;\n}\n.visible-chat-bubble {\n height: 60px;\n width: 60px;\n border-radius: 50px;\n flex-grow: 100;\n outline: none;\n -webkit-box-shadow: 3px 6px 14px 0px rgba(133,116,133,1);\n -moz-box-shadow: 3px 6px 14px 0px rgba(133,116,133,1);\n box-shadow: 3px 6px 14px 0px rgba(133,116,133,1);\n transform:scale(1);\n}\n.not-visible {\n height: 0px;\n transform: scale(0);\n transform-origin: 90% 10%;\n position:absolute;\n right: 0;\n bottom: 0;\n flex-grow: 0;\n\n}\n.bubble-not-visible {\n transform:scale(0);\n position:absolute;\n height: 0px;\n flex-grow: 0;\n}\n\n.bubble-square {\n position: relative;\n min-height: 50px;\n min-width: 200px;\n padding: 5px;\n display:flex;\n align-items:center;\n background: white;\n border-radius: 8px;\n box-shadow: 1px 12px 33px rgba(0, 0, 0, 0.5);\n}\n/* .bubble-square:before {\n border: 25px solid white;\n content: '';\n border-left-color: transparent;\n border-bottom-color: transparent;\n border-right-color: transparent;\n position: absolute;\n bottom: -38px;\n left: calc(85% - 25px)\n} */\n\n.wellcome-label-button-div {\n margin: 0;\n display: inline-block;\n background: rgb(107, 120, 128);\n border-radius: 50px;\n text-align: center;\n cursor: pointer;\n width: 25px;\n height: 25px;\n position: absolute;\n top: -0px;\n z-index: 1;\n right: 10px;\n transform: scale(1);\n transition: transform 200ms cubic-bezier(0.18, 0.89, 0.32, 1.28) 50ms;\n}\n.wellcome-label-button-div:hover {\n transform: scale(1.25);\n}\n\n.wellcome-label-button-close {\n margin: 0 \n}\n\n.wellcome-label-title {\n font-size:1em;\n font-weight: bold;\n margin-right: 10px;\n}\n\n.wellcome-label-body {\n font-size:0.8em;\n margin-right: 10px;\n}\n\n.wellcome-label-container {\n border: 1px solid #ccc;\n padding: 10px;\n border-radius: 4px;\n margin-bottom: 10px;\n display: flex;\n justify-content: flex-start;\n}\n\n.img-tag-message {\n margin-top: 10px;\n max-width: 100%;\n}\n.document-div {\n margin-top: 10px;\n margin-left: 5px;\n max-width: 100%;\n display:flex;\n flex-direction: row;\n align-items: center;\n border: 2px solid;\n border-radius: 10px;\n padding: 14px;\n}\n\n.div-document{\n background-color: #fff;\n height: fit-content;\n width: 100%;\n cursor: pointer;\n border-radius: 10px;\n border:1px;\n padding: 5px;\n}\n\n.div-preview-files{\n max-width: 200px;\n background-color: #aaa;\n padding: 4px;\n}\n\n.border-top-radius{\n border-top-left-radius: 10px;\n border-top-right-radius: 10px;\n}\n\n.caption-document{\n display:flex;\n flex-direction: row;\n align-items: center;\n cursor: pointer;\n}\n.chat-bubble:hover{\n opacity: 0;\n transition: opacity 150ms cubic-bezier(0.33, 0, 0.67, 1) 50ms;\n}\n.bubble-icon-div {\n margin: auto;\n width: 32px;\n height: 32px;\n transform: scale(1);\n transition: transform 200ms cubic-bezier(0.18, 0.89, 0.32, 1.28) 50ms;\n}\n.bubble-icon-div:hover {\n transform: scale(1.25);\n}\n.dots-animation {\n opacity: 0;\n position: absolute;\n /* z-index: 1; */\n left: 0px;\n right: 0px;\n bottom: 1px;\n /* display: flex; */\n width: 32px;\n height: 32px;\n -webkit-box-align: center;\n align-items: center;\n -webkit-box-pack: center;\n justify-content: center;\n opacity: 1;\n transition: opacity 150ms cubic-bezier(0.33, 0, 0.67, 1) 50ms;\n}\n.dots-animation:hover{\n opacity: 1;\n}\n.dot-1 {\n transform-box: fill-box;\n transform-origin: 50% 50%;\n animation-timing-function: cubic-bezier(0, 0, 1, 1);\n animation-name: animation-1fn2epw;\n animation-duration: 1s;\n animation-iteration-count: 1;\n}\n.dot-2 {\n transform-box: fill-box;\n transform-origin: 50% 50%;\n animation-timing-function: cubic-bezier(0, 0, 1, 1);\n animation-name: animation-188vgt8;\n animation-duration: 1s;\n animation-iteration-count: 1;\n}\n.dot-3 {\n transform-box: fill-box;\n transform-origin: 50% 50%;\n animation-timing-function: cubic-bezier(0, 0, 1, 1);\n animation-name: animation-11sr958;\n animation-duration: 1s;\n animation-iteration-count: 1;\n}",""]),e.exports=t},7225:e=>{e.exports='<div class="${messageContainerClass}" style="${styleMessage}" data-id="${messageId}">\n <div class="message-header">\n <span class="message-header-span" style="color:${usernameInfoColor}">\n <strong>${dataUsername}</strong> ${timeMessage} </span>\n </div>\n <audio controls style="max-width: 100%;outline:none; margin-top: 10px;">\n <source src="${audioUrl}" type="${audioType}">\n Your browser does not support the audio element.\n </audio>\n</div>'},7454:e=>{e.exports='<hr class="margin:0px">\n<div class="button-component-div" ${buttonId} ${url}>\n <span class="button-component">${icon}</span>\n <button class="button-component-label"> ${label}</button>\n</div>\n\n'},3195:e=>{e.exports='\x3c!-- <link rel="stylesheet" href="../css/main.css"> --\x3e\n\x3c!-- <meta name="viewport" content="width=device-width, initial-scale=1.0"/> --\x3e\n<div id="chat-window" class="not-visible">\n <div id="chat-header">\n <div>\n\n </div>\n <span><strong>${titleChat}</strong></span>\n <div>\n <button id="minimize-btn" type="button">\n <svg style="width:24px;height:24px" viewBox="0 -5 24 24">\n <path id="minimize-btn-path" fill="currentColor" d="M20,14H4V10H20" />\n </svg>\n </button>\n \x3c!-- <button type="button">\n <svg style="width:24px;height:24px" viewBox="0 0 24 24">\n <path fill="currentColor" d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" />\n </svg>\n </button> --\x3e\n </div>\n \n </div>\n <div id="output" style="z-index: 2">\n </div>\n <div id="showInfoContactId" style="display: none;z-index: 3;height:100%"></div>\n <div id="chat-input-box">\n <input type="text" id="message" placeholder="${messagePlaceholder}">\n <button id="send">\x3c!-- <img id="icon-send" alt="Send"> --\x3e<?xml version="1.0" encoding="UTF-8"?>\n\n <svg id="send-icon" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="32" height="32" viewBox="0 0 24 24">\n <path d="M2,21L23,12L2,3V10L17,12L2,14V21Z" />\n </svg>\n </button>\n </div>\n \x3c!-- <div id="footer-chat">\n \n </div> --\x3e\n \n</div>\x3c!-- src="../img/send.svg" --\x3e\n<div id="wellcomeLabel" style="margin-bottom: 18px;"></div>\n<button id="chat-bubble" class="visible-chat-bubble">\n <div class="bubble-icon-div">\n ${chat-bubble-icon}\n \x3c!-- <svg style="width:24px;height:24px" viewBox="0 0 24 24">\n <path fill="currentColor" d="M12,3C17.5,3 22,6.58 22,11C22,15.42 17.5,19 12,19C10.76,19 9.57,18.82 8.47,18.5C5.55,21 2,21 2,21C4.33,18.67 4.7,17.1 4.75,16.5C3.05,15.07 2,13.13 2,11C2,6.58 6.5,3 12,3M17,12V10H15V12H17M13,12V10H11V12H13M9,12V10H7V12H9Z" />\n </svg> --\x3e\n </div>\n</button>'},3046:e=>{e.exports='<div style="display:flex;align-items:center; margin:8px" >\n ${icon}\n <div style="margin-left:8px;">\n <div >\n <span style="font-size:1em;font-weight: bold;color: black;"> ${headertext}</span>\n </div>\n <div >\n <span style="font-size:0.8em;"> ${subtext}</span>\n </div>\n </div>\n</div>'},7422:e=>{e.exports='<div class="${messageContainerClass}" style="${styleMessage}" data-id="${messageId}">\n <div class="message-header">\n <span class="message-header-span" style="color:${usernameInfoColor}">\n <strong>${dataUsername}</strong> ${timeMessage} </span>\n </div>\n <div style="display:flex;align-items:center;background-color: ${messageBackgroundColor};" class="${messageBoxClass}">\n <div>\n <div id="${messageId}" style="display:flex;align-items:center;cursor: pointer;">\n ${userIcon}\n <div style="margin-left:8px">\n <div >\n <span style="font-size:1em;font-weight: bold;margin-right:35px"> ${name}</span>\n </div>\n </div> \n </div>\n \x3c!-- <hr class="margin:0px">\n <div class="button-component-div">\n <button class="button-component-label;"> ${label}</button>\n </div> --\x3e\n </div> \n </div>\n</div>\n\n\n\n\n'},2325:e=>{e.exports='<div class="${messageContainerClass}" style="${styleMessage}" data-id="${messageId}">\n <div class="message-header">\n <span class="message-header-span" style="color:${usernameInfoColor}">\n <strong>${dataUsername}</strong> ${timeMessage} </span>\n </div>\n <a style="text-decoration:none;" href="${documentUrl}" target="_blank">\n <div class="div-document">\n <div class="div-preview-files">\n <div>\n <iframe src="${documentUrl}" scrolling="no" style="width: 100%;height: 70px;border: none;"></iframe>\n </div>\n <div class="caption-document">\n ${iconFile}\n <span>\n ${caption}\n </span>\n </div>\n </div>\n \x3c!-- <div style="background-color: ${messageBackgroundColor};margin:3px;">\n <span class="message-span" style="color:#CCC;">\n ${infoDocument}\n </span> \n </div> --\x3e\n </div>\n </a>\n \n \n</div>\n\n\n\n'},5926:e=>{e.exports='<div class="${messageContainerClass}" style="${styleMessage}" data-id="${messageId}">\n <div class="message-header">\n <span class="message-header-span" style="color:${usernameInfoColor}">\n <strong>${dataUsername}</strong> ${timeMessage} </span>\n </div>\n <img class="img-tag-message" src=${srcImg}>\n <div style="background-color: ${messageBackgroundColor};" class="${messageBoxClass}">\n <span class="message-span" style=\'color: ${messageColor};\'>\n ${caption}\n </span>\n </div>\n</div>'},8004:e=>{e.exports='<div class="${messageContainerClass}" style="${styleMessage}" data-id="${messageId}">\n <div class="message-header">\n <span class="message-header-span" style="color:${usernameInfoColor}">\n <strong>${dataUsername}</strong> ${timeMessage} </span>\n </div>\n <div id="${messageId}" style="display:flex;align-items:center;background-color: ${messageBackgroundColor};cursor: pointer;" class="${messageBoxClass}">\n ${locationIcon}\n <div style="margin-left:8px;">\n <div >\n <span style="font-size:1em;font-weight: bold;color: black;"> ${locationHeader}</span>\n </div>\n <div >\n <span style="font-size:0.8em;"> ${locationAddress}</span>\n </div>\n </div>\n </div>\n</div>\n\n\n\n\n'},6354:e=>{e.exports='<div class="${messageContainerClass}" style="${styleMessage}" data-id="${messageId}">\n <div class="message-header">\n <span class="message-header-span" style="color:${usernameInfoColor}">\n <strong>${dataUsername}</strong> ${timeMessage} </span>\n </div>\n <div style="background-color: ${messageBackgroundColor};" class="${messageBoxClass}">\n <span class="message-span" style=\'color: ${messageColor};\'>\n ${dataMessage}\n </span>\n </div>\n</div>'},6709:e=>{e.exports='\n<div style="${multimediaDocumentStyle}">\n <a style="text-decoration:none;" href="${documentUrl}" target="_blank">\n <div class="div-document">\n <div class="div-preview-files">\n <div>\n <iframe src="${documentUrl}" scrolling="no" style="width: 100%;height: 70px;border: none;"></iframe>\n </div>\n <div class="caption-document">\n ${iconFile}\n <span>\n ${caption}\n </span>\n </div>\n </div>\n </div>\n </a>\n</div>'},9436:e=>{e.exports='<div style="${multimediaImageStyle}">\n <img class="img-tag-message" src=${srcImg}>\n</div>\n'},2181:e=>{e.exports='<div style="${multimediaVideoStyle}">\n <video width="100%" style="margin-top:10px;" controls>\n <source src="${videoUrl}" type="${videoType}">\n Your browser does not support HTML5 video.\n </video>\n</div>\n'},4114:e=>{e.exports='<html>\n<head>\n</head>\n<body>\n\n<div style="margin-top:8px;margin-bottom:8px;display:flex;align-items:center;">\n\t<div style="margin-right:8px;cursor:pointer">\n \t\t ${backButtonIcon}\n </div>\n <div>\n \t<span>${infoContacttopBarText}</span>\n </div>\n</div>\n<hr class="margin:0px">\n<div style="padding:8px;margin-top:8px;margin-bottom:8px;display:flex;align-items:center" >\n ${userIcon}\n <div style="margin-left:8px;">\n <div >\n <span style="font-size:1em;font-weight: bold;color: black;"> ${nameContact}</span>\n </div>\n <div >\n <span style="font-size:0.8em;"> ${birthdayContact}</span>\n </div>\n </div>\n</div>\n \n<hr class="margin:0px">\n<div id="containerContact">\n\n</div>\n\n</body>\n</html>\n\n'},3012:e=>{e.exports='<div class="${messageContainerClass}" style="${styleMessage}" data-id="${messageId}">\n <div class="message-header">\n <span class="message-header-span" style="color:${usernameInfoColor}">\n <strong>${dataUsername}</strong> ${timeMessage} </span>\n </div>\n <div style="background-color: ${messageBackgroundColor};" class="${messageBoxClass}">\n <div style="margin-top: 5px;margin-bottom: 15px;">\n ${componentsHeader}\n </div>\n <div>\n ${componentsBody}\n </div>\n <div>\n ${componentsFooter}\n </div>\n <div style="margin-top: 15px;">\n ${componentsButton}\n </div>\n \n </div>\n</div>'},9663:e=>{e.exports='<div class="${messageContainerClass}" style="${styleMessage}" data-id="${messageId}">\n <div class="message-header">\n <span class="message-header-span" style="color:${usernameInfoColor}">\n <strong>${dataUsername}</strong> ${timeMessage} </span>\n </div>\n <video width="100%" style="margin-top:10px;" controls>\n <source src="${videoUrl}" type="${videoType}">\n Your browser does not support HTML5 video.\n </video>\n <div style="background-color: ${messageBackgroundColor};" class="${messageBoxClass}">\n <span class="message-span" style=\'color: ${messageColor};\'>\n ${caption}\n </span>\n </div>\n</div>\n\n\n\n\n'},2756:e=>{e.exports='<div id="wellcome-close" class="wellcome-label-button-div" style="background-color: ${wellcomeLabelIconCloseBackgroundColor}">\n <img src="${wellcomeLabelIconClose}" class="wellcome-label-button-close;" >\n</div>\n<div id="wellcomeLabelContainer" class="bubble-square" style="background-color: ${wellcomeLabelBackgroundColor};">\n <img id="wellcomeLabelIcon" width="50px" height="50px" src="xxxHTMLLINKxxx0.78433779000535360.07178597180478352xxx">\n <div style="margin-left: 10px;">\n <div >\n <span class="wellcome-label-title" style="color:\'${wellcomeLabelTextColor}\';"> ${wellcomeLabelTitle}</span>\n </div>\n <div >\n <span class="wellcome-label-body" style="color:\'${wellcomeLabelTextColor}\';"> ${wellcomeLabelBody}</span>\n </div>\n </div> \n</div>'},3468:(e,t,n)=>{var o=n(3379),r=n(1315);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.id,r,""]]);o(r,{insert:"head",singleton:!1}),e.exports=r.locals||{}},3379:(e,t,n)=>{"use strict";var o,r=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),i=[];function s(e){for(var t=-1,n=0;n<i.length;n++)if(i[n].identifier===e){t=n;break}return t}function a(e,t){for(var n={},o=[],r=0;r<e.length;r++){var a=e[r],c=t.base?a[0]+t.base:a[0],l=n[c]||0,u="".concat(c," ").concat(l);n[c]=l+1;var p=s(u),d={css:a[1],media:a[2],sourceMap:a[3]};-1!==p?(i[p].references++,i[p].updater(d)):i.push({identifier:u,updater:g(d,t),references:1}),o.push(u)}return o}function c(e){var t=document.createElement("style"),o=e.attributes||{};if(void 0===o.nonce){var i=n.nc;i&&(o.nonce=i)}if(Object.keys(o).forEach((function(e){t.setAttribute(e,o[e])})),"function"==typeof e.insert)e.insert(t);else{var s=r(e.insert||"head");if(!s)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");s.appendChild(t)}return t}var l,u=(l=[],function(e,t){return l[e]=t,l.filter(Boolean).join("\n")});function p(e,t,n,o){var r=n?"":o.media?"@media ".concat(o.media," {").concat(o.css,"}"):o.css;if(e.styleSheet)e.styleSheet.cssText=u(t,r);else{var i=document.createTextNode(r),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(i,s[t]):e.appendChild(i)}}function d(e,t,n){var o=n.css,r=n.media,i=n.sourceMap;if(r?e.setAttribute("media",r):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=o;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(o))}}var h=null,f=0;function g(e,t){var n,o,r;if(t.singleton){var i=f++;n=h||(h=c(t)),o=p.bind(null,n,i,!1),r=p.bind(null,n,i,!0)}else n=c(t),o=d.bind(null,n,t),r=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else r()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=(void 0===o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o));var n=a(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var o=0;o<n.length;o++){var r=s(n[o]);i[r].references--}for(var c=a(e,t),l=0;l<n.length;l++){var u=s(n[l]);0===i[u].references&&(i[u].updater(),i.splice(u,1))}n=c}}}},1766:e=>{"use strict";e.exports=JSON.parse('{"name":"indigitall-web-chat","description":"indigitall web chat","version":"1.3.1","main":"index.js","author":"Smart2me S.L.","homepage":"https://indigitall.com"}')},418:()=>{}},__webpack_module_cache__={};function __webpack_require__(e){if(__webpack_module_cache__[e])return __webpack_module_cache__[e].exports;var t=__webpack_module_cache__[e]={id:e,exports:{}};return __webpack_modules__[e].call(t.exports,t,t.exports,__webpack_require__),t.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e=__webpack_require__(3195),t=__webpack_require__.n(e),n=(__webpack_require__(3468),{platform:"web",version:"1.3.1"}),o=__webpack_require__(1766);n.version=o.version;const r=n=Object.assign(n,{defaultValues:{primaryColor:"#2a4864",zIndex:1e3,titleChat:"Chat with us!",userIsTyping:"is typing ...",messagePlaceholder:"Type your message here...",botName:"Agent",channelKey:null,externalCode:null,defaultUsername:"Me",openFileText:"Open file",backgroundChatColor:"#f6f6f7",backgroundBarColor:"#ffffff",urlServer:"https://chat-api.indigitall.com/web_chat",fullscreen:!1,defaultChatIconResource:"chat-bubble",logLevel:"",infoContactTopBarTitle:"Contact Info",wellcomeLabel:null}});function i(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n;return t=e,n=[{key:"pickTextColorBasedOnBgColorAdvanced",value:function(e,t,n){var o="#"===e.charAt(0)?e.substring(1,7):e,r=[parseInt(o.substring(0,2),16)/255,parseInt(o.substring(2,4),16)/255,parseInt(o.substring(4,6),16)/255].map((function(e){return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}));return.2126*r[0]+.7152*r[1]+.0722*r[2]>.179?n:t}}],null&&i(t.prototype,null),n&&i(t,n),e}();var a=__webpack_require__(7881),c=__webpack_require__(1352),l=__webpack_require__.n(c);function u(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n;return t=e,n=[{key:"getItemStorage",value:function(e){return sessionStorage.getItem(e)}},{key:"setItemStorage",value:function(e,t){sessionStorage.setItem(e,t)}},{key:"getMessagesStorage",value:function(){var t=[];try{t=JSON.parse(e.getItemStorage("messages"))}catch(e){console.error(e.message)}return t||[]}},{key:"addMessageToStorage",value:function(t,n){var o=e.getMessagesStorage();30===o.length&&o.shift(),o.push({data:t,isOwnMessage:n}),e.setItemStorage("messages",JSON.stringify(o))}}],null&&u(t.prototype,null),n&&u(t,n),e}();var d=__webpack_require__(6354),h=__webpack_require__.n(d),f=__webpack_require__(5926),g=__webpack_require__.n(f),y=__webpack_require__(7225),m=__webpack_require__.n(y),M=__webpack_require__(9663),b=__webpack_require__.n(M),v=__webpack_require__(2325),w=__webpack_require__.n(v),C=__webpack_require__(3012),x=__webpack_require__.n(C),L=__webpack_require__(8004),I=__webpack_require__.n(L),N=__webpack_require__(7454),k=__webpack_require__.n(N),j=__webpack_require__(7422),D=__webpack_require__.n(j),T=__webpack_require__(9436),A=__webpack_require__.n(T),E=__webpack_require__(2181),_=__webpack_require__.n(E),z=__webpack_require__(6709),O=__webpack_require__.n(z),S=__webpack_require__(2756),B=__webpack_require__.n(S);function U(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const $=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t&&(t.id&&(this.id=t.id),t.url&&(this.url=t.url),t.mimetype&&(this.mimetype=t.mimetype),t.caption&&(this.caption=t.caption),t.body&&(this.body=t.body),t.previewUrl&&(this.previewUrl=t.previewUrl),t.components&&(this.components=t.components),this.contact={},this.location={})}var t,n;return t=e,(n=[{key:"toJSON",value:function(){return{id:this.id,url:this.url,mimetype:this.mimetype,caption:this.caption,body:this.body,previewUrl:this.previewUrl,components:this.components}}},{key:"setBody",value:function(e){this.body=e}}])&&U(t.prototype,n),e}();function P(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const R=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t&&(t.title&&(this.title=t.title),t.company&&(this.company=t.company),t.department&&(this.department=t.department))}var t,n;return t=e,(n=[{key:"toJSON",value:function(){return{title:this.title,company:this.company,department:this.department}}}])&&P(t.prototype,n),e}();function F(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const Q=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t&&(t.last_name&&(this.lastName=t.last_name),t.first_name&&(this.firstName=t.first_name),t.formatted_name&&(this.formattedName=t.formatted_name))}var t,n;return t=e,(n=[{key:"toJSON",value:function(){return{last_name:this.lastName,first_name:this.firstName,formatted_name:this.formattedName}}}])&&F(t.prototype,n),e}();function H(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const Y=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t&&(t.email&&(this.email=t.email),t.type&&(this.type=t.type))}var t,n;return t=e,(n=[{key:"toJSON",value:function(){return{email:this.email,type:this.type}}}])&&H(t.prototype,n),e}();function Z(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const q=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t&&(t.zip&&(this.zip=t.zip),t.city&&(this.city=t.city),t.type&&(this.type=t.type),t.state&&(this.state=t.state),t.street&&(this.street=t.street),t.country&&(this.country=t.country),t.countryCode&&(this.countryCode=t.countryCode))}var t,n;return t=e,(n=[{key:"toJSON",value:function(){return{zip:this.zip,city:this.city,state:this.state,type:this.type,street:this.street,country:this.country,countryCode:this.countryCode}}}])&&Z(t.prototype,n),e}();function W(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const G=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t&&(t.phone&&(this.phone=t.phone),t.type&&(this.type=t.type))}var t,n;return t=e,(n=[{key:"toJSON",value:function(){return{phone:this.phone,type:this.type}}}])&&W(t.prototype,n),e}();function J(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const V=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t&&(t.url&&(this.url=t.url),t.type&&(this.type=t.type))}var t,n;return t=e,(n=[{key:"toJSON",value:function(){return{url:this.url,type:this.type}}}])&&J(t.prototype,n),e}();function X(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const K=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t){if(t.birthday&&(this.birthday=t.birthday),t.org&&(this.contactOrg=new R(t.org)),t.name&&(this.contactName=new Q(t.name)),t.emails){this.contactEmailList=[];for(var n=t.emails,o=0;o<n.length;o++)this.contactEmailList.push(new Y(n[o]))}if(t.addresses){this.contactAddressList=[];var r=t.addresses;for(o=0;o<r.length;o++)this.contactAddressList.push(new q(r[o]))}if(t.phones){this.contactPhoneList=[];var i=t.phones;for(o=0;o<i.length;o++)this.contactPhoneList.push(new G(i[o]))}if(t.urls){this.contactURLList=[];var s=t.urls;for(o=0;o<s.length;o++)this.contactURLList.push(new V(s[o]))}}}var t,n;return t=e,(n=[{key:"toJSON",value:function(){var e={};if(this.birthday&&(e.birthday=this.birthday),this.contactName&&(e.name=this.contactName),this.contactOrg&&(e.org=this.contactOrg),this.addressList){var t=[];for(address in this.addressList)t.push(address.toJSON());e.addresses=t}if(this.emailList){for(email in t=[],this.emailList)t.push(email.toJSON());e.emails=t}if(this.contactPhoneList){for(phone in t=[],this.contactPhoneList)t.push(phone.toJSON());e.phones=t}if(this.contactURLList){for(url in t=[],this.contactURLList)t.push(url.toJSON());e.urls=t}return e}}])&&X(t.prototype,n),e}();function ee(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const te=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t&&(t.name&&(this.name=t.name),t.address&&(this.address=t.address),t.latitude&&(this.latitude=t.latitude),t.longitude&&(this.longitude=t.longitude))}var t,n;return t=e,(n=[{key:"toJSON",value:function(){return{name:this.name,address:this.address,latitude:this.latitude,longitude:this.longitude}}}])&&ee(t.prototype,n),e}();function ne(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const oe=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t&&(t.messageId&&(this.messageId=t.messageId),t.timespan&&(this.timespan=t.timespan),t.sendType&&(this.sendType=t.sendType),t.contentType&&(this.contentType=t.contentType),t.content&&(this.content=new $(t.content),"location"==this.contentType&&(this.content.location=new te(t.content)),"contacts"==this.contentType&&(this.content.contact=new K(t.content[0]))),t.error&&(this.error=t.error))}var t,n;return t=e,(n=[{key:"toJSON",value:function(){return{messageId:this.messageId,timespan:this.timespan,sendType:this.sendType,contentType:this.contentType,content:this.content?this.content.toJSON():null,error:this.error}}}])&&ne(t.prototype,n),e}(),re=Object.freeze({HEADER:"header",BODY:"body",FOOTER:"footer",BUTTON:"button"}),ie=Object.freeze({URL:"url",QUICK_REPLY:"quickReply",PHONE:"phoneCall"}),se=Object.freeze({VIDEO:"video",DOCUMENT:"document",IMAGE:"image"});function ae(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const ce=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.CHAT_BUBBLE="chat-bubble"}var t,n;return t=e,n=[{key:"getIconButton",value:function(t){return t==ie.URL?'<img src="'.concat("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciICB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9Im5vbmUiICBzdHJva2U9IiM1Y2M1ZjgiIHN0cm9rZS13aWR0aD0iMiIgd2lkdGg9IjE2cHgiICBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItZXh0ZXJuYWwtbGluayI+PHBhdGggZD0iTTE4IDEzdjZhMiAyIDAgMCAxLTIgMkg1YTIgMiAwIDAgMS0yLTJWOGEyIDIgMCAwIDEgMi0yaDYiPjwvcGF0aD48cG9seWxpbmUgcG9pbnRzPSIxNSAzIDIxIDMgMjEgOSI+PC9wb2x5bGluZT48bGluZSB4MT0iMTAiIHkxPSIxNCIgeDI9IjIxIiB5Mj0iMyI+PC9saW5lPjwvc3ZnPg==",'" />'):t==ie.PHONE?'<img src="'.concat("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiAgc3Ryb2tlPSIjNWNjNWY4IiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIG1lZXQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3R5bGU9Ii1tcy10cmFuc2Zvcm06IHJvdGF0ZSgzNjBkZWcpOyAtd2Via2l0LXRyYW5zZm9ybTogcm90YXRlKDM2MGRlZyk7IHRyYW5zZm9ybTogcm90YXRlKDM2MGRlZyk7Ij48cGF0aCBkPSJNMjAuMDEgMTUuMzhjLTEuMjMgMC0yLjQyLS4yLTMuNTMtLjU2YS45NzcuOTc3IDAgMCAwLTEuMDEuMjRsLTEuNTcgMS45N2MtMi44My0xLjM1LTUuNDgtMy45LTYuODktNi44M2wxLjk1LTEuNjZjLjI3LS4yOC4zNS0uNjcuMjQtMS4wMmMtLjM3LTEuMTEtLjU2LTIuMy0uNTYtMy41M2MwLS41NC0uNDUtLjk5LS45OS0uOTlINC4xOUMzLjY1IDMgMyAzLjI0IDMgMy45OUMzIDEzLjI4IDEwLjczIDIxIDIwLjAxIDIxYy43MSAwIC45OS0uNjMuOTktMS4xOHYtMy40NWMwLS41NC0uNDUtLjk5LS45OS0uOTl6IiBmaWxsPSJub25lIi8+PC9zdmc+",'" />'):t==(new e).CHAT_BUBBLE?'<svg class="bubble-icon" viewBox="0 0 32 32">\n <path fill="currentColor" d="M11.9,26H8.6c-3.3,0-6.2-2.4-6.4-5.8C1.9,17,2,12,2.2,8.9c0.3-3.1,2.8-5.4,5.8-5.6c4.8-0.3,11-0.3,15.9,0 c3.1,0.2,5.6,2.6,5.8,5.7c0.2,3.1,0.2,8.2,0,11.2c-0.3,3.4-3.2,5.8-6.4,5.8h-2.5c-0.4,0-0.9,0.2-1.2,0.4l-6.1,4.4 C12.9,31.3,12,30.9,12,30v-4H11.9z">\n </path>\n </svg>\n <div class="dots-animation">\n <svg id=\'threePoints\' style="margin-top:10px;" viewBox="0 0 60 40" width="18px" fill="#000000">\n <circle r="6" cy="20" cx="9" class="dot-1 epoxe490"></circle>\n <circle r="6" cy="20" cx="30" class="dot-2 epoxe490"></circle>\n <circle r="6" cy="20" cx="51" class="dot-3 epoxe490"></circle>\n </svg>\n </div>':""}},{key:"getIconFile",value:function(e){return e.includes("pdf")?'<img src="'.concat("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE4LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCINCgkgdmlld0JveD0iMCAwIDU2IDU2IiB3aWR0aD0iMjZweCIgIHN0eWxlPSJlbmFibGUtYmFja2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LjkyNEg0MC45djEuMjQ0SDM2LjI2NnoiLz4NCgk8L2c+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8L3N2Zz4NCg==",'" />'):'<img src="'.concat("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciICAgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgd2lkdGg9IjI2cHgiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBjbGFzcz0iZmVhdGhlciBmZWF0aGVyLWZpbGUtdGV4dCI+PHBhdGggZD0iTTE0IDJINmEyIDIgMCAwIDAtMiAydjE2YTIgMiAwIDAgMCAyIDJoMTJhMiAyIDAgMCAwIDItMlY4eiI+PC9wYXRoPjxwb2x5bGluZSBwb2ludHM9IjE0IDIgMTQgOCAyMCA4Ij48L3BvbHlsaW5lPjxsaW5lIHgxPSIxNiIgeTE9IjEzIiB4Mj0iOCIgeTI9IjEzIj48L2xpbmU+PGxpbmUgeDE9IjE2IiB5MT0iMTciIHgyPSI4IiB5Mj0iMTciPjwvbGluZT48cG9seWxpbmUgcG9pbnRzPSIxMCA5IDkgOSA4IDkiPjwvcG9seWxpbmU+PC9zdmc+",'" />')}},{key:"getWellcomeLabelIcon",value:function(e){}},{key:"getIconMessage",value:function(e){return"backArrow"==e?'<img id="backButtonId" style="width:25px;margin-left:5px" src="'.concat("data:image/svg+xml;base64,PD94bWw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5LjIzOSAyMC43NjEgNyAxOCA3IEwgMTQgNyB6IE0gNyAxMSBMIDcgMTMgTCAxNyAxMyBMIDE3IDExIEwgNyAxMSB6Ij48L3BhdGg+PC9zdmc+",'" />'):"map"==e?'<img style="width:35px" src="'.concat("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+ICAgIDxwYXRoIGQ9Ik0xNC45NjksNS4wMDZMOC45NjksM0wzLDUuMzg4djAuMDA2djE2LjE0OGw2LjAzMS0yLjQxMmw2LDIuMDA2TDIxLDE4Ljc0N3YtMC4wMDZWMi41OTRMMTQuOTY5LDUuMDA2eiBNOSwxNy4wMVY1LjE0NyBsMC4wMzEtMC4wMTNMMTUsNy4xMjR2MTEuODYzTDE0Ljk2OSwxOUw5LDE3LjAxeiI+PC9wYXRoPjwvc3ZnPg==",'" />'):"markerMap"==e?'<img style="width:25px" src="'.concat("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MCA1MCI+PHBhdGggZD0iTSAyNSAwLjA2MjUgQyAxNy4zMjAzMTMgMC4wNjI1IDExLjA2MjUgNi4zMjAzMTMgMTEuMDYyNSAxNCBDIDExLjA2MjUgMjYuMjQ2MDk0IDIzLjcxMDkzOCA0Mi44NjMyODEgMjQuMjUgNDMuNTYyNSBDIDI0LjQyNTc4MSA0My43OTI5NjkgMjQuNzEwOTM4IDQzLjkzNzUgMjUgNDMuOTM3NSBDIDI1LjI4OTA2MyA0My45Mzc1IDI1LjU3NDIxOSA0My43OTI5NjkgMjUuNzUgNDMuNTYyNSBDIDI2LjI4OTA2MyA0Mi44NTE1NjMgMzguOTM3NSAyNS45NjQ4NDQgMzguOTM3NSAxNCBDIDM4LjkzNzUgNi4zMjAzMTMgMzIuNjc5Njg4IDAuMDYyNSAyNSAwLjA2MjUgWiBN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QwVjM1Qzg0IDMwLjYgODAuNCAyNyA3NiAyN3pNNzggNDVINTBWMzVjMC0xLjEuOS0yIDItMmgyNGMxLjEgMCAyIC45IDIgMlY0NXoiPjwvcGF0aD48L3N2Zz4=",'" />'):"user"==e?'<img style="width:35px" src="'.concat("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48cGF0aCBkPSJNMjU2LDExQzEyMC42OSwxMSwxMSwxMjAuNjksMTEsMjU2UzEyMC42OSw1MDEsMjU2LDUwMSw1MDEsMzkxLjMxLDUwMSwyNTYsMzkxLjMxLDExLDI1NiwxMVptMCw5OS43NzMzYTg4LjAyNTgsODguMDI1OCwwLDEsMS04OC4wMjU5LDg4LjAyNThBODguMDI1OSw4OC4wMjU5LDAsMCwxLDI1NiwxMTAuNzczM1pNMzgwLjEyNjksMzU0LjM5OGE0Ni44Mjg5LDQ2LjgyODksMCwwLDEtNDYuODI4Niw0Ni44Mjg2SDE3OC43MDE2YTQ2LjgyODUsNDYuODI4NSwwLDAsMS00Ni44MjgxLTQ2LjgyODZ2MGE0Ni44Mjg1LDQ2LjgyODUsMCwwLDEsNDYuODI4MS00Ni44Mjg2SDMzMy4yOTgzYTQ2LjgyODksNDYuODI4OSwwLDAsMSw0Ni44Mjg2LDQ2LjgyODZaIj48L3BhdGg+PC9zdmc+",'" />'):void 0}}],null&&ae(t.prototype,null),n&&ae(t,n),e}(),le=Object.freeze({QUICK_REPLY_EVENT:"quick_reply_event"});function ue(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const pe=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n;return t=e,n=[{key:"createMessage",value:function(e,t,n,o){this.isOwnMessage=n,this.usernameInfoColor=s.pickTextColorBasedOnBgColorAdvanced(t.backgroundChatColor,"#ffffff","#aaaaaa"),this.backgroundColor=t.primaryColor,this.defaultLetterColor="#000000",this.defaultBackgroundColor="#ffffff",this.letterColor=s.pickTextColorBasedOnBgColorAdvanced(this.backgroundColor,"#ffffff","#000000");var r=new oe(e),i="";if(n){var c=t.externalCode?t.externalCode:t.defaultUsername;return i=a.Z.parseMessage(r.content.body,!0),this.setTextMessage(r,i,c,o)}if(e.content&&"text"===e.contentType){var l=r.content.body;i=a.Z.parseMessage(l)}this.botName=t.botName;var u=null;switch(null!=r.content.caption&&(u=a.Z.parseMessage(r.content.caption)),e.contentType){case"text":return this.setTextMessage(r,i,null,null);case"image":return this.setImageMessage(r,u);case"video":return this.setVideoMessage(r,u);case"audio":return this.setAudioMessage(r,u);case"document":return this.setDocumentMessage(r,u,t.openFileText);case"template":return this.setTemplateMessage(r);case"location":return this.setLocationMessage(r);case"contacts":return this.setContactMessage(r)}}},{key:"setTemplateMessage",value:function(e){var t=e.content.components;if(t){for(var n,o,r,i="",s="",c=0;c<t.length;c++)switch(t[c].type){case re.HEADER:if(t[c].text)n=a.Z.parseMessage(t[c].text);else if(t[c].multimedia)switch(t[c].multimedia.type){case se.IMAGE:o=A().replace("${multimediaImageStyle}","").replace("${srcImg}",t[c].multimedia.url);break;case se.VIDEO:o=_().replace("${multimediaVideoStyle}","").replace("${videoType}",t[c].multimedia.mimetype).replace("${videoUrl}",t[c].multimedia.url);break;case se.DOCUMENT:var l="Download file";null!=t[c].multimedia.caption&&(l=t[c].multimedia.caption),o=O().replace("${multimediaDocumentStyle}","").replaceAll("${documentUrl}",t[c].multimedia.url).replace("${iconFile}",ce.getIconFile(t[c].multimedia.mimetype)).replace("${caption}",l)}else n="";break;case re.BODY:i=a.Z.parseMessage(t[c].text);break;case re.FOOTER:s=a.Z.parseMessage(t[c].text);break;case re.BUTTON:var u="";t[c].subType==ie.URL&&(u=ce.getIconButton(ie.URL)),t[c].subType==ie.PHONE&&(u=ce.getIconButton(ie.PHONE));var p=t[c].payload,d=t[c].url,h=k().replaceAll("${label}",t[c].phone?"".concat(t[c].label,': <a href="tel:').concat(t[c].phone,'">').concat(t[c].phone,"</a>"):t[c].label).replace("${url}",d?"onclick=\"window.open('".concat(d,"')\""):"").replace("${buttonId}",p?'id="'.concat(p,'"'):"").replace("${icon}",u);r=r?r+h:h}return x().replace("${messageContainerClass}",this.isOwnMessage?"message-box-container-own":"message-box-container").replace("${messageBoxClass}",this.isOwnMessage?"message-box-own":"message-box").replace("${messageBackgroundColor}",this.isOwnMessage?this.backgroundColor:this.defaultBackgroundColor).replace("${styleMessage}","").replace("${messageId}",e.messageId).replace("${usernameInfoColor}",this.usernameInfoColor).replace("${dataUsername}",this.botName).replace("${timeMessage}",a.Z.getTime(e.timespan)).replace("${componentsHeader}",n||o).replace("${componentsBody}",i).replace("${componentsFooter}",s).replace("${componentsButton}",r||"")}}},{key:"setTextMessage",value:function(e,t,n,o){return this.isOwnMessage?h().replace("${messageContainerClass}",this.isOwnMessage?"message-box-container-own":"message-box-container").replace("${messageBoxClass}",this.isOwnMessage?"message-box-own":"message-box").replace("${dataMessage}",t).replace("${dataUsername}",n).replace("${messageBackgroundColor}",this.isOwnMessage?this.backgroundColor:this.defaultBackgroundColor).replace("${messageColor}",this.isOwnMessage?this.letterColor:this.defaultLetterColor).replace("${timeMessage}",a.Z.getTime(e.timestamp)).replace("${messageId}",e.messageId).replace("${usernameInfoColor}",this.usernameInfoColor).replace("${styleMessage}",o?"display:flex;":"display:none;"):h().replace("${messageContainerClass}",this.isOwnMessage?"message-box-container-own":"message-box-container").replace("${messageBoxClass}",this.isOwnMessage?"message-box-own":"message-box").replace("${dataMessage}",t).replace("${dataUsername}",this.botName).replace("${messageBackgroundColor}",this.isOwnMessage?this.backgroundColor:this.defaultBackgroundColor).replace("${messageColor}",this.isOwnMessage?this.letterColor:this.defaultLetterColor).replace("${timeMessage}",a.Z.getTime(e.timespan)).replace("${usernameInfoColor}",this.usernameInfoColor).replace("${messageId}",e.messageId).replace("${styleMessage}","")}},{key:"setImageMessage",value:function(e,t){return g().replace("${messageContainerClass}",this.isOwnMessage?"message-box-container-own":"message-box-container").replace("${caption}",t).replace("${dataUsername}",this.botName).replace("${timeMessage}",a.Z.getTime(e.timespan)).replace("${messageBoxClass}",this.isOwnMessage?"message-box-own":"message-box").replace("${messageId}",e.messageId).replace("${styleMessage}","").replace("${usernameInfoColor}",this.usernameInfoColor).replace("${srcImg}",e.content.url).replace("${messageBackgroundColor}",this.isOwnMessage?this.backgroundColor:this.defaultBackgroundColor).replace("${messageColor}",this.isOwnMessage?this.letterColor:this.defaultLetterColor)}},{key:"setVideoMessage",value:function(e,t){return b().replace("${messageContainerClass}",this.isOwnMessage?"message-box-container-own":"message-box-container").replace("${caption}",t).replace("${dataUsername}",this.botName).replace("${timeMessage}",a.Z.getTime(e.timespan)).replace("${messageBoxClass}",this.isOwnMessage?"message-box-own":"message-box").replace("${messageId}",e.messageId).replace("${styleMessage}","").replace("${usernameInfoColor}",this.usernameInfoColor).replace("${videoUrl}",e.content.url).replace("${messageColor}",this.isOwnMessage?this.letterColor:this.defaultLetterColor).replace("${messageBackgroundColor}",this.isOwnMessage?this.backgroundColor:this.defaultBackgroundColor).replace("${videoType}",e.content.mimetype)}},{key:"setLocationMessage",value:function(e){return I().replace("${messageContainerClass}",this.isOwnMessage?"message-box-container-own":"message-box-container").replace("${dataUsername}",this.botName).replace("${timeMessage}",a.Z.getTime(e.timespan)).replace("${messageBoxClass}",this.isOwnMessage?"message-box-own":"message-box").replaceAll("${messageId}",e.messageId).replace("${styleMessage}","").replace("${locationIcon}",ce.getIconMessage("map")).replace("${usernameInfoColor}",this.usernameInfoColor).replace("${messageBackgroundColor}",this.isOwnMessage?this.backgroundColor:this.defaultBackgroundColor).replace("${locationHeader}",e.content.location.name).replace("${locationAddress}",e.content.location.address)}},{key:"setContactMessage",value:function(e){return D().replace("${messageContainerClass}",this.isOwnMessage?"message-box-container-own":"message-box-container").replace("${dataUsername}",this.botName).replace("${timeMessage}",a.Z.getTime(e.timespan)).replace("${messageBoxClass}",this.isOwnMessage?"message-box-own":"message-box").replaceAll("${messageId}",e.messageId).replace("${styleMessage}","").replace("${usernameInfoColor}",this.usernameInfoColor).replace("${userIcon}",ce.getIconMessage("user")).replace("${messageBackgroundColor}",this.isOwnMessage?this.backgroundColor:this.defaultBackgroundColor).replace("${name}",e.content.contact.contactName.formattedName)}},{key:"setAudioMessage",value:function(e,t){return m().replace("${messageContainerClass}",this.isOwnMessage?"message-box-container-own":"message-box-container").replace("${caption}",t).replace("${dataUsername}",this.botName).replace("${dataMessage}",e.content.caption).replace("${timeMessage}",a.Z.getTime(e.timespan)).replace("${messageBoxClass}",this.isOwnMessage?"message-box-own":"message-box").replace("${messageId}",e.messageId).replace("${usernameInfoColor}",this.usernameInfoColor).replace("${styleMessage}","").replace("${audioUrl}",e.content.url).replace("${audioType}",e.content.mimetype)}},{key:"setDocumentMessage",value:function(e,t,n){return w().replace("${messageContainerClass}",this.isOwnMessage?"message-box-container-own":"message-box-container").replace("${caption}",t).replace("${dataUsername}",this.botName).replace("${dataMessage}",e.content.caption).replace("${timeMessage}",a.Z.getTime(e.timespan)).replace("${messageBoxClass}",this.isOwnMessage?"message-box-own":"message-box-document").replace("${messageId}",e.messageId).replace("${styleMessage}","").replace("${openFileText}",n).replace("${messageBackgroundColor}",this.isOwnMessage?this.backgroundColor:this.defaultBackgroundColor).replaceAll("${documentUrl}",e.content.url).replace("${usernameInfoColor}",this.usernameInfoColor).replace("${colorDownloadButton}",this.backgroundColor).replace("${fileType}",e.content.mimetype).replace("${iconFile}",ce.getIconFile(e.content.mimetype))}},{key:"setWellcomeLabel",value:function(e){return B().replace("${wellcomeLabelIconClose}",e.closeIcon).replace("${wellcomeLabelIconCloseBackgroundColor}",e.closeIconBackGroundColor?e.closeIconBackGroundColor:"transparent").replace("${wellcomeLabelTitle}",e.title?e.title:"").replace("${wellcomeLabelBody}",e.body?e.body:"").replace("${wellcomeLabelBackgroundColor}",e.backgrounColor?e.backgrounColor:"#ffffff").replaceAll("${wellcomeLabelTextColor}",e.textColor?e.textColor:"#000000")}}],null&&ue(t.prototype,null),n&&ue(t,n),e}();function de(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const he=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n;return t=e,n=[{key:"isFunction",value:function(e){return!(!e||"function"!=typeof e)}}],null&&de(t.prototype,null),n&&de(t,n),e}();function fe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const ge=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.eventName=t}var t,n;return t=e,(n=[{key:"toJSON",value:function(){return{eventName:this.eventName}}}])&&fe(t.prototype,n),e}();function ye(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const me=function(){function e(t,n,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t&&(this.conversationSessionId=t),n&&(this.contentReplyPayload=new ge(n).toJSON()),o&&(this.contentType=o)}var t,n;return t=e,(n=[{key:"toJSON",value:function(){return{conversationSessionId:this.conversationSessionId,content:this.contentReplyPayload,contentType:this.contentType}}}])&&ye(t.prototype,n),e}();function Me(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var be=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.storage=this.isLocalStorageAvailable()?window.localStorage:null}var t,n;return t=e,(n=[{key:"isLocalStorageAvailable",value:function(){try{var e=window.localStorage,t="__storage_test__";if(e)return e.setItem(t,t),e.removeItem(t),!0}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==be.length}return!1}},{key:"setItem",value:function(e,t){return null!=this.storage&&(this.storage.setItem(e,t),!0)}},{key:"getItem",value:function(e){return null!=this.storage?this.storage.getItem(e):null}},{key:"deleteItem",value:function(e){return!!this.storage&&(this.storage.setItem(e,value),!0)}},{key:"clear",value:function(){this.storage&&this.storage.clear()}}])&&Me(t.prototype,n),e}());const ve=be;function we(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const Ce=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.REPOSITORY="indigitall-chat.repository",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL"}var t,n;return t=e,(n=[{key:"clearStorage",value:function(){ve.clear()}},{key:"setLogLevel",value:function(e){ve.setItem(this.LOG_LEVEL,e)}},{key:"getLogLevel",value:function(){return ve.getItem(this.LOG_LEVEL)}}])&&we(t.prototype,n),e}()),xe=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});function Le(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const Ie=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.tag="[IND]",t&&(this.tag=t),this.level=xe.DEBUG,this.setLogLevel(Ce.getLogLevel()),this.log=[]}var t,n,o;return t=e,o=[{key:"addedAsString",value:function(e){return"string"==typeof e?e:JSON.stringify(e,null,2)}}],(n=[{key:"setLogLevel",value:function(e){e&&e>=xe.DEBUG&&e<=xe.ERROR&&(this.level=e)}},{key:"d",value:function(){if(this.level<=xe.DEBUG)for(var t=0;t<arguments.length;t++)this.log+=e.addedAsString(arguments[t]);return this}},{key:"i",value:function(){if(this.level<=xe.INFO)for(var t=0;t<arguments.length;t++)this.log+=e.addedAsString(arguments[t]);return this}},{key:"w",value:function(){if(this.level<=xe.WARNING)for(var t=0;t<arguments.length;t++)this.log+=e.addedAsString(arguments[t]);return this}},{key:"e",value:function(){if(this.level<=xe.ERROR)for(var t=0;t<arguments.length;t++)this.log+=e.addedAsString(arguments[t]);return this}},{key:"e",value:function(e){return this.level<=xe.ERROR&&(this.log+="".concat(e.errorCode,": ").concat(e.errorMessage)),this}},{key:"writeLog",value:function(){this.log.length>0&&console.log(this.tag,this.log),this.log=[]}}])&&Le(t.prototype,n),o&&Le(t,o),e}();var Ne=__webpack_require__(4114),ke=__webpack_require__.n(Ne),je=__webpack_require__(3046),De=__webpack_require__.n(je);function Te(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var Ae="[IND]Socket: ";const Ee=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.output=n,this.config=t,this.socket=l()(t.urlServer,{path:"/socket",transports:["websocket","polling"]})}var t,n;return t=e,(n=[{key:"connectSocket",value:function(e,t){var n=this,o=new Ie(Ae),r=this.socket;r.on("connect",(function(){var i=p.getItemStorage("socketId");i||(i=n.config.externalCode?n.config.externalCode:a.Z.generateId(),p.setItemStorage("socketId",i)),r.emit("authentication",{channelKey:n.config.channelKey,externalCode:a.Z.encryptText(i,n.config.channelKey)}).on("authenticated",(function(){if(p.getItemStorage("welcomeEmitted")||null==r){if(null==r&&he.isFunction(t))return o.e("error starting the conversation: Socket null").writeLog(),void t("error starting the conversation: Socket null")}else r.emit("start_conversation"),p.setItemStorage("welcomeEmitted",!0);he.isFunction(e)&&e()})).on("unauthorized",(function(e){o.e("connection error! "+e).writeLog(),he.isFunction(t)&&t("connection error! "+e)}))})),r.on("message_status",(function(e){var t=document.querySelectorAll('[data-id="'.concat(e.id,'"]'));t&&1===t.length&&(t[0].style.display="flex"),n.output.scrollTop=n.output.scrollHeight})),r.on("message_received",(function(e){if(o.d("Message_received: "+JSON.stringify(e)).writeLog(),n.output.innerHTML.indexOf(-1==="messageId:".concat(e.messageId))){var t=pe.createMessage(e,n.config,!1);p.addMessageToStorage(e,!1),n.output.innerHTML+=t,n.output.scrollTop=n.output.scrollHeight,n.buttonsComponents();var r=new oe(e);"location"==r.contentType&&n.locationAction(r),"contacts"==r.contentType&&n.contactAction(r,n.config)}}))}},{key:"contactAction",value:function(e,t){var n=e.content.contact;null!=n&&document.getElementById(e.messageId).addEventListener("click",(function(e){var o=document.getElementById("output"),r=document.getElementById("showInfoContactId");o.style.visibility="hidden",r.style.display="block",r.style.backgroundColor="#ffffff";var i="".concat(n.contactName.firstName," ").concat(n.contactName.lastName);n.contactName.formattedName&&(i=n.contactName.formattedName),r.innerHTML=ke().replace("${nameContact}",i).replace("${infoContacttopBarText}",t.infoContactTopBarTitle).replace("${backButtonIcon}",ce.getIconMessage("backArrow")).replace("${userIcon}",ce.getIconMessage("user")).replace("${birthdayContact}",n.birthday);var s=document.getElementById("containerContact");if(n.contactPhoneList&&n.contactPhoneList.length>0)for(var a=0;a<n.contactPhoneList.length;a++){var c=De().replace("${icon}",ce.getIconMessage("phone")).replace("${headertext}",n.contactPhoneList[a].phone).replace("${subtext}",n.contactPhoneList[a].type);s.innerHTML+=c}if(document.getElementById("backButtonId").addEventListener("click",(function(e){r.style.display="none",o.style.visibility="visible"})),n.contactOrg&&(c=De().replace("${icon}",ce.getIconMessage("suitcase")).replace("${headertext}",n.contactOrg.title).replace("${subtext}","".concat(n.contactOrg.company," - ").concat(n.contactOrg.department)),s.innerHTML+=c),n.contactEmailList&&n.contactEmailList.length>0)for(a=0;a<n.contactEmailList.length;a++)c=De().replace("${icon}",ce.getIconMessage("email")).replace("${headertext}",n.contactEmailList[a].email).replace("${subtext}",n.contactEmailList[a].type),s.innerHTML+=c;if(n.contactAddressList&&n.contactAddressList.length>0)for(a=0;a<n.contactAddressList.length;a++){var l=n.contactAddressList[a],u="".concat(l.street," <br/> ").concat(l.state," ").concat(l.city," ").concat(l.zip," ").concat(l.coutry);c=De().replace("${icon}",ce.getIconMessage("markerMap")).replace("${headertext}",u).replace("${subtext}",l.type),s.innerHTML+=c}if(n.contactURLList&&n.contactURLList.length>0)for(a=0;a<n.contactURLList.length;a++)c=De().replace("${icon}",ce.getIconMessage("link")).replace("${headertext}",n.contactURLList[a].url).replace("${subtext}",n.contactURLList[a].type),s.innerHTML+=c}))}},{key:"locationAction",value:function(e){document.getElementById(e.messageId).addEventListener("click",(function(t){window.open("https://www.google.es/maps/search/".concat(e.content.location.latitude,",").concat(e.content.location.longitude))}))}},{key:"buttonsComponents",value:function(){var e=this,t=document.getElementsByClassName("button-component-div");if(t&&t.length>0)for(var n=0;n<t.length;n++){var o=t[n].id;o&&""!=o&&t[n].addEventListener("click",(function(t){e.messageSend(new me(p.getItemStorage("socketId"),t.currentTarget.id,le.QUICK_REPLY_EVENT).toJSON())}))}}},{key:"messageSend",value:function(e){var t=new Ie(Ae);this.socket.emit("send_message",e),t.d("Message_send: "+JSON.stringify(e)).writeLog()}}])&&Te(t.prototype,n),e}(),_e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t&&(t.title&&(this.title=t.title),t.body&&(this.body=t.body),t.icon&&(this.icon=t.icon),t.backgrounColor&&(this.backgrounColor=t.backgrounColor),t.textColor&&(this.textColor=t.textColor),t.delay&&(this.delay=t.delay),t.closeIcon?this.closeIcon=t.closeIcon:this.closeIcon="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEyLDIwQzcuNTksMjAgNCwxNi40MSA0LDEyQzQsNy41OSA3LjU5LDQgMTIsNEMxNi40MSw0IDIwLDcuNTkgMjAsMTJDMjAsMTYuNDEgMTYuNDEsMjAgMTIsMjBNMTIsMkM2LjQ3LDIgMiw2LjQ3IDIsMTJDMiwxNy41MyA2LjQ3LDIyIDEyLDIyQzE3LjUzLDIyIDIyLDE3LjUzIDIyLDEyQzIyLDYuNDcgMTcuNTMsMiAxMiwyTTE0LjU5LDhMMTIsMTAuNTlMOS40MSw4TDgsOS40MUwxMC41OSwxMkw4LDE0LjU5TDkuNDEsMTZMMTIsMTMuNDFMMTQuNTksMTZMMTYsMTQuNTlMMTMuNDEsMTJMMTYsOS40MUwxNC41OSw4WiIgLz48L3N2Zz4=",t.closeIconBackGroundColor&&(this.closeIconBackGroundColor=t.closeIconBackGroundColor))};function ze(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var Oe=!1,Se=!1,Be=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.version=r.version}var n,o;return n=e,o=[{key:"init",value:function(e,n,o){var i=this,c=xe.DEBUG;""!=e.logLevel&&(c=e.logLevel),Ce.setLogLevel(c);var l,u=r.defaultValues,p=a.Z.mergeObjects(u,e),d=p.zIndex,h=p.defaultChatIconResource;l=h!=(new ce).CHAT_BUBBLE?t().replace("${chat-bubble-icon}",'<img src="'.concat(h,'" class="bubble-icon" style="width:100%">')):t().replace("${chat-bubble-icon}",ce.getIconButton(h));var f=document.createElement("div");f.innerHTML=l.replace("${titleChat}",p.titleChat).replace("${messagePlaceholder}",p.messagePlaceholder);var g=document.createElement("meta");g.setAttribute("name","viewport"),g.content="width=device-width, height=device-height initial-scale=1.0 maximum-scale=1.0",f.id="chat-container",f.style.zIndex=d,document.body.appendChild(g),document.body.appendChild(f);var y=.01*window.innerHeight;document.documentElement.style.setProperty("--vhchat","".concat(y,"px")),window.addEventListener("resize",(function(){var e=.01*window.innerHeight;document.documentElement.style.setProperty("--vhchat","".concat(e,"px"))}));var m=document.getElementById("chat-bubble"),M=document.getElementById("chat-window"),b=document.getElementById("wellcomeLabel");if(e.wellcomeLabel){var v=new _e(e.wellcomeLabel);if(v){var w=0;v.delay&&(w=v.delay),setTimeout((function(){b.innerHTML=pe.setWellcomeLabel(v);var e=document.getElementById("wellcomeLabelIcon");v.icon?e.src=v.icon:e.style.display="none",document.getElementById("wellcome-close").addEventListener("click",(function(){b.classList.add("not-visible")}))}),w)}}M.style.backgroundColor=e.backgroundChatColor;var C=document.getElementById("output");e.fullscreen?(f.style.padding=null,m.style.margin="16px",m.style.maxHeight="60px",C.style.maxHeight=null):(f.style.padding="16px",C.style.maxHeight="500px"),h==(new ce).CHAT_BUBBLE&&(document.getElementById("threePoints").style.fill=e.primaryColor),e.backgroundChatColor&&(p.backgroundChatColor=e.backgroundChatColor);var x=p.primaryColor,L=s.pickTextColorBasedOnBgColorAdvanced(x,"#ffffff","#000000");m.style.backgroundColor=p.primaryColor,m.style.color=L,m.addEventListener("click",(function(){if(M.classList.remove("not-visible"),e.fullscreen?(f.style.height="100%",M.classList.add("visible-chat-window-fullscreen")):M.classList.add("visible-chat-window"),m.classList.add("bubble-not-visible"),m.classList.remove("visible-chat-bubble"),message.focus(),b.classList.add("not-visible"),Oe){var t=document.getElementById("output");t.scrollTop=t.scrollHeight}else i.initialize(p,n,o),Oe=!0}))}},{key:"initialize",value:function(e,t,n){new Ie("[IND]Indigitall-WebChat: ").d("WebChat initialized").writeLog();var o=document.getElementById("chat-header"),r=document.getElementById("chat-input-box"),i=document.getElementById("chat-bubble"),s=document.getElementById("minimize-btn"),c=document.getElementById("chat-window"),l=document.getElementById("chat-container"),u=document.getElementById("message"),d=document.getElementById("send"),h=document.getElementById("minimize-btn-path");output.style.backgroundColor=e.backgroundChatColor,e.fullscreen?(o.style.borderRadius="0px",r.style.borderRadius="0px"):(o.style.borderRadius="10px 10px 0 0",r.style.borderRadius="0 0 10px 10px");var f=new Ee(e,output),g=document.getElementById("send-icon");if(g.style.fill=u.value&&""!==u.value?e.primaryColor:"#aaaaaa",o.style.backgroundColor=e.backgroundBarColor,r.style.backgroundColor=e.backgroundBarColor,u.style.backgroundColor=e.backgroundBarColor,h.style.fill=e.primaryColor,!Se){var y=p.getMessagesStorage();y&&y.length>0&&(y.forEach((function(t){var n=pe.createMessage(t.data,e,t.isOwnMessage,!0);output.innerHTML+=n,f.buttonsComponents()})),output.scrollTop=output.scrollHeight),Se=!0}d.addEventListener("click",(function(){if(u.value&&""!==u.value){var t={messageId:a.Z.generateId(),timestamp:Math.floor(Date.now()),content:{body:u.value},contentType:"text"};f.messageSend(t);var n=pe.createMessage(t,e,!0,!0);p.addMessageToStorage(t,!0),output.innerHTML+=n,output.scrollTop=output.scrollHeight,u.value="",g.style.fill=u.value&&""!==u.value?e.primaryColor:"#aaaaaa"}})),s.addEventListener("click",(function(){c.classList.add("not-visible"),e.fullscreen?(c.classList.remove("visible-chat-window-fullscreen"),l.style.height=null):c.classList.remove("visible-chat-window"),i.classList.add("visible-chat-bubble"),i.classList.remove("bubble-not-visible")})),u.addEventListener("keypress",(function(e){"Enter"!==e.code&&13!==e.code||d.click()})),u.addEventListener("keyup",(function(){g.style.fill=u.value&&""!==u.value?e.primaryColor:"#aaaaaa"})),f.connectSocket(t,n)}},{key:"getVersion",value:function(){return r.version}}],null&&ze(n.prototype,null),o&&ze(n,o),e}();window.WebChat=Be,window.WebChat.LogLevel=xe})()})();
|
|
2
|
+
(()=>{var __webpack_modules__={1962:e=>{function t(){}e.exports=function(e,n,o){var r=!1;return o=o||t,i.count=e,0===e?n():i;function i(e,t){if(i.count<=0)throw new Error("after called too many times");--i.count,e?(r=!0,n(e),n=o):0!==i.count||r||n(null,t)}}},1042:e=>{e.exports=function(e,t,n){var o=e.byteLength;if(t=t||0,n=n||o,e.slice)return e.slice(t,n);if(t<0&&(t+=o),n<0&&(n+=o),n>o&&(n=o),t>=o||t>=n||0===o)return new ArrayBuffer(0);for(var r=new Uint8Array(e),i=new Uint8Array(n-t),s=t,a=0;s<n;s++,a++)i[a]=r[s];return i.buffer}},9145:e=>{function t(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}e.exports=t,t.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-n:e+n}return 0|Math.min(e,this.max)},t.prototype.reset=function(){this.attempts=0},t.prototype.setMin=function(e){this.ms=e},t.prototype.setMax=function(e){this.max=e},t.prototype.setJitter=function(e){this.jitter=e}},5733:(e,t)=>{!function(e){"use strict";t.encode=function(t){var n,o=new Uint8Array(t),r=o.length,i="";for(n=0;n<r;n+=3)i+=e[o[n]>>2],i+=e[(3&o[n])<<4|o[n+1]>>4],i+=e[(15&o[n+1])<<2|o[n+2]>>6],i+=e[63&o[n+2]];return r%3==2?i=i.substring(0,i.length-1)+"=":r%3==1&&(i=i.substring(0,i.length-2)+"=="),i},t.decode=function(t){var n,o,r,i,s,a=.75*t.length,c=t.length,l=0;"="===t[t.length-1]&&(a--,"="===t[t.length-2]&&a--);var u=new ArrayBuffer(a),p=new Uint8Array(u);for(n=0;n<c;n+=4)o=e.indexOf(t[n]),r=e.indexOf(t[n+1]),i=e.indexOf(t[n+2]),s=e.indexOf(t[n+3]),p[l++]=o<<2|r>>4,p[l++]=(15&r)<<4|i>>2,p[l++]=(3&i)<<6|63&s;return u}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")},7108:e=>{var t=void 0!==t?t:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder&&MozBlobBuilder,n=function(){try{return 2===new Blob(["hi"]).size}catch(e){return!1}}(),o=n&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(e){return!1}}(),r=t&&t.prototype.append&&t.prototype.getBlob;function i(e){return e.map((function(e){if(e.buffer instanceof ArrayBuffer){var t=e.buffer;if(e.byteLength!==t.byteLength){var n=new Uint8Array(e.byteLength);n.set(new Uint8Array(t,e.byteOffset,e.byteLength)),t=n.buffer}return t}return e}))}function s(e,n){n=n||{};var o=new t;return i(e).forEach((function(e){o.append(e)})),n.type?o.getBlob(n.type):o.getBlob()}function a(e,t){return new Blob(i(e),t||{})}"undefined"!=typeof Blob&&(s.prototype=Blob.prototype,a.prototype=Blob.prototype),e.exports=n?o?Blob:a:r?s:void 0},8821:e=>{var t=[].slice;e.exports=function(e,n){if("string"==typeof n&&(n=e[n]),"function"!=typeof n)throw new Error("bind() requires a function");var o=t.call(arguments,2);return function(){return n.apply(e,o.concat(t.call(arguments)))}}},292:e=>{e.exports=function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},2751:function(e,t,n){var o;e.exports=o=o||function(e,t){var o;if("undefined"!=typeof window&&window.crypto&&(o=window.crypto),!o&&"undefined"!=typeof window&&window.msCrypto&&(o=window.msCrypto),!o&&void 0!==n.g&&n.g.crypto&&(o=n.g.crypto),!o)try{o=n(Object(function(){var e=new Error("Cannot find module 'crypto'");throw e.code="MODULE_NOT_FOUND",e}()))}catch(e){}var r=function(){if(o){if("function"==typeof o.getRandomValues)try{return o.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof o.randomBytes)try{return o.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),s={},a=s.lib={},c=a.Base={extend:function(e){var t=i(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},l=a.WordArray=c.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||p).stringify(this)},concat:function(e){var t=this.words,n=e.words,o=this.sigBytes,r=e.sigBytes;if(this.clamp(),o%4)for(var i=0;i<r;i++){var s=n[i>>>2]>>>24-i%4*8&255;t[o+i>>>2]|=s<<24-(o+i)%4*8}else for(i=0;i<r;i+=4)t[o+i>>>2]=n[i>>>2];return this.sigBytes+=r,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=c.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(r());return new l.init(t,e)}}),u=s.enc={},p=u.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,o=[],r=0;r<n;r++){var i=t[r>>>2]>>>24-r%4*8&255;o.push((i>>>4).toString(16)),o.push((15&i).toString(16))}return o.join("")},parse:function(e){for(var t=e.length,n=[],o=0;o<t;o+=2)n[o>>>3]|=parseInt(e.substr(o,2),16)<<24-o%8*4;return new l.init(n,t/2)}},d=u.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,o=[],r=0;r<n;r++){var i=t[r>>>2]>>>24-r%4*8&255;o.push(String.fromCharCode(i))}return o.join("")},parse:function(e){for(var t=e.length,n=[],o=0;o<t;o++)n[o>>>2]|=(255&e.charCodeAt(o))<<24-o%4*8;return new l.init(n,t)}},h=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(d.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return d.parse(unescape(encodeURIComponent(e)))}},f=a.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=h.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,o=this._data,r=o.words,i=o.sigBytes,s=this.blockSize,a=i/(4*s),c=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,u=e.min(4*c,i);if(c){for(var p=0;p<c;p+=s)this._doProcessBlock(r,p);n=r.splice(0,c),o.sigBytes-=u}return new l.init(n,u)},clone:function(){var e=c.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),g=(a.Hasher=f.extend({cfg:c.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new g.HMAC.init(e,n).finalize(t)}}}),s.algo={});return s}(Math)},6948:function(e,t,n){var o;e.exports=(o=n(2751),n(6846),n(5498),o.HmacSHA256)},5498:function(e,t,n){var o,r,i;e.exports=(r=(o=n(2751)).lib.Base,i=o.enc.Utf8,void(o.algo.HMAC=r.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=i.parse(t));var n=e.blockSize,o=4*n;t.sigBytes>o&&(t=e.finalize(t)),t.clamp();for(var r=this._oKey=t.clone(),s=this._iKey=t.clone(),a=r.words,c=s.words,l=0;l<n;l++)a[l]^=1549556828,c[l]^=909522486;r.sigBytes=s.sigBytes=o,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,n=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(n))}})))},6846:function(e,t,n){var o;e.exports=(o=n(2751),function(e){var t=o,n=t.lib,r=n.WordArray,i=n.Hasher,s=t.algo,a=[],c=[];!function(){function t(t){for(var n=e.sqrt(t),o=2;o<=n;o++)if(!(t%o))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var o=2,r=0;r<64;)t(o)&&(r<8&&(a[r]=n(e.pow(o,.5))),c[r]=n(e.pow(o,1/3)),r++),o++}();var l=[],u=s.SHA256=i.extend({_doReset:function(){this._hash=new r.init(a.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,o=n[0],r=n[1],i=n[2],s=n[3],a=n[4],u=n[5],p=n[6],d=n[7],h=0;h<64;h++){if(h<16)l[h]=0|e[t+h];else{var f=l[h-15],g=(f<<25|f>>>7)^(f<<14|f>>>18)^f>>>3,y=l[h-2],m=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;l[h]=g+l[h-7]+m+l[h-16]}var M=o&r^o&i^r&i,b=(o<<30|o>>>2)^(o<<19|o>>>13)^(o<<10|o>>>22),v=d+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&u^~a&p)+c[h]+l[h];d=p,p=u,u=a,a=s+v|0,s=i,i=r,r=o,o=v+(b+M)|0}n[0]=n[0]+o|0,n[1]=n[1]+r|0,n[2]=n[2]+i|0,n[3]=n[3]+s|0,n[4]=n[4]+a|0,n[5]=n[5]+u|0,n[6]=n[6]+p|0,n[7]=n[7]+d|0},_doFinalize:function(){var t=this._data,n=t.words,o=8*this._nDataBytes,r=8*t.sigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=e.floor(o/4294967296),n[15+(r+64>>>9<<4)]=o,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=i._createHelper(u),t.HmacSHA256=i._createHmacHelper(u)}(Math),o.SHA256)},7705:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,o,r,i=e[1]||"",s=e[3];if(!s)return i;if(t&&"function"==typeof btoa){var a=(n=s,o=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),"/*# ".concat(r," */")),c=s.sources.map((function(e){return"/*# sourceURL=".concat(s.sourceRoot||"").concat(e," */")}));return[i].concat(c).concat([a]).join("\n")}return[i].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,o){"string"==typeof e&&(e=[[null,e,""]]);var r={};if(o)for(var i=0;i<this.length;i++){var s=this[i][0];null!=s&&(r[s]=!0)}for(var a=0;a<e.length;a++){var c=[].concat(e[a]);o&&r[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),t.push(c))}},t}},8678:e=>{e.exports="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")()},7409:(e,t,n)=>{e.exports=n(2477),e.exports.parser=n(5570)},2477:(e,t,n)=>{var o=n(8047),r=n(2420),i=n(986)("engine.io-client:socket"),s=n(8486),a=n(5570),c=n(9026),l=n(5877);function u(e,t){if(!(this instanceof u))return new u(e,t);t=t||{},e&&"object"==typeof e&&(t=e,e=null),e?(e=c(e),t.hostname=e.host,t.secure="https"===e.protocol||"wss"===e.protocol,t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=c(t.host).host),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.agent=t.agent||!1,this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?443:80),this.query=t.query||{},"string"==typeof this.query&&(this.query=l.decode(this.query)),this.upgrade=!1!==t.upgrade,this.path=(t.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!t.forceJSONP,this.jsonp=!1!==t.jsonp,this.forceBase64=!!t.forceBase64,this.enablesXDR=!!t.enablesXDR,this.withCredentials=!1!==t.withCredentials,this.timestampParam=t.timestampParam||"t",this.timestampRequests=t.timestampRequests,this.transports=t.transports||["polling","websocket"],this.transportOptions=t.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=t.policyPort||843,this.rememberUpgrade=t.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=t.onlyBinaryUpgrades,this.perMessageDeflate=!1!==t.perMessageDeflate&&(t.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=t.pfx||null,this.key=t.key||null,this.passphrase=t.passphrase||null,this.cert=t.cert||null,this.ca=t.ca||null,this.ciphers=t.ciphers||null,this.rejectUnauthorized=void 0===t.rejectUnauthorized||t.rejectUnauthorized,this.forceNode=!!t.forceNode,this.isReactNative="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),("undefined"==typeof self||this.isReactNative)&&(t.extraHeaders&&Object.keys(t.extraHeaders).length>0&&(this.extraHeaders=t.extraHeaders),t.localAddress&&(this.localAddress=t.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}e.exports=u,u.priorWebsocketSuccess=!1,r(u.prototype),u.protocol=a.protocol,u.Socket=u,u.Transport=n(8664),u.transports=n(8047),u.parser=n(5570),u.prototype.createTransport=function(e){i('creating transport "%s"',e);var t=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}(this.query);t.EIO=a.protocol,t.transport=e;var n=this.transportOptions[e]||{};return this.id&&(t.sid=this.id),new o[e]({query:t,socket:this,agent:n.agent||this.agent,hostname:n.hostname||this.hostname,port:n.port||this.port,secure:n.secure||this.secure,path:n.path||this.path,forceJSONP:n.forceJSONP||this.forceJSONP,jsonp:n.jsonp||this.jsonp,forceBase64:n.forceBase64||this.forceBase64,enablesXDR:n.enablesXDR||this.enablesXDR,withCredentials:n.withCredentials||this.withCredentials,timestampRequests:n.timestampRequests||this.timestampRequests,timestampParam:n.timestampParam||this.timestampParam,policyPort:n.policyPort||this.policyPort,pfx:n.pfx||this.pfx,key:n.key||this.key,passphrase:n.passphrase||this.passphrase,cert:n.cert||this.cert,ca:n.ca||this.ca,ciphers:n.ciphers||this.ciphers,rejectUnauthorized:n.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:n.perMessageDeflate||this.perMessageDeflate,extraHeaders:n.extraHeaders||this.extraHeaders,forceNode:n.forceNode||this.forceNode,localAddress:n.localAddress||this.localAddress,requestTimeout:n.requestTimeout||this.requestTimeout,protocols:n.protocols||void 0,isReactNative:this.isReactNative})},u.prototype.open=function(){var e;if(this.rememberUpgrade&&u.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length){var t=this;return void setTimeout((function(){t.emit("error","No transports available")}),0)}e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(e){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)},u.prototype.setTransport=function(e){i("setting transport %s",e.name);var t=this;this.transport&&(i("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",(function(){t.onDrain()})).on("packet",(function(e){t.onPacket(e)})).on("error",(function(e){t.onError(e)})).on("close",(function(){t.onClose("transport close")}))},u.prototype.probe=function(e){i('probing transport "%s"',e);var t=this.createTransport(e,{probe:1}),n=!1,o=this;function r(){if(o.onlyBinaryUpgrades){var r=!this.supportsBinary&&o.transport.supportsBinary;n=n||r}n||(i('probe transport "%s" opened',e),t.send([{type:"ping",data:"probe"}]),t.once("packet",(function(r){if(!n)if("pong"===r.type&&"probe"===r.data){if(i('probe transport "%s" pong',e),o.upgrading=!0,o.emit("upgrading",t),!t)return;u.priorWebsocketSuccess="websocket"===t.name,i('pausing current transport "%s"',o.transport.name),o.transport.pause((function(){n||"closed"!==o.readyState&&(i("changing transport and sending upgrade packet"),d(),o.setTransport(t),t.send([{type:"upgrade"}]),o.emit("upgrade",t),t=null,o.upgrading=!1,o.flush())}))}else{i('probe transport "%s" failed',e);var s=new Error("probe error");s.transport=t.name,o.emit("upgradeError",s)}})))}function s(){n||(n=!0,d(),t.close(),t=null)}function a(n){var r=new Error("probe error: "+n);r.transport=t.name,s(),i('probe transport "%s" failed because of error: %s',e,n),o.emit("upgradeError",r)}function c(){a("transport closed")}function l(){a("socket closed")}function p(e){t&&e.name!==t.name&&(i('"%s" works - aborting "%s"',e.name,t.name),s())}function d(){t.removeListener("open",r),t.removeListener("error",a),t.removeListener("close",c),o.removeListener("close",l),o.removeListener("upgrading",p)}u.priorWebsocketSuccess=!1,t.once("open",r),t.once("error",a),t.once("close",c),this.once("close",l),this.once("upgrading",p),t.open()},u.prototype.onOpen=function(){if(i("socket open"),this.readyState="open",u.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){i("starting upgrade probes");for(var e=0,t=this.upgrades.length;e<t;e++)this.probe(this.upgrades[e])}},u.prototype.onPacket=function(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(i('socket receive: type "%s", data "%s"',e.type,e.data),this.emit("packet",e),this.emit("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emit("data",e.data),this.emit("message",e.data)}else i('packet received with socket readyState "%s"',this.readyState)},u.prototype.onHandshake=function(e){this.emit("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.onOpen(),"closed"!==this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},u.prototype.onHeartbeat=function(e){clearTimeout(this.pingTimeoutTimer);var t=this;t.pingTimeoutTimer=setTimeout((function(){"closed"!==t.readyState&&t.onClose("ping timeout")}),e||t.pingInterval+t.pingTimeout)},u.prototype.setPing=function(){var e=this;clearTimeout(e.pingIntervalTimer),e.pingIntervalTimer=setTimeout((function(){i("writing ping packet - expecting pong within %sms",e.pingTimeout),e.ping(),e.onHeartbeat(e.pingTimeout)}),e.pingInterval)},u.prototype.ping=function(){var e=this;this.sendPacket("ping",(function(){e.emit("ping")}))},u.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},u.prototype.flush=function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(i("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},u.prototype.write=u.prototype.send=function(e,t,n){return this.sendPacket("message",e,t,n),this},u.prototype.sendPacket=function(e,t,n,o){if("function"==typeof t&&(o=t,t=void 0),"function"==typeof n&&(o=n,n=null),"closing"!==this.readyState&&"closed"!==this.readyState){(n=n||{}).compress=!1!==n.compress;var r={type:e,data:t,options:n};this.emit("packetCreate",r),this.writeBuffer.push(r),o&&this.once("flush",o),this.flush()}},u.prototype.close=function(){if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";var e=this;this.writeBuffer.length?this.once("drain",(function(){this.upgrading?o():t()})):this.upgrading?o():t()}function t(){e.onClose("forced close"),i("socket closing - telling transport to close"),e.transport.close()}function n(){e.removeListener("upgrade",n),e.removeListener("upgradeError",n),t()}function o(){e.once("upgrade",n),e.once("upgradeError",n)}return this},u.prototype.onError=function(e){i("socket error %j",e),u.priorWebsocketSuccess=!1,this.emit("error",e),this.onClose("transport error",e)},u.prototype.onClose=function(e,t){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(i('socket close with reason: "%s"',e),clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",e,t),this.writeBuffer=[],this.prevBufferLen=0)},u.prototype.filterUpgrades=function(e){for(var t=[],n=0,o=e.length;n<o;n++)~s(this.transports,e[n])&&t.push(e[n]);return t}},8664:(e,t,n)=>{var o=n(5570),r=n(2420);function i(e){this.path=e.path,this.hostname=e.hostname,this.port=e.port,this.secure=e.secure,this.query=e.query,this.timestampParam=e.timestampParam,this.timestampRequests=e.timestampRequests,this.readyState="",this.agent=e.agent||!1,this.socket=e.socket,this.enablesXDR=e.enablesXDR,this.withCredentials=e.withCredentials,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.forceNode=e.forceNode,this.isReactNative=e.isReactNative,this.extraHeaders=e.extraHeaders,this.localAddress=e.localAddress}e.exports=i,r(i.prototype),i.prototype.onError=function(e,t){var n=new Error(e);return n.type="TransportError",n.description=t,this.emit("error",n),this},i.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this},i.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},i.prototype.send=function(e){if("open"!==this.readyState)throw new Error("Transport not open");this.write(e)},i.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},i.prototype.onData=function(e){var t=o.decodePacket(e,this.socket.binaryType);this.onPacket(t)},i.prototype.onPacket=function(e){this.emit("packet",e)},i.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},8047:(e,t,n)=>{var o=n(1573),r=n(114),i=n(7344),s=n(8351);t.polling=function(e){var t=!1,n=!1,s=!1!==e.jsonp;if("undefined"!=typeof location){var a="https:"===location.protocol,c=location.port;c||(c=a?443:80),t=e.hostname!==location.hostname||c!==e.port,n=e.secure!==a}if(e.xdomain=t,e.xscheme=n,"open"in new o(e)&&!e.forceJSONP)return new r(e);if(!s)throw new Error("JSONP disabled");return new i(e)},t.websocket=s},7344:(e,t,n)=>{var o=n(5763),r=n(292),i=n(8678);e.exports=u;var s,a=/\n/g,c=/\\n/g;function l(){}function u(e){o.call(this,e),this.query=this.query||{},s||(s=i.___eio=i.___eio||[]),this.index=s.length;var t=this;s.push((function(e){t.onData(e)})),this.query.j=this.index,"function"==typeof addEventListener&&addEventListener("beforeunload",(function(){t.script&&(t.script.onerror=l)}),!1)}r(u,o),u.prototype.supportsBinary=!1,u.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),o.prototype.doClose.call(this)},u.prototype.doPoll=function(){var e=this,t=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),t.async=!0,t.src=this.uri(),t.onerror=function(t){e.onError("jsonp poll error",t)};var n=document.getElementsByTagName("script")[0];n?n.parentNode.insertBefore(t,n):(document.head||document.body).appendChild(t),this.script=t,"undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent)&&setTimeout((function(){var e=document.createElement("iframe");document.body.appendChild(e),document.body.removeChild(e)}),100)},u.prototype.doWrite=function(e,t){var n=this;if(!this.form){var o,r=document.createElement("form"),i=document.createElement("textarea"),s=this.iframeId="eio_iframe_"+this.index;r.className="socketio",r.style.position="absolute",r.style.top="-1000px",r.style.left="-1000px",r.target=s,r.method="POST",r.setAttribute("accept-charset","utf-8"),i.name="d",r.appendChild(i),document.body.appendChild(r),this.form=r,this.area=i}function l(){u(),t()}function u(){if(n.iframe)try{n.form.removeChild(n.iframe)}catch(e){n.onError("jsonp polling iframe removal error",e)}try{var e='<iframe src="javascript:0" name="'+n.iframeId+'">';o=document.createElement(e)}catch(e){(o=document.createElement("iframe")).name=n.iframeId,o.src="javascript:0"}o.id=n.iframeId,n.form.appendChild(o),n.iframe=o}this.form.action=this.uri(),u(),e=e.replace(c,"\\\n"),this.area.value=e.replace(a,"\\n");try{this.form.submit()}catch(e){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===n.iframe.readyState&&l()}:this.iframe.onload=l}},114:(e,t,n)=>{var o=n(1573),r=n(5763),i=n(2420),s=n(292),a=n(986)("engine.io-client:polling-xhr"),c=n(8678);function l(){}function u(e){if(r.call(this,e),this.requestTimeout=e.requestTimeout,this.extraHeaders=e.extraHeaders,"undefined"!=typeof location){var t="https:"===location.protocol,n=location.port;n||(n=t?443:80),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||n!==e.port,this.xs=e.secure!==t}}function p(e){this.method=e.method||"GET",this.uri=e.uri,this.xd=!!e.xd,this.xs=!!e.xs,this.async=!1!==e.async,this.data=void 0!==e.data?e.data:null,this.agent=e.agent,this.isBinary=e.isBinary,this.supportsBinary=e.supportsBinary,this.enablesXDR=e.enablesXDR,this.withCredentials=e.withCredentials,this.requestTimeout=e.requestTimeout,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.extraHeaders=e.extraHeaders,this.create()}function d(){for(var e in p.requests)p.requests.hasOwnProperty(e)&&p.requests[e].abort()}e.exports=u,e.exports.Request=p,s(u,r),u.prototype.supportsBinary=!0,u.prototype.request=function(e){return(e=e||{}).uri=this.uri(),e.xd=this.xd,e.xs=this.xs,e.agent=this.agent||!1,e.supportsBinary=this.supportsBinary,e.enablesXDR=this.enablesXDR,e.withCredentials=this.withCredentials,e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized,e.requestTimeout=this.requestTimeout,e.extraHeaders=this.extraHeaders,new p(e)},u.prototype.doWrite=function(e,t){var n="string"!=typeof e&&void 0!==e,o=this.request({method:"POST",data:e,isBinary:n}),r=this;o.on("success",t),o.on("error",(function(e){r.onError("xhr post error",e)})),this.sendXhr=o},u.prototype.doPoll=function(){a("xhr poll");var e=this.request(),t=this;e.on("data",(function(e){t.onData(e)})),e.on("error",(function(e){t.onError("xhr poll error",e)})),this.pollXhr=e},i(p.prototype),p.prototype.create=function(){var e={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized;var t=this.xhr=new o(e),n=this;try{a("xhr open %s: %s",this.method,this.uri),t.open(this.method,this.uri,this.async);try{if(this.extraHeaders)for(var r in t.setDisableHeaderCheck&&t.setDisableHeaderCheck(!0),this.extraHeaders)this.extraHeaders.hasOwnProperty(r)&&t.setRequestHeader(r,this.extraHeaders[r])}catch(e){}if("POST"===this.method)try{this.isBinary?t.setRequestHeader("Content-type","application/octet-stream"):t.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{t.setRequestHeader("Accept","*/*")}catch(e){}"withCredentials"in t&&(t.withCredentials=this.withCredentials),this.requestTimeout&&(t.timeout=this.requestTimeout),this.hasXDR()?(t.onload=function(){n.onLoad()},t.onerror=function(){n.onError(t.responseText)}):t.onreadystatechange=function(){if(2===t.readyState)try{var e=t.getResponseHeader("Content-Type");(n.supportsBinary&&"application/octet-stream"===e||"application/octet-stream; charset=UTF-8"===e)&&(t.responseType="arraybuffer")}catch(e){}4===t.readyState&&(200===t.status||1223===t.status?n.onLoad():setTimeout((function(){n.onError("number"==typeof t.status?t.status:0)}),0))},a("xhr data %s",this.data),t.send(this.data)}catch(e){return void setTimeout((function(){n.onError(e)}),0)}"undefined"!=typeof document&&(this.index=p.requestsCount++,p.requests[this.index]=this)},p.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},p.prototype.onData=function(e){this.emit("data",e),this.onSuccess()},p.prototype.onError=function(e){this.emit("error",e),this.cleanup(!0)},p.prototype.cleanup=function(e){if(void 0!==this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=l:this.xhr.onreadystatechange=l,e)try{this.xhr.abort()}catch(e){}"undefined"!=typeof document&&delete p.requests[this.index],this.xhr=null}},p.prototype.onLoad=function(){var e;try{var t;try{t=this.xhr.getResponseHeader("Content-Type")}catch(e){}e=("application/octet-stream"===t||"application/octet-stream; charset=UTF-8"===t)&&this.xhr.response||this.xhr.responseText}catch(e){this.onError(e)}null!=e&&this.onData(e)},p.prototype.hasXDR=function(){return"undefined"!=typeof XDomainRequest&&!this.xs&&this.enablesXDR},p.prototype.abort=function(){this.cleanup()},p.requestsCount=0,p.requests={},"undefined"!=typeof document&&("function"==typeof attachEvent?attachEvent("onunload",d):"function"==typeof addEventListener&&addEventListener("onpagehide"in c?"pagehide":"unload",d,!1))},5763:(e,t,n)=>{var o=n(8664),r=n(5877),i=n(5570),s=n(292),a=n(9289),c=n(986)("engine.io-client:polling");e.exports=u;var l=null!=new(n(1573))({xdomain:!1}).responseType;function u(e){var t=e&&e.forceBase64;l&&!t||(this.supportsBinary=!1),o.call(this,e)}s(u,o),u.prototype.name="polling",u.prototype.doOpen=function(){this.poll()},u.prototype.pause=function(e){var t=this;function n(){c("paused"),t.readyState="paused",e()}if(this.readyState="pausing",this.polling||!this.writable){var o=0;this.polling&&(c("we are currently polling - waiting to pause"),o++,this.once("pollComplete",(function(){c("pre-pause polling complete"),--o||n()}))),this.writable||(c("we are currently writing - waiting to pause"),o++,this.once("drain",(function(){c("pre-pause writing complete"),--o||n()})))}else n()},u.prototype.poll=function(){c("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},u.prototype.onData=function(e){var t=this;c("polling got data %s",e),i.decodePayload(e,this.socket.binaryType,(function(e,n,o){if("opening"===t.readyState&&"open"===e.type&&t.onOpen(),"close"===e.type)return t.onClose(),!1;t.onPacket(e)})),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():c('ignoring poll - transport state "%s"',this.readyState))},u.prototype.doClose=function(){var e=this;function t(){c("writing close packet"),e.write([{type:"close"}])}"open"===this.readyState?(c("transport open - closing"),t()):(c("transport not open - deferring close"),this.once("open",t))},u.prototype.write=function(e){var t=this;this.writable=!1;var n=function(){t.writable=!0,t.emit("drain")};i.encodePayload(e,this.supportsBinary,(function(e){t.doWrite(e,n)}))},u.prototype.uri=function(){var e=this.query||{},t=this.secure?"https":"http",n="";return!1!==this.timestampRequests&&(e[this.timestampParam]=a()),this.supportsBinary||e.sid||(e.b64=1),e=r.encode(e),this.port&&("https"===t&&443!==Number(this.port)||"http"===t&&80!==Number(this.port))&&(n=":"+this.port),e.length&&(e="?"+e),t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+e}},8351:(e,t,n)=>{var o,r,i=n(8664),s=n(5570),a=n(5877),c=n(292),l=n(9289),u=n(986)("engine.io-client:websocket");if("undefined"!=typeof WebSocket?o=WebSocket:"undefined"!=typeof self&&(o=self.WebSocket||self.MozWebSocket),"undefined"==typeof window)try{r=n(418)}catch(e){}var p=o||r;function d(e){e&&e.forceBase64&&(this.supportsBinary=!1),this.perMessageDeflate=e.perMessageDeflate,this.usingBrowserWebSocket=o&&!e.forceNode,this.protocols=e.protocols,this.usingBrowserWebSocket||(p=r),i.call(this,e)}e.exports=d,c(d,i),d.prototype.name="websocket",d.prototype.supportsBinary=!0,d.prototype.doOpen=function(){if(this.check()){var e=this.uri(),t=this.protocols,n={};this.isReactNative||(n.agent=this.agent,n.perMessageDeflate=this.perMessageDeflate,n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized),this.extraHeaders&&(n.headers=this.extraHeaders),this.localAddress&&(n.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket&&!this.isReactNative?t?new p(e,t):new p(e):new p(e,t,n)}catch(e){return this.emit("error",e)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},d.prototype.addEventListeners=function(){var e=this;this.ws.onopen=function(){e.onOpen()},this.ws.onclose=function(){e.onClose()},this.ws.onmessage=function(t){e.onData(t.data)},this.ws.onerror=function(t){e.onError("websocket error",t)}},d.prototype.write=function(e){var t=this;this.writable=!1;for(var n=e.length,o=0,r=n;o<r;o++)!function(e){s.encodePacket(e,t.supportsBinary,(function(o){if(!t.usingBrowserWebSocket){var r={};e.options&&(r.compress=e.options.compress),t.perMessageDeflate&&("string"==typeof o?Buffer.byteLength(o):o.length)<t.perMessageDeflate.threshold&&(r.compress=!1)}try{t.usingBrowserWebSocket?t.ws.send(o):t.ws.send(o,r)}catch(e){u("websocket closed before onclose event")}--n||(t.emit("flush"),setTimeout((function(){t.writable=!0,t.emit("drain")}),0))}))}(e[o])},d.prototype.onClose=function(){i.prototype.onClose.call(this)},d.prototype.doClose=function(){void 0!==this.ws&&this.ws.close()},d.prototype.uri=function(){var e=this.query||{},t=this.secure?"wss":"ws",n="";return this.port&&("wss"===t&&443!==Number(this.port)||"ws"===t&&80!==Number(this.port))&&(n=":"+this.port),this.timestampRequests&&(e[this.timestampParam]=l()),this.supportsBinary||(e.b64=1),(e=a.encode(e)).length&&(e="?"+e),t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+e},d.prototype.check=function(){return!(!p||"__initialize"in p&&this.name===d.prototype.name)}},1573:(e,t,n)=>{var o=n(1018),r=n(8678);e.exports=function(e){var t=e.xdomain,n=e.xscheme,i=e.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!t||o))return new XMLHttpRequest}catch(e){}try{if("undefined"!=typeof XDomainRequest&&!n&&i)return new XDomainRequest}catch(e){}if(!t)try{return new(r[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}}},2420:e=>{function t(e){if(e)return function(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}(e)}e.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,o=this._callbacks["$"+e];if(!o)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var r=0;r<o.length;r++)if((n=o[r])===t||n.fn===t){o.splice(r,1);break}return 0===o.length&&delete this._callbacks["$"+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],o=1;o<arguments.length;o++)t[o-1]=arguments[o];if(n){o=0;for(var r=(n=n.slice(0)).length;o<r;++o)n[o].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}},986:(e,t,n)=>{function o(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}(t=e.exports=n(736)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),n){var o="color: "+this.color;e.splice(1,0,o,"color: inherit");var r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(i=r))})),e.splice(i,0,o)}},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=o,t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(o())},736:(e,t,n)=>{function o(e){var n;function o(){if(o.enabled){var e=o,r=+new Date,i=r-(n||r);e.diff=i,e.prev=n,e.curr=r,n=r;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var c=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,o){if("%%"===n)return n;c++;var r=t.formatters[o];if("function"==typeof r){var i=s[c];n=r.call(e,i),s.splice(c,1),c--}return n})),t.formatArgs.call(e,s);var l=o.log||t.log||console.log.bind(console);l.apply(e,s)}}return o.namespace=e,o.enabled=t.enabled(e),o.useColors=t.useColors(),o.color=function(e){var n,o=0;for(n in e)o=(o<<5)-o+e.charCodeAt(n),o|=0;return t.colors[Math.abs(o)%t.colors.length]}(e),o.destroy=r,"function"==typeof t.init&&t.init(o),t.instances.push(o),o}function r(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}(t=e.exports=o.debug=o.default=o).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){var n;t.save(e),t.names=[],t.skips=[];var o=("string"==typeof e?e:"").split(/[\s,]+/),r=o.length;for(n=0;n<r;n++)o[n]&&("-"===(e=o[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){var i=t.instances[n];i.enabled=t.enabled(i.namespace)}},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,o;for(n=0,o=t.skips.length;n<o;n++)if(t.skips[n].test(e))return!1;for(n=0,o=t.names.length;n<o;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(7660),t.instances=[],t.names=[],t.skips=[],t.formatters={}},7660:e=>{var t=1e3,n=60*t,o=60*n,r=24*o;function i(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}e.exports=function(e,s){s=s||{};var a,c=typeof e;if("string"===c&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var i=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(i){var s=parseFloat(i[1]);switch((i[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"days":case"day":case"d":return s*r;case"hours":case"hour":case"hrs":case"hr":case"h":return s*o;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(e);if("number"===c&&!1===isNaN(e))return s.long?i(a=e,r,"day")||i(a,o,"hour")||i(a,n,"minute")||i(a,t,"second")||a+" ms":function(e){return e>=r?Math.round(e/r)+"d":e>=o?Math.round(e/o)+"h":e>=n?Math.round(e/n)+"m":e>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},5570:(e,t,n)=>{var o,r=n(1888),i=n(310),s=n(1042),a=n(1962),c=n(6326);"undefined"!=typeof ArrayBuffer&&(o=n(5733));var l="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),u="undefined"!=typeof navigator&&/PhantomJS/i.test(navigator.userAgent),p=l||u;t.protocol=3;var d=t.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},h=r(d),f={type:"error",data:"parser error"},g=n(7108);function y(e,t,n){for(var o=new Array(e.length),r=a(e.length,n),i=function(e,n,r){t(n,(function(t,n){o[e]=n,r(t,o)}))},s=0;s<e.length;s++)i(s,e[s],r)}t.encodePacket=function(e,n,o,r){"function"==typeof n&&(r=n,n=!1),"function"==typeof o&&(r=o,o=null);var i=void 0===e.data?void 0:e.data.buffer||e.data;if("undefined"!=typeof ArrayBuffer&&i instanceof ArrayBuffer)return function(e,n,o){if(!n)return t.encodeBase64Packet(e,o);var r=e.data,i=new Uint8Array(r),s=new Uint8Array(1+r.byteLength);s[0]=d[e.type];for(var a=0;a<i.length;a++)s[a+1]=i[a];return o(s.buffer)}(e,n,r);if(void 0!==g&&i instanceof g)return function(e,n,o){if(!n)return t.encodeBase64Packet(e,o);if(p)return function(e,n,o){if(!n)return t.encodeBase64Packet(e,o);var r=new FileReader;return r.onload=function(){t.encodePacket({type:e.type,data:r.result},n,!0,o)},r.readAsArrayBuffer(e.data)}(e,n,o);var r=new Uint8Array(1);return r[0]=d[e.type],o(new g([r.buffer,e.data]))}(e,n,r);if(i&&i.base64)return function(e,n){return n("b"+t.packets[e.type]+e.data.data)}(e,r);var s=d[e.type];return void 0!==e.data&&(s+=o?c.encode(String(e.data),{strict:!1}):String(e.data)),r(""+s)},t.encodeBase64Packet=function(e,n){var o,r="b"+t.packets[e.type];if(void 0!==g&&e.data instanceof g){var i=new FileReader;return i.onload=function(){var e=i.result.split(",")[1];n(r+e)},i.readAsDataURL(e.data)}try{o=String.fromCharCode.apply(null,new Uint8Array(e.data))}catch(t){for(var s=new Uint8Array(e.data),a=new Array(s.length),c=0;c<s.length;c++)a[c]=s[c];o=String.fromCharCode.apply(null,a)}return r+=btoa(o),n(r)},t.decodePacket=function(e,n,o){if(void 0===e)return f;if("string"==typeof e){if("b"===e.charAt(0))return t.decodeBase64Packet(e.substr(1),n);if(o&&!1===(e=function(e){try{e=c.decode(e,{strict:!1})}catch(e){return!1}return e}(e)))return f;var r=e.charAt(0);return Number(r)==r&&h[r]?e.length>1?{type:h[r],data:e.substring(1)}:{type:h[r]}:f}r=new Uint8Array(e)[0];var i=s(e,1);return g&&"blob"===n&&(i=new g([i])),{type:h[r],data:i}},t.decodeBase64Packet=function(e,t){var n=h[e.charAt(0)];if(!o)return{type:n,data:{base64:!0,data:e.substr(1)}};var r=o.decode(e.substr(1));return"blob"===t&&g&&(r=new g([r])),{type:n,data:r}},t.encodePayload=function(e,n,o){"function"==typeof n&&(o=n,n=null);var r=i(e);return n&&r?g&&!p?t.encodePayloadAsBlob(e,o):t.encodePayloadAsArrayBuffer(e,o):e.length?void y(e,(function(e,o){t.encodePacket(e,!!r&&n,!1,(function(e){o(null,function(e){return e.length+":"+e}(e))}))}),(function(e,t){return o(t.join(""))})):o("0:")},t.decodePayload=function(e,n,o){if("string"!=typeof e)return t.decodePayloadAsBinary(e,n,o);var r;if("function"==typeof n&&(o=n,n=null),""===e)return o(f,0,1);for(var i,s,a="",c=0,l=e.length;c<l;c++){var u=e.charAt(c);if(":"===u){if(""===a||a!=(i=Number(a)))return o(f,0,1);if(a!=(s=e.substr(c+1,i)).length)return o(f,0,1);if(s.length){if(r=t.decodePacket(s,n,!1),f.type===r.type&&f.data===r.data)return o(f,0,1);if(!1===o(r,c+i,l))return}c+=i,a=""}else a+=u}return""!==a?o(f,0,1):void 0},t.encodePayloadAsArrayBuffer=function(e,n){if(!e.length)return n(new ArrayBuffer(0));y(e,(function(e,n){t.encodePacket(e,!0,!0,(function(e){return n(null,e)}))}),(function(e,t){var o=t.reduce((function(e,t){var n;return e+(n="string"==typeof t?t.length:t.byteLength).toString().length+n+2}),0),r=new Uint8Array(o),i=0;return t.forEach((function(e){var t="string"==typeof e,n=e;if(t){for(var o=new Uint8Array(e.length),s=0;s<e.length;s++)o[s]=e.charCodeAt(s);n=o.buffer}r[i++]=t?0:1;var a=n.byteLength.toString();for(s=0;s<a.length;s++)r[i++]=parseInt(a[s]);for(r[i++]=255,o=new Uint8Array(n),s=0;s<o.length;s++)r[i++]=o[s]})),n(r.buffer)}))},t.encodePayloadAsBlob=function(e,n){y(e,(function(e,n){t.encodePacket(e,!0,!0,(function(e){var t=new Uint8Array(1);if(t[0]=1,"string"==typeof e){for(var o=new Uint8Array(e.length),r=0;r<e.length;r++)o[r]=e.charCodeAt(r);e=o.buffer,t[0]=0}var i=(e instanceof ArrayBuffer?e.byteLength:e.size).toString(),s=new Uint8Array(i.length+1);for(r=0;r<i.length;r++)s[r]=parseInt(i[r]);if(s[i.length]=255,g){var a=new g([t.buffer,s.buffer,e]);n(null,a)}}))}),(function(e,t){return n(new g(t))}))},t.decodePayloadAsBinary=function(e,n,o){"function"==typeof n&&(o=n,n=null);for(var r=e,i=[];r.byteLength>0;){for(var a=new Uint8Array(r),c=0===a[0],l="",u=1;255!==a[u];u++){if(l.length>310)return o(f,0,1);l+=a[u]}r=s(r,2+l.length),l=parseInt(l);var p=s(r,0,l);if(c)try{p=String.fromCharCode.apply(null,new Uint8Array(p))}catch(e){var d=new Uint8Array(p);for(p="",u=0;u<d.length;u++)p+=String.fromCharCode(d[u])}i.push(p),r=s(r,l)}var h=i.length;i.forEach((function(e,r){o(t.decodePacket(e,n,!0),r,h)}))}},1888:e=>{e.exports=Object.keys||function(e){var t=[],n=Object.prototype.hasOwnProperty;for(var o in e)n.call(e,o)&&t.push(o);return t}},6326:e=>{var t,n,o,r=String.fromCharCode;function i(e){for(var t,n,o=[],r=0,i=e.length;r<i;)(t=e.charCodeAt(r++))>=55296&&t<=56319&&r<i?56320==(64512&(n=e.charCodeAt(r++)))?o.push(((1023&t)<<10)+(1023&n)+65536):(o.push(t),r--):o.push(t);return o}function s(e,t){if(e>=55296&&e<=57343){if(t)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function a(e,t){return r(e>>t&63|128)}function c(e,t){if(0==(4294967168&e))return r(e);var n="";return 0==(4294965248&e)?n=r(e>>6&31|192):0==(4294901760&e)?(s(e,t)||(e=65533),n=r(e>>12&15|224),n+=a(e,6)):0==(4292870144&e)&&(n=r(e>>18&7|240),n+=a(e,12),n+=a(e,6)),n+r(63&e|128)}function l(){if(o>=n)throw Error("Invalid byte index");var e=255&t[o];if(o++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function u(e){var r,i;if(o>n)throw Error("Invalid byte index");if(o==n)return!1;if(r=255&t[o],o++,0==(128&r))return r;if(192==(224&r)){if((i=(31&r)<<6|l())>=128)return i;throw Error("Invalid continuation byte")}if(224==(240&r)){if((i=(15&r)<<12|l()<<6|l())>=2048)return s(i,e)?i:65533;throw Error("Invalid continuation byte")}if(240==(248&r)&&(i=(7&r)<<18|l()<<12|l()<<6|l())>=65536&&i<=1114111)return i;throw Error("Invalid UTF-8 detected")}e.exports={version:"2.1.2",encode:function(e,t){for(var n=!1!==(t=t||{}).strict,o=i(e),r=o.length,s=-1,a="";++s<r;)a+=c(o[s],n);return a},decode:function(e,s){var a=!1!==(s=s||{}).strict;t=i(e),n=t.length,o=0;for(var c,l=[];!1!==(c=u(a));)l.push(c);return function(e){for(var t,n=e.length,o=-1,i="";++o<n;)(t=e[o])>65535&&(i+=r((t-=65536)>>>10&1023|55296),t=56320|1023&t),i+=r(t);return i}(l)}}},310:(e,t,n)=>{var o=n(6368),r=Object.prototype.toString,i="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===r.call(Blob),s="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===r.call(File);e.exports=function e(t){if(!t||"object"!=typeof t)return!1;if(o(t)){for(var n=0,r=t.length;n<r;n++)if(e(t[n]))return!0;return!1}if("function"==typeof Buffer&&Buffer.isBuffer&&Buffer.isBuffer(t)||"function"==typeof ArrayBuffer&&t instanceof ArrayBuffer||i&&t instanceof Blob||s&&t instanceof File)return!0;if(t.toJSON&&"function"==typeof t.toJSON&&1===arguments.length)return e(t.toJSON(),!0);for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)&&e(t[a]))return!0;return!1}},1018:e=>{try{e.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){e.exports=!1}},8486:e=>{var t=[].indexOf;e.exports=function(e,n){if(t)return e.indexOf(n);for(var o=0;o<e.length;++o)if(e[o]===n)return o;return-1}},6368:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},5877:(e,t)=>{t.encode=function(e){var t="";for(var n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t},t.decode=function(e){for(var t={},n=e.split("&"),o=0,r=n.length;o<r;o++){var i=n[o].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}},9026:e=>{var t=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,n=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];e.exports=function(e){var o,r,i=e,s=e.indexOf("["),a=e.indexOf("]");-1!=s&&-1!=a&&(e=e.substring(0,s)+e.substring(s,a).replace(/:/g,";")+e.substring(a,e.length));for(var c,l,u=t.exec(e||""),p={},d=14;d--;)p[n[d]]=u[d]||"";return-1!=s&&-1!=a&&(p.source=i,p.host=p.host.substring(1,p.host.length-1).replace(/;/g,":"),p.authority=p.authority.replace("[","").replace("]","").replace(/;/g,":"),p.ipv6uri=!0),p.pathNames=(o=p.path,r=o.replace(/\/{2,9}/g,"/").split("/"),"/"!=o.substr(0,1)&&0!==o.length||r.splice(0,1),"/"==o.substr(o.length-1,1)&&r.splice(r.length-1,1),r),p.queryKey=(c=p.query,l={},c.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(e,t,n){t&&(l[t]=n)})),l),p}},1352:(e,t,n)=>{var o=n(4550),r=n(3416),i=n(7501),s=n(5925)("socket.io-client");e.exports=t=c;var a=t.managers={};function c(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,r=o(e),c=r.source,l=r.id,u=r.path,p=a[l]&&u in a[l].nsps;return t.forceNew||t["force new connection"]||!1===t.multiplex||p?(s("ignoring socket cache for %s",c),n=i(c,t)):(a[l]||(s("new io instance for %s",c),a[l]=i(c,t)),n=a[l]),r.query&&!t.query&&(t.query=r.query),n.socket(r.path,t)}t.protocol=r.protocol,t.connect=c,t.Manager=n(7501),t.Socket=n(6479)},7501:(e,t,n)=>{var o=n(7409),r=n(6479),i=n(6621),s=n(3416),a=n(8807),c=n(8821),l=n(5925)("socket.io-client:manager"),u=n(8486),p=n(9145),d=Object.prototype.hasOwnProperty;function h(e,t){if(!(this instanceof h))return new h(e,t);e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.nsps={},this.subs=[],this.opts=t,this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor||.5),this.backoff=new p({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this.readyState="closed",this.uri=e,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var n=t.parser||s;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this.autoConnect=!1!==t.autoConnect,this.autoConnect&&this.open()}e.exports=h,h.prototype.emitAll=function(){for(var e in this.emit.apply(this,arguments),this.nsps)d.call(this.nsps,e)&&this.nsps[e].emit.apply(this.nsps[e],arguments)},h.prototype.updateSocketIds=function(){for(var e in this.nsps)d.call(this.nsps,e)&&(this.nsps[e].id=this.generateId(e))},h.prototype.generateId=function(e){return("/"===e?"":e+"#")+this.engine.id},i(h.prototype),h.prototype.reconnection=function(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection},h.prototype.reconnectionAttempts=function(e){return arguments.length?(this._reconnectionAttempts=e,this):this._reconnectionAttempts},h.prototype.reconnectionDelay=function(e){return arguments.length?(this._reconnectionDelay=e,this.backoff&&this.backoff.setMin(e),this):this._reconnectionDelay},h.prototype.randomizationFactor=function(e){return arguments.length?(this._randomizationFactor=e,this.backoff&&this.backoff.setJitter(e),this):this._randomizationFactor},h.prototype.reconnectionDelayMax=function(e){return arguments.length?(this._reconnectionDelayMax=e,this.backoff&&this.backoff.setMax(e),this):this._reconnectionDelayMax},h.prototype.timeout=function(e){return arguments.length?(this._timeout=e,this):this._timeout},h.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},h.prototype.open=h.prototype.connect=function(e,t){if(l("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;l("opening %s",this.uri),this.engine=o(this.uri,this.opts);var n=this.engine,r=this;this.readyState="opening",this.skipReconnect=!1;var i=a(n,"open",(function(){r.onopen(),e&&e()})),s=a(n,"error",(function(t){if(l("connect_error"),r.cleanup(),r.readyState="closed",r.emitAll("connect_error",t),e){var n=new Error("Connection error");n.data=t,e(n)}else r.maybeReconnectOnOpen()}));if(!1!==this._timeout){var c=this._timeout;l("connect attempt will timeout after %d",c),0===c&&i.destroy();var u=setTimeout((function(){l("connect attempt timed out after %d",c),i.destroy(),n.close(),n.emit("error","timeout"),r.emitAll("connect_timeout",c)}),c);this.subs.push({destroy:function(){clearTimeout(u)}})}return this.subs.push(i),this.subs.push(s),this},h.prototype.onopen=function(){l("open"),this.cleanup(),this.readyState="open",this.emit("open");var e=this.engine;this.subs.push(a(e,"data",c(this,"ondata"))),this.subs.push(a(e,"ping",c(this,"onping"))),this.subs.push(a(e,"pong",c(this,"onpong"))),this.subs.push(a(e,"error",c(this,"onerror"))),this.subs.push(a(e,"close",c(this,"onclose"))),this.subs.push(a(this.decoder,"decoded",c(this,"ondecoded")))},h.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},h.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},h.prototype.ondata=function(e){this.decoder.add(e)},h.prototype.ondecoded=function(e){this.emit("packet",e)},h.prototype.onerror=function(e){l("error",e),this.emitAll("error",e)},h.prototype.socket=function(e,t){var n=this.nsps[e];if(!n){n=new r(this,e,t),this.nsps[e]=n;var o=this;n.on("connecting",i),n.on("connect",(function(){n.id=o.generateId(e)})),this.autoConnect&&i()}function i(){~u(o.connecting,n)||o.connecting.push(n)}return n},h.prototype.destroy=function(e){var t=u(this.connecting,e);~t&&this.connecting.splice(t,1),this.connecting.length||this.close()},h.prototype.packet=function(e){l("writing packet %j",e);var t=this;e.query&&0===e.type&&(e.nsp+="?"+e.query),t.encoding?t.packetBuffer.push(e):(t.encoding=!0,this.encoder.encode(e,(function(n){for(var o=0;o<n.length;o++)t.engine.write(n[o],e.options);t.encoding=!1,t.processPacketQueue()})))},h.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var e=this.packetBuffer.shift();this.packet(e)}},h.prototype.cleanup=function(){l("cleanup");for(var e=this.subs.length,t=0;t<e;t++)this.subs.shift().destroy();this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},h.prototype.close=h.prototype.disconnect=function(){l("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"===this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},h.prototype.onclose=function(e){l("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",e),this._reconnection&&!this.skipReconnect&&this.reconnect()},h.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var e=this;if(this.backoff.attempts>=this._reconnectionAttempts)l("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var t=this.backoff.duration();l("will wait %dms before reconnect attempt",t),this.reconnecting=!0;var n=setTimeout((function(){e.skipReconnect||(l("attempting reconnect"),e.emitAll("reconnect_attempt",e.backoff.attempts),e.emitAll("reconnecting",e.backoff.attempts),e.skipReconnect||e.open((function(t){t?(l("reconnect attempt error"),e.reconnecting=!1,e.reconnect(),e.emitAll("reconnect_error",t.data)):(l("reconnect success"),e.onreconnect())})))}),t);this.subs.push({destroy:function(){clearTimeout(n)}})}},h.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)}},8807:e=>{e.exports=function(e,t,n){return e.on(t,n),{destroy:function(){e.removeListener(t,n)}}}},6479:(e,t,n)=>{var o=n(3416),r=n(6621),i=n(2459),s=n(8807),a=n(8821),c=n(5925)("socket.io-client:socket"),l=n(5877),u=n(310);e.exports=h;var p={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},d=r.prototype.emit;function h(e,t,n){this.io=e,this.nsp=t,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,this.flags={},n&&n.query&&(this.query=n.query),this.io.autoConnect&&this.open()}r(h.prototype),h.prototype.subEvents=function(){if(!this.subs){var e=this.io;this.subs=[s(e,"open",a(this,"onopen")),s(e,"packet",a(this,"onpacket")),s(e,"close",a(this,"onclose"))]}},h.prototype.open=h.prototype.connect=function(){return this.connected||(this.subEvents(),this.io.reconnecting||this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting")),this},h.prototype.send=function(){var e=i(arguments);return e.unshift("message"),this.emit.apply(this,e),this},h.prototype.emit=function(e){if(p.hasOwnProperty(e))return d.apply(this,arguments),this;var t=i(arguments),n={type:(void 0!==this.flags.binary?this.flags.binary:u(t))?o.BINARY_EVENT:o.EVENT,data:t,options:{}};return n.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof t[t.length-1]&&(c("emitting packet with ack id %d",this.ids),this.acks[this.ids]=t.pop(),n.id=this.ids++),this.connected?this.packet(n):this.sendBuffer.push(n),this.flags={},this},h.prototype.packet=function(e){e.nsp=this.nsp,this.io.packet(e)},h.prototype.onopen=function(){if(c("transport is open - connecting"),"/"!==this.nsp)if(this.query){var e="object"==typeof this.query?l.encode(this.query):this.query;c("sending connect packet with query %s",e),this.packet({type:o.CONNECT,query:e})}else this.packet({type:o.CONNECT})},h.prototype.onclose=function(e){c("close (%s)",e),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",e)},h.prototype.onpacket=function(e){var t=e.nsp===this.nsp,n=e.type===o.ERROR&&"/"===e.nsp;if(t||n)switch(e.type){case o.CONNECT:this.onconnect();break;case o.EVENT:case o.BINARY_EVENT:this.onevent(e);break;case o.ACK:case o.BINARY_ACK:this.onack(e);break;case o.DISCONNECT:this.ondisconnect();break;case o.ERROR:this.emit("error",e.data)}},h.prototype.onevent=function(e){var t=e.data||[];c("emitting event %j",t),null!=e.id&&(c("attaching ack callback to event"),t.push(this.ack(e.id))),this.connected?d.apply(this,t):this.receiveBuffer.push(t)},h.prototype.ack=function(e){var t=this,n=!1;return function(){if(!n){n=!0;var r=i(arguments);c("sending ack %j",r),t.packet({type:u(r)?o.BINARY_ACK:o.ACK,id:e,data:r})}}},h.prototype.onack=function(e){var t=this.acks[e.id];"function"==typeof t?(c("calling ack %s with %j",e.id,e.data),t.apply(this,e.data),delete this.acks[e.id]):c("bad ack %s",e.id)},h.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},h.prototype.emitBuffered=function(){var e;for(e=0;e<this.receiveBuffer.length;e++)d.apply(this,this.receiveBuffer[e]);for(this.receiveBuffer=[],e=0;e<this.sendBuffer.length;e++)this.packet(this.sendBuffer[e]);this.sendBuffer=[]},h.prototype.ondisconnect=function(){c("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},h.prototype.destroy=function(){if(this.subs){for(var e=0;e<this.subs.length;e++)this.subs[e].destroy();this.subs=null}this.io.destroy(this)},h.prototype.close=h.prototype.disconnect=function(){return this.connected&&(c("performing disconnect (%s)",this.nsp),this.packet({type:o.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},h.prototype.compress=function(e){return this.flags.compress=e,this},h.prototype.binary=function(e){return this.flags.binary=e,this}},4550:(e,t,n)=>{var o=n(9026),r=n(5925)("socket.io-client:url");e.exports=function(e,t){var n=e;t=t||"undefined"!=typeof location&&location,null==e&&(e=t.protocol+"//"+t.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?t.protocol+e:t.host+e),/^(https?|wss?):\/\//.test(e)||(r("protocol-less url %s",e),e=void 0!==t?t.protocol+"//"+e:"https://"+e),r("parse %s",e),n=o(e)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";var i=-1!==n.host.indexOf(":")?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+i+":"+n.port,n.href=n.protocol+"://"+i+(t&&t.port===n.port?"":":"+n.port),n}},6621:e=>{function t(e){if(e)return function(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}(e)}e.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,o=this._callbacks["$"+e];if(!o)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var r=0;r<o.length;r++)if((n=o[r])===t||n.fn===t){o.splice(r,1);break}return 0===o.length&&delete this._callbacks["$"+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],o=1;o<arguments.length;o++)t[o-1]=arguments[o];if(n){o=0;for(var r=(n=n.slice(0)).length;o<r;++o)n[o].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}},5925:(e,t,n)=>{function o(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}(t=e.exports=n(3153)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),n){var o="color: "+this.color;e.splice(1,0,o,"color: inherit");var r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(i=r))})),e.splice(i,0,o)}},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=o,t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(o())},3153:(e,t,n)=>{function o(e){var n;function o(){if(o.enabled){var e=o,r=+new Date,i=r-(n||r);e.diff=i,e.prev=n,e.curr=r,n=r;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var c=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,o){if("%%"===n)return n;c++;var r=t.formatters[o];if("function"==typeof r){var i=s[c];n=r.call(e,i),s.splice(c,1),c--}return n})),t.formatArgs.call(e,s);var l=o.log||t.log||console.log.bind(console);l.apply(e,s)}}return o.namespace=e,o.enabled=t.enabled(e),o.useColors=t.useColors(),o.color=function(e){var n,o=0;for(n in e)o=(o<<5)-o+e.charCodeAt(n),o|=0;return t.colors[Math.abs(o)%t.colors.length]}(e),o.destroy=r,"function"==typeof t.init&&t.init(o),t.instances.push(o),o}function r(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}(t=e.exports=o.debug=o.default=o).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){var n;t.save(e),t.names=[],t.skips=[];var o=("string"==typeof e?e:"").split(/[\s,]+/),r=o.length;for(n=0;n<r;n++)o[n]&&("-"===(e=o[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){var i=t.instances[n];i.enabled=t.enabled(i.namespace)}},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,o;for(n=0,o=t.skips.length;n<o;n++)if(t.skips[n].test(e))return!1;for(n=0,o=t.names.length;n<o;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(119),t.instances=[],t.names=[],t.skips=[],t.formatters={}},119:e=>{var t=1e3,n=60*t,o=60*n,r=24*o;function i(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}e.exports=function(e,s){s=s||{};var a,c=typeof e;if("string"===c&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var i=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(i){var s=parseFloat(i[1]);switch((i[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"days":case"day":case"d":return s*r;case"hours":case"hour":case"hrs":case"hr":case"h":return s*o;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(e);if("number"===c&&!1===isNaN(e))return s.long?i(a=e,r,"day")||i(a,o,"hour")||i(a,n,"minute")||i(a,t,"second")||a+" ms":function(e){return e>=r?Math.round(e/r)+"d":e>=o?Math.round(e/o)+"h":e>=n?Math.round(e/n)+"m":e>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},4031:(e,t,n)=>{var o=n(6368),r=n(2660),i=Object.prototype.toString,s="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===i.call(Blob),a="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===i.call(File);function c(e,t){if(!e)return e;if(r(e)){var n={_placeholder:!0,num:t.length};return t.push(e),n}if(o(e)){for(var i=new Array(e.length),s=0;s<e.length;s++)i[s]=c(e[s],t);return i}if("object"==typeof e&&!(e instanceof Date)){for(var a in i={},e)i[a]=c(e[a],t);return i}return e}function l(e,t){if(!e)return e;if(e&&e._placeholder)return t[e.num];if(o(e))for(var n=0;n<e.length;n++)e[n]=l(e[n],t);else if("object"==typeof e)for(var r in e)e[r]=l(e[r],t);return e}t.deconstructPacket=function(e){var t=[],n=e.data,o=e;return o.data=c(n,t),o.attachments=t.length,{packet:o,buffers:t}},t.reconstructPacket=function(e,t){return e.data=l(e.data,t),e.attachments=void 0,e},t.removeBlobs=function(e,t){var n=0,i=e;!function e(c,l,u){if(!c)return c;if(s&&c instanceof Blob||a&&c instanceof File){n++;var p=new FileReader;p.onload=function(){u?u[l]=this.result:i=this.result,--n||t(i)},p.readAsArrayBuffer(c)}else if(o(c))for(var d=0;d<c.length;d++)e(c[d],d,c);else if("object"==typeof c&&!r(c))for(var h in c)e(c[h],h,c)}(i),n||t(i)}},3416:(e,t,n)=>{var o=n(5925)("socket.io-parser"),r=n(6621),i=n(4031),s=n(6368),a=n(2660);function c(){}t.protocol=4,t.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],t.CONNECT=0,t.DISCONNECT=1,t.EVENT=2,t.ACK=3,t.ERROR=4,t.BINARY_EVENT=5,t.BINARY_ACK=6,t.Encoder=c,t.Decoder=p;var l=t.ERROR+'"encode error"';function u(e){var n=""+e.type;if(t.BINARY_EVENT!==e.type&&t.BINARY_ACK!==e.type||(n+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(n+=e.nsp+","),null!=e.id&&(n+=e.id),null!=e.data){var r=function(e){try{return JSON.stringify(e)}catch(e){return!1}}(e.data);if(!1===r)return l;n+=r}return o("encoded %j as %s",e,n),n}function p(){this.reconstructor=null}function d(e){this.reconPack=e,this.buffers=[]}function h(e){return{type:t.ERROR,data:"parser error: "+e}}c.prototype.encode=function(e,n){o("encoding packet %j",e),t.BINARY_EVENT===e.type||t.BINARY_ACK===e.type?function(e,t){i.removeBlobs(e,(function(e){var n=i.deconstructPacket(e),o=u(n.packet),r=n.buffers;r.unshift(o),t(r)}))}(e,n):n([u(e)])},r(p.prototype),p.prototype.add=function(e){var n;if("string"==typeof e)n=function(e){var n=0,r={type:Number(e.charAt(0))};if(null==t.types[r.type])return h("unknown packet type "+r.type);if(t.BINARY_EVENT===r.type||t.BINARY_ACK===r.type){for(var i=n+1;"-"!==e.charAt(++n)&&n!=e.length;);var a=e.substring(i,n);if(a!=Number(a)||"-"!==e.charAt(n))throw new Error("Illegal attachments");r.attachments=Number(a)}if("/"===e.charAt(n+1)){for(i=n+1;++n&&","!==(l=e.charAt(n))&&n!==e.length;);r.nsp=e.substring(i,n)}else r.nsp="/";var c=e.charAt(n+1);if(""!==c&&Number(c)==c){for(i=n+1;++n;){var l;if(null==(l=e.charAt(n))||Number(l)!=l){--n;break}if(n===e.length)break}r.id=Number(e.substring(i,n+1))}if(e.charAt(++n)){var u=function(e){try{return JSON.parse(e)}catch(e){return!1}}(e.substr(n));if(!1===u||r.type!==t.ERROR&&!s(u))return h("invalid payload");r.data=u}return o("decoded %s as %j",e,r),r}(e),t.BINARY_EVENT===n.type||t.BINARY_ACK===n.type?(this.reconstructor=new d(n),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",n)):this.emit("decoded",n);else{if(!a(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");(n=this.reconstructor.takeBinaryData(e))&&(this.reconstructor=null,this.emit("decoded",n))}},p.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},d.prototype.takeBinaryData=function(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){var t=i.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null},d.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},2660:e=>{e.exports=function(e){return t&&Buffer.isBuffer(e)||n&&(e instanceof ArrayBuffer||function(e){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer}(e))};var t="function"==typeof Buffer&&"function"==typeof Buffer.isBuffer,n="function"==typeof ArrayBuffer},2459:e=>{e.exports=function(e,t){for(var n=[],o=(t=t||0)||0;o<e.length;o++)n[o-t]=e[o];return n}},9289:e=>{"use strict";var t,n="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),o={},r=0,i=0;function s(e){var t="";do{t=n[e%64]+t,e=Math.floor(e/64)}while(e>0);return t}function a(){var e=s(+new Date);return e!==t?(r=0,t=e):e+"."+s(r++)}for(;i<64;i++)o[n[i]]=i;a.encode=s,a.decode=function(e){var t=0;for(i=0;i<e.length;i++)t=64*t+o[e.charAt(i)];return t},e.exports=a},7881:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var crypto_js_hmac_sha256__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(6948),crypto_js_hmac_sha256__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(crypto_js_hmac_sha256__WEBPACK_IMPORTED_MODULE_0__);function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}var MessageUtils=function(){function MessageUtils(){_classCallCheck(this,MessageUtils)}return _createClass(MessageUtils,null,[{key:"getTime",value:function(e){var t=new Date;e&&(t=new Date(e));var n=t.getHours(),o=t.getMinutes(),r=n>9?n:" 0".concat(n),i=o>9?o:"0".concat(o);return"".concat(r,":").concat(i)}},{key:"generateId",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))}},{key:"encryptText",value:function(e,t){return String(crypto_js_hmac_sha256__WEBPACK_IMPORTED_MODULE_0___default()(e,t)).substring(0,64)}},{key:"mergeObjects",value:function(e,t){var n={};for(var o in e)void 0!==n[o]&&null!==n[o]||(n[o]=e[o]);for(var r in t)void 0===t[r]&&null===t[r]||(n[r]=t[r]);return n}},{key:"boldText",value:function boldText(text,identifier,htmltag){var array=text.split(identifier),previous="",previous_i,i;for(i=0;i<array.length;i++)i%2||0!=i&&(previous_i=eval(i-1),array[previous_i]="<"+htmltag+">"+previous+"</"+htmltag+">"),previous=array[i];var newtext="";for(i=0;i<array.length;i++)newtext+=array[i];return newtext}},{key:"parseMessage",value:function(e,t){return this.boldText(this.parseLink(e,t),"*","b").replace(/\n/g,"<br/>")}},{key:"parseLink",value:function(e,t){return e.replace(/([^\S]|^)(((https?\:\/\/)|(www\.))(\S+))/gi,(function(e,n,o){var r=o;return r.match("^https?://")||(r="http://"+r),n+"<a ".concat(t?'style="color:inherit;"':"",' href="')+r+'" target="_blank">'+o+"</a>"}))}}]),MessageUtils}();const __WEBPACK_DEFAULT_EXPORT__=MessageUtils},1315:(e,t,n)=>{(t=n(7705)(!1)).push([e.id,"@supports (-webkit-touch-callout: none) {\n /* CSS specific to iOS devices */\n #chat-container input {\n transform: translateZ(0px);\n user-select: auto;\n -webkit-user-select: auto;\n -webkit-appearance: none;\n -webkit-transform: translateZ(0px);\n box-sizing: border-box;\n border: 0;\n color: black;\n }\n}\n@supports not (-webkit-touch-callout: none) {\n /* CSS for other than iOS devices */\n #chat-container input {\n padding: 10px 20px;\n box-sizing: border-box;\n border: 0;\n display: block;\n width: 100%;\n color: black;\n }\n}\n#chat-container {\n font-family: 'Nunito', sans-serif;\n position: fixed;\n right: 0;\n bottom: 0;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n /* max-height: calc(var(--vhchat, 1vh) * 95); */\n /* max-height: 90vh; */\n max-width: 100vw;\n}\n#chat-window {\n transition-property: height, transform;\n transition-duration: 0.5s;\n margin-left:auto;\n}\n.visible-chat-window {\n border-radius: 10px;\n display: flex;\n background: rgb(246, 246, 247);\n flex-direction:column;\n height: 620px;\n max-height: calc(var(--vhchat, 1vh) * 90);\n flex-grow:100;\n max-width: 320px;\n padding: 0;\n color: #555;\n justify-content: space-between;\n -webkit-box-shadow: 3px 6px 14px 0px rgba(133,116,133,1);\n -moz-box-shadow: 3px 6px 14px 0px rgba(133,116,133,1);\n box-shadow: 3px 6px 14px 0px rgba(133,116,133,1);\n transform-origin: 100% 100%;\n}\n\n.visible-chat-window-fullscreen {\n display: flex;\n background: rgb(246, 246, 247);\n flex-direction:column;\n height: 620px;\n flex-grow:100;\n color: #555;\n justify-content: space-between;\n -webkit-box-shadow: 3px 6px 14px 0px rgba(133,116,133,1);\n -moz-box-shadow: 3px 6px 14px 0px rgba(133,116,133,1);\n box-shadow: 3px 6px 14px 0px rgba(133,116,133,1);\n transform-origin: 100% 100%;\n\n}\n\n#output {\n overflow-y: auto;\n width: 100%;\n padding: 0.5em;\n outline: black solid 0px;\n background: transparent;\n box-sizing: border-box;\n overscroll-behavior: contain;\n}\n\n#actions p {\n padding: 14px 0;\n margin: 0 20px;\n border-bottom: 1px solid #e9e9e9;\n}\n\n#chat-input-box {\n width: 100%;\n height: 60px;\n /* line-height: 60px; */\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items:center;\n background-color: white;\n}\n\n.button-component-div{\n border: none; \n padding: 0px !important;\n text-decoration: none;\n text-align:center;\n font-size: 16px;\n /* margin-top: 10px; */\n border-radius: 10px;\n cursor: pointer;\n background-color: white;\n}\n\n/* .button-component-label{\n text-align: left;\n text-decoration: none;\n display: inline-block;\n font-size: 16px; \n color: #5cc5f8!important;\n} */\n\n.button-component-label{\n text-align: center;\n text-decoration: none;\n display: inline-block;\n font-size: 16px; \n color: #5cc5f8!important;\n}\n\n#chat-container button {\n background-color: transparent;\n border: 0;\n cursor: pointer;\n}\n#send {\n max-width: 55px;\n outline: none;\n margin-right:15px;\n}\n#chat-bubble {\n margin: 0;\n padding: 0;\n transition: transform 0.5s;\n}\n#message {\n width: 260px;\n height: 21px;\n padding-top: 17.5px;\n padding-bottom: 17.5px;\n padding-left: 14px;\n outline: none;\n padding-right: 14px;\n}\n.message-box {\n margin-top: 5px;\n margin-bottom: 5px;\n width: fit-content;\n padding: 14px;\n border-radius: 6px;\n}\n.message-box-document {\n margin-top: 5px;\n margin-bottom: 5px;\n width: 100%;\n /* padding: 14px;\n border-radius: 6px; */\n}\n\n.message-box-own {\n margin-top: 5px;\n margin-bottom: 5px;\n width: fit-content;\n padding: 14px;\n border-radius: 6px;\n}\n.message-box-container {\n margin-top:10px;\n margin-bottom: 10px;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n}\n.message-box-container-own {\n margin-top:10px;\n margin-bottom: 10px;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n}\n.message-span {\n margin: 0;\n}\n.message-header-span {\n color: #aaa;\n}\n#chat-header {\n width: 100%;\n padding-right:13px;\n padding-left: 13px;\n height: 50px;\n background-color: white;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n box-sizing: border-box;\n}\n.visible-chat-bubble {\n height: 60px;\n width: 60px;\n border-radius: 50px;\n flex-grow: 100;\n outline: none;\n -webkit-box-shadow: 3px 6px 14px 0px rgba(133,116,133,1);\n -moz-box-shadow: 3px 6px 14px 0px rgba(133,116,133,1);\n box-shadow: 3px 6px 14px 0px rgba(133,116,133,1);\n transform:scale(1);\n}\n.not-visible {\n height: 0px;\n transform: scale(0);\n transform-origin: 90% 10%;\n position:absolute;\n right: 0;\n bottom: 0;\n flex-grow: 0;\n\n}\n.bubble-not-visible {\n transform:scale(0);\n position:absolute;\n height: 0px;\n flex-grow: 0;\n}\n\n.bubble-square {\n position: relative;\n min-height: 50px;\n min-width: 200px;\n padding: 5px;\n display:flex;\n align-items:center;\n background: white;\n border-radius: 8px;\n box-shadow: 1px 12px 33px rgba(0, 0, 0, 0.5);\n}\n/* .bubble-square:before {\n border: 25px solid white;\n content: '';\n border-left-color: transparent;\n border-bottom-color: transparent;\n border-right-color: transparent;\n position: absolute;\n bottom: -38px;\n left: calc(85% - 25px)\n} */\n\n.welcome-label-button-div {\n margin: 0;\n display: inline-block;\n background: rgb(107, 120, 128);\n border-radius: 50px;\n text-align: center;\n cursor: pointer;\n width: 25px;\n height: 25px;\n position: absolute;\n top: -0px;\n z-index: 1;\n right: 10px;\n transform: scale(1);\n transition: transform 200ms cubic-bezier(0.18, 0.89, 0.32, 1.28) 50ms;\n}\n.welcome-label-button-div:hover {\n transform: scale(1.25);\n}\n\n.welcome-label-button-close {\n margin: 0 \n}\n\n.welcome-label-title {\n font-size:1em;\n font-weight: bold;\n margin-right: 10px;\n}\n\n.welcome-label-body {\n font-size:0.8em;\n margin-right: 10px;\n}\n\n.welcome-label-container {\n border: 1px solid #ccc;\n padding: 10px;\n border-radius: 4px;\n margin-bottom: 10px;\n display: flex;\n justify-content: flex-start;\n}\n\n.img-tag-message {\n margin-top: 10px;\n max-width: 100%;\n}\n.document-div {\n margin-top: 10px;\n margin-left: 5px;\n max-width: 100%;\n display:flex;\n flex-direction: row;\n align-items: center;\n border: 2px solid;\n border-radius: 10px;\n padding: 14px;\n}\n\n.div-document{\n background-color: #fff;\n height: fit-content;\n width: 100%;\n cursor: pointer;\n border-radius: 10px;\n border:1px;\n padding: 5px;\n}\n\n.div-preview-files{\n max-width: 200px;\n background-color: #aaa;\n padding: 4px;\n}\n\n.border-top-radius{\n border-top-left-radius: 10px;\n border-top-right-radius: 10px;\n}\n\n.caption-document{\n display:flex;\n flex-direction: row;\n align-items: center;\n cursor: pointer;\n}\n.chat-bubble:hover{\n opacity: 0;\n transition: opacity 150ms cubic-bezier(0.33, 0, 0.67, 1) 50ms;\n}\n.bubble-icon-div {\n margin: auto;\n width: 32px;\n height: 32px;\n transform: scale(1);\n transition: transform 200ms cubic-bezier(0.18, 0.89, 0.32, 1.28) 50ms;\n}\n.bubble-icon-div:hover {\n transform: scale(1.25);\n}\n.dots-animation {\n opacity: 0;\n position: absolute;\n /* z-index: 1; */\n left: 0px;\n right: 0px;\n bottom: 1px;\n /* display: flex; */\n width: 32px;\n height: 32px;\n -webkit-box-align: center;\n align-items: center;\n -webkit-box-pack: center;\n justify-content: center;\n opacity: 1;\n transition: opacity 150ms cubic-bezier(0.33, 0, 0.67, 1) 50ms;\n}\n.dots-animation:hover{\n opacity: 1;\n}\n.dot-1 {\n transform-box: fill-box;\n transform-origin: 50% 50%;\n animation-timing-function: cubic-bezier(0, 0, 1, 1);\n animation-name: animation-1fn2epw;\n animation-duration: 1s;\n animation-iteration-count: 1;\n}\n.dot-2 {\n transform-box: fill-box;\n transform-origin: 50% 50%;\n animation-timing-function: cubic-bezier(0, 0, 1, 1);\n animation-name: animation-188vgt8;\n animation-duration: 1s;\n animation-iteration-count: 1;\n}\n.dot-3 {\n transform-box: fill-box;\n transform-origin: 50% 50%;\n animation-timing-function: cubic-bezier(0, 0, 1, 1);\n animation-name: animation-11sr958;\n animation-duration: 1s;\n animation-iteration-count: 1;\n}",""]),e.exports=t},7225:e=>{e.exports='<div class="${messageContainerClass}" style="${styleMessage}" data-id="${messageId}">\n <div class="message-header">\n <span class="message-header-span" style="color:${usernameInfoColor}">\n <strong>${dataUsername}</strong> ${timeMessage} </span>\n </div>\n <audio controls style="max-width: 100%;outline:none; margin-top: 10px;">\n <source src="${audioUrl}" type="${audioType}">\n Your browser does not support the audio element.\n </audio>\n</div>'},7454:e=>{e.exports='<hr class="margin:0px">\n<div class="button-component-div" ${buttonId} ${url}>\n <span class="button-component">${icon}</span>\n <button class="button-component-label"> ${label}</button>\n</div>\n\n'},3195:e=>{e.exports='\x3c!-- <link rel="stylesheet" href="../css/main.css"> --\x3e\n\x3c!-- <meta name="viewport" content="width=device-width, initial-scale=1.0"/> --\x3e\n<div id="chat-window" class="not-visible">\n <div id="chat-header">\n <div>\n\n </div>\n <span><strong>${titleChat}</strong></span>\n <div>\n <button id="minimize-btn" type="button">\n <svg style="width:24px;height:24px" viewBox="0 -5 24 24">\n <path id="minimize-btn-path" fill="currentColor" d="M20,14H4V10H20" />\n </svg>\n </button>\n \x3c!-- <button type="button">\n <svg style="width:24px;height:24px" viewBox="0 0 24 24">\n <path fill="currentColor" d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" />\n </svg>\n </button> --\x3e\n </div>\n \n </div>\n <div id="output" style="z-index: 2">\n </div>\n <div id="showInfoContactId" style="display: none;z-index: 3;height:100%"></div>\n <div id="chat-input-box">\n <input type="text" id="message" placeholder="${messagePlaceholder}">\n <button id="send">\x3c!-- <img id="icon-send" alt="Send"> --\x3e<?xml version="1.0" encoding="UTF-8"?>\n\n <svg id="send-icon" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="32" height="32" viewBox="0 0 24 24">\n <path d="M2,21L23,12L2,3V10L17,12L2,14V21Z" />\n </svg>\n </button>\n </div>\n \x3c!-- <div id="footer-chat">\n \n </div> --\x3e\n \n</div>\x3c!-- src="../img/send.svg" --\x3e\n<div id="welcomeLabel" style="margin-bottom: 18px;"></div>\n<button id="chat-bubble" class="visible-chat-bubble">\n <div class="bubble-icon-div">\n ${chat-bubble-icon}\n \x3c!-- <svg style="width:24px;height:24px" viewBox="0 0 24 24">\n <path fill="currentColor" d="M12,3C17.5,3 22,6.58 22,11C22,15.42 17.5,19 12,19C10.76,19 9.57,18.82 8.47,18.5C5.55,21 2,21 2,21C4.33,18.67 4.7,17.1 4.75,16.5C3.05,15.07 2,13.13 2,11C2,6.58 6.5,3 12,3M17,12V10H15V12H17M13,12V10H11V12H13M9,12V10H7V12H9Z" />\n </svg> --\x3e\n </div>\n</button>'},3046:e=>{e.exports='<div style="display:flex;align-items:center; margin:8px" >\n ${icon}\n <div style="margin-left:8px;">\n <div >\n <span style="font-size:1em;font-weight: bold;color: black;"> ${headertext}</span>\n </div>\n <div >\n <span style="font-size:0.8em;"> ${subtext}</span>\n </div>\n </div>\n</div>'},7422:e=>{e.exports='<div class="${messageContainerClass}" style="${styleMessage}" data-id="${messageId}">\n <div class="message-header">\n <span class="message-header-span" style="color:${usernameInfoColor}">\n <strong>${dataUsername}</strong> ${timeMessage} </span>\n </div>\n <div style="display:flex;align-items:center;background-color: ${messageBackgroundColor};" class="${messageBoxClass}">\n <div>\n <div id="${messageId}" style="display:flex;align-items:center;cursor: pointer;">\n ${userIcon}\n <div style="margin-left:8px">\n <div >\n <span style="font-size:1em;font-weight: bold;margin-right:35px"> ${name}</span>\n </div>\n </div> \n </div>\n \x3c!-- <hr class="margin:0px">\n <div class="button-component-div">\n <button class="button-component-label;"> ${label}</button>\n </div> --\x3e\n </div> \n </div>\n</div>\n\n\n\n\n'},2325:e=>{e.exports='<div class="${messageContainerClass}" style="${styleMessage}" data-id="${messageId}">\n <div class="message-header">\n <span class="message-header-span" style="color:${usernameInfoColor}">\n <strong>${dataUsername}</strong> ${timeMessage} </span>\n </div>\n <a style="text-decoration:none;" href="${documentUrl}" target="_blank">\n <div class="div-document">\n <div class="div-preview-files">\n <div>\n <iframe src="${documentUrl}" scrolling="no" style="width: 100%;height: 70px;border: none;"></iframe>\n </div>\n <div class="caption-document">\n ${iconFile}\n <span>\n ${caption}\n </span>\n </div>\n </div>\n \x3c!-- <div style="background-color: ${messageBackgroundColor};margin:3px;">\n <span class="message-span" style="color:#CCC;">\n ${infoDocument}\n </span> \n </div> --\x3e\n </div>\n </a>\n \n \n</div>\n\n\n\n'},5926:e=>{e.exports='<div class="${messageContainerClass}" style="${styleMessage}" data-id="${messageId}">\n <div class="message-header">\n <span class="message-header-span" style="color:${usernameInfoColor}">\n <strong>${dataUsername}</strong> ${timeMessage} </span>\n </div>\n <img class="img-tag-message" src=${srcImg}>\n <div style="background-color: ${messageBackgroundColor};" class="${messageBoxClass}">\n <span class="message-span" style=\'color: ${messageColor};\'>\n ${caption}\n </span>\n </div>\n</div>'},8004:e=>{e.exports='<div class="${messageContainerClass}" style="${styleMessage}" data-id="${messageId}">\n <div class="message-header">\n <span class="message-header-span" style="color:${usernameInfoColor}">\n <strong>${dataUsername}</strong> ${timeMessage} </span>\n </div>\n <div id="${messageId}" style="display:flex;align-items:center;background-color: ${messageBackgroundColor};cursor: pointer;" class="${messageBoxClass}">\n ${locationIcon}\n <div style="margin-left:8px;">\n <div >\n <span style="font-size:1em;font-weight: bold;color: black;"> ${locationHeader}</span>\n </div>\n <div >\n <span style="font-size:0.8em;"> ${locationAddress}</span>\n </div>\n </div>\n </div>\n</div>\n\n\n\n\n'},6354:e=>{e.exports='<div class="${messageContainerClass}" style="${styleMessage}" data-id="${messageId}">\n <div class="message-header">\n <span class="message-header-span" style="color:${usernameInfoColor}">\n <strong>${dataUsername}</strong> ${timeMessage} </span>\n </div>\n <div style="background-color: ${messageBackgroundColor};" class="${messageBoxClass}">\n <span class="message-span" style=\'color: ${messageColor};\'>\n ${dataMessage}\n </span>\n </div>\n</div>'},6709:e=>{e.exports='\n<div style="${multimediaDocumentStyle}">\n <a style="text-decoration:none;" href="${documentUrl}" target="_blank">\n <div class="div-document">\n <div class="div-preview-files">\n <div>\n <iframe src="${documentUrl}" scrolling="no" style="width: 100%;height: 70px;border: none;"></iframe>\n </div>\n <div class="caption-document">\n ${iconFile}\n <span>\n ${caption}\n </span>\n </div>\n </div>\n </div>\n </a>\n</div>'},9436:e=>{e.exports='<div style="${multimediaImageStyle}">\n <img class="img-tag-message" src=${srcImg}>\n</div>\n'},2181:e=>{e.exports='<div style="${multimediaVideoStyle}">\n <video width="100%" style="margin-top:10px;" controls>\n <source src="${videoUrl}" type="${videoType}">\n Your browser does not support HTML5 video.\n </video>\n</div>\n'},4114:e=>{e.exports='<html>\n<head>\n</head>\n<body>\n\n<div style="margin-top:8px;margin-bottom:8px;display:flex;align-items:center;">\n\t<div style="margin-right:8px;cursor:pointer">\n \t\t ${backButtonIcon}\n </div>\n <div>\n \t<span>${infoContacttopBarText}</span>\n </div>\n</div>\n<hr class="margin:0px">\n<div style="padding:8px;margin-top:8px;margin-bottom:8px;display:flex;align-items:center" >\n ${userIcon}\n <div style="margin-left:8px;">\n <div >\n <span style="font-size:1em;font-weight: bold;color: black;"> ${nameContact}</span>\n </div>\n <div >\n <span style="font-size:0.8em;"> ${birthdayContact}</span>\n </div>\n </div>\n</div>\n \n<hr class="margin:0px">\n<div id="containerContact">\n\n</div>\n\n</body>\n</html>\n\n'},3012:e=>{e.exports='<div class="${messageContainerClass}" style="${styleMessage}" data-id="${messageId}">\n <div class="message-header">\n <span class="message-header-span" style="color:${usernameInfoColor}">\n <strong>${dataUsername}</strong> ${timeMessage} </span>\n </div>\n <div style="background-color: ${messageBackgroundColor};" class="${messageBoxClass}">\n <div style="margin-top: 5px;margin-bottom: 15px;">\n ${componentsHeader}\n </div>\n <div>\n ${componentsBody}\n </div>\n <div>\n ${componentsFooter}\n </div>\n <div style="margin-top: 15px;">\n ${componentsButton}\n </div>\n \n </div>\n</div>'},9663:e=>{e.exports='<div class="${messageContainerClass}" style="${styleMessage}" data-id="${messageId}">\n <div class="message-header">\n <span class="message-header-span" style="color:${usernameInfoColor}">\n <strong>${dataUsername}</strong> ${timeMessage} </span>\n </div>\n <video width="100%" style="margin-top:10px;" controls>\n <source src="${videoUrl}" type="${videoType}">\n Your browser does not support HTML5 video.\n </video>\n <div style="background-color: ${messageBackgroundColor};" class="${messageBoxClass}">\n <span class="message-span" style=\'color: ${messageColor};\'>\n ${caption}\n </span>\n </div>\n</div>\n\n\n\n\n'},2811:e=>{e.exports='<div id="welcome-close" class="welcome-label-button-div" style="background-color: ${welcomeLabelIconCloseBackgroundColor}">\n <img src="${welcomeLabelIconClose}" class="welcome-label-button-close;" >\n</div>\n<div id="welcomeLabelContainer" class="bubble-square" style="background-color: ${welcomeLabelBackgroundColor};">\n <img id="welcomeLabelIcon" width="50px" height="50px" src="xxxHTMLLINKxxx0.77482369527829560.10246230691736047xxx">\n <div style="margin-left: 10px;">\n <div >\n <span class="welcome-label-title" style="color:\'${welcomeLabelTextColor}\';"> ${welcomeLabelTitle}</span>\n </div>\n <div >\n <span class="welcome-label-body" style="color:\'${welcomeLabelTextColor}\';"> ${welcomeLabelBody}</span>\n </div>\n </div> \n</div>'},3468:(e,t,n)=>{var o=n(3379),r=n(1315);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.id,r,""]]);o(r,{insert:"head",singleton:!1}),e.exports=r.locals||{}},3379:(e,t,n)=>{"use strict";var o,r=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),i=[];function s(e){for(var t=-1,n=0;n<i.length;n++)if(i[n].identifier===e){t=n;break}return t}function a(e,t){for(var n={},o=[],r=0;r<e.length;r++){var a=e[r],c=t.base?a[0]+t.base:a[0],l=n[c]||0,u="".concat(c," ").concat(l);n[c]=l+1;var p=s(u),d={css:a[1],media:a[2],sourceMap:a[3]};-1!==p?(i[p].references++,i[p].updater(d)):i.push({identifier:u,updater:g(d,t),references:1}),o.push(u)}return o}function c(e){var t=document.createElement("style"),o=e.attributes||{};if(void 0===o.nonce){var i=n.nc;i&&(o.nonce=i)}if(Object.keys(o).forEach((function(e){t.setAttribute(e,o[e])})),"function"==typeof e.insert)e.insert(t);else{var s=r(e.insert||"head");if(!s)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");s.appendChild(t)}return t}var l,u=(l=[],function(e,t){return l[e]=t,l.filter(Boolean).join("\n")});function p(e,t,n,o){var r=n?"":o.media?"@media ".concat(o.media," {").concat(o.css,"}"):o.css;if(e.styleSheet)e.styleSheet.cssText=u(t,r);else{var i=document.createTextNode(r),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(i,s[t]):e.appendChild(i)}}function d(e,t,n){var o=n.css,r=n.media,i=n.sourceMap;if(r?e.setAttribute("media",r):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=o;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(o))}}var h=null,f=0;function g(e,t){var n,o,r;if(t.singleton){var i=f++;n=h||(h=c(t)),o=p.bind(null,n,i,!1),r=p.bind(null,n,i,!0)}else n=c(t),o=d.bind(null,n,t),r=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else r()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=(void 0===o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o));var n=a(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var o=0;o<n.length;o++){var r=s(n[o]);i[r].references--}for(var c=a(e,t),l=0;l<n.length;l++){var u=s(n[l]);0===i[u].references&&(i[u].updater(),i.splice(u,1))}n=c}}}},1766:e=>{"use strict";e.exports=JSON.parse('{"name":"indigitall-web-chat","description":"indigitall web chat","version":"1.3.2","main":"index.js","author":"Smart2me S.L.","homepage":"https://indigitall.com"}')},418:()=>{}},__webpack_module_cache__={};function __webpack_require__(e){if(__webpack_module_cache__[e])return __webpack_module_cache__[e].exports;var t=__webpack_module_cache__[e]={id:e,exports:{}};return __webpack_modules__[e].call(t.exports,t,t.exports,__webpack_require__),t.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e=__webpack_require__(3195),t=__webpack_require__.n(e),n=(__webpack_require__(3468),{platform:"web",version:"1.3.2"}),o=__webpack_require__(1766);n.version=o.version;const r=n=Object.assign(n,{defaultValues:{primaryColor:"#2a4864",zIndex:1e3,titleChat:"Chat with us!",userIsTyping:"is typing ...",messagePlaceholder:"Type your message here...",botName:"Agent",channelKey:null,externalCode:null,defaultUsername:"Me",openFileText:"Open file",backgroundChatColor:"#f6f6f7",backgroundBarColor:"#ffffff",urlServer:"https://chat-api.indigitall.com/web_chat",fullscreen:!1,defaultChatIconResource:"chat-bubble",logLevel:"",infoContactTopBarTitle:"Contact Info",welcomeLabel:null}});function i(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n;return t=e,n=[{key:"pickTextColorBasedOnBgColorAdvanced",value:function(e,t,n){var o="#"===e.charAt(0)?e.substring(1,7):e,r=[parseInt(o.substring(0,2),16)/255,parseInt(o.substring(2,4),16)/255,parseInt(o.substring(4,6),16)/255].map((function(e){return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}));return.2126*r[0]+.7152*r[1]+.0722*r[2]>.179?n:t}}],null&&i(t.prototype,null),n&&i(t,n),e}();var a=__webpack_require__(7881),c=__webpack_require__(1352),l=__webpack_require__.n(c);function u(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n;return t=e,n=[{key:"getItemStorage",value:function(e){return sessionStorage.getItem(e)}},{key:"setItemStorage",value:function(e,t){sessionStorage.setItem(e,t)}},{key:"getMessagesStorage",value:function(){var t=[];try{t=JSON.parse(e.getItemStorage("messages"))}catch(e){console.error(e.message)}return t||[]}},{key:"addMessageToStorage",value:function(t,n){var o=e.getMessagesStorage();30===o.length&&o.shift(),o.push({data:t,isOwnMessage:n}),e.setItemStorage("messages",JSON.stringify(o))}}],null&&u(t.prototype,null),n&&u(t,n),e}();var d=__webpack_require__(6354),h=__webpack_require__.n(d),f=__webpack_require__(5926),g=__webpack_require__.n(f),y=__webpack_require__(7225),m=__webpack_require__.n(y),M=__webpack_require__(9663),b=__webpack_require__.n(M),v=__webpack_require__(2325),w=__webpack_require__.n(v),C=__webpack_require__(3012),x=__webpack_require__.n(C),L=__webpack_require__(8004),I=__webpack_require__.n(L),N=__webpack_require__(7454),k=__webpack_require__.n(N),j=__webpack_require__(7422),D=__webpack_require__.n(j),T=__webpack_require__(9436),A=__webpack_require__.n(T),E=__webpack_require__(2181),_=__webpack_require__.n(E),z=__webpack_require__(6709),O=__webpack_require__.n(z),S=__webpack_require__(2811),B=__webpack_require__.n(S);function U(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const $=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t&&(t.id&&(this.id=t.id),t.url&&(this.url=t.url),t.mimetype&&(this.mimetype=t.mimetype),t.caption&&(this.caption=t.caption),t.body&&(this.body=t.body),t.previewUrl&&(this.previewUrl=t.previewUrl),t.components&&(this.components=t.components),this.contact={},this.location={})}var t,n;return t=e,(n=[{key:"toJSON",value:function(){return{id:this.id,url:this.url,mimetype:this.mimetype,caption:this.caption,body:this.body,previewUrl:this.previewUrl,components:this.components}}},{key:"setBody",value:function(e){this.body=e}}])&&U(t.prototype,n),e}();function P(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const R=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t&&(t.title&&(this.title=t.title),t.company&&(this.company=t.company),t.department&&(this.department=t.department))}var t,n;return t=e,(n=[{key:"toJSON",value:function(){return{title:this.title,company:this.company,department:this.department}}}])&&P(t.prototype,n),e}();function F(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const Q=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t&&(t.last_name&&(this.lastName=t.last_name),t.first_name&&(this.firstName=t.first_name),t.formatted_name&&(this.formattedName=t.formatted_name))}var t,n;return t=e,(n=[{key:"toJSON",value:function(){return{last_name:this.lastName,first_name:this.firstName,formatted_name:this.formattedName}}}])&&F(t.prototype,n),e}();function H(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const Y=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t&&(t.email&&(this.email=t.email),t.type&&(this.type=t.type))}var t,n;return t=e,(n=[{key:"toJSON",value:function(){return{email:this.email,type:this.type}}}])&&H(t.prototype,n),e}();function Z(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const q=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t&&(t.zip&&(this.zip=t.zip),t.city&&(this.city=t.city),t.type&&(this.type=t.type),t.state&&(this.state=t.state),t.street&&(this.street=t.street),t.country&&(this.country=t.country),t.countryCode&&(this.countryCode=t.countryCode))}var t,n;return t=e,(n=[{key:"toJSON",value:function(){return{zip:this.zip,city:this.city,state:this.state,type:this.type,street:this.street,country:this.country,countryCode:this.countryCode}}}])&&Z(t.prototype,n),e}();function W(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const G=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t&&(t.phone&&(this.phone=t.phone),t.type&&(this.type=t.type))}var t,n;return t=e,(n=[{key:"toJSON",value:function(){return{phone:this.phone,type:this.type}}}])&&W(t.prototype,n),e}();function J(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const V=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t&&(t.url&&(this.url=t.url),t.type&&(this.type=t.type))}var t,n;return t=e,(n=[{key:"toJSON",value:function(){return{url:this.url,type:this.type}}}])&&J(t.prototype,n),e}();function X(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const K=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t){if(t.birthday&&(this.birthday=t.birthday),t.org&&(this.contactOrg=new R(t.org)),t.name&&(this.contactName=new Q(t.name)),t.emails){this.contactEmailList=[];for(var n=t.emails,o=0;o<n.length;o++)this.contactEmailList.push(new Y(n[o]))}if(t.addresses){this.contactAddressList=[];var r=t.addresses;for(o=0;o<r.length;o++)this.contactAddressList.push(new q(r[o]))}if(t.phones){this.contactPhoneList=[];var i=t.phones;for(o=0;o<i.length;o++)this.contactPhoneList.push(new G(i[o]))}if(t.urls){this.contactURLList=[];var s=t.urls;for(o=0;o<s.length;o++)this.contactURLList.push(new V(s[o]))}}}var t,n;return t=e,(n=[{key:"toJSON",value:function(){var e={};if(this.birthday&&(e.birthday=this.birthday),this.contactName&&(e.name=this.contactName),this.contactOrg&&(e.org=this.contactOrg),this.addressList){var t=[];for(address in this.addressList)t.push(address.toJSON());e.addresses=t}if(this.emailList){for(email in t=[],this.emailList)t.push(email.toJSON());e.emails=t}if(this.contactPhoneList){for(phone in t=[],this.contactPhoneList)t.push(phone.toJSON());e.phones=t}if(this.contactURLList){for(url in t=[],this.contactURLList)t.push(url.toJSON());e.urls=t}return e}}])&&X(t.prototype,n),e}();function ee(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const te=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t&&(t.name&&(this.name=t.name),t.address&&(this.address=t.address),t.latitude&&(this.latitude=t.latitude),t.longitude&&(this.longitude=t.longitude))}var t,n;return t=e,(n=[{key:"toJSON",value:function(){return{name:this.name,address:this.address,latitude:this.latitude,longitude:this.longitude}}}])&&ee(t.prototype,n),e}();function ne(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const oe=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t&&(t.messageId&&(this.messageId=t.messageId),t.timespan&&(this.timespan=t.timespan),t.sendType&&(this.sendType=t.sendType),t.contentType&&(this.contentType=t.contentType),t.content&&(this.content=new $(t.content),"location"==this.contentType&&(this.content.location=new te(t.content)),"contacts"==this.contentType&&(this.content.contact=new K(t.content[0]))),t.error&&(this.error=t.error))}var t,n;return t=e,(n=[{key:"toJSON",value:function(){return{messageId:this.messageId,timespan:this.timespan,sendType:this.sendType,contentType:this.contentType,content:this.content?this.content.toJSON():null,error:this.error}}}])&&ne(t.prototype,n),e}(),re=Object.freeze({HEADER:"header",BODY:"body",FOOTER:"footer",BUTTON:"button"}),ie=Object.freeze({URL:"url",QUICK_REPLY:"quickReply",PHONE:"phoneCall"}),se=Object.freeze({VIDEO:"video",DOCUMENT:"document",IMAGE:"image"});function ae(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const ce=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.CHAT_BUBBLE="chat-bubble"}var t,n;return t=e,n=[{key:"getIconButton",value:function(t){return t==ie.URL?'<img src="'.concat("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciICB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9Im5vbmUiICBzdHJva2U9IiM1Y2M1ZjgiIHN0cm9rZS13aWR0aD0iMiIgd2lkdGg9IjE2cHgiICBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItZXh0ZXJuYWwtbGluayI+PHBhdGggZD0iTTE4IDEzdjZhMiAyIDAgMCAxLTIgMkg1YTIgMiAwIDAgMS0yLTJWOGEyIDIgMCAwIDEgMi0yaDYiPjwvcGF0aD48cG9seWxpbmUgcG9pbnRzPSIxNSAzIDIxIDMgMjEgOSI+PC9wb2x5bGluZT48bGluZSB4MT0iMTAiIHkxPSIxNCIgeDI9IjIxIiB5Mj0iMyI+PC9saW5lPjwvc3ZnPg==",'" />'):t==ie.PHONE?'<img src="'.concat("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiAgc3Ryb2tlPSIjNWNjNWY4IiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIG1lZXQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3R5bGU9Ii1tcy10cmFuc2Zvcm06IHJvdGF0ZSgzNjBkZWcpOyAtd2Via2l0LXRyYW5zZm9ybTogcm90YXRlKDM2MGRlZyk7IHRyYW5zZm9ybTogcm90YXRlKDM2MGRlZyk7Ij48cGF0aCBkPSJNMjAuMDEgMTUuMzhjLTEuMjMgMC0yLjQyLS4yLTMuNTMtLjU2YS45NzcuOTc3IDAgMCAwLTEuMDEuMjRsLTEuNTcgMS45N2MtMi44My0xLjM1LTUuNDgtMy45LTYuODktNi44M2wxLjk1LTEuNjZjLjI3LS4yOC4zNS0uNjcuMjQtMS4wMmMtLjM3LTEuMTEtLjU2LTIuMy0uNTYtMy41M2MwLS41NC0uNDUtLjk5LS45OS0uOTlINC4xOUMzLjY1IDMgMyAzLjI0IDMgMy45OUMzIDEzLjI4IDEwLjczIDIxIDIwLjAxIDIxYy43MSAwIC45OS0uNjMuOTktMS4xOHYtMy40NWMwLS41NC0uNDUtLjk5LS45OS0uOTl6IiBmaWxsPSJub25lIi8+PC9zdmc+",'" />'):t==(new e).CHAT_BUBBLE?'<svg class="bubble-icon" viewBox="0 0 32 32">\n <path fill="currentColor" d="M11.9,26H8.6c-3.3,0-6.2-2.4-6.4-5.8C1.9,17,2,12,2.2,8.9c0.3-3.1,2.8-5.4,5.8-5.6c4.8-0.3,11-0.3,15.9,0 c3.1,0.2,5.6,2.6,5.8,5.7c0.2,3.1,0.2,8.2,0,11.2c-0.3,3.4-3.2,5.8-6.4,5.8h-2.5c-0.4,0-0.9,0.2-1.2,0.4l-6.1,4.4 C12.9,31.3,12,30.9,12,30v-4H11.9z">\n </path>\n </svg>\n <div class="dots-animation">\n <svg id=\'threePoints\' style="margin-top:10px;" viewBox="0 0 60 40" width="18px" fill="#000000">\n <circle r="6" cy="20" cx="9" class="dot-1 epoxe490"></circle>\n <circle r="6" cy="20" cx="30" class="dot-2 epoxe490"></circle>\n <circle r="6" cy="20" cx="51" class="dot-3 epoxe490"></circle>\n </svg>\n </div>':""}},{key:"getIconFile",value:function(e){return e.includes("pdf")?'<img src="'.concat("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE4LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCINCgkgdmlld0JveD0iMCAwIDU2IDU2IiB3aWR0aD0iMjZweCIgIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDU2IDU2OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8Zz4NCgk8cGF0aCBzdHlsZT0iZmlsbDojRTlFOUUwOyIgZD0iTTM2Ljk4NSwwSDcuOTYzQzcuMTU1LDAsNi41LDAuNjU1LDYuNSwxLjkyN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nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8L3N2Zz4NCg==",'" />'):'<img src="'.concat("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciICAgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgd2lkdGg9IjI2cHgiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBjbGFzcz0iZmVhdGhlciBmZWF0aGVyLWZpbGUtdGV4dCI+PHBhdGggZD0iTTE0IDJINmEyIDIgMCAwIDAtMiAydjE2YTIgMiAwIDAgMCAyIDJoMTJhMiAyIDAgMCAwIDItMlY4eiI+PC9wYXRoPjxwb2x5bGluZSBwb2ludHM9IjE0IDIgMTQgOCAyMCA4Ij48L3BvbHlsaW5lPjxsaW5lIHgxPSIxNiIgeTE9IjEzIiB4Mj0iOCIgeTI9IjEzIj48L2xpbmU+PGxpbmUgeDE9IjE2IiB5MT0iMTciIHgyPSI4IiB5Mj0iMTciPjwvbGluZT48cG9seWxpbmUgcG9pbnRzPSIxMCA5IDkgOSA4IDkiPjwvcG9seWxpbmU+PC9zdmc+",'" />')}},{key:"getWelcomeLabelIcon",value:function(e){}},{key:"getIconMessage",value:function(e){return"backArrow"==e?'<img id="backButtonId" style="width:25px;margin-left:5px" src="'.concat("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiP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LjAxNy0xLjAxNy0xLjk3MS0yLjE4Ni0yLjUzOC0yLjkxMmMtMC4zMjgtMC40Mi0wLjM2LTAuOTkyLTAuMDg3LTEuNDVsMS4yMTktMi4wNDYgYzAuMjQxLTAuNDA0LDAuMjQzLTAuOTA3LDAuMDA1LTEuMzEzTDkuMTA1LDMuNjQxYy0wLjI5MS0wLjQ5Ni0wLjg2OS0wLjc0LTEuNDI4LTAuNjAzQzcuMTM0LDMuMTcsNi40MjksMy40OTIsNS42OSw0LjIzMiBjLTIuMzE0LDIuMzE0LTMuNTQzLDYuMjE3LDUuMTU5LDE0LjkxOXMxMi42MDQsNy40NzQsMTQuOTE5LDUuMTU5YzAuNzQxLTAuNzQxLDEuMDYyLTEuNDQ3LDEuMTk1LTEuOTkxIGMwLjEzNS0wLjU1OC0wLjEwNS0xLjEzMi0wLjYtMS40MjJDMjUuMTI3LDIwLjE3NCwyMi40NjEsMTguNjEzLDIxLjIyNSwxNy44ODl6Ij48L3BhdGg+PC9zdmc+",'" />'):"suitcase"==e?'<img style="width:25px" src="'.concat("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMjggMTI4Ij48cGF0aCBkPSJNMTEgNTh2NTZjMCA3LjIgNS44IDEzIDEzIDEzaDE0VjQ1SDI0QzE2LjggNDUgMTEgNTAuOCAxMSA1OHpNMTE3IDExNFY1OGMwLTcuMi01LjgtMTMtMTMtMTNIOTB2ODJoMTRDMTExLjIgMTI3IDExNyAxMjEuMiAxMTcgMTE0ek03NiAyN0g1MmMtNC40IDAtOCAzLjYtOCA4djkyaDQwVjM1Qzg0IDMwLjYgODAuNCAyNyA3NiAyN3pNNzggNDVINTBWMzVjMC0xLjEuOS0yIDItMmgyNGMxLjEgMCAyIC45IDIgMlY0NXoiPjwvcGF0aD48L3N2Zz4=",'" />'):"user"==e?'<img style="width:35px" src="'.concat("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48cGF0aCBkPSJNMjU2LDExQzEyMC42OSwxMSwxMSwxMjAuNjksMTEsMjU2UzEyMC42OSw1MDEsMjU2LDUwMSw1MDEsMzkxLjMxLDUwMSwyNTYsMzkxLjMxLDExLDI1NiwxMVptMCw5OS43NzMzYTg4LjAyNTgsODguMDI1OCwwLDEsMS04OC4wMjU5LDg4LjAyNThBODguMDI1OSw4OC4wMjU5LDAsMCwxLDI1NiwxMTAuNzczM1pNMzgwLjEyNjksMzU0LjM5OGE0Ni44Mjg5LDQ2LjgyODksMCwwLDEtNDYuODI4Niw0Ni44Mjg2SDE3OC43MDE2YTQ2LjgyODUsNDYuODI4NSwwLDAsMS00Ni44MjgxLTQ2LjgyODZ2MGE0Ni44Mjg1LDQ2LjgyODUsMCwwLDEsNDYuODI4MS00Ni44Mjg2SDMzMy4yOTgzYTQ2LjgyODksNDYuODI4OSwwLDAsMSw0Ni44Mjg2LDQ2LjgyODZaIj48L3BhdGg+PC9zdmc+",'" />'):void 0}}],null&&ae(t.prototype,null),n&&ae(t,n),e}(),le=Object.freeze({QUICK_REPLY_EVENT:"quick_reply_event"});function ue(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const pe=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n;return t=e,n=[{key:"createMessage",value:function(e,t,n,o){this.isOwnMessage=n,this.usernameInfoColor=s.pickTextColorBasedOnBgColorAdvanced(t.backgroundChatColor,"#ffffff","#aaaaaa"),this.backgroundColor=t.primaryColor,this.defaultLetterColor="#000000",this.defaultBackgroundColor="#ffffff",this.letterColor=s.pickTextColorBasedOnBgColorAdvanced(this.backgroundColor,"#ffffff","#000000");var r=new oe(e),i="";if(n){var c=t.externalCode?t.externalCode:t.defaultUsername;return i=a.Z.parseMessage(r.content.body,!0),this.setTextMessage(r,i,c,o)}if(e.content&&"text"===e.contentType){var l=r.content.body;i=a.Z.parseMessage(l)}this.botName=t.botName;var u=null;switch(null!=r.content.caption&&(u=a.Z.parseMessage(r.content.caption)),e.contentType){case"text":return this.setTextMessage(r,i,null,null);case"image":return this.setImageMessage(r,u);case"video":return this.setVideoMessage(r,u);case"audio":return this.setAudioMessage(r,u);case"document":return this.setDocumentMessage(r,u,t.openFileText);case"template":return this.setTemplateMessage(r);case"location":return this.setLocationMessage(r);case"contacts":return this.setContactMessage(r)}}},{key:"setTemplateMessage",value:function(e){var t=e.content.components;if(t){for(var n,o,r,i="",s="",c=0;c<t.length;c++)switch(t[c].type){case re.HEADER:if(t[c].text)n=a.Z.parseMessage(t[c].text);else if(t[c].multimedia)switch(t[c].multimedia.type){case se.IMAGE:o=A().replace("${multimediaImageStyle}","").replace("${srcImg}",t[c].multimedia.url);break;case se.VIDEO:o=_().replace("${multimediaVideoStyle}","").replace("${videoType}",t[c].multimedia.mimetype).replace("${videoUrl}",t[c].multimedia.url);break;case se.DOCUMENT:var l="Download file";null!=t[c].multimedia.caption&&(l=t[c].multimedia.caption),o=O().replace("${multimediaDocumentStyle}","").replaceAll("${documentUrl}",t[c].multimedia.url).replace("${iconFile}",ce.getIconFile(t[c].multimedia.mimetype)).replace("${caption}",l)}else n="";break;case re.BODY:i=a.Z.parseMessage(t[c].text);break;case re.FOOTER:s=a.Z.parseMessage(t[c].text);break;case re.BUTTON:var u="";t[c].subType==ie.URL&&(u=ce.getIconButton(ie.URL)),t[c].subType==ie.PHONE&&(u=ce.getIconButton(ie.PHONE));var p=t[c].payload,d=t[c].url,h=k().replaceAll("${label}",t[c].phone?"".concat(t[c].label,': <a href="tel:').concat(t[c].phone,'">').concat(t[c].phone,"</a>"):t[c].label).replace("${url}",d?"onclick=\"window.open('".concat(d,"')\""):"").replace("${buttonId}",p?'id="'.concat(p,'"'):"").replace("${icon}",u);r=r?r+h:h}return x().replace("${messageContainerClass}",this.isOwnMessage?"message-box-container-own":"message-box-container").replace("${messageBoxClass}",this.isOwnMessage?"message-box-own":"message-box").replace("${messageBackgroundColor}",this.isOwnMessage?this.backgroundColor:this.defaultBackgroundColor).replace("${styleMessage}","").replace("${messageId}",e.messageId).replace("${usernameInfoColor}",this.usernameInfoColor).replace("${dataUsername}",this.botName).replace("${timeMessage}",a.Z.getTime(e.timespan)).replace("${componentsHeader}",n||o).replace("${componentsBody}",i).replace("${componentsFooter}",s).replace("${componentsButton}",r||"")}}},{key:"setTextMessage",value:function(e,t,n,o){return this.isOwnMessage?h().replace("${messageContainerClass}",this.isOwnMessage?"message-box-container-own":"message-box-container").replace("${messageBoxClass}",this.isOwnMessage?"message-box-own":"message-box").replace("${dataMessage}",t).replace("${dataUsername}",n).replace("${messageBackgroundColor}",this.isOwnMessage?this.backgroundColor:this.defaultBackgroundColor).replace("${messageColor}",this.isOwnMessage?this.letterColor:this.defaultLetterColor).replace("${timeMessage}",a.Z.getTime(e.timestamp)).replace("${messageId}",e.messageId).replace("${usernameInfoColor}",this.usernameInfoColor).replace("${styleMessage}",o?"display:flex;":"display:none;"):h().replace("${messageContainerClass}",this.isOwnMessage?"message-box-container-own":"message-box-container").replace("${messageBoxClass}",this.isOwnMessage?"message-box-own":"message-box").replace("${dataMessage}",t).replace("${dataUsername}",this.botName).replace("${messageBackgroundColor}",this.isOwnMessage?this.backgroundColor:this.defaultBackgroundColor).replace("${messageColor}",this.isOwnMessage?this.letterColor:this.defaultLetterColor).replace("${timeMessage}",a.Z.getTime(e.timespan)).replace("${usernameInfoColor}",this.usernameInfoColor).replace("${messageId}",e.messageId).replace("${styleMessage}","")}},{key:"setImageMessage",value:function(e,t){return g().replace("${messageContainerClass}",this.isOwnMessage?"message-box-container-own":"message-box-container").replace("${caption}",t).replace("${dataUsername}",this.botName).replace("${timeMessage}",a.Z.getTime(e.timespan)).replace("${messageBoxClass}",this.isOwnMessage?"message-box-own":"message-box").replace("${messageId}",e.messageId).replace("${styleMessage}","").replace("${usernameInfoColor}",this.usernameInfoColor).replace("${srcImg}",e.content.url).replace("${messageBackgroundColor}",this.isOwnMessage?this.backgroundColor:this.defaultBackgroundColor).replace("${messageColor}",this.isOwnMessage?this.letterColor:this.defaultLetterColor)}},{key:"setVideoMessage",value:function(e,t){return b().replace("${messageContainerClass}",this.isOwnMessage?"message-box-container-own":"message-box-container").replace("${caption}",t).replace("${dataUsername}",this.botName).replace("${timeMessage}",a.Z.getTime(e.timespan)).replace("${messageBoxClass}",this.isOwnMessage?"message-box-own":"message-box").replace("${messageId}",e.messageId).replace("${styleMessage}","").replace("${usernameInfoColor}",this.usernameInfoColor).replace("${videoUrl}",e.content.url).replace("${messageColor}",this.isOwnMessage?this.letterColor:this.defaultLetterColor).replace("${messageBackgroundColor}",this.isOwnMessage?this.backgroundColor:this.defaultBackgroundColor).replace("${videoType}",e.content.mimetype)}},{key:"setLocationMessage",value:function(e){return I().replace("${messageContainerClass}",this.isOwnMessage?"message-box-container-own":"message-box-container").replace("${dataUsername}",this.botName).replace("${timeMessage}",a.Z.getTime(e.timespan)).replace("${messageBoxClass}",this.isOwnMessage?"message-box-own":"message-box").replaceAll("${messageId}",e.messageId).replace("${styleMessage}","").replace("${locationIcon}",ce.getIconMessage("map")).replace("${usernameInfoColor}",this.usernameInfoColor).replace("${messageBackgroundColor}",this.isOwnMessage?this.backgroundColor:this.defaultBackgroundColor).replace("${locationHeader}",e.content.location.name).replace("${locationAddress}",e.content.location.address)}},{key:"setContactMessage",value:function(e){return D().replace("${messageContainerClass}",this.isOwnMessage?"message-box-container-own":"message-box-container").replace("${dataUsername}",this.botName).replace("${timeMessage}",a.Z.getTime(e.timespan)).replace("${messageBoxClass}",this.isOwnMessage?"message-box-own":"message-box").replaceAll("${messageId}",e.messageId).replace("${styleMessage}","").replace("${usernameInfoColor}",this.usernameInfoColor).replace("${userIcon}",ce.getIconMessage("user")).replace("${messageBackgroundColor}",this.isOwnMessage?this.backgroundColor:this.defaultBackgroundColor).replace("${name}",e.content.contact.contactName.formattedName)}},{key:"setAudioMessage",value:function(e,t){return m().replace("${messageContainerClass}",this.isOwnMessage?"message-box-container-own":"message-box-container").replace("${caption}",t).replace("${dataUsername}",this.botName).replace("${dataMessage}",e.content.caption).replace("${timeMessage}",a.Z.getTime(e.timespan)).replace("${messageBoxClass}",this.isOwnMessage?"message-box-own":"message-box").replace("${messageId}",e.messageId).replace("${usernameInfoColor}",this.usernameInfoColor).replace("${styleMessage}","").replace("${audioUrl}",e.content.url).replace("${audioType}",e.content.mimetype)}},{key:"setDocumentMessage",value:function(e,t,n){return w().replace("${messageContainerClass}",this.isOwnMessage?"message-box-container-own":"message-box-container").replace("${caption}",t).replace("${dataUsername}",this.botName).replace("${dataMessage}",e.content.caption).replace("${timeMessage}",a.Z.getTime(e.timespan)).replace("${messageBoxClass}",this.isOwnMessage?"message-box-own":"message-box-document").replace("${messageId}",e.messageId).replace("${styleMessage}","").replace("${openFileText}",n).replace("${messageBackgroundColor}",this.isOwnMessage?this.backgroundColor:this.defaultBackgroundColor).replaceAll("${documentUrl}",e.content.url).replace("${usernameInfoColor}",this.usernameInfoColor).replace("${colorDownloadButton}",this.backgroundColor).replace("${fileType}",e.content.mimetype).replace("${iconFile}",ce.getIconFile(e.content.mimetype))}},{key:"setWelcomeLabel",value:function(e){return B().replace("${welcomeLabelIconClose}",e.closeIcon).replace("${welcomeLabelIconCloseBackgroundColor}",e.closeIconBackGroundColor?e.closeIconBackGroundColor:"transparent").replace("${welcomeLabelTitle}",e.title?e.title:"").replace("${welcomeLabelBody}",e.body?e.body:"").replace("${welcomeLabelBackgroundColor}",e.backgrounColor?e.backgrounColor:"#ffffff").replaceAll("${welcomeLabelTextColor}",e.textColor?e.textColor:"#000000")}}],null&&ue(t.prototype,null),n&&ue(t,n),e}();function de(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const he=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n;return t=e,n=[{key:"isFunction",value:function(e){return!(!e||"function"!=typeof e)}}],null&&de(t.prototype,null),n&&de(t,n),e}();function fe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const ge=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.eventName=t}var t,n;return t=e,(n=[{key:"toJSON",value:function(){return{eventName:this.eventName}}}])&&fe(t.prototype,n),e}();function ye(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const me=function(){function e(t,n,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t&&(this.conversationSessionId=t),n&&(this.contentReplyPayload=new ge(n).toJSON()),o&&(this.contentType=o)}var t,n;return t=e,(n=[{key:"toJSON",value:function(){return{conversationSessionId:this.conversationSessionId,content:this.contentReplyPayload,contentType:this.contentType}}}])&&ye(t.prototype,n),e}();function Me(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var be=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.storage=this.isLocalStorageAvailable()?window.localStorage:null}var t,n;return t=e,(n=[{key:"isLocalStorageAvailable",value:function(){try{var e=window.localStorage,t="__storage_test__";if(e)return e.setItem(t,t),e.removeItem(t),!0}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==be.length}return!1}},{key:"setItem",value:function(e,t){return null!=this.storage&&(this.storage.setItem(e,t),!0)}},{key:"getItem",value:function(e){return null!=this.storage?this.storage.getItem(e):null}},{key:"deleteItem",value:function(e){return!!this.storage&&(this.storage.setItem(e,value),!0)}},{key:"clear",value:function(){this.storage&&this.storage.clear()}}])&&Me(t.prototype,n),e}());const ve=be;function we(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const Ce=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.REPOSITORY="indigitall-chat.repository",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL"}var t,n;return t=e,(n=[{key:"clearStorage",value:function(){ve.clear()}},{key:"setLogLevel",value:function(e){ve.setItem(this.LOG_LEVEL,e)}},{key:"getLogLevel",value:function(){return ve.getItem(this.LOG_LEVEL)}}])&&we(t.prototype,n),e}()),xe=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});function Le(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const Ie=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.tag="[IND]",t&&(this.tag=t),this.level=xe.DEBUG,this.setLogLevel(Ce.getLogLevel()),this.log=[]}var t,n,o;return t=e,o=[{key:"addedAsString",value:function(e){return"string"==typeof e?e:JSON.stringify(e,null,2)}}],(n=[{key:"setLogLevel",value:function(e){e&&e>=xe.DEBUG&&e<=xe.ERROR&&(this.level=e)}},{key:"d",value:function(){if(this.level<=xe.DEBUG)for(var t=0;t<arguments.length;t++)this.log+=e.addedAsString(arguments[t]);return this}},{key:"i",value:function(){if(this.level<=xe.INFO)for(var t=0;t<arguments.length;t++)this.log+=e.addedAsString(arguments[t]);return this}},{key:"w",value:function(){if(this.level<=xe.WARNING)for(var t=0;t<arguments.length;t++)this.log+=e.addedAsString(arguments[t]);return this}},{key:"e",value:function(){if(this.level<=xe.ERROR)for(var t=0;t<arguments.length;t++)this.log+=e.addedAsString(arguments[t]);return this}},{key:"e",value:function(e){return this.level<=xe.ERROR&&(this.log+="".concat(e.errorCode,": ").concat(e.errorMessage)),this}},{key:"writeLog",value:function(){this.log.length>0&&console.log(this.tag,this.log),this.log=[]}}])&&Le(t.prototype,n),o&&Le(t,o),e}();var Ne=__webpack_require__(4114),ke=__webpack_require__.n(Ne),je=__webpack_require__(3046),De=__webpack_require__.n(je);function Te(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var Ae="[IND]Socket: ";const Ee=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.output=n,this.config=t,this.socket=l()(t.urlServer,{path:"/socket",transports:["websocket","polling"]})}var t,n;return t=e,(n=[{key:"connectSocket",value:function(e,t){var n=this,o=new Ie(Ae),r=this.socket;r.on("connect",(function(){var i=p.getItemStorage("socketId");i||(i=n.config.externalCode?n.config.externalCode:a.Z.generateId(),p.setItemStorage("socketId",i)),r.emit("authentication",{channelKey:n.config.channelKey,externalCode:a.Z.encryptText(i,n.config.channelKey)}).on("authenticated",(function(){if(p.getItemStorage("welcomeEmitted")||null==r){if(null==r&&he.isFunction(t))return o.e("error starting the conversation: Socket null").writeLog(),void t("error starting the conversation: Socket null")}else r.emit("start_conversation"),p.setItemStorage("welcomeEmitted",!0);he.isFunction(e)&&e()})).on("unauthorized",(function(e){o.e("connection error! "+e).writeLog(),he.isFunction(t)&&t("connection error! "+e)}))})),r.on("message_status",(function(e){var t=document.querySelectorAll('[data-id="'.concat(e.id,'"]'));t&&1===t.length&&(t[0].style.display="flex"),n.output.scrollTop=n.output.scrollHeight})),r.on("message_received",(function(e){if(o.d("Message_received: "+JSON.stringify(e)).writeLog(),n.output.innerHTML.indexOf(-1==="messageId:".concat(e.messageId))){var t=pe.createMessage(e,n.config,!1);p.addMessageToStorage(e,!1),n.output.innerHTML+=t,n.output.scrollTop=n.output.scrollHeight,n.buttonsComponents();var r=new oe(e);"location"==r.contentType&&n.locationAction(r),"contacts"==r.contentType&&n.contactAction(r,n.config)}}))}},{key:"contactAction",value:function(e,t){var n=e.content.contact;null!=n&&document.getElementById(e.messageId).addEventListener("click",(function(e){var o=document.getElementById("output"),r=document.getElementById("showInfoContactId");o.style.visibility="hidden",r.style.display="block",r.style.backgroundColor="#ffffff";var i="".concat(n.contactName.firstName," ").concat(n.contactName.lastName);n.contactName.formattedName&&(i=n.contactName.formattedName),r.innerHTML=ke().replace("${nameContact}",i).replace("${infoContacttopBarText}",t.infoContactTopBarTitle).replace("${backButtonIcon}",ce.getIconMessage("backArrow")).replace("${userIcon}",ce.getIconMessage("user")).replace("${birthdayContact}",n.birthday);var s=document.getElementById("containerContact");if(n.contactPhoneList&&n.contactPhoneList.length>0)for(var a=0;a<n.contactPhoneList.length;a++){var c=De().replace("${icon}",ce.getIconMessage("phone")).replace("${headertext}",n.contactPhoneList[a].phone).replace("${subtext}",n.contactPhoneList[a].type);s.innerHTML+=c}if(document.getElementById("backButtonId").addEventListener("click",(function(e){r.style.display="none",o.style.visibility="visible"})),n.contactOrg&&(c=De().replace("${icon}",ce.getIconMessage("suitcase")).replace("${headertext}",n.contactOrg.title).replace("${subtext}","".concat(n.contactOrg.company," - ").concat(n.contactOrg.department)),s.innerHTML+=c),n.contactEmailList&&n.contactEmailList.length>0)for(a=0;a<n.contactEmailList.length;a++)c=De().replace("${icon}",ce.getIconMessage("email")).replace("${headertext}",n.contactEmailList[a].email).replace("${subtext}",n.contactEmailList[a].type),s.innerHTML+=c;if(n.contactAddressList&&n.contactAddressList.length>0)for(a=0;a<n.contactAddressList.length;a++){var l=n.contactAddressList[a],u="".concat(l.street," <br/> ").concat(l.state," ").concat(l.city," ").concat(l.zip," ").concat(l.coutry);c=De().replace("${icon}",ce.getIconMessage("markerMap")).replace("${headertext}",u).replace("${subtext}",l.type),s.innerHTML+=c}if(n.contactURLList&&n.contactURLList.length>0)for(a=0;a<n.contactURLList.length;a++)c=De().replace("${icon}",ce.getIconMessage("link")).replace("${headertext}",n.contactURLList[a].url).replace("${subtext}",n.contactURLList[a].type),s.innerHTML+=c}))}},{key:"locationAction",value:function(e){document.getElementById(e.messageId).addEventListener("click",(function(t){window.open("https://www.google.es/maps/search/".concat(e.content.location.latitude,",").concat(e.content.location.longitude))}))}},{key:"buttonsComponents",value:function(){var e=this,t=document.getElementsByClassName("button-component-div");if(t&&t.length>0)for(var n=0;n<t.length;n++){var o=t[n].id;o&&""!=o&&t[n].addEventListener("click",(function(t){e.messageSend(new me(p.getItemStorage("socketId"),t.currentTarget.id,le.QUICK_REPLY_EVENT).toJSON())}))}}},{key:"messageSend",value:function(e){var t=new Ie(Ae);this.socket.emit("send_message",e),t.d("Message_send: "+JSON.stringify(e)).writeLog()}}])&&Te(t.prototype,n),e}(),_e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t&&(t.title&&(this.title=t.title),t.body&&(this.body=t.body),t.icon&&(this.icon=t.icon),t.backgrounColor&&(this.backgrounColor=t.backgrounColor),t.textColor&&(this.textColor=t.textColor),t.delay&&(this.delay=t.delay),t.closeIcon?this.closeIcon=t.closeIcon:this.closeIcon="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEyLDIwQzcuNTksMjAgNCwxNi40MSA0LDEyQzQsNy41OSA3LjU5LDQgMTIsNEMxNi40MSw0IDIwLDcuNTkgMjAsMTJDMjAsMTYuNDEgMTYuNDEsMjAgMTIsMjBNMTIsMkM2LjQ3LDIgMiw2LjQ3IDIsMTJDMiwxNy41MyA2LjQ3LDIyIDEyLDIyQzE3LjUzLDIyIDIyLDE3LjUzIDIyLDEyQzIyLDYuNDcgMTcuNTMsMiAxMiwyTTE0LjU5LDhMMTIsMTAuNTlMOS40MSw4TDgsOS40MUwxMC41OSwxMkw4LDE0LjU5TDkuNDEsMTZMMTIsMTMuNDFMMTQuNTksMTZMMTYsMTQuNTlMMTMuNDEsMTJMMTYsOS40MUwxNC41OSw4WiIgLz48L3N2Zz4=",t.closeIconBackGroundColor&&(this.closeIconBackGroundColor=t.closeIconBackGroundColor))};function ze(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var Oe=!1,Se=!1,Be=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.version=r.version}var n,o;return n=e,o=[{key:"init",value:function(e,n,o){var i=this,c=xe.DEBUG;""!=e.logLevel&&(c=e.logLevel),Ce.setLogLevel(c);var l,u=r.defaultValues,p=a.Z.mergeObjects(u,e),d=p.zIndex,h=p.defaultChatIconResource;l=h!=(new ce).CHAT_BUBBLE?t().replace("${chat-bubble-icon}",'<img src="'.concat(h,'" class="bubble-icon" style="width:100%">')):t().replace("${chat-bubble-icon}",ce.getIconButton(h));var f=document.createElement("div");f.innerHTML=l.replace("${titleChat}",p.titleChat).replace("${messagePlaceholder}",p.messagePlaceholder);var g=document.createElement("meta");g.setAttribute("name","viewport"),g.content="width=device-width, height=device-height initial-scale=1.0 maximum-scale=1.0",f.id="chat-container",f.style.zIndex=d,document.body.appendChild(g),document.body.appendChild(f);var y=.01*window.innerHeight;document.documentElement.style.setProperty("--vhchat","".concat(y,"px")),window.addEventListener("resize",(function(){var e=.01*window.innerHeight;document.documentElement.style.setProperty("--vhchat","".concat(e,"px"))}));var m=document.getElementById("chat-bubble"),M=document.getElementById("chat-window"),b=document.getElementById("welcomeLabel");if(e.welcomeLabel){var v=new _e(e.welcomeLabel);if(v){var w=0;v.delay&&(w=v.delay),setTimeout((function(){b.innerHTML=pe.setWelcomeLabel(v);var e=document.getElementById("welcomeLabelIcon");v.icon?e.src=v.icon:e.style.display="none",document.getElementById("welcome-close").addEventListener("click",(function(){b.classList.add("not-visible")}))}),w)}}M.style.backgroundColor=e.backgroundChatColor;var C=document.getElementById("output");e.fullscreen?(f.style.padding=null,m.style.margin="16px",m.style.maxHeight="60px",C.style.maxHeight=null):(f.style.padding="16px",C.style.maxHeight="500px"),h==(new ce).CHAT_BUBBLE&&(document.getElementById("threePoints").style.fill=e.primaryColor),e.backgroundChatColor&&(p.backgroundChatColor=e.backgroundChatColor);var x=p.primaryColor,L=s.pickTextColorBasedOnBgColorAdvanced(x,"#ffffff","#000000");m.style.backgroundColor=p.primaryColor,m.style.color=L,m.addEventListener("click",(function(){if(M.classList.remove("not-visible"),e.fullscreen?(f.style.height="100%",M.classList.add("visible-chat-window-fullscreen")):M.classList.add("visible-chat-window"),m.classList.add("bubble-not-visible"),m.classList.remove("visible-chat-bubble"),message.focus(),b.classList.add("not-visible"),Oe){var t=document.getElementById("output");t.scrollTop=t.scrollHeight}else i.initialize(p,n,o),Oe=!0}))}},{key:"initialize",value:function(e,t,n){new Ie("[IND]Indigitall-WebChat: ").d("WebChat initialized").writeLog();var o=document.getElementById("chat-header"),r=document.getElementById("chat-input-box"),i=document.getElementById("chat-bubble"),s=document.getElementById("minimize-btn"),c=document.getElementById("chat-window"),l=document.getElementById("chat-container"),u=document.getElementById("message"),d=document.getElementById("send"),h=document.getElementById("minimize-btn-path");output.style.backgroundColor=e.backgroundChatColor,e.fullscreen?(o.style.borderRadius="0px",r.style.borderRadius="0px"):(o.style.borderRadius="10px 10px 0 0",r.style.borderRadius="0 0 10px 10px");var f=new Ee(e,output),g=document.getElementById("send-icon");if(g.style.fill=u.value&&""!==u.value?e.primaryColor:"#aaaaaa",o.style.backgroundColor=e.backgroundBarColor,r.style.backgroundColor=e.backgroundBarColor,u.style.backgroundColor=e.backgroundBarColor,h.style.fill=e.primaryColor,!Se){var y=p.getMessagesStorage();y&&y.length>0&&(y.forEach((function(t){var n=pe.createMessage(t.data,e,t.isOwnMessage,!0);output.innerHTML+=n,f.buttonsComponents()})),output.scrollTop=output.scrollHeight),Se=!0}d.addEventListener("click",(function(){if(u.value&&""!==u.value){var t={messageId:a.Z.generateId(),timestamp:Math.floor(Date.now()),content:{body:u.value},contentType:"text"};f.messageSend(t);var n=pe.createMessage(t,e,!0,!0);p.addMessageToStorage(t,!0),output.innerHTML+=n,output.scrollTop=output.scrollHeight,u.value="",g.style.fill=u.value&&""!==u.value?e.primaryColor:"#aaaaaa"}})),s.addEventListener("click",(function(){c.classList.add("not-visible"),e.fullscreen?(c.classList.remove("visible-chat-window-fullscreen"),l.style.height=null):c.classList.remove("visible-chat-window"),i.classList.add("visible-chat-bubble"),i.classList.remove("bubble-not-visible")})),u.addEventListener("keypress",(function(e){"Enter"!==e.code&&13!==e.code||d.click()})),u.addEventListener("keyup",(function(){g.style.fill=u.value&&""!==u.value?e.primaryColor:"#aaaaaa"})),f.connectSocket(t,n)}},{key:"getVersion",value:function(){return r.version}}],null&&ze(n.prototype,null),o&&ze(n,o),e}();window.WebChat=Be,window.WebChat.LogLevel=xe})()})();
|