!function(n,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.io=t():n.io=t()}(this,function(){return function(n){function t(r){if(i[r])return i[r].exports;var u=i[r]={exports:{},id:r,loaded:!1};return n[r].call(u.exports,u,u.exports,t),u.loaded=!0,u.exports}var i={};return t.m=n,t.c=i,t.p="",t(0)}([function(n,t,i){function u(n,t){"object"==typeof n&&(t=n,n=void 0);t=t||{};var h,i=o(n),s=i.source,u=i.id,c=i.path,l=r[u]&&c in r[u].nsps,a=t.forceNew||t["force new connection"]||!1===t.multiplex||l;return a?(e("ignoring socket cache for %s",s),h=f(s,t)):(r[u]||(e("new io instance for %s",s),r[u]=f(s,t)),h=r[u]),i.query&&!t.query&&(t.query=i.query),h.socket(i.path,t)}var o=i(1),s=i(7),f=i(15),e=i(3)("socket.io-client"),r;n.exports=t=u;r=t.managers={};t.protocol=s.protocol;t.connect=u;t.Manager=i(15);t.Socket=i(39)},function(n,t,i){function u(n,t){var i=n,e,u;return t=t||"undefined"!=typeof location&&location,null==n&&(n=t.protocol+"//"+t.host),"string"==typeof n&&("/"===n.charAt(0)&&(n="/"===n.charAt(1)?t.protocol+n:t.host+n),/^(https?|wss?):\/\//.test(n)||(r("protocol-less url %s",n),n="undefined"!=typeof t?t.protocol+"//"+n:"https://"+n),r("parse %s",n),i=f(n)),i.port||(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443")),i.path=i.path||"/",e=i.host.indexOf(":")!==-1,u=e?"["+i.host+"]":i.host,i.id=i.protocol+"://"+u+":"+i.port,i.href=i.protocol+"://"+u+(t&&t.port===i.port?"":":"+i.port),i}var f=i(2),r=i(3)("socket.io-client:url");n.exports=u},function(n){var t=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,i=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];n.exports=function(n){var o=n,u=n.indexOf("["),f=n.indexOf("]");u!=-1&&f!=-1&&(n=n.substring(0,u)+n.substring(u,f).replace(/:/g,";")+n.substring(f,n.length));for(var s=t.exec(n||""),r={},e=14;e--;)r[i[e]]=s[e]||"";return u!=-1&&f!=-1&&(r.source=o,r.host=r.host.substring(1,r.host.length-1).replace(/;/g,":"),r.authority=r.authority.replace("[","").replace("]","").replace(/;/g,":"),r.ipv6uri=!0),r}},function(n,t,i){(function(r){"use strict";function f(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function e(t){var i,r,u;(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+n.exports.humanize(this.diff),this.useColors)&&(i="color: "+this.color,t.splice(1,0,i,"color: inherit"),r=0,u=0,t[0].replace(/%[a-zA-Z%]/g,function(n){"%%"!==n&&(r++,"%c"===n&&(u=r))}),t.splice(u,0,i))}function o(){var n;return"object"===("undefined"==typeof console?"undefined":l(console))&&console.log&&(n=console).log.apply(n,arguments)}function s(n){try{n?t.storage.setItem("debug",n):t.storage.removeItem("debug")}catch(i){}}function h(){var n=void 0;try{n=t.storage.getItem("debug")}catch(i){}return!n&&"undefined"!=typeof r&&"env"in r&&(n=r.env.DEBUG),n}function c(){try{return localStorage}catch(n){}}var l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},u;t.log=o;t.formatArgs=e;t.save=s;t.load=h;t.useColors=f;t.storage=c();t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];n.exports=i(5)(t);u=n.exports.formatters;u.j=function(n){try{return JSON.stringify(n)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}).call(t,i(4))},function(n){function h(){throw new Error("setTimeout has not been defined");}function c(){throw new Error("clearTimeout has not been defined");}function l(n){if(r===setTimeout)return setTimeout(n,0);if((r===h||!r)&&setTimeout)return r=setTimeout,setTimeout(n,0);try{return r(n,0)}catch(t){try{return r.call(null,n,0)}catch(t){return r.call(this,n,0)}}}function y(n){if(u===clearTimeout)return clearTimeout(n);if((u===c||!u)&&clearTimeout)return u=clearTimeout,clearTimeout(n);try{return u(n)}catch(t){try{return u.call(null,n)}catch(t){return u.call(this,n)}}}function p(){o&&e&&(o=!1,e.length?f=e.concat(f):s=-1,f.length&&a())}function a(){var t,n;if(!o){for(t=l(p),o=!0,n=f.length;n;){for(e=f,f=[];++s<n;)e&&e[s].run();s=-1;n=f.length}e=null;o=!1;y(t)}}function v(n,t){this.fun=n;this.array=t}function i(){}var r,u,t=n.exports={};!function(){try{r="function"==typeof setTimeout?setTimeout:h}catch(n){r=h}try{u="function"==typeof clearTimeout?clearTimeout:c}catch(n){u=c}}();var e,f=[],o=!1,s=-1;t.nextTick=function(n){var i=new Array(arguments.length-1),t;if(arguments.length>1)for(t=1;t<arguments.length;t++)i[t-1]=arguments[t];f.push(new v(n,i));1!==f.length||o||l(a)};v.prototype.run=function(){this.fun.apply(null,this.array)};t.title="browser";t.browser=!0;t.env={};t.argv=[];t.version="";t.versions={};t.on=i;t.addListener=i;t.once=i;t.off=i;t.removeListener=i;t.removeAllListeners=i;t.emit=i;t.prependListener=i;t.prependOnceListener=i;t.listeners=function(){return[]};t.binding=function(){throw new Error("process.binding is not supported");};t.cwd=function(){return"/"};t.chdir=function(){throw new Error("process.chdir is not supported");};t.umask=function(){return 0}},function(n,t,i){"use strict";function r(n){if(Array.isArray(n)){for(var t=0,i=Array(n.length);t<n.length;t++)i[t]=n[t];return i}return Array.from(n)}function u(n){function u(n){for(var i=0,r=0;r<n.length;r++)i=(i<<5)-i+n.charCodeAt(r),i|=0;return t.colors[Math.abs(i)%t.colors.length]}function t(n){function i(){for(var f,h,s=arguments.length,n=Array(s),e=0;e<s;e++)n[e]=arguments[e];if(i.enabled){var u=i,o=Number(new Date),c=o-(r||o);u.diff=c;u.prev=r;u.curr=o;r=o;n[0]=t.coerce(n[0]);"string"!=typeof n[0]&&n.unshift("%O");f=0;n[0]=n[0].replace(/%([a-zA-Z%])/g,function(i,r){var e,o;return"%%"===i?i:(f++,e=t.formatters[r],"function"==typeof e&&(o=n[f],i=e.call(u,o),n.splice(f,1),f--),i)});t.formatArgs.call(u,n);h=u.log||t.log;h.apply(u,n)}}var r=void 0;return i.namespace=n,i.enabled=t.enabled(n),i.useColors=t.useColors(),i.color=u(n),i.destroy=e,i.extend=o,"function"==typeof t.init&&t.init(i),t.instances.push(i),i}function e(){var n=t.instances.indexOf(this);return n!==-1&&(t.instances.splice(n,1),!0)}function o(n,i){var r=t(this.namespace+("undefined"==typeof i?":":i)+n);return r.log=this.log,r}function s(n){var u;t.save(n);t.names=[];t.skips=[];for(var i=void 0,r=("string"==typeof n?n:"").split(/[\s,]+/),f=r.length,i=0;i<f;i++)r[i]&&(n=r[i].replace(/\*/g,".*?"),"-"===n[0]?t.skips.push(new RegExp("^"+n.substr(1)+"$")):t.names.push(new RegExp("^"+n+"$")));for(i=0;i<t.instances.length;i++)u=t.instances[i],u.enabled=t.enabled(u.namespace)}function h(){var n=[].concat(r(t.names.map(f)),r(t.skips.map(f).map(function(n){return"-"+n}))).join(",");return t.enable(""),n}function c(n){if("*"===n[n.length-1])return!0;for(var i=void 0,r=void 0,i=0,r=t.skips.length;i<r;i++)if(t.skips[i].test(n))return!1;for(i=0,r=t.names.length;i<r;i++)if(t.names[i].test(n))return!0;return!1}function f(n){return n.toString().substring(2,n.toString().length-2).replace(/\.\*\?$/,"*")}function l(n){return n instanceof Error?n.stack||n.message:n}return t.debug=t,t["default"]=t,t.coerce=l,t.disable=h,t.enable=s,t.enabled=c,t.humanize=i(6),Object.keys(n).forEach(function(i){t[i]=n[i]}),t.instances=[],t.names=[],t.skips=[],t.formatters={},t.selectColor=u,t.enable(t.load()),t}n.exports=u},function(n){function e(n){var e,f,o;if((n=String(n),!(n.length>100))&&(e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(n),e)){f=parseFloat(e[1]);o=(e[2]||"ms").toLowerCase();switch(o){case"years":case"year":case"yrs":case"yr":case"y":return f*c;case"weeks":case"week":case"w":return f*h;case"days":case"day":case"d":return f*t;case"hours":case"hour":case"hrs":case"hr":case"h":return f*u;case"minutes":case"minute":case"mins":case"min":case"m":return f*r;case"seconds":case"second":case"secs":case"sec":case"s":return f*i;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return f;default:return}}}function o(n){var f=Math.abs(n);return f>=t?Math.round(n/t)+"d":f>=u?Math.round(n/u)+"h":f>=r?Math.round(n/r)+"m":f>=i?Math.round(n/i)+"s":n+"ms"}function s(n){var e=Math.abs(n);return e>=t?f(n,e,t,"day"):e>=u?f(n,e,u,"hour"):e>=r?f(n,e,r,"minute"):e>=i?f(n,e,i,"second"):n+" ms"}function f(n,t,i,r){var u=t>=1.5*i;return Math.round(n/i)+" "+r+(u?"s":"")}var i=1e3,r=60*i,u=60*r,t=24*u,h=7*t,c=365.25*t;n.exports=function(n,t){t=t||{};var i=typeof n;if("string"===i&&n.length>0)return e(n);if("number"===i&&isFinite(n))return t.long?s(n):o(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n));}},function(n,t,i){function o(){}function s(n){var i=""+n.type,r;if(t.BINARY_EVENT!==n.type&&t.BINARY_ACK!==n.type||(i+=n.attachments+"-"),n.nsp&&"/"!==n.nsp&&(i+=n.nsp+","),null!=n.id&&(i+=n.id),null!=n.data){if(r=l(n.data),r===!1)return c;i+=r}return f("encoded %j as %s",n,i),i}function l(n){try{return JSON.stringify(n)}catch(t){return!1}}function a(n,t){function i(n){var i=e.deconstructPacket(n),u=s(i.packet),r=i.buffers;r.unshift(u);t(r)}e.removeBlobs(n,i)}function r(){this.reconstructor=null}function v(n){var i=0,r={type:Number(n.charAt(0))},e,o,u,s,c;if(null==t.types[r.type])return h("unknown packet type "+r.type);if(t.BINARY_EVENT===r.type||t.BINARY_ACK===r.type){for(e="";"-"!==n.charAt(++i)&&(e+=n.charAt(i),i!=n.length););if(e!=Number(e)||"-"!==n.charAt(i))throw new Error("Illegal attachments");r.attachments=Number(e)}if("/"===n.charAt(i+1))for(r.nsp="";++i;){if(u=n.charAt(i),","===u)break;if(r.nsp+=u,i===n.length)break}else r.nsp="/";if(o=n.charAt(i+1),""!==o&&Number(o)==o){for(r.id="";++i;){if(u=n.charAt(i),null==u||Number(u)!=u){--i;break}if(r.id+=n.charAt(i),i===n.length)break}r.id=Number(r.id)}if(n.charAt(++i)){if(s=y(n.substr(i)),c=s!==!1&&(r.type===t.ERROR||w(s)),!c)return h("invalid payload");r.data=s}return f("decoded %s as %j",n,r),r}function y(n){try{return JSON.parse(n)}catch(t){return!1}}function u(n){this.reconPack=n;this.buffers=[]}function h(n){return{type:t.ERROR,data:"parser error: "+n}}var f=i(8)("socket.io-parser"),p=i(11),e=i(12),w=i(13),b=i(14),c;t.protocol=4;t.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"];t.CONNECT=0;t.DISCONNECT=1;t.EVENT=2;t.ACK=3;t.ERROR=4;t.BINARY_EVENT=5;t.BINARY_ACK=6;t.Encoder=o;t.Decoder=r;c=t.ERROR+'"encode error"';o.prototype.encode=function(n,i){if(f("encoding packet %j",n),t.BINARY_EVENT===n.type||t.BINARY_ACK===n.type)a(n,i);else{var r=s(n);i([r])}};p(r.prototype);r.prototype.add=function(n){var i;if("string"==typeof n)i=v(n),t.BINARY_EVENT===i.type||t.BINARY_ACK===i.type?(this.reconstructor=new u(i),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",i)):this.emit("decoded",i);else{if(!b(n)&&!n.base64)throw new Error("Unknown type: "+n);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");i=this.reconstructor.takeBinaryData(n);i&&(this.reconstructor=null,this.emit("decoded",i))}};r.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()};u.prototype.takeBinaryData=function(n){if(this.buffers.push(n),this.buffers.length===this.reconPack.attachments){var t=e.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null};u.prototype.finishedReconstruction=function(){this.reconPack=null;this.buffers=[]}},function(n,t,i){(function(r){"use strict";function f(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function e(n){var i=this.useColors,r,u,f;(n[0]=(i?"%c":"")+this.namespace+(i?" %c":" ")+n[0]+(i?"%c ":" ")+"+"+t.humanize(this.diff),i)&&(r="color: "+this.color,n.splice(1,0,r,"color: inherit"),u=0,f=0,n[0].replace(/%[a-zA-Z%]/g,function(n){"%%"!==n&&(u++,"%c"===n&&(f=u))}),n.splice(f,0,r))}function o(){return"object"===("undefined"==typeof console?"undefined":c(console))&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(n){try{null==n?t.storage.removeItem("debug"):t.storage.debug=n}catch(i){}}function u(){var n;try{n=t.storage.debug}catch(i){}return!n&&"undefined"!=typeof r&&"env"in r&&(n=r.env.DEBUG),n}function h(){try{return window.localStorage}catch(n){}}var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n};t=n.exports=i(9);t.log=o;t.formatArgs=e;t.save=s;t.load=u;t.useColors=f;t.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:h();t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];t.formatters.j=function(n){try{return JSON.stringify(n)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}};t.enable(u())}).call(t,i(4))},function(n,t,i){"use strict";function u(n){var r,i=0;for(r in n)i=(i<<5)-i+n.charCodeAt(r),i|=0;return t.colors[Math.abs(i)%t.colors.length]}function r(n){function i(){var n,f,e,s;if(i.enabled){var u=i,o=+new Date,h=o-(r||o);for(u.diff=h,u.prev=r,u.curr=o,r=o,n=new Array(arguments.length),f=0;f<n.length;f++)n[f]=arguments[f];n[0]=t.coerce(n[0]);"string"!=typeof n[0]&&n.unshift("%O");e=0;n[0]=n[0].replace(/%([a-zA-Z%])/g,function(i,r){var f,o;return"%%"===i?i:(e++,f=t.formatters[r],"function"==typeof f&&(o=n[e],i=f.call(u,o),n.splice(e,1),e--),i)});t.formatArgs.call(u,n);s=i.log||t.log||console.log.bind(console);s.apply(u,n)}}var r;return i.namespace=n,i.enabled=t.enabled(n),i.useColors=t.useColors(),i.color=u(n),i.destroy=f,"function"==typeof t.init&&t.init(i),t.instances.push(i),i}function f(){var n=t.instances.indexOf(this);return n!==-1&&(t.instances.splice(n,1),!0)}function e(n){var i,r,f,u;for(t.save(n),t.names=[],t.skips=[],r=("string"==typeof n?n:"").split(/[\s,]+/),f=r.length,i=0;i<f;i++)r[i]&&(n=r[i].replace(/\*/g,".*?"),"-"===n[0]?t.skips.push(new RegExp("^"+n.substr(1)+"$")):t.names.push(new RegExp("^"+n+"$")));for(i=0;i<t.instances.length;i++)u=t.instances[i],u.enabled=t.enabled(u.namespace)}function o(){t.enable("")}function s(n){if("*"===n[n.length-1])return!0;for(var i=0,r=t.skips.length;i<r;i++)if(t.skips[i].test(n))return!1;for(i=0,r=t.names.length;i<r;i++)if(t.names[i].test(n))return!0;return!1}function h(n){return n instanceof Error?n.stack||n.message:n}t=n.exports=r.debug=r["default"]=r;t.coerce=h;t.disable=o;t.enable=e;t.enabled=s;t.humanize=i(10);t.instances=[];t.names=[];t.skips=[];t.formatters={}},function(n){function e(n){var e,f,o;if((n=String(n),!(n.length>100))&&(e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(n),e)){f=parseFloat(e[1]);o=(e[2]||"ms").toLowerCase();switch(o){case"years":case"year":case"yrs":case"yr":case"y":return f*h;case"days":case"day":case"d":return f*u;case"hours":case"hour":case"hrs":case"hr":case"h":return f*r;case"minutes":case"minute":case"mins":case"min":case"m":return f*i;case"seconds":case"second":case"secs":case"sec":case"s":return f*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return f;default:return}}}function o(n){return n>=u?Math.round(n/u)+"d":n>=r?Math.round(n/r)+"h":n>=i?Math.round(n/i)+"m":n>=t?Math.round(n/t)+"s":n+"ms"}function s(n){return f(n,u,"day")||f(n,r,"hour")||f(n,i,"minute")||f(n,t,"second")||n+" ms"}function f(n,t,i){if(!(n<t))return n<1.5*t?Math.floor(n/t)+" "+i:Math.ceil(n/t)+" "+i+"s"}var t=1e3,i=60*t,r=60*i,u=24*r,h=365.25*u;n.exports=function(n,t){t=t||{};var i=typeof n;if("string"===i&&n.length>0)return e(n);if("number"===i&&isNaN(n)===!1)return t.long?s(n):o(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n));}},function(n){function t(n){if(n)return i(n)}function i(n){for(var i in t.prototype)n[i]=t.prototype[i];return n}n.exports=t;t.prototype.on=t.prototype.addEventListener=function(n,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(t),this};t.prototype.once=function(n,t){function i(){this.off(n,i);t.apply(this,arguments)}return i.fn=t,this.on(n,i),this};t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(n,t){var i,u,r;if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;if(i=this._callbacks["$"+n],!i)return this;if(1==arguments.length)return delete this._callbacks["$"+n],this;for(r=0;r<i.length;r++)if(u=i[r],u===t||u.fn===t){i.splice(r,1);break}return this};t.prototype.emit=function(n){var r,t,i,u;if(this._callbacks=this._callbacks||{},r=[].slice.call(arguments,1),t=this._callbacks["$"+n],t)for(t=t.slice(0),i=0,u=t.length;i<u;++i)t[i].apply(this,r);return this};t.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]};t.prototype.hasListeners=function(n){return!!this.listeners(n).length}},function(n,t,i){function r(n,t){var s,u,i,o;if(!n)return n;if(e(n))return s={_placeholder:!0,num:t.length},t.push(n),s;if(f(n)){for(i=new Array(n.length),u=0;u<n.length;u++)i[u]=r(n[u],t);return i}if("object"==typeof n&&!(n instanceof Date)){i={};for(o in n)i[o]=r(n[o],t);return i}return n}function u(n,t){var i,r;if(!n)return n;if(n&&n._placeholder)return t[n.num];if(f(n))for(i=0;i<n.length;i++)n[i]=u(n[i],t);else if("object"==typeof n)for(r in n)n[r]=u(n[r],t);return n}var f=i(13),e=i(14),o=Object.prototype.toString,s="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===o.call(Blob),h="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===o.call(File);t.deconstructPacket=function(n){var t=[],u=n.data,i=n;return i.data=r(u,t),i.attachments=t.length,{packet:i,buffers:t}};t.reconstructPacket=function(n,t){return n.data=u(n.data,t),n.attachments=void 0,n};t.removeBlobs=function(n,t){function r(n,o,c){var a,l,v;if(!n)return n;if(s&&n instanceof Blob||h&&n instanceof File)u++,a=new FileReader,a.onload=function(){c?c[o]=this.result:i=this.result;--u||t(i)},a.readAsArrayBuffer(n);else if(f(n))for(l=0;l<n.length;l++)r(n[l],l,n);else if("object"==typeof n&&!e(n))for(v in n)r(n[v],v,n)}var u=0,i=n;r(i);u||t(i)}},function(n){var t={}.toString;n.exports=Array.isArray||function(n){return"[object Array]"==t.call(n)}},function(n){function t(n){return i&&Buffer.isBuffer(n)||r&&(n instanceof ArrayBuffer||u(n))}n.exports=t;var i="function"==typeof Buffer&&"function"==typeof Buffer.isBuffer,r="function"==typeof ArrayBuffer,u=function(n){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer}},function(n,t,i){function r(n,t){if(!(this instanceof r))return new r(n,t);n&&"object"==typeof n&&(t=n,n=void 0);t=t||{};t.path=t.path||"/socket.io";this.nsps={};this.subs=[];this.opts=t;this.reconnection(t.reconnection!==!1);this.reconnectionAttempts(t.reconnectionAttempts||1/0);this.reconnectionDelay(t.reconnectionDelay||1e3);this.reconnectionDelayMax(t.reconnectionDelayMax||5e3);this.randomizationFactor(t.randomizationFactor||.5);this.backoff=new v({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()});this.timeout(null==t.timeout?2e4:t.timeout);this.readyState="closed";this.uri=n;this.connecting=[];this.lastPing=null;this.encoding=!1;this.packetBuffer=[];var i=t.parser||a;this.encoder=new i.Encoder;this.decoder=new i.Decoder;this.autoConnect=t.autoConnect!==!1;this.autoConnect&&this.open()}var h=i(16),c=i(39),l=i(11),a=i(7),f=i(41),e=i(42),u=i(3)("socket.io-client:manager"),o=i(38),v=i(43),s=Object.prototype.hasOwnProperty;n.exports=r;r.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var n in this.nsps)s.call(this.nsps,n)&&this.nsps[n].emit.apply(this.nsps[n],arguments)};r.prototype.updateSocketIds=function(){for(var n in this.nsps)s.call(this.nsps,n)&&(this.nsps[n].id=this.generateId(n))};r.prototype.generateId=function(n){return("/"===n?"":n+"#")+this.engine.id};l(r.prototype);r.prototype.reconnection=function(n){return arguments.length?(this._reconnection=!!n,this):this._reconnection};r.prototype.reconnectionAttempts=function(n){return arguments.length?(this._reconnectionAttempts=n,this):this._reconnectionAttempts};r.prototype.reconnectionDelay=function(n){return arguments.length?(this._reconnectionDelay=n,this.backoff&&this.backoff.setMin(n),this):this._reconnectionDelay};r.prototype.randomizationFactor=function(n){return arguments.length?(this._randomizationFactor=n,this.backoff&&this.backoff.setJitter(n),this):this._randomizationFactor};r.prototype.reconnectionDelayMax=function(n){return arguments.length?(this._reconnectionDelayMax=n,this.backoff&&this.backoff.setMax(n),this):this._reconnectionDelayMax};r.prototype.timeout=function(n){return arguments.length?(this._timeout=n,this):this._timeout};r.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()};r.prototype.open=r.prototype.connect=function(n){var i,t,e,o,r,s;return(u("readyState %s",this.readyState),~this.readyState.indexOf("open"))?this:(u("opening %s",this.uri),this.engine=h(this.uri,this.opts),i=this.engine,t=this,this.readyState="opening",this.skipReconnect=!1,e=f(i,"open",function(){t.onopen();n&&n()}),o=f(i,"error",function(i){if(u("connect_error"),t.cleanup(),t.readyState="closed",t.emitAll("connect_error",i),n){var r=new Error("Connection error");r.data=i;n(r)}else t.maybeReconnectOnOpen()}),!1!==this._timeout&&(r=this._timeout,u("connect attempt will timeout after %d",r),s=setTimeout(function(){u("connect attempt timed out after %d",r);e.destroy();i.close();i.emit("error","timeout");t.emitAll("connect_timeout",r)},r),this.subs.push({destroy:function(){clearTimeout(s)}})),this.subs.push(e),this.subs.push(o),this)};r.prototype.onopen=function(){u("open");this.cleanup();this.readyState="open";this.emit("open");var n=this.engine;this.subs.push(f(n,"data",e(this,"ondata")));this.subs.push(f(n,"ping",e(this,"onping")));this.subs.push(f(n,"pong",e(this,"onpong")));this.subs.push(f(n,"error",e(this,"onerror")));this.subs.push(f(n,"close",e(this,"onclose")));this.subs.push(f(this.decoder,"decoded",e(this,"ondecoded")))};r.prototype.onping=function(){this.lastPing=new Date;this.emitAll("ping")};r.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)};r.prototype.ondata=function(n){this.decoder.add(n)};r.prototype.ondecoded=function(n){this.emit("packet",n)};r.prototype.onerror=function(n){u("error",n);this.emitAll("error",n)};r.prototype.socket=function(n,t){function u(){~o(r.connecting,i)||r.connecting.push(i)}var i=this.nsps[n],r;return i||(i=new c(this,n,t),this.nsps[n]=i,r=this,i.on("connecting",u),i.on("connect",function(){i.id=r.generateId(n)}),this.autoConnect&&u()),i};r.prototype.destroy=function(n){var t=o(this.connecting,n);~t&&this.connecting.splice(t,1);this.connecting.length||this.close()};r.prototype.packet=function(n){u("writing packet %j",n);var t=this;n.query&&0===n.type&&(n.nsp+="?"+n.query);t.encoding?t.packetBuffer.push(n):(t.encoding=!0,this.encoder.encode(n,function(i){for(var r=0;r<i.length;r++)t.engine.write(i[r],n.options);t.encoding=!1;t.processPacketQueue()}))};r.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var n=this.packetBuffer.shift();this.packet(n)}};r.prototype.cleanup=function(){var t,n,i;for(u("cleanup"),t=this.subs.length,n=0;n<t;n++)i=this.subs.shift(),i.destroy();this.packetBuffer=[];this.encoding=!1;this.lastPing=null;this.decoder.destroy()};r.prototype.close=r.prototype.disconnect=function(){u("disconnect");this.skipReconnect=!0;this.reconnecting=!1;"opening"===this.readyState&&this.cleanup();this.backoff.reset();this.readyState="closed";this.engine&&this.engine.close()};r.prototype.onclose=function(n){u("onclose");this.cleanup();this.backoff.reset();this.readyState="closed";this.emit("close",n);this._reconnection&&!this.skipReconnect&&this.reconnect()};r.prototype.reconnect=function(){var n,t,i;if(this.reconnecting||this.skipReconnect)return this;n=this;this.backoff.attempts>=this._reconnectionAttempts?(u("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1):(t=this.backoff.duration(),u("will wait %dms before reconnect attempt",t),this.reconnecting=!0,i=setTimeout(function(){n.skipReconnect||(u("attempting reconnect"),n.emitAll("reconnect_attempt",n.backoff.attempts),n.emitAll("reconnecting",n.backoff.attempts),n.skipReconnect||n.open(function(t){t?(u("reconnect attempt error"),n.reconnecting=!1,n.reconnect(),n.emitAll("reconnect_error",t.data)):(u("reconnect success"),n.onreconnect())}))},t),this.subs.push({destroy:function(){clearTimeout(i)}}))};r.prototype.onreconnect=function(){var n=this.backoff.attempts;this.reconnecting=!1;this.backoff.reset();this.updateSocketIds();this.emitAll("reconnect",n)}},function(n,t,i){n.exports=i(17);n.exports.parser=i(24)},function(n,t,i){function r(n,t){return this instanceof r?(t=t||{},n&&"object"==typeof n&&(t=n,n=null),n?(n=e(n),t.hostname=n.host,t.secure="https"===n.protocol||"wss"===n.protocol,t.port=n.port,n.query&&(t.query=n.query)):t.host&&(t.hostname=e(t.host).host),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.agent=t.agent||!1,this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?443:80),this.query=t.query||{},"string"==typeof this.query&&(this.query=l.decode(this.query)),this.upgrade=!1!==t.upgrade,this.path=(t.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!t.forceJSONP,this.jsonp=!1!==t.jsonp,this.forceBase64=!!t.forceBase64,this.enablesXDR=!!t.enablesXDR,this.withCredentials=!1!==t.withCredentials,this.timestampParam=t.timestampParam||"t",this.timestampRequests=t.timestampRequests,this.transports=t.transports||["polling","websocket"],this.transportOptions=t.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=t.policyPort||843,this.rememberUpgrade=t.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=t.onlyBinaryUpgrades,this.perMessageDeflate=!1!==t.perMessageDeflate&&(t.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=t.pfx||null,this.key=t.key||null,this.passphrase=t.passphrase||null,this.cert=t.cert||null,this.ca=t.ca||null,this.ciphers=t.ciphers||null,this.rejectUnauthorized=void 0===t.rejectUnauthorized||t.rejectUnauthorized,this.forceNode=!!t.forceNode,this.isReactNative="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),("undefined"==typeof self||this.isReactNative)&&(t.extraHeaders&&Object.keys(t.extraHeaders).length>0&&(this.extraHeaders=t.extraHeaders),t.localAddress&&(this.localAddress=t.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,void this.open()):new r(n,t)}function o(n){var i={};for(var t in n)n.hasOwnProperty(t)&&(i[t]=n[t]);return i}var s=i(18),h=i(11),u=i(3)("engine.io-client:socket"),c=i(38),f=i(24),e=i(2),l=i(32);n.exports=r;r.priorWebsocketSuccess=!1;h(r.prototype);r.protocol=f.protocol;r.Socket=r;r.Transport=i(23);r.transports=i(18);r.parser=i(24);r.prototype.createTransport=function(n){var i,t;return u('creating transport "%s"',n),i=o(this.query),i.EIO=f.protocol,i.transport=n,t=this.transportOptions[n]||{},this.id&&(i.sid=this.id),new s[n]({query:i,socket:this,agent:t.agent||this.agent,hostname:t.hostname||this.hostname,port:t.port||this.port,secure:t.secure||this.secure,path:t.path||this.path,forceJSONP:t.forceJSONP||this.forceJSONP,jsonp:t.jsonp||this.jsonp,forceBase64:t.forceBase64||this.forceBase64,enablesXDR:t.enablesXDR||this.enablesXDR,withCredentials:t.withCredentials||this.withCredentials,timestampRequests:t.timestampRequests||this.timestampRequests,timestampParam:t.timestampParam||this.timestampParam,policyPort:t.policyPort||this.policyPort,pfx:t.pfx||this.pfx,key:t.key||this.key,passphrase:t.passphrase||this.passphrase,cert:t.cert||this.cert,ca:t.ca||this.ca,ciphers:t.ciphers||this.ciphers,rejectUnauthorized:t.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:t.perMessageDeflate||this.perMessageDeflate,extraHeaders:t.extraHeaders||this.extraHeaders,forceNode:t.forceNode||this.forceNode,localAddress:t.localAddress||this.localAddress,requestTimeout:t.requestTimeout||this.requestTimeout,protocols:t.protocols||void 0,isReactNative:this.isReactNative})};r.prototype.open=function(){var n,t;if(this.rememberUpgrade&&r.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)n="websocket";else{if(0===this.transports.length)return t=this,void setTimeout(function(){t.emit("error","No transports available")},0);n=this.transports[0]}this.readyState="opening";try{n=this.createTransport(n)}catch(i){return this.transports.shift(),void this.open()}n.open();this.setTransport(n)};r.prototype.setTransport=function(n){u("setting transport %s",n.name);var t=this;this.transport&&(u("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners());this.transport=n;n.on("drain",function(){t.onDrain()}).on("packet",function(n){t.onPacket(n)}).on("error",function(n){t.onError(n)}).on("close",function(){t.onClose("transport close")})};r.prototype.probe=function(n){function o(){if(i.onlyBinaryUpgrades){var e=!this.supportsBinary&&i.transport.supportsBinary;f=f||e}f||(u('probe transport "%s" opened',n),t.send([{type:"ping",data:"probe"}]),t.once("packet",function(e){if(!f)if("pong"===e.type&&"probe"===e.data){if(u('probe transport "%s" pong',n),i.upgrading=!0,i.emit("upgrading",t),!t)return;r.priorWebsocketSuccess="websocket"===t.name;u('pausing current transport "%s"',i.transport.name);i.transport.pause(function(){f||"closed"!==i.readyState&&(u("changing transport and sending upgrade packet"),a(),i.setTransport(t),t.send([{type:"upgrade"}]),i.emit("upgrade",t),t=null,i.upgrading=!1,i.flush())})}else{u('probe transport "%s" failed',n);var o=new Error("probe error");o.transport=t.name;i.emit("upgradeError",o)}}))}function s(){f||(f=!0,a(),t.close(),t=null)}function e(r){var f=new Error("probe error: "+r);f.transport=t.name;s();u('probe transport "%s" failed because of error: %s',n,r);i.emit("upgradeError",f)}function h(){e("transport closed")}function c(){e("socket closed")}function l(n){t&&n.name!==t.name&&(u('"%s" works - aborting "%s"',n.name,t.name),s())}function a(){t.removeListener("open",o);t.removeListener("error",e);t.removeListener("close",h);i.removeListener("close",c);i.removeListener("upgrading",l)}u('probing transport "%s"',n);var t=this.createTransport(n,{probe:1}),f=!1,i=this;r.priorWebsocketSuccess=!1;t.once("open",o);t.once("error",e);t.once("close",h);this.once("close",c);this.once("upgrading",l);t.open()};r.prototype.onOpen=function(){if(u("socket open"),this.readyState="open",r.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){u("starting upgrade probes");for(var n=0,t=this.upgrades.length;n<t;n++)this.probe(this.upgrades[n])}};r.prototype.onPacket=function(n){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(u('socket receive: type "%s", data "%s"',n.type,n.data),this.emit("packet",n),this.emit("heartbeat"),n.type){case"open":this.onHandshake(JSON.parse(n.data));break;case"pong":this.setPing();this.emit("pong");break;case"error":var t=new Error("server error");t.code=n.data;this.onError(t);break;case"message":this.emit("data",n.data);this.emit("message",n.data)}else u('packet received with socket readyState "%s"',this.readyState)};r.prototype.onHandshake=function(n){this.emit("handshake",n);this.id=n.sid;this.transport.query.sid=n.sid;this.upgrades=this.filterUpgrades(n.upgrades);this.pingInterval=n.pingInterval;this.pingTimeout=n.pingTimeout;this.onOpen();"closed"!==this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))};r.prototype.onHeartbeat=function(n){clearTimeout(this.pingTimeoutTimer);var t=this;t.pingTimeoutTimer=setTimeout(function(){"closed"!==t.readyState&&t.onClose("ping timeout")},n||t.pingInterval+t.pingTimeout)};r.prototype.setPing=function(){var n=this;clearTimeout(n.pingIntervalTimer);n.pingIntervalTimer=setTimeout(function(){u("writing ping packet - expecting pong within %sms",n.pingTimeout);n.ping();n.onHeartbeat(n.pingTimeout)},n.pingInterval)};r.prototype.ping=function(){var n=this;this.sendPacket("ping",function(){n.emit("ping")})};r.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen);this.prevBufferLen=0;0===this.writeBuffer.length?this.emit("drain"):this.flush()};r.prototype.flush=function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(u("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))};r.prototype.write=r.prototype.send=function(n,t,i){return this.sendPacket("message",n,t,i),this};r.prototype.sendPacket=function(n,t,i,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof i&&(r=i,i=null),"closing"!==this.readyState&&"closed"!==this.readyState){i=i||{};i.compress=!1!==i.compress;var u={type:n,data:t,options:i};this.emit("packetCreate",u);this.writeBuffer.push(u);r&&this.once("flush",r);this.flush()}};r.prototype.close=function(){function i(){n.onClose("forced close");u("socket closing - telling transport to close");n.transport.close()}function t(){n.removeListener("upgrade",t);n.removeListener("upgradeError",t);i()}function r(){n.once("upgrade",t);n.once("upgradeError",t)}if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";var n=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?r():i()}):this.upgrading?r():i()}return this};r.prototype.onError=function(n){u("socket error %j",n);r.priorWebsocketSuccess=!1;this.emit("error",n);this.onClose("transport error",n)};r.prototype.onClose=function(n,t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){u('socket close with reason: "%s"',n);var i=this;clearTimeout(this.pingIntervalTimer);clearTimeout(this.pingTimeoutTimer);this.transport.removeAllListeners("close");this.transport.close();this.transport.removeAllListeners();this.readyState="closed";this.id=null;this.emit("close",n,t);i.writeBuffer=[];i.prevBufferLen=0}};r.prototype.filterUpgrades=function(n){for(var i=[],t=0,r=n.length;t<r;t++)~c(this.transports,n[t])&&i.push(n[t]);return i}},function(n,t,i){function r(n){var r,o=!1,s=!1,h=!1!==n.jsonp,i,t;if("undefined"!=typeof location&&(i="https:"===location.protocol,t=location.port,t||(t=i?443:80),o=n.hostname!==location.hostname||t!==n.port,s=n.secure!==i),n.xdomain=o,n.xscheme=s,r=new u(n),"open"in r&&!n.forceJSONP)return new f(n);if(!h)throw new Error("JSONP disabled");return new e(n)}var u=i(19),f=i(21),e=i(35),o=i(36);t.polling=r;t.websocket=o},function(n,t,i){var r=i(20);n.exports=function(n){var t=n.xdomain,i=n.xscheme,u=n.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!t||r))return new XMLHttpRequest}catch(f){}try{if("undefined"!=typeof XDomainRequest&&!i&&u)return new XDomainRequest}catch(f){}if(!t)try{return new self[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(f){}}},function(n){try{n.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){n.exports=!1}},function(n,t,i){function e(){}function u(n){if(s.call(this,n),this.requestTimeout=n.requestTimeout,this.extraHeaders=n.extraHeaders,"undefined"!=typeof location){var i="https:"===location.protocol,t=location.port;t||(t=i?443:80);this.xd="undefined"!=typeof location&&n.hostname!==location.hostname||t!==n.port;this.xs=n.secure!==i}}function r(n){this.method=n.method||"GET";this.uri=n.uri;this.xd=!!n.xd;this.xs=!!n.xs;this.async=!1!==n.async;this.data=void 0!==n.data?n.data:null;this.agent=n.agent;this.isBinary=n.isBinary;this.supportsBinary=n.supportsBinary;this.enablesXDR=n.enablesXDR;this.withCredentials=n.withCredentials;this.requestTimeout=n.requestTimeout;this.pfx=n.pfx;this.key=n.key;this.passphrase=n.passphrase;this.cert=n.cert;this.ca=n.ca;this.ciphers=n.ciphers;this.rejectUnauthorized=n.rejectUnauthorized;this.extraHeaders=n.extraHeaders;this.create()}function o(){for(var n in r.requests)r.requests.hasOwnProperty(n)&&r.requests[n].abort()}var c=i(19),s=i(22),l=i(11),a=i(33),f=i(3)("engine.io-client:polling-xhr"),h;(n.exports=u,n.exports.Request=r,a(u,s),u.prototype.supportsBinary=!0,u.prototype.request=function(n){return n=n||{},n.uri=this.uri(),n.xd=this.xd,n.xs=this.xs,n.agent=this.agent||!1,n.supportsBinary=this.supportsBinary,n.enablesXDR=this.enablesXDR,n.withCredentials=this.withCredentials,n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized,n.requestTimeout=this.requestTimeout,n.extraHeaders=this.extraHeaders,new r(n)},u.prototype.doWrite=function(n,t){var r="string"!=typeof n&&void 0!==n,i=this.request({method:"POST",data:n,isBinary:r}),u=this;i.on("success",t);i.on("error",function(n){u.onError("xhr post error",n)});this.sendXhr=i},u.prototype.doPoll=function(){f("xhr poll");var n=this.request(),t=this;n.on("data",function(n){t.onData(n)});n.on("error",function(n){t.onError("xhr poll error",n)});this.pollXhr=n},l(r.prototype),r.prototype.create=function(){var t={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR},n,i,u;t.pfx=this.pfx;t.key=this.key;t.passphrase=this.passphrase;t.cert=this.cert;t.ca=this.ca;t.ciphers=this.ciphers;t.rejectUnauthorized=this.rejectUnauthorized;n=this.xhr=new c(t);i=this;try{f("xhr open %s: %s",this.method,this.uri);n.open(this.method,this.uri,this.async);try{if(this.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(u in this.extraHeaders)this.extraHeaders.hasOwnProperty(u)&&n.setRequestHeader(u,this.extraHeaders[u])}}catch(e){}if("POST"===this.method)try{this.isBinary?n.setRequestHeader("Content-type","application/octet-stream"):n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{n.setRequestHeader("Accept","*/*")}catch(e){}"withCredentials"in n&&(n.withCredentials=this.withCredentials);this.requestTimeout&&(n.timeout=this.requestTimeout);this.hasXDR()?(n.onload=function(){i.onLoad()},n.onerror=function(){i.onError(n.responseText)}):n.onreadystatechange=function(){if(2===n.readyState)try{var t=n.getResponseHeader("Content-Type");(i.supportsBinary&&"application/octet-stream"===t||"application/octet-stream; charset=UTF-8"===t)&&(n.responseType="arraybuffer")}catch(r){}4===n.readyState&&(200===n.status||1223===n.status?i.onLoad():setTimeout(function(){i.onError("number"==typeof n.status?n.status:0)},0))};f("xhr data %s",this.data);n.send(this.data)}catch(e){return void setTimeout(function(){i.onError(e)},0)}"undefined"!=typeof document&&(this.index=r.requestsCount++,r.requests[this.index]=this)},r.prototype.onSuccess=function(){this.emit("success");this.cleanup()},r.prototype.onData=function(n){this.emit("data",n);this.onSuccess()},r.prototype.onError=function(n){this.emit("error",n);this.cleanup(!0)},r.prototype.cleanup=function(n){if("undefined"!=typeof this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=e:this.xhr.onreadystatechange=e,n)try{this.xhr.abort()}catch(t){}"undefined"!=typeof document&&delete r.requests[this.index];this.xhr=null}},r.prototype.onLoad=function(){var n,t;try{try{t=this.xhr.getResponseHeader("Content-Type")}catch(i){}n="application/octet-stream"===t||"application/octet-stream; charset=UTF-8"===t?this.xhr.response||this.xhr.responseText:this.xhr.responseText}catch(i){this.onError(i)}null!=n&&this.onData(n)},r.prototype.hasXDR=function(){return"undefined"!=typeof XDomainRequest&&!this.xs&&this.enablesXDR},r.prototype.abort=function(){this.cleanup()},r.requestsCount=0,r.requests={},"undefined"!=typeof document)&&("function"==typeof attachEvent?attachEvent("onunload",o):"function"==typeof addEventListener&&(h="onpagehide"in self?"pagehide":"unload",addEventListener(h,o,!1)))},function(n,t,i){function u(n){var t=n&&n.forceBase64;o&&!t||(this.supportsBinary=!1);f.call(this,n)}var f=i(23),s=i(32),e=i(24),h=i(33),c=i(34),r=i(3)("engine.io-client:polling"),o;n.exports=u;o=function(){var n=i(19),t=new n({xdomain:!1});return null!=t.responseType}();h(u,f);u.prototype.name="polling";u.prototype.doOpen=function(){this.poll()};u.prototype.pause=function(n){function i(){r("paused");u.readyState="paused";n()}var u=this,t;(this.readyState="pausing",this.polling||!this.writable)?(t=0,this.polling&&(r("we are currently polling - waiting to pause"),t++,this.once("pollComplete",function(){r("pre-pause polling complete");--t||i()})),this.writable||(r("we are currently writing - waiting to pause"),t++,this.once("drain",function(){r("pre-pause writing complete");--t||i()}))):i()};u.prototype.poll=function(){r("polling");this.polling=!0;this.doPoll();this.emit("poll")};u.prototype.onData=function(n){var t=this,i;r("polling got data %s",n);i=function(n){return"opening"===t.readyState&&t.onOpen(),"close"===n.type?(t.onClose(),!1):void t.onPacket(n)};e.decodePayload(n,this.socket.binaryType,i);"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():r('ignoring poll - transport state "%s"',this.readyState))};u.prototype.doClose=function(){function n(){r("writing close packet");t.write([{type:"close"}])}var t=this;"open"===this.readyState?(r("transport open - closing"),n()):(r("transport not open - deferring close"),this.once("open",n))};u.prototype.write=function(n){var t=this,i;this.writable=!1;i=function(){t.writable=!0;t.emit("drain")};e.encodePayload(n,this.supportsBinary,function(n){t.doWrite(n,i)})};u.prototype.uri=function(){var n=this.query||{},t=this.secure?"https":"http",i="",r;return!1!==this.timestampRequests&&(n[this.timestampParam]=c()),this.supportsBinary||n.sid||(n.b64=1),n=s.encode(n),this.port&&("https"===t&&443!==Number(this.port)||"http"===t&&80!==Number(this.port))&&(i=":"+this.port),n.length&&(n="?"+n),r=this.hostname.indexOf(":")!==-1,t+"://"+(r?"["+this.hostname+"]":this.hostname)+i+this.path+n}},function(n,t,i){function r(n){this.path=n.path;this.hostname=n.hostname;this.port=n.port;this.secure=n.secure;this.query=n.query;this.timestampParam=n.timestampParam;this.timestampRequests=n.timestampRequests;this.readyState="";this.agent=n.agent||!1;this.socket=n.socket;this.enablesXDR=n.enablesXDR;this.withCredentials=n.withCredentials;this.pfx=n.pfx;this.key=n.key;this.passphrase=n.passphrase;this.cert=n.cert;this.ca=n.ca;this.ciphers=n.ciphers;this.rejectUnauthorized=n.rejectUnauthorized;this.forceNode=n.forceNode;this.isReactNative=n.isReactNative;this.extraHeaders=n.extraHeaders;this.localAddress=n.localAddress}var u=i(24),f=i(11);n.exports=r;f(r.prototype);r.prototype.onError=function(n,t){var i=new Error(n);return i.type="TransportError",i.description=t,this.emit("error",i),this};r.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this};r.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this};r.prototype.send=function(n){if("open"!==this.readyState)throw new Error("Transport not open");this.write(n)};r.prototype.onOpen=function(){this.readyState="open";this.writable=!0;this.emit("open")};r.prototype.onData=function(n){var t=u.decodePacket(n,this.socket.binaryType);this.onPacket(t)};r.prototype.onPacket=function(n){this.emit("packet",n)};r.prototype.onClose=function(){this.readyState="closed";this.emit("close")}},function(n,t,i){function a(n,i){var r="b"+t.packets[n.type]+n.data.data;return i(r)}function v(n,i,r){var u;if(!i)return t.encodeBase64Packet(n,r);var e=n.data,s=new Uint8Array(e),f=new Uint8Array(1+e.byteLength);for(f[0]=o[n.type],u=0;u<s.length;u++)f[u+1]=s[u];return r(f.buffer)}function y(n,i,r){if(!i)return t.encodeBase64Packet(n,r);var u=new FileReader;return u.onload=function(){t.encodePacket({type:n.type,data:u.result},i,!0,r)},u.readAsArrayBuffer(n.data)}function p(n,i,u){var f,e;return i?l?y(n,i,u):(f=new Uint8Array(1),f[0]=o[n.type],e=new r([f.buffer,n.data]),u(e)):t.encodeBase64Packet(n,u)}function w(n){try{n=c.decode(n,{strict:!1})}catch(t){return!1}return n}function s(n,t,i){for(var u=new Array(n.length),f=d(n.length,i),e=function(n,i,r){t(i,function(t,i){u[n]=i;r(t,u)})},r=0;r<n.length;r++)e(r,n[r],f)}var h,b=i(25),k=i(26),e=i(27),d=i(28),c=i(29);"undefined"!=typeof ArrayBuffer&&(h=i(30));var g="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),nt="undefined"!=typeof navigator&&/PhantomJS/i.test(navigator.userAgent),l=g||nt;t.protocol=3;var o=t.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},f=b(o),u={type:"error",data:"parser error"},r=i(31);t.encodePacket=function(n,t,i,u){var f,e;return("function"==typeof t&&(u=t,t=!1),"function"==typeof i&&(u=i,i=null),f=void 0===n.data?void 0:n.data.buffer||n.data,"undefined"!=typeof ArrayBuffer&&f instanceof ArrayBuffer)?v(n,t,u):"undefined"!=typeof r&&f instanceof r?p(n,t,u):f&&f.base64?a(n,u):(e=o[n.type],void 0!==n.data&&(e+=i?c.encode(String(n.data),{strict:!1}):String(n.data)),u(""+e))};t.encodeBase64Packet=function(n,i){var e="b"+t.packets[n.type],u,o;if("undefined"!=typeof r&&n.data instanceof r)return u=new FileReader,u.onload=function(){var n=u.result.split(",")[1];i(e+n)},u.readAsDataURL(n.data);try{o=String.fromCharCode.apply(null,new Uint8Array(n.data))}catch(c){for(var s=new Uint8Array(n.data),h=new Array(s.length),f=0;f<s.length;f++)h[f]=s[f];o=String.fromCharCode.apply(null,h)}return e+=btoa(o),i(e)};t.decodePacket=function(n,i,o){var s;if(void 0===n)return u;if("string"==typeof n)return"b"===n.charAt(0)?t.decodeBase64Packet(n.substr(1),i):o&&(n=w(n),n===!1)?u:(s=n.charAt(0),Number(s)==s&&f[s]?n.length>1?{type:f[s],data:n.substring(1)}:{type:f[s]}:u);var c=new Uint8Array(n),s=c[0],h=e(n,1);return r&&"blob"===i&&(h=new r([h])),{type:f[s],data:h}};t.decodeBase64Packet=function(n,t){var u=f[n.charAt(0)],i;return h?(i=h.decode(n.substr(1)),"blob"===t&&r&&(i=new r([i])),{type:u,data:i}):{type:u,data:{base64:!0,data:n.substr(1)}}};t.encodePayload=function(n,i,u){function e(n){return n.length+":"+n}function o(n,r){t.encodePacket(n,!!f&&i,!1,function(n){r(null,e(n))})}"function"==typeof i&&(u=i,i=null);var f=k(n);return i&&f?r&&!l?t.encodePayloadAsBlob(n,u):t.encodePayloadAsArrayBuffer(n,u):n.length?void s(n,o,function(n,t){return u(t.join(""))}):u("0:")};t.decodePayload=function(n,i,r){var o,c,a;if("string"!=typeof n)return t.decodePayloadAsBinary(n,i,r);if("function"==typeof i&&(r=i,i=null),""===n)return r(u,0,1);for(var s,h,f="",e=0,l=n.length;e<l;e++)if(c=n.charAt(e),":"===c){if(""===f||f!=(s=Number(f))||(h=n.substr(e+1,s),f!=h.length))return r(u,0,1);if(h.length){if(o=t.decodePacket(h,i,!1),u.type===o.type&&u.data===o.data)return r(u,0,1);if(a=r(o,e+s,l),!1===a)return}e+=s;f=""}else f+=c;if(""!==f)return r(u,0,1)};t.encodePayloadAsArrayBuffer=function(n,i){function r(n,i){t.encodePacket(n,!0,!0,function(n){return i(null,n)})}return n.length?void s(n,r,function(n,t){var f=t.reduce(function(n,t){var i;return i="string"==typeof t?t.length:t.byteLength,n+i.toString().length+i+2},0),r=new Uint8Array(f),u=0;return t.forEach(function(n){var o="string"==typeof n,f=n,e,i,t;if(o){for(i=new Uint8Array(n.length),t=0;t<n.length;t++)i[t]=n.charCodeAt(t);f=i.buffer}for(r[u++]=o?0:1,e=f.byteLength.toString(),t=0;t<e.length;t++)r[u++]=parseInt(e[t]);for(r[u++]=255,i=new Uint8Array(f),t=0;t<i.length;t++)r[u++]=i[t]}),i(r.buffer)}):i(new ArrayBuffer(0))};t.encodePayloadAsBlob=function(n,i){function u(n,i){t.encodePacket(n,!0,!0,function(n){var f=new Uint8Array(1),e,t,s;if(f[0]=1,"string"==typeof n){for(e=new Uint8Array(n.length),t=0;t<n.length;t++)e[t]=n.charCodeAt(t);n=e.buffer;f[0]=0}for(var h=n instanceof ArrayBuffer?n.byteLength:n.size,u=h.toString(),o=new Uint8Array(u.length+1),t=0;t<u.length;t++)o[t]=parseInt(u[t]);(o[u.length]=255,r)&&(s=new r([f.buffer,o.buffer,n]),i(null,s))})}s(n,u,function(n,t){return i(new r(t))})};t.decodePayloadAsBinary=function(n,i,r){var f,c,h,a,s,v;for("function"==typeof i&&(r=i,i=null),f=n,c=[];f.byteLength>0;){for(var l=new Uint8Array(f),y=0===l[0],o="",s=1;255!==l[s];s++){if(o.length>310)return r(u,0,1);o+=l[s]}if(f=e(f,2+o.length),o=parseInt(o),h=e(f,0,o),y)try{h=String.fromCharCode.apply(null,new Uint8Array(h))}catch(p){for(a=new Uint8Array(h),h="",s=0;s<a.length;s++)h+=String.fromCharCode(a[s])}c.push(h);f=e(f,o)}v=c.length;c.forEach(function(n,u){r(t.decodePacket(n,i,!0),u,v)})}},function(n){n.exports=Object.keys||function(n){var t=[],r=Object.prototype.hasOwnProperty;for(var i in n)r.call(n,i)&&t.push(i);return t}},function(n,t,i){function r(n){var t,u,i;if(!n||"object"!=typeof n)return!1;if(f(n)){for(t=0,u=n.length;t<u;t++)if(r(n[t]))return!0;return!1}if("function"==typeof Buffer&&Buffer.isBuffer&&Buffer.isBuffer(n)||"function"==typeof ArrayBuffer&&n instanceof ArrayBuffer||e&&n instanceof Blob||o&&n instanceof File)return!0;if(n.toJSON&&"function"==typeof n.toJSON&&1===arguments.length)return r(n.toJSON(),!0);for(i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&r(n[i]))return!0;return!1}var f=i(13),u=Object.prototype.toString,e="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===u.call(Blob),o="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===u.call(File);n.exports=r},function(n){n.exports=function(n,t,i){var r=n.byteLength;if(t=t||0,i=i||r,n.slice)return n.slice(t,i);if(t<0&&(t+=r),i<0&&(i+=r),i>r&&(i=r),t>=r||t>=i||0===r)return new ArrayBuffer(0);for(var o=new Uint8Array(n),f=new Uint8Array(i-t),u=t,e=0;u<i;u++,e++)f[e]=o[u];return f.buffer}},function(n){function t(n,t,r){function u(n,i){if(u.count<=0)throw new Error("after called too many times");--u.count;n?(f=!0,t(n),t=r):0!==u.count||f||t(null,i)}var f=!1;return r=r||i,u.count=n,0===n?t():u}function i(){}n.exports=t},function(n){function o(n){for(var t,u,r=[],i=0,f=n.length;i<f;)t=n.charCodeAt(i++),t>=55296&&t<=56319&&i<f?(u=n.charCodeAt(i++),56320==(64512&u)?r.push(((1023&t)<<10)+(1023&u)+65536):(r.push(t),i--)):r.push(t);return r}function h(n){for(var t,f=n.length,u=-1,r="";++u<f;)t=n[u],t>65535&&(t-=65536,r+=i(t>>>10&1023|55296),t=56320|1023&t),r+=i(t);return r}function s(n,t){if(n>=55296&&n<=57343){if(t)throw Error("Lone surrogate U+"+n.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function e(n,t){return i(n>>t&63|128)}function c(n,t){if(0==(4294967168&n))return i(n);var r="";return 0==(4294965248&n)?r=i(n>>6&31|192):0==(4294901760&n)?(s(n,t)||(n=65533),r=i(n>>12&15|224),r+=e(n,6)):0==(4292870144&n)&&(r=i(n>>18&7|240),r+=e(n,12),r+=e(n,6)),r+i(63&n|128)}function l(n,t){t=t||{};for(var i,e=!1!==t.strict,r=o(n),s=r.length,u=-1,f="";++u<s;)i=r[u],f+=c(i,e);return f}function r(){if(t>=f)throw Error("Invalid byte index");var n=255&u[t];if(t++,128==(192&n))return 63&n;throw Error("Invalid continuation byte");}function a(n){var e,o,h,c,i;if(t>f)throw Error("Invalid byte index");if(t==f)return!1;if(e=255&u[t],t++,0==(128&e))return e;if(192==(224&e)){if(o=r(),i=(31&e)<<6|o,i>=128)return i;throw Error("Invalid continuation byte");}if(224==(240&e)){if(o=r(),h=r(),i=(15&e)<<12|o<<6|h,i>=2048)return s(i,n)?i:65533;throw Error("Invalid continuation byte");}if(240==(248&e)&&(o=r(),h=r(),c=r(),i=(7&e)<<18|o<<12|h<<6|c,i>=65536&&i<=1114111))return i;throw Error("Invalid UTF-8 detected");}function v(n,i){var e,s,r;for(i=i||{},e=!1!==i.strict,u=o(n),f=u.length,t=0,r=[];(s=a(e))!==!1;)r.push(s);return h(r)}var u,f,t,i=String.fromCharCode;n.exports={version:"2.1.2",encode:l,decode:v}},function(n,t){!function(){"use strict";for(var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=new Uint8Array(256),r=0;r<n.length;r++)i[n.charCodeAt(r)]=r;t.encode=function(t){for(var u=new Uint8Array(t),f=u.length,i="",r=0;r<f;r+=3)i+=n[u[r]>>2],i+=n[(3&u[r])<<4|u[r+1]>>4],i+=n[(15&u[r+1])<<2|u[r+2]>>6],i+=n[63&u[r+2]];return f%3==2?i=i.substring(0,i.length-1)+"=":f%3==1&&(i=i.substring(0,i.length-2)+"=="),i};t.decode=function(n){var t,h,u,f,c,e=.75*n.length,l=n.length,o=0,s,r;for("="===n[n.length-1]&&(e--,"="===n[n.length-2]&&e--),s=new ArrayBuffer(e),r=new Uint8Array(s),t=0;t<l;t+=4)h=i[n.charCodeAt(t)],u=i[n.charCodeAt(t+1)],f=i[n.charCodeAt(t+2)],c=i[n.charCodeAt(t+3)],r[o++]=h<<2|u>>4,r[o++]=(15&u)<<4|f>>2,r[o++]=(3&f)<<6|63&c;return s}}()},function(n){function i(n){return n.map(function(n){var t,i;return n.buffer instanceof ArrayBuffer?(t=n.buffer,n.byteLength!==t.byteLength&&(i=new Uint8Array(n.byteLength),i.set(new Uint8Array(t,n.byteOffset,n.byteLength)),t=i.buffer),t):n})}function r(n,r){r=r||{};var u=new t;return i(n).forEach(function(n){u.append(n)}),r.type?u.getBlob(r.type):u.getBlob()}function u(n,t){return new Blob(i(n),t||{})}var t="undefined"!=typeof t?t:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder&&MozBlobBuilder,f=function(){try{var n=new Blob(["hi"]);return 2===n.size}catch(t){return!1}}(),e=f&&function(){try{var n=new Blob([new Uint8Array([1,2])]);return 2===n.size}catch(t){return!1}}(),o=t&&t.prototype.append&&t.prototype.getBlob;"undefined"!=typeof Blob&&(r.prototype=Blob.prototype,u.prototype=Blob.prototype);n.exports=function(){return f?e?Blob:u:o?r:void 0}()},function(n,t){t.encode=function(n){var t="";for(var i in n)n.hasOwnProperty(i)&&(t.length&&(t+="&"),t+=encodeURIComponent(i)+"="+encodeURIComponent(n[i]));return t};t.decode=function(n){for(var i,r={},u=n.split("&"),t=0,f=u.length;t<f;t++)i=u[t].split("="),r[decodeURIComponent(i[0])]=decodeURIComponent(i[1]);return r}},function(n){n.exports=function(n,t){var i=function(){};i.prototype=t.prototype;n.prototype=new i;n.prototype.constructor=n}},function(n){"use strict";function r(n){var t="";do t=e[n%i]+t,n=Math.floor(n/i);while(n>0);return t}function h(n){var r=0;for(t=0;t<n.length;t++)r=r*i+o[n.charAt(t)];return r}function u(){var n=r(+new Date);return n!==f?(s=0,f=n):n+"."+r(s++)}for(var f,e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),i=64,o={},s=0,t=0;t<i;t++)o[e[t]]=t;u.encode=r;u.decode=h;n.exports=u},function(n,t,i){(function(t){function s(){}function h(){return"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof t?t:{}}function r(n){var i,t;(f.call(this,n),this.query=this.query||{},u)||(i=h(),u=i.___eio=i.___eio||[]);this.index=u.length;t=this;u.push(function(n){t.onData(n)});this.query.j=this.index;"function"==typeof addEventListener&&addEventListener("beforeunload",function(){t.script&&(t.script.onerror=s)},!1)}var f=i(22),c=i(33),u,e,o;n.exports=r;e=/\n/g;o=/\\n/g;c(r,f);r.prototype.supportsBinary=!1;r.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null);this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null);f.prototype.doClose.call(this)};r.prototype.doPoll=function(){var r=this,n=document.createElement("script"),t,i;this.script&&(this.script.parentNode.removeChild(this.script),this.script=null);n.async=!0;n.src=this.uri();n.onerror=function(n){r.onError("jsonp poll error",n)};t=document.getElementsByTagName("script")[0];t?t.parentNode.insertBefore(n,t):(document.head||document.body).appendChild(n);this.script=n;i="undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent);i&&setTimeout(function(){var n=document.createElement("iframe");document.body.appendChild(n);document.body.removeChild(n)},100)};r.prototype.doWrite=function(n,t){function s(){h();t()}function h(){if(i.iframe)try{i.form.removeChild(i.iframe)}catch(n){i.onError("jsonp polling iframe removal error",n)}try{var t='<iframe src="javascript:0" name="'+i.iframeId+'">';u=document.createElement(t)}catch(n){u=document.createElement("iframe");u.name=i.iframeId;u.src="javascript:0"}u.id=i.iframeId;i.form.appendChild(u);i.iframe=u}var i=this;if(!this.form){var u,r=document.createElement("form"),f=document.createElement("textarea"),c=this.iframeId="eio_iframe_"+this.index;r.className="socketio";r.style.position="absolute";r.style.top="-1000px";r.style.left="-1000px";r.target=c;r.method="POST";r.setAttribute("accept-charset","utf-8");f.name="d";r.appendChild(f);document.body.appendChild(r);this.form=r;this.area=f}this.form.action=this.uri();h();n=n.replace(o,"\\\n");this.area.value=n.replace(e,"\\n");try{this.form.submit()}catch(l){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===i.iframe.readyState&&s()}:this.iframe.onload=s}}).call(t,function(){return this}())},function(n,t,i){function r(n){var t=n&&n.forceBase64;t&&(this.supportsBinary=!1);this.perMessageDeflate=n.perMessageDeflate;this.usingBrowserWebSocket=f&&!n.forceNode;this.protocols=n.protocols;this.usingBrowserWebSocket||(u=e);o.call(this,n)}var f,e,o=i(23),s=i(24),h=i(32),c=i(33),l=i(34),a=i(3)("engine.io-client:websocket"),u;if("undefined"!=typeof WebSocket?f=WebSocket:"undefined"!=typeof self&&(f=self.WebSocket||self.MozWebSocket),"undefined"==typeof window)try{e=i(37)}catch(v){}u=f||e;n.exports=r;c(r,o);r.prototype.name="websocket";r.prototype.supportsBinary=!0;r.prototype.doOpen=function(){if(this.check()){var t=this.uri(),i=this.protocols,n={agent:this.agent,perMessageDeflate:this.perMessageDeflate};n.pfx=this.pfx;n.key=this.key;n.passphrase=this.passphrase;n.cert=this.cert;n.ca=this.ca;n.ciphers=this.ciphers;n.rejectUnauthorized=this.rejectUnauthorized;this.extraHeaders&&(n.headers=this.extraHeaders);this.localAddress&&(n.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket&&!this.isReactNative?i?new u(t,i):new u(t):new u(t,i,n)}catch(r){return this.emit("error",r)}void 0===this.ws.binaryType&&(this.supportsBinary=!1);this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer";this.addEventListeners()}};r.prototype.addEventListeners=function(){var n=this;this.ws.onopen=function(){n.onOpen()};this.ws.onclose=function(){n.onClose()};this.ws.onmessage=function(t){n.onData(t.data)};this.ws.onerror=function(t){n.onError("websocket error",t)}};r.prototype.write=function(n){function u(){t.emit("flush");setTimeout(function(){t.writable=!0;t.emit("drain")},0)}var t=this;this.writable=!1;for(var r=n.length,i=0,f=r;i<f;i++)!function(n){s.encodePacket(n,t.supportsBinary,function(i){var f,e;t.usingBrowserWebSocket||(f={},(n.options&&(f.compress=n.options.compress),t.perMessageDeflate)&&(e="string"==typeof i?Buffer.byteLength(i):i.length,e<t.perMessageDeflate.threshold&&(f.compress=!1)));try{t.usingBrowserWebSocket?t.ws.send(i):t.ws.send(i,f)}catch(o){a("websocket closed before onclose event")}--r||u()})}(n[i])};r.prototype.onClose=function(){o.prototype.onClose.call(this)};r.prototype.doClose=function(){"undefined"!=typeof this.ws&&this.ws.close()};r.prototype.uri=function(){var n=this.query||{},t=this.secure?"wss":"ws",i="",r;return this.port&&("wss"===t&&443!==Number(this.port)||"ws"===t&&80!==Number(this.port))&&(i=":"+this.port),this.timestampRequests&&(n[this.timestampParam]=l()),this.supportsBinary||(n.b64=1),n=h.encode(n),n.length&&(n="?"+n),r=this.hostname.indexOf(":")!==-1,t+"://"+(r?"["+this.hostname+"]":this.hostname)+i+this.path+n};r.prototype.check=function(){return!(!u||"__initialize"in u&&this.name===r.prototype.name)}},function(){},function(n){var t=[].indexOf;n.exports=function(n,i){if(t)return n.indexOf(i);for(var r=0;r<n.length;++r)if(n[r]===i)return r;return-1}},function(n,t,i){function r(n,t,i){this.io=n;this.nsp=t;this.json=this;this.ids=0;this.acks={};this.receiveBuffer=[];this.sendBuffer=[];this.connected=!1;this.disconnected=!0;this.flags={};i&&i.query&&(this.query=i.query);this.io.autoConnect&&this.open()}var u=i(7),c=i(11),o=i(40),s=i(41),h=i(42),f=i(3)("socket.io-client:socket"),v=i(32),l=i(26),a,e;n.exports=t=r;a={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1};e=c.prototype.emit;c(r.prototype);r.prototype.subEvents=function(){if(!this.subs){var n=this.io;this.subs=[s(n,"open",h(this,"onopen")),s(n,"packet",h(this,"onpacket")),s(n,"close",h(this,"onclose"))]}};r.prototype.open=r.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting"),this)};r.prototype.send=function(){var n=o(arguments);return n.unshift("message"),this.emit.apply(this,n),this};r.prototype.emit=function(n){if(a.hasOwnProperty(n))return e.apply(this,arguments),this;var t=o(arguments),i={type:(void 0!==this.flags.binary?this.flags.binary:l(t))?u.BINARY_EVENT:u.EVENT,data:t};return i.options={},i.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof t[t.length-1]&&(f("emitting packet with ack id %d",this.ids),this.acks[this.ids]=t.pop(),i.id=this.ids++),this.connected?this.packet(i):this.sendBuffer.push(i),this.flags={},this};r.prototype.packet=function(n){n.nsp=this.nsp;this.io.packet(n)};r.prototype.onopen=function(){if(f("transport is open - connecting"),"/"!==this.nsp)if(this.query){var n="object"==typeof this.query?v.encode(this.query):this.query;f("sending connect packet with query %s",n);this.packet({type:u.CONNECT,query:n})}else this.packet({type:u.CONNECT})};r.prototype.onclose=function(n){f("close (%s)",n);this.connected=!1;this.disconnected=!0;delete this.id;this.emit("disconnect",n)};r.prototype.onpacket=function(n){var t=n.nsp===this.nsp,i=n.type===u.ERROR&&"/"===n.nsp;if(t||i)switch(n.type){case u.CONNECT:this.onconnect();break;case u.EVENT:this.onevent(n);break;case u.BINARY_EVENT:this.onevent(n);break;case u.ACK:this.onack(n);break;case u.BINARY_ACK:this.onack(n);break;case u.DISCONNECT:this.ondisconnect();break;case u.ERROR:this.emit("error",n.data)}};r.prototype.onevent=function(n){var t=n.data||[];f("emitting event %j",t);null!=n.id&&(f("attaching ack callback to event"),t.push(this.ack(n.id)));this.connected?e.apply(this,t):this.receiveBuffer.push(t)};r.prototype.ack=function(n){var i=this,t=!1;return function(){if(!t){t=!0;var r=o(arguments);f("sending ack %j",r);i.packet({type:l(r)?u.BINARY_ACK:u.ACK,id:n,data:r})}}};r.prototype.onack=function(n){var t=this.acks[n.id];"function"==typeof t?(f("calling ack %s with %j",n.id,n.data),t.apply(this,n.data),delete this.acks[n.id]):f("bad ack %s",n.id)};r.prototype.onconnect=function(){this.connected=!0;this.disconnected=!1;this.emit("connect");this.emitBuffered()};r.prototype.emitBuffered=function(){for(var n=0;n<this.receiveBuffer.length;n++)e.apply(this,this.receiveBuffer[n]);for(this.receiveBuffer=[],n=0;n<this.sendBuffer.length;n++)this.packet(this.sendBuffer[n]);this.sendBuffer=[]};r.prototype.ondisconnect=function(){f("server disconnect (%s)",this.nsp);this.destroy();this.onclose("io server disconnect")};r.prototype.destroy=function(){if(this.subs){for(var n=0;n<this.subs.length;n++)this.subs[n].destroy();this.subs=null}this.io.destroy(this)};r.prototype.close=r.prototype.disconnect=function(){return this.connected&&(f("performing disconnect (%s)",this.nsp),this.packet({type:u.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this};r.prototype.compress=function(n){return this.flags.compress=n,this};r.prototype.binary=function(n){return this.flags.binary=n,this}},function(n){function t(n,t){var r=[],i;for(t=t||0,i=t||0;i<n.length;i++)r[i-t]=n[i];return r}n.exports=t},function(n){function t(n,t,i){return n.on(t,i),{destroy:function(){n.removeListener(t,i)}}}n.exports=t},function(n){var t=[].slice;n.exports=function(n,i){if("string"==typeof i&&(i=n[i]),"function"!=typeof i)throw new Error("bind() requires a function");var r=t.call(arguments,2);return function(){return i.apply(n,r.concat(t.call(arguments)))}}},function(n){function t(n){n=n||{};this.ms=n.min||100;this.max=n.max||1e4;this.factor=n.factor||2;this.jitter=n.jitter>0&&n.jitter<=1?n.jitter:0;this.attempts=0}n.exports=t;t.prototype.duration=function(){var n=this.ms*Math.pow(this.factor,this.attempts++),t,i;return this.jitter&&(t=Math.random(),i=Math.floor(t*this.jitter*n),n=0==(1&Math.floor(10*t))?n-i:n+i),0|Math.min(n,this.max)};t.prototype.reset=function(){this.attempts=0};t.prototype.setMin=function(n){this.ms=n};t.prototype.setMax=function(n){this.max=n};t.prototype.setJitter=function(n){this.jitter=n}}])})