diff --git a/dist/lodash.compat.js b/dist/lodash.compat.js
index c3ab571df..4b5989e39 100644
--- a/dist/lodash.compat.js
+++ b/dist/lodash.compat.js
@@ -1,11 +1,11 @@
/**
* @license
- * Lo-Dash 3.0.0-pre (Custom Build)
+ * Lo-Dash 3.0.0-pre (Custom Build)
* Build: `lodash -o ./dist/lodash.compat.js`
* Copyright 2012-2014 The Dojo Foundation
* Based on Underscore.js 1.7.0
* Copyright 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license
+ * Available under MIT license
*/
;(function() {
@@ -18,12 +18,13 @@
/** Used to compose bitmasks for wrapper metadata. */
var BIND_FLAG = 1,
BIND_KEY_FLAG = 2,
- CURRY_FLAG = 4,
- CURRY_RIGHT_FLAG = 8,
- CURRY_BOUND_FLAG = 16,
+ CURRY_BOUND_FLAG = 4,
+ CURRY_FLAG = 8,
+ CURRY_RIGHT_FLAG = 16,
PARTIAL_FLAG = 32,
PARTIAL_RIGHT_FLAG = 64,
- REARG_FLAG = 128;
+ ARY_FLAG = 128,
+ REARG_FLAG = 256;
/** Used as default options for `_.trunc`. */
var DEFAULT_TRUNC_LENGTH = 30,
@@ -726,6 +727,17 @@
return value > -1 && value % 1 == 0 && (length == null || value < length);
}
+ /**
+ * 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') || false;
+ }
+
/**
* Used by `trimmedLeftIndex` and `trimmedRightIndex` to determine if a
* character code is whitespace.
@@ -1001,19 +1013,21 @@
/**
* Creates a `lodash` object which wraps `value` to enable intuitive chaining.
- * Explicit chaining may be enabled by using `_.chain`. Chaining is supported
- * in custom builds as long as the `_#value` method is implicitly or explicitly
- * included in the build.
+ * The execution of chained methods is deferred until `_#value` is implicitly
+ * or explicitly called. Explicit chaining may be enabled by using `_.chain`.
+ *
+ * Chaining is supported in custom builds as long as the `_#value` method is
+ * directly or indirectly included in the build.
*
* In addition to Lo-Dash methods, wrappers also have the following `Array` methods:
* `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, `splice`,
* and `unshift`
*
- * The chainable wrapper functions are:
- * `after`, `assign`, `at`, `before`, `bind`, `bindAll`, `bindKey`, `callback`,
- * `chain`, `chunk`, `compact`, `concat`, `constant`, `countBy`, `create`,
- * `curry`, `debounce`, `defaults`, `defer`, `delay`, `difference`, `drop`,
- * `dropRight`, `dropRightWhile`, `dropWhile`, `filter`, `flatten`,
+ * The wrapper functions that are chainable by default are:
+ * `after`, `ary`, `assign`, `at`, `before`, `bind`, `bindAll`, `bindKey`,
+ * `callback`, `chain`, `chunk`, `compact`, `concat`, `constant`, `countBy`,
+ * `create`, `curry`, `debounce`, `defaults`, `defer`, `delay`, `difference`,
+ * `drop`, `dropRight`, `dropRightWhile`, `dropWhile`, `filter`, `flatten`,
* `flattenDeep`, `flow`, `flowRight`, `forEach`, `forEachRight`, `forIn`,
* `forInRight`, `forOwn`, `forOwnRight`, `functions`, `groupBy`, `indexBy`,
* `initial`, `intersection`, `invert`, `invoke`, `keys`, `keysIn`, `map`,
@@ -1026,7 +1040,7 @@
* `union`, `uniq`, `unshift`, `unzip`, `values`, `valuesIn`, `where`,
* `without`, `wrap`, `xor`, `zip`, and `zipObject`
*
- * The non-chainable wrapper functions are:
+ * The wrapper functions that are non-chainable by default are:
* `attempt`, `camelCase`, `capitalize`, `clone`, `cloneDeep`, `deburr`,
* `endsWith`, `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`,
* `findLast`, `findLastIndex`, `findLastKey`, `findWhere`, `first`, `has`,
@@ -1041,7 +1055,7 @@
* `trunc`, `unescape`, `uniqueId`, `value`, and `words`
*
* The wrapper function `sample` will return a wrapped value when `n` is provided,
- * otherwise it will return an unwrapped value.
+ * otherwise an unwrapped value is returned.
*
* @name _
* @constructor
@@ -1066,7 +1080,7 @@
* // => true
*/
function lodash(value) {
- if (value && typeof value == 'object' && !isArray(value)) {
+ if (isObjectLike(value) && !isArray(value)) {
if (value instanceof LodashWrapper) {
return value;
}
@@ -2032,8 +2046,7 @@
while (++index < length) {
var value = array[index];
- if (value && typeof value == 'object' && typeof value.length == 'number'
- && (isArray(value) || isArguments(value))) {
+ if (isObjectLike(value) && isLength(value.length) && (isArray(value) || isArguments(value))) {
// Recursively flatten arrays (susceptible to call stack limits).
if (isDeep) {
value = baseFlatten(value, isDeep, isStrict);
@@ -2961,15 +2974,17 @@
* @param {Array} [partialsRight] The arguments to append to those provided to the new function.
* @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
* @param {Array} [argPos] The argument positions of the new function.
- * @param {number} arity The arity of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @param {number} [ary] The arity cap of `func`.
* @returns {Function} Returns the new wrapped function.
*/
- function createHybridWrapper(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, arity) {
- var isBind = bitmask & BIND_FLAG,
+ function createHybridWrapper(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, arity, ary) {
+ var isAry = bitmask & ARY_FLAG,
+ isBind = bitmask & BIND_FLAG,
isBindKey = bitmask & BIND_KEY_FLAG,
isCurry = bitmask & CURRY_FLAG,
- isCurryRight = bitmask & CURRY_RIGHT_FLAG,
- isCurryBound = bitmask & CURRY_BOUND_FLAG;
+ isCurryBound = bitmask & CURRY_BOUND_FLAG,
+ isCurryRight = bitmask & CURRY_RIGHT_FLAG;
var Ctor = !isBindKey && createCtorWrapper(func),
key = func;
@@ -2984,9 +2999,6 @@
while (index--) {
args[index] = arguments[index];
}
- if (argPos) {
- args = arrayReduceRight(argPos, reorder, args);
- }
if (partials) {
args = composeArgs(args, partials, holders);
}
@@ -3012,7 +3024,7 @@
if (!isCurryBound) {
bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG);
}
- var result = createHybridWrapper(func, bitmask, thisArg, newPartials, newsHolders, newPartialsRight, newHoldersRight, newArgPos, newArity);
+ var result = createHybridWrapper(func, bitmask, thisArg, newPartials, newsHolders, newPartialsRight, newHoldersRight, newArgPos, newArity, ary);
result.placeholder = placeholder;
return result;
}
@@ -3021,6 +3033,12 @@
if (isBindKey) {
func = thisBinding[key];
}
+ if (argPos) {
+ args = arrayReduceRight(argPos, reorder, args);
+ }
+ if (isAry && ary < args.length) {
+ args.length = ary;
+ }
return (this instanceof wrapper ? (Ctor || createCtorWrapper(func)) : func).apply(thisBinding, args);
}
return wrapper;
@@ -3095,20 +3113,22 @@
* The bitmask may be composed of the following flags:
* 1 - `_.bind`
* 2 - `_.bindKey`
- * 4 - `_.curry`
- * 8 - `_.curryRight`
- * 16 - `_.curry` or `_.curryRight` of a bound function
+ * 4 - `_.curry` or `_.curryRight` of a bound function
+ * 8 - `_.curry`
+ * 16 - `_.curryRight`
* 32 - `_.partial`
* 64 - `_.partialRight`
- * 128 - `_.rearg`
+ * 128 - `_.ary`
+ * 256 - `_.rearg`
* @param {*} [thisArg] The `this` binding of `func`.
* @param {Array} [partials] The arguments to be partially applied.
* @param {Array} [holders] The `partials` placeholder indexes.
* @param {Array} [argPos] The argument positions of the new function.
* @param {number} [arity] The arity of `func`.
+ * @param {number} [ary] The arity cap of `func`.
* @returns {Function} Returns the new wrapped function.
*/
- function createWrapper(func, bitmask, thisArg, partials, holders, argPos, arity) {
+ function createWrapper(func, bitmask, thisArg, partials, holders, argPos, arity, ary) {
var isBindKey = bitmask & BIND_KEY_FLAG;
if (!isBindKey && !isFunction(func)) {
throw new TypeError(FUNC_ERROR_TEXT);
@@ -3128,14 +3148,14 @@
partials = holders = null;
}
var data = !isBindKey && getData(func),
- newData = [func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, arity];
+ newData = [func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, arity, ary];
- if (data && data !== true && !(argPos && (data[3] || data[5]))) {
- newData = mergeData(newData, data);
+ if (data && data !== true) {
+ mergeData(newData, data);
}
newData[8] = newData[8] == null
? (isBindKey ? 0 : newData[0].length)
- : nativeMax(newData[8] - length, 0) || 0;
+ : (nativeMax(newData[8] - length, 0) || 0);
bitmask = newData[1];
if (bitmask == BIND_FLAG) {
@@ -3309,7 +3329,7 @@
* @returns {boolean} Returns `true` if `value` is an array-like object, else `false`.
*/
function isArrayLike(value) {
- return (value && typeof value == 'object' && isLength(value.length) &&
+ return (isObjectLike(value) && isLength(value.length) &&
(arrayLikeClasses[toString.call(value)] || (!lodash.support.argsClass && isArguments(value)))) || false;
}
@@ -3373,6 +3393,13 @@
/**
* Merges the function metadata of `source` into `data`.
*
+ * Merging metadata reduces the number of wrappers required to invoke a function.
+ * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
+ * may be applied regardless of execution order. Methods like `_.ary` and `_.rearg`
+ * augment function arguments, making the order in which they are executed important,
+ * preventing the merging of metadata. However, we make an exception for a safe
+ * common case where curried functions have `_.ary` and or `_.rearg` applied.
+ *
* @private
* @param {Array} data The destination metadata.
* @param {Array} source The source metadata.
@@ -3380,13 +3407,33 @@
*/
function mergeData(data, source) {
var bitmask = data[1],
- funcBitmask = source[1];
+ srcBitmask = source[1],
+ newBitmask = bitmask | srcBitmask;
- // Use metadata `thisArg` if available.
- if (funcBitmask & BIND_FLAG) {
+ var arityFlags = ARY_FLAG | REARG_FLAG,
+ bindFlags = BIND_FLAG | BIND_KEY_FLAG,
+ comboFlags = arityFlags | bindFlags | CURRY_BOUND_FLAG | CURRY_RIGHT_FLAG;
+
+ var isAry = bitmask & ARY_FLAG && !(srcBitmask & ARY_FLAG),
+ isRearg = bitmask & REARG_FLAG && !(srcBitmask & REARG_FLAG),
+ argPos = (isRearg ? data : source)[7],
+ ary = (isAry ? data : source)[9];
+
+ var isCommon = !(bitmask >= ARY_FLAG && srcBitmask > bindFlags) &&
+ !(bitmask > bindFlags && srcBitmask >= ARY_FLAG);
+
+ var isCombo = (newBitmask >= arityFlags && newBitmask <= comboFlags) &&
+ (bitmask < ARY_FLAG || ((isRearg || isAry) && argPos[0].length <= ary));
+
+ // Exit early if metadata can't be merged.
+ if (!(isCommon || isCombo)) {
+ return data;
+ }
+ // Use source `thisArg` if available.
+ if (srcBitmask & BIND_FLAG) {
data[2] = source[2];
// Set when currying a bound function.
- bitmask |= (bitmask & BIND_FLAG) ? 0 : CURRY_BOUND_FLAG;
+ newBitmask |= (bitmask & BIND_FLAG) ? 0 : CURRY_BOUND_FLAG;
}
// Compose partial arguments.
var value = source[3];
@@ -3405,17 +3452,23 @@
// Append argument positions.
value = source[7];
if (value) {
- value = baseSlice(value);
- push.apply(value, data[7]);
- data[7] = value;
+ argPos = data[7];
+ value = data[7] = baseSlice(value);
+ if (argPos) {
+ push.apply(value, argPos);
+ }
}
- // Use metadata `arity` if one is not provided.
+ // Use source `arity` if one is not provided.
if (data[8] == null) {
data[8] = source[8];
}
- // Use metadata `func` and merge bitmasks.
+ // Use source `ary` if it's smaller.
+ if (srcBitmask & ARY_FLAG) {
+ data[9] = data[9] == null ? source[9] : nativeMin(data[9], source[9]);
+ }
+ // Use source `func` and merge bitmasks.
data[0] = source[0];
- data[1] = bitmask | funcBitmask;
+ data[1] = newBitmask;
return data;
}
@@ -3533,8 +3586,7 @@
support = lodash.support;
// Exit early for non `Object` objects.
- if (!(value && typeof value == 'object' &&
- toString.call(value) == objectClass && !isHostObject(value)) ||
+ if (!(isObjectLike(value) && toString.call(value) == objectClass && !isHostObject(value)) ||
(!hasOwnProperty.call(value, 'constructor') &&
(Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor))) ||
(!support.argsClass && isArguments(value))) {
@@ -5073,7 +5125,7 @@
}
/**
- * Extracts the unwrapped value from its wrapper.
+ * Executes the chained sequence to extract the unwrapped value.
*
* @name value
* @memberOf _
@@ -6274,6 +6326,30 @@
};
}
+ /**
+ * Creates a function that accepts up to `n` arguments ignoring any
+ * additional arguments.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to cap arguments for.
+ * @param {number} [n=func.length] The arity cap.
+ * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * _.map(['6', '8', '10'], _.ary(parseInt, 1));
+ * // => [6, 8, 10]
+ */
+ function ary(func, n, guard) {
+ if (guard && isIterateeCall(func, n, guard)) {
+ n = null;
+ }
+ n = n == null ? func.length : (+n || 0);
+ return createWrapper(func, ARY_FLAG, null, null, null, null, null, n);
+ }
+
/**
* Creates a function that invokes `func`, with the `this` binding and arguments
* of the created function, while it is called less than `n` times. Subsequent
@@ -6313,8 +6389,11 @@
/**
* Creates a function that invokes `func` with the `this` binding of `thisArg`
- * and prepends any additional `bind` arguments to those provided to the bound
- * function.
+ * and prepends any additional `_.bind` arguments to those provided to the
+ * bound function.
+ *
+ * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
+ * may be used as a placeholder for partially applied arguments.
*
* **Note:** Unlike native `Function#bind` this method does not set the `length`
* property of bound functions.
@@ -6328,13 +6407,20 @@
* @returns {Function} Returns the new bound function.
* @example
*
- * var func = function(greeting) {
- * return greeting + ' ' + this.user;
+ * var greet = function(greeting, punctuation) {
+ * return greeting + ' ' + this.user + punctuation;
* };
*
- * func = _.bind(func, { 'user': 'fred' }, 'hi');
- * func();
- * // => 'hi fred'
+ * var object = { 'user': 'fred' };
+ *
+ * var bound = _.bind(greet, object, 'hi');
+ * bound('!');
+ * // => 'hi fred!'
+ *
+ * // using placeholders
+ * var bound = _.bind(greet, object, _, '!');
+ * bound('hi');
+ * // => 'hi fred!'
*/
function bind(func, thisArg) {
var bitmask = BIND_FLAG;
@@ -6383,12 +6469,16 @@
/**
* Creates a function that invokes the method at `object[key]` and prepends
- * any additional `bindKey` arguments to those provided to the bound function.
+ * any additional `_.bindKey` arguments to those provided to the bound function.
+ *
* This method differs from `_.bind` by allowing bound functions to reference
* methods that may be redefined or don't yet exist.
* See [Peter Michaux's article](http://michaux.ca/articles/lazy-function-definition-pattern)
* for more details.
*
+ * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
* @static
* @memberOf _
* @category Function
@@ -6400,20 +6490,25 @@
*
* var object = {
* 'user': 'fred',
- * 'greet': function(greeting) {
- * return greeting + ' ' + this.user;
+ * 'greet': function(greeting, punctuation) {
+ * return greeting + ' ' + this.user + punctuation;
* }
* };
*
- * var func = _.bindKey(object, 'greet', 'hi');
- * func();
- * // => 'hi fred'
+ * var bound = _.bindKey(object, 'greet', 'hi');
+ * bound('!');
+ * // => 'hi fred!'
*
- * object.greet = function(greeting) {
- * return greeting + 'ya ' + this.user + '!';
+ * object.greet = function(greeting, punctuation) {
+ * return greeting + 'ya ' + this.user + punctuation;
* };
*
- * func();
+ * bound('!');
+ * // => 'hiya fred!'
+ *
+ * // using placeholders
+ * var bound = _.bindKey(object, 'greet', _, '!');
+ * bound('hi');
* // => 'hiya fred!'
*/
function bindKey(object, key) {
@@ -6434,6 +6529,9 @@
* remaining `func` arguments, and so on. The arity of `func` can be specified
* if `func.length` is not sufficient.
*
+ * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
+ * may be used as a placeholder for provided arguments.
+ *
* **Note:** This method does not set the `length` property of curried functions.
*
* @static
@@ -6445,9 +6543,11 @@
* @returns {Function} Returns the new curried function.
* @example
*
- * var curried = _.curry(function(a, b, c) {
+ * var abc = function(a, b, c) {
* return [a, b, c];
- * });
+ * };
+ *
+ * var curried = _.curry(abc);
*
* curried(1)(2)(3);
* // => [1, 2, 3]
@@ -6457,6 +6557,10 @@
*
* curried(1, 2, 3);
* // => [1, 2, 3]
+ *
+ * // using placeholders
+ * curried(1)(_, 3)(2);
+ * // => [1, 2, 3]
*/
function curry(func, arity, guard) {
if (guard && isIterateeCall(func, arity, guard)) {
@@ -6471,6 +6575,9 @@
* This method is like `_.curry` except that arguments are applied to `func`
* in the manner of `_.partialRight` instead of `_.partial`.
*
+ * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for provided arguments.
+ *
* **Note:** This method does not set the `length` property of curried functions.
*
* @static
@@ -6482,9 +6589,11 @@
* @returns {Function} Returns the new curried function.
* @example
*
- * var curried = _.curryRight(function(a, b, c) {
+ * var abc = function(a, b, c) {
* return [a, b, c];
- * });
+ * };
+ *
+ * var curried = _.curryRight(abc);
*
* curried(3)(2)(1);
* // => [1, 2, 3]
@@ -6494,6 +6603,10 @@
*
* curried(1, 2, 3);
* // => [1, 2, 3]
+ *
+ * // using placeholders
+ * curried(3)(1, _)(2);
+ * // => [1, 2, 3]
*/
function curryRight(func, arity, guard) {
if (guard && isIterateeCall(func, arity, guard)) {
@@ -6931,6 +7044,9 @@
* to those provided to the new function. This method is like `_.bind` except
* it does **not** alter the `this` binding.
*
+ * The `_.partial.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
* **Note:** This method does not set the `length` property of partially
* applied functions.
*
@@ -6942,10 +7058,18 @@
* @returns {Function} Returns the new partially applied function.
* @example
*
- * var greet = function(greeting, name) { return greeting + ' ' + name; };
+ * var greet = function(greeting, name) {
+ * return greeting + ' ' + name;
+ * };
+ *
* var sayHelloTo = _.partial(greet, 'hello');
* sayHelloTo('fred');
* // => 'hello fred'
+ *
+ * // using placeholders
+ * var greetFred = _.partial(greet, _, 'fred');
+ * greetFred('hi');
+ * // => 'hi fred'
*/
function partial(func) {
var partials = slice(arguments, 1),
@@ -6958,6 +7082,9 @@
* This method is like `_.partial` except that partially applied arguments
* are appended to those provided to the new function.
*
+ * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
* **Note:** This method does not set the `length` property of partially
* applied functions.
*
@@ -6969,21 +7096,18 @@
* @returns {Function} Returns the new partially applied function.
* @example
*
- * var greet = function(greeting, name) { return greeting + ' ' + name; };
+ * var greet = function(greeting, name) {
+ * return greeting + ' ' + name;
+ * };
+ *
* var greetFred = _.partialRight(greet, 'fred');
- * greetFred('hello');
+ * greetFred('hi');
+ * // => 'hi fred'
+ *
+ * // using placeholders
+ * var sayHelloTo = _.partialRight(greet, 'hello', _);
+ * sayHelloTo('fred');
* // => 'hello fred'
- *
- * // create a deep `_.defaults`
- * var defaultsDeep = _.partialRight(_.merge, function deep(value, other) {
- * return _.merge(value, other, deep);
- * });
- *
- * var object = { 'a': { 'b': { 'c': 1 } } },
- * source = { 'a': { 'b': { 'c': 2, 'd': 2 } } };
- *
- * defaultsDeep(object, source);
- * // => { 'a': { 'b': { 'c': 1, 'd': 2 } } }
*/
function partialRight(func) {
var partials = slice(arguments, 1),
@@ -7233,13 +7357,13 @@
* // => false
*/
function isArguments(value) {
- var length = (value && typeof value == 'object') ? value.length : undefined;
+ var length = isObjectLike(value) ? value.length : undefined;
return (isLength(length) && toString.call(value) == argsClass) || false;
}
// Fallback for environments without a `[[Class]]` for `arguments` objects.
if (!support.argsClass) {
isArguments = function(value) {
- var length = (value && typeof value == 'object') ? value.length : undefined;
+ var length = isObjectLike(value) ? value.length : undefined;
return (isLength(length) && hasOwnProperty.call(value, 'callee') &&
!propertyIsEnumerable.call(value, 'callee')) || false;
};
@@ -7262,8 +7386,7 @@
* // => false
*/
var isArray = nativeIsArray || function(value) {
- return (value && typeof value == 'object' && typeof value.length == 'number' &&
- toString.call(value) == arrayClass) || false;
+ return (isObjectLike(value) && isLength(value.length) && toString.call(value) == arrayClass) || false;
};
/**
@@ -7283,8 +7406,7 @@
* // => false
*/
function isBoolean(value) {
- return (value === true || value === false || value && typeof value == 'object' &&
- toString.call(value) == boolClass) || false;
+ return (value === true || value === false || isObjectLike(value) && toString.call(value) == boolClass) || false;
}
/**
@@ -7304,7 +7426,7 @@
* // => false
*/
function isDate(value) {
- return (value && typeof value == 'object' && toString.call(value) == dateClass) || false;
+ return (isObjectLike(value) && toString.call(value) == dateClass) || false;
}
/**
@@ -7324,13 +7446,13 @@
* // => false
*/
function isElement(value) {
- return (value && typeof value == 'object' && value.nodeType === 1 &&
+ return (value && value.nodeType === 1 && isObjectLike(value) &&
(lodash.support.nodeClass ? toString.call(value).indexOf('Element') > -1 : isHostObject(value))) || false;
}
// Fallback for environments without DOM support.
if (!support.dom) {
isElement = function(value) {
- return (value && typeof value == 'object' && value.nodeType === 1 && !isPlainObject(value)) || false;
+ return (value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value)) || false;
};
}
@@ -7367,7 +7489,7 @@
}
var length = value.length;
if (isLength(length) && (isArray(value) || isString(value) || isArguments(value) ||
- (typeof value == 'object' && isFunction(value.splice)))) {
+ (isObjectLike(value) && isFunction(value.splice)))) {
return !length;
}
return !keys(value).length;
@@ -7437,7 +7559,7 @@
* // => false
*/
function isError(value) {
- return (value && typeof value == 'object' && toString.call(value) == errorClass) || false;
+ return (isObjectLike(value) && toString.call(value) == errorClass) || false;
}
/**
@@ -7589,7 +7711,7 @@
if (toString.call(value) == funcClass) {
return reNative.test(fnToString.call(value));
}
- return (typeof value == 'object' &&
+ return (isObjectLike(value) &&
(isHostObject(value) ? reNative : reHostCtor).test(value)) || false;
}
@@ -7636,8 +7758,7 @@
* // => false
*/
function isNumber(value) {
- var type = typeof value;
- return type == 'number' || (value && type == 'object' && toString.call(value) == numberClass) || false;
+ return typeof value == 'number' || (isObjectLike(value) && toString.call(value) == numberClass) || false;
}
/**
@@ -7720,8 +7841,7 @@
* // => false
*/
function isString(value) {
- return typeof value == 'string' || (value && typeof value == 'object' &&
- toString.call(value) == stringClass) || false;
+ return typeof value == 'string' || (isObjectLike(value) && toString.call(value) == stringClass) || false;
}
/**
@@ -7821,7 +7941,7 @@
* object for all destination properties that resolve to `undefined`. Once a
* property is set, additional defaults of the same property are ignored.
*
- * **Note:** See the [documentation example of `_.partialRight`](http://lodash.com/docs#partialRight)
+ * **Note:** See the [documentation example of `_.partialRight`](https://lodash.com/docs#partialRight)
* for a deep version of this method.
*
* @static
@@ -8692,8 +8812,8 @@
* @returns {string} Returns the escaped string.
* @example
*
- * _.escapeRegExp('[lodash](http://lodash.com/)');
- * // => '\[lodash\]\(http://lodash\.com/\)'
+ * _.escapeRegExp('[lodash](https://lodash.com/)');
+ * // => '\[lodash\]\(https://lodash\.com/\)'
*/
function escapeRegExp(string) {
string = string == null ? '' : String(string);
@@ -8920,14 +9040,14 @@
* in "interpolate" delimiters, HTML-escape interpolated data properties in
* "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
* properties may be accessed as free variables in the template. If a setting
- * object is provided it overrides `_.templateSettings` for the template.
+ * object is provided it takes precedence over `_.templateSettings` values.
*
* **Note:** In the development build `_.template` utilizes sourceURLs for easier debugging.
* See the [HTML5 Rocks article on sourcemaps](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
* for more details.
*
* For more information on precompiling templates see
- * [Lo-Dash's custom builds documentation](http://lodash.com/custom-builds).
+ * [Lo-Dash's custom builds documentation](https://lodash.com/custom-builds).
*
* For more information on Chrome extension sandboxes see
* [Chrome's extensions documentation](http://developer.chrome.com/stable/extensions/sandboxingEval.html).
@@ -9736,9 +9856,9 @@
* @returns {Function} Returns the new function.
* @example
*
- * var fred = { 'user': 'fred', 'age': 40, 'active': true };
- * _.map(['age', 'active'], _.propertyOf(fred));
- * // => [40, true]
+ * var object = { 'user': 'fred', 'age': 40, 'active': true };
+ * _.map(['active', 'user'], _.propertyOf(object));
+ * // => [true, 'fred']
*
* var object = { 'a': 3, 'b': 1, 'c': 2 };
* _.sortBy(['a', 'b', 'c'], _.propertyOf(object));
@@ -9997,6 +10117,7 @@
// Add functions that return wrapped values when chaining.
lodash.after = after;
+ lodash.ary = ary;
lodash.assign = assign;
lodash.at = at;
lodash.before = before;
diff --git a/dist/lodash.compat.min.js b/dist/lodash.compat.min.js
index ee0b1d24c..4dd76ff1c 100644
--- a/dist/lodash.compat.min.js
+++ b/dist/lodash.compat.min.js
@@ -4,83 +4,83 @@
* Build: `lodash -o ./dist/lodash.compat.js`
*/
;(function(){function n(n,t){for(var r=-1,e=n.length;++rt||!r||typeof n=="undefined"&&e)return 1;if(n=n&&9<=n&&13>=n||32==n||160==n||5760==n||6158==n||8192<=n&&(8202>=n||8232==n||8233==n||8239==n||8287==n||12288==n||65279==n)}function x(n,t){for(var r=-1,e=n.length,u=-1,o=[];++re&&(e=u)}return e}function Vt(n){for(var t=-1,r=n.length,e=no;++to(t,a)&&e.push(a);return e}function er(n,t){var r=n?n.length:0;if(!Vr(r))return pr(n,t);for(var e=-1,u=ne(n);++ec))return false}else{var g=p&&Eu.call(n,"__wrapped__"),h=h&&Eu.call(t,"__wrapped__");if(g||h)return vr(g?n.value():n,h?t.value():t,r,e,u,o);if(!s)return false;if(!a&&!p){switch(l){case dt:case mt:return+n==+t;case wt:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case jt:case At:return n==du(t)}return false}if($t.support.argsClass||(c=Le(n),i=Le(t)),g=c?vu:n.constructor,l=i?vu:t.constructor,a){if(g.prototype.name!=l.prototype.name)return false
-}else if(p=!c&&Eu.call(n,"constructor"),h=!i&&Eu.call(t,"constructor"),p!=h||!p&&g!=l&&"constructor"in n&&"constructor"in t&&!(typeof g=="function"&&g instanceof g&&typeof l=="function"&&l instanceof l))return false;if(g=a?["message","name"]:jo(n),l=a?g:jo(t),c&&g.push("length"),i&&l.push("length"),c=g.length,p=l.length,c!=p&&!e)return false}for(u||(u=[]),o||(o=[]),l=u.length;l--;)if(u[l]==n)return o[l]==t;if(u.push(n),o.push(t),i=true,f)for(;i&&++le(a,s)&&((t||i)&&a.push(s),l.push(c))}return l}function Ar(n,t){for(var r=-1,e=t(n),u=e.length,o=lu(u);++rt||null==r)return r;if(3t?0:t)}function re(n,t,r){return(r?Kr(n,t,r):null==t)&&(t=1),t=n?n.length-(+t||0):0,ae(n,0,0>t?0:t)}function ee(n,t,r){var e=-1,u=n?n.length:0;for(t=Pr(t,r,3);++er?Yu(e+r,0):r||0;else if(r)return r=fe(n,t),n=n[r],(t===t?t===n:n!==n)?r:-1;return f(n,t,r)}function ie(n){return te(n,1)}function ae(n,t,r){var e=-1,u=n?n.length:0,o=typeof r;if(r&&"number"!=o&&Kr(n,t,r)&&(t=0,r=u),t=null==t?0:+t||0,0>t&&(t=-t>u?0:u+t),r="undefined"==o||r>u?u:+r||0,0>r&&(r+=u),r&&r==u&&!t)return l(n);for(u=t>r?0:r-t,r=lu(u);++er?Yu(e+r,0):r||0:0,typeof n=="string"||!_o(n)&&Ke(n)?ri||r===Qu&&r===a)&&(i=r,a=n)
-}),a}function xe(n,t){return be(n,fu(t))}function je(n,t,r,e){return(_o(n)?u:br)(n,Pr(t,e,4),r,3>arguments.length,er)}function Ae(n,t,r,e){return(_o(n)?o:br)(n,Pr(t,e,4),r,3>arguments.length,ur)}function Ee(n){n=Qr(n);for(var t=-1,r=n.length,e=lu(r);++t=r||r>t?(a&&Fu(a),r=p,a=s=p=O,r&&(h=Co(),f=n.apply(c,i),s||a||(i=c=null))):s=$u(e,r)}function u(){s&&Fu(s),a=s=p=O,(v||g!==t)&&(h=Co(),f=n.apply(c,i),s||a||(i=c=null))}function o(){if(i=arguments,l=Co(),c=this,p=v&&(s||!y),false===g)var r=y&&!s;else{a||y||(h=l);var o=g-(l-h),d=0>=o||o>g;d?(a&&(a=Fu(a)),h=l,f=n.apply(c,i)):a||(a=$u(u,o))}return d&&s?s=Fu(s):s||t===g||(s=$u(e,t)),r&&(d=true,f=n.apply(c,i)),!d||s||a||(i=c=null),f}var i,a,f,l,c,s,p,h=0,g=false,v=true;if(!Be(n))throw new mu(q);if(t=0>t?0:t,true===r)var y=true,v=false;
-else ze(r)&&(y=r.leading,g="maxWait"in r&&Yu(+r.maxWait||0,t),v="trailing"in r?r.trailing:v);return o.cancel=function(){s&&Fu(s),a&&Fu(a),a=s=p=O},o}function Te(){var n=arguments,r=n.length-1;if(0>r)return function(){};if(!t(n,Be))throw new mu(q);return function(){for(var t=r,e=n[t].apply(this,arguments);t--;)e=n[t].call(this,e);return e}}function Ne(n,t){function r(){var e=r.cache,u=t?t.apply(this,arguments):arguments[0];if(e.has(u))return e.get(u);var o=n.apply(this,arguments);return e.set(u,o),o
-}if(!Be(n)||t&&!Be(t))throw new mu(q);return r.cache=new Ne.Cache,r}function Ue(n){var t=ae(arguments,1),r=x(t,Ue.placeholder);return $r(n,N,null,t,r)}function We(n){var t=ae(arguments,1),r=x(t,We.placeholder);return $r(n,U,null,t,r)}function Le(n){return Vr(n&&typeof n=="object"?n.length:O)&&Ou.call(n)==vt||false}function $e(n){return n&&typeof n=="object"&&1===n.nodeType&&($t.support.nodeClass?-1t||null==n||!Ku(t))return r;n=du(n);do t%2&&(r+=n),t=Tu(t/2),n+=n;while(t);return r}function He(n,t,r){return(n=null==n?"":du(n))?(r?Kr(n,t,r):null==t)?n.slice(j(n),A(n)+1):(t=du(t),n.slice(p(n,t),h(n,t)+1)):n}function Qe(n,t,r){return n=null!=n&&du(n),r&&Kr(n,t,r)&&(t=null),n&&n.match(t||st)||[]
-}function nu(n){try{return n()}catch(t){return Pe(t)?t:su(t)}}function tu(n,t,r){return r&&Kr(n,t,r)&&(t=null),Qt(n,t)}function ru(n){return function(){return n}}function eu(n){return n}function uu(n){var t=jo(n),r=t.length;if(1==r){var e=t[0],u=n[e];if(Yr(u))return function(n){return null!=n&&u===n[e]&&Eu.call(n,e)}}for(var o=r,i=lu(r),a=lu(r);o--;){var u=n[t[o]],f=Yr(u);i[o]=f?u:nr(u,true,Or),a[o]=f}return function(n){if(o=r,null==n)return!o;for(;o--;)if(a[o]?i[o]!==n[t[o]]:!Eu.call(n,t[o]))return false;
-for(o=r;o--;)if(a[o]?!Eu.call(n,t[o]):!vr(i[o],n[t[o]],null,true))return false;return true}}function ou(n,t,r){var e=true,u=ze(t),o=null==r,i=o&&u&&jo(t),a=i&&gr(t,i);(i&&i.length&&!a.length||o&&!u)&&(o&&(r=t),a=false,t=n,n=this),a||(a=gr(t,jo(t))),false===r?e=false:ze(r)&&"chain"in r&&(e=r.chain),r=-1,u=Be(n);for(o=a.length;++r=P)return r}else n=0;return lo(r,e)}}(),ho=Rr(function(n,t,r){Eu.call(n,r)?++n[r]:n[r]=1}),go=Rr(function(n,t,r){Eu.call(n,r)?n[r].push(t):n[r]=[t]}),vo=Rr(function(n,t,r){n[r]=t}),yo=Rr(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]
-}),mo=$r(Oe,N,null,[2]);fo.argsClass||(Le=function(n){return Vr(n&&typeof n=="object"?n.length:O)&&Eu.call(n,"callee")&&!Wu.call(n,"callee")||false});var _o=qu||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Ou.call(n)==yt||false};fo.dom||($e=function(n){return n&&typeof n=="object"&&1===n.nodeType&&!wo(n)||false});var bo=Ju||function(n){return typeof n=="number"&&Ku(n)};(Be(/x/)||Bu&&!Be(Bu))&&(Be=function(n){return Ou.call(n)==bt});var wo=Nu?function(n){if(!n||Ou.call(n)!=xt||!$t.support.argsClass&&Le(n))return false;
-var t=n.valueOf,r=De(t)&&(r=Nu(t))&&Nu(r);return r?n==r||Nu(n)==r:Xr(n)}:Xr,xo=Sr(Xt),jo=Vu?function(n){if(n)var t=n.constructor,r=n.length;return typeof t=="function"&&t.prototype===n||typeof r=="number"&&0--n?t.apply(this,arguments):void 0}},$t.assign=xo,$t.at=function(n){return(!n||Vr(n.length))&&(n=Qr(n)),Ht(n,fr(arguments,false,false,1))},$t.before=Oe,$t.bind=Ce,$t.bindAll=function(n){for(var t=n,r=1(s?qt(s,i):u(c,i))){for(t=r;--t;){var p=e[t];
-if(0>(p?qt(p,i):u(n[t],i)))continue n}s&&s.push(i),c.push(i)}return c},$t.invert=function(n,t,r){r&&Kr(n,t,r)&&(t=null),r=-1;for(var e=jo(n),u=e.length,o={};++rt?0:t)},$t.takeRight=function(n,t,r){return(r?Kr(n,t,r):null==t)&&(t=1),t=n?n.length-(+t||0):0,ae(n,0>t?0:t)
-},$t.takeRightWhile=function(n,t,r){var e=n?n.length:0;for(t=Pr(t,r,3);e--&&t(n[e],e,n););return ae(n,e+1)},$t.takeWhile=function(n,t,r){var e=-1,u=n?n.length:0;for(t=Pr(t,r,3);++en||!Ku(n))return[];t=Qt(t,r,1),r=-1;for(var e=lu(Zu(n,to));++rr?0:+r||0,e))-t.length,0<=r&&n.indexOf(t,r)==r},$t.escape=function(n){return(n=null==n?"":du(n))&&(X.lastIndex=0,X.test(n))?n.replace(X,d):n},$t.escapeRegExp=Je,$t.every=ve,$t.find=de,$t.findIndex=ee,$t.findKey=function(n,t,r){return t=Pr(t,r,3),ar(n,t,pr,true)
-},$t.findLast=function(n,t,r){return t=Pr(t,r,3),ar(n,t,ur)},$t.findLastIndex=function(n,t,r){var e=n?n.length:0;for(t=Pr(t,r,3);e--;)if(t(n[e],e,n))return e;return-1},$t.findLastKey=function(n,t,r){return t=Pr(t,r,3),ar(n,t,hr,true)},$t.findWhere=function(n,t){return de(n,uu(t))},$t.first=ue,$t.has=function(n,t){return n?Eu.call(n,t):false},$t.identity=eu,$t.includes=ge,$t.indexOf=oe,$t.isArguments=Le,$t.isArray=_o,$t.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&Ou.call(n)==dt||false
-},$t.isDate=function(n){return n&&typeof n=="object"&&Ou.call(n)==mt||false},$t.isElement=$e,$t.isEmpty=function(n){if(null==n)return true;var t=n.length;return Vr(t)&&(_o(n)||Ke(n)||Le(n)||typeof n=="object"&&Be(n.splice))?!t:!jo(n).length},$t.isEqual=function(n,t,r,e){return r=typeof r=="function"&&Qt(r,e,3),!r&&Yr(n)&&Yr(t)?n===t:vr(n,t,r)},$t.isError=Pe,$t.isFinite=bo,$t.isFunction=Be,$t.isNaN=function(n){return Me(n)&&n!=+n},$t.isNative=De,$t.isNull=function(n){return null===n},$t.isNumber=Me,$t.isObject=ze,$t.isPlainObject=wo,$t.isRegExp=qe,$t.isString=Ke,$t.isUndefined=function(n){return typeof n=="undefined"
-},$t.kebabCase=Io,$t.last=function(n){var t=n?n.length:0;return t?n[t-1]:O},$t.lastIndexOf=function(n,t,r){var e=n?n.length:0;if(!e)return-1;var u=e;if(typeof r=="number")u=(0>r?Yu(e+r,0):Zu(r||0,e-1))+1;else if(r)return u=le(n,t)-1,n=n[u],(t===t?t===n:n!==n)?u:-1;if(t!==t)return _(n,u,true);for(;u--;)if(n[u]===t)return u;return-1},$t.max=we,$t.min=function(n,t,r){r&&Kr(n,t,r)&&(t=null);var e=null==t,u=e&&_o(n),o=!u&&Ke(n);if(e&&!o)return Vt(u?n:Qr(n));var i=no,a=i;return t=e&&o?s:Pr(t,r,3),er(n,function(n,r,e){r=t(n,r,e),(rr?0:+r||0,n.length),n.lastIndexOf(t,r)==r},$t.template=function(n,t,r){var e=$t.templateSettings;r&&Kr(n,t,r)&&(t=r=null),n=du(null==n?"":n),t=xo({},r||t,e,Jt),r=xo({},t.imports,e.imports,Jt);
-var u,o,i=jo(r),a=Ze(r),f=0;r=t.interpolate||at;var l="__p+='";if(r=yu((t.escape||at).source+"|"+r.source+"|"+(r===nt?tt:at).source+"|"+(t.evaluate||at).source+"|$","g"),n.replace(r,function(t,r,e,i,a,c){return e||(e=i),l+=n.slice(f,c).replace(ct,m),r&&(u=true,l+="'+__e("+r+")+'"),a&&(o=true,l+="';"+a+";\n__p+='"),e&&(l+="'+((__t=("+e+"))==null?'':__t)+'"),f=c+t.length,t}),l+="';",(t=t.variable)||(l="with(obj){"+l+"}"),l=(o?l.replace(Y,""):l).replace(Z,"$1").replace(G,"$1;"),l="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}",t=nu(function(){return pu(i,"return "+l).apply(O,a)
-}),t.source=l,Pe(t))throw t;return t},$t.trim=He,$t.trimLeft=function(n,t,r){return(n=null==n?"":du(n))?(r?Kr(n,t,r):null==t)?n.slice(j(n)):(t=du(t),n.slice(p(n,t))):n},$t.trimRight=function(n,t,r){return(n=null==n?"":du(n))?(r?Kr(n,t,r):null==t)?n.slice(0,A(n)+1):(t=du(t),n.slice(0,h(n,t)+1)):n},$t.trunc=function(n,t,r){r&&Kr(n,t,r)&&(t=null);var e=L;if(r=$,ze(t)){var u="separator"in t?t.separator:u,e="length"in t?+t.length||0:e;r="omission"in t?du(t.omission):r}else null!=t&&(e=+t||0);if(n=null==n?"":du(n),e>=n.length)return n;
-if(e-=r.length,1>e)return r;if(t=n.slice(0,e),null==u)return t+r;if(qe(u)){if(n.slice(e).search(u)){var o,i=n.slice(0,e);for(u.global||(u=yu(u.source,(rt.exec(u)||"")+"g")),u.lastIndex=0;n=u.exec(i);)o=n.index;t=t.slice(0,null==o?e:o)}}else n.indexOf(u,e)!=e&&(u=t.lastIndexOf(u),-1t?0:+t||0,n.length),n)},$t.prototype.sample=function(n){return this.__chain__||null!=n?this.thru(function(t){return $t.sample(t,n)}):$t.sample(this.value())},$t.VERSION=C,n("bind bindKey curry curryRight partial partialRight".split(" "),function(n){$t[n].placeholder=$t}),n(["filter","map","takeWhile"],function(n,t){var r=t==z;
-Bt.prototype[n]=function(n,e){n=Pr(n,e,3);var u=this.clone(),o=u.filtered,i=u.iteratees||(u.iteratees=[]);return u.filtered=o||r||t==M&&0>u.dir,i.push({iteratee:n,type:t}),u}}),n(["drop","take"],function(n,t){var r=n+"Count",e=n+"While";Bt.prototype[n]=function(e){e=null==e?1:Yu(+e||0,0);var u=this.clone();if(u.filtered){var o=u[r];u[r]=t?Zu(o,e):o+e}else(u.views||(u.views=[])).push({size:e,type:n+(0>u.dir?"Right":"")});return u},Bt.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()
-},Bt.prototype[n+"RightWhile"]=function(n,t){return this.reverse()[e](n,t).reverse()}}),n(["first","last"],function(n,t){var r="take"+(t?"Right":"");Bt.prototype[n]=function(){return this[r](1).value()[0]}}),n(["initial","rest"],function(n,t){var r="drop"+(t?"":"Right");Bt.prototype[n]=function(){return this[r](1)}}),n(["pluck","where"],function(n,t){var r=t?"filter":"map",e=t?uu:fu;Bt.prototype[n]=function(n){return this[r](e(n))}}),Bt.prototype.dropWhile=function(n,t){n=Pr(n,t,3);var r,e,u=0>this.dir;
-return this.filter(function(t,o,i){return r=r&&(u?oe),e=o,r||(r=!n(t,o,i))})},Bt.prototype.reject=function(n,t){return n=Pr(n,t,3),this.filter(function(t,r,e){return!n(t,r,e)})},Bt.prototype.slice=function(n,t){n=null==n?0:+n||0;var r=0>n?this.takeRight(-n):this.drop(n);return typeof t!="undefined"&&(t=+t||0,r=0>t?r.dropRight(-t):r.take(t-n)),r},pr(Bt.prototype,function(n,t){var r=/^(?:first|last)$/.test(t);$t.prototype[t]=function(){function e(n){return n=[n],Uu.apply(n,o),$t[t].apply($t,n)}var u=this.__wrapped__,o=arguments,i=this.__chain__,a=!!this.__actions__.length,f=u instanceof Bt,l=f&&!a;
-return r&&!i?l?n.call(u):$t[t](this.value()):f||_o(u)?(u=n.apply(l?u:new Bt(this),o),r||!a&&!u.actions||(u.actions||(u.actions=[])).push({args:[e],object:$t,name:"thru"}),new Pt(u,i)):this.thru(e)}}),n("concat join pop push shift sort splice unshift".split(" "),function(n){var t=_u[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:join|pop|shift)$/.test(n),u=fo.spliceObjects||!/^(?:pop|shift|splice)$/.test(n)?t:function(){var n=t.apply(this,arguments);return 0===this.length&&delete this[0],n
-};$t.prototype[n]=function(){var n=arguments;return e&&!this.__chain__?u.apply(this.value(),n):this[r](function(t){return u.apply(t,n)})}}),Bt.prototype.clone=function(){var n=this.actions,t=this.iteratees,r=this.views,e=new Bt(this.wrapped);return e.actions=n?l(n):null,e.dir=this.dir,e.dropCount=this.dropCount,e.filtered=this.filtered,e.iteratees=t?l(t):null,e.takeCount=this.takeCount,e.views=r?l(r):null,e},Bt.prototype.reverse=function(){var n=this.filtered,t=n?new Bt(this):this.clone();return t.dir=-1*this.dir,t.filtered=n,t
-},Bt.prototype.value=function(){var n=this.wrapped.value();if(!_o(n))return Er(n,this.actions);var t,r=this.dir,e=0>r,u=n.length;t=u;for(var o=this.views,i=0,a=-1,f=o?o.length:0;++a"'`]/g,H=/<%-([\s\S]+?)%>/g,Q=/<%([\s\S]+?)%>/g,nt=/<%=([\s\S]+?)%>/g,tt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,rt=/\w*$/,et=/^\s*function[ \n\r\t]+\w/,ut=/^0[xX]/,ot=/^\[object .+?Constructor\]$/,it=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,at=/($^)/,ft=/[.*+?^${}()|[\]\/\\]/g,lt=/\bthis\b/,ct=/['\n\r\u2028\u2029\\]/g,st=RegExp("[A-Z\\xc0-\\xd6\\xd8-\\xde]{2,}(?=[A-Z\\xc0-\\xd6\\xd8-\\xde][a-z\\xdf-\\xf6\\xf8-\\xff]+)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+|[A-Z\\xc0-\\xd6\\xd8-\\xde]+|[0-9]+","g"),pt=" \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",ht="Array ArrayBuffer Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Math Number Object RegExp Set String _ clearTimeout document isFinite parseInt setTimeout TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap window WinRTError".split(" "),gt="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),vt="[object Arguments]",yt="[object Array]",dt="[object Boolean]",mt="[object Date]",_t="[object Error]",bt="[object Function]",wt="[object Number]",xt="[object Object]",jt="[object RegExp]",At="[object String]",Et="[object ArrayBuffer]",It="[object Float32Array]",Ot="[object Float64Array]",Ct="[object Int8Array]",kt="[object Int16Array]",Rt="[object Int32Array]",St="[object Uint8Array]",Ft="[object Uint8ClampedArray]",Tt="[object Uint16Array]",Nt="[object Uint32Array]",Ut={};
-Ut[vt]=Ut[yt]=Ut[It]=Ut[Ot]=Ut[Ct]=Ut[kt]=Ut[Rt]=Ut[St]=Ut[Ft]=Ut[Tt]=Ut[Nt]=true,Ut[Et]=Ut[dt]=Ut[mt]=Ut[_t]=Ut[bt]=Ut["[object Map]"]=Ut[wt]=Ut[xt]=Ut[jt]=Ut["[object Set]"]=Ut[At]=Ut["[object WeakMap]"]=false;var Wt={};Wt[vt]=Wt[yt]=Wt[Et]=Wt[dt]=Wt[mt]=Wt[It]=Wt[Ot]=Wt[Ct]=Wt[kt]=Wt[Rt]=Wt[wt]=Wt[xt]=Wt[jt]=Wt[At]=Wt[St]=Wt[Ft]=Wt[Tt]=Wt[Nt]=true,Wt[_t]=Wt[bt]=Wt["[object Map]"]=Wt["[object Set]"]=Wt["[object WeakMap]"]=false;var Lt={leading:false,maxWait:0,trailing:false},$t={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"},Pt={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Bt={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},zt={"function":true,object:true},Dt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Mt=zt[typeof window]&&window!==(this&&this.window)?window:this,qt=zt[typeof exports]&&exports&&!exports.nodeType&&exports,Kt=zt[typeof module]&&module&&!module.nodeType&&module,Vt=qt&&Kt&&typeof global=="object"&&global;
-!Vt||Vt.global!==Vt&&Vt.window!==Vt&&Vt.self!==Vt||(Mt=Vt);var Yt=Kt&&Kt.exports===qt&&qt,Zt=function(){try{String({toString:0}+"")}catch(n){return function(){return false}}return function(n){return typeof n.toString!="function"&&typeof(n+"")=="string"}}(),Gt=I();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Mt._=Gt, define(function(){return Gt})):qt&&Kt?Yt?(Kt.exports=Gt)._=Gt:qt._=Gt:Mt._=Gt}).call(this);
\ No newline at end of file
+return r}function i(n,t){for(var r=-1,e=n.length;++rt||!r||typeof n=="undefined"&&e)return 1;if(n=n&&9<=n&&13>=n||32==n||160==n||5760==n||6158==n||8192<=n&&(8202>=n||8232==n||8233==n||8239==n||8287==n||12288==n||65279==n)}function A(n,t){for(var r=-1,e=n.length,u=-1,o=[];++re&&(e=u)}return e}function Zt(n){for(var t=-1,r=n.length,e=ro;++to(t,a)&&e.push(a);return e}function or(n,t){var r=n?n.length:0;if(!Zr(r))return gr(n,t);for(var e=-1,u=re(n);++ec))return false}else{var g=p&&Ou.call(n,"__wrapped__"),h=h&&Ou.call(t,"__wrapped__");if(g||h)return yr(g?n.value():n,h?t.value():t,r,e,u,o);if(!s)return false;if(!a&&!p){switch(f){case _t:case bt:return+n==+t;case At:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case Et:case It:return n==_u(t)}return false}if(Bt.support.argsClass||(c=Pe(n),i=Pe(t)),g=c?yu:n.constructor,f=i?yu:t.constructor,a){if(g.prototype.name!=f.prototype.name)return false
+}else if(p=!c&&Ou.call(n,"constructor"),h=!i&&Ou.call(t,"constructor"),p!=h||!p&&g!=f&&"constructor"in n&&"constructor"in t&&!(typeof g=="function"&&g instanceof g&&typeof f=="function"&&f instanceof f))return false;if(g=a?["message","name"]:Eo(n),f=a?g:Eo(t),c&&g.push("length"),i&&f.push("length"),c=g.length,p=f.length,c!=p&&!e)return false}for(u||(u=[]),o||(o=[]),f=u.length;f--;)if(u[f]==n)return o[f]==t;if(u.push(n),o.push(t),i=true,l)for(;i&&++fe(a,s)&&((t||i)&&a.push(s),f.push(c))}return f}function Ir(n,t){for(var r=-1,e=t(n),u=e.length,o=su(u);++rt||null==r)return r;if(3=i&&r<=a&&(e=L&&t>u||e>u&&t>=L)||o)&&(t&R&&(n[2]=h[2],r|=e&R?0:F),(e=h[3])&&(u=n[3],n[3]=u?Rr(u,e,h[4]):f(e),n[4]=u?A(n[3],Y):f(h[4])),(e=h[5])&&(u=n[5],n[5]=u?Sr(u,e,h[6]):f(e),n[6]=u?A(n[5],Y):f(h[6])),(e=h[7])&&(o=n[7],e=n[7]=f(e),o&&Lu.apply(e,o)),null==n[8]&&(n[8]=h[8]),t&L&&(n[9]=null==n[9]?h[9]:Ju(n[9],h[9])),n[0]=h[0],n[1]=r)
+}return n[8]=null==n[8]?l?0:n[0].length:Gu(n[8]-c,0)||0,t=n[1],(h?so:go)(t==R?Wr(n[0],n[2]):t!=N&&t!=(R|N)||n[4].length?Lr.apply(null,n):Pr.apply(null,n),n)}function zr(n,t,r){var e=Bt.callback||eu,e=e===eu?tr:e;return r?e(n,t,r):e}function Dr(n,t,r){var e=Bt.indexOf||ae,e=e===ae?l:e;return n?e(n,t,r):e}function Mr(n,t){var r=-1,e=n.length,u=new n.constructor(e);if(!t)for(;++rt?0:t)}function ue(n,t,r){return(r?Yr(n,t,r):null==t)&&(t=1),t=n?n.length-(+t||0):0,fe(n,0,0>t?0:t)}function oe(n,t,r){var e=-1,u=n?n.length:0;for(t=zr(t,r,3);++er?Gu(e+r,0):r||0;else if(r)return r=ce(n,t),n=n[r],(t===t?t===n:n!==n)?r:-1;return l(n,t,r)}function le(n){return ee(n,1)}function fe(n,t,r){var e=-1,u=n?n.length:0,o=typeof r;if(r&&"number"!=o&&Yr(n,t,r)&&(t=0,r=u),t=null==t?0:+t||0,0>t&&(t=-t>u?0:u+t),r="undefined"==o||r>u?u:+r||0,0>r&&(r+=u),r&&r==u&&!t)return f(n);for(u=t>r?0:r-t,r=su(u);++er?Gu(e+r,0):r||0:0,typeof n=="string"||!wo(n)&&Ye(n)?ri||r===to&&r===a)&&(i=r,a=n)
+}),a}function je(n,t){return xe(n,cu(t))}function Ee(n,t,r,e){return(wo(n)?u:xr)(n,zr(t,e,4),r,3>arguments.length,or)}function Ie(n,t,r,e){return(wo(n)?o:xr)(n,zr(t,e,4),r,3>arguments.length,ir)}function Oe(n){n=te(n);for(var t=-1,r=n.length,e=su(r);++t=r||r>t?(a&&Wu(a),r=p,a=s=p=C,r&&(h=Ro(),l=n.apply(c,i),s||a||(i=c=null))):s=Bu(e,r)}function u(){s&&Wu(s),a=s=p=C,(v||g!==t)&&(h=Ro(),l=n.apply(c,i),s||a||(i=c=null))}function o(){if(i=arguments,f=Ro(),c=this,p=v&&(s||!d),false===g)var r=d&&!s;else{a||d||(h=f);var o=g-(f-h),y=0>=o||o>g;y?(a&&(a=Wu(a)),h=f,l=n.apply(c,i)):a||(a=Bu(u,o))}return y&&s?s=Wu(s):s||t===g||(s=Bu(e,t)),r&&(y=true,l=n.apply(c,i)),!y||s||a||(i=c=null),l}var i,a,l,f,c,s,p,h=0,g=false,v=true;if(!De(n))throw new bu(V);if(t=0>t?0:t,true===r)var d=true,v=false;
+else Me(r)&&(d=r.leading,g="maxWait"in r&&Gu(+r.maxWait||0,t),v="trailing"in r?r.trailing:v);return o.cancel=function(){s&&Wu(s),a&&Wu(a),a=s=p=C},o}function Ne(){var n=arguments,r=n.length-1;if(0>r)return function(){};if(!t(n,De))throw new bu(V);return function(){for(var t=r,e=n[t].apply(this,arguments);t--;)e=n[t].call(this,e);return e}}function Ue(n,t){function r(){var e=r.cache,u=t?t.apply(this,arguments):arguments[0];if(e.has(u))return e.get(u);var o=n.apply(this,arguments);return e.set(u,o),o
+}if(!De(n)||t&&!De(t))throw new bu(V);return r.cache=new Ue.Cache,r}function Le(n){var t=fe(arguments,1),r=A(t,Le.placeholder);return Br(n,N,null,t,r)}function $e(n){var t=fe(arguments,1),r=A(t,$e.placeholder);return Br(n,U,null,t,r)}function Pe(n){return Zr(w(n)?n.length:C)&&ku.call(n)==yt||false}function Be(n){return n&&1===n.nodeType&&w(n)&&(Bt.support.nodeClass?-1t||null==n||!Yu(t))return r;n=_u(n);do t%2&&(r+=n),t=Nu(t/2),n+=n;while(t);return r}function nu(n,t,r){return(n=null==n?"":_u(n))?(r?Yr(n,t,r):null==t)?n.slice(j(n),E(n)+1):(t=_u(t),n.slice(p(n,t),h(n,t)+1)):n}function tu(n,t,r){return n=null!=n&&_u(n),r&&Yr(n,t,r)&&(t=null),n&&n.match(t||ht)||[]}function ru(n){try{return n()}catch(t){return ze(t)?t:hu(t)}}function eu(n,t,r){return r&&Yr(n,t,r)&&(t=null),tr(n,t)}function uu(n){return function(){return n}}function ou(n){return n}function iu(n){var t=Eo(n),r=t.length;
+if(1==r){var e=t[0],u=n[e];if(Gr(u))return function(n){return null!=n&&u===n[e]&&Ou.call(n,e)}}for(var o=r,i=su(r),a=su(r);o--;){var u=n[t[o]],l=Gr(u);i[o]=l?u:rr(u,true,kr),a[o]=l}return function(n){if(o=r,null==n)return!o;for(;o--;)if(a[o]?i[o]!==n[t[o]]:!Ou.call(n,t[o]))return false;for(o=r;o--;)if(a[o]?!Ou.call(n,t[o]):!yr(i[o],n[t[o]],null,true))return false;return true}}function au(n,t,r){var e=true,u=Me(t),o=null==r,i=o&&u&&Eo(t),a=i&&dr(t,i);(i&&i.length&&!a.length||o&&!u)&&(o&&(r=t),a=false,t=n,n=this),a||(a=dr(t,Eo(t))),false===r?e=false:Me(r)&&"chain"in r&&(e=r.chain),r=-1,u=De(n);
+for(o=a.length;++r=z)return r}else n=0;return so(r,e)}}(),vo=Fr(function(n,t,r){Ou.call(n,r)?++n[r]:n[r]=1}),yo=Fr(function(n,t,r){Ou.call(n,r)?n[r].push(t):n[r]=[t]}),mo=Fr(function(n,t,r){n[r]=t}),_o=Fr(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]
+}),bo=Br(ke,N,null,[2]);co.argsClass||(Pe=function(n){return Zr(w(n)?n.length:C)&&Ou.call(n,"callee")&&!$u.call(n,"callee")||false});var wo=Vu||function(n){return w(n)&&Zr(n.length)&&ku.call(n)==mt||false};co.dom||(Be=function(n){return n&&1===n.nodeType&&w(n)&&!Ao(n)||false});var xo=Hu||function(n){return typeof n=="number"&&Yu(n)};(De(/x/)||Du&&!De(Du))&&(De=function(n){return ku.call(n)==xt});var Ao=Uu?function(n){if(!n||ku.call(n)!=jt||!Bt.support.argsClass&&Pe(n))return false;var t=n.valueOf,r=qe(t)&&(r=Uu(t))&&Uu(r);
+return r?n==r||Uu(n)==r:Qr(n)}:Qr,jo=Tr(Qt),Eo=Zu?function(n){if(n)var t=n.constructor,r=n.length;return typeof t=="function"&&t.prototype===n||typeof r=="number"&&0--n?t.apply(this,arguments):void 0}},Bt.ary=function(n,t,r){return r&&Yr(n,t,r)&&(t=null),t=null==t?n.length:+t||0,Br(n,L,null,null,null,null,null,t)},Bt.assign=jo,Bt.at=function(n){return(!n||Zr(n.length))&&(n=te(n)),nr(n,cr(arguments,false,false,1))},Bt.before=ke,Bt.bind=Re,Bt.bindAll=function(n){for(var t=n,r=1(s?Vt(s,i):u(c,i))){for(t=r;--t;){var p=e[t];if(0>(p?Vt(p,i):u(n[t],i)))continue n}s&&s.push(i),c.push(i)}return c},Bt.invert=function(n,t,r){r&&Yr(n,t,r)&&(t=null),r=-1;for(var e=Eo(n),u=e.length,o={};++rt?0:t)},Bt.takeRight=function(n,t,r){return(r?Yr(n,t,r):null==t)&&(t=1),t=n?n.length-(+t||0):0,fe(n,0>t?0:t)
+},Bt.takeRightWhile=function(n,t,r){var e=n?n.length:0;for(t=zr(t,r,3);e--&&t(n[e],e,n););return fe(n,e+1)},Bt.takeWhile=function(n,t,r){var e=-1,u=n?n.length:0;for(t=zr(t,r,3);++en||!Yu(n))return[];t=tr(t,r,1),r=-1;for(var e=su(Ju(n,eo));++rr?0:+r||0,e))-t.length,0<=r&&n.indexOf(t,r)==r},Bt.escape=function(n){return(n=null==n?"":_u(n))&&(Q.lastIndex=0,Q.test(n))?n.replace(Q,y):n},Bt.escapeRegExp=He,Bt.every=ye,Bt.find=_e,Bt.findIndex=oe,Bt.findKey=function(n,t,r){return t=zr(t,r,3),fr(n,t,gr,true)
+},Bt.findLast=function(n,t,r){return t=zr(t,r,3),fr(n,t,ir)},Bt.findLastIndex=function(n,t,r){var e=n?n.length:0;for(t=zr(t,r,3);e--;)if(t(n[e],e,n))return e;return-1},Bt.findLastKey=function(n,t,r){return t=zr(t,r,3),fr(n,t,vr,true)},Bt.findWhere=function(n,t){return _e(n,iu(t))},Bt.first=ie,Bt.has=function(n,t){return n?Ou.call(n,t):false},Bt.identity=ou,Bt.includes=de,Bt.indexOf=ae,Bt.isArguments=Pe,Bt.isArray=wo,Bt.isBoolean=function(n){return true===n||false===n||w(n)&&ku.call(n)==_t||false},Bt.isDate=function(n){return w(n)&&ku.call(n)==bt||false
+},Bt.isElement=Be,Bt.isEmpty=function(n){if(null==n)return true;var t=n.length;return Zr(t)&&(wo(n)||Ye(n)||Pe(n)||w(n)&&De(n.splice))?!t:!Eo(n).length},Bt.isEqual=function(n,t,r,e){return r=typeof r=="function"&&tr(r,e,3),!r&&Gr(n)&&Gr(t)?n===t:yr(n,t,r)},Bt.isError=ze,Bt.isFinite=xo,Bt.isFunction=De,Bt.isNaN=function(n){return Ke(n)&&n!=+n},Bt.isNative=qe,Bt.isNull=function(n){return null===n},Bt.isNumber=Ke,Bt.isObject=Me,Bt.isPlainObject=Ao,Bt.isRegExp=Ve,Bt.isString=Ye,Bt.isUndefined=function(n){return typeof n=="undefined"
+},Bt.kebabCase=Co,Bt.last=function(n){var t=n?n.length:0;return t?n[t-1]:C},Bt.lastIndexOf=function(n,t,r){var e=n?n.length:0;if(!e)return-1;var u=e;if(typeof r=="number")u=(0>r?Gu(e+r,0):Ju(r||0,e-1))+1;else if(r)return u=se(n,t)-1,n=n[u],(t===t?t===n:n!==n)?u:-1;if(t!==t)return _(n,u,true);for(;u--;)if(n[u]===t)return u;return-1},Bt.max=Ae,Bt.min=function(n,t,r){r&&Yr(n,t,r)&&(t=null);var e=null==t,u=e&&wo(n),o=!u&&Ye(n);if(e&&!o)return Zt(u?n:te(n));var i=ro,a=i;return t=e&&o?s:zr(t,r,3),or(n,function(n,r,e){r=t(n,r,e),(rr?0:+r||0,n.length),n.lastIndexOf(t,r)==r},Bt.template=function(n,t,r){var e=Bt.templateSettings;r&&Yr(n,t,r)&&(t=r=null),n=_u(null==n?"":n),t=jo({},r||t,e,Ht),r=jo({},t.imports,e.imports,Ht);
+var u,o,i=Eo(r),a=Je(r),l=0;r=t.interpolate||ft;var f="__p+='";if(r=mu((t.escape||ft).source+"|"+r.source+"|"+(r===rt?et:ft).source+"|"+(t.evaluate||ft).source+"|$","g"),n.replace(r,function(t,r,e,i,a,c){return e||(e=i),f+=n.slice(l,c).replace(pt,m),r&&(u=true,f+="'+__e("+r+")+'"),a&&(o=true,f+="';"+a+";\n__p+='"),e&&(f+="'+((__t=("+e+"))==null?'':__t)+'"),l=c+t.length,t}),f+="';",(t=t.variable)||(f="with(obj){"+f+"}"),f=(o?f.replace(G,""):f).replace(J,"$1").replace(X,"$1;"),f="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+f+"return __p}",t=ru(function(){return gu(i,"return "+f).apply(C,a)
+}),t.source=f,ze(t))throw t;return t},Bt.trim=nu,Bt.trimLeft=function(n,t,r){return(n=null==n?"":_u(n))?(r?Yr(n,t,r):null==t)?n.slice(j(n)):(t=_u(t),n.slice(p(n,t))):n},Bt.trimRight=function(n,t,r){return(n=null==n?"":_u(n))?(r?Yr(n,t,r):null==t)?n.slice(0,E(n)+1):(t=_u(t),n.slice(0,h(n,t)+1)):n},Bt.trunc=function(n,t,r){r&&Yr(n,t,r)&&(t=null);var e=P;if(r=B,Me(t)){var u="separator"in t?t.separator:u,e="length"in t?+t.length||0:e;r="omission"in t?_u(t.omission):r}else null!=t&&(e=+t||0);if(n=null==n?"":_u(n),e>=n.length)return n;
+if(e-=r.length,1>e)return r;if(t=n.slice(0,e),null==u)return t+r;if(Ve(u)){if(n.slice(e).search(u)){var o,i=n.slice(0,e);for(u.global||(u=mu(u.source,(ut.exec(u)||"")+"g")),u.lastIndex=0;n=u.exec(i);)o=n.index;t=t.slice(0,null==o?e:o)}}else n.indexOf(u,e)!=e&&(u=t.lastIndexOf(u),-1t?0:+t||0,n.length),n)},Bt.prototype.sample=function(n){return this.__chain__||null!=n?this.thru(function(t){return Bt.sample(t,n)}):Bt.sample(this.value())},Bt.VERSION=k,n("bind bindKey curry curryRight partial partialRight".split(" "),function(n){Bt[n].placeholder=Bt}),n(["filter","map","takeWhile"],function(n,t){var r=t==M;
+Dt.prototype[n]=function(n,e){n=zr(n,e,3);var u=this.clone(),o=u.filtered,i=u.iteratees||(u.iteratees=[]);return u.filtered=o||r||t==K&&0>u.dir,i.push({iteratee:n,type:t}),u}}),n(["drop","take"],function(n,t){var r=n+"Count",e=n+"While";Dt.prototype[n]=function(e){e=null==e?1:Gu(+e||0,0);var u=this.clone();if(u.filtered){var o=u[r];u[r]=t?Ju(o,e):o+e}else(u.views||(u.views=[])).push({size:e,type:n+(0>u.dir?"Right":"")});return u},Dt.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()
+},Dt.prototype[n+"RightWhile"]=function(n,t){return this.reverse()[e](n,t).reverse()}}),n(["first","last"],function(n,t){var r="take"+(t?"Right":"");Dt.prototype[n]=function(){return this[r](1).value()[0]}}),n(["initial","rest"],function(n,t){var r="drop"+(t?"":"Right");Dt.prototype[n]=function(){return this[r](1)}}),n(["pluck","where"],function(n,t){var r=t?"filter":"map",e=t?iu:cu;Dt.prototype[n]=function(n){return this[r](e(n))}}),Dt.prototype.dropWhile=function(n,t){n=zr(n,t,3);var r,e,u=0>this.dir;
+return this.filter(function(t,o,i){return r=r&&(u?oe),e=o,r||(r=!n(t,o,i))})},Dt.prototype.reject=function(n,t){return n=zr(n,t,3),this.filter(function(t,r,e){return!n(t,r,e)})},Dt.prototype.slice=function(n,t){n=null==n?0:+n||0;var r=0>n?this.takeRight(-n):this.drop(n);return typeof t!="undefined"&&(t=+t||0,r=0>t?r.dropRight(-t):r.take(t-n)),r},gr(Dt.prototype,function(n,t){var r=/^(?:first|last)$/.test(t);Bt.prototype[t]=function(){function e(n){return n=[n],Lu.apply(n,o),Bt[t].apply(Bt,n)}var u=this.__wrapped__,o=arguments,i=this.__chain__,a=!!this.__actions__.length,l=u instanceof Dt,f=l&&!a;
+return r&&!i?f?n.call(u):Bt[t](this.value()):l||wo(u)?(u=n.apply(f?u:new Dt(this),o),r||!a&&!u.actions||(u.actions||(u.actions=[])).push({args:[e],object:Bt,name:"thru"}),new zt(u,i)):this.thru(e)}}),n("concat join pop push shift sort splice unshift".split(" "),function(n){var t=wu[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:join|pop|shift)$/.test(n),u=co.spliceObjects||!/^(?:pop|shift|splice)$/.test(n)?t:function(){var n=t.apply(this,arguments);return 0===this.length&&delete this[0],n
+};Bt.prototype[n]=function(){var n=arguments;return e&&!this.__chain__?u.apply(this.value(),n):this[r](function(t){return u.apply(t,n)})}}),Dt.prototype.clone=function(){var n=this.actions,t=this.iteratees,r=this.views,e=new Dt(this.wrapped);return e.actions=n?f(n):null,e.dir=this.dir,e.dropCount=this.dropCount,e.filtered=this.filtered,e.iteratees=t?f(t):null,e.takeCount=this.takeCount,e.views=r?f(r):null,e},Dt.prototype.reverse=function(){var n=this.filtered,t=n?new Dt(this):this.clone();return t.dir=-1*this.dir,t.filtered=n,t
+},Dt.prototype.value=function(){var n=this.wrapped.value();if(!wo(n))return Or(n,this.actions);var t,r=this.dir,e=0>r,u=n.length;t=u;for(var o=this.views,i=0,a=-1,l=o?o.length:0;++a"'`]/g,nt=/<%-([\s\S]+?)%>/g,tt=/<%([\s\S]+?)%>/g,rt=/<%=([\s\S]+?)%>/g,et=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ut=/\w*$/,ot=/^\s*function[ \n\r\t]+\w/,it=/^0[xX]/,at=/^\[object .+?Constructor\]$/,lt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,ft=/($^)/,ct=/[.*+?^${}()|[\]\/\\]/g,st=/\bthis\b/,pt=/['\n\r\u2028\u2029\\]/g,ht=RegExp("[A-Z\\xc0-\\xd6\\xd8-\\xde]{2,}(?=[A-Z\\xc0-\\xd6\\xd8-\\xde][a-z\\xdf-\\xf6\\xf8-\\xff]+)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+|[A-Z\\xc0-\\xd6\\xd8-\\xde]+|[0-9]+","g"),gt=" \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",vt="Array ArrayBuffer Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Math Number Object RegExp Set String _ clearTimeout document isFinite parseInt setTimeout TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap window WinRTError".split(" "),dt="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),yt="[object Arguments]",mt="[object Array]",_t="[object Boolean]",bt="[object Date]",wt="[object Error]",xt="[object Function]",At="[object Number]",jt="[object Object]",Et="[object RegExp]",It="[object String]",Ot="[object ArrayBuffer]",Ct="[object Float32Array]",kt="[object Float64Array]",Rt="[object Int8Array]",St="[object Int16Array]",Ft="[object Int32Array]",Tt="[object Uint8Array]",Wt="[object Uint8ClampedArray]",Nt="[object Uint16Array]",Ut="[object Uint32Array]",Lt={};
+Lt[yt]=Lt[mt]=Lt[Ct]=Lt[kt]=Lt[Rt]=Lt[St]=Lt[Ft]=Lt[Tt]=Lt[Wt]=Lt[Nt]=Lt[Ut]=true,Lt[Ot]=Lt[_t]=Lt[bt]=Lt[wt]=Lt[xt]=Lt["[object Map]"]=Lt[At]=Lt[jt]=Lt[Et]=Lt["[object Set]"]=Lt[It]=Lt["[object WeakMap]"]=false;var $t={};$t[yt]=$t[mt]=$t[Ot]=$t[_t]=$t[bt]=$t[Ct]=$t[kt]=$t[Rt]=$t[St]=$t[Ft]=$t[At]=$t[jt]=$t[Et]=$t[It]=$t[Tt]=$t[Wt]=$t[Nt]=$t[Ut]=true,$t[wt]=$t[xt]=$t["[object Map]"]=$t["[object Set]"]=$t["[object WeakMap]"]=false;var Pt={leading:false,maxWait:0,trailing:false},Bt={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"},zt={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Dt={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Mt={"function":true,object:true},qt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Kt=Mt[typeof window]&&window!==(this&&this.window)?window:this,Vt=Mt[typeof exports]&&exports&&!exports.nodeType&&exports,Yt=Mt[typeof module]&&module&&!module.nodeType&&module,Zt=Vt&&Yt&&typeof global=="object"&&global;
+!Zt||Zt.global!==Zt&&Zt.window!==Zt&&Zt.self!==Zt||(Kt=Zt);var Gt=Yt&&Yt.exports===Vt&&Vt,Jt=function(){try{String({toString:0}+"")}catch(n){return function(){return false}}return function(n){return typeof n.toString!="function"&&typeof(n+"")=="string"}}(),Xt=O();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Kt._=Xt, define(function(){return Xt})):Vt&&Yt?Gt?(Yt.exports=Xt)._=Xt:Vt._=Xt:Kt._=Xt}).call(this);
\ No newline at end of file
diff --git a/dist/lodash.js b/dist/lodash.js
index fe5666ba3..24e69a53d 100644
--- a/dist/lodash.js
+++ b/dist/lodash.js
@@ -1,11 +1,11 @@
/**
* @license
- * Lo-Dash 3.0.0-pre (Custom Build)
+ * Lo-Dash 3.0.0-pre (Custom Build)
* Build: `lodash modern -o ./dist/lodash.js`
* Copyright 2012-2014 The Dojo Foundation
* Based on Underscore.js 1.7.0
* Copyright 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license
+ * Available under MIT license
*/
;(function() {
@@ -18,12 +18,13 @@
/** Used to compose bitmasks for wrapper metadata. */
var BIND_FLAG = 1,
BIND_KEY_FLAG = 2,
- CURRY_FLAG = 4,
- CURRY_RIGHT_FLAG = 8,
- CURRY_BOUND_FLAG = 16,
+ CURRY_BOUND_FLAG = 4,
+ CURRY_FLAG = 8,
+ CURRY_RIGHT_FLAG = 16,
PARTIAL_FLAG = 32,
PARTIAL_RIGHT_FLAG = 64,
- REARG_FLAG = 128;
+ ARY_FLAG = 128,
+ REARG_FLAG = 256;
/** Used as default options for `_.trunc`. */
var DEFAULT_TRUNC_LENGTH = 30,
@@ -700,6 +701,17 @@
return value > -1 && value % 1 == 0 && (length == null || value < length);
}
+ /**
+ * 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') || false;
+ }
+
/**
* Used by `trimmedLeftIndex` and `trimmedRightIndex` to determine if a
* character code is whitespace.
@@ -945,19 +957,21 @@
/**
* Creates a `lodash` object which wraps `value` to enable intuitive chaining.
- * Explicit chaining may be enabled by using `_.chain`. Chaining is supported
- * in custom builds as long as the `_#value` method is implicitly or explicitly
- * included in the build.
+ * The execution of chained methods is deferred until `_#value` is implicitly
+ * or explicitly called. Explicit chaining may be enabled by using `_.chain`.
+ *
+ * Chaining is supported in custom builds as long as the `_#value` method is
+ * directly or indirectly included in the build.
*
* In addition to Lo-Dash methods, wrappers also have the following `Array` methods:
* `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, `splice`,
* and `unshift`
*
- * The chainable wrapper functions are:
- * `after`, `assign`, `at`, `before`, `bind`, `bindAll`, `bindKey`, `callback`,
- * `chain`, `chunk`, `compact`, `concat`, `constant`, `countBy`, `create`,
- * `curry`, `debounce`, `defaults`, `defer`, `delay`, `difference`, `drop`,
- * `dropRight`, `dropRightWhile`, `dropWhile`, `filter`, `flatten`,
+ * The wrapper functions that are chainable by default are:
+ * `after`, `ary`, `assign`, `at`, `before`, `bind`, `bindAll`, `bindKey`,
+ * `callback`, `chain`, `chunk`, `compact`, `concat`, `constant`, `countBy`,
+ * `create`, `curry`, `debounce`, `defaults`, `defer`, `delay`, `difference`,
+ * `drop`, `dropRight`, `dropRightWhile`, `dropWhile`, `filter`, `flatten`,
* `flattenDeep`, `flow`, `flowRight`, `forEach`, `forEachRight`, `forIn`,
* `forInRight`, `forOwn`, `forOwnRight`, `functions`, `groupBy`, `indexBy`,
* `initial`, `intersection`, `invert`, `invoke`, `keys`, `keysIn`, `map`,
@@ -970,7 +984,7 @@
* `union`, `uniq`, `unshift`, `unzip`, `values`, `valuesIn`, `where`,
* `without`, `wrap`, `xor`, `zip`, and `zipObject`
*
- * The non-chainable wrapper functions are:
+ * The wrapper functions that are non-chainable by default are:
* `attempt`, `camelCase`, `capitalize`, `clone`, `cloneDeep`, `deburr`,
* `endsWith`, `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`,
* `findLast`, `findLastIndex`, `findLastKey`, `findWhere`, `first`, `has`,
@@ -985,7 +999,7 @@
* `trunc`, `unescape`, `uniqueId`, `value`, and `words`
*
* The wrapper function `sample` will return a wrapped value when `n` is provided,
- * otherwise it will return an unwrapped value.
+ * otherwise an unwrapped value is returned.
*
* @name _
* @constructor
@@ -1010,7 +1024,7 @@
* // => true
*/
function lodash(value) {
- if (value && typeof value == 'object' && !isArray(value)) {
+ if (isObjectLike(value) && !isArray(value)) {
if (value instanceof LodashWrapper) {
return value;
}
@@ -1875,8 +1889,7 @@
while (++index < length) {
var value = array[index];
- if (value && typeof value == 'object' && typeof value.length == 'number'
- && (isArray(value) || isArguments(value))) {
+ if (isObjectLike(value) && isLength(value.length) && (isArray(value) || isArguments(value))) {
// Recursively flatten arrays (susceptible to call stack limits).
if (isDeep) {
value = baseFlatten(value, isDeep, isStrict);
@@ -2800,15 +2813,17 @@
* @param {Array} [partialsRight] The arguments to append to those provided to the new function.
* @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
* @param {Array} [argPos] The argument positions of the new function.
- * @param {number} arity The arity of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @param {number} [ary] The arity cap of `func`.
* @returns {Function} Returns the new wrapped function.
*/
- function createHybridWrapper(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, arity) {
- var isBind = bitmask & BIND_FLAG,
+ function createHybridWrapper(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, arity, ary) {
+ var isAry = bitmask & ARY_FLAG,
+ isBind = bitmask & BIND_FLAG,
isBindKey = bitmask & BIND_KEY_FLAG,
isCurry = bitmask & CURRY_FLAG,
- isCurryRight = bitmask & CURRY_RIGHT_FLAG,
- isCurryBound = bitmask & CURRY_BOUND_FLAG;
+ isCurryBound = bitmask & CURRY_BOUND_FLAG,
+ isCurryRight = bitmask & CURRY_RIGHT_FLAG;
var Ctor = !isBindKey && createCtorWrapper(func),
key = func;
@@ -2823,9 +2838,6 @@
while (index--) {
args[index] = arguments[index];
}
- if (argPos) {
- args = arrayReduceRight(argPos, reorder, args);
- }
if (partials) {
args = composeArgs(args, partials, holders);
}
@@ -2851,7 +2863,7 @@
if (!isCurryBound) {
bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG);
}
- var result = createHybridWrapper(func, bitmask, thisArg, newPartials, newsHolders, newPartialsRight, newHoldersRight, newArgPos, newArity);
+ var result = createHybridWrapper(func, bitmask, thisArg, newPartials, newsHolders, newPartialsRight, newHoldersRight, newArgPos, newArity, ary);
result.placeholder = placeholder;
return result;
}
@@ -2860,6 +2872,12 @@
if (isBindKey) {
func = thisBinding[key];
}
+ if (argPos) {
+ args = arrayReduceRight(argPos, reorder, args);
+ }
+ if (isAry && ary < args.length) {
+ args.length = ary;
+ }
return (this instanceof wrapper ? (Ctor || createCtorWrapper(func)) : func).apply(thisBinding, args);
}
return wrapper;
@@ -2934,20 +2952,22 @@
* The bitmask may be composed of the following flags:
* 1 - `_.bind`
* 2 - `_.bindKey`
- * 4 - `_.curry`
- * 8 - `_.curryRight`
- * 16 - `_.curry` or `_.curryRight` of a bound function
+ * 4 - `_.curry` or `_.curryRight` of a bound function
+ * 8 - `_.curry`
+ * 16 - `_.curryRight`
* 32 - `_.partial`
* 64 - `_.partialRight`
- * 128 - `_.rearg`
+ * 128 - `_.ary`
+ * 256 - `_.rearg`
* @param {*} [thisArg] The `this` binding of `func`.
* @param {Array} [partials] The arguments to be partially applied.
* @param {Array} [holders] The `partials` placeholder indexes.
* @param {Array} [argPos] The argument positions of the new function.
* @param {number} [arity] The arity of `func`.
+ * @param {number} [ary] The arity cap of `func`.
* @returns {Function} Returns the new wrapped function.
*/
- function createWrapper(func, bitmask, thisArg, partials, holders, argPos, arity) {
+ function createWrapper(func, bitmask, thisArg, partials, holders, argPos, arity, ary) {
var isBindKey = bitmask & BIND_KEY_FLAG;
if (!isBindKey && !isFunction(func)) {
throw new TypeError(FUNC_ERROR_TEXT);
@@ -2967,14 +2987,14 @@
partials = holders = null;
}
var data = !isBindKey && getData(func),
- newData = [func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, arity];
+ newData = [func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, arity, ary];
- if (data && data !== true && !(argPos && (data[3] || data[5]))) {
- newData = mergeData(newData, data);
+ if (data && data !== true) {
+ mergeData(newData, data);
}
newData[8] = newData[8] == null
? (isBindKey ? 0 : newData[0].length)
- : nativeMax(newData[8] - length, 0) || 0;
+ : (nativeMax(newData[8] - length, 0) || 0);
bitmask = newData[1];
if (bitmask == BIND_FLAG) {
@@ -3144,7 +3164,7 @@
* @returns {boolean} Returns `true` if `value` is an array-like object, else `false`.
*/
function isArrayLike(value) {
- return (value && typeof value == 'object' && isLength(value.length) &&
+ return (isObjectLike(value) && isLength(value.length) &&
(arrayLikeClasses[toString.call(value)])) || false;
}
@@ -3208,6 +3228,13 @@
/**
* Merges the function metadata of `source` into `data`.
*
+ * Merging metadata reduces the number of wrappers required to invoke a function.
+ * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
+ * may be applied regardless of execution order. Methods like `_.ary` and `_.rearg`
+ * augment function arguments, making the order in which they are executed important,
+ * preventing the merging of metadata. However, we make an exception for a safe
+ * common case where curried functions have `_.ary` and or `_.rearg` applied.
+ *
* @private
* @param {Array} data The destination metadata.
* @param {Array} source The source metadata.
@@ -3215,13 +3242,33 @@
*/
function mergeData(data, source) {
var bitmask = data[1],
- funcBitmask = source[1];
+ srcBitmask = source[1],
+ newBitmask = bitmask | srcBitmask;
- // Use metadata `thisArg` if available.
- if (funcBitmask & BIND_FLAG) {
+ var arityFlags = ARY_FLAG | REARG_FLAG,
+ bindFlags = BIND_FLAG | BIND_KEY_FLAG,
+ comboFlags = arityFlags | bindFlags | CURRY_BOUND_FLAG | CURRY_RIGHT_FLAG;
+
+ var isAry = bitmask & ARY_FLAG && !(srcBitmask & ARY_FLAG),
+ isRearg = bitmask & REARG_FLAG && !(srcBitmask & REARG_FLAG),
+ argPos = (isRearg ? data : source)[7],
+ ary = (isAry ? data : source)[9];
+
+ var isCommon = !(bitmask >= ARY_FLAG && srcBitmask > bindFlags) &&
+ !(bitmask > bindFlags && srcBitmask >= ARY_FLAG);
+
+ var isCombo = (newBitmask >= arityFlags && newBitmask <= comboFlags) &&
+ (bitmask < ARY_FLAG || ((isRearg || isAry) && argPos[0].length <= ary));
+
+ // Exit early if metadata can't be merged.
+ if (!(isCommon || isCombo)) {
+ return data;
+ }
+ // Use source `thisArg` if available.
+ if (srcBitmask & BIND_FLAG) {
data[2] = source[2];
// Set when currying a bound function.
- bitmask |= (bitmask & BIND_FLAG) ? 0 : CURRY_BOUND_FLAG;
+ newBitmask |= (bitmask & BIND_FLAG) ? 0 : CURRY_BOUND_FLAG;
}
// Compose partial arguments.
var value = source[3];
@@ -3240,17 +3287,23 @@
// Append argument positions.
value = source[7];
if (value) {
- value = baseSlice(value);
- push.apply(value, data[7]);
- data[7] = value;
+ argPos = data[7];
+ value = data[7] = baseSlice(value);
+ if (argPos) {
+ push.apply(value, argPos);
+ }
}
- // Use metadata `arity` if one is not provided.
+ // Use source `arity` if one is not provided.
if (data[8] == null) {
data[8] = source[8];
}
- // Use metadata `func` and merge bitmasks.
+ // Use source `ary` if it's smaller.
+ if (srcBitmask & ARY_FLAG) {
+ data[9] = data[9] == null ? source[9] : nativeMin(data[9], source[9]);
+ }
+ // Use source `func` and merge bitmasks.
data[0] = source[0];
- data[1] = bitmask | funcBitmask;
+ data[1] = newBitmask;
return data;
}
@@ -3368,8 +3421,7 @@
support = lodash.support;
// Exit early for non `Object` objects.
- if (!(value && typeof value == 'object' &&
- toString.call(value) == objectClass) ||
+ if (!(isObjectLike(value) && toString.call(value) == objectClass) ||
(!hasOwnProperty.call(value, 'constructor') &&
(Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) {
return false;
@@ -4886,7 +4938,7 @@
}
/**
- * Extracts the unwrapped value from its wrapper.
+ * Executes the chained sequence to extract the unwrapped value.
*
* @name value
* @memberOf _
@@ -6085,6 +6137,30 @@
};
}
+ /**
+ * Creates a function that accepts up to `n` arguments ignoring any
+ * additional arguments.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to cap arguments for.
+ * @param {number} [n=func.length] The arity cap.
+ * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * _.map(['6', '8', '10'], _.ary(parseInt, 1));
+ * // => [6, 8, 10]
+ */
+ function ary(func, n, guard) {
+ if (guard && isIterateeCall(func, n, guard)) {
+ n = null;
+ }
+ n = n == null ? func.length : (+n || 0);
+ return createWrapper(func, ARY_FLAG, null, null, null, null, null, n);
+ }
+
/**
* Creates a function that invokes `func`, with the `this` binding and arguments
* of the created function, while it is called less than `n` times. Subsequent
@@ -6124,8 +6200,11 @@
/**
* Creates a function that invokes `func` with the `this` binding of `thisArg`
- * and prepends any additional `bind` arguments to those provided to the bound
- * function.
+ * and prepends any additional `_.bind` arguments to those provided to the
+ * bound function.
+ *
+ * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
+ * may be used as a placeholder for partially applied arguments.
*
* **Note:** Unlike native `Function#bind` this method does not set the `length`
* property of bound functions.
@@ -6139,13 +6218,20 @@
* @returns {Function} Returns the new bound function.
* @example
*
- * var func = function(greeting) {
- * return greeting + ' ' + this.user;
+ * var greet = function(greeting, punctuation) {
+ * return greeting + ' ' + this.user + punctuation;
* };
*
- * func = _.bind(func, { 'user': 'fred' }, 'hi');
- * func();
- * // => 'hi fred'
+ * var object = { 'user': 'fred' };
+ *
+ * var bound = _.bind(greet, object, 'hi');
+ * bound('!');
+ * // => 'hi fred!'
+ *
+ * // using placeholders
+ * var bound = _.bind(greet, object, _, '!');
+ * bound('hi');
+ * // => 'hi fred!'
*/
function bind(func, thisArg) {
var bitmask = BIND_FLAG;
@@ -6194,12 +6280,16 @@
/**
* Creates a function that invokes the method at `object[key]` and prepends
- * any additional `bindKey` arguments to those provided to the bound function.
+ * any additional `_.bindKey` arguments to those provided to the bound function.
+ *
* This method differs from `_.bind` by allowing bound functions to reference
* methods that may be redefined or don't yet exist.
* See [Peter Michaux's article](http://michaux.ca/articles/lazy-function-definition-pattern)
* for more details.
*
+ * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
* @static
* @memberOf _
* @category Function
@@ -6211,20 +6301,25 @@
*
* var object = {
* 'user': 'fred',
- * 'greet': function(greeting) {
- * return greeting + ' ' + this.user;
+ * 'greet': function(greeting, punctuation) {
+ * return greeting + ' ' + this.user + punctuation;
* }
* };
*
- * var func = _.bindKey(object, 'greet', 'hi');
- * func();
- * // => 'hi fred'
+ * var bound = _.bindKey(object, 'greet', 'hi');
+ * bound('!');
+ * // => 'hi fred!'
*
- * object.greet = function(greeting) {
- * return greeting + 'ya ' + this.user + '!';
+ * object.greet = function(greeting, punctuation) {
+ * return greeting + 'ya ' + this.user + punctuation;
* };
*
- * func();
+ * bound('!');
+ * // => 'hiya fred!'
+ *
+ * // using placeholders
+ * var bound = _.bindKey(object, 'greet', _, '!');
+ * bound('hi');
* // => 'hiya fred!'
*/
function bindKey(object, key) {
@@ -6245,6 +6340,9 @@
* remaining `func` arguments, and so on. The arity of `func` can be specified
* if `func.length` is not sufficient.
*
+ * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
+ * may be used as a placeholder for provided arguments.
+ *
* **Note:** This method does not set the `length` property of curried functions.
*
* @static
@@ -6256,9 +6354,11 @@
* @returns {Function} Returns the new curried function.
* @example
*
- * var curried = _.curry(function(a, b, c) {
+ * var abc = function(a, b, c) {
* return [a, b, c];
- * });
+ * };
+ *
+ * var curried = _.curry(abc);
*
* curried(1)(2)(3);
* // => [1, 2, 3]
@@ -6268,6 +6368,10 @@
*
* curried(1, 2, 3);
* // => [1, 2, 3]
+ *
+ * // using placeholders
+ * curried(1)(_, 3)(2);
+ * // => [1, 2, 3]
*/
function curry(func, arity, guard) {
if (guard && isIterateeCall(func, arity, guard)) {
@@ -6282,6 +6386,9 @@
* This method is like `_.curry` except that arguments are applied to `func`
* in the manner of `_.partialRight` instead of `_.partial`.
*
+ * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for provided arguments.
+ *
* **Note:** This method does not set the `length` property of curried functions.
*
* @static
@@ -6293,9 +6400,11 @@
* @returns {Function} Returns the new curried function.
* @example
*
- * var curried = _.curryRight(function(a, b, c) {
+ * var abc = function(a, b, c) {
* return [a, b, c];
- * });
+ * };
+ *
+ * var curried = _.curryRight(abc);
*
* curried(3)(2)(1);
* // => [1, 2, 3]
@@ -6305,6 +6414,10 @@
*
* curried(1, 2, 3);
* // => [1, 2, 3]
+ *
+ * // using placeholders
+ * curried(3)(1, _)(2);
+ * // => [1, 2, 3]
*/
function curryRight(func, arity, guard) {
if (guard && isIterateeCall(func, arity, guard)) {
@@ -6742,6 +6855,9 @@
* to those provided to the new function. This method is like `_.bind` except
* it does **not** alter the `this` binding.
*
+ * The `_.partial.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
* **Note:** This method does not set the `length` property of partially
* applied functions.
*
@@ -6753,10 +6869,18 @@
* @returns {Function} Returns the new partially applied function.
* @example
*
- * var greet = function(greeting, name) { return greeting + ' ' + name; };
+ * var greet = function(greeting, name) {
+ * return greeting + ' ' + name;
+ * };
+ *
* var sayHelloTo = _.partial(greet, 'hello');
* sayHelloTo('fred');
* // => 'hello fred'
+ *
+ * // using placeholders
+ * var greetFred = _.partial(greet, _, 'fred');
+ * greetFred('hi');
+ * // => 'hi fred'
*/
function partial(func) {
var partials = slice(arguments, 1),
@@ -6769,6 +6893,9 @@
* This method is like `_.partial` except that partially applied arguments
* are appended to those provided to the new function.
*
+ * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
* **Note:** This method does not set the `length` property of partially
* applied functions.
*
@@ -6780,21 +6907,18 @@
* @returns {Function} Returns the new partially applied function.
* @example
*
- * var greet = function(greeting, name) { return greeting + ' ' + name; };
+ * var greet = function(greeting, name) {
+ * return greeting + ' ' + name;
+ * };
+ *
* var greetFred = _.partialRight(greet, 'fred');
- * greetFred('hello');
+ * greetFred('hi');
+ * // => 'hi fred'
+ *
+ * // using placeholders
+ * var sayHelloTo = _.partialRight(greet, 'hello', _);
+ * sayHelloTo('fred');
* // => 'hello fred'
- *
- * // create a deep `_.defaults`
- * var defaultsDeep = _.partialRight(_.merge, function deep(value, other) {
- * return _.merge(value, other, deep);
- * });
- *
- * var object = { 'a': { 'b': { 'c': 1 } } },
- * source = { 'a': { 'b': { 'c': 2, 'd': 2 } } };
- *
- * defaultsDeep(object, source);
- * // => { 'a': { 'b': { 'c': 1, 'd': 2 } } }
*/
function partialRight(func) {
var partials = slice(arguments, 1),
@@ -7044,7 +7168,7 @@
* // => false
*/
function isArguments(value) {
- var length = (value && typeof value == 'object') ? value.length : undefined;
+ var length = isObjectLike(value) ? value.length : undefined;
return (isLength(length) && toString.call(value) == argsClass) || false;
}
@@ -7065,8 +7189,7 @@
* // => false
*/
var isArray = nativeIsArray || function(value) {
- return (value && typeof value == 'object' && typeof value.length == 'number' &&
- toString.call(value) == arrayClass) || false;
+ return (isObjectLike(value) && isLength(value.length) && toString.call(value) == arrayClass) || false;
};
/**
@@ -7086,8 +7209,7 @@
* // => false
*/
function isBoolean(value) {
- return (value === true || value === false || value && typeof value == 'object' &&
- toString.call(value) == boolClass) || false;
+ return (value === true || value === false || isObjectLike(value) && toString.call(value) == boolClass) || false;
}
/**
@@ -7107,7 +7229,7 @@
* // => false
*/
function isDate(value) {
- return (value && typeof value == 'object' && toString.call(value) == dateClass) || false;
+ return (isObjectLike(value) && toString.call(value) == dateClass) || false;
}
/**
@@ -7127,13 +7249,13 @@
* // => false
*/
function isElement(value) {
- return (value && typeof value == 'object' && value.nodeType === 1 &&
+ return (value && value.nodeType === 1 && isObjectLike(value) &&
toString.call(value).indexOf('Element') > -1) || false;
}
// Fallback for environments without DOM support.
if (!support.dom) {
isElement = function(value) {
- return (value && typeof value == 'object' && value.nodeType === 1 && !isPlainObject(value)) || false;
+ return (value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value)) || false;
};
}
@@ -7170,7 +7292,7 @@
}
var length = value.length;
if (isLength(length) && (isArray(value) || isString(value) || isArguments(value) ||
- (typeof value == 'object' && isFunction(value.splice)))) {
+ (isObjectLike(value) && isFunction(value.splice)))) {
return !length;
}
return !keys(value).length;
@@ -7240,7 +7362,7 @@
* // => false
*/
function isError(value) {
- return (value && typeof value == 'object' && toString.call(value) == errorClass) || false;
+ return (isObjectLike(value) && toString.call(value) == errorClass) || false;
}
/**
@@ -7392,7 +7514,7 @@
if (toString.call(value) == funcClass) {
return reNative.test(fnToString.call(value));
}
- return (typeof value == 'object' && reHostCtor.test(value)) || false;
+ return (isObjectLike(value) && reHostCtor.test(value)) || false;
}
/**
@@ -7438,8 +7560,7 @@
* // => false
*/
function isNumber(value) {
- var type = typeof value;
- return type == 'number' || (value && type == 'object' && toString.call(value) == numberClass) || false;
+ return typeof value == 'number' || (isObjectLike(value) && toString.call(value) == numberClass) || false;
}
/**
@@ -7502,7 +7623,7 @@
* // => false
*/
function isRegExp(value) {
- return (value && typeof value == 'object' && toString.call(value) == regexpClass) || false;
+ return (isObjectLike(value) && toString.call(value) == regexpClass) || false;
}
/**
@@ -7522,8 +7643,7 @@
* // => false
*/
function isString(value) {
- return typeof value == 'string' || (value && typeof value == 'object' &&
- toString.call(value) == stringClass) || false;
+ return typeof value == 'string' || (isObjectLike(value) && toString.call(value) == stringClass) || false;
}
/**
@@ -7623,7 +7743,7 @@
* object for all destination properties that resolve to `undefined`. Once a
* property is set, additional defaults of the same property are ignored.
*
- * **Note:** See the [documentation example of `_.partialRight`](http://lodash.com/docs#partialRight)
+ * **Note:** See the [documentation example of `_.partialRight`](https://lodash.com/docs#partialRight)
* for a deep version of this method.
*
* @static
@@ -8464,8 +8584,8 @@
* @returns {string} Returns the escaped string.
* @example
*
- * _.escapeRegExp('[lodash](http://lodash.com/)');
- * // => '\[lodash\]\(http://lodash\.com/\)'
+ * _.escapeRegExp('[lodash](https://lodash.com/)');
+ * // => '\[lodash\]\(https://lodash\.com/\)'
*/
function escapeRegExp(string) {
string = string == null ? '' : String(string);
@@ -8692,14 +8812,14 @@
* in "interpolate" delimiters, HTML-escape interpolated data properties in
* "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
* properties may be accessed as free variables in the template. If a setting
- * object is provided it overrides `_.templateSettings` for the template.
+ * object is provided it takes precedence over `_.templateSettings` values.
*
* **Note:** In the development build `_.template` utilizes sourceURLs for easier debugging.
* See the [HTML5 Rocks article on sourcemaps](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
* for more details.
*
* For more information on precompiling templates see
- * [Lo-Dash's custom builds documentation](http://lodash.com/custom-builds).
+ * [Lo-Dash's custom builds documentation](https://lodash.com/custom-builds).
*
* For more information on Chrome extension sandboxes see
* [Chrome's extensions documentation](http://developer.chrome.com/stable/extensions/sandboxingEval.html).
@@ -9508,9 +9628,9 @@
* @returns {Function} Returns the new function.
* @example
*
- * var fred = { 'user': 'fred', 'age': 40, 'active': true };
- * _.map(['age', 'active'], _.propertyOf(fred));
- * // => [40, true]
+ * var object = { 'user': 'fred', 'age': 40, 'active': true };
+ * _.map(['active', 'user'], _.propertyOf(object));
+ * // => [true, 'fred']
*
* var object = { 'a': 3, 'b': 1, 'c': 2 };
* _.sortBy(['a', 'b', 'c'], _.propertyOf(object));
@@ -9769,6 +9889,7 @@
// Add functions that return wrapped values when chaining.
lodash.after = after;
+ lodash.ary = ary;
lodash.assign = assign;
lodash.at = at;
lodash.before = before;
diff --git a/dist/lodash.min.js b/dist/lodash.min.js
index e81c9c29f..b4223d5fd 100644
--- a/dist/lodash.min.js
+++ b/dist/lodash.min.js
@@ -4,80 +4,81 @@
* Build: `lodash modern -o ./dist/lodash.js`
*/
;(function(){function n(n,t){for(var r=-1,e=n.length;++rt||!r||typeof n=="undefined"&&e)return 1;if(n=n&&9<=n&&13>=n||32==n||160==n||5760==n||6158==n||8192<=n&&(8202>=n||8232==n||8233==n||8239==n||8287==n||12288==n||65279==n)}function x(n,t){for(var r=-1,e=n.length,u=-1,o=[];++re&&(e=u)}return e}function Kt(n){for(var t=-1,r=n.length,e=Gu;++to(t,f)&&e.push(f);return e}function tr(n,t){var r=n?n.length:0;if(!qr(r))return cr(n,t);for(var e=-1,u=Xr(n);++ec))return false}else{var g=p&&bu.call(n,"__wrapped__"),h=h&&bu.call(t,"__wrapped__");if(g||h)return hr(g?n.value():n,h?t.value():t,r,e,u,o);if(!s)return false;if(!f&&!p){switch(l){case yt:case dt:return+n==+t;case bt:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case xt:case jt:return n==gu(t)}return false}if(g=c?pu:n.constructor,l=i?pu:t.constructor,f){if(g.prototype.name!=l.prototype.name)return false
-}else if(p=!c&&bu.call(n,"constructor"),h=!i&&bu.call(t,"constructor"),p!=h||!p&&g!=l&&"constructor"in n&&"constructor"in t&&!(typeof g=="function"&&g instanceof g&&typeof l=="function"&&l instanceof l))return false;if(g=f?["message","name"]:vo(n),l=f?g:vo(t),c&&g.push("length"),i&&l.push("length"),c=g.length,p=l.length,c!=p&&!e)return false}for(u||(u=[]),o||(o=[]),l=u.length;l--;)if(u[l]==n)return o[l]==t;if(u.push(n),o.push(t),i=true,a)for(;i&&++le(f,s)&&((t||i)&&f.push(s),l.push(c))}return l}function xr(n,t){for(var r=-1,e=t(n),u=e.length,o=iu(u);++rt||null==r)return r;if(3t?0:t)}function Qr(n,t,r){return(r?Mr(n,t,r):null==t)&&(t=1),t=n?n.length-(+t||0):0,ue(n,0,0>t?0:t)
-}function ne(n,t,r){var e=-1,u=n?n.length:0;for(t=$r(t,r,3);++er?Mu(e+r,0):r||0;else if(r)return r=oe(n,t),n=n[r],(t===t?t===n:n!==n)?r:-1;return a(n,t,r)}function ee(n){return Hr(n,1)}function ue(n,t,r){var e=-1,u=n?n.length:0,o=typeof r;if(r&&"number"!=o&&Mr(n,t,r)&&(t=0,r=u),t=null==t?0:+t||0,0>t&&(t=-t>u?0:u+t),r="undefined"==o||r>u?u:+r||0,0>r&&(r+=u),r&&r==u&&!t)return l(n);
-for(u=t>r?0:r-t,r=iu(u);++er?Mu(e+r,0):r||0:0,typeof n=="string"||!so(n)&&Me(n)?ri||r===Zu&&r===f)&&(i=r,f=n)}),f}function _e(n,t){return de(n,ou(t))}function be(n,t,r,e){return(so(n)?u:mr)(n,$r(t,e,4),r,3>arguments.length,tr)}function we(n,t,r,e){return(so(n)?o:mr)(n,$r(t,e,4),r,3>arguments.length,rr)}function xe(n){n=Jr(n);for(var t=-1,r=n.length,e=iu(r);++t=r||r>t?(f&&Eu(f),r=p,f=s=p=E,r&&(h=wo(),a=n.apply(c,i),s||f||(i=c=null))):s=Nu(e,r)}function u(){s&&Eu(s),f=s=p=E,(v||g!==t)&&(h=wo(),a=n.apply(c,i),s||f||(i=c=null))}function o(){if(i=arguments,l=wo(),c=this,p=v&&(s||!y),false===g)var r=y&&!s;else{f||y||(h=l);var o=g-(l-h),d=0>=o||o>g;d?(f&&(f=Eu(f)),h=l,a=n.apply(c,i)):f||(f=Nu(u,o))}return d&&s?s=Eu(s):s||t===g||(s=Nu(e,t)),r&&(d=true,a=n.apply(c,i)),!d||s||f||(i=c=null),a}var i,f,a,l,c,s,p,h=0,g=false,v=true;
-if(!$e(n))throw new vu(P);if(t=0>t?0:t,true===r)var y=true,v=false;else Be(r)&&(y=r.leading,g="maxWait"in r&&Mu(+r.maxWait||0,t),v="trailing"in r?r.trailing:v);return o.cancel=function(){s&&Eu(s),f&&Eu(f),f=s=p=E},o}function Ce(){var n=arguments,r=n.length-1;if(0>r)return function(){};if(!t(n,$e))throw new vu(P);return function(){for(var t=r,e=n[t].apply(this,arguments);t--;)e=n[t].call(this,e);return e}}function Se(n,t){function r(){var e=r.cache,u=t?t.apply(this,arguments):arguments[0];if(e.has(u))return e.get(u);
-var o=n.apply(this,arguments);return e.set(u,o),o}if(!$e(n)||t&&!$e(t))throw new vu(P);return r.cache=new Se.Cache,r}function Te(n){var t=ue(arguments,1),r=x(t,Te.placeholder);return Ur(n,W,null,t,r)}function Ne(n){var t=ue(arguments,1),r=x(t,Ne.placeholder);return Ur(n,F,null,t,r)}function We(n){return qr(n&&typeof n=="object"?n.length:E)&&xu.call(n)==gt||false}function Fe(n){return n&&typeof n=="object"&&1===n.nodeType&&-1t||null==n||!zu(t))return r;
-n=gu(n);do t%2&&(r+=n),t=Ou(t/2),n+=n;while(t);return r}function Ge(n,t,r){return(n=null==n?"":gu(n))?(r?Mr(n,t,r):null==t)?n.slice(j(n),A(n)+1):(t=gu(t),n.slice(p(n,t),h(n,t)+1)):n}function Je(n,t,r){return n=null!=n&&gu(n),r&&Mr(n,t,r)&&(t=null),n&&n.match(t||st)||[]}function Xe(n){try{return n()}catch(t){return Ue(t)?t:au(t)}}function He(n,t,r){return r&&Mr(n,t,r)&&(t=null),Xt(n,t)}function Qe(n){return function(){return n}}function nu(n){return n}function tu(n){var t=vo(n),r=t.length;if(1==r){var e=t[0],u=n[e];
-if(Pr(u))return function(n){return null!=n&&u===n[e]&&bu.call(n,e)}}for(var o=r,i=iu(r),f=iu(r);o--;){var u=n[t[o]],a=Pr(u);i[o]=a?u:Ht(u,true,Ir),f[o]=a}return function(n){if(o=r,null==n)return!o;for(;o--;)if(f[o]?i[o]!==n[t[o]]:!bu.call(n,t[o]))return false;for(o=r;o--;)if(f[o]?!bu.call(n,t[o]):!hr(i[o],n[t[o]],null,true))return false;return true}}function ru(n,t,r){var e=true,u=Be(t),o=null==r,i=o&&u&&vo(t),f=i&&pr(t,i);(i&&i.length&&!f.length||o&&!u)&&(o&&(r=t),f=false,t=n,n=this),f||(f=pr(t,vo(t))),false===r?e=false:Be(r)&&"chain"in r&&(e=r.chain),r=-1,u=$e(n);
-for(o=f.length;++r=L)return r}else n=0;return ro(r,e)}}(),io=Or(function(n,t,r){bu.call(n,r)?++n[r]:n[r]=1}),fo=Or(function(n,t,r){bu.call(n,r)?n[r].push(t):n[r]=[t]}),ao=Or(function(n,t,r){n[r]=t}),lo=Or(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),co=Ur(Ae,W,null,[2]),so=Lu||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&xu.call(n)==vt||false
-};to.dom||(Fe=function(n){return n&&typeof n=="object"&&1===n.nodeType&&!ho(n)||false});var po=Ku||function(n){return typeof n=="number"&&zu(n)};($e(/x/)||Fu&&!$e(Fu))&&($e=function(n){return xu.call(n)==_t});var ho=Ru?function(n){if(!n||xu.call(n)!=wt)return false;var t=n.valueOf,r=Le(t)&&(r=Ru(t))&&Ru(r);return r?n==r||Ru(n)==r:Zr(n)}:Zr,go=Rr(Gt),vo=Du?function(n){if(n)var t=n.constructor,r=n.length;return typeof t=="function"&&t.prototype===n||typeof r=="number"&&0--n?t.apply(this,arguments):void 0}},$t.assign=go,$t.at=function(n){return(!n||qr(n.length))&&(n=Jr(n)),Jt(n,ir(arguments,false,false,1))},$t.before=Ae,$t.bind=Ie,$t.bindAll=function(n){for(var t=n,r=1(s?qt(s,i):u(c,i))){for(t=r;--t;){var p=e[t];if(0>(p?qt(p,i):u(n[t],i)))continue n}s&&s.push(i),c.push(i)}return c},$t.invert=function(n,t,r){r&&Mr(n,t,r)&&(t=null),r=-1;for(var e=vo(n),u=e.length,o={};++rt?0:t)},$t.takeRight=function(n,t,r){return(r?Mr(n,t,r):null==t)&&(t=1),t=n?n.length-(+t||0):0,ue(n,0>t?0:t)
-},$t.takeRightWhile=function(n,t,r){var e=n?n.length:0;for(t=$r(t,r,3);e--&&t(n[e],e,n););return ue(n,e+1)},$t.takeWhile=function(n,t,r){var e=-1,u=n?n.length:0;for(t=$r(t,r,3);++en||!zu(n))return[];t=Xt(t,r,1),r=-1;for(var e=iu(qu(n,Ju));++rr?0:+r||0,e))-t.length,0<=r&&n.indexOf(t,r)==r},$t.escape=function(n){return(n=null==n?"":gu(n))&&(X.lastIndex=0,X.test(n))?n.replace(X,d):n},$t.escapeRegExp=Ye,$t.every=pe,$t.find=ge,$t.findIndex=ne,$t.findKey=function(n,t,r){return t=$r(t,r,3),or(n,t,cr,true)
-},$t.findLast=function(n,t,r){return t=$r(t,r,3),or(n,t,rr)},$t.findLastIndex=function(n,t,r){var e=n?n.length:0;for(t=$r(t,r,3);e--;)if(t(n[e],e,n))return e;return-1},$t.findLastKey=function(n,t,r){return t=$r(t,r,3),or(n,t,sr,true)},$t.findWhere=function(n,t){return ge(n,tu(t))},$t.first=te,$t.has=function(n,t){return n?bu.call(n,t):false},$t.identity=nu,$t.includes=se,$t.indexOf=re,$t.isArguments=We,$t.isArray=so,$t.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&xu.call(n)==yt||false
-},$t.isDate=function(n){return n&&typeof n=="object"&&xu.call(n)==dt||false},$t.isElement=Fe,$t.isEmpty=function(n){if(null==n)return true;var t=n.length;return qr(t)&&(so(n)||Me(n)||We(n)||typeof n=="object"&&$e(n.splice))?!t:!vo(n).length},$t.isEqual=function(n,t,r,e){return r=typeof r=="function"&&Xt(r,e,3),!r&&Pr(n)&&Pr(t)?n===t:hr(n,t,r)},$t.isError=Ue,$t.isFinite=po,$t.isFunction=$e,$t.isNaN=function(n){return ze(n)&&n!=+n},$t.isNative=Le,$t.isNull=function(n){return null===n},$t.isNumber=ze,$t.isObject=Be,$t.isPlainObject=ho,$t.isRegExp=De,$t.isString=Me,$t.isUndefined=function(n){return typeof n=="undefined"
-},$t.kebabCase=_o,$t.last=function(n){var t=n?n.length:0;return t?n[t-1]:E},$t.lastIndexOf=function(n,t,r){var e=n?n.length:0;if(!e)return-1;var u=e;if(typeof r=="number")u=(0>r?Mu(e+r,0):qu(r||0,e-1))+1;else if(r)return u=ie(n,t)-1,n=n[u],(t===t?t===n:n!==n)?u:-1;if(t!==t)return _(n,u,true);for(;u--;)if(n[u]===t)return u;return-1},$t.max=me,$t.min=function(n,t,r){r&&Mr(n,t,r)&&(t=null);var e=null==t,u=e&&so(n),o=!u&&Me(n);if(e&&!o)return Kt(u?n:Jr(n));var i=Gu,f=i;return t=e&&o?s:$r(t,r,3),tr(n,function(n,r,e){r=t(n,r,e),(rr?0:+r||0,n.length),n.lastIndexOf(t,r)==r},$t.template=function(n,t,r){var e=$t.templateSettings;r&&Mr(n,t,r)&&(t=r=null),n=gu(null==n?"":n),t=go({},r||t,e,Zt),r=go({},t.imports,e.imports,Zt);
-var u,o,i=vo(r),f=Ke(r),a=0;r=t.interpolate||ft;var l="__p+='";if(r=hu((t.escape||ft).source+"|"+r.source+"|"+(r===nt?tt:ft).source+"|"+(t.evaluate||ft).source+"|$","g"),n.replace(r,function(t,r,e,i,f,c){return e||(e=i),l+=n.slice(a,c).replace(ct,m),r&&(u=true,l+="'+__e("+r+")+'"),f&&(o=true,l+="';"+f+";\n__p+='"),e&&(l+="'+((__t=("+e+"))==null?'':__t)+'"),a=c+t.length,t}),l+="';",(t=t.variable)||(l="with(obj){"+l+"}"),l=(o?l.replace(Y,""):l).replace(Z,"$1").replace(G,"$1;"),l="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}",t=Xe(function(){return lu(i,"return "+l).apply(E,f)
-}),t.source=l,Ue(t))throw t;return t},$t.trim=Ge,$t.trimLeft=function(n,t,r){return(n=null==n?"":gu(n))?(r?Mr(n,t,r):null==t)?n.slice(j(n)):(t=gu(t),n.slice(p(n,t))):n},$t.trimRight=function(n,t,r){return(n=null==n?"":gu(n))?(r?Mr(n,t,r):null==t)?n.slice(0,A(n)+1):(t=gu(t),n.slice(0,h(n,t)+1)):n},$t.trunc=function(n,t,r){r&&Mr(n,t,r)&&(t=null);var e=$;if(r=B,Be(t)){var u="separator"in t?t.separator:u,e="length"in t?+t.length||0:e;r="omission"in t?gu(t.omission):r}else null!=t&&(e=+t||0);if(n=null==n?"":gu(n),e>=n.length)return n;
-if(e-=r.length,1>e)return r;if(t=n.slice(0,e),null==u)return t+r;if(De(u)){if(n.slice(e).search(u)){var o,i=n.slice(0,e);for(u.global||(u=hu(u.source,(rt.exec(u)||"")+"g")),u.lastIndex=0;n=u.exec(i);)o=n.index;t=t.slice(0,null==o?e:o)}}else n.indexOf(u,e)!=e&&(u=t.lastIndexOf(u),-1t?0:+t||0,n.length),n)},$t.prototype.sample=function(n){return this.__chain__||null!=n?this.thru(function(t){return $t.sample(t,n)}):$t.sample(this.value())},$t.VERSION=O,n("bind bindKey curry curryRight partial partialRight".split(" "),function(n){$t[n].placeholder=$t}),n(["filter","map","takeWhile"],function(n,t){var r=t==D;
-Lt.prototype[n]=function(n,e){n=$r(n,e,3);var u=this.clone(),o=u.filtered,i=u.iteratees||(u.iteratees=[]);return u.filtered=o||r||t==q&&0>u.dir,i.push({iteratee:n,type:t}),u}}),n(["drop","take"],function(n,t){var r=n+"Count",e=n+"While";Lt.prototype[n]=function(e){e=null==e?1:Mu(+e||0,0);var u=this.clone();if(u.filtered){var o=u[r];u[r]=t?qu(o,e):o+e}else(u.views||(u.views=[])).push({size:e,type:n+(0>u.dir?"Right":"")});return u},Lt.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()
-},Lt.prototype[n+"RightWhile"]=function(n,t){return this.reverse()[e](n,t).reverse()}}),n(["first","last"],function(n,t){var r="take"+(t?"Right":"");Lt.prototype[n]=function(){return this[r](1).value()[0]}}),n(["initial","rest"],function(n,t){var r="drop"+(t?"":"Right");Lt.prototype[n]=function(){return this[r](1)}}),n(["pluck","where"],function(n,t){var r=t?"filter":"map",e=t?tu:ou;Lt.prototype[n]=function(n){return this[r](e(n))}}),Lt.prototype.dropWhile=function(n,t){n=$r(n,t,3);var r,e,u=0>this.dir;
-return this.filter(function(t,o,i){return r=r&&(u?oe),e=o,r||(r=!n(t,o,i))})},Lt.prototype.reject=function(n,t){return n=$r(n,t,3),this.filter(function(t,r,e){return!n(t,r,e)})},Lt.prototype.slice=function(n,t){n=null==n?0:+n||0;var r=0>n?this.takeRight(-n):this.drop(n);return typeof t!="undefined"&&(t=+t||0,r=0>t?r.dropRight(-t):r.take(t-n)),r},cr(Lt.prototype,function(n,t){var r=/^(?:first|last)$/.test(t);$t.prototype[t]=function(){function e(n){return n=[n],Cu.apply(n,o),$t[t].apply($t,n)}var u=this.__wrapped__,o=arguments,i=this.__chain__,f=!!this.__actions__.length,a=u instanceof Lt,l=a&&!f;
-return r&&!i?l?n.call(u):$t[t](this.value()):a||so(u)?(u=n.apply(l?u:new Lt(this),o),r||!f&&!u.actions||(u.actions||(u.actions=[])).push({args:[e],object:$t,name:"thru"}),new Bt(u,i)):this.thru(e)}}),n("concat join pop push shift sort splice unshift".split(" "),function(n){var t=yu[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:join|pop|shift)$/.test(n);$t.prototype[n]=function(){var n=arguments;return e&&!this.__chain__?t.apply(this.value(),n):this[r](function(r){return t.apply(r,n)})
-}}),Lt.prototype.clone=function(){var n=this.actions,t=this.iteratees,r=this.views,e=new Lt(this.wrapped);return e.actions=n?l(n):null,e.dir=this.dir,e.dropCount=this.dropCount,e.filtered=this.filtered,e.iteratees=t?l(t):null,e.takeCount=this.takeCount,e.views=r?l(r):null,e},Lt.prototype.reverse=function(){var n=this.filtered,t=n?new Lt(this):this.clone();return t.dir=-1*this.dir,t.filtered=n,t},Lt.prototype.value=function(){var n=this.wrapped.value();if(!so(n))return jr(n,this.actions);var t,r=this.dir,e=0>r,u=n.length;
-t=u;for(var o=this.views,i=0,f=-1,a=o?o.length:0;++f"'`]/g,H=/<%-([\s\S]+?)%>/g,Q=/<%([\s\S]+?)%>/g,nt=/<%=([\s\S]+?)%>/g,tt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,rt=/\w*$/,et=/^\s*function[ \n\r\t]+\w/,ut=/^0[xX]/,ot=/^\[object .+?Constructor\]$/,it=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,ft=/($^)/,at=/[.*+?^${}()|[\]\/\\]/g,lt=/\bthis\b/,ct=/['\n\r\u2028\u2029\\]/g,st=RegExp("[A-Z\\xc0-\\xd6\\xd8-\\xde]{2,}(?=[A-Z\\xc0-\\xd6\\xd8-\\xde][a-z\\xdf-\\xf6\\xf8-\\xff]+)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+|[A-Z\\xc0-\\xd6\\xd8-\\xde]+|[0-9]+","g"),pt=" \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",ht="Array ArrayBuffer Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Math Number Object RegExp Set String _ clearTimeout document isFinite parseInt setTimeout TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap window WinRTError".split(" "),gt="[object Arguments]",vt="[object Array]",yt="[object Boolean]",dt="[object Date]",mt="[object Error]",_t="[object Function]",bt="[object Number]",wt="[object Object]",xt="[object RegExp]",jt="[object String]",At="[object ArrayBuffer]",It="[object Float32Array]",kt="[object Float64Array]",Et="[object Int8Array]",Ot="[object Int16Array]",Rt="[object Int32Array]",Ct="[object Uint8Array]",St="[object Uint8ClampedArray]",Tt="[object Uint16Array]",Nt="[object Uint32Array]",Wt={};
-Wt[gt]=Wt[vt]=Wt[It]=Wt[kt]=Wt[Et]=Wt[Ot]=Wt[Rt]=Wt[Ct]=Wt[St]=Wt[Tt]=Wt[Nt]=true,Wt[At]=Wt[yt]=Wt[dt]=Wt[mt]=Wt[_t]=Wt["[object Map]"]=Wt[bt]=Wt[wt]=Wt[xt]=Wt["[object Set]"]=Wt[jt]=Wt["[object WeakMap]"]=false;var Ft={};Ft[gt]=Ft[vt]=Ft[At]=Ft[yt]=Ft[dt]=Ft[It]=Ft[kt]=Ft[Et]=Ft[Ot]=Ft[Rt]=Ft[bt]=Ft[wt]=Ft[xt]=Ft[jt]=Ft[Ct]=Ft[St]=Ft[Tt]=Ft[Nt]=true,Ft[mt]=Ft[_t]=Ft["[object Map]"]=Ft["[object Set]"]=Ft["[object WeakMap]"]=false;var Ut={leading:false,maxWait:0,trailing:false},$t={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"},Bt={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Lt={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},zt={"function":true,object:true},Dt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Mt=zt[typeof window]&&window!==(this&&this.window)?window:this,qt=zt[typeof exports]&&exports&&!exports.nodeType&&exports,Pt=zt[typeof module]&&module&&!module.nodeType&&module,Kt=qt&&Pt&&typeof global=="object"&&global;
-!Kt||Kt.global!==Kt&&Kt.window!==Kt&&Kt.self!==Kt||(Mt=Kt);var Vt=Pt&&Pt.exports===qt&&qt,Yt=k();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Mt._=Yt, define(function(){return Yt})):qt&&Pt?Vt?(Pt.exports=Yt)._=Yt:qt._=Yt:Mt._=Yt}).call(this);
\ No newline at end of file
+return r}function i(n,t){for(var r=-1,e=n.length;++rt||!r||typeof n=="undefined"&&e)return 1;if(n=n&&9<=n&&13>=n||32==n||160==n||5760==n||6158==n||8192<=n&&(8202>=n||8232==n||8233==n||8239==n||8287==n||12288==n||65279==n)}function A(n,t){for(var r=-1,e=n.length,u=-1,o=[];++re&&(e=u)}return e}function Yt(n){for(var t=-1,r=n.length,e=Xu;++to(t,a)&&e.push(a);return e}function er(n,t){var r=n?n.length:0;if(!Kr(r))return pr(n,t);for(var e=-1,u=Qr(n);++ec))return false}else{var g=p&&xu.call(n,"__wrapped__"),h=h&&xu.call(t,"__wrapped__");if(g||h)return vr(g?n.value():n,h?t.value():t,r,e,u,o);if(!s)return false;if(!a&&!p){switch(l){case mt:case _t:return+n==+t;case xt:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case jt:case It:return n==du(t)}return false}if(g=c?gu:n.constructor,l=i?gu:t.constructor,a){if(g.prototype.name!=l.prototype.name)return false
+}else if(p=!c&&xu.call(n,"constructor"),h=!i&&xu.call(t,"constructor"),p!=h||!p&&g!=l&&"constructor"in n&&"constructor"in t&&!(typeof g=="function"&&g instanceof g&&typeof l=="function"&&l instanceof l))return false;if(g=a?["message","name"]:mo(n),l=a?g:mo(t),c&&g.push("length"),i&&l.push("length"),c=g.length,p=l.length,c!=p&&!e)return false}for(u||(u=[]),o||(o=[]),l=u.length;l--;)if(u[l]==n)return o[l]==t;if(u.push(n),o.push(t),i=true,f)for(;i&&++le(a,s)&&((t||i)&&a.push(s),l.push(c))}return l}function jr(n,t){for(var r=-1,e=t(n),u=e.length,o=fu(u);++rt||null==r)return r;if(3=i&&r<=a&&(e<$||(p||s)&&o[0].length<=g),(!(e>=$&&t>u||e>u&&t>=$)||o)&&(t&C&&(n[2]=h[2],r|=e&C?0:T),(e=h[3])&&(u=n[3],n[3]=u?Or(u,e,h[4]):l(e),n[4]=u?A(n[3],Y):l(h[4])),(e=h[5])&&(u=n[5],n[5]=u?Rr(u,e,h[6]):l(e),n[6]=u?A(n[5],Y):l(h[6])),(e=h[7])&&(o=n[7],e=n[7]=l(e),o&&Tu.apply(e,o)),null==n[8]&&(n[8]=h[8]),t&$&&(n[9]=null==n[9]?h[9]:Ku(n[9],h[9])),n[0]=h[0],n[1]=r)
+}return n[8]=null==n[8]?f?0:n[0].length:Pu(n[8]-c,0)||0,t=n[1],(h?uo:ao)(t==C?Tr(n[0],n[2]):t!=F&&t!=(C|F)||n[4].length?Fr.apply(null,n):$r.apply(null,n),n)}function Lr(n,t,r){var e=Lt.callback||nu,e=e===nu?Qt:e;return r?e(n,t,r):e}function zr(n,t,r){var e=Lt.indexOf||ue,e=e===ue?f:e;return n?e(n,t,r):e}function Dr(n,t){var r=-1,e=n.length,u=new n.constructor(e);if(!t)for(;++rt?0:t)}function te(n,t,r){return(r?Pr(n,t,r):null==t)&&(t=1),t=n?n.length-(+t||0):0,ie(n,0,0>t?0:t)}function re(n,t,r){var e=-1,u=n?n.length:0;for(t=Lr(t,r,3);++er?Pu(e+r,0):r||0;else if(r)return r=ae(n,t),n=n[r],(t===t?t===n:n!==n)?r:-1;return f(n,t,r)}function oe(n){return ne(n,1)}function ie(n,t,r){var e=-1,u=n?n.length:0,o=typeof r;
+if(r&&"number"!=o&&Pr(n,t,r)&&(t=0,r=u),t=null==t?0:+t||0,0>t&&(t=-t>u?0:u+t),r="undefined"==o||r>u?u:+r||0,0>r&&(r+=u),r&&r==u&&!t)return l(n);for(u=t>r?0:r-t,r=fu(u);++er?Pu(e+r,0):r||0:0,typeof n=="string"||!ho(n)&&Pe(n)?ri||r===Ju&&r===a)&&(i=r,a=n)}),a}function we(n,t){return _e(n,au(t))}function xe(n,t,r,e){return(ho(n)?u:br)(n,Lr(t,e,4),r,3>arguments.length,er)}function Ae(n,t,r,e){return(ho(n)?o:br)(n,Lr(t,e,4),r,3>arguments.length,ur)}function je(n){n=Hr(n);for(var t=-1,r=n.length,e=fu(r);++t=r||r>t?(a&&Ru(a),r=p,a=s=p=O,r&&(h=Ao(),f=n.apply(c,i),s||a||(i=c=null))):s=Fu(e,r)}function u(){s&&Ru(s),a=s=p=O,(v||g!==t)&&(h=Ao(),f=n.apply(c,i),s||a||(i=c=null))}function o(){if(i=arguments,l=Ao(),c=this,p=v&&(s||!d),false===g)var r=d&&!s;else{a||d||(h=l);var o=g-(l-h),y=0>=o||o>g;y?(a&&(a=Ru(a)),h=l,f=n.apply(c,i)):a||(a=Fu(u,o))
+}return y&&s?s=Ru(s):s||t===g||(s=Fu(e,t)),r&&(y=true,f=n.apply(c,i)),!y||s||a||(i=c=null),f}var i,a,f,l,c,s,p,h=0,g=false,v=true;if(!Le(n))throw new yu(V);if(t=0>t?0:t,true===r)var d=true,v=false;else ze(r)&&(d=r.leading,g="maxWait"in r&&Pu(+r.maxWait||0,t),v="trailing"in r?r.trailing:v);return o.cancel=function(){s&&Ru(s),a&&Ru(a),a=s=p=O},o}function Te(){var n=arguments,r=n.length-1;if(0>r)return function(){};if(!t(n,Le))throw new yu(V);return function(){for(var t=r,e=n[t].apply(this,arguments);t--;)e=n[t].call(this,e);
+return e}}function We(n,t){function r(){var e=r.cache,u=t?t.apply(this,arguments):arguments[0];if(e.has(u))return e.get(u);var o=n.apply(this,arguments);return e.set(u,o),o}if(!Le(n)||t&&!Le(t))throw new yu(V);return r.cache=new We.Cache,r}function Ne(n){var t=ie(arguments,1),r=A(t,Ne.placeholder);return Br(n,F,null,t,r)}function Fe(n){var t=ie(arguments,1),r=A(t,Fe.placeholder);return Br(n,U,null,t,r)}function Ue(n){return Kr(w(n)?n.length:O)&&ju.call(n)==dt||false}function $e(n){return n&&1===n.nodeType&&w(n)&&-1t||null==n||!Mu(t))return r;
+n=du(n);do t%2&&(r+=n),t=Cu(t/2),n+=n;while(t);return r}function Xe(n,t,r){return(n=null==n?"":du(n))?(r?Pr(n,t,r):null==t)?n.slice(j(n),I(n)+1):(t=du(t),n.slice(p(n,t),h(n,t)+1)):n}function He(n,t,r){return n=null!=n&&du(n),r&&Pr(n,t,r)&&(t=null),n&&n.match(t||ht)||[]}function Qe(n){try{return n()}catch(t){return Be(t)?t:cu(t)}}function nu(n,t,r){return r&&Pr(n,t,r)&&(t=null),Qt(n,t)}function tu(n){return function(){return n}}function ru(n){return n}function eu(n){var t=mo(n),r=t.length;if(1==r){var e=t[0],u=n[e];
+if(Vr(u))return function(n){return null!=n&&u===n[e]&&xu.call(n,e)}}for(var o=r,i=fu(r),a=fu(r);o--;){var u=n[t[o]],f=Vr(u);i[o]=f?u:nr(u,true,Er),a[o]=f}return function(n){if(o=r,null==n)return!o;for(;o--;)if(a[o]?i[o]!==n[t[o]]:!xu.call(n,t[o]))return false;for(o=r;o--;)if(a[o]?!xu.call(n,t[o]):!vr(i[o],n[t[o]],null,true))return false;return true}}function uu(n,t,r){var e=true,u=ze(t),o=null==r,i=o&&u&&mo(t),a=i&&gr(t,i);(i&&i.length&&!a.length||o&&!u)&&(o&&(r=t),a=false,t=n,n=this),a||(a=gr(t,mo(t))),false===r?e=false:ze(r)&&"chain"in r&&(e=r.chain),r=-1,u=Le(n);
+for(o=a.length;++r=D)return r}else n=0;return uo(r,e)}}(),fo=Cr(function(n,t,r){xu.call(n,r)?++n[r]:n[r]=1}),lo=Cr(function(n,t,r){xu.call(n,r)?n[r].push(t):n[r]=[t]}),co=Cr(function(n,t,r){n[r]=t}),so=Cr(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),po=Br(ke,F,null,[2]),ho=Du||function(n){return w(n)&&Kr(n.length)&&ju.call(n)==yt||false
+};eo.dom||($e=function(n){return n&&1===n.nodeType&&w(n)&&!vo(n)||false});var go=Yu||function(n){return typeof n=="number"&&Mu(n)};(Le(/x/)||$u&&!Le($u))&&(Le=function(n){return ju.call(n)==wt});var vo=Su?function(n){if(!n||ju.call(n)!=At)return false;var t=n.valueOf,r=De(t)&&(r=Su(t))&&Su(r);return r?n==r||Su(n)==r:Jr(n)}:Jr,yo=Sr(Xt),mo=qu?function(n){if(n)var t=n.constructor,r=n.length;return typeof t=="function"&&t.prototype===n||typeof r=="number"&&0--n?t.apply(this,arguments):void 0}},Lt.ary=function(n,t,r){return r&&Pr(n,t,r)&&(t=null),t=null==t?n.length:+t||0,Br(n,$,null,null,null,null,null,t)},Lt.assign=yo,Lt.at=function(n){return(!n||Kr(n.length))&&(n=Hr(n)),Ht(n,fr(arguments,false,false,1))
+},Lt.before=ke,Lt.bind=Ee,Lt.bindAll=function(n){for(var t=n,r=1(s?Kt(s,i):u(c,i))){for(t=r;--t;){var p=e[t];if(0>(p?Kt(p,i):u(n[t],i)))continue n}s&&s.push(i),c.push(i)}return c},Lt.invert=function(n,t,r){r&&Pr(n,t,r)&&(t=null),r=-1;
+for(var e=mo(n),u=e.length,o={};++rt?0:t)},Lt.takeRight=function(n,t,r){return(r?Pr(n,t,r):null==t)&&(t=1),t=n?n.length-(+t||0):0,ie(n,0>t?0:t)},Lt.takeRightWhile=function(n,t,r){var e=n?n.length:0;for(t=Lr(t,r,3);e--&&t(n[e],e,n););return ie(n,e+1)},Lt.takeWhile=function(n,t,r){var e=-1,u=n?n.length:0;
+for(t=Lr(t,r,3);++en||!Mu(n))return[];t=Qt(t,r,1),r=-1;for(var e=fu(Ku(n,Hu));++rr?0:+r||0,e))-t.length,0<=r&&n.indexOf(t,r)==r},Lt.escape=function(n){return(n=null==n?"":du(n))&&(Q.lastIndex=0,Q.test(n))?n.replace(Q,y):n},Lt.escapeRegExp=Ge,Lt.every=ge,Lt.find=de,Lt.findIndex=re,Lt.findKey=function(n,t,r){return t=Lr(t,r,3),ar(n,t,pr,true)
+},Lt.findLast=function(n,t,r){return t=Lr(t,r,3),ar(n,t,ur)},Lt.findLastIndex=function(n,t,r){var e=n?n.length:0;for(t=Lr(t,r,3);e--;)if(t(n[e],e,n))return e;return-1},Lt.findLastKey=function(n,t,r){return t=Lr(t,r,3),ar(n,t,hr,true)},Lt.findWhere=function(n,t){return de(n,eu(t))},Lt.first=ee,Lt.has=function(n,t){return n?xu.call(n,t):false},Lt.identity=ru,Lt.includes=he,Lt.indexOf=ue,Lt.isArguments=Ue,Lt.isArray=ho,Lt.isBoolean=function(n){return true===n||false===n||w(n)&&ju.call(n)==mt||false},Lt.isDate=function(n){return w(n)&&ju.call(n)==_t||false
+},Lt.isElement=$e,Lt.isEmpty=function(n){if(null==n)return true;var t=n.length;return Kr(t)&&(ho(n)||Pe(n)||Ue(n)||w(n)&&Le(n.splice))?!t:!mo(n).length},Lt.isEqual=function(n,t,r,e){return r=typeof r=="function"&&Qt(r,e,3),!r&&Vr(n)&&Vr(t)?n===t:vr(n,t,r)},Lt.isError=Be,Lt.isFinite=go,Lt.isFunction=Le,Lt.isNaN=function(n){return Me(n)&&n!=+n},Lt.isNative=De,Lt.isNull=function(n){return null===n},Lt.isNumber=Me,Lt.isObject=ze,Lt.isPlainObject=vo,Lt.isRegExp=qe,Lt.isString=Pe,Lt.isUndefined=function(n){return typeof n=="undefined"
+},Lt.kebabCase=wo,Lt.last=function(n){var t=n?n.length:0;return t?n[t-1]:O},Lt.lastIndexOf=function(n,t,r){var e=n?n.length:0;if(!e)return-1;var u=e;if(typeof r=="number")u=(0>r?Pu(e+r,0):Ku(r||0,e-1))+1;else if(r)return u=fe(n,t)-1,n=n[u],(t===t?t===n:n!==n)?u:-1;if(t!==t)return _(n,u,true);for(;u--;)if(n[u]===t)return u;return-1},Lt.max=be,Lt.min=function(n,t,r){r&&Pr(n,t,r)&&(t=null);var e=null==t,u=e&&ho(n),o=!u&&Pe(n);if(e&&!o)return Yt(u?n:Hr(n));var i=Xu,a=i;return t=e&&o?s:Lr(t,r,3),er(n,function(n,r,e){r=t(n,r,e),(rr?0:+r||0,n.length),n.lastIndexOf(t,r)==r},Lt.template=function(n,t,r){var e=Lt.templateSettings;r&&Pr(n,t,r)&&(t=r=null),n=du(null==n?"":n),t=yo({},r||t,e,Jt),r=yo({},t.imports,e.imports,Jt);
+var u,o,i=mo(r),a=Ye(r),f=0;r=t.interpolate||lt;var l="__p+='";if(r=vu((t.escape||lt).source+"|"+r.source+"|"+(r===rt?et:lt).source+"|"+(t.evaluate||lt).source+"|$","g"),n.replace(r,function(t,r,e,i,a,c){return e||(e=i),l+=n.slice(f,c).replace(pt,m),r&&(u=true,l+="'+__e("+r+")+'"),a&&(o=true,l+="';"+a+";\n__p+='"),e&&(l+="'+((__t=("+e+"))==null?'':__t)+'"),f=c+t.length,t}),l+="';",(t=t.variable)||(l="with(obj){"+l+"}"),l=(o?l.replace(G,""):l).replace(J,"$1").replace(X,"$1;"),l="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}",t=Qe(function(){return su(i,"return "+l).apply(O,a)
+}),t.source=l,Be(t))throw t;return t},Lt.trim=Xe,Lt.trimLeft=function(n,t,r){return(n=null==n?"":du(n))?(r?Pr(n,t,r):null==t)?n.slice(j(n)):(t=du(t),n.slice(p(n,t))):n},Lt.trimRight=function(n,t,r){return(n=null==n?"":du(n))?(r?Pr(n,t,r):null==t)?n.slice(0,I(n)+1):(t=du(t),n.slice(0,h(n,t)+1)):n},Lt.trunc=function(n,t,r){r&&Pr(n,t,r)&&(t=null);var e=L;if(r=z,ze(t)){var u="separator"in t?t.separator:u,e="length"in t?+t.length||0:e;r="omission"in t?du(t.omission):r}else null!=t&&(e=+t||0);if(n=null==n?"":du(n),e>=n.length)return n;
+if(e-=r.length,1>e)return r;if(t=n.slice(0,e),null==u)return t+r;if(qe(u)){if(n.slice(e).search(u)){var o,i=n.slice(0,e);for(u.global||(u=vu(u.source,(ut.exec(u)||"")+"g")),u.lastIndex=0;n=u.exec(i);)o=n.index;t=t.slice(0,null==o?e:o)}}else n.indexOf(u,e)!=e&&(u=t.lastIndexOf(u),-1t?0:+t||0,n.length),n)},Lt.prototype.sample=function(n){return this.__chain__||null!=n?this.thru(function(t){return Lt.sample(t,n)}):Lt.sample(this.value())},Lt.VERSION=R,n("bind bindKey curry curryRight partial partialRight".split(" "),function(n){Lt[n].placeholder=Lt}),n(["filter","map","takeWhile"],function(n,t){var r=t==q;
+Dt.prototype[n]=function(n,e){n=Lr(n,e,3);var u=this.clone(),o=u.filtered,i=u.iteratees||(u.iteratees=[]);return u.filtered=o||r||t==K&&0>u.dir,i.push({iteratee:n,type:t}),u}}),n(["drop","take"],function(n,t){var r=n+"Count",e=n+"While";Dt.prototype[n]=function(e){e=null==e?1:Pu(+e||0,0);var u=this.clone();if(u.filtered){var o=u[r];u[r]=t?Ku(o,e):o+e}else(u.views||(u.views=[])).push({size:e,type:n+(0>u.dir?"Right":"")});return u},Dt.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()
+},Dt.prototype[n+"RightWhile"]=function(n,t){return this.reverse()[e](n,t).reverse()}}),n(["first","last"],function(n,t){var r="take"+(t?"Right":"");Dt.prototype[n]=function(){return this[r](1).value()[0]}}),n(["initial","rest"],function(n,t){var r="drop"+(t?"":"Right");Dt.prototype[n]=function(){return this[r](1)}}),n(["pluck","where"],function(n,t){var r=t?"filter":"map",e=t?eu:au;Dt.prototype[n]=function(n){return this[r](e(n))}}),Dt.prototype.dropWhile=function(n,t){n=Lr(n,t,3);var r,e,u=0>this.dir;
+return this.filter(function(t,o,i){return r=r&&(u?oe),e=o,r||(r=!n(t,o,i))})},Dt.prototype.reject=function(n,t){return n=Lr(n,t,3),this.filter(function(t,r,e){return!n(t,r,e)})},Dt.prototype.slice=function(n,t){n=null==n?0:+n||0;var r=0>n?this.takeRight(-n):this.drop(n);return typeof t!="undefined"&&(t=+t||0,r=0>t?r.dropRight(-t):r.take(t-n)),r},pr(Dt.prototype,function(n,t){var r=/^(?:first|last)$/.test(t);Lt.prototype[t]=function(){function e(n){return n=[n],Tu.apply(n,o),Lt[t].apply(Lt,n)}var u=this.__wrapped__,o=arguments,i=this.__chain__,a=!!this.__actions__.length,f=u instanceof Dt,l=f&&!a;
+return r&&!i?l?n.call(u):Lt[t](this.value()):f||ho(u)?(u=n.apply(l?u:new Dt(this),o),r||!a&&!u.actions||(u.actions||(u.actions=[])).push({args:[e],object:Lt,name:"thru"}),new zt(u,i)):this.thru(e)}}),n("concat join pop push shift sort splice unshift".split(" "),function(n){var t=mu[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:join|pop|shift)$/.test(n);Lt.prototype[n]=function(){var n=arguments;return e&&!this.__chain__?t.apply(this.value(),n):this[r](function(r){return t.apply(r,n)})
+}}),Dt.prototype.clone=function(){var n=this.actions,t=this.iteratees,r=this.views,e=new Dt(this.wrapped);return e.actions=n?l(n):null,e.dir=this.dir,e.dropCount=this.dropCount,e.filtered=this.filtered,e.iteratees=t?l(t):null,e.takeCount=this.takeCount,e.views=r?l(r):null,e},Dt.prototype.reverse=function(){var n=this.filtered,t=n?new Dt(this):this.clone();return t.dir=-1*this.dir,t.filtered=n,t},Dt.prototype.value=function(){var n=this.wrapped.value();if(!ho(n))return Ir(n,this.actions);var t,r=this.dir,e=0>r,u=n.length;
+t=u;for(var o=this.views,i=0,a=-1,f=o?o.length:0;++a"'`]/g,nt=/<%-([\s\S]+?)%>/g,tt=/<%([\s\S]+?)%>/g,rt=/<%=([\s\S]+?)%>/g,et=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ut=/\w*$/,ot=/^\s*function[ \n\r\t]+\w/,it=/^0[xX]/,at=/^\[object .+?Constructor\]$/,ft=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,lt=/($^)/,ct=/[.*+?^${}()|[\]\/\\]/g,st=/\bthis\b/,pt=/['\n\r\u2028\u2029\\]/g,ht=RegExp("[A-Z\\xc0-\\xd6\\xd8-\\xde]{2,}(?=[A-Z\\xc0-\\xd6\\xd8-\\xde][a-z\\xdf-\\xf6\\xf8-\\xff]+)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+|[A-Z\\xc0-\\xd6\\xd8-\\xde]+|[0-9]+","g"),gt=" \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",vt="Array ArrayBuffer Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Math Number Object RegExp Set String _ clearTimeout document isFinite parseInt setTimeout TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap window WinRTError".split(" "),dt="[object Arguments]",yt="[object Array]",mt="[object Boolean]",_t="[object Date]",bt="[object Error]",wt="[object Function]",xt="[object Number]",At="[object Object]",jt="[object RegExp]",It="[object String]",kt="[object ArrayBuffer]",Et="[object Float32Array]",Ot="[object Float64Array]",Rt="[object Int8Array]",Ct="[object Int16Array]",St="[object Int32Array]",Tt="[object Uint8Array]",Wt="[object Uint8ClampedArray]",Nt="[object Uint16Array]",Ft="[object Uint32Array]",Ut={};
+Ut[dt]=Ut[yt]=Ut[Et]=Ut[Ot]=Ut[Rt]=Ut[Ct]=Ut[St]=Ut[Tt]=Ut[Wt]=Ut[Nt]=Ut[Ft]=true,Ut[kt]=Ut[mt]=Ut[_t]=Ut[bt]=Ut[wt]=Ut["[object Map]"]=Ut[xt]=Ut[At]=Ut[jt]=Ut["[object Set]"]=Ut[It]=Ut["[object WeakMap]"]=false;var $t={};$t[dt]=$t[yt]=$t[kt]=$t[mt]=$t[_t]=$t[Et]=$t[Ot]=$t[Rt]=$t[Ct]=$t[St]=$t[xt]=$t[At]=$t[jt]=$t[It]=$t[Tt]=$t[Wt]=$t[Nt]=$t[Ft]=true,$t[bt]=$t[wt]=$t["[object Map]"]=$t["[object Set]"]=$t["[object WeakMap]"]=false;var Bt={leading:false,maxWait:0,trailing:false},Lt={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"},zt={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Dt={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Mt={"function":true,object:true},qt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Pt=Mt[typeof window]&&window!==(this&&this.window)?window:this,Kt=Mt[typeof exports]&&exports&&!exports.nodeType&&exports,Vt=Mt[typeof module]&&module&&!module.nodeType&&module,Yt=Kt&&Vt&&typeof global=="object"&&global;
+!Yt||Yt.global!==Yt&&Yt.window!==Yt&&Yt.self!==Yt||(Pt=Yt);var Zt=Vt&&Vt.exports===Kt&&Kt,Gt=E();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Pt._=Gt, define(function(){return Gt})):Kt&&Vt?Zt?(Vt.exports=Gt)._=Gt:Kt._=Gt:Pt._=Gt}).call(this);
\ No newline at end of file