diff --git a/.gitignore b/.gitignore
index c9ff8b9..ee98b78 100644
--- a/.gitignore
+++ b/.gitignore
@@ -47,4 +47,10 @@ Temporary Items
.apdisk
# Visual Studio Code
-jsconfig.json
\ No newline at end of file
+jsconfig.json
+
+
+
+
+node_modules
+package-lock.json
diff --git a/build/src/aggregate.js b/build/src/aggregate.js
index f29ba92..1a771b1 100644
--- a/build/src/aggregate.js
+++ b/build/src/aggregate.js
@@ -2,9 +2,8 @@
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
-var _require = require('./util.js');
-
-var unknownOp = _require.unknownOp;
+var _require = require('./util.js'),
+ unknownOp = _require.unknownOp;
var Cursor = require('./cursor.js');
@@ -60,13 +59,10 @@ var aggregate = function aggregate(col, pipeline) {
for (var _iterator = pipeline[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var doc = _step.value;
- var _getStageObject = getStageObject(doc);
-
- var _getStageObject2 = _slicedToArray(_getStageObject, 2);
-
- var fn = _getStageObject2[0];
- var arg = _getStageObject2[1];
-
+ var _getStageObject = getStageObject(doc),
+ _getStageObject2 = _slicedToArray(_getStageObject, 2),
+ fn = _getStageObject2[0],
+ arg = _getStageObject2[1];
fn(cur, arg);
}
diff --git a/build/src/collection.js b/build/src/collection.js
index bdc2a8b..ab0bebd 100644
--- a/build/src/collection.js
+++ b/build/src/collection.js
@@ -8,16 +8,16 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var Q = require('q');
-var _require = require('./util.js');
-
-var getIDBError = _require.getIDBError;
-var Cursor = require('./cursor.js');
-var _aggregate = require('./aggregate.js');
-var _update = require('./update.js');
-var _remove = require('./remove.js');
+var _require = require('./util.js'),
+ getIDBError = _require.getIDBError,
+ Cursor = require('./cursor.js'),
+ _aggregate = require('./aggregate.js'),
+ _update = require('./update.js'),
+ _remove = require('./remove.js');
/** Class representing a collection. */
+
var Collection = function () {
/** Note: Do not instantiate directly. */
function Collection(db, name) {
diff --git a/build/src/create_next_fn.js b/build/src/create_next_fn.js
index f06829b..c99c1d3 100644
--- a/build/src/create_next_fn.js
+++ b/build/src/create_next_fn.js
@@ -1,24 +1,20 @@
'use strict';
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
var merge = require('deepmerge');
-var _require = require('./util.js');
-
-var hashify = _require.hashify;
-var getIDBError = _require.getIDBError;
-var filter = require('./filter.js');
-var sort = require('./sort.js');
-var _require2 = require('./lang/filter.js');
-
-var build = _require2.build;
-var Conjunction = _require2.Conjunction;
-var Disjunction = _require2.Disjunction;
-var Exists = _require2.Exists;
+var _require = require('./util.js'),
+ hashify = _require.hashify,
+ getIDBError = _require.getIDBError,
+ filter = require('./filter.js'),
+ sort = require('./sort.js');
+var _require2 = require('./lang/filter.js'),
+ build = _require2.build,
+ Conjunction = _require2.Conjunction,
+ Disjunction = _require2.Disjunction,
+ Exists = _require2.Exists;
var toIDBDirection = function toIDBDirection(value) {
return value > 0 ? 'next' : 'prev';
@@ -33,15 +29,15 @@ var joinPredicates = function joinPredicates(preds) {
};
var removeClause = function removeClause(_ref) {
- var parent = _ref.parent;
- var index = _ref.index;
+ var parent = _ref.parent,
+ index = _ref.index;
parent.args.splice(index, 1);
};
var openConn = function openConn(_ref2, cb) {
- var col = _ref2.col;
- var read_pref = _ref2.read_pref;
+ var col = _ref2.col,
+ read_pref = _ref2.read_pref;
col._db._getConn(function (error, idb) {
if (error) {
@@ -64,9 +60,9 @@ var openConn = function openConn(_ref2, cb) {
};
var getIDBReqWithIndex = function getIDBReqWithIndex(store, clause) {
- var key_range = clause.idb_key_range || null;
- var direction = clause.idb_direction || 'next';
- var literal = clause.path.literal;
+ var key_range = clause.idb_key_range || null,
+ direction = clause.idb_direction || 'next',
+ literal = clause.path.literal;
var index = void 0;
@@ -93,10 +89,9 @@ var buildPredicates = function buildPredicates(pipeline) {
try {
for (var _iterator = pipeline[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
- var _step$value = _slicedToArray(_step.value, 2);
-
- var fn = _step$value[0];
- var arg = _step$value[1];
+ var _step$value = _slicedToArray(_step.value, 2),
+ fn = _step$value[0],
+ arg = _step$value[1];
if (fn === filter) {
var pred = build(arg);
@@ -132,9 +127,10 @@ var buildPredicates = function buildPredicates(pipeline) {
};
var initPredAndSortSpec = function initPredAndSortSpec(config) {
- var pipeline = config.pipeline;
- var preds = [];
- var sort_specs = [];
+ var pipeline = config.pipeline,
+ preds = [],
+ sort_specs = [];
+
var i = 0;
@@ -144,10 +140,9 @@ var initPredAndSortSpec = function initPredAndSortSpec(config) {
try {
for (var _iterator2 = pipeline[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
- var _step2$value = _slicedToArray(_step2.value, 2);
-
- var fn = _step2$value[0];
- var arg = _step2$value[1];
+ var _step2$value = _slicedToArray(_step2.value, 2),
+ fn = _step2$value[0],
+ arg = _step2$value[1];
if (fn === sort) {
sort_specs.push(arg);
@@ -230,8 +225,8 @@ var getClauses = function getClauses(col, pred) {
};
var initClauses = function initClauses(config) {
- var col = config.col;
- var pred = config.pred;
+ var col = config.col,
+ pred = config.pred;
config.clauses = getClauses(col, pred);
@@ -242,8 +237,8 @@ var initHint = function initHint(config) {
return;
}
- var clauses = config.clauses;
- var hint = config.hint;
+ var clauses = config.clauses,
+ hint = config.hint;
var new_clauses = [];
@@ -287,9 +282,9 @@ var initSort = function initSort(config) {
return;
}
- var clauses = config.clauses;
- var spec = config.sort_spec;
- var pipeline = config.pipeline;
+ var clauses = config.clauses,
+ spec = config.sort_spec,
+ pipeline = config.pipeline;
var new_clauses = [];
@@ -334,30 +329,24 @@ var initSort = function initSort(config) {
};
var createGetIDBReqFn = function createGetIDBReqFn(_ref3) {
- var pred = _ref3.pred;
- var clauses = _ref3.clauses;
- var pipeline = _ref3.pipeline;
+ var pred = _ref3.pred,
+ clauses = _ref3.clauses,
+ pipeline = _ref3.pipeline;
var getIDBReq = void 0;
if (clauses.length) {
- var _ret = function () {
- var clause = clauses[0];
+ var clause = clauses[0];
- getIDBReq = function getIDBReq(store) {
- return getIDBReqWithIndex(store, clause);
- };
-
- if (!pred || clause === pred) {
- return {
- v: getIDBReq
- };
- }
+ getIDBReq = function getIDBReq(store) {
+ return getIDBReqWithIndex(store, clause);
+ };
- removeClause(clause);
- }();
+ if (!pred || clause === pred) {
+ return getIDBReq;
+ }
- if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v;
+ removeClause(clause);
} else {
getIDBReq = getIDBReqWithoutIndex;
@@ -427,10 +416,9 @@ var addPipelineStages = function addPipelineStages(_ref4, next) {
try {
for (var _iterator6 = pipeline[Symbol.iterator](), _step6; !(_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done); _iteratorNormalCompletion6 = true) {
- var _step6$value = _slicedToArray(_step6.value, 2);
-
- var fn = _step6$value[0];
- var arg = _step6$value[1];
+ var _step6$value = _slicedToArray(_step6.value, 2),
+ fn = _step6$value[0],
+ arg = _step6$value[1];
next = fn(next, arg);
}
diff --git a/build/src/cursor.js b/build/src/cursor.js
index 4a194a2..241f0dd 100644
--- a/build/src/cursor.js
+++ b/build/src/cursor.js
@@ -45,7 +45,7 @@ var Cursor = function (_EventEmitter) {
function Cursor(col, read_pref) {
_classCallCheck(this, Cursor);
- var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Cursor).call(this));
+ var _this = _possibleConstructorReturn(this, (Cursor.__proto__ || Object.getPrototypeOf(Cursor)).call(this));
_this._col = col;
_this._read_pref = read_pref;
@@ -90,7 +90,7 @@ var Cursor = function (_EventEmitter) {
}, {
key: 'forEach',
value: function forEach() {
- var fn = arguments.length <= 0 || arguments[0] === undefined ? function () {} : arguments[0];
+ var fn = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {};
var cb = arguments[1];
var deferred = Q.defer();
diff --git a/build/src/db.js b/build/src/db.js
index bb7e394..dd795d4 100644
--- a/build/src/db.js
+++ b/build/src/db.js
@@ -14,9 +14,8 @@ var EventEmitter = require('events'),
memoize = require('memoizee'),
Q = require('q');
-var _require = require('./util.js');
-
-var getIDBError = _require.getIDBError;
+var _require = require('./util.js'),
+ getIDBError = _require.getIDBError;
var Collection = require('./collection.js');
@@ -68,7 +67,7 @@ var Db = function (_EventEmitter) {
function Db(name, version, config) {
_classCallCheck(this, Db);
- var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Db).call(this));
+ var _this = _possibleConstructorReturn(this, (Db.__proto__ || Object.getPrototypeOf(Db)).call(this));
_this._name = name;
diff --git a/build/src/group.js b/build/src/group.js
index 2655746..4775f48 100644
--- a/build/src/group.js
+++ b/build/src/group.js
@@ -1,7 +1,5 @@
'use strict';
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
@@ -14,12 +12,12 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var memoize = require('memoizee');
-var _require = require('./util.js');
+var _require = require('./util.js'),
+ unknownOp = _require.unknownOp,
+ hashify = _require.hashify,
+ build = require('./lang/expression.js'),
+ Fields = require('./lang/fields.js');
-var unknownOp = _require.unknownOp;
-var hashify = _require.hashify;
-var build = require('./lang/expression.js');
-var Fields = require('./lang/fields.js');
var Operator = function () {
function Operator() {
_classCallCheck(this, Operator);
@@ -28,8 +26,8 @@ var Operator = function () {
_createClass(Operator, [{
key: 'getOpValueWithRefs',
value: function getOpValueWithRefs(expr, doc, cb) {
- var ast = expr.ast;
- var fields = expr.fields;
+ var ast = expr.ast,
+ fields = expr.fields;
cb(ast.run(fields));
@@ -60,7 +58,7 @@ var Sum = function (_Operator) {
function Sum() {
_classCallCheck(this, Sum);
- var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Sum).call(this));
+ var _this = _possibleConstructorReturn(this, (Sum.__proto__ || Object.getPrototypeOf(Sum)).call(this));
_this._value = 0;
return _this;
@@ -69,7 +67,7 @@ var Sum = function (_Operator) {
_createClass(Sum, [{
key: 'getOpValueWithRefs',
value: function getOpValueWithRefs(expr, doc, cb) {
- _get(Object.getPrototypeOf(Sum.prototype), 'getOpValueWithRefs', this).call(this, expr, doc, function (value) {
+ _get(Sum.prototype.__proto__ || Object.getPrototypeOf(Sum.prototype), 'getOpValueWithRefs', this).call(this, expr, doc, function (value) {
Sum._verify(value, cb);
});
}
@@ -88,7 +86,7 @@ var Sum = function (_Operator) {
}, {
key: 'getOpValue',
value: function getOpValue(expr, cb) {
- _get(Object.getPrototypeOf(Sum), 'getOpValue', this).call(this, expr, function (value) {
+ _get(Sum.__proto__ || Object.getPrototypeOf(Sum), 'getOpValue', this).call(this, expr, function (value) {
return Sum._verify(value, cb);
});
}
@@ -103,7 +101,7 @@ var Avg = function (_Sum) {
function Avg() {
_classCallCheck(this, Avg);
- var _this2 = _possibleConstructorReturn(this, Object.getPrototypeOf(Avg).call(this));
+ var _this2 = _possibleConstructorReturn(this, (Avg.__proto__ || Object.getPrototypeOf(Avg)).call(this));
_this2._count = 0;
return _this2;
@@ -114,7 +112,7 @@ var Avg = function (_Sum) {
value: function add(value) {
this._count++;
- _get(Object.getPrototypeOf(Avg.prototype), 'add', this).call(this, value);
+ _get(Avg.prototype.__proto__ || Object.getPrototypeOf(Avg.prototype), 'add', this).call(this, value);
}
}, {
key: 'value',
@@ -132,7 +130,7 @@ var Compare = function (_Operator2) {
function Compare(fn) {
_classCallCheck(this, Compare);
- var _this3 = _possibleConstructorReturn(this, Object.getPrototypeOf(Compare).call(this));
+ var _this3 = _possibleConstructorReturn(this, (Compare.__proto__ || Object.getPrototypeOf(Compare)).call(this));
_this3._value = null;
_this3._fn = fn;
@@ -176,7 +174,7 @@ var Min = function (_Compare) {
function Min() {
_classCallCheck(this, Min);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Min).call(this, function (a, b) {
+ return _possibleConstructorReturn(this, (Min.__proto__ || Object.getPrototypeOf(Min)).call(this, function (a, b) {
return a < b;
}));
}
@@ -190,7 +188,7 @@ var Max = function (_Compare2) {
function Max() {
_classCallCheck(this, Max);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Max).call(this, function (a, b) {
+ return _possibleConstructorReturn(this, (Max.__proto__ || Object.getPrototypeOf(Max)).call(this, function (a, b) {
return a > b;
}));
}
@@ -204,7 +202,7 @@ var Push = function (_Operator3) {
function Push() {
_classCallCheck(this, Push);
- var _this6 = _possibleConstructorReturn(this, Object.getPrototypeOf(Push).call(this));
+ var _this6 = _possibleConstructorReturn(this, (Push.__proto__ || Object.getPrototypeOf(Push)).call(this));
_this6._value = [];
return _this6;
@@ -226,7 +224,7 @@ var AddToSet = function (_Operator4) {
function AddToSet() {
_classCallCheck(this, AddToSet);
- var _this7 = _possibleConstructorReturn(this, Object.getPrototypeOf(AddToSet).call(this));
+ var _this7 = _possibleConstructorReturn(this, (AddToSet.__proto__ || Object.getPrototypeOf(AddToSet)).call(this));
_this7._hashes = {};
return _this7;
@@ -339,9 +337,9 @@ var groupLoopFn = function groupLoopFn(next, in_end, groups, fn) {
};
var createGroupByRefFn = function createGroupByRefFn(next, expr, steps) {
- var in_start = steps.in_start;
- var in_iter = steps.in_iter;
- var in_end = steps.in_end;
+ var in_start = steps.in_start,
+ in_iter = steps.in_iter,
+ in_end = steps.in_end;
var groups = [];
@@ -385,9 +383,9 @@ var createGroupFn = function createGroupFn(next, expr, steps) {
return createGroupByRefFn(next, expr, steps);
}
- var in_start = steps.in_start;
- var in_iter = steps.in_iter;
- var in_end = steps.in_end;
+ var in_start = steps.in_start,
+ in_iter = steps.in_iter,
+ in_end = steps.in_end;
var groups = [];
@@ -401,19 +399,13 @@ var createGroupFn = function createGroupFn(next, expr, steps) {
};
if (in_iter.length) {
- var _ret = function () {
- var add = memoize(function () {
- return initGroupDoc();
- });
-
- return {
- v: groupLoopFn(next, in_end, groups, function (doc) {
- runSteps(in_iter, add(), doc);
- })
- };
- }();
+ var add = memoize(function () {
+ return initGroupDoc();
+ });
- if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v;
+ return groupLoopFn(next, in_end, groups, function (doc) {
+ runSteps(in_iter, add(), doc);
+ });
}
return function (cb) {
@@ -439,9 +431,9 @@ var ops = {
};
var _build = function _build(steps, field, value) {
- var in_start = steps.in_start;
- var in_iter = steps.in_iter;
- var in_end = steps.in_end;
+ var in_start = steps.in_start,
+ in_iter = steps.in_iter,
+ in_end = steps.in_end;
var op_strs = Object.keys(value);
diff --git a/build/src/lang/expression.js b/build/src/lang/expression.js
index 2e44474..ba1d2bb 100644
--- a/build/src/lang/expression.js
+++ b/build/src/lang/expression.js
@@ -10,11 +10,11 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-var _require = require('../util.js');
+var _require = require('../util.js'),
+ unknownOp = _require.unknownOp,
+ MISSING = require('./missing_symbol.js'),
+ Path = require('./path.js');
-var unknownOp = _require.unknownOp;
-var MISSING = require('./missing_symbol.js');
-var Path = require('./path.js');
var Value = function () {
function Value(value) {
_classCallCheck(this, Value);
@@ -69,7 +69,7 @@ var NumberValue = function (_Value) {
function NumberValue() {
_classCallCheck(this, NumberValue);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(NumberValue).apply(this, arguments));
+ return _possibleConstructorReturn(this, (NumberValue.__proto__ || Object.getPrototypeOf(NumberValue)).apply(this, arguments));
}
_createClass(NumberValue, null, [{
@@ -88,7 +88,7 @@ var StringValue = function (_Value2) {
function StringValue() {
_classCallCheck(this, StringValue);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(StringValue).apply(this, arguments));
+ return _possibleConstructorReturn(this, (StringValue.__proto__ || Object.getPrototypeOf(StringValue)).apply(this, arguments));
}
_createClass(StringValue, null, [{
@@ -107,7 +107,7 @@ var ArrayValue = function (_Value3) {
function ArrayValue() {
_classCallCheck(this, ArrayValue);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(ArrayValue).apply(this, arguments));
+ return _possibleConstructorReturn(this, (ArrayValue.__proto__ || Object.getPrototypeOf(ArrayValue)).apply(this, arguments));
}
_createClass(ArrayValue, null, [{
@@ -126,7 +126,7 @@ var DateValue = function (_Value4) {
function DateValue() {
_classCallCheck(this, DateValue);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(DateValue).apply(this, arguments));
+ return _possibleConstructorReturn(this, (DateValue.__proto__ || Object.getPrototypeOf(DateValue)).apply(this, arguments));
}
_createClass(DateValue, null, [{
@@ -145,7 +145,7 @@ var Literal = function (_Value5) {
function Literal() {
_classCallCheck(this, Literal);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Literal).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Literal.__proto__ || Object.getPrototypeOf(Literal)).apply(this, arguments));
}
_createClass(Literal, [{
@@ -188,14 +188,14 @@ var ObjectExpr = function (_Value6) {
function ObjectExpr() {
_classCallCheck(this, ObjectExpr);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(ObjectExpr).apply(this, arguments));
+ return _possibleConstructorReturn(this, (ObjectExpr.__proto__ || Object.getPrototypeOf(ObjectExpr)).apply(this, arguments));
}
_createClass(ObjectExpr, [{
key: 'run',
value: function run(fields) {
- var result = {};var value = this.value;
-
+ var result = {},
+ value = this.value;
for (var field in value) {
result[field] = value[field].run(fields);
@@ -236,7 +236,7 @@ var FnOp = function (_Operator) {
function FnOp(fn) {
_classCallCheck(this, FnOp);
- var _this7 = _possibleConstructorReturn(this, Object.getPrototypeOf(FnOp).call(this));
+ var _this7 = _possibleConstructorReturn(this, (FnOp.__proto__ || Object.getPrototypeOf(FnOp)).call(this));
_this7.fn = fn;
return _this7;
@@ -245,8 +245,8 @@ var FnOp = function (_Operator) {
_createClass(FnOp, [{
key: 'run',
value: function run(fields) {
- var args = this.args;
- var fn = this.fn;
+ var args = this.args,
+ fn = this.fn;
return args.map(function (arg) {
@@ -269,7 +269,7 @@ var UnaryFnOp = function (_FnOp) {
function UnaryFnOp() {
_classCallCheck(this, UnaryFnOp);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(UnaryFnOp).apply(this, arguments));
+ return _possibleConstructorReturn(this, (UnaryFnOp.__proto__ || Object.getPrototypeOf(UnaryFnOp)).apply(this, arguments));
}
_createClass(UnaryFnOp, [{
@@ -294,7 +294,7 @@ var fnOp = function fnOp(Parent, fn) {
function _class() {
_classCallCheck(this, _class);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(_class).call(this, fn));
+ return _possibleConstructorReturn(this, (_class.__proto__ || Object.getPrototypeOf(_class)).call(this, fn));
}
return _class;
@@ -302,7 +302,7 @@ var fnOp = function fnOp(Parent, fn) {
};
var opTypes = function opTypes(Parent, InputType) {
- var ResultType = arguments.length <= 2 || arguments[2] === undefined ? InputType : arguments[2];
+ var ResultType = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : InputType;
var Constructor = function (_Parent2) {
_inherits(Constructor, _Parent2);
@@ -310,7 +310,7 @@ var opTypes = function opTypes(Parent, InputType) {
function Constructor() {
_classCallCheck(this, Constructor);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Constructor).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Constructor.__proto__ || Object.getPrototypeOf(Constructor)).apply(this, arguments));
}
return Constructor;
@@ -328,7 +328,7 @@ var ArithOp = function (_opTypes) {
function ArithOp() {
_classCallCheck(this, ArithOp);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(ArithOp).apply(this, arguments));
+ return _possibleConstructorReturn(this, (ArithOp.__proto__ || Object.getPrototypeOf(ArithOp)).apply(this, arguments));
}
return ArithOp;
@@ -344,7 +344,7 @@ var Add = function (_arithOp) {
function Add() {
_classCallCheck(this, Add);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Add).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Add.__proto__ || Object.getPrototypeOf(Add)).apply(this, arguments));
}
return Add;
@@ -358,7 +358,7 @@ var Subtract = function (_arithOp2) {
function Subtract() {
_classCallCheck(this, Subtract);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Subtract).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Subtract.__proto__ || Object.getPrototypeOf(Subtract)).apply(this, arguments));
}
return Subtract;
@@ -372,7 +372,7 @@ var Multiply = function (_arithOp3) {
function Multiply() {
_classCallCheck(this, Multiply);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Multiply).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Multiply.__proto__ || Object.getPrototypeOf(Multiply)).apply(this, arguments));
}
return Multiply;
@@ -386,7 +386,7 @@ var Divide = function (_arithOp4) {
function Divide() {
_classCallCheck(this, Divide);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Divide).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Divide.__proto__ || Object.getPrototypeOf(Divide)).apply(this, arguments));
}
return Divide;
@@ -400,7 +400,7 @@ var Mod = function (_arithOp5) {
function Mod() {
_classCallCheck(this, Mod);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Mod).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Mod.__proto__ || Object.getPrototypeOf(Mod)).apply(this, arguments));
}
return Mod;
@@ -414,7 +414,7 @@ var MathOp = function (_opTypes2) {
function MathOp() {
_classCallCheck(this, MathOp);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(MathOp).apply(this, arguments));
+ return _possibleConstructorReturn(this, (MathOp.__proto__ || Object.getPrototypeOf(MathOp)).apply(this, arguments));
}
_createClass(MathOp, [{
@@ -444,7 +444,7 @@ var Abs = function (_mathOp) {
function Abs() {
_classCallCheck(this, Abs);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Abs).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Abs.__proto__ || Object.getPrototypeOf(Abs)).apply(this, arguments));
}
return Abs;
@@ -456,7 +456,7 @@ var Ceil = function (_mathOp2) {
function Ceil() {
_classCallCheck(this, Ceil);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Ceil).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Ceil.__proto__ || Object.getPrototypeOf(Ceil)).apply(this, arguments));
}
return Ceil;
@@ -468,7 +468,7 @@ var Floor = function (_mathOp3) {
function Floor() {
_classCallCheck(this, Floor);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Floor).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Floor.__proto__ || Object.getPrototypeOf(Floor)).apply(this, arguments));
}
return Floor;
@@ -480,7 +480,7 @@ var Ln = function (_mathOp4) {
function Ln() {
_classCallCheck(this, Ln);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Ln).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Ln.__proto__ || Object.getPrototypeOf(Ln)).apply(this, arguments));
}
return Ln;
@@ -492,7 +492,7 @@ var Log10 = function (_mathOp5) {
function Log10() {
_classCallCheck(this, Log10);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Log10).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Log10.__proto__ || Object.getPrototypeOf(Log10)).apply(this, arguments));
}
return Log10;
@@ -504,7 +504,7 @@ var Pow = function (_mathOp6) {
function Pow() {
_classCallCheck(this, Pow);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Pow).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Pow.__proto__ || Object.getPrototypeOf(Pow)).apply(this, arguments));
}
return Pow;
@@ -516,7 +516,7 @@ var Sqrt = function (_mathOp7) {
function Sqrt() {
_classCallCheck(this, Sqrt);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Sqrt).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Sqrt.__proto__ || Object.getPrototypeOf(Sqrt)).apply(this, arguments));
}
return Sqrt;
@@ -528,7 +528,7 @@ var Trunc = function (_mathOp8) {
function Trunc() {
_classCallCheck(this, Trunc);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Trunc).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Trunc.__proto__ || Object.getPrototypeOf(Trunc)).apply(this, arguments));
}
return Trunc;
@@ -540,7 +540,7 @@ var StringConcatOp = function (_opTypes3) {
function StringConcatOp() {
_classCallCheck(this, StringConcatOp);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(StringConcatOp).apply(this, arguments));
+ return _possibleConstructorReturn(this, (StringConcatOp.__proto__ || Object.getPrototypeOf(StringConcatOp)).apply(this, arguments));
}
return StringConcatOp;
@@ -552,7 +552,7 @@ var Concat = function (_fnOp) {
function Concat() {
_classCallCheck(this, Concat);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Concat).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Concat.__proto__ || Object.getPrototypeOf(Concat)).apply(this, arguments));
}
return Concat;
@@ -566,7 +566,7 @@ var CaseOp = function (_opTypes4) {
function CaseOp() {
_classCallCheck(this, CaseOp);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(CaseOp).apply(this, arguments));
+ return _possibleConstructorReturn(this, (CaseOp.__proto__ || Object.getPrototypeOf(CaseOp)).apply(this, arguments));
}
_createClass(CaseOp, [{
@@ -585,7 +585,7 @@ var ToLower = function (_fnOp2) {
function ToLower() {
_classCallCheck(this, ToLower);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(ToLower).apply(this, arguments));
+ return _possibleConstructorReturn(this, (ToLower.__proto__ || Object.getPrototypeOf(ToLower)).apply(this, arguments));
}
return ToLower;
@@ -599,7 +599,7 @@ var ToUpper = function (_fnOp3) {
function ToUpper() {
_classCallCheck(this, ToUpper);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(ToUpper).apply(this, arguments));
+ return _possibleConstructorReturn(this, (ToUpper.__proto__ || Object.getPrototypeOf(ToUpper)).apply(this, arguments));
}
return ToUpper;
@@ -613,7 +613,7 @@ var ConcatArraysOp = function (_opTypes5) {
function ConcatArraysOp() {
_classCallCheck(this, ConcatArraysOp);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(ConcatArraysOp).apply(this, arguments));
+ return _possibleConstructorReturn(this, (ConcatArraysOp.__proto__ || Object.getPrototypeOf(ConcatArraysOp)).apply(this, arguments));
}
return ConcatArraysOp;
@@ -625,7 +625,7 @@ var ConcatArrays = function (_fnOp4) {
function ConcatArrays() {
_classCallCheck(this, ConcatArrays);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(ConcatArrays).apply(this, arguments));
+ return _possibleConstructorReturn(this, (ConcatArrays.__proto__ || Object.getPrototypeOf(ConcatArrays)).apply(this, arguments));
}
return ConcatArrays;
@@ -639,7 +639,7 @@ var DateOp = function (_opTypes6) {
function DateOp() {
_classCallCheck(this, DateOp);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(DateOp).apply(this, arguments));
+ return _possibleConstructorReturn(this, (DateOp.__proto__ || Object.getPrototypeOf(DateOp)).apply(this, arguments));
}
return DateOp;
@@ -655,7 +655,7 @@ var DayOfMonth = function (_dateOp) {
function DayOfMonth() {
_classCallCheck(this, DayOfMonth);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(DayOfMonth).apply(this, arguments));
+ return _possibleConstructorReturn(this, (DayOfMonth.__proto__ || Object.getPrototypeOf(DayOfMonth)).apply(this, arguments));
}
return DayOfMonth;
@@ -669,7 +669,7 @@ var Year = function (_dateOp2) {
function Year() {
_classCallCheck(this, Year);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Year).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Year.__proto__ || Object.getPrototypeOf(Year)).apply(this, arguments));
}
return Year;
@@ -683,7 +683,7 @@ var Month = function (_dateOp3) {
function Month() {
_classCallCheck(this, Month);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Month).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Month.__proto__ || Object.getPrototypeOf(Month)).apply(this, arguments));
}
return Month;
@@ -697,7 +697,7 @@ var Hour = function (_dateOp4) {
function Hour() {
_classCallCheck(this, Hour);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Hour).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Hour.__proto__ || Object.getPrototypeOf(Hour)).apply(this, arguments));
}
return Hour;
@@ -711,7 +711,7 @@ var Minute = function (_dateOp5) {
function Minute() {
_classCallCheck(this, Minute);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Minute).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Minute.__proto__ || Object.getPrototypeOf(Minute)).apply(this, arguments));
}
return Minute;
@@ -725,7 +725,7 @@ var Second = function (_dateOp6) {
function Second() {
_classCallCheck(this, Second);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Second).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Second.__proto__ || Object.getPrototypeOf(Second)).apply(this, arguments));
}
return Second;
@@ -739,7 +739,7 @@ var Millisecond = function (_dateOp7) {
function Millisecond() {
_classCallCheck(this, Millisecond);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Millisecond).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Millisecond.__proto__ || Object.getPrototypeOf(Millisecond)).apply(this, arguments));
}
return Millisecond;
@@ -751,8 +751,8 @@ var TypeCond = function () {
function TypeCond(stack, args, op) {
_classCallCheck(this, TypeCond);
- var InputType = op.InputType;
- var alt = op.alt;
+ var InputType = op.InputType,
+ alt = op.alt;
this.result_types = new Set([op.ResultType, alt.ResultType]);
@@ -766,9 +766,9 @@ var TypeCond = function () {
_createClass(TypeCond, [{
key: 'run',
value: function run(fields) {
- var stack = this.stack;
- var isType = this.isType;
- var op = this.op;
+ var stack = this.stack,
+ isType = this.isType,
+ op = this.op;
var new_args = [];
diff --git a/build/src/lang/fields.js b/build/src/lang/fields.js
index 516587f..7557b15 100644
--- a/build/src/lang/fields.js
+++ b/build/src/lang/fields.js
@@ -6,9 +6,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var memoize = require('memoizee');
-var _require = require('../util.js');
-
-var _get = _require.get;
+var _require = require('../util.js'),
+ _get = _require.get;
var MISSING = require('./missing_symbol.js');
diff --git a/build/src/lang/filter.js b/build/src/lang/filter.js
index 0539581..657614b 100644
--- a/build/src/lang/filter.js
+++ b/build/src/lang/filter.js
@@ -14,12 +14,10 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-var _require = require('../util.js');
-
-var isObject = _require.isObject;
-var equal = _require.equal;
-var unknownOp = _require.unknownOp;
-
+var _require = require('../util.js'),
+ isObject = _require.isObject,
+ equal = _require.equal,
+ unknownOp = _require.unknownOp;
var MISSING = require('./missing_symbol.js'),
Path = require('./path.js'),
@@ -101,7 +99,7 @@ var Connective = function (_Operator) {
function Connective(args) {
_classCallCheck(this, Connective);
- var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Connective).call(this));
+ var _this = _possibleConstructorReturn(this, (Connective.__proto__ || Object.getPrototypeOf(Connective)).call(this));
_this.args = args;
return _this;
@@ -116,7 +114,7 @@ var Conjunction = function (_Connective) {
function Conjunction() {
_classCallCheck(this, Conjunction);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Conjunction).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Conjunction.__proto__ || Object.getPrototypeOf(Conjunction)).apply(this, arguments));
}
_createClass(Conjunction, [{
@@ -182,7 +180,7 @@ var Disjunction = function (_Connective2) {
function Disjunction() {
_classCallCheck(this, Disjunction);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Disjunction).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Disjunction.__proto__ || Object.getPrototypeOf(Disjunction)).apply(this, arguments));
}
_createClass(Disjunction, [{
@@ -233,7 +231,7 @@ var Negation = function (_Conjunction) {
function Negation() {
_classCallCheck(this, Negation);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Negation).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Negation.__proto__ || Object.getPrototypeOf(Negation)).apply(this, arguments));
}
_createClass(Negation, [{
@@ -244,7 +242,7 @@ var Negation = function (_Conjunction) {
}, {
key: 'run',
value: function run(fields) {
- return !_get(Object.getPrototypeOf(Negation.prototype), 'run', this).call(this, fields);
+ return !_get(Negation.prototype.__proto__ || Object.getPrototypeOf(Negation.prototype), 'run', this).call(this, fields);
}
}]);
@@ -257,7 +255,7 @@ var Exists = function (_Operator2) {
function Exists(path, bool) {
_classCallCheck(this, Exists);
- var _this5 = _possibleConstructorReturn(this, Object.getPrototypeOf(Exists).call(this));
+ var _this5 = _possibleConstructorReturn(this, (Exists.__proto__ || Object.getPrototypeOf(Exists)).call(this));
_this5.path = path;
_this5.bool = bool;
@@ -285,7 +283,7 @@ var Equal = function (_Operator3) {
function Equal(path, value) {
_classCallCheck(this, Equal);
- var _this6 = _possibleConstructorReturn(this, Object.getPrototypeOf(Equal).call(this));
+ var _this6 = _possibleConstructorReturn(this, (Equal.__proto__ || Object.getPrototypeOf(Equal)).call(this));
_this6.path = path;
_this6.value = value;
@@ -295,6 +293,7 @@ var Equal = function (_Operator3) {
_createClass(Equal, [{
key: 'run',
value: function run(fields) {
+
var value = fields.get(this.path);
if (value === MISSING) {
return false;
@@ -317,19 +316,41 @@ var Equal = function (_Operator3) {
return Equal;
}(Operator);
+var EqualValue = function (_Operator4) {
+ _inherits(EqualValue, _Operator4);
+
+ function EqualValue(value) {
+ _classCallCheck(this, EqualValue);
+
+ var _this7 = _possibleConstructorReturn(this, (EqualValue.__proto__ || Object.getPrototypeOf(EqualValue)).call(this));
+
+ _this7.value = value;
+ return _this7;
+ }
+
+ _createClass(EqualValue, [{
+ key: 'run',
+ value: function run(value) {
+ return equal(value, this.value);
+ }
+ }]);
+
+ return EqualValue;
+}(Operator);
+
var NotEqual = function (_Equal) {
_inherits(NotEqual, _Equal);
function NotEqual() {
_classCallCheck(this, NotEqual);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(NotEqual).apply(this, arguments));
+ return _possibleConstructorReturn(this, (NotEqual.__proto__ || Object.getPrototypeOf(NotEqual)).apply(this, arguments));
}
_createClass(NotEqual, [{
key: 'run',
value: function run(fields) {
- return !_get(Object.getPrototypeOf(NotEqual.prototype), 'run', this).call(this, fields);
+ return !_get(NotEqual.prototype.__proto__ || Object.getPrototypeOf(NotEqual.prototype), 'run', this).call(this, fields);
}
}, {
key: 'is_index_matchable',
@@ -341,18 +362,18 @@ var NotEqual = function (_Equal) {
return NotEqual;
}(Equal);
-var Range = function (_Operator4) {
- _inherits(Range, _Operator4);
+var Range = function (_Operator5) {
+ _inherits(Range, _Operator5);
function Range(path, fns, values) {
_classCallCheck(this, Range);
- var _this8 = _possibleConstructorReturn(this, Object.getPrototypeOf(Range).call(this));
+ var _this9 = _possibleConstructorReturn(this, (Range.__proto__ || Object.getPrototypeOf(Range)).call(this));
- _this8.path = path;
- _this8.fns = fns;
- _this8.values = values;
- return _this8;
+ _this9.path = path;
+ _this9.fns = fns;
+ _this9.values = values;
+ return _this9;
}
_createClass(Range, [{
@@ -364,8 +385,8 @@ var Range = function (_Operator4) {
return false;
}
- var fns = this.fns;
- var values = this.values;
+ var fns = this.fns,
+ values = this.values;
for (var i = 0; i < fns.length; i++) {
@@ -397,7 +418,7 @@ var rangeMixin = function rangeMixin() {
function _class(path, values) {
_classCallCheck(this, _class);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(_class).call(this, path, fns, values));
+ return _possibleConstructorReturn(this, (_class.__proto__ || Object.getPrototypeOf(_class)).call(this, path, fns, values));
}
return _class;
@@ -423,7 +444,7 @@ var Gt = function (_rangeMixin) {
function Gt() {
_classCallCheck(this, Gt);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Gt).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Gt.__proto__ || Object.getPrototypeOf(Gt)).apply(this, arguments));
}
_createClass(Gt, [{
@@ -444,7 +465,7 @@ var Gte = function (_rangeMixin2) {
function Gte() {
_classCallCheck(this, Gte);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Gte).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Gte.__proto__ || Object.getPrototypeOf(Gte)).apply(this, arguments));
}
_createClass(Gte, [{
@@ -465,7 +486,7 @@ var Lt = function (_rangeMixin3) {
function Lt() {
_classCallCheck(this, Lt);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Lt).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Lt.__proto__ || Object.getPrototypeOf(Lt)).apply(this, arguments));
}
_createClass(Lt, [{
@@ -486,7 +507,7 @@ var Lte = function (_rangeMixin4) {
function Lte() {
_classCallCheck(this, Lte);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Lte).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Lte.__proto__ || Object.getPrototypeOf(Lte)).apply(this, arguments));
}
_createClass(Lte, [{
@@ -507,7 +528,7 @@ var GtLt = function (_rangeMixin5) {
function GtLt() {
_classCallCheck(this, GtLt);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(GtLt).apply(this, arguments));
+ return _possibleConstructorReturn(this, (GtLt.__proto__ || Object.getPrototypeOf(GtLt)).apply(this, arguments));
}
_createClass(GtLt, [{
@@ -528,7 +549,7 @@ var GteLt = function (_rangeMixin6) {
function GteLt() {
_classCallCheck(this, GteLt);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(GteLt).apply(this, arguments));
+ return _possibleConstructorReturn(this, (GteLt.__proto__ || Object.getPrototypeOf(GteLt)).apply(this, arguments));
}
_createClass(GteLt, [{
@@ -549,7 +570,7 @@ var GtLte = function (_rangeMixin7) {
function GtLte() {
_classCallCheck(this, GtLte);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(GtLte).apply(this, arguments));
+ return _possibleConstructorReturn(this, (GtLte.__proto__ || Object.getPrototypeOf(GtLte)).apply(this, arguments));
}
_createClass(GtLte, [{
@@ -570,7 +591,7 @@ var GteLte = function (_rangeMixin8) {
function GteLte() {
_classCallCheck(this, GteLte);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(GteLte).apply(this, arguments));
+ return _possibleConstructorReturn(this, (GteLte.__proto__ || Object.getPrototypeOf(GteLte)).apply(this, arguments));
}
_createClass(GteLte, [{
@@ -585,17 +606,17 @@ var GteLte = function (_rangeMixin8) {
return GteLte;
}(rangeMixin(gte, lte));
-var ElemMatch = function (_Operator5) {
- _inherits(ElemMatch, _Operator5);
+var ElemMatch = function (_Operator6) {
+ _inherits(ElemMatch, _Operator6);
function ElemMatch(path, op) {
_classCallCheck(this, ElemMatch);
- var _this18 = _possibleConstructorReturn(this, Object.getPrototypeOf(ElemMatch).call(this));
+ var _this19 = _possibleConstructorReturn(this, (ElemMatch.__proto__ || Object.getPrototypeOf(ElemMatch)).call(this));
- _this18.path = path;
- _this18.op = op;
- return _this18;
+ _this19.path = path;
+ _this19.op = op;
+ return _this19;
}
_createClass(ElemMatch, [{
@@ -617,8 +638,10 @@ var ElemMatch = function (_Operator5) {
for (var _iterator4 = elements[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
var obj = _step4.value;
- if (isObject(obj) && op.run(new Fields(obj))) {
- return true;
+ if (isObject(obj)) {
+ if (op.run(new Fields(obj))) return true;
+ } else if (op instanceof EqualValue) {
+ if (op.run(obj)) return true;
}
}
} catch (err) {
@@ -648,17 +671,17 @@ var ElemMatch = function (_Operator5) {
return ElemMatch;
}(Operator);
-var RegEx = function (_Operator6) {
- _inherits(RegEx, _Operator6);
+var RegEx = function (_Operator7) {
+ _inherits(RegEx, _Operator7);
function RegEx(path, expr) {
_classCallCheck(this, RegEx);
- var _this19 = _possibleConstructorReturn(this, Object.getPrototypeOf(RegEx).call(this));
+ var _this20 = _possibleConstructorReturn(this, (RegEx.__proto__ || Object.getPrototypeOf(RegEx)).call(this));
- _this19.path = path;
- _this19.expr = expr;
- return _this19;
+ _this20.path = path;
+ _this20.expr = expr;
+ return _this20;
}
_createClass(RegEx, [{
@@ -875,11 +898,9 @@ var buildRange = function buildRange(new_args, path, params, op_keys) {
try {
for (var _iterator9 = ranges[Symbol.iterator](), _step9; !(_iteratorNormalCompletion9 = (_step9 = _iterator9.next()).done); _iteratorNormalCompletion9 = true) {
- var _step9$value = _toArray(_step9.value);
-
- var RangeOp = _step9$value[0];
-
- var range_keys = _step9$value.slice(1);
+ var _step9$value = _toArray(_step9.value),
+ RangeOp = _step9$value[0],
+ range_keys = _step9$value.slice(1);
var result = build(RangeOp, range_keys);
@@ -1019,10 +1040,12 @@ var buildClause = function buildClause(parent_args, path, params) {
}
if (op_keys.has('$elemMatch')) {
- var op = build(params.$elemMatch);
+ if (params.$elemMatch.$eq) new_args.push(new ElemMatch(path, new EqualValue(params.$elemMatch.$eq)));else {
+ var op = build(params.$elemMatch);
- if (op) {
- new_args.push(new ElemMatch(path, op));
+ if (op) {
+ new_args.push(new ElemMatch(path, op));
+ }
}
op_keys.delete('$elemMatch');
diff --git a/build/src/lang/path.js b/build/src/lang/path.js
index 78ce954..239c7fc 100644
--- a/build/src/lang/path.js
+++ b/build/src/lang/path.js
@@ -2,9 +2,8 @@
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-var _require = require('../util.js');
-
-var toPathPieces = _require.toPathPieces;
+var _require = require('../util.js'),
+ toPathPieces = _require.toPathPieces;
var Path = function Path(path) {
_classCallCheck(this, Path);
diff --git a/build/src/project.js b/build/src/project.js
index 95e132f..0a6fcb3 100644
--- a/build/src/project.js
+++ b/build/src/project.js
@@ -1,16 +1,12 @@
'use strict';
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
-var _require = require('./util.js');
-
-var toPathPieces = _require.toPathPieces;
-var set = _require.set;
-var remove2 = _require.remove2;
-var copy = _require.copy;
-
+var _require = require('./util.js'),
+ toPathPieces = _require.toPathPieces,
+ set = _require.set,
+ remove2 = _require.remove2,
+ copy = _require.copy;
var build = require('./lang/expression.js');
var Fields = require('./lang/fields.js');
@@ -22,10 +18,9 @@ var addition = function addition(doc, new_doc, new_fields) {
try {
for (var _iterator = new_fields[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
- var _step$value = _slicedToArray(_step.value, 2);
-
- var path_pieces = _step$value[0];
- var add = _step$value[1];
+ var _step$value = _slicedToArray(_step.value, 2),
+ path_pieces = _step$value[0],
+ add = _step$value[1];
add(doc, new_doc, path_pieces);
}
@@ -48,29 +43,21 @@ var addition = function addition(doc, new_doc, new_fields) {
};
var _build = function _build(value1) {
- var _build2 = build(value1);
-
- var ast = _build2.ast;
- var paths = _build2.paths;
- var has_refs = _build2.has_refs;
-
+ var _build2 = build(value1),
+ ast = _build2.ast,
+ paths = _build2.paths,
+ has_refs = _build2.has_refs;
if (!has_refs) {
- var _ret = function () {
- var value2 = ast.run();
+ var value2 = ast.run();
- return {
- v: function v(doc) {
- for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
- args[_key - 1] = arguments[_key];
- }
-
- return set.apply(undefined, args.concat([value2]));
- }
- };
- }();
+ return function (doc) {
+ for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+ args[_key - 1] = arguments[_key];
+ }
- if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v;
+ return set.apply(undefined, args.concat([value2]));
+ };
}
return function (doc) {
@@ -135,39 +122,35 @@ var project = function project(_next, spec) {
}
if (!existing_fields.length) {
- (function () {
- var project = void 0;
+ var _project = void 0;
- if (_id_bool) {
- project = function project(doc, new_doc) {
- if (doc.hasOwnProperty('_id')) {
- new_doc._id = doc._id;
- }
- };
- } else {
- project = function project(doc, new_doc) {
- delete new_doc._id;
- };
- }
+ if (_id_bool) {
+ _project = function _project(doc, new_doc) {
+ if (doc.hasOwnProperty('_id')) {
+ new_doc._id = doc._id;
+ }
+ };
+ } else {
+ _project = function _project(doc, new_doc) {
+ delete new_doc._id;
+ };
+ }
- steps.push(function (doc, new_doc) {
- project(doc, new_doc);
+ steps.push(function (doc, new_doc) {
+ _project(doc, new_doc);
- return new_doc;
- });
- })();
+ return new_doc;
+ });
} else {
- (function () {
- if (is_inclusion === _id_bool) {
- existing_fields.push(['_id']);
- }
+ if (is_inclusion === _id_bool) {
+ existing_fields.push(['_id']);
+ }
- var project = is_inclusion ? copy : remove2;
+ var _project2 = is_inclusion ? copy : remove2;
- steps.push(function (doc) {
- return project(doc, existing_fields);
- });
- })();
+ steps.push(function (doc) {
+ return _project2(doc, existing_fields);
+ });
}
var next = function next(cb) {
diff --git a/build/src/remove.js b/build/src/remove.js
index 93f7692..5dd80a5 100644
--- a/build/src/remove.js
+++ b/build/src/remove.js
@@ -1,9 +1,7 @@
'use strict';
-var _require = require('./util.js');
-
-var getIDBError = _require.getIDBError;
-
+var _require = require('./util.js'),
+ getIDBError = _require.getIDBError;
module.exports = function (cur, cb) {
(function iterate() {
diff --git a/build/src/sort.js b/build/src/sort.js
index 25b8625..1a47800 100644
--- a/build/src/sort.js
+++ b/build/src/sort.js
@@ -2,12 +2,10 @@
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
-var _require = require('./util.js');
-
-var toPathPieces = _require.toPathPieces;
-var isObject = _require.isObject;
-var equal = _require.equal;
-
+var _require = require('./util.js'),
+ toPathPieces = _require.toPathPieces,
+ isObject = _require.isObject,
+ equal = _require.equal;
var compare = function compare(a, b, path_pieces, order) {
for (var i = 0; i < path_pieces.length - 1; i++) {
@@ -61,10 +59,9 @@ module.exports = function (_next, spec) {
try {
for (var _iterator = sorts[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
- var _step$value = _slicedToArray(_step.value, 2);
-
- var path_pieces = _step$value[0];
- var order = _step$value[1];
+ var _step$value = _slicedToArray(_step.value, 2),
+ path_pieces = _step$value[0],
+ order = _step$value[1];
var result = compare(a, b, path_pieces, order);
diff --git a/build/src/unwind.js b/build/src/unwind.js
index cbf5e54..eefde0b 100644
--- a/build/src/unwind.js
+++ b/build/src/unwind.js
@@ -2,11 +2,9 @@
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
-var _require = require('./util.js');
-
-var toPathPieces = _require.toPathPieces;
-var get = _require.get;
-
+var _require = require('./util.js'),
+ toPathPieces = _require.toPathPieces,
+ get = _require.get;
module.exports = function (_next, path) {
var path_pieces = toPathPieces(path.substring(1)),
diff --git a/build/src/update.js b/build/src/update.js
index 8c6e1e2..47ea3cf 100644
--- a/build/src/update.js
+++ b/build/src/update.js
@@ -1,17 +1,15 @@
'use strict';
-var _require = require('./util.js');
-
-var toPathPieces = _require.toPathPieces;
-var get = _require.get;
-var set = _require.set;
-var modify = _require.modify;
-var remove1 = _require.remove1;
-var rename = _require.rename;
-var equal = _require.equal;
-var unknownOp = _require.unknownOp;
-var getIDBError = _require.getIDBError;
-
+var _require = require('./util.js'),
+ toPathPieces = _require.toPathPieces,
+ get = _require.get,
+ set = _require.set,
+ modify = _require.modify,
+ remove1 = _require.remove1,
+ rename = _require.rename,
+ equal = _require.equal,
+ unknownOp = _require.unknownOp,
+ getIDBError = _require.getIDBError;
var ops = {};
diff --git a/build/test/aggregate.js b/build/test/aggregate.js
index d9e9368..150eeed 100644
--- a/build/test/aggregate.js
+++ b/build/test/aggregate.js
@@ -1,9 +1,7 @@
'use strict';
-var _require = require('chai');
-
-var expect = _require.expect;
-
+var _require = require('chai'),
+ expect = _require.expect;
describe('$match', function () {
var db = new zango.Db(Math.random(), ['col']);
diff --git a/build/test/find.js b/build/test/find.js
index a9fab40..fce7efe 100644
--- a/build/test/find.js
+++ b/build/test/find.js
@@ -1,19 +1,17 @@
'use strict';
-var _require = require('chai');
+var _require = require('chai'),
+ expect = _require.expect;
-var expect = _require.expect;
-
-var _require2 = require('../src/lang/filter.js');
-
-var build = _require2.build;
-var Fields = require('../src/lang/fields.js');
-var waterfall = require('./waterfall.js');
+var _require2 = require('../src/lang/filter.js'),
+ build = _require2.build,
+ Fields = require('../src/lang/fields.js'),
+ waterfall = require('./waterfall.js');
var db = new zango.Db(Math.random(), { col: ['x', 'g'] });
var col = db.collection('col');
-var docs = [{ x: 4, k: 8 }, { x: 2, g: 3 }, { x: 3, z: 3 }, { x: 6, g: 9 }, { x: 10, k: 4 }, { x: 2, g: 8 }, { x: 2, g: 8, z: 10 }, { x: undefined }, { x: null }, { x: [{ k: 2 }, { k: 8 }] }];
+var docs = [{ x: 4, k: 8 }, { x: 2, g: 3 }, { x: 3, z: 3 }, { x: 6, g: 9 }, { x: 10, k: 4 }, { x: 2, g: 8 }, { x: 2, g: 8, z: 10 }, { x: undefined }, { x: null }, { x: [{ k: 2 }, { k: 8 }, "barbaz"] }, { y: "foobar" }];
before(function () {
return col.insert(docs);
@@ -175,7 +173,17 @@ describe('$nin', function () {
describe('$elemMatch', function () {
it('should test if any iterable elements satisify a predicate', function (done) {
+ console.log(1);
query({ x: { $elemMatch: { k: 8 } } }, done);
+ console.log(2);
+ });
+});
+
+describe('$elemMatch', function () {
+ it('should test if any iterable elements satisify a predicate', function (done) {
+ console.log(3);
+ query({ x: { $elemMatch: { $eq: "barbaz" } } }, done);
+ console.log(4);
});
});
@@ -187,4 +195,10 @@ describe('$exists', function () {
it("should test if document doesn't contain a field", function (done) {
query({ g: { $exists: 0 } }, done);
});
+});
+
+describe('$regex', function () {
+ it('should perform regular expression test', function (done) {
+ query({ y: { $regex: /oob/ } }, done);
+ });
});
\ No newline at end of file
diff --git a/build/test/group.js b/build/test/group.js
index 98415cb..193f8b5 100644
--- a/build/test/group.js
+++ b/build/test/group.js
@@ -1,9 +1,7 @@
'use strict';
-var _require = require('chai');
-
-var expect = _require.expect;
-
+var _require = require('chai'),
+ expect = _require.expect;
var docs = [{ x: 2, g: 1 }, { x: 2, g: 4 }, { x: 2, g: 4 }, { x: 2, g: 3 }, { x: 8, g: 8 }, { x: 8, g: 8 }, { x: 8, g: 6 }, { x: 8, g: 2 }];
diff --git a/build/test/lang/expression.js b/build/test/lang/expression.js
index 4258ea5..578fc2e 100644
--- a/build/test/lang/expression.js
+++ b/build/test/lang/expression.js
@@ -1,20 +1,17 @@
'use strict';
-var _require = require('chai');
-
-var expect = _require.expect;
-
+var _require = require('chai'),
+ expect = _require.expect;
var build = require('../../src/lang/expression.js');
var Fields = require('../../src/lang/fields.js');
var evalExpr = function evalExpr(expr) {
- var doc = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
-
- var _build = build(expr);
+ var doc = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
- var ast = _build.ast;
- var has_refs = _build.has_refs;
+ var _build = build(expr),
+ ast = _build.ast,
+ has_refs = _build.has_refs;
if (ast === false) {
return false;
diff --git a/build/test/lang/filter.js b/build/test/lang/filter.js
index 78bc674..aab66d6 100644
--- a/build/test/lang/filter.js
+++ b/build/test/lang/filter.js
@@ -1,12 +1,10 @@
'use strict';
-var _require = require('chai');
+var _require = require('chai'),
+ expect = _require.expect;
-var expect = _require.expect;
-
-var _require2 = require('../../src/lang/filter.js');
-
-var build = _require2.build;
+var _require2 = require('../../src/lang/filter.js'),
+ build = _require2.build;
var Fields = require('../../src/lang/fields.js');
diff --git a/build/test/limit.js b/build/test/limit.js
index 04a2096..dd05b2d 100644
--- a/build/test/limit.js
+++ b/build/test/limit.js
@@ -1,9 +1,7 @@
'use strict';
-var _require = require('chai');
-
-var expect = _require.expect;
-
+var _require = require('chai'),
+ expect = _require.expect;
var db = new zango.Db(Math.random(), ['col']);
var col = db.collection('col');
diff --git a/build/test/project.js b/build/test/project.js
index 8e9a84c..f047f8e 100644
--- a/build/test/project.js
+++ b/build/test/project.js
@@ -1,9 +1,7 @@
'use strict';
-var _require = require('chai');
-
-var expect = _require.expect;
-
+var _require = require('chai'),
+ expect = _require.expect;
var waterfall = require('./waterfall.js');
diff --git a/build/test/remove.js b/build/test/remove.js
index be2a0fb..9289b31 100644
--- a/build/test/remove.js
+++ b/build/test/remove.js
@@ -1,9 +1,7 @@
'use strict';
-var _require = require('chai');
-
-var expect = _require.expect;
-
+var _require = require('chai'),
+ expect = _require.expect;
var db = new zango.Db(Math.random(), { col: ['x'] });
var col = db.collection('col');
diff --git a/build/test/skip.js b/build/test/skip.js
index e57acd8..bd06d75 100644
--- a/build/test/skip.js
+++ b/build/test/skip.js
@@ -1,9 +1,7 @@
'use strict';
-var _require = require('chai');
-
-var expect = _require.expect;
-
+var _require = require('chai'),
+ expect = _require.expect;
var db = new zango.Db(Math.random(), ['col']);
var col = db.collection('col');
diff --git a/build/test/sort.js b/build/test/sort.js
index 1bf6d7f..b057e0f 100644
--- a/build/test/sort.js
+++ b/build/test/sort.js
@@ -1,9 +1,7 @@
'use strict';
-var _require = require('chai');
-
-var expect = _require.expect;
-
+var _require = require('chai'),
+ expect = _require.expect;
var db = new zango.Db(Math.random(), { col: ['x'] });
var col = db.collection('col');
diff --git a/build/test/unwind.js b/build/test/unwind.js
index 4bbf397..c6c5e5b 100644
--- a/build/test/unwind.js
+++ b/build/test/unwind.js
@@ -1,9 +1,7 @@
'use strict';
-var _require = require('chai');
-
-var expect = _require.expect;
-
+var _require = require('chai'),
+ expect = _require.expect;
var db = new zango.Db(Math.random(), ['col']);
var col = db.collection('col');
diff --git a/build/test/update.js b/build/test/update.js
index 61078ee..63a903d 100644
--- a/build/test/update.js
+++ b/build/test/update.js
@@ -1,9 +1,7 @@
'use strict';
-var _require = require('chai');
-
-var expect = _require.expect;
-
+var _require = require('chai'),
+ expect = _require.expect;
var db = new zango.Db(Math.random(), ['col']);
var col = db.collection('col');
diff --git a/dist/zangodb-test-suite.js b/dist/zangodb-test-suite.js
index 2887cce..73cf7a9 100644
--- a/dist/zangodb-test-suite.js
+++ b/dist/zangodb-test-suite.js
@@ -1,11 +1,10 @@
-(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;oNote: Do not instantiate directly. */
function Collection(db, name) {
@@ -403,28 +399,24 @@ var Collection = function () {
}();
module.exports = Collection;
-},{"./aggregate.js":1,"./cursor.js":4,"./remove.js":16,"./update.js":20,"./util.js":21,"q":527}],3:[function(require,module,exports){
+},{"./aggregate.js":1,"./cursor.js":4,"./remove.js":16,"./update.js":20,"./util.js":21,"q":523}],3:[function(require,module,exports){
'use strict';
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
var merge = require('deepmerge');
-var _require = require('./util.js');
-
-var hashify = _require.hashify;
-var getIDBError = _require.getIDBError;
-var filter = require('./filter.js');
-var sort = require('./sort.js');
-var _require2 = require('./lang/filter.js');
-
-var build = _require2.build;
-var Conjunction = _require2.Conjunction;
-var Disjunction = _require2.Disjunction;
-var Exists = _require2.Exists;
+var _require = require('./util.js'),
+ hashify = _require.hashify,
+ getIDBError = _require.getIDBError,
+ filter = require('./filter.js'),
+ sort = require('./sort.js');
+var _require2 = require('./lang/filter.js'),
+ build = _require2.build,
+ Conjunction = _require2.Conjunction,
+ Disjunction = _require2.Disjunction,
+ Exists = _require2.Exists;
var toIDBDirection = function toIDBDirection(value) {
return value > 0 ? 'next' : 'prev';
@@ -439,15 +431,15 @@ var joinPredicates = function joinPredicates(preds) {
};
var removeClause = function removeClause(_ref) {
- var parent = _ref.parent;
- var index = _ref.index;
+ var parent = _ref.parent,
+ index = _ref.index;
parent.args.splice(index, 1);
};
var openConn = function openConn(_ref2, cb) {
- var col = _ref2.col;
- var read_pref = _ref2.read_pref;
+ var col = _ref2.col,
+ read_pref = _ref2.read_pref;
col._db._getConn(function (error, idb) {
if (error) {
@@ -470,9 +462,9 @@ var openConn = function openConn(_ref2, cb) {
};
var getIDBReqWithIndex = function getIDBReqWithIndex(store, clause) {
- var key_range = clause.idb_key_range || null;
- var direction = clause.idb_direction || 'next';
- var literal = clause.path.literal;
+ var key_range = clause.idb_key_range || null,
+ direction = clause.idb_direction || 'next',
+ literal = clause.path.literal;
var index = void 0;
@@ -499,10 +491,9 @@ var buildPredicates = function buildPredicates(pipeline) {
try {
for (var _iterator = pipeline[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
- var _step$value = _slicedToArray(_step.value, 2);
-
- var fn = _step$value[0];
- var arg = _step$value[1];
+ var _step$value = _slicedToArray(_step.value, 2),
+ fn = _step$value[0],
+ arg = _step$value[1];
if (fn === filter) {
var pred = build(arg);
@@ -538,9 +529,10 @@ var buildPredicates = function buildPredicates(pipeline) {
};
var initPredAndSortSpec = function initPredAndSortSpec(config) {
- var pipeline = config.pipeline;
- var preds = [];
- var sort_specs = [];
+ var pipeline = config.pipeline,
+ preds = [],
+ sort_specs = [];
+
var i = 0;
@@ -550,10 +542,9 @@ var initPredAndSortSpec = function initPredAndSortSpec(config) {
try {
for (var _iterator2 = pipeline[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
- var _step2$value = _slicedToArray(_step2.value, 2);
-
- var fn = _step2$value[0];
- var arg = _step2$value[1];
+ var _step2$value = _slicedToArray(_step2.value, 2),
+ fn = _step2$value[0],
+ arg = _step2$value[1];
if (fn === sort) {
sort_specs.push(arg);
@@ -636,8 +627,8 @@ var getClauses = function getClauses(col, pred) {
};
var initClauses = function initClauses(config) {
- var col = config.col;
- var pred = config.pred;
+ var col = config.col,
+ pred = config.pred;
config.clauses = getClauses(col, pred);
@@ -648,8 +639,8 @@ var initHint = function initHint(config) {
return;
}
- var clauses = config.clauses;
- var hint = config.hint;
+ var clauses = config.clauses,
+ hint = config.hint;
var new_clauses = [];
@@ -693,9 +684,9 @@ var initSort = function initSort(config) {
return;
}
- var clauses = config.clauses;
- var spec = config.sort_spec;
- var pipeline = config.pipeline;
+ var clauses = config.clauses,
+ spec = config.sort_spec,
+ pipeline = config.pipeline;
var new_clauses = [];
@@ -740,30 +731,24 @@ var initSort = function initSort(config) {
};
var createGetIDBReqFn = function createGetIDBReqFn(_ref3) {
- var pred = _ref3.pred;
- var clauses = _ref3.clauses;
- var pipeline = _ref3.pipeline;
+ var pred = _ref3.pred,
+ clauses = _ref3.clauses,
+ pipeline = _ref3.pipeline;
var getIDBReq = void 0;
if (clauses.length) {
- var _ret = function () {
- var clause = clauses[0];
-
- getIDBReq = function getIDBReq(store) {
- return getIDBReqWithIndex(store, clause);
- };
+ var clause = clauses[0];
- if (!pred || clause === pred) {
- return {
- v: getIDBReq
- };
- }
+ getIDBReq = function getIDBReq(store) {
+ return getIDBReqWithIndex(store, clause);
+ };
- removeClause(clause);
- }();
+ if (!pred || clause === pred) {
+ return getIDBReq;
+ }
- if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v;
+ removeClause(clause);
} else {
getIDBReq = getIDBReqWithoutIndex;
@@ -833,10 +818,9 @@ var addPipelineStages = function addPipelineStages(_ref4, next) {
try {
for (var _iterator6 = pipeline[Symbol.iterator](), _step6; !(_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done); _iteratorNormalCompletion6 = true) {
- var _step6$value = _slicedToArray(_step6.value, 2);
-
- var fn = _step6$value[0];
- var arg = _step6$value[1];
+ var _step6$value = _slicedToArray(_step6.value, 2),
+ fn = _step6$value[0],
+ arg = _step6$value[1];
next = fn(next, arg);
}
@@ -979,7 +963,7 @@ module.exports = function (cur) {
return addPipelineStages(config, next);
};
-},{"./filter.js":6,"./lang/filter.js":11,"./sort.js":18,"./util.js":21,"deepmerge":414}],4:[function(require,module,exports){
+},{"./filter.js":6,"./lang/filter.js":11,"./sort.js":18,"./util.js":21,"deepmerge":415}],4:[function(require,module,exports){
'use strict';
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
@@ -1027,7 +1011,7 @@ var Cursor = function (_EventEmitter) {
function Cursor(col, read_pref) {
_classCallCheck(this, Cursor);
- var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Cursor).call(this));
+ var _this = _possibleConstructorReturn(this, (Cursor.__proto__ || Object.getPrototypeOf(Cursor)).call(this));
_this._col = col;
_this._read_pref = read_pref;
@@ -1072,7 +1056,7 @@ var Cursor = function (_EventEmitter) {
}, {
key: 'forEach',
value: function forEach() {
- var fn = arguments.length <= 0 || arguments[0] === undefined ? function () {} : arguments[0];
+ var fn = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {};
var cb = arguments[1];
var deferred = Q.defer();
@@ -1309,7 +1293,7 @@ var Cursor = function (_EventEmitter) {
}(EventEmitter);
module.exports = Cursor;
-},{"./create_next_fn.js":3,"./filter.js":6,"./group.js":7,"./limit.js":14,"./project.js":15,"./skip.js":17,"./sort.js":18,"./unwind.js":19,"events":464,"q":527}],5:[function(require,module,exports){
+},{"./create_next_fn.js":3,"./filter.js":6,"./group.js":7,"./limit.js":14,"./project.js":15,"./skip.js":17,"./sort.js":18,"./unwind.js":19,"events":465,"q":523}],5:[function(require,module,exports){
'use strict';
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
@@ -1326,9 +1310,8 @@ var EventEmitter = require('events'),
memoize = require('memoizee'),
Q = require('q');
-var _require = require('./util.js');
-
-var getIDBError = _require.getIDBError;
+var _require = require('./util.js'),
+ getIDBError = _require.getIDBError;
var Collection = require('./collection.js');
@@ -1380,7 +1363,7 @@ var Db = function (_EventEmitter) {
function Db(name, version, config) {
_classCallCheck(this, Db);
- var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Db).call(this));
+ var _this = _possibleConstructorReturn(this, (Db.__proto__ || Object.getPrototypeOf(Db)).call(this));
_this._name = name;
@@ -1680,7 +1663,7 @@ var Db = function (_EventEmitter) {
}(EventEmitter);
module.exports = Db;
-},{"./collection.js":2,"./util.js":21,"events":464,"memoizee":511,"q":527}],6:[function(require,module,exports){
+},{"./collection.js":2,"./util.js":21,"events":465,"memoizee":507,"q":523}],6:[function(require,module,exports){
'use strict';
var Fields = require('./lang/fields.js');
@@ -1703,8 +1686,6 @@ module.exports = function (next, pred) {
},{"./lang/fields.js":10}],7:[function(require,module,exports){
'use strict';
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
@@ -1717,12 +1698,12 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var memoize = require('memoizee');
-var _require = require('./util.js');
+var _require = require('./util.js'),
+ unknownOp = _require.unknownOp,
+ hashify = _require.hashify,
+ build = require('./lang/expression.js'),
+ Fields = require('./lang/fields.js');
-var unknownOp = _require.unknownOp;
-var hashify = _require.hashify;
-var build = require('./lang/expression.js');
-var Fields = require('./lang/fields.js');
var Operator = function () {
function Operator() {
_classCallCheck(this, Operator);
@@ -1731,8 +1712,8 @@ var Operator = function () {
_createClass(Operator, [{
key: 'getOpValueWithRefs',
value: function getOpValueWithRefs(expr, doc, cb) {
- var ast = expr.ast;
- var fields = expr.fields;
+ var ast = expr.ast,
+ fields = expr.fields;
cb(ast.run(fields));
@@ -1763,7 +1744,7 @@ var Sum = function (_Operator) {
function Sum() {
_classCallCheck(this, Sum);
- var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Sum).call(this));
+ var _this = _possibleConstructorReturn(this, (Sum.__proto__ || Object.getPrototypeOf(Sum)).call(this));
_this._value = 0;
return _this;
@@ -1772,7 +1753,7 @@ var Sum = function (_Operator) {
_createClass(Sum, [{
key: 'getOpValueWithRefs',
value: function getOpValueWithRefs(expr, doc, cb) {
- _get(Object.getPrototypeOf(Sum.prototype), 'getOpValueWithRefs', this).call(this, expr, doc, function (value) {
+ _get(Sum.prototype.__proto__ || Object.getPrototypeOf(Sum.prototype), 'getOpValueWithRefs', this).call(this, expr, doc, function (value) {
Sum._verify(value, cb);
});
}
@@ -1791,7 +1772,7 @@ var Sum = function (_Operator) {
}, {
key: 'getOpValue',
value: function getOpValue(expr, cb) {
- _get(Object.getPrototypeOf(Sum), 'getOpValue', this).call(this, expr, function (value) {
+ _get(Sum.__proto__ || Object.getPrototypeOf(Sum), 'getOpValue', this).call(this, expr, function (value) {
return Sum._verify(value, cb);
});
}
@@ -1806,7 +1787,7 @@ var Avg = function (_Sum) {
function Avg() {
_classCallCheck(this, Avg);
- var _this2 = _possibleConstructorReturn(this, Object.getPrototypeOf(Avg).call(this));
+ var _this2 = _possibleConstructorReturn(this, (Avg.__proto__ || Object.getPrototypeOf(Avg)).call(this));
_this2._count = 0;
return _this2;
@@ -1817,7 +1798,7 @@ var Avg = function (_Sum) {
value: function add(value) {
this._count++;
- _get(Object.getPrototypeOf(Avg.prototype), 'add', this).call(this, value);
+ _get(Avg.prototype.__proto__ || Object.getPrototypeOf(Avg.prototype), 'add', this).call(this, value);
}
}, {
key: 'value',
@@ -1835,7 +1816,7 @@ var Compare = function (_Operator2) {
function Compare(fn) {
_classCallCheck(this, Compare);
- var _this3 = _possibleConstructorReturn(this, Object.getPrototypeOf(Compare).call(this));
+ var _this3 = _possibleConstructorReturn(this, (Compare.__proto__ || Object.getPrototypeOf(Compare)).call(this));
_this3._value = null;
_this3._fn = fn;
@@ -1879,7 +1860,7 @@ var Min = function (_Compare) {
function Min() {
_classCallCheck(this, Min);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Min).call(this, function (a, b) {
+ return _possibleConstructorReturn(this, (Min.__proto__ || Object.getPrototypeOf(Min)).call(this, function (a, b) {
return a < b;
}));
}
@@ -1893,7 +1874,7 @@ var Max = function (_Compare2) {
function Max() {
_classCallCheck(this, Max);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Max).call(this, function (a, b) {
+ return _possibleConstructorReturn(this, (Max.__proto__ || Object.getPrototypeOf(Max)).call(this, function (a, b) {
return a > b;
}));
}
@@ -1907,7 +1888,7 @@ var Push = function (_Operator3) {
function Push() {
_classCallCheck(this, Push);
- var _this6 = _possibleConstructorReturn(this, Object.getPrototypeOf(Push).call(this));
+ var _this6 = _possibleConstructorReturn(this, (Push.__proto__ || Object.getPrototypeOf(Push)).call(this));
_this6._value = [];
return _this6;
@@ -1929,7 +1910,7 @@ var AddToSet = function (_Operator4) {
function AddToSet() {
_classCallCheck(this, AddToSet);
- var _this7 = _possibleConstructorReturn(this, Object.getPrototypeOf(AddToSet).call(this));
+ var _this7 = _possibleConstructorReturn(this, (AddToSet.__proto__ || Object.getPrototypeOf(AddToSet)).call(this));
_this7._hashes = {};
return _this7;
@@ -2042,9 +2023,9 @@ var groupLoopFn = function groupLoopFn(next, in_end, groups, fn) {
};
var createGroupByRefFn = function createGroupByRefFn(next, expr, steps) {
- var in_start = steps.in_start;
- var in_iter = steps.in_iter;
- var in_end = steps.in_end;
+ var in_start = steps.in_start,
+ in_iter = steps.in_iter,
+ in_end = steps.in_end;
var groups = [];
@@ -2088,9 +2069,9 @@ var createGroupFn = function createGroupFn(next, expr, steps) {
return createGroupByRefFn(next, expr, steps);
}
- var in_start = steps.in_start;
- var in_iter = steps.in_iter;
- var in_end = steps.in_end;
+ var in_start = steps.in_start,
+ in_iter = steps.in_iter,
+ in_end = steps.in_end;
var groups = [];
@@ -2104,19 +2085,13 @@ var createGroupFn = function createGroupFn(next, expr, steps) {
};
if (in_iter.length) {
- var _ret = function () {
- var add = memoize(function () {
- return initGroupDoc();
- });
-
- return {
- v: groupLoopFn(next, in_end, groups, function (doc) {
- runSteps(in_iter, add(), doc);
- })
- };
- }();
+ var add = memoize(function () {
+ return initGroupDoc();
+ });
- if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v;
+ return groupLoopFn(next, in_end, groups, function (doc) {
+ runSteps(in_iter, add(), doc);
+ });
}
return function (cb) {
@@ -2142,9 +2117,9 @@ var ops = {
};
var _build = function _build(steps, field, value) {
- var in_start = steps.in_start;
- var in_iter = steps.in_iter;
- var in_end = steps.in_end;
+ var in_start = steps.in_start,
+ in_iter = steps.in_iter,
+ in_end = steps.in_end;
var op_strs = Object.keys(value);
@@ -2235,7 +2210,7 @@ module.exports = function (_next, spec) {
return _next2(cb);
};
};
-},{"./lang/expression.js":9,"./lang/fields.js":10,"./util.js":21,"memoizee":511}],8:[function(require,module,exports){
+},{"./lang/expression.js":9,"./lang/fields.js":10,"./util.js":21,"memoizee":507}],8:[function(require,module,exports){
'use strict';
module.exports = { Db: require('./db.js') };
@@ -2252,11 +2227,11 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-var _require = require('../util.js');
+var _require = require('../util.js'),
+ unknownOp = _require.unknownOp,
+ MISSING = require('./missing_symbol.js'),
+ Path = require('./path.js');
-var unknownOp = _require.unknownOp;
-var MISSING = require('./missing_symbol.js');
-var Path = require('./path.js');
var Value = function () {
function Value(value) {
_classCallCheck(this, Value);
@@ -2311,7 +2286,7 @@ var NumberValue = function (_Value) {
function NumberValue() {
_classCallCheck(this, NumberValue);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(NumberValue).apply(this, arguments));
+ return _possibleConstructorReturn(this, (NumberValue.__proto__ || Object.getPrototypeOf(NumberValue)).apply(this, arguments));
}
_createClass(NumberValue, null, [{
@@ -2330,7 +2305,7 @@ var StringValue = function (_Value2) {
function StringValue() {
_classCallCheck(this, StringValue);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(StringValue).apply(this, arguments));
+ return _possibleConstructorReturn(this, (StringValue.__proto__ || Object.getPrototypeOf(StringValue)).apply(this, arguments));
}
_createClass(StringValue, null, [{
@@ -2349,7 +2324,7 @@ var ArrayValue = function (_Value3) {
function ArrayValue() {
_classCallCheck(this, ArrayValue);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(ArrayValue).apply(this, arguments));
+ return _possibleConstructorReturn(this, (ArrayValue.__proto__ || Object.getPrototypeOf(ArrayValue)).apply(this, arguments));
}
_createClass(ArrayValue, null, [{
@@ -2368,7 +2343,7 @@ var DateValue = function (_Value4) {
function DateValue() {
_classCallCheck(this, DateValue);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(DateValue).apply(this, arguments));
+ return _possibleConstructorReturn(this, (DateValue.__proto__ || Object.getPrototypeOf(DateValue)).apply(this, arguments));
}
_createClass(DateValue, null, [{
@@ -2387,7 +2362,7 @@ var Literal = function (_Value5) {
function Literal() {
_classCallCheck(this, Literal);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Literal).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Literal.__proto__ || Object.getPrototypeOf(Literal)).apply(this, arguments));
}
_createClass(Literal, [{
@@ -2430,14 +2405,14 @@ var ObjectExpr = function (_Value6) {
function ObjectExpr() {
_classCallCheck(this, ObjectExpr);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(ObjectExpr).apply(this, arguments));
+ return _possibleConstructorReturn(this, (ObjectExpr.__proto__ || Object.getPrototypeOf(ObjectExpr)).apply(this, arguments));
}
_createClass(ObjectExpr, [{
key: 'run',
value: function run(fields) {
- var result = {};var value = this.value;
-
+ var result = {},
+ value = this.value;
for (var field in value) {
result[field] = value[field].run(fields);
@@ -2478,7 +2453,7 @@ var FnOp = function (_Operator) {
function FnOp(fn) {
_classCallCheck(this, FnOp);
- var _this7 = _possibleConstructorReturn(this, Object.getPrototypeOf(FnOp).call(this));
+ var _this7 = _possibleConstructorReturn(this, (FnOp.__proto__ || Object.getPrototypeOf(FnOp)).call(this));
_this7.fn = fn;
return _this7;
@@ -2487,8 +2462,8 @@ var FnOp = function (_Operator) {
_createClass(FnOp, [{
key: 'run',
value: function run(fields) {
- var args = this.args;
- var fn = this.fn;
+ var args = this.args,
+ fn = this.fn;
return args.map(function (arg) {
@@ -2511,7 +2486,7 @@ var UnaryFnOp = function (_FnOp) {
function UnaryFnOp() {
_classCallCheck(this, UnaryFnOp);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(UnaryFnOp).apply(this, arguments));
+ return _possibleConstructorReturn(this, (UnaryFnOp.__proto__ || Object.getPrototypeOf(UnaryFnOp)).apply(this, arguments));
}
_createClass(UnaryFnOp, [{
@@ -2536,7 +2511,7 @@ var fnOp = function fnOp(Parent, fn) {
function _class() {
_classCallCheck(this, _class);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(_class).call(this, fn));
+ return _possibleConstructorReturn(this, (_class.__proto__ || Object.getPrototypeOf(_class)).call(this, fn));
}
return _class;
@@ -2544,7 +2519,7 @@ var fnOp = function fnOp(Parent, fn) {
};
var opTypes = function opTypes(Parent, InputType) {
- var ResultType = arguments.length <= 2 || arguments[2] === undefined ? InputType : arguments[2];
+ var ResultType = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : InputType;
var Constructor = function (_Parent2) {
_inherits(Constructor, _Parent2);
@@ -2552,7 +2527,7 @@ var opTypes = function opTypes(Parent, InputType) {
function Constructor() {
_classCallCheck(this, Constructor);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Constructor).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Constructor.__proto__ || Object.getPrototypeOf(Constructor)).apply(this, arguments));
}
return Constructor;
@@ -2570,7 +2545,7 @@ var ArithOp = function (_opTypes) {
function ArithOp() {
_classCallCheck(this, ArithOp);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(ArithOp).apply(this, arguments));
+ return _possibleConstructorReturn(this, (ArithOp.__proto__ || Object.getPrototypeOf(ArithOp)).apply(this, arguments));
}
return ArithOp;
@@ -2586,7 +2561,7 @@ var Add = function (_arithOp) {
function Add() {
_classCallCheck(this, Add);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Add).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Add.__proto__ || Object.getPrototypeOf(Add)).apply(this, arguments));
}
return Add;
@@ -2600,7 +2575,7 @@ var Subtract = function (_arithOp2) {
function Subtract() {
_classCallCheck(this, Subtract);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Subtract).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Subtract.__proto__ || Object.getPrototypeOf(Subtract)).apply(this, arguments));
}
return Subtract;
@@ -2614,7 +2589,7 @@ var Multiply = function (_arithOp3) {
function Multiply() {
_classCallCheck(this, Multiply);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Multiply).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Multiply.__proto__ || Object.getPrototypeOf(Multiply)).apply(this, arguments));
}
return Multiply;
@@ -2628,7 +2603,7 @@ var Divide = function (_arithOp4) {
function Divide() {
_classCallCheck(this, Divide);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Divide).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Divide.__proto__ || Object.getPrototypeOf(Divide)).apply(this, arguments));
}
return Divide;
@@ -2642,7 +2617,7 @@ var Mod = function (_arithOp5) {
function Mod() {
_classCallCheck(this, Mod);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Mod).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Mod.__proto__ || Object.getPrototypeOf(Mod)).apply(this, arguments));
}
return Mod;
@@ -2656,7 +2631,7 @@ var MathOp = function (_opTypes2) {
function MathOp() {
_classCallCheck(this, MathOp);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(MathOp).apply(this, arguments));
+ return _possibleConstructorReturn(this, (MathOp.__proto__ || Object.getPrototypeOf(MathOp)).apply(this, arguments));
}
_createClass(MathOp, [{
@@ -2686,7 +2661,7 @@ var Abs = function (_mathOp) {
function Abs() {
_classCallCheck(this, Abs);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Abs).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Abs.__proto__ || Object.getPrototypeOf(Abs)).apply(this, arguments));
}
return Abs;
@@ -2698,7 +2673,7 @@ var Ceil = function (_mathOp2) {
function Ceil() {
_classCallCheck(this, Ceil);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Ceil).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Ceil.__proto__ || Object.getPrototypeOf(Ceil)).apply(this, arguments));
}
return Ceil;
@@ -2710,7 +2685,7 @@ var Floor = function (_mathOp3) {
function Floor() {
_classCallCheck(this, Floor);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Floor).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Floor.__proto__ || Object.getPrototypeOf(Floor)).apply(this, arguments));
}
return Floor;
@@ -2722,7 +2697,7 @@ var Ln = function (_mathOp4) {
function Ln() {
_classCallCheck(this, Ln);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Ln).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Ln.__proto__ || Object.getPrototypeOf(Ln)).apply(this, arguments));
}
return Ln;
@@ -2734,7 +2709,7 @@ var Log10 = function (_mathOp5) {
function Log10() {
_classCallCheck(this, Log10);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Log10).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Log10.__proto__ || Object.getPrototypeOf(Log10)).apply(this, arguments));
}
return Log10;
@@ -2746,7 +2721,7 @@ var Pow = function (_mathOp6) {
function Pow() {
_classCallCheck(this, Pow);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Pow).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Pow.__proto__ || Object.getPrototypeOf(Pow)).apply(this, arguments));
}
return Pow;
@@ -2758,7 +2733,7 @@ var Sqrt = function (_mathOp7) {
function Sqrt() {
_classCallCheck(this, Sqrt);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Sqrt).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Sqrt.__proto__ || Object.getPrototypeOf(Sqrt)).apply(this, arguments));
}
return Sqrt;
@@ -2770,7 +2745,7 @@ var Trunc = function (_mathOp8) {
function Trunc() {
_classCallCheck(this, Trunc);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Trunc).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Trunc.__proto__ || Object.getPrototypeOf(Trunc)).apply(this, arguments));
}
return Trunc;
@@ -2782,7 +2757,7 @@ var StringConcatOp = function (_opTypes3) {
function StringConcatOp() {
_classCallCheck(this, StringConcatOp);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(StringConcatOp).apply(this, arguments));
+ return _possibleConstructorReturn(this, (StringConcatOp.__proto__ || Object.getPrototypeOf(StringConcatOp)).apply(this, arguments));
}
return StringConcatOp;
@@ -2794,7 +2769,7 @@ var Concat = function (_fnOp) {
function Concat() {
_classCallCheck(this, Concat);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Concat).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Concat.__proto__ || Object.getPrototypeOf(Concat)).apply(this, arguments));
}
return Concat;
@@ -2808,7 +2783,7 @@ var CaseOp = function (_opTypes4) {
function CaseOp() {
_classCallCheck(this, CaseOp);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(CaseOp).apply(this, arguments));
+ return _possibleConstructorReturn(this, (CaseOp.__proto__ || Object.getPrototypeOf(CaseOp)).apply(this, arguments));
}
_createClass(CaseOp, [{
@@ -2827,7 +2802,7 @@ var ToLower = function (_fnOp2) {
function ToLower() {
_classCallCheck(this, ToLower);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(ToLower).apply(this, arguments));
+ return _possibleConstructorReturn(this, (ToLower.__proto__ || Object.getPrototypeOf(ToLower)).apply(this, arguments));
}
return ToLower;
@@ -2841,7 +2816,7 @@ var ToUpper = function (_fnOp3) {
function ToUpper() {
_classCallCheck(this, ToUpper);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(ToUpper).apply(this, arguments));
+ return _possibleConstructorReturn(this, (ToUpper.__proto__ || Object.getPrototypeOf(ToUpper)).apply(this, arguments));
}
return ToUpper;
@@ -2855,7 +2830,7 @@ var ConcatArraysOp = function (_opTypes5) {
function ConcatArraysOp() {
_classCallCheck(this, ConcatArraysOp);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(ConcatArraysOp).apply(this, arguments));
+ return _possibleConstructorReturn(this, (ConcatArraysOp.__proto__ || Object.getPrototypeOf(ConcatArraysOp)).apply(this, arguments));
}
return ConcatArraysOp;
@@ -2867,7 +2842,7 @@ var ConcatArrays = function (_fnOp4) {
function ConcatArrays() {
_classCallCheck(this, ConcatArrays);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(ConcatArrays).apply(this, arguments));
+ return _possibleConstructorReturn(this, (ConcatArrays.__proto__ || Object.getPrototypeOf(ConcatArrays)).apply(this, arguments));
}
return ConcatArrays;
@@ -2881,7 +2856,7 @@ var DateOp = function (_opTypes6) {
function DateOp() {
_classCallCheck(this, DateOp);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(DateOp).apply(this, arguments));
+ return _possibleConstructorReturn(this, (DateOp.__proto__ || Object.getPrototypeOf(DateOp)).apply(this, arguments));
}
return DateOp;
@@ -2897,7 +2872,7 @@ var DayOfMonth = function (_dateOp) {
function DayOfMonth() {
_classCallCheck(this, DayOfMonth);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(DayOfMonth).apply(this, arguments));
+ return _possibleConstructorReturn(this, (DayOfMonth.__proto__ || Object.getPrototypeOf(DayOfMonth)).apply(this, arguments));
}
return DayOfMonth;
@@ -2911,7 +2886,7 @@ var Year = function (_dateOp2) {
function Year() {
_classCallCheck(this, Year);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Year).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Year.__proto__ || Object.getPrototypeOf(Year)).apply(this, arguments));
}
return Year;
@@ -2925,7 +2900,7 @@ var Month = function (_dateOp3) {
function Month() {
_classCallCheck(this, Month);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Month).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Month.__proto__ || Object.getPrototypeOf(Month)).apply(this, arguments));
}
return Month;
@@ -2939,7 +2914,7 @@ var Hour = function (_dateOp4) {
function Hour() {
_classCallCheck(this, Hour);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Hour).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Hour.__proto__ || Object.getPrototypeOf(Hour)).apply(this, arguments));
}
return Hour;
@@ -2953,7 +2928,7 @@ var Minute = function (_dateOp5) {
function Minute() {
_classCallCheck(this, Minute);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Minute).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Minute.__proto__ || Object.getPrototypeOf(Minute)).apply(this, arguments));
}
return Minute;
@@ -2967,7 +2942,7 @@ var Second = function (_dateOp6) {
function Second() {
_classCallCheck(this, Second);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Second).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Second.__proto__ || Object.getPrototypeOf(Second)).apply(this, arguments));
}
return Second;
@@ -2981,7 +2956,7 @@ var Millisecond = function (_dateOp7) {
function Millisecond() {
_classCallCheck(this, Millisecond);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Millisecond).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Millisecond.__proto__ || Object.getPrototypeOf(Millisecond)).apply(this, arguments));
}
return Millisecond;
@@ -2993,8 +2968,8 @@ var TypeCond = function () {
function TypeCond(stack, args, op) {
_classCallCheck(this, TypeCond);
- var InputType = op.InputType;
- var alt = op.alt;
+ var InputType = op.InputType,
+ alt = op.alt;
this.result_types = new Set([op.ResultType, alt.ResultType]);
@@ -3008,9 +2983,9 @@ var TypeCond = function () {
_createClass(TypeCond, [{
key: 'run',
value: function run(fields) {
- var stack = this.stack;
- var isType = this.isType;
- var op = this.op;
+ var stack = this.stack,
+ isType = this.isType,
+ op = this.op;
var new_args = [];
@@ -3278,9 +3253,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var memoize = require('memoizee');
-var _require = require('../util.js');
-
-var _get = _require.get;
+var _require = require('../util.js'),
+ _get = _require.get;
var MISSING = require('./missing_symbol.js');
@@ -3341,7 +3315,7 @@ var Fields = function () {
}();
module.exports = Fields;
-},{"../util.js":21,"./missing_symbol.js":12,"memoizee":511}],11:[function(require,module,exports){
+},{"../util.js":21,"./missing_symbol.js":12,"memoizee":507}],11:[function(require,module,exports){
'use strict';
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
@@ -3358,12 +3332,10 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-var _require = require('../util.js');
-
-var isObject = _require.isObject;
-var equal = _require.equal;
-var unknownOp = _require.unknownOp;
-
+var _require = require('../util.js'),
+ isObject = _require.isObject,
+ equal = _require.equal,
+ unknownOp = _require.unknownOp;
var MISSING = require('./missing_symbol.js'),
Path = require('./path.js'),
@@ -3445,7 +3417,7 @@ var Connective = function (_Operator) {
function Connective(args) {
_classCallCheck(this, Connective);
- var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Connective).call(this));
+ var _this = _possibleConstructorReturn(this, (Connective.__proto__ || Object.getPrototypeOf(Connective)).call(this));
_this.args = args;
return _this;
@@ -3460,7 +3432,7 @@ var Conjunction = function (_Connective) {
function Conjunction() {
_classCallCheck(this, Conjunction);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Conjunction).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Conjunction.__proto__ || Object.getPrototypeOf(Conjunction)).apply(this, arguments));
}
_createClass(Conjunction, [{
@@ -3526,7 +3498,7 @@ var Disjunction = function (_Connective2) {
function Disjunction() {
_classCallCheck(this, Disjunction);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Disjunction).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Disjunction.__proto__ || Object.getPrototypeOf(Disjunction)).apply(this, arguments));
}
_createClass(Disjunction, [{
@@ -3577,7 +3549,7 @@ var Negation = function (_Conjunction) {
function Negation() {
_classCallCheck(this, Negation);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Negation).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Negation.__proto__ || Object.getPrototypeOf(Negation)).apply(this, arguments));
}
_createClass(Negation, [{
@@ -3588,7 +3560,7 @@ var Negation = function (_Conjunction) {
}, {
key: 'run',
value: function run(fields) {
- return !_get(Object.getPrototypeOf(Negation.prototype), 'run', this).call(this, fields);
+ return !_get(Negation.prototype.__proto__ || Object.getPrototypeOf(Negation.prototype), 'run', this).call(this, fields);
}
}]);
@@ -3601,7 +3573,7 @@ var Exists = function (_Operator2) {
function Exists(path, bool) {
_classCallCheck(this, Exists);
- var _this5 = _possibleConstructorReturn(this, Object.getPrototypeOf(Exists).call(this));
+ var _this5 = _possibleConstructorReturn(this, (Exists.__proto__ || Object.getPrototypeOf(Exists)).call(this));
_this5.path = path;
_this5.bool = bool;
@@ -3629,7 +3601,7 @@ var Equal = function (_Operator3) {
function Equal(path, value) {
_classCallCheck(this, Equal);
- var _this6 = _possibleConstructorReturn(this, Object.getPrototypeOf(Equal).call(this));
+ var _this6 = _possibleConstructorReturn(this, (Equal.__proto__ || Object.getPrototypeOf(Equal)).call(this));
_this6.path = path;
_this6.value = value;
@@ -3639,6 +3611,7 @@ var Equal = function (_Operator3) {
_createClass(Equal, [{
key: 'run',
value: function run(fields) {
+
var value = fields.get(this.path);
if (value === MISSING) {
return false;
@@ -3661,19 +3634,41 @@ var Equal = function (_Operator3) {
return Equal;
}(Operator);
+var EqualValue = function (_Operator4) {
+ _inherits(EqualValue, _Operator4);
+
+ function EqualValue(value) {
+ _classCallCheck(this, EqualValue);
+
+ var _this7 = _possibleConstructorReturn(this, (EqualValue.__proto__ || Object.getPrototypeOf(EqualValue)).call(this));
+
+ _this7.value = value;
+ return _this7;
+ }
+
+ _createClass(EqualValue, [{
+ key: 'run',
+ value: function run(value) {
+ return equal(value, this.value);
+ }
+ }]);
+
+ return EqualValue;
+}(Operator);
+
var NotEqual = function (_Equal) {
_inherits(NotEqual, _Equal);
function NotEqual() {
_classCallCheck(this, NotEqual);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(NotEqual).apply(this, arguments));
+ return _possibleConstructorReturn(this, (NotEqual.__proto__ || Object.getPrototypeOf(NotEqual)).apply(this, arguments));
}
_createClass(NotEqual, [{
key: 'run',
value: function run(fields) {
- return !_get(Object.getPrototypeOf(NotEqual.prototype), 'run', this).call(this, fields);
+ return !_get(NotEqual.prototype.__proto__ || Object.getPrototypeOf(NotEqual.prototype), 'run', this).call(this, fields);
}
}, {
key: 'is_index_matchable',
@@ -3685,18 +3680,18 @@ var NotEqual = function (_Equal) {
return NotEqual;
}(Equal);
-var Range = function (_Operator4) {
- _inherits(Range, _Operator4);
+var Range = function (_Operator5) {
+ _inherits(Range, _Operator5);
function Range(path, fns, values) {
_classCallCheck(this, Range);
- var _this8 = _possibleConstructorReturn(this, Object.getPrototypeOf(Range).call(this));
+ var _this9 = _possibleConstructorReturn(this, (Range.__proto__ || Object.getPrototypeOf(Range)).call(this));
- _this8.path = path;
- _this8.fns = fns;
- _this8.values = values;
- return _this8;
+ _this9.path = path;
+ _this9.fns = fns;
+ _this9.values = values;
+ return _this9;
}
_createClass(Range, [{
@@ -3708,8 +3703,8 @@ var Range = function (_Operator4) {
return false;
}
- var fns = this.fns;
- var values = this.values;
+ var fns = this.fns,
+ values = this.values;
for (var i = 0; i < fns.length; i++) {
@@ -3741,7 +3736,7 @@ var rangeMixin = function rangeMixin() {
function _class(path, values) {
_classCallCheck(this, _class);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(_class).call(this, path, fns, values));
+ return _possibleConstructorReturn(this, (_class.__proto__ || Object.getPrototypeOf(_class)).call(this, path, fns, values));
}
return _class;
@@ -3767,7 +3762,7 @@ var Gt = function (_rangeMixin) {
function Gt() {
_classCallCheck(this, Gt);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Gt).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Gt.__proto__ || Object.getPrototypeOf(Gt)).apply(this, arguments));
}
_createClass(Gt, [{
@@ -3788,7 +3783,7 @@ var Gte = function (_rangeMixin2) {
function Gte() {
_classCallCheck(this, Gte);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Gte).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Gte.__proto__ || Object.getPrototypeOf(Gte)).apply(this, arguments));
}
_createClass(Gte, [{
@@ -3809,7 +3804,7 @@ var Lt = function (_rangeMixin3) {
function Lt() {
_classCallCheck(this, Lt);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Lt).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Lt.__proto__ || Object.getPrototypeOf(Lt)).apply(this, arguments));
}
_createClass(Lt, [{
@@ -3830,7 +3825,7 @@ var Lte = function (_rangeMixin4) {
function Lte() {
_classCallCheck(this, Lte);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(Lte).apply(this, arguments));
+ return _possibleConstructorReturn(this, (Lte.__proto__ || Object.getPrototypeOf(Lte)).apply(this, arguments));
}
_createClass(Lte, [{
@@ -3851,7 +3846,7 @@ var GtLt = function (_rangeMixin5) {
function GtLt() {
_classCallCheck(this, GtLt);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(GtLt).apply(this, arguments));
+ return _possibleConstructorReturn(this, (GtLt.__proto__ || Object.getPrototypeOf(GtLt)).apply(this, arguments));
}
_createClass(GtLt, [{
@@ -3872,7 +3867,7 @@ var GteLt = function (_rangeMixin6) {
function GteLt() {
_classCallCheck(this, GteLt);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(GteLt).apply(this, arguments));
+ return _possibleConstructorReturn(this, (GteLt.__proto__ || Object.getPrototypeOf(GteLt)).apply(this, arguments));
}
_createClass(GteLt, [{
@@ -3893,7 +3888,7 @@ var GtLte = function (_rangeMixin7) {
function GtLte() {
_classCallCheck(this, GtLte);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(GtLte).apply(this, arguments));
+ return _possibleConstructorReturn(this, (GtLte.__proto__ || Object.getPrototypeOf(GtLte)).apply(this, arguments));
}
_createClass(GtLte, [{
@@ -3914,7 +3909,7 @@ var GteLte = function (_rangeMixin8) {
function GteLte() {
_classCallCheck(this, GteLte);
- return _possibleConstructorReturn(this, Object.getPrototypeOf(GteLte).apply(this, arguments));
+ return _possibleConstructorReturn(this, (GteLte.__proto__ || Object.getPrototypeOf(GteLte)).apply(this, arguments));
}
_createClass(GteLte, [{
@@ -3929,17 +3924,17 @@ var GteLte = function (_rangeMixin8) {
return GteLte;
}(rangeMixin(gte, lte));
-var ElemMatch = function (_Operator5) {
- _inherits(ElemMatch, _Operator5);
+var ElemMatch = function (_Operator6) {
+ _inherits(ElemMatch, _Operator6);
function ElemMatch(path, op) {
_classCallCheck(this, ElemMatch);
- var _this18 = _possibleConstructorReturn(this, Object.getPrototypeOf(ElemMatch).call(this));
+ var _this19 = _possibleConstructorReturn(this, (ElemMatch.__proto__ || Object.getPrototypeOf(ElemMatch)).call(this));
- _this18.path = path;
- _this18.op = op;
- return _this18;
+ _this19.path = path;
+ _this19.op = op;
+ return _this19;
}
_createClass(ElemMatch, [{
@@ -3961,8 +3956,10 @@ var ElemMatch = function (_Operator5) {
for (var _iterator4 = elements[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
var obj = _step4.value;
- if (isObject(obj) && op.run(new Fields(obj))) {
- return true;
+ if (isObject(obj)) {
+ if (op.run(new Fields(obj))) return true;
+ } else if (op instanceof EqualValue) {
+ if (op.run(obj)) return true;
}
}
} catch (err) {
@@ -3992,17 +3989,17 @@ var ElemMatch = function (_Operator5) {
return ElemMatch;
}(Operator);
-var RegEx = function (_Operator6) {
- _inherits(RegEx, _Operator6);
+var RegEx = function (_Operator7) {
+ _inherits(RegEx, _Operator7);
function RegEx(path, expr) {
_classCallCheck(this, RegEx);
- var _this19 = _possibleConstructorReturn(this, Object.getPrototypeOf(RegEx).call(this));
+ var _this20 = _possibleConstructorReturn(this, (RegEx.__proto__ || Object.getPrototypeOf(RegEx)).call(this));
- _this19.path = path;
- _this19.expr = expr;
- return _this19;
+ _this20.path = path;
+ _this20.expr = expr;
+ return _this20;
}
_createClass(RegEx, [{
@@ -4219,11 +4216,9 @@ var buildRange = function buildRange(new_args, path, params, op_keys) {
try {
for (var _iterator9 = ranges[Symbol.iterator](), _step9; !(_iteratorNormalCompletion9 = (_step9 = _iterator9.next()).done); _iteratorNormalCompletion9 = true) {
- var _step9$value = _toArray(_step9.value);
-
- var RangeOp = _step9$value[0];
-
- var range_keys = _step9$value.slice(1);
+ var _step9$value = _toArray(_step9.value),
+ RangeOp = _step9$value[0],
+ range_keys = _step9$value.slice(1);
var result = build(RangeOp, range_keys);
@@ -4363,10 +4358,12 @@ var buildClause = function buildClause(parent_args, path, params) {
}
if (op_keys.has('$elemMatch')) {
- var op = build(params.$elemMatch);
+ if (params.$elemMatch.$eq) new_args.push(new ElemMatch(path, new EqualValue(params.$elemMatch.$eq)));else {
+ var op = build(params.$elemMatch);
- if (op) {
- new_args.push(new ElemMatch(path, op));
+ if (op) {
+ new_args.push(new ElemMatch(path, op));
+ }
}
op_keys.delete('$elemMatch');
@@ -4473,9 +4470,8 @@ module.exports = Symbol('missing');
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-var _require = require('../util.js');
-
-var toPathPieces = _require.toPathPieces;
+var _require = require('../util.js'),
+ toPathPieces = _require.toPathPieces;
var Path = function Path(path) {
_classCallCheck(this, Path);
@@ -4504,17 +4500,13 @@ module.exports = function (_next, num) {
},{}],15:[function(require,module,exports){
'use strict';
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
-var _require = require('./util.js');
-
-var toPathPieces = _require.toPathPieces;
-var set = _require.set;
-var remove2 = _require.remove2;
-var copy = _require.copy;
-
+var _require = require('./util.js'),
+ toPathPieces = _require.toPathPieces,
+ set = _require.set,
+ remove2 = _require.remove2,
+ copy = _require.copy;
var build = require('./lang/expression.js');
var Fields = require('./lang/fields.js');
@@ -4526,10 +4518,9 @@ var addition = function addition(doc, new_doc, new_fields) {
try {
for (var _iterator = new_fields[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
- var _step$value = _slicedToArray(_step.value, 2);
-
- var path_pieces = _step$value[0];
- var add = _step$value[1];
+ var _step$value = _slicedToArray(_step.value, 2),
+ path_pieces = _step$value[0],
+ add = _step$value[1];
add(doc, new_doc, path_pieces);
}
@@ -4552,29 +4543,21 @@ var addition = function addition(doc, new_doc, new_fields) {
};
var _build = function _build(value1) {
- var _build2 = build(value1);
-
- var ast = _build2.ast;
- var paths = _build2.paths;
- var has_refs = _build2.has_refs;
-
+ var _build2 = build(value1),
+ ast = _build2.ast,
+ paths = _build2.paths,
+ has_refs = _build2.has_refs;
if (!has_refs) {
- var _ret = function () {
- var value2 = ast.run();
-
- return {
- v: function v(doc) {
- for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
- args[_key - 1] = arguments[_key];
- }
+ var value2 = ast.run();
- return set.apply(undefined, args.concat([value2]));
- }
- };
- }();
+ return function (doc) {
+ for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+ args[_key - 1] = arguments[_key];
+ }
- if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v;
+ return set.apply(undefined, args.concat([value2]));
+ };
}
return function (doc) {
@@ -4639,39 +4622,35 @@ var project = function project(_next, spec) {
}
if (!existing_fields.length) {
- (function () {
- var project = void 0;
+ var _project = void 0;
- if (_id_bool) {
- project = function project(doc, new_doc) {
- if (doc.hasOwnProperty('_id')) {
- new_doc._id = doc._id;
- }
- };
- } else {
- project = function project(doc, new_doc) {
- delete new_doc._id;
- };
- }
+ if (_id_bool) {
+ _project = function _project(doc, new_doc) {
+ if (doc.hasOwnProperty('_id')) {
+ new_doc._id = doc._id;
+ }
+ };
+ } else {
+ _project = function _project(doc, new_doc) {
+ delete new_doc._id;
+ };
+ }
- steps.push(function (doc, new_doc) {
- project(doc, new_doc);
+ steps.push(function (doc, new_doc) {
+ _project(doc, new_doc);
- return new_doc;
- });
- })();
+ return new_doc;
+ });
} else {
- (function () {
- if (is_inclusion === _id_bool) {
- existing_fields.push(['_id']);
- }
+ if (is_inclusion === _id_bool) {
+ existing_fields.push(['_id']);
+ }
- var project = is_inclusion ? copy : remove2;
+ var _project2 = is_inclusion ? copy : remove2;
- steps.push(function (doc) {
- return project(doc, existing_fields);
- });
- })();
+ steps.push(function (doc) {
+ return _project2(doc, existing_fields);
+ });
}
var next = function next(cb) {
@@ -4718,10 +4697,8 @@ module.exports = project;
},{"./lang/expression.js":9,"./lang/fields.js":10,"./util.js":21}],16:[function(require,module,exports){
'use strict';
-var _require = require('./util.js');
-
-var getIDBError = _require.getIDBError;
-
+var _require = require('./util.js'),
+ getIDBError = _require.getIDBError;
module.exports = function (cur, cb) {
(function iterate() {
@@ -4764,12 +4741,10 @@ module.exports = function (_next, num) {
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
-var _require = require('./util.js');
-
-var toPathPieces = _require.toPathPieces;
-var isObject = _require.isObject;
-var equal = _require.equal;
-
+var _require = require('./util.js'),
+ toPathPieces = _require.toPathPieces,
+ isObject = _require.isObject,
+ equal = _require.equal;
var compare = function compare(a, b, path_pieces, order) {
for (var i = 0; i < path_pieces.length - 1; i++) {
@@ -4823,10 +4798,9 @@ module.exports = function (_next, spec) {
try {
for (var _iterator = sorts[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
- var _step$value = _slicedToArray(_step.value, 2);
-
- var path_pieces = _step$value[0];
- var order = _step$value[1];
+ var _step$value = _slicedToArray(_step.value, 2),
+ path_pieces = _step$value[0],
+ order = _step$value[1];
var result = compare(a, b, path_pieces, order);
@@ -4890,11 +4864,9 @@ module.exports = function (_next, spec) {
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
-var _require = require('./util.js');
-
-var toPathPieces = _require.toPathPieces;
-var get = _require.get;
-
+var _require = require('./util.js'),
+ toPathPieces = _require.toPathPieces,
+ get = _require.get;
module.exports = function (_next, path) {
var path_pieces = toPathPieces(path.substring(1)),
@@ -4966,18 +4938,16 @@ module.exports = function (_next, path) {
},{"./util.js":21}],20:[function(require,module,exports){
'use strict';
-var _require = require('./util.js');
-
-var toPathPieces = _require.toPathPieces;
-var get = _require.get;
-var set = _require.set;
-var modify = _require.modify;
-var remove1 = _require.remove1;
-var rename = _require.rename;
-var equal = _require.equal;
-var unknownOp = _require.unknownOp;
-var getIDBError = _require.getIDBError;
-
+var _require = require('./util.js'),
+ toPathPieces = _require.toPathPieces,
+ get = _require.get,
+ set = _require.set,
+ modify = _require.modify,
+ remove1 = _require.remove1,
+ rename = _require.rename,
+ equal = _require.equal,
+ unknownOp = _require.unknownOp,
+ getIDBError = _require.getIDBError;
var ops = {};
@@ -5557,13 +5527,11 @@ module.exports.equal = equal;
module.exports.unknownOp = unknownOp;
module.exports.hashify = hashify;
module.exports.getIDBError = getIDBError;
-},{"clone":72,"deepmerge":414,"object-hash":524}],22:[function(require,module,exports){
+},{"clone":72,"deepmerge":415,"object-hash":520}],22:[function(require,module,exports){
'use strict';
-var _require = require('chai');
-
-var expect = _require.expect;
-
+var _require = require('chai'),
+ expect = _require.expect;
describe('$match', function () {
var db = new zango.Db(Math.random(), ['col']);
@@ -5603,20 +5571,18 @@ describe('$unwind', function () {
},{"./group.js":24,"./unwind.js":33,"chai":39}],23:[function(require,module,exports){
'use strict';
-var _require = require('chai');
-
-var expect = _require.expect;
+var _require = require('chai'),
+ expect = _require.expect;
-var _require2 = require('../src/lang/filter.js');
-
-var build = _require2.build;
-var Fields = require('../src/lang/fields.js');
-var waterfall = require('./waterfall.js');
+var _require2 = require('../src/lang/filter.js'),
+ build = _require2.build,
+ Fields = require('../src/lang/fields.js'),
+ waterfall = require('./waterfall.js');
var db = new zango.Db(Math.random(), { col: ['x', 'g'] });
var col = db.collection('col');
-var docs = [{ x: 4, k: 8 }, { x: 2, g: 3 }, { x: 3, z: 3 }, { x: 6, g: 9 }, { x: 10, k: 4 }, { x: 2, g: 8 }, { x: 2, g: 8, z: 10 }, { x: undefined }, { x: null }, { x: [{ k: 2 }, { k: 8 }] }];
+var docs = [{ x: 4, k: 8 }, { x: 2, g: 3 }, { x: 3, z: 3 }, { x: 6, g: 9 }, { x: 10, k: 4 }, { x: 2, g: 8 }, { x: 2, g: 8, z: 10 }, { x: undefined }, { x: null }, { x: [{ k: 2 }, { k: 8 }, "barbaz"] }, { y: "foobar" }];
before(function () {
return col.insert(docs);
@@ -5778,7 +5744,17 @@ describe('$nin', function () {
describe('$elemMatch', function () {
it('should test if any iterable elements satisify a predicate', function (done) {
+ console.log(1);
query({ x: { $elemMatch: { k: 8 } } }, done);
+ console.log(2);
+ });
+});
+
+describe('$elemMatch', function () {
+ it('should test if any iterable elements satisify a predicate', function (done) {
+ console.log(3);
+ query({ x: { $elemMatch: { $eq: "barbaz" } } }, done);
+ console.log(4);
});
});
@@ -5791,13 +5767,17 @@ describe('$exists', function () {
query({ g: { $exists: 0 } }, done);
});
});
+
+describe('$regex', function () {
+ it('should perform regular expression test', function (done) {
+ query({ y: { $regex: /oob/ } }, done);
+ });
+});
},{"../src/lang/fields.js":10,"../src/lang/filter.js":11,"./waterfall.js":35,"chai":39}],24:[function(require,module,exports){
'use strict';
-var _require = require('chai');
-
-var expect = _require.expect;
-
+var _require = require('chai'),
+ expect = _require.expect;
var docs = [{ x: 2, g: 1 }, { x: 2, g: 4 }, { x: 2, g: 4 }, { x: 2, g: 3 }, { x: 8, g: 8 }, { x: 8, g: 8 }, { x: 8, g: 6 }, { x: 8, g: 2 }];
@@ -6004,24 +5984,21 @@ describe('Collection', function () {
});
});
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"../src":8,"./aggregate.js":22,"./find.js":23,"./lang/expression.js":26,"./lang/filter.js":27,"./limit.js":28,"./project.js":29,"./remove.js":30,"./skip.js":31,"./sort.js":32,"./update.js":34,"_process":526,"fake-indexeddb":477,"fake-indexeddb/lib/FDBKeyRange":495}],26:[function(require,module,exports){
+},{"../src":8,"./aggregate.js":22,"./find.js":23,"./lang/expression.js":26,"./lang/filter.js":27,"./limit.js":28,"./project.js":29,"./remove.js":30,"./skip.js":31,"./sort.js":32,"./update.js":34,"_process":522,"fake-indexeddb":478,"fake-indexeddb/lib/FDBKeyRange":496}],26:[function(require,module,exports){
'use strict';
-var _require = require('chai');
-
-var expect = _require.expect;
-
+var _require = require('chai'),
+ expect = _require.expect;
var build = require('../../src/lang/expression.js');
var Fields = require('../../src/lang/fields.js');
var evalExpr = function evalExpr(expr) {
- var doc = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
-
- var _build = build(expr);
+ var doc = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
- var ast = _build.ast;
- var has_refs = _build.has_refs;
+ var _build = build(expr),
+ ast = _build.ast,
+ has_refs = _build.has_refs;
if (ast === false) {
return false;
@@ -6527,13 +6504,11 @@ describe('date', function () {
},{"../../src/lang/expression.js":9,"../../src/lang/fields.js":10,"chai":39}],27:[function(require,module,exports){
'use strict';
-var _require = require('chai');
-
-var expect = _require.expect;
-
-var _require2 = require('../../src/lang/filter.js');
+var _require = require('chai'),
+ expect = _require.expect;
-var build = _require2.build;
+var _require2 = require('../../src/lang/filter.js'),
+ build = _require2.build;
var Fields = require('../../src/lang/fields.js');
@@ -6905,10 +6880,8 @@ describe('$exists', function () {
},{"../../src/lang/fields.js":10,"../../src/lang/filter.js":11,"chai":39}],28:[function(require,module,exports){
'use strict';
-var _require = require('chai');
-
-var expect = _require.expect;
-
+var _require = require('chai'),
+ expect = _require.expect;
var db = new zango.Db(Math.random(), ['col']);
var col = db.collection('col');
@@ -6936,10 +6909,8 @@ it('should limit the number of documents', function (done) {
},{"chai":39}],29:[function(require,module,exports){
'use strict';
-var _require = require('chai');
-
-var expect = _require.expect;
-
+var _require = require('chai'),
+ expect = _require.expect;
var waterfall = require('./waterfall.js');
@@ -7068,10 +7039,8 @@ it('should support addition of new literal fields', function (done) {
},{"./waterfall.js":35,"chai":39}],30:[function(require,module,exports){
'use strict';
-var _require = require('chai');
-
-var expect = _require.expect;
-
+var _require = require('chai'),
+ expect = _require.expect;
var db = new zango.Db(Math.random(), { col: ['x'] });
var col = db.collection('col');
@@ -7106,10 +7075,8 @@ it('should delete documents', function (done) {
},{"chai":39}],31:[function(require,module,exports){
'use strict';
-var _require = require('chai');
-
-var expect = _require.expect;
-
+var _require = require('chai'),
+ expect = _require.expect;
var db = new zango.Db(Math.random(), ['col']);
var col = db.collection('col');
@@ -7137,10 +7104,8 @@ it('should skip a specified number of documents', function (done) {
},{"chai":39}],32:[function(require,module,exports){
'use strict';
-var _require = require('chai');
-
-var expect = _require.expect;
-
+var _require = require('chai'),
+ expect = _require.expect;
var db = new zango.Db(Math.random(), { col: ['x'] });
var col = db.collection('col');
@@ -7239,10 +7204,8 @@ it('should sort by descending without index', function (done) {
},{"chai":39}],33:[function(require,module,exports){
'use strict';
-var _require = require('chai');
-
-var expect = _require.expect;
-
+var _require = require('chai'),
+ expect = _require.expect;
var db = new zango.Db(Math.random(), ['col']);
var col = db.collection('col');
@@ -7299,10 +7262,8 @@ it('should unwind an iterable', function (done) {
},{"chai":39}],34:[function(require,module,exports){
'use strict';
-var _require = require('chai');
-
-var expect = _require.expect;
-
+var _require = require('chai'),
+ expect = _require.expect;
var db = new zango.Db(Math.random(), ['col']);
var col = db.collection('col');
@@ -7667,8 +7628,8 @@ function AssertionError (message, _props, ssf) {
}
// capture stack trace
- ssf = ssf || arguments.callee;
- if (ssf && Error.captureStackTrace) {
+ ssf = ssf || AssertionError;
+ if (Error.captureStackTrace) {
Error.captureStackTrace(this, ssf);
} else {
try {
@@ -7733,68 +7694,102 @@ for (var i = 0, len = code.length; i < len; ++i) {
revLookup[code.charCodeAt(i)] = i
}
+// Support decoding URL-safe base64 strings, as Node.js does.
+// See: https://en.wikipedia.org/wiki/Base64#URL_applications
revLookup['-'.charCodeAt(0)] = 62
revLookup['_'.charCodeAt(0)] = 63
-function placeHoldersCount (b64) {
+function getLens (b64) {
var len = b64.length
+
if (len % 4 > 0) {
throw new Error('Invalid string. Length must be a multiple of 4')
}
- // the number of equal signs (place holders)
- // if there are two placeholders, than the two characters before it
- // represent one byte
- // if there is only one, then the three characters before it represent 2 bytes
- // this is just a cheap hack to not do indexOf twice
- return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0
+ // Trim off extra bytes after placeholder bytes are found
+ // See: https://github.com/beatgammit/base64-js/issues/42
+ var validLen = b64.indexOf('=')
+ if (validLen === -1) validLen = len
+
+ var placeHoldersLen = validLen === len
+ ? 0
+ : 4 - (validLen % 4)
+
+ return [validLen, placeHoldersLen]
}
+// base64 is 4/3 + up to two characters of the original data
function byteLength (b64) {
- // base64 is 4/3 + up to two characters of the original data
- return (b64.length * 3 / 4) - placeHoldersCount(b64)
+ var lens = getLens(b64)
+ var validLen = lens[0]
+ var placeHoldersLen = lens[1]
+ return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
+}
+
+function _byteLength (b64, validLen, placeHoldersLen) {
+ return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
}
function toByteArray (b64) {
- var i, l, tmp, placeHolders, arr
- var len = b64.length
- placeHolders = placeHoldersCount(b64)
+ var tmp
+ var lens = getLens(b64)
+ var validLen = lens[0]
+ var placeHoldersLen = lens[1]
+
+ var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
- arr = new Arr((len * 3 / 4) - placeHolders)
+ var curByte = 0
// if there are placeholders, only get up to the last complete 4 chars
- l = placeHolders > 0 ? len - 4 : len
+ var len = placeHoldersLen > 0
+ ? validLen - 4
+ : validLen
- var L = 0
+ for (var i = 0; i < len; i += 4) {
+ tmp =
+ (revLookup[b64.charCodeAt(i)] << 18) |
+ (revLookup[b64.charCodeAt(i + 1)] << 12) |
+ (revLookup[b64.charCodeAt(i + 2)] << 6) |
+ revLookup[b64.charCodeAt(i + 3)]
+ arr[curByte++] = (tmp >> 16) & 0xFF
+ arr[curByte++] = (tmp >> 8) & 0xFF
+ arr[curByte++] = tmp & 0xFF
+ }
- for (i = 0; i < l; i += 4) {
- tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]
- arr[L++] = (tmp >> 16) & 0xFF
- arr[L++] = (tmp >> 8) & 0xFF
- arr[L++] = tmp & 0xFF
+ if (placeHoldersLen === 2) {
+ tmp =
+ (revLookup[b64.charCodeAt(i)] << 2) |
+ (revLookup[b64.charCodeAt(i + 1)] >> 4)
+ arr[curByte++] = tmp & 0xFF
}
- if (placeHolders === 2) {
- tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4)
- arr[L++] = tmp & 0xFF
- } else if (placeHolders === 1) {
- tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2)
- arr[L++] = (tmp >> 8) & 0xFF
- arr[L++] = tmp & 0xFF
+ if (placeHoldersLen === 1) {
+ tmp =
+ (revLookup[b64.charCodeAt(i)] << 10) |
+ (revLookup[b64.charCodeAt(i + 1)] << 4) |
+ (revLookup[b64.charCodeAt(i + 2)] >> 2)
+ arr[curByte++] = (tmp >> 8) & 0xFF
+ arr[curByte++] = tmp & 0xFF
}
return arr
}
function tripletToBase64 (num) {
- return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]
+ return lookup[num >> 18 & 0x3F] +
+ lookup[num >> 12 & 0x3F] +
+ lookup[num >> 6 & 0x3F] +
+ lookup[num & 0x3F]
}
function encodeChunk (uint8, start, end) {
var tmp
var output = []
for (var i = start; i < end; i += 3) {
- tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])
+ tmp =
+ ((uint8[i] << 16) & 0xFF0000) +
+ ((uint8[i + 1] << 8) & 0xFF00) +
+ (uint8[i + 2] & 0xFF)
output.push(tripletToBase64(tmp))
}
return output.join('')
@@ -7804,31 +7799,34 @@ function fromByteArray (uint8) {
var tmp
var len = uint8.length
var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
- var output = ''
var parts = []
var maxChunkLength = 16383 // must be multiple of 3
// go through the array every three bytes, we'll deal with trailing stuff later
for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
- parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))
+ parts.push(encodeChunk(
+ uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)
+ ))
}
// pad the end with zeros, but make sure to not forget the extra bytes
if (extraBytes === 1) {
tmp = uint8[len - 1]
- output += lookup[tmp >> 2]
- output += lookup[(tmp << 4) & 0x3F]
- output += '=='
+ parts.push(
+ lookup[tmp >> 2] +
+ lookup[(tmp << 4) & 0x3F] +
+ '=='
+ )
} else if (extraBytes === 2) {
- tmp = (uint8[len - 2] << 8) + (uint8[len - 1])
- output += lookup[tmp >> 10]
- output += lookup[(tmp >> 4) & 0x3F]
- output += lookup[(tmp << 2) & 0x3F]
- output += '='
+ tmp = (uint8[len - 2] << 8) + uint8[len - 1]
+ parts.push(
+ lookup[tmp >> 10] +
+ lookup[(tmp >> 4) & 0x3F] +
+ lookup[(tmp << 2) & 0x3F] +
+ '='
+ )
}
- parts.push(output)
-
return parts.join('')
}
@@ -7881,16 +7879,32 @@ function typedArraySupport () {
// Can typed array instances can be augmented?
try {
var arr = new Uint8Array(1)
- arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}
+ arr.__proto__ = { __proto__: Uint8Array.prototype, foo: function () { return 42 } }
return arr.foo() === 42
} catch (e) {
return false
}
}
+Object.defineProperty(Buffer.prototype, 'parent', {
+ enumerable: true,
+ get: function () {
+ if (!Buffer.isBuffer(this)) return undefined
+ return this.buffer
+ }
+})
+
+Object.defineProperty(Buffer.prototype, 'offset', {
+ enumerable: true,
+ get: function () {
+ if (!Buffer.isBuffer(this)) return undefined
+ return this.byteOffset
+ }
+})
+
function createBuffer (length) {
if (length > K_MAX_LENGTH) {
- throw new RangeError('Invalid typed array length')
+ throw new RangeError('The value "' + length + '" is invalid for option "size"')
}
// Return an augmented `Uint8Array` instance
var buf = new Uint8Array(length)
@@ -7912,8 +7926,8 @@ function Buffer (arg, encodingOrOffset, length) {
// Common case.
if (typeof arg === 'number') {
if (typeof encodingOrOffset === 'string') {
- throw new Error(
- 'If encoding is specified then the first argument must be a string'
+ throw new TypeError(
+ 'The "string" argument must be of type string. Received type number'
)
}
return allocUnsafe(arg)
@@ -7922,7 +7936,7 @@ function Buffer (arg, encodingOrOffset, length) {
}
// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
-if (typeof Symbol !== 'undefined' && Symbol.species &&
+if (typeof Symbol !== 'undefined' && Symbol.species != null &&
Buffer[Symbol.species] === Buffer) {
Object.defineProperty(Buffer, Symbol.species, {
value: null,
@@ -7935,19 +7949,51 @@ if (typeof Symbol !== 'undefined' && Symbol.species &&
Buffer.poolSize = 8192 // not used by this implementation
function from (value, encodingOrOffset, length) {
- if (typeof value === 'number') {
- throw new TypeError('"value" argument must not be a number')
+ if (typeof value === 'string') {
+ return fromString(value, encodingOrOffset)
}
- if (isArrayBuffer(value)) {
+ if (ArrayBuffer.isView(value)) {
+ return fromArrayLike(value)
+ }
+
+ if (value == null) {
+ throw TypeError(
+ 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +
+ 'or Array-like Object. Received type ' + (typeof value)
+ )
+ }
+
+ if (isInstance(value, ArrayBuffer) ||
+ (value && isInstance(value.buffer, ArrayBuffer))) {
return fromArrayBuffer(value, encodingOrOffset, length)
}
- if (typeof value === 'string') {
- return fromString(value, encodingOrOffset)
+ if (typeof value === 'number') {
+ throw new TypeError(
+ 'The "value" argument must not be of type number. Received type number'
+ )
+ }
+
+ var valueOf = value.valueOf && value.valueOf()
+ if (valueOf != null && valueOf !== value) {
+ return Buffer.from(valueOf, encodingOrOffset, length)
+ }
+
+ var b = fromObject(value)
+ if (b) return b
+
+ if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&
+ typeof value[Symbol.toPrimitive] === 'function') {
+ return Buffer.from(
+ value[Symbol.toPrimitive]('string'), encodingOrOffset, length
+ )
}
- return fromObject(value)
+ throw new TypeError(
+ 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +
+ 'or Array-like Object. Received type ' + (typeof value)
+ )
}
/**
@@ -7969,9 +8015,9 @@ Buffer.__proto__ = Uint8Array
function assertSize (size) {
if (typeof size !== 'number') {
- throw new TypeError('"size" argument must be a number')
+ throw new TypeError('"size" argument must be of type number')
} else if (size < 0) {
- throw new RangeError('"size" argument must not be negative')
+ throw new RangeError('The value "' + size + '" is invalid for option "size"')
}
}
@@ -8023,7 +8069,7 @@ function fromString (string, encoding) {
}
if (!Buffer.isEncoding(encoding)) {
- throw new TypeError('"encoding" must be a valid string encoding')
+ throw new TypeError('Unknown encoding: ' + encoding)
}
var length = byteLength(string, encoding) | 0
@@ -8052,11 +8098,11 @@ function fromArrayLike (array) {
function fromArrayBuffer (array, byteOffset, length) {
if (byteOffset < 0 || array.byteLength < byteOffset) {
- throw new RangeError('\'offset\' is out of bounds')
+ throw new RangeError('"offset" is outside of buffer bounds')
}
if (array.byteLength < byteOffset + (length || 0)) {
- throw new RangeError('\'length\' is out of bounds')
+ throw new RangeError('"length" is outside of buffer bounds')
}
var buf
@@ -8086,20 +8132,16 @@ function fromObject (obj) {
return buf
}
- if (obj) {
- if (isArrayBufferView(obj) || 'length' in obj) {
- if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {
- return createBuffer(0)
- }
- return fromArrayLike(obj)
- }
-
- if (obj.type === 'Buffer' && Array.isArray(obj.data)) {
- return fromArrayLike(obj.data)
+ if (obj.length !== undefined) {
+ if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {
+ return createBuffer(0)
}
+ return fromArrayLike(obj)
}
- throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')
+ if (obj.type === 'Buffer' && Array.isArray(obj.data)) {
+ return fromArrayLike(obj.data)
+ }
}
function checked (length) {
@@ -8120,12 +8162,17 @@ function SlowBuffer (length) {
}
Buffer.isBuffer = function isBuffer (b) {
- return b != null && b._isBuffer === true
+ return b != null && b._isBuffer === true &&
+ b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false
}
Buffer.compare = function compare (a, b) {
+ if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)
+ if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)
if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
- throw new TypeError('Arguments must be Buffers')
+ throw new TypeError(
+ 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
+ )
}
if (a === b) return 0
@@ -8186,6 +8233,9 @@ Buffer.concat = function concat (list, length) {
var pos = 0
for (i = 0; i < list.length; ++i) {
var buf = list[i]
+ if (isInstance(buf, Uint8Array)) {
+ buf = Buffer.from(buf)
+ }
if (!Buffer.isBuffer(buf)) {
throw new TypeError('"list" argument must be an Array of Buffers')
}
@@ -8199,15 +8249,19 @@ function byteLength (string, encoding) {
if (Buffer.isBuffer(string)) {
return string.length
}
- if (isArrayBufferView(string) || isArrayBuffer(string)) {
+ if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {
return string.byteLength
}
if (typeof string !== 'string') {
- string = '' + string
+ throw new TypeError(
+ 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' +
+ 'Received type ' + typeof string
+ )
}
var len = string.length
- if (len === 0) return 0
+ var mustMatch = (arguments.length > 2 && arguments[2] === true)
+ if (!mustMatch && len === 0) return 0
// Use a for loop to avoid recursion
var loweredCase = false
@@ -8219,7 +8273,6 @@ function byteLength (string, encoding) {
return len
case 'utf8':
case 'utf-8':
- case undefined:
return utf8ToBytes(string).length
case 'ucs2':
case 'ucs-2':
@@ -8231,7 +8284,9 @@ function byteLength (string, encoding) {
case 'base64':
return base64ToBytes(string).length
default:
- if (loweredCase) return utf8ToBytes(string).length // assume utf8
+ if (loweredCase) {
+ return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8
+ }
encoding = ('' + encoding).toLowerCase()
loweredCase = true
}
@@ -8367,6 +8422,8 @@ Buffer.prototype.toString = function toString () {
return slowToString.apply(this, arguments)
}
+Buffer.prototype.toLocaleString = Buffer.prototype.toString
+
Buffer.prototype.equals = function equals (b) {
if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
if (this === b) return true
@@ -8376,16 +8433,20 @@ Buffer.prototype.equals = function equals (b) {
Buffer.prototype.inspect = function inspect () {
var str = ''
var max = exports.INSPECT_MAX_BYTES
- if (this.length > 0) {
- str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
- if (this.length > max) str += ' ... '
- }
+ str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()
+ if (this.length > max) str += ' ... '
return ''
}
Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
+ if (isInstance(target, Uint8Array)) {
+ target = Buffer.from(target, target.offset, target.byteLength)
+ }
if (!Buffer.isBuffer(target)) {
- throw new TypeError('Argument must be a Buffer')
+ throw new TypeError(
+ 'The "target" argument must be one of type Buffer or Uint8Array. ' +
+ 'Received type ' + (typeof target)
+ )
}
if (start === undefined) {
@@ -8464,7 +8525,7 @@ function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
} else if (byteOffset < -0x80000000) {
byteOffset = -0x80000000
}
- byteOffset = +byteOffset // Coerce to Number.
+ byteOffset = +byteOffset // Coerce to Number.
if (numberIsNaN(byteOffset)) {
// byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
byteOffset = dir ? 0 : (buffer.length - 1)
@@ -8587,9 +8648,7 @@ function hexWrite (buf, string, offset, length) {
}
}
- // must be an even number of digits
var strLen = string.length
- if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')
if (length > strLen / 2) {
length = strLen / 2
@@ -8718,8 +8777,8 @@ function utf8Slice (buf, start, end) {
var codePoint = null
var bytesPerSequence = (firstByte > 0xEF) ? 4
: (firstByte > 0xDF) ? 3
- : (firstByte > 0xBF) ? 2
- : 1
+ : (firstByte > 0xBF) ? 2
+ : 1
if (i + bytesPerSequence <= end) {
var secondByte, thirdByte, fourthByte, tempCodePoint
@@ -9282,6 +9341,7 @@ Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert
// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
Buffer.prototype.copy = function copy (target, targetStart, start, end) {
+ if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')
if (!start) start = 0
if (!end && end !== 0) end = this.length
if (targetStart >= target.length) targetStart = target.length
@@ -9296,7 +9356,7 @@ Buffer.prototype.copy = function copy (target, targetStart, start, end) {
if (targetStart < 0) {
throw new RangeError('targetStart out of bounds')
}
- if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')
+ if (start < 0 || start >= this.length) throw new RangeError('Index out of range')
if (end < 0) throw new RangeError('sourceEnd out of bounds')
// Are we oob?
@@ -9306,22 +9366,19 @@ Buffer.prototype.copy = function copy (target, targetStart, start, end) {
}
var len = end - start
- var i
- if (this === target && start < targetStart && targetStart < end) {
+ if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {
+ // Use built-in when available, missing from IE11
+ this.copyWithin(targetStart, start, end)
+ } else if (this === target && start < targetStart && targetStart < end) {
// descending copy from end
- for (i = len - 1; i >= 0; --i) {
- target[i + targetStart] = this[i + start]
- }
- } else if (len < 1000) {
- // ascending copy from start
- for (i = 0; i < len; ++i) {
+ for (var i = len - 1; i >= 0; --i) {
target[i + targetStart] = this[i + start]
}
} else {
Uint8Array.prototype.set.call(
target,
- this.subarray(start, start + len),
+ this.subarray(start, end),
targetStart
)
}
@@ -9344,18 +9401,20 @@ Buffer.prototype.fill = function fill (val, start, end, encoding) {
encoding = end
end = this.length
}
- if (val.length === 1) {
- var code = val.charCodeAt(0)
- if (code < 256) {
- val = code
- }
- }
if (encoding !== undefined && typeof encoding !== 'string') {
throw new TypeError('encoding must be a string')
}
if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
throw new TypeError('Unknown encoding: ' + encoding)
}
+ if (val.length === 1) {
+ var code = val.charCodeAt(0)
+ if ((encoding === 'utf8' && code < 128) ||
+ encoding === 'latin1') {
+ // Fast path: If `val` fits into a single byte, use that numeric value.
+ val = code
+ }
+ }
} else if (typeof val === 'number') {
val = val & 255
}
@@ -9382,8 +9441,12 @@ Buffer.prototype.fill = function fill (val, start, end, encoding) {
} else {
var bytes = Buffer.isBuffer(val)
? val
- : new Buffer(val, encoding)
+ : Buffer.from(val, encoding)
var len = bytes.length
+ if (len === 0) {
+ throw new TypeError('The value "' + val +
+ '" is invalid for argument "value"')
+ }
for (i = 0; i < end - start; ++i) {
this[i + start] = bytes[i % len]
}
@@ -9398,6 +9461,8 @@ Buffer.prototype.fill = function fill (val, start, end, encoding) {
var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g
function base64clean (str) {
+ // Node takes equal signs as end of the Base64 encoding
+ str = str.split('=')[0]
// Node strips out invalid characters like \n and \t from the string, base64-js does not
str = str.trim().replace(INVALID_BASE64_RE, '')
// Node converts strings with length < 2 to ''
@@ -9531,24 +9596,20 @@ function blitBuffer (src, dst, offset, length) {
return i
}
-// ArrayBuffers from another context (i.e. an iframe) do not pass the `instanceof` check
-// but they should be treated as valid. See: https://github.com/feross/buffer/issues/166
-function isArrayBuffer (obj) {
- return obj instanceof ArrayBuffer ||
- (obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' &&
- typeof obj.byteLength === 'number')
-}
-
-// Node 0.10 supports `ArrayBuffer` but lacks `ArrayBuffer.isView`
-function isArrayBufferView (obj) {
- return (typeof ArrayBuffer.isView === 'function') && ArrayBuffer.isView(obj)
+// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass
+// the `instanceof` check but they should be treated as of that type.
+// See: https://github.com/feross/buffer/issues/166
+function isInstance (obj, type) {
+ return obj instanceof type ||
+ (obj != null && obj.constructor != null && obj.constructor.name != null &&
+ obj.constructor.name === type.name)
}
-
function numberIsNaN (obj) {
+ // For IE11 support
return obj !== obj // eslint-disable-line no-self-compare
}
-},{"base64-js":37,"ieee754":497}],39:[function(require,module,exports){
+},{"base64-js":37,"ieee754":498}],39:[function(require,module,exports){
module.exports = require('./lib/chai');
},{"./lib/chai":40}],40:[function(require,module,exports){
@@ -9564,7 +9625,7 @@ var used = [];
* Chai version
*/
-exports.version = '4.1.2';
+exports.version = '4.2.0';
/*!
* Assertion Error
@@ -9905,7 +9966,7 @@ module.exports = {
* @api public
*/
- proxyExcludedKeys: ['then', 'inspect', 'toJSON']
+ proxyExcludedKeys: ['then', 'catch', 'inspect', 'toJSON']
};
},{}],43:[function(require,module,exports){
@@ -9944,16 +10005,17 @@ module.exports = function (chai, _) {
* - same
* - but
* - does
+ * - still
*
* @name language chains
* @namespace BDD
* @api public
*/
- [ 'to', 'be', 'been'
- , 'is', 'and', 'has', 'have'
- , 'with', 'that', 'which', 'at'
- , 'of', 'same', 'but', 'does' ].forEach(function (chain) {
+ [ 'to', 'be', 'been', 'is'
+ , 'and', 'has', 'have', 'with'
+ , 'that', 'which', 'at', 'of'
+ , 'same', 'but', 'does', 'still' ].forEach(function (chain) {
Assertion.addProperty(chain);
});
@@ -10060,7 +10122,8 @@ module.exports = function (chai, _) {
* Object.prototype.b = 2;
*
* expect({a: 1}).to.have.own.property('a');
- * expect({a: 1}).to.have.property('b').but.not.own.property('b');
+ * expect({a: 1}).to.have.property('b');
+ * expect({a: 1}).to.not.have.own.property('b');
*
* expect({a: 1}).to.own.include({a: 1});
* expect({a: 1}).to.include({b: 2}).but.not.own.include({b: 2});
@@ -10121,7 +10184,6 @@ module.exports = function (chai, _) {
flag(this, 'all', false);
});
-
/**
* ### .all
*
@@ -10193,7 +10255,7 @@ module.exports = function (chai, _) {
* expect(1, 'nooo why fail??').to.be.a('string');
*
* `.a` can also be used as a language chain to improve the readability of
- * your assertions.
+ * your assertions.
*
* expect({b: 2}).to.have.a.property('b');
*
@@ -10307,7 +10369,7 @@ module.exports = function (chai, _) {
*
* expect('foobar').to.not.include('taco');
* expect([1, 2, 3]).to.not.include(4);
- *
+ *
* However, it's dangerous to negate `.include` when the target is an object.
* The problem is that it creates uncertain expectations by asserting that the
* target object doesn't have all of `val`'s key/value pairs but may or may
@@ -10380,7 +10442,7 @@ module.exports = function (chai, _) {
function include (val, msg) {
if (msg) flag(this, 'message', msg);
-
+
var obj = flag(this, 'object')
, objType = _.type(obj).toLowerCase()
, flagMsg = flag(this, 'message')
@@ -10453,17 +10515,17 @@ module.exports = function (chai, _) {
var props = Object.keys(val)
, firstErr = null
, numErrs = 0;
-
+
props.forEach(function (prop) {
var propAssertion = new Assertion(obj);
_.transferFlags(this, propAssertion, true);
flag(propAssertion, 'lockSsfi', true);
-
+
if (!negate || props.length === 1) {
propAssertion.property(prop, val[prop]);
return;
}
-
+
try {
propAssertion.property(prop, val[prop]);
} catch (err) {
@@ -10474,7 +10536,7 @@ module.exports = function (chai, _) {
numErrs++;
}
}, this);
-
+
// When validating .not.include with multiple properties, we only want
// to throw an assertion error if all of the properties are included,
// in which case we throw the first property assertion error that we
@@ -10500,9 +10562,9 @@ module.exports = function (chai, _) {
/**
* ### .ok
*
- * Asserts that the target is loosely (`==`) equal to `true`. However, it's
- * often best to assert that the target is strictly (`===`) or deeply equal to
- * its expected value.
+ * Asserts that the target is a truthy value (considered `true` in boolean context).
+ * However, it's often best to assert that the target is strictly (`===`) or
+ * deeply equal to its expected value.
*
* expect(1).to.equal(1); // Recommended
* expect(1).to.be.ok; // Not recommended
@@ -10886,7 +10948,7 @@ module.exports = function (chai, _) {
*
* expect(1).to.equal(1);
* expect('foo').to.equal('foo');
- *
+ *
* Add `.deep` earlier in the chain to use deep equality instead. See the
* `deep-eql` project page for info on the deep equality algorithm:
* https://github.com/chaijs/deep-eql.
@@ -10928,7 +10990,10 @@ module.exports = function (chai, _) {
if (msg) flag(this, 'message', msg);
var obj = flag(this, 'object');
if (flag(this, 'deep')) {
- return this.eql(val);
+ var prevLockSsfi = flag(this, 'lockSsfi');
+ flag(this, 'lockSsfi', true);
+ this.eql(val);
+ flag(this, 'lockSsfi', prevLockSsfi);
} else {
this.assert(
val === obj
@@ -11011,8 +11076,8 @@ module.exports = function (chai, _) {
* expect(2).to.equal(2); // Recommended
* expect(2).to.be.above(1); // Not recommended
*
- * Add `.lengthOf` earlier in the chain to assert that the value of the
- * target's `length` property is greater than the given number `n`.
+ * Add `.lengthOf` earlier in the chain to assert that the target's `length`
+ * or `size` is greater than the given number `n`.
*
* expect('foo').to.have.lengthOf(3); // Recommended
* expect('foo').to.have.lengthOf.above(2); // Not recommended
@@ -11053,12 +11118,13 @@ module.exports = function (chai, _) {
, ssfi = flag(this, 'ssfi')
, objType = _.type(obj).toLowerCase()
, nType = _.type(n).toLowerCase()
+ , errorMessage
, shouldThrow = true;
- if (doLength) {
+ if (doLength && objType !== 'map' && objType !== 'set') {
new Assertion(obj, flagMsg, ssfi, true).to.have.property('length');
}
-
+
if (!doLength && (objType === 'date' && nType !== 'date')) {
errorMessage = msgPrefix + 'the argument to above must be a date';
} else if (nType !== 'number' && (doLength || objType === 'number')) {
@@ -11075,13 +11141,20 @@ module.exports = function (chai, _) {
}
if (doLength) {
- var len = obj.length;
+ var descriptor = 'length'
+ , itemsCount;
+ if (objType === 'map' || objType === 'set') {
+ descriptor = 'size';
+ itemsCount = obj.size;
+ } else {
+ itemsCount = obj.length;
+ }
this.assert(
- len > n
- , 'expected #{this} to have a length above #{exp} but got #{act}'
- , 'expected #{this} to not have a length above #{exp}'
+ itemsCount > n
+ , 'expected #{this} to have a ' + descriptor + ' above #{exp} but got #{act}'
+ , 'expected #{this} to not have a ' + descriptor + ' above #{exp}'
, n
- , len
+ , itemsCount
);
} else {
this.assert(
@@ -11108,9 +11181,8 @@ module.exports = function (chai, _) {
* expect(2).to.be.at.least(1); // Not recommended
* expect(2).to.be.at.least(2); // Not recommended
*
- * Add `.lengthOf` earlier in the chain to assert that the value of the
- * target's `length` property is greater than or equal to the given number
- * `n`.
+ * Add `.lengthOf` earlier in the chain to assert that the target's `length`
+ * or `size` is greater than or equal to the given number `n`.
*
* expect('foo').to.have.lengthOf(3); // Recommended
* expect('foo').to.have.lengthOf.at.least(2); // Not recommended
@@ -11149,9 +11221,10 @@ module.exports = function (chai, _) {
, ssfi = flag(this, 'ssfi')
, objType = _.type(obj).toLowerCase()
, nType = _.type(n).toLowerCase()
+ , errorMessage
, shouldThrow = true;
- if (doLength) {
+ if (doLength && objType !== 'map' && objType !== 'set') {
new Assertion(obj, flagMsg, ssfi, true).to.have.property('length');
}
@@ -11171,13 +11244,20 @@ module.exports = function (chai, _) {
}
if (doLength) {
- var len = obj.length;
+ var descriptor = 'length'
+ , itemsCount;
+ if (objType === 'map' || objType === 'set') {
+ descriptor = 'size';
+ itemsCount = obj.size;
+ } else {
+ itemsCount = obj.length;
+ }
this.assert(
- len >= n
- , 'expected #{this} to have a length at least #{exp} but got #{act}'
- , 'expected #{this} to have a length below #{exp}'
+ itemsCount >= n
+ , 'expected #{this} to have a ' + descriptor + ' at least #{exp} but got #{act}'
+ , 'expected #{this} to have a ' + descriptor + ' below #{exp}'
, n
- , len
+ , itemsCount
);
} else {
this.assert(
@@ -11202,8 +11282,8 @@ module.exports = function (chai, _) {
* expect(1).to.equal(1); // Recommended
* expect(1).to.be.below(2); // Not recommended
*
- * Add `.lengthOf` earlier in the chain to assert that the value of the
- * target's `length` property is less than the given number `n`.
+ * Add `.lengthOf` earlier in the chain to assert that the target's `length`
+ * or `size` is less than the given number `n`.
*
* expect('foo').to.have.lengthOf(3); // Recommended
* expect('foo').to.have.lengthOf.below(4); // Not recommended
@@ -11244,9 +11324,10 @@ module.exports = function (chai, _) {
, ssfi = flag(this, 'ssfi')
, objType = _.type(obj).toLowerCase()
, nType = _.type(n).toLowerCase()
+ , errorMessage
, shouldThrow = true;
- if (doLength) {
+ if (doLength && objType !== 'map' && objType !== 'set') {
new Assertion(obj, flagMsg, ssfi, true).to.have.property('length');
}
@@ -11266,13 +11347,20 @@ module.exports = function (chai, _) {
}
if (doLength) {
- var len = obj.length;
+ var descriptor = 'length'
+ , itemsCount;
+ if (objType === 'map' || objType === 'set') {
+ descriptor = 'size';
+ itemsCount = obj.size;
+ } else {
+ itemsCount = obj.length;
+ }
this.assert(
- len < n
- , 'expected #{this} to have a length below #{exp} but got #{act}'
- , 'expected #{this} to not have a length below #{exp}'
+ itemsCount < n
+ , 'expected #{this} to have a ' + descriptor + ' below #{exp} but got #{act}'
+ , 'expected #{this} to not have a ' + descriptor + ' below #{exp}'
, n
- , len
+ , itemsCount
);
} else {
this.assert(
@@ -11299,8 +11387,8 @@ module.exports = function (chai, _) {
* expect(1).to.be.at.most(2); // Not recommended
* expect(1).to.be.at.most(1); // Not recommended
*
- * Add `.lengthOf` earlier in the chain to assert that the value of the
- * target's `length` property is less than or equal to the given number `n`.
+ * Add `.lengthOf` earlier in the chain to assert that the target's `length`
+ * or `size` is less than or equal to the given number `n`.
*
* expect('foo').to.have.lengthOf(3); // Recommended
* expect('foo').to.have.lengthOf.at.most(4); // Not recommended
@@ -11339,12 +11427,13 @@ module.exports = function (chai, _) {
, ssfi = flag(this, 'ssfi')
, objType = _.type(obj).toLowerCase()
, nType = _.type(n).toLowerCase()
+ , errorMessage
, shouldThrow = true;
- if (doLength) {
+ if (doLength && objType !== 'map' && objType !== 'set') {
new Assertion(obj, flagMsg, ssfi, true).to.have.property('length');
}
-
+
if (!doLength && (objType === 'date' && nType !== 'date')) {
errorMessage = msgPrefix + 'the argument to most must be a date';
} else if (nType !== 'number' && (doLength || objType === 'number')) {
@@ -11361,13 +11450,20 @@ module.exports = function (chai, _) {
}
if (doLength) {
- var len = obj.length;
+ var descriptor = 'length'
+ , itemsCount;
+ if (objType === 'map' || objType === 'set') {
+ descriptor = 'size';
+ itemsCount = obj.size;
+ } else {
+ itemsCount = obj.length;
+ }
this.assert(
- len <= n
- , 'expected #{this} to have a length at most #{exp} but got #{act}'
- , 'expected #{this} to have a length above #{exp}'
+ itemsCount <= n
+ , 'expected #{this} to have a ' + descriptor + ' at most #{exp} but got #{act}'
+ , 'expected #{this} to have a ' + descriptor + ' above #{exp}'
, n
- , len
+ , itemsCount
);
} else {
this.assert(
@@ -11395,9 +11491,9 @@ module.exports = function (chai, _) {
* expect(2).to.be.within(2, 3); // Not recommended
* expect(2).to.be.within(1, 2); // Not recommended
*
- * Add `.lengthOf` earlier in the chain to assert that the value of the
- * target's `length` property is greater than or equal to the given number
- * `start`, and less than or equal to the given number `finish`.
+ * Add `.lengthOf` earlier in the chain to assert that the target's `length`
+ * or `size` is greater than or equal to the given number `start`, and less
+ * than or equal to the given number `finish`.
*
* expect('foo').to.have.lengthOf(3); // Recommended
* expect('foo').to.have.lengthOf.within(2, 4); // Not recommended
@@ -11435,12 +11531,13 @@ module.exports = function (chai, _) {
, objType = _.type(obj).toLowerCase()
, startType = _.type(start).toLowerCase()
, finishType = _.type(finish).toLowerCase()
+ , errorMessage
, shouldThrow = true
, range = (startType === 'date' && finishType === 'date')
? start.toUTCString() + '..' + finish.toUTCString()
: start + '..' + finish;
- if (doLength) {
+ if (doLength && objType !== 'map' && objType !== 'set') {
new Assertion(obj, flagMsg, ssfi, true).to.have.property('length');
}
@@ -11460,11 +11557,18 @@ module.exports = function (chai, _) {
}
if (doLength) {
- var len = obj.length;
+ var descriptor = 'length'
+ , itemsCount;
+ if (objType === 'map' || objType === 'set') {
+ descriptor = 'size';
+ itemsCount = obj.size;
+ } else {
+ itemsCount = obj.length;
+ }
this.assert(
- len >= start && len <= finish
- , 'expected #{this} to have a length within ' + range
- , 'expected #{this} to not have a length within ' + range
+ itemsCount >= start && itemsCount <= finish
+ , 'expected #{this} to have a ' + descriptor + ' within ' + range
+ , 'expected #{this} to not have a ' + descriptor + ' within ' + range
);
} else {
this.assert(
@@ -11580,7 +11684,8 @@ module.exports = function (chai, _) {
*
* expect({a: 1}).to.have.own.property('a');
* expect({a: 1}).to.have.own.property('a', 1);
- * expect({a: 1}).to.have.property('b').but.not.own.property('b');
+ * expect({a: 1}).to.have.property('b');
+ * expect({a: 1}).to.not.have.own.property('b');
*
* `.deep` and `.own` can be combined.
*
@@ -11607,7 +11712,7 @@ module.exports = function (chai, _) {
* Add `.not` earlier in the chain to negate `.property`.
*
* expect({a: 1}).to.not.have.property('b');
- *
+ *
* However, it's dangerous to negate `.property` when providing `val`. The
* problem is that it creates uncertain expectations by asserting that the
* target either doesn't have a property with the given key `name`, or that it
@@ -11645,7 +11750,7 @@ module.exports = function (chai, _) {
*
* // Not recommended
* expect({a: 1}).to.have.property('b', undefined, 'nooo why fail??');
- *
+ *
* The above assertion isn't the same thing as not providing `val`. Instead,
* it's asserting that the target object has a `b` property that's equal to
* `undefined`.
@@ -11669,10 +11774,30 @@ module.exports = function (chai, _) {
, isOwn = flag(this, 'own')
, flagMsg = flag(this, 'message')
, obj = flag(this, 'object')
- , ssfi = flag(this, 'ssfi');
+ , ssfi = flag(this, 'ssfi')
+ , nameType = typeof name;
+
+ flagMsg = flagMsg ? flagMsg + ': ' : '';
+
+ if (isNested) {
+ if (nameType !== 'string') {
+ throw new AssertionError(
+ flagMsg + 'the argument to property must be a string when using nested syntax',
+ undefined,
+ ssfi
+ );
+ }
+ } else {
+ if (nameType !== 'string' && nameType !== 'number' && nameType !== 'symbol') {
+ throw new AssertionError(
+ flagMsg + 'the argument to property must be a string, number, or symbol',
+ undefined,
+ ssfi
+ );
+ }
+ }
if (isNested && isOwn) {
- flagMsg = flagMsg ? flagMsg + ': ' : '';
throw new AssertionError(
flagMsg + 'The "nested" and "own" flags cannot be combined.',
undefined,
@@ -11681,7 +11806,6 @@ module.exports = function (chai, _) {
}
if (obj === null || obj === undefined) {
- flagMsg = flagMsg ? flagMsg + ': ' : '';
throw new AssertionError(
flagMsg + 'Target cannot be null or undefined.',
undefined,
@@ -11764,7 +11888,7 @@ module.exports = function (chai, _) {
* Add `.not` earlier in the chain to negate `.ownPropertyDescriptor`.
*
* expect({a: 1}).to.not.have.ownPropertyDescriptor('b');
- *
+ *
* However, it's dangerous to negate `.ownPropertyDescriptor` when providing
* a `descriptor`. The problem is that it creates uncertain expectations by
* asserting that the target either doesn't have a property descriptor with
@@ -11835,7 +11959,7 @@ module.exports = function (chai, _) {
* writable: true,
* value: 2,
* });
- *
+ *
* // Recommended
* expect({a: 1}, 'nooo why fail??').to.have.ownPropertyDescriptor('b');
*
@@ -11892,11 +12016,13 @@ module.exports = function (chai, _) {
/**
* ### .lengthOf(n[, msg])
*
- * Asserts that the target's `length` property is equal to the given number
+ * Asserts that the target's `length` or `size` is equal to the given number
* `n`.
*
* expect([1, 2, 3]).to.have.lengthOf(3);
* expect('foo').to.have.lengthOf(3);
+ * expect(new Set([1, 2, 3])).to.have.lengthOf(3);
+ * expect(new Map([['a', 1], ['b', 2], ['c', 3]])).to.have.lengthOf(3);
*
* Add `.not` earlier in the chain to negate `.lengthOf`. However, it's often
* best to assert that the target's `length` property is equal to its expected
@@ -11952,17 +12078,29 @@ module.exports = function (chai, _) {
function assertLength (n, msg) {
if (msg) flag(this, 'message', msg);
var obj = flag(this, 'object')
+ , objType = _.type(obj).toLowerCase()
, flagMsg = flag(this, 'message')
- , ssfi = flag(this, 'ssfi');
- new Assertion(obj, flagMsg, ssfi, true).to.have.property('length');
- var len = obj.length;
+ , ssfi = flag(this, 'ssfi')
+ , descriptor = 'length'
+ , itemsCount;
+
+ switch (objType) {
+ case 'map':
+ case 'set':
+ descriptor = 'size';
+ itemsCount = obj.size;
+ break;
+ default:
+ new Assertion(obj, flagMsg, ssfi, true).to.have.property('length');
+ itemsCount = obj.length;
+ }
this.assert(
- len == n
- , 'expected #{this} to have a length of #{exp} but got #{act}'
- , 'expected #{this} to not have a length of #{act}'
+ itemsCount == n
+ , 'expected #{this} to have a ' + descriptor + ' of #{exp} but got #{act}'
+ , 'expected #{this} to not have a ' + descriptor + ' of #{act}'
, n
- , len
+ , itemsCount
);
}
@@ -12024,8 +12162,8 @@ module.exports = function (chai, _) {
* message to show when the assertion fails. The message can also be given as
* the second argument to `expect`.
*
- * expect('foobar').to.have.string(/taco/, 'nooo why fail??');
- * expect('foobar', 'nooo why fail??').to.have.string(/taco/);
+ * expect('foobar').to.have.string('taco', 'nooo why fail??');
+ * expect('foobar', 'nooo why fail??').to.have.string('taco');
*
* @name string
* @param {String} str
@@ -12052,7 +12190,7 @@ module.exports = function (chai, _) {
* ### .keys(key1[, key2[, ...]])
*
* Asserts that the target object, array, map, or set has the given keys. Only
- * the target's own inherited properties are included in the search.
+ * the target's own inherited properties are included in the search.
*
* When the target is an object or array, keys can be provided as one or more
* string arguments, a single array argument, or a single object argument. In
@@ -12160,6 +12298,7 @@ module.exports = function (chai, _) {
, isDeep = flag(this, 'deep')
, str
, deepStr = ''
+ , actual
, ok = true
, flagMsg = flag(this, 'message');
@@ -12176,7 +12315,6 @@ module.exports = function (chai, _) {
if (keysType !== 'Array') {
keys = Array.prototype.slice.call(arguments);
}
-
} else {
actual = _.getOwnEnumerableProperties(obj);
@@ -12209,8 +12347,7 @@ module.exports = function (chai, _) {
var len = keys.length
, any = flag(this, 'any')
, all = flag(this, 'all')
- , expected = keys
- , actual;
+ , expected = keys;
if (!any && !all) {
all = true;
@@ -12287,7 +12424,7 @@ module.exports = function (chai, _) {
*
* When no arguments are provided, `.throw` invokes the target function and
* asserts that an error is thrown.
- *
+ *
* var badFn = function () { throw new TypeError('Illegal salmon!'); };
*
* expect(badFn).to.throw();
@@ -12339,11 +12476,11 @@ module.exports = function (chai, _) {
* expect(badFn).to.throw(err, /salmon/);
*
* Add `.not` earlier in the chain to negate `.throw`.
- *
+ *
* var goodFn = function () {};
*
* expect(goodFn).to.not.throw();
- *
+ *
* However, it's dangerous to negate `.throw` when providing any arguments.
* The problem is that it creates uncertain expectations by asserting that the
* target either doesn't throw an error, or that it throws an error but of a
@@ -12691,7 +12828,7 @@ module.exports = function (chai, _) {
* first argument, and asserts that the value returned is truthy.
*
* expect(1).to.satisfy(function(num) {
- * return num > 0;
+ * return num > 0;
* });
*
* Add `.not` earlier in the chain to negate `.satisfy`.
@@ -12912,7 +13049,7 @@ module.exports = function (chai, _) {
var contains = flag(this, 'contains');
var ordered = flag(this, 'ordered');
- var subject, failMsg, failNegateMsg, lengthCheck;
+ var subject, failMsg, failNegateMsg;
if (contains) {
subject = ordered ? 'an ordered superset' : 'a superset';
@@ -12984,7 +13121,6 @@ module.exports = function (chai, _) {
Assertion.addMethod('oneOf', oneOf);
-
/**
* ### .change(subject[, prop[, msg]])
*
@@ -13160,7 +13296,7 @@ module.exports = function (chai, _) {
*
* expect(subtractTwo).to.decrease(myObj, 'val').by(2); // Recommended
* expect(subtractTwo).to.not.increase(myObj, 'val'); // Not recommended
- *
+ *
* When the subject is expected to stay the same, it's often best to assert
* exactly that.
*
@@ -13257,7 +13393,7 @@ module.exports = function (chai, _) {
*
* When two arguments are provided, `.decrease` asserts that the value of the
* given object `subject`'s `prop` property is lesser after invoking the
- * target function compared to beforehand.
+ * target function compared to beforehand.
*
* var myObj = {val: 1}
* , subtractTwo = function () { myObj.val -= 2; };
@@ -13279,7 +13415,7 @@ module.exports = function (chai, _) {
*
* expect(addTwo).to.increase(myObj, 'val').by(2); // Recommended
* expect(addTwo).to.not.decrease(myObj, 'val'); // Not recommended
- *
+ *
* When the subject is expected to stay the same, it's often best to assert
* exactly that.
*
@@ -13632,7 +13768,7 @@ module.exports = function (chai, _) {
var obj = flag(this, 'object');
this.assert(
- typeof obj === "number" && isFinite(obj)
+ typeof obj === 'number' && isFinite(obj)
, 'expected #{this} to be a finite number'
, 'expected #{this} to not be a finite number'
);
@@ -13646,9 +13782,7 @@ module.exports = function (chai, _) {
* MIT Licensed
*/
-
module.exports = function (chai, util) {
-
/*!
* Chai dependencies.
*/
@@ -13685,10 +13819,18 @@ module.exports = function (chai, util) {
};
/**
+ * ### .fail([message])
* ### .fail(actual, expected, [message], [operator])
*
* Throw a failure. Node.js `assert` module-compatible.
*
+ * assert.fail();
+ * assert.fail("custom error message");
+ * assert.fail(1, 2);
+ * assert.fail(1, 2, "custom error message");
+ * assert.fail(1, 2, "custom error message", ">");
+ * assert.fail(1, 2, undefined, ">");
+ *
* @name fail
* @param {Mixed} actual
* @param {Mixed} expected
@@ -13699,6 +13841,13 @@ module.exports = function (chai, util) {
*/
assert.fail = function (actual, expected, message, operator) {
+ if (arguments.length < 2) {
+ // Comply with Node's fail([message]) interface
+
+ message = actual;
+ actual = undefined;
+ }
+
message = message || 'assert.fail()';
throw new chai.AssertionError(message, {
actual: actual
@@ -14548,7 +14697,7 @@ module.exports = function (chai, util) {
* an array, the array is searched for an element that's strictly equal to the
* given value. When asserting a subset of properties in an object, the object
* is searched for the given property keys, checking that each one is present
- * and stricty equal to the given property value. For instance:
+ * and strictly equal to the given property value. For instance:
*
* var obj1 = {a: 1}
* , obj2 = {b: 2};
@@ -14575,8 +14724,8 @@ module.exports = function (chai, util) {
* the absence of a value in an array, a substring in a string, or a subset of
* properties in an object.
*
- * assert.notInclude([1,2,3], 4, 'array doesn't contain value');
- * assert.notInclude('foobar', 'baz', 'string doesn't contain substring');
+ * assert.notInclude([1,2,3], 4, "array doesn't contain value");
+ * assert.notInclude('foobar', 'baz', "string doesn't contain substring");
* assert.notInclude({ foo: 'bar', hello: 'universe' }, { foo: 'baz' }, 'object doesn't contain property');
*
* Strict equality (===) is used. When asserting the absence of a value in an
@@ -14656,24 +14805,24 @@ module.exports = function (chai, util) {
/**
* ### .nestedInclude(haystack, needle, [message])
- *
- * Asserts that 'haystack' includes 'needle'.
- * Can be used to assert the inclusion of a subset of properties in an
+ *
+ * Asserts that 'haystack' includes 'needle'.
+ * Can be used to assert the inclusion of a subset of properties in an
* object.
- * Enables the use of dot- and bracket-notation for referencing nested
+ * Enables the use of dot- and bracket-notation for referencing nested
* properties.
* '[]' and '.' in property names can be escaped using double backslashes.
- *
+ *
* assert.nestedInclude({'.a': {'b': 'x'}}, {'\\.a.[b]': 'x'});
* assert.nestedInclude({'a': {'[b]': 'x'}}, {'a.\\[b\\]': 'x'});
- *
+ *
* @name nestedInclude
* @param {Object} haystack
* @param {Object} needle
* @param {String} message
* @namespace Assert
- * @api public
- */
+ * @api public
+ */
assert.nestedInclude = function (exp, inc, msg) {
new Assertion(exp, msg, assert.nestedInclude, true).nested.include(inc);
@@ -14681,24 +14830,24 @@ module.exports = function (chai, util) {
/**
* ### .notNestedInclude(haystack, needle, [message])
- *
- * Asserts that 'haystack' does not include 'needle'.
- * Can be used to assert the absence of a subset of properties in an
+ *
+ * Asserts that 'haystack' does not include 'needle'.
+ * Can be used to assert the absence of a subset of properties in an
* object.
- * Enables the use of dot- and bracket-notation for referencing nested
- * properties.
+ * Enables the use of dot- and bracket-notation for referencing nested
+ * properties.
* '[]' and '.' in property names can be escaped using double backslashes.
- *
+ *
* assert.notNestedInclude({'.a': {'b': 'x'}}, {'\\.a.b': 'y'});
* assert.notNestedInclude({'a': {'[b]': 'x'}}, {'a.\\[b\\]': 'y'});
- *
+ *
* @name notNestedInclude
* @param {Object} haystack
* @param {Object} needle
* @param {String} message
* @namespace Assert
- * @api public
- */
+ * @api public
+ */
assert.notNestedInclude = function (exp, inc, msg) {
new Assertion(exp, msg, assert.notNestedInclude, true)
@@ -14707,23 +14856,23 @@ module.exports = function (chai, util) {
/**
* ### .deepNestedInclude(haystack, needle, [message])
- *
+ *
* Asserts that 'haystack' includes 'needle'.
- * Can be used to assert the inclusion of a subset of properties in an
+ * Can be used to assert the inclusion of a subset of properties in an
* object while checking for deep equality.
- * Enables the use of dot- and bracket-notation for referencing nested
+ * Enables the use of dot- and bracket-notation for referencing nested
* properties.
* '[]' and '.' in property names can be escaped using double backslashes.
- *
+ *
* assert.deepNestedInclude({a: {b: [{x: 1}]}}, {'a.b[0]': {x: 1}});
* assert.deepNestedInclude({'.a': {'[b]': {x: 1}}}, {'\\.a.\\[b\\]': {x: 1}});
- *
+ *
* @name deepNestedInclude
* @param {Object} haystack
* @param {Object} needle
* @param {String} message
* @namespace Assert
- * @api public
+ * @api public
*/
assert.deepNestedInclude = function(exp, inc, msg) {
@@ -14733,23 +14882,23 @@ module.exports = function (chai, util) {
/**
* ### .notDeepNestedInclude(haystack, needle, [message])
- *
+ *
* Asserts that 'haystack' does not include 'needle'.
- * Can be used to assert the absence of a subset of properties in an
+ * Can be used to assert the absence of a subset of properties in an
* object while checking for deep equality.
- * Enables the use of dot- and bracket-notation for referencing nested
+ * Enables the use of dot- and bracket-notation for referencing nested
* properties.
* '[]' and '.' in property names can be escaped using double backslashes.
- *
+ *
* assert.notDeepNestedInclude({a: {b: [{x: 1}]}}, {'a.b[0]': {y: 1}})
* assert.notDeepNestedInclude({'.a': {'[b]': {x: 1}}}, {'\\.a.\\[b\\]': {y: 2}});
- *
+ *
* @name notDeepNestedInclude
* @param {Object} haystack
* @param {Object} needle
* @param {String} message
* @namespace Assert
- * @api public
+ * @api public
*/
assert.notDeepNestedInclude = function(exp, inc, msg) {
@@ -14759,13 +14908,13 @@ module.exports = function (chai, util) {
/**
* ### .ownInclude(haystack, needle, [message])
- *
+ *
* Asserts that 'haystack' includes 'needle'.
- * Can be used to assert the inclusion of a subset of properties in an
+ * Can be used to assert the inclusion of a subset of properties in an
* object while ignoring inherited properties.
- *
+ *
* assert.ownInclude({ a: 1 }, { a: 1 });
- *
+ *
* @name ownInclude
* @param {Object} haystack
* @param {Object} needle
@@ -14780,15 +14929,15 @@ module.exports = function (chai, util) {
/**
* ### .notOwnInclude(haystack, needle, [message])
- *
+ *
* Asserts that 'haystack' includes 'needle'.
- * Can be used to assert the absence of a subset of properties in an
+ * Can be used to assert the absence of a subset of properties in an
* object while ignoring inherited properties.
- *
+ *
* Object.prototype.b = 2;
- *
+ *
* assert.notOwnInclude({ a: 1 }, { b: 2 });
- *
+ *
* @name notOwnInclude
* @param {Object} haystack
* @param {Object} needle
@@ -14803,13 +14952,13 @@ module.exports = function (chai, util) {
/**
* ### .deepOwnInclude(haystack, needle, [message])
- *
+ *
* Asserts that 'haystack' includes 'needle'.
- * Can be used to assert the inclusion of a subset of properties in an
+ * Can be used to assert the inclusion of a subset of properties in an
* object while ignoring inherited properties and checking for deep equality.
- *
+ *
* assert.deepOwnInclude({a: {b: 2}}, {a: {b: 2}});
- *
+ *
* @name deepOwnInclude
* @param {Object} haystack
* @param {Object} needle
@@ -14825,13 +14974,13 @@ module.exports = function (chai, util) {
/**
* ### .notDeepOwnInclude(haystack, needle, [message])
- *
+ *
* Asserts that 'haystack' includes 'needle'.
- * Can be used to assert the absence of a subset of properties in an
+ * Can be used to assert the absence of a subset of properties in an
* object while ignoring inherited properties and checking for deep equality.
- *
+ *
* assert.notDeepOwnInclude({a: {b: 2}}, {a: {c: 3}});
- *
+ *
* @name notDeepOwnInclude
* @param {Object} haystack
* @param {Object} needle
@@ -15293,10 +15442,12 @@ module.exports = function (chai, util) {
/**
* ### .lengthOf(object, length, [message])
*
- * Asserts that `object` has a `length` property with the expected value.
+ * Asserts that `object` has a `length` or `size` with the expected value.
*
* assert.lengthOf([1,2,3], 3, 'array has length of 3');
* assert.lengthOf('foobar', 6, 'string has length of 6');
+ * assert.lengthOf(new Set([1,2,3]), 3, 'set has size of 3');
+ * assert.lengthOf(new Map([['a',1],['b',2],['c',3]]), 3, 'map has size of 3');
*
* @name lengthOf
* @param {Mixed} object
@@ -15584,8 +15735,8 @@ module.exports = function (chai, util) {
* If `errMsgMatcher` is provided, it also asserts that the error thrown will have a
* message matching `errMsgMatcher`.
*
- * assert.throws(fn, 'function throws a reference error');
- * assert.throws(fn, /function throws a reference error/);
+ * assert.throws(fn, 'Error thrown must have this msg');
+ * assert.throws(fn, /Error thrown must have a msg that matches this/);
* assert.throws(fn, ReferenceError);
* assert.throws(fn, errorInstance);
* assert.throws(fn, ReferenceError, 'Error thrown must be a ReferenceError and have this msg');
@@ -16752,10 +16903,18 @@ module.exports = function (chai, util) {
};
/**
+ * ### .fail([message])
* ### .fail(actual, expected, [message], [operator])
*
* Throw a failure.
*
+ * expect.fail();
+ * expect.fail("custom error message");
+ * expect.fail(1, 2);
+ * expect.fail(1, 2, "custom error message");
+ * expect.fail(1, 2, "custom error message", ">");
+ * expect.fail(1, 2, undefined, ">");
+ *
* @name fail
* @param {Mixed} actual
* @param {Mixed} expected
@@ -16766,6 +16925,11 @@ module.exports = function (chai, util) {
*/
chai.expect.fail = function (actual, expected, message, operator) {
+ if (arguments.length < 2) {
+ message = actual;
+ actual = undefined;
+ }
+
message = message || 'expect.fail()';
throw new chai.AssertionError(message, {
actual: actual
@@ -16820,10 +16984,19 @@ module.exports = function (chai, util) {
var should = {};
/**
+ * ### .fail([message])
* ### .fail(actual, expected, [message], [operator])
*
* Throw a failure.
*
+ * should.fail();
+ * should.fail("custom error message");
+ * should.fail(1, 2);
+ * should.fail(1, 2, "custom error message");
+ * should.fail(1, 2, "custom error message", ">");
+ * should.fail(1, 2, undefined, ">");
+ *
+ *
* @name fail
* @param {Mixed} actual
* @param {Mixed} expected
@@ -16834,6 +17007,11 @@ module.exports = function (chai, util) {
*/
should.fail = function (actual, expected, message, operator) {
+ if (arguments.length < 2) {
+ message = actual;
+ actual = undefined;
+ }
+
message = message || 'should.fail()';
throw new chai.AssertionError(message, {
actual: actual
@@ -17136,8 +17314,6 @@ module.exports = function addChainableMethod(ctx, name, method, chainingBehavior
};
},{"../../chai":40,"./addLengthGuard":48,"./flag":53,"./proxify":68,"./transferFlags":70}],48:[function(require,module,exports){
-var config = require('../config');
-
var fnLengthDesc = Object.getOwnPropertyDescriptor(function () {}, 'length');
/*!
@@ -17199,7 +17375,7 @@ module.exports = function addLengthGuard (fn, assertionName, isChainable) {
return fn;
};
-},{"../config":42}],49:[function(require,module,exports){
+},{}],49:[function(require,module,exports){
/*!
* Chai - addMethod utility
* Copyright(c) 2012-2014 Jake Luer
@@ -17351,7 +17527,7 @@ module.exports = function addProperty(ctx, name, getter) {
*/
/*!
- * Module dependancies
+ * Module dependencies
*/
var inspect = require('./inspect');
@@ -17366,7 +17542,7 @@ var inspect = require('./inspect');
*
* @param {Mixed} first element to compare
* @param {Mixed} second element to compare
- * @returns {Number} -1 if 'a' should come before 'b'; otherwise 1
+ * @returns {Number} -1 if 'a' should come before 'b'; otherwise 1
* @name compareByInspect
* @namespace Utils
* @api public
@@ -17429,7 +17605,7 @@ module.exports = function expectTypes(obj, types) {
}
};
-},{"./flag":53,"assertion-error":36,"type-detect":532}],53:[function(require,module,exports){
+},{"./flag":53,"assertion-error":36,"type-detect":529}],53:[function(require,module,exports){
/*!
* Chai - flag utility
* Copyright(c) 2012-2014 Jake Luer
@@ -17522,12 +17698,11 @@ module.exports = function getEnumerableProperties(object) {
*/
/*!
- * Module dependancies
+ * Module dependencies
*/
var flag = require('./flag')
, getActual = require('./getActual')
- , inspect = require('./inspect')
, objDisplay = require('./objDisplay');
/**
@@ -17567,7 +17742,7 @@ module.exports = function getMessage(obj, args) {
return flagMsg ? flagMsg + ': ' + msg : msg;
};
-},{"./flag":53,"./getActual":54,"./inspect":61,"./objDisplay":64}],57:[function(require,module,exports){
+},{"./flag":53,"./getActual":54,"./objDisplay":64}],57:[function(require,module,exports){
/*!
* Chai - getOwnEnumerableProperties utility
* Copyright(c) 2011-2016 Jake Luer
@@ -17575,7 +17750,7 @@ module.exports = function getMessage(obj, args) {
*/
/*!
- * Module dependancies
+ * Module dependencies
*/
var getOwnEnumerablePropertySymbols = require('./getOwnEnumerablePropertySymbols');
@@ -17839,7 +18014,7 @@ exports.isProxyEnabled = require('./isProxyEnabled');
exports.isNaN = require('./isNaN');
-},{"./addChainableMethod":47,"./addLengthGuard":48,"./addMethod":49,"./addProperty":50,"./compareByInspect":51,"./expectTypes":52,"./flag":53,"./getActual":54,"./getMessage":56,"./getOwnEnumerableProperties":57,"./getOwnEnumerablePropertySymbols":58,"./inspect":61,"./isNaN":62,"./isProxyEnabled":63,"./objDisplay":64,"./overwriteChainableMethod":65,"./overwriteMethod":66,"./overwriteProperty":67,"./proxify":68,"./test":69,"./transferFlags":70,"check-error":71,"deep-eql":413,"get-func-name":496,"pathval":525,"type-detect":532}],61:[function(require,module,exports){
+},{"./addChainableMethod":47,"./addLengthGuard":48,"./addMethod":49,"./addProperty":50,"./compareByInspect":51,"./expectTypes":52,"./flag":53,"./getActual":54,"./getMessage":56,"./getOwnEnumerableProperties":57,"./getOwnEnumerablePropertySymbols":58,"./inspect":61,"./isNaN":62,"./isProxyEnabled":63,"./objDisplay":64,"./overwriteChainableMethod":65,"./overwriteMethod":66,"./overwriteProperty":67,"./proxify":68,"./test":69,"./transferFlags":70,"check-error":71,"deep-eql":414,"get-func-name":497,"pathval":521,"type-detect":529}],61:[function(require,module,exports){
// This is (almost) directly from Node.js utils
// https://github.com/joyent/node/blob/f8c335d0caf47f16d31413f89aa28eda3878e3aa/lib/util.js
@@ -17947,7 +18122,7 @@ function formatValue(ctx, value, recurseTimes) {
var name, nameSuffix;
- // Some type of object without properties can be shortcutted.
+ // Some type of object without properties can be shortcut.
// In IE, errors have a single `stack` property, or if they are vanilla `Error`,
// a `stack` plus `description` property; ignore those for consistency.
if (keys.length === 0 || (isError(value) && (
@@ -18038,7 +18213,6 @@ function formatValue(ctx, value, recurseTimes) {
return reduceToSingleString(output, base, braces);
}
-
function formatPrimitive(ctx, value) {
switch (typeof value) {
case 'undefined':
@@ -18068,12 +18242,10 @@ function formatPrimitive(ctx, value) {
}
}
-
function formatError(value) {
return '[' + Error.prototype.toString.call(value) + ']';
}
-
function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
var output = [];
for (var i = 0, l = value.length; i < l; ++i) {
@@ -18176,12 +18348,8 @@ function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
return name + ': ' + str;
}
-
function reduceToSingleString(output, base, braces) {
- var numLinesEst = 0;
var length = output.reduce(function(prev, cur) {
- numLinesEst++;
- if (cur.indexOf('\n') >= 0) numLinesEst++;
return prev + cur.length + 1;
}, 0);
@@ -18224,7 +18392,7 @@ function objectToString(o) {
return Object.prototype.toString.call(o);
}
-},{"../config":42,"./getEnumerableProperties":55,"./getProperties":59,"get-func-name":496}],62:[function(require,module,exports){
+},{"../config":42,"./getEnumerableProperties":55,"./getProperties":59,"get-func-name":497}],62:[function(require,module,exports){
/*!
* Chai - isNaN utility
* Copyright(c) 2012-2015 Sakthipriyan Vairamani
@@ -18273,7 +18441,7 @@ var config = require('../config');
*/
module.exports = function isProxyEnabled() {
- return config.useProxy &&
+ return config.useProxy &&
typeof Proxy !== 'undefined' &&
typeof Reflect !== 'undefined';
};
@@ -18286,7 +18454,7 @@ module.exports = function isProxyEnabled() {
*/
/*!
- * Module dependancies
+ * Module dependencies
*/
var inspect = require('./inspect');
@@ -18343,7 +18511,7 @@ var transferFlags = require('./transferFlags');
/**
* ### .overwriteChainableMethod(ctx, name, method, chainingBehavior)
*
- * Overwites an already existing chainable method
+ * Overwrites an already existing chainable method
* and provides access to the previous function or
* property. Must return functions to be used for
* name.
@@ -18417,7 +18585,7 @@ var transferFlags = require('./transferFlags');
/**
* ### .overwriteMethod(ctx, name, fn)
*
- * Overwites an already existing method and provides
+ * Overwrites an already existing method and provides
* access to previous function. Must return function
* to be used for name.
*
@@ -18510,7 +18678,7 @@ var transferFlags = require('./transferFlags');
/**
* ### .overwriteProperty(ctx, name, fn)
*
- * Overwites an already existing property getter and provides
+ * Overwrites an already existing property getter and provides
* access to previous value. Must return function to use as getter.
*
* utils.overwriteProperty(chai.Assertion.prototype, 'ok', function (_super) {
@@ -18610,7 +18778,7 @@ var isProxyEnabled = require('./isProxyEnabled');
* the list of existing properties. However, if a nonChainableMethodName is
* provided, then the root cause is instead a failure to invoke a non-chainable
* method prior to reading the non-existent property.
- *
+ *
* If proxies are unsupported or disabled via the user's Chai config, then
* return object without modification.
*
@@ -18641,19 +18809,31 @@ module.exports = function proxify(obj, nonChainableMethodName) {
nonChainableMethodName + '".');
}
- var orderedProperties = getProperties(target).filter(function(property) {
- return !Object.prototype.hasOwnProperty(property) &&
- builtins.indexOf(property) === -1;
- }).sort(function(a, b) {
- return stringDistance(property, a) - stringDistance(property, b);
+ // If the property is reasonably close to an existing Chai property,
+ // suggest that property to the user. Only suggest properties with a
+ // distance less than 4.
+ var suggestion = null;
+ var suggestionDistance = 4;
+ getProperties(target).forEach(function(prop) {
+ if (
+ !Object.prototype.hasOwnProperty(prop) &&
+ builtins.indexOf(prop) === -1
+ ) {
+ var dist = stringDistanceCapped(
+ property,
+ prop,
+ suggestionDistance
+ );
+ if (dist < suggestionDistance) {
+ suggestion = prop;
+ suggestionDistance = dist;
+ }
+ }
});
- if (orderedProperties.length &&
- stringDistance(orderedProperties[0], property) < 4) {
- // If the property is reasonably close to an existing Chai property,
- // suggest that property to the user.
+ if (suggestion !== null) {
throw Error('Invalid Chai property: ' + property +
- '. Did you mean "' + orderedProperties[0] + '"?');
+ '. Did you mean "' + suggestion + '"?');
} else {
throw Error('Invalid Chai property: ' + property);
}
@@ -18681,34 +18861,44 @@ module.exports = function proxify(obj, nonChainableMethodName) {
};
/**
- * # stringDistance(strA, strB)
- * Return the Levenshtein distance between two strings.
+ * # stringDistanceCapped(strA, strB, cap)
+ * Return the Levenshtein distance between two strings, but no more than cap.
* @param {string} strA
* @param {string} strB
- * @return {number} the string distance between strA and strB
+ * @param {number} number
+ * @return {number} min(string distance between strA and strB, cap)
* @api private
*/
-function stringDistance(strA, strB, memo) {
- if (!memo) {
- // `memo` is a two-dimensional array containing a cache of distances
- // memo[i][j] is the distance between strA.slice(0, i) and
- // strB.slice(0, j).
- memo = [];
- for (var i = 0; i <= strA.length; i++) {
- memo[i] = [];
- }
+function stringDistanceCapped(strA, strB, cap) {
+ if (Math.abs(strA.length - strB.length) >= cap) {
+ return cap;
}
- if (!memo[strA.length] || !memo[strA.length][strB.length]) {
- if (strA.length === 0 || strB.length === 0) {
- memo[strA.length][strB.length] = Math.max(strA.length, strB.length);
- } else {
- memo[strA.length][strB.length] = Math.min(
- stringDistance(strA.slice(0, -1), strB, memo) + 1,
- stringDistance(strA, strB.slice(0, -1), memo) + 1,
- stringDistance(strA.slice(0, -1), strB.slice(0, -1), memo) +
- (strA.slice(-1) === strB.slice(-1) ? 0 : 1)
+ var memo = [];
+ // `memo` is a two-dimensional array containing distances.
+ // memo[i][j] is the distance between strA.slice(0, i) and
+ // strB.slice(0, j).
+ for (var i = 0; i <= strA.length; i++) {
+ memo[i] = Array(strB.length + 1).fill(0);
+ memo[i][0] = i;
+ }
+ for (var j = 0; j < strB.length; j++) {
+ memo[0][j] = j;
+ }
+
+ for (var i = 1; i <= strA.length; i++) {
+ var ch = strA.charCodeAt(i - 1);
+ for (var j = 1; j <= strB.length; j++) {
+ if (Math.abs(i - j) >= cap) {
+ memo[i][j] = cap;
+ continue;
+ }
+ memo[i][j] = Math.min(
+ memo[i - 1][j] + 1,
+ memo[i][j - 1] + 1,
+ memo[i - 1][j - 1] +
+ (ch === strB.charCodeAt(j - 1) ? 0 : 1)
);
}
}
@@ -18724,7 +18914,7 @@ function stringDistance(strA, strB, memo) {
*/
/*!
- * Module dependancies
+ * Module dependencies
*/
var flag = require('./flag');
@@ -18765,7 +18955,7 @@ module.exports = function test(obj, args) {
* var newAssertion = new Assertion();
* utils.transferFlags(assertion, newAssertion);
*
- * var anotherAsseriton = new Assertion(myObj);
+ * var anotherAssertion = new Assertion(myObj);
* utils.transferFlags(assertion, anotherAssertion, false);
*
* @param {Assertion} assertion the assertion to transfer the flags from
@@ -19075,7 +19265,13 @@ function clone(parent, circular, depth, prototype, includeNonEnumerable) {
} else if (clone.__isDate(parent)) {
child = new Date(parent.getTime());
} else if (useBuffer && Buffer.isBuffer(parent)) {
- child = new Buffer(parent.length);
+ if (Buffer.allocUnsafe) {
+ // Node.js >= 4.5.0
+ child = Buffer.allocUnsafe(parent.length);
+ } else {
+ // Older Node.js versions
+ child = new Buffer(parent.length);
+ }
parent.copy(child);
return child;
} else if (_instanceof(parent, Error)) {
@@ -19240,7 +19436,7 @@ require('./modules/core.string.escape-html');
require('./modules/core.string.unescape-html');
module.exports = require('./modules/_core');
-},{"./modules/_core":94,"./modules/core.delay":201,"./modules/core.dict":202,"./modules/core.function.part":203,"./modules/core.get-iterator":205,"./modules/core.get-iterator-method":204,"./modules/core.is-iterable":206,"./modules/core.number.iterator":207,"./modules/core.object.classof":208,"./modules/core.object.define":209,"./modules/core.object.is-object":210,"./modules/core.object.make":211,"./modules/core.regexp.escape":212,"./modules/core.string.escape-html":213,"./modules/core.string.unescape-html":214,"./shim":411}],74:[function(require,module,exports){
+},{"./modules/_core":94,"./modules/core.delay":202,"./modules/core.dict":203,"./modules/core.function.part":204,"./modules/core.get-iterator":206,"./modules/core.get-iterator-method":205,"./modules/core.is-iterable":207,"./modules/core.number.iterator":208,"./modules/core.object.classof":209,"./modules/core.object.define":210,"./modules/core.object.is-object":211,"./modules/core.object.make":212,"./modules/core.regexp.escape":213,"./modules/core.string.escape-html":214,"./modules/core.string.unescape-html":215,"./shim":412}],74:[function(require,module,exports){
module.exports = function (it) {
if (typeof it != 'function') throw TypeError(it + ' is not a function!');
return it;
@@ -19262,7 +19458,7 @@ module.exports = function (key) {
ArrayProto[UNSCOPABLES][key] = true;
};
-},{"./_hide":113,"./_wks":200}],77:[function(require,module,exports){
+},{"./_hide":113,"./_wks":201}],77:[function(require,module,exports){
module.exports = function (it, Constructor, name, forbiddenField) {
if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {
throw TypeError(name + ': incorrect invocation!');
@@ -19449,7 +19645,7 @@ module.exports = function (original) {
} return C === undefined ? Array : C;
};
-},{"./_is-array":120,"./_is-object":122,"./_wks":200}],86:[function(require,module,exports){
+},{"./_is-array":120,"./_is-object":122,"./_wks":201}],86:[function(require,module,exports){
// 9.4.2.3 ArraySpeciesCreate(originalArray, length)
var speciesConstructor = require('./_array-species-constructor');
@@ -19509,7 +19705,7 @@ module.exports = function (it) {
: (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
};
-},{"./_cof":89,"./_wks":200}],89:[function(require,module,exports){
+},{"./_cof":89,"./_wks":201}],89:[function(require,module,exports){
var toString = {}.toString;
module.exports = function (it) {
@@ -19662,7 +19858,7 @@ module.exports = {
}
};
-},{"./_an-instance":77,"./_ctx":96,"./_descriptors":100,"./_for-of":110,"./_iter-define":126,"./_iter-step":128,"./_meta":137,"./_object-create":142,"./_object-dp":144,"./_redefine-all":165,"./_set-species":172,"./_validate-collection":197}],91:[function(require,module,exports){
+},{"./_an-instance":77,"./_ctx":96,"./_descriptors":100,"./_for-of":110,"./_iter-define":126,"./_iter-step":128,"./_meta":137,"./_object-create":142,"./_object-dp":144,"./_redefine-all":165,"./_set-species":172,"./_validate-collection":198}],91:[function(require,module,exports){
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
var classof = require('./_classof');
var from = require('./_array-from-iterable');
@@ -19760,7 +19956,7 @@ module.exports = {
ufstore: uncaughtFrozenStore
};
-},{"./_an-instance":77,"./_an-object":78,"./_array-methods":83,"./_for-of":110,"./_has":112,"./_is-object":122,"./_meta":137,"./_redefine-all":165,"./_validate-collection":197}],93:[function(require,module,exports){
+},{"./_an-instance":77,"./_an-object":78,"./_array-methods":83,"./_for-of":110,"./_has":112,"./_is-object":122,"./_meta":137,"./_redefine-all":165,"./_validate-collection":198}],93:[function(require,module,exports){
'use strict';
var global = require('./_global');
var $export = require('./_export');
@@ -19848,7 +20044,7 @@ module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) {
};
},{"./_an-instance":77,"./_export":104,"./_fails":106,"./_for-of":110,"./_global":111,"./_inherit-if-required":116,"./_is-object":122,"./_iter-detect":127,"./_meta":137,"./_redefine":166,"./_redefine-all":165,"./_set-to-string-tag":173}],94:[function(require,module,exports){
-var core = module.exports = { version: '2.5.1' };
+var core = module.exports = { version: '2.5.7' };
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
},{}],95:[function(require,module,exports){
@@ -20026,7 +20222,7 @@ module.exports = function (KEY) {
} return true;
};
-},{"./_wks":200}],106:[function(require,module,exports){
+},{"./_wks":201}],106:[function(require,module,exports){
module.exports = function (exec) {
try {
return !!exec();
@@ -20065,7 +20261,7 @@ module.exports = function (KEY, length, exec) {
}
};
-},{"./_defined":99,"./_fails":106,"./_hide":113,"./_redefine":166,"./_wks":200}],108:[function(require,module,exports){
+},{"./_defined":99,"./_fails":106,"./_hide":113,"./_redefine":166,"./_wks":201}],108:[function(require,module,exports){
'use strict';
// 21.2.5.3 get RegExp.prototype.flags
var anObject = require('./_an-object');
@@ -20121,7 +20317,7 @@ function flattenIntoArray(target, original, source, sourceLen, start, depth, map
module.exports = flattenIntoArray;
-},{"./_ctx":96,"./_is-array":120,"./_is-object":122,"./_to-length":190,"./_wks":200}],110:[function(require,module,exports){
+},{"./_ctx":96,"./_is-array":120,"./_is-object":122,"./_to-length":190,"./_wks":201}],110:[function(require,module,exports){
var ctx = require('./_ctx');
var call = require('./_iter-call');
var isArrayIter = require('./_is-array-iter');
@@ -20148,7 +20344,7 @@ var exports = module.exports = function (iterable, entries, fn, that, ITERATOR)
exports.BREAK = BREAK;
exports.RETURN = RETURN;
-},{"./_an-object":78,"./_ctx":96,"./_is-array-iter":119,"./_iter-call":124,"./_to-length":190,"./core.get-iterator-method":204}],111:[function(require,module,exports){
+},{"./_an-object":78,"./_ctx":96,"./_is-array-iter":119,"./_iter-call":124,"./_to-length":190,"./core.get-iterator-method":205}],111:[function(require,module,exports){
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
var global = module.exports = typeof window != 'undefined' && window.Math == Math
? window : typeof self != 'undefined' && self.Math == Math ? self
@@ -20228,7 +20424,7 @@ module.exports = function (it) {
return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
};
-},{"./_iterators":129,"./_wks":200}],120:[function(require,module,exports){
+},{"./_iterators":129,"./_wks":201}],120:[function(require,module,exports){
// 7.2.2 IsArray(argument)
var cof = require('./_cof');
module.exports = Array.isArray || function isArray(arg) {
@@ -20258,7 +20454,7 @@ module.exports = function (it) {
return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');
};
-},{"./_cof":89,"./_is-object":122,"./_wks":200}],124:[function(require,module,exports){
+},{"./_cof":89,"./_is-object":122,"./_wks":201}],124:[function(require,module,exports){
// call something on iterator step with safe closing on error
var anObject = require('./_an-object');
module.exports = function (iterator, fn, value, entries) {
@@ -20287,13 +20483,12 @@ module.exports = function (Constructor, NAME, next) {
setToStringTag(Constructor, NAME + ' Iterator');
};
-},{"./_hide":113,"./_object-create":142,"./_property-desc":164,"./_set-to-string-tag":173,"./_wks":200}],126:[function(require,module,exports){
+},{"./_hide":113,"./_object-create":142,"./_property-desc":164,"./_set-to-string-tag":173,"./_wks":201}],126:[function(require,module,exports){
'use strict';
var LIBRARY = require('./_library');
var $export = require('./_export');
var redefine = require('./_redefine');
var hide = require('./_hide');
-var has = require('./_has');
var Iterators = require('./_iterators');
var $iterCreate = require('./_iter-create');
var setToStringTag = require('./_set-to-string-tag');
@@ -20331,7 +20526,7 @@ module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCE
// Set @@toStringTag to native iterators
setToStringTag(IteratorPrototype, TAG, true);
// fix for some old engines
- if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);
+ if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);
}
}
// fix Array#{values, @@iterator}.name in V8 / FF
@@ -20359,7 +20554,7 @@ module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCE
return methods;
};
-},{"./_export":104,"./_has":112,"./_hide":113,"./_iter-create":125,"./_iterators":129,"./_library":131,"./_object-gpo":151,"./_redefine":166,"./_set-to-string-tag":173,"./_wks":200}],127:[function(require,module,exports){
+},{"./_export":104,"./_hide":113,"./_iter-create":125,"./_iterators":129,"./_library":131,"./_object-gpo":151,"./_redefine":166,"./_set-to-string-tag":173,"./_wks":201}],127:[function(require,module,exports){
var ITERATOR = require('./_wks')('iterator');
var SAFE_CLOSING = false;
@@ -20383,7 +20578,7 @@ module.exports = function (exec, skipClosing) {
return safe;
};
-},{"./_wks":200}],128:[function(require,module,exports){
+},{"./_wks":201}],128:[function(require,module,exports){
module.exports = function (done, value) {
return { value: value, done: !!done };
};
@@ -20584,7 +20779,7 @@ module.exports = {
exp: exp
};
-},{"./_export":104,"./_shared":175,"./es6.map":244,"./es6.weak-map":350}],139:[function(require,module,exports){
+},{"./_export":104,"./_shared":175,"./es6.map":245,"./es6.weak-map":351}],139:[function(require,module,exports){
var global = require('./_global');
var macrotask = require('./_task').set;
var Observer = global.MutationObserver || global.WebKitMutationObserver;
@@ -20617,8 +20812,8 @@ module.exports = function () {
notify = function () {
process.nextTick(flush);
};
- // browsers with MutationObserver
- } else if (Observer) {
+ // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339
+ } else if (Observer && !(global.navigator && global.navigator.standalone)) {
var toggle = true;
var node = document.createTextNode('');
new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new
@@ -20627,7 +20822,8 @@ module.exports = function () {
};
// environments with maybe non-completely correct, but existent Promise
} else if (Promise && Promise.resolve) {
- var promise = Promise.resolve();
+ // Promise.resolve without an argument throws an error in LG WebOS 2
+ var promise = Promise.resolve(undefined);
notify = function () {
promise.then(flush);
};
@@ -20980,7 +21176,7 @@ var aFunction = require('./_a-function');
module.exports = function (/* ...pargs */) {
var fn = aFunction(this);
var length = arguments.length;
- var pargs = Array(length);
+ var pargs = new Array(length);
var i = 0;
var _ = path._;
var holder = false;
@@ -21130,7 +21326,7 @@ var $export = require('./_export');
module.exports = function (COLLECTION) {
$export($export.S, COLLECTION, { of: function of() {
var length = arguments.length;
- var A = Array(length);
+ var A = new Array(length);
while (length--) A[length] = arguments[length];
return new this(A);
} });
@@ -21178,7 +21374,7 @@ module.exports = function (KEY) {
});
};
-},{"./_descriptors":100,"./_global":111,"./_object-dp":144,"./_wks":200}],173:[function(require,module,exports){
+},{"./_descriptors":100,"./_global":111,"./_object-dp":144,"./_wks":201}],173:[function(require,module,exports){
var def = require('./_object-dp').f;
var has = require('./_has');
var TAG = require('./_wks')('toStringTag');
@@ -21187,7 +21383,7 @@ module.exports = function (it, tag, stat) {
if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
};
-},{"./_has":112,"./_object-dp":144,"./_wks":200}],174:[function(require,module,exports){
+},{"./_has":112,"./_object-dp":144,"./_wks":201}],174:[function(require,module,exports){
var shared = require('./_shared')('keys');
var uid = require('./_uid');
module.exports = function (key) {
@@ -21195,14 +21391,20 @@ module.exports = function (key) {
};
},{"./_shared":175,"./_uid":196}],175:[function(require,module,exports){
+var core = require('./_core');
var global = require('./_global');
var SHARED = '__core-js_shared__';
var store = global[SHARED] || (global[SHARED] = {});
-module.exports = function (key) {
- return store[key] || (store[key] = {});
-};
-},{"./_global":111}],176:[function(require,module,exports){
+(module.exports = function (key, value) {
+ return store[key] || (store[key] = value !== undefined ? value : {});
+})('versions', []).push({
+ version: core.version,
+ mode: require('./_library') ? 'pure' : 'global',
+ copyright: '© 2018 Denis Pushkarev (zloirock.ru)'
+});
+
+},{"./_core":94,"./_global":111,"./_library":131}],176:[function(require,module,exports){
// 7.3.20 SpeciesConstructor(O, defaultConstructor)
var anObject = require('./_an-object');
var aFunction = require('./_a-function');
@@ -21213,7 +21415,7 @@ module.exports = function (O, D) {
return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);
};
-},{"./_a-function":74,"./_an-object":78,"./_wks":200}],177:[function(require,module,exports){
+},{"./_a-function":74,"./_an-object":78,"./_wks":201}],177:[function(require,module,exports){
'use strict';
var fails = require('./_fails');
@@ -21976,7 +22178,7 @@ if (require('./_descriptors')) {
};
} else module.exports = function () { /* empty */ };
-},{"./_an-instance":77,"./_array-copy-within":79,"./_array-fill":80,"./_array-includes":82,"./_array-methods":83,"./_classof":88,"./_ctx":96,"./_descriptors":100,"./_export":104,"./_fails":106,"./_global":111,"./_has":112,"./_hide":113,"./_is-array-iter":119,"./_is-object":122,"./_iter-detect":127,"./_iterators":129,"./_library":131,"./_object-create":142,"./_object-dp":144,"./_object-gopd":147,"./_object-gopn":149,"./_object-gpo":151,"./_property-desc":164,"./_redefine-all":165,"./_set-species":172,"./_species-constructor":176,"./_to-absolute-index":186,"./_to-index":187,"./_to-integer":188,"./_to-length":190,"./_to-object":191,"./_to-primitive":192,"./_typed":195,"./_typed-buffer":194,"./_uid":196,"./_wks":200,"./core.get-iterator-method":204,"./es6.array.iterator":225}],194:[function(require,module,exports){
+},{"./_an-instance":77,"./_array-copy-within":79,"./_array-fill":80,"./_array-includes":82,"./_array-methods":83,"./_classof":88,"./_ctx":96,"./_descriptors":100,"./_export":104,"./_fails":106,"./_global":111,"./_has":112,"./_hide":113,"./_is-array-iter":119,"./_is-object":122,"./_iter-detect":127,"./_iterators":129,"./_library":131,"./_object-create":142,"./_object-dp":144,"./_object-gopd":147,"./_object-gopn":149,"./_object-gpo":151,"./_property-desc":164,"./_redefine-all":165,"./_set-species":172,"./_species-constructor":176,"./_to-absolute-index":186,"./_to-index":187,"./_to-integer":188,"./_to-length":190,"./_to-object":191,"./_to-primitive":192,"./_typed":195,"./_typed-buffer":194,"./_uid":196,"./_wks":201,"./core.get-iterator-method":205,"./es6.array.iterator":226}],194:[function(require,module,exports){
'use strict';
var global = require('./_global');
var DESCRIPTORS = require('./_descriptors');
@@ -22019,7 +22221,7 @@ var $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET;
// IEEE754 conversions based on https://github.com/feross/ieee754
function packIEEE754(value, mLen, nBytes) {
- var buffer = Array(nBytes);
+ var buffer = new Array(nBytes);
var eLen = nBytes * 8 - mLen - 1;
var eMax = (1 << eLen) - 1;
var eBias = eMax >> 1;
@@ -22137,7 +22339,7 @@ if (!$typed.ABV) {
$ArrayBuffer = function ArrayBuffer(length) {
anInstance(this, $ArrayBuffer, ARRAY_BUFFER);
var byteLength = toIndex(length);
- this._b = arrayFill.call(Array(byteLength), 0);
+ this._b = arrayFill.call(new Array(byteLength), 0);
this[$LENGTH] = byteLength;
};
@@ -22292,13 +22494,19 @@ module.exports = function (key) {
};
},{}],197:[function(require,module,exports){
+var global = require('./_global');
+var navigator = global.navigator;
+
+module.exports = navigator && navigator.userAgent || '';
+
+},{"./_global":111}],198:[function(require,module,exports){
var isObject = require('./_is-object');
module.exports = function (it, TYPE) {
if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!');
return it;
};
-},{"./_is-object":122}],198:[function(require,module,exports){
+},{"./_is-object":122}],199:[function(require,module,exports){
var global = require('./_global');
var core = require('./_core');
var LIBRARY = require('./_library');
@@ -22309,10 +22517,10 @@ module.exports = function (name) {
if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
};
-},{"./_core":94,"./_global":111,"./_library":131,"./_object-dp":144,"./_wks-ext":199}],199:[function(require,module,exports){
+},{"./_core":94,"./_global":111,"./_library":131,"./_object-dp":144,"./_wks-ext":200}],200:[function(require,module,exports){
exports.f = require('./_wks');
-},{"./_wks":200}],200:[function(require,module,exports){
+},{"./_wks":201}],201:[function(require,module,exports){
var store = require('./_shared')('wks');
var uid = require('./_uid');
var Symbol = require('./_global').Symbol;
@@ -22325,7 +22533,7 @@ var $exports = module.exports = function (name) {
$exports.store = store;
-},{"./_global":111,"./_shared":175,"./_uid":196}],201:[function(require,module,exports){
+},{"./_global":111,"./_shared":175,"./_uid":196}],202:[function(require,module,exports){
var global = require('./_global');
var core = require('./_core');
var $export = require('./_export');
@@ -22339,7 +22547,7 @@ $export($export.G + $export.F, {
}
});
-},{"./_core":94,"./_export":104,"./_global":111,"./_partial":160}],202:[function(require,module,exports){
+},{"./_core":94,"./_export":104,"./_global":111,"./_partial":160}],203:[function(require,module,exports){
'use strict';
var ctx = require('./_ctx');
var $export = require('./_export');
@@ -22498,7 +22706,7 @@ $export($export.S, 'Dict', {
isDict: isDict
});
-},{"./_a-function":74,"./_ctx":96,"./_descriptors":100,"./_export":104,"./_for-of":110,"./_has":112,"./_is-object":122,"./_iter-create":125,"./_iter-step":128,"./_keyof":130,"./_object-assign":141,"./_object-create":142,"./_object-dp":144,"./_object-gpo":151,"./_object-keys":153,"./_property-desc":164,"./_to-iobject":189,"./core.is-iterable":206}],203:[function(require,module,exports){
+},{"./_a-function":74,"./_ctx":96,"./_descriptors":100,"./_export":104,"./_for-of":110,"./_has":112,"./_is-object":122,"./_iter-create":125,"./_iter-step":128,"./_keyof":130,"./_object-assign":141,"./_object-create":142,"./_object-dp":144,"./_object-gpo":151,"./_object-keys":153,"./_property-desc":164,"./_to-iobject":189,"./core.is-iterable":207}],204:[function(require,module,exports){
var path = require('./_path');
var $export = require('./_export');
@@ -22507,7 +22715,7 @@ require('./_core')._ = path._ = path._ || {};
$export($export.P + $export.F, 'Function', { part: require('./_partial') });
-},{"./_core":94,"./_export":104,"./_partial":160,"./_path":161}],204:[function(require,module,exports){
+},{"./_core":94,"./_export":104,"./_partial":160,"./_path":161}],205:[function(require,module,exports){
var classof = require('./_classof');
var ITERATOR = require('./_wks')('iterator');
var Iterators = require('./_iterators');
@@ -22517,7 +22725,7 @@ module.exports = require('./_core').getIteratorMethod = function (it) {
|| Iterators[classof(it)];
};
-},{"./_classof":88,"./_core":94,"./_iterators":129,"./_wks":200}],205:[function(require,module,exports){
+},{"./_classof":88,"./_core":94,"./_iterators":129,"./_wks":201}],206:[function(require,module,exports){
var anObject = require('./_an-object');
var get = require('./core.get-iterator-method');
module.exports = require('./_core').getIterator = function (it) {
@@ -22526,7 +22734,7 @@ module.exports = require('./_core').getIterator = function (it) {
return anObject(iterFn.call(it));
};
-},{"./_an-object":78,"./_core":94,"./core.get-iterator-method":204}],206:[function(require,module,exports){
+},{"./_an-object":78,"./_core":94,"./core.get-iterator-method":205}],207:[function(require,module,exports){
var classof = require('./_classof');
var ITERATOR = require('./_wks')('iterator');
var Iterators = require('./_iterators');
@@ -22538,7 +22746,7 @@ module.exports = require('./_core').isIterable = function (it) {
|| Iterators.hasOwnProperty(classof(O));
};
-},{"./_classof":88,"./_core":94,"./_iterators":129,"./_wks":200}],207:[function(require,module,exports){
+},{"./_classof":88,"./_core":94,"./_iterators":129,"./_wks":201}],208:[function(require,module,exports){
'use strict';
require('./_iter-define')(Number, 'Number', function (iterated) {
this._l = +iterated;
@@ -22549,23 +22757,23 @@ require('./_iter-define')(Number, 'Number', function (iterated) {
return { done: done, value: done ? undefined : i };
});
-},{"./_iter-define":126}],208:[function(require,module,exports){
+},{"./_iter-define":126}],209:[function(require,module,exports){
var $export = require('./_export');
$export($export.S + $export.F, 'Object', { classof: require('./_classof') });
-},{"./_classof":88,"./_export":104}],209:[function(require,module,exports){
+},{"./_classof":88,"./_export":104}],210:[function(require,module,exports){
var $export = require('./_export');
var define = require('./_object-define');
$export($export.S + $export.F, 'Object', { define: define });
-},{"./_export":104,"./_object-define":143}],210:[function(require,module,exports){
+},{"./_export":104,"./_object-define":143}],211:[function(require,module,exports){
var $export = require('./_export');
$export($export.S + $export.F, 'Object', { isObject: require('./_is-object') });
-},{"./_export":104,"./_is-object":122}],211:[function(require,module,exports){
+},{"./_export":104,"./_is-object":122}],212:[function(require,module,exports){
var $export = require('./_export');
var define = require('./_object-define');
var create = require('./_object-create');
@@ -22576,14 +22784,14 @@ $export($export.S + $export.F, 'Object', {
}
});
-},{"./_export":104,"./_object-create":142,"./_object-define":143}],212:[function(require,module,exports){
+},{"./_export":104,"./_object-create":142,"./_object-define":143}],213:[function(require,module,exports){
// https://github.com/benjamingr/RexExp.escape
var $export = require('./_export');
var $re = require('./_replacer')(/[\\^$*+?.()|[\]{}]/g, '\\$&');
$export($export.S, 'RegExp', { escape: function escape(it) { return $re(it); } });
-},{"./_export":104,"./_replacer":167}],213:[function(require,module,exports){
+},{"./_export":104,"./_replacer":167}],214:[function(require,module,exports){
'use strict';
var $export = require('./_export');
var $re = require('./_replacer')(/[&<>"']/g, {
@@ -22596,7 +22804,7 @@ var $re = require('./_replacer')(/[&<>"']/g, {
$export($export.P + $export.F, 'String', { escapeHTML: function escapeHTML() { return $re(this); } });
-},{"./_export":104,"./_replacer":167}],214:[function(require,module,exports){
+},{"./_export":104,"./_replacer":167}],215:[function(require,module,exports){
'use strict';
var $export = require('./_export');
var $re = require('./_replacer')(/&(?:amp|lt|gt|quot|apos);/g, {
@@ -22609,7 +22817,7 @@ var $re = require('./_replacer')(/&(?:amp|lt|gt|quot|apos);/g, {
$export($export.P + $export.F, 'String', { unescapeHTML: function unescapeHTML() { return $re(this); } });
-},{"./_export":104,"./_replacer":167}],215:[function(require,module,exports){
+},{"./_export":104,"./_replacer":167}],216:[function(require,module,exports){
// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
var $export = require('./_export');
@@ -22617,7 +22825,7 @@ $export($export.P, 'Array', { copyWithin: require('./_array-copy-within') });
require('./_add-to-unscopables')('copyWithin');
-},{"./_add-to-unscopables":76,"./_array-copy-within":79,"./_export":104}],216:[function(require,module,exports){
+},{"./_add-to-unscopables":76,"./_array-copy-within":79,"./_export":104}],217:[function(require,module,exports){
'use strict';
var $export = require('./_export');
var $every = require('./_array-methods')(4);
@@ -22629,7 +22837,7 @@ $export($export.P + $export.F * !require('./_strict-method')([].every, true), 'A
}
});
-},{"./_array-methods":83,"./_export":104,"./_strict-method":177}],217:[function(require,module,exports){
+},{"./_array-methods":83,"./_export":104,"./_strict-method":177}],218:[function(require,module,exports){
// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
var $export = require('./_export');
@@ -22637,7 +22845,7 @@ $export($export.P, 'Array', { fill: require('./_array-fill') });
require('./_add-to-unscopables')('fill');
-},{"./_add-to-unscopables":76,"./_array-fill":80,"./_export":104}],218:[function(require,module,exports){
+},{"./_add-to-unscopables":76,"./_array-fill":80,"./_export":104}],219:[function(require,module,exports){
'use strict';
var $export = require('./_export');
var $filter = require('./_array-methods')(2);
@@ -22649,7 +22857,7 @@ $export($export.P + $export.F * !require('./_strict-method')([].filter, true), '
}
});
-},{"./_array-methods":83,"./_export":104,"./_strict-method":177}],219:[function(require,module,exports){
+},{"./_array-methods":83,"./_export":104,"./_strict-method":177}],220:[function(require,module,exports){
'use strict';
// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined)
var $export = require('./_export');
@@ -22665,7 +22873,7 @@ $export($export.P + $export.F * forced, 'Array', {
});
require('./_add-to-unscopables')(KEY);
-},{"./_add-to-unscopables":76,"./_array-methods":83,"./_export":104}],220:[function(require,module,exports){
+},{"./_add-to-unscopables":76,"./_array-methods":83,"./_export":104}],221:[function(require,module,exports){
'use strict';
// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)
var $export = require('./_export');
@@ -22681,7 +22889,7 @@ $export($export.P + $export.F * forced, 'Array', {
});
require('./_add-to-unscopables')(KEY);
-},{"./_add-to-unscopables":76,"./_array-methods":83,"./_export":104}],221:[function(require,module,exports){
+},{"./_add-to-unscopables":76,"./_array-methods":83,"./_export":104}],222:[function(require,module,exports){
'use strict';
var $export = require('./_export');
var $forEach = require('./_array-methods')(0);
@@ -22694,7 +22902,7 @@ $export($export.P + $export.F * !STRICT, 'Array', {
}
});
-},{"./_array-methods":83,"./_export":104,"./_strict-method":177}],222:[function(require,module,exports){
+},{"./_array-methods":83,"./_export":104,"./_strict-method":177}],223:[function(require,module,exports){
'use strict';
var ctx = require('./_ctx');
var $export = require('./_export');
@@ -22733,7 +22941,7 @@ $export($export.S + $export.F * !require('./_iter-detect')(function (iter) { Arr
}
});
-},{"./_create-property":95,"./_ctx":96,"./_export":104,"./_is-array-iter":119,"./_iter-call":124,"./_iter-detect":127,"./_to-length":190,"./_to-object":191,"./core.get-iterator-method":204}],223:[function(require,module,exports){
+},{"./_create-property":95,"./_ctx":96,"./_export":104,"./_is-array-iter":119,"./_iter-call":124,"./_iter-detect":127,"./_to-length":190,"./_to-object":191,"./core.get-iterator-method":205}],224:[function(require,module,exports){
'use strict';
var $export = require('./_export');
var $indexOf = require('./_array-includes')(false);
@@ -22750,13 +22958,13 @@ $export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($
}
});
-},{"./_array-includes":82,"./_export":104,"./_strict-method":177}],224:[function(require,module,exports){
+},{"./_array-includes":82,"./_export":104,"./_strict-method":177}],225:[function(require,module,exports){
// 22.1.2.2 / 15.4.3.2 Array.isArray(arg)
var $export = require('./_export');
$export($export.S, 'Array', { isArray: require('./_is-array') });
-},{"./_export":104,"./_is-array":120}],225:[function(require,module,exports){
+},{"./_export":104,"./_is-array":120}],226:[function(require,module,exports){
'use strict';
var addToUnscopables = require('./_add-to-unscopables');
var step = require('./_iter-step');
@@ -22792,7 +23000,7 @@ addToUnscopables('keys');
addToUnscopables('values');
addToUnscopables('entries');
-},{"./_add-to-unscopables":76,"./_iter-define":126,"./_iter-step":128,"./_iterators":129,"./_to-iobject":189}],226:[function(require,module,exports){
+},{"./_add-to-unscopables":76,"./_iter-define":126,"./_iter-step":128,"./_iterators":129,"./_to-iobject":189}],227:[function(require,module,exports){
'use strict';
// 22.1.3.13 Array.prototype.join(separator)
var $export = require('./_export');
@@ -22806,7 +23014,7 @@ $export($export.P + $export.F * (require('./_iobject') != Object || !require('./
}
});
-},{"./_export":104,"./_iobject":118,"./_strict-method":177,"./_to-iobject":189}],227:[function(require,module,exports){
+},{"./_export":104,"./_iobject":118,"./_strict-method":177,"./_to-iobject":189}],228:[function(require,module,exports){
'use strict';
var $export = require('./_export');
var toIObject = require('./_to-iobject');
@@ -22830,7 +23038,7 @@ $export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($
}
});
-},{"./_export":104,"./_strict-method":177,"./_to-integer":188,"./_to-iobject":189,"./_to-length":190}],228:[function(require,module,exports){
+},{"./_export":104,"./_strict-method":177,"./_to-integer":188,"./_to-iobject":189,"./_to-length":190}],229:[function(require,module,exports){
'use strict';
var $export = require('./_export');
var $map = require('./_array-methods')(1);
@@ -22842,7 +23050,7 @@ $export($export.P + $export.F * !require('./_strict-method')([].map, true), 'Arr
}
});
-},{"./_array-methods":83,"./_export":104,"./_strict-method":177}],229:[function(require,module,exports){
+},{"./_array-methods":83,"./_export":104,"./_strict-method":177}],230:[function(require,module,exports){
'use strict';
var $export = require('./_export');
var createProperty = require('./_create-property');
@@ -22863,7 +23071,7 @@ $export($export.S + $export.F * require('./_fails')(function () {
}
});
-},{"./_create-property":95,"./_export":104,"./_fails":106}],230:[function(require,module,exports){
+},{"./_create-property":95,"./_export":104,"./_fails":106}],231:[function(require,module,exports){
'use strict';
var $export = require('./_export');
var $reduce = require('./_array-reduce');
@@ -22875,7 +23083,7 @@ $export($export.P + $export.F * !require('./_strict-method')([].reduceRight, tru
}
});
-},{"./_array-reduce":84,"./_export":104,"./_strict-method":177}],231:[function(require,module,exports){
+},{"./_array-reduce":84,"./_export":104,"./_strict-method":177}],232:[function(require,module,exports){
'use strict';
var $export = require('./_export');
var $reduce = require('./_array-reduce');
@@ -22887,7 +23095,7 @@ $export($export.P + $export.F * !require('./_strict-method')([].reduce, true), '
}
});
-},{"./_array-reduce":84,"./_export":104,"./_strict-method":177}],232:[function(require,module,exports){
+},{"./_array-reduce":84,"./_export":104,"./_strict-method":177}],233:[function(require,module,exports){
'use strict';
var $export = require('./_export');
var html = require('./_html');
@@ -22908,7 +23116,7 @@ $export($export.P + $export.F * require('./_fails')(function () {
var start = toAbsoluteIndex(begin, len);
var upTo = toAbsoluteIndex(end, len);
var size = toLength(upTo - start);
- var cloned = Array(size);
+ var cloned = new Array(size);
var i = 0;
for (; i < size; i++) cloned[i] = klass == 'String'
? this.charAt(start + i)
@@ -22917,7 +23125,7 @@ $export($export.P + $export.F * require('./_fails')(function () {
}
});
-},{"./_cof":89,"./_export":104,"./_fails":106,"./_html":114,"./_to-absolute-index":186,"./_to-length":190}],233:[function(require,module,exports){
+},{"./_cof":89,"./_export":104,"./_fails":106,"./_html":114,"./_to-absolute-index":186,"./_to-length":190}],234:[function(require,module,exports){
'use strict';
var $export = require('./_export');
var $some = require('./_array-methods')(3);
@@ -22929,7 +23137,7 @@ $export($export.P + $export.F * !require('./_strict-method')([].some, true), 'Ar
}
});
-},{"./_array-methods":83,"./_export":104,"./_strict-method":177}],234:[function(require,module,exports){
+},{"./_array-methods":83,"./_export":104,"./_strict-method":177}],235:[function(require,module,exports){
'use strict';
var $export = require('./_export');
var aFunction = require('./_a-function');
@@ -22954,16 +23162,16 @@ $export($export.P + $export.F * (fails(function () {
}
});
-},{"./_a-function":74,"./_export":104,"./_fails":106,"./_strict-method":177,"./_to-object":191}],235:[function(require,module,exports){
+},{"./_a-function":74,"./_export":104,"./_fails":106,"./_strict-method":177,"./_to-object":191}],236:[function(require,module,exports){
require('./_set-species')('Array');
-},{"./_set-species":172}],236:[function(require,module,exports){
+},{"./_set-species":172}],237:[function(require,module,exports){
// 20.3.3.1 / 15.9.4.4 Date.now()
var $export = require('./_export');
$export($export.S, 'Date', { now: function () { return new Date().getTime(); } });
-},{"./_export":104}],237:[function(require,module,exports){
+},{"./_export":104}],238:[function(require,module,exports){
// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
var $export = require('./_export');
var toISOString = require('./_date-to-iso-string');
@@ -22973,7 +23181,7 @@ $export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'D
toISOString: toISOString
});
-},{"./_date-to-iso-string":97,"./_export":104}],238:[function(require,module,exports){
+},{"./_date-to-iso-string":97,"./_export":104}],239:[function(require,module,exports){
'use strict';
var $export = require('./_export');
var toObject = require('./_to-object');
@@ -22991,13 +23199,13 @@ $export($export.P + $export.F * require('./_fails')(function () {
}
});
-},{"./_export":104,"./_fails":106,"./_to-object":191,"./_to-primitive":192}],239:[function(require,module,exports){
+},{"./_export":104,"./_fails":106,"./_to-object":191,"./_to-primitive":192}],240:[function(require,module,exports){
var TO_PRIMITIVE = require('./_wks')('toPrimitive');
var proto = Date.prototype;
if (!(TO_PRIMITIVE in proto)) require('./_hide')(proto, TO_PRIMITIVE, require('./_date-to-primitive'));
-},{"./_date-to-primitive":98,"./_hide":113,"./_wks":200}],240:[function(require,module,exports){
+},{"./_date-to-primitive":98,"./_hide":113,"./_wks":201}],241:[function(require,module,exports){
var DateProto = Date.prototype;
var INVALID_DATE = 'Invalid Date';
var TO_STRING = 'toString';
@@ -23011,13 +23219,13 @@ if (new Date(NaN) + '' != INVALID_DATE) {
});
}
-},{"./_redefine":166}],241:[function(require,module,exports){
+},{"./_redefine":166}],242:[function(require,module,exports){
// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)
var $export = require('./_export');
$export($export.P, 'Function', { bind: require('./_bind') });
-},{"./_bind":87,"./_export":104}],242:[function(require,module,exports){
+},{"./_bind":87,"./_export":104}],243:[function(require,module,exports){
'use strict';
var isObject = require('./_is-object');
var getPrototypeOf = require('./_object-gpo');
@@ -23032,7 +23240,7 @@ if (!(HAS_INSTANCE in FunctionProto)) require('./_object-dp').f(FunctionProto, H
return false;
} });
-},{"./_is-object":122,"./_object-dp":144,"./_object-gpo":151,"./_wks":200}],243:[function(require,module,exports){
+},{"./_is-object":122,"./_object-dp":144,"./_object-gpo":151,"./_wks":201}],244:[function(require,module,exports){
var dP = require('./_object-dp').f;
var FProto = Function.prototype;
var nameRE = /^\s*function ([^ (]*)/;
@@ -23050,7 +23258,7 @@ NAME in FProto || require('./_descriptors') && dP(FProto, NAME, {
}
});
-},{"./_descriptors":100,"./_object-dp":144}],244:[function(require,module,exports){
+},{"./_descriptors":100,"./_object-dp":144}],245:[function(require,module,exports){
'use strict';
var strong = require('./_collection-strong');
var validate = require('./_validate-collection');
@@ -23071,7 +23279,7 @@ module.exports = require('./_collection')(MAP, function (get) {
}
}, strong, true);
-},{"./_collection":93,"./_collection-strong":90,"./_validate-collection":197}],245:[function(require,module,exports){
+},{"./_collection":93,"./_collection-strong":90,"./_validate-collection":198}],246:[function(require,module,exports){
// 20.2.2.3 Math.acosh(x)
var $export = require('./_export');
var log1p = require('./_math-log1p');
@@ -23091,7 +23299,7 @@ $export($export.S + $export.F * !($acosh
}
});
-},{"./_export":104,"./_math-log1p":134}],246:[function(require,module,exports){
+},{"./_export":104,"./_math-log1p":134}],247:[function(require,module,exports){
// 20.2.2.5 Math.asinh(x)
var $export = require('./_export');
var $asinh = Math.asinh;
@@ -23103,7 +23311,7 @@ function asinh(x) {
// Tor Browser bug: Math.asinh(0) -> -0
$export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh });
-},{"./_export":104}],247:[function(require,module,exports){
+},{"./_export":104}],248:[function(require,module,exports){
// 20.2.2.7 Math.atanh(x)
var $export = require('./_export');
var $atanh = Math.atanh;
@@ -23115,7 +23323,7 @@ $export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', {
}
});
-},{"./_export":104}],248:[function(require,module,exports){
+},{"./_export":104}],249:[function(require,module,exports){
// 20.2.2.9 Math.cbrt(x)
var $export = require('./_export');
var sign = require('./_math-sign');
@@ -23126,7 +23334,7 @@ $export($export.S, 'Math', {
}
});
-},{"./_export":104,"./_math-sign":136}],249:[function(require,module,exports){
+},{"./_export":104,"./_math-sign":136}],250:[function(require,module,exports){
// 20.2.2.11 Math.clz32(x)
var $export = require('./_export');
@@ -23136,7 +23344,7 @@ $export($export.S, 'Math', {
}
});
-},{"./_export":104}],250:[function(require,module,exports){
+},{"./_export":104}],251:[function(require,module,exports){
// 20.2.2.12 Math.cosh(x)
var $export = require('./_export');
var exp = Math.exp;
@@ -23147,20 +23355,20 @@ $export($export.S, 'Math', {
}
});
-},{"./_export":104}],251:[function(require,module,exports){
+},{"./_export":104}],252:[function(require,module,exports){
// 20.2.2.14 Math.expm1(x)
var $export = require('./_export');
var $expm1 = require('./_math-expm1');
$export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 });
-},{"./_export":104,"./_math-expm1":132}],252:[function(require,module,exports){
+},{"./_export":104,"./_math-expm1":132}],253:[function(require,module,exports){
// 20.2.2.16 Math.fround(x)
var $export = require('./_export');
$export($export.S, 'Math', { fround: require('./_math-fround') });
-},{"./_export":104,"./_math-fround":133}],253:[function(require,module,exports){
+},{"./_export":104,"./_math-fround":133}],254:[function(require,module,exports){
// 20.2.2.17 Math.hypot([value1[, value2[, … ]]])
var $export = require('./_export');
var abs = Math.abs;
@@ -23187,7 +23395,7 @@ $export($export.S, 'Math', {
}
});
-},{"./_export":104}],254:[function(require,module,exports){
+},{"./_export":104}],255:[function(require,module,exports){
// 20.2.2.18 Math.imul(x, y)
var $export = require('./_export');
var $imul = Math.imul;
@@ -23206,7 +23414,7 @@ $export($export.S + $export.F * require('./_fails')(function () {
}
});
-},{"./_export":104,"./_fails":106}],255:[function(require,module,exports){
+},{"./_export":104,"./_fails":106}],256:[function(require,module,exports){
// 20.2.2.21 Math.log10(x)
var $export = require('./_export');
@@ -23216,13 +23424,13 @@ $export($export.S, 'Math', {
}
});
-},{"./_export":104}],256:[function(require,module,exports){
+},{"./_export":104}],257:[function(require,module,exports){
// 20.2.2.20 Math.log1p(x)
var $export = require('./_export');
$export($export.S, 'Math', { log1p: require('./_math-log1p') });
-},{"./_export":104,"./_math-log1p":134}],257:[function(require,module,exports){
+},{"./_export":104,"./_math-log1p":134}],258:[function(require,module,exports){
// 20.2.2.22 Math.log2(x)
var $export = require('./_export');
@@ -23232,13 +23440,13 @@ $export($export.S, 'Math', {
}
});
-},{"./_export":104}],258:[function(require,module,exports){
+},{"./_export":104}],259:[function(require,module,exports){
// 20.2.2.28 Math.sign(x)
var $export = require('./_export');
$export($export.S, 'Math', { sign: require('./_math-sign') });
-},{"./_export":104,"./_math-sign":136}],259:[function(require,module,exports){
+},{"./_export":104,"./_math-sign":136}],260:[function(require,module,exports){
// 20.2.2.30 Math.sinh(x)
var $export = require('./_export');
var expm1 = require('./_math-expm1');
@@ -23255,7 +23463,7 @@ $export($export.S + $export.F * require('./_fails')(function () {
}
});
-},{"./_export":104,"./_fails":106,"./_math-expm1":132}],260:[function(require,module,exports){
+},{"./_export":104,"./_fails":106,"./_math-expm1":132}],261:[function(require,module,exports){
// 20.2.2.33 Math.tanh(x)
var $export = require('./_export');
var expm1 = require('./_math-expm1');
@@ -23269,7 +23477,7 @@ $export($export.S, 'Math', {
}
});
-},{"./_export":104,"./_math-expm1":132}],261:[function(require,module,exports){
+},{"./_export":104,"./_math-expm1":132}],262:[function(require,module,exports){
// 20.2.2.34 Math.trunc(x)
var $export = require('./_export');
@@ -23279,7 +23487,7 @@ $export($export.S, 'Math', {
}
});
-},{"./_export":104}],262:[function(require,module,exports){
+},{"./_export":104}],263:[function(require,module,exports){
'use strict';
var global = require('./_global');
var has = require('./_has');
@@ -23350,13 +23558,13 @@ if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) {
require('./_redefine')(global, NUMBER, $Number);
}
-},{"./_cof":89,"./_descriptors":100,"./_fails":106,"./_global":111,"./_has":112,"./_inherit-if-required":116,"./_object-create":142,"./_object-dp":144,"./_object-gopd":147,"./_object-gopn":149,"./_redefine":166,"./_string-trim":183,"./_to-primitive":192}],263:[function(require,module,exports){
+},{"./_cof":89,"./_descriptors":100,"./_fails":106,"./_global":111,"./_has":112,"./_inherit-if-required":116,"./_object-create":142,"./_object-dp":144,"./_object-gopd":147,"./_object-gopn":149,"./_redefine":166,"./_string-trim":183,"./_to-primitive":192}],264:[function(require,module,exports){
// 20.1.2.1 Number.EPSILON
var $export = require('./_export');
$export($export.S, 'Number', { EPSILON: Math.pow(2, -52) });
-},{"./_export":104}],264:[function(require,module,exports){
+},{"./_export":104}],265:[function(require,module,exports){
// 20.1.2.2 Number.isFinite(number)
var $export = require('./_export');
var _isFinite = require('./_global').isFinite;
@@ -23367,13 +23575,13 @@ $export($export.S, 'Number', {
}
});
-},{"./_export":104,"./_global":111}],265:[function(require,module,exports){
+},{"./_export":104,"./_global":111}],266:[function(require,module,exports){
// 20.1.2.3 Number.isInteger(number)
var $export = require('./_export');
$export($export.S, 'Number', { isInteger: require('./_is-integer') });
-},{"./_export":104,"./_is-integer":121}],266:[function(require,module,exports){
+},{"./_export":104,"./_is-integer":121}],267:[function(require,module,exports){
// 20.1.2.4 Number.isNaN(number)
var $export = require('./_export');
@@ -23384,7 +23592,7 @@ $export($export.S, 'Number', {
}
});
-},{"./_export":104}],267:[function(require,module,exports){
+},{"./_export":104}],268:[function(require,module,exports){
// 20.1.2.5 Number.isSafeInteger(number)
var $export = require('./_export');
var isInteger = require('./_is-integer');
@@ -23396,31 +23604,31 @@ $export($export.S, 'Number', {
}
});
-},{"./_export":104,"./_is-integer":121}],268:[function(require,module,exports){
+},{"./_export":104,"./_is-integer":121}],269:[function(require,module,exports){
// 20.1.2.6 Number.MAX_SAFE_INTEGER
var $export = require('./_export');
$export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff });
-},{"./_export":104}],269:[function(require,module,exports){
+},{"./_export":104}],270:[function(require,module,exports){
// 20.1.2.10 Number.MIN_SAFE_INTEGER
var $export = require('./_export');
$export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff });
-},{"./_export":104}],270:[function(require,module,exports){
+},{"./_export":104}],271:[function(require,module,exports){
var $export = require('./_export');
var $parseFloat = require('./_parse-float');
// 20.1.2.12 Number.parseFloat(string)
$export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat });
-},{"./_export":104,"./_parse-float":158}],271:[function(require,module,exports){
+},{"./_export":104,"./_parse-float":158}],272:[function(require,module,exports){
var $export = require('./_export');
var $parseInt = require('./_parse-int');
// 20.1.2.13 Number.parseInt(string, radix)
$export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt });
-},{"./_export":104,"./_parse-int":159}],272:[function(require,module,exports){
+},{"./_export":104,"./_parse-int":159}],273:[function(require,module,exports){
'use strict';
var $export = require('./_export');
var toInteger = require('./_to-integer');
@@ -23536,7 +23744,7 @@ $export($export.P + $export.F * (!!$toFixed && (
}
});
-},{"./_a-number-value":75,"./_export":104,"./_fails":106,"./_string-repeat":182,"./_to-integer":188}],273:[function(require,module,exports){
+},{"./_a-number-value":75,"./_export":104,"./_fails":106,"./_string-repeat":182,"./_to-integer":188}],274:[function(require,module,exports){
'use strict';
var $export = require('./_export');
var $fails = require('./_fails');
@@ -23556,28 +23764,28 @@ $export($export.P + $export.F * ($fails(function () {
}
});
-},{"./_a-number-value":75,"./_export":104,"./_fails":106}],274:[function(require,module,exports){
+},{"./_a-number-value":75,"./_export":104,"./_fails":106}],275:[function(require,module,exports){
// 19.1.3.1 Object.assign(target, source)
var $export = require('./_export');
$export($export.S + $export.F, 'Object', { assign: require('./_object-assign') });
-},{"./_export":104,"./_object-assign":141}],275:[function(require,module,exports){
+},{"./_export":104,"./_object-assign":141}],276:[function(require,module,exports){
var $export = require('./_export');
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
$export($export.S, 'Object', { create: require('./_object-create') });
-},{"./_export":104,"./_object-create":142}],276:[function(require,module,exports){
+},{"./_export":104,"./_object-create":142}],277:[function(require,module,exports){
var $export = require('./_export');
// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)
$export($export.S + $export.F * !require('./_descriptors'), 'Object', { defineProperties: require('./_object-dps') });
-},{"./_descriptors":100,"./_export":104,"./_object-dps":145}],277:[function(require,module,exports){
+},{"./_descriptors":100,"./_export":104,"./_object-dps":145}],278:[function(require,module,exports){
var $export = require('./_export');
// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
$export($export.S + $export.F * !require('./_descriptors'), 'Object', { defineProperty: require('./_object-dp').f });
-},{"./_descriptors":100,"./_export":104,"./_object-dp":144}],278:[function(require,module,exports){
+},{"./_descriptors":100,"./_export":104,"./_object-dp":144}],279:[function(require,module,exports){
// 19.1.2.5 Object.freeze(O)
var isObject = require('./_is-object');
var meta = require('./_meta').onFreeze;
@@ -23588,7 +23796,7 @@ require('./_object-sap')('freeze', function ($freeze) {
};
});
-},{"./_is-object":122,"./_meta":137,"./_object-sap":155}],279:[function(require,module,exports){
+},{"./_is-object":122,"./_meta":137,"./_object-sap":155}],280:[function(require,module,exports){
// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
var toIObject = require('./_to-iobject');
var $getOwnPropertyDescriptor = require('./_object-gopd').f;
@@ -23599,13 +23807,13 @@ require('./_object-sap')('getOwnPropertyDescriptor', function () {
};
});
-},{"./_object-gopd":147,"./_object-sap":155,"./_to-iobject":189}],280:[function(require,module,exports){
+},{"./_object-gopd":147,"./_object-sap":155,"./_to-iobject":189}],281:[function(require,module,exports){
// 19.1.2.7 Object.getOwnPropertyNames(O)
require('./_object-sap')('getOwnPropertyNames', function () {
return require('./_object-gopn-ext').f;
});
-},{"./_object-gopn-ext":148,"./_object-sap":155}],281:[function(require,module,exports){
+},{"./_object-gopn-ext":148,"./_object-sap":155}],282:[function(require,module,exports){
// 19.1.2.9 Object.getPrototypeOf(O)
var toObject = require('./_to-object');
var $getPrototypeOf = require('./_object-gpo');
@@ -23616,7 +23824,7 @@ require('./_object-sap')('getPrototypeOf', function () {
};
});
-},{"./_object-gpo":151,"./_object-sap":155,"./_to-object":191}],282:[function(require,module,exports){
+},{"./_object-gpo":151,"./_object-sap":155,"./_to-object":191}],283:[function(require,module,exports){
// 19.1.2.11 Object.isExtensible(O)
var isObject = require('./_is-object');
@@ -23626,7 +23834,7 @@ require('./_object-sap')('isExtensible', function ($isExtensible) {
};
});
-},{"./_is-object":122,"./_object-sap":155}],283:[function(require,module,exports){
+},{"./_is-object":122,"./_object-sap":155}],284:[function(require,module,exports){
// 19.1.2.12 Object.isFrozen(O)
var isObject = require('./_is-object');
@@ -23636,7 +23844,7 @@ require('./_object-sap')('isFrozen', function ($isFrozen) {
};
});
-},{"./_is-object":122,"./_object-sap":155}],284:[function(require,module,exports){
+},{"./_is-object":122,"./_object-sap":155}],285:[function(require,module,exports){
// 19.1.2.13 Object.isSealed(O)
var isObject = require('./_is-object');
@@ -23646,12 +23854,12 @@ require('./_object-sap')('isSealed', function ($isSealed) {
};
});
-},{"./_is-object":122,"./_object-sap":155}],285:[function(require,module,exports){
+},{"./_is-object":122,"./_object-sap":155}],286:[function(require,module,exports){
// 19.1.3.10 Object.is(value1, value2)
var $export = require('./_export');
$export($export.S, 'Object', { is: require('./_same-value') });
-},{"./_export":104,"./_same-value":168}],286:[function(require,module,exports){
+},{"./_export":104,"./_same-value":168}],287:[function(require,module,exports){
// 19.1.2.14 Object.keys(O)
var toObject = require('./_to-object');
var $keys = require('./_object-keys');
@@ -23662,7 +23870,7 @@ require('./_object-sap')('keys', function () {
};
});
-},{"./_object-keys":153,"./_object-sap":155,"./_to-object":191}],287:[function(require,module,exports){
+},{"./_object-keys":153,"./_object-sap":155,"./_to-object":191}],288:[function(require,module,exports){
// 19.1.2.15 Object.preventExtensions(O)
var isObject = require('./_is-object');
var meta = require('./_meta').onFreeze;
@@ -23673,7 +23881,7 @@ require('./_object-sap')('preventExtensions', function ($preventExtensions) {
};
});
-},{"./_is-object":122,"./_meta":137,"./_object-sap":155}],288:[function(require,module,exports){
+},{"./_is-object":122,"./_meta":137,"./_object-sap":155}],289:[function(require,module,exports){
// 19.1.2.17 Object.seal(O)
var isObject = require('./_is-object');
var meta = require('./_meta').onFreeze;
@@ -23684,12 +23892,12 @@ require('./_object-sap')('seal', function ($seal) {
};
});
-},{"./_is-object":122,"./_meta":137,"./_object-sap":155}],289:[function(require,module,exports){
+},{"./_is-object":122,"./_meta":137,"./_object-sap":155}],290:[function(require,module,exports){
// 19.1.3.19 Object.setPrototypeOf(O, proto)
var $export = require('./_export');
$export($export.S, 'Object', { setPrototypeOf: require('./_set-proto').set });
-},{"./_export":104,"./_set-proto":171}],290:[function(require,module,exports){
+},{"./_export":104,"./_set-proto":171}],291:[function(require,module,exports){
'use strict';
// 19.1.3.6 Object.prototype.toString()
var classof = require('./_classof');
@@ -23701,19 +23909,19 @@ if (test + '' != '[object z]') {
}, true);
}
-},{"./_classof":88,"./_redefine":166,"./_wks":200}],291:[function(require,module,exports){
+},{"./_classof":88,"./_redefine":166,"./_wks":201}],292:[function(require,module,exports){
var $export = require('./_export');
var $parseFloat = require('./_parse-float');
// 18.2.4 parseFloat(string)
$export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat });
-},{"./_export":104,"./_parse-float":158}],292:[function(require,module,exports){
+},{"./_export":104,"./_parse-float":158}],293:[function(require,module,exports){
var $export = require('./_export');
var $parseInt = require('./_parse-int');
// 18.2.5 parseInt(string, radix)
$export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt });
-},{"./_export":104,"./_parse-int":159}],293:[function(require,module,exports){
+},{"./_export":104,"./_parse-int":159}],294:[function(require,module,exports){
'use strict';
var LIBRARY = require('./_library');
var global = require('./_global');
@@ -23729,10 +23937,13 @@ var task = require('./_task').set;
var microtask = require('./_microtask')();
var newPromiseCapabilityModule = require('./_new-promise-capability');
var perform = require('./_perform');
+var userAgent = require('./_user-agent');
var promiseResolve = require('./_promise-resolve');
var PROMISE = 'Promise';
var TypeError = global.TypeError;
var process = global.process;
+var versions = process && process.versions;
+var v8 = versions && versions.v8 || '';
var $Promise = global[PROMISE];
var isNode = classof(process) == 'process';
var empty = function () { /* empty */ };
@@ -23747,7 +23958,13 @@ var USE_NATIVE = !!function () {
exec(empty, empty);
};
// unhandled rejections tracking support, NodeJS Promise without it fails @@species test
- return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise;
+ return (isNode || typeof PromiseRejectionEvent == 'function')
+ && promise.then(empty) instanceof FakePromise
+ // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
+ // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
+ // we can't detect it synchronously, so just check versions
+ && v8.indexOf('6.6') !== 0
+ && userAgent.indexOf('Chrome/66') === -1;
} catch (e) { /* empty */ }
}();
@@ -23769,7 +23986,7 @@ var notify = function (promise, isReject) {
var resolve = reaction.resolve;
var reject = reaction.reject;
var domain = reaction.domain;
- var result, then;
+ var result, then, exited;
try {
if (handler) {
if (!ok) {
@@ -23779,8 +23996,11 @@ var notify = function (promise, isReject) {
if (handler === true) result = value;
else {
if (domain) domain.enter();
- result = handler(value);
- if (domain) domain.exit();
+ result = handler(value); // may throw
+ if (domain) {
+ domain.exit();
+ exited = true;
+ }
}
if (result === reaction.promise) {
reject(TypeError('Promise-chain cycle'));
@@ -23789,6 +24009,7 @@ var notify = function (promise, isReject) {
} else resolve(result);
} else reject(value);
} catch (e) {
+ if (domain && !exited) domain.exit();
reject(e);
}
};
@@ -23820,14 +24041,7 @@ var onUnhandled = function (promise) {
});
};
var isUnhandled = function (promise) {
- if (promise._h == 1) return false;
- var chain = promise._a || promise._c;
- var i = 0;
- var reaction;
- while (chain.length > i) {
- reaction = chain[i++];
- if (reaction.fail || !isUnhandled(reaction.promise)) return false;
- } return true;
+ return promise._h !== 1 && (promise._a || promise._c).length === 0;
};
var onHandleUnhandled = function (promise) {
task.call(global, function () {
@@ -23995,7 +24209,7 @@ $export($export.S + $export.F * !(USE_NATIVE && require('./_iter-detect')(functi
}
});
-},{"./_a-function":74,"./_an-instance":77,"./_classof":88,"./_core":94,"./_ctx":96,"./_export":104,"./_for-of":110,"./_global":111,"./_is-object":122,"./_iter-detect":127,"./_library":131,"./_microtask":139,"./_new-promise-capability":140,"./_perform":162,"./_promise-resolve":163,"./_redefine-all":165,"./_set-species":172,"./_set-to-string-tag":173,"./_species-constructor":176,"./_task":185,"./_wks":200}],294:[function(require,module,exports){
+},{"./_a-function":74,"./_an-instance":77,"./_classof":88,"./_core":94,"./_ctx":96,"./_export":104,"./_for-of":110,"./_global":111,"./_is-object":122,"./_iter-detect":127,"./_library":131,"./_microtask":139,"./_new-promise-capability":140,"./_perform":162,"./_promise-resolve":163,"./_redefine-all":165,"./_set-species":172,"./_set-to-string-tag":173,"./_species-constructor":176,"./_task":185,"./_user-agent":197,"./_wks":201}],295:[function(require,module,exports){
// 26.1.1 Reflect.apply(target, thisArgument, argumentsList)
var $export = require('./_export');
var aFunction = require('./_a-function');
@@ -24013,7 +24227,7 @@ $export($export.S + $export.F * !require('./_fails')(function () {
}
});
-},{"./_a-function":74,"./_an-object":78,"./_export":104,"./_fails":106,"./_global":111}],295:[function(require,module,exports){
+},{"./_a-function":74,"./_an-object":78,"./_export":104,"./_fails":106,"./_global":111}],296:[function(require,module,exports){
// 26.1.2 Reflect.construct(target, argumentsList [, newTarget])
var $export = require('./_export');
var create = require('./_object-create');
@@ -24062,7 +24276,7 @@ $export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', {
}
});
-},{"./_a-function":74,"./_an-object":78,"./_bind":87,"./_export":104,"./_fails":106,"./_global":111,"./_is-object":122,"./_object-create":142}],296:[function(require,module,exports){
+},{"./_a-function":74,"./_an-object":78,"./_bind":87,"./_export":104,"./_fails":106,"./_global":111,"./_is-object":122,"./_object-create":142}],297:[function(require,module,exports){
// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes)
var dP = require('./_object-dp');
var $export = require('./_export');
@@ -24087,7 +24301,7 @@ $export($export.S + $export.F * require('./_fails')(function () {
}
});
-},{"./_an-object":78,"./_export":104,"./_fails":106,"./_object-dp":144,"./_to-primitive":192}],297:[function(require,module,exports){
+},{"./_an-object":78,"./_export":104,"./_fails":106,"./_object-dp":144,"./_to-primitive":192}],298:[function(require,module,exports){
// 26.1.4 Reflect.deleteProperty(target, propertyKey)
var $export = require('./_export');
var gOPD = require('./_object-gopd').f;
@@ -24100,7 +24314,7 @@ $export($export.S, 'Reflect', {
}
});
-},{"./_an-object":78,"./_export":104,"./_object-gopd":147}],298:[function(require,module,exports){
+},{"./_an-object":78,"./_export":104,"./_object-gopd":147}],299:[function(require,module,exports){
'use strict';
// 26.1.5 Reflect.enumerate(target)
var $export = require('./_export');
@@ -24128,7 +24342,7 @@ $export($export.S, 'Reflect', {
}
});
-},{"./_an-object":78,"./_export":104,"./_iter-create":125}],299:[function(require,module,exports){
+},{"./_an-object":78,"./_export":104,"./_iter-create":125}],300:[function(require,module,exports){
// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey)
var gOPD = require('./_object-gopd');
var $export = require('./_export');
@@ -24140,7 +24354,7 @@ $export($export.S, 'Reflect', {
}
});
-},{"./_an-object":78,"./_export":104,"./_object-gopd":147}],300:[function(require,module,exports){
+},{"./_an-object":78,"./_export":104,"./_object-gopd":147}],301:[function(require,module,exports){
// 26.1.8 Reflect.getPrototypeOf(target)
var $export = require('./_export');
var getProto = require('./_object-gpo');
@@ -24152,7 +24366,7 @@ $export($export.S, 'Reflect', {
}
});
-},{"./_an-object":78,"./_export":104,"./_object-gpo":151}],301:[function(require,module,exports){
+},{"./_an-object":78,"./_export":104,"./_object-gpo":151}],302:[function(require,module,exports){
// 26.1.6 Reflect.get(target, propertyKey [, receiver])
var gOPD = require('./_object-gopd');
var getPrototypeOf = require('./_object-gpo');
@@ -24175,7 +24389,7 @@ function get(target, propertyKey /* , receiver */) {
$export($export.S, 'Reflect', { get: get });
-},{"./_an-object":78,"./_export":104,"./_has":112,"./_is-object":122,"./_object-gopd":147,"./_object-gpo":151}],302:[function(require,module,exports){
+},{"./_an-object":78,"./_export":104,"./_has":112,"./_is-object":122,"./_object-gopd":147,"./_object-gpo":151}],303:[function(require,module,exports){
// 26.1.9 Reflect.has(target, propertyKey)
var $export = require('./_export');
@@ -24185,7 +24399,7 @@ $export($export.S, 'Reflect', {
}
});
-},{"./_export":104}],303:[function(require,module,exports){
+},{"./_export":104}],304:[function(require,module,exports){
// 26.1.10 Reflect.isExtensible(target)
var $export = require('./_export');
var anObject = require('./_an-object');
@@ -24198,13 +24412,13 @@ $export($export.S, 'Reflect', {
}
});
-},{"./_an-object":78,"./_export":104}],304:[function(require,module,exports){
+},{"./_an-object":78,"./_export":104}],305:[function(require,module,exports){
// 26.1.11 Reflect.ownKeys(target)
var $export = require('./_export');
$export($export.S, 'Reflect', { ownKeys: require('./_own-keys') });
-},{"./_export":104,"./_own-keys":157}],305:[function(require,module,exports){
+},{"./_export":104,"./_own-keys":157}],306:[function(require,module,exports){
// 26.1.12 Reflect.preventExtensions(target)
var $export = require('./_export');
var anObject = require('./_an-object');
@@ -24222,7 +24436,7 @@ $export($export.S, 'Reflect', {
}
});
-},{"./_an-object":78,"./_export":104}],306:[function(require,module,exports){
+},{"./_an-object":78,"./_export":104}],307:[function(require,module,exports){
// 26.1.14 Reflect.setPrototypeOf(target, proto)
var $export = require('./_export');
var setProto = require('./_set-proto');
@@ -24239,7 +24453,7 @@ if (setProto) $export($export.S, 'Reflect', {
}
});
-},{"./_export":104,"./_set-proto":171}],307:[function(require,module,exports){
+},{"./_export":104,"./_set-proto":171}],308:[function(require,module,exports){
// 26.1.13 Reflect.set(target, propertyKey, V [, receiver])
var dP = require('./_object-dp');
var gOPD = require('./_object-gopd');
@@ -24262,9 +24476,11 @@ function set(target, propertyKey, V /* , receiver */) {
}
if (has(ownDesc, 'value')) {
if (ownDesc.writable === false || !isObject(receiver)) return false;
- existingDescriptor = gOPD.f(receiver, propertyKey) || createDesc(0);
- existingDescriptor.value = V;
- dP.f(receiver, propertyKey, existingDescriptor);
+ if (existingDescriptor = gOPD.f(receiver, propertyKey)) {
+ if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false;
+ existingDescriptor.value = V;
+ dP.f(receiver, propertyKey, existingDescriptor);
+ } else dP.f(receiver, propertyKey, createDesc(0, V));
return true;
}
return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true);
@@ -24272,7 +24488,7 @@ function set(target, propertyKey, V /* , receiver */) {
$export($export.S, 'Reflect', { set: set });
-},{"./_an-object":78,"./_export":104,"./_has":112,"./_is-object":122,"./_object-dp":144,"./_object-gopd":147,"./_object-gpo":151,"./_property-desc":164}],308:[function(require,module,exports){
+},{"./_an-object":78,"./_export":104,"./_has":112,"./_is-object":122,"./_object-dp":144,"./_object-gopd":147,"./_object-gpo":151,"./_property-desc":164}],309:[function(require,module,exports){
var global = require('./_global');
var inheritIfRequired = require('./_inherit-if-required');
var dP = require('./_object-dp').f;
@@ -24317,14 +24533,14 @@ if (require('./_descriptors') && (!CORRECT_NEW || require('./_fails')(function (
require('./_set-species')('RegExp');
-},{"./_descriptors":100,"./_fails":106,"./_flags":108,"./_global":111,"./_inherit-if-required":116,"./_is-regexp":123,"./_object-dp":144,"./_object-gopn":149,"./_redefine":166,"./_set-species":172,"./_wks":200}],309:[function(require,module,exports){
+},{"./_descriptors":100,"./_fails":106,"./_flags":108,"./_global":111,"./_inherit-if-required":116,"./_is-regexp":123,"./_object-dp":144,"./_object-gopn":149,"./_redefine":166,"./_set-species":172,"./_wks":201}],310:[function(require,module,exports){
// 21.2.5.3 get RegExp.prototype.flags()
if (require('./_descriptors') && /./g.flags != 'g') require('./_object-dp').f(RegExp.prototype, 'flags', {
configurable: true,
get: require('./_flags')
});
-},{"./_descriptors":100,"./_flags":108,"./_object-dp":144}],310:[function(require,module,exports){
+},{"./_descriptors":100,"./_flags":108,"./_object-dp":144}],311:[function(require,module,exports){
// @@match logic
require('./_fix-re-wks')('match', 1, function (defined, MATCH, $match) {
// 21.1.3.11 String.prototype.match(regexp)
@@ -24336,7 +24552,7 @@ require('./_fix-re-wks')('match', 1, function (defined, MATCH, $match) {
}, $match];
});
-},{"./_fix-re-wks":107}],311:[function(require,module,exports){
+},{"./_fix-re-wks":107}],312:[function(require,module,exports){
// @@replace logic
require('./_fix-re-wks')('replace', 2, function (defined, REPLACE, $replace) {
// 21.1.3.14 String.prototype.replace(searchValue, replaceValue)
@@ -24350,7 +24566,7 @@ require('./_fix-re-wks')('replace', 2, function (defined, REPLACE, $replace) {
}, $replace];
});
-},{"./_fix-re-wks":107}],312:[function(require,module,exports){
+},{"./_fix-re-wks":107}],313:[function(require,module,exports){
// @@search logic
require('./_fix-re-wks')('search', 1, function (defined, SEARCH, $search) {
// 21.1.3.15 String.prototype.search(regexp)
@@ -24362,7 +24578,7 @@ require('./_fix-re-wks')('search', 1, function (defined, SEARCH, $search) {
}, $search];
});
-},{"./_fix-re-wks":107}],313:[function(require,module,exports){
+},{"./_fix-re-wks":107}],314:[function(require,module,exports){
// @@split logic
require('./_fix-re-wks')('split', 2, function (defined, SPLIT, $split) {
'use strict';
@@ -24435,7 +24651,7 @@ require('./_fix-re-wks')('split', 2, function (defined, SPLIT, $split) {
}, $split];
});
-},{"./_fix-re-wks":107,"./_is-regexp":123}],314:[function(require,module,exports){
+},{"./_fix-re-wks":107,"./_is-regexp":123}],315:[function(require,module,exports){
'use strict';
require('./es6.regexp.flags');
var anObject = require('./_an-object');
@@ -24462,7 +24678,7 @@ if (require('./_fails')(function () { return $toString.call({ source: 'a', flags
});
}
-},{"./_an-object":78,"./_descriptors":100,"./_fails":106,"./_flags":108,"./_redefine":166,"./es6.regexp.flags":309}],315:[function(require,module,exports){
+},{"./_an-object":78,"./_descriptors":100,"./_fails":106,"./_flags":108,"./_redefine":166,"./es6.regexp.flags":310}],316:[function(require,module,exports){
'use strict';
var strong = require('./_collection-strong');
var validate = require('./_validate-collection');
@@ -24478,7 +24694,7 @@ module.exports = require('./_collection')(SET, function (get) {
}
}, strong);
-},{"./_collection":93,"./_collection-strong":90,"./_validate-collection":197}],316:[function(require,module,exports){
+},{"./_collection":93,"./_collection-strong":90,"./_validate-collection":198}],317:[function(require,module,exports){
'use strict';
// B.2.3.2 String.prototype.anchor(name)
require('./_string-html')('anchor', function (createHTML) {
@@ -24487,7 +24703,7 @@ require('./_string-html')('anchor', function (createHTML) {
};
});
-},{"./_string-html":180}],317:[function(require,module,exports){
+},{"./_string-html":180}],318:[function(require,module,exports){
'use strict';
// B.2.3.3 String.prototype.big()
require('./_string-html')('big', function (createHTML) {
@@ -24496,7 +24712,7 @@ require('./_string-html')('big', function (createHTML) {
};
});
-},{"./_string-html":180}],318:[function(require,module,exports){
+},{"./_string-html":180}],319:[function(require,module,exports){
'use strict';
// B.2.3.4 String.prototype.blink()
require('./_string-html')('blink', function (createHTML) {
@@ -24505,7 +24721,7 @@ require('./_string-html')('blink', function (createHTML) {
};
});
-},{"./_string-html":180}],319:[function(require,module,exports){
+},{"./_string-html":180}],320:[function(require,module,exports){
'use strict';
// B.2.3.5 String.prototype.bold()
require('./_string-html')('bold', function (createHTML) {
@@ -24514,7 +24730,7 @@ require('./_string-html')('bold', function (createHTML) {
};
});
-},{"./_string-html":180}],320:[function(require,module,exports){
+},{"./_string-html":180}],321:[function(require,module,exports){
'use strict';
var $export = require('./_export');
var $at = require('./_string-at')(false);
@@ -24525,7 +24741,7 @@ $export($export.P, 'String', {
}
});
-},{"./_export":104,"./_string-at":178}],321:[function(require,module,exports){
+},{"./_export":104,"./_string-at":178}],322:[function(require,module,exports){
// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition])
'use strict';
var $export = require('./_export');
@@ -24547,7 +24763,7 @@ $export($export.P + $export.F * require('./_fails-is-regexp')(ENDS_WITH), 'Strin
}
});
-},{"./_export":104,"./_fails-is-regexp":105,"./_string-context":179,"./_to-length":190}],322:[function(require,module,exports){
+},{"./_export":104,"./_fails-is-regexp":105,"./_string-context":179,"./_to-length":190}],323:[function(require,module,exports){
'use strict';
// B.2.3.6 String.prototype.fixed()
require('./_string-html')('fixed', function (createHTML) {
@@ -24556,7 +24772,7 @@ require('./_string-html')('fixed', function (createHTML) {
};
});
-},{"./_string-html":180}],323:[function(require,module,exports){
+},{"./_string-html":180}],324:[function(require,module,exports){
'use strict';
// B.2.3.7 String.prototype.fontcolor(color)
require('./_string-html')('fontcolor', function (createHTML) {
@@ -24565,7 +24781,7 @@ require('./_string-html')('fontcolor', function (createHTML) {
};
});
-},{"./_string-html":180}],324:[function(require,module,exports){
+},{"./_string-html":180}],325:[function(require,module,exports){
'use strict';
// B.2.3.8 String.prototype.fontsize(size)
require('./_string-html')('fontsize', function (createHTML) {
@@ -24574,7 +24790,7 @@ require('./_string-html')('fontsize', function (createHTML) {
};
});
-},{"./_string-html":180}],325:[function(require,module,exports){
+},{"./_string-html":180}],326:[function(require,module,exports){
var $export = require('./_export');
var toAbsoluteIndex = require('./_to-absolute-index');
var fromCharCode = String.fromCharCode;
@@ -24599,7 +24815,7 @@ $export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1)
}
});
-},{"./_export":104,"./_to-absolute-index":186}],326:[function(require,module,exports){
+},{"./_export":104,"./_to-absolute-index":186}],327:[function(require,module,exports){
// 21.1.3.7 String.prototype.includes(searchString, position = 0)
'use strict';
var $export = require('./_export');
@@ -24613,7 +24829,7 @@ $export($export.P + $export.F * require('./_fails-is-regexp')(INCLUDES), 'String
}
});
-},{"./_export":104,"./_fails-is-regexp":105,"./_string-context":179}],327:[function(require,module,exports){
+},{"./_export":104,"./_fails-is-regexp":105,"./_string-context":179}],328:[function(require,module,exports){
'use strict';
// B.2.3.9 String.prototype.italics()
require('./_string-html')('italics', function (createHTML) {
@@ -24622,7 +24838,7 @@ require('./_string-html')('italics', function (createHTML) {
};
});
-},{"./_string-html":180}],328:[function(require,module,exports){
+},{"./_string-html":180}],329:[function(require,module,exports){
'use strict';
var $at = require('./_string-at')(true);
@@ -24641,7 +24857,7 @@ require('./_iter-define')(String, 'String', function (iterated) {
return { value: point, done: false };
});
-},{"./_iter-define":126,"./_string-at":178}],329:[function(require,module,exports){
+},{"./_iter-define":126,"./_string-at":178}],330:[function(require,module,exports){
'use strict';
// B.2.3.10 String.prototype.link(url)
require('./_string-html')('link', function (createHTML) {
@@ -24650,7 +24866,7 @@ require('./_string-html')('link', function (createHTML) {
};
});
-},{"./_string-html":180}],330:[function(require,module,exports){
+},{"./_string-html":180}],331:[function(require,module,exports){
var $export = require('./_export');
var toIObject = require('./_to-iobject');
var toLength = require('./_to-length');
@@ -24670,7 +24886,7 @@ $export($export.S, 'String', {
}
});
-},{"./_export":104,"./_to-iobject":189,"./_to-length":190}],331:[function(require,module,exports){
+},{"./_export":104,"./_to-iobject":189,"./_to-length":190}],332:[function(require,module,exports){
var $export = require('./_export');
$export($export.P, 'String', {
@@ -24678,7 +24894,7 @@ $export($export.P, 'String', {
repeat: require('./_string-repeat')
});
-},{"./_export":104,"./_string-repeat":182}],332:[function(require,module,exports){
+},{"./_export":104,"./_string-repeat":182}],333:[function(require,module,exports){
'use strict';
// B.2.3.11 String.prototype.small()
require('./_string-html')('small', function (createHTML) {
@@ -24687,7 +24903,7 @@ require('./_string-html')('small', function (createHTML) {
};
});
-},{"./_string-html":180}],333:[function(require,module,exports){
+},{"./_string-html":180}],334:[function(require,module,exports){
// 21.1.3.18 String.prototype.startsWith(searchString [, position ])
'use strict';
var $export = require('./_export');
@@ -24707,7 +24923,7 @@ $export($export.P + $export.F * require('./_fails-is-regexp')(STARTS_WITH), 'Str
}
});
-},{"./_export":104,"./_fails-is-regexp":105,"./_string-context":179,"./_to-length":190}],334:[function(require,module,exports){
+},{"./_export":104,"./_fails-is-regexp":105,"./_string-context":179,"./_to-length":190}],335:[function(require,module,exports){
'use strict';
// B.2.3.12 String.prototype.strike()
require('./_string-html')('strike', function (createHTML) {
@@ -24716,7 +24932,7 @@ require('./_string-html')('strike', function (createHTML) {
};
});
-},{"./_string-html":180}],335:[function(require,module,exports){
+},{"./_string-html":180}],336:[function(require,module,exports){
'use strict';
// B.2.3.13 String.prototype.sub()
require('./_string-html')('sub', function (createHTML) {
@@ -24725,7 +24941,7 @@ require('./_string-html')('sub', function (createHTML) {
};
});
-},{"./_string-html":180}],336:[function(require,module,exports){
+},{"./_string-html":180}],337:[function(require,module,exports){
'use strict';
// B.2.3.14 String.prototype.sup()
require('./_string-html')('sup', function (createHTML) {
@@ -24734,7 +24950,7 @@ require('./_string-html')('sup', function (createHTML) {
};
});
-},{"./_string-html":180}],337:[function(require,module,exports){
+},{"./_string-html":180}],338:[function(require,module,exports){
'use strict';
// 21.1.3.25 String.prototype.trim()
require('./_string-trim')('trim', function ($trim) {
@@ -24743,7 +24959,7 @@ require('./_string-trim')('trim', function ($trim) {
};
});
-},{"./_string-trim":183}],338:[function(require,module,exports){
+},{"./_string-trim":183}],339:[function(require,module,exports){
'use strict';
// ECMAScript 6 symbols shim
var global = require('./_global');
@@ -24762,6 +24978,7 @@ var wksDefine = require('./_wks-define');
var enumKeys = require('./_enum-keys');
var isArray = require('./_is-array');
var anObject = require('./_an-object');
+var isObject = require('./_is-object');
var toIObject = require('./_to-iobject');
var toPrimitive = require('./_to-primitive');
var createDesc = require('./_property-desc');
@@ -24954,15 +25171,14 @@ $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {
return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';
})), 'JSON', {
stringify: function stringify(it) {
- if (it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
var args = [it];
var i = 1;
var replacer, $replacer;
while (arguments.length > i) args.push(arguments[i++]);
- replacer = args[1];
- if (typeof replacer == 'function') $replacer = replacer;
- if ($replacer || !isArray(replacer)) replacer = function (key, value) {
- if ($replacer) value = $replacer.call(this, key, value);
+ $replacer = replacer = args[1];
+ if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
+ if (!isArray(replacer)) replacer = function (key, value) {
+ if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
if (!isSymbol(value)) return value;
};
args[1] = replacer;
@@ -24979,7 +25195,7 @@ setToStringTag(Math, 'Math', true);
// 24.3.3 JSON[@@toStringTag]
setToStringTag(global.JSON, 'JSON', true);
-},{"./_an-object":78,"./_descriptors":100,"./_enum-keys":103,"./_export":104,"./_fails":106,"./_global":111,"./_has":112,"./_hide":113,"./_is-array":120,"./_library":131,"./_meta":137,"./_object-create":142,"./_object-dp":144,"./_object-gopd":147,"./_object-gopn":149,"./_object-gopn-ext":148,"./_object-gops":150,"./_object-keys":153,"./_object-pie":154,"./_property-desc":164,"./_redefine":166,"./_set-to-string-tag":173,"./_shared":175,"./_to-iobject":189,"./_to-primitive":192,"./_uid":196,"./_wks":200,"./_wks-define":198,"./_wks-ext":199}],339:[function(require,module,exports){
+},{"./_an-object":78,"./_descriptors":100,"./_enum-keys":103,"./_export":104,"./_fails":106,"./_global":111,"./_has":112,"./_hide":113,"./_is-array":120,"./_is-object":122,"./_library":131,"./_meta":137,"./_object-create":142,"./_object-dp":144,"./_object-gopd":147,"./_object-gopn":149,"./_object-gopn-ext":148,"./_object-gops":150,"./_object-keys":153,"./_object-pie":154,"./_property-desc":164,"./_redefine":166,"./_set-to-string-tag":173,"./_shared":175,"./_to-iobject":189,"./_to-primitive":192,"./_uid":196,"./_wks":201,"./_wks-define":199,"./_wks-ext":200}],340:[function(require,module,exports){
'use strict';
var $export = require('./_export');
var $typed = require('./_typed');
@@ -25014,12 +25230,12 @@ $export($export.P + $export.U + $export.F * require('./_fails')(function () {
if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix
var len = anObject(this).byteLength;
var first = toAbsoluteIndex(start, len);
- var final = toAbsoluteIndex(end === undefined ? len : end, len);
- var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(final - first));
+ var fin = toAbsoluteIndex(end === undefined ? len : end, len);
+ var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first));
var viewS = new $DataView(this);
var viewT = new $DataView(result);
var index = 0;
- while (first < final) {
+ while (first < fin) {
viewT.setUint8(index++, viewS.getUint8(first++));
} return result;
}
@@ -25027,76 +25243,76 @@ $export($export.P + $export.U + $export.F * require('./_fails')(function () {
require('./_set-species')(ARRAY_BUFFER);
-},{"./_an-object":78,"./_export":104,"./_fails":106,"./_global":111,"./_is-object":122,"./_set-species":172,"./_species-constructor":176,"./_to-absolute-index":186,"./_to-length":190,"./_typed":195,"./_typed-buffer":194}],340:[function(require,module,exports){
+},{"./_an-object":78,"./_export":104,"./_fails":106,"./_global":111,"./_is-object":122,"./_set-species":172,"./_species-constructor":176,"./_to-absolute-index":186,"./_to-length":190,"./_typed":195,"./_typed-buffer":194}],341:[function(require,module,exports){
var $export = require('./_export');
$export($export.G + $export.W + $export.F * !require('./_typed').ABV, {
DataView: require('./_typed-buffer').DataView
});
-},{"./_export":104,"./_typed":195,"./_typed-buffer":194}],341:[function(require,module,exports){
+},{"./_export":104,"./_typed":195,"./_typed-buffer":194}],342:[function(require,module,exports){
require('./_typed-array')('Float32', 4, function (init) {
return function Float32Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
});
-},{"./_typed-array":193}],342:[function(require,module,exports){
+},{"./_typed-array":193}],343:[function(require,module,exports){
require('./_typed-array')('Float64', 8, function (init) {
return function Float64Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
});
-},{"./_typed-array":193}],343:[function(require,module,exports){
+},{"./_typed-array":193}],344:[function(require,module,exports){
require('./_typed-array')('Int16', 2, function (init) {
return function Int16Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
});
-},{"./_typed-array":193}],344:[function(require,module,exports){
+},{"./_typed-array":193}],345:[function(require,module,exports){
require('./_typed-array')('Int32', 4, function (init) {
return function Int32Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
});
-},{"./_typed-array":193}],345:[function(require,module,exports){
+},{"./_typed-array":193}],346:[function(require,module,exports){
require('./_typed-array')('Int8', 1, function (init) {
return function Int8Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
});
-},{"./_typed-array":193}],346:[function(require,module,exports){
+},{"./_typed-array":193}],347:[function(require,module,exports){
require('./_typed-array')('Uint16', 2, function (init) {
return function Uint16Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
});
-},{"./_typed-array":193}],347:[function(require,module,exports){
+},{"./_typed-array":193}],348:[function(require,module,exports){
require('./_typed-array')('Uint32', 4, function (init) {
return function Uint32Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
});
-},{"./_typed-array":193}],348:[function(require,module,exports){
+},{"./_typed-array":193}],349:[function(require,module,exports){
require('./_typed-array')('Uint8', 1, function (init) {
return function Uint8Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
});
-},{"./_typed-array":193}],349:[function(require,module,exports){
+},{"./_typed-array":193}],350:[function(require,module,exports){
require('./_typed-array')('Uint8', 1, function (init) {
return function Uint8ClampedArray(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
}, true);
-},{"./_typed-array":193}],350:[function(require,module,exports){
+},{"./_typed-array":193}],351:[function(require,module,exports){
'use strict';
var each = require('./_array-methods')(0);
var redefine = require('./_redefine');
@@ -25157,7 +25373,7 @@ if (fails(function () { return new $WeakMap().set((Object.freeze || Object)(tmp)
});
}
-},{"./_array-methods":83,"./_collection":93,"./_collection-weak":92,"./_fails":106,"./_is-object":122,"./_meta":137,"./_object-assign":141,"./_redefine":166,"./_validate-collection":197}],351:[function(require,module,exports){
+},{"./_array-methods":83,"./_collection":93,"./_collection-weak":92,"./_fails":106,"./_is-object":122,"./_meta":137,"./_object-assign":141,"./_redefine":166,"./_validate-collection":198}],352:[function(require,module,exports){
'use strict';
var weak = require('./_collection-weak');
var validate = require('./_validate-collection');
@@ -25173,7 +25389,7 @@ require('./_collection')(WEAK_SET, function (get) {
}
}, weak, false, true);
-},{"./_collection":93,"./_collection-weak":92,"./_validate-collection":197}],352:[function(require,module,exports){
+},{"./_collection":93,"./_collection-weak":92,"./_validate-collection":198}],353:[function(require,module,exports){
'use strict';
// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap
var $export = require('./_export');
@@ -25197,7 +25413,7 @@ $export($export.P, 'Array', {
require('./_add-to-unscopables')('flatMap');
-},{"./_a-function":74,"./_add-to-unscopables":76,"./_array-species-create":86,"./_export":104,"./_flatten-into-array":109,"./_to-length":190,"./_to-object":191}],353:[function(require,module,exports){
+},{"./_a-function":74,"./_add-to-unscopables":76,"./_array-species-create":86,"./_export":104,"./_flatten-into-array":109,"./_to-length":190,"./_to-object":191}],354:[function(require,module,exports){
'use strict';
// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatten
var $export = require('./_export');
@@ -25220,7 +25436,7 @@ $export($export.P, 'Array', {
require('./_add-to-unscopables')('flatten');
-},{"./_add-to-unscopables":76,"./_array-species-create":86,"./_export":104,"./_flatten-into-array":109,"./_to-integer":188,"./_to-length":190,"./_to-object":191}],354:[function(require,module,exports){
+},{"./_add-to-unscopables":76,"./_array-species-create":86,"./_export":104,"./_flatten-into-array":109,"./_to-integer":188,"./_to-length":190,"./_to-object":191}],355:[function(require,module,exports){
'use strict';
// https://github.com/tc39/Array.prototype.includes
var $export = require('./_export');
@@ -25234,7 +25450,7 @@ $export($export.P, 'Array', {
require('./_add-to-unscopables')('includes');
-},{"./_add-to-unscopables":76,"./_array-includes":82,"./_export":104}],355:[function(require,module,exports){
+},{"./_add-to-unscopables":76,"./_array-includes":82,"./_export":104}],356:[function(require,module,exports){
// https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask
var $export = require('./_export');
var microtask = require('./_microtask')();
@@ -25248,7 +25464,7 @@ $export($export.G, {
}
});
-},{"./_cof":89,"./_export":104,"./_global":111,"./_microtask":139}],356:[function(require,module,exports){
+},{"./_cof":89,"./_export":104,"./_global":111,"./_microtask":139}],357:[function(require,module,exports){
// https://github.com/ljharb/proposal-is-error
var $export = require('./_export');
var cof = require('./_cof');
@@ -25259,27 +25475,27 @@ $export($export.S, 'Error', {
}
});
-},{"./_cof":89,"./_export":104}],357:[function(require,module,exports){
+},{"./_cof":89,"./_export":104}],358:[function(require,module,exports){
// https://github.com/tc39/proposal-global
var $export = require('./_export');
$export($export.G, { global: require('./_global') });
-},{"./_export":104,"./_global":111}],358:[function(require,module,exports){
+},{"./_export":104,"./_global":111}],359:[function(require,module,exports){
// https://tc39.github.io/proposal-setmap-offrom/#sec-map.from
require('./_set-collection-from')('Map');
-},{"./_set-collection-from":169}],359:[function(require,module,exports){
+},{"./_set-collection-from":169}],360:[function(require,module,exports){
// https://tc39.github.io/proposal-setmap-offrom/#sec-map.of
require('./_set-collection-of')('Map');
-},{"./_set-collection-of":170}],360:[function(require,module,exports){
+},{"./_set-collection-of":170}],361:[function(require,module,exports){
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
var $export = require('./_export');
$export($export.P + $export.R, 'Map', { toJSON: require('./_collection-to-json')('Map') });
-},{"./_collection-to-json":91,"./_export":104}],361:[function(require,module,exports){
+},{"./_collection-to-json":91,"./_export":104}],362:[function(require,module,exports){
// https://rwaldron.github.io/proposal-math-extensions/
var $export = require('./_export');
@@ -25289,13 +25505,13 @@ $export($export.S, 'Math', {
}
});
-},{"./_export":104}],362:[function(require,module,exports){
+},{"./_export":104}],363:[function(require,module,exports){
// https://rwaldron.github.io/proposal-math-extensions/
var $export = require('./_export');
$export($export.S, 'Math', { DEG_PER_RAD: Math.PI / 180 });
-},{"./_export":104}],363:[function(require,module,exports){
+},{"./_export":104}],364:[function(require,module,exports){
// https://rwaldron.github.io/proposal-math-extensions/
var $export = require('./_export');
var RAD_PER_DEG = 180 / Math.PI;
@@ -25306,7 +25522,7 @@ $export($export.S, 'Math', {
}
});
-},{"./_export":104}],364:[function(require,module,exports){
+},{"./_export":104}],365:[function(require,module,exports){
// https://rwaldron.github.io/proposal-math-extensions/
var $export = require('./_export');
var scale = require('./_math-scale');
@@ -25318,7 +25534,7 @@ $export($export.S, 'Math', {
}
});
-},{"./_export":104,"./_math-fround":133,"./_math-scale":135}],365:[function(require,module,exports){
+},{"./_export":104,"./_math-fround":133,"./_math-scale":135}],366:[function(require,module,exports){
// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
var $export = require('./_export');
@@ -25331,7 +25547,7 @@ $export($export.S, 'Math', {
}
});
-},{"./_export":104}],366:[function(require,module,exports){
+},{"./_export":104}],367:[function(require,module,exports){
// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
var $export = require('./_export');
@@ -25349,7 +25565,7 @@ $export($export.S, 'Math', {
}
});
-},{"./_export":104}],367:[function(require,module,exports){
+},{"./_export":104}],368:[function(require,module,exports){
// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
var $export = require('./_export');
@@ -25362,13 +25578,13 @@ $export($export.S, 'Math', {
}
});
-},{"./_export":104}],368:[function(require,module,exports){
+},{"./_export":104}],369:[function(require,module,exports){
// https://rwaldron.github.io/proposal-math-extensions/
var $export = require('./_export');
$export($export.S, 'Math', { RAD_PER_DEG: 180 / Math.PI });
-},{"./_export":104}],369:[function(require,module,exports){
+},{"./_export":104}],370:[function(require,module,exports){
// https://rwaldron.github.io/proposal-math-extensions/
var $export = require('./_export');
var DEG_PER_RAD = Math.PI / 180;
@@ -25379,13 +25595,13 @@ $export($export.S, 'Math', {
}
});
-},{"./_export":104}],370:[function(require,module,exports){
+},{"./_export":104}],371:[function(require,module,exports){
// https://rwaldron.github.io/proposal-math-extensions/
var $export = require('./_export');
$export($export.S, 'Math', { scale: require('./_math-scale') });
-},{"./_export":104,"./_math-scale":135}],371:[function(require,module,exports){
+},{"./_export":104,"./_math-scale":135}],372:[function(require,module,exports){
// http://jfbastien.github.io/papers/Math.signbit.html
var $export = require('./_export');
@@ -25394,7 +25610,7 @@ $export($export.S, 'Math', { signbit: function signbit(x) {
return (x = +x) != x ? x : x == 0 ? 1 / x == Infinity : x > 0;
} });
-},{"./_export":104}],372:[function(require,module,exports){
+},{"./_export":104}],373:[function(require,module,exports){
// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
var $export = require('./_export');
@@ -25412,7 +25628,7 @@ $export($export.S, 'Math', {
}
});
-},{"./_export":104}],373:[function(require,module,exports){
+},{"./_export":104}],374:[function(require,module,exports){
'use strict';
var $export = require('./_export');
var toObject = require('./_to-object');
@@ -25426,7 +25642,7 @@ require('./_descriptors') && $export($export.P + require('./_object-forced-pam')
}
});
-},{"./_a-function":74,"./_descriptors":100,"./_export":104,"./_object-dp":144,"./_object-forced-pam":146,"./_to-object":191}],374:[function(require,module,exports){
+},{"./_a-function":74,"./_descriptors":100,"./_export":104,"./_object-dp":144,"./_object-forced-pam":146,"./_to-object":191}],375:[function(require,module,exports){
'use strict';
var $export = require('./_export');
var toObject = require('./_to-object');
@@ -25440,7 +25656,7 @@ require('./_descriptors') && $export($export.P + require('./_object-forced-pam')
}
});
-},{"./_a-function":74,"./_descriptors":100,"./_export":104,"./_object-dp":144,"./_object-forced-pam":146,"./_to-object":191}],375:[function(require,module,exports){
+},{"./_a-function":74,"./_descriptors":100,"./_export":104,"./_object-dp":144,"./_object-forced-pam":146,"./_to-object":191}],376:[function(require,module,exports){
// https://github.com/tc39/proposal-object-values-entries
var $export = require('./_export');
var $entries = require('./_object-to-array')(true);
@@ -25451,7 +25667,7 @@ $export($export.S, 'Object', {
}
});
-},{"./_export":104,"./_object-to-array":156}],376:[function(require,module,exports){
+},{"./_export":104,"./_object-to-array":156}],377:[function(require,module,exports){
// https://github.com/tc39/proposal-object-getownpropertydescriptors
var $export = require('./_export');
var ownKeys = require('./_own-keys');
@@ -25475,7 +25691,7 @@ $export($export.S, 'Object', {
}
});
-},{"./_create-property":95,"./_export":104,"./_object-gopd":147,"./_own-keys":157,"./_to-iobject":189}],377:[function(require,module,exports){
+},{"./_create-property":95,"./_export":104,"./_object-gopd":147,"./_own-keys":157,"./_to-iobject":189}],378:[function(require,module,exports){
'use strict';
var $export = require('./_export');
var toObject = require('./_to-object');
@@ -25495,7 +25711,7 @@ require('./_descriptors') && $export($export.P + require('./_object-forced-pam')
}
});
-},{"./_descriptors":100,"./_export":104,"./_object-forced-pam":146,"./_object-gopd":147,"./_object-gpo":151,"./_to-object":191,"./_to-primitive":192}],378:[function(require,module,exports){
+},{"./_descriptors":100,"./_export":104,"./_object-forced-pam":146,"./_object-gopd":147,"./_object-gpo":151,"./_to-object":191,"./_to-primitive":192}],379:[function(require,module,exports){
'use strict';
var $export = require('./_export');
var toObject = require('./_to-object');
@@ -25515,7 +25731,7 @@ require('./_descriptors') && $export($export.P + require('./_object-forced-pam')
}
});
-},{"./_descriptors":100,"./_export":104,"./_object-forced-pam":146,"./_object-gopd":147,"./_object-gpo":151,"./_to-object":191,"./_to-primitive":192}],379:[function(require,module,exports){
+},{"./_descriptors":100,"./_export":104,"./_object-forced-pam":146,"./_object-gopd":147,"./_object-gpo":151,"./_to-object":191,"./_to-primitive":192}],380:[function(require,module,exports){
// https://github.com/tc39/proposal-object-values-entries
var $export = require('./_export');
var $values = require('./_object-to-array')(false);
@@ -25526,7 +25742,7 @@ $export($export.S, 'Object', {
}
});
-},{"./_export":104,"./_object-to-array":156}],380:[function(require,module,exports){
+},{"./_export":104,"./_object-to-array":156}],381:[function(require,module,exports){
'use strict';
// https://github.com/zenparsing/es-observable
var $export = require('./_export');
@@ -25705,7 +25921,7 @@ redefineAll($Observable, {
});
},
of: function of() {
- for (var i = 0, l = arguments.length, items = Array(l); i < l;) items[i] = arguments[i++];
+ for (var i = 0, l = arguments.length, items = new Array(l); i < l;) items[i] = arguments[i++];
return new (typeof this === 'function' ? this : $Observable)(function (observer) {
var done = false;
microtask(function () {
@@ -25727,7 +25943,7 @@ $export($export.G, { Observable: $Observable });
require('./_set-species')('Observable');
-},{"./_a-function":74,"./_an-instance":77,"./_an-object":78,"./_core":94,"./_export":104,"./_for-of":110,"./_global":111,"./_hide":113,"./_microtask":139,"./_redefine-all":165,"./_set-species":172,"./_wks":200}],381:[function(require,module,exports){
+},{"./_a-function":74,"./_an-instance":77,"./_an-object":78,"./_core":94,"./_export":104,"./_for-of":110,"./_global":111,"./_hide":113,"./_microtask":139,"./_redefine-all":165,"./_set-species":172,"./_wks":201}],382:[function(require,module,exports){
// https://github.com/tc39/proposal-promise-finally
'use strict';
var $export = require('./_export');
@@ -25749,7 +25965,7 @@ $export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) {
);
} });
-},{"./_core":94,"./_export":104,"./_global":111,"./_promise-resolve":163,"./_species-constructor":176}],382:[function(require,module,exports){
+},{"./_core":94,"./_export":104,"./_global":111,"./_promise-resolve":163,"./_species-constructor":176}],383:[function(require,module,exports){
'use strict';
// https://github.com/tc39/proposal-promise-try
var $export = require('./_export');
@@ -25763,7 +25979,7 @@ $export($export.S, 'Promise', { 'try': function (callbackfn) {
return promiseCapability.promise;
} });
-},{"./_export":104,"./_new-promise-capability":140,"./_perform":162}],383:[function(require,module,exports){
+},{"./_export":104,"./_new-promise-capability":140,"./_perform":162}],384:[function(require,module,exports){
var metadata = require('./_metadata');
var anObject = require('./_an-object');
var toMetaKey = metadata.key;
@@ -25773,7 +25989,7 @@ metadata.exp({ defineMetadata: function defineMetadata(metadataKey, metadataValu
ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey));
} });
-},{"./_an-object":78,"./_metadata":138}],384:[function(require,module,exports){
+},{"./_an-object":78,"./_metadata":138}],385:[function(require,module,exports){
var metadata = require('./_metadata');
var anObject = require('./_an-object');
var toMetaKey = metadata.key;
@@ -25790,7 +26006,7 @@ metadata.exp({ deleteMetadata: function deleteMetadata(metadataKey, target /* ,
return !!targetMetadata.size || store['delete'](target);
} });
-},{"./_an-object":78,"./_metadata":138}],385:[function(require,module,exports){
+},{"./_an-object":78,"./_metadata":138}],386:[function(require,module,exports){
var Set = require('./es6.set');
var from = require('./_array-from-iterable');
var metadata = require('./_metadata');
@@ -25811,7 +26027,7 @@ metadata.exp({ getMetadataKeys: function getMetadataKeys(target /* , targetKey *
return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
} });
-},{"./_an-object":78,"./_array-from-iterable":81,"./_metadata":138,"./_object-gpo":151,"./es6.set":315}],386:[function(require,module,exports){
+},{"./_an-object":78,"./_array-from-iterable":81,"./_metadata":138,"./_object-gpo":151,"./es6.set":316}],387:[function(require,module,exports){
var metadata = require('./_metadata');
var anObject = require('./_an-object');
var getPrototypeOf = require('./_object-gpo');
@@ -25830,7 +26046,7 @@ metadata.exp({ getMetadata: function getMetadata(metadataKey, target /* , target
return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
} });
-},{"./_an-object":78,"./_metadata":138,"./_object-gpo":151}],387:[function(require,module,exports){
+},{"./_an-object":78,"./_metadata":138,"./_object-gpo":151}],388:[function(require,module,exports){
var metadata = require('./_metadata');
var anObject = require('./_an-object');
var ordinaryOwnMetadataKeys = metadata.keys;
@@ -25840,7 +26056,7 @@ metadata.exp({ getOwnMetadataKeys: function getOwnMetadataKeys(target /* , targe
return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
} });
-},{"./_an-object":78,"./_metadata":138}],388:[function(require,module,exports){
+},{"./_an-object":78,"./_metadata":138}],389:[function(require,module,exports){
var metadata = require('./_metadata');
var anObject = require('./_an-object');
var ordinaryGetOwnMetadata = metadata.get;
@@ -25851,7 +26067,7 @@ metadata.exp({ getOwnMetadata: function getOwnMetadata(metadataKey, target /* ,
, arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
} });
-},{"./_an-object":78,"./_metadata":138}],389:[function(require,module,exports){
+},{"./_an-object":78,"./_metadata":138}],390:[function(require,module,exports){
var metadata = require('./_metadata');
var anObject = require('./_an-object');
var getPrototypeOf = require('./_object-gpo');
@@ -25869,7 +26085,7 @@ metadata.exp({ hasMetadata: function hasMetadata(metadataKey, target /* , target
return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
} });
-},{"./_an-object":78,"./_metadata":138,"./_object-gpo":151}],390:[function(require,module,exports){
+},{"./_an-object":78,"./_metadata":138,"./_object-gpo":151}],391:[function(require,module,exports){
var metadata = require('./_metadata');
var anObject = require('./_an-object');
var ordinaryHasOwnMetadata = metadata.has;
@@ -25880,7 +26096,7 @@ metadata.exp({ hasOwnMetadata: function hasOwnMetadata(metadataKey, target /* ,
, arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
} });
-},{"./_an-object":78,"./_metadata":138}],391:[function(require,module,exports){
+},{"./_an-object":78,"./_metadata":138}],392:[function(require,module,exports){
var $metadata = require('./_metadata');
var anObject = require('./_an-object');
var aFunction = require('./_a-function');
@@ -25897,21 +26113,21 @@ $metadata.exp({ metadata: function metadata(metadataKey, metadataValue) {
};
} });
-},{"./_a-function":74,"./_an-object":78,"./_metadata":138}],392:[function(require,module,exports){
+},{"./_a-function":74,"./_an-object":78,"./_metadata":138}],393:[function(require,module,exports){
// https://tc39.github.io/proposal-setmap-offrom/#sec-set.from
require('./_set-collection-from')('Set');
-},{"./_set-collection-from":169}],393:[function(require,module,exports){
+},{"./_set-collection-from":169}],394:[function(require,module,exports){
// https://tc39.github.io/proposal-setmap-offrom/#sec-set.of
require('./_set-collection-of')('Set');
-},{"./_set-collection-of":170}],394:[function(require,module,exports){
+},{"./_set-collection-of":170}],395:[function(require,module,exports){
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
var $export = require('./_export');
$export($export.P + $export.R, 'Set', { toJSON: require('./_collection-to-json')('Set') });
-},{"./_collection-to-json":91,"./_export":104}],395:[function(require,module,exports){
+},{"./_collection-to-json":91,"./_export":104}],396:[function(require,module,exports){
'use strict';
// https://github.com/mathiasbynens/String.prototype.at
var $export = require('./_export');
@@ -25923,7 +26139,7 @@ $export($export.P, 'String', {
}
});
-},{"./_export":104,"./_string-at":178}],396:[function(require,module,exports){
+},{"./_export":104,"./_string-at":178}],397:[function(require,module,exports){
'use strict';
// https://tc39.github.io/String.prototype.matchAll/
var $export = require('./_export');
@@ -25955,31 +26171,35 @@ $export($export.P, 'String', {
}
});
-},{"./_defined":99,"./_export":104,"./_flags":108,"./_is-regexp":123,"./_iter-create":125,"./_to-length":190}],397:[function(require,module,exports){
+},{"./_defined":99,"./_export":104,"./_flags":108,"./_is-regexp":123,"./_iter-create":125,"./_to-length":190}],398:[function(require,module,exports){
'use strict';
// https://github.com/tc39/proposal-string-pad-start-end
var $export = require('./_export');
var $pad = require('./_string-pad');
+var userAgent = require('./_user-agent');
-$export($export.P, 'String', {
+// https://github.com/zloirock/core-js/issues/280
+$export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', {
padEnd: function padEnd(maxLength /* , fillString = ' ' */) {
return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false);
}
});
-},{"./_export":104,"./_string-pad":181}],398:[function(require,module,exports){
+},{"./_export":104,"./_string-pad":181,"./_user-agent":197}],399:[function(require,module,exports){
'use strict';
// https://github.com/tc39/proposal-string-pad-start-end
var $export = require('./_export');
var $pad = require('./_string-pad');
+var userAgent = require('./_user-agent');
-$export($export.P, 'String', {
+// https://github.com/zloirock/core-js/issues/280
+$export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', {
padStart: function padStart(maxLength /* , fillString = ' ' */) {
return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true);
}
});
-},{"./_export":104,"./_string-pad":181}],399:[function(require,module,exports){
+},{"./_export":104,"./_string-pad":181,"./_user-agent":197}],400:[function(require,module,exports){
'use strict';
// https://github.com/sebmarkbage/ecmascript-string-left-right-trim
require('./_string-trim')('trimLeft', function ($trim) {
@@ -25988,7 +26208,7 @@ require('./_string-trim')('trimLeft', function ($trim) {
};
}, 'trimStart');
-},{"./_string-trim":183}],400:[function(require,module,exports){
+},{"./_string-trim":183}],401:[function(require,module,exports){
'use strict';
// https://github.com/sebmarkbage/ecmascript-string-left-right-trim
require('./_string-trim')('trimRight', function ($trim) {
@@ -25997,35 +26217,35 @@ require('./_string-trim')('trimRight', function ($trim) {
};
}, 'trimEnd');
-},{"./_string-trim":183}],401:[function(require,module,exports){
+},{"./_string-trim":183}],402:[function(require,module,exports){
require('./_wks-define')('asyncIterator');
-},{"./_wks-define":198}],402:[function(require,module,exports){
+},{"./_wks-define":199}],403:[function(require,module,exports){
require('./_wks-define')('observable');
-},{"./_wks-define":198}],403:[function(require,module,exports){
+},{"./_wks-define":199}],404:[function(require,module,exports){
// https://github.com/tc39/proposal-global
var $export = require('./_export');
$export($export.S, 'System', { global: require('./_global') });
-},{"./_export":104,"./_global":111}],404:[function(require,module,exports){
+},{"./_export":104,"./_global":111}],405:[function(require,module,exports){
// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from
require('./_set-collection-from')('WeakMap');
-},{"./_set-collection-from":169}],405:[function(require,module,exports){
+},{"./_set-collection-from":169}],406:[function(require,module,exports){
// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of
require('./_set-collection-of')('WeakMap');
-},{"./_set-collection-of":170}],406:[function(require,module,exports){
+},{"./_set-collection-of":170}],407:[function(require,module,exports){
// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.from
require('./_set-collection-from')('WeakSet');
-},{"./_set-collection-from":169}],407:[function(require,module,exports){
+},{"./_set-collection-from":169}],408:[function(require,module,exports){
// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.of
require('./_set-collection-of')('WeakSet');
-},{"./_set-collection-of":170}],408:[function(require,module,exports){
+},{"./_set-collection-of":170}],409:[function(require,module,exports){
var $iterators = require('./es6.array.iterator');
var getKeys = require('./_object-keys');
var redefine = require('./_redefine');
@@ -26085,7 +26305,7 @@ for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++
}
}
-},{"./_global":111,"./_hide":113,"./_iterators":129,"./_object-keys":153,"./_redefine":166,"./_wks":200,"./es6.array.iterator":225}],409:[function(require,module,exports){
+},{"./_global":111,"./_hide":113,"./_iterators":129,"./_object-keys":153,"./_redefine":166,"./_wks":201,"./es6.array.iterator":226}],410:[function(require,module,exports){
var $export = require('./_export');
var $task = require('./_task');
$export($export.G + $export.B, {
@@ -26093,13 +26313,13 @@ $export($export.G + $export.B, {
clearImmediate: $task.clear
});
-},{"./_export":104,"./_task":185}],410:[function(require,module,exports){
+},{"./_export":104,"./_task":185}],411:[function(require,module,exports){
// ie9- setTimeout & setInterval additional parameters fix
var global = require('./_global');
var $export = require('./_export');
-var navigator = global.navigator;
+var userAgent = require('./_user-agent');
var slice = [].slice;
-var MSIE = !!navigator && /MSIE .\./.test(navigator.userAgent); // <- dirty ie9- check
+var MSIE = /MSIE .\./.test(userAgent); // <- dirty ie9- check
var wrap = function (set) {
return function (fn, time /* , ...args */) {
var boundArgs = arguments.length > 2;
@@ -26115,7 +26335,7 @@ $export($export.G + $export.B + $export.F * MSIE, {
setInterval: wrap(global.setInterval)
});
-},{"./_export":104,"./_global":111}],411:[function(require,module,exports){
+},{"./_export":104,"./_global":111,"./_user-agent":197}],412:[function(require,module,exports){
require('./modules/es6.symbol');
require('./modules/es6.object.create');
require('./modules/es6.object.define-property');
@@ -26314,7 +26534,7 @@ require('./modules/web.immediate');
require('./modules/web.dom.iterable');
module.exports = require('./modules/_core');
-},{"./modules/_core":94,"./modules/es6.array.copy-within":215,"./modules/es6.array.every":216,"./modules/es6.array.fill":217,"./modules/es6.array.filter":218,"./modules/es6.array.find":220,"./modules/es6.array.find-index":219,"./modules/es6.array.for-each":221,"./modules/es6.array.from":222,"./modules/es6.array.index-of":223,"./modules/es6.array.is-array":224,"./modules/es6.array.iterator":225,"./modules/es6.array.join":226,"./modules/es6.array.last-index-of":227,"./modules/es6.array.map":228,"./modules/es6.array.of":229,"./modules/es6.array.reduce":231,"./modules/es6.array.reduce-right":230,"./modules/es6.array.slice":232,"./modules/es6.array.some":233,"./modules/es6.array.sort":234,"./modules/es6.array.species":235,"./modules/es6.date.now":236,"./modules/es6.date.to-iso-string":237,"./modules/es6.date.to-json":238,"./modules/es6.date.to-primitive":239,"./modules/es6.date.to-string":240,"./modules/es6.function.bind":241,"./modules/es6.function.has-instance":242,"./modules/es6.function.name":243,"./modules/es6.map":244,"./modules/es6.math.acosh":245,"./modules/es6.math.asinh":246,"./modules/es6.math.atanh":247,"./modules/es6.math.cbrt":248,"./modules/es6.math.clz32":249,"./modules/es6.math.cosh":250,"./modules/es6.math.expm1":251,"./modules/es6.math.fround":252,"./modules/es6.math.hypot":253,"./modules/es6.math.imul":254,"./modules/es6.math.log10":255,"./modules/es6.math.log1p":256,"./modules/es6.math.log2":257,"./modules/es6.math.sign":258,"./modules/es6.math.sinh":259,"./modules/es6.math.tanh":260,"./modules/es6.math.trunc":261,"./modules/es6.number.constructor":262,"./modules/es6.number.epsilon":263,"./modules/es6.number.is-finite":264,"./modules/es6.number.is-integer":265,"./modules/es6.number.is-nan":266,"./modules/es6.number.is-safe-integer":267,"./modules/es6.number.max-safe-integer":268,"./modules/es6.number.min-safe-integer":269,"./modules/es6.number.parse-float":270,"./modules/es6.number.parse-int":271,"./modules/es6.number.to-fixed":272,"./modules/es6.number.to-precision":273,"./modules/es6.object.assign":274,"./modules/es6.object.create":275,"./modules/es6.object.define-properties":276,"./modules/es6.object.define-property":277,"./modules/es6.object.freeze":278,"./modules/es6.object.get-own-property-descriptor":279,"./modules/es6.object.get-own-property-names":280,"./modules/es6.object.get-prototype-of":281,"./modules/es6.object.is":285,"./modules/es6.object.is-extensible":282,"./modules/es6.object.is-frozen":283,"./modules/es6.object.is-sealed":284,"./modules/es6.object.keys":286,"./modules/es6.object.prevent-extensions":287,"./modules/es6.object.seal":288,"./modules/es6.object.set-prototype-of":289,"./modules/es6.object.to-string":290,"./modules/es6.parse-float":291,"./modules/es6.parse-int":292,"./modules/es6.promise":293,"./modules/es6.reflect.apply":294,"./modules/es6.reflect.construct":295,"./modules/es6.reflect.define-property":296,"./modules/es6.reflect.delete-property":297,"./modules/es6.reflect.enumerate":298,"./modules/es6.reflect.get":301,"./modules/es6.reflect.get-own-property-descriptor":299,"./modules/es6.reflect.get-prototype-of":300,"./modules/es6.reflect.has":302,"./modules/es6.reflect.is-extensible":303,"./modules/es6.reflect.own-keys":304,"./modules/es6.reflect.prevent-extensions":305,"./modules/es6.reflect.set":307,"./modules/es6.reflect.set-prototype-of":306,"./modules/es6.regexp.constructor":308,"./modules/es6.regexp.flags":309,"./modules/es6.regexp.match":310,"./modules/es6.regexp.replace":311,"./modules/es6.regexp.search":312,"./modules/es6.regexp.split":313,"./modules/es6.regexp.to-string":314,"./modules/es6.set":315,"./modules/es6.string.anchor":316,"./modules/es6.string.big":317,"./modules/es6.string.blink":318,"./modules/es6.string.bold":319,"./modules/es6.string.code-point-at":320,"./modules/es6.string.ends-with":321,"./modules/es6.string.fixed":322,"./modules/es6.string.fontcolor":323,"./modules/es6.string.fontsize":324,"./modules/es6.string.from-code-point":325,"./modules/es6.string.includes":326,"./modules/es6.string.italics":327,"./modules/es6.string.iterator":328,"./modules/es6.string.link":329,"./modules/es6.string.raw":330,"./modules/es6.string.repeat":331,"./modules/es6.string.small":332,"./modules/es6.string.starts-with":333,"./modules/es6.string.strike":334,"./modules/es6.string.sub":335,"./modules/es6.string.sup":336,"./modules/es6.string.trim":337,"./modules/es6.symbol":338,"./modules/es6.typed.array-buffer":339,"./modules/es6.typed.data-view":340,"./modules/es6.typed.float32-array":341,"./modules/es6.typed.float64-array":342,"./modules/es6.typed.int16-array":343,"./modules/es6.typed.int32-array":344,"./modules/es6.typed.int8-array":345,"./modules/es6.typed.uint16-array":346,"./modules/es6.typed.uint32-array":347,"./modules/es6.typed.uint8-array":348,"./modules/es6.typed.uint8-clamped-array":349,"./modules/es6.weak-map":350,"./modules/es6.weak-set":351,"./modules/es7.array.flat-map":352,"./modules/es7.array.flatten":353,"./modules/es7.array.includes":354,"./modules/es7.asap":355,"./modules/es7.error.is-error":356,"./modules/es7.global":357,"./modules/es7.map.from":358,"./modules/es7.map.of":359,"./modules/es7.map.to-json":360,"./modules/es7.math.clamp":361,"./modules/es7.math.deg-per-rad":362,"./modules/es7.math.degrees":363,"./modules/es7.math.fscale":364,"./modules/es7.math.iaddh":365,"./modules/es7.math.imulh":366,"./modules/es7.math.isubh":367,"./modules/es7.math.rad-per-deg":368,"./modules/es7.math.radians":369,"./modules/es7.math.scale":370,"./modules/es7.math.signbit":371,"./modules/es7.math.umulh":372,"./modules/es7.object.define-getter":373,"./modules/es7.object.define-setter":374,"./modules/es7.object.entries":375,"./modules/es7.object.get-own-property-descriptors":376,"./modules/es7.object.lookup-getter":377,"./modules/es7.object.lookup-setter":378,"./modules/es7.object.values":379,"./modules/es7.observable":380,"./modules/es7.promise.finally":381,"./modules/es7.promise.try":382,"./modules/es7.reflect.define-metadata":383,"./modules/es7.reflect.delete-metadata":384,"./modules/es7.reflect.get-metadata":386,"./modules/es7.reflect.get-metadata-keys":385,"./modules/es7.reflect.get-own-metadata":388,"./modules/es7.reflect.get-own-metadata-keys":387,"./modules/es7.reflect.has-metadata":389,"./modules/es7.reflect.has-own-metadata":390,"./modules/es7.reflect.metadata":391,"./modules/es7.set.from":392,"./modules/es7.set.of":393,"./modules/es7.set.to-json":394,"./modules/es7.string.at":395,"./modules/es7.string.match-all":396,"./modules/es7.string.pad-end":397,"./modules/es7.string.pad-start":398,"./modules/es7.string.trim-left":399,"./modules/es7.string.trim-right":400,"./modules/es7.symbol.async-iterator":401,"./modules/es7.symbol.observable":402,"./modules/es7.system.global":403,"./modules/es7.weak-map.from":404,"./modules/es7.weak-map.of":405,"./modules/es7.weak-set.from":406,"./modules/es7.weak-set.of":407,"./modules/web.dom.iterable":408,"./modules/web.immediate":409,"./modules/web.timers":410}],412:[function(require,module,exports){
+},{"./modules/_core":94,"./modules/es6.array.copy-within":216,"./modules/es6.array.every":217,"./modules/es6.array.fill":218,"./modules/es6.array.filter":219,"./modules/es6.array.find":221,"./modules/es6.array.find-index":220,"./modules/es6.array.for-each":222,"./modules/es6.array.from":223,"./modules/es6.array.index-of":224,"./modules/es6.array.is-array":225,"./modules/es6.array.iterator":226,"./modules/es6.array.join":227,"./modules/es6.array.last-index-of":228,"./modules/es6.array.map":229,"./modules/es6.array.of":230,"./modules/es6.array.reduce":232,"./modules/es6.array.reduce-right":231,"./modules/es6.array.slice":233,"./modules/es6.array.some":234,"./modules/es6.array.sort":235,"./modules/es6.array.species":236,"./modules/es6.date.now":237,"./modules/es6.date.to-iso-string":238,"./modules/es6.date.to-json":239,"./modules/es6.date.to-primitive":240,"./modules/es6.date.to-string":241,"./modules/es6.function.bind":242,"./modules/es6.function.has-instance":243,"./modules/es6.function.name":244,"./modules/es6.map":245,"./modules/es6.math.acosh":246,"./modules/es6.math.asinh":247,"./modules/es6.math.atanh":248,"./modules/es6.math.cbrt":249,"./modules/es6.math.clz32":250,"./modules/es6.math.cosh":251,"./modules/es6.math.expm1":252,"./modules/es6.math.fround":253,"./modules/es6.math.hypot":254,"./modules/es6.math.imul":255,"./modules/es6.math.log10":256,"./modules/es6.math.log1p":257,"./modules/es6.math.log2":258,"./modules/es6.math.sign":259,"./modules/es6.math.sinh":260,"./modules/es6.math.tanh":261,"./modules/es6.math.trunc":262,"./modules/es6.number.constructor":263,"./modules/es6.number.epsilon":264,"./modules/es6.number.is-finite":265,"./modules/es6.number.is-integer":266,"./modules/es6.number.is-nan":267,"./modules/es6.number.is-safe-integer":268,"./modules/es6.number.max-safe-integer":269,"./modules/es6.number.min-safe-integer":270,"./modules/es6.number.parse-float":271,"./modules/es6.number.parse-int":272,"./modules/es6.number.to-fixed":273,"./modules/es6.number.to-precision":274,"./modules/es6.object.assign":275,"./modules/es6.object.create":276,"./modules/es6.object.define-properties":277,"./modules/es6.object.define-property":278,"./modules/es6.object.freeze":279,"./modules/es6.object.get-own-property-descriptor":280,"./modules/es6.object.get-own-property-names":281,"./modules/es6.object.get-prototype-of":282,"./modules/es6.object.is":286,"./modules/es6.object.is-extensible":283,"./modules/es6.object.is-frozen":284,"./modules/es6.object.is-sealed":285,"./modules/es6.object.keys":287,"./modules/es6.object.prevent-extensions":288,"./modules/es6.object.seal":289,"./modules/es6.object.set-prototype-of":290,"./modules/es6.object.to-string":291,"./modules/es6.parse-float":292,"./modules/es6.parse-int":293,"./modules/es6.promise":294,"./modules/es6.reflect.apply":295,"./modules/es6.reflect.construct":296,"./modules/es6.reflect.define-property":297,"./modules/es6.reflect.delete-property":298,"./modules/es6.reflect.enumerate":299,"./modules/es6.reflect.get":302,"./modules/es6.reflect.get-own-property-descriptor":300,"./modules/es6.reflect.get-prototype-of":301,"./modules/es6.reflect.has":303,"./modules/es6.reflect.is-extensible":304,"./modules/es6.reflect.own-keys":305,"./modules/es6.reflect.prevent-extensions":306,"./modules/es6.reflect.set":308,"./modules/es6.reflect.set-prototype-of":307,"./modules/es6.regexp.constructor":309,"./modules/es6.regexp.flags":310,"./modules/es6.regexp.match":311,"./modules/es6.regexp.replace":312,"./modules/es6.regexp.search":313,"./modules/es6.regexp.split":314,"./modules/es6.regexp.to-string":315,"./modules/es6.set":316,"./modules/es6.string.anchor":317,"./modules/es6.string.big":318,"./modules/es6.string.blink":319,"./modules/es6.string.bold":320,"./modules/es6.string.code-point-at":321,"./modules/es6.string.ends-with":322,"./modules/es6.string.fixed":323,"./modules/es6.string.fontcolor":324,"./modules/es6.string.fontsize":325,"./modules/es6.string.from-code-point":326,"./modules/es6.string.includes":327,"./modules/es6.string.italics":328,"./modules/es6.string.iterator":329,"./modules/es6.string.link":330,"./modules/es6.string.raw":331,"./modules/es6.string.repeat":332,"./modules/es6.string.small":333,"./modules/es6.string.starts-with":334,"./modules/es6.string.strike":335,"./modules/es6.string.sub":336,"./modules/es6.string.sup":337,"./modules/es6.string.trim":338,"./modules/es6.symbol":339,"./modules/es6.typed.array-buffer":340,"./modules/es6.typed.data-view":341,"./modules/es6.typed.float32-array":342,"./modules/es6.typed.float64-array":343,"./modules/es6.typed.int16-array":344,"./modules/es6.typed.int32-array":345,"./modules/es6.typed.int8-array":346,"./modules/es6.typed.uint16-array":347,"./modules/es6.typed.uint32-array":348,"./modules/es6.typed.uint8-array":349,"./modules/es6.typed.uint8-clamped-array":350,"./modules/es6.weak-map":351,"./modules/es6.weak-set":352,"./modules/es7.array.flat-map":353,"./modules/es7.array.flatten":354,"./modules/es7.array.includes":355,"./modules/es7.asap":356,"./modules/es7.error.is-error":357,"./modules/es7.global":358,"./modules/es7.map.from":359,"./modules/es7.map.of":360,"./modules/es7.map.to-json":361,"./modules/es7.math.clamp":362,"./modules/es7.math.deg-per-rad":363,"./modules/es7.math.degrees":364,"./modules/es7.math.fscale":365,"./modules/es7.math.iaddh":366,"./modules/es7.math.imulh":367,"./modules/es7.math.isubh":368,"./modules/es7.math.rad-per-deg":369,"./modules/es7.math.radians":370,"./modules/es7.math.scale":371,"./modules/es7.math.signbit":372,"./modules/es7.math.umulh":373,"./modules/es7.object.define-getter":374,"./modules/es7.object.define-setter":375,"./modules/es7.object.entries":376,"./modules/es7.object.get-own-property-descriptors":377,"./modules/es7.object.lookup-getter":378,"./modules/es7.object.lookup-setter":379,"./modules/es7.object.values":380,"./modules/es7.observable":381,"./modules/es7.promise.finally":382,"./modules/es7.promise.try":383,"./modules/es7.reflect.define-metadata":384,"./modules/es7.reflect.delete-metadata":385,"./modules/es7.reflect.get-metadata":387,"./modules/es7.reflect.get-metadata-keys":386,"./modules/es7.reflect.get-own-metadata":389,"./modules/es7.reflect.get-own-metadata-keys":388,"./modules/es7.reflect.has-metadata":390,"./modules/es7.reflect.has-own-metadata":391,"./modules/es7.reflect.metadata":392,"./modules/es7.set.from":393,"./modules/es7.set.of":394,"./modules/es7.set.to-json":395,"./modules/es7.string.at":396,"./modules/es7.string.match-all":397,"./modules/es7.string.pad-end":398,"./modules/es7.string.pad-start":399,"./modules/es7.string.trim-left":400,"./modules/es7.string.trim-right":401,"./modules/es7.symbol.async-iterator":402,"./modules/es7.symbol.observable":403,"./modules/es7.system.global":404,"./modules/es7.weak-map.from":405,"./modules/es7.weak-map.of":406,"./modules/es7.weak-set.from":407,"./modules/es7.weak-set.of":408,"./modules/web.dom.iterable":409,"./modules/web.immediate":410,"./modules/web.timers":411}],413:[function(require,module,exports){
'use strict';
var assign = require('es5-ext/object/assign')
@@ -26379,7 +26599,7 @@ d.gs = function (dscr, get, set/*, options*/) {
return !options ? desc : assign(normalizeOpts(options), desc);
};
-},{"es5-ext/object/assign":434,"es5-ext/object/is-callable":438,"es5-ext/object/normalize-options":446,"es5-ext/string/#/contains":453}],413:[function(require,module,exports){
+},{"es5-ext/object/assign":435,"es5-ext/object/is-callable":439,"es5-ext/object/normalize-options":447,"es5-ext/string/#/contains":454}],414:[function(require,module,exports){
'use strict';
/* globals Symbol: false, Uint8Array: false, WeakMap: false */
/*!
@@ -26836,7 +27056,7 @@ function isPrimitive(value) {
return value === null || typeof value !== 'object';
}
-},{"type-detect":532}],414:[function(require,module,exports){
+},{"type-detect":529}],415:[function(require,module,exports){
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
@@ -26872,60 +27092,60 @@ function emptyTarget(val) {
return Array.isArray(val) ? [] : {}
}
-function cloneUnlessOtherwiseSpecified(value, optionsArgument) {
- var clone = !optionsArgument || optionsArgument.clone !== false;
-
- return (clone && isMergeableObject(value))
- ? deepmerge(emptyTarget(value), value, optionsArgument)
+function cloneUnlessOtherwiseSpecified(value, options) {
+ return (options.clone !== false && options.isMergeableObject(value))
+ ? deepmerge(emptyTarget(value), value, options)
: value
}
-function defaultArrayMerge(target, source, optionsArgument) {
+function defaultArrayMerge(target, source, options) {
return target.concat(source).map(function(element) {
- return cloneUnlessOtherwiseSpecified(element, optionsArgument)
+ return cloneUnlessOtherwiseSpecified(element, options)
})
}
-function mergeObject(target, source, optionsArgument) {
+function mergeObject(target, source, options) {
var destination = {};
- if (isMergeableObject(target)) {
+ if (options.isMergeableObject(target)) {
Object.keys(target).forEach(function(key) {
- destination[key] = cloneUnlessOtherwiseSpecified(target[key], optionsArgument);
+ destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
});
}
Object.keys(source).forEach(function(key) {
- if (!isMergeableObject(source[key]) || !target[key]) {
- destination[key] = cloneUnlessOtherwiseSpecified(source[key], optionsArgument);
+ if (!options.isMergeableObject(source[key]) || !target[key]) {
+ destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
} else {
- destination[key] = deepmerge(target[key], source[key], optionsArgument);
+ destination[key] = deepmerge(target[key], source[key], options);
}
});
return destination
}
-function deepmerge(target, source, optionsArgument) {
+function deepmerge(target, source, options) {
+ options = options || {};
+ options.arrayMerge = options.arrayMerge || defaultArrayMerge;
+ options.isMergeableObject = options.isMergeableObject || isMergeableObject;
+
var sourceIsArray = Array.isArray(source);
var targetIsArray = Array.isArray(target);
- var options = optionsArgument || { arrayMerge: defaultArrayMerge };
var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
if (!sourceAndTargetTypesMatch) {
- return cloneUnlessOtherwiseSpecified(source, optionsArgument)
+ return cloneUnlessOtherwiseSpecified(source, options)
} else if (sourceIsArray) {
- var arrayMerge = options.arrayMerge || defaultArrayMerge;
- return arrayMerge(target, source, optionsArgument)
+ return options.arrayMerge(target, source, options)
} else {
- return mergeObject(target, source, optionsArgument)
+ return mergeObject(target, source, options)
}
}
-deepmerge.all = function deepmergeAll(array, optionsArgument) {
+deepmerge.all = function deepmergeAll(array, options) {
if (!Array.isArray(array)) {
throw new Error('first argument should be an array')
}
return array.reduce(function(prev, next) {
- return deepmerge(prev, next, optionsArgument)
+ return deepmerge(prev, next, options)
}, {})
};
@@ -26935,7 +27155,7 @@ return deepmerge_1;
})));
-},{}],415:[function(require,module,exports){
+},{}],416:[function(require,module,exports){
"use strict";
var numberIsNaN = require("../../number/is-nan")
@@ -26965,14 +27185,14 @@ module.exports = function (searchElement /*, fromIndex*/) {
return -1;
};
-},{"../../number/is-nan":428,"../../number/to-pos-integer":432,"../../object/valid-value":449}],416:[function(require,module,exports){
+},{"../../number/is-nan":429,"../../number/to-pos-integer":433,"../../object/valid-value":450}],417:[function(require,module,exports){
"use strict";
module.exports = require("./is-implemented")()
? Array.from
: require("./shim");
-},{"./is-implemented":417,"./shim":418}],417:[function(require,module,exports){
+},{"./is-implemented":418,"./shim":419}],418:[function(require,module,exports){
"use strict";
module.exports = function () {
@@ -26983,7 +27203,7 @@ module.exports = function () {
return Boolean(result && (result !== arr) && (result[1] === "dwa"));
};
-},{}],418:[function(require,module,exports){
+},{}],419:[function(require,module,exports){
"use strict";
var iteratorSymbol = require("es6-symbol").iterator
@@ -27104,7 +27324,7 @@ module.exports = function (arrayLike /*, mapFn, thisArg*/) {
return arr;
};
-},{"../../function/is-arguments":422,"../../function/is-function":423,"../../number/to-pos-integer":432,"../../object/is-value":440,"../../object/valid-callable":448,"../../object/valid-value":449,"../../string/is-string":456,"es6-symbol":458}],419:[function(require,module,exports){
+},{"../../function/is-arguments":423,"../../function/is-function":424,"../../number/to-pos-integer":433,"../../object/is-value":441,"../../object/valid-callable":449,"../../object/valid-value":450,"../../string/is-string":457,"es6-symbol":459}],420:[function(require,module,exports){
"use strict";
var from = require("./from")
@@ -27115,7 +27335,7 @@ module.exports = function (arrayLike) {
return isArray(arrayLike) ? arrayLike : from(arrayLike);
};
-},{"./from":416}],420:[function(require,module,exports){
+},{"./from":417}],421:[function(require,module,exports){
"use strict";
var assign = require("../object/assign")
@@ -27137,7 +27357,7 @@ exports = module.exports = function (message /*, code, ext*/) {
return err;
};
-},{"../object/assign":434,"../object/is-object":439,"../object/is-value":440}],421:[function(require,module,exports){
+},{"../object/assign":435,"../object/is-object":440,"../object/is-value":441}],422:[function(require,module,exports){
"use strict";
var toPosInt = require("../number/to-pos-integer");
@@ -27195,7 +27415,7 @@ if (test.length === 1) {
};
}
-},{"../number/to-pos-integer":432,"../object/mixin":445}],422:[function(require,module,exports){
+},{"../number/to-pos-integer":433,"../object/mixin":446}],423:[function(require,module,exports){
"use strict";
var objToString = Object.prototype.toString
@@ -27209,7 +27429,7 @@ module.exports = function (value) {
return objToString.call(value) === id;
};
-},{}],423:[function(require,module,exports){
+},{}],424:[function(require,module,exports){
"use strict";
var objToString = Object.prototype.toString, id = objToString.call(require("./noop"));
@@ -27218,20 +27438,20 @@ module.exports = function (value) {
return typeof value === "function" && objToString.call(value) === id;
};
-},{"./noop":424}],424:[function(require,module,exports){
+},{"./noop":425}],425:[function(require,module,exports){
"use strict";
// eslint-disable-next-line no-empty-function
module.exports = function () {};
-},{}],425:[function(require,module,exports){
+},{}],426:[function(require,module,exports){
"use strict";
module.exports = require("./is-implemented")()
? Math.sign
: require("./shim");
-},{"./is-implemented":426,"./shim":427}],426:[function(require,module,exports){
+},{"./is-implemented":427,"./shim":428}],427:[function(require,module,exports){
"use strict";
module.exports = function () {
@@ -27240,7 +27460,7 @@ module.exports = function () {
return (sign(10) === 1) && (sign(-20) === -1);
};
-},{}],427:[function(require,module,exports){
+},{}],428:[function(require,module,exports){
"use strict";
module.exports = function (value) {
@@ -27249,14 +27469,14 @@ module.exports = function (value) {
return value > 0 ? 1 : -1;
};
-},{}],428:[function(require,module,exports){
+},{}],429:[function(require,module,exports){
"use strict";
module.exports = require("./is-implemented")()
? Number.isNaN
: require("./shim");
-},{"./is-implemented":429,"./shim":430}],429:[function(require,module,exports){
+},{"./is-implemented":430,"./shim":431}],430:[function(require,module,exports){
"use strict";
module.exports = function () {
@@ -27265,7 +27485,7 @@ module.exports = function () {
return !numberIsNaN({}) && numberIsNaN(NaN) && !numberIsNaN(34);
};
-},{}],430:[function(require,module,exports){
+},{}],431:[function(require,module,exports){
"use strict";
module.exports = function (value) {
@@ -27273,7 +27493,7 @@ module.exports = function (value) {
return value !== value;
};
-},{}],431:[function(require,module,exports){
+},{}],432:[function(require,module,exports){
"use strict";
var sign = require("../math/sign")
@@ -27287,7 +27507,7 @@ module.exports = function (value) {
return sign(value) * floor(abs(value));
};
-},{"../math/sign":425}],432:[function(require,module,exports){
+},{"../math/sign":426}],433:[function(require,module,exports){
"use strict";
var toInteger = require("./to-integer")
@@ -27298,7 +27518,7 @@ module.exports = function (value) {
return max(0, toInteger(value));
};
-},{"./to-integer":431}],433:[function(require,module,exports){
+},{"./to-integer":432}],434:[function(require,module,exports){
// Internal method, used by iteration functions.
// Calls a function for each key-value pair found in object
// Optionally takes compareFn to iterate object in specific order
@@ -27330,14 +27550,14 @@ module.exports = function (method, defVal) {
};
};
-},{"./valid-callable":448,"./valid-value":449}],434:[function(require,module,exports){
+},{"./valid-callable":449,"./valid-value":450}],435:[function(require,module,exports){
"use strict";
module.exports = require("./is-implemented")()
? Object.assign
: require("./shim");
-},{"./is-implemented":435,"./shim":436}],435:[function(require,module,exports){
+},{"./is-implemented":436,"./shim":437}],436:[function(require,module,exports){
"use strict";
module.exports = function () {
@@ -27348,7 +27568,7 @@ module.exports = function () {
return (obj.foo + obj.bar + obj.trzy) === "razdwatrzy";
};
-},{}],436:[function(require,module,exports){
+},{}],437:[function(require,module,exports){
"use strict";
var keys = require("../keys")
@@ -27373,12 +27593,12 @@ module.exports = function (dest, src /*, …srcn*/) {
return dest;
};
-},{"../keys":441,"../valid-value":449}],437:[function(require,module,exports){
+},{"../keys":442,"../valid-value":450}],438:[function(require,module,exports){
"use strict";
module.exports = require("./_iterate")("forEach");
-},{"./_iterate":433}],438:[function(require,module,exports){
+},{"./_iterate":434}],439:[function(require,module,exports){
// Deprecated
"use strict";
@@ -27387,7 +27607,7 @@ module.exports = function (obj) {
return typeof obj === "function";
};
-},{}],439:[function(require,module,exports){
+},{}],440:[function(require,module,exports){
"use strict";
var isValue = require("./is-value");
@@ -27398,7 +27618,7 @@ module.exports = function (value) {
return (isValue(value) && map[typeof value]) || false;
};
-},{"./is-value":440}],440:[function(require,module,exports){
+},{"./is-value":441}],441:[function(require,module,exports){
"use strict";
var _undefined = require("../function/noop")(); // Support ES3 engines
@@ -27407,14 +27627,12 @@ module.exports = function (val) {
return (val !== _undefined) && (val !== null);
};
-},{"../function/noop":424}],441:[function(require,module,exports){
+},{"../function/noop":425}],442:[function(require,module,exports){
"use strict";
-module.exports = require("./is-implemented")()
- ? Object.keys
- : require("./shim");
+module.exports = require("./is-implemented")() ? Object.keys : require("./shim");
-},{"./is-implemented":442,"./shim":443}],442:[function(require,module,exports){
+},{"./is-implemented":443,"./shim":444}],443:[function(require,module,exports){
"use strict";
module.exports = function () {
@@ -27422,22 +27640,20 @@ module.exports = function () {
Object.keys("primitive");
return true;
} catch (e) {
- return false;
-}
+ return false;
+ }
};
-},{}],443:[function(require,module,exports){
+},{}],444:[function(require,module,exports){
"use strict";
var isValue = require("../is-value");
var keys = Object.keys;
-module.exports = function (object) {
- return keys(isValue(object) ? Object(object) : object);
-};
+module.exports = function (object) { return keys(isValue(object) ? Object(object) : object); };
-},{"../is-value":440}],444:[function(require,module,exports){
+},{"../is-value":441}],445:[function(require,module,exports){
"use strict";
var callable = require("./valid-callable")
@@ -27453,7 +27669,7 @@ module.exports = function (obj, cb /*, thisArg*/) {
return result;
};
-},{"./for-each":437,"./valid-callable":448}],445:[function(require,module,exports){
+},{"./for-each":438,"./valid-callable":449}],446:[function(require,module,exports){
"use strict";
var value = require("./valid-value")
@@ -27486,7 +27702,7 @@ module.exports = function (target, source) {
return target;
};
-},{"./valid-value":449}],446:[function(require,module,exports){
+},{"./valid-value":450}],447:[function(require,module,exports){
"use strict";
var isValue = require("./is-value");
@@ -27508,7 +27724,7 @@ module.exports = function (opts1 /*, …options*/) {
return result;
};
-},{"./is-value":440}],447:[function(require,module,exports){
+},{"./is-value":441}],448:[function(require,module,exports){
"use strict";
var forEach = Array.prototype.forEach, create = Object.create;
@@ -27522,7 +27738,7 @@ module.exports = function (arg /*, …args*/) {
return set;
};
-},{}],448:[function(require,module,exports){
+},{}],449:[function(require,module,exports){
"use strict";
module.exports = function (fn) {
@@ -27530,7 +27746,7 @@ module.exports = function (fn) {
return fn;
};
-},{}],449:[function(require,module,exports){
+},{}],450:[function(require,module,exports){
"use strict";
var isValue = require("./is-value");
@@ -27540,7 +27756,7 @@ module.exports = function (value) {
return value;
};
-},{"./is-value":440}],450:[function(require,module,exports){
+},{"./is-value":441}],451:[function(require,module,exports){
"use strict";
var ensureValue = require("./valid-value")
@@ -27550,7 +27766,7 @@ module.exports = function (value) {
return stringifiable(ensureValue(value));
};
-},{"./valid-value":449,"./validate-stringifiable":451}],451:[function(require,module,exports){
+},{"./valid-value":450,"./validate-stringifiable":452}],452:[function(require,module,exports){
"use strict";
var isCallable = require("./is-callable");
@@ -27564,7 +27780,7 @@ module.exports = function (stringifiable) {
}
};
-},{"./is-callable":438}],452:[function(require,module,exports){
+},{"./is-callable":439}],453:[function(require,module,exports){
"use strict";
var isCallable = require("./object/is-callable");
@@ -27574,18 +27790,18 @@ module.exports = function (value) {
if (value && isCallable(value.toString)) return value.toString();
return String(value);
} catch (e) {
- return "";
+ return "";
}
};
-},{"./object/is-callable":438}],453:[function(require,module,exports){
+},{"./object/is-callable":439}],454:[function(require,module,exports){
"use strict";
module.exports = require("./is-implemented")()
? String.prototype.contains
: require("./shim");
-},{"./is-implemented":454,"./shim":455}],454:[function(require,module,exports){
+},{"./is-implemented":455,"./shim":456}],455:[function(require,module,exports){
"use strict";
var str = "razdwatrzy";
@@ -27595,7 +27811,7 @@ module.exports = function () {
return (str.contains("dwa") === true) && (str.contains("foo") === false);
};
-},{}],455:[function(require,module,exports){
+},{}],456:[function(require,module,exports){
"use strict";
var indexOf = String.prototype.indexOf;
@@ -27604,7 +27820,7 @@ module.exports = function (searchString/*, position*/) {
return indexOf.call(this, searchString, arguments[1]) > -1;
};
-},{}],456:[function(require,module,exports){
+},{}],457:[function(require,module,exports){
"use strict";
var objToString = Object.prototype.toString, id = objToString.call("");
@@ -27619,7 +27835,7 @@ module.exports = function (value) {
);
};
-},{}],457:[function(require,module,exports){
+},{}],458:[function(require,module,exports){
"use strict";
var safeToString = require("./safe-to-string");
@@ -27637,12 +27853,12 @@ module.exports = function (value) {
return string;
};
-},{"./safe-to-string":452}],458:[function(require,module,exports){
+},{"./safe-to-string":453}],459:[function(require,module,exports){
'use strict';
module.exports = require('./is-implemented')() ? Symbol : require('./polyfill');
-},{"./is-implemented":459,"./polyfill":461}],459:[function(require,module,exports){
+},{"./is-implemented":460,"./polyfill":462}],460:[function(require,module,exports){
'use strict';
var validTypes = { object: true, symbol: true };
@@ -27661,7 +27877,7 @@ module.exports = function () {
return true;
};
-},{}],460:[function(require,module,exports){
+},{}],461:[function(require,module,exports){
'use strict';
module.exports = function (x) {
@@ -27672,7 +27888,7 @@ module.exports = function (x) {
return (x[x.constructor.toStringTag] === 'Symbol');
};
-},{}],461:[function(require,module,exports){
+},{}],462:[function(require,module,exports){
// ES2015 Symbol polyfill for environments that do not (or partially) support it
'use strict';
@@ -27792,7 +28008,7 @@ defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toStringTag,
defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toPrimitive,
d('c', SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive]));
-},{"./validate-symbol":462,"d":412}],462:[function(require,module,exports){
+},{"./validate-symbol":463,"d":413}],463:[function(require,module,exports){
'use strict';
var isSymbol = require('./is-symbol');
@@ -27802,7 +28018,7 @@ module.exports = function (value) {
return value;
};
-},{"./is-symbol":460}],463:[function(require,module,exports){
+},{"./is-symbol":461}],464:[function(require,module,exports){
'use strict';
var d = require('d')
@@ -27936,7 +28152,7 @@ module.exports = exports = function (o) {
};
exports.methods = methods;
-},{"d":412,"es5-ext/object/valid-callable":448}],464:[function(require,module,exports){
+},{"d":413,"es5-ext/object/valid-callable":449}],465:[function(require,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
@@ -28240,7 +28456,7 @@ function isUndefined(arg) {
return arg === void 0;
}
-},{}],465:[function(require,module,exports){
+},{}],466:[function(require,module,exports){
"use strict";
var __values = (this && this.__values) || function (o) {
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
@@ -28323,7 +28539,7 @@ var makeKeyRange = function (range, lowers, uppers) {
var e_1, _a, e_2, _b;
};
// http://www.w3.org/TR/2015/REC-IndexedDB-20150108/#cursor
-var FDBCursor = (function () {
+var FDBCursor = /** @class */ (function () {
function FDBCursor(source, range, direction, request, keyOnly) {
if (direction === void 0) { direction = "next"; }
if (keyOnly === void 0) { keyOnly = false; }
@@ -28375,13 +28591,9 @@ var FDBCursor = (function () {
// https://w3c.github.io/IndexedDB/#iterate-a-cursor
FDBCursor.prototype._iterate = function (key, primaryKey) {
var sourceIsObjectStore = this.source instanceof FDBObjectStore_1.default;
- var records;
- if (this.source instanceof FDBObjectStore_1.default) {
- records = this.source._rawObjectStore.records;
- }
- else {
- records = this.source._rawIndex.records;
- }
+ // Can't use sourceIsObjectStore because TypeScript
+ var records = this.source instanceof FDBObjectStore_1.default ?
+ this.source._rawObjectStore.records : this.source._rawIndex.records;
var foundRecord;
if (this.direction === "next") {
var range = makeKeyRange(this._range, [key, this._position], []);
@@ -28788,7 +29000,7 @@ var FDBCursor = (function () {
}());
exports.default = FDBCursor;
-},{"./FDBKeyRange":470,"./FDBObjectStore":471,"./lib/cmp":486,"./lib/errors":488,"./lib/extractKey":489,"./lib/structuredClone":491,"./lib/valueToKey":493}],466:[function(require,module,exports){
+},{"./FDBKeyRange":471,"./FDBObjectStore":472,"./lib/cmp":487,"./lib/errors":489,"./lib/extractKey":490,"./lib/structuredClone":492,"./lib/valueToKey":494}],467:[function(require,module,exports){
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
@@ -28802,7 +29014,7 @@ var __extends = (this && this.__extends) || (function () {
})();
Object.defineProperty(exports, "__esModule", { value: true });
var FDBCursor_1 = require("./FDBCursor");
-var FDBCursorWithValue = (function (_super) {
+var FDBCursorWithValue = /** @class */ (function (_super) {
__extends(FDBCursorWithValue, _super);
function FDBCursorWithValue(source, range, direction, request) {
var _this = _super.call(this, source, range, direction, request) || this;
@@ -28816,7 +29028,8 @@ var FDBCursorWithValue = (function (_super) {
}(FDBCursor_1.default));
exports.default = FDBCursorWithValue;
-},{"./FDBCursor":465}],467:[function(require,module,exports){
+},{"./FDBCursor":466}],468:[function(require,module,exports){
+(function (setImmediate){
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
@@ -28881,7 +29094,7 @@ var closeConnection = function (connection) {
}
};
// http://www.w3.org/TR/2015/REC-IndexedDB-20150108/#database-interface
-var FDBDatabase = (function (_super) {
+var FDBDatabase = /** @class */ (function (_super) {
__extends(FDBDatabase, _super);
function FDBDatabase(rawDatabase) {
var _this = _super.call(this) || this;
@@ -28957,12 +29170,13 @@ var FDBDatabase = (function (_super) {
transaction._objectStoresCache.delete(name);
};
FDBDatabase.prototype.transaction = function (storeNames, mode) {
+ var _this = this;
mode = mode !== undefined ? mode : "readonly";
if (mode !== "readonly" && mode !== "readwrite" && mode !== "versionchange") {
throw new TypeError("Invalid mode: " + mode);
}
var hasActiveVersionchange = this._rawDatabase.transactions.some(function (transaction) {
- return transaction._active && transaction.mode === "versionchange";
+ return transaction._active && transaction.mode === "versionchange" && transaction.db === _this;
});
if (hasActiveVersionchange) {
throw new errors_1.InvalidStateError();
@@ -29007,7 +29221,9 @@ var FDBDatabase = (function (_super) {
}(FakeEventTarget_1.default));
exports.default = FDBDatabase;
-},{"./FDBTransaction":474,"./lib/FakeEventTarget":480,"./lib/ObjectStore":483,"./lib/errors":488,"./lib/fakeDOMStringList":490,"./lib/validateKeyPath":492}],468:[function(require,module,exports){
+}).call(this,require("timers").setImmediate)
+},{"./FDBTransaction":475,"./lib/FakeEventTarget":481,"./lib/ObjectStore":484,"./lib/errors":489,"./lib/fakeDOMStringList":491,"./lib/validateKeyPath":493,"timers":526}],469:[function(require,module,exports){
+(function (setImmediate){
"use strict";
var __values = (this && this.__values) || function (o) {
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
@@ -29030,8 +29246,8 @@ var enforceRange_1 = require("./lib/enforceRange");
var errors_1 = require("./lib/errors");
var FakeEvent_1 = require("./lib/FakeEvent");
var waitForOthersClosedDelete = function (databases, name, openDatabases, cb) {
- var anyOpen = openDatabases.some(function (openDatabase) {
- return !openDatabase._closed;
+ var anyOpen = openDatabases.some(function (openDatabase2) {
+ return !openDatabase2._closed;
});
if (anyOpen) {
setImmediate(function () { return waitForOthersClosedDelete(databases, name, openDatabases, cb); });
@@ -29054,13 +29270,13 @@ var deleteDatabase = function (databases, name, request, cb) {
});
try {
for (var openDatabases_1 = __values(openDatabases), openDatabases_1_1 = openDatabases_1.next(); !openDatabases_1_1.done; openDatabases_1_1 = openDatabases_1.next()) {
- var openDatabase_1 = openDatabases_1_1.value;
- if (!openDatabase_1._closePending) {
+ var openDatabase2 = openDatabases_1_1.value;
+ if (!openDatabase2._closePending) {
var event_1 = new FDBVersionChangeEvent_1.default("versionchange", {
newVersion: null,
oldVersion: db.version,
});
- openDatabase_1.dispatchEvent(event_1);
+ openDatabase2.dispatchEvent(event_1);
}
}
}
@@ -29071,8 +29287,8 @@ var deleteDatabase = function (databases, name, request, cb) {
}
finally { if (e_1) throw e_1.error; }
}
- var anyOpen = openDatabases.some(function (openDatabase) {
- return !openDatabase._closed;
+ var anyOpen = openDatabases.some(function (openDatabase3) {
+ return !openDatabase3._closed;
});
if (request && anyOpen) {
var event_2 = new FDBVersionChangeEvent_1.default("blocked", {
@@ -29097,13 +29313,13 @@ var runVersionchangeTransaction = function (connection, version, request, cb) {
});
try {
for (var openDatabases_2 = __values(openDatabases), openDatabases_2_1 = openDatabases_2.next(); !openDatabases_2_1.done; openDatabases_2_1 = openDatabases_2.next()) {
- var openDatabase_2 = openDatabases_2_1.value;
- if (!openDatabase_2._closed) {
+ var openDatabase2 = openDatabases_2_1.value;
+ if (!openDatabase2._closed) {
var event_3 = new FDBVersionChangeEvent_1.default("versionchange", {
- oldVersion: oldVersion,
newVersion: version,
+ oldVersion: oldVersion,
});
- openDatabase_2.dispatchEvent(event_3);
+ openDatabase2.dispatchEvent(event_3);
}
}
}
@@ -29114,8 +29330,8 @@ var runVersionchangeTransaction = function (connection, version, request, cb) {
}
finally { if (e_2) throw e_2.error; }
}
- var anyOpen = openDatabases.some(function (openDatabase) {
- return !openDatabase._closed;
+ var anyOpen = openDatabases.some(function (openDatabase3) {
+ return !openDatabase3._closed;
});
if (anyOpen) {
var event_4 = new FDBVersionChangeEvent_1.default("blocked", {
@@ -29125,8 +29341,8 @@ var runVersionchangeTransaction = function (connection, version, request, cb) {
request.dispatchEvent(event_4);
}
var waitForOthersClosed = function () {
- var anyOpen2 = openDatabases.some(function (openDatabase) {
- return !openDatabase._closed;
+ var anyOpen2 = openDatabases.some(function (openDatabase2) {
+ return !openDatabase2._closed;
});
if (anyOpen2) {
setImmediate(waitForOthersClosed);
@@ -29207,7 +29423,7 @@ var openDatabase = function (databases, name, version, request, cb) {
cb(null, connection);
}
};
-var FDBFactory = (function () {
+var FDBFactory = /** @class */ (function () {
function FDBFactory() {
this.cmp = cmp_1.default;
this._databases = new Map();
@@ -29235,11 +29451,11 @@ var FDBFactory = (function () {
}
request.result = undefined;
request.readyState = "done";
- var event = new FDBVersionChangeEvent_1.default("success", {
+ var event2 = new FDBVersionChangeEvent_1.default("success", {
newVersion: null,
oldVersion: oldVersion,
});
- request.dispatchEvent(event);
+ request.dispatchEvent(event2);
});
});
return request;
@@ -29275,9 +29491,9 @@ var FDBFactory = (function () {
}
request.result = connection;
request.readyState = "done";
- var event = new FakeEvent_1.default("success");
- event.eventPath = [];
- request.dispatchEvent(event);
+ var event2 = new FakeEvent_1.default("success");
+ event2.eventPath = [];
+ request.dispatchEvent(event2);
});
});
return request;
@@ -29289,7 +29505,8 @@ var FDBFactory = (function () {
}());
exports.default = FDBFactory;
-},{"./FDBDatabase":467,"./FDBOpenDBRequest":472,"./FDBVersionChangeEvent":475,"./lib/Database":478,"./lib/FakeEvent":479,"./lib/cmp":486,"./lib/enforceRange":487,"./lib/errors":488,"setimmediate":529}],469:[function(require,module,exports){
+}).call(this,require("timers").setImmediate)
+},{"./FDBDatabase":468,"./FDBOpenDBRequest":473,"./FDBVersionChangeEvent":476,"./lib/Database":479,"./lib/FakeEvent":480,"./lib/cmp":487,"./lib/enforceRange":488,"./lib/errors":489,"setimmediate":525,"timers":526}],470:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var FDBCursor_1 = require("./FDBCursor");
@@ -29310,7 +29527,7 @@ var confirmActiveTransaction = function (index) {
}
};
// http://www.w3.org/TR/2015/REC-IndexedDB-20150108/#idl-def-IDBIndex
-var FDBIndex = (function () {
+var FDBIndex = /** @class */ (function () {
function FDBIndex(objectStore, rawIndex) {
this._rawIndex = rawIndex;
this._name = rawIndex.name;
@@ -29483,14 +29700,14 @@ var FDBIndex = (function () {
}());
exports.default = FDBIndex;
-},{"./FDBCursor":465,"./FDBCursorWithValue":466,"./FDBKeyRange":470,"./FDBRequest":473,"./lib/enforceRange":487,"./lib/errors":488,"./lib/fakeDOMStringList":490,"./lib/valueToKey":493,"./lib/valueToKeyRange":494}],470:[function(require,module,exports){
+},{"./FDBCursor":466,"./FDBCursorWithValue":467,"./FDBKeyRange":471,"./FDBRequest":474,"./lib/enforceRange":488,"./lib/errors":489,"./lib/fakeDOMStringList":491,"./lib/valueToKey":494,"./lib/valueToKeyRange":495}],471:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var cmp_1 = require("./lib/cmp");
var errors_1 = require("./lib/errors");
var valueToKey_1 = require("./lib/valueToKey");
// http://www.w3.org/TR/2015/REC-IndexedDB-20150108/#range-concept
-var FDBKeyRange = (function () {
+var FDBKeyRange = /** @class */ (function () {
function FDBKeyRange(lower, upper, lowerOpen, upperOpen) {
this.lower = lower;
this.upper = upper;
@@ -29561,7 +29778,7 @@ var FDBKeyRange = (function () {
}());
exports.default = FDBKeyRange;
-},{"./lib/cmp":486,"./lib/errors":488,"./lib/valueToKey":493}],471:[function(require,module,exports){
+},{"./lib/cmp":487,"./lib/errors":489,"./lib/valueToKey":494}],472:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var FDBCursor_1 = require("./FDBCursor");
@@ -29624,7 +29841,7 @@ var buildRecordAddPut = function (objectStore, value, key) {
};
};
// http://www.w3.org/TR/2015/REC-IndexedDB-20150108/#object-store
-var FDBObjectStore = (function () {
+var FDBObjectStore = /** @class */ (function () {
function FDBObjectStore(transaction, rawObjectStore) {
this._indexesCache = new Map();
this._rawObjectStore = rawObjectStore;
@@ -29848,9 +30065,9 @@ var FDBObjectStore = (function () {
// "versionchange" transaction which was used for the createIndex call.
var indexNames = this.indexNames.slice();
this.transaction._rollbackLog.push(function () {
- var index = _this._rawObjectStore.rawIndexes.get(name);
- if (index) {
- index.deleted = true;
+ var index2 = _this._rawObjectStore.rawIndexes.get(name);
+ if (index2) {
+ index2.deleted = true;
}
_this.indexNames = fakeDOMStringList_1.default(indexNames);
_this._rawObjectStore.rawIndexes.delete(name);
@@ -29946,7 +30163,7 @@ var FDBObjectStore = (function () {
}());
exports.default = FDBObjectStore;
-},{"./FDBCursor":465,"./FDBCursorWithValue":466,"./FDBIndex":469,"./FDBKeyRange":470,"./FDBRequest":473,"./lib/Index":481,"./lib/canInjectKey":485,"./lib/enforceRange":487,"./lib/errors":488,"./lib/extractKey":489,"./lib/fakeDOMStringList":490,"./lib/structuredClone":491,"./lib/validateKeyPath":492,"./lib/valueToKey":493,"./lib/valueToKeyRange":494}],472:[function(require,module,exports){
+},{"./FDBCursor":466,"./FDBCursorWithValue":467,"./FDBIndex":470,"./FDBKeyRange":471,"./FDBRequest":474,"./lib/Index":482,"./lib/canInjectKey":486,"./lib/enforceRange":488,"./lib/errors":489,"./lib/extractKey":490,"./lib/fakeDOMStringList":491,"./lib/structuredClone":492,"./lib/validateKeyPath":493,"./lib/valueToKey":494,"./lib/valueToKeyRange":495}],473:[function(require,module,exports){
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
@@ -29960,7 +30177,7 @@ var __extends = (this && this.__extends) || (function () {
})();
Object.defineProperty(exports, "__esModule", { value: true });
var FDBRequest_1 = require("./FDBRequest");
-var FDBOpenDBRequest = (function (_super) {
+var FDBOpenDBRequest = /** @class */ (function (_super) {
__extends(FDBOpenDBRequest, _super);
function FDBOpenDBRequest() {
var _this = _super !== null && _super.apply(this, arguments) || this;
@@ -29975,7 +30192,7 @@ var FDBOpenDBRequest = (function (_super) {
}(FDBRequest_1.default));
exports.default = FDBOpenDBRequest;
-},{"./FDBRequest":473}],473:[function(require,module,exports){
+},{"./FDBRequest":474}],474:[function(require,module,exports){
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
@@ -29990,7 +30207,7 @@ var __extends = (this && this.__extends) || (function () {
Object.defineProperty(exports, "__esModule", { value: true });
var errors_1 = require("./lib/errors");
var FakeEventTarget_1 = require("./lib/FakeEventTarget");
-var FDBRequest = (function (_super) {
+var FDBRequest = /** @class */ (function (_super) {
__extends(FDBRequest, _super);
function FDBRequest() {
var _this = _super !== null && _super.apply(this, arguments) || this;
@@ -30036,7 +30253,8 @@ var FDBRequest = (function (_super) {
}(FakeEventTarget_1.default));
exports.default = FDBRequest;
-},{"./lib/FakeEventTarget":480,"./lib/errors":488}],474:[function(require,module,exports){
+},{"./lib/FakeEventTarget":481,"./lib/errors":489}],475:[function(require,module,exports){
+(function (setImmediate){
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
@@ -30066,7 +30284,7 @@ var fakeDOMStringList_1 = require("./lib/fakeDOMStringList");
var FakeEvent_1 = require("./lib/FakeEvent");
var FakeEventTarget_1 = require("./lib/FakeEventTarget");
// http://www.w3.org/TR/2015/REC-IndexedDB-20150108/#transaction
-var FDBTransaction = (function (_super) {
+var FDBTransaction = /** @class */ (function (_super) {
__extends(FDBTransaction, _super);
function FDBTransaction(storeNames, mode, db) {
var _this = _super.call(this) || this;
@@ -30189,8 +30407,8 @@ var FDBTransaction = (function (_super) {
}
}
this._requests.push({
- request: request,
operation: operation,
+ request: request,
});
return request;
};
@@ -30293,7 +30511,8 @@ var FDBTransaction = (function (_super) {
}(FakeEventTarget_1.default));
exports.default = FDBTransaction;
-},{"./FDBObjectStore":471,"./FDBRequest":473,"./lib/FakeEvent":479,"./lib/FakeEventTarget":480,"./lib/errors":488,"./lib/fakeDOMStringList":490}],475:[function(require,module,exports){
+}).call(this,require("timers").setImmediate)
+},{"./FDBObjectStore":472,"./FDBRequest":474,"./lib/FakeEvent":480,"./lib/FakeEventTarget":481,"./lib/errors":489,"./lib/fakeDOMStringList":491,"timers":526}],476:[function(require,module,exports){
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
@@ -30307,7 +30526,7 @@ var __extends = (this && this.__extends) || (function () {
})();
Object.defineProperty(exports, "__esModule", { value: true });
var FakeEvent_1 = require("./lib/FakeEvent");
-var FDBVersionChangeEvent = (function (_super) {
+var FDBVersionChangeEvent = /** @class */ (function (_super) {
__extends(FDBVersionChangeEvent, _super);
function FDBVersionChangeEvent(type, parameters) {
if (parameters === void 0) { parameters = {}; }
@@ -30323,25 +30542,26 @@ var FDBVersionChangeEvent = (function (_super) {
}(FakeEvent_1.default));
exports.default = FDBVersionChangeEvent;
-},{"./lib/FakeEvent":479}],476:[function(require,module,exports){
+},{"./lib/FakeEvent":480}],477:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var FDBFactory_1 = require("./FDBFactory");
var fakeIndexedDB = new FDBFactory_1.default();
exports.default = fakeIndexedDB;
-},{"./FDBFactory":468}],477:[function(require,module,exports){
+},{"./FDBFactory":469}],478:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
require("core-js");
var fakeIndexedDB_1 = require("./fakeIndexedDB");
module.exports = fakeIndexedDB_1.default;
-},{"./fakeIndexedDB":476,"core-js":73}],478:[function(require,module,exports){
+},{"./fakeIndexedDB":477,"core-js":73}],479:[function(require,module,exports){
+(function (setImmediate){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// http://www.w3.org/TR/2015/REC-IndexedDB-20150108/#dfn-database
-var Database = (function () {
+var Database = /** @class */ (function () {
function Database(name, version) {
this.deletePending = false;
this.transactions = [];
@@ -30373,10 +30593,11 @@ var Database = (function () {
}());
exports.default = Database;
-},{}],479:[function(require,module,exports){
+}).call(this,require("timers").setImmediate)
+},{"timers":526}],480:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-var Event = (function () {
+var Event = /** @class */ (function () {
function Event(type, eventInitDict) {
if (eventInitDict === void 0) { eventInitDict = {}; }
this.eventPath = [];
@@ -30416,7 +30637,7 @@ var Event = (function () {
}());
exports.default = Event;
-},{}],480:[function(require,module,exports){
+},{}],481:[function(require,module,exports){
"use strict";
var __values = (this && this.__values) || function (o) {
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
@@ -30480,7 +30701,7 @@ var invokeEventListeners = function (event, obj) {
}
var e_1, _c;
};
-var FakeEventTarget = (function () {
+var FakeEventTarget = /** @class */ (function () {
function FakeEventTarget() {
this.listeners = [];
}
@@ -30562,7 +30783,7 @@ var FakeEventTarget = (function () {
}());
exports.default = FakeEventTarget;
-},{"./errors":488}],481:[function(require,module,exports){
+},{"./errors":489}],482:[function(require,module,exports){
"use strict";
var __values = (this && this.__values) || function (o) {
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
@@ -30581,7 +30802,7 @@ var RecordStore_1 = require("./RecordStore");
var structuredClone_1 = require("./structuredClone");
var valueToKey_1 = require("./valueToKey");
// http://www.w3.org/TR/2015/REC-IndexedDB-20150108/#dfn-index
-var Index = (function () {
+var Index = /** @class */ (function () {
function Index(rawObjectStore, name, keyPath, multiEntry, unique) {
this.deleted = false;
// Initialized should be used to decide whether to throw an error or abort the versionchange transaction when there is a
@@ -30790,12 +31011,12 @@ var Index = (function () {
}());
exports.default = Index;
-},{"./RecordStore":484,"./errors":488,"./extractKey":489,"./structuredClone":491,"./valueToKey":493}],482:[function(require,module,exports){
+},{"./RecordStore":485,"./errors":489,"./extractKey":490,"./structuredClone":492,"./valueToKey":494}],483:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var errors_1 = require("./errors");
var MAX_KEY = 9007199254740992;
-var KeyGenerator = (function () {
+var KeyGenerator = /** @class */ (function () {
function KeyGenerator() {
// This is kind of wrong. Should start at 1 and increment only after record is saved
this.num = 0;
@@ -30818,7 +31039,7 @@ var KeyGenerator = (function () {
}());
exports.default = KeyGenerator;
-},{"./errors":488}],483:[function(require,module,exports){
+},{"./errors":489}],484:[function(require,module,exports){
"use strict";
var __values = (this && this.__values) || function (o) {
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
@@ -30837,7 +31058,7 @@ var KeyGenerator_1 = require("./KeyGenerator");
var RecordStore_1 = require("./RecordStore");
var structuredClone_1 = require("./structuredClone");
// http://www.w3.org/TR/2015/REC-IndexedDB-20150108/#dfn-object-store
-var ObjectStore = (function () {
+var ObjectStore = /** @class */ (function () {
function ObjectStore(rawDatabase, name, keyPath, autoIncrement) {
this.deleted = false;
this.records = new RecordStore_1.default();
@@ -31059,12 +31280,12 @@ var ObjectStore = (function () {
}());
exports.default = ObjectStore;
-},{"./KeyGenerator":482,"./RecordStore":484,"./errors":488,"./extractKey":489,"./structuredClone":491}],484:[function(require,module,exports){
+},{"./KeyGenerator":483,"./RecordStore":485,"./errors":489,"./extractKey":490,"./structuredClone":492}],485:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var FDBKeyRange_1 = require("../FDBKeyRange");
var cmp_1 = require("./cmp");
-var RecordStore = (function () {
+var RecordStore = /** @class */ (function () {
function RecordStore() {
this.records = [];
}
@@ -31199,8 +31420,8 @@ var RecordStore = (function () {
// https://github.com/Microsoft/TypeScript/issues/2983
// tslint:disable-next-line no-object-literal-type-assertion
return {
- value: value,
done: done,
+ value: value,
};
},
};
@@ -31212,7 +31433,7 @@ var RecordStore = (function () {
}());
exports.default = RecordStore;
-},{"../FDBKeyRange":470,"./cmp":486}],485:[function(require,module,exports){
+},{"../FDBKeyRange":471,"./cmp":487}],486:[function(require,module,exports){
"use strict";
var __values = (this && this.__values) || function (o) {
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
@@ -31261,7 +31482,7 @@ var canInjectKey = function (keyPath, value) {
};
exports.default = canInjectKey;
-},{}],486:[function(require,module,exports){
+},{}],487:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var errors_1 = require("./errors");
@@ -31342,7 +31563,7 @@ var cmp = function (first, second) {
};
exports.default = cmp;
-},{"./errors":488,"./valueToKey":493}],487:[function(require,module,exports){
+},{"./errors":489,"./valueToKey":494}],488:[function(require,module,exports){
"use strict";
// https://heycam.github.io/webidl/#EnforceRange
Object.defineProperty(exports, "__esModule", { value: true });
@@ -31358,7 +31579,7 @@ var enforceRange = function (num, type) {
};
exports.default = enforceRange;
-},{}],488:[function(require,module,exports){
+},{}],489:[function(require,module,exports){
"use strict";
/* tslint:disable: max-classes-per-file max-line-length */
var __extends = (this && this.__extends) || (function () {
@@ -31384,7 +31605,7 @@ var messages = {
TransactionInactiveError: "A request was placed against a transaction which is currently not active, or which is finished.",
VersionError: "An attempt was made to open a database using a lower version than the existing version.",
};
-var AbortError = (function (_super) {
+var AbortError = /** @class */ (function (_super) {
__extends(AbortError, _super);
function AbortError(message) {
if (message === void 0) { message = messages.AbortError; }
@@ -31396,7 +31617,7 @@ var AbortError = (function (_super) {
return AbortError;
}(Error));
exports.AbortError = AbortError;
-var ConstraintError = (function (_super) {
+var ConstraintError = /** @class */ (function (_super) {
__extends(ConstraintError, _super);
function ConstraintError(message) {
if (message === void 0) { message = messages.ConstraintError; }
@@ -31408,7 +31629,7 @@ var ConstraintError = (function (_super) {
return ConstraintError;
}(Error));
exports.ConstraintError = ConstraintError;
-var DataCloneError = (function (_super) {
+var DataCloneError = /** @class */ (function (_super) {
__extends(DataCloneError, _super);
function DataCloneError(message) {
if (message === void 0) { message = messages.DataCloneError; }
@@ -31420,7 +31641,7 @@ var DataCloneError = (function (_super) {
return DataCloneError;
}(Error));
exports.DataCloneError = DataCloneError;
-var DataError = (function (_super) {
+var DataError = /** @class */ (function (_super) {
__extends(DataError, _super);
function DataError(message) {
if (message === void 0) { message = messages.DataError; }
@@ -31432,7 +31653,7 @@ var DataError = (function (_super) {
return DataError;
}(Error));
exports.DataError = DataError;
-var InvalidAccessError = (function (_super) {
+var InvalidAccessError = /** @class */ (function (_super) {
__extends(InvalidAccessError, _super);
function InvalidAccessError(message) {
if (message === void 0) { message = messages.InvalidAccessError; }
@@ -31444,7 +31665,7 @@ var InvalidAccessError = (function (_super) {
return InvalidAccessError;
}(Error));
exports.InvalidAccessError = InvalidAccessError;
-var InvalidStateError = (function (_super) {
+var InvalidStateError = /** @class */ (function (_super) {
__extends(InvalidStateError, _super);
function InvalidStateError(message) {
if (message === void 0) { message = messages.InvalidStateError; }
@@ -31456,7 +31677,7 @@ var InvalidStateError = (function (_super) {
return InvalidStateError;
}(Error));
exports.InvalidStateError = InvalidStateError;
-var NotFoundError = (function (_super) {
+var NotFoundError = /** @class */ (function (_super) {
__extends(NotFoundError, _super);
function NotFoundError(message) {
if (message === void 0) { message = messages.NotFoundError; }
@@ -31468,7 +31689,7 @@ var NotFoundError = (function (_super) {
return NotFoundError;
}(Error));
exports.NotFoundError = NotFoundError;
-var ReadOnlyError = (function (_super) {
+var ReadOnlyError = /** @class */ (function (_super) {
__extends(ReadOnlyError, _super);
function ReadOnlyError(message) {
if (message === void 0) { message = messages.ReadOnlyError; }
@@ -31480,7 +31701,7 @@ var ReadOnlyError = (function (_super) {
return ReadOnlyError;
}(Error));
exports.ReadOnlyError = ReadOnlyError;
-var TransactionInactiveError = (function (_super) {
+var TransactionInactiveError = /** @class */ (function (_super) {
__extends(TransactionInactiveError, _super);
function TransactionInactiveError(message) {
if (message === void 0) { message = messages.TransactionInactiveError; }
@@ -31492,7 +31713,7 @@ var TransactionInactiveError = (function (_super) {
return TransactionInactiveError;
}(Error));
exports.TransactionInactiveError = TransactionInactiveError;
-var VersionError = (function (_super) {
+var VersionError = /** @class */ (function (_super) {
__extends(VersionError, _super);
function VersionError(message) {
if (message === void 0) { message = messages.VersionError; }
@@ -31505,7 +31726,7 @@ var VersionError = (function (_super) {
}(Error));
exports.VersionError = VersionError;
-},{}],489:[function(require,module,exports){
+},{}],490:[function(require,module,exports){
"use strict";
var __values = (this && this.__values) || function (o) {
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
@@ -31569,7 +31790,7 @@ var extractKey = function (keyPath, value) {
};
exports.default = extractKey;
-},{"./valueToKey":493}],490:[function(require,module,exports){
+},{"./valueToKey":494}],491:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// Would be nicer to sublcass Array, but I'd have to sacrifice Node 4 support to do that.
@@ -31587,7 +31808,7 @@ var fakeDOMStringList = function (arr) {
};
exports.default = fakeDOMStringList;
-},{}],491:[function(require,module,exports){
+},{}],492:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var realisticStructuredClone = require("realistic-structured-clone"); // tslint:disable-line no-var-requires
@@ -31602,7 +31823,7 @@ var structuredClone = function (input) {
};
exports.default = structuredClone;
-},{"./errors":488,"realistic-structured-clone":528}],492:[function(require,module,exports){
+},{"./errors":489,"realistic-structured-clone":524}],493:[function(require,module,exports){
"use strict";
var __values = (this && this.__values) || function (o) {
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
@@ -31688,7 +31909,7 @@ var validateKeyPath = function (keyPath, parent) {
};
exports.default = validateKeyPath;
-},{}],493:[function(require,module,exports){
+},{}],494:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var errors_1 = require("./errors");
@@ -31743,7 +31964,7 @@ var valueToKey = function (input, seen) {
};
exports.default = valueToKey;
-},{"./errors":488}],494:[function(require,module,exports){
+},{"./errors":489}],495:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var FDBKeyRange_1 = require("../FDBKeyRange");
@@ -31766,7 +31987,7 @@ var valueToKeyRange = function (value, nullDisallowedFlag) {
};
exports.default = valueToKeyRange;
-},{"../FDBKeyRange":470,"./errors":488,"./valueToKey":493}],495:[function(require,module,exports){
+},{"../FDBKeyRange":471,"./errors":489,"./valueToKey":494}],496:[function(require,module,exports){
// This file is needed to maintain API compatibility with fake-indexeddb 1.x because of
// and . It should not
// be used internally, only externally.
@@ -31774,7 +31995,7 @@ exports.default = valueToKeyRange;
require("core-js");
module.exports = require("../build/FDBKeyRange").default;
-},{"../build/FDBKeyRange":470,"core-js":73}],496:[function(require,module,exports){
+},{"../build/FDBKeyRange":471,"core-js":73}],497:[function(require,module,exports){
'use strict';
/* !
@@ -31820,10 +32041,10 @@ function getFuncName(aFunc) {
module.exports = getFuncName;
-},{}],497:[function(require,module,exports){
+},{}],498:[function(require,module,exports){
exports.read = function (buffer, offset, isLE, mLen, nBytes) {
var e, m
- var eLen = nBytes * 8 - mLen - 1
+ var eLen = (nBytes * 8) - mLen - 1
var eMax = (1 << eLen) - 1
var eBias = eMax >> 1
var nBits = -7
@@ -31836,12 +32057,12 @@ exports.read = function (buffer, offset, isLE, mLen, nBytes) {
e = s & ((1 << (-nBits)) - 1)
s >>= (-nBits)
nBits += eLen
- for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}
+ for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
m = e & ((1 << (-nBits)) - 1)
e >>= (-nBits)
nBits += mLen
- for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}
+ for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
if (e === 0) {
e = 1 - eBias
@@ -31856,7 +32077,7 @@ exports.read = function (buffer, offset, isLE, mLen, nBytes) {
exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
var e, m, c
- var eLen = nBytes * 8 - mLen - 1
+ var eLen = (nBytes * 8) - mLen - 1
var eMax = (1 << eLen) - 1
var eBias = eMax >> 1
var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
@@ -31889,7 +32110,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
m = 0
e = eMax
} else if (e + eBias >= 1) {
- m = (value * c - 1) * Math.pow(2, mLen)
+ m = ((value * c) - 1) * Math.pow(2, mLen)
e = e + eBias
} else {
m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
@@ -31906,716 +32127,14 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
buffer[offset + i - d] |= s * 128
}
-},{}],498:[function(require,module,exports){
+},{}],499:[function(require,module,exports){
module.exports = isPromise;
function isPromise(obj) {
return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
}
-},{}],499:[function(require,module,exports){
-/**
- * lodash 3.0.3 (Custom Build)
- * Build: `lodash modularize exports="npm" -o ./`
- * Copyright 2012-2016 The Dojo Foundation
- * Based on Underscore.js 1.8.3
- * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license
- */
-
-/**
- * The base implementation of `baseForIn` and `baseForOwn` which iterates
- * over `object` properties returned by `keysFunc` invoking `iteratee` for
- * each property. Iteratee functions may exit iteration early by explicitly
- * returning `false`.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {Function} keysFunc The function to get the keys of `object`.
- * @returns {Object} Returns `object`.
- */
-var baseFor = createBaseFor();
-
-/**
- * Creates a base function for methods like `_.forIn`.
- *
- * @private
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new base function.
- */
-function createBaseFor(fromRight) {
- return function(object, iteratee, keysFunc) {
- var index = -1,
- iterable = Object(object),
- props = keysFunc(object),
- length = props.length;
-
- while (length--) {
- var key = props[fromRight ? length : ++index];
- if (iteratee(iterable[key], key, iterable) === false) {
- break;
- }
- }
- return object;
- };
-}
-
-module.exports = baseFor;
-
},{}],500:[function(require,module,exports){
-/**
- * lodash (Custom Build)
- * Build: `lodash modularize exports="npm" -o ./`
- * Copyright jQuery Foundation and other contributors
- * Released under MIT license
- * Based on Underscore.js 1.8.3
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- */
-
-/** Used as references for various `Number` constants. */
-var MAX_SAFE_INTEGER = 9007199254740991;
-
-/** `Object#toString` result references. */
-var argsTag = '[object Arguments]',
- funcTag = '[object Function]',
- genTag = '[object GeneratorFunction]';
-
-/** Used for built-in method references. */
-var objectProto = Object.prototype;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
-/**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objectToString = objectProto.toString;
-
-/** Built-in value references. */
-var propertyIsEnumerable = objectProto.propertyIsEnumerable;
-
-/**
- * Checks if `value` is likely an `arguments` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
- * else `false`.
- * @example
- *
- * _.isArguments(function() { return arguments; }());
- * // => true
- *
- * _.isArguments([1, 2, 3]);
- * // => false
- */
-function isArguments(value) {
- // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
- return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
- (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
-}
-
-/**
- * Checks if `value` is array-like. A value is considered array-like if it's
- * not a function and has a `value.length` that's an integer greater than or
- * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
- * @example
- *
- * _.isArrayLike([1, 2, 3]);
- * // => true
- *
- * _.isArrayLike(document.body.children);
- * // => true
- *
- * _.isArrayLike('abc');
- * // => true
- *
- * _.isArrayLike(_.noop);
- * // => false
- */
-function isArrayLike(value) {
- return value != null && isLength(value.length) && !isFunction(value);
-}
-
-/**
- * This method is like `_.isArrayLike` except that it also checks if `value`
- * is an object.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an array-like object,
- * else `false`.
- * @example
- *
- * _.isArrayLikeObject([1, 2, 3]);
- * // => true
- *
- * _.isArrayLikeObject(document.body.children);
- * // => true
- *
- * _.isArrayLikeObject('abc');
- * // => false
- *
- * _.isArrayLikeObject(_.noop);
- * // => false
- */
-function isArrayLikeObject(value) {
- return isObjectLike(value) && isArrayLike(value);
-}
-
-/**
- * Checks if `value` is classified as a `Function` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
- * @example
- *
- * _.isFunction(_);
- * // => true
- *
- * _.isFunction(/abc/);
- * // => false
- */
-function isFunction(value) {
- // The use of `Object#toString` avoids issues with the `typeof` operator
- // in Safari 8-9 which returns 'object' for typed array and other constructors.
- var tag = isObject(value) ? objectToString.call(value) : '';
- return tag == funcTag || tag == genTag;
-}
-
-/**
- * Checks if `value` is a valid array-like length.
- *
- * **Note:** This method is loosely based on
- * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
- * @example
- *
- * _.isLength(3);
- * // => true
- *
- * _.isLength(Number.MIN_VALUE);
- * // => false
- *
- * _.isLength(Infinity);
- * // => false
- *
- * _.isLength('3');
- * // => false
- */
-function isLength(value) {
- return typeof value == 'number' &&
- value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
-}
-
-/**
- * Checks if `value` is the
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
- * @example
- *
- * _.isObject({});
- * // => true
- *
- * _.isObject([1, 2, 3]);
- * // => true
- *
- * _.isObject(_.noop);
- * // => true
- *
- * _.isObject(null);
- * // => false
- */
-function isObject(value) {
- var type = typeof value;
- return !!value && (type == 'object' || type == 'function');
-}
-
-/**
- * Checks if `value` is object-like. A value is object-like if it's not `null`
- * and has a `typeof` result of "object".
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- * @example
- *
- * _.isObjectLike({});
- * // => true
- *
- * _.isObjectLike([1, 2, 3]);
- * // => true
- *
- * _.isObjectLike(_.noop);
- * // => false
- *
- * _.isObjectLike(null);
- * // => false
- */
-function isObjectLike(value) {
- return !!value && typeof value == 'object';
-}
-
-module.exports = isArguments;
-
-},{}],501:[function(require,module,exports){
-/**
- * lodash 3.0.4 (Custom Build)
- * Build: `lodash modern modularize exports="npm" -o ./`
- * Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.8.3
- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license
- */
-
-/** `Object#toString` result references. */
-var arrayTag = '[object Array]',
- funcTag = '[object Function]';
-
-/** Used to detect host constructors (Safari > 5). */
-var reIsHostCtor = /^\[object .+?Constructor\]$/;
-
-/**
- * Checks if `value` is object-like.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- */
-function isObjectLike(value) {
- return !!value && typeof value == 'object';
-}
-
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/** Used to resolve the decompiled source of functions. */
-var fnToString = Function.prototype.toString;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
-/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objToString = objectProto.toString;
-
-/** Used to detect if a method is native. */
-var reIsNative = RegExp('^' +
- fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
-);
-
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeIsArray = getNative(Array, 'isArray');
-
-/**
- * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
- * of an array-like value.
- */
-var MAX_SAFE_INTEGER = 9007199254740991;
-
-/**
- * Gets the native function at `key` of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {string} key The key of the method to get.
- * @returns {*} Returns the function if it's native, else `undefined`.
- */
-function getNative(object, key) {
- var value = object == null ? undefined : object[key];
- return isNative(value) ? value : undefined;
-}
-
-/**
- * Checks if `value` is a valid array-like length.
- *
- * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
- */
-function isLength(value) {
- return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
-}
-
-/**
- * Checks if `value` is classified as an `Array` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isArray([1, 2, 3]);
- * // => true
- *
- * _.isArray(function() { return arguments; }());
- * // => false
- */
-var isArray = nativeIsArray || function(value) {
- return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag;
-};
-
-/**
- * Checks if `value` is classified as a `Function` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isFunction(_);
- * // => true
- *
- * _.isFunction(/abc/);
- * // => false
- */
-function isFunction(value) {
- // The use of `Object#toString` avoids issues with the `typeof` operator
- // in older versions of Chrome and Safari which return 'function' for regexes
- // and Safari 8 equivalents which return 'object' for typed array constructors.
- return isObject(value) && objToString.call(value) == funcTag;
-}
-
-/**
- * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
- * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
- * @example
- *
- * _.isObject({});
- * // => true
- *
- * _.isObject([1, 2, 3]);
- * // => true
- *
- * _.isObject(1);
- * // => false
- */
-function isObject(value) {
- // Avoid a V8 JIT bug in Chrome 19-20.
- // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
- var type = typeof value;
- return !!value && (type == 'object' || type == 'function');
-}
-
-/**
- * Checks if `value` is a native function.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a native function, else `false`.
- * @example
- *
- * _.isNative(Array.prototype.push);
- * // => true
- *
- * _.isNative(_);
- * // => false
- */
-function isNative(value) {
- if (value == null) {
- return false;
- }
- if (isFunction(value)) {
- return reIsNative.test(fnToString.call(value));
- }
- return isObjectLike(value) && reIsHostCtor.test(value);
-}
-
-module.exports = isArray;
-
-},{}],502:[function(require,module,exports){
-/**
- * lodash 3.2.0 (Custom Build)
- * Build: `lodash modern modularize exports="npm" -o ./`
- * Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.8.3
- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license
- */
-var baseFor = require('lodash._basefor'),
- isArguments = require('lodash.isarguments'),
- keysIn = require('lodash.keysin');
-
-/** `Object#toString` result references. */
-var objectTag = '[object Object]';
-
-/**
- * Checks if `value` is object-like.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- */
-function isObjectLike(value) {
- return !!value && typeof value == 'object';
-}
-
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
-/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objToString = objectProto.toString;
-
-/**
- * The base implementation of `_.forIn` without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Object} Returns `object`.
- */
-function baseForIn(object, iteratee) {
- return baseFor(object, iteratee, keysIn);
-}
-
-/**
- * Checks if `value` is a plain object, that is, an object created by the
- * `Object` constructor or one with a `[[Prototype]]` of `null`.
- *
- * **Note:** This method assumes objects created by the `Object` constructor
- * have no inherited enumerable properties.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * }
- *
- * _.isPlainObject(new Foo);
- * // => false
- *
- * _.isPlainObject([1, 2, 3]);
- * // => false
- *
- * _.isPlainObject({ 'x': 0, 'y': 0 });
- * // => true
- *
- * _.isPlainObject(Object.create(null));
- * // => true
- */
-function isPlainObject(value) {
- var Ctor;
-
- // Exit early for non `Object` objects.
- if (!(isObjectLike(value) && objToString.call(value) == objectTag && !isArguments(value)) ||
- (!hasOwnProperty.call(value, 'constructor') && (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) {
- return false;
- }
- // IE < 9 iterates inherited properties before own properties. If the first
- // iterated property is an object's own property then there are no inherited
- // enumerable properties.
- var result;
- // In most environments an object's own properties are iterated before
- // its inherited properties. If the last iterated property is an object's
- // own property then there are no inherited enumerable properties.
- baseForIn(value, function(subValue, key) {
- result = key;
- });
- return result === undefined || hasOwnProperty.call(value, result);
-}
-
-module.exports = isPlainObject;
-
-},{"lodash._basefor":499,"lodash.isarguments":500,"lodash.keysin":503}],503:[function(require,module,exports){
-/**
- * lodash 3.0.8 (Custom Build)
- * Build: `lodash modern modularize exports="npm" -o ./`
- * Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.8.3
- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license
- */
-var isArguments = require('lodash.isarguments'),
- isArray = require('lodash.isarray');
-
-/** Used to detect unsigned integer values. */
-var reIsUint = /^\d+$/;
-
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
-/**
- * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
- * of an array-like value.
- */
-var MAX_SAFE_INTEGER = 9007199254740991;
-
-/**
- * Checks if `value` is a valid array-like index.
- *
- * @private
- * @param {*} value The value to check.
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
- */
-function isIndex(value, length) {
- value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
- length = length == null ? MAX_SAFE_INTEGER : length;
- return value > -1 && value % 1 == 0 && value < length;
-}
-
-/**
- * Checks if `value` is a valid array-like length.
- *
- * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
- */
-function isLength(value) {
- return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
-}
-
-/**
- * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
- * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
- * @example
- *
- * _.isObject({});
- * // => true
- *
- * _.isObject([1, 2, 3]);
- * // => true
- *
- * _.isObject(1);
- * // => false
- */
-function isObject(value) {
- // Avoid a V8 JIT bug in Chrome 19-20.
- // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
- var type = typeof value;
- return !!value && (type == 'object' || type == 'function');
-}
-
-/**
- * Creates an array of the own and inherited enumerable property names of `object`.
- *
- * **Note:** Non-object values are coerced to objects.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.keysIn(new Foo);
- * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
- */
-function keysIn(object) {
- if (object == null) {
- return [];
- }
- if (!isObject(object)) {
- object = Object(object);
- }
- var length = object.length;
- length = (length && isLength(length) &&
- (isArray(object) || isArguments(object)) && length) || 0;
-
- var Ctor = object.constructor,
- index = -1,
- isProto = typeof Ctor == 'function' && Ctor.prototype === object,
- result = Array(length),
- skipIndexes = length > 0;
-
- while (++index < length) {
- result[index] = (index + '');
- }
- for (var key in object) {
- if (!(skipIndexes && isIndex(key, length)) &&
- !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
- result.push(key);
- }
- }
- return result;
-}
-
-module.exports = keysIn;
-
-},{"lodash.isarguments":500,"lodash.isarray":501}],504:[function(require,module,exports){
'use strict';
var toPosInt = require('es5-ext/number/to-pos-integer')
@@ -32665,7 +32184,7 @@ module.exports = function (limit) {
};
};
-},{"es5-ext/number/to-pos-integer":432}],505:[function(require,module,exports){
+},{"es5-ext/number/to-pos-integer":433}],501:[function(require,module,exports){
/* eslint consistent-this: 0, no-shadow:0, no-eq-null: 0, eqeqeq: 0, no-unused-vars: 0 */
// Support for asynchronous functions
@@ -32698,9 +32217,8 @@ require("../lib/registered-extensions").async = function (tbi, conf) {
}
return base.apply(currentContext = this, currentArgs = args);
}, base);
- try {
- mixin(conf.memoized, base);
- } catch (ignore) {}
+ try { mixin(conf.memoized, base); }
+ catch (ignore) {}
// From cache (sync)
conf.on("get", function (id) {
@@ -32768,9 +32286,7 @@ require("../lib/registered-extensions").async = function (tbi, conf) {
if (typeof cb === "function") {
result = apply.call(cb, this, args);
} else {
- cb.forEach(function (cb) {
- result = apply.call(cb, this, args);
- }, this);
+ cb.forEach(function (cb) { result = apply.call(cb, this, args); }, this);
}
return result;
};
@@ -32819,15 +32335,12 @@ require("../lib/registered-extensions").async = function (tbi, conf) {
var oldCache = cache;
cache = create(null);
conf.emit(
- "clearasync",
- objectMap(oldCache, function (data) {
- return slice.call(data.args, 1);
- })
+ "clearasync", objectMap(oldCache, function (data) { return slice.call(data.args, 1); })
);
});
};
-},{"../lib/registered-extensions":513,"es5-ext/array/from":416,"es5-ext/function/_define-length":421,"es5-ext/object/map":444,"es5-ext/object/mixin":445,"next-tick":523}],506:[function(require,module,exports){
+},{"../lib/registered-extensions":509,"es5-ext/array/from":417,"es5-ext/function/_define-length":422,"es5-ext/object/map":445,"es5-ext/object/mixin":446,"next-tick":519}],502:[function(require,module,exports){
// Call dispose callback on each cache purge
"use strict";
@@ -32862,7 +32375,7 @@ extensions.dispose = function (dispose, conf, options) {
});
};
-},{"../lib/registered-extensions":513,"es5-ext/object/for-each":437,"es5-ext/object/valid-callable":448}],507:[function(require,module,exports){
+},{"../lib/registered-extensions":509,"es5-ext/object/for-each":438,"es5-ext/object/valid-callable":449}],503:[function(require,module,exports){
/* eslint consistent-this: 0 */
// Timeout cached values
@@ -32885,13 +32398,13 @@ extensions.maxAge = function (maxAge, conf, options) {
if (!maxAge) return;
timeouts = create(null);
- postfix = (options.async && extensions.async) || (options.promise && extensions.promise)
- ? "async"
- : "";
+ postfix =
+ (options.async && extensions.async) || (options.promise && extensions.promise)
+ ? "async"
+ : "";
conf.on("set" + postfix, function (id) {
- timeouts[id] = setTimeout(function () {
- conf.delete(id);
- }, maxAge);
+ timeouts[id] = setTimeout(function () { conf.delete(id); }, maxAge);
+ if (typeof timeouts[id].unref === "function") timeouts[id].unref();
if (!preFetchTimeouts) return;
if (preFetchTimeouts[id]) {
if (preFetchTimeouts[id] !== "nextTick") clearTimeout(preFetchTimeouts[id]);
@@ -32899,6 +32412,7 @@ extensions.maxAge = function (maxAge, conf, options) {
preFetchTimeouts[id] = setTimeout(function () {
delete preFetchTimeouts[id];
}, preFetchAge);
+ if (typeof preFetchTimeouts[id].unref === "function") preFetchTimeouts[id].unref();
});
conf.on("delete" + postfix, function (id) {
clearTimeout(timeouts[id]);
@@ -32944,20 +32458,16 @@ extensions.maxAge = function (maxAge, conf, options) {
}
conf.on("clear" + postfix, function () {
- forEach(timeouts, function (id) {
- clearTimeout(id);
- });
+ forEach(timeouts, function (id) { clearTimeout(id); });
timeouts = {};
if (preFetchTimeouts) {
- forEach(preFetchTimeouts, function (id) {
- if (id !== "nextTick") clearTimeout(id);
- });
+ forEach(preFetchTimeouts, function (id) { if (id !== "nextTick") clearTimeout(id); });
preFetchTimeouts = {};
}
});
};
-},{"../lib/registered-extensions":513,"es5-ext/array/from":416,"es5-ext/object/for-each":437,"is-promise":498,"next-tick":523,"timers-ext/valid-timeout":531}],508:[function(require,module,exports){
+},{"../lib/registered-extensions":509,"es5-ext/array/from":417,"es5-ext/object/for-each":438,"is-promise":499,"next-tick":519,"timers-ext/valid-timeout":528}],504:[function(require,module,exports){
// Limit cache size, LRU (least recently used) algorithm.
"use strict";
@@ -32986,7 +32496,7 @@ extensions.max = function (max, conf, options) {
conf.on("clear" + postfix, queue.clear);
};
-},{"../lib/registered-extensions":513,"es5-ext/number/to-pos-integer":432,"lru-queue":504}],509:[function(require,module,exports){
+},{"../lib/registered-extensions":509,"es5-ext/number/to-pos-integer":433,"lru-queue":500}],505:[function(require,module,exports){
/* eslint max-statements: 0 */
// Support for functions returning promise
@@ -33054,16 +32564,16 @@ require("../lib/registered-extensions").promise = function (mode, conf) {
if (!resolvedMode) resolvedMode = "then";
if (resolvedMode === "then") {
- // With no `finally` it's best we can do, side effect is that it mutes any eventual
- // "Unhandled error" events on returned promise
- promise.then(
- function (result) {
- nextTick(onSuccess.bind(this, result));
- },
- function () {
- nextTick(onFailure);
- }
- );
+ var nextTickFailure = function () { nextTick(onFailure); };
+ // Eventual finally needs to be attached to non rejected promise
+ // (so we not force propagation of unhandled rejection)
+ promise = promise.then(function (result) {
+ nextTick(onSuccess.bind(this, result));
+ }, nextTickFailure);
+ // If `finally` is a function we attach to it to remove cancelled promises.
+ if (typeof promise.finally === "function") {
+ promise.finally(nextTickFailure);
+ }
} else if (resolvedMode === "done") {
// Not recommended, as it may mute any eventual "Unhandled error" events
if (typeof promise.done !== "function") {
@@ -33075,7 +32585,7 @@ require("../lib/registered-extensions").promise = function (mode, conf) {
promise.done(onSuccess, onFailure);
} else if (resolvedMode === "done:finally") {
// The only mode with no side effects assuming library does not throw unconditionally
- // for rejected promises. Otherwise then:finally mode should be used instead
+ // for rejected promises.
if (typeof promise.done !== "function") {
throw new Error(
"Memoizee error: Retrieved promise does not implement 'done' " +
@@ -33101,15 +32611,11 @@ require("../lib/registered-extensions").promise = function (mode, conf) {
return;
}
promise = promises[id];
- var emit = function () {
- conf.emit("getasync", id, args, context);
- };
+ var emit = function () { conf.emit("getasync", id, args, context); };
if (isPromise(promise)) {
if (typeof promise.done === "function") promise.done(emit);
else {
- promise.then(function () {
- nextTick(emit);
- });
+ promise.then(function () { nextTick(emit); });
}
} else {
emit();
@@ -33135,16 +32641,11 @@ require("../lib/registered-extensions").promise = function (mode, conf) {
cache = create(null);
waiting = create(null);
promises = create(null);
- conf.emit(
- "clearasync",
- objectMap(oldCache, function (data) {
- return [data];
- })
- );
+ conf.emit("clearasync", objectMap(oldCache, function (data) { return [data]; }));
});
};
-},{"../lib/registered-extensions":513,"es5-ext/object/map":444,"es5-ext/object/primitive-set":447,"es5-ext/object/validate-stringifiable-value":450,"es5-ext/to-short-string-representation":457,"is-promise":498,"next-tick":523}],510:[function(require,module,exports){
+},{"../lib/registered-extensions":509,"es5-ext/object/map":445,"es5-ext/object/primitive-set":448,"es5-ext/object/validate-stringifiable-value":451,"es5-ext/to-short-string-representation":458,"is-promise":499,"next-tick":519}],506:[function(require,module,exports){
// Reference counter, useful for garbage collector like functionality
"use strict";
@@ -33194,7 +32695,7 @@ extensions.refCounter = function (ignore, conf, options) {
});
};
-},{"../lib/registered-extensions":513,"d":412}],511:[function(require,module,exports){
+},{"../lib/registered-extensions":509,"d":413}],507:[function(require,module,exports){
"use strict";
var normalizeOpts = require("es5-ext/object/normalize-options")
@@ -33230,7 +32731,7 @@ module.exports = function (fn/*, options*/) {
return plain(fn, options);
};
-},{"./ext/async":505,"./ext/dispose":506,"./ext/max":508,"./ext/max-age":507,"./ext/promise":509,"./ext/ref-counter":510,"./lib/resolve-length":514,"./normalizers/get":520,"./normalizers/get-1":517,"./normalizers/get-fixed":518,"./normalizers/get-primitive-fixed":519,"./normalizers/primitive":521,"./plain":522,"es5-ext/object/normalize-options":446}],512:[function(require,module,exports){
+},{"./ext/async":501,"./ext/dispose":502,"./ext/max":504,"./ext/max-age":503,"./ext/promise":505,"./ext/ref-counter":506,"./lib/resolve-length":510,"./normalizers/get":516,"./normalizers/get-1":513,"./normalizers/get-fixed":514,"./normalizers/get-primitive-fixed":515,"./normalizers/primitive":517,"./plain":518,"es5-ext/object/normalize-options":447}],508:[function(require,module,exports){
/* eslint no-eq-null: 0, eqeqeq: 0, no-unused-vars: 0 */
"use strict";
@@ -33347,9 +32848,7 @@ module.exports = function (original, length, options) {
if (get) return get(args);
return String(args[0]);
},
- has: function (id) {
- return hasOwnProperty.call(cache, id);
- },
+ has: function (id) { return hasOwnProperty.call(cache, id); },
delete: function (id) {
var result;
if (!hasOwnProperty.call(cache, id)) return;
@@ -33371,9 +32870,7 @@ module.exports = function (original, length, options) {
return on.call(this, type, listener);
},
emit: emit,
- updateEnv: function () {
- original = conf.original;
- }
+ updateEnv: function () { original = conf.original; }
};
if (get) {
extDel = defineLength(function (arg) {
@@ -33384,9 +32881,7 @@ module.exports = function (original, length, options) {
conf.delete(id);
}, memLength);
} else if (length === 0) {
- extDel = function () {
- return conf.delete("data");
- };
+ extDel = function () { return conf.delete("data"); };
} else {
extDel = function (arg) {
if (resolve) arg = resolve(arguments)[0];
@@ -33420,10 +32915,10 @@ module.exports = function (original, length, options) {
return conf;
};
-},{"./resolve-normalize":515,"./resolve-resolve":516,"d":412,"es5-ext/error/custom":420,"es5-ext/function/_define-length":421,"event-emitter":463}],513:[function(require,module,exports){
+},{"./resolve-normalize":511,"./resolve-resolve":512,"d":413,"es5-ext/error/custom":421,"es5-ext/function/_define-length":422,"event-emitter":464}],509:[function(require,module,exports){
"use strict";
-},{}],514:[function(require,module,exports){
+},{}],510:[function(require,module,exports){
"use strict";
var toPosInt = require("es5-ext/number/to-pos-integer");
@@ -33440,7 +32935,7 @@ module.exports = function (optsLength, fnLength, isAsync) {
return toPosInt(optsLength);
};
-},{"es5-ext/number/to-pos-integer":432}],515:[function(require,module,exports){
+},{"es5-ext/number/to-pos-integer":433}],511:[function(require,module,exports){
"use strict";
var callable = require("es5-ext/object/valid-callable");
@@ -33459,7 +32954,7 @@ module.exports = function (userNormalizer) {
return normalizer;
};
-},{"es5-ext/object/valid-callable":448}],516:[function(require,module,exports){
+},{"es5-ext/object/valid-callable":449}],512:[function(require,module,exports){
"use strict";
var toArray = require("es5-ext/array/to-array")
@@ -33482,7 +32977,7 @@ module.exports = function (resolvers) {
return resolveArgs.bind(resolvers);
};
-},{"es5-ext/array/to-array":419,"es5-ext/object/is-value":440,"es5-ext/object/valid-callable":448}],517:[function(require,module,exports){
+},{"es5-ext/array/to-array":420,"es5-ext/object/is-value":441,"es5-ext/object/valid-callable":449}],513:[function(require,module,exports){
"use strict";
var indexOf = require("es5-ext/array/#/e-index-of");
@@ -33513,18 +33008,18 @@ module.exports = function () {
};
};
-},{"es5-ext/array/#/e-index-of":415}],518:[function(require,module,exports){
+},{"es5-ext/array/#/e-index-of":416}],514:[function(require,module,exports){
"use strict";
var indexOf = require("es5-ext/array/#/e-index-of")
- , create = Object.create;
+ , create = Object.create;
module.exports = function (length) {
var lastId = 0, map = [[], []], cache = create(null);
return {
get: function (args) {
var index = 0, set = map, i;
- while (index < (length - 1)) {
+ while (index < length - 1) {
i = indexOf.call(set[0], args[index]);
if (i === -1) return null;
set = set[1][i];
@@ -33536,7 +33031,7 @@ module.exports = function (length) {
},
set: function (args) {
var index = 0, set = map, i;
- while (index < (length - 1)) {
+ while (index < length - 1) {
i = indexOf.call(set[0], args[index]);
if (i === -1) {
i = set[0].push(args[index]) - 1;
@@ -33555,7 +33050,7 @@ module.exports = function (length) {
},
delete: function (id) {
var index = 0, set = map, i, path = [], args = cache[id];
- while (index < (length - 1)) {
+ while (index < length - 1) {
i = indexOf.call(set[0], args[index]);
if (i === -1) {
return;
@@ -33586,7 +33081,7 @@ module.exports = function (length) {
};
};
-},{"es5-ext/array/#/e-index-of":415}],519:[function(require,module,exports){
+},{"es5-ext/array/#/e-index-of":416}],515:[function(require,module,exports){
"use strict";
module.exports = function (length) {
@@ -33604,7 +33099,7 @@ module.exports = function (length) {
};
};
-},{}],520:[function(require,module,exports){
+},{}],516:[function(require,module,exports){
/* eslint max-statements: 0 */
"use strict";
@@ -33696,7 +33191,7 @@ module.exports = function () {
};
};
-},{"es5-ext/array/#/e-index-of":415}],521:[function(require,module,exports){
+},{"es5-ext/array/#/e-index-of":416}],517:[function(require,module,exports){
"use strict";
module.exports = function (args) {
@@ -33707,7 +33202,7 @@ module.exports = function (args) {
return id;
};
-},{}],522:[function(require,module,exports){
+},{}],518:[function(require,module,exports){
"use strict";
var callable = require("es5-ext/object/valid-callable")
@@ -33746,8 +33241,8 @@ module.exports = function self(fn /*, options */) {
return conf.memoized;
};
-},{"./lib/configure-map":512,"./lib/registered-extensions":513,"./lib/resolve-length":514,"es5-ext/object/for-each":437,"es5-ext/object/valid-callable":448}],523:[function(require,module,exports){
-(function (process){
+},{"./lib/configure-map":508,"./lib/registered-extensions":509,"./lib/resolve-length":510,"es5-ext/object/for-each":438,"es5-ext/object/valid-callable":449}],519:[function(require,module,exports){
+(function (process,setImmediate){
'use strict';
var callable, byObserver;
@@ -33820,13 +33315,13 @@ module.exports = (function () {
return null;
}());
-}).call(this,require('_process'))
-},{"_process":526}],524:[function(require,module,exports){
+}).call(this,require('_process'),require("timers").setImmediate)
+},{"_process":522,"timers":526}],520:[function(require,module,exports){
(function (global){
-!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.objectHash=e()}}(function(){return function e(t,n,r){function o(u,a){if(!n[u]){if(!t[u]){var f="function"==typeof require&&require;if(!a&&f)return f(u,!0);if(i)return i(u,!0);throw new Error("Cannot find module '"+u+"'")}var s=n[u]={exports:{}};t[u][0].call(s.exports,function(e){var n=t[u][1][e];return o(n?n:e)},s,s.exports,e,t,n,r)}return n[u].exports}for(var i="function"==typeof require&&require,u=0;u=0)return this.dispatch("[CIRCULAR:"+f+"]");if(n.push(t),"undefined"!=typeof i&&i.isBuffer&&i.isBuffer(t))return r("buffer:"),r(t);if("object"===a||"function"===a){var s=Object.keys(t).sort();e.respectType===!1||p(t)||s.splice(0,0,"prototype","__proto__","constructor"),e.excludeKeys&&(s=s.filter(function(t){return!e.excludeKeys(t)})),r("object:"+s.length+":");var c=this;return s.forEach(function(n){c.dispatch(n),r(":"),e.excludeValues||c.dispatch(t[n]),r(",")})}if(!this["_"+a]){if(e.ignoreUnknown)return r("["+a+"]");throw new Error('Unknown object type "'+a+'"')}this["_"+a](t)},_array:function(t,o){o="undefined"!=typeof o?o:e.unorderedArrays!==!1;var i=this;if(r("array:"+t.length+":"),!o||t.length<=1)return t.forEach(function(e){return i.dispatch(e)});var u=[],a=t.map(function(t){var r=new w,o=n.slice(),i=g(e,r,o);return i.dispatch(t),u=u.concat(o.slice(n.length)),r.read().toString()});return n=n.concat(u),a.sort(),this._array(a,!1)},_date:function(e){return r("date:"+e.toJSON())},_symbol:function(e){return r("symbol:"+e.toString())},_error:function(e){return r("error:"+e.toString())},_boolean:function(e){return r("bool:"+e.toString())},_string:function(e){r("string:"+e.length+":"),r(e)},_function:function(t){r("fn:"),p(t)?this.dispatch("[native]"):this.dispatch(t.toString()),e.respectFunctionNames!==!1&&this.dispatch("function-name:"+String(t.name)),e.respectFunctionProperties&&this._object(t)},_number:function(e){return r("number:"+e.toString())},_xml:function(e){return r("xml:"+e.toString())},_null:function(){return r("Null")},_undefined:function(){return r("Undefined")},_regexp:function(e){return r("regex:"+e.toString())},_uint8array:function(e){return r("uint8array:"),this.dispatch(Array.prototype.slice.call(e))},_uint8clampedarray:function(e){return r("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(e))},_int8array:function(e){return r("uint8array:"),this.dispatch(Array.prototype.slice.call(e))},_uint16array:function(e){return r("uint16array:"),this.dispatch(Array.prototype.slice.call(e))},_int16array:function(e){return r("uint16array:"),this.dispatch(Array.prototype.slice.call(e))},_uint32array:function(e){return r("uint32array:"),this.dispatch(Array.prototype.slice.call(e))},_int32array:function(e){return r("uint32array:"),this.dispatch(Array.prototype.slice.call(e))},_float32array:function(e){return r("float32array:"),this.dispatch(Array.prototype.slice.call(e))},_float64array:function(e){return r("float64array:"),this.dispatch(Array.prototype.slice.call(e))},_arraybuffer:function(e){return r("arraybuffer:"),this.dispatch(new Uint8Array(e))},_url:function(e){return r("url:"+e.toString(),"utf8")},_map:function(t){r("map:");var n=Array.from(t);return this._array(n,e.unorderedSets!==!1)},_set:function(t){r("set:");var n=Array.from(t);return this._array(n,e.unorderedSets!==!1)},_blob:function(){if(e.ignoreUnknown)return r("[blob]");throw Error('Hashing Blob objects is currently not supported\n(see https://github.com/puleos/object-hash/issues/26)\nUse "options.replacer" or "options.ignoreUnknown"\n')},_domwindow:function(){return r("domwindow")},_process:function(){return r("process")},_timer:function(){return r("timer")},_pipe:function(){return r("pipe")},_tcp:function(){return r("tcp")},_udp:function(){return r("udp")},_tty:function(){return r("tty")},_statwatcher:function(){return r("statwatcher")},_securecontext:function(){return r("securecontext")},_connection:function(){return r("connection")},_zlib:function(){return r("zlib")},_context:function(){return r("context")},_nodescript:function(){return r("nodescript")},_httpparser:function(){return r("httpparser")},_dataview:function(){return r("dataview")},_signal:function(){return r("signal")},_fsevent:function(){return r("fsevent")},_tlswrap:function(){return r("tlswrap")}}}function w(){return{buf:"",write:function(e){this.buf+=e},end:function(e){this.buf+=e},read:function(){return this.buf}}}var b=e("crypto");n=t.exports=d,n.sha1=function(e){return d(e)},n.keys=function(e){return d(e,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},n.MD5=function(e){return d(e,{algorithm:"md5",encoding:"hex"})},n.keysMD5=function(e){return d(e,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var v=b.getHashes?b.getHashes().slice():["sha1","md5"];v.push("passthrough");var m=["buffer","hex","binary","base64"];n.writeToStream=function(e,t,n){return"undefined"==typeof n&&(n=t,t={}),t=h(e,t),g(t,n).dispatch(e)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_15f7e235.js","/")},{buffer:3,crypto:5,lYpoI2:10}],2:[function(e,t,n){(function(e,t,r,o,i,u,a,f,s){var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(e){"use strict";function t(e){var t=e.charCodeAt(0);return t===i||t===l?62:t===u||t===d?63:t0)throw new Error("Invalid string. Length must be a multiple of 4");var c=e.length;f="="===e.charAt(c-2)?2:"="===e.charAt(c-1)?1:0,s=new o(3*e.length/4-f),u=f>0?e.length-4:e.length;var l=0;for(r=0,i=0;r>16),n((65280&a)>>8),n(255&a);return 2===f?(a=t(e.charAt(r))<<2|t(e.charAt(r+1))>>4,n(255&a)):1===f&&(a=t(e.charAt(r))<<10|t(e.charAt(r+1))<<4|t(e.charAt(r+2))>>2,n(a>>8&255),n(255&a)),s}function r(e){function t(e){return c.charAt(e)}function n(e){return t(e>>18&63)+t(e>>12&63)+t(e>>6&63)+t(63&e)}var r,o,i,u=e.length%3,a="";for(r=0,i=e.length-u;r>2),a+=t(o<<4&63),a+="==";break;case 2:o=(e[e.length-2]<<8)+e[e.length-1],a+=t(o>>10),a+=t(o>>4&63),a+=t(o<<2&63),a+="="}return a}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="+".charCodeAt(0),u="/".charCodeAt(0),a="0".charCodeAt(0),f="a".charCodeAt(0),s="A".charCodeAt(0),l="-".charCodeAt(0),d="_".charCodeAt(0);e.toByteArray=n,e.fromByteArray=r}("undefined"==typeof n?this.base64js={}:n)}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:10}],3:[function(e,t,n){(function(t,r,o,i,u,a,f,s,c){function o(e,t,n){if(!(this instanceof o))return new o(e,t,n);var r=typeof e;if("base64"===t&&"string"===r)for(e=N(e);e.length%4!==0;)e+="=";var i;if("number"===r)i=F(e);else if("string"===r)i=o.byteLength(e,t);else{if("object"!==r)throw new Error("First argument needs to be a number, array or string.");i=F(e.length)}var u;o._useTypedArrays?u=o._augment(new Uint8Array(i)):(u=this,u.length=i,u._isBuffer=!0);var a;if(o._useTypedArrays&&"number"==typeof e.byteLength)u._set(e);else if(O(e))for(a=0;ai&&(r=i)):r=i;var u=t.length;$(u%2===0,"Invalid hex string"),r>u/2&&(r=u/2);for(var a=0;ar)&&(n=r);for(var o="",i=t;i=o)){var i;return n?(i=e[t],t+1=o)){var i;return n?(t+2>>0)):(t+1>>0),i}}function B(e,t,n,r){r||($("boolean"==typeof n,"missing or invalid endian"),$(void 0!==t&&null!==t,"missing offset"),$(t+1=o)){var i=I(e,t,n,!0),u=32768&i;return u?(65535-i+1)*-1:i}}function L(e,t,n,r){r||($("boolean"==typeof n,"missing or invalid endian"),$(void 0!==t&&null!==t,"missing offset"),$(t+3=o)){var i=A(e,t,n,!0),u=2147483648&i;return u?(4294967295-i+1)*-1:i}}function U(e,t,n,r){return r||($("boolean"==typeof n,"missing or invalid endian"),$(t+3=i))for(var u=0,a=Math.min(i-n,2);u>>8*(r?u:1-u)}function C(e,t,n,r,o){o||($(void 0!==t&&null!==t,"missing value"),$("boolean"==typeof r,"missing or invalid endian"),$(void 0!==n&&null!==n,"missing offset"),$(n+3=i))for(var u=0,a=Math.min(i-n,4);u>>8*(r?u:3-u)&255}function j(e,t,n,r,o){o||($(void 0!==t&&null!==t,"missing value"),$("boolean"==typeof r,"missing or invalid endian"),$(void 0!==n&&null!==n,"missing offset"),$(n+1=i||(t>=0?S(e,t,n,r,o):S(e,65535+t+1,n,r,o))}function k(e,t,n,r,o){o||($(void 0!==t&&null!==t,"missing value"),$("boolean"==typeof r,"missing or invalid endian"),$(void 0!==n&&null!==n,"missing offset"),$(n+3=i||(t>=0?C(e,t,n,r,o):C(e,4294967295+t+1,n,r,o))}function T(e,t,n,r,o){o||($(void 0!==t&&null!==t,"missing value"),$("boolean"==typeof r,"missing or invalid endian"),$(void 0!==n&&null!==n,"missing offset"),$(n+3=i||Q.write(e,t,n,r,23,4)}function M(e,t,n,r,o){o||($(void 0!==t&&null!==t,"missing value"),$("boolean"==typeof r,"missing or invalid endian"),$(void 0!==n&&null!==n,"missing offset"),$(n+7=i||Q.write(e,t,n,r,52,8)}function N(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Y(e,t,n){return"number"!=typeof e?n:(e=~~e,e>=t?t:e>=0?e:(e+=t,e>=0?e:0))}function F(e){return e=~~Math.ceil(+e),e<0?0:e}function D(e){return(Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)})(e)}function O(e){return D(e)||o.isBuffer(e)||e&&"object"==typeof e&&"number"==typeof e.length}function H(e){return e<16?"0"+e.toString(16):e.toString(16)}function V(e){for(var t=[],n=0;n=55296&&r<=57343&&n++;for(var i=encodeURIComponent(e.slice(o,n+1)).substr(1).split("%"),u=0;u>8,r=t%256,o.push(r),o.push(n);return o}function R(e){return G.toByteArray(e)}function W(e,t,n,r){for(var o=0;o=t.length||o>=e.length);o++)t[o+n]=e[o];return o}function J(e){try{return decodeURIComponent(e)}catch(t){return String.fromCharCode(65533)}}function K(e,t){$("number"==typeof e,"cannot write a non-number as a number"),$(e>=0,"specified a negative value for writing an unsigned value"),$(e<=t,"value is larger than maximum value for type"),$(Math.floor(e)===e,"value has a fractional component")}function z(e,t,n){$("number"==typeof e,"cannot write a non-number as a number"),$(e<=t,"value larger than maximum allowed value"),$(e>=n,"value smaller than minimum allowed value"),$(Math.floor(e)===e,"value has a fractional component")}function X(e,t,n){$("number"==typeof e,"cannot write a non-number as a number"),$(e<=t,"value larger than maximum allowed value"),$(e>=n,"value smaller than minimum allowed value")}function $(e,t){if(!e)throw new Error(t||"Failed assertion")}var G=e("base64-js"),Q=e("ieee754");n.Buffer=o,n.SlowBuffer=o,n.INSPECT_MAX_BYTES=50,o.poolSize=8192,o._useTypedArrays=function(){try{var e=new ArrayBuffer(0),t=new Uint8Array(e);return t.foo=function(){return 42},42===t.foo()&&"function"==typeof t.subarray}catch(n){return!1}}(),o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.isBuffer=function(e){return!(null===e||void 0===e||!e._isBuffer)},o.byteLength=function(e,t){var n;switch(e+="",t||"utf8"){case"hex":n=e.length/2;break;case"utf8":case"utf-8":n=V(e).length;break;case"ascii":case"binary":case"raw":n=e.length;break;case"base64":n=R(e).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":n=2*e.length;break;default:throw new Error("Unknown encoding")}return n},o.concat=function(e,t){if($(D(e),"Usage: Buffer.concat(list, [totalLength])\nlist should be an Array."),0===e.length)return new o(0);if(1===e.length)return e[0];var n;if("number"!=typeof t)for(t=0,n=0;ni&&(n=i)):n=i,r=String(r||"utf8").toLowerCase();var u;switch(r){case"hex":u=l(this,e,t,n);break;case"utf8":case"utf-8":u=d(this,e,t,n);break;case"ascii":u=h(this,e,t,n);break;case"binary":u=p(this,e,t,n);break;case"base64":u=y(this,e,t,n);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":u=g(this,e,t,n);break;default:throw new Error("Unknown encoding")}return u},o.prototype.toString=function(e,t,n){var r=this;if(e=String(e||"utf8").toLowerCase(),t=Number(t)||0,n=void 0!==n?Number(n):n=r.length,n===t)return"";var o;switch(e){case"hex":o=_(r,t,n);break;case"utf8":case"utf-8":o=b(r,t,n);break;case"ascii":o=v(r,t,n);break;case"binary":o=m(r,t,n);break;case"base64":o=w(r,t,n);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":o=E(r,t,n);break;default:throw new Error("Unknown encoding")}return o},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},o.prototype.copy=function(e,t,n,r){var i=this;if(n||(n=0),r||0===r||(r=this.length),t||(t=0),r!==n&&0!==e.length&&0!==i.length){$(r>=n,"sourceEnd < sourceStart"),$(t>=0&&t=0&&n=0&&r<=i.length,"sourceEnd out of bounds"),r>this.length&&(r=this.length),e.length-t=this.length))return this[e]},o.prototype.readUInt16LE=function(e,t){return I(this,e,!0,t)},o.prototype.readUInt16BE=function(e,t){return I(this,e,!1,t)},o.prototype.readUInt32LE=function(e,t){return A(this,e,!0,t)},o.prototype.readUInt32BE=function(e,t){return A(this,e,!1,t)},o.prototype.readInt8=function(e,t){if(t||($(void 0!==e&&null!==e,"missing offset"),$(e=this.length)){var n=128&this[e];return n?(255-this[e]+1)*-1:this[e]}},o.prototype.readInt16LE=function(e,t){return B(this,e,!0,t)},o.prototype.readInt16BE=function(e,t){return B(this,e,!1,t)},o.prototype.readInt32LE=function(e,t){return L(this,e,!0,t)},o.prototype.readInt32BE=function(e,t){return L(this,e,!1,t)},o.prototype.readFloatLE=function(e,t){return U(this,e,!0,t)},o.prototype.readFloatBE=function(e,t){return U(this,e,!1,t)},o.prototype.readDoubleLE=function(e,t){return x(this,e,!0,t)},o.prototype.readDoubleBE=function(e,t){return x(this,e,!1,t)},o.prototype.writeUInt8=function(e,t,n){n||($(void 0!==e&&null!==e,"missing value"),$(void 0!==t&&null!==t,"missing offset"),$(t=this.length||(this[t]=e)},o.prototype.writeUInt16LE=function(e,t,n){S(this,e,t,!0,n)},o.prototype.writeUInt16BE=function(e,t,n){S(this,e,t,!1,n)},o.prototype.writeUInt32LE=function(e,t,n){C(this,e,t,!0,n)},o.prototype.writeUInt32BE=function(e,t,n){C(this,e,t,!1,n)},o.prototype.writeInt8=function(e,t,n){n||($(void 0!==e&&null!==e,"missing value"),$(void 0!==t&&null!==t,"missing offset"),$(t=this.length||(e>=0?this.writeUInt8(e,t,n):this.writeUInt8(255+e+1,t,n))},o.prototype.writeInt16LE=function(e,t,n){j(this,e,t,!0,n)},o.prototype.writeInt16BE=function(e,t,n){j(this,e,t,!1,n)},o.prototype.writeInt32LE=function(e,t,n){k(this,e,t,!0,n)},o.prototype.writeInt32BE=function(e,t,n){k(this,e,t,!1,n)},o.prototype.writeFloatLE=function(e,t,n){T(this,e,t,!0,n)},o.prototype.writeFloatBE=function(e,t,n){T(this,e,t,!1,n)},o.prototype.writeDoubleLE=function(e,t,n){M(this,e,t,!0,n)},o.prototype.writeDoubleBE=function(e,t,n){M(this,e,t,!1,n)},o.prototype.fill=function(e,t,n){if(e||(e=0),t||(t=0),n||(n=this.length),"string"==typeof e&&(e=e.charCodeAt(0)),$("number"==typeof e&&!isNaN(e),"value is not a number"),$(n>=t,"end < start"),n!==t&&0!==this.length){$(t>=0&&t=0&&n<=this.length,"end out of bounds");for(var r=t;r"},o.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(o._useTypedArrays)return new o(this).buffer;for(var e=new Uint8Array(this.length),t=0,n=e.length;tm?t=e(t):t.length>5]|=128<>>9<<4)+14]=t;for(var n=1732584193,r=-271733879,o=-1732584194,i=271733878,u=0;u>16)+(t>>16)+(n>>16);return r<<16|65535&n}function b(e,t){return e<>>32-t}var v=e("./helpers");t.exports=function(e){return v.hash(e,l,16)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:10}],7:[function(e,t,n){(function(e,n,r,o,i,u,a,f,s){!function(){var e,n,r=this;e=function(e){for(var t,t,n=new Array(e),r=0;r>>((3&r)<<3)&255;return n},r.crypto&&crypto.getRandomValues&&(n=function(e){var t=new Uint8Array(e);return crypto.getRandomValues(t),t}),t.exports=n||e}()}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:10}],8:[function(e,t,n){(function(n,r,o,i,u,a,f,s,c){function l(e,t){e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t;for(var n=Array(80),r=1732584193,o=-271733879,i=-1732584194,u=271733878,a=-1009589776,f=0;f>16)+(t>>16)+(n>>16);return r<<16|65535&n}function y(e,t){return e<>>32-t}var g=e("./helpers");t.exports=function(e){return g.hash(e,l,20,!0)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:10}],9:[function(e,t,n){(function(n,r,o,i,u,a,f,s,c){var l=e("./helpers"),d=function(e,t){var n=(65535&e)+(65535&t),r=(e>>16)+(t>>16)+(n>>16);return r<<16|65535&n},h=function(e,t){return e>>>t|e<<32-t},p=function(e,t){return e>>>t},y=function(e,t,n){return e&t^~e&n},g=function(e,t,n){return e&t^e&n^t&n},w=function(e){return h(e,2)^h(e,13)^h(e,22)},b=function(e){return h(e,6)^h(e,11)^h(e,25)},v=function(e){return h(e,7)^h(e,18)^p(e,3);
-},m=function(e){return h(e,17)^h(e,19)^p(e,10)},_=function(e,t){var n,r,o,i,u,a,f,s,c,l,h,p,_=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),E=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),I=new Array(64);e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t;for(var c=0;c0)){var r=n.shift();r()}},!0),function(e){n.push(e),window.postMessage("process-tick","*")}}return function(e){setTimeout(e,0)}}(),e.title="browser",e.browser=!0,e.env={},e.argv=[],e.on=c,e.addListener=c,e.once=c,e.off=c,e.removeListener=c,e.removeAllListeners=c,e.emit=c,e.binding=function(e){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(e){throw new Error("process.chdir is not supported")}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/process/browser.js","/node_modules/gulp-browserify/node_modules/process")},{buffer:3,lYpoI2:10}],11:[function(e,t,n){(function(e,t,r,o,i,u,a,f,s){n.read=function(e,t,n,r,o){var i,u,a=8*o-r-1,f=(1<>1,c=-7,l=n?o-1:0,d=n?-1:1,h=e[t+l];for(l+=d,i=h&(1<<-c)-1,h>>=-c,c+=a;c>0;i=256*i+e[t+l],l+=d,c-=8);for(u=i&(1<<-c)-1,i>>=-c,c+=r;c>0;u=256*u+e[t+l],l+=d,c-=8);if(0===i)i=1-s;else{if(i===f)return u?NaN:(h?-1:1)*(1/0);u+=Math.pow(2,r),i-=s}return(h?-1:1)*u*Math.pow(2,i-r)},n.write=function(e,t,n,r,o,i){var u,a,f,s=8*i-o-1,c=(1<>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,p=r?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,u=c):(u=Math.floor(Math.log(t)/Math.LN2),t*(f=Math.pow(2,-u))<1&&(u--,f*=2),t+=u+l>=1?d/f:d*Math.pow(2,1-l),t*f>=2&&(u++,f/=2),u+l>=c?(a=0,u=c):u+l>=1?(a=(t*f-1)*Math.pow(2,o),u+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,o),u=0));o>=8;e[n+h]=255&a,h+=p,a/=256,o-=8);for(u=u<0;e[n+h]=255&u,h+=p,u/=256,s-=8);e[n+h-p]|=128*y}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/ieee754/index.js","/node_modules/ieee754")},{buffer:3,lYpoI2:10}]},{},[1])(1)});
+!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.objectHash=e()}}(function(){return function e(t,n,r){function o(u,a){if(!n[u]){if(!t[u]){var f="function"==typeof require&&require;if(!a&&f)return f(u,!0);if(i)return i(u,!0);throw new Error("Cannot find module '"+u+"'")}var s=n[u]={exports:{}};t[u][0].call(s.exports,function(e){var n=t[u][1][e];return o(n?n:e)},s,s.exports,e,t,n,r)}return n[u].exports}for(var i="function"==typeof require&&require,u=0;u=0)return this.dispatch("[CIRCULAR:"+f+"]");if(n.push(t),"undefined"!=typeof i&&i.isBuffer&&i.isBuffer(t))return r("buffer:"),r(t);if("object"===a||"function"===a){var s=Object.keys(t);e.unorderedObjects&&(s=s.sort()),e.respectType===!1||p(t)||s.splice(0,0,"prototype","__proto__","constructor"),e.excludeKeys&&(s=s.filter(function(t){return!e.excludeKeys(t)})),r("object:"+s.length+":");var c=this;return s.forEach(function(n){c.dispatch(n),r(":"),e.excludeValues||c.dispatch(t[n]),r(",")})}if(!this["_"+a]){if(e.ignoreUnknown)return r("["+a+"]");throw new Error('Unknown object type "'+a+'"')}this["_"+a](t)},_array:function(t,o){o="undefined"!=typeof o?o:e.unorderedArrays!==!1;var i=this;if(r("array:"+t.length+":"),!o||t.length<=1)return t.forEach(function(e){return i.dispatch(e)});var u=[],a=t.map(function(t){var r=new w,o=n.slice(),i=g(e,r,o);return i.dispatch(t),u=u.concat(o.slice(n.length)),r.read().toString()});return n=n.concat(u),a.sort(),this._array(a,!1)},_date:function(e){return r("date:"+e.toJSON())},_symbol:function(e){return r("symbol:"+e.toString())},_error:function(e){return r("error:"+e.toString())},_boolean:function(e){return r("bool:"+e.toString())},_string:function(e){r("string:"+e.length+":"),r(e)},_function:function(t){r("fn:"),p(t)?this.dispatch("[native]"):this.dispatch(t.toString()),e.respectFunctionNames!==!1&&this.dispatch("function-name:"+String(t.name)),e.respectFunctionProperties&&this._object(t)},_number:function(e){return r("number:"+e.toString())},_xml:function(e){return r("xml:"+e.toString())},_null:function(){return r("Null")},_undefined:function(){return r("Undefined")},_regexp:function(e){return r("regex:"+e.toString())},_uint8array:function(e){return r("uint8array:"),this.dispatch(Array.prototype.slice.call(e))},_uint8clampedarray:function(e){return r("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(e))},_int8array:function(e){return r("uint8array:"),this.dispatch(Array.prototype.slice.call(e))},_uint16array:function(e){return r("uint16array:"),this.dispatch(Array.prototype.slice.call(e))},_int16array:function(e){return r("uint16array:"),this.dispatch(Array.prototype.slice.call(e))},_uint32array:function(e){return r("uint32array:"),this.dispatch(Array.prototype.slice.call(e))},_int32array:function(e){return r("uint32array:"),this.dispatch(Array.prototype.slice.call(e))},_float32array:function(e){return r("float32array:"),this.dispatch(Array.prototype.slice.call(e))},_float64array:function(e){return r("float64array:"),this.dispatch(Array.prototype.slice.call(e))},_arraybuffer:function(e){return r("arraybuffer:"),this.dispatch(new Uint8Array(e))},_url:function(e){return r("url:"+e.toString(),"utf8")},_map:function(t){r("map:");var n=Array.from(t);return this._array(n,e.unorderedSets!==!1)},_set:function(t){r("set:");var n=Array.from(t);return this._array(n,e.unorderedSets!==!1)},_blob:function(){if(e.ignoreUnknown)return r("[blob]");throw Error('Hashing Blob objects is currently not supported\n(see https://github.com/puleos/object-hash/issues/26)\nUse "options.replacer" or "options.ignoreUnknown"\n')},_domwindow:function(){return r("domwindow")},_process:function(){return r("process")},_timer:function(){return r("timer")},_pipe:function(){return r("pipe")},_tcp:function(){return r("tcp")},_udp:function(){return r("udp")},_tty:function(){return r("tty")},_statwatcher:function(){return r("statwatcher")},_securecontext:function(){return r("securecontext")},_connection:function(){return r("connection")},_zlib:function(){return r("zlib")},_context:function(){return r("context")},_nodescript:function(){return r("nodescript")},_httpparser:function(){return r("httpparser")},_dataview:function(){return r("dataview")},_signal:function(){return r("signal")},_fsevent:function(){return r("fsevent")},_tlswrap:function(){return r("tlswrap")}}}function w(){return{buf:"",write:function(e){this.buf+=e},end:function(e){this.buf+=e},read:function(){return this.buf}}}var b=e("crypto");n=t.exports=d,n.sha1=function(e){return d(e)},n.keys=function(e){return d(e,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},n.MD5=function(e){return d(e,{algorithm:"md5",encoding:"hex"})},n.keysMD5=function(e){return d(e,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var v=b.getHashes?b.getHashes().slice():["sha1","md5"];v.push("passthrough");var m=["buffer","hex","binary","base64"];n.writeToStream=function(e,t,n){return"undefined"==typeof n&&(n=t,t={}),t=h(e,t),g(t,n).dispatch(e)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_5f1a2fc7.js","/")},{buffer:3,crypto:5,lYpoI2:10}],2:[function(e,t,n){(function(e,t,r,o,i,u,a,f,s){var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(e){"use strict";function t(e){var t=e.charCodeAt(0);return t===i||t===l?62:t===u||t===d?63:t0)throw new Error("Invalid string. Length must be a multiple of 4");var c=e.length;f="="===e.charAt(c-2)?2:"="===e.charAt(c-1)?1:0,s=new o(3*e.length/4-f),u=f>0?e.length-4:e.length;var l=0;for(r=0,i=0;r>16),n((65280&a)>>8),n(255&a);return 2===f?(a=t(e.charAt(r))<<2|t(e.charAt(r+1))>>4,n(255&a)):1===f&&(a=t(e.charAt(r))<<10|t(e.charAt(r+1))<<4|t(e.charAt(r+2))>>2,n(a>>8&255),n(255&a)),s}function r(e){function t(e){return c.charAt(e)}function n(e){return t(e>>18&63)+t(e>>12&63)+t(e>>6&63)+t(63&e)}var r,o,i,u=e.length%3,a="";for(r=0,i=e.length-u;r>2),a+=t(o<<4&63),a+="==";break;case 2:o=(e[e.length-2]<<8)+e[e.length-1],a+=t(o>>10),a+=t(o>>4&63),a+=t(o<<2&63),a+="="}return a}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="+".charCodeAt(0),u="/".charCodeAt(0),a="0".charCodeAt(0),f="a".charCodeAt(0),s="A".charCodeAt(0),l="-".charCodeAt(0),d="_".charCodeAt(0);e.toByteArray=n,e.fromByteArray=r}("undefined"==typeof n?this.base64js={}:n)}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:10}],3:[function(e,t,n){(function(t,r,o,i,u,a,f,s,c){function o(e,t,n){if(!(this instanceof o))return new o(e,t,n);var r=typeof e;if("base64"===t&&"string"===r)for(e=N(e);e.length%4!==0;)e+="=";var i;if("number"===r)i=F(e);else if("string"===r)i=o.byteLength(e,t);else{if("object"!==r)throw new Error("First argument needs to be a number, array or string.");i=F(e.length)}var u;o._useTypedArrays?u=o._augment(new Uint8Array(i)):(u=this,u.length=i,u._isBuffer=!0);var a;if(o._useTypedArrays&&"number"==typeof e.byteLength)u._set(e);else if(O(e))for(a=0;ai&&(r=i)):r=i;var u=t.length;$(u%2===0,"Invalid hex string"),r>u/2&&(r=u/2);for(var a=0;ar)&&(n=r);for(var o="",i=t;i=o)){var i;return n?(i=e[t],t+1=o)){var i;return n?(t+2>>0)):(t+1>>0),i}}function B(e,t,n,r){r||($("boolean"==typeof n,"missing or invalid endian"),$(void 0!==t&&null!==t,"missing offset"),$(t+1=o)){var i=I(e,t,n,!0),u=32768&i;return u?(65535-i+1)*-1:i}}function L(e,t,n,r){r||($("boolean"==typeof n,"missing or invalid endian"),$(void 0!==t&&null!==t,"missing offset"),$(t+3=o)){var i=A(e,t,n,!0),u=2147483648&i;return u?(4294967295-i+1)*-1:i}}function U(e,t,n,r){return r||($("boolean"==typeof n,"missing or invalid endian"),$(t+3=i))for(var u=0,a=Math.min(i-n,2);u>>8*(r?u:1-u)}function j(e,t,n,r,o){o||($(void 0!==t&&null!==t,"missing value"),$("boolean"==typeof r,"missing or invalid endian"),$(void 0!==n&&null!==n,"missing offset"),$(n+3=i))for(var u=0,a=Math.min(i-n,4);u>>8*(r?u:3-u)&255}function C(e,t,n,r,o){o||($(void 0!==t&&null!==t,"missing value"),$("boolean"==typeof r,"missing or invalid endian"),$(void 0!==n&&null!==n,"missing offset"),$(n+1=i||(t>=0?S(e,t,n,r,o):S(e,65535+t+1,n,r,o))}function k(e,t,n,r,o){o||($(void 0!==t&&null!==t,"missing value"),$("boolean"==typeof r,"missing or invalid endian"),$(void 0!==n&&null!==n,"missing offset"),$(n+3=i||(t>=0?j(e,t,n,r,o):j(e,4294967295+t+1,n,r,o))}function T(e,t,n,r,o){o||($(void 0!==t&&null!==t,"missing value"),$("boolean"==typeof r,"missing or invalid endian"),$(void 0!==n&&null!==n,"missing offset"),$(n+3=i||Q.write(e,t,n,r,23,4)}function M(e,t,n,r,o){o||($(void 0!==t&&null!==t,"missing value"),$("boolean"==typeof r,"missing or invalid endian"),$(void 0!==n&&null!==n,"missing offset"),$(n+7=i||Q.write(e,t,n,r,52,8)}function N(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Y(e,t,n){return"number"!=typeof e?n:(e=~~e,e>=t?t:e>=0?e:(e+=t,e>=0?e:0))}function F(e){return e=~~Math.ceil(+e),e<0?0:e}function D(e){return(Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)})(e)}function O(e){return D(e)||o.isBuffer(e)||e&&"object"==typeof e&&"number"==typeof e.length}function H(e){return e<16?"0"+e.toString(16):e.toString(16)}function V(e){for(var t=[],n=0;n=55296&&r<=57343&&n++;for(var i=encodeURIComponent(e.slice(o,n+1)).substr(1).split("%"),u=0;u>8,r=t%256,o.push(r),o.push(n);return o}function R(e){return G.toByteArray(e)}function W(e,t,n,r){for(var o=0;o=t.length||o>=e.length);o++)t[o+n]=e[o];return o}function J(e){try{return decodeURIComponent(e)}catch(t){return String.fromCharCode(65533)}}function K(e,t){$("number"==typeof e,"cannot write a non-number as a number"),$(e>=0,"specified a negative value for writing an unsigned value"),$(e<=t,"value is larger than maximum value for type"),$(Math.floor(e)===e,"value has a fractional component")}function z(e,t,n){$("number"==typeof e,"cannot write a non-number as a number"),$(e<=t,"value larger than maximum allowed value"),$(e>=n,"value smaller than minimum allowed value"),$(Math.floor(e)===e,"value has a fractional component")}function X(e,t,n){$("number"==typeof e,"cannot write a non-number as a number"),$(e<=t,"value larger than maximum allowed value"),$(e>=n,"value smaller than minimum allowed value")}function $(e,t){if(!e)throw new Error(t||"Failed assertion")}var G=e("base64-js"),Q=e("ieee754");n.Buffer=o,n.SlowBuffer=o,n.INSPECT_MAX_BYTES=50,o.poolSize=8192,o._useTypedArrays=function(){try{var e=new ArrayBuffer(0),t=new Uint8Array(e);return t.foo=function(){return 42},42===t.foo()&&"function"==typeof t.subarray}catch(n){return!1}}(),o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.isBuffer=function(e){return!(null===e||void 0===e||!e._isBuffer)},o.byteLength=function(e,t){var n;switch(e+="",t||"utf8"){case"hex":n=e.length/2;break;case"utf8":case"utf-8":n=V(e).length;break;case"ascii":case"binary":case"raw":n=e.length;break;case"base64":n=R(e).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":n=2*e.length;break;default:throw new Error("Unknown encoding")}return n},o.concat=function(e,t){if($(D(e),"Usage: Buffer.concat(list, [totalLength])\nlist should be an Array."),0===e.length)return new o(0);if(1===e.length)return e[0];var n;if("number"!=typeof t)for(t=0,n=0;ni&&(n=i)):n=i,r=String(r||"utf8").toLowerCase();var u;switch(r){case"hex":u=l(this,e,t,n);break;case"utf8":case"utf-8":u=d(this,e,t,n);break;case"ascii":u=h(this,e,t,n);break;case"binary":u=p(this,e,t,n);break;case"base64":u=y(this,e,t,n);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":u=g(this,e,t,n);break;default:throw new Error("Unknown encoding")}return u},o.prototype.toString=function(e,t,n){var r=this;if(e=String(e||"utf8").toLowerCase(),t=Number(t)||0,n=void 0!==n?Number(n):n=r.length,n===t)return"";var o;switch(e){case"hex":o=_(r,t,n);break;case"utf8":case"utf-8":o=b(r,t,n);break;case"ascii":o=v(r,t,n);break;case"binary":o=m(r,t,n);break;case"base64":o=w(r,t,n);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":o=E(r,t,n);break;default:throw new Error("Unknown encoding")}return o},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},o.prototype.copy=function(e,t,n,r){var i=this;if(n||(n=0),r||0===r||(r=this.length),t||(t=0),r!==n&&0!==e.length&&0!==i.length){$(r>=n,"sourceEnd < sourceStart"),$(t>=0&&t=0&&n=0&&r<=i.length,"sourceEnd out of bounds"),r>this.length&&(r=this.length),e.length-t=this.length))return this[e]},o.prototype.readUInt16LE=function(e,t){return I(this,e,!0,t)},o.prototype.readUInt16BE=function(e,t){return I(this,e,!1,t)},o.prototype.readUInt32LE=function(e,t){return A(this,e,!0,t)},o.prototype.readUInt32BE=function(e,t){return A(this,e,!1,t)},o.prototype.readInt8=function(e,t){if(t||($(void 0!==e&&null!==e,"missing offset"),$(e=this.length)){var n=128&this[e];return n?(255-this[e]+1)*-1:this[e]}},o.prototype.readInt16LE=function(e,t){return B(this,e,!0,t)},o.prototype.readInt16BE=function(e,t){return B(this,e,!1,t)},o.prototype.readInt32LE=function(e,t){return L(this,e,!0,t)},o.prototype.readInt32BE=function(e,t){return L(this,e,!1,t)},o.prototype.readFloatLE=function(e,t){return U(this,e,!0,t)},o.prototype.readFloatBE=function(e,t){return U(this,e,!1,t)},o.prototype.readDoubleLE=function(e,t){return x(this,e,!0,t)},o.prototype.readDoubleBE=function(e,t){return x(this,e,!1,t)},o.prototype.writeUInt8=function(e,t,n){n||($(void 0!==e&&null!==e,"missing value"),$(void 0!==t&&null!==t,"missing offset"),$(t=this.length||(this[t]=e)},o.prototype.writeUInt16LE=function(e,t,n){S(this,e,t,!0,n)},o.prototype.writeUInt16BE=function(e,t,n){S(this,e,t,!1,n)},o.prototype.writeUInt32LE=function(e,t,n){j(this,e,t,!0,n)},o.prototype.writeUInt32BE=function(e,t,n){j(this,e,t,!1,n)},o.prototype.writeInt8=function(e,t,n){n||($(void 0!==e&&null!==e,"missing value"),$(void 0!==t&&null!==t,"missing offset"),$(t=this.length||(e>=0?this.writeUInt8(e,t,n):this.writeUInt8(255+e+1,t,n))},o.prototype.writeInt16LE=function(e,t,n){C(this,e,t,!0,n)},o.prototype.writeInt16BE=function(e,t,n){C(this,e,t,!1,n)},o.prototype.writeInt32LE=function(e,t,n){k(this,e,t,!0,n)},o.prototype.writeInt32BE=function(e,t,n){k(this,e,t,!1,n)},o.prototype.writeFloatLE=function(e,t,n){T(this,e,t,!0,n)},o.prototype.writeFloatBE=function(e,t,n){T(this,e,t,!1,n)},o.prototype.writeDoubleLE=function(e,t,n){M(this,e,t,!0,n)},o.prototype.writeDoubleBE=function(e,t,n){M(this,e,t,!1,n)},o.prototype.fill=function(e,t,n){if(e||(e=0),t||(t=0),n||(n=this.length),"string"==typeof e&&(e=e.charCodeAt(0)),$("number"==typeof e&&!isNaN(e),"value is not a number"),$(n>=t,"end < start"),n!==t&&0!==this.length){$(t>=0&&t=0&&n<=this.length,"end out of bounds");for(var r=t;r"},o.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(o._useTypedArrays)return new o(this).buffer;for(var e=new Uint8Array(this.length),t=0,n=e.length;tm?t=e(t):t.length>5]|=128<>>9<<4)+14]=t;for(var n=1732584193,r=-271733879,o=-1732584194,i=271733878,u=0;u>16)+(t>>16)+(n>>16);return r<<16|65535&n}function b(e,t){return e<>>32-t}var v=e("./helpers");t.exports=function(e){return v.hash(e,l,16)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:10}],7:[function(e,t,n){(function(e,n,r,o,i,u,a,f,s){!function(){var e,n,r=this;e=function(e){for(var t,t,n=new Array(e),r=0;r>>((3&r)<<3)&255;return n},r.crypto&&crypto.getRandomValues&&(n=function(e){var t=new Uint8Array(e);return crypto.getRandomValues(t),t}),t.exports=n||e}()}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:10}],8:[function(e,t,n){(function(n,r,o,i,u,a,f,s,c){function l(e,t){e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t;for(var n=Array(80),r=1732584193,o=-271733879,i=-1732584194,u=271733878,a=-1009589776,f=0;f>16)+(t>>16)+(n>>16);return r<<16|65535&n}function y(e,t){return e<>>32-t}var g=e("./helpers");t.exports=function(e){return g.hash(e,l,20,!0)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:10}],9:[function(e,t,n){(function(n,r,o,i,u,a,f,s,c){var l=e("./helpers"),d=function(e,t){var n=(65535&e)+(65535&t),r=(e>>16)+(t>>16)+(n>>16);return r<<16|65535&n},h=function(e,t){return e>>>t|e<<32-t},p=function(e,t){return e>>>t},y=function(e,t,n){return e&t^~e&n},g=function(e,t,n){return e&t^e&n^t&n},w=function(e){return h(e,2)^h(e,13)^h(e,22)},b=function(e){
+return h(e,6)^h(e,11)^h(e,25)},v=function(e){return h(e,7)^h(e,18)^p(e,3)},m=function(e){return h(e,17)^h(e,19)^p(e,10)},_=function(e,t){var n,r,o,i,u,a,f,s,c,l,h,p,_=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),E=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),I=new Array(64);e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t;for(var c=0;c0)){var r=n.shift();r()}},!0),function(e){n.push(e),window.postMessage("process-tick","*")}}return function(e){setTimeout(e,0)}}(),e.title="browser",e.browser=!0,e.env={},e.argv=[],e.on=c,e.addListener=c,e.once=c,e.off=c,e.removeListener=c,e.removeAllListeners=c,e.emit=c,e.binding=function(e){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(e){throw new Error("process.chdir is not supported")}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/process/browser.js","/node_modules/gulp-browserify/node_modules/process")},{buffer:3,lYpoI2:10}],11:[function(e,t,n){(function(e,t,r,o,i,u,a,f,s){n.read=function(e,t,n,r,o){var i,u,a=8*o-r-1,f=(1<>1,c=-7,l=n?o-1:0,d=n?-1:1,h=e[t+l];for(l+=d,i=h&(1<<-c)-1,h>>=-c,c+=a;c>0;i=256*i+e[t+l],l+=d,c-=8);for(u=i&(1<<-c)-1,i>>=-c,c+=r;c>0;u=256*u+e[t+l],l+=d,c-=8);if(0===i)i=1-s;else{if(i===f)return u?NaN:(h?-1:1)*(1/0);u+=Math.pow(2,r),i-=s}return(h?-1:1)*u*Math.pow(2,i-r)},n.write=function(e,t,n,r,o,i){var u,a,f,s=8*i-o-1,c=(1<>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,p=r?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,u=c):(u=Math.floor(Math.log(t)/Math.LN2),t*(f=Math.pow(2,-u))<1&&(u--,f*=2),t+=u+l>=1?d/f:d*Math.pow(2,1-l),t*f>=2&&(u++,f/=2),u+l>=c?(a=0,u=c):u+l>=1?(a=(t*f-1)*Math.pow(2,o),u+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,o),u=0));o>=8;e[n+h]=255&a,h+=p,a/=256,o-=8);for(u=u<0;e[n+h]=255&u,h+=p,u/=256,s-=8);e[n+h-p]|=128*y}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/ieee754/index.js","/node_modules/ieee754")},{buffer:3,lYpoI2:10}]},{},[1])(1)});
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{}],525:[function(require,module,exports){
+},{}],521:[function(require,module,exports){
'use strict';
/* !
@@ -34119,7 +33614,7 @@ module.exports = {
setPathValue: setPathValue,
};
-},{}],526:[function(require,module,exports){
+},{}],522:[function(require,module,exports){
// shim for using process in browser
var process = module.exports = {};
@@ -34305,8 +33800,8 @@ process.chdir = function (dir) {
};
process.umask = function() { return 0; };
-},{}],527:[function(require,module,exports){
-(function (process){
+},{}],523:[function(require,module,exports){
+(function (process,setImmediate){
// vim:ts=4:sts=4:sw=4:
/*!
*
@@ -35954,9 +35449,12 @@ function any(promises) {
function onRejected(err) {
pendingCount--;
if (pendingCount === 0) {
- err.message = ("Q can't get fulfillment value from any promise, all " +
- "promises were rejected. Last error message: " + err.message);
- deferred.reject(err);
+ var rejection = err || new Error("" + err);
+
+ rejection.message = ("Q can't get fulfillment value from any promise, all " +
+ "promises were rejected. Last error message: " + rejection.message);
+
+ deferred.reject(rejection);
}
}
function onProgress(progress) {
@@ -36381,518 +35879,2710 @@ return Q;
});
-}).call(this,require('_process'))
-},{"_process":526}],528:[function(require,module,exports){
+}).call(this,require('_process'),require("timers").setImmediate)
+},{"_process":522,"timers":526}],524:[function(require,module,exports){
+(function (global,Buffer){
+(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.realisticStructuredClone = f()}})(function(){var define,module,exports;return (function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o Array#indexOf
+// true -> Array#includes
+var toIObject = _dereq_('./_to-iobject');
+var toLength = _dereq_('./_to-length');
+var toAbsoluteIndex = _dereq_('./_to-absolute-index');
+module.exports = function (IS_INCLUDES) {
+ return function ($this, el, fromIndex) {
+ var O = toIObject($this);
+ var length = toLength(O.length);
+ var index = toAbsoluteIndex(fromIndex, length);
+ var value;
+ // Array#includes uses SameValueZero equality algorithm
+ // eslint-disable-next-line no-self-compare
+ if (IS_INCLUDES && el != el) while (length > index) {
+ value = O[index++];
+ // eslint-disable-next-line no-self-compare
+ if (value != value) return true;
+ // Array#indexOf ignores holes, Array#includes - not
+ } else for (; length > index; index++) {
+ if (IS_INCLUDES || index in O) {
+ if (O[index] === el) return IS_INCLUDES || index || 0;
}
- // Store and register the task
- var task = { callback: callback, args: args };
- tasksByHandle[nextHandle] = task;
- registerImmediate(nextHandle);
- return nextHandle++;
- }
+ }return !IS_INCLUDES && -1;
+ };
+};
- function clearImmediate(handle) {
- delete tasksByHandle[handle];
- }
+},{"./_to-absolute-index":32,"./_to-iobject":34,"./_to-length":35}],8:[function(_dereq_,module,exports){
+"use strict";
- function run(task) {
- var callback = task.callback;
- var args = task.args;
- switch (args.length) {
- case 0:
- callback();
- break;
- case 1:
- callback(args[0]);
- break;
- case 2:
- callback(args[0], args[1]);
- break;
- case 3:
- callback(args[0], args[1], args[2]);
- break;
- default:
- callback.apply(undefined, args);
- break;
- }
- }
+var toString = {}.toString;
- function runIfPresent(handle) {
- // From the spec: "Wait until any invocations of this algorithm started before this one have completed."
- // So if we're currently running a task, we'll need to delay this invocation.
- if (currentlyRunningATask) {
- // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a
- // "too much recursion" error.
- setTimeout(runIfPresent, 0, handle);
- } else {
- var task = tasksByHandle[handle];
- if (task) {
- currentlyRunningATask = true;
- try {
- run(task);
- } finally {
- clearImmediate(handle);
- currentlyRunningATask = false;
- }
- }
- }
- }
+module.exports = function (it) {
+ return toString.call(it).slice(8, -1);
+};
- function installNextTickImplementation() {
- registerImmediate = function(handle) {
- process.nextTick(function () { runIfPresent(handle); });
- };
- }
+},{}],9:[function(_dereq_,module,exports){
+'use strict';
- function canUsePostMessage() {
- // The test against `importScripts` prevents this implementation from being installed inside a web worker,
- // where `global.postMessage` means something completely different and can't be used for this purpose.
- if (global.postMessage && !global.importScripts) {
- var postMessageIsAsynchronous = true;
- var oldOnMessage = global.onmessage;
- global.onmessage = function() {
- postMessageIsAsynchronous = false;
- };
- global.postMessage("", "*");
- global.onmessage = oldOnMessage;
- return postMessageIsAsynchronous;
- }
- }
+var core = module.exports = { version: '2.5.3' };
+if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
- function installPostMessageImplementation() {
- // Installs an event handler on `global` for the `message` event: see
- // * https://developer.mozilla.org/en/DOM/window.postMessage
- // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages
+},{}],10:[function(_dereq_,module,exports){
+'use strict';
- var messagePrefix = "setImmediate$" + Math.random() + "$";
- var onGlobalMessage = function(event) {
- if (event.source === global &&
- typeof event.data === "string" &&
- event.data.indexOf(messagePrefix) === 0) {
- runIfPresent(+event.data.slice(messagePrefix.length));
- }
- };
+// optional / simple context binding
+var aFunction = _dereq_('./_a-function');
+module.exports = function (fn, that, length) {
+ aFunction(fn);
+ if (that === undefined) return fn;
+ switch (length) {
+ case 1:
+ return function (a) {
+ return fn.call(that, a);
+ };
+ case 2:
+ return function (a, b) {
+ return fn.call(that, a, b);
+ };
+ case 3:
+ return function (a, b, c) {
+ return fn.call(that, a, b, c);
+ };
+ }
+ return function () /* ...args */{
+ return fn.apply(that, arguments);
+ };
+};
- if (global.addEventListener) {
- global.addEventListener("message", onGlobalMessage, false);
- } else {
- global.attachEvent("onmessage", onGlobalMessage);
- }
+},{"./_a-function":4}],11:[function(_dereq_,module,exports){
+"use strict";
- registerImmediate = function(handle) {
- global.postMessage(messagePrefix + handle, "*");
- };
- }
+// 7.2.1 RequireObjectCoercible(argument)
+module.exports = function (it) {
+ if (it == undefined) throw TypeError("Can't call method on " + it);
+ return it;
+};
- function installMessageChannelImplementation() {
- var channel = new MessageChannel();
- channel.port1.onmessage = function(event) {
- var handle = event.data;
- runIfPresent(handle);
- };
+},{}],12:[function(_dereq_,module,exports){
+'use strict';
- registerImmediate = function(handle) {
- channel.port2.postMessage(handle);
- };
- }
+// Thank's IE8 for his funny defineProperty
+module.exports = !_dereq_('./_fails')(function () {
+ return Object.defineProperty({}, 'a', { get: function get() {
+ return 7;
+ } }).a != 7;
+});
- function installReadyStateChangeImplementation() {
- var html = doc.documentElement;
- registerImmediate = function(handle) {
- // Create a