mirror of
https://github.com/seigler/monitor-dash-address
synced 2025-07-27 00:26:10 +00:00
107 lines
No EOL
95 KiB
JavaScript
107 lines
No EOL
95 KiB
JavaScript
parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"imeZ":[function(require,module,exports) {
|
|
var r=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,e=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];module.exports=function(t){var s=t,o=t.indexOf("["),a=t.indexOf("]");-1!=o&&-1!=a&&(t=t.substring(0,o)+t.substring(o,a).replace(/:/g,";")+t.substring(a,t.length));for(var u=r.exec(t||""),i={},h=14;h--;)i[e[h]]=u[h]||"";return-1!=o&&-1!=a&&(i.source=s,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i};
|
|
},{}],"IAgR":[function(require,module,exports) {
|
|
var s=1e3,e=60*s,r=60*e,a=24*r,n=7*a,c=365.25*a;function t(t){if(!((t=String(t)).length>100)){var u=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(u){var i=parseFloat(u[1]);switch((u[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return i*c;case"weeks":case"week":case"w":return i*n;case"days":case"day":case"d":return i*a;case"hours":case"hour":case"hrs":case"hr":case"h":return i*r;case"minutes":case"minute":case"mins":case"min":case"m":return i*e;case"seconds":case"second":case"secs":case"sec":case"s":return i*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}}}function u(n){var c=Math.abs(n);return c>=a?Math.round(n/a)+"d":c>=r?Math.round(n/r)+"h":c>=e?Math.round(n/e)+"m":c>=s?Math.round(n/s)+"s":n+"ms"}function i(n){var c=Math.abs(n);return c>=a?o(n,c,a,"day"):c>=r?o(n,c,r,"hour"):c>=e?o(n,c,e,"minute"):c>=s?o(n,c,s,"second"):n+" ms"}function o(s,e,r,a){var n=e>=1.5*r;return Math.round(s/r)+" "+a+(n?"s":"")}module.exports=function(s,e){e=e||{};var r=typeof s;if("string"===r&&s.length>0)return t(s);if("number"===r&&isFinite(s))return e.long?i(s):u(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))};
|
|
},{}],"Kest":[function(require,module,exports) {
|
|
function e(e){function n(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]}function t(e){let o;function i(...e){if(!i.enabled)return;const n=i,s=Number(new Date),r=s-(o||s);n.diff=r,n.prev=o,n.curr=s,o=s,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(s,r)=>{if("%%"===s)return s;a++;const o=t.formatters[r];if("function"==typeof o){const t=e[a];s=o.call(n,t),e.splice(a,1),a--}return s}),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e)}return i.namespace=e,i.enabled=t.enabled(e),i.useColors=t.useColors(),i.color=n(e),i.destroy=s,i.extend=r,"function"==typeof t.init&&t.init(i),t.instances.push(i),i}function s(){const e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}function r(e,n){const s=t(this.namespace+(void 0===n?":":n)+e);return s.log=this.log,s}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.names=[],t.skips=[];const s=("string"==typeof e?e:"").split(/[\s,]+/),r=s.length;for(n=0;n<r;n++)s[n]&&("-"===(e=s[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){const e=t.instances[n];e.enabled=t.enabled(e.namespace)}},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,s;for(n=0,s=t.skips.length;n<s;n++)if(t.skips[n].test(e))return!1;for(n=0,s=t.names.length;n<s;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=require("ms"),Object.keys(e).forEach(n=>{t[n]=e[n]}),t.instances=[],t.names=[],t.skips=[],t.formatters={},t.selectColor=n,t.enable(t.load()),t}module.exports=e;
|
|
},{"ms":"IAgR"}],"pBGv":[function(require,module,exports) {
|
|
|
|
var t,e,n=module.exports={};function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===r||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}function u(t){if(e===clearTimeout)return clearTimeout(t);if((e===o||!e)&&clearTimeout)return e=clearTimeout,clearTimeout(t);try{return e(t)}catch(n){try{return e.call(null,t)}catch(n){return e.call(this,t)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:r}catch(n){t=r}try{e="function"==typeof clearTimeout?clearTimeout:o}catch(n){e=o}}();var c,s=[],l=!1,a=-1;function f(){l&&c&&(l=!1,c.length?s=c.concat(s):a=-1,s.length&&h())}function h(){if(!l){var t=i(f);l=!0;for(var e=s.length;e;){for(c=s,s=[];++a<e;)c&&c[a].run();a=-1,e=s.length}c=null,l=!1,u(t)}}function m(t,e){this.fun=t,this.array=e}function p(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];s.push(new m(t,e)),1!==s.length||l||i(h)},m.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0};
|
|
},{}],"jcLW":[function(require,module,exports) {
|
|
var process = require("process");
|
|
var e=require("process");function o(){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 C(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+module.exports.humanize(this.diff),!this.useColors)return;const o="color: "+this.color;e.splice(1,0,o,"color: inherit");let C=0,t=0;e[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(C++,"%c"===e&&(t=C))}),e.splice(t,0,o)}function t(...e){return"object"==typeof console&&console.log&&console.log(...e)}function r(e){try{e?exports.storage.setItem("debug",e):exports.storage.removeItem("debug")}catch(o){}}function n(){let o;try{o=exports.storage.getItem("debug")}catch(C){}return!o&&void 0!==e&&"env"in e&&(o=void 0),o}function s(){try{return localStorage}catch(e){}}exports.log=t,exports.formatArgs=C,exports.save=r,exports.load=n,exports.useColors=o,exports.storage=s(),exports.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"],module.exports=require("./common")(exports);const{formatters:F}=module.exports;F.j=function(e){try{return JSON.stringify(e)}catch(o){return"[UnexpectedJSONParseError]: "+o.message}};
|
|
},{"./common":"Kest","process":"pBGv"}],"ECAZ":[function(require,module,exports) {
|
|
var o=require("parseuri"),t=require("debug")("socket.io-client:url");function r(r,p){var s=r;p=p||"undefined"!=typeof location&&location,null==r&&(r=p.protocol+"//"+p.host),"string"==typeof r&&("/"===r.charAt(0)&&(r="/"===r.charAt(1)?p.protocol+r:p.host+r),/^(https?|wss?):\/\//.test(r)||(t("protocol-less url %s",r),r=void 0!==p?p.protocol+"//"+r:"https://"+r),t("parse %s",r),s=o(r)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";var e=-1!==s.host.indexOf(":")?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+e+":"+s.port,s.href=s.protocol+"://"+e+(p&&p.port===s.port?"":":"+s.port),s}module.exports=r;
|
|
},{"parseuri":"imeZ","debug":"jcLW"}],"wScO":[function(require,module,exports) {
|
|
var s=1e3,e=60*s,r=60*e,a=24*r,n=365.25*a;function c(c){if(!((c=String(c)).length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(c);if(t){var i=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return i*n;case"days":case"day":case"d":return i*a;case"hours":case"hour":case"hrs":case"hr":case"h":return i*r;case"minutes":case"minute":case"mins":case"min":case"m":return i*e;case"seconds":case"second":case"secs":case"sec":case"s":return i*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}}}function t(n){return n>=a?Math.round(n/a)+"d":n>=r?Math.round(n/r)+"h":n>=e?Math.round(n/e)+"m":n>=s?Math.round(n/s)+"s":n+"ms"}function i(n){return o(n,a,"day")||o(n,r,"hour")||o(n,e,"minute")||o(n,s,"second")||n+" ms"}function o(s,e,r){if(!(s<e))return s<1.5*e?Math.floor(s/e)+" "+r:Math.ceil(s/e)+" "+r+"s"}module.exports=function(s,e){e=e||{};var r=typeof s;if("string"===r&&s.length>0)return c(s);if("number"===r&&!1===isNaN(s))return e.long?i(s):t(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))};
|
|
},{}],"S04A":[function(require,module,exports) {
|
|
function e(e){var r,s=0;for(r in e)s=(s<<5)-s+e.charCodeAt(r),s|=0;return exports.colors[Math.abs(s)%exports.colors.length]}function r(r){var t;function o(){if(o.enabled){var e=o,r=+new Date,s=r-(t||r);e.diff=s,e.prev=t,e.curr=r,t=r;for(var n=new Array(arguments.length),p=0;p<n.length;p++)n[p]=arguments[p];n[0]=exports.coerce(n[0]),"string"!=typeof n[0]&&n.unshift("%O");var a=0;n[0]=n[0].replace(/%([a-zA-Z%])/g,function(r,s){if("%%"===r)return r;a++;var t=exports.formatters[s];if("function"==typeof t){var o=n[a];r=t.call(e,o),n.splice(a,1),a--}return r}),exports.formatArgs.call(e,n),(o.log||exports.log||console.log.bind(console)).apply(e,n)}}return o.namespace=r,o.enabled=exports.enabled(r),o.useColors=exports.useColors(),o.color=e(r),o.destroy=s,"function"==typeof exports.init&&exports.init(o),exports.instances.push(o),o}function s(){var e=exports.instances.indexOf(this);return-1!==e&&(exports.instances.splice(e,1),!0)}function t(e){var r;exports.save(e),exports.names=[],exports.skips=[];var s=("string"==typeof e?e:"").split(/[\s,]+/),t=s.length;for(r=0;r<t;r++)s[r]&&("-"===(e=s[r].replace(/\*/g,".*?"))[0]?exports.skips.push(new RegExp("^"+e.substr(1)+"$")):exports.names.push(new RegExp("^"+e+"$")));for(r=0;r<exports.instances.length;r++){var o=exports.instances[r];o.enabled=exports.enabled(o.namespace)}}function o(){exports.enable("")}function n(e){if("*"===e[e.length-1])return!0;var r,s;for(r=0,s=exports.skips.length;r<s;r++)if(exports.skips[r].test(e))return!1;for(r=0,s=exports.names.length;r<s;r++)if(exports.names[r].test(e))return!0;return!1}function p(e){return e instanceof Error?e.stack||e.message:e}exports=module.exports=r.debug=r.default=r,exports.coerce=p,exports.disable=o,exports.enable=t,exports.enabled=n,exports.humanize=require("ms"),exports.instances=[],exports.names=[],exports.skips=[],exports.formatters={};
|
|
},{"ms":"wScO"}],"bCvK":[function(require,module,exports) {
|
|
var process = require("process");
|
|
var e=require("process");function o(){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 C(e){var o=this.useColors;if(e[0]=(o?"%c":"")+this.namespace+(o?" %c":" ")+e[0]+(o?"%c ":" ")+"+"+exports.humanize(this.diff),o){var C="color: "+this.color;e.splice(1,0,C,"color: inherit");var t=0,r=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(t++,"%c"===e&&(r=t))}),e.splice(r,0,C)}}function t(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function r(e){try{null==e?exports.storage.removeItem("debug"):exports.storage.debug=e}catch(o){}}function n(){var o;try{o=exports.storage.debug}catch(C){}return!o&&void 0!==e&&"env"in e&&(o=void 0),o}function F(){try{return window.localStorage}catch(e){}}exports=module.exports=require("./debug"),exports.log=t,exports.formatArgs=C,exports.save=r,exports.load=n,exports.useColors=o,exports.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:F(),exports.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"],exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(o){return"[UnexpectedJSONParseError]: "+o.message}},exports.enable(n());
|
|
},{"./debug":"S04A","process":"pBGv"}],"uiKr":[function(require,module,exports) {
|
|
function t(t){if(t)return e(t)}function e(e){for(var s in t.prototype)e[s]=t.prototype[s];return e}"undefined"!=typeof module&&(module.exports=t),t.prototype.on=t.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},t.prototype.once=function(t,e){function s(){this.off(t,s),e.apply(this,arguments)}return s.fn=e,this.on(t,s),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var s,i=this._callbacks["$"+t];if(!i)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var r=0;r<i.length;r++)if((s=i[r])===e||s.fn===e){i.splice(r,1);break}return this},t.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),s=this._callbacks["$"+t];if(s)for(var i=0,r=(s=s.slice(0)).length;i<r;++i)s[i].apply(this,e);return this},t.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},t.prototype.hasListeners=function(t){return!!this.listeners(t).length};
|
|
},{}],"aJTU":[function(require,module,exports) {
|
|
var r={}.toString;module.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)};
|
|
},{}],"yh9p":[function(require,module,exports) {
|
|
"use strict";exports.byteLength=u,exports.toByteArray=i,exports.fromByteArray=d;for(var r=[],t=[],e="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=n.length;o<a;++o)r[o]=n[o],t[n.charCodeAt(o)]=o;function h(r){var t=r.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=r.indexOf("=");return-1===e&&(e=t),[e,e===t?0:4-e%4]}function u(r){var t=h(r),e=t[0],n=t[1];return 3*(e+n)/4-n}function c(r,t,e){return 3*(t+e)/4-e}function i(r){var n,o,a=h(r),u=a[0],i=a[1],f=new e(c(r,u,i)),A=0,d=i>0?u-4:u;for(o=0;o<d;o+=4)n=t[r.charCodeAt(o)]<<18|t[r.charCodeAt(o+1)]<<12|t[r.charCodeAt(o+2)]<<6|t[r.charCodeAt(o+3)],f[A++]=n>>16&255,f[A++]=n>>8&255,f[A++]=255&n;return 2===i&&(n=t[r.charCodeAt(o)]<<2|t[r.charCodeAt(o+1)]>>4,f[A++]=255&n),1===i&&(n=t[r.charCodeAt(o)]<<10|t[r.charCodeAt(o+1)]<<4|t[r.charCodeAt(o+2)]>>2,f[A++]=n>>8&255,f[A++]=255&n),f}function f(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function A(r,t,e){for(var n,o=[],a=t;a<e;a+=3)n=(r[a]<<16&16711680)+(r[a+1]<<8&65280)+(255&r[a+2]),o.push(f(n));return o.join("")}function d(t){for(var e,n=t.length,o=n%3,a=[],h=0,u=n-o;h<u;h+=16383)a.push(A(t,h,h+16383>u?u:h+16383));return 1===o?(e=t[n-1],a.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],a.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),a.join("")}t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63;
|
|
},{}],"JgNJ":[function(require,module,exports) {
|
|
exports.read=function(a,o,t,r,h){var M,p,w=8*h-r-1,f=(1<<w)-1,e=f>>1,i=-7,N=t?h-1:0,n=t?-1:1,s=a[o+N];for(N+=n,M=s&(1<<-i)-1,s>>=-i,i+=w;i>0;M=256*M+a[o+N],N+=n,i-=8);for(p=M&(1<<-i)-1,M>>=-i,i+=r;i>0;p=256*p+a[o+N],N+=n,i-=8);if(0===M)M=1-e;else{if(M===f)return p?NaN:1/0*(s?-1:1);p+=Math.pow(2,r),M-=e}return(s?-1:1)*p*Math.pow(2,M-r)},exports.write=function(a,o,t,r,h,M){var p,w,f,e=8*M-h-1,i=(1<<e)-1,N=i>>1,n=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,s=r?0:M-1,u=r?1:-1,l=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(w=isNaN(o)?1:0,p=i):(p=Math.floor(Math.log(o)/Math.LN2),o*(f=Math.pow(2,-p))<1&&(p--,f*=2),(o+=p+N>=1?n/f:n*Math.pow(2,1-N))*f>=2&&(p++,f/=2),p+N>=i?(w=0,p=i):p+N>=1?(w=(o*f-1)*Math.pow(2,h),p+=N):(w=o*Math.pow(2,N-1)*Math.pow(2,h),p=0));h>=8;a[t+s]=255&w,s+=u,w/=256,h-=8);for(p=p<<h|w,e+=h;e>0;a[t+s]=255&p,s+=u,p/=256,e-=8);a[t+s-u]|=128*l};
|
|
},{}],"dskh":[function(require,module,exports) {
|
|
|
|
var global = arguments[3];
|
|
var t=arguments[3],r=require("base64-js"),e=require("ieee754"),n=require("isarray");function i(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(r){return!1}}function o(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(t,r){if(o()<r)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r)).__proto__=f.prototype:(null===t&&(t=new f(r)),t.length=r),t}function f(t,r,e){if(!(f.TYPED_ARRAY_SUPPORT||this instanceof f))return new f(t,r,e);if("number"==typeof t){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return c(this,t)}return s(this,t,r,e)}function s(t,r,e,n){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&r instanceof ArrayBuffer?g(t,r,e,n):"string"==typeof r?l(t,r,e):y(t,r)}function h(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function a(t,r,e,n){return h(r),r<=0?u(t,r):void 0!==e?"string"==typeof n?u(t,r).fill(e,n):u(t,r).fill(e):u(t,r)}function c(t,r){if(h(r),t=u(t,r<0?0:0|w(r)),!f.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}function l(t,r,e){if("string"==typeof e&&""!==e||(e="utf8"),!f.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=0|v(r,e),i=(t=u(t,n)).write(r,e);return i!==n&&(t=t.slice(0,i)),t}function p(t,r){var e=r.length<0?0:0|w(r.length);t=u(t,e);for(var n=0;n<e;n+=1)t[n]=255&r[n];return t}function g(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return r=void 0===e&&void 0===n?new Uint8Array(r):void 0===n?new Uint8Array(r,e):new Uint8Array(r,e,n),f.TYPED_ARRAY_SUPPORT?(t=r).__proto__=f.prototype:t=p(t,r),t}function y(t,r){if(f.isBuffer(r)){var e=0|w(r.length);return 0===(t=u(t,e)).length?t:(r.copy(t,0,0,e),t)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||W(r.length)?u(t,0):p(t,r);if("Buffer"===r.type&&n(r.data))return p(t,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function w(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function d(t){return+t!=t&&(t=0),f.alloc(+t)}function v(t,r){if(f.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return $(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return K(t).length;default:if(n)return $(t).length;r=(""+r).toLowerCase(),n=!0}}function E(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return x(this,r,e);case"utf8":case"utf-8":return Y(this,r,e);case"ascii":return L(this,r,e);case"latin1":case"binary":return D(this,r,e);case"base64":return S(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function R(t,r,e,n,i){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof r&&(r=f.from(r,n)),f.isBuffer(r))return 0===r.length?-1:_(t,r,e,n,i);if("number"==typeof r)return r&=255,f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):_(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function _(t,r,e,n,i){var o,u=1,f=t.length,s=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;u=2,f/=2,s/=2,e/=2}function h(t,r){return 1===u?t[r]:t.readUInt16BE(r*u)}if(i){var a=-1;for(o=e;o<f;o++)if(h(t,o)===h(r,-1===a?0:o-a)){if(-1===a&&(a=o),o-a+1===s)return a*u}else-1!==a&&(o-=o-a),a=-1}else for(e+s>f&&(e=f-s),o=e;o>=0;o--){for(var c=!0,l=0;l<s;l++)if(h(t,o+l)!==h(r,l)){c=!1;break}if(c)return o}return-1}function A(t,r,e,n){e=Number(e)||0;var i=t.length-e;n?(n=Number(n))>i&&(n=i):n=i;var o=r.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var u=0;u<n;++u){var f=parseInt(r.substr(2*u,2),16);if(isNaN(f))return u;t[e+u]=f}return u}function m(t,r,e,n){return Q($(r,t.length-e),t,e,n)}function P(t,r,e,n){return Q(G(r),t,e,n)}function T(t,r,e,n){return P(t,r,e,n)}function B(t,r,e,n){return Q(K(r),t,e,n)}function U(t,r,e,n){return Q(H(r,t.length-e),t,e,n)}function S(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function Y(t,r,e){e=Math.min(t.length,e);for(var n=[],i=r;i<e;){var o,u,f,s,h=t[i],a=null,c=h>239?4:h>223?3:h>191?2:1;if(i+c<=e)switch(c){case 1:h<128&&(a=h);break;case 2:128==(192&(o=t[i+1]))&&(s=(31&h)<<6|63&o)>127&&(a=s);break;case 3:o=t[i+1],u=t[i+2],128==(192&o)&&128==(192&u)&&(s=(15&h)<<12|(63&o)<<6|63&u)>2047&&(s<55296||s>57343)&&(a=s);break;case 4:o=t[i+1],u=t[i+2],f=t[i+3],128==(192&o)&&128==(192&u)&&128==(192&f)&&(s=(15&h)<<18|(63&o)<<12|(63&u)<<6|63&f)>65535&&s<1114112&&(a=s)}null===a?(a=65533,c=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=c}return O(n)}exports.Buffer=f,exports.SlowBuffer=d,exports.INSPECT_MAX_BYTES=50,f.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:i(),exports.kMaxLength=o(),f.poolSize=8192,f._augment=function(t){return t.__proto__=f.prototype,t},f.from=function(t,r,e){return s(null,t,r,e)},f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0})),f.alloc=function(t,r,e){return a(null,t,r,e)},f.allocUnsafe=function(t){return c(null,t)},f.allocUnsafeSlow=function(t){return c(null,t)},f.isBuffer=function(t){return!(null==t||!t._isBuffer)},f.compare=function(t,r){if(!f.isBuffer(t)||!f.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,n=r.length,i=0,o=Math.min(e,n);i<o;++i)if(t[i]!==r[i]){e=t[i],n=r[i];break}return e<n?-1:n<e?1:0},f.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(t,r){if(!n(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return f.alloc(0);var e;if(void 0===r)for(r=0,e=0;e<t.length;++e)r+=t[e].length;var i=f.allocUnsafe(r),o=0;for(e=0;e<t.length;++e){var u=t[e];if(!f.isBuffer(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(i,o),o+=u.length}return i},f.byteLength=v,f.prototype._isBuffer=!0,f.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<t;r+=2)b(this,r,r+1);return this},f.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<t;r+=4)b(this,r,r+3),b(this,r+1,r+2);return this},f.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<t;r+=8)b(this,r,r+7),b(this,r+1,r+6),b(this,r+2,r+5),b(this,r+3,r+4);return this},f.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?Y(this,0,t):E.apply(this,arguments)},f.prototype.equals=function(t){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===f.compare(this,t)},f.prototype.inspect=function(){var t="",r=exports.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},f.prototype.compare=function(t,r,e,n,i){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),r<0||e>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&r>=e)return 0;if(n>=i)return-1;if(r>=e)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),u=(e>>>=0)-(r>>>=0),s=Math.min(o,u),h=this.slice(n,i),a=t.slice(r,e),c=0;c<s;++c)if(h[c]!==a[c]){o=h[c],u=a[c];break}return o<u?-1:u<o?1:0},f.prototype.includes=function(t,r,e){return-1!==this.indexOf(t,r,e)},f.prototype.indexOf=function(t,r,e){return R(this,t,r,e,!0)},f.prototype.lastIndexOf=function(t,r,e){return R(this,t,r,e,!1)},f.prototype.write=function(t,r,e,n){if(void 0===r)n="utf8",e=this.length,r=0;else if(void 0===e&&"string"==typeof r)n=r,e=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r|=0,isFinite(e)?(e|=0,void 0===n&&(n="utf8")):(n=e,e=void 0)}var i=this.length-r;if((void 0===e||e>i)&&(e=i),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return A(this,t,r,e);case"utf8":case"utf-8":return m(this,t,r,e);case"ascii":return P(this,t,r,e);case"latin1":case"binary":return T(this,t,r,e);case"base64":return B(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,t,r,e);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function O(t){var r=t.length;if(r<=I)return String.fromCharCode.apply(String,t);for(var e="",n=0;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=I));return e}function L(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(127&t[i]);return n}function D(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(t[i]);return n}function x(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=r;o<e;++o)i+=Z(t[o]);return i}function C(t,r,e){for(var n=t.slice(r,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function M(t,r,e){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function k(t,r,e,n,i,o){if(!f.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<o)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}function N(t,r,e,n){r<0&&(r=65535+r+1);for(var i=0,o=Math.min(t.length-e,2);i<o;++i)t[e+i]=(r&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function z(t,r,e,n){r<0&&(r=4294967295+r+1);for(var i=0,o=Math.min(t.length-e,4);i<o;++i)t[e+i]=r>>>8*(n?i:3-i)&255}function F(t,r,e,n,i,o){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function j(t,r,n,i,o){return o||F(t,r,n,4,3.4028234663852886e38,-3.4028234663852886e38),e.write(t,r,n,i,23,4),n+4}function q(t,r,n,i,o){return o||F(t,r,n,8,1.7976931348623157e308,-1.7976931348623157e308),e.write(t,r,n,i,52,8),n+8}f.prototype.slice=function(t,r){var e,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r<t&&(r=t),f.TYPED_ARRAY_SUPPORT)(e=this.subarray(t,r)).__proto__=f.prototype;else{var i=r-t;e=new f(i,void 0);for(var o=0;o<i;++o)e[o]=this[o+t]}return e},f.prototype.readUIntLE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n},f.prototype.readUIntBE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t+--r],i=1;r>0&&(i*=256);)n+=this[t+--r]*i;return n},f.prototype.readUInt8=function(t,r){return r||M(t,1,this.length),this[t]},f.prototype.readUInt16LE=function(t,r){return r||M(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUInt16BE=function(t,r){return r||M(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUInt32LE=function(t,r){return r||M(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUInt32BE=function(t,r){return r||M(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readIntLE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*r)),n},f.prototype.readIntBE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=r,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*r)),o},f.prototype.readInt8=function(t,r){return r||M(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,r){r||M(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt16BE=function(t,r){r||M(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt32LE=function(t,r){return r||M(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,r){return r||M(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,r){return r||M(t,4,this.length),e.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,r){return r||M(t,4,this.length),e.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,r){return r||M(t,8,this.length),e.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,r){return r||M(t,8,this.length),e.read(this,t,!1,52,8)},f.prototype.writeUIntLE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||k(this,t,r,e,Math.pow(2,8*e)-1,0);var i=1,o=0;for(this[r]=255&t;++o<e&&(i*=256);)this[r+o]=t/i&255;return r+e},f.prototype.writeUIntBE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||k(this,t,r,e,Math.pow(2,8*e)-1,0);var i=e-1,o=1;for(this[r+i]=255&t;--i>=0&&(o*=256);)this[r+i]=t/o&255;return r+e},f.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,255,0),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},f.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},f.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},f.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):z(this,t,r,!0),r+4},f.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},f.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=0,u=1,f=0;for(this[r]=255&t;++o<e&&(u*=256);)t<0&&0===f&&0!==this[r+o-1]&&(f=1),this[r+o]=(t/u>>0)-f&255;return r+e},f.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=e-1,u=1,f=0;for(this[r+o]=255&t;--o>=0&&(u*=256);)t<0&&0===f&&0!==this[r+o+1]&&(f=1),this[r+o]=(t/u>>0)-f&255;return r+e},f.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,127,-128),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},f.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},f.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},f.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):z(this,t,r,!0),r+4},f.prototype.writeInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},f.prototype.writeFloatLE=function(t,r,e){return j(this,t,r,!0,e)},f.prototype.writeFloatBE=function(t,r,e){return j(this,t,r,!1,e)},f.prototype.writeDoubleLE=function(t,r,e){return q(this,t,r,!0,e)},f.prototype.writeDoubleBE=function(t,r,e){return q(this,t,r,!1,e)},f.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<e&&(n=e),n===e)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r<n-e&&(n=t.length-r+e);var i,o=n-e;if(this===t&&e<r&&r<n)for(i=o-1;i>=0;--i)t[i+r]=this[i+e];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+r]=this[i+e];else Uint8Array.prototype.set.call(t,this.subarray(e,e+o),r);return o},f.prototype.fill=function(t,r,e,n){if("string"==typeof t){if("string"==typeof r?(n=r,r=0,e=this.length):"string"==typeof e&&(n=e,e=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!f.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(r<0||this.length<r||this.length<e)throw new RangeError("Out of range index");if(e<=r)return this;var o;if(r>>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(o=r;o<e;++o)this[o]=t;else{var u=f.isBuffer(t)?t:$(new f(t,n).toString()),s=u.length;for(o=0;o<e-r;++o)this[o+r]=u[o%s]}return this};var V=/[^+\/0-9A-Za-z-_]/g;function X(t){if((t=J(t).replace(V,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}function J(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Z(t){return t<16?"0"+t.toString(16):t.toString(16)}function $(t,r){var e;r=r||1/0;for(var n=t.length,i=null,o=[],u=0;u<n;++u){if((e=t.charCodeAt(u))>55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(u+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;o.push(e)}else if(e<2048){if((r-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function G(t){for(var r=[],e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r}function H(t,r){for(var e,n,i,o=[],u=0;u<t.length&&!((r-=2)<0);++u)n=(e=t.charCodeAt(u))>>8,i=e%256,o.push(i),o.push(n);return o}function K(t){return r.toByteArray(X(t))}function Q(t,r,e,n){for(var i=0;i<n&&!(i+e>=r.length||i>=t.length);++i)r[i+e]=t[i];return i}function W(t){return t!=t}
|
|
},{"base64-js":"yh9p","ieee754":"JgNJ","isarray":"aJTU","buffer":"dskh"}],"VOQX":[function(require,module,exports) {
|
|
var Buffer = require("buffer").Buffer;
|
|
var f=require("buffer").Buffer;module.exports=n;var r="function"==typeof f&&"function"==typeof f.isBuffer,e="function"==typeof ArrayBuffer,u=function(f){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(f):f.buffer instanceof ArrayBuffer};function n(n){return r&&f.isBuffer(n)||e&&(n instanceof ArrayBuffer||u(n))}
|
|
},{"buffer":"dskh"}],"DJEA":[function(require,module,exports) {
|
|
var e=require("isarray"),t=require("./is-buffer"),r=Object.prototype.toString,n="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===r.call(Blob),o="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===r.call(File);function f(r,n){if(!r)return r;if(t(r)){var o={_placeholder:!0,num:n.length};return n.push(r),o}if(e(r)){for(var i=new Array(r.length),a=0;a<r.length;a++)i[a]=f(r[a],n);return i}if("object"==typeof r&&!(r instanceof Date)){i={};for(var u in r)i[u]=f(r[u],n);return i}return r}function i(t,r){if(!t)return t;if(t&&t._placeholder)return r[t.num];if(e(t))for(var n=0;n<t.length;n++)t[n]=i(t[n],r);else if("object"==typeof t)for(var o in t)t[o]=i(t[o],r);return t}exports.deconstructPacket=function(e){var t=[],r=e.data,n=e;return n.data=f(r,t),n.attachments=t.length,{packet:n,buffers:t}},exports.reconstructPacket=function(e,t){return e.data=i(e.data,t),e.attachments=void 0,e},exports.removeBlobs=function(r,f){var i=0,a=r;!function r(u,c,l){if(!u)return u;if(n&&u instanceof Blob||o&&u instanceof File){i++;var s=new FileReader;s.onload=function(){l?l[c]=this.result:a=this.result,--i||f(a)},s.readAsArrayBuffer(u)}else if(e(u))for(var p=0;p<u.length;p++)r(u[p],p,u);else if("object"==typeof u&&!t(u))for(var d in u)r(u[d],d,u)}(a),i||f(a)};
|
|
},{"isarray":"aJTU","./is-buffer":"VOQX"}],"EDhw":[function(require,module,exports) {
|
|
var t=require("debug")("socket.io-parser"),r=require("component-emitter"),e=require("./binary"),n=require("isarray"),o=require("./is-buffer");function s(){}exports.protocol=4,exports.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],exports.CONNECT=0,exports.DISCONNECT=1,exports.EVENT=2,exports.ACK=3,exports.ERROR=4,exports.BINARY_EVENT=5,exports.BINARY_ACK=6,exports.Encoder=s,exports.Decoder=p;var i=exports.ERROR+'"encode error"';function c(r){var e=""+r.type;if(exports.BINARY_EVENT!==r.type&&exports.BINARY_ACK!==r.type||(e+=r.attachments+"-"),r.nsp&&"/"!==r.nsp&&(e+=r.nsp+","),null!=r.id&&(e+=r.id),null!=r.data){var n=a(r.data);if(!1===n)return i;e+=n}return t("encoded %j as %s",r,e),e}function a(t){try{return JSON.stringify(t)}catch(r){return!1}}function u(t,r){e.removeBlobs(t,function(t){var n=e.deconstructPacket(t),o=c(n.packet),s=n.buffers;s.unshift(o),r(s)})}function p(){this.reconstructor=null}function f(r){var e=0,o={type:Number(r.charAt(0))};if(null==exports.types[o.type])return N("unknown packet type "+o.type);if(exports.BINARY_EVENT===o.type||exports.BINARY_ACK===o.type){for(var s="";"-"!==r.charAt(++e)&&(s+=r.charAt(e),e!=r.length););if(s!=Number(s)||"-"!==r.charAt(e))throw new Error("Illegal attachments");o.attachments=Number(s)}if("/"===r.charAt(e+1))for(o.nsp="";++e;){if(","===(c=r.charAt(e)))break;if(o.nsp+=c,e===r.length)break}else o.nsp="/";var i=r.charAt(e+1);if(""!==i&&Number(i)==i){for(o.id="";++e;){var c;if(null==(c=r.charAt(e))||Number(c)!=c){--e;break}if(o.id+=r.charAt(e),e===r.length)break}o.id=Number(o.id)}if(r.charAt(++e)){var a=h(r.substr(e));if(!(!1!==a&&(o.type===exports.ERROR||n(a))))return N("invalid payload");o.data=a}return t("decoded %s as %j",r,o),o}function h(t){try{return JSON.parse(t)}catch(r){return!1}}function d(t){this.reconPack=t,this.buffers=[]}function N(t){return{type:exports.ERROR,data:"parser error: "+t}}s.prototype.encode=function(r,e){(t("encoding packet %j",r),exports.BINARY_EVENT===r.type||exports.BINARY_ACK===r.type)?u(r,e):e([c(r)])},r(p.prototype),p.prototype.add=function(t){var r;if("string"==typeof t)r=f(t),exports.BINARY_EVENT===r.type||exports.BINARY_ACK===r.type?(this.reconstructor=new d(r),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",r)):this.emit("decoded",r);else{if(!o(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");(r=this.reconstructor.takeBinaryData(t))&&(this.reconstructor=null,this.emit("decoded",r))}},p.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},d.prototype.takeBinaryData=function(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){var r=e.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null},d.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]};
|
|
},{"debug":"bCvK","component-emitter":"uiKr","./binary":"DJEA","isarray":"aJTU","./is-buffer":"VOQX"}],"mYnU":[function(require,module,exports) {
|
|
try{module.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(e){module.exports=!1}
|
|
},{}],"cVUh":[function(require,module,exports) {
|
|
var e=require("has-cors");module.exports=function(t){var n=t.xdomain,r=t.xscheme,c=t.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!n||e))return new XMLHttpRequest}catch(i){}try{if("undefined"!=typeof XDomainRequest&&!r&&c)return new XDomainRequest}catch(i){}if(!n)try{return new(self[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(i){}};
|
|
},{"has-cors":"mYnU"}],"Tn4q":[function(require,module,exports) {
|
|
module.exports=Object.keys||function(r){var e=[],t=Object.prototype.hasOwnProperty;for(var o in r)t.call(r,o)&&e.push(o);return e};
|
|
},{}],"E6Ed":[function(require,module,exports) {
|
|
var Buffer = require("buffer").Buffer;
|
|
var e=require("buffer").Buffer,t=require("isarray"),r=Object.prototype.toString,o="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===r.call(Blob),f="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===r.call(File);function n(r){if(!r||"object"!=typeof r)return!1;if(t(r)){for(var i=0,u=r.length;i<u;i++)if(n(r[i]))return!0;return!1}if("function"==typeof e&&e.isBuffer&&e.isBuffer(r)||"function"==typeof ArrayBuffer&&r instanceof ArrayBuffer||o&&r instanceof Blob||f&&r instanceof File)return!0;if(r.toJSON&&"function"==typeof r.toJSON&&1===arguments.length)return n(r.toJSON(),!0);for(var c in r)if(Object.prototype.hasOwnProperty.call(r,c)&&n(r[c]))return!0;return!1}module.exports=n;
|
|
},{"isarray":"aJTU","buffer":"dskh"}],"iRcD":[function(require,module,exports) {
|
|
module.exports=function(r,e,n){var t=r.byteLength;if(e=e||0,n=n||t,r.slice)return r.slice(e,n);if(e<0&&(e+=t),n<0&&(n+=t),n>t&&(n=t),e>=t||e>=n||0===t)return new ArrayBuffer(0);for(var f=new Uint8Array(r),i=new Uint8Array(n-e),u=e,a=0;u<n;u++,a++)i[a]=f[u];return i.buffer};
|
|
},{}],"ibc9":[function(require,module,exports) {
|
|
function n(n,t,u){var r=!1;return u=u||o,c.count=n,0===n?t():c;function c(n,o){if(c.count<=0)throw new Error("after called too many times");--c.count,n?(r=!0,t(n),t=u):0!==c.count||r||t(null,o)}}function o(){}module.exports=n;
|
|
},{}],"s6hm":[function(require,module,exports) {
|
|
var r,t,n,o=String.fromCharCode;function e(r){for(var t,n,o=[],e=0,i=r.length;e<i;)(t=r.charCodeAt(e++))>=55296&&t<=56319&&e<i?56320==(64512&(n=r.charCodeAt(e++)))?o.push(((1023&t)<<10)+(1023&n)+65536):(o.push(t),e--):o.push(t);return o}function i(r){for(var t,n=r.length,e=-1,i="";++e<n;)(t=r[e])>65535&&(i+=o((t-=65536)>>>10&1023|55296),t=56320|1023&t),i+=o(t);return i}function u(r,t){if(r>=55296&&r<=57343){if(t)throw Error("Lone surrogate U+"+r.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function a(r,t){return o(r>>t&63|128)}function f(r,t){if(0==(4294967168&r))return o(r);var n="";return 0==(4294965248&r)?n=o(r>>6&31|192):0==(4294901760&r)?(u(r,t)||(r=65533),n=o(r>>12&15|224),n+=a(r,6)):0==(4292870144&r)&&(n=o(r>>18&7|240),n+=a(r,12),n+=a(r,6)),n+=o(63&r|128)}function c(r,t){for(var n=!1!==(t=t||{}).strict,o=e(r),i=o.length,u=-1,a="";++u<i;)a+=f(o[u],n);return a}function h(){if(n>=t)throw Error("Invalid byte index");var o=255&r[n];if(n++,128==(192&o))return 63&o;throw Error("Invalid continuation byte")}function d(o){var e,i;if(n>t)throw Error("Invalid byte index");if(n==t)return!1;if(e=255&r[n],n++,0==(128&e))return e;if(192==(224&e)){if((i=(31&e)<<6|h())>=128)return i;throw Error("Invalid continuation byte")}if(224==(240&e)){if((i=(15&e)<<12|h()<<6|h())>=2048)return u(i,o)?i:65533;throw Error("Invalid continuation byte")}if(240==(248&e)&&(i=(7&e)<<18|h()<<12|h()<<6|h())>=65536&&i<=1114111)return i;throw Error("Invalid UTF-8 detected")}function v(o,u){var a=!1!==(u=u||{}).strict;r=e(o),t=r.length,n=0;for(var f,c=[];!1!==(f=d(a));)c.push(f);return i(c)}module.exports={version:"2.1.2",encode:c,decode:v};
|
|
},{}],"vLJO":[function(require,module,exports) {
|
|
!function(){"use strict";for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=new Uint8Array(256),t=0;t<r.length;t++)e[r.charCodeAt(t)]=t;exports.encode=function(e){var t,n=new Uint8Array(e),o=n.length,a="";for(t=0;t<o;t+=3)a+=r[n[t]>>2],a+=r[(3&n[t])<<4|n[t+1]>>4],a+=r[(15&n[t+1])<<2|n[t+2]>>6],a+=r[63&n[t+2]];return o%3==2?a=a.substring(0,a.length-1)+"=":o%3==1&&(a=a.substring(0,a.length-2)+"=="),a},exports.decode=function(r){var t,n,o,a,h,c=.75*r.length,g=r.length,i=0;"="===r[r.length-1]&&(c--,"="===r[r.length-2]&&c--);var u=new ArrayBuffer(c),A=new Uint8Array(u);for(t=0;t<g;t+=4)n=e[r.charCodeAt(t)],o=e[r.charCodeAt(t+1)],a=e[r.charCodeAt(t+2)],h=e[r.charCodeAt(t+3)],A[i++]=n<<2|o>>4,A[i++]=(15&o)<<4|a>>2,A[i++]=(3&a)<<6|63&h;return u}}();
|
|
},{}],"LDmX":[function(require,module,exports) {
|
|
var e=void 0!==e?e:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder&&MozBlobBuilder,t=function(){try{return 2===new Blob(["hi"]).size}catch(e){return!1}}(),r=t&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(e){return!1}}(),n=e&&e.prototype.append&&e.prototype.getBlob;function o(e){return e.map(function(e){if(e.buffer instanceof ArrayBuffer){var t=e.buffer;if(e.byteLength!==t.byteLength){var r=new Uint8Array(e.byteLength);r.set(new Uint8Array(t,e.byteOffset,e.byteLength)),t=r.buffer}return t}return e})}function u(t,r){r=r||{};var n=new e;return o(t).forEach(function(e){n.append(e)}),r.type?n.getBlob(r.type):n.getBlob()}function i(e,t){return new Blob(o(e),t||{})}"undefined"!=typeof Blob&&(u.prototype=Blob.prototype,i.prototype=Blob.prototype),module.exports=t?r?Blob:i:n?u:void 0;
|
|
},{}],"HSgu":[function(require,module,exports) {
|
|
var e,r=require("./keys"),t=require("has-binary2"),n=require("arraybuffer.slice"),a=require("after"),o=require("./utf8");"undefined"!=typeof ArrayBuffer&&(e=require("base64-arraybuffer"));var f="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),i="undefined"!=typeof navigator&&/PhantomJS/i.test(navigator.userAgent),u=f||i;exports.protocol=3;var c=exports.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},d=r(c),s={type:"error",data:"parser error"},y=require("blob");function p(e,r){return r("b"+exports.packets[e.type]+e.data.data)}function l(e,r,t){if(!r)return exports.encodeBase64Packet(e,t);var n=e.data,a=new Uint8Array(n),o=new Uint8Array(1+n.byteLength);o[0]=c[e.type];for(var f=0;f<a.length;f++)o[f+1]=a[f];return t(o.buffer)}function g(e,r,t){if(!r)return exports.encodeBase64Packet(e,t);var n=new FileReader;return n.onload=function(){exports.encodePacket({type:e.type,data:n.result},r,!0,t)},n.readAsArrayBuffer(e.data)}function h(e,r,t){if(!r)return exports.encodeBase64Packet(e,t);if(u)return g(e,r,t);var n=new Uint8Array(1);return n[0]=c[e.type],t(new y([n.buffer,e.data]))}function v(e){try{e=o.decode(e,{strict:!1})}catch(r){return!1}return e}function A(e,r,t){for(var n=new Array(e.length),o=a(e.length,t),f=function(e,t,a){r(t,function(r,t){n[e]=t,a(r,n)})},i=0;i<e.length;i++)f(i,e[i],o)}exports.encodePacket=function(e,r,t,n){"function"==typeof r&&(n=r,r=!1),"function"==typeof t&&(n=t,t=null);var a=void 0===e.data?void 0:e.data.buffer||e.data;if("undefined"!=typeof ArrayBuffer&&a instanceof ArrayBuffer)return l(e,r,n);if(void 0!==y&&a instanceof y)return h(e,r,n);if(a&&a.base64)return p(e,n);var f=c[e.type];return void 0!==e.data&&(f+=t?o.encode(String(e.data),{strict:!1}):String(e.data)),n(""+f)},exports.encodeBase64Packet=function(e,r){var t,n="b"+exports.packets[e.type];if(void 0!==y&&e.data instanceof y){var a=new FileReader;return a.onload=function(){var e=a.result.split(",")[1];r(n+e)},a.readAsDataURL(e.data)}try{t=String.fromCharCode.apply(null,new Uint8Array(e.data))}catch(u){for(var o=new Uint8Array(e.data),f=new Array(o.length),i=0;i<o.length;i++)f[i]=o[i];t=String.fromCharCode.apply(null,f)}return n+=btoa(t),r(n)},exports.decodePacket=function(e,r,t){if(void 0===e)return s;if("string"==typeof e){if("b"===e.charAt(0))return exports.decodeBase64Packet(e.substr(1),r);if(t&&!1===(e=v(e)))return s;var a=e.charAt(0);return Number(a)==a&&d[a]?e.length>1?{type:d[a],data:e.substring(1)}:{type:d[a]}:s}a=new Uint8Array(e)[0];var o=n(e,1);return y&&"blob"===r&&(o=new y([o])),{type:d[a],data:o}},exports.decodeBase64Packet=function(r,t){var n=d[r.charAt(0)];if(!e)return{type:n,data:{base64:!0,data:r.substr(1)}};var a=e.decode(r.substr(1));return"blob"===t&&y&&(a=new y([a])),{type:n,data:a}},exports.encodePayload=function(e,r,n){"function"==typeof r&&(n=r,r=null);var a=t(e);if(r&&a)return y&&!u?exports.encodePayloadAsBlob(e,n):exports.encodePayloadAsArrayBuffer(e,n);if(!e.length)return n("0:");A(e,function(e,t){exports.encodePacket(e,!!a&&r,!1,function(e){t(null,function(e){return e.length+":"+e}(e))})},function(e,r){return n(r.join(""))})},exports.decodePayload=function(e,r,t){if("string"!=typeof e)return exports.decodePayloadAsBinary(e,r,t);var n;if("function"==typeof r&&(t=r,r=null),""===e)return t(s,0,1);for(var a,o,f="",i=0,u=e.length;i<u;i++){var c=e.charAt(i);if(":"===c){if(""===f||f!=(a=Number(f)))return t(s,0,1);if(f!=(o=e.substr(i+1,a)).length)return t(s,0,1);if(o.length){if(n=exports.decodePacket(o,r,!1),s.type===n.type&&s.data===n.data)return t(s,0,1);if(!1===t(n,i+a,u))return}i+=a,f=""}else f+=c}return""!==f?t(s,0,1):void 0},exports.encodePayloadAsArrayBuffer=function(e,r){if(!e.length)return r(new ArrayBuffer(0));A(e,function(e,r){exports.encodePacket(e,!0,!0,function(e){return r(null,e)})},function(e,t){var n=t.reduce(function(e,r){var t;return e+(t="string"==typeof r?r.length:r.byteLength).toString().length+t+2},0),a=new Uint8Array(n),o=0;return t.forEach(function(e){var r="string"==typeof e,t=e;if(r){for(var n=new Uint8Array(e.length),f=0;f<e.length;f++)n[f]=e.charCodeAt(f);t=n.buffer}a[o++]=r?0:1;var i=t.byteLength.toString();for(f=0;f<i.length;f++)a[o++]=parseInt(i[f]);a[o++]=255;for(n=new Uint8Array(t),f=0;f<n.length;f++)a[o++]=n[f]}),r(a.buffer)})},exports.encodePayloadAsBlob=function(e,r){A(e,function(e,r){exports.encodePacket(e,!0,!0,function(e){var t=new Uint8Array(1);if(t[0]=1,"string"==typeof e){for(var n=new Uint8Array(e.length),a=0;a<e.length;a++)n[a]=e.charCodeAt(a);e=n.buffer,t[0]=0}var o=(e instanceof ArrayBuffer?e.byteLength:e.size).toString(),f=new Uint8Array(o.length+1);for(a=0;a<o.length;a++)f[a]=parseInt(o[a]);if(f[o.length]=255,y){var i=new y([t.buffer,f.buffer,e]);r(null,i)}})},function(e,t){return r(new y(t))})},exports.decodePayloadAsBinary=function(e,r,t){"function"==typeof r&&(t=r,r=null);for(var a=e,o=[];a.byteLength>0;){for(var f=new Uint8Array(a),i=0===f[0],u="",c=1;255!==f[c];c++){if(u.length>310)return t(s,0,1);u+=f[c]}a=n(a,2+u.length),u=parseInt(u);var d=n(a,0,u);if(i)try{d=String.fromCharCode.apply(null,new Uint8Array(d))}catch(l){var y=new Uint8Array(d);d="";for(c=0;c<y.length;c++)d+=String.fromCharCode(y[c])}o.push(d),a=n(a,u)}var p=o.length;o.forEach(function(e,n){t(exports.decodePacket(e,r,!0),n,p)})};
|
|
},{"./keys":"Tn4q","has-binary2":"E6Ed","arraybuffer.slice":"iRcD","after":"ibc9","./utf8":"s6hm","base64-arraybuffer":"vLJO","blob":"LDmX"}],"HBl9":[function(require,module,exports) {
|
|
var t=require("engine.io-parser"),e=require("component-emitter");function s(t){this.path=t.path,this.hostname=t.hostname,this.port=t.port,this.secure=t.secure,this.query=t.query,this.timestampParam=t.timestampParam,this.timestampRequests=t.timestampRequests,this.readyState="",this.agent=t.agent||!1,this.socket=t.socket,this.enablesXDR=t.enablesXDR,this.withCredentials=t.withCredentials,this.pfx=t.pfx,this.key=t.key,this.passphrase=t.passphrase,this.cert=t.cert,this.ca=t.ca,this.ciphers=t.ciphers,this.rejectUnauthorized=t.rejectUnauthorized,this.forceNode=t.forceNode,this.isReactNative=t.isReactNative,this.extraHeaders=t.extraHeaders,this.localAddress=t.localAddress}module.exports=s,e(s.prototype),s.prototype.onError=function(t,e){var s=new Error(t);return s.type="TransportError",s.description=e,this.emit("error",s),this},s.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this},s.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},s.prototype.send=function(t){if("open"!==this.readyState)throw new Error("Transport not open");this.write(t)},s.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},s.prototype.onData=function(e){var s=t.decodePacket(e,this.socket.binaryType);this.onPacket(s)},s.prototype.onPacket=function(t){this.emit("packet",t)},s.prototype.onClose=function(){this.readyState="closed",this.emit("close")};
|
|
},{"engine.io-parser":"HSgu","component-emitter":"uiKr"}],"vs2a":[function(require,module,exports) {
|
|
exports.encode=function(e){var n="";for(var o in e)e.hasOwnProperty(o)&&(n.length&&(n+="&"),n+=encodeURIComponent(o)+"="+encodeURIComponent(e[o]));return n},exports.decode=function(e){for(var n={},o=e.split("&"),t=0,r=o.length;t<r;t++){var d=o[t].split("=");n[decodeURIComponent(d[0])]=decodeURIComponent(d[1])}return n};
|
|
},{}],"X1xq":[function(require,module,exports) {
|
|
module.exports=function(o,t){var p=function(){};p.prototype=t.prototype,o.prototype=new p,o.prototype.constructor=o};
|
|
},{}],"t9Jt":[function(require,module,exports) {
|
|
"use strict";var r,e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),t=64,n={},o=0,u=0;function a(r){var n="";do{n=e[r%t]+n,r=Math.floor(r/t)}while(r>0);return n}function c(r){var e=0;for(u=0;u<r.length;u++)e=e*t+n[r.charAt(u)];return e}function f(){var e=a(+new Date);return e!==r?(o=0,r=e):e+"."+a(o++)}for(;u<t;u++)n[e[u]]=u;f.encode=a,f.decode=c,module.exports=f;
|
|
},{}],"hsm0":[function(require,module,exports) {
|
|
var t=require("../transport"),e=require("parseqs"),i=require("engine.io-parser"),o=require("component-inherit"),n=require("yeast"),r=require("debug")("engine.io-client:polling");module.exports=p;var s=null!=new(require("xmlhttprequest-ssl"))({xdomain:!1}).responseType;function p(e){var i=e&&e.forceBase64;s&&!i||(this.supportsBinary=!1),t.call(this,e)}o(p,t),p.prototype.name="polling",p.prototype.doOpen=function(){this.poll()},p.prototype.pause=function(t){var e=this;function i(){r("paused"),e.readyState="paused",t()}if(this.readyState="pausing",this.polling||!this.writable){var o=0;this.polling&&(r("we are currently polling - waiting to pause"),o++,this.once("pollComplete",function(){r("pre-pause polling complete"),--o||i()})),this.writable||(r("we are currently writing - waiting to pause"),o++,this.once("drain",function(){r("pre-pause writing complete"),--o||i()}))}else i()},p.prototype.poll=function(){r("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},p.prototype.onData=function(t){var e=this;r("polling got data %s",t);i.decodePayload(t,this.socket.binaryType,function(t,i,o){if("opening"===e.readyState&&e.onOpen(),"close"===t.type)return e.onClose(),!1;e.onPacket(t)}),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():r('ignoring poll - transport state "%s"',this.readyState))},p.prototype.doClose=function(){var t=this;function e(){r("writing close packet"),t.write([{type:"close"}])}"open"===this.readyState?(r("transport open - closing"),e()):(r("transport not open - deferring close"),this.once("open",e))},p.prototype.write=function(t){var e=this;this.writable=!1;var o=function(){e.writable=!0,e.emit("drain")};i.encodePayload(t,this.supportsBinary,function(t){e.doWrite(t,o)})},p.prototype.uri=function(){var t=this.query||{},i=this.secure?"https":"http",o="";return!1!==this.timestampRequests&&(t[this.timestampParam]=n()),this.supportsBinary||t.sid||(t.b64=1),t=e.encode(t),this.port&&("https"===i&&443!==Number(this.port)||"http"===i&&80!==Number(this.port))&&(o=":"+this.port),t.length&&(t="?"+t),i+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+o+this.path+t};
|
|
},{"../transport":"HBl9","parseqs":"vs2a","engine.io-parser":"HSgu","component-inherit":"X1xq","yeast":"t9Jt","debug":"jcLW","xmlhttprequest-ssl":"cVUh"}],"tzUF":[function(require,module,exports) {
|
|
var t=require("xmlhttprequest-ssl"),e=require("./polling"),s=require("component-emitter"),r=require("component-inherit"),i=require("debug")("engine.io-client:polling-xhr");function o(){}function n(t){if(e.call(this,t),this.requestTimeout=t.requestTimeout,this.extraHeaders=t.extraHeaders,"undefined"!=typeof location){var s="https:"===location.protocol,r=location.port;r||(r=s?443:80),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||r!==t.port,this.xs=t.secure!==s}}function a(t){this.method=t.method||"GET",this.uri=t.uri,this.xd=!!t.xd,this.xs=!!t.xs,this.async=!1!==t.async,this.data=void 0!==t.data?t.data:null,this.agent=t.agent,this.isBinary=t.isBinary,this.supportsBinary=t.supportsBinary,this.enablesXDR=t.enablesXDR,this.withCredentials=t.withCredentials,this.requestTimeout=t.requestTimeout,this.pfx=t.pfx,this.key=t.key,this.passphrase=t.passphrase,this.cert=t.cert,this.ca=t.ca,this.ciphers=t.ciphers,this.rejectUnauthorized=t.rejectUnauthorized,this.extraHeaders=t.extraHeaders,this.create()}if(module.exports=n,module.exports.Request=a,r(n,e),n.prototype.supportsBinary=!0,n.prototype.request=function(t){return(t=t||{}).uri=this.uri(),t.xd=this.xd,t.xs=this.xs,t.agent=this.agent||!1,t.supportsBinary=this.supportsBinary,t.enablesXDR=this.enablesXDR,t.withCredentials=this.withCredentials,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,t.requestTimeout=this.requestTimeout,t.extraHeaders=this.extraHeaders,new a(t)},n.prototype.doWrite=function(t,e){var s="string"!=typeof t&&void 0!==t,r=this.request({method:"POST",data:t,isBinary:s}),i=this;r.on("success",e),r.on("error",function(t){i.onError("xhr post error",t)}),this.sendXhr=r},n.prototype.doPoll=function(){i("xhr poll");var t=this.request(),e=this;t.on("data",function(t){e.onData(t)}),t.on("error",function(t){e.onError("xhr poll error",t)}),this.pollXhr=t},s(a.prototype),a.prototype.create=function(){var e={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized;var s=this.xhr=new t(e),r=this;try{i("xhr open %s: %s",this.method,this.uri),s.open(this.method,this.uri,this.async);try{if(this.extraHeaders)for(var o in s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0),this.extraHeaders)this.extraHeaders.hasOwnProperty(o)&&s.setRequestHeader(o,this.extraHeaders[o])}catch(n){}if("POST"===this.method)try{this.isBinary?s.setRequestHeader("Content-type","application/octet-stream"):s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(n){}try{s.setRequestHeader("Accept","*/*")}catch(n){}"withCredentials"in s&&(s.withCredentials=this.withCredentials),this.requestTimeout&&(s.timeout=this.requestTimeout),this.hasXDR()?(s.onload=function(){r.onLoad()},s.onerror=function(){r.onError(s.responseText)}):s.onreadystatechange=function(){if(2===s.readyState)try{var t=s.getResponseHeader("Content-Type");(r.supportsBinary&&"application/octet-stream"===t||"application/octet-stream; charset=UTF-8"===t)&&(s.responseType="arraybuffer")}catch(n){}4===s.readyState&&(200===s.status||1223===s.status?r.onLoad():setTimeout(function(){r.onError("number"==typeof s.status?s.status:0)},0))},i("xhr data %s",this.data),s.send(this.data)}catch(n){return void setTimeout(function(){r.onError(n)},0)}"undefined"!=typeof document&&(this.index=a.requestsCount++,a.requests[this.index]=this)},a.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},a.prototype.onData=function(t){this.emit("data",t),this.onSuccess()},a.prototype.onError=function(t){this.emit("error",t),this.cleanup(!0)},a.prototype.cleanup=function(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=o:this.xhr.onreadystatechange=o,t)try{this.xhr.abort()}catch(e){}"undefined"!=typeof document&&delete a.requests[this.index],this.xhr=null}},a.prototype.onLoad=function(){var t;try{var e;try{e=this.xhr.getResponseHeader("Content-Type")}catch(s){}t=("application/octet-stream"===e||"application/octet-stream; charset=UTF-8"===e)&&this.xhr.response||this.xhr.responseText}catch(s){this.onError(s)}null!=t&&this.onData(t)},a.prototype.hasXDR=function(){return"undefined"!=typeof XDomainRequest&&!this.xs&&this.enablesXDR},a.prototype.abort=function(){this.cleanup()},a.requestsCount=0,a.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",u);else if("function"==typeof addEventListener){var h="onpagehide"in self?"pagehide":"unload";addEventListener(h,u,!1)}function u(){for(var t in a.requests)a.requests.hasOwnProperty(t)&&a.requests[t].abort()}
|
|
},{"xmlhttprequest-ssl":"cVUh","./polling":"hsm0","component-emitter":"uiKr","component-inherit":"X1xq","debug":"jcLW"}],"ruO5":[function(require,module,exports) {
|
|
var global = arguments[3];
|
|
var e=arguments[3],t=require("./polling"),r=require("component-inherit");module.exports=c;var i,o=/\n/g,n=/\\n/g;function a(){}function s(){return"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:{}}function c(e){if(t.call(this,e),this.query=this.query||{},!i){var r=s();i=r.___eio=r.___eio||[]}this.index=i.length;var o=this;i.push(function(e){o.onData(e)}),this.query.j=this.index,"function"==typeof addEventListener&&addEventListener("beforeunload",function(){o.script&&(o.script.onerror=a)},!1)}r(c,t),c.prototype.supportsBinary=!1,c.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),t.prototype.doClose.call(this)},c.prototype.doPoll=function(){var e=this,t=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),t.async=!0,t.src=this.uri(),t.onerror=function(t){e.onError("jsonp poll error",t)};var r=document.getElementsByTagName("script")[0];r?r.parentNode.insertBefore(t,r):(document.head||document.body).appendChild(t),this.script=t,"undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent)&&setTimeout(function(){var e=document.createElement("iframe");document.body.appendChild(e),document.body.removeChild(e)},100)},c.prototype.doWrite=function(e,t){var r=this;if(!this.form){var i,a=document.createElement("form"),s=document.createElement("textarea"),c=this.iframeId="eio_iframe_"+this.index;a.className="socketio",a.style.position="absolute",a.style.top="-1000px",a.style.left="-1000px",a.target=c,a.method="POST",a.setAttribute("accept-charset","utf-8"),s.name="d",a.appendChild(s),document.body.appendChild(a),this.form=a,this.area=s}function d(){m(),t()}function m(){if(r.iframe)try{r.form.removeChild(r.iframe)}catch(t){r.onError("jsonp polling iframe removal error",t)}try{var e='<iframe src="javascript:0" name="'+r.iframeId+'">';i=document.createElement(e)}catch(t){(i=document.createElement("iframe")).name=r.iframeId,i.src="javascript:0"}i.id=r.iframeId,r.form.appendChild(i),r.iframe=i}this.form.action=this.uri(),m(),e=e.replace(n,"\\\n"),this.area.value=e.replace(o,"\\n");try{this.form.submit()}catch(p){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===r.iframe.readyState&&d()}:this.iframe.onload=d};
|
|
},{"./polling":"hsm0","component-inherit":"X1xq"}],"rDCW":[function(require,module,exports) {
|
|
|
|
},{}],"ExHC":[function(require,module,exports) {
|
|
var Buffer = require("buffer").Buffer;
|
|
var e,t,s=require("buffer").Buffer,r=require("../transport"),i=require("engine.io-parser"),o=require("parseqs"),n=require("component-inherit"),a=require("yeast"),h=require("debug")("engine.io-client:websocket");if("undefined"!=typeof WebSocket?e=WebSocket:"undefined"!=typeof self&&(e=self.WebSocket||self.MozWebSocket),"undefined"==typeof window)try{t=require("ws")}catch(u){}var p=e||t;function c(s){s&&s.forceBase64&&(this.supportsBinary=!1),this.perMessageDeflate=s.perMessageDeflate,this.usingBrowserWebSocket=e&&!s.forceNode,this.protocols=s.protocols,this.usingBrowserWebSocket||(p=t),r.call(this,s)}module.exports=c,n(c,r),c.prototype.name="websocket",c.prototype.supportsBinary=!0,c.prototype.doOpen=function(){if(this.check()){var e=this.uri(),t=this.protocols,s={agent:this.agent,perMessageDeflate:this.perMessageDeflate};s.pfx=this.pfx,s.key=this.key,s.passphrase=this.passphrase,s.cert=this.cert,s.ca=this.ca,s.ciphers=this.ciphers,s.rejectUnauthorized=this.rejectUnauthorized,this.extraHeaders&&(s.headers=this.extraHeaders),this.localAddress&&(s.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket&&!this.isReactNative?t?new p(e,t):new p(e):new p(e,t,s)}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()}},c.prototype.addEventListeners=function(){var e=this;this.ws.onopen=function(){e.onOpen()},this.ws.onclose=function(){e.onClose()},this.ws.onmessage=function(t){e.onData(t.data)},this.ws.onerror=function(t){e.onError("websocket error",t)}},c.prototype.write=function(e){var t=this;this.writable=!1;for(var r=e.length,o=0,n=r;o<n;o++)!function(e){i.encodePacket(e,t.supportsBinary,function(i){if(!t.usingBrowserWebSocket){var o={};if(e.options&&(o.compress=e.options.compress),t.perMessageDeflate)("string"==typeof i?s.byteLength(i):i.length)<t.perMessageDeflate.threshold&&(o.compress=!1)}try{t.usingBrowserWebSocket?t.ws.send(i):t.ws.send(i,o)}catch(u){h("websocket closed before onclose event")}--r||a()})}(e[o]);function a(){t.emit("flush"),setTimeout(function(){t.writable=!0,t.emit("drain")},0)}},c.prototype.onClose=function(){r.prototype.onClose.call(this)},c.prototype.doClose=function(){void 0!==this.ws&&this.ws.close()},c.prototype.uri=function(){var e=this.query||{},t=this.secure?"wss":"ws",s="";return this.port&&("wss"===t&&443!==Number(this.port)||"ws"===t&&80!==Number(this.port))&&(s=":"+this.port),this.timestampRequests&&(e[this.timestampParam]=a()),this.supportsBinary||(e.b64=1),(e=o.encode(e)).length&&(e="?"+e),t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+s+this.path+e},c.prototype.check=function(){return!(!p||"__initialize"in p&&this.name===c.prototype.name)};
|
|
},{"../transport":"HBl9","engine.io-parser":"HSgu","parseqs":"vs2a","component-inherit":"X1xq","yeast":"t9Jt","debug":"jcLW","ws":"rDCW","buffer":"dskh"}],"xQDS":[function(require,module,exports) {
|
|
var e=require("xmlhttprequest-ssl"),o=require("./polling-xhr"),r=require("./polling-jsonp"),n=require("./websocket");function t(n){var t=!1,i=!1,s=!1!==n.jsonp;if("undefined"!=typeof location){var l="https:"===location.protocol,p=location.port;p||(p=l?443:80),t=n.hostname!==location.hostname||p!==n.port,i=n.secure!==l}if(n.xdomain=t,n.xscheme=i,"open"in new e(n)&&!n.forceJSONP)return new o(n);if(!s)throw new Error("JSONP disabled");return new r(n)}exports.polling=t,exports.websocket=n;
|
|
},{"xmlhttprequest-ssl":"cVUh","./polling-xhr":"tzUF","./polling-jsonp":"ruO5","./websocket":"ExHC"}],"rcym":[function(require,module,exports) {
|
|
var r=[].indexOf;module.exports=function(e,n){if(r)return e.indexOf(n);for(var f=0;f<e.length;++f)if(e[f]===n)return f;return-1};
|
|
},{}],"APvO":[function(require,module,exports) {
|
|
var e=require("./transports/index"),t=require("component-emitter"),r=require("debug")("engine.io-client:socket"),s=require("indexof"),i=require("engine.io-parser"),o=require("parseuri"),n=require("parseqs");function a(e,t){if(!(this instanceof a))return new a(e,t);t=t||{},e&&"object"==typeof e&&(t=e,e=null),e?(e=o(e),t.hostname=e.host,t.secure="https"===e.protocol||"wss"===e.protocol,t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=o(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=n.decode(this.query)),this.upgrade=!1!==t.upgrade,this.path=(t.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!t.forceJSONP,this.jsonp=!1!==t.jsonp,this.forceBase64=!!t.forceBase64,this.enablesXDR=!!t.enablesXDR,this.withCredentials=!1!==t.withCredentials,this.timestampParam=t.timestampParam||"t",this.timestampRequests=t.timestampRequests,this.transports=t.transports||["polling","websocket"],this.transportOptions=t.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=t.policyPort||843,this.rememberUpgrade=t.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=t.onlyBinaryUpgrades,this.perMessageDeflate=!1!==t.perMessageDeflate&&(t.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=t.pfx||null,this.key=t.key||null,this.passphrase=t.passphrase||null,this.cert=t.cert||null,this.ca=t.ca||null,this.ciphers=t.ciphers||null,this.rejectUnauthorized=void 0===t.rejectUnauthorized||t.rejectUnauthorized,this.forceNode=!!t.forceNode,this.isReactNative="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),("undefined"==typeof self||this.isReactNative)&&(t.extraHeaders&&Object.keys(t.extraHeaders).length>0&&(this.extraHeaders=t.extraHeaders),t.localAddress&&(this.localAddress=t.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}function p(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}module.exports=a,a.priorWebsocketSuccess=!1,t(a.prototype),a.protocol=i.protocol,a.Socket=a,a.Transport=require("./transport"),a.transports=require("./transports/index"),a.parser=require("engine.io-parser"),a.prototype.createTransport=function(t){r('creating transport "%s"',t);var s=p(this.query);s.EIO=i.protocol,s.transport=t;var o=this.transportOptions[t]||{};return this.id&&(s.sid=this.id),new e[t]({query:s,socket:this,agent:o.agent||this.agent,hostname:o.hostname||this.hostname,port:o.port||this.port,secure:o.secure||this.secure,path:o.path||this.path,forceJSONP:o.forceJSONP||this.forceJSONP,jsonp:o.jsonp||this.jsonp,forceBase64:o.forceBase64||this.forceBase64,enablesXDR:o.enablesXDR||this.enablesXDR,withCredentials:o.withCredentials||this.withCredentials,timestampRequests:o.timestampRequests||this.timestampRequests,timestampParam:o.timestampParam||this.timestampParam,policyPort:o.policyPort||this.policyPort,pfx:o.pfx||this.pfx,key:o.key||this.key,passphrase:o.passphrase||this.passphrase,cert:o.cert||this.cert,ca:o.ca||this.ca,ciphers:o.ciphers||this.ciphers,rejectUnauthorized:o.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:o.perMessageDeflate||this.perMessageDeflate,extraHeaders:o.extraHeaders||this.extraHeaders,forceNode:o.forceNode||this.forceNode,localAddress:o.localAddress||this.localAddress,requestTimeout:o.requestTimeout||this.requestTimeout,protocols:o.protocols||void 0,isReactNative:this.isReactNative})},a.prototype.open=function(){var e;if(this.rememberUpgrade&&a.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length){var t=this;return void setTimeout(function(){t.emit("error","No transports available")},0)}e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(r){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)},a.prototype.setTransport=function(e){r("setting transport %s",e.name);var t=this;this.transport&&(r("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",function(){t.onDrain()}).on("packet",function(e){t.onPacket(e)}).on("error",function(e){t.onError(e)}).on("close",function(){t.onClose("transport close")})},a.prototype.probe=function(e){r('probing transport "%s"',e);var t=this.createTransport(e,{probe:1}),s=!1,i=this;function o(){if(i.onlyBinaryUpgrades){var o=!this.supportsBinary&&i.transport.supportsBinary;s=s||o}s||(r('probe transport "%s" opened',e),t.send([{type:"ping",data:"probe"}]),t.once("packet",function(o){if(!s)if("pong"===o.type&&"probe"===o.data){if(r('probe transport "%s" pong',e),i.upgrading=!0,i.emit("upgrading",t),!t)return;a.priorWebsocketSuccess="websocket"===t.name,r('pausing current transport "%s"',i.transport.name),i.transport.pause(function(){s||"closed"!==i.readyState&&(r("changing transport and sending upgrade packet"),l(),i.setTransport(t),t.send([{type:"upgrade"}]),i.emit("upgrade",t),t=null,i.upgrading=!1,i.flush())})}else{r('probe transport "%s" failed',e);var n=new Error("probe error");n.transport=t.name,i.emit("upgradeError",n)}}))}function n(){s||(s=!0,l(),t.close(),t=null)}function p(s){var o=new Error("probe error: "+s);o.transport=t.name,n(),r('probe transport "%s" failed because of error: %s',e,s),i.emit("upgradeError",o)}function h(){p("transport closed")}function c(){p("socket closed")}function u(e){t&&e.name!==t.name&&(r('"%s" works - aborting "%s"',e.name,t.name),n())}function l(){t.removeListener("open",o),t.removeListener("error",p),t.removeListener("close",h),i.removeListener("close",c),i.removeListener("upgrading",u)}a.priorWebsocketSuccess=!1,t.once("open",o),t.once("error",p),t.once("close",h),this.once("close",c),this.once("upgrading",u),t.open()},a.prototype.onOpen=function(){if(r("socket open"),this.readyState="open",a.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){r("starting upgrade probes");for(var e=0,t=this.upgrades.length;e<t;e++)this.probe(this.upgrades[e])}},a.prototype.onPacket=function(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(r('socket receive: type "%s", data "%s"',e.type,e.data),this.emit("packet",e),this.emit("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emit("data",e.data),this.emit("message",e.data)}else r('packet received with socket readyState "%s"',this.readyState)},a.prototype.onHandshake=function(e){this.emit("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.onOpen(),"closed"!==this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},a.prototype.onHeartbeat=function(e){clearTimeout(this.pingTimeoutTimer);var t=this;t.pingTimeoutTimer=setTimeout(function(){"closed"!==t.readyState&&t.onClose("ping timeout")},e||t.pingInterval+t.pingTimeout)},a.prototype.setPing=function(){var e=this;clearTimeout(e.pingIntervalTimer),e.pingIntervalTimer=setTimeout(function(){r("writing ping packet - expecting pong within %sms",e.pingTimeout),e.ping(),e.onHeartbeat(e.pingTimeout)},e.pingInterval)},a.prototype.ping=function(){var e=this;this.sendPacket("ping",function(){e.emit("ping")})},a.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},a.prototype.flush=function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(r("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},a.prototype.write=a.prototype.send=function(e,t,r){return this.sendPacket("message",e,t,r),this},a.prototype.sendPacket=function(e,t,r,s){if("function"==typeof t&&(s=t,t=void 0),"function"==typeof r&&(s=r,r=null),"closing"!==this.readyState&&"closed"!==this.readyState){(r=r||{}).compress=!1!==r.compress;var i={type:e,data:t,options:r};this.emit("packetCreate",i),this.writeBuffer.push(i),s&&this.once("flush",s),this.flush()}},a.prototype.close=function(){if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";var e=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?i():t()}):this.upgrading?i():t()}function t(){e.onClose("forced close"),r("socket closing - telling transport to close"),e.transport.close()}function s(){e.removeListener("upgrade",s),e.removeListener("upgradeError",s),t()}function i(){e.once("upgrade",s),e.once("upgradeError",s)}return this},a.prototype.onError=function(e){r("socket error %j",e),a.priorWebsocketSuccess=!1,this.emit("error",e),this.onClose("transport error",e)},a.prototype.onClose=function(e,t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){r('socket close with reason: "%s"',e);clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",e,t),this.writeBuffer=[],this.prevBufferLen=0}},a.prototype.filterUpgrades=function(e){for(var t=[],r=0,i=e.length;r<i;r++)~s(this.transports,e[r])&&t.push(e[r]);return t};
|
|
},{"./transports/index":"xQDS","component-emitter":"uiKr","debug":"jcLW","indexof":"rcym","engine.io-parser":"HSgu","parseuri":"imeZ","parseqs":"vs2a","./transport":"HBl9"}],"h0uD":[function(require,module,exports) {
|
|
module.exports=require("./socket"),module.exports.parser=require("engine.io-parser");
|
|
},{"./socket":"APvO","engine.io-parser":"HSgu"}],"PFWQ":[function(require,module,exports) {
|
|
function r(r,e){for(var n=[],o=(e=e||0)||0;o<r.length;o++)n[o-e]=r[o];return n}module.exports=r;
|
|
},{}],"BM2E":[function(require,module,exports) {
|
|
function e(e,n,o){return e.on(n,o),{destroy:function(){e.removeListener(n,o)}}}module.exports=e;
|
|
},{}],"NpfF":[function(require,module,exports) {
|
|
var n=[].slice;module.exports=function(r,t){if("string"==typeof t&&(t=r[t]),"function"!=typeof t)throw new Error("bind() requires a function");var o=n.call(arguments,2);return function(){return t.apply(r,o.concat(n.call(arguments)))}};
|
|
},{}],"wT76":[function(require,module,exports) {
|
|
var t=require("socket.io-parser"),e=require("component-emitter"),i=require("to-array"),s=require("./on"),n=require("component-bind"),o=require("debug")("socket.io-client:socket"),c=require("parseqs"),r=require("has-binary2");module.exports=exports=a;var h={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},p=e.prototype.emit;function a(t,e,i){this.io=t,this.nsp=e,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()}e(a.prototype),a.prototype.subEvents=function(){if(!this.subs){var t=this.io;this.subs=[s(t,"open",n(this,"onopen")),s(t,"packet",n(this,"onpacket")),s(t,"close",n(this,"onclose"))]}},a.prototype.open=a.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting"),this)},a.prototype.send=function(){var t=i(arguments);return t.unshift("message"),this.emit.apply(this,t),this},a.prototype.emit=function(e){if(h.hasOwnProperty(e))return p.apply(this,arguments),this;var s=i(arguments),n={type:(void 0!==this.flags.binary?this.flags.binary:r(s))?t.BINARY_EVENT:t.EVENT,data:s,options:{}};return n.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof s[s.length-1]&&(o("emitting packet with ack id %d",this.ids),this.acks[this.ids]=s.pop(),n.id=this.ids++),this.connected?this.packet(n):this.sendBuffer.push(n),this.flags={},this},a.prototype.packet=function(t){t.nsp=this.nsp,this.io.packet(t)},a.prototype.onopen=function(){if(o("transport is open - connecting"),"/"!==this.nsp)if(this.query){var e="object"==typeof this.query?c.encode(this.query):this.query;o("sending connect packet with query %s",e),this.packet({type:t.CONNECT,query:e})}else this.packet({type:t.CONNECT})},a.prototype.onclose=function(t){o("close (%s)",t),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",t)},a.prototype.onpacket=function(e){var i=e.nsp===this.nsp,s=e.type===t.ERROR&&"/"===e.nsp;if(i||s)switch(e.type){case t.CONNECT:this.onconnect();break;case t.EVENT:case t.BINARY_EVENT:this.onevent(e);break;case t.ACK:case t.BINARY_ACK:this.onack(e);break;case t.DISCONNECT:this.ondisconnect();break;case t.ERROR:this.emit("error",e.data)}},a.prototype.onevent=function(t){var e=t.data||[];o("emitting event %j",e),null!=t.id&&(o("attaching ack callback to event"),e.push(this.ack(t.id))),this.connected?p.apply(this,e):this.receiveBuffer.push(e)},a.prototype.ack=function(e){var s=this,n=!1;return function(){if(!n){n=!0;var c=i(arguments);o("sending ack %j",c),s.packet({type:r(c)?t.BINARY_ACK:t.ACK,id:e,data:c})}}},a.prototype.onack=function(t){var e=this.acks[t.id];"function"==typeof e?(o("calling ack %s with %j",t.id,t.data),e.apply(this,t.data),delete this.acks[t.id]):o("bad ack %s",t.id)},a.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},a.prototype.emitBuffered=function(){var t;for(t=0;t<this.receiveBuffer.length;t++)p.apply(this,this.receiveBuffer[t]);for(this.receiveBuffer=[],t=0;t<this.sendBuffer.length;t++)this.packet(this.sendBuffer[t]);this.sendBuffer=[]},a.prototype.ondisconnect=function(){o("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},a.prototype.destroy=function(){if(this.subs){for(var t=0;t<this.subs.length;t++)this.subs[t].destroy();this.subs=null}this.io.destroy(this)},a.prototype.close=a.prototype.disconnect=function(){return this.connected&&(o("performing disconnect (%s)",this.nsp),this.packet({type:t.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},a.prototype.compress=function(t){return this.flags.compress=t,this},a.prototype.binary=function(t){return this.flags.binary=t,this};
|
|
},{"socket.io-parser":"EDhw","component-emitter":"uiKr","to-array":"PFWQ","./on":"BM2E","component-bind":"NpfF","debug":"jcLW","parseqs":"vs2a","has-binary2":"E6Ed"}],"pAuI":[function(require,module,exports) {
|
|
function t(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}module.exports=t,t.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var i=Math.random(),o=Math.floor(i*this.jitter*t);t=0==(1&Math.floor(10*i))?t-o:t+o}return 0|Math.min(t,this.max)},t.prototype.reset=function(){this.attempts=0},t.prototype.setMin=function(t){this.ms=t},t.prototype.setMax=function(t){this.max=t},t.prototype.setJitter=function(t){this.jitter=t};
|
|
},{}],"Di21":[function(require,module,exports) {
|
|
var t=require("engine.io-client"),e=require("./socket"),n=require("component-emitter"),o=require("socket.io-parser"),i=require("./on"),s=require("component-bind"),c=require("debug")("socket.io-client:manager"),r=require("indexof"),h=require("backo2"),a=Object.prototype.hasOwnProperty;function p(t,e){if(!(this instanceof p))return new p(t,e);t&&"object"==typeof t&&(e=t,t=void 0),(e=e||{}).path=e.path||"/socket.io",this.nsps={},this.subs=[],this.opts=e,this.reconnection(!1!==e.reconnection),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(e.randomizationFactor||.5),this.backoff=new h({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this.readyState="closed",this.uri=t,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var n=e.parser||o;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this.autoConnect=!1!==e.autoConnect,this.autoConnect&&this.open()}module.exports=p,p.prototype.emitAll=function(){for(var t in this.emit.apply(this,arguments),this.nsps)a.call(this.nsps,t)&&this.nsps[t].emit.apply(this.nsps[t],arguments)},p.prototype.updateSocketIds=function(){for(var t in this.nsps)a.call(this.nsps,t)&&(this.nsps[t].id=this.generateId(t))},p.prototype.generateId=function(t){return("/"===t?"":t+"#")+this.engine.id},n(p.prototype),p.prototype.reconnection=function(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection},p.prototype.reconnectionAttempts=function(t){return arguments.length?(this._reconnectionAttempts=t,this):this._reconnectionAttempts},p.prototype.reconnectionDelay=function(t){return arguments.length?(this._reconnectionDelay=t,this.backoff&&this.backoff.setMin(t),this):this._reconnectionDelay},p.prototype.randomizationFactor=function(t){return arguments.length?(this._randomizationFactor=t,this.backoff&&this.backoff.setJitter(t),this):this._randomizationFactor},p.prototype.reconnectionDelayMax=function(t){return arguments.length?(this._reconnectionDelayMax=t,this.backoff&&this.backoff.setMax(t),this):this._reconnectionDelayMax},p.prototype.timeout=function(t){return arguments.length?(this._timeout=t,this):this._timeout},p.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},p.prototype.open=p.prototype.connect=function(e,n){if(c("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;c("opening %s",this.uri),this.engine=t(this.uri,this.opts);var o=this.engine,s=this;this.readyState="opening",this.skipReconnect=!1;var r=i(o,"open",function(){s.onopen(),e&&e()}),h=i(o,"error",function(t){if(c("connect_error"),s.cleanup(),s.readyState="closed",s.emitAll("connect_error",t),e){var n=new Error("Connection error");n.data=t,e(n)}else s.maybeReconnectOnOpen()});if(!1!==this._timeout){var a=this._timeout;c("connect attempt will timeout after %d",a);var p=setTimeout(function(){c("connect attempt timed out after %d",a),r.destroy(),o.close(),o.emit("error","timeout"),s.emitAll("connect_timeout",a)},a);this.subs.push({destroy:function(){clearTimeout(p)}})}return this.subs.push(r),this.subs.push(h),this},p.prototype.onopen=function(){c("open"),this.cleanup(),this.readyState="open",this.emit("open");var t=this.engine;this.subs.push(i(t,"data",s(this,"ondata"))),this.subs.push(i(t,"ping",s(this,"onping"))),this.subs.push(i(t,"pong",s(this,"onpong"))),this.subs.push(i(t,"error",s(this,"onerror"))),this.subs.push(i(t,"close",s(this,"onclose"))),this.subs.push(i(this.decoder,"decoded",s(this,"ondecoded")))},p.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},p.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},p.prototype.ondata=function(t){this.decoder.add(t)},p.prototype.ondecoded=function(t){this.emit("packet",t)},p.prototype.onerror=function(t){c("error",t),this.emitAll("error",t)},p.prototype.socket=function(t,n){var o=this.nsps[t];if(!o){o=new e(this,t,n),this.nsps[t]=o;var i=this;o.on("connecting",s),o.on("connect",function(){o.id=i.generateId(t)}),this.autoConnect&&s()}function s(){~r(i.connecting,o)||i.connecting.push(o)}return o},p.prototype.destroy=function(t){var e=r(this.connecting,t);~e&&this.connecting.splice(e,1),this.connecting.length||this.close()},p.prototype.packet=function(t){c("writing packet %j",t);var e=this;t.query&&0===t.type&&(t.nsp+="?"+t.query),e.encoding?e.packetBuffer.push(t):(e.encoding=!0,this.encoder.encode(t,function(n){for(var o=0;o<n.length;o++)e.engine.write(n[o],t.options);e.encoding=!1,e.processPacketQueue()}))},p.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var t=this.packetBuffer.shift();this.packet(t)}},p.prototype.cleanup=function(){c("cleanup");for(var t=this.subs.length,e=0;e<t;e++){this.subs.shift().destroy()}this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},p.prototype.close=p.prototype.disconnect=function(){c("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"===this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},p.prototype.onclose=function(t){c("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",t),this._reconnection&&!this.skipReconnect&&this.reconnect()},p.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var t=this;if(this.backoff.attempts>=this._reconnectionAttempts)c("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var e=this.backoff.duration();c("will wait %dms before reconnect attempt",e),this.reconnecting=!0;var n=setTimeout(function(){t.skipReconnect||(c("attempting reconnect"),t.emitAll("reconnect_attempt",t.backoff.attempts),t.emitAll("reconnecting",t.backoff.attempts),t.skipReconnect||t.open(function(e){e?(c("reconnect attempt error"),t.reconnecting=!1,t.reconnect(),t.emitAll("reconnect_error",e.data)):(c("reconnect success"),t.onreconnect())}))},e);this.subs.push({destroy:function(){clearTimeout(n)}})}},p.prototype.onreconnect=function(){var t=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",t)};
|
|
},{"engine.io-client":"h0uD","./socket":"wT76","component-emitter":"uiKr","socket.io-parser":"EDhw","./on":"BM2E","component-bind":"NpfF","debug":"jcLW","indexof":"rcym","backo2":"pAuI"}],"gT2G":[function(require,module,exports) {
|
|
var e=require("./url"),r=require("socket.io-parser"),o=require("./manager"),t=require("debug")("socket.io-client");module.exports=exports=n;var c=exports.managers={};function n(r,n){"object"==typeof r&&(n=r,r=void 0),n=n||{};var s,i=e(r),u=i.source,a=i.id,p=i.path,q=c[a]&&p in c[a].nsps;return n.forceNew||n["force new connection"]||!1===n.multiplex||q?(t("ignoring socket cache for %s",u),s=o(u,n)):(c[a]||(t("new io instance for %s",u),c[a]=o(u,n)),s=c[a]),i.query&&!n.query&&(n.query=i.query),s.socket(i.path,n)}exports.protocol=r.protocol,exports.connect=n,exports.Manager=require("./manager"),exports.Socket=require("./socket");
|
|
},{"./url":"ECAZ","socket.io-parser":"EDhw","./manager":"Di21","debug":"jcLW","./socket":"wT76"}],"Focm":[function(require,module,exports) {
|
|
window.addEventListener("load",function(){var t,e=document.querySelectorAll("div[data-dash-address-watch]"),n=[],a={};0!==e.length?(t=require("socket.io-client").connect("https://insight.dash.org:443/"),e.forEach(function(t){var e=t.getAttribute("data-dash-address-watch"),s=document.createElement("div");s.className="dash-address-watch-status",s.textContent="Loading...";var o=document.createElement("div");o.className="dash-address-watch-label",o.textContent=e;var c=document.createElement("div");c.className="dash-address-watch-log",t.appendChild(o),t.appendChild(s),t.appendChild(c),n.push(e),a[e]={container:t,label:o,status:s,log:c}}),t.on("connect",function(){Object.values(a).forEach(function(t){t.status.textContent="Watching..."}),t.emit("subscribe","inv")}),t.on("disconnect",function(){Object.values(a).forEach(function(t){t.status.textContent="Reconnecting..."})}),t.on("tx",function(t){n.forEach(function(e){var n=t.vout.reduce(function(t,n){return t+(Object.keys(n)[0]===e?Object.values(n)[0]:0)},0);if(n>0){var s=document.createElement("a");s.setAttribute("href","https://insight.dash.org/insight/tx/"+t.txid),s.textContent="Received "+n/1e8+" DASH",a[e].log.insertBefore(s,a[e].log.firstChild)}})})):console.log("No addresses to monitor.")});
|
|
},{"socket.io-client":"gT2G"}]},{},["Focm"], null)
|
|
//# sourceMappingURL=replacethiswithadot/index.js.map
|