lodash-rails 3.3.1.1 → 3.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/lodash/rails/version.rb +1 -1
- data/vendor/assets/javascripts/lodash.compat.js +434 -304
- data/vendor/assets/javascripts/lodash.compat.min.js +89 -87
- data/vendor/assets/javascripts/lodash.js +434 -304
- data/vendor/assets/javascripts/lodash.min.js +85 -85
- metadata +2 -2
@@ -1,91 +1,93 @@
|
|
1
1
|
/**
|
2
2
|
* @license
|
3
|
-
* lodash 3.
|
3
|
+
* lodash 3.4.0 (Custom Build) lodash.com/license | Underscore.js 1.8.2 underscorejs.org/LICENSE
|
4
4
|
* Build: `lodash compat -o ./lodash.js`
|
5
5
|
*/
|
6
|
-
;(function(){function n(n,t){if(n!==t){var r=n===n,e=t===t;if(n>t||!r||typeof n=="undefined"&&e)return 1;if(n<t||!e||typeof t=="undefined"&&r)return-1}return 0}function t(n,t,r){if(t!==t)return
|
7
|
-
}function a(
|
8
|
-
|
9
|
-
}function
|
10
|
-
|
11
|
-
|
12
|
-
}
|
13
|
-
if(
|
14
|
-
|
15
|
-
}
|
16
|
-
}return n}function
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
}return i}f=n[i],a=r?r(f,t,i,n,a):
|
21
|
-
return
|
22
|
-
|
23
|
-
|
24
|
-
for(i=o;++a
|
25
|
-
for(var
|
26
|
-
e=
|
27
|
-
}
|
28
|
-
|
29
|
-
}
|
30
|
-
|
31
|
-
}function te(n,t,r
|
32
|
-
}function
|
33
|
-
}function
|
34
|
-
}
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
}function
|
39
|
-
}function
|
40
|
-
}
|
41
|
-
|
42
|
-
|
43
|
-
}if(typeof n!="function"||t&&typeof t!="function")throw new Tu(
|
44
|
-
|
45
|
-
nu(n)||(n=Ru(n));for(var t=n.length,r=
|
46
|
-
|
47
|
-
}function
|
48
|
-
for(;++e<a;){r=u[e];var f=t[r];n[r]=f,i&&(n.prototype[r]=function(t){return function(){var r=this.__chain__;if(o||r){var e=n(this.__wrapped__);return(e.__actions__=
|
49
|
-
}
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
})
|
56
|
-
}
|
57
|
-
},
|
58
|
-
return
|
59
|
-
|
60
|
-
|
61
|
-
},
|
62
|
-
|
63
|
-
return
|
64
|
-
},
|
65
|
-
},
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
},
|
71
|
-
},
|
72
|
-
},
|
73
|
-
},
|
74
|
-
|
75
|
-
if(
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
}}
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
}
|
87
|
-
|
88
|
-
n
|
89
|
-
|
90
|
-
|
91
|
-
|
6
|
+
;(function(){function n(n,t){if(n!==t){var r=n===n,e=t===t;if(n>t||!r||typeof n=="undefined"&&e)return 1;if(n<t||!e||typeof t=="undefined"&&r)return-1}return 0}function t(n,t,r){if(t!==t)return s(n,r);r-=1;for(var e=n.length;++r<e;)if(n[r]===t)return r;return-1}function r(n){return typeof n=="function"||false}function e(n){return typeof n=="string"?n:null==n?"":n+""}function u(n){return n.charCodeAt(0)}function o(n,t){for(var r=-1,e=n.length;++r<e&&-1<t.indexOf(n.charAt(r)););return r}function i(n,t){for(var r=n.length;r--&&-1<t.indexOf(n.charAt(r)););return r
|
7
|
+
}function a(t,r){return n(t.a,r.a)||t.b-r.b}function f(n){return Ut[n]}function c(n){return Wt[n]}function l(n){return"\\"+Lt[n]}function s(n,t,r){var e=n.length;for(t+=r?0:-1;r?t--:++t<e;){var u=n[t];if(u!==u)return t}return-1}function p(n){return n&&typeof n=="object"||false}function h(n){return 160>=n&&9<=n&&13>=n||32==n||160==n||5760==n||6158==n||8192<=n&&(8202>=n||8232==n||8233==n||8239==n||8287==n||12288==n||65279==n)}function _(n,t){for(var r=-1,e=n.length,u=-1,o=[];++r<e;)n[r]===t&&(n[r]=$,o[++u]=r);
|
8
|
+
return o}function g(n){for(var t=-1,r=n.length;++t<r&&h(n.charCodeAt(t)););return t}function v(n){for(var t=n.length;t--&&h(n.charCodeAt(t)););return t}function y(n){return Ft[n]}function d(h){function Ut(n){if(p(n)&&!(Po(n)||n instanceof Nt)){if(n instanceof Ft)return n;if(Bu.call(n,"__chain__")&&Bu.call(n,"__wrapped__"))return de(n)}return new Ft(n)}function Wt(){}function Ft(n,t,r){this.__wrapped__=n,this.__actions__=r||[],this.__chain__=!!t}function Nt(n){this.__wrapped__=n,this.__actions__=null,this.__dir__=1,this.__dropCount__=0,this.__filtered__=false,this.__iteratees__=null,this.__takeCount__=vo,this.__views__=null
|
9
|
+
}function Lt(){this.__data__={}}function $t(n){var t=n?n.length:0;for(this.data={hash:io(null),set:new Qu};t--;)this.push(n[t])}function Pt(n,t){var r=n.data;return(typeof t=="string"||nu(t)?r.set.has(t):r.hash[t])?0:-1}function Bt(n,t){var r=-1,e=n.length;for(t||(t=Au(e));++r<e;)t[r]=n[r];return t}function qt(n,t){for(var r=-1,e=n.length;++r<e&&false!==t(n[r],r,n););return n}function Kt(n,t){for(var r=-1,e=n.length;++r<e;)if(!t(n[r],r,n))return false;return true}function Vt(n,t){for(var r=-1,e=n.length,u=-1,o=[];++r<e;){var i=n[r];
|
10
|
+
t(i,r,n)&&(o[++u]=i)}return o}function Yt(n,t){for(var r=-1,e=n.length,u=Au(e);++r<e;)u[r]=t(n[r],r,n);return u}function Zt(n){for(var t=-1,r=n.length,e=go;++t<r;){var u=n[t];u>e&&(e=u)}return e}function Gt(n,t,r,e){var u=-1,o=n.length;for(e&&o&&(r=n[++u]);++u<o;)r=t(r,n[u],u,n);return r}function Jt(n,t,r,e){var u=n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r}function Xt(n,t){for(var r=-1,e=n.length;++r<e;)if(t(n[r],r,n))return true;return false}function Ht(n,t){return typeof n=="undefined"?t:n
|
11
|
+
}function Qt(n,t,r,e){return typeof n!="undefined"&&Bu.call(e,r)?n:t}function nr(n,t,r){var e=qo(t);if(!r)return rr(t,n,e);for(var u=-1,o=e.length;++u<o;){var i=e[u],a=n[i],f=r(a,t[i],i,n,t);(f===f?f===a:a!==a)&&(typeof a!="undefined"||i in n)||(n[i]=f)}return n}function tr(n,t){for(var r=-1,e=n.length,u=le(e),o=t.length,i=Au(o);++r<o;){var a=t[r];u?(a=parseFloat(a),i[r]=fe(a,e)?n[a]:m):i[r]=n[a]}return i}function rr(n,t,r){r||(r=t,t={});for(var e=-1,u=r.length;++e<u;){var o=r[e];t[o]=n[o]}return t
|
12
|
+
}function er(n,t,r){var e=typeof n;if("function"==e){if(e=typeof t!="undefined"){var e=Ut.support,u=!(e.funcNames?n.name:e.funcDecomp);if(!u){var o=$u.call(n);e.funcNames||(u=!yt.test(o)),u||(u=jt.test(o)||tu(n),ko(n,u))}e=u}n=e?$r(n,t,r):n}else n=null==n?mu:"object"==e?Ar(n):typeof t=="undefined"?Or(n+""):jr(n+"",t);return n}function ur(n,t,r,e,u,o,i){var a;if(r&&(a=u?r(n,e,u):r(n)),typeof a!="undefined")return a;if(!nu(n))return n;if(e=Po(n)){if(a=oe(n),!t)return Bt(n,a)}else{var f=Du.call(n),c=f==q;
|
13
|
+
if(f!=V&&f!=P&&(!c||u))return St[f]?ae(n,f,t):u?n:{};if(Dt(n))return u?n:{};if(a=ie(c?{}:n),!t)return rr(n,a,qo(n))}for(o||(o=[]),i||(i=[]),u=o.length;u--;)if(o[u]==n)return i[u];return o.push(n),i.push(a),(e?qt:vr)(n,function(e,u){a[u]=ur(e,t,r,u,n,o,i)}),a}function or(n,t,r,e){if(typeof n!="function")throw new Tu(L);return no(function(){n.apply(m,Rr(r,e))},t)}function ir(n,r){var e=n?n.length:0,u=[];if(!e)return u;var o=-1,i=ue(),a=i==t,f=a&&200<=r.length?Ro(r):null,c=r.length;f&&(i=Pt,a=false,r=f);
|
14
|
+
n:for(;++o<e;)if(f=n[o],a&&f===f){for(var l=c;l--;)if(r[l]===f)continue n;u.push(f)}else 0>i(r,f,0)&&u.push(f);return u}function ar(n,t){var r=n?n.length:0;if(!le(r))return vr(n,t);for(var e=-1,u=ye(n);++e<r&&false!==t(u[e],e,u););return n}function fr(n,t){var r=n?n.length:0;if(!le(r))return yr(n,t);for(var e=ye(n);r--&&false!==t(e[r],r,e););return n}function cr(n,t){var r=true;return ar(n,function(n,e,u){return r=!!t(n,e,u)}),r}function lr(n,t){var r=[];return ar(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r
|
15
|
+
}function sr(n,t,r,e){var u;return r(n,function(n,r,o){return t(n,r,o)?(u=e?r:n,false):void 0}),u}function pr(n,t,r,e){e-=1;for(var u=n.length,o=-1,i=[];++e<u;){var a=n[e];if(p(a)&&le(a.length)&&(Po(a)||Xe(a))){t&&(a=pr(a,t,r,0));var f=-1,c=a.length;for(i.length+=c;++f<c;)i[++o]=a[f]}else r||(i[++o]=a)}return i}function hr(n,t,r){var e=-1,u=ye(n);r=r(n);for(var o=r.length;++e<o;){var i=r[e];if(false===t(u[i],i,u))break}return n}function _r(n,t,r){var e=ye(n);r=r(n);for(var u=r.length;u--;){var o=r[u];if(false===t(e[o],o,e))break
|
16
|
+
}return n}function gr(n,t){hr(n,t,fu)}function vr(n,t){return hr(n,t,qo)}function yr(n,t){return _r(n,t,qo)}function dr(n,t){for(var r=-1,e=t.length,u=-1,o=[];++r<e;){var i=t[r];zo(n[i])&&(o[++u]=i)}return o}function mr(n,t,r){var e=-1,u=typeof t=="function",o=n?n.length:0,i=le(o)?Au(o):[];return ar(n,function(n){var o=u?t:null!=n&&n[t];i[++e]=o?o.apply(n,r):m}),i}function wr(n,t,r,e,u,o){if(n===t)return 0!==n||1/n==1/t;var i=typeof n,a=typeof t;if("function"!=i&&"object"!=i&&"function"!=a&&"object"!=a||null==n||null==t)n=n!==n&&t!==t;
|
17
|
+
else n:{var i=wr,a=Po(n),f=Po(t),c=B,l=B;a||(c=Du.call(n),c==P?c=V:c!=V&&(a=ou(n))),f||(l=Du.call(t),l==P?l=V:l!=V&&ou(t));var s=c==V&&!Dt(n),f=l==V&&!Dt(t),l=c==l;if(!l||a||s)if(c=s&&Bu.call(n,"__wrapped__"),f=f&&Bu.call(t,"__wrapped__"),c||f)n=i(c?n.value():n,f?t.value():t,r,e,u,o);else if(l){for(u||(u=[]),o||(o=[]),c=u.length;c--;)if(u[c]==n){n=o[c]==t;break n}u.push(n),o.push(t),n=(a?Qr:te)(n,t,i,r,e,u,o),u.pop(),o.pop()}else n=false;else n=ne(n,t,c)}return n}function br(n,t,r,e,u){var o=t.length;
|
18
|
+
if(null==n)return!o;for(var i=-1,a=!u;++i<o;)if(a&&e[i]?r[i]!==n[t[i]]:!Bu.call(n,t[i]))return false;for(i=-1;++i<o;){var f=t[i];if(a&&e[i])f=Bu.call(n,f);else{var c=n[f],l=r[i],f=u?u(c,l,f):m;typeof f=="undefined"&&(f=wr(l,c,u,true))}if(!f)return false}return true}function xr(n,t){var r=[];return ar(n,function(n,e,u){r.push(t(n,e,u))}),r}function Ar(n){var t=qo(n),r=t.length;if(1==r){var e=t[0],u=n[e];if(se(u))return function(n){return null!=n&&n[e]===u&&Bu.call(n,e)}}for(var o=Au(r),i=Au(r);r--;)u=n[t[r]],o[r]=u,i[r]=se(u);
|
19
|
+
return function(n){return br(n,t,o,i)}}function jr(n,t){return se(t)?function(r){return null!=r&&r[n]===t}:function(r){return null!=r&&wr(t,r[n],null,true)}}function Er(n,t,r,e,u){if(!nu(n))return n;var o=le(t.length)&&(Po(t)||ou(t));return(o?qt:vr)(t,function(t,i,a){if(p(t)){e||(e=[]),u||(u=[]);n:{t=e;for(var f=u,c=t.length,l=a[i];c--;)if(t[c]==l){n[i]=f[c],i=void 0;break n}c=n[i],a=r?r(c,l,i,n,a):m;var s=typeof a=="undefined";s&&(a=l,le(l.length)&&(Po(l)||ou(l))?a=Po(c)?c:c?Bt(c):[]:Do(l)||Xe(l)?a=Xe(c)?iu(c):Do(c)?c:{}:s=false),t.push(l),f.push(a),s?n[i]=Er(a,l,r,t,f):(a===a?a!==c:c===c)&&(n[i]=a),i=void 0
|
20
|
+
}return i}f=n[i],a=r?r(f,t,i,n,a):m,(l=typeof a=="undefined")&&(a=t),!o&&typeof a=="undefined"||!l&&(a===a?a===f:f!==f)||(n[i]=a)}),n}function Or(n){return function(t){return null==t?m:t[n]}}function Ir(n,t){return n+Gu(_o()*(t-n+1))}function kr(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function Rr(n,t,r){var e=-1,u=n.length;for(t=null==t?0:+t||0,0>t&&(t=-t>u?0:u+t),r=typeof r=="undefined"||r>u?u:+r||0,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Au(u);++e<u;)r[e]=n[e+t];return r}function Cr(n,t){var r;
|
21
|
+
return ar(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function Sr(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].c;return n}function Tr(t,r,e){var u=-1,o=t.length,i=le(o)?Au(o):[];return ar(t,function(n){for(var t=r.length,e=Au(t);t--;)e[t]=null==n?m:n[r[t]];i[++u]={a:e,b:u,c:n}}),Sr(i,function(t,r){var u;n:{u=-1;for(var o=t.a,i=r.a,a=o.length,f=e.length;++u<a;){var c=n(o[u],i[u]);if(c){u=u<f?e[u]?c:-1*c:c;break n}}u=t.b-r.b}return u})}function Ur(n,r){var e=-1,u=ue(),o=n.length,i=u==t,a=i&&200<=o,f=a?Ro():null,c=[];
|
22
|
+
f?(u=Pt,i=false):(a=false,f=r?[]:c);n:for(;++e<o;){var l=n[e],s=r?r(l,e,n):l;if(i&&l===l){for(var p=f.length;p--;)if(f[p]===s)continue n;r&&f.push(s),c.push(l)}else 0>u(f,s,0)&&((r||a)&&f.push(s),c.push(l))}return c}function Wr(n,t){for(var r=-1,e=t.length,u=Au(e);++r<e;)u[r]=n[t[r]];return u}function Fr(n,t){var r=n;r instanceof Nt&&(r=r.value());for(var e=-1,u=t.length;++e<u;){var r=[r],o=t[e];Xu.apply(r,o.args),r=o.func.apply(o.thisArg,r)}return r}function Nr(n,t,r){var e=0,u=n?n.length:e;if(typeof t=="number"&&t===t&&u<=wo){for(;e<u;){var o=e+u>>>1,i=n[o];
|
23
|
+
(r?i<=t:i<t)?e=o+1:u=o}return u}return Lr(n,t,mu,r)}function Lr(n,t,r,e){t=r(t);for(var u=0,o=n?n.length:0,i=t!==t,a=typeof t=="undefined";u<o;){var f=Gu((u+o)/2),c=r(n[f]),l=c===c;(i?l||e:a?l&&(e||typeof c!="undefined"):e?c<=t:c<t)?u=f+1:o=f}return lo(o,mo)}function $r(n,t,r){if(typeof n!="function")return mu;if(typeof t=="undefined")return n;switch(r){case 1:return function(r){return n.call(t,r)};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)
|
24
|
+
};case 5:return function(r,e,u,o,i){return n.call(t,r,e,u,o,i)}}return function(){return n.apply(t,arguments)}}function Pr(n){return Vu.call(n,0)}function Br(n,t,r){for(var e=r.length,u=-1,o=co(n.length-e,0),i=-1,a=t.length,f=Au(o+a);++i<a;)f[i]=t[i];for(;++u<e;)f[r[u]]=n[u];for(;o--;)f[i++]=n[u++];return f}function zr(n,t,r){for(var e=-1,u=r.length,o=-1,i=co(n.length-u,0),a=-1,f=t.length,c=Au(i+f);++o<i;)c[o]=n[o];for(i=o;++a<f;)c[i+a]=t[a];for(;++e<u;)c[i+r[e]]=n[o++];return c}function Dr(n,t){return function(r,e,u){var o=t?t():{};
|
25
|
+
if(e=ee(e,u,3),Po(r)){u=-1;for(var i=r.length;++u<i;){var a=r[u];n(o,a,e(a,u,r),r)}}else ar(r,function(t,r,u){n(o,t,e(t,r,u),u)});return o}}function Mr(n){return function(){var t=arguments,r=t.length,e=t[0];if(2>r||null==e)return e;var u=t[r-2],o=t[r-1],i=t[3];for(3<r&&typeof u=="function"?(u=$r(u,o,5),r-=2):(u=2<r&&typeof o=="function"?o:null,r-=u?1:0),i&&ce(t[1],t[2],i)&&(u=3==r?null:u,r=2),o=0;++o<r;)(i=t[o])&&n(e,i,u);return e}}function qr(n,t){function r(){return(this instanceof r?e:n).apply(t,arguments)
|
26
|
+
}var e=Yr(n);return r}function Kr(n){return function(){var t=arguments.length,r=t,e=n?t-1:0;if(!t)return function(n){return n};for(var u=Au(t);r--;)if(u[r]=arguments[r],"function"!=typeof u[r])throw new Tu(L);return function(){for(var r=e,o=u[r].apply(this,arguments);n?r--:++r<t;)o=u[r].call(this,o);return o}}}function Vr(n){return function(t){var r=-1;t=gu(lu(t));for(var e=t.length,u="";++r<e;)u=n(u,t[r],r);return u}}function Yr(n){return function(){var t=Io(n.prototype),r=n.apply(t,arguments);return nu(r)?r:t
|
27
|
+
}}function Zr(n,t){return function(r,e,o){o&&ce(r,e,o)&&(e=null);var i=ee(),a=null==e;if(i===er&&a||(a=false,e=i(e,o,3)),a){if(e=Po(r),e||!uu(r))return n(e?r:ve(r));e=u}return re(r,e,t)}}function Gr(n,t,r,e,u,o,i,a,f,c){function l(){for(var A=arguments.length,j=A,E=Au(A);j--;)E[j]=arguments[j];if(e&&(E=Br(E,e,u)),o&&(E=zr(E,o,i)),g||y){var j=l.placeholder,k=_(E,j),A=A-k.length;if(A<c){var R=a?Bt(a):null,A=co(c-A,0),C=g?k:null,k=g?null:k,S=g?E:null,E=g?null:E;return t|=g?O:I,t&=~(g?I:O),v||(t&=~(b|x)),E=Gr(n,t,r,S,C,E,k,R,f,A),E.placeholder=j,E
|
28
|
+
}}if(j=p?r:this,h&&(n=j[w]),a)for(R=E.length,A=lo(a.length,R),C=Bt(E);A--;)k=a[A],E[A]=fe(k,R)?C[k]:m;return s&&f<E.length&&(E.length=f),(this instanceof l?d||Yr(n):n).apply(j,E)}var s=t&R,p=t&b,h=t&x,g=t&j,v=t&A,y=t&E,d=!h&&Yr(n),w=n;return l}function Jr(n,t,r){return n=n.length,t=+t,n<t&&ao(t)?(t-=n,r=null==r?" ":r+"",hu(r,Yu(t/r.length)).slice(0,t)):""}function Xr(n,t,r,e){function u(){for(var t=-1,a=arguments.length,f=-1,c=e.length,l=Au(a+c);++f<c;)l[f]=e[f];for(;a--;)l[f++]=arguments[++t];return(this instanceof u?i:n).apply(o?r:this,l)
|
29
|
+
}var o=t&b,i=Yr(n);return u}function Hr(n,t,r,e,u,o,i,a){var f=t&x;if(!f&&typeof n!="function")throw new Tu(L);var c=e?e.length:0;if(c||(t&=~(O|I),e=u=null),c-=u?u.length:0,t&I){var l=e,s=u;e=u=null}var p=!f&&Co(n);if(r=[n,t,r,e,u,l,s,o,i,a],p&&true!==p){e=r[1],t=p[1],a=e|t,o=R|k,u=b|x,i=o|u|A|E;var l=e&R&&!(t&R),s=e&k&&!(t&k),h=(s?r:p)[7],g=(l?r:p)[8];o=a>=o&&a<=i&&(e<k||(s||l)&&h.length<=g),(!(e>=k&&t>u||e>u&&t>=k)||o)&&(t&b&&(r[2]=p[2],a|=e&b?0:A),(e=p[3])&&(u=r[3],r[3]=u?Br(u,e,p[4]):Bt(e),r[4]=u?_(r[3],$):Bt(p[4])),(e=p[5])&&(u=r[5],r[5]=u?zr(u,e,p[6]):Bt(e),r[6]=u?_(r[5],$):Bt(p[6])),(e=p[7])&&(r[7]=Bt(e)),t&R&&(r[8]=null==r[8]?p[8]:lo(r[8],p[8])),null==r[9]&&(r[9]=p[9]),r[0]=p[0],r[1]=a),t=r[1],a=r[9]
|
30
|
+
}return r[9]=null==a?f?0:n.length:co(a-c,0)||0,(p?ko:So)(t==b?qr(r[0],r[2]):t!=O&&t!=(b|O)||r[4].length?Gr.apply(m,r):Xr.apply(m,r),r)}function Qr(n,t,r,e,u,o,i){var a=-1,f=n.length,c=t.length,l=true;if(f!=c&&(!u||c<=f))return false;for(;l&&++a<f;){var s=n[a],p=t[a],l=m;if(e&&(l=u?e(p,s,a):e(s,p,a)),typeof l=="undefined")if(u)for(var h=c;h--&&(p=t[h],!(l=s&&s===p||r(s,p,e,u,o,i))););else l=s&&s===p||r(s,p,e,u,o,i)}return!!l}function ne(n,t,r){switch(r){case z:case D:return+n==+t;case M:return n.name==t.name&&n.message==t.message;
|
31
|
+
case K:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case Y:case Z:return n==t+""}return false}function te(n,t,r,e,u,o,i){var a=qo(n),f=a.length,c=qo(t).length;if(f!=c&&!u)return false;for(var l,c=-1;++c<f;){var s=a[c],p=Bu.call(t,s);if(p){var h=n[s],_=t[s],p=m;e&&(p=u?e(_,h,s):e(h,_,s)),typeof p=="undefined"&&(p=h&&h===_||r(h,_,e,u,o,i))}if(!p)return false;l||(l="constructor"==s)}return l||(r=n.constructor,e=t.constructor,!(r!=e&&"constructor"in n&&"constructor"in t)||typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)?true:false
|
32
|
+
}function re(n,t,r){var e=r?vo:go,u=e,o=u;return ar(n,function(n,i,a){i=t(n,i,a),((r?i<u:i>u)||i===e&&i===o)&&(u=i,o=n)}),o}function ee(n,t,r){var e=Ut.callback||yu,e=e===yu?er:e;return r?e(n,t,r):e}function ue(n,r,e){var u=Ut.indexOf||Ae,u=u===Ae?t:u;return n?u(n,r,e):u}function oe(n){var t=n.length,r=new n.constructor(t);return t&&"string"==typeof n[0]&&Bu.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function ie(n){return n=n.constructor,typeof n=="function"&&n instanceof n||(n=Ru),new n
|
33
|
+
}function ae(n,t,r){var e=n.constructor;switch(t){case G:return Pr(n);case z:case D:return new e(+n);case J:case X:case H:case Q:case nt:case tt:case rt:case et:case ut:return e instanceof e&&(e=jo[t]),t=n.buffer,new e(r?Pr(t):t,n.byteOffset,n.length);case K:case Z:return new e(n);case Y:var u=new e(n.source,vt.exec(n));u.lastIndex=n.lastIndex}return u}function fe(n,t){return n=+n,t=null==t?xo:t,-1<n&&0==n%1&&n<t}function ce(n,t,r){if(!nu(r))return false;var e=typeof t;return"number"==e?(e=r.length,e=le(e)&&fe(t,e)):e="string"==e&&t in r,e?(t=r[t],n===n?n===t:t!==t):false
|
34
|
+
}function le(n){return typeof n=="number"&&-1<n&&0==n%1&&n<=xo}function se(n){return n===n&&(0===n?0<1/n:!nu(n))}function pe(n,t){n=ye(n);for(var r=-1,e=t.length,u={};++r<e;){var o=t[r];o in n&&(u[o]=n[o])}return u}function he(n,t){var r={};return gr(n,function(n,e,u){t(n,e,u)&&(r[e]=n)}),r}function _e(n){var t,r=Ut.support;if(!p(n)||Du.call(n)!=V||Dt(n)||!(Bu.call(n,"constructor")||(t=n.constructor,typeof t!="function"||t instanceof t))||!r.argsTag&&Xe(n))return false;var e;return r.ownLast?(gr(n,function(n,t,r){return e=Bu.call(r,t),false
|
35
|
+
}),false!==e):(gr(n,function(n,t){e=t}),typeof e=="undefined"||Bu.call(n,e))}function ge(n){for(var t=fu(n),r=t.length,e=r&&n.length,u=Ut.support,u=e&&le(e)&&(Po(n)||u.nonEnumStrings&&uu(n)||u.nonEnumArgs&&Xe(n)),o=-1,i=[];++o<r;){var a=t[o];(u&&fe(a,e)||Bu.call(n,a))&&i.push(a)}return i}function ve(n){return null==n?[]:le(n.length)?Ut.support.unindexedChars&&uu(n)?n.split(""):nu(n)?n:Ru(n):cu(n)}function ye(n){if(Ut.support.unindexedChars&&uu(n)){for(var t=-1,r=n.length,e=Ru(n);++t<r;)e[t]=n.charAt(t);
|
36
|
+
return e}return nu(n)?n:Ru(n)}function de(n){return n instanceof Nt?n.clone():new Ft(n.__wrapped__,n.__chain__,Bt(n.__actions__))}function me(n,t,r){return n&&n.length?((r?ce(n,t,r):null==t)&&(t=1),Rr(n,0>t?0:t)):[]}function we(n,t,r){var e=n?n.length:0;return e?((r?ce(n,t,r):null==t)&&(t=1),t=e-(+t||0),Rr(n,0,0>t?0:t)):[]}function be(n,t,r){var e=-1,u=n?n.length:0;for(t=ee(t,r,3);++e<u;)if(t(n[e],e,n))return e;return-1}function xe(n){return n?n[0]:m}function Ae(n,r,e){var u=n?n.length:0;if(!u)return-1;
|
37
|
+
if(typeof e=="number")e=0>e?co(u+e,0):e;else if(e)return e=Nr(n,r),n=n[e],(r===r?r===n:n!==n)?e:-1;return t(n,r,e||0)}function je(n){return me(n,1)}function Ee(n,r,e,u){if(!n||!n.length)return[];null!=r&&typeof r!="boolean"&&(u=e,e=ce(n,r,u)?null:r,r=false);var o=ee();if((o!==er||null!=e)&&(e=o(e,u,3)),r&&ue()==t){r=e;var i;e=-1,u=n.length;for(var o=-1,a=[];++e<u;){var f=n[e],c=r?r(f,e,n):f;e&&i===c||(i=c,a[++o]=f)}n=a}else n=Ur(n,e);return n}function Oe(n){for(var t=-1,r=(n&&n.length&&Zt(Yt(n,Pu)))>>>0,e=Au(r);++t<r;)e[t]=Yt(n,Or(t));
|
38
|
+
return e}function Ie(n,t){var r=-1,e=n?n.length:0,u={};for(!e||t||Po(n[0])||(t=[]);++r<e;){var o=n[r];t?u[o]=t[r]:o&&(u[o[0]]=o[1])}return u}function ke(n){return n=Ut(n),n.__chain__=true,n}function Re(n,t,r){return t.call(r,n)}function Ce(n,t,r){var e=Po(n)?Kt:cr;return(typeof t!="function"||typeof r!="undefined")&&(t=ee(t,r,3)),e(n,t)}function Se(n,t,r){var e=Po(n)?Vt:lr;return t=ee(t,r,3),e(n,t)}function Te(n,t,r){return Po(n)?(t=be(n,t,r),-1<t?n[t]:m):(t=ee(t,r,3),sr(n,t,ar))}function Ue(n,t,r){return typeof t=="function"&&typeof r=="undefined"&&Po(n)?qt(n,t):ar(n,$r(t,r,3))
|
39
|
+
}function We(n,t,r){if(typeof t=="function"&&typeof r=="undefined"&&Po(n))for(r=n.length;r--&&false!==t(n[r],r,n););else n=fr(n,$r(t,r,3));return n}function Fe(n,t,r){var e=n?n.length:0;return le(e)||(n=cu(n),e=n.length),e?(r=typeof r=="number"?0>r?co(e+r,0):r||0:0,typeof n=="string"||!Po(n)&&uu(n)?r<e&&-1<n.indexOf(t,r):-1<ue(n,t,r)):false}function Ne(n,t,r){var e=Po(n)?Yt:xr;return t=ee(t,r,3),e(n,t)}function Le(n,t,r,e){return(Po(n)?Gt:kr)(n,ee(t,e,4),r,3>arguments.length,ar)}function $e(n,t,r,e){return(Po(n)?Jt:kr)(n,ee(t,e,4),r,3>arguments.length,fr)
|
40
|
+
}function Pe(n,t,r){return(r?ce(n,t,r):null==t)?(n=ve(n),t=n.length,0<t?n[Ir(0,t-1)]:m):(n=Be(n),n.length=lo(0>t?0:+t||0,n.length),n)}function Be(n){n=ve(n);for(var t=-1,r=n.length,e=Au(r);++t<r;){var u=Ir(0,t);t!=u&&(e[t]=e[u]),e[u]=n[t]}return e}function ze(n,t,r){var e=Po(n)?Xt:Cr;return(typeof t!="function"||typeof r!="undefined")&&(t=ee(t,r,3)),e(n,t)}function De(n,t){var r;if(typeof t!="function"){if(typeof n!="function")throw new Tu(L);var e=n;n=t,t=e}return function(){return 0<--n?r=t.apply(this,arguments):t=null,r
|
41
|
+
}}function Me(n,t){var r=b;if(2<arguments.length)var e=Rr(arguments,2),u=_(e,Me.placeholder),r=r|O;return Hr(n,r,t,e,u)}function qe(n,t){var r=b|x;if(2<arguments.length)var e=Rr(arguments,2),u=_(e,qe.placeholder),r=r|O;return Hr(t,r,n,e,u)}function Ke(n,t,r){return r&&ce(n,t,r)&&(t=null),n=Hr(n,j,null,null,null,null,null,t),n.placeholder=Ke.placeholder,n}function Ve(n,t,r){return r&&ce(n,t,r)&&(t=null),n=Hr(n,E,null,null,null,null,null,t),n.placeholder=Ve.placeholder,n}function Ye(n,t,r){function e(){var r=t-(No()-c);
|
42
|
+
0>=r||r>t?(a&&Zu(a),r=p,a=s=p=m,r&&(h=No(),f=n.apply(l,i),s||a||(i=l=null))):s=no(e,r)}function u(){s&&Zu(s),a=s=p=m,(g||_!==t)&&(h=No(),f=n.apply(l,i),s||a||(i=l=null))}function o(){if(i=arguments,c=No(),l=this,p=g&&(s||!v),false===_)var r=v&&!s;else{a||v||(h=c);var o=_-(c-h),y=0>=o||o>_;y?(a&&(a=Zu(a)),h=c,f=n.apply(l,i)):a||(a=no(u,o))}return y&&s?s=Zu(s):s||t===_||(s=no(e,t)),r&&(y=true,f=n.apply(l,i)),!y||s||a||(i=l=null),f}var i,a,f,c,l,s,p,h=0,_=false,g=true;if(typeof n!="function")throw new Tu(L);if(t=0>t?0:+t||0,true===r)var v=true,g=false;
|
43
|
+
else nu(r)&&(v=r.leading,_="maxWait"in r&&co(+r.maxWait||0,t),g="trailing"in r?r.trailing:g);return o.cancel=function(){s&&Zu(s),a&&Zu(a),a=s=p=m},o}function Ze(n,t){function r(){var e=arguments,u=r.cache,o=t?t.apply(this,e):e[0];return u.has(o)?u.get(o):(e=n.apply(this,e),u.set(o,e),e)}if(typeof n!="function"||t&&typeof t!="function")throw new Tu(L);return r.cache=new Ze.Cache,r}function Ge(n){var t=Rr(arguments,1),r=_(t,Ge.placeholder);return Hr(n,O,null,t,r)}function Je(n){var t=Rr(arguments,1),r=_(t,Je.placeholder);
|
44
|
+
return Hr(n,I,null,t,r)}function Xe(n){return le(p(n)?n.length:m)&&Du.call(n)==P||false}function He(n){return n&&1===n.nodeType&&p(n)&&(Ut.support.nodeTag?-1<Du.call(n).indexOf("Element"):Dt(n))||false}function Qe(n){return p(n)&&typeof n.message=="string"&&Du.call(n)==M||false}function nu(n){var t=typeof n;return"function"==t||n&&"object"==t||false}function tu(n){return null==n?false:Du.call(n)==q?qu.test($u.call(n)):p(n)&&(Dt(n)?qu:mt).test(n)||false}function ru(n){return typeof n=="number"||p(n)&&Du.call(n)==K||false
|
45
|
+
}function eu(n){return nu(n)&&Du.call(n)==Y||false}function uu(n){return typeof n=="string"||p(n)&&Du.call(n)==Z||false}function ou(n){return p(n)&&le(n.length)&&Ct[Du.call(n)]||false}function iu(n){return rr(n,fu(n))}function au(n){return dr(n,fu(n))}function fu(n){if(null==n)return[];nu(n)||(n=Ru(n));for(var t=n.length,r=Ut.support,t=t&&le(t)&&(Po(n)||r.nonEnumStrings&&uu(n)||r.nonEnumArgs&&Xe(n))&&t||0,e=n.constructor,u=-1,e=zo(e)&&e.prototype||Fu,o=e===n,i=Au(t),a=0<t,f=r.enumErrorProps&&(n===Wu||n instanceof Eu),c=r.enumPrototypes&&zo(n);++u<t;)i[u]=u+"";
|
46
|
+
for(var l in n)c&&"prototype"==l||f&&("message"==l||"name"==l)||a&&fe(l,t)||"constructor"==l&&(o||!Bu.call(n,l))||i.push(l);if(r.nonEnumShadows&&n!==Fu)for(t=n===Nu?Z:n===Wu?M:Du.call(n),r=Eo[t]||Eo[V],t==V&&(e=Fu),t=Rt.length;t--;)l=Rt[t],u=r[l],o&&u||(u?!Bu.call(n,l):n[l]===e[l])||i.push(l);return i}function cu(n){return Wr(n,qo(n))}function lu(n){return(n=e(n))&&n.replace(wt,f)}function su(n){return(n=e(n))&&At.test(n)?n.replace(xt,"\\$&"):n}function pu(n,t,r){return r&&ce(n,t,r)&&(t=0),ho(n,t)
|
47
|
+
}function hu(n,t){var r="";if(n=e(n),t=+t,1>t||!n||!ao(t))return r;do t%2&&(r+=n),t=Gu(t/2),n+=n;while(t);return r}function _u(n,t,r){var u=n;return(n=e(n))?(r?ce(u,t,r):null==t)?n.slice(g(n),v(n)+1):(t+="",n.slice(o(n,t),i(n,t)+1)):n}function gu(n,t,r){return r&&ce(n,t,r)&&(t=null),n=e(n),n.match(t||Ot)||[]}function vu(){for(var n=arguments[0],t=arguments.length,r=Au(t?t-1:0);0<--t;)r[t-1]=arguments[t];try{return n.apply(m,r)}catch(e){return Qe(e)?e:new Eu(e)}}function yu(n,t,r){return r&&ce(n,t,r)&&(t=null),p(n)?wu(n):er(n,t)
|
48
|
+
}function du(n){return function(){return n}}function mu(n){return n}function wu(n){return Ar(ur(n,true))}function bu(n,t,r){if(null==r){var e=nu(t),u=e&&qo(t);((u=u&&u.length&&dr(t,u))?u.length:e)||(u=false,r=t,t=n,n=this)}u||(u=dr(t,qo(t)));var o=true,e=-1,i=zo(n),a=u.length;false===r?o=false:nu(r)&&"chain"in r&&(o=r.chain);for(;++e<a;){r=u[e];var f=t[r];n[r]=f,i&&(n.prototype[r]=function(t){return function(){var r=this.__chain__;if(o||r){var e=n(this.__wrapped__);return(e.__actions__=Bt(this.__actions__)).push({func:t,args:arguments,thisArg:n}),e.__chain__=r,e
|
49
|
+
}return r=[this.value()],Xu.apply(r,arguments),t.apply(n,r)}}(f))}return n}function xu(){}h=h?Mt.defaults(zt.Object(),h,Mt.pick(zt,kt)):zt;var Au=h.Array,ju=h.Date,Eu=h.Error,Ou=h.Function,Iu=h.Math,ku=h.Number,Ru=h.Object,Cu=h.RegExp,Su=h.String,Tu=h.TypeError,Uu=Au.prototype,Wu=Eu.prototype,Fu=Ru.prototype,Nu=Su.prototype,Lu=(Lu=h.window)&&Lu.document,$u=Ou.prototype.toString,Pu=Or("length"),Bu=Fu.hasOwnProperty,zu=0,Du=Fu.toString,Mu=h._,qu=Cu("^"+su(Du).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ku=tu(Ku=h.ArrayBuffer)&&Ku,Vu=tu(Vu=Ku&&new Ku(0).slice)&&Vu,Yu=Iu.ceil,Zu=h.clearTimeout,Gu=Iu.floor,Ju=tu(Ju=Ru.getPrototypeOf)&&Ju,Xu=Uu.push,Hu=Fu.propertyIsEnumerable,Qu=tu(Qu=h.Set)&&Qu,no=h.setTimeout,to=Uu.splice,ro=tu(ro=h.Uint8Array)&&ro,eo=tu(eo=h.WeakMap)&&eo,uo=function(){try{var n=tu(n=h.Float64Array)&&n,t=new n(new Ku(10),0,1)&&n
|
50
|
+
}catch(r){}return t}(),oo=tu(oo=Au.isArray)&&oo,io=tu(io=Ru.create)&&io,ao=h.isFinite,fo=tu(fo=Ru.keys)&&fo,co=Iu.max,lo=Iu.min,so=tu(so=ju.now)&&so,po=tu(po=ku.isFinite)&&po,ho=h.parseInt,_o=Iu.random,go=ku.NEGATIVE_INFINITY,vo=ku.POSITIVE_INFINITY,yo=Iu.pow(2,32)-1,mo=yo-1,wo=yo>>>1,bo=uo?uo.BYTES_PER_ELEMENT:0,xo=Iu.pow(2,53)-1,Ao=eo&&new eo,jo={};jo[J]=h.Float32Array,jo[X]=h.Float64Array,jo[H]=h.Int8Array,jo[Q]=h.Int16Array,jo[nt]=h.Int32Array,jo[tt]=h.Uint8Array,jo[rt]=h.Uint8ClampedArray,jo[et]=h.Uint16Array,jo[ut]=h.Uint32Array;
|
51
|
+
var Eo={};Eo[B]=Eo[D]=Eo[K]={constructor:true,toLocaleString:true,toString:true,valueOf:true},Eo[z]=Eo[Z]={constructor:true,toString:true,valueOf:true},Eo[M]=Eo[q]=Eo[Y]={constructor:true,toString:true},Eo[V]={constructor:true},qt(Rt,function(n){for(var t in Eo)if(Bu.call(Eo,t)){var r=Eo[t];r[n]=Bu.call(r,n)}});var Oo=Ut.support={};!function(n){function t(){this.x=1}var r={0:1,length:1},e=[];t.prototype={valueOf:1,y:1};for(var u in new t)e.push(u);Oo.argsTag=Du.call(arguments)==P,Oo.enumErrorProps=Hu.call(Wu,"message")||Hu.call(Wu,"name"),Oo.enumPrototypes=Hu.call(t,"prototype"),Oo.funcDecomp=!tu(h.WinRTError)&&jt.test(d),Oo.funcNames=typeof Ou.name=="string",Oo.nodeTag=Du.call(Lu)!=V,Oo.nonEnumStrings=!Hu.call("x",0),Oo.nonEnumShadows=!/valueOf/.test(e),Oo.ownLast="x"!=e[0],Oo.spliceObjects=(to.call(r,0,1),!r[0]),Oo.unindexedChars="xx"!="x"[0]+Ru("x")[0];
|
52
|
+
try{Oo.dom=11===Lu.createDocumentFragment().nodeType}catch(o){Oo.dom=false}try{Oo.nonEnumArgs=!Hu.call(arguments,1)}catch(i){Oo.nonEnumArgs=true}}(0,0),Ut.templateSettings={escape:pt,evaluate:ht,interpolate:_t,variable:"",imports:{_:Ut}};var Io=function(){function n(){}return function(t){if(nu(t)){n.prototype=t;var r=new n;n.prototype=null}return r||h.Object()}}(),ko=Ao?function(n,t){return Ao.set(n,t),n}:mu;Vu||(Pr=Ku&&ro?function(n){var t=n.byteLength,r=uo?Gu(t/bo):0,e=r*bo,u=new Ku(t);if(r){var o=new uo(u,0,r);
|
53
|
+
o.set(new uo(n,0,r))}return t!=e&&(o=new ro(u,e),o.set(new ro(n,e))),u}:du(null));var Ro=io&&Qu?function(n){return new $t(n)}:du(null),Co=Ao?function(n){return Ao.get(n)}:xu,So=function(){var n=0,t=0;return function(r,e){var u=No(),o=U-(u-t);if(t=u,0<o){if(++n>=T)return r}else n=0;return ko(r,e)}}(),To=Dr(function(n,t,r){Bu.call(n,r)?++n[r]:n[r]=1}),Uo=Dr(function(n,t,r){Bu.call(n,r)?n[r].push(t):n[r]=[t]}),Wo=Dr(function(n,t,r){n[r]=t}),Fo=Dr(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]
|
54
|
+
}),No=so||function(){return(new ju).getTime()},Lo=Kr(),$o=Kr(true);Oo.argsTag||(Xe=function(n){return le(p(n)?n.length:m)&&Bu.call(n,"callee")&&!Hu.call(n,"callee")||false});var Po=oo||function(n){return p(n)&&le(n.length)&&Du.call(n)==B||false};Oo.dom||(He=function(n){return n&&1===n.nodeType&&p(n)&&!Do(n)||false});var Bo=po||function(n){return typeof n=="number"&&ao(n)},zo=r(/x/)||ro&&!r(ro)?function(n){return Du.call(n)==q}:r,Do=Ju?function(n){if(!n||Du.call(n)!=V||!Ut.support.argsTag&&Xe(n))return false;var t=n.valueOf,r=tu(t)&&(r=Ju(t))&&Ju(r);
|
55
|
+
return r?n==r||Ju(n)==r:_e(n)}:_e,Mo=Mr(nr),qo=fo?function(n){if(n)var t=n.constructor,r=n.length;return typeof t=="function"&&t.prototype===n||(typeof n=="function"?Ut.support.enumPrototypes:r&&le(r))?ge(n):nu(n)?fo(n):[]}:ge,Ko=Mr(Er),Vo=Vr(function(n,t,r){return t=t.toLowerCase(),n+(r?t.charAt(0).toUpperCase()+t.slice(1):t)}),Yo=Vr(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()});8!=ho(It+"08")&&(pu=function(n,t,r){return(r?ce(n,t,r):null==t)?t=0:t&&(t=+t),n=_u(n),ho(n,t||(dt.test(n)?16:10))
|
56
|
+
});var Zo=Vr(function(n,t,r){return n+(r?"_":"")+t.toLowerCase()}),Go=Vr(function(n,t,r){return n+(r?" ":"")+(t.charAt(0).toUpperCase()+t.slice(1))}),Jo=Zr(Zt),Xo=Zr(function(n){for(var t=-1,r=n.length,e=vo;++t<r;){var u=n[t];u<e&&(e=u)}return e},true);return Ut.prototype=Wt.prototype,Ft.prototype=Io(Wt.prototype),Ft.prototype.constructor=Ft,Nt.prototype=Io(Wt.prototype),Nt.prototype.constructor=Nt,Lt.prototype["delete"]=function(n){return this.has(n)&&delete this.__data__[n]},Lt.prototype.get=function(n){return"__proto__"==n?m:this.__data__[n]
|
57
|
+
},Lt.prototype.has=function(n){return"__proto__"!=n&&Bu.call(this.__data__,n)},Lt.prototype.set=function(n,t){return"__proto__"!=n&&(this.__data__[n]=t),this},$t.prototype.push=function(n){var t=this.data;typeof n=="string"||nu(n)?t.set.add(n):t.hash[n]=true},Ze.Cache=Lt,Ut.after=function(n,t){if(typeof t!="function"){if(typeof n!="function")throw new Tu(L);var r=n;n=t,t=r}return n=ao(n=+n)?n:0,function(){return 1>--n?t.apply(this,arguments):void 0}},Ut.ary=function(n,t,r){return r&&ce(n,t,r)&&(t=null),t=n&&null==t?n.length:co(+t||0,0),Hr(n,R,null,null,null,null,t)
|
58
|
+
},Ut.assign=Mo,Ut.at=function(n){return le(n?n.length:0)&&(n=ve(n)),tr(n,pr(arguments,false,false,1))},Ut.before=De,Ut.bind=Me,Ut.bindAll=function(n){for(var t=n,r=1<arguments.length?pr(arguments,false,false,1):au(n),e=-1,u=r.length;++e<u;){var o=r[e];t[o]=Hr(t[o],b,t)}return t},Ut.bindKey=qe,Ut.callback=yu,Ut.chain=ke,Ut.chunk=function(n,t,r){t=(r?ce(n,t,r):null==t)?1:co(+t||1,1),r=0;for(var e=n?n.length:0,u=-1,o=Au(Yu(e/t));r<e;)o[++u]=Rr(n,r,r+=t);return o},Ut.compact=function(n){for(var t=-1,r=n?n.length:0,e=-1,u=[];++t<r;){var o=n[t];
|
59
|
+
o&&(u[++e]=o)}return u},Ut.constant=du,Ut.countBy=To,Ut.create=function(n,t,r){var e=Io(n);return r&&ce(n,t,r)&&(t=null),t?rr(t,e,qo(t)):e},Ut.curry=Ke,Ut.curryRight=Ve,Ut.debounce=Ye,Ut.defaults=function(n){if(null==n)return n;var t=Bt(arguments);return t.push(Ht),Mo.apply(m,t)},Ut.defer=function(n){return or(n,1,arguments,1)},Ut.delay=function(n,t){return or(n,t,arguments,2)},Ut.difference=function(){for(var n=arguments,t=-1,r=n.length;++t<r;){var e=n[t];if(Po(e)||Xe(e))break}return ir(e,pr(n,false,true,++t))
|
60
|
+
},Ut.drop=me,Ut.dropRight=we,Ut.dropRightWhile=function(n,t,r){var e=n?n.length:0;if(!e)return[];for(t=ee(t,r,3);e--&&t(n[e],e,n););return Rr(n,0,e+1)},Ut.dropWhile=function(n,t,r){var e=n?n.length:0;if(!e)return[];var u=-1;for(t=ee(t,r,3);++u<e&&t(n[u],u,n););return Rr(n,u)},Ut.fill=function(n,t,r,e){var u=n?n.length:0;if(!u)return[];for(r&&typeof r!="number"&&ce(n,t,r)&&(r=0,e=u),u=n.length,r=null==r?0:+r||0,0>r&&(r=-r>u?0:u+r),e=typeof e=="undefined"||e>u?u:+e||0,0>e&&(e+=u),u=r>e?0:e>>>0,r>>>=0;r<u;)n[r++]=t;
|
61
|
+
return n},Ut.filter=Se,Ut.flatten=function(n,t,r){var e=n?n.length:0;return r&&ce(n,t,r)&&(t=false),e?pr(n,t,false,0):[]},Ut.flattenDeep=function(n){return n&&n.length?pr(n,true,false,0):[]},Ut.flow=Lo,Ut.flowRight=$o,Ut.forEach=Ue,Ut.forEachRight=We,Ut.forIn=function(n,t,r){return(typeof t!="function"||typeof r!="undefined")&&(t=$r(t,r,3)),hr(n,t,fu)},Ut.forInRight=function(n,t,r){return t=$r(t,r,3),_r(n,t,fu)},Ut.forOwn=function(n,t,r){return(typeof t!="function"||typeof r!="undefined")&&(t=$r(t,r,3)),vr(n,t)
|
62
|
+
},Ut.forOwnRight=function(n,t,r){return t=$r(t,r,3),_r(n,t,qo)},Ut.functions=au,Ut.groupBy=Uo,Ut.indexBy=Wo,Ut.initial=function(n){return we(n,1)},Ut.intersection=function(){for(var n=[],r=-1,e=arguments.length,u=[],o=ue(),i=o==t;++r<e;){var a=arguments[r];(Po(a)||Xe(a))&&(n.push(a),u.push(i&&120<=a.length?Ro(r&&a):null))}var e=n.length,i=n[0],f=-1,c=i?i.length:0,l=[],s=u[0];n:for(;++f<c;)if(a=i[f],0>(s?Pt(s,a):o(l,a,0))){for(r=e;--r;){var p=u[r];if(0>(p?Pt(p,a):o(n[r],a,0)))continue n}s&&s.push(a),l.push(a)
|
63
|
+
}return l},Ut.invert=function(n,t,r){r&&ce(n,t,r)&&(t=null),r=-1;for(var e=qo(n),u=e.length,o={};++r<u;){var i=e[r],a=n[i];t?Bu.call(o,a)?o[a].push(i):o[a]=[i]:o[a]=i}return o},Ut.invoke=function(n,t){return mr(n,t,Rr(arguments,2))},Ut.keys=qo,Ut.keysIn=fu,Ut.map=Ne,Ut.mapValues=function(n,t,r){var e={};return t=ee(t,r,3),vr(n,function(n,r,u){e[r]=t(n,r,u)}),e},Ut.matches=wu,Ut.matchesProperty=function(n,t){return jr(n+"",ur(t,true))},Ut.memoize=Ze,Ut.merge=Ko,Ut.mixin=bu,Ut.negate=function(n){if(typeof n!="function")throw new Tu(L);
|
64
|
+
return function(){return!n.apply(this,arguments)}},Ut.omit=function(n,t,r){if(null==n)return{};if(typeof t!="function"){var e=Yt(pr(arguments,false,false,1),Su);return pe(n,ir(fu(n),e))}return t=$r(t,r,3),he(n,function(n,r,e){return!t(n,r,e)})},Ut.once=function(n){return De(n,2)},Ut.pairs=function(n){for(var t=-1,r=qo(n),e=r.length,u=Au(e);++t<e;){var o=r[t];u[t]=[o,n[o]]}return u},Ut.partial=Ge,Ut.partialRight=Je,Ut.partition=Fo,Ut.pick=function(n,t,r){return null==n?{}:typeof t=="function"?he(n,$r(t,r,3)):pe(n,pr(arguments,false,false,1))
|
65
|
+
},Ut.pluck=function(n,t){return Ne(n,Or(t))},Ut.property=function(n){return Or(n+"")},Ut.propertyOf=function(n){return function(t){return null==n?m:n[t]}},Ut.pull=function(){var n=arguments,t=n[0];if(!t||!t.length)return t;for(var r=0,e=ue(),u=n.length;++r<u;)for(var o=0,i=n[r];-1<(o=e(t,i,o));)to.call(t,o,1);return t},Ut.pullAt=function(t){var r=t||[],e=pr(arguments,false,false,1),u=e.length,o=tr(r,e);for(e.sort(n);u--;){var i=parseFloat(e[u]);if(i!=a&&fe(i)){var a=i;to.call(r,i,1)}}return o},Ut.range=function(n,t,r){r&&ce(n,t,r)&&(t=r=null),n=+n||0,r=null==r?1:+r||0,null==t?(t=n,n=0):t=+t||0;
|
66
|
+
var e=-1;t=co(Yu((t-n)/(r||1)),0);for(var u=Au(t);++e<t;)u[e]=n,n+=r;return u},Ut.rearg=function(n){var t=pr(arguments,false,false,1);return Hr(n,k,null,null,null,t)},Ut.reject=function(n,t,r){var e=Po(n)?Vt:lr;return t=ee(t,r,3),e(n,function(n,r,e){return!t(n,r,e)})},Ut.remove=function(n,t,r){var e=-1,u=n?n.length:0,o=[];for(t=ee(t,r,3);++e<u;)r=n[e],t(r,e,n)&&(o.push(r),to.call(n,e--,1),u--);return o},Ut.rest=je,Ut.shuffle=Be,Ut.slice=function(n,t,r){var e=n?n.length:0;return e?(r&&typeof r!="number"&&ce(n,t,r)&&(t=0,r=e),Rr(n,t,r)):[]
|
67
|
+
},Ut.sortBy=function(n,t,r){if(null==n)return[];var e=-1,u=n.length,o=le(u)?Au(u):[];return r&&ce(n,t,r)&&(t=null),t=ee(t,r,3),ar(n,function(n,r,u){o[++e]={a:t(n,r,u),b:e,c:n}}),Sr(o,a)},Ut.sortByAll=function(n){if(null==n)return[];var t=arguments,r=t[3];return r&&ce(t[1],t[2],r)&&(t=[n,t[1]]),Tr(n,pr(t,false,false,1),[])},Ut.sortByOrder=function(n,t,r,e){return null==n?[]:(e&&ce(t,r,e)&&(r=null),Po(t)||(t=null==t?[]:[t]),Po(r)||(r=null==r?[]:[r]),Tr(n,t,r))},Ut.spread=function(n){if(typeof n!="function")throw new Tu(L);
|
68
|
+
return function(t){return n.apply(this,t)}},Ut.take=function(n,t,r){return n&&n.length?((r?ce(n,t,r):null==t)&&(t=1),Rr(n,0,0>t?0:t)):[]},Ut.takeRight=function(n,t,r){var e=n?n.length:0;return e?((r?ce(n,t,r):null==t)&&(t=1),t=e-(+t||0),Rr(n,0>t?0:t)):[]},Ut.takeRightWhile=function(n,t,r){var e=n?n.length:0;if(!e)return[];for(t=ee(t,r,3);e--&&t(n[e],e,n););return Rr(n,e+1)},Ut.takeWhile=function(n,t,r){var e=n?n.length:0;if(!e)return[];var u=-1;for(t=ee(t,r,3);++u<e&&t(n[u],u,n););return Rr(n,0,u)
|
69
|
+
},Ut.tap=function(n,t,r){return t.call(r,n),n},Ut.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new Tu(L);return false===r?e=false:nu(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),Tt.leading=e,Tt.maxWait=+t,Tt.trailing=u,Ye(n,t,Tt)},Ut.thru=Re,Ut.times=function(n,t,r){if(n=+n,1>n||!ao(n))return[];var e=-1,u=Au(lo(n,yo));for(t=$r(t,r,1);++e<n;)e<yo?u[e]=t(e):t(e);return u},Ut.toArray=function(n){var t=n?n.length:0;return le(t)?t?Ut.support.unindexedChars&&uu(n)?n.split(""):Bt(n):[]:cu(n)
|
70
|
+
},Ut.toPlainObject=iu,Ut.transform=function(n,t,r,e){var u=Po(n)||ou(n);return t=ee(t,e,4),null==r&&(u||nu(n)?(e=n.constructor,r=u?Po(n)?new e:[]:Io(zo(e)&&e.prototype)):r={}),(u?qt:vr)(n,function(n,e,u){return t(r,n,e,u)}),r},Ut.union=function(){return Ur(pr(arguments,false,true,0))},Ut.uniq=Ee,Ut.unzip=Oe,Ut.values=cu,Ut.valuesIn=function(n){return Wr(n,fu(n))},Ut.where=function(n,t){return Se(n,Ar(t))},Ut.without=function(n){return ir(n,Rr(arguments,1))},Ut.wrap=function(n,t){return t=null==t?mu:t,Hr(t,O,null,[n],[])
|
71
|
+
},Ut.xor=function(){for(var n=-1,t=arguments.length;++n<t;){var r=arguments[n];if(Po(r)||Xe(r))var e=e?ir(e,r).concat(ir(r,e)):r}return e?Ur(e):[]},Ut.zip=function(){for(var n=arguments.length,t=Au(n);n--;)t[n]=arguments[n];return Oe(t)},Ut.zipObject=Ie,Ut.backflow=$o,Ut.collect=Ne,Ut.compose=$o,Ut.each=Ue,Ut.eachRight=We,Ut.extend=Mo,Ut.iteratee=yu,Ut.methods=au,Ut.object=Ie,Ut.select=Se,Ut.tail=je,Ut.unique=Ee,bu(Ut,Ut),Ut.add=function(n,t){return n+t},Ut.attempt=vu,Ut.camelCase=Vo,Ut.capitalize=function(n){return(n=e(n))&&n.charAt(0).toUpperCase()+n.slice(1)
|
72
|
+
},Ut.clone=function(n,t,r,e){return t&&typeof t!="boolean"&&ce(n,t,r)?t=false:typeof t=="function"&&(e=r,r=t,t=false),r=typeof r=="function"&&$r(r,e,1),ur(n,t,r)},Ut.cloneDeep=function(n,t,r){return t=typeof t=="function"&&$r(t,r,1),ur(n,true,t)},Ut.deburr=lu,Ut.endsWith=function(n,t,r){n=e(n),t+="";var u=n.length;return r=(typeof r=="undefined"?u:lo(0>r?0:+r||0,u))-t.length,0<=r&&n.indexOf(t,r)==r},Ut.escape=function(n){return(n=e(n))&&st.test(n)?n.replace(ct,c):n},Ut.escapeRegExp=su,Ut.every=Ce,Ut.find=Te,Ut.findIndex=be,Ut.findKey=function(n,t,r){return t=ee(t,r,3),sr(n,t,vr,true)
|
73
|
+
},Ut.findLast=function(n,t,r){return t=ee(t,r,3),sr(n,t,fr)},Ut.findLastIndex=function(n,t,r){var e=n?n.length:0;for(t=ee(t,r,3);e--;)if(t(n[e],e,n))return e;return-1},Ut.findLastKey=function(n,t,r){return t=ee(t,r,3),sr(n,t,yr,true)},Ut.findWhere=function(n,t){return Te(n,Ar(t))},Ut.first=xe,Ut.has=function(n,t){return n?Bu.call(n,t):false},Ut.identity=mu,Ut.includes=Fe,Ut.indexOf=Ae,Ut.inRange=function(n,t,r){return t=+t||0,"undefined"===typeof r?(r=t,t=0):r=+r||0,n>=t&&n<r},Ut.isArguments=Xe,Ut.isArray=Po,Ut.isBoolean=function(n){return true===n||false===n||p(n)&&Du.call(n)==z||false
|
74
|
+
},Ut.isDate=function(n){return p(n)&&Du.call(n)==D||false},Ut.isElement=He,Ut.isEmpty=function(n){if(null==n)return true;var t=n.length;return le(t)&&(Po(n)||uu(n)||Xe(n)||p(n)&&zo(n.splice))?!t:!qo(n).length},Ut.isEqual=function(n,t,r,e){return r=typeof r=="function"&&$r(r,e,3),!r&&se(n)&&se(t)?n===t:(e=r?r(n,t):m,typeof e=="undefined"?wr(n,t,r):!!e)},Ut.isError=Qe,Ut.isFinite=Bo,Ut.isFunction=zo,Ut.isMatch=function(n,t,r,e){var u=qo(t),o=u.length;if(r=typeof r=="function"&&$r(r,e,3),!r&&1==o){var i=u[0];
|
75
|
+
if(e=t[i],se(e))return null!=n&&e===n[i]&&Bu.call(n,i)}for(var i=Au(o),a=Au(o);o--;)e=i[o]=t[u[o]],a[o]=se(e);return br(n,u,i,a,r)},Ut.isNaN=function(n){return ru(n)&&n!=+n},Ut.isNative=tu,Ut.isNull=function(n){return null===n},Ut.isNumber=ru,Ut.isObject=nu,Ut.isPlainObject=Do,Ut.isRegExp=eu,Ut.isString=uu,Ut.isTypedArray=ou,Ut.isUndefined=function(n){return typeof n=="undefined"},Ut.kebabCase=Yo,Ut.last=function(n){var t=n?n.length:0;return t?n[t-1]:m},Ut.lastIndexOf=function(n,t,r){var e=n?n.length:0;
|
76
|
+
if(!e)return-1;var u=e;if(typeof r=="number")u=(0>r?co(e+r,0):lo(r||0,e-1))+1;else if(r)return u=Nr(n,t,true)-1,n=n[u],(t===t?t===n:n!==n)?u:-1;if(t!==t)return s(n,u,true);for(;u--;)if(n[u]===t)return u;return-1},Ut.max=Jo,Ut.min=Xo,Ut.noConflict=function(){return h._=Mu,this},Ut.noop=xu,Ut.now=No,Ut.pad=function(n,t,r){n=e(n),t=+t;var u=n.length;return u<t&&ao(t)?(u=(t-u)/2,t=Gu(u),u=Yu(u),r=Jr("",u,r),r.slice(0,t)+n+r):n},Ut.padLeft=function(n,t,r){return(n=e(n))&&Jr(n,t,r)+n},Ut.padRight=function(n,t,r){return(n=e(n))&&n+Jr(n,t,r)
|
77
|
+
},Ut.parseInt=pu,Ut.random=function(n,t,r){r&&ce(n,t,r)&&(t=r=null);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=_o(),lo(n+r*(t-n+parseFloat("1e-"+((r+"").length-1))),t)):Ir(n,t)},Ut.reduce=Le,Ut.reduceRight=$e,Ut.repeat=hu,Ut.result=function(n,t,r){return t=null==n?m:n[t],typeof t=="undefined"&&(t=r),zo(t)?t.call(n):t},Ut.runInContext=d,Ut.size=function(n){var t=n?n.length:0;
|
78
|
+
return le(t)?t:qo(n).length},Ut.snakeCase=Zo,Ut.some=ze,Ut.sortedIndex=function(n,t,r,e){var u=ee(r);return u===er&&null==r?Nr(n,t):Lr(n,t,u(r,e,1))},Ut.sortedLastIndex=function(n,t,r,e){var u=ee(r);return u===er&&null==r?Nr(n,t,true):Lr(n,t,u(r,e,1),true)},Ut.startCase=Go,Ut.startsWith=function(n,t,r){return n=e(n),r=null==r?0:lo(0>r?0:+r||0,n.length),n.lastIndexOf(t,r)==r},Ut.sum=function(n){Po(n)||(n=ve(n));for(var t=n.length,r=0;t--;)r+=+n[t]||0;return r},Ut.template=function(n,t,r){var u=Ut.templateSettings;
|
79
|
+
r&&ce(n,t,r)&&(t=r=null),n=e(n),t=nr(nr({},r||t),u,Qt),r=nr(nr({},t.imports),u.imports,Qt);var o,i,a=qo(r),f=Wr(r,a),c=0;r=t.interpolate||bt;var s="__p+='";r=Cu((t.escape||bt).source+"|"+r.source+"|"+(r===_t?gt:bt).source+"|"+(t.evaluate||bt).source+"|$","g");var p="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";if(n.replace(r,function(t,r,e,u,a,f){return e||(e=u),s+=n.slice(c,f).replace(Et,l),r&&(o=true,s+="'+__e("+r+")+'"),a&&(i=true,s+="';"+a+";\n__p+='"),e&&(s+="'+((__t=("+e+"))==null?'':__t)+'"),c=f+t.length,t
|
80
|
+
}),s+="';",(t=t.variable)||(s="with(obj){"+s+"}"),s=(i?s.replace(ot,""):s).replace(it,"$1").replace(at,"$1;"),s="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(o?",__e=_.escape":"")+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+s+"return __p}",t=vu(function(){return Ou(a,p+"return "+s).apply(m,f)}),t.source=s,Qe(t))throw t;return t},Ut.trim=_u,Ut.trimLeft=function(n,t,r){var u=n;return(n=e(n))?n.slice((r?ce(u,t,r):null==t)?g(n):o(n,t+"")):n
|
81
|
+
},Ut.trimRight=function(n,t,r){var u=n;return(n=e(n))?(r?ce(u,t,r):null==t)?n.slice(0,v(n)+1):n.slice(0,i(n,t+"")+1):n},Ut.trunc=function(n,t,r){r&&ce(n,t,r)&&(t=null);var u=C;if(r=S,null!=t)if(nu(t)){var o="separator"in t?t.separator:o,u="length"in t?+t.length||0:u;r="omission"in t?e(t.omission):r}else u=+t||0;if(n=e(n),u>=n.length)return n;if(u-=r.length,1>u)return r;if(t=n.slice(0,u),null==o)return t+r;if(eu(o)){if(n.slice(u).search(o)){var i,a=n.slice(0,u);for(o.global||(o=Cu(o.source,(vt.exec(o)||"")+"g")),o.lastIndex=0;n=o.exec(a);)i=n.index;
|
82
|
+
t=t.slice(0,null==i?u:i)}}else n.indexOf(o,u)!=u&&(o=t.lastIndexOf(o),-1<o&&(t=t.slice(0,o)));return t+r},Ut.unescape=function(n){return(n=e(n))&<.test(n)?n.replace(ft,y):n},Ut.uniqueId=function(n){var t=++zu;return e(n)+t},Ut.words=gu,Ut.all=Ce,Ut.any=ze,Ut.contains=Fe,Ut.detect=Te,Ut.foldl=Le,Ut.foldr=$e,Ut.head=xe,Ut.include=Fe,Ut.inject=Le,bu(Ut,function(){var n={};return vr(Ut,function(t,r){Ut.prototype[r]||(n[r]=t)}),n}(),false),Ut.sample=Pe,Ut.prototype.sample=function(n){return this.__chain__||null!=n?this.thru(function(t){return Pe(t,n)
|
83
|
+
}):Pe(this.value())},Ut.VERSION=w,qt("bind bindKey curry curryRight partial partialRight".split(" "),function(n){Ut[n].placeholder=Ut}),qt(["dropWhile","filter","map","takeWhile"],function(n,t){var r=t!=F,e=t==W;Nt.prototype[n]=function(n,u){var o=this.__filtered__,i=o&&e?new Nt(this):this.clone(),a=i.__iteratees__||(i.__iteratees__=[]);return i.__filtered__=o||r,a.push({done:false,index:0,iteratee:ee(n,u,1),type:t}),i}}),qt(["drop","take"],function(n,t){var r="__"+n+"Count__",e=n+"While";Nt.prototype[n]=function(e){e=null==e?1:co(Gu(e)||0,0);
|
84
|
+
var u=this.clone();if(u.__filtered__){var o=u[r];u[r]=t?lo(o,e):o+e}else(u.__views__||(u.__views__=[])).push({size:e,type:n+(0>u.__dir__?"Right":"")});return u},Nt.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()},Nt.prototype[n+"RightWhile"]=function(n,t){return this.reverse()[e](n,t).reverse()}}),qt(["first","last"],function(n,t){var r="take"+(t?"Right":"");Nt.prototype[n]=function(){return this[r](1).value()[0]}}),qt(["initial","rest"],function(n,t){var r="drop"+(t?"":"Right");
|
85
|
+
Nt.prototype[n]=function(){return this[r](1)}}),qt(["pluck","where"],function(n,t){var r=t?"filter":"map",e=t?Ar:Or;Nt.prototype[n]=function(n){return this[r](e(n))}}),Nt.prototype.compact=function(){return this.filter(mu)},Nt.prototype.reject=function(n,t){return n=ee(n,t,1),this.filter(function(t){return!n(t)})},Nt.prototype.slice=function(n,t){n=null==n?0:+n||0;var r=0>n?this.takeRight(-n):this.drop(n);return typeof t!="undefined"&&(t=+t||0,r=0>t?r.dropRight(-t):r.take(t-n)),r},Nt.prototype.toArray=function(){return this.drop(0)
|
86
|
+
},vr(Nt.prototype,function(n,t){var r=Ut[t],e=/^(?:filter|map|reject)|While$/.test(t),u=/^(?:first|last)$/.test(t);Ut.prototype[t]=function(){function t(n){return n=[n],Xu.apply(n,o),r.apply(Ut,n)}var o=arguments,i=this.__chain__,a=this.__wrapped__,f=!!this.__actions__.length,c=a instanceof Nt,l=o[0],s=c||Po(a);return s&&e&&typeof l=="function"&&1!=l.length&&(c=s=false),c=c&&!f,u&&!i?c?n.call(a):r.call(Ut,this.value()):s?(a=n.apply(c?a:new Nt(this),o),u||!f&&!a.__actions__||(a.__actions__||(a.__actions__=[])).push({func:Re,args:[t],thisArg:Ut}),new Ft(a,i)):this.thru(t)
|
87
|
+
}}),qt("concat join pop push shift sort splice unshift".split(" "),function(n){var t=Uu[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:join|pop|shift)$/.test(n),u=Oo.spliceObjects||!/^(?:pop|shift|splice)$/.test(n)?t:function(){var n=t.apply(this,arguments);return 0===this.length&&delete this[0],n};Ut.prototype[n]=function(){var n=arguments;return e&&!this.__chain__?u.apply(this.value(),n):this[r](function(t){return u.apply(t,n)})}}),Nt.prototype.clone=function(){var n=this.__actions__,t=this.__iteratees__,r=this.__views__,e=new Nt(this.__wrapped__);
|
88
|
+
return e.__actions__=n?Bt(n):null,e.__dir__=this.__dir__,e.__dropCount__=this.__dropCount__,e.__filtered__=this.__filtered__,e.__iteratees__=t?Bt(t):null,e.__takeCount__=this.__takeCount__,e.__views__=r?Bt(r):null,e},Nt.prototype.reverse=function(){if(this.__filtered__){var n=new Nt(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},Nt.prototype.value=function(){var n=this.__wrapped__.value();if(!Po(n))return Fr(n,this.__actions__);var t,r=this.__dir__,e=0>r;t=n.length;
|
89
|
+
for(var u=this.__views__,o=0,i=-1,a=u?u.length:0;++i<a;){var f=u[i],c=f.size;switch(f.type){case"drop":o+=c;break;case"dropRight":t-=c;break;case"take":t=lo(t,o+c);break;case"takeRight":o=co(o,t-c)}}t={start:o,end:t},i=t.start,a=t.end,t=a-i;var u=this.__dropCount__,o=lo(t,this.__takeCount__),i=e?a:i-1,f=(a=this.__iteratees__)?a.length:0,c=0,l=[];n:for(;t--&&c<o;){for(var i=i+r,s=-1,p=n[i];++s<f;){var h=a[s],_=h.iteratee,g=h.type;if(g!=W?h=_(p):(h.done=h.done&&(e?i<h.index:i>h.index),h.index=i,h=h.done||(h.done=!_(p))),g==F)p=h;
|
90
|
+
else if(!h){if(g==N)break n;continue n}}u?u--:l[c++]=p}return l},Ut.prototype.chain=function(){return ke(this)},Ut.prototype.commit=function(){return new Ft(this.value(),this.__chain__)},Ut.prototype.plant=function(n){for(var t,r=this;r instanceof Wt;){var e=de(r);t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},Ut.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof Nt?(this.__actions__.length&&(n=new Nt(this)),new Ft(n.reverse(),this.__chain__)):this.thru(function(n){return n.reverse()
|
91
|
+
})},Ut.prototype.toString=function(){return this.value()+""},Ut.prototype.run=Ut.prototype.toJSON=Ut.prototype.valueOf=Ut.prototype.value=function(){return Fr(this.__wrapped__,this.__actions__)},Ut.prototype.collect=Ut.prototype.map,Ut.prototype.head=Ut.prototype.first,Ut.prototype.select=Ut.prototype.filter,Ut.prototype.tail=Ut.prototype.rest,Ut}var m,w="3.4.0",b=1,x=2,A=4,j=8,E=16,O=32,I=64,k=128,R=256,C=30,S="...",T=150,U=16,W=0,F=2,N=3,L="Expected a function",$="__lodash_placeholder__",P="[object Arguments]",B="[object Array]",z="[object Boolean]",D="[object Date]",M="[object Error]",q="[object Function]",K="[object Number]",V="[object Object]",Y="[object RegExp]",Z="[object String]",G="[object ArrayBuffer]",J="[object Float32Array]",X="[object Float64Array]",H="[object Int8Array]",Q="[object Int16Array]",nt="[object Int32Array]",tt="[object Uint8Array]",rt="[object Uint8ClampedArray]",et="[object Uint16Array]",ut="[object Uint32Array]",ot=/\b__p\+='';/g,it=/\b(__p\+=)''\+/g,at=/(__e\(.*?\)|\b__t\))\+'';/g,ft=/&(?:amp|lt|gt|quot|#39|#96);/g,ct=/[&<>"'`]/g,lt=RegExp(ft.source),st=RegExp(ct.source),pt=/<%-([\s\S]+?)%>/g,ht=/<%([\s\S]+?)%>/g,_t=/<%=([\s\S]+?)%>/g,gt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,vt=/\w*$/,yt=/^\s*function[ \n\r\t]+\w/,dt=/^0[xX]/,mt=/^\[object .+?Constructor\]$/,wt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,bt=/($^)/,xt=/[.*+?^${}()|[\]\/\\]/g,At=RegExp(xt.source),jt=/\bthis\b/,Et=/['\n\r\u2028\u2029\\]/g,Ot=RegExp("[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?=[A-Z\\xc0-\\xd6\\xd8-\\xde][a-z\\xdf-\\xf6\\xf8-\\xff]+)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+|[A-Z\\xc0-\\xd6\\xd8-\\xde]+|[0-9]+","g"),It=" \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",kt="Array ArrayBuffer Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Math Number Object RegExp Set String _ clearTimeout document isFinite parseInt setTimeout TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap window WinRTError".split(" "),Rt="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),Ct={};
|
92
|
+
Ct[J]=Ct[X]=Ct[H]=Ct[Q]=Ct[nt]=Ct[tt]=Ct[rt]=Ct[et]=Ct[ut]=true,Ct[P]=Ct[B]=Ct[G]=Ct[z]=Ct[D]=Ct[M]=Ct[q]=Ct["[object Map]"]=Ct[K]=Ct[V]=Ct[Y]=Ct["[object Set]"]=Ct[Z]=Ct["[object WeakMap]"]=false;var St={};St[P]=St[B]=St[G]=St[z]=St[D]=St[J]=St[X]=St[H]=St[Q]=St[nt]=St[K]=St[V]=St[Y]=St[Z]=St[tt]=St[rt]=St[et]=St[ut]=true,St[M]=St[q]=St["[object Map]"]=St["[object Set]"]=St["[object WeakMap]"]=false;var Tt={leading:false,maxWait:0,trailing:false},Ut={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"},Wt={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Ft={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Nt={"function":true,object:true},Lt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$t=Nt[typeof exports]&&exports&&!exports.nodeType&&exports,Pt=Nt[typeof module]&&module&&!module.nodeType&&module,Nt=Nt[typeof window]&&window,Bt=Pt&&Pt.exports===$t&&$t,zt=$t&&Pt&&typeof global=="object"&&global||Nt!==(this&&this.window)&&Nt||this,Dt=function(){try{Object({toString:0}+"")
|
93
|
+
}catch(n){return function(){return false}}return function(n){return typeof n.toString!="function"&&typeof(n+"")=="string"}}(),Mt=d();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(zt._=Mt, define(function(){return Mt})):$t&&Pt?Bt?(Pt.exports=Mt)._=Mt:$t._=Mt:zt._=Mt}).call(this);
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* @license
|
3
|
-
* lodash 3.
|
3
|
+
* lodash 3.4.0 (Custom Build) <https://lodash.com/>
|
4
4
|
* Build: `lodash modern -o ./lodash.js`
|
5
5
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
6
6
|
* Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE>
|
@@ -13,7 +13,7 @@
|
|
13
13
|
var undefined;
|
14
14
|
|
15
15
|
/** Used as the semantic version number. */
|
16
|
-
var VERSION = '3.
|
16
|
+
var VERSION = '3.4.0';
|
17
17
|
|
18
18
|
/** Used to compose bitmasks for wrapper metadata. */
|
19
19
|
var BIND_FLAG = 1,
|
@@ -35,9 +35,9 @@
|
|
35
35
|
HOT_SPAN = 16;
|
36
36
|
|
37
37
|
/** Used to indicate the type of lazy iteratees. */
|
38
|
-
var
|
39
|
-
LAZY_MAP_FLAG =
|
40
|
-
|
38
|
+
var LAZY_DROP_WHILE_FLAG = 0,
|
39
|
+
LAZY_MAP_FLAG = 2,
|
40
|
+
LAZY_TAKE_WHILE_FLAG = 3;
|
41
41
|
|
42
42
|
/** Used as the `TypeError` message for "Functions" methods. */
|
43
43
|
var FUNC_ERROR_TEXT = 'Expected a function';
|
@@ -131,7 +131,7 @@
|
|
131
131
|
var upper = '[A-Z\\xc0-\\xd6\\xd8-\\xde]',
|
132
132
|
lower = '[a-z\\xdf-\\xf6\\xf8-\\xff]+';
|
133
133
|
|
134
|
-
return RegExp(upper + '
|
134
|
+
return RegExp(upper + '+(?=' + upper + lower + ')|' + upper + '?' + lower + '|' + upper + '+|[0-9]+', 'g');
|
135
135
|
}());
|
136
136
|
|
137
137
|
/** Used to detect and test for whitespace. */
|
@@ -253,29 +253,29 @@
|
|
253
253
|
'\u2029': 'u2029'
|
254
254
|
};
|
255
255
|
|
256
|
-
/**
|
257
|
-
* Used as a reference to the global object.
|
258
|
-
*
|
259
|
-
* The `this` value is used if it is the global object to avoid Greasemonkey's
|
260
|
-
* restricted `window` object, otherwise the `window` object is used.
|
261
|
-
*/
|
262
|
-
var root = (objectTypes[typeof window] && window !== (this && this.window)) ? window : this;
|
263
|
-
|
264
256
|
/** Detect free variable `exports`. */
|
265
257
|
var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports;
|
266
258
|
|
267
259
|
/** Detect free variable `module`. */
|
268
260
|
var freeModule = objectTypes[typeof module] && module && !module.nodeType && module;
|
269
261
|
|
270
|
-
/** Detect free variable `global` from Node.js
|
262
|
+
/** Detect free variable `global` from Node.js. */
|
271
263
|
var freeGlobal = freeExports && freeModule && typeof global == 'object' && global;
|
272
|
-
|
273
|
-
|
274
|
-
|
264
|
+
|
265
|
+
/** Detect free variable `window`. */
|
266
|
+
var freeWindow = objectTypes[typeof window] && window;
|
275
267
|
|
276
268
|
/** Detect the popular CommonJS extension `module.exports`. */
|
277
269
|
var moduleExports = freeModule && freeModule.exports === freeExports && freeExports;
|
278
270
|
|
271
|
+
/**
|
272
|
+
* Used as a reference to the global object.
|
273
|
+
*
|
274
|
+
* The `this` value is used if it is the global object to avoid Greasemonkey's
|
275
|
+
* restricted `window` object, otherwise the `window` object is used.
|
276
|
+
*/
|
277
|
+
var root = freeGlobal || ((freeWindow !== (this && this.window)) && freeWindow) || this;
|
278
|
+
|
279
279
|
/*--------------------------------------------------------------------------*/
|
280
280
|
|
281
281
|
/**
|
@@ -308,14 +308,14 @@
|
|
308
308
|
* @private
|
309
309
|
* @param {Array} array The array to search.
|
310
310
|
* @param {*} value The value to search for.
|
311
|
-
* @param {number}
|
311
|
+
* @param {number} fromIndex The index to search from.
|
312
312
|
* @returns {number} Returns the index of the matched value, else `-1`.
|
313
313
|
*/
|
314
314
|
function baseIndexOf(array, value, fromIndex) {
|
315
315
|
if (value !== value) {
|
316
316
|
return indexOfNaN(array, fromIndex);
|
317
317
|
}
|
318
|
-
var index =
|
318
|
+
var index = fromIndex - 1,
|
319
319
|
length = array.length;
|
320
320
|
|
321
321
|
while (++index < length) {
|
@@ -340,26 +340,6 @@
|
|
340
340
|
return typeof value == 'function' || false;
|
341
341
|
}
|
342
342
|
|
343
|
-
/**
|
344
|
-
* The base implementation of `_.sortBy` and `_.sortByAll` which uses `comparer`
|
345
|
-
* to define the sort order of `array` and replaces criteria objects with their
|
346
|
-
* corresponding values.
|
347
|
-
*
|
348
|
-
* @private
|
349
|
-
* @param {Array} array The array to sort.
|
350
|
-
* @param {Function} comparer The function to define sort order.
|
351
|
-
* @returns {Array} Returns `array`.
|
352
|
-
*/
|
353
|
-
function baseSortBy(array, comparer) {
|
354
|
-
var length = array.length;
|
355
|
-
|
356
|
-
array.sort(comparer);
|
357
|
-
while (length--) {
|
358
|
-
array[length] = array[length].value;
|
359
|
-
}
|
360
|
-
return array;
|
361
|
-
}
|
362
|
-
|
363
343
|
/**
|
364
344
|
* Converts `value` to a string if it is not one. An empty string is returned
|
365
345
|
* for `null` or `undefined` values.
|
@@ -433,24 +413,34 @@
|
|
433
413
|
}
|
434
414
|
|
435
415
|
/**
|
436
|
-
* Used by `_.
|
437
|
-
* in a collection and stable sort them in
|
416
|
+
* Used by `_.sortByOrder` to compare multiple properties of each element
|
417
|
+
* in a collection and stable sort them in the following order:
|
418
|
+
*
|
419
|
+
* If orders is unspecified, sort in ascending order for all properties.
|
420
|
+
* Otherwise, for each property, sort in ascending order if its corresponding value in
|
421
|
+
* orders is true, and descending order if false.
|
438
422
|
*
|
439
423
|
* @private
|
440
424
|
* @param {Object} object The object to compare to `other`.
|
441
425
|
* @param {Object} other The object to compare to `object`.
|
426
|
+
* @param {boolean[]} orders The order to sort by for each property.
|
442
427
|
* @returns {number} Returns the sort order indicator for `object`.
|
443
428
|
*/
|
444
|
-
function
|
429
|
+
function compareMultiple(object, other, orders) {
|
445
430
|
var index = -1,
|
446
431
|
objCriteria = object.criteria,
|
447
432
|
othCriteria = other.criteria,
|
448
|
-
length = objCriteria.length
|
433
|
+
length = objCriteria.length,
|
434
|
+
ordersLength = orders.length;
|
449
435
|
|
450
436
|
while (++index < length) {
|
451
437
|
var result = baseCompareAscending(objCriteria[index], othCriteria[index]);
|
452
438
|
if (result) {
|
453
|
-
|
439
|
+
if (index >= ordersLength) {
|
440
|
+
return result;
|
441
|
+
} else {
|
442
|
+
return orders[index] ? result : result * -1;
|
443
|
+
}
|
454
444
|
}
|
455
445
|
}
|
456
446
|
// Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
|
@@ -503,13 +493,13 @@
|
|
503
493
|
*
|
504
494
|
* @private
|
505
495
|
* @param {Array} array The array to search.
|
506
|
-
* @param {number}
|
496
|
+
* @param {number} fromIndex The index to search from.
|
507
497
|
* @param {boolean} [fromRight] Specify iterating from right to left.
|
508
498
|
* @returns {number} Returns the index of the matched `NaN`, else `-1`.
|
509
499
|
*/
|
510
500
|
function indexOfNaN(array, fromIndex, fromRight) {
|
511
501
|
var length = array.length,
|
512
|
-
index =
|
502
|
+
index = fromIndex + (fromRight ? 0 : -1);
|
513
503
|
|
514
504
|
while ((fromRight ? index-- : ++index < length)) {
|
515
505
|
var other = array[index];
|
@@ -830,26 +820,26 @@
|
|
830
820
|
* `mixin`, `negate`, `noop`, `omit`, `once`, `pairs`, `partial`, `partialRight`,
|
831
821
|
* `partition`, `pick`, `plant`, `pluck`, `property`, `propertyOf`, `pull`,
|
832
822
|
* `pullAt`, `push`, `range`, `rearg`, `reject`, `remove`, `rest`, `reverse`,
|
833
|
-
* `shuffle`, `slice`, `sort`, `sortBy`, `sortByAll`, `
|
834
|
-
* `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `tap`,
|
835
|
-
* `thru`, `times`, `toArray`, `toPlainObject`, `transform`,
|
836
|
-
* `
|
837
|
-
* `zip`, and `zipObject`
|
823
|
+
* `shuffle`, `slice`, `sort`, `sortBy`, `sortByAll`, `sortByOrder`, `splice`,
|
824
|
+
* `spread`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `tap`,
|
825
|
+
* `throttle`, `thru`, `times`, `toArray`, `toPlainObject`, `transform`,
|
826
|
+
* `union`, `uniq`, `unshift`, `unzip`, `values`, `valuesIn`, `where`,
|
827
|
+
* `without`, `wrap`, `xor`, `zip`, and `zipObject`
|
838
828
|
*
|
839
829
|
* The wrapper methods that are **not** chainable by default are:
|
840
|
-
* `attempt`, `camelCase`, `capitalize`, `clone`, `cloneDeep`, `deburr`,
|
830
|
+
* `add`, `attempt`, `camelCase`, `capitalize`, `clone`, `cloneDeep`, `deburr`,
|
841
831
|
* `endsWith`, `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`,
|
842
832
|
* `findLast`, `findLastIndex`, `findLastKey`, `findWhere`, `first`, `has`,
|
843
|
-
* `identity`, `includes`, `indexOf`, `
|
844
|
-
* `isDate`, `isElement`, `isEmpty`, `isEqual`, `isError`,
|
845
|
-
* `isFunction`, `isMatch`, `isNative`, `isNaN`, `isNull`, `isNumber`,
|
833
|
+
* `identity`, `includes`, `indexOf`, `inRange`, `isArguments`, `isArray`,
|
834
|
+
* `isBoolean`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isError`,
|
835
|
+
* `isFinite`,`isFunction`, `isMatch`, `isNative`, `isNaN`, `isNull`, `isNumber`,
|
846
836
|
* `isObject`, `isPlainObject`, `isRegExp`, `isString`, `isUndefined`,
|
847
837
|
* `isTypedArray`, `join`, `kebabCase`, `last`, `lastIndexOf`, `max`, `min`,
|
848
838
|
* `noConflict`, `now`, `pad`, `padLeft`, `padRight`, `parseInt`, `pop`,
|
849
839
|
* `random`, `reduce`, `reduceRight`, `repeat`, `result`, `runInContext`,
|
850
840
|
* `shift`, `size`, `snakeCase`, `some`, `sortedIndex`, `sortedLastIndex`,
|
851
|
-
* `startCase`, `startsWith`, `template`, `trim`, `trimLeft`,
|
852
|
-
* `trunc`, `unescape`, `uniqueId`, `value`, and `words`
|
841
|
+
* `startCase`, `startsWith`, `sum`, `template`, `trim`, `trimLeft`,
|
842
|
+
* `trimRight`, `trunc`, `unescape`, `uniqueId`, `value`, and `words`
|
853
843
|
*
|
854
844
|
* The wrapper method `sample` will return a wrapped value when `n` is provided,
|
855
845
|
* otherwise an unwrapped value is returned.
|
@@ -1136,16 +1126,22 @@
|
|
1136
1126
|
while (++iterIndex < iterLength) {
|
1137
1127
|
var data = iteratees[iterIndex],
|
1138
1128
|
iteratee = data.iteratee,
|
1139
|
-
computed = iteratee(value, index, array),
|
1140
1129
|
type = data.type;
|
1141
1130
|
|
1131
|
+
if (type != LAZY_DROP_WHILE_FLAG) {
|
1132
|
+
var computed = iteratee(value);
|
1133
|
+
} else {
|
1134
|
+
data.done = data.done && (isRight ? index < data.index : index > data.index);
|
1135
|
+
data.index = index;
|
1136
|
+
computed = data.done || (data.done = !iteratee(value));
|
1137
|
+
}
|
1142
1138
|
if (type == LAZY_MAP_FLAG) {
|
1143
1139
|
value = computed;
|
1144
1140
|
} else if (!computed) {
|
1145
|
-
if (type ==
|
1146
|
-
continue outer;
|
1147
|
-
} else {
|
1141
|
+
if (type == LAZY_TAKE_WHILE_FLAG) {
|
1148
1142
|
break outer;
|
1143
|
+
} else {
|
1144
|
+
continue outer;
|
1149
1145
|
}
|
1150
1146
|
}
|
1151
1147
|
}
|
@@ -1825,7 +1821,7 @@
|
|
1825
1821
|
}
|
1826
1822
|
result.push(value);
|
1827
1823
|
}
|
1828
|
-
else if (indexOf(values, value) < 0) {
|
1824
|
+
else if (indexOf(values, value, 0) < 0) {
|
1829
1825
|
result.push(value);
|
1830
1826
|
}
|
1831
1827
|
}
|
@@ -1978,13 +1974,13 @@
|
|
1978
1974
|
*
|
1979
1975
|
* @private
|
1980
1976
|
* @param {Array} array The array to flatten.
|
1981
|
-
* @param {boolean}
|
1982
|
-
* @param {boolean}
|
1983
|
-
* @param {number}
|
1977
|
+
* @param {boolean} isDeep Specify a deep flatten.
|
1978
|
+
* @param {boolean} isStrict Restrict flattening to arrays and `arguments` objects.
|
1979
|
+
* @param {number} fromIndex The index to start from.
|
1984
1980
|
* @returns {Array} Returns the new flattened array.
|
1985
1981
|
*/
|
1986
1982
|
function baseFlatten(array, isDeep, isStrict, fromIndex) {
|
1987
|
-
var index =
|
1983
|
+
var index = fromIndex - 1,
|
1988
1984
|
length = array.length,
|
1989
1985
|
resIndex = -1,
|
1990
1986
|
result = [];
|
@@ -1995,7 +1991,7 @@
|
|
1995
1991
|
if (isObjectLike(value) && isLength(value.length) && (isArray(value) || isArguments(value))) {
|
1996
1992
|
if (isDeep) {
|
1997
1993
|
// Recursively flatten arrays (susceptible to call stack limits).
|
1998
|
-
value = baseFlatten(value, isDeep, isStrict);
|
1994
|
+
value = baseFlatten(value, isDeep, isStrict, 0);
|
1999
1995
|
}
|
2000
1996
|
var valIndex = -1,
|
2001
1997
|
valLength = value.length;
|
@@ -2609,6 +2605,55 @@
|
|
2609
2605
|
return !!result;
|
2610
2606
|
}
|
2611
2607
|
|
2608
|
+
/**
|
2609
|
+
* The base implementation of `_.sortBy` which uses `comparer` to define
|
2610
|
+
* the sort order of `array` and replaces criteria objects with their
|
2611
|
+
* corresponding values.
|
2612
|
+
*
|
2613
|
+
* @private
|
2614
|
+
* @param {Array} array The array to sort.
|
2615
|
+
* @param {Function} comparer The function to define sort order.
|
2616
|
+
* @returns {Array} Returns `array`.
|
2617
|
+
*/
|
2618
|
+
function baseSortBy(array, comparer) {
|
2619
|
+
var length = array.length;
|
2620
|
+
|
2621
|
+
array.sort(comparer);
|
2622
|
+
while (length--) {
|
2623
|
+
array[length] = array[length].value;
|
2624
|
+
}
|
2625
|
+
return array;
|
2626
|
+
}
|
2627
|
+
|
2628
|
+
/**
|
2629
|
+
* The base implementation of `_.sortByOrder` without param guards.
|
2630
|
+
*
|
2631
|
+
* @private
|
2632
|
+
* @param {Array|Object|string} collection The collection to iterate over.
|
2633
|
+
* @param {string[]} props The property names to sort by.
|
2634
|
+
* @param {boolean[]} orders The sort orders of `props`.
|
2635
|
+
* @returns {Array} Returns the new sorted array.
|
2636
|
+
*/
|
2637
|
+
function baseSortByOrder(collection, props, orders) {
|
2638
|
+
var index = -1,
|
2639
|
+
length = collection.length,
|
2640
|
+
result = isLength(length) ? Array(length) : [];
|
2641
|
+
|
2642
|
+
baseEach(collection, function(value) {
|
2643
|
+
var length = props.length,
|
2644
|
+
criteria = Array(length);
|
2645
|
+
|
2646
|
+
while (length--) {
|
2647
|
+
criteria[length] = value == null ? undefined : value[props[length]];
|
2648
|
+
}
|
2649
|
+
result[++index] = { 'criteria': criteria, 'index': index, 'value': value };
|
2650
|
+
});
|
2651
|
+
|
2652
|
+
return baseSortBy(result, function(object, other) {
|
2653
|
+
return compareMultiple(object, other, orders);
|
2654
|
+
});
|
2655
|
+
}
|
2656
|
+
|
2612
2657
|
/**
|
2613
2658
|
* The base implementation of `_.uniq` without support for callback shorthands
|
2614
2659
|
* and `this` binding.
|
@@ -2651,7 +2696,7 @@
|
|
2651
2696
|
}
|
2652
2697
|
result.push(value);
|
2653
2698
|
}
|
2654
|
-
else if (indexOf(seen, computed) < 0) {
|
2699
|
+
else if (indexOf(seen, computed, 0) < 0) {
|
2655
2700
|
if (iteratee || isLarge) {
|
2656
2701
|
seen.push(computed);
|
2657
2702
|
}
|
@@ -2955,24 +3000,31 @@
|
|
2955
3000
|
*/
|
2956
3001
|
function createAssigner(assigner) {
|
2957
3002
|
return function() {
|
2958
|
-
var
|
2959
|
-
|
3003
|
+
var args = arguments,
|
3004
|
+
length = args.length,
|
3005
|
+
object = args[0];
|
2960
3006
|
|
2961
3007
|
if (length < 2 || object == null) {
|
2962
3008
|
return object;
|
2963
3009
|
}
|
2964
|
-
|
2965
|
-
|
3010
|
+
var customizer = args[length - 2],
|
3011
|
+
thisArg = args[length - 1],
|
3012
|
+
guard = args[3];
|
3013
|
+
|
3014
|
+
if (length > 3 && typeof customizer == 'function') {
|
3015
|
+
customizer = bindCallback(customizer, thisArg, 5);
|
3016
|
+
length -= 2;
|
3017
|
+
} else {
|
3018
|
+
customizer = (length > 2 && typeof thisArg == 'function') ? thisArg : null;
|
3019
|
+
length -= (customizer ? 1 : 0);
|
2966
3020
|
}
|
2967
|
-
|
2968
|
-
|
2969
|
-
|
2970
|
-
} else if (length > 2 && typeof arguments[length - 1] == 'function') {
|
2971
|
-
customizer = arguments[--length];
|
3021
|
+
if (guard && isIterateeCall(args[1], args[2], guard)) {
|
3022
|
+
customizer = length == 3 ? null : customizer;
|
3023
|
+
length = 2;
|
2972
3024
|
}
|
2973
3025
|
var index = 0;
|
2974
3026
|
while (++index < length) {
|
2975
|
-
var source =
|
3027
|
+
var source = args[index];
|
2976
3028
|
if (source) {
|
2977
3029
|
assigner(object, source, customizer);
|
2978
3030
|
}
|
@@ -3010,6 +3062,41 @@
|
|
3010
3062
|
return new SetCache(values);
|
3011
3063
|
};
|
3012
3064
|
|
3065
|
+
/**
|
3066
|
+
* Creates a function to compose other functions into a single function.
|
3067
|
+
*
|
3068
|
+
* @private
|
3069
|
+
* @param {boolean} [fromRight] Specify iterating from right to left.
|
3070
|
+
* @returns {Function} Returns the new composer function.
|
3071
|
+
*/
|
3072
|
+
function createComposer(fromRight) {
|
3073
|
+
return function() {
|
3074
|
+
var length = arguments.length,
|
3075
|
+
index = length,
|
3076
|
+
fromIndex = fromRight ? length - 1 : 0;
|
3077
|
+
|
3078
|
+
if (!length) {
|
3079
|
+
return function() { return arguments[0]; };
|
3080
|
+
}
|
3081
|
+
var funcs = Array(length);
|
3082
|
+
while (index--) {
|
3083
|
+
funcs[index] = arguments[index];
|
3084
|
+
if (typeof funcs[index] != 'function') {
|
3085
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
3086
|
+
}
|
3087
|
+
}
|
3088
|
+
return function() {
|
3089
|
+
var index = fromIndex,
|
3090
|
+
result = funcs[index].apply(this, arguments);
|
3091
|
+
|
3092
|
+
while ((fromRight ? index-- : ++index < length)) {
|
3093
|
+
result = funcs[index].call(this, result);
|
3094
|
+
}
|
3095
|
+
return result;
|
3096
|
+
};
|
3097
|
+
};
|
3098
|
+
}
|
3099
|
+
|
3013
3100
|
/**
|
3014
3101
|
* Creates a function that produces compound words out of the words in a
|
3015
3102
|
* given string.
|
@@ -4079,16 +4166,17 @@
|
|
4079
4166
|
* // => [1, 3]
|
4080
4167
|
*/
|
4081
4168
|
function difference() {
|
4082
|
-
var
|
4083
|
-
|
4169
|
+
var args = arguments,
|
4170
|
+
index = -1,
|
4171
|
+
length = args.length;
|
4084
4172
|
|
4085
4173
|
while (++index < length) {
|
4086
|
-
var value =
|
4174
|
+
var value = args[index];
|
4087
4175
|
if (isArray(value) || isArguments(value)) {
|
4088
4176
|
break;
|
4089
4177
|
}
|
4090
4178
|
}
|
4091
|
-
return baseDifference(value, baseFlatten(
|
4179
|
+
return baseDifference(value, baseFlatten(args, false, true, ++index));
|
4092
4180
|
}
|
4093
4181
|
|
4094
4182
|
/**
|
@@ -4200,7 +4288,7 @@
|
|
4200
4288
|
* ];
|
4201
4289
|
*
|
4202
4290
|
* // using the `_.matches` callback shorthand
|
4203
|
-
* _.pluck(_.dropRightWhile(users, { 'user': pebbles, 'active': false }), 'user');
|
4291
|
+
* _.pluck(_.dropRightWhile(users, { 'user': 'pebbles', 'active': false }), 'user');
|
4204
4292
|
* // => ['barney', 'fred']
|
4205
4293
|
*
|
4206
4294
|
* // using the `_.matchesProperty` callback shorthand
|
@@ -4411,7 +4499,7 @@
|
|
4411
4499
|
*
|
4412
4500
|
* // using the `_.matchesProperty` callback shorthand
|
4413
4501
|
* _.findLastIndex(users, 'active', false);
|
4414
|
-
* // =>
|
4502
|
+
* // => 2
|
4415
4503
|
*
|
4416
4504
|
* // using the `_.property` callback shorthand
|
4417
4505
|
* _.findLastIndex(users, 'active');
|
@@ -4474,7 +4562,7 @@
|
|
4474
4562
|
if (guard && isIterateeCall(array, isDeep, guard)) {
|
4475
4563
|
isDeep = false;
|
4476
4564
|
}
|
4477
|
-
return length ? baseFlatten(array, isDeep) : [];
|
4565
|
+
return length ? baseFlatten(array, isDeep, false, 0) : [];
|
4478
4566
|
}
|
4479
4567
|
|
4480
4568
|
/**
|
@@ -4492,7 +4580,7 @@
|
|
4492
4580
|
*/
|
4493
4581
|
function flattenDeep(array) {
|
4494
4582
|
var length = array ? array.length : 0;
|
4495
|
-
return length ? baseFlatten(array, true) : [];
|
4583
|
+
return length ? baseFlatten(array, true, false, 0) : [];
|
4496
4584
|
}
|
4497
4585
|
|
4498
4586
|
/**
|
@@ -4533,14 +4621,14 @@
|
|
4533
4621
|
return -1;
|
4534
4622
|
}
|
4535
4623
|
if (typeof fromIndex == 'number') {
|
4536
|
-
fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) :
|
4624
|
+
fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex;
|
4537
4625
|
} else if (fromIndex) {
|
4538
4626
|
var index = binaryIndex(array, value),
|
4539
4627
|
other = array[index];
|
4540
4628
|
|
4541
4629
|
return (value === value ? value === other : other !== other) ? index : -1;
|
4542
4630
|
}
|
4543
|
-
return baseIndexOf(array, value, fromIndex);
|
4631
|
+
return baseIndexOf(array, value, fromIndex || 0);
|
4544
4632
|
}
|
4545
4633
|
|
4546
4634
|
/**
|
@@ -4603,11 +4691,11 @@
|
|
4603
4691
|
outer:
|
4604
4692
|
while (++index < length) {
|
4605
4693
|
value = array[index];
|
4606
|
-
if ((seen ? cacheIndexOf(seen, value) : indexOf(result, value)) < 0) {
|
4694
|
+
if ((seen ? cacheIndexOf(seen, value) : indexOf(result, value, 0)) < 0) {
|
4607
4695
|
argsIndex = argsLength;
|
4608
4696
|
while (--argsIndex) {
|
4609
4697
|
var cache = caches[argsIndex];
|
4610
|
-
if ((cache ? cacheIndexOf(cache, value) : indexOf(args[argsIndex], value)) < 0) {
|
4698
|
+
if ((cache ? cacheIndexOf(cache, value) : indexOf(args[argsIndex], value, 0)) < 0) {
|
4611
4699
|
continue outer;
|
4612
4700
|
}
|
4613
4701
|
}
|
@@ -4712,17 +4800,19 @@
|
|
4712
4800
|
* // => [1, 1]
|
4713
4801
|
*/
|
4714
4802
|
function pull() {
|
4715
|
-
var
|
4803
|
+
var args = arguments,
|
4804
|
+
array = args[0];
|
4805
|
+
|
4716
4806
|
if (!(array && array.length)) {
|
4717
4807
|
return array;
|
4718
4808
|
}
|
4719
4809
|
var index = 0,
|
4720
4810
|
indexOf = getIndexOf(),
|
4721
|
-
length =
|
4811
|
+
length = args.length;
|
4722
4812
|
|
4723
4813
|
while (++index < length) {
|
4724
4814
|
var fromIndex = 0,
|
4725
|
-
value =
|
4815
|
+
value = args[index];
|
4726
4816
|
|
4727
4817
|
while ((fromIndex = indexOf(array, value, fromIndex)) > -1) {
|
4728
4818
|
splice.call(array, fromIndex, 1);
|
@@ -5152,7 +5242,7 @@
|
|
5152
5242
|
* // => [1, 2, 4]
|
5153
5243
|
*/
|
5154
5244
|
function union() {
|
5155
|
-
return baseUniq(baseFlatten(arguments, false, true));
|
5245
|
+
return baseUniq(baseFlatten(arguments, false, true, 0));
|
5156
5246
|
}
|
5157
5247
|
|
5158
5248
|
/**
|
@@ -6223,104 +6313,6 @@
|
|
6223
6313
|
return func(collection, iteratee);
|
6224
6314
|
}
|
6225
6315
|
|
6226
|
-
/**
|
6227
|
-
* Gets the maximum value of `collection`. If `collection` is empty or falsey
|
6228
|
-
* `-Infinity` is returned. If an iteratee function is provided it is invoked
|
6229
|
-
* for each value in `collection` to generate the criterion by which the value
|
6230
|
-
* is ranked. The `iteratee` is bound to `thisArg` and invoked with three
|
6231
|
-
* arguments; (value, index, collection).
|
6232
|
-
*
|
6233
|
-
* If a property name is provided for `predicate` the created `_.property`
|
6234
|
-
* style callback returns the property value of the given element.
|
6235
|
-
*
|
6236
|
-
* If a value is also provided for `thisArg` the created `_.matchesProperty`
|
6237
|
-
* style callback returns `true` for elements that have a matching property
|
6238
|
-
* value, else `false`.
|
6239
|
-
*
|
6240
|
-
* If an object is provided for `predicate` the created `_.matches` style
|
6241
|
-
* callback returns `true` for elements that have the properties of the given
|
6242
|
-
* object, else `false`.
|
6243
|
-
*
|
6244
|
-
* @static
|
6245
|
-
* @memberOf _
|
6246
|
-
* @category Collection
|
6247
|
-
* @param {Array|Object|string} collection The collection to iterate over.
|
6248
|
-
* @param {Function|Object|string} [iteratee] The function invoked per iteration.
|
6249
|
-
* @param {*} [thisArg] The `this` binding of `iteratee`.
|
6250
|
-
* @returns {*} Returns the maximum value.
|
6251
|
-
* @example
|
6252
|
-
*
|
6253
|
-
* _.max([4, 2, 8, 6]);
|
6254
|
-
* // => 8
|
6255
|
-
*
|
6256
|
-
* _.max([]);
|
6257
|
-
* // => -Infinity
|
6258
|
-
*
|
6259
|
-
* var users = [
|
6260
|
-
* { 'user': 'barney', 'age': 36 },
|
6261
|
-
* { 'user': 'fred', 'age': 40 }
|
6262
|
-
* ];
|
6263
|
-
*
|
6264
|
-
* _.max(users, function(chr) {
|
6265
|
-
* return chr.age;
|
6266
|
-
* });
|
6267
|
-
* // => { 'user': 'fred', 'age': 40 };
|
6268
|
-
*
|
6269
|
-
* // using the `_.property` callback shorthand
|
6270
|
-
* _.max(users, 'age');
|
6271
|
-
* // => { 'user': 'fred', 'age': 40 };
|
6272
|
-
*/
|
6273
|
-
var max = createExtremum(arrayMax);
|
6274
|
-
|
6275
|
-
/**
|
6276
|
-
* Gets the minimum value of `collection`. If `collection` is empty or falsey
|
6277
|
-
* `Infinity` is returned. If an iteratee function is provided it is invoked
|
6278
|
-
* for each value in `collection` to generate the criterion by which the value
|
6279
|
-
* is ranked. The `iteratee` is bound to `thisArg` and invoked with three
|
6280
|
-
* arguments; (value, index, collection).
|
6281
|
-
*
|
6282
|
-
* If a property name is provided for `predicate` the created `_.property`
|
6283
|
-
* style callback returns the property value of the given element.
|
6284
|
-
*
|
6285
|
-
* If a value is also provided for `thisArg` the created `_.matchesProperty`
|
6286
|
-
* style callback returns `true` for elements that have a matching property
|
6287
|
-
* value, else `false`.
|
6288
|
-
*
|
6289
|
-
* If an object is provided for `predicate` the created `_.matches` style
|
6290
|
-
* callback returns `true` for elements that have the properties of the given
|
6291
|
-
* object, else `false`.
|
6292
|
-
*
|
6293
|
-
* @static
|
6294
|
-
* @memberOf _
|
6295
|
-
* @category Collection
|
6296
|
-
* @param {Array|Object|string} collection The collection to iterate over.
|
6297
|
-
* @param {Function|Object|string} [iteratee] The function invoked per iteration.
|
6298
|
-
* @param {*} [thisArg] The `this` binding of `iteratee`.
|
6299
|
-
* @returns {*} Returns the minimum value.
|
6300
|
-
* @example
|
6301
|
-
*
|
6302
|
-
* _.min([4, 2, 8, 6]);
|
6303
|
-
* // => 2
|
6304
|
-
*
|
6305
|
-
* _.min([]);
|
6306
|
-
* // => Infinity
|
6307
|
-
*
|
6308
|
-
* var users = [
|
6309
|
-
* { 'user': 'barney', 'age': 36 },
|
6310
|
-
* { 'user': 'fred', 'age': 40 }
|
6311
|
-
* ];
|
6312
|
-
*
|
6313
|
-
* _.min(users, function(chr) {
|
6314
|
-
* return chr.age;
|
6315
|
-
* });
|
6316
|
-
* // => { 'user': 'barney', 'age': 36 };
|
6317
|
-
*
|
6318
|
-
* // using the `_.property` callback shorthand
|
6319
|
-
* _.min(users, 'age');
|
6320
|
-
* // => { 'user': 'barney', 'age': 36 };
|
6321
|
-
*/
|
6322
|
-
var min = createExtremum(arrayMin, true);
|
6323
|
-
|
6324
6316
|
/**
|
6325
6317
|
* Creates an array of elements split into two groups, the first of which
|
6326
6318
|
* contains elements `predicate` returns truthy for, while the second of which
|
@@ -6356,7 +6348,7 @@
|
|
6356
6348
|
* _.partition([1.2, 2.3, 3.4], function(n) {
|
6357
6349
|
* return this.floor(n) % 2;
|
6358
6350
|
* }, Math);
|
6359
|
-
* // => [[1, 3], [2]]
|
6351
|
+
* // => [[1.2, 3.4], [2.3]]
|
6360
6352
|
*
|
6361
6353
|
* var users = [
|
6362
6354
|
* { 'user': 'barney', 'age': 36, 'active': false },
|
@@ -6596,8 +6588,8 @@
|
|
6596
6588
|
}
|
6597
6589
|
|
6598
6590
|
/**
|
6599
|
-
* Gets the size of `collection` by returning
|
6600
|
-
*
|
6591
|
+
* Gets the size of `collection` by returning its length for array-like
|
6592
|
+
* values or the number of own enumerable properties for objects.
|
6601
6593
|
*
|
6602
6594
|
* @static
|
6603
6595
|
* @memberOf _
|
@@ -6727,8 +6719,11 @@
|
|
6727
6719
|
* // => ['barney', 'fred', 'pebbles']
|
6728
6720
|
*/
|
6729
6721
|
function sortBy(collection, iteratee, thisArg) {
|
6722
|
+
if (collection == null) {
|
6723
|
+
return [];
|
6724
|
+
}
|
6730
6725
|
var index = -1,
|
6731
|
-
length = collection
|
6726
|
+
length = collection.length,
|
6732
6727
|
result = isLength(length) ? Array(length) : [];
|
6733
6728
|
|
6734
6729
|
if (thisArg && isIterateeCall(collection, iteratee, thisArg)) {
|
@@ -6765,25 +6760,58 @@
|
|
6765
6760
|
* // => [['barney', 26], ['barney', 36], ['fred', 30], ['fred', 40]]
|
6766
6761
|
*/
|
6767
6762
|
function sortByAll(collection) {
|
6768
|
-
|
6769
|
-
|
6770
|
-
args = [collection, args[1]];
|
6763
|
+
if (collection == null) {
|
6764
|
+
return [];
|
6771
6765
|
}
|
6772
|
-
var
|
6773
|
-
|
6774
|
-
props = baseFlatten(args, false, false, 1),
|
6775
|
-
result = isLength(length) ? Array(length) : [];
|
6766
|
+
var args = arguments,
|
6767
|
+
guard = args[3];
|
6776
6768
|
|
6777
|
-
|
6778
|
-
|
6779
|
-
|
6769
|
+
if (guard && isIterateeCall(args[1], args[2], guard)) {
|
6770
|
+
args = [collection, args[1]];
|
6771
|
+
}
|
6772
|
+
return baseSortByOrder(collection, baseFlatten(args, false, false, 1), []);
|
6773
|
+
}
|
6780
6774
|
|
6781
|
-
|
6782
|
-
|
6783
|
-
|
6784
|
-
|
6785
|
-
|
6786
|
-
|
6775
|
+
/**
|
6776
|
+
* This method is like `_.sortByAll` except that it allows specifying the
|
6777
|
+
* sort orders of the property names to sort by. A truthy value in `orders`
|
6778
|
+
* will sort the corresponding property name in ascending order while a
|
6779
|
+
* falsey value will sort it in descending order.
|
6780
|
+
*
|
6781
|
+
* @static
|
6782
|
+
* @memberOf _
|
6783
|
+
* @category Collection
|
6784
|
+
* @param {Array|Object|string} collection The collection to iterate over.
|
6785
|
+
* @param {string[]} props The property names to sort by.
|
6786
|
+
* @param {boolean[]} orders The sort orders of `props`.
|
6787
|
+
* @returns {Array} Returns the new sorted array.
|
6788
|
+
* @example
|
6789
|
+
*
|
6790
|
+
* var users = [
|
6791
|
+
* { 'user': 'barney', 'age': 36 },
|
6792
|
+
* { 'user': 'fred', 'age': 40 },
|
6793
|
+
* { 'user': 'barney', 'age': 26 },
|
6794
|
+
* { 'user': 'fred', 'age': 30 }
|
6795
|
+
* ];
|
6796
|
+
*
|
6797
|
+
* // sort by `user` in ascending order and by `age` in descending order
|
6798
|
+
* _.map(_.sortByOrder(users, ['user', 'age'], [true, false]), _.values);
|
6799
|
+
* // => [['barney', 36], ['barney', 26], ['fred', 40], ['fred', 30]]
|
6800
|
+
*/
|
6801
|
+
function sortByOrder(collection, props, orders, guard) {
|
6802
|
+
if (collection == null) {
|
6803
|
+
return [];
|
6804
|
+
}
|
6805
|
+
if (guard && isIterateeCall(props, orders, guard)) {
|
6806
|
+
orders = null;
|
6807
|
+
}
|
6808
|
+
if (!isArray(props)) {
|
6809
|
+
props = props == null ? [] : [props];
|
6810
|
+
}
|
6811
|
+
if (!isArray(orders)) {
|
6812
|
+
orders = orders == null ? [] : [orders];
|
6813
|
+
}
|
6814
|
+
return baseSortByOrder(collection, props, orders);
|
6787
6815
|
}
|
6788
6816
|
|
6789
6817
|
/**
|
@@ -7406,38 +7434,15 @@
|
|
7406
7434
|
* @returns {Function} Returns the new function.
|
7407
7435
|
* @example
|
7408
7436
|
*
|
7409
|
-
* function add(x, y) {
|
7410
|
-
* return x + y;
|
7411
|
-
* }
|
7412
|
-
*
|
7413
7437
|
* function square(n) {
|
7414
7438
|
* return n * n;
|
7415
7439
|
* }
|
7416
7440
|
*
|
7417
|
-
* var addSquare = _.flow(add, square);
|
7441
|
+
* var addSquare = _.flow(_.add, square);
|
7418
7442
|
* addSquare(1, 2);
|
7419
7443
|
* // => 9
|
7420
7444
|
*/
|
7421
|
-
|
7422
|
-
var funcs = arguments,
|
7423
|
-
length = funcs.length;
|
7424
|
-
|
7425
|
-
if (!length) {
|
7426
|
-
return function() { return arguments[0]; };
|
7427
|
-
}
|
7428
|
-
if (!arrayEvery(funcs, baseIsFunction)) {
|
7429
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
7430
|
-
}
|
7431
|
-
return function() {
|
7432
|
-
var index = 0,
|
7433
|
-
result = funcs[index].apply(this, arguments);
|
7434
|
-
|
7435
|
-
while (++index < length) {
|
7436
|
-
result = funcs[index].call(this, result);
|
7437
|
-
}
|
7438
|
-
return result;
|
7439
|
-
};
|
7440
|
-
}
|
7445
|
+
var flow = createComposer();
|
7441
7446
|
|
7442
7447
|
/**
|
7443
7448
|
* This method is like `_.flow` except that it creates a function that
|
@@ -7451,38 +7456,15 @@
|
|
7451
7456
|
* @returns {Function} Returns the new function.
|
7452
7457
|
* @example
|
7453
7458
|
*
|
7454
|
-
* function add(x, y) {
|
7455
|
-
* return x + y;
|
7456
|
-
* }
|
7457
|
-
*
|
7458
7459
|
* function square(n) {
|
7459
7460
|
* return n * n;
|
7460
7461
|
* }
|
7461
7462
|
*
|
7462
|
-
* var addSquare = _.flowRight(square, add);
|
7463
|
+
* var addSquare = _.flowRight(square, _.add);
|
7463
7464
|
* addSquare(1, 2);
|
7464
7465
|
* // => 9
|
7465
7466
|
*/
|
7466
|
-
|
7467
|
-
var funcs = arguments,
|
7468
|
-
fromIndex = funcs.length - 1;
|
7469
|
-
|
7470
|
-
if (fromIndex < 0) {
|
7471
|
-
return function() { return arguments[0]; };
|
7472
|
-
}
|
7473
|
-
if (!arrayEvery(funcs, baseIsFunction)) {
|
7474
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
7475
|
-
}
|
7476
|
-
return function() {
|
7477
|
-
var index = fromIndex,
|
7478
|
-
result = funcs[index].apply(this, arguments);
|
7479
|
-
|
7480
|
-
while (index--) {
|
7481
|
-
result = funcs[index].call(this, result);
|
7482
|
-
}
|
7483
|
-
return result;
|
7484
|
-
};
|
7485
|
-
}
|
7467
|
+
var flowRight = createComposer(true);
|
7486
7468
|
|
7487
7469
|
/**
|
7488
7470
|
* Creates a function that memoizes the result of `func`. If `resolver` is
|
@@ -7542,13 +7524,14 @@
|
|
7542
7524
|
throw new TypeError(FUNC_ERROR_TEXT);
|
7543
7525
|
}
|
7544
7526
|
var memoized = function() {
|
7545
|
-
var
|
7546
|
-
|
7527
|
+
var args = arguments,
|
7528
|
+
cache = memoized.cache,
|
7529
|
+
key = resolver ? resolver.apply(this, args) : args[0];
|
7547
7530
|
|
7548
7531
|
if (cache.has(key)) {
|
7549
7532
|
return cache.get(key);
|
7550
7533
|
}
|
7551
|
-
var result = func.apply(this,
|
7534
|
+
var result = func.apply(this, args);
|
7552
7535
|
cache.set(key, result);
|
7553
7536
|
return result;
|
7554
7537
|
};
|
@@ -8063,7 +8046,7 @@
|
|
8063
8046
|
}
|
8064
8047
|
|
8065
8048
|
/**
|
8066
|
-
* Checks if
|
8049
|
+
* Checks if `value` is empty. A value is considered empty unless it is an
|
8067
8050
|
* `arguments` object, array, string, or jQuery-like collection with a length
|
8068
8051
|
* greater than `0` or an object with own enumerable properties.
|
8069
8052
|
*
|
@@ -8678,7 +8661,7 @@
|
|
8678
8661
|
/**
|
8679
8662
|
* Assigns own enumerable properties of source object(s) to the destination
|
8680
8663
|
* object for all destination properties that resolve to `undefined`. Once a
|
8681
|
-
* property is set, additional
|
8664
|
+
* property is set, additional values of the same property are ignored.
|
8682
8665
|
*
|
8683
8666
|
* @static
|
8684
8667
|
* @memberOf _
|
@@ -9468,7 +9451,7 @@
|
|
9468
9451
|
|
9469
9452
|
/**
|
9470
9453
|
* Checks if `n` is between `start` and up to but not including, `end`. If
|
9471
|
-
* `end` is not specified it
|
9454
|
+
* `end` is not specified it is set to `start` with `start` then set to `0`.
|
9472
9455
|
*
|
9473
9456
|
* @static
|
9474
9457
|
* @memberOf _
|
@@ -9666,7 +9649,7 @@
|
|
9666
9649
|
}
|
9667
9650
|
|
9668
9651
|
/**
|
9669
|
-
* Converts the characters "&", "<", ">", '"', "'", and
|
9652
|
+
* Converts the characters "&", "<", ">", '"', "'", and "\`", in `string` to
|
9670
9653
|
* their corresponding HTML entities.
|
9671
9654
|
*
|
9672
9655
|
* **Note:** No other characters are escaped. To escape additional characters
|
@@ -10469,14 +10452,14 @@
|
|
10469
10452
|
* }
|
10470
10453
|
*/
|
10471
10454
|
function attempt() {
|
10472
|
-
var
|
10473
|
-
|
10455
|
+
var func = arguments[0],
|
10456
|
+
length = arguments.length,
|
10457
|
+
args = Array(length ? length - 1 : 0);
|
10474
10458
|
|
10459
|
+
while (--length > 0) {
|
10460
|
+
args[length - 1] = arguments[length];
|
10461
|
+
}
|
10475
10462
|
try {
|
10476
|
-
var args = Array(length ? length - 1 : 0);
|
10477
|
-
while (--length > 0) {
|
10478
|
-
args[length - 1] = arguments[length];
|
10479
|
-
}
|
10480
10463
|
return func.apply(undefined, args);
|
10481
10464
|
} catch(e) {
|
10482
10465
|
return isError(e) ? e : new Error(e);
|
@@ -10805,9 +10788,9 @@
|
|
10805
10788
|
|
10806
10789
|
/**
|
10807
10790
|
* Creates an array of numbers (positive and/or negative) progressing from
|
10808
|
-
* `start` up to, but not including, `end`. If `end` is not specified it
|
10809
|
-
*
|
10810
|
-
*
|
10791
|
+
* `start` up to, but not including, `end`. If `end` is not specified it is
|
10792
|
+
* set to `start` with `start` then set to `0`. If `start` is less than `end`
|
10793
|
+
* a zero-length range is created unless a negative `step` is specified.
|
10811
10794
|
*
|
10812
10795
|
* @static
|
10813
10796
|
* @memberOf _
|
@@ -10934,6 +10917,153 @@
|
|
10934
10917
|
|
10935
10918
|
/*------------------------------------------------------------------------*/
|
10936
10919
|
|
10920
|
+
/**
|
10921
|
+
* Adds two numbers.
|
10922
|
+
*
|
10923
|
+
* @static
|
10924
|
+
* @memberOf _
|
10925
|
+
* @category Math
|
10926
|
+
* @param {number} augend The first number to add.
|
10927
|
+
* @param {number} addend The second number to add.
|
10928
|
+
* @returns {number} Returns the sum.
|
10929
|
+
* @example
|
10930
|
+
*
|
10931
|
+
* _.add(6, 4);
|
10932
|
+
* // => 10
|
10933
|
+
*/
|
10934
|
+
function add(augend, addend) {
|
10935
|
+
return augend + addend;
|
10936
|
+
}
|
10937
|
+
|
10938
|
+
/**
|
10939
|
+
* Gets the maximum value of `collection`. If `collection` is empty or falsey
|
10940
|
+
* `-Infinity` is returned. If an iteratee function is provided it is invoked
|
10941
|
+
* for each value in `collection` to generate the criterion by which the value
|
10942
|
+
* is ranked. The `iteratee` is bound to `thisArg` and invoked with three
|
10943
|
+
* arguments; (value, index, collection).
|
10944
|
+
*
|
10945
|
+
* If a property name is provided for `predicate` the created `_.property`
|
10946
|
+
* style callback returns the property value of the given element.
|
10947
|
+
*
|
10948
|
+
* If a value is also provided for `thisArg` the created `_.matchesProperty`
|
10949
|
+
* style callback returns `true` for elements that have a matching property
|
10950
|
+
* value, else `false`.
|
10951
|
+
*
|
10952
|
+
* If an object is provided for `predicate` the created `_.matches` style
|
10953
|
+
* callback returns `true` for elements that have the properties of the given
|
10954
|
+
* object, else `false`.
|
10955
|
+
*
|
10956
|
+
* @static
|
10957
|
+
* @memberOf _
|
10958
|
+
* @category Math
|
10959
|
+
* @param {Array|Object|string} collection The collection to iterate over.
|
10960
|
+
* @param {Function|Object|string} [iteratee] The function invoked per iteration.
|
10961
|
+
* @param {*} [thisArg] The `this` binding of `iteratee`.
|
10962
|
+
* @returns {*} Returns the maximum value.
|
10963
|
+
* @example
|
10964
|
+
*
|
10965
|
+
* _.max([4, 2, 8, 6]);
|
10966
|
+
* // => 8
|
10967
|
+
*
|
10968
|
+
* _.max([]);
|
10969
|
+
* // => -Infinity
|
10970
|
+
*
|
10971
|
+
* var users = [
|
10972
|
+
* { 'user': 'barney', 'age': 36 },
|
10973
|
+
* { 'user': 'fred', 'age': 40 }
|
10974
|
+
* ];
|
10975
|
+
*
|
10976
|
+
* _.max(users, function(chr) {
|
10977
|
+
* return chr.age;
|
10978
|
+
* });
|
10979
|
+
* // => { 'user': 'fred', 'age': 40 };
|
10980
|
+
*
|
10981
|
+
* // using the `_.property` callback shorthand
|
10982
|
+
* _.max(users, 'age');
|
10983
|
+
* // => { 'user': 'fred', 'age': 40 };
|
10984
|
+
*/
|
10985
|
+
var max = createExtremum(arrayMax);
|
10986
|
+
|
10987
|
+
/**
|
10988
|
+
* Gets the minimum value of `collection`. If `collection` is empty or falsey
|
10989
|
+
* `Infinity` is returned. If an iteratee function is provided it is invoked
|
10990
|
+
* for each value in `collection` to generate the criterion by which the value
|
10991
|
+
* is ranked. The `iteratee` is bound to `thisArg` and invoked with three
|
10992
|
+
* arguments; (value, index, collection).
|
10993
|
+
*
|
10994
|
+
* If a property name is provided for `predicate` the created `_.property`
|
10995
|
+
* style callback returns the property value of the given element.
|
10996
|
+
*
|
10997
|
+
* If a value is also provided for `thisArg` the created `_.matchesProperty`
|
10998
|
+
* style callback returns `true` for elements that have a matching property
|
10999
|
+
* value, else `false`.
|
11000
|
+
*
|
11001
|
+
* If an object is provided for `predicate` the created `_.matches` style
|
11002
|
+
* callback returns `true` for elements that have the properties of the given
|
11003
|
+
* object, else `false`.
|
11004
|
+
*
|
11005
|
+
* @static
|
11006
|
+
* @memberOf _
|
11007
|
+
* @category Math
|
11008
|
+
* @param {Array|Object|string} collection The collection to iterate over.
|
11009
|
+
* @param {Function|Object|string} [iteratee] The function invoked per iteration.
|
11010
|
+
* @param {*} [thisArg] The `this` binding of `iteratee`.
|
11011
|
+
* @returns {*} Returns the minimum value.
|
11012
|
+
* @example
|
11013
|
+
*
|
11014
|
+
* _.min([4, 2, 8, 6]);
|
11015
|
+
* // => 2
|
11016
|
+
*
|
11017
|
+
* _.min([]);
|
11018
|
+
* // => Infinity
|
11019
|
+
*
|
11020
|
+
* var users = [
|
11021
|
+
* { 'user': 'barney', 'age': 36 },
|
11022
|
+
* { 'user': 'fred', 'age': 40 }
|
11023
|
+
* ];
|
11024
|
+
*
|
11025
|
+
* _.min(users, function(chr) {
|
11026
|
+
* return chr.age;
|
11027
|
+
* });
|
11028
|
+
* // => { 'user': 'barney', 'age': 36 };
|
11029
|
+
*
|
11030
|
+
* // using the `_.property` callback shorthand
|
11031
|
+
* _.min(users, 'age');
|
11032
|
+
* // => { 'user': 'barney', 'age': 36 };
|
11033
|
+
*/
|
11034
|
+
var min = createExtremum(arrayMin, true);
|
11035
|
+
|
11036
|
+
/**
|
11037
|
+
* Gets the sum of the values in `collection`.
|
11038
|
+
*
|
11039
|
+
* @static
|
11040
|
+
* @memberOf _
|
11041
|
+
* @category Math
|
11042
|
+
* @param {Array|Object|string} collection The collection to iterate over.
|
11043
|
+
* @returns {number} Returns the sum.
|
11044
|
+
* @example
|
11045
|
+
*
|
11046
|
+
* _.sum([4, 6, 2]);
|
11047
|
+
* // => 12
|
11048
|
+
*
|
11049
|
+
* _.sum({ 'a': 4, 'b': 6, 'c': 2 });
|
11050
|
+
* // => 12
|
11051
|
+
*/
|
11052
|
+
function sum(collection) {
|
11053
|
+
if (!isArray(collection)) {
|
11054
|
+
collection = toIterable(collection);
|
11055
|
+
}
|
11056
|
+
var length = collection.length,
|
11057
|
+
result = 0;
|
11058
|
+
|
11059
|
+
while (length--) {
|
11060
|
+
result += +collection[length] || 0;
|
11061
|
+
}
|
11062
|
+
return result;
|
11063
|
+
}
|
11064
|
+
|
11065
|
+
/*------------------------------------------------------------------------*/
|
11066
|
+
|
10937
11067
|
// Ensure wrappers are instances of `baseLodash`.
|
10938
11068
|
lodash.prototype = baseLodash.prototype;
|
10939
11069
|
|
@@ -11032,6 +11162,7 @@
|
|
11032
11162
|
lodash.slice = slice;
|
11033
11163
|
lodash.sortBy = sortBy;
|
11034
11164
|
lodash.sortByAll = sortByAll;
|
11165
|
+
lodash.sortByOrder = sortByOrder;
|
11035
11166
|
lodash.spread = spread;
|
11036
11167
|
lodash.take = take;
|
11037
11168
|
lodash.takeRight = takeRight;
|
@@ -11076,6 +11207,7 @@
|
|
11076
11207
|
/*------------------------------------------------------------------------*/
|
11077
11208
|
|
11078
11209
|
// Add functions that return unwrapped values when chaining.
|
11210
|
+
lodash.add = add;
|
11079
11211
|
lodash.attempt = attempt;
|
11080
11212
|
lodash.camelCase = camelCase;
|
11081
11213
|
lodash.capitalize = capitalize;
|
@@ -11145,6 +11277,7 @@
|
|
11145
11277
|
lodash.sortedLastIndex = sortedLastIndex;
|
11146
11278
|
lodash.startCase = startCase;
|
11147
11279
|
lodash.startsWith = startsWith;
|
11280
|
+
lodash.sum = sum;
|
11148
11281
|
lodash.template = template;
|
11149
11282
|
lodash.trim = trim;
|
11150
11283
|
lodash.trimLeft = trimLeft;
|
@@ -11206,15 +11339,17 @@
|
|
11206
11339
|
});
|
11207
11340
|
|
11208
11341
|
// Add `LazyWrapper` methods that accept an `iteratee` value.
|
11209
|
-
arrayEach(['filter', 'map', 'takeWhile'], function(methodName,
|
11210
|
-
var isFilter =
|
11342
|
+
arrayEach(['dropWhile', 'filter', 'map', 'takeWhile'], function(methodName, type) {
|
11343
|
+
var isFilter = type != LAZY_MAP_FLAG,
|
11344
|
+
isDropWhile = type == LAZY_DROP_WHILE_FLAG;
|
11211
11345
|
|
11212
11346
|
LazyWrapper.prototype[methodName] = function(iteratee, thisArg) {
|
11213
|
-
var
|
11347
|
+
var filtered = this.__filtered__,
|
11348
|
+
result = (filtered && isDropWhile) ? new LazyWrapper(this) : this.clone(),
|
11214
11349
|
iteratees = result.__iteratees__ || (result.__iteratees__ = []);
|
11215
11350
|
|
11216
|
-
result.__filtered__ =
|
11217
|
-
iteratees.push({ 'iteratee': getCallback(iteratee, thisArg,
|
11351
|
+
result.__filtered__ = filtered || isFilter;
|
11352
|
+
iteratees.push({ 'done': false, 'index': 0, 'iteratee': getCallback(iteratee, thisArg, 1), 'type': type });
|
11218
11353
|
return result;
|
11219
11354
|
};
|
11220
11355
|
});
|
@@ -11279,23 +11414,10 @@
|
|
11279
11414
|
return this.filter(identity);
|
11280
11415
|
};
|
11281
11416
|
|
11282
|
-
LazyWrapper.prototype.dropWhile = function(predicate, thisArg) {
|
11283
|
-
var done,
|
11284
|
-
lastIndex,
|
11285
|
-
isRight = this.__dir__ < 0;
|
11286
|
-
|
11287
|
-
predicate = getCallback(predicate, thisArg, 3);
|
11288
|
-
return this.filter(function(value, index, array) {
|
11289
|
-
done = done && (isRight ? index < lastIndex : index > lastIndex);
|
11290
|
-
lastIndex = index;
|
11291
|
-
return done || (done = !predicate(value, index, array));
|
11292
|
-
});
|
11293
|
-
};
|
11294
|
-
|
11295
11417
|
LazyWrapper.prototype.reject = function(predicate, thisArg) {
|
11296
|
-
predicate = getCallback(predicate, thisArg,
|
11297
|
-
return this.filter(function(value
|
11298
|
-
return !predicate(value
|
11418
|
+
predicate = getCallback(predicate, thisArg, 1);
|
11419
|
+
return this.filter(function(value) {
|
11420
|
+
return !predicate(value);
|
11299
11421
|
});
|
11300
11422
|
};
|
11301
11423
|
|
@@ -11317,16 +11439,24 @@
|
|
11317
11439
|
// Add `LazyWrapper` methods to `lodash.prototype`.
|
11318
11440
|
baseForOwn(LazyWrapper.prototype, function(func, methodName) {
|
11319
11441
|
var lodashFunc = lodash[methodName],
|
11442
|
+
checkIteratee = /^(?:filter|map|reject)|While$/.test(methodName),
|
11320
11443
|
retUnwrapped = /^(?:first|last)$/.test(methodName);
|
11321
11444
|
|
11322
11445
|
lodash.prototype[methodName] = function() {
|
11323
|
-
var
|
11324
|
-
|
11446
|
+
var args = arguments,
|
11447
|
+
length = args.length,
|
11325
11448
|
chainAll = this.__chain__,
|
11449
|
+
value = this.__wrapped__,
|
11326
11450
|
isHybrid = !!this.__actions__.length,
|
11327
11451
|
isLazy = value instanceof LazyWrapper,
|
11328
|
-
|
11452
|
+
iteratee = args[0],
|
11453
|
+
useLazy = isLazy || isArray(value);
|
11329
11454
|
|
11455
|
+
if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
|
11456
|
+
// avoid lazy use if the iteratee has a `length` other than `1`
|
11457
|
+
isLazy = useLazy = false;
|
11458
|
+
}
|
11459
|
+
var onlyLazy = isLazy && !isHybrid;
|
11330
11460
|
if (retUnwrapped && !chainAll) {
|
11331
11461
|
return onlyLazy
|
11332
11462
|
? func.call(value)
|
@@ -11337,7 +11467,7 @@
|
|
11337
11467
|
push.apply(otherArgs, args);
|
11338
11468
|
return lodashFunc.apply(lodash, otherArgs);
|
11339
11469
|
};
|
11340
|
-
if (
|
11470
|
+
if (useLazy) {
|
11341
11471
|
var wrapper = onlyLazy ? value : new LazyWrapper(this),
|
11342
11472
|
result = func.apply(wrapper, args);
|
11343
11473
|
|