Consistently coerce keys to strings before passing them to hasOwnProperty and init Array lengths when possible.

Former-commit-id: 5bd397eafbae888c7e6c76e62a7021b85796e65a
This commit is contained in:
John-David Dalton
2012-12-25 23:12:19 -06:00
parent e3b80a5e09
commit f4120a9c8c
5 changed files with 152 additions and 142 deletions

View File

@@ -187,7 +187,7 @@
<!-- div -->
### <a id="_compactarray"></a>`_.compact(array)`
<a href="#_compactarray">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2767 "View in source") [&#x24C9;][1]
<a href="#_compactarray">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2772 "View in source") [&#x24C9;][1]
Creates an array with all falsey values of `array` removed. The values `false`, `null`, `0`, `""`, `undefined` and `NaN` are all falsey.
@@ -211,7 +211,7 @@ _.compact([0, 1, false, 2, '', 3]);
<!-- div -->
### <a id="_differencearray--array1-array2-"></a>`_.difference(array [, array1, array2, ...])`
<a href="#_differencearray--array1-array2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2797 "View in source") [&#x24C9;][1]
<a href="#_differencearray--array1-array2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2802 "View in source") [&#x24C9;][1]
Creates an array of `array` elements not present in the other arrays using strict equality for comparisons, i.e. `===`.
@@ -236,7 +236,7 @@ _.difference([1, 2, 3, 4, 5], [5, 2, 10]);
<!-- div -->
### <a id="_firstarray--n"></a>`_.first(array [, n])`
<a href="#_firstarray--n">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2832 "View in source") [&#x24C9;][1]
<a href="#_firstarray--n">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2837 "View in source") [&#x24C9;][1]
Gets the first element of the `array`. Pass `n` to return the first `n` elements of the `array`.
@@ -264,7 +264,7 @@ _.first([5, 4, 3, 2, 1]);
<!-- div -->
### <a id="_flattenarray-shallow"></a>`_.flatten(array, shallow)`
<a href="#_flattenarray-shallow">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2859 "View in source") [&#x24C9;][1]
<a href="#_flattenarray-shallow">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2864 "View in source") [&#x24C9;][1]
Flattens a nested array *(the nesting can be to any depth)*. If `shallow` is truthy, `array` will only be flattened a single level.
@@ -292,7 +292,7 @@ _.flatten([1, [2], [3, [[4]]]], true);
<!-- div -->
### <a id="_indexofarray-value--fromindex0"></a>`_.indexOf(array, value [, fromIndex=0])`
<a href="#_indexofarray-value--fromindex0">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2901 "View in source") [&#x24C9;][1]
<a href="#_indexofarray-value--fromindex0">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2906 "View in source") [&#x24C9;][1]
Gets the index at which the first occurrence of `value` is found using strict equality for comparisons, i.e. `===`. If the `array` is already sorted, passing `true` for `fromIndex` will run a faster binary search.
@@ -324,7 +324,7 @@ _.indexOf([1, 1, 2, 2, 3, 3], 2, true);
<!-- div -->
### <a id="_initialarray--n1"></a>`_.initial(array [, n=1])`
<a href="#_initialarray--n1">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2936 "View in source") [&#x24C9;][1]
<a href="#_initialarray--n1">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2941 "View in source") [&#x24C9;][1]
Gets all but the last element of `array`. Pass `n` to exclude the last `n` elements from the result.
@@ -349,7 +349,7 @@ _.initial([3, 2, 1]);
<!-- div -->
### <a id="_intersectionarray1-array2-"></a>`_.intersection([array1, array2, ...])`
<a href="#_intersectionarray1-array2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2960 "View in source") [&#x24C9;][1]
<a href="#_intersectionarray1-array2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2965 "View in source") [&#x24C9;][1]
Computes the intersection of all the passed-in arrays using strict equality for comparisons, i.e. `===`.
@@ -373,7 +373,7 @@ _.intersection([1, 2, 3], [101, 2, 1, 10], [2, 1]);
<!-- div -->
### <a id="_lastarray--n"></a>`_.last(array [, n])`
<a href="#_lastarray--n">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3013 "View in source") [&#x24C9;][1]
<a href="#_lastarray--n">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3018 "View in source") [&#x24C9;][1]
Gets the last element of the `array`. Pass `n` to return the last `n` elements of the `array`.
@@ -398,7 +398,7 @@ _.last([3, 2, 1]);
<!-- div -->
### <a id="_lastindexofarray-value--fromindexarraylength-1"></a>`_.lastIndexOf(array, value [, fromIndex=array.length-1])`
<a href="#_lastindexofarray-value--fromindexarraylength-1">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3040 "View in source") [&#x24C9;][1]
<a href="#_lastindexofarray-value--fromindexarraylength-1">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3045 "View in source") [&#x24C9;][1]
Gets the index at which the last occurrence of `value` is found using strict equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used as the offset from the end of the collection.
@@ -427,7 +427,7 @@ _.lastIndexOf([1, 2, 3, 1, 2, 3], 2, 3);
<!-- div -->
### <a id="_objectkeys--values"></a>`_.object(keys [, values=[]])`
<a href="#_objectkeys--values">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3070 "View in source") [&#x24C9;][1]
<a href="#_objectkeys--values">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3075 "View in source") [&#x24C9;][1]
Creates an object composed from arrays of `keys` and `values`. Pass either a single two dimensional array, i.e. `[[key1, value1], [key2, value2]]`, or two arrays, one of `keys` and one of corresponding `values`.
@@ -452,7 +452,7 @@ _.object(['moe', 'larry', 'curly'], [30, 40, 50]);
<!-- div -->
### <a id="_rangestart0-end--step1"></a>`_.range([start=0], end [, step=1])`
<a href="#_rangestart0-end--step1">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3115 "View in source") [&#x24C9;][1]
<a href="#_rangestart0-end--step1">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3120 "View in source") [&#x24C9;][1]
Creates an array of numbers *(positive and/or negative)* progressing from `start` up to but not including `stop`. This method is a port of Python's `range()` function. See http://docs.python.org/library/functions.html#range.
@@ -490,7 +490,7 @@ _.range(0);
<!-- div -->
### <a id="_restarray--n1"></a>`_.rest(array [, n=1])`
<a href="#_restarray--n1">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3154 "View in source") [&#x24C9;][1]
<a href="#_restarray--n1">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3159 "View in source") [&#x24C9;][1]
The opposite of `_.initial`, this method gets all but the first value of `array`. Pass `n` to exclude the first `n` values from the result.
@@ -518,7 +518,7 @@ _.rest([3, 2, 1]);
<!-- div -->
### <a id="_sortedindexarray-value--callbackidentityproperty-thisarg"></a>`_.sortedIndex(array, value [, callback=identity|property, thisArg])`
<a href="#_sortedindexarray-value--callbackidentityproperty-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3198 "View in source") [&#x24C9;][1]
<a href="#_sortedindexarray-value--callbackidentityproperty-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3203 "View in source") [&#x24C9;][1]
Uses a binary search to determine the smallest index at which the `value` should be inserted into `array` in order to maintain the sort order of the sorted `array`. If `callback` is passed, it will be executed for `value` and each element in `array` to compute their sort ranking. The `callback` is bound to `thisArg` and invoked with one argument; *(value)*. The `callback` argument may also be the name of a property to order by.
@@ -562,7 +562,7 @@ _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) {
<!-- div -->
### <a id="_unionarray1-array2-"></a>`_.union([array1, array2, ...])`
<a href="#_unionarray1-array2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3230 "View in source") [&#x24C9;][1]
<a href="#_unionarray1-array2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3235 "View in source") [&#x24C9;][1]
Computes the union of the passed-in arrays using strict equality for comparisons, i.e. `===`.
@@ -586,7 +586,7 @@ _.union([1, 2, 3], [101, 2, 1, 10], [2, 1]);
<!-- div -->
### <a id="_uniqarray--issortedfalse-callbackidentity-thisarg"></a>`_.uniq(array [, isSorted=false, callback=identity, thisArg])`
<a href="#_uniqarray--issortedfalse-callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3264 "View in source") [&#x24C9;][1]
<a href="#_uniqarray--issortedfalse-callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3269 "View in source") [&#x24C9;][1]
Creates a duplicate-value-free version of the `array` using strict equality for comparisons, i.e. `===`. If the `array` is already sorted, passing `true` for `isSorted` will run a faster algorithm. If `callback` is passed, each element of `array` is passed through a callback` before uniqueness is computed. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
@@ -625,7 +625,7 @@ _.uniq([1, 2, 1.5, 3, 2.5], function(num) { return this.floor(num); }, Math);
<!-- div -->
### <a id="_withoutarray--value1-value2-"></a>`_.without(array [, value1, value2, ...])`
<a href="#_withoutarray--value1-value2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3323 "View in source") [&#x24C9;][1]
<a href="#_withoutarray--value1-value2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3328 "View in source") [&#x24C9;][1]
Creates an array with all occurrences of the passed values removed using strict equality for comparisons, i.e. `===`.
@@ -650,7 +650,7 @@ _.without([1, 2, 1, 0, 3, 1, 4], 0, 1);
<!-- div -->
### <a id="_ziparray1-array2-"></a>`_.zip([array1, array2, ...])`
<a href="#_ziparray1-array2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3354 "View in source") [&#x24C9;][1]
<a href="#_ziparray1-array2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3359 "View in source") [&#x24C9;][1]
Groups the elements of each array at their corresponding indexes. Useful for separate data sources that are coordinated through matching array indexes. For a matrix of nested arrays, `_.zip.apply(...)` can transpose the matrix in a similar fashion.
@@ -707,7 +707,7 @@ The wrapper functions `first` and `last` return wrapped values when `n` is passe
<!-- div -->
### <a id="_tapvalue-interceptor"></a>`_.tap(value, interceptor)`
<a href="#_tapvalue-interceptor">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4220 "View in source") [&#x24C9;][1]
<a href="#_tapvalue-interceptor">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4225 "View in source") [&#x24C9;][1]
Invokes `interceptor` with the `value` as the first argument, and then returns `value`. The purpose of this method is to "tap into" a method chain, in order to perform operations on intermediate results within the chain.
@@ -737,7 +737,7 @@ _.chain([1, 2, 3, 200])
<!-- div -->
### <a id="_prototypetostring"></a>`_.prototype.toString()`
<a href="#_prototypetostring">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4237 "View in source") [&#x24C9;][1]
<a href="#_prototypetostring">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4242 "View in source") [&#x24C9;][1]
Produces the `toString` result of the wrapped value.
@@ -758,7 +758,7 @@ _([1, 2, 3]).toString();
<!-- div -->
### <a id="_prototypevalueof"></a>`_.prototype.valueOf()`
<a href="#_prototypevalueof">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4254 "View in source") [&#x24C9;][1]
<a href="#_prototypevalueof">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4259 "View in source") [&#x24C9;][1]
Extracts the wrapped value.
@@ -1067,7 +1067,7 @@ _.invoke([123, 456], String.prototype.split, '');
<!-- div -->
### <a id="_mapcollection--callbackidentity-thisarg"></a>`_.map(collection [, callback=identity, thisArg])`
<a href="#_mapcollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2305 "View in source") [&#x24C9;][1]
<a href="#_mapcollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2307 "View in source") [&#x24C9;][1]
Creates an array of values by running each element in the `collection` through a `callback`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
@@ -1099,7 +1099,7 @@ _.map({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { return num * 3; });
<!-- div -->
### <a id="_maxcollection--callback-thisarg"></a>`_.max(collection [, callback, thisArg])`
<a href="#_maxcollection--callback-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2347 "View in source") [&#x24C9;][1]
<a href="#_maxcollection--callback-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2349 "View in source") [&#x24C9;][1]
Retrieves the maximum value of an `array`. If `callback` is passed, it will be executed for each value in the `array` to generate the criterion by which the value is ranked. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, collection)*.
@@ -1131,7 +1131,7 @@ _.max(stooges, function(stooge) { return stooge.age; });
<!-- div -->
### <a id="_mincollection--callback-thisarg"></a>`_.min(collection [, callback, thisArg])`
<a href="#_mincollection--callback-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2395 "View in source") [&#x24C9;][1]
<a href="#_mincollection--callback-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2397 "View in source") [&#x24C9;][1]
Retrieves the minimum value of an `array`. If `callback` is passed, it will be executed for each value in the `array` to generate the criterion by which the value is ranked. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, collection)*.
@@ -1157,7 +1157,7 @@ _.min([10, 5, 100, 2, 1000]);
<!-- div -->
### <a id="_pluckcollection-property"></a>`_.pluck(collection, property)`
<a href="#_pluckcollection-property">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2446 "View in source") [&#x24C9;][1]
<a href="#_pluckcollection-property">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2448 "View in source") [&#x24C9;][1]
Retrieves the value of a specified property from all elements in the `collection`.
@@ -1188,7 +1188,7 @@ _.pluck(stooges, 'name');
<!-- div -->
### <a id="_reducecollection--callbackidentity-accumulator-thisarg"></a>`_.reduce(collection [, callback=identity, accumulator, thisArg])`
<a href="#_reducecollection--callbackidentity-accumulator-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2470 "View in source") [&#x24C9;][1]
<a href="#_reducecollection--callbackidentity-accumulator-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2472 "View in source") [&#x24C9;][1]
Reduces a `collection` to a single value. The initial state of the reduction is `accumulator` and each successive step of it should be returned by the `callback`. The `callback` is bound to `thisArg` and invoked with four arguments; for arrays they are *(accumulator, value, index|key, collection)*.
@@ -1218,7 +1218,7 @@ var sum = _.reduce([1, 2, 3], function(memo, num) { return memo + num; });
<!-- div -->
### <a id="_reducerightcollection--callbackidentity-accumulator-thisarg"></a>`_.reduceRight(collection [, callback=identity, accumulator, thisArg])`
<a href="#_reducerightcollection--callbackidentity-accumulator-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2512 "View in source") [&#x24C9;][1]
<a href="#_reducerightcollection--callbackidentity-accumulator-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2514 "View in source") [&#x24C9;][1]
The right-associative version of `_.reduce`.
@@ -1249,7 +1249,7 @@ var flat = _.reduceRight(list, function(a, b) { return a.concat(b); }, []);
<!-- div -->
### <a id="_rejectcollection--callbackidentity-thisarg"></a>`_.reject(collection [, callback=identity, thisArg])`
<a href="#_rejectcollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2550 "View in source") [&#x24C9;][1]
<a href="#_rejectcollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2552 "View in source") [&#x24C9;][1]
The opposite of `_.filter`, this method returns the elements of a `collection` that `callback` does **not** return truthy for.
@@ -1275,7 +1275,7 @@ var odds = _.reject([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; });
<!-- div -->
### <a id="_shufflecollection"></a>`_.shuffle(collection)`
<a href="#_shufflecollection">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2571 "View in source") [&#x24C9;][1]
<a href="#_shufflecollection">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2573 "View in source") [&#x24C9;][1]
Creates an array of shuffled `array` values, using a version of the Fisher-Yates shuffle. See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle.
@@ -1299,7 +1299,7 @@ _.shuffle([1, 2, 3, 4, 5, 6]);
<!-- div -->
### <a id="_sizecollection"></a>`_.size(collection)`
<a href="#_sizecollection">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2603 "View in source") [&#x24C9;][1]
<a href="#_sizecollection">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2606 "View in source") [&#x24C9;][1]
Gets the size of the `collection` by returning `collection.length` for arrays and array-like objects or the number of own enumerable properties for objects.
@@ -1329,7 +1329,7 @@ _.size('curly');
<!-- div -->
### <a id="_somecollection--callbackidentity-thisarg"></a>`_.some(collection [, callback=identity, thisArg])`
<a href="#_somecollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2628 "View in source") [&#x24C9;][1]
<a href="#_somecollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2631 "View in source") [&#x24C9;][1]
Checks if the `callback` returns a truthy value for **any** element of a `collection`. The function returns as soon as it finds passing value, and does not iterate over the entire `collection`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
@@ -1358,7 +1358,7 @@ _.some([null, 0, 'yes', false], Boolean);
<!-- div -->
### <a id="_sortbycollection-callbackproperty--thisarg"></a>`_.sortBy(collection, callback|property [, thisArg])`
<a href="#_sortbycollection-callbackproperty--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2674 "View in source") [&#x24C9;][1]
<a href="#_sortbycollection-callbackproperty--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2677 "View in source") [&#x24C9;][1]
Creates an array, stable sorted in ascending order by the results of running each element of `collection` through a `callback`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. The `callback` argument may also be the name of a property to sort by *(e.g. 'length')*.
@@ -1390,7 +1390,7 @@ _.sortBy(['larry', 'brendan', 'moe'], 'length');
<!-- div -->
### <a id="_toarraycollection"></a>`_.toArray(collection)`
<a href="#_toarraycollection">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2707 "View in source") [&#x24C9;][1]
<a href="#_toarraycollection">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2712 "View in source") [&#x24C9;][1]
Converts the `collection` to an array.
@@ -1414,7 +1414,7 @@ Converts the `collection` to an array.
<!-- div -->
### <a id="_wherecollection-properties"></a>`_.where(collection, properties)`
<a href="#_wherecollection-properties">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2737 "View in source") [&#x24C9;][1]
<a href="#_wherecollection-properties">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2742 "View in source") [&#x24C9;][1]
Examines each element in a `collection`, returning an array of all elements that contain the given `properties`.
@@ -1452,7 +1452,7 @@ _.where(stooges, { 'age': 40 });
<!-- div -->
### <a id="_aftern-func"></a>`_.after(n, func)`
<a href="#_aftern-func">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3387 "View in source") [&#x24C9;][1]
<a href="#_aftern-func">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3392 "View in source") [&#x24C9;][1]
Creates a function that is restricted to executing `func` only after it is called `n` times. The `func` is executed with the `this` binding of the created function.
@@ -1480,7 +1480,7 @@ _.forEach(notes, function(note) {
<!-- div -->
### <a id="_bindfunc--thisarg-arg1-arg2-"></a>`_.bind(func [, thisArg, arg1, arg2, ...])`
<a href="#_bindfunc--thisarg-arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3420 "View in source") [&#x24C9;][1]
<a href="#_bindfunc--thisarg-arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3425 "View in source") [&#x24C9;][1]
Creates a function that, when called, invokes `func` with the `this` binding of `thisArg` and prepends any additional `bind` arguments to those passed to the bound function.
@@ -1511,7 +1511,7 @@ func();
<!-- div -->
### <a id="_bindallobject--methodname1-methodname2-"></a>`_.bindAll(object [, methodName1, methodName2, ...])`
<a href="#_bindallobject--methodname1-methodname2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3450 "View in source") [&#x24C9;][1]
<a href="#_bindallobject--methodname1-methodname2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3455 "View in source") [&#x24C9;][1]
Binds methods on `object` to `object`, overwriting the existing method. If no method names are provided, all the function properties of `object` will be bound.
@@ -1542,7 +1542,7 @@ jQuery('#lodash_button').on('click', buttonView.onClick);
<!-- div -->
### <a id="_bindkeyobject-key--arg1-arg2-"></a>`_.bindKey(object, key [, arg1, arg2, ...])`
<a href="#_bindkeyobject-key--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3496 "View in source") [&#x24C9;][1]
<a href="#_bindkeyobject-key--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3501 "View in source") [&#x24C9;][1]
Creates a function that, when called, invokes the method at `object[key]` and prepends any additional `bindKey` arguments to those passed to the bound function. This method differs from `_.bind` by allowing bound functions to reference methods that will be redefined or don't yet exist. See http://michaux.ca/articles/lazy-function-definition-pattern.
@@ -1583,7 +1583,7 @@ func();
<!-- div -->
### <a id="_composefunc1-func2-"></a>`_.compose([func1, func2, ...])`
<a href="#_composefunc1-func2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3519 "View in source") [&#x24C9;][1]
<a href="#_composefunc1-func2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3524 "View in source") [&#x24C9;][1]
Creates a function that is the composition of the passed functions, where each function consumes the return value of the function that follows. In math terms, composing the functions `f()`, `g()`, and `h()` produces `f(g(h()))`. Each function is executed with the `this` binding of the composed function.
@@ -1610,7 +1610,7 @@ welcome('moe');
<!-- div -->
### <a id="_debouncefunc-wait-immediate"></a>`_.debounce(func, wait, immediate)`
<a href="#_debouncefunc-wait-immediate">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3552 "View in source") [&#x24C9;][1]
<a href="#_debouncefunc-wait-immediate">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3557 "View in source") [&#x24C9;][1]
Creates a function that will delay the execution of `func` until after `wait` milliseconds have elapsed since the last time it was invoked. Pass `true` for `immediate` to cause debounce to invoke `func` on the leading, instead of the trailing, edge of the `wait` timeout. Subsequent calls to the debounced function will return the result of the last `func` call.
@@ -1636,7 +1636,7 @@ jQuery(window).on('resize', lazyLayout);
<!-- div -->
### <a id="_deferfunc--arg1-arg2-"></a>`_.defer(func [, arg1, arg2, ...])`
<a href="#_deferfunc--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3616 "View in source") [&#x24C9;][1]
<a href="#_deferfunc--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3621 "View in source") [&#x24C9;][1]
Defers executing the `func` function until the current call stack has cleared. Additional arguments will be passed to `func` when it is invoked.
@@ -1661,7 +1661,7 @@ _.defer(function() { alert('deferred'); });
<!-- div -->
### <a id="_delayfunc-wait--arg1-arg2-"></a>`_.delay(func, wait [, arg1, arg2, ...])`
<a href="#_delayfunc-wait--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3596 "View in source") [&#x24C9;][1]
<a href="#_delayfunc-wait--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3601 "View in source") [&#x24C9;][1]
Executes the `func` function after `wait` milliseconds. Additional arguments will be passed to `func` when it is invoked.
@@ -1688,7 +1688,7 @@ _.delay(log, 1000, 'logged later');
<!-- div -->
### <a id="_memoizefunc--resolver"></a>`_.memoize(func [, resolver])`
<a href="#_memoizefunc--resolver">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3640 "View in source") [&#x24C9;][1]
<a href="#_memoizefunc--resolver">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3645 "View in source") [&#x24C9;][1]
Creates a function that memoizes the result of `func`. If `resolver` is passed, it will be used to determine the cache key for storing the result based on the arguments passed to the memoized function. By default, the first argument passed to the memoized function is used as the cache key. The `func` is executed with the `this` binding of the memoized function.
@@ -1714,7 +1714,7 @@ var fibonacci = _.memoize(function(n) {
<!-- div -->
### <a id="_oncefunc"></a>`_.once(func)`
<a href="#_oncefunc">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3667 "View in source") [&#x24C9;][1]
<a href="#_oncefunc">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3672 "View in source") [&#x24C9;][1]
Creates a function that is restricted to execute `func` once. Repeat calls to the function will return the value of the first call. The `func` is executed with the `this` binding of the created function.
@@ -1740,7 +1740,7 @@ initialize();
<!-- div -->
### <a id="_partialfunc--arg1-arg2-"></a>`_.partial(func [, arg1, arg2, ...])`
<a href="#_partialfunc--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3702 "View in source") [&#x24C9;][1]
<a href="#_partialfunc--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3707 "View in source") [&#x24C9;][1]
Creates a function that, when called, invokes `func` with any additional `partial` arguments prepended to those passed to the new function. This method is similar to `bind`, except it does **not** alter the `this` binding.
@@ -1767,7 +1767,7 @@ hi('moe');
<!-- div -->
### <a id="_throttlefunc-wait"></a>`_.throttle(func, wait)`
<a href="#_throttlefunc-wait">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3724 "View in source") [&#x24C9;][1]
<a href="#_throttlefunc-wait">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3729 "View in source") [&#x24C9;][1]
Creates a function that, when executed, will only call the `func` function at most once per every `wait` milliseconds. If the throttled function is invoked more than once during the `wait` timeout, `func` will also be called on the trailing edge of the timeout. Subsequent calls to the throttled function will return the result of the last `func` call.
@@ -1792,7 +1792,7 @@ jQuery(window).on('scroll', throttled);
<!-- div -->
### <a id="_wrapvalue-wrapper"></a>`_.wrap(value, wrapper)`
<a href="#_wrapvalue-wrapper">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3777 "View in source") [&#x24C9;][1]
<a href="#_wrapvalue-wrapper">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3782 "View in source") [&#x24C9;][1]
Creates a function that passes `value` to the `wrapper` function as its first argument. Additional arguments passed to the function are appended to those passed to the `wrapper` function. The `wrapper` is executed with the `this` binding of the created function.
@@ -2739,7 +2739,7 @@ _.values({ 'one': 1, 'two': 2, 'three': 3 });
<!-- div -->
### <a id="_escapestring"></a>`_.escape(string)`
<a href="#_escapestring">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3801 "View in source") [&#x24C9;][1]
<a href="#_escapestring">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3806 "View in source") [&#x24C9;][1]
Converts the characters `&`, `<`, `>`, `"`, and `'` in `string` to their corresponding HTML entities.
@@ -2763,7 +2763,7 @@ _.escape('Moe, Larry & Curly');
<!-- div -->
### <a id="_identityvalue"></a>`_.identity(value)`
<a href="#_identityvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3819 "View in source") [&#x24C9;][1]
<a href="#_identityvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3824 "View in source") [&#x24C9;][1]
This function returns the first argument passed to it.
@@ -2788,7 +2788,7 @@ moe === _.identity(moe);
<!-- div -->
### <a id="_mixinobject"></a>`_.mixin(object)`
<a href="#_mixinobject">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3845 "View in source") [&#x24C9;][1]
<a href="#_mixinobject">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3850 "View in source") [&#x24C9;][1]
Adds functions properties of `object` to the `lodash` function and chainable wrapper.
@@ -2818,7 +2818,7 @@ _('curly').capitalize();
<!-- div -->
### <a id="_noconflict"></a>`_.noConflict()`
<a href="#_noconflict">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3869 "View in source") [&#x24C9;][1]
<a href="#_noconflict">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3874 "View in source") [&#x24C9;][1]
Reverts the '_' variable to its previous value and returns a reference to the `lodash` function.
@@ -2838,7 +2838,7 @@ var lodash = _.noConflict();
<!-- div -->
### <a id="_randommin0-max1"></a>`_.random([min=0, max=1])`
<a href="#_randommin0-max1">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3892 "View in source") [&#x24C9;][1]
<a href="#_randommin0-max1">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3897 "View in source") [&#x24C9;][1]
Produces a random number between `min` and `max` *(inclusive)*. If only one argument is passed, a number between `0` and the given number will be returned.
@@ -2866,7 +2866,7 @@ _.random(5);
<!-- div -->
### <a id="_resultobject-property"></a>`_.result(object, property)`
<a href="#_resultobject-property">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3930 "View in source") [&#x24C9;][1]
<a href="#_resultobject-property">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3935 "View in source") [&#x24C9;][1]
Resolves the value of `property` on `object`. If `property` is a function it will be invoked and its result returned, else the property value is returned. If `object` is falsey, then `null` is returned.
@@ -2901,7 +2901,7 @@ _.result(object, 'stuff');
<!-- div -->
### <a id="_templatetext-data-options"></a>`_.template(text, data, options)`
<a href="#_templatetext-data-options">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4015 "View in source") [&#x24C9;][1]
<a href="#_templatetext-data-options">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4020 "View in source") [&#x24C9;][1]
A micro-templating method that handles arbitrary delimiters, preserves whitespace, and correctly escapes quotes within interpolated code.
@@ -2979,7 +2979,7 @@ fs.writeFileSync(path.join(cwd, 'jst.js'), '\
<!-- div -->
### <a id="_timesn-callback--thisarg"></a>`_.times(n, callback [, thisArg])`
<a href="#_timesn-callback--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4146 "View in source") [&#x24C9;][1]
<a href="#_timesn-callback--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4151 "View in source") [&#x24C9;][1]
Executes the `callback` function `n` times, returning an array of the results of each `callback` execution. The `callback` is bound to `thisArg` and invoked with one argument; *(index)*.
@@ -3011,7 +3011,7 @@ _.times(3, function(n) { this.cast(n); }, mage);
<!-- div -->
### <a id="_unescapestring"></a>`_.unescape(string)`
<a href="#_unescapestring">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4172 "View in source") [&#x24C9;][1]
<a href="#_unescapestring">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4177 "View in source") [&#x24C9;][1]
The opposite of `_.escape`, this method converts the HTML entities `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#x27;` in `string` to their corresponding characters.
@@ -3035,7 +3035,7 @@ _.unescape('Moe, Larry &amp; Curly');
<!-- div -->
### <a id="_uniqueidprefix"></a>`_.uniqueId([prefix])`
<a href="#_uniqueidprefix">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4192 "View in source") [&#x24C9;][1]
<a href="#_uniqueidprefix">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4197 "View in source") [&#x24C9;][1]
Generates a unique ID. If `prefix` is passed, the ID will be appended to it.
@@ -3069,7 +3069,7 @@ _.uniqueId();
<!-- div -->
### <a id="_version"></a>`_.VERSION`
<a href="#_version">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4419 "View in source") [&#x24C9;][1]
<a href="#_version">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4424 "View in source") [&#x24C9;][1]
*(String)*: The semantic version number.

View File

@@ -2052,7 +2052,7 @@
callback = createCallback(callback, thisArg);
forEach(collection, function(value, key, collection) {
key = callback(value, key, collection);
key = callback(value, key, collection) + '';
(hasOwnProperty.call(result, key) ? result[key]++ : result[key] = 1);
});
return result;
@@ -2242,7 +2242,7 @@
callback = createCallback(callback, thisArg);
forEach(collection, function(value, key, collection) {
key = callback(value, key, collection);
key = callback(value, key, collection) + '';
(hasOwnProperty.call(result, key) ? result[key] : result[key] = []).push(value);
});
return result;
@@ -2272,11 +2272,13 @@
*/
function invoke(collection, methodName) {
var args = slice(arguments, 2),
index = -1,
isFunc = typeof methodName == 'function',
result = [];
length = collection ? collection.length : 0,
result = Array(typeof length == 'number' ? length : 0);
forEach(collection, function(value) {
result.push((isFunc ? methodName : value[methodName]).apply(value, args));
result[++index] = (isFunc ? methodName : value[methodName]).apply(value, args);
});
return result;
}
@@ -2570,7 +2572,8 @@
*/
function shuffle(collection) {
var index = -1,
result = Array(collection ? collection.length : 0);
length = collection ? collection.length : 0,
result = Array(typeof length == 'number' ? length : 0);
forEach(collection, function(value) {
var rand = floor(nativeRandom() * (++index + 1));
@@ -2672,18 +2675,20 @@
* // => ['moe', 'larry', 'brendan']
*/
function sortBy(collection, callback, thisArg) {
var result = [];
callback = createCallback(callback, thisArg);
var index = -1,
length = collection ? collection.length : 0,
result = Array(typeof length == 'number' ? length : 0);
forEach(collection, function(value, index, collection) {
result.push({
'criteria': callback(value, index, collection),
callback = createCallback(callback, thisArg);
forEach(collection, function(value, key, collection) {
result[++index] = {
'criteria': callback(value, key, collection),
'index': index,
'value': value
});
};
});
var length = result.length;
length = result.length;
result.sort(compareAscending);
while (length--) {
result[length] = result[length].value;
@@ -3640,7 +3645,7 @@
function memoize(func, resolver) {
var cache = {};
return function() {
var key = resolver ? resolver.apply(this, arguments) : arguments[0];
var key = (resolver ? resolver.apply(this, arguments) : arguments[0]) + '';
return hasOwnProperty.call(cache, key)
? cache[key]
: (cache[key] = func.apply(this, arguments));

68
lodash.min.js vendored
View File

@@ -3,37 +3,37 @@
* Lo-Dash 1.0.0-rc.3 lodash.com/license
* Underscore.js 1.4.3 underscorejs.org/LICENSE
*/
;(function(n,t){function r(n){return n&&typeof n=="object"&&n.__wrapped__?n:this instanceof r?(this.__wrapped__=n,void 0):new r(n)}function e(n,t,r){t||(t=0);var e=n.length,u=e-t>=(r||et);if(u)for(var o={},r=t-1;e>++r;){var i=n[r]+"";(xt.call(o,i)?o[i]:o[i]=[]).push(n[r])}return function(r){if(u){var e=r+"";return xt.call(o,e)&&C(o[e],r)>-1}return C(n,r,t)>-1}}function u(n){return n.charCodeAt(0)}function o(n,t){var r=n.b,e=t.b,n=n.a,t=t.a;if(n!==t){if(n>t||n===void 0)return 1;if(t>n||t===void 0)return-1
}return e>r?-1:1}function i(n,t,r){function e(){var a=arguments,f=o?this:t;return u||(n=t[i]),r.length&&(a=a.length?r.concat(v(a)):r),this instanceof e?(s.prototype=n.prototype,f=new s,s.prototype=null,a=n.apply(f,a),x(a)?a:f):n.apply(f,a)}var u=j(n),o=!r,i=t;return o&&(r=t),u||(t=n),e}function a(n,t,r){return n?typeof n!="function"?function(t){return t[n]}:t!==void 0?r?function(r,e,u,o){return n.call(t,r,e,u,o)}:function(r,e,u){return n.call(t,r,e,u)}:n:G}function f(){for(var n,t={b:"",c:"",e:X,f:Gt,g:"",h:Jt,i:Xt,j:_t,k:"",l:!0},r=0;n=arguments[r];r++)for(var e in n)t[e]=n[e];
if(n=t.a,t.d=/^[^,]+/.exec(n)[0],r=Function,e="var i,l="+t.d+",t="+t.d+";if(!"+t.d+")return t;"+t.k+";",t.b?(e+="var m=l.length;i=-1;if(typeof m=='number'){",t.i&&(e+="if(k(l)){l=l.split('')}"),e+="while(++i<m){"+t.b+"}}else {"):t.h&&(e+="var m=l.length;i=-1;if(m&&j(l)){while(++i<m){i+='';"+t.g+"}}else {"),t.e||(e+="var u=typeof l=='function'&&s.call(l,'prototype');"),t.f&&t.l?(e+="var q=-1,r=p[typeof l]?n(l):[],m=r.length;while(++q<m){i=r[q];",t.e||(e+="if(!(u&&i=='prototype')){"),e+=t.g+"",t.e||(e+="}")):(e+="for(i in l){",(!t.e||t.l)&&(e+="if(",t.e||(e+="!(u&&i=='prototype')"),!t.e&&t.l&&(e+="&&"),t.l&&(e+="h.call(l,i)"),e+="){"),e+=t.g+";",(!t.e||t.l)&&(e+="}")),e+="}",t.e){e+="var f=l.constructor;";
for(var u=0;7>u;u++)e+="i='"+t.j[u]+"';if(","constructor"==t.j[u]&&(e+="!(f&&f.prototype===l)&&"),e+="h.call(l,i)){"+t.g+"}"}return(t.b||t.h)&&(e+="}"),e+=t.c+";return t",r("e,h,j,k,p,n,s","return function("+n+"){"+e+"}")(a,xt,h,A,rr,Nt,At)}function c(n){return"\\"+er[n]}function l(n){return sr[n]}function p(n){return typeof n.toString!="function"&&typeof(n+"")=="string"}function s(){}function v(n,t,r){t||(t=0),r===void 0&&(r=n?n.length:0);for(var e=-1,r=r-t||0,u=Array(0>r?0:r);r>++e;)u[e]=n[t+e];
return u}function g(n){return vr[n]}function h(n){return Et.call(n)==It}function y(n){var t=!1;if(!n||typeof n!="object"||h(n))return t;var r=n.constructor;return!j(r)&&(!Yt||!p(n))||r instanceof r?Y?(cr(n,function(n,r,e){return t=!xt.call(e,r),!1}),!1===t):(cr(n,function(n,r){t=r}),!1===t||xt.call(n,t)):t}function m(n){var t=[];return lr(n,function(n,r){t.push(r)}),t}function _(n,t,r,e,u){if(null==n)return n;if(r&&(t=!1),r=x(n)){var o=Et.call(n);if(!nr[o]||Yt&&p(n))return n;var i=hr(n)}if(!r||!t)return r?i?v(n):fr({},n):n;
switch(r=tr[o],o){case Bt:case Mt:return new r(+n);case Pt:case Kt:return new r(n);case Ct:return r(n.source,lt.exec(n))}for(e||(e=[]),u||(u=[]),o=e.length;o--;)if(e[o]==n)return u[o];var a=i?r(n.length):{};return e.push(n),u.push(a),(i?R:lr)(n,function(n,r){a[r]=_(n,t,null,e,u)}),i&&(xt.call(n,"index")&&(a.index=n.index),xt.call(n,"input")&&(a.input=n.input)),a}function d(n){var t=[];return cr(n,function(n,r){j(n)&&t.push(r)}),t.sort()}function b(n){for(var t=-1,r=pr(n),e=r.length,u={};e>++t;){var o=r[t];
u[n[o]]=o}return u}function w(n,t,r,e){if(n===t)return 0!==n||1/n==1/t;if(null==n||null==t)return n===t;var u=Et.call(n),o=Et.call(t);if(u==It&&(u=zt),o==It&&(o=zt),u!=o)return!1;switch(u){case Bt:case Mt:return+n==+t;case Pt:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case Ct:case Kt:return n==t+""}if(o=u==Tt,!o){if(n.__wrapped__||t.__wrapped__)return w(n.__wrapped__||n,t.__wrapped__||t);if(u!=zt||Yt&&(p(n)||p(t)))return!1;var u=!Qt&&h(n)?Object:n.constructor,i=!Qt&&h(t)?Object:t.constructor;if(!(u==i||j(u)&&u instanceof u&&j(i)&&i instanceof i))return!1
}for(r||(r=[]),e||(e=[]),u=r.length;u--;)if(r[u]==n)return e[u]==t;var a=!0,f=0;if(r.push(n),e.push(t),o){if(f=n.length,a=f==t.length)for(;f--&&(a=w(n[f],t[f],r,e)););return a}return cr(n,function(n,u,o){return xt.call(o,u)?(f++,a=xt.call(t,u)&&w(n,t[u],r,e)):void 0}),a&&cr(t,function(n,t,r){return xt.call(r,t)?a=--f>-1:void 0}),a}function j(n){return typeof n=="function"}function x(n){return n?rr[typeof n]:!1}function O(n){return typeof n=="number"||Et.call(n)==Pt}function A(n){return typeof n=="string"||Et.call(n)==Kt
}function E(n,t,r){var e=arguments,u=0,o=2,i=e[3],a=e[4];for(r!==rt&&(i=[],a=[],typeof r!="number"&&(o=e.length));o>++u;)lr(e[u],function(t,r){var e,u,o;if(t&&((u=hr(t))||yr(t))){for(var f=i.length;f--&&!(e=i[f]==t););e?n[r]=a[f]:(i.push(t),a.push((o=n[r],o=u?hr(o)?o:[]:yr(o)?o:{})),n[r]=E(o,t,rt,i,a))}else null!=t&&(n[r]=t)});return n}function S(n){for(var t=-1,r=pr(n),e=r.length,u=Array(e);e>++t;)u[t]=n[r[t]];return u}function k(n,t,r){var e=-1,u=n?n.length:0,o=!1,r=(0>r?Rt(0,u+r):r)||0;return typeof u=="number"?o=(A(n)?n.indexOf(t,r):C(n,t,r))>-1:ar(n,function(n){return r>++e?void 0:!(o=n===t)
}),o}function $(n,t,r){var e=!0,t=a(t,r);if(hr(n))for(var r=-1,u=n.length;u>++r&&(e=!!t(n[r],r,n)););else ar(n,function(n,r,u){return e=!!t(n,r,u)});return e}function q(n,t,r){var e=[],t=a(t,r);if(hr(n))for(var r=-1,u=n.length;u>++r;){var o=n[r];t(o,r,n)&&e.push(o)}else ar(n,function(n,r,u){t(n,r,u)&&e.push(n)});return e}function N(n,t,r){var e,t=a(t,r);return R(n,function(n,r,u){return t(n,r,u)?(e=n,!1):void 0}),e}function R(n,t,r){if(t&&r===void 0&&hr(n))for(var r=-1,e=n.length;e>++r&&!1!==t(n[r],r,n););else ar(n,t,r);
return n}function F(n,t,r){var e=-1,u=n?n.length:0,o=Array(typeof u=="number"?u:0),t=a(t,r);if(hr(n))for(;u>++e;)o[e]=t(n[e],e,n);else ar(n,function(n,r,u){o[++e]=t(n,r,u)});return o}function D(n,t,r){var e=-1/0,o=e;if(!t&&hr(n))for(var r=-1,i=n.length;i>++r;){var f=n[r];f>o&&(o=f)}else t=!t&&A(n)?u:a(t,r),ar(n,function(n,r,u){r=t(n,r,u),r>e&&(e=r,o=n)});return o}function I(n,t){return F(n,t+"")}function T(n,t,r,e){var u=3>arguments.length,t=a(t,e,rt);if(hr(n)){var o=-1,i=n.length;for(u&&(r=n[++o]);i>++o;)r=t(r,n[o],o,n)
}else ar(n,function(n,e,o){r=u?(u=!1,n):t(r,n,e,o)});return r}function B(n,t,r,e){var u=n,o=n?n.length:0,i=3>arguments.length;if(typeof o!="number")var f=pr(n),o=f.length;else Xt&&A(n)&&(u=n.split(""));return t=a(t,e,rt),R(n,function(n,e,a){e=f?f[--o]:--o,r=i?(i=!1,u[e]):t(r,u[e],e,a)}),r}function M(n,t,r){var e,t=a(t,r);if(hr(n))for(var r=-1,u=n.length;u>++r&&!(e=t(n[r],r,n)););else ar(n,function(n,r,u){return!(e=t(n,r,u))});return!!e}function P(n,t,r){if(n){var e=n.length;return null==t||r?n[0]:v(n,0,Ft(Rt(0,t),e))
}}function z(n,t){for(var r=-1,e=n?n.length:0,u=[];e>++r;){var o=n[r];hr(o)?Ot.apply(u,t?o:z(o)):u.push(o)}return u}function C(n,t,r){var e=-1,u=n?n.length:0;if(typeof r=="number")e=(0>r?Rt(0,u+r):r||0)-1;else if(r)return e=L(n,t),n[e]===t?e:-1;for(;u>++e;)if(n[e]===t)return e;return-1}function K(n,t,r){return v(n,null==t||r?1:Rt(0,t))}function L(n,t,r,e){for(var u=0,o=n?n.length:u,r=r?a(r,e):G,t=r(t);o>u;)e=u+o>>>1,t>r(n[e])?u=e+1:o=e;return u}function U(n,t,r,e){var u=-1,o=n?n.length:0,i=[],f=i;
typeof t=="function"&&(e=r,r=t,t=!1);var c=!t&&o>=75;if(c)var l={};for(r&&(f=[],r=a(r,e));o>++u;){var e=n[u],p=r?r(e,u,n):e;if(c)var s=p+"",s=xt.call(l,s)?!(f=l[s]):f=l[s]=[];(t?!u||f[f.length-1]!==p:s||0>C(f,p))&&((r||c)&&f.push(p),i.push(e))}return i}function V(n,t){return Vt||St&&arguments.length>2?St.call.apply(St,arguments):i(n,t,v(arguments,2))}function G(n){return n}function H(n){R(d(n),function(t){var e=r[t]=n[t];r.prototype[t]=function(){var n=[this.__wrapped__];return Ot.apply(n,arguments),new r(e.apply(r,n))
}})}function J(){return this.__wrapped__}var Q=typeof exports=="object"&&exports,W=typeof global=="object"&&global;W.global===W&&(n=W);var X,Y,Z=[],nt=new function(){},tt=0,rt=nt,et=30,ut=n._,ot=/[-?+=!~*%&^<>|{(\/]|\[\D|\b(?:delete|in|instanceof|new|typeof|void)\b/,it=/&(?:amp|lt|gt|quot|#x27);/g,at=/\b__p\+='';/g,ft=/\b(__p\+=)''\+/g,ct=/(__e\(.*?\)|\b__t\))\+'';/g,lt=/\w*$/,pt=/(?:__e|__t=)\(\s*(?![\d\s"']|this\.)/g,st=RegExp("^"+(nt.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),vt=/\$\{((?:(?=\\?)\\?[\s\S])*?)}/g,gt=/<%=([\s\S]+?)%>/g,ht=/($^)/,yt=/[&<>"']/g,mt=/['\n\r\t\u2028\u2029\\]/g,_t="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),dt=Math.ceil,bt=Z.concat,wt=Math.floor,jt=st.test(jt=Object.getPrototypeOf)&&jt,xt=nt.hasOwnProperty,Ot=Z.push,At=nt.propertyIsEnumerable,Et=nt.toString,St=st.test(St=v.bind)&&St,kt=st.test(kt=Array.isArray)&&kt,$t=n.isFinite,qt=n.isNaN,Nt=st.test(Nt=Object.keys)&&Nt,Rt=Math.max,Ft=Math.min,Dt=Math.random,It="[object Arguments]",Tt="[object Array]",Bt="[object Boolean]",Mt="[object Date]",Pt="[object Number]",zt="[object Object]",Ct="[object RegExp]",Kt="[object String]",Lt=!!n.attachEvent,Ut=St&&!/\n|true/.test(St+Lt),Vt=St&&!Ut,Gt=Nt&&(Lt||Ut),Ht=(Ht={0:1,length:1},Z.splice.call(Ht,0,1),Ht[0]),Jt=!0;
(function(){function n(){this.x=1}var t=[];n.prototype={valueOf:1,y:1};for(var r in new n)t.push(r);for(r in arguments)Jt=!r;X=!/valueOf/.test(t),Y="x"!=t[0]})(1);var Qt=arguments.constructor==Object,Wt=!h(arguments),Xt="xx"!="x"[0]+Object("x")[0];try{var Yt=Et.call(document)==zt}catch(Zt){}var nr={"[object Function]":!1};nr[It]=nr[Tt]=nr[Bt]=nr[Mt]=nr[Pt]=nr[zt]=nr[Ct]=nr[Kt]=!0;var tr={};tr[Tt]=Array,tr[Bt]=Boolean,tr[Mt]=Date,tr[zt]=Object,tr[Pt]=Number,tr[Ct]=RegExp,tr[Kt]=String;var rr={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},er={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};
r.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:gt,variable:""};var ur={a:"o,v,g",k:"for(var a=1,b=typeof g=='number'?2:arguments.length;a<b;a++){if((l=arguments[a])){",g:"t[i]=l[i]",c:"}}"},or={a:"d,c,w",k:"c=c&&typeof w=='undefined'?c:e(c,w)",b:"if(c(l[i],i,d)===false)return t",g:"if(c(l[i],i,d)===false)return t"},ir={b:null},ar=f(or),fr=f(ur);Wt&&(h=function(n){return n?xt.call(n,"callee"):!1});var cr=f(or,ir,{l:!1}),lr=f(or,ir),pr=Nt?function(n){return typeof n=="function"&&At.call(n,"prototype")?m(n):x(n)?Nt(n):[]
}:m,sr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"},vr=b(sr),gr=f(ur,{g:"if(t[i]==null)"+ur.g}),hr=kt||function(n){return Qt&&n instanceof Array||Et.call(n)==Tt};j(/x/)&&(j=function(n){return n instanceof Function||"[object Function]"==Et.call(n)});var yr=jt?function(n){if(!n||typeof n!="object")return!1;var t=n.valueOf,r=typeof t=="function"&&(r=jt(t))&&jt(r);return r?n==r||jt(n)==r&&!h(n):y(n)}:y;r.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0
}},r.assign=fr,r.at=function(n){var t=-1,r=bt.apply(Z,v(arguments,1)),e=r.length,u=Array(e);for(Xt&&A(n)&&(n=n.split(""));e>++t;)u[t]=n[r[t]];return u},r.bind=V,r.bindAll=function(n){for(var t=arguments,r=t.length>1?0:(t=d(n),-1),e=t.length;e>++r;){var u=t[r];n[u]=V(n[u],n)}return n},r.bindKey=function(n,t){return i(n,t,v(arguments,2))},r.compact=function(n){for(var t=-1,r=n?n.length:0,e=[];r>++t;){var u=n[t];u&&e.push(u)}return e},r.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length;r--;)t=[n[r].apply(this,t)];
return t[0]}},r.countBy=function(n,t,r){var e={},t=a(t,r);return R(n,function(n,r,u){r=t(n,r,u),xt.call(e,r)?e[r]++:e[r]=1}),e},r.debounce=function(n,t,r){function e(){a=null,r||(o=n.apply(i,u))}var u,o,i,a;return function(){var f=r&&!a;return u=arguments,i=this,clearTimeout(a),a=setTimeout(e,t),f&&(o=n.apply(i,u)),o}},r.defaults=gr,r.defer=function(n){var r=v(arguments,1);return setTimeout(function(){n.apply(t,r)},1)},r.delay=function(n,r){var e=v(arguments,2);return setTimeout(function(){n.apply(t,e)
},r)},r.difference=function(n){for(var t=-1,r=n?n.length:0,u=bt.apply(Z,arguments),u=e(u,r),o=[];r>++t;){var i=n[t];u(i)||o.push(i)}return o},r.filter=q,r.flatten=z,r.forEach=R,r.forIn=cr,r.forOwn=lr,r.functions=d,r.groupBy=function(n,t,r){var e={},t=a(t,r);return R(n,function(n,r,u){r=t(n,r,u),(xt.call(e,r)?e[r]:e[r]=[]).push(n)}),e},r.initial=function(n,t,r){if(!n)return[];var e=n.length;return v(n,0,Ft(Rt(0,e-(null==t||r?1:t||0)),e))},r.intersection=function(n){var t=arguments,r=t.length,u={0:{}},o=-1,i=n?n.length:0,a=i>=100,f=[],c=f;
n:for(;i>++o;){var l=n[o];if(a)var p=l+"",p=xt.call(u[0],p)?!(c=u[0][p]):c=u[0][p]=[];if(p||0>C(c,l)){a&&c.push(l);for(var s=r;--s;)if(!(u[s]||(u[s]=e(t[s],0,100)))(l))continue n;f.push(l)}}return f},r.invert=b,r.invoke=function(n,t){var r=v(arguments,2),e=typeof t=="function",u=[];return R(n,function(n){u.push((e?t:n[t]).apply(n,r))}),u},r.keys=pr,r.map=F,r.max=D,r.memoize=function(n,t){var r={};return function(){var e=t?t.apply(this,arguments):arguments[0];return xt.call(r,e)?r[e]:r[e]=n.apply(this,arguments)
}},r.merge=E,r.min=function(n,t,r){var e=1/0,o=e;if(!t&&hr(n))for(var r=-1,i=n.length;i>++r;){var f=n[r];o>f&&(o=f)}else t=!t&&A(n)?u:a(t,r),ar(n,function(n,r,u){r=t(n,r,u),e>r&&(e=r,o=n)});return o},r.object=function(n,t){for(var r=-1,e=n?n.length:0,u={};e>++r;){var o=n[r];t?u[o]=t[r]:u[o[0]]=o[1]}return u},r.omit=function(n,t,r){var e=typeof t=="function",u={};if(e)t=a(t,r);else var o=bt.apply(Z,arguments);return cr(n,function(n,r,i){(e?!t(n,r,i):0>C(o,r,1))&&(u[r]=n)}),u},r.once=function(n){var t,r=!1;
return function(){return r?t:(r=!0,t=n.apply(this,arguments),n=null,t)}},r.pairs=function(n){for(var t=-1,r=pr(n),e=r.length,u=Array(e);e>++t;){var o=r[t];u[t]=[o,n[o]]}return u},r.partial=function(n){return i(n,v(arguments,1))},r.pick=function(n,t,r){var e={};if(typeof t!="function")for(var u=0,o=bt.apply(Z,arguments),i=o.length;i>++u;){var f=o[u];f in n&&(e[f]=n[f])}else t=a(t,r),cr(n,function(n,r,u){t(n,r,u)&&(e[r]=n)});return e},r.pluck=I,r.range=function(n,t,r){n=+n||0,r=+r||1,null==t&&(t=n,n=0);
for(var e=-1,t=Rt(0,dt((t-n)/r)),u=Array(t);t>++e;)u[e]=n,n+=r;return u},r.reject=function(n,t,r){return t=a(t,r),q(n,function(n,r,e){return!t(n,r,e)})},r.rest=K,r.shuffle=function(n){var t=-1,r=Array(n?n.length:0);return R(n,function(n){var e=wt(Dt()*(++t+1));r[t]=r[e],r[e]=n}),r},r.sortBy=function(n,t,r){var e=[],t=a(t,r);for(R(n,function(n,r,u){e.push({a:t(n,r,u),b:r,c:n})}),n=e.length,e.sort(o);n--;)e[n]=e[n].c;return e},r.tap=function(n,t){return t(n),n},r.throttle=function(n,t){function r(){a=new Date,i=null,u=n.apply(o,e)
}var e,u,o,i,a=0;return function(){var f=new Date,c=t-(f-a);return e=arguments,o=this,c>0?i||(i=setTimeout(r,c)):(clearTimeout(i),i=null,a=f,u=n.apply(o,e)),u}},r.times=function(n,t,r){for(var n=+n||0,e=-1,u=Array(n);n>++e;)u[e]=t.call(r,e);return u},r.toArray=function(n){return n&&typeof n.length=="number"?Xt&&A(n)?n.split(""):v(n):S(n)},r.union=function(){return U(bt.apply(Z,arguments))},r.uniq=U,r.values=S,r.where=function(n,t){var r=pr(t);return q(n,function(n){for(var e=r.length;e--;){var u=n[r[e]]===t[r[e]];
if(!u)break}return!!u})},r.without=function(n){for(var t=-1,r=n?n.length:0,u=e(arguments,1,20),o=[];r>++t;){var i=n[t];u(i)||o.push(i)}return o},r.wrap=function(n,t){return function(){var r=[n];return Ot.apply(r,arguments),t.apply(this,r)}},r.zip=function(n){for(var t=-1,r=n?D(I(arguments,"length")):0,e=Array(r);r>++t;)e[t]=I(arguments,t);return e},r.collect=F,r.drop=K,r.each=R,r.extend=fr,r.methods=d,r.select=q,r.tail=K,r.unique=U,H(r),r.clone=_,r.cloneDeep=function(n){return _(n,!0)},r.contains=k,r.escape=function(n){return null==n?"":(n+"").replace(yt,l)
},r.every=$,r.find=N,r.has=function(n,t){return n?xt.call(n,t):!1},r.identity=G,r.indexOf=C,r.isArguments=h,r.isArray=hr,r.isBoolean=function(n){return!0===n||!1===n||Et.call(n)==Bt},r.isDate=function(n){return n instanceof Date||Et.call(n)==Mt},r.isElement=function(n){return n?1===n.nodeType:!1},r.isEmpty=function(n){var t=!0;if(!n)return t;var r=Et.call(n),e=n.length;return r==Tt||r==Kt||r==It||Wt&&h(n)||r==zt&&typeof e=="number"&&j(n.splice)?!e:(lr(n,function(){return t=!1}),t)},r.isEqual=w,r.isFinite=function(n){return $t(n)&&!qt(parseFloat(n))
},r.isFunction=j,r.isNaN=function(n){return O(n)&&n!=+n},r.isNull=function(n){return null===n},r.isNumber=O,r.isObject=x,r.isPlainObject=yr,r.isRegExp=function(n){return n instanceof RegExp||Et.call(n)==Ct},r.isString=A,r.isUndefined=function(n){return n===void 0},r.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(e=(0>r?Rt(0,e+r):Ft(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},r.mixin=H,r.noConflict=function(){return n._=ut,this},r.random=function(n,t){return null==n&&null==t&&(t=1),n=+n||0,null==t&&(t=n,n=0),n+wt(Dt()*((+t||0)-n+1))
},r.reduce=T,r.reduceRight=B,r.result=function(n,t){var r=n?n[t]:null;return j(r)?n[t]():r},r.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:pr(n).length},r.some=M,r.sortedIndex=L,r.template=function(n,t,e){n||(n=""),e||(e={});var u,o,i=r.templateSettings,a=0,f=e.interpolate||i.interpolate||ht,l="__p+='",p=e.variable||i.variable,s=p;n.replace(RegExp((e.escape||i.escape||ht).source+"|"+f.source+"|"+(f===gt?vt:ht).source+"|"+(e.evaluate||i.evaluate||ht).source+"|$","g"),function(t,r,e,o,i,f){return e||(e=o),l+=n.slice(a,f).replace(mt,c),r&&(l+="'+__e("+r+")+'"),i&&(l+="';"+i+";__p+='"),e&&(l+="'+((__t=("+e+"))==null?'':__t)+'"),u||(u=i||ot.test(r||e)),a=f+t.length,t
}),l+="';\n",s||(p="obj",u?l="with("+p+"){"+l+"}":(e=RegExp("(\\(\\s*)"+p+"\\."+p+"\\b","g"),l=l.replace(pt,"$&"+p+".").replace(e,"$1__d"))),l=(u?l.replace(at,""):l).replace(ft,"$1").replace(ct,"$1;"),l="function("+p+"){"+(s?"":p+"||("+p+"={});")+"var __t,__p='',__e=_.escape"+(u?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":(s?"":",__d="+p+"."+p+"||"+p)+";")+l+"return __p}";try{o=Function("_","return "+l)(r)}catch(v){throw v.source=l,v}return t?o(t):(o.source=l,o)},r.unescape=function(n){return null==n?"":(n+"").replace(it,g)
},r.uniqueId=function(n){var t=++tt;return(null==n?"":n+"")+t},r.all=$,r.any=M,r.detect=N,r.foldl=T,r.foldr=B,r.include=k,r.inject=T,lr(r,function(n,t){r.prototype[t]||(r.prototype[t]=function(){var t=[this.__wrapped__];return Ot.apply(t,arguments),n.apply(r,t)})}),r.first=P,r.last=function(n,t,r){if(n){var e=n.length;return null==t||r?n[e-1]:v(n,Rt(0,e-t))}},r.take=P,r.head=P,lr(r,function(n,t){r.prototype[t]||(r.prototype[t]=function(t,e){var u=n(this.__wrapped__,t,e);return null==t||e?u:new r(u)
})}),r.VERSION="1.0.0-rc.3",r.prototype.toString=function(){return this.__wrapped__+""},r.prototype.value=J,r.prototype.valueOf=J,ar(["join","pop","shift"],function(n){var t=Z[n];r.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)}}),ar(["push","reverse","sort","unshift"],function(n){var t=Z[n];r.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),ar(["concat","slice","splice"],function(n){var t=Z[n];r.prototype[n]=function(){return new r(t.apply(this.__wrapped__,arguments))
}}),Ht&&ar(["pop","shift","splice"],function(n){var t=Z[n],e="splice"==n;r.prototype[n]=function(){var n=this.__wrapped__,u=t.apply(n,arguments);return 0===n.length&&delete n[0],e?new r(u):u}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=r,define(function(){return r})):Q?typeof module=="object"&&module&&module.exports==Q?(module.exports=r)._=r:Q._=r:n._=r})(this);
;(function(n,t){function r(n){return n&&typeof n=="object"&&n.__wrapped__?n:this instanceof r?(this.__wrapped__=n,void 0):new r(n)}function e(n,t,r){t||(t=0);var e=n.length,u=e-t>=(r||it);if(u)for(var o={},r=t-1;e>++r;){var i=n[r]+"";(Et.call(o,i)?o[i]:o[i]=[]).push(n[r])}return function(r){if(u){var e=r+"";return Et.call(o,e)&&C(o[e],r)>-1}return C(n,r,t)>-1}}function u(n){return n.charCodeAt(0)}function o(n,t){var r=n.b,e=t.b,n=n.a,t=t.a;if(n!==t){if(n>t||n===void 0)return 1;if(t>n||t===void 0)return-1
}return e>r?-1:1}function i(n,t,r){function e(){var a=arguments,f=o?this:t;return u||(n=t[i]),r.length&&(a=a.length?r.concat(v(a)):r),this instanceof e?(s.prototype=n.prototype,f=new s,s.prototype=W,a=n.apply(f,a),x(a)?a:f):n.apply(f,a)}var u=j(n),o=!r,i=t;return o&&(r=t),u||(t=n),e}function a(n,t,r){return n?typeof n!="function"?function(t){return t[n]}:t!==void 0?r?function(r,e,u,o){return n.call(t,r,e,u,o)}:function(r,e,u){return n.call(t,r,e,u)}:n:G}function f(){for(var n,t={b:"",c:"",e:nt,f:Qt,g:"",h:Xt,i:nr,j:wt,k:"",l:Q},r=0;n=arguments[r];r++)for(var e in n)t[e]=n[e];
if(n=t.a,t.d=/^[^,]+/.exec(n)[0],r="var i,l="+t.d+",t="+t.d+";if(!"+t.d+")return t;"+t.k+";",t.b?(r+="var m=l.length;i=-1;if(typeof m=='number'){",t.i&&(r+="if(k(l)){l=l.split('')}"),r+="while(++i<m){"+t.b+"}}else {"):t.h&&(r+="var m=l.length;i=-1;if(m&&j(l)){while(++i<m){i+='';"+t.g+"}}else {"),t.e||(r+="var u=typeof l=='function'&&s.call(l,'prototype');"),t.f&&t.l?(r+="var q=-1,r=p[typeof l]?n(l):[],m=r.length;while(++q<m){i=r[q];",t.e||(r+="if(!(u&&i=='prototype')){"),r+=t.g+"",t.e||(r+="}")):(r+="for(i in l){",(!t.e||t.l)&&(r+="if(",t.e||(r+="!(u&&i=='prototype')"),!t.e&&t.l&&(r+="&&"),t.l&&(r+="h.call(l,i)"),r+="){"),r+=t.g+";",(!t.e||t.l)&&(r+="}")),r+="}",t.e)for(r+="var f=l.constructor;",e=0;7>e;e++)r+="i='"+t.j[e]+"';if(","constructor"==t.j[e]&&(r+="!(f&&f.prototype===l)&&"),r+="h.call(l,i)){"+t.g+"}";
return(t.b||t.h)&&(r+="}"),r+=t.c+";return t",Function("e,h,j,k,p,n,s","return function("+n+"){"+r+"}")(a,Et,h,A,or,Dt,kt)}function c(n){return"\\"+ir[n]}function l(n){return hr[n]}function p(n){return typeof n.toString!="function"&&typeof(n+"")=="string"}function s(){}function v(n,t,r){t||(t=0),r===void 0&&(r=n?n.length:0);for(var e=-1,r=r-t||0,u=Array(0>r?0:r);r>++e;)u[e]=n[t+e];return u}function g(n){return yr[n]}function h(n){return $t.call(n)==Mt}function y(n){var t=X;if(!n||typeof n!="object"||h(n))return t;
var r=n.constructor;return!j(r)&&(!tr||!p(n))||r instanceof r?tt?(sr(n,function(n,r,e){return t=!Et.call(e,r),X}),t===X):(sr(n,function(n,r){t=r}),t===X||Et.call(n,t)):t}function m(n){var t=[];return vr(n,function(n,r){t.push(r)}),t}function _(n,t,r,e,u){if(n==W)return n;if(r&&(t=X),r=x(n)){var o=$t.call(n);if(!er[o]||tr&&p(n))return n;var i=_r(n)}if(!r||!t)return r?i?v(n):pr({},n):n;switch(r=ur[o],o){case zt:case Ct:return new r(+n);case Kt:case Vt:return new r(n);case Ut:return r(n.source,vt.exec(n))
}for(e||(e=[]),u||(u=[]),o=e.length;o--;)if(e[o]==n)return u[o];var a=i?r(n.length):{};return e.push(n),u.push(a),(i?R:vr)(n,function(n,r){a[r]=_(n,t,W,e,u)}),i&&(Et.call(n,"index")&&(a.index=n.index),Et.call(n,"input")&&(a.input=n.input)),a}function d(n){var t=[];return sr(n,function(n,r){j(n)&&t.push(r)}),t.sort()}function b(n){for(var t=-1,r=gr(n),e=r.length,u={};e>++t;){var o=r[t];u[n[o]]=o}return u}function w(n,t,r,e){if(n===t)return 0!==n||1/n==1/t;if(n==W||t==W)return n===t;var u=$t.call(n),o=$t.call(t);
if(u==Mt&&(u=Lt),o==Mt&&(o=Lt),u!=o)return X;switch(u){case zt:case Ct:return+n==+t;case Kt:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case Ut:case Vt:return n==t+""}if(o=u==Pt,!o){if(n.__wrapped__||t.__wrapped__)return w(n.__wrapped__||n,t.__wrapped__||t);if(u!=Lt||tr&&(p(n)||p(t)))return X;var u=!Yt&&h(n)?Object:n.constructor,i=!Yt&&h(t)?Object:t.constructor;if(!(u==i||j(u)&&u instanceof u&&j(i)&&i instanceof i))return X}for(r||(r=[]),e||(e=[]),u=r.length;u--;)if(r[u]==n)return e[u]==t;var a=Q,f=0;
if(r.push(n),e.push(t),o){if(f=n.length,a=f==t.length)for(;f--&&(a=w(n[f],t[f],r,e)););return a}return sr(n,function(n,u,o){return Et.call(o,u)?(f++,a=Et.call(t,u)&&w(n,t[u],r,e)):void 0}),a&&sr(t,function(n,t,r){return Et.call(r,t)?a=--f>-1:void 0}),a}function j(n){return typeof n=="function"}function x(n){return n?or[typeof n]:X}function O(n){return typeof n=="number"||$t.call(n)==Kt}function A(n){return typeof n=="string"||$t.call(n)==Vt}function E(n,t,r){var e=arguments,u=0,o=2,i=e[3],a=e[4];for(r!==ot&&(i=[],a=[],typeof r!="number"&&(o=e.length));o>++u;)vr(e[u],function(t,r){var e,u,o;
if(t&&((u=_r(t))||dr(t))){for(var f=i.length;f--&&!(e=i[f]==t););e?n[r]=a[f]:(i.push(t),a.push((o=n[r],o=u?_r(o)?o:[]:dr(o)?o:{})),n[r]=E(o,t,ot,i,a))}else t!=W&&(n[r]=t)});return n}function S(n){for(var t=-1,r=gr(n),e=r.length,u=Array(e);e>++t;)u[t]=n[r[t]];return u}function k(n,t,r){var e=-1,u=n?n.length:0,o=X,r=(0>r?It(0,u+r):r)||0;return typeof u=="number"?o=(A(n)?n.indexOf(t,r):C(n,t,r))>-1:lr(n,function(n){return r>++e?void 0:!(o=n===t)}),o}function $(n,t,r){var e=Q,t=a(t,r);if(_r(n))for(var r=-1,u=n.length;u>++r&&(e=!!t(n[r],r,n)););else lr(n,function(n,r,u){return e=!!t(n,r,u)
});return e}function q(n,t,r){var e=[],t=a(t,r);if(_r(n))for(var r=-1,u=n.length;u>++r;){var o=n[r];t(o,r,n)&&e.push(o)}else lr(n,function(n,r,u){t(n,r,u)&&e.push(n)});return e}function N(n,t,r){var e,t=a(t,r);return R(n,function(n,r,u){return t(n,r,u)?(e=n,X):void 0}),e}function R(n,t,r){if(t&&r===void 0&&_r(n))for(var r=-1,e=n.length;e>++r&&t(n[r],r,n)!==X;);else lr(n,t,r);return n}function F(n,t,r){var e=-1,u=n?n.length:0,o=Array(typeof u=="number"?u:0),t=a(t,r);if(_r(n))for(;u>++e;)o[e]=t(n[e],e,n);
else lr(n,function(n,r,u){o[++e]=t(n,r,u)});return o}function D(n,t,r){var e=-1/0,o=e;if(!t&&_r(n))for(var r=-1,i=n.length;i>++r;){var f=n[r];f>o&&(o=f)}else t=!t&&A(n)?u:a(t,r),lr(n,function(n,r,u){r=t(n,r,u),r>e&&(e=r,o=n)});return o}function I(n,t){return F(n,t+"")}function T(n,t,r,e){var u=3>arguments.length,t=a(t,e,ot);if(_r(n)){var o=-1,i=n.length;for(u&&(r=n[++o]);i>++o;)r=t(r,n[o],o,n)}else lr(n,function(n,e,o){r=u?(u=X,n):t(r,n,e,o)});return r}function B(n,t,r,e){var u=n,o=n?n.length:0,i=3>arguments.length;
if(typeof o!="number")var f=gr(n),o=f.length;else nr&&A(n)&&(u=n.split(""));return t=a(t,e,ot),R(n,function(n,e,a){e=f?f[--o]:--o,r=i?(i=X,u[e]):t(r,u[e],e,a)}),r}function M(n,t,r){var e,t=a(t,r);if(_r(n))for(var r=-1,u=n.length;u>++r&&!(e=t(n[r],r,n)););else lr(n,function(n,r,u){return!(e=t(n,r,u))});return!!e}function P(n,t,r){if(n){var e=n.length;return t==W||r?n[0]:v(n,0,Tt(It(0,t),e))}}function z(n,t){for(var r=-1,e=n?n.length:0,u=[];e>++r;){var o=n[r];_r(o)?St.apply(u,t?o:z(o)):u.push(o)}return u
}function C(n,t,r){var e=-1,u=n?n.length:0;if(typeof r=="number")e=(0>r?It(0,u+r):r||0)-1;else if(r)return e=L(n,t),n[e]===t?e:-1;for(;u>++e;)if(n[e]===t)return e;return-1}function K(n,t,r){return v(n,t==W||r?1:It(0,t))}function L(n,t,r,e){for(var u=0,o=n?n.length:u,r=r?a(r,e):G,t=r(t);o>u;)e=u+o>>>1,t>r(n[e])?u=e+1:o=e;return u}function U(n,t,r,e){var u=-1,o=n?n.length:0,i=[],f=i;typeof t=="function"&&(e=r,r=t,t=X);var c=!t&&o>=75;if(c)var l={};for(r&&(f=[],r=a(r,e));o>++u;){var e=n[u],p=r?r(e,u,n):e;
if(c)var s=p+"",s=Et.call(l,s)?!(f=l[s]):f=l[s]=[];(t?!u||f[f.length-1]!==p:s||0>C(f,p))&&((r||c)&&f.push(p),i.push(e))}return i}function V(n,t){return Jt||qt&&arguments.length>2?qt.call.apply(qt,arguments):i(n,t,v(arguments,2))}function G(n){return n}function H(n){R(d(n),function(t){var e=r[t]=n[t];r.prototype[t]=function(){var n=[this.__wrapped__];return St.apply(n,arguments),new r(e.apply(r,n))}})}function J(){return this.__wrapped__}var Q=!0,W=null,X=!1,Y=typeof exports=="object"&&exports,Z=typeof global=="object"&&global;
Z.global===Z&&(n=Z);var nt,tt,rt=[],et=new function(){},ut=0,ot=et,it=30,at=n._,ft=/[-?+=!~*%&^<>|{(\/]|\[\D|\b(?:delete|in|instanceof|new|typeof|void)\b/,ct=/&(?:amp|lt|gt|quot|#x27);/g,lt=/\b__p\+='';/g,pt=/\b(__p\+=)''\+/g,st=/(__e\(.*?\)|\b__t\))\+'';/g,vt=/\w*$/,gt=/(?:__e|__t=)\(\s*(?![\d\s"']|this\.)/g,ht=RegExp("^"+(et.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),yt=/\$\{((?:(?=\\?)\\?[\s\S])*?)}/g,mt=/<%=([\s\S]+?)%>/g,_t=/($^)/,dt=/[&<>"']/g,bt=/['\n\r\t\u2028\u2029\\]/g,wt="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),jt=Math.ceil,xt=rt.concat,Ot=Math.floor,At=ht.test(At=Object.getPrototypeOf)&&At,Et=et.hasOwnProperty,St=rt.push,kt=et.propertyIsEnumerable,$t=et.toString,qt=ht.test(qt=v.bind)&&qt,Nt=ht.test(Nt=Array.isArray)&&Nt,Rt=n.isFinite,Ft=n.isNaN,Dt=ht.test(Dt=Object.keys)&&Dt,It=Math.max,Tt=Math.min,Bt=Math.random,Mt="[object Arguments]",Pt="[object Array]",zt="[object Boolean]",Ct="[object Date]",Kt="[object Number]",Lt="[object Object]",Ut="[object RegExp]",Vt="[object String]",Gt=!!n.attachEvent,Ht=qt&&!/\n|true/.test(qt+Gt),Jt=qt&&!Ht,Qt=Dt&&(Gt||Ht),Wt=(Wt={0:1,length:1},rt.splice.call(Wt,0,1),Wt[0]),Xt=Q;
(function(){function n(){this.x=1}var t=[];n.prototype={valueOf:1,y:1};for(var r in new n)t.push(r);for(r in arguments)Xt=!r;nt=!/valueOf/.test(t),tt="x"!=t[0]})(1);var Yt=arguments.constructor==Object,Zt=!h(arguments),nr="xx"!="x"[0]+Object("x")[0];try{var tr=$t.call(document)==Lt}catch(rr){}var er={"[object Function]":X};er[Mt]=er[Pt]=er[zt]=er[Ct]=er[Kt]=er[Lt]=er[Ut]=er[Vt]=Q;var ur={};ur[Pt]=Array,ur[zt]=Boolean,ur[Ct]=Date,ur[Lt]=Object,ur[Kt]=Number,ur[Ut]=RegExp,ur[Vt]=String;var or={"boolean":X,"function":Q,object:Q,number:X,string:X,undefined:X},ir={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};
r.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:mt,variable:""};var ar={a:"o,v,g",k:"for(var a=1,b=typeof g=='number'?2:arguments.length;a<b;a++){if((l=arguments[a])){",g:"t[i]=l[i]",c:"}}"},fr={a:"d,c,w",k:"c=c&&typeof w=='undefined'?c:e(c,w)",b:"if(c(l[i],i,d)===false)return t",g:"if(c(l[i],i,d)===false)return t"},cr={b:W},lr=f(fr),pr=f(ar);Zt&&(h=function(n){return n?Et.call(n,"callee"):X});var sr=f(fr,cr,{l:X}),vr=f(fr,cr),gr=Dt?function(n){return typeof n=="function"&&kt.call(n,"prototype")?m(n):x(n)?Dt(n):[]
}:m,hr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"},yr=b(hr),mr=f(ar,{g:"if(t[i]==null)"+ar.g}),_r=Nt||function(n){return Yt&&n instanceof Array||$t.call(n)==Pt};j(/x/)&&(j=function(n){return n instanceof Function||"[object Function]"==$t.call(n)});var dr=At?function(n){if(!n||typeof n!="object")return X;var t=n.valueOf,r=typeof t=="function"&&(r=At(t))&&At(r);return r?n==r||At(n)==r&&!h(n):y(n)}:y;r.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0
}},r.assign=pr,r.at=function(n){var t=-1,r=xt.apply(rt,v(arguments,1)),e=r.length,u=Array(e);for(nr&&A(n)&&(n=n.split(""));e>++t;)u[t]=n[r[t]];return u},r.bind=V,r.bindAll=function(n){for(var t=arguments,r=t.length>1?0:(t=d(n),-1),e=t.length;e>++r;){var u=t[r];n[u]=V(n[u],n)}return n},r.bindKey=function(n,t){return i(n,t,v(arguments,2))},r.compact=function(n){for(var t=-1,r=n?n.length:0,e=[];r>++t;){var u=n[t];u&&e.push(u)}return e},r.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length;r--;)t=[n[r].apply(this,t)];
return t[0]}},r.countBy=function(n,t,r){var e={},t=a(t,r);return R(n,function(n,r,u){r=t(n,r,u)+"",Et.call(e,r)?e[r]++:e[r]=1}),e},r.debounce=function(n,t,r){function e(){a=W,r||(o=n.apply(i,u))}var u,o,i,a;return function(){var f=r&&!a;return u=arguments,i=this,clearTimeout(a),a=setTimeout(e,t),f&&(o=n.apply(i,u)),o}},r.defaults=mr,r.defer=function(n){var r=v(arguments,1);return setTimeout(function(){n.apply(t,r)},1)},r.delay=function(n,r){var e=v(arguments,2);return setTimeout(function(){n.apply(t,e)
},r)},r.difference=function(n){for(var t=-1,r=n?n.length:0,u=xt.apply(rt,arguments),u=e(u,r),o=[];r>++t;){var i=n[t];u(i)||o.push(i)}return o},r.filter=q,r.flatten=z,r.forEach=R,r.forIn=sr,r.forOwn=vr,r.functions=d,r.groupBy=function(n,t,r){var e={},t=a(t,r);return R(n,function(n,r,u){r=t(n,r,u)+"",(Et.call(e,r)?e[r]:e[r]=[]).push(n)}),e},r.initial=function(n,t,r){if(!n)return[];var e=n.length;return v(n,0,Tt(It(0,e-(t==W||r?1:t||0)),e))},r.intersection=function(n){var t=arguments,r=t.length,u={0:{}},o=-1,i=n?n.length:0,a=i>=100,f=[],c=f;
n:for(;i>++o;){var l=n[o];if(a)var p=l+"",p=Et.call(u[0],p)?!(c=u[0][p]):c=u[0][p]=[];if(p||0>C(c,l)){a&&c.push(l);for(var s=r;--s;)if(!(u[s]||(u[s]=e(t[s],0,100)))(l))continue n;f.push(l)}}return f},r.invert=b,r.invoke=function(n,t){var r=v(arguments,2),e=-1,u=typeof t=="function",o=n?n.length:0,i=Array(typeof o=="number"?o:0);return R(n,function(n){i[++e]=(u?t:n[t]).apply(n,r)}),i},r.keys=gr,r.map=F,r.max=D,r.memoize=function(n,t){var r={};return function(){var e=(t?t.apply(this,arguments):arguments[0])+"";
return Et.call(r,e)?r[e]:r[e]=n.apply(this,arguments)}},r.merge=E,r.min=function(n,t,r){var e=1/0,o=e;if(!t&&_r(n))for(var r=-1,i=n.length;i>++r;){var f=n[r];o>f&&(o=f)}else t=!t&&A(n)?u:a(t,r),lr(n,function(n,r,u){r=t(n,r,u),e>r&&(e=r,o=n)});return o},r.object=function(n,t){for(var r=-1,e=n?n.length:0,u={};e>++r;){var o=n[r];t?u[o]=t[r]:u[o[0]]=o[1]}return u},r.omit=function(n,t,r){var e=typeof t=="function",u={};if(e)t=a(t,r);else var o=xt.apply(rt,arguments);return sr(n,function(n,r,i){(e?!t(n,r,i):0>C(o,r,1))&&(u[r]=n)
}),u},r.once=function(n){var t,r=X;return function(){return r?t:(r=Q,t=n.apply(this,arguments),n=W,t)}},r.pairs=function(n){for(var t=-1,r=gr(n),e=r.length,u=Array(e);e>++t;){var o=r[t];u[t]=[o,n[o]]}return u},r.partial=function(n){return i(n,v(arguments,1))},r.pick=function(n,t,r){var e={};if(typeof t!="function")for(var u=0,o=xt.apply(rt,arguments),i=o.length;i>++u;){var f=o[u];f in n&&(e[f]=n[f])}else t=a(t,r),sr(n,function(n,r,u){t(n,r,u)&&(e[r]=n)});return e},r.pluck=I,r.range=function(n,t,r){n=+n||0,r=+r||1,t==W&&(t=n,n=0);
for(var e=-1,t=It(0,jt((t-n)/r)),u=Array(t);t>++e;)u[e]=n,n+=r;return u},r.reject=function(n,t,r){return t=a(t,r),q(n,function(n,r,e){return!t(n,r,e)})},r.rest=K,r.shuffle=function(n){var t=-1,r=n?n.length:0,e=Array(typeof r=="number"?r:0);return R(n,function(n){var r=Ot(Bt()*(++t+1));e[t]=e[r],e[r]=n}),e},r.sortBy=function(n,t,r){var e=-1,u=n?n.length:0,i=Array(typeof u=="number"?u:0),t=a(t,r);for(R(n,function(n,r,u){i[++e]={a:t(n,r,u),b:e,c:n}}),u=i.length,i.sort(o);u--;)i[u]=i[u].c;return i},r.tap=function(n,t){return t(n),n
},r.throttle=function(n,t){function r(){a=new Date,i=W,u=n.apply(o,e)}var e,u,o,i,a=0;return function(){var f=new Date,c=t-(f-a);return e=arguments,o=this,c>0?i||(i=setTimeout(r,c)):(clearTimeout(i),i=W,a=f,u=n.apply(o,e)),u}},r.times=function(n,t,r){for(var n=+n||0,e=-1,u=Array(n);n>++e;)u[e]=t.call(r,e);return u},r.toArray=function(n){return n&&typeof n.length=="number"?nr&&A(n)?n.split(""):v(n):S(n)},r.union=function(){return U(xt.apply(rt,arguments))},r.uniq=U,r.values=S,r.where=function(n,t){var r=gr(t);
return q(n,function(n){for(var e=r.length;e--;){var u=n[r[e]]===t[r[e]];if(!u)break}return!!u})},r.without=function(n){for(var t=-1,r=n?n.length:0,u=e(arguments,1,20),o=[];r>++t;){var i=n[t];u(i)||o.push(i)}return o},r.wrap=function(n,t){return function(){var r=[n];return St.apply(r,arguments),t.apply(this,r)}},r.zip=function(n){for(var t=-1,r=n?D(I(arguments,"length")):0,e=Array(r);r>++t;)e[t]=I(arguments,t);return e},r.collect=F,r.drop=K,r.each=R,r.extend=pr,r.methods=d,r.select=q,r.tail=K,r.unique=U,H(r),r.clone=_,r.cloneDeep=function(n){return _(n,Q)
},r.contains=k,r.escape=function(n){return n==W?"":(n+"").replace(dt,l)},r.every=$,r.find=N,r.has=function(n,t){return n?Et.call(n,t):X},r.identity=G,r.indexOf=C,r.isArguments=h,r.isArray=_r,r.isBoolean=function(n){return n===Q||n===X||$t.call(n)==zt},r.isDate=function(n){return n instanceof Date||$t.call(n)==Ct},r.isElement=function(n){return n?1===n.nodeType:X},r.isEmpty=function(n){var t=Q;if(!n)return t;var r=$t.call(n),e=n.length;return r==Pt||r==Vt||r==Mt||Zt&&h(n)||r==Lt&&typeof e=="number"&&j(n.splice)?!e:(vr(n,function(){return t=X
}),t)},r.isEqual=w,r.isFinite=function(n){return Rt(n)&&!Ft(parseFloat(n))},r.isFunction=j,r.isNaN=function(n){return O(n)&&n!=+n},r.isNull=function(n){return n===W},r.isNumber=O,r.isObject=x,r.isPlainObject=dr,r.isRegExp=function(n){return n instanceof RegExp||$t.call(n)==Ut},r.isString=A,r.isUndefined=function(n){return n===void 0},r.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(e=(0>r?It(0,e+r):Tt(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},r.mixin=H,r.noConflict=function(){return n._=at,this
},r.random=function(n,t){return n==W&&t==W&&(t=1),n=+n||0,t==W&&(t=n,n=0),n+Ot(Bt()*((+t||0)-n+1))},r.reduce=T,r.reduceRight=B,r.result=function(n,t){var r=n?n[t]:W;return j(r)?n[t]():r},r.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:gr(n).length},r.some=M,r.sortedIndex=L,r.template=function(n,t,e){n||(n=""),e||(e={});var u,o,i=r.templateSettings,a=0,f=e.interpolate||i.interpolate||_t,l="__p+='",p=e.variable||i.variable,s=p;n.replace(RegExp((e.escape||i.escape||_t).source+"|"+f.source+"|"+(f===mt?yt:_t).source+"|"+(e.evaluate||i.evaluate||_t).source+"|$","g"),function(t,r,e,o,i,f){return e||(e=o),l+=n.slice(a,f).replace(bt,c),r&&(l+="'+__e("+r+")+'"),i&&(l+="';"+i+";__p+='"),e&&(l+="'+((__t=("+e+"))==null?'':__t)+'"),u||(u=i||ft.test(r||e)),a=f+t.length,t
}),l+="';\n",s||(p="obj",u?l="with("+p+"){"+l+"}":(e=RegExp("(\\(\\s*)"+p+"\\."+p+"\\b","g"),l=l.replace(gt,"$&"+p+".").replace(e,"$1__d"))),l=(u?l.replace(lt,""):l).replace(pt,"$1").replace(st,"$1;"),l="function("+p+"){"+(s?"":p+"||("+p+"={});")+"var __t,__p='',__e=_.escape"+(u?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":(s?"":",__d="+p+"."+p+"||"+p)+";")+l+"return __p}";try{o=Function("_","return "+l)(r)}catch(v){throw v.source=l,v}return t?o(t):(o.source=l,o)},r.unescape=function(n){return n==W?"":(n+"").replace(ct,g)
},r.uniqueId=function(n){var t=++ut;return(n==W?"":n+"")+t},r.all=$,r.any=M,r.detect=N,r.foldl=T,r.foldr=B,r.include=k,r.inject=T,vr(r,function(n,t){r.prototype[t]||(r.prototype[t]=function(){var t=[this.__wrapped__];return St.apply(t,arguments),n.apply(r,t)})}),r.first=P,r.last=function(n,t,r){if(n){var e=n.length;return t==W||r?n[e-1]:v(n,It(0,e-t))}},r.take=P,r.head=P,vr(r,function(n,t){r.prototype[t]||(r.prototype[t]=function(t,e){var u=n(this.__wrapped__,t,e);return t==W||e?u:new r(u)})}),r.VERSION="1.0.0-rc.3",r.prototype.toString=function(){return this.__wrapped__+""
},r.prototype.value=J,r.prototype.valueOf=J,lr(["join","pop","shift"],function(n){var t=rt[n];r.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)}}),lr(["push","reverse","sort","unshift"],function(n){var t=rt[n];r.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),lr(["concat","slice","splice"],function(n){var t=rt[n];r.prototype[n]=function(){return new r(t.apply(this.__wrapped__,arguments))}}),Wt&&lr(["pop","shift","splice"],function(n){var t=rt[n],e="splice"==n;
r.prototype[n]=function(){var n=this.__wrapped__,u=t.apply(n,arguments);return 0===n.length&&delete n[0],e?new r(u):u}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=r,define(function(){return r})):Y?typeof module=="object"&&module&&module.exports==Y?(module.exports=r)._=r:Y._=r:n._=r})(this);

View File

@@ -1595,7 +1595,7 @@
callback = createCallback(callback, thisArg);
forEach(collection, function(value, key, collection) {
key = callback(value, key, collection);
key = callback(value, key, collection) + '';
(hasOwnProperty.call(result, key) ? result[key]++ : result[key] = 1);
});
return result;
@@ -1784,7 +1784,7 @@
callback = createCallback(callback, thisArg);
forEach(collection, function(value, key, collection) {
key = callback(value, key, collection);
key = callback(value, key, collection) + '';
(hasOwnProperty.call(result, key) ? result[key] : result[key] = []).push(value);
});
return result;
@@ -1814,11 +1814,13 @@
*/
function invoke(collection, methodName) {
var args = slice(arguments, 2),
index = -1,
isFunc = typeof methodName == 'function',
result = [];
length = collection ? collection.length : 0,
result = Array(typeof length == 'number' ? length : 0);
forEach(collection, function(value) {
result.push((isFunc ? methodName : value[methodName]).apply(value, args));
result[++index] = (isFunc ? methodName : value[methodName]).apply(value, args);
});
return result;
}
@@ -2106,7 +2108,8 @@
*/
function shuffle(collection) {
var index = -1,
result = Array(collection ? collection.length : 0);
length = collection ? collection.length : 0,
result = Array(typeof length == 'number' ? length : 0);
forEach(collection, function(value) {
var rand = floor(nativeRandom() * (++index + 1));
@@ -2208,18 +2211,20 @@
* // => ['moe', 'larry', 'brendan']
*/
function sortBy(collection, callback, thisArg) {
var result = [];
callback = createCallback(callback, thisArg);
var index = -1,
length = collection ? collection.length : 0,
result = Array(typeof length == 'number' ? length : 0);
forEach(collection, function(value, index, collection) {
result.push({
'criteria': callback(value, index, collection),
callback = createCallback(callback, thisArg);
forEach(collection, function(value, key, collection) {
result[++index] = {
'criteria': callback(value, key, collection),
'index': index,
'value': value
});
};
});
var length = result.length;
length = result.length;
result.sort(compareAscending);
while (length--) {
result[length] = result[length].value;
@@ -3110,7 +3115,7 @@
function memoize(func, resolver) {
var cache = {};
return function() {
var key = resolver ? resolver.apply(this, arguments) : arguments[0];
var key = (resolver ? resolver.apply(this, arguments) : arguments[0]) + '';
return hasOwnProperty.call(cache, key)
? cache[key]
: (cache[key] = func.apply(this, arguments));

View File

@@ -4,29 +4,29 @@
* Build: `lodash underscore -m -o ./lodash.underscore.min.js`
* Underscore.js 1.4.3 underscorejs.org/LICENSE
*/
;(function(n,t){function r(n,t){var r;if(n)for(r in t||(t=V),n)if(ft.call(n,r)&&t(n[r],r,n)===Y)break}function e(n,t){var r;if(n)for(r in t||(t=V),n)if(t(n[r],r,n)===Y)break}function u(n,t,r){if(n){var t=t&&r===void 0?t:f(t,r),e=n.length,r=-1;if(typeof e=="number")for(;e>++r&&t(n[r],r,n)!==Y;);else for(r in n)if(ft.call(n,r)&&t(n[r],r,n)===Y)break}}function o(n){return n&&typeof n=="object"&&n.__wrapped__?n:this instanceof o?(this.__wrapped__=n,void 0):new o(n)}function i(n,t){var r=n.b,e=t.b,n=n.a,t=t.a;
if(n!==t){if(n>t||n===void 0)return 1;if(t>n||t===void 0)return-1}return e>r?-1:1}function a(n,t,r){function e(){var u=arguments,o=t;return r.length&&(u=u.length?r.concat(p(u)):r),this instanceof e?(s.prototype=n.prototype,o=new s,s.prototype=J,u=n.apply(o,u),j(u)?u:o):n.apply(o,u)}return e}function f(n,t,r){return n?typeof n!="function"?function(t){return t[n]}:t!==void 0?r?function(r,e,u,o){return n.call(t,r,e,u,o)}:function(r,e,u){return n.call(t,r,e,u)}:n:V}function c(n){return"\\"+Ft[n]}function l(n){return Tt[n]
}function s(){}function p(n,t,r){t||(t=0),r===void 0&&(r=n?n.length:0);for(var e=-1,r=r-t||0,u=Array(0>r?0:r);r>++e;)u[e]=n[t+e];return u}function v(n){return qt[n]}function g(n){if(!n)return n;for(var t=1,r=arguments.length;r>t;t++){var e=arguments[t];if(e)for(var u in e)n[u]=e[u]}return n}function h(n){var t=[];return r(n,function(n,r){t.push(r)}),t}function _(n){if(!n)return n;for(var t=1,r=arguments.length;r>t;t++){var e=arguments[t];if(e)for(var u in e)n[u]==J&&(n[u]=e[u])}return n}function m(n){var t=[];
return e(n,function(n,r){b(n)&&t.push(r)}),t.sort()}function y(n){for(var t=-1,r=Rt(n),e=r.length,u={};e>++t;){var o=r[t];u[n[o]]=o}return u}function d(n,t,r,u){if(n===t)return 0!==n||1/n==1/t;if(n==J||t==J)return n===t;var o=lt.call(n),i=lt.call(t);if(o!=i)return K;switch(o){case bt:case jt:return+n==+t;case wt:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case At:case Et:return n==t+""}if(i=o==dt,!i){if(n.__wrapped__||t.__wrapped__)return d(n.__wrapped__||n,t.__wrapped__||t);if(o!=xt)return K;var o=n.constructor,a=t.constructor;
if(!(o==a||b(o)&&o instanceof o&&b(a)&&a instanceof a))return K}for(r||(r=[]),u||(u=[]),o=r.length;o--;)if(r[o]==n)return u[o]==t;var f=H,c=0;if(r.push(n),u.push(t),i){if(c=n.length,f=c==t.length)for(;c--&&(f=d(n[c],t[c],r,u)););return f}return e(n,function(n,e,o){return ft.call(o,e)?(c++,!(f=ft.call(t,e)&&d(n,t[e],r,u))&&Y):void 0}),f&&e(t,function(n,t,r){return ft.call(r,t)?!(f=--c>-1)&&Y:void 0}),f}function b(n){return typeof n=="function"}function j(n){return n?Nt[typeof n]:K}function w(n){return typeof n=="number"||lt.call(n)==wt
}function x(n){return typeof n=="string"||lt.call(n)==Et}function A(n){for(var t=-1,r=Rt(n),e=r.length,u=Array(e);e>++t;)u[t]=n[r[t]];return u}function E(n,t){var r=K;return typeof(n?n.length:0)=="number"?r=I(n,t)>-1:u(n,function(n){return(r=n===t)&&Y}),r}function O(n,t,r){var e=H,t=f(t,r);if(Bt(n))for(var r=-1,o=n.length;o>++r&&(e=!!t(n[r],r,n)););else u(n,function(n,r,u){return!(e=!!t(n,r,u))&&Y});return e}function S(n,t,r){var e=[],t=f(t,r);if(Bt(n))for(var r=-1,o=n.length;o>++r;){var i=n[r];t(i,r,n)&&e.push(i)
}else u(n,function(n,r,u){t(n,r,u)&&e.push(n)});return e}function k(n,t,r){var e,t=f(t,r);return N(n,function(n,r,u){return t(n,r,u)?(e=n,Y):void 0}),e}function N(n,t,r){if(t&&r===void 0&&Bt(n))for(var r=-1,e=n.length;e>++r&&t(n[r],r,n)!==Y;);else u(n,t,r)}function F(n,t,r){var e=-1,o=n?n.length:0,i=Array(typeof o=="number"?o:0),t=f(t,r);if(Bt(n))for(;o>++e;)i[e]=t(n[e],e,n);else u(n,function(n,r,u){i[++e]=t(n,r,u)});return i}function R(n,t,r){var e=-1/0,o=e;if(!t&&Bt(n))for(var r=-1,i=n.length;i>++r;){var a=n[r];
a>o&&(o=a)}else t=f(t,r),u(n,function(n,r,u){r=t(n,r,u),r>e&&(e=r,o=n)});return o}function T(n,t){return F(n,t+"")}function q(n,t,r,e){var o=3>arguments.length,t=f(t,e,Y);if(Bt(n)){var i=-1,a=n.length;for(o&&(r=n[++i]);a>++i;)r=t(r,n[i],i,n)}else u(n,function(n,e,u){r=o?(o=K,n):t(r,n,e,u)});return r}function B(n,t,r,e){var u=n?n.length:0,o=3>arguments.length;if(typeof u!="number")var i=Rt(n),u=i.length;return t=f(t,e,Y),N(n,function(e,a,f){a=i?i[--u]:--u,r=o?(o=K,n[a]):t(r,n[a],a,f)}),r}function D(n,t,r){var e,t=f(t,r);
if(Bt(n))for(var r=-1,o=n.length;o>++r&&!(e=t(n[r],r,n)););else u(n,function(n,r,u){return(e=t(n,r,u))&&Y});return!!e}function M(n,t,r){if(n){var e=n.length;return t==J||r?n[0]:p(n,0,mt(_t(0,t),e))}}function $(n,t){for(var r=-1,e=n?n.length:0,u=[];e>++r;){var o=n[r];Bt(o)?ct.apply(u,t?o:$(o)):u.push(o)}return u}function I(n,t,r){var e=-1,u=n?n.length:0;if(typeof r=="number")e=(0>r?_t(0,u+r):r||0)-1;else if(r)return e=C(n,t),n[e]===t?e:-1;for(;u>++e;)if(n[e]===t)return e;return-1}function z(n,t,r){return p(n,t==J||r?1:_t(0,t))
}function C(n,t,r,e){for(var u=0,o=n?n.length:u,r=r?f(r,e):V,t=r(t);o>u;)e=u+o>>>1,t>r(n[e])?u=e+1:o=e;return u}function P(n,t,r,e){var u=-1,o=n?n.length:0,i=[],a=i;for(typeof t=="function"&&(e=r,r=t,t=K),r&&(a=[],r=f(r,e));o>++u;){var e=n[u],c=r?r(e,u,n):e;(t?!u||a[a.length-1]!==c:0>I(a,c))&&(r&&a.push(c),i.push(e))}return i}function U(n,t){return Ot||st&&arguments.length>2?st.call.apply(st,arguments):a(n,t,p(arguments,2))}function V(n){return n}function G(n){N(m(n),function(t){var r=o[t]=n[t];o.prototype[t]=function(){var n=[this.__wrapped__];
return ct.apply(n,arguments),n=r.apply(o,n),this.__chain__&&(n=new o(n),n.__chain__=H),n}})}var H=!0,J=null,K=!1,L=typeof exports=="object"&&exports,Q=typeof global=="object"&&global;Q.global===Q&&(n=Q);var W=[],Q=new function(){},X=0,Y=Q,Z=n._,nt=/&(?:amp|lt|gt|quot|#x27);/g,tt=RegExp("^"+(Q.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),rt=/($^)/,et=/[&<>"']/g,ut=/['\n\r\t\u2028\u2029\\]/g,ot=Math.ceil,it=W.concat,at=Math.floor,ft=Q.hasOwnProperty,ct=W.push,lt=Q.toString,st=tt.test(st=p.bind)&&st,pt=tt.test(pt=Array.isArray)&&pt,vt=n.isFinite,gt=n.isNaN,ht=tt.test(ht=Object.keys)&&ht,_t=Math.max,mt=Math.min,yt=Math.random,dt="[object Array]",bt="[object Boolean]",jt="[object Date]",wt="[object Number]",xt="[object Object]",At="[object RegExp]",Et="[object String]",Q=!!n.attachEvent,Q=st&&!/\n|true/.test(st+Q),Ot=st&&!Q,St=(St={0:1,length:1},W.splice.call(St,0,1),St[0]),kt=arguments.constructor==Object,Nt={"boolean":K,"function":H,object:H,number:K,string:K,undefined:K},Ft={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};
o.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},o.isArguments=function(n){return"[object Arguments]"==lt.call(n)},o.isArguments(arguments)||(o.isArguments=function(n){return n?ft.call(n,"callee"):K});var Rt=ht?function(n){return j(n)?ht(n):[]}:h,Tt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"},qt=y(Tt),Bt=pt||function(n){return kt&&n instanceof Array||lt.call(n)==dt};b(/x/)&&(b=function(n){return n instanceof Function||"[object Function]"==lt.call(n)
}),o.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},o.bind=U,o.bindAll=function(n){for(var t=arguments,r=t.length>1?0:(t=m(n),-1),e=t.length;e>++r;){var u=t[r];n[u]=U(n[u],n)}return n},o.compact=function(n){for(var t=-1,r=n?n.length:0,e=[];r>++t;){var u=n[t];u&&e.push(u)}return e},o.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length;r--;)t=[n[r].apply(this,t)];return t[0]}},o.countBy=function(n,t,r){var e={},t=f(t,r);return N(n,function(n,r,u){r=t(n,r,u),ft.call(e,r)?e[r]++:e[r]=1
}),e},o.debounce=function(n,t,r){function e(){a=J,r||(o=n.apply(i,u))}var u,o,i,a;return function(){var f=r&&!a;return u=arguments,i=this,clearTimeout(a),a=setTimeout(e,t),f&&(o=n.apply(i,u)),o}},o.defaults=_,o.defer=function(n){var r=p(arguments,1);return setTimeout(function(){n.apply(t,r)},1)},o.delay=function(n,r){var e=p(arguments,2);return setTimeout(function(){n.apply(t,e)},r)},o.difference=function(n){for(var t=-1,r=n.length,e=it.apply(W,arguments),u=[];r>++t;){var o=n[t];0>I(e,o,r)&&u.push(o)
}return u},o.filter=S,o.flatten=$,o.forEach=N,o.functions=m,o.groupBy=function(n,t,r){var e={},t=f(t,r);return N(n,function(n,r,u){r=t(n,r,u),(ft.call(e,r)?e[r]:e[r]=[]).push(n)}),e},o.initial=function(n,t,r){if(!n)return[];var e=n.length;return p(n,0,mt(_t(0,e-(t==J||r?1:t||0)),e))},o.intersection=function(n){var t=arguments,r=t.length,e=-1,u=n?n.length:0,o=[];n:for(;u>++e;){var i=n[e];if(0>I(o,i)){for(var a=r;--a;)if(0>I(t[a],i))continue n;o.push(i)}}return o},o.invert=y,o.invoke=function(n,t){var r=p(arguments,2),e=typeof t=="function",u=[];
return N(n,function(n){u.push((e?t:n[t]).apply(n,r))}),u},o.keys=Rt,o.map=F,o.max=R,o.memoize=function(n,t){var r={};return function(){var e=t?t.apply(this,arguments):arguments[0];return ft.call(r,e)?r[e]:r[e]=n.apply(this,arguments)}},o.min=function(n,t,r){var e=1/0,o=e;if(!t&&Bt(n))for(var r=-1,i=n.length;i>++r;){var a=n[r];o>a&&(o=a)}else t=f(t,r),u(n,function(n,r,u){r=t(n,r,u),e>r&&(e=r,o=n)});return o},o.object=function(n,t){for(var r=-1,e=n?n.length:0,u={};e>++r;){var o=n[r];t?u[o]=t[r]:u[o[0]]=o[1]
}return u},o.omit=function(n){var t=it.apply(W,arguments),r={};return e(n,function(n,e){0>I(t,e,1)&&(r[e]=n)}),r},o.once=function(n){var t,r=K;return function(){return r?t:(r=H,t=n.apply(this,arguments),n=J,t)}},o.pairs=function(n){for(var t=-1,r=Rt(n),e=r.length,u=Array(e);e>++t;){var o=r[t];u[t]=[o,n[o]]}return u},o.pick=function(n){for(var t=0,r=it.apply(W,arguments),e=r.length,u={};e>++t;){var o=r[t];o in n&&(u[o]=n[o])}return u},o.pluck=T,o.range=function(n,t,r){n=+n||0,r=+r||1,t==J&&(t=n,n=0);
for(var e=-1,t=_t(0,ot((t-n)/r)),u=Array(t);t>++e;)u[e]=n,n+=r;return u},o.reject=function(n,t,r){return t=f(t,r),S(n,function(n,r,e){return!t(n,r,e)})},o.rest=z,o.shuffle=function(n){var t=-1,r=Array(n?n.length:0);return N(n,function(n){var e=at(yt()*(++t+1));r[t]=r[e],r[e]=n}),r},o.sortBy=function(n,t,r){var e=[],t=f(t,r);for(N(n,function(n,r,u){e.push({a:t(n,r,u),b:r,c:n})}),n=e.length,e.sort(i);n--;)e[n]=e[n].c;return e},o.tap=function(n,t){return t(n),n},o.throttle=function(n,t){function r(){a=new Date,i=J,u=n.apply(o,e)
}var e,u,o,i,a=0;return function(){var f=new Date,c=t-(f-a);return e=arguments,o=this,c>0?i||(i=setTimeout(r,c)):(clearTimeout(i),i=J,a=f,u=n.apply(o,e)),u}},o.times=function(n,t,r){for(var n=+n||0,e=-1,u=Array(n);n>++e;)u[e]=t.call(r,e);return u},o.toArray=function(n){return n&&typeof n.length=="number"?p(n):A(n)},o.union=function(){return P(it.apply(W,arguments))},o.uniq=P,o.values=A,o.where=function(n,t){var r=Rt(t);return S(n,function(n){for(var e=r.length;e--;){var u=n[r[e]]===t[r[e]];if(!u)break
}return!!u})},o.without=function(n){for(var t=-1,r=n.length,e=[];r>++t;){var u=n[t];0>I(arguments,u,1)&&e.push(u)}return e},o.wrap=function(n,t){return function(){var r=[n];return ct.apply(r,arguments),t.apply(this,r)}},o.zip=function(n){for(var t=-1,r=n?R(T(arguments,"length")):0,e=Array(r);r>++t;)e[t]=T(arguments,t);return e},o.collect=F,o.drop=z,o.each=N,o.extend=g,o.methods=m,o.select=S,o.tail=z,o.unique=P,o.clone=function(n){return n&&Nt[typeof n]?Bt(n)?p(n):g({},n):n},o.contains=E,o.escape=function(n){return n==J?"":(n+"").replace(et,l)
},o.every=O,o.find=k,o.has=function(n,t){return n?ft.call(n,t):K},o.identity=V,o.indexOf=I,o.isArray=Bt,o.isBoolean=function(n){return n===H||n===K||lt.call(n)==bt},o.isDate=function(n){return n instanceof Date||lt.call(n)==jt},o.isElement=function(n){return n?1===n.nodeType:K},o.isEmpty=function(n){if(!n)return H;if(Bt(n)||x(n))return!n.length;for(var t in n)if(ft.call(n,t))return K;return H},o.isEqual=d,o.isFinite=function(n){return vt(n)&&!gt(parseFloat(n))},o.isFunction=b,o.isNaN=function(n){return w(n)&&n!=+n
},o.isNull=function(n){return n===J},o.isNumber=w,o.isObject=j,o.isRegExp=function(n){return n instanceof RegExp||lt.call(n)==At},o.isString=x,o.isUndefined=function(n){return n===void 0},o.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(e=(0>r?_t(0,e+r):mt(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},o.mixin=G,o.noConflict=function(){return n._=Z,this},o.random=function(n,t){return n==J&&t==J&&(t=1),n=+n||0,t==J&&(t=n,n=0),n+at(yt()*((+t||0)-n+1))},o.reduce=q,o.reduceRight=B,o.result=function(n,t){var r=n?n[t]:J;
return b(r)?n[t]():r},o.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:Rt(n).length},o.some=D,o.sortedIndex=C,o.template=function(n,t,r){n||(n="");var r=_({},r,o.templateSettings),e=0,u="__p+='",i=r.variable;n.replace(RegExp((r.escape||rt).source+"|"+(r.interpolate||rt).source+"|"+(r.evaluate||rt).source+"|$","g"),function(t,r,o,i,a){u+=n.slice(e,a).replace(ut,c),u+=r?"'+_['escape']("+r+")+'":i?"';"+i+";__p+='":o?"'+((__t=("+o+"))==null?'':__t)+'":"",e=a+t.length}),u+="';\n",i||(i="obj",u="with("+i+"||{}){"+u+"}"),u="function("+i+"){var __t,__p='',__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+u+"return __p}";
try{var a=Function("_","return "+u)(o)}catch(f){throw f.source=u,f}return t?a(t):(a.source=u,a)},o.unescape=function(n){return n==J?"":(n+"").replace(nt,v)},o.uniqueId=function(n){var t=++X+"";return n?n+t:t},o.all=O,o.any=D,o.detect=k,o.foldl=q,o.foldr=B,o.include=E,o.inject=q,o.first=M,o.last=function(n,t,r){if(n){var e=n.length;return t==J||r?n[e-1]:p(n,_t(0,e-t))}},o.take=M,o.head=M,o.chain=function(n){return n=new o(n),n.__chain__=H,n},o.VERSION="1.0.0-rc.3",G(o),o.prototype.chain=function(){return this.__chain__=H,this
},o.prototype.value=function(){return this.__wrapped__},u("pop push reverse shift sort splice unshift".split(" "),function(n){var t=W[n];o.prototype[n]=function(){var n=this.__wrapped__;return t.apply(n,arguments),St&&0===n.length&&delete n[0],this}}),u(["concat","join","slice"],function(n){var t=W[n];o.prototype[n]=function(){var n=t.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new o(n),n.__chain__=H),n}}),L?typeof module=="object"&&module&&module.exports==L?(module.exports=o)._=o:L._=o:n._=o
;(function(n,r){function t(n,r){var t;if(n)for(t in r||(r=V),n)if(fr.call(n,t)&&r(n[t],t,n)===Y)break}function e(n,r){var t;if(n)for(t in r||(r=V),n)if(r(n[t],t,n)===Y)break}function u(n,r,t){if(n){var r=r&&t===void 0?r:f(r,t),e=n.length,t=-1;if(typeof e=="number")for(;e>++t&&r(n[t],t,n)!==Y;);else for(t in n)if(fr.call(n,t)&&r(n[t],t,n)===Y)break}}function o(n){return n&&typeof n=="object"&&n.__wrapped__?n:this instanceof o?(this.__wrapped__=n,void 0):new o(n)}function i(n,r){var t=n.b,e=r.b,n=n.a,r=r.a;
if(n!==r){if(n>r||n===void 0)return 1;if(r>n||r===void 0)return-1}return e>t?-1:1}function a(n,r,t){function e(){var u=arguments,o=r;return t.length&&(u=u.length?t.concat(p(u)):t),this instanceof e?(s.prototype=n.prototype,o=new s,s.prototype=J,u=n.apply(o,u),j(u)?u:o):n.apply(o,u)}return e}function f(n,r,t){return n?typeof n!="function"?function(r){return r[n]}:r!==void 0?t?function(t,e,u,o){return n.call(r,t,e,u,o)}:function(t,e,u){return n.call(r,t,e,u)}:n:V}function c(n){return"\\"+Fr[n]}function l(n){return Tr[n]
}function s(){}function p(n,r,t){r||(r=0),t===void 0&&(t=n?n.length:0);for(var e=-1,t=t-r||0,u=Array(0>t?0:t);t>++e;)u[e]=n[r+e];return u}function v(n){return qr[n]}function g(n){if(!n)return n;for(var r=1,t=arguments.length;t>r;r++){var e=arguments[r];if(e)for(var u in e)n[u]=e[u]}return n}function h(n){var r=[];return t(n,function(n,t){r.push(t)}),r}function _(n){if(!n)return n;for(var r=1,t=arguments.length;t>r;r++){var e=arguments[r];if(e)for(var u in e)n[u]==J&&(n[u]=e[u])}return n}function m(n){var r=[];
return e(n,function(n,t){b(n)&&r.push(t)}),r.sort()}function y(n){for(var r=-1,t=Rr(n),e=t.length,u={};e>++r;){var o=t[r];u[n[o]]=o}return u}function d(n,r,t,u){if(n===r)return 0!==n||1/n==1/r;if(n==J||r==J)return n===r;var o=lr.call(n),i=lr.call(r);if(o!=i)return K;switch(o){case br:case jr:return+n==+r;case wr:return n!=+n?r!=+r:0==n?1/n==1/r:n==+r;case xr:case Er:return n==r+""}if(i=o==dr,!i){if(n.__wrapped__||r.__wrapped__)return d(n.__wrapped__||n,r.__wrapped__||r);if(o!=Ar)return K;var o=n.constructor,a=r.constructor;
if(!(o==a||b(o)&&o instanceof o&&b(a)&&a instanceof a))return K}for(t||(t=[]),u||(u=[]),o=t.length;o--;)if(t[o]==n)return u[o]==r;var f=H,c=0;if(t.push(n),u.push(r),i){if(c=n.length,f=c==r.length)for(;c--&&(f=d(n[c],r[c],t,u)););return f}return e(n,function(n,e,o){return fr.call(o,e)?(c++,!(f=fr.call(r,e)&&d(n,r[e],t,u))&&Y):void 0}),f&&e(r,function(n,r,t){return fr.call(t,r)?!(f=--c>-1)&&Y:void 0}),f}function b(n){return typeof n=="function"}function j(n){return n?Nr[typeof n]:K}function w(n){return typeof n=="number"||lr.call(n)==wr
}function A(n){return typeof n=="string"||lr.call(n)==Er}function x(n){for(var r=-1,t=Rr(n),e=t.length,u=Array(e);e>++r;)u[r]=n[t[r]];return u}function E(n,r){var t=K;return typeof(n?n.length:0)=="number"?t=I(n,r)>-1:u(n,function(n){return(t=n===r)&&Y}),t}function O(n,r,t){var e=H,r=f(r,t);if(Br(n))for(var t=-1,o=n.length;o>++t&&(e=!!r(n[t],t,n)););else u(n,function(n,t,u){return!(e=!!r(n,t,u))&&Y});return e}function S(n,r,t){var e=[],r=f(r,t);if(Br(n))for(var t=-1,o=n.length;o>++t;){var i=n[t];r(i,t,n)&&e.push(i)
}else u(n,function(n,t,u){r(n,t,u)&&e.push(n)});return e}function k(n,r,t){var e,r=f(r,t);return N(n,function(n,t,u){return r(n,t,u)?(e=n,Y):void 0}),e}function N(n,r,t){if(r&&t===void 0&&Br(n))for(var t=-1,e=n.length;e>++t&&r(n[t],t,n)!==Y;);else u(n,r,t)}function F(n,r,t){var e=-1,o=n?n.length:0,i=Array(typeof o=="number"?o:0),r=f(r,t);if(Br(n))for(;o>++e;)i[e]=r(n[e],e,n);else u(n,function(n,t,u){i[++e]=r(n,t,u)});return i}function R(n,r,t){var e=-1/0,o=e;if(!r&&Br(n))for(var t=-1,i=n.length;i>++t;){var a=n[t];
a>o&&(o=a)}else r=f(r,t),u(n,function(n,t,u){t=r(n,t,u),t>e&&(e=t,o=n)});return o}function T(n,r){return F(n,r+"")}function q(n,r,t,e){var o=3>arguments.length,r=f(r,e,Y);if(Br(n)){var i=-1,a=n.length;for(o&&(t=n[++i]);a>++i;)t=r(t,n[i],i,n)}else u(n,function(n,e,u){t=o?(o=K,n):r(t,n,e,u)});return t}function B(n,r,t,e){var u=n?n.length:0,o=3>arguments.length;if(typeof u!="number")var i=Rr(n),u=i.length;return r=f(r,e,Y),N(n,function(e,a,f){a=i?i[--u]:--u,t=o?(o=K,n[a]):r(t,n[a],a,f)}),t}function D(n,r,t){var e,r=f(r,t);
if(Br(n))for(var t=-1,o=n.length;o>++t&&!(e=r(n[t],t,n)););else u(n,function(n,t,u){return(e=r(n,t,u))&&Y});return!!e}function M(n,r,t){if(n){var e=n.length;return r==J||t?n[0]:p(n,0,mr(_r(0,r),e))}}function $(n,r){for(var t=-1,e=n?n.length:0,u=[];e>++t;){var o=n[t];Br(o)?cr.apply(u,r?o:$(o)):u.push(o)}return u}function I(n,r,t){var e=-1,u=n?n.length:0;if(typeof t=="number")e=(0>t?_r(0,u+t):t||0)-1;else if(t)return e=C(n,r),n[e]===r?e:-1;for(;u>++e;)if(n[e]===r)return e;return-1}function z(n,r,t){return p(n,r==J||t?1:_r(0,r))
}function C(n,r,t,e){for(var u=0,o=n?n.length:u,t=t?f(t,e):V,r=t(r);o>u;)e=u+o>>>1,r>t(n[e])?u=e+1:o=e;return u}function P(n,r,t,e){var u=-1,o=n?n.length:0,i=[],a=i;for(typeof r=="function"&&(e=t,t=r,r=K),t&&(a=[],t=f(t,e));o>++u;){var e=n[u],c=t?t(e,u,n):e;(r?!u||a[a.length-1]!==c:0>I(a,c))&&(t&&a.push(c),i.push(e))}return i}function U(n,r){return Or||sr&&arguments.length>2?sr.call.apply(sr,arguments):a(n,r,p(arguments,2))}function V(n){return n}function G(n){N(m(n),function(r){var t=o[r]=n[r];o.prototype[r]=function(){var n=[this.__wrapped__];
return cr.apply(n,arguments),n=t.apply(o,n),this.__chain__&&(n=new o(n),n.__chain__=H),n}})}var H=!0,J=null,K=!1,L=typeof exports=="object"&&exports,Q=typeof global=="object"&&global;Q.global===Q&&(n=Q);var W=[],Q=new function(){},X=0,Y=Q,Z=n._,nr=/&(?:amp|lt|gt|quot|#x27);/g,rr=RegExp("^"+(Q.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),tr=/($^)/,er=/[&<>"']/g,ur=/['\n\r\t\u2028\u2029\\]/g,or=Math.ceil,ir=W.concat,ar=Math.floor,fr=Q.hasOwnProperty,cr=W.push,lr=Q.toString,sr=rr.test(sr=p.bind)&&sr,pr=rr.test(pr=Array.isArray)&&pr,vr=n.isFinite,gr=n.isNaN,hr=rr.test(hr=Object.keys)&&hr,_r=Math.max,mr=Math.min,yr=Math.random,dr="[object Array]",br="[object Boolean]",jr="[object Date]",wr="[object Number]",Ar="[object Object]",xr="[object RegExp]",Er="[object String]",Q=!!n.attachEvent,Q=sr&&!/\n|true/.test(sr+Q),Or=sr&&!Q,Sr=(Sr={0:1,length:1},W.splice.call(Sr,0,1),Sr[0]),kr=arguments.constructor==Object,Nr={"boolean":K,"function":H,object:H,number:K,string:K,undefined:K},Fr={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};
o.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},o.isArguments=function(n){return"[object Arguments]"==lr.call(n)},o.isArguments(arguments)||(o.isArguments=function(n){return n?fr.call(n,"callee"):K});var Rr=hr?function(n){return j(n)?hr(n):[]}:h,Tr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"},qr=y(Tr),Br=pr||function(n){return kr&&n instanceof Array||lr.call(n)==dr};b(/x/)&&(b=function(n){return n instanceof Function||"[object Function]"==lr.call(n)
}),o.after=function(n,r){return 1>n?r():function(){return 1>--n?r.apply(this,arguments):void 0}},o.bind=U,o.bindAll=function(n){for(var r=arguments,t=r.length>1?0:(r=m(n),-1),e=r.length;e>++t;){var u=r[t];n[u]=U(n[u],n)}return n},o.compact=function(n){for(var r=-1,t=n?n.length:0,e=[];t>++r;){var u=n[r];u&&e.push(u)}return e},o.compose=function(){var n=arguments;return function(){for(var r=arguments,t=n.length;t--;)r=[n[t].apply(this,r)];return r[0]}},o.countBy=function(n,r,t){var e={},r=f(r,t);return N(n,function(n,t,u){t=r(n,t,u)+"",fr.call(e,t)?e[t]++:e[t]=1
}),e},o.debounce=function(n,r,t){function e(){a=J,t||(o=n.apply(i,u))}var u,o,i,a;return function(){var f=t&&!a;return u=arguments,i=this,clearTimeout(a),a=setTimeout(e,r),f&&(o=n.apply(i,u)),o}},o.defaults=_,o.defer=function(n){var t=p(arguments,1);return setTimeout(function(){n.apply(r,t)},1)},o.delay=function(n,t){var e=p(arguments,2);return setTimeout(function(){n.apply(r,e)},t)},o.difference=function(n){for(var r=-1,t=n.length,e=ir.apply(W,arguments),u=[];t>++r;){var o=n[r];0>I(e,o,t)&&u.push(o)
}return u},o.filter=S,o.flatten=$,o.forEach=N,o.functions=m,o.groupBy=function(n,r,t){var e={},r=f(r,t);return N(n,function(n,t,u){t=r(n,t,u)+"",(fr.call(e,t)?e[t]:e[t]=[]).push(n)}),e},o.initial=function(n,r,t){if(!n)return[];var e=n.length;return p(n,0,mr(_r(0,e-(r==J||t?1:r||0)),e))},o.intersection=function(n){var r=arguments,t=r.length,e=-1,u=n?n.length:0,o=[];n:for(;u>++e;){var i=n[e];if(0>I(o,i)){for(var a=t;--a;)if(0>I(r[a],i))continue n;o.push(i)}}return o},o.invert=y,o.invoke=function(n,r){var t=p(arguments,2),e=-1,u=typeof r=="function",o=n?n.length:0,i=Array(typeof o=="number"?o:0);
return N(n,function(n){i[++e]=(u?r:n[r]).apply(n,t)}),i},o.keys=Rr,o.map=F,o.max=R,o.memoize=function(n,r){var t={};return function(){var e=(r?r.apply(this,arguments):arguments[0])+"";return fr.call(t,e)?t[e]:t[e]=n.apply(this,arguments)}},o.min=function(n,r,t){var e=1/0,o=e;if(!r&&Br(n))for(var t=-1,i=n.length;i>++t;){var a=n[t];o>a&&(o=a)}else r=f(r,t),u(n,function(n,t,u){t=r(n,t,u),e>t&&(e=t,o=n)});return o},o.object=function(n,r){for(var t=-1,e=n?n.length:0,u={};e>++t;){var o=n[t];r?u[o]=r[t]:u[o[0]]=o[1]
}return u},o.omit=function(n){var r=ir.apply(W,arguments),t={};return e(n,function(n,e){0>I(r,e,1)&&(t[e]=n)}),t},o.once=function(n){var r,t=K;return function(){return t?r:(t=H,r=n.apply(this,arguments),n=J,r)}},o.pairs=function(n){for(var r=-1,t=Rr(n),e=t.length,u=Array(e);e>++r;){var o=t[r];u[r]=[o,n[o]]}return u},o.pick=function(n){for(var r=0,t=ir.apply(W,arguments),e=t.length,u={};e>++r;){var o=t[r];o in n&&(u[o]=n[o])}return u},o.pluck=T,o.range=function(n,r,t){n=+n||0,t=+t||1,r==J&&(r=n,n=0);
for(var e=-1,r=_r(0,or((r-n)/t)),u=Array(r);r>++e;)u[e]=n,n+=t;return u},o.reject=function(n,r,t){return r=f(r,t),S(n,function(n,t,e){return!r(n,t,e)})},o.rest=z,o.shuffle=function(n){var r=-1,t=n?n.length:0,e=Array(typeof t=="number"?t:0);return N(n,function(n){var t=ar(yr()*(++r+1));e[r]=e[t],e[t]=n}),e},o.sortBy=function(n,r,t){var e=-1,u=n?n.length:0,o=Array(typeof u=="number"?u:0),r=f(r,t);for(N(n,function(n,t,u){o[++e]={a:r(n,t,u),b:e,c:n}}),u=o.length,o.sort(i);u--;)o[u]=o[u].c;return o},o.tap=function(n,r){return r(n),n
},o.throttle=function(n,r){function t(){a=new Date,i=J,u=n.apply(o,e)}var e,u,o,i,a=0;return function(){var f=new Date,c=r-(f-a);return e=arguments,o=this,c>0?i||(i=setTimeout(t,c)):(clearTimeout(i),i=J,a=f,u=n.apply(o,e)),u}},o.times=function(n,r,t){for(var n=+n||0,e=-1,u=Array(n);n>++e;)u[e]=r.call(t,e);return u},o.toArray=function(n){return n&&typeof n.length=="number"?p(n):x(n)},o.union=function(){return P(ir.apply(W,arguments))},o.uniq=P,o.values=x,o.where=function(n,r){var t=Rr(r);return S(n,function(n){for(var e=t.length;e--;){var u=n[t[e]]===r[t[e]];
if(!u)break}return!!u})},o.without=function(n){for(var r=-1,t=n.length,e=[];t>++r;){var u=n[r];0>I(arguments,u,1)&&e.push(u)}return e},o.wrap=function(n,r){return function(){var t=[n];return cr.apply(t,arguments),r.apply(this,t)}},o.zip=function(n){for(var r=-1,t=n?R(T(arguments,"length")):0,e=Array(t);t>++r;)e[r]=T(arguments,r);return e},o.collect=F,o.drop=z,o.each=N,o.extend=g,o.methods=m,o.select=S,o.tail=z,o.unique=P,o.clone=function(n){return n&&Nr[typeof n]?Br(n)?p(n):g({},n):n},o.contains=E,o.escape=function(n){return n==J?"":(n+"").replace(er,l)
},o.every=O,o.find=k,o.has=function(n,r){return n?fr.call(n,r):K},o.identity=V,o.indexOf=I,o.isArray=Br,o.isBoolean=function(n){return n===H||n===K||lr.call(n)==br},o.isDate=function(n){return n instanceof Date||lr.call(n)==jr},o.isElement=function(n){return n?1===n.nodeType:K},o.isEmpty=function(n){if(!n)return H;if(Br(n)||A(n))return!n.length;for(var r in n)if(fr.call(n,r))return K;return H},o.isEqual=d,o.isFinite=function(n){return vr(n)&&!gr(parseFloat(n))},o.isFunction=b,o.isNaN=function(n){return w(n)&&n!=+n
},o.isNull=function(n){return n===J},o.isNumber=w,o.isObject=j,o.isRegExp=function(n){return n instanceof RegExp||lr.call(n)==xr},o.isString=A,o.isUndefined=function(n){return n===void 0},o.lastIndexOf=function(n,r,t){var e=n?n.length:0;for(typeof t=="number"&&(e=(0>t?_r(0,e+t):mr(t,e-1))+1);e--;)if(n[e]===r)return e;return-1},o.mixin=G,o.noConflict=function(){return n._=Z,this},o.random=function(n,r){return n==J&&r==J&&(r=1),n=+n||0,r==J&&(r=n,n=0),n+ar(yr()*((+r||0)-n+1))},o.reduce=q,o.reduceRight=B,o.result=function(n,r){var t=n?n[r]:J;
return b(t)?n[r]():t},o.size=function(n){var r=n?n.length:0;return typeof r=="number"?r:Rr(n).length},o.some=D,o.sortedIndex=C,o.template=function(n,r,t){n||(n="");var t=_({},t,o.templateSettings),e=0,u="__p+='",i=t.variable;n.replace(RegExp((t.escape||tr).source+"|"+(t.interpolate||tr).source+"|"+(t.evaluate||tr).source+"|$","g"),function(r,t,o,i,a){u+=n.slice(e,a).replace(ur,c),u+=t?"'+_['escape']("+t+")+'":i?"';"+i+";__p+='":o?"'+((__t=("+o+"))==null?'':__t)+'":"",e=a+r.length}),u+="';\n",i||(i="obj",u="with("+i+"||{}){"+u+"}"),u="function("+i+"){var __t,__p='',__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+u+"return __p}";
try{var a=Function("_","return "+u)(o)}catch(f){throw f.source=u,f}return r?a(r):(a.source=u,a)},o.unescape=function(n){return n==J?"":(n+"").replace(nr,v)},o.uniqueId=function(n){var r=++X+"";return n?n+r:r},o.all=O,o.any=D,o.detect=k,o.foldl=q,o.foldr=B,o.include=E,o.inject=q,o.first=M,o.last=function(n,r,t){if(n){var e=n.length;return r==J||t?n[e-1]:p(n,_r(0,e-r))}},o.take=M,o.head=M,o.chain=function(n){return n=new o(n),n.__chain__=H,n},o.VERSION="1.0.0-rc.3",G(o),o.prototype.chain=function(){return this.__chain__=H,this
},o.prototype.value=function(){return this.__wrapped__},u("pop push reverse shift sort splice unshift".split(" "),function(n){var r=W[n];o.prototype[n]=function(){var n=this.__wrapped__;return r.apply(n,arguments),Sr&&0===n.length&&delete n[0],this}}),u(["concat","join","slice"],function(n){var r=W[n];o.prototype[n]=function(){var n=r.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new o(n),n.__chain__=H),n}}),L?typeof module=="object"&&module&&module.exports==L?(module.exports=o)._=o:L._=o:n._=o
})(this);