mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Adjust fromIndex and length coercions.
This commit is contained in:
44
dist/lodash.compat.js
vendored
44
dist/lodash.compat.js
vendored
@@ -274,7 +274,7 @@
|
||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||
*/
|
||||
function baseIndexOf(array, value, fromIndex) {
|
||||
var index = (fromIndex | 0) - 1,
|
||||
var index = (+fromIndex || 0) - 1,
|
||||
length = array ? array.length : 0;
|
||||
|
||||
while (++index < length) {
|
||||
@@ -1397,7 +1397,7 @@
|
||||
* @returns {Array} Returns the new flattened array.
|
||||
*/
|
||||
function baseFlatten(array, isShallow, isStrict, fromIndex) {
|
||||
var index = (fromIndex | 0) - 1,
|
||||
var index = (+fromIndex || 0) - 1,
|
||||
length = array ? array.length : 0,
|
||||
result = [];
|
||||
|
||||
@@ -2610,7 +2610,7 @@
|
||||
function indexOf(array, value, fromIndex) {
|
||||
var length = array ? array.length : 0;
|
||||
if (typeof fromIndex == 'number') {
|
||||
fromIndex = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex) | 0;
|
||||
fromIndex = fromIndex < 0 ? nativeMax(0, length + fromIndex) : (fromIndex || 0);
|
||||
} else if (fromIndex) {
|
||||
var index = sortedIndex(array, value);
|
||||
return (length && array[index] === value) ? index : -1;
|
||||
@@ -2913,13 +2913,13 @@
|
||||
var index = -1,
|
||||
length = array ? array.length : 0;
|
||||
|
||||
start |= 0;
|
||||
start = +start || 0;
|
||||
if (start < 0) {
|
||||
start = nativeMax(length + start, 0);
|
||||
} else if (start > length) {
|
||||
start = length;
|
||||
}
|
||||
end = typeof end == 'undefined' ? length : (end | 0);
|
||||
end = typeof end == 'undefined' ? length : (+end || 0);
|
||||
if (end < 0) {
|
||||
end = nativeMax(length + end, 0);
|
||||
} else if (end > length) {
|
||||
@@ -3539,10 +3539,10 @@
|
||||
* // => true
|
||||
*/
|
||||
function contains(collection, target, fromIndex) {
|
||||
var length = collection ? collection.length : 0;
|
||||
fromIndex = (typeof fromIndex == 'number' && fromIndex) | 0;
|
||||
var length = (length = collection && collection.length, length > -1 && length >>> 0);
|
||||
fromIndex = (typeof fromIndex == 'number' && +fromIndex) || 0;
|
||||
|
||||
if (typeof length == 'number' && length > -1) {
|
||||
if (length) {
|
||||
if (typeof collection == 'string' || !isArray(collection) && isString(collection)) {
|
||||
if (fromIndex >= length) {
|
||||
return false;
|
||||
@@ -3552,7 +3552,7 @@
|
||||
: collection.indexOf(target, fromIndex) > -1;
|
||||
}
|
||||
var indexOf = getIndexOf();
|
||||
fromIndex = fromIndex < 0 ? nativeMax(0, (length | 0) + fromIndex) : fromIndex;
|
||||
fromIndex = fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex;
|
||||
return indexOf(collection, target, fromIndex) > -1;
|
||||
}
|
||||
var index = -1,
|
||||
@@ -3997,8 +3997,8 @@
|
||||
var args = slice(arguments, 2),
|
||||
index = -1,
|
||||
isFunc = typeof methodName == 'function',
|
||||
length = (collection && collection.length) | 0,
|
||||
result = Array(length < 0 ? 0 : length);
|
||||
length = collection && collection.length,
|
||||
result = Array(length < 0 ? 0 : length >>> 0);
|
||||
|
||||
baseEach(collection, function(value) {
|
||||
result[++index] = (isFunc ? methodName : value[methodName]).apply(value, args);
|
||||
@@ -4047,8 +4047,8 @@
|
||||
*/
|
||||
function map(collection, callback, thisArg) {
|
||||
var index = -1,
|
||||
length = (collection && collection.length) | 0,
|
||||
result = Array(length < 0 ? 0 : length);
|
||||
length = collection && collection.length,
|
||||
result = Array(length < 0 ? 0 : length >>> 0);
|
||||
|
||||
callback = lodash.createCallback(callback, thisArg, 3);
|
||||
if (isArray(collection)) {
|
||||
@@ -4436,7 +4436,7 @@
|
||||
collection = collection.split('');
|
||||
}
|
||||
if (n == null || guard) {
|
||||
var length = (collection && collection.length) | 0;
|
||||
var length = (length = collection && collection.length, length > -1 && length >>> 0);
|
||||
return length > 0 ? collection[baseRandom(0, length - 1)] : undefined;
|
||||
}
|
||||
var result = shuffle(collection);
|
||||
@@ -4461,8 +4461,8 @@
|
||||
*/
|
||||
function shuffle(collection) {
|
||||
var index = -1,
|
||||
length = (collection && collection.length) | 0,
|
||||
result = Array(length < 0 ? 0 : length);
|
||||
length = collection && collection.length,
|
||||
result = Array(length < 0 ? 0 : length >>> 0);
|
||||
|
||||
baseEach(collection, function(value) {
|
||||
var rand = baseRandom(0, ++index);
|
||||
@@ -4612,9 +4612,9 @@
|
||||
*/
|
||||
function sortBy(collection, callback, thisArg) {
|
||||
var index = -1,
|
||||
length = (collection && collection.length) | 0,
|
||||
length = collection && collection.length,
|
||||
multi = callback && isArray(callback),
|
||||
result = Array(length < 0 ? 0 : length);
|
||||
result = Array(length < 0 ? 0 : length >>> 0);
|
||||
|
||||
if (!multi) {
|
||||
callback = lodash.createCallback(callback, thisArg, 3);
|
||||
@@ -6930,7 +6930,7 @@
|
||||
target = String(target);
|
||||
|
||||
var length = string.length;
|
||||
position = (typeof position == 'number' ? nativeMin(nativeMax(position | 0, 0), length) : length) - target.length;
|
||||
position = (typeof position == 'number' ? nativeMin(nativeMax(+position || 0, 0), length) : length) - target.length;
|
||||
return position >= 0 && string.indexOf(target, position) == position;
|
||||
}
|
||||
|
||||
@@ -7183,7 +7183,7 @@
|
||||
*/
|
||||
function startsWith(string, target, position) {
|
||||
string = string == null ? '' : String(string);
|
||||
position = typeof position == 'number' ? nativeMin(nativeMax(position | 0, 0), string.length) : 0;
|
||||
position = typeof position == 'number' ? nativeMin(nativeMax(+position || 0, 0), string.length) : 0;
|
||||
return string.lastIndexOf(target, position) == position;
|
||||
}
|
||||
|
||||
@@ -7489,11 +7489,11 @@
|
||||
|
||||
if (options && isObject(options)) {
|
||||
var separator = 'separator' in options ? options.separator : separator;
|
||||
length = 'length' in options ? options.length | 0 : length;
|
||||
length = 'length' in options ? +options.length || 0 : length;
|
||||
omission = 'omission' in options ? String(options.omission) : omission;
|
||||
}
|
||||
else if (options != null) {
|
||||
length = options | 0;
|
||||
length = +options || 0;
|
||||
}
|
||||
string = string == null ? '' : String(string);
|
||||
if (length >= string.length) {
|
||||
|
||||
34
dist/lodash.compat.min.js
vendored
34
dist/lodash.compat.min.js
vendored
@@ -3,7 +3,7 @@
|
||||
* Lo-Dash 2.4.1 (Custom Build) lodash.com/license | Underscore.js 1.6.0 underscorejs.org/LICENSE
|
||||
* Build: `lodash -o ./dist/lodash.compat.js`
|
||||
*/
|
||||
;(function(){function n(n,t){return typeof n=="undefined"?t:n}function t(n,t){if(n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1}return 0}function r(n,t,r){r=(0|r)-1;for(var e=n?n.length:0;++r<e;)if(n[r]===t)return r;return-1}function e(n,t){return n.has(t)?0:-1}function u(n){return n.charCodeAt(0)}function o(n,t){for(var r=-1,e=n.length;++r<e&&0<=t.indexOf(n.charAt(r)););return r}function a(n,t){for(var r=n.length;r--&&0<=t.indexOf(n.charAt(r)););return r}function i(n,r){return t(n.a,r.a)||n.b-r.b
|
||||
;(function(){function n(n,t){return typeof n=="undefined"?t:n}function t(n,t){if(n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1}return 0}function r(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 e(n,t){return n.has(t)?0:-1}function u(n){return n.charCodeAt(0)}function o(n,t){for(var r=-1,e=n.length;++r<e&&0<=t.indexOf(n.charAt(r)););return r}function a(n,t){for(var r=n.length;r--&&0<=t.indexOf(n.charAt(r)););return r}function i(n,r){return t(n.a,r.a)||n.b-r.b
|
||||
}function l(n,r){for(var e=n.a,u=r.a,o=-1,a=e.length;++o<a;){var i=t(e[o],u[o]);if(i)return i}return n.b-r.b}function f(n){return function(t){for(var r=-1,e=(t=null!=t&&(t+"").replace(U,c).match(X))?t.length:0,u="";++r<e;)u=n(u,t[r],r,t);return u}}function c(n){return ht[n]}function s(n){return st[n]}function p(n){return"\\"+vt[n]}function h(n){return typeof n.toString!="function"&&typeof(n+"")=="string"}function g(n,t){return(n=null==n?"":n+"")?null==t?n.slice(m(n),d(n)+1):(t+="",n.slice(o(n,t),a(n,t)+1)):n
|
||||
}function v(n,t){return(n=null==n?"":n+"")?null==t?n.slice(m(n)):(t+="",n.slice(o(n,t))):n}function y(n,t){return(n=null==n?"":n+"")?null==t?n.slice(0,d(n)+1):(t+="",n.slice(0,a(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 _(t){function o(n){return n&&typeof n=="object"&&!Ne(n)&&ne.call(n,"__wrapped__")?n:new a(n)}function a(n,t){this.__chain__=!!t,this.__wrapped__=n}function c(n){function t(){if(u){for(var n=-1,a=arguments.length,i=Ir(a);++n<a;)i[n]=arguments[n];i=kt(u,o,i)}return this instanceof t?(n=d(r.prototype),i=r.apply(n,i||arguments),vr(i)?i:n):r.apply(e,i||arguments)}var r=n[0],e=n[3],u=n[4],o=n[6];return Oe(t,n),t}function m(n,t,r,e,u){if(r){var o=r(n);if(typeof o!="undefined")return o
|
||||
@@ -11,7 +11,7 @@
|
||||
}),o):o}function d(n){return vr(n)?fe(n):{}}function U(n,t,r){if(typeof n!="function")return kr;if(typeof t=="undefined"||!("prototype"in n))return n;var e=n[S];if(typeof e=="undefined"&&(je.funcNames&&(e=!n.name),e=e||!je.funcDecomp,!e)){var u=Jr.call(n);je.funcNames||(e=!B.test(u)),e||(e=V.test(u),Oe(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 ur(n,t)}function X(n){function t(){for(var n=-1,v=arguments.length,y=Ir(v);++n<v;)y[n]=arguments[n];if(a&&(y=kt(a,l,y)),i){for(var n=i,m=f,b=-1,_=m.length,w=-1,j=ge(y.length-_,0),k=-1,A=n.length,S=Ir(j+A);++w<j;)S[w]=y[w];for(j=w;++k<A;)S[j+k]=n[k];for(;++b<_;)S[j+m[b]]=y[w++];y=S}return p&&v<u?(e|=O,e&=~E,h||(e&=~(x|C)),v=ge(0,u-v),X([r,e,v,o,y,null,[]])):(v=c?o:this,s&&(r=v[g]),this instanceof t?(v=d(r.prototype),n=r.apply(v,y),vr(n)?n:v):r.apply(v,y))
|
||||
}var r=n[0],e=n[1],u=n[2],o=n[3],a=n[4],i=n[5],l=n[6],f=n[7],c=e&x,s=e&C,p=e&j,h=e&k,g=r;return Oe(t,n),t}function st(n,t){var u=n?n.length:0;if(!u)return[];var o=-1,a=St(),i=a===r,l=i&&ke&&t&&200<=t.length,i=i&&!l,f=[],c=t?t.length:0;l&&(a=e,t=ke(t));n:for(;++o<u;)if(l=n[o],i){for(var s=c;s--;)if(t[s]===l)continue n;f.push(l)}else 0>a(t,l)&&f.push(l);return f}function pt(n,t){var r=-1,e=n,u=n?n.length:0;if(typeof u=="number"&&-1<u)for(u|=0,je.unindexedChars&&dr(e)&&(e=e.split(""));++r<u&&false!==t(e[r],r,n););else dt(n,t);
|
||||
return n}function ht(n,t){var r=n,e=n?n.length:0;if(typeof e=="number"&&-1<e)for(e=0>(e|=0)?0:e,je.unindexedChars&&dr(r)&&(r=r.split(""));e--&&false!==t(r[e],e,n););else mt(n,t,Le);return n}function gt(n,t,r,e){e=(0|e)-1;for(var u=n?n.length:0,o=[];++e<u;){var a=n[e];if(a&&typeof a=="object"&&typeof a.length=="number"&&(Ne(a)||pr(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){var e=-1;r=r(n);for(var u=r.length;++e<u;){var o=r[e];
|
||||
return n}function ht(n,t){var r=n,e=n?n.length:0;if(typeof e=="number"&&-1<e)for(e=0>(e|=0)?0:e,je.unindexedChars&&dr(r)&&(r=r.split(""));e--&&false!==t(r[e],e,n););else mt(n,t,Le);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"&&(Ne(a)||pr(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){var e=-1;r=r(n);for(var u=r.length;++e<u;){var o=r[e];
|
||||
if(false===t(n[o],o,n))break}return n}function mt(n,t,r){r=r(n);for(var e=r.length;e--;){var u=r[e];if(false===t(n[u],u,n))break}return n}function dt(n,t){return vt(n,t,Le)}function _t(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&&(null==n||null==t||"function"!=i&&"object"!=i&&"function"!=l&&"object"!=l))return false;if(l=Zr.call(n),i=Zr.call(t),l==J&&(l=ot),i==J&&(i=ot),l!=i)return false;switch(l){case nt:case tt:return+n==+t;
|
||||
case ut:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case at:case it:return n==Dr(t)}if(i=l==Q,!i){var f=ne.call(n,"__wrapped__"),c=ne.call(t,"__wrapped__");if(f||c)return _t(f?n.__wrapped__:n,c?t.__wrapped__:t,r,e,u,o);if(l!=ot||!je.nodeClass&&(h(n)||h(t)))return false;if(l=!je.argsObject&&pr(n)?Pr:n.constructor,f=!je.argsObject&&pr(t)?Pr:t.constructor,l!=f&&!(ne.call(n,"constructor")&&ne.call(t,"constructor")||gr(l)&&l instanceof l&&gr(f)&&f instanceof f)&&"constructor"in n&&"constructor"in t)return false}for(u||(u=[]),o||(o=[]),l=u.length;l--;)if(u[l]==n)return o[l]==t;
|
||||
var s=0,a=true;if(u.push(n),o.push(t),i){if(l=n.length,s=t.length,(a=s==l)||e)for(;s--;)if(i=l,f=t[s],e)for(;i--&&!(a=_t(n[i],f,r,e,u,o)););else if(!(a=_t(n[s],f,r,e,u,o)))break}else vt(t,function(t,i,l){return ne.call(l,i)?(s++,a=ne.call(n,i)&&_t(n[i],t,r,e,u,o)):void 0},br),a&&!e&&vt(n,function(n,t,r){return ne.call(r,t)?a=-1<--s:void 0},br);return u.pop(),o.pop(),a}function wt(n,t,r,e,u){(Ne(t)?pt:dt)(t,function(t,o){var a,i,l=t,f=n[o];if(t&&((i=Ne(t))||Te(t))){for(l=e.length;l--;)if(a=e[l]==t){f=u[l];
|
||||
@@ -19,13 +19,13 @@ break}if(!a){var c;r&&(l=r(f,t),c=typeof l!="undefined")&&(f=l),c||(f=i?Ne(f)?f:
|
||||
u&&s.push(h),c.push(p)}else t?a&&s===h||(s=h,c.push(p)):0>i(s,h)&&((u||f)&&s.push(h),c.push(p))}return c}function jt(n,t){for(var r=-1,e=t(n),u=e.length,o=Ir(u);++r<u;)o[r]=n[e[r]];return o}function kt(n,t,r){for(var e=t.length,u=-1,o=ge(r.length-e,0),a=-1,i=n.length,l=Ir(o+i);++a<i;)l[a]=n[a];for(;++u<e;)l[t[u]]=r[u];for(;o--;)l[a++]=r[u++];return l}function Ot(n,t){return function(r,e,u){var a=t?[[],[]]:{};if(e=o.createCallback(e,u,3),Ne(r)){u=-1;for(var i=r.length;++u<i;){var l=r[u];n(a,l,e(l,u,r),r)
|
||||
}}else pt(r,function(t,r,u){n(a,t,e(t,r,u),u)});return a}}function Et(n,t,r){return n=n.length,t|=0,n<t?(t-=n,r=null==r?" ":Dr(r),Cr(r,Yr(t/r.length)).slice(0,t)):""}function At(n,t,r,e,u,o,a,i){var l=t&x,f=t&C,s=t&O,p=t&E;if(!f&&!gr(n))throw new zr;s&&!u.length&&(t&=~O,s=u=false),p&&!o.length&&(t&=~E,p=o=false);var h=!f&&n[S];return h&&true!==h?(h=zt(h),h[4]&&(h[4]=zt(h[4])),h[5]&&(h[5]=zt(h[5])),typeof r=="number"&&(h[2]=r),n=h[1]&x,l&&!n&&(h[3]=e),!l&&n&&(t|=k),s&&(h[4]?te.apply(h[4],u):h[4]=u),p&&(h[5]?ae.apply(h[5],o):h[5]=o),h[1]|=t,At.apply(null,h)):(null==r?r=f?0:n.length:0>r&&(r=0),s&&(a=[]),p&&(i=[]),h=[n,t,r,e,u,o,a,i],t==x||t==(x|O)?c(h):X(h))
|
||||
}function St(){var n=(n=o.indexOf)===Ft?r:n;return n}function It(n){return typeof n=="function"&&Xr.test(Jr.call(n))}function Rt(n){var t,r;return!n||Zr.call(n)!=ot||!ne.call(n,"constructor")&&(t=n.constructor,gr(t)&&!(t instanceof t))||!je.argsClass&&pr(n)||!je.nodeClass&&h(n)?false:je.ownLast?(vt(n,function(n,t,e){return r=ne.call(e,t),false},br),false!==r):(vt(n,function(n,t){r=t},br),typeof r=="undefined"||ne.call(n,r))}function Nt(n){for(var t=-1,r=br(n),e=r.length,u=[];++t<e;){var o=r[t];ne.call(n,o)&&u.push(o)
|
||||
}return u}function Tt(n,t,r){var e=-1,u=n?n.length:0;for(t=o.createCallback(t,r,3);++e<u;)if(t(n[e],e,n))return e;return-1}function Lt(n,t,r){var e=n?n.length:0;for(t=o.createCallback(t,r,3);e--;)if(t(n[e],e,n))return e;return-1}function Wt(n,t,r){if(typeof t!="number"&&null!=t){var e=-1,u=n?n.length:0,a=0;for(t=o.createCallback(t,r,3);++e<u&&t(n[e],e,n);)a++}else if(a=t,null==a||r)return n?n[0]:w;return zt(n,0,0>a?0:a)}function Ft(n,t,e){var u=n?n.length:0;if(typeof e=="number")e=0|(0>e?ge(0,u+e):e);
|
||||
}return u}function Tt(n,t,r){var e=-1,u=n?n.length:0;for(t=o.createCallback(t,r,3);++e<u;)if(t(n[e],e,n))return e;return-1}function Lt(n,t,r){var e=n?n.length:0;for(t=o.createCallback(t,r,3);e--;)if(t(n[e],e,n))return e;return-1}function Wt(n,t,r){if(typeof t!="number"&&null!=t){var e=-1,u=n?n.length:0,a=0;for(t=o.createCallback(t,r,3);++e<u&&t(n[e],e,n);)a++}else if(a=t,null==a||r)return n?n[0]:w;return zt(n,0,0>a?0:a)}function Ft(n,t,e){var u=n?n.length:0;if(typeof e=="number")e=0>e?ge(0,u+e):e||0;
|
||||
else if(e)return e=Bt(n,t),u&&n[e]===t?e:-1;return r(n,t,e)}function Pt(n,t,r){var e=n?n.length:0;if(typeof t!="number"&&null!=t){var u=e,a=0;for(t=o.createCallback(t,r,3);u--&&t(n[u],u,n);)a++}else a=null==t||r?1:t;return a=e-a,zt(n,0,0>a?0:a)}function $t(n,t,r){var e=n?n.length:0;if(typeof t!="number"&&null!=t){var u=e,a=0;for(t=o.createCallback(t,r,3);u--&&t(n[u],u,n);)a++}else if(a=t,null==a||r)return n?n[e-1]:w;return a=e-a,zt(n,0>a?0:a)}function Dt(n,t,r){if(typeof t!="number"&&null!=t){var e=-1,u=n?n.length:0,a=0;
|
||||
for(t=o.createCallback(t,r,3);++e<u&&t(n[e],e,n);)a++}else a=null==t||r?1:0>t?0:t;return zt(n,a)}function zt(n,t,r){var e=-1,u=n?n.length:0;for(t|=0,0>t?t=ge(u+t,0):t>u&&(t=u),r=typeof r=="undefined"?u:0|r,0>r?r=ge(u+r,0):r>u&&(r=u),u=t>r?0:r-t,r=Ir(u);++e<u;)r[e]=n[t+e];return r}function Bt(n,t,r,e){var u=0,a=n?n.length:u;for(r=r?o.createCallback(r,e,1):kr,t=r(t);u<a;)e=u+a>>>1,r(n[e])<t?u=e+1:a=e;return u}function qt(n,t,r,e){if(!n||!n.length)return[];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=o.createCallback(r,e,3)),Ct(n,t,r)
|
||||
}function Ut(){for(var n=1<arguments.length?arguments:arguments[0],t=-1,r=n?Qt(Re(n,"length")):0,e=Ir(0>r?0:r);++t<r;)e[t]=Re(n,t);return e}function Kt(n,t){var r=-1,e=n?n.length:0,u={};for(t||!e||Ne(n[0])||(t=[]);++r<e;){var o=n[r];t?u[o]=t[r]:o&&(u[o[0]]=o[1])}return u}function Mt(){return this.__wrapped__}function Vt(n,t,r){var e=n?n.length:0;if(r=0|(typeof r=="number"&&r),typeof e=="number"&&-1<e){if(typeof n=="string"||!Ne(n)&&dr(n))return r<e?le?le.call(n,t,r):-1<n.indexOf(t,r):false;var u=St();
|
||||
return r=0>r?ge(0,(0|e)+r):r,-1<u(n,t,r)}var o=-1,a=false;return pt(n,function(n){return++o<r?void 0:!(a=n===t)}),a}function Zt(n,t,r){var e=true;if(t=o.createCallback(t,r,3),Ne(n)){r=-1;for(var u=n.length;++r<u;)if(!t(n[r],r,n))return false}else pt(n,function(n,r,u){return e=!!t(n,r,u)});return e}function Xt(n,t,r){var e=[];if(t=o.createCallback(t,r,3),Ne(n)){r=-1;for(var u=n.length;++r<u;){var a=n[r];t(a,r,n)&&e.push(a)}}else pt(n,function(n,r,u){t(n,r,u)&&e.push(n)});return e}function Yt(n,t,r){return Ne(n)?(t=Tt(n,t,r),-1<t?n[t]:w):(t=fr(n,t,r),typeof t=="string"?n[t]:w)
|
||||
}function Gt(n,t,r){if(t&&typeof r=="undefined"&&Ne(n)){r=-1;for(var e=n.length;++r<e&&false!==t(n[r],r,n););}else pt(n,U(t,r,3));return n}function Ht(n,t,r){if(t&&typeof r=="undefined"&&Ne(n))for(r=n.length;r--&&false!==t(n[r],r,n););else ht(n,U(t,r,3));return n}function Jt(n,t,r){var e=-1,u=0|(n&&n.length),a=Ir(0>u?0:u);if(t=o.createCallback(t,r,3),Ne(n))for(;++e<u;)a[e]=t(n[e],e,n);else pt(n,function(n,r,u){a[++e]=t(n,r,u)});return a}function Qt(n,t,r){var e=-1/0,a=e,i=typeof t;if("number"!=i&&"string"!=i||!r||r[t]!==n||(t=null),null==t&&Ne(n))for(r=-1,i=n.length;++r<i;){var l=n[r];
|
||||
l>a&&(a=l)}else t=null==t&&dr(n)?u:o.createCallback(t,r,3),pt(n,function(n,r,u){r=t(n,r,u),r>e&&(e=r,a=n)});return a}function nr(n,t,r,e){var u=3>arguments.length;if(t=o.createCallback(t,e,4),Ne(n)){var a=-1,i=n.length;for(u&&i&&(r=n[++a]);++a<i;)r=t(r,n[a],a,n)}else pt(n,function(n,e,o){r=u?(u=false,n):t(r,n,e,o)});return r}function tr(n,t,r,e){var u=3>arguments.length;return t=o.createCallback(t,e,4),ht(n,function(n,e,o){r=u?(u=false,n):t(r,n,e,o)}),r}function rr(n){var t=-1,r=0|(n&&n.length),e=Ir(0>r?0:r);
|
||||
for(t=o.createCallback(t,r,3);++e<u&&t(n[e],e,n);)a++}else a=null==t||r?1:0>t?0:t;return zt(n,a)}function zt(n,t,r){var e=-1,u=n?n.length:0;for(t=+t||0,0>t?t=ge(u+t,0):t>u&&(t=u),r=typeof r=="undefined"?u:+r||0,0>r?r=ge(u+r,0):r>u&&(r=u),u=t>r?0:r-t,r=Ir(u);++e<u;)r[e]=n[t+e];return r}function Bt(n,t,r,e){var u=0,a=n?n.length:u;for(r=r?o.createCallback(r,e,1):kr,t=r(t);u<a;)e=u+a>>>1,r(n[e])<t?u=e+1:a=e;return u}function qt(n,t,r,e){if(!n||!n.length)return[];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=o.createCallback(r,e,3)),Ct(n,t,r)
|
||||
}function Ut(){for(var n=1<arguments.length?arguments:arguments[0],t=-1,r=n?Qt(Re(n,"length")):0,e=Ir(0>r?0:r);++t<r;)e[t]=Re(n,t);return e}function Kt(n,t){var r=-1,e=n?n.length:0,u={};for(t||!e||Ne(n[0])||(t=[]);++r<e;){var o=n[r];t?u[o]=t[r]:o&&(u[o[0]]=o[1])}return u}function Mt(){return this.__wrapped__}function Vt(n,t,r){var e=(e=n&&n.length,-1<e&&e>>>0);if(r=typeof r=="number"&&+r||0,e){if(typeof n=="string"||!Ne(n)&&dr(n))return r<e?le?le.call(n,t,r):-1<n.indexOf(t,r):false;var u=St();return r=0>r?ge(0,e+r):r,-1<u(n,t,r)
|
||||
}var o=-1,a=false;return pt(n,function(n){return++o<r?void 0:!(a=n===t)}),a}function Zt(n,t,r){var e=true;if(t=o.createCallback(t,r,3),Ne(n)){r=-1;for(var u=n.length;++r<u;)if(!t(n[r],r,n))return false}else pt(n,function(n,r,u){return e=!!t(n,r,u)});return e}function Xt(n,t,r){var e=[];if(t=o.createCallback(t,r,3),Ne(n)){r=-1;for(var u=n.length;++r<u;){var a=n[r];t(a,r,n)&&e.push(a)}}else pt(n,function(n,r,u){t(n,r,u)&&e.push(n)});return e}function Yt(n,t,r){return Ne(n)?(t=Tt(n,t,r),-1<t?n[t]:w):(t=fr(n,t,r),typeof t=="string"?n[t]:w)
|
||||
}function Gt(n,t,r){if(t&&typeof r=="undefined"&&Ne(n)){r=-1;for(var e=n.length;++r<e&&false!==t(n[r],r,n););}else pt(n,U(t,r,3));return n}function Ht(n,t,r){if(t&&typeof r=="undefined"&&Ne(n))for(r=n.length;r--&&false!==t(n[r],r,n););else ht(n,U(t,r,3));return n}function Jt(n,t,r){var e=-1,u=n&&n.length,a=Ir(0>u?0:u>>>0);if(t=o.createCallback(t,r,3),Ne(n))for(;++e<u;)a[e]=t(n[e],e,n);else pt(n,function(n,r,u){a[++e]=t(n,r,u)});return a}function Qt(n,t,r){var e=-1/0,a=e,i=typeof t;if("number"!=i&&"string"!=i||!r||r[t]!==n||(t=null),null==t&&Ne(n))for(r=-1,i=n.length;++r<i;){var l=n[r];
|
||||
l>a&&(a=l)}else t=null==t&&dr(n)?u:o.createCallback(t,r,3),pt(n,function(n,r,u){r=t(n,r,u),r>e&&(e=r,a=n)});return a}function nr(n,t,r,e){var u=3>arguments.length;if(t=o.createCallback(t,e,4),Ne(n)){var a=-1,i=n.length;for(u&&i&&(r=n[++a]);++a<i;)r=t(r,n[a],a,n)}else pt(n,function(n,e,o){r=u?(u=false,n):t(r,n,e,o)});return r}function tr(n,t,r,e){var u=3>arguments.length;return t=o.createCallback(t,e,4),ht(n,function(n,e,o){r=u?(u=false,n):t(r,n,e,o)}),r}function rr(n){var t=-1,r=n&&n.length,e=Ir(0>r?0:r>>>0);
|
||||
return pt(n,function(n){var r=xt(0,++t);e[t]=e[r],e[r]=n}),e}function er(n,t,r){var e;if(t=o.createCallback(t,r,3),Ne(n)){r=-1;for(var u=n.length;++r<u;)if(t(n[r],r,n))return true}else pt(n,function(n,r,u){return!(e=t(n,r,u))});return!!e}function ur(n,t){if(3>arguments.length)return At(n,x,null,t);if(n)var r=n[S]?n[S][2]:n.length,e=zt(arguments,2),r=r-e.length;return At(n,x|O,r,t,e)}function or(n,t,r){var e,u,o,a,i,l,f,c=0,s=false,p=true;if(!gr(n))throw new zr;if(t=0>t?0:t,true===r)var h=true,p=false;else vr(r)&&(h=r.leading,s="maxWait"in r&&(ge(t,r.maxWait)||0),p="trailing"in r?r.trailing:p);
|
||||
var g=function(){var r=t-(Be()-a);0>=r||r>t?(u&&Gr(u),r=f,u=l=f=w,r&&(c=Be(),o=n.apply(i,e),l||u||(e=i=null))):l=ue(g,r)},v=function(){l&&Gr(l),u=l=f=w,(p||s!==t)&&(c=Be(),o=n.apply(i,e),l||u||(e=i=null))};return function(){if(e=arguments,a=Be(),i=this,f=p&&(l||!h),false===s)var r=h&&!l;else{u||h||(c=a);var y=s-(a-c),m=0>=y||y>s;m?(u&&(u=Gr(u)),c=a,o=n.apply(i,e)):u||(u=ue(v,y))}return m&&l?l=Gr(l):l||t===s||(l=ue(g,t)),r&&(m=true,o=n.apply(i,e)),!m||l||u||(e=i=null),o}}function ar(n){if(!gr(n))throw new zr;
|
||||
return function(){return!n.apply(this,arguments)}}function ir(n,t,r){if(!n)return n;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=U(e[--o-1],e[o--],2);else 2<o&&"function"==typeof e[o-1]&&(i=e[--o]);for(;++u<o;){t=e[u];for(var a=-1,l=Le(t),f=l.length;++a<f;){var c=l[a];n[c]=i?i(n[c],t[c]):t[c]}}return n}function lr(){var t=zt(arguments);return t.push(n),ir.apply(null,t)}function fr(n,t,r){var e;return t=o.createCallback(t,r,3),dt(n,function(n,r,u){return t(n,r,u)?(e=r,false):void 0
|
||||
@@ -45,24 +45,24 @@ return r},o.bind=ur,o.bindAll=function(n){for(var t=1<arguments.length?gt(argume
|
||||
return function(){for(var r=t-1,e=n[r].apply(this,arguments);r--;)e=n[r].call(this,e);return e}},o.constant=function(n){return function(){return n}},o.countBy=Ee,o.create=function(n,t){var r=d(n);return t?ir(r,t):r},o.createCallback=jr,o.curry=function(n,t){return typeof t!="number"&&(t=+t||(n?n.length:0)),At(n,j,t)},o.debounce=or,o.defaults=lr,o.defer=function(n){if(!gr(n))throw new zr;var t=zt(arguments,1);return ue(function(){n.apply(w,t)},1)},o.delay=function(n,t){if(!gr(n))throw new zr;var r=zt(arguments,2);
|
||||
return ue(function(){n.apply(w,r)},t)},o.difference=function(n){return st(n,gt(arguments,true,true,1))},o.drop=Dt,o.dropRight=Pt,o.dropRightWhile=Pt,o.dropWhile=Dt,o.filter=Xt,o.flatten=function(n,t,r,e){if(!n||!n.length)return[];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=Jt(n,r,e)),gt(n,t)},o.forEach=Gt,o.forEachRight=Ht,o.forIn=function(n,t,r){return t=t&&typeof r=="undefined"?t:U(t,r,3),vt(n,t,br)},o.forInRight=function(n,t,r){return t=U(t,r,3),mt(n,t,br)
|
||||
},o.forOwn=function(n,t,r){return t=t&&typeof r=="undefined"?t:U(t,r,3),dt(n,t)},o.forOwnRight=function(n,t,r){return t=U(t,r,3),mt(n,t,Le)},o.functions=sr,o.groupBy=Ae,o.indexBy=Se,o.initial=Pt,o.intersection=function(n){if(!n)return[];for(var t=[],u=-1,o=arguments.length,a=[],i=St(),l=ke&&i===r,f=[];++u<o;){var c=arguments[u];(Ne(c)||pr(c))&&(t.push(c),a.push(l&&120<=c.length&&ke(u?c:f)))}o=t.length,n=t[0];var l=-1,s=n?n.length:0,p=[];n:for(;++l<s;){var h=a[0],c=n[l];if(0>(h?e(h,c):i(f,c))){for(u=o,(h||f).push(c);--u;)if(h=a[u],0>(h?e(h,c):i(t[u],c)))continue n;
|
||||
p.push(c)}}return p},o.invert=function(n,t){for(var r=-1,e=Le(n),u=e.length,o={};++r<u;){var a=e[r],i=n[a];t?ne.call(o,i)?o[i].push(a):o[i]=[a]:o[i]=a}return o},o.invoke=function(n,t){var r=zt(arguments,2),e=-1,u=typeof t=="function",o=0|(n&&n.length),a=Ir(0>o?0:o);return pt(n,function(n){a[++e]=(u?t:n[t]).apply(n,r)}),a},o.keys=Le,o.keysIn=br,o.map=Jt,o.mapValues=function(n,t,r){var e={};return t=o.createCallback(t,r,3),dt(n,function(n,r,u){e[r]=t(n,r,u)}),e},o.matches=Or,o.max=Qt,o.memoize=function(n,t){if(!gr(n))throw new zr;
|
||||
p.push(c)}}return p},o.invert=function(n,t){for(var r=-1,e=Le(n),u=e.length,o={};++r<u;){var a=e[r],i=n[a];t?ne.call(o,i)?o[i].push(a):o[i]=[a]:o[i]=a}return o},o.invoke=function(n,t){var r=zt(arguments,2),e=-1,u=typeof t=="function",o=n&&n.length,a=Ir(0>o?0:o>>>0);return pt(n,function(n){a[++e]=(u?t:n[t]).apply(n,r)}),a},o.keys=Le,o.keysIn=br,o.map=Jt,o.mapValues=function(n,t,r){var e={};return t=o.createCallback(t,r,3),dt(n,function(n,r,u){e[r]=t(n,r,u)}),e},o.matches=Or,o.max=Qt,o.memoize=function(n,t){if(!gr(n))throw new zr;
|
||||
var r=function(){var e=r.cache,u=t?t.apply(this,arguments):"_"+arguments[0];return ne.call(e,u)?e[u]:e[u]=n.apply(this,arguments)};return r.cache={},r},o.merge=function(n,t,r){if(!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=U(e[--u-1],e[u--],2);else 2<u&&"function"==typeof e[u-1]&&(a=e[--u]);for(var e=zt(e,1,u),o=-1,i=[],l=[];++o<u;)wt(n,e[o],a,i,l);return n},o.min=function(n,t,r){var e=1/0,a=e,i=typeof t;
|
||||
if("number"!=i&&"string"!=i||!r||r[t]!==n||(t=null),null==t&&Ne(n))for(r=-1,i=n.length;++r<i;){var l=n[r];l<a&&(a=l)}else t=null==t&&dr(n)?u:o.createCallback(t,r,3),pt(n,function(n,r,u){r=t(n,r,u),r<e&&(e=r,a=n)});return a},o.negate=ar,o.omit=function(n,t,r){if(typeof t=="function")return t=o.createCallback(t,r,3),_r(n,ar(t));for(var e=gt(arguments,true,false,1),u=e.length;u--;)e[u]=Dr(e[u]);return _r(n,st(br(n),e))},o.once=function(n){var t,r;if(!gr(n))throw new zr;return function(){return t?r:(t=true,r=n.apply(this,arguments),n=null,r)
|
||||
}},o.pairs=function(n){for(var t=-1,r=Le(n),e=r.length,u=Ir(e);++t<e;){var o=r[t];u[t]=[o,n[o]]}return u},o.partial=function(n){if(n)var t=n[S]?n[S][2]:n.length,r=zt(arguments,1),t=t-r.length;return At(n,O,t,null,r)},o.partialRight=function(n){if(n)var t=n[S]?n[S][2]:n.length,r=zt(arguments,1),t=t-r.length;return At(n,E,t,null,null,r)},o.partition=Ie,o.pick=_r,o.pluck=Re,o.property=Sr,o.pull=function(n){for(var t=0,r=arguments.length,e=n?n.length:0;++t<r;)for(var u=-1,o=arguments[t];++u<e;)n[u]===o&&(oe.call(n,u--,1),e--);
|
||||
return n},o.range=function(n,t,r){n=+n||0,r=null==r?1:+r||0,null==t?(t=n,n=0):t=+t||0;var e=-1;t=ge(0,Yr((t-n)/(r||1)));for(var u=Ir(t);++e<t;)u[e]=n,n+=r;return u},o.reject=function(n,t,r){return t=o.createCallback(t,r,3),Xt(n,ar(t))},o.remove=function(n,t,r){var e=-1,u=n?n.length:0,a=[];for(t=o.createCallback(t,r,3);++e<u;)r=n[e],t(r,e,n)&&(a.push(r),oe.call(n,e--,1),u--);return a},o.rest=Dt,o.shuffle=rr,o.slice=zt,o.sortBy=function(n,t,r){var e=-1,u=0|(n&&n.length),a=t&&Ne(t),f=Ir(0>u?0:u);for(a||(t=o.createCallback(t,r,3)),pt(n,function(n,r,u){if(a)for(r=t.length,u=Ir(r);r--;)u[r]=n[t[r]];
|
||||
return n},o.range=function(n,t,r){n=+n||0,r=null==r?1:+r||0,null==t?(t=n,n=0):t=+t||0;var e=-1;t=ge(0,Yr((t-n)/(r||1)));for(var u=Ir(t);++e<t;)u[e]=n,n+=r;return u},o.reject=function(n,t,r){return t=o.createCallback(t,r,3),Xt(n,ar(t))},o.remove=function(n,t,r){var e=-1,u=n?n.length:0,a=[];for(t=o.createCallback(t,r,3);++e<u;)r=n[e],t(r,e,n)&&(a.push(r),oe.call(n,e--,1),u--);return a},o.rest=Dt,o.shuffle=rr,o.slice=zt,o.sortBy=function(n,t,r){var e=-1,u=n&&n.length,a=t&&Ne(t),f=Ir(0>u?0:u>>>0);for(a||(t=o.createCallback(t,r,3)),pt(n,function(n,r,u){if(a)for(r=t.length,u=Ir(r);r--;)u[r]=n[t[r]];
|
||||
else u=t(n,r,u);f[++e]={a:u,b:e,c:n}}),u=f.length,f.sort(a?l:i);u--;)f[u]=f[u].c;return f},o.tap=function(n,t,r){return t.call(r,n),n},o.throttle=function(n,t,r){var e=true,u=true;if(!gr(n))throw new zr;return false===r?e=false:vr(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),ft.leading=e,ft.maxWait=+t,ft.trailing=u,or(n,t,ft)},o.times=function(n,t,r){n=-1<(n=+n)?n:0;var e=-1,u=Ir(n);for(t=U(t,r,1);++e<n;)u[e]=t(e);return u},o.toArray=function(n){var t=n&&n.length;return typeof t=="number"&&-1<t?je.unindexedChars&&dr(n)?n.split(""):zt(n):wr(n)
|
||||
},o.transform=function(n,t,r,e){var u=Ne(n);if(null==r)if(u)r=[];else{var a=n&&n.constructor;r=d(a&&a.prototype)}return t&&(t=o.createCallback(t,e,4),(u?pt:dt)(n,function(n,e,u){return t(r,n,e,u)})),r},o.union=function(){return Ct(gt(arguments,true,true))},o.uniq=qt,o.values=wr,o.valuesIn=function(n){return jt(n,br)},o.where=Xt,o.without=function(){return st(arguments[0],zt(arguments,1))},o.wrap=function(n,t){return At(t,O,null,null,[n])},o.xor=function(){for(var n=-1,t=arguments.length;++n<t;){var r=arguments[n];
|
||||
if(Ne(r)||pr(r))var e=e?st(e,r).concat(st(r,e)):r}return e?Ct(e):[]},o.zip=Ut,o.zipObject=Kt,o.callback=jr,o.collect=Jt,o.each=Gt,o.eachRight=Ht,o.extend=ir,o.methods=sr,o.object=Kt,o.select=Xt,o.tail=Dt,o.unique=qt,o.unzip=Ut,Er(ir({},o)),o.camelCase=We,o.capitalize=function(n){return null==n?"":(n=Dr(n),n.charAt(0).toUpperCase()+n.slice(1))},o.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=typeof r=="function"&&U(r,e,1),m(n,t,r)
|
||||
},o.cloneDeep=function(n,t,r){return t=typeof t=="function"&&U(t,r,1),m(n,true,t)},o.contains=Vt,o.endsWith=function(n,t,r){n=null==n?"":Dr(n),t=Dr(t);var e=n.length;return r=(typeof r=="number"?ve(ge(0|r,0),e):e)-t.length,0<=r&&n.indexOf(t,r)==r},o.escape=function(n){return null==n?"":Dr(n).replace(W,s)},o.escapeRegExp=xr,o.every=Zt,o.find=Yt,o.findIndex=Tt,o.findKey=fr,o.findLast=function(n,t,r){return Ne(n)?(t=Lt(n,t,r),-1<t?n[t]:w):(t=cr(n,t,r),typeof t=="string"?n[t]:w)},o.findLastIndex=Lt,o.findLastKey=cr,o.has=function(n,t){return n?ne.call(n,t):false
|
||||
},o.cloneDeep=function(n,t,r){return t=typeof t=="function"&&U(t,r,1),m(n,true,t)},o.contains=Vt,o.endsWith=function(n,t,r){n=null==n?"":Dr(n),t=Dr(t);var e=n.length;return r=(typeof r=="number"?ve(ge(+r||0,0),e):e)-t.length,0<=r&&n.indexOf(t,r)==r},o.escape=function(n){return null==n?"":Dr(n).replace(W,s)},o.escapeRegExp=xr,o.every=Zt,o.find=Yt,o.findIndex=Tt,o.findKey=fr,o.findLast=function(n,t,r){return Ne(n)?(t=Lt(n,t,r),-1<t?n[t]:w):(t=cr(n,t,r),typeof t=="string"?n[t]:w)},o.findLastIndex=Lt,o.findLastKey=cr,o.has=function(n,t){return n?ne.call(n,t):false
|
||||
},o.identity=kr,o.indexOf=Ft,o.isArguments=pr,o.isArray=Ne,o.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&Zr.call(n)==nt||false},o.isDate=function(n){return n&&typeof n=="object"&&Zr.call(n)==tt||false},o.isElement=hr,o.isEmpty=function(n){var t=true;if(!n)return t;var r=Zr.call(n),e=n.length;return r==Q||r==it||(je.argsClass?r==J:pr(n))||r==ot&&typeof e=="number"&&gr(n.splice)?!e:(dt(n,function(){return t=false}),t)},o.isEqual=function(n,t,r,e){if(r=typeof r=="function"&&U(r,e,2),!r){if(n===t)return 0!==n||1/n==1/t;
|
||||
e=typeof n;var u=typeof t;if(n===n&&(null==n||null==t||"function"!=e&&"object"!=e&&"function"!=u&&"object"!=u))return false}return _t(n,t,r)},o.isFinite=function(n){return se(n)&&!pe(parseFloat(n))},o.isFunction=gr,o.isNaN=function(n){return yr(n)&&n!=+n},o.isNull=function(n){return null===n},o.isNumber=yr,o.isObject=vr,o.isPlainObject=Te,o.isRegExp=mr,o.isString=dr,o.isUndefined=function(n){return typeof n=="undefined"},o.kebabCase=Fe,o.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(r|=0,e=(0>r?ge(0,e+r):ve(r,e-1))+1);e--;)if(n[e]===t)return e;
|
||||
return-1},o.mixin=Er,o.noConflict=function(){return t._=Vr,this},o.noop=Ar,o.now=Be,o.pad=function(n,t,r){n=null==n?"":Dr(n),t|=0;var e=n.length;return e<t?(e=(t-e)/2,t=Hr(e),e=Yr(e),r=Et("",e,r),r.slice(0,t)+n+r):n},o.padLeft=function(n,t,r){return n=null==n?"":Dr(n),Et(n,t,r)+n},o.padRight=function(n,t,r){return n=null==n?"":Dr(n),n+Et(n,t,r)},o.parseInt=qe,o.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=de(),ve(n+r*(t-n+parseFloat("1e-"+((r+"").length-1))),t)):xt(n,t)
|
||||
},o.reduce=nr,o.reduceRight=tr,o.repeat=Cr,o.result=function(n,t,r){var e=null==n?w:n[t];return typeof e=="undefined"?r:gr(e)?n[t]():e},o.runInContext=_,o.size=function(n){var t=n?n.length:0;return typeof t=="number"&&-1<t?t:Le(n).length},o.some=er,o.sortedIndex=Bt,o.snakeCase=Pe,o.startsWith=function(n,t,r){return n=null==n?"":Dr(n),r=typeof r=="number"?ve(ge(0|r,0),n.length):0,n.lastIndexOf(t,r)==r},o.template=function(n,t,r){var e=o.templateSettings;r=lr({},r,e),n=Dr(null==n?"":n);var u,a,i=lr({},r.imports,e.imports),e=Le(i),i=wr(i),l=0,f=r.interpolate||K,c="__p+='",f=$r((r.escape||K).source+"|"+f.source+"|"+(f===$?D:K).source+"|"+(r.evaluate||K).source+"|$","g");
|
||||
},o.reduce=nr,o.reduceRight=tr,o.repeat=Cr,o.result=function(n,t,r){var e=null==n?w:n[t];return typeof e=="undefined"?r:gr(e)?n[t]():e},o.runInContext=_,o.size=function(n){var t=n?n.length:0;return typeof t=="number"&&-1<t?t:Le(n).length},o.some=er,o.sortedIndex=Bt,o.snakeCase=Pe,o.startsWith=function(n,t,r){return n=null==n?"":Dr(n),r=typeof r=="number"?ve(ge(+r||0,0),n.length):0,n.lastIndexOf(t,r)==r},o.template=function(n,t,r){var e=o.templateSettings;r=lr({},r,e),n=Dr(null==n?"":n);var u,a,i=lr({},r.imports,e.imports),e=Le(i),i=wr(i),l=0,f=r.interpolate||K,c="__p+='",f=$r((r.escape||K).source+"|"+f.source+"|"+(f===$?D:K).source+"|"+(r.evaluate||K).source+"|$","g");
|
||||
n.replace(f,function(t,r,e,o,i,f){return e||(e=o),c+=n.slice(l,f).replace(Z,p),r&&(u=true,c+="'+__e("+r+")+'"),i&&(a=true,c+="';"+i+";\n__p+='"),e&&(c+="'+((__t=("+e+"))==null?'':__t)+'"),l=f+t.length,t}),c+="';",(r=r.variable)||(c="with(obj){"+c+"}"),c=(a?c.replace(R,""):c).replace(N,"$1").replace(T,"$1;"),c="function("+(r||"obj")+"){"+(r?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(a?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+c+"return __p}";try{var s=Lr(e,"return "+c).apply(w,i)
|
||||
}catch(h){throw h.source=c,h}return t?s(t):(s.source=c,s)},o.trim=$e,o.trimLeft=De,o.trimRight=ze,o.truncate=function(n,t){var r=30,e="...";if(t&&vr(t))var u="separator"in t?t.separator:u,r="length"in t?0|t.length:r,e="omission"in t?Dr(t.omission):e;else null!=t&&(r=0|t);if(n=null==n?"":Dr(n),r>=n.length)return n;var o=r-e.length;if(1>o)return e;if(r=n.slice(0,o),null==u)return r+e;if(mr(u)){if(n.slice(o).search(u)){var a,i,l=n.slice(0,o);for(u.global||(u=$r(u.source,(z.exec(u)||"")+"g")),u.lastIndex=0;a=u.exec(l);)i=a.index;
|
||||
r=r.slice(0,null==i?o:i)}}else n.indexOf(u,o)!=o&&(u=r.lastIndexOf(u),-1<u&&(r=r.slice(0,u)));return r+e},o.unescape=function(n){return null==n?"":(n=Dr(n),0>n.indexOf(";")?n:n.replace(L,b))},o.uniqueId=function(n){var t=++I;return Dr(null==n?"":n)+t},o.all=Zt,o.any=er,o.detect=Yt,o.findWhere=Yt,o.foldl=nr,o.foldr=tr,o.include=Vt,o.inject=nr,Er(function(){var n={};return dt(o,function(t,r){o.prototype[r]||(n[r]=t)}),n}(),false),o.first=Wt,o.last=$t,o.sample=function(n,t,r){return n&&typeof n.length!="number"?n=wr(n):je.unindexedChars&&dr(n)&&(n=n.split("")),null==t||r?(t=0|(n&&n.length),0<t?n[xt(0,t-1)]:w):(n=rr(n),n.length=ve(ge(0,t),n.length),n)
|
||||
},o.take=Wt,o.takeRight=$t,o.takeRightWhile=$t,o.takeWhile=Wt,o.head=Wt,dt(o,function(n,t){var r="sample"!==t;o.prototype[t]||(o.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 a(o,u):o})}),o.VERSION=A,o.prototype.chain=function(){return this.__chain__=true,this},o.prototype.toString=function(){return Dr(this.__wrapped__)},o.prototype.value=Mt,o.prototype.valueOf=Mt,pt(["join","pop","shift"],function(n){var t=Br[n];o.prototype[n]=function(){var n=this.__chain__,r=t.apply(this.__wrapped__,arguments);
|
||||
return n?new a(r,n):r}}),pt(["push","reverse","sort","unshift"],function(n){var t=Br[n];o.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),pt(["concat","splice"],function(n){var t=Br[n];o.prototype[n]=function(){return new a(t.apply(this.__wrapped__,arguments),this.__chain__)}}),je.spliceObjects||pt(["pop","shift","splice"],function(n){var t=Br[n],r="splice"==n;o.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 a(u,n):u
|
||||
}}),o}var w,x=1,C=2,j=4,k=8,O=16,E=32,A="2.4.1",S="__lodash@"+A+"__",I=0,R=/\b__p\+='';/g,N=/\b(__p\+=)''\+/g,T=/(__e\(.*?\)|\b__t\))\+'';/g,L=/&(?:amp|lt|gt|quot|#39);/g,W=/[&<>"']/g,F=/<%-([\s\S]+?)%>/g,P=/<%([\s\S]+?)%>/g,$=/<%=([\s\S]+?)%>/g,D=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,z=/\w*$/,B=/^\s*function[ \n\r\t]+\w/,q=/^0[xX]/,U=/[\xC0-\xFF]/g,K=/($^)/,M=/[.*+?^${}()|[\]\\]/g,V=/\bthis\b/,Z=/['\n\r\t\u2028\u2029\\]/g,X=/[A-Z]{2,}|[a-zA-Z0-9][a-z0-9]*/g,Y=" \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",G="Array Boolean Date Error Function Math Number Object RegExp Set String _ clearTimeout document isFinite isNaN parseInt setTimeout TypeError window WinRTError".split(" "),H="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),J="[object Arguments]",Q="[object Array]",nt="[object Boolean]",tt="[object Date]",rt="[object Error]",et="[object Function]",ut="[object Number]",ot="[object Object]",at="[object RegExp]",it="[object String]",lt={};
|
||||
}catch(h){throw h.source=c,h}return t?s(t):(s.source=c,s)},o.trim=$e,o.trimLeft=De,o.trimRight=ze,o.truncate=function(n,t){var r=30,e="...";if(t&&vr(t))var u="separator"in t?t.separator:u,r="length"in t?+t.length||0:r,e="omission"in t?Dr(t.omission):e;else null!=t&&(r=+t||0);if(n=null==n?"":Dr(n),r>=n.length)return n;var o=r-e.length;if(1>o)return e;if(r=n.slice(0,o),null==u)return r+e;if(mr(u)){if(n.slice(o).search(u)){var a,i,l=n.slice(0,o);for(u.global||(u=$r(u.source,(z.exec(u)||"")+"g")),u.lastIndex=0;a=u.exec(l);)i=a.index;
|
||||
r=r.slice(0,null==i?o:i)}}else n.indexOf(u,o)!=o&&(u=r.lastIndexOf(u),-1<u&&(r=r.slice(0,u)));return r+e},o.unescape=function(n){return null==n?"":(n=Dr(n),0>n.indexOf(";")?n:n.replace(L,b))},o.uniqueId=function(n){var t=++I;return Dr(null==n?"":n)+t},o.all=Zt,o.any=er,o.detect=Yt,o.findWhere=Yt,o.foldl=nr,o.foldr=tr,o.include=Vt,o.inject=nr,Er(function(){var n={};return dt(o,function(t,r){o.prototype[r]||(n[r]=t)}),n}(),false),o.first=Wt,o.last=$t,o.sample=function(n,t,r){if(n&&typeof n.length!="number"?n=wr(n):je.unindexedChars&&dr(n)&&(n=n.split("")),null==t||r){var e=(e=n&&n.length,-1<e&&e>>>0);
|
||||
return 0<e?n[xt(0,e-1)]:w}return n=rr(n),n.length=ve(ge(0,t),n.length),n},o.take=Wt,o.takeRight=$t,o.takeRightWhile=$t,o.takeWhile=Wt,o.head=Wt,dt(o,function(n,t){var r="sample"!==t;o.prototype[t]||(o.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 a(o,u):o})}),o.VERSION=A,o.prototype.chain=function(){return this.__chain__=true,this},o.prototype.toString=function(){return Dr(this.__wrapped__)},o.prototype.value=Mt,o.prototype.valueOf=Mt,pt(["join","pop","shift"],function(n){var t=Br[n];
|
||||
o.prototype[n]=function(){var n=this.__chain__,r=t.apply(this.__wrapped__,arguments);return n?new a(r,n):r}}),pt(["push","reverse","sort","unshift"],function(n){var t=Br[n];o.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),pt(["concat","splice"],function(n){var t=Br[n];o.prototype[n]=function(){return new a(t.apply(this.__wrapped__,arguments),this.__chain__)}}),je.spliceObjects||pt(["pop","shift","splice"],function(n){var t=Br[n],r="splice"==n;o.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 a(u,n):u}}),o}var w,x=1,C=2,j=4,k=8,O=16,E=32,A="2.4.1",S="__lodash@"+A+"__",I=0,R=/\b__p\+='';/g,N=/\b(__p\+=)''\+/g,T=/(__e\(.*?\)|\b__t\))\+'';/g,L=/&(?:amp|lt|gt|quot|#39);/g,W=/[&<>"']/g,F=/<%-([\s\S]+?)%>/g,P=/<%([\s\S]+?)%>/g,$=/<%=([\s\S]+?)%>/g,D=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,z=/\w*$/,B=/^\s*function[ \n\r\t]+\w/,q=/^0[xX]/,U=/[\xC0-\xFF]/g,K=/($^)/,M=/[.*+?^${}()|[\]\\]/g,V=/\bthis\b/,Z=/['\n\r\t\u2028\u2029\\]/g,X=/[A-Z]{2,}|[a-zA-Z0-9][a-z0-9]*/g,Y=" \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",G="Array Boolean Date Error Function Math Number Object RegExp Set String _ clearTimeout document isFinite isNaN parseInt setTimeout TypeError window WinRTError".split(" "),H="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),J="[object Arguments]",Q="[object Array]",nt="[object Boolean]",tt="[object Date]",rt="[object Error]",et="[object Function]",ut="[object Number]",ot="[object Object]",at="[object RegExp]",it="[object String]",lt={};
|
||||
lt[et]=false,lt[J]=lt[Q]=lt[nt]=lt[tt]=lt[ut]=lt[ot]=lt[at]=lt[it]=true;var ft={leading:false,maxWait:0,trailing:false},ct={configurable:false,enumerable:false,value:null,writable:false},st={"&":"&","<":"<",">":">",'"':""","'":"'"},pt={"&":"&","<":"<",">":">",""":'"',"'":"'"},ht={\u00c0:"A",\u00c1:"A",\u00c2:"A",\u00c3:"A",\u00c4:"A",\u00c5:"A",\u00e0:"a",\u00e1:"a",\u00e2:"a",\u00e3:"a",\u00e4:"a",\u00e5:"a",\u00c7:"C",\u00e7:"c",\u00d0:"D",\u00f0:"d",\u00c8:"E",\u00c9:"E",\u00ca:"E",\u00cb:"E",\u00e8:"e",\u00e9:"e",\u00ea:"e",\u00eb:"e",\u00cc:"I",\u00cd:"I",\u00ce:"I",\u00cf:"I",\u00ec:"i",\u00ed:"i",\u00ee:"i",\u00ef:"i",\u00d1:"N",\u00f1:"n",\u00d2:"O",\u00d3:"O",\u00d4:"O",\u00d5:"O",\u00d6:"O",\u00d8:"O",\u00f2:"o",\u00f3:"o",\u00f4:"o",\u00f5:"o",\u00f6:"o",\u00f8:"o",\u00d9:"U",\u00da:"U",\u00db:"U",\u00dc:"U",\u00f9:"u",\u00fa:"u",\u00fb:"u",\u00fc:"u",\u00dd:"Y",\u00fd:"y",\u00ff:"y",\u00c6:"AE",\u00e6:"ae",\u00de:"Th",\u00fe:"th",\u00df:"ss","\xd7":" ","\xf7":" "},gt={"function":true,object:true},vt={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},yt=gt[typeof window]&&window||this,mt=gt[typeof exports]&&exports&&!exports.nodeType&&exports,gt=gt[typeof module]&&module&&!module.nodeType&&module,dt=mt&>&&typeof global=="object"&&global;
|
||||
!dt||dt.global!==dt&&dt.window!==dt&&dt.self!==dt||(yt=dt);var dt=gt&>.exports===mt&&mt,bt=_();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(yt._=bt, define(function(){return bt})):mt&>?dt?(gt.exports=bt)._=bt:mt._=bt:yt._=bt}).call(this);
|
||||
80
dist/lodash.js
vendored
80
dist/lodash.js
vendored
@@ -267,7 +267,7 @@
|
||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||
*/
|
||||
function baseIndexOf(array, value, fromIndex) {
|
||||
var index = (fromIndex | 0) - 1,
|
||||
var index = (+fromIndex || 0) - 1,
|
||||
length = array ? array.length : 0;
|
||||
|
||||
while (++index < length) {
|
||||
@@ -1234,7 +1234,7 @@
|
||||
* @returns {Array} Returns the new flattened array.
|
||||
*/
|
||||
function baseFlatten(array, isShallow, isStrict, fromIndex) {
|
||||
var index = (fromIndex | 0) - 1,
|
||||
var index = (+fromIndex || 0) - 1,
|
||||
length = array ? array.length : 0,
|
||||
result = [];
|
||||
|
||||
@@ -1757,9 +1757,9 @@
|
||||
callback = lodash.createCallback(callback, thisArg, 3);
|
||||
|
||||
var index = -1,
|
||||
length = (collection && collection.length) | 0;
|
||||
length = (length = collection && collection.length, length > -1 && length >>> 0);
|
||||
|
||||
if (length > 0) {
|
||||
if (length) {
|
||||
while (++index < length) {
|
||||
var value = collection[index];
|
||||
setter(result, value, callback(value, index, collection), collection);
|
||||
@@ -2435,7 +2435,7 @@
|
||||
function indexOf(array, value, fromIndex) {
|
||||
var length = array ? array.length : 0;
|
||||
if (typeof fromIndex == 'number') {
|
||||
fromIndex = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex) | 0;
|
||||
fromIndex = fromIndex < 0 ? nativeMax(0, length + fromIndex) : (fromIndex || 0);
|
||||
} else if (fromIndex) {
|
||||
var index = sortedIndex(array, value);
|
||||
return (length && array[index] === value) ? index : -1;
|
||||
@@ -2738,13 +2738,13 @@
|
||||
var index = -1,
|
||||
length = array ? array.length : 0;
|
||||
|
||||
start |= 0;
|
||||
start = +start || 0;
|
||||
if (start < 0) {
|
||||
start = nativeMax(length + start, 0);
|
||||
} else if (start > length) {
|
||||
start = length;
|
||||
}
|
||||
end = typeof end == 'undefined' ? length : (end | 0);
|
||||
end = typeof end == 'undefined' ? length : (+end || 0);
|
||||
if (end < 0) {
|
||||
end = nativeMax(length + end, 0);
|
||||
} else if (end > length) {
|
||||
@@ -3361,10 +3361,10 @@
|
||||
* // => true
|
||||
*/
|
||||
function contains(collection, target, fromIndex) {
|
||||
var length = collection ? collection.length : 0;
|
||||
fromIndex = (typeof fromIndex == 'number' && fromIndex) | 0;
|
||||
var length = (length = collection && collection.length, length > -1 && length >>> 0);
|
||||
fromIndex = (typeof fromIndex == 'number' && +fromIndex) || 0;
|
||||
|
||||
if (typeof length == 'number' && length > -1) {
|
||||
if (length) {
|
||||
if (typeof collection == 'string' || !isArray(collection) && isString(collection)) {
|
||||
if (fromIndex >= length) {
|
||||
return false;
|
||||
@@ -3374,7 +3374,7 @@
|
||||
: collection.indexOf(target, fromIndex) > -1;
|
||||
}
|
||||
var indexOf = getIndexOf();
|
||||
fromIndex = fromIndex < 0 ? nativeMax(0, (length | 0) + fromIndex) : fromIndex;
|
||||
fromIndex = fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex;
|
||||
return indexOf(collection, target, fromIndex) > -1;
|
||||
}
|
||||
var index = -1,
|
||||
@@ -3473,9 +3473,9 @@
|
||||
|
||||
predicate = lodash.createCallback(predicate, thisArg, 3);
|
||||
var index = -1,
|
||||
length = (collection && collection.length) | 0;
|
||||
length = (length = collection && collection.length, length > -1 && length >>> 0);
|
||||
|
||||
if (length > 0) {
|
||||
if (length) {
|
||||
while (++index < length) {
|
||||
if (!predicate(collection[index], index, collection)) {
|
||||
return false;
|
||||
@@ -3534,9 +3534,9 @@
|
||||
|
||||
predicate = lodash.createCallback(predicate, thisArg, 3);
|
||||
var index = -1,
|
||||
length = (collection && collection.length) | 0;
|
||||
length = (length = collection && collection.length, length > -1 && length >>> 0);
|
||||
|
||||
if (length > 0) {
|
||||
if (length) {
|
||||
while (++index < length) {
|
||||
var value = collection[index];
|
||||
if (predicate(value, index, collection)) {
|
||||
@@ -3597,8 +3597,8 @@
|
||||
* // => { 'name': 'fred', 'age': 40, 'blocked': true }
|
||||
*/
|
||||
function find(collection, predicate, thisArg) {
|
||||
var length = (collection && collection.length) | 0;
|
||||
if (length > 0) {
|
||||
var length = (length = collection && collection.length, length > -1 && length >>> 0);
|
||||
if (length) {
|
||||
var index = findIndex(collection, predicate, thisArg);
|
||||
return index > -1 ? collection[index] : undefined;
|
||||
}
|
||||
@@ -3627,8 +3627,8 @@
|
||||
* // => 3
|
||||
*/
|
||||
function findLast(collection, predicate, thisArg) {
|
||||
var length = (collection && collection.length) | 0;
|
||||
if (length > 0) {
|
||||
var length = (length = collection && collection.length, length > -1 && length >>> 0);
|
||||
if (length) {
|
||||
var index = findLastIndex(collection, predicate, thisArg);
|
||||
return index > -1 ? collection[index] : undefined;
|
||||
}
|
||||
@@ -3664,10 +3664,10 @@
|
||||
*/
|
||||
function forEach(collection, callback, thisArg) {
|
||||
var index = -1,
|
||||
length = (collection && collection.length) | 0;
|
||||
length = (length = collection && collection.length, length > -1 && length >>> 0);
|
||||
|
||||
callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3);
|
||||
if (length > 0) {
|
||||
if (length) {
|
||||
while (++index < length) {
|
||||
if (callback(collection[index], index, collection) === false) {
|
||||
break;
|
||||
@@ -3697,10 +3697,10 @@
|
||||
* // => logs each number from right to left and returns '3,2,1'
|
||||
*/
|
||||
function forEachRight(collection, callback, thisArg) {
|
||||
var length = (collection && collection.length) | 0;
|
||||
var length = (length = collection && collection.length, length > -1 && length >>> 0);
|
||||
|
||||
callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3);
|
||||
if (length > 0) {
|
||||
if (length) {
|
||||
while (length--) {
|
||||
if (callback(collection[length], length, collection) === false) {
|
||||
break;
|
||||
@@ -3824,8 +3824,8 @@
|
||||
var args = slice(arguments, 2),
|
||||
index = -1,
|
||||
isFunc = typeof methodName == 'function',
|
||||
length = (collection && collection.length) | 0,
|
||||
result = Array(length < 0 ? 0 : length);
|
||||
length = collection && collection.length,
|
||||
result = Array(length < 0 ? 0 : length >>> 0);
|
||||
|
||||
baseEach(collection, function(value) {
|
||||
result[++index] = (isFunc ? methodName : value[methodName]).apply(value, args);
|
||||
@@ -3874,10 +3874,10 @@
|
||||
*/
|
||||
function map(collection, callback, thisArg) {
|
||||
var index = -1,
|
||||
length = (collection && collection.length) | 0;
|
||||
length = (length = collection && collection.length, length > -1 && length >>> 0);
|
||||
|
||||
callback = lodash.createCallback(callback, thisArg, 3);
|
||||
if (length > 0) {
|
||||
if (length) {
|
||||
var result = Array(length);
|
||||
while (++index < length) {
|
||||
result[index] = callback(collection[index], index, collection);
|
||||
@@ -4146,9 +4146,9 @@
|
||||
callback = lodash.createCallback(callback, thisArg, 4);
|
||||
|
||||
var index = -1,
|
||||
length = (collection && collection.length) | 0;
|
||||
length = (length = collection && collection.length, length > -1 && length >>> 0);
|
||||
|
||||
if (length > 0) {
|
||||
if (length) {
|
||||
if (noaccum && length) {
|
||||
accumulator = collection[++index];
|
||||
}
|
||||
@@ -4262,7 +4262,7 @@
|
||||
collection = values(collection);
|
||||
}
|
||||
if (n == null || guard) {
|
||||
var length = (collection && collection.length) | 0;
|
||||
var length = (length = collection && collection.length, length > -1 && length >>> 0);
|
||||
return length > 0 ? collection[baseRandom(0, length - 1)] : undefined;
|
||||
}
|
||||
var result = shuffle(collection);
|
||||
@@ -4287,8 +4287,8 @@
|
||||
*/
|
||||
function shuffle(collection) {
|
||||
var index = -1,
|
||||
length = (collection && collection.length) | 0,
|
||||
result = Array(length < 0 ? 0 : length);
|
||||
length = collection && collection.length,
|
||||
result = Array(length < 0 ? 0 : length >>> 0);
|
||||
|
||||
baseEach(collection, function(value) {
|
||||
var rand = baseRandom(0, ++index);
|
||||
@@ -4371,9 +4371,9 @@
|
||||
|
||||
predicate = lodash.createCallback(predicate, thisArg, 3);
|
||||
var index = -1,
|
||||
length = (collection && collection.length) | 0;
|
||||
length = (length = collection && collection.length, length > -1 && length >>> 0);
|
||||
|
||||
if (length > 0) {
|
||||
if (length) {
|
||||
while (++index < length) {
|
||||
if (predicate(collection[index], index, collection)) {
|
||||
return true;
|
||||
@@ -4438,9 +4438,9 @@
|
||||
*/
|
||||
function sortBy(collection, callback, thisArg) {
|
||||
var index = -1,
|
||||
length = (collection && collection.length) | 0,
|
||||
length = collection && collection.length,
|
||||
multi = callback && isArray(callback),
|
||||
result = Array(length < 0 ? 0 : length);
|
||||
result = Array(length < 0 ? 0 : length >>> 0);
|
||||
|
||||
if (!multi) {
|
||||
callback = lodash.createCallback(callback, thisArg, 3);
|
||||
@@ -6705,7 +6705,7 @@
|
||||
target = String(target);
|
||||
|
||||
var length = string.length;
|
||||
position = (typeof position == 'number' ? nativeMin(nativeMax(position | 0, 0), length) : length) - target.length;
|
||||
position = (typeof position == 'number' ? nativeMin(nativeMax(+position || 0, 0), length) : length) - target.length;
|
||||
return position >= 0 && string.indexOf(target, position) == position;
|
||||
}
|
||||
|
||||
@@ -6958,7 +6958,7 @@
|
||||
*/
|
||||
function startsWith(string, target, position) {
|
||||
string = string == null ? '' : String(string);
|
||||
position = typeof position == 'number' ? nativeMin(nativeMax(position | 0, 0), string.length) : 0;
|
||||
position = typeof position == 'number' ? nativeMin(nativeMax(+position || 0, 0), string.length) : 0;
|
||||
return string.lastIndexOf(target, position) == position;
|
||||
}
|
||||
|
||||
@@ -7264,11 +7264,11 @@
|
||||
|
||||
if (options && isObject(options)) {
|
||||
var separator = 'separator' in options ? options.separator : separator;
|
||||
length = 'length' in options ? options.length | 0 : length;
|
||||
length = 'length' in options ? +options.length || 0 : length;
|
||||
omission = 'omission' in options ? String(options.omission) : omission;
|
||||
}
|
||||
else if (options != null) {
|
||||
length = options | 0;
|
||||
length = +options || 0;
|
||||
}
|
||||
string = string == null ? '' : String(string);
|
||||
if (length >= string.length) {
|
||||
|
||||
54
dist/lodash.min.js
vendored
54
dist/lodash.min.js
vendored
@@ -3,7 +3,7 @@
|
||||
* Lo-Dash 2.4.1 (Custom Build) lodash.com/license | Underscore.js 1.6.0 underscorejs.org/LICENSE
|
||||
* Build: `lodash modern -o ./dist/lodash.js`
|
||||
*/
|
||||
;(function(){function n(n,t){return typeof n=="undefined"?t:n}function t(n,t){if(n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1}return 0}function r(n,t,r){r=(0|r)-1;for(var e=n?n.length:0;++r<e;)if(n[r]===t)return r;return-1}function e(n,t){return n.has(t)?0:-1}function u(n){return n.charCodeAt(0)}function o(n,t){for(var r=-1,e=n.length;++r<e&&0<=t.indexOf(n.charAt(r)););return r}function i(n,t){for(var r=n.length;r--&&0<=t.indexOf(n.charAt(r)););return r}function a(n,r){return t(n.a,r.a)||n.b-r.b
|
||||
;(function(){function n(n,t){return typeof n=="undefined"?t:n}function t(n,t){if(n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1}return 0}function r(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 e(n,t){return n.has(t)?0:-1}function u(n){return n.charCodeAt(0)}function o(n,t){for(var r=-1,e=n.length;++r<e&&0<=t.indexOf(n.charAt(r)););return r}function i(n,t){for(var r=n.length;r--&&0<=t.indexOf(n.charAt(r)););return r}function a(n,r){return t(n.a,r.a)||n.b-r.b
|
||||
}function l(n,r){for(var e=n.a,u=r.a,o=-1,i=e.length;++o<i;){var a=t(e[o],u[o]);if(a)return a}return n.b-r.b}function f(n){return function(t){for(var r=-1,e=(t=null!=t&&(t+"").replace(U,c).match(Z))?t.length:0,u="";++r<e;)u=n(u,t[r],r,t);return u}}function c(n){return ct[n]}function p(n){return lt[n]}function s(n){return"\\"+st[n]}function h(n,t){return(n=null==n?"":n+"")?null==t?n.slice(y(n),m(n)+1):(t+="",n.slice(o(n,t),i(n,t)+1)):n}function g(n,t){return(n=null==n?"":n+"")?null==t?n.slice(y(n)):(t+="",n.slice(o(n,t))):n
|
||||
}function v(n,t){return(n=null==n?"":n+"")?null==t?n.slice(0,m(n)+1):(t+="",n.slice(0,i(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(t){function o(n){return n&&typeof n=="object"&&!Oe(n)&&Yr.call(n,"__wrapped__")?n:new i(n)}function i(n,t){this.__chain__=!!t,this.__wrapped__=n}function c(n){function t(){if(u){for(var n=-1,i=arguments.length,a=Ar(i);++n<i;)a[n]=arguments[n];a=xt(u,o,a)}return this instanceof t?(n=m(r.prototype),a=r.apply(n,a||arguments),sr(a)?a:n):r.apply(e,a||arguments)}var r=n[0],e=n[3],u=n[4],o=n[6];return _e(t,n),t}function y(n,t,r,e,u){if(r){var o=r(n);if(typeof o!="undefined")return o
|
||||
@@ -11,29 +11,29 @@
|
||||
}function U(n,t,r){if(typeof n!="function")return xr;if(typeof t=="undefined"||!("prototype"in n))return n;var e=n[I];if(typeof e=="undefined"&&(me.funcNames&&(e=!n.name),e=e||!me.funcDecomp,!e)){var u=Zr.call(n);me.funcNames||(e=!B.test(u)),e||(e=M.test(u),_e(n,e))}if(false===e||true!==e&&e[1]&w)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 tr(n,t)}function Z(n){function t(){for(var n=-1,v=arguments.length,y=Ar(v);++n<v;)y[n]=arguments[n];if(i&&(y=xt(i,l,y)),a){for(var n=a,d=f,b=-1,_=d.length,j=-1,k=le(y.length-_,0),A=-1,I=n.length,E=Ar(k+I);++j<k;)E[j]=y[j];for(k=j;++A<I;)E[k+A]=n[A];for(;++b<_;)E[k+d[b]]=y[j++];y=E}return s&&v<u?(e|=C,e&=~O,h||(e&=~(w|x)),v=le(0,u-v),Z([r,e,v,o,y,null,[]])):(v=c?o:this,p&&(r=v[g]),this instanceof t?(v=m(r.prototype),n=r.apply(v,y),sr(n)?n:v):r.apply(v,y))}var r=n[0],e=n[1],u=n[2],o=n[3],i=n[4],a=n[5],l=n[6],f=n[7],c=e&w,p=e&x,s=e&j,h=e&k,g=r;
|
||||
return _e(t,n),t}function lt(n,t){var u=n?n.length:0;if(!u)return[];var o=-1,i=Ot(),a=i===r,l=a&&be&&t&&200<=t.length,a=a&&!l,f=[],c=t?t.length:0;l&&(i=e,t=be(t));n:for(;++o<u;)if(l=n[o],a){for(var p=c;p--;)if(t[p]===l)continue n;f.push(l)}else 0>i(t,l)&&f.push(l);return f}function ft(n,t){var r=-1,e=n?n.length:0;if(typeof e=="number"&&-1<e)for(e|=0;++r<e&&false!==t(n[r],r,n););else vt(n,t);return n}function ct(n,t){var r=n?n.length:0;if(typeof r=="number"&&-1<r)for(r=0>(r|=0)?0:r;r--&&false!==t(n[r],r,n););else gt(n,t,Ie);
|
||||
return n}function pt(n,t,r,e){e=(0|e)-1;for(var u=n?n.length:0,o=[];++e<u;){var i=n[e];if(i&&typeof i=="object"&&typeof i.length=="number"&&(Oe(i)||fr(i))){t||(i=pt(i,t,r));var a=-1,l=i.length,f=o.length;for(o.length+=l;++a<l;)o[f++]=i[a]}else r||o.push(i)}return o}function st(n,t,r){var e=-1;r=r(n);for(var u=r.length;++e<u;){var o=r[e];if(false===t(n[o],o,n))break}return n}function gt(n,t,r){r=r(n);for(var e=r.length;e--;){var u=r[e];if(false===t(n[u],u,n))break}return n}function vt(n,t){return st(n,t,Ie)
|
||||
return n}function pt(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"&&(Oe(i)||fr(i))){t||(i=pt(i,t,r));var a=-1,l=i.length,f=o.length;for(o.length+=l;++a<l;)o[f++]=i[a]}else r||o.push(i)}return o}function st(n,t,r){var e=-1;r=r(n);for(var u=r.length;++e<u;){var o=r[e];if(false===t(n[o],o,n))break}return n}function gt(n,t,r){r=r(n);for(var e=r.length;e--;){var u=r[e];if(false===t(n[u],u,n))break}return n}function vt(n,t){return st(n,t,Ie)
|
||||
}function mt(n,t,r,e,u,o){if(r){var i=r(n,t);if(typeof i!="undefined")return!!i}if(n===t)return 0!==n||1/n==1/t;var a=typeof n,l=typeof t;if(n===n&&(null==n||null==t||"function"!=a&&"object"!=a&&"function"!=l&&"object"!=l))return false;if(l=Ur.call(n),a=Ur.call(t),l==G&&(l=rt),a==G&&(a=rt),l!=a)return false;switch(l){case J:case Q:return+n==+t;case tt:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case et:case ut:return n==Fr(t)}if(a=l==H,!a){var f=Yr.call(n,"__wrapped__"),c=Yr.call(t,"__wrapped__");if(f||c)return mt(f?n.__wrapped__:n,c?t.__wrapped__:t,r,e,u,o);
|
||||
if(l!=rt)return false;if(l=n.constructor,f=t.constructor,l!=f&&!(Yr.call(n,"constructor")&&Yr.call(t,"constructor")||pr(l)&&l instanceof l&&pr(f)&&f instanceof f)&&"constructor"in n&&"constructor"in t)return false}for(u||(u=[]),o||(o=[]),l=u.length;l--;)if(u[l]==n)return o[l]==t;var p=0,i=true;if(u.push(n),o.push(t),a){if(l=n.length,p=t.length,(i=p==l)||e)for(;p--;)if(a=l,f=t[p],e)for(;a--&&!(i=mt(n[a],f,r,e,u,o)););else if(!(i=mt(n[p],f,r,e,u,o)))break}else st(t,function(t,a,l){return Yr.call(l,a)?(p++,i=Yr.call(n,a)&&mt(n[a],t,r,e,u,o)):void 0
|
||||
},yr),i&&!e&&st(n,function(n,t,r){return Yr.call(r,t)?i=-1<--p:void 0},yr);return u.pop(),o.pop(),i}function dt(n,t,r,e,u){(Oe(t)?ft:vt)(t,function(t,o){var i,a,l=t,f=n[o];if(t&&((a=Oe(t))||Ae(t))){for(l=e.length;l--;)if(i=e[l]==t){f=u[l];break}if(!i){var c;r&&(l=r(f,t),c=typeof l!="undefined")&&(f=l),c||(f=a?Oe(f)?f:[]:Ae(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+Vr(se()*(t-n+1))}function _t(n,t,u){var o=n?n.length:0;
|
||||
if(!o)return[];var i=-1,a=Ot(),l=!t&&a===r,f=l&&be&&200<=o,l=l&&!f,c=[];if(f)var p=be(),a=e;else p=u&&!t?[]:c;n:for(;++i<o;){var s=n[i],h=u?u(s,i,n):s;if(l){for(var g=p.length;g--;)if(p[g]===h)continue n;u&&p.push(h),c.push(s)}else t?i&&p===h||(p=h,c.push(s)):0>a(p,h)&&((u||f)&&p.push(h),c.push(s))}return c}function wt(n,t){for(var r=-1,e=t(n),u=e.length,o=Ar(u);++r<u;)o[r]=n[e[r]];return o}function xt(n,t,r){for(var e=t.length,u=-1,o=le(r.length-e,0),i=-1,a=n.length,l=Ar(o+a);++i<a;)l[i]=n[i];for(;++u<e;)l[t[u]]=r[u];
|
||||
for(;o--;)l[i++]=r[u++];return l}function jt(n,t){return function(r,e,u){var i=t?[[],[]]:{};e=o.createCallback(e,u,3),u=-1;var a=0|(r&&r.length);if(0<a)for(;++u<a;){var l=r[u];n(i,l,e(l,u,r),r)}else ft(r,function(t,r,u){n(i,t,e(t,r,u),u)});return i}}function kt(n,t,r){return n=n.length,t|=0,n<t?(t-=n,r=null==r?" ":Fr(r),_r(r,Kr(t/r.length)).slice(0,t)):""}function Ct(n,t,r,e,u,o,i,a){var l=t&w,f=t&x,p=t&C,s=t&O;if(!f&&!pr(n))throw new $r;p&&!u.length&&(t&=~C,p=u=false),s&&!o.length&&(t&=~O,s=o=false);var h=!f&&n[I];
|
||||
return h&&true!==h?(h=Dt(h),h[4]&&(h[4]=Dt(h[4])),h[5]&&(h[5]=Dt(h[5])),typeof r=="number"&&(h[2]=r),n=h[1]&w,l&&!n&&(h[3]=e),!l&&n&&(t|=k),p&&(h[4]?Gr.apply(h[4],u):h[4]=u),s&&(h[5]?ne.apply(h[5],o):h[5]=o),h[1]|=t,Ct.apply(null,h)):(null==r?r=f?0:n.length:0>r&&(r=0),p&&(i=[]),s&&(a=[]),h=[n,t,r,e,u,o,i,a],t==w||t==(w|C)?c(h):Z(h))}function Ot(){var n=(n=o.indexOf)===Tt?r:n;return n}function At(n){return typeof n=="function"&&Pr.test(Zr.call(n))}function It(n){var t,r;return n&&Ur.call(n)==rt&&(Yr.call(n,"constructor")||(t=n.constructor,!pr(t)||t instanceof t))?(st(n,function(n,t){r=t
|
||||
for(;o--;)l[i++]=r[u++];return l}function jt(n,t){return function(r,e,u){var i=t?[[],[]]:{};e=o.createCallback(e,u,3),u=-1;var a=(a=r&&r.length,-1<a&&a>>>0);if(a)for(;++u<a;){var l=r[u];n(i,l,e(l,u,r),r)}else ft(r,function(t,r,u){n(i,t,e(t,r,u),u)});return i}}function kt(n,t,r){return n=n.length,t|=0,n<t?(t-=n,r=null==r?" ":Fr(r),_r(r,Kr(t/r.length)).slice(0,t)):""}function Ct(n,t,r,e,u,o,i,a){var l=t&w,f=t&x,p=t&C,s=t&O;if(!f&&!pr(n))throw new $r;p&&!u.length&&(t&=~C,p=u=false),s&&!o.length&&(t&=~O,s=o=false);
|
||||
var h=!f&&n[I];return h&&true!==h?(h=Dt(h),h[4]&&(h[4]=Dt(h[4])),h[5]&&(h[5]=Dt(h[5])),typeof r=="number"&&(h[2]=r),n=h[1]&w,l&&!n&&(h[3]=e),!l&&n&&(t|=k),p&&(h[4]?Gr.apply(h[4],u):h[4]=u),s&&(h[5]?ne.apply(h[5],o):h[5]=o),h[1]|=t,Ct.apply(null,h)):(null==r?r=f?0:n.length:0>r&&(r=0),p&&(i=[]),s&&(a=[]),h=[n,t,r,e,u,o,i,a],t==w||t==(w|C)?c(h):Z(h))}function Ot(){var n=(n=o.indexOf)===Tt?r:n;return n}function At(n){return typeof n=="function"&&Pr.test(Zr.call(n))}function It(n){var t,r;return n&&Ur.call(n)==rt&&(Yr.call(n,"constructor")||(t=n.constructor,!pr(t)||t instanceof t))?(st(n,function(n,t){r=t
|
||||
},yr),typeof r=="undefined"||Yr.call(n,r)):false}function Et(n){for(var t=-1,r=yr(n),e=r.length,u=[];++t<e;){var o=r[t];Yr.call(n,o)&&u.push(o)}return u}function Rt(n,t,r){var e=-1,u=n?n.length:0;for(t=o.createCallback(t,r,3);++e<u;)if(t(n[e],e,n))return e;return-1}function Nt(n,t,r){var e=n?n.length:0;for(t=o.createCallback(t,r,3);e--;)if(t(n[e],e,n))return e;return-1}function St(n,t,r){if(typeof t!="number"&&null!=t){var e=-1,u=n?n.length:0,i=0;for(t=o.createCallback(t,r,3);++e<u&&t(n[e],e,n);)i++
|
||||
}else if(i=t,null==i||r)return n?n[0]:_;return Dt(n,0,0>i?0:i)}function Tt(n,t,e){var u=n?n.length:0;if(typeof e=="number")e=0|(0>e?le(0,u+e):e);else if(e)return e=Lt(n,t),u&&n[e]===t?e:-1;return r(n,t,e)}function Wt(n,t,r){var e=n?n.length:0;if(typeof t!="number"&&null!=t){var u=e,i=0;for(t=o.createCallback(t,r,3);u--&&t(n[u],u,n);)i++}else i=null==t||r?1:t;return i=e-i,Dt(n,0,0>i?0:i)}function Ft(n,t,r){var e=n?n.length:0;if(typeof t!="number"&&null!=t){var u=e,i=0;for(t=o.createCallback(t,r,3);u--&&t(n[u],u,n);)i++
|
||||
}else if(i=t,null==i||r)return n?n[e-1]:_;return i=e-i,Dt(n,0>i?0:i)}function $t(n,t,r){if(typeof t!="number"&&null!=t){var e=-1,u=n?n.length:0,i=0;for(t=o.createCallback(t,r,3);++e<u&&t(n[e],e,n);)i++}else i=null==t||r?1:0>t?0:t;return Dt(n,i)}function Dt(n,t,r){var e=-1,u=n?n.length:0;for(t|=0,0>t?t=le(u+t,0):t>u&&(t=u),r=typeof r=="undefined"?u:0|r,0>r?r=le(u+r,0):r>u&&(r=u),u=t>r?0:r-t,r=Ar(u);++e<u;)r[e]=n[t+e];return r}function Lt(n,t,r,e){var u=0,i=n?n.length:u;for(r=r?o.createCallback(r,e,1):xr,t=r(t);u<i;)e=u+i>>>1,r(n[e])<t?u=e+1:i=e;
|
||||
}else if(i=t,null==i||r)return n?n[0]:_;return Dt(n,0,0>i?0:i)}function Tt(n,t,e){var u=n?n.length:0;if(typeof e=="number")e=0>e?le(0,u+e):e||0;else if(e)return e=Lt(n,t),u&&n[e]===t?e:-1;return r(n,t,e)}function Wt(n,t,r){var e=n?n.length:0;if(typeof t!="number"&&null!=t){var u=e,i=0;for(t=o.createCallback(t,r,3);u--&&t(n[u],u,n);)i++}else i=null==t||r?1:t;return i=e-i,Dt(n,0,0>i?0:i)}function Ft(n,t,r){var e=n?n.length:0;if(typeof t!="number"&&null!=t){var u=e,i=0;for(t=o.createCallback(t,r,3);u--&&t(n[u],u,n);)i++
|
||||
}else if(i=t,null==i||r)return n?n[e-1]:_;return i=e-i,Dt(n,0>i?0:i)}function $t(n,t,r){if(typeof t!="number"&&null!=t){var e=-1,u=n?n.length:0,i=0;for(t=o.createCallback(t,r,3);++e<u&&t(n[e],e,n);)i++}else i=null==t||r?1:0>t?0:t;return Dt(n,i)}function Dt(n,t,r){var e=-1,u=n?n.length:0;for(t=+t||0,0>t?t=le(u+t,0):t>u&&(t=u),r=typeof r=="undefined"?u:+r||0,0>r?r=le(u+r,0):r>u&&(r=u),u=t>r?0:r-t,r=Ar(u);++e<u;)r[e]=n[t+e];return r}function Lt(n,t,r,e){var u=0,i=n?n.length:u;for(r=r?o.createCallback(r,e,1):xr,t=r(t);u<i;)e=u+i>>>1,r(n[e])<t?u=e+1:i=e;
|
||||
return u}function zt(n,t,r,e){if(!n||!n.length)return[];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=o.createCallback(r,e,3)),_t(n,t,r)}function Bt(){for(var n=1<arguments.length?arguments:arguments[0],t=-1,r=n?Gt(Ce(n,"length")):0,e=Ar(0>r?0:r);++t<r;)e[t]=Ce(n,t);return e}function qt(n,t){var r=-1,e=n?n.length:0,u={};for(t||!e||Oe(n[0])||(t=[]);++r<e;){var o=n[r];t?u[o]=t[r]:o&&(u[o[0]]=o[1])}return u}function Ut(){return this.__wrapped__
|
||||
}function Pt(n,t,r){var e=n?n.length:0;if(r=0|(typeof r=="number"&&r),typeof e=="number"&&-1<e){if(typeof n=="string"||!Oe(n)&&vr(n))return r<e?re?re.call(n,t,r):-1<n.indexOf(t,r):false;var u=Ot();return r=0>r?le(0,(0|e)+r):r,-1<u(n,t,r)}var o=-1,i=false;return ft(n,function(n){return++o<r?void 0:!(i=n===t)}),i}function Kt(n,t,r){var e=true;t=o.createCallback(t,r,3),r=-1;var u=0|(n&&n.length);if(0<u){for(;++r<u;)if(!t(n[r],r,n))return false}else ft(n,function(n,r,u){return e=!!t(n,r,u)});return e}function Mt(n,t,r){var e=[];
|
||||
t=o.createCallback(t,r,3),r=-1;var u=0|(n&&n.length);if(0<u)for(;++r<u;){var i=n[r];t(i,r,n)&&e.push(i)}else ft(n,function(n,r,u){t(n,r,u)&&e.push(n)});return e}function Vt(n,t,r){return 0<(0|(n&&n.length))?(t=Rt(n,t,r),-1<t?n[t]:_):(t=ir(n,t,r),typeof t=="string"?n[t]:_)}function Zt(n,t,r){var e=-1,u=0|(n&&n.length);if(t=t&&typeof r=="undefined"?t:U(t,r,3),0<u)for(;++e<u&&false!==t(n[e],e,n););else ft(n,t);return n}function Xt(n,t,r){var e=0|(n&&n.length);if(t=t&&typeof r=="undefined"?t:U(t,r,3),0<e)for(;e--&&false!==t(n[e],e,n););else ct(n,t);
|
||||
return n}function Yt(n,t,r){var e=-1,u=0|(n&&n.length);if(t=o.createCallback(t,r,3),0<u)for(var i=Ar(u);++e<u;)i[e]=t(n[e],e,n);else i=[],ft(n,function(n,r,u){i[++e]=t(n,r,u)});return i}function Gt(n,t,r){var e=-1/0,i=e,a=typeof t;if("number"!=a&&"string"!=a||!r||r[t]!==n||(t=null),null==t&&Oe(n))for(r=-1,a=n.length;++r<a;){var l=n[r];l>i&&(i=l)}else t=null==t&&vr(n)?u:o.createCallback(t,r,3),ft(n,function(n,r,u){r=t(n,r,u),r>e&&(e=r,i=n)});return i}function Ht(n,t,r,e){var u=3>arguments.length;t=o.createCallback(t,e,4);
|
||||
var i=-1,a=0|(n&&n.length);if(0<a)for(u&&a&&(r=n[++i]);++i<a;)r=t(r,n[i],i,n);else ft(n,function(n,e,o){r=u?(u=false,n):t(r,n,e,o)});return r}function Jt(n,t,r,e){var u=3>arguments.length;return t=o.createCallback(t,e,4),ct(n,function(n,e,o){r=u?(u=false,n):t(r,n,e,o)}),r}function Qt(n){var t=-1,r=0|(n&&n.length),e=Ar(0>r?0:r);return ft(n,function(n){var r=bt(0,++t);e[t]=e[r],e[r]=n}),e}function nr(n,t,r){var e;t=o.createCallback(t,r,3),r=-1;var u=0|(n&&n.length);if(0<u){for(;++r<u;)if(t(n[r],r,n))return true
|
||||
}else ft(n,function(n,r,u){return!(e=t(n,r,u))});return!!e}function tr(n,t){if(3>arguments.length)return Ct(n,w,null,t);if(n)var r=n[I]?n[I][2]:n.length,e=Dt(arguments,2),r=r-e.length;return Ct(n,w|C,r,t,e)}function rr(n,t,r){var e,u,o,i,a,l,f,c=0,p=false,s=true;if(!pr(n))throw new $r;if(t=0>t?0:t,true===r)var h=true,s=false;else sr(r)&&(h=r.leading,p="maxWait"in r&&(le(t,r.maxWait)||0),s="trailing"in r?r.trailing:s);var g=function(){var r=t-(Fe()-i);0>=r||r>t?(u&&Mr(u),r=f,u=l=f=_,r&&(c=Fe(),o=n.apply(a,e),l||u||(e=a=null))):l=Jr(g,r)
|
||||
},v=function(){l&&Mr(l),u=l=f=_,(s||p!==t)&&(c=Fe(),o=n.apply(a,e),l||u||(e=a=null))};return function(){if(e=arguments,i=Fe(),a=this,f=s&&(l||!h),false===p)var r=h&&!l;else{u||h||(c=i);var y=p-(i-c),m=0>=y||y>p;m?(u&&(u=Mr(u)),c=i,o=n.apply(a,e)):u||(u=Jr(v,y))}return m&&l?l=Mr(l):l||t===p||(l=Jr(g,t)),r&&(m=true,o=n.apply(a,e)),!m||l||u||(e=a=null),o}}function er(n){if(!pr(n))throw new $r;return function(){return!n.apply(this,arguments)}}function ur(n,t,r){if(!n)return n;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=U(e[--o-1],e[o--],2);else 2<o&&"function"==typeof e[o-1]&&(a=e[--o]);for(;++u<o;){t=e[u];for(var i=-1,l=Ie(t),f=l.length;++i<f;){var c=l[i];n[c]=a?a(n[c],t[c]):t[c]}}return n}function or(){var t=Dt(arguments);return t.push(n),ur.apply(null,t)}function ir(n,t,r){var e;return t=o.createCallback(t,r,3),vt(n,function(n,r,u){return t(n,r,u)?(e=r,false):void 0}),e}function ar(n,t,r){var e;return t=o.createCallback(t,r,3),gt(n,function(n,r,u){return t(n,r,u)?(e=r,false):void 0
|
||||
},Ie),e}function lr(n){var t=[];return st(n,function(n,r){pr(n)&&t.push(r)},yr),t.sort()}function fr(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Ur.call(n)==G||false}function cr(n){return n&&typeof n=="object"&&1===n.nodeType&&-1<Ur.call(n).indexOf("Element")||false}function pr(n){return typeof n=="function"}function sr(n){var t=typeof n;return n&&("function"==t||"object"==t)||false}function hr(n){var t=typeof n;return"number"==t||n&&"object"==t&&Ur.call(n)==tt||false}function gr(n){return n&&typeof n=="object"&&Ur.call(n)==et||false
|
||||
}function vr(n){return typeof n=="string"||n&&typeof n=="object"&&Ur.call(n)==ut||false}function yr(n){var t=[];if(!sr(n))return t;for(var r in n)t.push(r);return t}function mr(n,t,r){var e={};if(typeof t!="function")for(var u=-1,i=pt(arguments,true,false,1),a=sr(n)?i.length:0;++u<a;){var l=i[u];l in n&&(e[l]=n[l])}else t=o.createCallback(t,r,3),st(n,function(n,r,u){t(n,r,u)&&(e[r]=n)},yr);return e}function dr(n){return wt(n,Ie)}function br(n){return null==n?"":Fr(n).replace(K,"\\$&")}function _r(n,t){var r="";
|
||||
if(t|=0,1>t||null==n)return r;n=Fr(n);do t%2&&(r+=n),t=Vr(t/2),n+=n;while(t);return r}function wr(n,t,r){var e=typeof n;return"function"==e||null==n?(typeof t=="undefined"||!("prototype"in n))&&n||U(n,t,r):"object"!=e?Or(n):jr(n)}function xr(n){return n}function jr(n){n||(n={});var t=Ie(n),r=t.length,e=t[0],u=n[e];return 1!=r||u!==u||sr(u)?function(e){for(var u=r,o=false;u--&&(o=t[u],o=Yr.call(e,o)&&mt(e[o],n[o],null,true)););return o}:function(n){return Yr.call(n,e)?(n=n[e],u===n&&(0!==u||1/u==1/n)):false
|
||||
}}function kr(n,t,r){var e=true,u=t&&lr(t);t&&(r||u.length)||(null==r&&(r=t),t=n,n=o,u=lr(t)),false===r?e=false:sr(r)&&"chain"in r&&(e=r.chain),r=-1;for(var i=pr(n),a=u?u.length:0;++r<a;){var l=u[r],f=n[l]=t[l];i&&(n.prototype[l]=function(t){return function(){var r=this.__chain__,u=this.__wrapped__,o=[u];if(Gr.apply(o,arguments),o=t.apply(n,o),e||r){if(u===o&&sr(o))return this;o=new n(o),o.__chain__=r}return o}}(f))}}function Cr(){}function Or(n){return function(t){return t[n]}}t=t?yt.defaults(ht.Object(),t,yt.pick(ht,Y)):ht;
|
||||
var Ar=t.Array,Ir=t.Boolean,Er=t.Date,Rr=t.Function,Nr=t.Math,Sr=t.Number,Tr=t.Object,Wr=t.RegExp,Fr=t.String,$r=t.TypeError,Dr=Ar.prototype,Lr=Tr.prototype,zr=Fr.prototype,Br=(Br=t.window)&&Br.document,qr=t._,Ur=Lr.toString,Pr=Wr("^"+br(Ur).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Kr=Nr.ceil,Mr=t.clearTimeout,Vr=Nr.floor,Zr=Rr.prototype.toString,Xr=At(Xr=Tr.getPrototypeOf)&&Xr,Yr=Lr.hasOwnProperty,Gr=Dr.push,Hr=At(Hr=t.Set)&&Hr,Jr=t.setTimeout,Qr=Dr.splice,ne=Dr.unshift,te=function(){try{var n={},t=At(t=Tr.defineProperty)&&t,r=t(n,n,n)&&t
|
||||
}function Pt(n,t,r){var e=(e=n&&n.length,-1<e&&e>>>0);if(r=typeof r=="number"&&+r||0,e){if(typeof n=="string"||!Oe(n)&&vr(n))return r<e?re?re.call(n,t,r):-1<n.indexOf(t,r):false;var u=Ot();return r=0>r?le(0,e+r):r,-1<u(n,t,r)}var o=-1,i=false;return ft(n,function(n){return++o<r?void 0:!(i=n===t)}),i}function Kt(n,t,r){var e=true;t=o.createCallback(t,r,3),r=-1;var u=(u=n&&n.length,-1<u&&u>>>0);if(u){for(;++r<u;)if(!t(n[r],r,n))return false}else ft(n,function(n,r,u){return e=!!t(n,r,u)});return e}function Mt(n,t,r){var e=[];
|
||||
t=o.createCallback(t,r,3),r=-1;var u=(u=n&&n.length,-1<u&&u>>>0);if(u)for(;++r<u;){var i=n[r];t(i,r,n)&&e.push(i)}else ft(n,function(n,r,u){t(n,r,u)&&e.push(n)});return e}function Vt(n,t,r){var e=(e=n&&n.length,-1<e&&e>>>0);return e?(t=Rt(n,t,r),-1<t?n[t]:_):(t=ir(n,t,r),typeof t=="string"?n[t]:_)}function Zt(n,t,r){var e=-1,u=(u=n&&n.length,-1<u&&u>>>0);if(t=t&&typeof r=="undefined"?t:U(t,r,3),u)for(;++e<u&&false!==t(n[e],e,n););else ft(n,t);return n}function Xt(n,t,r){var e=(e=n&&n.length,-1<e&&e>>>0);
|
||||
if(t=t&&typeof r=="undefined"?t:U(t,r,3),e)for(;e--&&false!==t(n[e],e,n););else ct(n,t);return n}function Yt(n,t,r){var e=-1,u=(u=n&&n.length,-1<u&&u>>>0);if(t=o.createCallback(t,r,3),u)for(var i=Ar(u);++e<u;)i[e]=t(n[e],e,n);else i=[],ft(n,function(n,r,u){i[++e]=t(n,r,u)});return i}function Gt(n,t,r){var e=-1/0,i=e,a=typeof t;if("number"!=a&&"string"!=a||!r||r[t]!==n||(t=null),null==t&&Oe(n))for(r=-1,a=n.length;++r<a;){var l=n[r];l>i&&(i=l)}else t=null==t&&vr(n)?u:o.createCallback(t,r,3),ft(n,function(n,r,u){r=t(n,r,u),r>e&&(e=r,i=n)
|
||||
});return i}function Ht(n,t,r,e){var u=3>arguments.length;t=o.createCallback(t,e,4);var i=-1,a=(a=n&&n.length,-1<a&&a>>>0);if(a)for(u&&a&&(r=n[++i]);++i<a;)r=t(r,n[i],i,n);else ft(n,function(n,e,o){r=u?(u=false,n):t(r,n,e,o)});return r}function Jt(n,t,r,e){var u=3>arguments.length;return t=o.createCallback(t,e,4),ct(n,function(n,e,o){r=u?(u=false,n):t(r,n,e,o)}),r}function Qt(n){var t=-1,r=n&&n.length,e=Ar(0>r?0:r>>>0);return ft(n,function(n){var r=bt(0,++t);e[t]=e[r],e[r]=n}),e}function nr(n,t,r){var e;
|
||||
t=o.createCallback(t,r,3),r=-1;var u=(u=n&&n.length,-1<u&&u>>>0);if(u){for(;++r<u;)if(t(n[r],r,n))return true}else ft(n,function(n,r,u){return!(e=t(n,r,u))});return!!e}function tr(n,t){if(3>arguments.length)return Ct(n,w,null,t);if(n)var r=n[I]?n[I][2]:n.length,e=Dt(arguments,2),r=r-e.length;return Ct(n,w|C,r,t,e)}function rr(n,t,r){var e,u,o,i,a,l,f,c=0,p=false,s=true;if(!pr(n))throw new $r;if(t=0>t?0:t,true===r)var h=true,s=false;else sr(r)&&(h=r.leading,p="maxWait"in r&&(le(t,r.maxWait)||0),s="trailing"in r?r.trailing:s);
|
||||
var g=function(){var r=t-(Fe()-i);0>=r||r>t?(u&&Mr(u),r=f,u=l=f=_,r&&(c=Fe(),o=n.apply(a,e),l||u||(e=a=null))):l=Jr(g,r)},v=function(){l&&Mr(l),u=l=f=_,(s||p!==t)&&(c=Fe(),o=n.apply(a,e),l||u||(e=a=null))};return function(){if(e=arguments,i=Fe(),a=this,f=s&&(l||!h),false===p)var r=h&&!l;else{u||h||(c=i);var y=p-(i-c),m=0>=y||y>p;m?(u&&(u=Mr(u)),c=i,o=n.apply(a,e)):u||(u=Jr(v,y))}return m&&l?l=Mr(l):l||t===p||(l=Jr(g,t)),r&&(m=true,o=n.apply(a,e)),!m||l||u||(e=a=null),o}}function er(n){if(!pr(n))throw new $r;
|
||||
return function(){return!n.apply(this,arguments)}}function ur(n,t,r){if(!n)return n;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=U(e[--o-1],e[o--],2);else 2<o&&"function"==typeof e[o-1]&&(a=e[--o]);for(;++u<o;){t=e[u];for(var i=-1,l=Ie(t),f=l.length;++i<f;){var c=l[i];n[c]=a?a(n[c],t[c]):t[c]}}return n}function or(){var t=Dt(arguments);return t.push(n),ur.apply(null,t)}function ir(n,t,r){var e;return t=o.createCallback(t,r,3),vt(n,function(n,r,u){return t(n,r,u)?(e=r,false):void 0
|
||||
}),e}function ar(n,t,r){var e;return t=o.createCallback(t,r,3),gt(n,function(n,r,u){return t(n,r,u)?(e=r,false):void 0},Ie),e}function lr(n){var t=[];return st(n,function(n,r){pr(n)&&t.push(r)},yr),t.sort()}function fr(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Ur.call(n)==G||false}function cr(n){return n&&typeof n=="object"&&1===n.nodeType&&-1<Ur.call(n).indexOf("Element")||false}function pr(n){return typeof n=="function"}function sr(n){var t=typeof n;return n&&("function"==t||"object"==t)||false
|
||||
}function hr(n){var t=typeof n;return"number"==t||n&&"object"==t&&Ur.call(n)==tt||false}function gr(n){return n&&typeof n=="object"&&Ur.call(n)==et||false}function vr(n){return typeof n=="string"||n&&typeof n=="object"&&Ur.call(n)==ut||false}function yr(n){var t=[];if(!sr(n))return t;for(var r in n)t.push(r);return t}function mr(n,t,r){var e={};if(typeof t!="function")for(var u=-1,i=pt(arguments,true,false,1),a=sr(n)?i.length:0;++u<a;){var l=i[u];l in n&&(e[l]=n[l])}else t=o.createCallback(t,r,3),st(n,function(n,r,u){t(n,r,u)&&(e[r]=n)
|
||||
},yr);return e}function dr(n){return wt(n,Ie)}function br(n){return null==n?"":Fr(n).replace(K,"\\$&")}function _r(n,t){var r="";if(t|=0,1>t||null==n)return r;n=Fr(n);do t%2&&(r+=n),t=Vr(t/2),n+=n;while(t);return r}function wr(n,t,r){var e=typeof n;return"function"==e||null==n?(typeof t=="undefined"||!("prototype"in n))&&n||U(n,t,r):"object"!=e?Or(n):jr(n)}function xr(n){return n}function jr(n){n||(n={});var t=Ie(n),r=t.length,e=t[0],u=n[e];return 1!=r||u!==u||sr(u)?function(e){for(var u=r,o=false;u--&&(o=t[u],o=Yr.call(e,o)&&mt(e[o],n[o],null,true)););return o
|
||||
}:function(n){return Yr.call(n,e)?(n=n[e],u===n&&(0!==u||1/u==1/n)):false}}function kr(n,t,r){var e=true,u=t&&lr(t);t&&(r||u.length)||(null==r&&(r=t),t=n,n=o,u=lr(t)),false===r?e=false:sr(r)&&"chain"in r&&(e=r.chain),r=-1;for(var i=pr(n),a=u?u.length:0;++r<a;){var l=u[r],f=n[l]=t[l];i&&(n.prototype[l]=function(t){return function(){var r=this.__chain__,u=this.__wrapped__,o=[u];if(Gr.apply(o,arguments),o=t.apply(n,o),e||r){if(u===o&&sr(o))return this;o=new n(o),o.__chain__=r}return o}}(f))}}function Cr(){}function Or(n){return function(t){return t[n]
|
||||
}}t=t?yt.defaults(ht.Object(),t,yt.pick(ht,Y)):ht;var Ar=t.Array,Ir=t.Boolean,Er=t.Date,Rr=t.Function,Nr=t.Math,Sr=t.Number,Tr=t.Object,Wr=t.RegExp,Fr=t.String,$r=t.TypeError,Dr=Ar.prototype,Lr=Tr.prototype,zr=Fr.prototype,Br=(Br=t.window)&&Br.document,qr=t._,Ur=Lr.toString,Pr=Wr("^"+br(Ur).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Kr=Nr.ceil,Mr=t.clearTimeout,Vr=Nr.floor,Zr=Rr.prototype.toString,Xr=At(Xr=Tr.getPrototypeOf)&&Xr,Yr=Lr.hasOwnProperty,Gr=Dr.push,Hr=At(Hr=t.Set)&&Hr,Jr=t.setTimeout,Qr=Dr.splice,ne=Dr.unshift,te=function(){try{var n={},t=At(t=Tr.defineProperty)&&t,r=t(n,n,n)&&t
|
||||
}catch(e){}return r}(),re=At(re=zr.contains)&&re,ee=At(ee=Tr.create)&&ee,ue=At(ue=Ar.isArray)&&ue,oe=t.isFinite,ie=t.isNaN,ae=At(ae=Tr.keys)&&ae,le=Nr.max,fe=Nr.min,ce=At(ce=Er.now)&&ce,pe=t.parseInt,se=Nr.random,he=At(he=zr.trim)&&!he.call(X)&&he,ge=At(ge=zr.trimLeft)&&!ge.call(X)&&ge,ve=At(ve=zr.trimRight)&&!ve.call(X)&&ve,ye={};ye[H]=Ar,ye[J]=Ir,ye[Q]=Er,ye[nt]=Rr,ye[rt]=Tr,ye[tt]=Sr,ye[et]=Wr,ye[ut]=Fr,i.prototype=o.prototype;var me=o.support={};me.funcDecomp=!At(t.WinRTError)&&M.test(b),me.funcNames=typeof Rr.name=="string";
|
||||
try{me.dom=11===Br.createDocumentFragment().nodeType}catch(de){me.dom=false}o.templateSettings={escape:F,evaluate:$,interpolate:D,variable:"",imports:{_:o}},ee||(m=function(){function n(){}return function(r){if(sr(r)){n.prototype=r;var e=new n;n.prototype=null}return e||t.Object()}}());var be=Hr&&function(n){var t=new Hr,r=n?n.length:0;for(t.push=t.add;r--;)t.push(n[r]);return t},_e=te?function(n,t){at.value=t,te(n,I,at)}:Cr,we=jt(function(n,t,r){Yr.call(n,r)?n[r]++:n[r]=1}),xe=jt(function(n,t,r){Yr.call(n,r)?n[r].push(t):n[r]=[t]
|
||||
}),je=jt(function(n,t,r){n[r]=t}),ke=jt(function(n,t,r){n[r?0:1].push(t)},true),Ce=Yt,Oe=ue||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Ur.call(n)==H||false};me.dom||(cr=function(n){return n&&typeof n=="object"&&1===n.nodeType&&!Ae(n)||false});var Ae=Xr?function(n){if(!n||Ur.call(n)!=rt)return false;var t=n.valueOf,r=At(t)&&(r=Xr(t))&&Xr(r);return r?n==r||Xr(n)==r:It(n)}:It,Ie=ae?function(n){return sr(n)?ae(n):[]}:Et,Ee=f(function(n,t,r){return n+t.charAt(0)[r?"toUpperCase":"toLowerCase"]()+t.slice(1)
|
||||
@@ -42,23 +42,23 @@ try{me.dom=11===Br.createDocumentFragment().nodeType}catch(de){me.dom=false}o.te
|
||||
},o.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},o.compose=function(){for(var n=arguments,t=n.length,r=t;r--;)if(!pr(n[r]))throw new $r;return function(){for(var r=t-1,e=n[r].apply(this,arguments);r--;)e=n[r].call(this,e);return e}},o.constant=function(n){return function(){return n}},o.countBy=we,o.create=function(n,t){var r=m(n);return t?ur(r,t):r},o.createCallback=wr,o.curry=function(n,t){return typeof t!="number"&&(t=+t||(n?n.length:0)),Ct(n,j,t)
|
||||
},o.debounce=rr,o.defaults=or,o.defer=function(n){if(!pr(n))throw new $r;var t=Dt(arguments,1);return Jr(function(){n.apply(_,t)},1)},o.delay=function(n,t){if(!pr(n))throw new $r;var r=Dt(arguments,2);return Jr(function(){n.apply(_,r)},t)},o.difference=function(n){return lt(n,pt(arguments,true,true,1))},o.drop=$t,o.dropRight=Wt,o.dropRightWhile=Wt,o.dropWhile=$t,o.filter=Mt,o.flatten=function(n,t,r,e){if(!n||!n.length)return[];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=Yt(n,r,e)),pt(n,t)
|
||||
},o.forEach=Zt,o.forEachRight=Xt,o.forIn=function(n,t,r){return t=t&&typeof r=="undefined"?t:U(t,r,3),st(n,t,yr)},o.forInRight=function(n,t,r){return t=U(t,r,3),gt(n,t,yr)},o.forOwn=function(n,t,r){return t=t&&typeof r=="undefined"?t:U(t,r,3),vt(n,t)},o.forOwnRight=function(n,t,r){return t=U(t,r,3),gt(n,t,Ie)},o.functions=lr,o.groupBy=xe,o.indexBy=je,o.initial=Wt,o.intersection=function(n){if(!n)return[];for(var t=[],u=-1,o=arguments.length,i=[],a=Ot(),l=be&&a===r,f=[];++u<o;){var c=arguments[u];
|
||||
(Oe(c)||fr(c))&&(t.push(c),i.push(l&&120<=c.length&&be(u?c:f)))}o=t.length,n=t[0];var l=-1,p=n?n.length:0,s=[];n:for(;++l<p;){var h=i[0],c=n[l];if(0>(h?e(h,c):a(f,c))){for(u=o,(h||f).push(c);--u;)if(h=i[u],0>(h?e(h,c):a(t[u],c)))continue n;s.push(c)}}return s},o.invert=function(n,t){for(var r=-1,e=Ie(n),u=e.length,o={};++r<u;){var i=e[r],a=n[i];t?Yr.call(o,a)?o[a].push(i):o[a]=[i]:o[a]=i}return o},o.invoke=function(n,t){var r=Dt(arguments,2),e=-1,u=typeof t=="function",o=0|(n&&n.length),i=Ar(0>o?0:o);
|
||||
(Oe(c)||fr(c))&&(t.push(c),i.push(l&&120<=c.length&&be(u?c:f)))}o=t.length,n=t[0];var l=-1,p=n?n.length:0,s=[];n:for(;++l<p;){var h=i[0],c=n[l];if(0>(h?e(h,c):a(f,c))){for(u=o,(h||f).push(c);--u;)if(h=i[u],0>(h?e(h,c):a(t[u],c)))continue n;s.push(c)}}return s},o.invert=function(n,t){for(var r=-1,e=Ie(n),u=e.length,o={};++r<u;){var i=e[r],a=n[i];t?Yr.call(o,a)?o[a].push(i):o[a]=[i]:o[a]=i}return o},o.invoke=function(n,t){var r=Dt(arguments,2),e=-1,u=typeof t=="function",o=n&&n.length,i=Ar(0>o?0:o>>>0);
|
||||
return ft(n,function(n){i[++e]=(u?t:n[t]).apply(n,r)}),i},o.keys=Ie,o.keysIn=yr,o.map=Yt,o.mapValues=function(n,t,r){var e={};return t=o.createCallback(t,r,3),vt(n,function(n,r,u){e[r]=t(n,r,u)}),e},o.matches=jr,o.max=Gt,o.memoize=function(n,t){if(!pr(n))throw new $r;var r=function(){var e=r.cache,u=t?t.apply(this,arguments):"_"+arguments[0];return Yr.call(e,u)?e[u]:e[u]=n.apply(this,arguments)};return r.cache={},r},o.merge=function(n,t,r){if(!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=U(e[--u-1],e[u--],2);
|
||||
else 2<u&&"function"==typeof e[u-1]&&(i=e[--u]);for(var e=Dt(e,1,u),o=-1,a=[],l=[];++o<u;)dt(n,e[o],i,a,l);return n},o.min=function(n,t,r){var e=1/0,i=e,a=typeof t;if("number"!=a&&"string"!=a||!r||r[t]!==n||(t=null),null==t&&Oe(n))for(r=-1,a=n.length;++r<a;){var l=n[r];l<i&&(i=l)}else t=null==t&&vr(n)?u:o.createCallback(t,r,3),ft(n,function(n,r,u){r=t(n,r,u),r<e&&(e=r,i=n)});return i},o.negate=er,o.omit=function(n,t,r){if(typeof t=="function")return t=o.createCallback(t,r,3),mr(n,er(t));for(var e=pt(arguments,true,false,1),u=e.length;u--;)e[u]=Fr(e[u]);
|
||||
return mr(n,lt(yr(n),e))},o.once=function(n){var t,r;if(!pr(n))throw new $r;return function(){return t?r:(t=true,r=n.apply(this,arguments),n=null,r)}},o.pairs=function(n){for(var t=-1,r=Ie(n),e=r.length,u=Ar(e);++t<e;){var o=r[t];u[t]=[o,n[o]]}return u},o.partial=function(n){if(n)var t=n[I]?n[I][2]:n.length,r=Dt(arguments,1),t=t-r.length;return Ct(n,C,t,null,r)},o.partialRight=function(n){if(n)var t=n[I]?n[I][2]:n.length,r=Dt(arguments,1),t=t-r.length;return Ct(n,O,t,null,null,r)},o.partition=ke,o.pick=mr,o.pluck=Ce,o.property=Or,o.pull=function(n){for(var t=0,r=arguments.length,e=n?n.length:0;++t<r;)for(var u=-1,o=arguments[t];++u<e;)n[u]===o&&(Qr.call(n,u--,1),e--);
|
||||
return n},o.range=function(n,t,r){n=+n||0,r=null==r?1:+r||0,null==t?(t=n,n=0):t=+t||0;var e=-1;t=le(0,Kr((t-n)/(r||1)));for(var u=Ar(t);++e<t;)u[e]=n,n+=r;return u},o.reject=function(n,t,r){return t=o.createCallback(t,r,3),Mt(n,er(t))},o.remove=function(n,t,r){var e=-1,u=n?n.length:0,i=[];for(t=o.createCallback(t,r,3);++e<u;)r=n[e],t(r,e,n)&&(i.push(r),Qr.call(n,e--,1),u--);return i},o.rest=$t,o.shuffle=Qt,o.slice=Dt,o.sortBy=function(n,t,r){var e=-1,u=0|(n&&n.length),i=t&&Oe(t),f=Ar(0>u?0:u);for(i||(t=o.createCallback(t,r,3)),ft(n,function(n,r,u){if(i)for(r=t.length,u=Ar(r);r--;)u[r]=n[t[r]];
|
||||
return n},o.range=function(n,t,r){n=+n||0,r=null==r?1:+r||0,null==t?(t=n,n=0):t=+t||0;var e=-1;t=le(0,Kr((t-n)/(r||1)));for(var u=Ar(t);++e<t;)u[e]=n,n+=r;return u},o.reject=function(n,t,r){return t=o.createCallback(t,r,3),Mt(n,er(t))},o.remove=function(n,t,r){var e=-1,u=n?n.length:0,i=[];for(t=o.createCallback(t,r,3);++e<u;)r=n[e],t(r,e,n)&&(i.push(r),Qr.call(n,e--,1),u--);return i},o.rest=$t,o.shuffle=Qt,o.slice=Dt,o.sortBy=function(n,t,r){var e=-1,u=n&&n.length,i=t&&Oe(t),f=Ar(0>u?0:u>>>0);for(i||(t=o.createCallback(t,r,3)),ft(n,function(n,r,u){if(i)for(r=t.length,u=Ar(r);r--;)u[r]=n[t[r]];
|
||||
else u=t(n,r,u);f[++e]={a:u,b:e,c:n}}),u=f.length,f.sort(i?l:a);u--;)f[u]=f[u].c;return f},o.tap=function(n,t,r){return t.call(r,n),n},o.throttle=function(n,t,r){var e=true,u=true;if(!pr(n))throw new $r;return false===r?e=false:sr(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),it.leading=e,it.maxWait=+t,it.trailing=u,rr(n,t,it)},o.times=function(n,t,r){n=-1<(n=+n)?n:0;var e=-1,u=Ar(n);for(t=U(t,r,1);++e<n;)u[e]=t(e);return u},o.toArray=function(n){var t=n&&n.length;return typeof t=="number"&&-1<t?Dt(n):dr(n)
|
||||
},o.transform=function(n,t,r,e){var u=Oe(n);if(null==r)if(u)r=[];else{var i=n&&n.constructor;r=m(i&&i.prototype)}return t&&(t=o.createCallback(t,e,4),(u?ft:vt)(n,function(n,e,u){return t(r,n,e,u)})),r},o.union=function(){return _t(pt(arguments,true,true))},o.uniq=zt,o.values=dr,o.valuesIn=function(n){return wt(n,yr)},o.where=Mt,o.without=function(){return lt(arguments[0],Dt(arguments,1))},o.wrap=function(n,t){return Ct(t,C,null,null,[n])},o.xor=function(){for(var n=-1,t=arguments.length;++n<t;){var r=arguments[n];
|
||||
if(Oe(r)||fr(r))var e=e?lt(e,r).concat(lt(r,e)):r}return e?_t(e):[]},o.zip=Bt,o.zipObject=qt,o.callback=wr,o.collect=Yt,o.each=Zt,o.eachRight=Xt,o.extend=ur,o.methods=lr,o.object=qt,o.select=Mt,o.tail=$t,o.unique=zt,o.unzip=Bt,kr(ur({},o)),o.camelCase=Ee,o.capitalize=function(n){return null==n?"":(n=Fr(n),n.charAt(0).toUpperCase()+n.slice(1))},o.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=typeof r=="function"&&U(r,e,1),y(n,t,r)
|
||||
},o.cloneDeep=function(n,t,r){return t=typeof t=="function"&&U(t,r,1),y(n,true,t)},o.contains=Pt,o.endsWith=function(n,t,r){n=null==n?"":Fr(n),t=Fr(t);var e=n.length;return r=(typeof r=="number"?fe(le(0|r,0),e):e)-t.length,0<=r&&n.indexOf(t,r)==r},o.escape=function(n){return null==n?"":Fr(n).replace(W,p)},o.escapeRegExp=br,o.every=Kt,o.find=Vt,o.findIndex=Rt,o.findKey=ir,o.findLast=function(n,t,r){return 0<(0|(n&&n.length))?(t=Nt(n,t,r),-1<t?n[t]:_):(t=ar(n,t,r),typeof t=="string"?n[t]:_)},o.findLastIndex=Nt,o.findLastKey=ar,o.has=function(n,t){return n?Yr.call(n,t):false
|
||||
},o.identity=xr,o.indexOf=Tt,o.isArguments=fr,o.isArray=Oe,o.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&Ur.call(n)==J||false},o.isDate=function(n){return n&&typeof n=="object"&&Ur.call(n)==Q||false},o.isElement=cr,o.isEmpty=function(n){var t=true;if(!n)return t;var r=Ur.call(n),e=n.length;return r==H||r==ut||r==G||r==rt&&typeof e=="number"&&pr(n.splice)?!e:(vt(n,function(){return t=false}),t)},o.isEqual=function(n,t,r,e){if(r=typeof r=="function"&&U(r,e,2),!r){if(n===t)return 0!==n||1/n==1/t;
|
||||
},o.cloneDeep=function(n,t,r){return t=typeof t=="function"&&U(t,r,1),y(n,true,t)},o.contains=Pt,o.endsWith=function(n,t,r){n=null==n?"":Fr(n),t=Fr(t);var e=n.length;return r=(typeof r=="number"?fe(le(+r||0,0),e):e)-t.length,0<=r&&n.indexOf(t,r)==r},o.escape=function(n){return null==n?"":Fr(n).replace(W,p)},o.escapeRegExp=br,o.every=Kt,o.find=Vt,o.findIndex=Rt,o.findKey=ir,o.findLast=function(n,t,r){var e=(e=n&&n.length,-1<e&&e>>>0);return e?(t=Nt(n,t,r),-1<t?n[t]:_):(t=ar(n,t,r),typeof t=="string"?n[t]:_)
|
||||
},o.findLastIndex=Nt,o.findLastKey=ar,o.has=function(n,t){return n?Yr.call(n,t):false},o.identity=xr,o.indexOf=Tt,o.isArguments=fr,o.isArray=Oe,o.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&Ur.call(n)==J||false},o.isDate=function(n){return n&&typeof n=="object"&&Ur.call(n)==Q||false},o.isElement=cr,o.isEmpty=function(n){var t=true;if(!n)return t;var r=Ur.call(n),e=n.length;return r==H||r==ut||r==G||r==rt&&typeof e=="number"&&pr(n.splice)?!e:(vt(n,function(){return t=false}),t)},o.isEqual=function(n,t,r,e){if(r=typeof r=="function"&&U(r,e,2),!r){if(n===t)return 0!==n||1/n==1/t;
|
||||
e=typeof n;var u=typeof t;if(n===n&&(null==n||null==t||"function"!=e&&"object"!=e&&"function"!=u&&"object"!=u))return false}return mt(n,t,r)},o.isFinite=function(n){return oe(n)&&!ie(parseFloat(n))},o.isFunction=pr,o.isNaN=function(n){return hr(n)&&n!=+n},o.isNull=function(n){return null===n},o.isNumber=hr,o.isObject=sr,o.isPlainObject=Ae,o.isRegExp=gr,o.isString=vr,o.isUndefined=function(n){return typeof n=="undefined"},o.kebabCase=Re,o.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(r|=0,e=(0>r?le(0,e+r):fe(r,e-1))+1);e--;)if(n[e]===t)return e;
|
||||
return-1},o.mixin=kr,o.noConflict=function(){return t._=qr,this},o.noop=Cr,o.now=Fe,o.pad=function(n,t,r){n=null==n?"":Fr(n),t|=0;var e=n.length;return e<t?(e=(t-e)/2,t=Vr(e),e=Kr(e),r=kt("",e,r),r.slice(0,t)+n+r):n},o.padLeft=function(n,t,r){return n=null==n?"":Fr(n),kt(n,t,r)+n},o.padRight=function(n,t,r){return n=null==n?"":Fr(n),n+kt(n,t,r)},o.parseInt=$e,o.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=se(),fe(n+r*(t-n+parseFloat("1e-"+((r+"").length-1))),t)):bt(n,t)
|
||||
},o.reduce=Ht,o.reduceRight=Jt,o.repeat=_r,o.result=function(n,t,r){var e=null==n?_:n[t];return typeof e=="undefined"?r:pr(e)?n[t]():e},o.runInContext=b,o.size=function(n){var t=n?n.length:0;return typeof t=="number"&&-1<t?t:Ie(n).length},o.some=nr,o.sortedIndex=Lt,o.snakeCase=Ne,o.startsWith=function(n,t,r){return n=null==n?"":Fr(n),r=typeof r=="number"?fe(le(0|r,0),n.length):0,n.lastIndexOf(t,r)==r},o.template=function(n,t,r){var e=o.templateSettings;r=or({},r,e),n=Fr(null==n?"":n);var u,i,a=or({},r.imports,e.imports),e=Ie(a),a=dr(a),l=0,f=r.interpolate||P,c="__p+='",f=Wr((r.escape||P).source+"|"+f.source+"|"+(f===D?L:P).source+"|"+(r.evaluate||P).source+"|$","g");
|
||||
},o.reduce=Ht,o.reduceRight=Jt,o.repeat=_r,o.result=function(n,t,r){var e=null==n?_:n[t];return typeof e=="undefined"?r:pr(e)?n[t]():e},o.runInContext=b,o.size=function(n){var t=n?n.length:0;return typeof t=="number"&&-1<t?t:Ie(n).length},o.some=nr,o.sortedIndex=Lt,o.snakeCase=Ne,o.startsWith=function(n,t,r){return n=null==n?"":Fr(n),r=typeof r=="number"?fe(le(+r||0,0),n.length):0,n.lastIndexOf(t,r)==r},o.template=function(n,t,r){var e=o.templateSettings;r=or({},r,e),n=Fr(null==n?"":n);var u,i,a=or({},r.imports,e.imports),e=Ie(a),a=dr(a),l=0,f=r.interpolate||P,c="__p+='",f=Wr((r.escape||P).source+"|"+f.source+"|"+(f===D?L:P).source+"|"+(r.evaluate||P).source+"|$","g");
|
||||
n.replace(f,function(t,r,e,o,a,f){return e||(e=o),c+=n.slice(l,f).replace(V,s),r&&(u=true,c+="'+__e("+r+")+'"),a&&(i=true,c+="';"+a+";\n__p+='"),e&&(c+="'+((__t=("+e+"))==null?'':__t)+'"),l=f+t.length,t}),c+="';",(r=r.variable)||(c="with(obj){"+c+"}"),c=(i?c.replace(R,""):c).replace(N,"$1").replace(S,"$1;"),c="function("+(r||"obj")+"){"+(r?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+c+"return __p}";try{var p=Rr(e,"return "+c).apply(_,a)
|
||||
}catch(h){throw h.source=c,h}return t?p(t):(p.source=c,p)},o.trim=Se,o.trimLeft=Te,o.trimRight=We,o.truncate=function(n,t){var r=30,e="...";if(t&&sr(t))var u="separator"in t?t.separator:u,r="length"in t?0|t.length:r,e="omission"in t?Fr(t.omission):e;else null!=t&&(r=0|t);if(n=null==n?"":Fr(n),r>=n.length)return n;var o=r-e.length;if(1>o)return e;if(r=n.slice(0,o),null==u)return r+e;if(gr(u)){if(n.slice(o).search(u)){var i,a,l=n.slice(0,o);for(u.global||(u=Wr(u.source,(z.exec(u)||"")+"g")),u.lastIndex=0;i=u.exec(l);)a=i.index;
|
||||
r=r.slice(0,null==a?o:a)}}else n.indexOf(u,o)!=o&&(u=r.lastIndexOf(u),-1<u&&(r=r.slice(0,u)));return r+e},o.unescape=function(n){return null==n?"":(n=Fr(n),0>n.indexOf(";")?n:n.replace(T,d))},o.uniqueId=function(n){var t=++E;return Fr(null==n?"":n)+t},o.all=Kt,o.any=nr,o.detect=Vt,o.findWhere=Vt,o.foldl=Ht,o.foldr=Jt,o.include=Pt,o.inject=Ht,kr(function(){var n={};return vt(o,function(t,r){o.prototype[r]||(n[r]=t)}),n}(),false),o.first=St,o.last=Ft,o.sample=function(n,t,r){return n&&typeof n.length!="number"&&(n=dr(n)),null==t||r?(t=0|(n&&n.length),0<t?n[bt(0,t-1)]:_):(n=Qt(n),n.length=fe(le(0,t),n.length),n)
|
||||
},o.take=St,o.takeRight=Ft,o.takeRightWhile=Ft,o.takeWhile=St,o.head=St,vt(o,function(n,t){var r="sample"!==t;o.prototype[t]||(o.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 i(o,u):o})}),o.VERSION=A,o.prototype.chain=function(){return this.__chain__=true,this},o.prototype.toString=function(){return Fr(this.__wrapped__)},o.prototype.value=Ut,o.prototype.valueOf=Ut,ft(["join","pop","shift"],function(n){var t=Dr[n];o.prototype[n]=function(){var n=this.__chain__,r=t.apply(this.__wrapped__,arguments);
|
||||
return n?new i(r,n):r}}),ft(["push","reverse","sort","unshift"],function(n){var t=Dr[n];o.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),ft(["concat","splice"],function(n){var t=Dr[n];o.prototype[n]=function(){return new i(t.apply(this.__wrapped__,arguments),this.__chain__)}}),o}var _,w=1,x=2,j=4,k=8,C=16,O=32,A="2.4.1",I="__lodash@"+A+"__",E=0,R=/\b__p\+='';/g,N=/\b(__p\+=)''\+/g,S=/(__e\(.*?\)|\b__t\))\+'';/g,T=/&(?:amp|lt|gt|quot|#39);/g,W=/[&<>"']/g,F=/<%-([\s\S]+?)%>/g,$=/<%([\s\S]+?)%>/g,D=/<%=([\s\S]+?)%>/g,L=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,z=/\w*$/,B=/^\s*function[ \n\r\t]+\w/,q=/^0[xX]/,U=/[\xC0-\xFF]/g,P=/($^)/,K=/[.*+?^${}()|[\]\\]/g,M=/\bthis\b/,V=/['\n\r\t\u2028\u2029\\]/g,Z=/[A-Z]{2,}|[a-zA-Z0-9][a-z0-9]*/g,X=" \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",Y="Array Boolean Date Function Math Number Object RegExp Set String _ clearTimeout document isFinite isNaN parseInt setTimeout TypeError window WinRTError".split(" "),G="[object Arguments]",H="[object Array]",J="[object Boolean]",Q="[object Date]",nt="[object Function]",tt="[object Number]",rt="[object Object]",et="[object RegExp]",ut="[object String]",ot={};
|
||||
}catch(h){throw h.source=c,h}return t?p(t):(p.source=c,p)},o.trim=Se,o.trimLeft=Te,o.trimRight=We,o.truncate=function(n,t){var r=30,e="...";if(t&&sr(t))var u="separator"in t?t.separator:u,r="length"in t?+t.length||0:r,e="omission"in t?Fr(t.omission):e;else null!=t&&(r=+t||0);if(n=null==n?"":Fr(n),r>=n.length)return n;var o=r-e.length;if(1>o)return e;if(r=n.slice(0,o),null==u)return r+e;if(gr(u)){if(n.slice(o).search(u)){var i,a,l=n.slice(0,o);for(u.global||(u=Wr(u.source,(z.exec(u)||"")+"g")),u.lastIndex=0;i=u.exec(l);)a=i.index;
|
||||
r=r.slice(0,null==a?o:a)}}else n.indexOf(u,o)!=o&&(u=r.lastIndexOf(u),-1<u&&(r=r.slice(0,u)));return r+e},o.unescape=function(n){return null==n?"":(n=Fr(n),0>n.indexOf(";")?n:n.replace(T,d))},o.uniqueId=function(n){var t=++E;return Fr(null==n?"":n)+t},o.all=Kt,o.any=nr,o.detect=Vt,o.findWhere=Vt,o.foldl=Ht,o.foldr=Jt,o.include=Pt,o.inject=Ht,kr(function(){var n={};return vt(o,function(t,r){o.prototype[r]||(n[r]=t)}),n}(),false),o.first=St,o.last=Ft,o.sample=function(n,t,r){if(n&&typeof n.length!="number"&&(n=dr(n)),null==t||r){var e=(e=n&&n.length,-1<e&&e>>>0);
|
||||
return 0<e?n[bt(0,e-1)]:_}return n=Qt(n),n.length=fe(le(0,t),n.length),n},o.take=St,o.takeRight=Ft,o.takeRightWhile=Ft,o.takeWhile=St,o.head=St,vt(o,function(n,t){var r="sample"!==t;o.prototype[t]||(o.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 i(o,u):o})}),o.VERSION=A,o.prototype.chain=function(){return this.__chain__=true,this},o.prototype.toString=function(){return Fr(this.__wrapped__)},o.prototype.value=Ut,o.prototype.valueOf=Ut,ft(["join","pop","shift"],function(n){var t=Dr[n];
|
||||
o.prototype[n]=function(){var n=this.__chain__,r=t.apply(this.__wrapped__,arguments);return n?new i(r,n):r}}),ft(["push","reverse","sort","unshift"],function(n){var t=Dr[n];o.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),ft(["concat","splice"],function(n){var t=Dr[n];o.prototype[n]=function(){return new i(t.apply(this.__wrapped__,arguments),this.__chain__)}}),o}var _,w=1,x=2,j=4,k=8,C=16,O=32,A="2.4.1",I="__lodash@"+A+"__",E=0,R=/\b__p\+='';/g,N=/\b(__p\+=)''\+/g,S=/(__e\(.*?\)|\b__t\))\+'';/g,T=/&(?:amp|lt|gt|quot|#39);/g,W=/[&<>"']/g,F=/<%-([\s\S]+?)%>/g,$=/<%([\s\S]+?)%>/g,D=/<%=([\s\S]+?)%>/g,L=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,z=/\w*$/,B=/^\s*function[ \n\r\t]+\w/,q=/^0[xX]/,U=/[\xC0-\xFF]/g,P=/($^)/,K=/[.*+?^${}()|[\]\\]/g,M=/\bthis\b/,V=/['\n\r\t\u2028\u2029\\]/g,Z=/[A-Z]{2,}|[a-zA-Z0-9][a-z0-9]*/g,X=" \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",Y="Array Boolean Date Function Math Number Object RegExp Set String _ clearTimeout document isFinite isNaN parseInt setTimeout TypeError window WinRTError".split(" "),G="[object Arguments]",H="[object Array]",J="[object Boolean]",Q="[object Date]",nt="[object Function]",tt="[object Number]",rt="[object Object]",et="[object RegExp]",ut="[object String]",ot={};
|
||||
ot[nt]=false,ot[G]=ot[H]=ot[J]=ot[Q]=ot[tt]=ot[rt]=ot[et]=ot[ut]=true;var it={leading:false,maxWait:0,trailing:false},at={configurable:false,enumerable:false,value:null,writable:false},lt={"&":"&","<":"<",">":">",'"':""","'":"'"},ft={"&":"&","<":"<",">":">",""":'"',"'":"'"},ct={\u00c0:"A",\u00c1:"A",\u00c2:"A",\u00c3:"A",\u00c4:"A",\u00c5:"A",\u00e0:"a",\u00e1:"a",\u00e2:"a",\u00e3:"a",\u00e4:"a",\u00e5:"a",\u00c7:"C",\u00e7:"c",\u00d0:"D",\u00f0:"d",\u00c8:"E",\u00c9:"E",\u00ca:"E",\u00cb:"E",\u00e8:"e",\u00e9:"e",\u00ea:"e",\u00eb:"e",\u00cc:"I",\u00cd:"I",\u00ce:"I",\u00cf:"I",\u00ec:"i",\u00ed:"i",\u00ee:"i",\u00ef:"i",\u00d1:"N",\u00f1:"n",\u00d2:"O",\u00d3:"O",\u00d4:"O",\u00d5:"O",\u00d6:"O",\u00d8:"O",\u00f2:"o",\u00f3:"o",\u00f4:"o",\u00f5:"o",\u00f6:"o",\u00f8:"o",\u00d9:"U",\u00da:"U",\u00db:"U",\u00dc:"U",\u00f9:"u",\u00fa:"u",\u00fb:"u",\u00fc:"u",\u00dd:"Y",\u00fd:"y",\u00ff:"y",\u00c6:"AE",\u00e6:"ae",\u00de:"Th",\u00fe:"th",\u00df:"ss","\xd7":" ","\xf7":" "},pt={"function":true,object:true},st={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},ht=pt[typeof window]&&window||this,gt=pt[typeof exports]&&exports&&!exports.nodeType&&exports,pt=pt[typeof module]&&module&&!module.nodeType&&module,vt=gt&&pt&&typeof global=="object"&&global;
|
||||
!vt||vt.global!==vt&&vt.window!==vt&&vt.self!==vt||(ht=vt);var vt=pt&&pt.exports===gt&>,yt=b();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(ht._=yt, define(function(){return yt})):gt&&pt?vt?(pt.exports=yt)._=yt:gt._=yt:ht._=yt}).call(this);
|
||||
68
dist/lodash.underscore.js
vendored
68
dist/lodash.underscore.js
vendored
@@ -159,7 +159,7 @@
|
||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||
*/
|
||||
function baseIndexOf(array, value, fromIndex) {
|
||||
var index = (fromIndex | 0) - 1,
|
||||
var index = (+fromIndex || 0) - 1,
|
||||
length = array ? array.length : 0;
|
||||
|
||||
while (++index < length) {
|
||||
@@ -617,7 +617,7 @@
|
||||
* @returns {Array} Returns the new flattened array.
|
||||
*/
|
||||
function baseFlatten(array, isShallow, isStrict, fromIndex) {
|
||||
var index = (fromIndex | 0) - 1,
|
||||
var index = (+fromIndex || 0) - 1,
|
||||
length = array ? array.length : 0,
|
||||
result = [];
|
||||
|
||||
@@ -978,9 +978,9 @@
|
||||
callback = createCallback(callback, thisArg, 3);
|
||||
|
||||
var index = -1,
|
||||
length = (collection && collection.length) | 0;
|
||||
length = (length = collection && collection.length, length > -1 && length >>> 0);
|
||||
|
||||
if (length > 0) {
|
||||
if (length) {
|
||||
while (++index < length) {
|
||||
var value = collection[index];
|
||||
setter(result, value, callback(value, index, collection), collection);
|
||||
@@ -1346,7 +1346,7 @@
|
||||
function indexOf(array, value, fromIndex) {
|
||||
var length = array ? array.length : 0;
|
||||
if (typeof fromIndex == 'number') {
|
||||
fromIndex = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex) | 0;
|
||||
fromIndex = fromIndex < 0 ? nativeMax(0, length + fromIndex) : (fromIndex || 0);
|
||||
} else if (fromIndex) {
|
||||
var index = sortedIndex(array, value);
|
||||
return (length && array[index] === value) ? index : -1;
|
||||
@@ -1519,13 +1519,13 @@
|
||||
var index = -1,
|
||||
length = array ? array.length : 0;
|
||||
|
||||
start |= 0;
|
||||
start = +start || 0;
|
||||
if (start < 0) {
|
||||
start = nativeMax(length + start, 0);
|
||||
} else if (start > length) {
|
||||
start = length;
|
||||
}
|
||||
end = typeof end == 'undefined' ? length : (end | 0);
|
||||
end = typeof end == 'undefined' ? length : (+end || 0);
|
||||
if (end < 0) {
|
||||
end = nativeMax(length + end, 0);
|
||||
} else if (end > length) {
|
||||
@@ -1943,10 +1943,10 @@
|
||||
*/
|
||||
function contains(collection, target) {
|
||||
var indexOf = getIndexOf(),
|
||||
length = (collection && collection.length) | 0,
|
||||
length = (length = collection && collection.length, length > -1 && length >>> 0),
|
||||
result = false;
|
||||
|
||||
if (length > 0) {
|
||||
if (length) {
|
||||
return indexOf(collection, target) > -1;
|
||||
}
|
||||
baseEach(collection, function(value) {
|
||||
@@ -2039,9 +2039,9 @@
|
||||
|
||||
predicate = createCallback(predicate, thisArg, 3);
|
||||
var index = -1,
|
||||
length = (collection && collection.length) | 0;
|
||||
length = (length = collection && collection.length, length > -1 && length >>> 0);
|
||||
|
||||
if (length > 0) {
|
||||
if (length) {
|
||||
while (++index < length) {
|
||||
if (!predicate(collection[index], index, collection)) {
|
||||
return false;
|
||||
@@ -2100,9 +2100,9 @@
|
||||
|
||||
predicate = createCallback(predicate, thisArg, 3);
|
||||
var index = -1,
|
||||
length = (collection && collection.length) | 0;
|
||||
length = (length = collection && collection.length, length > -1 && length >>> 0);
|
||||
|
||||
if (length > 0) {
|
||||
if (length) {
|
||||
while (++index < length) {
|
||||
var value = collection[index];
|
||||
if (predicate(value, index, collection)) {
|
||||
@@ -2163,8 +2163,8 @@
|
||||
* // => { 'name': 'fred', 'age': 40, 'blocked': true }
|
||||
*/
|
||||
function find(collection, predicate, thisArg) {
|
||||
var length = (collection && collection.length) | 0;
|
||||
if (length > 0) {
|
||||
var length = (length = collection && collection.length, length > -1 && length >>> 0);
|
||||
if (length) {
|
||||
var index = findIndex(collection, predicate, thisArg);
|
||||
return index > -1 ? collection[index] : undefined;
|
||||
}
|
||||
@@ -2200,10 +2200,10 @@
|
||||
*/
|
||||
function forEach(collection, callback, thisArg) {
|
||||
var index = -1,
|
||||
length = (collection && collection.length) | 0;
|
||||
length = (length = collection && collection.length, length > -1 && length >>> 0);
|
||||
|
||||
callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3);
|
||||
if (length > 0) {
|
||||
if (length) {
|
||||
while (++index < length) {
|
||||
if (callback(collection[index], index, collection) === breakIndicator) {
|
||||
break;
|
||||
@@ -2327,8 +2327,8 @@
|
||||
var args = slice(arguments, 2),
|
||||
index = -1,
|
||||
isFunc = typeof methodName == 'function',
|
||||
length = (collection && collection.length) | 0,
|
||||
result = Array(length < 0 ? 0 : length);
|
||||
length = collection && collection.length,
|
||||
result = Array(length < 0 ? 0 : length >>> 0);
|
||||
|
||||
baseEach(collection, function(value) {
|
||||
result[++index] = (isFunc ? methodName : value[methodName]).apply(value, args);
|
||||
@@ -2377,10 +2377,10 @@
|
||||
*/
|
||||
function map(collection, callback, thisArg) {
|
||||
var index = -1,
|
||||
length = (collection && collection.length) | 0;
|
||||
length = (length = collection && collection.length, length > -1 && length >>> 0);
|
||||
|
||||
callback = createCallback(callback, thisArg, 3);
|
||||
if (length > 0) {
|
||||
if (length) {
|
||||
var result = Array(length);
|
||||
while (++index < length) {
|
||||
result[index] = callback(collection[index], index, collection);
|
||||
@@ -2444,9 +2444,9 @@
|
||||
callback = null;
|
||||
}
|
||||
var index = -1,
|
||||
length = (collection && collection.length) | 0;
|
||||
length = (length = collection && collection.length, length > -1 && length >>> 0);
|
||||
|
||||
if (callback == null && length > 0) {
|
||||
if (callback == null && length) {
|
||||
while (++index < length) {
|
||||
var value = collection[index];
|
||||
if (value > result) {
|
||||
@@ -2517,9 +2517,9 @@
|
||||
callback = null;
|
||||
}
|
||||
var index = -1,
|
||||
length = (collection && collection.length) | 0;
|
||||
length = (length = collection && collection.length, length > -1 && length >>> 0);
|
||||
|
||||
if (callback == null && length > 0) {
|
||||
if (callback == null && length) {
|
||||
while (++index < length) {
|
||||
var value = collection[index];
|
||||
if (value < result) {
|
||||
@@ -2645,9 +2645,9 @@
|
||||
callback = createCallback(callback, thisArg, 4);
|
||||
|
||||
var index = -1,
|
||||
length = (collection && collection.length) | 0;
|
||||
length = (length = collection && collection.length, length > -1 && length >>> 0);
|
||||
|
||||
if (length > 0) {
|
||||
if (length) {
|
||||
if (noaccum && length) {
|
||||
accumulator = collection[++index];
|
||||
}
|
||||
@@ -2761,7 +2761,7 @@
|
||||
collection = values(collection);
|
||||
}
|
||||
if (n == null || guard) {
|
||||
var length = (collection && collection.length) | 0;
|
||||
var length = (length = collection && collection.length, length > -1 && length >>> 0);
|
||||
return length > 0 ? collection[baseRandom(0, length - 1)] : undefined;
|
||||
}
|
||||
var result = shuffle(collection);
|
||||
@@ -2786,8 +2786,8 @@
|
||||
*/
|
||||
function shuffle(collection) {
|
||||
var index = -1,
|
||||
length = (collection && collection.length) | 0,
|
||||
result = Array(length < 0 ? 0 : length);
|
||||
length = collection && collection.length,
|
||||
result = Array(length < 0 ? 0 : length >>> 0);
|
||||
|
||||
baseEach(collection, function(value) {
|
||||
var rand = baseRandom(0, ++index);
|
||||
@@ -2870,9 +2870,9 @@
|
||||
|
||||
predicate = createCallback(predicate, thisArg, 3);
|
||||
var index = -1,
|
||||
length = (collection && collection.length) | 0;
|
||||
length = (length = collection && collection.length, length > -1 && length >>> 0);
|
||||
|
||||
if (length > 0) {
|
||||
if (length) {
|
||||
while (++index < length) {
|
||||
if (predicate(collection[index], index, collection)) {
|
||||
return true;
|
||||
@@ -2937,8 +2937,8 @@
|
||||
*/
|
||||
function sortBy(collection, callback, thisArg) {
|
||||
var index = -1,
|
||||
length = (collection && collection.length) | 0,
|
||||
result = Array(length < 0 ? 0 : length);
|
||||
length = collection && collection.length,
|
||||
result = Array(length < 0 ? 0 : length >>> 0);
|
||||
|
||||
callback = createCallback(callback, thisArg, 3);
|
||||
baseEach(collection, function(value, key, collection) {
|
||||
|
||||
44
dist/lodash.underscore.min.js
vendored
44
dist/lodash.underscore.min.js
vendored
@@ -3,38 +3,38 @@
|
||||
* Lo-Dash 2.4.1 (Custom Build) lodash.com/license | Underscore.js 1.6.0 underscorejs.org/LICENSE
|
||||
* Build: `lodash underscore -o ./dist/lodash.underscore.js`
|
||||
*/
|
||||
;(function(){function n(n,r,t){t=(0|t)-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.a;var e=r.a;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.b-r.b}function t(n){return xr[n]}function e(n){return"\\"+Er[n]}function u(n){return Ar[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){return K(n)?Vr(n):{}}function a(n,r,t){if(typeof n!="function")return rr;
|
||||
;(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.a;var e=r.a;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.b-r.b}function t(n){return xr[n]}function e(n){return"\\"+Er[n]}function u(n){return Ar[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){return K(n)?Vr(n):{}}function a(n,r,t){if(typeof n!="function")return rr;
|
||||
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 c(n){function r(){for(var n=-1,a=arguments.length,c=Array(a);++n<a;)c[n]=arguments[n];if(u){for(var n=u,a=o,l=a.length,p=-1,s=Lr(c.length-l,0),g=-1,h=n.length,v=Array(s+h);++g<h;)v[g]=n[g];for(;++p<l;)v[a[p]]=c[p];
|
||||
for(;s--;)v[g++]=c[p++];c=v}return n=i?e:this,this instanceof r?(n=f(t.prototype),a=t.apply(n,c),K(a)?a:n):t.apply(n,c)}var t=n[0],e=n[3],u=n[4],o=n[6],i=n[1]&ir;return r}function l(n,r){var t=n?n.length:0;if(!t)return[];for(var e=-1,u=d(),o=[];++e<t;){var i=n[e];0>u(r,i)&&o.push(i)}return o}function p(n,r){var t=-1,e=n?n.length:0;if(typeof e=="number"&&-1<e)for(e|=0;++t<e&&r(n[t],t,n)!==ar;);else h(n,r,at);return n}function s(n,r){var t=n?n.length:0;if(typeof t=="number"&&-1<t)for(t=0>(t|=0)?0:t;t--&&r(n[t],t,n)!==ar;);else for(var t=at(n),e=t.length;e--;){var u=t[e];
|
||||
if(r(n[u],u,n)===ar)break}return n}function g(n,r,t,e){e=(0|e)-1;for(var u=n?n.length:0,o=[];++e<u;){var i=n[e];if(i&&typeof i=="object"&&typeof i.length=="number"&&(ft(i)||H(i))){r||(i=g(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 h(n,r,t){var e=-1;t=t(n);for(var u=t.length;++e<u;){var o=t[e];if(r(n[o],o,n)===ar)break}return n}function v(n,r,t,e){if(n===r)return 0!==n||1/n==1/r;var u=typeof n,i=typeof r;if(n===n&&(null==n||null==r||"function"!=u&&"object"!=u&&"function"!=i&&"object"!=i))return false;
|
||||
if(r(n[u],u,n)===ar)break}return n}function g(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"&&(ft(i)||H(i))){r||(i=g(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 h(n,r,t){var e=-1;t=t(n);for(var u=t.length;++e<u;){var o=t[e];if(r(n[o],o,n)===ar)break}return n}function v(n,r,t,e){if(n===r)return 0!==n||1/n==1/r;var u=typeof n,i=typeof r;if(n===n&&(null==n||null==r||"function"!=u&&"object"!=u&&"function"!=i&&"object"!=i))return false;
|
||||
if(i=$r.call(n),u=$r.call(r),i!=u)return false;switch(i){case mr:case _r:return+n==+r;case dr: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 v(f?n.__wrapped__:n,a?r.__wrapped__:r,t,e);if(i!=br)return false;if(i=zr.call(n,"constructor"),f=zr.call(r,"constructor"),i!==f||!i&&(i=n.constructor,f=r.constructor,i!=f&&!(J(i)&&i instanceof i&&J(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=v(n[l],r[l],t,e)););}else h(r,function(r,u,o){return zr.call(o,u)?(l++,!(c=zr.call(n,u)&&v(n[u],r,t,e))&&ar):void 0},X),c&&h(n,function(n,r,t){return zr.call(t,r)?!(c=-1<--l)&&ar:void 0},X);return t.pop(),e.pop(),c}function y(n,r,t){var e=n?n.length:0;if(!e)return[];for(var u=-1,o=d(),i=[],f=t&&!r?[]:i;++u<e;){var a=n[u],c=t?t(a,u,n):a;r?u&&f===c||(f=c,i.push(a)):0>o(f,c)&&(t&&f.push(c),i.push(a))}return i}function m(n,r){return function(t,e,u){var o=r?[[],[]]:{};
|
||||
e=nr(e,u,3),u=-1;var i=0|(t&&t.length);if(0<i)for(;++u<i;){var f=t[u];n(o,f,e(f,u,t),t)}else p(t,function(r,t,u){n(o,r,e(r,t,u),u)});return o}}function _(n,r,t,e,u,i,f,a){var l=r&fr;if(!J(n))throw new TypeError;if(l&&!u.length&&(r&=~fr,l=u=false),l){f=u;for(var l=-1,p=f.length,s=[];++l<p;)f[l]===o&&s.push(l);f=s}return c([n,r,t,e,u,i,f,a])}function d(){var r=(r=o.indexOf)===x?n:r;return r}function b(n){return typeof n=="function"&&Ir.test(Wr.call(n))}function w(n){for(var r=-1,t=X(n),e=t.length,u=[];++r<e;){var o=t[r];
|
||||
zr.call(n,o)&&u.push(o)}return u}function j(n,r,t){return null==r||t?n?n[0]:or:T(n,0,0>r?0:r)}function x(r,t,e){var u=r?r.length:0;if(typeof e=="number")e=0|(0>e?Lr(0,u+e):e);else if(e)return e=E(r,t),u&&r[e]===t?e:-1;return n(r,t,e)}function A(n,r,t){return T(n,null==r||t?1:0>r?0:r)}function T(n,r,t){var e=-1,u=n?n.length:0;for(r|=0,0>r?r=Lr(u+r,0):r>u&&(r=u),t=typeof t=="undefined"?u:0|t,0>t?t=Lr(u+t,0):t>u&&(t=u),u=r>t?0:t-r,t=Array(u);++e<u;)t[e]=n[r+e];return t}function E(n,r,t,e){var u=0,o=n?n.length:u;
|
||||
for(t=t?nr(t,e,1):rr,r=t(r);u<o;)e=u+o>>>1,t(n[e])<r?u=e+1:o=e;return u}function O(n,r,t,e){if(!n||!n.length)return[];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=nr(t,e,3)),y(n,r,t)}function S(n,r){var t=d(),e=false;return 0<(0|(n&&n.length))?-1<t(n,r):(p(n,function(n){return(e=n===r)&&ar}),e)}function k(n,r,t){var e=true;r=nr(r,t,3),t=-1;var u=0|(n&&n.length);if(0<u){for(;++t<u;)if(!r(n[t],t,n))return false}else p(n,function(n,t,u){return!(e=!!r(n,t,u))&&ar
|
||||
});return e}function N(n,r,t){var e=[];r=nr(r,t,3),t=-1;var u=0|(n&&n.length);if(0<u)for(;++t<u;){var o=n[t];r(o,t,n)&&e.push(o)}else p(n,function(n,t,u){r(n,t,u)&&e.push(n)});return e}function q(n,r,t){if(0<(0|(n&&n.length))){var e;n:{e=-1;var u=n?n.length:0;for(r=nr(r,t,3);++e<u;)if(r(n[e],e,n))break n;e=-1}return-1<e?n[e]:or}return e=V(n,r,t),typeof e=="string"?n[e]:or}function F(n,r,t){var e=-1,u=0|(n&&n.length);if(r=r&&typeof t=="undefined"?r:a(r,t,3),0<u)for(;++e<u&&r(n[e],e,n)!==ar;);else p(n,r);
|
||||
return n}function B(n,r,t){var e=-1,u=0|(n&&n.length);if(r=nr(r,t,3),0<u)for(var o=Array(u);++e<u;)o[e]=r(n[e],e,n);else o=[],p(n,function(n,t,u){o[++e]=r(n,t,u)});return o}function R(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=0|(n&&n.length);if(null==r&&0<i)for(;++o<i;)t=n[o],t>u&&(u=t);else r=nr(r,t,3),p(n,function(n,t,o){t=r(n,t,o),t>e&&(e=t,u=n)});return u}function $(n,r,t,e){var u=3>arguments.length;r=nr(r,e,4);var o=-1,i=0|(n&&n.length);if(0<i)for(u&&i&&(t=n[++o]);++o<i;)t=r(t,n[o],o,n);
|
||||
else p(n,function(n,e,o){t=u?(u=false,n):r(t,n,e,o)});return t}function I(n,r,t,e){var u=3>arguments.length;return r=nr(r,e,4),s(n,function(n,e,o){t=u?(u=false,n):r(t,n,e,o)}),t}function M(n){var r=-1,t=0|(n&&n.length),e=Array(0>t?0:t);return p(n,function(n){var t;t=++r,t=0+Dr(Yr()*(t-0+1)),e[r]=e[t],e[t]=n}),e}function D(n,r,t){var e;r=nr(r,t,3),t=-1;var u=0|(n&&n.length);if(0<u){for(;++t<u;)if(r(n[t],t,n))return true}else p(n,function(n,t,u){return(e=r(n,t,u))&&ar});return!!e}function W(n,r){return 3>arguments.length?_(n,ir,null,r):_(n,ir|fr,null,r,T(arguments,2))
|
||||
}function z(n,r,t){var e,u,o,i,f,a,c,l=0,p=false,s=true;if(!J(n))throw new TypeError;if(r=0>r?0:r,true===t)var g=true,s=false;else K(t)&&(g=t.leading,p="maxWait"in t&&(Lr(r,t.maxWait)||0),s="trailing"in t?t.trailing:s);var h=function(){var t=r-(ct()-i);0>=t||t>r?(u&&clearTimeout(u),t=c,u=a=c=or,t&&(l=ct(),o=n.apply(f,e),a||u||(e=f=null))):a=setTimeout(h,t)},v=function(){a&&clearTimeout(a),u=a=c=or,(s||p!==r)&&(l=ct(),o=n.apply(f,e),a||u||(e=f=null))};return function(){if(e=arguments,i=ct(),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||y>p;m?(u&&(u=clearTimeout(u)),l=i,o=n.apply(f,e)):u||(u=setTimeout(v,y))}return m&&a?a=clearTimeout(a):a||r===p||(a=setTimeout(h,r)),t&&(m=true,o=n.apply(f,e)),!m||a||u||(e=f=null),o}}function C(n){if(!J(n))throw new TypeError;return function(){return!n.apply(this,arguments)}}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;){r=e[u];for(var f in r)n[f]=r[f]}return n}function U(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;){r=e[u];for(var f in r)"undefined"==typeof n[f]&&(n[f]=r[f])}return n}function V(n,r,t){var e;return r=nr(r,t,3),h(n,function(n,t,u){return r(n,t,u)?(e=t,ar):void 0},at),e}function G(n){var r=[];return h(n,function(n,t){J(n)&&r.push(t)},X),r.sort()}function H(n){return n&&typeof n=="object"&&typeof n.length=="number"&&$r.call(n)==vr||false}function J(n){return typeof n=="function"}function K(n){var r=typeof n;
|
||||
return n&&("function"==r||"object"==r)||false}function L(n){var r=typeof n;return"number"==r||n&&"object"==r&&$r.call(n)==dr||false}function Q(n){return typeof n=="string"||n&&typeof n=="object"&&$r.call(n)==jr||false}function X(n){var r=[];if(!K(n))return r;for(var t in n)r.push(t);return r}function Y(n){for(var r=-1,t=g(arguments,true,false,1),e=t.length,u={};++r<e;){var o=t[r];o in n&&(u[o]=n[o])}return u}function Z(n){for(var r=-1,t=at(n),e=t.length,u=Array(e);++r<e;)u[r]=n[t[r]];return u}function nr(n,r,t){var e=typeof n;
|
||||
return"function"==e||null==n?(typeof r=="undefined"||!("prototype"in n))&&n||a(n,r,t):"object"!=e?ur(n):tr(n)}function rr(n){return n}function tr(n){n||(n={});var r=at(n),t=r.length;return function(e){for(var u=t,o=true;u--&&(o=r[u],o=zr.call(e,o)&&e[o]===n[o]););return o}}function er(n){for(var r=-1,t=G(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 ur(n){return function(r){return r[n]
|
||||
}}var or,ir=1,fr=16,ar="__lodash@2.4.1__breaker__",cr=0,lr=/&(?:amp|lt|gt|quot|#x27);/g,pr=/[&<>"']/g,sr=/($^)/,gr=/[.*+?^${}()|[\]\\]/g,hr=/['\n\r\t\u2028\u2029\\]/g,vr="[object Arguments]",yr="[object Array]",mr="[object Boolean]",_r="[object Date]",dr="[object Number]",br="[object Object]",wr="[object RegExp]",jr="[object String]",xr={"&":"&","<":"<",">":">",'"':""","'":"'"},Ar={"&":"&","<":"<",">":">",""":'"',"'":"'"},Tr={"function":true,object:true},Er={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},Or=Tr[typeof window]&&window||this,Sr=Tr[typeof exports]&&exports&&!exports.nodeType&&exports,kr=Tr[typeof module]&&module&&!module.nodeType&&module,Nr=Sr&&kr&&typeof global=="object"&&global;
|
||||
e=nr(e,u,3),u=-1;var i=(i=t&&t.length,-1<i&&i>>>0);if(i)for(;++u<i;){var f=t[u];n(o,f,e(f,u,t),t)}else p(t,function(r,t,u){n(o,r,e(r,t,u),u)});return o}}function _(n,r,t,e,u,i,f,a){var l=r&fr;if(!J(n))throw new TypeError;if(l&&!u.length&&(r&=~fr,l=u=false),l){f=u;for(var l=-1,p=f.length,s=[];++l<p;)f[l]===o&&s.push(l);f=s}return c([n,r,t,e,u,i,f,a])}function d(){var r=(r=o.indexOf)===x?n:r;return r}function b(n){return typeof n=="function"&&Ir.test(Wr.call(n))}function w(n){for(var r=-1,t=X(n),e=t.length,u=[];++r<e;){var o=t[r];
|
||||
zr.call(n,o)&&u.push(o)}return u}function j(n,r,t){return null==r||t?n?n[0]:or:T(n,0,0>r?0:r)}function x(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=E(r,t),u&&r[e]===t?e:-1;return n(r,t,e)}function A(n,r,t){return T(n,null==r||t?1:0>r?0:r)}function T(n,r,t){var e=-1,u=n?n.length:0;for(r=+r||0,0>r?r=Lr(u+r,0):r>u&&(r=u),t=typeof t=="undefined"?u:+t||0,0>t?t=Lr(u+t,0):t>u&&(t=u),u=r>t?0:t-r,t=Array(u);++e<u;)t[e]=n[r+e];return t}function E(n,r,t,e){var u=0,o=n?n.length:u;
|
||||
for(t=t?nr(t,e,1):rr,r=t(r);u<o;)e=u+o>>>1,t(n[e])<r?u=e+1:o=e;return u}function O(n,r,t,e){if(!n||!n.length)return[];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=nr(t,e,3)),y(n,r,t)}function S(n,r){var t=d(),e=(e=n&&n.length,-1<e&&e>>>0),u=false;return e?-1<t(n,r):(p(n,function(n){return(u=n===r)&&ar}),u)}function k(n,r,t){var e=true;r=nr(r,t,3),t=-1;var u=(u=n&&n.length,-1<u&&u>>>0);if(u){for(;++t<u;)if(!r(n[t],t,n))return false}else p(n,function(n,t,u){return!(e=!!r(n,t,u))&&ar
|
||||
});return e}function N(n,r,t){var e=[];r=nr(r,t,3),t=-1;var u=(u=n&&n.length,-1<u&&u>>>0);if(u)for(;++t<u;){var o=n[t];r(o,t,n)&&e.push(o)}else p(n,function(n,t,u){r(n,t,u)&&e.push(n)});return e}function q(n,r,t){var e=(e=n&&n.length,-1<e&&e>>>0);if(e){n:{var e=-1,u=n?n.length:0;for(r=nr(r,t,3);++e<u;)if(r(n[e],e,n)){r=e;break n}r=-1}return-1<r?n[r]:or}return r=V(n,r,t),typeof r=="string"?n[r]:or}function F(n,r,t){var e=-1,u=(u=n&&n.length,-1<u&&u>>>0);if(r=r&&typeof t=="undefined"?r:a(r,t,3),u)for(;++e<u&&r(n[e],e,n)!==ar;);else p(n,r);
|
||||
return n}function B(n,r,t){var e=-1,u=(u=n&&n.length,-1<u&&u>>>0);if(r=nr(r,t,3),u)for(var o=Array(u);++e<u;)o[e]=r(n[e],e,n);else o=[],p(n,function(n,t,u){o[++e]=r(n,t,u)});return o}function R(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=(i=n&&n.length,-1<i&&i>>>0);if(null==r&&i)for(;++o<i;)t=n[o],t>u&&(u=t);else r=nr(r,t,3),p(n,function(n,t,o){t=r(n,t,o),t>e&&(e=t,u=n)});return u}function $(n,r,t,e){var u=3>arguments.length;r=nr(r,e,4);var o=-1,i=(i=n&&n.length,-1<i&&i>>>0);
|
||||
if(i)for(u&&i&&(t=n[++o]);++o<i;)t=r(t,n[o],o,n);else p(n,function(n,e,o){t=u?(u=false,n):r(t,n,e,o)});return t}function I(n,r,t,e){var u=3>arguments.length;return r=nr(r,e,4),s(n,function(n,e,o){t=u?(u=false,n):r(t,n,e,o)}),t}function M(n){var r=-1,t=n&&n.length,e=Array(0>t?0:t>>>0);return p(n,function(n){var t;t=++r,t=0+Dr(Yr()*(t-0+1)),e[r]=e[t],e[t]=n}),e}function D(n,r,t){var e;r=nr(r,t,3),t=-1;var u=(u=n&&n.length,-1<u&&u>>>0);if(u){for(;++t<u;)if(r(n[t],t,n))return true}else p(n,function(n,t,u){return(e=r(n,t,u))&&ar
|
||||
});return!!e}function W(n,r){return 3>arguments.length?_(n,ir,null,r):_(n,ir|fr,null,r,T(arguments,2))}function z(n,r,t){var e,u,o,i,f,a,c,l=0,p=false,s=true;if(!J(n))throw new TypeError;if(r=0>r?0:r,true===t)var g=true,s=false;else K(t)&&(g=t.leading,p="maxWait"in t&&(Lr(r,t.maxWait)||0),s="trailing"in t?t.trailing:s);var h=function(){var t=r-(ct()-i);0>=t||t>r?(u&&clearTimeout(u),t=c,u=a=c=or,t&&(l=ct(),o=n.apply(f,e),a||u||(e=f=null))):a=setTimeout(h,t)},v=function(){a&&clearTimeout(a),u=a=c=or,(s||p!==r)&&(l=ct(),o=n.apply(f,e),a||u||(e=f=null))
|
||||
};return function(){if(e=arguments,i=ct(),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||y>p;m?(u&&(u=clearTimeout(u)),l=i,o=n.apply(f,e)):u||(u=setTimeout(v,y))}return m&&a?a=clearTimeout(a):a||r===p||(a=setTimeout(h,r)),t&&(m=true,o=n.apply(f,e)),!m||a||u||(e=f=null),o}}function C(n){if(!J(n))throw new TypeError;return function(){return!n.apply(this,arguments)}}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;){r=e[u];
|
||||
for(var f in r)n[f]=r[f]}return n}function U(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;){r=e[u];for(var f in r)"undefined"==typeof n[f]&&(n[f]=r[f])}return n}function V(n,r,t){var e;return r=nr(r,t,3),h(n,function(n,t,u){return r(n,t,u)?(e=t,ar):void 0},at),e}function G(n){var r=[];return h(n,function(n,t){J(n)&&r.push(t)},X),r.sort()}function H(n){return n&&typeof n=="object"&&typeof n.length=="number"&&$r.call(n)==vr||false
|
||||
}function J(n){return typeof n=="function"}function K(n){var r=typeof n;return n&&("function"==r||"object"==r)||false}function L(n){var r=typeof n;return"number"==r||n&&"object"==r&&$r.call(n)==dr||false}function Q(n){return typeof n=="string"||n&&typeof n=="object"&&$r.call(n)==jr||false}function X(n){var r=[];if(!K(n))return r;for(var t in n)r.push(t);return r}function Y(n){for(var r=-1,t=g(arguments,true,false,1),e=t.length,u={};++r<e;){var o=t[r];o in n&&(u[o]=n[o])}return u}function Z(n){for(var r=-1,t=at(n),e=t.length,u=Array(e);++r<e;)u[r]=n[t[r]];
|
||||
return u}function nr(n,r,t){var e=typeof n;return"function"==e||null==n?(typeof r=="undefined"||!("prototype"in n))&&n||a(n,r,t):"object"!=e?ur(n):tr(n)}function rr(n){return n}function tr(n){n||(n={});var r=at(n),t=r.length;return function(e){for(var u=t,o=true;u--&&(o=r[u],o=zr.call(e,o)&&e[o]===n[o]););return o}}function er(n){for(var r=-1,t=G(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 ur(n){return function(r){return r[n]}}var or,ir=1,fr=16,ar="__lodash@2.4.1__breaker__",cr=0,lr=/&(?:amp|lt|gt|quot|#x27);/g,pr=/[&<>"']/g,sr=/($^)/,gr=/[.*+?^${}()|[\]\\]/g,hr=/['\n\r\t\u2028\u2029\\]/g,vr="[object Arguments]",yr="[object Array]",mr="[object Boolean]",_r="[object Date]",dr="[object Number]",br="[object Object]",wr="[object RegExp]",jr="[object String]",xr={"&":"&","<":"<",">":">",'"':""","'":"'"},Ar={"&":"&","<":"<",">":">",""":'"',"'":"'"},Tr={"function":true,object:true},Er={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},Or=Tr[typeof window]&&window||this,Sr=Tr[typeof exports]&&exports&&!exports.nodeType&&exports,kr=Tr[typeof module]&&module&&!module.nodeType&&module,Nr=Sr&&kr&&typeof global=="object"&&global;
|
||||
!Nr||Nr.global!==Nr&&Nr.window!==Nr&&Nr.self!==Nr||(Or=Nr);var qr=kr&&kr.exports===Sr&&Sr,Fr=Array.prototype,Br=Object.prototype,Rr=Or._,$r=Br.toString,Ir=RegExp("^"+(null==$r?"":($r+"").replace(gr,"\\$&")).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=b(Vr=Object.create)&&Vr,Gr=b(Gr=Array.isArray)&&Gr,Hr=Or.isFinite,Jr=Or.isNaN,Kr=b(Kr=Object.keys)&&Kr,Lr=Math.max,Qr=Math.min,Xr=b(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||(f=function(){function n(){}return function(r){if(K(r)){n.prototype=r;var t=new n;n.prototype=null}return t||Or.Object()}}());var nt=A,rt=m(function(n,r,t){zr.call(n,t)?n[t]++:n[t]=1}),tt=m(function(n,r,t){zr.call(n,t)?n[t].push(r):n[t]=[r]}),et=m(function(n,r,t){n[t]=r
|
||||
}),ut=m(function(n,r,t){n[t?0:1].push(r)},true),ot=B,it=N;H(arguments)||(H=function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&zr.call(n,"callee")&&!Pr.call(n,"callee")||false});var ft=Gr||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&$r.call(n)==yr||false};J(/x/)&&(J=function(n){return typeof n=="function"&&"[object Function]"==$r.call(n)});var at=Kr?function(n){return K(n)?Kr(n):[]}:w,ct=Xr||function(){return(new Date).getTime()};o.after=function(n,r){if(!J(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?g(arguments,true,false,1):G(n),t=-1,e=r.length;++t<e;){var u=r[t];n[u]=_(n[u],ir,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,t=r;t--;)if(!J(n[t]))throw new TypeError;return function(){for(var t=r-1,e=n[t].apply(this,arguments);t--;)e=n[t].call(this,e);
|
||||
return e}},o.constant=function(n){return function(){return n}},o.countBy=rt,o.debounce=z,o.defaults=U,o.defer=function(n){if(!J(n))throw new TypeError;var r=T(arguments,1);return setTimeout(function(){n.apply(or,r)},1)},o.delay=function(n,r){if(!J(n))throw new TypeError;var t=T(arguments,2);return setTimeout(function(){n.apply(or,t)},r)},o.difference=function(n){return l(n,g(arguments,true,true,1))},o.drop=nt,o.filter=N,o.flatten=function(n,r,t){if(!n||!n.length)return[];var e=typeof r;return"number"!=e&&"string"!=e||!t||t[r]!==n||(r=false),g(n,r)
|
||||
},o.forEach=F,o.functions=G,o.groupBy=tt,o.indexBy=et,o.initial=function(n,r,t){return r=(n?n.length:0)-(null==r||t?1:r),T(n,0,0>r?0:r)},o.intersection=function(){for(var n=[],r=-1,t=arguments.length;++r<t;){var e=arguments[r];(ft(e)||H(e))&&n.push(e)}var t=n.length,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},o.invert=function(n){for(var r=-1,t=at(n),e=t.length,u={};++r<e;){var o=t[r];u[n[o]]=o}return u},o.invoke=function(n,r){var t=T(arguments,2),e=-1,u=typeof r=="function",o=0|(n&&n.length),i=Array(0>o?0:o);
|
||||
return p(n,function(n){i[++e]=(u?r:n[r]).apply(n,t)}),i},o.keys=at,o.map=B,o.matches=tr,o.max=R,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=0|(n&&n.length);if(null==r&&0<i)for(;++o<i;)t=n[o],t<u&&(u=t);else r=nr(r,t,3),p(n,function(n,t,o){t=r(n,t,o),t<e&&(e=t,u=n)});return u},o.omit=function(n){for(var r=g(arguments,true,false,1),t=r.length;t--;)r[t]=r[t]+"";
|
||||
return Y(n,l(X(n),r))},o.once=function(n){var r,t;if(!J(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=at(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 _(n,fr,null,null,T(arguments,1))},o.partition=ut,o.pick=Y,o.pluck=ot,o.property=ur,o.range=function(n,r,t){n=+n||0,t=null==t?1:+t||0,null==r?(r=n,n=0):r=+r||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=nr(r,t,3),N(n,C(r))},o.rest=A,o.shuffle=M,o.sortBy=function(n,t,e){var u=-1,o=0|(n&&n.length),i=Array(0>o?0:o);for(t=nr(t,e,3),p(n,function(n,r,e){i[++u]={a:t(n,r,e),b:u,c:n}}),o=i.length,i.sort(r);o--;)i[o]=i[o].c;return i},o.tap=function(n,r){return r(n),n},o.throttle=function(n,r,t){var e=true,u=true;if(!J(n))throw new TypeError;return false===t?e=false:K(t)&&(e="leading"in t?t.leading:e,u="trailing"in t?t.trailing:u),z(n,r,{leading:e,maxWait:r,trailing:u})},o.times=function(n,r,t){n=-1<(n=+n)?n:0;
|
||||
var e=-1,u=Array(n);for(r=a(r,t,1);++e<n;)u[e]=r(e);return u},o.toArray=function(n){return ft(n)?T(n):n&&typeof n.length=="number"?B(n):Z(n)},o.union=function(){return y(g(arguments,true,true))},o.uniq=O,o.values=Z,o.where=it,o.without=function(){return l(arguments[0],T(arguments,1))},o.wrap=function(n,r){return _(r,fr,null,null,[n])},o.zip=function(){for(var n=-1,r=R(ot(arguments,"length")),t=Array(0>r?0:r);++n<r;)t[n]=ot(arguments,n);return t},o.collect=B,o.each=F,o.extend=P,o.methods=G,o.object=function(n,r){var t=-1,e=n?n.length:0,u={};
|
||||
},o.forEach=F,o.functions=G,o.groupBy=tt,o.indexBy=et,o.initial=function(n,r,t){return r=(n?n.length:0)-(null==r||t?1:r),T(n,0,0>r?0:r)},o.intersection=function(){for(var n=[],r=-1,t=arguments.length;++r<t;){var e=arguments[r];(ft(e)||H(e))&&n.push(e)}var t=n.length,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},o.invert=function(n){for(var r=-1,t=at(n),e=t.length,u={};++r<e;){var o=t[r];u[n[o]]=o}return u},o.invoke=function(n,r){var t=T(arguments,2),e=-1,u=typeof r=="function",o=n&&n.length,i=Array(0>o?0:o>>>0);
|
||||
return p(n,function(n){i[++e]=(u?r:n[r]).apply(n,t)}),i},o.keys=at,o.map=B,o.matches=tr,o.max=R,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=(i=n&&n.length,-1<i&&i>>>0);if(null==r&&i)for(;++o<i;)t=n[o],t<u&&(u=t);else r=nr(r,t,3),p(n,function(n,t,o){t=r(n,t,o),t<e&&(e=t,u=n)});return u
|
||||
},o.omit=function(n){for(var r=g(arguments,true,false,1),t=r.length;t--;)r[t]=r[t]+"";return Y(n,l(X(n),r))},o.once=function(n){var r,t;if(!J(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=at(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 _(n,fr,null,null,T(arguments,1))},o.partition=ut,o.pick=Y,o.pluck=ot,o.property=ur,o.range=function(n,r,t){n=+n||0,t=null==t?1:+t||0,null==r?(r=n,n=0):r=+r||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=nr(r,t,3),N(n,C(r))},o.rest=A,o.shuffle=M,o.sortBy=function(n,t,e){var u=-1,o=n&&n.length,i=Array(0>o?0:o>>>0);for(t=nr(t,e,3),p(n,function(n,r,e){i[++u]={a:t(n,r,e),b:u,c:n}}),o=i.length,i.sort(r);o--;)i[o]=i[o].c;return i},o.tap=function(n,r){return r(n),n},o.throttle=function(n,r,t){var e=true,u=true;if(!J(n))throw new TypeError;return false===t?e=false:K(t)&&(e="leading"in t?t.leading:e,u="trailing"in t?t.trailing:u),z(n,r,{leading:e,maxWait:r,trailing:u})
|
||||
},o.times=function(n,r,t){n=-1<(n=+n)?n:0;var e=-1,u=Array(n);for(r=a(r,t,1);++e<n;)u[e]=r(e);return u},o.toArray=function(n){return ft(n)?T(n):n&&typeof n.length=="number"?B(n):Z(n)},o.union=function(){return y(g(arguments,true,true))},o.uniq=O,o.values=Z,o.where=it,o.without=function(){return l(arguments[0],T(arguments,1))},o.wrap=function(n,r){return _(r,fr,null,null,[n])},o.zip=function(){for(var n=-1,r=R(ot(arguments,"length")),t=Array(0>r?0:r);++n<r;)t[n]=ot(arguments,n);return t},o.collect=B,o.each=F,o.extend=P,o.methods=G,o.object=function(n,r){var t=-1,e=n?n.length:0,u={};
|
||||
for(r||!e||ft(n[0])||(r=[]);++t<e;){var o=n[t];r?u[o]=r[t]:o&&(u[o[0]]=o[1])}return u},o.select=N,o.tail=A,o.unique=O,o.clone=function(n){return K(n)?ft(n)?T(n):P({},n):n},o.contains=S,o.escape=function(n){return null==n?"":(n+"").replace(pr,t)},o.every=k,o.find=q,o.has=function(n,r){return n?zr.call(n,r):false},o.identity=rr,o.indexOf=x,o.isArguments=H,o.isArray=ft,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=function(n){if(!n)return true;if(ft(n)||Q(n))return!n.length;for(var r in n)if(zr.call(n,r))return false;return true},o.isEqual=function(n,r){return v(n,r)},o.isFinite=function(n){return Hr(n)&&!Jr(parseFloat(n))},o.isFunction=J,o.isNaN=function(n){return L(n)&&n!=+n},o.isNull=function(n){return null===n},o.isNumber=L,o.isObject=K,o.isRegExp=function(n){var r=typeof n;return n&&("function"==r||"object"==r)&&$r.call(n)==wr||false},o.isString=Q,o.isUndefined=function(n){return typeof n=="undefined"
|
||||
},o.lastIndexOf=function(n,r,t){var e=n?n.length:0;for(typeof t=="number"&&(t|=0,e=(0>t?Lr(0,e+t):Qr(t,e-1))+1);e--;)if(n[e]===r)return e;return-1},o.mixin=er,o.noConflict=function(){return Or._=Rr,this},o.now=ct,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=$,o.reduceRight=I,o.result=function(n,r){if(null!=n){var t=n[r];return J(t)?n[r]():t}},o.size=function(n){var r=n?n.length:0;return typeof r=="number"&&-1<r?r:at(n).length},o.some=D,o.sortedIndex=E,o.template=function(n,r,t){var u=o,i=u.templateSettings;
|
||||
n=(null==n?"":n)+"",t=U({},t,i);var f=0,a="__p+='",i=t.variable;n.replace(RegExp((t.escape||sr).source+"|"+(t.interpolate||sr).source+"|"+(t.evaluate||sr).source+"|$","g"),function(r,t,u,o,i){return a+=n.slice(f,i).replace(hr,e),t&&(a+="'+_.escape("+t+")+'"),o&&(a+="';"+o+";\n__p+='"),u&&(a+="'+((__t=("+u+"))==null?'':__t)+'"),f=i+r.length,r}),a+="';",i||(a="with(obj||{}){"+a+"}"),a="function("+(i||"obj")+"){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(lr,u))},o.uniqueId=function(n){var r=++cr+"";return n?n+r:r},o.all=k,o.any=D,o.detect=q,o.findWhere=q,o.foldl=$,o.foldr=I,o.include=S,o.inject=$,o.first=j,o.last=function(n,r,t){var e=n?n.length:0;return null==r||t?n?n[e-1]:or:(r=e-r,T(n,0>r?0:r))},o.sample=function(n,r,t){return n&&typeof n.length!="number"&&(n=Z(n)),null==r||t?(r=0|(n&&n.length),0<r?n[0+Dr(Yr()*(r-1-0+1))]:or):(n=M(n),n.length=Qr(Lr(0,r),n.length),n)
|
||||
},o.take=j,o.head=j,er(P({},o)),o.VERSION="2.4.1",o.prototype.chain=function(){return this.__chain__=true,this},o.prototype.value=function(){return this.__wrapped__},p("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}}),p(["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("underscore",function(){return o})):Sr&&kr?qr?(kr.exports=o)._=o:Sr._=o:Or._=o}).call(this);
|
||||
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(lr,u))},o.uniqueId=function(n){var r=++cr+"";return n?n+r:r},o.all=k,o.any=D,o.detect=q,o.findWhere=q,o.foldl=$,o.foldr=I,o.include=S,o.inject=$,o.first=j,o.last=function(n,r,t){var e=n?n.length:0;return null==r||t?n?n[e-1]:or:(r=e-r,T(n,0>r?0:r))},o.sample=function(n,r,t){if(n&&typeof n.length!="number"&&(n=Z(n)),null==r||t){var e=(e=n&&n.length,-1<e&&e>>>0);
|
||||
return 0<e?n[0+Dr(Yr()*(e-1-0+1))]:or}return n=M(n),n.length=Qr(Lr(0,r),n.length),n},o.take=j,o.head=j,er(P({},o)),o.VERSION="2.4.1",o.prototype.chain=function(){return this.__chain__=true,this},o.prototype.value=function(){return this.__wrapped__},p("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}}),p(["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("underscore",function(){return o})):Sr&&kr?qr?(kr.exports=o)._=o:Sr._=o:Or._=o}).call(this);
|
||||
44
lodash.js
44
lodash.js
@@ -273,7 +273,7 @@
|
||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||
*/
|
||||
function baseIndexOf(array, value, fromIndex) {
|
||||
var index = (fromIndex | 0) - 1,
|
||||
var index = (+fromIndex || 0) - 1,
|
||||
length = array ? array.length : 0;
|
||||
|
||||
while (++index < length) {
|
||||
@@ -1396,7 +1396,7 @@
|
||||
* @returns {Array} Returns the new flattened array.
|
||||
*/
|
||||
function baseFlatten(array, isShallow, isStrict, fromIndex) {
|
||||
var index = (fromIndex | 0) - 1,
|
||||
var index = (+fromIndex || 0) - 1,
|
||||
length = array ? array.length : 0,
|
||||
result = [];
|
||||
|
||||
@@ -2629,7 +2629,7 @@
|
||||
function indexOf(array, value, fromIndex) {
|
||||
var length = array ? array.length : 0;
|
||||
if (typeof fromIndex == 'number') {
|
||||
fromIndex = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex) | 0;
|
||||
fromIndex = fromIndex < 0 ? nativeMax(0, length + fromIndex) : (fromIndex || 0);
|
||||
} else if (fromIndex) {
|
||||
var index = sortedIndex(array, value);
|
||||
return (length && array[index] === value) ? index : -1;
|
||||
@@ -2932,13 +2932,13 @@
|
||||
var index = -1,
|
||||
length = array ? array.length : 0;
|
||||
|
||||
start |= 0;
|
||||
start = +start || 0;
|
||||
if (start < 0) {
|
||||
start = nativeMax(length + start, 0);
|
||||
} else if (start > length) {
|
||||
start = length;
|
||||
}
|
||||
end = typeof end == 'undefined' ? length : (end | 0);
|
||||
end = typeof end == 'undefined' ? length : (+end || 0);
|
||||
if (end < 0) {
|
||||
end = nativeMax(length + end, 0);
|
||||
} else if (end > length) {
|
||||
@@ -3558,10 +3558,10 @@
|
||||
* // => true
|
||||
*/
|
||||
function contains(collection, target, fromIndex) {
|
||||
var length = collection ? collection.length : 0;
|
||||
fromIndex = (typeof fromIndex == 'number' && fromIndex) | 0;
|
||||
var length = (length = collection && collection.length, length > -1 && length >>> 0);
|
||||
fromIndex = (typeof fromIndex == 'number' && +fromIndex) || 0;
|
||||
|
||||
if (typeof length == 'number' && length > -1) {
|
||||
if (length) {
|
||||
if (typeof collection == 'string' || !isArray(collection) && isString(collection)) {
|
||||
if (fromIndex >= length) {
|
||||
return false;
|
||||
@@ -3571,7 +3571,7 @@
|
||||
: collection.indexOf(target, fromIndex) > -1;
|
||||
}
|
||||
var indexOf = getIndexOf();
|
||||
fromIndex = fromIndex < 0 ? nativeMax(0, (length | 0) + fromIndex) : fromIndex;
|
||||
fromIndex = fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex;
|
||||
return indexOf(collection, target, fromIndex) > -1;
|
||||
}
|
||||
var index = -1,
|
||||
@@ -4016,8 +4016,8 @@
|
||||
var args = slice(arguments, 2),
|
||||
index = -1,
|
||||
isFunc = typeof methodName == 'function',
|
||||
length = (collection && collection.length) | 0,
|
||||
result = Array(length < 0 ? 0 : length);
|
||||
length = collection && collection.length,
|
||||
result = Array(length < 0 ? 0 : length >>> 0);
|
||||
|
||||
baseEach(collection, function(value) {
|
||||
result[++index] = (isFunc ? methodName : value[methodName]).apply(value, args);
|
||||
@@ -4066,8 +4066,8 @@
|
||||
*/
|
||||
function map(collection, callback, thisArg) {
|
||||
var index = -1,
|
||||
length = (collection && collection.length) | 0,
|
||||
result = Array(length < 0 ? 0 : length);
|
||||
length = collection && collection.length,
|
||||
result = Array(length < 0 ? 0 : length >>> 0);
|
||||
|
||||
callback = lodash.createCallback(callback, thisArg, 3);
|
||||
if (isArray(collection)) {
|
||||
@@ -4455,7 +4455,7 @@
|
||||
collection = collection.split('');
|
||||
}
|
||||
if (n == null || guard) {
|
||||
var length = (collection && collection.length) | 0;
|
||||
var length = (length = collection && collection.length, length > -1 && length >>> 0);
|
||||
return length > 0 ? collection[baseRandom(0, length - 1)] : undefined;
|
||||
}
|
||||
var result = shuffle(collection);
|
||||
@@ -4480,8 +4480,8 @@
|
||||
*/
|
||||
function shuffle(collection) {
|
||||
var index = -1,
|
||||
length = (collection && collection.length) | 0,
|
||||
result = Array(length < 0 ? 0 : length);
|
||||
length = collection && collection.length,
|
||||
result = Array(length < 0 ? 0 : length >>> 0);
|
||||
|
||||
baseEach(collection, function(value) {
|
||||
var rand = baseRandom(0, ++index);
|
||||
@@ -4631,9 +4631,9 @@
|
||||
*/
|
||||
function sortBy(collection, callback, thisArg) {
|
||||
var index = -1,
|
||||
length = (collection && collection.length) | 0,
|
||||
length = collection && collection.length,
|
||||
multi = callback && isArray(callback),
|
||||
result = Array(length < 0 ? 0 : length);
|
||||
result = Array(length < 0 ? 0 : length >>> 0);
|
||||
|
||||
if (!multi) {
|
||||
callback = lodash.createCallback(callback, thisArg, 3);
|
||||
@@ -6949,7 +6949,7 @@
|
||||
target = String(target);
|
||||
|
||||
var length = string.length;
|
||||
position = (typeof position == 'number' ? nativeMin(nativeMax(position | 0, 0), length) : length) - target.length;
|
||||
position = (typeof position == 'number' ? nativeMin(nativeMax(+position || 0, 0), length) : length) - target.length;
|
||||
return position >= 0 && string.indexOf(target, position) == position;
|
||||
}
|
||||
|
||||
@@ -7202,7 +7202,7 @@
|
||||
*/
|
||||
function startsWith(string, target, position) {
|
||||
string = string == null ? '' : String(string);
|
||||
position = typeof position == 'number' ? nativeMin(nativeMax(position | 0, 0), string.length) : 0;
|
||||
position = typeof position == 'number' ? nativeMin(nativeMax(+position || 0, 0), string.length) : 0;
|
||||
return string.lastIndexOf(target, position) == position;
|
||||
}
|
||||
|
||||
@@ -7508,11 +7508,11 @@
|
||||
|
||||
if (options && isObject(options)) {
|
||||
var separator = 'separator' in options ? options.separator : separator;
|
||||
length = 'length' in options ? options.length | 0 : length;
|
||||
length = 'length' in options ? +options.length || 0 : length;
|
||||
omission = 'omission' in options ? String(options.omission) : omission;
|
||||
}
|
||||
else if (options != null) {
|
||||
length = options | 0;
|
||||
length = +options || 0;
|
||||
}
|
||||
string = string == null ? '' : String(string);
|
||||
if (length >= string.length) {
|
||||
|
||||
Reference in New Issue
Block a user