mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 15:57:48 +00:00
Use baseEach, baseForOwn and baseForIn to reduce dependencies on baseCreateCallback.
This commit is contained in:
133
dist/lodash.compat.js
vendored
133
dist/lodash.compat.js
vendored
@@ -984,9 +984,7 @@
|
||||
|
||||
var __p = 'var result = ' +
|
||||
(obj.init) +
|
||||
';\nif (!isObject(object)) {\n return result;\n}\n' +
|
||||
(obj.top) +
|
||||
';';
|
||||
';\nif (!isObject(object)) {\n return result;\n}';
|
||||
if (support.nonEnumArgs) {
|
||||
__p += '\nvar length = object.length;\nif (length && isArguments(object)) {\n key = -1;\n while (++key < length) {\n key += \'\';\n ' +
|
||||
(obj.loop) +
|
||||
@@ -1158,7 +1156,7 @@
|
||||
stackB.push(result);
|
||||
|
||||
// recursively populate clone (susceptible to call stack limits)
|
||||
(isArr ? baseEach : forOwn)(value, function(objValue, key) {
|
||||
(isArr ? baseEach : baseForOwn)(value, function(objValue, key) {
|
||||
result[key] = baseClone(objValue, isDeep, callback, stackA, stackB);
|
||||
});
|
||||
|
||||
@@ -1335,24 +1333,19 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* Iterates `arguments` objects, arrays, objects, and strings consistently
|
||||
* across environments, executing the callback for each element in the
|
||||
* collection. The callback is bound to `thisArg` and invoked with three
|
||||
* arguments; (value, index|key, collection). Callbacks may exit iteration
|
||||
* early by explicitly returning `false`.
|
||||
* The base implementation of `_.forEach` without support for callback
|
||||
* shorthands or `thisArg` binding.
|
||||
*
|
||||
* @private
|
||||
* @param {Array|Object|string} collection The collection to iterate over.
|
||||
* @param {Function} [callback=identity] The function called per iteration.
|
||||
* @param {*} [thisArg] The `this` binding of `callback`.
|
||||
* @param {Function} callback The function called per iteration.
|
||||
* @returns {Array|Object|string} Returns `collection`.
|
||||
*/
|
||||
function baseEach(collection, callback, thisArg) {
|
||||
function baseEach(collection, callback) {
|
||||
var index = -1,
|
||||
iterable = collection,
|
||||
length = collection ? collection.length : 0;
|
||||
|
||||
callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3);
|
||||
if (typeof length == 'number') {
|
||||
if (support.unindexedChars && isString(iterable)) {
|
||||
iterable = iterable.split('');
|
||||
@@ -1363,7 +1356,7 @@
|
||||
}
|
||||
}
|
||||
} else {
|
||||
forOwn(collection, callback);
|
||||
baseForOwn(collection, callback);
|
||||
}
|
||||
return collection;
|
||||
}
|
||||
@@ -1408,6 +1401,29 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.forOwn` without support for callback
|
||||
* shorthands or `thisArg` binding.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} callback The function called per iteration.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function baseForOwn(object, callback) {
|
||||
var index = -1,
|
||||
props = keys(object),
|
||||
length = props.length;
|
||||
|
||||
while (++index < length) {
|
||||
var key = props[index];
|
||||
if (callback(object[key], key, object) === false) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return object;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.isEqual`, without support for `thisArg` binding,
|
||||
* that allows partial "_.where" style comparisons.
|
||||
@@ -1555,7 +1571,7 @@
|
||||
else {
|
||||
// deep compare objects using `forIn`, instead of `forOwn`, to avoid `Object.keys`
|
||||
// which, in this case, is more costly
|
||||
forIn(b, function(value, key, b) {
|
||||
baseForIn(b, function(value, key, b) {
|
||||
if (hasOwnProperty.call(b, key)) {
|
||||
// count the number of properties.
|
||||
size++;
|
||||
@@ -1566,7 +1582,7 @@
|
||||
|
||||
if (result && !isWhere) {
|
||||
// ensure both objects have the same number of properties
|
||||
forIn(a, function(value, key, a) {
|
||||
baseForIn(a, function(value, key, a) {
|
||||
if (hasOwnProperty.call(a, key)) {
|
||||
// `size` will be `-1` if `a` has more properties than `b`
|
||||
return (result = --size > -1);
|
||||
@@ -1596,7 +1612,7 @@
|
||||
* @param {Array} [stackB=[]] Associates values with source counterparts.
|
||||
*/
|
||||
function baseMerge(object, source, callback, stackA, stackB) {
|
||||
(isArray(source) ? forEach : forOwn)(source, function(source, key) {
|
||||
(isArray(source) ? baseEach : baseForOwn)(source, function(source, key) {
|
||||
var found,
|
||||
isArr,
|
||||
result = source,
|
||||
@@ -1842,7 +1858,6 @@
|
||||
* @param {Object} [options] The compile options object.
|
||||
* @param {string} [options.args] A comma separated string of iteration function arguments.
|
||||
* @param {string} [options.init] The string representation of the initial `result` value.
|
||||
* @param {string} [options.top] Code to execute before the iteration branches.
|
||||
* @param {string} [options.loop] Code to execute in the object loop.
|
||||
* @param {boolean} [options.useHas] Specify using `hasOwnProperty` checks in the object loop.
|
||||
* @returns {Function} Returns the compiled function.
|
||||
@@ -1852,15 +1867,15 @@
|
||||
|
||||
// create the function factory
|
||||
var factory = Function(
|
||||
'baseCreateCallback, errorClass, errorProto, hasOwnProperty, isArguments, ' +
|
||||
'isObject, objectProto, nonEnumProps, stringClass, stringProto, toString',
|
||||
'errorClass, errorProto, hasOwnProperty, isArguments, isObject, objectProto, ' +
|
||||
'nonEnumProps, stringClass, stringProto, toString',
|
||||
'return function(' + options.args + ') {\n' + iteratorTemplate(options) + '\n}'
|
||||
);
|
||||
|
||||
// return the compiled function
|
||||
return factory(
|
||||
baseCreateCallback, errorClass, errorProto, hasOwnProperty, isArguments,
|
||||
isObject, objectProto, nonEnumProps, stringClass, stringProto, toString
|
||||
errorClass, errorProto, hasOwnProperty, isArguments, isObject, objectProto,
|
||||
nonEnumProps, stringClass, stringProto, toString
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1926,7 +1941,7 @@
|
||||
// iterated property is an object's own property then there are no inherited
|
||||
// enumerable properties.
|
||||
if (support.ownLast) {
|
||||
forIn(value, function(value, key, object) {
|
||||
baseForIn(value, function(value, key, object) {
|
||||
result = hasOwnProperty.call(object, key);
|
||||
return false;
|
||||
});
|
||||
@@ -1935,7 +1950,7 @@
|
||||
// In most environments an object's own properties are iterated before
|
||||
// its inherited properties. If the last iterated property is an object's
|
||||
// own property then there are no inherited enumerable properties.
|
||||
forIn(value, function(value, key) {
|
||||
baseForIn(value, function(value, key) {
|
||||
result = key;
|
||||
});
|
||||
return typeof result == 'undefined' || hasOwnProperty.call(value, result);
|
||||
@@ -1971,6 +1986,22 @@
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.forIn` without support for callback
|
||||
* shorthands or `thisArg` binding.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} callback The function called per iteration.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
var baseForIn = createIterator({
|
||||
'args': 'object, callback',
|
||||
'init': 'object',
|
||||
'loop': 'if (callback(object[key], key, object) === false) {\n return result;\n }',
|
||||
'useHas': false
|
||||
});
|
||||
|
||||
/**
|
||||
* A fallback implementation of `Object.keys` which produces an array of the
|
||||
* given object's own enumerable property names.
|
||||
@@ -1983,7 +2014,6 @@
|
||||
var shimKeys = createIterator({
|
||||
'args': 'object',
|
||||
'init': '[]',
|
||||
'top': '',
|
||||
'loop': 'result.push(key)',
|
||||
'useHas': true
|
||||
});
|
||||
@@ -3603,7 +3633,7 @@
|
||||
}
|
||||
}
|
||||
} else {
|
||||
baseEach(collection, callback, thisArg);
|
||||
baseEach(collection, baseCreateCallback(callback, thisArg, 3));
|
||||
}
|
||||
return collection;
|
||||
}
|
||||
@@ -3766,7 +3796,7 @@
|
||||
length = collection ? collection.length : 0,
|
||||
result = Array(typeof length == 'number' ? length : 0);
|
||||
|
||||
forEach(collection, function(value) {
|
||||
baseEach(collection, function(value) {
|
||||
result[++index] = (isFunc ? methodName : value[methodName]).apply(value, args);
|
||||
});
|
||||
return result;
|
||||
@@ -4184,7 +4214,7 @@
|
||||
length = collection ? collection.length : 0,
|
||||
result = Array(typeof length == 'number' ? length : 0);
|
||||
|
||||
forEach(collection, function(value) {
|
||||
baseEach(collection, function(value) {
|
||||
var rand = baseRandom(0, ++index);
|
||||
result[index] = result[rand];
|
||||
result[rand] = value;
|
||||
@@ -4339,7 +4369,7 @@
|
||||
if (!multi) {
|
||||
callback = lodash.createCallback(callback, thisArg, 3);
|
||||
}
|
||||
forEach(collection, function(value, key, collection) {
|
||||
baseEach(collection, function(value, key, collection) {
|
||||
var object = result[++index] = getObject();
|
||||
object.index = index;
|
||||
object.value = value;
|
||||
@@ -5347,7 +5377,7 @@
|
||||
function findKey(object, callback, thisArg) {
|
||||
var result;
|
||||
callback = lodash.createCallback(callback, thisArg, 3);
|
||||
forOwn(object, function(value, key, object) {
|
||||
baseForOwn(object, function(value, key, object) {
|
||||
if (callback(value, key, object)) {
|
||||
result = key;
|
||||
return false;
|
||||
@@ -5440,13 +5470,10 @@
|
||||
* });
|
||||
* // => logs 'x', 'y', and 'move' (property order is not guaranteed across environments)
|
||||
*/
|
||||
var forIn = createIterator({
|
||||
'args': 'object, callback, thisArg',
|
||||
'init': 'object',
|
||||
'top': "callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3)",
|
||||
'loop': 'if (callback(object[key], key, object) === false) {\n return result;\n }',
|
||||
'useHas': false
|
||||
});
|
||||
function forIn(object, callback, thisArg) {
|
||||
callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3);
|
||||
return baseForIn(object, callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is like `_.forIn` except that it iterates over elements
|
||||
@@ -5479,7 +5506,7 @@
|
||||
function forInRight(object, callback, thisArg) {
|
||||
var pairs = [];
|
||||
|
||||
forIn(object, function(value, key) {
|
||||
baseForIn(object, function(value, key) {
|
||||
pairs.push(key, value);
|
||||
});
|
||||
|
||||
@@ -5514,18 +5541,8 @@
|
||||
* // => logs '0', '1', and 'length' (property order is not guaranteed across environments)
|
||||
*/
|
||||
function forOwn(object, callback, thisArg) {
|
||||
var index = -1,
|
||||
props = keys(object),
|
||||
length = props.length;
|
||||
|
||||
callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3);
|
||||
while (++index < length) {
|
||||
var key = props[index];
|
||||
if (callback(object[key], key, object) === false) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return object;
|
||||
return baseForOwn(object, callback);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -5577,7 +5594,7 @@
|
||||
*/
|
||||
function functions(object) {
|
||||
var result = [];
|
||||
forIn(object, function(value, key) {
|
||||
baseForIn(object, function(value, key) {
|
||||
if (isFunction(value)) {
|
||||
result.push(key);
|
||||
}
|
||||
@@ -5769,7 +5786,7 @@
|
||||
(className == objectClass && typeof length == 'number' && isFunction(value.splice))) {
|
||||
return !length;
|
||||
}
|
||||
forOwn(value, function() {
|
||||
baseForOwn(value, function() {
|
||||
return (result = false);
|
||||
});
|
||||
return result;
|
||||
@@ -6130,7 +6147,7 @@
|
||||
var result = {};
|
||||
callback = lodash.createCallback(callback, thisArg, 3);
|
||||
|
||||
forOwn(object, function(value, key, object) {
|
||||
baseForOwn(object, function(value, key, object) {
|
||||
result[key] = callback(value, key, object);
|
||||
});
|
||||
return result;
|
||||
@@ -6249,7 +6266,7 @@
|
||||
var result = {};
|
||||
if (typeof callback != 'function') {
|
||||
var props = [];
|
||||
forIn(object, function(value, key) {
|
||||
baseForIn(object, function(value, key) {
|
||||
props.push(key);
|
||||
});
|
||||
props = baseDifference(props, baseFlatten(arguments, true, false, 1));
|
||||
@@ -6263,7 +6280,7 @@
|
||||
}
|
||||
} else {
|
||||
callback = lodash.createCallback(callback, thisArg, 3);
|
||||
forIn(object, function(value, key, object) {
|
||||
baseForIn(object, function(value, key, object) {
|
||||
if (!callback(value, key, object)) {
|
||||
result[key] = value;
|
||||
}
|
||||
@@ -6341,7 +6358,7 @@
|
||||
}
|
||||
} else {
|
||||
callback = lodash.createCallback(callback, thisArg, 3);
|
||||
forIn(object, function(value, key, object) {
|
||||
baseForIn(object, function(value, key, object) {
|
||||
if (callback(value, key, object)) {
|
||||
result[key] = value;
|
||||
}
|
||||
@@ -6395,7 +6412,7 @@
|
||||
}
|
||||
if (callback) {
|
||||
callback = lodash.createCallback(callback, thisArg, 4);
|
||||
(isArr ? baseEach : forOwn)(object, function(value, index, object) {
|
||||
(isArr ? baseEach : baseForOwn)(object, function(value, index, object) {
|
||||
return callback(accumulator, value, index, object);
|
||||
});
|
||||
}
|
||||
@@ -7390,7 +7407,7 @@
|
||||
|
||||
mixin(function() {
|
||||
var source = {}
|
||||
forOwn(lodash, function(func, methodName) {
|
||||
baseForOwn(lodash, function(func, methodName) {
|
||||
if (!lodash.prototype[methodName]) {
|
||||
source[methodName] = func;
|
||||
}
|
||||
@@ -7409,7 +7426,7 @@
|
||||
lodash.take = first;
|
||||
lodash.head = first;
|
||||
|
||||
forOwn(lodash, function(func, methodName) {
|
||||
baseForOwn(lodash, function(func, methodName) {
|
||||
var callbackable = methodName !== 'sample';
|
||||
if (!lodash.prototype[methodName]) {
|
||||
lodash.prototype[methodName]= function(n, guard) {
|
||||
|
||||
110
dist/lodash.compat.min.js
vendored
110
dist/lodash.compat.min.js
vendored
@@ -3,60 +3,60 @@
|
||||
* Lo-Dash 2.4.1 (Custom Build) lodash.com/license | Underscore.js 1.5.2 underscorejs.org/LICENSE
|
||||
* Build: `lodash -o ./dist/lodash.compat.js`
|
||||
*/
|
||||
;(function(){function n(n,t){if(n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1}return 0}function t(n,t,r){r=(r||0)-1;for(var e=n?n.length:0;++r<e;)if(n[r]===t)return r;return-1}function r(n,t){return n.has(t)?0:-1}function e(n){return n.charCodeAt(0)}function u(n,t){for(var r=-1,e=n.length;++r<e&&0<=t.indexOf(n.charAt(r)););return r}function o(n,t){for(var r=n.length;r--&&0<=t.indexOf(n.charAt(r)););return r}function a(t,r){return n(t.i,r.i)||t.j-r.j}function i(t,r){for(var e=t.i,u=r.i,o=-1,a=e.length;++o<a;){var i=n(e[o],u[o]);
|
||||
if(i)return i}return t.j-r.j}function l(n){return ct[n]}function f(n){return"\\"+gt[n]}function c(){return j.pop()||[]}function p(n){return typeof n.toString!="function"&&typeof(n+"")=="string"}function s(n){n.length=0,j.length<N&&j.push(n)}function g(n){n.i=n.k=null,x.length<N&&x.push(n)}function h(n,t){return(n=null==n?"":n+"")?null==t?n.slice(m(n),d(n)+1):(t+="",n.slice(u(n,t),o(n,t)+1)):n}function v(n,t){return(n=null==n?"":n+"")?null==t?n.slice(m(n)):(t+="",n.slice(u(n,t))):n}function y(n,t){return(n=null==n?"":n+"")?null==t?n.slice(0,d(n)+1):(t+="",n.slice(0,o(n,t)+1)):n
|
||||
}function m(n){for(var t=-1,r=n.length;++t<r;){var e=n.charCodeAt(t);if((160<e||9>e||13<e)&&32!=e&&160!=e&&5760!=e&&6158!=e&&(8192>e||8202<e&&8232!=e&&8233!=e&&8239!=e&&8287!=e&&12288!=e&&65279!=e))break}return t}function d(n){for(var t=n.length;t--;){var r=n.charCodeAt(t);if((160<r||9>r||13<r)&&32!=r&&160!=r&&5760!=r&&6158!=r&&(8192>r||8202<r&&8232!=r&&8233!=r&&8239!=r&&8287!=r&&12288!=r&&65279!=r))break}return t}function b(n){return pt[n]}function _(n){function u(n){return n&&typeof n=="object"&&!he(n)&&Dr.call(n,"__wrapped__")?n:new o(n)
|
||||
}function o(n,t){this.__chain__=!!t,this.__wrapped__=n}function m(n){function t(){if(e){var n=It(e);Fr.apply(n,arguments)}if(this instanceof t){var o=j(r.prototype),n=r.apply(o,n||arguments);return ur(n)?n:o}return r.apply(u,n||arguments)}var r=n[0],e=n[2],u=n[4];return ie(t,n),t}function d(n,t,r,e,u){if(r){var o=r(n);if(typeof o!="undefined")return o}if(!ur(n))return n;var a=Sr.call(n);if(!it[a]||!ae.nodeClass&&p(n))return n;var i=ue[a];switch(a){case Z:case nt:return new i(+n);case et:case at:return new i(n);
|
||||
case ot:return o=i(n.source,K.exec(n)),o.lastIndex=n.lastIndex,o}if(a=he(n),t){var l=!e;e||(e=c()),u||(u=c());for(var f=e.length;f--;)if(e[f]==n)return u[f];o=a?i(n.length):{}}else o=a?It(n):Qt({},n);return a&&(Dr.call(n,"index")&&(o.index=n.index),Dr.call(n,"input")&&(o.input=n.input)),t?(e.push(n),u.push(o),(a?st:Zt)(n,function(n,a){o[a]=d(n,t,r,e,u)}),l&&(s(e),s(u)),o):o}function j(n){return ur(n)?Ur(n):{}}function N(n,t,r){if(typeof n!="function")return lr;if(typeof t=="undefined"||!("prototype"in n))return n;
|
||||
var e=n.__bindData__;if(typeof e=="undefined"&&(ae.funcNames&&(e=!n.name),e=e||!ae.funcDecomp,!e)){var u=Tr.call(n);ae.funcNames||(e=!M.test(u)),e||(e=X.test(u),ie(n,e))}if(false===e||true!==e&&e[1]&k)return n;switch(r){case 1:return function(r){return n.call(t,r)};case 2:return function(r,e){return n.call(t,r,e)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,o){return n.call(t,r,e,u,o)}}return Ht(n,t)}function ct(n){function t(){var n=l?a:this;if(u){var g=It(u);Fr.apply(g,arguments)
|
||||
}return(o||c)&&(g||(g=It(arguments)),o&&Fr.apply(g,o),c&&g.length<i)?(e|=S,e&=~A,ct([r,p?e:e&~(k|O),g,null,a,i])):(g||(g=arguments),f&&(r=n[s]),this instanceof t?(n=j(r.prototype),g=r.apply(n,g),ur(g)?g:n):r.apply(n,g))}var r=n[0],e=n[1],u=n[2],o=n[3],a=n[4],i=n[5],l=e&k,f=e&O,c=e&E,p=e&q,s=r;return ie(t,n),t}function pt(n,e){var u=-1,o=Ct(),a=n?n.length:0,i=[];for(Lr&&a>=I&&o===t&&(o=r,e=wt(e));++u<a;){var l=n[u];0>o(e,l)&&i.push(l)}return i}function st(n,t,r){var e=-1,u=n,o=n?n.length:0;if(t=t&&typeof r=="undefined"?t:N(t,r,3),typeof o=="number")for(ae.unindexedChars&&ar(u)&&(u=u.split(""));++e<o&&false!==t(u[e],e,n););else Zt(n,t);
|
||||
return n}function gt(n,t,r,e){e=(e||0)-1;for(var u=n?n.length:0,o=[];++e<u;){var a=n[e];if(a&&typeof a=="object"&&typeof a.length=="number"&&(he(a)||Et(a))){t||(a=gt(a,t,r));var i=-1,l=a.length,f=o.length;for(o.length+=l;++i<l;)o[f++]=a[i]}else r||o.push(a)}return o}function vt(n,t,r,e,u,o){if(r){var a=r(n,t);if(typeof a!="undefined")return!!a}if(n===t)return 0!==n||1/n==1/t;var i=typeof n,l=typeof t;if(n===n&&(!n||"function"!=i&&"object"!=i)&&(!t||"function"!=l&&"object"!=l))return false;if(null==n||null==t)return n===t;
|
||||
if(l=Sr.call(n),i=Sr.call(t),l==Q&&(l=ut),i==Q&&(i=ut),l!=i)return false;switch(l){case Z:case nt:return+n==+t;case et:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case ot:case at:return n==wr(t)}if(i=l==Y,!i){var f=Dr.call(n,"__wrapped__"),g=Dr.call(t,"__wrapped__");if(f||g)return vt(f?n.__wrapped__:n,g?t.__wrapped__:t,r,e,u,o);if(l!=ut||!ae.nodeClass&&(p(n)||p(t)))return false;if(l=!ae.argsObject&&Et(n)?br:n.constructor,f=!ae.argsObject&&Et(t)?br:t.constructor,l!=f&&!(Dr.call(n,"constructor")&&Dr.call(t,"constructor")||er(l)&&l instanceof l&&er(f)&&f instanceof f)&&"constructor"in n&&"constructor"in t)return false
|
||||
}for(l=!u,u||(u=c()),o||(o=c()),f=u.length;f--;)if(u[f]==n)return o[f]==t;var h=0,a=true;if(u.push(n),o.push(t),i){if(f=n.length,h=t.length,(a=h==f)||e)for(;h--;)if(i=f,g=t[h],e)for(;i--&&!(a=vt(n[i],g,r,e,u,o)););else if(!(a=vt(n[h],g,r,e,u,o)))break}else ge(t,function(t,i,l){return Dr.call(l,i)?(h++,a=Dr.call(n,i)&&vt(n[i],t,r,e,u,o)):void 0}),a&&!e&&ge(n,function(n,t,r){return Dr.call(r,t)?a=-1<--h:void 0});return u.pop(),o.pop(),l&&(s(u),s(o)),a}function yt(n,t,r,e,u){(he(t)?Wt:Zt)(t,function(t,o){var a,i,l=t,f=n[o];
|
||||
if(t&&((i=he(t))||ve(t))){for(l=e.length;l--;)if(a=e[l]==t){f=u[l];break}if(!a){var c;r&&(l=r(f,t),c=typeof l!="undefined")&&(f=l),c||(f=i?he(f)?f:[]:ve(f)?f:{}),e.push(t),u.push(f),c||yt(f,t,r,e,u)}}else r&&(l=r(f,t),typeof l=="undefined"&&(l=t)),typeof l!="undefined"&&(f=l);n[o]=f})}function dt(n,t){return n+Rr(ne()*(t-n+1))}function bt(n,e,u){var o=-1,a=Ct(),i=n?n.length:0,l=Lr&&!e&&i>=I&&a===t,f=[];if(l)var p=wt(),a=r;else p=u?c():f;for(;++o<i;){var g=n[o],h=u?u(g,o,n):g;(e?!o||p[p.length-1]!==h:0>a(p,h))&&((u||l)&&p.push(h),f.push(g))
|
||||
}return!l&&u&&s(p),f}function _t(n){return function(t,r,e){var o={};if(r=u.createCallback(r,e,3),he(t)){e=-1;for(var a=t.length;++e<a;){var i=t[e];n(o,i,r(i,e,t),t)}}else st(t,function(t,e,u){n(o,t,r(t,e,u),u)});return o}}function wt(n){var t=new Lr,r=n?n.length:0;for(t.push=t.add;r--;)t.push(n[r]);return t}function jt(n,t,r,e,u,o){var a=t&k,i=t&E,l=t&S,f=t&A;if(!(t&O||er(n)))throw new jr;l&&!r.length&&(t&=-17,l=r=false),f&&!e.length&&(t&=-33,f=e=false);var c=n&&n.__bindData__;return c&&true!==c?(c=It(c),c[2]&&(c[2]=It(c[2])),c[3]&&(c[3]=It(c[3])),!a||c[1]&k||(c[4]=u),!a&&c[1]&k&&(t|=8),!i||c[1]&E||(c[5]=o),l&&Fr.apply(c[2]||(c[2]=[]),r),f&&zr.apply(c[3]||(c[3]=[]),e),c[1]|=t,jt.apply(null,c)):(t==k||t==(k|S)?m:ct)([n,t,r,e,u,o])
|
||||
}function xt(n){n.d=J;var t=yr,r="return function("+n.a+"){",e="var s="+n.b+";if(!k(q)){return s}"+n.e+";";ae.nonEnumArgs&&(e+="var n=q.length;if(n&&j(q)){m=-1;while(++m<n){m+='';"+n.c+";}return s}"),ae.enumPrototypes&&(e+="var u=typeof q=='function';"),ae.enumErrorProps&&(e+="var t=q===g||q instanceof Error;");var u=[];if(ae.enumPrototypes&&u.push("!(u&&m=='prototype')"),ae.enumErrorProps&&u.push("!(t&&(m=='message'||m=='name'))"),e+="for(var m in q){",n.f&&u.push("h.call(q,m)"),u.length&&(e+="if("+u.join("&&")+"){"),e+=n.c+";",u.length&&(e+="}"),e+="}",ae.nonEnumShadows){for(e+="if(q!==r){var e=q.constructor,l=q===(e&&e.prototype),c=q===w?v:q===g?f:y.call(q),o=p[c];",u=0;7>u;u++)e+="m='"+n.d[u]+"';if((!(l&&o[m])&&h.call(q,m))",n.f||(e+="||(!o[m]&&q[m]!==r[m])"),e+="){"+n.c+"}";
|
||||
e+="}"}return t("a,f,g,h,j,k,r,p,v,w,y",r+(e+"return s;")+"}")(N,tt,Cr,Dr,Et,ur,kr,oe,at,Or,Sr)}function Ct(){var n=(n=u.indexOf)===St?t:n;return n}function kt(n){return typeof n=="function"&&Ar.test(Tr.call(n))}function Ot(n){var t,r;return!n||Sr.call(n)!=ut||!Dr.call(n,"constructor")&&(t=n.constructor,er(t)&&!(t instanceof t))||!ae.argsClass&&Et(n)||!ae.nodeClass&&p(n)?false:ae.ownLast?(ge(n,function(n,t,e){return r=Dr.call(e,t),false}),false!==r):(ge(n,function(n,t){r=t}),typeof r=="undefined"||Dr.call(n,r))
|
||||
}function Et(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Sr.call(n)==Q||false}function qt(n,t,r){var e=0,o=n?n.length:0;if(typeof t!="number"&&null!=t){var a=-1;for(t=u.createCallback(t,r,3);++a<o&&t(n[a],a,n);)e++}else if(e=t,null==e||r)return n?n[0]:w;return It(n,0,0<e?e:0)}function St(n,r,e){var u=n?n.length:0;if(typeof e=="number")e=0>e?Jr(0,u+e):e||0;else if(e)return e=Nt(n,r),u&&n[e]===r?e:-1;return t(n,r,e)}function At(n,t,r){if(typeof t!="number"&&null!=t){var e=0,o=-1,a=n?n.length:0;
|
||||
for(t=u.createCallback(t,r,3);++o<a&&t(n[o],o,n);)e++}else e=null==t||r?1:0<t?t:0;return It(n,e)}function It(n,t,r){var e=-1,u=n?n.length:0;for(typeof t=="undefined"?t=0:0>t?t=Jr(u+t,0):t>u&&(t=u),typeof r=="undefined"?r=u:0>r?r=Jr(u+r,0):r>u&&(r=u),u=r-t||0,r=gr(u);++e<u;)r[e]=n[t+e];return r}function Nt(n,t,r,e){var o=0,a=n?n.length:o;for(r=r?u.createCallback(r,e,1):lr,t=r(t);o<a;)e=o+a>>>1,r(n[e])<t?o=e+1:a=e;return o}function Rt(n,t,r,e){var o=typeof t;return"boolean"!=o&&null!=t&&(e=r,r=t,t=false,"number"!=o&&"string"!=o||!e||e[r]!==n||(r=null)),null!=r&&(r=u.createCallback(r,e,3)),bt(n,t,r)
|
||||
}function Tt(){for(var n=1<arguments.length?arguments:arguments[0],t=-1,r=n?Mt(se(n,"length")):0,e=gr(0>r?0:r);++t<r;)e[t]=se(n,t);return e}function Pt(n,t){var r=-1,e=n?n.length:0,u={};for(t||!e||he(n[0])||(t=[]);++r<e;){var o=n[r];t?u[o]=t[r]:o&&(u[o[0]]=o[1])}return u}function Dt(){return this.__wrapped__}function Ft(n,t,r){var e=n?n.length:0;if(r=typeof r=="number"?r:0,typeof e=="number"){if(r>=e)return false;if(typeof n=="string"||!he(n)&&ar(n))return Mr?Mr.call(n,t,r):-1<n.indexOf(t,r);var u=Ct();
|
||||
return r=(0>r?Jr(0,e+r):r)||0,-1<u(n,t,r)}var o=-1,a=false;return st(n,function(n){return++o<r?void 0:!(a=n===t)}),a}function $t(n,t,r){var e=true;if(t=u.createCallback(t,r,3),he(n)){r=-1;for(var o=n.length;++r<o&&(e=!!t(n[r],r,n)););}else st(n,function(n,r,u){return e=!!t(n,r,u)});return e}function Lt(n,t,r){var e=[];if(t=u.createCallback(t,r,3),he(n)){r=-1;for(var o=n.length;++r<o;){var a=n[r];t(a,r,n)&&e.push(a)}}else st(n,function(n,r,u){t(n,r,u)&&e.push(n)});return e}function Bt(n,t,r){if(t=u.createCallback(t,r,3),!he(n)){var e;
|
||||
return st(n,function(n,r,u){return t(n,r,u)?(e=n,false):void 0}),e}r=-1;for(var o=n.length;++r<o;){var a=n[r];if(t(a,r,n))return a}}function Wt(n,t,r){if(t&&typeof r=="undefined"&&he(n)){r=-1;for(var e=n.length;++r<e&&false!==t(n[r],r,n););}else st(n,t,r);return n}function zt(n,t,r){var e=n,u=n?n.length:0;if(t=t&&typeof r=="undefined"?t:N(t,r,3),he(n))for(;u--&&false!==t(n[u],u,n););else{if(typeof u!="number")var o=ye(n),u=o.length;else ae.unindexedChars&&ar(n)&&(e=n.split(""));st(e,function(r,a){return a=o?o[--u]:--u,t(e[a],a,n)
|
||||
})}return n}function Kt(n,t,r){var e=-1,o=n?n.length:0,a=gr(typeof o=="number"?o:0);if(t=u.createCallback(t,r,3),he(n))for(;++e<o;)a[e]=t(n[e],e,n);else st(n,function(n,r,u){a[++e]=t(n,r,u)});return a}function Mt(n,t,r){var o=-1/0,a=o,i=typeof t;if("number"!=i&&"string"!=i||!r||r[t]!==n||(t=null),null==t&&he(n))for(r=-1,i=n.length;++r<i;){var l=n[r];l>a&&(a=l)}else t=null==t&&ar(n)?e:u.createCallback(t,r,3),st(n,function(n,r,e){r=t(n,r,e),r>o&&(o=r,a=n)});return a}function Ut(n,t,r,e){var o=3>arguments.length;
|
||||
if(t=u.createCallback(t,e,4),he(n)){var a=-1,i=n.length;for(o&&i&&(r=n[++a]);++a<i;)r=t(r,n[a],a,n)}else st(n,function(n,e,u){r=o?(o=false,n):t(r,n,e,u)});return r}function Vt(n,t,r,e){var o=3>arguments.length;return t=u.createCallback(t,e,4),zt(n,function(n,e,u){r=o?(o=false,n):t(r,n,e,u)}),r}function Xt(n){var t=-1,r=n?n.length:0,e=gr(typeof r=="number"?r:0);return Wt(n,function(n){var r=dt(0,++t);e[t]=e[r],e[r]=n}),e}function Gt(n,t,r){var e;if(t=u.createCallback(t,r,3),he(n)){r=-1;for(var o=n.length;++r<o&&!(e=t(n[r],r,n)););}else st(n,function(n,r,u){return!(e=t(n,r,u))
|
||||
});return!!e}function Ht(n,t){return 2<arguments.length?jt(n,k|S,It(arguments,2),null,t):jt(n,k,null,null,t)}function Jt(n,t,r){function e(){c&&Nr(c),a=c=p=w,(h||g!==t)&&(s=_e(),i=n.apply(f,o),c||a||(o=f=null))}function u(){var r=t-(_e()-l);0<r?c=Br(u,r):(a&&Nr(a),r=p,a=c=p=w,r&&(s=_e(),i=n.apply(f,o),c||a||(o=f=null)))}var o,a,i,l,f,c,p,s=0,g=false,h=true;if(!er(n))throw new jr;if(t=Jr(0,t)||0,true===r)var v=true,h=false;else ur(r)&&(v=r.leading,g="maxWait"in r&&(Jr(t,r.maxWait)||0),h="trailing"in r?r.trailing:h);
|
||||
return function(){if(o=arguments,l=_e(),f=this,p=h&&(c||!v),false===g)var r=v&&!c;else{a||v||(s=l);var y=g-(l-s),m=0>=y;m?(a&&(a=Nr(a)),s=l,i=n.apply(f,o)):a||(a=Br(e,y))}return m&&c?c=Nr(c):c||t===g||(c=Br(u,t)),r&&(m=true,i=n.apply(f,o)),!m||c||a||(o=f=null),i}}function Qt(n,t,r){var e=arguments,u=0,o=e.length,a=typeof r;if("number"!=a&&"string"!=a||!e[3]||e[3][r]!==t||(o=2),3<o&&"function"==typeof e[o-2])var i=N(e[--o-1],e[o--],2);else 2<o&&"function"==typeof e[o-1]&&(i=e[--o]);for(;++u<o;)if(t=e[u],ur(t))for(var a=-1,l=ye(t),f=l.length;++a<f;){var c=l[a];
|
||||
n[c]=i?i(n[c],t[c]):t[c]}return n}function Yt(n,t,r){var e=arguments,u=0,o=e.length,a=typeof r;for("number"!=a&&"string"!=a||!e[3]||e[3][r]!==t||(o=2);++u<o;)if(t=e[u],ur(t))for(var a=-1,i=ye(t),l=i.length;++a<l;){var f=i[a];"undefined"==typeof n[f]&&(n[f]=t[f])}return n}function Zt(n,t,r){var e=-1,u=ye(n),o=u.length;for(t=t&&typeof r=="undefined"?t:N(t,r,3);++e<o&&(r=u[e],false!==t(n[r],r,n)););return n}function nr(n,t,r){var e=ye(n),u=e.length;for(t=N(t,r,3);u--&&(r=e[u],false!==t(n[r],r,n)););return n
|
||||
}function tr(n){var t=[];return ge(n,function(n,r){er(n)&&t.push(r)}),t.sort()}function rr(n){return n&&typeof n=="object"&&1===n.nodeType&&(ae.nodeClass?-1<Sr.call(n).indexOf("Element"):p(n))||false}function er(n){return typeof n=="function"}function ur(n){var t=typeof n;return n&&("function"==t||"object"==t)||false}function or(n){var t=typeof n;return"number"==t||n&&"object"==t&&Sr.call(n)==et||false}function ar(n){return typeof n=="string"||n&&typeof n=="object"&&Sr.call(n)==at||false}function ir(n){for(var t=-1,r=ye(n),e=r.length,u=gr(e);++t<e;)u[t]=n[r[t]];
|
||||
return u}function lr(n){return n}function fr(n){n||(n={});var t=ye(n),r=t[0],e=n[r];return 1!=t.length||e!==e||ur(e)?function(r){for(var e=t.length,u=false;e--&&(u=vt(r[t[e]],n[t[e]],null,true)););return u}:function(n){return n=n[r],e===n&&(0!==e||1/e==1/n)}}function cr(n,t,r){var e=true,o=t&&tr(t);t&&(r||o.length)||(null==r&&(r=t),t=n,n=u,o=tr(t)),false===r?e=false:ur(r)&&"chain"in r&&(e=r.chain),r=-1;for(var a=er(n),i=o?o.length:0;++r<i;){var l=o[r],f=n[l]=t[l];a&&(n.prototype[l]=function(t){return function(){var r=this.__chain__,u=this.__wrapped__,o=[u];
|
||||
if(Fr.apply(o,arguments),o=t.apply(n,o),e||r){if(u===o&&ur(o))return this;o=new n(o),o.__chain__=r}return o}}(f))}}function pr(){}function sr(n){return function(t){return t[n]}}n=n?mt.defaults(ht.Object(),n,mt.pick(ht,H)):ht;var gr=n.Array,hr=n.Boolean,vr=n.Date,yr=n.Function,mr=n.Math,dr=n.Number,br=n.Object,_r=n.RegExp,wr=n.String,jr=n.TypeError,xr=gr.prototype,Cr=n.Error.prototype,kr=br.prototype,Or=wr.prototype,Er=(Er=n.window)&&Er.document,qr=n._,Sr=kr.toString,Ar=_r("^"+wr(Sr).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ir=mr.ceil,Nr=n.clearTimeout,Rr=mr.floor,Tr=yr.prototype.toString,Pr=kt(Pr=br.getPrototypeOf)&&Pr,Dr=kr.hasOwnProperty,Fr=xr.push,$r=kr.propertyIsEnumerable,Lr=kt(Lr=n.Set)&&Lr,Br=n.setTimeout,Wr=xr.splice,zr=xr.unshift,Kr=function(){try{var n={},t=kt(t=br.defineProperty)&&t,r=t(n,n,n)&&t
|
||||
}catch(e){}return r}(),Mr=kt(Mr=Or.contains)&&Mr,Ur=kt(Ur=br.create)&&Ur,Vr=kt(Vr=gr.isArray)&&Vr,Xr=n.isFinite,Gr=n.isNaN,Hr=kt(Hr=br.keys)&&Hr,Jr=mr.max,Qr=mr.min,Yr=kt(Yr=vr.now)&&Yr,Zr=n.parseInt,ne=mr.random,te=kt(te=Or.trim)&&!te.call(R)&&te,re=kt(re=Or.trimLeft)&&!re.call(R)&&re,ee=kt(ee=Or.trimRight)&&!ee.call(R)&&ee,ue={};ue[Y]=gr,ue[Z]=hr,ue[nt]=vr,ue[rt]=yr,ue[ut]=br,ue[et]=dr,ue[ot]=_r,ue[at]=wr;var oe={};oe[Y]=oe[nt]=oe[et]={constructor:true,toLocaleString:true,toString:true,valueOf:true},oe[Z]=oe[at]={constructor:true,toString:true,valueOf:true},oe[tt]=oe[rt]=oe[ot]={constructor:true,toString:true},oe[ut]={constructor:true},function(){for(var n=J.length;n--;){var t,r=J[n];
|
||||
for(t in oe)Dr.call(oe,t)&&!Dr.call(oe[t],r)&&(oe[t][r]=false)}}(),o.prototype=u.prototype;var ae=u.support={};!function(){function t(){this.x=1}var r={0:1,length:1},e=[];t.prototype={valueOf:1,y:1};for(var u in new t)e.push(u);for(u in arguments);ae.argsClass=Sr.call(arguments)==Q,ae.argsObject=arguments.constructor==br&&!(arguments instanceof gr),ae.enumErrorProps=$r.call(Cr,"message")||$r.call(Cr,"name"),ae.enumPrototypes=$r.call(t,"prototype"),ae.funcDecomp=!kt(n.WinRTError)&&X.test(_),ae.funcNames=typeof yr.name=="string",ae.nonEnumArgs=0!=u,ae.nonEnumShadows=!/valueOf/.test(e),ae.ownLast="x"!=e[0],ae.spliceObjects=(Wr.call(r,0,1),!r[0]),ae.unindexedChars="xx"!="x"[0]+br("x")[0];
|
||||
try{ae.dom=11===Er.createDocumentFragment().nodeType}catch(o){ae.dom=false}try{ae.nodeClass=!(Sr.call(undefined)==ut&&!({toString:0}+""))}catch(a){ae.nodeClass=true}}(1),u.templateSettings={escape:L,evaluate:B,interpolate:W,variable:"",imports:{_:u}},Ur||(j=function(){function t(){}return function(r){if(ur(r)){t.prototype=r;var e=new t;t.prototype=null}return e||n.Object()}}());var ie=Kr?function(n,t){ft.value=t,Kr(n,"__bindData__",ft)}:pr;ae.argsClass||(Et=function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Dr.call(n,"callee")&&!$r.call(n,"callee")||false
|
||||
});var le=xt({a:"q",b:"[]",e:"",c:"s.push(m)",f:true}),fe=_t(function(n,t,r){Dr.call(n,r)?n[r]++:n[r]=1}),ce=_t(function(n,t,r){Dr.call(n,r)?n[r].push(t):n[r]=[t]}),pe=_t(function(n,t,r){n[r]=t}),se=Kt,ge=xt({a:"q,b,x",b:"q",e:"b=b&&typeof x=='undefined'?b:a(b,x,3)",c:"if(b(q[m],m,q)===false){return s}",f:false}),he=Vr||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Sr.call(n)==Y||false};ae.dom||(rr=function(n){return n&&typeof n=="object"&&1===n.nodeType&&!ve(n)||false}),er(/x/)&&(er=function(n){return typeof n=="function"&&Sr.call(n)==rt
|
||||
});var ve=Pr?function(n){if(!n||Sr.call(n)!=ut||!ae.argsClass&&Et(n))return false;var t=n.valueOf,r=kt(t)&&(r=Pr(t))&&Pr(r);return r?n==r||Pr(n)==r:Ot(n)}:Ot,ye=Hr?function(n){return ur(n)?ae.enumPrototypes&&typeof n=="function"||ae.nonEnumArgs&&n.length&&Et(n)?le(n):Hr(n):[]}:le,me=te?function(n,t){return null==n?"":null==t?te.call(n):h(n,t)}:h,de=re?function(n,t){return null==n?"":null==t?re.call(n):v(n,t)}:v,be=ee?function(n,t){return null==n?"":null==t?ee.call(n):y(n,t)}:y,_e=Yr||function(){return(new vr).getTime()
|
||||
},we=8==Zr(R+"08")?Zr:function(n,t){return n=me(n),Zr(n,+t||(U.test(n)?16:10))};return u.after=function(n,t){if(!er(t))throw new jr;return function(){return 1>--n?t.apply(this,arguments):void 0}},u.assign=Qt,u.at=function(n,t){var r=arguments,e=-1,u=gt(r,true,false,1),o=u.length,a=typeof t;for("number"!=a&&"string"!=a||!r[2]||r[2][t]!==n||(o=1),ae.unindexedChars&&ar(n)&&(n=n.split("")),r=gr(o);++e<o;)r[e]=n[u[e]];return r},u.bind=Ht,u.bindAll=function(n){for(var t=1<arguments.length?gt(arguments,true,false,1):tr(n),r=-1,e=t.length;++r<e;){var u=t[r];
|
||||
n[u]=jt(n[u],k,null,null,n)}return n},u.bindKey=function(n,t){return 2<arguments.length?jt(t,k|O|S,It(arguments,2),null,n):jt(t,k|O,null,null,n)},u.chain=function(n){return n=new o(n),n.__chain__=true,n},u.compact=function(n){for(var t=-1,r=n?n.length:0,e=0,u=[];++t<r;){var o=n[t];o&&(u[e++]=o)}return u},u.compose=function(){for(var n=arguments,t=n.length;t--;)if(!er(n[t]))throw new jr;return function(){for(var t=arguments,r=n.length;r--;)t=[n[r].apply(this,t)];return t[0]}},u.constant=function(n){return function(){return n
|
||||
}},u.countBy=fe,u.create=function(n,t){var r=j(n);return t?Qt(r,t):r},u.createCallback=function(n,t,r){var e=typeof n;return null==n||"function"==e?N(n,t,r):"object"!=e?sr(n):fr(n)},u.curry=function(n,t){return t=typeof t=="number"?t:+t||n.length,jt(n,E,null,null,null,t)},u.debounce=Jt,u.defaults=Yt,u.defer=function(n){if(!er(n))throw new jr;var t=It(arguments,1);return Br(function(){n.apply(w,t)},1)},u.delay=function(n,t){if(!er(n))throw new jr;var r=It(arguments,2);return Br(function(){n.apply(w,r)
|
||||
},t)},u.difference=function(n){return pt(n,gt(arguments,true,true,1))},u.filter=Lt,u.flatten=function(n,t,r,e){var u=typeof t;return"boolean"!=u&&null!=t&&(e=r,r=t,t=false,"number"!=u&&"string"!=u||!e||e[r]!==n||(r=null)),null!=r&&(n=Kt(n,r,e)),gt(n,t)},u.forEach=Wt,u.forEachRight=zt,u.forIn=ge,u.forInRight=function(n,t,r){var e=[];ge(n,function(n,t){e.push(t,n)});var u=e.length;for(t=N(t,r,3);u--&&false!==t(e[u--],e[u],n););return n},u.forOwn=Zt,u.forOwnRight=nr,u.functions=tr,u.groupBy=ce,u.indexBy=pe,u.initial=function(n,t,r){var e=0,o=n?n.length:0;
|
||||
if(typeof t!="number"&&null!=t){var a=o;for(t=u.createCallback(t,r,3);a--&&t(n[a],a,n);)e++}else e=null==t||r?1:t||e;return e=o-e,It(n,0,0<e?e:0)},u.intersection=function(){for(var n=[],e=-1,u=arguments.length,o=c(),a=Ct(),i=Lr&&a===t,l=c();++e<u;){var f=arguments[e];(he(f)||Et(f))&&(n.push(f),o.push(i&&f.length>=I&&wt(e?n[e]:l)))}var i=n[0],p=-1,g=i?i.length:0,h=[];n:for(;++p<g;){var v=o[0],f=i[p];if(0>(v?r(v,f):a(l,f))){for(e=u,(v||l).push(f);--e;)if(v=o[e],0>(v?r(v,f):a(n[e],f)))continue n;h.push(f)
|
||||
}}return s(o),s(l),h},u.invert=function(n,t){for(var r=-1,e=ye(n),u=e.length,o={};++r<u;){var a=e[r],i=n[a];t?Dr.call(o,i)?o[i].push(a):o[i]=[a]:o[i]=a}return o},u.invoke=function(n,t){var r=It(arguments,2),e=-1,u=typeof t=="function",o=n?n.length:0,a=gr(typeof o=="number"?o:0);return Wt(n,function(n){a[++e]=(u?t:n[t]).apply(n,r)}),a},u.keys=ye,u.map=Kt,u.mapValues=function(n,t,r){var e={};return t=u.createCallback(t,r,3),Zt(n,function(n,r,u){e[r]=t(n,r,u)}),e},u.match=fr,u.max=Mt,u.memoize=function(n,t){function r(){var e=r.cache,u=t?t.apply(this,arguments):"_"+arguments[0];
|
||||
return Dr.call(e,u)?e[u]:e[u]=n.apply(this,arguments)}if(!er(n))throw new jr;return r.cache={},r},u.merge=function(n,t,r){if(!ur(n))return n;var e=arguments,u=e.length,o=typeof r;if("number"!=o&&"string"!=o||!e[3]||e[3][r]!==t||(u=2),3<u&&"function"==typeof e[u-2])var a=N(e[--u-1],e[u--],2);else 2<u&&"function"==typeof e[u-1]&&(a=e[--u]);for(var e=It(arguments,1,u),o=-1,i=c(),l=c();++o<u;)yt(n,e[o],a,i,l);return s(i),s(l),n},u.min=function(n,t,r){var o=1/0,a=o,i=typeof t;if("number"!=i&&"string"!=i||!r||r[t]!==n||(t=null),null==t&&he(n))for(r=-1,i=n.length;++r<i;){var l=n[r];
|
||||
l<a&&(a=l)}else t=null==t&&ar(n)?e:u.createCallback(t,r,3),st(n,function(n,r,e){r=t(n,r,e),r<o&&(o=r,a=n)});return a},u.omit=function(n,t,r){var e={};if(typeof t!="function"){var o=[];ge(n,function(n,t){o.push(t)});for(var o=pt(o,gt(arguments,true,false,1)),a=-1,i=o.length;++a<i;){var l=o[a];e[l]=n[l]}}else t=u.createCallback(t,r,3),ge(n,function(n,r,u){t(n,r,u)||(e[r]=n)});return e},u.once=function(n){var t,r;if(!er(n))throw new jr;return function(){return t?r:(t=true,r=n.apply(this,arguments),n=null,r)
|
||||
}},u.pairs=function(n){for(var t=-1,r=ye(n),e=r.length,u=gr(e);++t<e;){var o=r[t];u[t]=[o,n[o]]}return u},u.partial=function(n){return jt(n,S,It(arguments,1))},u.partialRight=function(n){return jt(n,A,null,It(arguments,1))},u.pick=function(n,t,r){var e={};if(typeof t!="function")for(var o=-1,a=gt(arguments,true,false,1),i=ur(n)?a.length:0;++o<i;){var l=a[o];l in n&&(e[l]=n[l])}else t=u.createCallback(t,r,3),ge(n,function(n,r,u){t(n,r,u)&&(e[r]=n)});return e},u.pluck=se,u.property=sr,u.pull=function(n){for(var t=arguments,r=0,e=t.length,u=n?n.length:0;++r<e;)for(var o=-1,a=t[r];++o<u;)n[o]===a&&(Wr.call(n,o--,1),u--);
|
||||
return n},u.range=function(n,t,r){n=+n||0,r=typeof r=="number"?r:+r||1,null==t&&(t=n,n=0);var e=-1;t=Jr(0,Ir((t-n)/(r||1)));for(var u=gr(t);++e<t;)u[e]=n,n+=r;return u},u.reject=function(n,t,r){return t=u.createCallback(t,r,3),Lt(n,function(n,r,e){return!t(n,r,e)})},u.remove=function(n,t,r){var e=-1,o=n?n.length:0,a=[];for(t=u.createCallback(t,r,3);++e<o;)r=n[e],t(r,e,n)&&(a.push(r),Wr.call(n,e--,1),o--);return a},u.rest=At,u.shuffle=Xt,u.slice=It,u.sortBy=function(n,t,r){var e=-1,o=t&&he(t),l=n?n.length:0,f=gr(typeof l=="number"?l:0);
|
||||
for(o||(t=u.createCallback(t,r,3)),Wt(n,function(n,r,u){var a=f[++e]=x.pop()||{i:null,j:0,k:null};a.j=e,a.k=n,a.i=o?Kt(t,function(t){return n[t]}):t(n,r,u)}),l=f.length,f.sort(o?i:a);l--;)n=f[l],f[l]=n.k,g(n);return f},u.tap=function(n,t,r){return t.call(r,n),n},u.throttle=function(n,t,r){var e=true,u=true;if(!er(n))throw new jr;return false===r?e=false:ur(r)&&(e="leading"in r?r.leading:e,u="trailing"in r?r.trailing:u),lt.leading=e,lt.maxWait=t,lt.trailing=u,Jt(n,t,lt)},u.times=function(n,t,r){n=-1<(n=+n)?n:0;
|
||||
var e=-1,u=gr(n);for(t=N(t,r,1);++e<n;)u[e]=t(e);return u},u.toArray=function(n){return n&&typeof n.length=="number"?ae.unindexedChars&&ar(n)?n.split(""):It(n):ir(n)},u.transform=function(n,t,r,e){var o=he(n);if(null==r)if(o)r=[];else{var a=n&&n.constructor;r=j(a&&a.prototype)}return t&&(t=u.createCallback(t,e,4),(o?st:Zt)(n,function(n,e,u){return t(r,n,e,u)})),r},u.union=function(){return bt(gt(arguments,true,true))},u.uniq=Rt,u.values=ir,u.where=Lt,u.without=function(n){return pt(n,It(arguments,1))
|
||||
},u.wrap=function(n,t){return jt(t,S,[n])},u.xor=function(){for(var n=-1,t=arguments.length;++n<t;){var r=arguments[n];if(he(r)||Et(r))var e=e?pt(e,r).concat(pt(r,e)):r}return e?bt(e):[]},u.zip=Tt,u.zipObject=Pt,u.collect=Kt,u.drop=At,u.each=Wt,u.eachRight=zt,u.extend=Qt,u.methods=tr,u.object=Pt,u.select=Lt,u.tail=At,u.unique=Rt,u.unzip=Tt,cr(Qt({},u)),u.capitalize=function(n){return null==n?"":(n=wr(n),n.charAt(0).toUpperCase()+n.slice(1))},u.clone=function(n,t,r,e){var u=typeof t;return"boolean"!=u&&null!=t&&(e=r,r=t,t=false,"number"!=u&&"string"!=u||!e||e[r]!==n||(r=null)),d(n,t,typeof r=="function"&&N(r,e,1))
|
||||
},u.cloneDeep=function(n,t,r){return d(n,true,typeof t=="function"&&N(t,r,1))},u.contains=Ft,u.escape=function(n){return null==n?"":wr(n).replace($,l)},u.every=$t,u.find=Bt,u.findIndex=function(n,t,r){var e=-1,o=n?n.length:0;for(t=u.createCallback(t,r,3);++e<o;)if(t(n[e],e,n))return e;return-1},u.findKey=function(n,t,r){var e;return t=u.createCallback(t,r,3),Zt(n,function(n,r,u){return t(n,r,u)?(e=r,false):void 0}),e},u.findLast=function(n,t,r){var e;return t=u.createCallback(t,r,3),zt(n,function(n,r,u){return t(n,r,u)?(e=n,false):void 0
|
||||
}),e},u.findLastIndex=function(n,t,r){var e=n?n.length:0;for(t=u.createCallback(t,r,3);e--;)if(t(n[e],e,n))return e;return-1},u.findLastKey=function(n,t,r){var e;return t=u.createCallback(t,r,3),nr(n,function(n,r,u){return t(n,r,u)?(e=r,false):void 0}),e},u.has=function(n,t){return n?Dr.call(n,t):false},u.identity=lr,u.indexOf=St,u.isArguments=Et,u.isArray=he,u.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&Sr.call(n)==Z||false},u.isDate=function(n){return n&&typeof n=="object"&&Sr.call(n)==nt||false
|
||||
},u.isElement=rr,u.isEmpty=function(n){var t=true;if(!n)return t;var r=Sr.call(n),e=n.length;return r==Y||r==at||(ae.argsClass?r==Q:Et(n))||r==ut&&typeof e=="number"&&er(n.splice)?!e:(Zt(n,function(){return t=false}),t)},u.isEqual=function(n,t,r,e){return vt(n,t,typeof r=="function"&&N(r,e,2))},u.isFinite=function(n){return Xr(n)&&!Gr(parseFloat(n))},u.isFunction=er,u.isNaN=function(n){return or(n)&&n!=+n},u.isNull=function(n){return null===n},u.isNumber=or,u.isObject=ur,u.isPlainObject=ve,u.isRegExp=function(n){var t=typeof n;
|
||||
return n&&("function"==t||"object"==t)&&Sr.call(n)==ot||false},u.isString=ar,u.isUndefined=function(n){return typeof n=="undefined"},u.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(e=(0>r?Jr(0,e+r):Qr(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},u.mixin=cr,u.noConflict=function(){return n._=qr,this},u.noop=pr,u.now=_e,u.parseInt=we,u.random=function(n,t,r){var e=null==n,u=null==t;return null==r&&(u&&typeof n=="boolean"?(r=n,n=1):typeof t=="boolean"&&(r=t,u=true)),e&&u&&(t=1,u=false),n=+n||0,u?(t=n,n=0):t=+t||0,r||n%1||t%1?(r=ne(),Qr(n+r*(t-n+parseFloat("1e-"+((r+"").length-1))),t)):dt(n,t)
|
||||
},u.reduce=Ut,u.reduceRight=Vt,u.result=function(n,t,r){return null==n?r:(r="undefined"!=typeof n[t]?n[t]:r,er(r)?n[t]():r)},u.runInContext=_,u.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:ye(n).length},u.some=Gt,u.sortedIndex=Nt,u.template=function(n,t,r){var e=u.templateSettings;n=wr(n||""),r=Yt({},r,e);var o,a=Yt({},r.imports,e.imports),e=ye(a),a=ir(a),i=0,l=r.interpolate||V,c="__p+='",l=_r((r.escape||V).source+"|"+l.source+"|"+(l===W?z:V).source+"|"+(r.evaluate||V).source+"|$","g");
|
||||
n.replace(l,function(t,r,e,u,a,l){return e||(e=u),c+=n.slice(i,l).replace(G,f),r&&(c+="'+__e("+r+")+'"),a&&(o=true,c+="';"+a+";\n__p+='"),e&&(c+="'+((__t=("+e+"))==null?'':__t)+'"),i=l+t.length,t}),c+="';",l=r=r.variable,l||(r="obj",c="with("+r+"){"+c+"}"),c=(o?c.replace(T,""):c).replace(P,"$1").replace(D,"$1;"),c="function("+r+"){"+(l?"":r+"||("+r+"={});")+"var __t,__p='',__e=_.escape"+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+c+"return __p}";try{var p=yr(e,"return "+c).apply(w,a)
|
||||
}catch(s){throw s.source=c,s}return t?p(t):(p.source=c,p)},u.trim=me,u.trimLeft=de,u.trimRight=be,u.unescape=function(n){return null==n?"":(n=wr(n),0>n.indexOf(";")?n:n.replace(F,b))},u.uniqueId=function(n){var t=++C;return wr(null==n?"":n)+t},u.all=$t,u.any=Gt,u.detect=Bt,u.findWhere=Bt,u.foldl=Ut,u.foldr=Vt,u.include=Ft,u.inject=Ut,cr(function(){var n={};return Zt(u,function(t,r){u.prototype[r]||(n[r]=t)}),n}(),false),u.first=qt,u.last=function(n,t,r){var e=0,o=n?n.length:0;if(typeof t!="number"&&null!=t){var a=o;
|
||||
for(t=u.createCallback(t,r,3);a--&&t(n[a],a,n);)e++}else if(e=t,null==e||r)return n?n[o-1]:w;return e=o-e,It(n,0<e?e:0)},u.sample=function(n,t,r){return n&&typeof n.length!="number"?n=ir(n):ae.unindexedChars&&ar(n)&&(n=n.split("")),null==t||r?n?n[dt(0,n.length-1)]:w:(n=Xt(n),n.length=Qr(Jr(0,t),n.length),n)},u.take=qt,u.head=qt,Zt(u,function(n,t){var r="sample"!==t;u.prototype[t]||(u.prototype[t]=function(t,e){var u=this.__chain__,a=n(this.__wrapped__,t,e);return u||null!=t&&(!e||r&&typeof t=="function")?new o(a,u):a
|
||||
})}),u.VERSION="2.4.1",u.prototype.chain=function(){return this.__chain__=true,this},u.prototype.toString=function(){return wr(this.__wrapped__)},u.prototype.value=Dt,u.prototype.valueOf=Dt,st(["join","pop","shift"],function(n){var t=xr[n];u.prototype[n]=function(){var n=this.__chain__,r=t.apply(this.__wrapped__,arguments);return n?new o(r,n):r}}),st(["push","reverse","sort","unshift"],function(n){var t=xr[n];u.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),st(["concat","splice"],function(n){var t=xr[n];
|
||||
u.prototype[n]=function(){return new o(t.apply(this.__wrapped__,arguments),this.__chain__)}}),ae.spliceObjects||st(["pop","shift","splice"],function(n){var t=xr[n],r="splice"==n;u.prototype[n]=function(){var n=this.__chain__,e=this.__wrapped__,u=t.apply(e,arguments);return 0===e.length&&delete e[0],n||r?new o(u,n):u}}),u}var w,j=[],x=[],C=0,k=1,O=2,E=4,q=8,S=16,A=32,I=75,N=40,R=" \t\x0B\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",T=/\b__p\+='';/g,P=/\b(__p\+=)''\+/g,D=/(__e\(.*?\)|\b__t\))\+'';/g,F=/&(?:amp|lt|gt|quot|#39);/g,$=/[&<>"']/g,L=/<%-([\s\S]+?)%>/g,B=/<%([\s\S]+?)%>/g,W=/<%=([\s\S]+?)%>/g,z=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,K=/\w*$/,M=/^\s*function[ \n\r\t]+\w/,U=/^0[xX]/,V=/($^)/,X=/\bthis\b/,G=/['\n\r\t\u2028\u2029\\]/g,H="Array Boolean Date Error Function Math Number Object RegExp Set String _ clearTimeout document isFinite isNaN parseInt setTimeout TypeError window WinRTError".split(" "),J="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),Q="[object Arguments]",Y="[object Array]",Z="[object Boolean]",nt="[object Date]",tt="[object Error]",rt="[object Function]",et="[object Number]",ut="[object Object]",ot="[object RegExp]",at="[object String]",it={};
|
||||
;(function(){function n(n,t){if(n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1}return 0}function t(n,t,r){r=(r||0)-1;for(var e=n?n.length:0;++r<e;)if(n[r]===t)return r;return-1}function r(n,t){return n.has(t)?0:-1}function e(n){return n.charCodeAt(0)}function u(n,t){for(var r=-1,e=n.length;++r<e&&0<=t.indexOf(n.charAt(r)););return r}function o(n,t){for(var r=n.length;r--&&0<=t.indexOf(n.charAt(r)););return r}function a(t,r){return n(t.f,r.f)||t.g-r.g}function i(t,r){for(var e=t.f,u=r.f,o=-1,a=e.length;++o<a;){var i=n(e[o],u[o]);
|
||||
if(i)return i}return t.g-r.g}function l(n){return ct[n]}function f(n){return"\\"+gt[n]}function c(){return j.pop()||[]}function p(n){return typeof n.toString!="function"&&typeof(n+"")=="string"}function s(n){n.length=0,j.length<R&&j.push(n)}function g(n){n.f=n.h=null,x.length<R&&x.push(n)}function h(n,t){return(n=null==n?"":n+"")?null==t?n.slice(m(n),d(n)+1):(t+="",n.slice(u(n,t),o(n,t)+1)):n}function v(n,t){return(n=null==n?"":n+"")?null==t?n.slice(m(n)):(t+="",n.slice(u(n,t))):n}function y(n,t){return(n=null==n?"":n+"")?null==t?n.slice(0,d(n)+1):(t+="",n.slice(0,o(n,t)+1)):n
|
||||
}function m(n){for(var t=-1,r=n.length;++t<r;){var e=n.charCodeAt(t);if((160<e||9>e||13<e)&&32!=e&&160!=e&&5760!=e&&6158!=e&&(8192>e||8202<e&&8232!=e&&8233!=e&&8239!=e&&8287!=e&&12288!=e&&65279!=e))break}return t}function d(n){for(var t=n.length;t--;){var r=n.charCodeAt(t);if((160<r||9>r||13<r)&&32!=r&&160!=r&&5760!=r&&6158!=r&&(8192>r||8202<r&&8232!=r&&8233!=r&&8239!=r&&8287!=r&&12288!=r&&65279!=r))break}return t}function b(n){return pt[n]}function _(n){function u(n){return n&&typeof n=="object"&&!he(n)&&qr.call(n,"__wrapped__")?n:new o(n)
|
||||
}function o(n,t){this.__chain__=!!t,this.__wrapped__=n}function m(n){function t(){if(e){var n=Rt(e);Fr.apply(n,arguments)}if(this instanceof t){var o=j(r.prototype),n=r.apply(o,n||arguments);return ur(n)?n:o}return r.apply(u,n||arguments)}var r=n[0],e=n[2],u=n[4];return ie(t,n),t}function d(n,t,r,e,u){if(r){var o=r(n);if(typeof o!="undefined")return o}if(!ur(n))return n;var a=Ar.call(n);if(!it[a]||!ae.nodeClass&&p(n))return n;var i=ue[a];switch(a){case Z:case nt:return new i(+n);case et:case at:return new i(n);
|
||||
case ot:return o=i(n.source,K.exec(n)),o.lastIndex=n.lastIndex,o}if(a=he(n),t){var l=!e;e||(e=c()),u||(u=c());for(var f=e.length;f--;)if(e[f]==n)return u[f];o=a?i(n.length):{}}else o=a?Rt(n):Yt({},n);return a&&(qr.call(n,"index")&&(o.index=n.index),qr.call(n,"input")&&(o.input=n.input)),t?(e.push(n),u.push(o),(a?st:vt)(n,function(n,a){o[a]=d(n,t,r,e,u)}),l&&(s(e),s(u)),o):o}function j(n){return ur(n)?Ur(n):{}}function R(n,t,r){if(typeof n!="function")return lr;if(typeof t=="undefined"||!("prototype"in n))return n;
|
||||
var e=n.__bindData__;if(typeof e=="undefined"&&(ae.funcNames&&(e=!n.name),e=e||!ae.funcDecomp,!e)){var u=Pr.call(n);ae.funcNames||(e=!M.test(u)),e||(e=X.test(u),ie(n,e))}if(false===e||true!==e&&e[1]&k)return n;switch(r){case 1:return function(r){return n.call(t,r)};case 2:return function(r,e){return n.call(t,r,e)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,o){return n.call(t,r,e,u,o)}}return Jt(n,t)}function ct(n){function t(){var n=l?a:this;if(u){var g=Rt(u);Fr.apply(g,arguments)
|
||||
}return(o||c)&&(g||(g=Rt(arguments)),o&&Fr.apply(g,o),c&&g.length<i)?(e|=A,e&=~I,ct([r,p?e:e&~(k|O),g,null,a,i])):(g||(g=arguments),f&&(r=n[s]),this instanceof t?(n=j(r.prototype),g=r.apply(n,g),ur(g)?g:n):r.apply(n,g))}var r=n[0],e=n[1],u=n[2],o=n[3],a=n[4],i=n[5],l=e&k,f=e&O,c=e&E,p=e&S,s=r;return ie(t,n),t}function pt(n,e){var u=-1,o=kt(),a=n?n.length:0,i=[];for(Lr&&a>=N&&o===t&&(o=r,e=jt(e));++u<a;){var l=n[u];0>o(e,l)&&i.push(l)}return i}function st(n,t){var r=-1,e=n,u=n?n.length:0;if(typeof u=="number")for(ae.unindexedChars&&ar(e)&&(e=e.split(""));++r<u&&false!==t(e[r],r,n););else vt(n,t);
|
||||
return n}function gt(n,t,r,e){e=(e||0)-1;for(var u=n?n.length:0,o=[];++e<u;){var a=n[e];if(a&&typeof a=="object"&&typeof a.length=="number"&&(he(a)||St(a))){t||(a=gt(a,t,r));var i=-1,l=a.length,f=o.length;for(o.length+=l;++i<l;)o[f++]=a[i]}else r||o.push(a)}return o}function vt(n,t){for(var r=-1,e=ye(n),u=e.length;++r<u;){var o=e[r];if(false===t(n[o],o,n))break}return n}function yt(n,t,r,e,u,o){if(r){var a=r(n,t);if(typeof a!="undefined")return!!a}if(n===t)return 0!==n||1/n==1/t;var i=typeof n,l=typeof t;
|
||||
if(n===n&&(!n||"function"!=i&&"object"!=i)&&(!t||"function"!=l&&"object"!=l))return false;if(null==n||null==t)return n===t;if(l=Ar.call(n),i=Ar.call(t),l==Q&&(l=ut),i==Q&&(i=ut),l!=i)return false;switch(l){case Z:case nt:return+n==+t;case et:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case ot:case at:return n==wr(t)}if(i=l==Y,!i){var f=qr.call(n,"__wrapped__"),g=qr.call(t,"__wrapped__");if(f||g)return yt(f?n.__wrapped__:n,g?t.__wrapped__:t,r,e,u,o);if(l!=ut||!ae.nodeClass&&(p(n)||p(t)))return false;if(l=!ae.argsObject&&St(n)?br:n.constructor,f=!ae.argsObject&&St(t)?br:t.constructor,l!=f&&!(qr.call(n,"constructor")&&qr.call(t,"constructor")||er(l)&&l instanceof l&&er(f)&&f instanceof f)&&"constructor"in n&&"constructor"in t)return false
|
||||
}for(l=!u,u||(u=c()),o||(o=c()),f=u.length;f--;)if(u[f]==n)return o[f]==t;var h=0,a=true;if(u.push(n),o.push(t),i){if(f=n.length,h=t.length,(a=h==f)||e)for(;h--;)if(i=f,g=t[h],e)for(;i--&&!(a=yt(n[i],g,r,e,u,o)););else if(!(a=yt(n[h],g,r,e,u,o)))break}else le(t,function(t,i,l){return qr.call(l,i)?(h++,a=qr.call(n,i)&&yt(n[i],t,r,e,u,o)):void 0}),a&&!e&&le(n,function(n,t,r){return qr.call(r,t)?a=-1<--h:void 0});return u.pop(),o.pop(),l&&(s(u),s(o)),a}function dt(n,t,r,e,u){(he(t)?st:vt)(t,function(t,o){var a,i,l=t,f=n[o];
|
||||
if(t&&((i=he(t))||ve(t))){for(l=e.length;l--;)if(a=e[l]==t){f=u[l];break}if(!a){var c;r&&(l=r(f,t),c=typeof l!="undefined")&&(f=l),c||(f=i?he(f)?f:[]:ve(f)?f:{}),e.push(t),u.push(f),c||dt(f,t,r,e,u)}}else r&&(l=r(f,t),typeof l=="undefined"&&(l=t)),typeof l!="undefined"&&(f=l);n[o]=f})}function bt(n,t){return n+Tr(ne()*(t-n+1))}function _t(n,e,u){var o=-1,a=kt(),i=n?n.length:0,l=Lr&&!e&&i>=N&&a===t,f=[];if(l)var p=jt(),a=r;else p=u?c():f;for(;++o<i;){var g=n[o],h=u?u(g,o,n):g;(e?!o||p[p.length-1]!==h:0>a(p,h))&&((u||l)&&p.push(h),f.push(g))
|
||||
}return!l&&u&&s(p),f}function wt(n){return function(t,r,e){var o={};if(r=u.createCallback(r,e,3),he(t)){e=-1;for(var a=t.length;++e<a;){var i=t[e];n(o,i,r(i,e,t),t)}}else st(t,function(t,e,u){n(o,t,r(t,e,u),u)});return o}}function jt(n){var t=new Lr,r=n?n.length:0;for(t.push=t.add;r--;)t.push(n[r]);return t}function xt(n,t,r,e,u,o){var a=t&k,i=t&E,l=t&A,f=t&I;if(!(t&O||er(n)))throw new jr;l&&!r.length&&(t&=-17,l=r=false),f&&!e.length&&(t&=-33,f=e=false);var c=n&&n.__bindData__;return c&&true!==c?(c=Rt(c),c[2]&&(c[2]=Rt(c[2])),c[3]&&(c[3]=Rt(c[3])),!a||c[1]&k||(c[4]=u),!a&&c[1]&k&&(t|=8),!i||c[1]&E||(c[5]=o),l&&Fr.apply(c[2]||(c[2]=[]),r),f&&zr.apply(c[3]||(c[3]=[]),e),c[1]|=t,xt.apply(null,c)):(t==k||t==(k|A)?m:ct)([n,t,r,e,u,o])
|
||||
}function Ct(n){n.d=J;var t=yr,r="return function("+n.a+"){",e="var r="+n.b+";if(!j(p)){return r}";ae.nonEnumArgs&&(e+="var m=p.length;if(m&&i(p)){l=-1;while(++l<m){l+='';"+n.c+";}return r}"),ae.enumPrototypes&&(e+="var t=typeof p=='function';"),ae.enumErrorProps&&(e+="var s=p===f||p instanceof Error;");var u=[];if(ae.enumPrototypes&&u.push("!(t&&l=='prototype')"),ae.enumErrorProps&&u.push("!(s&&(l=='message'||l=='name'))"),e+="for(var l in p){",n.e&&u.push("g.call(p,l)"),u.length&&(e+="if("+u.join("&&")+"){"),e+=n.c+";",u.length&&(e+="}"),e+="}",ae.nonEnumShadows){for(e+="if(p!==q){var d=p.constructor,k=p===(d&&d.prototype),b=p===v?u:p===f?e:w.call(p),n=o[b];",u=0;7>u;u++)e+="l='"+n.d[u]+"';if((!(k&&n[l])&&g.call(p,l))",n.e||(e+="||(!n[l]&&p[l]!==q[l])"),e+="){"+n.c+"}";
|
||||
e+="}"}return t("e,f,g,i,j,q,o,u,v,w",r+(e+"return r;")+"}")(tt,Cr,qr,St,ur,kr,oe,at,Or,Ar)}function kt(){var n=(n=u.indexOf)===It?t:n;return n}function Ot(n){return typeof n=="function"&&Ir.test(Pr.call(n))}function Et(n){var t,r;return!n||Ar.call(n)!=ut||!qr.call(n,"constructor")&&(t=n.constructor,er(t)&&!(t instanceof t))||!ae.argsClass&&St(n)||!ae.nodeClass&&p(n)?false:ae.ownLast?(le(n,function(n,t,e){return r=qr.call(e,t),false}),false!==r):(le(n,function(n,t){r=t}),typeof r=="undefined"||qr.call(n,r))
|
||||
}function St(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Ar.call(n)==Q||false}function At(n,t,r){var e=0,o=n?n.length:0;if(typeof t!="number"&&null!=t){var a=-1;for(t=u.createCallback(t,r,3);++a<o&&t(n[a],a,n);)e++}else if(e=t,null==e||r)return n?n[0]:w;return Rt(n,0,0<e?e:0)}function It(n,r,e){var u=n?n.length:0;if(typeof e=="number")e=0>e?Jr(0,u+e):e||0;else if(e)return e=Tt(n,r),u&&n[e]===r?e:-1;return t(n,r,e)}function Nt(n,t,r){if(typeof t!="number"&&null!=t){var e=0,o=-1,a=n?n.length:0;
|
||||
for(t=u.createCallback(t,r,3);++o<a&&t(n[o],o,n);)e++}else e=null==t||r?1:0<t?t:0;return Rt(n,e)}function Rt(n,t,r){var e=-1,u=n?n.length:0;for(typeof t=="undefined"?t=0:0>t?t=Jr(u+t,0):t>u&&(t=u),typeof r=="undefined"?r=u:0>r?r=Jr(u+r,0):r>u&&(r=u),u=r-t||0,r=gr(u);++e<u;)r[e]=n[t+e];return r}function Tt(n,t,r,e){var o=0,a=n?n.length:o;for(r=r?u.createCallback(r,e,1):lr,t=r(t);o<a;)e=o+a>>>1,r(n[e])<t?o=e+1:a=e;return o}function Pt(n,t,r,e){var o=typeof t;return"boolean"!=o&&null!=t&&(e=r,r=t,t=false,"number"!=o&&"string"!=o||!e||e[r]!==n||(r=null)),null!=r&&(r=u.createCallback(r,e,3)),_t(n,t,r)
|
||||
}function Dt(){for(var n=1<arguments.length?arguments:arguments[0],t=-1,r=n?Ut(ge(n,"length")):0,e=gr(0>r?0:r);++t<r;)e[t]=ge(n,t);return e}function qt(n,t){var r=-1,e=n?n.length:0,u={};for(t||!e||he(n[0])||(t=[]);++r<e;){var o=n[r];t?u[o]=t[r]:o&&(u[o[0]]=o[1])}return u}function Ft(){return this.__wrapped__}function $t(n,t,r){var e=n?n.length:0;if(r=typeof r=="number"?r:0,typeof e=="number"){if(r>=e)return false;if(typeof n=="string"||!he(n)&&ar(n))return Mr?Mr.call(n,t,r):-1<n.indexOf(t,r);var u=kt();
|
||||
return r=(0>r?Jr(0,e+r):r)||0,-1<u(n,t,r)}var o=-1,a=false;return st(n,function(n){return++o<r?void 0:!(a=n===t)}),a}function Lt(n,t,r){var e=true;if(t=u.createCallback(t,r,3),he(n)){r=-1;for(var o=n.length;++r<o&&(e=!!t(n[r],r,n)););}else st(n,function(n,r,u){return e=!!t(n,r,u)});return e}function Bt(n,t,r){var e=[];if(t=u.createCallback(t,r,3),he(n)){r=-1;for(var o=n.length;++r<o;){var a=n[r];t(a,r,n)&&e.push(a)}}else st(n,function(n,r,u){t(n,r,u)&&e.push(n)});return e}function Wt(n,t,r){if(t=u.createCallback(t,r,3),!he(n)){var e;
|
||||
return st(n,function(n,r,u){return t(n,r,u)?(e=n,false):void 0}),e}r=-1;for(var o=n.length;++r<o;){var a=n[r];if(t(a,r,n))return a}}function zt(n,t,r){if(t&&typeof r=="undefined"&&he(n)){r=-1;for(var e=n.length;++r<e&&false!==t(n[r],r,n););}else st(n,R(t,r,3));return n}function Kt(n,t,r){var e=n,u=n?n.length:0;if(t=t&&typeof r=="undefined"?t:R(t,r,3),he(n))for(;u--&&false!==t(n[u],u,n););else{if(typeof u!="number")var o=ye(n),u=o.length;else ae.unindexedChars&&ar(n)&&(e=n.split(""));st(e,function(r,a){return a=o?o[--u]:--u,t(e[a],a,n)
|
||||
})}return n}function Mt(n,t,r){var e=-1,o=n?n.length:0,a=gr(typeof o=="number"?o:0);if(t=u.createCallback(t,r,3),he(n))for(;++e<o;)a[e]=t(n[e],e,n);else st(n,function(n,r,u){a[++e]=t(n,r,u)});return a}function Ut(n,t,r){var o=-1/0,a=o,i=typeof t;if("number"!=i&&"string"!=i||!r||r[t]!==n||(t=null),null==t&&he(n))for(r=-1,i=n.length;++r<i;){var l=n[r];l>a&&(a=l)}else t=null==t&&ar(n)?e:u.createCallback(t,r,3),st(n,function(n,r,e){r=t(n,r,e),r>o&&(o=r,a=n)});return a}function Vt(n,t,r,e){var o=3>arguments.length;
|
||||
if(t=u.createCallback(t,e,4),he(n)){var a=-1,i=n.length;for(o&&i&&(r=n[++a]);++a<i;)r=t(r,n[a],a,n)}else st(n,function(n,e,u){r=o?(o=false,n):t(r,n,e,u)});return r}function Xt(n,t,r,e){var o=3>arguments.length;return t=u.createCallback(t,e,4),Kt(n,function(n,e,u){r=o?(o=false,n):t(r,n,e,u)}),r}function Gt(n){var t=-1,r=n?n.length:0,e=gr(typeof r=="number"?r:0);return st(n,function(n){var r=bt(0,++t);e[t]=e[r],e[r]=n}),e}function Ht(n,t,r){var e;if(t=u.createCallback(t,r,3),he(n)){r=-1;for(var o=n.length;++r<o&&!(e=t(n[r],r,n)););}else st(n,function(n,r,u){return!(e=t(n,r,u))
|
||||
});return!!e}function Jt(n,t){return 2<arguments.length?xt(n,k|A,Rt(arguments,2),null,t):xt(n,k,null,null,t)}function Qt(n,t,r){var e,u,o,a,i,l,f,c=0,p=false,s=true;if(!er(n))throw new jr;if(t=Jr(0,t)||0,true===r)var g=true,s=false;else ur(r)&&(g=r.leading,p="maxWait"in r&&(Jr(t,r.maxWait)||0),s="trailing"in r?r.trailing:s);var h=function(){var r=t-(_e()-a);0<r?l=Br(h,r):(u&&Rr(u),r=f,u=l=f=w,r&&(c=_e(),o=n.apply(i,e),l||u||(e=i=null)))},v=function(){l&&Rr(l),u=l=f=w,(s||p!==t)&&(c=_e(),o=n.apply(i,e),l||u||(e=i=null))
|
||||
};return function(){if(e=arguments,a=_e(),i=this,f=s&&(l||!g),false===p)var r=g&&!l;else{u||g||(c=a);var y=p-(a-c),m=0>=y;m?(u&&(u=Rr(u)),c=a,o=n.apply(i,e)):u||(u=Br(v,y))}return m&&l?l=Rr(l):l||t===p||(l=Br(h,t)),r&&(m=true,o=n.apply(i,e)),!m||l||u||(e=i=null),o}}function Yt(n,t,r){var e=arguments,u=0,o=e.length,a=typeof r;if("number"!=a&&"string"!=a||!e[3]||e[3][r]!==t||(o=2),3<o&&"function"==typeof e[o-2])var i=R(e[--o-1],e[o--],2);else 2<o&&"function"==typeof e[o-1]&&(i=e[--o]);for(;++u<o;)if(t=e[u],ur(t))for(var a=-1,l=ye(t),f=l.length;++a<f;){var c=l[a];
|
||||
n[c]=i?i(n[c],t[c]):t[c]}return n}function Zt(n,t,r){var e=arguments,u=0,o=e.length,a=typeof r;for("number"!=a&&"string"!=a||!e[3]||e[3][r]!==t||(o=2);++u<o;)if(t=e[u],ur(t))for(var a=-1,i=ye(t),l=i.length;++a<l;){var f=i[a];"undefined"==typeof n[f]&&(n[f]=t[f])}return n}function nr(n,t,r){var e=ye(n),u=e.length;for(t=R(t,r,3);u--&&(r=e[u],false!==t(n[r],r,n)););return n}function tr(n){var t=[];return le(n,function(n,r){er(n)&&t.push(r)}),t.sort()}function rr(n){return n&&typeof n=="object"&&1===n.nodeType&&(ae.nodeClass?-1<Ar.call(n).indexOf("Element"):p(n))||false
|
||||
}function er(n){return typeof n=="function"}function ur(n){var t=typeof n;return n&&("function"==t||"object"==t)||false}function or(n){var t=typeof n;return"number"==t||n&&"object"==t&&Ar.call(n)==et||false}function ar(n){return typeof n=="string"||n&&typeof n=="object"&&Ar.call(n)==at||false}function ir(n){for(var t=-1,r=ye(n),e=r.length,u=gr(e);++t<e;)u[t]=n[r[t]];return u}function lr(n){return n}function fr(n){n||(n={});var t=ye(n),r=t[0],e=n[r];return 1!=t.length||e!==e||ur(e)?function(r){for(var e=t.length,u=false;e--&&(u=yt(r[t[e]],n[t[e]],null,true)););return u
|
||||
}:function(n){return n=n[r],e===n&&(0!==e||1/e==1/n)}}function cr(n,t,r){var e=true,o=t&&tr(t);t&&(r||o.length)||(null==r&&(r=t),t=n,n=u,o=tr(t)),false===r?e=false:ur(r)&&"chain"in r&&(e=r.chain),r=-1;for(var a=er(n),i=o?o.length:0;++r<i;){var l=o[r],f=n[l]=t[l];a&&(n.prototype[l]=function(t){return function(){var r=this.__chain__,u=this.__wrapped__,o=[u];if(Fr.apply(o,arguments),o=t.apply(n,o),e||r){if(u===o&&ur(o))return this;o=new n(o),o.__chain__=r}return o}}(f))}}function pr(){}function sr(n){return function(t){return t[n]
|
||||
}}n=n?mt.defaults(ht.Object(),n,mt.pick(ht,H)):ht;var gr=n.Array,hr=n.Boolean,vr=n.Date,yr=n.Function,mr=n.Math,dr=n.Number,br=n.Object,_r=n.RegExp,wr=n.String,jr=n.TypeError,xr=gr.prototype,Cr=n.Error.prototype,kr=br.prototype,Or=wr.prototype,Er=(Er=n.window)&&Er.document,Sr=n._,Ar=kr.toString,Ir=_r("^"+wr(Ar).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Nr=mr.ceil,Rr=n.clearTimeout,Tr=mr.floor,Pr=yr.prototype.toString,Dr=Ot(Dr=br.getPrototypeOf)&&Dr,qr=kr.hasOwnProperty,Fr=xr.push,$r=kr.propertyIsEnumerable,Lr=Ot(Lr=n.Set)&&Lr,Br=n.setTimeout,Wr=xr.splice,zr=xr.unshift,Kr=function(){try{var n={},t=Ot(t=br.defineProperty)&&t,r=t(n,n,n)&&t
|
||||
}catch(e){}return r}(),Mr=Ot(Mr=Or.contains)&&Mr,Ur=Ot(Ur=br.create)&&Ur,Vr=Ot(Vr=gr.isArray)&&Vr,Xr=n.isFinite,Gr=n.isNaN,Hr=Ot(Hr=br.keys)&&Hr,Jr=mr.max,Qr=mr.min,Yr=Ot(Yr=vr.now)&&Yr,Zr=n.parseInt,ne=mr.random,te=Ot(te=Or.trim)&&!te.call(T)&&te,re=Ot(re=Or.trimLeft)&&!re.call(T)&&re,ee=Ot(ee=Or.trimRight)&&!ee.call(T)&&ee,ue={};ue[Y]=gr,ue[Z]=hr,ue[nt]=vr,ue[rt]=yr,ue[ut]=br,ue[et]=dr,ue[ot]=_r,ue[at]=wr;var oe={};oe[Y]=oe[nt]=oe[et]={constructor:true,toLocaleString:true,toString:true,valueOf:true},oe[Z]=oe[at]={constructor:true,toString:true,valueOf:true},oe[tt]=oe[rt]=oe[ot]={constructor:true,toString:true},oe[ut]={constructor:true},function(){for(var n=J.length;n--;){var t,r=J[n];
|
||||
for(t in oe)qr.call(oe,t)&&!qr.call(oe[t],r)&&(oe[t][r]=false)}}(),o.prototype=u.prototype;var ae=u.support={};!function(){var t=function(){this.x=1},r={0:1,length:1},e=[];t.prototype={valueOf:1,y:1};for(var u in new t)e.push(u);for(u in arguments);ae.argsClass=Ar.call(arguments)==Q,ae.argsObject=arguments.constructor==br&&!(arguments instanceof gr),ae.enumErrorProps=$r.call(Cr,"message")||$r.call(Cr,"name"),ae.enumPrototypes=$r.call(t,"prototype"),ae.funcDecomp=!Ot(n.WinRTError)&&X.test(_),ae.funcNames=typeof yr.name=="string",ae.nonEnumArgs=0!=u,ae.nonEnumShadows=!/valueOf/.test(e),ae.ownLast="x"!=e[0],ae.spliceObjects=(Wr.call(r,0,1),!r[0]),ae.unindexedChars="xx"!="x"[0]+br("x")[0];
|
||||
try{ae.dom=11===Er.createDocumentFragment().nodeType}catch(o){ae.dom=false}try{ae.nodeClass=!(Ar.call(undefined)==ut&&!({toString:0}+""))}catch(a){ae.nodeClass=true}}(1),u.templateSettings={escape:L,evaluate:B,interpolate:W,variable:"",imports:{_:u}},Ur||(j=function(){function t(){}return function(r){if(ur(r)){t.prototype=r;var e=new t;t.prototype=null}return e||n.Object()}}());var ie=Kr?function(n,t){ft.value=t,Kr(n,"__bindData__",ft)}:pr;ae.argsClass||(St=function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&qr.call(n,"callee")&&!$r.call(n,"callee")||false
|
||||
});var le=Ct({a:"p,a",b:"p",c:"if(a(p[l],l,p)===false){return r}",e:false}),fe=Ct({a:"p",b:"[]",c:"r.push(l)",e:true}),ce=wt(function(n,t,r){qr.call(n,r)?n[r]++:n[r]=1}),pe=wt(function(n,t,r){qr.call(n,r)?n[r].push(t):n[r]=[t]}),se=wt(function(n,t,r){n[r]=t}),ge=Mt,he=Vr||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Ar.call(n)==Y||false};ae.dom||(rr=function(n){return n&&typeof n=="object"&&1===n.nodeType&&!ve(n)||false}),er(/x/)&&(er=function(n){return typeof n=="function"&&Ar.call(n)==rt
|
||||
});var ve=Dr?function(n){if(!n||Ar.call(n)!=ut||!ae.argsClass&&St(n))return false;var t=n.valueOf,r=Ot(t)&&(r=Dr(t))&&Dr(r);return r?n==r||Dr(n)==r:Et(n)}:Et,ye=Hr?function(n){return ur(n)?ae.enumPrototypes&&typeof n=="function"||ae.nonEnumArgs&&n.length&&St(n)?fe(n):Hr(n):[]}:fe,me=te?function(n,t){return null==n?"":null==t?te.call(n):h(n,t)}:h,de=re?function(n,t){return null==n?"":null==t?re.call(n):v(n,t)}:v,be=ee?function(n,t){return null==n?"":null==t?ee.call(n):y(n,t)}:y,_e=Yr||function(){return(new vr).getTime()
|
||||
},we=8==Zr(T+"08")?Zr:function(n,t){return n=me(n),Zr(n,+t||(U.test(n)?16:10))};return u.after=function(n,t){if(!er(t))throw new jr;return function(){return 1>--n?t.apply(this,arguments):void 0}},u.assign=Yt,u.at=function(n,t){var r=arguments,e=-1,u=gt(r,true,false,1),o=u.length,a=typeof t;for("number"!=a&&"string"!=a||!r[2]||r[2][t]!==n||(o=1),ae.unindexedChars&&ar(n)&&(n=n.split("")),r=gr(o);++e<o;)r[e]=n[u[e]];return r},u.bind=Jt,u.bindAll=function(n){for(var t=1<arguments.length?gt(arguments,true,false,1):tr(n),r=-1,e=t.length;++r<e;){var u=t[r];
|
||||
n[u]=xt(n[u],k,null,null,n)}return n},u.bindKey=function(n,t){return 2<arguments.length?xt(t,k|O|A,Rt(arguments,2),null,n):xt(t,k|O,null,null,n)},u.chain=function(n){return n=new o(n),n.__chain__=true,n},u.compact=function(n){for(var t=-1,r=n?n.length:0,e=0,u=[];++t<r;){var o=n[t];o&&(u[e++]=o)}return u},u.compose=function(){for(var n=arguments,t=n.length;t--;)if(!er(n[t]))throw new jr;return function(){for(var t=arguments,r=n.length;r--;)t=[n[r].apply(this,t)];return t[0]}},u.constant=function(n){return function(){return n
|
||||
}},u.countBy=ce,u.create=function(n,t){var r=j(n);return t?Yt(r,t):r},u.createCallback=function(n,t,r){var e=typeof n;return null==n||"function"==e?R(n,t,r):"object"!=e?sr(n):fr(n)},u.curry=function(n,t){return t=typeof t=="number"?t:+t||n.length,xt(n,E,null,null,null,t)},u.debounce=Qt,u.defaults=Zt,u.defer=function(n){if(!er(n))throw new jr;var t=Rt(arguments,1);return Br(function(){n.apply(w,t)},1)},u.delay=function(n,t){if(!er(n))throw new jr;var r=Rt(arguments,2);return Br(function(){n.apply(w,r)
|
||||
},t)},u.difference=function(n){return pt(n,gt(arguments,true,true,1))},u.filter=Bt,u.flatten=function(n,t,r,e){var u=typeof t;return"boolean"!=u&&null!=t&&(e=r,r=t,t=false,"number"!=u&&"string"!=u||!e||e[r]!==n||(r=null)),null!=r&&(n=Mt(n,r,e)),gt(n,t)},u.forEach=zt,u.forEachRight=Kt,u.forIn=function(n,t,r){return t=t&&typeof r=="undefined"?t:R(t,r,3),le(n,t)},u.forInRight=function(n,t,r){var e=[];le(n,function(n,t){e.push(t,n)});var u=e.length;for(t=R(t,r,3);u--&&false!==t(e[u--],e[u],n););return n},u.forOwn=function(n,t,r){return t=t&&typeof r=="undefined"?t:R(t,r,3),vt(n,t)
|
||||
},u.forOwnRight=nr,u.functions=tr,u.groupBy=pe,u.indexBy=se,u.initial=function(n,t,r){var e=0,o=n?n.length:0;if(typeof t!="number"&&null!=t){var a=o;for(t=u.createCallback(t,r,3);a--&&t(n[a],a,n);)e++}else e=null==t||r?1:t||e;return e=o-e,Rt(n,0,0<e?e:0)},u.intersection=function(){for(var n=[],e=-1,u=arguments.length,o=c(),a=kt(),i=Lr&&a===t,l=c();++e<u;){var f=arguments[e];(he(f)||St(f))&&(n.push(f),o.push(i&&f.length>=N&&jt(e?n[e]:l)))}var i=n[0],p=-1,g=i?i.length:0,h=[];n:for(;++p<g;){var v=o[0],f=i[p];
|
||||
if(0>(v?r(v,f):a(l,f))){for(e=u,(v||l).push(f);--e;)if(v=o[e],0>(v?r(v,f):a(n[e],f)))continue n;h.push(f)}}return s(o),s(l),h},u.invert=function(n,t){for(var r=-1,e=ye(n),u=e.length,o={};++r<u;){var a=e[r],i=n[a];t?qr.call(o,i)?o[i].push(a):o[i]=[a]:o[i]=a}return o},u.invoke=function(n,t){var r=Rt(arguments,2),e=-1,u=typeof t=="function",o=n?n.length:0,a=gr(typeof o=="number"?o:0);return st(n,function(n){a[++e]=(u?t:n[t]).apply(n,r)}),a},u.keys=ye,u.map=Mt,u.mapValues=function(n,t,r){var e={};return t=u.createCallback(t,r,3),vt(n,function(n,r,u){e[r]=t(n,r,u)
|
||||
}),e},u.match=fr,u.max=Ut,u.memoize=function(n,t){if(!er(n))throw new jr;var r=function(){var e=r.cache,u=t?t.apply(this,arguments):"_"+arguments[0];return qr.call(e,u)?e[u]:e[u]=n.apply(this,arguments)};return r.cache={},r},u.merge=function(n,t,r){if(!ur(n))return n;var e=arguments,u=e.length,o=typeof r;if("number"!=o&&"string"!=o||!e[3]||e[3][r]!==t||(u=2),3<u&&"function"==typeof e[u-2])var a=R(e[--u-1],e[u--],2);else 2<u&&"function"==typeof e[u-1]&&(a=e[--u]);for(var e=Rt(arguments,1,u),o=-1,i=c(),l=c();++o<u;)dt(n,e[o],a,i,l);
|
||||
return s(i),s(l),n},u.min=function(n,t,r){var o=1/0,a=o,i=typeof t;if("number"!=i&&"string"!=i||!r||r[t]!==n||(t=null),null==t&&he(n))for(r=-1,i=n.length;++r<i;){var l=n[r];l<a&&(a=l)}else t=null==t&&ar(n)?e:u.createCallback(t,r,3),st(n,function(n,r,e){r=t(n,r,e),r<o&&(o=r,a=n)});return a},u.omit=function(n,t,r){var e={};if(typeof t!="function"){var o=[];le(n,function(n,t){o.push(t)});for(var o=pt(o,gt(arguments,true,false,1)),a=-1,i=o.length;++a<i;){var l=o[a];e[l]=n[l]}}else t=u.createCallback(t,r,3),le(n,function(n,r,u){t(n,r,u)||(e[r]=n)
|
||||
});return e},u.once=function(n){var t,r;if(!er(n))throw new jr;return function(){return t?r:(t=true,r=n.apply(this,arguments),n=null,r)}},u.pairs=function(n){for(var t=-1,r=ye(n),e=r.length,u=gr(e);++t<e;){var o=r[t];u[t]=[o,n[o]]}return u},u.partial=function(n){return xt(n,A,Rt(arguments,1))},u.partialRight=function(n){return xt(n,I,null,Rt(arguments,1))},u.pick=function(n,t,r){var e={};if(typeof t!="function")for(var o=-1,a=gt(arguments,true,false,1),i=ur(n)?a.length:0;++o<i;){var l=a[o];l in n&&(e[l]=n[l])
|
||||
}else t=u.createCallback(t,r,3),le(n,function(n,r,u){t(n,r,u)&&(e[r]=n)});return e},u.pluck=ge,u.property=sr,u.pull=function(n){for(var t=arguments,r=0,e=t.length,u=n?n.length:0;++r<e;)for(var o=-1,a=t[r];++o<u;)n[o]===a&&(Wr.call(n,o--,1),u--);return n},u.range=function(n,t,r){n=+n||0,r=typeof r=="number"?r:+r||1,null==t&&(t=n,n=0);var e=-1;t=Jr(0,Nr((t-n)/(r||1)));for(var u=gr(t);++e<t;)u[e]=n,n+=r;return u},u.reject=function(n,t,r){return t=u.createCallback(t,r,3),Bt(n,function(n,r,e){return!t(n,r,e)
|
||||
})},u.remove=function(n,t,r){var e=-1,o=n?n.length:0,a=[];for(t=u.createCallback(t,r,3);++e<o;)r=n[e],t(r,e,n)&&(a.push(r),Wr.call(n,e--,1),o--);return a},u.rest=Nt,u.shuffle=Gt,u.slice=Rt,u.sortBy=function(n,t,r){var e=-1,o=t&&he(t),l=n?n.length:0,f=gr(typeof l=="number"?l:0);for(o||(t=u.createCallback(t,r,3)),st(n,function(n,r,u){var a=f[++e]=x.pop()||{f:null,g:0,h:null};a.g=e,a.h=n,a.f=o?Mt(t,function(t){return n[t]}):t(n,r,u)}),l=f.length,f.sort(o?i:a);l--;)n=f[l],f[l]=n.h,g(n);return f},u.tap=function(n,t,r){return t.call(r,n),n
|
||||
},u.throttle=function(n,t,r){var e=true,u=true;if(!er(n))throw new jr;return false===r?e=false:ur(r)&&(e="leading"in r?r.leading:e,u="trailing"in r?r.trailing:u),lt.leading=e,lt.maxWait=t,lt.trailing=u,Qt(n,t,lt)},u.times=function(n,t,r){n=-1<(n=+n)?n:0;var e=-1,u=gr(n);for(t=R(t,r,1);++e<n;)u[e]=t(e);return u},u.toArray=function(n){return n&&typeof n.length=="number"?ae.unindexedChars&&ar(n)?n.split(""):Rt(n):ir(n)},u.transform=function(n,t,r,e){var o=he(n);if(null==r)if(o)r=[];else{var a=n&&n.constructor;
|
||||
r=j(a&&a.prototype)}return t&&(t=u.createCallback(t,e,4),(o?st:vt)(n,function(n,e,u){return t(r,n,e,u)})),r},u.union=function(){return _t(gt(arguments,true,true))},u.uniq=Pt,u.values=ir,u.where=Bt,u.without=function(n){return pt(n,Rt(arguments,1))},u.wrap=function(n,t){return xt(t,A,[n])},u.xor=function(){for(var n=-1,t=arguments.length;++n<t;){var r=arguments[n];if(he(r)||St(r))var e=e?pt(e,r).concat(pt(r,e)):r}return e?_t(e):[]},u.zip=Dt,u.zipObject=qt,u.collect=Mt,u.drop=Nt,u.each=zt,u.eachRight=Kt,u.extend=Yt,u.methods=tr,u.object=qt,u.select=Bt,u.tail=Nt,u.unique=Pt,u.unzip=Dt,cr(Yt({},u)),u.capitalize=function(n){return null==n?"":(n=wr(n),n.charAt(0).toUpperCase()+n.slice(1))
|
||||
},u.clone=function(n,t,r,e){var u=typeof t;return"boolean"!=u&&null!=t&&(e=r,r=t,t=false,"number"!=u&&"string"!=u||!e||e[r]!==n||(r=null)),d(n,t,typeof r=="function"&&R(r,e,1))},u.cloneDeep=function(n,t,r){return d(n,true,typeof t=="function"&&R(t,r,1))},u.contains=$t,u.escape=function(n){return null==n?"":wr(n).replace($,l)},u.every=Lt,u.find=Wt,u.findIndex=function(n,t,r){var e=-1,o=n?n.length:0;for(t=u.createCallback(t,r,3);++e<o;)if(t(n[e],e,n))return e;return-1},u.findKey=function(n,t,r){var e;return t=u.createCallback(t,r,3),vt(n,function(n,r,u){return t(n,r,u)?(e=r,false):void 0
|
||||
}),e},u.findLast=function(n,t,r){var e;return t=u.createCallback(t,r,3),Kt(n,function(n,r,u){return t(n,r,u)?(e=n,false):void 0}),e},u.findLastIndex=function(n,t,r){var e=n?n.length:0;for(t=u.createCallback(t,r,3);e--;)if(t(n[e],e,n))return e;return-1},u.findLastKey=function(n,t,r){var e;return t=u.createCallback(t,r,3),nr(n,function(n,r,u){return t(n,r,u)?(e=r,false):void 0}),e},u.has=function(n,t){return n?qr.call(n,t):false},u.identity=lr,u.indexOf=It,u.isArguments=St,u.isArray=he,u.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&Ar.call(n)==Z||false
|
||||
},u.isDate=function(n){return n&&typeof n=="object"&&Ar.call(n)==nt||false},u.isElement=rr,u.isEmpty=function(n){var t=true;if(!n)return t;var r=Ar.call(n),e=n.length;return r==Y||r==at||(ae.argsClass?r==Q:St(n))||r==ut&&typeof e=="number"&&er(n.splice)?!e:(vt(n,function(){return t=false}),t)},u.isEqual=function(n,t,r,e){return yt(n,t,typeof r=="function"&&R(r,e,2))},u.isFinite=function(n){return Xr(n)&&!Gr(parseFloat(n))},u.isFunction=er,u.isNaN=function(n){return or(n)&&n!=+n},u.isNull=function(n){return null===n
|
||||
},u.isNumber=or,u.isObject=ur,u.isPlainObject=ve,u.isRegExp=function(n){var t=typeof n;return n&&("function"==t||"object"==t)&&Ar.call(n)==ot||false},u.isString=ar,u.isUndefined=function(n){return typeof n=="undefined"},u.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(e=(0>r?Jr(0,e+r):Qr(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},u.mixin=cr,u.noConflict=function(){return n._=Sr,this},u.noop=pr,u.now=_e,u.parseInt=we,u.random=function(n,t,r){var e=null==n,u=null==t;return null==r&&(u&&typeof n=="boolean"?(r=n,n=1):typeof t=="boolean"&&(r=t,u=true)),e&&u&&(t=1,u=false),n=+n||0,u?(t=n,n=0):t=+t||0,r||n%1||t%1?(r=ne(),Qr(n+r*(t-n+parseFloat("1e-"+((r+"").length-1))),t)):bt(n,t)
|
||||
},u.reduce=Vt,u.reduceRight=Xt,u.result=function(n,t,r){return null==n?r:(r="undefined"!=typeof n[t]?n[t]:r,er(r)?n[t]():r)},u.runInContext=_,u.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:ye(n).length},u.some=Ht,u.sortedIndex=Tt,u.template=function(n,t,r){var e=u.templateSettings;n=wr(n||""),r=Zt({},r,e);var o,a=Zt({},r.imports,e.imports),e=ye(a),a=ir(a),i=0,l=r.interpolate||V,c="__p+='",l=_r((r.escape||V).source+"|"+l.source+"|"+(l===W?z:V).source+"|"+(r.evaluate||V).source+"|$","g");
|
||||
n.replace(l,function(t,r,e,u,a,l){return e||(e=u),c+=n.slice(i,l).replace(G,f),r&&(c+="'+__e("+r+")+'"),a&&(o=true,c+="';"+a+";\n__p+='"),e&&(c+="'+((__t=("+e+"))==null?'':__t)+'"),i=l+t.length,t}),c+="';",l=r=r.variable,l||(r="obj",c="with("+r+"){"+c+"}"),c=(o?c.replace(P,""):c).replace(D,"$1").replace(q,"$1;"),c="function("+r+"){"+(l?"":r+"||("+r+"={});")+"var __t,__p='',__e=_.escape"+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+c+"return __p}";try{var p=yr(e,"return "+c).apply(w,a)
|
||||
}catch(s){throw s.source=c,s}return t?p(t):(p.source=c,p)},u.trim=me,u.trimLeft=de,u.trimRight=be,u.unescape=function(n){return null==n?"":(n=wr(n),0>n.indexOf(";")?n:n.replace(F,b))},u.uniqueId=function(n){var t=++C;return wr(null==n?"":n)+t},u.all=Lt,u.any=Ht,u.detect=Wt,u.findWhere=Wt,u.foldl=Vt,u.foldr=Xt,u.include=$t,u.inject=Vt,cr(function(){var n={};return vt(u,function(t,r){u.prototype[r]||(n[r]=t)}),n}(),false),u.first=At,u.last=function(n,t,r){var e=0,o=n?n.length:0;if(typeof t!="number"&&null!=t){var a=o;
|
||||
for(t=u.createCallback(t,r,3);a--&&t(n[a],a,n);)e++}else if(e=t,null==e||r)return n?n[o-1]:w;return e=o-e,Rt(n,0<e?e:0)},u.sample=function(n,t,r){return n&&typeof n.length!="number"?n=ir(n):ae.unindexedChars&&ar(n)&&(n=n.split("")),null==t||r?n?n[bt(0,n.length-1)]:w:(n=Gt(n),n.length=Qr(Jr(0,t),n.length),n)},u.take=At,u.head=At,vt(u,function(n,t){var r="sample"!==t;u.prototype[t]||(u.prototype[t]=function(t,e){var u=this.__chain__,a=n(this.__wrapped__,t,e);return u||null!=t&&(!e||r&&typeof t=="function")?new o(a,u):a
|
||||
})}),u.VERSION="2.4.1",u.prototype.chain=function(){return this.__chain__=true,this},u.prototype.toString=function(){return wr(this.__wrapped__)},u.prototype.value=Ft,u.prototype.valueOf=Ft,st(["join","pop","shift"],function(n){var t=xr[n];u.prototype[n]=function(){var n=this.__chain__,r=t.apply(this.__wrapped__,arguments);return n?new o(r,n):r}}),st(["push","reverse","sort","unshift"],function(n){var t=xr[n];u.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),st(["concat","splice"],function(n){var t=xr[n];
|
||||
u.prototype[n]=function(){return new o(t.apply(this.__wrapped__,arguments),this.__chain__)}}),ae.spliceObjects||st(["pop","shift","splice"],function(n){var t=xr[n],r="splice"==n;u.prototype[n]=function(){var n=this.__chain__,e=this.__wrapped__,u=t.apply(e,arguments);return 0===e.length&&delete e[0],n||r?new o(u,n):u}}),u}var w,j=[],x=[],C=0,k=1,O=2,E=4,S=8,A=16,I=32,N=75,R=40,T=" \t\x0B\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",P=/\b__p\+='';/g,D=/\b(__p\+=)''\+/g,q=/(__e\(.*?\)|\b__t\))\+'';/g,F=/&(?:amp|lt|gt|quot|#39);/g,$=/[&<>"']/g,L=/<%-([\s\S]+?)%>/g,B=/<%([\s\S]+?)%>/g,W=/<%=([\s\S]+?)%>/g,z=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,K=/\w*$/,M=/^\s*function[ \n\r\t]+\w/,U=/^0[xX]/,V=/($^)/,X=/\bthis\b/,G=/['\n\r\t\u2028\u2029\\]/g,H="Array Boolean Date Error Function Math Number Object RegExp Set String _ clearTimeout document isFinite isNaN parseInt setTimeout TypeError window WinRTError".split(" "),J="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),Q="[object Arguments]",Y="[object Array]",Z="[object Boolean]",nt="[object Date]",tt="[object Error]",rt="[object Function]",et="[object Number]",ut="[object Object]",ot="[object RegExp]",at="[object String]",it={};
|
||||
it[rt]=false,it[Q]=it[Y]=it[Z]=it[nt]=it[et]=it[ut]=it[ot]=it[at]=true;var lt={leading:false,maxWait:0,trailing:false},ft={configurable:false,enumerable:false,value:null,writable:false},ct={"&":"&","<":"<",">":">",'"':""","'":"'"},pt={"&":"&","<":"<",">":">",""":'"',"'":"'"},st={"function":true,object:true},gt={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},ht=st[typeof window]&&window||this,vt=st[typeof exports]&&exports&&!exports.nodeType&&exports,yt=st[typeof global]&&global;
|
||||
!yt||yt.global!==yt&&yt.window!==yt||(ht=yt);var yt=(st=st[typeof module]&&module&&!module.nodeType&&module)&&st.exports===vt&&vt,mt=_();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(ht._=mt, define(function(){return mt})):vt&&st?yt?(st.exports=mt)._=mt:vt._=mt:ht._=mt}).call(this);
|
||||
166
dist/lodash.js
vendored
166
dist/lodash.js
vendored
@@ -934,7 +934,7 @@
|
||||
stackB.push(result);
|
||||
|
||||
// recursively populate clone (susceptible to call stack limits)
|
||||
(isArr ? forEach : forOwn)(value, function(objValue, key) {
|
||||
(isArr ? baseEach : baseForOwn)(value, function(objValue, key) {
|
||||
result[key] = baseClone(objValue, isDeep, callback, stackA, stackB);
|
||||
});
|
||||
|
||||
@@ -1110,6 +1110,32 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.forEach` without support for callback
|
||||
* shorthands or `thisArg` binding.
|
||||
*
|
||||
* @private
|
||||
* @param {Array|Object|string} collection The collection to iterate over.
|
||||
* @param {Function} callback The function called per iteration.
|
||||
* @returns {Array|Object|string} Returns `collection`.
|
||||
*/
|
||||
function baseEach(collection, callback) {
|
||||
var index = -1,
|
||||
iterable = collection,
|
||||
length = collection ? collection.length : 0;
|
||||
|
||||
if (typeof length == 'number') {
|
||||
while (++index < length) {
|
||||
if (callback(iterable[index], index, collection) === false) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
baseForOwn(collection, callback);
|
||||
}
|
||||
return collection;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.flatten` without support for callback
|
||||
* shorthands or `thisArg` binding.
|
||||
@@ -1150,6 +1176,29 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.forOwn` without support for callback
|
||||
* shorthands or `thisArg` binding.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} callback The function called per iteration.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function baseForOwn(object, callback) {
|
||||
var index = -1,
|
||||
props = keys(object),
|
||||
length = props.length;
|
||||
|
||||
while (++index < length) {
|
||||
var key = props[index];
|
||||
if (callback(object[key], key, object) === false) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return object;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.isEqual`, without support for `thisArg` binding,
|
||||
* that allows partial "_.where" style comparisons.
|
||||
@@ -1297,7 +1346,7 @@
|
||||
else {
|
||||
// deep compare objects using `forIn`, instead of `forOwn`, to avoid `Object.keys`
|
||||
// which, in this case, is more costly
|
||||
forIn(b, function(value, key, b) {
|
||||
baseForIn(b, function(value, key, b) {
|
||||
if (hasOwnProperty.call(b, key)) {
|
||||
// count the number of properties.
|
||||
size++;
|
||||
@@ -1308,7 +1357,7 @@
|
||||
|
||||
if (result && !isWhere) {
|
||||
// ensure both objects have the same number of properties
|
||||
forIn(a, function(value, key, a) {
|
||||
baseForIn(a, function(value, key, a) {
|
||||
if (hasOwnProperty.call(a, key)) {
|
||||
// `size` will be `-1` if `a` has more properties than `b`
|
||||
return (result = --size > -1);
|
||||
@@ -1338,7 +1387,7 @@
|
||||
* @param {Array} [stackB=[]] Associates values with source counterparts.
|
||||
*/
|
||||
function baseMerge(object, source, callback, stackA, stackB) {
|
||||
(isArray(source) ? forEach : forOwn)(source, function(source, key) {
|
||||
(isArray(source) ? baseEach : baseForOwn)(source, function(source, key) {
|
||||
var found,
|
||||
isArr,
|
||||
result = source,
|
||||
@@ -1471,7 +1520,7 @@
|
||||
setter(result, value, callback(value, index, collection), collection);
|
||||
}
|
||||
} else {
|
||||
forOwn(collection, function(value, key, collection) {
|
||||
baseEach(collection, function(value, key, collection) {
|
||||
setter(result, value, callback(value, key, collection), collection);
|
||||
});
|
||||
}
|
||||
@@ -1636,7 +1685,7 @@
|
||||
// In most environments an object's own properties are iterated before
|
||||
// its inherited properties. If the last iterated property is an object's
|
||||
// own property then there are no inherited enumerable properties.
|
||||
forIn(value, function(value, key) {
|
||||
baseForIn(value, function(value, key) {
|
||||
result = key;
|
||||
});
|
||||
return typeof result == 'undefined' || hasOwnProperty.call(value, result);
|
||||
@@ -1665,6 +1714,28 @@
|
||||
toString.call(value) == argsClass || false;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.forIn` without support for callback
|
||||
* shorthands or `thisArg` binding.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} callback The function called per iteration.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
var baseForIn = function(object, callback) {
|
||||
var result = object;
|
||||
if (!isObject(object)) {
|
||||
return result;
|
||||
}
|
||||
for (var key in object) {
|
||||
if (callback(object[key], key, object) === false) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* A fallback implementation of `Object.keys` which produces an array of the
|
||||
* given object's own enumerable property names.
|
||||
@@ -2989,7 +3060,7 @@
|
||||
var index = -1,
|
||||
result = false;
|
||||
|
||||
forOwn(collection, function(value) {
|
||||
baseEach(collection, function(value) {
|
||||
if (++index >= fromIndex) {
|
||||
return !(result = value === target);
|
||||
}
|
||||
@@ -3091,7 +3162,7 @@
|
||||
}
|
||||
}
|
||||
} else {
|
||||
forOwn(collection, function(value, index, collection) {
|
||||
baseEach(collection, function(value, index, collection) {
|
||||
return (result = !!callback(value, index, collection));
|
||||
});
|
||||
}
|
||||
@@ -3153,7 +3224,7 @@
|
||||
}
|
||||
}
|
||||
} else {
|
||||
forOwn(collection, function(value, index, collection) {
|
||||
baseEach(collection, function(value, index, collection) {
|
||||
if (callback(value, index, collection)) {
|
||||
result.push(value);
|
||||
}
|
||||
@@ -3220,7 +3291,7 @@
|
||||
}
|
||||
} else {
|
||||
var result;
|
||||
forOwn(collection, function(value, index, collection) {
|
||||
baseEach(collection, function(value, index, collection) {
|
||||
if (callback(value, index, collection)) {
|
||||
result = value;
|
||||
return false;
|
||||
@@ -3300,7 +3371,7 @@
|
||||
}
|
||||
}
|
||||
} else {
|
||||
forOwn(collection, callback);
|
||||
baseEach(collection, callback);
|
||||
}
|
||||
return collection;
|
||||
}
|
||||
@@ -3334,7 +3405,7 @@
|
||||
} else {
|
||||
var props = keys(collection);
|
||||
length = props.length;
|
||||
forOwn(collection, function(value, key, collection) {
|
||||
baseEach(collection, function(value, key, collection) {
|
||||
key = props ? props[--length] : --length;
|
||||
return callback(collection[key], key, collection);
|
||||
});
|
||||
@@ -3457,7 +3528,7 @@
|
||||
length = collection ? collection.length : 0,
|
||||
result = Array(typeof length == 'number' ? length : 0);
|
||||
|
||||
forEach(collection, function(value) {
|
||||
baseEach(collection, function(value) {
|
||||
result[++index] = (isFunc ? methodName : value[methodName]).apply(value, args);
|
||||
});
|
||||
return result;
|
||||
@@ -3514,7 +3585,7 @@
|
||||
}
|
||||
} else {
|
||||
result = [];
|
||||
forOwn(collection, function(value, key, collection) {
|
||||
baseEach(collection, function(value, key, collection) {
|
||||
result[++index] = callback(value, key, collection);
|
||||
});
|
||||
}
|
||||
@@ -3586,7 +3657,7 @@
|
||||
? charAtCallback
|
||||
: lodash.createCallback(callback, thisArg, 3);
|
||||
|
||||
forEach(collection, function(value, index, collection) {
|
||||
baseEach(collection, function(value, index, collection) {
|
||||
var current = callback(value, index, collection);
|
||||
if (current > computed) {
|
||||
computed = current;
|
||||
@@ -3662,7 +3733,7 @@
|
||||
? charAtCallback
|
||||
: lodash.createCallback(callback, thisArg, 3);
|
||||
|
||||
forEach(collection, function(value, index, collection) {
|
||||
baseEach(collection, function(value, index, collection) {
|
||||
var current = callback(value, index, collection);
|
||||
if (current < computed) {
|
||||
computed = current;
|
||||
@@ -3740,7 +3811,7 @@
|
||||
accumulator = callback(accumulator, collection[index], index, collection);
|
||||
}
|
||||
} else {
|
||||
forOwn(collection, function(value, index, collection) {
|
||||
baseEach(collection, function(value, index, collection) {
|
||||
accumulator = noaccum
|
||||
? (noaccum = false, value)
|
||||
: callback(accumulator, value, index, collection)
|
||||
@@ -3874,7 +3945,7 @@
|
||||
length = collection ? collection.length : 0,
|
||||
result = Array(typeof length == 'number' ? length : 0);
|
||||
|
||||
forEach(collection, function(value) {
|
||||
baseEach(collection, function(value) {
|
||||
var rand = baseRandom(0, ++index);
|
||||
result[index] = result[rand];
|
||||
result[rand] = value;
|
||||
@@ -3964,7 +4035,7 @@
|
||||
}
|
||||
}
|
||||
} else {
|
||||
forOwn(collection, function(value, index, collection) {
|
||||
baseEach(collection, function(value, index, collection) {
|
||||
return !(result = callback(value, index, collection));
|
||||
});
|
||||
}
|
||||
@@ -4029,7 +4100,7 @@
|
||||
if (!multi) {
|
||||
callback = lodash.createCallback(callback, thisArg, 3);
|
||||
}
|
||||
forEach(collection, function(value, key, collection) {
|
||||
baseEach(collection, function(value, key, collection) {
|
||||
var object = result[++index] = getObject();
|
||||
object.index = index;
|
||||
object.value = value;
|
||||
@@ -5035,7 +5106,7 @@
|
||||
function findKey(object, callback, thisArg) {
|
||||
var result;
|
||||
callback = lodash.createCallback(callback, thisArg, 3);
|
||||
forOwn(object, function(value, key, object) {
|
||||
baseForOwn(object, function(value, key, object) {
|
||||
if (callback(value, key, object)) {
|
||||
result = key;
|
||||
return false;
|
||||
@@ -5128,19 +5199,10 @@
|
||||
* });
|
||||
* // => logs 'x', 'y', and 'move' (property order is not guaranteed across environments)
|
||||
*/
|
||||
var forIn = function(object, callback, thisArg) {
|
||||
var result = object;
|
||||
if (!isObject(object)) {
|
||||
return result;
|
||||
}
|
||||
function forIn(object, callback, thisArg) {
|
||||
callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3);
|
||||
for (var key in object) {
|
||||
if (callback(object[key], key, object) === false) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
return baseForIn(object, callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is like `_.forIn` except that it iterates over elements
|
||||
@@ -5173,7 +5235,7 @@
|
||||
function forInRight(object, callback, thisArg) {
|
||||
var pairs = [];
|
||||
|
||||
forIn(object, function(value, key) {
|
||||
baseForIn(object, function(value, key) {
|
||||
pairs.push(key, value);
|
||||
});
|
||||
|
||||
@@ -5208,18 +5270,8 @@
|
||||
* // => logs '0', '1', and 'length' (property order is not guaranteed across environments)
|
||||
*/
|
||||
function forOwn(object, callback, thisArg) {
|
||||
var index = -1,
|
||||
props = keys(object),
|
||||
length = props.length;
|
||||
|
||||
callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3);
|
||||
while (++index < length) {
|
||||
var key = props[index];
|
||||
if (callback(object[key], key, object) === false) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return object;
|
||||
return baseForOwn(object, callback);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -5271,7 +5323,7 @@
|
||||
*/
|
||||
function functions(object) {
|
||||
var result = [];
|
||||
forIn(object, function(value, key) {
|
||||
baseForIn(object, function(value, key) {
|
||||
if (isFunction(value)) {
|
||||
result.push(key);
|
||||
}
|
||||
@@ -5462,7 +5514,7 @@
|
||||
(className == objectClass && typeof length == 'number' && isFunction(value.splice))) {
|
||||
return !length;
|
||||
}
|
||||
forOwn(value, function() {
|
||||
baseForOwn(value, function() {
|
||||
return (result = false);
|
||||
});
|
||||
return result;
|
||||
@@ -5811,7 +5863,7 @@
|
||||
var result = {};
|
||||
callback = lodash.createCallback(callback, thisArg, 3);
|
||||
|
||||
forOwn(object, function(value, key, object) {
|
||||
baseForOwn(object, function(value, key, object) {
|
||||
result[key] = callback(value, key, object);
|
||||
});
|
||||
return result;
|
||||
@@ -5930,7 +5982,7 @@
|
||||
var result = {};
|
||||
if (typeof callback != 'function') {
|
||||
var props = [];
|
||||
forIn(object, function(value, key) {
|
||||
baseForIn(object, function(value, key) {
|
||||
props.push(key);
|
||||
});
|
||||
props = baseDifference(props, baseFlatten(arguments, true, false, 1));
|
||||
@@ -5944,7 +5996,7 @@
|
||||
}
|
||||
} else {
|
||||
callback = lodash.createCallback(callback, thisArg, 3);
|
||||
forIn(object, function(value, key, object) {
|
||||
baseForIn(object, function(value, key, object) {
|
||||
if (!callback(value, key, object)) {
|
||||
result[key] = value;
|
||||
}
|
||||
@@ -6022,7 +6074,7 @@
|
||||
}
|
||||
} else {
|
||||
callback = lodash.createCallback(callback, thisArg, 3);
|
||||
forIn(object, function(value, key, object) {
|
||||
baseForIn(object, function(value, key, object) {
|
||||
if (callback(value, key, object)) {
|
||||
result[key] = value;
|
||||
}
|
||||
@@ -6076,7 +6128,7 @@
|
||||
}
|
||||
if (callback) {
|
||||
callback = lodash.createCallback(callback, thisArg, 4);
|
||||
(isArr ? forEach : forOwn)(object, function(value, index, object) {
|
||||
(isArr ? baseEach : baseForOwn)(object, function(value, index, object) {
|
||||
return callback(accumulator, value, index, object);
|
||||
});
|
||||
}
|
||||
@@ -7071,7 +7123,7 @@
|
||||
|
||||
mixin(function() {
|
||||
var source = {}
|
||||
forOwn(lodash, function(func, methodName) {
|
||||
baseForOwn(lodash, function(func, methodName) {
|
||||
if (!lodash.prototype[methodName]) {
|
||||
source[methodName] = func;
|
||||
}
|
||||
@@ -7090,7 +7142,7 @@
|
||||
lodash.take = first;
|
||||
lodash.head = first;
|
||||
|
||||
forOwn(lodash, function(func, methodName) {
|
||||
baseForOwn(lodash, function(func, methodName) {
|
||||
var callbackable = methodName !== 'sample';
|
||||
if (!lodash.prototype[methodName]) {
|
||||
lodash.prototype[methodName]= function(n, guard) {
|
||||
@@ -7122,7 +7174,7 @@
|
||||
lodash.prototype.valueOf = wrapperValueOf;
|
||||
|
||||
// add `Array` functions that return unwrapped values
|
||||
forEach(['join', 'pop', 'shift'], function(methodName) {
|
||||
baseEach(['join', 'pop', 'shift'], function(methodName) {
|
||||
var func = arrayRef[methodName];
|
||||
lodash.prototype[methodName] = function() {
|
||||
var chainAll = this.__chain__,
|
||||
@@ -7135,7 +7187,7 @@
|
||||
});
|
||||
|
||||
// add `Array` functions that return the existing wrapped value
|
||||
forEach(['push', 'reverse', 'sort', 'unshift'], function(methodName) {
|
||||
baseEach(['push', 'reverse', 'sort', 'unshift'], function(methodName) {
|
||||
var func = arrayRef[methodName];
|
||||
lodash.prototype[methodName] = function() {
|
||||
func.apply(this.__wrapped__, arguments);
|
||||
@@ -7144,7 +7196,7 @@
|
||||
});
|
||||
|
||||
// add `Array` functions that return new wrapped values
|
||||
forEach(['concat', 'splice'], function(methodName) {
|
||||
baseEach(['concat', 'splice'], function(methodName) {
|
||||
var func = arrayRef[methodName];
|
||||
lodash.prototype[methodName] = function() {
|
||||
return new lodashWrapper(func.apply(this.__wrapped__, arguments), this.__chain__);
|
||||
|
||||
101
dist/lodash.min.js
vendored
101
dist/lodash.min.js
vendored
@@ -3,56 +3,57 @@
|
||||
* Lo-Dash 2.4.1 (Custom Build) lodash.com/license | Underscore.js 1.5.2 underscorejs.org/LICENSE
|
||||
* Build: `lodash modern -o ./dist/lodash.js`
|
||||
*/
|
||||
;(function(){function n(n,t){if(n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1}return 0}function t(n,t,r){r=(r||0)-1;for(var e=n?n.length:0;++r<e;)if(n[r]===t)return r;return-1}function r(n,t){return n.has(t)?0:-1}function e(n){return n.charCodeAt(0)}function u(n,t){for(var r=-1,e=n.length;++r<e&&0<=t.indexOf(n.charAt(r)););return r}function o(n,t){for(var r=n.length;r--&&0<=t.indexOf(n.charAt(r)););return r}function i(t,r){return n(t.i,r.i)||t.j-r.j}function a(t,r){for(var e=t.i,u=r.i,o=-1,i=e.length;++o<i;){var a=n(e[o],u[o]);
|
||||
if(a)return a}return t.j-r.j}function f(n){return at[n]}function l(n){return"\\"+ct[n]}function c(){return w.pop()||[]}function p(n){n.length=0,w.length<R&&w.push(n)}function s(n){n.i=n.k=null,j.length<R&&j.push(n)}function g(n,t){return(n=null==n?"":n+"")?null==t?n.slice(y(n),m(n)+1):(t+="",n.slice(u(n,t),o(n,t)+1)):n}function h(n,t){return(n=null==n?"":n+"")?null==t?n.slice(y(n)):(t+="",n.slice(u(n,t))):n}function v(n,t){return(n=null==n?"":n+"")?null==t?n.slice(0,m(n)+1):(t+="",n.slice(0,o(n,t)+1)):n
|
||||
}function y(n){for(var t=-1,r=n.length;++t<r;){var e=n.charCodeAt(t);if((160<e||9>e||13<e)&&32!=e&&160!=e&&5760!=e&&6158!=e&&(8192>e||8202<e&&8232!=e&&8233!=e&&8239!=e&&8287!=e&&12288!=e&&65279!=e))break}return t}function m(n){for(var t=n.length;t--;){var r=n.charCodeAt(t);if((160<r||9>r||13<r)&&32!=r&&160!=r&&5760!=r&&6158!=r&&(8192>r||8202<r&&8232!=r&&8233!=r&&8239!=r&&8287!=r&&12288!=r&&65279!=r))break}return t}function d(n){return ft[n]}function b(n){function u(n,t,r){if(!tr(n))return n;t=t&&typeof r=="undefined"?t:ft(t,r,3);
|
||||
for(var e in n)if(false===t(n[e],e,n))break;return n}function o(n){var t=[];if(!tr(n))return t;for(var r in n)Ir.call(n,r)&&t.push(r);return t}function y(n){return n&&typeof n=="object"&&!ae(n)&&Ir.call(n,"__wrapped__")?n:new m(n)}function m(n,t){this.__chain__=!!t,this.__wrapped__=n}function w(n){function t(){if(e){var n=St(e);Tr.apply(n,arguments)}if(this instanceof t){var o=at(r.prototype),n=r.apply(o,n||arguments);return tr(n)?n:o}return r.apply(u,n||arguments)}var r=n[0],e=n[2],u=n[4];return re(t,n),t
|
||||
}function R(n,t,r,e,u){if(r){var o=r(n);if(typeof o!="undefined")return o}if(!tr(n))return n;var i=Cr.call(n);if(!ut[i])return n;var a=Zr[i];switch(i){case Q:case Y:return new a(+n);case nt:case et:return new a(n);case rt:return o=a(n.source,P.exec(n)),o.lastIndex=n.lastIndex,o}if(i=ae(n),t){var f=!e;e||(e=c()),u||(u=c());for(var l=e.length;l--;)if(e[l]==n)return u[l];o=i?a(n.length):{}}else o=i?St(n):Gt({},n);return i&&(Ir.call(n,"index")&&(o.index=n.index),Ir.call(n,"input")&&(o.input=n.input)),t?(e.push(n),u.push(o),(i?qt:Jt)(n,function(n,i){o[i]=R(n,t,r,e,u)
|
||||
}),f&&(p(e),p(u)),o):o}function at(n){return tr(n)?zr(n):{}}function ft(n,t,r){if(typeof n!="function")return or;if(typeof t=="undefined"||!("prototype"in n))return n;var e=n.__bindData__;if(typeof e=="undefined"&&(ne.funcNames&&(e=!n.name),e=e||!ne.funcDecomp,!e)){var u=Nr.call(n);ne.funcNames||(e=!K.test(u)),e||(e=V.test(u),re(n,e))}if(false===e||true!==e&&e[1]&x)return n;switch(r){case 1:return function(r){return n.call(t,r)};case 2:return function(r,e){return n.call(t,r,e)};case 3:return function(r,e,u){return n.call(t,r,e,u)
|
||||
};case 4:return function(r,e,u,o){return n.call(t,r,e,u,o)}}return Vt(n,t)}function lt(n){function t(){var n=f?i:this;if(u){var g=St(u);Tr.apply(g,arguments)}return(o||c)&&(g||(g=St(arguments)),o&&Tr.apply(g,o),c&&g.length<a)?(e|=S,e&=~E,lt([r,p?e:e&~(x|C),g,null,i,a])):(g||(g=arguments),l&&(r=n[s]),this instanceof t?(n=at(r.prototype),g=r.apply(n,g),tr(g)?g:n):r.apply(n,g))}var r=n[0],e=n[1],u=n[2],o=n[3],i=n[4],a=n[5],f=e&x,l=e&C,c=e&O,p=e&A,s=r;return re(t,n),t}function ct(n,e){var u=-1,o=wt(),i=n?n.length:0,a=[];
|
||||
for(Dr&&i>=N&&o===t&&(o=r,e=bt(e));++u<i;){var f=n[u];0>o(e,f)&&a.push(f)}return a}function st(n,t,r,e){e=(e||0)-1;for(var u=n?n.length:0,o=[];++e<u;){var i=n[e];if(i&&typeof i=="object"&&typeof i.length=="number"&&(ae(i)||xt(i))){t||(i=st(i,t,r));var a=-1,f=i.length,l=o.length;for(o.length+=f;++a<f;)o[l++]=i[a]}else r||o.push(i)}return o}function gt(n,t,r,e,o,i){if(r){var a=r(n,t);if(typeof a!="undefined")return!!a}if(n===t)return 0!==n||1/n==1/t;var f=typeof n,l=typeof t;if(n===n&&(!n||"function"!=f&&"object"!=f)&&(!t||"function"!=l&&"object"!=l))return false;
|
||||
if(null==n||null==t)return n===t;if(l=Cr.call(n),f=Cr.call(t),l==H&&(l=tt),f==H&&(f=tt),l!=f)return false;switch(l){case Q:case Y:return+n==+t;case nt:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case rt:case et:return n==dr(t)}if(f=l==J,!f){var s=Ir.call(n,"__wrapped__"),g=Ir.call(t,"__wrapped__");if(s||g)return gt(s?n.__wrapped__:n,g?t.__wrapped__:t,r,e,o,i);if(l!=tt)return false;if(l=n.constructor,s=t.constructor,l!=s&&!(Ir.call(n,"constructor")&&Ir.call(t,"constructor")||nr(l)&&l instanceof l&&nr(s)&&s instanceof s)&&"constructor"in n&&"constructor"in t)return false
|
||||
}for(l=!o,o||(o=c()),i||(i=c()),s=o.length;s--;)if(o[s]==n)return i[s]==t;var h=0,a=true;if(o.push(n),i.push(t),f){if(s=n.length,h=t.length,(a=h==s)||e)for(;h--;)if(f=s,g=t[h],e)for(;f--&&!(a=gt(n[f],g,r,e,o,i)););else if(!(a=gt(n[h],g,r,e,o,i)))break}else u(t,function(t,u,f){return Ir.call(f,u)?(h++,a=Ir.call(n,u)&>(n[u],t,r,e,o,i)):void 0}),a&&!e&&u(n,function(n,t,r){return Ir.call(r,t)?a=-1<--h:void 0});return o.pop(),i.pop(),l&&(p(o),p(i)),a}function vt(n,t,r,e,u){(ae(t)?qt:Jt)(t,function(t,o){var i,a,f=t,l=n[o];
|
||||
if(t&&((a=ae(t))||fe(t))){for(f=e.length;f--;)if(i=e[f]==t){l=u[f];break}if(!i){var c;r&&(f=r(l,t),c=typeof f!="undefined")&&(l=f),c||(l=a?ae(l)?l:[]:fe(l)?l:{}),e.push(t),u.push(l),c||vt(l,t,r,e,u)}}else r&&(f=r(l,t),typeof f=="undefined"&&(f=t)),typeof f!="undefined"&&(l=f);n[o]=l})}function yt(n,t){return n+Er(Hr()*(t-n+1))}function mt(n,e,u){var o=-1,i=wt(),a=n?n.length:0,f=Dr&&!e&&a>=N&&i===t,l=[];if(f)var s=bt(),i=r;else s=u?c():l;for(;++o<a;){var g=n[o],h=u?u(g,o,n):g;(e?!o||s[s.length-1]!==h:0>i(s,h))&&((u||f)&&s.push(h),l.push(g))
|
||||
}return!f&&u&&p(s),l}function dt(n){return function(t,r,e){var u={};r=y.createCallback(r,e,3),e=-1;var o=t?t.length:0;if(typeof o=="number")for(;++e<o;){var i=t[e];n(u,i,r(i,e,t),t)}else Jt(t,function(t,e,o){n(u,t,r(t,e,o),o)});return u}}function bt(n){var t=new Dr,r=n?n.length:0;for(t.push=t.add;r--;)t.push(n[r]);return t}function _t(n,t,r,e,u,o){var i=t&x,a=t&O,f=t&S,l=t&E;if(!(t&C||nr(n)))throw new br;f&&!r.length&&(t&=-17,f=r=false),l&&!e.length&&(t&=-33,l=e=false);var c=n&&n.__bindData__;return c&&true!==c?(c=St(c),c[2]&&(c[2]=St(c[2])),c[3]&&(c[3]=St(c[3])),!i||c[1]&x||(c[4]=u),!i&&c[1]&x&&(t|=8),!a||c[1]&O||(c[5]=o),f&&Tr.apply(c[2]||(c[2]=[]),r),l&&Br.apply(c[3]||(c[3]=[]),e),c[1]|=t,_t.apply(null,c)):(t==x||t==(x|S)?w:lt)([n,t,r,e,u,o])
|
||||
}function wt(){var n=(n=y.indexOf)===Ot?t:n;return n}function jt(n){return typeof n=="function"&&Or.test(Nr.call(n))}function kt(n){var t,r;return n&&Cr.call(n)==tt&&(Ir.call(n,"constructor")||(t=n.constructor,!nr(t)||t instanceof t))?(u(n,function(n,t){r=t}),typeof r=="undefined"||Ir.call(n,r)):false}function xt(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Cr.call(n)==H||false}function Ct(n,t,r){var e=0,u=n?n.length:0;if(typeof t!="number"&&null!=t){var o=-1;for(t=y.createCallback(t,r,3);++o<u&&t(n[o],o,n);)e++
|
||||
}else if(e=t,null==e||r)return n?n[0]:_;return St(n,0,0<e?e:0)}function Ot(n,r,e){var u=n?n.length:0;if(typeof e=="number")e=0>e?Ur(0,u+e):e||0;else if(e)return e=Et(n,r),u&&n[e]===r?e:-1;return t(n,r,e)}function At(n,t,r){if(typeof t!="number"&&null!=t){var e=0,u=-1,o=n?n.length:0;for(t=y.createCallback(t,r,3);++u<o&&t(n[u],u,n);)e++}else e=null==t||r?1:0<t?t:0;return St(n,e)}function St(n,t,r){var e=-1,u=n?n.length:0;for(typeof t=="undefined"?t=0:0>t?t=Ur(u+t,0):t>u&&(t=u),typeof r=="undefined"?r=u:0>r?r=Ur(u+r,0):r>u&&(r=u),u=r-t||0,r=cr(u);++e<u;)r[e]=n[t+e];
|
||||
return r}function Et(n,t,r,e){var u=0,o=n?n.length:u;for(r=r?y.createCallback(r,e,1):or,t=r(t);u<o;)e=u+o>>>1,r(n[e])<t?u=e+1:o=e;return u}function Nt(n,t,r,e){var u=typeof t;return"boolean"!=u&&null!=t&&(e=r,r=t,t=false,"number"!=u&&"string"!=u||!e||e[r]!==n||(r=null)),null!=r&&(r=y.createCallback(r,e,3)),mt(n,t,r)}function Rt(){for(var n=1<arguments.length?arguments:arguments[0],t=-1,r=n?Lt(ie(n,"length")):0,e=cr(0>r?0:r);++t<r;)e[t]=ie(n,t);return e}function It(n,t){var r=-1,e=n?n.length:0,u={};for(t||!e||ae(n[0])||(t=[]);++r<e;){var o=n[r];
|
||||
t?u[o]=t[r]:o&&(u[o[0]]=o[1])}return u}function Tt(){return this.__wrapped__}function Dt(n,t,r){var e=n?n.length:0;if(r=typeof r=="number"?r:0,typeof e=="number"){if(r>=e)return false;if(typeof n=="string"||!ae(n)&&er(n))return Wr?Wr.call(n,t,r):-1<n.indexOf(t,r);var u=wt();return r=(0>r?Ur(0,e+r):r)||0,-1<u(n,t,r)}var o=-1,i=false;return Jt(n,function(n){return++o<r?void 0:!(i=n===t)}),i}function Ft(n,t,r){var e=true;t=y.createCallback(t,r,3),r=-1;var u=n?n.length:0;if(typeof u=="number")for(;++r<u&&(e=!!t(n[r],r,n)););else Jt(n,function(n,r,u){return e=!!t(n,r,u)
|
||||
});return e}function $t(n,t,r){var e=[];t=y.createCallback(t,r,3),r=-1;var u=n?n.length:0;if(typeof u=="number")for(;++r<u;){var o=n[r];t(o,r,n)&&e.push(o)}else Jt(n,function(n,r,u){t(n,r,u)&&e.push(n)});return e}function Bt(n,t,r){t=y.createCallback(t,r,3),r=-1;var e=n?n.length:0;if(typeof e!="number"){var u;return Jt(n,function(n,r,e){return t(n,r,e)?(u=n,false):void 0}),u}for(;++r<e;){var o=n[r];if(t(o,r,n))return o}}function qt(n,t,r){var e=-1,u=n?n.length:0;if(t=t&&typeof r=="undefined"?t:ft(t,r,3),typeof u=="number")for(;++e<u&&false!==t(n[e],e,n););else Jt(n,t);
|
||||
return n}function Wt(n,t,r){var e=n?n.length:0;if(t=t&&typeof r=="undefined"?t:ft(t,r,3),typeof e=="number")for(;e--&&false!==t(n[e],e,n););else{var u=le(n),e=u.length;Jt(n,function(n,r,o){return r=u?u[--e]:--e,t(o[r],r,o)})}return n}function zt(n,t,r){var e=-1,u=n?n.length:0;if(t=y.createCallback(t,r,3),typeof u=="number")for(var o=cr(u);++e<u;)o[e]=t(n[e],e,n);else o=[],Jt(n,function(n,r,u){o[++e]=t(n,r,u)});return o}function Lt(n,t,r){var u=-1/0,o=u,i=typeof t;if("number"!=i&&"string"!=i||!r||r[t]!==n||(t=null),null==t&&ae(n))for(r=-1,i=n.length;++r<i;){var a=n[r];
|
||||
a>o&&(o=a)}else t=null==t&&er(n)?e:y.createCallback(t,r,3),qt(n,function(n,r,e){r=t(n,r,e),r>u&&(u=r,o=n)});return o}function Pt(n,t,r,e){var u=3>arguments.length;t=y.createCallback(t,e,4);var o=-1,i=n?n.length:0;if(typeof i=="number")for(u&&i&&(r=n[++o]);++o<i;)r=t(r,n[o],o,n);else Jt(n,function(n,e,o){r=u?(u=false,n):t(r,n,e,o)});return r}function Kt(n,t,r,e){var u=3>arguments.length;return t=y.createCallback(t,e,4),Wt(n,function(n,e,o){r=u?(u=false,n):t(r,n,e,o)}),r}function Mt(n){var t=-1,r=n?n.length:0,e=cr(typeof r=="number"?r:0);
|
||||
return qt(n,function(n){var r=yt(0,++t);e[t]=e[r],e[r]=n}),e}function Ut(n,t,r){var e;t=y.createCallback(t,r,3),r=-1;var u=n?n.length:0;if(typeof u=="number")for(;++r<u&&!(e=t(n[r],r,n)););else Jt(n,function(n,r,u){return!(e=t(n,r,u))});return!!e}function Vt(n,t){return 2<arguments.length?_t(n,x|S,St(arguments,2),null,t):_t(n,x,null,null,t)}function Xt(n,t,r){function e(){c&&Sr(c),i=c=p=_,(h||g!==t)&&(s=ge(),a=n.apply(l,o),c||i||(o=l=null))}function u(){var r=t-(ge()-f);0<r?c=Fr(u,r):(i&&Sr(i),r=p,i=c=p=_,r&&(s=ge(),a=n.apply(l,o),c||i||(o=l=null)))
|
||||
}var o,i,a,f,l,c,p,s=0,g=false,h=true;if(!nr(n))throw new br;if(t=Ur(0,t)||0,true===r)var v=true,h=false;else tr(r)&&(v=r.leading,g="maxWait"in r&&(Ur(t,r.maxWait)||0),h="trailing"in r?r.trailing:h);return function(){if(o=arguments,f=ge(),l=this,p=h&&(c||!v),false===g)var r=v&&!c;else{i||v||(s=f);var y=g-(f-s),m=0>=y;m?(i&&(i=Sr(i)),s=f,a=n.apply(l,o)):i||(i=Fr(e,y))}return m&&c?c=Sr(c):c||t===g||(c=Fr(u,t)),r&&(m=true,a=n.apply(l,o)),!m||c||i||(o=l=null),a}}function Gt(n,t,r){var e=arguments,u=0,o=e.length,i=typeof r;
|
||||
if("number"!=i&&"string"!=i||!e[3]||e[3][r]!==t||(o=2),3<o&&"function"==typeof e[o-2])var a=ft(e[--o-1],e[o--],2);else 2<o&&"function"==typeof e[o-1]&&(a=e[--o]);for(;++u<o;)if(t=e[u],tr(t))for(var i=-1,f=le(t),l=f.length;++i<l;){var c=f[i];n[c]=a?a(n[c],t[c]):t[c]}return n}function Ht(n,t,r){var e=arguments,u=0,o=e.length,i=typeof r;for("number"!=i&&"string"!=i||!e[3]||e[3][r]!==t||(o=2);++u<o;)if(t=e[u],tr(t))for(var i=-1,a=le(t),f=a.length;++i<f;){var l=a[i];"undefined"==typeof n[l]&&(n[l]=t[l])
|
||||
}return n}function Jt(n,t,r){var e=-1,u=le(n),o=u.length;for(t=t&&typeof r=="undefined"?t:ft(t,r,3);++e<o&&(r=u[e],false!==t(n[r],r,n)););return n}function Qt(n,t,r){var e=le(n),u=e.length;for(t=ft(t,r,3);u--&&(r=e[u],false!==t(n[r],r,n)););return n}function Yt(n){var t=[];return u(n,function(n,r){nr(n)&&t.push(r)}),t.sort()}function Zt(n){return n&&typeof n=="object"&&1===n.nodeType&&-1<Cr.call(n).indexOf("Element")||false}function nr(n){return typeof n=="function"}function tr(n){var t=typeof n;return n&&("function"==t||"object"==t)||false
|
||||
}function rr(n){var t=typeof n;return"number"==t||n&&"object"==t&&Cr.call(n)==nt||false}function er(n){return typeof n=="string"||n&&typeof n=="object"&&Cr.call(n)==et||false}function ur(n){for(var t=-1,r=le(n),e=r.length,u=cr(e);++t<e;)u[t]=n[r[t]];return u}function or(n){return n}function ir(n){n||(n={});var t=le(n),r=t[0],e=n[r];return 1!=t.length||e!==e||tr(e)?function(r){for(var e=t.length,u=false;e--&&(u=gt(r[t[e]],n[t[e]],null,true)););return u}:function(n){return n=n[r],e===n&&(0!==e||1/e==1/n)}}function ar(n,t,r){var e=true,u=t&&Yt(t);
|
||||
t&&(r||u.length)||(null==r&&(r=t),t=n,n=y,u=Yt(t)),false===r?e=false:tr(r)&&"chain"in r&&(e=r.chain),r=-1;for(var o=nr(n),i=u?u.length:0;++r<i;){var a=u[r],f=n[a]=t[a];o&&(n.prototype[a]=function(t){return function(){var r=this.__chain__,u=this.__wrapped__,o=[u];if(Tr.apply(o,arguments),o=t.apply(n,o),e||r){if(u===o&&tr(o))return this;o=new n(o),o.__chain__=r}return o}}(f))}}function fr(){}function lr(n){return function(t){return t[n]}}n=n?ht.defaults(pt.Object(),n,ht.pick(pt,G)):pt;var cr=n.Array,pr=n.Boolean,sr=n.Date,gr=n.Function,hr=n.Math,vr=n.Number,yr=n.Object,mr=n.RegExp,dr=n.String,br=n.TypeError,_r=cr.prototype,wr=yr.prototype,jr=dr.prototype,kr=(kr=n.window)&&kr.document,xr=n._,Cr=wr.toString,Or=mr("^"+dr(Cr).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ar=hr.ceil,Sr=n.clearTimeout,Er=hr.floor,Nr=gr.prototype.toString,Rr=jt(Rr=yr.getPrototypeOf)&&Rr,Ir=wr.hasOwnProperty,Tr=_r.push,Dr=jt(Dr=n.Set)&&Dr,Fr=n.setTimeout,$r=_r.splice,Br=_r.unshift,qr=function(){try{var n={},t=jt(t=yr.defineProperty)&&t,r=t(n,n,n)&&t
|
||||
}catch(e){}return r}(),Wr=jt(Wr=jr.contains)&&Wr,zr=jt(zr=yr.create)&&zr,Lr=jt(Lr=cr.isArray)&&Lr,Pr=n.isFinite,Kr=n.isNaN,Mr=jt(Mr=yr.keys)&&Mr,Ur=hr.max,Vr=hr.min,Xr=jt(Xr=sr.now)&&Xr,Gr=n.parseInt,Hr=hr.random,Jr=jt(Jr=jr.trim)&&!Jr.call(I)&&Jr,Qr=jt(Qr=jr.trimLeft)&&!Qr.call(I)&&Qr,Yr=jt(Yr=jr.trimRight)&&!Yr.call(I)&&Yr,Zr={};Zr[J]=cr,Zr[Q]=pr,Zr[Y]=sr,Zr[Z]=gr,Zr[tt]=yr,Zr[nt]=vr,Zr[rt]=mr,Zr[et]=dr,m.prototype=y.prototype;var ne=y.support={};ne.funcDecomp=!jt(n.WinRTError)&&V.test(b),ne.funcNames=typeof gr.name=="string";
|
||||
try{ne.dom=11===kr.createDocumentFragment().nodeType}catch(te){ne.dom=false}y.templateSettings={escape:q,evaluate:W,interpolate:z,variable:"",imports:{_:y}},zr||(at=function(){function t(){}return function(r){if(tr(r)){t.prototype=r;var e=new t;t.prototype=null}return e||n.Object()}}());var re=qr?function(n,t){it.value=t,qr(n,"__bindData__",it)}:fr,ee=dt(function(n,t,r){Ir.call(n,r)?n[r]++:n[r]=1}),ue=dt(function(n,t,r){Ir.call(n,r)?n[r].push(t):n[r]=[t]}),oe=dt(function(n,t,r){n[r]=t}),ie=zt,ae=Lr||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Cr.call(n)==J||false
|
||||
};ne.dom||(Zt=function(n){return n&&typeof n=="object"&&1===n.nodeType&&!fe(n)||false});var fe=Rr?function(n){if(!n||Cr.call(n)!=tt)return false;var t=n.valueOf,r=jt(t)&&(r=Rr(t))&&Rr(r);return r?n==r||Rr(n)==r:kt(n)}:kt,le=Mr?function(n){return tr(n)?Mr(n):[]}:o,ce=Jr?function(n,t){return null==n?"":null==t?Jr.call(n):g(n,t)}:g,pe=Qr?function(n,t){return null==n?"":null==t?Qr.call(n):h(n,t)}:h,se=Yr?function(n,t){return null==n?"":null==t?Yr.call(n):v(n,t)}:v,ge=Xr||function(){return(new sr).getTime()},he=8==Gr(I+"08")?Gr:function(n,t){return n=ce(n),Gr(n,+t||(M.test(n)?16:10))
|
||||
};return y.after=function(n,t){if(!nr(t))throw new br;return function(){return 1>--n?t.apply(this,arguments):void 0}},y.assign=Gt,y.at=function(n,t){var r=arguments,e=-1,u=st(r,true,false,1),o=u.length,i=typeof t;for("number"!=i&&"string"!=i||!r[2]||r[2][t]!==n||(o=1),r=cr(o);++e<o;)r[e]=n[u[e]];return r},y.bind=Vt,y.bindAll=function(n){for(var t=1<arguments.length?st(arguments,true,false,1):Yt(n),r=-1,e=t.length;++r<e;){var u=t[r];n[u]=_t(n[u],x,null,null,n)}return n},y.bindKey=function(n,t){return 2<arguments.length?_t(t,x|C|S,St(arguments,2),null,n):_t(t,x|C,null,null,n)
|
||||
},y.chain=function(n){return n=new m(n),n.__chain__=true,n},y.compact=function(n){for(var t=-1,r=n?n.length:0,e=0,u=[];++t<r;){var o=n[t];o&&(u[e++]=o)}return u},y.compose=function(){for(var n=arguments,t=n.length;t--;)if(!nr(n[t]))throw new br;return function(){for(var t=arguments,r=n.length;r--;)t=[n[r].apply(this,t)];return t[0]}},y.constant=function(n){return function(){return n}},y.countBy=ee,y.create=function(n,t){var r=at(n);return t?Gt(r,t):r},y.createCallback=function(n,t,r){var e=typeof n;
|
||||
return null==n||"function"==e?ft(n,t,r):"object"!=e?lr(n):ir(n)},y.curry=function(n,t){return t=typeof t=="number"?t:+t||n.length,_t(n,O,null,null,null,t)},y.debounce=Xt,y.defaults=Ht,y.defer=function(n){if(!nr(n))throw new br;var t=St(arguments,1);return Fr(function(){n.apply(_,t)},1)},y.delay=function(n,t){if(!nr(n))throw new br;var r=St(arguments,2);return Fr(function(){n.apply(_,r)},t)},y.difference=function(n){return ct(n,st(arguments,true,true,1))},y.filter=$t,y.flatten=function(n,t,r,e){var u=typeof t;
|
||||
return"boolean"!=u&&null!=t&&(e=r,r=t,t=false,"number"!=u&&"string"!=u||!e||e[r]!==n||(r=null)),null!=r&&(n=zt(n,r,e)),st(n,t)},y.forEach=qt,y.forEachRight=Wt,y.forIn=u,y.forInRight=function(n,t,r){var e=[];u(n,function(n,t){e.push(t,n)});var o=e.length;for(t=ft(t,r,3);o--&&false!==t(e[o--],e[o],n););return n},y.forOwn=Jt,y.forOwnRight=Qt,y.functions=Yt,y.groupBy=ue,y.indexBy=oe,y.initial=function(n,t,r){var e=0,u=n?n.length:0;if(typeof t!="number"&&null!=t){var o=u;for(t=y.createCallback(t,r,3);o--&&t(n[o],o,n);)e++
|
||||
}else e=null==t||r?1:t||e;return e=u-e,St(n,0,0<e?e:0)},y.intersection=function(){for(var n=[],e=-1,u=arguments.length,o=c(),i=wt(),a=Dr&&i===t,f=c();++e<u;){var l=arguments[e];(ae(l)||xt(l))&&(n.push(l),o.push(a&&l.length>=N&&bt(e?n[e]:f)))}var a=n[0],s=-1,g=a?a.length:0,h=[];n:for(;++s<g;){var v=o[0],l=a[s];if(0>(v?r(v,l):i(f,l))){for(e=u,(v||f).push(l);--e;)if(v=o[e],0>(v?r(v,l):i(n[e],l)))continue n;h.push(l)}}return p(o),p(f),h},y.invert=function(n,t){for(var r=-1,e=le(n),u=e.length,o={};++r<u;){var i=e[r],a=n[i];
|
||||
t?Ir.call(o,a)?o[a].push(i):o[a]=[i]:o[a]=i}return o},y.invoke=function(n,t){var r=St(arguments,2),e=-1,u=typeof t=="function",o=n?n.length:0,i=cr(typeof o=="number"?o:0);return qt(n,function(n){i[++e]=(u?t:n[t]).apply(n,r)}),i},y.keys=le,y.map=zt,y.mapValues=function(n,t,r){var e={};return t=y.createCallback(t,r,3),Jt(n,function(n,r,u){e[r]=t(n,r,u)}),e},y.match=ir,y.max=Lt,y.memoize=function(n,t){function r(){var e=r.cache,u=t?t.apply(this,arguments):"_"+arguments[0];return Ir.call(e,u)?e[u]:e[u]=n.apply(this,arguments)
|
||||
}if(!nr(n))throw new br;return r.cache={},r},y.merge=function(n,t,r){if(!tr(n))return n;var e=arguments,u=e.length,o=typeof r;if("number"!=o&&"string"!=o||!e[3]||e[3][r]!==t||(u=2),3<u&&"function"==typeof e[u-2])var i=ft(e[--u-1],e[u--],2);else 2<u&&"function"==typeof e[u-1]&&(i=e[--u]);for(var e=St(arguments,1,u),o=-1,a=c(),f=c();++o<u;)vt(n,e[o],i,a,f);return p(a),p(f),n},y.min=function(n,t,r){var u=1/0,o=u,i=typeof t;if("number"!=i&&"string"!=i||!r||r[t]!==n||(t=null),null==t&&ae(n))for(r=-1,i=n.length;++r<i;){var a=n[r];
|
||||
a<o&&(o=a)}else t=null==t&&er(n)?e:y.createCallback(t,r,3),qt(n,function(n,r,e){r=t(n,r,e),r<u&&(u=r,o=n)});return o},y.omit=function(n,t,r){var e={};if(typeof t!="function"){var o=[];u(n,function(n,t){o.push(t)});for(var o=ct(o,st(arguments,true,false,1)),i=-1,a=o.length;++i<a;){var f=o[i];e[f]=n[f]}}else t=y.createCallback(t,r,3),u(n,function(n,r,u){t(n,r,u)||(e[r]=n)});return e},y.once=function(n){var t,r;if(!nr(n))throw new br;return function(){return t?r:(t=true,r=n.apply(this,arguments),n=null,r)}
|
||||
},y.pairs=function(n){for(var t=-1,r=le(n),e=r.length,u=cr(e);++t<e;){var o=r[t];u[t]=[o,n[o]]}return u},y.partial=function(n){return _t(n,S,St(arguments,1))},y.partialRight=function(n){return _t(n,E,null,St(arguments,1))},y.pick=function(n,t,r){var e={};if(typeof t!="function")for(var o=-1,i=st(arguments,true,false,1),a=tr(n)?i.length:0;++o<a;){var f=i[o];f in n&&(e[f]=n[f])}else t=y.createCallback(t,r,3),u(n,function(n,r,u){t(n,r,u)&&(e[r]=n)});return e},y.pluck=ie,y.property=lr,y.pull=function(n){for(var t=arguments,r=0,e=t.length,u=n?n.length:0;++r<e;)for(var o=-1,i=t[r];++o<u;)n[o]===i&&($r.call(n,o--,1),u--);
|
||||
return n},y.range=function(n,t,r){n=+n||0,r=typeof r=="number"?r:+r||1,null==t&&(t=n,n=0);var e=-1;t=Ur(0,Ar((t-n)/(r||1)));for(var u=cr(t);++e<t;)u[e]=n,n+=r;return u},y.reject=function(n,t,r){return t=y.createCallback(t,r,3),$t(n,function(n,r,e){return!t(n,r,e)})},y.remove=function(n,t,r){var e=-1,u=n?n.length:0,o=[];for(t=y.createCallback(t,r,3);++e<u;)r=n[e],t(r,e,n)&&(o.push(r),$r.call(n,e--,1),u--);return o},y.rest=At,y.shuffle=Mt,y.slice=St,y.sortBy=function(n,t,r){var e=-1,u=t&&ae(t),o=n?n.length:0,f=cr(typeof o=="number"?o:0);
|
||||
for(u||(t=y.createCallback(t,r,3)),qt(n,function(n,r,o){var i=f[++e]=j.pop()||{i:null,j:0,k:null};i.j=e,i.k=n,i.i=u?zt(t,function(t){return n[t]}):t(n,r,o)}),o=f.length,f.sort(u?a:i);o--;)n=f[o],f[o]=n.k,s(n);return f},y.tap=function(n,t,r){return t.call(r,n),n},y.throttle=function(n,t,r){var e=true,u=true;if(!nr(n))throw new br;return false===r?e=false:tr(r)&&(e="leading"in r?r.leading:e,u="trailing"in r?r.trailing:u),ot.leading=e,ot.maxWait=t,ot.trailing=u,Xt(n,t,ot)},y.times=function(n,t,r){n=-1<(n=+n)?n:0;
|
||||
var e=-1,u=cr(n);for(t=ft(t,r,1);++e<n;)u[e]=t(e);return u},y.toArray=function(n){return n&&typeof n.length=="number"?St(n):ur(n)},y.transform=function(n,t,r,e){var u=ae(n);if(null==r)if(u)r=[];else{var o=n&&n.constructor;r=at(o&&o.prototype)}return t&&(t=y.createCallback(t,e,4),(u?qt:Jt)(n,function(n,e,u){return t(r,n,e,u)})),r},y.union=function(){return mt(st(arguments,true,true))},y.uniq=Nt,y.values=ur,y.where=$t,y.without=function(n){return ct(n,St(arguments,1))},y.wrap=function(n,t){return _t(t,S,[n])
|
||||
},y.xor=function(){for(var n=-1,t=arguments.length;++n<t;){var r=arguments[n];if(ae(r)||xt(r))var e=e?ct(e,r).concat(ct(r,e)):r}return e?mt(e):[]},y.zip=Rt,y.zipObject=It,y.collect=zt,y.drop=At,y.each=qt,y.eachRight=Wt,y.extend=Gt,y.methods=Yt,y.object=It,y.select=$t,y.tail=At,y.unique=Nt,y.unzip=Rt,ar(Gt({},y)),y.capitalize=function(n){return null==n?"":(n=dr(n),n.charAt(0).toUpperCase()+n.slice(1))},y.clone=function(n,t,r,e){var u=typeof t;return"boolean"!=u&&null!=t&&(e=r,r=t,t=false,"number"!=u&&"string"!=u||!e||e[r]!==n||(r=null)),R(n,t,typeof r=="function"&&ft(r,e,1))
|
||||
},y.cloneDeep=function(n,t,r){return R(n,true,typeof t=="function"&&ft(t,r,1))},y.contains=Dt,y.escape=function(n){return null==n?"":dr(n).replace(B,f)},y.every=Ft,y.find=Bt,y.findIndex=function(n,t,r){var e=-1,u=n?n.length:0;for(t=y.createCallback(t,r,3);++e<u;)if(t(n[e],e,n))return e;return-1},y.findKey=function(n,t,r){var e;return t=y.createCallback(t,r,3),Jt(n,function(n,r,u){return t(n,r,u)?(e=r,false):void 0}),e},y.findLast=function(n,t,r){var e;return t=y.createCallback(t,r,3),Wt(n,function(n,r,u){return t(n,r,u)?(e=n,false):void 0
|
||||
}),e},y.findLastIndex=function(n,t,r){var e=n?n.length:0;for(t=y.createCallback(t,r,3);e--;)if(t(n[e],e,n))return e;return-1},y.findLastKey=function(n,t,r){var e;return t=y.createCallback(t,r,3),Qt(n,function(n,r,u){return t(n,r,u)?(e=r,false):void 0}),e},y.has=function(n,t){return n?Ir.call(n,t):false},y.identity=or,y.indexOf=Ot,y.isArguments=xt,y.isArray=ae,y.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&Cr.call(n)==Q||false},y.isDate=function(n){return n&&typeof n=="object"&&Cr.call(n)==Y||false
|
||||
},y.isElement=Zt,y.isEmpty=function(n){var t=true;if(!n)return t;var r=Cr.call(n),e=n.length;return r==J||r==et||r==H||r==tt&&typeof e=="number"&&nr(n.splice)?!e:(Jt(n,function(){return t=false}),t)},y.isEqual=function(n,t,r,e){return gt(n,t,typeof r=="function"&&ft(r,e,2))},y.isFinite=function(n){return Pr(n)&&!Kr(parseFloat(n))},y.isFunction=nr,y.isNaN=function(n){return rr(n)&&n!=+n},y.isNull=function(n){return null===n},y.isNumber=rr,y.isObject=tr,y.isPlainObject=fe,y.isRegExp=function(n){return n&&typeof n=="object"&&Cr.call(n)==rt||false
|
||||
},y.isString=er,y.isUndefined=function(n){return typeof n=="undefined"},y.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(e=(0>r?Ur(0,e+r):Vr(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},y.mixin=ar,y.noConflict=function(){return n._=xr,this},y.noop=fr,y.now=ge,y.parseInt=he,y.random=function(n,t,r){var e=null==n,u=null==t;return null==r&&(u&&typeof n=="boolean"?(r=n,n=1):typeof t=="boolean"&&(r=t,u=true)),e&&u&&(t=1,u=false),n=+n||0,u?(t=n,n=0):t=+t||0,r||n%1||t%1?(r=Hr(),Vr(n+r*(t-n+parseFloat("1e-"+((r+"").length-1))),t)):yt(n,t)
|
||||
},y.reduce=Pt,y.reduceRight=Kt,y.result=function(n,t,r){return null==n?r:(r="undefined"!=typeof n[t]?n[t]:r,nr(r)?n[t]():r)},y.runInContext=b,y.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:le(n).length},y.some=Ut,y.sortedIndex=Et,y.template=function(n,t,r){var e=y.templateSettings;n=dr(n||""),r=Ht({},r,e);var u,o=Ht({},r.imports,e.imports),e=le(o),o=ur(o),i=0,a=r.interpolate||U,f="__p+='",a=mr((r.escape||U).source+"|"+a.source+"|"+(a===z?L:U).source+"|"+(r.evaluate||U).source+"|$","g");
|
||||
n.replace(a,function(t,r,e,o,a,c){return e||(e=o),f+=n.slice(i,c).replace(X,l),r&&(f+="'+__e("+r+")+'"),a&&(u=true,f+="';"+a+";\n__p+='"),e&&(f+="'+((__t=("+e+"))==null?'':__t)+'"),i=c+t.length,t}),f+="';",a=r=r.variable,a||(r="obj",f="with("+r+"){"+f+"}"),f=(u?f.replace(T,""):f).replace(D,"$1").replace(F,"$1;"),f="function("+r+"){"+(a?"":r+"||("+r+"={});")+"var __t,__p='',__e=_.escape"+(u?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+f+"return __p}";try{var c=gr(e,"return "+f).apply(_,o)
|
||||
}catch(p){throw p.source=f,p}return t?c(t):(c.source=f,c)},y.trim=ce,y.trimLeft=pe,y.trimRight=se,y.unescape=function(n){return null==n?"":(n=dr(n),0>n.indexOf(";")?n:n.replace($,d))},y.uniqueId=function(n){var t=++k;return dr(null==n?"":n)+t},y.all=Ft,y.any=Ut,y.detect=Bt,y.findWhere=Bt,y.foldl=Pt,y.foldr=Kt,y.include=Dt,y.inject=Pt,ar(function(){var n={};return Jt(y,function(t,r){y.prototype[r]||(n[r]=t)}),n}(),false),y.first=Ct,y.last=function(n,t,r){var e=0,u=n?n.length:0;if(typeof t!="number"&&null!=t){var o=u;
|
||||
for(t=y.createCallback(t,r,3);o--&&t(n[o],o,n);)e++}else if(e=t,null==e||r)return n?n[u-1]:_;return e=u-e,St(n,0<e?e:0)},y.sample=function(n,t,r){return n&&typeof n.length!="number"&&(n=ur(n)),null==t||r?n?n[yt(0,n.length-1)]:_:(n=Mt(n),n.length=Vr(Ur(0,t),n.length),n)},y.take=Ct,y.head=Ct,Jt(y,function(n,t){var r="sample"!==t;y.prototype[t]||(y.prototype[t]=function(t,e){var u=this.__chain__,o=n(this.__wrapped__,t,e);return u||null!=t&&(!e||r&&typeof t=="function")?new m(o,u):o})}),y.VERSION="2.4.1",y.prototype.chain=function(){return this.__chain__=true,this
|
||||
},y.prototype.toString=function(){return dr(this.__wrapped__)},y.prototype.value=Tt,y.prototype.valueOf=Tt,qt(["join","pop","shift"],function(n){var t=_r[n];y.prototype[n]=function(){var n=this.__chain__,r=t.apply(this.__wrapped__,arguments);return n?new m(r,n):r}}),qt(["push","reverse","sort","unshift"],function(n){var t=_r[n];y.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),qt(["concat","splice"],function(n){var t=_r[n];y.prototype[n]=function(){return new m(t.apply(this.__wrapped__,arguments),this.__chain__)
|
||||
;(function(){function n(n,t){if(n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1}return 0}function t(n,t,r){r=(r||0)-1;for(var e=n?n.length:0;++r<e;)if(n[r]===t)return r;return-1}function r(n,t){return n.has(t)?0:-1}function e(n){return n.charCodeAt(0)}function u(n,t){for(var r=-1,e=n.length;++r<e&&0<=t.indexOf(n.charAt(r)););return r}function o(n,t){for(var r=n.length;r--&&0<=t.indexOf(n.charAt(r)););return r}function i(t,r){return n(t.f,r.f)||t.g-r.g}function a(t,r){for(var e=t.f,u=r.f,o=-1,i=e.length;++o<i;){var a=n(e[o],u[o]);
|
||||
if(a)return a}return t.g-r.g}function f(n){return at[n]}function l(n){return"\\"+ct[n]}function c(){return w.pop()||[]}function p(n){n.length=0,w.length<R&&w.push(n)}function s(n){n.f=n.h=null,j.length<R&&j.push(n)}function g(n,t){return(n=null==n?"":n+"")?null==t?n.slice(y(n),m(n)+1):(t+="",n.slice(u(n,t),o(n,t)+1)):n}function h(n,t){return(n=null==n?"":n+"")?null==t?n.slice(y(n)):(t+="",n.slice(u(n,t))):n}function v(n,t){return(n=null==n?"":n+"")?null==t?n.slice(0,m(n)+1):(t+="",n.slice(0,o(n,t)+1)):n
|
||||
}function y(n){for(var t=-1,r=n.length;++t<r;){var e=n.charCodeAt(t);if((160<e||9>e||13<e)&&32!=e&&160!=e&&5760!=e&&6158!=e&&(8192>e||8202<e&&8232!=e&&8233!=e&&8239!=e&&8287!=e&&12288!=e&&65279!=e))break}return t}function m(n){for(var t=n.length;t--;){var r=n.charCodeAt(t);if((160<r||9>r||13<r)&&32!=r&&160!=r&&5760!=r&&6158!=r&&(8192>r||8202<r&&8232!=r&&8233!=r&&8239!=r&&8287!=r&&12288!=r&&65279!=r))break}return t}function d(n){return ft[n]}function b(n){function u(n){var t=[];if(!rr(n))return t;
|
||||
for(var r in n)Tr.call(n,r)&&t.push(r);return t}function o(n,t){if(!rr(n))return n;for(var r in n)if(false===t(n[r],r,n))break;return n}function y(n){return n&&typeof n=="object"&&!fe(n)&&Tr.call(n,"__wrapped__")?n:new m(n)}function m(n,t){this.__chain__=!!t,this.__wrapped__=n}function w(n){function t(){if(e){var n=Nt(e);Dr.apply(n,arguments)}if(this instanceof t){var o=at(r.prototype),n=r.apply(o,n||arguments);return rr(n)?n:o}return r.apply(u,n||arguments)}var r=n[0],e=n[2],u=n[4];return ee(t,n),t
|
||||
}function R(n,t,r,e,u){if(r){var o=r(n);if(typeof o!="undefined")return o}if(!rr(n))return n;var i=Or.call(n);if(!ut[i])return n;var a=ne[i];switch(i){case Q:case Y:return new a(+n);case nt:case et:return new a(n);case rt:return o=a(n.source,P.exec(n)),o.lastIndex=n.lastIndex,o}if(i=fe(n),t){var f=!e;e||(e=c()),u||(u=c());for(var l=e.length;l--;)if(e[l]==n)return u[l];o=i?a(n.length):{}}else o=i?Nt(n):Jt({},n);return i&&(Tr.call(n,"index")&&(o.index=n.index),Tr.call(n,"input")&&(o.input=n.input)),t?(e.push(n),u.push(o),(i?st:vt)(n,function(n,i){o[i]=R(n,t,r,e,u)
|
||||
}),f&&(p(e),p(u)),o):o}function at(n){return rr(n)?Lr(n):{}}function ft(n,t,r){if(typeof n!="function")return ir;if(typeof t=="undefined"||!("prototype"in n))return n;var e=n.__bindData__;if(typeof e=="undefined"&&(te.funcNames&&(e=!n.name),e=e||!te.funcDecomp,!e)){var u=Rr.call(n);te.funcNames||(e=!K.test(u)),e||(e=V.test(u),ee(n,e))}if(false===e||true!==e&&e[1]&x)return n;switch(r){case 1:return function(r){return n.call(t,r)};case 2:return function(r,e){return n.call(t,r,e)};case 3:return function(r,e,u){return n.call(t,r,e,u)
|
||||
};case 4:return function(r,e,u,o){return n.call(t,r,e,u,o)}}return Gt(n,t)}function lt(n){function t(){var n=f?i:this;if(u){var g=Nt(u);Dr.apply(g,arguments)}return(o||c)&&(g||(g=Nt(arguments)),o&&Dr.apply(g,o),c&&g.length<a)?(e|=S,e&=~E,lt([r,p?e:e&~(x|C),g,null,i,a])):(g||(g=arguments),l&&(r=n[s]),this instanceof t?(n=at(r.prototype),g=r.apply(n,g),rr(g)?g:n):r.apply(n,g))}var r=n[0],e=n[1],u=n[2],o=n[3],i=n[4],a=n[5],f=e&x,l=e&C,c=e&O,p=e&A,s=r;return ee(t,n),t}function ct(n,e){var u=-1,o=kt(),i=n?n.length:0,a=[];
|
||||
for(Fr&&i>=N&&o===t&&(o=r,e=wt(e));++u<i;){var f=n[u];0>o(e,f)&&a.push(f)}return a}function st(n,t){var r=-1,e=n?n.length:0;if(typeof e=="number")for(;++r<e&&false!==t(n[r],r,n););else vt(n,t);return n}function gt(n,t,r,e){e=(e||0)-1;for(var u=n?n.length:0,o=[];++e<u;){var i=n[e];if(i&&typeof i=="object"&&typeof i.length=="number"&&(fe(i)||Ot(i))){t||(i=gt(i,t,r));var a=-1,f=i.length,l=o.length;for(o.length+=f;++a<f;)o[l++]=i[a]}else r||o.push(i)}return o}function vt(n,t){for(var r=-1,e=ce(n),u=e.length;++r<u;){var o=e[r];
|
||||
if(false===t(n[o],o,n))break}return n}function yt(n,t,r,e,u,i){if(r){var a=r(n,t);if(typeof a!="undefined")return!!a}if(n===t)return 0!==n||1/n==1/t;var f=typeof n,l=typeof t;if(n===n&&(!n||"function"!=f&&"object"!=f)&&(!t||"function"!=l&&"object"!=l))return false;if(null==n||null==t)return n===t;if(l=Or.call(n),f=Or.call(t),l==H&&(l=tt),f==H&&(f=tt),l!=f)return false;switch(l){case Q:case Y:return+n==+t;case nt:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case rt:case et:return n==br(t)}if(f=l==J,!f){var s=Tr.call(n,"__wrapped__"),g=Tr.call(t,"__wrapped__");
|
||||
if(s||g)return yt(s?n.__wrapped__:n,g?t.__wrapped__:t,r,e,u,i);if(l!=tt)return false;if(l=n.constructor,s=t.constructor,l!=s&&!(Tr.call(n,"constructor")&&Tr.call(t,"constructor")||tr(l)&&l instanceof l&&tr(s)&&s instanceof s)&&"constructor"in n&&"constructor"in t)return false}for(l=!u,u||(u=c()),i||(i=c()),s=u.length;s--;)if(u[s]==n)return i[s]==t;var h=0,a=true;if(u.push(n),i.push(t),f){if(s=n.length,h=t.length,(a=h==s)||e)for(;h--;)if(f=s,g=t[h],e)for(;f--&&!(a=yt(n[f],g,r,e,u,i)););else if(!(a=yt(n[h],g,r,e,u,i)))break
|
||||
}else o(t,function(t,o,f){return Tr.call(f,o)?(h++,a=Tr.call(n,o)&&yt(n[o],t,r,e,u,i)):void 0}),a&&!e&&o(n,function(n,t,r){return Tr.call(r,t)?a=-1<--h:void 0});return u.pop(),i.pop(),l&&(p(u),p(i)),a}function mt(n,t,r,e,u){(fe(t)?st:vt)(t,function(t,o){var i,a,f=t,l=n[o];if(t&&((a=fe(t))||le(t))){for(f=e.length;f--;)if(i=e[f]==t){l=u[f];break}if(!i){var c;r&&(f=r(l,t),c=typeof f!="undefined")&&(l=f),c||(l=a?fe(l)?l:[]:le(l)?l:{}),e.push(t),u.push(l),c||mt(l,t,r,e,u)}}else r&&(f=r(l,t),typeof f=="undefined"&&(f=t)),typeof f!="undefined"&&(l=f);
|
||||
n[o]=l})}function dt(n,t){return n+Nr(Jr()*(t-n+1))}function bt(n,e,u){var o=-1,i=kt(),a=n?n.length:0,f=Fr&&!e&&a>=N&&i===t,l=[];if(f)var s=wt(),i=r;else s=u?c():l;for(;++o<a;){var g=n[o],h=u?u(g,o,n):g;(e?!o||s[s.length-1]!==h:0>i(s,h))&&((u||f)&&s.push(h),l.push(g))}return!f&&u&&p(s),l}function _t(n){return function(t,r,e){var u={};r=y.createCallback(r,e,3),e=-1;var o=t?t.length:0;if(typeof o=="number")for(;++e<o;){var i=t[e];n(u,i,r(i,e,t),t)}else st(t,function(t,e,o){n(u,t,r(t,e,o),o)});return u
|
||||
}}function wt(n){var t=new Fr,r=n?n.length:0;for(t.push=t.add;r--;)t.push(n[r]);return t}function jt(n,t,r,e,u,o){var i=t&x,a=t&O,f=t&S,l=t&E;if(!(t&C||tr(n)))throw new _r;f&&!r.length&&(t&=-17,f=r=false),l&&!e.length&&(t&=-33,l=e=false);var c=n&&n.__bindData__;return c&&true!==c?(c=Nt(c),c[2]&&(c[2]=Nt(c[2])),c[3]&&(c[3]=Nt(c[3])),!i||c[1]&x||(c[4]=u),!i&&c[1]&x&&(t|=8),!a||c[1]&O||(c[5]=o),f&&Dr.apply(c[2]||(c[2]=[]),r),l&&qr.apply(c[3]||(c[3]=[]),e),c[1]|=t,jt.apply(null,c)):(t==x||t==(x|S)?w:lt)([n,t,r,e,u,o])
|
||||
}function kt(){var n=(n=y.indexOf)===St?t:n;return n}function xt(n){return typeof n=="function"&&Ar.test(Rr.call(n))}function Ct(n){var t,r;return n&&Or.call(n)==tt&&(Tr.call(n,"constructor")||(t=n.constructor,!tr(t)||t instanceof t))?(o(n,function(n,t){r=t}),typeof r=="undefined"||Tr.call(n,r)):false}function Ot(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Or.call(n)==H||false}function At(n,t,r){var e=0,u=n?n.length:0;if(typeof t!="number"&&null!=t){var o=-1;for(t=y.createCallback(t,r,3);++o<u&&t(n[o],o,n);)e++
|
||||
}else if(e=t,null==e||r)return n?n[0]:_;return Nt(n,0,0<e?e:0)}function St(n,r,e){var u=n?n.length:0;if(typeof e=="number")e=0>e?Vr(0,u+e):e||0;else if(e)return e=Rt(n,r),u&&n[e]===r?e:-1;return t(n,r,e)}function Et(n,t,r){if(typeof t!="number"&&null!=t){var e=0,u=-1,o=n?n.length:0;for(t=y.createCallback(t,r,3);++u<o&&t(n[u],u,n);)e++}else e=null==t||r?1:0<t?t:0;return Nt(n,e)}function Nt(n,t,r){var e=-1,u=n?n.length:0;for(typeof t=="undefined"?t=0:0>t?t=Vr(u+t,0):t>u&&(t=u),typeof r=="undefined"?r=u:0>r?r=Vr(u+r,0):r>u&&(r=u),u=r-t||0,r=pr(u);++e<u;)r[e]=n[t+e];
|
||||
return r}function Rt(n,t,r,e){var u=0,o=n?n.length:u;for(r=r?y.createCallback(r,e,1):ir,t=r(t);u<o;)e=u+o>>>1,r(n[e])<t?u=e+1:o=e;return u}function It(n,t,r,e){var u=typeof t;return"boolean"!=u&&null!=t&&(e=r,r=t,t=false,"number"!=u&&"string"!=u||!e||e[r]!==n||(r=null)),null!=r&&(r=y.createCallback(r,e,3)),bt(n,t,r)}function Tt(){for(var n=1<arguments.length?arguments:arguments[0],t=-1,r=n?Kt(ae(n,"length")):0,e=pr(0>r?0:r);++t<r;)e[t]=ae(n,t);return e}function Dt(n,t){var r=-1,e=n?n.length:0,u={};for(t||!e||fe(n[0])||(t=[]);++r<e;){var o=n[r];
|
||||
t?u[o]=t[r]:o&&(u[o[0]]=o[1])}return u}function Ft(){return this.__wrapped__}function $t(n,t,r){var e=n?n.length:0;if(r=typeof r=="number"?r:0,typeof e=="number"){if(r>=e)return false;if(typeof n=="string"||!fe(n)&&ur(n))return zr?zr.call(n,t,r):-1<n.indexOf(t,r);var u=kt();return r=(0>r?Vr(0,e+r):r)||0,-1<u(n,t,r)}var o=-1,i=false;return st(n,function(n){return++o<r?void 0:!(i=n===t)}),i}function Bt(n,t,r){var e=true;t=y.createCallback(t,r,3),r=-1;var u=n?n.length:0;if(typeof u=="number")for(;++r<u&&(e=!!t(n[r],r,n)););else st(n,function(n,r,u){return e=!!t(n,r,u)
|
||||
});return e}function qt(n,t,r){var e=[];t=y.createCallback(t,r,3),r=-1;var u=n?n.length:0;if(typeof u=="number")for(;++r<u;){var o=n[r];t(o,r,n)&&e.push(o)}else st(n,function(n,r,u){t(n,r,u)&&e.push(n)});return e}function Wt(n,t,r){t=y.createCallback(t,r,3),r=-1;var e=n?n.length:0;if(typeof e!="number"){var u;return st(n,function(n,r,e){return t(n,r,e)?(u=n,false):void 0}),u}for(;++r<e;){var o=n[r];if(t(o,r,n))return o}}function zt(n,t,r){var e=-1,u=n?n.length:0;if(t=t&&typeof r=="undefined"?t:ft(t,r,3),typeof u=="number")for(;++e<u&&false!==t(n[e],e,n););else st(n,t);
|
||||
return n}function Lt(n,t,r){var e=n?n.length:0;if(t=t&&typeof r=="undefined"?t:ft(t,r,3),typeof e=="number")for(;e--&&false!==t(n[e],e,n););else{var u=ce(n),e=u.length;st(n,function(n,r,o){return r=u?u[--e]:--e,t(o[r],r,o)})}return n}function Pt(n,t,r){var e=-1,u=n?n.length:0;if(t=y.createCallback(t,r,3),typeof u=="number")for(var o=pr(u);++e<u;)o[e]=t(n[e],e,n);else o=[],st(n,function(n,r,u){o[++e]=t(n,r,u)});return o}function Kt(n,t,r){var u=-1/0,o=u,i=typeof t;if("number"!=i&&"string"!=i||!r||r[t]!==n||(t=null),null==t&&fe(n))for(r=-1,i=n.length;++r<i;){var a=n[r];
|
||||
a>o&&(o=a)}else t=null==t&&ur(n)?e:y.createCallback(t,r,3),st(n,function(n,r,e){r=t(n,r,e),r>u&&(u=r,o=n)});return o}function Mt(n,t,r,e){var u=3>arguments.length;t=y.createCallback(t,e,4);var o=-1,i=n?n.length:0;if(typeof i=="number")for(u&&i&&(r=n[++o]);++o<i;)r=t(r,n[o],o,n);else st(n,function(n,e,o){r=u?(u=false,n):t(r,n,e,o)});return r}function Ut(n,t,r,e){var u=3>arguments.length;return t=y.createCallback(t,e,4),Lt(n,function(n,e,o){r=u?(u=false,n):t(r,n,e,o)}),r}function Vt(n){var t=-1,r=n?n.length:0,e=pr(typeof r=="number"?r:0);
|
||||
return st(n,function(n){var r=dt(0,++t);e[t]=e[r],e[r]=n}),e}function Xt(n,t,r){var e;t=y.createCallback(t,r,3),r=-1;var u=n?n.length:0;if(typeof u=="number")for(;++r<u&&!(e=t(n[r],r,n)););else st(n,function(n,r,u){return!(e=t(n,r,u))});return!!e}function Gt(n,t){return 2<arguments.length?jt(n,x|S,Nt(arguments,2),null,t):jt(n,x,null,null,t)}function Ht(n,t,r){function e(){c&&Er(c),i=c=p=_,(h||g!==t)&&(s=he(),a=n.apply(l,o),c||i||(o=l=null))}function u(){var r=t-(he()-f);0<r?c=$r(u,r):(i&&Er(i),r=p,i=c=p=_,r&&(s=he(),a=n.apply(l,o),c||i||(o=l=null)))
|
||||
}var o,i,a,f,l,c,p,s=0,g=false,h=true;if(!tr(n))throw new _r;if(t=Vr(0,t)||0,true===r)var v=true,h=false;else rr(r)&&(v=r.leading,g="maxWait"in r&&(Vr(t,r.maxWait)||0),h="trailing"in r?r.trailing:h);return function(){if(o=arguments,f=he(),l=this,p=h&&(c||!v),false===g)var r=v&&!c;else{i||v||(s=f);var y=g-(f-s),m=0>=y;m?(i&&(i=Er(i)),s=f,a=n.apply(l,o)):i||(i=$r(e,y))}return m&&c?c=Er(c):c||t===g||(c=$r(u,t)),r&&(m=true,a=n.apply(l,o)),!m||c||i||(o=l=null),a}}function Jt(n,t,r){var e=arguments,u=0,o=e.length,i=typeof r;
|
||||
if("number"!=i&&"string"!=i||!e[3]||e[3][r]!==t||(o=2),3<o&&"function"==typeof e[o-2])var a=ft(e[--o-1],e[o--],2);else 2<o&&"function"==typeof e[o-1]&&(a=e[--o]);for(;++u<o;)if(t=e[u],rr(t))for(var i=-1,f=ce(t),l=f.length;++i<l;){var c=f[i];n[c]=a?a(n[c],t[c]):t[c]}return n}function Qt(n,t,r){var e=arguments,u=0,o=e.length,i=typeof r;for("number"!=i&&"string"!=i||!e[3]||e[3][r]!==t||(o=2);++u<o;)if(t=e[u],rr(t))for(var i=-1,a=ce(t),f=a.length;++i<f;){var l=a[i];"undefined"==typeof n[l]&&(n[l]=t[l])
|
||||
}return n}function Yt(n,t,r){var e=ce(n),u=e.length;for(t=ft(t,r,3);u--&&(r=e[u],false!==t(n[r],r,n)););return n}function Zt(n){var t=[];return o(n,function(n,r){tr(n)&&t.push(r)}),t.sort()}function nr(n){return n&&typeof n=="object"&&1===n.nodeType&&-1<Or.call(n).indexOf("Element")||false}function tr(n){return typeof n=="function"}function rr(n){var t=typeof n;return n&&("function"==t||"object"==t)||false}function er(n){var t=typeof n;return"number"==t||n&&"object"==t&&Or.call(n)==nt||false}function ur(n){return typeof n=="string"||n&&typeof n=="object"&&Or.call(n)==et||false
|
||||
}function or(n){for(var t=-1,r=ce(n),e=r.length,u=pr(e);++t<e;)u[t]=n[r[t]];return u}function ir(n){return n}function ar(n){n||(n={});var t=ce(n),r=t[0],e=n[r];return 1!=t.length||e!==e||rr(e)?function(r){for(var e=t.length,u=false;e--&&(u=yt(r[t[e]],n[t[e]],null,true)););return u}:function(n){return n=n[r],e===n&&(0!==e||1/e==1/n)}}function fr(n,t,r){var e=true,u=t&&Zt(t);t&&(r||u.length)||(null==r&&(r=t),t=n,n=y,u=Zt(t)),false===r?e=false:rr(r)&&"chain"in r&&(e=r.chain),r=-1;for(var o=tr(n),i=u?u.length:0;++r<i;){var a=u[r],f=n[a]=t[a];
|
||||
o&&(n.prototype[a]=function(t){return function(){var r=this.__chain__,u=this.__wrapped__,o=[u];if(Dr.apply(o,arguments),o=t.apply(n,o),e||r){if(u===o&&rr(o))return this;o=new n(o),o.__chain__=r}return o}}(f))}}function lr(){}function cr(n){return function(t){return t[n]}}n=n?ht.defaults(pt.Object(),n,ht.pick(pt,G)):pt;var pr=n.Array,sr=n.Boolean,gr=n.Date,hr=n.Function,vr=n.Math,yr=n.Number,mr=n.Object,dr=n.RegExp,br=n.String,_r=n.TypeError,wr=pr.prototype,jr=mr.prototype,kr=br.prototype,xr=(xr=n.window)&&xr.document,Cr=n._,Or=jr.toString,Ar=dr("^"+br(Or).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Sr=vr.ceil,Er=n.clearTimeout,Nr=vr.floor,Rr=hr.prototype.toString,Ir=xt(Ir=mr.getPrototypeOf)&&Ir,Tr=jr.hasOwnProperty,Dr=wr.push,Fr=xt(Fr=n.Set)&&Fr,$r=n.setTimeout,Br=wr.splice,qr=wr.unshift,Wr=function(){try{var n={},t=xt(t=mr.defineProperty)&&t,r=t(n,n,n)&&t
|
||||
}catch(e){}return r}(),zr=xt(zr=kr.contains)&&zr,Lr=xt(Lr=mr.create)&&Lr,Pr=xt(Pr=pr.isArray)&&Pr,Kr=n.isFinite,Mr=n.isNaN,Ur=xt(Ur=mr.keys)&&Ur,Vr=vr.max,Xr=vr.min,Gr=xt(Gr=gr.now)&&Gr,Hr=n.parseInt,Jr=vr.random,Qr=xt(Qr=kr.trim)&&!Qr.call(I)&&Qr,Yr=xt(Yr=kr.trimLeft)&&!Yr.call(I)&&Yr,Zr=xt(Zr=kr.trimRight)&&!Zr.call(I)&&Zr,ne={};ne[J]=pr,ne[Q]=sr,ne[Y]=gr,ne[Z]=hr,ne[tt]=mr,ne[nt]=yr,ne[rt]=dr,ne[et]=br,m.prototype=y.prototype;var te=y.support={};te.funcDecomp=!xt(n.WinRTError)&&V.test(b),te.funcNames=typeof hr.name=="string";
|
||||
try{te.dom=11===xr.createDocumentFragment().nodeType}catch(re){te.dom=false}y.templateSettings={escape:q,evaluate:W,interpolate:z,variable:"",imports:{_:y}},Lr||(at=function(){function t(){}return function(r){if(rr(r)){t.prototype=r;var e=new t;t.prototype=null}return e||n.Object()}}());var ee=Wr?function(n,t){it.value=t,Wr(n,"__bindData__",it)}:lr,ue=_t(function(n,t,r){Tr.call(n,r)?n[r]++:n[r]=1}),oe=_t(function(n,t,r){Tr.call(n,r)?n[r].push(t):n[r]=[t]}),ie=_t(function(n,t,r){n[r]=t}),ae=Pt,fe=Pr||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Or.call(n)==J||false
|
||||
};te.dom||(nr=function(n){return n&&typeof n=="object"&&1===n.nodeType&&!le(n)||false});var le=Ir?function(n){if(!n||Or.call(n)!=tt)return false;var t=n.valueOf,r=xt(t)&&(r=Ir(t))&&Ir(r);return r?n==r||Ir(n)==r:Ct(n)}:Ct,ce=Ur?function(n){return rr(n)?Ur(n):[]}:u,pe=Qr?function(n,t){return null==n?"":null==t?Qr.call(n):g(n,t)}:g,se=Yr?function(n,t){return null==n?"":null==t?Yr.call(n):h(n,t)}:h,ge=Zr?function(n,t){return null==n?"":null==t?Zr.call(n):v(n,t)}:v,he=Gr||function(){return(new gr).getTime()},ve=8==Hr(I+"08")?Hr:function(n,t){return n=pe(n),Hr(n,+t||(M.test(n)?16:10))
|
||||
};return y.after=function(n,t){if(!tr(t))throw new _r;return function(){return 1>--n?t.apply(this,arguments):void 0}},y.assign=Jt,y.at=function(n,t){var r=arguments,e=-1,u=gt(r,true,false,1),o=u.length,i=typeof t;for("number"!=i&&"string"!=i||!r[2]||r[2][t]!==n||(o=1),r=pr(o);++e<o;)r[e]=n[u[e]];return r},y.bind=Gt,y.bindAll=function(n){for(var t=1<arguments.length?gt(arguments,true,false,1):Zt(n),r=-1,e=t.length;++r<e;){var u=t[r];n[u]=jt(n[u],x,null,null,n)}return n},y.bindKey=function(n,t){return 2<arguments.length?jt(t,x|C|S,Nt(arguments,2),null,n):jt(t,x|C,null,null,n)
|
||||
},y.chain=function(n){return n=new m(n),n.__chain__=true,n},y.compact=function(n){for(var t=-1,r=n?n.length:0,e=0,u=[];++t<r;){var o=n[t];o&&(u[e++]=o)}return u},y.compose=function(){for(var n=arguments,t=n.length;t--;)if(!tr(n[t]))throw new _r;return function(){for(var t=arguments,r=n.length;r--;)t=[n[r].apply(this,t)];return t[0]}},y.constant=function(n){return function(){return n}},y.countBy=ue,y.create=function(n,t){var r=at(n);return t?Jt(r,t):r},y.createCallback=function(n,t,r){var e=typeof n;
|
||||
return null==n||"function"==e?ft(n,t,r):"object"!=e?cr(n):ar(n)},y.curry=function(n,t){return t=typeof t=="number"?t:+t||n.length,jt(n,O,null,null,null,t)},y.debounce=Ht,y.defaults=Qt,y.defer=function(n){if(!tr(n))throw new _r;var t=Nt(arguments,1);return $r(function(){n.apply(_,t)},1)},y.delay=function(n,t){if(!tr(n))throw new _r;var r=Nt(arguments,2);return $r(function(){n.apply(_,r)},t)},y.difference=function(n){return ct(n,gt(arguments,true,true,1))},y.filter=qt,y.flatten=function(n,t,r,e){var u=typeof t;
|
||||
return"boolean"!=u&&null!=t&&(e=r,r=t,t=false,"number"!=u&&"string"!=u||!e||e[r]!==n||(r=null)),null!=r&&(n=Pt(n,r,e)),gt(n,t)},y.forEach=zt,y.forEachRight=Lt,y.forIn=function(n,t,r){return t=t&&typeof r=="undefined"?t:ft(t,r,3),o(n,t)},y.forInRight=function(n,t,r){var e=[];o(n,function(n,t){e.push(t,n)});var u=e.length;for(t=ft(t,r,3);u--&&false!==t(e[u--],e[u],n););return n},y.forOwn=function(n,t,r){return t=t&&typeof r=="undefined"?t:ft(t,r,3),vt(n,t)},y.forOwnRight=Yt,y.functions=Zt,y.groupBy=oe,y.indexBy=ie,y.initial=function(n,t,r){var e=0,u=n?n.length:0;
|
||||
if(typeof t!="number"&&null!=t){var o=u;for(t=y.createCallback(t,r,3);o--&&t(n[o],o,n);)e++}else e=null==t||r?1:t||e;return e=u-e,Nt(n,0,0<e?e:0)},y.intersection=function(){for(var n=[],e=-1,u=arguments.length,o=c(),i=kt(),a=Fr&&i===t,f=c();++e<u;){var l=arguments[e];(fe(l)||Ot(l))&&(n.push(l),o.push(a&&l.length>=N&&wt(e?n[e]:f)))}var a=n[0],s=-1,g=a?a.length:0,h=[];n:for(;++s<g;){var v=o[0],l=a[s];if(0>(v?r(v,l):i(f,l))){for(e=u,(v||f).push(l);--e;)if(v=o[e],0>(v?r(v,l):i(n[e],l)))continue n;h.push(l)
|
||||
}}return p(o),p(f),h},y.invert=function(n,t){for(var r=-1,e=ce(n),u=e.length,o={};++r<u;){var i=e[r],a=n[i];t?Tr.call(o,a)?o[a].push(i):o[a]=[i]:o[a]=i}return o},y.invoke=function(n,t){var r=Nt(arguments,2),e=-1,u=typeof t=="function",o=n?n.length:0,i=pr(typeof o=="number"?o:0);return st(n,function(n){i[++e]=(u?t:n[t]).apply(n,r)}),i},y.keys=ce,y.map=Pt,y.mapValues=function(n,t,r){var e={};return t=y.createCallback(t,r,3),vt(n,function(n,r,u){e[r]=t(n,r,u)}),e},y.match=ar,y.max=Kt,y.memoize=function(n,t){function r(){var e=r.cache,u=t?t.apply(this,arguments):"_"+arguments[0];
|
||||
return Tr.call(e,u)?e[u]:e[u]=n.apply(this,arguments)}if(!tr(n))throw new _r;return r.cache={},r},y.merge=function(n,t,r){if(!rr(n))return n;var e=arguments,u=e.length,o=typeof r;if("number"!=o&&"string"!=o||!e[3]||e[3][r]!==t||(u=2),3<u&&"function"==typeof e[u-2])var i=ft(e[--u-1],e[u--],2);else 2<u&&"function"==typeof e[u-1]&&(i=e[--u]);for(var e=Nt(arguments,1,u),o=-1,a=c(),f=c();++o<u;)mt(n,e[o],i,a,f);return p(a),p(f),n},y.min=function(n,t,r){var u=1/0,o=u,i=typeof t;if("number"!=i&&"string"!=i||!r||r[t]!==n||(t=null),null==t&&fe(n))for(r=-1,i=n.length;++r<i;){var a=n[r];
|
||||
a<o&&(o=a)}else t=null==t&&ur(n)?e:y.createCallback(t,r,3),st(n,function(n,r,e){r=t(n,r,e),r<u&&(u=r,o=n)});return o},y.omit=function(n,t,r){var e={};if(typeof t!="function"){var u=[];o(n,function(n,t){u.push(t)});for(var u=ct(u,gt(arguments,true,false,1)),i=-1,a=u.length;++i<a;){var f=u[i];e[f]=n[f]}}else t=y.createCallback(t,r,3),o(n,function(n,r,u){t(n,r,u)||(e[r]=n)});return e},y.once=function(n){var t,r;if(!tr(n))throw new _r;return function(){return t?r:(t=true,r=n.apply(this,arguments),n=null,r)}
|
||||
},y.pairs=function(n){for(var t=-1,r=ce(n),e=r.length,u=pr(e);++t<e;){var o=r[t];u[t]=[o,n[o]]}return u},y.partial=function(n){return jt(n,S,Nt(arguments,1))},y.partialRight=function(n){return jt(n,E,null,Nt(arguments,1))},y.pick=function(n,t,r){var e={};if(typeof t!="function")for(var u=-1,i=gt(arguments,true,false,1),a=rr(n)?i.length:0;++u<a;){var f=i[u];f in n&&(e[f]=n[f])}else t=y.createCallback(t,r,3),o(n,function(n,r,u){t(n,r,u)&&(e[r]=n)});return e},y.pluck=ae,y.property=cr,y.pull=function(n){for(var t=arguments,r=0,e=t.length,u=n?n.length:0;++r<e;)for(var o=-1,i=t[r];++o<u;)n[o]===i&&(Br.call(n,o--,1),u--);
|
||||
return n},y.range=function(n,t,r){n=+n||0,r=typeof r=="number"?r:+r||1,null==t&&(t=n,n=0);var e=-1;t=Vr(0,Sr((t-n)/(r||1)));for(var u=pr(t);++e<t;)u[e]=n,n+=r;return u},y.reject=function(n,t,r){return t=y.createCallback(t,r,3),qt(n,function(n,r,e){return!t(n,r,e)})},y.remove=function(n,t,r){var e=-1,u=n?n.length:0,o=[];for(t=y.createCallback(t,r,3);++e<u;)r=n[e],t(r,e,n)&&(o.push(r),Br.call(n,e--,1),u--);return o},y.rest=Et,y.shuffle=Vt,y.slice=Nt,y.sortBy=function(n,t,r){var e=-1,u=t&&fe(t),o=n?n.length:0,f=pr(typeof o=="number"?o:0);
|
||||
for(u||(t=y.createCallback(t,r,3)),st(n,function(n,r,o){var i=f[++e]=j.pop()||{f:null,g:0,h:null};i.g=e,i.h=n,i.f=u?Pt(t,function(t){return n[t]}):t(n,r,o)}),o=f.length,f.sort(u?a:i);o--;)n=f[o],f[o]=n.h,s(n);return f},y.tap=function(n,t,r){return t.call(r,n),n},y.throttle=function(n,t,r){var e=true,u=true;if(!tr(n))throw new _r;return false===r?e=false:rr(r)&&(e="leading"in r?r.leading:e,u="trailing"in r?r.trailing:u),ot.leading=e,ot.maxWait=t,ot.trailing=u,Ht(n,t,ot)},y.times=function(n,t,r){n=-1<(n=+n)?n:0;
|
||||
var e=-1,u=pr(n);for(t=ft(t,r,1);++e<n;)u[e]=t(e);return u},y.toArray=function(n){return n&&typeof n.length=="number"?Nt(n):or(n)},y.transform=function(n,t,r,e){var u=fe(n);if(null==r)if(u)r=[];else{var o=n&&n.constructor;r=at(o&&o.prototype)}return t&&(t=y.createCallback(t,e,4),(u?st:vt)(n,function(n,e,u){return t(r,n,e,u)})),r},y.union=function(){return bt(gt(arguments,true,true))},y.uniq=It,y.values=or,y.where=qt,y.without=function(n){return ct(n,Nt(arguments,1))},y.wrap=function(n,t){return jt(t,S,[n])
|
||||
},y.xor=function(){for(var n=-1,t=arguments.length;++n<t;){var r=arguments[n];if(fe(r)||Ot(r))var e=e?ct(e,r).concat(ct(r,e)):r}return e?bt(e):[]},y.zip=Tt,y.zipObject=Dt,y.collect=Pt,y.drop=Et,y.each=zt,y.eachRight=Lt,y.extend=Jt,y.methods=Zt,y.object=Dt,y.select=qt,y.tail=Et,y.unique=It,y.unzip=Tt,fr(Jt({},y)),y.capitalize=function(n){return null==n?"":(n=br(n),n.charAt(0).toUpperCase()+n.slice(1))},y.clone=function(n,t,r,e){var u=typeof t;return"boolean"!=u&&null!=t&&(e=r,r=t,t=false,"number"!=u&&"string"!=u||!e||e[r]!==n||(r=null)),R(n,t,typeof r=="function"&&ft(r,e,1))
|
||||
},y.cloneDeep=function(n,t,r){return R(n,true,typeof t=="function"&&ft(t,r,1))},y.contains=$t,y.escape=function(n){return null==n?"":br(n).replace(B,f)},y.every=Bt,y.find=Wt,y.findIndex=function(n,t,r){var e=-1,u=n?n.length:0;for(t=y.createCallback(t,r,3);++e<u;)if(t(n[e],e,n))return e;return-1},y.findKey=function(n,t,r){var e;return t=y.createCallback(t,r,3),vt(n,function(n,r,u){return t(n,r,u)?(e=r,false):void 0}),e},y.findLast=function(n,t,r){var e;return t=y.createCallback(t,r,3),Lt(n,function(n,r,u){return t(n,r,u)?(e=n,false):void 0
|
||||
}),e},y.findLastIndex=function(n,t,r){var e=n?n.length:0;for(t=y.createCallback(t,r,3);e--;)if(t(n[e],e,n))return e;return-1},y.findLastKey=function(n,t,r){var e;return t=y.createCallback(t,r,3),Yt(n,function(n,r,u){return t(n,r,u)?(e=r,false):void 0}),e},y.has=function(n,t){return n?Tr.call(n,t):false},y.identity=ir,y.indexOf=St,y.isArguments=Ot,y.isArray=fe,y.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&Or.call(n)==Q||false},y.isDate=function(n){return n&&typeof n=="object"&&Or.call(n)==Y||false
|
||||
},y.isElement=nr,y.isEmpty=function(n){var t=true;if(!n)return t;var r=Or.call(n),e=n.length;return r==J||r==et||r==H||r==tt&&typeof e=="number"&&tr(n.splice)?!e:(vt(n,function(){return t=false}),t)},y.isEqual=function(n,t,r,e){return yt(n,t,typeof r=="function"&&ft(r,e,2))},y.isFinite=function(n){return Kr(n)&&!Mr(parseFloat(n))},y.isFunction=tr,y.isNaN=function(n){return er(n)&&n!=+n},y.isNull=function(n){return null===n},y.isNumber=er,y.isObject=rr,y.isPlainObject=le,y.isRegExp=function(n){return n&&typeof n=="object"&&Or.call(n)==rt||false
|
||||
},y.isString=ur,y.isUndefined=function(n){return typeof n=="undefined"},y.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(e=(0>r?Vr(0,e+r):Xr(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},y.mixin=fr,y.noConflict=function(){return n._=Cr,this},y.noop=lr,y.now=he,y.parseInt=ve,y.random=function(n,t,r){var e=null==n,u=null==t;return null==r&&(u&&typeof n=="boolean"?(r=n,n=1):typeof t=="boolean"&&(r=t,u=true)),e&&u&&(t=1,u=false),n=+n||0,u?(t=n,n=0):t=+t||0,r||n%1||t%1?(r=Jr(),Xr(n+r*(t-n+parseFloat("1e-"+((r+"").length-1))),t)):dt(n,t)
|
||||
},y.reduce=Mt,y.reduceRight=Ut,y.result=function(n,t,r){return null==n?r:(r="undefined"!=typeof n[t]?n[t]:r,tr(r)?n[t]():r)},y.runInContext=b,y.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:ce(n).length},y.some=Xt,y.sortedIndex=Rt,y.template=function(n,t,r){var e=y.templateSettings;n=br(n||""),r=Qt({},r,e);var u,o=Qt({},r.imports,e.imports),e=ce(o),o=or(o),i=0,a=r.interpolate||U,f="__p+='",a=dr((r.escape||U).source+"|"+a.source+"|"+(a===z?L:U).source+"|"+(r.evaluate||U).source+"|$","g");
|
||||
n.replace(a,function(t,r,e,o,a,c){return e||(e=o),f+=n.slice(i,c).replace(X,l),r&&(f+="'+__e("+r+")+'"),a&&(u=true,f+="';"+a+";\n__p+='"),e&&(f+="'+((__t=("+e+"))==null?'':__t)+'"),i=c+t.length,t}),f+="';",a=r=r.variable,a||(r="obj",f="with("+r+"){"+f+"}"),f=(u?f.replace(T,""):f).replace(D,"$1").replace(F,"$1;"),f="function("+r+"){"+(a?"":r+"||("+r+"={});")+"var __t,__p='',__e=_.escape"+(u?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+f+"return __p}";try{var c=hr(e,"return "+f).apply(_,o)
|
||||
}catch(p){throw p.source=f,p}return t?c(t):(c.source=f,c)},y.trim=pe,y.trimLeft=se,y.trimRight=ge,y.unescape=function(n){return null==n?"":(n=br(n),0>n.indexOf(";")?n:n.replace($,d))},y.uniqueId=function(n){var t=++k;return br(null==n?"":n)+t},y.all=Bt,y.any=Xt,y.detect=Wt,y.findWhere=Wt,y.foldl=Mt,y.foldr=Ut,y.include=$t,y.inject=Mt,fr(function(){var n={};return vt(y,function(t,r){y.prototype[r]||(n[r]=t)}),n}(),false),y.first=At,y.last=function(n,t,r){var e=0,u=n?n.length:0;if(typeof t!="number"&&null!=t){var o=u;
|
||||
for(t=y.createCallback(t,r,3);o--&&t(n[o],o,n);)e++}else if(e=t,null==e||r)return n?n[u-1]:_;return e=u-e,Nt(n,0<e?e:0)},y.sample=function(n,t,r){return n&&typeof n.length!="number"&&(n=or(n)),null==t||r?n?n[dt(0,n.length-1)]:_:(n=Vt(n),n.length=Xr(Vr(0,t),n.length),n)},y.take=At,y.head=At,vt(y,function(n,t){var r="sample"!==t;y.prototype[t]||(y.prototype[t]=function(t,e){var u=this.__chain__,o=n(this.__wrapped__,t,e);return u||null!=t&&(!e||r&&typeof t=="function")?new m(o,u):o})}),y.VERSION="2.4.1",y.prototype.chain=function(){return this.__chain__=true,this
|
||||
},y.prototype.toString=function(){return br(this.__wrapped__)},y.prototype.value=Ft,y.prototype.valueOf=Ft,st(["join","pop","shift"],function(n){var t=wr[n];y.prototype[n]=function(){var n=this.__chain__,r=t.apply(this.__wrapped__,arguments);return n?new m(r,n):r}}),st(["push","reverse","sort","unshift"],function(n){var t=wr[n];y.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),st(["concat","splice"],function(n){var t=wr[n];y.prototype[n]=function(){return new m(t.apply(this.__wrapped__,arguments),this.__chain__)
|
||||
}}),y}var _,w=[],j=[],k=0,x=1,C=2,O=4,A=8,S=16,E=32,N=75,R=40,I=" \t\x0B\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",T=/\b__p\+='';/g,D=/\b(__p\+=)''\+/g,F=/(__e\(.*?\)|\b__t\))\+'';/g,$=/&(?:amp|lt|gt|quot|#39);/g,B=/[&<>"']/g,q=/<%-([\s\S]+?)%>/g,W=/<%([\s\S]+?)%>/g,z=/<%=([\s\S]+?)%>/g,L=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,P=/\w*$/,K=/^\s*function[ \n\r\t]+\w/,M=/^0[xX]/,U=/($^)/,V=/\bthis\b/,X=/['\n\r\t\u2028\u2029\\]/g,G="Array Boolean Date Function Math Number Object RegExp Set String _ clearTimeout document isFinite isNaN parseInt setTimeout TypeError window WinRTError".split(" "),H="[object Arguments]",J="[object Array]",Q="[object Boolean]",Y="[object Date]",Z="[object Function]",nt="[object Number]",tt="[object Object]",rt="[object RegExp]",et="[object String]",ut={};
|
||||
ut[Z]=false,ut[H]=ut[J]=ut[Q]=ut[Y]=ut[nt]=ut[tt]=ut[rt]=ut[et]=true;var ot={leading:false,maxWait:0,trailing:false},it={configurable:false,enumerable:false,value:null,writable:false},at={"&":"&","<":"<",">":">",'"':""","'":"'"},ft={"&":"&","<":"<",">":">",""":'"',"'":"'"},lt={"function":true,object:true},ct={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},pt=lt[typeof window]&&window||this,st=lt[typeof exports]&&exports&&!exports.nodeType&&exports,gt=lt[typeof global]&&global;
|
||||
!gt||gt.global!==gt&>.window!==gt||(pt=gt);var gt=(lt=lt[typeof module]&&module&&!module.nodeType&&module)&<.exports===st&&st,ht=b();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(pt._=ht, define(function(){return ht})):st&<?gt?(lt.exports=ht)._=ht:st._=ht:pt._=ht}).call(this);
|
||||
188
dist/lodash.underscore.js
vendored
188
dist/lodash.underscore.js
vendored
@@ -579,6 +579,31 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.forEach` without support for callback
|
||||
* shorthands or `thisArg` binding.
|
||||
*
|
||||
* @private
|
||||
* @param {Array|Object|string} collection The collection to iterate over.
|
||||
* @param {Function} callback The function called per iteration.
|
||||
* @returns {Array|Object|string} Returns `collection`.
|
||||
*/
|
||||
function baseEach(collection, callback) {
|
||||
var index = -1,
|
||||
iterable = collection,
|
||||
length = collection ? collection.length : 0;
|
||||
|
||||
if (typeof length == 'number') {
|
||||
while (++index < length) {
|
||||
if (callback(iterable[index], index, collection) === breakIndicator) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
baseForOwn(collection, callback);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.flatten` without support for callback
|
||||
* shorthands or `thisArg` binding.
|
||||
@@ -619,6 +644,29 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.forOwn` without support for callback
|
||||
* shorthands or `thisArg` binding.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} callback The function called per iteration.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function baseForOwn(object, callback) {
|
||||
var index = -1,
|
||||
props = keys(object),
|
||||
length = props.length;
|
||||
|
||||
while (++index < length) {
|
||||
var key = props[index];
|
||||
if (callback(object[key], key, object) === breakIndicator) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return object;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.isEqual`, without support for `thisArg` binding,
|
||||
* that allows partial "_.where" style comparisons.
|
||||
@@ -724,7 +772,7 @@
|
||||
}
|
||||
}
|
||||
else {
|
||||
forIn(b, function(value, key, b) {
|
||||
baseForIn(b, function(value, key, b) {
|
||||
if (hasOwnProperty.call(b, key)) {
|
||||
size++;
|
||||
return !(result = hasOwnProperty.call(a, key) && baseIsEqual(a[key], value, stackA, stackB)) && breakIndicator;
|
||||
@@ -732,7 +780,7 @@
|
||||
});
|
||||
|
||||
if (result) {
|
||||
forIn(a, function(value, key, a) {
|
||||
baseForIn(a, function(value, key, a) {
|
||||
if (hasOwnProperty.call(a, key)) {
|
||||
return !(result = --size > -1) && breakIndicator;
|
||||
}
|
||||
@@ -815,7 +863,7 @@
|
||||
setter(result, value, callback(value, index, collection), collection);
|
||||
}
|
||||
} else {
|
||||
forOwn(collection, function(value, key, collection) {
|
||||
baseEach(collection, function(value, key, collection) {
|
||||
setter(result, value, callback(value, key, collection), collection);
|
||||
});
|
||||
}
|
||||
@@ -923,6 +971,28 @@
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.forIn` without support for callback
|
||||
* shorthands or `thisArg` binding.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} callback The function called per iteration.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
var baseForIn = function(object, callback) {
|
||||
var result = object;
|
||||
if (!isObject(object)) {
|
||||
return result;
|
||||
}
|
||||
for (var key in object) {
|
||||
if (callback(object[key], key, object) === breakIndicator) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* A fallback implementation of `Object.keys` which produces an array of the
|
||||
* given object's own enumerable property names.
|
||||
@@ -1926,7 +1996,7 @@
|
||||
if (length && typeof length == 'number') {
|
||||
result = indexOf(collection, target) > -1;
|
||||
} else {
|
||||
forOwn(collection, function(value) {
|
||||
baseEach(collection, function(value) {
|
||||
return (result = value === target) && breakIndicator;
|
||||
});
|
||||
}
|
||||
@@ -2026,7 +2096,7 @@
|
||||
}
|
||||
}
|
||||
} else {
|
||||
forOwn(collection, function(value, index, collection) {
|
||||
baseEach(collection, function(value, index, collection) {
|
||||
return !(result = !!callback(value, index, collection)) && breakIndicator;
|
||||
});
|
||||
}
|
||||
@@ -2088,7 +2158,7 @@
|
||||
}
|
||||
}
|
||||
} else {
|
||||
forOwn(collection, function(value, index, collection) {
|
||||
baseEach(collection, function(value, index, collection) {
|
||||
if (callback(value, index, collection)) {
|
||||
result.push(value);
|
||||
}
|
||||
@@ -2155,7 +2225,7 @@
|
||||
}
|
||||
} else {
|
||||
var result;
|
||||
forOwn(collection, function(value, index, collection) {
|
||||
baseEach(collection, function(value, index, collection) {
|
||||
if (callback(value, index, collection)) {
|
||||
result = value;
|
||||
return breakIndicator;
|
||||
@@ -2230,7 +2300,7 @@
|
||||
}
|
||||
}
|
||||
} else {
|
||||
forOwn(collection, callback);
|
||||
baseEach(collection, callback);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2262,7 +2332,7 @@
|
||||
} else {
|
||||
var props = keys(collection);
|
||||
length = props.length;
|
||||
forOwn(collection, function(value, key, collection) {
|
||||
baseEach(collection, function(value, key, collection) {
|
||||
key = props ? props[--length] : --length;
|
||||
return callback(collection[key], key, collection) === false && breakIndicator;
|
||||
});
|
||||
@@ -2384,7 +2454,7 @@
|
||||
length = collection ? collection.length : 0,
|
||||
result = Array(typeof length == 'number' ? length : 0);
|
||||
|
||||
forEach(collection, function(value) {
|
||||
baseEach(collection, function(value) {
|
||||
result[++index] = (isFunc ? methodName : value[methodName]).apply(value, args);
|
||||
});
|
||||
return result;
|
||||
@@ -2441,7 +2511,7 @@
|
||||
}
|
||||
} else {
|
||||
result = [];
|
||||
forOwn(collection, function(value, key, collection) {
|
||||
baseEach(collection, function(value, key, collection) {
|
||||
result[++index] = callback(value, key, collection);
|
||||
});
|
||||
}
|
||||
@@ -2511,7 +2581,7 @@
|
||||
} else {
|
||||
callback = createCallback(callback, thisArg, 3);
|
||||
|
||||
forEach(collection, function(value, index, collection) {
|
||||
baseEach(collection, function(value, index, collection) {
|
||||
var current = callback(value, index, collection);
|
||||
if (current > computed) {
|
||||
computed = current;
|
||||
@@ -2585,7 +2655,7 @@
|
||||
} else {
|
||||
callback = createCallback(callback, thisArg, 3);
|
||||
|
||||
forEach(collection, function(value, index, collection) {
|
||||
baseEach(collection, function(value, index, collection) {
|
||||
var current = callback(value, index, collection);
|
||||
if (current < computed) {
|
||||
computed = current;
|
||||
@@ -2663,7 +2733,7 @@
|
||||
accumulator = callback(accumulator, collection[index], index, collection);
|
||||
}
|
||||
} else {
|
||||
forOwn(collection, function(value, index, collection) {
|
||||
baseEach(collection, function(value, index, collection) {
|
||||
accumulator = noaccum
|
||||
? (noaccum = false, value)
|
||||
: callback(accumulator, value, index, collection)
|
||||
@@ -2797,7 +2867,7 @@
|
||||
length = collection ? collection.length : 0,
|
||||
result = Array(typeof length == 'number' ? length : 0);
|
||||
|
||||
forEach(collection, function(value) {
|
||||
baseEach(collection, function(value) {
|
||||
var rand = baseRandom(0, ++index);
|
||||
result[index] = result[rand];
|
||||
result[rand] = value;
|
||||
@@ -2887,7 +2957,7 @@
|
||||
}
|
||||
}
|
||||
} else {
|
||||
forOwn(collection, function(value, index, collection) {
|
||||
baseEach(collection, function(value, index, collection) {
|
||||
return (result = callback(value, index, collection)) && breakIndicator;
|
||||
});
|
||||
}
|
||||
@@ -3692,84 +3762,6 @@
|
||||
return object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Iterates over own and inherited enumerable properties of an object,
|
||||
* executing the callback for each property. The callback is bound to `thisArg`
|
||||
* and invoked with three arguments; (value, key, object). Callbacks may exit
|
||||
* iteration early by explicitly returning `false`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @type Function
|
||||
* @category Objects
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} [callback=identity] The function called per iteration.
|
||||
* @param {*} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Object} Returns `object`.
|
||||
* @example
|
||||
*
|
||||
* function Shape() {
|
||||
* this.x = 0;
|
||||
* this.y = 0;
|
||||
* }
|
||||
*
|
||||
* Shape.prototype.move = function(x, y) {
|
||||
* this.x += x;
|
||||
* this.y += y;
|
||||
* };
|
||||
*
|
||||
* _.forIn(new Shape, function(value, key) {
|
||||
* console.log(key);
|
||||
* });
|
||||
* // => logs 'x', 'y', and 'move' (property order is not guaranteed across environments)
|
||||
*/
|
||||
var forIn = function(object, callback) {
|
||||
var result = object;
|
||||
if (!isObject(object)) {
|
||||
return result;
|
||||
}
|
||||
for (var key in object) {
|
||||
if (callback(object[key], key, object) === breakIndicator) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* Iterates over own enumerable properties of an object, executing the callback
|
||||
* for each property. The callback is bound to `thisArg` and invoked with three
|
||||
* arguments; (value, key, object). Callbacks may exit iteration early by
|
||||
* explicitly returning `false`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Objects
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} [callback=identity] The function called per iteration.
|
||||
* @param {*} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Object} Returns `object`.
|
||||
* @example
|
||||
*
|
||||
* _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) {
|
||||
* console.log(key);
|
||||
* });
|
||||
* // => logs '0', '1', and 'length' (property order is not guaranteed across environments)
|
||||
*/
|
||||
function forOwn(object, callback) {
|
||||
var index = -1,
|
||||
props = keys(object),
|
||||
length = props.length;
|
||||
|
||||
while (++index < length) {
|
||||
var key = props[index];
|
||||
if (callback(object[key], key, object) === breakIndicator) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a sorted array of property names of all enumerable properties,
|
||||
* own and inherited, of `object` that have function values.
|
||||
@@ -3787,7 +3779,7 @@
|
||||
*/
|
||||
function functions(object) {
|
||||
var result = [];
|
||||
forIn(object, function(value, key) {
|
||||
baseForIn(object, function(value, key) {
|
||||
if (isFunction(value)) {
|
||||
result.push(key);
|
||||
}
|
||||
@@ -4265,7 +4257,7 @@
|
||||
*/
|
||||
function omit(object) {
|
||||
var props = [];
|
||||
forIn(object, function(value, key) {
|
||||
baseForIn(object, function(value, key) {
|
||||
props.push(key);
|
||||
});
|
||||
props = baseDifference(props, baseFlatten(arguments, true, false, 1));
|
||||
@@ -5083,7 +5075,7 @@
|
||||
lodash.prototype.value = wrapperValueOf;
|
||||
|
||||
// add `Array` mutator functions to the wrapper
|
||||
forEach(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
|
||||
baseEach(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
|
||||
var func = arrayRef[methodName];
|
||||
lodash.prototype[methodName] = function() {
|
||||
var value = this.__wrapped__;
|
||||
@@ -5099,7 +5091,7 @@
|
||||
});
|
||||
|
||||
// add `Array` accessor functions to the wrapper
|
||||
forEach(['concat', 'join', 'slice'], function(methodName) {
|
||||
baseEach(['concat', 'join', 'slice'], function(methodName) {
|
||||
var func = arrayRef[methodName];
|
||||
lodash.prototype[methodName] = function() {
|
||||
var value = this.__wrapped__,
|
||||
|
||||
70
dist/lodash.underscore.min.js
vendored
70
dist/lodash.underscore.min.js
vendored
@@ -3,38 +3,38 @@
|
||||
* Lo-Dash 2.4.1 (Custom Build) lodash.com/license | Underscore.js 1.5.2 underscorejs.org/LICENSE
|
||||
* Build: `lodash underscore exports="amd,commonjs,global,node" -o ./dist/lodash.underscore.js`
|
||||
*/
|
||||
;(function(){function n(n,r,t){t=(t||0)-1;for(var e=n?n.length:0;++t<e;)if(n[t]===r)return t;return-1}function r(n,r){var t;n:{t=n.i;var e=r.i;if(t!==e){if(t>e||typeof t=="undefined"){t=1;break n}if(t<e||typeof e=="undefined"){t=-1;break n}}t=0}return t||n.j-r.j}function t(n){return xr[n]}function e(n){return"\\"+Er[n]}function u(n){return Tr[n]}function o(n){return n instanceof o?n:new i(n)}function i(n,r){this.__chain__=!!r,this.__wrapped__=n}function f(n){function r(){if(e){var n=x(e);Cr.apply(n,arguments)
|
||||
}if(this instanceof r){var o=a(t.prototype),n=t.apply(o,n||arguments);return J(n)?n:o}return t.apply(u,n||arguments)}var t=n[0],e=n[2],u=n[4];return r}function a(n){return J(n)?Vr(n):{}}function c(n,r,t){if(typeof n!="function")return Y;if(typeof r=="undefined"||!("prototype"in n))return n;switch(t){case 1:return function(t){return n.call(r,t)};case 2:return function(t,e){return n.call(r,t,e)};case 3:return function(t,e,u){return n.call(r,t,e,u)};case 4:return function(t,e,u,o){return n.call(r,t,e,u,o)
|
||||
}}return W(n,r)}function l(n){function r(){var n=c?i:this;if(u){var h=x(u);Cr.apply(h,arguments)}return(o||s)&&(h||(h=x(arguments)),o&&Cr.apply(h,o),s&&h.length<f)?(e|=cr,e&=~lr,l([t,g?e:e&~(or|ir),h,null,i,f])):(h||(h=arguments),p&&(t=n[v]),this instanceof r?(n=a(t.prototype),h=t.apply(n,h),J(h)?h:n):t.apply(n,h))}var t=n[0],e=n[1],u=n[2],o=n[3],i=n[4],f=n[5],c=e&or,p=e&ir,s=e&fr,g=e&ar,v=t;return r}function p(n,r){for(var t=-1,e=m(),u=n?n.length:0,o=[];++t<u;){var i=n[t];0>e(r,i)&&o.push(i)}return o
|
||||
}function s(n,r,t,e){e=(e||0)-1;for(var u=n?n.length:0,o=[];++e<u;){var i=n[e];if(i&&typeof i=="object"&&typeof i.length=="number"&&(it(i)||b(i))){r||(i=s(i,r,t));var f=-1,a=i.length,c=o.length;for(o.length+=a;++f<a;)o[c++]=i[f]}else t||o.push(i)}return o}function g(n,r,t,e){if(n===r)return 0!==n||1/n==1/r;var u=typeof n,i=typeof r;if(n===n&&(!n||"function"!=u&&"object"!=u)&&(!r||"function"!=i&&"object"!=i))return false;if(null==n||null==r)return n===r;if(i=$r.call(n),u=$r.call(r),i!=u)return false;switch(i){case mr:case _r:return+n==+r;
|
||||
case br:return n!=+n?r!=+r:0==n?1/n==1/r:n==+r;case wr:case jr:return n==r+""}if(u=i==yr,!u){var f=n instanceof o,a=r instanceof o;if(f||a)return g(f?n.__wrapped__:n,a?r.__wrapped__:r,t,e);if(i!=dr)return false;if(i=zr.call(n,"constructor"),f=zr.call(r,"constructor"),i!==f||!i&&(i=n.constructor,f=r.constructor,i!=f&&!(H(i)&&i instanceof i&&H(f)&&f instanceof f)&&"constructor"in n&&"constructor"in r))return false}for(t||(t=[]),e||(e=[]),i=t.length;i--;)if(t[i]==n)return e[i]==r;var c=true,l=0;if(t.push(n),e.push(r),u){if(l=r.length,c=l==n.length)for(;l--&&(c=g(n[l],r[l],t,e)););}else ot(r,function(r,u,o){return zr.call(o,u)?(l++,!(c=zr.call(n,u)&&g(n[u],r,t,e))&&ur):void 0
|
||||
}),c&&ot(n,function(n,r,t){return zr.call(t,r)?!(c=-1<--l)&&ur:void 0});return t.pop(),e.pop(),c}function v(n,r,t){for(var e=-1,u=m(),o=n?n.length:0,i=[],f=t?[]:i;++e<o;){var a=n[e],c=t?t(a,e,n):a;(r?!e||f[f.length-1]!==c:0>u(f,c))&&(t&&f.push(c),i.push(a))}return i}function h(n){return function(r,t,e){var u={};t=X(t,e,3),e=-1;var o=r?r.length:0;if(typeof o=="number")for(;++e<o;){var i=r[e];n(u,i,t(i,e,r),r)}else U(r,function(r,e,o){n(u,r,t(r,e,o),o)});return u}}function y(n,r,t,e,u,o){var i=r&cr,a=r&lr;
|
||||
if(!(r&ir||H(n)))throw new TypeError;return i&&!t.length&&(r&=-17,t=false),a&&!e.length&&(r&=-33,e=false),(r==or||r==(or|cr)?f:l)([n,r,t,e,u,o])}function m(){var r=(r=o.indexOf)===w?n:r;return r}function _(n){return typeof n=="function"&&Ir.test(Wr.call(n))}function b(n){return n&&typeof n=="object"&&typeof n.length=="number"&&$r.call(n)==hr||false}function d(n,r,t){var e=0,u=n?n.length:0;if(typeof r!="number"&&null!=r){var o=-1;for(r=X(r,t,3);++o<u&&r(n[o],o,n);)e++}else if(e=r,null==e||t)return n?n[0]:tr;
|
||||
return x(n,0,0<e?e:0)}function w(r,t,e){var u=r?r.length:0;if(typeof e=="number")e=0>e?Lr(0,u+e):e||0;else if(e)return e=T(r,t),u&&r[e]===t?e:-1;return n(r,t,e)}function j(n,r,t){if(typeof r!="number"&&null!=r){var e=0,u=-1,o=n?n.length:0;for(r=X(r,t,3);++u<o&&r(n[u],u,n);)e++}else e=null==r||t?1:0<r?r:0;return x(n,e)}function x(n,r,t){var e=-1,u=n?n.length:0;for(typeof r=="undefined"?r=0:0>r?r=Lr(u+r,0):r>u&&(r=u),typeof t=="undefined"?t=u:0>t?t=Lr(u+t,0):t>u&&(t=u),u=t-r||0,t=Array(u);++e<u;)t[e]=n[r+e];
|
||||
return t}function T(n,r,t,e){var u=0,o=n?n.length:u;for(t=t?X(t,e,1):Y,r=t(r);u<o;)e=u+o>>>1,t(n[e])<r?u=e+1:o=e;return u}function A(n,r,t,e){var u=typeof r;return"boolean"!=u&&null!=r&&(e=t,t=r,r=false,"number"!=u&&"string"!=u||!e||e[t]!==n||(t=null)),null!=t&&(t=X(t,e,3)),v(n,r,t)}function E(n,r){var t=m(),e=n?n.length:0,u=false;return e&&typeof e=="number"?u=-1<t(n,r):U(n,function(n){return(u=n===r)&&ur}),u}function O(n,r,t){var e=true;r=X(r,t,3),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++t<u&&(e=!!r(n[t],t,n)););else U(n,function(n,t,u){return!(e=!!r(n,t,u))&&ur
|
||||
});return e}function k(n,r,t){var e=[];r=X(r,t,3),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++t<u;){var o=n[t];r(o,t,n)&&e.push(o)}else U(n,function(n,t,u){r(n,t,u)&&e.push(n)});return e}function S(n,r,t){r=X(r,t,3),t=-1;var e=n?n.length:0;if(typeof e!="number"){var u;return U(n,function(n,t,e){return r(n,t,e)?(u=n,ur):void 0}),u}for(;++t<e;){var o=n[t];if(r(o,t,n))return o}}function N(n,r,t){var e=-1,u=n?n.length:0;if(r=r&&typeof t=="undefined"?r:c(r,t,3),typeof u=="number")for(;++e<u&&r(n[e],e,n)!==ur;);else U(n,r)
|
||||
}function q(n,r){var t=n?n.length:0;if(typeof t=="number")for(;t--&&false!==r(n[t],t,n););else{var e=ft(n),t=e.length;U(n,function(n,u,o){return u=e?e[--t]:--t,false===r(o[u],u,o)&&ur})}}function F(n,r,t){var e=-1,u=n?n.length:0;if(r=X(r,t,3),typeof u=="number")for(var o=Array(u);++e<u;)o[e]=r(n[e],e,n);else o=[],U(n,function(n,t,u){o[++e]=r(n,t,u)});return o}function B(n,r,t){var e=-1/0,u=e,o=typeof r;"number"!=o&&"string"!=o||!t||t[r]!==n||(r=null);var o=-1,i=n?n.length:0;if(null==r&&typeof i=="number")for(;++o<i;)t=n[o],t>u&&(u=t);
|
||||
else r=X(r,t,3),N(n,function(n,t,o){t=r(n,t,o),t>e&&(e=t,u=n)});return u}function R(n,r,t,e){var u=3>arguments.length;r=X(r,e,4);var o=-1,i=n?n.length:0;if(typeof i=="number")for(u&&i&&(t=n[++o]);++o<i;)t=r(t,n[o],o,n);else U(n,function(n,e,o){t=u?(u=false,n):r(t,n,e,o)});return t}function $(n,r,t,e){var u=3>arguments.length;return r=X(r,e,4),q(n,function(n,e,o){t=u?(u=false,n):r(t,n,e,o)}),t}function I(n){var r=-1,t=n?n.length:0,e=Array(typeof t=="number"?t:0);return N(n,function(n){var t;t=++r,t=0+Dr(Yr()*(t-0+1)),e[r]=e[t],e[t]=n
|
||||
}),e}function M(n,r,t){var e;r=X(r,t,3),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++t<u&&!(e=r(n[t],t,n)););else U(n,function(n,t,u){return(e=r(n,t,u))&&ur});return!!e}function D(n,r,t){return t&&G(r)?tr:(t?S:k)(n,r)}function W(n,r){return 2<arguments.length?y(n,or|cr,x(arguments,2),null,r):y(n,or,null,null,r)}function z(n,r,t){var e,u,o,i,f,a,c,l=0,p=false,s=true;if(!H(n))throw new TypeError;if(r=Lr(0,r)||0,true===t)var g=true,s=false;else J(t)&&(g=t.leading,p="maxWait"in t&&(Lr(r,t.maxWait)||0),s="trailing"in t?t.trailing:s);
|
||||
var v=function(){var t=r-(at()-i);0<t?a=setTimeout(v,t):(u&&clearTimeout(u),t=c,u=a=c=tr,t&&(l=at(),o=n.apply(f,e),a||u||(e=f=null)))},h=function(){a&&clearTimeout(a),u=a=c=tr,(s||p!==r)&&(l=at(),o=n.apply(f,e),a||u||(e=f=null))};return function(){if(e=arguments,i=at(),f=this,c=s&&(a||!g),false===p)var t=g&&!a;else{u||g||(l=i);var y=p-(i-l),m=0>=y;m?(u&&(u=clearTimeout(u)),l=i,o=n.apply(f,e)):u||(u=setTimeout(h,y))}return m&&a?a=clearTimeout(a):a||r===p||(a=setTimeout(v,r)),t&&(m=true,o=n.apply(f,e)),!m||a||u||(e=f=null),o
|
||||
}}function C(n,r,t){if(!n)return n;var e=arguments,u=0,o=e.length,i=typeof t;for("number"!=i&&"string"!=i||!e[3]||e[3][t]!==r||(o=2);++u<o;)if(r=e[u])for(var f in r)n[f]=r[f];return n}function P(n,r,t){if(!n)return n;var e=arguments,u=0,o=e.length,i=typeof t;for("number"!=i&&"string"!=i||!e[3]||e[3][t]!==r||(o=2);++u<o;)if(r=e[u])for(var f in r)"undefined"==typeof n[f]&&(n[f]=r[f]);return n}function U(n,r){for(var t=-1,e=ft(n),u=e.length;++t<u;){var o=e[t];if(r(n[o],o,n)===ur)break}return n}function V(n){var r=[];
|
||||
return ot(n,function(n,t){H(n)&&r.push(t)}),r.sort()}function G(n){if(!n)return true;if(it(n)||L(n))return!n.length;for(var r in n)if(zr.call(n,r))return false;return true}function H(n){return typeof n=="function"}function J(n){var r=typeof n;return n&&("function"==r||"object"==r)||false}function K(n){var r=typeof n;return"number"==r||n&&"object"==r&&$r.call(n)==br||false}function L(n){return typeof n=="string"||n&&typeof n=="object"&&$r.call(n)==jr||false}function Q(n){for(var r=-1,t=ft(n),e=t.length,u=Array(e);++r<e;)u[r]=n[t[r]];
|
||||
return u}function X(n,r,t){var e=typeof n;return null==n||"function"==e?c(n,r,t):"object"!=e?rr(n):Z(n)}function Y(n){return n}function Z(n){n||(n={});var r=ft(n);return function(t){for(var e=r.length,u=false;e--&&(u=t[r[e]]===n[r[e]]););return u}}function nr(n){for(var r=-1,t=V(n),e=t.length;++r<e;){var u=t[r];o.prototype[u]=function(){var r=o[u]=n[u];return function(){var n=[this.__wrapped__];return Cr.apply(n,arguments),n=r.apply(o,n),this.__chain__?new i(n,true):n}}()}}function rr(n){return function(r){return r[n]
|
||||
}}var tr,er=0,ur="__lodash_break_1335248838000__",or=1,ir=2,fr=4,ar=8,cr=16,lr=32,pr=/&(?:amp|lt|gt|quot|#x27);/g,sr=/[&<>"']/g,gr=/($^)/,vr=/['\n\r\t\u2028\u2029\\]/g,hr="[object Arguments]",yr="[object Array]",mr="[object Boolean]",_r="[object Date]",br="[object Number]",dr="[object Object]",wr="[object RegExp]",jr="[object String]",xr={"&":"&","<":"<",">":">",'"':""","'":"'"},Tr={"&":"&","<":"<",">":">",""":'"',"'":"'"},Ar={"function":true,object:true},Er={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},Or=Ar[typeof window]&&window||this,kr=Ar[typeof exports]&&exports&&!exports.nodeType&&exports,Sr=Ar[typeof global]&&global;
|
||||
!Sr||Sr.global!==Sr&&Sr.window!==Sr||(Or=Sr);var Nr=Ar[typeof module]&&module&&!module.nodeType&&module,qr=Nr&&Nr.exports===kr&&kr,Fr=Array.prototype,Br=Object.prototype,Rr=Or._,$r=Br.toString,Ir=RegExp("^"+($r+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Mr=Math.ceil,Dr=Math.floor,Wr=Function.prototype.toString,zr=Br.hasOwnProperty,Cr=Fr.push,Pr=Br.propertyIsEnumerable,Ur=Fr.splice,Vr=_(Vr=Object.create)&&Vr,Gr=_(Gr=Array.isArray)&&Gr,Hr=Or.isFinite,Jr=Or.isNaN,Kr=_(Kr=Object.keys)&&Kr,Lr=Math.max,Qr=Math.min,Xr=_(Xr=Date.now)&&Xr,Yr=Math.random;
|
||||
i.prototype=o.prototype;var Zr={};!function(){var n={0:1,length:1};Zr.spliceObjects=(Ur.call(n,0,1),!n[0])}(1),o.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},Vr||(a=function(){function n(){}return function(r){if(J(r)){n.prototype=r;var t=new n;n.prototype=null}return t||Or.Object()}}()),b(arguments)||(b=function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&zr.call(n,"callee")&&!Pr.call(n,"callee")||false});var nt=function(n){var r=[];
|
||||
if(!J(n))return r;for(var t in n)zr.call(n,t)&&r.push(t);return r},rt=h(function(n,r,t){zr.call(n,t)?n[t]++:n[t]=1}),tt=h(function(n,r,t){zr.call(n,t)?n[t].push(r):n[t]=[r]}),et=h(function(n,r,t){n[t]=r}),ut=F,ot=function(n,r){if(!J(n))return n;for(var t in n)if(r(n[t],t,n)===ur)break;return n},it=Gr||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&$r.call(n)==yr||false};H(/x/)&&(H=function(n){return typeof n=="function"&&"[object Function]"==$r.call(n)});var ft=Kr?function(n){return J(n)?Kr(n):[]
|
||||
}:nt,at=Xr||function(){return(new Date).getTime()};o.after=function(n,r){if(!H(r))throw new TypeError;return function(){return 1>--n?r.apply(this,arguments):void 0}},o.bind=W,o.bindAll=function(n){for(var r=1<arguments.length?s(arguments,true,false,1):V(n),t=-1,e=r.length;++t<e;){var u=r[t];n[u]=y(n[u],or,null,null,n)}return n},o.chain=function(n){return n=new i(n),n.__chain__=true,n},o.compact=function(n){for(var r=-1,t=n?n.length:0,e=0,u=[];++r<t;){var o=n[r];o&&(u[e++]=o)}return u},o.compose=function(){for(var n=arguments,r=n.length;r--;)if(!H(n[r]))throw new TypeError;
|
||||
return function(){for(var r=arguments,t=n.length;t--;)r=[n[t].apply(this,r)];return r[0]}},o.countBy=rt,o.debounce=z,o.defaults=P,o.defer=function(n){if(!H(n))throw new TypeError;var r=x(arguments,1);return setTimeout(function(){n.apply(tr,r)},1)},o.delay=function(n,r){if(!H(n))throw new TypeError;var t=x(arguments,2);return setTimeout(function(){n.apply(tr,t)},r)},o.difference=function(n){return p(n,s(arguments,true,true,1))},o.filter=k,o.flatten=function(n,r){return s(n,r)},o.forEach=N,o.functions=V,o.groupBy=tt,o.indexBy=et,o.initial=function(n,r,t){var e=0,u=n?n.length:0;
|
||||
if(typeof r!="number"&&null!=r){var o=u;for(r=X(r,t,3);o--&&r(n[o],o,n);)e++}else e=null==r||t?1:r||e;return e=u-e,x(n,0,0<e?e:0)},o.intersection=function(){for(var n=[],r=-1,t=arguments.length;++r<t;){var e=arguments[r];(it(e)||b(e))&&n.push(e)}var u=n[0],o=-1,i=m(),f=u?u.length:0,a=[];n:for(;++o<f;)if(e=u[o],0>i(a,e)){for(r=t;--r;)if(0>i(n[r],e))continue n;a.push(e)}return a},o.invert=function(n){for(var r=-1,t=ft(n),e=t.length,u={};++r<e;){var o=t[r];u[n[o]]=o}return u},o.invoke=function(n,r){var t=x(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=ft,o.map=F,o.max=B,o.memoize=function(n,r){var t={};return function(){var e=r?r.apply(this,arguments):"_"+arguments[0];return zr.call(t,e)?t[e]:t[e]=n.apply(this,arguments)}},o.min=function(n,r,t){var e=1/0,u=e,o=typeof r;"number"!=o&&"string"!=o||!t||t[r]!==n||(r=null);var o=-1,i=n?n.length:0;if(null==r&&typeof i=="number")for(;++o<i;)t=n[o],t<u&&(u=t);else r=X(r,t,3),N(n,function(n,t,o){t=r(n,t,o),t<e&&(e=t,u=n)});return u},o.omit=function(n){var r=[];
|
||||
ot(n,function(n,t){r.push(t)});for(var r=p(r,s(arguments,true,false,1)),t=-1,e=r.length,u={};++t<e;){var o=r[t];u[o]=n[o]}return u},o.once=function(n){var r,t;if(!H(n))throw new TypeError;return function(){return r?t:(r=true,t=n.apply(this,arguments),n=null,t)}},o.pairs=function(n){for(var r=-1,t=ft(n),e=t.length,u=Array(e);++r<e;){var o=t[r];u[r]=[o,n[o]]}return u},o.partial=function(n){return y(n,cr,x(arguments,1))},o.pick=function(n){for(var r=-1,t=s(arguments,true,false,1),e=t.length,u={};++r<e;){var o=t[r];
|
||||
o in n&&(u[o]=n[o])}return u},o.pluck=ut,o.range=function(n,r,t){n=+n||0,t=+t||1,null==r&&(r=n,n=0);var e=-1;r=Lr(0,Mr((r-n)/t));for(var u=Array(r);++e<r;)u[e]=n,n+=t;return u},o.reject=function(n,r,t){return r=X(r,t,3),k(n,function(n,t,e){return!r(n,t,e)})},o.rest=j,o.shuffle=I,o.sortBy=function(n,t,e){var u=-1,o=n?n.length:0,i=Array(typeof o=="number"?o:0);for(t=X(t,e,3),N(n,function(n,r,e){i[++u]={i:t(n,r,e),j:u,k:n}}),o=i.length,i.sort(r);o--;)i[o]=i[o].k;return i},o.tap=function(n,r){return r(n),n
|
||||
},o.throttle=function(n,r,t){var e=true,u=true;if(!H(n))throw new TypeError;return false===t?e=false:J(t)&&(e="leading"in t?t.leading:e,u="trailing"in t?t.trailing:u),t={},t.leading=e,t.maxWait=r,t.trailing=u,z(n,r,t)},o.times=function(n,r,t){n=-1<(n=+n)?n:0;var e=-1,u=Array(n);for(r=c(r,t,1);++e<n;)u[e]=r(e);return u},o.toArray=function(n){return it(n)?x(n):n&&typeof n.length=="number"?F(n):Q(n)},o.union=function(){return v(s(arguments,true,true))},o.uniq=A,o.values=Q,o.where=D,o.without=function(n){return p(n,x(arguments,1))
|
||||
},o.wrap=function(n,r){return y(r,cr,[n])},o.zip=function(){for(var n=-1,r=B(ut(arguments,"length")),t=Array(0>r?0:r);++n<r;)t[n]=ut(arguments,n);return t},o.collect=F,o.drop=j,o.each=N,o.extend=C,o.methods=V,o.object=function(n,r){var t=-1,e=n?n.length:0,u={};for(r||!e||it(n[0])||(r=[]);++t<e;){var o=n[t];r?u[o]=r[t]:o&&(u[o[0]]=o[1])}return u},o.select=k,o.tail=j,o.unique=A,o.clone=function(n){return J(n)?it(n)?x(n):C({},n):n},o.contains=E,o.escape=function(n){return null==n?"":(n+"").replace(sr,t)
|
||||
},o.every=O,o.find=S,o.has=function(n,r){return n?zr.call(n,r):false},o.identity=Y,o.indexOf=w,o.isArguments=b,o.isArray=it,o.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&$r.call(n)==mr||false},o.isDate=function(n){return n&&typeof n=="object"&&$r.call(n)==_r||false},o.isElement=function(n){return n&&1===n.nodeType||false},o.isEmpty=G,o.isEqual=function(n,r){return g(n,r)},o.isFinite=function(n){return Hr(n)&&!Jr(parseFloat(n))},o.isFunction=H,o.isNaN=function(n){return K(n)&&n!=+n},o.isNull=function(n){return null===n
|
||||
},o.isNumber=K,o.isObject=J,o.isRegExp=function(n){var r=typeof n;return n&&("function"==r||"object"==r)&&$r.call(n)==wr||false},o.isString=L,o.isUndefined=function(n){return typeof n=="undefined"},o.lastIndexOf=function(n,r,t){var e=n?n.length:0;for(typeof t=="number"&&(e=(0>t?Lr(0,e+t):Qr(t,e-1))+1);e--;)if(n[e]===r)return e;return-1},o.mixin=nr,o.noConflict=function(){return Or._=Rr,this},o.random=function(n,r){return null==n&&null==r&&(r=1),n=+n||0,null==r?(r=n,n=0):r=+r||0,n+Dr(Yr()*(r-n+1))},o.reduce=R,o.reduceRight=$,o.result=function(n,r,t){return null==n?t:(t="undefined"!=typeof n[r]?n[r]:t,H(t)?n[r]():t)
|
||||
},o.size=function(n){var r=n?n.length:0;return typeof r=="number"?r:ft(n).length},o.some=M,o.sortedIndex=T,o.template=function(n,r,t){var u=o,i=u.templateSettings;n=(n||"")+"",t=P({},t,i);var f=0,a="__p+='",i=t.variable;n.replace(RegExp((t.escape||gr).source+"|"+(t.interpolate||gr).source+"|"+(t.evaluate||gr).source+"|$","g"),function(r,t,u,o,i){return a+=n.slice(f,i).replace(vr,e),t&&(a+="'+_.escape("+t+")+'"),o&&(a+="';"+o+";\n__p+='"),u&&(a+="'+((__t=("+u+"))==null?'':__t)+'"),f=i+r.length,r}),a+="';",i||(i="obj",a="with("+i+"||{}){"+a+"}"),a="function("+i+"){var __t,__p='',__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+a+"return __p}";
|
||||
try{var c=Function("_","return "+a)(u)}catch(l){throw l.source=a,l}return r?c(r):(c.source=a,c)},o.unescape=function(n){return null==n?"":(n+="",0>n.indexOf(";")?n:n.replace(pr,u))},o.uniqueId=function(n){var r=++er+"";return n?n+r:r},o.all=O,o.any=M,o.detect=S,o.findWhere=function(n,r){return D(n,r,true)},o.foldl=R,o.foldr=$,o.include=E,o.inject=R,o.first=d,o.last=function(n,r,t){var e=0,u=n?n.length:0;if(typeof r!="number"&&null!=r){var o=u;for(r=X(r,t,3);o--&&r(n[o],o,n);)e++}else if(e=r,null==e||t)return n?n[u-1]:tr;
|
||||
return e=u-e,x(n,0<e?e:0)},o.sample=function(n,r,t){return n&&typeof n.length!="number"&&(n=Q(n)),null==r||t?n?n[0+Dr(Yr()*(n.length-1-0+1))]:tr:(n=I(n),n.length=Qr(Lr(0,r),n.length),n)},o.take=d,o.head=d,nr(C({},o)),o.VERSION="2.4.1",o.prototype.chain=function(){return this.__chain__=true,this},o.prototype.value=function(){return this.__wrapped__},N("pop push reverse shift sort splice unshift".split(" "),function(n){var r=Fr[n];o.prototype[n]=function(){var n=this.__wrapped__;return r.apply(n,arguments),Zr.spliceObjects||0!==n.length||delete n[0],this
|
||||
}}),N(["concat","join","slice"],function(n){var r=Fr[n];o.prototype[n]=function(){var n=r.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new i(n),n.__chain__=true),n}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Or._=o, define(function(){return o})):kr&&Nr?qr?(Nr.exports=o)._=o:kr._=o:Or._=o}).call(this);
|
||||
;(function(){function n(n){var r=[];if(!L(n))return r;for(var t in n)Pr.call(n,t)&&r.push(t);return r}function r(n,r){if(L(n))for(var t in n)if(r(n[t],t,n)===ir)break}function t(n,r,t){t=(t||0)-1;for(var e=n?n.length:0;++t<e;)if(n[t]===r)return t;return-1}function e(n,r){var t;n:{t=n.f;var e=r.f;if(t!==e){if(t>e||typeof t=="undefined"){t=1;break n}if(t<e||typeof e=="undefined"){t=-1;break n}}t=0}return t||n.g-r.g}function u(n){return Ar[n]}function o(n){return"\\"+Sr[n]}function i(n){return Er[n]}function f(n){return n instanceof f?n:new a(n)
|
||||
}function a(n,r){this.__chain__=!!r,this.__wrapped__=n}function c(n){function r(){if(e){var n=E(e);Ur.apply(n,arguments)}if(this instanceof r){var o=l(t.prototype),n=t.apply(o,n||arguments);return L(n)?n:o}return t.apply(u,n||arguments)}var t=n[0],e=n[2],u=n[4];return r}function l(n){return L(n)?Hr(n):{}}function p(n,r,t){if(typeof n!="function")return nr;if(typeof r=="undefined"||!("prototype"in n))return n;switch(t){case 1:return function(t){return n.call(r,t)};case 2:return function(t,e){return n.call(r,t,e)
|
||||
};case 3:return function(t,e,u){return n.call(r,t,e,u)};case 4:return function(t,e,u,o){return n.call(r,t,e,u,o)}}return P(n,r)}function s(n){function r(){var n=a?i:this;if(u){var v=E(u);Ur.apply(v,arguments)}return(o||p)&&(v||(v=E(arguments)),o&&Ur.apply(v,o),p&&v.length<f)?(e|=pr,e&=~sr,s([t,g?e:e&~(fr|ar),v,null,i,f])):(v||(v=arguments),c&&(t=n[h]),this instanceof r?(n=l(t.prototype),v=t.apply(n,v),L(v)?v:n):t.apply(n,v))}var t=n[0],e=n[1],u=n[2],o=n[3],i=n[4],f=n[5],a=e&fr,c=e&ar,p=e&cr,g=e&lr,h=t;
|
||||
return r}function g(n,r){for(var t=-1,e=d(),u=n?n.length:0,o=[];++t<u;){var i=n[t];0>e(r,i)&&o.push(i)}return o}function h(n,r){var t=-1,e=n?n.length:0;if(typeof e=="number")for(;++t<e&&r(n[t],t,n)!==ir;);else for(var t=-1,e=ft(n),u=e.length;++t<u;){var o=e[t];if(r(n[o],o,n)===ir)break}}function v(n,r,t,e){e=(e||0)-1;for(var u=n?n.length:0,o=[];++e<u;){var i=n[e];if(i&&typeof i=="object"&&typeof i.length=="number"&&(it(i)||j(i))){r||(i=v(i,r,t));var f=-1,a=i.length,c=o.length;for(o.length+=a;++f<a;)o[c++]=i[f]
|
||||
}else t||o.push(i)}return o}function y(n,t,e,u){if(n===t)return 0!==n||1/n==1/t;var o=typeof n,i=typeof t;if(n===n&&(!n||"function"!=o&&"object"!=o)&&(!t||"function"!=i&&"object"!=i))return false;if(null==n||null==t)return n===t;if(i=Mr.call(n),o=Mr.call(t),i!=o)return false;switch(i){case br:case dr:return+n==+t;case wr:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case xr:case Tr:return n==t+""}if(o=i==_r,!o){var a=n instanceof f,c=t instanceof f;if(a||c)return y(a?n.__wrapped__:n,c?t.__wrapped__:t,e,u);if(i!=jr)return false;
|
||||
if(i=Pr.call(n,"constructor"),a=Pr.call(t,"constructor"),i!==a||!i&&(i=n.constructor,a=t.constructor,i!=a&&!(K(i)&&i instanceof i&&K(a)&&a instanceof a)&&"constructor"in n&&"constructor"in t))return false}for(e||(e=[]),u||(u=[]),i=e.length;i--;)if(e[i]==n)return u[i]==t;var l=true,p=0;if(e.push(n),u.push(t),o){if(p=t.length,l=p==n.length)for(;p--&&(l=y(n[p],t[p],e,u)););}else r(t,function(r,t,o){return Pr.call(o,t)?(p++,!(l=Pr.call(n,t)&&y(n[t],r,e,u))&&ir):void 0}),l&&r(n,function(n,r,t){return Pr.call(t,r)?!(l=-1<--p)&&ir:void 0
|
||||
});return e.pop(),u.pop(),l}function m(n,r,t){for(var e=-1,u=d(),o=n?n.length:0,i=[],f=t?[]:i;++e<o;){var a=n[e],c=t?t(a,e,n):a;(r?!e||f[f.length-1]!==c:0>u(f,c))&&(t&&f.push(c),i.push(a))}return i}function _(n){return function(r,t,e){var u={};t=Z(t,e,3),e=-1;var o=r?r.length:0;if(typeof o=="number")for(;++e<o;){var i=r[e];n(u,i,t(i,e,r),r)}else h(r,function(r,e,o){n(u,r,t(r,e,o),o)});return u}}function b(n,r,t,e,u){var o=r&pr,i=r&sr;if(!(r&ar||K(n)))throw new TypeError;return o&&!t.length&&(r&=-17,t=false),i&&!e.length&&(r&=-33,e=false),(r==fr||r==(fr|pr)?c:s)([n,r,t,e,u,void 0])
|
||||
}function d(){var n=(n=f.indexOf)===T?t:n;return n}function w(n){return typeof n=="function"&&Dr.test(Cr.call(n))}function j(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Mr.call(n)==mr||false}function x(n,r,t){var e=0,u=n?n.length:0;if(typeof r!="number"&&null!=r){var o=-1;for(r=Z(r,t,3);++o<u&&r(n[o],o,n);)e++}else if(e=r,null==e||t)return n?n[0]:ur;return E(n,0,0<e?e:0)}function T(n,r,e){var u=n?n.length:0;if(typeof e=="number")e=0>e?Xr(0,u+e):e||0;else if(e)return e=O(n,r),u&&n[e]===r?e:-1;
|
||||
return t(n,r,e)}function A(n,r,t){if(typeof r!="number"&&null!=r){var e=0,u=-1,o=n?n.length:0;for(r=Z(r,t,3);++u<o&&r(n[u],u,n);)e++}else e=null==r||t?1:0<r?r:0;return E(n,e)}function E(n,r,t){var e=-1,u=n?n.length:0;for(typeof r=="undefined"?r=0:0>r?r=Xr(u+r,0):r>u&&(r=u),typeof t=="undefined"?t=u:0>t?t=Xr(u+t,0):t>u&&(t=u),u=t-r||0,t=Array(u);++e<u;)t[e]=n[r+e];return t}function O(n,r,t,e){var u=0,o=n?n.length:u;for(t=t?Z(t,e,1):nr,r=t(r);u<o;)e=u+o>>>1,t(n[e])<r?u=e+1:o=e;return u}function S(n,r,t,e){var u=typeof r;
|
||||
return"boolean"!=u&&null!=r&&(e=t,t=r,r=false,"number"!=u&&"string"!=u||!e||e[t]!==n||(t=null)),null!=t&&(t=Z(t,e,3)),m(n,r,t)}function k(n,r){var t=d(),e=n?n.length:0,u=false;return e&&typeof e=="number"?u=-1<t(n,r):h(n,function(n){return(u=n===r)&&ir}),u}function N(n,r,t){var e=true;r=Z(r,t,3),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++t<u&&(e=!!r(n[t],t,n)););else h(n,function(n,t,u){return!(e=!!r(n,t,u))&&ir});return e}function q(n,r,t){var e=[];r=Z(r,t,3),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++t<u;){var o=n[t];
|
||||
r(o,t,n)&&e.push(o)}else h(n,function(n,t,u){r(n,t,u)&&e.push(n)});return e}function F(n,r,t){r=Z(r,t,3),t=-1;var e=n?n.length:0;if(typeof e!="number"){var u;return h(n,function(n,t,e){return r(n,t,e)?(u=n,ir):void 0}),u}for(;++t<e;){var o=n[t];if(r(o,t,n))return o}}function B(n,r,t){var e=-1,u=n?n.length:0;if(r=r&&typeof t=="undefined"?r:p(r,t,3),typeof u=="number")for(;++e<u&&r(n[e],e,n)!==ir;);else h(n,r)}function R(n,r){var t=n?n.length:0;if(typeof t=="number")for(;t--&&false!==r(n[t],t,n););else{var e=ft(n),t=e.length;
|
||||
h(n,function(n,u,o){return u=e?e[--t]:--t,false===r(o[u],u,o)&&ir})}}function $(n,r,t){var e=-1,u=n?n.length:0;if(r=Z(r,t,3),typeof u=="number")for(var o=Array(u);++e<u;)o[e]=r(n[e],e,n);else o=[],h(n,function(n,t,u){o[++e]=r(n,t,u)});return o}function I(n,r,t){var e=-1/0,u=e,o=typeof r;"number"!=o&&"string"!=o||!t||t[r]!==n||(r=null);var o=-1,i=n?n.length:0;if(null==r&&typeof i=="number")for(;++o<i;)t=n[o],t>u&&(u=t);else r=Z(r,t,3),h(n,function(n,t,o){t=r(n,t,o),t>e&&(e=t,u=n)});return u}function M(n,r,t,e){var u=3>arguments.length;
|
||||
r=Z(r,e,4);var o=-1,i=n?n.length:0;if(typeof i=="number")for(u&&i&&(t=n[++o]);++o<i;)t=r(t,n[o],o,n);else h(n,function(n,e,o){t=u?(u=false,n):r(t,n,e,o)});return t}function D(n,r,t,e){var u=3>arguments.length;return r=Z(r,e,4),R(n,function(n,e,o){t=u?(u=false,n):r(t,n,e,o)}),t}function W(n){var r=-1,t=n?n.length:0,e=Array(typeof t=="number"?t:0);return h(n,function(n){var t;t=++r,t=0+zr(nt()*(t-0+1)),e[r]=e[t],e[t]=n}),e}function z(n,r,t){var e;r=Z(r,t,3),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++t<u&&!(e=r(n[t],t,n)););else h(n,function(n,t,u){return(e=r(n,t,u))&&ir
|
||||
});return!!e}function C(n,r,t){return t&&J(r)?ur:(t?F:q)(n,r)}function P(n,r){return 2<arguments.length?b(n,fr|pr,E(arguments,2),null,r):b(n,fr,null,null,r)}function U(n,r,t){function e(){l&&clearTimeout(l),i=l=p=ur,(h||g!==r)&&(s=at(),f=n.apply(c,o),l||i||(o=c=null))}function u(){var t=r-(at()-a);0<t?l=setTimeout(u,t):(i&&clearTimeout(i),t=p,i=l=p=ur,t&&(s=at(),f=n.apply(c,o),l||i||(o=c=null)))}var o,i,f,a,c,l,p,s=0,g=false,h=true;if(!K(n))throw new TypeError;if(r=Xr(0,r)||0,true===t)var v=true,h=false;else L(t)&&(v=t.leading,g="maxWait"in t&&(Xr(r,t.maxWait)||0),h="trailing"in t?t.trailing:h);
|
||||
return function(){if(o=arguments,a=at(),c=this,p=h&&(l||!v),false===g)var t=v&&!l;else{i||v||(s=a);var y=g-(a-s),m=0>=y;m?(i&&(i=clearTimeout(i)),s=a,f=n.apply(c,o)):i||(i=setTimeout(e,y))}return m&&l?l=clearTimeout(l):l||r===g||(l=setTimeout(u,r)),t&&(m=true,f=n.apply(c,o)),!m||l||i||(o=c=null),f}}function V(n,r,t){if(!n)return n;var e=arguments,u=0,o=e.length,i=typeof t;for("number"!=i&&"string"!=i||!e[3]||e[3][t]!==r||(o=2);++u<o;)if(r=e[u])for(var f in r)n[f]=r[f];return n}function G(n,r,t){if(!n)return n;
|
||||
var e=arguments,u=0,o=e.length,i=typeof t;for("number"!=i&&"string"!=i||!e[3]||e[3][t]!==r||(o=2);++u<o;)if(r=e[u])for(var f in r)"undefined"==typeof n[f]&&(n[f]=r[f]);return n}function H(n){var t=[];return r(n,function(n,r){K(n)&&t.push(r)}),t.sort()}function J(n){if(!n)return true;if(it(n)||X(n))return!n.length;for(var r in n)if(Pr.call(n,r))return false;return true}function K(n){return typeof n=="function"}function L(n){var r=typeof n;return n&&("function"==r||"object"==r)||false}function Q(n){var r=typeof n;
|
||||
return"number"==r||n&&"object"==r&&Mr.call(n)==wr||false}function X(n){return typeof n=="string"||n&&typeof n=="object"&&Mr.call(n)==Tr||false}function Y(n){for(var r=-1,t=ft(n),e=t.length,u=Array(e);++r<e;)u[r]=n[t[r]];return u}function Z(n,r,t){var e=typeof n;return null==n||"function"==e?p(n,r,t):"object"!=e?er(n):rr(n)}function nr(n){return n}function rr(n){n||(n={});var r=ft(n);return function(t){for(var e=r.length,u=false;e--&&(u=t[r[e]]===n[r[e]]););return u}}function tr(n){for(var r=-1,t=H(n),e=t.length;++r<e;){var u=t[r];
|
||||
f.prototype[u]=function(){var r=f[u]=n[u];return function(){var n=[this.__wrapped__];return Ur.apply(n,arguments),n=r.apply(f,n),this.__chain__?new a(n,true):n}}()}}function er(n){return function(r){return r[n]}}var ur,or=0,ir="__lodash_break_1335248838000__",fr=1,ar=2,cr=4,lr=8,pr=16,sr=32,gr=/&(?:amp|lt|gt|quot|#x27);/g,hr=/[&<>"']/g,vr=/($^)/,yr=/['\n\r\t\u2028\u2029\\]/g,mr="[object Arguments]",_r="[object Array]",br="[object Boolean]",dr="[object Date]",wr="[object Number]",jr="[object Object]",xr="[object RegExp]",Tr="[object String]",Ar={"&":"&","<":"<",">":">",'"':""","'":"'"},Er={"&":"&","<":"<",">":">",""":'"',"'":"'"},Or={"function":true,object:true},Sr={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},kr=Or[typeof window]&&window||this,Nr=Or[typeof exports]&&exports&&!exports.nodeType&&exports,qr=Or[typeof global]&&global;
|
||||
!qr||qr.global!==qr&&qr.window!==qr||(kr=qr);var Fr=Or[typeof module]&&module&&!module.nodeType&&module,Br=Fr&&Fr.exports===Nr&&Nr,Rr=Array.prototype,$r=Object.prototype,Ir=kr._,Mr=$r.toString,Dr=RegExp("^"+(Mr+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Wr=Math.ceil,zr=Math.floor,Cr=Function.prototype.toString,Pr=$r.hasOwnProperty,Ur=Rr.push,Vr=$r.propertyIsEnumerable,Gr=Rr.splice,Hr=w(Hr=Object.create)&&Hr,Jr=w(Jr=Array.isArray)&&Jr,Kr=kr.isFinite,Lr=kr.isNaN,Qr=w(Qr=Object.keys)&&Qr,Xr=Math.max,Yr=Math.min,Zr=w(Zr=Date.now)&&Zr,nt=Math.random;
|
||||
a.prototype=f.prototype;var rt={};!function(){var n={0:1,length:1};rt.spliceObjects=(Gr.call(n,0,1),!n[0])}(1),f.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},Hr||(l=function(){function n(){}return function(r){if(L(r)){n.prototype=r;var t=new n;n.prototype=null}return t||kr.Object()}}()),j(arguments)||(j=function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Pr.call(n,"callee")&&!Vr.call(n,"callee")||false});var tt=_(function(n,r,t){Pr.call(n,t)?n[t]++:n[t]=1
|
||||
}),et=_(function(n,r,t){Pr.call(n,t)?n[t].push(r):n[t]=[r]}),ut=_(function(n,r,t){n[t]=r}),ot=$,it=Jr||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Mr.call(n)==_r||false};K(/x/)&&(K=function(n){return typeof n=="function"&&"[object Function]"==Mr.call(n)});var ft=Qr?function(n){return L(n)?Qr(n):[]}:n,at=Zr||function(){return(new Date).getTime()};f.after=function(n,r){if(!K(r))throw new TypeError;return function(){return 1>--n?r.apply(this,arguments):void 0}},f.bind=P,f.bindAll=function(n){for(var r=1<arguments.length?v(arguments,true,false,1):H(n),t=-1,e=r.length;++t<e;){var u=r[t];
|
||||
n[u]=b(n[u],fr,null,null,n)}return n},f.chain=function(n){return n=new a(n),n.__chain__=true,n},f.compact=function(n){for(var r=-1,t=n?n.length:0,e=0,u=[];++r<t;){var o=n[r];o&&(u[e++]=o)}return u},f.compose=function(){for(var n=arguments,r=n.length;r--;)if(!K(n[r]))throw new TypeError;return function(){for(var r=arguments,t=n.length;t--;)r=[n[t].apply(this,r)];return r[0]}},f.countBy=tt,f.debounce=U,f.defaults=G,f.defer=function(n){if(!K(n))throw new TypeError;var r=E(arguments,1);return setTimeout(function(){n.apply(ur,r)
|
||||
},1)},f.delay=function(n,r){if(!K(n))throw new TypeError;var t=E(arguments,2);return setTimeout(function(){n.apply(ur,t)},r)},f.difference=function(n){return g(n,v(arguments,true,true,1))},f.filter=q,f.flatten=function(n,r){return v(n,r)},f.forEach=B,f.functions=H,f.groupBy=et,f.indexBy=ut,f.initial=function(n,r,t){var e=0,u=n?n.length:0;if(typeof r!="number"&&null!=r){var o=u;for(r=Z(r,t,3);o--&&r(n[o],o,n);)e++}else e=null==r||t?1:r||e;return e=u-e,E(n,0,0<e?e:0)},f.intersection=function(){for(var n=[],r=-1,t=arguments.length;++r<t;){var e=arguments[r];
|
||||
(it(e)||j(e))&&n.push(e)}var u=n[0],o=-1,i=d(),f=u?u.length:0,a=[];n:for(;++o<f;)if(e=u[o],0>i(a,e)){for(r=t;--r;)if(0>i(n[r],e))continue n;a.push(e)}return a},f.invert=function(n){for(var r=-1,t=ft(n),e=t.length,u={};++r<e;){var o=t[r];u[n[o]]=o}return u},f.invoke=function(n,r){var t=E(arguments,2),e=-1,u=typeof r=="function",o=n?n.length:0,i=Array(typeof o=="number"?o:0);return h(n,function(n){i[++e]=(u?r:n[r]).apply(n,t)}),i},f.keys=ft,f.map=$,f.max=I,f.memoize=function(n,r){var t={};return function(){var e=r?r.apply(this,arguments):"_"+arguments[0];
|
||||
return Pr.call(t,e)?t[e]:t[e]=n.apply(this,arguments)}},f.min=function(n,r,t){var e=1/0,u=e,o=typeof r;"number"!=o&&"string"!=o||!t||t[r]!==n||(r=null);var o=-1,i=n?n.length:0;if(null==r&&typeof i=="number")for(;++o<i;)t=n[o],t<u&&(u=t);else r=Z(r,t,3),h(n,function(n,t,o){t=r(n,t,o),t<e&&(e=t,u=n)});return u},f.omit=function(n){var t=[];r(n,function(n,r){t.push(r)});for(var t=g(t,v(arguments,true,false,1)),e=-1,u=t.length,o={};++e<u;){var i=t[e];o[i]=n[i]}return o},f.once=function(n){var r,t;if(!K(n))throw new TypeError;
|
||||
return function(){return r?t:(r=true,t=n.apply(this,arguments),n=null,t)}},f.pairs=function(n){for(var r=-1,t=ft(n),e=t.length,u=Array(e);++r<e;){var o=t[r];u[r]=[o,n[o]]}return u},f.partial=function(n){return b(n,pr,E(arguments,1))},f.pick=function(n){for(var r=-1,t=v(arguments,true,false,1),e=t.length,u={};++r<e;){var o=t[r];o in n&&(u[o]=n[o])}return u},f.pluck=ot,f.range=function(n,r,t){n=+n||0,t=+t||1,null==r&&(r=n,n=0);var e=-1;r=Xr(0,Wr((r-n)/t));for(var u=Array(r);++e<r;)u[e]=n,n+=t;return u},f.reject=function(n,r,t){return r=Z(r,t,3),q(n,function(n,t,e){return!r(n,t,e)
|
||||
})},f.rest=A,f.shuffle=W,f.sortBy=function(n,r,t){var u=-1,o=n?n.length:0,i=Array(typeof o=="number"?o:0);for(r=Z(r,t,3),B(n,function(n,t,e){i[++u]={f:r(n,t,e),g:u,h:n}}),o=i.length,i.sort(e);o--;)i[o]=i[o].h;return i},f.tap=function(n,r){return r(n),n},f.throttle=function(n,r,t){var e=true,u=true;if(!K(n))throw new TypeError;return false===t?e=false:L(t)&&(e="leading"in t?t.leading:e,u="trailing"in t?t.trailing:u),t={},t.leading=e,t.maxWait=r,t.trailing=u,U(n,r,t)},f.times=function(n,r,t){n=-1<(n=+n)?n:0;var e=-1,u=Array(n);
|
||||
for(r=p(r,t,1);++e<n;)u[e]=r(e);return u},f.toArray=function(n){return it(n)?E(n):n&&typeof n.length=="number"?$(n):Y(n)},f.union=function(){return m(v(arguments,true,true))},f.uniq=S,f.values=Y,f.where=C,f.without=function(n){return g(n,E(arguments,1))},f.wrap=function(n,r){return b(r,pr,[n])},f.zip=function(){for(var n=-1,r=I(ot(arguments,"length")),t=Array(0>r?0:r);++n<r;)t[n]=ot(arguments,n);return t},f.collect=$,f.drop=A,f.each=B,f.extend=V,f.methods=H,f.object=function(n,r){var t=-1,e=n?n.length:0,u={};
|
||||
for(r||!e||it(n[0])||(r=[]);++t<e;){var o=n[t];r?u[o]=r[t]:o&&(u[o[0]]=o[1])}return u},f.select=q,f.tail=A,f.unique=S,f.clone=function(n){return L(n)?it(n)?E(n):V({},n):n},f.contains=k,f.escape=function(n){return null==n?"":(n+"").replace(hr,u)},f.every=N,f.find=F,f.has=function(n,r){return n?Pr.call(n,r):false},f.identity=nr,f.indexOf=T,f.isArguments=j,f.isArray=it,f.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&Mr.call(n)==br||false},f.isDate=function(n){return n&&typeof n=="object"&&Mr.call(n)==dr||false
|
||||
},f.isElement=function(n){return n&&1===n.nodeType||false},f.isEmpty=J,f.isEqual=function(n,r){return y(n,r)},f.isFinite=function(n){return Kr(n)&&!Lr(parseFloat(n))},f.isFunction=K,f.isNaN=function(n){return Q(n)&&n!=+n},f.isNull=function(n){return null===n},f.isNumber=Q,f.isObject=L,f.isRegExp=function(n){var r=typeof n;return n&&("function"==r||"object"==r)&&Mr.call(n)==xr||false},f.isString=X,f.isUndefined=function(n){return typeof n=="undefined"},f.lastIndexOf=function(n,r,t){var e=n?n.length:0;for(typeof t=="number"&&(e=(0>t?Xr(0,e+t):Yr(t,e-1))+1);e--;)if(n[e]===r)return e;
|
||||
return-1},f.mixin=tr,f.noConflict=function(){return kr._=Ir,this},f.random=function(n,r){return null==n&&null==r&&(r=1),n=+n||0,null==r?(r=n,n=0):r=+r||0,n+zr(nt()*(r-n+1))},f.reduce=M,f.reduceRight=D,f.result=function(n,r,t){return null==n?t:(t="undefined"!=typeof n[r]?n[r]:t,K(t)?n[r]():t)},f.size=function(n){var r=n?n.length:0;return typeof r=="number"?r:ft(n).length},f.some=z,f.sortedIndex=O,f.template=function(n,r,t){var e=f,u=e.templateSettings;n=(n||"")+"",t=G({},t,u);var i=0,a="__p+='",u=t.variable;
|
||||
n.replace(RegExp((t.escape||vr).source+"|"+(t.interpolate||vr).source+"|"+(t.evaluate||vr).source+"|$","g"),function(r,t,e,u,f){return a+=n.slice(i,f).replace(yr,o),t&&(a+="'+_.escape("+t+")+'"),u&&(a+="';"+u+";\n__p+='"),e&&(a+="'+((__t=("+e+"))==null?'':__t)+'"),i=f+r.length,r}),a+="';",u||(u="obj",a="with("+u+"||{}){"+a+"}"),a="function("+u+"){var __t,__p='',__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+a+"return __p}";try{var c=Function("_","return "+a)(e)}catch(l){throw l.source=a,l
|
||||
}return r?c(r):(c.source=a,c)},f.unescape=function(n){return null==n?"":(n+="",0>n.indexOf(";")?n:n.replace(gr,i))},f.uniqueId=function(n){var r=++or+"";return n?n+r:r},f.all=N,f.any=z,f.detect=F,f.findWhere=function(n,r){return C(n,r,true)},f.foldl=M,f.foldr=D,f.include=k,f.inject=M,f.first=x,f.last=function(n,r,t){var e=0,u=n?n.length:0;if(typeof r!="number"&&null!=r){var o=u;for(r=Z(r,t,3);o--&&r(n[o],o,n);)e++}else if(e=r,null==e||t)return n?n[u-1]:ur;return e=u-e,E(n,0<e?e:0)},f.sample=function(n,r,t){return n&&typeof n.length!="number"&&(n=Y(n)),null==r||t?n?n[0+zr(nt()*(n.length-1-0+1))]:ur:(n=W(n),n.length=Yr(Xr(0,r),n.length),n)
|
||||
},f.take=x,f.head=x,tr(V({},f)),f.VERSION="2.4.1",f.prototype.chain=function(){return this.__chain__=true,this},f.prototype.value=function(){return this.__wrapped__},h("pop push reverse shift sort splice unshift".split(" "),function(n){var r=Rr[n];f.prototype[n]=function(){var n=this.__wrapped__;return r.apply(n,arguments),rt.spliceObjects||0!==n.length||delete n[0],this}}),h(["concat","join","slice"],function(n){var r=Rr[n];f.prototype[n]=function(){var n=r.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new a(n),n.__chain__=true),n
|
||||
}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(kr._=f, define(function(){return f})):Nr&&Fr?Br?(Fr.exports=f)._=f:Nr._=f:kr._=f}).call(this);
|
||||
135
lodash.js
135
lodash.js
@@ -986,10 +986,7 @@
|
||||
// exit early if the first argument is not an object
|
||||
"if (!isObject(object)) {\n" +
|
||||
' return result;\n' +
|
||||
'}\n' +
|
||||
|
||||
// add code before the iteration branches
|
||||
'<%= top %>;' +
|
||||
'}' +
|
||||
|
||||
// add support for iterating over `arguments` objects if needed
|
||||
'<% if (support.nonEnumArgs) { %>\n' +
|
||||
@@ -1173,7 +1170,7 @@
|
||||
stackB.push(result);
|
||||
|
||||
// recursively populate clone (susceptible to call stack limits)
|
||||
(isArr ? baseEach : forOwn)(value, function(objValue, key) {
|
||||
(isArr ? baseEach : baseForOwn)(value, function(objValue, key) {
|
||||
result[key] = baseClone(objValue, isDeep, callback, stackA, stackB);
|
||||
});
|
||||
|
||||
@@ -1350,24 +1347,19 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* Iterates `arguments` objects, arrays, objects, and strings consistently
|
||||
* across environments, executing the callback for each element in the
|
||||
* collection. The callback is bound to `thisArg` and invoked with three
|
||||
* arguments; (value, index|key, collection). Callbacks may exit iteration
|
||||
* early by explicitly returning `false`.
|
||||
* The base implementation of `_.forEach` without support for callback
|
||||
* shorthands or `thisArg` binding.
|
||||
*
|
||||
* @private
|
||||
* @param {Array|Object|string} collection The collection to iterate over.
|
||||
* @param {Function} [callback=identity] The function called per iteration.
|
||||
* @param {*} [thisArg] The `this` binding of `callback`.
|
||||
* @param {Function} callback The function called per iteration.
|
||||
* @returns {Array|Object|string} Returns `collection`.
|
||||
*/
|
||||
function baseEach(collection, callback, thisArg) {
|
||||
function baseEach(collection, callback) {
|
||||
var index = -1,
|
||||
iterable = collection,
|
||||
length = collection ? collection.length : 0;
|
||||
|
||||
callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3);
|
||||
if (typeof length == 'number') {
|
||||
if (support.unindexedChars && isString(iterable)) {
|
||||
iterable = iterable.split('');
|
||||
@@ -1378,7 +1370,7 @@
|
||||
}
|
||||
}
|
||||
} else {
|
||||
forOwn(collection, callback);
|
||||
baseForOwn(collection, callback);
|
||||
}
|
||||
return collection;
|
||||
}
|
||||
@@ -1423,6 +1415,29 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.forOwn` without support for callback
|
||||
* shorthands or `thisArg` binding.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} callback The function called per iteration.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function baseForOwn(object, callback) {
|
||||
var index = -1,
|
||||
props = keys(object),
|
||||
length = props.length;
|
||||
|
||||
while (++index < length) {
|
||||
var key = props[index];
|
||||
if (callback(object[key], key, object) === false) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return object;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.isEqual`, without support for `thisArg` binding,
|
||||
* that allows partial "_.where" style comparisons.
|
||||
@@ -1570,7 +1585,7 @@
|
||||
else {
|
||||
// deep compare objects using `forIn`, instead of `forOwn`, to avoid `Object.keys`
|
||||
// which, in this case, is more costly
|
||||
forIn(b, function(value, key, b) {
|
||||
baseForIn(b, function(value, key, b) {
|
||||
if (hasOwnProperty.call(b, key)) {
|
||||
// count the number of properties.
|
||||
size++;
|
||||
@@ -1581,7 +1596,7 @@
|
||||
|
||||
if (result && !isWhere) {
|
||||
// ensure both objects have the same number of properties
|
||||
forIn(a, function(value, key, a) {
|
||||
baseForIn(a, function(value, key, a) {
|
||||
if (hasOwnProperty.call(a, key)) {
|
||||
// `size` will be `-1` if `a` has more properties than `b`
|
||||
return (result = --size > -1);
|
||||
@@ -1611,7 +1626,7 @@
|
||||
* @param {Array} [stackB=[]] Associates values with source counterparts.
|
||||
*/
|
||||
function baseMerge(object, source, callback, stackA, stackB) {
|
||||
(isArray(source) ? forEach : forOwn)(source, function(source, key) {
|
||||
(isArray(source) ? baseEach : baseForOwn)(source, function(source, key) {
|
||||
var found,
|
||||
isArr,
|
||||
result = source,
|
||||
@@ -1857,7 +1872,6 @@
|
||||
* @param {Object} [options] The compile options object.
|
||||
* @param {string} [options.args] A comma separated string of iteration function arguments.
|
||||
* @param {string} [options.init] The string representation of the initial `result` value.
|
||||
* @param {string} [options.top] Code to execute before the iteration branches.
|
||||
* @param {string} [options.loop] Code to execute in the object loop.
|
||||
* @param {boolean} [options.useHas] Specify using `hasOwnProperty` checks in the object loop.
|
||||
* @returns {Function} Returns the compiled function.
|
||||
@@ -1868,15 +1882,15 @@
|
||||
|
||||
// create the function factory
|
||||
var factory = Function(
|
||||
'baseCreateCallback, errorClass, errorProto, hasOwnProperty, isArguments, ' +
|
||||
'isObject, objectProto, nonEnumProps, stringClass, stringProto, toString',
|
||||
'errorClass, errorProto, hasOwnProperty, isArguments, isObject, objectProto, ' +
|
||||
'nonEnumProps, stringClass, stringProto, toString',
|
||||
'return function(' + options.args + ') {\n' + iteratorTemplate(options) + '\n}'
|
||||
);
|
||||
|
||||
// return the compiled function
|
||||
return factory(
|
||||
baseCreateCallback, errorClass, errorProto, hasOwnProperty, isArguments,
|
||||
isObject, objectProto, nonEnumProps, stringClass, stringProto, toString
|
||||
errorClass, errorProto, hasOwnProperty, isArguments, isObject, objectProto,
|
||||
nonEnumProps, stringClass, stringProto, toString
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1942,7 +1956,7 @@
|
||||
// iterated property is an object's own property then there are no inherited
|
||||
// enumerable properties.
|
||||
if (support.ownLast) {
|
||||
forIn(value, function(value, key, object) {
|
||||
baseForIn(value, function(value, key, object) {
|
||||
result = hasOwnProperty.call(object, key);
|
||||
return false;
|
||||
});
|
||||
@@ -1951,7 +1965,7 @@
|
||||
// In most environments an object's own properties are iterated before
|
||||
// its inherited properties. If the last iterated property is an object's
|
||||
// own property then there are no inherited enumerable properties.
|
||||
forIn(value, function(value, key) {
|
||||
baseForIn(value, function(value, key) {
|
||||
result = key;
|
||||
});
|
||||
return typeof result == 'undefined' || hasOwnProperty.call(value, result);
|
||||
@@ -1987,6 +2001,22 @@
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.forIn` without support for callback
|
||||
* shorthands or `thisArg` binding.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} callback The function called per iteration.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
var baseForIn = createIterator({
|
||||
'args': 'object, callback',
|
||||
'init': 'object',
|
||||
'loop': 'if (callback(object[key], key, object) === false) {\n return result;\n }',
|
||||
'useHas': false
|
||||
});
|
||||
|
||||
/**
|
||||
* A fallback implementation of `Object.keys` which produces an array of the
|
||||
* given object's own enumerable property names.
|
||||
@@ -1999,7 +2029,6 @@
|
||||
var shimKeys = createIterator({
|
||||
'args': 'object',
|
||||
'init': '[]',
|
||||
'top': '',
|
||||
'loop': 'result.push(key)',
|
||||
'useHas': true
|
||||
});
|
||||
@@ -3620,7 +3649,7 @@
|
||||
}
|
||||
}
|
||||
} else {
|
||||
baseEach(collection, callback, thisArg);
|
||||
baseEach(collection, baseCreateCallback(callback, thisArg, 3));
|
||||
}
|
||||
return collection;
|
||||
}
|
||||
@@ -3783,7 +3812,7 @@
|
||||
length = collection ? collection.length : 0,
|
||||
result = Array(typeof length == 'number' ? length : 0);
|
||||
|
||||
forEach(collection, function(value) {
|
||||
baseEach(collection, function(value) {
|
||||
result[++index] = (isFunc ? methodName : value[methodName]).apply(value, args);
|
||||
});
|
||||
return result;
|
||||
@@ -4201,7 +4230,7 @@
|
||||
length = collection ? collection.length : 0,
|
||||
result = Array(typeof length == 'number' ? length : 0);
|
||||
|
||||
forEach(collection, function(value) {
|
||||
baseEach(collection, function(value) {
|
||||
var rand = baseRandom(0, ++index);
|
||||
result[index] = result[rand];
|
||||
result[rand] = value;
|
||||
@@ -4356,7 +4385,7 @@
|
||||
if (!multi) {
|
||||
callback = lodash.createCallback(callback, thisArg, 3);
|
||||
}
|
||||
forEach(collection, function(value, key, collection) {
|
||||
baseEach(collection, function(value, key, collection) {
|
||||
var object = result[++index] = getObject();
|
||||
object.index = index;
|
||||
object.value = value;
|
||||
@@ -5365,7 +5394,7 @@
|
||||
function findKey(object, callback, thisArg) {
|
||||
var result;
|
||||
callback = lodash.createCallback(callback, thisArg, 3);
|
||||
forOwn(object, function(value, key, object) {
|
||||
baseForOwn(object, function(value, key, object) {
|
||||
if (callback(value, key, object)) {
|
||||
result = key;
|
||||
return false;
|
||||
@@ -5458,13 +5487,10 @@
|
||||
* });
|
||||
* // => logs 'x', 'y', and 'move' (property order is not guaranteed across environments)
|
||||
*/
|
||||
var forIn = createIterator({
|
||||
'args': 'object, callback, thisArg',
|
||||
'init': 'object',
|
||||
'top': "callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3)",
|
||||
'loop': 'if (callback(object[key], key, object) === false) {\n return result;\n }',
|
||||
'useHas': false
|
||||
});
|
||||
function forIn(object, callback, thisArg) {
|
||||
callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3);
|
||||
return baseForIn(object, callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is like `_.forIn` except that it iterates over elements
|
||||
@@ -5497,7 +5523,7 @@
|
||||
function forInRight(object, callback, thisArg) {
|
||||
var pairs = [];
|
||||
|
||||
forIn(object, function(value, key) {
|
||||
baseForIn(object, function(value, key) {
|
||||
pairs.push(key, value);
|
||||
});
|
||||
|
||||
@@ -5532,18 +5558,8 @@
|
||||
* // => logs '0', '1', and 'length' (property order is not guaranteed across environments)
|
||||
*/
|
||||
function forOwn(object, callback, thisArg) {
|
||||
var index = -1,
|
||||
props = keys(object),
|
||||
length = props.length;
|
||||
|
||||
callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3);
|
||||
while (++index < length) {
|
||||
var key = props[index];
|
||||
if (callback(object[key], key, object) === false) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return object;
|
||||
return baseForOwn(object, callback);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -5595,7 +5611,7 @@
|
||||
*/
|
||||
function functions(object) {
|
||||
var result = [];
|
||||
forIn(object, function(value, key) {
|
||||
baseForIn(object, function(value, key) {
|
||||
if (isFunction(value)) {
|
||||
result.push(key);
|
||||
}
|
||||
@@ -5787,7 +5803,7 @@
|
||||
(className == objectClass && typeof length == 'number' && isFunction(value.splice))) {
|
||||
return !length;
|
||||
}
|
||||
forOwn(value, function() {
|
||||
baseForOwn(value, function() {
|
||||
return (result = false);
|
||||
});
|
||||
return result;
|
||||
@@ -6148,7 +6164,7 @@
|
||||
var result = {};
|
||||
callback = lodash.createCallback(callback, thisArg, 3);
|
||||
|
||||
forOwn(object, function(value, key, object) {
|
||||
baseForOwn(object, function(value, key, object) {
|
||||
result[key] = callback(value, key, object);
|
||||
});
|
||||
return result;
|
||||
@@ -6267,7 +6283,7 @@
|
||||
var result = {};
|
||||
if (typeof callback != 'function') {
|
||||
var props = [];
|
||||
forIn(object, function(value, key) {
|
||||
baseForIn(object, function(value, key) {
|
||||
props.push(key);
|
||||
});
|
||||
props = baseDifference(props, baseFlatten(arguments, true, false, 1));
|
||||
@@ -6281,7 +6297,7 @@
|
||||
}
|
||||
} else {
|
||||
callback = lodash.createCallback(callback, thisArg, 3);
|
||||
forIn(object, function(value, key, object) {
|
||||
baseForIn(object, function(value, key, object) {
|
||||
if (!callback(value, key, object)) {
|
||||
result[key] = value;
|
||||
}
|
||||
@@ -6359,7 +6375,7 @@
|
||||
}
|
||||
} else {
|
||||
callback = lodash.createCallback(callback, thisArg, 3);
|
||||
forIn(object, function(value, key, object) {
|
||||
baseForIn(object, function(value, key, object) {
|
||||
if (callback(value, key, object)) {
|
||||
result[key] = value;
|
||||
}
|
||||
@@ -6413,7 +6429,7 @@
|
||||
}
|
||||
if (callback) {
|
||||
callback = lodash.createCallback(callback, thisArg, 4);
|
||||
(isArr ? baseEach : forOwn)(object, function(value, index, object) {
|
||||
(isArr ? baseEach : baseForOwn)(object, function(value, index, object) {
|
||||
return callback(accumulator, value, index, object);
|
||||
});
|
||||
}
|
||||
@@ -7408,7 +7424,7 @@
|
||||
|
||||
mixin(function() {
|
||||
var source = {}
|
||||
forOwn(lodash, function(func, methodName) {
|
||||
baseForOwn(lodash, function(func, methodName) {
|
||||
if (!lodash.prototype[methodName]) {
|
||||
source[methodName] = func;
|
||||
}
|
||||
@@ -7427,7 +7443,7 @@
|
||||
lodash.take = first;
|
||||
lodash.head = first;
|
||||
|
||||
forOwn(lodash, function(func, methodName) {
|
||||
baseForOwn(lodash, function(func, methodName) {
|
||||
var callbackable = methodName !== 'sample';
|
||||
if (!lodash.prototype[methodName]) {
|
||||
lodash.prototype[methodName]= function(n, guard) {
|
||||
@@ -7511,6 +7527,7 @@
|
||||
}
|
||||
|
||||
// add pseudo private property to be used and removed during the build process
|
||||
lodash._baseForIn = baseForIn;
|
||||
lodash._iteratorTemplate = iteratorTemplate;
|
||||
lodash._shimKeys = shimKeys;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user