diff --git a/README.md b/README.md index c5f75c6..6b613f2 100644 --- a/README.md +++ b/README.md @@ -43,11 +43,11 @@ socket.on('connect', function () { console.log('CONNECTED'); }); -// Listen to an event called 'rand' from the server -socket.on('rand', function (num) { - console.log('RANDOM: ' + num); +// Listen to an event called 'random' from the server +socket.on('random', function (data) { + console.log('RANDOM: ' + data.number); var curHTML = document.body.innerHTML; - curHTML += 'RANDOM: ' + num + '
'; + curHTML += 'RANDOM: ' + data.number + '
'; document.body.innerHTML = curHTML; }); ``` diff --git a/bower.json b/bower.json index 8b47244..875f343 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "socketcluster-client", "main": "socketcluster.js", - "version": "14.2.1", + "version": "14.2.2", "homepage": "https://github.com/SocketCluster/socketcluster-client", "description": "SocketCluster JavaScript client", "authors": [ diff --git a/index.js b/index.js index e41558c..2e4d839 100644 --- a/index.js +++ b/index.js @@ -18,4 +18,4 @@ module.exports.destroy = function (socket) { module.exports.clients = factory.clients; -module.exports.version = '14.2.1'; +module.exports.version = '14.2.2'; diff --git a/lib/scclientsocket.js b/lib/scclientsocket.js index c2ccdc2..02d56ee 100644 --- a/lib/scclientsocket.js +++ b/lib/scclientsocket.js @@ -6,7 +6,7 @@ var formatter = require('sc-formatter'); var SCTransport = require('./sctransport').SCTransport; var querystring = require('querystring'); var LinkedList = require('linked-list'); -var base64 = require('base-64'); +var Buffer = require('buffer/').Buffer; var clone = require('clone'); var scErrors = require('sc-errors'); @@ -380,33 +380,11 @@ SCClientSocket.prototype._changeToAuthenticatedState = function (signedAuthToken }; SCClientSocket.prototype.decodeBase64 = function (encodedString) { - var decodedString; - if (typeof Buffer === 'undefined') { - if (global.atob) { - decodedString = global.atob(encodedString); - } else { - decodedString = base64.decode(encodedString); - } - } else { - var buffer = Buffer.from(encodedString, 'base64'); - decodedString = buffer.toString('utf8'); - } - return decodedString; + return Buffer.from(encodedString, 'base64').toString('utf8'); }; SCClientSocket.prototype.encodeBase64 = function (decodedString) { - var encodedString; - if (typeof Buffer === 'undefined') { - if (global.btoa) { - encodedString = global.btoa(decodedString); - } else { - encodedString = base64.encode(decodedString); - } - } else { - var buffer = Buffer.from(decodedString, 'utf8'); - encodedString = buffer.toString('base64'); - } - return encodedString; + return Buffer.from(decodedString, 'utf8').toString('base64'); }; SCClientSocket.prototype._extractAuthTokenData = function (signedAuthToken) { diff --git a/package-lock.json b/package-lock.json index c9cead6..6433545 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,13 +1,13 @@ { "name": "socketcluster-client", - "version": "14.2.1", + "version": "14.2.2", "lockfileVersion": 1, "requires": true, "dependencies": { "JSONStream": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.4.tgz", - "integrity": "sha512-Y7vfi3I5oMOYIr+WxV8NZxDSwcbNgzdKYsTNInmycOq9bUYwGg9ryu57Wg5NLmCjqdFPNUmpMBo3kSJN9tCbXg==", + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", "dev": true, "requires": { "jsonparse": "1.3.1", @@ -15,34 +15,38 @@ } }, "acorn": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", - "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", + "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", "dev": true }, "acorn-dynamic-import": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz", - "integrity": "sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg==", - "dev": true, - "requires": { - "acorn": "5.7.3" - } + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz", + "integrity": "sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==", + "dev": true }, "acorn-node": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.5.2.tgz", - "integrity": "sha512-krFKvw/d1F17AN3XZbybIUzEY4YEPNiGo05AfP3dBlfVKrMHETKpgjpuZkSF8qDNt9UkQcqj7am8yJLseklCMg==", + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.6.2.tgz", + "integrity": "sha512-rIhNEZuNI8ibQcL7ANm/mGyPukIaZsRNX9psFNQURyJW0nu6k8wjSDld20z6v2mDBWqX13pIEnk9gGZJHIlEXg==", "dev": true, "requires": { - "acorn": "5.7.3", - "acorn-dynamic-import": "3.0.0", + "acorn": "6.1.1", + "acorn-dynamic-import": "4.0.0", + "acorn-walk": "6.1.1", "xtend": "4.0.1" } }, + "acorn-walk": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-6.1.1.tgz", + "integrity": "sha512-OtUw6JUTgxA2QoqqmrmQ7F2NYqiBPi/L2jqHyFtllhOUvXYQXf0Z1CYUinIfyT4bTCGmrA7gX9FvHA81uzCoVw==", + "dev": true + }, "ansi-colors": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==", "dev": true, "requires": { @@ -459,7 +463,7 @@ "requires": { "babel-core": "6.26.3", "babel-runtime": "6.26.0", - "core-js": "2.5.7", + "core-js": "2.6.5", "home-or-tmp": "2.0.0", "lodash": "4.17.11", "mkdirp": "0.5.1", @@ -472,7 +476,7 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.7", + "core-js": "2.6.5", "regenerator-runtime": "0.11.1" } }, @@ -602,16 +606,10 @@ } } }, - "base-64": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/base-64/-/base-64-0.1.0.tgz", - "integrity": "sha1-eAqZyE59YAJgNhURxId2E78k9rs=" - }, "base64-js": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", - "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", - "dev": true + "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==" }, "base64id": { "version": "1.0.0", @@ -626,9 +624,9 @@ "dev": true }, "binary-extensions": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.12.0.tgz", - "integrity": "sha512-DYWGk01lDcxeS/K9IHPGWfT8PsJmbXRtRd2Sx72Tnb8pcYZQFF1oSDb8hJtS1vhp212q1Rzi5dUf9+nq0o9UIg==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.0.tgz", + "integrity": "sha512-EgmjVLMn22z7eGGv3kcnHwSnJXmFHjISTY9E/S5lIcTD3Oxw05QTcBLNkJFzcb3cNueUdF/IN4U+d78V0zO8Hw==", "dev": true }, "bn.js": { @@ -688,11 +686,11 @@ "integrity": "sha512-erYug8XoqzU3IfcU8fUgyHqyOXqIE4tUTTQ+7mqUjQlvnXkOO6OlT9c/ZoJVHYoAaqGxr09CN53G7XIsO4KtWA==", "dev": true, "requires": { - "JSONStream": "1.3.4", + "JSONStream": "1.3.5", "combine-source-map": "0.8.0", "defined": "1.0.0", "safe-buffer": "5.1.2", - "through2": "2.0.3", + "through2": "2.0.5", "umd": "3.0.3" } }, @@ -720,18 +718,18 @@ "dev": true }, "browserify": { - "version": "16.2.2", - "resolved": "https://registry.npmjs.org/browserify/-/browserify-16.2.2.tgz", - "integrity": "sha512-fMES05wq1Oukts6ksGUU2TMVHHp06LyQt0SIwbXIHm7waSrQmNBZePsU0iM/4f94zbvb/wHma+D1YrdzWYnF/A==", + "version": "16.2.3", + "resolved": "https://registry.npmjs.org/browserify/-/browserify-16.2.3.tgz", + "integrity": "sha512-zQt/Gd1+W+IY+h/xX2NYMW4orQWhqSwyV+xsblycTtpOuB27h1fZhhNQuipJ4t79ohw4P4mMem0jp/ZkISQtjQ==", "dev": true, "requires": { - "JSONStream": "1.3.4", + "JSONStream": "1.3.5", "assert": "1.4.1", "browser-pack": "6.1.0", "browser-resolve": "1.11.3", "browserify-zlib": "0.2.0", "buffer": "5.2.1", - "cached-path-relative": "1.0.1", + "cached-path-relative": "1.0.2", "concat-stream": "1.6.2", "console-browserify": "1.1.0", "constants-browserify": "1.0.0", @@ -749,7 +747,7 @@ "insert-module-globals": "7.2.0", "labeled-stream-splicer": "2.0.1", "mkdirp": "0.5.1", - "module-deps": "6.1.0", + "module-deps": "6.2.0", "os-browserify": "0.3.0", "parents": "1.0.1", "path-browserify": "0.0.1", @@ -758,15 +756,15 @@ "querystring-es3": "0.2.1", "read-only-stream": "2.0.0", "readable-stream": "2.3.6", - "resolve": "1.8.1", + "resolve": "1.10.0", "shasum": "1.0.2", "shell-quote": "1.6.1", - "stream-browserify": "2.0.1", + "stream-browserify": "2.0.2", "stream-http": "2.8.3", - "string_decoder": "1.1.1", + "string_decoder": "1.2.0", "subarg": "1.0.0", "syntax-error": "1.4.0", - "through2": "2.0.3", + "through2": "2.0.5", "timers-browserify": "1.4.2", "tty-browserify": "0.0.1", "url": "0.11.0", @@ -777,7 +775,7 @@ }, "browserify-aes": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", "dev": true, "requires": { @@ -814,12 +812,12 @@ }, "browserify-rsa": { "version": "4.0.1", - "resolved": "http://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", "dev": true, "requires": { "bn.js": "4.11.8", - "randombytes": "2.0.6" + "randombytes": "2.1.0" } }, "browserify-sign": { @@ -834,7 +832,7 @@ "create-hmac": "1.1.7", "elliptic": "6.4.1", "inherits": "2.0.3", - "parse-asn1": "5.1.1" + "parse-asn1": "5.1.4" } }, "browserify-zlib": { @@ -843,14 +841,13 @@ "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", "dev": true, "requires": { - "pako": "1.0.6" + "pako": "1.0.10" } }, "buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz", "integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==", - "dev": true, "requires": { "base64-js": "1.3.0", "ieee754": "1.1.12" @@ -889,12 +886,6 @@ "readable-stream": "2.3.6" } }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true - }, "builtin-status-codes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", @@ -919,9 +910,9 @@ } }, "cached-path-relative": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.1.tgz", - "integrity": "sha1-0JxLUoAKpMB44t2BqGmqyQ0uVOc=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.2.tgz", + "integrity": "sha512-5r2GqsoEb4qMTTN9J+WzXfjov+hjxT+j3u5K+kIVNIwAd99DLCJE9pBIMP1qVeybV6JiijL385Oz0DcYxfbOIg==", "dev": true }, "camelcase": { @@ -932,7 +923,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -944,23 +935,31 @@ } }, "chokidar": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.4.tgz", - "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.2.tgz", + "integrity": "sha512-IwXUx0FXc5ibYmPC2XeEj5mpXoV66sR+t3jqu2NS2GYwCktt3KF1/Qqjws/NkegajBA4RbZ5+DDwlOiJsxDHEg==", "dev": true, "requires": { "anymatch": "2.0.0", "async-each": "1.0.1", "braces": "2.3.2", + "fsevents": "1.2.7", "glob-parent": "3.1.0", "inherits": "2.0.3", "is-binary-path": "1.0.1", "is-glob": "4.0.0", - "lodash.debounce": "4.0.8", - "normalize-path": "2.1.1", + "normalize-path": "3.0.0", "path-is-absolute": "1.0.1", "readdirp": "2.2.1", "upath": "1.1.0" + }, + "dependencies": { + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + } } }, "cipher-base": { @@ -1135,7 +1134,7 @@ }, "convert-source-map": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", "integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=", "dev": true }, @@ -1156,9 +1155,9 @@ } }, "core-js": { - "version": "2.5.7", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", - "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", + "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", "dev": true }, "core-util-is": { @@ -1179,20 +1178,20 @@ }, "create-hash": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", "dev": true, "requires": { "cipher-base": "1.0.4", "inherits": "2.0.3", - "md5.js": "1.3.4", + "md5.js": "1.3.5", "ripemd160": "2.0.2", "sha.js": "2.4.11" } }, "create-hmac": { "version": "1.1.7", - "resolved": "http://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", "dev": true, "requires": { @@ -1217,9 +1216,9 @@ "create-hmac": "1.1.7", "diffie-hellman": "5.0.3", "inherits": "2.0.3", - "pbkdf2": "3.0.16", - "public-encrypt": "4.0.2", - "randombytes": "2.0.6", + "pbkdf2": "3.0.17", + "public-encrypt": "4.0.3", + "randombytes": "2.1.0", "randomfill": "1.0.4" } }, @@ -1229,9 +1228,15 @@ "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", "dev": true, "requires": { - "es5-ext": "0.10.46" + "es5-ext": "0.10.48" } }, + "dash-ast": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/dash-ast/-/dash-ast-1.0.0.tgz", + "integrity": "sha512-Vy4dx7gquTeMcQR/hDkYLGUnwVil6vk4FOOct+djUnHOUWt+zJPJAaRIXaAFkPXtJjvlY7o3rfRu0/3hpnwoUA==", + "dev": true + }, "date-now": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", @@ -1294,7 +1299,7 @@ "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", "dev": true, "requires": { - "object-keys": "1.0.12" + "object-keys": "1.1.0" } }, "define-property": { @@ -1350,10 +1355,10 @@ "integrity": "sha1-CRckkC6EZYJg65EHSMzNGvbiH7U=", "dev": true, "requires": { - "JSONStream": "1.3.4", + "JSONStream": "1.3.5", "shasum": "1.0.2", "subarg": "1.0.0", - "through2": "2.0.3" + "through2": "2.0.5" } }, "derequire": { @@ -1365,7 +1370,7 @@ "acorn": "4.0.13", "concat-stream": "1.6.2", "escope": "3.6.0", - "through2": "2.0.3", + "through2": "2.0.5", "yargs": "6.6.0" }, "dependencies": { @@ -1377,7 +1382,7 @@ }, "yargs": { "version": "6.6.0", - "resolved": "http://registry.npmjs.org/yargs/-/yargs-6.6.0.tgz", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-6.6.0.tgz", "integrity": "sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg=", "dev": true, "requires": { @@ -1433,12 +1438,12 @@ } }, "detective": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/detective/-/detective-5.1.0.tgz", - "integrity": "sha512-TFHMqfOvxlgrfVzTEkNBSh9SvSNX/HfF4OFI2QFGCyPm02EsyILqnUeb5P6q7JZ3SFNTBL5t2sePRgrN4epUWQ==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/detective/-/detective-5.2.0.tgz", + "integrity": "sha512-6SsIx+nUUbuK0EthKjv0zrdnajCCXVYGmbYYiYjFVpzcjwEs/JMDZ8tPRG29J/HhN56t3GJp2cGSWDRjjot8Pg==", "dev": true, "requires": { - "acorn-node": "1.5.2", + "acorn-node": "1.6.2", "defined": "1.0.0", "minimist": "1.2.0" } @@ -1451,13 +1456,13 @@ }, "diffie-hellman": { "version": "5.0.3", - "resolved": "http://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", "dev": true, "requires": { "bn.js": "4.11.8", "miller-rabin": "4.0.1", - "randombytes": "2.0.6" + "randombytes": "2.1.0" } }, "domain-browser": { @@ -1476,9 +1481,9 @@ } }, "duplexify": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.0.tgz", - "integrity": "sha512-fO3Di4tBKJpYTFHAxTU00BcfWMY9w24r/x21a6rZRbsD/ToUgGxsMbiGRmB7uVAXeGKXD9MwiLZa5E97EVgIRQ==", + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", + "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", "dev": true, "requires": { "end-of-stream": "1.4.1", @@ -1498,9 +1503,9 @@ } }, "ecdsa-sig-formatter": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.10.tgz", - "integrity": "sha1-HFlQAPBKiJffuFAAiSoPTDOvhsM=", + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", "dev": true, "requires": { "safe-buffer": "5.1.2" @@ -1514,7 +1519,7 @@ "requires": { "bn.js": "4.11.8", "brorand": "1.1.0", - "hash.js": "1.1.5", + "hash.js": "1.1.7", "hmac-drbg": "1.0.1", "inherits": "2.0.3", "minimalistic-assert": "1.0.1", @@ -1540,9 +1545,9 @@ } }, "es5-ext": { - "version": "0.10.46", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.46.tgz", - "integrity": "sha512-24XxRvJXNFwEMpJb3nOkiRJKRoupmjYmOPVlI65Qy2SrtxwOTB+g6ODjBKOtwEHbYrhWRty9xxOWLNdClT2djw==", + "version": "0.10.48", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.48.tgz", + "integrity": "sha512-CdRvPlX/24Mj5L4NVxTs4804sxiS2CjVprgCmrgoDkdmjdY4D+ySHa7K3jJf8R40dFg0tIm3z/dk326LrnuSGw==", "dev": true, "requires": { "es6-iterator": "2.0.3", @@ -1557,7 +1562,7 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.46", + "es5-ext": "0.10.48", "es6-symbol": "3.1.1" } }, @@ -1568,7 +1573,7 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.46", + "es5-ext": "0.10.48", "es6-iterator": "2.0.3", "es6-set": "0.1.5", "es6-symbol": "3.1.1", @@ -1582,7 +1587,7 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.46", + "es5-ext": "0.10.48", "es6-iterator": "2.0.3", "es6-symbol": "3.1.1", "event-emitter": "0.3.5" @@ -1595,7 +1600,7 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.46" + "es5-ext": "0.10.48" } }, "es6-weak-map": { @@ -1605,7 +1610,7 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.46", + "es5-ext": "0.10.48", "es6-iterator": "2.0.3", "es6-symbol": "3.1.1" } @@ -1656,7 +1661,7 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.46" + "es5-ext": "0.10.48" } }, "events": { @@ -1671,7 +1676,7 @@ "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", "dev": true, "requires": { - "md5.js": "1.3.4", + "md5.js": "1.3.5", "safe-buffer": "5.1.2" } }, @@ -1716,7 +1721,7 @@ "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", "dev": true, "requires": { - "homedir-polyfill": "1.0.1" + "homedir-polyfill": "1.0.3" } }, "extend": { @@ -1812,13 +1817,14 @@ } }, "fancy-log": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.2.tgz", - "integrity": "sha1-9BEl49hPLn2JpD0G2VjI94vha+E=", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.3.tgz", + "integrity": "sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw==", "dev": true, "requires": { "ansi-gray": "0.1.1", "color-support": "1.1.3", + "parse-node-version": "1.0.1", "time-stamp": "1.1.0" } }, @@ -1879,9 +1885,9 @@ } }, "fined": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fined/-/fined-1.1.0.tgz", - "integrity": "sha1-s33IRLdqL15wgeiE98CuNE8VNHY=", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/fined/-/fined-1.1.1.tgz", + "integrity": "sha512-jQp949ZmEbiYHk3gkbdtpJ0G1+kgtLQBNdP5edFP7Fh+WAYceLQz6yO1SBj72Xkg8GVyTB3bBzAYrHJVh5Xd5g==", "dev": true, "requires": { "expand-tilde": "2.0.2", @@ -1892,15 +1898,15 @@ } }, "flagged-respawn": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.0.tgz", - "integrity": "sha1-Tnmumy6zi/hrO7Vr8+ClaqX8q9c=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", + "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", "dev": true }, "flush-write-stream": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.3.tgz", - "integrity": "sha512-calZMC10u0FMUqoiunI2AiGIIUtUIvifNwkHhNupZH4cbNnW1Itkoh/Nf5HFYmDrwWPjrUxpkZT0KhuCq0jmGw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", + "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", "dev": true, "requires": { "inherits": "2.0.3", @@ -1937,8 +1943,8 @@ "integrity": "sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "through2": "2.0.3" + "graceful-fs": "4.1.15", + "through2": "2.0.5" } }, "fs.realpath": { @@ -1947,6 +1953,535 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, + "fsevents": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.7.tgz", + "integrity": "sha512-Pxm6sI2MeBD7RdD12RYsqaP0nMiwx8eZBXCa6z2L+mRHm2DYrOYwihmhjpkdjUHwQhslWQjRpEgNq4XvBmaAuw==", + "dev": true, + "optional": true, + "requires": { + "nan": "2.12.1", + "node-pre-gyp": "0.10.3" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "1.0.0", + "readable-stream": "2.3.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "2.3.5" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "1.2.0", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.3" + } + }, + "glob": { + "version": "7.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.24", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safer-buffer": "2.1.2" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimatch": "3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "1.1.11" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + }, + "minipass": { + "version": "2.3.5", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "5.1.2", + "yallist": "3.0.3" + } + }, + "minizlib": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "2.3.5" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "needle": { + "version": "2.2.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "2.6.9", + "iconv-lite": "0.4.24", + "sax": "1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.10.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "detect-libc": "1.0.3", + "mkdirp": "0.5.1", + "needle": "2.2.4", + "nopt": "4.0.1", + "npm-packlist": "1.2.0", + "npmlog": "4.1.2", + "rc": "1.2.8", + "rimraf": "2.6.3", + "semver": "5.6.0", + "tar": "4.4.8" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1.1.1", + "osenv": "0.1.5" + } + }, + "npm-bundled": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "optional": true + }, + "npm-packlist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ignore-walk": "3.0.1", + "npm-bundled": "1.0.5" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "1.1.5", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "0.6.0", + "ini": "1.3.5", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.2", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" + } + }, + "rimraf": { + "version": "2.6.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "glob": "7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "bundled": true, + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "dev": true, + "optional": true + }, + "semver": { + "version": "5.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "5.1.2" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "4.4.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "chownr": "1.1.1", + "fs-minipass": "1.2.5", + "minipass": "2.3.5", + "minizlib": "1.2.1", + "mkdirp": "0.5.1", + "safe-buffer": "5.1.2", + "yallist": "3.0.3" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "yallist": { + "version": "3.0.3", + "bundled": true, + "dev": true + } + } + }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -2021,17 +2556,19 @@ "readable-stream": "2.3.6", "remove-trailing-separator": "1.1.0", "to-absolute-glob": "2.0.2", - "unique-stream": "2.2.1" + "unique-stream": "2.3.1" } }, "glob-watcher": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-5.0.1.tgz", - "integrity": "sha512-fK92r2COMC199WCyGUblrZKhjra3cyVMDiypDdqg1vsSDmexnbYivK1kNR4QItiNXLKmGlqan469ks67RtNa2g==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-5.0.3.tgz", + "integrity": "sha512-8tWsULNEPHKQ2MR4zXuzSmqbdyV5PtwwCaWSGQ1WwHsJ07ilNeN1JB8ntxhckbnpSHaf9dXFUHzIWvm1I13dsg==", "dev": true, "requires": { + "anymatch": "2.0.0", "async-done": "1.3.1", - "chokidar": "2.0.4", + "chokidar": "2.1.2", + "is-negated-glob": "1.0.0", "just-debounce": "1.0.0", "object.defaults": "1.1.0" } @@ -2054,7 +2591,7 @@ "dev": true, "requires": { "expand-tilde": "2.0.2", - "homedir-polyfill": "1.0.1", + "homedir-polyfill": "1.0.3", "ini": "1.3.5", "is-windows": "1.0.2", "which": "1.3.1" @@ -2067,18 +2604,18 @@ "dev": true }, "glogg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.1.tgz", - "integrity": "sha512-ynYqXLoluBKf9XGR1gA59yEJisIL7YHEH4xr3ZziHB5/yl4qWfaK8Js9jGe6gBGCSCKVqiyO30WnRZADvemUNw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.2.tgz", + "integrity": "sha512-5mwUoSuBk44Y4EshyiqcH95ZntbDdTQqA3QYSrxmzj28Ai0vXBGMH1ApSANH14j2sIRtqCEyg6PfsuP7ElOEDA==", "dev": true, "requires": { "sparkles": "1.0.1" } }, "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", "dev": true }, "growl": { @@ -2093,7 +2630,7 @@ "integrity": "sha1-lXZsYB2t5Kd+0+eyttwDiBtZY2Y=", "dev": true, "requires": { - "glob-watcher": "5.0.1", + "glob-watcher": "5.0.3", "gulp-cli": "2.0.1", "undertaker": "1.2.0", "vinyl-fs": "3.0.3" @@ -2109,7 +2646,7 @@ "object-assign": "4.1.1", "plugin-error": "1.0.1", "replace-ext": "0.0.1", - "through2": "2.0.3", + "through2": "2.0.5", "vinyl-sourcemaps-apply": "0.2.1" }, "dependencies": { @@ -2133,9 +2670,9 @@ "color-support": "1.1.3", "concat-stream": "1.6.2", "copy-props": "2.0.4", - "fancy-log": "1.3.2", + "fancy-log": "1.3.3", "gulplog": "1.0.0", - "interpret": "1.1.0", + "interpret": "1.2.0", "isobject": "3.0.1", "liftoff": "2.5.0", "matchdep": "2.0.0", @@ -2143,7 +2680,7 @@ "pretty-hrtime": "1.0.3", "replace-homedir": "1.0.0", "semver-greatest-satisfied-range": "1.1.0", - "v8flags": "3.1.1", + "v8flags": "3.1.2", "yargs": "7.1.0" } }, @@ -2167,7 +2704,7 @@ }, "readable-stream": { "version": "1.0.34", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", "dev": true, "requires": { @@ -2215,7 +2752,7 @@ }, "readable-stream": { "version": "1.1.14", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "dev": true, "requires": { @@ -2261,7 +2798,7 @@ }, "readable-stream": { "version": "1.1.14", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "dev": true, "requires": { @@ -2286,17 +2823,19 @@ "dev": true }, "gulp-uglify": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/gulp-uglify/-/gulp-uglify-3.0.1.tgz", - "integrity": "sha512-KVffbGY9d4Wv90bW/B1KZJyunLMyfHTBbilpDvmcrj5Go0/a1G3uVpt+1gRBWSw/11dqR3coJ1oWNTt1AiXuWQ==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/gulp-uglify/-/gulp-uglify-3.0.2.tgz", + "integrity": "sha512-gk1dhB74AkV2kzqPMQBLA3jPoIAPd/nlNzP2XMDSG8XZrqnlCiDGAqC+rZOumzFvB5zOphlFh6yr3lgcAb/OOg==", "dev": true, "requires": { + "array-each": "1.0.1", + "extend-shallow": "3.0.2", "gulplog": "1.0.0", "has-gulplog": "0.1.0", - "lodash": "4.17.11", + "isobject": "3.0.1", "make-error-cause": "1.2.2", "safe-buffer": "5.1.2", - "through2": "2.0.3", + "through2": "2.0.5", "uglify-js": "3.4.9", "vinyl-sourcemaps-apply": "0.2.1" } @@ -2312,7 +2851,7 @@ "beeper": "1.1.1", "chalk": "1.1.3", "dateformat": "2.2.0", - "fancy-log": "1.3.2", + "fancy-log": "1.3.3", "gulplog": "1.0.0", "has-gulplog": "0.1.0", "lodash._reescape": "3.0.0", @@ -2323,7 +2862,7 @@ "multipipe": "0.1.2", "object-assign": "3.0.0", "replace-ext": "0.0.1", - "through2": "2.0.3", + "through2": "2.0.5", "vinyl": "0.5.3" }, "dependencies": { @@ -2370,7 +2909,7 @@ "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", "dev": true, "requires": { - "glogg": "1.0.1" + "glogg": "1.0.2" } }, "has": { @@ -2455,9 +2994,9 @@ } }, "hash.js": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.5.tgz", - "integrity": "sha512-eWI5HG9Np+eHV1KQhisXWwM+4EPPYe5dFX1UZZH7k/E3JzDEazVH+VGlZi6R94ZqImq+A3D1mCEtrFIfg/E7sA==", + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", "dev": true, "requires": { "inherits": "2.0.3", @@ -2476,7 +3015,7 @@ "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", "dev": true, "requires": { - "hash.js": "1.1.5", + "hash.js": "1.1.7", "minimalistic-assert": "1.0.1", "minimalistic-crypto-utils": "1.0.1" } @@ -2492,9 +3031,9 @@ } }, "homedir-polyfill": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", - "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", "dev": true, "requires": { "parse-passwd": "1.0.0" @@ -2530,8 +3069,7 @@ "ieee754": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", - "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==", - "dev": true + "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==" }, "inflight": { "version": "1.0.6", @@ -2570,22 +3108,22 @@ "integrity": "sha512-VE6NlW+WGn2/AeOMd496AHFYmE7eLKkUY6Ty31k4og5vmA3Fjuwe9v6ifH6Xx/Hz27QvdoMoviw1/pqWRB09Sw==", "dev": true, "requires": { - "JSONStream": "1.3.4", - "acorn-node": "1.5.2", + "JSONStream": "1.3.5", + "acorn-node": "1.6.2", "combine-source-map": "0.8.0", "concat-stream": "1.6.2", "is-buffer": "1.1.6", "path-is-absolute": "1.0.1", "process": "0.11.10", - "through2": "2.0.3", - "undeclared-identifiers": "1.1.2", + "through2": "2.0.5", + "undeclared-identifiers": "1.1.3", "xtend": "4.0.1" } }, "interpret": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", - "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", + "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", "dev": true }, "invariant": { @@ -2645,7 +3183,7 @@ "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", "dev": true, "requires": { - "binary-extensions": "1.12.0" + "binary-extensions": "1.13.0" } }, "is-buffer": { @@ -2654,15 +3192,6 @@ "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", "dev": true }, - "is-builtin-module": { - "version": "1.0.0", - "resolved": "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "dev": true, - "requires": { - "builtin-modules": "1.1.1" - } - }, "is-data-descriptor": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", @@ -2851,6 +3380,12 @@ "jsonify": "0.0.0" } }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, "json5": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", @@ -2870,12 +3405,12 @@ "dev": true }, "jsonwebtoken": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.3.0.tgz", - "integrity": "sha512-oge/hvlmeJCH+iIz1DwcO7vKPkNGJHhgkspk8OH3VKlw+mbi42WtD4ig1+VXRln765vxptAv+xT26Fd3cteqag==", + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.0.tgz", + "integrity": "sha512-IqEycp0znWHNA11TpYi77bVgyBO/pGESDh7Ajhas+u0ttkGkKYIIAjniL4Bw5+oVejVF+SYkaI7XKfwCCyeTuA==", "dev": true, "requires": { - "jws": "3.1.5", + "jws": "3.2.1", "lodash.includes": "4.3.0", "lodash.isboolean": "3.0.3", "lodash.isinteger": "4.0.4", @@ -2883,7 +3418,8 @@ "lodash.isplainobject": "4.0.6", "lodash.isstring": "4.0.1", "lodash.once": "4.1.1", - "ms": "2.1.1" + "ms": "2.1.1", + "semver": "5.6.0" }, "dependencies": { "ms": { @@ -2901,23 +3437,23 @@ "dev": true }, "jwa": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.6.tgz", - "integrity": "sha512-tBO/cf++BUsJkYql/kBbJroKOgHWEigTKBAjjBEmrMGYd1QMBC74Hr4Wo2zCZw6ZrVhlJPvoMrkcOnlWR/DJfw==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.0.tgz", + "integrity": "sha512-mt6IHaq0ZZWDBspg0Pheu3r9sVNMEZn+GJe1zcdYyhFcDSclp3J8xEdO4PjZolZ2i8xlaVU1LetHM0nJejYsEw==", "dev": true, "requires": { "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.10", + "ecdsa-sig-formatter": "1.0.11", "safe-buffer": "5.1.2" } }, "jws": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/jws/-/jws-3.1.5.tgz", - "integrity": "sha512-GsCSexFADNQUr8T5HPJvayTjvPIfoyJPtLQBwn5a4WZQchcrPMPMAWcC1AzJVRDKyD6ZPROPAxgv6rfHViO4uQ==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.1.tgz", + "integrity": "sha512-bGA2omSrFUkd72dhh05bIAN832znP4wOU3lfuXtRBuGTbsmNmDXMQg28f0Vsxaxgk4myF5YkKQpz6qeRpMgX9g==", "dev": true, "requires": { - "jwa": "1.1.6", + "jwa": "1.4.0", "safe-buffer": "5.1.2" } }, @@ -2980,7 +3516,7 @@ "integrity": "sha1-bxT5mje+Op3XhPVJVpDlkDRm7kI=", "dev": true, "requires": { - "flush-write-stream": "1.0.3" + "flush-write-stream": "1.1.1" } }, "liftoff": { @@ -2991,12 +3527,12 @@ "requires": { "extend": "3.0.2", "findup-sync": "2.0.0", - "fined": "1.1.0", - "flagged-respawn": "1.0.0", + "fined": "1.1.1", + "flagged-respawn": "1.0.1", "is-plain-object": "2.0.4", "object.map": "1.0.1", "rechoir": "0.6.2", - "resolve": "1.8.1" + "resolve": "1.10.0" } }, "linked-list": { @@ -3006,11 +3542,11 @@ }, "load-json-file": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { - "graceful-fs": "4.1.11", + "graceful-fs": "4.1.15", "parse-json": "2.2.0", "pify": "2.3.0", "pinkie-promise": "2.0.1", @@ -3018,9 +3554,9 @@ } }, "localStorage": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/localStorage/-/localStorage-1.0.3.tgz", - "integrity": "sha1-5riaV7t2ChVqOMyH4PJVD27UE9g=", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/localStorage/-/localStorage-1.0.4.tgz", + "integrity": "sha512-r35zrihcDiX+dqWlJSeIwS9nrF95OQTgqMFm3FB2D/+XgdmZtcutZOb7t0xXkhOEM8a9kpuu7cc28g1g36I5DQ==", "dev": true }, "lodash": { @@ -3089,12 +3625,6 @@ "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", "dev": true }, - "lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", - "dev": true - }, "lodash.escape": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", @@ -3270,18 +3800,19 @@ "requires": { "findup-sync": "2.0.0", "micromatch": "3.1.10", - "resolve": "1.8.1", + "resolve": "1.10.0", "stack-trace": "0.0.10" } }, "md5.js": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", - "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", "dev": true, "requires": { "hash-base": "3.0.4", - "inherits": "2.0.3" + "inherits": "2.0.3", + "safe-buffer": "5.1.2" } }, "micromatch": { @@ -3338,7 +3869,7 @@ }, "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, @@ -3365,7 +3896,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { @@ -3374,7 +3905,7 @@ "dependencies": { "minimist": { "version": "0.0.8", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true } @@ -3401,7 +3932,7 @@ "dependencies": { "commander": { "version": "2.15.1", - "resolved": "http://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", "dev": true }, @@ -3440,25 +3971,25 @@ } }, "module-deps": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-6.1.0.tgz", - "integrity": "sha512-NPs5N511VD1rrVJihSso/LiBShRbJALYBKzDW91uZYy7BpjnO4bGnZL3HjZ9yKcFdZUWwaYjDz9zxbuP7vKMuQ==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-6.2.0.tgz", + "integrity": "sha512-hKPmO06so6bL/ZvqVNVqdTVO8UAYsi3tQWlCa+z9KuWhoN4KDQtb5hcqQQv58qYiDE21wIvnttZEPiDgEbpwbA==", "dev": true, "requires": { - "JSONStream": "1.3.4", + "JSONStream": "1.3.5", "browser-resolve": "1.11.3", - "cached-path-relative": "1.0.1", + "cached-path-relative": "1.0.2", "concat-stream": "1.6.2", "defined": "1.0.0", - "detective": "5.1.0", + "detective": "5.2.0", "duplexer2": "0.1.4", "inherits": "2.0.3", "parents": "1.0.1", "readable-stream": "2.3.6", - "resolve": "1.8.1", + "resolve": "1.10.0", "stream-combiner2": "1.1.1", "subarg": "1.0.0", - "through2": "2.0.3", + "through2": "2.0.5", "xtend": "4.0.1" } }, @@ -3494,7 +4025,7 @@ }, "readable-stream": { "version": "1.1.14", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "dev": true, "requires": { @@ -3518,6 +4049,13 @@ "integrity": "sha512-kDcwXR4PS7caBpuRYYBUz9iVixUk3anO3f5OYFiIPwK/20vCzKCHyKoulbiDY1S53zD2bxUpxN/IJ+TnXjfvxg==", "dev": true }, + "nan": { + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.12.1.tgz", + "integrity": "sha512-JY7V6lRkStKcKTvHO5NVSQRv+RV+FIL5pvDoLiAtSL9pKlC5x9PKQcZDsq7m4FO4d57mkhC6Z+QhAh3Jdk5JFw==", + "dev": true, + "optional": true + }, "nanomatch": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", @@ -3544,14 +4082,14 @@ "dev": true }, "normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", "dev": true, "requires": { "hosted-git-info": "2.7.1", - "is-builtin-module": "1.0.0", - "semver": "5.5.1", + "resolve": "1.10.0", + "semver": "5.6.0", "validate-npm-package-license": "3.0.4" } }, @@ -3617,9 +4155,9 @@ } }, "object-keys": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", - "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.0.tgz", + "integrity": "sha512-6OO5X1+2tYkNyNEx6TsCxEqFfRWaqx6EtMiSbGrw8Ob8v9Ne+Hl8rBAgLBZn5wjEz3s/s6U1WXFUFOcxxAwUpg==", "dev": true }, "object-visit": { @@ -3640,7 +4178,7 @@ "define-properties": "1.1.3", "function-bind": "1.1.1", "has-symbols": "1.0.0", - "object-keys": "1.0.12" + "object-keys": "1.1.0" } }, "object.defaults": { @@ -3716,7 +4254,7 @@ }, "os-locale": { "version": "1.4.0", - "resolved": "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "dev": true, "requires": { @@ -3730,9 +4268,9 @@ "dev": true }, "pako": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", - "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==", + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.10.tgz", + "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==", "dev": true }, "parents": { @@ -3745,16 +4283,17 @@ } }, "parse-asn1": { - "version": "5.1.1", - "resolved": "http://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", - "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.4.tgz", + "integrity": "sha512-Qs5duJcuvNExRfFZ99HDD3z4mAi3r9Wl/FOjEOijlxwCZs7E7mW2vjTpgQ4J8LpTF8x5v+1Vn5UQFejmWT11aw==", "dev": true, "requires": { "asn1.js": "4.10.1", "browserify-aes": "1.2.0", "create-hash": "1.2.0", "evp_bytestokey": "1.0.3", - "pbkdf2": "3.0.16" + "pbkdf2": "3.0.17", + "safe-buffer": "5.1.2" } }, "parse-filepath": { @@ -3777,6 +4316,12 @@ "error-ex": "1.3.2" } }, + "parse-node-version": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", + "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==", + "dev": true + }, "parse-passwd": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", @@ -3849,15 +4394,15 @@ "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", "dev": true, "requires": { - "graceful-fs": "4.1.11", + "graceful-fs": "4.1.15", "pify": "2.3.0", "pinkie-promise": "2.0.1" } }, "pbkdf2": { - "version": "3.0.16", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.16.tgz", - "integrity": "sha512-y4CXP3thSxqf7c0qmOF+9UeOTrifiVTIM+u7NWlq+PRsHbr7r7dpCmvzrZxa96JJUNi0Y5w9VqG5ZNeCVMoDcA==", + "version": "3.0.17", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", + "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", "dev": true, "requires": { "create-hash": "1.2.0", @@ -3931,16 +4476,17 @@ "dev": true }, "public-encrypt": { - "version": "4.0.2", - "resolved": "http://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.2.tgz", - "integrity": "sha512-4kJ5Esocg8X3h8YgJsKAuoesBgB7mqH3eowiDzMUPKiRDDE7E/BqqZD1hnTByIaAFiwAw246YEltSq7tdrOH0Q==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", "dev": true, "requires": { "bn.js": "4.11.8", "browserify-rsa": "4.0.1", "create-hash": "1.2.0", - "parse-asn1": "5.1.1", - "randombytes": "2.0.6" + "parse-asn1": "5.1.4", + "randombytes": "2.1.0", + "safe-buffer": "5.1.2" } }, "pump": { @@ -3959,7 +4505,7 @@ "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", "dev": true, "requires": { - "duplexify": "3.6.0", + "duplexify": "3.7.1", "inherits": "2.0.3", "pump": "2.0.1" } @@ -3982,9 +4528,9 @@ "dev": true }, "randombytes": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", - "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, "requires": { "safe-buffer": "5.1.2" @@ -3996,7 +4542,7 @@ "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", "dev": true, "requires": { - "randombytes": "2.0.6", + "randombytes": "2.1.0", "safe-buffer": "5.1.2" } }, @@ -4016,7 +4562,7 @@ "dev": true, "requires": { "load-json-file": "1.1.0", - "normalize-package-data": "2.4.0", + "normalize-package-data": "2.5.0", "path-type": "1.1.0" } }, @@ -4032,7 +4578,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { @@ -4043,6 +4589,17 @@ "safe-buffer": "5.1.2", "string_decoder": "1.1.1", "util-deprecate": "1.0.2" + }, + "dependencies": { + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "5.1.2" + } + } } }, "readdirp": { @@ -4051,7 +4608,7 @@ "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", "dev": true, "requires": { - "graceful-fs": "4.1.11", + "graceful-fs": "4.1.15", "micromatch": "3.1.10", "readable-stream": "2.3.6" } @@ -4062,7 +4619,7 @@ "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", "dev": true, "requires": { - "resolve": "1.8.1" + "resolve": "1.10.0" } }, "regenerator-runtime": { @@ -4099,7 +4656,7 @@ "requires": { "remove-bom-buffer": "3.0.0", "safe-buffer": "5.1.2", - "through2": "2.0.3" + "through2": "2.0.5" } }, "remove-trailing-separator": { @@ -4141,7 +4698,7 @@ "integrity": "sha1-6H9tUTuSjd6AgmDBK+f+xv9ueYw=", "dev": true, "requires": { - "homedir-polyfill": "1.0.1", + "homedir-polyfill": "1.0.3", "is-absolute": "1.0.0", "remove-trailing-separator": "1.1.0" } @@ -4159,9 +4716,9 @@ "dev": true }, "resolve": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", - "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", + "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", "dev": true, "requires": { "path-parse": "1.0.6" @@ -4235,7 +4792,7 @@ "integrity": "sha512-Le3YBsFjzv5g6wIH6Y+vD+KFkK0HDXiaWy1Gm4nXtYebMQUyNYSf1cS83MtHrYzVEMlhYElRva1b0bvZ0hBqQw==", "dev": true, "requires": { - "jsonwebtoken": "8.3.0", + "jsonwebtoken": "8.5.0", "sc-errors": "1.4.1" } }, @@ -4273,9 +4830,9 @@ "dev": true }, "semver": { - "version": "5.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz", - "integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==", + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", "dev": true }, "semver-greatest-satisfied-range": { @@ -4318,7 +4875,7 @@ }, "sha.js": { "version": "2.4.11", - "resolved": "http://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", "dev": true, "requires": { @@ -4328,7 +4885,7 @@ }, "shasum": { "version": "1.0.2", - "resolved": "http://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", "integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=", "dev": true, "requires": { @@ -4468,9 +5025,9 @@ } }, "socketcluster-server": { - "version": "14.3.0", - "resolved": "https://registry.npmjs.org/socketcluster-server/-/socketcluster-server-14.3.0.tgz", - "integrity": "sha512-/0/GBb2zyMxvtomptuMF39P2iwZlwqhJfa2fBIcTBdrLcSlj359wZv8T7Nw8Eb2zfIiX+TsEp9tqIMWT1smScw==", + "version": "14.4.0", + "resolved": "https://registry.npmjs.org/socketcluster-server/-/socketcluster-server-14.4.0.tgz", + "integrity": "sha512-qG4XVFsm9SXZNQZWUA2++LO+/n6nHC0FKCHHlSkXk2At7rM82TR0DXBr+Nll2H4IcWt+bfqZ8Z2H3rVTp+vpbg==", "dev": true, "requires": { "async": "2.3.0", @@ -4483,7 +5040,18 @@ "sc-simple-broker": "2.1.3", "sc-uws": "10.148.2", "uuid": "3.2.1", - "ws": "5.1.1" + "ws": "6.1.2" + }, + "dependencies": { + "ws": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.1.2.tgz", + "integrity": "sha512-rfUqzvz0WxmSXtJpPMX2EeASXabOrSMk1ruMOV3JBTBjo4ac2lDjGGsbQSyxj8Odhw5fBib8ZKEjDNvgouNKYw==", + "dev": true, + "requires": { + "async-limiter": "1.0.0" + } + } } }, "source-map": { @@ -4527,19 +5095,19 @@ "dev": true }, "spdx-correct": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", - "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", + "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", "dev": true, "requires": { "spdx-expression-parse": "3.0.0", - "spdx-license-ids": "3.0.1" + "spdx-license-ids": "3.0.3" } }, "spdx-exceptions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", - "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", "dev": true }, "spdx-expression-parse": { @@ -4548,14 +5116,14 @@ "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", "dev": true, "requires": { - "spdx-exceptions": "2.1.0", - "spdx-license-ids": "3.0.1" + "spdx-exceptions": "2.2.0", + "spdx-license-ids": "3.0.3" } }, "spdx-license-ids": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.1.tgz", - "integrity": "sha512-TfOfPcYGBB5sDuPn3deByxPhmfegAhpDYKSOXZQN81Oyrrif8ZCodOLzK3AesELnCx03kikhyDwh0pfvvQvF8w==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz", + "integrity": "sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g==", "dev": true }, "split-string": { @@ -4595,9 +5163,9 @@ } }, "stream-browserify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", - "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", + "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", "dev": true, "requires": { "inherits": "2.0.3", @@ -4666,7 +5234,7 @@ }, "readable-stream": { "version": "1.1.14", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "dev": true, "requires": { @@ -4696,9 +5264,9 @@ } }, "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz", + "integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==", "dev": true, "requires": { "safe-buffer": "5.1.2" @@ -4753,19 +5321,19 @@ "integrity": "sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w==", "dev": true, "requires": { - "acorn-node": "1.5.2" + "acorn-node": "1.6.2" } }, "through": { "version": "2.3.8", - "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, "through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", "dev": true, "requires": { "readable-stream": "2.3.6", @@ -4773,12 +5341,12 @@ } }, "through2-filter": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-2.0.0.tgz", - "integrity": "sha1-YLxVoNrLdghdsfna6Zq0P4PWIuw=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-3.0.0.tgz", + "integrity": "sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA==", "dev": true, "requires": { - "through2": "2.0.3", + "through2": "2.0.5", "xtend": "4.0.1" } }, @@ -4867,7 +5435,7 @@ "integrity": "sha1-/JKtq6ByZHvAtn1rA2ZKoZUJOvY=", "dev": true, "requires": { - "through2": "2.0.3" + "through2": "2.0.5" } }, "trim-right": { @@ -4919,12 +5487,13 @@ "dev": true }, "undeclared-identifiers": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/undeclared-identifiers/-/undeclared-identifiers-1.1.2.tgz", - "integrity": "sha512-13EaeocO4edF/3JKime9rD7oB6QI8llAGhgn5fKOPyfkJbRb6NFv9pYV6dFEmpa4uRjKeBqLZP8GpuzqHlKDMQ==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/undeclared-identifiers/-/undeclared-identifiers-1.1.3.tgz", + "integrity": "sha512-pJOW4nxjlmfwKApE4zvxLScM/njmwj/DiUBv7EabwE4O8kRUy+HIwxQtZLBPll/jx1LJyBcqNfB3/cpv9EZwOw==", "dev": true, "requires": { - "acorn-node": "1.5.2", + "acorn-node": "1.6.2", + "dash-ast": "1.0.0", "get-assigned-identifiers": "1.2.0", "simple-concat": "1.0.0", "xtend": "4.0.1" @@ -4989,24 +5558,13 @@ } }, "unique-stream": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.2.1.tgz", - "integrity": "sha1-WqADz76Uxf+GbE59ZouxxNuts2k=", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.3.1.tgz", + "integrity": "sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A==", "dev": true, "requires": { - "json-stable-stringify": "1.0.1", - "through2-filter": "2.0.0" - }, - "dependencies": { - "json-stable-stringify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", - "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", - "dev": true, - "requires": { - "jsonify": "0.0.0" - } - } + "json-stable-stringify-without-jsonify": "1.0.1", + "through2-filter": "3.0.0" } }, "unset-value": { @@ -5106,12 +5664,12 @@ "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==" }, "v8flags": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.1.1.tgz", - "integrity": "sha512-iw/1ViSEaff8NJ3HLyEjawk/8hjJib3E7pvG4pddVXfUg1983s3VGsiClDjhK64MQVDGqc1Q8r18S4VKQZS9EQ==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.1.2.tgz", + "integrity": "sha512-MtivA7GF24yMPte9Rp/BWGCYQNaUj86zeYxV/x2RRJMKagImbbv3u8iJC57lNhWLPcGLJmHcHmFWkNsplbbLWw==", "dev": true, "requires": { - "homedir-polyfill": "1.0.1" + "homedir-polyfill": "1.0.3" } }, "validate-npm-package-license": { @@ -5120,7 +5678,7 @@ "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", "dev": true, "requires": { - "spdx-correct": "3.0.0", + "spdx-correct": "3.1.0", "spdx-expression-parse": "3.0.0" } }, @@ -5152,7 +5710,7 @@ "requires": { "fs-mkdirp-stream": "1.0.0", "glob-stream": "6.1.0", - "graceful-fs": "4.1.11", + "graceful-fs": "4.1.15", "is-valid-glob": "1.0.0", "lazystream": "1.0.0", "lead": "1.0.0", @@ -5162,7 +5720,7 @@ "remove-bom-buffer": "3.0.0", "remove-bom-stream": "1.2.0", "resolve-options": "1.1.0", - "through2": "2.0.3", + "through2": "2.0.5", "to-through": "2.0.0", "value-or-function": "3.0.0", "vinyl": "2.2.0", @@ -5175,7 +5733,7 @@ "integrity": "sha1-84pa+53R6Ttl1VBGmsYYKsT1S44=", "dev": true, "requires": { - "through2": "2.0.3", + "through2": "2.0.5", "vinyl": "2.2.0" } }, @@ -5187,7 +5745,7 @@ "requires": { "append-buffer": "1.0.2", "convert-source-map": "1.6.0", - "graceful-fs": "4.1.11", + "graceful-fs": "4.1.15", "normalize-path": "2.1.1", "now-and-later": "2.0.0", "remove-bom-buffer": "3.0.0", @@ -5237,7 +5795,7 @@ }, "wrap-ansi": { "version": "2.1.0", - "resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "dev": true, "requires": { diff --git a/package.json b/package.json index d59f2bc..e5cb190 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "socketcluster-client", "description": "SocketCluster JavaScript client", - "version": "14.2.1", + "version": "14.2.2", "homepage": "http://socketcluster.io", "contributors": [ { @@ -18,7 +18,7 @@ "test": "mocha --reporter spec --timeout 3000 --slow 3000" }, "dependencies": { - "base-64": "0.1.0", + "buffer": "^5.2.1", "clone": "2.1.1", "component-emitter": "1.2.1", "linked-list": "0.1.0", diff --git a/socketcluster.js b/socketcluster.js index 0f677ea..83c49cd 100644 --- a/socketcluster.js +++ b/socketcluster.js @@ -1,5 +1,5 @@ /** - * SocketCluster JavaScript client v14.2.1 + * SocketCluster JavaScript client v14.2.2 */ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.socketCluster = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i> (-2 * bitCounter & 6) - ); - } - } - return output; - }; - - // `encode` is designed to be fully compatible with `btoa` as described in the - // HTML Standard: http://whatwg.org/html/webappapis.html#dom-windowbase64-btoa - var encode = function(input) { - input = String(input); - if (/[^\0-\xFF]/.test(input)) { - // Note: no need to special-case astral symbols here, as surrogates are - // matched, and the input is supposed to only contain ASCII anyway. - error( - 'The string to be encoded contains characters outside of the ' + - 'Latin1 range.' - ); - } - var padding = input.length % 3; - var output = ''; - var position = -1; - var a; - var b; - var c; - var d; - var buffer; - // Make sure any padding is handled outside of the loop. - var length = input.length - padding; - - while (++position < length) { - // Read three bytes, i.e. 24 bits. - a = input.charCodeAt(position) << 16; - b = input.charCodeAt(++position) << 8; - c = input.charCodeAt(++position); - buffer = a + b + c; - // Turn the 24 bits into four chunks of 6 bits each, and append the - // matching character for each of them to the output. - output += ( - TABLE.charAt(buffer >> 18 & 0x3F) + - TABLE.charAt(buffer >> 12 & 0x3F) + - TABLE.charAt(buffer >> 6 & 0x3F) + - TABLE.charAt(buffer & 0x3F) - ); - } - - if (padding == 2) { - a = input.charCodeAt(position) << 8; - b = input.charCodeAt(++position); - buffer = a + b; - output += ( - TABLE.charAt(buffer >> 10) + - TABLE.charAt((buffer >> 4) & 0x3F) + - TABLE.charAt((buffer << 2) & 0x3F) + - '=' - ); - } else if (padding == 1) { - buffer = input.charCodeAt(position); - output += ( - TABLE.charAt(buffer >> 2) + - TABLE.charAt((buffer << 4) & 0x3F) + - '==' - ); - } - - return output; - }; - - var base64 = { - 'encode': encode, - 'decode': decode, - 'version': '0.1.0' - }; - - // Some AMD build optimizers, like r.js, check for specific condition patterns - // like the following: - if ( - typeof define == 'function' && - typeof define.amd == 'object' && - define.amd - ) { - define(function() { - return base64; - }); - } else if (freeExports && !freeExports.nodeType) { - if (freeModule) { // in Node.js or RingoJS v0.8.0+ - freeModule.exports = base64; - } else { // in Narwhal or RingoJS v0.7.0- - for (var key in base64) { - base64.hasOwnProperty(key) && (freeExports[key] = base64[key]); - } - } - } else { // in Rhino or a web browser - root.base64 = base64; - } - -}(this)); - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],9:[function(_dereq_,module,exports){ 'use strict' exports.byteLength = byteLength @@ -2116,7 +1925,8 @@ function fromByteArray (uint8) { return parts.join('') } -},{}],10:[function(_dereq_,module,exports){ +},{}],9:[function(_dereq_,module,exports){ +(function (Buffer){ /*! * The buffer module from node.js, for the browser. * @@ -3895,7 +3705,8 @@ function numberIsNaN (obj) { return obj !== obj // eslint-disable-line no-self-compare } -},{"base64-js":9,"ieee754":13}],11:[function(_dereq_,module,exports){ +}).call(this,_dereq_("buffer").Buffer) +},{"base64-js":8,"buffer":9,"ieee754":12}],10:[function(_dereq_,module,exports){ (function (Buffer){ var clone = (function() { 'use strict'; @@ -4150,7 +3961,7 @@ if (typeof module === 'object' && module.exports) { } }).call(this,_dereq_("buffer").Buffer) -},{"buffer":10}],12:[function(_dereq_,module,exports){ +},{"buffer":9}],11:[function(_dereq_,module,exports){ /** * Expose `Emitter`. @@ -4315,7 +4126,7 @@ Emitter.prototype.hasListeners = function(event){ return !! this.listeners(event).length; }; -},{}],13:[function(_dereq_,module,exports){ +},{}],12:[function(_dereq_,module,exports){ exports.read = function (buffer, offset, isLE, mLen, nBytes) { var e, m var eLen = (nBytes * 8) - mLen - 1 @@ -4401,7 +4212,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { buffer[offset + i - d] |= s * 128 } -},{}],14:[function(_dereq_,module,exports){ +},{}],13:[function(_dereq_,module,exports){ 'use strict'; /** @@ -4789,12 +4600,12 @@ ListItemPrototype.append = function (item) { module.exports = List; -},{}],15:[function(_dereq_,module,exports){ +},{}],14:[function(_dereq_,module,exports){ 'use strict'; module.exports = _dereq_('./_source/linked-list.js'); -},{"./_source/linked-list.js":14}],16:[function(_dereq_,module,exports){ +},{"./_source/linked-list.js":13}],15:[function(_dereq_,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -4880,7 +4691,7 @@ var isArray = Array.isArray || function (xs) { return Object.prototype.toString.call(xs) === '[object Array]'; }; -},{}],17:[function(_dereq_,module,exports){ +},{}],16:[function(_dereq_,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -4967,13 +4778,13 @@ var objectKeys = Object.keys || function (obj) { return res; }; -},{}],18:[function(_dereq_,module,exports){ +},{}],17:[function(_dereq_,module,exports){ 'use strict'; exports.decode = exports.parse = _dereq_('./decode'); exports.encode = exports.stringify = _dereq_('./encode'); -},{"./decode":16,"./encode":17}],19:[function(_dereq_,module,exports){ +},{"./decode":15,"./encode":16}],18:[function(_dereq_,module,exports){ var Emitter = _dereq_('component-emitter'); var SCChannel = function (name, client, options) { @@ -5045,7 +4856,7 @@ SCChannel.prototype.destroy = function () { module.exports.SCChannel = SCChannel; -},{"component-emitter":12}],20:[function(_dereq_,module,exports){ +},{"component-emitter":11}],19:[function(_dereq_,module,exports){ // Based on https://github.com/dscape/cycle/blob/master/cycle.js module.exports = function decycle(object) { @@ -5126,7 +4937,7 @@ module.exports = function decycle(object) { }(object, '$')); }; -},{}],21:[function(_dereq_,module,exports){ +},{}],20:[function(_dereq_,module,exports){ var decycle = _dereq_('./decycle'); var isStrict = (function () { return !this; })(); @@ -5454,7 +5265,7 @@ module.exports.hydrateError = function hydrateError(error) { module.exports.decycle = decycle; -},{"./decycle":20}],22:[function(_dereq_,module,exports){ +},{"./decycle":19}],21:[function(_dereq_,module,exports){ (function (global){ var base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; var validJSONStartRegex = /^[ \n\r\t]*[{\[]/; @@ -5552,7 +5363,7 @@ module.exports.encode = function (object) { }; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],23:[function(_dereq_,module,exports){ +},{}],22:[function(_dereq_,module,exports){ var v1 = _dereq_('./v1'); var v4 = _dereq_('./v4'); @@ -5562,7 +5373,7 @@ uuid.v4 = v4; module.exports = uuid; -},{"./v1":26,"./v4":27}],24:[function(_dereq_,module,exports){ +},{"./v1":25,"./v4":26}],23:[function(_dereq_,module,exports){ /** * Convert array of 16 byte values to UUID string format of the form: * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX @@ -5587,7 +5398,7 @@ function bytesToUuid(buf, offset) { module.exports = bytesToUuid; -},{}],25:[function(_dereq_,module,exports){ +},{}],24:[function(_dereq_,module,exports){ // Unique ID creation requires a high quality random # generator. In the // browser this is a little complicated due to unknown quality of Math.random() // and inconsistent support for the `crypto` API. We do the best we can via @@ -5621,7 +5432,7 @@ if (getRandomValues) { }; } -},{}],26:[function(_dereq_,module,exports){ +},{}],25:[function(_dereq_,module,exports){ var rng = _dereq_('./lib/rng'); var bytesToUuid = _dereq_('./lib/bytesToUuid'); @@ -5732,7 +5543,7 @@ function v1(options, buf, offset) { module.exports = v1; -},{"./lib/bytesToUuid":24,"./lib/rng":25}],27:[function(_dereq_,module,exports){ +},{"./lib/bytesToUuid":23,"./lib/rng":24}],26:[function(_dereq_,module,exports){ var rng = _dereq_('./lib/rng'); var bytesToUuid = _dereq_('./lib/bytesToUuid'); @@ -5763,5 +5574,5 @@ function v4(options, buf, offset) { module.exports = v4; -},{"./lib/bytesToUuid":24,"./lib/rng":25}]},{},[1])(1) +},{"./lib/bytesToUuid":23,"./lib/rng":24}]},{},[1])(1) }); diff --git a/socketcluster.min.js b/socketcluster.min.js index 92cd28a..2f0e049 100644 --- a/socketcluster.min.js +++ b/socketcluster.min.js @@ -1,4 +1,4 @@ /** - * SocketCluster JavaScript client v14.2.1 + * SocketCluster JavaScript client v14.2.2 */ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).socketCluster=t()}}(function(){return function i(s,a,c){function u(e,t){if(!a[e]){if(!s[e]){var r="function"==typeof require&&require;if(!t&&r)return r(e,!0);if(h)return h(e,!0);var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}var o=a[e]={exports:{}};s[e][0].call(o.exports,function(t){return u(s[e][1][t]||t)},o,o.exports,i,s,a,c)}return a[e].exports}for(var h="function"==typeof require&&require,t=0;tr)throw new f("The "+t+" value provided exceeded the maximum amount allowed")};if(n("connectTimeout"),n("ackTimeout"),this._localEvents={connect:1,connectAbort:1,close:1,disconnect:1,message:1,error:1,raw:1,kickOut:1,subscribe:1,unsubscribe:1,subscribeStateChange:1,authStateChange:1,authenticate:1,deauthenticate:1,removeAuthToken:1,subscribeRequest:1},this.connectAttempts=0,this._emitBuffer=new p,this.channels={},this.options=t,this._cid=1,this.options.callIdGenerator=function(){return e._cid++},this.options.autoReconnect){null==this.options.autoReconnectOptions&&(this.options.autoReconnectOptions={});var o=this.options.autoReconnectOptions;null==o.initialDelay&&(o.initialDelay=1e4),null==o.randomness&&(o.randomness=1e4),null==o.multiplier&&(o.multiplier=1.5),null==o.maxDelay&&(o.maxDelay=6e4)}if(null==this.options.subscriptionRetryOptions&&(this.options.subscriptionRetryOptions={}),this.options.authEngine?this.auth=this.options.authEngine:this.auth=new c,this.options.codecEngine?this.codec=this.options.codecEngine:this.codec=u,this.options.protocol){var i=new f('The "protocol" option does not affect socketcluster-client. If you want to utilize SSL/TLS - use "secure" option instead');this._onSCError(i)}this.options.path=this.options.path.replace(/\/$/,"")+"/",this.options.query=t.query||{},"string"==typeof this.options.query&&(this.options.query=h.parse(this.options.query)),this._channelEmitter=new a,this._unloadHandler=function(){e.disconnect()},b&&this.disconnectOnUnload&&s.addEventListener&&s.addEventListener("beforeunload",this._unloadHandler,!1),(this._clientMap[this.clientId]=this).options.autoConnect&&this.connect()};v.prototype=Object.create(a.prototype),v.CONNECTING=v.prototype.CONNECTING=e.prototype.CONNECTING,v.OPEN=v.prototype.OPEN=e.prototype.OPEN,v.CLOSED=v.prototype.CLOSED=e.prototype.CLOSED,v.AUTHENTICATED=v.prototype.AUTHENTICATED="authenticated",v.UNAUTHENTICATED=v.prototype.UNAUTHENTICATED="unauthenticated",v.PENDING=v.prototype.PENDING="pending",v.ignoreStatuses=i.socketProtocolIgnoreStatuses,v.errorStatuses=i.socketProtocolErrorStatuses,v.prototype._privateEventHandlerMap={"#publish":function(t){var e=this._undecorateChannelName(t.channel);this.isSubscribed(e,!0)&&this._channelEmitter.emit(e,t.data)},"#kickOut":function(t){var e=this._undecorateChannelName(t.channel),r=this.channels[e];r&&(a.prototype.emit.call(this,"kickOut",t.message,e),r.emit("kickOut",t.message,e),this._triggerChannelUnsubscribe(r))},"#setAuthToken":function(e,r){var n=this;if(e){this.auth.saveToken(this.authTokenName,e.token,{},function(t){t?(r.error(t),n._onSCError(t)):(n._changeToAuthenticatedState(e.token),r.end())})}else r.error(new t("No token data provided by #setAuthToken event"))},"#removeAuthToken":function(t,r){var n=this;this.auth.removeToken(this.authTokenName,function(t,e){t?(r.error(t),n._onSCError(t)):(a.prototype.emit.call(n,"removeAuthToken",e),n._changeToUnauthenticatedStateAndClearTokens(),r.end())})},"#disconnect":function(t){this.transport.close(t.code,t.data)}},v.prototype.getState=function(){return this.state},v.prototype.getBytesReceived=function(){return this.transport.getBytesReceived()},v.prototype.deauthenticate=function(r){var n=this;this.auth.removeToken(this.authTokenName,function(t,e){t?n._onSCError(t):(a.prototype.emit.call(n,"removeAuthToken",e),n.state!==n.CLOSED&&n.emit("#removeAuthToken"),n._changeToUnauthenticatedStateAndClearTokens()),r&&r(t)})},v.prototype.connect=v.prototype.open=function(){var n=this;if(this.active)this.state===this.CLOSED&&(this.pendingReconnect=!1,this.pendingReconnectTimeout=null,clearTimeout(this._reconnectTimeoutRef),this.state=this.CONNECTING,a.prototype.emit.call(this,"connecting"),this.transport&&this.transport.off(),this.transport=new e(this.auth,this.codec,this.options),this.transport.on("open",function(t){n.state=n.OPEN,n._onSCOpen(t)}),this.transport.on("error",function(t){n._onSCError(t)}),this.transport.on("close",function(t,e){n.state=n.CLOSED,n._onSCClose(t,e)}),this.transport.on("openAbort",function(t,e){n.state=n.CLOSED,n._onSCClose(t,e,!0)}),this.transport.on("event",function(t,e,r){n._onSCEvent(t,e,r)}));else{var t=new d("Cannot connect a destroyed client");this._onSCError(t)}},v.prototype.reconnect=function(t,e){this.disconnect(t,e),this.connect()},v.prototype.disconnect=function(t,e){if("number"!=typeof(t=t||1e3))throw new f("If specified, the code argument must be a number");this.state===this.OPEN||this.state===this.CONNECTING?this.transport.close(t,e):(this.pendingReconnect=!1,this.pendingReconnectTimeout=null,clearTimeout(this._reconnectTimeoutRef))},v.prototype.destroy=function(t,e){b&&s.removeEventListener&&s.removeEventListener("beforeunload",this._unloadHandler,!1),this.active=!1,this.disconnect(t,e),delete this._clientMap[this.clientId]},v.prototype._changeToUnauthenticatedStateAndClearTokens=function(){if(this.authState!==this.UNAUTHENTICATED){var t=this.authState,e=this.signedAuthToken;this.authState=this.UNAUTHENTICATED,this.signedAuthToken=null,this.authToken=null;var r={oldState:t,newState:this.authState};a.prototype.emit.call(this,"authStateChange",r),a.prototype.emit.call(this,"deauthenticate",e)}},v.prototype._changeToAuthenticatedState=function(t){if(this.signedAuthToken=t,this.authToken=this._extractAuthTokenData(t),this.authState!==this.AUTHENTICATED){var e=this.authState;this.authState=this.AUTHENTICATED;var r={oldState:e,newState:this.authState,signedAuthToken:t,authToken:this.authToken};this.preparingPendingSubscriptions||this.processPendingSubscriptions(),a.prototype.emit.call(this,"authStateChange",r)}a.prototype.emit.call(this,"authenticate",t)},v.prototype.decodeBase64=function(t){var e;void 0===r?e=s.atob?s.atob(t):o.decode(t):e=r.from(t,"base64").toString("utf8");return e},v.prototype.encodeBase64=function(t){var e;void 0===r?e=s.btoa?s.btoa(t):o.encode(t):e=r.from(t,"utf8").toString("base64");return e},v.prototype._extractAuthTokenData=function(t){var e=(t||"").split(".")[1];if(null!=e){var r=e;try{return r=this.decodeBase64(r),JSON.parse(r)}catch(t){return r}}return null},v.prototype.getAuthToken=function(){return this.authToken},v.prototype.getSignedAuthToken=function(){return this.signedAuthToken},v.prototype.authenticate=function(r,n){var o=this;this.emit("#authenticate",r,function(t,e){e&&null!=e.isAuthenticated?e.authError&&(e.authError=i.hydrateError(e.authError)):e={isAuthenticated:o.authState,authError:null},t?("BadConnectionError"!==t.name&&"TimeoutError"!==t.name&&o._changeToUnauthenticatedStateAndClearTokens(),n&&n(t,e)):o.auth.saveToken(o.authTokenName,r,{},function(t){t&&o._onSCError(t),e.isAuthenticated?o._changeToAuthenticatedState(r):o._changeToUnauthenticatedStateAndClearTokens(),n&&n(t,e)})})},v.prototype._tryReconnect=function(t){var e,r=this,n=this.connectAttempts++,o=this.options.autoReconnectOptions;if(null==t||0o.maxDelay&&(e=o.maxDelay),clearTimeout(this._reconnectTimeoutRef),this.pendingReconnect=!0,this.pendingReconnectTimeout=e,this._reconnectTimeoutRef=setTimeout(function(){r.connect()},e)},v.prototype._onSCOpen=function(t){var e=this;this.preparingPendingSubscriptions=!0,t?(this.id=t.id,this.pingTimeout=t.pingTimeout,this.transport.pingTimeout=this.pingTimeout,t.isAuthenticated?this._changeToAuthenticatedState(t.authToken):this._changeToUnauthenticatedStateAndClearTokens()):this._changeToUnauthenticatedStateAndClearTokens(),this.connectAttempts=0,this.options.autoSubscribeOnConnect&&this.processPendingSubscriptions(),a.prototype.emit.call(this,"connect",t,function(){e.processPendingSubscriptions()}),this.state===this.OPEN&&this._flushEmitBuffer()},v.prototype._onSCError=function(t){var e=this;setTimeout(function(){if(e.listeners("error").length<1)throw t;a.prototype.emit.call(e,"error",t)},0)},v.prototype._suspendSubscriptions=function(){var t,e;for(var r in this.channels)this.channels.hasOwnProperty(r)&&(e=(t=this.channels[r]).state===t.SUBSCRIBED||t.state===t.PENDING?t.PENDING:t.UNSUBSCRIBED,this._triggerChannelUnsubscribe(t,e))},v.prototype._abortAllPendingEventsDueToBadConnection=function(t){for(var e,r=this._emitBuffer.head;r;){e=r.next;var n=r.data;clearTimeout(n.timeout),delete n.timeout,r.detach(),r=e;var o=n.callback;if(o){delete n.callback;var i="Event '"+n.event+"' was aborted due to a bad connection",s=new m(i,t);o.call(n,s,n)}n.cid&&this.transport.cancelPendingResponse(n.cid)}},v.prototype._onSCClose=function(t,e,r){if(this.id=null,this.transport&&this.transport.off(),this.pendingReconnect=!1,this.pendingReconnectTimeout=null,clearTimeout(this._reconnectTimeoutRef),this._suspendSubscriptions(),this._abortAllPendingEventsDueToBadConnection(r?"connectAbort":"disconnect"),this.options.autoReconnect&&(4e3===t||4001===t||1005===t?this._tryReconnect(0):1e3!==t&&t<4500&&this._tryReconnect()),r?a.prototype.emit.call(this,"connectAbort",t,e):a.prototype.emit.call(this,"disconnect",t,e),a.prototype.emit.call(this,"close",t,e),!v.ignoreStatuses[t]){var n;n=e?"Socket connection closed with status code "+t+" and reason: "+e:"Socket connection closed with status code "+t;var o=new y(v.errorStatuses[t]||n,t);this._onSCError(o)}},v.prototype._onSCEvent=function(t,e,r){var n=this._privateEventHandlerMap[t];n?n.call(this,e,r):a.prototype.emit.call(this,t,e,function(){r&&r.callback.apply(r,arguments)})},v.prototype.decode=function(t){return this.transport.decode(t)},v.prototype.encode=function(t){return this.transport.encode(t)},v.prototype._flushEmitBuffer=function(){for(var t,e=this._emitBuffer.head;e;){t=e.next;var r=e.data;e.detach(),this.transport.emitObject(r),e=t}},v.prototype._handleEventAckTimeout=function(t,e){e&&e.detach(),delete t.timeout;var r=t.callback;if(r){delete t.callback;var n=new g("Event response for '"+t.event+"' timed out");r.call(t,n,t)}t.cid&&this.transport.cancelPendingResponse(t.cid)},v.prototype._emit=function(t,e,r){var n=this;this.state===this.CLOSED&&this.connect();var o={event:t,callback:r},i=new p.Item;this.options.cloneData?o.data=l(e):o.data=e,(i.data=o).timeout=setTimeout(function(){n._handleEventAckTimeout(o,i)},this.ackTimeout),this._emitBuffer.append(i),this.state===this.OPEN&&this._flushEmitBuffer()},v.prototype.send=function(t){this.transport.send(t)},v.prototype.emit=function(t,e,r){if(null==this._localEvents[t])this._emit(t,e,r);else if("error"===t)a.prototype.emit.call(this,t,e);else{var n=new d('The "'+t+'" event is reserved and cannot be emitted on a client socket');this._onSCError(n)}},v.prototype.publish=function(t,e,r){var n={channel:this._decorateChannelName(t),data:e};this.emit("#publish",n,r)},v.prototype._triggerChannelSubscribe=function(t,e){var r=t.name;if(t.state!==t.SUBSCRIBED){var n=t.state;t.state=t.SUBSCRIBED;var o={channel:r,oldState:n,newState:t.state,subscriptionOptions:e};t.emit("subscribeStateChange",o),t.emit("subscribe",r,e),a.prototype.emit.call(this,"subscribeStateChange",o),a.prototype.emit.call(this,"subscribe",r,e)}},v.prototype._triggerChannelSubscribeFail=function(t,e,r){var n=e.name,o=!e.waitForAuth||this.authState===this.AUTHENTICATED;e.state!==e.UNSUBSCRIBED&&o&&(e.state=e.UNSUBSCRIBED,e.emit("subscribeFail",t,n,r),a.prototype.emit.call(this,"subscribeFail",t,n,r))},v.prototype._cancelPendingSubscribeCallback=function(t){null!=t._pendingSubscriptionCid&&(this.transport.cancelPendingResponse(t._pendingSubscriptionCid),delete t._pendingSubscriptionCid)},v.prototype._decorateChannelName=function(t){return this.channelPrefix&&(t=this.channelPrefix+t),t},v.prototype._undecorateChannelName=function(t){return this.channelPrefix&&0===t.indexOf(this.channelPrefix)?t.replace(this.channelPrefix,""):t},v.prototype._trySubscribe=function(e){var r=this,t=!e.waitForAuth||this.authState===this.AUTHENTICATED;if(this.state===this.OPEN&&!this.preparingPendingSubscriptions&&null==e._pendingSubscriptionCid&&t){var n={noTimeout:!0},o={channel:this._decorateChannelName(e.name)};e.waitForAuth&&(n.waitForAuth=!0,o.waitForAuth=n.waitForAuth),e.data&&(o.data=e.data),e.batch&&(n.batch=!0,o.batch=!0),e._pendingSubscriptionCid=this.transport.emit("#subscribe",o,n,function(t){delete e._pendingSubscriptionCid,t?r._triggerChannelSubscribeFail(t,e,o):r._triggerChannelSubscribe(e,o)}),a.prototype.emit.call(this,"subscribeRequest",e.name,o)}},v.prototype.subscribe=function(t,e){var r=this.channels[t];return r?e&&r.setOptions(e):(r=new n(t,this,e),this.channels[t]=r),r.state===r.UNSUBSCRIBED&&(r.state=r.PENDING,this._trySubscribe(r)),r},v.prototype._triggerChannelUnsubscribe=function(t,e){var r=t.name,n=t.state;if(t.state=e||t.UNSUBSCRIBED,this._cancelPendingSubscribeCallback(t),n===t.SUBSCRIBED){var o={channel:r,oldState:n,newState:t.state};t.emit("subscribeStateChange",o),t.emit("unsubscribe",r),a.prototype.emit.call(this,"subscribeStateChange",o),a.prototype.emit.call(this,"unsubscribe",r)}},v.prototype._tryUnsubscribe=function(t){if(this.state===this.OPEN){var e={noTimeout:!0};t.batch&&(e.batch=!0),this._cancelPendingSubscribeCallback(t);var r=this._decorateChannelName(t.name);this.transport.emit("#unsubscribe",r,e)}},v.prototype.unsubscribe=function(t){var e=this.channels[t];e&&e.state!==e.UNSUBSCRIBED&&(this._triggerChannelUnsubscribe(e),this._tryUnsubscribe(e))},v.prototype.channel=function(t,e){var r=this.channels[t];return r||(r=new n(t,this,e),this.channels[t]=r),r},v.prototype.destroyChannel=function(t){var e=this.channels[t];e&&(e.unwatch(),e.unsubscribe(),delete this.channels[t])},v.prototype.subscriptions=function(t){var e,r=[];for(var n in this.channels)this.channels.hasOwnProperty(n)&&(e=this.channels[n],(t?e&&(e.state===e.SUBSCRIBED||e.state===e.PENDING):e&&e.state===e.SUBSCRIBED)&&r.push(n));return r},v.prototype.isSubscribed=function(t,e){var r=this.channels[t];return e?!!r&&(r.state===r.SUBSCRIBED||r.state===r.PENDING):!!r&&r.state===r.SUBSCRIBED},v.prototype.processPendingSubscriptions=function(){var e=this;this.preparingPendingSubscriptions=!1;var t=[];for(var r in this.channels)if(this.channels.hasOwnProperty(r)){var n=this.channels[r];n.state===n.PENDING&&t.push(n)}t.sort(function(t,e){var r=t.priority||0,n=e.priority||0;return n>18&63)+h.charAt(o>>12&63)+h.charAt(o>>6&63)+h.charAt(63&o);return 2==i?(e=t.charCodeAt(a)<<8,r=t.charCodeAt(++a),s+=h.charAt((o=e+r)>>10)+h.charAt(o>>4&63)+h.charAt(o<<2&63)+"="):1==i&&(o=t.charCodeAt(a),s+=h.charAt(o>>2)+h.charAt(o<<4&63)+"=="),s},decode:function(t){var e=(t=String(t).replace(a,"")).length;e%4==0&&(e=(t=t.replace(/==?$/,"")).length),(e%4==1||/[^+a-zA-Z0-9/]/.test(t))&&u("Invalid character: the string to be decoded is not correctly encoded.");for(var r,n,o=0,i="",s=-1;++s>(-2*o&6)));return i},version:"0.1.0"};if(e&&!e.nodeType)if(r)r.exports=i;else for(var s in i)i.hasOwnProperty(s)&&(e[s]=i[s]);else t.base64=i}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],9:[function(t,e,r){"use strict";r.byteLength=function(t){var e=f(t),r=e[0],n=e[1];return 3*(r+n)/4-n},r.toByteArray=function(t){for(var e,r=f(t),n=r[0],o=r[1],i=new l((u=n,h=o,3*(u+h)/4-h)),s=0,a=0>16&255,i[s++]=e>>8&255,i[s++]=255&e;var u,h;2===o&&(e=p[t.charCodeAt(c)]<<2|p[t.charCodeAt(c+1)]>>4,i[s++]=255&e);1===o&&(e=p[t.charCodeAt(c)]<<10|p[t.charCodeAt(c+1)]<<4|p[t.charCodeAt(c+2)]>>2,i[s++]=e>>8&255,i[s++]=255&e);return i},r.fromByteArray=function(t){for(var e,r=t.length,n=r%3,o=[],i=0,s=r-n;i>2]+a[e<<4&63]+"==")):2===n&&(e=(t[r-2]<<8)+t[r-1],o.push(a[e>>10]+a[e>>4&63]+a[e<<2&63]+"="));return o.join("")};for(var a=[],p=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,i=n.length;o>18&63]+a[o>>12&63]+a[o>>6&63]+a[63&o]);return i.join("")}p["-".charCodeAt(0)]=62,p["_".charCodeAt(0)]=63},{}],10:[function(t,e,r){"use strict";var n=t("base64-js"),i=t("ieee754");r.Buffer=p,r.SlowBuffer=function(t){return+t!=t&&(t=0),p.alloc(+t)},r.INSPECT_MAX_BYTES=50;var o=2147483647;function s(t){if(o>>1;case"base64":return R(t).length;default:if(o)return n?-1:U(t).length;e=(""+e).toLowerCase(),o=!0}}function d(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function y(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):2147483647=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=p.from(e,n)),p.isBuffer(e))return 0===e.length?-1:g(t,e,r,n,o);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):g(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function g(t,e,r,n,o){var i,s=1,a=t.length,c=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a/=s=2,c/=2,r/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(o){var h=-1;for(i=r;i>>10&1023|55296),h=56320|1023&h),n.push(h),o+=p}return function(t){var e=t.length;if(e<=w)return String.fromCharCode.apply(String,t);var r="",n=0;for(;nthis.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return k(this,e,r);case"utf8":case"utf-8":return E(this,e,r);case"ascii":return T(this,e,r);case"latin1":case"binary":return S(this,e,r);case"base64":return v(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},p.prototype.equals=function(t){if(!p.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===p.compare(this,t)},p.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(t+=" ... "),""},p.prototype.compare=function(t,e,r,n,o){if(j(t,Uint8Array)&&(t=p.from(t,t.offset,t.byteLength)),!p.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(o<=n&&r<=e)return 0;if(o<=n)return-1;if(r<=e)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(i,s),c=this.slice(n,o),u=t.slice(e,r),h=0;h>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-e;if((void 0===r||othis.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i,s,a,c,u,h,p,l,f,d=!1;;)switch(n){case"hex":return m(this,t,e,r);case"utf8":case"utf-8":return l=e,f=r,P(U(t,(p=this).length-l),p,l,f);case"ascii":return b(this,t,e,r);case"latin1":case"binary":return b(this,t,e,r);case"base64":return c=this,u=e,h=r,P(R(t),c,u,h);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return s=e,a=r,P(function(t,e){for(var r,n,o,i=[],s=0;s>8,o=r%256,i.push(o),i.push(n);return i}(t,(i=this).length-s),i,s,a);default:if(d)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),d=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var w=4096;function T(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;ot.length)throw new RangeError("Index out of range")}function O(t,e,r,n){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function B(t,e,r,n,o){return e=+e,r>>>=0,o||O(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function I(t,e,r,n,o){return e=+e,r>>>=0,o||O(t,0,r,8),i.write(t,e,r,n,52,8),r+8}p.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):r>>=0,e>>>=0,r||C(t,e,this.length);for(var n=this[t],o=1,i=0;++i>>=0,e>>>=0,r||C(t,e,this.length);for(var n=this[t+--e],o=1;0>>=0,e||C(t,1,this.length),this[t]},p.prototype.readUInt16LE=function(t,e){return t>>>=0,e||C(t,2,this.length),this[t]|this[t+1]<<8},p.prototype.readUInt16BE=function(t,e){return t>>>=0,e||C(t,2,this.length),this[t]<<8|this[t+1]},p.prototype.readUInt32LE=function(t,e){return t>>>=0,e||C(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},p.prototype.readUInt32BE=function(t,e){return t>>>=0,e||C(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},p.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||C(t,e,this.length);for(var n=this[t],o=1,i=0;++i>>=0,e>>>=0,r||C(t,e,this.length);for(var n=e,o=1,i=this[t+--n];0>>=0,e||C(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},p.prototype.readInt16LE=function(t,e){t>>>=0,e||C(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},p.prototype.readInt16BE=function(t,e){t>>>=0,e||C(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},p.prototype.readInt32LE=function(t,e){return t>>>=0,e||C(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},p.prototype.readInt32BE=function(t,e){return t>>>=0,e||C(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},p.prototype.readFloatLE=function(t,e){return t>>>=0,e||C(t,4,this.length),i.read(this,t,!0,23,4)},p.prototype.readFloatBE=function(t,e){return t>>>=0,e||C(t,4,this.length),i.read(this,t,!1,23,4)},p.prototype.readDoubleLE=function(t,e){return t>>>=0,e||C(t,8,this.length),i.read(this,t,!0,52,8)},p.prototype.readDoubleBE=function(t,e){return t>>>=0,e||C(t,8,this.length),i.read(this,t,!1,52,8)},p.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||A(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[e]=255&t;++i>>=0,r>>>=0,n)||A(this,t,e,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[e+o]=255&t;0<=--o&&(i*=256);)this[e+o]=t/i&255;return e+r},p.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,1,255,0),this[e]=255&t,e+1},p.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},p.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},p.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},p.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},p.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var o=Math.pow(2,8*r-1);A(this,t,e,r,o-1,-o)}var i=0,s=1,a=0;for(this[e]=255&t;++i>0)-a&255;return e+r},p.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var o=Math.pow(2,8*r-1);A(this,t,e,r,o-1,-o)}var i=r-1,s=1,a=0;for(this[e+i]=255&t;0<=--i&&(s*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/s>>0)-a&255;return e+r},p.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},p.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},p.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},p.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},p.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},p.prototype.writeFloatLE=function(t,e,r){return B(this,t,e,!0,r)},p.prototype.writeFloatBE=function(t,e,r){return B(this,t,e,!1,r)},p.prototype.writeDoubleLE=function(t,e,r){return I(this,t,e,!0,r)},p.prototype.writeDoubleBE=function(t,e,r){return I(this,t,e,!1,r)},p.prototype.copy=function(t,e,r,n){if(!p.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),0=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function R(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(N,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function P(t,e,r,n){for(var o=0;o=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function j(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function D(t){return t!=t}},{"base64-js":9,ieee754:13}],11:[function(t,e){(function(k){var t=function(){"use strict";function b(t,e){return null!=e&&t instanceof e}var v,E,w;try{v=Map}catch(t){v=function(){}}try{E=Set}catch(t){E=function(){}}try{w=Promise}catch(t){w=function(){}}function T(t,f,e,d,y){"object"==typeof f&&(e=f.depth,d=f.prototype,y=f.includeNonEnumerable,f=f.circular);var g=[],m=[];return void 0===f&&(f=!0),void 0===e&&(e=1/0),function o(t,i){if(null===t)return null;if(0===i)return t;var s,e;if("object"!=typeof t)return t;if(b(t,v))s=new v;else if(b(t,E))s=new E;else if(b(t,w))s=new w(function(e,r){t.then(function(t){e(o(t,i-1))},function(t){r(o(t,i-1))})});else if(T.__isArray(t))s=[];else if(T.__isRegExp(t))s=new RegExp(t.source,S(t)),t.lastIndex&&(s.lastIndex=t.lastIndex);else if(T.__isDate(t))s=new Date(t.getTime());else{if(void 0!==k&&k.isBuffer(t))return s=new k(t.length),t.copy(s),s;b(t,Error)?s=Object.create(t):void 0===d?(e=Object.getPrototypeOf(t),s=Object.create(e)):(s=Object.create(d),e=d)}if(f){var r=g.indexOf(t);if(-1!=r)return m[r];g.push(t),m.push(s)}for(var n in b(t,v)&&t.forEach(function(t,e){var r=o(e,i-1),n=o(t,i-1);s.set(r,n)}),b(t,E)&&t.forEach(function(t){var e=o(t,i-1);s.add(e)}),t){var a;e&&(a=Object.getOwnPropertyDescriptor(e,n)),a&&null==a.set||(s[n]=o(t[n],i-1))}if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(t);for(n=0;n>1,h=-7,p=r?o-1:0,l=r?-1:1,f=t[e+p];for(p+=l,i=f&(1<<-h)-1,f>>=-h,h+=a;0>=-h,h+=n;0>1,l=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:i-1,d=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),2<=(e+=1<=s+p?l/c:l*Math.pow(2,1-p))*c&&(s++,c/=2),h<=s+p?(a=0,s=h):1<=s+p?(a=(e*c-1)*Math.pow(2,o),s+=p):(a=e*Math.pow(2,p-1)*Math.pow(2,o),s=0));8<=o;t[r+f]=255&a,f+=d,a/=256,o-=8);for(s=s<>2],n+=i[(3&e[o])<<4|e[o+1]>>4],n+=i[(15&e[o+1])<<2|e[o+2]>>6],n+=i[63&e[o+2]];return r%3==2?n=n.substring(0,n.length-1)+"=":r%3==1&&(n=n.substring(0,n.length-2)+"=="),n}(e)};if(r.Buffer){if(e instanceof r.Buffer)return{base64:!0,data:e.toString("base64")};if(e&&"Buffer"===e.type&&Array.isArray(e.data))return{base64:!0,data:(r.Buffer.from?r.Buffer.from(e.data):new r.Buffer(e.data)).toString("base64")}}return e};o.exports.decode=function(t){if(null==t)return null;if("#1"===t||"#2"===t)return t;var e=t.toString();if(!n.test(e))return e;try{return JSON.parse(e)}catch(t){}return e},o.exports.encode=function(t){return"#1"===t||"#2"===t?t:JSON.stringify(t,e)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],23:[function(t,e){var r=t("./v1"),n=t("./v4"),o=n;o.v1=r,o.v4=n,e.exports=o},{"./v1":26,"./v4":27}],24:[function(t,e){for(var o=[],r=0;r<256;++r)o[r]=(r+256).toString(16).substr(1);e.exports=function(t,e){var r=e||0,n=o;return n[t[r++]]+n[t[r++]]+n[t[r++]]+n[t[r++]]+"-"+n[t[r++]]+n[t[r++]]+"-"+n[t[r++]]+n[t[r++]]+"-"+n[t[r++]]+n[t[r++]]+"-"+n[t[r++]]+n[t[r++]]+n[t[r++]]+n[t[r++]]+n[t[r++]]+n[t[r++]]}},{}],25:[function(t,e){var r="undefined"!=typeof crypto&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&msCrypto.getRandomValues.bind(msCrypto);if(r){var n=new Uint8Array(16);e.exports=function(){return r(n),n}}else{var o=new Array(16);e.exports=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),o[e]=t>>>((3&e)<<3)&255;return o}}},{}],26:[function(t,e){var d,y,g=t("./lib/rng"),m=t("./lib/bytesToUuid"),b=0,v=0;e.exports=function(t,e,r){var n=e&&r||0,o=e||[],i=(t=t||{}).node||d,s=void 0!==t.clockseq?t.clockseq:y;if(null==i||null==s){var a=g();null==i&&(i=d=[1|a[0],a[1],a[2],a[3],a[4],a[5]]),null==s&&(s=y=16383&(a[6]<<8|a[7]))}var c=void 0!==t.msecs?t.msecs:(new Date).getTime(),u=void 0!==t.nsecs?t.nsecs:v+1,h=c-b+(u-v)/1e4;if(h<0&&void 0===t.clockseq&&(s=s+1&16383),(h<0||b>>24&255,o[n++]=p>>>16&255,o[n++]=p>>>8&255,o[n++]=255&p;var l=c/4294967296*1e4&268435455;o[n++]=l>>>8&255,o[n++]=255&l,o[n++]=l>>>24&15|16,o[n++]=l>>>16&255,o[n++]=s>>>8|128,o[n++]=255&s;for(var f=0;f<6;++f)o[n+f]=i[f];return e||m(o)}},{"./lib/bytesToUuid":24,"./lib/rng":25}],27:[function(t,e){var s=t("./lib/rng"),a=t("./lib/bytesToUuid");e.exports=function(t,e,r){var n=e&&r||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var o=(t=t||{}).random||(t.rng||s)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var i=0;i<16;++i)e[n+i]=o[i];return e||a(o)}},{"./lib/bytesToUuid":24,"./lib/rng":25}]},{},[1])(1)}); \ No newline at end of file +!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).socketCluster=t()}}(function(){return function i(s,a,c){function u(e,t){if(!a[e]){if(!s[e]){var r="function"==typeof require&&require;if(!t&&r)return r(e,!0);if(h)return h(e,!0);var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}var o=a[e]={exports:{}};s[e][0].call(o.exports,function(t){return u(s[e][1][t]||t)},o,o.exports,i,s,a,c)}return a[e].exports}for(var h="function"==typeof require&&require,t=0;tr)throw new f("The "+t+" value provided exceeded the maximum amount allowed")};if(n("connectTimeout"),n("ackTimeout"),this._localEvents={connect:1,connectAbort:1,close:1,disconnect:1,message:1,error:1,raw:1,kickOut:1,subscribe:1,unsubscribe:1,subscribeStateChange:1,authStateChange:1,authenticate:1,deauthenticate:1,removeAuthToken:1,subscribeRequest:1},this.connectAttempts=0,this._emitBuffer=new p,this.channels={},this.options=t,this._cid=1,this.options.callIdGenerator=function(){return e._cid++},this.options.autoReconnect){null==this.options.autoReconnectOptions&&(this.options.autoReconnectOptions={});var o=this.options.autoReconnectOptions;null==o.initialDelay&&(o.initialDelay=1e4),null==o.randomness&&(o.randomness=1e4),null==o.multiplier&&(o.multiplier=1.5),null==o.maxDelay&&(o.maxDelay=6e4)}if(null==this.options.subscriptionRetryOptions&&(this.options.subscriptionRetryOptions={}),this.options.authEngine?this.auth=this.options.authEngine:this.auth=new c,this.options.codecEngine?this.codec=this.options.codecEngine:this.codec=u,this.options.protocol){var i=new f('The "protocol" option does not affect socketcluster-client. If you want to utilize SSL/TLS - use "secure" option instead');this._onSCError(i)}this.options.path=this.options.path.replace(/\/$/,"")+"/",this.options.query=t.query||{},"string"==typeof this.options.query&&(this.options.query=h.parse(this.options.query)),this._channelEmitter=new a,this._unloadHandler=function(){e.disconnect()},g&&this.disconnectOnUnload&&s.addEventListener&&s.addEventListener("beforeunload",this._unloadHandler,!1),(this._clientMap[this.clientId]=this).options.autoConnect&&this.connect()};b.prototype=Object.create(a.prototype),b.CONNECTING=b.prototype.CONNECTING=e.prototype.CONNECTING,b.OPEN=b.prototype.OPEN=e.prototype.OPEN,b.CLOSED=b.prototype.CLOSED=e.prototype.CLOSED,b.AUTHENTICATED=b.prototype.AUTHENTICATED="authenticated",b.UNAUTHENTICATED=b.prototype.UNAUTHENTICATED="unauthenticated",b.PENDING=b.prototype.PENDING="pending",b.ignoreStatuses=i.socketProtocolIgnoreStatuses,b.errorStatuses=i.socketProtocolErrorStatuses,b.prototype._privateEventHandlerMap={"#publish":function(t){var e=this._undecorateChannelName(t.channel);this.isSubscribed(e,!0)&&this._channelEmitter.emit(e,t.data)},"#kickOut":function(t){var e=this._undecorateChannelName(t.channel),r=this.channels[e];r&&(a.prototype.emit.call(this,"kickOut",t.message,e),r.emit("kickOut",t.message,e),this._triggerChannelUnsubscribe(r))},"#setAuthToken":function(e,r){var n=this;if(e){this.auth.saveToken(this.authTokenName,e.token,{},function(t){t?(r.error(t),n._onSCError(t)):(n._changeToAuthenticatedState(e.token),r.end())})}else r.error(new t("No token data provided by #setAuthToken event"))},"#removeAuthToken":function(t,r){var n=this;this.auth.removeToken(this.authTokenName,function(t,e){t?(r.error(t),n._onSCError(t)):(a.prototype.emit.call(n,"removeAuthToken",e),n._changeToUnauthenticatedStateAndClearTokens(),r.end())})},"#disconnect":function(t){this.transport.close(t.code,t.data)}},b.prototype.getState=function(){return this.state},b.prototype.getBytesReceived=function(){return this.transport.getBytesReceived()},b.prototype.deauthenticate=function(r){var n=this;this.auth.removeToken(this.authTokenName,function(t,e){t?n._onSCError(t):(a.prototype.emit.call(n,"removeAuthToken",e),n.state!==n.CLOSED&&n.emit("#removeAuthToken"),n._changeToUnauthenticatedStateAndClearTokens()),r&&r(t)})},b.prototype.connect=b.prototype.open=function(){var n=this;if(this.active)this.state===this.CLOSED&&(this.pendingReconnect=!1,this.pendingReconnectTimeout=null,clearTimeout(this._reconnectTimeoutRef),this.state=this.CONNECTING,a.prototype.emit.call(this,"connecting"),this.transport&&this.transport.off(),this.transport=new e(this.auth,this.codec,this.options),this.transport.on("open",function(t){n.state=n.OPEN,n._onSCOpen(t)}),this.transport.on("error",function(t){n._onSCError(t)}),this.transport.on("close",function(t,e){n.state=n.CLOSED,n._onSCClose(t,e)}),this.transport.on("openAbort",function(t,e){n.state=n.CLOSED,n._onSCClose(t,e,!0)}),this.transport.on("event",function(t,e,r){n._onSCEvent(t,e,r)}));else{var t=new o("Cannot connect a destroyed client");this._onSCError(t)}},b.prototype.reconnect=function(t,e){this.disconnect(t,e),this.connect()},b.prototype.disconnect=function(t,e){if("number"!=typeof(t=t||1e3))throw new f("If specified, the code argument must be a number");this.state===this.OPEN||this.state===this.CONNECTING?this.transport.close(t,e):(this.pendingReconnect=!1,this.pendingReconnectTimeout=null,clearTimeout(this._reconnectTimeoutRef))},b.prototype.destroy=function(t,e){g&&s.removeEventListener&&s.removeEventListener("beforeunload",this._unloadHandler,!1),this.active=!1,this.disconnect(t,e),delete this._clientMap[this.clientId]},b.prototype._changeToUnauthenticatedStateAndClearTokens=function(){if(this.authState!==this.UNAUTHENTICATED){var t=this.authState,e=this.signedAuthToken;this.authState=this.UNAUTHENTICATED,this.signedAuthToken=null,this.authToken=null;var r={oldState:t,newState:this.authState};a.prototype.emit.call(this,"authStateChange",r),a.prototype.emit.call(this,"deauthenticate",e)}},b.prototype._changeToAuthenticatedState=function(t){if(this.signedAuthToken=t,this.authToken=this._extractAuthTokenData(t),this.authState!==this.AUTHENTICATED){var e=this.authState;this.authState=this.AUTHENTICATED;var r={oldState:e,newState:this.authState,signedAuthToken:t,authToken:this.authToken};this.preparingPendingSubscriptions||this.processPendingSubscriptions(),a.prototype.emit.call(this,"authStateChange",r)}a.prototype.emit.call(this,"authenticate",t)},b.prototype.decodeBase64=function(t){return r.from(t,"base64").toString("utf8")},b.prototype.encodeBase64=function(t){return r.from(t,"utf8").toString("base64")},b.prototype._extractAuthTokenData=function(t){var e=(t||"").split(".")[1];if(null!=e){var r=e;try{return r=this.decodeBase64(r),JSON.parse(r)}catch(t){return r}}return null},b.prototype.getAuthToken=function(){return this.authToken},b.prototype.getSignedAuthToken=function(){return this.signedAuthToken},b.prototype.authenticate=function(r,n){var o=this;this.emit("#authenticate",r,function(t,e){e&&null!=e.isAuthenticated?e.authError&&(e.authError=i.hydrateError(e.authError)):e={isAuthenticated:o.authState,authError:null},t?("BadConnectionError"!==t.name&&"TimeoutError"!==t.name&&o._changeToUnauthenticatedStateAndClearTokens(),n&&n(t,e)):o.auth.saveToken(o.authTokenName,r,{},function(t){t&&o._onSCError(t),e.isAuthenticated?o._changeToAuthenticatedState(r):o._changeToUnauthenticatedStateAndClearTokens(),n&&n(t,e)})})},b.prototype._tryReconnect=function(t){var e,r=this,n=this.connectAttempts++,o=this.options.autoReconnectOptions;if(null==t||0o.maxDelay&&(e=o.maxDelay),clearTimeout(this._reconnectTimeoutRef),this.pendingReconnect=!0,this.pendingReconnectTimeout=e,this._reconnectTimeoutRef=setTimeout(function(){r.connect()},e)},b.prototype._onSCOpen=function(t){var e=this;this.preparingPendingSubscriptions=!0,t?(this.id=t.id,this.pingTimeout=t.pingTimeout,this.transport.pingTimeout=this.pingTimeout,t.isAuthenticated?this._changeToAuthenticatedState(t.authToken):this._changeToUnauthenticatedStateAndClearTokens()):this._changeToUnauthenticatedStateAndClearTokens(),this.connectAttempts=0,this.options.autoSubscribeOnConnect&&this.processPendingSubscriptions(),a.prototype.emit.call(this,"connect",t,function(){e.processPendingSubscriptions()}),this.state===this.OPEN&&this._flushEmitBuffer()},b.prototype._onSCError=function(t){var e=this;setTimeout(function(){if(e.listeners("error").length<1)throw t;a.prototype.emit.call(e,"error",t)},0)},b.prototype._suspendSubscriptions=function(){var t,e;for(var r in this.channels)this.channels.hasOwnProperty(r)&&(e=(t=this.channels[r]).state===t.SUBSCRIBED||t.state===t.PENDING?t.PENDING:t.UNSUBSCRIBED,this._triggerChannelUnsubscribe(t,e))},b.prototype._abortAllPendingEventsDueToBadConnection=function(t){for(var e,r=this._emitBuffer.head;r;){e=r.next;var n=r.data;clearTimeout(n.timeout),delete n.timeout,r.detach(),r=e;var o=n.callback;if(o){delete n.callback;var i="Event '"+n.event+"' was aborted due to a bad connection",s=new m(i,t);o.call(n,s,n)}n.cid&&this.transport.cancelPendingResponse(n.cid)}},b.prototype._onSCClose=function(t,e,r){if(this.id=null,this.transport&&this.transport.off(),this.pendingReconnect=!1,this.pendingReconnectTimeout=null,clearTimeout(this._reconnectTimeoutRef),this._suspendSubscriptions(),this._abortAllPendingEventsDueToBadConnection(r?"connectAbort":"disconnect"),this.options.autoReconnect&&(4e3===t||4001===t||1005===t?this._tryReconnect(0):1e3!==t&&t<4500&&this._tryReconnect()),r?a.prototype.emit.call(this,"connectAbort",t,e):a.prototype.emit.call(this,"disconnect",t,e),a.prototype.emit.call(this,"close",t,e),!b.ignoreStatuses[t]){var n;n=e?"Socket connection closed with status code "+t+" and reason: "+e:"Socket connection closed with status code "+t;var o=new d(b.errorStatuses[t]||n,t);this._onSCError(o)}},b.prototype._onSCEvent=function(t,e,r){var n=this._privateEventHandlerMap[t];n?n.call(this,e,r):a.prototype.emit.call(this,t,e,function(){r&&r.callback.apply(r,arguments)})},b.prototype.decode=function(t){return this.transport.decode(t)},b.prototype.encode=function(t){return this.transport.encode(t)},b.prototype._flushEmitBuffer=function(){for(var t,e=this._emitBuffer.head;e;){t=e.next;var r=e.data;e.detach(),this.transport.emitObject(r),e=t}},b.prototype._handleEventAckTimeout=function(t,e){e&&e.detach(),delete t.timeout;var r=t.callback;if(r){delete t.callback;var n=new y("Event response for '"+t.event+"' timed out");r.call(t,n,t)}t.cid&&this.transport.cancelPendingResponse(t.cid)},b.prototype._emit=function(t,e,r){var n=this;this.state===this.CLOSED&&this.connect();var o={event:t,callback:r},i=new p.Item;this.options.cloneData?o.data=l(e):o.data=e,(i.data=o).timeout=setTimeout(function(){n._handleEventAckTimeout(o,i)},this.ackTimeout),this._emitBuffer.append(i),this.state===this.OPEN&&this._flushEmitBuffer()},b.prototype.send=function(t){this.transport.send(t)},b.prototype.emit=function(t,e,r){if(null==this._localEvents[t])this._emit(t,e,r);else if("error"===t)a.prototype.emit.call(this,t,e);else{var n=new o('The "'+t+'" event is reserved and cannot be emitted on a client socket');this._onSCError(n)}},b.prototype.publish=function(t,e,r){var n={channel:this._decorateChannelName(t),data:e};this.emit("#publish",n,r)},b.prototype._triggerChannelSubscribe=function(t,e){var r=t.name;if(t.state!==t.SUBSCRIBED){var n=t.state;t.state=t.SUBSCRIBED;var o={channel:r,oldState:n,newState:t.state,subscriptionOptions:e};t.emit("subscribeStateChange",o),t.emit("subscribe",r,e),a.prototype.emit.call(this,"subscribeStateChange",o),a.prototype.emit.call(this,"subscribe",r,e)}},b.prototype._triggerChannelSubscribeFail=function(t,e,r){var n=e.name,o=!e.waitForAuth||this.authState===this.AUTHENTICATED;e.state!==e.UNSUBSCRIBED&&o&&(e.state=e.UNSUBSCRIBED,e.emit("subscribeFail",t,n,r),a.prototype.emit.call(this,"subscribeFail",t,n,r))},b.prototype._cancelPendingSubscribeCallback=function(t){null!=t._pendingSubscriptionCid&&(this.transport.cancelPendingResponse(t._pendingSubscriptionCid),delete t._pendingSubscriptionCid)},b.prototype._decorateChannelName=function(t){return this.channelPrefix&&(t=this.channelPrefix+t),t},b.prototype._undecorateChannelName=function(t){return this.channelPrefix&&0===t.indexOf(this.channelPrefix)?t.replace(this.channelPrefix,""):t},b.prototype._trySubscribe=function(e){var r=this,t=!e.waitForAuth||this.authState===this.AUTHENTICATED;if(this.state===this.OPEN&&!this.preparingPendingSubscriptions&&null==e._pendingSubscriptionCid&&t){var n={noTimeout:!0},o={channel:this._decorateChannelName(e.name)};e.waitForAuth&&(n.waitForAuth=!0,o.waitForAuth=n.waitForAuth),e.data&&(o.data=e.data),e.batch&&(n.batch=!0,o.batch=!0),e._pendingSubscriptionCid=this.transport.emit("#subscribe",o,n,function(t){delete e._pendingSubscriptionCid,t?r._triggerChannelSubscribeFail(t,e,o):r._triggerChannelSubscribe(e,o)}),a.prototype.emit.call(this,"subscribeRequest",e.name,o)}},b.prototype.subscribe=function(t,e){var r=this.channels[t];return r?e&&r.setOptions(e):(r=new n(t,this,e),this.channels[t]=r),r.state===r.UNSUBSCRIBED&&(r.state=r.PENDING,this._trySubscribe(r)),r},b.prototype._triggerChannelUnsubscribe=function(t,e){var r=t.name,n=t.state;if(t.state=e||t.UNSUBSCRIBED,this._cancelPendingSubscribeCallback(t),n===t.SUBSCRIBED){var o={channel:r,oldState:n,newState:t.state};t.emit("subscribeStateChange",o),t.emit("unsubscribe",r),a.prototype.emit.call(this,"subscribeStateChange",o),a.prototype.emit.call(this,"unsubscribe",r)}},b.prototype._tryUnsubscribe=function(t){if(this.state===this.OPEN){var e={noTimeout:!0};t.batch&&(e.batch=!0),this._cancelPendingSubscribeCallback(t);var r=this._decorateChannelName(t.name);this.transport.emit("#unsubscribe",r,e)}},b.prototype.unsubscribe=function(t){var e=this.channels[t];e&&e.state!==e.UNSUBSCRIBED&&(this._triggerChannelUnsubscribe(e),this._tryUnsubscribe(e))},b.prototype.channel=function(t,e){var r=this.channels[t];return r||(r=new n(t,this,e),this.channels[t]=r),r},b.prototype.destroyChannel=function(t){var e=this.channels[t];e&&(e.unwatch(),e.unsubscribe(),delete this.channels[t])},b.prototype.subscriptions=function(t){var e,r=[];for(var n in this.channels)this.channels.hasOwnProperty(n)&&(e=this.channels[n],(t?e&&(e.state===e.SUBSCRIBED||e.state===e.PENDING):e&&e.state===e.SUBSCRIBED)&&r.push(n));return r},b.prototype.isSubscribed=function(t,e){var r=this.channels[t];return e?!!r&&(r.state===r.SUBSCRIBED||r.state===r.PENDING):!!r&&r.state===r.SUBSCRIBED},b.prototype.processPendingSubscriptions=function(){var e=this;this.preparingPendingSubscriptions=!1;var t=[];for(var r in this.channels)if(this.channels.hasOwnProperty(r)){var n=this.channels[r];n.state===n.PENDING&&t.push(n)}t.sort(function(t,e){var r=t.priority||0,n=e.priority||0;return n>16&255,i[s++]=e>>8&255,i[s++]=255&e;var u,h;2===o&&(e=p[t.charCodeAt(c)]<<2|p[t.charCodeAt(c+1)]>>4,i[s++]=255&e);1===o&&(e=p[t.charCodeAt(c)]<<10|p[t.charCodeAt(c+1)]<<4|p[t.charCodeAt(c+2)]>>2,i[s++]=e>>8&255,i[s++]=255&e);return i},r.fromByteArray=function(t){for(var e,r=t.length,n=r%3,o=[],i=0,s=r-n;i>2]+a[e<<4&63]+"==")):2===n&&(e=(t[r-2]<<8)+t[r-1],o.push(a[e>>10]+a[e>>4&63]+a[e<<2&63]+"="));return o.join("")};for(var a=[],p=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,i=n.length;o>18&63]+a[o>>12&63]+a[o>>6&63]+a[63&o]);return i.join("")}p["-".charCodeAt(0)]=62,p["_".charCodeAt(0)]=63},{}],9:[function(t,e,D){(function(p){"use strict";var n=t("base64-js"),i=t("ieee754");D.Buffer=p,D.SlowBuffer=function(t){+t!=t&&(t=0);return p.alloc(+t)},D.INSPECT_MAX_BYTES=50;var r=2147483647;function s(t){if(r>>1;case"base64":return U(t).length;default:if(o)return n?-1:N(t).length;e=(""+e).toLowerCase(),o=!0}}function f(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function d(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):2147483647=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=p.from(e,n)),p.isBuffer(e))return 0===e.length?-1:y(t,e,r,n,o);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):y(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function y(t,e,r,n,o){var i,s=1,a=t.length,c=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a/=s=2,c/=2,r/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(o){var h=-1;for(i=r;i>>10&1023|55296),h=56320|1023&h),n.push(h),o+=p}return function(t){var e=t.length;if(e<=E)return String.fromCharCode.apply(String,t);var r="",n=0;for(;nthis.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return S(this,e,r);case"utf8":case"utf-8":return v(this,e,r);case"ascii":return w(this,e,r);case"latin1":case"binary":return T(this,e,r);case"base64":return b(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},p.prototype.equals=function(t){if(!p.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===p.compare(this,t)},p.prototype.inspect=function(){var t="",e=D.INSPECT_MAX_BYTES;return t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(t+=" ... "),""},p.prototype.compare=function(t,e,r,n,o){if(R(t,Uint8Array)&&(t=p.from(t,t.offset,t.byteLength)),!p.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(o<=n&&r<=e)return 0;if(o<=n)return-1;if(r<=e)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(i,s),c=this.slice(n,o),u=t.slice(e,r),h=0;h>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-e;if((void 0===r||othis.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i,s,a,c,u,h,p,l,f,d=!1;;)switch(n){case"hex":return m(this,t,e,r);case"utf8":case"utf-8":return l=e,f=r,x(N(t,(p=this).length-l),p,l,f);case"ascii":return g(this,t,e,r);case"latin1":case"binary":return g(this,t,e,r);case"base64":return c=this,u=e,h=r,x(U(t),c,u,h);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return s=e,a=r,x(function(t,e){for(var r,n,o,i=[],s=0;s>8,o=r%256,i.push(o),i.push(n);return i}(t,(i=this).length-s),i,s,a);default:if(d)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),d=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var E=4096;function w(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;ot.length)throw new RangeError("Index out of range")}function A(t,e,r,n){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function O(t,e,r,n,o){return e=+e,r>>>=0,o||A(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function B(t,e,r,n,o){return e=+e,r>>>=0,o||A(t,0,r,8),i.write(t,e,r,n,52,8),r+8}p.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):r>>=0,e>>>=0,r||_(t,e,this.length);for(var n=this[t],o=1,i=0;++i>>=0,e>>>=0,r||_(t,e,this.length);for(var n=this[t+--e],o=1;0>>=0,e||_(t,1,this.length),this[t]},p.prototype.readUInt16LE=function(t,e){return t>>>=0,e||_(t,2,this.length),this[t]|this[t+1]<<8},p.prototype.readUInt16BE=function(t,e){return t>>>=0,e||_(t,2,this.length),this[t]<<8|this[t+1]},p.prototype.readUInt32LE=function(t,e){return t>>>=0,e||_(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},p.prototype.readUInt32BE=function(t,e){return t>>>=0,e||_(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},p.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||_(t,e,this.length);for(var n=this[t],o=1,i=0;++i>>=0,e>>>=0,r||_(t,e,this.length);for(var n=e,o=1,i=this[t+--n];0>>=0,e||_(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},p.prototype.readInt16LE=function(t,e){t>>>=0,e||_(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},p.prototype.readInt16BE=function(t,e){t>>>=0,e||_(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},p.prototype.readInt32LE=function(t,e){return t>>>=0,e||_(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},p.prototype.readInt32BE=function(t,e){return t>>>=0,e||_(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},p.prototype.readFloatLE=function(t,e){return t>>>=0,e||_(t,4,this.length),i.read(this,t,!0,23,4)},p.prototype.readFloatBE=function(t,e){return t>>>=0,e||_(t,4,this.length),i.read(this,t,!1,23,4)},p.prototype.readDoubleLE=function(t,e){return t>>>=0,e||_(t,8,this.length),i.read(this,t,!0,52,8)},p.prototype.readDoubleBE=function(t,e){return t>>>=0,e||_(t,8,this.length),i.read(this,t,!1,52,8)},p.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||C(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[e]=255&t;++i>>=0,r>>>=0,n)||C(this,t,e,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[e+o]=255&t;0<=--o&&(i*=256);)this[e+o]=t/i&255;return e+r},p.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,1,255,0),this[e]=255&t,e+1},p.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},p.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},p.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},p.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},p.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var o=Math.pow(2,8*r-1);C(this,t,e,r,o-1,-o)}var i=0,s=1,a=0;for(this[e]=255&t;++i>0)-a&255;return e+r},p.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var o=Math.pow(2,8*r-1);C(this,t,e,r,o-1,-o)}var i=r-1,s=1,a=0;for(this[e+i]=255&t;0<=--i&&(s*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/s>>0)-a&255;return e+r},p.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},p.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},p.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},p.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},p.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},p.prototype.writeFloatLE=function(t,e,r){return O(this,t,e,!0,r)},p.prototype.writeFloatBE=function(t,e,r){return O(this,t,e,!1,r)},p.prototype.writeDoubleLE=function(t,e,r){return B(this,t,e,!0,r)},p.prototype.writeDoubleBE=function(t,e,r){return B(this,t,e,!1,r)},p.prototype.copy=function(t,e,r,n){if(!p.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),0=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function U(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(e,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function x(t,e,r,n){for(var o=0;o=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function R(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function P(t){return t!=t}}).call(this,t("buffer").Buffer)},{"base64-js":8,buffer:9,ieee754:12}],10:[function(t,e){(function(k){var t=function(){"use strict";function b(t,e){return null!=e&&t instanceof e}var v,E,w;try{v=Map}catch(t){v=function(){}}try{E=Set}catch(t){E=function(){}}try{w=Promise}catch(t){w=function(){}}function T(t,f,e,d,y){"object"==typeof f&&(e=f.depth,d=f.prototype,y=f.includeNonEnumerable,f=f.circular);var m=[],g=[];return void 0===f&&(f=!0),void 0===e&&(e=1/0),function o(t,i){if(null===t)return null;if(0===i)return t;var s,e;if("object"!=typeof t)return t;if(b(t,v))s=new v;else if(b(t,E))s=new E;else if(b(t,w))s=new w(function(e,r){t.then(function(t){e(o(t,i-1))},function(t){r(o(t,i-1))})});else if(T.__isArray(t))s=[];else if(T.__isRegExp(t))s=new RegExp(t.source,S(t)),t.lastIndex&&(s.lastIndex=t.lastIndex);else if(T.__isDate(t))s=new Date(t.getTime());else{if(void 0!==k&&k.isBuffer(t))return s=new k(t.length),t.copy(s),s;b(t,Error)?s=Object.create(t):void 0===d?(e=Object.getPrototypeOf(t),s=Object.create(e)):(s=Object.create(d),e=d)}if(f){var r=m.indexOf(t);if(-1!=r)return g[r];m.push(t),g.push(s)}for(var n in b(t,v)&&t.forEach(function(t,e){var r=o(e,i-1),n=o(t,i-1);s.set(r,n)}),b(t,E)&&t.forEach(function(t){var e=o(t,i-1);s.add(e)}),t){var a;e&&(a=Object.getOwnPropertyDescriptor(e,n)),a&&null==a.set||(s[n]=o(t[n],i-1))}if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(t);for(n=0;n>1,h=-7,p=r?o-1:0,l=r?-1:1,f=t[e+p];for(p+=l,i=f&(1<<-h)-1,f>>=-h,h+=a;0>=-h,h+=n;0>1,l=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:i-1,d=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),2<=(e+=1<=s+p?l/c:l*Math.pow(2,1-p))*c&&(s++,c/=2),h<=s+p?(a=0,s=h):1<=s+p?(a=(e*c-1)*Math.pow(2,o),s+=p):(a=e*Math.pow(2,p-1)*Math.pow(2,o),s=0));8<=o;t[r+f]=255&a,f+=d,a/=256,o-=8);for(s=s<>2],n+=i[(3&e[o])<<4|e[o+1]>>4],n+=i[(15&e[o+1])<<2|e[o+2]>>6],n+=i[63&e[o+2]];return r%3==2?n=n.substring(0,n.length-1)+"=":r%3==1&&(n=n.substring(0,n.length-2)+"=="),n}(e)};if(r.Buffer){if(e instanceof r.Buffer)return{base64:!0,data:e.toString("base64")};if(e&&"Buffer"===e.type&&Array.isArray(e.data))return{base64:!0,data:(r.Buffer.from?r.Buffer.from(e.data):new r.Buffer(e.data)).toString("base64")}}return e};o.exports.decode=function(t){if(null==t)return null;if("#1"===t||"#2"===t)return t;var e=t.toString();if(!n.test(e))return e;try{return JSON.parse(e)}catch(t){}return e},o.exports.encode=function(t){return"#1"===t||"#2"===t?t:JSON.stringify(t,e)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],22:[function(t,e){var r=t("./v1"),n=t("./v4"),o=n;o.v1=r,o.v4=n,e.exports=o},{"./v1":25,"./v4":26}],23:[function(t,e){for(var o=[],r=0;r<256;++r)o[r]=(r+256).toString(16).substr(1);e.exports=function(t,e){var r=e||0,n=o;return n[t[r++]]+n[t[r++]]+n[t[r++]]+n[t[r++]]+"-"+n[t[r++]]+n[t[r++]]+"-"+n[t[r++]]+n[t[r++]]+"-"+n[t[r++]]+n[t[r++]]+"-"+n[t[r++]]+n[t[r++]]+n[t[r++]]+n[t[r++]]+n[t[r++]]+n[t[r++]]}},{}],24:[function(t,e){var r="undefined"!=typeof crypto&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&msCrypto.getRandomValues.bind(msCrypto);if(r){var n=new Uint8Array(16);e.exports=function(){return r(n),n}}else{var o=new Array(16);e.exports=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),o[e]=t>>>((3&e)<<3)&255;return o}}},{}],25:[function(t,e){var d,y,m=t("./lib/rng"),g=t("./lib/bytesToUuid"),b=0,v=0;e.exports=function(t,e,r){var n=e&&r||0,o=e||[],i=(t=t||{}).node||d,s=void 0!==t.clockseq?t.clockseq:y;if(null==i||null==s){var a=m();null==i&&(i=d=[1|a[0],a[1],a[2],a[3],a[4],a[5]]),null==s&&(s=y=16383&(a[6]<<8|a[7]))}var c=void 0!==t.msecs?t.msecs:(new Date).getTime(),u=void 0!==t.nsecs?t.nsecs:v+1,h=c-b+(u-v)/1e4;if(h<0&&void 0===t.clockseq&&(s=s+1&16383),(h<0||b>>24&255,o[n++]=p>>>16&255,o[n++]=p>>>8&255,o[n++]=255&p;var l=c/4294967296*1e4&268435455;o[n++]=l>>>8&255,o[n++]=255&l,o[n++]=l>>>24&15|16,o[n++]=l>>>16&255,o[n++]=s>>>8|128,o[n++]=255&s;for(var f=0;f<6;++f)o[n+f]=i[f];return e||g(o)}},{"./lib/bytesToUuid":23,"./lib/rng":24}],26:[function(t,e){var s=t("./lib/rng"),a=t("./lib/bytesToUuid");e.exports=function(t,e,r){var n=e&&r||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var o=(t=t||{}).random||(t.rng||s)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var i=0;i<16;++i)e[n+i]=o[i];return e||a(o)}},{"./lib/bytesToUuid":23,"./lib/rng":24}]},{},[1])(1)}); \ No newline at end of file