"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "dist/socket.io.msgpack.min.js" between
socket.io-client-4.5.1.tar.gz and socket.io-client-4.5.2.tar.gz

About: Socket.IO client is a Javascript client library for the browser (or a Node.js client) that enables real-time communication with an Socket.IO server.

socket.io.msgpack.min.js  (socket.io-client-4.5.1):socket.io.msgpack.min.js  (socket.io-client-4.5.2)
/*! /*!
* Socket.IO v4.5.1 * Socket.IO v4.5.2
* (c) 2014-2022 Guillermo Rauch * (c) 2014-2022 Guillermo Rauch
* Released under the MIT License. * Released under the MIT License.
*/ */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.expor ts=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof gl obalThis?globalThis:t||self).io=e()}(this,(function(){"use strict";function t(t, e){return e.forEach((function(e){Object.keys(e).forEach((function(n){if("default "!==n&&!(n in t)){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProper ty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}))})),Object.freeze (t)}function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.it erator?function(t){return typeof t}:function(t){return t&&"function"==typeof Sym bol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}functi on n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a fun ction")}function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.en umerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.definePropert y(t,r.key,r)}}function i(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}function s(){return s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n [r])}return t},s.apply(this,arguments)}function o(t,e){if("function"!=typeof e&& null!==e)throw new TypeError("Super expression must either be null or a function ");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,co nfigurable:!0}}),e&&c(t,e)}function a(t){return a=Object.setPrototypeOf?Object.g etPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}fun ction c(t,e){return c=Object.setPrototypeOf||function(t,e){return t.__proto__=e, t},c(t,e)}function u(){if("undefined"==typeof Reflect||!Reflect.construct)return !1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{r eturn Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}) )),!0}catch(t){return!1}}function h(t,e,n){return h=u()?Reflect.construct:functi on(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));ret urn n&&c(i,n.prototype),i},h.apply(null,arguments)}function f(t){var e="function "==typeof Map?new Map:void 0;return f=function(t){if(null===t||(n=t,-1===Functio n.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeo f t)throw new TypeError("Super expression must either be null or a function");if (void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return h(t,argu ments,a(this).constructor)}return r.prototype=Object.create(t.prototype,{constru ctor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),c(r,t)},f(t)}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - sup er() hasn't been called");return t}function p(t,e){if(e&&("object"==typeof e||"f unction"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived construc tors may only return object or undefined");return l(t)}function d(t){var e=u();r eturn function(){var n,r=a(t);if(e){var i=a(this).constructor;n=Reflect.construc t(r,arguments,i)}else n=r.apply(this,arguments);return p(this,n)}}function y(t,e ,n){return y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n ){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t =a(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},y(t,e,n||t)}function v(t,e){(null==e||e>t.length)& &(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function g(t ,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n) {if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return v(t,e) ;var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.const ructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"=== n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(t,e):void 0}}(t))||e&&t& &"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:functio n(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t}, f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." )}var s,o=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();r eturn o=t.done,t},e:function(t){a=!0,s=t},f:function(){try{o||null==n.return||n. return()}finally{if(a)throw s}}}}var m=Object.create(null);m.open="0",m.close="1 ",m.ping="2",m.pong="3",m.message="4",m.upgrade="5",m.noop="6";var _=Object.crea te(null);Object.keys(m).forEach((function(t){_[m[t]]=t}));for(var b={type:"error ",data:"parser error"},k="function"==typeof Blob||"undefined"!=typeof Blob&&"[ob ject BlobConstructor]"===Object.prototype.toString.call(Blob),w="function"==type of ArrayBuffer,O=function(t,e,n){var r,i=t.type,s=t.data;return k&&s instanceof Blob?e?n(s):E(s,n):w&&(s instanceof ArrayBuffer||(r=s,"function"==typeof ArrayBu ffer.isView?ArrayBuffer.isView(r):r&&r.buffer instanceof ArrayBuffer))?e?n(s):E( new Blob([s]),n):n(m[i]+(s||""))},E=function(t,e){var n=new FileReader;return n. onload=function(){var t=n.result.split(",")[1];e("b"+t)},n.readAsDataURL(t)},C=" ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",R="undefined"= =typeof Uint8Array?[]:new Uint8Array(256),T=0;T<C.length;T++)R[C.charCodeAt(T)]= T;var S="function"==typeof ArrayBuffer,A=function(t,e){if("string"!=typeof t)ret urn{type:"message",data:x(t,e)};var n=t.charAt(0);return"b"===n?{type:"message", data:L(t.substring(1),e)}:_[n]?t.length>1?{type:_[n],data:t.substring(1)}:{type: _[n]}:b},L=function(t,e){if(S){var n=function(t){var e,n,r,i,s,o=.75*t.length,a= t.length,c=0;"="===t[t.length-1]&&(o--,"="===t[t.length-2]&&o--);var u=new Array Buffer(o),h=new Uint8Array(u);for(e=0;e<a;e+=4)n=R[t.charCodeAt(e)],r=R[t.charCo deAt(e+1)],i=R[t.charCodeAt(e+2)],s=R[t.charCodeAt(e+3)],h[c++]=n<<2|r>>4,h[c++] =(15&r)<<4|i>>2,h[c++]=(3&i)<<6|63&s;return u}(t);return x(n,e)}return{base64:!0 ,data:t}},x=function(t,e){return"blob"===e&&t instanceof ArrayBuffer?new Blob([t ]):t},B=String.fromCharCode(30);function U(t){if(t)return function(t){for(var e in U.prototype)t[e]=U.prototype[e];return t}(t)}U.prototype.on=U.prototype.addEv entListener=function(t,e){return this._callbacks=this._callbacks||{},(this._call backs["$"+t]=this._callbacks["$"+t]||[]).push(e),this},U.prototype.once=function (t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t ,n),this},U.prototype.off=U.prototype.removeListener=U.prototype.removeAllListen ers=U.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callb acks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callba cks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callback s["$"+t],this;for(var i=0;i<r.length;i++)if((n=r[i])===e||n.fn===e){r.splice(i,1 );break}return 0===r.length&&delete this._callbacks["$"+t],this},U.prototype.emi t=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments. length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r ];if(n){r=0;for(var i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,e)}return th is},U.prototype.emitReserved=U.prototype.emit,U.prototype.listeners=function(t){ return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},U.prototy pe.hasListeners=function(t){return!!this.listeners(t).length};var j="undefined"! =typeof self?self:"undefined"!=typeof window?window:Function("return this")();fu nction P(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1] =arguments[r];return n.reduce((function(e,n){return t.hasOwnProperty(n)&&(e[n]=t [n]),e}),{})}var N=setTimeout,q=clearTimeout;function M(t,e){e.useNativeTimers?( t.setTimeoutFn=N.bind(j),t.clearTimeoutFn=q.bind(j)):(t.setTimeoutFn=setTimeout. bind(j),t.clearTimeoutFn=clearTimeout.bind(j))}var D,I=function(t){o(r,t);var e= d(r);function r(t,i,s){var o;return n(this,r),(o=e.call(this,t)).description=i,o .context=s,o.type="TransportError",o}return r}(f(Error)),F=function(t){o(r,t);va r e=d(r);function r(t){var i;return n(this,r),(i=e.call(this)).writable=!1,M(l(i ),t),i.opts=t,i.query=t.query,i.readyState="",i.socket=t.socket,i}return i(r,[{k ey:"onError",value:function(t,e,n){return y(a(r.prototype),"emitReserved",this). call(this,"error",new I(t,e,n)),this}},{key:"open",value:function(){return"close d"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOp en()),this}},{key:"close",value:function(){return"opening"!==this.readyState&&"o pen"!==this.readyState||(this.doClose(),this.onClose()),this}},{key:"send",value :function(t){"open"===this.readyState&&this.write(t)}},{key:"onOpen",value:funct ion(){this.readyState="open",this.writable=!0,y(a(r.prototype),"emitReserved",th is).call(this,"open")}},{key:"onData",value:function(t){var e=A(t,this.socket.bi naryType);this.onPacket(e)}},{key:"onPacket",value:function(t){y(a(r.prototype), "emitReserved",this).call(this,"packet",t)}},{key:"onClose",value:function(t){th is.readyState="closed",y(a(r.prototype),"emitReserved",this).call(this,"close",t )}}]),r}(U),H="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_" .split(""),$={},z=0,V=0;function W(t){var e="";do{e=H[t%64]+e,t=Math.floor(t/64) }while(t>0);return e}function X(){var t=W(+new Date);return t!==D?(z=0,D=t):t+". "+W(z++)}for(;V<64;V++)$[H[V]]=V;function K(t){var e="";for(var n in t)t.hasOwnP roperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent( t[n]));return e}function J(t){for(var e={},n=t.split("&"),r=0,i=n.length;r<i;r++ ){var s=n[r].split("=");e[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}ret urn e}var Y=!1;try{Y="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}var G=Y;function Q(t){var e=t.xdomain;try{if("undefine d"!=typeof XMLHttpRequest&&(!e||G))return new XMLHttpRequest}catch(t){}if(!e)try {return new(j[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch (t){}}function Z(){}var tt=null!=new Q({xdomain:!1}).responseType,et=function(t) {o(r,t);var e=d(r);function r(t){var i;if(n(this,r),(i=e.call(this,t)).polling=! 1,"undefined"!=typeof location){var s="https:"===location.protocol,o=location.po rt;o||(o=s?"443":"80"),i.xd="undefined"!=typeof location&&t.hostname!==location. hostname||o!==t.port,i.xs=t.secure!==s}var a=t&&t.forceBase64;return i.supportsB inary=tt&&!a,i}return i(r,[{key:"name",get:function(){return"polling"}},{key:"do Open",value:function(){this.poll()}},{key:"pause",value:function(t){var e=this;t his.readyState="pausing";var n=function(){e.readyState="paused",t()};if(this.pol ling||!this.writable){var r=0;this.polling&&(r++,this.once("pollComplete",(funct ion(){--r||n()}))),this.writable||(r++,this.once("drain",(function(){--r||n()})) )}else n()}},{key:"poll",value:function(){this.polling=!0,this.doPoll(),this.emi tReserved("poll")}},{key:"onData",value:function(t){var e=this;(function(t,e){fo r(var n=t.split(B),r=[],i=0;i<n.length;i++){var s=A(n[i],e);if(r.push(s),"error" ===s.type)break}return r})(t,this.socket.binaryType).forEach((function(t){if("op ening"===e.readyState&&"open"===t.type&&e.onOpen(),"close"===t.type)return e.onC lose({description:"transport closed by the server"}),!1;e.onPacket(t)})),"closed "!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"== =this.readyState&&this.poll())}},{key:"doClose",value:function(){var t=this,e=fu nction(){t.write([{type:"close"}])};"open"===this.readyState?e():this.once("open ",e)}},{key:"write",value:function(t){var e=this;this.writable=!1,function(t,e){ var n=t.length,r=new Array(n),i=0;t.forEach((function(t,s){O(t,!1,(function(t){r [s]=t,++i===n&&e(r.join(B))}))}))}(t,(function(t){e.doWrite(t,(function(){e.writ able=!0,e.emitReserved("drain")}))}))}},{key:"uri",value:function(){var t=this.q uery||{},e=this.opts.secure?"https":"http",n="";!1!==this.opts.timestampRequests &&(t[this.opts.timestampParam]=X()),this.supportsBinary||t.sid||(t.b64=1),this.o pts.port&&("https"===e&&443!==Number(this.opts.port)||"http"===e&&80!==Number(th is.opts.port))&&(n=":"+this.opts.port);var r=K(t);return e+"://"+(-1!==this.opts .hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+n+this.opt s.path+(r.length?"?"+r:"")}},{key:"request",value:function(){var t=arguments.len gth>0&&void 0!==arguments[0]?arguments[0]:{};return s(t,{xd:this.xd,xs:this.xs}, this.opts),new nt(this.uri(),t)}},{key:"doWrite",value:function(t,e){var n=this, r=this.request({method:"POST",data:t});r.on("success",e),r.on("error",(function( t,e){n.onError("xhr post error",t,e)}))}},{key:"doPoll",value:function(){var t=t his,e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(function( e,n){t.onError("xhr poll error",e,n)})),this.pollXhr=e}}]),r}(F),nt=function(t){ o(r,t);var e=d(r);function r(t,i){var s;return n(this,r),M(l(s=e.call(this)),i), s.opts=i,s.method=i.method||"GET",s.uri=t,s.async=!1!==i.async,s.data=void 0!==i .data?i.data:null,s.create(),s}return i(r,[{key:"create",value:function(){var t= this,e=P(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejec tUnauthorized","autoUnref");e.xdomain=!!this.opts.xd,e.xscheme=!!this.opts.xs;va r n=this.xhr=new Q(e);try{n.open(this.method,this.uri,this.async);try{if(this.op ts.extraHeaders)for(var i in n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0 ),this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(i)&&n.setRequestH eader(i,this.opts.extraHeaders[i])}catch(t){}if("POST"===this.method)try{n.setRe questHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{n.setReques tHeader("Accept","*/*")}catch(t){}"withCredentials"in n&&(n.withCredentials=this .opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTim eout),n.onreadystatechange=function(){4===n.readyState&&(200===n.status||1223=== n.status?t.onLoad():t.setTimeoutFn((function(){t.onError("number"==typeof n.stat us?n.status:0)}),0))},n.send(this.data)}catch(e){return void this.setTimeoutFn(( function(){t.onError(e)}),0)}"undefined"!=typeof document&&(this.index=r.request sCount++,r.requests[this.index]=this)}},{key:"onError",value:function(t){this.em itReserved("error",t,this.xhr),this.cleanup(!0)}},{key:"cleanup",value:function( t){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=Z,t)try {this.xhr.abort()}catch(t){}"undefined"!=typeof document&&delete r.requests[this .index],this.xhr=null}}},{key:"onLoad",value:function(){var t=this.xhr.responseT ext;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this.cle anup())}},{key:"abort",value:function(){this.cleanup()}}]),r}(U);if(nt.requestsC ount=0,nt.requests={},"undefined"!=typeof document)if("function"==typeof attachE vent)attachEvent("onunload",rt);else if("function"==typeof addEventListener){add EventListener("onpagehide"in j?"pagehide":"unload",rt,!1)}function rt(){for(var t in nt.requests)nt.requests.hasOwnProperty(t)&&nt.requests[t].abort()}var it="f unction"==typeof Promise&&"function"==typeof Promise.resolve?function(t){return Promise.resolve().then(t)}:function(t,e){return e(t,0)},st=j.WebSocket||j.MozWeb Socket,ot="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"re actnative"===navigator.product.toLowerCase(),at=function(t){o(r,t);var e=d(r);fu nction r(t){var i;return n(this,r),(i=e.call(this,t)).supportsBinary=!t.forceBas e64,i}return i(r,[{key:"name",get:function(){return"websocket"}},{key:"doOpen",v alue:function(){if(this.check()){var t=this.uri(),e=this.opts.protocols,n=ot?{}: P(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ci phers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayloa d","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts. extraHeaders);try{this.ws=ot?new st(t,e,n):e?new st(t,e):new st(t)}catch(t){retu rn this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType||"arra ybuffer",this.addEventListeners()}}},{key:"addEventListeners",value:function(){v ar t=this;this.ws.onopen=function(){t.opts.autoUnref&&t.ws._socket.unref(),t.onO pen()},this.ws.onclose=function(e){return t.onClose({description:"websocket conn ection closed",context:e})},this.ws.onmessage=function(e){return t.onData(e.data )},this.ws.onerror=function(e){return t.onError("websocket error",e)}}},{key:"wr ite",value:function(t){var e=this;this.writable=!1;for(var n=function(n){var r=t [n],i=n===t.length-1;O(r,e.supportsBinary,(function(t){try{e.ws.send(t)}catch(t) {}i&&it((function(){e.writable=!0,e.emitReserved("drain")}),e.setTimeoutFn)}))}, r=0;r<t.length;r++)n(r)}},{key:"doClose",value:function(){void 0!==this.ws&&(thi s.ws.close(),this.ws=null)}},{key:"uri",value:function(){var t=this.query||{},e= this.opts.secure?"wss":"ws",n="";this.opts.port&&("wss"===e&&443!==Number(this.o pts.port)||"ws"===e&&80!==Number(this.opts.port))&&(n=":"+this.opts.port),this.o pts.timestampRequests&&(t[this.opts.timestampParam]=X()),this.supportsBinary||(t .b64=1);var r=K(t);return e+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this .opts.hostname+"]":this.opts.hostname)+n+this.opts.path+(r.length?"?"+r:"")}},{k ey:"check",value:function(){return!(!st||"__initialize"in st&&this.name===r.prot otype.name)}}]),r}(F),ct={websocket:at,polling:et},ut=/^(?:(?![^:@]+:[^:@\/]*@)( http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7 }[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]| $)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,ht=["source","protocol","authori ty","userInfo","user","password","host","port","relative","path","directory","fi le","query","anchor"];function ft(t){var e=t,n=t.indexOf("["),r=t.indexOf("]");- 1!=n&&-1!=r&&(t=t.substring(0,n)+t.substring(n,r).replace(/:/g,";")+t.substring( r,t.length));for(var i,s,o=ut.exec(t||""),a={},c=14;c--;)a[ht[c]]=o[c]||"";retur n-1!=n&&-1!=r&&(a.source=e,a.host=a.host.substring(1,a.host.length-1).replace(/; /g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":" ),a.ipv6uri=!0),a.pathNames=function(t,e){var n=/\/{2,9}/g,r=e.replace(n,"/").sp lit("/");"/"!=e.substr(0,1)&&0!==e.length||r.splice(0,1);"/"==e.substr(e.length- 1,1)&&r.splice(r.length-1,1);return r}(0,a.path),a.queryKey=(i=a.query,s={},i.re place(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(t,e,n){e&&(s[e]=n)})),s),a}var lt=fu nction(t){o(a,t);var r=d(a);function a(t){var i,o=arguments.length>1&&void 0!==a rguments[1]?arguments[1]:{};return n(this,a),i=r.call(this),t&&"object"===e(t)&& (o=t,t=null),t?(t=ft(t),o.hostname=t.host,o.secure="https"===t.protocol||"wss"== =t.protocol,o.port=t.port,t.query&&(o.query=t.query)):o.host&&(o.hostname=ft(o.h ost).host),M(l(i),o),i.secure=null!=o.secure?o.secure:"undefined"!=typeof locati on&&"https:"===location.protocol,o.hostname&&!o.port&&(o.port=i.secure?"443":"80 "),i.hostname=o.hostname||("undefined"!=typeof location?location.hostname:"local host"),i.port=o.port||("undefined"!=typeof location&&location.port?location.port :i.secure?"443":"80"),i.transports=o.transports||["polling","websocket"],i.ready State="",i.writeBuffer=[],i.prevBufferLen=0,i.opts=s({path:"/engine.io",agent:!1 ,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnaut horized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeu nload:!0},o),i.opts.path=i.opts.path.replace(/\/$/,"")+"/","string"==typeof i.op ts.query&&(i.opts.query=J(i.opts.query)),i.id=null,i.upgrades=null,i.pingInterva l=null,i.pingTimeout=null,i.pingTimeoutTimer=null,"function"==typeof addEventLis tener&&(i.opts.closeOnBeforeunload&&addEventListener("beforeunload",(function(){ i.transport&&(i.transport.removeAllListeners(),i.transport.close())}),!1),"local host"!==i.hostname&&(i.offlineEventListener=function(){i.onClose("transport clos e",{description:"network connection lost"})},addEventListener("offline",i.offlin eEventListener,!1))),i.open(),i}return i(a,[{key:"createTransport",value:functio n(t){var e=s({},this.opts.query);e.EIO=4,e.transport=t,this.id&&(e.sid=this.id); var n=s({},this.opts.transportOptions[t],this.opts,{query:e,socket:this,hostname :this.hostname,secure:this.secure,port:this.port});return new ct[t](n)}},{key:"o pen",value:function(){var t,e=this;if(this.opts.rememberUpgrade&&a.priorWebsocke tSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===th is.transports.length)return void this.setTimeoutFn((function(){e.emitReserved("e rror","No transports available")}),0);t=this.transports[0]}this.readyState="open ing";try{t=this.createTransport(t)}catch(t){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)}},{key:"setTransport",value:function(t ){var e=this;this.transport&&this.transport.removeAllListeners(),this.transport= t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on ("error",this.onError.bind(this)).on("close",(function(t){return e.onClose("tran sport close",t)}))}},{key:"probe",value:function(t){var e=this,n=this.createTran sport(t),r=!1;a.priorWebsocketSuccess=!1;var i=function(){r||(n.send([{type:"pin g",data:"probe"}]),n.once("packet",(function(t){if(!r)if("pong"===t.type&&"probe "===t.data){if(e.upgrading=!0,e.emitReserved("upgrading",n),!n)return;a.priorWeb socketSuccess="websocket"===n.name,e.transport.pause((function(){r||"closed"!==e .readyState&&(f(),e.setTransport(n),n.send([{type:"upgrade"}]),e.emitReserved("u pgrade",n),n=null,e.upgrading=!1,e.flush())}))}else{var i=new Error("probe error ");i.transport=n.name,e.emitReserved("upgradeError",i)}})))};function s(){r||(r= !0,f(),n.close(),n=null)}var o=function(t){var r=new Error("probe error: "+t);r. transport=n.name,s(),e.emitReserved("upgradeError",r)};function c(){o("transport closed")}function u(){o("socket closed")}function h(t){n&&t.name!==n.name&&s()} var f=function(){n.removeListener("open",i),n.removeListener("error",o),n.remove Listener("close",c),e.off("close",u),e.off("upgrading",h)};n.once("open",i),n.on ce("error",o),n.once("close",c),this.once("close",u),this.once("upgrading",h),n. open()}},{key:"onOpen",value:function(){if(this.readyState="open",a.priorWebsock etSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush (),"open"===this.readyState&&this.opts.upgrade&&this.transport.pause)for(var t=0 ,e=this.upgrades.length;t<e;t++)this.probe(this.upgrades[t])}},{key:"onPacket",v alue:function(t){if("opening"===this.readyState||"open"===this.readyState||"clos ing"===this.readyState)switch(this.emitReserved("packet",t),this.emitReserved("h eartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"pi ng":this.resetPingTimeout(),this.sendPacket("pong"),this.emitReserved("ping"),th is.emitReserved("pong");break;case"error":var e=new Error("server error");e.code =t.data,this.onError(e);break;case"message":this.emitReserved("data",t.data),thi s.emitReserved("message",t.data)}}},{key:"onHandshake",value:function(t){this.em itReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgr ades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingT imeout=t.pingTimeout,this.maxPayload=t.maxPayload,this.onOpen(),"closed"!==this. readyState&&this.resetPingTimeout()}},{key:"resetPingTimeout",value:function(){v ar t=this;this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this. setTimeoutFn((function(){t.onClose("ping timeout")}),this.pingInterval+this.ping Timeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}},{key:"onDrain",val ue:function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0 ,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}},{key:"flu sh",value:function(){if("closed"!==this.readyState&&this.transport.writable&&!th is.upgrading&&this.writeBuffer.length){var t=this.getWritablePackets();this.tran sport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}},{key:"ge tWritablePackets",value:function(){if(!(this.maxPayload&&"polling"===this.transp ort.name&&this.writeBuffer.length>1))return this.writeBuffer;for(var t,e=1,n=0;n <this.writeBuffer.length;n++){var r=this.writeBuffer[n].data;if(r&&(e+="string"= =typeof(t=r)?function(t){for(var e=0,n=0,r=0,i=t.length;r<i;r++)(e=t.charCodeAt( r))<128?n+=1:e<2048?n+=2:e<55296||e>=57344?n+=3:(r++,n+=4);return n}(t):Math.cei l(1.33*(t.byteLength||t.size))),n>0&&e>this.maxPayload)return this.writeBuffer.s lice(0,n);e+=2}return this.writeBuffer}},{key:"write",value:function(t,e,n){retu rn this.sendPacket("message",t,e,n),this}},{key:"send",value:function(t,e,n){ret urn this.sendPacket("message",t,e,n),this}},{key:"sendPacket",value:function(t,e ,n,r){if("function"==typeof e&&(r=e,e=void 0),"function"==typeof n&&(r=n,n=null) ,"closing"!==this.readyState&&"closed"!==this.readyState){(n=n||{}).compress=!1! ==n.compress;var i={type:t,data:e,options:n};this.emitReserved("packetCreate",i) ,this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}}},{key:"close",v alue:function(){var t=this,e=function(){t.onClose("forced close"),t.transport.cl ose()},n=function n(){t.off("upgrade",n),t.off("upgradeError",n),e()},r=function (){t.once("upgrade",n),t.once("upgradeError",n)};return"opening"!==this.readySta te&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length ?this.once("drain",(function(){t.upgrading?r():e()})):this.upgrading?r():e()),th is}},{key:"onError",value:function(t){a.priorWebsocketSuccess=!1,this.emitReserv ed("error",t),this.onClose("transport error",t)}},{key:"onClose",value:function( t,e){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.rea dyState||(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllLis teners("close"),this.transport.close(),this.transport.removeAllListeners(),"func tion"==typeof removeEventListener&&removeEventListener("offline",this.offlineEve ntListener,!1),this.readyState="closed",this.id=null,this.emitReserved("close",t ,e),this.writeBuffer=[],this.prevBufferLen=0)}},{key:"filterUpgrades",value:func tion(t){for(var e=[],n=0,r=t.length;n<r;n++)~this.transports.indexOf(t[n])&&e.pu sh(t[n]);return e}}]),a}(U);lt.protocol=4;var pt={},dt={};function yt(t,e,n){for (var r=0,i=0,s=n.length;i<s;i++)(r=n.charCodeAt(i))<128?t.setUint8(e++,r):r<2048 ?(t.setUint8(e++,192|r>>6),t.setUint8(e++,128|63&r)):r<55296||r>=57344?(t.setUin t8(e++,224|r>>12),t.setUint8(e++,128|r>>6&63),t.setUint8(e++,128|63&r)):(i++,r=6 5536+((1023&r)<<10|1023&n.charCodeAt(i)),t.setUint8(e++,240|r>>18),t.setUint8(e+ +,128|r>>12&63),t.setUint8(e++,128|r>>6&63),t.setUint8(e++,128|63&r))}function v t(t,n,r){var i=e(r),s=0,o=0,a=0,c=0,u=0,h=0;if("string"===i){if(u=function(t){fo r(var e=0,n=0,r=0,i=t.length;r<i;r++)(e=t.charCodeAt(r))<128?n+=1:e<2048?n+=2:e< 55296||e>=57344?n+=3:(r++,n+=4);return n}(r),u<32)t.push(160|u),h=1;else if(u<25 6)t.push(217,u),h=2;else if(u<65536)t.push(218,u>>8,u),h=3;else{if(!(u<429496729 6))throw new Error("String too long");t.push(219,u>>24,u>>16,u>>8,u),h=5}return n.push({_str:r,_length:u,_offset:t.length}),h+u}if("number"===i)return Math.floo r(r)===r&&isFinite(r)?r>=0?r<128?(t.push(r),1):r<256?(t.push(204,r),2):r<65536?( t.push(205,r>>8,r),3):r<4294967296?(t.push(206,r>>24,r>>16,r>>8,r),5):(a=r/Math. pow(2,32)>>0,c=r>>>0,t.push(207,a>>24,a>>16,a>>8,a,c>>24,c>>16,c>>8,c),9):r>=-32 ?(t.push(r),1):r>=-128?(t.push(208,r),2):r>=-32768?(t.push(209,r>>8,r),3):r>=-21 47483648?(t.push(210,r>>24,r>>16,r>>8,r),5):(a=Math.floor(r/Math.pow(2,32)),c=r> >>0,t.push(211,a>>24,a>>16,a>>8,a,c>>24,c>>16,c>>8,c),9):(t.push(203),n.push({_f loat:r,_length:8,_offset:t.length}),9);if("object"===i){if(null===r)return t.pus h(192),1;if(Array.isArray(r)){if((u=r.length)<16)t.push(144|u),h=1;else if(u<655 36)t.push(220,u>>8,u),h=3;else{if(!(u<4294967296))throw new Error("Array too lar ge");t.push(221,u>>24,u>>16,u>>8,u),h=5}for(s=0;s<u;s++)h+=vt(t,n,r[s]);return h }if(r instanceof Date){var f=r.getTime();return a=Math.floor(f/Math.pow(2,32)),c =f>>>0,t.push(215,0,a>>24,a>>16,a>>8,a,c>>24,c>>16,c>>8,c),10}if(r instanceof Ar rayBuffer){if((u=r.byteLength)<256)t.push(196,u),h=2;else if(u<65536)t.push(197, u>>8,u),h=3;else{if(!(u<4294967296))throw new Error("Buffer too large");t.push(1 98,u>>24,u>>16,u>>8,u),h=5}return n.push({_bin:r,_length:u,_offset:t.length}),h+ u}if("function"==typeof r.toJSON)return vt(t,n,r.toJSON());var l=[],p="",d=Objec t.keys(r);for(s=0,o=d.length;s<o;s++)"function"!=typeof r[p=d[s]]&&l.push(p);if( (u=l.length)<16)t.push(128|u),h=1;else if(u<65536)t.push(222,u>>8,u),h=3;else{if (!(u<4294967296))throw new Error("Object too large");t.push(223,u>>24,u>>16,u>>8 ,u),h=5}for(s=0;s<u;s++)h+=vt(t,n,p=l[s]),h+=vt(t,n,r[p]);return h}if("boolean"= ==i)return t.push(r?195:194),1;if("undefined"===i)return t.push(212,0,0),3;throw new Error("Could not encode")}var gt=function(t){var e=[],n=[],r=vt(e,n,t),i=ne w ArrayBuffer(r),s=new DataView(i),o=0,a=0,c=-1;n.length>0&&(c=n[0]._offset);for (var u,h=0,f=0,l=0,p=e.length;l<p;l++)if(s.setUint8(a+l,e[l]),l+1===c){if(h=(u=n [o])._length,f=a+c,u._bin)for(var d=new Uint8Array(u._bin),y=0;y<h;y++)s.setUint 8(f+y,d[y]);else u._str?yt(s,f,u._str):void 0!==u._float&&s.setFloat64(f,u._floa t);a+=h,n[++o]&&(c=n[o]._offset)}return i};function mt(t){if(this._offset=0,t in stanceof ArrayBuffer)this._buffer=t,this._view=new DataView(this._buffer);else{i f(!ArrayBuffer.isView(t))throw new Error("Invalid argument");this._buffer=t.buff er,this._view=new DataView(this._buffer,t.byteOffset,t.byteLength)}}mt.prototype ._array=function(t){for(var e=new Array(t),n=0;n<t;n++)e[n]=this._parse();return e},mt.prototype._map=function(t){for(var e={},n=0;n<t;n++)e[this._parse()]=this ._parse();return e},mt.prototype._str=function(t){var e=function(t,e,n){for(var r="",i=0,s=e,o=e+n;s<o;s++){var a=t.getUint8(s);if(0!=(128&a))if(192!=(224&a))if (224!=(240&a)){if(240!=(248&a))throw new Error("Invalid byte "+a.toString(16));( i=(7&a)<<18|(63&t.getUint8(++s))<<12|(63&t.getUint8(++s))<<6|(63&t.getUint8(++s) )<<0)>=65536?(i-=65536,r+=String.fromCharCode(55296+(i>>>10),56320+(1023&i))):r+ =String.fromCharCode(i)}else r+=String.fromCharCode((15&a)<<12|(63&t.getUint8(++ s))<<6|(63&t.getUint8(++s))<<0);else r+=String.fromCharCode((31&a)<<6|63&t.getUi nt8(++s));else r+=String.fromCharCode(a)}return r}(this._view,this._offset,t);re turn this._offset+=t,e},mt.prototype._bin=function(t){var e=this._buffer.slice(t his._offset,this._offset+t);return this._offset+=t,e},mt.prototype._parse=functi on(){var t,e=this._view.getUint8(this._offset++),n=0,r=0,i=0,s=0;if(e<192)return e<128?e:e<144?this._map(15&e):e<160?this._array(15&e):this._str(31&e);if(e>223) return-1*(255-e+1);switch(e){case 192:return null;case 194:return!1;case 195:ret urn!0;case 196:return n=this._view.getUint8(this._offset),this._offset+=1,this._ bin(n);case 197:return n=this._view.getUint16(this._offset),this._offset+=2,this ._bin(n);case 198:return n=this._view.getUint32(this._offset),this._offset+=4,th is._bin(n);case 199:return n=this._view.getUint8(this._offset),r=this._view.getI nt8(this._offset+1),this._offset+=2,[r,this._bin(n)];case 200:return n=this._vie w.getUint16(this._offset),r=this._view.getInt8(this._offset+2),this._offset+=3,[ r,this._bin(n)];case 201:return n=this._view.getUint32(this._offset),r=this._vie w.getInt8(this._offset+4),this._offset+=5,[r,this._bin(n)];case 202:return t=thi s._view.getFloat32(this._offset),this._offset+=4,t;case 203:return t=this._view. getFloat64(this._offset),this._offset+=8,t;case 204:return t=this._view.getUint8 (this._offset),this._offset+=1,t;case 205:return t=this._view.getUint16(this._of fset),this._offset+=2,t;case 206:return t=this._view.getUint32(this._offset),thi s._offset+=4,t;case 207:return i=this._view.getUint32(this._offset)*Math.pow(2,3 2),s=this._view.getUint32(this._offset+4),this._offset+=8,i+s;case 208:return t= this._view.getInt8(this._offset),this._offset+=1,t;case 209:return t=this._view. getInt16(this._offset),this._offset+=2,t;case 210:return t=this._view.getInt32(t his._offset),this._offset+=4,t;case 211:return i=this._view.getInt32(this._offse t)*Math.pow(2,32),s=this._view.getUint32(this._offset+4),this._offset+=8,i+s;cas e 212:return r=this._view.getInt8(this._offset),this._offset+=1,0===r?void(this. _offset+=1):[r,this._bin(1)];case 213:return r=this._view.getInt8(this._offset), this._offset+=1,[r,this._bin(2)];case 214:return r=this._view.getInt8(this._offs et),this._offset+=1,[r,this._bin(4)];case 215:return r=this._view.getInt8(this._ offset),this._offset+=1,0===r?(i=this._view.getInt32(this._offset)*Math.pow(2,32 ),s=this._view.getUint32(this._offset+4),this._offset+=8,new Date(i+s)):[r,this. _bin(8)];case 216:return r=this._view.getInt8(this._offset),this._offset+=1,[r,t his._bin(16)];case 217:return n=this._view.getUint8(this._offset),this._offset+= 1,this._str(n);case 218:return n=this._view.getUint16(this._offset),this._offset +=2,this._str(n);case 219:return n=this._view.getUint32(this._offset),this._offs et+=4,this._str(n);case 220:return n=this._view.getUint16(this._offset),this._of fset+=2,this._array(n);case 221:return n=this._view.getUint32(this._offset),this ._offset+=4,this._array(n);case 222:return n=this._view.getUint16(this._offset), this._offset+=2,this._map(n);case 223:return n=this._view.getUint32(this._offset ),this._offset+=4,this._map(n)}throw new Error("Could not parse")};var _t=functi on(t){var e=new mt(t),n=e._parse();if(e._offset!==t.byteLength)throw new Error(t .byteLength-e._offset+" trailing bytes");return n};dt.encode=gt,dt.decode=_t;var bt,kt={exports:{}};!function(t){function e(t){if(t)return function(t){for(var n in e.prototype)t[n]=e.prototype[n];return t}(t)}t.exports=e,e.prototype.on=e.pr ototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{ },(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},e.prototype. once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.f n=e,this.on(t,n),this},e.prototype.off=e.prototype.removeListener=e.prototype.re moveAllListeners=e.prototype.removeEventListener=function(t,e){if(this._callback s=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r =this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete t his._callbacks["$"+t],this;for(var i=0;i<r.length;i++)if((n=r[i])===e||n.fn===e) {r.splice(i,1);break}return 0===r.length&&delete this._callbacks["$"+t],this},e. prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Arr ay(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1 ]=arguments[r];if(n){r=0;for(var i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this ,e)}return this},e.prototype.listeners=function(t){return this._callbacks=this._ callbacks||{},this._callbacks["$"+t]||[]},e.prototype.hasListeners=function(t){r eturn!!this.listeners(t).length}}(kt);var wt=dt,Ot=kt.exports,Et=pt.protocol=5,C t=bt=pt.PacketType={CONNECT:0,DISCONNECT:1,EVENT:2,ACK:3,CONNECT_ERROR:4},Rt=Num ber.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)= ==t},Tt=function(t){return"string"==typeof t},St=function(t){return"[object Obje ct]"===Object.prototype.toString.call(t)};function At(){}function Lt(){}At.proto type.encode=function(t){return[wt.encode(t)]},Ot(Lt.prototype),Lt.prototype.add= function(t){var e=wt.decode(t);this.checkPacket(e),this.emit("decoded",e)},Lt.pr ototype.checkPacket=function(t){if(!(Rt(t.type)&&t.type>=Ct.CONNECT&&t.type<=Ct. CONNECT_ERROR))throw new Error("invalid packet type");if(!Tt(t.nsp))throw new Er ror("invalid namespace");if(!function(t){switch(t.type){case Ct.CONNECT:return v oid 0===t.data||St(t.data);case Ct.DISCONNECT:return void 0===t.data;case Ct.CON NECT_ERROR:return Tt(t.data)||St(t.data);default:return Array.isArray(t.data)}}( t))throw new Error("invalid payload");if(!(void 0===t.id||Rt(t.id)))throw new Er ror("invalid packet id")},Lt.prototype.destroy=function(){};var xt=pt.Encoder=At ,Bt=pt.Decoder=Lt,Ut=Object.freeze(t({__proto__:null,default:pt,protocol:Et,get PacketType(){return bt},Encoder:xt,Decoder:Bt},[pt]));function jt(t,e,n){return t.on(e,n),function(){t.off(e,n)}}var Pt=Object.freeze({connect:1,connect_error:1 ,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),Nt=function(t){o( r,t);var e=d(r);function r(t,i,s){var o;return n(this,r),(o=e.call(this)).connec ted=!1,o.receiveBuffer=[],o.sendBuffer=[],o.ids=0,o.acks={},o.flags={},o.io=t,o. nsp=i,s&&s.auth&&(o.auth=s.auth),o.io._autoConnect&&o.open(),o}return i(r,[{key: "disconnected",get:function(){return!this.connected}},{key:"subEvents",value:fun ction(){if(!this.subs){var t=this.io;this.subs=[jt(t,"open",this.onopen.bind(thi s)),jt(t,"packet",this.onpacket.bind(this)),jt(t,"error",this.onerror.bind(this) ),jt(t,"close",this.onclose.bind(this))]}}},{key:"active",get:function(){return! !this.subs}},{key:"connect",value:function(){return this.connected||(this.subEve nts(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.o nopen()),this}},{key:"open",value:function(){return this.connect()}},{key:"send" ,value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arg uments[n];return e.unshift("message"),this.emit.apply(this,e),this}},{key:"emit" ,value:function(t){if(Pt.hasOwnProperty(t))throw new Error('"'+t+'" is a reserve d event name');for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r -1]=arguments[r];n.unshift(t);var i={type:bt.EVENT,data:n,options:{}};if(i.optio ns.compress=!1!==this.flags.compress,"function"==typeof n[n.length-1]){var s=thi s.ids++,o=n.pop();this._registerAckCallback(s,o),i.id=s}var a=this.io.engine&&th is.io.engine.transport&&this.io.engine.transport.writable,c=this.flags.volatile& &(!a||!this.connected);return c||(this.connected?(this.notifyOutgoingListeners(i ),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}},{key:"_registerA ckCallback",value:function(t,e){var n=this,r=this.flags.timeout;if(void 0!==r){v ar i=this.io.setTimeoutFn((function(){delete n.acks[t];for(var r=0;r<n.sendBuffe r.length;r++)n.sendBuffer[r].id===t&&n.sendBuffer.splice(r,1);e.call(n,new Error ("operation has timed out"))}),r);this.acks[t]=function(){n.io.clearTimeoutFn(i) ;for(var t=arguments.length,r=new Array(t),s=0;s<t;s++)r[s]=arguments[s];e.apply (n,[null].concat(r))}}else this.acks[t]=e}},{key:"packet",value:function(t){t.ns p=this.nsp,this.io._packet(t)}},{key:"onopen",value:function(){var t=this;"funct ion"==typeof this.auth?this.auth((function(e){t.packet({type:bt.CONNECT,data:e}) })):this.packet({type:bt.CONNECT,data:this.auth})}},{key:"onerror",value:functio n(t){this.connected||this.emitReserved("connect_error",t)}},{key:"onclose",value :function(t,e){this.connected=!1,delete this.id,this.emitReserved("disconnect",t ,e)}},{key:"onpacket",value:function(t){if(t.nsp===this.nsp)switch(t.type){case bt.CONNECT:if(t.data&&t.data.sid){var e=t.data.sid;this.onconnect(e)}else this.e mitReserved("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 informa tion here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case b t.EVENT:case bt.BINARY_EVENT:this.onevent(t);break;case bt.ACK:case bt.BINARY_AC K:this.onack(t);break;case bt.DISCONNECT:this.ondisconnect();break;case bt.CONNE CT_ERROR:this.destroy();var n=new Error(t.data.message);n.data=t.data.data,this. emitReserved("connect_error",n)}}},{key:"onevent",value:function(t){var e=t.data ||[];null!=t.id&&e.push(this.ack(t.id)),this.connected?this.emitEvent(e):this.re ceiveBuffer.push(Object.freeze(e))}},{key:"emitEvent",value:function(t){if(this. _anyListeners&&this._anyListeners.length){var e,n=g(this._anyListeners.slice()); try{for(n.s();!(e=n.n()).done;){e.value.apply(this,t)}}catch(t){n.e(t)}finally{n .f()}}y(a(r.prototype),"emit",this).apply(this,t)}},{key:"ack",value:function(t) {var e=this,n=!1;return function(){if(!n){n=!0;for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];e.packet({type:bt.ACK,id:t,data:i})}}}},{ key:"onack",value:function(t){var e=this.acks[t.id];"function"==typeof e&&(e.app ly(this,t.data),delete this.acks[t.id])}},{key:"onconnect",value:function(t){thi s.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}},{key :"emitBuffered",value:function(){var t=this;this.receiveBuffer.forEach((function (e){return t.emitEvent(e)})),this.receiveBuffer=[],this.sendBuffer.forEach((func tion(e){t.notifyOutgoingListeners(e),t.packet(e)})),this.sendBuffer=[]}},{key:"o ndisconnect",value:function(){this.destroy(),this.onclose("io server disconnect" )}},{key:"destroy",value:function(){this.subs&&(this.subs.forEach((function(t){r eturn t()})),this.subs=void 0),this.io._destroy(this)}},{key:"disconnect",value: function(){return this.connected&&this.packet({type:bt.DISCONNECT}),this.destroy (),this.connected&&this.onclose("io client disconnect"),this}},{key:"close",valu e:function(){return this.disconnect()}},{key:"compress",value:function(t){return this.flags.compress=t,this}},{key:"volatile",get:function(){return this.flags.v olatile=!0,this}},{key:"timeout",value:function(t){return this.flags.timeout=t,t his}},{key:"onAny",value:function(t){return this._anyListeners=this._anyListener s||[],this._anyListeners.push(t),this}},{key:"prependAny",value:function(t){retu rn this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this} },{key:"offAny",value:function(t){if(!this._anyListeners)return this;if(t){for(v ar e=this._anyListeners,n=0;n<e.length;n++)if(t===e[n])return e.splice(n,1),this }else this._anyListeners=[];return this}},{key:"listenersAny",value:function(){r eturn this._anyListeners||[]}},{key:"onAnyOutgoing",value:function(t){return thi s._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListener s.push(t),this}},{key:"prependAnyOutgoing",value:function(t){return this._anyOut goingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift (t),this}},{key:"offAnyOutgoing",value:function(t){if(!this._anyOutgoingListener s)return this;if(t){for(var e=this._anyOutgoingListeners,n=0;n<e.length;n++)if(t ===e[n])return e.splice(n,1),this}else this._anyOutgoingListeners=[];return this }},{key:"listenersAnyOutgoing",value:function(){return this._anyOutgoingListener s||[]}},{key:"notifyOutgoingListeners",value:function(t){if(this._anyOutgoingLis teners&&this._anyOutgoingListeners.length){var e,n=g(this._anyOutgoingListeners. slice());try{for(n.s();!(e=n.n()).done;){e.value.apply(this,t.data)}}catch(t){n. e(t)}finally{n.f()}}}}]),r}(U);function qt(t){t=t||{},this.ms=t.min||100,this.ma x=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitte r:0,this.attempts=0}qt.prototype.duration=function(){var t=this.ms*Math.pow(this .factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this .jitter*t);t=0==(1&Math.floor(10*e))?t-n:t+n}return 0|Math.min(t,this.max)},qt.p rototype.reset=function(){this.attempts=0},qt.prototype.setMin=function(t){this. ms=t},qt.prototype.setMax=function(t){this.max=t},qt.prototype.setJitter=functio n(t){this.jitter=t};var Mt=function(t){o(s,t);var r=d(s);function s(t,i){var o,a ;n(this,s),(o=r.call(this)).nsps={},o.subs=[],t&&"object"===e(t)&&(i=t,t=void 0) ,(i=i||{}).path=i.path||"/socket.io",o.opts=i,M(l(o),i),o.reconnection(!1!==i.re connection),o.reconnectionAttempts(i.reconnectionAttempts||1/0),o.reconnectionDe lay(i.reconnectionDelay||1e3),o.reconnectionDelayMax(i.reconnectionDelayMax||5e3 ),o.randomizationFactor(null!==(a=i.randomizationFactor)&&void 0!==a?a:.5),o.bac koff=new qt({min:o.reconnectionDelay(),max:o.reconnectionDelayMax(),jitter:o.ran domizationFactor()}),o.timeout(null==i.timeout?2e4:i.timeout),o._readyState="clo sed",o.uri=t;var c=i.parser||Ut;return o.encoder=new c.Encoder,o.decoder=new c.D ecoder,o._autoConnect=!1!==i.autoConnect,o._autoConnect&&o.open(),o}return i(s,[ {key:"reconnection",value:function(t){return arguments.length?(this._reconnectio n=!!t,this):this._reconnection}},{key:"reconnectionAttempts",value:function(t){r eturn void 0===t?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)} },{key:"reconnectionDelay",value:function(t){var e;return void 0===t?this._recon nectionDelay:(this._reconnectionDelay=t,null===(e=this.backoff)||void 0===e||e.s etMin(t),this)}},{key:"randomizationFactor",value:function(t){var e;return void 0===t?this._randomizationFactor:(this._randomizationFactor=t,null===(e=this.back off)||void 0===e||e.setJitter(t),this)}},{key:"reconnectionDelayMax",value:funct ion(t){var e;return void 0===t?this._reconnectionDelayMax:(this._reconnectionDel ayMax=t,null===(e=this.backoff)||void 0===e||e.setMax(t),this)}},{key:"timeout", value:function(t){return arguments.length?(this._timeout=t,this):this._timeout}} ,{key:"maybeReconnectOnOpen",value:function(){!this._reconnecting&&this._reconne ction&&0===this.backoff.attempts&&this.reconnect()}},{key:"open",value:function( t){var e=this;if(~this._readyState.indexOf("open"))return this;this.engine=new l t(this.uri,this.opts);var n=this.engine,r=this;this._readyState="opening",this.s kipReconnect=!1;var i=jt(n,"open",(function(){r.onopen(),t&&t()})),s=jt(n,"error ",(function(n){r.cleanup(),r._readyState="closed",e.emitReserved("error",n),t?t( n):r.maybeReconnectOnOpen()}));if(!1!==this._timeout){var o=this._timeout;0===o& &i();var a=this.setTimeoutFn((function(){i(),n.close(),n.emit("error",new Error( "timeout"))}),o);this.opts.autoUnref&&a.unref(),this.subs.push((function(){clear Timeout(a)}))}return this.subs.push(i),this.subs.push(s),this}},{key:"connect",v alue:function(t){return this.open(t)}},{key:"onopen",value:function(){this.clean up(),this._readyState="open",this.emitReserved("open");var t=this.engine;this.su bs.push(jt(t,"ping",this.onping.bind(this)),jt(t,"data",this.ondata.bind(this)), jt(t,"error",this.onerror.bind(this)),jt(t,"close",this.onclose.bind(this)),jt(t his.decoder,"decoded",this.ondecoded.bind(this)))}},{key:"onping",value:function (){this.emitReserved("ping")}},{key:"ondata",value:function(t){this.decoder.add( t)}},{key:"ondecoded",value:function(t){this.emitReserved("packet",t)}},{key:"on error",value:function(t){this.emitReserved("error",t)}},{key:"socket",value:func tion(t,e){var n=this.nsps[t];return n||(n=new Nt(this,t,e),this.nsps[t]=n),n}},{ key:"_destroy",value:function(t){for(var e=0,n=Object.keys(this.nsps);e<n.length ;e++){var r=n[e];if(this.nsps[r].active)return}this._close()}},{key:"_packet",va lue:function(t){for(var e=this.encoder.encode(t),n=0;n<e.length;n++)this.engine. write(e[n],t.options)}},{key:"cleanup",value:function(){this.subs.forEach((funct ion(t){return t()})),this.subs.length=0,this.decoder.destroy()}},{key:"_close",v alue:function(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}},{key:"disconnect",value:function(){r eturn this._close()}},{key:"onclose",value:function(t,e){this.cleanup(),this.bac koff.reset(),this._readyState="closed",this.emitReserved("close",t,e),this._reco nnection&&!this.skipReconnect&&this.reconnect()}},{key:"reconnect",value:functio n(){var t=this;if(this._reconnecting||this.skipReconnect)return this;var e=this; if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.e mitReserved("reconnect_failed"),this._reconnecting=!1;else{var n=this.backoff.du ration();this._reconnecting=!0;var r=this.setTimeoutFn((function(){e.skipReconne ct||(t.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.o pen((function(n){n?(e._reconnecting=!1,e.reconnect(),t.emitReserved("reconnect_e rror",n)):e.onreconnect()})))}),n);this.opts.autoUnref&&r.unref(),this.subs.push ((function(){clearTimeout(r)}))}}},{key:"onreconnect",value:function(){var t=thi s.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved( "reconnect",t)}}]),s}(U),Dt={};function It(t,n){"object"===e(t)&&(n=t,t=void 0); var r,i=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1] :"",n=arguments.length>2?arguments[2]:void 0,r=t;n=n||"undefined"!=typeof locati on&&location,null==t&&(t=n.protocol+"//"+n.host),"string"==typeof t&&("/"===t.ch arAt(0)&&(t="/"===t.charAt(1)?n.protocol+t:n.host+t),/^(https?|wss?):\/\//.test( t)||(t=void 0!==n?n.protocol+"//"+t:"https://"+t),r=ft(t)),r.port||(/^(http|ws)$ /.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")), r.path=r.path||"/";var i=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r .id=r.protocol+"://"+i+":"+r.port+e,r.href=r.protocol+"://"+i+(n&&n.port===r.por t?"":":"+r.port),r}(t,(n=n||{}).path||"/socket.io"),s=i.source,o=i.id,a=i.path,c =Dt[o]&&a in Dt[o].nsps;return n.forceNew||n["force new connection"]||!1===n.mul tiplex||c?r=new Mt(s,n):(Dt[o]||(Dt[o]=new Mt(s,n)),r=Dt[o]),i.query&&!n.query&& (n.query=i.queryKey),r.socket(i.path,n)}return s(It,{Manager:Mt,Socket:Nt,io:It, connect:It}),It})); !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.expor ts=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof gl obalThis?globalThis:t||self).io=e()}(this,(function(){"use strict";function t(t, e){return e.forEach((function(e){e&&"string"!=typeof e&&!Array.isArray(e)&&Objec t.keys(e).forEach((function(n){if("default"!==n&&!(n in t)){var r=Object.getOwnP ropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:func tion(){return e[n]}})}}))})),Object.freeze(t)}function e(t){return e="function"= =typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:fu nction(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbo l.prototype?"symbol":typeof t},e(t)}function n(t,e){if(!(t instanceof e))throw n ew TypeError("Cannot call a class as a function")}function r(t,e){for(var n=0;n< e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value" in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1} ),t}function o(){return o=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype. hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},o.apply(this,arguments)}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{co nstructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"proto type",{writable:!1}),e&&c(t,e)}function a(t){return a=Object.setPrototypeOf?Obje ct.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t )},a(t)}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bin d():function(t,e){return t.__proto__=e,t},c(t,e)}function u(){if("undefined"==ty peof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if( "function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Refl ect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function h(t,e,n ){return h=u()?Reflect.construct.bind():function(t,e,n){var r=[null];r.push.appl y(r,e);var i=new(Function.bind.apply(t,r));return n&&c(i,n.prototype),i},h.apply (null,arguments)}function f(t){var e="function"==typeof Map?new Map:void 0;retur n f=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[nativ e code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super exp ression must either be null or a function");if(void 0!==e){if(e.has(t))return e. get(t);e.set(t,r)}function r(){return h(t,arguments,a(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writab le:!0,configurable:!0}}),c(r,t)},f(t)}function p(t){if(void 0===t)throw new Refe renceError("this hasn't been initialised - super() hasn't been called");return t }function l(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(vo id 0!==e)throw new TypeError("Derived constructors may only return object or und efined");return p(t)}function d(t){var e=u();return function(){var n,r=a(t);if(e ){var i=a(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(th is,arguments);return l(this,n)}}function y(t,e){for(;!Object.prototype.hasOwnPro perty.call(t,e)&&null!==(t=a(t)););return t}function v(){return v="undefined"!=t ypeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=y(t,e);if(r) {var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.le ngth<3?t:n):i.value}},v.apply(this,arguments)}function g(t,e){(null==e||e>t.leng th)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function m(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if (!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return g( t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.c onstructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments "===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(t,e):void 0}}(t))||e &&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:fun ction(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\ nIn order to be iterable, non-array objects must have a [Symbol.iterator]() meth od.")}var o,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next ();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return ||n.return()}finally{if(a)throw o}}}}var _=Object.create(null);_.open="0",_.clos e="1",_.ping="2",_.pong="3",_.message="4",_.upgrade="5",_.noop="6";var b=Object. create(null);Object.keys(_).forEach((function(t){b[_[t]]=t}));for(var k={type:"e rror",data:"parser error"},w="function"==typeof Blob||"undefined"!=typeof Blob&& "[object BlobConstructor]"===Object.prototype.toString.call(Blob),O="function"== typeof ArrayBuffer,E=function(t,e,n){var r,i=t.type,o=t.data;return w&&o instanc eof Blob?e?n(o):C(o,n):O&&(o instanceof ArrayBuffer||(r=o,"function"==typeof Arr ayBuffer.isView?ArrayBuffer.isView(r):r&&r.buffer instanceof ArrayBuffer))?e?n(o ):C(new Blob([o]),n):n(_[i]+(o||""))},C=function(t,e){var n=new FileReader;retur n n.onload=function(){var t=n.result.split(",")[1];e("b"+t)},n.readAsDataURL(t)} ,R="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",T="undefin ed"==typeof Uint8Array?[]:new Uint8Array(256),S=0;S<R.length;S++)T[R.charCodeAt( S)]=S;var A="function"==typeof ArrayBuffer,L=function(t,e){if("string"!=typeof t )return{type:"message",data:B(t,e)};var n=t.charAt(0);return"b"===n?{type:"messa ge",data:x(t.substring(1),e)}:b[n]?t.length>1?{type:b[n],data:t.substring(1)}:{t ype:b[n]}:k},x=function(t,e){if(A){var n=function(t){var e,n,r,i,o,s=.75*t.lengt h,a=t.length,c=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);var u=new A rrayBuffer(s),h=new Uint8Array(u);for(e=0;e<a;e+=4)n=T[t.charCodeAt(e)],r=T[t.ch arCodeAt(e+1)],i=T[t.charCodeAt(e+2)],o=T[t.charCodeAt(e+3)],h[c++]=n<<2|r>>4,h[ c++]=(15&r)<<4|i>>2,h[c++]=(3&i)<<6|63&o;return u}(t);return B(n,e)}return{base6 4:!0,data:t}},B=function(t,e){return"blob"===e&&t instanceof ArrayBuffer?new Blo b([t]):t},U=String.fromCharCode(30);function j(t){if(t)return function(t){for(va r e in j.prototype)t[e]=j.prototype[e];return t}(t)}j.prototype.on=j.prototype.a ddEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._ callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},j.prototype.once=func tion(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this. on(t,n),this},j.prototype.off=j.prototype.removeListener=j.prototype.removeAllLi steners=j.prototype.removeEventListener=function(t,e){if(this._callbacks=this._c allbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._ca llbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._call backs["$"+t],this;for(var i=0;i<r.length;i++)if((n=r[i])===e||n.fn===e){r.splice (i,1);break}return 0===r.length&&delete this._callbacks["$"+t],this},j.prototype .emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(argume nts.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=argumen ts[r];if(n){r=0;for(var i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,e)}retur n this},j.prototype.emitReserved=j.prototype.emit,j.prototype.listeners=function (t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},j.pro totype.hasListeners=function(t){return!!this.listeners(t).length};var P="undefin ed"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")( );function N(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[ r-1]=arguments[r];return n.reduce((function(e,n){return t.hasOwnProperty(n)&&(e[ n]=t[n]),e}),{})}var q=setTimeout,M=clearTimeout;function D(t,e){e.useNativeTime rs?(t.setTimeoutFn=q.bind(P),t.clearTimeoutFn=M.bind(P)):(t.setTimeoutFn=setTime out.bind(P),t.clearTimeoutFn=clearTimeout.bind(P))}var I,F=function(t){s(r,t);va r e=d(r);function r(t,i,o){var s;return n(this,r),(s=e.call(this,t)).description =i,s.context=o,s.type="TransportError",s}return i(r)}(f(Error)),H=function(t){s( r,t);var e=d(r);function r(t){var i;return n(this,r),(i=e.call(this)).writable=! 1,D(p(i),t),i.opts=t,i.query=t.query,i.readyState="",i.socket=t.socket,i}return i(r,[{key:"onError",value:function(t,e,n){return v(a(r.prototype),"emitReserved" ,this).call(this,"error",new F(t,e,n)),this}},{key:"open",value:function(){retur n"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",th is.doOpen()),this}},{key:"close",value:function(){return"opening"!==this.readySt ate&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}},{key:"send ",value:function(t){"open"===this.readyState&&this.write(t)}},{key:"onOpen",valu e:function(){this.readyState="open",this.writable=!0,v(a(r.prototype),"emitReser ved",this).call(this,"open")}},{key:"onData",value:function(t){var e=L(t,this.so cket.binaryType);this.onPacket(e)}},{key:"onPacket",value:function(t){v(a(r.prot otype),"emitReserved",this).call(this,"packet",t)}},{key:"onClose",value:functio n(t){this.readyState="closed",v(a(r.prototype),"emitReserved",this).call(this,"c lose",t)}}]),r}(j),$="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuv wxyz-_".split(""),z={},V=0,W=0;function X(t){var e="";do{e=$[t%64]+e,t=Math.floo r(t/64)}while(t>0);return e}function K(){var t=X(+new Date);return t!==I?(V=0,I= t):t+"."+X(V++)}for(;W<64;W++)z[$[W]]=W;function J(t){var e="";for(var n in t)t. hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURICom ponent(t[n]));return e}function Y(t){for(var e={},n=t.split("&"),r=0,i=n.length; r<i;r++){var o=n[r].split("=");e[decodeURIComponent(o[0])]=decodeURIComponent(o[ 1])}return e}var G=!1;try{G="undefined"!=typeof XMLHttpRequest&&"withCredentials "in new XMLHttpRequest}catch(t){}var Q=G;function Z(t){var e=t.xdomain;try{if("u ndefined"!=typeof XMLHttpRequest&&(!e||Q))return new XMLHttpRequest}catch(t){}if (!e)try{return new(P[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP" )}catch(t){}}function tt(){}var et=null!=new Z({xdomain:!1}).responseType,nt=fun ction(t){s(r,t);var e=d(r);function r(t){var i;if(n(this,r),(i=e.call(this,t)).p olling=!1,"undefined"!=typeof location){var o="https:"===location.protocol,s=loc ation.port;s||(s=o?"443":"80"),i.xd="undefined"!=typeof location&&t.hostname!==l ocation.hostname||s!==t.port,i.xs=t.secure!==o}var a=t&&t.forceBase64;return i.s upportsBinary=et&&!a,i}return i(r,[{key:"name",get:function(){return"polling"}}, {key:"doOpen",value:function(){this.poll()}},{key:"pause",value:function(t){var e=this;this.readyState="pausing";var n=function(){e.readyState="paused",t()};if( this.polling||!this.writable){var r=0;this.polling&&(r++,this.once("pollComplete ",(function(){--r||n()}))),this.writable||(r++,this.once("drain",(function(){--r ||n()})))}else n()}},{key:"poll",value:function(){this.polling=!0,this.doPoll(), this.emitReserved("poll")}},{key:"onData",value:function(t){var e=this;(function (t,e){for(var n=t.split(U),r=[],i=0;i<n.length;i++){var o=L(n[i],e);if(r.push(o) ,"error"===o.type)break}return r})(t,this.socket.binaryType).forEach((function(t ){if("opening"===e.readyState&&"open"===t.type&&e.onOpen(),"close"===t.type)retu rn e.onClose({description:"transport closed by the server"}),!1;e.onPacket(t)})) ,"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"), "open"===this.readyState&&this.poll())}},{key:"doClose",value:function(){var t=t his,e=function(){t.write([{type:"close"}])};"open"===this.readyState?e():this.on ce("open",e)}},{key:"write",value:function(t){var e=this;this.writable=!1,functi on(t,e){var n=t.length,r=new Array(n),i=0;t.forEach((function(t,o){E(t,!1,(funct ion(t){r[o]=t,++i===n&&e(r.join(U))}))}))}(t,(function(t){e.doWrite(t,(function( ){e.writable=!0,e.emitReserved("drain")}))}))}},{key:"uri",value:function(){var t=this.query||{},e=this.opts.secure?"https":"http",n="";!1!==this.opts.timestamp Requests&&(t[this.opts.timestampParam]=K()),this.supportsBinary||t.sid||(t.b64=1 ),this.opts.port&&("https"===e&&443!==Number(this.opts.port)||"http"===e&&80!==N umber(this.opts.port))&&(n=":"+this.opts.port);var r=J(t);return e+"://"+(-1!==t his.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+n+ this.opts.path+(r.length?"?"+r:"")}},{key:"request",value:function(){var t=argum ents.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(t,{xd:this.xd,xs:t his.xs},this.opts),new rt(this.uri(),t)}},{key:"doWrite",value:function(t,e){var n=this,r=this.request({method:"POST",data:t});r.on("success",e),r.on("error",(f unction(t,e){n.onError("xhr post error",t,e)}))}},{key:"doPoll",value:function() {var t=this,e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(f unction(e,n){t.onError("xhr poll error",e,n)})),this.pollXhr=e}}]),r}(H),rt=func tion(t){s(r,t);var e=d(r);function r(t,i){var o;return n(this,r),D(p(o=e.call(th is)),i),o.opts=i,o.method=i.method||"GET",o.uri=t,o.async=!1!==i.async,o.data=vo id 0!==i.data?i.data:null,o.create(),o}return i(r,[{key:"create",value:function( ){var t=this,e=N(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers ","rejectUnauthorized","autoUnref");e.xdomain=!!this.opts.xd,e.xscheme=!!this.op ts.xs;var n=this.xhr=new Z(e);try{n.open(this.method,this.uri,this.async);try{if (this.opts.extraHeaders)for(var i in n.setDisableHeaderCheck&&n.setDisableHeader Check(!0),this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(i)&&n.set RequestHeader(i,this.opts.extraHeaders[i])}catch(t){}if("POST"===this.method)try {n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{n.s etRequestHeader("Accept","*/*")}catch(t){}"withCredentials"in n&&(n.withCredenti als=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.re questTimeout),n.onreadystatechange=function(){4===n.readyState&&(200===n.status| |1223===n.status?t.onLoad():t.setTimeoutFn((function(){t.onError("number"==typeo f n.status?n.status:0)}),0))},n.send(this.data)}catch(e){return void this.setTim eoutFn((function(){t.onError(e)}),0)}"undefined"!=typeof document&&(this.index=r .requestsCount++,r.requests[this.index]=this)}},{key:"onError",value:function(t) {this.emitReserved("error",t,this.xhr),this.cleanup(!0)}},{key:"cleanup",value:f unction(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange =tt,t)try{this.xhr.abort()}catch(t){}"undefined"!=typeof document&&delete r.requ ests[this.index],this.xhr=null}}},{key:"onLoad",value:function(){var t=this.xhr. responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success") ,this.cleanup())}},{key:"abort",value:function(){this.cleanup()}}]),r}(j);if(rt. requestsCount=0,rt.requests={},"undefined"!=typeof document)if("function"==typeo f attachEvent)attachEvent("onunload",it);else if("function"==typeof addEventList ener){addEventListener("onpagehide"in P?"pagehide":"unload",it,!1)}function it() {for(var t in rt.requests)rt.requests.hasOwnProperty(t)&&rt.requests[t].abort()} var ot="function"==typeof Promise&&"function"==typeof Promise.resolve?function(t ){return Promise.resolve().then(t)}:function(t,e){return e(t,0)},st=P.WebSocket| |P.MozWebSocket,at="undefined"!=typeof navigator&&"string"==typeof navigator.pro duct&&"reactnative"===navigator.product.toLowerCase(),ct=function(t){s(r,t);var e=d(r);function r(t){var i;return n(this,r),(i=e.call(this,t)).supportsBinary=!t .forceBase64,i}return i(r,[{key:"name",get:function(){return"websocket"}},{key:" doOpen",value:function(){if(this.check()){var t=this.uri(),e=this.opts.protocols ,n=at?{}:N(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert" ,"ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin"," maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=t his.opts.extraHeaders);try{this.ws=at?new st(t,e,n):e?new st(t,e):new st(t)}catc h(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryTy pe||"arraybuffer",this.addEventListeners()}}},{key:"addEventListeners",value:fun ction(){var t=this;this.ws.onopen=function(){t.opts.autoUnref&&t.ws._socket.unre f(),t.onOpen()},this.ws.onclose=function(e){return t.onClose({description:"webso cket connection closed",context:e})},this.ws.onmessage=function(e){return t.onDa ta(e.data)},this.ws.onerror=function(e){return t.onError("websocket error",e)}}} ,{key:"write",value:function(t){var e=this;this.writable=!1;for(var n=function(n ){var r=t[n],i=n===t.length-1;E(r,e.supportsBinary,(function(t){try{e.ws.send(t) }catch(t){}i&&ot((function(){e.writable=!0,e.emitReserved("drain")}),e.setTimeou tFn)}))},r=0;r<t.length;r++)n(r)}},{key:"doClose",value:function(){void 0!==this .ws&&(this.ws.close(),this.ws=null)}},{key:"uri",value:function(){var t=this.que ry||{},e=this.opts.secure?"wss":"ws",n="";this.opts.port&&("wss"===e&&443!==Numb er(this.opts.port)||"ws"===e&&80!==Number(this.opts.port))&&(n=":"+this.opts.por t),this.opts.timestampRequests&&(t[this.opts.timestampParam]=K()),this.supportsB inary||(t.b64=1);var r=J(t);return e+"://"+(-1!==this.opts.hostname.indexOf(":") ?"["+this.opts.hostname+"]":this.opts.hostname)+n+this.opts.path+(r.length?"?"+r :"")}},{key:"check",value:function(){return!!st}}]),r}(H),ut={websocket:ct,polli ng:nt},ht=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([ ^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(? :[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*)) ?)/,ft=["source","protocol","authority","userInfo","user","password","host","por t","relative","path","directory","file","query","anchor"];function pt(t){var e=t ,n=t.indexOf("["),r=t.indexOf("]");-1!=n&&-1!=r&&(t=t.substring(0,n)+t.substring (n,r).replace(/:/g,";")+t.substring(r,t.length));for(var i,o,s=ht.exec(t||""),a= {},c=14;c--;)a[ft[c]]=s[c]||"";return-1!=n&&-1!=r&&(a.source=e,a.host=a.host.sub string(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[", "").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=function(t,e){va r n=/\/{2,9}/g,r=e.replace(n,"/").split("/");"/"!=e.substr(0,1)&&0!==e.length||r .splice(0,1);"/"==e.substr(e.length-1,1)&&r.splice(r.length-1,1);return r}(0,a.p ath),a.queryKey=(i=a.query,o={},i.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function( t,e,n){e&&(o[e]=n)})),o),a}var lt=function(t){s(a,t);var r=d(a);function a(t){va r i,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n(this,a) ,i=r.call(this),t&&"object"===e(t)&&(s=t,t=null),t?(t=pt(t),s.hostname=t.host,s. secure="https"===t.protocol||"wss"===t.protocol,s.port=t.port,t.query&&(s.query= t.query)):s.host&&(s.hostname=pt(s.host).host),D(p(i),s),i.secure=null!=s.secure ?s.secure:"undefined"!=typeof location&&"https:"===location.protocol,s.hostname& &!s.port&&(s.port=i.secure?"443":"80"),i.hostname=s.hostname||("undefined"!=type of location?location.hostname:"localhost"),i.port=s.port||("undefined"!=typeof l ocation&&location.port?location.port:i.secure?"443":"80"),i.transports=s.transpo rts||["polling","websocket"],i.readyState="",i.writeBuffer=[],i.prevBufferLen=0, i.opts=o({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampPara m:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024 },transportOptions:{},closeOnBeforeunload:!0},s),i.opts.path=i.opts.path.replace (/\/$/,"")+"/","string"==typeof i.opts.query&&(i.opts.query=Y(i.opts.query)),i.i d=null,i.upgrades=null,i.pingInterval=null,i.pingTimeout=null,i.pingTimeoutTimer =null,"function"==typeof addEventListener&&(i.opts.closeOnBeforeunload&&addEvent Listener("beforeunload",(function(){i.transport&&(i.transport.removeAllListeners (),i.transport.close())}),!1),"localhost"!==i.hostname&&(i.offlineEventListener= function(){i.onClose("transport close",{description:"network connection lost"})} ,addEventListener("offline",i.offlineEventListener,!1))),i.open(),i}return i(a,[ {key:"createTransport",value:function(t){var e=o({},this.opts.query);e.EIO=4,e.t ransport=t,this.id&&(e.sid=this.id);var n=o({},this.opts.transportOptions[t],thi s.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this. port});return new ut[t](n)}},{key:"open",value:function(){var t,e=this;if(this.o pts.rememberUpgrade&&a.priorWebsocketSuccess&&-1!==this.transports.indexOf("webs ocket"))t="websocket";else{if(0===this.transports.length)return void this.setTim eoutFn((function(){e.emitReserved("error","No transports available")}),0);t=this .transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){ return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)}}, {key:"setTransport",value:function(t){var e=this;this.transport&&this.transport. removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on(" packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close" ,(function(t){return e.onClose("transport close",t)}))}},{key:"probe",value:func tion(t){var e=this,n=this.createTransport(t),r=!1;a.priorWebsocketSuccess=!1;var i=function(){r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",(function (t){if(!r)if("pong"===t.type&&"probe"===t.data){if(e.upgrading=!0,e.emitReserved ("upgrading",n),!n)return;a.priorWebsocketSuccess="websocket"===n.name,e.transpo rt.pause((function(){r||"closed"!==e.readyState&&(f(),e.setTransport(n),n.send([ {type:"upgrade"}]),e.emitReserved("upgrade",n),n=null,e.upgrading=!1,e.flush())} ))}else{var i=new Error("probe error");i.transport=n.name,e.emitReserved("upgrad eError",i)}})))};function o(){r||(r=!0,f(),n.close(),n=null)}var s=function(t){v ar r=new Error("probe error: "+t);r.transport=n.name,o(),e.emitReserved("upgrade Error",r)};function c(){s("transport closed")}function u(){s("socket closed")}fu nction h(t){n&&t.name!==n.name&&o()}var f=function(){n.removeListener("open",i), n.removeListener("error",s),n.removeListener("close",c),e.off("close",u),e.off(" upgrading",h)};n.once("open",i),n.once("error",s),n.once("close",c),this.once("c lose",u),this.once("upgrading",h),n.open()}},{key:"onOpen",value:function(){if(t his.readyState="open",a.priorWebsocketSuccess="websocket"===this.transport.name, this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgra de&&this.transport.pause)for(var t=0,e=this.upgrades.length;t<e;t++)this.probe(t his.upgrades[t])}},{key:"onPacket",value:function(t){if("opening"===this.readySt ate||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReser ved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandsha ke(JSON.parse(t.data));break;case"ping":this.resetPingTimeout(),this.sendPacket( "pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":va r e=new Error("server error");e.code=t.data,this.onError(e);break;case"message": this.emitReserved("data",t.data),this.emitReserved("message",t.data)}}},{key:"on Handshake",value:function(t){this.emitReserved("handshake",t),this.id=t.sid,this .transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pi ngInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.maxPayload=t.maxPa yload,this.onOpen(),"closed"!==this.readyState&&this.resetPingTimeout()}},{key:" resetPingTimeout",value:function(){var t=this;this.clearTimeoutFn(this.pingTimeo utTimer),this.pingTimeoutTimer=this.setTimeoutFn((function(){t.onClose("ping tim eout")}),this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeo utTimer.unref()}},{key:"onDrain",value:function(){this.writeBuffer.splice(0,this .prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserv ed("drain"):this.flush()}},{key:"flush",value:function(){if("closed"!==this.read yState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){var t =this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,th is.emitReserved("flush")}}},{key:"getWritablePackets",value:function(){if(!(this .maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;for(var t,e=1,n=0;n<this.writeBuffer.length;n++){var r=this.wri teBuffer[n].data;if(r&&(e+="string"==typeof(t=r)?function(t){for(var e=0,n=0,r=0 ,i=t.length;r<i;r++)(e=t.charCodeAt(r))<128?n+=1:e<2048?n+=2:e<55296||e>=57344?n +=3:(r++,n+=4);return n}(t):Math.ceil(1.33*(t.byteLength||t.size))),n>0&&e>this. maxPayload)return this.writeBuffer.slice(0,n);e+=2}return this.writeBuffer}},{ke y:"write",value:function(t,e,n){return this.sendPacket("message",t,e,n),this}},{ key:"send",value:function(t,e,n){return this.sendPacket("message",t,e,n),this}}, {key:"sendPacket",value:function(t,e,n,r){if("function"==typeof e&&(r=e,e=void 0 ),"function"==typeof n&&(r=n,n=null),"closing"!==this.readyState&&"closed"!==thi s.readyState){(n=n||{}).compress=!1!==n.compress;var i={type:t,data:e,options:n} ;this.emitReserved("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flus h",r),this.flush()}}},{key:"close",value:function(){var t=this,e=function(){t.on Close("forced close"),t.transport.close()},n=function n(){t.off("upgrade",n),t.o ff("upgradeError",n),e()},r=function(){t.once("upgrade",n),t.once("upgradeError" ,n)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readySta te="closing",this.writeBuffer.length?this.once("drain",(function(){t.upgrading?r ():e()})):this.upgrading?r():e()),this}},{key:"onError",value:function(t){a.prio rWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error" ,t)}},{key:"onClose",value:function(t,e){"opening"!==this.readyState&&"open"!==t his.readyState&&"closing"!==this.readyState||(this.clearTimeoutFn(this.pingTimeo utTimer),this.transport.removeAllListeners("close"),this.transport.close(),this. transport.removeAllListeners(),"function"==typeof removeEventListener&&removeEve ntListener("offline",this.offlineEventListener,!1),this.readyState="closed",this .id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this.prevBufferLen=0 )}},{key:"filterUpgrades",value:function(t){for(var e=[],n=0,r=t.length;n<r;n++) ~this.transports.indexOf(t[n])&&e.push(t[n]);return e}}]),a}(j);lt.protocol=4,lt .protocol;var dt={},yt={};function vt(t,e,n){for(var r=0,i=0,o=n.length;i<o;i++) (r=n.charCodeAt(i))<128?t.setUint8(e++,r):r<2048?(t.setUint8(e++,192|r>>6),t.set Uint8(e++,128|63&r)):r<55296||r>=57344?(t.setUint8(e++,224|r>>12),t.setUint8(e++ ,128|r>>6&63),t.setUint8(e++,128|63&r)):(i++,r=65536+((1023&r)<<10|1023&n.charCo deAt(i)),t.setUint8(e++,240|r>>18),t.setUint8(e++,128|r>>12&63),t.setUint8(e++,1 28|r>>6&63),t.setUint8(e++,128|63&r))}function gt(t,n,r){var i=e(r),o=0,s=0,a=0, c=0,u=0,h=0;if("string"===i){if(u=function(t){for(var e=0,n=0,r=0,i=t.length;r<i ;r++)(e=t.charCodeAt(r))<128?n+=1:e<2048?n+=2:e<55296||e>=57344?n+=3:(r++,n+=4); return n}(r),u<32)t.push(160|u),h=1;else if(u<256)t.push(217,u),h=2;else if(u<65 536)t.push(218,u>>8,u),h=3;else{if(!(u<4294967296))throw new Error("String too l ong");t.push(219,u>>24,u>>16,u>>8,u),h=5}return n.push({_str:r,_length:u,_offset :t.length}),h+u}if("number"===i)return Math.floor(r)===r&&isFinite(r)?r>=0?r<128 ?(t.push(r),1):r<256?(t.push(204,r),2):r<65536?(t.push(205,r>>8,r),3):r<42949672 96?(t.push(206,r>>24,r>>16,r>>8,r),5):(a=r/Math.pow(2,32)>>0,c=r>>>0,t.push(207, a>>24,a>>16,a>>8,a,c>>24,c>>16,c>>8,c),9):r>=-32?(t.push(r),1):r>=-128?(t.push(2 08,r),2):r>=-32768?(t.push(209,r>>8,r),3):r>=-2147483648?(t.push(210,r>>24,r>>16 ,r>>8,r),5):(a=Math.floor(r/Math.pow(2,32)),c=r>>>0,t.push(211,a>>24,a>>16,a>>8, a,c>>24,c>>16,c>>8,c),9):(t.push(203),n.push({_float:r,_length:8,_offset:t.lengt h}),9);if("object"===i){if(null===r)return t.push(192),1;if(Array.isArray(r)){if ((u=r.length)<16)t.push(144|u),h=1;else if(u<65536)t.push(220,u>>8,u),h=3;else{i f(!(u<4294967296))throw new Error("Array too large");t.push(221,u>>24,u>>16,u>>8 ,u),h=5}for(o=0;o<u;o++)h+=gt(t,n,r[o]);return h}if(r instanceof Date){var f=r.g etTime();return a=Math.floor(f/Math.pow(2,32)),c=f>>>0,t.push(215,0,a>>24,a>>16, a>>8,a,c>>24,c>>16,c>>8,c),10}if(r instanceof ArrayBuffer){if((u=r.byteLength)<2 56)t.push(196,u),h=2;else if(u<65536)t.push(197,u>>8,u),h=3;else{if(!(u<42949672 96))throw new Error("Buffer too large");t.push(198,u>>24,u>>16,u>>8,u),h=5}retur n n.push({_bin:r,_length:u,_offset:t.length}),h+u}if("function"==typeof r.toJSON )return gt(t,n,r.toJSON());var p=[],l="",d=Object.keys(r);for(o=0,s=d.length;o<s ;o++)"function"!=typeof r[l=d[o]]&&p.push(l);if((u=p.length)<16)t.push(128|u),h= 1;else if(u<65536)t.push(222,u>>8,u),h=3;else{if(!(u<4294967296))throw new Error ("Object too large");t.push(223,u>>24,u>>16,u>>8,u),h=5}for(o=0;o<u;o++)h+=gt(t, n,l=p[o]),h+=gt(t,n,r[l]);return h}if("boolean"===i)return t.push(r?195:194),1;i f("undefined"===i)return t.push(212,0,0),3;throw new Error("Could not encode")}v ar mt=function(t){var e=[],n=[],r=gt(e,n,t),i=new ArrayBuffer(r),o=new DataView( i),s=0,a=0,c=-1;n.length>0&&(c=n[0]._offset);for(var u,h=0,f=0,p=0,l=e.length;p< l;p++)if(o.setUint8(a+p,e[p]),p+1===c){if(h=(u=n[s])._length,f=a+c,u._bin)for(va r d=new Uint8Array(u._bin),y=0;y<h;y++)o.setUint8(f+y,d[y]);else u._str?vt(o,f,u ._str):void 0!==u._float&&o.setFloat64(f,u._float);a+=h,n[++s]&&(c=n[s]._offset) }return i};function _t(t){if(this._offset=0,t instanceof ArrayBuffer)this._buffe r=t,this._view=new DataView(this._buffer);else{if(!ArrayBuffer.isView(t))throw n ew Error("Invalid argument");this._buffer=t.buffer,this._view=new DataView(this. _buffer,t.byteOffset,t.byteLength)}}_t.prototype._array=function(t){for(var e=ne w Array(t),n=0;n<t;n++)e[n]=this._parse();return e},_t.prototype._map=function(t ){for(var e={},n=0;n<t;n++)e[this._parse()]=this._parse();return e},_t.prototype ._str=function(t){var e=function(t,e,n){for(var r="",i=0,o=e,s=e+n;o<s;o++){var a=t.getUint8(o);if(0!=(128&a))if(192!=(224&a))if(224!=(240&a)){if(240!=(248&a))t hrow new Error("Invalid byte "+a.toString(16));(i=(7&a)<<18|(63&t.getUint8(++o)) <<12|(63&t.getUint8(++o))<<6|(63&t.getUint8(++o))<<0)>=65536?(i-=65536,r+=String .fromCharCode(55296+(i>>>10),56320+(1023&i))):r+=String.fromCharCode(i)}else r+= String.fromCharCode((15&a)<<12|(63&t.getUint8(++o))<<6|(63&t.getUint8(++o))<<0); else r+=String.fromCharCode((31&a)<<6|63&t.getUint8(++o));else r+=String.fromCha rCode(a)}return r}(this._view,this._offset,t);return this._offset+=t,e},_t.proto type._bin=function(t){var e=this._buffer.slice(this._offset,this._offset+t);retu rn this._offset+=t,e},_t.prototype._parse=function(){var t,e=this._view.getUint8 (this._offset++),n=0,r=0,i=0,o=0;if(e<192)return e<128?e:e<144?this._map(15&e):e <160?this._array(15&e):this._str(31&e);if(e>223)return-1*(255-e+1);switch(e){cas e 192:return null;case 194:return!1;case 195:return!0;case 196:return n=this._vi ew.getUint8(this._offset),this._offset+=1,this._bin(n);case 197:return n=this._v iew.getUint16(this._offset),this._offset+=2,this._bin(n);case 198:return n=this. _view.getUint32(this._offset),this._offset+=4,this._bin(n);case 199:return n=thi s._view.getUint8(this._offset),r=this._view.getInt8(this._offset+1),this._offset +=2,[r,this._bin(n)];case 200:return n=this._view.getUint16(this._offset),r=this ._view.getInt8(this._offset+2),this._offset+=3,[r,this._bin(n)];case 201:return n=this._view.getUint32(this._offset),r=this._view.getInt8(this._offset+4),this._ offset+=5,[r,this._bin(n)];case 202:return t=this._view.getFloat32(this._offset) ,this._offset+=4,t;case 203:return t=this._view.getFloat64(this._offset),this._o ffset+=8,t;case 204:return t=this._view.getUint8(this._offset),this._offset+=1,t ;case 205:return t=this._view.getUint16(this._offset),this._offset+=2,t;case 206 :return t=this._view.getUint32(this._offset),this._offset+=4,t;case 207:return i =this._view.getUint32(this._offset)*Math.pow(2,32),o=this._view.getUint32(this._ offset+4),this._offset+=8,i+o;case 208:return t=this._view.getInt8(this._offset) ,this._offset+=1,t;case 209:return t=this._view.getInt16(this._offset),this._off set+=2,t;case 210:return t=this._view.getInt32(this._offset),this._offset+=4,t;c ase 211:return i=this._view.getInt32(this._offset)*Math.pow(2,32),o=this._view.g etUint32(this._offset+4),this._offset+=8,i+o;case 212:return r=this._view.getInt 8(this._offset),this._offset+=1,0===r?void(this._offset+=1):[r,this._bin(1)];cas e 213:return r=this._view.getInt8(this._offset),this._offset+=1,[r,this._bin(2)] ;case 214:return r=this._view.getInt8(this._offset),this._offset+=1,[r,this._bin (4)];case 215:return r=this._view.getInt8(this._offset),this._offset+=1,0===r?(i =this._view.getInt32(this._offset)*Math.pow(2,32),o=this._view.getUint32(this._o ffset+4),this._offset+=8,new Date(i+o)):[r,this._bin(8)];case 216:return r=this. _view.getInt8(this._offset),this._offset+=1,[r,this._bin(16)];case 217:return n= this._view.getUint8(this._offset),this._offset+=1,this._str(n);case 218:return n =this._view.getUint16(this._offset),this._offset+=2,this._str(n);case 219:return n=this._view.getUint32(this._offset),this._offset+=4,this._str(n);case 220:retu rn n=this._view.getUint16(this._offset),this._offset+=2,this._array(n);case 221: return n=this._view.getUint32(this._offset),this._offset+=4,this._array(n);case 222:return n=this._view.getUint16(this._offset),this._offset+=2,this._map(n);cas e 223:return n=this._view.getUint32(this._offset),this._offset+=4,this._map(n)}t hrow new Error("Could not parse")};var bt=function(t){var e=new _t(t),n=e._parse ();if(e._offset!==t.byteLength)throw new Error(t.byteLength-e._offset+" trailing bytes");return n};yt.encode=mt,yt.decode=bt;var kt,wt={exports:{}};!function(t) {function e(t){if(t)return function(t){for(var n in e.prototype)t[n]=e.prototype [n];return t}(t)}t.exports=e,e.prototype.on=e.prototype.addEventListener=functio n(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._ callbacks["$"+t]||[]).push(e),this},e.prototype.once=function(t,e){function n(){ this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},e.prototy pe.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.rem oveEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==argumen ts.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)re turn this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(v ar i=0;i<r.length;i++)if((n=r[i])===e||n.fn===e){r.splice(i,1);break}return 0=== r.length&&delete this._callbacks["$"+t],this},e.prototype.emit=function(t){this. _callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._c allbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){r=0;for(var i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,e)}return this},e.prototype.lis teners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$ "+t]||[]},e.prototype.hasListeners=function(t){return!!this.listeners(t).length} }(wt);var Ot=yt,Et=wt.exports,Ct=dt.protocol=5,Rt=kt=dt.PacketType={CONNECT:0,DI SCONNECT:1,EVENT:2,ACK:3,CONNECT_ERROR:4},Tt=Number.isInteger||function(t){retur n"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},St=function(t){return"strin g"==typeof t},At=function(t){return"[object Object]"===Object.prototype.toString .call(t)};function Lt(){}function xt(){}Lt.prototype.encode=function(t){return[O t.encode(t)]},Et(xt.prototype),xt.prototype.add=function(t){var e=Ot.decode(t);t his.checkPacket(e),this.emit("decoded",e)},xt.prototype.checkPacket=function(t){ if(!(Tt(t.type)&&t.type>=Rt.CONNECT&&t.type<=Rt.CONNECT_ERROR))throw new Error(" invalid packet type");if(!St(t.nsp))throw new Error("invalid namespace");if(!fun ction(t){switch(t.type){case Rt.CONNECT:return void 0===t.data||At(t.data);case Rt.DISCONNECT:return void 0===t.data;case Rt.CONNECT_ERROR:return St(t.data)||At (t.data);default:return Array.isArray(t.data)}}(t))throw new Error("invalid payl oad");if(!(void 0===t.id||Tt(t.id)))throw new Error("invalid packet id")},xt.pro totype.destroy=function(){};var Bt=dt.Encoder=Lt,Ut=dt.Decoder=xt,jt=t({__proto_ _:null,default:dt,protocol:Ct,get PacketType(){return kt},Encoder:Bt,Decoder:Ut} ,[dt]);function Pt(t,e,n){return t.on(e,n),function(){t.off(e,n)}}var Nt=Object. freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,rem oveListener:1}),qt=function(t){s(r,t);var e=d(r);function r(t,i,o){var s;return n(this,r),(s=e.call(this)).connected=!1,s.receiveBuffer=[],s.sendBuffer=[],s.ids =0,s.acks={},s.flags={},s.io=t,s.nsp=i,o&&o.auth&&(s.auth=o.auth),s.io._autoConn ect&&s.open(),s}return i(r,[{key:"disconnected",get:function(){return!this.conne cted}},{key:"subEvents",value:function(){if(!this.subs){var t=this.io;this.subs= [Pt(t,"open",this.onopen.bind(this)),Pt(t,"packet",this.onpacket.bind(this)),Pt( t,"error",this.onerror.bind(this)),Pt(t,"close",this.onclose.bind(this))]}}},{ke y:"active",get:function(){return!!this.subs}},{key:"connect",value:function(){re turn this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"op en"===this.io._readyState&&this.onopen()),this}},{key:"open",value:function(){re turn this.connect()}},{key:"send",value:function(){for(var t=arguments.length,e= new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.unshift("message"),this.emit .apply(this,e),this}},{key:"emit",value:function(t){if(Nt.hasOwnProperty(t))thro w new Error('"'+t.toString()+'" is a reserved event name');for(var e=arguments.l ength,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];n.unshift(t);var i= {type:kt.EVENT,data:n,options:{}};if(i.options.compress=!1!==this.flags.compress ,"function"==typeof n[n.length-1]){var o=this.ids++,s=n.pop();this._registerAckC allback(o,s),i.id=o}var a=this.io.engine&&this.io.engine.transport&&this.io.engi ne.transport.writable,c=this.flags.volatile&&(!a||!this.connected);return c||(th is.connected?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.pu sh(i)),this.flags={},this}},{key:"_registerAckCallback",value:function(t,e){var n=this,r=this.flags.timeout;if(void 0!==r){var i=this.io.setTimeoutFn((function( ){delete n.acks[t];for(var r=0;r<n.sendBuffer.length;r++)n.sendBuffer[r].id===t& &n.sendBuffer.splice(r,1);e.call(n,new Error("operation has timed out"))}),r);th is.acks[t]=function(){n.io.clearTimeoutFn(i);for(var t=arguments.length,r=new Ar ray(t),o=0;o<t;o++)r[o]=arguments[o];e.apply(n,[null].concat(r))}}else this.acks [t]=e}},{key:"packet",value:function(t){t.nsp=this.nsp,this.io._packet(t)}},{key :"onopen",value:function(){var t=this;"function"==typeof this.auth?this.auth((fu nction(e){t.packet({type:kt.CONNECT,data:e})})):this.packet({type:kt.CONNECT,dat a:this.auth})}},{key:"onerror",value:function(t){this.connected||this.emitReserv ed("connect_error",t)}},{key:"onclose",value:function(t,e){this.connected=!1,del ete this.id,this.emitReserved("disconnect",t,e)}},{key:"onpacket",value:function (t){if(t.nsp===this.nsp)switch(t.type){case kt.CONNECT:if(t.data&&t.data.sid){va r e=t.data.sid;this.onconnect(e)}else this.emitReserved("connect_error",new Erro r("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x clien t, but they are not compatible (more information here: https://socket.io/docs/v3 /migrating-from-2-x-to-3-0/)"));break;case kt.EVENT:case kt.BINARY_EVENT:this.on event(t);break;case kt.ACK:case kt.BINARY_ACK:this.onack(t);break;case kt.DISCON NECT:this.ondisconnect();break;case kt.CONNECT_ERROR:this.destroy();var n=new Er ror(t.data.message);n.data=t.data.data,this.emitReserved("connect_error",n)}}},{ key:"onevent",value:function(t){var e=t.data||[];null!=t.id&&e.push(this.ack(t.i d)),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}} ,{key:"emitEvent",value:function(t){if(this._anyListeners&&this._anyListeners.le ngth){var e,n=m(this._anyListeners.slice());try{for(n.s();!(e=n.n()).done;){e.va lue.apply(this,t)}}catch(t){n.e(t)}finally{n.f()}}v(a(r.prototype),"emit",this). apply(this,t)}},{key:"ack",value:function(t){var e=this,n=!1;return function(){i f(!n){n=!0;for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[ o];e.packet({type:kt.ACK,id:t,data:i})}}}},{key:"onack",value:function(t){var e= this.acks[t.id];"function"==typeof e&&(e.apply(this,t.data),delete this.acks[t.i d])}},{key:"onconnect",value:function(t){this.id=t,this.connected=!0,this.emitBu ffered(),this.emitReserved("connect")}},{key:"emitBuffered",value:function(){var t=this;this.receiveBuffer.forEach((function(e){return t.emitEvent(e)})),this.re ceiveBuffer=[],this.sendBuffer.forEach((function(e){t.notifyOutgoingListeners(e) ,t.packet(e)})),this.sendBuffer=[]}},{key:"ondisconnect",value:function(){this.d estroy(),this.onclose("io server disconnect")}},{key:"destroy",value:function(){ this.subs&&(this.subs.forEach((function(t){return t()})),this.subs=void 0),this. io._destroy(this)}},{key:"disconnect",value:function(){return this.connected&&th is.packet({type:kt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}},{key:"close",value:function(){return this.disconnect( )}},{key:"compress",value:function(t){return this.flags.compress=t,this}},{key:" volatile",get:function(){return this.flags.volatile=!0,this}},{key:"timeout",val ue:function(t){return this.flags.timeout=t,this}},{key:"onAny",value:function(t) {return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),thi s}},{key:"prependAny",value:function(t){return this._anyListeners=this._anyListe ners||[],this._anyListeners.unshift(t),this}},{key:"offAny",value:function(t){if (!this._anyListeners)return this;if(t){for(var e=this._anyListeners,n=0;n<e.leng th;n++)if(t===e[n])return e.splice(n,1),this}else this._anyListeners=[];return t his}},{key:"listenersAny",value:function(){return this._anyListeners||[]}},{key: "onAnyOutgoing",value:function(t){return this._anyOutgoingListeners=this._anyOut goingListeners||[],this._anyOutgoingListeners.push(t),this}},{key:"prependAnyOut going",value:function(t){return this._anyOutgoingListeners=this._anyOutgoingList eners||[],this._anyOutgoingListeners.unshift(t),this}},{key:"offAnyOutgoing",val ue:function(t){if(!this._anyOutgoingListeners)return this;if(t){for(var e=this._ anyOutgoingListeners,n=0;n<e.length;n++)if(t===e[n])return e.splice(n,1),this}el se this._anyOutgoingListeners=[];return this}},{key:"listenersAnyOutgoing",value :function(){return this._anyOutgoingListeners||[]}},{key:"notifyOutgoingListener s",value:function(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.l ength){var e,n=m(this._anyOutgoingListeners.slice());try{for(n.s();!(e=n.n()).do ne;){e.value.apply(this,t.data)}}catch(t){n.e(t)}finally{n.f()}}}}]),r}(j);funct ion Mt(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2 ,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}Mt.prototype.dur ation=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jit ter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e)) ?t-n:t+n}return 0|Math.min(t,this.max)},Mt.prototype.reset=function(){this.attem pts=0},Mt.prototype.setMin=function(t){this.ms=t},Mt.prototype.setMax=function(t ){this.max=t},Mt.prototype.setJitter=function(t){this.jitter=t};var Dt=function( t){s(o,t);var r=d(o);function o(t,i){var s,a;n(this,o),(s=r.call(this)).nsps={}, s.subs=[],t&&"object"===e(t)&&(i=t,t=void 0),(i=i||{}).path=i.path||"/socket.io" ,s.opts=i,D(p(s),i),s.reconnection(!1!==i.reconnection),s.reconnectionAttempts(i .reconnectionAttempts||1/0),s.reconnectionDelay(i.reconnectionDelay||1e3),s.reco nnectionDelayMax(i.reconnectionDelayMax||5e3),s.randomizationFactor(null!==(a=i. randomizationFactor)&&void 0!==a?a:.5),s.backoff=new Mt({min:s.reconnectionDelay (),max:s.reconnectionDelayMax(),jitter:s.randomizationFactor()}),s.timeout(null= =i.timeout?2e4:i.timeout),s._readyState="closed",s.uri=t;var c=i.parser||jt;retu rn s.encoder=new c.Encoder,s.decoder=new c.Decoder,s._autoConnect=!1!==i.autoCon nect,s._autoConnect&&s.open(),s}return i(o,[{key:"reconnection",value:function(t ){return arguments.length?(this._reconnection=!!t,this):this._reconnection}},{ke y:"reconnectionAttempts",value:function(t){return void 0===t?this._reconnectionA ttempts:(this._reconnectionAttempts=t,this)}},{key:"reconnectionDelay",value:fun ction(t){var e;return void 0===t?this._reconnectionDelay:(this._reconnectionDela y=t,null===(e=this.backoff)||void 0===e||e.setMin(t),this)}},{key:"randomization Factor",value:function(t){var e;return void 0===t?this._randomizationFactor:(thi s._randomizationFactor=t,null===(e=this.backoff)||void 0===e||e.setJitter(t),thi s)}},{key:"reconnectionDelayMax",value:function(t){var e;return void 0===t?this. _reconnectionDelayMax:(this._reconnectionDelayMax=t,null===(e=this.backoff)||voi d 0===e||e.setMax(t),this)}},{key:"timeout",value:function(t){return arguments.l ength?(this._timeout=t,this):this._timeout}},{key:"maybeReconnectOnOpen",value:f unction(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&th is.reconnect()}},{key:"open",value:function(t){var e=this;if(~this._readyState.i ndexOf("open"))return this;this.engine=new lt(this.uri,this.opts);var n=this.eng ine,r=this;this._readyState="opening",this.skipReconnect=!1;var i=Pt(n,"open",(f unction(){r.onopen(),t&&t()})),o=Pt(n,"error",(function(n){r.cleanup(),r._readyS tate="closed",e.emitReserved("error",n),t?t(n):r.maybeReconnectOnOpen()}));if(!1 !==this._timeout){var s=this._timeout;0===s&&i();var a=this.setTimeoutFn((functi on(){i(),n.close(),n.emit("error",new Error("timeout"))}),s);this.opts.autoUnref &&a.unref(),this.subs.push((function(){clearTimeout(a)}))}return this.subs.push( i),this.subs.push(o),this}},{key:"connect",value:function(t){return this.open(t) }},{key:"onopen",value:function(){this.cleanup(),this._readyState="open",this.em itReserved("open");var t=this.engine;this.subs.push(Pt(t,"ping",this.onping.bind (this)),Pt(t,"data",this.ondata.bind(this)),Pt(t,"error",this.onerror.bind(this) ),Pt(t,"close",this.onclose.bind(this)),Pt(this.decoder,"decoded",this.ondecoded .bind(this)))}},{key:"onping",value:function(){this.emitReserved("ping")}},{key: "ondata",value:function(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error")}}},{key:"ondecoded",value:function(t){this.emitReserved("packet",t)}},{k ey:"onerror",value:function(t){this.emitReserved("error",t)}},{key:"socket",valu e:function(t,e){var n=this.nsps[t];return n||(n=new qt(this,t,e),this.nsps[t]=n) ,n}},{key:"_destroy",value:function(t){for(var e=0,n=Object.keys(this.nsps);e<n. length;e++){var r=n[e];if(this.nsps[r].active)return}this._close()}},{key:"_pack et",value:function(t){for(var e=this.encoder.encode(t),n=0;n<e.length;n++)this.e ngine.write(e[n],t.options)}},{key:"cleanup",value:function(){this.subs.forEach( (function(t){return t()})),this.subs.length=0,this.decoder.destroy()}},{key:"_cl ose",value:function(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose(" forced close"),this.engine&&this.engine.close()}},{key:"disconnect",value:functi on(){return this._close()}},{key:"onclose",value:function(t,e){this.cleanup(),th is.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,e),this ._reconnection&&!this.skipReconnect&&this.reconnect()}},{key:"reconnect",value:f unction(){var t=this;if(this._reconnecting||this.skipReconnect)return this;var e =this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(), this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{var n=this.back off.duration();this._reconnecting=!0;var r=this.setTimeoutFn((function(){e.skipR econnect||(t.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnec t||e.open((function(n){n?(e._reconnecting=!1,e.reconnect(),t.emitReserved("recon nect_error",n)):e.onreconnect()})))}),n);this.opts.autoUnref&&r.unref(),this.sub s.push((function(){clearTimeout(r)}))}}},{key:"onreconnect",value:function(){var t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitRes erved("reconnect",t)}}]),o}(j),It={};function Ft(t,n){"object"===e(t)&&(n=t,t=vo id 0);var r,i=function(t){var e=arguments.length>1&&void 0!==arguments[1]?argume nts[1]:"",n=arguments.length>2?arguments[2]:void 0,r=t;n=n||"undefined"!=typeof location&&location,null==t&&(t=n.protocol+"//"+n.host),"string"==typeof t&&("/"= ==t.charAt(0)&&(t="/"===t.charAt(1)?n.protocol+t:n.host+t),/^(https?|wss?):\/\// .test(t)||(t=void 0!==n?n.protocol+"//"+t:"https://"+t),r=pt(t)),r.port||(/^(htt p|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="4 43")),r.path=r.path||"/";var i=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;re turn r.id=r.protocol+"://"+i+":"+r.port+e,r.href=r.protocol+"://"+i+(n&&n.port== =r.port?"":":"+r.port),r}(t,(n=n||{}).path||"/socket.io"),o=i.source,s=i.id,a=i. path,c=It[s]&&a in It[s].nsps;return n.forceNew||n["force new connection"]||!1== =n.multiplex||c?r=new Dt(o,n):(It[s]||(It[s]=new Dt(o,n)),r=It[s]),i.query&&!n.q uery&&(n.query=i.queryKey),r.socket(i.path,n)}return o(Ft,{Manager:Dt,Socket:qt, io:Ft,connect:Ft}),Ft}));
//# sourceMappingURL=socket.io.msgpack.min.js.map //# sourceMappingURL=socket.io.msgpack.min.js.map
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)