diff --git a/.gitignore b/.gitignore
index 345ebd3..f2f81a8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,4 +3,18 @@ components
npm-debug.log
build
dist
-.idea
\ No newline at end of file
+.DS_Store
+*.crt
+*.key
+amplitude.js
+amplitude.esm.js
+amplitude.min.js
+amplitude.nocompat.js
+amplitude.nocompat.min.js
+amplitude-snippet.min.js
+amplitude.native.js
+amplitude-segment-snippet.min.js
+.watchmanconfig
+package-lock.json
+amplitude.umd.js
+amplitude.umd.min.js
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
new file mode 100644
index 0000000..79ee123
--- /dev/null
+++ b/.idea/codeStyles/codeStyleConfig.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644
index 0000000..96cc43e
--- /dev/null
+++ b/.idea/compiler.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
new file mode 100644
index 0000000..e7bedf3
--- /dev/null
+++ b/.idea/copyright/profiles_settings.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
new file mode 100644
index 0000000..15a15b2
--- /dev/null
+++ b/.idea/encodings.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/.idea/jsLibraryMappings.xml b/.idea/jsLibraryMappings.xml
new file mode 100644
index 0000000..b8387eb
--- /dev/null
+++ b/.idea/jsLibraryMappings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/markdown-navigator.xml b/.idea/markdown-navigator.xml
new file mode 100644
index 0000000..08a415f
--- /dev/null
+++ b/.idea/markdown-navigator.xml
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/markdown-navigator/profiles_settings.xml b/.idea/markdown-navigator/profiles_settings.xml
new file mode 100644
index 0000000..57927c5
--- /dev/null
+++ b/.idea/markdown-navigator/profiles_settings.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..bd08941
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..d1c816f
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/rakam-javascript.iml b/.idea/rakam-javascript.iml
new file mode 100644
index 0000000..c3407a6
--- /dev/null
+++ b/.idea/rakam-javascript.iml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
new file mode 100644
index 0000000..d69059f
--- /dev/null
+++ b/.idea/workspace.xml
@@ -0,0 +1,469 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ project
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1464825348026
+
+
+ 1464825348026
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.jshintrc b/.jshintrc
index 730df60..c572280 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -1,3 +1,4 @@
+
{
// JSHint Default Configuration File (as on JSHint website)
// See http://jshint.com/docs/ for more details
@@ -21,10 +22,10 @@
"nonew" : true, // true: Prohibit use of constructors for side-effects (without assignment)
"plusplus" : false, // true: Prohibit use of `++` & `--`
"quotmark" : false, // Quotation mark consistency:
- // false : do nothing (default)
- // true : ensure whatever is used is consistent
- // "single" : require single quotes
- // "double" : require double quotes
+ // false : do nothing (default)
+ // true : ensure whatever is used is consistent
+ // "single" : require single quotes
+ // "double" : require double quotes
"undef" : true, // true: Require all non-global variables to be declared (prevents global leaks)
"unused" : true, // true: Require all defined variables be used
"strict" : false, // true: Requires all functions run in ES5 Strict Mode
@@ -35,14 +36,14 @@
"maxlen" : false, // {int} Max number of characters per line
// Relaxing
- "asi" : false, // true: Tolerate Automatic Semicolon Insertion (no semicolons)
+ "asi" : true, // true: Tolerate Automatic Semicolon Insertion (no semicolons)
"boss" : false, // true: Tolerate assignments where comparisons would be expected
"debug" : false, // true: Allow debugger statements e.g. browser breakpoints.
"eqnull" : false, // true: Tolerate use of `== null`
"es5" : false, // true: Allow ES5 syntax (ex: getters and setters)
"esnext" : false, // true: Allow ES.next (ES6) syntax (ex: `const`)
"moz" : false, // true: Allow Mozilla specific syntax (extends and overrides esnext features)
- // (ex: `for each`, multiple try/catch, function expression…)
+ // (ex: `for each`, multiple try/catch, function expression…)
"evil" : false, // true: Tolerate use of `eval` and `new Function()`
"expr" : false, // true: Tolerate `ExpressionStatement` as Programs
"funcscope" : false, // true: Tolerate defining variables inside control statements
@@ -67,6 +68,7 @@
"browserify" : false, // Browserify (node.js code in the browser)
"couch" : false, // CouchDB
"devel" : true, // Development/debugging (alert, confirm, etc)
+ "esversion" : 9, // Support ES version 9 syntax
"dojo" : false, // Dojo Toolkit
"jasmine" : false, // Jasmine
"jquery" : false, // jQuery
@@ -83,5 +85,11 @@
"yui" : false, // Yahoo User Interface
// Custom Globals
- "globals" : {} // additional predefined global variables
-}
\ No newline at end of file
+ "globals" : { // additional predefined global variables
+ "BUILD_COMPAT_2_0": true,
+ "BUILD_COMPAT_SNIPPET": true,
+ "BUILD_COMPAT_LOCAL_STORAGE": true,
+ "BUILD_COMPAT_REACT_NATIVE": true,
+ "assert": true
+ }
+}
diff --git a/Makefile b/Makefile
index 0be812f..c6a6c3b 100644
--- a/Makefile
+++ b/Makefile
@@ -2,8 +2,8 @@ SRC = $(wildcard src/*.js)
SNIPPET = src/rakam-snippet.js
TESTS = $(wildcard test/*.js)
BINS = node_modules/.bin
-DUO = $(BINS)/duo
MINIFY = $(BINS)/uglifyjs
+JSDOC = $(BINS)/jsdoc
JSHINT = $(BINS)/jshint
BUILD_DIR = build
PROJECT = rakam
@@ -12,6 +12,8 @@ SNIPPET_OUT = $(PROJECT)-snippet.min.js
SEGMENT_SNIPPET_OUT = $(PROJECT)-segment-snippet.min.js
MIN_OUT = $(PROJECT).min.js
MOCHA = $(BINS)/mocha-phantomjs
+KARMA = $(BINS)/karma
+ROLLUP = $(BINS)/rollup
#
# Default target.
@@ -24,7 +26,6 @@ default: test
#
clean:
- @-rm -rf components
@-rm -f rakam.js rakam.min.js
@-rm -rf node_modules npm-debug.log
@@ -33,9 +34,11 @@ clean:
# Test.
#
-test: build test/browser/index.html
- @$(MOCHA) test/browser/index.html
- @$(MOCHA) test/browser/snippet.html
+test: build
+ @$(KARMA) start karma.conf.js
+
+test-sauce: build
+ @$(KARMA) start karma.conf.js --browsers sauce_chrome_windows
#
@@ -43,12 +46,12 @@ test: build test/browser/index.html
#
node_modules: package.json
- @npm install
+ @yarn
#
# Target for updating version.
-version: component.json package.json src/version.js
+version: package.json
node scripts/version
#
@@ -61,30 +64,38 @@ README.md: $(SNIPPET_OUT) version
# Target for `rakam.js` file.
#
-$(OUT): node_modules $(SRC) version
+$(OUT): node_modules $(SRC) package.json rollup.config.js rollup.min.js rollup.native.js rollup.esm.js rollup.umd.js rollup.umd.min.js
@$(JSHINT) --verbose $(SRC)
- @$(DUO) --standalone rakam src/index.js > $(OUT)
- @$(MINIFY) $(OUT) --output $(MIN_OUT)
+ @NODE_ENV=production $(ROLLUP) --config rollup.config.js
+ @NODE_ENV=production $(ROLLUP) --config rollup.esm.js
+ @NODE_ENV=production $(ROLLUP) --config rollup.umd.js
+ @NODE_ENV=production $(ROLLUP) --config rollup.native.js
+ @NODE_ENV=production $(ROLLUP) --config rollup.nocompat.js
+ @NODE_ENV=production $(ROLLUP) --config rollup.umd.min.js
+ @NODE_ENV=production $(ROLLUP) --config rollup.min.js
+ @NODE_ENV=production $(ROLLUP) --config rollup.nocompat.min.js
#
# Target for minified `rakam-snippet.js` file.
#
-$(SNIPPET_OUT): $(SRC) $(SNIPPET) version
+$(SNIPPET_OUT): $(SRC) $(SNIPPET)
@$(JSHINT) --verbose $(SNIPPET)
@$(MINIFY) $(SNIPPET) -m -b max-line-len=80,beautify=false | awk 'NF' > $(SNIPPET_OUT)
-$(SEGMENT_SNIPPET_OUT): $(SRC) $(SNIPPET) version
+$(SEGMENT_SNIPPET_OUT): $(SRC) $(SNIPPET)
@grep -Ev "\ba?s\b" $(SNIPPET) | $(MINIFY) -m -b max-line-len=80,beautify=false - \
| awk 'NF' > $(SEGMENT_SNIPPET_OUT)
#
# Target for `tests-build.js` file.
-
#
-build: $(TESTS) $(OUT) $(SNIPPET_OUT) $(SEGMENT_SNIPPET_OUT) README.md
- @-mkdir -p build
- @$(DUO) --development test/tests.js > build/tests.js
+build: $(TESTS) $(OUT) $(SNIPPET_OUT) $(SEGMENT_SNIPPET_OUT)
+ @$(ROLLUP) --config rollup.test.js
+ @$(ROLLUP) --config rollup.snippet-tests.js
+
+docs:
+ @$(JSDOC) -d ./documentation/ src/*.js
#
# Target for release.
diff --git a/component.json b/component.json
deleted file mode 100644
index 42b30e7..0000000
--- a/component.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "name": "rakam-js",
- "main": "src/index.js",
- "repo": "rakam/rakam-javascript",
- "description": "Javascript library for Rakam Analytics",
- "keywords": [
- "analytics",
- "rakam"
- ],
- "dependencies": {
- "segmentio/top-domain": "1.0.0"
- },
- "version": "2.6.0"
-}
diff --git a/karma.conf.js b/karma.conf.js
new file mode 100644
index 0000000..c3d1bd3
--- /dev/null
+++ b/karma.conf.js
@@ -0,0 +1,54 @@
+module.exports = function(config) {
+ const customLaunchers = {
+ sauce_ie_8: {
+ base: 'SauceLabs',
+ browserName: 'internet explorer',
+ platform: 'Windows 7',
+ version: '8'
+ },
+ sauce_ie9: {
+ base: 'SauceLabs',
+ browserName: 'internet explorer',
+ platform: 'Windows 7',
+ version: '9.0'
+ },
+ sauce_edge: {
+ base: 'SauceLabs',
+ browserName: 'MicrosoftEdge',
+ platform: 'Windows 10',
+ },
+ sauce_chrome_windows: {
+ base: 'SauceLabs',
+ browserName: 'chrome',
+ platform: 'Windows 10',
+ },
+ sauce_safari_sierra: {
+ base: 'SauceLabs',
+ browserName: 'safari',
+ platform: 'macOS 10.12',
+ },
+ };
+
+ config.set({
+ sauceLabs: {
+ testName: 'Rakam JavaScript SDK',
+ },
+ preprocessors: {
+ '**/*.js': ['sourcemap']
+ },
+ frameworks: ['mocha', 'chai'],
+ files: ['rakam-snippet.min.js', 'build/snippet-tests.js', 'build/tests.js'],
+ reporters: ['mocha', 'saucelabs'],
+ port: 9876, // karma web server port
+ colors: true,
+ logLevel: config.LOG_INFO,
+ customLaunchers,
+ captureTimeout: 120000,
+ browsers: ['ChromeHeadless'],
+ // browsers: ['sauce_chrome_windows', 'sauce_edge', 'sauce_safari_sierra'],
+ autoWatch: false,
+ singleRun: true,
+ // singleRun: false, // Karma captures browsers, runs the tests and exits
+ concurrency: 4,
+ })
+}
diff --git a/package-lock.json b/package-lock.json
index 4be825b..2aac5f1 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -4,277 +4,1311 @@
"lockfileVersion": 1,
"requires": true,
"dependencies": {
- "@semantic-release/commit-analyzer": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/@semantic-release/commit-analyzer/-/commit-analyzer-2.0.0.tgz",
- "integrity": "sha1-kk0eLDAWfGpHK+2fZu6Pjgd0ibI=",
+ "@babel/code-frame": {
+ "version": "7.10.3",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.3.tgz",
+ "integrity": "sha512-fDx9eNW0qz0WkUeqL6tXEXzVlPh6Y5aCDEZesl0xBGA8ndRukX91Uk44ZqnkECp01NAZUdCAl+aiQNGi0k88Eg==",
+ "dev": true,
+ "requires": {
+ "@babel/highlight": "^7.10.3"
+ }
+ },
+ "@babel/compat-data": {
+ "version": "7.10.3",
+ "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.10.3.tgz",
+ "integrity": "sha512-BDIfJ9uNZuI0LajPfoYV28lX8kyCPMHY6uY4WH1lJdcicmAfxCK5ASzaeV0D/wsUaRH/cLk+amuxtC37sZ8TUg==",
+ "dev": true,
+ "requires": {
+ "browserslist": "^4.12.0",
+ "invariant": "^2.2.4",
+ "semver": "^5.5.0"
+ },
+ "dependencies": {
+ "semver": {
+ "version": "5.7.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
+ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
+ "dev": true
+ }
+ }
+ },
+ "@babel/core": {
+ "version": "7.10.3",
+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.10.3.tgz",
+ "integrity": "sha512-5YqWxYE3pyhIi84L84YcwjeEgS+fa7ZjK6IBVGTjDVfm64njkR2lfDhVR5OudLk8x2GK59YoSyVv+L/03k1q9w==",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "^7.10.3",
+ "@babel/generator": "^7.10.3",
+ "@babel/helper-module-transforms": "^7.10.1",
+ "@babel/helpers": "^7.10.1",
+ "@babel/parser": "^7.10.3",
+ "@babel/template": "^7.10.3",
+ "@babel/traverse": "^7.10.3",
+ "@babel/types": "^7.10.3",
+ "convert-source-map": "^1.7.0",
+ "debug": "^4.1.0",
+ "gensync": "^1.0.0-beta.1",
+ "json5": "^2.1.2",
+ "lodash": "^4.17.13",
+ "resolve": "^1.3.2",
+ "semver": "^5.4.1",
+ "source-map": "^0.5.0"
+ },
+ "dependencies": {
+ "convert-source-map": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz",
+ "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==",
+ "dev": true,
+ "requires": {
+ "safe-buffer": "~5.1.1"
+ }
+ },
+ "debug": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
+ "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
+ "dev": true,
+ "requires": {
+ "ms": "^2.1.1"
+ }
+ },
+ "lodash": {
+ "version": "4.17.15",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
+ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
+ "dev": true
+ },
+ "ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "dev": true
+ }
+ }
+ },
+ "@babel/generator": {
+ "version": "7.10.3",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.10.3.tgz",
+ "integrity": "sha512-drt8MUHbEqRzNR0xnF8nMehbY11b1SDkRw03PSNH/3Rb2Z35oxkddVSi3rcaak0YJQ86PCuE7Qx1jSFhbLNBMA==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.10.3",
+ "jsesc": "^2.5.1",
+ "lodash": "^4.17.13",
+ "source-map": "^0.5.0"
+ },
+ "dependencies": {
+ "lodash": {
+ "version": "4.17.15",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
+ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
+ "dev": true
+ }
+ }
+ },
+ "@babel/helper-annotate-as-pure": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.1.tgz",
+ "integrity": "sha512-ewp3rvJEwLaHgyWGe4wQssC2vjks3E80WiUe2BpMb0KhreTjMROCbxXcEovTrbeGVdQct5VjQfrv9EgC+xMzCw==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.10.1"
+ }
+ },
+ "@babel/helper-builder-binary-assignment-operator-visitor": {
+ "version": "7.10.3",
+ "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.10.3.tgz",
+ "integrity": "sha512-lo4XXRnBlU6eRM92FkiZxpo1xFLmv3VsPFk61zJKMm7XYJfwqXHsYJTY6agoc4a3L8QPw1HqWehO18coZgbT6A==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-explode-assignable-expression": "^7.10.3",
+ "@babel/types": "^7.10.3"
+ }
+ },
+ "@babel/helper-compilation-targets": {
+ "version": "7.10.2",
+ "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.10.2.tgz",
+ "integrity": "sha512-hYgOhF4To2UTB4LTaZepN/4Pl9LD4gfbJx8A34mqoluT8TLbof1mhUlYuNWTEebONa8+UlCC4X0TEXu7AOUyGA==",
+ "dev": true,
+ "requires": {
+ "@babel/compat-data": "^7.10.1",
+ "browserslist": "^4.12.0",
+ "invariant": "^2.2.4",
+ "levenary": "^1.1.1",
+ "semver": "^5.5.0"
+ },
+ "dependencies": {
+ "semver": {
+ "version": "5.7.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
+ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
+ "dev": true
+ }
+ }
+ },
+ "@babel/helper-create-class-features-plugin": {
+ "version": "7.10.3",
+ "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.10.3.tgz",
+ "integrity": "sha512-iRT9VwqtdFmv7UheJWthGc/h2s7MqoweBF9RUj77NFZsg9VfISvBTum3k6coAhJ8RWv2tj3yUjA03HxPd0vfpQ==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-function-name": "^7.10.3",
+ "@babel/helper-member-expression-to-functions": "^7.10.3",
+ "@babel/helper-optimise-call-expression": "^7.10.3",
+ "@babel/helper-plugin-utils": "^7.10.3",
+ "@babel/helper-replace-supers": "^7.10.1",
+ "@babel/helper-split-export-declaration": "^7.10.1"
+ }
+ },
+ "@babel/helper-create-regexp-features-plugin": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.10.1.tgz",
+ "integrity": "sha512-Rx4rHS0pVuJn5pJOqaqcZR4XSgeF9G/pO/79t+4r7380tXFJdzImFnxMU19f83wjSrmKHq6myrM10pFHTGzkUA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-annotate-as-pure": "^7.10.1",
+ "@babel/helper-regex": "^7.10.1",
+ "regexpu-core": "^4.7.0"
+ }
+ },
+ "@babel/helper-define-map": {
+ "version": "7.10.3",
+ "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.10.3.tgz",
+ "integrity": "sha512-bxRzDi4Sin/k0drWCczppOhov1sBSdBvXJObM1NLHQzjhXhwRtn7aRWGvLJWCYbuu2qUk3EKs6Ci9C9ps8XokQ==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-function-name": "^7.10.3",
+ "@babel/types": "^7.10.3",
+ "lodash": "^4.17.13"
+ },
+ "dependencies": {
+ "lodash": {
+ "version": "4.17.15",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
+ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
+ "dev": true
+ }
+ }
+ },
+ "@babel/helper-explode-assignable-expression": {
+ "version": "7.10.3",
+ "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.10.3.tgz",
+ "integrity": "sha512-0nKcR64XrOC3lsl+uhD15cwxPvaB6QKUDlD84OT9C3myRbhJqTMYir69/RWItUvHpharv0eJ/wk7fl34ONSwZw==",
+ "dev": true,
+ "requires": {
+ "@babel/traverse": "^7.10.3",
+ "@babel/types": "^7.10.3"
+ }
+ },
+ "@babel/helper-function-name": {
+ "version": "7.10.3",
+ "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.3.tgz",
+ "integrity": "sha512-FvSj2aiOd8zbeqijjgqdMDSyxsGHaMt5Tr0XjQsGKHD3/1FP3wksjnLAWzxw7lvXiej8W1Jt47SKTZ6upQNiRw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-get-function-arity": "^7.10.3",
+ "@babel/template": "^7.10.3",
+ "@babel/types": "^7.10.3"
+ }
+ },
+ "@babel/helper-get-function-arity": {
+ "version": "7.10.3",
+ "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.3.tgz",
+ "integrity": "sha512-iUD/gFsR+M6uiy69JA6fzM5seno8oE85IYZdbVVEuQaZlEzMO2MXblh+KSPJgsZAUx0EEbWXU0yJaW7C9CdAVg==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.10.3"
+ }
+ },
+ "@babel/helper-hoist-variables": {
+ "version": "7.10.3",
+ "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.10.3.tgz",
+ "integrity": "sha512-9JyafKoBt5h20Yv1+BXQMdcXXavozI1vt401KBiRc2qzUepbVnd7ogVNymY1xkQN9fekGwfxtotH2Yf5xsGzgg==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.10.3"
+ }
+ },
+ "@babel/helper-member-expression-to-functions": {
+ "version": "7.10.3",
+ "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.10.3.tgz",
+ "integrity": "sha512-q7+37c4EPLSjNb2NmWOjNwj0+BOyYlssuQ58kHEWk1Z78K5i8vTUsteq78HMieRPQSl/NtpQyJfdjt3qZ5V2vw==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.10.3"
+ }
+ },
+ "@babel/helper-module-imports": {
+ "version": "7.10.3",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.10.3.tgz",
+ "integrity": "sha512-Jtqw5M9pahLSUWA+76nhK9OG8nwYXzhQzVIGFoNaHnXF/r4l7kz4Fl0UAW7B6mqC5myoJiBP5/YQlXQTMfHI9w==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.10.3"
+ }
+ },
+ "@babel/helper-module-transforms": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.10.1.tgz",
+ "integrity": "sha512-RLHRCAzyJe7Q7sF4oy2cB+kRnU4wDZY/H2xJFGof+M+SJEGhZsb+GFj5j1AD8NiSaVBJ+Pf0/WObiXu/zxWpFg==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-module-imports": "^7.10.1",
+ "@babel/helper-replace-supers": "^7.10.1",
+ "@babel/helper-simple-access": "^7.10.1",
+ "@babel/helper-split-export-declaration": "^7.10.1",
+ "@babel/template": "^7.10.1",
+ "@babel/types": "^7.10.1",
+ "lodash": "^4.17.13"
+ },
+ "dependencies": {
+ "lodash": {
+ "version": "4.17.15",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
+ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
+ "dev": true
+ }
+ }
+ },
+ "@babel/helper-optimise-call-expression": {
+ "version": "7.10.3",
+ "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.3.tgz",
+ "integrity": "sha512-kT2R3VBH/cnSz+yChKpaKRJQJWxdGoc6SjioRId2wkeV3bK0wLLioFpJROrX0U4xr/NmxSSAWT/9Ih5snwIIzg==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.10.3"
+ }
+ },
+ "@babel/helper-plugin-utils": {
+ "version": "7.10.3",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.3.tgz",
+ "integrity": "sha512-j/+j8NAWUTxOtx4LKHybpSClxHoq6I91DQ/mKgAXn5oNUPIUiGppjPIX3TDtJWPrdfP9Kfl7e4fgVMiQR9VE/g==",
+ "dev": true
+ },
+ "@babel/helper-regex": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.10.1.tgz",
+ "integrity": "sha512-7isHr19RsIJWWLLFn21ubFt223PjQyg1HY7CZEMRr820HttHPpVvrsIN3bUOo44DEfFV4kBXO7Abbn9KTUZV7g==",
+ "dev": true,
+ "requires": {
+ "lodash": "^4.17.13"
+ },
+ "dependencies": {
+ "lodash": {
+ "version": "4.17.15",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
+ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
+ "dev": true
+ }
+ }
+ },
+ "@babel/helper-remap-async-to-generator": {
+ "version": "7.10.3",
+ "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.10.3.tgz",
+ "integrity": "sha512-sLB7666ARbJUGDO60ZormmhQOyqMX/shKBXZ7fy937s+3ID8gSrneMvKSSb+8xIM5V7Vn6uNVtOY1vIm26XLtA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-annotate-as-pure": "^7.10.1",
+ "@babel/helper-wrap-function": "^7.10.1",
+ "@babel/template": "^7.10.3",
+ "@babel/traverse": "^7.10.3",
+ "@babel/types": "^7.10.3"
+ }
+ },
+ "@babel/helper-replace-supers": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.10.1.tgz",
+ "integrity": "sha512-SOwJzEfpuQwInzzQJGjGaiG578UYmyi2Xw668klPWV5n07B73S0a9btjLk/52Mlcxa+5AdIYqws1KyXRfMoB7A==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-member-expression-to-functions": "^7.10.1",
+ "@babel/helper-optimise-call-expression": "^7.10.1",
+ "@babel/traverse": "^7.10.1",
+ "@babel/types": "^7.10.1"
+ }
+ },
+ "@babel/helper-simple-access": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.10.1.tgz",
+ "integrity": "sha512-VSWpWzRzn9VtgMJBIWTZ+GP107kZdQ4YplJlCmIrjoLVSi/0upixezHCDG8kpPVTBJpKfxTH01wDhh+jS2zKbw==",
+ "dev": true,
+ "requires": {
+ "@babel/template": "^7.10.1",
+ "@babel/types": "^7.10.1"
+ }
+ },
+ "@babel/helper-split-export-declaration": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.10.1.tgz",
+ "integrity": "sha512-UQ1LVBPrYdbchNhLwj6fetj46BcFwfS4NllJo/1aJsT+1dLTEnXJL0qHqtY7gPzF8S2fXBJamf1biAXV3X077g==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.10.1"
+ }
+ },
+ "@babel/helper-validator-identifier": {
+ "version": "7.10.3",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.3.tgz",
+ "integrity": "sha512-bU8JvtlYpJSBPuj1VUmKpFGaDZuLxASky3LhaKj3bmpSTY6VWooSM8msk+Z0CZoErFye2tlABF6yDkT3FOPAXw==",
+ "dev": true
+ },
+ "@babel/helper-wrap-function": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.10.1.tgz",
+ "integrity": "sha512-C0MzRGteVDn+H32/ZgbAv5r56f2o1fZSA/rj/TYo8JEJNHg+9BdSmKBUND0shxWRztWhjlT2cvHYuynpPsVJwQ==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-function-name": "^7.10.1",
+ "@babel/template": "^7.10.1",
+ "@babel/traverse": "^7.10.1",
+ "@babel/types": "^7.10.1"
+ }
+ },
+ "@babel/helpers": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.10.1.tgz",
+ "integrity": "sha512-muQNHF+IdU6wGgkaJyhhEmI54MOZBKsFfsXFhboz1ybwJ1Kl7IHlbm2a++4jwrmY5UYsgitt5lfqo1wMFcHmyw==",
+ "dev": true,
+ "requires": {
+ "@babel/template": "^7.10.1",
+ "@babel/traverse": "^7.10.1",
+ "@babel/types": "^7.10.1"
+ }
+ },
+ "@babel/highlight": {
+ "version": "7.10.3",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.3.tgz",
+ "integrity": "sha512-Ih9B/u7AtgEnySE2L2F0Xm0GaM729XqqLfHkalTsbjXGyqmf/6M0Cu0WpvqueUlW+xk88BHw9Nkpj49naU+vWw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-validator-identifier": "^7.10.3",
+ "chalk": "^2.0.0",
+ "js-tokens": "^4.0.0"
+ },
+ "dependencies": {
+ "ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^1.9.0"
+ }
+ },
+ "chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ }
+ },
+ "supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
+ }
+ }
+ },
+ "@babel/parser": {
+ "version": "7.10.3",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.3.tgz",
+ "integrity": "sha512-oJtNJCMFdIMwXGmx+KxuaD7i3b8uS7TTFYW/FNG2BT8m+fmGHoiPYoH0Pe3gya07WuFmM5FCDIr1x0irkD/hyA==",
+ "dev": true
+ },
+ "@babel/plugin-external-helpers": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-external-helpers/-/plugin-external-helpers-7.10.1.tgz",
+ "integrity": "sha512-xFXc/Ts/gsgCrkh3waZbVdkzmhtnlw1L972gx96pmj8hXvloHnPTDgZ07vTDve9ilpe9TcrIMWLU7rg6FqnAWA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.1"
+ }
+ },
+ "@babel/plugin-proposal-async-generator-functions": {
+ "version": "7.10.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.10.3.tgz",
+ "integrity": "sha512-WUUWM7YTOudF4jZBAJIW9D7aViYC/Fn0Pln4RIHlQALyno3sXSjqmTA4Zy1TKC2D49RCR8Y/Pn4OIUtEypK3CA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.3",
+ "@babel/helper-remap-async-to-generator": "^7.10.3",
+ "@babel/plugin-syntax-async-generators": "^7.8.0"
+ }
+ },
+ "@babel/plugin-proposal-class-properties": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.10.1.tgz",
+ "integrity": "sha512-sqdGWgoXlnOdgMXU+9MbhzwFRgxVLeiGBqTrnuS7LC2IBU31wSsESbTUreT2O418obpfPdGUR2GbEufZF1bpqw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-create-class-features-plugin": "^7.10.1",
+ "@babel/helper-plugin-utils": "^7.10.1"
+ }
+ },
+ "@babel/plugin-proposal-dynamic-import": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.10.1.tgz",
+ "integrity": "sha512-Cpc2yUVHTEGPlmiQzXj026kqwjEQAD9I4ZC16uzdbgWgitg/UHKHLffKNCQZ5+y8jpIZPJcKcwsr2HwPh+w3XA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.1",
+ "@babel/plugin-syntax-dynamic-import": "^7.8.0"
+ }
+ },
+ "@babel/plugin-proposal-json-strings": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.10.1.tgz",
+ "integrity": "sha512-m8r5BmV+ZLpWPtMY2mOKN7wre6HIO4gfIiV+eOmsnZABNenrt/kzYBwrh+KOfgumSWpnlGs5F70J8afYMSJMBg==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.1",
+ "@babel/plugin-syntax-json-strings": "^7.8.0"
+ }
+ },
+ "@babel/plugin-proposal-nullish-coalescing-operator": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.10.1.tgz",
+ "integrity": "sha512-56cI/uHYgL2C8HVuHOuvVowihhX0sxb3nnfVRzUeVHTWmRHTZrKuAh/OBIMggGU/S1g/1D2CRCXqP+3u7vX7iA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.1",
+ "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0"
+ }
+ },
+ "@babel/plugin-proposal-numeric-separator": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.10.1.tgz",
+ "integrity": "sha512-jjfym4N9HtCiNfyyLAVD8WqPYeHUrw4ihxuAynWj6zzp2gf9Ey2f7ImhFm6ikB3CLf5Z/zmcJDri6B4+9j9RsA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.1",
+ "@babel/plugin-syntax-numeric-separator": "^7.10.1"
+ }
+ },
+ "@babel/plugin-proposal-object-rest-spread": {
+ "version": "7.10.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.10.3.tgz",
+ "integrity": "sha512-ZZh5leCIlH9lni5bU/wB/UcjtcVLgR8gc+FAgW2OOY+m9h1II3ItTO1/cewNUcsIDZSYcSaz/rYVls+Fb0ExVQ==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.3",
+ "@babel/plugin-syntax-object-rest-spread": "^7.8.0",
+ "@babel/plugin-transform-parameters": "^7.10.1"
+ }
+ },
+ "@babel/plugin-proposal-optional-catch-binding": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.10.1.tgz",
+ "integrity": "sha512-VqExgeE62YBqI3ogkGoOJp1R6u12DFZjqwJhqtKc2o5m1YTUuUWnos7bZQFBhwkxIFpWYJ7uB75U7VAPPiKETA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.1",
+ "@babel/plugin-syntax-optional-catch-binding": "^7.8.0"
+ }
+ },
+ "@babel/plugin-proposal-optional-chaining": {
+ "version": "7.10.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.10.3.tgz",
+ "integrity": "sha512-yyG3n9dJ1vZ6v5sfmIlMMZ8azQoqx/5/nZTSWX1td6L1H1bsjzA8TInDChpafCZiJkeOFzp/PtrfigAQXxI1Ng==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.3",
+ "@babel/plugin-syntax-optional-chaining": "^7.8.0"
+ }
+ },
+ "@babel/plugin-proposal-private-methods": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.10.1.tgz",
+ "integrity": "sha512-RZecFFJjDiQ2z6maFprLgrdnm0OzoC23Mx89xf1CcEsxmHuzuXOdniEuI+S3v7vjQG4F5sa6YtUp+19sZuSxHg==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-create-class-features-plugin": "^7.10.1",
+ "@babel/helper-plugin-utils": "^7.10.1"
+ }
+ },
+ "@babel/plugin-proposal-unicode-property-regex": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.10.1.tgz",
+ "integrity": "sha512-JjfngYRvwmPwmnbRZyNiPFI8zxCZb8euzbCG/LxyKdeTb59tVciKo9GK9bi6JYKInk1H11Dq9j/zRqIH4KigfQ==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-create-regexp-features-plugin": "^7.10.1",
+ "@babel/helper-plugin-utils": "^7.10.1"
+ }
+ },
+ "@babel/plugin-syntax-async-generators": {
+ "version": "7.8.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz",
+ "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ }
+ },
+ "@babel/plugin-syntax-class-properties": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.10.1.tgz",
+ "integrity": "sha512-Gf2Yx/iRs1JREDtVZ56OrjjgFHCaldpTnuy9BHla10qyVT3YkIIGEtoDWhyop0ksu1GvNjHIoYRBqm3zoR1jyQ==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.1"
+ }
+ },
+ "@babel/plugin-syntax-dynamic-import": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz",
+ "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ }
+ },
+ "@babel/plugin-syntax-json-strings": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz",
+ "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ }
+ },
+ "@babel/plugin-syntax-nullish-coalescing-operator": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz",
+ "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ }
+ },
+ "@babel/plugin-syntax-numeric-separator": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.1.tgz",
+ "integrity": "sha512-uTd0OsHrpe3tH5gRPTxG8Voh99/WCU78vIm5NMRYPAqC8lR4vajt6KkCAknCHrx24vkPdd/05yfdGSB4EIY2mg==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.1"
+ }
+ },
+ "@babel/plugin-syntax-object-rest-spread": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz",
+ "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ }
+ },
+ "@babel/plugin-syntax-optional-catch-binding": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz",
+ "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ }
+ },
+ "@babel/plugin-syntax-optional-chaining": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz",
+ "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ }
+ },
+ "@babel/plugin-syntax-top-level-await": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.10.1.tgz",
+ "integrity": "sha512-hgA5RYkmZm8FTFT3yu2N9Bx7yVVOKYT6yEdXXo6j2JTm0wNxgqaGeQVaSHRjhfnQbX91DtjFB6McRFSlcJH3xQ==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.1"
+ }
+ },
+ "@babel/plugin-transform-arrow-functions": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.10.1.tgz",
+ "integrity": "sha512-6AZHgFJKP3DJX0eCNJj01RpytUa3SOGawIxweHkNX2L6PYikOZmoh5B0d7hIHaIgveMjX990IAa/xK7jRTN8OA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.1"
+ }
+ },
+ "@babel/plugin-transform-async-to-generator": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.10.1.tgz",
+ "integrity": "sha512-XCgYjJ8TY2slj6SReBUyamJn3k2JLUIiiR5b6t1mNCMSvv7yx+jJpaewakikp0uWFQSF7ChPPoe3dHmXLpISkg==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-module-imports": "^7.10.1",
+ "@babel/helper-plugin-utils": "^7.10.1",
+ "@babel/helper-remap-async-to-generator": "^7.10.1"
+ }
+ },
+ "@babel/plugin-transform-block-scoped-functions": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.10.1.tgz",
+ "integrity": "sha512-B7K15Xp8lv0sOJrdVAoukKlxP9N59HS48V1J3U/JGj+Ad+MHq+am6xJVs85AgXrQn4LV8vaYFOB+pr/yIuzW8Q==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.1"
+ }
+ },
+ "@babel/plugin-transform-block-scoping": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.10.1.tgz",
+ "integrity": "sha512-8bpWG6TtF5akdhIm/uWTyjHqENpy13Fx8chg7pFH875aNLwX8JxIxqm08gmAT+Whe6AOmaTeLPe7dpLbXt+xUw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.1",
+ "lodash": "^4.17.13"
+ },
+ "dependencies": {
+ "lodash": {
+ "version": "4.17.15",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
+ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
+ "dev": true
+ }
+ }
+ },
+ "@babel/plugin-transform-classes": {
+ "version": "7.10.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.10.3.tgz",
+ "integrity": "sha512-irEX0ChJLaZVC7FvvRoSIxJlmk0IczFLcwaRXUArBKYHCHbOhe57aG8q3uw/fJsoSXvZhjRX960hyeAGlVBXZw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-annotate-as-pure": "^7.10.1",
+ "@babel/helper-define-map": "^7.10.3",
+ "@babel/helper-function-name": "^7.10.3",
+ "@babel/helper-optimise-call-expression": "^7.10.3",
+ "@babel/helper-plugin-utils": "^7.10.3",
+ "@babel/helper-replace-supers": "^7.10.1",
+ "@babel/helper-split-export-declaration": "^7.10.1",
+ "globals": "^11.1.0"
+ }
+ },
+ "@babel/plugin-transform-computed-properties": {
+ "version": "7.10.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.10.3.tgz",
+ "integrity": "sha512-GWzhaBOsdbjVFav96drOz7FzrcEW6AP5nax0gLIpstiFaI3LOb2tAg06TimaWU6YKOfUACK3FVrxPJ4GSc5TgA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.3"
+ }
+ },
+ "@babel/plugin-transform-destructuring": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.10.1.tgz",
+ "integrity": "sha512-V/nUc4yGWG71OhaTH705pU8ZSdM6c1KmmLP8ys59oOYbT7RpMYAR3MsVOt6OHL0WzG7BlTU076va9fjJyYzJMA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.1"
+ }
+ },
+ "@babel/plugin-transform-dotall-regex": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.10.1.tgz",
+ "integrity": "sha512-19VIMsD1dp02RvduFUmfzj8uknaO3uiHHF0s3E1OHnVsNj8oge8EQ5RzHRbJjGSetRnkEuBYO7TG1M5kKjGLOA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-create-regexp-features-plugin": "^7.10.1",
+ "@babel/helper-plugin-utils": "^7.10.1"
+ }
+ },
+ "@babel/plugin-transform-duplicate-keys": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.10.1.tgz",
+ "integrity": "sha512-wIEpkX4QvX8Mo9W6XF3EdGttrIPZWozHfEaDTU0WJD/TDnXMvdDh30mzUl/9qWhnf7naicYartcEfUghTCSNpA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.1"
+ }
+ },
+ "@babel/plugin-transform-exponentiation-operator": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.10.1.tgz",
+ "integrity": "sha512-lr/przdAbpEA2BUzRvjXdEDLrArGRRPwbaF9rvayuHRvdQ7lUTTkZnhZrJ4LE2jvgMRFF4f0YuPQ20vhiPYxtA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-builder-binary-assignment-operator-visitor": "^7.10.1",
+ "@babel/helper-plugin-utils": "^7.10.1"
+ }
+ },
+ "@babel/plugin-transform-for-of": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.10.1.tgz",
+ "integrity": "sha512-US8KCuxfQcn0LwSCMWMma8M2R5mAjJGsmoCBVwlMygvmDUMkTCykc84IqN1M7t+agSfOmLYTInLCHJM+RUoz+w==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.1"
+ }
+ },
+ "@babel/plugin-transform-function-name": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.10.1.tgz",
+ "integrity": "sha512-//bsKsKFBJfGd65qSNNh1exBy5Y9gD9ZN+DvrJ8f7HXr4avE5POW6zB7Rj6VnqHV33+0vXWUwJT0wSHubiAQkw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-function-name": "^7.10.1",
+ "@babel/helper-plugin-utils": "^7.10.1"
+ }
+ },
+ "@babel/plugin-transform-literals": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.10.1.tgz",
+ "integrity": "sha512-qi0+5qgevz1NHLZroObRm5A+8JJtibb7vdcPQF1KQE12+Y/xxl8coJ+TpPW9iRq+Mhw/NKLjm+5SHtAHCC7lAw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.1"
+ }
+ },
+ "@babel/plugin-transform-member-expression-literals": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.10.1.tgz",
+ "integrity": "sha512-UmaWhDokOFT2GcgU6MkHC11i0NQcL63iqeufXWfRy6pUOGYeCGEKhvfFO6Vz70UfYJYHwveg62GS83Rvpxn+NA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.1"
+ }
+ },
+ "@babel/plugin-transform-modules-amd": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.10.1.tgz",
+ "integrity": "sha512-31+hnWSFRI4/ACFr1qkboBbrTxoBIzj7qA69qlq8HY8p7+YCzkCT6/TvQ1a4B0z27VeWtAeJd6pr5G04dc1iHw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-module-transforms": "^7.10.1",
+ "@babel/helper-plugin-utils": "^7.10.1",
+ "babel-plugin-dynamic-import-node": "^2.3.3"
+ }
+ },
+ "@babel/plugin-transform-modules-commonjs": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.10.1.tgz",
+ "integrity": "sha512-AQG4fc3KOah0vdITwt7Gi6hD9BtQP/8bhem7OjbaMoRNCH5Djx42O2vYMfau7QnAzQCa+RJnhJBmFFMGpQEzrg==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-module-transforms": "^7.10.1",
+ "@babel/helper-plugin-utils": "^7.10.1",
+ "@babel/helper-simple-access": "^7.10.1",
+ "babel-plugin-dynamic-import-node": "^2.3.3"
+ }
+ },
+ "@babel/plugin-transform-modules-systemjs": {
+ "version": "7.10.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.10.3.tgz",
+ "integrity": "sha512-GWXWQMmE1GH4ALc7YXW56BTh/AlzvDWhUNn9ArFF0+Cz5G8esYlVbXfdyHa1xaD1j+GnBoCeoQNlwtZTVdiG/A==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-hoist-variables": "^7.10.3",
+ "@babel/helper-module-transforms": "^7.10.1",
+ "@babel/helper-plugin-utils": "^7.10.3",
+ "babel-plugin-dynamic-import-node": "^2.3.3"
+ }
+ },
+ "@babel/plugin-transform-modules-umd": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.10.1.tgz",
+ "integrity": "sha512-EIuiRNMd6GB6ulcYlETnYYfgv4AxqrswghmBRQbWLHZxN4s7mupxzglnHqk9ZiUpDI4eRWewedJJNj67PWOXKA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-module-transforms": "^7.10.1",
+ "@babel/helper-plugin-utils": "^7.10.1"
+ }
+ },
+ "@babel/plugin-transform-named-capturing-groups-regex": {
+ "version": "7.10.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.10.3.tgz",
+ "integrity": "sha512-I3EH+RMFyVi8Iy/LekQm948Z4Lz4yKT7rK+vuCAeRm0kTa6Z5W7xuhRxDNJv0FPya/her6AUgrDITb70YHtTvA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-create-regexp-features-plugin": "^7.8.3"
+ }
+ },
+ "@babel/plugin-transform-new-target": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.10.1.tgz",
+ "integrity": "sha512-MBlzPc1nJvbmO9rPr1fQwXOM2iGut+JC92ku6PbiJMMK7SnQc1rytgpopveE3Evn47gzvGYeCdgfCDbZo0ecUw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.1"
+ }
+ },
+ "@babel/plugin-transform-object-super": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.10.1.tgz",
+ "integrity": "sha512-WnnStUDN5GL+wGQrJylrnnVlFhFmeArINIR9gjhSeYyvroGhBrSAXYg/RHsnfzmsa+onJrTJrEClPzgNmmQ4Gw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.1",
+ "@babel/helper-replace-supers": "^7.10.1"
+ }
+ },
+ "@babel/plugin-transform-parameters": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.10.1.tgz",
+ "integrity": "sha512-tJ1T0n6g4dXMsL45YsSzzSDZCxiHXAQp/qHrucOq5gEHncTA3xDxnd5+sZcoQp+N1ZbieAaB8r/VUCG0gqseOg==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-get-function-arity": "^7.10.1",
+ "@babel/helper-plugin-utils": "^7.10.1"
+ }
+ },
+ "@babel/plugin-transform-property-literals": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.10.1.tgz",
+ "integrity": "sha512-Kr6+mgag8auNrgEpbfIWzdXYOvqDHZOF0+Bx2xh4H2EDNwcbRb9lY6nkZg8oSjsX+DH9Ebxm9hOqtKW+gRDeNA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.1"
+ }
+ },
+ "@babel/plugin-transform-regenerator": {
+ "version": "7.10.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.10.3.tgz",
+ "integrity": "sha512-H5kNeW0u8mbk0qa1jVIVTeJJL6/TJ81ltD4oyPx0P499DhMJrTmmIFCmJ3QloGpQG8K9symccB7S7SJpCKLwtw==",
+ "dev": true,
+ "requires": {
+ "regenerator-transform": "^0.14.2"
+ }
+ },
+ "@babel/plugin-transform-reserved-words": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.10.1.tgz",
+ "integrity": "sha512-qN1OMoE2nuqSPmpTqEM7OvJ1FkMEV+BjVeZZm9V9mq/x1JLKQ4pcv8riZJMNN3u2AUGl0ouOMjRr2siecvHqUQ==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.1"
+ }
+ },
+ "@babel/plugin-transform-runtime": {
+ "version": "7.10.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.10.3.tgz",
+ "integrity": "sha512-b5OzMD1Hi8BBzgQdRHyVVaYrk9zG0wset1it2o3BgonkPadXfOv0aXRqd7864DeOIu3FGKP/h6lr15FE5mahVw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-module-imports": "^7.10.3",
+ "@babel/helper-plugin-utils": "^7.10.3",
+ "resolve": "^1.8.1",
+ "semver": "^5.5.1"
+ },
+ "dependencies": {
+ "semver": {
+ "version": "5.7.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
+ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
+ "dev": true
+ }
+ }
+ },
+ "@babel/plugin-transform-shorthand-properties": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.10.1.tgz",
+ "integrity": "sha512-AR0E/lZMfLstScFwztApGeyTHJ5u3JUKMjneqRItWeEqDdHWZwAOKycvQNCasCK/3r5YXsuNG25funcJDu7Y2g==",
"dev": true,
"requires": {
- "conventional-changelog": "0.0.17"
+ "@babel/helper-plugin-utils": "^7.10.1"
}
},
- "@semantic-release/condition-travis": {
- "version": "4.1.4",
- "resolved": "https://registry.npmjs.org/@semantic-release/condition-travis/-/condition-travis-4.1.4.tgz",
- "integrity": "sha1-1d5qyheBlCDfwy7VQilal/l3+WM=",
+ "@babel/plugin-transform-spread": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.10.1.tgz",
+ "integrity": "sha512-8wTPym6edIrClW8FI2IoaePB91ETOtg36dOkj3bYcNe7aDMN2FXEoUa+WrmPc4xa1u2PQK46fUX2aCb+zo9rfw==",
"dev": true,
"requires": {
- "@semantic-release/error": "^1.0.0",
- "semver": "^5.0.3"
+ "@babel/helper-plugin-utils": "^7.10.1"
}
},
- "@semantic-release/error": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@semantic-release/error/-/error-1.0.0.tgz",
- "integrity": "sha1-u4+O7t1cf4xG+Ws37znhuMN2wcw=",
- "dev": true
+ "@babel/plugin-transform-sticky-regex": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.10.1.tgz",
+ "integrity": "sha512-j17ojftKjrL7ufX8ajKvwRilwqTok4q+BjkknmQw9VNHnItTyMP5anPFzxFJdCQs7clLcWpCV3ma+6qZWLnGMA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.1",
+ "@babel/helper-regex": "^7.10.1"
+ }
},
- "@semantic-release/last-release-npm": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/@semantic-release/last-release-npm/-/last-release-npm-1.2.1.tgz",
- "integrity": "sha1-/3SBQuzxU1S4M6hroYIF9/zllO4=",
+ "@babel/plugin-transform-template-literals": {
+ "version": "7.10.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.10.3.tgz",
+ "integrity": "sha512-yaBn9OpxQra/bk0/CaA4wr41O0/Whkg6nqjqApcinxM7pro51ojhX6fv1pimAnVjVfDy14K0ULoRL70CA9jWWA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-annotate-as-pure": "^7.10.1",
+ "@babel/helper-plugin-utils": "^7.10.3"
+ }
+ },
+ "@babel/plugin-transform-typeof-symbol": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.10.1.tgz",
+ "integrity": "sha512-qX8KZcmbvA23zDi+lk9s6hC1FM7jgLHYIjuLgULgc8QtYnmB3tAVIYkNoKRQ75qWBeyzcoMoK8ZQmogGtC/w0g==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.1"
+ }
+ },
+ "@babel/plugin-transform-unicode-escapes": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.10.1.tgz",
+ "integrity": "sha512-zZ0Poh/yy1d4jeDWpx/mNwbKJVwUYJX73q+gyh4bwtG0/iUlzdEu0sLMda8yuDFS6LBQlT/ST1SJAR6zYwXWgw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.1"
+ }
+ },
+ "@babel/plugin-transform-unicode-regex": {
+ "version": "7.10.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.10.1.tgz",
+ "integrity": "sha512-Y/2a2W299k0VIUdbqYm9X2qS6fE0CUBhhiPpimK6byy7OJ/kORLlIX+J6UrjgNu5awvs62k+6RSslxhcvVw2Tw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-create-regexp-features-plugin": "^7.10.1",
+ "@babel/helper-plugin-utils": "^7.10.1"
+ }
+ },
+ "@babel/preset-env": {
+ "version": "7.10.3",
+ "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.10.3.tgz",
+ "integrity": "sha512-jHaSUgiewTmly88bJtMHbOd1bJf2ocYxb5BWKSDQIP5tmgFuS/n0gl+nhSrYDhT33m0vPxp+rP8oYYgPgMNQlg==",
+ "dev": true,
+ "requires": {
+ "@babel/compat-data": "^7.10.3",
+ "@babel/helper-compilation-targets": "^7.10.2",
+ "@babel/helper-module-imports": "^7.10.3",
+ "@babel/helper-plugin-utils": "^7.10.3",
+ "@babel/plugin-proposal-async-generator-functions": "^7.10.3",
+ "@babel/plugin-proposal-class-properties": "^7.10.1",
+ "@babel/plugin-proposal-dynamic-import": "^7.10.1",
+ "@babel/plugin-proposal-json-strings": "^7.10.1",
+ "@babel/plugin-proposal-nullish-coalescing-operator": "^7.10.1",
+ "@babel/plugin-proposal-numeric-separator": "^7.10.1",
+ "@babel/plugin-proposal-object-rest-spread": "^7.10.3",
+ "@babel/plugin-proposal-optional-catch-binding": "^7.10.1",
+ "@babel/plugin-proposal-optional-chaining": "^7.10.3",
+ "@babel/plugin-proposal-private-methods": "^7.10.1",
+ "@babel/plugin-proposal-unicode-property-regex": "^7.10.1",
+ "@babel/plugin-syntax-async-generators": "^7.8.0",
+ "@babel/plugin-syntax-class-properties": "^7.10.1",
+ "@babel/plugin-syntax-dynamic-import": "^7.8.0",
+ "@babel/plugin-syntax-json-strings": "^7.8.0",
+ "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0",
+ "@babel/plugin-syntax-numeric-separator": "^7.10.1",
+ "@babel/plugin-syntax-object-rest-spread": "^7.8.0",
+ "@babel/plugin-syntax-optional-catch-binding": "^7.8.0",
+ "@babel/plugin-syntax-optional-chaining": "^7.8.0",
+ "@babel/plugin-syntax-top-level-await": "^7.10.1",
+ "@babel/plugin-transform-arrow-functions": "^7.10.1",
+ "@babel/plugin-transform-async-to-generator": "^7.10.1",
+ "@babel/plugin-transform-block-scoped-functions": "^7.10.1",
+ "@babel/plugin-transform-block-scoping": "^7.10.1",
+ "@babel/plugin-transform-classes": "^7.10.3",
+ "@babel/plugin-transform-computed-properties": "^7.10.3",
+ "@babel/plugin-transform-destructuring": "^7.10.1",
+ "@babel/plugin-transform-dotall-regex": "^7.10.1",
+ "@babel/plugin-transform-duplicate-keys": "^7.10.1",
+ "@babel/plugin-transform-exponentiation-operator": "^7.10.1",
+ "@babel/plugin-transform-for-of": "^7.10.1",
+ "@babel/plugin-transform-function-name": "^7.10.1",
+ "@babel/plugin-transform-literals": "^7.10.1",
+ "@babel/plugin-transform-member-expression-literals": "^7.10.1",
+ "@babel/plugin-transform-modules-amd": "^7.10.1",
+ "@babel/plugin-transform-modules-commonjs": "^7.10.1",
+ "@babel/plugin-transform-modules-systemjs": "^7.10.3",
+ "@babel/plugin-transform-modules-umd": "^7.10.1",
+ "@babel/plugin-transform-named-capturing-groups-regex": "^7.10.3",
+ "@babel/plugin-transform-new-target": "^7.10.1",
+ "@babel/plugin-transform-object-super": "^7.10.1",
+ "@babel/plugin-transform-parameters": "^7.10.1",
+ "@babel/plugin-transform-property-literals": "^7.10.1",
+ "@babel/plugin-transform-regenerator": "^7.10.3",
+ "@babel/plugin-transform-reserved-words": "^7.10.1",
+ "@babel/plugin-transform-shorthand-properties": "^7.10.1",
+ "@babel/plugin-transform-spread": "^7.10.1",
+ "@babel/plugin-transform-sticky-regex": "^7.10.1",
+ "@babel/plugin-transform-template-literals": "^7.10.3",
+ "@babel/plugin-transform-typeof-symbol": "^7.10.1",
+ "@babel/plugin-transform-unicode-escapes": "^7.10.1",
+ "@babel/plugin-transform-unicode-regex": "^7.10.1",
+ "@babel/preset-modules": "^0.1.3",
+ "@babel/types": "^7.10.3",
+ "browserslist": "^4.12.0",
+ "core-js-compat": "^3.6.2",
+ "invariant": "^2.2.2",
+ "levenary": "^1.1.1",
+ "semver": "^5.5.0"
+ },
+ "dependencies": {
+ "semver": {
+ "version": "5.7.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
+ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
+ "dev": true
+ }
+ }
+ },
+ "@babel/preset-modules": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.3.tgz",
+ "integrity": "sha512-Ra3JXOHBq2xd56xSF7lMKXdjBn3T772Y1Wet3yWnkDly9zHvJki029tAFzvAAK5cf4YV3yoxuP61crYRol6SVg==",
"dev": true,
"requires": {
- "@semantic-release/error": "^1.0.0",
- "npm-registry-client": "^7.0.1",
- "npmlog": "^1.2.1"
+ "@babel/helper-plugin-utils": "^7.0.0",
+ "@babel/plugin-proposal-unicode-property-regex": "^7.4.4",
+ "@babel/plugin-transform-dotall-regex": "^7.4.4",
+ "@babel/types": "^7.4.4",
+ "esutils": "^2.0.2"
+ },
+ "dependencies": {
+ "esutils": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
+ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
+ "dev": true
+ }
}
},
- "@semantic-release/release-notes-generator": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/@semantic-release/release-notes-generator/-/release-notes-generator-2.0.0.tgz",
- "integrity": "sha1-fF2mVolGbVNqU/36n01io70TwW4=",
+ "@babel/runtime": {
+ "version": "7.10.3",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.3.tgz",
+ "integrity": "sha512-RzGO0RLSdokm9Ipe/YD+7ww8X2Ro79qiXZF3HU9ljrM+qnJmH1Vqth+hbiQZy761LnMJTMitHDuKVYTk3k4dLw==",
"dev": true,
"requires": {
- "conventional-changelog": "0.0.17",
- "github-url-from-git": "^1.4.0"
+ "regenerator-runtime": "^0.13.4"
+ },
+ "dependencies": {
+ "regenerator-runtime": {
+ "version": "0.13.5",
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz",
+ "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==",
+ "dev": true
+ }
}
},
- "abbrev": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
- "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
- "dev": true
+ "@babel/template": {
+ "version": "7.10.3",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.3.tgz",
+ "integrity": "sha512-5BjI4gdtD+9fHZUsaxPHPNpwa+xRkDO7c7JbhYn2afvrkDu5SfAAbi9AIMXw2xEhO/BR35TqiW97IqNvCo/GqA==",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "^7.10.3",
+ "@babel/parser": "^7.10.3",
+ "@babel/types": "^7.10.3"
+ }
},
- "accepts": {
- "version": "1.3.4",
- "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.4.tgz",
- "integrity": "sha1-hiRnWMfdbSGmR0/whKR0DsBesh8=",
+ "@babel/traverse": {
+ "version": "7.10.3",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.10.3.tgz",
+ "integrity": "sha512-qO6623eBFhuPm0TmmrUFMT1FulCmsSeJuVGhiLodk2raUDFhhTECLd9E9jC4LBIWziqt4wgF6KuXE4d+Jz9yug==",
"dev": true,
"requires": {
- "mime-types": "~2.1.16",
- "negotiator": "0.6.1"
+ "@babel/code-frame": "^7.10.3",
+ "@babel/generator": "^7.10.3",
+ "@babel/helper-function-name": "^7.10.3",
+ "@babel/helper-split-export-declaration": "^7.10.1",
+ "@babel/parser": "^7.10.3",
+ "@babel/types": "^7.10.3",
+ "debug": "^4.1.0",
+ "globals": "^11.1.0",
+ "lodash": "^4.17.13"
+ },
+ "dependencies": {
+ "debug": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
+ "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
+ "dev": true,
+ "requires": {
+ "ms": "^2.1.1"
+ }
+ },
+ "lodash": {
+ "version": "4.17.15",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
+ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
+ "dev": true
+ },
+ "ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "dev": true
+ }
}
},
- "acorn": {
- "version": "5.7.3",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz",
- "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==",
- "dev": true
+ "@babel/types": {
+ "version": "7.10.3",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.3.tgz",
+ "integrity": "sha512-nZxaJhBXBQ8HVoIcGsf9qWep3Oh3jCENK54V4mRF7qaJabVsAYdbTtmSD8WmAp1R6ytPiu5apMwSXyxB1WlaBA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-validator-identifier": "^7.10.3",
+ "lodash": "^4.17.13",
+ "to-fast-properties": "^2.0.0"
+ },
+ "dependencies": {
+ "lodash": {
+ "version": "4.17.15",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
+ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
+ "dev": true
+ }
+ }
},
- "align-text": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz",
- "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=",
+ "@sinonjs/commons": {
+ "version": "1.8.0",
+ "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.0.tgz",
+ "integrity": "sha512-wEj54PfsZ5jGSwMX68G8ZXFawcSglQSXqCftWX3ec8MDUzQdHgcKvw97awHbY0efQEL5iKUOAmmVtoYgmrSG4Q==",
"dev": true,
"requires": {
- "kind-of": "^3.0.2",
- "longest": "^1.0.1",
- "repeat-string": "^1.5.2"
+ "type-detect": "4.0.8"
}
},
- "alter": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/alter/-/alter-0.2.0.tgz",
- "integrity": "sha1-x1iICGF1cgNKrmJICvJrHU0cs80=",
+ "@sinonjs/formatio": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-3.2.2.tgz",
+ "integrity": "sha512-B8SEsgd8gArBLMD6zpRw3juQ2FVSsmdd7qlevyDqzS9WTCtvF55/gAL+h6gue8ZvPYcdiPdvueM/qm//9XzyTQ==",
"dev": true,
"requires": {
- "stable": "~0.1.3"
+ "@sinonjs/commons": "^1",
+ "@sinonjs/samsam": "^3.1.0"
}
},
- "amdefine": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz",
- "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=",
+ "@sinonjs/samsam": {
+ "version": "3.3.3",
+ "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-3.3.3.tgz",
+ "integrity": "sha512-bKCMKZvWIjYD0BLGnNrxVuw4dkWCYsLqFOUWw8VgKF/+5Y+mE7LfHWPIYoDXowH+3a9LsWDMo0uAP8YDosPvHQ==",
+ "dev": true,
+ "requires": {
+ "@sinonjs/commons": "^1.3.0",
+ "array-from": "^2.1.1",
+ "lodash": "^4.17.15"
+ },
+ "dependencies": {
+ "lodash": {
+ "version": "4.17.15",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
+ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
+ "dev": true
+ }
+ }
+ },
+ "@sinonjs/text-encoding": {
+ "version": "0.7.1",
+ "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz",
+ "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==",
"dev": true
},
- "ansi": {
- "version": "0.3.1",
- "resolved": "https://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz",
- "integrity": "sha1-DELU+xcWDVqa8eSEus4cZpIsGyE=",
+ "@types/estree": {
+ "version": "0.0.45",
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.45.tgz",
+ "integrity": "sha512-jnqIUKDUqJbDIUxm0Uj7bnlMnRm1T/eZ9N+AVMqhPgzrba2GhGG5o/jCTwmdPK709nEZsGoMzXEDUjcXHa3W0g==",
"dev": true
},
- "ansi-regex": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
- "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
+ "@types/node": {
+ "version": "14.0.14",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.14.tgz",
+ "integrity": "sha512-syUgf67ZQpaJj01/tRTknkMNoBBLWJOBODF0Zm4NrXmiSuxjymFrxnTu1QVYRubhVkRcZLYZG8STTwJRdVm/WQ==",
"dev": true
},
- "ansi-styles": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
- "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
+ "@types/resolve": {
+ "version": "0.0.8",
+ "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-0.0.8.tgz",
+ "integrity": "sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==",
+ "dev": true,
+ "requires": {
+ "@types/node": "*"
+ }
+ },
+ "accepts": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.4.tgz",
+ "integrity": "sha1-hiRnWMfdbSGmR0/whKR0DsBesh8=",
+ "dev": true,
+ "requires": {
+ "mime-types": "~2.1.16",
+ "negotiator": "0.6.1"
+ }
+ },
+ "adm-zip": {
+ "version": "0.4.16",
+ "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.16.tgz",
+ "integrity": "sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg==",
"dev": true
},
- "any-promise": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz",
- "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=",
+ "after": {
+ "version": "0.8.2",
+ "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz",
+ "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=",
"dev": true
},
- "aproba": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
- "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",
+ "agent-base": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.0.tgz",
+ "integrity": "sha512-j1Q7cSCqN+AwrmDd+pzgqc0/NpC655x2bUf5ZjRIO77DcNBFmh+OgRNzF6OKdCC9RSCb19fGd99+bhXFdkRNqw==",
"dev": true,
- "optional": true
- },
- "archiver": {
- "version": "0.14.4",
- "resolved": "https://registry.npmjs.org/archiver/-/archiver-0.14.4.tgz",
- "integrity": "sha1-W53bn17hzu8hy487Ag5iQOy0MVw=",
- "dev": true,
- "requires": {
- "async": "~0.9.0",
- "buffer-crc32": "~0.2.1",
- "glob": "~4.3.0",
- "lazystream": "~0.1.0",
- "lodash": "~3.2.0",
- "readable-stream": "~1.0.26",
- "tar-stream": "~1.1.0",
- "zip-stream": "~0.5.0"
+ "requires": {
+ "debug": "4"
},
"dependencies": {
- "async": {
- "version": "0.9.2",
- "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz",
- "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=",
- "dev": true
- },
- "glob": {
- "version": "4.3.5",
- "resolved": "https://registry.npmjs.org/glob/-/glob-4.3.5.tgz",
- "integrity": "sha1-gPuwjKVA8jiszl0R0em8QedRc9M=",
+ "debug": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
+ "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
"dev": true,
"requires": {
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^2.0.1",
- "once": "^1.3.0"
+ "ms": "^2.1.1"
}
},
- "lodash": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.2.0.tgz",
- "integrity": "sha1-S/UKMkP5rrC6xBpV09WZBnWkYvs=",
+ "ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
"dev": true
- },
- "minimatch": {
- "version": "2.0.10",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz",
- "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=",
- "dev": true,
- "requires": {
- "brace-expansion": "^1.0.0"
- }
- },
- "readable-stream": {
- "version": "1.0.34",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
- "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
- "dev": true,
- "requires": {
- "core-util-is": "~1.0.0",
- "inherits": "~2.0.1",
- "isarray": "0.0.1",
- "string_decoder": "~0.10.x"
- }
- },
- "tar-stream": {
- "version": "1.1.5",
- "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.1.5.tgz",
- "integrity": "sha1-vpIYwTDCACnhB7D5Z/sj3gV50Tw=",
- "dev": true,
- "requires": {
- "bl": "^0.9.0",
- "end-of-stream": "^1.0.0",
- "readable-stream": "~1.0.33",
- "xtend": "^4.0.0"
- }
}
}
},
- "archy": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz",
- "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=",
- "dev": true
+ "align-text": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz",
+ "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=",
+ "dev": true,
+ "requires": {
+ "kind-of": "^3.0.2",
+ "longest": "^1.0.1",
+ "repeat-string": "^1.5.2"
+ }
},
- "are-we-there-yet": {
- "version": "1.1.5",
- "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz",
- "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==",
+ "anymatch": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz",
+ "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==",
"dev": true,
- "optional": true,
"requires": {
- "delegates": "^1.0.0",
- "readable-stream": "^2.0.6"
- },
- "dependencies": {
- "delegates": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
- "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=",
- "dev": true,
- "optional": true
- },
- "isarray": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
- "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
- "dev": true,
- "optional": true
- },
- "process-nextick-args": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
- "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
- "dev": true,
- "optional": true
- },
- "readable-stream": {
- "version": "2.3.6",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
- "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
- "dev": true,
- "optional": true,
- "requires": {
- "core-util-is": "~1.0.0",
- "inherits": "~2.0.3",
- "isarray": "~1.0.0",
- "process-nextick-args": "~2.0.0",
- "safe-buffer": "~5.1.1",
- "string_decoder": "~1.1.1",
- "util-deprecate": "~1.0.1"
- }
- },
- "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,
- "optional": true,
- "requires": {
- "safe-buffer": "~5.1.0"
- }
- }
+ "normalize-path": "^3.0.0",
+ "picomatch": "^2.0.4"
}
},
- "array-find-index": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz",
- "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=",
- "dev": true
+ "argparse": {
+ "version": "1.0.10",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
+ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
+ "dev": true,
+ "requires": {
+ "sprintf-js": "~1.0.2"
+ }
},
"array-flatten": {
"version": "1.1.1",
@@ -282,139 +1316,105 @@
"integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=",
"dev": true
},
- "asn1": {
- "version": "0.2.3",
- "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz",
- "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=",
- "dev": true
- },
- "assert-plus": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz",
- "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=",
+ "array-from": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/array-from/-/array-from-2.1.1.tgz",
+ "integrity": "sha1-z+nYwmYoudxa7MYqn12PHzUsEZU=",
"dev": true
},
- "ast-traverse": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/ast-traverse/-/ast-traverse-0.1.1.tgz",
- "integrity": "sha1-ac8rg4bxnc2hux4F1o/jWdiJfeY=",
+ "arraybuffer.slice": {
+ "version": "0.0.7",
+ "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz",
+ "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==",
"dev": true
},
- "ast-types": {
- "version": "0.9.6",
- "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.9.6.tgz",
- "integrity": "sha1-ECyenpAF0+fjgpvwxPok7oYu6bk=",
+ "assertion-error": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz",
+ "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==",
"dev": true
},
"async": {
- "version": "1.4.2",
- "resolved": "https://registry.npmjs.org/async/-/async-1.4.2.tgz",
- "integrity": "sha1-bJ7csRztTw3S8tQNsNSaEJwIiqs=",
- "dev": true
- },
- "asynckit": {
- "version": "0.4.0",
- "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
- "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
- "dev": true
- },
- "atomic-json": {
- "version": "0.0.4",
- "resolved": "https://registry.npmjs.org/atomic-json/-/atomic-json-0.0.4.tgz",
- "integrity": "sha1-zZ8dRsRclp6zlj4TBr2Xl+05Tc4=",
+ "version": "2.6.3",
+ "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz",
+ "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==",
"dev": true,
"requires": {
- "enqueue": "0.0.3",
- "extend.js": "0.0.1"
+ "lodash": "^4.17.14"
},
"dependencies": {
- "extend.js": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/extend.js/-/extend.js-0.0.1.tgz",
- "integrity": "sha1-gUxFP0EgGhHgXqCApKcfAWmUrQs=",
+ "lodash": {
+ "version": "4.17.15",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
+ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
"dev": true
}
}
},
- "aws-sign2": {
- "version": "0.6.0",
- "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz",
- "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=",
- "dev": true
- },
- "aws4": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz",
- "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=",
+ "async-limiter": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz",
+ "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==",
"dev": true
},
- "axios": {
- "version": "0.19.0",
- "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.0.tgz",
- "integrity": "sha512-1uvKqKQta3KBxIz14F2v06AEHZ/dIoeKfbTRkK1E5oqjDnuEerLmYTgJB5AiQZHJcljpg1TuRzdjDR06qNk0DQ==",
+ "babel-plugin-dynamic-import-node": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz",
+ "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==",
"dev": true,
"requires": {
- "follow-redirects": "1.5.10",
- "is-buffer": "^2.0.2"
- },
- "dependencies": {
- "is-buffer": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz",
- "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==",
- "dev": true
- }
+ "object.assign": "^4.1.0"
}
},
+ "backo2": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz",
+ "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=",
+ "dev": true
+ },
"balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
"dev": true
},
- "batch": {
- "version": "0.5.3",
- "resolved": "https://registry.npmjs.org/batch/-/batch-0.5.3.tgz",
- "integrity": "sha1-PzQU84AyF0O/wQQvmoP/HVgk1GQ=",
+ "base64-arraybuffer": {
+ "version": "0.1.5",
+ "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz",
+ "integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg=",
"dev": true
},
- "bcrypt-pbkdf": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz",
- "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=",
- "dev": true,
- "optional": true,
- "requires": {
- "tweetnacl": "^0.14.3"
- }
+ "base64id": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/base64id/-/base64id-1.0.0.tgz",
+ "integrity": "sha1-R2iMuZu2gE8OBtPnY7HDLlfY5rY=",
+ "dev": true
},
- "bl": {
- "version": "0.9.5",
- "resolved": "https://registry.npmjs.org/bl/-/bl-0.9.5.tgz",
- "integrity": "sha1-wGt5evCF6gC8Unr8jvzxHeIjIFQ=",
+ "better-assert": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz",
+ "integrity": "sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI=",
"dev": true,
"requires": {
- "readable-stream": "~1.0.26"
- },
- "dependencies": {
- "readable-stream": {
- "version": "1.0.34",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
- "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
- "dev": true,
- "requires": {
- "core-util-is": "~1.0.0",
- "inherits": "~2.0.1",
- "isarray": "0.0.1",
- "string_decoder": "~0.10.x"
- }
- }
+ "callsite": "1.0.0"
}
},
+ "binary-extensions": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz",
+ "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==",
+ "dev": true
+ },
+ "blob": {
+ "version": "0.0.5",
+ "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz",
+ "integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig==",
+ "dev": true
+ },
"bluebird": {
- "version": "2.9.34",
- "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.9.34.tgz",
- "integrity": "sha1-L3tOyAIWMoqf3evfacjUlC/v99g=",
+ "version": "3.7.2",
+ "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
+ "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==",
"dev": true
},
"body-parser": {
@@ -446,41 +1446,69 @@
}
}
},
- "boom": {
- "version": "2.10.1",
- "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz",
- "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=",
+ "brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "requires": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "braces": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
+ "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"dev": true,
"requires": {
- "hoek": "2.x.x"
+ "fill-range": "^7.0.1"
}
},
- "brace-expansion": {
- "version": "1.1.8",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz",
- "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=",
+ "browser-stdout": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.0.tgz",
+ "integrity": "sha1-81HTKWnTL6XXpVZxVCY9korjvR8=",
+ "dev": true
+ },
+ "browserslist": {
+ "version": "4.12.2",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.12.2.tgz",
+ "integrity": "sha512-MfZaeYqR8StRZdstAK9hCKDd2StvePCYp5rHzQCPicUjfFliDgmuaBNPHYUTpAywBN8+Wc/d7NYVFkO0aqaBUw==",
"dev": true,
"requires": {
- "balanced-match": "^1.0.0",
- "concat-map": "0.0.1"
+ "caniuse-lite": "^1.0.30001088",
+ "electron-to-chromium": "^1.3.483",
+ "escalade": "^3.0.1",
+ "node-releases": "^1.1.58"
}
},
- "breakable": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/breakable/-/breakable-1.0.0.tgz",
- "integrity": "sha1-eEp5eRWjjq0nutRWtVcstLuqeME=",
+ "buffer-alloc": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz",
+ "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==",
+ "dev": true,
+ "requires": {
+ "buffer-alloc-unsafe": "^1.1.0",
+ "buffer-fill": "^1.0.0"
+ }
+ },
+ "buffer-alloc-unsafe": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz",
+ "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==",
"dev": true
},
- "buffer-crc32": {
- "version": "0.2.13",
- "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
- "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=",
+ "buffer-fill": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz",
+ "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=",
"dev": true
},
- "buffer-events": {
- "version": "0.0.2",
- "resolved": "https://registry.npmjs.org/buffer-events/-/buffer-events-0.0.2.tgz",
- "integrity": "sha1-r+dtVIPycgniggwyhM6Br8T5mTI=",
+ "builtin-modules": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.1.0.tgz",
+ "integrity": "sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw==",
"dev": true
},
"bytes": {
@@ -489,45 +1517,41 @@
"integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=",
"dev": true
},
+ "callsite": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz",
+ "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=",
+ "dev": true
+ },
"camelcase": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz",
"integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=",
"dev": true
},
- "camelcase-keys": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz",
- "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=",
+ "caniuse-lite": {
+ "version": "1.0.30001090",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001090.tgz",
+ "integrity": "sha512-QzPRKDCyp7RhjczTPZaqK3CjPA5Ht2UnXhZhCI4f7QiB5JK6KEuZBxIzyWnB3wO4hgAj4GMRxAhuiacfw0Psjg==",
+ "dev": true
+ },
+ "catharsis": {
+ "version": "0.8.11",
+ "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.8.11.tgz",
+ "integrity": "sha512-a+xUyMV7hD1BrDQA/3iPV7oc+6W26BgVJO05PGEoatMyIuPScQKsde6i3YorWX1qs+AZjnJ18NqdKoCtKiNh1g==",
"dev": true,
"requires": {
- "camelcase": "^2.0.0",
- "map-obj": "^1.0.0"
+ "lodash": "^4.17.14"
},
"dependencies": {
- "camelcase": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz",
- "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=",
+ "lodash": {
+ "version": "4.17.15",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
+ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
"dev": true
}
}
},
- "caseless": {
- "version": "0.11.0",
- "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz",
- "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=",
- "dev": true
- },
- "catharsis": {
- "version": "0.8.9",
- "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.8.9.tgz",
- "integrity": "sha1-mMyJDKZS3S7w5ws3klMQ/56Q/Is=",
- "dev": true,
- "requires": {
- "underscore-contrib": "~0.3.0"
- }
- },
"center-align": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz",
@@ -538,17 +1562,18 @@
"lazy-cache": "^1.0.3"
}
},
- "chalk": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
- "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
+ "chai": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz",
+ "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==",
"dev": true,
"requires": {
- "ansi-styles": "^2.2.1",
- "escape-string-regexp": "^1.0.2",
- "has-ansi": "^2.0.0",
- "strip-ansi": "^3.0.0",
- "supports-color": "^2.0.0"
+ "assertion-error": "^1.1.0",
+ "check-error": "^1.0.2",
+ "deep-eql": "^3.0.1",
+ "get-func-name": "^2.0.0",
+ "pathval": "^1.1.0",
+ "type-detect": "^4.0.5"
}
},
"charenc": {
@@ -556,14 +1581,26 @@
"resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz",
"integrity": "sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc="
},
- "classifier": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/classifier/-/classifier-0.1.0.tgz",
- "integrity": "sha1-4rGFu6Y7v5J893cO6h63Cus/lZY=",
+ "check-error": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz",
+ "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=",
+ "dev": true
+ },
+ "chokidar": {
+ "version": "3.4.0",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.0.tgz",
+ "integrity": "sha512-aXAaho2VJtisB/1fg1+3nlLJqGOuewTzQpd/Tz0yTg2R0e4IGtshYvtjowyEumcBv2z+y4+kc75Mz7j5xJskcQ==",
"dev": true,
"requires": {
- "redis": ">=0.7.0",
- "underscore": ">=1.1.0"
+ "anymatch": "~3.1.1",
+ "braces": "~3.0.2",
+ "fsevents": "~2.1.2",
+ "glob-parent": "~5.1.0",
+ "is-binary-path": "~2.1.0",
+ "is-glob": "~4.0.1",
+ "normalize-path": "~3.0.0",
+ "readdirp": "~3.4.0"
}
},
"cli": {
@@ -600,320 +1637,101 @@
"resolved": "https://registry.npmjs.org/clone-function/-/clone-function-1.0.6.tgz",
"integrity": "sha1-QoRxk3dQvKnEjsv7wW9uIy90oD0="
},
- "co": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/co/-/co-3.1.0.tgz",
- "integrity": "sha1-TqVOpaCJOBUxheFSEMaNkJK8G3g=",
- "dev": true
- },
- "co-exec": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/co-exec/-/co-exec-1.1.0.tgz",
- "integrity": "sha1-roqMdQLzCfaosPN2ZLCGijT8HHY=",
- "dev": true
- },
- "co-exists": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/co-exists/-/co-exists-0.0.1.tgz",
- "integrity": "sha1-W2tziZJcwAPwSlfRt5hgGpnsCKI=",
- "dev": true,
- "requires": {
- "co-fs": "^1.2.0"
- }
- },
- "co-from-stream": {
- "version": "0.0.0",
- "resolved": "https://registry.npmjs.org/co-from-stream/-/co-from-stream-0.0.0.tgz",
- "integrity": "sha1-GlzYztdyY5RglPo58kmaYyl7yvk=",
- "dev": true,
- "requires": {
- "co-read": "0.0.1"
- }
- },
- "co-fs": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/co-fs/-/co-fs-1.2.0.tgz",
- "integrity": "sha1-pt8EXOWMBO7UVYb/Q4UDKBOrpk4=",
- "dev": true,
- "requires": {
- "co-from-stream": "0.0.0",
- "thunkify": "0.0.1"
- },
- "dependencies": {
- "thunkify": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/thunkify/-/thunkify-0.0.1.tgz",
- "integrity": "sha1-vV02sQabQHjl3LrI+rRTWb6mGD0=",
- "dev": true
- }
- }
- },
- "co-parallel": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/co-parallel/-/co-parallel-1.0.0.tgz",
- "integrity": "sha1-WFl6BlgAWkK4xqI8yE2ioQ2Ubyo=",
- "dev": true,
- "requires": {
- "co-thread": "0.0.1"
- }
- },
- "co-read": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/co-read/-/co-read-0.0.1.tgz",
- "integrity": "sha1-+Bs+uKhmdf7FHj2IOn9WToc8k4k=",
- "dev": true
- },
- "co-thread": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/co-thread/-/co-thread-0.0.1.tgz",
- "integrity": "sha1-V3E/DvS4flWV1PI3Ef/ks7beXnQ=",
- "dev": true
- },
- "co-timeout": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/co-timeout/-/co-timeout-0.1.0.tgz",
- "integrity": "sha1-75X7Onp65iPLuwTMw917ZK4Kmzs=",
+ "color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"dev": true,
"requires": {
- "co": "^3.0.6",
- "ms": "^0.6.2"
- },
- "dependencies": {
- "ms": {
- "version": "0.6.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-0.6.2.tgz",
- "integrity": "sha1-2JwhJMb9wTU9Zai3e/GqxLGTcIw=",
- "dev": true
- }
+ "color-name": "1.1.3"
}
},
- "code-point-at": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
- "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
+ "color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
"dev": true
},
- "combine-source-map": {
- "version": "0.4.0",
- "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.4.0.tgz",
- "integrity": "sha1-JSuoDQFA/UOWysu1JtjHnMKVLs4=",
- "dev": true,
- "requires": {
- "convert-source-map": "~0.3.0",
- "inline-source-map": "~0.3.0",
- "source-map": "~0.1.31"
- },
- "dependencies": {
- "convert-source-map": {
- "version": "0.3.5",
- "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-0.3.5.tgz",
- "integrity": "sha1-8dgClQr33SYxof6+BZZVDIarMZA=",
- "dev": true
- },
- "source-map": {
- "version": "0.1.43",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz",
- "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=",
- "dev": true,
- "requires": {
- "amdefine": ">=0.0.4"
- }
- }
- }
- },
- "combined-stream": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz",
- "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=",
- "dev": true,
- "requires": {
- "delayed-stream": "~1.0.0"
- }
- },
- "commander": {
- "version": "2.12.2",
- "resolved": "https://registry.npmjs.org/commander/-/commander-2.12.2.tgz",
- "integrity": "sha512-BFnaq5ZOGcDN7FlrtBT4xxkgIToalIIxwjxLWVJ8bGTpe1LroqMiqQXdA7ygc7CRvaYS+9zfPGFnJqFSayx+AA==",
+ "colors": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz",
+ "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==",
"dev": true
},
- "commoner": {
- "version": "0.10.8",
- "resolved": "https://registry.npmjs.org/commoner/-/commoner-0.10.8.tgz",
- "integrity": "sha1-NPw2cs0kOT6LtH5wyqApOBH08sU=",
- "dev": true,
- "requires": {
- "commander": "^2.5.0",
- "detective": "^4.3.1",
- "glob": "^5.0.15",
- "graceful-fs": "^4.1.2",
- "iconv-lite": "^0.4.5",
- "mkdirp": "^0.5.0",
- "private": "^0.1.6",
- "q": "^1.1.2",
- "recast": "^0.11.17"
- },
- "dependencies": {
- "detective": {
- "version": "4.7.1",
- "resolved": "https://registry.npmjs.org/detective/-/detective-4.7.1.tgz",
- "integrity": "sha512-H6PmeeUcZloWtdt4DAkFyzFL94arpHr3NOwwmVILFiy+9Qd4JTxxXrzfyGk/lmct2qVGBwTSwSXagqu2BxmWig==",
- "dev": true,
- "requires": {
- "acorn": "^5.2.1",
- "defined": "^1.0.0"
- }
- },
- "esprima": {
- "version": "3.1.3",
- "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz",
- "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=",
- "dev": true
- },
- "glob": {
- "version": "5.0.15",
- "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz",
- "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=",
- "dev": true,
- "requires": {
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "2 || 3",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
- }
- },
- "graceful-fs": {
- "version": "4.2.3",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz",
- "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==",
- "dev": true
- },
- "recast": {
- "version": "0.11.23",
- "resolved": "https://registry.npmjs.org/recast/-/recast-0.11.23.tgz",
- "integrity": "sha1-RR/TAEqx5N+bTktmN2sqIZEkYtM=",
- "dev": true,
- "requires": {
- "ast-types": "0.9.6",
- "esprima": "~3.1.0",
- "private": "~0.1.5",
- "source-map": "~0.5.0"
- }
- }
- }
- },
"component-bind": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz",
"integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E=",
"dev": true
},
- "component-clone": {
- "version": "0.2.3",
- "resolved": "https://registry.npmjs.org/component-clone/-/component-clone-0.2.3.tgz",
- "integrity": "sha1-3mQOGgDLL0H5/E5IgIjiUdzxVGg=",
- "dev": true,
- "requires": {
- "component-type": "*"
- }
- },
- "component-emitter": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.1.2.tgz",
- "integrity": "sha1-KWWU8nU9qmOZbSrwjRWpURbJrsM=",
- "dev": true
- },
- "component-type": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/component-type/-/component-type-1.2.1.tgz",
- "integrity": "sha1-ikeQFwAjjk/DIml3EjAibyS0Fak=",
+ "component-inherit": {
+ "version": "0.0.3",
+ "resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz",
+ "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=",
"dev": true
},
- "compress-commons": {
- "version": "0.2.9",
- "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-0.2.9.tgz",
- "integrity": "sha1-Qi2SdDDAGr0GzUVbbfwEy0z4ADw=",
- "dev": true,
- "requires": {
- "buffer-crc32": "~0.2.1",
- "crc32-stream": "~0.3.1",
- "node-int64": "~0.3.0",
- "readable-stream": "~1.0.26"
- },
- "dependencies": {
- "readable-stream": {
- "version": "1.0.34",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
- "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
- "dev": true,
- "requires": {
- "core-util-is": "~1.0.0",
- "inherits": "~2.0.1",
- "isarray": "0.0.1",
- "string_decoder": "~0.10.x"
- }
- }
- }
- },
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
"dev": true
},
- "concat-stream": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz",
- "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=",
+ "connect": {
+ "version": "3.7.0",
+ "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz",
+ "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==",
"dev": true,
"requires": {
- "inherits": "^2.0.3",
- "readable-stream": "^2.2.2",
- "typedarray": "^0.0.6"
+ "debug": "2.6.9",
+ "finalhandler": "1.1.2",
+ "parseurl": "~1.3.3",
+ "utils-merge": "1.0.1"
},
"dependencies": {
- "isarray": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
- "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
- "dev": true
- },
- "readable-stream": {
- "version": "2.3.3",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz",
- "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==",
+ "debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"dev": true,
"requires": {
- "core-util-is": "~1.0.0",
- "inherits": "~2.0.3",
- "isarray": "~1.0.0",
- "process-nextick-args": "~1.0.6",
- "safe-buffer": "~5.1.1",
- "string_decoder": "~1.0.3",
- "util-deprecate": "~1.0.1"
+ "ms": "2.0.0"
}
},
- "string_decoder": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
- "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
+ "encodeurl": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
+ "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=",
+ "dev": true
+ },
+ "finalhandler": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz",
+ "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==",
"dev": true,
"requires": {
- "safe-buffer": "~5.1.0"
+ "debug": "2.6.9",
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "on-finished": "~2.3.0",
+ "parseurl": "~1.3.3",
+ "statuses": "~1.5.0",
+ "unpipe": "~1.0.0"
}
+ },
+ "parseurl": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
+ "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
+ "dev": true
+ },
+ "statuses": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
+ "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=",
+ "dev": true
}
}
},
- "config-chain": {
- "version": "1.1.12",
- "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.12.tgz",
- "integrity": "sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA==",
- "dev": true,
- "requires": {
- "ini": "^1.3.4",
- "proto-list": "~1.2.1"
- }
- },
"console-browserify": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz",
@@ -923,12 +1741,6 @@
"date-now": "^0.1.4"
}
},
- "console-control-strings": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
- "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",
- "dev": true
- },
"content-disposition": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz",
@@ -941,53 +1753,6 @@
"integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==",
"dev": true
},
- "conventional-changelog": {
- "version": "0.0.17",
- "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-0.0.17.tgz",
- "integrity": "sha1-XgIWYA9GhhkPDILvuws90RtJzjQ=",
- "dev": true,
- "requires": {
- "dateformat": "^1.0.11",
- "event-stream": "^3.3.0",
- "github-url-from-git": "^1.4.0",
- "lodash": "^3.6.0",
- "normalize-package-data": "^1.0.3"
- },
- "dependencies": {
- "lodash": {
- "version": "3.10.1",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",
- "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=",
- "dev": true
- },
- "normalize-package-data": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-1.0.3.tgz",
- "integrity": "sha1-i+lVuJB6+XXxpFhOqLubQUkjEvU=",
- "dev": true,
- "requires": {
- "github-url-from-git": "^1.3.0",
- "github-url-from-username-repo": "^1.0.0",
- "semver": "2 || 3 || 4"
- }
- },
- "semver": {
- "version": "4.3.6",
- "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz",
- "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=",
- "dev": true
- }
- }
- },
- "convert-source-map": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz",
- "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==",
- "dev": true,
- "requires": {
- "safe-buffer": "~5.1.1"
- }
- },
"cookie": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz",
@@ -1000,13 +1765,22 @@
"integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=",
"dev": true
},
- "cookies": {
- "version": "0.4.1",
- "resolved": "https://registry.npmjs.org/cookies/-/cookies-0.4.1.tgz",
- "integrity": "sha1-fUO9AFg8mFrMAyJYuXmIt9A7Yp4=",
+ "core-js-compat": {
+ "version": "3.6.5",
+ "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.6.5.tgz",
+ "integrity": "sha512-7ItTKOhOZbznhXAQ2g/slGg1PJV5zDO/WdkTwi7UEOJmkvsE32PWvx6mKtDjiMpjnR2CNf6BAD6sSxIlv7ptng==",
"dev": true,
"requires": {
- "keygrip": "~1.0.0"
+ "browserslist": "^4.8.5",
+ "semver": "7.0.0"
+ },
+ "dependencies": {
+ "semver": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz",
+ "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==",
+ "dev": true
+ }
}
},
"core-util-is": {
@@ -1015,106 +1789,35 @@
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
"dev": true
},
- "cp": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/cp/-/cp-0.2.0.tgz",
- "integrity": "sha1-oIdBg6CeiF63J5JYKraM45MrE10=",
- "dev": true
- },
- "crc32-stream": {
- "version": "0.3.4",
- "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-0.3.4.tgz",
- "integrity": "sha1-c7wltF+sHbZjIjGnv86JJ+nwZVI=",
- "dev": true,
- "requires": {
- "buffer-crc32": "~0.2.1",
- "readable-stream": "~1.0.24"
- },
- "dependencies": {
- "readable-stream": {
- "version": "1.0.34",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
- "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
- "dev": true,
- "requires": {
- "core-util-is": "~1.0.0",
- "inherits": "~2.0.1",
- "isarray": "0.0.1",
- "string_decoder": "~0.10.x"
- }
- }
- }
- },
"crypt": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz",
"integrity": "sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs="
},
- "cryptiles": {
- "version": "2.0.5",
- "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz",
- "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=",
- "dev": true,
- "requires": {
- "boom": "2.x.x"
- }
- },
- "ctype": {
- "version": "0.5.3",
- "resolved": "https://registry.npmjs.org/ctype/-/ctype-0.5.3.tgz",
- "integrity": "sha1-gsGMJGH3QRTvFsE1IkrQuRRMoS8=",
+ "custom-event": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz",
+ "integrity": "sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU=",
+ "dev": true
+ },
+ "date-fns": {
+ "version": "1.30.1",
+ "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.30.1.tgz",
+ "integrity": "sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==",
+ "dev": true
+ },
+ "date-format": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/date-format/-/date-format-2.1.0.tgz",
+ "integrity": "sha512-bYQuGLeFxhkxNOF3rcMtiZxvCBAquGzZm6oWA1oZ0g2THUzivaRhv8uOhdr19LmoobSOLoIAxeUK2RdbM8IFTA==",
"dev": true
},
- "currently-unhandled": {
- "version": "0.4.1",
- "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz",
- "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=",
- "dev": true,
- "requires": {
- "array-find-index": "^1.0.1"
- }
- },
- "dashdash": {
- "version": "1.14.1",
- "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
- "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
- "dev": true,
- "requires": {
- "assert-plus": "^1.0.0"
- },
- "dependencies": {
- "assert-plus": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
- "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
- "dev": true
- }
- }
- },
"date-now": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz",
"integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=",
"dev": true
},
- "dateformat": {
- "version": "1.0.12",
- "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz",
- "integrity": "sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk=",
- "dev": true,
- "requires": {
- "get-stdin": "^4.0.1",
- "meow": "^3.3.0"
- },
- "dependencies": {
- "get-stdin": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz",
- "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=",
- "dev": true
- }
- }
- },
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
@@ -1130,69 +1833,23 @@
"integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
"dev": true
},
- "defined": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz",
- "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=",
- "dev": true
- },
- "defs": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/defs/-/defs-1.1.1.tgz",
- "integrity": "sha1-siYJ8sehG6ej2xFoBcE5scr/qdI=",
- "dev": true,
- "requires": {
- "alter": "~0.2.0",
- "ast-traverse": "~0.1.1",
- "breakable": "~1.0.0",
- "esprima-fb": "~15001.1001.0-dev-harmony-fb",
- "simple-fmt": "~0.1.0",
- "simple-is": "~0.2.0",
- "stringmap": "~0.2.2",
- "stringset": "~0.2.1",
- "tryor": "~0.1.2",
- "yargs": "~3.27.0"
- },
- "dependencies": {
- "esprima-fb": {
- "version": "15001.1001.0-dev-harmony-fb",
- "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1001.0-dev-harmony-fb.tgz",
- "integrity": "sha1-Q761fsJujPI3092LM+QlM1d/Jlk=",
- "dev": true
- },
- "window-size": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz",
- "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=",
- "dev": true
- },
- "yargs": {
- "version": "3.27.0",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.27.0.tgz",
- "integrity": "sha1-ISBUaTFuk5Ex1Z8toMbX+YIh6kA=",
- "dev": true,
- "requires": {
- "camelcase": "^1.2.1",
- "cliui": "^2.1.0",
- "decamelize": "^1.0.0",
- "os-locale": "^1.4.0",
- "window-size": "^0.1.2",
- "y18n": "^3.2.0"
- }
- }
+ "deep-eql": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz",
+ "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==",
+ "dev": true,
+ "requires": {
+ "type-detect": "^4.0.0"
}
},
- "delayed-stream": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
- "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
- "dev": true
- },
- "delegates": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/delegates/-/delegates-0.1.0.tgz",
- "integrity": "sha1-tLV74RoWU1F6BLJ/CUm9wyff45A=",
- "dev": true
+ "define-properties": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
+ "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
+ "dev": true,
+ "requires": {
+ "object-keys": "^1.0.12"
+ }
},
"depd": {
"version": "1.1.1",
@@ -1206,82 +1863,52 @@
"integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=",
"dev": true
},
- "detective": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/detective/-/detective-3.1.0.tgz",
- "integrity": "sha1-d3gkRKt1K4jKG+Lp0KA5Xx2iXu0=",
- "dev": true,
- "requires": {
- "escodegen": "~1.1.0",
- "esprima-fb": "3001.1.0-dev-harmony-fb"
- },
- "dependencies": {
- "esprima-fb": {
- "version": "3001.1.0-dev-harmony-fb",
- "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-3001.0001.0000-dev-harmony-fb.tgz",
- "integrity": "sha1-t303q8046gt3Qmu4vCkizmtCZBE=",
- "dev": true
- }
- }
+ "di": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz",
+ "integrity": "sha1-gGZJMmzqp8qjMG112YXqJ0i6kTw=",
+ "dev": true
},
- "dethroy": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/dethroy/-/dethroy-1.0.2.tgz",
- "integrity": "sha1-yCADMXaT3LzaP3UrAYLjvxbdRCE=",
+ "diff": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/diff/-/diff-3.3.1.tgz",
+ "integrity": "sha512-MKPHZDMB0o6yHyDryUOScqZibp914ksXwAMYMTHj6KO8UeKsRYNJD3oNCKjTqZon+V488P7N/HzXF8t7ZR95ww==",
"dev": true
},
- "dezalgo": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.3.tgz",
- "integrity": "sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY=",
+ "dom-serialize": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz",
+ "integrity": "sha1-ViromZ9Evl6jB29UGdzVnrQ6yVs=",
"dev": true,
"requires": {
- "asap": "^2.0.0",
- "wrappy": "1"
- },
- "dependencies": {
- "asap": {
- "version": "2.0.6",
- "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
- "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=",
- "dev": true
- }
+ "custom-event": "~1.0.0",
+ "ent": "~2.2.0",
+ "extend": "^3.0.0",
+ "void-elements": "^2.0.0"
}
},
- "diff": {
- "version": "1.0.8",
- "resolved": "https://registry.npmjs.org/diff/-/diff-1.0.8.tgz",
- "integrity": "sha1-NDJ2MI7Jkbe8giZ+1VvBQR+XFmY=",
- "dev": true
- },
"dom-serializer": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz",
- "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=",
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz",
+ "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==",
"dev": true,
"requires": {
- "domelementtype": "~1.1.1",
- "entities": "~1.1.1"
+ "domelementtype": "^2.0.1",
+ "entities": "^2.0.0"
},
"dependencies": {
"domelementtype": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz",
- "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=",
- "dev": true
- },
- "entities": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz",
- "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.1.tgz",
+ "integrity": "sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ==",
"dev": true
}
}
},
"domelementtype": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz",
- "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=",
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz",
+ "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==",
"dev": true
},
"domhandler": {
@@ -1303,378 +1930,109 @@
"domelementtype": "1"
}
},
- "double-ended-queue": {
- "version": "2.1.0-0",
- "resolved": "https://registry.npmjs.org/double-ended-queue/-/double-ended-queue-2.1.0-0.tgz",
- "integrity": "sha1-ED01J/0xUo9AGIEwyEHv3XgmTlw=",
- "dev": true
- },
- "duo": {
- "version": "0.12.3",
- "resolved": "https://registry.npmjs.org/duo/-/duo-0.12.3.tgz",
- "integrity": "sha1-mWfNvFKbmTrTB4ANrWMx9NEejjw=",
- "dev": true,
- "requires": {
- "archy": "^1.0.0",
- "atomic-json": "0.0.4",
- "batch": "^0.5.1",
- "bytes": "^2.1.0",
- "co": "^3.1.0",
- "co-exists": "0.0.1",
- "co-fs": "~1.2.0",
- "co-parallel": "~1.0.0",
- "commander": "^2.2.0",
- "component-clone": "^0.2.2",
- "convert-source-map": "^1.1.1",
- "cp": "^0.2.0",
- "debug": "^2.0.0",
- "delegates": "^0.1.0",
- "duo-css-compat": "^0.2.0",
- "duo-main": "^0.0.3",
- "duo-pack": "^3.0.0",
- "duo-package": "^0.9.0",
- "duo-parse": "^0.2.0",
- "duo-string-to-js": "~0.1.0",
- "duo-test": "0.x",
- "duo-watch": "^0.1.1",
- "extend.js": "0.0.2",
- "file-deps": "^0.0.7",
- "get-stdin": "^4.0.1",
- "glob": "^5.0.10",
- "has-generators": "^1.0.1",
- "json-mask": "^0.3.1",
- "language-classifier": "0.0.1",
- "mkdirp": "^0.5.0",
- "node-netrc": "0.0.1",
- "path-search": "^1.0.0",
- "rimraf-then": "^1.0.0",
- "stream-log": "^0.2.3",
- "thunkify": "~2.1.1",
- "unyield": "0.0.1",
- "ware": "^1.2.0",
- "win-fork": "^1.1.1"
- },
- "dependencies": {
- "bytes": {
- "version": "2.5.0",
- "resolved": "https://registry.npmjs.org/bytes/-/bytes-2.5.0.tgz",
- "integrity": "sha1-TJQj6i0lLCcMQbK97+/5u2tiwGo=",
- "dev": true
- },
- "debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "dev": true,
- "requires": {
- "ms": "2.0.0"
- }
- },
- "glob": {
- "version": "5.0.15",
- "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz",
- "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=",
- "dev": true,
- "requires": {
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "2 || 3",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
- }
- }
- }
- },
- "duo-css-compat": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/duo-css-compat/-/duo-css-compat-0.2.0.tgz",
- "integrity": "sha1-ce/gmVUHpsfet4v2GR6eh4DzJew=",
- "dev": true,
- "requires": {
- "co-fs": "^1.2.0",
- "debug": "^2.0.0",
- "duo-main": "0.0.3",
- "duo-package": "^0.9.0"
- },
- "dependencies": {
- "debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "dev": true,
- "requires": {
- "ms": "2.0.0"
- }
- }
- }
- },
- "duo-main": {
- "version": "0.0.3",
- "resolved": "https://registry.npmjs.org/duo-main/-/duo-main-0.0.3.tgz",
- "integrity": "sha1-sBI9aMYN75sp10cpy6HLT4eYarM=",
- "dev": true,
- "requires": {
- "component-type": "^1.0.0",
- "mocha": "^1.20.1"
- }
- },
- "duo-pack": {
- "version": "3.0.5",
- "resolved": "https://registry.npmjs.org/duo-pack/-/duo-pack-3.0.5.tgz",
- "integrity": "sha1-MFS2QHoLLR4UBy3JJxwI8bRAKCs=",
- "dev": true,
- "requires": {
- "combine-source-map": "^0.4.0",
- "convert-source-map": "^0.5.0",
- "debug": "^2.1.3",
- "file-deps": "0.0.x"
- },
- "dependencies": {
- "convert-source-map": {
- "version": "0.5.1",
- "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-0.5.1.tgz",
- "integrity": "sha1-vrgPOyLeBf1FkUEPSUvOvmNKBX4=",
- "dev": true
- },
- "debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "dev": true,
- "requires": {
- "ms": "2.0.0"
- }
- }
- }
- },
- "duo-package": {
- "version": "0.9.0",
- "resolved": "https://registry.npmjs.org/duo-package/-/duo-package-0.9.0.tgz",
- "integrity": "sha1-Hk2hc088bO1G9B5WZexpl1dCb4c=",
- "dev": true,
- "requires": {
- "co-fs": "^1.2.0",
- "debug": "^2.0.0",
- "enstore": "0.0.2",
- "gh-resolve": "^3.0.3",
- "mkdirp-then": "^1.0.1",
- "request": "^2.36.0",
- "rimraf-then": "^1.0.0",
- "semver": "~2.3.0",
- "tar-fs": "^0.4.1",
- "thunkify": "0.0.1",
- "unyield": "0.0.1"
- },
- "dependencies": {
- "debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "dev": true,
- "requires": {
- "ms": "2.0.0"
- }
- },
- "semver": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-2.3.2.tgz",
- "integrity": "sha1-uYSPJdbPNjMwc+ye+IVtQvEjPlI=",
- "dev": true
- },
- "thunkify": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/thunkify/-/thunkify-0.0.1.tgz",
- "integrity": "sha1-vV02sQabQHjl3LrI+rRTWb6mGD0=",
- "dev": true
- }
- }
- },
- "duo-parse": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/duo-parse/-/duo-parse-0.2.1.tgz",
- "integrity": "sha1-kXatmrEH0BtBqnJEzos6aGktToI=",
- "dev": true,
- "requires": {
- "debug": "^2.2.0"
- },
- "dependencies": {
- "debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "dev": true,
- "requires": {
- "ms": "2.0.0"
- }
- }
- }
- },
- "duo-string-to-js": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/duo-string-to-js/-/duo-string-to-js-0.1.2.tgz",
- "integrity": "sha1-k3URnf8ywPA0+vO9Cz4oETNLH+s=",
- "dev": true,
- "requires": {
- "string-to-js": "0.0.1"
- }
- },
- "duo-test": {
- "version": "0.4.1",
- "resolved": "https://registry.npmjs.org/duo-test/-/duo-test-0.4.1.tgz",
- "integrity": "sha1-ZfTYNYmWNLIZ4dBjaqRPIH39bAs=",
- "dev": true,
- "requires": {
- "bluebird": "^2.9.6",
- "buffer-events": "0.0.2",
- "co": "^3.1.0",
- "co-exec": "^1.1.0",
- "co-fs": "^1.2.0",
- "co-timeout": "^0.1.0",
- "commander": "^2.2.0",
- "debug": "^1.0.2",
- "gnode": "^0.1.0",
- "incasesensitive": "^1.0.0",
- "koa": "^0.8.1",
- "koa-route": "^1.1.4",
- "koa-static": "^1.4.6",
- "localtunnel": "^1.3.0",
- "mocha": "^1.21.4",
- "open": "0.0.5",
- "queue-component": "git://github.com/component/queue.git#23dbce0f19a714b020b4fc52ed07ac0365c9b449",
- "thunkify": "^2.1.2",
- "to-pascal-case": "0.0.2",
- "wd": "^0.3.3",
- "wd-browser": "1.1.0",
- "which": "^1.1.1",
- "win-fork": "^1.1.1"
- },
- "dependencies": {
- "debug": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/debug/-/debug-1.0.5.tgz",
- "integrity": "sha1-9yQSF0MPmd7EwrRz6rkiKOh0wqw=",
- "dev": true,
- "requires": {
- "ms": "2.0.0"
- }
- }
- }
- },
- "duo-watch": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/duo-watch/-/duo-watch-0.1.1.tgz",
- "integrity": "sha1-x6kOCZw5h/sXIuC/iPuG+cnKYbw=",
- "dev": true,
- "requires": {
- "debug": "^1.0.2",
- "minimatch": "^1.0.0",
- "sane": "~0.5.4"
- },
- "dependencies": {
- "debug": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/debug/-/debug-1.0.5.tgz",
- "integrity": "sha1-9yQSF0MPmd7EwrRz6rkiKOh0wqw=",
- "dev": true,
- "requires": {
- "ms": "2.0.0"
- }
- },
- "minimatch": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-1.0.0.tgz",
- "integrity": "sha1-4N0hILSeG3JM6NcUxSCCKpQ4V20=",
- "dev": true,
- "requires": {
- "lru-cache": "2",
- "sigmund": "~1.0.0"
- }
- }
- }
- },
- "duplexer": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz",
- "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=",
- "dev": true
- },
- "ecc-jsbn": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz",
- "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=",
- "dev": true,
- "optional": true,
- "requires": {
- "jsbn": "~0.1.0"
- }
- },
"ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
"integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=",
"dev": true
},
+ "electron-to-chromium": {
+ "version": "1.3.483",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.483.tgz",
+ "integrity": "sha512-+05RF8S9rk8S0G8eBCqBRBaRq7+UN3lDs2DAvnG8SBSgQO3hjy0+qt4CmRk5eiuGbTcaicgXfPmBi31a+BD3lg==",
+ "dev": true
+ },
"encodeurl": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz",
"integrity": "sha1-eePVhlU0aQn+bw9Fpd5oEDspTSA=",
"dev": true
},
- "end-of-stream": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.0.0.tgz",
- "integrity": "sha1-1FlucCc0qT5A6a+GQxnqvZn/Lw4=",
+ "engine.io": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.2.1.tgz",
+ "integrity": "sha512-+VlKzHzMhaU+GsCIg4AoXF1UdDFjHHwMmMKqMJNDNLlUlejz58FCy4LBqB2YVJskHGYl06BatYWKP2TVdVXE5w==",
"dev": true,
"requires": {
- "once": "~1.3.0"
+ "accepts": "~1.3.4",
+ "base64id": "1.0.0",
+ "cookie": "0.3.1",
+ "debug": "~3.1.0",
+ "engine.io-parser": "~2.1.0",
+ "ws": "~3.3.1"
+ }
+ },
+ "engine.io-client": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.2.1.tgz",
+ "integrity": "sha512-y5AbkytWeM4jQr7m/koQLc5AxpRKC1hEVUb/s1FUAWEJq5AzJJ4NLvzuKPuxtDi5Mq755WuDvZ6Iv2rXj4PTzw==",
+ "dev": true,
+ "requires": {
+ "component-emitter": "1.2.1",
+ "component-inherit": "0.0.3",
+ "debug": "~3.1.0",
+ "engine.io-parser": "~2.1.1",
+ "has-cors": "1.1.0",
+ "indexof": "0.0.1",
+ "parseqs": "0.0.5",
+ "parseuri": "0.0.5",
+ "ws": "~3.3.1",
+ "xmlhttprequest-ssl": "~1.5.4",
+ "yeast": "0.1.2"
},
"dependencies": {
- "once": {
- "version": "1.3.3",
- "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz",
- "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=",
- "dev": true,
- "requires": {
- "wrappy": "1"
- }
+ "component-emitter": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz",
+ "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=",
+ "dev": true
}
}
},
- "enqueue": {
- "version": "0.0.3",
- "resolved": "https://registry.npmjs.org/enqueue/-/enqueue-0.0.3.tgz",
- "integrity": "sha1-EBmUyu+4Ly6dv7Ml8jPtWCYrGCU=",
- "dev": true
- },
- "enstore": {
- "version": "0.0.2",
- "resolved": "https://registry.npmjs.org/enstore/-/enstore-0.0.2.tgz",
- "integrity": "sha1-lPsqYE6PL6u6EOvk/TPgnPN/83w=",
+ "engine.io-parser": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.1.3.tgz",
+ "integrity": "sha512-6HXPre2O4Houl7c4g7Ic/XzPnHBvaEmN90vtRO9uLmwtRqQmTOw0QMevL1TOfL2Cpu1VzsaTmMotQgMdkzGkVA==",
"dev": true,
"requires": {
- "monotonic-timestamp": "0.0.8",
- "through": "~2.2.7"
+ "after": "0.8.2",
+ "arraybuffer.slice": "~0.0.7",
+ "base64-arraybuffer": "0.1.5",
+ "blob": "0.0.5",
+ "has-binary2": "~1.0.2"
}
},
+ "ent": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz",
+ "integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=",
+ "dev": true
+ },
"entities": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz",
- "integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY=",
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.3.tgz",
+ "integrity": "sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==",
"dev": true
},
- "error-ex": {
- "version": "1.3.2",
- "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
- "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
+ "es6-promise": {
+ "version": "4.2.8",
+ "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz",
+ "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==",
+ "dev": true
+ },
+ "es6-promisify": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz",
+ "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=",
"dev": true,
"requires": {
- "is-arrayish": "^0.2.1"
+ "es6-promise": "^4.0.3"
}
},
- "error-inject": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/error-inject/-/error-inject-1.0.0.tgz",
- "integrity": "sha1-4rPZG1Su1nLzCdlQ0VSFD6EdTzc=",
+ "escalade": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.0.1.tgz",
+ "integrity": "sha512-DR6NO3h9niOT+MZs7bjxlj2a1k+POu5RN8CLTPX2+i78bRi9eLe7+0zXgUHMnGXWybYcL61E9hGhPKqedy8tQA==",
"dev": true
},
"escape-html": {
@@ -1683,64 +2041,16 @@
"integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=",
"dev": true
},
- "escape-regexp": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/escape-regexp/-/escape-regexp-0.0.1.tgz",
- "integrity": "sha1-9EvaEtRbvfnLf4Yu5+SCez3TIlQ=",
- "dev": true
- },
"escape-string-regexp": {
"version": "1.0.5",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
- "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
- "dev": true
- },
- "escodegen": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.1.0.tgz",
- "integrity": "sha1-xmOSP24gqtSNDA+knzHG1PSTYM8=",
- "dev": true,
- "requires": {
- "esprima": "~1.0.4",
- "estraverse": "~1.5.0",
- "esutils": "~1.0.0",
- "source-map": "~0.1.30"
- },
- "dependencies": {
- "esprima": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz",
- "integrity": "sha1-n1V+CPw7TSbs6d00+Pv0drYlha0=",
- "dev": true
- },
- "source-map": {
- "version": "0.1.43",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz",
- "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=",
- "dev": true,
- "optional": true,
- "requires": {
- "amdefine": ">=0.0.4"
- }
- }
- }
- },
- "espree": {
- "version": "2.2.5",
- "resolved": "https://registry.npmjs.org/espree/-/espree-2.2.5.tgz",
- "integrity": "sha1-32kbkxCIlAKuspzAZnCMVmkLhUs=",
- "dev": true
- },
- "estraverse": {
- "version": "1.5.1",
- "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.5.1.tgz",
- "integrity": "sha1-hno+jlip+EYYr7bC3bzZFrfLr3E=",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
"dev": true
},
- "esutils": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/esutils/-/esutils-1.0.0.tgz",
- "integrity": "sha1-gVHTWOIMisx/t0XnRywAJf5JZXA=",
+ "estree-walker": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz",
+ "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==",
"dev": true
},
"etag": {
@@ -1749,28 +2059,11 @@
"integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=",
"dev": true
},
- "event-stream": {
- "version": "3.3.5",
- "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.5.tgz",
- "integrity": "sha512-vyibDcu5JL20Me1fP734QBH/kenBGLZap2n0+XXM7mvuUPzJ20Ydqj1aKcIeMdri1p+PU+4yAKugjN8KCVst+g==",
- "dev": true,
- "requires": {
- "duplexer": "^0.1.1",
- "from": "^0.1.7",
- "map-stream": "0.0.7",
- "pause-stream": "^0.0.11",
- "split": "^1.0.1",
- "stream-combiner": "^0.2.2",
- "through": "^2.3.8"
- },
- "dependencies": {
- "through": {
- "version": "2.3.8",
- "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
- "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
- "dev": true
- }
- }
+ "eventemitter3": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz",
+ "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==",
+ "dev": true
},
"exit": {
"version": "0.1.2",
@@ -1833,96 +2126,13 @@
"integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=",
"dev": true
},
- "extend.js": {
- "version": "0.0.2",
- "resolved": "https://registry.npmjs.org/extend.js/-/extend.js-0.0.2.tgz",
- "integrity": "sha1-D5x6gaHyCLcD6wwxMf5XFqxuzRU=",
- "dev": true
- },
- "extract-zip": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.5.0.tgz",
- "integrity": "sha1-ksz22B73Cp+kwXRxFMzvbYaIpsQ=",
- "dev": true,
- "requires": {
- "concat-stream": "1.5.0",
- "debug": "0.7.4",
- "mkdirp": "0.5.0",
- "yauzl": "2.4.1"
- },
- "dependencies": {
- "concat-stream": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.0.tgz",
- "integrity": "sha1-U/fUPFHF5D+ByP3QMyHGMb5o1hE=",
- "dev": true,
- "requires": {
- "inherits": "~2.0.1",
- "readable-stream": "~2.0.0",
- "typedarray": "~0.0.5"
- }
- },
- "debug": {
- "version": "0.7.4",
- "resolved": "https://registry.npmjs.org/debug/-/debug-0.7.4.tgz",
- "integrity": "sha1-BuHqgILCyxTjmAbiLi9vdX+Srzk=",
- "dev": true
- },
- "isarray": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
- "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
- "dev": true
- },
- "mkdirp": {
- "version": "0.5.0",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz",
- "integrity": "sha1-HXMHam35hs2TROFecfzAWkyavxI=",
- "dev": true,
- "requires": {
- "minimist": "0.0.8"
- }
- },
- "readable-stream": {
- "version": "2.0.6",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz",
- "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=",
- "dev": true,
- "requires": {
- "core-util-is": "~1.0.0",
- "inherits": "~2.0.1",
- "isarray": "~1.0.0",
- "process-nextick-args": "~1.0.6",
- "string_decoder": "~0.10.x",
- "util-deprecate": "~1.0.1"
- }
- }
- }
- },
- "extsprintf": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
- "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
- "dev": true
- },
- "fd-slicer": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz",
- "integrity": "sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU=",
- "dev": true,
- "requires": {
- "pend": "~1.2.0"
- }
- },
- "file-deps": {
- "version": "0.0.7",
- "resolved": "https://registry.npmjs.org/file-deps/-/file-deps-0.0.7.tgz",
- "integrity": "sha1-fPusu76qpUZDHe2XAvcMzbOwYcU=",
+ "fill-range": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
+ "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"dev": true,
"requires": {
- "detective": "^3.1.0",
- "escape-regexp": "0.0.1",
- "mini-tokenizer": "~0.1.2"
+ "to-regex-range": "^5.0.1"
}
},
"finalhandler": {
@@ -1951,32 +2161,11 @@
}
}
},
- "find-up": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
- "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=",
- "dev": true,
- "requires": {
- "path-exists": "^2.0.0",
- "pinkie-promise": "^2.0.0"
- }
- },
- "finished": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/finished/-/finished-1.2.2.tgz",
- "integrity": "sha1-QWCOr639ZWg7RqEiC8Sx7D2u3Ng=",
- "dev": true,
- "requires": {
- "ee-first": "1.0.3"
- },
- "dependencies": {
- "ee-first": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.0.3.tgz",
- "integrity": "sha1-bJjECJq+y1p7hcGsRJqmA9Oz2r4=",
- "dev": true
- }
- }
+ "flatted": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz",
+ "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==",
+ "dev": true
},
"follow-redirects": {
"version": "1.5.10",
@@ -1987,29 +2176,6 @@
"debug": "=3.1.0"
}
},
- "foreachasync": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/foreachasync/-/foreachasync-3.0.0.tgz",
- "integrity": "sha1-VQKYfchxS+M5IJfzLgBxyd7gfPY=",
- "dev": true
- },
- "forever-agent": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
- "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=",
- "dev": true
- },
- "form-data": {
- "version": "2.1.4",
- "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz",
- "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=",
- "dev": true,
- "requires": {
- "asynckit": "^0.4.0",
- "combined-stream": "^1.0.5",
- "mime-types": "^2.1.12"
- }
- },
"forwarded": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz",
@@ -2022,21 +2188,24 @@
"integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=",
"dev": true
},
- "from": {
- "version": "0.1.7",
- "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz",
- "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=",
- "dev": true
+ "fs-access": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz",
+ "integrity": "sha1-1qh/JiJxzv6+wwxVNAf7mV2od3o=",
+ "dev": true,
+ "requires": {
+ "null-check": "^1.0.0"
+ }
},
"fs-extra": {
- "version": "0.15.0",
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.15.0.tgz",
- "integrity": "sha1-nypfdU+soCAMywMJO4xbRjF0DaQ=",
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz",
+ "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==",
"dev": true,
"requires": {
- "graceful-fs": "^3.0.5",
- "jsonfile": "^2.0.0",
- "rimraf": "^2.2.8"
+ "graceful-fs": "^4.1.2",
+ "jsonfile": "^4.0.0",
+ "universalify": "^0.1.0"
}
},
"fs.realpath": {
@@ -2045,142 +2214,35 @@
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
"dev": true
},
- "gauge": {
- "version": "2.7.4",
- "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
- "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
- "dev": true,
- "optional": true,
- "requires": {
- "aproba": "^1.0.3",
- "console-control-strings": "^1.0.0",
- "has-unicode": "^2.0.0",
- "object-assign": "^4.1.0",
- "signal-exit": "^3.0.0",
- "string-width": "^1.0.1",
- "strip-ansi": "^3.0.1",
- "wide-align": "^1.1.0"
- }
- },
- "generate-function": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz",
- "integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ=",
- "dev": true
- },
- "generate-object-property": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz",
- "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=",
+ "fsevents": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz",
+ "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==",
"dev": true,
- "requires": {
- "is-property": "^1.0.0"
- }
- },
- "get-caller-file": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz",
- "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==",
- "dev": true
+ "optional": true
},
- "get-stdin": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz",
- "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=",
+ "function-bind": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
+ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
"dev": true
},
- "getpass": {
- "version": "0.1.7",
- "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
- "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
- "dev": true,
- "requires": {
- "assert-plus": "^1.0.0"
- },
- "dependencies": {
- "assert-plus": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
- "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
- "dev": true
- }
- }
- },
- "gh-resolve": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/gh-resolve/-/gh-resolve-3.1.0.tgz",
- "integrity": "sha1-005uWnBZOg6xvuMFm4LjevfW8Sw=",
- "dev": true,
- "requires": {
- "debug": "^1.0.2",
- "enqueue": "0.0.x",
- "mini-tokenizer": "^0.1.2",
- "request": "^2.34.0",
- "semver": "^2.2.1"
- },
- "dependencies": {
- "debug": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/debug/-/debug-1.0.5.tgz",
- "integrity": "sha1-9yQSF0MPmd7EwrRz6rkiKOh0wqw=",
- "dev": true,
- "requires": {
- "ms": "2.0.0"
- }
- },
- "semver": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-2.3.2.tgz",
- "integrity": "sha1-uYSPJdbPNjMwc+ye+IVtQvEjPlI=",
- "dev": true
- }
- }
- },
- "git-head": {
- "version": "1.20.1",
- "resolved": "https://registry.npmjs.org/git-head/-/git-head-1.20.1.tgz",
- "integrity": "sha1-A20WpLN0lJ5OPa8VgnkDaG08zVI=",
- "dev": true,
- "requires": {
- "git-refs": "^1.1.3"
- }
- },
- "git-refs": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/git-refs/-/git-refs-1.1.3.tgz",
- "integrity": "sha1-gwl8s6klhcSkkm7FTiGC354g6J0=",
- "dev": true,
- "requires": {
- "path-object": "^2.3.0",
- "slash": "^1.0.0",
- "walk": "^2.3.9"
- }
- },
- "github": {
- "version": "0.2.4",
- "resolved": "https://registry.npmjs.org/github/-/github-0.2.4.tgz",
- "integrity": "sha1-JPp/DhP6EblGr5ETTFGYKpHOU4s=",
- "dev": true,
- "requires": {
- "mime": "^1.2.11"
- }
- },
- "github-url-from-git": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/github-url-from-git/-/github-url-from-git-1.5.0.tgz",
- "integrity": "sha1-+YX+3MCpqledyI16/waNVcxiUaA=",
+ "gensync": {
+ "version": "1.0.0-beta.1",
+ "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz",
+ "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==",
"dev": true
},
- "github-url-from-username-repo": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/github-url-from-username-repo/-/github-url-from-username-repo-1.0.2.tgz",
- "integrity": "sha1-fdeTMNKr5pwQws73lxTJchV5Hfo=",
+ "get-func-name": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz",
+ "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=",
"dev": true
},
"glob": {
- "version": "7.1.2",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
- "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
+ "version": "7.1.6",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
+ "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
@@ -2191,95 +2253,72 @@
"path-is-absolute": "^1.0.0"
}
},
- "gnode": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/gnode/-/gnode-0.1.2.tgz",
- "integrity": "sha1-CpVaXMIi9pnhQwakVZUF2QCA/dk=",
+ "glob-parent": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz",
+ "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==",
"dev": true,
"requires": {
- "regenerator": "~0.8.8"
+ "is-glob": "^4.0.1"
}
},
+ "globals": {
+ "version": "11.12.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz",
+ "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==",
+ "dev": true
+ },
"graceful-fs": {
- "version": "3.0.11",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz",
- "integrity": "sha1-dhPHeKGv6mLyXGMKCG1/Osu92Bg=",
- "dev": true,
- "requires": {
- "natives": "^1.1.0"
- }
+ "version": "4.2.4",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz",
+ "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==",
+ "dev": true
},
"growl": {
- "version": "1.8.1",
- "resolved": "https://registry.npmjs.org/growl/-/growl-1.8.1.tgz",
- "integrity": "sha1-Sy3sjZB+k9szZiTc7AGDUC+MlCg=",
+ "version": "1.10.3",
+ "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.3.tgz",
+ "integrity": "sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q==",
"dev": true
},
- "har-validator": {
- "version": "2.0.6",
- "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz",
- "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=",
- "dev": true,
- "requires": {
- "chalk": "^1.1.1",
- "commander": "^2.9.0",
- "is-my-json-valid": "^2.12.4",
- "pinkie-promise": "^2.0.0"
- }
- },
- "has-ansi": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
- "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
+ "has-binary2": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz",
+ "integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==",
"dev": true,
"requires": {
- "ansi-regex": "^2.0.0"
+ "isarray": "2.0.1"
+ },
+ "dependencies": {
+ "isarray": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz",
+ "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=",
+ "dev": true
+ }
}
},
- "has-generators": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/has-generators/-/has-generators-1.0.1.tgz",
- "integrity": "sha1-pqLlVIYBGUBILhPiyTeRxEms9Ek=",
+ "has-cors": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz",
+ "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=",
"dev": true
},
- "has-unicode": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
- "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=",
+ "has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
"dev": true
},
- "hasha": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/hasha/-/hasha-2.2.0.tgz",
- "integrity": "sha1-eNfL/B5tZjA/55g3NlmEUXsvbuE=",
- "dev": true,
- "requires": {
- "is-stream": "^1.0.1",
- "pinkie-promise": "^2.0.0"
- }
- },
- "hawk": {
- "version": "3.1.3",
- "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz",
- "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=",
- "dev": true,
- "requires": {
- "boom": "2.x.x",
- "cryptiles": "2.x.x",
- "hoek": "2.x.x",
- "sntp": "1.x.x"
- }
- },
- "hoek": {
- "version": "2.16.3",
- "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz",
- "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=",
+ "has-symbols": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz",
+ "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==",
"dev": true
},
- "hosted-git-info": {
- "version": "2.8.5",
- "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.5.tgz",
- "integrity": "sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg==",
+ "he": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz",
+ "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=",
"dev": true
},
"htmlparser2": {
@@ -2293,6 +2332,14 @@
"domutils": "1.5",
"entities": "1.0",
"readable-stream": "1.1"
+ },
+ "dependencies": {
+ "entities": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz",
+ "integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY=",
+ "dev": true
+ }
}
},
"http-errors": {
@@ -2315,15 +2362,42 @@
}
}
},
- "http-signature": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz",
- "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=",
+ "http-proxy": {
+ "version": "1.18.1",
+ "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz",
+ "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==",
+ "dev": true,
+ "requires": {
+ "eventemitter3": "^4.0.0",
+ "follow-redirects": "^1.0.0",
+ "requires-port": "^1.0.0"
+ }
+ },
+ "https-proxy-agent": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz",
+ "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==",
"dev": true,
"requires": {
- "assert-plus": "^0.2.0",
- "jsprim": "^1.2.2",
- "sshpk": "^1.7.0"
+ "agent-base": "6",
+ "debug": "4"
+ },
+ "dependencies": {
+ "debug": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
+ "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
+ "dev": true,
+ "requires": {
+ "ms": "^2.1.1"
+ }
+ },
+ "ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "dev": true
+ }
}
},
"iconv-lite": {
@@ -2337,20 +2411,17 @@
"resolved": "https://registry.npmjs.org/ifvisible.js/-/ifvisible.js-1.0.4.tgz",
"integrity": "sha1-VU4ysrnatFEVfX8zaaoUN/1/Nsg="
},
- "incasesensitive": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/incasesensitive/-/incasesensitive-1.0.0.tgz",
- "integrity": "sha1-dStUpISrrFdP01rEt01BdJ5Lycs=",
+ "immediate": {
+ "version": "3.0.6",
+ "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz",
+ "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=",
"dev": true
},
- "indent-string": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz",
- "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=",
- "dev": true,
- "requires": {
- "repeating": "^2.0.0"
- }
+ "indexof": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz",
+ "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=",
+ "dev": true
},
"inflight": {
"version": "1.0.6",
@@ -2368,499 +2439,475 @@
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
"dev": true
},
- "ini": {
- "version": "1.3.5",
- "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
- "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==",
- "dev": true
- },
- "inline-source-map": {
- "version": "0.3.1",
- "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.3.1.tgz",
- "integrity": "sha1-pSi1FOaJ/OkNswiehw2S9Sestes=",
+ "invariant": {
+ "version": "2.2.4",
+ "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz",
+ "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==",
"dev": true,
"requires": {
- "source-map": "~0.3.0"
- },
- "dependencies": {
- "source-map": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.3.0.tgz",
- "integrity": "sha1-hYb7mloAXltQHiHNGLbyG0V60fk=",
- "dev": true,
- "requires": {
- "amdefine": ">=0.0.4"
- }
- }
+ "loose-envify": "^1.0.0"
}
},
- "invert-kv": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz",
- "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=",
- "dev": true
- },
"ipaddr.js": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.5.2.tgz",
"integrity": "sha1-1LUFvemUaYfM8PxY2QEP+WB+P6A=",
"dev": true
},
- "is-arrayish": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
- "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=",
- "dev": true
- },
- "is-buffer": {
- "version": "1.1.6",
- "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
- "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
- },
- "is-finite": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz",
- "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=",
- "dev": true,
- "requires": {
- "number-is-nan": "^1.0.0"
- }
- },
- "is-fullwidth-code-point": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
- "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
+ "is-binary-path": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
+ "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
"dev": true,
"requires": {
- "number-is-nan": "^1.0.0"
+ "binary-extensions": "^2.0.0"
}
},
- "is-my-json-valid": {
- "version": "2.16.1",
- "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.16.1.tgz",
- "integrity": "sha512-ochPsqWS1WXj8ZnMIV0vnNXooaMhp7cyL4FMSIPKTtnV0Ha/T19G2b9kkhcNsabV9bxYkze7/aLZJb/bYuFduQ==",
- "dev": true,
- "requires": {
- "generate-function": "^2.0.0",
- "generate-object-property": "^1.1.0",
- "jsonpointer": "^4.0.0",
- "xtend": "^4.0.0"
- }
+ "is-buffer": {
+ "version": "1.1.6",
+ "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
+ "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
},
- "is-property": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz",
- "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=",
+ "is-docker": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.0.0.tgz",
+ "integrity": "sha512-pJEdRugimx4fBMra5z2/5iRdZ63OhYV0vr0Dwm5+xtW4D1FvRkB8hamMIhnWfyJeDdyr/aa7BDyNbtG38VxgoQ==",
"dev": true
},
- "is-stream": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
- "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=",
+ "is-extglob": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
"dev": true
},
- "is-typedarray": {
+ "is-glob": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz",
+ "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==",
+ "dev": true,
+ "requires": {
+ "is-extglob": "^2.1.1"
+ }
+ },
+ "is-module": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
- "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
+ "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz",
+ "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=",
"dev": true
},
- "is-utf8": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
- "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=",
+ "is-number": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
"dev": true
},
+ "is-wsl": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz",
+ "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==",
+ "dev": true,
+ "requires": {
+ "is-docker": "^2.0.0"
+ }
+ },
"isarray": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",
"dev": true
},
+ "isbinaryfile": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-3.0.3.tgz",
+ "integrity": "sha512-8cJBL5tTd2OS0dM4jz07wQd5g0dCCqIhUxPIGtZfa5L6hWlvV5MHTITy/DBAsF+Oe2LS1X3krBUhNwaGUWpWxw==",
+ "dev": true,
+ "requires": {
+ "buffer-alloc": "^1.2.0"
+ }
+ },
"isexe": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
"dev": true
},
- "isstream": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
- "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=",
+ "jest-worker": {
+ "version": "24.9.0",
+ "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.9.0.tgz",
+ "integrity": "sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw==",
+ "dev": true,
+ "requires": {
+ "merge-stream": "^2.0.0",
+ "supports-color": "^6.1.0"
+ },
+ "dependencies": {
+ "supports-color": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
+ "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
+ }
+ }
+ },
+ "js-tokens": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
"dev": true
},
- "jade": {
- "version": "0.26.3",
- "resolved": "https://registry.npmjs.org/jade/-/jade-0.26.3.tgz",
- "integrity": "sha1-jxDXl32NefL2/4YqgbBRPMslaGw=",
+ "js2xmlparser": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.1.tgz",
+ "integrity": "sha512-KrPTolcw6RocpYjdC7pL7v62e55q7qOMHvLX1UCLc5AAS8qeJ6nukarEJAF2KL2PZxlbGueEbINqZR2bDe/gUw==",
"dev": true,
"requires": {
- "commander": "0.6.1",
- "mkdirp": "0.3.0"
+ "xmlcreate": "^2.0.3"
+ }
+ },
+ "jsdoc": {
+ "version": "3.6.4",
+ "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.6.4.tgz",
+ "integrity": "sha512-3G9d37VHv7MFdheviDCjUfQoIjdv4TC5zTTf5G9VODLtOnVS6La1eoYBDlbWfsRT3/Xo+j2MIqki2EV12BZfwA==",
+ "dev": true,
+ "requires": {
+ "@babel/parser": "^7.9.4",
+ "bluebird": "^3.7.2",
+ "catharsis": "^0.8.11",
+ "escape-string-regexp": "^2.0.0",
+ "js2xmlparser": "^4.0.1",
+ "klaw": "^3.0.0",
+ "markdown-it": "^10.0.0",
+ "markdown-it-anchor": "^5.2.7",
+ "marked": "^0.8.2",
+ "mkdirp": "^1.0.4",
+ "requizzle": "^0.2.3",
+ "strip-json-comments": "^3.1.0",
+ "taffydb": "2.6.2",
+ "underscore": "~1.10.2"
},
"dependencies": {
- "commander": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/commander/-/commander-0.6.1.tgz",
- "integrity": "sha1-+mihT2qUXVTbvlDYzbMyDp47GgY=",
+ "escape-string-regexp": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
+ "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==",
"dev": true
},
+ "klaw": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz",
+ "integrity": "sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "^4.1.9"
+ }
+ },
"mkdirp": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz",
- "integrity": "sha1-G79asbqCevI1dRQ0kEJkVfSB/h4=",
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
+ "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
"dev": true
}
}
},
- "js2xmlparser": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-1.0.0.tgz",
- "integrity": "sha1-WhcPLo1kds5FQF4EgjJCUTeC/jA=",
+ "jsesc": {
+ "version": "2.5.2",
+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz",
+ "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==",
"dev": true
},
- "jsbn": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
- "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
- "dev": true,
- "optional": true
- },
- "jsdoc": {
- "version": "3.4.0",
- "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.4.0.tgz",
- "integrity": "sha1-NBzbBuRKET2VQe/SEslaSIBk6e4=",
- "dev": true,
- "requires": {
- "async": "~1.4.0",
- "bluebird": "~2.9.34",
- "catharsis": "~0.8.7",
- "escape-string-regexp": "~1.0.3",
- "espree": "~2.2.3",
- "js2xmlparser": "~1.0.0",
- "marked": "~0.3.4",
- "requizzle": "~0.2.0",
- "strip-json-comments": "~1.0.2",
- "taffydb": "https://github.com/hegemonic/taffydb/tarball/7d100bcee0e997ee4977e273cdce60bd8933050e",
- "underscore": "~1.8.3",
- "wrench": "~1.5.8"
- }
- },
"jshint": {
- "version": "2.9.5",
- "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.9.5.tgz",
- "integrity": "sha1-HnJSkVzmgbQIJ+4UJIxG006apiw=",
+ "version": "2.11.1",
+ "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.11.1.tgz",
+ "integrity": "sha512-WXWePB8ssAH3DlD05IoqolsY6arhbll/1+i2JkRPpihQAuiNaR/gSt8VKIcxpV5m6XChP0hCwESQUqpuQMA8Tg==",
"dev": true,
"requires": {
"cli": "~1.0.0",
"console-browserify": "1.1.x",
"exit": "0.1.x",
"htmlparser2": "3.8.x",
- "lodash": "3.7.x",
+ "lodash": "~4.17.11",
"minimatch": "~3.0.2",
"shelljs": "0.3.x",
"strip-json-comments": "1.0.x"
},
"dependencies": {
"lodash": {
- "version": "3.7.0",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.7.0.tgz",
- "integrity": "sha1-Nni9irmVBXwHreg27S7wh9qBHUU=",
+ "version": "4.17.15",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
+ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
+ "dev": true
+ },
+ "strip-json-comments": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz",
+ "integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=",
"dev": true
}
}
},
- "json-mask": {
- "version": "0.3.8",
- "resolved": "https://registry.npmjs.org/json-mask/-/json-mask-0.3.8.tgz",
- "integrity": "sha1-LWZBXeFLDovGwVFFVKkL/Kg1aUE=",
- "dev": true
- },
- "json-schema": {
- "version": "0.2.3",
- "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
- "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=",
- "dev": true
- },
- "json-stringify-safe": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
- "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=",
- "dev": true
+ "json5": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz",
+ "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==",
+ "dev": true,
+ "requires": {
+ "minimist": "^1.2.5"
+ }
},
"jsonfile": {
- "version": "2.4.0",
- "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz",
- "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=",
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
+ "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
"dev": true,
"requires": {
"graceful-fs": "^4.1.6"
+ }
+ },
+ "jszip": {
+ "version": "3.5.0",
+ "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.5.0.tgz",
+ "integrity": "sha512-WRtu7TPCmYePR1nazfrtuF216cIVon/3GWOvHS9QR5bIwSbnxtdpma6un3jyGGNhHsKCSzn5Ypk+EkDRvTGiFA==",
+ "dev": true,
+ "requires": {
+ "lie": "~3.3.0",
+ "pako": "~1.0.2",
+ "readable-stream": "~2.3.6",
+ "set-immediate-shim": "~1.0.1"
},
"dependencies": {
- "graceful-fs": {
- "version": "4.1.11",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
- "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=",
+ "isarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
+ "dev": true
+ },
+ "process-nextick-args": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
+ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
+ "dev": true
+ },
+ "readable-stream": {
+ "version": "2.3.7",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
+ "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
+ "dev": true,
+ "requires": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ }
+ },
+ "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,
- "optional": true
+ "requires": {
+ "safe-buffer": "~5.1.0"
+ }
}
}
},
- "jsonpointer": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz",
- "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=",
- "dev": true
- },
- "jsprim": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
- "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
- "dev": true,
- "requires": {
- "assert-plus": "1.0.0",
- "extsprintf": "1.3.0",
- "json-schema": "0.2.3",
- "verror": "1.10.0"
+ "just-extend": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.1.0.tgz",
+ "integrity": "sha512-ApcjaOdVTJ7y4r08xI5wIqpvwS48Q0PBG4DJROcEkH1f8MdAiNFyFxz3xoL0LWAVwjrwPYZdVHHxhRHcx/uGLA==",
+ "dev": true
+ },
+ "karma": {
+ "version": "4.4.1",
+ "resolved": "https://registry.npmjs.org/karma/-/karma-4.4.1.tgz",
+ "integrity": "sha512-L5SIaXEYqzrh6b1wqYC42tNsFMx2PWuxky84pK9coK09MvmL7mxii3G3bZBh/0rvD27lqDd0le9jyhzvwif73A==",
+ "dev": true,
+ "requires": {
+ "bluebird": "^3.3.0",
+ "body-parser": "^1.16.1",
+ "braces": "^3.0.2",
+ "chokidar": "^3.0.0",
+ "colors": "^1.1.0",
+ "connect": "^3.6.0",
+ "di": "^0.0.1",
+ "dom-serialize": "^2.2.0",
+ "flatted": "^2.0.0",
+ "glob": "^7.1.1",
+ "graceful-fs": "^4.1.2",
+ "http-proxy": "^1.13.0",
+ "isbinaryfile": "^3.0.0",
+ "lodash": "^4.17.14",
+ "log4js": "^4.0.0",
+ "mime": "^2.3.1",
+ "minimatch": "^3.0.2",
+ "optimist": "^0.6.1",
+ "qjobs": "^1.1.4",
+ "range-parser": "^1.2.0",
+ "rimraf": "^2.6.0",
+ "safe-buffer": "^5.0.1",
+ "socket.io": "2.1.1",
+ "source-map": "^0.6.1",
+ "tmp": "0.0.33",
+ "useragent": "2.3.0"
},
"dependencies": {
- "assert-plus": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
- "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
+ "lodash": {
+ "version": "4.17.15",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
+ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
+ "dev": true
+ },
+ "mime": {
+ "version": "2.4.6",
+ "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.6.tgz",
+ "integrity": "sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA==",
+ "dev": true
+ },
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true
}
}
},
- "kew": {
- "version": "0.7.0",
- "resolved": "https://registry.npmjs.org/kew/-/kew-0.7.0.tgz",
- "integrity": "sha1-edk9LTM2PW/dKXCzNdkUGtWR15s=",
+ "karma-chai": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/karma-chai/-/karma-chai-0.1.0.tgz",
+ "integrity": "sha1-vuWtQEAFF4Ea40u5RfdikJEIt5o=",
"dev": true
},
- "keygrip": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/keygrip/-/keygrip-1.0.3.tgz",
- "integrity": "sha512-/PpesirAIfaklxUzp4Yb7xBper9MwP6hNRA6BGGUFCgbJ+BM5CKBtsoxinNXkLHAr+GXS1/lSlF2rP7cv5Fl+g==",
- "dev": true
+ "karma-chrome-launcher": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz",
+ "integrity": "sha512-uf/ZVpAabDBPvdPdveyk1EPgbnloPvFFGgmRhYLTDH7gEB4nZdSBk8yTU47w1g/drLSx5uMOkjKk7IWKfWg/+w==",
+ "dev": true,
+ "requires": {
+ "fs-access": "^1.0.0",
+ "which": "^1.2.1"
+ }
},
- "kind-of": {
- "version": "3.2.2",
- "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
- "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+ "karma-firefox-launcher": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/karma-firefox-launcher/-/karma-firefox-launcher-1.3.0.tgz",
+ "integrity": "sha512-Fi7xPhwrRgr+94BnHX0F5dCl1miIW4RHnzjIGxF8GaIEp7rNqX7LSi7ok63VXs3PS/5MQaQMhGxw+bvD+pibBQ==",
"dev": true,
"requires": {
- "is-buffer": "^1.1.5"
+ "is-wsl": "^2.1.0"
}
},
- "klaw": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz",
- "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=",
+ "karma-mocha": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/karma-mocha/-/karma-mocha-1.3.0.tgz",
+ "integrity": "sha1-7qrH/8DiAetjxGdEDStpx883eL8=",
"dev": true,
"requires": {
- "graceful-fs": "^4.1.9"
+ "minimist": "1.2.0"
},
"dependencies": {
- "graceful-fs": {
- "version": "4.2.3",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz",
- "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==",
- "dev": true,
- "optional": true
+ "minimist": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
+ "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
+ "dev": true
}
}
},
- "koa": {
- "version": "0.8.2",
- "resolved": "https://registry.npmjs.org/koa/-/koa-0.8.2.tgz",
- "integrity": "sha1-tlxpqBXMPUNEIoxYMQ4WJDIlY5Q=",
- "dev": true,
- "requires": {
- "accepts": "~1.0.0",
- "co": "~3.1.0",
- "cookies": "~0.4.0",
- "debug": "*",
- "delegates": "0.0.3",
- "dethroy": "~1.0.0",
- "error-inject": "~1.0.0",
- "escape-html": "~1.0.1",
- "finished": "~1.2.0",
- "fresh": "~0.2.1",
- "koa-compose": "~2.3.0",
- "koa-is-json": "~1.0.0",
- "media-typer": "~0.2.0",
- "mime-types": "~1.0.0",
- "only": "0.0.2",
- "parseurl": "~1.2.0",
- "statuses": "~1.0.1",
- "type-is": "~1.3.1",
- "vary": "~0.1.0"
+ "karma-mocha-reporter": {
+ "version": "2.2.5",
+ "resolved": "https://registry.npmjs.org/karma-mocha-reporter/-/karma-mocha-reporter-2.2.5.tgz",
+ "integrity": "sha1-FRIAlejtgZGG5HoLAS8810GJVWA=",
+ "dev": true,
+ "requires": {
+ "chalk": "^2.1.0",
+ "log-symbols": "^2.1.0",
+ "strip-ansi": "^4.0.0"
},
"dependencies": {
- "accepts": {
- "version": "1.0.7",
- "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.0.7.tgz",
- "integrity": "sha1-W1AftPBwQwmWTM2wSBclQSCNqxo=",
+ "ansi-regex": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
+ "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
+ "dev": true
+ },
+ "ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"dev": true,
"requires": {
- "mime-types": "~1.0.0",
- "negotiator": "0.4.7"
+ "color-convert": "^1.9.0"
}
},
- "delegates": {
- "version": "0.0.3",
- "resolved": "https://registry.npmjs.org/delegates/-/delegates-0.0.3.tgz",
- "integrity": "sha1-TyXL+OHAYZZ/g04APzvRje1Lruo=",
- "dev": true
- },
- "fresh": {
- "version": "0.2.4",
- "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.2.4.tgz",
- "integrity": "sha1-NYJJkgbJcjcUGQ7ddLRgT+tKYUw=",
- "dev": true
- },
- "media-typer": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.2.0.tgz",
- "integrity": "sha1-2KBlITrf6qLnYyGitt2jb/YzWYQ=",
- "dev": true
- },
- "mime-types": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-1.0.2.tgz",
- "integrity": "sha1-mVrhOSq4r/y/yyZB3QVOlDwNXc4=",
- "dev": true
- },
- "negotiator": {
- "version": "0.4.7",
- "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.4.7.tgz",
- "integrity": "sha1-pBYPcXfsgGc4Yx0NMFIyXaQqvcg=",
- "dev": true
- },
- "parseurl": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.2.0.tgz",
- "integrity": "sha1-vn3y1pjrSf+xDqYpOWk+FSmRwAg=",
- "dev": true
- },
- "statuses": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.0.4.tgz",
- "integrity": "sha1-qLID9kXPR1pmQm9r5pAgXIXz690=",
- "dev": true
+ "chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ }
},
- "type-is": {
- "version": "1.3.2",
- "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.3.2.tgz",
- "integrity": "sha1-TypdxYd1yhYwJQr8cYb4s2MJ0bs=",
+ "strip-ansi": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
+ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
"dev": true,
"requires": {
- "media-typer": "0.2.0",
- "mime-types": "~1.0.1"
+ "ansi-regex": "^3.0.0"
}
},
- "vary": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/vary/-/vary-0.1.0.tgz",
- "integrity": "sha1-3wlFiZ6TwMxb0YzIMh2dIedPYXY=",
- "dev": true
+ "supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
}
}
},
- "koa-compose": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/koa-compose/-/koa-compose-2.3.0.tgz",
- "integrity": "sha1-Rhf6gyoWQSpWlnM0ME79eX1u01w=",
- "dev": true
- },
- "koa-is-json": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/koa-is-json/-/koa-is-json-1.0.0.tgz",
- "integrity": "sha1-JzwH7c3Ljfaiwat9We52SRRR7BQ=",
- "dev": true
- },
- "koa-route": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/koa-route/-/koa-route-1.1.4.tgz",
- "integrity": "sha1-72W6MJFKS2uwLugV8/wYzQ/wKww=",
+ "karma-sauce-launcher": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/karma-sauce-launcher/-/karma-sauce-launcher-2.0.2.tgz",
+ "integrity": "sha512-jLUFaJhHMcKpxFWUesyWYihzM5FvQiJsDwGcCtKeOy2lsWhkVw0V0Byqb1d+wU6myU1mribBtsIcub23HS4kWA==",
"dev": true,
"requires": {
- "debug": "*",
- "methods": "~0.1.0",
- "path-to-regexp": "~0.1.2"
- },
- "dependencies": {
- "methods": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/methods/-/methods-0.1.0.tgz",
- "integrity": "sha1-M11Cnu/SG3us8unJIqjSvRSjDk8=",
- "dev": true
- }
+ "sauce-connect-launcher": "^1.2.4",
+ "saucelabs": "^1.5.0",
+ "selenium-webdriver": "^4.0.0-alpha.1"
}
},
- "koa-send": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/koa-send/-/koa-send-2.0.3.tgz",
- "integrity": "sha512-fX69m+IqgXT4ZgBMsGVsMMB5tLYs9Sa1MhQLyau0n5Qetq5003aaFoCY/YpPL4M+WA7fpJfFk6aEArNzGP0Q3w==",
- "dev": true,
- "requires": {
- "debug": "^3.2.5",
- "mz": "^2.0.0",
- "resolve-path": "^1.2.1"
- },
- "dependencies": {
- "debug": {
- "version": "3.2.6",
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
- "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
- "dev": true,
- "requires": {
- "ms": "^2.1.1"
- }
- },
- "ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
- "dev": true
- }
- }
+ "karma-sinon": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/karma-sinon/-/karma-sinon-1.0.5.tgz",
+ "integrity": "sha1-TjRD8oMP3s/2JNN0cWPxIX2qKpo=",
+ "dev": true
},
- "koa-static": {
- "version": "1.5.3",
- "resolved": "https://registry.npmjs.org/koa-static/-/koa-static-1.5.3.tgz",
- "integrity": "sha512-FmfSFJOrtWGZ/Ae5Q7xeM+ck1IdofNEvIQhdPLvGHyTjilhYmFGoyRN1+BAbTknWnDoRRyHsGGq0FMRDTcCb1w==",
+ "karma-sourcemap-loader": {
+ "version": "0.3.7",
+ "resolved": "https://registry.npmjs.org/karma-sourcemap-loader/-/karma-sourcemap-loader-0.3.7.tgz",
+ "integrity": "sha1-kTIsd/jxPUb+0GKwQuEAnUxFBdg=",
"dev": true,
"requires": {
- "debug": "^3.2.5",
- "koa-send": "~2.0.1"
- },
- "dependencies": {
- "debug": {
- "version": "3.2.6",
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
- "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
- "dev": true,
- "requires": {
- "ms": "^2.1.1"
- }
- },
- "ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
- "dev": true
- }
+ "graceful-fs": "^4.1.2"
}
},
- "language-classifier": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/language-classifier/-/language-classifier-0.0.1.tgz",
- "integrity": "sha1-sMRMqzMZSOaKh5zWPVwdpok2d0s=",
+ "kind-of": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
"dev": true,
"requires": {
- "classifier": "~0.1.0"
+ "is-buffer": "^1.1.5"
}
},
"lazy-cache": {
@@ -2869,88 +2916,92 @@
"integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=",
"dev": true
},
- "lazystream": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-0.1.0.tgz",
- "integrity": "sha1-GyXWPHcqTCDwpe0KnXf0hLbhaSA=",
- "dev": true,
- "requires": {
- "readable-stream": "~1.0.2"
- },
- "dependencies": {
- "readable-stream": {
- "version": "1.0.34",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
- "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
- "dev": true,
- "requires": {
- "core-util-is": "~1.0.0",
- "inherits": "~2.0.1",
- "isarray": "0.0.1",
- "string_decoder": "~0.10.x"
- }
- }
+ "leven": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz",
+ "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==",
+ "dev": true
+ },
+ "levenary": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/levenary/-/levenary-1.1.1.tgz",
+ "integrity": "sha512-mkAdOIt79FD6irqjYSs4rdbnlT5vRonMEvBVPVb3XmevfS8kgRXwfes0dhPdEtzTWD/1eNE/Bm/G1iRt6DcnQQ==",
+ "dev": true,
+ "requires": {
+ "leven": "^3.1.0"
}
},
- "lcid": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz",
- "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=",
+ "lie": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz",
+ "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==",
"dev": true,
"requires": {
- "invert-kv": "^1.0.0"
+ "immediate": "~3.0.5"
}
},
- "load-json-file": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
- "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
+ "linkify-it": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz",
+ "integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==",
"dev": true,
"requires": {
- "graceful-fs": "^4.1.2",
- "parse-json": "^2.2.0",
- "pify": "^2.0.0",
- "pinkie-promise": "^2.0.0",
- "strip-bom": "^2.0.0"
- },
- "dependencies": {
- "graceful-fs": {
- "version": "4.2.3",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz",
- "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==",
- "dev": true
- }
+ "uc.micro": "^1.0.1"
}
},
- "localtunnel": {
- "version": "1.9.2",
- "resolved": "https://registry.npmjs.org/localtunnel/-/localtunnel-1.9.2.tgz",
- "integrity": "sha512-NEKF7bDJE9U3xzJu3kbayF0WTvng6Pww7tzqNb/XtEARYwqw7CKEX7BvOMg98FtE9es2CRizl61gkV3hS8dqYg==",
+ "log-symbols": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz",
+ "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==",
"dev": true,
"requires": {
- "axios": "0.19.0",
- "debug": "4.1.1",
- "openurl": "1.1.1",
- "yargs": "6.6.0"
+ "chalk": "^2.0.1"
},
"dependencies": {
- "camelcase": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz",
- "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=",
- "dev": true
+ "ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^1.9.0"
+ }
},
- "cliui": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz",
- "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=",
+ "chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
"dev": true,
"requires": {
- "string-width": "^1.0.1",
- "strip-ansi": "^3.0.1",
- "wrap-ansi": "^2.0.0"
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
}
},
+ "supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
+ }
+ }
+ },
+ "log4js": {
+ "version": "4.5.1",
+ "resolved": "https://registry.npmjs.org/log4js/-/log4js-4.5.1.tgz",
+ "integrity": "sha512-EEEgFcE9bLgaYUKuozyFfytQM2wDHtXn4tAN41pkaxpNjAykv11GVdeI4tHtmPWW4Xrgh9R/2d7XYghDVjbKKw==",
+ "dev": true,
+ "requires": {
+ "date-format": "^2.0.0",
+ "debug": "^4.1.1",
+ "flatted": "^2.0.0",
+ "rfdc": "^1.1.4",
+ "streamroller": "^1.0.6"
+ },
+ "dependencies": {
"debug": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
@@ -2965,186 +3016,72 @@
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
"dev": true
- },
- "yargs": {
- "version": "6.6.0",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-6.6.0.tgz",
- "integrity": "sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg=",
- "dev": true,
- "requires": {
- "camelcase": "^3.0.0",
- "cliui": "^3.2.0",
- "decamelize": "^1.1.1",
- "get-caller-file": "^1.0.1",
- "os-locale": "^1.4.0",
- "read-pkg-up": "^1.0.1",
- "require-directory": "^2.1.1",
- "require-main-filename": "^1.0.1",
- "set-blocking": "^2.0.0",
- "string-width": "^1.0.2",
- "which-module": "^1.0.0",
- "y18n": "^3.2.1",
- "yargs-parser": "^4.2.0"
- }
}
}
},
- "lodash": {
- "version": "3.9.3",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.9.3.tgz",
- "integrity": "sha1-AVnoaDL+/8bWHYUrEqlTuZSWvTI=",
- "dev": true
- },
- "lodash._baseassign": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz",
- "integrity": "sha1-jDigmVAPIVrQnlnxci/QxSv+Ck4=",
- "dev": true,
- "requires": {
- "lodash._basecopy": "^3.0.0",
- "lodash.keys": "^3.0.0"
- }
- },
- "lodash._basecopy": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz",
- "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=",
- "dev": true
- },
- "lodash._bindcallback": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz",
- "integrity": "sha1-5THCdkTPi1epnhftlbNcdIeJOS4=",
- "dev": true
- },
- "lodash._createassigner": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz",
- "integrity": "sha1-g4pbri/aymOsIt7o4Z+k5taXCxE=",
- "dev": true,
- "requires": {
- "lodash._bindcallback": "^3.0.0",
- "lodash._isiterateecall": "^3.0.0",
- "lodash.restparam": "^3.0.0"
- }
- },
- "lodash._getnative": {
- "version": "3.9.1",
- "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz",
- "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=",
+ "lolex": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/lolex/-/lolex-4.2.0.tgz",
+ "integrity": "sha512-gKO5uExCXvSm6zbF562EvM+rd1kQDnB9AZBbiQVzf1ZmdDpxUSvpnAaVOP83N/31mRK8Ml8/VE8DMvsAZQ+7wg==",
"dev": true
},
- "lodash._isiterateecall": {
- "version": "3.0.9",
- "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz",
- "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=",
+ "longest": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz",
+ "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=",
"dev": true
},
- "lodash.assign": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-3.2.0.tgz",
- "integrity": "sha1-POnwI0tLIiPilrj6CsH+6OvKZPo=",
+ "loose-envify": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
+ "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
"dev": true,
"requires": {
- "lodash._baseassign": "^3.0.0",
- "lodash._createassigner": "^3.0.0",
- "lodash.keys": "^3.0.0"
+ "js-tokens": "^3.0.0 || ^4.0.0"
}
},
- "lodash.isarguments": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz",
- "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=",
- "dev": true
- },
- "lodash.isarray": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz",
- "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=",
- "dev": true
- },
- "lodash.keys": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz",
- "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=",
+ "lru-cache": {
+ "version": "4.1.5",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
+ "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==",
"dev": true,
"requires": {
- "lodash._getnative": "^3.0.0",
- "lodash.isarguments": "^3.0.0",
- "lodash.isarray": "^3.0.0"
+ "pseudomap": "^1.0.2",
+ "yallist": "^2.1.2"
}
},
- "lodash.pad": {
- "version": "4.5.1",
- "resolved": "https://registry.npmjs.org/lodash.pad/-/lodash.pad-4.5.1.tgz",
- "integrity": "sha1-QzCUmoM6fI2iLMIPaibE1Z3runA=",
- "dev": true
- },
- "lodash.padend": {
- "version": "4.6.1",
- "resolved": "https://registry.npmjs.org/lodash.padend/-/lodash.padend-4.6.1.tgz",
- "integrity": "sha1-U8y6BH0G4VjTEfRdpiX05J5vFm4=",
- "dev": true
- },
- "lodash.padstart": {
- "version": "4.6.1",
- "resolved": "https://registry.npmjs.org/lodash.padstart/-/lodash.padstart-4.6.1.tgz",
- "integrity": "sha1-0uPuv/DZ05rVD1y9G1KnvOa7YRs=",
- "dev": true
- },
- "lodash.restparam": {
- "version": "3.6.1",
- "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz",
- "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=",
- "dev": true
- },
- "longest": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz",
- "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=",
- "dev": true
- },
- "loud-rejection": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz",
- "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=",
+ "magic-string": {
+ "version": "0.25.7",
+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz",
+ "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==",
"dev": true,
"requires": {
- "currently-unhandled": "^0.4.1",
- "signal-exit": "^3.0.0"
+ "sourcemap-codec": "^1.4.4"
}
},
- "lru-cache": {
- "version": "2.2.4",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.2.4.tgz",
- "integrity": "sha1-bGWGGb7PFAMdDQtZSxYELOTcBj0=",
- "dev": true
- },
- "makeerror": {
- "version": "1.0.11",
- "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.11.tgz",
- "integrity": "sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw=",
+ "markdown-it": {
+ "version": "10.0.0",
+ "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-10.0.0.tgz",
+ "integrity": "sha512-YWOP1j7UbDNz+TumYP1kpwnP0aEa711cJjrAQrzd0UXlbJfc5aAq0F/PZHjiioqDC1NKgvIMX+o+9Bk7yuM2dg==",
"dev": true,
"requires": {
- "tmpl": "1.0.x"
+ "argparse": "^1.0.7",
+ "entities": "~2.0.0",
+ "linkify-it": "^2.0.0",
+ "mdurl": "^1.0.1",
+ "uc.micro": "^1.0.5"
}
},
- "map-obj": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz",
- "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=",
- "dev": true
- },
- "map-stream": {
- "version": "0.0.7",
- "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.0.7.tgz",
- "integrity": "sha1-ih8HiW2CsQkmvTdEokIACfiJdKg=",
+ "markdown-it-anchor": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-5.3.0.tgz",
+ "integrity": "sha512-/V1MnLL/rgJ3jkMWo84UR+K+jF1cxNG1a+KwqeXqTIJ+jtA8aWSHuigx8lTzauiIjBDbwF3NcWQMotd0Dm39jA==",
"dev": true
},
"marked": {
- "version": "0.3.7",
- "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.7.tgz",
- "integrity": "sha512-zBEP4qO1YQp5aXHt8S5wTiOv9i2X74V/LQL0zhUNvVaklt6Ywa6lChxIvS+ibYlCGgADwKwZFhjC3+XfpsvQvQ==",
+ "version": "0.8.2",
+ "resolved": "https://registry.npmjs.org/marked/-/marked-0.8.2.tgz",
+ "integrity": "sha512-EGwzEeCcLniFX51DhTpmTom+dSA/MG/OBUDjnWtHbEnjAH180VzUeAw+oE4+Zv+CoYBWyRlYOTR0N8SO9R1PVw==",
"dev": true
},
"md5": {
@@ -3157,44 +3094,30 @@
"is-buffer": "~1.1.1"
}
},
+ "mdurl": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz",
+ "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=",
+ "dev": true
+ },
"media-typer": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
"integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=",
"dev": true
},
- "meow": {
- "version": "3.7.0",
- "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz",
- "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=",
- "dev": true,
- "requires": {
- "camelcase-keys": "^2.0.0",
- "decamelize": "^1.1.2",
- "loud-rejection": "^1.0.0",
- "map-obj": "^1.0.1",
- "minimist": "^1.1.3",
- "normalize-package-data": "^2.3.4",
- "object-assign": "^4.0.1",
- "read-pkg-up": "^1.0.1",
- "redent": "^1.0.0",
- "trim-newlines": "^1.0.0"
- },
- "dependencies": {
- "minimist": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
- "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
- "dev": true
- }
- }
- },
"merge-descriptors": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
"integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=",
"dev": true
},
+ "merge-stream": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
+ "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",
+ "dev": true
+ },
"methods": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
@@ -3208,461 +3131,174 @@
"dev": true
},
"mime-db": {
- "version": "1.30.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz",
- "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=",
- "dev": true
- },
- "mime-types": {
- "version": "2.1.17",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz",
- "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=",
- "dev": true,
- "requires": {
- "mime-db": "~1.30.0"
- }
- },
- "mini-tokenizer": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/mini-tokenizer/-/mini-tokenizer-0.1.2.tgz",
- "integrity": "sha1-+F9OdZvYCujG68e3ImhaiermzMw=",
- "dev": true
- },
- "minimatch": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
- "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
- "dev": true,
- "requires": {
- "brace-expansion": "^1.1.7"
- }
- },
- "minimist": {
- "version": "0.0.8",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
- "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
- "dev": true
- },
- "mkdirp": {
- "version": "0.5.1",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
- "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
- "dev": true,
- "requires": {
- "minimist": "0.0.8"
- }
- },
- "mkdirp-then": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/mkdirp-then/-/mkdirp-then-1.2.0.tgz",
- "integrity": "sha1-pJLIecpNhz9e5FAI+PVf0BUN48U=",
- "dev": true,
- "requires": {
- "any-promise": "^1.1.0",
- "mkdirp": "^0.5.0"
- }
- },
- "mocha": {
- "version": "1.21.5",
- "resolved": "https://registry.npmjs.org/mocha/-/mocha-1.21.5.tgz",
- "integrity": "sha1-fFiwkXTfl25DSiOx6NY5hz/FKek=",
- "dev": true,
- "requires": {
- "commander": "2.3.0",
- "debug": "2.0.0",
- "diff": "1.0.8",
- "escape-string-regexp": "1.0.2",
- "glob": "3.2.3",
- "growl": "1.8.1",
- "jade": "0.26.3",
- "mkdirp": "0.5.0"
- },
- "dependencies": {
- "commander": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/commander/-/commander-2.3.0.tgz",
- "integrity": "sha1-/UMOiJgy7DU7ms0d4hfBHLPu+HM=",
- "dev": true
- },
- "debug": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.0.0.tgz",
- "integrity": "sha1-ib2d9nMrUSVrxnBTQrugLtEhMe8=",
- "dev": true,
- "requires": {
- "ms": "0.6.2"
- }
- },
- "escape-string-regexp": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz",
- "integrity": "sha1-Tbwv5nTnGUnK8/smlc5/LcHZqNE=",
- "dev": true
- },
- "glob": {
- "version": "3.2.3",
- "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.3.tgz",
- "integrity": "sha1-4xPusknHr/qlxHUoaw4RW1mDlGc=",
- "dev": true,
- "requires": {
- "graceful-fs": "~2.0.0",
- "inherits": "2",
- "minimatch": "~0.2.11"
- }
- },
- "graceful-fs": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-2.0.3.tgz",
- "integrity": "sha1-fNLNsiiko/Nule+mzBQt59GhNtA=",
- "dev": true
- },
- "minimatch": {
- "version": "0.2.14",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz",
- "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=",
- "dev": true,
- "requires": {
- "lru-cache": "2",
- "sigmund": "~1.0.0"
- }
- },
- "mkdirp": {
- "version": "0.5.0",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz",
- "integrity": "sha1-HXMHam35hs2TROFecfzAWkyavxI=",
- "dev": true,
- "requires": {
- "minimist": "0.0.8"
- }
- },
- "ms": {
- "version": "0.6.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-0.6.2.tgz",
- "integrity": "sha1-2JwhJMb9wTU9Zai3e/GqxLGTcIw=",
- "dev": true
- }
- }
- },
- "mocha-phantomjs": {
- "version": "3.6.0",
- "resolved": "https://registry.npmjs.org/mocha-phantomjs/-/mocha-phantomjs-3.6.0.tgz",
- "integrity": "sha1-mxN/yMiRuPpd1ln3OOyVRYt0+5c=",
- "dev": true,
- "requires": {
- "commander": "~2.0.0",
- "mocha": "~1.20.1"
- },
- "dependencies": {
- "commander": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/commander/-/commander-2.0.0.tgz",
- "integrity": "sha1-0bhvkB+LZL2UG96tr5JFMDk76Sg=",
- "dev": true
- },
- "diff": {
- "version": "1.0.7",
- "resolved": "https://registry.npmjs.org/diff/-/diff-1.0.7.tgz",
- "integrity": "sha1-JLuwAcSn1VIhaefKvbLCgU7ZHPQ=",
- "dev": true
- },
- "glob": {
- "version": "3.2.3",
- "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.3.tgz",
- "integrity": "sha1-4xPusknHr/qlxHUoaw4RW1mDlGc=",
- "dev": true,
- "requires": {
- "graceful-fs": "~2.0.0",
- "inherits": "2",
- "minimatch": "~0.2.11"
- }
- },
- "graceful-fs": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-2.0.3.tgz",
- "integrity": "sha1-fNLNsiiko/Nule+mzBQt59GhNtA=",
- "dev": true
- },
- "growl": {
- "version": "1.7.0",
- "resolved": "https://registry.npmjs.org/growl/-/growl-1.7.0.tgz",
- "integrity": "sha1-3i1mE20ALhErpw8/EMMc98NQsto=",
- "dev": true
- },
- "minimatch": {
- "version": "0.2.14",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz",
- "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=",
- "dev": true,
- "requires": {
- "lru-cache": "2",
- "sigmund": "~1.0.0"
- }
- },
- "mkdirp": {
- "version": "0.3.5",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz",
- "integrity": "sha1-3j5fiWHIjHh+4TaN+EmsRBPsqNc=",
- "dev": true
- },
- "mocha": {
- "version": "1.20.1",
- "resolved": "https://registry.npmjs.org/mocha/-/mocha-1.20.1.tgz",
- "integrity": "sha1-80ODLZ/gx9l8ZPxwRI9RNt+f7Vs=",
- "dev": true,
- "requires": {
- "commander": "2.0.0",
- "debug": "*",
- "diff": "1.0.7",
- "glob": "3.2.3",
- "growl": "1.7.x",
- "jade": "0.26.3",
- "mkdirp": "0.3.5"
- }
- }
- }
- },
- "monotonic-timestamp": {
- "version": "0.0.8",
- "resolved": "https://registry.npmjs.org/monotonic-timestamp/-/monotonic-timestamp-0.0.8.tgz",
- "integrity": "sha1-Z5h9AqQcFfVotsCgWIWYndJAK6A=",
- "dev": true
- },
- "ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
- "dev": true
- },
- "mz": {
- "version": "2.7.0",
- "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz",
- "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==",
- "dev": true,
- "requires": {
- "any-promise": "^1.0.0",
- "object-assign": "^4.0.1",
- "thenify-all": "^1.0.0"
- }
- },
- "natives": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.1.tgz",
- "integrity": "sha512-8eRaxn8u/4wN8tGkhlc2cgwwvOLMLUMUn4IYTexMgWd+LyUDfeXVkk2ygQR0hvIHbJQXgHujia3ieUUDwNGkEA==",
- "dev": true
- },
- "negotiator": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz",
- "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=",
- "dev": true
- },
- "nerf-dart": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/nerf-dart/-/nerf-dart-1.0.0.tgz",
- "integrity": "sha1-5tq3/r9a2Bbqgc9cYpxaDr3nLBo=",
- "dev": true
- },
- "netrc": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/netrc/-/netrc-0.1.4.tgz",
- "integrity": "sha1-a+lPysqNd63gqWcNxGCRTJRHJEQ=",
- "dev": true
- },
- "node-int64": {
- "version": "0.3.3",
- "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.3.3.tgz",
- "integrity": "sha1-LW5rLs5d6FiLQ9iNG8QbJs0fqE0=",
+ "version": "1.30.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz",
+ "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=",
"dev": true
},
- "node-netrc": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/node-netrc/-/node-netrc-0.0.1.tgz",
- "integrity": "sha1-fT6wLgpQtdZmb9F4txwilONvCI8=",
+ "mime-types": {
+ "version": "2.1.17",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz",
+ "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=",
"dev": true,
"requires": {
- "netrc": "^0.1.3"
+ "mime-db": "~1.30.0"
}
},
- "nopt": {
- "version": "3.0.6",
- "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz",
- "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=",
+ "minimatch": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
+ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"dev": true,
"requires": {
- "abbrev": "1"
+ "brace-expansion": "^1.1.7"
}
},
- "normalize-package-data": {
- "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==",
+ "minimist": {
+ "version": "1.2.5",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
+ "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
+ "dev": true
+ },
+ "mkdirp": {
+ "version": "0.5.1",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
+ "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"dev": true,
"requires": {
- "hosted-git-info": "^2.1.4",
- "resolve": "^1.10.0",
- "semver": "2 || 3 || 4 || 5",
- "validate-npm-package-license": "^3.0.1"
+ "minimist": "0.0.8"
},
"dependencies": {
- "path-parse": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
- "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
+ "minimist": {
+ "version": "0.0.8",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
+ "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
"dev": true
- },
- "resolve": {
- "version": "1.12.0",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz",
- "integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==",
- "dev": true,
- "requires": {
- "path-parse": "^1.0.6"
- }
}
}
},
- "npm-package-arg": {
- "version": "4.2.1",
- "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-4.2.1.tgz",
- "integrity": "sha1-WTMD/eqF98Qid18X+et2cPaA4+w=",
- "dev": true,
- "requires": {
- "hosted-git-info": "^2.1.5",
- "semver": "^5.1.0"
- }
- },
- "npm-registry-client": {
- "version": "7.5.0",
- "resolved": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-7.5.0.tgz",
- "integrity": "sha1-D23W5dEUJM+pn85bkw/q8JtPfwQ=",
- "dev": true,
- "requires": {
- "concat-stream": "^1.5.2",
- "graceful-fs": "^4.1.6",
- "normalize-package-data": "~1.0.1 || ^2.0.0",
- "npm-package-arg": "^3.0.0 || ^4.0.0",
- "npmlog": "2 || ^3.1.0 || ^4.0.0",
- "once": "^1.3.3",
- "request": "^2.74.0",
- "retry": "^0.10.0",
- "semver": "2 >=2.2.1 || 3.x || 4 || 5",
- "slide": "^1.1.3"
+ "mocha": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/mocha/-/mocha-4.1.0.tgz",
+ "integrity": "sha512-0RVnjg1HJsXY2YFDoTNzcc1NKhYuXKRrBAG2gDygmJJA136Cs2QlRliZG1mA0ap7cuaT30mw16luAeln+4RiNA==",
+ "dev": true,
+ "requires": {
+ "browser-stdout": "1.3.0",
+ "commander": "2.11.0",
+ "debug": "3.1.0",
+ "diff": "3.3.1",
+ "escape-string-regexp": "1.0.5",
+ "glob": "7.1.2",
+ "growl": "1.10.3",
+ "he": "1.1.1",
+ "mkdirp": "0.5.1",
+ "supports-color": "4.4.0"
},
"dependencies": {
- "graceful-fs": {
- "version": "4.2.3",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz",
- "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==",
+ "commander": {
+ "version": "2.11.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz",
+ "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==",
"dev": true
},
- "npmlog": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
- "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
+ "glob": {
+ "version": "7.1.2",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
+ "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
"dev": true,
- "optional": true,
"requires": {
- "are-we-there-yet": "~1.1.2",
- "console-control-strings": "~1.1.0",
- "gauge": "~2.7.3",
- "set-blocking": "~2.0.0"
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.0.4",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
}
- }
- }
- },
- "npmconf": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/npmconf/-/npmconf-2.1.3.tgz",
- "integrity": "sha512-iTK+HI68GceCoGOHAQiJ/ik1iDfI7S+cgyG8A+PP18IU3X83kRhQIRhAUNj4Bp2JMx6Zrt5kCiozYa9uGWTjhA==",
- "dev": true,
- "requires": {
- "config-chain": "~1.1.8",
- "inherits": "~2.0.0",
- "ini": "^1.2.0",
- "mkdirp": "^0.5.0",
- "nopt": "~3.0.1",
- "once": "~1.3.0",
- "osenv": "^0.1.0",
- "safe-buffer": "^5.1.1",
- "semver": "2 || 3 || 4",
- "uid-number": "0.0.5"
- },
- "dependencies": {
- "once": {
- "version": "1.3.3",
- "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz",
- "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=",
+ },
+ "has-flag": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz",
+ "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=",
+ "dev": true
+ },
+ "supports-color": {
+ "version": "4.4.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz",
+ "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==",
"dev": true,
"requires": {
- "wrappy": "1"
+ "has-flag": "^2.0.0"
}
- },
- "semver": {
- "version": "4.3.6",
- "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz",
- "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=",
- "dev": true
}
}
},
- "npmlog": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-1.2.1.tgz",
- "integrity": "sha1-KOe+YZYJtT960d0wChDWTXFiaLY=",
+ "ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
+ "dev": true
+ },
+ "negotiator": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz",
+ "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=",
+ "dev": true
+ },
+ "nise": {
+ "version": "1.5.3",
+ "resolved": "https://registry.npmjs.org/nise/-/nise-1.5.3.tgz",
+ "integrity": "sha512-Ymbac/94xeIrMf59REBPOv0thr+CJVFMhrlAkW/gjCIE58BGQdCj0x7KRCb3yz+Ga2Rz3E9XXSvUyyxqqhjQAQ==",
"dev": true,
"requires": {
- "ansi": "~0.3.0",
- "are-we-there-yet": "~1.0.0",
- "gauge": "~1.2.0"
+ "@sinonjs/formatio": "^3.2.1",
+ "@sinonjs/text-encoding": "^0.7.1",
+ "just-extend": "^4.0.2",
+ "lolex": "^5.0.1",
+ "path-to-regexp": "^1.7.0"
},
"dependencies": {
- "are-we-there-yet": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.0.6.tgz",
- "integrity": "sha1-otKMkxAqpsyWJFomy5VN4G7FPww=",
+ "lolex": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/lolex/-/lolex-5.1.2.tgz",
+ "integrity": "sha512-h4hmjAvHTmd+25JSwrtTIuwbKdwg5NzZVRMLn9saij4SZaepCrTCxPr35H/3bjwfMJtN+t3CX8672UIkglz28A==",
"dev": true,
"requires": {
- "delegates": "^1.0.0",
- "readable-stream": "^2.0.0 || ^1.1.13"
+ "@sinonjs/commons": "^1.7.0"
}
},
- "delegates": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
- "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=",
- "dev": true
- },
- "gauge": {
- "version": "1.2.7",
- "resolved": "https://registry.npmjs.org/gauge/-/gauge-1.2.7.tgz",
- "integrity": "sha1-6c7FSD09TuDvRLYKfZnkk14TbZM=",
+ "path-to-regexp": {
+ "version": "1.8.0",
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz",
+ "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==",
"dev": true,
"requires": {
- "ansi": "^0.3.0",
- "has-unicode": "^2.0.0",
- "lodash.pad": "^4.1.0",
- "lodash.padend": "^4.1.0",
- "lodash.padstart": "^4.1.0"
+ "isarray": "0.0.1"
}
}
}
},
- "number-is-nan": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
- "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
+ "node-releases": {
+ "version": "1.1.58",
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.58.tgz",
+ "integrity": "sha512-NxBudgVKiRh/2aPWMgPR7bPTX0VPmGx5QBwCtdHitnqFE5/O8DeBXuIMH1nwNnw/aMo6AjOrpsHzfY3UbUJ7yg==",
"dev": true
},
- "oauth-sign": {
- "version": "0.8.2",
- "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz",
- "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=",
+ "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
},
- "object-assign": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz",
- "integrity": "sha1-ejs9DpgGPUP0wD8uiubNUahog6A=",
+ "null-check": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/null-check/-/null-check-1.0.0.tgz",
+ "integrity": "sha1-l33/1xdgErnsMNKjnbXPcqBDnt0=",
+ "dev": true
+ },
+ "object-component": {
+ "version": "0.0.3",
+ "resolved": "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz",
+ "integrity": "sha1-8MaapQ78lbhmwYb0AKM3acsvEpE=",
"dev": true
},
"object-foreach": {
@@ -3670,6 +3306,12 @@
"resolved": "https://registry.npmjs.org/object-foreach/-/object-foreach-0.1.2.tgz",
"integrity": "sha1-10IcW0DjtqPvV6xiQ2jSHY+NLew="
},
+ "object-keys": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
+ "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
+ "dev": true
+ },
"object-merge": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/object-merge/-/object-merge-2.5.1.tgz",
@@ -3679,6 +3321,18 @@
"object-foreach": ">=0.1.2"
}
},
+ "object.assign": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz",
+ "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==",
+ "dev": true,
+ "requires": {
+ "define-properties": "^1.1.2",
+ "function-bind": "^1.1.1",
+ "has-symbols": "^1.0.0",
+ "object-keys": "^1.0.11"
+ }
+ },
"on-finished": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
@@ -3697,37 +3351,22 @@
"wrappy": "1"
}
},
- "only": {
- "version": "0.0.2",
- "resolved": "https://registry.npmjs.org/only/-/only-0.0.2.tgz",
- "integrity": "sha1-Kv3oTQPlC5qO3EROMGEKcCle37Q=",
- "dev": true
- },
- "open": {
- "version": "0.0.5",
- "resolved": "https://registry.npmjs.org/open/-/open-0.0.5.tgz",
- "integrity": "sha1-QsPhjslUZra/DcQvOilFw/DK2Pw=",
- "dev": true
- },
- "openurl": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/openurl/-/openurl-1.1.1.tgz",
- "integrity": "sha1-OHW0sO96UsFW8NtB1GCduw+Us4c=",
- "dev": true
- },
- "os-homedir": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
- "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
- "dev": true
- },
- "os-locale": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz",
- "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=",
+ "optimist": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz",
+ "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=",
"dev": true,
"requires": {
- "lcid": "^1.0.0"
+ "minimist": "~0.0.1",
+ "wordwrap": "~0.0.2"
+ },
+ "dependencies": {
+ "minimist": {
+ "version": "0.0.10",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz",
+ "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=",
+ "dev": true
+ }
}
},
"os-tmpdir": {
@@ -3736,29 +3375,28 @@
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
"dev": true
},
- "osenv": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz",
- "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
+ "pako": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz",
+ "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==",
+ "dev": true
+ },
+ "parseqs": {
+ "version": "0.0.5",
+ "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz",
+ "integrity": "sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0=",
"dev": true,
"requires": {
- "os-homedir": "^1.0.0",
- "os-tmpdir": "^1.0.0"
+ "better-assert": "~1.0.0"
}
},
- "parse-github-repo-url": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/parse-github-repo-url/-/parse-github-repo-url-1.4.1.tgz",
- "integrity": "sha1-nn2LslKmy2ukJZUGC3v23z28H1A=",
- "dev": true
- },
- "parse-json": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
- "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
+ "parseuri": {
+ "version": "0.0.5",
+ "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.5.tgz",
+ "integrity": "sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo=",
"dev": true,
"requires": {
- "error-ex": "^1.2.0"
+ "better-assert": "~1.0.0"
}
},
"parseurl": {
@@ -3767,35 +3405,16 @@
"integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=",
"dev": true
},
- "path-exists": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
- "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=",
- "dev": true,
- "requires": {
- "pinkie-promise": "^2.0.0"
- }
- },
"path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
"dev": true
},
- "path-object": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/path-object/-/path-object-2.3.0.tgz",
- "integrity": "sha1-A+RmU+XDdcYK8cq92UvGRIpdkRA=",
- "dev": true,
- "requires": {
- "core-util-is": "^1.0.1",
- "lodash.assign": "^3.0.0"
- }
- },
- "path-search": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/path-search/-/path-search-1.0.1.tgz",
- "integrity": "sha1-0hrLvXBGIxLXgJU6v38oXmSVo1M=",
+ "path-parse": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
+ "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
"dev": true
},
"path-to-regexp": {
@@ -3804,240 +3423,30 @@
"integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=",
"dev": true
},
- "path-type": {
+ "pathval": {
"version": "1.1.0",
- "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",
- "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=",
- "dev": true,
- "requires": {
- "graceful-fs": "^4.1.2",
- "pify": "^2.0.0",
- "pinkie-promise": "^2.0.0"
- },
- "dependencies": {
- "graceful-fs": {
- "version": "4.2.3",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz",
- "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==",
- "dev": true
- }
- }
- },
- "pause-stream": {
- "version": "0.0.11",
- "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz",
- "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=",
- "dev": true,
- "requires": {
- "through": "~2.3"
- },
- "dependencies": {
- "through": {
- "version": "2.3.8",
- "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
- "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
- "dev": true
- }
- }
- },
- "pend": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
- "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=",
+ "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz",
+ "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=",
"dev": true
},
- "phantomjs": {
- "version": "2.1.7",
- "resolved": "https://registry.npmjs.org/phantomjs/-/phantomjs-2.1.7.tgz",
- "integrity": "sha1-xpEPZ5NcNyhbYRQyn8LyfV8+MTQ=",
- "dev": true,
- "requires": {
- "extract-zip": "~1.5.0",
- "fs-extra": "~0.26.4",
- "hasha": "^2.2.0",
- "kew": "~0.7.0",
- "progress": "~1.1.8",
- "request": "~2.67.0",
- "request-progress": "~2.0.1",
- "which": "~1.2.2"
- },
- "dependencies": {
- "async": {
- "version": "2.6.3",
- "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz",
- "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==",
- "dev": true,
- "requires": {
- "lodash": "^4.17.14"
- }
- },
- "bl": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/bl/-/bl-1.0.3.tgz",
- "integrity": "sha1-/FQhoo/UImA2w7OJGmaiW8ZNIm4=",
- "dev": true,
- "requires": {
- "readable-stream": "~2.0.5"
- }
- },
- "form-data": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/form-data/-/form-data-1.0.1.tgz",
- "integrity": "sha1-rjFduaSQf6BlUCMEpm13M0de43w=",
- "dev": true,
- "requires": {
- "async": "^2.0.1",
- "combined-stream": "^1.0.5",
- "mime-types": "^2.1.11"
- }
- },
- "fs-extra": {
- "version": "0.26.7",
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.26.7.tgz",
- "integrity": "sha1-muH92UiXeY7at20JGM9C0MMYT6k=",
- "dev": true,
- "requires": {
- "graceful-fs": "^4.1.2",
- "jsonfile": "^2.1.0",
- "klaw": "^1.0.0",
- "path-is-absolute": "^1.0.0",
- "rimraf": "^2.2.8"
- }
- },
- "graceful-fs": {
- "version": "4.2.3",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz",
- "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==",
- "dev": true
- },
- "isarray": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
- "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
- "dev": true
- },
- "lodash": {
- "version": "4.17.15",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
- "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
- "dev": true
- },
- "node-uuid": {
- "version": "1.4.8",
- "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz",
- "integrity": "sha1-sEDrCSOWivq/jTL7HxfxFn/auQc=",
- "dev": true
- },
- "qs": {
- "version": "5.2.1",
- "resolved": "https://registry.npmjs.org/qs/-/qs-5.2.1.tgz",
- "integrity": "sha1-gB/uAw4LlFDWOFrcSKTMVbRK7fw=",
- "dev": true
- },
- "readable-stream": {
- "version": "2.0.6",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz",
- "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=",
- "dev": true,
- "requires": {
- "core-util-is": "~1.0.0",
- "inherits": "~2.0.1",
- "isarray": "~1.0.0",
- "process-nextick-args": "~1.0.6",
- "string_decoder": "~0.10.x",
- "util-deprecate": "~1.0.1"
- }
- },
- "request": {
- "version": "2.67.0",
- "resolved": "https://registry.npmjs.org/request/-/request-2.67.0.tgz",
- "integrity": "sha1-ivdHgOK/EeoK6aqWXBHxGv0nJ0I=",
- "dev": true,
- "requires": {
- "aws-sign2": "~0.6.0",
- "bl": "~1.0.0",
- "caseless": "~0.11.0",
- "combined-stream": "~1.0.5",
- "extend": "~3.0.0",
- "forever-agent": "~0.6.1",
- "form-data": "~1.0.0-rc3",
- "har-validator": "~2.0.2",
- "hawk": "~3.1.0",
- "http-signature": "~1.1.0",
- "is-typedarray": "~1.0.0",
- "isstream": "~0.1.2",
- "json-stringify-safe": "~5.0.1",
- "mime-types": "~2.1.7",
- "node-uuid": "~1.4.7",
- "oauth-sign": "~0.8.0",
- "qs": "~5.2.0",
- "stringstream": "~0.0.4",
- "tough-cookie": "~2.2.0",
- "tunnel-agent": "~0.4.1"
- }
- },
- "tough-cookie": {
- "version": "2.2.2",
- "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.2.2.tgz",
- "integrity": "sha1-yDoYMPTl7wuT7yo0iOck+N4Basc=",
- "dev": true
- },
- "which": {
- "version": "1.2.14",
- "resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz",
- "integrity": "sha1-mofEN48D6CfOyvGs31bHNsAcFOU=",
- "dev": true,
- "requires": {
- "isexe": "^2.0.0"
- }
- }
- }
- },
- "pify": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
- "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
+ "picomatch": {
+ "version": "2.2.2",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz",
+ "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==",
"dev": true
},
- "pinkie": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz",
- "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=",
+ "prettier": {
+ "version": "1.19.1",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz",
+ "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==",
"dev": true
},
- "pinkie-promise": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
- "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=",
- "dev": true,
- "requires": {
- "pinkie": "^2.0.0"
- }
- },
"private": {
"version": "0.1.8",
"resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz",
"integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==",
"dev": true
},
- "process-nextick-args": {
- "version": "1.0.7",
- "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
- "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=",
- "dev": true
- },
- "progress": {
- "version": "1.1.8",
- "resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz",
- "integrity": "sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74=",
- "dev": true
- },
- "proto-list": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz",
- "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=",
- "dev": true
- },
"proxy-addr": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.2.tgz",
@@ -4048,34 +3457,16 @@
"ipaddr.js": "1.5.2"
}
},
- "pump": {
- "version": "0.3.5",
- "resolved": "https://registry.npmjs.org/pump/-/pump-0.3.5.tgz",
- "integrity": "sha1-rl/4wfk+2HrcZTCpdWWxJvWFRUs=",
- "dev": true,
- "requires": {
- "end-of-stream": "~1.0.0",
- "once": "~1.2.0"
- },
- "dependencies": {
- "once": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/once/-/once-1.2.0.tgz",
- "integrity": "sha1-3hkFxjavh0qPuoYtmqvd0fkgRhw=",
- "dev": true
- }
- }
- },
- "punycode": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
- "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
+ "pseudomap": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
+ "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=",
"dev": true
},
- "q": {
- "version": "1.5.1",
- "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
- "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
+ "qjobs": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz",
+ "integrity": "sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==",
"dev": true
},
"qs": {
@@ -4084,15 +3475,6 @@
"integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==",
"dev": true
},
- "queue-component": {
- "version": "git://github.com/component/queue.git#23dbce0f19a714b020b4fc52ed07ac0365c9b449",
- "from": "git://github.com/component/queue.git#1.0.6",
- "dev": true,
- "requires": {
- "component-bind": "1.0.0",
- "component-emitter": "1.1.2"
- }
- },
"range-parser": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz",
@@ -4101,35 +3483,14 @@
},
"raw-body": {
"version": "2.3.2",
- "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz",
- "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=",
- "dev": true,
- "requires": {
- "bytes": "3.0.0",
- "http-errors": "1.6.2",
- "iconv-lite": "0.4.19",
- "unpipe": "1.0.0"
- }
- },
- "read-pkg": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
- "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=",
- "dev": true,
- "requires": {
- "load-json-file": "^1.0.0",
- "normalize-package-data": "^2.3.2",
- "path-type": "^1.0.0"
- }
- },
- "read-pkg-up": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz",
- "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=",
+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz",
+ "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=",
"dev": true,
"requires": {
- "find-up": "^1.0.0",
- "read-pkg": "^1.0.0"
+ "bytes": "3.0.0",
+ "http-errors": "1.6.2",
+ "iconv-lite": "0.4.19",
+ "unpipe": "1.0.0"
}
},
"readable-stream": {
@@ -4144,253 +3505,272 @@
"string_decoder": "~0.10.x"
}
},
- "recast": {
- "version": "0.10.33",
- "resolved": "https://registry.npmjs.org/recast/-/recast-0.10.33.tgz",
- "integrity": "sha1-lCgI96oBbx+nFCxGHX5XBKqo1pc=",
+ "readdirp": {
+ "version": "3.4.0",
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz",
+ "integrity": "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==",
"dev": true,
"requires": {
- "ast-types": "0.8.12",
- "esprima-fb": "~15001.1001.0-dev-harmony-fb",
- "private": "~0.1.5",
- "source-map": "~0.5.0"
- },
- "dependencies": {
- "ast-types": {
- "version": "0.8.12",
- "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.8.12.tgz",
- "integrity": "sha1-oNkOQ1G7iHcWyD/WN+v4GK9K38w=",
- "dev": true
- },
- "esprima-fb": {
- "version": "15001.1001.0-dev-harmony-fb",
- "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1001.0-dev-harmony-fb.tgz",
- "integrity": "sha1-Q761fsJujPI3092LM+QlM1d/Jlk=",
- "dev": true
- }
+ "picomatch": "^2.2.1"
}
},
- "redent": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz",
- "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=",
+ "regenerate": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.1.tgz",
+ "integrity": "sha512-j2+C8+NtXQgEKWk49MMP5P/u2GhnahTtVkRIHr5R5lVRlbKvmQ+oS+A5aLKWp2ma5VkT8sh6v+v4hbH0YHR66A==",
+ "dev": true
+ },
+ "regenerate-unicode-properties": {
+ "version": "8.2.0",
+ "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz",
+ "integrity": "sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==",
"dev": true,
"requires": {
- "indent-string": "^2.1.0",
- "strip-indent": "^1.0.1"
+ "regenerate": "^1.4.0"
}
},
- "redis": {
- "version": "2.8.0",
- "resolved": "https://registry.npmjs.org/redis/-/redis-2.8.0.tgz",
- "integrity": "sha512-M1OkonEQwtRmZv4tEWF2VgpG0JWJ8Fv1PhlgT5+B+uNq2cA3Rt1Yt/ryoR+vQNOQcIEgdCdfH0jr3bDpihAw1A==",
+ "regenerator-transform": {
+ "version": "0.14.4",
+ "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.4.tgz",
+ "integrity": "sha512-EaJaKPBI9GvKpvUz2mz4fhx7WPgvwRLY9v3hlNHWmAuJHI13T4nwKnNvm5RWJzEdnI5g5UwtOww+S8IdoUC2bw==",
"dev": true,
"requires": {
- "double-ended-queue": "^2.1.0-0",
- "redis-commands": "^1.2.0",
- "redis-parser": "^2.6.0"
+ "@babel/runtime": "^7.8.4",
+ "private": "^0.1.8"
}
},
- "redis-commands": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.5.0.tgz",
- "integrity": "sha512-6KxamqpZ468MeQC3bkWmCB1fp56XL64D4Kf0zJSwDZbVLLm7KFkoIcHrgRvQ+sk8dnhySs7+yBg94yIkAK7aJg==",
- "dev": true
+ "regexpu-core": {
+ "version": "4.7.0",
+ "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.0.tgz",
+ "integrity": "sha512-TQ4KXRnIn6tz6tjnrXEkD/sshygKH/j5KzK86X8MkeHyZ8qst/LZ89j3X4/8HEIfHANTFIP/AbXakeRhWIl5YQ==",
+ "dev": true,
+ "requires": {
+ "regenerate": "^1.4.0",
+ "regenerate-unicode-properties": "^8.2.0",
+ "regjsgen": "^0.5.1",
+ "regjsparser": "^0.6.4",
+ "unicode-match-property-ecmascript": "^1.0.4",
+ "unicode-match-property-value-ecmascript": "^1.2.0"
+ }
},
- "redis-parser": {
- "version": "2.6.0",
- "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-2.6.0.tgz",
- "integrity": "sha1-Uu0J2srBCPGmMcB+m2mUHnoZUEs=",
+ "regjsgen": {
+ "version": "0.5.2",
+ "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz",
+ "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==",
"dev": true
},
- "regenerator": {
- "version": "0.8.46",
- "resolved": "https://registry.npmjs.org/regenerator/-/regenerator-0.8.46.tgz",
- "integrity": "sha1-FUwydoY2HtUsrWmyVF78U6PQdpY=",
+ "regjsparser": {
+ "version": "0.6.4",
+ "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.4.tgz",
+ "integrity": "sha512-64O87/dPDgfk8/RQqC4gkZoGyyWFIEUTTh80CU6CWuK5vkCGyekIx+oKcEIYtP/RAxSQltCZHCNu/mdd7fqlJw==",
"dev": true,
"requires": {
- "commoner": "~0.10.3",
- "defs": "~1.1.0",
- "esprima-fb": "~15001.1001.0-dev-harmony-fb",
- "private": "~0.1.5",
- "recast": "0.10.33",
- "regenerator-runtime": "~0.9.5",
- "through": "~2.3.8"
+ "jsesc": "~0.5.0"
},
"dependencies": {
- "esprima-fb": {
- "version": "15001.1001.0-dev-harmony-fb",
- "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1001.0-dev-harmony-fb.tgz",
- "integrity": "sha1-Q761fsJujPI3092LM+QlM1d/Jlk=",
- "dev": true
- },
- "through": {
- "version": "2.3.8",
- "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
- "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
+ "jsesc": {
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
+ "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=",
"dev": true
}
}
},
- "regenerator-runtime": {
- "version": "0.9.6",
- "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.9.6.tgz",
- "integrity": "sha1-0z65XQ0gAaS+OWWXB8UbDLcc4Ck=",
- "dev": true
- },
"repeat-string": {
"version": "1.6.1",
"resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
"integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=",
"dev": true
},
- "repeating": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz",
- "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=",
- "dev": true,
- "requires": {
- "is-finite": "^1.0.0"
- }
- },
- "request": {
- "version": "2.79.0",
- "resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz",
- "integrity": "sha1-Tf5b9r6LjNw3/Pk+BLZVd3InEN4=",
- "dev": true,
- "requires": {
- "aws-sign2": "~0.6.0",
- "aws4": "^1.2.1",
- "caseless": "~0.11.0",
- "combined-stream": "~1.0.5",
- "extend": "~3.0.0",
- "forever-agent": "~0.6.1",
- "form-data": "~2.1.1",
- "har-validator": "~2.0.6",
- "hawk": "~3.1.3",
- "http-signature": "~1.1.0",
- "is-typedarray": "~1.0.0",
- "isstream": "~0.1.2",
- "json-stringify-safe": "~5.0.1",
- "mime-types": "~2.1.7",
- "oauth-sign": "~0.8.1",
- "qs": "~6.3.0",
- "stringstream": "~0.0.4",
- "tough-cookie": "~2.3.0",
- "tunnel-agent": "~0.4.1",
- "uuid": "^3.0.0"
+ "requirejs": {
+ "version": "2.3.6",
+ "resolved": "https://registry.npmjs.org/requirejs/-/requirejs-2.3.6.tgz",
+ "integrity": "sha512-ipEzlWQe6RK3jkzikgCupiTbTvm4S0/CAU5GlgptkN5SO6F3u0UD0K18wy6ErDqiCyP4J4YYe1HuAShvsxePLg==",
+ "dev": true
+ },
+ "requires-port": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
+ "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=",
+ "dev": true
+ },
+ "requizzle": {
+ "version": "0.2.3",
+ "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.3.tgz",
+ "integrity": "sha512-YanoyJjykPxGHii0fZP0uUPEXpvqfBDxWV7s6GKAiiOsiqhX6vHNyW3Qzdmqp/iq/ExbhaGbVrjB4ruEVSM4GQ==",
+ "dev": true,
+ "requires": {
+ "lodash": "^4.17.14"
},
"dependencies": {
- "qs": {
- "version": "6.3.2",
- "resolved": "https://registry.npmjs.org/qs/-/qs-6.3.2.tgz",
- "integrity": "sha1-51vV9uJoEioqDgvaYwslUMFmUCw=",
+ "lodash": {
+ "version": "4.17.15",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
+ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
"dev": true
}
}
},
- "request-progress": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-2.0.1.tgz",
- "integrity": "sha1-XTa7V5YcZzqlt4jbyBQf3yO0Tgg=",
+ "resolve": {
+ "version": "1.17.0",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz",
+ "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==",
"dev": true,
"requires": {
- "throttleit": "^1.0.0"
+ "path-parse": "^1.0.6"
}
},
- "require-directory": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
- "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
+ "rfdc": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.1.4.tgz",
+ "integrity": "sha512-5C9HXdzK8EAqN7JDif30jqsBzavB7wLpaubisuQIGHWf2gUXSpzy6ArX/+Da8RjFpagWsCn+pIgxTMAmKw9Zug==",
"dev": true
},
- "require-main-filename": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
- "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=",
- "dev": true
+ "right-align": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz",
+ "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=",
+ "dev": true,
+ "requires": {
+ "align-text": "^0.1.1"
+ }
},
- "require-relative": {
- "version": "0.8.7",
- "resolved": "https://registry.npmjs.org/require-relative/-/require-relative-0.8.7.tgz",
- "integrity": "sha1-eZlTn8ngR6N5KPoZb44VY9q9Nt4=",
- "dev": true
+ "rimraf": {
+ "version": "2.7.1",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
+ "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
+ "dev": true,
+ "requires": {
+ "glob": "^7.1.3"
+ }
},
- "requizzle": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.1.tgz",
- "integrity": "sha1-aUPDUwxNmn5G8c3dUcFY/GcM294=",
+ "rollup": {
+ "version": "1.32.1",
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.32.1.tgz",
+ "integrity": "sha512-/2HA0Ec70TvQnXdzynFffkjA6XN+1e2pEv/uKS5Ulca40g2L7KuOE3riasHoNVHOsFD5KKZgDsMk1CP3Tw9s+A==",
"dev": true,
"requires": {
- "underscore": "~1.6.0"
+ "@types/estree": "*",
+ "@types/node": "*",
+ "acorn": "^7.1.0"
},
"dependencies": {
- "underscore": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz",
- "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=",
+ "acorn": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.3.1.tgz",
+ "integrity": "sha512-tLc0wSnatxAQHVHUapaHdz72pi9KUyHjq5KyHjGg9Y8Ifdc79pTh2XvI6I1/chZbnM7QtNKzh66ooDogPZSleA==",
"dev": true
}
}
},
- "resolve-path": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/resolve-path/-/resolve-path-1.4.0.tgz",
- "integrity": "sha1-xL2p9e+y/OZSR4c6s2u02DT+Fvc=",
+ "rollup-plugin-babel": {
+ "version": "4.4.0",
+ "resolved": "https://registry.npmjs.org/rollup-plugin-babel/-/rollup-plugin-babel-4.4.0.tgz",
+ "integrity": "sha512-Lek/TYp1+7g7I+uMfJnnSJ7YWoD58ajo6Oarhlex7lvUce+RCKRuGRSgztDO3/MF/PuGKmUL5iTHKf208UNszw==",
"dev": true,
"requires": {
- "http-errors": "~1.6.2",
- "path-is-absolute": "1.0.1"
+ "@babel/helper-module-imports": "^7.0.0",
+ "rollup-pluginutils": "^2.8.1"
}
},
- "retry": {
- "version": "0.10.1",
- "resolved": "https://registry.npmjs.org/retry/-/retry-0.10.1.tgz",
- "integrity": "sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=",
- "dev": true
+ "rollup-plugin-commonjs": {
+ "version": "9.3.4",
+ "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-9.3.4.tgz",
+ "integrity": "sha512-DTZOvRoiVIHHLFBCL4pFxOaJt8pagxsVldEXBOn6wl3/V21wVaj17HFfyzTsQUuou3sZL3lEJZVWKPFblJfI6w==",
+ "dev": true,
+ "requires": {
+ "estree-walker": "^0.6.0",
+ "magic-string": "^0.25.2",
+ "resolve": "^1.10.0",
+ "rollup-pluginutils": "^2.6.0"
+ }
},
- "right-align": {
- "version": "0.1.3",
- "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz",
- "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=",
+ "rollup-plugin-json": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/rollup-plugin-json/-/rollup-plugin-json-4.0.0.tgz",
+ "integrity": "sha512-hgb8N7Cgfw5SZAkb3jf0QXii6QX/FOkiIq2M7BAQIEydjHvTyxXHQiIzZaTFgx1GK0cRCHOCBHIyEkkLdWKxow==",
"dev": true,
"requires": {
- "align-text": "^0.1.1"
+ "rollup-pluginutils": "^2.5.0"
}
},
- "rimraf": {
- "version": "2.6.2",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz",
- "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==",
+ "rollup-plugin-legacy": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/rollup-plugin-legacy/-/rollup-plugin-legacy-1.0.0.tgz",
+ "integrity": "sha1-0IvfxEEL0Tgn9CeMUYcNPY29HqM=",
"dev": true,
"requires": {
- "glob": "^7.0.5"
+ "rollup-pluginutils": "^1.5.2"
+ },
+ "dependencies": {
+ "estree-walker": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.2.1.tgz",
+ "integrity": "sha1-va/oCVOD2EFNXcLs9MkXO225QS4=",
+ "dev": true
+ },
+ "rollup-pluginutils": {
+ "version": "1.5.2",
+ "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz",
+ "integrity": "sha1-HhVud4+UtyVb+hs9AXi+j1xVJAg=",
+ "dev": true,
+ "requires": {
+ "estree-walker": "^0.2.1",
+ "minimatch": "^3.0.2"
+ }
+ }
}
},
- "rimraf-then": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/rimraf-then/-/rimraf-then-1.0.1.tgz",
- "integrity": "sha1-vURYp561YbdUiq7ArDdT70Kf5ws=",
+ "rollup-plugin-node-resolve": {
+ "version": "4.2.4",
+ "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-4.2.4.tgz",
+ "integrity": "sha512-t/64I6l7fZ9BxqD3XlX4ZeO6+5RLKyfpwE2CiPNUKa+GocPlQhf/C208ou8y3AwtNsc6bjSk/8/6y/YAyxCIvw==",
"dev": true,
"requires": {
- "any-promise": "^1.3.0",
- "rimraf": "2"
+ "@types/resolve": "0.0.8",
+ "builtin-modules": "^3.1.0",
+ "is-module": "^1.0.0",
+ "resolve": "^1.10.0"
}
},
- "run-auto": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/run-auto/-/run-auto-1.1.3.tgz",
- "integrity": "sha1-wtUWP+wat4tjRc3TmS/OAy9nH4g=",
+ "rollup-plugin-replace": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/rollup-plugin-replace/-/rollup-plugin-replace-2.2.0.tgz",
+ "integrity": "sha512-/5bxtUPkDHyBJAKketb4NfaeZjL5yLZdeUihSfbF2PQMz+rSTEb8ARKoOl3UBT4m7/X+QOXJo3sLTcq+yMMYTA==",
"dev": true,
"requires": {
- "dezalgo": "^1.0.1"
+ "magic-string": "^0.25.2",
+ "rollup-pluginutils": "^2.6.0"
}
},
- "run-series": {
- "version": "1.1.8",
- "resolved": "https://registry.npmjs.org/run-series/-/run-series-1.1.8.tgz",
- "integrity": "sha512-+GztYEPRpIsQoCSraWHDBs9WVy4eVME16zhOtDB4H9J4xN0XRhknnmLOl+4gRgZtu8dpp9N/utSPjKH/xmDzXg==",
- "dev": true
+ "rollup-plugin-uglify": {
+ "version": "6.0.4",
+ "resolved": "https://registry.npmjs.org/rollup-plugin-uglify/-/rollup-plugin-uglify-6.0.4.tgz",
+ "integrity": "sha512-ddgqkH02klveu34TF0JqygPwZnsbhHVI6t8+hGTcYHngPkQb5MIHI0XiztXIN/d6V9j+efwHAqEL7LspSxQXGw==",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "^7.0.0",
+ "jest-worker": "^24.0.0",
+ "serialize-javascript": "^2.1.2",
+ "uglify-js": "^3.4.9"
+ },
+ "dependencies": {
+ "uglify-js": {
+ "version": "3.10.0",
+ "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.10.0.tgz",
+ "integrity": "sha512-Esj5HG5WAyrLIdYU74Z3JdG2PxdIusvj6IWHMtlyESxc7kcDz7zYlYjpnSokn1UbpV0d/QX9fan7gkCNd/9BQA==",
+ "dev": true
+ }
+ }
+ },
+ "rollup-pluginutils": {
+ "version": "2.8.2",
+ "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz",
+ "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==",
+ "dev": true,
+ "requires": {
+ "estree-walker": "^0.6.1"
+ }
},
"safe-buffer": {
"version": "5.1.1",
@@ -4398,59 +3778,76 @@
"integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==",
"dev": true
},
- "sane": {
- "version": "0.5.4",
- "resolved": "https://registry.npmjs.org/sane/-/sane-0.5.4.tgz",
- "integrity": "sha1-DkO5vKk6xuHmPtFcyl18vWI8w20=",
+ "sauce-connect-launcher": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/sauce-connect-launcher/-/sauce-connect-launcher-1.3.2.tgz",
+ "integrity": "sha512-wf0coUlidJ7rmeClgVVBh6Kw55/yalZCY/Un5RgjSnTXRAeGqagnTsTYpZaqC4dCtrY4myuYpOAZXCdbO7lHfQ==",
+ "dev": true,
+ "requires": {
+ "adm-zip": "~0.4.3",
+ "async": "^2.1.2",
+ "https-proxy-agent": "^5.0.0",
+ "lodash": "^4.16.6",
+ "rimraf": "^2.5.4"
+ },
+ "dependencies": {
+ "lodash": {
+ "version": "4.17.15",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
+ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
+ "dev": true
+ }
+ }
+ },
+ "saucelabs": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/saucelabs/-/saucelabs-1.5.0.tgz",
+ "integrity": "sha512-jlX3FGdWvYf4Q3LFfFWS1QvPg3IGCGWxIc8QBFdPTbpTJnt/v17FHXYVAn7C8sHf1yUXo2c7yIM0isDryfYtHQ==",
"dev": true,
"requires": {
- "minimatch": "~0.2.14",
- "walker": "~1.0.5",
- "watch": "~0.10.0"
+ "https-proxy-agent": "^2.2.1"
},
"dependencies": {
- "minimatch": {
- "version": "0.2.14",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz",
- "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=",
+ "agent-base": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz",
+ "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==",
+ "dev": true,
+ "requires": {
+ "es6-promisify": "^5.0.0"
+ }
+ },
+ "https-proxy-agent": {
+ "version": "2.2.4",
+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz",
+ "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==",
"dev": true,
"requires": {
- "lru-cache": "2",
- "sigmund": "~1.0.0"
+ "agent-base": "^4.3.0",
+ "debug": "^3.1.0"
}
}
}
},
- "semantic-release": {
- "version": "4.3.5",
- "resolved": "https://registry.npmjs.org/semantic-release/-/semantic-release-4.3.5.tgz",
- "integrity": "sha1-33MZ57GMuYCCnpSS540ZYq9uORE=",
- "dev": true,
- "requires": {
- "@semantic-release/commit-analyzer": "^2.0.0",
- "@semantic-release/condition-travis": "^4.1.2",
- "@semantic-release/error": "^1.0.0",
- "@semantic-release/last-release-npm": "^1.2.1",
- "@semantic-release/release-notes-generator": "^2.0.0",
- "git-head": "^1.2.1",
- "github": "^0.2.4",
- "lodash": "^3.9.3",
- "nerf-dart": "^1.0.0",
- "nopt": "^3.0.3",
- "npmconf": "^2.1.2",
- "npmlog": "^1.2.1",
- "parse-github-repo-url": "^1.0.0",
- "require-relative": "^0.8.7",
- "run-auto": "^1.1.2",
- "run-series": "^1.1.2",
- "semver": "^5.0.1"
+ "selenium-webdriver": {
+ "version": "4.0.0-alpha.7",
+ "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.0.0-alpha.7.tgz",
+ "integrity": "sha512-D4qnTsyTr91jT8f7MfN+OwY0IlU5+5FmlO5xlgRUV6hDEV8JyYx2NerdTEqDDkNq7RZDYc4VoPALk8l578RBHw==",
+ "dev": true,
+ "requires": {
+ "jszip": "^3.2.2",
+ "rimraf": "^2.7.1",
+ "tmp": "0.0.30"
},
"dependencies": {
- "lodash": {
- "version": "3.10.1",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",
- "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=",
- "dev": true
+ "tmp": {
+ "version": "0.0.30",
+ "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.30.tgz",
+ "integrity": "sha1-ckGdSovn1s51FI/YsyTlk6cRwu0=",
+ "dev": true,
+ "requires": {
+ "os-tmpdir": "~1.0.1"
+ }
}
}
},
@@ -4492,6 +3889,12 @@
}
}
},
+ "serialize-javascript": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.2.tgz",
+ "integrity": "sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==",
+ "dev": true
+ },
"serve-static": {
"version": "1.13.1",
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.1.tgz",
@@ -4504,10 +3907,10 @@
"send": "0.16.1"
}
},
- "set-blocking": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
- "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
+ "set-immediate-shim": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz",
+ "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=",
"dev": true
},
"setprototypeof": {
@@ -4522,393 +3925,238 @@
"integrity": "sha1-NZbmMHp4FUT1kfN9phg2DzHbV7E=",
"dev": true
},
- "sigmund": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz",
- "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=",
- "dev": true
- },
- "signal-exit": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
- "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
- "dev": true
- },
- "simple-fmt": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/simple-fmt/-/simple-fmt-0.1.0.tgz",
- "integrity": "sha1-GRv1ZqWeZTBILLJatTtKjchcOms=",
- "dev": true
- },
- "simple-is": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/simple-is/-/simple-is-0.2.0.tgz",
- "integrity": "sha1-Krt1qt453rXMgVzhDmGRFkhQuvA=",
- "dev": true
- },
- "slash": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz",
- "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=",
- "dev": true
- },
- "slide": {
- "version": "1.1.6",
- "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz",
- "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=",
- "dev": true
- },
- "sntp": {
- "version": "1.0.9",
- "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz",
- "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=",
- "dev": true,
- "requires": {
- "hoek": "2.x.x"
- }
- },
- "source-map": {
- "version": "0.5.7",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
- "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
- "dev": true
- },
- "spdx-correct": {
- "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.0"
- }
- },
- "spdx-exceptions": {
- "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": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz",
- "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==",
- "dev": true,
- "requires": {
- "spdx-exceptions": "^2.1.0",
- "spdx-license-ids": "^3.0.0"
- }
- },
- "spdx-license-ids": {
- "version": "3.0.5",
- "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz",
- "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==",
- "dev": true
- },
- "split": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz",
- "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==",
+ "sinon": {
+ "version": "7.5.0",
+ "resolved": "https://registry.npmjs.org/sinon/-/sinon-7.5.0.tgz",
+ "integrity": "sha512-AoD0oJWerp0/rY9czP/D6hDTTUYGpObhZjMpd7Cl/A6+j0xBE+ayL/ldfggkBXUs0IkvIiM1ljM8+WkOc5k78Q==",
"dev": true,
"requires": {
- "through": "2"
- }
- },
- "sshpk": {
- "version": "1.13.1",
- "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz",
- "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=",
- "dev": true,
- "requires": {
- "asn1": "~0.2.3",
- "assert-plus": "^1.0.0",
- "bcrypt-pbkdf": "^1.0.0",
- "dashdash": "^1.12.0",
- "ecc-jsbn": "~0.1.1",
- "getpass": "^0.1.1",
- "jsbn": "~0.1.0",
- "tweetnacl": "~0.14.0"
+ "@sinonjs/commons": "^1.4.0",
+ "@sinonjs/formatio": "^3.2.1",
+ "@sinonjs/samsam": "^3.3.3",
+ "diff": "^3.5.0",
+ "lolex": "^4.2.0",
+ "nise": "^1.5.2",
+ "supports-color": "^5.5.0"
},
"dependencies": {
- "assert-plus": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
- "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
+ "diff": {
+ "version": "3.5.0",
+ "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
+ "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
"dev": true
+ },
+ "supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
}
}
},
- "stable": {
- "version": "0.1.8",
- "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz",
- "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==",
- "dev": true
+ "socket.io": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.1.1.tgz",
+ "integrity": "sha512-rORqq9c+7W0DAK3cleWNSyfv/qKXV99hV4tZe+gGLfBECw3XEhBy7x85F3wypA9688LKjtwO9pX9L33/xQI8yA==",
+ "dev": true,
+ "requires": {
+ "debug": "~3.1.0",
+ "engine.io": "~3.2.0",
+ "has-binary2": "~1.0.2",
+ "socket.io-adapter": "~1.1.0",
+ "socket.io-client": "2.1.1",
+ "socket.io-parser": "~3.2.0"
+ }
},
- "statuses": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz",
- "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=",
+ "socket.io-adapter": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.2.tgz",
+ "integrity": "sha512-WzZRUj1kUjrTIrUKpZLEzFZ1OLj5FwLlAFQs9kuZJzJi5DKdU7FsWc36SNmA8iDOtwBQyT8FkrriRM8vXLYz8g==",
"dev": true
},
- "stream-combiner": {
- "version": "0.2.2",
- "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.2.2.tgz",
- "integrity": "sha1-rsjLrBd7Vrb0+kec7YwZEs7lKFg=",
+ "socket.io-client": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.1.1.tgz",
+ "integrity": "sha512-jxnFyhAuFxYfjqIgduQlhzqTcOEQSn+OHKVfAxWaNWa7ecP7xSNk2Dx/3UEsDcY7NcFafxvNvKPmmO7HTwTxGQ==",
"dev": true,
"requires": {
- "duplexer": "~0.1.1",
- "through": "~2.3.4"
+ "backo2": "1.0.2",
+ "base64-arraybuffer": "0.1.5",
+ "component-bind": "1.0.0",
+ "component-emitter": "1.2.1",
+ "debug": "~3.1.0",
+ "engine.io-client": "~3.2.0",
+ "has-binary2": "~1.0.2",
+ "has-cors": "1.1.0",
+ "indexof": "0.0.1",
+ "object-component": "0.0.3",
+ "parseqs": "0.0.5",
+ "parseuri": "0.0.5",
+ "socket.io-parser": "~3.2.0",
+ "to-array": "0.1.4"
},
"dependencies": {
- "through": {
- "version": "2.3.8",
- "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
- "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
+ "component-emitter": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz",
+ "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=",
"dev": true
}
}
},
- "stream-log": {
- "version": "0.2.3",
- "resolved": "https://registry.npmjs.org/stream-log/-/stream-log-0.2.3.tgz",
- "integrity": "sha1-mYR0woWEzLPKzN/dr/gX2FPmxWM=",
+ "socket.io-parser": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.2.0.tgz",
+ "integrity": "sha512-FYiBx7rc/KORMJlgsXysflWx/RIvtqZbyGLlHZvjfmPTPeuD/I8MaW7cfFrj5tRltICJdgwflhfZ3NVVbVLFQA==",
"dev": true,
"requires": {
- "longest": "^0.2.1"
+ "component-emitter": "1.2.1",
+ "debug": "~3.1.0",
+ "isarray": "2.0.1"
},
"dependencies": {
- "longest": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/longest/-/longest-0.2.1.tgz",
- "integrity": "sha1-/FT62NSgBmOcZDCy9zFkpGnTvK4=",
+ "component-emitter": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz",
+ "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=",
+ "dev": true
+ },
+ "isarray": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz",
+ "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=",
"dev": true
}
}
},
- "string-to-js": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/string-to-js/-/string-to-js-0.0.1.tgz",
- "integrity": "sha1-vxU8dgY2+qMHabgEoBlVUrp62A8=",
- "dev": true
- },
- "string-width": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
- "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
- "dev": true,
- "requires": {
- "code-point-at": "^1.0.0",
- "is-fullwidth-code-point": "^1.0.0",
- "strip-ansi": "^3.0.0"
- }
- },
- "string_decoder": {
- "version": "0.10.31",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
- "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
- "dev": true
- },
- "stringmap": {
- "version": "0.2.2",
- "resolved": "https://registry.npmjs.org/stringmap/-/stringmap-0.2.2.tgz",
- "integrity": "sha1-VWwTeyWPlCuHdvWy71gqoGnX0bE=",
- "dev": true
- },
- "stringset": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/stringset/-/stringset-0.2.1.tgz",
- "integrity": "sha1-7yWcTjSTRDd/zRyRPdLoSMnAQrU=",
- "dev": true
- },
- "stringstream": {
- "version": "0.0.5",
- "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz",
- "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=",
+ "source-map": {
+ "version": "0.5.7",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
+ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
"dev": true
},
- "strip-ansi": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
- "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
- "dev": true,
- "requires": {
- "ansi-regex": "^2.0.0"
- }
- },
- "strip-bom": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
- "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
- "dev": true,
- "requires": {
- "is-utf8": "^0.2.0"
- }
- },
- "strip-indent": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz",
- "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=",
- "dev": true,
- "requires": {
- "get-stdin": "^4.0.1"
- },
- "dependencies": {
- "get-stdin": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz",
- "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=",
- "dev": true
- }
- }
- },
- "strip-json-comments": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz",
- "integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=",
+ "sourcemap-codec": {
+ "version": "1.4.8",
+ "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz",
+ "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==",
"dev": true
},
- "supports-color": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
- "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
+ "sprintf-js": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
+ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
"dev": true
},
- "taffydb": {
- "version": "https://github.com/hegemonic/taffydb/tarball/7d100bcee0e997ee4977e273cdce60bd8933050e",
- "integrity": "sha1-PFSdL1cS19HRCa1rsaQITxt63U4=",
+ "statuses": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz",
+ "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=",
"dev": true
},
- "tar-fs": {
- "version": "0.4.1",
- "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-0.4.1.tgz",
- "integrity": "sha1-8EWwcvkLoCmE0cjPXenH89C8nP4=",
+ "streamroller": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-1.0.6.tgz",
+ "integrity": "sha512-3QC47Mhv3/aZNFpDDVO44qQb9gwB9QggMEE0sQmkTAwBVYdBRWISdsywlkfm5II1Q5y/pmrHflti/IgmIzdDBg==",
"dev": true,
"requires": {
- "mkdirp": "~0.3.5",
- "pump": "~0.3.0",
- "tar-stream": "~0.4.1"
+ "async": "^2.6.2",
+ "date-format": "^2.0.0",
+ "debug": "^3.2.6",
+ "fs-extra": "^7.0.1",
+ "lodash": "^4.17.14"
},
"dependencies": {
- "mkdirp": {
- "version": "0.3.5",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz",
- "integrity": "sha1-3j5fiWHIjHh+4TaN+EmsRBPsqNc=",
+ "debug": {
+ "version": "3.2.6",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
+ "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
+ "dev": true,
+ "requires": {
+ "ms": "^2.1.1"
+ }
+ },
+ "fs-extra": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz",
+ "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "^4.1.2",
+ "jsonfile": "^4.0.0",
+ "universalify": "^0.1.0"
+ }
+ },
+ "lodash": {
+ "version": "4.17.15",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
+ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
+ "dev": true
+ },
+ "ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
"dev": true
}
}
},
- "tar-stream": {
- "version": "0.4.7",
- "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-0.4.7.tgz",
- "integrity": "sha1-Hx0s6evHtCdlJDyg6PG3v9oKrc0=",
- "dev": true,
- "requires": {
- "bl": "^0.9.0",
- "end-of-stream": "^1.0.0",
- "readable-stream": "^1.0.27-1",
- "xtend": "^4.0.0"
- }
- },
- "thenify": {
- "version": "3.3.0",
- "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.0.tgz",
- "integrity": "sha1-5p44obq+lpsBCCB5eLn2K4hgSDk=",
- "dev": true,
- "requires": {
- "any-promise": "^1.0.0"
- }
- },
- "thenify-all": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz",
- "integrity": "sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=",
- "dev": true,
- "requires": {
- "thenify": ">= 3.1.0 < 4"
- }
- },
- "throttleit": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.0.tgz",
- "integrity": "sha1-nnhYNtr0Z0MUWlmEtiaNgoUorGw=",
- "dev": true
- },
- "through": {
- "version": "2.2.7",
- "resolved": "https://registry.npmjs.org/through/-/through-2.2.7.tgz",
- "integrity": "sha1-bo4hIAGR1OtqmfbwEN9Gqhxusr0=",
- "dev": true
- },
- "thunkify": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/thunkify/-/thunkify-2.1.2.tgz",
- "integrity": "sha1-+qDp0jDFGsyVyhOjYawFyn4EVT0=",
+ "string_decoder": {
+ "version": "0.10.31",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+ "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
"dev": true
},
- "tmpl": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.4.tgz",
- "integrity": "sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE=",
+ "strip-json-comments": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.0.tgz",
+ "integrity": "sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w==",
"dev": true
},
- "to-no-case": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/to-no-case/-/to-no-case-0.1.1.tgz",
- "integrity": "sha1-zzPHDg8oFo2V5BWavxUOjFQu+f4=",
+ "taffydb": {
+ "version": "2.6.2",
+ "resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.6.2.tgz",
+ "integrity": "sha1-fLy2S1oUG2ou/CxdLGe04VCyomg=",
"dev": true
},
- "to-pascal-case": {
- "version": "0.0.2",
- "resolved": "https://registry.npmjs.org/to-pascal-case/-/to-pascal-case-0.0.2.tgz",
- "integrity": "sha1-X4vqx8xtuXWO5GNe+hZ7Poq/7SE=",
+ "tmp": {
+ "version": "0.0.33",
+ "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
+ "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==",
"dev": true,
"requires": {
- "to-space-case": "0.1.2"
+ "os-tmpdir": "~1.0.2"
}
},
- "to-space-case": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/to-space-case/-/to-space-case-0.1.2.tgz",
- "integrity": "sha1-mma+Pr5T8nefaH8CYu/9H8W20V4=",
- "dev": true,
- "requires": {
- "to-no-case": "0.1.1"
- }
+ "to-array": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz",
+ "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=",
+ "dev": true
},
- "tough-cookie": {
- "version": "2.3.3",
- "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz",
- "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=",
+ "to-fast-properties": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
+ "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=",
+ "dev": true
+ },
+ "to-regex-range": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
"dev": true,
"requires": {
- "punycode": "^1.4.1"
+ "is-number": "^7.0.0"
}
},
- "trim-newlines": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz",
- "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=",
- "dev": true
- },
- "tryor": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/tryor/-/tryor-0.1.2.tgz",
- "integrity": "sha1-gUXkynyv9ArN48z5Rui4u3W0Fys=",
- "dev": true
- },
- "tunnel-agent": {
- "version": "0.4.3",
- "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz",
- "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=",
+ "type-detect": {
+ "version": "4.0.8",
+ "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
+ "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==",
"dev": true
},
- "tweetnacl": {
- "version": "0.14.5",
- "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
- "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
- "dev": true,
- "optional": true
- },
"type-is": {
"version": "1.6.15",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz",
@@ -4919,10 +4167,10 @@
"mime-types": "~2.1.15"
}
},
- "typedarray": {
- "version": "0.0.6",
- "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
- "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
+ "uc.micro": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz",
+ "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==",
"dev": true
},
"uglify-js": {
@@ -4943,39 +4191,50 @@
"dev": true,
"optional": true
},
- "uid-number": {
- "version": "0.0.5",
- "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.5.tgz",
- "integrity": "sha1-Wj2yPvXb1VuB/ODsmirG/M3ruB4=",
+ "ultron": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz",
+ "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==",
"dev": true
},
"underscore": {
- "version": "1.8.3",
- "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz",
- "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=",
+ "version": "1.10.2",
+ "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.10.2.tgz",
+ "integrity": "sha512-N4P+Q/BuyuEKFJ43B9gYuOj4TQUHXX+j2FqguVOpjkssLUUrnJofCcBccJSCoeturDoZU6GorDTHSvUDlSQbTg==",
"dev": true
},
- "underscore-contrib": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/underscore-contrib/-/underscore-contrib-0.3.0.tgz",
- "integrity": "sha1-ZltmwkeD+PorGMn4y7Dix9SMJsc=",
+ "unicode-canonical-property-names-ecmascript": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz",
+ "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==",
+ "dev": true
+ },
+ "unicode-match-property-ecmascript": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz",
+ "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==",
"dev": true,
"requires": {
- "underscore": "1.6.0"
- },
- "dependencies": {
- "underscore": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz",
- "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=",
- "dev": true
- }
+ "unicode-canonical-property-names-ecmascript": "^1.0.4",
+ "unicode-property-aliases-ecmascript": "^1.0.4"
}
},
- "underscore.string": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.0.3.tgz",
- "integrity": "sha1-Rhe4waJQz25QZPu7Nj0PqWzxRVI=",
+ "unicode-match-property-value-ecmascript": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz",
+ "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==",
+ "dev": true
+ },
+ "unicode-property-aliases-ecmascript": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz",
+ "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==",
+ "dev": true
+ },
+ "universalify": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
+ "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
"dev": true
},
"unpipe": {
@@ -4984,13 +4243,14 @@
"integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=",
"dev": true
},
- "unyield": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/unyield/-/unyield-0.0.1.tgz",
- "integrity": "sha1-FQ5l2kK/d0JEW5WKZOubhdHSsYA=",
+ "useragent": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/useragent/-/useragent-2.3.0.tgz",
+ "integrity": "sha512-4AoH4pxuSvHCjqLO04sU6U/uE65BYza8l/KKBS0b0hnUPWi+cQ2BpeTEwejCSx9SPV5/U03nniDTrWx5NrmKdw==",
"dev": true,
"requires": {
- "co": "~3.1.0"
+ "lru-cache": "4.1.x",
+ "tmp": "0.0.x"
}
},
"util-deprecate": {
@@ -5005,271 +4265,16 @@
"integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=",
"dev": true
},
- "uuid": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz",
- "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==",
- "dev": true
- },
- "validate-npm-package-license": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
- "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
- "dev": true,
- "requires": {
- "spdx-correct": "^3.0.0",
- "spdx-expression-parse": "^3.0.0"
- }
- },
- "vargs": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/vargs/-/vargs-0.1.0.tgz",
- "integrity": "sha1-a2GE2mUgzDIEzhtAfKwm2SYJ6/8=",
- "dev": true
- },
"vary": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
"integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=",
"dev": true
},
- "verror": {
- "version": "1.10.0",
- "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
- "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
- "dev": true,
- "requires": {
- "assert-plus": "^1.0.0",
- "core-util-is": "1.0.2",
- "extsprintf": "^1.2.0"
- },
- "dependencies": {
- "assert-plus": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
- "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
- "dev": true
- }
- }
- },
- "walk": {
- "version": "2.3.14",
- "resolved": "https://registry.npmjs.org/walk/-/walk-2.3.14.tgz",
- "integrity": "sha512-5skcWAUmySj6hkBdH6B6+3ddMjVQYH5Qy9QGbPmN8kVmLteXk+yVXg+yfk1nbX30EYakahLrr8iPcCxJQSCBeg==",
- "dev": true,
- "requires": {
- "foreachasync": "^3.0.0"
- }
- },
- "walker": {
- "version": "1.0.7",
- "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.7.tgz",
- "integrity": "sha1-L3+bj9ENZ3JisYqITijRlhjgKPs=",
- "dev": true,
- "requires": {
- "makeerror": "1.0.x"
- }
- },
- "ware": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/ware/-/ware-1.3.0.tgz",
- "integrity": "sha1-0bFPOdLiy0q4xAmPdW/ksWTkc9Q=",
- "dev": true,
- "requires": {
- "wrap-fn": "^0.1.0"
- }
- },
- "watch": {
- "version": "0.10.0",
- "resolved": "https://registry.npmjs.org/watch/-/watch-0.10.0.tgz",
- "integrity": "sha1-d3mLLaD5kQ1ZXxrOWwwiWFIfIdw=",
- "dev": true
- },
- "wd": {
- "version": "0.3.12",
- "resolved": "https://registry.npmjs.org/wd/-/wd-0.3.12.tgz",
- "integrity": "sha1-P7Tx11n4yF3eU5PRczT/4D6bsyk=",
- "dev": true,
- "requires": {
- "archiver": "~0.14.0",
- "async": "~1.0.0",
- "lodash": "~3.9.3",
- "q": "~1.4.1",
- "request": "~2.55.0",
- "underscore.string": "~3.0.3",
- "vargs": "~0.1.0"
- },
- "dependencies": {
- "asn1": {
- "version": "0.1.11",
- "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz",
- "integrity": "sha1-VZvhg3bQik7E2+gId9J4GGObLfc=",
- "dev": true
- },
- "assert-plus": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.5.tgz",
- "integrity": "sha1-7nQAlBMALYTOxyGcasgRgS5yMWA=",
- "dev": true
- },
- "async": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/async/-/async-1.0.0.tgz",
- "integrity": "sha1-+PwEyjoTeErenhZBr5hXjPvWR6k=",
- "dev": true
- },
- "aws-sign2": {
- "version": "0.5.0",
- "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.5.0.tgz",
- "integrity": "sha1-xXED96F/wDfwLXwuZLYC6iI/fWM=",
- "dev": true
- },
- "caseless": {
- "version": "0.9.0",
- "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.9.0.tgz",
- "integrity": "sha1-t7Zc5r8UE4hlOc/VM/CzDv+pz4g=",
- "dev": true
- },
- "combined-stream": {
- "version": "0.0.7",
- "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.7.tgz",
- "integrity": "sha1-ATfmV7qlp1QcV6w3rF/AfXO03B8=",
- "dev": true,
- "requires": {
- "delayed-stream": "0.0.5"
- }
- },
- "delayed-stream": {
- "version": "0.0.5",
- "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz",
- "integrity": "sha1-1LH0OpPoKW3+AmlPRoC8N6MTxz8=",
- "dev": true
- },
- "form-data": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/form-data/-/form-data-0.2.0.tgz",
- "integrity": "sha1-Jvi8JtpkQOKZy9z7aQNcT3em5GY=",
- "dev": true,
- "requires": {
- "async": "~0.9.0",
- "combined-stream": "~0.0.4",
- "mime-types": "~2.0.3"
- },
- "dependencies": {
- "async": {
- "version": "0.9.2",
- "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz",
- "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=",
- "dev": true
- }
- }
- },
- "har-validator": {
- "version": "1.8.0",
- "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-1.8.0.tgz",
- "integrity": "sha1-2DhCsOtMQ1lgrrEIoGejqpTA7rI=",
- "dev": true,
- "requires": {
- "bluebird": "^2.9.30",
- "chalk": "^1.0.0",
- "commander": "^2.8.1",
- "is-my-json-valid": "^2.12.0"
- }
- },
- "hawk": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/hawk/-/hawk-2.3.1.tgz",
- "integrity": "sha1-HnMc45RH+h0PbXB/e87r7A/R7B8=",
- "dev": true,
- "requires": {
- "boom": "2.x.x",
- "cryptiles": "2.x.x",
- "hoek": "2.x.x",
- "sntp": "1.x.x"
- }
- },
- "http-signature": {
- "version": "0.10.1",
- "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-0.10.1.tgz",
- "integrity": "sha1-T72sEyVZqoMjEh5UB3nAoBKyfmY=",
- "dev": true,
- "requires": {
- "asn1": "0.1.11",
- "assert-plus": "^0.1.5",
- "ctype": "0.5.3"
- }
- },
- "mime-db": {
- "version": "1.12.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.12.0.tgz",
- "integrity": "sha1-PQxjGA9FjrENMlqqN9fFiuMS6dc=",
- "dev": true
- },
- "mime-types": {
- "version": "2.0.14",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.0.14.tgz",
- "integrity": "sha1-MQ4VnbI+B3+Lsit0jav6SVcUCqY=",
- "dev": true,
- "requires": {
- "mime-db": "~1.12.0"
- }
- },
- "node-uuid": {
- "version": "1.4.8",
- "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz",
- "integrity": "sha1-sEDrCSOWivq/jTL7HxfxFn/auQc=",
- "dev": true
- },
- "oauth-sign": {
- "version": "0.6.0",
- "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.6.0.tgz",
- "integrity": "sha1-fb6uRPbKRU4fFoRR1jB0ZzWBPOM=",
- "dev": true
- },
- "q": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz",
- "integrity": "sha1-VXBbzZPF82c1MMLCy8DCs63cKG4=",
- "dev": true
- },
- "qs": {
- "version": "2.4.2",
- "resolved": "https://registry.npmjs.org/qs/-/qs-2.4.2.tgz",
- "integrity": "sha1-9854jld33wtQENp/fE5zujJHD1o=",
- "dev": true
- },
- "request": {
- "version": "2.55.0",
- "resolved": "https://registry.npmjs.org/request/-/request-2.55.0.tgz",
- "integrity": "sha1-11wc32eddrsQD5v/4f5VG1wk6T0=",
- "dev": true,
- "requires": {
- "aws-sign2": "~0.5.0",
- "bl": "~0.9.0",
- "caseless": "~0.9.0",
- "combined-stream": "~0.0.5",
- "forever-agent": "~0.6.0",
- "form-data": "~0.2.0",
- "har-validator": "^1.4.0",
- "hawk": "~2.3.0",
- "http-signature": "~0.10.0",
- "isstream": "~0.1.1",
- "json-stringify-safe": "~5.0.0",
- "mime-types": "~2.0.1",
- "node-uuid": "~1.4.0",
- "oauth-sign": "~0.6.0",
- "qs": "~2.4.0",
- "stringstream": "~0.0.4",
- "tough-cookie": ">=0.12.0",
- "tunnel-agent": "~0.4.0"
- }
- }
- }
- },
- "wd-browser": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/wd-browser/-/wd-browser-1.1.0.tgz",
- "integrity": "sha1-gvOw6izhnCvE2k3+r9bMfaUsBnI=",
+ "void-elements": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz",
+ "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=",
"dev": true
},
"which": {
@@ -5281,52 +4286,17 @@
"isexe": "^2.0.0"
}
},
- "which-module": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz",
- "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=",
- "dev": true
- },
- "wide-align": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
- "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
- "dev": true,
- "optional": true,
- "requires": {
- "string-width": "^1.0.2 || 2"
- }
- },
- "win-fork": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/win-fork/-/win-fork-1.1.1.tgz",
- "integrity": "sha1-j1jgZW/KAK3IyGoriePNLWotXl4=",
- "dev": true
- },
"window-size": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz",
"integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=",
"dev": true
},
- "wrap-ansi": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
- "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
- "dev": true,
- "requires": {
- "string-width": "^1.0.1",
- "strip-ansi": "^3.0.1"
- }
- },
- "wrap-fn": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/wrap-fn/-/wrap-fn-0.1.5.tgz",
- "integrity": "sha1-8htuQQFv9KfjFyDbxjoJAWvfmEU=",
- "dev": true,
- "requires": {
- "co": "3.1.0"
- }
+ "wordwrap": {
+ "version": "0.0.3",
+ "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz",
+ "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=",
+ "dev": true
},
"wrappy": {
"version": "1.0.2",
@@ -5334,22 +4304,33 @@
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
"dev": true
},
- "wrench": {
- "version": "1.5.9",
- "resolved": "https://registry.npmjs.org/wrench/-/wrench-1.5.9.tgz",
- "integrity": "sha1-QRaRxjqbJTGxcAJnJ5veyiOyFCo=",
+ "ws": {
+ "version": "3.3.3",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz",
+ "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==",
+ "dev": true,
+ "requires": {
+ "async-limiter": "~1.0.0",
+ "safe-buffer": "~5.1.0",
+ "ultron": "~1.1.0"
+ }
+ },
+ "xmlcreate": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.3.tgz",
+ "integrity": "sha512-HgS+X6zAztGa9zIK3Y3LXuJes33Lz9x+YyTxgrkIdabu2vqcGOWwdfCpf1hWLRrd553wd4QCDf6BBO6FfdsRiQ==",
"dev": true
},
- "xtend": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
- "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=",
+ "xmlhttprequest-ssl": {
+ "version": "1.5.5",
+ "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz",
+ "integrity": "sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4=",
"dev": true
},
- "y18n": {
- "version": "3.2.1",
- "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz",
- "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=",
+ "yallist": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
+ "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=",
"dev": true
},
"yargs": {
@@ -5364,62 +4345,11 @@
"window-size": "0.1.0"
}
},
- "yargs-parser": {
- "version": "4.2.1",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-4.2.1.tgz",
- "integrity": "sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw=",
- "dev": true,
- "requires": {
- "camelcase": "^3.0.0"
- },
- "dependencies": {
- "camelcase": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz",
- "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=",
- "dev": true
- }
- }
- },
- "yauzl": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz",
- "integrity": "sha1-lSj0QtqxsihOWLQ3m7GU4i4MQAU=",
- "dev": true,
- "requires": {
- "fd-slicer": "~1.0.1"
- }
- },
- "zip-stream": {
- "version": "0.5.2",
- "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-0.5.2.tgz",
- "integrity": "sha1-Mty8UG0Nq00hNyYlvX66rDwv/1Y=",
- "dev": true,
- "requires": {
- "compress-commons": "~0.2.0",
- "lodash": "~3.2.0",
- "readable-stream": "~1.0.26"
- },
- "dependencies": {
- "lodash": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.2.0.tgz",
- "integrity": "sha1-S/UKMkP5rrC6xBpV09WZBnWkYvs=",
- "dev": true
- },
- "readable-stream": {
- "version": "1.0.34",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
- "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
- "dev": true,
- "requires": {
- "core-util-is": "~1.0.0",
- "inherits": "~2.0.1",
- "isarray": "0.0.1",
- "string_decoder": "~0.10.x"
- }
- }
- }
+ "yeast": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz",
+ "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=",
+ "dev": true
}
}
}
diff --git a/package.json b/package.json
index c611bce..ab985b2 100644
--- a/package.json
+++ b/package.json
@@ -16,18 +16,44 @@
"dependencies": {
"ifvisible.js": "1.0.4",
"md5": "2.2.1",
- "object-merge": "2.5.1"
+ "object-merge": "2.5.1",
+ "top-domain": "0.0.6"
},
"devDependencies": {
- "duo": "^0.12.0",
- "express": "4.x",
- "fs-extra": "^0.15.0",
- "phantomjs": "^2.1.7",
- "jsdoc": "3.4.0",
- "jshint": "^2.6.3",
- "mocha-phantomjs": "^3.6.0",
- "uglify-js": ">= 1.3.4",
- "semantic-release": "^4.3.5"
+ "@babel/core": "^7.3.4",
+ "@babel/plugin-external-helpers": "^7.2.0",
+ "@babel/plugin-proposal-object-rest-spread": "^7.3.4",
+ "@babel/plugin-transform-runtime": "^7.3.4",
+ "@babel/preset-env": "^7.3.4",
+ "@babel/runtime": "^7.3.4",
+ "chai": "^4.1.2",
+ "date-fns": "^1.30.1",
+ "express": "^4.16.2",
+ "fs-extra": "^4.0.2",
+ "jsdoc": "^3.6.3",
+ "jshint": "^2.9.6",
+ "karma": "^4.0.0",
+ "karma-chai": "^0.1.0",
+ "karma-chrome-launcher": "^2.2.0",
+ "karma-firefox-launcher": "^1.0.1",
+ "karma-mocha": "^1.3.0",
+ "karma-mocha-reporter": "^2.2.5",
+ "karma-sauce-launcher": "^2.0.2",
+ "karma-sinon": "^1.0.5",
+ "karma-sourcemap-loader": "^0.3.7",
+ "mocha": "^4.0.1",
+ "prettier": "^1.16.4",
+ "requirejs": "^2.3.6",
+ "rollup": "^1.4.1",
+ "rollup-plugin-babel": "^4.3.2",
+ "rollup-plugin-commonjs": "^9.2.1",
+ "rollup-plugin-json": "^4.0.0",
+ "rollup-plugin-legacy": "^1.0.0",
+ "rollup-plugin-node-resolve": "^4.0.1",
+ "rollup-plugin-replace": "^2.1.0",
+ "rollup-plugin-uglify": "^6.0.2",
+ "sinon": "^7.0.0",
+ "uglify-js": "^2.0.0"
},
"scripts": {
"test": "make test",
diff --git a/rakam-snippet.min.js b/rakam-snippet.min.js
index c3f545d..4e725e7 100644
--- a/rakam-snippet.min.js
+++ b/rakam-snippet.min.js
@@ -1,14 +1,14 @@
(function(e,t){var n=e.rakam||{};var r=t.createElement("script")
;r.type="text/javascript";r.async=true
-;r.src="https://d2f7xo8n6nlhxf.cloudfront.net/rakam.min.js";r.onload=function(){
-e.rakam.runQueuedFunctions()};var o=t.getElementsByTagName("script")[0]
-;o.parentNode.insertBefore(r,o);function a(e,t){e[t]=function(){
+;r.src="https://cdn.rakam.io/sdk/rakam.min.js";r.onload=function(){
+e.rakam.runQueuedFunctions()};var a=t.getElementsByTagName("script")[0]
+;a.parentNode.insertBefore(r,a);function o(e,t){e[t]=function(){
this._q.push([t].concat(Array.prototype.slice.call(arguments,0)));return this}}
var s=function(){this._q=[];return this}
;var i=["set","setOnce","increment","unset"];for(var c=0;c 127 && c < 2048) {
+ utftext += String.fromCharCode(c >> 6 | 192);
+ utftext += String.fromCharCode(c & 63 | 128);
+ } else {
+ utftext += String.fromCharCode(c >> 12 | 224);
+ utftext += String.fromCharCode(c >> 6 & 63 | 128);
+ utftext += String.fromCharCode(c & 63 | 128);
+ }
+ }
+
+ return utftext;
+ },
+ decode: function (utftext) {
+ var s = '';
+ var i = 0;
+ var c = 0,
+ c1 = 0,
+ c2 = 0;
+
+ while (i < utftext.length) {
+ c = utftext.charCodeAt(i);
+
+ if (c < 128) {
+ s += String.fromCharCode(c);
+ i++;
+ } else if (c > 191 && c < 224) {
+ c1 = utftext.charCodeAt(i + 1);
+ s += String.fromCharCode((c & 31) << 6 | c1 & 63);
+ i += 2;
+ } else {
+ c1 = utftext.charCodeAt(i + 1);
+ c2 = utftext.charCodeAt(i + 2);
+ s += String.fromCharCode((c & 15) << 12 | (c1 & 63) << 6 | c2 & 63);
+ i += 3;
+ }
+ }
+
+ return s;
+ }
+};
+
+/* jshint bitwise: false */
+/*
+ * Base64 encoder/decoder
+ * http://www.webtoolkit.info/
+ */
+
+var Base64 = {
+ _keyStr: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=',
+ encode: function (input) {
+ try {
+ if (window.btoa && window.atob) {
+ return window.btoa(unescape(encodeURIComponent(input)));
+ }
+ } catch (e) {//log(e);
+ }
+
+ return Base64._encode(input);
+ },
+ _encode: function (input) {
+ var output = '';
+ var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
+ var i = 0;
+ input = UTF8.encode(input);
+
+ while (i < input.length) {
+ chr1 = input.charCodeAt(i++);
+ chr2 = input.charCodeAt(i++);
+ chr3 = input.charCodeAt(i++);
+ enc1 = chr1 >> 2;
+ enc2 = (chr1 & 3) << 4 | chr2 >> 4;
+ enc3 = (chr2 & 15) << 2 | chr3 >> 6;
+ enc4 = chr3 & 63;
+
+ if (isNaN(chr2)) {
+ enc3 = enc4 = 64;
+ } else if (isNaN(chr3)) {
+ enc4 = 64;
+ }
+
+ output = output + Base64._keyStr.charAt(enc1) + Base64._keyStr.charAt(enc2) + Base64._keyStr.charAt(enc3) + Base64._keyStr.charAt(enc4);
+ }
+
+ return output;
+ },
+ decode: function (input) {
+ try {
+ if (window.btoa && window.atob) {
+ return decodeURIComponent(escape(window.atob(input)));
+ }
+ } catch (e) {//log(e);
+ }
+
+ return Base64._decode(input);
+ },
+ _decode: function (input) {
+ var output = '';
+ var chr1, chr2, chr3;
+ var enc1, enc2, enc3, enc4;
+ var i = 0;
+ input = input.replace(/[^A-Za-z0-9\+\/\=]/g, '');
+
+ while (i < input.length) {
+ enc1 = Base64._keyStr.indexOf(input.charAt(i++));
+ enc2 = Base64._keyStr.indexOf(input.charAt(i++));
+ enc3 = Base64._keyStr.indexOf(input.charAt(i++));
+ enc4 = Base64._keyStr.indexOf(input.charAt(i++));
+ chr1 = enc1 << 2 | enc2 >> 4;
+ chr2 = (enc2 & 15) << 4 | enc3 >> 2;
+ chr3 = (enc3 & 3) << 6 | enc4;
+ output = output + String.fromCharCode(chr1);
+
+ if (enc3 !== 64) {
+ output = output + String.fromCharCode(chr2);
+ }
+
+ if (enc4 !== 64) {
+ output = output + String.fromCharCode(chr3);
+ }
+ }
+
+ output = UTF8.decode(output);
+ return output;
+ }
+};
+
+/*
+ * Cookie data
+ */
+
+var _options = {
+ expirationDays: undefined,
+ domain: undefined
+};
+
+var reset = function () {
+ _options = {};
+};
+
+var options = function (opts) {
+ if (arguments.length === 0) {
+ return _options;
+ }
+
+ opts = opts || {};
+ _options.expirationDays = opts.expirationDays;
+ var domain = opts.domain !== undefined ? opts.domain : '.';
+ var token = Math.random();
+ _options.domain = domain;
+ set('rakam_test', token);
+ var stored = get('rakam_test');
+
+ if (!stored || stored !== token) {
+ domain = null;
+ }
+
+ remove('rakam_test');
+ _options.domain = domain;
+};
+
+var _domainSpecific = function (name) {
+ // differentiate between cookies on different domains
+ var suffix = '';
+
+ if (_options.domain) {
+ suffix = _options.domain.charAt(0) === '.' ? _options.domain.substring(1) : _options.domain;
+ }
+
+ return name + suffix;
+};
+
+var get = function (name) {
+ try {
+ var nameEq = _domainSpecific(name) + '=';
+ var ca = document.cookie.split(';');
+ var value = null;
+
+ for (var i = 0; i < ca.length; i++) {
+ var c = ca[i];
+
+ while (c.charAt(0) === ' ') {
+ c = c.substring(1, c.length);
+ }
+
+ if (c.indexOf(nameEq) === 0) {
+ value = c.substring(nameEq.length, c.length);
+ break;
+ }
+ }
+
+ if (value) {
+ return JSON.parse(Base64.decode(value));
+ }
+
+ return null;
+ } catch (e) {
+ return null;
+ }
+};
+
+var set = function (name, value) {
+ try {
+ _set(_domainSpecific(name), Base64.encode(JSON.stringify(value)), _options);
+
+ return true;
+ } catch (e) {
+ return false;
+ }
+};
+
+var _set = function (name, value, opts) {
+ var expires = value !== null ? opts.expirationDays : -1;
+
+ if (expires) {
+ var date = new Date();
+ date.setTime(date.getTime() + expires * 24 * 60 * 60 * 1000);
+ expires = date;
+ }
+
+ var str = name + '=' + value;
+
+ if (expires) {
+ str += '; expires=' + expires.toUTCString();
+ }
+
+ str += '; path=/';
+
+ if (opts.domain) {
+ str += '; domain=' + opts.domain;
+ }
+
+ document.cookie = str;
+};
+
+var remove = function (name) {
+ try {
+ _set(_domainSpecific(name), null, _options);
+
+ return true;
+ } catch (e) {
+ return false;
+ }
+};
+
+var Cookie = {
+ reset: reset,
+ options: options,
+ get: get,
+ set: set,
+ remove: remove
+};
+
+var getLanguage = function () {
+ return navigator && (navigator.languages && navigator.languages[0] || navigator.language || navigator.userLanguage) || undefined;
+};
+
+var language = {
+ language: getLanguage()
+};
+
+/* jshint -W020, unused: false, noempty: false, boss: true */
+
+/*
+ * Implement localStorage to support Firefox 2-3 and IE 5-7
+ */
+var localStorage; // jshint ignore:line
+// test that Window.localStorage is available and works
+
+function windowLocalStorageAvailable() {
+ var uid = new Date();
+ var result;
+
+ try {
+ window.localStorage.setItem(uid, uid);
+ result = window.localStorage.getItem(uid) === String(uid);
+ window.localStorage.removeItem(uid);
+ return result;
+ } catch (e) {// localStorage not available
+ }
+
+ return false;
+}
+
+if (windowLocalStorageAvailable()) {
+ localStorage = window.localStorage;
+} else if (window.globalStorage) {
+ // Firefox 2-3 use globalStorage
+ // See https://developer.mozilla.org/en/dom/storage#globalStorage
+ try {
+ localStorage = window.globalStorage[window.location.hostname];
+ } catch (e) {// Something bad happened...
+ }
+} else {
+ // IE 5-7 use userData
+ // See http://msdn.microsoft.com/en-us/library/ms531424(v=vs.85).aspx
+ var div = document.createElement('div'),
+ attrKey = 'localStorage';
+ div.style.display = 'none';
+ document.getElementsByTagName('head')[0].appendChild(div);
+
+ if (div.addBehavior) {
+ div.addBehavior('#default#userdata');
+ localStorage = {
+ length: 0,
+ setItem: function (k, v) {
+ div.load(attrKey);
+
+ if (!div.getAttribute(k)) {
+ this.length++;
+ }
+
+ div.setAttribute(k, v);
+ div.save(attrKey);
+ },
+ getItem: function (k) {
+ div.load(attrKey);
+ return div.getAttribute(k);
+ },
+ removeItem: function (k) {
+ div.load(attrKey);
+
+ if (div.getAttribute(k)) {
+ this.length--;
+ }
+
+ div.removeAttribute(k);
+ div.save(attrKey);
+ },
+ clear: function () {
+ div.load(attrKey);
+ var i = 0;
+ var attr;
+
+ while (attr = div.XMLDocument.documentElement.attributes[i++]) {
+ div.removeAttribute(attr.name);
+ }
+
+ div.save(attrKey);
+ this.length = 0;
+ },
+ key: function (k) {
+ div.load(attrKey);
+ return div.XMLDocument.documentElement.attributes[k];
+ }
+ };
+ div.load(attrKey);
+ localStorage.length = div.XMLDocument.documentElement.attributes.length;
+ }
+}
+
+if (!localStorage) {
+ localStorage = {
+ length: 0,
+ setItem: function (k, v) {},
+ getItem: function (k) {},
+ removeItem: function (k) {},
+ clear: function () {},
+ key: function (k) {}
+ };
+}
+
+var localStorage$1 = localStorage;
+
+var object = {};
+var has = object.hasOwnProperty;
+function merge(a, b) {
+ for (var key in b) {
+ if (has.call(b, key)) {
+ a[key] = b[key];
+ }
+ }
+
+ return a;
+}
+
+/*
+ * Simple AJAX request object
+ */
+var Request = function (url, data, headers) {
+ this.url = url;
+ this.data = data || {};
+ this.headers = headers || {};
+};
+
+function parseResponseHeaders(headerStr) {
+ var headers = {};
+
+ if (!headerStr) {
+ return headers;
+ }
+
+ var headerPairs = headerStr.split('\u000d\u000a');
+
+ for (var i = 0; i < headerPairs.length; i++) {
+ var headerPair = headerPairs[i]; // Can't use split() here because it does the wrong thing
+ // if the header value has the string ": " in it.
+
+ var index = headerPair.indexOf('\u003a\u0020');
+
+ if (index > 0) {
+ var key = headerPair.substring(0, index);
+ var val = headerPair.substring(index + 2);
+ headers[key] = val;
+ }
+ }
+
+ return headers;
+}
+
+Request.prototype.send = function (callback) {
+ var isIE = window.XDomainRequest ? true : false;
+
+ if (isIE) {
+ var xdr = new window.XDomainRequest();
+ xdr.open('POST', this.url, true);
+
+ xdr.onload = function () {
+ callback(xdr.responseText);
+ };
+
+ xdr.send(JSON.stringify(this.data));
+ } else {
+ var xhr = new XMLHttpRequest();
+ xhr.withCredentials = "true";
+ xhr.open('POST', this.url, true);
+
+ xhr.onreadystatechange = function () {
+ if (xhr.readyState === 4) {
+ callback(xhr.status, xhr.responseText, parseResponseHeaders(xhr.getAllResponseHeaders()));
+ }
+ };
+
+ xhr.setRequestHeader('Content-Type', 'text/plain');
+
+ for (var key in this.headers) {
+ if (this.headers.hasOwnProperty(key)) {
+ xhr.setRequestHeader(key, this.headers[key]);
+ }
+ }
+
+ xhr.send(JSON.stringify(this.data));
+ }
+};
+
+/* jshint bitwise: false, laxbreak: true */
+
+/**
+ * Taken straight from jed's gist: https://gist.github.com/982883
+ *
+ * Returns a random v4 UUID of the form xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx,
+ * where each x is replaced with a random hexadecimal digit from 0 to f, and
+ * y is replaced with a random hexadecimal digit from 8 to b.
+ */
+var uuid = function (a) {
+ return a // if the placeholder was passed, return
+ ? ( // a random number from 0 to 15
+ a ^ // unless b is 8,
+ Math.random() // in which case
+ * 16 // a random number from
+ >> a / 4 // 8 to 11
+ ).toString(16) // in hexadecimal
+ : ( // or otherwise a concatenated string:
+ [1e7] + // 10000000 +
+ -1e3 + // -1000 +
+ -4e3 + // -4000 +
+ -8e3 + // -80000000 +
+ -1e11 // -100000000000,
+ ).replace( // replacing
+ /[018]/g, // zeroes, ones, and eights with
+ uuid // random hex digits
+ );
+};
+
+var version = '2.6.0';
+
+/* Taken from: https://github.com/component/type */
+
+/**
+ * toString ref.
+ */
+var toString = Object.prototype.toString;
+/**
+ * Return the type of `val`.
+ *
+ * @param {Mixed} val
+ * @return {String}
+ * @api public
+ */
+
+function type (val) {
+ switch (toString.call(val)) {
+ case '[object Date]':
+ return 'date';
+
+ case '[object RegExp]':
+ return 'regexp';
+
+ case '[object Arguments]':
+ return 'arguments';
+
+ case '[object Array]':
+ return 'array';
+
+ case '[object Error]':
+ return 'error';
+ }
+
+ if (val === null) {
+ return 'null';
+ }
+
+ if (val === undefined) {
+ return 'undefined';
+ }
+
+ if (val !== val) {
+ return 'nan';
+ }
+
+ if (val && val.nodeType === 1) {
+ return 'element';
+ }
+
+ if (typeof Buffer !== 'undefined' && Buffer.isBuffer(val)) {
+ return 'buffer';
+ }
+
+ val = val.valueOf ? val.valueOf() : Object.prototype.valueOf.apply(val);
+ return typeof val;
+}
+
+/*
+ * Wrapper for a user properties JSON object that supports operations.
+ * Note: if a user property is used in multiple operations on the same User object,
+ * only the first operation will be saved, and the rest will be ignored.
+ */
+
+var API_VERSION = 1;
+
+var wrapCallback = function (operation, props, callback) {
+ return function (status, response, headers) {
+ if (callback !== undefined) {
+ callback(status, response, headers);
+ }
+ };
+};
+
+var getUrl = function (options) {
+ return ('https:' === window.location.protocol ? 'https' : 'http') + '://' + options.apiEndpoint + "/user";
+};
+
+var User = function () {};
+
+User.prototype.init = function (options) {
+ this.options = options;
+};
+
+User.prototype.set = function (properties, callback) {
+ new Request(getUrl(this.options) + "/set_properties", {
+ api: {
+ "api_version": API_VERSION,
+ "api_key": this.options.apiKey
+ },
+ id: this.options.userId,
+ properties: properties
+ }).send(wrapCallback("set_properties", properties, callback));
+ return this;
+};
+
+User.prototype._merge = function (deviceId, createdAt, callback) {
+ new Request(getUrl(this.options) + "/merge", {
+ api: {
+ "api_version": API_VERSION,
+ "api_key": this.options.apiKey,
+ "upload_time": new Date().getTime()
+ },
+ anonymous_id: deviceId,
+ id: this.options.userId,
+ created_at: createdAt ? createdAt.getTime() : null,
+ merged_at: new Date().getTime()
+ }).send(wrapCallback("merge", null, callback));
+ return this;
+};
+
+User.prototype.setOnce = function (properties, callback) {
+ new Request(getUrl(this.options) + "/set_properties_once", {
+ api: {
+ "api_version": API_VERSION,
+ "api_key": this.options.apiKey
+ },
+ id: this.options.userId,
+ properties: properties
+ }).send(wrapCallback("set_properties_once", properties, callback));
+ return this;
+};
+
+User.prototype.increment = function (property, value, callback) {
+ new Request(getUrl(this.options) + "/increment_property", {
+ api: {
+ "api_version": API_VERSION,
+ "api_key": this.options.apiKey
+ },
+ id: this.options.userId,
+ property: property,
+ value: value
+ }).send(wrapCallback("increment_property", property + " by " + value, callback));
+ return this;
+};
+
+User.prototype.unset = function (properties, callback) {
+ new Request(getUrl(this.options) + "/unset_properties", {
+ api: {
+ "api_version": API_VERSION,
+ "api_key": this.options.apiKey
+ },
+ id: this.options.userId,
+ properties: type(properties) === "array" ? properties : [properties]
+ }).send(wrapCallback("unset_properties", properties, callback));
+ return this;
+};
+
+var API_VERSION$1 = 1;
+var DEFAULT_OPTIONS = {
+ apiEndpoint: 'app.rakam.io',
+ eventEndpointPath: '/event/batch',
+ cookieExpiration: 365 * 10,
+ cookieName: 'rakam_id',
+ domain: undefined,
+ includeUtm: false,
+ trackForms: false,
+ language: language.language,
+ optOut: false,
+ platform: 'Web',
+ savedMaxCount: 1000,
+ saveEvents: true,
+ sessionTimeout: 30 * 60 * 1000,
+ unsentKey: 'rakam_unsent',
+ uploadBatchSize: 100,
+ batchEvents: false,
+ eventUploadThreshold: 30,
+ eventUploadPeriodMillis: 30 * 1000,
+ // 30s,
+ useLocalStorageForSessionization: true
+};
+var StorageKeys = {
+ LAST_ID: 'rakam_lastEventId',
+ LAST_EVENT_TIME: 'rakam_lastEventTime',
+ SESSION_ID: 'rakam_sessionId',
+ RETURNING_SESSION: 'rakam_returning'
+};
+
+var getSessionItem = function (options, key) {
+ if (options.useLocalStorageForSessionization) {
+ return localStorage$1.getItem(key);
+ } else {
+ return Cookie.get(key);
+ }
+};
+
+var setSessionItem = function (options, key, value) {
+ if (options.useLocalStorageForSessionization) {
+ localStorage$1.setItem(key, value);
+ } else {
+ Cookie.set(key, value);
+ }
+};
+/*
+ * Rakam API
+ */
+
+
+var Rakam = function () {
+ this._unsentEvents = [];
+ this.options = merge({}, DEFAULT_OPTIONS);
+};
+
+Rakam.prototype._eventId = 0;
+Rakam.prototype._returningUser = false;
+Rakam.prototype._sending = false;
+Rakam.prototype._lastEventTime = null;
+Rakam.prototype._sessionId = null;
+Rakam.prototype._newSession = false;
+
+Rakam.prototype.log = function (s) {
+ if (this.options.debug === true) {
+ console.log('[Rakam] ' + s);
+ }
+};
+/**
+ * Initializes Rakam.
+ * apiKey The API Key for your app
+ * opt_userId An identifier for this user
+ * opt_config Configuration options
+ * - saveEvents (boolean) Whether to save events to local storage. Defaults to true.
+ * - includeUtm (boolean) Whether to send utm parameters with events. Defaults to false.
+ */
+
+
+Rakam.prototype.init = function (apiKey, opt_userId, opt_config, callback) {
+ try {
+ if (!apiKey) {
+ throw new Error('apiKey is null');
+ }
+
+ this.options.apiKey = apiKey;
+ var user = new User();
+ user.init(this.options);
+
+ this.User = function () {
+ return user;
+ };
+
+ if (opt_config) {
+ this.options.apiEndpoint = opt_config.apiEndpoint || this.options.apiEndpoint;
+ this.options.debug = opt_config.debug || this.options.debug === true;
+
+ if (opt_config.saveEvents !== undefined) {
+ this.options.saveEvents = !!opt_config.saveEvents;
+ }
+
+ if (opt_config.domain !== undefined) {
+ this.options.domain = opt_config.domain;
+ }
+
+ if (opt_config.includeUtm !== undefined) {
+ this.options.includeUtm = !!opt_config.includeUtm;
+ }
+
+ if (opt_config.trackClicks !== undefined) {
+ this.options.trackClicks = !!opt_config.trackClicks;
+ }
+
+ if (opt_config.trackForms !== undefined) {
+ this.options.trackForms = !!opt_config.trackForms;
+ }
+
+ if (opt_config.batchEvents !== undefined) {
+ this.options.batchEvents = !!opt_config.batchEvents;
+ }
+
+ this.options.platform = opt_config.platform || this.options.platform;
+ this.options.useLocalStorageForSessionization = opt_config.useLocalStorageForSessionization || this.options.useLocalStorageForSessionization;
+ this.options.language = opt_config.language || this.options.language;
+ this.options.sessionTimeout = opt_config.sessionTimeout || this.options.sessionTimeout;
+ this.options.uploadBatchSize = opt_config.uploadBatchSize || this.options.uploadBatchSize;
+ this.options.eventUploadThreshold = opt_config.eventUploadThreshold || this.options.eventUploadThreshold;
+ this.options.savedMaxCount = opt_config.savedMaxCount || this.options.savedMaxCount;
+ this.options.eventUploadPeriodMillis = opt_config.eventUploadPeriodMillis || this.options.eventUploadPeriodMillis;
+ this.options.superProperties = opt_config.superProperties || [];
+ }
+
+ Cookie.options({
+ expirationDays: this.options.cookieExpiration,
+ domain: this.options.domain
+ });
+ this.options.domain = Cookie.options().domain;
+
+ _loadCookieData(this);
+
+ if (opt_config && opt_config.deviceId !== undefined && opt_config.deviceId !== null && opt_config.deviceId || this.options.deviceId) {
+ this.options.deviceId = this.options.deviceId;
+ } else {
+ this.deviceIdCreatedAt = new Date();
+ this.options.deviceId = uuid();
+ }
+
+ _saveCookieData(this);
+
+ this.log('initialized with apiKey=' + apiKey);
+
+ if (this.options.saveEvents) {
+ var savedUnsentEventsString = localStorage$1.getItem(this.options.unsentKey);
+
+ if (savedUnsentEventsString) {
+ try {
+ this._unsentEvents = JSON.parse(savedUnsentEventsString);
+ } catch (e) {
+ this.log(e);
+ }
+ }
+ }
+
+ this._sendEventsIfReady();
+
+ if (this.options.includeUtm) {
+ this._initUtmData();
+ }
+
+ if (this.options.trackForms) {
+ this._initTrackForms();
+ }
+
+ if (this.options.trackClicks) {
+ this._initTrackClicks();
+ }
+
+ this._lastEventTime = parseInt(getSessionItem(this.options, StorageKeys.LAST_EVENT_TIME)) || null;
+ this._sessionId = parseInt(getSessionItem(this.options, StorageKeys.SESSION_ID)) || null;
+ this._eventId = localStorage$1.getItem(StorageKeys.LAST_ID) || 0;
+ var now = new Date().getTime();
+
+ if (!this._sessionId || !this._lastEventTime || now - this._lastEventTime > this.options.sessionTimeout) {
+ if (this._sessionId !== null) {
+ setSessionItem(this.options, StorageKeys.RETURNING_SESSION, true);
+ this._returningUser = true;
+ }
+
+ this._sessionId = now;
+ Cookie.remove('_rakam_time');
+ setSessionItem(this.options, StorageKeys.SESSION_ID, this._sessionId);
+ } else {
+ this._returningUser = getSessionItem(this.options, StorageKeys.RETURNING_SESSION) === 'true';
+ }
+
+ this._lastEventTime = now;
+ setSessionItem(this.options, StorageKeys.LAST_EVENT_TIME, this._lastEventTime);
+ } catch (e) {
+ this.log(e);
+ }
+
+ this.setUserId(opt_userId);
+
+ if (callback && typeof callback === 'function') {
+ setTimeout(function () {
+ callback();
+ }, 1);
+ }
+};
+
+Rakam.prototype.onEvent = function (callback) {
+ this.options.eventCallbacks = this.options.eventCallbacks || [];
+ this.options.eventCallbacks.push(callback);
+};
+
+var transformValue = function (_this, attribute, value, type) {
+ if (type !== null) {
+ type = type.toLowerCase();
+ }
+
+ if (type === 'long' || type === 'time' || type === 'timestamp' || type === 'date') {
+ value = parseInt(value);
+
+ if (isNaN(value) || !isFinite(value)) {
+ _this.log('ignoring ' + attribute + ': the value must be a number');
+
+ value = null;
+ }
+ } else if (type === 'double') {
+ value = parseFloat(value);
+
+ if (isNaN(value) || !isFinite(value)) {
+ _this.log('ignoring ' + attribute + ': the value is not double');
+
+ value = null;
+ }
+ } else if (type === 'boolean') {
+ if (type === 'true' || type === '1') {
+ value = true;
+ } else if (type === 'false' || type === '0') {
+ value = false;
+ } else {
+ _this.log('ignoring ' + attribute + ': the value is not boolean');
+
+ value = null;
+ }
+ }
+
+ return value;
+};
+
+Rakam.prototype.logInlinedEvent = function (collection, extraProperties, callback) {
+ var getAllElementsWithAttribute = function (attribute) {
+ if (document.querySelectorAll) {
+ return document.querySelectorAll('[rakam-event-attribute]');
+ }
+
+ var matchingElements = [];
+ var allElements = document.getElementsByTagName('*');
+
+ for (var i = 0, n = allElements.length; i < n; i++) {
+ if (allElements[i].getAttribute(attribute) !== null) {
+ matchingElements.push(allElements[i]);
+ }
+ }
+
+ return matchingElements;
+ };
+
+ var properties = extraProperties || {};
+ var elements = getAllElementsWithAttribute('rakam-event-attribute');
+
+ for (var i = 0; i < elements.length; i++) {
+ var element = elements[i];
+ var attribute = element.getAttribute('rakam-event-attribute');
+ var value = element.getAttribute('rakam-event-attribute-value');
+ var type = element.getAttribute('rakam-event-attribute-type');
+
+ if (value === null) {
+ if (element.tagName === 'INPUT') {
+ value = element.value;
+ } else if (element.tagName === 'SELECT') {
+ var option = element.options[element.selectedIndex];
+
+ if (option.value !== null && option.value !== '') {
+ var attr = element.getAttribute('rakam-attribute-value');
+
+ if (attr !== 'value') {
+ value = option.value;
+ } else {
+ value = option.text;
+ }
+ }
+ } else if (element.innerText) {
+ value = element.innerText.replace(/^\s+|\s+$/g, '');
+ } else {
+ this.log('Could find value of DOM element.', element);
+ }
+ }
+
+ if (value !== null && value !== '') {
+ properties[attribute] = transformValue(this, attribute, value, type);
+ }
+ }
+
+ this.logEvent(collection, properties, callback);
+};
+
+Rakam.prototype.isReturningUser = function () {
+ return this._returningUser;
+};
+
+var gapMillis = 0;
+var startTime = new Date().getTime();
+var idleTime;
+var initializedTimer = false;
+
+Rakam.prototype.resetTimer = function () {
+ if (!initializedTimer) {
+ return this.log('Timer is not initialized');
+ }
+
+ idleTime = null;
+ gapMillis = 0;
+ startTime = new Date().getTime();
+};
+
+Rakam.prototype.startTimer = function (saveOnClose) {
+ if (initializedTimer) {
+ return this.log('Timer is already initialized');
+ }
+
+ startTime = new Date().getTime();
+ ifvisible.on('idle', function () {
+ idleTime = new Date().getTime();
+ });
+ ifvisible.on('wakeup', function () {
+ gapMillis += new Date().getTime() - idleTime;
+ idleTime = null;
+ });
+
+ if (saveOnClose) {
+ var func;
+
+ if (window.onbeforeunload !== null) {
+ func = window.onbeforeunload;
+ }
+
+ var _this = this;
+
+ window.onbeforeunload = function (e) {
+ Cookie.set('_rakam_time', _this.getTimeOnPage());
+
+ if (func) {
+ func(e);
+ }
+ };
+ }
+
+ initializedTimer = true;
+};
+
+Rakam.prototype.getTimeOnPage = function () {
+ if (!initializedTimer) {
+ return this.log('Timer is not initialized, returning null from getTimeOnPage()');
+ }
+
+ return ((idleTime > 0 ? idleTime : new Date().getTime()) - startTime - gapMillis) / 1000;
+};
+
+Rakam.prototype.getTimeOnPreviousPage = function () {
+ return Cookie.get('_rakam_time');
+};
+
+Rakam.prototype.nextEventId = function () {
+ this._eventId++;
+ return this._eventId;
+}; // returns true if sendEvents called immediately
+
+
+Rakam.prototype._sendEventsIfReady = function (callback) {
+ if (this._unsentEvents.length === 0) {
+ return false;
+ }
+
+ if (!this.options.batchEvents) {
+ this.sendEvents(callback);
+ return true;
+ }
+
+ if (this._unsentEvents.length >= this.options.eventUploadThreshold) {
+ this.sendEvents(callback);
+ return true;
+ }
+
+ setTimeout(this.sendEvents.bind(this), this.options.eventUploadPeriodMillis);
+ return false;
+};
+
+var _loadCookieData = function (scope) {
+ var cookieData = Cookie.get(scope.options.cookieName);
+
+ if (cookieData) {
+ if (cookieData.deviceId) {
+ scope.options.deviceId = cookieData.deviceId;
+ }
+
+ if (cookieData.userId) {
+ scope.options.userId = cookieData.userId;
+ }
+
+ if (cookieData.superProps) {
+ scope.options.superProperties = cookieData.superProps;
+ }
+
+ if (cookieData.optOut !== undefined) {
+ scope.options.optOut = cookieData.optOut;
+ }
+
+ if (cookieData.deviceIdCreatedAt !== undefined) {
+ scope.deviceIdCreatedAt = new Date(parseInt(cookieData.deviceIdCreatedAt));
+ }
+ }
+};
+
+var _saveCookieData = function (scope) {
+ Cookie.set(scope.options.cookieName, {
+ deviceId: scope.options.deviceId,
+ deviceIdCreatedAt: scope.deviceIdCreatedAt ? scope.deviceIdCreatedAt.getTime() : undefined,
+ userId: scope.options.userId,
+ superProps: scope.options.superProperties,
+ optOut: scope.options.optOut
+ });
+};
+
+Rakam._getUtmParam = function (name, query) {
+ name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
+ var regex = new RegExp('[\\?&]' + name + '=([^]*)');
+ var results = regex.exec(query);
+ return results === null ? undefined : decodeURIComponent(results[1].replace(/\+/g, ' '));
+};
+
+Rakam._getUtmData = function (rawCookie, query) {
+ // Translate the utmz cookie format into url query string format.
+ var cookie = rawCookie ? '?' + rawCookie.split('.').slice(-1)[0].replace(/\|/g, '&') : '';
+
+ var fetchParam = function (queryName, query, cookieName, cookie) {
+ return Rakam._getUtmParam(queryName, query) || Rakam._getUtmParam(cookieName, cookie);
+ };
+
+ return {
+ utm_source: fetchParam('utm_source', query, 'utmcsr', cookie),
+ utm_medium: fetchParam('utm_medium', query, 'utmcmd', cookie),
+ utm_campaign: fetchParam('utm_campaign', query, 'utmccn', cookie),
+ utm_term: fetchParam('utm_term', query, 'utmctr', cookie),
+ utm_content: fetchParam('utm_content', query, 'utmcct', cookie)
+ };
+};
+/**
+ * Parse the utm properties out of cookies and query for adding to user properties.
+ */
+
+
+Rakam.prototype._initUtmData = function (queryParams, cookieParams) {
+ queryParams = queryParams || location.search;
+ cookieParams = cookieParams || Cookie.get('__utmz');
+ this._utmProperties = Rakam._getUtmData(cookieParams, queryParams);
+};
+
+Rakam.prototype._initTrackForms = function () {
+ var _this = this;
+
+ document.addEventListener('submit', function (event) {
+ var targetElement = event.target || event.srcElement;
+ var collection = targetElement.getAttribute('rakam-event-form');
+
+ if (targetElement.tagName === 'FORM' && collection) {
+ var properties = {};
+ var extraAttributes = targetElement.getAttribute('rakam-event-extra');
+
+ if (extraAttributes !== null) {
+ for (var key in JSON.parse(extraAttributes)) {
+ if (extraAttributes.hasOwnProperty(key)) {
+ properties[key] = extraAttributes[key];
+ }
+ }
+ }
+
+ for (var i = 0; i < targetElement.elements.length; i++) {
+ var element = targetElement.elements[i];
+ var type = element.getAttribute('rakam-event-attribute-type');
+ var formElemType;
+
+ if (element.hasAttribute('type')) {
+ formElemType = element.getAttribute('type').toLowerCase();
+ }
+
+ if (formElemType === 'password') {
+ continue;
+ }
+
+ if (type === null && element.tagName === 'INPUT' && formElemType === 'number') {
+ type = 'long';
+ }
+
+ if (element.hasAttribute('rakam-event-form-element-ignore')) {
+ continue;
+ }
+
+ var attribute;
+
+ if (element.hasAttribute('rakam-event-attribute')) {
+ attribute = element.getAttribute('rakam-event-attribute');
+ } else {
+ attribute = element.getAttribute('name');
+ }
+
+ if (element.hasAttribute('rakam-event-attribute-value')) {
+ properties[attribute] = transformValue(this, attribute, element.getAttribute('rakam-event-attribute-value'), type);
+ } else if (element.tagName === 'SELECT') {
+ properties[attribute] = transformValue(this, attribute, element.options[element.selectedIndex].value, type);
+ } else if (element.tagName === 'INPUT' || element.tagName === 'TEXTAREA') {
+ properties[attribute] = transformValue(this, attribute, element.value, type);
+ } else {
+ _this.log('Couldn\'t get value of form element: ' + attribute);
+ }
+ }
+
+ _this.logEvent(collection, properties);
+ }
+ });
+};
+
+Rakam.prototype._initTrackClicks = function () {
+ var _this = this;
+
+ document.addEventListener('click', function (event) {
+ var targetElement = event.target || event.srcElement;
+ var collection = targetElement.getAttribute('rakam-event-track');
+
+ if (targetElement.tagName === 'FORM' && collection) {
+ var properties = {};
+ var extraAttributes = targetElement.getAttribute('rakam-event-properties');
+
+ if (extraAttributes !== null) {
+ for (var key in JSON.parse(extraAttributes)) {
+ if (extraAttributes.hasOwnProperty(key)) {
+ properties[key] = extraAttributes[key];
+ }
+ }
+ }
+
+ _this.logEvent(collection, properties);
+ }
+ });
+};
+
+Rakam.prototype.saveEvents = function () {
+ try {
+ localStorage$1.setItem(this.options.unsentKey, JSON.stringify(this._unsentEvents));
+ } catch (e) {
+ this.log(e);
+ }
+};
+
+Rakam.prototype.setDomain = function (domain) {
+ try {
+ Cookie.options({
+ domain: domain
+ });
+ this.options.domain = Cookie.options().domain;
+
+ _loadCookieData(this);
+
+ _saveCookieData(this);
+
+ this.log('set domain=' + domain);
+ } catch (e) {
+ this.log(e);
+ }
+};
+
+Rakam.prototype.setUserId = function (userId) {
+ try {
+ var previousId = this.options.deviceId;
+ this.options.userId = userId !== undefined && userId !== null && '' + userId || null;
+
+ if (userId !== null && userId !== '' && userId !== undefined && (this._eventId > 0 && (previousId === null || previousId === undefined) || previousId !== null && previousId !== undefined)) {
+ var _this = this;
+
+ this.User()._merge(previousId, this.deviceIdCreatedAt, function () {
+ _this.deviceIdCreatedAt = null;
+
+ _saveCookieData(_this);
+ });
+ }
+
+ _saveCookieData(this);
+
+ this.log('set userId=' + userId);
+ } catch (e) {
+ this.log(e);
+ }
+};
+
+Rakam.prototype.setUserProperties = function (parameters) {
+ try {
+ return new this.User().set(parameters);
+ } catch (e) {
+ this.log(e);
+ }
+};
+
+Rakam.prototype.getUserId = function () {
+ return this.options.userId;
+};
+
+Rakam.prototype.getDeviceId = function () {
+ return this._eventId > 0 ? this.options.deviceId : null;
+};
+
+Rakam.prototype.setOptOut = function (enable) {
+ try {
+ this.options.optOut = enable;
+
+ _saveCookieData(this);
+
+ this.log('set optOut=' + enable);
+ } catch (e) {
+ this.log(e);
+ }
+};
+
+Rakam.prototype.setDeviceId = function (deviceId) {
+ try {
+ if (deviceId) {
+ this.options.deviceId = '' + deviceId;
+
+ _saveCookieData(this);
+ }
+ } catch (e) {
+ this.log(e);
+ }
+};
+
+Rakam.prototype.setSuperProperties = function (eventProps, opt_replace) {
+ try {
+ this.options.superProperties = this.options.superProperties || {};
+
+ for (var property in eventProps) {
+ if (eventProps.hasOwnProperty(property)) {
+ if (opt_replace === false && this.options.superProperties[property] !== undefined) {
+ continue;
+ }
+
+ this.options.superProperties[property] = eventProps[property];
+ }
+ }
+
+ _saveCookieData(this);
+
+ this.log('set super properties=' + JSON.stringify(eventProps));
+ } catch (e) {
+ this.log(e);
+ }
+};
+
+Rakam.prototype.setVersionName = function (versionName) {
+ try {
+ this.options.versionName = versionName;
+ this.log('set versionName=' + versionName);
+ } catch (e) {
+ this.log(e);
+ }
+};
+/**
+ * Private logEvent method. Keeps apiProperties from being publicly exposed.
+ */
+
+
+Rakam.prototype._logEvent = function (eventType, eventProperties, apiProperties, callback) {
+ if (typeof callback !== 'function') {
+ callback = null;
+ }
+
+ if (!eventType || this.options.optOut) {
+ if (callback) {
+ callback(0, 'No request sent');
+ }
+
+ return;
+ }
+
+ try {
+ var eventTime = new Date().getTime();
+ var eventId = this.nextEventId();
+
+ if (!this._sessionId || !this._lastEventTime || eventTime - this._lastEventTime > this.options.sessionTimeout) {
+ this._sessionId = eventTime;
+ setSessionItem(this.options, StorageKeys.SESSION_ID, this._sessionId);
+ }
+
+ this._lastEventTime = eventTime;
+ setSessionItem(this.options, StorageKeys.LAST_EVENT_TIME, this._lastEventTime);
+ setSessionItem(this.options, StorageKeys.LAST_ID, eventId);
+ apiProperties = apiProperties || {};
+ eventProperties = eventProperties || {}; // Add the utm properties, if any, onto the event properties.
+
+ merge(eventProperties, this._utmProperties);
+ var event = {
+ collection: eventType,
+ properties: {
+ _device_id: this.options.deviceId,
+ _user: this.options.userId,
+ // use seconds
+ _time: parseInt(eventTime / 1000) * 1000,
+ _session_id: this._sessionId || -1,
+ _platform: this.options.platform,
+ _language: this.options.language
+ }
+ };
+ merge(event.properties, this.options.superProperties);
+ merge(event.properties, apiProperties);
+ merge(event.properties, eventProperties);
+ this.log('logged eventType=' + eventType + ', properties=' + JSON.stringify(eventProperties));
+
+ this._unsentEvents.push({
+ id: eventId,
+ event: event
+ }); // Remove old events from the beginning of the array if too many
+ // have accumulated. Don't want to kill memory. Default is 1000 events.
+
+
+ if (this._unsentEvents.length > this.options.savedMaxCount) {
+ this._unsentEvents.splice(0, this._unsentEvents.length - this.options.savedMaxCount);
+ }
+
+ if (this.options.saveEvents) {
+ this.saveEvents();
+ }
+
+ if (!this._sendEventsIfReady(callback) && callback) {
+ callback(0, 'No request sent');
+ }
+
+ return eventId;
+ } catch (e) {
+ this.log(e);
+ }
+};
+
+Rakam.prototype.logEvent = function (eventType, eventProperties, callback) {
+ return this._logEvent(eventType, eventProperties, null, callback);
+};
+/**
+ * Remove events in storage with event ids up to and including maxEventId. Does
+ * a true filter in case events get out of order or old events are removed.
+ */
+
+
+Rakam.prototype.removeEvents = function (maxEventId, errors) {
+ var filteredEvents = [];
+ var errorList = errors || [];
+
+ for (var i = 0; i < this._unsentEvents.length; i++) {
+ var id = this._unsentEvents[i].id;
+
+ if (errorList.indexOf(id) > -1 || id > maxEventId) {
+ filteredEvents.push(this._unsentEvents[i]);
+ }
+ }
+
+ this._unsentEvents = filteredEvents;
+};
+
+Rakam.prototype.sendEvents = function (callback) {
+ var _this = this;
+
+ if (!this._sending && !this.options.optOut && this._unsentEvents.length > 0) {
+ this._sending = true;
+ var url = ('https:' === window.location.protocol ? 'https' : 'http') + '://' + this.options.apiEndpoint + this.options.eventEndpointPath; // Determine how many events to send and track the maximum event id sent in this batch.
+
+ var numEvents = Math.min(this._unsentEvents.length, this.options.uploadBatchSize);
+ var maxEventId = this._unsentEvents[numEvents - 1].id;
+
+ this._unsentEvents.slice(0, numEvents);
+
+ var events = this._unsentEvents.slice(0, numEvents).map(function (e) {
+ return e.event;
+ });
+
+ var upload_time = new Date().getTime();
+ var api = {
+ 'upload_time': upload_time,
+ 'api_version': API_VERSION$1,
+ 'api_key': this.options.apiKey //"checksum": md5(API_VERSION + JSON.stringify(events) + upload_time).toUpperCase()
+
+ };
+ var scope = this;
+ new Request(url, {
+ api: api,
+ events: events
+ }).send(function (status, response, headers) {
+ scope._sending = false;
+
+ try {
+ if (status === 200 || status === 409) {
+ _this.log('successful upload');
+
+ scope.removeEvents(maxEventId, status === 409 ? JSON.parse(response) : null); // Update the event cache after the removal of sent events.
+
+ if (scope.options.saveEvents) {
+ scope.saveEvents();
+ } // Send more events if any queued during previous send.
+
+
+ if (!scope._sendEventsIfReady(callback) && callback) {
+ callback(status, response);
+ }
+ } else if (status === 413) {
+ _this.log('request too large'); // Can't even get this one massive event through. Drop it.
+
+
+ if (scope.options.uploadBatchSize === 1) {
+ scope.removeEvents(maxEventId);
+ } // The server complained about the length of the request.
+ // Backoff and try again.
+
+
+ scope.options.uploadBatchSize = Math.ceil(numEvents / 2);
+ scope.sendEvents(callback);
+ } else if (callback) {
+ // If server turns something like a 400
+ callback(status, response);
+ }
+ } catch (e) {
+ _this.log('failed upload');
+ }
+
+ if (scope.options.eventCallbacks) {
+ try {
+ for (var i = 0; i < scope.options.eventCallbacks.length; i++) {
+ scope.options.eventCallbacks[i](status, response, headers);
+ }
+ } catch (e) {
+ _this.log('callback throws an exception', e);
+ }
+ }
+ });
+ } else if (callback) {
+ callback(0, 'No request sent');
+ }
+};
+
+Rakam.prototype.onload = function (callback) {
+ var _this = this;
+
+ setTimeout(function () {
+ callback();
+
+ _this.log('executed callback', callback);
+ }, 1);
+};
+
+Rakam.prototype.runQueuedFunctions = function () {
+ for (var i = 0; i < this._q.length; i++) {
+ var fn = this[this._q[i][0]];
+
+ if (fn && type(fn) === 'function') {
+ fn.apply(this, this._q[i].slice(1));
+ }
+ }
+
+ this._q = []; // clear function queue after running
+};
+
+Rakam.prototype.__VERSION__ = version;
+
+/* jshint expr:true */
+var old = window.rakam || {};
+var instance = new Rakam();
+instance._q = old._q || []; // export the instance
+
+export default instance;
diff --git a/rakam.js b/rakam.js
index e69de29..328c3b8 100644
--- a/rakam.js
+++ b/rakam.js
@@ -0,0 +1,1855 @@
+var rakam = (function () {
+ 'use strict';
+
+ /* jshint bitwise: false */
+
+ /*
+ * UTF-8 encoder/decoder
+ * http://www.webtoolkit.info/
+ */
+ var UTF8 = {
+ encode: function (s) {
+ var utftext = '';
+
+ for (var n = 0; n < s.length; n++) {
+ var c = s.charCodeAt(n);
+
+ if (c < 128) {
+ utftext += String.fromCharCode(c);
+ } else if (c > 127 && c < 2048) {
+ utftext += String.fromCharCode(c >> 6 | 192);
+ utftext += String.fromCharCode(c & 63 | 128);
+ } else {
+ utftext += String.fromCharCode(c >> 12 | 224);
+ utftext += String.fromCharCode(c >> 6 & 63 | 128);
+ utftext += String.fromCharCode(c & 63 | 128);
+ }
+ }
+
+ return utftext;
+ },
+ decode: function (utftext) {
+ var s = '';
+ var i = 0;
+ var c = 0,
+ c1 = 0,
+ c2 = 0;
+
+ while (i < utftext.length) {
+ c = utftext.charCodeAt(i);
+
+ if (c < 128) {
+ s += String.fromCharCode(c);
+ i++;
+ } else if (c > 191 && c < 224) {
+ c1 = utftext.charCodeAt(i + 1);
+ s += String.fromCharCode((c & 31) << 6 | c1 & 63);
+ i += 2;
+ } else {
+ c1 = utftext.charCodeAt(i + 1);
+ c2 = utftext.charCodeAt(i + 2);
+ s += String.fromCharCode((c & 15) << 12 | (c1 & 63) << 6 | c2 & 63);
+ i += 3;
+ }
+ }
+
+ return s;
+ }
+ };
+
+ /* jshint bitwise: false */
+ /*
+ * Base64 encoder/decoder
+ * http://www.webtoolkit.info/
+ */
+
+ var Base64 = {
+ _keyStr: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=',
+ encode: function (input) {
+ try {
+ if (window.btoa && window.atob) {
+ return window.btoa(unescape(encodeURIComponent(input)));
+ }
+ } catch (e) {//log(e);
+ }
+
+ return Base64._encode(input);
+ },
+ _encode: function (input) {
+ var output = '';
+ var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
+ var i = 0;
+ input = UTF8.encode(input);
+
+ while (i < input.length) {
+ chr1 = input.charCodeAt(i++);
+ chr2 = input.charCodeAt(i++);
+ chr3 = input.charCodeAt(i++);
+ enc1 = chr1 >> 2;
+ enc2 = (chr1 & 3) << 4 | chr2 >> 4;
+ enc3 = (chr2 & 15) << 2 | chr3 >> 6;
+ enc4 = chr3 & 63;
+
+ if (isNaN(chr2)) {
+ enc3 = enc4 = 64;
+ } else if (isNaN(chr3)) {
+ enc4 = 64;
+ }
+
+ output = output + Base64._keyStr.charAt(enc1) + Base64._keyStr.charAt(enc2) + Base64._keyStr.charAt(enc3) + Base64._keyStr.charAt(enc4);
+ }
+
+ return output;
+ },
+ decode: function (input) {
+ try {
+ if (window.btoa && window.atob) {
+ return decodeURIComponent(escape(window.atob(input)));
+ }
+ } catch (e) {//log(e);
+ }
+
+ return Base64._decode(input);
+ },
+ _decode: function (input) {
+ var output = '';
+ var chr1, chr2, chr3;
+ var enc1, enc2, enc3, enc4;
+ var i = 0;
+ input = input.replace(/[^A-Za-z0-9\+\/\=]/g, '');
+
+ while (i < input.length) {
+ enc1 = Base64._keyStr.indexOf(input.charAt(i++));
+ enc2 = Base64._keyStr.indexOf(input.charAt(i++));
+ enc3 = Base64._keyStr.indexOf(input.charAt(i++));
+ enc4 = Base64._keyStr.indexOf(input.charAt(i++));
+ chr1 = enc1 << 2 | enc2 >> 4;
+ chr2 = (enc2 & 15) << 4 | enc3 >> 2;
+ chr3 = (enc3 & 3) << 6 | enc4;
+ output = output + String.fromCharCode(chr1);
+
+ if (enc3 !== 64) {
+ output = output + String.fromCharCode(chr2);
+ }
+
+ if (enc4 !== 64) {
+ output = output + String.fromCharCode(chr3);
+ }
+ }
+
+ output = UTF8.decode(output);
+ return output;
+ }
+ };
+
+ /*
+ * Cookie data
+ */
+
+ var _options = {
+ expirationDays: undefined,
+ domain: undefined
+ };
+
+ var reset = function () {
+ _options = {};
+ };
+
+ var options = function (opts) {
+ if (arguments.length === 0) {
+ return _options;
+ }
+
+ opts = opts || {};
+ _options.expirationDays = opts.expirationDays;
+ var domain = opts.domain !== undefined ? opts.domain : '.';
+ var token = Math.random();
+ _options.domain = domain;
+ set('rakam_test', token);
+ var stored = get('rakam_test');
+
+ if (!stored || stored !== token) {
+ domain = null;
+ }
+
+ remove('rakam_test');
+ _options.domain = domain;
+ };
+
+ var _domainSpecific = function (name) {
+ // differentiate between cookies on different domains
+ var suffix = '';
+
+ if (_options.domain) {
+ suffix = _options.domain.charAt(0) === '.' ? _options.domain.substring(1) : _options.domain;
+ }
+
+ return name + suffix;
+ };
+
+ var get = function (name) {
+ try {
+ var nameEq = _domainSpecific(name) + '=';
+ var ca = document.cookie.split(';');
+ var value = null;
+
+ for (var i = 0; i < ca.length; i++) {
+ var c = ca[i];
+
+ while (c.charAt(0) === ' ') {
+ c = c.substring(1, c.length);
+ }
+
+ if (c.indexOf(nameEq) === 0) {
+ value = c.substring(nameEq.length, c.length);
+ break;
+ }
+ }
+
+ if (value) {
+ return JSON.parse(Base64.decode(value));
+ }
+
+ return null;
+ } catch (e) {
+ return null;
+ }
+ };
+
+ var set = function (name, value) {
+ try {
+ _set(_domainSpecific(name), Base64.encode(JSON.stringify(value)), _options);
+
+ return true;
+ } catch (e) {
+ return false;
+ }
+ };
+
+ var _set = function (name, value, opts) {
+ var expires = value !== null ? opts.expirationDays : -1;
+
+ if (expires) {
+ var date = new Date();
+ date.setTime(date.getTime() + expires * 24 * 60 * 60 * 1000);
+ expires = date;
+ }
+
+ var str = name + '=' + value;
+
+ if (expires) {
+ str += '; expires=' + expires.toUTCString();
+ }
+
+ str += '; path=/';
+
+ if (opts.domain) {
+ str += '; domain=' + opts.domain;
+ }
+
+ document.cookie = str;
+ };
+
+ var remove = function (name) {
+ try {
+ _set(_domainSpecific(name), null, _options);
+
+ return true;
+ } catch (e) {
+ return false;
+ }
+ };
+
+ var Cookie = {
+ reset: reset,
+ options: options,
+ get: get,
+ set: set,
+ remove: remove
+ };
+
+ var getLanguage = function () {
+ return navigator && (navigator.languages && navigator.languages[0] || navigator.language || navigator.userLanguage) || undefined;
+ };
+
+ var language = {
+ language: getLanguage()
+ };
+
+ /* jshint -W020, unused: false, noempty: false, boss: true */
+
+ /*
+ * Implement localStorage to support Firefox 2-3 and IE 5-7
+ */
+ var localStorage; // jshint ignore:line
+ // test that Window.localStorage is available and works
+
+ function windowLocalStorageAvailable() {
+ var uid = new Date();
+ var result;
+
+ try {
+ window.localStorage.setItem(uid, uid);
+ result = window.localStorage.getItem(uid) === String(uid);
+ window.localStorage.removeItem(uid);
+ return result;
+ } catch (e) {// localStorage not available
+ }
+
+ return false;
+ }
+
+ if (windowLocalStorageAvailable()) {
+ localStorage = window.localStorage;
+ } else if (window.globalStorage) {
+ // Firefox 2-3 use globalStorage
+ // See https://developer.mozilla.org/en/dom/storage#globalStorage
+ try {
+ localStorage = window.globalStorage[window.location.hostname];
+ } catch (e) {// Something bad happened...
+ }
+ } else {
+ // IE 5-7 use userData
+ // See http://msdn.microsoft.com/en-us/library/ms531424(v=vs.85).aspx
+ var div = document.createElement('div'),
+ attrKey = 'localStorage';
+ div.style.display = 'none';
+ document.getElementsByTagName('head')[0].appendChild(div);
+
+ if (div.addBehavior) {
+ div.addBehavior('#default#userdata');
+ localStorage = {
+ length: 0,
+ setItem: function (k, v) {
+ div.load(attrKey);
+
+ if (!div.getAttribute(k)) {
+ this.length++;
+ }
+
+ div.setAttribute(k, v);
+ div.save(attrKey);
+ },
+ getItem: function (k) {
+ div.load(attrKey);
+ return div.getAttribute(k);
+ },
+ removeItem: function (k) {
+ div.load(attrKey);
+
+ if (div.getAttribute(k)) {
+ this.length--;
+ }
+
+ div.removeAttribute(k);
+ div.save(attrKey);
+ },
+ clear: function () {
+ div.load(attrKey);
+ var i = 0;
+ var attr;
+
+ while (attr = div.XMLDocument.documentElement.attributes[i++]) {
+ div.removeAttribute(attr.name);
+ }
+
+ div.save(attrKey);
+ this.length = 0;
+ },
+ key: function (k) {
+ div.load(attrKey);
+ return div.XMLDocument.documentElement.attributes[k];
+ }
+ };
+ div.load(attrKey);
+ localStorage.length = div.XMLDocument.documentElement.attributes.length;
+ }
+ }
+
+ if (!localStorage) {
+ localStorage = {
+ length: 0,
+ setItem: function (k, v) {},
+ getItem: function (k) {},
+ removeItem: function (k) {},
+ clear: function () {},
+ key: function (k) {}
+ };
+ }
+
+ var localStorage$1 = localStorage;
+
+ var object = {};
+ var has = object.hasOwnProperty;
+ function merge(a, b) {
+ for (var key in b) {
+ if (has.call(b, key)) {
+ a[key] = b[key];
+ }
+ }
+
+ return a;
+ }
+
+ /*
+ * Simple AJAX request object
+ */
+ var Request = function (url, data, headers) {
+ this.url = url;
+ this.data = data || {};
+ this.headers = headers || {};
+ };
+
+ function parseResponseHeaders(headerStr) {
+ var headers = {};
+
+ if (!headerStr) {
+ return headers;
+ }
+
+ var headerPairs = headerStr.split('\u000d\u000a');
+
+ for (var i = 0; i < headerPairs.length; i++) {
+ var headerPair = headerPairs[i]; // Can't use split() here because it does the wrong thing
+ // if the header value has the string ": " in it.
+
+ var index = headerPair.indexOf('\u003a\u0020');
+
+ if (index > 0) {
+ var key = headerPair.substring(0, index);
+ var val = headerPair.substring(index + 2);
+ headers[key] = val;
+ }
+ }
+
+ return headers;
+ }
+
+ Request.prototype.send = function (callback) {
+ var isIE = window.XDomainRequest ? true : false;
+
+ if (isIE) {
+ var xdr = new window.XDomainRequest();
+ xdr.open('POST', this.url, true);
+
+ xdr.onload = function () {
+ callback(xdr.responseText);
+ };
+
+ xdr.send(JSON.stringify(this.data));
+ } else {
+ var xhr = new XMLHttpRequest();
+ xhr.withCredentials = "true";
+ xhr.open('POST', this.url, true);
+
+ xhr.onreadystatechange = function () {
+ if (xhr.readyState === 4) {
+ callback(xhr.status, xhr.responseText, parseResponseHeaders(xhr.getAllResponseHeaders()));
+ }
+ };
+
+ xhr.setRequestHeader('Content-Type', 'text/plain');
+
+ for (var key in this.headers) {
+ if (this.headers.hasOwnProperty(key)) {
+ xhr.setRequestHeader(key, this.headers[key]);
+ }
+ }
+
+ xhr.send(JSON.stringify(this.data));
+ }
+ };
+
+ /* jshint bitwise: false, laxbreak: true */
+
+ /**
+ * Taken straight from jed's gist: https://gist.github.com/982883
+ *
+ * Returns a random v4 UUID of the form xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx,
+ * where each x is replaced with a random hexadecimal digit from 0 to f, and
+ * y is replaced with a random hexadecimal digit from 8 to b.
+ */
+ var uuid = function (a) {
+ return a // if the placeholder was passed, return
+ ? ( // a random number from 0 to 15
+ a ^ // unless b is 8,
+ Math.random() // in which case
+ * 16 // a random number from
+ >> a / 4 // 8 to 11
+ ).toString(16) // in hexadecimal
+ : ( // or otherwise a concatenated string:
+ [1e7] + // 10000000 +
+ -1e3 + // -1000 +
+ -4e3 + // -4000 +
+ -8e3 + // -80000000 +
+ -1e11 // -100000000000,
+ ).replace( // replacing
+ /[018]/g, // zeroes, ones, and eights with
+ uuid // random hex digits
+ );
+ };
+
+ var version = '2.6.0';
+
+ /* Taken from: https://github.com/component/type */
+
+ /**
+ * toString ref.
+ */
+ var toString = Object.prototype.toString;
+ /**
+ * Return the type of `val`.
+ *
+ * @param {Mixed} val
+ * @return {String}
+ * @api public
+ */
+
+ function type (val) {
+ switch (toString.call(val)) {
+ case '[object Date]':
+ return 'date';
+
+ case '[object RegExp]':
+ return 'regexp';
+
+ case '[object Arguments]':
+ return 'arguments';
+
+ case '[object Array]':
+ return 'array';
+
+ case '[object Error]':
+ return 'error';
+ }
+
+ if (val === null) {
+ return 'null';
+ }
+
+ if (val === undefined) {
+ return 'undefined';
+ }
+
+ if (val !== val) {
+ return 'nan';
+ }
+
+ if (val && val.nodeType === 1) {
+ return 'element';
+ }
+
+ if (typeof Buffer !== 'undefined' && Buffer.isBuffer(val)) {
+ return 'buffer';
+ }
+
+ val = val.valueOf ? val.valueOf() : Object.prototype.valueOf.apply(val);
+ return typeof val;
+ }
+
+ /*
+ * Wrapper for a user properties JSON object that supports operations.
+ * Note: if a user property is used in multiple operations on the same User object,
+ * only the first operation will be saved, and the rest will be ignored.
+ */
+
+ var API_VERSION = 1;
+
+ var wrapCallback = function (operation, props, callback) {
+ return function (status, response, headers) {
+ if (callback !== undefined) {
+ callback(status, response, headers);
+ }
+ };
+ };
+
+ var getUrl = function (options) {
+ return ('https:' === window.location.protocol ? 'https' : 'http') + '://' + options.apiEndpoint + "/user";
+ };
+
+ var User = function () {};
+
+ User.prototype.init = function (options) {
+ this.options = options;
+ };
+
+ User.prototype.set = function (properties, callback) {
+ new Request(getUrl(this.options) + "/set_properties", {
+ api: {
+ "api_version": API_VERSION,
+ "api_key": this.options.apiKey
+ },
+ id: this.options.userId,
+ properties: properties
+ }).send(wrapCallback("set_properties", properties, callback));
+ return this;
+ };
+
+ User.prototype._merge = function (deviceId, createdAt, callback) {
+ new Request(getUrl(this.options) + "/merge", {
+ api: {
+ "api_version": API_VERSION,
+ "api_key": this.options.apiKey,
+ "upload_time": new Date().getTime()
+ },
+ anonymous_id: deviceId,
+ id: this.options.userId,
+ created_at: createdAt ? createdAt.getTime() : null,
+ merged_at: new Date().getTime()
+ }).send(wrapCallback("merge", null, callback));
+ return this;
+ };
+
+ User.prototype.setOnce = function (properties, callback) {
+ new Request(getUrl(this.options) + "/set_properties_once", {
+ api: {
+ "api_version": API_VERSION,
+ "api_key": this.options.apiKey
+ },
+ id: this.options.userId,
+ properties: properties
+ }).send(wrapCallback("set_properties_once", properties, callback));
+ return this;
+ };
+
+ User.prototype.increment = function (property, value, callback) {
+ new Request(getUrl(this.options) + "/increment_property", {
+ api: {
+ "api_version": API_VERSION,
+ "api_key": this.options.apiKey
+ },
+ id: this.options.userId,
+ property: property,
+ value: value
+ }).send(wrapCallback("increment_property", property + " by " + value, callback));
+ return this;
+ };
+
+ User.prototype.unset = function (properties, callback) {
+ new Request(getUrl(this.options) + "/unset_properties", {
+ api: {
+ "api_version": API_VERSION,
+ "api_key": this.options.apiKey
+ },
+ id: this.options.userId,
+ properties: type(properties) === "array" ? properties : [properties]
+ }).send(wrapCallback("unset_properties", properties, callback));
+ return this;
+ };
+
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
+
+ function createCommonjsModule(fn, module) {
+ return module = { exports: {} }, fn(module, module.exports), module.exports;
+ }
+
+ var ifvisible = createCommonjsModule(function (module, exports) {
+ (function () {
+ (function (root, factory) {
+ {
+ return module.exports = factory();
+ }
+ })(this, function () {
+ var addEvent, customEvent, doc, hidden, idleStartedTime, idleTime, ie, ifvisible, init, initialized, status, trackIdleStatus, visibilityChange;
+ ifvisible = {};
+ doc = document;
+ initialized = false;
+ status = "active";
+ idleTime = 60000;
+ idleStartedTime = false;
+
+ customEvent = function () {
+ var addCustomEvent, cgid, fireCustomEvent, listeners, removeCustomEvent;
+
+ listeners = {};
+ cgid = '__ceGUID';
+
+ addCustomEvent = function (obj, event, callback) {
+ obj[cgid] = undefined;
+
+ if (!obj[cgid]) {
+ obj[cgid] = "ifvisible.object.event.identifier";
+ }
+
+ if (!listeners[obj[cgid]]) {
+ listeners[obj[cgid]] = {};
+ }
+
+ if (!listeners[obj[cgid]][event]) {
+ listeners[obj[cgid]][event] = [];
+ }
+
+ return listeners[obj[cgid]][event].push(callback);
+ };
+
+ fireCustomEvent = function (obj, event, memo) {
+ var ev, j, len, ref, results;
+
+ if (obj[cgid] && listeners[obj[cgid]] && listeners[obj[cgid]][event]) {
+ ref = listeners[obj[cgid]][event];
+ results = [];
+
+ for (j = 0, len = ref.length; j < len; j++) {
+ ev = ref[j];
+ results.push(ev(memo || {}));
+ }
+
+ return results;
+ }
+ };
+
+ removeCustomEvent = function (obj, event, callback) {
+ var cl, i, j, len, ref;
+
+ if (callback) {
+ if (obj[cgid] && listeners[obj[cgid]] && listeners[obj[cgid]][event]) {
+ ref = listeners[obj[cgid]][event];
+
+ for (i = j = 0, len = ref.length; j < len; i = ++j) {
+ cl = ref[i];
+
+ if (cl === callback) {
+ listeners[obj[cgid]][event].splice(i, 1);
+ return cl;
+ }
+ }
+ }
+ } else {
+ if (obj[cgid] && listeners[obj[cgid]] && listeners[obj[cgid]][event]) {
+ return delete listeners[obj[cgid]][event];
+ }
+ }
+ };
+
+ return {
+ add: addCustomEvent,
+ remove: removeCustomEvent,
+ fire: fireCustomEvent
+ };
+ }();
+
+ addEvent = function () {
+ var setListener;
+ setListener = false;
+ return function (el, ev, fn) {
+ if (!setListener) {
+ if (el.addEventListener) {
+ setListener = function (el, ev, fn) {
+ return el.addEventListener(ev, fn, false);
+ };
+ } else if (el.attachEvent) {
+ setListener = function (el, ev, fn) {
+ return el.attachEvent('on' + ev, fn, false);
+ };
+ } else {
+ setListener = function (el, ev, fn) {
+ return el['on' + ev] = fn;
+ };
+ }
+ }
+
+ return setListener(el, ev, fn);
+ };
+ }();
+
+ ie = function () {
+ var all, check, div, undef, v;
+ undef = void 0;
+ v = 3;
+ div = doc.createElement("div");
+ all = div.getElementsByTagName("i");
+
+ check = function () {
+ return div.innerHTML = "", all[0];
+ };
+
+ while (check()) {
+ continue;
+ }
+
+ if (v > 4) {
+ return v;
+ } else {
+ return undef;
+ }
+ }();
+
+ hidden = false;
+ visibilityChange = void 0;
+
+ if (typeof doc.hidden !== "undefined") {
+ hidden = "hidden";
+ visibilityChange = "visibilitychange";
+ } else if (typeof doc.mozHidden !== "undefined") {
+ hidden = "mozHidden";
+ visibilityChange = "mozvisibilitychange";
+ } else if (typeof doc.msHidden !== "undefined") {
+ hidden = "msHidden";
+ visibilityChange = "msvisibilitychange";
+ } else if (typeof doc.webkitHidden !== "undefined") {
+ hidden = "webkitHidden";
+ visibilityChange = "webkitvisibilitychange";
+ }
+
+ trackIdleStatus = function () {
+ var timer, wakeUp;
+ timer = false;
+
+ wakeUp = function () {
+ clearTimeout(timer);
+
+ if (status !== "active") {
+ ifvisible.wakeup();
+ }
+
+ idleStartedTime = +new Date();
+ return timer = setTimeout(function () {
+ if (status === "active") {
+ return ifvisible.idle();
+ }
+ }, idleTime);
+ };
+
+ wakeUp();
+ addEvent(doc, "mousemove", wakeUp);
+ addEvent(doc, "keyup", wakeUp);
+ addEvent(window, "scroll", wakeUp);
+ ifvisible.focus(wakeUp);
+ return ifvisible.wakeup(wakeUp);
+ };
+
+ init = function () {
+ var blur;
+
+ if (initialized) {
+ return true;
+ }
+
+ if (hidden === false) {
+ blur = "blur";
+
+ if (ie < 9) {
+ blur = "focusout";
+ }
+
+ addEvent(window, blur, function () {
+ return ifvisible.blur();
+ });
+ addEvent(window, "focus", function () {
+ return ifvisible.focus();
+ });
+ } else {
+ addEvent(doc, visibilityChange, function () {
+ if (doc[hidden]) {
+ return ifvisible.blur();
+ } else {
+ return ifvisible.focus();
+ }
+ }, false);
+ }
+
+ initialized = true;
+ return trackIdleStatus();
+ };
+
+ ifvisible = {
+ setIdleDuration: function (seconds) {
+ return idleTime = seconds * 1000;
+ },
+ getIdleDuration: function () {
+ return idleTime;
+ },
+ getIdleInfo: function () {
+ var now, res;
+ now = +new Date();
+ res = {};
+
+ if (status === "idle") {
+ res.isIdle = true;
+ res.idleFor = now - idleStartedTime;
+ res.timeLeft = 0;
+ res.timeLeftPer = 100;
+ } else {
+ res.isIdle = false;
+ res.idleFor = now - idleStartedTime;
+ res.timeLeft = idleStartedTime + idleTime - now;
+ res.timeLeftPer = (100 - res.timeLeft * 100 / idleTime).toFixed(2);
+ }
+
+ return res;
+ },
+ focus: function (callback) {
+ if (typeof callback === "function") {
+ return this.on("focus", callback);
+ }
+
+ status = "active";
+ customEvent.fire(this, "focus");
+ customEvent.fire(this, "wakeup");
+ return customEvent.fire(this, "statusChanged", {
+ status: status
+ });
+ },
+ blur: function (callback) {
+ if (typeof callback === "function") {
+ return this.on("blur", callback);
+ }
+
+ status = "hidden";
+ customEvent.fire(this, "blur");
+ customEvent.fire(this, "idle");
+ return customEvent.fire(this, "statusChanged", {
+ status: status
+ });
+ },
+ idle: function (callback) {
+ if (typeof callback === "function") {
+ return this.on("idle", callback);
+ }
+
+ status = "idle";
+ customEvent.fire(this, "idle");
+ return customEvent.fire(this, "statusChanged", {
+ status: status
+ });
+ },
+ wakeup: function (callback) {
+ if (typeof callback === "function") {
+ return this.on("wakeup", callback);
+ }
+
+ status = "active";
+ customEvent.fire(this, "wakeup");
+ return customEvent.fire(this, "statusChanged", {
+ status: status
+ });
+ },
+ on: function (name, callback) {
+ init();
+ return customEvent.add(this, name, callback);
+ },
+ off: function (name, callback) {
+ init();
+ return customEvent.remove(this, name, callback);
+ },
+ onEvery: function (seconds, callback) {
+ var paused, t;
+ init();
+ paused = false;
+
+ if (callback) {
+ t = setInterval(function () {
+ if (status === "active" && paused === false) {
+ return callback();
+ }
+ }, seconds * 1000);
+ }
+
+ return {
+ stop: function () {
+ return clearInterval(t);
+ },
+ pause: function () {
+ return paused = true;
+ },
+ resume: function () {
+ return paused = false;
+ },
+ code: t,
+ callback: callback
+ };
+ },
+ now: function (check) {
+ init();
+ return status === (check || "active");
+ }
+ };
+ return ifvisible;
+ });
+ }).call(commonjsGlobal);
+ });
+
+ var API_VERSION$1 = 1;
+ var DEFAULT_OPTIONS = {
+ apiEndpoint: 'app.rakam.io',
+ eventEndpointPath: '/event/batch',
+ cookieExpiration: 365 * 10,
+ cookieName: 'rakam_id',
+ domain: undefined,
+ includeUtm: false,
+ trackForms: false,
+ language: language.language,
+ optOut: false,
+ platform: 'Web',
+ savedMaxCount: 1000,
+ saveEvents: true,
+ sessionTimeout: 30 * 60 * 1000,
+ unsentKey: 'rakam_unsent',
+ uploadBatchSize: 100,
+ batchEvents: false,
+ eventUploadThreshold: 30,
+ eventUploadPeriodMillis: 30 * 1000,
+ // 30s,
+ useLocalStorageForSessionization: true
+ };
+ var StorageKeys = {
+ LAST_ID: 'rakam_lastEventId',
+ LAST_EVENT_TIME: 'rakam_lastEventTime',
+ SESSION_ID: 'rakam_sessionId',
+ RETURNING_SESSION: 'rakam_returning'
+ };
+
+ var getSessionItem = function (options, key) {
+ if (options.useLocalStorageForSessionization) {
+ return localStorage$1.getItem(key);
+ } else {
+ return Cookie.get(key);
+ }
+ };
+
+ var setSessionItem = function (options, key, value) {
+ if (options.useLocalStorageForSessionization) {
+ localStorage$1.setItem(key, value);
+ } else {
+ Cookie.set(key, value);
+ }
+ };
+ /*
+ * Rakam API
+ */
+
+
+ var Rakam = function () {
+ this._unsentEvents = [];
+ this.options = merge({}, DEFAULT_OPTIONS);
+ };
+
+ Rakam.prototype._eventId = 0;
+ Rakam.prototype._returningUser = false;
+ Rakam.prototype._sending = false;
+ Rakam.prototype._lastEventTime = null;
+ Rakam.prototype._sessionId = null;
+ Rakam.prototype._newSession = false;
+
+ Rakam.prototype.log = function (s) {
+ if (this.options.debug === true) {
+ console.log('[Rakam] ' + s);
+ }
+ };
+ /**
+ * Initializes Rakam.
+ * apiKey The API Key for your app
+ * opt_userId An identifier for this user
+ * opt_config Configuration options
+ * - saveEvents (boolean) Whether to save events to local storage. Defaults to true.
+ * - includeUtm (boolean) Whether to send utm parameters with events. Defaults to false.
+ */
+
+
+ Rakam.prototype.init = function (apiKey, opt_userId, opt_config, callback) {
+ try {
+ if (!apiKey) {
+ throw new Error('apiKey is null');
+ }
+
+ this.options.apiKey = apiKey;
+ var user = new User();
+ user.init(this.options);
+
+ this.User = function () {
+ return user;
+ };
+
+ if (opt_config) {
+ this.options.apiEndpoint = opt_config.apiEndpoint || this.options.apiEndpoint;
+ this.options.debug = opt_config.debug || this.options.debug === true;
+
+ if (opt_config.saveEvents !== undefined) {
+ this.options.saveEvents = !!opt_config.saveEvents;
+ }
+
+ if (opt_config.domain !== undefined) {
+ this.options.domain = opt_config.domain;
+ }
+
+ if (opt_config.includeUtm !== undefined) {
+ this.options.includeUtm = !!opt_config.includeUtm;
+ }
+
+ if (opt_config.trackClicks !== undefined) {
+ this.options.trackClicks = !!opt_config.trackClicks;
+ }
+
+ if (opt_config.trackForms !== undefined) {
+ this.options.trackForms = !!opt_config.trackForms;
+ }
+
+ if (opt_config.batchEvents !== undefined) {
+ this.options.batchEvents = !!opt_config.batchEvents;
+ }
+
+ this.options.platform = opt_config.platform || this.options.platform;
+ this.options.useLocalStorageForSessionization = opt_config.useLocalStorageForSessionization || this.options.useLocalStorageForSessionization;
+ this.options.language = opt_config.language || this.options.language;
+ this.options.sessionTimeout = opt_config.sessionTimeout || this.options.sessionTimeout;
+ this.options.uploadBatchSize = opt_config.uploadBatchSize || this.options.uploadBatchSize;
+ this.options.eventUploadThreshold = opt_config.eventUploadThreshold || this.options.eventUploadThreshold;
+ this.options.savedMaxCount = opt_config.savedMaxCount || this.options.savedMaxCount;
+ this.options.eventUploadPeriodMillis = opt_config.eventUploadPeriodMillis || this.options.eventUploadPeriodMillis;
+ this.options.superProperties = opt_config.superProperties || [];
+ }
+
+ Cookie.options({
+ expirationDays: this.options.cookieExpiration,
+ domain: this.options.domain
+ });
+ this.options.domain = Cookie.options().domain;
+
+ _loadCookieData(this);
+
+ if (opt_config && opt_config.deviceId !== undefined && opt_config.deviceId !== null && opt_config.deviceId || this.options.deviceId) {
+ this.options.deviceId = this.options.deviceId;
+ } else {
+ this.deviceIdCreatedAt = new Date();
+ this.options.deviceId = uuid();
+ }
+
+ _saveCookieData(this);
+
+ this.log('initialized with apiKey=' + apiKey);
+
+ if (this.options.saveEvents) {
+ var savedUnsentEventsString = localStorage$1.getItem(this.options.unsentKey);
+
+ if (savedUnsentEventsString) {
+ try {
+ this._unsentEvents = JSON.parse(savedUnsentEventsString);
+ } catch (e) {
+ this.log(e);
+ }
+ }
+ }
+
+ this._sendEventsIfReady();
+
+ if (this.options.includeUtm) {
+ this._initUtmData();
+ }
+
+ if (this.options.trackForms) {
+ this._initTrackForms();
+ }
+
+ if (this.options.trackClicks) {
+ this._initTrackClicks();
+ }
+
+ this._lastEventTime = parseInt(getSessionItem(this.options, StorageKeys.LAST_EVENT_TIME)) || null;
+ this._sessionId = parseInt(getSessionItem(this.options, StorageKeys.SESSION_ID)) || null;
+ this._eventId = localStorage$1.getItem(StorageKeys.LAST_ID) || 0;
+ var now = new Date().getTime();
+
+ if (!this._sessionId || !this._lastEventTime || now - this._lastEventTime > this.options.sessionTimeout) {
+ if (this._sessionId !== null) {
+ setSessionItem(this.options, StorageKeys.RETURNING_SESSION, true);
+ this._returningUser = true;
+ }
+
+ this._sessionId = now;
+ Cookie.remove('_rakam_time');
+ setSessionItem(this.options, StorageKeys.SESSION_ID, this._sessionId);
+ } else {
+ this._returningUser = getSessionItem(this.options, StorageKeys.RETURNING_SESSION) === 'true';
+ }
+
+ this._lastEventTime = now;
+ setSessionItem(this.options, StorageKeys.LAST_EVENT_TIME, this._lastEventTime);
+ } catch (e) {
+ this.log(e);
+ }
+
+ this.setUserId(opt_userId);
+
+ if (callback && typeof callback === 'function') {
+ setTimeout(function () {
+ callback();
+ }, 1);
+ }
+ };
+
+ Rakam.prototype.onEvent = function (callback) {
+ this.options.eventCallbacks = this.options.eventCallbacks || [];
+ this.options.eventCallbacks.push(callback);
+ };
+
+ var transformValue = function (_this, attribute, value, type) {
+ if (type !== null) {
+ type = type.toLowerCase();
+ }
+
+ if (type === 'long' || type === 'time' || type === 'timestamp' || type === 'date') {
+ value = parseInt(value);
+
+ if (isNaN(value) || !isFinite(value)) {
+ _this.log('ignoring ' + attribute + ': the value must be a number');
+
+ value = null;
+ }
+ } else if (type === 'double') {
+ value = parseFloat(value);
+
+ if (isNaN(value) || !isFinite(value)) {
+ _this.log('ignoring ' + attribute + ': the value is not double');
+
+ value = null;
+ }
+ } else if (type === 'boolean') {
+ if (type === 'true' || type === '1') {
+ value = true;
+ } else if (type === 'false' || type === '0') {
+ value = false;
+ } else {
+ _this.log('ignoring ' + attribute + ': the value is not boolean');
+
+ value = null;
+ }
+ }
+
+ return value;
+ };
+
+ Rakam.prototype.logInlinedEvent = function (collection, extraProperties, callback) {
+ var getAllElementsWithAttribute = function (attribute) {
+ if (document.querySelectorAll) {
+ return document.querySelectorAll('[rakam-event-attribute]');
+ }
+
+ var matchingElements = [];
+ var allElements = document.getElementsByTagName('*');
+
+ for (var i = 0, n = allElements.length; i < n; i++) {
+ if (allElements[i].getAttribute(attribute) !== null) {
+ matchingElements.push(allElements[i]);
+ }
+ }
+
+ return matchingElements;
+ };
+
+ var properties = extraProperties || {};
+ var elements = getAllElementsWithAttribute('rakam-event-attribute');
+
+ for (var i = 0; i < elements.length; i++) {
+ var element = elements[i];
+ var attribute = element.getAttribute('rakam-event-attribute');
+ var value = element.getAttribute('rakam-event-attribute-value');
+ var type = element.getAttribute('rakam-event-attribute-type');
+
+ if (value === null) {
+ if (element.tagName === 'INPUT') {
+ value = element.value;
+ } else if (element.tagName === 'SELECT') {
+ var option = element.options[element.selectedIndex];
+
+ if (option.value !== null && option.value !== '') {
+ var attr = element.getAttribute('rakam-attribute-value');
+
+ if (attr !== 'value') {
+ value = option.value;
+ } else {
+ value = option.text;
+ }
+ }
+ } else if (element.innerText) {
+ value = element.innerText.replace(/^\s+|\s+$/g, '');
+ } else {
+ this.log('Could find value of DOM element.', element);
+ }
+ }
+
+ if (value !== null && value !== '') {
+ properties[attribute] = transformValue(this, attribute, value, type);
+ }
+ }
+
+ this.logEvent(collection, properties, callback);
+ };
+
+ Rakam.prototype.isReturningUser = function () {
+ return this._returningUser;
+ };
+
+ var gapMillis = 0;
+ var startTime = new Date().getTime();
+ var idleTime;
+ var initializedTimer = false;
+
+ Rakam.prototype.resetTimer = function () {
+ if (!initializedTimer) {
+ return this.log('Timer is not initialized');
+ }
+
+ idleTime = null;
+ gapMillis = 0;
+ startTime = new Date().getTime();
+ };
+
+ Rakam.prototype.startTimer = function (saveOnClose) {
+ if (initializedTimer) {
+ return this.log('Timer is already initialized');
+ }
+
+ startTime = new Date().getTime();
+ ifvisible.on('idle', function () {
+ idleTime = new Date().getTime();
+ });
+ ifvisible.on('wakeup', function () {
+ gapMillis += new Date().getTime() - idleTime;
+ idleTime = null;
+ });
+
+ if (saveOnClose) {
+ var func;
+
+ if (window.onbeforeunload !== null) {
+ func = window.onbeforeunload;
+ }
+
+ var _this = this;
+
+ window.onbeforeunload = function (e) {
+ Cookie.set('_rakam_time', _this.getTimeOnPage());
+
+ if (func) {
+ func(e);
+ }
+ };
+ }
+
+ initializedTimer = true;
+ };
+
+ Rakam.prototype.getTimeOnPage = function () {
+ if (!initializedTimer) {
+ return this.log('Timer is not initialized, returning null from getTimeOnPage()');
+ }
+
+ return ((idleTime > 0 ? idleTime : new Date().getTime()) - startTime - gapMillis) / 1000;
+ };
+
+ Rakam.prototype.getTimeOnPreviousPage = function () {
+ return Cookie.get('_rakam_time');
+ };
+
+ Rakam.prototype.nextEventId = function () {
+ this._eventId++;
+ return this._eventId;
+ }; // returns true if sendEvents called immediately
+
+
+ Rakam.prototype._sendEventsIfReady = function (callback) {
+ if (this._unsentEvents.length === 0) {
+ return false;
+ }
+
+ if (!this.options.batchEvents) {
+ this.sendEvents(callback);
+ return true;
+ }
+
+ if (this._unsentEvents.length >= this.options.eventUploadThreshold) {
+ this.sendEvents(callback);
+ return true;
+ }
+
+ setTimeout(this.sendEvents.bind(this), this.options.eventUploadPeriodMillis);
+ return false;
+ };
+
+ var _loadCookieData = function (scope) {
+ var cookieData = Cookie.get(scope.options.cookieName);
+
+ if (cookieData) {
+ if (cookieData.deviceId) {
+ scope.options.deviceId = cookieData.deviceId;
+ }
+
+ if (cookieData.userId) {
+ scope.options.userId = cookieData.userId;
+ }
+
+ if (cookieData.superProps) {
+ scope.options.superProperties = cookieData.superProps;
+ }
+
+ if (cookieData.optOut !== undefined) {
+ scope.options.optOut = cookieData.optOut;
+ }
+
+ if (cookieData.deviceIdCreatedAt !== undefined) {
+ scope.deviceIdCreatedAt = new Date(parseInt(cookieData.deviceIdCreatedAt));
+ }
+ }
+ };
+
+ var _saveCookieData = function (scope) {
+ Cookie.set(scope.options.cookieName, {
+ deviceId: scope.options.deviceId,
+ deviceIdCreatedAt: scope.deviceIdCreatedAt ? scope.deviceIdCreatedAt.getTime() : undefined,
+ userId: scope.options.userId,
+ superProps: scope.options.superProperties,
+ optOut: scope.options.optOut
+ });
+ };
+
+ Rakam._getUtmParam = function (name, query) {
+ name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
+ var regex = new RegExp('[\\?&]' + name + '=([^]*)');
+ var results = regex.exec(query);
+ return results === null ? undefined : decodeURIComponent(results[1].replace(/\+/g, ' '));
+ };
+
+ Rakam._getUtmData = function (rawCookie, query) {
+ // Translate the utmz cookie format into url query string format.
+ var cookie = rawCookie ? '?' + rawCookie.split('.').slice(-1)[0].replace(/\|/g, '&') : '';
+
+ var fetchParam = function (queryName, query, cookieName, cookie) {
+ return Rakam._getUtmParam(queryName, query) || Rakam._getUtmParam(cookieName, cookie);
+ };
+
+ return {
+ utm_source: fetchParam('utm_source', query, 'utmcsr', cookie),
+ utm_medium: fetchParam('utm_medium', query, 'utmcmd', cookie),
+ utm_campaign: fetchParam('utm_campaign', query, 'utmccn', cookie),
+ utm_term: fetchParam('utm_term', query, 'utmctr', cookie),
+ utm_content: fetchParam('utm_content', query, 'utmcct', cookie)
+ };
+ };
+ /**
+ * Parse the utm properties out of cookies and query for adding to user properties.
+ */
+
+
+ Rakam.prototype._initUtmData = function (queryParams, cookieParams) {
+ queryParams = queryParams || location.search;
+ cookieParams = cookieParams || Cookie.get('__utmz');
+ this._utmProperties = Rakam._getUtmData(cookieParams, queryParams);
+ };
+
+ Rakam.prototype._initTrackForms = function () {
+ var _this = this;
+
+ document.addEventListener('submit', function (event) {
+ var targetElement = event.target || event.srcElement;
+ var collection = targetElement.getAttribute('rakam-event-form');
+
+ if (targetElement.tagName === 'FORM' && collection) {
+ var properties = {};
+ var extraAttributes = targetElement.getAttribute('rakam-event-extra');
+
+ if (extraAttributes !== null) {
+ for (var key in JSON.parse(extraAttributes)) {
+ if (extraAttributes.hasOwnProperty(key)) {
+ properties[key] = extraAttributes[key];
+ }
+ }
+ }
+
+ for (var i = 0; i < targetElement.elements.length; i++) {
+ var element = targetElement.elements[i];
+ var type = element.getAttribute('rakam-event-attribute-type');
+ var formElemType;
+
+ if (element.hasAttribute('type')) {
+ formElemType = element.getAttribute('type').toLowerCase();
+ }
+
+ if (formElemType === 'password') {
+ continue;
+ }
+
+ if (type === null && element.tagName === 'INPUT' && formElemType === 'number') {
+ type = 'long';
+ }
+
+ if (element.hasAttribute('rakam-event-form-element-ignore')) {
+ continue;
+ }
+
+ var attribute;
+
+ if (element.hasAttribute('rakam-event-attribute')) {
+ attribute = element.getAttribute('rakam-event-attribute');
+ } else {
+ attribute = element.getAttribute('name');
+ }
+
+ if (element.hasAttribute('rakam-event-attribute-value')) {
+ properties[attribute] = transformValue(this, attribute, element.getAttribute('rakam-event-attribute-value'), type);
+ } else if (element.tagName === 'SELECT') {
+ properties[attribute] = transformValue(this, attribute, element.options[element.selectedIndex].value, type);
+ } else if (element.tagName === 'INPUT' || element.tagName === 'TEXTAREA') {
+ properties[attribute] = transformValue(this, attribute, element.value, type);
+ } else {
+ _this.log('Couldn\'t get value of form element: ' + attribute);
+ }
+ }
+
+ _this.logEvent(collection, properties);
+ }
+ });
+ };
+
+ Rakam.prototype._initTrackClicks = function () {
+ var _this = this;
+
+ document.addEventListener('click', function (event) {
+ var targetElement = event.target || event.srcElement;
+ var collection = targetElement.getAttribute('rakam-event-track');
+
+ if (targetElement.tagName === 'FORM' && collection) {
+ var properties = {};
+ var extraAttributes = targetElement.getAttribute('rakam-event-properties');
+
+ if (extraAttributes !== null) {
+ for (var key in JSON.parse(extraAttributes)) {
+ if (extraAttributes.hasOwnProperty(key)) {
+ properties[key] = extraAttributes[key];
+ }
+ }
+ }
+
+ _this.logEvent(collection, properties);
+ }
+ });
+ };
+
+ Rakam.prototype.saveEvents = function () {
+ try {
+ localStorage$1.setItem(this.options.unsentKey, JSON.stringify(this._unsentEvents));
+ } catch (e) {
+ this.log(e);
+ }
+ };
+
+ Rakam.prototype.setDomain = function (domain) {
+ try {
+ Cookie.options({
+ domain: domain
+ });
+ this.options.domain = Cookie.options().domain;
+
+ _loadCookieData(this);
+
+ _saveCookieData(this);
+
+ this.log('set domain=' + domain);
+ } catch (e) {
+ this.log(e);
+ }
+ };
+
+ Rakam.prototype.setUserId = function (userId) {
+ try {
+ var previousId = this.options.deviceId;
+ this.options.userId = userId !== undefined && userId !== null && '' + userId || null;
+
+ if (userId !== null && userId !== '' && userId !== undefined && (this._eventId > 0 && (previousId === null || previousId === undefined) || previousId !== null && previousId !== undefined)) {
+ var _this = this;
+
+ this.User()._merge(previousId, this.deviceIdCreatedAt, function () {
+ _this.deviceIdCreatedAt = null;
+
+ _saveCookieData(_this);
+ });
+ }
+
+ _saveCookieData(this);
+
+ this.log('set userId=' + userId);
+ } catch (e) {
+ this.log(e);
+ }
+ };
+
+ Rakam.prototype.setUserProperties = function (parameters) {
+ try {
+ return new this.User().set(parameters);
+ } catch (e) {
+ this.log(e);
+ }
+ };
+
+ Rakam.prototype.getUserId = function () {
+ return this.options.userId;
+ };
+
+ Rakam.prototype.getDeviceId = function () {
+ return this._eventId > 0 ? this.options.deviceId : null;
+ };
+
+ Rakam.prototype.setOptOut = function (enable) {
+ try {
+ this.options.optOut = enable;
+
+ _saveCookieData(this);
+
+ this.log('set optOut=' + enable);
+ } catch (e) {
+ this.log(e);
+ }
+ };
+
+ Rakam.prototype.setDeviceId = function (deviceId) {
+ try {
+ if (deviceId) {
+ this.options.deviceId = '' + deviceId;
+
+ _saveCookieData(this);
+ }
+ } catch (e) {
+ this.log(e);
+ }
+ };
+
+ Rakam.prototype.setSuperProperties = function (eventProps, opt_replace) {
+ try {
+ this.options.superProperties = this.options.superProperties || {};
+
+ for (var property in eventProps) {
+ if (eventProps.hasOwnProperty(property)) {
+ if (opt_replace === false && this.options.superProperties[property] !== undefined) {
+ continue;
+ }
+
+ this.options.superProperties[property] = eventProps[property];
+ }
+ }
+
+ _saveCookieData(this);
+
+ this.log('set super properties=' + JSON.stringify(eventProps));
+ } catch (e) {
+ this.log(e);
+ }
+ };
+
+ Rakam.prototype.setVersionName = function (versionName) {
+ try {
+ this.options.versionName = versionName;
+ this.log('set versionName=' + versionName);
+ } catch (e) {
+ this.log(e);
+ }
+ };
+ /**
+ * Private logEvent method. Keeps apiProperties from being publicly exposed.
+ */
+
+
+ Rakam.prototype._logEvent = function (eventType, eventProperties, apiProperties, callback) {
+ if (typeof callback !== 'function') {
+ callback = null;
+ }
+
+ if (!eventType || this.options.optOut) {
+ if (callback) {
+ callback(0, 'No request sent');
+ }
+
+ return;
+ }
+
+ try {
+ var eventTime = new Date().getTime();
+ var eventId = this.nextEventId();
+
+ if (!this._sessionId || !this._lastEventTime || eventTime - this._lastEventTime > this.options.sessionTimeout) {
+ this._sessionId = eventTime;
+ setSessionItem(this.options, StorageKeys.SESSION_ID, this._sessionId);
+ }
+
+ this._lastEventTime = eventTime;
+ setSessionItem(this.options, StorageKeys.LAST_EVENT_TIME, this._lastEventTime);
+ setSessionItem(this.options, StorageKeys.LAST_ID, eventId);
+ apiProperties = apiProperties || {};
+ eventProperties = eventProperties || {}; // Add the utm properties, if any, onto the event properties.
+
+ merge(eventProperties, this._utmProperties);
+ var event = {
+ collection: eventType,
+ properties: {
+ _device_id: this.options.deviceId,
+ _user: this.options.userId,
+ // use seconds
+ _time: parseInt(eventTime / 1000) * 1000,
+ _session_id: this._sessionId || -1,
+ _platform: this.options.platform,
+ _language: this.options.language
+ }
+ };
+ merge(event.properties, this.options.superProperties);
+ merge(event.properties, apiProperties);
+ merge(event.properties, eventProperties);
+ this.log('logged eventType=' + eventType + ', properties=' + JSON.stringify(eventProperties));
+
+ this._unsentEvents.push({
+ id: eventId,
+ event: event
+ }); // Remove old events from the beginning of the array if too many
+ // have accumulated. Don't want to kill memory. Default is 1000 events.
+
+
+ if (this._unsentEvents.length > this.options.savedMaxCount) {
+ this._unsentEvents.splice(0, this._unsentEvents.length - this.options.savedMaxCount);
+ }
+
+ if (this.options.saveEvents) {
+ this.saveEvents();
+ }
+
+ if (!this._sendEventsIfReady(callback) && callback) {
+ callback(0, 'No request sent');
+ }
+
+ return eventId;
+ } catch (e) {
+ this.log(e);
+ }
+ };
+
+ Rakam.prototype.logEvent = function (eventType, eventProperties, callback) {
+ return this._logEvent(eventType, eventProperties, null, callback);
+ };
+ /**
+ * Remove events in storage with event ids up to and including maxEventId. Does
+ * a true filter in case events get out of order or old events are removed.
+ */
+
+
+ Rakam.prototype.removeEvents = function (maxEventId, errors) {
+ var filteredEvents = [];
+ var errorList = errors || [];
+
+ for (var i = 0; i < this._unsentEvents.length; i++) {
+ var id = this._unsentEvents[i].id;
+
+ if (errorList.indexOf(id) > -1 || id > maxEventId) {
+ filteredEvents.push(this._unsentEvents[i]);
+ }
+ }
+
+ this._unsentEvents = filteredEvents;
+ };
+
+ Rakam.prototype.sendEvents = function (callback) {
+ var _this = this;
+
+ if (!this._sending && !this.options.optOut && this._unsentEvents.length > 0) {
+ this._sending = true;
+ var url = ('https:' === window.location.protocol ? 'https' : 'http') + '://' + this.options.apiEndpoint + this.options.eventEndpointPath; // Determine how many events to send and track the maximum event id sent in this batch.
+
+ var numEvents = Math.min(this._unsentEvents.length, this.options.uploadBatchSize);
+ var maxEventId = this._unsentEvents[numEvents - 1].id;
+
+ this._unsentEvents.slice(0, numEvents);
+
+ var events = this._unsentEvents.slice(0, numEvents).map(function (e) {
+ return e.event;
+ });
+
+ var upload_time = new Date().getTime();
+ var api = {
+ 'upload_time': upload_time,
+ 'api_version': API_VERSION$1,
+ 'api_key': this.options.apiKey //"checksum": md5(API_VERSION + JSON.stringify(events) + upload_time).toUpperCase()
+
+ };
+ var scope = this;
+ new Request(url, {
+ api: api,
+ events: events
+ }).send(function (status, response, headers) {
+ scope._sending = false;
+
+ try {
+ if (status === 200 || status === 409) {
+ _this.log('successful upload');
+
+ scope.removeEvents(maxEventId, status === 409 ? JSON.parse(response) : null); // Update the event cache after the removal of sent events.
+
+ if (scope.options.saveEvents) {
+ scope.saveEvents();
+ } // Send more events if any queued during previous send.
+
+
+ if (!scope._sendEventsIfReady(callback) && callback) {
+ callback(status, response);
+ }
+ } else if (status === 413) {
+ _this.log('request too large'); // Can't even get this one massive event through. Drop it.
+
+
+ if (scope.options.uploadBatchSize === 1) {
+ scope.removeEvents(maxEventId);
+ } // The server complained about the length of the request.
+ // Backoff and try again.
+
+
+ scope.options.uploadBatchSize = Math.ceil(numEvents / 2);
+ scope.sendEvents(callback);
+ } else if (callback) {
+ // If server turns something like a 400
+ callback(status, response);
+ }
+ } catch (e) {
+ _this.log('failed upload');
+ }
+
+ if (scope.options.eventCallbacks) {
+ try {
+ for (var i = 0; i < scope.options.eventCallbacks.length; i++) {
+ scope.options.eventCallbacks[i](status, response, headers);
+ }
+ } catch (e) {
+ _this.log('callback throws an exception', e);
+ }
+ }
+ });
+ } else if (callback) {
+ callback(0, 'No request sent');
+ }
+ };
+
+ Rakam.prototype.onload = function (callback) {
+ var _this = this;
+
+ setTimeout(function () {
+ callback();
+
+ _this.log('executed callback', callback);
+ }, 1);
+ };
+
+ Rakam.prototype.runQueuedFunctions = function () {
+ for (var i = 0; i < this._q.length; i++) {
+ var fn = this[this._q[i][0]];
+
+ if (fn && type(fn) === 'function') {
+ fn.apply(this, this._q[i].slice(1));
+ }
+ }
+
+ this._q = []; // clear function queue after running
+ };
+
+ Rakam.prototype.__VERSION__ = version;
+
+ /* jshint expr:true */
+ var old = window.rakam || {};
+ var instance = new Rakam();
+ instance._q = old._q || []; // export the instance
+
+ return instance;
+
+}());
diff --git a/rakam.min.js b/rakam.min.js
index e69de29..e6b675d 100644
--- a/rakam.min.js
+++ b/rakam.min.js
@@ -0,0 +1 @@
+var rakam=function(o,i){"use strict";o=o&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o,i=i&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i;function r(t){var e="";return s.domain&&(e="."===s.domain.charAt(0)?s.domain.substring(1):s.domain),t+e}var t,l=function(t){for(var e="",n=0;n>6|192):(e+=String.fromCharCode(i>>12|224),e+=String.fromCharCode(i>>6&63|128)),e+=String.fromCharCode(63&i|128))}return e},p=function(t){for(var e,n,i="",o=0,s=0;o>2,s=(3&e)<<4|(n=t.charCodeAt(p++))>>4,r=(15&n)<<2|(i=t.charCodeAt(p++))>>6,a=63&i,isNaN(n)?r=a=64:isNaN(i)&&(a=64),u=u+d._keyStr.charAt(o)+d._keyStr.charAt(s)+d._keyStr.charAt(r)+d._keyStr.charAt(a);return u},decode:function(t){try{if(window.btoa&&window.atob)return decodeURIComponent(escape(window.atob(t)))}catch(t){}return d._decode(t)},_decode:function(t){var e,n,i,o,s,r,a="",u=0;for(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");u>4,n=(15&o)<<4|(s=d._keyStr.indexOf(t.charAt(u++)))>>2,i=(3&s)<<6|(r=d._keyStr.indexOf(t.charAt(u++))),a+=String.fromCharCode(e),64!==s&&(a+=String.fromCharCode(n)),64!==r&&(a+=String.fromCharCode(i));return a=p(a)}},s={expirationDays:void 0,domain:void 0},a=function(t){try{for(var e=r(t)+"=",n=document.cookie.split(";"),i=null,o=0;o>t/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,E)},I=Object.prototype.toString;function b(t){switch(I.call(t)){case"[object Date]":return"date";case"[object RegExp]":return"regexp";case"[object Arguments]":return"arguments";case"[object Array]":return"array";case"[object Error]":return"error"}return null===t?"null":void 0===t?"undefined":t!=t?"nan":t&&1===t.nodeType?"element":"undefined"!=typeof Buffer&&Buffer.isBuffer(t)?"buffer":typeof(t=t.valueOf?t.valueOf():Object.prototype.valueOf.apply(t))}function w(t,e,i){return function(t,e,n){void 0!==i&&i(t,e,n)}}function k(t){return("https:"===window.location.protocol?"https":"http")+"://"+t.apiEndpoint+"/user"}function T(){}T.prototype.init=function(t){this.options=t},T.prototype.set=function(t,e){return new y(k(this.options)+"/set_properties",{api:{api_version:1,api_key:this.options.apiKey},id:this.options.userId,properties:t}).send(w(0,0,e)),this},T.prototype._merge=function(t,e,n){return new y(k(this.options)+"/merge",{api:{api_version:1,api_key:this.options.apiKey,upload_time:(new Date).getTime()},anonymous_id:t,id:this.options.userId,created_at:e?e.getTime():null,merged_at:(new Date).getTime()}).send(w(0,0,n)),this},T.prototype.setOnce=function(t,e){return new y(k(this.options)+"/set_properties_once",{api:{api_version:1,api_key:this.options.apiKey},id:this.options.userId,properties:t}).send(w(0,0,e)),this},T.prototype.increment=function(t,e,n){return new y(k(this.options)+"/increment_property",{api:{api_version:1,api_key:this.options.apiKey},id:this.options.userId,property:t,value:e}).send(w(0,0,n)),this};function S(t,e){return t.useLocalStorageForSessionization?g.getItem(e):c.get(e)}function C(t,e,n){t.useLocalStorageForSessionization?g.setItem(e,n):c.set(e,n)}function A(){this._unsentEvents=[],this.options=_({},O)}var O={apiEndpoint:"app.rakam.io",eventEndpointPath:"/event/batch",cookieExpiration:3650,cookieName:"rakam_id",domain:void 0,includeUtm:!(T.prototype.unset=function(t,e){return new y(k(this.options)+"/unset_properties",{api:{api_version:1,api_key:this.options.apiKey},id:this.options.userId,properties:"array"===b(t)?t:[t]}).send(w(0,0,e)),this}),trackForms:!1,language:e.language,optOut:!1,platform:"Web",savedMaxCount:1e3,saveEvents:!0,sessionTimeout:18e5,unsentKey:"rakam_unsent",uploadBatchSize:100,batchEvents:!1,eventUploadThreshold:30,eventUploadPeriodMillis:3e4,useLocalStorageForSessionization:!0},P="rakam_lastEventId",N="rakam_lastEventTime",U="rakam_sessionId",x="rakam_returning";A.prototype._eventId=0,A.prototype._returningUser=!1,A.prototype._sending=!1,A.prototype._lastEventTime=null,A.prototype._sessionId=null,A.prototype._newSession=!1,A.prototype.log=function(t){!0===this.options.debug&&console.log("[Rakam] "+t)},A.prototype.init=function(t,e,n,i){try{if(!t)throw new Error("apiKey is null");this.options.apiKey=t;var o=new T;if(o.init(this.options),this.User=function(){return o},n&&(this.options.apiEndpoint=n.apiEndpoint||this.options.apiEndpoint,this.options.debug=n.debug||!0===this.options.debug,void 0!==n.saveEvents&&(this.options.saveEvents=!!n.saveEvents),void 0!==n.domain&&(this.options.domain=n.domain),void 0!==n.includeUtm&&(this.options.includeUtm=!!n.includeUtm),void 0!==n.trackClicks&&(this.options.trackClicks=!!n.trackClicks),void 0!==n.trackForms&&(this.options.trackForms=!!n.trackForms),void 0!==n.batchEvents&&(this.options.batchEvents=!!n.batchEvents),this.options.platform=n.platform||this.options.platform,this.options.useLocalStorageForSessionization=n.useLocalStorageForSessionization||this.options.useLocalStorageForSessionization,this.options.language=n.language||this.options.language,this.options.sessionTimeout=n.sessionTimeout||this.options.sessionTimeout,this.options.uploadBatchSize=n.uploadBatchSize||this.options.uploadBatchSize,this.options.eventUploadThreshold=n.eventUploadThreshold||this.options.eventUploadThreshold,this.options.savedMaxCount=n.savedMaxCount||this.options.savedMaxCount,this.options.eventUploadPeriodMillis=n.eventUploadPeriodMillis||this.options.eventUploadPeriodMillis,this.options.superProperties=n.superProperties||[]),c.options({expirationDays:this.options.cookieExpiration,domain:this.options.domain}),this.options.domain=c.options().domain,q(this),n&&void 0!==n.deviceId&&null!==n.deviceId&&n.deviceId||this.options.deviceId?this.options.deviceId=this.options.deviceId:(this.deviceIdCreatedAt=new Date,this.options.deviceId=E()),L(this),this.log("initialized with apiKey="+t),this.options.saveEvents){var s=g.getItem(this.options.unsentKey);if(s)try{this._unsentEvents=JSON.parse(s)}catch(t){this.log(t)}}this._sendEventsIfReady(),this.options.includeUtm&&this._initUtmData(),this.options.trackForms&&this._initTrackForms(),this.options.trackClicks&&this._initTrackClicks(),this._lastEventTime=parseInt(S(this.options,N))||null,this._sessionId=parseInt(S(this.options,U))||null,this._eventId=g.getItem(P)||0;var r=(new Date).getTime();!this._sessionId||!this._lastEventTime||r-this._lastEventTime>this.options.sessionTimeout?(null!==this._sessionId&&(C(this.options,x,!0),this._returningUser=!0),this._sessionId=r,c.remove("_rakam_time"),C(this.options,U,this._sessionId)):this._returningUser="true"===S(this.options,x),this._lastEventTime=r,C(this.options,N,this._lastEventTime)}catch(t){this.log(t)}this.setUserId(e),i&&"function"==typeof i&&setTimeout(function(){i()},1)},A.prototype.onEvent=function(t){this.options.eventCallbacks=this.options.eventCallbacks||[],this.options.eventCallbacks.push(t)};function D(t,e,n,i){return null!==i&&(i=i.toLowerCase()),"long"===i||"time"===i||"timestamp"===i||"date"===i?(n=parseInt(n),!isNaN(n)&&isFinite(n)||(t.log("ignoring "+e+": the value must be a number"),n=null)):"double"===i?(n=parseFloat(n),!isNaN(n)&&isFinite(n)||(t.log("ignoring "+e+": the value is not double"),n=null)):"boolean"===i&&(n="true"===i||"1"===i||"false"!==i&&"0"!==i&&(t.log("ignoring "+e+": the value is not boolean"),null)),n}A.prototype.logInlinedEvent=function(t,e,n){for(var i=e||{},o=function(t){if(document.querySelectorAll)return document.querySelectorAll("[rakam-event-attribute]");for(var e=[],n=document.getElementsByTagName("*"),i=0,o=n.length;i=this.options.eventUploadThreshold?(this.sendEvents(t),!0):(setTimeout(this.sendEvents.bind(this),this.options.eventUploadPeriodMillis),!1))};var q=function(t){var e=c.get(t.options.cookieName);e&&(e.deviceId&&(t.options.deviceId=e.deviceId),e.userId&&(t.options.userId=e.userId),e.superProps&&(t.options.superProperties=e.superProps),void 0!==e.optOut&&(t.options.optOut=e.optOut),void 0!==e.deviceIdCreatedAt&&(t.deviceIdCreatedAt=new Date(parseInt(e.deviceIdCreatedAt))))},L=function(t){c.set(t.options.cookieName,{deviceId:t.options.deviceId,deviceIdCreatedAt:t.deviceIdCreatedAt?t.deviceIdCreatedAt.getTime():void 0,userId:t.options.userId,superProps:t.options.superProperties,optOut:t.options.optOut})};A._getUtmParam=function(t,e){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var n=new RegExp("[\\?&]"+t+"=([^]*)").exec(e);return null===n?void 0:decodeURIComponent(n[1].replace(/\+/g," "))},A._getUtmData=function(t,e){function n(t,e,n,i){return A._getUtmParam(t,e)||A._getUtmParam(n,i)}var i=t?"?"+t.split(".").slice(-1)[0].replace(/\|/g,"&"):"";return{utm_source:n("utm_source",e,"utmcsr",i),utm_medium:n("utm_medium",e,"utmcmd",i),utm_campaign:n("utm_campaign",e,"utmccn",i),utm_term:n("utm_term",e,"utmctr",i),utm_content:n("utm_content",e,"utmcct",i)}},A.prototype._initUtmData=function(t,e){t=t||location.search,e=e||c.get("__utmz"),this._utmProperties=A._getUtmData(e,t)},A.prototype._initTrackForms=function(){var d=this;document.addEventListener("submit",function(t){var e=t.target||t.srcElement,n=e.getAttribute("rakam-event-form");if("FORM"===e.tagName&&n){var i={},o=e.getAttribute("rakam-event-extra");if(null!==o)for(var s in JSON.parse(o))o.hasOwnProperty(s)&&(i[s]=o[s]);for(var r=0;rthis.options.sessionTimeout)||(this._sessionId=o,C(this.options,U,this._sessionId)),this._lastEventTime=o,C(this.options,N,this._lastEventTime),C(this.options,P,s),n=n||{},_(e=e||{},this._utmProperties);var r={collection:t,properties:{_device_id:this.options.deviceId,_user:this.options.userId,_time:1e3*parseInt(o/1e3),_session_id:this._sessionId||-1,_platform:this.options.platform,_language:this.options.language}};return _(r.properties,this.options.superProperties),_(r.properties,n),_(r.properties,e),this.log("logged eventType="+t+", properties="+JSON.stringify(e)),this._unsentEvents.push({id:s,event:r}),this._unsentEvents.length>this.options.savedMaxCount&&this._unsentEvents.splice(0,this._unsentEvents.length-this.options.savedMaxCount),this.options.saveEvents&&this.saveEvents(),!this._sendEventsIfReady(i)&&i&&i(0,"No request sent"),s}catch(t){this.log(t)}else i&&i(0,"No request sent")},A.prototype.logEvent=function(t,e,n){return this._logEvent(t,e,null,n)},A.prototype.removeEvents=function(t,e){for(var n=[],i=e||[],o=0;o 127 && c < 2048) {
+ utftext += String.fromCharCode(c >> 6 | 192);
+ utftext += String.fromCharCode(c & 63 | 128);
+ } else {
+ utftext += String.fromCharCode(c >> 12 | 224);
+ utftext += String.fromCharCode(c >> 6 & 63 | 128);
+ utftext += String.fromCharCode(c & 63 | 128);
+ }
+ }
+
+ return utftext;
+ },
+ decode: function (utftext) {
+ var s = '';
+ var i = 0;
+ var c = 0,
+ c1 = 0,
+ c2 = 0;
+
+ while (i < utftext.length) {
+ c = utftext.charCodeAt(i);
+
+ if (c < 128) {
+ s += String.fromCharCode(c);
+ i++;
+ } else if (c > 191 && c < 224) {
+ c1 = utftext.charCodeAt(i + 1);
+ s += String.fromCharCode((c & 31) << 6 | c1 & 63);
+ i += 2;
+ } else {
+ c1 = utftext.charCodeAt(i + 1);
+ c2 = utftext.charCodeAt(i + 2);
+ s += String.fromCharCode((c & 15) << 12 | (c1 & 63) << 6 | c2 & 63);
+ i += 3;
+ }
+ }
+
+ return s;
+ }
+ };
+
+ /* jshint bitwise: false */
+ /*
+ * Base64 encoder/decoder
+ * http://www.webtoolkit.info/
+ */
+
+ var Base64 = {
+ _keyStr: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=',
+ encode: function (input) {
+ try {
+ if (window.btoa && window.atob) {
+ return window.btoa(unescape(encodeURIComponent(input)));
+ }
+ } catch (e) {//log(e);
+ }
+
+ return Base64._encode(input);
+ },
+ _encode: function (input) {
+ var output = '';
+ var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
+ var i = 0;
+ input = UTF8.encode(input);
+
+ while (i < input.length) {
+ chr1 = input.charCodeAt(i++);
+ chr2 = input.charCodeAt(i++);
+ chr3 = input.charCodeAt(i++);
+ enc1 = chr1 >> 2;
+ enc2 = (chr1 & 3) << 4 | chr2 >> 4;
+ enc3 = (chr2 & 15) << 2 | chr3 >> 6;
+ enc4 = chr3 & 63;
+
+ if (isNaN(chr2)) {
+ enc3 = enc4 = 64;
+ } else if (isNaN(chr3)) {
+ enc4 = 64;
+ }
+
+ output = output + Base64._keyStr.charAt(enc1) + Base64._keyStr.charAt(enc2) + Base64._keyStr.charAt(enc3) + Base64._keyStr.charAt(enc4);
+ }
+
+ return output;
+ },
+ decode: function (input) {
+ try {
+ if (window.btoa && window.atob) {
+ return decodeURIComponent(escape(window.atob(input)));
+ }
+ } catch (e) {//log(e);
+ }
+
+ return Base64._decode(input);
+ },
+ _decode: function (input) {
+ var output = '';
+ var chr1, chr2, chr3;
+ var enc1, enc2, enc3, enc4;
+ var i = 0;
+ input = input.replace(/[^A-Za-z0-9\+\/\=]/g, '');
+
+ while (i < input.length) {
+ enc1 = Base64._keyStr.indexOf(input.charAt(i++));
+ enc2 = Base64._keyStr.indexOf(input.charAt(i++));
+ enc3 = Base64._keyStr.indexOf(input.charAt(i++));
+ enc4 = Base64._keyStr.indexOf(input.charAt(i++));
+ chr1 = enc1 << 2 | enc2 >> 4;
+ chr2 = (enc2 & 15) << 4 | enc3 >> 2;
+ chr3 = (enc3 & 3) << 6 | enc4;
+ output = output + String.fromCharCode(chr1);
+
+ if (enc3 !== 64) {
+ output = output + String.fromCharCode(chr2);
+ }
+
+ if (enc4 !== 64) {
+ output = output + String.fromCharCode(chr3);
+ }
+ }
+
+ output = UTF8.decode(output);
+ return output;
+ }
+ };
+
+ /*
+ * Cookie data
+ */
+
+ var _options = {
+ expirationDays: undefined,
+ domain: undefined
+ };
+
+ var reset = function () {
+ _options = {};
+ };
+
+ var options = function (opts) {
+ if (arguments.length === 0) {
+ return _options;
+ }
+
+ opts = opts || {};
+ _options.expirationDays = opts.expirationDays;
+ var domain = opts.domain !== undefined ? opts.domain : '.';
+ var token = Math.random();
+ _options.domain = domain;
+ set('rakam_test', token);
+ var stored = get('rakam_test');
+
+ if (!stored || stored !== token) {
+ domain = null;
+ }
+
+ remove('rakam_test');
+ _options.domain = domain;
+ };
+
+ var _domainSpecific = function (name) {
+ // differentiate between cookies on different domains
+ var suffix = '';
+
+ if (_options.domain) {
+ suffix = _options.domain.charAt(0) === '.' ? _options.domain.substring(1) : _options.domain;
+ }
+
+ return name + suffix;
+ };
+
+ var get = function (name) {
+ try {
+ var nameEq = _domainSpecific(name) + '=';
+ var ca = document.cookie.split(';');
+ var value = null;
+
+ for (var i = 0; i < ca.length; i++) {
+ var c = ca[i];
+
+ while (c.charAt(0) === ' ') {
+ c = c.substring(1, c.length);
+ }
+
+ if (c.indexOf(nameEq) === 0) {
+ value = c.substring(nameEq.length, c.length);
+ break;
+ }
+ }
+
+ if (value) {
+ return JSON.parse(Base64.decode(value));
+ }
+
+ return null;
+ } catch (e) {
+ return null;
+ }
+ };
+
+ var set = function (name, value) {
+ try {
+ _set(_domainSpecific(name), Base64.encode(JSON.stringify(value)), _options);
+
+ return true;
+ } catch (e) {
+ return false;
+ }
+ };
+
+ var _set = function (name, value, opts) {
+ var expires = value !== null ? opts.expirationDays : -1;
+
+ if (expires) {
+ var date = new Date();
+ date.setTime(date.getTime() + expires * 24 * 60 * 60 * 1000);
+ expires = date;
+ }
+
+ var str = name + '=' + value;
+
+ if (expires) {
+ str += '; expires=' + expires.toUTCString();
+ }
+
+ str += '; path=/';
+
+ if (opts.domain) {
+ str += '; domain=' + opts.domain;
+ }
+
+ document.cookie = str;
+ };
+
+ var remove = function (name) {
+ try {
+ _set(_domainSpecific(name), null, _options);
+
+ return true;
+ } catch (e) {
+ return false;
+ }
+ };
+
+ var Cookie = {
+ reset: reset,
+ options: options,
+ get: get,
+ set: set,
+ remove: remove
+ };
+
+ var getLanguage = function () {
+ return navigator && (navigator.languages && navigator.languages[0] || navigator.language || navigator.userLanguage) || undefined;
+ };
+
+ var language = {
+ language: getLanguage()
+ };
+
+ /* jshint -W020, unused: false, noempty: false, boss: true */
+
+ /*
+ * Implement localStorage to support Firefox 2-3 and IE 5-7
+ */
+ var localStorage; // jshint ignore:line
+ // test that Window.localStorage is available and works
+
+ function windowLocalStorageAvailable() {
+ var uid = new Date();
+ var result;
+
+ try {
+ window.localStorage.setItem(uid, uid);
+ result = window.localStorage.getItem(uid) === String(uid);
+ window.localStorage.removeItem(uid);
+ return result;
+ } catch (e) {// localStorage not available
+ }
+
+ return false;
+ }
+
+ if (windowLocalStorageAvailable()) {
+ localStorage = window.localStorage;
+ } else if (window.globalStorage) {
+ // Firefox 2-3 use globalStorage
+ // See https://developer.mozilla.org/en/dom/storage#globalStorage
+ try {
+ localStorage = window.globalStorage[window.location.hostname];
+ } catch (e) {// Something bad happened...
+ }
+ } else {
+ // IE 5-7 use userData
+ // See http://msdn.microsoft.com/en-us/library/ms531424(v=vs.85).aspx
+ var div = document.createElement('div'),
+ attrKey = 'localStorage';
+ div.style.display = 'none';
+ document.getElementsByTagName('head')[0].appendChild(div);
+
+ if (div.addBehavior) {
+ div.addBehavior('#default#userdata');
+ localStorage = {
+ length: 0,
+ setItem: function (k, v) {
+ div.load(attrKey);
+
+ if (!div.getAttribute(k)) {
+ this.length++;
+ }
+
+ div.setAttribute(k, v);
+ div.save(attrKey);
+ },
+ getItem: function (k) {
+ div.load(attrKey);
+ return div.getAttribute(k);
+ },
+ removeItem: function (k) {
+ div.load(attrKey);
+
+ if (div.getAttribute(k)) {
+ this.length--;
+ }
+
+ div.removeAttribute(k);
+ div.save(attrKey);
+ },
+ clear: function () {
+ div.load(attrKey);
+ var i = 0;
+ var attr;
+
+ while (attr = div.XMLDocument.documentElement.attributes[i++]) {
+ div.removeAttribute(attr.name);
+ }
+
+ div.save(attrKey);
+ this.length = 0;
+ },
+ key: function (k) {
+ div.load(attrKey);
+ return div.XMLDocument.documentElement.attributes[k];
+ }
+ };
+ div.load(attrKey);
+ localStorage.length = div.XMLDocument.documentElement.attributes.length;
+ }
+ }
+
+ if (!localStorage) {
+ localStorage = {
+ length: 0,
+ setItem: function (k, v) {},
+ getItem: function (k) {},
+ removeItem: function (k) {},
+ clear: function () {},
+ key: function (k) {}
+ };
+ }
+
+ var localStorage$1 = localStorage;
+
+ var object = {};
+ var has = object.hasOwnProperty;
+ function merge(a, b) {
+ for (var key in b) {
+ if (has.call(b, key)) {
+ a[key] = b[key];
+ }
+ }
+
+ return a;
+ }
+
+ /*
+ * Simple AJAX request object
+ */
+ var Request = function (url, data, headers) {
+ this.url = url;
+ this.data = data || {};
+ this.headers = headers || {};
+ };
+
+ function parseResponseHeaders(headerStr) {
+ var headers = {};
+
+ if (!headerStr) {
+ return headers;
+ }
+
+ var headerPairs = headerStr.split('\u000d\u000a');
+
+ for (var i = 0; i < headerPairs.length; i++) {
+ var headerPair = headerPairs[i]; // Can't use split() here because it does the wrong thing
+ // if the header value has the string ": " in it.
+
+ var index = headerPair.indexOf('\u003a\u0020');
+
+ if (index > 0) {
+ var key = headerPair.substring(0, index);
+ var val = headerPair.substring(index + 2);
+ headers[key] = val;
+ }
+ }
+
+ return headers;
+ }
+
+ Request.prototype.send = function (callback) {
+ var isIE = window.XDomainRequest ? true : false;
+
+ if (isIE) {
+ var xdr = new window.XDomainRequest();
+ xdr.open('POST', this.url, true);
+
+ xdr.onload = function () {
+ callback(xdr.responseText);
+ };
+
+ xdr.send(JSON.stringify(this.data));
+ } else {
+ var xhr = new XMLHttpRequest();
+ xhr.withCredentials = "true";
+ xhr.open('POST', this.url, true);
+
+ xhr.onreadystatechange = function () {
+ if (xhr.readyState === 4) {
+ callback(xhr.status, xhr.responseText, parseResponseHeaders(xhr.getAllResponseHeaders()));
+ }
+ };
+
+ xhr.setRequestHeader('Content-Type', 'text/plain');
+
+ for (var key in this.headers) {
+ if (this.headers.hasOwnProperty(key)) {
+ xhr.setRequestHeader(key, this.headers[key]);
+ }
+ }
+
+ xhr.send(JSON.stringify(this.data));
+ }
+ };
+
+ /* jshint bitwise: false, laxbreak: true */
+
+ /**
+ * Taken straight from jed's gist: https://gist.github.com/982883
+ *
+ * Returns a random v4 UUID of the form xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx,
+ * where each x is replaced with a random hexadecimal digit from 0 to f, and
+ * y is replaced with a random hexadecimal digit from 8 to b.
+ */
+ var uuid = function (a) {
+ return a // if the placeholder was passed, return
+ ? ( // a random number from 0 to 15
+ a ^ // unless b is 8,
+ Math.random() // in which case
+ * 16 // a random number from
+ >> a / 4 // 8 to 11
+ ).toString(16) // in hexadecimal
+ : ( // or otherwise a concatenated string:
+ [1e7] + // 10000000 +
+ -1e3 + // -1000 +
+ -4e3 + // -4000 +
+ -8e3 + // -80000000 +
+ -1e11 // -100000000000,
+ ).replace( // replacing
+ /[018]/g, // zeroes, ones, and eights with
+ uuid // random hex digits
+ );
+ };
+
+ var version = '2.6.0';
+
+ /* Taken from: https://github.com/component/type */
+
+ /**
+ * toString ref.
+ */
+ var toString = Object.prototype.toString;
+ /**
+ * Return the type of `val`.
+ *
+ * @param {Mixed} val
+ * @return {String}
+ * @api public
+ */
+
+ function type (val) {
+ switch (toString.call(val)) {
+ case '[object Date]':
+ return 'date';
+
+ case '[object RegExp]':
+ return 'regexp';
+
+ case '[object Arguments]':
+ return 'arguments';
+
+ case '[object Array]':
+ return 'array';
+
+ case '[object Error]':
+ return 'error';
+ }
+
+ if (val === null) {
+ return 'null';
+ }
+
+ if (val === undefined) {
+ return 'undefined';
+ }
+
+ if (val !== val) {
+ return 'nan';
+ }
+
+ if (val && val.nodeType === 1) {
+ return 'element';
+ }
+
+ if (typeof Buffer !== 'undefined' && Buffer.isBuffer(val)) {
+ return 'buffer';
+ }
+
+ val = val.valueOf ? val.valueOf() : Object.prototype.valueOf.apply(val);
+ return typeof val;
+ }
+
+ /*
+ * Wrapper for a user properties JSON object that supports operations.
+ * Note: if a user property is used in multiple operations on the same User object,
+ * only the first operation will be saved, and the rest will be ignored.
+ */
+
+ var API_VERSION = 1;
+
+ var wrapCallback = function (operation, props, callback) {
+ return function (status, response, headers) {
+ if (callback !== undefined) {
+ callback(status, response, headers);
+ }
+ };
+ };
+
+ var getUrl = function (options) {
+ return ('https:' === window.location.protocol ? 'https' : 'http') + '://' + options.apiEndpoint + "/user";
+ };
+
+ var User = function () {};
+
+ User.prototype.init = function (options) {
+ this.options = options;
+ };
+
+ User.prototype.set = function (properties, callback) {
+ new Request(getUrl(this.options) + "/set_properties", {
+ api: {
+ "api_version": API_VERSION,
+ "api_key": this.options.apiKey
+ },
+ id: this.options.userId,
+ properties: properties
+ }).send(wrapCallback("set_properties", properties, callback));
+ return this;
+ };
+
+ User.prototype._merge = function (deviceId, createdAt, callback) {
+ new Request(getUrl(this.options) + "/merge", {
+ api: {
+ "api_version": API_VERSION,
+ "api_key": this.options.apiKey,
+ "upload_time": new Date().getTime()
+ },
+ anonymous_id: deviceId,
+ id: this.options.userId,
+ created_at: createdAt ? createdAt.getTime() : null,
+ merged_at: new Date().getTime()
+ }).send(wrapCallback("merge", null, callback));
+ return this;
+ };
+
+ User.prototype.setOnce = function (properties, callback) {
+ new Request(getUrl(this.options) + "/set_properties_once", {
+ api: {
+ "api_version": API_VERSION,
+ "api_key": this.options.apiKey
+ },
+ id: this.options.userId,
+ properties: properties
+ }).send(wrapCallback("set_properties_once", properties, callback));
+ return this;
+ };
+
+ User.prototype.increment = function (property, value, callback) {
+ new Request(getUrl(this.options) + "/increment_property", {
+ api: {
+ "api_version": API_VERSION,
+ "api_key": this.options.apiKey
+ },
+ id: this.options.userId,
+ property: property,
+ value: value
+ }).send(wrapCallback("increment_property", property + " by " + value, callback));
+ return this;
+ };
+
+ User.prototype.unset = function (properties, callback) {
+ new Request(getUrl(this.options) + "/unset_properties", {
+ api: {
+ "api_version": API_VERSION,
+ "api_key": this.options.apiKey
+ },
+ id: this.options.userId,
+ properties: type(properties) === "array" ? properties : [properties]
+ }).send(wrapCallback("unset_properties", properties, callback));
+ return this;
+ };
+
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
+
+ function createCommonjsModule(fn, module) {
+ return module = { exports: {} }, fn(module, module.exports), module.exports;
+ }
+
+ var ifvisible = createCommonjsModule(function (module, exports) {
+ (function() {
+ (function(root, factory) {
+ {
+ return module.exports = factory();
+ }
+ })(this, function() {
+ var addEvent, customEvent, doc, hidden, idleStartedTime, idleTime, ie, ifvisible, init, initialized, status, trackIdleStatus, visibilityChange;
+ ifvisible = {};
+ doc = document;
+ initialized = false;
+ status = "active";
+ idleTime = 60000;
+ idleStartedTime = false;
+ customEvent = (function() {
+ var addCustomEvent, cgid, fireCustomEvent, listeners, removeCustomEvent;
+ listeners = {};
+ cgid = '__ceGUID';
+ addCustomEvent = function(obj, event, callback) {
+ obj[cgid] = undefined;
+ if (!obj[cgid]) {
+ obj[cgid] = "ifvisible.object.event.identifier";
+ }
+ if (!listeners[obj[cgid]]) {
+ listeners[obj[cgid]] = {};
+ }
+ if (!listeners[obj[cgid]][event]) {
+ listeners[obj[cgid]][event] = [];
+ }
+ return listeners[obj[cgid]][event].push(callback);
+ };
+ fireCustomEvent = function(obj, event, memo) {
+ var ev, j, len, ref, results;
+ if (obj[cgid] && listeners[obj[cgid]] && listeners[obj[cgid]][event]) {
+ ref = listeners[obj[cgid]][event];
+ results = [];
+ for (j = 0, len = ref.length; j < len; j++) {
+ ev = ref[j];
+ results.push(ev(memo || {}));
+ }
+ return results;
+ }
+ };
+ removeCustomEvent = function(obj, event, callback) {
+ var cl, i, j, len, ref;
+ if (callback) {
+ if (obj[cgid] && listeners[obj[cgid]] && listeners[obj[cgid]][event]) {
+ ref = listeners[obj[cgid]][event];
+ for (i = j = 0, len = ref.length; j < len; i = ++j) {
+ cl = ref[i];
+ if (cl === callback) {
+ listeners[obj[cgid]][event].splice(i, 1);
+ return cl;
+ }
+ }
+ }
+ } else {
+ if (obj[cgid] && listeners[obj[cgid]] && listeners[obj[cgid]][event]) {
+ return delete listeners[obj[cgid]][event];
+ }
+ }
+ };
+ return {
+ add: addCustomEvent,
+ remove: removeCustomEvent,
+ fire: fireCustomEvent
+ };
+ })();
+ addEvent = (function() {
+ var setListener;
+ setListener = false;
+ return function(el, ev, fn) {
+ if (!setListener) {
+ if (el.addEventListener) {
+ setListener = function(el, ev, fn) {
+ return el.addEventListener(ev, fn, false);
+ };
+ } else if (el.attachEvent) {
+ setListener = function(el, ev, fn) {
+ return el.attachEvent('on' + ev, fn, false);
+ };
+ } else {
+ setListener = function(el, ev, fn) {
+ return el['on' + ev] = fn;
+ };
+ }
+ }
+ return setListener(el, ev, fn);
+ };
+ })();
+ ie = (function() {
+ var all, check, div, undef, v;
+ undef = void 0;
+ v = 3;
+ div = doc.createElement("div");
+ all = div.getElementsByTagName("i");
+ check = function() {
+ return (div.innerHTML = "", all[0]);
+ };
+ while (check()) {
+ continue;
+ }
+ if (v > 4) {
+ return v;
+ } else {
+ return undef;
+ }
+ })();
+ hidden = false;
+ visibilityChange = void 0;
+ if (typeof doc.hidden !== "undefined") {
+ hidden = "hidden";
+ visibilityChange = "visibilitychange";
+ } else if (typeof doc.mozHidden !== "undefined") {
+ hidden = "mozHidden";
+ visibilityChange = "mozvisibilitychange";
+ } else if (typeof doc.msHidden !== "undefined") {
+ hidden = "msHidden";
+ visibilityChange = "msvisibilitychange";
+ } else if (typeof doc.webkitHidden !== "undefined") {
+ hidden = "webkitHidden";
+ visibilityChange = "webkitvisibilitychange";
+ }
+ trackIdleStatus = function() {
+ var timer, wakeUp;
+ timer = false;
+ wakeUp = function() {
+ clearTimeout(timer);
+ if (status !== "active") {
+ ifvisible.wakeup();
+ }
+ idleStartedTime = +(new Date());
+ return timer = setTimeout(function() {
+ if (status === "active") {
+ return ifvisible.idle();
+ }
+ }, idleTime);
+ };
+ wakeUp();
+ addEvent(doc, "mousemove", wakeUp);
+ addEvent(doc, "keyup", wakeUp);
+ addEvent(window, "scroll", wakeUp);
+ ifvisible.focus(wakeUp);
+ return ifvisible.wakeup(wakeUp);
+ };
+ init = function() {
+ var blur;
+ if (initialized) {
+ return true;
+ }
+ if (hidden === false) {
+ blur = "blur";
+ if (ie < 9) {
+ blur = "focusout";
+ }
+ addEvent(window, blur, function() {
+ return ifvisible.blur();
+ });
+ addEvent(window, "focus", function() {
+ return ifvisible.focus();
+ });
+ } else {
+ addEvent(doc, visibilityChange, function() {
+ if (doc[hidden]) {
+ return ifvisible.blur();
+ } else {
+ return ifvisible.focus();
+ }
+ }, false);
+ }
+ initialized = true;
+ return trackIdleStatus();
+ };
+ ifvisible = {
+ setIdleDuration: function(seconds) {
+ return idleTime = seconds * 1000;
+ },
+ getIdleDuration: function() {
+ return idleTime;
+ },
+ getIdleInfo: function() {
+ var now, res;
+ now = +(new Date());
+ res = {};
+ if (status === "idle") {
+ res.isIdle = true;
+ res.idleFor = now - idleStartedTime;
+ res.timeLeft = 0;
+ res.timeLeftPer = 100;
+ } else {
+ res.isIdle = false;
+ res.idleFor = now - idleStartedTime;
+ res.timeLeft = (idleStartedTime + idleTime) - now;
+ res.timeLeftPer = (100 - (res.timeLeft * 100 / idleTime)).toFixed(2);
+ }
+ return res;
+ },
+ focus: function(callback) {
+ if (typeof callback === "function") {
+ return this.on("focus", callback);
+ }
+ status = "active";
+ customEvent.fire(this, "focus");
+ customEvent.fire(this, "wakeup");
+ return customEvent.fire(this, "statusChanged", {
+ status: status
+ });
+ },
+ blur: function(callback) {
+ if (typeof callback === "function") {
+ return this.on("blur", callback);
+ }
+ status = "hidden";
+ customEvent.fire(this, "blur");
+ customEvent.fire(this, "idle");
+ return customEvent.fire(this, "statusChanged", {
+ status: status
+ });
+ },
+ idle: function(callback) {
+ if (typeof callback === "function") {
+ return this.on("idle", callback);
+ }
+ status = "idle";
+ customEvent.fire(this, "idle");
+ return customEvent.fire(this, "statusChanged", {
+ status: status
+ });
+ },
+ wakeup: function(callback) {
+ if (typeof callback === "function") {
+ return this.on("wakeup", callback);
+ }
+ status = "active";
+ customEvent.fire(this, "wakeup");
+ return customEvent.fire(this, "statusChanged", {
+ status: status
+ });
+ },
+ on: function(name, callback) {
+ init();
+ return customEvent.add(this, name, callback);
+ },
+ off: function(name, callback) {
+ init();
+ return customEvent.remove(this, name, callback);
+ },
+ onEvery: function(seconds, callback) {
+ var paused, t;
+ init();
+ paused = false;
+ if (callback) {
+ t = setInterval(function() {
+ if (status === "active" && paused === false) {
+ return callback();
+ }
+ }, seconds * 1000);
+ }
+ return {
+ stop: function() {
+ return clearInterval(t);
+ },
+ pause: function() {
+ return paused = true;
+ },
+ resume: function() {
+ return paused = false;
+ },
+ code: t,
+ callback: callback
+ };
+ },
+ now: function(check) {
+ init();
+ return status === (check || "active");
+ }
+ };
+ return ifvisible;
+ });
+
+ }).call(commonjsGlobal);
+
+
+ });
+
+ var API_VERSION$1 = 1;
+ var DEFAULT_OPTIONS = {
+ apiEndpoint: 'app.rakam.io',
+ eventEndpointPath: '/event/batch',
+ cookieExpiration: 365 * 10,
+ cookieName: 'rakam_id',
+ domain: undefined,
+ includeUtm: false,
+ trackForms: false,
+ language: language.language,
+ optOut: false,
+ platform: 'Web',
+ savedMaxCount: 1000,
+ saveEvents: true,
+ sessionTimeout: 30 * 60 * 1000,
+ unsentKey: 'rakam_unsent',
+ uploadBatchSize: 100,
+ batchEvents: false,
+ eventUploadThreshold: 30,
+ eventUploadPeriodMillis: 30 * 1000,
+ // 30s,
+ useLocalStorageForSessionization: true
+ };
+ var StorageKeys = {
+ LAST_ID: 'rakam_lastEventId',
+ LAST_EVENT_TIME: 'rakam_lastEventTime',
+ SESSION_ID: 'rakam_sessionId',
+ RETURNING_SESSION: 'rakam_returning'
+ };
+
+ var getSessionItem = function (options, key) {
+ if (options.useLocalStorageForSessionization) {
+ return localStorage$1.getItem(key);
+ } else {
+ return Cookie.get(key);
+ }
+ };
+
+ var setSessionItem = function (options, key, value) {
+ if (options.useLocalStorageForSessionization) {
+ localStorage$1.setItem(key, value);
+ } else {
+ Cookie.set(key, value);
+ }
+ };
+ /*
+ * Rakam API
+ */
+
+
+ var Rakam = function () {
+ this._unsentEvents = [];
+ this.options = merge({}, DEFAULT_OPTIONS);
+ };
+
+ Rakam.prototype._eventId = 0;
+ Rakam.prototype._returningUser = false;
+ Rakam.prototype._sending = false;
+ Rakam.prototype._lastEventTime = null;
+ Rakam.prototype._sessionId = null;
+ Rakam.prototype._newSession = false;
+
+ Rakam.prototype.log = function (s) {
+ if (this.options.debug === true) {
+ console.log('[Rakam] ' + s);
+ }
+ };
+ /**
+ * Initializes Rakam.
+ * apiKey The API Key for your app
+ * opt_userId An identifier for this user
+ * opt_config Configuration options
+ * - saveEvents (boolean) Whether to save events to local storage. Defaults to true.
+ * - includeUtm (boolean) Whether to send utm parameters with events. Defaults to false.
+ */
+
+
+ Rakam.prototype.init = function (apiKey, opt_userId, opt_config, callback) {
+ try {
+ if (!apiKey) {
+ throw new Error('apiKey is null');
+ }
+
+ this.options.apiKey = apiKey;
+ var user = new User();
+ user.init(this.options);
+
+ this.User = function () {
+ return user;
+ };
+
+ if (opt_config) {
+ this.options.apiEndpoint = opt_config.apiEndpoint || this.options.apiEndpoint;
+ this.options.debug = opt_config.debug || this.options.debug === true;
+
+ if (opt_config.saveEvents !== undefined) {
+ this.options.saveEvents = !!opt_config.saveEvents;
+ }
+
+ if (opt_config.domain !== undefined) {
+ this.options.domain = opt_config.domain;
+ }
+
+ if (opt_config.includeUtm !== undefined) {
+ this.options.includeUtm = !!opt_config.includeUtm;
+ }
+
+ if (opt_config.trackClicks !== undefined) {
+ this.options.trackClicks = !!opt_config.trackClicks;
+ }
+
+ if (opt_config.trackForms !== undefined) {
+ this.options.trackForms = !!opt_config.trackForms;
+ }
+
+ if (opt_config.batchEvents !== undefined) {
+ this.options.batchEvents = !!opt_config.batchEvents;
+ }
+
+ this.options.platform = opt_config.platform || this.options.platform;
+ this.options.useLocalStorageForSessionization = opt_config.useLocalStorageForSessionization || this.options.useLocalStorageForSessionization;
+ this.options.language = opt_config.language || this.options.language;
+ this.options.sessionTimeout = opt_config.sessionTimeout || this.options.sessionTimeout;
+ this.options.uploadBatchSize = opt_config.uploadBatchSize || this.options.uploadBatchSize;
+ this.options.eventUploadThreshold = opt_config.eventUploadThreshold || this.options.eventUploadThreshold;
+ this.options.savedMaxCount = opt_config.savedMaxCount || this.options.savedMaxCount;
+ this.options.eventUploadPeriodMillis = opt_config.eventUploadPeriodMillis || this.options.eventUploadPeriodMillis;
+ this.options.superProperties = opt_config.superProperties || [];
+ }
+
+ Cookie.options({
+ expirationDays: this.options.cookieExpiration,
+ domain: this.options.domain
+ });
+ this.options.domain = Cookie.options().domain;
+
+ _loadCookieData(this);
+
+ if (opt_config && opt_config.deviceId !== undefined && opt_config.deviceId !== null && opt_config.deviceId || this.options.deviceId) {
+ this.options.deviceId = this.options.deviceId;
+ } else {
+ this.deviceIdCreatedAt = new Date();
+ this.options.deviceId = uuid();
+ }
+
+ _saveCookieData(this);
+
+ this.log('initialized with apiKey=' + apiKey);
+
+ if (this.options.saveEvents) {
+ var savedUnsentEventsString = localStorage$1.getItem(this.options.unsentKey);
+
+ if (savedUnsentEventsString) {
+ try {
+ this._unsentEvents = JSON.parse(savedUnsentEventsString);
+ } catch (e) {
+ this.log(e);
+ }
+ }
+ }
+
+ this._sendEventsIfReady();
+
+ if (this.options.includeUtm) {
+ this._initUtmData();
+ }
+
+ if (this.options.trackForms) {
+ this._initTrackForms();
+ }
+
+ if (this.options.trackClicks) {
+ this._initTrackClicks();
+ }
+
+ this._lastEventTime = parseInt(getSessionItem(this.options, StorageKeys.LAST_EVENT_TIME)) || null;
+ this._sessionId = parseInt(getSessionItem(this.options, StorageKeys.SESSION_ID)) || null;
+ this._eventId = localStorage$1.getItem(StorageKeys.LAST_ID) || 0;
+ var now = new Date().getTime();
+
+ if (!this._sessionId || !this._lastEventTime || now - this._lastEventTime > this.options.sessionTimeout) {
+ if (this._sessionId !== null) {
+ setSessionItem(this.options, StorageKeys.RETURNING_SESSION, true);
+ this._returningUser = true;
+ }
+
+ this._sessionId = now;
+ Cookie.remove('_rakam_time');
+ setSessionItem(this.options, StorageKeys.SESSION_ID, this._sessionId);
+ } else {
+ this._returningUser = getSessionItem(this.options, StorageKeys.RETURNING_SESSION) === 'true';
+ }
+
+ this._lastEventTime = now;
+ setSessionItem(this.options, StorageKeys.LAST_EVENT_TIME, this._lastEventTime);
+ } catch (e) {
+ this.log(e);
+ }
+
+ this.setUserId(opt_userId);
+
+ if (callback && typeof callback === 'function') {
+ setTimeout(function () {
+ callback();
+ }, 1);
+ }
+ };
+
+ Rakam.prototype.onEvent = function (callback) {
+ this.options.eventCallbacks = this.options.eventCallbacks || [];
+ this.options.eventCallbacks.push(callback);
+ };
+
+ var transformValue = function (_this, attribute, value, type) {
+ if (type !== null) {
+ type = type.toLowerCase();
+ }
+
+ if (type === 'long' || type === 'time' || type === 'timestamp' || type === 'date') {
+ value = parseInt(value);
+
+ if (isNaN(value) || !isFinite(value)) {
+ _this.log('ignoring ' + attribute + ': the value must be a number');
+
+ value = null;
+ }
+ } else if (type === 'double') {
+ value = parseFloat(value);
+
+ if (isNaN(value) || !isFinite(value)) {
+ _this.log('ignoring ' + attribute + ': the value is not double');
+
+ value = null;
+ }
+ } else if (type === 'boolean') {
+ if (type === 'true' || type === '1') {
+ value = true;
+ } else if (type === 'false' || type === '0') {
+ value = false;
+ } else {
+ _this.log('ignoring ' + attribute + ': the value is not boolean');
+
+ value = null;
+ }
+ }
+
+ return value;
+ };
+
+ Rakam.prototype.logInlinedEvent = function (collection, extraProperties, callback) {
+ var getAllElementsWithAttribute = function (attribute) {
+ if (document.querySelectorAll) {
+ return document.querySelectorAll('[rakam-event-attribute]');
+ }
+
+ var matchingElements = [];
+ var allElements = document.getElementsByTagName('*');
+
+ for (var i = 0, n = allElements.length; i < n; i++) {
+ if (allElements[i].getAttribute(attribute) !== null) {
+ matchingElements.push(allElements[i]);
+ }
+ }
+
+ return matchingElements;
+ };
+
+ var properties = extraProperties || {};
+ var elements = getAllElementsWithAttribute('rakam-event-attribute');
+
+ for (var i = 0; i < elements.length; i++) {
+ var element = elements[i];
+ var attribute = element.getAttribute('rakam-event-attribute');
+ var value = element.getAttribute('rakam-event-attribute-value');
+ var type = element.getAttribute('rakam-event-attribute-type');
+
+ if (value === null) {
+ if (element.tagName === 'INPUT') {
+ value = element.value;
+ } else if (element.tagName === 'SELECT') {
+ var option = element.options[element.selectedIndex];
+
+ if (option.value !== null && option.value !== '') {
+ var attr = element.getAttribute('rakam-attribute-value');
+
+ if (attr !== 'value') {
+ value = option.value;
+ } else {
+ value = option.text;
+ }
+ }
+ } else if (element.innerText) {
+ value = element.innerText.replace(/^\s+|\s+$/g, '');
+ } else {
+ this.log('Could find value of DOM element.', element);
+ }
+ }
+
+ if (value !== null && value !== '') {
+ properties[attribute] = transformValue(this, attribute, value, type);
+ }
+ }
+
+ this.logEvent(collection, properties, callback);
+ };
+
+ Rakam.prototype.isReturningUser = function () {
+ return this._returningUser;
+ };
+
+ var gapMillis = 0;
+ var startTime = new Date().getTime();
+ var idleTime;
+ var initializedTimer = false;
+
+ Rakam.prototype.resetTimer = function () {
+ if (!initializedTimer) {
+ return this.log('Timer is not initialized');
+ }
+
+ idleTime = null;
+ gapMillis = 0;
+ startTime = new Date().getTime();
+ };
+
+ Rakam.prototype.startTimer = function (saveOnClose) {
+ if (initializedTimer) {
+ return this.log('Timer is already initialized');
+ }
+
+ startTime = new Date().getTime();
+ ifvisible.on('idle', function () {
+ idleTime = new Date().getTime();
+ });
+ ifvisible.on('wakeup', function () {
+ gapMillis += new Date().getTime() - idleTime;
+ idleTime = null;
+ });
+
+ if (saveOnClose) {
+ var func;
+
+ if (window.onbeforeunload !== null) {
+ func = window.onbeforeunload;
+ }
+
+ var _this = this;
+
+ window.onbeforeunload = function (e) {
+ Cookie.set('_rakam_time', _this.getTimeOnPage());
+
+ if (func) {
+ func(e);
+ }
+ };
+ }
+
+ initializedTimer = true;
+ };
+
+ Rakam.prototype.getTimeOnPage = function () {
+ if (!initializedTimer) {
+ return this.log('Timer is not initialized, returning null from getTimeOnPage()');
+ }
+
+ return ((idleTime > 0 ? idleTime : new Date().getTime()) - startTime - gapMillis) / 1000;
+ };
+
+ Rakam.prototype.getTimeOnPreviousPage = function () {
+ return Cookie.get('_rakam_time');
+ };
+
+ Rakam.prototype.nextEventId = function () {
+ this._eventId++;
+ return this._eventId;
+ }; // returns true if sendEvents called immediately
+
+
+ Rakam.prototype._sendEventsIfReady = function (callback) {
+ if (this._unsentEvents.length === 0) {
+ return false;
+ }
+
+ if (!this.options.batchEvents) {
+ this.sendEvents(callback);
+ return true;
+ }
+
+ if (this._unsentEvents.length >= this.options.eventUploadThreshold) {
+ this.sendEvents(callback);
+ return true;
+ }
+
+ setTimeout(this.sendEvents.bind(this), this.options.eventUploadPeriodMillis);
+ return false;
+ };
+
+ var _loadCookieData = function (scope) {
+ var cookieData = Cookie.get(scope.options.cookieName);
+
+ if (cookieData) {
+ if (cookieData.deviceId) {
+ scope.options.deviceId = cookieData.deviceId;
+ }
+
+ if (cookieData.userId) {
+ scope.options.userId = cookieData.userId;
+ }
+
+ if (cookieData.superProps) {
+ scope.options.superProperties = cookieData.superProps;
+ }
+
+ if (cookieData.optOut !== undefined) {
+ scope.options.optOut = cookieData.optOut;
+ }
+
+ if (cookieData.deviceIdCreatedAt !== undefined) {
+ scope.deviceIdCreatedAt = new Date(parseInt(cookieData.deviceIdCreatedAt));
+ }
+ }
+ };
+
+ var _saveCookieData = function (scope) {
+ Cookie.set(scope.options.cookieName, {
+ deviceId: scope.options.deviceId,
+ deviceIdCreatedAt: scope.deviceIdCreatedAt ? scope.deviceIdCreatedAt.getTime() : undefined,
+ userId: scope.options.userId,
+ superProps: scope.options.superProperties,
+ optOut: scope.options.optOut
+ });
+ };
+
+ Rakam._getUtmParam = function (name, query) {
+ name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
+ var regex = new RegExp('[\\?&]' + name + '=([^]*)');
+ var results = regex.exec(query);
+ return results === null ? undefined : decodeURIComponent(results[1].replace(/\+/g, ' '));
+ };
+
+ Rakam._getUtmData = function (rawCookie, query) {
+ // Translate the utmz cookie format into url query string format.
+ var cookie = rawCookie ? '?' + rawCookie.split('.').slice(-1)[0].replace(/\|/g, '&') : '';
+
+ var fetchParam = function (queryName, query, cookieName, cookie) {
+ return Rakam._getUtmParam(queryName, query) || Rakam._getUtmParam(cookieName, cookie);
+ };
+
+ return {
+ utm_source: fetchParam('utm_source', query, 'utmcsr', cookie),
+ utm_medium: fetchParam('utm_medium', query, 'utmcmd', cookie),
+ utm_campaign: fetchParam('utm_campaign', query, 'utmccn', cookie),
+ utm_term: fetchParam('utm_term', query, 'utmctr', cookie),
+ utm_content: fetchParam('utm_content', query, 'utmcct', cookie)
+ };
+ };
+ /**
+ * Parse the utm properties out of cookies and query for adding to user properties.
+ */
+
+
+ Rakam.prototype._initUtmData = function (queryParams, cookieParams) {
+ queryParams = queryParams || location.search;
+ cookieParams = cookieParams || Cookie.get('__utmz');
+ this._utmProperties = Rakam._getUtmData(cookieParams, queryParams);
+ };
+
+ Rakam.prototype._initTrackForms = function () {
+ var _this = this;
+
+ document.addEventListener('submit', function (event) {
+ var targetElement = event.target || event.srcElement;
+ var collection = targetElement.getAttribute('rakam-event-form');
+
+ if (targetElement.tagName === 'FORM' && collection) {
+ var properties = {};
+ var extraAttributes = targetElement.getAttribute('rakam-event-extra');
+
+ if (extraAttributes !== null) {
+ for (var key in JSON.parse(extraAttributes)) {
+ if (extraAttributes.hasOwnProperty(key)) {
+ properties[key] = extraAttributes[key];
+ }
+ }
+ }
+
+ for (var i = 0; i < targetElement.elements.length; i++) {
+ var element = targetElement.elements[i];
+ var type = element.getAttribute('rakam-event-attribute-type');
+ var formElemType;
+
+ if (element.hasAttribute('type')) {
+ formElemType = element.getAttribute('type').toLowerCase();
+ }
+
+ if (formElemType === 'password') {
+ continue;
+ }
+
+ if (type === null && element.tagName === 'INPUT' && formElemType === 'number') {
+ type = 'long';
+ }
+
+ if (element.hasAttribute('rakam-event-form-element-ignore')) {
+ continue;
+ }
+
+ var attribute;
+
+ if (element.hasAttribute('rakam-event-attribute')) {
+ attribute = element.getAttribute('rakam-event-attribute');
+ } else {
+ attribute = element.getAttribute('name');
+ }
+
+ if (element.hasAttribute('rakam-event-attribute-value')) {
+ properties[attribute] = transformValue(this, attribute, element.getAttribute('rakam-event-attribute-value'), type);
+ } else if (element.tagName === 'SELECT') {
+ properties[attribute] = transformValue(this, attribute, element.options[element.selectedIndex].value, type);
+ } else if (element.tagName === 'INPUT' || element.tagName === 'TEXTAREA') {
+ properties[attribute] = transformValue(this, attribute, element.value, type);
+ } else {
+ _this.log('Couldn\'t get value of form element: ' + attribute);
+ }
+ }
+
+ _this.logEvent(collection, properties);
+ }
+ });
+ };
+
+ Rakam.prototype._initTrackClicks = function () {
+ var _this = this;
+
+ document.addEventListener('click', function (event) {
+ var targetElement = event.target || event.srcElement;
+ var collection = targetElement.getAttribute('rakam-event-track');
+
+ if (targetElement.tagName === 'FORM' && collection) {
+ var properties = {};
+ var extraAttributes = targetElement.getAttribute('rakam-event-properties');
+
+ if (extraAttributes !== null) {
+ for (var key in JSON.parse(extraAttributes)) {
+ if (extraAttributes.hasOwnProperty(key)) {
+ properties[key] = extraAttributes[key];
+ }
+ }
+ }
+
+ _this.logEvent(collection, properties);
+ }
+ });
+ };
+
+ Rakam.prototype.saveEvents = function () {
+ try {
+ localStorage$1.setItem(this.options.unsentKey, JSON.stringify(this._unsentEvents));
+ } catch (e) {
+ this.log(e);
+ }
+ };
+
+ Rakam.prototype.setDomain = function (domain) {
+ try {
+ Cookie.options({
+ domain: domain
+ });
+ this.options.domain = Cookie.options().domain;
+
+ _loadCookieData(this);
+
+ _saveCookieData(this);
+
+ this.log('set domain=' + domain);
+ } catch (e) {
+ this.log(e);
+ }
+ };
+
+ Rakam.prototype.setUserId = function (userId) {
+ try {
+ var previousId = this.options.deviceId;
+ this.options.userId = userId !== undefined && userId !== null && '' + userId || null;
+
+ if (userId !== null && userId !== '' && userId !== undefined && (this._eventId > 0 && (previousId === null || previousId === undefined) || previousId !== null && previousId !== undefined)) {
+ var _this = this;
+
+ this.User()._merge(previousId, this.deviceIdCreatedAt, function () {
+ _this.deviceIdCreatedAt = null;
+
+ _saveCookieData(_this);
+ });
+ }
+
+ _saveCookieData(this);
+
+ this.log('set userId=' + userId);
+ } catch (e) {
+ this.log(e);
+ }
+ };
+
+ Rakam.prototype.setUserProperties = function (parameters) {
+ try {
+ return new this.User().set(parameters);
+ } catch (e) {
+ this.log(e);
+ }
+ };
+
+ Rakam.prototype.getUserId = function () {
+ return this.options.userId;
+ };
+
+ Rakam.prototype.getDeviceId = function () {
+ return this._eventId > 0 ? this.options.deviceId : null;
+ };
+
+ Rakam.prototype.setOptOut = function (enable) {
+ try {
+ this.options.optOut = enable;
+
+ _saveCookieData(this);
+
+ this.log('set optOut=' + enable);
+ } catch (e) {
+ this.log(e);
+ }
+ };
+
+ Rakam.prototype.setDeviceId = function (deviceId) {
+ try {
+ if (deviceId) {
+ this.options.deviceId = '' + deviceId;
+
+ _saveCookieData(this);
+ }
+ } catch (e) {
+ this.log(e);
+ }
+ };
+
+ Rakam.prototype.setSuperProperties = function (eventProps, opt_replace) {
+ try {
+ this.options.superProperties = this.options.superProperties || {};
+
+ for (var property in eventProps) {
+ if (eventProps.hasOwnProperty(property)) {
+ if (opt_replace === false && this.options.superProperties[property] !== undefined) {
+ continue;
+ }
+
+ this.options.superProperties[property] = eventProps[property];
+ }
+ }
+
+ _saveCookieData(this);
+
+ this.log('set super properties=' + JSON.stringify(eventProps));
+ } catch (e) {
+ this.log(e);
+ }
+ };
+
+ Rakam.prototype.setVersionName = function (versionName) {
+ try {
+ this.options.versionName = versionName;
+ this.log('set versionName=' + versionName);
+ } catch (e) {
+ this.log(e);
+ }
+ };
+ /**
+ * Private logEvent method. Keeps apiProperties from being publicly exposed.
+ */
+
+
+ Rakam.prototype._logEvent = function (eventType, eventProperties, apiProperties, callback) {
+ if (typeof callback !== 'function') {
+ callback = null;
+ }
+
+ if (!eventType || this.options.optOut) {
+ if (callback) {
+ callback(0, 'No request sent');
+ }
+
+ return;
+ }
+
+ try {
+ var eventTime = new Date().getTime();
+ var eventId = this.nextEventId();
+
+ if (!this._sessionId || !this._lastEventTime || eventTime - this._lastEventTime > this.options.sessionTimeout) {
+ this._sessionId = eventTime;
+ setSessionItem(this.options, StorageKeys.SESSION_ID, this._sessionId);
+ }
+
+ this._lastEventTime = eventTime;
+ setSessionItem(this.options, StorageKeys.LAST_EVENT_TIME, this._lastEventTime);
+ setSessionItem(this.options, StorageKeys.LAST_ID, eventId);
+ apiProperties = apiProperties || {};
+ eventProperties = eventProperties || {}; // Add the utm properties, if any, onto the event properties.
+
+ merge(eventProperties, this._utmProperties);
+ var event = {
+ collection: eventType,
+ properties: {
+ _device_id: this.options.deviceId,
+ _user: this.options.userId,
+ // use seconds
+ _time: parseInt(eventTime / 1000) * 1000,
+ _session_id: this._sessionId || -1,
+ _platform: this.options.platform,
+ _language: this.options.language
+ }
+ };
+ merge(event.properties, this.options.superProperties);
+ merge(event.properties, apiProperties);
+ merge(event.properties, eventProperties);
+ this.log('logged eventType=' + eventType + ', properties=' + JSON.stringify(eventProperties));
+
+ this._unsentEvents.push({
+ id: eventId,
+ event: event
+ }); // Remove old events from the beginning of the array if too many
+ // have accumulated. Don't want to kill memory. Default is 1000 events.
+
+
+ if (this._unsentEvents.length > this.options.savedMaxCount) {
+ this._unsentEvents.splice(0, this._unsentEvents.length - this.options.savedMaxCount);
+ }
+
+ if (this.options.saveEvents) {
+ this.saveEvents();
+ }
+
+ if (!this._sendEventsIfReady(callback) && callback) {
+ callback(0, 'No request sent');
+ }
+
+ return eventId;
+ } catch (e) {
+ this.log(e);
+ }
+ };
+
+ Rakam.prototype.logEvent = function (eventType, eventProperties, callback) {
+ return this._logEvent(eventType, eventProperties, null, callback);
+ };
+ /**
+ * Remove events in storage with event ids up to and including maxEventId. Does
+ * a true filter in case events get out of order or old events are removed.
+ */
+
+
+ Rakam.prototype.removeEvents = function (maxEventId, errors) {
+ var filteredEvents = [];
+ var errorList = errors || [];
+
+ for (var i = 0; i < this._unsentEvents.length; i++) {
+ var id = this._unsentEvents[i].id;
+
+ if (errorList.indexOf(id) > -1 || id > maxEventId) {
+ filteredEvents.push(this._unsentEvents[i]);
+ }
+ }
+
+ this._unsentEvents = filteredEvents;
+ };
+
+ Rakam.prototype.sendEvents = function (callback) {
+ var _this = this;
+
+ if (!this._sending && !this.options.optOut && this._unsentEvents.length > 0) {
+ this._sending = true;
+ var url = ('https:' === window.location.protocol ? 'https' : 'http') + '://' + this.options.apiEndpoint + this.options.eventEndpointPath; // Determine how many events to send and track the maximum event id sent in this batch.
+
+ var numEvents = Math.min(this._unsentEvents.length, this.options.uploadBatchSize);
+ var maxEventId = this._unsentEvents[numEvents - 1].id;
+
+ this._unsentEvents.slice(0, numEvents);
+
+ var events = this._unsentEvents.slice(0, numEvents).map(function (e) {
+ return e.event;
+ });
+
+ var upload_time = new Date().getTime();
+ var api = {
+ 'upload_time': upload_time,
+ 'api_version': API_VERSION$1,
+ 'api_key': this.options.apiKey //"checksum": md5(API_VERSION + JSON.stringify(events) + upload_time).toUpperCase()
+
+ };
+ var scope = this;
+ new Request(url, {
+ api: api,
+ events: events
+ }).send(function (status, response, headers) {
+ scope._sending = false;
+
+ try {
+ if (status === 200 || status === 409) {
+ _this.log('successful upload');
+
+ scope.removeEvents(maxEventId, status === 409 ? JSON.parse(response) : null); // Update the event cache after the removal of sent events.
+
+ if (scope.options.saveEvents) {
+ scope.saveEvents();
+ } // Send more events if any queued during previous send.
+
+
+ if (!scope._sendEventsIfReady(callback) && callback) {
+ callback(status, response);
+ }
+ } else if (status === 413) {
+ _this.log('request too large'); // Can't even get this one massive event through. Drop it.
+
+
+ if (scope.options.uploadBatchSize === 1) {
+ scope.removeEvents(maxEventId);
+ } // The server complained about the length of the request.
+ // Backoff and try again.
+
+
+ scope.options.uploadBatchSize = Math.ceil(numEvents / 2);
+ scope.sendEvents(callback);
+ } else if (callback) {
+ // If server turns something like a 400
+ callback(status, response);
+ }
+ } catch (e) {
+ _this.log('failed upload');
+ }
+
+ if (scope.options.eventCallbacks) {
+ try {
+ for (var i = 0; i < scope.options.eventCallbacks.length; i++) {
+ scope.options.eventCallbacks[i](status, response, headers);
+ }
+ } catch (e) {
+ _this.log('callback throws an exception', e);
+ }
+ }
+ });
+ } else if (callback) {
+ callback(0, 'No request sent');
+ }
+ };
+
+ Rakam.prototype.onload = function (callback) {
+ var _this = this;
+
+ setTimeout(function () {
+ callback();
+
+ _this.log('executed callback', callback);
+ }, 1);
+ };
+
+ Rakam.prototype.runQueuedFunctions = function () {
+ for (var i = 0; i < this._q.length; i++) {
+ var fn = this[this._q[i][0]];
+
+ if (fn && type(fn) === 'function') {
+ fn.apply(this, this._q[i].slice(1));
+ }
+ }
+
+ this._q = []; // clear function queue after running
+ };
+
+ Rakam.prototype.__VERSION__ = version;
+
+ /* jshint expr:true */
+ var old = window.rakam || {};
+ var instance = new Rakam();
+ instance._q = old._q || []; // export the instance
+
+ return instance;
+
+})));
diff --git a/rakam.nocompat.js b/rakam.nocompat.js
new file mode 100644
index 0000000..affc63b
--- /dev/null
+++ b/rakam.nocompat.js
@@ -0,0 +1,1528 @@
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('top-domain'), require('ifvisible')) :
+ typeof define === 'function' && define.amd ? define(['top-domain', 'ifvisible'], factory) :
+ (global = global || self, global.rakam = factory(global.topDomain, global.ifvisible));
+}(this, (function (topDomain, ifvisible) { 'use strict';
+
+ topDomain = topDomain && Object.prototype.hasOwnProperty.call(topDomain, 'default') ? topDomain['default'] : topDomain;
+ ifvisible = ifvisible && Object.prototype.hasOwnProperty.call(ifvisible, 'default') ? ifvisible['default'] : ifvisible;
+
+ /* jshint bitwise: false */
+
+ /*
+ * UTF-8 encoder/decoder
+ * http://www.webtoolkit.info/
+ */
+ var UTF8 = {
+ encode: function (s) {
+ var utftext = '';
+
+ for (var n = 0; n < s.length; n++) {
+ var c = s.charCodeAt(n);
+
+ if (c < 128) {
+ utftext += String.fromCharCode(c);
+ } else if (c > 127 && c < 2048) {
+ utftext += String.fromCharCode(c >> 6 | 192);
+ utftext += String.fromCharCode(c & 63 | 128);
+ } else {
+ utftext += String.fromCharCode(c >> 12 | 224);
+ utftext += String.fromCharCode(c >> 6 & 63 | 128);
+ utftext += String.fromCharCode(c & 63 | 128);
+ }
+ }
+
+ return utftext;
+ },
+ decode: function (utftext) {
+ var s = '';
+ var i = 0;
+ var c = 0,
+ c1 = 0,
+ c2 = 0;
+
+ while (i < utftext.length) {
+ c = utftext.charCodeAt(i);
+
+ if (c < 128) {
+ s += String.fromCharCode(c);
+ i++;
+ } else if (c > 191 && c < 224) {
+ c1 = utftext.charCodeAt(i + 1);
+ s += String.fromCharCode((c & 31) << 6 | c1 & 63);
+ i += 2;
+ } else {
+ c1 = utftext.charCodeAt(i + 1);
+ c2 = utftext.charCodeAt(i + 2);
+ s += String.fromCharCode((c & 15) << 12 | (c1 & 63) << 6 | c2 & 63);
+ i += 3;
+ }
+ }
+
+ return s;
+ }
+ };
+
+ /* jshint bitwise: false */
+ /*
+ * Base64 encoder/decoder
+ * http://www.webtoolkit.info/
+ */
+
+ var Base64 = {
+ _keyStr: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=',
+ encode: function (input) {
+ try {
+ if (window.btoa && window.atob) {
+ return window.btoa(unescape(encodeURIComponent(input)));
+ }
+ } catch (e) {//log(e);
+ }
+
+ return Base64._encode(input);
+ },
+ _encode: function (input) {
+ var output = '';
+ var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
+ var i = 0;
+ input = UTF8.encode(input);
+
+ while (i < input.length) {
+ chr1 = input.charCodeAt(i++);
+ chr2 = input.charCodeAt(i++);
+ chr3 = input.charCodeAt(i++);
+ enc1 = chr1 >> 2;
+ enc2 = (chr1 & 3) << 4 | chr2 >> 4;
+ enc3 = (chr2 & 15) << 2 | chr3 >> 6;
+ enc4 = chr3 & 63;
+
+ if (isNaN(chr2)) {
+ enc3 = enc4 = 64;
+ } else if (isNaN(chr3)) {
+ enc4 = 64;
+ }
+
+ output = output + Base64._keyStr.charAt(enc1) + Base64._keyStr.charAt(enc2) + Base64._keyStr.charAt(enc3) + Base64._keyStr.charAt(enc4);
+ }
+
+ return output;
+ },
+ decode: function (input) {
+ try {
+ if (window.btoa && window.atob) {
+ return decodeURIComponent(escape(window.atob(input)));
+ }
+ } catch (e) {//log(e);
+ }
+
+ return Base64._decode(input);
+ },
+ _decode: function (input) {
+ var output = '';
+ var chr1, chr2, chr3;
+ var enc1, enc2, enc3, enc4;
+ var i = 0;
+ input = input.replace(/[^A-Za-z0-9\+\/\=]/g, '');
+
+ while (i < input.length) {
+ enc1 = Base64._keyStr.indexOf(input.charAt(i++));
+ enc2 = Base64._keyStr.indexOf(input.charAt(i++));
+ enc3 = Base64._keyStr.indexOf(input.charAt(i++));
+ enc4 = Base64._keyStr.indexOf(input.charAt(i++));
+ chr1 = enc1 << 2 | enc2 >> 4;
+ chr2 = (enc2 & 15) << 4 | enc3 >> 2;
+ chr3 = (enc3 & 3) << 6 | enc4;
+ output = output + String.fromCharCode(chr1);
+
+ if (enc3 !== 64) {
+ output = output + String.fromCharCode(chr2);
+ }
+
+ if (enc4 !== 64) {
+ output = output + String.fromCharCode(chr3);
+ }
+ }
+
+ output = UTF8.decode(output);
+ return output;
+ }
+ };
+
+ /*
+ * Cookie data
+ */
+ var _options = {
+ expirationDays: undefined,
+ domain: undefined
+ };
+
+ var reset = function () {
+ _options = {};
+ };
+
+ var options = function (opts) {
+ if (arguments.length === 0) {
+ return _options;
+ }
+
+ opts = opts || {};
+ _options.expirationDays = opts.expirationDays;
+ var domain = opts.domain !== undefined ? opts.domain : '.' + topDomain(window.location.href);
+ var token = Math.random();
+ _options.domain = domain;
+ set('rakam_test', token);
+ var stored = get('rakam_test');
+
+ if (!stored || stored !== token) {
+ domain = null;
+ }
+
+ remove('rakam_test');
+ _options.domain = domain;
+ };
+
+ var _domainSpecific = function (name) {
+ // differentiate between cookies on different domains
+ var suffix = '';
+
+ if (_options.domain) {
+ suffix = _options.domain.charAt(0) === '.' ? _options.domain.substring(1) : _options.domain;
+ }
+
+ return name + suffix;
+ };
+
+ var get = function (name) {
+ try {
+ var nameEq = _domainSpecific(name) + '=';
+ var ca = document.cookie.split(';');
+ var value = null;
+
+ for (var i = 0; i < ca.length; i++) {
+ var c = ca[i];
+
+ while (c.charAt(0) === ' ') {
+ c = c.substring(1, c.length);
+ }
+
+ if (c.indexOf(nameEq) === 0) {
+ value = c.substring(nameEq.length, c.length);
+ break;
+ }
+ }
+
+ if (value) {
+ return JSON.parse(Base64.decode(value));
+ }
+
+ return null;
+ } catch (e) {
+ return null;
+ }
+ };
+
+ var set = function (name, value) {
+ try {
+ _set(_domainSpecific(name), Base64.encode(JSON.stringify(value)), _options);
+
+ return true;
+ } catch (e) {
+ return false;
+ }
+ };
+
+ var _set = function (name, value, opts) {
+ var expires = value !== null ? opts.expirationDays : -1;
+
+ if (expires) {
+ var date = new Date();
+ date.setTime(date.getTime() + expires * 24 * 60 * 60 * 1000);
+ expires = date;
+ }
+
+ var str = name + '=' + value;
+
+ if (expires) {
+ str += '; expires=' + expires.toUTCString();
+ }
+
+ str += '; path=/';
+
+ if (opts.domain) {
+ str += '; domain=' + opts.domain;
+ }
+
+ document.cookie = str;
+ };
+
+ var remove = function (name) {
+ try {
+ _set(_domainSpecific(name), null, _options);
+
+ return true;
+ } catch (e) {
+ return false;
+ }
+ };
+
+ var Cookie = {
+ reset: reset,
+ options: options,
+ get: get,
+ set: set,
+ remove: remove
+ };
+
+ var getLanguage = function () {
+ return navigator && (navigator.languages && navigator.languages[0] || navigator.language || navigator.userLanguage) || undefined;
+ };
+
+ var language = {
+ language: getLanguage()
+ };
+
+ /* jshint -W020, unused: false, noempty: false, boss: true */
+
+ /*
+ * Implement localStorage to support Firefox 2-3 and IE 5-7
+ */
+ var localStorage; // jshint ignore:line
+ // test that Window.localStorage is available and works
+
+ function windowLocalStorageAvailable() {
+ var uid = new Date();
+ var result;
+
+ try {
+ window.localStorage.setItem(uid, uid);
+ result = window.localStorage.getItem(uid) === String(uid);
+ window.localStorage.removeItem(uid);
+ return result;
+ } catch (e) {// localStorage not available
+ }
+
+ return false;
+ }
+
+ if (windowLocalStorageAvailable()) {
+ localStorage = window.localStorage;
+ } else if (window.globalStorage) {
+ // Firefox 2-3 use globalStorage
+ // See https://developer.mozilla.org/en/dom/storage#globalStorage
+ try {
+ localStorage = window.globalStorage[window.location.hostname];
+ } catch (e) {// Something bad happened...
+ }
+ } else {
+ // IE 5-7 use userData
+ // See http://msdn.microsoft.com/en-us/library/ms531424(v=vs.85).aspx
+ var div = document.createElement('div'),
+ attrKey = 'localStorage';
+ div.style.display = 'none';
+ document.getElementsByTagName('head')[0].appendChild(div);
+
+ if (div.addBehavior) {
+ div.addBehavior('#default#userdata');
+ localStorage = {
+ length: 0,
+ setItem: function (k, v) {
+ div.load(attrKey);
+
+ if (!div.getAttribute(k)) {
+ this.length++;
+ }
+
+ div.setAttribute(k, v);
+ div.save(attrKey);
+ },
+ getItem: function (k) {
+ div.load(attrKey);
+ return div.getAttribute(k);
+ },
+ removeItem: function (k) {
+ div.load(attrKey);
+
+ if (div.getAttribute(k)) {
+ this.length--;
+ }
+
+ div.removeAttribute(k);
+ div.save(attrKey);
+ },
+ clear: function () {
+ div.load(attrKey);
+ var i = 0;
+ var attr;
+
+ while (attr = div.XMLDocument.documentElement.attributes[i++]) {
+ div.removeAttribute(attr.name);
+ }
+
+ div.save(attrKey);
+ this.length = 0;
+ },
+ key: function (k) {
+ div.load(attrKey);
+ return div.XMLDocument.documentElement.attributes[k];
+ }
+ };
+ div.load(attrKey);
+ localStorage.length = div.XMLDocument.documentElement.attributes.length;
+ }
+ }
+
+ if (!localStorage) {
+ localStorage = {
+ length: 0,
+ setItem: function (k, v) {},
+ getItem: function (k) {},
+ removeItem: function (k) {},
+ clear: function () {},
+ key: function (k) {}
+ };
+ }
+
+ var localStorage$1 = localStorage;
+
+ var object = {};
+ var has = object.hasOwnProperty;
+ function merge(a, b) {
+ for (var key in b) {
+ if (has.call(b, key)) {
+ a[key] = b[key];
+ }
+ }
+
+ return a;
+ }
+
+ /*
+ * Simple AJAX request object
+ */
+ var Request = function (url, data, headers) {
+ this.url = url;
+ this.data = data || {};
+ this.headers = headers || {};
+ };
+
+ function parseResponseHeaders(headerStr) {
+ var headers = {};
+
+ if (!headerStr) {
+ return headers;
+ }
+
+ var headerPairs = headerStr.split('\u000d\u000a');
+
+ for (var i = 0; i < headerPairs.length; i++) {
+ var headerPair = headerPairs[i]; // Can't use split() here because it does the wrong thing
+ // if the header value has the string ": " in it.
+
+ var index = headerPair.indexOf('\u003a\u0020');
+
+ if (index > 0) {
+ var key = headerPair.substring(0, index);
+ var val = headerPair.substring(index + 2);
+ headers[key] = val;
+ }
+ }
+
+ return headers;
+ }
+
+ Request.prototype.send = function (callback) {
+ var isIE = window.XDomainRequest ? true : false;
+
+ if (isIE) {
+ var xdr = new window.XDomainRequest();
+ xdr.open('POST', this.url, true);
+
+ xdr.onload = function () {
+ callback(xdr.responseText);
+ };
+
+ xdr.send(JSON.stringify(this.data));
+ } else {
+ var xhr = new XMLHttpRequest();
+ xhr.withCredentials = "true";
+ xhr.open('POST', this.url, true);
+
+ xhr.onreadystatechange = function () {
+ if (xhr.readyState === 4) {
+ callback(xhr.status, xhr.responseText, parseResponseHeaders(xhr.getAllResponseHeaders()));
+ }
+ };
+
+ xhr.setRequestHeader('Content-Type', 'text/plain');
+
+ for (var key in this.headers) {
+ if (this.headers.hasOwnProperty(key)) {
+ xhr.setRequestHeader(key, this.headers[key]);
+ }
+ }
+
+ xhr.send(JSON.stringify(this.data));
+ }
+ };
+
+ /* jshint bitwise: false, laxbreak: true */
+
+ /**
+ * Taken straight from jed's gist: https://gist.github.com/982883
+ *
+ * Returns a random v4 UUID of the form xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx,
+ * where each x is replaced with a random hexadecimal digit from 0 to f, and
+ * y is replaced with a random hexadecimal digit from 8 to b.
+ */
+ var uuid = function (a) {
+ return a // if the placeholder was passed, return
+ ? ( // a random number from 0 to 15
+ a ^ // unless b is 8,
+ Math.random() // in which case
+ * 16 // a random number from
+ >> a / 4 // 8 to 11
+ ).toString(16) // in hexadecimal
+ : ( // or otherwise a concatenated string:
+ [1e7] + // 10000000 +
+ -1e3 + // -1000 +
+ -4e3 + // -4000 +
+ -8e3 + // -80000000 +
+ -1e11 // -100000000000,
+ ).replace( // replacing
+ /[018]/g, // zeroes, ones, and eights with
+ uuid // random hex digits
+ );
+ };
+
+ var version = '2.6.0';
+
+ /* Taken from: https://github.com/component/type */
+
+ /**
+ * toString ref.
+ */
+ var toString = Object.prototype.toString;
+ /**
+ * Return the type of `val`.
+ *
+ * @param {Mixed} val
+ * @return {String}
+ * @api public
+ */
+
+ function type (val) {
+ switch (toString.call(val)) {
+ case '[object Date]':
+ return 'date';
+
+ case '[object RegExp]':
+ return 'regexp';
+
+ case '[object Arguments]':
+ return 'arguments';
+
+ case '[object Array]':
+ return 'array';
+
+ case '[object Error]':
+ return 'error';
+ }
+
+ if (val === null) {
+ return 'null';
+ }
+
+ if (val === undefined) {
+ return 'undefined';
+ }
+
+ if (val !== val) {
+ return 'nan';
+ }
+
+ if (val && val.nodeType === 1) {
+ return 'element';
+ }
+
+ if (typeof Buffer !== 'undefined' && Buffer.isBuffer(val)) {
+ return 'buffer';
+ }
+
+ val = val.valueOf ? val.valueOf() : Object.prototype.valueOf.apply(val);
+ return typeof val;
+ }
+
+ /*
+ * Wrapper for a user properties JSON object that supports operations.
+ * Note: if a user property is used in multiple operations on the same User object,
+ * only the first operation will be saved, and the rest will be ignored.
+ */
+
+ var API_VERSION = 1;
+
+ var wrapCallback = function (operation, props, callback) {
+ return function (status, response, headers) {
+ if (callback !== undefined) {
+ callback(status, response, headers);
+ }
+ };
+ };
+
+ var getUrl = function (options) {
+ return ('https:' === window.location.protocol ? 'https' : 'http') + '://' + options.apiEndpoint + "/user";
+ };
+
+ var User = function () {};
+
+ User.prototype.init = function (options) {
+ this.options = options;
+ };
+
+ User.prototype.set = function (properties, callback) {
+ new Request(getUrl(this.options) + "/set_properties", {
+ api: {
+ "api_version": API_VERSION,
+ "api_key": this.options.apiKey
+ },
+ id: this.options.userId,
+ properties: properties
+ }).send(wrapCallback("set_properties", properties, callback));
+ return this;
+ };
+
+ User.prototype._merge = function (deviceId, createdAt, callback) {
+ new Request(getUrl(this.options) + "/merge", {
+ api: {
+ "api_version": API_VERSION,
+ "api_key": this.options.apiKey,
+ "upload_time": new Date().getTime()
+ },
+ anonymous_id: deviceId,
+ id: this.options.userId,
+ created_at: createdAt ? createdAt.getTime() : null,
+ merged_at: new Date().getTime()
+ }).send(wrapCallback("merge", null, callback));
+ return this;
+ };
+
+ User.prototype.setOnce = function (properties, callback) {
+ new Request(getUrl(this.options) + "/set_properties_once", {
+ api: {
+ "api_version": API_VERSION,
+ "api_key": this.options.apiKey
+ },
+ id: this.options.userId,
+ properties: properties
+ }).send(wrapCallback("set_properties_once", properties, callback));
+ return this;
+ };
+
+ User.prototype.increment = function (property, value, callback) {
+ new Request(getUrl(this.options) + "/increment_property", {
+ api: {
+ "api_version": API_VERSION,
+ "api_key": this.options.apiKey
+ },
+ id: this.options.userId,
+ property: property,
+ value: value
+ }).send(wrapCallback("increment_property", property + " by " + value, callback));
+ return this;
+ };
+
+ User.prototype.unset = function (properties, callback) {
+ new Request(getUrl(this.options) + "/unset_properties", {
+ api: {
+ "api_version": API_VERSION,
+ "api_key": this.options.apiKey
+ },
+ id: this.options.userId,
+ properties: type(properties) === "array" ? properties : [properties]
+ }).send(wrapCallback("unset_properties", properties, callback));
+ return this;
+ };
+
+ var API_VERSION$1 = 1;
+ var DEFAULT_OPTIONS = {
+ apiEndpoint: 'app.rakam.io',
+ eventEndpointPath: '/event/batch',
+ cookieExpiration: 365 * 10,
+ cookieName: 'rakam_id',
+ domain: undefined,
+ includeUtm: false,
+ trackForms: false,
+ language: language.language,
+ optOut: false,
+ platform: 'Web',
+ savedMaxCount: 1000,
+ saveEvents: true,
+ sessionTimeout: 30 * 60 * 1000,
+ unsentKey: 'rakam_unsent',
+ uploadBatchSize: 100,
+ batchEvents: false,
+ eventUploadThreshold: 30,
+ eventUploadPeriodMillis: 30 * 1000,
+ // 30s,
+ useLocalStorageForSessionization: true
+ };
+ var StorageKeys = {
+ LAST_ID: 'rakam_lastEventId',
+ LAST_EVENT_TIME: 'rakam_lastEventTime',
+ SESSION_ID: 'rakam_sessionId',
+ RETURNING_SESSION: 'rakam_returning'
+ };
+
+ var getSessionItem = function (options, key) {
+ if (options.useLocalStorageForSessionization) {
+ return localStorage$1.getItem(key);
+ } else {
+ return Cookie.get(key);
+ }
+ };
+
+ var setSessionItem = function (options, key, value) {
+ if (options.useLocalStorageForSessionization) {
+ localStorage$1.setItem(key, value);
+ } else {
+ Cookie.set(key, value);
+ }
+ };
+ /*
+ * Rakam API
+ */
+
+
+ var Rakam = function () {
+ this._unsentEvents = [];
+ this.options = merge({}, DEFAULT_OPTIONS);
+ };
+
+ Rakam.prototype._eventId = 0;
+ Rakam.prototype._returningUser = false;
+ Rakam.prototype._sending = false;
+ Rakam.prototype._lastEventTime = null;
+ Rakam.prototype._sessionId = null;
+ Rakam.prototype._newSession = false;
+
+ Rakam.prototype.log = function (s) {
+ if (this.options.debug === true) {
+ console.log('[Rakam] ' + s);
+ }
+ };
+ /**
+ * Initializes Rakam.
+ * apiKey The API Key for your app
+ * opt_userId An identifier for this user
+ * opt_config Configuration options
+ * - saveEvents (boolean) Whether to save events to local storage. Defaults to true.
+ * - includeUtm (boolean) Whether to send utm parameters with events. Defaults to false.
+ */
+
+
+ Rakam.prototype.init = function (apiKey, opt_userId, opt_config, callback) {
+ try {
+ if (!apiKey) {
+ throw new Error('apiKey is null');
+ }
+
+ this.options.apiKey = apiKey;
+ var user = new User();
+ user.init(this.options);
+
+ this.User = function () {
+ return user;
+ };
+
+ if (opt_config) {
+ this.options.apiEndpoint = opt_config.apiEndpoint || this.options.apiEndpoint;
+ this.options.debug = opt_config.debug || this.options.debug === true;
+
+ if (opt_config.saveEvents !== undefined) {
+ this.options.saveEvents = !!opt_config.saveEvents;
+ }
+
+ if (opt_config.domain !== undefined) {
+ this.options.domain = opt_config.domain;
+ }
+
+ if (opt_config.includeUtm !== undefined) {
+ this.options.includeUtm = !!opt_config.includeUtm;
+ }
+
+ if (opt_config.trackClicks !== undefined) {
+ this.options.trackClicks = !!opt_config.trackClicks;
+ }
+
+ if (opt_config.trackForms !== undefined) {
+ this.options.trackForms = !!opt_config.trackForms;
+ }
+
+ if (opt_config.batchEvents !== undefined) {
+ this.options.batchEvents = !!opt_config.batchEvents;
+ }
+
+ this.options.platform = opt_config.platform || this.options.platform;
+ this.options.useLocalStorageForSessionization = opt_config.useLocalStorageForSessionization || this.options.useLocalStorageForSessionization;
+ this.options.language = opt_config.language || this.options.language;
+ this.options.sessionTimeout = opt_config.sessionTimeout || this.options.sessionTimeout;
+ this.options.uploadBatchSize = opt_config.uploadBatchSize || this.options.uploadBatchSize;
+ this.options.eventUploadThreshold = opt_config.eventUploadThreshold || this.options.eventUploadThreshold;
+ this.options.savedMaxCount = opt_config.savedMaxCount || this.options.savedMaxCount;
+ this.options.eventUploadPeriodMillis = opt_config.eventUploadPeriodMillis || this.options.eventUploadPeriodMillis;
+ this.options.superProperties = opt_config.superProperties || [];
+ }
+
+ Cookie.options({
+ expirationDays: this.options.cookieExpiration,
+ domain: this.options.domain
+ });
+ this.options.domain = Cookie.options().domain;
+
+ _loadCookieData(this);
+
+ if (opt_config && opt_config.deviceId !== undefined && opt_config.deviceId !== null && opt_config.deviceId || this.options.deviceId) {
+ this.options.deviceId = this.options.deviceId;
+ } else {
+ this.deviceIdCreatedAt = new Date();
+ this.options.deviceId = uuid();
+ }
+
+ _saveCookieData(this);
+
+ this.log('initialized with apiKey=' + apiKey);
+
+ if (this.options.saveEvents) {
+ var savedUnsentEventsString = localStorage$1.getItem(this.options.unsentKey);
+
+ if (savedUnsentEventsString) {
+ try {
+ this._unsentEvents = JSON.parse(savedUnsentEventsString);
+ } catch (e) {
+ this.log(e);
+ }
+ }
+ }
+
+ this._sendEventsIfReady();
+
+ if (this.options.includeUtm) {
+ this._initUtmData();
+ }
+
+ if (this.options.trackForms) {
+ this._initTrackForms();
+ }
+
+ if (this.options.trackClicks) {
+ this._initTrackClicks();
+ }
+
+ this._lastEventTime = parseInt(getSessionItem(this.options, StorageKeys.LAST_EVENT_TIME)) || null;
+ this._sessionId = parseInt(getSessionItem(this.options, StorageKeys.SESSION_ID)) || null;
+ this._eventId = localStorage$1.getItem(StorageKeys.LAST_ID) || 0;
+ var now = new Date().getTime();
+
+ if (!this._sessionId || !this._lastEventTime || now - this._lastEventTime > this.options.sessionTimeout) {
+ if (this._sessionId !== null) {
+ setSessionItem(this.options, StorageKeys.RETURNING_SESSION, true);
+ this._returningUser = true;
+ }
+
+ this._sessionId = now;
+ Cookie.remove('_rakam_time');
+ setSessionItem(this.options, StorageKeys.SESSION_ID, this._sessionId);
+ } else {
+ this._returningUser = getSessionItem(this.options, StorageKeys.RETURNING_SESSION) === 'true';
+ }
+
+ this._lastEventTime = now;
+ setSessionItem(this.options, StorageKeys.LAST_EVENT_TIME, this._lastEventTime);
+ } catch (e) {
+ this.log(e);
+ }
+
+ this.setUserId(opt_userId);
+
+ if (callback && typeof callback === 'function') {
+ setTimeout(function () {
+ callback();
+ }, 1);
+ }
+ };
+
+ Rakam.prototype.onEvent = function (callback) {
+ this.options.eventCallbacks = this.options.eventCallbacks || [];
+ this.options.eventCallbacks.push(callback);
+ };
+
+ var transformValue = function (_this, attribute, value, type) {
+ if (type !== null) {
+ type = type.toLowerCase();
+ }
+
+ if (type === 'long' || type === 'time' || type === 'timestamp' || type === 'date') {
+ value = parseInt(value);
+
+ if (isNaN(value) || !isFinite(value)) {
+ _this.log('ignoring ' + attribute + ': the value must be a number');
+
+ value = null;
+ }
+ } else if (type === 'double') {
+ value = parseFloat(value);
+
+ if (isNaN(value) || !isFinite(value)) {
+ _this.log('ignoring ' + attribute + ': the value is not double');
+
+ value = null;
+ }
+ } else if (type === 'boolean') {
+ if (type === 'true' || type === '1') {
+ value = true;
+ } else if (type === 'false' || type === '0') {
+ value = false;
+ } else {
+ _this.log('ignoring ' + attribute + ': the value is not boolean');
+
+ value = null;
+ }
+ }
+
+ return value;
+ };
+
+ Rakam.prototype.logInlinedEvent = function (collection, extraProperties, callback) {
+ var getAllElementsWithAttribute = function (attribute) {
+ if (document.querySelectorAll) {
+ return document.querySelectorAll('[rakam-event-attribute]');
+ }
+
+ var matchingElements = [];
+ var allElements = document.getElementsByTagName('*');
+
+ for (var i = 0, n = allElements.length; i < n; i++) {
+ if (allElements[i].getAttribute(attribute) !== null) {
+ matchingElements.push(allElements[i]);
+ }
+ }
+
+ return matchingElements;
+ };
+
+ var properties = extraProperties || {};
+ var elements = getAllElementsWithAttribute('rakam-event-attribute');
+
+ for (var i = 0; i < elements.length; i++) {
+ var element = elements[i];
+ var attribute = element.getAttribute('rakam-event-attribute');
+ var value = element.getAttribute('rakam-event-attribute-value');
+ var type = element.getAttribute('rakam-event-attribute-type');
+
+ if (value === null) {
+ if (element.tagName === 'INPUT') {
+ value = element.value;
+ } else if (element.tagName === 'SELECT') {
+ var option = element.options[element.selectedIndex];
+
+ if (option.value !== null && option.value !== '') {
+ var attr = element.getAttribute('rakam-attribute-value');
+
+ if (attr !== 'value') {
+ value = option.value;
+ } else {
+ value = option.text;
+ }
+ }
+ } else if (element.innerText) {
+ value = element.innerText.replace(/^\s+|\s+$/g, '');
+ } else {
+ this.log('Could find value of DOM element.', element);
+ }
+ }
+
+ if (value !== null && value !== '') {
+ properties[attribute] = transformValue(this, attribute, value, type);
+ }
+ }
+
+ this.logEvent(collection, properties, callback);
+ };
+
+ Rakam.prototype.isReturningUser = function () {
+ return this._returningUser;
+ };
+
+ var gapMillis = 0;
+ var startTime = new Date().getTime();
+ var idleTime;
+ var initializedTimer = false;
+
+ Rakam.prototype.resetTimer = function () {
+ if (!initializedTimer) {
+ return this.log('Timer is not initialized');
+ }
+
+ idleTime = null;
+ gapMillis = 0;
+ startTime = new Date().getTime();
+ };
+
+ Rakam.prototype.startTimer = function (saveOnClose) {
+ if (initializedTimer) {
+ return this.log('Timer is already initialized');
+ }
+
+ startTime = new Date().getTime();
+ ifvisible.on('idle', function () {
+ idleTime = new Date().getTime();
+ });
+ ifvisible.on('wakeup', function () {
+ gapMillis += new Date().getTime() - idleTime;
+ idleTime = null;
+ });
+
+ if (saveOnClose) {
+ var func;
+
+ if (window.onbeforeunload !== null) {
+ func = window.onbeforeunload;
+ }
+
+ var _this = this;
+
+ window.onbeforeunload = function (e) {
+ Cookie.set('_rakam_time', _this.getTimeOnPage());
+
+ if (func) {
+ func(e);
+ }
+ };
+ }
+
+ initializedTimer = true;
+ };
+
+ Rakam.prototype.getTimeOnPage = function () {
+ if (!initializedTimer) {
+ return this.log('Timer is not initialized, returning null from getTimeOnPage()');
+ }
+
+ return ((idleTime > 0 ? idleTime : new Date().getTime()) - startTime - gapMillis) / 1000;
+ };
+
+ Rakam.prototype.getTimeOnPreviousPage = function () {
+ return Cookie.get('_rakam_time');
+ };
+
+ Rakam.prototype.nextEventId = function () {
+ this._eventId++;
+ return this._eventId;
+ }; // returns true if sendEvents called immediately
+
+
+ Rakam.prototype._sendEventsIfReady = function (callback) {
+ if (this._unsentEvents.length === 0) {
+ return false;
+ }
+
+ if (!this.options.batchEvents) {
+ this.sendEvents(callback);
+ return true;
+ }
+
+ if (this._unsentEvents.length >= this.options.eventUploadThreshold) {
+ this.sendEvents(callback);
+ return true;
+ }
+
+ setTimeout(this.sendEvents.bind(this), this.options.eventUploadPeriodMillis);
+ return false;
+ };
+
+ var _loadCookieData = function (scope) {
+ var cookieData = Cookie.get(scope.options.cookieName);
+
+ if (cookieData) {
+ if (cookieData.deviceId) {
+ scope.options.deviceId = cookieData.deviceId;
+ }
+
+ if (cookieData.userId) {
+ scope.options.userId = cookieData.userId;
+ }
+
+ if (cookieData.superProps) {
+ scope.options.superProperties = cookieData.superProps;
+ }
+
+ if (cookieData.optOut !== undefined) {
+ scope.options.optOut = cookieData.optOut;
+ }
+
+ if (cookieData.deviceIdCreatedAt !== undefined) {
+ scope.deviceIdCreatedAt = new Date(parseInt(cookieData.deviceIdCreatedAt));
+ }
+ }
+ };
+
+ var _saveCookieData = function (scope) {
+ Cookie.set(scope.options.cookieName, {
+ deviceId: scope.options.deviceId,
+ deviceIdCreatedAt: scope.deviceIdCreatedAt ? scope.deviceIdCreatedAt.getTime() : undefined,
+ userId: scope.options.userId,
+ superProps: scope.options.superProperties,
+ optOut: scope.options.optOut
+ });
+ };
+
+ Rakam._getUtmParam = function (name, query) {
+ name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
+ var regex = new RegExp('[\\?&]' + name + '=([^]*)');
+ var results = regex.exec(query);
+ return results === null ? undefined : decodeURIComponent(results[1].replace(/\+/g, ' '));
+ };
+
+ Rakam._getUtmData = function (rawCookie, query) {
+ // Translate the utmz cookie format into url query string format.
+ var cookie = rawCookie ? '?' + rawCookie.split('.').slice(-1)[0].replace(/\|/g, '&') : '';
+
+ var fetchParam = function (queryName, query, cookieName, cookie) {
+ return Rakam._getUtmParam(queryName, query) || Rakam._getUtmParam(cookieName, cookie);
+ };
+
+ return {
+ utm_source: fetchParam('utm_source', query, 'utmcsr', cookie),
+ utm_medium: fetchParam('utm_medium', query, 'utmcmd', cookie),
+ utm_campaign: fetchParam('utm_campaign', query, 'utmccn', cookie),
+ utm_term: fetchParam('utm_term', query, 'utmctr', cookie),
+ utm_content: fetchParam('utm_content', query, 'utmcct', cookie)
+ };
+ };
+ /**
+ * Parse the utm properties out of cookies and query for adding to user properties.
+ */
+
+
+ Rakam.prototype._initUtmData = function (queryParams, cookieParams) {
+ queryParams = queryParams || location.search;
+ cookieParams = cookieParams || Cookie.get('__utmz');
+ this._utmProperties = Rakam._getUtmData(cookieParams, queryParams);
+ };
+
+ Rakam.prototype._initTrackForms = function () {
+ var _this = this;
+
+ document.addEventListener('submit', function (event) {
+ var targetElement = event.target || event.srcElement;
+ var collection = targetElement.getAttribute('rakam-event-form');
+
+ if (targetElement.tagName === 'FORM' && collection) {
+ var properties = {};
+ var extraAttributes = targetElement.getAttribute('rakam-event-extra');
+
+ if (extraAttributes !== null) {
+ for (var key in JSON.parse(extraAttributes)) {
+ if (extraAttributes.hasOwnProperty(key)) {
+ properties[key] = extraAttributes[key];
+ }
+ }
+ }
+
+ for (var i = 0; i < targetElement.elements.length; i++) {
+ var element = targetElement.elements[i];
+ var type = element.getAttribute('rakam-event-attribute-type');
+ var formElemType;
+
+ if (element.hasAttribute('type')) {
+ formElemType = element.getAttribute('type').toLowerCase();
+ }
+
+ if (formElemType === 'password') {
+ continue;
+ }
+
+ if (type === null && element.tagName === 'INPUT' && formElemType === 'number') {
+ type = 'long';
+ }
+
+ if (element.hasAttribute('rakam-event-form-element-ignore')) {
+ continue;
+ }
+
+ var attribute;
+
+ if (element.hasAttribute('rakam-event-attribute')) {
+ attribute = element.getAttribute('rakam-event-attribute');
+ } else {
+ attribute = element.getAttribute('name');
+ }
+
+ if (element.hasAttribute('rakam-event-attribute-value')) {
+ properties[attribute] = transformValue(this, attribute, element.getAttribute('rakam-event-attribute-value'), type);
+ } else if (element.tagName === 'SELECT') {
+ properties[attribute] = transformValue(this, attribute, element.options[element.selectedIndex].value, type);
+ } else if (element.tagName === 'INPUT' || element.tagName === 'TEXTAREA') {
+ properties[attribute] = transformValue(this, attribute, element.value, type);
+ } else {
+ _this.log('Couldn\'t get value of form element: ' + attribute);
+ }
+ }
+
+ _this.logEvent(collection, properties);
+ }
+ });
+ };
+
+ Rakam.prototype._initTrackClicks = function () {
+ var _this = this;
+
+ document.addEventListener('click', function (event) {
+ var targetElement = event.target || event.srcElement;
+ var collection = targetElement.getAttribute('rakam-event-track');
+
+ if (targetElement.tagName === 'FORM' && collection) {
+ var properties = {};
+ var extraAttributes = targetElement.getAttribute('rakam-event-properties');
+
+ if (extraAttributes !== null) {
+ for (var key in JSON.parse(extraAttributes)) {
+ if (extraAttributes.hasOwnProperty(key)) {
+ properties[key] = extraAttributes[key];
+ }
+ }
+ }
+
+ _this.logEvent(collection, properties);
+ }
+ });
+ };
+
+ Rakam.prototype.saveEvents = function () {
+ try {
+ localStorage$1.setItem(this.options.unsentKey, JSON.stringify(this._unsentEvents));
+ } catch (e) {
+ this.log(e);
+ }
+ };
+
+ Rakam.prototype.setDomain = function (domain) {
+ try {
+ Cookie.options({
+ domain: domain
+ });
+ this.options.domain = Cookie.options().domain;
+
+ _loadCookieData(this);
+
+ _saveCookieData(this);
+
+ this.log('set domain=' + domain);
+ } catch (e) {
+ this.log(e);
+ }
+ };
+
+ Rakam.prototype.setUserId = function (userId) {
+ try {
+ var previousId = this.options.deviceId;
+ this.options.userId = userId !== undefined && userId !== null && '' + userId || null;
+
+ if (userId !== null && userId !== '' && userId !== undefined && (this._eventId > 0 && (previousId === null || previousId === undefined) || previousId !== null && previousId !== undefined)) {
+ var _this = this;
+
+ this.User()._merge(previousId, this.deviceIdCreatedAt, function () {
+ _this.deviceIdCreatedAt = null;
+
+ _saveCookieData(_this);
+ });
+ }
+
+ _saveCookieData(this);
+
+ this.log('set userId=' + userId);
+ } catch (e) {
+ this.log(e);
+ }
+ };
+
+ Rakam.prototype.setUserProperties = function (parameters) {
+ try {
+ return new this.User().set(parameters);
+ } catch (e) {
+ this.log(e);
+ }
+ };
+
+ Rakam.prototype.getUserId = function () {
+ return this.options.userId;
+ };
+
+ Rakam.prototype.getDeviceId = function () {
+ return this._eventId > 0 ? this.options.deviceId : null;
+ };
+
+ Rakam.prototype.setOptOut = function (enable) {
+ try {
+ this.options.optOut = enable;
+
+ _saveCookieData(this);
+
+ this.log('set optOut=' + enable);
+ } catch (e) {
+ this.log(e);
+ }
+ };
+
+ Rakam.prototype.setDeviceId = function (deviceId) {
+ try {
+ if (deviceId) {
+ this.options.deviceId = '' + deviceId;
+
+ _saveCookieData(this);
+ }
+ } catch (e) {
+ this.log(e);
+ }
+ };
+
+ Rakam.prototype.setSuperProperties = function (eventProps, opt_replace) {
+ try {
+ this.options.superProperties = this.options.superProperties || {};
+
+ for (var property in eventProps) {
+ if (eventProps.hasOwnProperty(property)) {
+ if (opt_replace === false && this.options.superProperties[property] !== undefined) {
+ continue;
+ }
+
+ this.options.superProperties[property] = eventProps[property];
+ }
+ }
+
+ _saveCookieData(this);
+
+ this.log('set super properties=' + JSON.stringify(eventProps));
+ } catch (e) {
+ this.log(e);
+ }
+ };
+
+ Rakam.prototype.setVersionName = function (versionName) {
+ try {
+ this.options.versionName = versionName;
+ this.log('set versionName=' + versionName);
+ } catch (e) {
+ this.log(e);
+ }
+ };
+ /**
+ * Private logEvent method. Keeps apiProperties from being publicly exposed.
+ */
+
+
+ Rakam.prototype._logEvent = function (eventType, eventProperties, apiProperties, callback) {
+ if (typeof callback !== 'function') {
+ callback = null;
+ }
+
+ if (!eventType || this.options.optOut) {
+ if (callback) {
+ callback(0, 'No request sent');
+ }
+
+ return;
+ }
+
+ try {
+ var eventTime = new Date().getTime();
+ var eventId = this.nextEventId();
+
+ if (!this._sessionId || !this._lastEventTime || eventTime - this._lastEventTime > this.options.sessionTimeout) {
+ this._sessionId = eventTime;
+ setSessionItem(this.options, StorageKeys.SESSION_ID, this._sessionId);
+ }
+
+ this._lastEventTime = eventTime;
+ setSessionItem(this.options, StorageKeys.LAST_EVENT_TIME, this._lastEventTime);
+ setSessionItem(this.options, StorageKeys.LAST_ID, eventId);
+ apiProperties = apiProperties || {};
+ eventProperties = eventProperties || {}; // Add the utm properties, if any, onto the event properties.
+
+ merge(eventProperties, this._utmProperties);
+ var event = {
+ collection: eventType,
+ properties: {
+ _device_id: this.options.deviceId,
+ _user: this.options.userId,
+ // use seconds
+ _time: parseInt(eventTime / 1000) * 1000,
+ _session_id: this._sessionId || -1,
+ _platform: this.options.platform,
+ _language: this.options.language
+ }
+ };
+ merge(event.properties, this.options.superProperties);
+ merge(event.properties, apiProperties);
+ merge(event.properties, eventProperties);
+ this.log('logged eventType=' + eventType + ', properties=' + JSON.stringify(eventProperties));
+
+ this._unsentEvents.push({
+ id: eventId,
+ event: event
+ }); // Remove old events from the beginning of the array if too many
+ // have accumulated. Don't want to kill memory. Default is 1000 events.
+
+
+ if (this._unsentEvents.length > this.options.savedMaxCount) {
+ this._unsentEvents.splice(0, this._unsentEvents.length - this.options.savedMaxCount);
+ }
+
+ if (this.options.saveEvents) {
+ this.saveEvents();
+ }
+
+ if (!this._sendEventsIfReady(callback) && callback) {
+ callback(0, 'No request sent');
+ }
+
+ return eventId;
+ } catch (e) {
+ this.log(e);
+ }
+ };
+
+ Rakam.prototype.logEvent = function (eventType, eventProperties, callback) {
+ return this._logEvent(eventType, eventProperties, null, callback);
+ };
+ /**
+ * Remove events in storage with event ids up to and including maxEventId. Does
+ * a true filter in case events get out of order or old events are removed.
+ */
+
+
+ Rakam.prototype.removeEvents = function (maxEventId, errors) {
+ var filteredEvents = [];
+ var errorList = errors || [];
+
+ for (var i = 0; i < this._unsentEvents.length; i++) {
+ var id = this._unsentEvents[i].id;
+
+ if (errorList.indexOf(id) > -1 || id > maxEventId) {
+ filteredEvents.push(this._unsentEvents[i]);
+ }
+ }
+
+ this._unsentEvents = filteredEvents;
+ };
+
+ Rakam.prototype.sendEvents = function (callback) {
+ var _this = this;
+
+ if (!this._sending && !this.options.optOut && this._unsentEvents.length > 0) {
+ this._sending = true;
+ var url = ('https:' === window.location.protocol ? 'https' : 'http') + '://' + this.options.apiEndpoint + this.options.eventEndpointPath; // Determine how many events to send and track the maximum event id sent in this batch.
+
+ var numEvents = Math.min(this._unsentEvents.length, this.options.uploadBatchSize);
+ var maxEventId = this._unsentEvents[numEvents - 1].id;
+
+ this._unsentEvents.slice(0, numEvents);
+
+ var events = this._unsentEvents.slice(0, numEvents).map(function (e) {
+ return e.event;
+ });
+
+ var upload_time = new Date().getTime();
+ var api = {
+ 'upload_time': upload_time,
+ 'api_version': API_VERSION$1,
+ 'api_key': this.options.apiKey //"checksum": md5(API_VERSION + JSON.stringify(events) + upload_time).toUpperCase()
+
+ };
+ var scope = this;
+ new Request(url, {
+ api: api,
+ events: events
+ }).send(function (status, response, headers) {
+ scope._sending = false;
+
+ try {
+ if (status === 200 || status === 409) {
+ _this.log('successful upload');
+
+ scope.removeEvents(maxEventId, status === 409 ? JSON.parse(response) : null); // Update the event cache after the removal of sent events.
+
+ if (scope.options.saveEvents) {
+ scope.saveEvents();
+ } // Send more events if any queued during previous send.
+
+
+ if (!scope._sendEventsIfReady(callback) && callback) {
+ callback(status, response);
+ }
+ } else if (status === 413) {
+ _this.log('request too large'); // Can't even get this one massive event through. Drop it.
+
+
+ if (scope.options.uploadBatchSize === 1) {
+ scope.removeEvents(maxEventId);
+ } // The server complained about the length of the request.
+ // Backoff and try again.
+
+
+ scope.options.uploadBatchSize = Math.ceil(numEvents / 2);
+ scope.sendEvents(callback);
+ } else if (callback) {
+ // If server turns something like a 400
+ callback(status, response);
+ }
+ } catch (e) {
+ _this.log('failed upload');
+ }
+
+ if (scope.options.eventCallbacks) {
+ try {
+ for (var i = 0; i < scope.options.eventCallbacks.length; i++) {
+ scope.options.eventCallbacks[i](status, response, headers);
+ }
+ } catch (e) {
+ _this.log('callback throws an exception', e);
+ }
+ }
+ });
+ } else if (callback) {
+ callback(0, 'No request sent');
+ }
+ };
+
+ Rakam.prototype.onload = function (callback) {
+ var _this = this;
+
+ setTimeout(function () {
+ callback();
+
+ _this.log('executed callback', callback);
+ }, 1);
+ };
+
+ Rakam.prototype.runQueuedFunctions = function () {
+ for (var i = 0; i < this._q.length; i++) {
+ var fn = this[this._q[i][0]];
+
+ if (fn && type(fn) === 'function') {
+ fn.apply(this, this._q[i].slice(1));
+ }
+ }
+
+ this._q = []; // clear function queue after running
+ };
+
+ Rakam.prototype.__VERSION__ = version;
+
+ /* jshint expr:true */
+ var old = window.rakam || {};
+ var instance = new Rakam();
+ instance._q = old._q || []; // export the instance
+
+ return instance;
+
+})));
diff --git a/rakam.nocompat.min.js b/rakam.nocompat.min.js
new file mode 100644
index 0000000..8e1cb67
--- /dev/null
+++ b/rakam.nocompat.min.js
@@ -0,0 +1 @@
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("top-domain"),require("ifvisible")):"function"==typeof define&&define.amd?define(["top-domain","ifvisible"],e):(t=t||self).rakam=e(t.topDomain,t.ifvisible)}(this,function(o,i){"use strict";o=o&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o,i=i&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i;function r(t){var e="";return s.domain&&(e="."===s.domain.charAt(0)?s.domain.substring(1):s.domain),t+e}var t,l=function(t){for(var e="",n=0;n>6|192):(e+=String.fromCharCode(i>>12|224),e+=String.fromCharCode(i>>6&63|128)),e+=String.fromCharCode(63&i|128))}return e},p=function(t){for(var e,n,i="",o=0,s=0;o>2,s=(3&e)<<4|(n=t.charCodeAt(p++))>>4,r=(15&n)<<2|(i=t.charCodeAt(p++))>>6,a=63&i,isNaN(n)?r=a=64:isNaN(i)&&(a=64),u=u+d._keyStr.charAt(o)+d._keyStr.charAt(s)+d._keyStr.charAt(r)+d._keyStr.charAt(a);return u},decode:function(t){try{if(window.btoa&&window.atob)return decodeURIComponent(escape(window.atob(t)))}catch(t){}return d._decode(t)},_decode:function(t){var e,n,i,o,s,r,a="",u=0;for(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");u>4,n=(15&o)<<4|(s=d._keyStr.indexOf(t.charAt(u++)))>>2,i=(3&s)<<6|(r=d._keyStr.indexOf(t.charAt(u++))),a+=String.fromCharCode(e),64!==s&&(a+=String.fromCharCode(n)),64!==r&&(a+=String.fromCharCode(i));return a=p(a)}},s={expirationDays:void 0,domain:void 0},a=function(t){try{for(var e=r(t)+"=",n=document.cookie.split(";"),i=null,o=0;o>t/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,b)},E=Object.prototype.toString;function I(t){switch(E.call(t)){case"[object Date]":return"date";case"[object RegExp]":return"regexp";case"[object Arguments]":return"arguments";case"[object Array]":return"array";case"[object Error]":return"error"}return null===t?"null":void 0===t?"undefined":t!=t?"nan":t&&1===t.nodeType?"element":"undefined"!=typeof Buffer&&Buffer.isBuffer(t)?"buffer":typeof(t=t.valueOf?t.valueOf():Object.prototype.valueOf.apply(t))}function w(t,e,i){return function(t,e,n){void 0!==i&&i(t,e,n)}}function k(t){return("https:"===window.location.protocol?"https":"http")+"://"+t.apiEndpoint+"/user"}function T(){}T.prototype.init=function(t){this.options=t},T.prototype.set=function(t,e){return new y(k(this.options)+"/set_properties",{api:{api_version:1,api_key:this.options.apiKey},id:this.options.userId,properties:t}).send(w(0,0,e)),this},T.prototype._merge=function(t,e,n){return new y(k(this.options)+"/merge",{api:{api_version:1,api_key:this.options.apiKey,upload_time:(new Date).getTime()},anonymous_id:t,id:this.options.userId,created_at:e?e.getTime():null,merged_at:(new Date).getTime()}).send(w(0,0,n)),this},T.prototype.setOnce=function(t,e){return new y(k(this.options)+"/set_properties_once",{api:{api_version:1,api_key:this.options.apiKey},id:this.options.userId,properties:t}).send(w(0,0,e)),this},T.prototype.increment=function(t,e,n){return new y(k(this.options)+"/increment_property",{api:{api_version:1,api_key:this.options.apiKey},id:this.options.userId,property:t,value:e}).send(w(0,0,n)),this};function S(t,e){return t.useLocalStorageForSessionization?g.getItem(e):c.get(e)}function C(t,e,n){t.useLocalStorageForSessionization?g.setItem(e,n):c.set(e,n)}function A(){this._unsentEvents=[],this.options=_({},O)}var O={apiEndpoint:"app.rakam.io",eventEndpointPath:"/event/batch",cookieExpiration:3650,cookieName:"rakam_id",domain:void 0,includeUtm:!(T.prototype.unset=function(t,e){return new y(k(this.options)+"/unset_properties",{api:{api_version:1,api_key:this.options.apiKey},id:this.options.userId,properties:"array"===I(t)?t:[t]}).send(w(0,0,e)),this}),trackForms:!1,language:e.language,optOut:!1,platform:"Web",savedMaxCount:1e3,saveEvents:!0,sessionTimeout:18e5,unsentKey:"rakam_unsent",uploadBatchSize:100,batchEvents:!1,eventUploadThreshold:30,eventUploadPeriodMillis:3e4,useLocalStorageForSessionization:!0},P="rakam_lastEventId",N="rakam_lastEventTime",U="rakam_sessionId",x="rakam_returning";A.prototype._eventId=0,A.prototype._returningUser=!1,A.prototype._sending=!1,A.prototype._lastEventTime=null,A.prototype._sessionId=null,A.prototype._newSession=!1,A.prototype.log=function(t){!0===this.options.debug&&console.log("[Rakam] "+t)},A.prototype.init=function(t,e,n,i){try{if(!t)throw new Error("apiKey is null");this.options.apiKey=t;var o=new T;if(o.init(this.options),this.User=function(){return o},n&&(this.options.apiEndpoint=n.apiEndpoint||this.options.apiEndpoint,this.options.debug=n.debug||!0===this.options.debug,void 0!==n.saveEvents&&(this.options.saveEvents=!!n.saveEvents),void 0!==n.domain&&(this.options.domain=n.domain),void 0!==n.includeUtm&&(this.options.includeUtm=!!n.includeUtm),void 0!==n.trackClicks&&(this.options.trackClicks=!!n.trackClicks),void 0!==n.trackForms&&(this.options.trackForms=!!n.trackForms),void 0!==n.batchEvents&&(this.options.batchEvents=!!n.batchEvents),this.options.platform=n.platform||this.options.platform,this.options.useLocalStorageForSessionization=n.useLocalStorageForSessionization||this.options.useLocalStorageForSessionization,this.options.language=n.language||this.options.language,this.options.sessionTimeout=n.sessionTimeout||this.options.sessionTimeout,this.options.uploadBatchSize=n.uploadBatchSize||this.options.uploadBatchSize,this.options.eventUploadThreshold=n.eventUploadThreshold||this.options.eventUploadThreshold,this.options.savedMaxCount=n.savedMaxCount||this.options.savedMaxCount,this.options.eventUploadPeriodMillis=n.eventUploadPeriodMillis||this.options.eventUploadPeriodMillis,this.options.superProperties=n.superProperties||[]),c.options({expirationDays:this.options.cookieExpiration,domain:this.options.domain}),this.options.domain=c.options().domain,F(this),n&&void 0!==n.deviceId&&null!==n.deviceId&&n.deviceId||this.options.deviceId?this.options.deviceId=this.options.deviceId:(this.deviceIdCreatedAt=new Date,this.options.deviceId=b()),L(this),this.log("initialized with apiKey="+t),this.options.saveEvents){var s=g.getItem(this.options.unsentKey);if(s)try{this._unsentEvents=JSON.parse(s)}catch(t){this.log(t)}}this._sendEventsIfReady(),this.options.includeUtm&&this._initUtmData(),this.options.trackForms&&this._initTrackForms(),this.options.trackClicks&&this._initTrackClicks(),this._lastEventTime=parseInt(S(this.options,N))||null,this._sessionId=parseInt(S(this.options,U))||null,this._eventId=g.getItem(P)||0;var r=(new Date).getTime();!this._sessionId||!this._lastEventTime||r-this._lastEventTime>this.options.sessionTimeout?(null!==this._sessionId&&(C(this.options,x,!0),this._returningUser=!0),this._sessionId=r,c.remove("_rakam_time"),C(this.options,U,this._sessionId)):this._returningUser="true"===S(this.options,x),this._lastEventTime=r,C(this.options,N,this._lastEventTime)}catch(t){this.log(t)}this.setUserId(e),i&&"function"==typeof i&&setTimeout(function(){i()},1)},A.prototype.onEvent=function(t){this.options.eventCallbacks=this.options.eventCallbacks||[],this.options.eventCallbacks.push(t)};function D(t,e,n,i){return null!==i&&(i=i.toLowerCase()),"long"===i||"time"===i||"timestamp"===i||"date"===i?(n=parseInt(n),!isNaN(n)&&isFinite(n)||(t.log("ignoring "+e+": the value must be a number"),n=null)):"double"===i?(n=parseFloat(n),!isNaN(n)&&isFinite(n)||(t.log("ignoring "+e+": the value is not double"),n=null)):"boolean"===i&&(n="true"===i||"1"===i||"false"!==i&&"0"!==i&&(t.log("ignoring "+e+": the value is not boolean"),null)),n}A.prototype.logInlinedEvent=function(t,e,n){for(var i=e||{},o=function(t){if(document.querySelectorAll)return document.querySelectorAll("[rakam-event-attribute]");for(var e=[],n=document.getElementsByTagName("*"),i=0,o=n.length;i=this.options.eventUploadThreshold?(this.sendEvents(t),!0):(setTimeout(this.sendEvents.bind(this),this.options.eventUploadPeriodMillis),!1))};var F=function(t){var e=c.get(t.options.cookieName);e&&(e.deviceId&&(t.options.deviceId=e.deviceId),e.userId&&(t.options.userId=e.userId),e.superProps&&(t.options.superProperties=e.superProps),void 0!==e.optOut&&(t.options.optOut=e.optOut),void 0!==e.deviceIdCreatedAt&&(t.deviceIdCreatedAt=new Date(parseInt(e.deviceIdCreatedAt))))},L=function(t){c.set(t.options.cookieName,{deviceId:t.options.deviceId,deviceIdCreatedAt:t.deviceIdCreatedAt?t.deviceIdCreatedAt.getTime():void 0,userId:t.options.userId,superProps:t.options.superProperties,optOut:t.options.optOut})};A._getUtmParam=function(t,e){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var n=new RegExp("[\\?&]"+t+"=([^]*)").exec(e);return null===n?void 0:decodeURIComponent(n[1].replace(/\+/g," "))},A._getUtmData=function(t,e){function n(t,e,n,i){return A._getUtmParam(t,e)||A._getUtmParam(n,i)}var i=t?"?"+t.split(".").slice(-1)[0].replace(/\|/g,"&"):"";return{utm_source:n("utm_source",e,"utmcsr",i),utm_medium:n("utm_medium",e,"utmcmd",i),utm_campaign:n("utm_campaign",e,"utmccn",i),utm_term:n("utm_term",e,"utmctr",i),utm_content:n("utm_content",e,"utmcct",i)}},A.prototype._initUtmData=function(t,e){t=t||location.search,e=e||c.get("__utmz"),this._utmProperties=A._getUtmData(e,t)},A.prototype._initTrackForms=function(){var d=this;document.addEventListener("submit",function(t){var e=t.target||t.srcElement,n=e.getAttribute("rakam-event-form");if("FORM"===e.tagName&&n){var i={},o=e.getAttribute("rakam-event-extra");if(null!==o)for(var s in JSON.parse(o))o.hasOwnProperty(s)&&(i[s]=o[s]);for(var r=0;rthis.options.sessionTimeout)||(this._sessionId=o,C(this.options,U,this._sessionId)),this._lastEventTime=o,C(this.options,N,this._lastEventTime),C(this.options,P,s),n=n||{},_(e=e||{},this._utmProperties);var r={collection:t,properties:{_device_id:this.options.deviceId,_user:this.options.userId,_time:1e3*parseInt(o/1e3),_session_id:this._sessionId||-1,_platform:this.options.platform,_language:this.options.language}};return _(r.properties,this.options.superProperties),_(r.properties,n),_(r.properties,e),this.log("logged eventType="+t+", properties="+JSON.stringify(e)),this._unsentEvents.push({id:s,event:r}),this._unsentEvents.length>this.options.savedMaxCount&&this._unsentEvents.splice(0,this._unsentEvents.length-this.options.savedMaxCount),this.options.saveEvents&&this.saveEvents(),!this._sendEventsIfReady(i)&&i&&i(0,"No request sent"),s}catch(t){this.log(t)}else i&&i(0,"No request sent")},A.prototype.logEvent=function(t,e,n){return this._logEvent(t,e,null,n)},A.prototype.removeEvents=function(t,e){for(var n=[],i=e||[],o=0;o 127 && c < 2048) {
+ utftext += String.fromCharCode(c >> 6 | 192);
+ utftext += String.fromCharCode(c & 63 | 128);
+ } else {
+ utftext += String.fromCharCode(c >> 12 | 224);
+ utftext += String.fromCharCode(c >> 6 & 63 | 128);
+ utftext += String.fromCharCode(c & 63 | 128);
+ }
+ }
+
+ return utftext;
+ },
+ decode: function (utftext) {
+ var s = '';
+ var i = 0;
+ var c = 0,
+ c1 = 0,
+ c2 = 0;
+
+ while (i < utftext.length) {
+ c = utftext.charCodeAt(i);
+
+ if (c < 128) {
+ s += String.fromCharCode(c);
+ i++;
+ } else if (c > 191 && c < 224) {
+ c1 = utftext.charCodeAt(i + 1);
+ s += String.fromCharCode((c & 31) << 6 | c1 & 63);
+ i += 2;
+ } else {
+ c1 = utftext.charCodeAt(i + 1);
+ c2 = utftext.charCodeAt(i + 2);
+ s += String.fromCharCode((c & 15) << 12 | (c1 & 63) << 6 | c2 & 63);
+ i += 3;
+ }
+ }
+
+ return s;
+ }
+ };
+
+ /* jshint bitwise: false */
+ /*
+ * Base64 encoder/decoder
+ * http://www.webtoolkit.info/
+ */
+
+ var Base64 = {
+ _keyStr: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=',
+ encode: function (input) {
+ try {
+ if (window.btoa && window.atob) {
+ return window.btoa(unescape(encodeURIComponent(input)));
+ }
+ } catch (e) {//log(e);
+ }
+
+ return Base64._encode(input);
+ },
+ _encode: function (input) {
+ var output = '';
+ var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
+ var i = 0;
+ input = UTF8.encode(input);
+
+ while (i < input.length) {
+ chr1 = input.charCodeAt(i++);
+ chr2 = input.charCodeAt(i++);
+ chr3 = input.charCodeAt(i++);
+ enc1 = chr1 >> 2;
+ enc2 = (chr1 & 3) << 4 | chr2 >> 4;
+ enc3 = (chr2 & 15) << 2 | chr3 >> 6;
+ enc4 = chr3 & 63;
+
+ if (isNaN(chr2)) {
+ enc3 = enc4 = 64;
+ } else if (isNaN(chr3)) {
+ enc4 = 64;
+ }
+
+ output = output + Base64._keyStr.charAt(enc1) + Base64._keyStr.charAt(enc2) + Base64._keyStr.charAt(enc3) + Base64._keyStr.charAt(enc4);
+ }
+
+ return output;
+ },
+ decode: function (input) {
+ try {
+ if (window.btoa && window.atob) {
+ return decodeURIComponent(escape(window.atob(input)));
+ }
+ } catch (e) {//log(e);
+ }
+
+ return Base64._decode(input);
+ },
+ _decode: function (input) {
+ var output = '';
+ var chr1, chr2, chr3;
+ var enc1, enc2, enc3, enc4;
+ var i = 0;
+ input = input.replace(/[^A-Za-z0-9\+\/\=]/g, '');
+
+ while (i < input.length) {
+ enc1 = Base64._keyStr.indexOf(input.charAt(i++));
+ enc2 = Base64._keyStr.indexOf(input.charAt(i++));
+ enc3 = Base64._keyStr.indexOf(input.charAt(i++));
+ enc4 = Base64._keyStr.indexOf(input.charAt(i++));
+ chr1 = enc1 << 2 | enc2 >> 4;
+ chr2 = (enc2 & 15) << 4 | enc3 >> 2;
+ chr3 = (enc3 & 3) << 6 | enc4;
+ output = output + String.fromCharCode(chr1);
+
+ if (enc3 !== 64) {
+ output = output + String.fromCharCode(chr2);
+ }
+
+ if (enc4 !== 64) {
+ output = output + String.fromCharCode(chr3);
+ }
+ }
+
+ output = UTF8.decode(output);
+ return output;
+ }
+ };
+
+ /*
+ * Cookie data
+ */
+
+ var _options = {
+ expirationDays: undefined,
+ domain: undefined
+ };
+
+ var reset = function () {
+ _options = {};
+ };
+
+ var options = function (opts) {
+ if (arguments.length === 0) {
+ return _options;
+ }
+
+ opts = opts || {};
+ _options.expirationDays = opts.expirationDays;
+ var domain = opts.domain !== undefined ? opts.domain : '.';
+ var token = Math.random();
+ _options.domain = domain;
+ set('rakam_test', token);
+ var stored = get('rakam_test');
+
+ if (!stored || stored !== token) {
+ domain = null;
+ }
+
+ remove('rakam_test');
+ _options.domain = domain;
+ };
+
+ var _domainSpecific = function (name) {
+ // differentiate between cookies on different domains
+ var suffix = '';
+
+ if (_options.domain) {
+ suffix = _options.domain.charAt(0) === '.' ? _options.domain.substring(1) : _options.domain;
+ }
+
+ return name + suffix;
+ };
+
+ var get = function (name) {
+ try {
+ var nameEq = _domainSpecific(name) + '=';
+ var ca = document.cookie.split(';');
+ var value = null;
+
+ for (var i = 0; i < ca.length; i++) {
+ var c = ca[i];
+
+ while (c.charAt(0) === ' ') {
+ c = c.substring(1, c.length);
+ }
+
+ if (c.indexOf(nameEq) === 0) {
+ value = c.substring(nameEq.length, c.length);
+ break;
+ }
+ }
+
+ if (value) {
+ return JSON.parse(Base64.decode(value));
+ }
+
+ return null;
+ } catch (e) {
+ return null;
+ }
+ };
+
+ var set = function (name, value) {
+ try {
+ _set(_domainSpecific(name), Base64.encode(JSON.stringify(value)), _options);
+
+ return true;
+ } catch (e) {
+ return false;
+ }
+ };
+
+ var _set = function (name, value, opts) {
+ var expires = value !== null ? opts.expirationDays : -1;
+
+ if (expires) {
+ var date = new Date();
+ date.setTime(date.getTime() + expires * 24 * 60 * 60 * 1000);
+ expires = date;
+ }
+
+ var str = name + '=' + value;
+
+ if (expires) {
+ str += '; expires=' + expires.toUTCString();
+ }
+
+ str += '; path=/';
+
+ if (opts.domain) {
+ str += '; domain=' + opts.domain;
+ }
+
+ document.cookie = str;
+ };
+
+ var remove = function (name) {
+ try {
+ _set(_domainSpecific(name), null, _options);
+
+ return true;
+ } catch (e) {
+ return false;
+ }
+ };
+
+ var Cookie = {
+ reset: reset,
+ options: options,
+ get: get,
+ set: set,
+ remove: remove
+ };
+
+ var getLanguage = function () {
+ return navigator && (navigator.languages && navigator.languages[0] || navigator.language || navigator.userLanguage) || undefined;
+ };
+
+ var language = {
+ language: getLanguage()
+ };
+
+ /* jshint -W020, unused: false, noempty: false, boss: true */
+
+ /*
+ * Implement localStorage to support Firefox 2-3 and IE 5-7
+ */
+ var localStorage; // jshint ignore:line
+ // test that Window.localStorage is available and works
+
+ function windowLocalStorageAvailable() {
+ var uid = new Date();
+ var result;
+
+ try {
+ window.localStorage.setItem(uid, uid);
+ result = window.localStorage.getItem(uid) === String(uid);
+ window.localStorage.removeItem(uid);
+ return result;
+ } catch (e) {// localStorage not available
+ }
+
+ return false;
+ }
+
+ if (windowLocalStorageAvailable()) {
+ localStorage = window.localStorage;
+ } else if (window.globalStorage) {
+ // Firefox 2-3 use globalStorage
+ // See https://developer.mozilla.org/en/dom/storage#globalStorage
+ try {
+ localStorage = window.globalStorage[window.location.hostname];
+ } catch (e) {// Something bad happened...
+ }
+ } else {
+ // IE 5-7 use userData
+ // See http://msdn.microsoft.com/en-us/library/ms531424(v=vs.85).aspx
+ var div = document.createElement('div'),
+ attrKey = 'localStorage';
+ div.style.display = 'none';
+ document.getElementsByTagName('head')[0].appendChild(div);
+
+ if (div.addBehavior) {
+ div.addBehavior('#default#userdata');
+ localStorage = {
+ length: 0,
+ setItem: function (k, v) {
+ div.load(attrKey);
+
+ if (!div.getAttribute(k)) {
+ this.length++;
+ }
+
+ div.setAttribute(k, v);
+ div.save(attrKey);
+ },
+ getItem: function (k) {
+ div.load(attrKey);
+ return div.getAttribute(k);
+ },
+ removeItem: function (k) {
+ div.load(attrKey);
+
+ if (div.getAttribute(k)) {
+ this.length--;
+ }
+
+ div.removeAttribute(k);
+ div.save(attrKey);
+ },
+ clear: function () {
+ div.load(attrKey);
+ var i = 0;
+ var attr;
+
+ while (attr = div.XMLDocument.documentElement.attributes[i++]) {
+ div.removeAttribute(attr.name);
+ }
+
+ div.save(attrKey);
+ this.length = 0;
+ },
+ key: function (k) {
+ div.load(attrKey);
+ return div.XMLDocument.documentElement.attributes[k];
+ }
+ };
+ div.load(attrKey);
+ localStorage.length = div.XMLDocument.documentElement.attributes.length;
+ }
+ }
+
+ if (!localStorage) {
+ localStorage = {
+ length: 0,
+ setItem: function (k, v) {},
+ getItem: function (k) {},
+ removeItem: function (k) {},
+ clear: function () {},
+ key: function (k) {}
+ };
+ }
+
+ var localStorage$1 = localStorage;
+
+ var object = {};
+ var has = object.hasOwnProperty;
+ function merge(a, b) {
+ for (var key in b) {
+ if (has.call(b, key)) {
+ a[key] = b[key];
+ }
+ }
+
+ return a;
+ }
+
+ /*
+ * Simple AJAX request object
+ */
+ var Request = function (url, data, headers) {
+ this.url = url;
+ this.data = data || {};
+ this.headers = headers || {};
+ };
+
+ function parseResponseHeaders(headerStr) {
+ var headers = {};
+
+ if (!headerStr) {
+ return headers;
+ }
+
+ var headerPairs = headerStr.split('\u000d\u000a');
+
+ for (var i = 0; i < headerPairs.length; i++) {
+ var headerPair = headerPairs[i]; // Can't use split() here because it does the wrong thing
+ // if the header value has the string ": " in it.
+
+ var index = headerPair.indexOf('\u003a\u0020');
+
+ if (index > 0) {
+ var key = headerPair.substring(0, index);
+ var val = headerPair.substring(index + 2);
+ headers[key] = val;
+ }
+ }
+
+ return headers;
+ }
+
+ Request.prototype.send = function (callback) {
+ var isIE = window.XDomainRequest ? true : false;
+
+ if (isIE) {
+ var xdr = new window.XDomainRequest();
+ xdr.open('POST', this.url, true);
+
+ xdr.onload = function () {
+ callback(xdr.responseText);
+ };
+
+ xdr.send(JSON.stringify(this.data));
+ } else {
+ var xhr = new XMLHttpRequest();
+ xhr.withCredentials = "true";
+ xhr.open('POST', this.url, true);
+
+ xhr.onreadystatechange = function () {
+ if (xhr.readyState === 4) {
+ callback(xhr.status, xhr.responseText, parseResponseHeaders(xhr.getAllResponseHeaders()));
+ }
+ };
+
+ xhr.setRequestHeader('Content-Type', 'text/plain');
+
+ for (var key in this.headers) {
+ if (this.headers.hasOwnProperty(key)) {
+ xhr.setRequestHeader(key, this.headers[key]);
+ }
+ }
+
+ xhr.send(JSON.stringify(this.data));
+ }
+ };
+
+ /* jshint bitwise: false, laxbreak: true */
+
+ /**
+ * Taken straight from jed's gist: https://gist.github.com/982883
+ *
+ * Returns a random v4 UUID of the form xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx,
+ * where each x is replaced with a random hexadecimal digit from 0 to f, and
+ * y is replaced with a random hexadecimal digit from 8 to b.
+ */
+ var uuid = function (a) {
+ return a // if the placeholder was passed, return
+ ? ( // a random number from 0 to 15
+ a ^ // unless b is 8,
+ Math.random() // in which case
+ * 16 // a random number from
+ >> a / 4 // 8 to 11
+ ).toString(16) // in hexadecimal
+ : ( // or otherwise a concatenated string:
+ [1e7] + // 10000000 +
+ -1e3 + // -1000 +
+ -4e3 + // -4000 +
+ -8e3 + // -80000000 +
+ -1e11 // -100000000000,
+ ).replace( // replacing
+ /[018]/g, // zeroes, ones, and eights with
+ uuid // random hex digits
+ );
+ };
+
+ var version = '2.6.0';
+
+ /* Taken from: https://github.com/component/type */
+
+ /**
+ * toString ref.
+ */
+ var toString = Object.prototype.toString;
+ /**
+ * Return the type of `val`.
+ *
+ * @param {Mixed} val
+ * @return {String}
+ * @api public
+ */
+
+ function type (val) {
+ switch (toString.call(val)) {
+ case '[object Date]':
+ return 'date';
+
+ case '[object RegExp]':
+ return 'regexp';
+
+ case '[object Arguments]':
+ return 'arguments';
+
+ case '[object Array]':
+ return 'array';
+
+ case '[object Error]':
+ return 'error';
+ }
+
+ if (val === null) {
+ return 'null';
+ }
+
+ if (val === undefined) {
+ return 'undefined';
+ }
+
+ if (val !== val) {
+ return 'nan';
+ }
+
+ if (val && val.nodeType === 1) {
+ return 'element';
+ }
+
+ if (typeof Buffer !== 'undefined' && Buffer.isBuffer(val)) {
+ return 'buffer';
+ }
+
+ val = val.valueOf ? val.valueOf() : Object.prototype.valueOf.apply(val);
+ return typeof val;
+ }
+
+ /*
+ * Wrapper for a user properties JSON object that supports operations.
+ * Note: if a user property is used in multiple operations on the same User object,
+ * only the first operation will be saved, and the rest will be ignored.
+ */
+
+ var API_VERSION = 1;
+
+ var wrapCallback = function (operation, props, callback) {
+ return function (status, response, headers) {
+ if (callback !== undefined) {
+ callback(status, response, headers);
+ }
+ };
+ };
+
+ var getUrl = function (options) {
+ return ('https:' === window.location.protocol ? 'https' : 'http') + '://' + options.apiEndpoint + "/user";
+ };
+
+ var User = function () {};
+
+ User.prototype.init = function (options) {
+ this.options = options;
+ };
+
+ User.prototype.set = function (properties, callback) {
+ new Request(getUrl(this.options) + "/set_properties", {
+ api: {
+ "api_version": API_VERSION,
+ "api_key": this.options.apiKey
+ },
+ id: this.options.userId,
+ properties: properties
+ }).send(wrapCallback("set_properties", properties, callback));
+ return this;
+ };
+
+ User.prototype._merge = function (deviceId, createdAt, callback) {
+ new Request(getUrl(this.options) + "/merge", {
+ api: {
+ "api_version": API_VERSION,
+ "api_key": this.options.apiKey,
+ "upload_time": new Date().getTime()
+ },
+ anonymous_id: deviceId,
+ id: this.options.userId,
+ created_at: createdAt ? createdAt.getTime() : null,
+ merged_at: new Date().getTime()
+ }).send(wrapCallback("merge", null, callback));
+ return this;
+ };
+
+ User.prototype.setOnce = function (properties, callback) {
+ new Request(getUrl(this.options) + "/set_properties_once", {
+ api: {
+ "api_version": API_VERSION,
+ "api_key": this.options.apiKey
+ },
+ id: this.options.userId,
+ properties: properties
+ }).send(wrapCallback("set_properties_once", properties, callback));
+ return this;
+ };
+
+ User.prototype.increment = function (property, value, callback) {
+ new Request(getUrl(this.options) + "/increment_property", {
+ api: {
+ "api_version": API_VERSION,
+ "api_key": this.options.apiKey
+ },
+ id: this.options.userId,
+ property: property,
+ value: value
+ }).send(wrapCallback("increment_property", property + " by " + value, callback));
+ return this;
+ };
+
+ User.prototype.unset = function (properties, callback) {
+ new Request(getUrl(this.options) + "/unset_properties", {
+ api: {
+ "api_version": API_VERSION,
+ "api_key": this.options.apiKey
+ },
+ id: this.options.userId,
+ properties: type(properties) === "array" ? properties : [properties]
+ }).send(wrapCallback("unset_properties", properties, callback));
+ return this;
+ };
+
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
+
+ function createCommonjsModule(fn, module) {
+ return module = { exports: {} }, fn(module, module.exports), module.exports;
+ }
+
+ var ifvisible = createCommonjsModule(function (module, exports) {
+ (function() {
+ (function(root, factory) {
+ {
+ return module.exports = factory();
+ }
+ })(this, function() {
+ var addEvent, customEvent, doc, hidden, idleStartedTime, idleTime, ie, ifvisible, init, initialized, status, trackIdleStatus, visibilityChange;
+ ifvisible = {};
+ doc = document;
+ initialized = false;
+ status = "active";
+ idleTime = 60000;
+ idleStartedTime = false;
+ customEvent = (function() {
+ var addCustomEvent, cgid, fireCustomEvent, listeners, removeCustomEvent;
+ listeners = {};
+ cgid = '__ceGUID';
+ addCustomEvent = function(obj, event, callback) {
+ obj[cgid] = undefined;
+ if (!obj[cgid]) {
+ obj[cgid] = "ifvisible.object.event.identifier";
+ }
+ if (!listeners[obj[cgid]]) {
+ listeners[obj[cgid]] = {};
+ }
+ if (!listeners[obj[cgid]][event]) {
+ listeners[obj[cgid]][event] = [];
+ }
+ return listeners[obj[cgid]][event].push(callback);
+ };
+ fireCustomEvent = function(obj, event, memo) {
+ var ev, j, len, ref, results;
+ if (obj[cgid] && listeners[obj[cgid]] && listeners[obj[cgid]][event]) {
+ ref = listeners[obj[cgid]][event];
+ results = [];
+ for (j = 0, len = ref.length; j < len; j++) {
+ ev = ref[j];
+ results.push(ev(memo || {}));
+ }
+ return results;
+ }
+ };
+ removeCustomEvent = function(obj, event, callback) {
+ var cl, i, j, len, ref;
+ if (callback) {
+ if (obj[cgid] && listeners[obj[cgid]] && listeners[obj[cgid]][event]) {
+ ref = listeners[obj[cgid]][event];
+ for (i = j = 0, len = ref.length; j < len; i = ++j) {
+ cl = ref[i];
+ if (cl === callback) {
+ listeners[obj[cgid]][event].splice(i, 1);
+ return cl;
+ }
+ }
+ }
+ } else {
+ if (obj[cgid] && listeners[obj[cgid]] && listeners[obj[cgid]][event]) {
+ return delete listeners[obj[cgid]][event];
+ }
+ }
+ };
+ return {
+ add: addCustomEvent,
+ remove: removeCustomEvent,
+ fire: fireCustomEvent
+ };
+ })();
+ addEvent = (function() {
+ var setListener;
+ setListener = false;
+ return function(el, ev, fn) {
+ if (!setListener) {
+ if (el.addEventListener) {
+ setListener = function(el, ev, fn) {
+ return el.addEventListener(ev, fn, false);
+ };
+ } else if (el.attachEvent) {
+ setListener = function(el, ev, fn) {
+ return el.attachEvent('on' + ev, fn, false);
+ };
+ } else {
+ setListener = function(el, ev, fn) {
+ return el['on' + ev] = fn;
+ };
+ }
+ }
+ return setListener(el, ev, fn);
+ };
+ })();
+ ie = (function() {
+ var all, check, div, undef, v;
+ undef = void 0;
+ v = 3;
+ div = doc.createElement("div");
+ all = div.getElementsByTagName("i");
+ check = function() {
+ return (div.innerHTML = "", all[0]);
+ };
+ while (check()) {
+ continue;
+ }
+ if (v > 4) {
+ return v;
+ } else {
+ return undef;
+ }
+ })();
+ hidden = false;
+ visibilityChange = void 0;
+ if (typeof doc.hidden !== "undefined") {
+ hidden = "hidden";
+ visibilityChange = "visibilitychange";
+ } else if (typeof doc.mozHidden !== "undefined") {
+ hidden = "mozHidden";
+ visibilityChange = "mozvisibilitychange";
+ } else if (typeof doc.msHidden !== "undefined") {
+ hidden = "msHidden";
+ visibilityChange = "msvisibilitychange";
+ } else if (typeof doc.webkitHidden !== "undefined") {
+ hidden = "webkitHidden";
+ visibilityChange = "webkitvisibilitychange";
+ }
+ trackIdleStatus = function() {
+ var timer, wakeUp;
+ timer = false;
+ wakeUp = function() {
+ clearTimeout(timer);
+ if (status !== "active") {
+ ifvisible.wakeup();
+ }
+ idleStartedTime = +(new Date());
+ return timer = setTimeout(function() {
+ if (status === "active") {
+ return ifvisible.idle();
+ }
+ }, idleTime);
+ };
+ wakeUp();
+ addEvent(doc, "mousemove", wakeUp);
+ addEvent(doc, "keyup", wakeUp);
+ addEvent(window, "scroll", wakeUp);
+ ifvisible.focus(wakeUp);
+ return ifvisible.wakeup(wakeUp);
+ };
+ init = function() {
+ var blur;
+ if (initialized) {
+ return true;
+ }
+ if (hidden === false) {
+ blur = "blur";
+ if (ie < 9) {
+ blur = "focusout";
+ }
+ addEvent(window, blur, function() {
+ return ifvisible.blur();
+ });
+ addEvent(window, "focus", function() {
+ return ifvisible.focus();
+ });
+ } else {
+ addEvent(doc, visibilityChange, function() {
+ if (doc[hidden]) {
+ return ifvisible.blur();
+ } else {
+ return ifvisible.focus();
+ }
+ }, false);
+ }
+ initialized = true;
+ return trackIdleStatus();
+ };
+ ifvisible = {
+ setIdleDuration: function(seconds) {
+ return idleTime = seconds * 1000;
+ },
+ getIdleDuration: function() {
+ return idleTime;
+ },
+ getIdleInfo: function() {
+ var now, res;
+ now = +(new Date());
+ res = {};
+ if (status === "idle") {
+ res.isIdle = true;
+ res.idleFor = now - idleStartedTime;
+ res.timeLeft = 0;
+ res.timeLeftPer = 100;
+ } else {
+ res.isIdle = false;
+ res.idleFor = now - idleStartedTime;
+ res.timeLeft = (idleStartedTime + idleTime) - now;
+ res.timeLeftPer = (100 - (res.timeLeft * 100 / idleTime)).toFixed(2);
+ }
+ return res;
+ },
+ focus: function(callback) {
+ if (typeof callback === "function") {
+ return this.on("focus", callback);
+ }
+ status = "active";
+ customEvent.fire(this, "focus");
+ customEvent.fire(this, "wakeup");
+ return customEvent.fire(this, "statusChanged", {
+ status: status
+ });
+ },
+ blur: function(callback) {
+ if (typeof callback === "function") {
+ return this.on("blur", callback);
+ }
+ status = "hidden";
+ customEvent.fire(this, "blur");
+ customEvent.fire(this, "idle");
+ return customEvent.fire(this, "statusChanged", {
+ status: status
+ });
+ },
+ idle: function(callback) {
+ if (typeof callback === "function") {
+ return this.on("idle", callback);
+ }
+ status = "idle";
+ customEvent.fire(this, "idle");
+ return customEvent.fire(this, "statusChanged", {
+ status: status
+ });
+ },
+ wakeup: function(callback) {
+ if (typeof callback === "function") {
+ return this.on("wakeup", callback);
+ }
+ status = "active";
+ customEvent.fire(this, "wakeup");
+ return customEvent.fire(this, "statusChanged", {
+ status: status
+ });
+ },
+ on: function(name, callback) {
+ init();
+ return customEvent.add(this, name, callback);
+ },
+ off: function(name, callback) {
+ init();
+ return customEvent.remove(this, name, callback);
+ },
+ onEvery: function(seconds, callback) {
+ var paused, t;
+ init();
+ paused = false;
+ if (callback) {
+ t = setInterval(function() {
+ if (status === "active" && paused === false) {
+ return callback();
+ }
+ }, seconds * 1000);
+ }
+ return {
+ stop: function() {
+ return clearInterval(t);
+ },
+ pause: function() {
+ return paused = true;
+ },
+ resume: function() {
+ return paused = false;
+ },
+ code: t,
+ callback: callback
+ };
+ },
+ now: function(check) {
+ init();
+ return status === (check || "active");
+ }
+ };
+ return ifvisible;
+ });
+
+ }).call(commonjsGlobal);
+
+
+ });
+
+ var API_VERSION$1 = 1;
+ var DEFAULT_OPTIONS = {
+ apiEndpoint: 'app.rakam.io',
+ eventEndpointPath: '/event/batch',
+ cookieExpiration: 365 * 10,
+ cookieName: 'rakam_id',
+ domain: undefined,
+ includeUtm: false,
+ trackForms: false,
+ language: language.language,
+ optOut: false,
+ platform: 'Web',
+ savedMaxCount: 1000,
+ saveEvents: true,
+ sessionTimeout: 30 * 60 * 1000,
+ unsentKey: 'rakam_unsent',
+ uploadBatchSize: 100,
+ batchEvents: false,
+ eventUploadThreshold: 30,
+ eventUploadPeriodMillis: 30 * 1000,
+ // 30s,
+ useLocalStorageForSessionization: true
+ };
+ var StorageKeys = {
+ LAST_ID: 'rakam_lastEventId',
+ LAST_EVENT_TIME: 'rakam_lastEventTime',
+ SESSION_ID: 'rakam_sessionId',
+ RETURNING_SESSION: 'rakam_returning'
+ };
+
+ var getSessionItem = function (options, key) {
+ if (options.useLocalStorageForSessionization) {
+ return localStorage$1.getItem(key);
+ } else {
+ return Cookie.get(key);
+ }
+ };
+
+ var setSessionItem = function (options, key, value) {
+ if (options.useLocalStorageForSessionization) {
+ localStorage$1.setItem(key, value);
+ } else {
+ Cookie.set(key, value);
+ }
+ };
+ /*
+ * Rakam API
+ */
+
+
+ var Rakam = function () {
+ this._unsentEvents = [];
+ this.options = merge({}, DEFAULT_OPTIONS);
+ };
+
+ Rakam.prototype._eventId = 0;
+ Rakam.prototype._returningUser = false;
+ Rakam.prototype._sending = false;
+ Rakam.prototype._lastEventTime = null;
+ Rakam.prototype._sessionId = null;
+ Rakam.prototype._newSession = false;
+
+ Rakam.prototype.log = function (s) {
+ if (this.options.debug === true) {
+ console.log('[Rakam] ' + s);
+ }
+ };
+ /**
+ * Initializes Rakam.
+ * apiKey The API Key for your app
+ * opt_userId An identifier for this user
+ * opt_config Configuration options
+ * - saveEvents (boolean) Whether to save events to local storage. Defaults to true.
+ * - includeUtm (boolean) Whether to send utm parameters with events. Defaults to false.
+ */
+
+
+ Rakam.prototype.init = function (apiKey, opt_userId, opt_config, callback) {
+ try {
+ if (!apiKey) {
+ throw new Error('apiKey is null');
+ }
+
+ this.options.apiKey = apiKey;
+ var user = new User();
+ user.init(this.options);
+
+ this.User = function () {
+ return user;
+ };
+
+ if (opt_config) {
+ this.options.apiEndpoint = opt_config.apiEndpoint || this.options.apiEndpoint;
+ this.options.debug = opt_config.debug || this.options.debug === true;
+
+ if (opt_config.saveEvents !== undefined) {
+ this.options.saveEvents = !!opt_config.saveEvents;
+ }
+
+ if (opt_config.domain !== undefined) {
+ this.options.domain = opt_config.domain;
+ }
+
+ if (opt_config.includeUtm !== undefined) {
+ this.options.includeUtm = !!opt_config.includeUtm;
+ }
+
+ if (opt_config.trackClicks !== undefined) {
+ this.options.trackClicks = !!opt_config.trackClicks;
+ }
+
+ if (opt_config.trackForms !== undefined) {
+ this.options.trackForms = !!opt_config.trackForms;
+ }
+
+ if (opt_config.batchEvents !== undefined) {
+ this.options.batchEvents = !!opt_config.batchEvents;
+ }
+
+ this.options.platform = opt_config.platform || this.options.platform;
+ this.options.useLocalStorageForSessionization = opt_config.useLocalStorageForSessionization || this.options.useLocalStorageForSessionization;
+ this.options.language = opt_config.language || this.options.language;
+ this.options.sessionTimeout = opt_config.sessionTimeout || this.options.sessionTimeout;
+ this.options.uploadBatchSize = opt_config.uploadBatchSize || this.options.uploadBatchSize;
+ this.options.eventUploadThreshold = opt_config.eventUploadThreshold || this.options.eventUploadThreshold;
+ this.options.savedMaxCount = opt_config.savedMaxCount || this.options.savedMaxCount;
+ this.options.eventUploadPeriodMillis = opt_config.eventUploadPeriodMillis || this.options.eventUploadPeriodMillis;
+ this.options.superProperties = opt_config.superProperties || [];
+ }
+
+ Cookie.options({
+ expirationDays: this.options.cookieExpiration,
+ domain: this.options.domain
+ });
+ this.options.domain = Cookie.options().domain;
+
+ _loadCookieData(this);
+
+ if (opt_config && opt_config.deviceId !== undefined && opt_config.deviceId !== null && opt_config.deviceId || this.options.deviceId) {
+ this.options.deviceId = this.options.deviceId;
+ } else {
+ this.deviceIdCreatedAt = new Date();
+ this.options.deviceId = uuid();
+ }
+
+ _saveCookieData(this);
+
+ this.log('initialized with apiKey=' + apiKey);
+
+ if (this.options.saveEvents) {
+ var savedUnsentEventsString = localStorage$1.getItem(this.options.unsentKey);
+
+ if (savedUnsentEventsString) {
+ try {
+ this._unsentEvents = JSON.parse(savedUnsentEventsString);
+ } catch (e) {
+ this.log(e);
+ }
+ }
+ }
+
+ this._sendEventsIfReady();
+
+ if (this.options.includeUtm) {
+ this._initUtmData();
+ }
+
+ if (this.options.trackForms) {
+ this._initTrackForms();
+ }
+
+ if (this.options.trackClicks) {
+ this._initTrackClicks();
+ }
+
+ this._lastEventTime = parseInt(getSessionItem(this.options, StorageKeys.LAST_EVENT_TIME)) || null;
+ this._sessionId = parseInt(getSessionItem(this.options, StorageKeys.SESSION_ID)) || null;
+ this._eventId = localStorage$1.getItem(StorageKeys.LAST_ID) || 0;
+ var now = new Date().getTime();
+
+ if (!this._sessionId || !this._lastEventTime || now - this._lastEventTime > this.options.sessionTimeout) {
+ if (this._sessionId !== null) {
+ setSessionItem(this.options, StorageKeys.RETURNING_SESSION, true);
+ this._returningUser = true;
+ }
+
+ this._sessionId = now;
+ Cookie.remove('_rakam_time');
+ setSessionItem(this.options, StorageKeys.SESSION_ID, this._sessionId);
+ } else {
+ this._returningUser = getSessionItem(this.options, StorageKeys.RETURNING_SESSION) === 'true';
+ }
+
+ this._lastEventTime = now;
+ setSessionItem(this.options, StorageKeys.LAST_EVENT_TIME, this._lastEventTime);
+ } catch (e) {
+ this.log(e);
+ }
+
+ this.setUserId(opt_userId);
+
+ if (callback && typeof callback === 'function') {
+ setTimeout(function () {
+ callback();
+ }, 1);
+ }
+ };
+
+ Rakam.prototype.onEvent = function (callback) {
+ this.options.eventCallbacks = this.options.eventCallbacks || [];
+ this.options.eventCallbacks.push(callback);
+ };
+
+ var transformValue = function (_this, attribute, value, type) {
+ if (type !== null) {
+ type = type.toLowerCase();
+ }
+
+ if (type === 'long' || type === 'time' || type === 'timestamp' || type === 'date') {
+ value = parseInt(value);
+
+ if (isNaN(value) || !isFinite(value)) {
+ _this.log('ignoring ' + attribute + ': the value must be a number');
+
+ value = null;
+ }
+ } else if (type === 'double') {
+ value = parseFloat(value);
+
+ if (isNaN(value) || !isFinite(value)) {
+ _this.log('ignoring ' + attribute + ': the value is not double');
+
+ value = null;
+ }
+ } else if (type === 'boolean') {
+ if (type === 'true' || type === '1') {
+ value = true;
+ } else if (type === 'false' || type === '0') {
+ value = false;
+ } else {
+ _this.log('ignoring ' + attribute + ': the value is not boolean');
+
+ value = null;
+ }
+ }
+
+ return value;
+ };
+
+ Rakam.prototype.logInlinedEvent = function (collection, extraProperties, callback) {
+ var getAllElementsWithAttribute = function (attribute) {
+ if (document.querySelectorAll) {
+ return document.querySelectorAll('[rakam-event-attribute]');
+ }
+
+ var matchingElements = [];
+ var allElements = document.getElementsByTagName('*');
+
+ for (var i = 0, n = allElements.length; i < n; i++) {
+ if (allElements[i].getAttribute(attribute) !== null) {
+ matchingElements.push(allElements[i]);
+ }
+ }
+
+ return matchingElements;
+ };
+
+ var properties = extraProperties || {};
+ var elements = getAllElementsWithAttribute('rakam-event-attribute');
+
+ for (var i = 0; i < elements.length; i++) {
+ var element = elements[i];
+ var attribute = element.getAttribute('rakam-event-attribute');
+ var value = element.getAttribute('rakam-event-attribute-value');
+ var type = element.getAttribute('rakam-event-attribute-type');
+
+ if (value === null) {
+ if (element.tagName === 'INPUT') {
+ value = element.value;
+ } else if (element.tagName === 'SELECT') {
+ var option = element.options[element.selectedIndex];
+
+ if (option.value !== null && option.value !== '') {
+ var attr = element.getAttribute('rakam-attribute-value');
+
+ if (attr !== 'value') {
+ value = option.value;
+ } else {
+ value = option.text;
+ }
+ }
+ } else if (element.innerText) {
+ value = element.innerText.replace(/^\s+|\s+$/g, '');
+ } else {
+ this.log('Could find value of DOM element.', element);
+ }
+ }
+
+ if (value !== null && value !== '') {
+ properties[attribute] = transformValue(this, attribute, value, type);
+ }
+ }
+
+ this.logEvent(collection, properties, callback);
+ };
+
+ Rakam.prototype.isReturningUser = function () {
+ return this._returningUser;
+ };
+
+ var gapMillis = 0;
+ var startTime = new Date().getTime();
+ var idleTime;
+ var initializedTimer = false;
+
+ Rakam.prototype.resetTimer = function () {
+ if (!initializedTimer) {
+ return this.log('Timer is not initialized');
+ }
+
+ idleTime = null;
+ gapMillis = 0;
+ startTime = new Date().getTime();
+ };
+
+ Rakam.prototype.startTimer = function (saveOnClose) {
+ if (initializedTimer) {
+ return this.log('Timer is already initialized');
+ }
+
+ startTime = new Date().getTime();
+ ifvisible.on('idle', function () {
+ idleTime = new Date().getTime();
+ });
+ ifvisible.on('wakeup', function () {
+ gapMillis += new Date().getTime() - idleTime;
+ idleTime = null;
+ });
+
+ if (saveOnClose) {
+ var func;
+
+ if (window.onbeforeunload !== null) {
+ func = window.onbeforeunload;
+ }
+
+ var _this = this;
+
+ window.onbeforeunload = function (e) {
+ Cookie.set('_rakam_time', _this.getTimeOnPage());
+
+ if (func) {
+ func(e);
+ }
+ };
+ }
+
+ initializedTimer = true;
+ };
+
+ Rakam.prototype.getTimeOnPage = function () {
+ if (!initializedTimer) {
+ return this.log('Timer is not initialized, returning null from getTimeOnPage()');
+ }
+
+ return ((idleTime > 0 ? idleTime : new Date().getTime()) - startTime - gapMillis) / 1000;
+ };
+
+ Rakam.prototype.getTimeOnPreviousPage = function () {
+ return Cookie.get('_rakam_time');
+ };
+
+ Rakam.prototype.nextEventId = function () {
+ this._eventId++;
+ return this._eventId;
+ }; // returns true if sendEvents called immediately
+
+
+ Rakam.prototype._sendEventsIfReady = function (callback) {
+ if (this._unsentEvents.length === 0) {
+ return false;
+ }
+
+ if (!this.options.batchEvents) {
+ this.sendEvents(callback);
+ return true;
+ }
+
+ if (this._unsentEvents.length >= this.options.eventUploadThreshold) {
+ this.sendEvents(callback);
+ return true;
+ }
+
+ setTimeout(this.sendEvents.bind(this), this.options.eventUploadPeriodMillis);
+ return false;
+ };
+
+ var _loadCookieData = function (scope) {
+ var cookieData = Cookie.get(scope.options.cookieName);
+
+ if (cookieData) {
+ if (cookieData.deviceId) {
+ scope.options.deviceId = cookieData.deviceId;
+ }
+
+ if (cookieData.userId) {
+ scope.options.userId = cookieData.userId;
+ }
+
+ if (cookieData.superProps) {
+ scope.options.superProperties = cookieData.superProps;
+ }
+
+ if (cookieData.optOut !== undefined) {
+ scope.options.optOut = cookieData.optOut;
+ }
+
+ if (cookieData.deviceIdCreatedAt !== undefined) {
+ scope.deviceIdCreatedAt = new Date(parseInt(cookieData.deviceIdCreatedAt));
+ }
+ }
+ };
+
+ var _saveCookieData = function (scope) {
+ Cookie.set(scope.options.cookieName, {
+ deviceId: scope.options.deviceId,
+ deviceIdCreatedAt: scope.deviceIdCreatedAt ? scope.deviceIdCreatedAt.getTime() : undefined,
+ userId: scope.options.userId,
+ superProps: scope.options.superProperties,
+ optOut: scope.options.optOut
+ });
+ };
+
+ Rakam._getUtmParam = function (name, query) {
+ name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
+ var regex = new RegExp('[\\?&]' + name + '=([^]*)');
+ var results = regex.exec(query);
+ return results === null ? undefined : decodeURIComponent(results[1].replace(/\+/g, ' '));
+ };
+
+ Rakam._getUtmData = function (rawCookie, query) {
+ // Translate the utmz cookie format into url query string format.
+ var cookie = rawCookie ? '?' + rawCookie.split('.').slice(-1)[0].replace(/\|/g, '&') : '';
+
+ var fetchParam = function (queryName, query, cookieName, cookie) {
+ return Rakam._getUtmParam(queryName, query) || Rakam._getUtmParam(cookieName, cookie);
+ };
+
+ return {
+ utm_source: fetchParam('utm_source', query, 'utmcsr', cookie),
+ utm_medium: fetchParam('utm_medium', query, 'utmcmd', cookie),
+ utm_campaign: fetchParam('utm_campaign', query, 'utmccn', cookie),
+ utm_term: fetchParam('utm_term', query, 'utmctr', cookie),
+ utm_content: fetchParam('utm_content', query, 'utmcct', cookie)
+ };
+ };
+ /**
+ * Parse the utm properties out of cookies and query for adding to user properties.
+ */
+
+
+ Rakam.prototype._initUtmData = function (queryParams, cookieParams) {
+ queryParams = queryParams || location.search;
+ cookieParams = cookieParams || Cookie.get('__utmz');
+ this._utmProperties = Rakam._getUtmData(cookieParams, queryParams);
+ };
+
+ Rakam.prototype._initTrackForms = function () {
+ var _this = this;
+
+ document.addEventListener('submit', function (event) {
+ var targetElement = event.target || event.srcElement;
+ var collection = targetElement.getAttribute('rakam-event-form');
+
+ if (targetElement.tagName === 'FORM' && collection) {
+ var properties = {};
+ var extraAttributes = targetElement.getAttribute('rakam-event-extra');
+
+ if (extraAttributes !== null) {
+ for (var key in JSON.parse(extraAttributes)) {
+ if (extraAttributes.hasOwnProperty(key)) {
+ properties[key] = extraAttributes[key];
+ }
+ }
+ }
+
+ for (var i = 0; i < targetElement.elements.length; i++) {
+ var element = targetElement.elements[i];
+ var type = element.getAttribute('rakam-event-attribute-type');
+ var formElemType;
+
+ if (element.hasAttribute('type')) {
+ formElemType = element.getAttribute('type').toLowerCase();
+ }
+
+ if (formElemType === 'password') {
+ continue;
+ }
+
+ if (type === null && element.tagName === 'INPUT' && formElemType === 'number') {
+ type = 'long';
+ }
+
+ if (element.hasAttribute('rakam-event-form-element-ignore')) {
+ continue;
+ }
+
+ var attribute;
+
+ if (element.hasAttribute('rakam-event-attribute')) {
+ attribute = element.getAttribute('rakam-event-attribute');
+ } else {
+ attribute = element.getAttribute('name');
+ }
+
+ if (element.hasAttribute('rakam-event-attribute-value')) {
+ properties[attribute] = transformValue(this, attribute, element.getAttribute('rakam-event-attribute-value'), type);
+ } else if (element.tagName === 'SELECT') {
+ properties[attribute] = transformValue(this, attribute, element.options[element.selectedIndex].value, type);
+ } else if (element.tagName === 'INPUT' || element.tagName === 'TEXTAREA') {
+ properties[attribute] = transformValue(this, attribute, element.value, type);
+ } else {
+ _this.log('Couldn\'t get value of form element: ' + attribute);
+ }
+ }
+
+ _this.logEvent(collection, properties);
+ }
+ });
+ };
+
+ Rakam.prototype._initTrackClicks = function () {
+ var _this = this;
+
+ document.addEventListener('click', function (event) {
+ var targetElement = event.target || event.srcElement;
+ var collection = targetElement.getAttribute('rakam-event-track');
+
+ if (targetElement.tagName === 'FORM' && collection) {
+ var properties = {};
+ var extraAttributes = targetElement.getAttribute('rakam-event-properties');
+
+ if (extraAttributes !== null) {
+ for (var key in JSON.parse(extraAttributes)) {
+ if (extraAttributes.hasOwnProperty(key)) {
+ properties[key] = extraAttributes[key];
+ }
+ }
+ }
+
+ _this.logEvent(collection, properties);
+ }
+ });
+ };
+
+ Rakam.prototype.saveEvents = function () {
+ try {
+ localStorage$1.setItem(this.options.unsentKey, JSON.stringify(this._unsentEvents));
+ } catch (e) {
+ this.log(e);
+ }
+ };
+
+ Rakam.prototype.setDomain = function (domain) {
+ try {
+ Cookie.options({
+ domain: domain
+ });
+ this.options.domain = Cookie.options().domain;
+
+ _loadCookieData(this);
+
+ _saveCookieData(this);
+
+ this.log('set domain=' + domain);
+ } catch (e) {
+ this.log(e);
+ }
+ };
+
+ Rakam.prototype.setUserId = function (userId) {
+ try {
+ var previousId = this.options.deviceId;
+ this.options.userId = userId !== undefined && userId !== null && '' + userId || null;
+
+ if (userId !== null && userId !== '' && userId !== undefined && (this._eventId > 0 && (previousId === null || previousId === undefined) || previousId !== null && previousId !== undefined)) {
+ var _this = this;
+
+ this.User()._merge(previousId, this.deviceIdCreatedAt, function () {
+ _this.deviceIdCreatedAt = null;
+
+ _saveCookieData(_this);
+ });
+ }
+
+ _saveCookieData(this);
+
+ this.log('set userId=' + userId);
+ } catch (e) {
+ this.log(e);
+ }
+ };
+
+ Rakam.prototype.setUserProperties = function (parameters) {
+ try {
+ return new this.User().set(parameters);
+ } catch (e) {
+ this.log(e);
+ }
+ };
+
+ Rakam.prototype.getUserId = function () {
+ return this.options.userId;
+ };
+
+ Rakam.prototype.getDeviceId = function () {
+ return this._eventId > 0 ? this.options.deviceId : null;
+ };
+
+ Rakam.prototype.setOptOut = function (enable) {
+ try {
+ this.options.optOut = enable;
+
+ _saveCookieData(this);
+
+ this.log('set optOut=' + enable);
+ } catch (e) {
+ this.log(e);
+ }
+ };
+
+ Rakam.prototype.setDeviceId = function (deviceId) {
+ try {
+ if (deviceId) {
+ this.options.deviceId = '' + deviceId;
+
+ _saveCookieData(this);
+ }
+ } catch (e) {
+ this.log(e);
+ }
+ };
+
+ Rakam.prototype.setSuperProperties = function (eventProps, opt_replace) {
+ try {
+ this.options.superProperties = this.options.superProperties || {};
+
+ for (var property in eventProps) {
+ if (eventProps.hasOwnProperty(property)) {
+ if (opt_replace === false && this.options.superProperties[property] !== undefined) {
+ continue;
+ }
+
+ this.options.superProperties[property] = eventProps[property];
+ }
+ }
+
+ _saveCookieData(this);
+
+ this.log('set super properties=' + JSON.stringify(eventProps));
+ } catch (e) {
+ this.log(e);
+ }
+ };
+
+ Rakam.prototype.setVersionName = function (versionName) {
+ try {
+ this.options.versionName = versionName;
+ this.log('set versionName=' + versionName);
+ } catch (e) {
+ this.log(e);
+ }
+ };
+ /**
+ * Private logEvent method. Keeps apiProperties from being publicly exposed.
+ */
+
+
+ Rakam.prototype._logEvent = function (eventType, eventProperties, apiProperties, callback) {
+ if (typeof callback !== 'function') {
+ callback = null;
+ }
+
+ if (!eventType || this.options.optOut) {
+ if (callback) {
+ callback(0, 'No request sent');
+ }
+
+ return;
+ }
+
+ try {
+ var eventTime = new Date().getTime();
+ var eventId = this.nextEventId();
+
+ if (!this._sessionId || !this._lastEventTime || eventTime - this._lastEventTime > this.options.sessionTimeout) {
+ this._sessionId = eventTime;
+ setSessionItem(this.options, StorageKeys.SESSION_ID, this._sessionId);
+ }
+
+ this._lastEventTime = eventTime;
+ setSessionItem(this.options, StorageKeys.LAST_EVENT_TIME, this._lastEventTime);
+ setSessionItem(this.options, StorageKeys.LAST_ID, eventId);
+ apiProperties = apiProperties || {};
+ eventProperties = eventProperties || {}; // Add the utm properties, if any, onto the event properties.
+
+ merge(eventProperties, this._utmProperties);
+ var event = {
+ collection: eventType,
+ properties: {
+ _device_id: this.options.deviceId,
+ _user: this.options.userId,
+ // use seconds
+ _time: parseInt(eventTime / 1000) * 1000,
+ _session_id: this._sessionId || -1,
+ _platform: this.options.platform,
+ _language: this.options.language
+ }
+ };
+ merge(event.properties, this.options.superProperties);
+ merge(event.properties, apiProperties);
+ merge(event.properties, eventProperties);
+ this.log('logged eventType=' + eventType + ', properties=' + JSON.stringify(eventProperties));
+
+ this._unsentEvents.push({
+ id: eventId,
+ event: event
+ }); // Remove old events from the beginning of the array if too many
+ // have accumulated. Don't want to kill memory. Default is 1000 events.
+
+
+ if (this._unsentEvents.length > this.options.savedMaxCount) {
+ this._unsentEvents.splice(0, this._unsentEvents.length - this.options.savedMaxCount);
+ }
+
+ if (this.options.saveEvents) {
+ this.saveEvents();
+ }
+
+ if (!this._sendEventsIfReady(callback) && callback) {
+ callback(0, 'No request sent');
+ }
+
+ return eventId;
+ } catch (e) {
+ this.log(e);
+ }
+ };
+
+ Rakam.prototype.logEvent = function (eventType, eventProperties, callback) {
+ return this._logEvent(eventType, eventProperties, null, callback);
+ };
+ /**
+ * Remove events in storage with event ids up to and including maxEventId. Does
+ * a true filter in case events get out of order or old events are removed.
+ */
+
+
+ Rakam.prototype.removeEvents = function (maxEventId, errors) {
+ var filteredEvents = [];
+ var errorList = errors || [];
+
+ for (var i = 0; i < this._unsentEvents.length; i++) {
+ var id = this._unsentEvents[i].id;
+
+ if (errorList.indexOf(id) > -1 || id > maxEventId) {
+ filteredEvents.push(this._unsentEvents[i]);
+ }
+ }
+
+ this._unsentEvents = filteredEvents;
+ };
+
+ Rakam.prototype.sendEvents = function (callback) {
+ var _this = this;
+
+ if (!this._sending && !this.options.optOut && this._unsentEvents.length > 0) {
+ this._sending = true;
+ var url = ('https:' === window.location.protocol ? 'https' : 'http') + '://' + this.options.apiEndpoint + this.options.eventEndpointPath; // Determine how many events to send and track the maximum event id sent in this batch.
+
+ var numEvents = Math.min(this._unsentEvents.length, this.options.uploadBatchSize);
+ var maxEventId = this._unsentEvents[numEvents - 1].id;
+
+ this._unsentEvents.slice(0, numEvents);
+
+ var events = this._unsentEvents.slice(0, numEvents).map(function (e) {
+ return e.event;
+ });
+
+ var upload_time = new Date().getTime();
+ var api = {
+ 'upload_time': upload_time,
+ 'api_version': API_VERSION$1,
+ 'api_key': this.options.apiKey //"checksum": md5(API_VERSION + JSON.stringify(events) + upload_time).toUpperCase()
+
+ };
+ var scope = this;
+ new Request(url, {
+ api: api,
+ events: events
+ }).send(function (status, response, headers) {
+ scope._sending = false;
+
+ try {
+ if (status === 200 || status === 409) {
+ _this.log('successful upload');
+
+ scope.removeEvents(maxEventId, status === 409 ? JSON.parse(response) : null); // Update the event cache after the removal of sent events.
+
+ if (scope.options.saveEvents) {
+ scope.saveEvents();
+ } // Send more events if any queued during previous send.
+
+
+ if (!scope._sendEventsIfReady(callback) && callback) {
+ callback(status, response);
+ }
+ } else if (status === 413) {
+ _this.log('request too large'); // Can't even get this one massive event through. Drop it.
+
+
+ if (scope.options.uploadBatchSize === 1) {
+ scope.removeEvents(maxEventId);
+ } // The server complained about the length of the request.
+ // Backoff and try again.
+
+
+ scope.options.uploadBatchSize = Math.ceil(numEvents / 2);
+ scope.sendEvents(callback);
+ } else if (callback) {
+ // If server turns something like a 400
+ callback(status, response);
+ }
+ } catch (e) {
+ _this.log('failed upload');
+ }
+
+ if (scope.options.eventCallbacks) {
+ try {
+ for (var i = 0; i < scope.options.eventCallbacks.length; i++) {
+ scope.options.eventCallbacks[i](status, response, headers);
+ }
+ } catch (e) {
+ _this.log('callback throws an exception', e);
+ }
+ }
+ });
+ } else if (callback) {
+ callback(0, 'No request sent');
+ }
+ };
+
+ Rakam.prototype.onload = function (callback) {
+ var _this = this;
+
+ setTimeout(function () {
+ callback();
+
+ _this.log('executed callback', callback);
+ }, 1);
+ };
+
+ Rakam.prototype.runQueuedFunctions = function () {
+ for (var i = 0; i < this._q.length; i++) {
+ var fn = this[this._q[i][0]];
+
+ if (fn && type(fn) === 'function') {
+ fn.apply(this, this._q[i].slice(1));
+ }
+ }
+
+ this._q = []; // clear function queue after running
+ };
+
+ Rakam.prototype.__VERSION__ = version;
+
+ /* jshint expr:true */
+ var old = window.rakam || {};
+ var instance = new Rakam();
+ instance._q = old._q || []; // export the instance
+
+ return instance;
+
+})));
diff --git a/rakam.umd.min.js b/rakam.umd.min.js
new file mode 100644
index 0000000..9c7c174
--- /dev/null
+++ b/rakam.umd.min.js
@@ -0,0 +1 @@
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("top-domain"),require("ifvisible")):"function"==typeof define&&define.amd?define("rakam",["top-domain","ifvisible"],e):(t=t||self).rakam=e(t.topDomain,t.ifvisible)}(this,function(o,i){"use strict";o=o&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o,i=i&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i;function r(t){var e="";return s.domain&&(e="."===s.domain.charAt(0)?s.domain.substring(1):s.domain),t+e}var t,l=function(t){for(var e="",n=0;n>6|192):(e+=String.fromCharCode(i>>12|224),e+=String.fromCharCode(i>>6&63|128)),e+=String.fromCharCode(63&i|128))}return e},p=function(t){for(var e,n,i="",o=0,s=0;o>2,s=(3&e)<<4|(n=t.charCodeAt(p++))>>4,r=(15&n)<<2|(i=t.charCodeAt(p++))>>6,a=63&i,isNaN(n)?r=a=64:isNaN(i)&&(a=64),u=u+d._keyStr.charAt(o)+d._keyStr.charAt(s)+d._keyStr.charAt(r)+d._keyStr.charAt(a);return u},decode:function(t){try{if(window.btoa&&window.atob)return decodeURIComponent(escape(window.atob(t)))}catch(t){}return d._decode(t)},_decode:function(t){var e,n,i,o,s,r,a="",u=0;for(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");u>4,n=(15&o)<<4|(s=d._keyStr.indexOf(t.charAt(u++)))>>2,i=(3&s)<<6|(r=d._keyStr.indexOf(t.charAt(u++))),a+=String.fromCharCode(e),64!==s&&(a+=String.fromCharCode(n)),64!==r&&(a+=String.fromCharCode(i));return a=p(a)}},s={expirationDays:void 0,domain:void 0},a=function(t){try{for(var e=r(t)+"=",n=document.cookie.split(";"),i=null,o=0;o>t/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,b)},E=Object.prototype.toString;function I(t){switch(E.call(t)){case"[object Date]":return"date";case"[object RegExp]":return"regexp";case"[object Arguments]":return"arguments";case"[object Array]":return"array";case"[object Error]":return"error"}return null===t?"null":void 0===t?"undefined":t!=t?"nan":t&&1===t.nodeType?"element":"undefined"!=typeof Buffer&&Buffer.isBuffer(t)?"buffer":typeof(t=t.valueOf?t.valueOf():Object.prototype.valueOf.apply(t))}function w(t,e,i){return function(t,e,n){void 0!==i&&i(t,e,n)}}function k(t){return("https:"===window.location.protocol?"https":"http")+"://"+t.apiEndpoint+"/user"}function T(){}T.prototype.init=function(t){this.options=t},T.prototype.set=function(t,e){return new y(k(this.options)+"/set_properties",{api:{api_version:1,api_key:this.options.apiKey},id:this.options.userId,properties:t}).send(w(0,0,e)),this},T.prototype._merge=function(t,e,n){return new y(k(this.options)+"/merge",{api:{api_version:1,api_key:this.options.apiKey,upload_time:(new Date).getTime()},anonymous_id:t,id:this.options.userId,created_at:e?e.getTime():null,merged_at:(new Date).getTime()}).send(w(0,0,n)),this},T.prototype.setOnce=function(t,e){return new y(k(this.options)+"/set_properties_once",{api:{api_version:1,api_key:this.options.apiKey},id:this.options.userId,properties:t}).send(w(0,0,e)),this},T.prototype.increment=function(t,e,n){return new y(k(this.options)+"/increment_property",{api:{api_version:1,api_key:this.options.apiKey},id:this.options.userId,property:t,value:e}).send(w(0,0,n)),this};function S(t,e){return t.useLocalStorageForSessionization?g.getItem(e):c.get(e)}function C(t,e,n){t.useLocalStorageForSessionization?g.setItem(e,n):c.set(e,n)}function A(){this._unsentEvents=[],this.options=_({},O)}var O={apiEndpoint:"app.rakam.io",eventEndpointPath:"/event/batch",cookieExpiration:3650,cookieName:"rakam_id",domain:void 0,includeUtm:!(T.prototype.unset=function(t,e){return new y(k(this.options)+"/unset_properties",{api:{api_version:1,api_key:this.options.apiKey},id:this.options.userId,properties:"array"===I(t)?t:[t]}).send(w(0,0,e)),this}),trackForms:!1,language:e.language,optOut:!1,platform:"Web",savedMaxCount:1e3,saveEvents:!0,sessionTimeout:18e5,unsentKey:"rakam_unsent",uploadBatchSize:100,batchEvents:!1,eventUploadThreshold:30,eventUploadPeriodMillis:3e4,useLocalStorageForSessionization:!0},P="rakam_lastEventId",N="rakam_lastEventTime",U="rakam_sessionId",x="rakam_returning";A.prototype._eventId=0,A.prototype._returningUser=!1,A.prototype._sending=!1,A.prototype._lastEventTime=null,A.prototype._sessionId=null,A.prototype._newSession=!1,A.prototype.log=function(t){!0===this.options.debug&&console.log("[Rakam] "+t)},A.prototype.init=function(t,e,n,i){try{if(!t)throw new Error("apiKey is null");this.options.apiKey=t;var o=new T;if(o.init(this.options),this.User=function(){return o},n&&(this.options.apiEndpoint=n.apiEndpoint||this.options.apiEndpoint,this.options.debug=n.debug||!0===this.options.debug,void 0!==n.saveEvents&&(this.options.saveEvents=!!n.saveEvents),void 0!==n.domain&&(this.options.domain=n.domain),void 0!==n.includeUtm&&(this.options.includeUtm=!!n.includeUtm),void 0!==n.trackClicks&&(this.options.trackClicks=!!n.trackClicks),void 0!==n.trackForms&&(this.options.trackForms=!!n.trackForms),void 0!==n.batchEvents&&(this.options.batchEvents=!!n.batchEvents),this.options.platform=n.platform||this.options.platform,this.options.useLocalStorageForSessionization=n.useLocalStorageForSessionization||this.options.useLocalStorageForSessionization,this.options.language=n.language||this.options.language,this.options.sessionTimeout=n.sessionTimeout||this.options.sessionTimeout,this.options.uploadBatchSize=n.uploadBatchSize||this.options.uploadBatchSize,this.options.eventUploadThreshold=n.eventUploadThreshold||this.options.eventUploadThreshold,this.options.savedMaxCount=n.savedMaxCount||this.options.savedMaxCount,this.options.eventUploadPeriodMillis=n.eventUploadPeriodMillis||this.options.eventUploadPeriodMillis,this.options.superProperties=n.superProperties||[]),c.options({expirationDays:this.options.cookieExpiration,domain:this.options.domain}),this.options.domain=c.options().domain,F(this),n&&void 0!==n.deviceId&&null!==n.deviceId&&n.deviceId||this.options.deviceId?this.options.deviceId=this.options.deviceId:(this.deviceIdCreatedAt=new Date,this.options.deviceId=b()),L(this),this.log("initialized with apiKey="+t),this.options.saveEvents){var s=g.getItem(this.options.unsentKey);if(s)try{this._unsentEvents=JSON.parse(s)}catch(t){this.log(t)}}this._sendEventsIfReady(),this.options.includeUtm&&this._initUtmData(),this.options.trackForms&&this._initTrackForms(),this.options.trackClicks&&this._initTrackClicks(),this._lastEventTime=parseInt(S(this.options,N))||null,this._sessionId=parseInt(S(this.options,U))||null,this._eventId=g.getItem(P)||0;var r=(new Date).getTime();!this._sessionId||!this._lastEventTime||r-this._lastEventTime>this.options.sessionTimeout?(null!==this._sessionId&&(C(this.options,x,!0),this._returningUser=!0),this._sessionId=r,c.remove("_rakam_time"),C(this.options,U,this._sessionId)):this._returningUser="true"===S(this.options,x),this._lastEventTime=r,C(this.options,N,this._lastEventTime)}catch(t){this.log(t)}this.setUserId(e),i&&"function"==typeof i&&setTimeout(function(){i()},1)},A.prototype.onEvent=function(t){this.options.eventCallbacks=this.options.eventCallbacks||[],this.options.eventCallbacks.push(t)};function D(t,e,n,i){return null!==i&&(i=i.toLowerCase()),"long"===i||"time"===i||"timestamp"===i||"date"===i?(n=parseInt(n),!isNaN(n)&&isFinite(n)||(t.log("ignoring "+e+": the value must be a number"),n=null)):"double"===i?(n=parseFloat(n),!isNaN(n)&&isFinite(n)||(t.log("ignoring "+e+": the value is not double"),n=null)):"boolean"===i&&(n="true"===i||"1"===i||"false"!==i&&"0"!==i&&(t.log("ignoring "+e+": the value is not boolean"),null)),n}A.prototype.logInlinedEvent=function(t,e,n){for(var i=e||{},o=function(t){if(document.querySelectorAll)return document.querySelectorAll("[rakam-event-attribute]");for(var e=[],n=document.getElementsByTagName("*"),i=0,o=n.length;i=this.options.eventUploadThreshold?(this.sendEvents(t),!0):(setTimeout(this.sendEvents.bind(this),this.options.eventUploadPeriodMillis),!1))};var F=function(t){var e=c.get(t.options.cookieName);e&&(e.deviceId&&(t.options.deviceId=e.deviceId),e.userId&&(t.options.userId=e.userId),e.superProps&&(t.options.superProperties=e.superProps),void 0!==e.optOut&&(t.options.optOut=e.optOut),void 0!==e.deviceIdCreatedAt&&(t.deviceIdCreatedAt=new Date(parseInt(e.deviceIdCreatedAt))))},L=function(t){c.set(t.options.cookieName,{deviceId:t.options.deviceId,deviceIdCreatedAt:t.deviceIdCreatedAt?t.deviceIdCreatedAt.getTime():void 0,userId:t.options.userId,superProps:t.options.superProperties,optOut:t.options.optOut})};A._getUtmParam=function(t,e){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var n=new RegExp("[\\?&]"+t+"=([^]*)").exec(e);return null===n?void 0:decodeURIComponent(n[1].replace(/\+/g," "))},A._getUtmData=function(t,e){function n(t,e,n,i){return A._getUtmParam(t,e)||A._getUtmParam(n,i)}var i=t?"?"+t.split(".").slice(-1)[0].replace(/\|/g,"&"):"";return{utm_source:n("utm_source",e,"utmcsr",i),utm_medium:n("utm_medium",e,"utmcmd",i),utm_campaign:n("utm_campaign",e,"utmccn",i),utm_term:n("utm_term",e,"utmctr",i),utm_content:n("utm_content",e,"utmcct",i)}},A.prototype._initUtmData=function(t,e){t=t||location.search,e=e||c.get("__utmz"),this._utmProperties=A._getUtmData(e,t)},A.prototype._initTrackForms=function(){var d=this;document.addEventListener("submit",function(t){var e=t.target||t.srcElement,n=e.getAttribute("rakam-event-form");if("FORM"===e.tagName&&n){var i={},o=e.getAttribute("rakam-event-extra");if(null!==o)for(var s in JSON.parse(o))o.hasOwnProperty(s)&&(i[s]=o[s]);for(var r=0;rthis.options.sessionTimeout)||(this._sessionId=o,C(this.options,U,this._sessionId)),this._lastEventTime=o,C(this.options,N,this._lastEventTime),C(this.options,P,s),n=n||{},_(e=e||{},this._utmProperties);var r={collection:t,properties:{_device_id:this.options.deviceId,_user:this.options.userId,_time:1e3*parseInt(o/1e3),_session_id:this._sessionId||-1,_platform:this.options.platform,_language:this.options.language}};return _(r.properties,this.options.superProperties),_(r.properties,n),_(r.properties,e),this.log("logged eventType="+t+", properties="+JSON.stringify(e)),this._unsentEvents.push({id:s,event:r}),this._unsentEvents.length>this.options.savedMaxCount&&this._unsentEvents.splice(0,this._unsentEvents.length-this.options.savedMaxCount),this.options.saveEvents&&this.saveEvents(),!this._sendEventsIfReady(i)&&i&&i(0,"No request sent"),s}catch(t){this.log(t)}else i&&i(0,"No request sent")},A.prototype.logEvent=function(t,e,n){return this._logEvent(t,e,null,n)},A.prototype.removeEvents=function(t,e){for(var n=[],i=e||[],o=0;o ' + mingzfile);
-var files = [
- 'README.md',
- path.join('src', 'rakam-snippet.js'),
- path.join('src', 'version.js'),
-];
-files.map(replaceVersion);
+const umdFile = path.join(cwd, 'dist', 'rakam-' + version + '.umd.js');
+const umdMinfile = path.join(cwd, 'dist', 'rakam-' + version + '-min.umd.js');
+const umdMingzfile = path.join(cwd, 'dist', 'rakam-' + version + '-min.umd.gz.js');
-console.log('Updated version from', previous, 'to', version);
+fs.copySync(path.join(cwd, 'rakam.umd.js'), umdFile);
+fs.copySync(path.join(cwd, 'rakam.min.js'), umdMinfile);
+exec('gzip < ' + umdMinfile + ' > ' + umdMingzfile);
diff --git a/src/base64.js b/src/base64.js
index d626b01..b31e447 100644
--- a/src/base64.js
+++ b/src/base64.js
@@ -1,7 +1,7 @@
/* jshint bitwise: false */
/* global escape, unescape */
-var UTF8 = require('./utf8');
+import UTF8 from './utf8';
/*
* Base64 encoder/decoder
@@ -45,8 +45,8 @@ var Base64 = {
}
output = output +
- Base64._keyStr.charAt(enc1) + Base64._keyStr.charAt(enc2) +
- Base64._keyStr.charAt(enc3) + Base64._keyStr.charAt(enc4);
+ Base64._keyStr.charAt(enc1) + Base64._keyStr.charAt(enc2) +
+ Base64._keyStr.charAt(enc3) + Base64._keyStr.charAt(enc4);
}
return output;
},
@@ -94,4 +94,4 @@ var Base64 = {
}
};
-module.exports = Base64;
+export default Base64;
diff --git a/src/cookie.js b/src/cookie.js
index f56e4c3..b8453ec 100644
--- a/src/cookie.js
+++ b/src/cookie.js
@@ -2,123 +2,114 @@
* Cookie data
*/
-var Base64 = require('./base64');
-var JSON = require('json'); // jshint ignore:line
-var topDomain = require('top-domain');
-
+import Base64 from './base64'
+// import topDomain from 'top-domain'
var _options = {
expirationDays: undefined,
domain: undefined
-};
-
+}
-var reset = function() {
- _options = {};
-};
+var reset = function () {
+ _options = {}
+}
-
-var options = function(opts) {
+var options = function (opts) {
if (arguments.length === 0) {
- return _options;
+ return _options
}
- opts = opts || {};
+ opts = opts || {}
- _options.expirationDays = opts.expirationDays;
+ _options.expirationDays = opts.expirationDays
- var domain = (opts.domain !== undefined) ? opts.domain : '.' + topDomain(window.location.href);
- var token = Math.random();
- _options.domain = domain;
- set('rakam_test', token);
- var stored = get('rakam_test');
+ var domain = (opts.domain !== undefined) ? opts.domain : '.'
+ var token = Math.random()
+ _options.domain = domain
+ set('rakam_test', token)
+ var stored = get('rakam_test')
if (!stored || stored !== token) {
- domain = null;
+ domain = null
}
- remove('rakam_test');
- _options.domain = domain;
-};
+ remove('rakam_test')
+ _options.domain = domain
+}
-var _domainSpecific = function(name) {
+var _domainSpecific = function (name) {
// differentiate between cookies on different domains
- var suffix = '';
+ var suffix = ''
if (_options.domain) {
- suffix = _options.domain.charAt(0) === '.' ? _options.domain.substring(1) : _options.domain;
+ suffix = _options.domain.charAt(0) === '.' ? _options.domain.substring(1) : _options.domain
}
- return name + suffix;
-};
-
+ return name + suffix
+}
-var get = function(name) {
+var get = function (name) {
try {
- var nameEq = _domainSpecific(name) + '=';
- var ca = document.cookie.split(';');
- var value = null;
+ var nameEq = _domainSpecific(name) + '='
+ var ca = document.cookie.split(';')
+ var value = null
for (var i = 0; i < ca.length; i++) {
- var c = ca[i];
+ var c = ca[i]
while (c.charAt(0) === ' ') {
- c = c.substring(1, c.length);
+ c = c.substring(1, c.length)
}
if (c.indexOf(nameEq) === 0) {
- value = c.substring(nameEq.length, c.length);
- break;
+ value = c.substring(nameEq.length, c.length)
+ break
}
}
if (value) {
- return JSON.parse(Base64.decode(value));
+ return JSON.parse(Base64.decode(value))
}
- return null;
+ return null
} catch (e) {
- return null;
+ return null
}
-};
+}
-
-var set = function(name, value) {
+var set = function (name, value) {
try {
- _set(_domainSpecific(name), Base64.encode(JSON.stringify(value)), _options);
- return true;
+ _set(_domainSpecific(name), Base64.encode(JSON.stringify(value)), _options)
+ return true
} catch (e) {
- return false;
+ return false
}
-};
-
+}
-var _set = function(name, value, opts) {
- var expires = value !== null ? opts.expirationDays : -1 ;
+var _set = function (name, value, opts) {
+ var expires = value !== null ? opts.expirationDays : -1
if (expires) {
- var date = new Date();
- date.setTime(date.getTime() + (expires * 24 * 60 * 60 * 1000));
- expires = date;
+ var date = new Date()
+ date.setTime(date.getTime() + (expires * 24 * 60 * 60 * 1000))
+ expires = date
}
- var str = name + '=' + value;
+ var str = name + '=' + value
if (expires) {
- str += '; expires=' + expires.toUTCString();
+ str += '; expires=' + expires.toUTCString()
}
- str += '; path=/';
+ str += '; path=/'
if (opts.domain) {
- str += '; domain=' + opts.domain;
+ str += '; domain=' + opts.domain
}
- document.cookie = str;
-};
+ document.cookie = str
+}
-
-var remove = function(name) {
+var remove = function (name) {
try {
- _set(_domainSpecific(name), null, _options);
- return true;
+ _set(_domainSpecific(name), null, _options)
+ return true
} catch (e) {
- return false;
+ return false
}
-};
-
+}
-module.exports = {
+export default {
reset: reset,
options: options,
get: get,
set: set,
remove: remove
-};
+}
diff --git a/src/index.js b/src/index.js
index ee1e8da..6a1d2ae 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,10 +1,10 @@
/* jshint expr:true */
-var Rakam = require('./rakam');
+import Rakam from './rakam';
var old = window.rakam || {};
var instance = new Rakam();
instance._q = old._q || [];
// export the instance
-module.exports = instance;
\ No newline at end of file
+export default instance;
diff --git a/src/language.js b/src/language.js
index 6217986..83f18e3 100644
--- a/src/language.js
+++ b/src/language.js
@@ -3,6 +3,6 @@ var getLanguage = function() {
navigator.language || navigator.userLanguage)) || undefined;
};
-module.exports = {
+export default {
language: getLanguage()
};
diff --git a/src/localstorage.js b/src/localstorage.js
index e8efb11..0a4a459 100644
--- a/src/localstorage.js
+++ b/src/localstorage.js
@@ -98,4 +98,4 @@ if (!localStorage) {
};
}
-module.exports = localStorage;
+export default localStorage;
diff --git a/src/object.js b/src/object.js
index 9abbd32..856dfd2 100644
--- a/src/object.js
+++ b/src/object.js
@@ -1,11 +1,11 @@
var object = {};
var has = object.hasOwnProperty;
-exports.merge = function(a, b){
- for (var key in b) {
- if (has.call(b, key)) {
- a[key] = b[key];
+export function merge(a, b) {
+ for (var key in b) {
+ if (has.call(b, key)) {
+ a[key] = b[key];
+ }
}
- }
- return a;
-};
\ No newline at end of file
+ return a;
+}
diff --git a/src/rakam-snippet.js b/src/rakam-snippet.js
index 6ca8604..347b39a 100644
--- a/src/rakam-snippet.js
+++ b/src/rakam-snippet.js
@@ -3,7 +3,7 @@
var as = document.createElement('script');
as.type = 'text/javascript';
as.async = true;
- as.src = 'https://d2f7xo8n6nlhxf.cloudfront.net/rakam.min.js';
+ as.src = 'https://cdn.rakam.io/sdk/rakam.min.js';
as.onload = function () {window.rakam.runQueuedFunctions();};
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(as, s);
diff --git a/src/rakam.js b/src/rakam.js
index d30035d..72fa3dd 100644
--- a/src/rakam.js
+++ b/src/rakam.js
@@ -1,81 +1,82 @@
-var Cookie = require('./cookie')
-var language = require('./language')
-var localStorage = require('./localstorage') // jshint ignore:line
+import Cookie from './cookie';
+import language from './language';
+import localStorage from './localStorage';
//var md5 = require('md5');
-var object = require('./object')
-var Request = require('./xhr')
-var UUID = require('./uuid')
-var version = require('./version')
-var User = require('./user')
-var ifvisible = require('../node_modules/ifvisible.js/src/ifvisible.js')
-var type = require('./type')
+import {merge} from './object';
+import Request from './xhr';
+import UUID from './uuid';
+import version from './version';
+import User from './user';
+import type from './type';
+import ifvisible from 'ifvisible.js';
+
var indexOf
if (!Array.prototype.indexOf) {
- indexOf = function (obj, start) {
- for (var i = (start || 0), j = this.length; i < j; i++) {
- if (this[i] === obj) {
- return i
- }
- }
- return -1
- }
+ indexOf = function (obj, start) {
+ for (var i = (start || 0), j = this.length; i < j; i++) {
+ if (this[i] === obj) {
+ return i
+ }
+ }
+ return -1
+ }
} else {
- indexOf = Array.prototype.indexOf
+ indexOf = Array.prototype.indexOf
}
var API_VERSION = 1
var DEFAULT_OPTIONS = {
- apiEndpoint: 'app.rakam.io',
- eventEndpointPath: '/event/batch',
- cookieExpiration: 365 * 10,
- cookieName: 'rakam_id',
- domain: undefined,
- includeUtm: false,
- trackForms: false,
- language: language.language,
- optOut: false,
- platform: 'Web',
- savedMaxCount: 1000,
- saveEvents: true,
- sessionTimeout: 30 * 60 * 1000,
- unsentKey: 'rakam_unsent',
- uploadBatchSize: 100,
- batchEvents: false,
- eventUploadThreshold: 30,
- eventUploadPeriodMillis: 30 * 1000, // 30s,
- useLocalStorageForSessionization: true
+ apiEndpoint: 'app.rakam.io',
+ eventEndpointPath: '/event/batch',
+ cookieExpiration: 365 * 10,
+ cookieName: 'rakam_id',
+ domain: undefined,
+ includeUtm: false,
+ trackForms: false,
+ language: language.language,
+ optOut: false,
+ platform: 'Web',
+ savedMaxCount: 1000,
+ saveEvents: true,
+ sessionTimeout: 30 * 60 * 1000,
+ unsentKey: 'rakam_unsent',
+ uploadBatchSize: 100,
+ batchEvents: false,
+ eventUploadThreshold: 30,
+ eventUploadPeriodMillis: 30 * 1000, // 30s,
+ useLocalStorageForSessionization: true
}
var StorageKeys = {
- LAST_ID: 'rakam_lastEventId',
- LAST_EVENT_TIME: 'rakam_lastEventTime',
- SESSION_ID: 'rakam_sessionId',
- RETURNING_SESSION: 'rakam_returning'
+ LAST_ID: 'rakam_lastEventId',
+ LAST_EVENT_TIME: 'rakam_lastEventTime',
+ SESSION_ID: 'rakam_sessionId',
+ RETURNING_SESSION: 'rakam_returning'
}
var getSessionItem = function (options, key) {
- if (options.useLocalStorageForSessionization) {
- return localStorage.getItem(key)
- } else {
- return Cookie.get(key, value)
- }
+ if (options.useLocalStorageForSessionization) {
+ return localStorage.getItem(key)
+ } else {
+ return Cookie.get(key)
+ }
}
var setSessionItem = function (options, key, value) {
- if (options.useLocalStorageForSessionization) {
- localStorage.setItem(key, value)
- } else {
- Cookie.set(key, value)
- }
+ if (options.useLocalStorageForSessionization) {
+ localStorage.setItem(key, value)
+ } else {
+ Cookie.set(key, value)
+ }
}
/*
* Rakam API
*/
var Rakam = function () {
- this._unsentEvents = []
- this.options = object.merge({}, DEFAULT_OPTIONS)
+ this._unsentEvents = []
+ this.options = merge({}, DEFAULT_OPTIONS)
}
Rakam.prototype._eventId = 0
@@ -86,9 +87,9 @@ Rakam.prototype._sessionId = null
Rakam.prototype._newSession = false
Rakam.prototype.log = function (s) {
- if (this.options.debug === true) {
- console.log('[Rakam] ' + s)
- }
+ if (this.options.debug === true) {
+ console.log('[Rakam] ' + s)
+ }
}
/**
@@ -100,213 +101,213 @@ Rakam.prototype.log = function (s) {
* - includeUtm (boolean) Whether to send utm parameters with events. Defaults to false.
*/
Rakam.prototype.init = function (apiKey, opt_userId, opt_config, callback) {
- try {
- if (!apiKey) {
- throw new Error('apiKey is null')
- }
- this.options.apiKey = apiKey
-
- var user = new User()
- user.init(this.options)
- this.User = function () {
- return user
- }
-
- if (opt_config) {
- this.options.apiEndpoint = opt_config.apiEndpoint || this.options.apiEndpoint
- this.options.debug = opt_config.debug || this.options.debug === true
-
- if (opt_config.saveEvents !== undefined) {
- this.options.saveEvents = !!opt_config.saveEvents
- }
- if (opt_config.domain !== undefined) {
- this.options.domain = opt_config.domain
- }
- if (opt_config.includeUtm !== undefined) {
- this.options.includeUtm = !!opt_config.includeUtm
- }
- if (opt_config.trackClicks !== undefined) {
- this.options.trackClicks = !!opt_config.trackClicks
- }
- if (opt_config.trackForms !== undefined) {
- this.options.trackForms = !!opt_config.trackForms
- }
- if (opt_config.batchEvents !== undefined) {
- this.options.batchEvents = !!opt_config.batchEvents
- }
- this.options.platform = opt_config.platform || this.options.platform
- this.options.useLocalStorageForSessionization = opt_config.useLocalStorageForSessionization || this.options.useLocalStorageForSessionization
- this.options.language = opt_config.language || this.options.language
- this.options.sessionTimeout = opt_config.sessionTimeout || this.options.sessionTimeout
- this.options.uploadBatchSize = opt_config.uploadBatchSize || this.options.uploadBatchSize
- this.options.eventUploadThreshold = opt_config.eventUploadThreshold || this.options.eventUploadThreshold
- this.options.savedMaxCount = opt_config.savedMaxCount || this.options.savedMaxCount
- this.options.eventUploadPeriodMillis = opt_config.eventUploadPeriodMillis || this.options.eventUploadPeriodMillis
- this.options.superProperties = opt_config.superProperties || []
- }
-
- Cookie.options({
- expirationDays: this.options.cookieExpiration,
- domain: this.options.domain
- })
- this.options.domain = Cookie.options().domain
+ try {
+ if (!apiKey) {
+ throw new Error('apiKey is null')
+ }
+ this.options.apiKey = apiKey
- _loadCookieData(this)
+ var user = new User()
+ user.init(this.options)
+ this.User = function () {
+ return user
+ }
- if ((opt_config && opt_config.deviceId !== undefined && opt_config.deviceId !== null && opt_config.deviceId) || this.options.deviceId) {
- this.options.deviceId = this.options.deviceId
- } else {
- this.deviceIdCreatedAt = new Date()
- this.options.deviceId = UUID()
- }
+ if (opt_config) {
+ this.options.apiEndpoint = opt_config.apiEndpoint || this.options.apiEndpoint
+ this.options.debug = opt_config.debug || this.options.debug === true
+
+ if (opt_config.saveEvents !== undefined) {
+ this.options.saveEvents = !!opt_config.saveEvents
+ }
+ if (opt_config.domain !== undefined) {
+ this.options.domain = opt_config.domain
+ }
+ if (opt_config.includeUtm !== undefined) {
+ this.options.includeUtm = !!opt_config.includeUtm
+ }
+ if (opt_config.trackClicks !== undefined) {
+ this.options.trackClicks = !!opt_config.trackClicks
+ }
+ if (opt_config.trackForms !== undefined) {
+ this.options.trackForms = !!opt_config.trackForms
+ }
+ if (opt_config.batchEvents !== undefined) {
+ this.options.batchEvents = !!opt_config.batchEvents
+ }
+ this.options.platform = opt_config.platform || this.options.platform
+ this.options.useLocalStorageForSessionization = opt_config.useLocalStorageForSessionization || this.options.useLocalStorageForSessionization
+ this.options.language = opt_config.language || this.options.language
+ this.options.sessionTimeout = opt_config.sessionTimeout || this.options.sessionTimeout
+ this.options.uploadBatchSize = opt_config.uploadBatchSize || this.options.uploadBatchSize
+ this.options.eventUploadThreshold = opt_config.eventUploadThreshold || this.options.eventUploadThreshold
+ this.options.savedMaxCount = opt_config.savedMaxCount || this.options.savedMaxCount
+ this.options.eventUploadPeriodMillis = opt_config.eventUploadPeriodMillis || this.options.eventUploadPeriodMillis
+ this.options.superProperties = opt_config.superProperties || []
+ }
- _saveCookieData(this)
+ Cookie.options({
+ expirationDays: this.options.cookieExpiration,
+ domain: this.options.domain
+ })
+ this.options.domain = Cookie.options().domain
- this.log('initialized with apiKey=' + apiKey)
+ _loadCookieData(this)
- if (this.options.saveEvents) {
- var savedUnsentEventsString = localStorage.getItem(this.options.unsentKey)
- if (savedUnsentEventsString) {
- try {
- this._unsentEvents = JSON.parse(savedUnsentEventsString)
- } catch (e) {
- this.log(e)
+ if ((opt_config && opt_config.deviceId !== undefined && opt_config.deviceId !== null && opt_config.deviceId) || this.options.deviceId) {
+ this.options.deviceId = this.options.deviceId
+ } else {
+ this.deviceIdCreatedAt = new Date()
+ this.options.deviceId = UUID()
}
- }
- }
- this._sendEventsIfReady()
+ _saveCookieData(this)
- if (this.options.includeUtm) {
- this._initUtmData()
- }
+ this.log('initialized with apiKey=' + apiKey)
- if (this.options.trackForms) {
- this._initTrackForms()
- }
+ if (this.options.saveEvents) {
+ var savedUnsentEventsString = localStorage.getItem(this.options.unsentKey)
+ if (savedUnsentEventsString) {
+ try {
+ this._unsentEvents = JSON.parse(savedUnsentEventsString)
+ } catch (e) {
+ this.log(e)
+ }
+ }
+ }
- if (this.options.trackClicks) {
- this._initTrackClicks()
- }
+ this._sendEventsIfReady()
- this._lastEventTime = parseInt(getSessionItem(this.options, StorageKeys.LAST_EVENT_TIME)) || null
- this._sessionId = parseInt(getSessionItem(this.options, StorageKeys.SESSION_ID)) || null
+ if (this.options.includeUtm) {
+ this._initUtmData()
+ }
- this._eventId = localStorage.getItem(StorageKeys.LAST_ID) || 0
- var now = new Date().getTime()
- if (!this._sessionId || !this._lastEventTime || now - this._lastEventTime > this.options.sessionTimeout) {
- if (this._sessionId !== null) {
- setSessionItem(this.options, StorageKeys.RETURNING_SESSION, true)
- this._returningUser = true
- }
- this._sessionId = now
- Cookie.remove('_rakam_time')
- setSessionItem(this.options, StorageKeys.SESSION_ID, this._sessionId)
- } else {
- this._returningUser = getSessionItem(this.options, StorageKeys.RETURNING_SESSION) === 'true'
+ if (this.options.trackForms) {
+ this._initTrackForms()
+ }
+
+ if (this.options.trackClicks) {
+ this._initTrackClicks()
+ }
+
+ this._lastEventTime = parseInt(getSessionItem(this.options, StorageKeys.LAST_EVENT_TIME)) || null
+ this._sessionId = parseInt(getSessionItem(this.options, StorageKeys.SESSION_ID)) || null
+
+ this._eventId = localStorage.getItem(StorageKeys.LAST_ID) || 0
+ var now = new Date().getTime()
+ if (!this._sessionId || !this._lastEventTime || now - this._lastEventTime > this.options.sessionTimeout) {
+ if (this._sessionId !== null) {
+ setSessionItem(this.options, StorageKeys.RETURNING_SESSION, true)
+ this._returningUser = true
+ }
+ this._sessionId = now
+ Cookie.remove('_rakam_time')
+ setSessionItem(this.options, StorageKeys.SESSION_ID, this._sessionId)
+ } else {
+ this._returningUser = getSessionItem(this.options, StorageKeys.RETURNING_SESSION) === 'true'
+ }
+ this._lastEventTime = now
+ setSessionItem(this.options, StorageKeys.LAST_EVENT_TIME, this._lastEventTime)
+ } catch (e) {
+ this.log(e)
}
- this._lastEventTime = now
- setSessionItem(this.options, StorageKeys.LAST_EVENT_TIME, this._lastEventTime)
- } catch (e) {
- this.log(e)
- }
- this.setUserId(opt_userId)
+ this.setUserId(opt_userId)
- if (callback && typeof (callback) === 'function') {
- setTimeout(function () {
- callback()
- }, 1)
- }
+ if (callback && typeof (callback) === 'function') {
+ setTimeout(function () {
+ callback()
+ }, 1)
+ }
}
Rakam.prototype.onEvent = function (callback) {
- this.options.eventCallbacks = this.options.eventCallbacks || []
- this.options.eventCallbacks.push(callback)
+ this.options.eventCallbacks = this.options.eventCallbacks || []
+ this.options.eventCallbacks.push(callback)
}
var transformValue = function (_this, attribute, value, type) {
- if (type !== null) {
- type = type.toLowerCase()
- }
- if (type === 'long' || type === 'time' || type === 'timestamp' || type === 'date') {
- value = parseInt(value)
- if (isNaN(value) || !isFinite(value)) {
- _this.log('ignoring ' + attribute + ': the value must be a number')
- value = null
- }
- } else if (type === 'double') {
- value = parseFloat(value)
- if (isNaN(value) || !isFinite(value)) {
- _this.log('ignoring ' + attribute + ': the value is not double')
- value = null
- }
- } else if (type === 'boolean') {
- if (type === 'true' || type === '1') {
- value = true
- } else if (type === 'false' || type === '0') {
- value = false
- } else {
- _this.log('ignoring ' + attribute + ': the value is not boolean')
- value = null
+ if (type !== null) {
+ type = type.toLowerCase()
+ }
+ if (type === 'long' || type === 'time' || type === 'timestamp' || type === 'date') {
+ value = parseInt(value)
+ if (isNaN(value) || !isFinite(value)) {
+ _this.log('ignoring ' + attribute + ': the value must be a number')
+ value = null
+ }
+ } else if (type === 'double') {
+ value = parseFloat(value)
+ if (isNaN(value) || !isFinite(value)) {
+ _this.log('ignoring ' + attribute + ': the value is not double')
+ value = null
+ }
+ } else if (type === 'boolean') {
+ if (type === 'true' || type === '1') {
+ value = true
+ } else if (type === 'false' || type === '0') {
+ value = false
+ } else {
+ _this.log('ignoring ' + attribute + ': the value is not boolean')
+ value = null
+ }
}
- }
- return value
+ return value
}
Rakam.prototype.logInlinedEvent = function (collection, extraProperties, callback) {
- var getAllElementsWithAttribute = function (attribute) {
- if (document.querySelectorAll) {
- return document.querySelectorAll('[rakam-event-attribute]')
- }
- var matchingElements = []
- var allElements = document.getElementsByTagName('*')
- for (var i = 0, n = allElements.length; i < n; i++) {
- if (allElements[i].getAttribute(attribute) !== null) {
- matchingElements.push(allElements[i])
- }
- }
- return matchingElements
- }
-
- var properties = extraProperties || {}
- var elements = getAllElementsWithAttribute('rakam-event-attribute')
- for (var i = 0; i < elements.length; i++) {
- var element = elements[i]
- var attribute = element.getAttribute('rakam-event-attribute')
- var value = element.getAttribute('rakam-event-attribute-value')
- var type = element.getAttribute('rakam-event-attribute-type')
- if (value === null) {
- if (element.tagName === 'INPUT') {
- value = element.value
- } else if (element.tagName === 'SELECT') {
- var option = element.options[element.selectedIndex]
- if (option.value !== null && option.value !== '') {
- var attr = element.getAttribute('rakam-attribute-value')
-
- if (attr !== 'value') {
- value = option.value
- } else {
- value = option.text
- }
- }
- } else if (element.innerText) {
- value = element.innerText.replace(/^\s+|\s+$/g, '')
- } else {
- this.log('Could find value of DOM element.', element)
- }
- }
- if (value !== null && value !== '') {
- properties[attribute] = transformValue(this, attribute, value, type)
- }
-
- }
- this.logEvent(collection, properties, callback)
+ var getAllElementsWithAttribute = function (attribute) {
+ if (document.querySelectorAll) {
+ return document.querySelectorAll('[rakam-event-attribute]')
+ }
+ var matchingElements = []
+ var allElements = document.getElementsByTagName('*')
+ for (var i = 0, n = allElements.length; i < n; i++) {
+ if (allElements[i].getAttribute(attribute) !== null) {
+ matchingElements.push(allElements[i])
+ }
+ }
+ return matchingElements
+ }
+
+ var properties = extraProperties || {}
+ var elements = getAllElementsWithAttribute('rakam-event-attribute')
+ for (var i = 0; i < elements.length; i++) {
+ var element = elements[i]
+ var attribute = element.getAttribute('rakam-event-attribute')
+ var value = element.getAttribute('rakam-event-attribute-value')
+ var type = element.getAttribute('rakam-event-attribute-type')
+ if (value === null) {
+ if (element.tagName === 'INPUT') {
+ value = element.value
+ } else if (element.tagName === 'SELECT') {
+ var option = element.options[element.selectedIndex]
+ if (option.value !== null && option.value !== '') {
+ var attr = element.getAttribute('rakam-attribute-value')
+
+ if (attr !== 'value') {
+ value = option.value
+ } else {
+ value = option.text
+ }
+ }
+ } else if (element.innerText) {
+ value = element.innerText.replace(/^\s+|\s+$/g, '')
+ } else {
+ this.log('Could find value of DOM element.', element)
+ }
+ }
+ if (value !== null && value !== '') {
+ properties[attribute] = transformValue(this, attribute, value, type)
+ }
+
+ }
+ this.logEvent(collection, properties, callback)
}
Rakam.prototype.isReturningUser = function () {
- return this._returningUser
+ return this._returningUser
}
var gapMillis = 0
@@ -315,418 +316,418 @@ var idleTime
var initializedTimer = false
Rakam.prototype.resetTimer = function () {
- if (!initializedTimer) {
- return this.log('Timer is not initialized')
- }
+ if (!initializedTimer) {
+ return this.log('Timer is not initialized')
+ }
- idleTime = null
- gapMillis = 0
- startTime = (new Date()).getTime()
+ idleTime = null
+ gapMillis = 0
+ startTime = (new Date()).getTime()
}
Rakam.prototype.startTimer = function (saveOnClose) {
- if (initializedTimer) {
- return this.log('Timer is already initialized')
- }
+ if (initializedTimer) {
+ return this.log('Timer is already initialized')
+ }
- startTime = (new Date()).getTime()
+ startTime = (new Date()).getTime()
- ifvisible.on('idle', function () {
- idleTime = (new Date()).getTime()
- })
+ ifvisible.on('idle', function () {
+ idleTime = (new Date()).getTime()
+ })
- ifvisible.on('wakeup', function () {
- gapMillis += (new Date()).getTime() - idleTime
- idleTime = null
- })
+ ifvisible.on('wakeup', function () {
+ gapMillis += (new Date()).getTime() - idleTime
+ idleTime = null
+ })
- if (saveOnClose) {
- var func
- if (window.onbeforeunload !== null) {
- func = window.onbeforeunload
- }
- var _this = this
- window.onbeforeunload = function (e) {
- Cookie.set('_rakam_time', _this.getTimeOnPage())
+ if (saveOnClose) {
+ var func
+ if (window.onbeforeunload !== null) {
+ func = window.onbeforeunload
+ }
+ var _this = this
+ window.onbeforeunload = function (e) {
+ Cookie.set('_rakam_time', _this.getTimeOnPage())
- if (func) {
- func(e)
- }
+ if (func) {
+ func(e)
+ }
+ }
}
- }
- initializedTimer = true
+ initializedTimer = true
}
Rakam.prototype.getTimeOnPage = function () {
- if (!initializedTimer) {
- return this.log('Timer is not initialized, returning null from getTimeOnPage()')
- }
+ if (!initializedTimer) {
+ return this.log('Timer is not initialized, returning null from getTimeOnPage()')
+ }
- return ((idleTime > 0 ? idleTime : (new Date()).getTime()) - startTime - gapMillis) / 1000
+ return ((idleTime > 0 ? idleTime : (new Date()).getTime()) - startTime - gapMillis) / 1000
}
Rakam.prototype.getTimeOnPreviousPage = function () {
- return Cookie.get('_rakam_time')
+ return Cookie.get('_rakam_time')
}
Rakam.prototype.nextEventId = function () {
- this._eventId++
- return this._eventId
+ this._eventId++
+ return this._eventId
}
// returns true if sendEvents called immediately
Rakam.prototype._sendEventsIfReady = function (callback) {
- if (this._unsentEvents.length === 0) {
- return false
- }
+ if (this._unsentEvents.length === 0) {
+ return false
+ }
- if (!this.options.batchEvents) {
- this.sendEvents(callback)
- return true
- }
+ if (!this.options.batchEvents) {
+ this.sendEvents(callback)
+ return true
+ }
- if (this._unsentEvents.length >= this.options.eventUploadThreshold) {
- this.sendEvents(callback)
- return true
- }
+ if (this._unsentEvents.length >= this.options.eventUploadThreshold) {
+ this.sendEvents(callback)
+ return true
+ }
- setTimeout(this.sendEvents.bind(this), this.options.eventUploadPeriodMillis)
- return false
+ setTimeout(this.sendEvents.bind(this), this.options.eventUploadPeriodMillis)
+ return false
}
var _loadCookieData = function (scope) {
- var cookieData = Cookie.get(scope.options.cookieName)
- if (cookieData) {
- if (cookieData.deviceId) {
- scope.options.deviceId = cookieData.deviceId
- }
- if (cookieData.userId) {
- scope.options.userId = cookieData.userId
- }
- if (cookieData.superProps) {
- scope.options.superProperties = cookieData.superProps
- }
- if (cookieData.optOut !== undefined) {
- scope.options.optOut = cookieData.optOut
- }
- if (cookieData.deviceIdCreatedAt !== undefined) {
- scope.deviceIdCreatedAt = new Date(parseInt(cookieData.deviceIdCreatedAt))
+ var cookieData = Cookie.get(scope.options.cookieName)
+ if (cookieData) {
+ if (cookieData.deviceId) {
+ scope.options.deviceId = cookieData.deviceId
+ }
+ if (cookieData.userId) {
+ scope.options.userId = cookieData.userId
+ }
+ if (cookieData.superProps) {
+ scope.options.superProperties = cookieData.superProps
+ }
+ if (cookieData.optOut !== undefined) {
+ scope.options.optOut = cookieData.optOut
+ }
+ if (cookieData.deviceIdCreatedAt !== undefined) {
+ scope.deviceIdCreatedAt = new Date(parseInt(cookieData.deviceIdCreatedAt))
+ }
}
- }
}
var _saveCookieData = function (scope) {
- Cookie.set(scope.options.cookieName, {
- deviceId: scope.options.deviceId,
- deviceIdCreatedAt: scope.deviceIdCreatedAt ? scope.deviceIdCreatedAt.getTime() : undefined,
- userId: scope.options.userId,
- superProps: scope.options.superProperties,
- optOut: scope.options.optOut
- })
+ Cookie.set(scope.options.cookieName, {
+ deviceId: scope.options.deviceId,
+ deviceIdCreatedAt: scope.deviceIdCreatedAt ? scope.deviceIdCreatedAt.getTime() : undefined,
+ userId: scope.options.userId,
+ superProps: scope.options.superProperties,
+ optOut: scope.options.optOut
+ })
}
Rakam._getUtmParam = function (name, query) {
- name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]')
- var regex = new RegExp('[\\?&]' + name + '=([^]*)')
- var results = regex.exec(query)
- return results === null ? undefined : decodeURIComponent(results[1].replace(/\+/g, ' '))
+ name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]')
+ var regex = new RegExp('[\\?&]' + name + '=([^]*)')
+ var results = regex.exec(query)
+ return results === null ? undefined : decodeURIComponent(results[1].replace(/\+/g, ' '))
}
Rakam._getUtmData = function (rawCookie, query) {
- // Translate the utmz cookie format into url query string format.
- var cookie = rawCookie ? '?' + rawCookie.split('.').slice(-1)[0].replace(/\|/g, '&') : ''
+ // Translate the utmz cookie format into url query string format.
+ var cookie = rawCookie ? '?' + rawCookie.split('.').slice(-1)[0].replace(/\|/g, '&') : ''
- var fetchParam = function (queryName, query, cookieName, cookie) {
- return Rakam._getUtmParam(queryName, query) ||
- Rakam._getUtmParam(cookieName, cookie)
- }
+ var fetchParam = function (queryName, query, cookieName, cookie) {
+ return Rakam._getUtmParam(queryName, query) ||
+ Rakam._getUtmParam(cookieName, cookie)
+ }
- return {
- utm_source: fetchParam('utm_source', query, 'utmcsr', cookie),
- utm_medium: fetchParam('utm_medium', query, 'utmcmd', cookie),
- utm_campaign: fetchParam('utm_campaign', query, 'utmccn', cookie),
- utm_term: fetchParam('utm_term', query, 'utmctr', cookie),
- utm_content: fetchParam('utm_content', query, 'utmcct', cookie)
- }
+ return {
+ utm_source: fetchParam('utm_source', query, 'utmcsr', cookie),
+ utm_medium: fetchParam('utm_medium', query, 'utmcmd', cookie),
+ utm_campaign: fetchParam('utm_campaign', query, 'utmccn', cookie),
+ utm_term: fetchParam('utm_term', query, 'utmctr', cookie),
+ utm_content: fetchParam('utm_content', query, 'utmcct', cookie)
+ }
}
/**
* Parse the utm properties out of cookies and query for adding to user properties.
*/
Rakam.prototype._initUtmData = function (queryParams, cookieParams) {
- queryParams = queryParams || location.search
- cookieParams = cookieParams || Cookie.get('__utmz')
- this._utmProperties = Rakam._getUtmData(cookieParams, queryParams)
+ queryParams = queryParams || location.search
+ cookieParams = cookieParams || Cookie.get('__utmz')
+ this._utmProperties = Rakam._getUtmData(cookieParams, queryParams)
}
Rakam.prototype._initTrackForms = function () {
- var _this = this
- document.addEventListener('submit', function (event) {
- var targetElement = event.target || event.srcElement
- var collection = targetElement.getAttribute('rakam-event-form')
- if (targetElement.tagName === 'FORM' && collection) {
- var properties = {}
-
- var extraAttributes = targetElement.getAttribute('rakam-event-extra')
- if (extraAttributes !== null) {
- for (var key in JSON.parse(extraAttributes)) {
- if (extraAttributes.hasOwnProperty(key)) {
- properties[key] = extraAttributes[key]
- }
- }
- }
-
- for (var i = 0; i < targetElement.elements.length; i++) {
- var element = targetElement.elements[i]
-
- var type = element.getAttribute('rakam-event-attribute-type')
- var formElemType
- if (element.hasAttribute('type')) {
- formElemType = element.getAttribute('type').toLowerCase()
- }
-
- if (formElemType === 'password') {
- continue
- }
-
- if (type === null && element.tagName === 'INPUT' && formElemType === 'number') {
- type = 'long'
- }
-
- if (element.hasAttribute('rakam-event-form-element-ignore')) {
- continue
- }
-
- var attribute
- if (element.hasAttribute('rakam-event-attribute')) {
- attribute = element.getAttribute('rakam-event-attribute')
- } else {
- attribute = element.getAttribute('name')
- }
-
- if (element.hasAttribute('rakam-event-attribute-value')) {
- properties[attribute] = transformValue(this, attribute, element.getAttribute('rakam-event-attribute-value'), type)
- } else if (element.tagName === 'SELECT') {
- properties[attribute] = transformValue(this, attribute, element.options[element.selectedIndex].value, type)
- } else if (element.tagName === 'INPUT' || element.tagName === 'TEXTAREA') {
- properties[attribute] = transformValue(this, attribute, element.value, type)
- } else {
- _this.log('Couldn\'t get value of form element: ' + attribute)
+ var _this = this
+ document.addEventListener('submit', function (event) {
+ var targetElement = event.target || event.srcElement
+ var collection = targetElement.getAttribute('rakam-event-form')
+ if (targetElement.tagName === 'FORM' && collection) {
+ var properties = {}
+
+ var extraAttributes = targetElement.getAttribute('rakam-event-extra')
+ if (extraAttributes !== null) {
+ for (var key in JSON.parse(extraAttributes)) {
+ if (extraAttributes.hasOwnProperty(key)) {
+ properties[key] = extraAttributes[key]
+ }
+ }
+ }
+
+ for (var i = 0; i < targetElement.elements.length; i++) {
+ var element = targetElement.elements[i]
+
+ var type = element.getAttribute('rakam-event-attribute-type')
+ var formElemType
+ if (element.hasAttribute('type')) {
+ formElemType = element.getAttribute('type').toLowerCase()
+ }
+
+ if (formElemType === 'password') {
+ continue
+ }
+
+ if (type === null && element.tagName === 'INPUT' && formElemType === 'number') {
+ type = 'long'
+ }
+
+ if (element.hasAttribute('rakam-event-form-element-ignore')) {
+ continue
+ }
+
+ var attribute
+ if (element.hasAttribute('rakam-event-attribute')) {
+ attribute = element.getAttribute('rakam-event-attribute')
+ } else {
+ attribute = element.getAttribute('name')
+ }
+
+ if (element.hasAttribute('rakam-event-attribute-value')) {
+ properties[attribute] = transformValue(this, attribute, element.getAttribute('rakam-event-attribute-value'), type)
+ } else if (element.tagName === 'SELECT') {
+ properties[attribute] = transformValue(this, attribute, element.options[element.selectedIndex].value, type)
+ } else if (element.tagName === 'INPUT' || element.tagName === 'TEXTAREA') {
+ properties[attribute] = transformValue(this, attribute, element.value, type)
+ } else {
+ _this.log('Couldn\'t get value of form element: ' + attribute)
+ }
+
+ }
+
+ _this.logEvent(collection, properties)
}
-
- }
-
- _this.logEvent(collection, properties)
- }
- })
+ })
}
Rakam.prototype._initTrackClicks = function () {
- var _this = this
- document.addEventListener('click', function (event) {
- var targetElement = event.target || event.srcElement
- var collection = targetElement.getAttribute('rakam-event-track')
- if (targetElement.tagName === 'FORM' && collection) {
- var properties = {}
-
- var extraAttributes = targetElement.getAttribute('rakam-event-properties')
- if (extraAttributes !== null) {
- for (var key in JSON.parse(extraAttributes)) {
- if (extraAttributes.hasOwnProperty(key)) {
- properties[key] = extraAttributes[key]
- }
+ var _this = this
+ document.addEventListener('click', function (event) {
+ var targetElement = event.target || event.srcElement
+ var collection = targetElement.getAttribute('rakam-event-track')
+ if (targetElement.tagName === 'FORM' && collection) {
+ var properties = {}
+
+ var extraAttributes = targetElement.getAttribute('rakam-event-properties')
+ if (extraAttributes !== null) {
+ for (var key in JSON.parse(extraAttributes)) {
+ if (extraAttributes.hasOwnProperty(key)) {
+ properties[key] = extraAttributes[key]
+ }
+ }
+ }
+
+ _this.logEvent(collection, properties)
}
- }
-
- _this.logEvent(collection, properties)
- }
- })
+ })
}
Rakam.prototype.saveEvents = function () {
- try {
- localStorage.setItem(this.options.unsentKey, JSON.stringify(this._unsentEvents))
- } catch (e) {
- this.log(e)
- }
+ try {
+ localStorage.setItem(this.options.unsentKey, JSON.stringify(this._unsentEvents))
+ } catch (e) {
+ this.log(e)
+ }
}
Rakam.prototype.setDomain = function (domain) {
- try {
- Cookie.options({
- domain: domain
- })
- this.options.domain = Cookie.options().domain
- _loadCookieData(this)
- _saveCookieData(this)
- this.log('set domain=' + domain)
- } catch (e) {
- this.log(e)
- }
+ try {
+ Cookie.options({
+ domain: domain
+ })
+ this.options.domain = Cookie.options().domain
+ _loadCookieData(this)
+ _saveCookieData(this)
+ this.log('set domain=' + domain)
+ } catch (e) {
+ this.log(e)
+ }
}
Rakam.prototype.setUserId = function (userId) {
- try {
- var previousId = this.options.deviceId
- this.options.userId = (userId !== undefined && userId !== null && ('' + userId)) || null
+ try {
+ var previousId = this.options.deviceId
+ this.options.userId = (userId !== undefined && userId !== null && ('' + userId)) || null
+
+ if (userId !== null && userId !== '' && userId !== undefined &&
+ ((this._eventId > 0 && (previousId === null || previousId === undefined)) ||
+ (previousId !== null && previousId !== undefined))) {
+ var _this = this
+ this.User()._merge(previousId, this.deviceIdCreatedAt, function () {
+ _this.deviceIdCreatedAt = null
+ _saveCookieData(_this)
+ })
+ }
- if (userId !== null && userId !== '' && userId !== undefined &&
- ((this._eventId > 0 && (previousId === null || previousId === undefined)) ||
- (previousId !== null && previousId !== undefined))) {
- var _this = this
- this.User()._merge(previousId, this.deviceIdCreatedAt, function () {
- _this.deviceIdCreatedAt = null
- _saveCookieData(_this)
- })
+ _saveCookieData(this)
+ this.log('set userId=' + userId)
+ } catch (e) {
+ this.log(e)
}
-
- _saveCookieData(this)
- this.log('set userId=' + userId)
- } catch (e) {
- this.log(e)
- }
}
Rakam.prototype.setUserProperties = function (parameters) {
- try {
- return new this.User().set(parameters)
- } catch (e) {
- this.log(e)
- }
+ try {
+ return new this.User().set(parameters)
+ } catch (e) {
+ this.log(e)
+ }
}
Rakam.prototype.getUserId = function () {
- return this.options.userId
+ return this.options.userId
}
Rakam.prototype.getDeviceId = function () {
- return this._eventId > 0 ? this.options.deviceId : null
+ return this._eventId > 0 ? this.options.deviceId : null
}
Rakam.prototype.setOptOut = function (enable) {
- try {
- this.options.optOut = enable
- _saveCookieData(this)
- this.log('set optOut=' + enable)
- } catch (e) {
- this.log(e)
- }
+ try {
+ this.options.optOut = enable
+ _saveCookieData(this)
+ this.log('set optOut=' + enable)
+ } catch (e) {
+ this.log(e)
+ }
}
Rakam.prototype.setDeviceId = function (deviceId) {
- try {
- if (deviceId) {
- this.options.deviceId = ('' + deviceId)
- _saveCookieData(this)
+ try {
+ if (deviceId) {
+ this.options.deviceId = ('' + deviceId)
+ _saveCookieData(this)
+ }
+ } catch (e) {
+ this.log(e)
}
- } catch (e) {
- this.log(e)
- }
}
Rakam.prototype.setSuperProperties = function (eventProps, opt_replace) {
- try {
- this.options.superProperties = this.options.superProperties || {}
- for (var property in eventProps) {
- if (eventProps.hasOwnProperty(property)) {
- if (opt_replace === false && this.options.superProperties[property] !== undefined) {
- continue
+ try {
+ this.options.superProperties = this.options.superProperties || {}
+ for (var property in eventProps) {
+ if (eventProps.hasOwnProperty(property)) {
+ if (opt_replace === false && this.options.superProperties[property] !== undefined) {
+ continue
+ }
+ this.options.superProperties[property] = eventProps[property]
+ }
}
- this.options.superProperties[property] = eventProps[property]
- }
- }
- _saveCookieData(this)
- this.log('set super properties=' + JSON.stringify(eventProps))
- } catch (e) {
- this.log(e)
- }
+ _saveCookieData(this)
+ this.log('set super properties=' + JSON.stringify(eventProps))
+ } catch (e) {
+ this.log(e)
+ }
}
Rakam.prototype.setVersionName = function (versionName) {
- try {
- this.options.versionName = versionName
- this.log('set versionName=' + versionName)
- } catch (e) {
- this.log(e)
- }
+ try {
+ this.options.versionName = versionName
+ this.log('set versionName=' + versionName)
+ } catch (e) {
+ this.log(e)
+ }
}
/**
* Private logEvent method. Keeps apiProperties from being publicly exposed.
*/
Rakam.prototype._logEvent = function (eventType, eventProperties, apiProperties, callback) {
- if (typeof callback !== 'function') {
- callback = null
- }
-
- if (!eventType || this.options.optOut) {
- if (callback) {
- callback(0, 'No request sent')
- }
- return
- }
- try {
- var eventTime = new Date().getTime()
- var eventId = this.nextEventId()
- if (!this._sessionId || !this._lastEventTime || eventTime - this._lastEventTime > this.options.sessionTimeout) {
- this._sessionId = eventTime
- setSessionItem(this.options, StorageKeys.SESSION_ID, this._sessionId)
+ if (typeof callback !== 'function') {
+ callback = null
}
- this._lastEventTime = eventTime
- setSessionItem(this.options, StorageKeys.LAST_EVENT_TIME, this._lastEventTime)
- setSessionItem(this.options, StorageKeys.LAST_ID, eventId)
- apiProperties = apiProperties || {}
- eventProperties = eventProperties || {}
-
- // Add the utm properties, if any, onto the event properties.
- object.merge(eventProperties, this._utmProperties)
+ if (!eventType || this.options.optOut) {
+ if (callback) {
+ callback(0, 'No request sent')
+ }
+ return
+ }
+ try {
+ var eventTime = new Date().getTime()
+ var eventId = this.nextEventId()
+ if (!this._sessionId || !this._lastEventTime || eventTime - this._lastEventTime > this.options.sessionTimeout) {
+ this._sessionId = eventTime
+ setSessionItem(this.options, StorageKeys.SESSION_ID, this._sessionId)
+ }
+ this._lastEventTime = eventTime
+ setSessionItem(this.options, StorageKeys.LAST_EVENT_TIME, this._lastEventTime)
+ setSessionItem(this.options, StorageKeys.LAST_ID, eventId)
+
+ apiProperties = apiProperties || {}
+ eventProperties = eventProperties || {}
+
+ // Add the utm properties, if any, onto the event properties.
+ merge(eventProperties, this._utmProperties)
+
+ var event = {
+ collection: eventType,
+ properties: {
+ _device_id: this.options.deviceId,
+ _user: this.options.userId,
+ // use seconds
+ _time: parseInt(eventTime / 1000) * 1000,
+ _session_id: this._sessionId || -1,
+ _platform: this.options.platform,
+ _language: this.options.language
+ }
+ }
- var event = {
- collection: eventType,
- properties: {
- _device_id: this.options.deviceId,
- _user: this.options.userId,
- // use seconds
- _time: parseInt(eventTime / 1000) * 1000,
- _session_id: this._sessionId || -1,
- _platform: this.options.platform,
- _language: this.options.language
- }
- }
+ merge(event.properties, this.options.superProperties)
+ merge(event.properties, apiProperties)
+ merge(event.properties, eventProperties)
- object.merge(event.properties, this.options.superProperties)
- object.merge(event.properties, apiProperties)
- object.merge(event.properties, eventProperties)
+ this.log('logged eventType=' + eventType + ', properties=' + JSON.stringify(eventProperties))
- this.log('logged eventType=' + eventType + ', properties=' + JSON.stringify(eventProperties))
+ this._unsentEvents.push({id: eventId, event: event})
- this._unsentEvents.push({id: eventId, event: event})
+ // Remove old events from the beginning of the array if too many
+ // have accumulated. Don't want to kill memory. Default is 1000 events.
+ if (this._unsentEvents.length > this.options.savedMaxCount) {
+ this._unsentEvents.splice(0, this._unsentEvents.length - this.options.savedMaxCount)
+ }
- // Remove old events from the beginning of the array if too many
- // have accumulated. Don't want to kill memory. Default is 1000 events.
- if (this._unsentEvents.length > this.options.savedMaxCount) {
- this._unsentEvents.splice(0, this._unsentEvents.length - this.options.savedMaxCount)
- }
+ if (this.options.saveEvents) {
+ this.saveEvents()
+ }
- if (this.options.saveEvents) {
- this.saveEvents()
- }
+ if (!this._sendEventsIfReady(callback) && callback) {
+ callback(0, 'No request sent')
+ }
- if (!this._sendEventsIfReady(callback) && callback) {
- callback(0, 'No request sent')
+ return eventId
+ } catch (e) {
+ this.log(e)
}
-
- return eventId
- } catch (e) {
- this.log(e)
- }
}
Rakam.prototype.logEvent = function (eventType, eventProperties, callback) {
- return this._logEvent(eventType, eventProperties, null, callback)
+ return this._logEvent(eventType, eventProperties, null, callback)
}
/**
@@ -734,116 +735,116 @@ Rakam.prototype.logEvent = function (eventType, eventProperties, callback) {
* a true filter in case events get out of order or old events are removed.
*/
Rakam.prototype.removeEvents = function (maxEventId, errors) {
- var filteredEvents = []
- var errorList = errors || []
+ var filteredEvents = []
+ var errorList = errors || []
- for (var i = 0; i < this._unsentEvents.length; i++) {
- var id = this._unsentEvents[i].id
- if (errorList.indexOf(id) > -1 || id > maxEventId) {
- filteredEvents.push(this._unsentEvents[i])
+ for (var i = 0; i < this._unsentEvents.length; i++) {
+ var id = this._unsentEvents[i].id
+ if (errorList.indexOf(id) > -1 || id > maxEventId) {
+ filteredEvents.push(this._unsentEvents[i])
+ }
}
- }
- this._unsentEvents = filteredEvents
+ this._unsentEvents = filteredEvents
}
Rakam.prototype.sendEvents = function (callback) {
- var _this = this
- if (!this._sending && !this.options.optOut && this._unsentEvents.length > 0) {
- this._sending = true
- var url = ('https:' === window.location.protocol ? 'https' : 'http') + '://' + this.options.apiEndpoint + this.options.eventEndpointPath
-
- // Determine how many events to send and track the maximum event id sent in this batch.
- var numEvents = Math.min(this._unsentEvents.length, this.options.uploadBatchSize)
- var maxEventId = this._unsentEvents[numEvents - 1].id
-
- this._unsentEvents.slice(0, numEvents)
- var events = this._unsentEvents.slice(0, numEvents).map(function (e) {
- return e.event
- })
- var upload_time = new Date().getTime()
-
- var api = {
- 'upload_time': upload_time,
- 'api_version': API_VERSION,
- 'api_key': this.options.apiKey
- //"checksum": md5(API_VERSION + JSON.stringify(events) + upload_time).toUpperCase()
- }
-
- var scope = this
- new Request(url, {
- api: api,
- events: events
- }).send(function (status, response, headers) {
- scope._sending = false
-
- try {
- if (status === 200 || status === 409) {
- _this.log('successful upload')
-
- scope.removeEvents(maxEventId, status === 409 ? JSON.parse(response) : null)
-
- // Update the event cache after the removal of sent events.
- if (scope.options.saveEvents) {
- scope.saveEvents()
- }
-
- // Send more events if any queued during previous send.
- if (!scope._sendEventsIfReady(callback) && callback) {
- callback(status, response)
- }
-
- } else if (status === 413) {
- _this.log('request too large')
- // Can't even get this one massive event through. Drop it.
- if (scope.options.uploadBatchSize === 1) {
- scope.removeEvents(maxEventId)
- }
-
- // The server complained about the length of the request.
- // Backoff and try again.
- scope.options.uploadBatchSize = Math.ceil(numEvents / 2)
- scope.sendEvents(callback)
-
- } else if (callback) { // If server turns something like a 400
- callback(status, response)
- }
- } catch (e) {
- _this.log('failed upload')
- }
-
- if (scope.options.eventCallbacks) {
- try {
- for (var i = 0; i < scope.options.eventCallbacks.length; i++) {
- scope.options.eventCallbacks[i](status, response, headers)
- }
- } catch (e) {
- _this.log('callback throws an exception', e)
- }
- }
- })
- } else if (callback) {
- callback(0, 'No request sent')
- }
+ var _this = this
+ if (!this._sending && !this.options.optOut && this._unsentEvents.length > 0) {
+ this._sending = true
+ var url = ('https:' === window.location.protocol ? 'https' : 'http') + '://' + this.options.apiEndpoint + this.options.eventEndpointPath
+
+ // Determine how many events to send and track the maximum event id sent in this batch.
+ var numEvents = Math.min(this._unsentEvents.length, this.options.uploadBatchSize)
+ var maxEventId = this._unsentEvents[numEvents - 1].id
+
+ this._unsentEvents.slice(0, numEvents)
+ var events = this._unsentEvents.slice(0, numEvents).map(function (e) {
+ return e.event
+ })
+ var upload_time = new Date().getTime()
+
+ var api = {
+ 'upload_time': upload_time,
+ 'api_version': API_VERSION,
+ 'api_key': this.options.apiKey
+ //"checksum": md5(API_VERSION + JSON.stringify(events) + upload_time).toUpperCase()
+ }
+
+ var scope = this
+ new Request(url, {
+ api: api,
+ events: events
+ }).send(function (status, response, headers) {
+ scope._sending = false
+
+ try {
+ if (status === 200 || status === 409) {
+ _this.log('successful upload')
+
+ scope.removeEvents(maxEventId, status === 409 ? JSON.parse(response) : null)
+
+ // Update the event cache after the removal of sent events.
+ if (scope.options.saveEvents) {
+ scope.saveEvents()
+ }
+
+ // Send more events if any queued during previous send.
+ if (!scope._sendEventsIfReady(callback) && callback) {
+ callback(status, response)
+ }
+
+ } else if (status === 413) {
+ _this.log('request too large')
+ // Can't even get this one massive event through. Drop it.
+ if (scope.options.uploadBatchSize === 1) {
+ scope.removeEvents(maxEventId)
+ }
+
+ // The server complained about the length of the request.
+ // Backoff and try again.
+ scope.options.uploadBatchSize = Math.ceil(numEvents / 2)
+ scope.sendEvents(callback)
+
+ } else if (callback) { // If server turns something like a 400
+ callback(status, response)
+ }
+ } catch (e) {
+ _this.log('failed upload')
+ }
+
+ if (scope.options.eventCallbacks) {
+ try {
+ for (var i = 0; i < scope.options.eventCallbacks.length; i++) {
+ scope.options.eventCallbacks[i](status, response, headers)
+ }
+ } catch (e) {
+ _this.log('callback throws an exception', e)
+ }
+ }
+ })
+ } else if (callback) {
+ callback(0, 'No request sent')
+ }
}
Rakam.prototype.onload = function (callback) {
- var _this = this
- setTimeout(function () {
- callback()
- _this.log('executed callback', callback)
- }, 1)
+ var _this = this
+ setTimeout(function () {
+ callback()
+ _this.log('executed callback', callback)
+ }, 1)
}
Rakam.prototype.runQueuedFunctions = function () {
- for (var i = 0; i < this._q.length; i++) {
- var fn = this[this._q[i][0]]
- if (fn && type(fn) === 'function') {
- fn.apply(this, this._q[i].slice(1))
+ for (var i = 0; i < this._q.length; i++) {
+ var fn = this[this._q[i][0]]
+ if (fn && type(fn) === 'function') {
+ fn.apply(this, this._q[i].slice(1))
+ }
}
- }
- this._q = [] // clear function queue after running
+ this._q = [] // clear function queue after running
}
Rakam.prototype.__VERSION__ = version
-module.exports = Rakam
+export default Rakam
diff --git a/src/rollup.esm.js b/src/rollup.esm.js
new file mode 100644
index 0000000..d508fa9
--- /dev/null
+++ b/src/rollup.esm.js
@@ -0,0 +1,33 @@
+import commonjs from 'rollup-plugin-commonjs';
+import replace from 'rollup-plugin-replace';
+import babel from 'rollup-plugin-babel';
+import json from 'rollup-plugin-json';
+
+export default {
+ input: 'src/index.js',
+ output: {
+ name: 'rakam',
+ file: 'rakam.esm.js',
+ format: 'esm',
+ },
+ plugins: [
+ json(),
+ babel({
+ exclude: 'node_modules/**',
+ plugins: [
+ '@babel/plugin-transform-runtime',
+ '@babel/plugin-proposal-object-rest-spread'
+ ],
+ runtimeHelpers: true
+ }),
+ replace({
+ BUILD_COMPAT_SNIPPET: 'false',
+ BUILD_COMPAT_LOCAL_STORAGE: 'true',
+ BUILD_COMPAT_2_0: 'true',
+ BUILD_COMPAT_REACT_NATIVE: 'false',
+ }),
+ commonjs({
+ include: "node_modules/**"
+ }),
+ ],
+};
diff --git a/src/type.js b/src/type.js
index bd050b4..003aac5 100644
--- a/src/type.js
+++ b/src/type.js
@@ -14,7 +14,7 @@ var toString = Object.prototype.toString;
* @api public
*/
-module.exports = function(val){
+export default function(val){
switch (toString.call(val)) {
case '[object Date]': return 'date';
case '[object RegExp]': return 'regexp';
@@ -42,4 +42,4 @@ module.exports = function(val){
val = val.valueOf ? val.valueOf() : Object.prototype.valueOf.apply(val);
return typeof val;
-};
\ No newline at end of file
+}
diff --git a/src/user.js b/src/user.js
index 375400a..f824b23 100644
--- a/src/user.js
+++ b/src/user.js
@@ -1,5 +1,5 @@
-var type = require('./type');
-var Request = require('./xhr');
+import type from './type';
+import Request from './xhr';
/*
* Wrapper for a user properties JSON object that supports operations.
@@ -98,4 +98,4 @@ User.prototype.unset = function (properties, callback) {
return this;
};
-module.exports = User;
\ No newline at end of file
+export default User;
diff --git a/src/utf8.js b/src/utf8.js
index 1e8a781..e6ca10d 100644
--- a/src/utf8.js
+++ b/src/utf8.js
@@ -54,4 +54,4 @@ var UTF8 = {
}
};
-module.exports = UTF8;
+export default UTF8;
diff --git a/src/uuid.js b/src/uuid.js
index 947f8ef..4eaa18c 100644
--- a/src/uuid.js
+++ b/src/uuid.js
@@ -28,4 +28,4 @@ var uuid = function(a) {
);
};
-module.exports = uuid;
+export default uuid;
diff --git a/src/version.js b/src/version.js
index 14bc25b..265de76 100644
--- a/src/version.js
+++ b/src/version.js
@@ -1 +1 @@
-module.exports = '2.6.0';
\ No newline at end of file
+export default '2.6.0';
diff --git a/src/xhr.js b/src/xhr.js
index 9172c7f..812659d 100644
--- a/src/xhr.js
+++ b/src/xhr.js
@@ -1,4 +1,3 @@
-var JSON = require('json'); // jshint ignore:line
/*
* Simple AJAX request object
@@ -50,15 +49,15 @@ Request.prototype.send = function (callback) {
}
};
xhr.setRequestHeader('Content-Type', 'text/plain');
-
+
for (var key in this.headers) {
if (this.headers.hasOwnProperty(key)) {
xhr.setRequestHeader(key, this.headers[key]);
}
}
-
+
xhr.send(JSON.stringify(this.data));
}
};
-module.exports = Request;
+export default Request;