<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">import{b as kn}from"./chunk-7HOS6NEY.js";import{a as Pt}from"./chunk-SZVU2VLG.js";import{a as Cn,n as Tn,r as xn}from"./chunk-2X323WS2.js";import{a as wn}from"./chunk-4OUPVYIO.js";import{c as Sn}from"./chunk-2CFKU7MG.js";import{m as bn}from"./chunk-T6NUORA7.js";import{h as Xt}from"./chunk-FFBRLYPN.js";import{Fd as Wt,M as B,Na as st,Xa as F,f as zt,h as Vt,s as vt,ua as ve,va as _n,x as I}from"./chunk-X3GFYMIQ.js";import{g as ds,h as ys,j as gs}from"./chunk-SBK2PKUT.js";var cr=ds((oe,Ue)=&gt;{(function(i,r){typeof oe=="object"&amp;&amp;typeof Ue=="object"?Ue.exports=r():typeof define=="function"&amp;&amp;define.amd?define([],r):typeof oe=="object"?oe.Pusher=r():i.Pusher=r()})(window,function(){return function(u){var i={};function r(o){if(i[o])return i[o].exports;var a=i[o]={i:o,l:!1,exports:{}};return u[o].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=u,r.c=i,r.d=function(o,a,f){r.o(o,a)||Object.defineProperty(o,a,{enumerable:!0,get:f})},r.r=function(o){typeof Symbol&lt;"u"&amp;&amp;Symbol.toStringTag&amp;&amp;Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},r.t=function(o,a){if(a&amp;1&amp;&amp;(o=r(o)),a&amp;8||a&amp;4&amp;&amp;typeof o=="object"&amp;&amp;o&amp;&amp;o.__esModule)return o;var f=Object.create(null);if(r.r(f),Object.defineProperty(f,"default",{enumerable:!0,value:o}),a&amp;2&amp;&amp;typeof o!="string")for(var l in o)r.d(f,l,function(m){return o[m]}.bind(null,l));return f},r.n=function(o){var a=o&amp;&amp;o.__esModule?function(){return o.default}:function(){return o};return r.d(a,"a",a),a},r.o=function(o,a){return Object.prototype.hasOwnProperty.call(o,a)},r.p="",r(r.s=2)}([function(u,i,r){"use strict";var o=this&amp;&amp;this.__extends||function(){var k=function(y,g){return k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(x,R){x.__proto__=R}||function(x,R){for(var q in R)R.hasOwnProperty(q)&amp;&amp;(x[q]=R[q])},k(y,g)};return function(y,g){k(y,g);function x(){this.constructor=y}y.prototype=g===null?Object.create(g):(x.prototype=g.prototype,new x)}}();Object.defineProperty(i,"__esModule",{value:!0});var a=256,f=function(){function k(y){y===void 0&amp;&amp;(y="="),this._paddingCharacter=y}return k.prototype.encodedLength=function(y){return this._paddingCharacter?(y+2)/3*4|0:(y*8+5)/6|0},k.prototype.encode=function(y){for(var g="",x=0;x&lt;y.length-2;x+=3){var R=y[x]&lt;&lt;16|y[x+1]&lt;&lt;8|y[x+2];g+=this._encodeByte(R&gt;&gt;&gt;3*6&amp;63),g+=this._encodeByte(R&gt;&gt;&gt;2*6&amp;63),g+=this._encodeByte(R&gt;&gt;&gt;1*6&amp;63),g+=this._encodeByte(R&gt;&gt;&gt;0*6&amp;63)}var q=y.length-x;if(q&gt;0){var R=y[x]&lt;&lt;16|(q===2?y[x+1]&lt;&lt;8:0);g+=this._encodeByte(R&gt;&gt;&gt;3*6&amp;63),g+=this._encodeByte(R&gt;&gt;&gt;2*6&amp;63),q===2?g+=this._encodeByte(R&gt;&gt;&gt;1*6&amp;63):g+=this._paddingCharacter||"",g+=this._paddingCharacter||""}return g},k.prototype.maxDecodedLength=function(y){return this._paddingCharacter?y/4*3|0:(y*6+7)/8|0},k.prototype.decodedLength=function(y){return this.maxDecodedLength(y.length-this._getPaddingLength(y))},k.prototype.decode=function(y){if(y.length===0)return new Uint8Array(0);for(var g=this._getPaddingLength(y),x=y.length-g,R=new Uint8Array(this.maxDecodedLength(x)),q=0,H=0,J=0,Z=0,G=0,$=0,Y=0;H&lt;x-4;H+=4)Z=this._decodeChar(y.charCodeAt(H+0)),G=this._decodeChar(y.charCodeAt(H+1)),$=this._decodeChar(y.charCodeAt(H+2)),Y=this._decodeChar(y.charCodeAt(H+3)),R[q++]=Z&lt;&lt;2|G&gt;&gt;&gt;4,R[q++]=G&lt;&lt;4|$&gt;&gt;&gt;2,R[q++]=$&lt;&lt;6|Y,J|=Z&amp;a,J|=G&amp;a,J|=$&amp;a,J|=Y&amp;a;if(H&lt;x-1&amp;&amp;(Z=this._decodeChar(y.charCodeAt(H)),G=this._decodeChar(y.charCodeAt(H+1)),R[q++]=Z&lt;&lt;2|G&gt;&gt;&gt;4,J|=Z&amp;a,J|=G&amp;a),H&lt;x-2&amp;&amp;($=this._decodeChar(y.charCodeAt(H+2)),R[q++]=G&lt;&lt;4|$&gt;&gt;&gt;2,J|=$&amp;a),H&lt;x-3&amp;&amp;(Y=this._decodeChar(y.charCodeAt(H+3)),R[q++]=$&lt;&lt;6|Y,J|=Y&amp;a),J!==0)throw new Error("Base64Coder: incorrect characters for decoding");return R},k.prototype._encodeByte=function(y){var g=y;return g+=65,g+=25-y&gt;&gt;&gt;8&amp;6,g+=51-y&gt;&gt;&gt;8&amp;-75,g+=61-y&gt;&gt;&gt;8&amp;-15,g+=62-y&gt;&gt;&gt;8&amp;3,String.fromCharCode(g)},k.prototype._decodeChar=function(y){var g=a;return g+=(42-y&amp;y-44)&gt;&gt;&gt;8&amp;-a+y-43+62,g+=(46-y&amp;y-48)&gt;&gt;&gt;8&amp;-a+y-47+63,g+=(47-y&amp;y-58)&gt;&gt;&gt;8&amp;-a+y-48+52,g+=(64-y&amp;y-91)&gt;&gt;&gt;8&amp;-a+y-65+0,g+=(96-y&amp;y-123)&gt;&gt;&gt;8&amp;-a+y-97+26,g},k.prototype._getPaddingLength=function(y){var g=0;if(this._paddingCharacter){for(var x=y.length-1;x&gt;=0&amp;&amp;y[x]===this._paddingCharacter;x--)g++;if(y.length&lt;4||g&gt;2)throw new Error("Base64Coder: incorrect padding")}return g},k}();i.Coder=f;var l=new f;function m(k){return l.encode(k)}i.encode=m;function _(k){return l.decode(k)}i.decode=_;var T=function(k){o(y,k);function y(){return k!==null&amp;&amp;k.apply(this,arguments)||this}return y.prototype._encodeByte=function(g){var x=g;return x+=65,x+=25-g&gt;&gt;&gt;8&amp;6,x+=51-g&gt;&gt;&gt;8&amp;-75,x+=61-g&gt;&gt;&gt;8&amp;-13,x+=62-g&gt;&gt;&gt;8&amp;49,String.fromCharCode(x)},y.prototype._decodeChar=function(g){var x=a;return x+=(44-g&amp;g-46)&gt;&gt;&gt;8&amp;-a+g-45+62,x+=(94-g&amp;g-96)&gt;&gt;&gt;8&amp;-a+g-95+63,x+=(47-g&amp;g-58)&gt;&gt;&gt;8&amp;-a+g-48+52,x+=(64-g&amp;g-91)&gt;&gt;&gt;8&amp;-a+g-65+0,x+=(96-g&amp;g-123)&gt;&gt;&gt;8&amp;-a+g-97+26,x},y}(f);i.URLSafeCoder=T;var w=new T;function S(k){return w.encode(k)}i.encodeURLSafe=S;function O(k){return w.decode(k)}i.decodeURLSafe=O,i.encodedLength=function(k){return l.encodedLength(k)},i.maxDecodedLength=function(k){return l.maxDecodedLength(k)},i.decodedLength=function(k){return l.decodedLength(k)}},function(u,i,r){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var o="utf8: invalid string",a="utf8: invalid source encoding";function f(_){for(var T=new Uint8Array(l(_)),w=0,S=0;S&lt;_.length;S++){var O=_.charCodeAt(S);O&lt;128?T[w++]=O:O&lt;2048?(T[w++]=192|O&gt;&gt;6,T[w++]=128|O&amp;63):O&lt;55296?(T[w++]=224|O&gt;&gt;12,T[w++]=128|O&gt;&gt;6&amp;63,T[w++]=128|O&amp;63):(S++,O=(O&amp;1023)&lt;&lt;10,O|=_.charCodeAt(S)&amp;1023,O+=65536,T[w++]=240|O&gt;&gt;18,T[w++]=128|O&gt;&gt;12&amp;63,T[w++]=128|O&gt;&gt;6&amp;63,T[w++]=128|O&amp;63)}return T}i.encode=f;function l(_){for(var T=0,w=0;w&lt;_.length;w++){var S=_.charCodeAt(w);if(S&lt;128)T+=1;else if(S&lt;2048)T+=2;else if(S&lt;55296)T+=3;else if(S&lt;=57343){if(w&gt;=_.length-1)throw new Error(o);w++,T+=4}else throw new Error(o)}return T}i.encodedLength=l;function m(_){for(var T=[],w=0;w&lt;_.length;w++){var S=_[w];if(S&amp;128){var O=void 0;if(S&lt;224){if(w&gt;=_.length)throw new Error(a);var k=_[++w];if((k&amp;192)!==128)throw new Error(a);S=(S&amp;31)&lt;&lt;6|k&amp;63,O=128}else if(S&lt;240){if(w&gt;=_.length-1)throw new Error(a);var k=_[++w],y=_[++w];if((k&amp;192)!==128||(y&amp;192)!==128)throw new Error(a);S=(S&amp;15)&lt;&lt;12|(k&amp;63)&lt;&lt;6|y&amp;63,O=2048}else if(S&lt;248){if(w&gt;=_.length-2)throw new Error(a);var k=_[++w],y=_[++w],g=_[++w];if((k&amp;192)!==128||(y&amp;192)!==128||(g&amp;192)!==128)throw new Error(a);S=(S&amp;15)&lt;&lt;18|(k&amp;63)&lt;&lt;12|(y&amp;63)&lt;&lt;6|g&amp;63,O=65536}else throw new Error(a);if(S&lt;O||S&gt;=55296&amp;&amp;S&lt;=57343)throw new Error(a);if(S&gt;=65536){if(S&gt;1114111)throw new Error(a);S-=65536,T.push(String.fromCharCode(55296|S&gt;&gt;10)),S=56320|S&amp;1023}}T.push(String.fromCharCode(S))}return T.join("")}i.decode=m},function(u,i,r){u.exports=r(3).default},function(u,i,r){"use strict";r.r(i);var o=function(){function e(t,n){this.lastId=0,this.prefix=t,this.name=n}return e.prototype.create=function(t){this.lastId++;var n=this.lastId,s=this.prefix+n,c=this.name+"["+n+"]",h=!1,p=function(){h||(t.apply(null,arguments),h=!0)};return this[n]=p,{number:n,id:s,name:c,callback:p}},e.prototype.remove=function(t){delete this[t.number]},e}(),a=new o("_pusher_script_","Pusher.ScriptReceivers"),f={VERSION:"7.6.0",PROTOCOL:7,wsPort:80,wssPort:443,wsPath:"",httpHost:"sockjs.pusher.com",httpPort:80,httpsPort:443,httpPath:"/pusher",stats_host:"stats.pusher.com",authEndpoint:"/pusher/auth",authTransport:"ajax",activityTimeout:12e4,pongTimeout:3e4,unavailableTimeout:1e4,cluster:"mt1",userAuthentication:{endpoint:"/pusher/user-auth",transport:"ajax"},channelAuthorization:{endpoint:"/pusher/auth",transport:"ajax"},cdn_http:"http://js.pusher.com",cdn_https:"https://js.pusher.com",dependency_suffix:""},l=f,m=function(){function e(t){this.options=t,this.receivers=t.receivers||a,this.loading={}}return e.prototype.load=function(t,n,s){var c=this;if(c.loading[t]&amp;&amp;c.loading[t].length&gt;0)c.loading[t].push(s);else{c.loading[t]=[s];var h=C.createScriptRequest(c.getPath(t,n)),p=c.receivers.create(function(d){if(c.receivers.remove(p),c.loading[t]){var b=c.loading[t];delete c.loading[t];for(var v=function(L){L||h.cleanup()},E=0;E&lt;b.length;E++)b[E](d,v)}});h.send(p)}},e.prototype.getRoot=function(t){var n,s=C.getDocument().location.protocol;return t&amp;&amp;t.useTLS||s==="https:"?n=this.options.cdn_https:n=this.options.cdn_http,n.replace(/\/*$/,"")+"/"+this.options.version},e.prototype.getPath=function(t,n){return this.getRoot(n)+"/"+t+this.options.suffix+".js"},e}(),_=m,T=new o("_pusher_dependencies","Pusher.DependenciesReceivers"),w=new _({cdn_http:l.cdn_http,cdn_https:l.cdn_https,version:l.VERSION,suffix:l.dependency_suffix,receivers:T}),S={baseUrl:"https://pusher.com",urls:{authenticationEndpoint:{path:"/docs/channels/server_api/authenticating_users"},authorizationEndpoint:{path:"/docs/channels/server_api/authorizing-users/"},javascriptQuickStart:{path:"/docs/javascript_quick_start"},triggeringClientEvents:{path:"/docs/client_api_guide/client_events#trigger-events"},encryptedChannelSupport:{fullUrl:"https://github.com/pusher/pusher-js/tree/cc491015371a4bde5743d1c87a0fbac0feb53195#encrypted-channel-support"}}},O=function(e){var t="See:",n=S.urls[e];if(!n)return"";var s;return n.fullUrl?s=n.fullUrl:n.path&amp;&amp;(s=S.baseUrl+n.path),s?t+" "+s:""},k={buildLogSuffix:O},y=function(e){return e.UserAuthentication="user-authentication",e.ChannelAuthorization="channel-authorization",e}(y||{}),g=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(s,c){s.__proto__=c}||function(s,c){for(var h in c)c.hasOwnProperty(h)&amp;&amp;(s[h]=c[h])},e(t,n)};return function(t,n){e(t,n);function s(){this.constructor=t}t.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)}}(),x=function(e){g(t,e);function t(n){var s=this.constructor,c=e.call(this,n)||this;return Object.setPrototypeOf(c,s.prototype),c}return t}(Error),R=function(e){g(t,e);function t(n){var s=this.constructor,c=e.call(this,n)||this;return Object.setPrototypeOf(c,s.prototype),c}return t}(Error),q=function(e){g(t,e);function t(n){var s=this.constructor,c=e.call(this,n)||this;return Object.setPrototypeOf(c,s.prototype),c}return t}(Error),H=function(e){g(t,e);function t(n){var s=this.constructor,c=e.call(this,n)||this;return Object.setPrototypeOf(c,s.prototype),c}return t}(Error),J=function(e){g(t,e);function t(n){var s=this.constructor,c=e.call(this,n)||this;return Object.setPrototypeOf(c,s.prototype),c}return t}(Error),Z=function(e){g(t,e);function t(n){var s=this.constructor,c=e.call(this,n)||this;return Object.setPrototypeOf(c,s.prototype),c}return t}(Error),G=function(e){g(t,e);function t(n){var s=this.constructor,c=e.call(this,n)||this;return Object.setPrototypeOf(c,s.prototype),c}return t}(Error),$=function(e){g(t,e);function t(n){var s=this.constructor,c=e.call(this,n)||this;return Object.setPrototypeOf(c,s.prototype),c}return t}(Error),Y=function(e){g(t,e);function t(n,s){var c=this.constructor,h=e.call(this,s)||this;return h.status=n,Object.setPrototypeOf(h,c.prototype),h}return t}(Error),fr=function(e,t,n,s,c){var h=C.createXHR();h.open("POST",n.endpoint,!0),h.setRequestHeader("Content-Type","application/x-www-form-urlencoded");for(var p in n.headers)h.setRequestHeader(p,n.headers[p]);if(n.headersProvider!=null){var d=n.headersProvider();for(var p in d)h.setRequestHeader(p,d[p])}return h.onreadystatechange=function(){if(h.readyState===4)if(h.status===200){var b=void 0,v=!1;try{b=JSON.parse(h.responseText),v=!0}catch{c(new Y(200,"JSON returned from "+s.toString()+" endpoint was invalid, yet status code was 200. Data was: "+h.responseText),null)}v&amp;&amp;c(null,b)}else{var E="";switch(s){case y.UserAuthentication:E=k.buildLogSuffix("authenticationEndpoint");break;case y.ChannelAuthorization:E="Clients must be authorized to join private or presence channels. "+k.buildLogSuffix("authorizationEndpoint");break}c(new Y(h.status,"Unable to retrieve auth string from "+s.toString()+" endpoint - "+("received status: "+h.status+" from "+n.endpoint+". "+E)),null)}},h.send(t),h},lr=fr;function pr(e){return _r(vr(e))}for(var Ct=String.fromCharCode,dt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",dr={},qt=0,yr=dt.length;qt&lt;yr;qt++)dr[dt.charAt(qt)]=qt;var gr=function(e){var t=e.charCodeAt(0);return t&lt;128?e:t&lt;2048?Ct(192|t&gt;&gt;&gt;6)+Ct(128|t&amp;63):Ct(224|t&gt;&gt;&gt;12&amp;15)+Ct(128|t&gt;&gt;&gt;6&amp;63)+Ct(128|t&amp;63)},vr=function(e){return e.replace(/[^\x00-\x7F]/g,gr)},mr=function(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)&lt;&lt;16|(e.length&gt;1?e.charCodeAt(1):0)&lt;&lt;8|(e.length&gt;2?e.charCodeAt(2):0),s=[dt.charAt(n&gt;&gt;&gt;18),dt.charAt(n&gt;&gt;&gt;12&amp;63),t&gt;=2?"=":dt.charAt(n&gt;&gt;&gt;6&amp;63),t&gt;=1?"=":dt.charAt(n&amp;63)];return s.join("")},_r=window.btoa||function(e){return e.replace(/[\s\S]{1,3}/g,mr)},br=function(){function e(t,n,s,c){var h=this;this.clear=n,this.timer=t(function(){h.timer&amp;&amp;(h.timer=c(h.timer))},s)}return e.prototype.isRunning=function(){return this.timer!==null},e.prototype.ensureAborted=function(){this.timer&amp;&amp;(this.clear(this.timer),this.timer=null)},e}(),Fe=br,He=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(s,c){s.__proto__=c}||function(s,c){for(var h in c)c.hasOwnProperty(h)&amp;&amp;(s[h]=c[h])},e(t,n)};return function(t,n){e(t,n);function s(){this.constructor=t}t.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)}}();function wr(e){window.clearTimeout(e)}function kr(e){window.clearInterval(e)}var ut=function(e){He(t,e);function t(n,s){return e.call(this,setTimeout,wr,n,function(c){return s(),null})||this}return t}(Fe),Sr=function(e){He(t,e);function t(n,s){return e.call(this,setInterval,kr,n,function(c){return s(),c})||this}return t}(Fe),Cr={now:function(){return Date.now?Date.now():new Date().valueOf()},defer:function(e){return new ut(0,e)},method:function(e){for(var t=[],n=1;n&lt;arguments.length;n++)t[n-1]=arguments[n];var s=Array.prototype.slice.call(arguments,1);return function(c){return c[e].apply(c,s.concat(arguments))}}},U=Cr;function z(e){for(var t=[],n=1;n&lt;arguments.length;n++)t[n-1]=arguments[n];for(var s=0;s&lt;t.length;s++){var c=t[s];for(var h in c)c[h]&amp;&amp;c[h].constructor&amp;&amp;c[h].constructor===Object?e[h]=z(e[h]||{},c[h]):e[h]=c[h]}return e}function Tr(){for(var e=["Pusher"],t=0;t&lt;arguments.length;t++)typeof arguments[t]=="string"?e.push(arguments[t]):e.push(Ut(arguments[t]));return e.join(" : ")}function Me(e,t){var n=Array.prototype.indexOf;if(e===null)return-1;if(n&amp;&amp;e.indexOf===n)return e.indexOf(t);for(var s=0,c=e.length;s&lt;c;s++)if(e[s]===t)return s;return-1}function tt(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&amp;&amp;t(e[n],n,e)}function ze(e){var t=[];return tt(e,function(n,s){t.push(s)}),t}function xr(e){var t=[];return tt(e,function(n){t.push(n)}),t}function Tt(e,t,n){for(var s=0;s&lt;e.length;s++)t.call(n||window,e[s],s,e)}function Ve(e,t){for(var n=[],s=0;s&lt;e.length;s++)n.push(t(e[s],s,e,n));return n}function Er(e,t){var n={};return tt(e,function(s,c){n[c]=t(s)}),n}function We(e,t){t=t||function(c){return!!c};for(var n=[],s=0;s&lt;e.length;s++)t(e[s],s,e,n)&amp;&amp;n.push(e[s]);return n}function Xe(e,t){var n={};return tt(e,function(s,c){(t&amp;&amp;t(s,c,e,n)||s)&amp;&amp;(n[c]=s)}),n}function Pr(e){var t=[];return tt(e,function(n,s){t.push([s,n])}),t}function Je(e,t){for(var n=0;n&lt;e.length;n++)if(t(e[n],n,e))return!0;return!1}function Or(e,t){for(var n=0;n&lt;e.length;n++)if(!t(e[n],n,e))return!1;return!0}function Ar(e){return Er(e,function(t){return typeof t=="object"&amp;&amp;(t=Ut(t)),encodeURIComponent(pr(t.toString()))})}function Rr(e){var t=Xe(e,function(s){return s!==void 0}),n=Ve(Pr(Ar(t)),U.method("join","=")).join("&amp;");return n}function Nr(e){var t=[],n=[];return function s(c,h){var p,d,b;switch(typeof c){case"object":if(!c)return null;for(p=0;p&lt;t.length;p+=1)if(t[p]===c)return{$ref:n[p]};if(t.push(c),n.push(h),Object.prototype.toString.apply(c)==="[object Array]")for(b=[],p=0;p&lt;c.length;p+=1)b[p]=s(c[p],h+"["+p+"]");else{b={};for(d in c)Object.prototype.hasOwnProperty.call(c,d)&amp;&amp;(b[d]=s(c[d],h+"["+JSON.stringify(d)+"]"))}return b;case"number":case"string":case"boolean":return c}}(e,"$")}function Ut(e){try{return JSON.stringify(e)}catch{return JSON.stringify(Nr(e))}}var Lr=function(){function e(){this.globalLog=function(t){window.console&amp;&amp;window.console.log&amp;&amp;window.console.log(t)}}return e.prototype.debug=function(){for(var t=[],n=0;n&lt;arguments.length;n++)t[n]=arguments[n];this.log(this.globalLog,t)},e.prototype.warn=function(){for(var t=[],n=0;n&lt;arguments.length;n++)t[n]=arguments[n];this.log(this.globalLogWarn,t)},e.prototype.error=function(){for(var t=[],n=0;n&lt;arguments.length;n++)t[n]=arguments[n];this.log(this.globalLogError,t)},e.prototype.globalLogWarn=function(t){window.console&amp;&amp;window.console.warn?window.console.warn(t):this.globalLog(t)},e.prototype.globalLogError=function(t){window.console&amp;&amp;window.console.error?window.console.error(t):this.globalLogWarn(t)},e.prototype.log=function(t){for(var n=[],s=1;s&lt;arguments.length;s++)n[s-1]=arguments[s];var c=Tr.apply(this,arguments);if(de.log)de.log(c);else if(de.logToConsole){var h=t.bind(this);h(c)}},e}(),N=new Lr,Ir=function(e,t,n,s,c){(n.headers!==void 0||n.headersProvider!=null)&amp;&amp;N.warn("To send headers with the "+s.toString()+" request, you must use AJAX, rather than JSONP.");var h=e.nextAuthCallbackID.toString();e.nextAuthCallbackID++;var p=e.getDocument(),d=p.createElement("script");e.auth_callbacks[h]=function(E){c(null,E)};var b="Pusher.auth_callbacks['"+h+"']";d.src=n.endpoint+"?callback="+encodeURIComponent(b)+"&amp;"+t;var v=p.getElementsByTagName("head")[0]||p.documentElement;v.insertBefore(d,v.firstChild)},Br=Ir,jr=function(){function e(t){this.src=t}return e.prototype.send=function(t){var n=this,s="Error loading "+n.src;n.script=document.createElement("script"),n.script.id=t.id,n.script.src=n.src,n.script.type="text/javascript",n.script.charset="UTF-8",n.script.addEventListener?(n.script.onerror=function(){t.callback(s)},n.script.onload=function(){t.callback(null)}):n.script.onreadystatechange=function(){(n.script.readyState==="loaded"||n.script.readyState==="complete")&amp;&amp;t.callback(null)},n.script.async===void 0&amp;&amp;document.attachEvent&amp;&amp;/opera/i.test(navigator.userAgent)?(n.errorScript=document.createElement("script"),n.errorScript.id=t.id+"_error",n.errorScript.text=t.name+"('"+s+"');",n.script.async=n.errorScript.async=!1):n.script.async=!0;var c=document.getElementsByTagName("head")[0];c.insertBefore(n.script,c.firstChild),n.errorScript&amp;&amp;c.insertBefore(n.errorScript,n.script.nextSibling)},e.prototype.cleanup=function(){this.script&amp;&amp;(this.script.onload=this.script.onerror=null,this.script.onreadystatechange=null),this.script&amp;&amp;this.script.parentNode&amp;&amp;this.script.parentNode.removeChild(this.script),this.errorScript&amp;&amp;this.errorScript.parentNode&amp;&amp;this.errorScript.parentNode.removeChild(this.errorScript),this.script=null,this.errorScript=null},e}(),Dr=jr,qr=function(){function e(t,n){this.url=t,this.data=n}return e.prototype.send=function(t){if(!this.request){var n=Rr(this.data),s=this.url+"/"+t.number+"?"+n;this.request=C.createScriptRequest(s),this.request.send(t)}},e.prototype.cleanup=function(){this.request&amp;&amp;this.request.cleanup()},e}(),Ur=qr,Fr=function(e,t){return function(n,s){var c="http"+(t?"s":"")+"://",h=c+(e.host||e.options.host)+e.options.path,p=C.createJSONPRequest(h,n),d=C.ScriptReceivers.create(function(b,v){a.remove(d),p.cleanup(),v&amp;&amp;v.host&amp;&amp;(e.host=v.host),s&amp;&amp;s(b,v)});p.send(d)}},Hr={name:"jsonp",getAgent:Fr},Mr=Hr;function se(e,t,n){var s=e+(t.useTLS?"s":""),c=t.useTLS?t.hostTLS:t.hostNonTLS;return s+"://"+c+n}function ae(e,t){var n="/app/"+e,s="?protocol="+l.PROTOCOL+"&amp;client=js&amp;version="+l.VERSION+(t?"&amp;"+t:"");return n+s}var zr={getInitial:function(e,t){var n=(t.httpPath||"")+ae(e,"flash=false");return se("ws",t,n)}},Vr={getInitial:function(e,t){var n=(t.httpPath||"/pusher")+ae(e);return se("http",t,n)}},Wr={getInitial:function(e,t){return se("http",t,t.httpPath||"/pusher")},getPath:function(e,t){return ae(e)}},Xr=function(){function e(){this._callbacks={}}return e.prototype.get=function(t){return this._callbacks[ce(t)]},e.prototype.add=function(t,n,s){var c=ce(t);this._callbacks[c]=this._callbacks[c]||[],this._callbacks[c].push({fn:n,context:s})},e.prototype.remove=function(t,n,s){if(!t&amp;&amp;!n&amp;&amp;!s){this._callbacks={};return}var c=t?[ce(t)]:ze(this._callbacks);n||s?this.removeCallback(c,n,s):this.removeAllCallbacks(c)},e.prototype.removeCallback=function(t,n,s){Tt(t,function(c){this._callbacks[c]=We(this._callbacks[c]||[],function(h){return n&amp;&amp;n!==h.fn||s&amp;&amp;s!==h.context}),this._callbacks[c].length===0&amp;&amp;delete this._callbacks[c]},this)},e.prototype.removeAllCallbacks=function(t){Tt(t,function(n){delete this._callbacks[n]},this)},e}(),Jr=Xr;function ce(e){return"_"+e}var $r=function(){function e(t){this.callbacks=new Jr,this.global_callbacks=[],this.failThrough=t}return e.prototype.bind=function(t,n,s){return this.callbacks.add(t,n,s),this},e.prototype.bind_global=function(t){return this.global_callbacks.push(t),this},e.prototype.unbind=function(t,n,s){return this.callbacks.remove(t,n,s),this},e.prototype.unbind_global=function(t){return t?(this.global_callbacks=We(this.global_callbacks||[],function(n){return n!==t}),this):(this.global_callbacks=[],this)},e.prototype.unbind_all=function(){return this.unbind(),this.unbind_global(),this},e.prototype.emit=function(t,n,s){for(var c=0;c&lt;this.global_callbacks.length;c++)this.global_callbacks[c](t,n);var h=this.callbacks.get(t),p=[];if(s?p.push(n,s):n&amp;&amp;p.push(n),h&amp;&amp;h.length&gt;0)for(var c=0;c&lt;h.length;c++)h[c].fn.apply(h[c].context||window,p);else this.failThrough&amp;&amp;this.failThrough(t,n);return this},e}(),et=$r,Kr=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(s,c){s.__proto__=c}||function(s,c){for(var h in c)c.hasOwnProperty(h)&amp;&amp;(s[h]=c[h])},e(t,n)};return function(t,n){e(t,n);function s(){this.constructor=t}t.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)}}(),Gr=function(e){Kr(t,e);function t(n,s,c,h,p){var d=e.call(this)||this;return d.initialize=C.transportConnectionInitializer,d.hooks=n,d.name=s,d.priority=c,d.key=h,d.options=p,d.state="new",d.timeline=p.timeline,d.activityTimeout=p.activityTimeout,d.id=d.timeline.generateUniqueID(),d}return t.prototype.handlesActivityChecks=function(){return!!this.hooks.handlesActivityChecks},t.prototype.supportsPing=function(){return!!this.hooks.supportsPing},t.prototype.connect=function(){var n=this;if(this.socket||this.state!=="initialized")return!1;var s=this.hooks.urls.getInitial(this.key,this.options);try{this.socket=this.hooks.getSocket(s,this.options)}catch(c){return U.defer(function(){n.onError(c),n.changeState("closed")}),!1}return this.bindListeners(),N.debug("Connecting",{transport:this.name,url:s}),this.changeState("connecting"),!0},t.prototype.close=function(){return this.socket?(this.socket.close(),!0):!1},t.prototype.send=function(n){var s=this;return this.state==="open"?(U.defer(function(){s.socket&amp;&amp;s.socket.send(n)}),!0):!1},t.prototype.ping=function(){this.state==="open"&amp;&amp;this.supportsPing()&amp;&amp;this.socket.ping()},t.prototype.onOpen=function(){this.hooks.beforeOpen&amp;&amp;this.hooks.beforeOpen(this.socket,this.hooks.urls.getPath(this.key,this.options)),this.changeState("open"),this.socket.onopen=void 0},t.prototype.onError=function(n){this.emit("error",{type:"WebSocketError",error:n}),this.timeline.error(this.buildTimelineMessage({error:n.toString()}))},t.prototype.onClose=function(n){n?this.changeState("closed",{code:n.code,reason:n.reason,wasClean:n.wasClean}):this.changeState("closed"),this.unbindListeners(),this.socket=void 0},t.prototype.onMessage=function(n){this.emit("message",n)},t.prototype.onActivity=function(){this.emit("activity")},t.prototype.bindListeners=function(){var n=this;this.socket.onopen=function(){n.onOpen()},this.socket.onerror=function(s){n.onError(s)},this.socket.onclose=function(s){n.onClose(s)},this.socket.onmessage=function(s){n.onMessage(s)},this.supportsPing()&amp;&amp;(this.socket.onactivity=function(){n.onActivity()})},t.prototype.unbindListeners=function(){this.socket&amp;&amp;(this.socket.onopen=void 0,this.socket.onerror=void 0,this.socket.onclose=void 0,this.socket.onmessage=void 0,this.supportsPing()&amp;&amp;(this.socket.onactivity=void 0))},t.prototype.changeState=function(n,s){this.state=n,this.timeline.info(this.buildTimelineMessage({state:n,params:s})),this.emit(n,s)},t.prototype.buildTimelineMessage=function(n){return z({cid:this.id},n)},t}(et),Yr=Gr,Qr=function(){function e(t){this.hooks=t}return e.prototype.isSupported=function(t){return this.hooks.isSupported(t)},e.prototype.createConnection=function(t,n,s,c){return new Yr(this.hooks,t,n,s,c)},e}(),yt=Qr,Zr=new yt({urls:zr,handlesActivityChecks:!1,supportsPing:!1,isInitialized:function(){return!!C.getWebSocketAPI()},isSupported:function(){return!!C.getWebSocketAPI()},getSocket:function(e){return C.createWebSocket(e)}}),$e={urls:Vr,handlesActivityChecks:!1,supportsPing:!0,isInitialized:function(){return!0}},Ke=z({getSocket:function(e){return C.HTTPFactory.createStreamingSocket(e)}},$e),Ge=z({getSocket:function(e){return C.HTTPFactory.createPollingSocket(e)}},$e),Ye={isSupported:function(){return C.isXHRSupported()}},ti=new yt(z({},Ke,Ye)),ei=new yt(z({},Ge,Ye)),ni={ws:Zr,xhr_streaming:ti,xhr_polling:ei},Ft=ni,ri=new yt({file:"sockjs",urls:Wr,handlesActivityChecks:!0,supportsPing:!1,isSupported:function(){return!0},isInitialized:function(){return window.SockJS!==void 0},getSocket:function(e,t){return new window.SockJS(e,null,{js_path:w.getPath("sockjs",{useTLS:t.useTLS}),ignore_null_origin:t.ignoreNullOrigin})},beforeOpen:function(e,t){e.send(JSON.stringify({path:t}))}}),Qe={isSupported:function(e){var t=C.isXDRSupported(e.useTLS);return t}},ii=new yt(z({},Ke,Qe)),oi=new yt(z({},Ge,Qe));Ft.xdr_streaming=ii,Ft.xdr_polling=oi,Ft.sockjs=ri;var si=Ft,ai=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(s,c){s.__proto__=c}||function(s,c){for(var h in c)c.hasOwnProperty(h)&amp;&amp;(s[h]=c[h])},e(t,n)};return function(t,n){e(t,n);function s(){this.constructor=t}t.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)}}(),ci=function(e){ai(t,e);function t(){var n=e.call(this)||this,s=n;return window.addEventListener!==void 0&amp;&amp;(window.addEventListener("online",function(){s.emit("online")},!1),window.addEventListener("offline",function(){s.emit("offline")},!1)),n}return t.prototype.isOnline=function(){return window.navigator.onLine===void 0?!0:window.navigator.onLine},t}(et),ui=new ci,hi=function(){function e(t,n,s){this.manager=t,this.transport=n,this.minPingDelay=s.minPingDelay,this.maxPingDelay=s.maxPingDelay,this.pingDelay=void 0}return e.prototype.createConnection=function(t,n,s,c){var h=this;c=z({},c,{activityTimeout:this.pingDelay});var p=this.transport.createConnection(t,n,s,c),d=null,b=function(){p.unbind("open",b),p.bind("closed",v),d=U.now()},v=function(E){if(p.unbind("closed",v),E.code===1002||E.code===1003)h.manager.reportDeath();else if(!E.wasClean&amp;&amp;d){var L=U.now()-d;L&lt;2*h.maxPingDelay&amp;&amp;(h.manager.reportDeath(),h.pingDelay=Math.max(L/2,h.minPingDelay))}};return p.bind("open",b),p},e.prototype.isSupported=function(t){return this.manager.isAlive()&amp;&amp;this.transport.isSupported(t)},e}(),fi=hi,Ze={decodeMessage:function(e){try{var t=JSON.parse(e.data),n=t.data;if(typeof n=="string")try{n=JSON.parse(t.data)}catch{}var s={event:t.event,channel:t.channel,data:n};return t.user_id&amp;&amp;(s.user_id=t.user_id),s}catch(c){throw{type:"MessageParseError",error:c,data:e.data}}},encodeMessage:function(e){return JSON.stringify(e)},processHandshake:function(e){var t=Ze.decodeMessage(e);if(t.event==="pusher:connection_established"){if(!t.data.activity_timeout)throw"No activity timeout specified in handshake";return{action:"connected",id:t.data.socket_id,activityTimeout:t.data.activity_timeout*1e3}}else{if(t.event==="pusher:error")return{action:this.getCloseAction(t.data),error:this.getCloseError(t.data)};throw"Invalid handshake"}},getCloseAction:function(e){return e.code&lt;4e3?e.code&gt;=1002&amp;&amp;e.code&lt;=1004?"backoff":null:e.code===4e3?"tls_only":e.code&lt;4100?"refused":e.code&lt;4200?"backoff":e.code&lt;4300?"retry":"refused"},getCloseError:function(e){return e.code!==1e3&amp;&amp;e.code!==1001?{type:"PusherError",data:{code:e.code,message:e.reason||e.message}}:null}},ht=Ze,li=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(s,c){s.__proto__=c}||function(s,c){for(var h in c)c.hasOwnProperty(h)&amp;&amp;(s[h]=c[h])},e(t,n)};return function(t,n){e(t,n);function s(){this.constructor=t}t.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)}}(),pi=function(e){li(t,e);function t(n,s){var c=e.call(this)||this;return c.id=n,c.transport=s,c.activityTimeout=s.activityTimeout,c.bindListeners(),c}return t.prototype.handlesActivityChecks=function(){return this.transport.handlesActivityChecks()},t.prototype.send=function(n){return this.transport.send(n)},t.prototype.send_event=function(n,s,c){var h={event:n,data:s};return c&amp;&amp;(h.channel=c),N.debug("Event sent",h),this.send(ht.encodeMessage(h))},t.prototype.ping=function(){this.transport.supportsPing()?this.transport.ping():this.send_event("pusher:ping",{})},t.prototype.close=function(){this.transport.close()},t.prototype.bindListeners=function(){var n=this,s={message:function(h){var p;try{p=ht.decodeMessage(h)}catch(d){n.emit("error",{type:"MessageParseError",error:d,data:h.data})}if(p!==void 0){switch(N.debug("Event recd",p),p.event){case"pusher:error":n.emit("error",{type:"PusherError",data:p.data});break;case"pusher:ping":n.emit("ping");break;case"pusher:pong":n.emit("pong");break}n.emit("message",p)}},activity:function(){n.emit("activity")},error:function(h){n.emit("error",h)},closed:function(h){c(),h&amp;&amp;h.code&amp;&amp;n.handleCloseEvent(h),n.transport=null,n.emit("closed")}},c=function(){tt(s,function(h,p){n.transport.unbind(p,h)})};tt(s,function(h,p){n.transport.bind(p,h)})},t.prototype.handleCloseEvent=function(n){var s=ht.getCloseAction(n),c=ht.getCloseError(n);c&amp;&amp;this.emit("error",c),s&amp;&amp;this.emit(s,{action:s,error:c})},t}(et),di=pi,yi=function(){function e(t,n){this.transport=t,this.callback=n,this.bindListeners()}return e.prototype.close=function(){this.unbindListeners(),this.transport.close()},e.prototype.bindListeners=function(){var t=this;this.onMessage=function(n){t.unbindListeners();var s;try{s=ht.processHandshake(n)}catch(c){t.finish("error",{error:c}),t.transport.close();return}s.action==="connected"?t.finish("connected",{connection:new di(s.id,t.transport),activityTimeout:s.activityTimeout}):(t.finish(s.action,{error:s.error}),t.transport.close())},this.onClosed=function(n){t.unbindListeners();var s=ht.getCloseAction(n)||"backoff",c=ht.getCloseError(n);t.finish(s,{error:c})},this.transport.bind("message",this.onMessage),this.transport.bind("closed",this.onClosed)},e.prototype.unbindListeners=function(){this.transport.unbind("message",this.onMessage),this.transport.unbind("closed",this.onClosed)},e.prototype.finish=function(t,n){this.callback(z({transport:this.transport,action:t},n))},e}(),gi=yi,vi=function(){function e(t,n){this.timeline=t,this.options=n||{}}return e.prototype.send=function(t,n){this.timeline.isEmpty()||this.timeline.send(C.TimelineTransport.getAgent(this,t),n)},e}(),mi=vi,_i=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(s,c){s.__proto__=c}||function(s,c){for(var h in c)c.hasOwnProperty(h)&amp;&amp;(s[h]=c[h])},e(t,n)};return function(t,n){e(t,n);function s(){this.constructor=t}t.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)}}(),bi=function(e){_i(t,e);function t(n,s){var c=e.call(this,function(h,p){N.debug("No callbacks on "+n+" for "+h)})||this;return c.name=n,c.pusher=s,c.subscribed=!1,c.subscriptionPending=!1,c.subscriptionCancelled=!1,c}return t.prototype.authorize=function(n,s){return s(null,{auth:""})},t.prototype.trigger=function(n,s){if(n.indexOf("client-")!==0)throw new x("Event '"+n+"' does not start with 'client-'");if(!this.subscribed){var c=k.buildLogSuffix("triggeringClientEvents");N.warn("Client event triggered before channel 'subscription_succeeded' event . "+c)}return this.pusher.send_event(n,s,this.name)},t.prototype.disconnect=function(){this.subscribed=!1,this.subscriptionPending=!1},t.prototype.handleEvent=function(n){var s=n.event,c=n.data;if(s==="pusher_internal:subscription_succeeded")this.handleSubscriptionSucceededEvent(n);else if(s==="pusher_internal:subscription_count")this.handleSubscriptionCountEvent(n);else if(s.indexOf("pusher_internal:")!==0){var h={};this.emit(s,c,h)}},t.prototype.handleSubscriptionSucceededEvent=function(n){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):this.emit("pusher:subscription_succeeded",n.data)},t.prototype.handleSubscriptionCountEvent=function(n){n.data.subscription_count&amp;&amp;(this.subscriptionCount=n.data.subscription_count),this.emit("pusher:subscription_count",n.data)},t.prototype.subscribe=function(){var n=this;this.subscribed||(this.subscriptionPending=!0,this.subscriptionCancelled=!1,this.authorize(this.pusher.connection.socket_id,function(s,c){s?(n.subscriptionPending=!1,N.error(s.toString()),n.emit("pusher:subscription_error",Object.assign({},{type:"AuthError",error:s.message},s instanceof Y?{status:s.status}:{}))):n.pusher.send_event("pusher:subscribe",{auth:c.auth,channel_data:c.channel_data,channel:n.name})}))},t.prototype.unsubscribe=function(){this.subscribed=!1,this.pusher.send_event("pusher:unsubscribe",{channel:this.name})},t.prototype.cancelSubscription=function(){this.subscriptionCancelled=!0},t.prototype.reinstateSubscription=function(){this.subscriptionCancelled=!1},t}(et),ue=bi,wi=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(s,c){s.__proto__=c}||function(s,c){for(var h in c)c.hasOwnProperty(h)&amp;&amp;(s[h]=c[h])},e(t,n)};return function(t,n){e(t,n);function s(){this.constructor=t}t.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)}}(),ki=function(e){wi(t,e);function t(){return e!==null&amp;&amp;e.apply(this,arguments)||this}return t.prototype.authorize=function(n,s){return this.pusher.config.channelAuthorizer({channelName:this.name,socketId:n},s)},t}(ue),he=ki,Si=function(){function e(){this.reset()}return e.prototype.get=function(t){return Object.prototype.hasOwnProperty.call(this.members,t)?{id:t,info:this.members[t]}:null},e.prototype.each=function(t){var n=this;tt(this.members,function(s,c){t(n.get(c))})},e.prototype.setMyID=function(t){this.myID=t},e.prototype.onSubscription=function(t){this.members=t.presence.hash,this.count=t.presence.count,this.me=this.get(this.myID)},e.prototype.addMember=function(t){return this.get(t.user_id)===null&amp;&amp;this.count++,this.members[t.user_id]=t.user_info,this.get(t.user_id)},e.prototype.removeMember=function(t){var n=this.get(t.user_id);return n&amp;&amp;(delete this.members[t.user_id],this.count--),n},e.prototype.reset=function(){this.members={},this.count=0,this.myID=null,this.me=null},e}(),Ci=Si,Ti=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(s,c){s.__proto__=c}||function(s,c){for(var h in c)c.hasOwnProperty(h)&amp;&amp;(s[h]=c[h])},e(t,n)};return function(t,n){e(t,n);function s(){this.constructor=t}t.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)}}(),xi=function(e,t,n,s){function c(h){return h instanceof n?h:new n(function(p){p(h)})}return new(n||(n=Promise))(function(h,p){function d(E){try{v(s.next(E))}catch(L){p(L)}}function b(E){try{v(s.throw(E))}catch(L){p(L)}}function v(E){E.done?h(E.value):c(E.value).then(d,b)}v((s=s.apply(e,t||[])).next())})},Ei=function(e,t){var n={label:0,sent:function(){if(h[0]&amp;1)throw h[1];return h[1]},trys:[],ops:[]},s,c,h,p;return p={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&amp;&amp;(p[Symbol.iterator]=function(){return this}),p;function d(v){return function(E){return b([v,E])}}function b(v){if(s)throw new TypeError("Generator is already executing.");for(;n;)try{if(s=1,c&amp;&amp;(h=v[0]&amp;2?c.return:v[0]?c.throw||((h=c.return)&amp;&amp;h.call(c),0):c.next)&amp;&amp;!(h=h.call(c,v[1])).done)return h;switch(c=0,h&amp;&amp;(v=[v[0]&amp;2,h.value]),v[0]){case 0:case 1:h=v;break;case 4:return n.label++,{value:v[1],done:!1};case 5:n.label++,c=v[1],v=[0];continue;case 7:v=n.ops.pop(),n.trys.pop();continue;default:if(h=n.trys,!(h=h.length&gt;0&amp;&amp;h[h.length-1])&amp;&amp;(v[0]===6||v[0]===2)){n=0;continue}if(v[0]===3&amp;&amp;(!h||v[1]&gt;h[0]&amp;&amp;v[1]&lt;h[3])){n.label=v[1];break}if(v[0]===6&amp;&amp;n.label&lt;h[1]){n.label=h[1],h=v;break}if(h&amp;&amp;n.label&lt;h[2]){n.label=h[2],n.ops.push(v);break}h[2]&amp;&amp;n.ops.pop(),n.trys.pop();continue}v=t.call(e,n)}catch(E){v=[6,E],c=0}finally{s=h=0}if(v[0]&amp;5)throw v[1];return{value:v[0]?v[1]:void 0,done:!0}}},Pi=function(e){Ti(t,e);function t(n,s){var c=e.call(this,n,s)||this;return c.members=new Ci,c}return t.prototype.authorize=function(n,s){var c=this;e.prototype.authorize.call(this,n,function(h,p){return xi(c,void 0,void 0,function(){var d,b;return Ei(this,function(v){switch(v.label){case 0:return h?[3,3]:(p=p,p.channel_data==null?[3,1]:(d=JSON.parse(p.channel_data),this.members.setMyID(d.user_id),[3,3]));case 1:return[4,this.pusher.user.signinDonePromise];case 2:if(v.sent(),this.pusher.user.user_data!=null)this.members.setMyID(this.pusher.user.user_data.id);else return b=k.buildLogSuffix("authorizationEndpoint"),N.error("Invalid auth response for channel '"+this.name+"', "+("expected 'channel_data' field. "+b+", ")+"or the user should be signed in."),s("Invalid auth response"),[2];v.label=3;case 3:return s(h,p),[2]}})})})},t.prototype.handleEvent=function(n){var s=n.event;if(s.indexOf("pusher_internal:")===0)this.handleInternalEvent(n);else{var c=n.data,h={};n.user_id&amp;&amp;(h.user_id=n.user_id),this.emit(s,c,h)}},t.prototype.handleInternalEvent=function(n){var s=n.event,c=n.data;switch(s){case"pusher_internal:subscription_succeeded":this.handleSubscriptionSucceededEvent(n);break;case"pusher_internal:subscription_count":this.handleSubscriptionCountEvent(n);break;case"pusher_internal:member_added":var h=this.members.addMember(c);this.emit("pusher:member_added",h);break;case"pusher_internal:member_removed":var p=this.members.removeMember(c);p&amp;&amp;this.emit("pusher:member_removed",p);break}},t.prototype.handleSubscriptionSucceededEvent=function(n){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):(this.members.onSubscription(n.data),this.emit("pusher:subscription_succeeded",this.members))},t.prototype.disconnect=function(){this.members.reset(),e.prototype.disconnect.call(this)},t}(he),Oi=Pi,Ai=r(1),fe=r(0),Ri=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(s,c){s.__proto__=c}||function(s,c){for(var h in c)c.hasOwnProperty(h)&amp;&amp;(s[h]=c[h])},e(t,n)};return function(t,n){e(t,n);function s(){this.constructor=t}t.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)}}(),Ni=function(e){Ri(t,e);function t(n,s,c){var h=e.call(this,n,s)||this;return h.key=null,h.nacl=c,h}return t.prototype.authorize=function(n,s){var c=this;e.prototype.authorize.call(this,n,function(h,p){if(h){s(h,p);return}var d=p.shared_secret;if(!d){s(new Error("No shared_secret key in auth payload for encrypted channel: "+c.name),null);return}c.key=Object(fe.decode)(d),delete p.shared_secret,s(null,p)})},t.prototype.trigger=function(n,s){throw new Z("Client events are not currently supported for encrypted channels")},t.prototype.handleEvent=function(n){var s=n.event,c=n.data;if(s.indexOf("pusher_internal:")===0||s.indexOf("pusher:")===0){e.prototype.handleEvent.call(this,n);return}this.handleEncryptedEvent(s,c)},t.prototype.handleEncryptedEvent=function(n,s){var c=this;if(!this.key){N.debug("Received encrypted event before key has been retrieved from the authEndpoint");return}if(!s.ciphertext||!s.nonce){N.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: "+s);return}var h=Object(fe.decode)(s.ciphertext);if(h.length&lt;this.nacl.secretbox.overheadLength){N.error("Expected encrypted event ciphertext length to be "+this.nacl.secretbox.overheadLength+", got: "+h.length);return}var p=Object(fe.decode)(s.nonce);if(p.length&lt;this.nacl.secretbox.nonceLength){N.error("Expected encrypted event nonce length to be "+this.nacl.secretbox.nonceLength+", got: "+p.length);return}var d=this.nacl.secretbox.open(h,p,this.key);if(d===null){N.debug("Failed to decrypt an event, probably because it was encrypted with a different key. Fetching a new key from the authEndpoint..."),this.authorize(this.pusher.connection.socket_id,function(b,v){if(b){N.error("Failed to make a request to the authEndpoint: "+v+". Unable to fetch new key, so dropping encrypted event");return}if(d=c.nacl.secretbox.open(h,p,c.key),d===null){N.error("Failed to decrypt event with new key. Dropping encrypted event");return}c.emit(n,c.getDataToEmit(d))});return}this.emit(n,this.getDataToEmit(d))},t.prototype.getDataToEmit=function(n){var s=Object(Ai.decode)(n);try{return JSON.parse(s)}catch{return s}},t}(he),Li=Ni,Ii=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(s,c){s.__proto__=c}||function(s,c){for(var h in c)c.hasOwnProperty(h)&amp;&amp;(s[h]=c[h])},e(t,n)};return function(t,n){e(t,n);function s(){this.constructor=t}t.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)}}(),Bi=function(e){Ii(t,e);function t(n,s){var c=e.call(this)||this;c.state="initialized",c.connection=null,c.key=n,c.options=s,c.timeline=c.options.timeline,c.usingTLS=c.options.useTLS,c.errorCallbacks=c.buildErrorCallbacks(),c.connectionCallbacks=c.buildConnectionCallbacks(c.errorCallbacks),c.handshakeCallbacks=c.buildHandshakeCallbacks(c.errorCallbacks);var h=C.getNetwork();return h.bind("online",function(){c.timeline.info({netinfo:"online"}),(c.state==="connecting"||c.state==="unavailable")&amp;&amp;c.retryIn(0)}),h.bind("offline",function(){c.timeline.info({netinfo:"offline"}),c.connection&amp;&amp;c.sendActivityCheck()}),c.updateStrategy(),c}return t.prototype.connect=function(){if(!(this.connection||this.runner)){if(!this.strategy.isSupported()){this.updateState("failed");return}this.updateState("connecting"),this.startConnecting(),this.setUnavailableTimer()}},t.prototype.send=function(n){return this.connection?this.connection.send(n):!1},t.prototype.send_event=function(n,s,c){return this.connection?this.connection.send_event(n,s,c):!1},t.prototype.disconnect=function(){this.disconnectInternally(),this.updateState("disconnected")},t.prototype.isUsingTLS=function(){return this.usingTLS},t.prototype.startConnecting=function(){var n=this,s=function(c,h){c?n.runner=n.strategy.connect(0,s):h.action==="error"?(n.emit("error",{type:"HandshakeError",error:h.error}),n.timeline.error({handshakeError:h.error})):(n.abortConnecting(),n.handshakeCallbacks[h.action](h))};this.runner=this.strategy.connect(0,s)},t.prototype.abortConnecting=function(){this.runner&amp;&amp;(this.runner.abort(),this.runner=null)},t.prototype.disconnectInternally=function(){if(this.abortConnecting(),this.clearRetryTimer(),this.clearUnavailableTimer(),this.connection){var n=this.abandonConnection();n.close()}},t.prototype.updateStrategy=function(){this.strategy=this.options.getStrategy({key:this.key,timeline:this.timeline,useTLS:this.usingTLS})},t.prototype.retryIn=function(n){var s=this;this.timeline.info({action:"retry",delay:n}),n&gt;0&amp;&amp;this.emit("connecting_in",Math.round(n/1e3)),this.retryTimer=new ut(n||0,function(){s.disconnectInternally(),s.connect()})},t.prototype.clearRetryTimer=function(){this.retryTimer&amp;&amp;(this.retryTimer.ensureAborted(),this.retryTimer=null)},t.prototype.setUnavailableTimer=function(){var n=this;this.unavailableTimer=new ut(this.options.unavailableTimeout,function(){n.updateState("unavailable")})},t.prototype.clearUnavailableTimer=function(){this.unavailableTimer&amp;&amp;this.unavailableTimer.ensureAborted()},t.prototype.sendActivityCheck=function(){var n=this;this.stopActivityCheck(),this.connection.ping(),this.activityTimer=new ut(this.options.pongTimeout,function(){n.timeline.error({pong_timed_out:n.options.pongTimeout}),n.retryIn(0)})},t.prototype.resetActivityCheck=function(){var n=this;this.stopActivityCheck(),this.connection&amp;&amp;!this.connection.handlesActivityChecks()&amp;&amp;(this.activityTimer=new ut(this.activityTimeout,function(){n.sendActivityCheck()}))},t.prototype.stopActivityCheck=function(){this.activityTimer&amp;&amp;this.activityTimer.ensureAborted()},t.prototype.buildConnectionCallbacks=function(n){var s=this;return z({},n,{message:function(c){s.resetActivityCheck(),s.emit("message",c)},ping:function(){s.send_event("pusher:pong",{})},activity:function(){s.resetActivityCheck()},error:function(c){s.emit("error",c)},closed:function(){s.abandonConnection(),s.shouldRetry()&amp;&amp;s.retryIn(1e3)}})},t.prototype.buildHandshakeCallbacks=function(n){var s=this;return z({},n,{connected:function(c){s.activityTimeout=Math.min(s.options.activityTimeout,c.activityTimeout,c.connection.activityTimeout||1/0),s.clearUnavailableTimer(),s.setConnection(c.connection),s.socket_id=s.connection.id,s.updateState("connected",{socket_id:s.socket_id})}})},t.prototype.buildErrorCallbacks=function(){var n=this,s=function(c){return function(h){h.error&amp;&amp;n.emit("error",{type:"WebSocketError",error:h.error}),c(h)}};return{tls_only:s(function(){n.usingTLS=!0,n.updateStrategy(),n.retryIn(0)}),refused:s(function(){n.disconnect()}),backoff:s(function(){n.retryIn(1e3)}),retry:s(function(){n.retryIn(0)})}},t.prototype.setConnection=function(n){this.connection=n;for(var s in this.connectionCallbacks)this.connection.bind(s,this.connectionCallbacks[s]);this.resetActivityCheck()},t.prototype.abandonConnection=function(){if(this.connection){this.stopActivityCheck();for(var n in this.connectionCallbacks)this.connection.unbind(n,this.connectionCallbacks[n]);var s=this.connection;return this.connection=null,s}},t.prototype.updateState=function(n,s){var c=this.state;if(this.state=n,c!==n){var h=n;h==="connected"&amp;&amp;(h+=" with new socket ID "+s.socket_id),N.debug("State changed",c+" -&gt; "+h),this.timeline.info({state:n,params:s}),this.emit("state_change",{previous:c,current:n}),this.emit(n,s)}},t.prototype.shouldRetry=function(){return this.state==="connecting"||this.state==="connected"},t}(et),ji=Bi,Di=function(){function e(){this.channels={}}return e.prototype.add=function(t,n){return this.channels[t]||(this.channels[t]=Ui(t,n)),this.channels[t]},e.prototype.all=function(){return xr(this.channels)},e.prototype.find=function(t){return this.channels[t]},e.prototype.remove=function(t){var n=this.channels[t];return delete this.channels[t],n},e.prototype.disconnect=function(){tt(this.channels,function(t){t.disconnect()})},e}(),qi=Di;function Ui(e,t){if(e.indexOf("private-encrypted-")===0){if(t.config.nacl)return nt.createEncryptedChannel(e,t,t.config.nacl);var n="Tried to subscribe to a private-encrypted- channel but no nacl implementation available",s=k.buildLogSuffix("encryptedChannelSupport");throw new Z(n+". "+s)}else{if(e.indexOf("private-")===0)return nt.createPrivateChannel(e,t);if(e.indexOf("presence-")===0)return nt.createPresenceChannel(e,t);if(e.indexOf("#")===0)throw new R('Cannot create a channel with name "'+e+'".');return nt.createChannel(e,t)}}var Fi={createChannels:function(){return new qi},createConnectionManager:function(e,t){return new ji(e,t)},createChannel:function(e,t){return new ue(e,t)},createPrivateChannel:function(e,t){return new he(e,t)},createPresenceChannel:function(e,t){return new Oi(e,t)},createEncryptedChannel:function(e,t,n){return new Li(e,t,n)},createTimelineSender:function(e,t){return new mi(e,t)},createHandshake:function(e,t){return new gi(e,t)},createAssistantToTheTransportManager:function(e,t,n){return new fi(e,t,n)}},nt=Fi,Hi=function(){function e(t){this.options=t||{},this.livesLeft=this.options.lives||1/0}return e.prototype.getAssistant=function(t){return nt.createAssistantToTheTransportManager(this,t,{minPingDelay:this.options.minPingDelay,maxPingDelay:this.options.maxPingDelay})},e.prototype.isAlive=function(){return this.livesLeft&gt;0},e.prototype.reportDeath=function(){this.livesLeft-=1},e}(),tn=Hi,Mi=function(){function e(t,n){this.strategies=t,this.loop=!!n.loop,this.failFast=!!n.failFast,this.timeout=n.timeout,this.timeoutLimit=n.timeoutLimit}return e.prototype.isSupported=function(){return Je(this.strategies,U.method("isSupported"))},e.prototype.connect=function(t,n){var s=this,c=this.strategies,h=0,p=this.timeout,d=null,b=function(v,E){E?n(null,E):(h=h+1,s.loop&amp;&amp;(h=h%c.length),h&lt;c.length?(p&amp;&amp;(p=p*2,s.timeoutLimit&amp;&amp;(p=Math.min(p,s.timeoutLimit))),d=s.tryStrategy(c[h],t,{timeout:p,failFast:s.failFast},b)):n(!0))};return d=this.tryStrategy(c[h],t,{timeout:p,failFast:this.failFast},b),{abort:function(){d.abort()},forceMinPriority:function(v){t=v,d&amp;&amp;d.forceMinPriority(v)}}},e.prototype.tryStrategy=function(t,n,s,c){var h=null,p=null;return s.timeout&gt;0&amp;&amp;(h=new ut(s.timeout,function(){p.abort(),c(!0)})),p=t.connect(n,function(d,b){d&amp;&amp;h&amp;&amp;h.isRunning()&amp;&amp;!s.failFast||(h&amp;&amp;h.ensureAborted(),c(d,b))}),{abort:function(){h&amp;&amp;h.ensureAborted(),p.abort()},forceMinPriority:function(d){p.forceMinPriority(d)}}},e}(),ft=Mi,zi=function(){function e(t){this.strategies=t}return e.prototype.isSupported=function(){return Je(this.strategies,U.method("isSupported"))},e.prototype.connect=function(t,n){return Vi(this.strategies,t,function(s,c){return function(h,p){if(c[s].error=h,h){Wi(c)&amp;&amp;n(!0);return}Tt(c,function(d){d.forceMinPriority(p.transport.priority)}),n(null,p)}})},e}(),le=zi;function Vi(e,t,n){var s=Ve(e,function(c,h,p,d){return c.connect(t,n(h,d))});return{abort:function(){Tt(s,Xi)},forceMinPriority:function(c){Tt(s,function(h){h.forceMinPriority(c)})}}}function Wi(e){return Or(e,function(t){return!!t.error})}function Xi(e){!e.error&amp;&amp;!e.aborted&amp;&amp;(e.abort(),e.aborted=!0)}var Ji=function(){function e(t,n,s){this.strategy=t,this.transports=n,this.ttl=s.ttl||1800*1e3,this.usingTLS=s.useTLS,this.timeline=s.timeline}return e.prototype.isSupported=function(){return this.strategy.isSupported()},e.prototype.connect=function(t,n){var s=this.usingTLS,c=Ki(s),h=[this.strategy];if(c&amp;&amp;c.timestamp+this.ttl&gt;=U.now()){var p=this.transports[c.transport];p&amp;&amp;(this.timeline.info({cached:!0,transport:c.transport,latency:c.latency}),h.push(new ft([p],{timeout:c.latency*2+1e3,failFast:!0})))}var d=U.now(),b=h.pop().connect(t,function v(E,L){E?(en(s),h.length&gt;0?(d=U.now(),b=h.pop().connect(t,v)):n(E)):(Gi(s,L.transport.name,U.now()-d),n(null,L))});return{abort:function(){b.abort()},forceMinPriority:function(v){t=v,b&amp;&amp;b.forceMinPriority(v)}}},e}(),$i=Ji;function pe(e){return"pusherTransport"+(e?"TLS":"NonTLS")}function Ki(e){var t=C.getLocalStorage();if(t)try{var n=t[pe(e)];if(n)return JSON.parse(n)}catch{en(e)}return null}function Gi(e,t,n){var s=C.getLocalStorage();if(s)try{s[pe(e)]=Ut({timestamp:U.now(),transport:t,latency:n})}catch{}}function en(e){var t=C.getLocalStorage();if(t)try{delete t[pe(e)]}catch{}}var Yi=function(){function e(t,n){var s=n.delay;this.strategy=t,this.options={delay:s}}return e.prototype.isSupported=function(){return this.strategy.isSupported()},e.prototype.connect=function(t,n){var s=this.strategy,c,h=new ut(this.options.delay,function(){c=s.connect(t,n)});return{abort:function(){h.ensureAborted(),c&amp;&amp;c.abort()},forceMinPriority:function(p){t=p,c&amp;&amp;c.forceMinPriority(p)}}},e}(),Ht=Yi,Qi=function(){function e(t,n,s){this.test=t,this.trueBranch=n,this.falseBranch=s}return e.prototype.isSupported=function(){var t=this.test()?this.trueBranch:this.falseBranch;return t.isSupported()},e.prototype.connect=function(t,n){var s=this.test()?this.trueBranch:this.falseBranch;return s.connect(t,n)},e}(),xt=Qi,Zi=function(){function e(t){this.strategy=t}return e.prototype.isSupported=function(){return this.strategy.isSupported()},e.prototype.connect=function(t,n){var s=this.strategy.connect(t,function(c,h){h&amp;&amp;s.abort(),n(c,h)});return s},e}(),to=Zi;function Et(e){return function(){return e.isSupported()}}var eo=function(e,t,n){var s={};function c(vn,hs,fs,ls,ps){var mn=n(e,vn,hs,fs,ls,ps);return s[vn]=mn,mn}var h=Object.assign({},t,{hostNonTLS:e.wsHost+":"+e.wsPort,hostTLS:e.wsHost+":"+e.wssPort,httpPath:e.wsPath}),p=Object.assign({},h,{useTLS:!0}),d=Object.assign({},t,{hostNonTLS:e.httpHost+":"+e.httpPort,hostTLS:e.httpHost+":"+e.httpsPort,httpPath:e.httpPath}),b={loop:!0,timeout:15e3,timeoutLimit:6e4},v=new tn({lives:2,minPingDelay:1e4,maxPingDelay:e.activityTimeout}),E=new tn({lives:2,minPingDelay:1e4,maxPingDelay:e.activityTimeout}),L=c("ws","ws",3,h,v),Q=c("wss","ws",3,p,v),os=c("sockjs","sockjs",1,d),fn=c("xhr_streaming","xhr_streaming",1,d,E),ss=c("xdr_streaming","xdr_streaming",1,d,E),ln=c("xhr_polling","xhr_polling",1,d),as=c("xdr_polling","xdr_polling",1,d),pn=new ft([L],b),cs=new ft([Q],b),us=new ft([os],b),dn=new ft([new xt(Et(fn),fn,ss)],b),yn=new ft([new xt(Et(ln),ln,as)],b),gn=new ft([new xt(Et(dn),new le([dn,new Ht(yn,{delay:4e3})]),yn)],b),ye=new xt(Et(gn),gn,us),ge;return t.useTLS?ge=new le([pn,new Ht(ye,{delay:2e3})]):ge=new le([pn,new Ht(cs,{delay:2e3}),new Ht(ye,{delay:5e3})]),new $i(new to(new xt(Et(L),ge,ye)),s,{ttl:18e5,timeline:t.timeline,useTLS:t.useTLS})},no=eo,ro=function(){var e=this;e.timeline.info(e.buildTimelineMessage({transport:e.name+(e.options.useTLS?"s":"")})),e.hooks.isInitialized()?e.changeState("initialized"):e.hooks.file?(e.changeState("initializing"),w.load(e.hooks.file,{useTLS:e.options.useTLS},function(t,n){e.hooks.isInitialized()?(e.changeState("initialized"),n(!0)):(t&amp;&amp;e.onError(t),e.onClose(),n(!1))})):e.onClose()},oo={getRequest:function(e){var t=new window.XDomainRequest;return t.ontimeout=function(){e.emit("error",new q),e.close()},t.onerror=function(n){e.emit("error",n),e.close()},t.onprogress=function(){t.responseText&amp;&amp;t.responseText.length&gt;0&amp;&amp;e.onChunk(200,t.responseText)},t.onload=function(){t.responseText&amp;&amp;t.responseText.length&gt;0&amp;&amp;e.onChunk(200,t.responseText),e.emit("finished",200),e.close()},t},abortRequest:function(e){e.ontimeout=e.onerror=e.onprogress=e.onload=null,e.abort()}},so=oo,ao=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(s,c){s.__proto__=c}||function(s,c){for(var h in c)c.hasOwnProperty(h)&amp;&amp;(s[h]=c[h])},e(t,n)};return function(t,n){e(t,n);function s(){this.constructor=t}t.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)}}(),co=256*1024,uo=function(e){ao(t,e);function t(n,s,c){var h=e.call(this)||this;return h.hooks=n,h.method=s,h.url=c,h}return t.prototype.start=function(n){var s=this;this.position=0,this.xhr=this.hooks.getRequest(this),this.unloader=function(){s.close()},C.addUnloadListener(this.unloader),this.xhr.open(this.method,this.url,!0),this.xhr.setRequestHeader&amp;&amp;this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.send(n)},t.prototype.close=function(){this.unloader&amp;&amp;(C.removeUnloadListener(this.unloader),this.unloader=null),this.xhr&amp;&amp;(this.hooks.abortRequest(this.xhr),this.xhr=null)},t.prototype.onChunk=function(n,s){for(;;){var c=this.advanceBuffer(s);if(c)this.emit("chunk",{status:n,data:c});else break}this.isBufferTooLong(s)&amp;&amp;this.emit("buffer_too_long")},t.prototype.advanceBuffer=function(n){var s=n.slice(this.position),c=s.indexOf(`
`);return c!==-1?(this.position+=c+1,s.slice(0,c)):null},t.prototype.isBufferTooLong=function(n){return this.position===n.length&amp;&amp;n.length&gt;co},t}(et),ho=uo,nn=function(e){return e[e.CONNECTING=0]="CONNECTING",e[e.OPEN=1]="OPEN",e[e.CLOSED=3]="CLOSED",e}(nn||{}),lt=nn,fo=1,lo=function(){function e(t,n){this.hooks=t,this.session=on(1e3)+"/"+vo(8),this.location=po(n),this.readyState=lt.CONNECTING,this.openStream()}return e.prototype.send=function(t){return this.sendRaw(JSON.stringify([t]))},e.prototype.ping=function(){this.hooks.sendHeartbeat(this)},e.prototype.close=function(t,n){this.onClose(t,n,!0)},e.prototype.sendRaw=function(t){if(this.readyState===lt.OPEN)try{return C.createSocketRequest("POST",rn(yo(this.location,this.session))).start(t),!0}catch{return!1}else return!1},e.prototype.reconnect=function(){this.closeStream(),this.openStream()},e.prototype.onClose=function(t,n,s){this.closeStream(),this.readyState=lt.CLOSED,this.onclose&amp;&amp;this.onclose({code:t,reason:n,wasClean:s})},e.prototype.onChunk=function(t){if(t.status===200){this.readyState===lt.OPEN&amp;&amp;this.onActivity();var n,s=t.data.slice(0,1);switch(s){case"o":n=JSON.parse(t.data.slice(1)||"{}"),this.onOpen(n);break;case"a":n=JSON.parse(t.data.slice(1)||"[]");for(var c=0;c&lt;n.length;c++)this.onEvent(n[c]);break;case"m":n=JSON.parse(t.data.slice(1)||"null"),this.onEvent(n);break;case"h":this.hooks.onHeartbeat(this);break;case"c":n=JSON.parse(t.data.slice(1)||"[]"),this.onClose(n[0],n[1],!0);break}}},e.prototype.onOpen=function(t){this.readyState===lt.CONNECTING?(t&amp;&amp;t.hostname&amp;&amp;(this.location.base=go(this.location.base,t.hostname)),this.readyState=lt.OPEN,this.onopen&amp;&amp;this.onopen()):this.onClose(1006,"Server lost session",!0)},e.prototype.onEvent=function(t){this.readyState===lt.OPEN&amp;&amp;this.onmessage&amp;&amp;this.onmessage({data:t})},e.prototype.onActivity=function(){this.onactivity&amp;&amp;this.onactivity()},e.prototype.onError=function(t){this.onerror&amp;&amp;this.onerror(t)},e.prototype.openStream=function(){var t=this;this.stream=C.createSocketRequest("POST",rn(this.hooks.getReceiveURL(this.location,this.session))),this.stream.bind("chunk",function(n){t.onChunk(n)}),this.stream.bind("finished",function(n){t.hooks.onFinished(t,n)}),this.stream.bind("buffer_too_long",function(){t.reconnect()});try{this.stream.start()}catch(n){U.defer(function(){t.onError(n),t.onClose(1006,"Could not start streaming",!1)})}},e.prototype.closeStream=function(){this.stream&amp;&amp;(this.stream.unbind_all(),this.stream.close(),this.stream=null)},e}();function po(e){var t=/([^\?]*)\/*(\??.*)/.exec(e);return{base:t[1],queryString:t[2]}}function yo(e,t){return e.base+"/"+t+"/xhr_send"}function rn(e){var t=e.indexOf("?")===-1?"?":"&amp;";return e+t+"t="+ +new Date+"&amp;n="+fo++}function go(e,t){var n=/(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(e);return n[1]+t+n[3]}function on(e){return C.randomInt(e)}function vo(e){for(var t=[],n=0;n&lt;e;n++)t.push(on(32).toString(32));return t.join("")}var mo=lo,_o={getReceiveURL:function(e,t){return e.base+"/"+t+"/xhr_streaming"+e.queryString},onHeartbeat:function(e){e.sendRaw("[]")},sendHeartbeat:function(e){e.sendRaw("[]")},onFinished:function(e,t){e.onClose(1006,"Connection interrupted ("+t+")",!1)}},bo=_o,wo={getReceiveURL:function(e,t){return e.base+"/"+t+"/xhr"+e.queryString},onHeartbeat:function(){},sendHeartbeat:function(e){e.sendRaw("[]")},onFinished:function(e,t){t===200?e.reconnect():e.onClose(1006,"Connection interrupted ("+t+")",!1)}},ko=wo,So={getRequest:function(e){var t=C.getXHRAPI(),n=new t;return n.onreadystatechange=n.onprogress=function(){switch(n.readyState){case 3:n.responseText&amp;&amp;n.responseText.length&gt;0&amp;&amp;e.onChunk(n.status,n.responseText);break;case 4:n.responseText&amp;&amp;n.responseText.length&gt;0&amp;&amp;e.onChunk(n.status,n.responseText),e.emit("finished",n.status),e.close();break}},n},abortRequest:function(e){e.onreadystatechange=null,e.abort()}},Co=So,To={createStreamingSocket:function(e){return this.createSocket(bo,e)},createPollingSocket:function(e){return this.createSocket(ko,e)},createSocket:function(e,t){return new mo(e,t)},createXHR:function(e,t){return this.createRequest(Co,e,t)},createRequest:function(e,t,n){return new ho(e,t,n)}},sn=To;sn.createXDR=function(e,t){return this.createRequest(so,e,t)};var xo=sn,Eo={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:a,DependenciesReceivers:T,getDefaultStrategy:no,Transports:si,transportConnectionInitializer:ro,HTTPFactory:xo,TimelineTransport:Mr,getXHRAPI:function(){return window.XMLHttpRequest},getWebSocketAPI:function(){return window.WebSocket||window.MozWebSocket},setup:function(e){var t=this;window.Pusher=e;var n=function(){t.onDocumentBody(e.ready)};window.JSON?n():w.load("json2",{},n)},getDocument:function(){return document},getProtocol:function(){return this.getDocument().location.protocol},getAuthorizers:function(){return{ajax:lr,jsonp:Br}},onDocumentBody:function(e){var t=this;document.body?e():setTimeout(function(){t.onDocumentBody(e)},0)},createJSONPRequest:function(e,t){return new Ur(e,t)},createScriptRequest:function(e){return new Dr(e)},getLocalStorage:function(){try{return window.localStorage}catch{return}},createXHR:function(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest:function(){var e=this.getXHRAPI();return new e},createMicrosoftXHR:function(){return new ActiveXObject("Microsoft.XMLHTTP")},getNetwork:function(){return ui},createWebSocket:function(e){var t=this.getWebSocketAPI();return new t(e)},createSocketRequest:function(e,t){if(this.isXHRSupported())return this.HTTPFactory.createXHR(e,t);if(this.isXDRSupported(t.indexOf("https:")===0))return this.HTTPFactory.createXDR(e,t);throw"Cross-origin HTTP requests are not supported"},isXHRSupported:function(){var e=this.getXHRAPI();return!!e&amp;&amp;new e().withCredentials!==void 0},isXDRSupported:function(e){var t=e?"https:":"http:",n=this.getProtocol();return!!window.XDomainRequest&amp;&amp;n===t},addUnloadListener:function(e){window.addEventListener!==void 0?window.addEventListener("unload",e,!1):window.attachEvent!==void 0&amp;&amp;window.attachEvent("onunload",e)},removeUnloadListener:function(e){window.addEventListener!==void 0?window.removeEventListener("unload",e,!1):window.detachEvent!==void 0&amp;&amp;window.detachEvent("onunload",e)},randomInt:function(e){var t=function(){var n=window.crypto||window.msCrypto,s=n.getRandomValues(new Uint32Array(1))[0];return s/Math.pow(2,32)};return Math.floor(t()*e)}},C=Eo,an=function(e){return e[e.ERROR=3]="ERROR",e[e.INFO=6]="INFO",e[e.DEBUG=7]="DEBUG",e}(an||{}),Mt=an,Po=function(){function e(t,n,s){this.key=t,this.session=n,this.events=[],this.options=s||{},this.sent=0,this.uniqueID=0}return e.prototype.log=function(t,n){t&lt;=this.options.level&amp;&amp;(this.events.push(z({},n,{timestamp:U.now()})),this.options.limit&amp;&amp;this.events.length&gt;this.options.limit&amp;&amp;this.events.shift())},e.prototype.error=function(t){this.log(Mt.ERROR,t)},e.prototype.info=function(t){this.log(Mt.INFO,t)},e.prototype.debug=function(t){this.log(Mt.DEBUG,t)},e.prototype.isEmpty=function(){return this.events.length===0},e.prototype.send=function(t,n){var s=this,c=z({session:this.session,bundle:this.sent+1,key:this.key,lib:"js",version:this.options.version,cluster:this.options.cluster,features:this.options.features,timeline:this.events},this.options.params);return this.events=[],t(c,function(h,p){h||s.sent++,n&amp;&amp;n(h,p)}),!0},e.prototype.generateUniqueID=function(){return this.uniqueID++,this.uniqueID},e}(),Oo=Po,Ao=function(){function e(t,n,s,c){this.name=t,this.priority=n,this.transport=s,this.options=c||{}}return e.prototype.isSupported=function(){return this.transport.isSupported({useTLS:this.options.useTLS})},e.prototype.connect=function(t,n){var s=this;if(this.isSupported()){if(this.priority&lt;t)return cn(new H,n)}else return cn(new $,n);var c=!1,h=this.transport.createConnection(this.name,this.priority,this.options.key,this.options),p=null,d=function(){h.unbind("initialized",d),h.connect()},b=function(){p=nt.createHandshake(h,function(Q){c=!0,L(),n(null,Q)})},v=function(Q){L(),n(Q)},E=function(){L();var Q;Q=Ut(h),n(new J(Q))},L=function(){h.unbind("initialized",d),h.unbind("open",b),h.unbind("error",v),h.unbind("closed",E)};return h.bind("initialized",d),h.bind("open",b),h.bind("error",v),h.bind("closed",E),h.initialize(),{abort:function(){c||(L(),p?p.close():h.close())},forceMinPriority:function(Q){c||s.priority&lt;Q&amp;&amp;(p?p.close():h.close())}}},e}(),Ro=Ao;function cn(e,t){return U.defer(function(){t(e)}),{abort:function(){},forceMinPriority:function(){}}}var No=C.Transports,Lo=function(e,t,n,s,c,h){var p=No[n];if(!p)throw new G(n);var d=(!e.enabledTransports||Me(e.enabledTransports,t)!==-1)&amp;&amp;(!e.disabledTransports||Me(e.disabledTransports,t)===-1),b;return d?(c=Object.assign({ignoreNullOrigin:e.ignoreNullOrigin},c),b=new Ro(t,s,h?h.getAssistant(p):p,c)):b=Io,b},Io={isSupported:function(){return!1},connect:function(e,t){var n=U.defer(function(){t(new $)});return{abort:function(){n.ensureAborted()},forceMinPriority:function(){}}}},Bo=function(e,t){var n="socket_id="+encodeURIComponent(e.socketId);for(var s in t.params)n+="&amp;"+encodeURIComponent(s)+"="+encodeURIComponent(t.params[s]);if(t.paramsProvider!=null){var c=t.paramsProvider();for(var s in c)n+="&amp;"+encodeURIComponent(s)+"="+encodeURIComponent(c[s])}return n},jo=function(e){if(typeof C.getAuthorizers()[e.transport]&gt;"u")throw"'"+e.transport+"' is not a recognized auth transport";return function(t,n){var s=Bo(t,e);C.getAuthorizers()[e.transport](C,s,e,y.UserAuthentication,n)}},Do=jo,qo=function(e,t){var n="socket_id="+encodeURIComponent(e.socketId);n+="&amp;channel_name="+encodeURIComponent(e.channelName);for(var s in t.params)n+="&amp;"+encodeURIComponent(s)+"="+encodeURIComponent(t.params[s]);if(t.paramsProvider!=null){var c=t.paramsProvider();for(var s in c)n+="&amp;"+encodeURIComponent(s)+"="+encodeURIComponent(c[s])}return n},Uo=function(e){if(typeof C.getAuthorizers()[e.transport]&gt;"u")throw"'"+e.transport+"' is not a recognized auth transport";return function(t,n){var s=qo(t,e);C.getAuthorizers()[e.transport](C,s,e,y.ChannelAuthorization,n)}},Fo=Uo,Ho=function(e,t,n){var s={authTransport:t.transport,authEndpoint:t.endpoint,auth:{params:t.params,headers:t.headers}};return function(c,h){var p=e.channel(c.channelName),d=n(p,s);d.authorize(c.socketId,h)}},gt=function(){return gt=Object.assign||function(e){for(var t,n=1,s=arguments.length;n&lt;s;n++){t=arguments[n];for(var c in t)Object.prototype.hasOwnProperty.call(t,c)&amp;&amp;(e[c]=t[c])}return e},gt.apply(this,arguments)};function Mo(e,t){var n={activityTimeout:e.activityTimeout||l.activityTimeout,cluster:e.cluster||l.cluster,httpPath:e.httpPath||l.httpPath,httpPort:e.httpPort||l.httpPort,httpsPort:e.httpsPort||l.httpsPort,pongTimeout:e.pongTimeout||l.pongTimeout,statsHost:e.statsHost||l.stats_host,unavailableTimeout:e.unavailableTimeout||l.unavailableTimeout,wsPath:e.wsPath||l.wsPath,wsPort:e.wsPort||l.wsPort,wssPort:e.wssPort||l.wssPort,enableStats:Xo(e),httpHost:zo(e),useTLS:Wo(e),wsHost:Vo(e),userAuthenticator:Jo(e),channelAuthorizer:Ko(e,t)};return"disabledTransports"in e&amp;&amp;(n.disabledTransports=e.disabledTransports),"enabledTransports"in e&amp;&amp;(n.enabledTransports=e.enabledTransports),"ignoreNullOrigin"in e&amp;&amp;(n.ignoreNullOrigin=e.ignoreNullOrigin),"timelineParams"in e&amp;&amp;(n.timelineParams=e.timelineParams),"nacl"in e&amp;&amp;(n.nacl=e.nacl),n}function zo(e){return e.httpHost?e.httpHost:e.cluster?"sockjs-"+e.cluster+".pusher.com":l.httpHost}function Vo(e){return e.wsHost?e.wsHost:e.cluster?un(e.cluster):un(l.cluster)}function un(e){return"ws-"+e+".pusher.com"}function Wo(e){return C.getProtocol()==="https:"?!0:e.forceTLS!==!1}function Xo(e){return"enableStats"in e?e.enableStats:"disableStats"in e?!e.disableStats:!1}function Jo(e){var t=gt(gt({},l.userAuthentication),e.userAuthentication);return"customHandler"in t&amp;&amp;t.customHandler!=null?t.customHandler:Do(t)}function $o(e,t){var n;return"channelAuthorization"in e?n=gt(gt({},l.channelAuthorization),e.channelAuthorization):(n={transport:e.authTransport||l.authTransport,endpoint:e.authEndpoint||l.authEndpoint},"auth"in e&amp;&amp;("params"in e.auth&amp;&amp;(n.params=e.auth.params),"headers"in e.auth&amp;&amp;(n.headers=e.auth.headers)),"authorizer"in e&amp;&amp;(n.customHandler=Ho(t,n,e.authorizer))),n}function Ko(e,t){var n=$o(e,t);return"customHandler"in n&amp;&amp;n.customHandler!=null?n.customHandler:Fo(n)}var Go=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(s,c){s.__proto__=c}||function(s,c){for(var h in c)c.hasOwnProperty(h)&amp;&amp;(s[h]=c[h])},e(t,n)};return function(t,n){e(t,n);function s(){this.constructor=t}t.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)}}(),Yo=function(e){Go(t,e);function t(n){var s=e.call(this,function(c,h){N.debug("No callbacks on watchlist events for "+c)})||this;return s.pusher=n,s.bindWatchlistInternalEvent(),s}return t.prototype.handleEvent=function(n){var s=this;n.data.events.forEach(function(c){s.emit(c.name,c)})},t.prototype.bindWatchlistInternalEvent=function(){var n=this;this.pusher.connection.bind("message",function(s){var c=s.event;c==="pusher_internal:watchlist_events"&amp;&amp;n.handleEvent(s)})},t}(et),Qo=Yo;function Zo(){var e,t,n=new Promise(function(s,c){e=s,t=c});return{promise:n,resolve:e,reject:t}}var ts=Zo,es=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(s,c){s.__proto__=c}||function(s,c){for(var h in c)c.hasOwnProperty(h)&amp;&amp;(s[h]=c[h])},e(t,n)};return function(t,n){e(t,n);function s(){this.constructor=t}t.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)}}(),ns=function(e){es(t,e);function t(n){var s=e.call(this,function(c,h){N.debug("No callbacks on user for "+c)})||this;return s.signin_requested=!1,s.user_data=null,s.serverToUserChannel=null,s.signinDonePromise=null,s._signinDoneResolve=null,s._onAuthorize=function(c,h){if(c){N.warn("Error during signin: "+c),s._cleanup();return}s.pusher.send_event("pusher:signin",{auth:h.auth,user_data:h.user_data})},s.pusher=n,s.pusher.connection.bind("state_change",function(c){var h=c.previous,p=c.current;h!=="connected"&amp;&amp;p==="connected"&amp;&amp;s._signin(),h==="connected"&amp;&amp;p!=="connected"&amp;&amp;(s._cleanup(),s._newSigninPromiseIfNeeded())}),s.watchlist=new Qo(n),s.pusher.connection.bind("message",function(c){var h=c.event;h==="pusher:signin_success"&amp;&amp;s._onSigninSuccess(c.data),s.serverToUserChannel&amp;&amp;s.serverToUserChannel.name===c.channel&amp;&amp;s.serverToUserChannel.handleEvent(c)}),s}return t.prototype.signin=function(){this.signin_requested||(this.signin_requested=!0,this._signin())},t.prototype._signin=function(){this.signin_requested&amp;&amp;(this._newSigninPromiseIfNeeded(),this.pusher.connection.state==="connected"&amp;&amp;this.pusher.config.userAuthenticator({socketId:this.pusher.connection.socket_id},this._onAuthorize))},t.prototype._onSigninSuccess=function(n){try{this.user_data=JSON.parse(n.user_data)}catch{N.error("Failed parsing user data after signin: "+n.user_data),this._cleanup();return}if(typeof this.user_data.id!="string"||this.user_data.id===""){N.error("user_data doesn't contain an id. user_data: "+this.user_data),this._cleanup();return}this._signinDoneResolve(),this._subscribeChannels()},t.prototype._subscribeChannels=function(){var n=this,s=function(c){c.subscriptionPending&amp;&amp;c.subscriptionCancelled?c.reinstateSubscription():!c.subscriptionPending&amp;&amp;n.pusher.connection.state==="connected"&amp;&amp;c.subscribe()};this.serverToUserChannel=new ue("#server-to-user-"+this.user_data.id,this.pusher),this.serverToUserChannel.bind_global(function(c,h){c.indexOf("pusher_internal:")===0||c.indexOf("pusher:")===0||n.emit(c,h)}),s(this.serverToUserChannel)},t.prototype._cleanup=function(){this.user_data=null,this.serverToUserChannel&amp;&amp;(this.serverToUserChannel.unbind_all(),this.serverToUserChannel.disconnect(),this.serverToUserChannel=null),this.signin_requested&amp;&amp;this._signinDoneResolve()},t.prototype._newSigninPromiseIfNeeded=function(){if(this.signin_requested&amp;&amp;!(this.signinDonePromise&amp;&amp;!this.signinDonePromise.done)){var n=ts(),s=n.promise,c=n.resolve,h=n.reject;s.done=!1;var p=function(){s.done=!0};s.then(p).catch(p),this.signinDonePromise=s,this._signinDoneResolve=c}},t}(et),rs=ns,hn=function(){function e(t,n){var s=this;if(is(t),n=n||{},!n.cluster&amp;&amp;!(n.wsHost||n.httpHost)){var c=k.buildLogSuffix("javascriptQuickStart");N.warn("You should always specify a cluster when connecting. "+c)}"disableStats"in n&amp;&amp;N.warn("The disableStats option is deprecated in favor of enableStats"),this.key=t,this.config=Mo(n,this),this.channels=nt.createChannels(),this.global_emitter=new et,this.sessionID=C.randomInt(1e9),this.timeline=new Oo(this.key,this.sessionID,{cluster:this.config.cluster,features:e.getClientFeatures(),params:this.config.timelineParams||{},limit:50,level:Mt.INFO,version:l.VERSION}),this.config.enableStats&amp;&amp;(this.timelineSender=nt.createTimelineSender(this.timeline,{host:this.config.statsHost,path:"/timeline/v2/"+C.TimelineTransport.name}));var h=function(p){return C.getDefaultStrategy(s.config,p,Lo)};this.connection=nt.createConnectionManager(this.key,{getStrategy:h,timeline:this.timeline,activityTimeout:this.config.activityTimeout,pongTimeout:this.config.pongTimeout,unavailableTimeout:this.config.unavailableTimeout,useTLS:!!this.config.useTLS}),this.connection.bind("connected",function(){s.subscribeAll(),s.timelineSender&amp;&amp;s.timelineSender.send(s.connection.isUsingTLS())}),this.connection.bind("message",function(p){var d=p.event,b=d.indexOf("pusher_internal:")===0;if(p.channel){var v=s.channel(p.channel);v&amp;&amp;v.handleEvent(p)}b||s.global_emitter.emit(p.event,p.data)}),this.connection.bind("connecting",function(){s.channels.disconnect()}),this.connection.bind("disconnected",function(){s.channels.disconnect()}),this.connection.bind("error",function(p){N.warn(p)}),e.instances.push(this),this.timeline.info({instances:e.instances.length}),this.user=new rs(this),e.isReady&amp;&amp;this.connect()}return e.ready=function(){e.isReady=!0;for(var t=0,n=e.instances.length;t&lt;n;t++)e.instances[t].connect()},e.getClientFeatures=function(){return ze(Xe({ws:C.Transports.ws},function(t){return t.isSupported({})}))},e.prototype.channel=function(t){return this.channels.find(t)},e.prototype.allChannels=function(){return this.channels.all()},e.prototype.connect=function(){if(this.connection.connect(),this.timelineSender&amp;&amp;!this.timelineSenderTimer){var t=this.connection.isUsingTLS(),n=this.timelineSender;this.timelineSenderTimer=new Sr(6e4,function(){n.send(t)})}},e.prototype.disconnect=function(){this.connection.disconnect(),this.timelineSenderTimer&amp;&amp;(this.timelineSenderTimer.ensureAborted(),this.timelineSenderTimer=null)},e.prototype.bind=function(t,n,s){return this.global_emitter.bind(t,n,s),this},e.prototype.unbind=function(t,n,s){return this.global_emitter.unbind(t,n,s),this},e.prototype.bind_global=function(t){return this.global_emitter.bind_global(t),this},e.prototype.unbind_global=function(t){return this.global_emitter.unbind_global(t),this},e.prototype.unbind_all=function(t){return this.global_emitter.unbind_all(),this},e.prototype.subscribeAll=function(){var t;for(t in this.channels.channels)this.channels.channels.hasOwnProperty(t)&amp;&amp;this.subscribe(t)},e.prototype.subscribe=function(t){var n=this.channels.add(t,this);return n.subscriptionPending&amp;&amp;n.subscriptionCancelled?n.reinstateSubscription():!n.subscriptionPending&amp;&amp;this.connection.state==="connected"&amp;&amp;n.subscribe(),n},e.prototype.unsubscribe=function(t){var n=this.channels.find(t);n&amp;&amp;n.subscriptionPending?n.cancelSubscription():(n=this.channels.remove(t),n&amp;&amp;n.subscribed&amp;&amp;n.unsubscribe())},e.prototype.send_event=function(t,n,s){return this.connection.send_event(t,n,s)},e.prototype.shouldUseTLS=function(){return this.config.useTLS},e.prototype.signin=function(){this.user.signin()},e.instances=[],e.isReady=!1,e.logToConsole=!1,e.Runtime=C,e.ScriptReceivers=C.ScriptReceivers,e.DependenciesReceivers=C.DependenciesReceivers,e.auth_callbacks=C.auth_callbacks,e}(),de=i.default=hn;function is(e){if(e==null)throw"You must pass your app key when you instantiate Pusher."}C.setup(hn)}])})});var K=Object.create(null);K.open="0";K.close="1";K.ping="2";K.pong="3";K.message="4";K.upgrade="5";K.noop="6";var Ot=Object.create(null);Object.keys(K).forEach(u=&gt;{Ot[K[u]]=u});var At={type:"error",data:"parser error"};var On=typeof Blob=="function"||typeof Blob&lt;"u"&amp;&amp;Object.prototype.toString.call(Blob)==="[object BlobConstructor]",An=typeof ArrayBuffer=="function",Rn=u=&gt;typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(u):u&amp;&amp;u.buffer instanceof ArrayBuffer,Rt=({type:u,data:i},r,o)=&gt;On&amp;&amp;i instanceof Blob?r?o(i):En(i,o):An&amp;&amp;(i instanceof ArrayBuffer||Rn(i))?r?o(i):En(new Blob([i]),o):o(K[u]+(i||"")),En=(u,i)=&gt;{let r=new FileReader;return r.onload=function(){let o=r.result.split(",")[1];i("b"+(o||""))},r.readAsDataURL(u)};function Pn(u){return u instanceof Uint8Array?u:u instanceof ArrayBuffer?new Uint8Array(u):new Uint8Array(u.buffer,u.byteOffset,u.byteLength)}var me;function Nn(u,i){if(On&amp;&amp;u.data instanceof Blob)return u.data.arrayBuffer().then(Pn).then(i);if(An&amp;&amp;(u.data instanceof ArrayBuffer||Rn(u.data)))return i(Pn(u.data));Rt(u,!1,r=&gt;{me||(me=new TextEncoder),i(me.encode(r))})}var Ln="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Nt=typeof Uint8Array&gt;"u"?[]:new Uint8Array(256);for(let u=0;u&lt;Ln.length;u++)Nt[Ln.charCodeAt(u)]=u;var In=u=&gt;{let i=u.length*.75,r=u.length,o,a=0,f,l,m,_;u[u.length-1]==="="&amp;&amp;(i--,u[u.length-2]==="="&amp;&amp;i--);let T=new ArrayBuffer(i),w=new Uint8Array(T);for(o=0;o&lt;r;o+=4)f=Nt[u.charCodeAt(o)],l=Nt[u.charCodeAt(o+1)],m=Nt[u.charCodeAt(o+2)],_=Nt[u.charCodeAt(o+3)],w[a++]=f&lt;&lt;2|l&gt;&gt;4,w[a++]=(l&amp;15)&lt;&lt;4|m&gt;&gt;2,w[a++]=(m&amp;3)&lt;&lt;6|_&amp;63;return T};var vs=typeof ArrayBuffer=="function",Lt=(u,i)=&gt;{if(typeof u!="string")return{type:"message",data:Bn(u,i)};let r=u.charAt(0);return r==="b"?{type:"message",data:ms(u.substring(1),i)}:Ot[r]?u.length&gt;1?{type:Ot[r],data:u.substring(1)}:{type:Ot[r]}:At},ms=(u,i)=&gt;{if(vs){let r=In(u);return Bn(r,i)}else return{base64:!0,data:u}},Bn=(u,i)=&gt;{switch(i){case"blob":return u instanceof Blob?u:new Blob([u]);case"arraybuffer":default:return u instanceof ArrayBuffer?u:u.buffer}};var jn="",Dn=(u,i)=&gt;{let r=u.length,o=new Array(r),a=0;u.forEach((f,l)=&gt;{Rt(f,!1,m=&gt;{o[l]=m,++a===r&amp;&amp;i(o.join(jn))})})},qn=(u,i)=&gt;{let r=u.split(jn),o=[];for(let a=0;a&lt;r.length;a++){let f=Lt(r[a],i);if(o.push(f),f.type==="error")break}return o};function Un(){return new TransformStream({transform(u,i){Nn(u,r=&gt;{let o=r.length,a;if(o&lt;126)a=new Uint8Array(1),new DataView(a.buffer).setUint8(0,o);else if(o&lt;65536){a=new Uint8Array(3);let f=new DataView(a.buffer);f.setUint8(0,126),f.setUint16(1,o)}else{a=new Uint8Array(9);let f=new DataView(a.buffer);f.setUint8(0,127),f.setBigUint64(1,BigInt(o))}u.data&amp;&amp;typeof u.data!="string"&amp;&amp;(a[0]|=128),i.enqueue(a),i.enqueue(r)})}})}var _e;function Jt(u){return u.reduce((i,r)=&gt;i+r.length,0)}function $t(u,i){if(u[0].length===i)return u.shift();let r=new Uint8Array(i),o=0;for(let a=0;a&lt;i;a++)r[a]=u[0][o++],o===u[0].length&amp;&amp;(u.shift(),o=0);return u.length&amp;&amp;o&lt;u[0].length&amp;&amp;(u[0]=u[0].slice(o)),r}function Fn(u,i){_e||(_e=new TextDecoder);let r=[],o=0,a=-1,f=!1;return new TransformStream({transform(l,m){for(r.push(l);;){if(o===0){if(Jt(r)&lt;1)break;let _=$t(r,1);f=(_[0]&amp;128)===128,a=_[0]&amp;127,a&lt;126?o=3:a===126?o=1:o=2}else if(o===1){if(Jt(r)&lt;2)break;let _=$t(r,2);a=new DataView(_.buffer,_.byteOffset,_.length).getUint16(0),o=3}else if(o===2){if(Jt(r)&lt;8)break;let _=$t(r,8),T=new DataView(_.buffer,_.byteOffset,_.length),w=T.getUint32(0);if(w&gt;Math.pow(2,21)-1){m.enqueue(At);break}a=w*Math.pow(2,32)+T.getUint32(4),o=3}else{if(Jt(r)&lt;a)break;let _=$t(r,a);m.enqueue(Lt(f?_:_e.decode(_),i)),o=0}if(a===0||a&gt;u){m.enqueue(At);break}}}})}var be=4;function A(u){if(u)return _s(u)}function _s(u){for(var i in A.prototype)u[i]=A.prototype[i];return u}A.prototype.on=A.prototype.addEventListener=function(u,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+u]=this._callbacks["$"+u]||[]).push(i),this};A.prototype.once=function(u,i){function r(){this.off(u,r),i.apply(this,arguments)}return r.fn=i,this.on(u,r),this};A.prototype.off=A.prototype.removeListener=A.prototype.removeAllListeners=A.prototype.removeEventListener=function(u,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+u];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+u],this;for(var o,a=0;a&lt;r.length;a++)if(o=r[a],o===i||o.fn===i){r.splice(a,1);break}return r.length===0&amp;&amp;delete this._callbacks["$"+u],this};A.prototype.emit=function(u){this._callbacks=this._callbacks||{};for(var i=new Array(arguments.length-1),r=this._callbacks["$"+u],o=1;o&lt;arguments.length;o++)i[o-1]=arguments[o];if(r){r=r.slice(0);for(var o=0,a=r.length;o&lt;a;++o)r[o].apply(this,i)}return this};A.prototype.emitReserved=A.prototype.emit;A.prototype.listeners=function(u){return this._callbacks=this._callbacks||{},this._callbacks["$"+u]||[]};A.prototype.hasListeners=function(u){return!!this.listeners(u).length};var rt=typeof Promise=="function"&amp;&amp;typeof Promise.resolve=="function"?i=&gt;Promise.resolve().then(i):(i,r)=&gt;r(i,0),M=typeof self&lt;"u"?self:typeof window&lt;"u"?window:Function("return this")(),Hn="arraybuffer";function Kt(u,...i){return i.reduce((r,o)=&gt;(u.hasOwnProperty(o)&amp;&amp;(r[o]=u[o]),r),{})}var bs=M.setTimeout,ws=M.clearTimeout;function it(u,i){i.useNativeTimers?(u.setTimeoutFn=bs.bind(M),u.clearTimeoutFn=ws.bind(M)):(u.setTimeoutFn=M.setTimeout.bind(M),u.clearTimeoutFn=M.clearTimeout.bind(M))}var ks=1.33;function Mn(u){return typeof u=="string"?Ss(u):Math.ceil((u.byteLength||u.size)*ks)}function Ss(u){let i=0,r=0;for(let o=0,a=u.length;o&lt;a;o++)i=u.charCodeAt(o),i&lt;128?r+=1:i&lt;2048?r+=2:i&lt;55296||i&gt;=57344?r+=3:(o++,r+=4);return r}function Gt(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function zn(u){let i="";for(let r in u)u.hasOwnProperty(r)&amp;&amp;(i.length&amp;&amp;(i+="&amp;"),i+=encodeURIComponent(r)+"="+encodeURIComponent(u[r]));return i}function Vn(u){let i={},r=u.split("&amp;");for(let o=0,a=r.length;o&lt;a;o++){let f=r[o].split("=");i[decodeURIComponent(f[0])]=decodeURIComponent(f[1])}return i}var Yt=class extends Error{constructor(i,r,o){super(i),this.description=r,this.context=o,this.type="TransportError"}},ot=class extends A{constructor(i){super(),this.writable=!1,it(this,i),this.opts=i,this.query=i.query,this.socket=i.socket,this.supportsBinary=!i.forceBase64}onError(i,r,o){return super.emitReserved("error",new Yt(i,r,o)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&amp;&amp;(this.doClose(),this.onClose()),this}send(i){this.readyState==="open"&amp;&amp;this.write(i)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(i){let r=Lt(i,this.socket.binaryType);this.onPacket(r)}onPacket(i){super.emitReserved("packet",i)}onClose(i){this.readyState="closed",super.emitReserved("close",i)}pause(i){}createUri(i,r={}){return i+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_hostname(){let i=this.opts.hostname;return i.indexOf(":")===-1?i:"["+i+"]"}_port(){return this.opts.port&amp;&amp;(this.opts.secure&amp;&amp;+(this.opts.port!==443)||!this.opts.secure&amp;&amp;Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(i){let r=zn(i);return r.length?"?"+r:""}};var It=class extends ot{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(i){this.readyState="pausing";let r=()=&gt;{this.readyState="paused",i()};if(this._polling||!this.writable){let o=0;this._polling&amp;&amp;(o++,this.once("pollComplete",function(){--o||r()})),this.writable||(o++,this.once("drain",function(){--o||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(i){let r=o=&gt;{if(this.readyState==="opening"&amp;&amp;o.type==="open"&amp;&amp;this.onOpen(),o.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(o)};qn(i,this.socket.binaryType).forEach(r),this.readyState!=="closed"&amp;&amp;(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&amp;&amp;this._poll())}doClose(){let i=()=&gt;{this.write([{type:"close"}])};this.readyState==="open"?i():this.once("open",i)}write(i){this.writable=!1,Dn(i,r=&gt;{this.doWrite(r,()=&gt;{this.writable=!0,this.emitReserved("drain")})})}uri(){let i=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&amp;&amp;(r[this.opts.timestampParam]=Gt()),!this.supportsBinary&amp;&amp;!r.sid&amp;&amp;(r.b64=1),this.createUri(i,r)}};var Wn=!1;try{Wn=typeof XMLHttpRequest&lt;"u"&amp;&amp;"withCredentials"in new XMLHttpRequest}catch{}var Xn=Wn;function Cs(){}var we=class extends It{constructor(i){if(super(i),typeof location&lt;"u"){let r=location.protocol==="https:",o=location.port;o||(o=r?"443":"80"),this.xd=typeof location&lt;"u"&amp;&amp;i.hostname!==location.hostname||o!==i.port}}doWrite(i,r){let o=this.request({method:"POST",data:i});o.on("success",r),o.on("error",(a,f)=&gt;{this.onError("xhr post error",a,f)})}doPoll(){let i=this.request();i.on("data",this.onData.bind(this)),i.on("error",(r,o)=&gt;{this.onError("xhr poll error",r,o)}),this.pollXhr=i}},Qt=(()=&gt;{class u extends A{constructor(r,o,a){super(),this.createRequest=r,it(this,a),this._opts=a,this._method=a.method||"GET",this._uri=o,this._data=a.data!==void 0?a.data:null,this._create()}_create(){var r;let o=Kt(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");o.xdomain=!!this._opts.xd;let a=this._xhr=this.createRequest(o);try{a.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){a.setDisableHeaderCheck&amp;&amp;a.setDisableHeaderCheck(!0);for(let f in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(f)&amp;&amp;a.setRequestHeader(f,this._opts.extraHeaders[f])}}catch{}if(this._method==="POST")try{a.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{a.setRequestHeader("Accept","*/*")}catch{}(r=this._opts.cookieJar)===null||r===void 0||r.addCookies(a),"withCredentials"in a&amp;&amp;(a.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&amp;&amp;(a.timeout=this._opts.requestTimeout),a.onreadystatechange=()=&gt;{var f;a.readyState===3&amp;&amp;((f=this._opts.cookieJar)===null||f===void 0||f.parseCookies(a.getResponseHeader("set-cookie"))),a.readyState===4&amp;&amp;(a.status===200||a.status===1223?this._onLoad():this.setTimeoutFn(()=&gt;{this._onError(typeof a.status=="number"?a.status:0)},0))},a.send(this._data)}catch(f){this.setTimeoutFn(()=&gt;{this._onError(f)},0);return}typeof document&lt;"u"&amp;&amp;(this._index=u.requestsCount++,u.requests[this._index]=this)}_onError(r){this.emitReserved("error",r,this._xhr),this._cleanup(!0)}_cleanup(r){if(!(typeof this._xhr&gt;"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Cs,r)try{this._xhr.abort()}catch{}typeof document&lt;"u"&amp;&amp;delete u.requests[this._index],this._xhr=null}}_onLoad(){let r=this._xhr.responseText;r!==null&amp;&amp;(this.emitReserved("data",r),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}return u.requestsCount=0,u.requests={},u})();if(typeof document&lt;"u"){if(typeof attachEvent=="function")attachEvent("onunload",Jn);else if(typeof addEventListener=="function"){let u="onpagehide"in M?"pagehide":"unload";addEventListener(u,Jn,!1)}}function Jn(){for(let u in Qt.requests)Qt.requests.hasOwnProperty(u)&amp;&amp;Qt.requests[u].abort()}var Ts=function(){let u=$n({xdomain:!1});return u&amp;&amp;u.responseType!==null}(),at=class extends we{constructor(i){super(i);let r=i&amp;&amp;i.forceBase64;this.supportsBinary=Ts&amp;&amp;!r}request(i={}){return Object.assign(i,{xd:this.xd},this.opts),new Qt($n,this.uri(),i)}};function $n(u){let i=u.xdomain;try{if(typeof XMLHttpRequest&lt;"u"&amp;&amp;(!i||Xn))return new XMLHttpRequest}catch{}if(!i)try{return new M[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var Kn=typeof navigator&lt;"u"&amp;&amp;typeof navigator.product=="string"&amp;&amp;navigator.product.toLowerCase()==="reactnative",Se=class extends ot{get name(){return"websocket"}doOpen(){let i=this.uri(),r=this.opts.protocols,o=Kn?{}:Kt(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&amp;&amp;(o.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(i,r,o)}catch(a){return this.emitReserved("error",a)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=&gt;{this.opts.autoUnref&amp;&amp;this.ws._socket.unref(),this.onOpen()},this.ws.onclose=i=&gt;this.onClose({description:"websocket connection closed",context:i}),this.ws.onmessage=i=&gt;this.onData(i.data),this.ws.onerror=i=&gt;this.onError("websocket error",i)}write(i){this.writable=!1;for(let r=0;r&lt;i.length;r++){let o=i[r],a=r===i.length-1;Rt(o,this.supportsBinary,f=&gt;{try{this.doWrite(o,f)}catch{}a&amp;&amp;rt(()=&gt;{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws&lt;"u"&amp;&amp;(this.ws.onerror=()=&gt;{},this.ws.close(),this.ws=null)}uri(){let i=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&amp;&amp;(r[this.opts.timestampParam]=Gt()),this.supportsBinary||(r.b64=1),this.createUri(i,r)}},ke=M.WebSocket||M.MozWebSocket,ct=class extends Se{createSocket(i,r,o){return Kn?new ke(i,r,o):r?new ke(i,r):new ke(i)}doWrite(i,r){this.ws.send(r)}};var mt=class extends ot{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(i){return this.emitReserved("error",i)}this._transport.closed.then(()=&gt;{this.onClose()}).catch(i=&gt;{this.onError("webtransport error",i)}),this._transport.ready.then(()=&gt;{this._transport.createBidirectionalStream().then(i=&gt;{let r=Fn(Number.MAX_SAFE_INTEGER,this.socket.binaryType),o=i.readable.pipeThrough(r).getReader(),a=Un();a.readable.pipeTo(i.writable),this._writer=a.writable.getWriter();let f=()=&gt;{o.read().then(({done:m,value:_})=&gt;{m||(this.onPacket(_),f())}).catch(m=&gt;{})};f();let l={type:"open"};this.query.sid&amp;&amp;(l.data=`{"sid":"${this.query.sid}"}`),this._writer.write(l).then(()=&gt;this.onOpen())})})}write(i){this.writable=!1;for(let r=0;r&lt;i.length;r++){let o=i[r],a=r===i.length-1;this._writer.write(o).then(()=&gt;{a&amp;&amp;rt(()=&gt;{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var i;(i=this._transport)===null||i===void 0||i.close()}};var Ce={websocket:ct,webtransport:mt,polling:at};var xs=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Es=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function _t(u){if(u.length&gt;8e3)throw"URI too long";let i=u,r=u.indexOf("["),o=u.indexOf("]");r!=-1&amp;&amp;o!=-1&amp;&amp;(u=u.substring(0,r)+u.substring(r,o).replace(/:/g,";")+u.substring(o,u.length));let a=xs.exec(u||""),f={},l=14;for(;l--;)f[Es[l]]=a[l]||"";return r!=-1&amp;&amp;o!=-1&amp;&amp;(f.source=i,f.host=f.host.substring(1,f.host.length-1).replace(/;/g,":"),f.authority=f.authority.replace("[","").replace("]","").replace(/;/g,":"),f.ipv6uri=!0),f.pathNames=Ps(f,f.path),f.queryKey=Os(f,f.query),f}function Ps(u,i){let r=/\/{2,9}/g,o=i.replace(r,"/").split("/");return(i.slice(0,1)=="/"||i.length===0)&amp;&amp;o.splice(0,1),i.slice(-1)=="/"&amp;&amp;o.splice(o.length-1,1),o}function Os(u,i){let r={};return i.replace(/(?:^|&amp;)([^&amp;=]*)=?([^&amp;]*)/g,function(o,a,f){a&amp;&amp;(r[a]=f)}),r}var Te=typeof addEventListener=="function"&amp;&amp;typeof removeEventListener=="function",Zt=[];Te&amp;&amp;addEventListener("offline",()=&gt;{Zt.forEach(u=&gt;u())},!1);var te=(()=&gt;{class u extends A{constructor(r,o){if(super(),this.binaryType=Hn,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,r&amp;&amp;typeof r=="object"&amp;&amp;(o=r,r=null),r){let a=_t(r);o.hostname=a.host,o.secure=a.protocol==="https"||a.protocol==="wss",o.port=a.port,a.query&amp;&amp;(o.query=a.query)}else o.host&amp;&amp;(o.hostname=_t(o.host).host);it(this,o),this.secure=o.secure!=null?o.secure:typeof location&lt;"u"&amp;&amp;location.protocol==="https:",o.hostname&amp;&amp;!o.port&amp;&amp;(o.port=this.secure?"443":"80"),this.hostname=o.hostname||(typeof location&lt;"u"?location.hostname:"localhost"),this.port=o.port||(typeof location&lt;"u"&amp;&amp;location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},o.transports.forEach(a=&gt;{let f=a.prototype.name;this.transports.push(f),this._transportsByName[f]=a}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},o),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&amp;&amp;(this.opts.query=Vn(this.opts.query)),Te&amp;&amp;(this.opts.closeOnBeforeunload&amp;&amp;(this._beforeunloadEventListener=()=&gt;{this.transport&amp;&amp;(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&amp;&amp;(this._offlineEventListener=()=&gt;{this._onClose("transport close",{description:"network connection lost"})},Zt.push(this._offlineEventListener))),this.opts.withCredentials&amp;&amp;(this._cookieJar=void 0),this._open()}createTransport(r){let o=Object.assign({},this.opts.query);o.EIO=be,o.transport=r,this.id&amp;&amp;(o.sid=this.id);let a=Object.assign({},this.opts,{query:o,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[r]);return new this._transportsByName[r](a)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=&gt;{this.emitReserved("error","No transports available")},0);return}let r=this.opts.rememberUpgrade&amp;&amp;u.priorWebsocketSuccess&amp;&amp;this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let o=this.createTransport(r);o.open(),this.setTransport(o)}setTransport(r){this.transport&amp;&amp;this.transport.removeAllListeners(),this.transport=r,r.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",o=&gt;this._onClose("transport close",o))}onOpen(){this.readyState="open",u.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",r),this.emitReserved("heartbeat"),r.type){case"open":this.onHandshake(JSON.parse(r.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let o=new Error("server error");o.code=r.data,this._onError(o);break;case"message":this.emitReserved("data",r.data),this.emitReserved("message",r.data);break}}onHandshake(r){this.emitReserved("handshake",r),this.id=r.sid,this.transport.query.sid=r.sid,this._pingInterval=r.pingInterval,this._pingTimeout=r.pingTimeout,this._maxPayload=r.maxPayload,this.onOpen(),this.readyState!=="closed"&amp;&amp;this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let r=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+r,this._pingTimeoutTimer=this.setTimeoutFn(()=&gt;{this._onClose("ping timeout")},r),this.opts.autoUnref&amp;&amp;this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&amp;&amp;this.transport.writable&amp;&amp;!this.upgrading&amp;&amp;this.writeBuffer.length){let r=this._getWritablePackets();this.transport.send(r),this._prevBufferLen=r.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&amp;&amp;this.transport.name==="polling"&amp;&amp;this.writeBuffer.length&gt;1))return this.writeBuffer;let o=1;for(let a=0;a&lt;this.writeBuffer.length;a++){let f=this.writeBuffer[a].data;if(f&amp;&amp;(o+=Mn(f)),a&gt;0&amp;&amp;o&gt;this._maxPayload)return this.writeBuffer.slice(0,a);o+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let r=Date.now()&gt;this._pingTimeoutTime;return r&amp;&amp;(this._pingTimeoutTime=0,rt(()=&gt;{this._onClose("ping timeout")},this.setTimeoutFn)),r}write(r,o,a){return this._sendPacket("message",r,o,a),this}send(r,o,a){return this._sendPacket("message",r,o,a),this}_sendPacket(r,o,a,f){if(typeof o=="function"&amp;&amp;(f=o,o=void 0),typeof a=="function"&amp;&amp;(f=a,a=null),this.readyState==="closing"||this.readyState==="closed")return;a=a||{},a.compress=a.compress!==!1;let l={type:r,data:o,options:a};this.emitReserved("packetCreate",l),this.writeBuffer.push(l),f&amp;&amp;this.once("flush",f),this.flush()}close(){let r=()=&gt;{this._onClose("forced close"),this.transport.close()},o=()=&gt;{this.off("upgrade",o),this.off("upgradeError",o),r()},a=()=&gt;{this.once("upgrade",o),this.once("upgradeError",o)};return(this.readyState==="opening"||this.readyState==="open")&amp;&amp;(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=&gt;{this.upgrading?a():r()}):this.upgrading?a():r()),this}_onError(r){if(u.priorWebsocketSuccess=!1,this.opts.tryAllTransports&amp;&amp;this.transports.length&gt;1&amp;&amp;this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",r),this._onClose("transport error",r)}_onClose(r,o){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Te&amp;&amp;(this._beforeunloadEventListener&amp;&amp;removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let a=Zt.indexOf(this._offlineEventListener);a!==-1&amp;&amp;Zt.splice(a,1)}this.readyState="closed",this.id=null,this.emitReserved("close",r,o),this.writeBuffer=[],this._prevBufferLen=0}}}return u.protocol=be,u})(),ee=class extends te{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&amp;&amp;this.opts.upgrade)for(let i=0;i&lt;this._upgrades.length;i++)this._probe(this._upgrades[i])}_probe(i){let r=this.createTransport(i),o=!1;te.priorWebsocketSuccess=!1;let a=()=&gt;{o||(r.send([{type:"ping",data:"probe"}]),r.once("packet",S=&gt;{if(!o)if(S.type==="pong"&amp;&amp;S.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;te.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=&gt;{o||this.readyState!=="closed"&amp;&amp;(w(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{let O=new Error("probe error");O.transport=r.name,this.emitReserved("upgradeError",O)}}))};function f(){o||(o=!0,w(),r.close(),r=null)}let l=S=&gt;{let O=new Error("probe error: "+S);O.transport=r.name,f(),this.emitReserved("upgradeError",O)};function m(){l("transport closed")}function _(){l("socket closed")}function T(S){r&amp;&amp;S.name!==r.name&amp;&amp;f()}let w=()=&gt;{r.removeListener("open",a),r.removeListener("error",l),r.removeListener("close",m),this.off("close",_),this.off("upgrading",T)};r.once("open",a),r.once("error",l),r.once("close",m),this.once("close",_),this.once("upgrading",T),this._upgrades.indexOf("webtransport")!==-1&amp;&amp;i!=="webtransport"?this.setTimeoutFn(()=&gt;{o||r.open()},200):r.open()}onHandshake(i){this._upgrades=this._filterUpgrades(i.upgrades),super.onHandshake(i)}_filterUpgrades(i){let r=[];for(let o=0;o&lt;i.length;o++)~this.transports.indexOf(i[o])&amp;&amp;r.push(i[o]);return r}},bt=class extends ee{constructor(i,r={}){let o=typeof i=="object"?i:r;(!o.transports||o.transports&amp;&amp;typeof o.transports[0]=="string")&amp;&amp;(o.transports=(o.transports||["polling","websocket","webtransport"]).map(a=&gt;Ce[a]).filter(a=&gt;!!a)),super(i,o)}};var rc=bt.protocol;function Gn(u,i="",r){let o=u;r=r||typeof location&lt;"u"&amp;&amp;location,u==null&amp;&amp;(u=r.protocol+"//"+r.host),typeof u=="string"&amp;&amp;(u.charAt(0)==="/"&amp;&amp;(u.charAt(1)==="/"?u=r.protocol+u:u=r.host+u),/^(https?|wss?):\/\//.test(u)||(typeof r&lt;"u"?u=r.protocol+"//"+u:u="https://"+u),o=_t(u)),o.port||(/^(http|ws)$/.test(o.protocol)?o.port="80":/^(http|ws)s$/.test(o.protocol)&amp;&amp;(o.port="443")),o.path=o.path||"/";let f=o.host.indexOf(":")!==-1?"["+o.host+"]":o.host;return o.id=o.protocol+"://"+f+":"+o.port+i,o.href=o.protocol+"://"+f+(r&amp;&amp;r.port===o.port?"":":"+o.port),o}var Re={};ys(Re,{Decoder:()=&gt;Oe,Encoder:()=&gt;Pe,PacketType:()=&gt;P,protocol:()=&gt;er});var Rs=typeof ArrayBuffer=="function",Ns=u=&gt;typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(u):u.buffer instanceof ArrayBuffer,Yn=Object.prototype.toString,Ls=typeof Blob=="function"||typeof Blob&lt;"u"&amp;&amp;Yn.call(Blob)==="[object BlobConstructor]",Is=typeof File=="function"||typeof File&lt;"u"&amp;&amp;Yn.call(File)==="[object FileConstructor]";function jt(u){return Rs&amp;&amp;(u instanceof ArrayBuffer||Ns(u))||Ls&amp;&amp;u instanceof Blob||Is&amp;&amp;u instanceof File}function Bt(u,i){if(!u||typeof u!="object")return!1;if(Array.isArray(u)){for(let r=0,o=u.length;r&lt;o;r++)if(Bt(u[r]))return!0;return!1}if(jt(u))return!0;if(u.toJSON&amp;&amp;typeof u.toJSON=="function"&amp;&amp;arguments.length===1)return Bt(u.toJSON(),!0);for(let r in u)if(Object.prototype.hasOwnProperty.call(u,r)&amp;&amp;Bt(u[r]))return!0;return!1}function Qn(u){let i=[],r=u.data,o=u;return o.data=xe(r,i),o.attachments=i.length,{packet:o,buffers:i}}function xe(u,i){if(!u)return u;if(jt(u)){let r={_placeholder:!0,num:i.length};return i.push(u),r}else if(Array.isArray(u)){let r=new Array(u.length);for(let o=0;o&lt;u.length;o++)r[o]=xe(u[o],i);return r}else if(typeof u=="object"&amp;&amp;!(u instanceof Date)){let r={};for(let o in u)Object.prototype.hasOwnProperty.call(u,o)&amp;&amp;(r[o]=xe(u[o],i));return r}return u}function Zn(u,i){return u.data=Ee(u.data,i),delete u.attachments,u}function Ee(u,i){if(!u)return u;if(u&amp;&amp;u._placeholder===!0){if(typeof u.num=="number"&amp;&amp;u.num&gt;=0&amp;&amp;u.num&lt;i.length)return i[u.num];throw new Error("illegal attachments")}else if(Array.isArray(u))for(let r=0;r&lt;u.length;r++)u[r]=Ee(u[r],i);else if(typeof u=="object")for(let r in u)Object.prototype.hasOwnProperty.call(u,r)&amp;&amp;(u[r]=Ee(u[r],i));return u}var Bs=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],er=5,P=function(u){return u[u.CONNECT=0]="CONNECT",u[u.DISCONNECT=1]="DISCONNECT",u[u.EVENT=2]="EVENT",u[u.ACK=3]="ACK",u[u.CONNECT_ERROR=4]="CONNECT_ERROR",u[u.BINARY_EVENT=5]="BINARY_EVENT",u[u.BINARY_ACK=6]="BINARY_ACK",u}(P||{}),Pe=class{constructor(i){this.replacer=i}encode(i){return(i.type===P.EVENT||i.type===P.ACK)&amp;&amp;Bt(i)?this.encodeAsBinary({type:i.type===P.EVENT?P.BINARY_EVENT:P.BINARY_ACK,nsp:i.nsp,data:i.data,id:i.id}):[this.encodeAsString(i)]}encodeAsString(i){let r=""+i.type;return(i.type===P.BINARY_EVENT||i.type===P.BINARY_ACK)&amp;&amp;(r+=i.attachments+"-"),i.nsp&amp;&amp;i.nsp!=="/"&amp;&amp;(r+=i.nsp+","),i.id!=null&amp;&amp;(r+=i.id),i.data!=null&amp;&amp;(r+=JSON.stringify(i.data,this.replacer)),r}encodeAsBinary(i){let r=Qn(i),o=this.encodeAsString(r.packet),a=r.buffers;return a.unshift(o),a}};function tr(u){return Object.prototype.toString.call(u)==="[object Object]"}var Oe=class u extends A{constructor(i){super(),this.reviver=i}add(i){let r;if(typeof i=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(i);let o=r.type===P.BINARY_EVENT;o||r.type===P.BINARY_ACK?(r.type=o?P.EVENT:P.ACK,this.reconstructor=new Ae(r),r.attachments===0&amp;&amp;super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(jt(i)||i.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(i),r&amp;&amp;(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+i)}decodeString(i){let r=0,o={type:Number(i.charAt(0))};if(P[o.type]===void 0)throw new Error("unknown packet type "+o.type);if(o.type===P.BINARY_EVENT||o.type===P.BINARY_ACK){let f=r+1;for(;i.charAt(++r)!=="-"&amp;&amp;r!=i.length;);let l=i.substring(f,r);if(l!=Number(l)||i.charAt(r)!=="-")throw new Error("Illegal attachments");o.attachments=Number(l)}if(i.charAt(r+1)==="/"){let f=r+1;for(;++r&amp;&amp;!(i.charAt(r)===","||r===i.length););o.nsp=i.substring(f,r)}else o.nsp="/";let a=i.charAt(r+1);if(a!==""&amp;&amp;Number(a)==a){let f=r+1;for(;++r;){let l=i.charAt(r);if(l==null||Number(l)!=l){--r;break}if(r===i.length)break}o.id=Number(i.substring(f,r+1))}if(i.charAt(++r)){let f=this.tryParse(i.substr(r));if(u.isPayloadValid(o.type,f))o.data=f;else throw new Error("invalid payload")}return o}tryParse(i){try{return JSON.parse(i,this.reviver)}catch{return!1}}static isPayloadValid(i,r){switch(i){case P.CONNECT:return tr(r);case P.DISCONNECT:return r===void 0;case P.CONNECT_ERROR:return typeof r=="string"||tr(r);case P.EVENT:case P.BINARY_EVENT:return Array.isArray(r)&amp;&amp;(typeof r[0]=="number"||typeof r[0]=="string"&amp;&amp;Bs.indexOf(r[0])===-1);case P.ACK:case P.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&amp;&amp;(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},Ae=class{constructor(i){this.packet=i,this.buffers=[],this.reconPack=i}takeBinaryData(i){if(this.buffers.push(i),this.buffers.length===this.reconPack.attachments){let r=Zn(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function V(u,i,r){return u.on(i,r),function(){u.off(i,r)}}var js=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),wt=class extends A{constructor(i,r,o){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=i,this.nsp=r,o&amp;&amp;o.auth&amp;&amp;(this.auth=o.auth),this._opts=Object.assign({},o),this.io._autoConnect&amp;&amp;this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let i=this.io;this.subs=[V(i,"open",this.onopen.bind(this)),V(i,"packet",this.onpacket.bind(this)),V(i,"error",this.onerror.bind(this)),V(i,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&amp;&amp;this.onopen(),this)}open(){return this.connect()}send(...i){return i.unshift("message"),this.emit.apply(this,i),this}emit(i,...r){var o,a,f;if(js.hasOwnProperty(i))throw new Error('"'+i.toString()+'" is a reserved event name');if(r.unshift(i),this._opts.retries&amp;&amp;!this.flags.fromQueue&amp;&amp;!this.flags.volatile)return this._addToQueue(r),this;let l={type:P.EVENT,data:r};if(l.options={},l.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){let w=this.ids++,S=r.pop();this._registerAckCallback(w,S),l.id=w}let m=(a=(o=this.io.engine)===null||o===void 0?void 0:o.transport)===null||a===void 0?void 0:a.writable,_=this.connected&amp;&amp;!(!((f=this.io.engine)===null||f===void 0)&amp;&amp;f._hasPingExpired());return this.flags.volatile&amp;&amp;!m||(_?(this.notifyOutgoingListeners(l),this.packet(l)):this.sendBuffer.push(l)),this.flags={},this}_registerAckCallback(i,r){var o;let a=(o=this.flags.timeout)!==null&amp;&amp;o!==void 0?o:this._opts.ackTimeout;if(a===void 0){this.acks[i]=r;return}let f=this.io.setTimeoutFn(()=&gt;{delete this.acks[i];for(let m=0;m&lt;this.sendBuffer.length;m++)this.sendBuffer[m].id===i&amp;&amp;this.sendBuffer.splice(m,1);r.call(this,new Error("operation has timed out"))},a),l=(...m)=&gt;{this.io.clearTimeoutFn(f),r.apply(this,m)};l.withError=!0,this.acks[i]=l}emitWithAck(i,...r){return new Promise((o,a)=&gt;{let f=(l,m)=&gt;l?a(l):o(m);f.withError=!0,r.push(f),this.emit(i,...r)})}_addToQueue(i){let r;typeof i[i.length-1]=="function"&amp;&amp;(r=i.pop());let o={id:this._queueSeq++,tryCount:0,pending:!1,args:i,flags:Object.assign({fromQueue:!0},this.flags)};i.push((a,...f)=&gt;o!==this._queue[0]?void 0:(a!==null?o.tryCount&gt;this._opts.retries&amp;&amp;(this._queue.shift(),r&amp;&amp;r(a)):(this._queue.shift(),r&amp;&amp;r(null,...f)),o.pending=!1,this._drainQueue())),this._queue.push(o),this._drainQueue()}_drainQueue(i=!1){if(!this.connected||this._queue.length===0)return;let r=this._queue[0];r.pending&amp;&amp;!i||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(i){i.nsp=this.nsp,this.io._packet(i)}onopen(){typeof this.auth=="function"?this.auth(i=&gt;{this._sendConnectPacket(i)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(i){this.packet({type:P.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},i):i})}onerror(i){this.connected||this.emitReserved("connect_error",i)}onclose(i,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",i,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(i=&gt;{if(!this.sendBuffer.some(o=&gt;String(o.id)===i)){let o=this.acks[i];delete this.acks[i],o.withError&amp;&amp;o.call(this,new Error("socket has been disconnected"))}})}onpacket(i){if(i.nsp===this.nsp)switch(i.type){case P.CONNECT:i.data&amp;&amp;i.data.sid?this.onconnect(i.data.sid,i.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case P.EVENT:case P.BINARY_EVENT:this.onevent(i);break;case P.ACK:case P.BINARY_ACK:this.onack(i);break;case P.DISCONNECT:this.ondisconnect();break;case P.CONNECT_ERROR:this.destroy();let o=new Error(i.data.message);o.data=i.data.data,this.emitReserved("connect_error",o);break}}onevent(i){let r=i.data||[];i.id!=null&amp;&amp;r.push(this.ack(i.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(i){if(this._anyListeners&amp;&amp;this._anyListeners.length){let r=this._anyListeners.slice();for(let o of r)o.apply(this,i)}super.emit.apply(this,i),this._pid&amp;&amp;i.length&amp;&amp;typeof i[i.length-1]=="string"&amp;&amp;(this._lastOffset=i[i.length-1])}ack(i){let r=this,o=!1;return function(...a){o||(o=!0,r.packet({type:P.ACK,id:i,data:a}))}}onack(i){let r=this.acks[i.id];typeof r=="function"&amp;&amp;(delete this.acks[i.id],r.withError&amp;&amp;i.data.unshift(null),r.apply(this,i.data))}onconnect(i,r){this.id=i,this.recovered=r&amp;&amp;this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(i=&gt;this.emitEvent(i)),this.receiveBuffer=[],this.sendBuffer.forEach(i=&gt;{this.notifyOutgoingListeners(i),this.packet(i)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&amp;&amp;(this.subs.forEach(i=&gt;i()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&amp;&amp;this.packet({type:P.DISCONNECT}),this.destroy(),this.connected&amp;&amp;this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(i){return this.flags.compress=i,this}get volatile(){return this.flags.volatile=!0,this}timeout(i){return this.flags.timeout=i,this}onAny(i){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(i),this}prependAny(i){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(i),this}offAny(i){if(!this._anyListeners)return this;if(i){let r=this._anyListeners;for(let o=0;o&lt;r.length;o++)if(i===r[o])return r.splice(o,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(i){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(i),this}prependAnyOutgoing(i){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(i),this}offAnyOutgoing(i){if(!this._anyOutgoingListeners)return this;if(i){let r=this._anyOutgoingListeners;for(let o=0;o&lt;r.length;o++)if(i===r[o])return r.splice(o,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(i){if(this._anyOutgoingListeners&amp;&amp;this._anyOutgoingListeners.length){let r=this._anyOutgoingListeners.slice();for(let o of r)o.apply(this,i.data)}}};function pt(u){u=u||{},this.ms=u.min||100,this.max=u.max||1e4,this.factor=u.factor||2,this.jitter=u.jitter&gt;0&amp;&amp;u.jitter&lt;=1?u.jitter:0,this.attempts=0}pt.prototype.duration=function(){var u=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var i=Math.random(),r=Math.floor(i*this.jitter*u);u=Math.floor(i*10)&amp;1?u+r:u-r}return Math.min(u,this.max)|0};pt.prototype.reset=function(){this.attempts=0};pt.prototype.setMin=function(u){this.ms=u};pt.prototype.setMax=function(u){this.max=u};pt.prototype.setJitter=function(u){this.jitter=u};var kt=class extends A{constructor(i,r){var o;super(),this.nsps={},this.subs=[],i&amp;&amp;typeof i=="object"&amp;&amp;(r=i,i=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,it(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((o=r.randomizationFactor)!==null&amp;&amp;o!==void 0?o:.5),this.backoff=new pt({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=i;let a=r.parser||Re;this.encoder=new a.Encoder,this.decoder=new a.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&amp;&amp;this.open()}reconnection(i){return arguments.length?(this._reconnection=!!i,i||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(i){return i===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=i,this)}reconnectionDelay(i){var r;return i===void 0?this._reconnectionDelay:(this._reconnectionDelay=i,(r=this.backoff)===null||r===void 0||r.setMin(i),this)}randomizationFactor(i){var r;return i===void 0?this._randomizationFactor:(this._randomizationFactor=i,(r=this.backoff)===null||r===void 0||r.setJitter(i),this)}reconnectionDelayMax(i){var r;return i===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=i,(r=this.backoff)===null||r===void 0||r.setMax(i),this)}timeout(i){return arguments.length?(this._timeout=i,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&amp;&amp;this._reconnection&amp;&amp;this.backoff.attempts===0&amp;&amp;this.reconnect()}open(i){if(~this._readyState.indexOf("open"))return this;this.engine=new bt(this.uri,this.opts);let r=this.engine,o=this;this._readyState="opening",this.skipReconnect=!1;let a=V(r,"open",function(){o.onopen(),i&amp;&amp;i()}),f=m=&gt;{this.cleanup(),this._readyState="closed",this.emitReserved("error",m),i?i(m):this.maybeReconnectOnOpen()},l=V(r,"error",f);if(this._timeout!==!1){let m=this._timeout,_=this.setTimeoutFn(()=&gt;{a(),f(new Error("timeout")),r.close()},m);this.opts.autoUnref&amp;&amp;_.unref(),this.subs.push(()=&gt;{this.clearTimeoutFn(_)})}return this.subs.push(a),this.subs.push(l),this}connect(i){return this.open(i)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let i=this.engine;this.subs.push(V(i,"ping",this.onping.bind(this)),V(i,"data",this.ondata.bind(this)),V(i,"error",this.onerror.bind(this)),V(i,"close",this.onclose.bind(this)),V(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(i){try{this.decoder.add(i)}catch(r){this.onclose("parse error",r)}}ondecoded(i){rt(()=&gt;{this.emitReserved("packet",i)},this.setTimeoutFn)}onerror(i){this.emitReserved("error",i)}socket(i,r){let o=this.nsps[i];return o?this._autoConnect&amp;&amp;!o.active&amp;&amp;o.connect():(o=new wt(this,i,r),this.nsps[i]=o),o}_destroy(i){let r=Object.keys(this.nsps);for(let o of r)if(this.nsps[o].active)return;this._close()}_packet(i){let r=this.encoder.encode(i);for(let o=0;o&lt;r.length;o++)this.engine.write(r[o],i.options)}cleanup(){this.subs.forEach(i=&gt;i()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(i,r){var o;this.cleanup(),(o=this.engine)===null||o===void 0||o.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",i,r),this._reconnection&amp;&amp;!this.skipReconnect&amp;&amp;this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let i=this;if(this.backoff.attempts&gt;=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let r=this.backoff.duration();this._reconnecting=!0;let o=this.setTimeoutFn(()=&gt;{i.skipReconnect||(this.emitReserved("reconnect_attempt",i.backoff.attempts),!i.skipReconnect&amp;&amp;i.open(a=&gt;{a?(i._reconnecting=!1,i.reconnect(),this.emitReserved("reconnect_error",a)):i.onreconnect()}))},r);this.opts.autoUnref&amp;&amp;o.unref(),this.subs.push(()=&gt;{this.clearTimeoutFn(o)})}}onreconnect(){let i=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",i)}};var Dt={};function St(u,i){typeof u=="object"&amp;&amp;(i=u,u=void 0),i=i||{};let r=Gn(u,i.path||"/socket.io"),o=r.source,a=r.id,f=r.path,l=Dt[a]&amp;&amp;f in Dt[a].nsps,m=i.forceNew||i["force new connection"]||i.multiplex===!1||l,_;return m?_=new kt(o,i):(Dt[a]||(Dt[a]=new kt(o,i)),_=Dt[a]),r.query&amp;&amp;!i.query&amp;&amp;(i.query=r.queryKey),_.socket(r.path,i)}Object.assign(St,{Manager:kt,Socket:wt,io:St,connect:St});ve();_n();Wt();var nr=(()=&gt;{class u{constructor(r){this.http=r,this.UserRank=null,this.coins=null,this.points=null,this.loadingPerks=!1,this.dashboardData=null,this.badges=null,this.notifications=null,this.streaks=null,this.streaks_single=null,this.badges_count=null,this.gamifyFlag=new Vt(null),this.gamifyData=new zt,this.showCurrentUserProfile=!1,this.url_prefix="/api/gamification",this.gamifyFlag.subscribe(o=&gt;{o&amp;&amp;this.getGamifiactionMenuData(o).subscribe(a=&gt;{this.coins=a?.perks?.coins,this.points=a?.perks?.points,this.UserRank=a?.perks?.rank,this.badges=a?.badges?.data})}),this.gamifyData.subscribe(o=&gt;{o&amp;&amp;(o?.perks?.points&amp;&amp;(this.points=o?.perks?.points),o?.perks?.rank&amp;&amp;(this.UserRank=o?.perks?.rank))})}gamifyLeaderBoard(r,o=null,a=null){var f="/api/public/gamification/get-paginated-leaderboard/"+r+"/";return o!=null&amp;&amp;(f=f+o+"/1"),this.http.get(f).pipe(I(l=&gt;l)).pipe(B(this.handleError))}userGamifyStreak(r,o,a){let f=this.url_prefix+"/get-user-streak/"+r+"/"+o+"/"+a;return this.http.get(f).pipe(I(l=&gt;l)).pipe(B(this.handleError))}userCompleteGamifyStreak(r,o,a,f=null){var l=this.url_prefix+"/get-complete-streak/"+r+"/"+o+"/"+a+"/";return f&amp;&amp;(l=l+f),this.http.get(l).pipe(I(m=&gt;m)).pipe(B(this.handleError))}getUserBadges(r,o,a,f=null,l=null){var m=this.url_prefix+"/get-user-badges/"+r+"/"+o+"/"+a+"/"+f;return l&amp;&amp;(m=m+"?action="+l),this.http.get(m).pipe(I(_=&gt;_)).pipe(B(this.handleError))}getClient(r){let o=this.url_prefix+"/get-client";return this.http.post(o,r).pipe(I(a=&gt;a)).pipe(B(this.handleError))}getActions(r=null){let o=this.url_prefix+"/get-actions/d2c/"+r;return this.http.get(o).pipe(I(a=&gt;a)).pipe(B(this.handleError))}getGamifyTransactionHistory(r,o=null){var a=this.url_prefix+"/get-user-transaction-history/"+r;return o&amp;&amp;(a=a+"/"+o),this.http.get(a).pipe(I(f=&gt;f)).pipe(B(this.handleError))}handleError(r){try{return vt(r)}catch{return vt(r)}}getRegisteredOpp(){return this.http.get("/api/personalize/upcoming-registered").pipe(I(r=&gt;r)).pipe(B(this.handleError))}getUserDetails(r){let o;return r?o="/api/user/"+r+"/get-profile-form":o="/api/user/get-profile-form",this.http.get(o).pipe(I(a=&gt;a)).pipe(B(this.handleError))}getGamifiactionData(r){let o;return r?o="/api/gamification/get-user-widget-data/"+r+"/21/global":o="/api/gamification/get-user-widget-data/21/global",this.http.get(o).pipe(I(a=&gt;a)).pipe(B(this.handleError))}getUserProfileDetails(r){let o="/api/gamification/get-profile-limited-data/"+r;return this.http.get(o).pipe(I(a=&gt;a)).pipe(B(this.handleError))}getGamifiactionMenuData(r){let o;return r?o="/api/gamification/get-user-menu-data/"+r+"/21/global":o="/api/gamification/get-user-menu-data/21/global",this.http.get(o).pipe(I(a=&gt;a)).pipe(B(this.handleError))}getLeaderboardUserRank(r,o,a=null){let f="/api/gamification/get-leaderboard-user-rank/"+o;return a!=null&amp;&amp;(f=f+"/"+a),r&amp;&amp;(f=f+"?filterName="+r?.property+"&amp;filterValue="+r?.value),this.http.get(f).pipe(I(l=&gt;l)).pipe(B(this.handleError))}getTpoUserLeaderBoardRank(r,o,a,f,l=null){let m=`/api/tpc/practice/get-leaderboard-user-rank/${r}/${o}/${f}`;return l!=null&amp;&amp;(m=m+"/"+l),a&amp;&amp;(m=m+"?filterName="+a?.property+"&amp;filterValue="+a?.value),this.http.get(m).pipe(I(_=&gt;_)).pipe(B(this.handleError))}getLeaderboardStats(r,o,a=null){var f="/api/gamification/get-leaderboard-stats/"+r+"/"+o;return a&amp;&amp;(f=f+"/"+a),this.http.get(f).pipe(I(l=&gt;l)).pipe(B(this.handleError))}static{this.\u0275fac=function(o){return new(o||u)(F(Xt))}}static{this.\u0275prov=st({token:u,factory:u.\u0275fac,providedIn:"root"})}}return u})();_n();ve();Wt();var rr=(()=&gt;{class u{constructor(r){this.http=r,this.downloadReportSubscribe=new zt}unstopDownload(r,o,a=null){var f=`/api/generate-report/${r}/${o}`;if(a)for(let l=0;l&lt;a.length;l++)l==0?f=`${f}?${a[l].key}=${a[l].value}`:f=`${f}&amp;${a[l].key}=${a[l].value}`;return this.http.get(f).pipe(I(l=&gt;l)).pipe(B(this.handleError))}handleError(r){try{return vt(r)}catch{return vt(r)}}static{this.\u0275fac=function(o){return new(o||u)(F(Xt))}}static{this.\u0275prov=st({token:u,factory:u.\u0275fac,providedIn:"root"})}}return u})();function Le(u){"@babel/helpers - typeof";return Le=typeof Symbol=="function"&amp;&amp;typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&amp;&amp;typeof Symbol=="function"&amp;&amp;i.constructor===Symbol&amp;&amp;i!==Symbol.prototype?"symbol":typeof i},Le(u)}function j(u,i){if(!(u instanceof i))throw new TypeError("Cannot call a class as a function")}function ir(u,i){for(var r=0;r&lt;i.length;r++){var o=i[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&amp;&amp;(o.writable=!0),Object.defineProperty(u,o.key,o)}}function D(u,i,r){return i&amp;&amp;ir(u.prototype,i),r&amp;&amp;ir(u,r),Object.defineProperty(u,"prototype",{writable:!1}),u}function Ie(){return Ie=Object.assign||function(u){for(var i=1;i&lt;arguments.length;i++){var r=arguments[i];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&amp;&amp;(u[o]=r[o])}return u},Ie.apply(this,arguments)}function W(u,i){if(typeof i!="function"&amp;&amp;i!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(i&amp;&amp;i.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),Object.defineProperty(u,"prototype",{writable:!1}),i&amp;&amp;Be(u,i)}function ne(u){return ne=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ne(u)}function Be(u,i){return Be=Object.setPrototypeOf||function(o,a){return o.__proto__=a,o},Be(u,i)}function Fs(){if(typeof Reflect&gt;"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Hs(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}function Ms(u,i){if(i&amp;&amp;(typeof i=="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Hs(u)}function X(u){var i=Fs();return function(){var o=ne(u),a;if(i){var f=ne(this).constructor;a=Reflect.construct(o,arguments,f)}else a=o.apply(this,arguments);return Ms(this,a)}}var je=function(){function u(){j(this,u)}return D(u,[{key:"listenForWhisper",value:function(r,o){return this.listen(".client-"+r,o)}},{key:"notification",value:function(r){return this.listen(".Illuminate\\Notifications\\Events\\BroadcastNotificationCreated",r)}},{key:"stopListeningForWhisper",value:function(r,o){return this.stopListening(".client-"+r,o)}}]),u}(),or=function(){function u(i){j(this,u),this.setNamespace(i)}return D(u,[{key:"format",value:function(r){return r.charAt(0)==="."||r.charAt(0)==="\\"?r.substr(1):(this.namespace&amp;&amp;(r=this.namespace+"."+r),r.replace(/\./g,"\\"))}},{key:"setNamespace",value:function(r){this.namespace=r}}]),u}(),ie=function(u){W(r,u);var i=X(r);function r(o,a,f){var l;return j(this,r),l=i.call(this),l.name=a,l.pusher=o,l.options=f,l.eventFormatter=new or(l.options.namespace),l.subscribe(),l}return D(r,[{key:"subscribe",value:function(){this.subscription=this.pusher.subscribe(this.name)}},{key:"unsubscribe",value:function(){this.pusher.unsubscribe(this.name)}},{key:"listen",value:function(a,f){return this.on(this.eventFormatter.format(a),f),this}},{key:"listenToAll",value:function(a){var f=this;return this.subscription.bind_global(function(l,m){if(!l.startsWith("pusher:")){var _=f.options.namespace.replace(/\./g,"\\"),T=l.startsWith(_)?l.substring(_.length+1):"."+l;a(T,m)}}),this}},{key:"stopListening",value:function(a,f){return f?this.subscription.unbind(this.eventFormatter.format(a),f):this.subscription.unbind(this.eventFormatter.format(a)),this}},{key:"stopListeningToAll",value:function(a){return a?this.subscription.unbind_global(a):this.subscription.unbind_global(),this}},{key:"subscribed",value:function(a){return this.on("pusher:subscription_succeeded",function(){a()}),this}},{key:"error",value:function(a){return this.on("pusher:subscription_error",function(f){a(f)}),this}},{key:"on",value:function(a,f){return this.subscription.bind(a,f),this}}]),r}(je),zs=function(u){W(r,u);var i=X(r);function r(){return j(this,r),i.apply(this,arguments)}return D(r,[{key:"whisper",value:function(a,f){return this.pusher.channels.channels[this.name].trigger("client-".concat(a),f),this}}]),r}(ie),Vs=function(u){W(r,u);var i=X(r);function r(){return j(this,r),i.apply(this,arguments)}return D(r,[{key:"whisper",value:function(a,f){return this.pusher.channels.channels[this.name].trigger("client-".concat(a),f),this}}]),r}(ie),Ws=function(u){W(r,u);var i=X(r);function r(){return j(this,r),i.apply(this,arguments)}return D(r,[{key:"here",value:function(a){return this.on("pusher:subscription_succeeded",function(f){a(Object.keys(f.members).map(function(l){return f.members[l]}))}),this}},{key:"joining",value:function(a){return this.on("pusher:member_added",function(f){a(f.info)}),this}},{key:"leaving",value:function(a){return this.on("pusher:member_removed",function(f){a(f.info)}),this}},{key:"whisper",value:function(a,f){return this.pusher.channels.channels[this.name].trigger("client-".concat(a),f),this}}]),r}(ie),sr=function(u){W(r,u);var i=X(r);function r(o,a,f){var l;return j(this,r),l=i.call(this),l.events={},l.listeners={},l.name=a,l.socket=o,l.options=f,l.eventFormatter=new or(l.options.namespace),l.subscribe(),l}return D(r,[{key:"subscribe",value:function(){this.socket.emit("subscribe",{channel:this.name,auth:this.options.auth||{}})}},{key:"unsubscribe",value:function(){this.unbind(),this.socket.emit("unsubscribe",{channel:this.name,auth:this.options.auth||{}})}},{key:"listen",value:function(a,f){return this.on(this.eventFormatter.format(a),f),this}},{key:"stopListening",value:function(a,f){return this.unbindEvent(this.eventFormatter.format(a),f),this}},{key:"subscribed",value:function(a){return this.on("connect",function(f){a(f)}),this}},{key:"error",value:function(a){return this}},{key:"on",value:function(a,f){var l=this;return this.listeners[a]=this.listeners[a]||[],this.events[a]||(this.events[a]=function(m,_){l.name===m&amp;&amp;l.listeners[a]&amp;&amp;l.listeners[a].forEach(function(T){return T(_)})},this.socket.on(a,this.events[a])),this.listeners[a].push(f),this}},{key:"unbind",value:function(){var a=this;Object.keys(this.events).forEach(function(f){a.unbindEvent(f)})}},{key:"unbindEvent",value:function(a,f){this.listeners[a]=this.listeners[a]||[],f&amp;&amp;(this.listeners[a]=this.listeners[a].filter(function(l){return l!==f})),(!f||this.listeners[a].length===0)&amp;&amp;(this.events[a]&amp;&amp;(this.socket.removeListener(a,this.events[a]),delete this.events[a]),delete this.listeners[a])}}]),r}(je),ar=function(u){W(r,u);var i=X(r);function r(){return j(this,r),i.apply(this,arguments)}return D(r,[{key:"whisper",value:function(a,f){return this.socket.emit("client event",{channel:this.name,event:"client-".concat(a),data:f}),this}}]),r}(sr),Xs=function(u){W(r,u);var i=X(r);function r(){return j(this,r),i.apply(this,arguments)}return D(r,[{key:"here",value:function(a){return this.on("presence:subscribed",function(f){a(f.map(function(l){return l.user_info}))}),this}},{key:"joining",value:function(a){return this.on("presence:joining",function(f){return a(f.user_info)}),this}},{key:"leaving",value:function(a){return this.on("presence:leaving",function(f){return a(f.user_info)}),this}}]),r}(ar),re=function(u){W(r,u);var i=X(r);function r(){return j(this,r),i.apply(this,arguments)}return D(r,[{key:"subscribe",value:function(){}},{key:"unsubscribe",value:function(){}},{key:"listen",value:function(a,f){return this}},{key:"stopListening",value:function(a,f){return this}},{key:"subscribed",value:function(a){return this}},{key:"error",value:function(a){return this}},{key:"on",value:function(a,f){return this}}]),r}(je),Js=function(u){W(r,u);var i=X(r);function r(){return j(this,r),i.apply(this,arguments)}return D(r,[{key:"whisper",value:function(a,f){return this}}]),r}(re),$s=function(u){W(r,u);var i=X(r);function r(){return j(this,r),i.apply(this,arguments)}return D(r,[{key:"here",value:function(a){return this}},{key:"joining",value:function(a){return this}},{key:"leaving",value:function(a){return this}},{key:"whisper",value:function(a,f){return this}}]),r}(re),De=function(){function u(i){j(this,u),this._defaultOptions={auth:{headers:{}},authEndpoint:"/broadcasting/auth",userAuthentication:{endpoint:"/broadcasting/user-auth",headers:{}},broadcaster:"pusher",csrfToken:null,host:null,key:null,namespace:"App.Events"},this.setOptions(i),this.connect()}return D(u,[{key:"setOptions",value:function(r){this.options=Ie(this._defaultOptions,r);var o=this.csrfToken();return o&amp;&amp;(this.options.auth.headers["X-CSRF-TOKEN"]=o,this.options.userAuthentication.headers["X-CSRF-TOKEN"]=o),r}},{key:"csrfToken",value:function(){var r;return typeof window&lt;"u"&amp;&amp;window.Laravel&amp;&amp;window.Laravel.csrfToken?window.Laravel.csrfToken:this.options.csrfToken?this.options.csrfToken:typeof document&lt;"u"&amp;&amp;typeof document.querySelector=="function"&amp;&amp;(r=document.querySelector('meta[name="csrf-token"]'))?r.getAttribute("content"):null}}]),u}(),Ks=function(u){W(r,u);var i=X(r);function r(){var o;return j(this,r),o=i.apply(this,arguments),o.channels={},o}return D(r,[{key:"connect",value:function(){typeof this.options.client&lt;"u"?this.pusher=this.options.client:this.pusher=new Pusher(this.options.key,this.options)}},{key:"signin",value:function(){this.pusher.signin()}},{key:"listen",value:function(a,f,l){return this.channel(a).listen(f,l)}},{key:"channel",value:function(a){return this.channels[a]||(this.channels[a]=new ie(this.pusher,a,this.options)),this.channels[a]}},{key:"privateChannel",value:function(a){return this.channels["private-"+a]||(this.channels["private-"+a]=new zs(this.pusher,"private-"+a,this.options)),this.channels["private-"+a]}},{key:"encryptedPrivateChannel",value:function(a){return this.channels["private-encrypted-"+a]||(this.channels["private-encrypted-"+a]=new Vs(this.pusher,"private-encrypted-"+a,this.options)),this.channels["private-encrypted-"+a]}},{key:"presenceChannel",value:function(a){return this.channels["presence-"+a]||(this.channels["presence-"+a]=new Ws(this.pusher,"presence-"+a,this.options)),this.channels["presence-"+a]}},{key:"leave",value:function(a){var f=this,l=[a,"private-"+a,"presence-"+a];l.forEach(function(m,_){f.leaveChannel(m)})}},{key:"leaveChannel",value:function(a){this.channels[a]&amp;&amp;(this.channels[a].unsubscribe(),delete this.channels[a])}},{key:"socketId",value:function(){return this.pusher.connection.socket_id}},{key:"disconnect",value:function(){this.pusher.disconnect()}}]),r}(De),Gs=function(u){W(r,u);var i=X(r);function r(){var o;return j(this,r),o=i.apply(this,arguments),o.channels={},o}return D(r,[{key:"connect",value:function(){var a=this,f=this.getSocketIO();return this.socket=f(this.options.host,this.options),this.socket.on("reconnect",function(){Object.values(a.channels).forEach(function(l){l.subscribe()})}),this.socket}},{key:"getSocketIO",value:function(){if(typeof this.options.client&lt;"u")return this.options.client;if(typeof io&lt;"u")return io;throw new Error("Socket.io client not found. Should be globally available or passed via options.client")}},{key:"listen",value:function(a,f,l){return this.channel(a).listen(f,l)}},{key:"channel",value:function(a){return this.channels[a]||(this.channels[a]=new sr(this.socket,a,this.options)),this.channels[a]}},{key:"privateChannel",value:function(a){return this.channels["private-"+a]||(this.channels["private-"+a]=new ar(this.socket,"private-"+a,this.options)),this.channels["private-"+a]}},{key:"presenceChannel",value:function(a){return this.channels["presence-"+a]||(this.channels["presence-"+a]=new Xs(this.socket,"presence-"+a,this.options)),this.channels["presence-"+a]}},{key:"leave",value:function(a){var f=this,l=[a,"private-"+a,"presence-"+a];l.forEach(function(m){f.leaveChannel(m)})}},{key:"leaveChannel",value:function(a){this.channels[a]&amp;&amp;(this.channels[a].unsubscribe(),delete this.channels[a])}},{key:"socketId",value:function(){return this.socket.id}},{key:"disconnect",value:function(){this.socket.disconnect()}}]),r}(De),Ys=function(u){W(r,u);var i=X(r);function r(){var o;return j(this,r),o=i.apply(this,arguments),o.channels={},o}return D(r,[{key:"connect",value:function(){}},{key:"listen",value:function(a,f,l){return new re}},{key:"channel",value:function(a){return new re}},{key:"privateChannel",value:function(a){return new Js}},{key:"presenceChannel",value:function(a){return new $s}},{key:"leave",value:function(a){}},{key:"leaveChannel",value:function(a){}},{key:"socketId",value:function(){return"fake-socket-id"}},{key:"disconnect",value:function(){}}]),r}(De),qe=function(){function u(i){j(this,u),this.options=i,this.connect(),this.options.withoutInterceptors||this.registerInterceptors()}return D(u,[{key:"channel",value:function(r){return this.connector.channel(r)}},{key:"connect",value:function(){this.options.broadcaster=="pusher"?this.connector=new Ks(this.options):this.options.broadcaster=="socket.io"?this.connector=new Gs(this.options):this.options.broadcaster=="null"?this.connector=new Ys(this.options):typeof this.options.broadcaster=="function"&amp;&amp;(this.connector=new this.options.broadcaster(this.options))}},{key:"disconnect",value:function(){this.connector.disconnect()}},{key:"join",value:function(r){return this.connector.presenceChannel(r)}},{key:"leave",value:function(r){this.connector.leave(r)}},{key:"leaveChannel",value:function(r){this.connector.leaveChannel(r)}},{key:"listen",value:function(r,o,a){return this.connector.listen(r,o,a)}},{key:"private",value:function(r){return this.connector.privateChannel(r)}},{key:"encryptedPrivate",value:function(r){return this.connector.encryptedPrivateChannel(r)}},{key:"socketId",value:function(){return this.connector.socketId()}},{key:"registerInterceptors",value:function(){typeof Vue=="function"&amp;&amp;Vue.http&amp;&amp;this.registerVueRequestInterceptor(),typeof axios=="function"&amp;&amp;this.registerAxiosRequestInterceptor(),typeof jQuery=="function"&amp;&amp;this.registerjQueryAjaxSetup(),(typeof Turbo&gt;"u"?"undefined":Le(Turbo))==="object"&amp;&amp;this.registerTurboRequestInterceptor()}},{key:"registerVueRequestInterceptor",value:function(){var r=this;Vue.http.interceptors.push(function(o,a){r.socketId()&amp;&amp;o.headers.set("X-Socket-ID",r.socketId()),a()})}},{key:"registerAxiosRequestInterceptor",value:function(){var r=this;axios.interceptors.request.use(function(o){return r.socketId()&amp;&amp;(o.headers["X-Socket-Id"]=r.socketId()),o})}},{key:"registerjQueryAjaxSetup",value:function(){var r=this;typeof jQuery.ajax&lt;"u"&amp;&amp;jQuery.ajaxPrefilter(function(o,a,f){r.socketId()&amp;&amp;f.setRequestHeader("X-Socket-Id",r.socketId())})}},{key:"registerTurboRequestInterceptor",value:function(){var r=this;document.addEventListener("turbo:before-fetch-request",function(o){o.detail.fetchOptions.headers["X-Socket-Id"]=r.socketId()})}}]),u}();var hr=gs(cr());ve();Wt();var ur=(()=&gt;{class u{constructor(r,o,a,f){this.toast=r,this.router=o,this.common=a,this.cookieService=f,this.gamificationDataSubject=new Vt(null),this.gamificationData=[],this.timeout=[],this.currentNotification=null,this.notificationTimeForBadge=13e3,this.notificationTimeForToast=6e3,this.common.$restrictNotification.subscribe(l=&gt;{this.stopNotifications=l}),this.gamificationDataSubject.subscribe(l=&gt;{if(this.gamificationData=l,!this.stopNotifications&amp;&amp;this.gamificationData)for(var m=0;m&lt;=this.gamificationData.length;m++)this.delay(m)})}delay(r){this.timeout[r]=setTimeout(()=&gt;{this.loadNextNotification(r)},13e3*r)}loadNextNotification(r){if(r==this.gamificationData.length)this.gamificationData=null,this.currentNotification=null;else if(this.gamificationData){let o=this.gamificationData[r];if(o.type=="points&amp;coins"&amp;&amp;o.points&gt;0){this.currentNotification=null;let a=`${o.recordtype=="cr"?"+":"-"} ${o.points?o.points:0} Points for ${o.action} `;this.toast.toast(a,this.notificationTimeForToast,"toast-points")}else if(o.type=="points&amp;coins"&amp;&amp;o.coins&gt;0){this.currentNotification=null;let a=`${o.recordtype=="cr"?"+":"-"} ${o.coins?o.coins:0} Coins for ${o.action} `;this.toast.toast(a,this.notificationTimeForToast,"toast-coins")}else this.currentNotification=this.gamificationData[r],this.currentNotification.index=r;this.toast.playClip()}}changeCard(r){if(r==this.gamificationData.length)this.gamificationData=null,this.currentNotification=null;else{if(this.currentNotification=this.gamificationData[r+1],this.currentNotification.index=r,this.currentNotification.type=="points&amp;coins"&amp;&amp;this.currentNotification.points&gt;0){let o=`${this.currentNotification.recordtype=="cr"?"+":"-"} ${this.currentNotification.points??0} Points for ${this.currentNotification.action} `;this.toast.toast(o,this.notificationTimeForToast,"toast-points")}else if(this.currentNotification.type=="points&amp;coins"&amp;&amp;this.currentNotification.coins&gt;0){let o=`${this.currentNotification.recordtype=="cr"?"+":"-"} ${this.currentNotification.coins??0} Coins for ${this.currentNotification.action} `;this.toast.toast(o,this.notificationTimeForToast,"toast-coins")}clearTimeout(this.timeout[r])}}static{this.\u0275fac=function(o){return new(o||u)(F(kn),F(bn),F(xn),F(wn))}}static{this.\u0275prov=st({token:u,factory:u.\u0275fac,providedIn:"root"})}}return u})();Wt();var wu=(()=&gt;{class u{constructor(r,o,a,f,l,m){this.store=r,this.sharedActions=o,this.localStorageService=a,this.gamifyNotificationService=f,this.gamificationService=l,this.unstopDownloadService=m,this.port=6001,this.url=Pt.wssUrl}init(){let r=this.localStorageService.getItem("accessToken");r!=null&amp;&amp;(this.token=r),window.io=St,window.pusher=hr.default,this.io=St,this.url?this.Echo=new qe({broadcaster:"pusher",authEndpoint:Pt.origin+"/api/broadcasting/auth",auth:{headers:{Authorization:"Bearer "+this.token}},key:"pusherkey",httpHost:this.url,httpsHost:this.url,wsHost:this.url,wssHost:this.url,wsPort:Pt.environment=="production"?this.port:null,wssPort:Pt.environment=="production"?this.port:null,forceTLS:!0,disableStats:!0,enabledTransports:["ws","wss"]}):(console.log(this.token),this.Echo=new qe({broadcaster:"socket.io",host:this.socket_url,transports:["polling"],namespace:null,auth:{headers:{Authorization:"Bearer "+this.token}}}),this.Echo.connector.socket.on("connect",()=&gt;{console.log("CONNECTED")}),this.Echo.connector.socket.on("reconnecting",()=&gt;{console.log("CONNECTING")}),this.Echo.connector.socket.on("disconnect",()=&gt;{console.log("DISCONNECTED")}))}echo(){return this.Echo||this.init(),this.Echo}globalChannel(){return this.echo().channel("global-channels")}presenceOfflineRoundChannel(r){return this.echo().join("offline.round."+r)}leavePresenceOfflineRoundChannel(r){return this.echo().leave("offline.round."+r)}presenceLiveProctoringChannel(r,o){return this.echo().join("live.proctoring."+r+"."+o)}leavePresenceLiveProctoringChannel(r,o){return this.echo().leave("live.proctoring."+r+"."+o)}userChannel(r){return this.echo().private("user.notification."+r)}userNotificationChannel(r){return this.userChannel(r).notification(o=&gt;{o.type=="App\\Lib\\Gamify\\Notifications\\GamifyNotification"?(this.gamifyNotificationService.gamificationDataSubject.next(o.payload),this.gamificationService.gamifyData.next(o.gamify_data)):(console.log(o),o?.slug,this.store.dispatch(this.sharedActions.showNotification(o)))})}notification(r,o){console.log("listenting to notification."+r+"."+o),this.globalChannel().listen(".notification."+r+"."+o,a=&gt;{this.store.dispatch(this.sharedActions.showNotification(a))}),this.globalChannel().listen("notification",a=&gt;{this.store.dispatch(this.sharedActions.showNotification(a))})}stopListeningNotification(r,o){this.globalChannel().stopListening(".notification."+r+"."+o)}unsubscribeUserNotification(r){this.echo().private("user.notification."+r).unsubscribe()}subscribeToPublicChannel(r){return this.echo().channel(r)}static{this.\u0275fac=function(o){return new(o||u)(F(Tn),F(Cn),F(Sn),F(ur),F(nr),F(rr))}}static{this.\u0275prov=st({token:u,factory:u.\u0275fac,providedIn:"root"})}}return u})();export{St as a,ur as b,nr as c,rr as d,wu as e};
</pre></body></html>