mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 15:27:50 +00:00
Expanded _.createCallback and _.after docs and ensure _.times calls lodash.createCallback.
Former-commit-id: 2d6a480a5ee449295ec40acd5e8bbef6fe955473
This commit is contained in:
2
build.js
2
build.js
@@ -163,7 +163,7 @@
|
||||
'tap': ['value'],
|
||||
'template': ['defaults', 'escape', 'keys', 'values'],
|
||||
'throttle': [],
|
||||
'times': [],
|
||||
'times': ['createCallback'],
|
||||
'toArray': ['isString', 'values'],
|
||||
'unescape': [],
|
||||
'union': ['uniq'],
|
||||
|
||||
23
dist/lodash.compat.js
vendored
23
dist/lodash.compat.js
vendored
@@ -4062,9 +4062,11 @@
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Creates a function that is restricted to executing `func` only after it is
|
||||
* called `n` times. The `func` is executed with the `this` binding of the
|
||||
* created function.
|
||||
* If `n` is greater than `0`, a function is created that is restricted to
|
||||
* executing `func`, with the `this` binding and arguments of the created
|
||||
* function, only after it is called `n` times. If `n` is less than `1`,
|
||||
* `func` is executed immediately, without a `this` binding or additional
|
||||
* arguments, and its result is returned.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
@@ -4257,6 +4259,19 @@
|
||||
*
|
||||
* _.filter(stooges, 'age__gt45');
|
||||
* // => [{ 'name': 'larry', 'age': 50 }]
|
||||
*
|
||||
* // create mixins with support for "_.pluck" and "_.where" callback shorthands
|
||||
* _.mixin({
|
||||
* 'toLookup': function(collection, callback, thisArg) {
|
||||
* callback = _.createCallback(callback, thisArg);
|
||||
* return _.reduce(collection, function(result, value, index, collection) {
|
||||
* return (result[callback(value, index, collection)] = value, result);
|
||||
* }, {});
|
||||
* }
|
||||
* });
|
||||
*
|
||||
* _.toLookup(stooges, 'name');
|
||||
* // => { 'moe': { 'name': 'moe', 'age': 40 }, 'larry': { 'name': 'larry', 'age': 50 } }
|
||||
*/
|
||||
function createCallback(func, thisArg, argCount) {
|
||||
if (func == null) {
|
||||
@@ -4981,7 +4996,7 @@
|
||||
var index = -1,
|
||||
result = Array(n);
|
||||
|
||||
callback = createCallback(callback, thisArg, 1);
|
||||
callback = lodash.createCallback(callback, thisArg, 1);
|
||||
while (++index < n) {
|
||||
result[index] = callback(index);
|
||||
}
|
||||
|
||||
78
dist/lodash.compat.min.js
vendored
78
dist/lodash.compat.min.js
vendored
@@ -4,42 +4,42 @@
|
||||
* Build: `lodash -o ./dist/lodash.compat.js`
|
||||
* Underscore.js 1.4.4 underscorejs.org/LICENSE
|
||||
*/
|
||||
;(function(n){function t(r){function a(n){return n&&typeof n=="object"&&Gt.call(n,"__wrapped__")?n:new L(n)}function B(n,t,e){t||(t=0);var r=n.length,u=r-t>=(e||f);if(u){var a={};for(e=t-1;++e<r;){var o=n[e]+"";(Gt.call(a,o)?a[o]:a[o]=[]).push(n[e])}}return function(e){if(u){var r=e+"";return Gt.call(a,r)&&-1<mt(a[r],e)}return-1<mt(n,e,t)}}function F(n){return n.charCodeAt(0)}function q(n,t){var e=n.b,r=t.b;if(n=n.a,t=t.a,n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1
|
||||
}return e<r?-1:1}function R(n,t,e,r){function u(){var f=arguments,c=o?this:t;return a||(n=t[i]),e.length&&(f=f.length?(f=U(f),r?f.concat(e):e.concat(f)):e),this instanceof u?(M.prototype=n.prototype,c=new M,M.prototype=null,f=n.apply(c,f),nt(f)?f:c):n.apply(c,f)}var a=Z(n),o=!e,i=t;return o&&(e=t),a||(t=n),u}function T(){for(var n,t={f:_,b:"k(m)",c:"",e:"",g:"",h:!0},e=0;n=arguments[e];e++)for(var r in n)t[r]=n[r];if(n=t.a,t.d=/^[^,]+/.exec(n)[0],e=It,r="var i,m="+t.d+",u=m;if(!m)return u;"+t.g+";",t.b?(r+="var n=m.length;i=-1;if("+t.b+"){",le.unindexedChars&&(r+="if(l(m)){m=m.split('')}"),r+="while(++i<n){"+t.e+"}}else{"):le.nonEnumArgs&&(r+="var n=m.length;i=-1;if(n&&j(m)){while(++i<n){i+='';"+t.e+"}}else{"),le.enumPrototypes&&(r+="var v=typeof m=='function';"),le.fastKeys&&t.h?(r+="var s=-1,t=r[typeof m]?p(m):[],n=t.length;while(++s<n){i=t[s];",le.enumPrototypes&&(r+="if(!(v&&i=='prototype')){"),r+=t.e,le.enumPrototypes&&(r+="}")):(r+="for(i in m){",(le.enumPrototypes||t.h)&&(r+="if(",le.enumPrototypes&&(r+="!(v&&i=='prototype')"),le.enumPrototypes&&t.h&&(r+="&&"),t.h&&(r+="h.call(m,i)"),r+="){"),r+=t.e+";",(le.enumPrototypes||t.h)&&(r+="}")),r+="}",le.nonEnumShadows){r+="var f=m.constructor;";
|
||||
for(var u=0;7>u;u++)r+="i='"+t.f[u]+"';if(","constructor"==t.f[u]&&(r+="!(f&&f.prototype===m)&&"),r+="h.call(m,i)){"+t.e+"}"}return(t.b||le.nonEnumArgs)&&(r+="}"),r+=t.c+";return u",e("h,j,k,l,o,r,p","return function("+n+"){"+r+"}")(Gt,G,me,et,a,I,te)}function D(n){return"\\"+N[n]}function z(n){return be[n]}function K(n){return typeof n.toString!="function"&&typeof(n+"")=="string"}function L(n){this.__wrapped__=n}function M(){}function U(n,t,e){t||(t=0),typeof e=="undefined"&&(e=n?n.length:0);var r=-1;
|
||||
e=e-t||0;for(var u=St(0>e?0:e);++r<e;)u[r]=n[t+r];return u}function V(n){return _e[n]}function G(n){return Wt.call(n)==w}function H(n){var t=!1;if(!n||typeof n!="object"||G(n))return t;var e=n.constructor;return!Z(e)&&(le.nodeClass||!K(n))||e instanceof e?le.ownLast?(ye(n,function(n,e,r){return t=Gt.call(r,e),!1}),!0===t):(ye(n,function(n,e){t=e}),!1===t||Gt.call(n,t)):t}function J(n){var t=[];return he(n,function(n,e){t.push(e)}),t}function Q(n,t,r,u,o,i){var f=n;if(typeof t=="function"&&(u=r,r=t,t=!1),typeof r=="function"){if(r=typeof u=="undefined"?r:a.createCallback(r,u,1),f=r(f),typeof f!="undefined")return f;
|
||||
f=n}if(u=nt(f)){var c=Wt.call(f);if(!P[c]||!le.nodeClass&&K(f))return f;var l=me(f)}if(!u||!t)return u?l?U(f):we({},f):f;switch(u=ce[c],c){case C:case k:return new u(+f);case O:case A:return new u(f);case S:return u(f.source,v.exec(f))}for(o||(o=[]),i||(i=[]),c=o.length;c--;)if(o[c]==n)return i[c];return f=l?u(f.length):{},l&&(Gt.call(n,"index")&&(f.index=n.index),Gt.call(n,"input")&&(f.input=n.input)),o.push(n),i.push(f),(l?ct:he)(n,function(n,u){f[u]=Q(n,t,r,e,o,i)}),f}function W(n){var t=[];return ye(n,function(n,e){Z(n)&&t.push(e)
|
||||
}),t.sort()}function X(n){for(var t=-1,e=de(n),r=e.length,u={};++t<r;){var a=e[t];u[n[a]]=a}return u}function Y(n,t,e,r,u,o){var f=e===i;if(e&&!f){e=typeof r=="undefined"?e:a.createCallback(e,r,2);var c=e(n,t);if(typeof c!="undefined")return!!c}if(n===t)return 0!==n||1/n==1/t;var l=typeof n,p=typeof t;if(n===n&&(!n||"function"!=l&&"object"!=l)&&(!t||"function"!=p&&"object"!=p))return!1;if(null==n||null==t)return n===t;if(p=Wt.call(n),l=Wt.call(t),p==w&&(p=E),l==w&&(l=E),p!=l)return!1;switch(p){case C:case k:return+n==+t;
|
||||
case O:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case S:case A:return n==t+""}if(l=p==j,!l){if(Gt.call(n,"__wrapped__")||Gt.call(t,"__wrapped__"))return Y(n.__wrapped__||n,t.__wrapped__||t,e,r,u,o);if(p!=E||!le.nodeClass&&(K(n)||K(t)))return!1;var p=!le.argsObject&&G(n)?Bt:n.constructor,s=!le.argsObject&&G(t)?Bt:t.constructor;if(p!=s&&(!Z(p)||!(p instanceof p&&Z(s)&&s instanceof s)))return!1}for(u||(u=[]),o||(o=[]),p=u.length;p--;)if(u[p]==n)return o[p]==t;var v=0,c=!0;if(u.push(n),o.push(t),l){if(p=n.length,v=t.length,c=v==n.length,!c&&!f)return c;
|
||||
for(;v--;)if(l=p,s=t[v],f)for(;l--&&!(c=Y(n[l],s,e,r,u,o)););else if(!(c=Y(n[v],s,e,r,u,o)))break;return c}return ye(t,function(t,a,i){return Gt.call(i,a)?(v++,c=Gt.call(n,a)&&Y(n[a],t,e,r,u,o)):void 0}),c&&!f&&ye(n,function(n,t,e){return Gt.call(e,t)?c=-1<--v:void 0}),c}function Z(n){return typeof n=="function"}function nt(n){return n?I[typeof n]:!1}function tt(n){return typeof n=="number"||Wt.call(n)==O}function et(n){return typeof n=="string"||Wt.call(n)==A}function rt(n,t,e){var r=arguments,u=0,o=2;
|
||||
if(!nt(n))return n;if(e===i)var f=r[3],c=r[4],l=r[5];else c=[],l=[],typeof e!="number"&&(o=r.length),3<o&&"function"==typeof r[o-2]?f=a.createCallback(r[--o-1],r[o--],2):2<o&&"function"==typeof r[o-1]&&(f=r[--o]);for(;++u<o;)(me(r[u])?ct:he)(r[u],function(t,e){var r,u,a=t,o=n[e];if(t&&((u=me(t))||Ce(t))){for(a=c.length;a--;)if(r=c[a]==t){o=l[a];break}r||(o=u?me(o)?o:[]:Ce(o)?o:{},f&&(a=f(o,t),typeof a!="undefined"&&(o=a)),c.push(t),l.push(o),f||(o=rt(o,t,i,f,c,l)))}else f&&(a=f(o,t),typeof a=="undefined"&&(a=t)),typeof a!="undefined"&&(o=a);
|
||||
n[e]=o});return n}function ut(n){for(var t=-1,e=de(n),r=e.length,u=St(r);++t<r;)u[t]=n[e[t]];return u}function at(n,t,e){var r=-1,u=n?n.length:0,a=!1;return e=(0>e?ee(0,u+e):e)||0,typeof u=="number"?a=-1<(et(n)?n.indexOf(t,e):mt(n,t,e)):ge(n,function(n){return++r<e?void 0:!(a=n===t)}),a}function ot(n,t,e){var r=!0;if(t=a.createCallback(t,e),me(n)){e=-1;for(var u=n.length;++e<u&&(r=!!t(n[e],e,n)););}else ge(n,function(n,e,u){return r=!!t(n,e,u)});return r}function it(n,t,e){var r=[];if(t=a.createCallback(t,e),me(n)){e=-1;
|
||||
for(var u=n.length;++e<u;){var o=n[e];t(o,e,n)&&r.push(o)}}else ge(n,function(n,e,u){t(n,e,u)&&r.push(n)});return r}function ft(n,t,e){var r;return t=a.createCallback(t,e),ct(n,function(n,e,u){return t(n,e,u)?(r=n,!1):void 0}),r}function ct(n,t,e){if(t&&typeof e=="undefined"&&me(n)){e=-1;for(var r=n.length;++e<r&&!1!==t(n[e],e,n););}else ge(n,t,e);return n}function lt(n,t,e){var r=-1,u=n?n.length:0,o=St(typeof u=="number"?u:0);if(t=a.createCallback(t,e),me(n))for(;++r<u;)o[r]=t(n[r],r,n);else ge(n,function(n,e,u){o[++r]=t(n,e,u)
|
||||
});return o}function pt(n,t,e){var r=-1/0,u=r;if(!t&&me(n)){e=-1;for(var o=n.length;++e<o;){var i=n[e];i>u&&(u=i)}}else t=!t&&et(n)?F:a.createCallback(t,e),ge(n,function(n,e,a){e=t(n,e,a),e>r&&(r=e,u=n)});return u}function st(n,t,e,r){var u=3>arguments.length;if(t=a.createCallback(t,r,4),me(n)){var o=-1,i=n.length;for(u&&(e=n[++o]);++o<i;)e=t(e,n[o],o,n)}else ge(n,function(n,r,a){e=u?(u=!1,n):t(e,n,r,a)});return e}function vt(n,t,e,r){var u=n,o=n?n.length:0,i=3>arguments.length;if(typeof o!="number")var f=de(n),o=f.length;
|
||||
else le.unindexedChars&&et(n)&&(u=n.split(""));return t=a.createCallback(t,r,4),ct(n,function(n,r,a){r=f?f[--o]:--o,e=i?(i=!1,u[r]):t(e,u[r],r,a)}),e}function gt(n,t,e){var r;if(t=a.createCallback(t,e),me(n)){e=-1;for(var u=n.length;++e<u&&!(r=t(n[e],e,n)););}else ge(n,function(n,e,u){return!(r=t(n,e,u))});return!!r}function yt(n,t,e){if(n){var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=-1;for(t=a.createCallback(t,e);++o<u&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n[0];return U(n,0,re(ee(0,r),u))
|
||||
}}function ht(n,t,e,r){var u=-1,o=n?n.length:0,i=[];for(typeof t!="boolean"&&null!=t&&(r=e,e=t,t=!1),null!=e&&(e=a.createCallback(e,r));++u<o;)r=n[u],e&&(r=e(r,u,n)),me(r)?Ht.apply(i,t?r:ht(r)):i.push(r);return i}function mt(n,t,e){var r=-1,u=n?n.length:0;if(typeof e=="number")r=(0>e?ee(0,u+e):e||0)-1;else if(e)return r=bt(n,t),n[r]===t?r:-1;for(;++r<u;)if(n[r]===t)return r;return-1}function dt(n,t,e){if(typeof t!="number"&&null!=t){var r=0,u=-1,o=n?n.length:0;for(t=a.createCallback(t,e);++u<o&&t(n[u],u,n);)r++
|
||||
}else r=null==t||e?1:ee(0,t);return U(n,r)}function bt(n,t,e,r){var u=0,o=n?n.length:u;for(e=e?a.createCallback(e,r,1):xt,t=e(t);u<o;)r=u+o>>>1,e(n[r])<t?u=r+1:o=r;return u}function _t(n,t,e,r){var u=-1,o=n?n.length:0,i=[],f=i;typeof t!="boolean"&&null!=t&&(r=e,e=t,t=!1);var c=!t&&75<=o;if(c)var l={};for(null!=e&&(f=[],e=a.createCallback(e,r));++u<o;){r=n[u];var p=e?e(r,u,n):r;if(c)var s=p+"",s=Gt.call(l,s)?!(f=l[s]):f=l[s]=[];(t?!u||f[f.length-1]!==p:s||0>mt(f,p))&&((e||c)&&f.push(p),i.push(r))}return i
|
||||
}function wt(n,t){for(var e=-1,r=n?n.length:0,u={};++e<r;){var a=n[e];t?u[a]=t[e]:u[a[0]]=a[1]}return u}function jt(n,t){return le.fastBind||Xt&&2<arguments.length?Xt.call.apply(Xt,arguments):R(n,t,U(arguments,2))}function Ct(n,t,e){if(null==n)return xt;var r=typeof n;if("function"!=r){if("object"!=r)return function(t){return t[n]};var u=de(n);return function(t){for(var e=u.length,r=!1;e--&&(r=Y(t[u[e]],n[u[e]],i)););return r}}return typeof t!="undefined"?1===e?function(e){return n.call(t,e)}:2===e?function(e,r){return n.call(t,e,r)
|
||||
}:4===e?function(e,r,u,a){return n.call(t,e,r,u,a)}:function(e,r,u){return n.call(t,e,r,u)}:n}function kt(n){var t=U(arguments,1);return Qt(function(){n.apply(e,t)},1)}function xt(n){return n}function Ot(n){ct(W(n),function(t){var e=a[t]=n[t];a.prototype[t]=function(){var n=this.__wrapped__,t=[n];return Ht.apply(t,arguments),t=e.apply(a,t),n&&typeof n=="object"&&n==t?this:new L(t)}})}function Et(){return this.__wrapped__}r=r?$.defaults(n.Object(),r,$.pick(n,b)):n;var St=r.Array,At=r.Boolean,Pt=r.Date,It=r.Function,Nt=r.Math,$t=r.Number,Bt=r.Object,Ft=r.RegExp,qt=r.String,Rt=St(),Tt=Bt(),Dt=r._,zt=Ft("^"+(Tt.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Kt=Nt.ceil,Lt=r.clearTimeout,Mt=Rt.concat,Ut=Nt.floor,Vt=zt.test(Vt=Bt.getPrototypeOf)&&Vt,Gt=Tt.hasOwnProperty,Ht=Rt.push,Jt=r.setImmediate,Qt=r.setTimeout,Wt=Tt.toString,Xt=zt.test(Xt=U.bind)&&Xt,Yt=zt.test(Yt=St.isArray)&&Yt,Zt=r.isFinite,ne=r.isNaN,te=zt.test(te=Bt.keys)&&te,ee=Nt.max,re=Nt.min,ue=r.parseInt,ae=Nt.random,oe=zt.test(r.attachEvent),ie=!/\n{2,}/.test(It()),fe=Xt&&!/\n|true/.test(Xt+oe),ce={};
|
||||
ce[j]=St,ce[C]=At,ce[k]=Pt,ce[E]=Bt,ce[O]=$t,ce[S]=Ft,ce[A]=qt;var le=a.support={};(function(){var n=function(){this.x=1},t={0:1,length:1},e=[];n.prototype={valueOf:1,y:1};for(var r in new n)e.push(r);for(r in arguments);le.argsObject=arguments.constructor==Bt,le.argsClass=G(arguments),le.enumPrototypes=n.propertyIsEnumerable("prototype"),le.fastBind=Xt&&!fe,le.fastKeys=te&&(oe||fe||!ie),le.ownLast="x"!=e[0],le.nonEnumArgs=0!=r,le.nonEnumShadows=!/valueOf/.test(e),le.spliceObjects=(Rt.splice.call(t,0,1),!t[0]),le.unindexedChars="xx"!="x"[0]+Bt("x")[0];
|
||||
try{le.nodeClass=!(Wt.call(document)==E&&!({toString:0}+""))}catch(u){le.nodeClass=!0}})(1),a.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:y,variable:"",imports:{_:a}};var pe={a:"q,w,g",g:"var a=arguments,b=0,c=typeof g=='number'?2:a.length;while(++b<c){m=a[b];if(m&&r[typeof m]){",e:"if(typeof u[i]=='undefined')u[i]=m[i]",c:"}}"},se={a:"e,d,x",g:"d=d&&typeof x=='undefined'?d:o['createCallback'](d,x)",b:"typeof n=='number'",e:"if(d(m[i],i,e)===false)return u"},ve={g:"if(!r[typeof m])return u;"+se.g,b:!1},ge=T(se);
|
||||
L.prototype=a.prototype,le.argsClass||(G=function(n){return n?Gt.call(n,"callee"):!1});var ye=T(se,ve,{h:!1}),he=T(se,ve),me=Yt||function(n){return le.argsObject&&n instanceof St||Wt.call(n)==j},de=te?function(n){return nt(n)?le.enumPrototypes&&typeof n=="function"||le.nonEnumArgs&&n.length&&G(n)?J(n):te(n):[]}:J,be={"&":"&","<":"<",">":">",'"':""","'":"'"},_e=X(be),we=T(pe,{g:pe.g.replace(";",";if(c>3&&typeof a[c-2]=='function'){var d=o.createCallback(a[--c-1],a[c--],2);}else if(c>2&&typeof a[c-1]=='function'){d=a[--c];}"),e:"u[i]=d?d(u[i],m[i]):m[i]"}),je=T(pe);
|
||||
Z(/x/)&&(Z=function(n){return n instanceof It||Wt.call(n)==x});var Ce=Vt?function(n){if(!n||typeof n!="object")return!1;var t=n.valueOf,e=typeof t=="function"&&(e=Vt(t))&&Vt(e);return e?n==e||Vt(n)==e&&!G(n):H(n)}:H;fe&&u&&typeof Jt=="function"&&(kt=jt(Jt,r));var ke=8==ue("08")?ue:function(n,t){return ue(et(n)?n.replace(/^0+(?=.$)/,""):n,t||0)};return a.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},a.assign=we,a.at=function(n){var t=-1,e=Mt.apply(Rt,U(arguments,1)),r=e.length,u=St(r);
|
||||
for(le.unindexedChars&&et(n)&&(n=n.split(""));++t<r;)u[t]=n[e[t]];return u},a.bind=jt,a.bindAll=function(n){for(var t=Mt.apply(Rt,arguments),e=1<t.length?0:(t=W(n),-1),r=t.length;++e<r;){var u=t[e];n[u]=jt(n[u],n)}return n},a.bindKey=function(n,t){return R(n,t,U(arguments,2))},a.compact=function(n){for(var t=-1,e=n?n.length:0,r=[];++t<e;){var u=n[t];u&&r.push(u)}return r},a.compose=function(){var n=arguments;return function(){for(var t=arguments,e=n.length;e--;)t=[n[e].apply(this,t)];return t[0]}
|
||||
},a.countBy=function(n,t,e){var r={};return t=a.createCallback(t,e),ct(n,function(n,e,u){e=t(n,e,u)+"",Gt.call(r,e)?r[e]++:r[e]=1}),r},a.createCallback=Ct,a.debounce=function(n,t,e){function r(){i=null,e||(a=n.apply(o,u))}var u,a,o,i;return function(){var f=e&&!i;return u=arguments,o=this,Lt(i),i=Qt(r,t),f&&(a=n.apply(o,u)),a}},a.defaults=je,a.defer=kt,a.delay=function(n,t){var r=U(arguments,2);return Qt(function(){n.apply(e,r)},t)},a.difference=function(n){for(var t=-1,e=n?n.length:0,r=Mt.apply(Rt,arguments),r=B(r,e),u=[];++t<e;){var a=n[t];
|
||||
r(a)||u.push(a)}return u},a.filter=it,a.flatten=ht,a.forEach=ct,a.forIn=ye,a.forOwn=he,a.functions=W,a.groupBy=function(n,t,e){var r={};return t=a.createCallback(t,e),ct(n,function(n,e,u){e=t(n,e,u)+"",(Gt.call(r,e)?r[e]:r[e]=[]).push(n)}),r},a.initial=function(n,t,e){if(!n)return[];var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;for(t=a.createCallback(t,e);o--&&t(n[o],o,n);)r++}else r=null==t||e?1:t||r;return U(n,0,re(ee(0,u-r),u))},a.intersection=function(n){var t=arguments,e=t.length,r={0:{}},u=-1,a=n?n.length:0,o=100<=a,i=[],f=i;
|
||||
n:for(;++u<a;){var c=n[u];if(o)var l=c+"",l=Gt.call(r[0],l)?!(f=r[0][l]):f=r[0][l]=[];if(l||0>mt(f,c)){o&&f.push(c);for(var p=e;--p;)if(!(r[p]||(r[p]=B(t[p],0,100)))(c))continue n;i.push(c)}}return i},a.invert=X,a.invoke=function(n,t){var e=U(arguments,2),r=-1,u=typeof t=="function",a=n?n.length:0,o=St(typeof a=="number"?a:0);return ct(n,function(n){o[++r]=(u?t:n[t]).apply(n,e)}),o},a.keys=de,a.map=lt,a.max=pt,a.memoize=function(n,t){var e={};return function(){var r=(t?t.apply(this,arguments):arguments[0])+"";
|
||||
return Gt.call(e,r)?e[r]:e[r]=n.apply(this,arguments)}},a.merge=rt,a.min=function(n,t,e){var r=1/0,u=r;if(!t&&me(n)){e=-1;for(var o=n.length;++e<o;){var i=n[e];i<u&&(u=i)}}else t=!t&&et(n)?F:a.createCallback(t,e),ge(n,function(n,e,a){e=t(n,e,a),e<r&&(r=e,u=n)});return u},a.omit=function(n,t,e){var r=typeof t=="function",u={};if(r)t=a.createCallback(t,e);else var o=Mt.apply(Rt,arguments);return ye(n,function(n,e,a){(r?!t(n,e,a):0>mt(o,e,1))&&(u[e]=n)}),u},a.once=function(n){var t,e;return function(){return t?e:(t=!0,e=n.apply(this,arguments),n=null,e)
|
||||
}},a.pairs=function(n){for(var t=-1,e=de(n),r=e.length,u=St(r);++t<r;){var a=e[t];u[t]=[a,n[a]]}return u},a.partial=function(n){return R(n,U(arguments,1))},a.partialRight=function(n){return R(n,U(arguments,1),null,i)},a.pick=function(n,t,e){var r={};if(typeof t!="function")for(var u=0,o=Mt.apply(Rt,arguments),i=nt(n)?o.length:0;++u<i;){var f=o[u];f in n&&(r[f]=n[f])}else t=a.createCallback(t,e),ye(n,function(n,e,u){t(n,e,u)&&(r[e]=n)});return r},a.pluck=lt,a.range=function(n,t,e){n=+n||0,e=+e||1,null==t&&(t=n,n=0);
|
||||
var r=-1;t=ee(0,Kt((t-n)/e));for(var u=St(t);++r<t;)u[r]=n,n+=e;return u},a.reject=function(n,t,e){return t=a.createCallback(t,e),it(n,function(n,e,r){return!t(n,e,r)})},a.rest=dt,a.shuffle=function(n){var t=-1,e=n?n.length:0,r=St(typeof e=="number"?e:0);return ct(n,function(n){var e=Ut(ae()*(++t+1));r[t]=r[e],r[e]=n}),r},a.sortBy=function(n,t,e){var r=-1,u=n?n.length:0,o=St(typeof u=="number"?u:0);for(t=a.createCallback(t,e),ct(n,function(n,e,u){o[++r]={a:t(n,e,u),b:r,c:n}}),u=o.length,o.sort(q);u--;)o[u]=o[u].c;
|
||||
return o},a.tap=function(n,t){return t(n),n},a.throttle=function(n,t){function e(){i=new Pt,o=null,u=n.apply(a,r)}var r,u,a,o,i=0;return function(){var f=new Pt,c=t-(f-i);return r=arguments,a=this,0<c?o||(o=Qt(e,c)):(Lt(o),o=null,i=f,u=n.apply(a,r)),u}},a.times=function(n,t,e){n=-1<(n=+n)?n:0;var r=-1,u=St(n);for(t=Ct(t,e,1);++r<n;)u[r]=t(r);return u},a.toArray=function(n){return n&&typeof n.length=="number"?le.unindexedChars&&et(n)?n.split(""):U(n):ut(n)},a.union=function(){return _t(Mt.apply(Rt,arguments))
|
||||
},a.uniq=_t,a.values=ut,a.where=it,a.without=function(n){for(var t=-1,e=n?n.length:0,r=B(arguments,1),u=[];++t<e;){var a=n[t];r(a)||u.push(a)}return u},a.wrap=function(n,t){return function(){var e=[n];return Ht.apply(e,arguments),t.apply(this,e)}},a.zip=function(n){for(var t=-1,e=n?pt(lt(arguments,"length")):0,r=St(e);++t<e;)r[t]=lt(arguments,t);return r},a.zipObject=wt,a.collect=lt,a.drop=dt,a.each=ct,a.extend=we,a.methods=W,a.object=wt,a.select=it,a.tail=dt,a.unique=_t,Ot(a),a.clone=Q,a.cloneDeep=function(n,t,e){return Q(n,!0,t,e)
|
||||
},a.contains=at,a.escape=function(n){return null==n?"":(n+"").replace(m,z)},a.every=ot,a.find=ft,a.has=function(n,t){return n?Gt.call(n,t):!1},a.identity=xt,a.indexOf=mt,a.isArguments=G,a.isArray=me,a.isBoolean=function(n){return!0===n||!1===n||Wt.call(n)==C},a.isDate=function(n){return n instanceof Pt||Wt.call(n)==k},a.isElement=function(n){return n?1===n.nodeType:!1},a.isEmpty=function(n){var t=!0;if(!n)return t;var e=Wt.call(n),r=n.length;return e==j||e==A||(le.argsClass?e==w:G(n))||e==E&&typeof r=="number"&&Z(n.splice)?!r:(he(n,function(){return t=!1
|
||||
}),t)},a.isEqual=Y,a.isFinite=function(n){return Zt(n)&&!ne(parseFloat(n))},a.isFunction=Z,a.isNaN=function(n){return tt(n)&&n!=+n},a.isNull=function(n){return null===n},a.isNumber=tt,a.isObject=nt,a.isPlainObject=Ce,a.isRegExp=function(n){return n instanceof Ft||Wt.call(n)==S},a.isString=et,a.isUndefined=function(n){return typeof n=="undefined"},a.lastIndexOf=function(n,t,e){var r=n?n.length:0;for(typeof e=="number"&&(r=(0>e?ee(0,r+e):re(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},a.mixin=Ot,a.noConflict=function(){return r._=Dt,this
|
||||
},a.parseInt=ke,a.random=function(n,t){return null==n&&null==t&&(t=1),n=+n||0,null==t&&(t=n,n=0),n+Ut(ae()*((+t||0)-n+1))},a.reduce=st,a.reduceRight=vt,a.result=function(n,t){var r=n?n[t]:e;return Z(r)?n[t]():r},a.runInContext=t,a.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:de(n).length},a.some=gt,a.sortedIndex=bt,a.template=function(n,t,r){var u=a.templateSettings;n||(n=""),r=je({},r,u);var o,i=je({},r.imports,u.imports),u=de(i),i=ut(i),f=0,c=r.interpolate||h,v="__p+='",c=Ft((r.escape||h).source+"|"+c.source+"|"+(c===y?g:h).source+"|"+(r.evaluate||h).source+"|$","g");
|
||||
n.replace(c,function(t,e,r,u,a,i){return r||(r=u),v+=n.slice(f,i).replace(d,D),e&&(v+="'+__e("+e+")+'"),a&&(o=!0,v+="';"+a+";__p+='"),r&&(v+="'+((__t=("+r+"))==null?'':__t)+'"),f=i+t.length,t}),v+="';\n",c=r=r.variable,c||(r="obj",v="with("+r+"){"+v+"}"),v=(o?v.replace(l,""):v).replace(p,"$1").replace(s,"$1;"),v="function("+r+"){"+(c?"":r+"||("+r+"={});")+"var __t,__p='',__e=_.escape"+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+v+"return __p}";try{var m=It(u,"return "+v).apply(e,i)
|
||||
}catch(b){throw b.source=v,b}return t?m(t):(m.source=v,m)},a.unescape=function(n){return null==n?"":(n+"").replace(c,V)},a.uniqueId=function(n){var t=++o;return(null==n?"":n+"")+t},a.all=ot,a.any=gt,a.detect=ft,a.foldl=st,a.foldr=vt,a.include=at,a.inject=st,he(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(){var t=[this.__wrapped__];return Ht.apply(t,arguments),n.apply(a,t)})}),a.first=yt,a.last=function(n,t,e){if(n){var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;for(t=a.createCallback(t,e);o--&&t(n[o],o,n);)r++
|
||||
}else if(r=t,null==r||e)return n[u-1];return U(n,ee(0,u-r))}},a.take=yt,a.head=yt,he(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(t,e){var r=n(this.__wrapped__,t,e);return null==t||e&&typeof t!="function"?r:new L(r)})}),a.VERSION="1.0.1",a.prototype.toString=function(){return this.__wrapped__+""},a.prototype.value=Et,a.prototype.valueOf=Et,ge(["join","pop","shift"],function(n){var t=Rt[n];a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)}}),ge(["push","reverse","sort","unshift"],function(n){var t=Rt[n];
|
||||
a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),ge(["concat","slice","splice"],function(n){var t=Rt[n];a.prototype[n]=function(){return new L(t.apply(this.__wrapped__,arguments))}}),le.spliceObjects||ge(["pop","shift","splice"],function(n){var t=Rt[n],e="splice"==n;a.prototype[n]=function(){var n=this.__wrapped__,r=t.apply(n,arguments);return 0===n.length&&delete n[0],e?new L(r):r}}),a}var e,r=typeof exports=="object"&&exports,u=typeof module=="object"&&module&&module.exports==r&&module,a=typeof global=="object"&&global;
|
||||
a.global===a&&(n=a);var o=0,i={},f=30,c=/&(?:amp|lt|gt|quot|#39);/g,l=/\b__p\+='';/g,p=/\b(__p\+=)''\+/g,s=/(__e\(.*?\)|\b__t\))\+'';/g,v=/\w*$/,g=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,y=/<%=([\s\S]+?)%>/g,h=/($^)/,m=/[&<>"']/g,d=/['\n\r\t\u2028\u2029\\]/g,b="Array Boolean Date Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),_="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),w="[object Arguments]",j="[object Array]",C="[object Boolean]",k="[object Date]",x="[object Function]",O="[object Number]",E="[object Object]",S="[object RegExp]",A="[object String]",P={};
|
||||
P[x]=!1,P[w]=P[j]=P[C]=P[k]=P[O]=P[E]=P[S]=P[A]=!0;var I={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},N={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},$=t();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=$,define(function(){return $})):r&&!r.nodeType?u?(u.exports=$)._=$:r._=$:n._=$})(this);
|
||||
;(function(n){function t(r){function a(n){return n&&typeof n=="object"&&Vt.call(n,"__wrapped__")?n:new L(n)}function B(n,t,e){t||(t=0);var r=n.length,u=r-t>=(e||f);if(u){var a={};for(e=t-1;++e<r;){var o=n[e]+"";(Vt.call(a,o)?a[o]:a[o]=[]).push(n[e])}}return function(e){if(u){var r=e+"";return Vt.call(a,r)&&-1<mt(a[r],e)}return-1<mt(n,e,t)}}function F(n){return n.charCodeAt(0)}function q(n,t){var e=n.b,r=t.b;if(n=n.a,t=t.a,n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1
|
||||
}return e<r?-1:1}function R(n,t,e,r){function u(){var f=arguments,c=o?this:t;return a||(n=t[i]),e.length&&(f=f.length?(f=U(f),r?f.concat(e):e.concat(f)):e),this instanceof u?(M.prototype=n.prototype,c=new M,M.prototype=null,f=n.apply(c,f),nt(f)?f:c):n.apply(c,f)}var a=Z(n),o=!e,i=t;return o&&(e=t),a||(t=n),u}function T(){for(var n,t={f:_,b:"k(m)",c:"",e:"",g:"",h:!0},e=0;n=arguments[e];e++)for(var r in n)t[r]=n[r];if(n=t.a,t.d=/^[^,]+/.exec(n)[0],e=Pt,r="var i,m="+t.d+",u=m;if(!m)return u;"+t.g+";",t.b?(r+="var n=m.length;i=-1;if("+t.b+"){",ce.unindexedChars&&(r+="if(l(m)){m=m.split('')}"),r+="while(++i<n){"+t.e+"}}else{"):ce.nonEnumArgs&&(r+="var n=m.length;i=-1;if(n&&j(m)){while(++i<n){i+='';"+t.e+"}}else{"),ce.enumPrototypes&&(r+="var v=typeof m=='function';"),ce.fastKeys&&t.h?(r+="var s=-1,t=r[typeof m]?p(m):[],n=t.length;while(++s<n){i=t[s];",ce.enumPrototypes&&(r+="if(!(v&&i=='prototype')){"),r+=t.e,ce.enumPrototypes&&(r+="}")):(r+="for(i in m){",(ce.enumPrototypes||t.h)&&(r+="if(",ce.enumPrototypes&&(r+="!(v&&i=='prototype')"),ce.enumPrototypes&&t.h&&(r+="&&"),t.h&&(r+="h.call(m,i)"),r+="){"),r+=t.e+";",(ce.enumPrototypes||t.h)&&(r+="}")),r+="}",ce.nonEnumShadows){r+="var f=m.constructor;";
|
||||
for(var u=0;7>u;u++)r+="i='"+t.f[u]+"';if(","constructor"==t.f[u]&&(r+="!(f&&f.prototype===m)&&"),r+="h.call(m,i)){"+t.e+"}"}return(t.b||ce.nonEnumArgs)&&(r+="}"),r+=t.c+";return u",e("h,j,k,l,o,r,p","return function("+n+"){"+r+"}")(Vt,G,ve,et,a,I,ne)}function D(n){return"\\"+N[n]}function z(n){return ye[n]}function K(n){return typeof n.toString!="function"&&typeof(n+"")=="string"}function L(n){this.__wrapped__=n}function M(){}function U(n,t,e){t||(t=0),typeof e=="undefined"&&(e=n?n.length:0);var r=-1;
|
||||
e=e-t||0;for(var u=Et(0>e?0:e);++r<e;)u[r]=n[t+r];return u}function V(n){return he[n]}function G(n){return Qt.call(n)==w}function H(n){var t=!1;if(!n||typeof n!="object"||G(n))return t;var e=n.constructor;return!Z(e)&&(ce.nodeClass||!K(n))||e instanceof e?ce.ownLast?(pe(n,function(n,e,r){return t=Vt.call(r,e),!1}),!0===t):(pe(n,function(n,e){t=e}),!1===t||Vt.call(n,t)):t}function J(n){var t=[];return se(n,function(n,e){t.push(e)}),t}function Q(n,t,r,u,o,i){var f=n;if(typeof t=="function"&&(u=r,r=t,t=!1),typeof r=="function"){if(r=typeof u=="undefined"?r:a.createCallback(r,u,1),f=r(f),typeof f!="undefined")return f;
|
||||
f=n}if(u=nt(f)){var c=Qt.call(f);if(!P[c]||!ce.nodeClass&&K(f))return f;var l=ve(f)}if(!u||!t)return u?l?U(f):me({},f):f;switch(u=fe[c],c){case j:case k:return new u(+f);case O:case A:return new u(f);case S:return u(f.source,v.exec(f))}for(o||(o=[]),i||(i=[]),c=o.length;c--;)if(o[c]==n)return i[c];return f=l?u(f.length):{},l&&(Vt.call(n,"index")&&(f.index=n.index),Vt.call(n,"input")&&(f.input=n.input)),o.push(n),i.push(f),(l?ct:se)(n,function(n,u){f[u]=Q(n,t,r,e,o,i)}),f}function W(n){var t=[];return pe(n,function(n,e){Z(n)&&t.push(e)
|
||||
}),t.sort()}function X(n){for(var t=-1,e=ge(n),r=e.length,u={};++t<r;){var a=e[t];u[n[a]]=a}return u}function Y(n,t,e,r,u,o){var f=e===i;if(e&&!f){e=typeof r=="undefined"?e:a.createCallback(e,r,2);var c=e(n,t);if(typeof c!="undefined")return!!c}if(n===t)return 0!==n||1/n==1/t;var l=typeof n,p=typeof t;if(n===n&&(!n||"function"!=l&&"object"!=l)&&(!t||"function"!=p&&"object"!=p))return!1;if(null==n||null==t)return n===t;if(p=Qt.call(n),l=Qt.call(t),p==w&&(p=E),l==w&&(l=E),p!=l)return!1;switch(p){case j:case k:return+n==+t;
|
||||
case O:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case S:case A:return n==t+""}if(l=p==C,!l){if(Vt.call(n,"__wrapped__")||Vt.call(t,"__wrapped__"))return Y(n.__wrapped__||n,t.__wrapped__||t,e,r,u,o);if(p!=E||!ce.nodeClass&&(K(n)||K(t)))return!1;var p=!ce.argsObject&&G(n)?$t:n.constructor,s=!ce.argsObject&&G(t)?$t:t.constructor;if(p!=s&&(!Z(p)||!(p instanceof p&&Z(s)&&s instanceof s)))return!1}for(u||(u=[]),o||(o=[]),p=u.length;p--;)if(u[p]==n)return o[p]==t;var v=0,c=!0;if(u.push(n),o.push(t),l){if(p=n.length,v=t.length,c=v==n.length,!c&&!f)return c;
|
||||
for(;v--;)if(l=p,s=t[v],f)for(;l--&&!(c=Y(n[l],s,e,r,u,o)););else if(!(c=Y(n[v],s,e,r,u,o)))break;return c}return pe(t,function(t,a,i){return Vt.call(i,a)?(v++,c=Vt.call(n,a)&&Y(n[a],t,e,r,u,o)):void 0}),c&&!f&&pe(n,function(n,t,e){return Vt.call(e,t)?c=-1<--v:void 0}),c}function Z(n){return typeof n=="function"}function nt(n){return n?I[typeof n]:!1}function tt(n){return typeof n=="number"||Qt.call(n)==O}function et(n){return typeof n=="string"||Qt.call(n)==A}function rt(n,t,e){var r=arguments,u=0,o=2;
|
||||
if(!nt(n))return n;if(e===i)var f=r[3],c=r[4],l=r[5];else c=[],l=[],typeof e!="number"&&(o=r.length),3<o&&"function"==typeof r[o-2]?f=a.createCallback(r[--o-1],r[o--],2):2<o&&"function"==typeof r[o-1]&&(f=r[--o]);for(;++u<o;)(ve(r[u])?ct:se)(r[u],function(t,e){var r,u,a=t,o=n[e];if(t&&((u=ve(t))||be(t))){for(a=c.length;a--;)if(r=c[a]==t){o=l[a];break}r||(o=u?ve(o)?o:[]:be(o)?o:{},f&&(a=f(o,t),typeof a!="undefined"&&(o=a)),c.push(t),l.push(o),f||(o=rt(o,t,i,f,c,l)))}else f&&(a=f(o,t),typeof a=="undefined"&&(a=t)),typeof a!="undefined"&&(o=a);
|
||||
n[e]=o});return n}function ut(n){for(var t=-1,e=ge(n),r=e.length,u=Et(r);++t<r;)u[t]=n[e[t]];return u}function at(n,t,e){var r=-1,u=n?n.length:0,a=!1;return e=(0>e?te(0,u+e):e)||0,typeof u=="number"?a=-1<(et(n)?n.indexOf(t,e):mt(n,t,e)):le(n,function(n){return++r<e?void 0:!(a=n===t)}),a}function ot(n,t,e){var r=!0;if(t=a.createCallback(t,e),ve(n)){e=-1;for(var u=n.length;++e<u&&(r=!!t(n[e],e,n)););}else le(n,function(n,e,u){return r=!!t(n,e,u)});return r}function it(n,t,e){var r=[];if(t=a.createCallback(t,e),ve(n)){e=-1;
|
||||
for(var u=n.length;++e<u;){var o=n[e];t(o,e,n)&&r.push(o)}}else le(n,function(n,e,u){t(n,e,u)&&r.push(n)});return r}function ft(n,t,e){var r;return t=a.createCallback(t,e),ct(n,function(n,e,u){return t(n,e,u)?(r=n,!1):void 0}),r}function ct(n,t,e){if(t&&typeof e=="undefined"&&ve(n)){e=-1;for(var r=n.length;++e<r&&!1!==t(n[e],e,n););}else le(n,t,e);return n}function lt(n,t,e){var r=-1,u=n?n.length:0,o=Et(typeof u=="number"?u:0);if(t=a.createCallback(t,e),ve(n))for(;++r<u;)o[r]=t(n[r],r,n);else le(n,function(n,e,u){o[++r]=t(n,e,u)
|
||||
});return o}function pt(n,t,e){var r=-1/0,u=r;if(!t&&ve(n)){e=-1;for(var o=n.length;++e<o;){var i=n[e];i>u&&(u=i)}}else t=!t&&et(n)?F:a.createCallback(t,e),le(n,function(n,e,a){e=t(n,e,a),e>r&&(r=e,u=n)});return u}function st(n,t,e,r){var u=3>arguments.length;if(t=a.createCallback(t,r,4),ve(n)){var o=-1,i=n.length;for(u&&(e=n[++o]);++o<i;)e=t(e,n[o],o,n)}else le(n,function(n,r,a){e=u?(u=!1,n):t(e,n,r,a)});return e}function vt(n,t,e,r){var u=n,o=n?n.length:0,i=3>arguments.length;if(typeof o!="number")var f=ge(n),o=f.length;
|
||||
else ce.unindexedChars&&et(n)&&(u=n.split(""));return t=a.createCallback(t,r,4),ct(n,function(n,r,a){r=f?f[--o]:--o,e=i?(i=!1,u[r]):t(e,u[r],r,a)}),e}function gt(n,t,e){var r;if(t=a.createCallback(t,e),ve(n)){e=-1;for(var u=n.length;++e<u&&!(r=t(n[e],e,n)););}else le(n,function(n,e,u){return!(r=t(n,e,u))});return!!r}function yt(n,t,e){if(n){var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=-1;for(t=a.createCallback(t,e);++o<u&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n[0];return U(n,0,ee(te(0,r),u))
|
||||
}}function ht(n,t,e,r){var u=-1,o=n?n.length:0,i=[];for(typeof t!="boolean"&&null!=t&&(r=e,e=t,t=!1),null!=e&&(e=a.createCallback(e,r));++u<o;)r=n[u],e&&(r=e(r,u,n)),ve(r)?Gt.apply(i,t?r:ht(r)):i.push(r);return i}function mt(n,t,e){var r=-1,u=n?n.length:0;if(typeof e=="number")r=(0>e?te(0,u+e):e||0)-1;else if(e)return r=bt(n,t),n[r]===t?r:-1;for(;++r<u;)if(n[r]===t)return r;return-1}function dt(n,t,e){if(typeof t!="number"&&null!=t){var r=0,u=-1,o=n?n.length:0;for(t=a.createCallback(t,e);++u<o&&t(n[u],u,n);)r++
|
||||
}else r=null==t||e?1:te(0,t);return U(n,r)}function bt(n,t,e,r){var u=0,o=n?n.length:u;for(e=e?a.createCallback(e,r,1):kt,t=e(t);u<o;)r=u+o>>>1,e(n[r])<t?u=r+1:o=r;return u}function _t(n,t,e,r){var u=-1,o=n?n.length:0,i=[],f=i;typeof t!="boolean"&&null!=t&&(r=e,e=t,t=!1);var c=!t&&75<=o;if(c)var l={};for(null!=e&&(f=[],e=a.createCallback(e,r));++u<o;){r=n[u];var p=e?e(r,u,n):r;if(c)var s=p+"",s=Vt.call(l,s)?!(f=l[s]):f=l[s]=[];(t?!u||f[f.length-1]!==p:s||0>mt(f,p))&&((e||c)&&f.push(p),i.push(r))}return i
|
||||
}function wt(n,t){for(var e=-1,r=n?n.length:0,u={};++e<r;){var a=n[e];t?u[a]=t[e]:u[a[0]]=a[1]}return u}function Ct(n,t){return ce.fastBind||Wt&&2<arguments.length?Wt.call.apply(Wt,arguments):R(n,t,U(arguments,2))}function jt(n){var t=U(arguments,1);return Jt(function(){n.apply(e,t)},1)}function kt(n){return n}function xt(n){ct(W(n),function(t){var e=a[t]=n[t];a.prototype[t]=function(){var n=this.__wrapped__,t=[n];return Gt.apply(t,arguments),t=e.apply(a,t),n&&typeof n=="object"&&n==t?this:new L(t)
|
||||
}})}function Ot(){return this.__wrapped__}r=r?$.defaults(n.Object(),r,$.pick(n,b)):n;var Et=r.Array,St=r.Boolean,At=r.Date,Pt=r.Function,It=r.Math,Nt=r.Number,$t=r.Object,Bt=r.RegExp,Ft=r.String,qt=Et(),Rt=$t(),Tt=r._,Dt=Bt("^"+(Rt.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),zt=It.ceil,Kt=r.clearTimeout,Lt=qt.concat,Mt=It.floor,Ut=Dt.test(Ut=$t.getPrototypeOf)&&Ut,Vt=Rt.hasOwnProperty,Gt=qt.push,Ht=r.setImmediate,Jt=r.setTimeout,Qt=Rt.toString,Wt=Dt.test(Wt=U.bind)&&Wt,Xt=Dt.test(Xt=Et.isArray)&&Xt,Yt=r.isFinite,Zt=r.isNaN,ne=Dt.test(ne=$t.keys)&&ne,te=It.max,ee=It.min,re=r.parseInt,ue=It.random,ae=Dt.test(r.attachEvent),oe=!/\n{2,}/.test(Pt()),ie=Wt&&!/\n|true/.test(Wt+ae),fe={};
|
||||
fe[C]=Et,fe[j]=St,fe[k]=At,fe[E]=$t,fe[O]=Nt,fe[S]=Bt,fe[A]=Ft;var ce=a.support={};(function(){var n=function(){this.x=1},t={0:1,length:1},e=[];n.prototype={valueOf:1,y:1};for(var r in new n)e.push(r);for(r in arguments);ce.argsObject=arguments.constructor==$t,ce.argsClass=G(arguments),ce.enumPrototypes=n.propertyIsEnumerable("prototype"),ce.fastBind=Wt&&!ie,ce.fastKeys=ne&&(ae||ie||!oe),ce.ownLast="x"!=e[0],ce.nonEnumArgs=0!=r,ce.nonEnumShadows=!/valueOf/.test(e),ce.spliceObjects=(qt.splice.call(t,0,1),!t[0]),ce.unindexedChars="xx"!="x"[0]+$t("x")[0];
|
||||
try{ce.nodeClass=!(Qt.call(document)==E&&!({toString:0}+""))}catch(u){ce.nodeClass=!0}})(1),a.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:y,variable:"",imports:{_:a}};var St={a:"q,w,g",g:"var a=arguments,b=0,c=typeof g=='number'?2:a.length;while(++b<c){m=a[b];if(m&&r[typeof m]){",e:"if(typeof u[i]=='undefined')u[i]=m[i]",c:"}}"},It={a:"e,d,x",g:"d=d&&typeof x=='undefined'?d:o['createCallback'](d,x)",b:"typeof n=='number'",e:"if(d(m[i],i,e)===false)return u"},Nt={g:"if(!r[typeof m])return u;"+It.g,b:!1},le=T(It);
|
||||
L.prototype=a.prototype,ce.argsClass||(G=function(n){return n?Vt.call(n,"callee"):!1});var pe=T(It,Nt,{h:!1}),se=T(It,Nt),ve=Xt||function(n){return ce.argsObject&&n instanceof Et||Qt.call(n)==C},ge=ne?function(n){return nt(n)?ce.enumPrototypes&&typeof n=="function"||ce.nonEnumArgs&&n.length&&G(n)?J(n):ne(n):[]}:J,ye={"&":"&","<":"<",">":">",'"':""","'":"'"},he=X(ye),me=T(St,{g:St.g.replace(";",";if(c>3&&typeof a[c-2]=='function'){var d=o.createCallback(a[--c-1],a[c--],2);}else if(c>2&&typeof a[c-1]=='function'){d=a[--c];}"),e:"u[i]=d?d(u[i],m[i]):m[i]"}),de=T(St);
|
||||
Z(/x/)&&(Z=function(n){return n instanceof Pt||Qt.call(n)==x});var be=Ut?function(n){if(!n||typeof n!="object")return!1;var t=n.valueOf,e=typeof t=="function"&&(e=Ut(t))&&Ut(e);return e?n==e||Ut(n)==e&&!G(n):H(n)}:H;return ie&&u&&typeof Ht=="function"&&(jt=Ct(Ht,r)),Ht=8==re("08")?re:function(n,t){return re(et(n)?n.replace(/^0+(?=.$)/,""):n,t||0)},a.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},a.assign=me,a.at=function(n){var t=-1,e=Lt.apply(qt,U(arguments,1)),r=e.length,u=Et(r);
|
||||
for(ce.unindexedChars&&et(n)&&(n=n.split(""));++t<r;)u[t]=n[e[t]];return u},a.bind=Ct,a.bindAll=function(n){for(var t=Lt.apply(qt,arguments),e=1<t.length?0:(t=W(n),-1),r=t.length;++e<r;){var u=t[e];n[u]=Ct(n[u],n)}return n},a.bindKey=function(n,t){return R(n,t,U(arguments,2))},a.compact=function(n){for(var t=-1,e=n?n.length:0,r=[];++t<e;){var u=n[t];u&&r.push(u)}return r},a.compose=function(){var n=arguments;return function(){for(var t=arguments,e=n.length;e--;)t=[n[e].apply(this,t)];return t[0]}
|
||||
},a.countBy=function(n,t,e){var r={};return t=a.createCallback(t,e),ct(n,function(n,e,u){e=t(n,e,u)+"",Vt.call(r,e)?r[e]++:r[e]=1}),r},a.createCallback=function(n,t,e){if(null==n)return kt;var r=typeof n;if("function"!=r){if("object"!=r)return function(t){return t[n]};var u=ge(n);return function(t){for(var e=u.length,r=!1;e--&&(r=Y(t[u[e]],n[u[e]],i)););return r}}return typeof t!="undefined"?1===e?function(e){return n.call(t,e)}:2===e?function(e,r){return n.call(t,e,r)}:4===e?function(e,r,u,a){return n.call(t,e,r,u,a)
|
||||
}:function(e,r,u){return n.call(t,e,r,u)}:n},a.debounce=function(n,t,e){function r(){i=null,e||(a=n.apply(o,u))}var u,a,o,i;return function(){var f=e&&!i;return u=arguments,o=this,Kt(i),i=Jt(r,t),f&&(a=n.apply(o,u)),a}},a.defaults=de,a.defer=jt,a.delay=function(n,t){var r=U(arguments,2);return Jt(function(){n.apply(e,r)},t)},a.difference=function(n){for(var t=-1,e=n?n.length:0,r=Lt.apply(qt,arguments),r=B(r,e),u=[];++t<e;){var a=n[t];r(a)||u.push(a)}return u},a.filter=it,a.flatten=ht,a.forEach=ct,a.forIn=pe,a.forOwn=se,a.functions=W,a.groupBy=function(n,t,e){var r={};
|
||||
return t=a.createCallback(t,e),ct(n,function(n,e,u){e=t(n,e,u)+"",(Vt.call(r,e)?r[e]:r[e]=[]).push(n)}),r},a.initial=function(n,t,e){if(!n)return[];var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;for(t=a.createCallback(t,e);o--&&t(n[o],o,n);)r++}else r=null==t||e?1:t||r;return U(n,0,ee(te(0,u-r),u))},a.intersection=function(n){var t=arguments,e=t.length,r={0:{}},u=-1,a=n?n.length:0,o=100<=a,i=[],f=i;n:for(;++u<a;){var c=n[u];if(o)var l=c+"",l=Vt.call(r[0],l)?!(f=r[0][l]):f=r[0][l]=[];if(l||0>mt(f,c)){o&&f.push(c);
|
||||
for(var p=e;--p;)if(!(r[p]||(r[p]=B(t[p],0,100)))(c))continue n;i.push(c)}}return i},a.invert=X,a.invoke=function(n,t){var e=U(arguments,2),r=-1,u=typeof t=="function",a=n?n.length:0,o=Et(typeof a=="number"?a:0);return ct(n,function(n){o[++r]=(u?t:n[t]).apply(n,e)}),o},a.keys=ge,a.map=lt,a.max=pt,a.memoize=function(n,t){var e={};return function(){var r=(t?t.apply(this,arguments):arguments[0])+"";return Vt.call(e,r)?e[r]:e[r]=n.apply(this,arguments)}},a.merge=rt,a.min=function(n,t,e){var r=1/0,u=r;
|
||||
if(!t&&ve(n)){e=-1;for(var o=n.length;++e<o;){var i=n[e];i<u&&(u=i)}}else t=!t&&et(n)?F:a.createCallback(t,e),le(n,function(n,e,a){e=t(n,e,a),e<r&&(r=e,u=n)});return u},a.omit=function(n,t,e){var r=typeof t=="function",u={};if(r)t=a.createCallback(t,e);else var o=Lt.apply(qt,arguments);return pe(n,function(n,e,a){(r?!t(n,e,a):0>mt(o,e,1))&&(u[e]=n)}),u},a.once=function(n){var t,e;return function(){return t?e:(t=!0,e=n.apply(this,arguments),n=null,e)}},a.pairs=function(n){for(var t=-1,e=ge(n),r=e.length,u=Et(r);++t<r;){var a=e[t];
|
||||
u[t]=[a,n[a]]}return u},a.partial=function(n){return R(n,U(arguments,1))},a.partialRight=function(n){return R(n,U(arguments,1),null,i)},a.pick=function(n,t,e){var r={};if(typeof t!="function")for(var u=0,o=Lt.apply(qt,arguments),i=nt(n)?o.length:0;++u<i;){var f=o[u];f in n&&(r[f]=n[f])}else t=a.createCallback(t,e),pe(n,function(n,e,u){t(n,e,u)&&(r[e]=n)});return r},a.pluck=lt,a.range=function(n,t,e){n=+n||0,e=+e||1,null==t&&(t=n,n=0);var r=-1;t=te(0,zt((t-n)/e));for(var u=Et(t);++r<t;)u[r]=n,n+=e;
|
||||
return u},a.reject=function(n,t,e){return t=a.createCallback(t,e),it(n,function(n,e,r){return!t(n,e,r)})},a.rest=dt,a.shuffle=function(n){var t=-1,e=n?n.length:0,r=Et(typeof e=="number"?e:0);return ct(n,function(n){var e=Mt(ue()*(++t+1));r[t]=r[e],r[e]=n}),r},a.sortBy=function(n,t,e){var r=-1,u=n?n.length:0,o=Et(typeof u=="number"?u:0);for(t=a.createCallback(t,e),ct(n,function(n,e,u){o[++r]={a:t(n,e,u),b:r,c:n}}),u=o.length,o.sort(q);u--;)o[u]=o[u].c;return o},a.tap=function(n,t){return t(n),n},a.throttle=function(n,t){function e(){i=new At,o=null,u=n.apply(a,r)
|
||||
}var r,u,a,o,i=0;return function(){var f=new At,c=t-(f-i);return r=arguments,a=this,0<c?o||(o=Jt(e,c)):(Kt(o),o=null,i=f,u=n.apply(a,r)),u}},a.times=function(n,t,e){n=-1<(n=+n)?n:0;var r=-1,u=Et(n);for(t=a.createCallback(t,e,1);++r<n;)u[r]=t(r);return u},a.toArray=function(n){return n&&typeof n.length=="number"?ce.unindexedChars&&et(n)?n.split(""):U(n):ut(n)},a.union=function(){return _t(Lt.apply(qt,arguments))},a.uniq=_t,a.values=ut,a.where=it,a.without=function(n){for(var t=-1,e=n?n.length:0,r=B(arguments,1),u=[];++t<e;){var a=n[t];
|
||||
r(a)||u.push(a)}return u},a.wrap=function(n,t){return function(){var e=[n];return Gt.apply(e,arguments),t.apply(this,e)}},a.zip=function(n){for(var t=-1,e=n?pt(lt(arguments,"length")):0,r=Et(e);++t<e;)r[t]=lt(arguments,t);return r},a.zipObject=wt,a.collect=lt,a.drop=dt,a.each=ct,a.extend=me,a.methods=W,a.object=wt,a.select=it,a.tail=dt,a.unique=_t,xt(a),a.clone=Q,a.cloneDeep=function(n,t,e){return Q(n,!0,t,e)},a.contains=at,a.escape=function(n){return null==n?"":(n+"").replace(m,z)},a.every=ot,a.find=ft,a.has=function(n,t){return n?Vt.call(n,t):!1
|
||||
},a.identity=kt,a.indexOf=mt,a.isArguments=G,a.isArray=ve,a.isBoolean=function(n){return!0===n||!1===n||Qt.call(n)==j},a.isDate=function(n){return n instanceof At||Qt.call(n)==k},a.isElement=function(n){return n?1===n.nodeType:!1},a.isEmpty=function(n){var t=!0;if(!n)return t;var e=Qt.call(n),r=n.length;return e==C||e==A||(ce.argsClass?e==w:G(n))||e==E&&typeof r=="number"&&Z(n.splice)?!r:(se(n,function(){return t=!1}),t)},a.isEqual=Y,a.isFinite=function(n){return Yt(n)&&!Zt(parseFloat(n))},a.isFunction=Z,a.isNaN=function(n){return tt(n)&&n!=+n
|
||||
},a.isNull=function(n){return null===n},a.isNumber=tt,a.isObject=nt,a.isPlainObject=be,a.isRegExp=function(n){return n instanceof Bt||Qt.call(n)==S},a.isString=et,a.isUndefined=function(n){return typeof n=="undefined"},a.lastIndexOf=function(n,t,e){var r=n?n.length:0;for(typeof e=="number"&&(r=(0>e?te(0,r+e):ee(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},a.mixin=xt,a.noConflict=function(){return r._=Tt,this},a.parseInt=Ht,a.random=function(n,t){return null==n&&null==t&&(t=1),n=+n||0,null==t&&(t=n,n=0),n+Mt(ue()*((+t||0)-n+1))
|
||||
},a.reduce=st,a.reduceRight=vt,a.result=function(n,t){var r=n?n[t]:e;return Z(r)?n[t]():r},a.runInContext=t,a.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:ge(n).length},a.some=gt,a.sortedIndex=bt,a.template=function(n,t,r){var u=a.templateSettings;n||(n=""),r=de({},r,u);var o,i=de({},r.imports,u.imports),u=ge(i),i=ut(i),f=0,c=r.interpolate||h,v="__p+='",c=Bt((r.escape||h).source+"|"+c.source+"|"+(c===y?g:h).source+"|"+(r.evaluate||h).source+"|$","g");n.replace(c,function(t,e,r,u,a,i){return r||(r=u),v+=n.slice(f,i).replace(d,D),e&&(v+="'+__e("+e+")+'"),a&&(o=!0,v+="';"+a+";__p+='"),r&&(v+="'+((__t=("+r+"))==null?'':__t)+'"),f=i+t.length,t
|
||||
}),v+="';\n",c=r=r.variable,c||(r="obj",v="with("+r+"){"+v+"}"),v=(o?v.replace(l,""):v).replace(p,"$1").replace(s,"$1;"),v="function("+r+"){"+(c?"":r+"||("+r+"={});")+"var __t,__p='',__e=_.escape"+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+v+"return __p}";try{var m=Pt(u,"return "+v).apply(e,i)}catch(b){throw b.source=v,b}return t?m(t):(m.source=v,m)},a.unescape=function(n){return null==n?"":(n+"").replace(c,V)},a.uniqueId=function(n){var t=++o;return(null==n?"":n+"")+t
|
||||
},a.all=ot,a.any=gt,a.detect=ft,a.foldl=st,a.foldr=vt,a.include=at,a.inject=st,se(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(){var t=[this.__wrapped__];return Gt.apply(t,arguments),n.apply(a,t)})}),a.first=yt,a.last=function(n,t,e){if(n){var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;for(t=a.createCallback(t,e);o--&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n[u-1];return U(n,te(0,u-r))}},a.take=yt,a.head=yt,se(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(t,e){var r=n(this.__wrapped__,t,e);
|
||||
return null==t||e&&typeof t!="function"?r:new L(r)})}),a.VERSION="1.0.1",a.prototype.toString=function(){return this.__wrapped__+""},a.prototype.value=Ot,a.prototype.valueOf=Ot,le(["join","pop","shift"],function(n){var t=qt[n];a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)}}),le(["push","reverse","sort","unshift"],function(n){var t=qt[n];a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),le(["concat","slice","splice"],function(n){var t=qt[n];a.prototype[n]=function(){return new L(t.apply(this.__wrapped__,arguments))
|
||||
}}),ce.spliceObjects||le(["pop","shift","splice"],function(n){var t=qt[n],e="splice"==n;a.prototype[n]=function(){var n=this.__wrapped__,r=t.apply(n,arguments);return 0===n.length&&delete n[0],e?new L(r):r}}),a}var e,r=typeof exports=="object"&&exports,u=typeof module=="object"&&module&&module.exports==r&&module,a=typeof global=="object"&&global;a.global===a&&(n=a);var o=0,i={},f=30,c=/&(?:amp|lt|gt|quot|#39);/g,l=/\b__p\+='';/g,p=/\b(__p\+=)''\+/g,s=/(__e\(.*?\)|\b__t\))\+'';/g,v=/\w*$/,g=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,y=/<%=([\s\S]+?)%>/g,h=/($^)/,m=/[&<>"']/g,d=/['\n\r\t\u2028\u2029\\]/g,b="Array Boolean Date Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),_="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),w="[object Arguments]",C="[object Array]",j="[object Boolean]",k="[object Date]",x="[object Function]",O="[object Number]",E="[object Object]",S="[object RegExp]",A="[object String]",P={};
|
||||
P[x]=!1,P[w]=P[C]=P[j]=P[k]=P[O]=P[E]=P[S]=P[A]=!0;var I={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},N={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},$=t();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=$,define(function(){return $})):r&&!r.nodeType?u?(u.exports=$)._=$:r._=$:n._=$})(this);
|
||||
23
dist/lodash.js
vendored
23
dist/lodash.js
vendored
@@ -3874,9 +3874,11 @@
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Creates a function that is restricted to executing `func` only after it is
|
||||
* called `n` times. The `func` is executed with the `this` binding of the
|
||||
* created function.
|
||||
* If `n` is greater than `0`, a function is created that is restricted to
|
||||
* executing `func`, with the `this` binding and arguments of the created
|
||||
* function, only after it is called `n` times. If `n` is less than `1`,
|
||||
* `func` is executed immediately, without a `this` binding or additional
|
||||
* arguments, and its result is returned.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
@@ -4069,6 +4071,19 @@
|
||||
*
|
||||
* _.filter(stooges, 'age__gt45');
|
||||
* // => [{ 'name': 'larry', 'age': 50 }]
|
||||
*
|
||||
* // create mixins with support for "_.pluck" and "_.where" callback shorthands
|
||||
* _.mixin({
|
||||
* 'toLookup': function(collection, callback, thisArg) {
|
||||
* callback = _.createCallback(callback, thisArg);
|
||||
* return _.reduce(collection, function(result, value, index, collection) {
|
||||
* return (result[callback(value, index, collection)] = value, result);
|
||||
* }, {});
|
||||
* }
|
||||
* });
|
||||
*
|
||||
* _.toLookup(stooges, 'name');
|
||||
* // => { 'moe': { 'name': 'moe', 'age': 40 }, 'larry': { 'name': 'larry', 'age': 50 } }
|
||||
*/
|
||||
function createCallback(func, thisArg, argCount) {
|
||||
if (func == null) {
|
||||
@@ -4793,7 +4808,7 @@
|
||||
var index = -1,
|
||||
result = Array(n);
|
||||
|
||||
callback = createCallback(callback, thisArg, 1);
|
||||
callback = lodash.createCallback(callback, thisArg, 1);
|
||||
while (++index < n) {
|
||||
result[index] = callback(index);
|
||||
}
|
||||
|
||||
69
dist/lodash.min.js
vendored
69
dist/lodash.min.js
vendored
@@ -4,38 +4,39 @@
|
||||
* Build: `lodash modern -o ./dist/lodash.js`
|
||||
* Underscore.js 1.4.4 underscorejs.org/LICENSE
|
||||
*/
|
||||
;(function(n){function t(r){function a(n){return n&&typeof n=="object"&&Ut.call(n,"__wrapped__")?n:new z(n)}function $(n,t,e){t||(t=0);var r=n.length,u=r-t>=(e||f);if(u){var a={};for(e=t-1;++e<r;){var o=n[e]+"";(Ut.call(a,o)?a[o]:a[o]=[]).push(n[e])}}return function(e){if(u){var r=e+"";return Ut.call(a,r)&&-1<gt(a[r],e)}return-1<gt(n,e,t)}}function B(n){return n.charCodeAt(0)}function F(n,t){var e=n.b,r=t.b;if(n=n.a,t=t.a,n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1
|
||||
}return e<r?-1:1}function q(n,t,e,r){function u(){var f=arguments,c=o?this:t;return a||(n=t[i]),e.length&&(f=f.length?(f=P(f),r?f.concat(e):e.concat(f)):e),this instanceof u?(K.prototype=n.prototype,c=new K,K.prototype=null,f=n.apply(c,f),X(f)?f:c):n.apply(c,f)}var a=W(n),o=!e,i=t;return o&&(e=t),a||(t=n),u}function R(){for(var n,t={b:"k(m)",c:"",e:"",g:"",h:!0},e=0;n=arguments[e];e++)for(var r in n)t[r]=n[r];return n=t.a,t.d=/^[^,]+/.exec(n)[0],e=St,r="var i,m="+t.d+",u=m;if(!m)return u;"+t.g+";",t.b&&(r+="var n=m.length;i=-1;if("+t.b+"){while(++i<n){"+t.e+"}}else{"),ue.fastKeys&&t.h?r+="var s=-1,t=r[typeof m]?p(m):[],n=t.length;while(++s<n){i=t[s];"+t.e+"}":(r+="for(i in m){",t.h&&(r+="if(",t.h&&(r+="h.call(m,i)"),r+="){"),r+=t.e+";",t.h&&(r+="}"),r+="}"),t.b&&(r+="}"),r+=t.c+";return u",e("h,j,k,l,o,r,p","return function("+n+"){"+r+"}")(Ut,U,fe,Z,a,A,Yt)
|
||||
}function T(n){return"\\"+E[n]}function D(n){return le[n]}function z(n){this.__wrapped__=n}function K(){}function P(n,t,e){t||(t=0),typeof e=="undefined"&&(e=n?n.length:0);var r=-1;e=e-t||0;for(var u=xt(0>e?0:e);++r<e;)u[r]=n[t+r];return u}function M(n){return pe[n]}function U(n){return Jt.call(n)==_}function V(n){var t=!1;if(!n||typeof n!="object"||U(n))return t;var e=n.constructor;return!W(e)||e instanceof e?(oe(n,function(n,e){t=e}),!1===t||Ut.call(n,t)):t}function G(n){var t=[];return ie(n,function(n,e){t.push(e)
|
||||
}),t}function H(n,t,r,u,o,i){var f=n;if(typeof t=="function"&&(u=r,r=t,t=!1),typeof r=="function"){if(r=typeof u=="undefined"?r:a.createCallback(r,u,1),f=r(f),typeof f!="undefined")return f;f=n}if(u=X(f)){var c=Jt.call(f);if(!S[c])return f;var l=fe(f)}if(!u||!t)return u?l?P(f):se({},f):f;switch(u=re[c],c){case j:case w:return new u(+f);case C:case N:return new u(f);case O:return u(f.source,v.exec(f))}for(o||(o=[]),i||(i=[]),c=o.length;c--;)if(o[c]==n)return i[c];return f=l?u(f.length):{},l&&(Ut.call(n,"index")&&(f.index=n.index),Ut.call(n,"input")&&(f.input=n.input)),o.push(n),i.push(f),(l?ot:ie)(n,function(n,u){f[u]=H(n,t,r,e,o,i)
|
||||
}),f}function J(n){var t=[];return oe(n,function(n,e){W(n)&&t.push(e)}),t.sort()}function L(n){for(var t=-1,e=ce(n),r=e.length,u={};++t<r;){var a=e[t];u[n[a]]=a}return u}function Q(n,t,e,r,u,o){var f=e===i;if(e&&!f){e=typeof r=="undefined"?e:a.createCallback(e,r,2);var c=e(n,t);if(typeof c!="undefined")return!!c}if(n===t)return 0!==n||1/n==1/t;var l=typeof n,p=typeof t;if(n===n&&(!n||"function"!=l&&"object"!=l)&&(!t||"function"!=p&&"object"!=p))return!1;if(null==n||null==t)return n===t;if(p=Jt.call(n),l=Jt.call(t),p==_&&(p=x),l==_&&(l=x),p!=l)return!1;
|
||||
switch(p){case j:case w:return+n==+t;case C:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case O:case N:return n==t+""}if(l=p==k,!l){if(Ut.call(n,"__wrapped__")||Ut.call(t,"__wrapped__"))return Q(n.__wrapped__||n,t.__wrapped__||t,e,r,u,o);if(p!=x)return!1;var p=n.constructor,s=t.constructor;if(p!=s&&(!W(p)||!(p instanceof p&&W(s)&&s instanceof s)))return!1}for(u||(u=[]),o||(o=[]),p=u.length;p--;)if(u[p]==n)return o[p]==t;var v=0,c=!0;if(u.push(n),o.push(t),l){if(p=n.length,v=t.length,c=v==n.length,!c&&!f)return c;
|
||||
for(;v--;)if(l=p,s=t[v],f)for(;l--&&!(c=Q(n[l],s,e,r,u,o)););else if(!(c=Q(n[v],s,e,r,u,o)))break;return c}return oe(t,function(t,a,i){return Ut.call(i,a)?(v++,c=Ut.call(n,a)&&Q(n[a],t,e,r,u,o)):void 0}),c&&!f&&oe(n,function(n,t,e){return Ut.call(e,t)?c=-1<--v:void 0}),c}function W(n){return typeof n=="function"}function X(n){return n?A[typeof n]:!1}function Y(n){return typeof n=="number"||Jt.call(n)==C}function Z(n){return typeof n=="string"||Jt.call(n)==N}function nt(n,t,e){var r=arguments,u=0,o=2;
|
||||
if(!X(n))return n;if(e===i)var f=r[3],c=r[4],l=r[5];else c=[],l=[],typeof e!="number"&&(o=r.length),3<o&&"function"==typeof r[o-2]?f=a.createCallback(r[--o-1],r[o--],2):2<o&&"function"==typeof r[o-1]&&(f=r[--o]);for(;++u<o;)(fe(r[u])?ot:ie)(r[u],function(t,e){var r,u,a=t,o=n[e];if(t&&((u=fe(t))||ge(t))){for(a=c.length;a--;)if(r=c[a]==t){o=l[a];break}r||(o=u?fe(o)?o:[]:ge(o)?o:{},f&&(a=f(o,t),typeof a!="undefined"&&(o=a)),c.push(t),l.push(o),f||(o=nt(o,t,i,f,c,l)))}else f&&(a=f(o,t),typeof a=="undefined"&&(a=t)),typeof a!="undefined"&&(o=a);
|
||||
n[e]=o});return n}function tt(n){for(var t=-1,e=ce(n),r=e.length,u=xt(r);++t<r;)u[t]=n[e[t]];return u}function et(n,t,e){var r=-1,u=n?n.length:0,a=!1;return e=(0>e?Zt(0,u+e):e)||0,typeof u=="number"?a=-1<(Z(n)?n.indexOf(t,e):gt(n,t,e)):ae(n,function(n){return++r<e?void 0:!(a=n===t)}),a}function rt(n,t,e){var r=!0;if(t=a.createCallback(t,e),fe(n)){e=-1;for(var u=n.length;++e<u&&(r=!!t(n[e],e,n)););}else ae(n,function(n,e,u){return r=!!t(n,e,u)});return r}function ut(n,t,e){var r=[];if(t=a.createCallback(t,e),fe(n)){e=-1;
|
||||
for(var u=n.length;++e<u;){var o=n[e];t(o,e,n)&&r.push(o)}}else ae(n,function(n,e,u){t(n,e,u)&&r.push(n)});return r}function at(n,t,e){var r;return t=a.createCallback(t,e),ot(n,function(n,e,u){return t(n,e,u)?(r=n,!1):void 0}),r}function ot(n,t,e){if(t&&typeof e=="undefined"&&fe(n)){e=-1;for(var r=n.length;++e<r&&!1!==t(n[e],e,n););}else ae(n,t,e);return n}function it(n,t,e){var r=-1,u=n?n.length:0,o=xt(typeof u=="number"?u:0);if(t=a.createCallback(t,e),fe(n))for(;++r<u;)o[r]=t(n[r],r,n);else ae(n,function(n,e,u){o[++r]=t(n,e,u)
|
||||
});return o}function ft(n,t,e){var r=-1/0,u=r;if(!t&&fe(n)){e=-1;for(var o=n.length;++e<o;){var i=n[e];i>u&&(u=i)}}else t=!t&&Z(n)?B:a.createCallback(t,e),ae(n,function(n,e,a){e=t(n,e,a),e>r&&(r=e,u=n)});return u}function ct(n,t,e,r){var u=3>arguments.length;if(t=a.createCallback(t,r,4),fe(n)){var o=-1,i=n.length;for(u&&(e=n[++o]);++o<i;)e=t(e,n[o],o,n)}else ae(n,function(n,r,a){e=u?(u=!1,n):t(e,n,r,a)});return e}function lt(n,t,e,r){var u=n?n.length:0,o=3>arguments.length;if(typeof u!="number")var i=ce(n),u=i.length;
|
||||
return t=a.createCallback(t,r,4),ot(n,function(r,a,f){a=i?i[--u]:--u,e=o?(o=!1,n[a]):t(e,n[a],a,f)}),e}function pt(n,t,e){var r;if(t=a.createCallback(t,e),fe(n)){e=-1;for(var u=n.length;++e<u&&!(r=t(n[e],e,n)););}else ae(n,function(n,e,u){return!(r=t(n,e,u))});return!!r}function st(n,t,e){if(n){var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=-1;for(t=a.createCallback(t,e);++o<u&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n[0];return P(n,0,ne(Zt(0,r),u))}}function vt(n,t,e,r){var u=-1,o=n?n.length:0,i=[];
|
||||
for(typeof t!="boolean"&&null!=t&&(r=e,e=t,t=!1),null!=e&&(e=a.createCallback(e,r));++u<o;)r=n[u],e&&(r=e(r,u,n)),fe(r)?Vt.apply(i,t?r:vt(r)):i.push(r);return i}function gt(n,t,e){var r=-1,u=n?n.length:0;if(typeof e=="number")r=(0>e?Zt(0,u+e):e||0)-1;else if(e)return r=yt(n,t),n[r]===t?r:-1;for(;++r<u;)if(n[r]===t)return r;return-1}function ht(n,t,e){if(typeof t!="number"&&null!=t){var r=0,u=-1,o=n?n.length:0;for(t=a.createCallback(t,e);++u<o&&t(n[u],u,n);)r++}else r=null==t||e?1:Zt(0,t);return P(n,r)
|
||||
}function yt(n,t,e,r){var u=0,o=n?n.length:u;for(e=e?a.createCallback(e,r,1):jt,t=e(t);u<o;)r=u+o>>>1,e(n[r])<t?u=r+1:o=r;return u}function mt(n,t,e,r){var u=-1,o=n?n.length:0,i=[],f=i;typeof t!="boolean"&&null!=t&&(r=e,e=t,t=!1);var c=!t&&75<=o;if(c)var l={};for(null!=e&&(f=[],e=a.createCallback(e,r));++u<o;){r=n[u];var p=e?e(r,u,n):r;if(c)var s=p+"",s=Ut.call(l,s)?!(f=l[s]):f=l[s]=[];(t?!u||f[f.length-1]!==p:s||0>gt(f,p))&&((e||c)&&f.push(p),i.push(r))}return i}function dt(n,t){for(var e=-1,r=n?n.length:0,u={};++e<r;){var a=n[e];
|
||||
t?u[a]=t[e]:u[a[0]]=a[1]}return u}function bt(n,t){return ue.fastBind||Lt&&2<arguments.length?Lt.call.apply(Lt,arguments):q(n,t,P(arguments,2))}function _t(n,t,e){if(null==n)return jt;var r=typeof n;if("function"!=r){if("object"!=r)return function(t){return t[n]};var u=ce(n);return function(t){for(var e=u.length,r=!1;e--&&(r=Q(t[u[e]],n[u[e]],i)););return r}}return typeof t!="undefined"?1===e?function(e){return n.call(t,e)}:2===e?function(e,r){return n.call(t,e,r)}:4===e?function(e,r,u,a){return n.call(t,e,r,u,a)
|
||||
}:function(e,r,u){return n.call(t,e,r,u)}:n}function kt(n){var t=P(arguments,1);return Ht(function(){n.apply(e,t)},1)}function jt(n){return n}function wt(n){ot(J(n),function(t){var e=a[t]=n[t];a.prototype[t]=function(){var n=this.__wrapped__,t=[n];return Vt.apply(t,arguments),t=e.apply(a,t),n&&typeof n=="object"&&n==t?this:new z(t)}})}function Ct(){return this.__wrapped__}r=r?I.defaults(n.Object(),r,I.pick(n,b)):n;var xt=r.Array,Ot=r.Boolean,Nt=r.Date,St=r.Function,At=r.Math,Et=r.Number,It=r.Object,$t=r.RegExp,Bt=r.String,Ft=xt(),qt=It(),Rt=r._,Tt=$t("^"+(qt.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Dt=At.ceil,zt=r.clearTimeout,Kt=Ft.concat,Pt=At.floor,Mt=Tt.test(Mt=It.getPrototypeOf)&&Mt,Ut=qt.hasOwnProperty,Vt=Ft.push,Gt=r.setImmediate,Ht=r.setTimeout,Jt=qt.toString,Lt=Tt.test(Lt=P.bind)&&Lt,Qt=Tt.test(Qt=xt.isArray)&&Qt,Wt=r.isFinite,Xt=r.isNaN,Yt=Tt.test(Yt=It.keys)&&Yt,Zt=At.max,ne=At.min,te=r.parseInt,ee=At.random,qt=Tt.test(r.attachEvent),Tt=!/\n{2,}/.test(St()),At=Lt&&!/\n|true/.test(Lt+qt),re={};
|
||||
re[k]=xt,re[j]=Ot,re[w]=Nt,re[x]=It,re[C]=Et,re[O]=$t,re[N]=Bt;var ue=a.support={};ue.fastBind=Lt&&!At,ue.fastKeys=Yt&&(qt||At||!Tt),a.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:h,variable:"",imports:{_:a}};var Ot={a:"q,w,g",g:"var a=arguments,b=0,c=typeof g=='number'?2:a.length;while(++b<c){m=a[b];if(m&&r[typeof m]){",e:"if(typeof u[i]=='undefined')u[i]=m[i]",c:"}}"},Et={a:"e,d,x",g:"d=d&&typeof x=='undefined'?d:o['createCallback'](d,x)",b:"typeof n=='number'",e:"if(d(m[i],i,e)===false)return u"},It={g:"if(!r[typeof m])return u;"+Et.g,b:!1},ae=R(Et);
|
||||
z.prototype=a.prototype;var oe=R(Et,It,{h:!1}),ie=R(Et,It),fe=Qt||function(n){return n instanceof xt||Jt.call(n)==k},ce=Yt?function(n){return X(n)?Yt(n):[]}:G,le={"&":"&","<":"<",">":">",'"':""","'":"'"},pe=L(le),se=R(Ot,{g:Ot.g.replace(";",";if(c>3&&typeof a[c-2]=='function'){var d=o.createCallback(a[--c-1],a[c--],2);}else if(c>2&&typeof a[c-1]=='function'){d=a[--c];}"),e:"u[i]=d?d(u[i],m[i]):m[i]"}),ve=R(Ot),ge=function(n){if(!n||typeof n!="object")return!1;var t=n.valueOf,e=typeof t=="function"&&(e=Mt(t))&&Mt(e);
|
||||
return e?n==e||Mt(n)==e&&!U(n):V(n)};return At&&u&&typeof Gt=="function"&&(kt=bt(Gt,r)),Gt=8==te("08")?te:function(n,t){return te(Z(n)?n.replace(/^0+(?=.$)/,""):n,t||0)},a.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},a.assign=se,a.at=function(n){for(var t=-1,e=Kt.apply(Ft,P(arguments,1)),r=e.length,u=xt(r);++t<r;)u[t]=n[e[t]];return u},a.bind=bt,a.bindAll=function(n){for(var t=Kt.apply(Ft,arguments),e=1<t.length?0:(t=J(n),-1),r=t.length;++e<r;){var u=t[e];
|
||||
n[u]=bt(n[u],n)}return n},a.bindKey=function(n,t){return q(n,t,P(arguments,2))},a.compact=function(n){for(var t=-1,e=n?n.length:0,r=[];++t<e;){var u=n[t];u&&r.push(u)}return r},a.compose=function(){var n=arguments;return function(){for(var t=arguments,e=n.length;e--;)t=[n[e].apply(this,t)];return t[0]}},a.countBy=function(n,t,e){var r={};return t=a.createCallback(t,e),ot(n,function(n,e,u){e=t(n,e,u)+"",Ut.call(r,e)?r[e]++:r[e]=1}),r},a.createCallback=_t,a.debounce=function(n,t,e){function r(){i=null,e||(a=n.apply(o,u))
|
||||
}var u,a,o,i;return function(){var f=e&&!i;return u=arguments,o=this,zt(i),i=Ht(r,t),f&&(a=n.apply(o,u)),a}},a.defaults=ve,a.defer=kt,a.delay=function(n,t){var r=P(arguments,2);return Ht(function(){n.apply(e,r)},t)},a.difference=function(n){for(var t=-1,e=n?n.length:0,r=Kt.apply(Ft,arguments),r=$(r,e),u=[];++t<e;){var a=n[t];r(a)||u.push(a)}return u},a.filter=ut,a.flatten=vt,a.forEach=ot,a.forIn=oe,a.forOwn=ie,a.functions=J,a.groupBy=function(n,t,e){var r={};return t=a.createCallback(t,e),ot(n,function(n,e,u){e=t(n,e,u)+"",(Ut.call(r,e)?r[e]:r[e]=[]).push(n)
|
||||
}),r},a.initial=function(n,t,e){if(!n)return[];var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;for(t=a.createCallback(t,e);o--&&t(n[o],o,n);)r++}else r=null==t||e?1:t||r;return P(n,0,ne(Zt(0,u-r),u))},a.intersection=function(n){var t=arguments,e=t.length,r={0:{}},u=-1,a=n?n.length:0,o=100<=a,i=[],f=i;n:for(;++u<a;){var c=n[u];if(o)var l=c+"",l=Ut.call(r[0],l)?!(f=r[0][l]):f=r[0][l]=[];if(l||0>gt(f,c)){o&&f.push(c);for(var p=e;--p;)if(!(r[p]||(r[p]=$(t[p],0,100)))(c))continue n;i.push(c)
|
||||
}}return i},a.invert=L,a.invoke=function(n,t){var e=P(arguments,2),r=-1,u=typeof t=="function",a=n?n.length:0,o=xt(typeof a=="number"?a:0);return ot(n,function(n){o[++r]=(u?t:n[t]).apply(n,e)}),o},a.keys=ce,a.map=it,a.max=ft,a.memoize=function(n,t){var e={};return function(){var r=(t?t.apply(this,arguments):arguments[0])+"";return Ut.call(e,r)?e[r]:e[r]=n.apply(this,arguments)}},a.merge=nt,a.min=function(n,t,e){var r=1/0,u=r;if(!t&&fe(n)){e=-1;for(var o=n.length;++e<o;){var i=n[e];i<u&&(u=i)}}else t=!t&&Z(n)?B:a.createCallback(t,e),ae(n,function(n,e,a){e=t(n,e,a),e<r&&(r=e,u=n)
|
||||
});return u},a.omit=function(n,t,e){var r=typeof t=="function",u={};if(r)t=a.createCallback(t,e);else var o=Kt.apply(Ft,arguments);return oe(n,function(n,e,a){(r?!t(n,e,a):0>gt(o,e,1))&&(u[e]=n)}),u},a.once=function(n){var t,e;return function(){return t?e:(t=!0,e=n.apply(this,arguments),n=null,e)}},a.pairs=function(n){for(var t=-1,e=ce(n),r=e.length,u=xt(r);++t<r;){var a=e[t];u[t]=[a,n[a]]}return u},a.partial=function(n){return q(n,P(arguments,1))},a.partialRight=function(n){return q(n,P(arguments,1),null,i)
|
||||
},a.pick=function(n,t,e){var r={};if(typeof t!="function")for(var u=0,o=Kt.apply(Ft,arguments),i=X(n)?o.length:0;++u<i;){var f=o[u];f in n&&(r[f]=n[f])}else t=a.createCallback(t,e),oe(n,function(n,e,u){t(n,e,u)&&(r[e]=n)});return r},a.pluck=it,a.range=function(n,t,e){n=+n||0,e=+e||1,null==t&&(t=n,n=0);var r=-1;t=Zt(0,Dt((t-n)/e));for(var u=xt(t);++r<t;)u[r]=n,n+=e;return u},a.reject=function(n,t,e){return t=a.createCallback(t,e),ut(n,function(n,e,r){return!t(n,e,r)})},a.rest=ht,a.shuffle=function(n){var t=-1,e=n?n.length:0,r=xt(typeof e=="number"?e:0);
|
||||
return ot(n,function(n){var e=Pt(ee()*(++t+1));r[t]=r[e],r[e]=n}),r},a.sortBy=function(n,t,e){var r=-1,u=n?n.length:0,o=xt(typeof u=="number"?u:0);for(t=a.createCallback(t,e),ot(n,function(n,e,u){o[++r]={a:t(n,e,u),b:r,c:n}}),u=o.length,o.sort(F);u--;)o[u]=o[u].c;return o},a.tap=function(n,t){return t(n),n},a.throttle=function(n,t){function e(){i=new Nt,o=null,u=n.apply(a,r)}var r,u,a,o,i=0;return function(){var f=new Nt,c=t-(f-i);return r=arguments,a=this,0<c?o||(o=Ht(e,c)):(zt(o),o=null,i=f,u=n.apply(a,r)),u
|
||||
}},a.times=function(n,t,e){n=-1<(n=+n)?n:0;var r=-1,u=xt(n);for(t=_t(t,e,1);++r<n;)u[r]=t(r);return u},a.toArray=function(n){return n&&typeof n.length=="number"?P(n):tt(n)},a.union=function(){return mt(Kt.apply(Ft,arguments))},a.uniq=mt,a.values=tt,a.where=ut,a.without=function(n){for(var t=-1,e=n?n.length:0,r=$(arguments,1),u=[];++t<e;){var a=n[t];r(a)||u.push(a)}return u},a.wrap=function(n,t){return function(){var e=[n];return Vt.apply(e,arguments),t.apply(this,e)}},a.zip=function(n){for(var t=-1,e=n?ft(it(arguments,"length")):0,r=xt(e);++t<e;)r[t]=it(arguments,t);
|
||||
return r},a.zipObject=dt,a.collect=it,a.drop=ht,a.each=ot,a.extend=se,a.methods=J,a.object=dt,a.select=ut,a.tail=ht,a.unique=mt,wt(a),a.clone=H,a.cloneDeep=function(n,t,e){return H(n,!0,t,e)},a.contains=et,a.escape=function(n){return null==n?"":(n+"").replace(m,D)},a.every=rt,a.find=at,a.has=function(n,t){return n?Ut.call(n,t):!1},a.identity=jt,a.indexOf=gt,a.isArguments=U,a.isArray=fe,a.isBoolean=function(n){return!0===n||!1===n||Jt.call(n)==j},a.isDate=function(n){return n instanceof Nt||Jt.call(n)==w
|
||||
},a.isElement=function(n){return n?1===n.nodeType:!1},a.isEmpty=function(n){var t=!0;if(!n)return t;var e=Jt.call(n),r=n.length;return e==k||e==N||e==_||e==x&&typeof r=="number"&&W(n.splice)?!r:(ie(n,function(){return t=!1}),t)},a.isEqual=Q,a.isFinite=function(n){return Wt(n)&&!Xt(parseFloat(n))},a.isFunction=W,a.isNaN=function(n){return Y(n)&&n!=+n},a.isNull=function(n){return null===n},a.isNumber=Y,a.isObject=X,a.isPlainObject=ge,a.isRegExp=function(n){return n instanceof $t||Jt.call(n)==O},a.isString=Z,a.isUndefined=function(n){return typeof n=="undefined"
|
||||
},a.lastIndexOf=function(n,t,e){var r=n?n.length:0;for(typeof e=="number"&&(r=(0>e?Zt(0,r+e):ne(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},a.mixin=wt,a.noConflict=function(){return r._=Rt,this},a.parseInt=Gt,a.random=function(n,t){return null==n&&null==t&&(t=1),n=+n||0,null==t&&(t=n,n=0),n+Pt(ee()*((+t||0)-n+1))},a.reduce=ct,a.reduceRight=lt,a.result=function(n,t){var r=n?n[t]:e;return W(r)?n[t]():r},a.runInContext=t,a.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:ce(n).length
|
||||
},a.some=pt,a.sortedIndex=yt,a.template=function(n,t,r){var u=a.templateSettings;n||(n=""),r=ve({},r,u);var o,i=ve({},r.imports,u.imports),u=ce(i),i=tt(i),f=0,c=r.interpolate||y,v="__p+='",c=$t((r.escape||y).source+"|"+c.source+"|"+(c===h?g:y).source+"|"+(r.evaluate||y).source+"|$","g");n.replace(c,function(t,e,r,u,a,i){return r||(r=u),v+=n.slice(f,i).replace(d,T),e&&(v+="'+__e("+e+")+'"),a&&(o=!0,v+="';"+a+";__p+='"),r&&(v+="'+((__t=("+r+"))==null?'':__t)+'"),f=i+t.length,t}),v+="';\n",c=r=r.variable,c||(r="obj",v="with("+r+"){"+v+"}"),v=(o?v.replace(l,""):v).replace(p,"$1").replace(s,"$1;"),v="function("+r+"){"+(c?"":r+"||("+r+"={});")+"var __t,__p='',__e=_.escape"+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+v+"return __p}";
|
||||
try{var m=St(u,"return "+v).apply(e,i)}catch(b){throw b.source=v,b}return t?m(t):(m.source=v,m)},a.unescape=function(n){return null==n?"":(n+"").replace(c,M)},a.uniqueId=function(n){var t=++o;return(null==n?"":n+"")+t},a.all=rt,a.any=pt,a.detect=at,a.foldl=ct,a.foldr=lt,a.include=et,a.inject=ct,ie(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(){var t=[this.__wrapped__];return Vt.apply(t,arguments),n.apply(a,t)})}),a.first=st,a.last=function(n,t,e){if(n){var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;
|
||||
for(t=a.createCallback(t,e);o--&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n[u-1];return P(n,Zt(0,u-r))}},a.take=st,a.head=st,ie(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(t,e){var r=n(this.__wrapped__,t,e);return null==t||e&&typeof t!="function"?r:new z(r)})}),a.VERSION="1.0.1",a.prototype.toString=function(){return this.__wrapped__+""},a.prototype.value=Ct,a.prototype.valueOf=Ct,ae(["join","pop","shift"],function(n){var t=Ft[n];a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)
|
||||
}}),ae(["push","reverse","sort","unshift"],function(n){var t=Ft[n];a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),ae(["concat","slice","splice"],function(n){var t=Ft[n];a.prototype[n]=function(){return new z(t.apply(this.__wrapped__,arguments))}}),a}var e,r=typeof exports=="object"&&exports,u=typeof module=="object"&&module&&module.exports==r&&module,a=typeof global=="object"&&global;a.global===a&&(n=a);var o=0,i={},f=30,c=/&(?:amp|lt|gt|quot|#39);/g,l=/\b__p\+='';/g,p=/\b(__p\+=)''\+/g,s=/(__e\(.*?\)|\b__t\))\+'';/g,v=/\w*$/,g=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,h=/<%=([\s\S]+?)%>/g,y=/($^)/,m=/[&<>"']/g,d=/['\n\r\t\u2028\u2029\\]/g,b="Array Boolean Date Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),_="[object Arguments]",k="[object Array]",j="[object Boolean]",w="[object Date]",C="[object Number]",x="[object Object]",O="[object RegExp]",N="[object String]",S={"[object Function]":!1};
|
||||
;(function(n){function t(r){function a(n){return n&&typeof n=="object"&&Mt.call(n,"__wrapped__")?n:new z(n)}function $(n,t,e){t||(t=0);var r=n.length,u=r-t>=(e||f);if(u){var a={};for(e=t-1;++e<r;){var o=n[e]+"";(Mt.call(a,o)?a[o]:a[o]=[]).push(n[e])}}return function(e){if(u){var r=e+"";return Mt.call(a,r)&&-1<gt(a[r],e)}return-1<gt(n,e,t)}}function B(n){return n.charCodeAt(0)}function F(n,t){var e=n.b,r=t.b;if(n=n.a,t=t.a,n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1
|
||||
}return e<r?-1:1}function q(n,t,e,r){function u(){var f=arguments,c=o?this:t;return a||(n=t[i]),e.length&&(f=f.length?(f=P(f),r?f.concat(e):e.concat(f)):e),this instanceof u?(K.prototype=n.prototype,c=new K,K.prototype=null,f=n.apply(c,f),X(f)?f:c):n.apply(c,f)}var a=W(n),o=!e,i=t;return o&&(e=t),a||(t=n),u}function R(){for(var n,t={b:"k(m)",c:"",e:"",g:"",h:!0},e=0;n=arguments[e];e++)for(var r in n)t[r]=n[r];return n=t.a,t.d=/^[^,]+/.exec(n)[0],e=Nt,r="var i,m="+t.d+",u=m;if(!m)return u;"+t.g+";",t.b&&(r+="var n=m.length;i=-1;if("+t.b+"){while(++i<n){"+t.e+"}}else{"),re.fastKeys&&t.h?r+="var s=-1,t=r[typeof m]?p(m):[],n=t.length;while(++s<n){i=t[s];"+t.e+"}":(r+="for(i in m){",t.h&&(r+="if(",t.h&&(r+="h.call(m,i)"),r+="){"),r+=t.e+";",t.h&&(r+="}"),r+="}"),t.b&&(r+="}"),r+=t.c+";return u",e("h,j,k,l,o,r,p","return function("+n+"){"+r+"}")(Mt,U,ie,Z,a,A,Xt)
|
||||
}function T(n){return"\\"+E[n]}function D(n){return ce[n]}function z(n){this.__wrapped__=n}function K(){}function P(n,t,e){t||(t=0),typeof e=="undefined"&&(e=n?n.length:0);var r=-1;e=e-t||0;for(var u=Ct(0>e?0:e);++r<e;)u[r]=n[t+r];return u}function M(n){return le[n]}function U(n){return Ht.call(n)==_}function V(n){var t=!1;if(!n||typeof n!="object"||U(n))return t;var e=n.constructor;return!W(e)||e instanceof e?(ae(n,function(n,e){t=e}),!1===t||Mt.call(n,t)):t}function G(n){var t=[];return oe(n,function(n,e){t.push(e)
|
||||
}),t}function H(n,t,r,u,o,i){var f=n;if(typeof t=="function"&&(u=r,r=t,t=!1),typeof r=="function"){if(r=typeof u=="undefined"?r:a.createCallback(r,u,1),f=r(f),typeof f!="undefined")return f;f=n}if(u=X(f)){var c=Ht.call(f);if(!S[c])return f;var l=ie(f)}if(!u||!t)return u?l?P(f):pe({},f):f;switch(u=ee[c],c){case j:case w:return new u(+f);case C:case N:return new u(f);case O:return u(f.source,v.exec(f))}for(o||(o=[]),i||(i=[]),c=o.length;c--;)if(o[c]==n)return i[c];return f=l?u(f.length):{},l&&(Mt.call(n,"index")&&(f.index=n.index),Mt.call(n,"input")&&(f.input=n.input)),o.push(n),i.push(f),(l?ot:oe)(n,function(n,u){f[u]=H(n,t,r,e,o,i)
|
||||
}),f}function J(n){var t=[];return ae(n,function(n,e){W(n)&&t.push(e)}),t.sort()}function L(n){for(var t=-1,e=fe(n),r=e.length,u={};++t<r;){var a=e[t];u[n[a]]=a}return u}function Q(n,t,e,r,u,o){var f=e===i;if(e&&!f){e=typeof r=="undefined"?e:a.createCallback(e,r,2);var c=e(n,t);if(typeof c!="undefined")return!!c}if(n===t)return 0!==n||1/n==1/t;var l=typeof n,p=typeof t;if(n===n&&(!n||"function"!=l&&"object"!=l)&&(!t||"function"!=p&&"object"!=p))return!1;if(null==n||null==t)return n===t;if(p=Ht.call(n),l=Ht.call(t),p==_&&(p=x),l==_&&(l=x),p!=l)return!1;
|
||||
switch(p){case j:case w:return+n==+t;case C:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case O:case N:return n==t+""}if(l=p==k,!l){if(Mt.call(n,"__wrapped__")||Mt.call(t,"__wrapped__"))return Q(n.__wrapped__||n,t.__wrapped__||t,e,r,u,o);if(p!=x)return!1;var p=n.constructor,s=t.constructor;if(p!=s&&(!W(p)||!(p instanceof p&&W(s)&&s instanceof s)))return!1}for(u||(u=[]),o||(o=[]),p=u.length;p--;)if(u[p]==n)return o[p]==t;var v=0,c=!0;if(u.push(n),o.push(t),l){if(p=n.length,v=t.length,c=v==n.length,!c&&!f)return c;
|
||||
for(;v--;)if(l=p,s=t[v],f)for(;l--&&!(c=Q(n[l],s,e,r,u,o)););else if(!(c=Q(n[v],s,e,r,u,o)))break;return c}return ae(t,function(t,a,i){return Mt.call(i,a)?(v++,c=Mt.call(n,a)&&Q(n[a],t,e,r,u,o)):void 0}),c&&!f&&ae(n,function(n,t,e){return Mt.call(e,t)?c=-1<--v:void 0}),c}function W(n){return typeof n=="function"}function X(n){return n?A[typeof n]:!1}function Y(n){return typeof n=="number"||Ht.call(n)==C}function Z(n){return typeof n=="string"||Ht.call(n)==N}function nt(n,t,e){var r=arguments,u=0,o=2;
|
||||
if(!X(n))return n;if(e===i)var f=r[3],c=r[4],l=r[5];else c=[],l=[],typeof e!="number"&&(o=r.length),3<o&&"function"==typeof r[o-2]?f=a.createCallback(r[--o-1],r[o--],2):2<o&&"function"==typeof r[o-1]&&(f=r[--o]);for(;++u<o;)(ie(r[u])?ot:oe)(r[u],function(t,e){var r,u,a=t,o=n[e];if(t&&((u=ie(t))||ve(t))){for(a=c.length;a--;)if(r=c[a]==t){o=l[a];break}r||(o=u?ie(o)?o:[]:ve(o)?o:{},f&&(a=f(o,t),typeof a!="undefined"&&(o=a)),c.push(t),l.push(o),f||(o=nt(o,t,i,f,c,l)))}else f&&(a=f(o,t),typeof a=="undefined"&&(a=t)),typeof a!="undefined"&&(o=a);
|
||||
n[e]=o});return n}function tt(n){for(var t=-1,e=fe(n),r=e.length,u=Ct(r);++t<r;)u[t]=n[e[t]];return u}function et(n,t,e){var r=-1,u=n?n.length:0,a=!1;return e=(0>e?Yt(0,u+e):e)||0,typeof u=="number"?a=-1<(Z(n)?n.indexOf(t,e):gt(n,t,e)):ue(n,function(n){return++r<e?void 0:!(a=n===t)}),a}function rt(n,t,e){var r=!0;if(t=a.createCallback(t,e),ie(n)){e=-1;for(var u=n.length;++e<u&&(r=!!t(n[e],e,n)););}else ue(n,function(n,e,u){return r=!!t(n,e,u)});return r}function ut(n,t,e){var r=[];if(t=a.createCallback(t,e),ie(n)){e=-1;
|
||||
for(var u=n.length;++e<u;){var o=n[e];t(o,e,n)&&r.push(o)}}else ue(n,function(n,e,u){t(n,e,u)&&r.push(n)});return r}function at(n,t,e){var r;return t=a.createCallback(t,e),ot(n,function(n,e,u){return t(n,e,u)?(r=n,!1):void 0}),r}function ot(n,t,e){if(t&&typeof e=="undefined"&&ie(n)){e=-1;for(var r=n.length;++e<r&&!1!==t(n[e],e,n););}else ue(n,t,e);return n}function it(n,t,e){var r=-1,u=n?n.length:0,o=Ct(typeof u=="number"?u:0);if(t=a.createCallback(t,e),ie(n))for(;++r<u;)o[r]=t(n[r],r,n);else ue(n,function(n,e,u){o[++r]=t(n,e,u)
|
||||
});return o}function ft(n,t,e){var r=-1/0,u=r;if(!t&&ie(n)){e=-1;for(var o=n.length;++e<o;){var i=n[e];i>u&&(u=i)}}else t=!t&&Z(n)?B:a.createCallback(t,e),ue(n,function(n,e,a){e=t(n,e,a),e>r&&(r=e,u=n)});return u}function ct(n,t,e,r){var u=3>arguments.length;if(t=a.createCallback(t,r,4),ie(n)){var o=-1,i=n.length;for(u&&(e=n[++o]);++o<i;)e=t(e,n[o],o,n)}else ue(n,function(n,r,a){e=u?(u=!1,n):t(e,n,r,a)});return e}function lt(n,t,e,r){var u=n?n.length:0,o=3>arguments.length;if(typeof u!="number")var i=fe(n),u=i.length;
|
||||
return t=a.createCallback(t,r,4),ot(n,function(r,a,f){a=i?i[--u]:--u,e=o?(o=!1,n[a]):t(e,n[a],a,f)}),e}function pt(n,t,e){var r;if(t=a.createCallback(t,e),ie(n)){e=-1;for(var u=n.length;++e<u&&!(r=t(n[e],e,n)););}else ue(n,function(n,e,u){return!(r=t(n,e,u))});return!!r}function st(n,t,e){if(n){var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=-1;for(t=a.createCallback(t,e);++o<u&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n[0];return P(n,0,Zt(Yt(0,r),u))}}function vt(n,t,e,r){var u=-1,o=n?n.length:0,i=[];
|
||||
for(typeof t!="boolean"&&null!=t&&(r=e,e=t,t=!1),null!=e&&(e=a.createCallback(e,r));++u<o;)r=n[u],e&&(r=e(r,u,n)),ie(r)?Ut.apply(i,t?r:vt(r)):i.push(r);return i}function gt(n,t,e){var r=-1,u=n?n.length:0;if(typeof e=="number")r=(0>e?Yt(0,u+e):e||0)-1;else if(e)return r=yt(n,t),n[r]===t?r:-1;for(;++r<u;)if(n[r]===t)return r;return-1}function ht(n,t,e){if(typeof t!="number"&&null!=t){var r=0,u=-1,o=n?n.length:0;for(t=a.createCallback(t,e);++u<o&&t(n[u],u,n);)r++}else r=null==t||e?1:Yt(0,t);return P(n,r)
|
||||
}function yt(n,t,e,r){var u=0,o=n?n.length:u;for(e=e?a.createCallback(e,r,1):kt,t=e(t);u<o;)r=u+o>>>1,e(n[r])<t?u=r+1:o=r;return u}function mt(n,t,e,r){var u=-1,o=n?n.length:0,i=[],f=i;typeof t!="boolean"&&null!=t&&(r=e,e=t,t=!1);var c=!t&&75<=o;if(c)var l={};for(null!=e&&(f=[],e=a.createCallback(e,r));++u<o;){r=n[u];var p=e?e(r,u,n):r;if(c)var s=p+"",s=Mt.call(l,s)?!(f=l[s]):f=l[s]=[];(t?!u||f[f.length-1]!==p:s||0>gt(f,p))&&((e||c)&&f.push(p),i.push(r))}return i}function bt(n,t){for(var e=-1,r=n?n.length:0,u={};++e<r;){var a=n[e];
|
||||
t?u[a]=t[e]:u[a[0]]=a[1]}return u}function dt(n,t){return re.fastBind||Jt&&2<arguments.length?Jt.call.apply(Jt,arguments):q(n,t,P(arguments,2))}function _t(n){var t=P(arguments,1);return Gt(function(){n.apply(e,t)},1)}function kt(n){return n}function jt(n){ot(J(n),function(t){var e=a[t]=n[t];a.prototype[t]=function(){var n=this.__wrapped__,t=[n];return Ut.apply(t,arguments),t=e.apply(a,t),n&&typeof n=="object"&&n==t?this:new z(t)}})}function wt(){return this.__wrapped__}r=r?I.defaults(n.Object(),r,I.pick(n,d)):n;
|
||||
var Ct=r.Array,xt=r.Boolean,Ot=r.Date,Nt=r.Function,St=r.Math,At=r.Number,Et=r.Object,It=r.RegExp,$t=r.String,Bt=Ct(),Ft=Et(),qt=r._,Rt=It("^"+(Ft.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Tt=St.ceil,Dt=r.clearTimeout,zt=Bt.concat,Kt=St.floor,Pt=Rt.test(Pt=Et.getPrototypeOf)&&Pt,Mt=Ft.hasOwnProperty,Ut=Bt.push,Vt=r.setImmediate,Gt=r.setTimeout,Ht=Ft.toString,Jt=Rt.test(Jt=P.bind)&&Jt,Lt=Rt.test(Lt=Ct.isArray)&&Lt,Qt=r.isFinite,Wt=r.isNaN,Xt=Rt.test(Xt=Et.keys)&&Xt,Yt=St.max,Zt=St.min,ne=r.parseInt,te=St.random,Ft=Rt.test(r.attachEvent),Rt=!/\n{2,}/.test(Nt()),St=Jt&&!/\n|true/.test(Jt+Ft),ee={};
|
||||
ee[k]=Ct,ee[j]=xt,ee[w]=Ot,ee[x]=Et,ee[C]=At,ee[O]=It,ee[N]=$t;var re=a.support={};re.fastBind=Jt&&!St,re.fastKeys=Xt&&(Ft||St||!Rt),a.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:h,variable:"",imports:{_:a}};var xt={a:"q,w,g",g:"var a=arguments,b=0,c=typeof g=='number'?2:a.length;while(++b<c){m=a[b];if(m&&r[typeof m]){",e:"if(typeof u[i]=='undefined')u[i]=m[i]",c:"}}"},At={a:"e,d,x",g:"d=d&&typeof x=='undefined'?d:o['createCallback'](d,x)",b:"typeof n=='number'",e:"if(d(m[i],i,e)===false)return u"},Et={g:"if(!r[typeof m])return u;"+At.g,b:!1},ue=R(At);
|
||||
z.prototype=a.prototype;var ae=R(At,Et,{h:!1}),oe=R(At,Et),ie=Lt||function(n){return n instanceof Ct||Ht.call(n)==k},fe=Xt?function(n){return X(n)?Xt(n):[]}:G,ce={"&":"&","<":"<",">":">",'"':""","'":"'"},le=L(ce),pe=R(xt,{g:xt.g.replace(";",";if(c>3&&typeof a[c-2]=='function'){var d=o.createCallback(a[--c-1],a[c--],2);}else if(c>2&&typeof a[c-1]=='function'){d=a[--c];}"),e:"u[i]=d?d(u[i],m[i]):m[i]"}),se=R(xt),ve=function(n){if(!n||typeof n!="object")return!1;var t=n.valueOf,e=typeof t=="function"&&(e=Pt(t))&&Pt(e);
|
||||
return e?n==e||Pt(n)==e&&!U(n):V(n)};return St&&u&&typeof Vt=="function"&&(_t=dt(Vt,r)),Vt=8==ne("08")?ne:function(n,t){return ne(Z(n)?n.replace(/^0+(?=.$)/,""):n,t||0)},a.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},a.assign=pe,a.at=function(n){for(var t=-1,e=zt.apply(Bt,P(arguments,1)),r=e.length,u=Ct(r);++t<r;)u[t]=n[e[t]];return u},a.bind=dt,a.bindAll=function(n){for(var t=zt.apply(Bt,arguments),e=1<t.length?0:(t=J(n),-1),r=t.length;++e<r;){var u=t[e];
|
||||
n[u]=dt(n[u],n)}return n},a.bindKey=function(n,t){return q(n,t,P(arguments,2))},a.compact=function(n){for(var t=-1,e=n?n.length:0,r=[];++t<e;){var u=n[t];u&&r.push(u)}return r},a.compose=function(){var n=arguments;return function(){for(var t=arguments,e=n.length;e--;)t=[n[e].apply(this,t)];return t[0]}},a.countBy=function(n,t,e){var r={};return t=a.createCallback(t,e),ot(n,function(n,e,u){e=t(n,e,u)+"",Mt.call(r,e)?r[e]++:r[e]=1}),r},a.createCallback=function(n,t,e){if(null==n)return kt;var r=typeof n;
|
||||
if("function"!=r){if("object"!=r)return function(t){return t[n]};var u=fe(n);return function(t){for(var e=u.length,r=!1;e--&&(r=Q(t[u[e]],n[u[e]],i)););return r}}return typeof t!="undefined"?1===e?function(e){return n.call(t,e)}:2===e?function(e,r){return n.call(t,e,r)}:4===e?function(e,r,u,a){return n.call(t,e,r,u,a)}:function(e,r,u){return n.call(t,e,r,u)}:n},a.debounce=function(n,t,e){function r(){i=null,e||(a=n.apply(o,u))}var u,a,o,i;return function(){var f=e&&!i;return u=arguments,o=this,Dt(i),i=Gt(r,t),f&&(a=n.apply(o,u)),a
|
||||
}},a.defaults=se,a.defer=_t,a.delay=function(n,t){var r=P(arguments,2);return Gt(function(){n.apply(e,r)},t)},a.difference=function(n){for(var t=-1,e=n?n.length:0,r=zt.apply(Bt,arguments),r=$(r,e),u=[];++t<e;){var a=n[t];r(a)||u.push(a)}return u},a.filter=ut,a.flatten=vt,a.forEach=ot,a.forIn=ae,a.forOwn=oe,a.functions=J,a.groupBy=function(n,t,e){var r={};return t=a.createCallback(t,e),ot(n,function(n,e,u){e=t(n,e,u)+"",(Mt.call(r,e)?r[e]:r[e]=[]).push(n)}),r},a.initial=function(n,t,e){if(!n)return[];
|
||||
var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;for(t=a.createCallback(t,e);o--&&t(n[o],o,n);)r++}else r=null==t||e?1:t||r;return P(n,0,Zt(Yt(0,u-r),u))},a.intersection=function(n){var t=arguments,e=t.length,r={0:{}},u=-1,a=n?n.length:0,o=100<=a,i=[],f=i;n:for(;++u<a;){var c=n[u];if(o)var l=c+"",l=Mt.call(r[0],l)?!(f=r[0][l]):f=r[0][l]=[];if(l||0>gt(f,c)){o&&f.push(c);for(var p=e;--p;)if(!(r[p]||(r[p]=$(t[p],0,100)))(c))continue n;i.push(c)}}return i},a.invert=L,a.invoke=function(n,t){var e=P(arguments,2),r=-1,u=typeof t=="function",a=n?n.length:0,o=Ct(typeof a=="number"?a:0);
|
||||
return ot(n,function(n){o[++r]=(u?t:n[t]).apply(n,e)}),o},a.keys=fe,a.map=it,a.max=ft,a.memoize=function(n,t){var e={};return function(){var r=(t?t.apply(this,arguments):arguments[0])+"";return Mt.call(e,r)?e[r]:e[r]=n.apply(this,arguments)}},a.merge=nt,a.min=function(n,t,e){var r=1/0,u=r;if(!t&&ie(n)){e=-1;for(var o=n.length;++e<o;){var i=n[e];i<u&&(u=i)}}else t=!t&&Z(n)?B:a.createCallback(t,e),ue(n,function(n,e,a){e=t(n,e,a),e<r&&(r=e,u=n)});return u},a.omit=function(n,t,e){var r=typeof t=="function",u={};
|
||||
if(r)t=a.createCallback(t,e);else var o=zt.apply(Bt,arguments);return ae(n,function(n,e,a){(r?!t(n,e,a):0>gt(o,e,1))&&(u[e]=n)}),u},a.once=function(n){var t,e;return function(){return t?e:(t=!0,e=n.apply(this,arguments),n=null,e)}},a.pairs=function(n){for(var t=-1,e=fe(n),r=e.length,u=Ct(r);++t<r;){var a=e[t];u[t]=[a,n[a]]}return u},a.partial=function(n){return q(n,P(arguments,1))},a.partialRight=function(n){return q(n,P(arguments,1),null,i)},a.pick=function(n,t,e){var r={};if(typeof t!="function")for(var u=0,o=zt.apply(Bt,arguments),i=X(n)?o.length:0;++u<i;){var f=o[u];
|
||||
f in n&&(r[f]=n[f])}else t=a.createCallback(t,e),ae(n,function(n,e,u){t(n,e,u)&&(r[e]=n)});return r},a.pluck=it,a.range=function(n,t,e){n=+n||0,e=+e||1,null==t&&(t=n,n=0);var r=-1;t=Yt(0,Tt((t-n)/e));for(var u=Ct(t);++r<t;)u[r]=n,n+=e;return u},a.reject=function(n,t,e){return t=a.createCallback(t,e),ut(n,function(n,e,r){return!t(n,e,r)})},a.rest=ht,a.shuffle=function(n){var t=-1,e=n?n.length:0,r=Ct(typeof e=="number"?e:0);return ot(n,function(n){var e=Kt(te()*(++t+1));r[t]=r[e],r[e]=n}),r},a.sortBy=function(n,t,e){var r=-1,u=n?n.length:0,o=Ct(typeof u=="number"?u:0);
|
||||
for(t=a.createCallback(t,e),ot(n,function(n,e,u){o[++r]={a:t(n,e,u),b:r,c:n}}),u=o.length,o.sort(F);u--;)o[u]=o[u].c;return o},a.tap=function(n,t){return t(n),n},a.throttle=function(n,t){function e(){i=new Ot,o=null,u=n.apply(a,r)}var r,u,a,o,i=0;return function(){var f=new Ot,c=t-(f-i);return r=arguments,a=this,0<c?o||(o=Gt(e,c)):(Dt(o),o=null,i=f,u=n.apply(a,r)),u}},a.times=function(n,t,e){n=-1<(n=+n)?n:0;var r=-1,u=Ct(n);for(t=a.createCallback(t,e,1);++r<n;)u[r]=t(r);return u},a.toArray=function(n){return n&&typeof n.length=="number"?P(n):tt(n)
|
||||
},a.union=function(){return mt(zt.apply(Bt,arguments))},a.uniq=mt,a.values=tt,a.where=ut,a.without=function(n){for(var t=-1,e=n?n.length:0,r=$(arguments,1),u=[];++t<e;){var a=n[t];r(a)||u.push(a)}return u},a.wrap=function(n,t){return function(){var e=[n];return Ut.apply(e,arguments),t.apply(this,e)}},a.zip=function(n){for(var t=-1,e=n?ft(it(arguments,"length")):0,r=Ct(e);++t<e;)r[t]=it(arguments,t);return r},a.zipObject=bt,a.collect=it,a.drop=ht,a.each=ot,a.extend=pe,a.methods=J,a.object=bt,a.select=ut,a.tail=ht,a.unique=mt,jt(a),a.clone=H,a.cloneDeep=function(n,t,e){return H(n,!0,t,e)
|
||||
},a.contains=et,a.escape=function(n){return null==n?"":(n+"").replace(m,D)},a.every=rt,a.find=at,a.has=function(n,t){return n?Mt.call(n,t):!1},a.identity=kt,a.indexOf=gt,a.isArguments=U,a.isArray=ie,a.isBoolean=function(n){return!0===n||!1===n||Ht.call(n)==j},a.isDate=function(n){return n instanceof Ot||Ht.call(n)==w},a.isElement=function(n){return n?1===n.nodeType:!1},a.isEmpty=function(n){var t=!0;if(!n)return t;var e=Ht.call(n),r=n.length;return e==k||e==N||e==_||e==x&&typeof r=="number"&&W(n.splice)?!r:(oe(n,function(){return t=!1
|
||||
}),t)},a.isEqual=Q,a.isFinite=function(n){return Qt(n)&&!Wt(parseFloat(n))},a.isFunction=W,a.isNaN=function(n){return Y(n)&&n!=+n},a.isNull=function(n){return null===n},a.isNumber=Y,a.isObject=X,a.isPlainObject=ve,a.isRegExp=function(n){return n instanceof It||Ht.call(n)==O},a.isString=Z,a.isUndefined=function(n){return typeof n=="undefined"},a.lastIndexOf=function(n,t,e){var r=n?n.length:0;for(typeof e=="number"&&(r=(0>e?Yt(0,r+e):Zt(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},a.mixin=jt,a.noConflict=function(){return r._=qt,this
|
||||
},a.parseInt=Vt,a.random=function(n,t){return null==n&&null==t&&(t=1),n=+n||0,null==t&&(t=n,n=0),n+Kt(te()*((+t||0)-n+1))},a.reduce=ct,a.reduceRight=lt,a.result=function(n,t){var r=n?n[t]:e;return W(r)?n[t]():r},a.runInContext=t,a.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:fe(n).length},a.some=pt,a.sortedIndex=yt,a.template=function(n,t,r){var u=a.templateSettings;n||(n=""),r=se({},r,u);var o,i=se({},r.imports,u.imports),u=fe(i),i=tt(i),f=0,c=r.interpolate||y,v="__p+='",c=It((r.escape||y).source+"|"+c.source+"|"+(c===h?g:y).source+"|"+(r.evaluate||y).source+"|$","g");
|
||||
n.replace(c,function(t,e,r,u,a,i){return r||(r=u),v+=n.slice(f,i).replace(b,T),e&&(v+="'+__e("+e+")+'"),a&&(o=!0,v+="';"+a+";__p+='"),r&&(v+="'+((__t=("+r+"))==null?'':__t)+'"),f=i+t.length,t}),v+="';\n",c=r=r.variable,c||(r="obj",v="with("+r+"){"+v+"}"),v=(o?v.replace(l,""):v).replace(p,"$1").replace(s,"$1;"),v="function("+r+"){"+(c?"":r+"||("+r+"={});")+"var __t,__p='',__e=_.escape"+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+v+"return __p}";try{var m=Nt(u,"return "+v).apply(e,i)
|
||||
}catch(d){throw d.source=v,d}return t?m(t):(m.source=v,m)},a.unescape=function(n){return null==n?"":(n+"").replace(c,M)},a.uniqueId=function(n){var t=++o;return(null==n?"":n+"")+t},a.all=rt,a.any=pt,a.detect=at,a.foldl=ct,a.foldr=lt,a.include=et,a.inject=ct,oe(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(){var t=[this.__wrapped__];return Ut.apply(t,arguments),n.apply(a,t)})}),a.first=st,a.last=function(n,t,e){if(n){var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;for(t=a.createCallback(t,e);o--&&t(n[o],o,n);)r++
|
||||
}else if(r=t,null==r||e)return n[u-1];return P(n,Yt(0,u-r))}},a.take=st,a.head=st,oe(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(t,e){var r=n(this.__wrapped__,t,e);return null==t||e&&typeof t!="function"?r:new z(r)})}),a.VERSION="1.0.1",a.prototype.toString=function(){return this.__wrapped__+""},a.prototype.value=wt,a.prototype.valueOf=wt,ue(["join","pop","shift"],function(n){var t=Bt[n];a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)}}),ue(["push","reverse","sort","unshift"],function(n){var t=Bt[n];
|
||||
a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),ue(["concat","slice","splice"],function(n){var t=Bt[n];a.prototype[n]=function(){return new z(t.apply(this.__wrapped__,arguments))}}),a}var e,r=typeof exports=="object"&&exports,u=typeof module=="object"&&module&&module.exports==r&&module,a=typeof global=="object"&&global;a.global===a&&(n=a);var o=0,i={},f=30,c=/&(?:amp|lt|gt|quot|#39);/g,l=/\b__p\+='';/g,p=/\b(__p\+=)''\+/g,s=/(__e\(.*?\)|\b__t\))\+'';/g,v=/\w*$/,g=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,h=/<%=([\s\S]+?)%>/g,y=/($^)/,m=/[&<>"']/g,b=/['\n\r\t\u2028\u2029\\]/g,d="Array Boolean Date Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),_="[object Arguments]",k="[object Array]",j="[object Boolean]",w="[object Date]",C="[object Number]",x="[object Object]",O="[object RegExp]",N="[object String]",S={"[object Function]":!1};
|
||||
S[_]=S[k]=S[j]=S[w]=S[C]=S[x]=S[O]=S[N]=!0;var A={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},E={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},I=t();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=I,define(function(){return I})):r&&!r.nodeType?u?(u.exports=I)._=I:r._=I:n._=I})(this);
|
||||
21
dist/lodash.underscore.js
vendored
21
dist/lodash.underscore.js
vendored
@@ -3264,9 +3264,11 @@
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Creates a function that is restricted to executing `func` only after it is
|
||||
* called `n` times. The `func` is executed with the `this` binding of the
|
||||
* created function.
|
||||
* If `n` is greater than `0`, a function is created that is restricted to
|
||||
* executing `func`, with the `this` binding and arguments of the created
|
||||
* function, only after it is called `n` times. If `n` is less than `1`,
|
||||
* `func` is executed immediately, without a `this` binding or additional
|
||||
* arguments, and its result is returned.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
@@ -3421,6 +3423,19 @@
|
||||
*
|
||||
* _.filter(stooges, 'age__gt45');
|
||||
* // => [{ 'name': 'larry', 'age': 50 }]
|
||||
*
|
||||
* // create mixins with support for "_.pluck" and "_.where" callback shorthands
|
||||
* _.mixin({
|
||||
* 'toLookup': function(collection, callback, thisArg) {
|
||||
* callback = _.createCallback(callback, thisArg);
|
||||
* return _.reduce(collection, function(result, value, index, collection) {
|
||||
* return (result[callback(value, index, collection)] = value, result);
|
||||
* }, {});
|
||||
* }
|
||||
* });
|
||||
*
|
||||
* _.toLookup(stooges, 'name');
|
||||
* // => { 'moe': { 'name': 'moe', 'age': 40 }, 'larry': { 'name': 'larry', 'age': 50 } }
|
||||
*/
|
||||
function createCallback(func, thisArg, argCount) {
|
||||
if (func == null) {
|
||||
|
||||
@@ -896,7 +896,7 @@ The wrapper functions `first` and `last` return wrapped values when `n` is passe
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_tapvalue-interceptor"></a>`_.tap(value, interceptor)`
|
||||
<a href="#_tapvalue-interceptor">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5065 "View in source") [Ⓣ][1]
|
||||
<a href="#_tapvalue-interceptor">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5080 "View in source") [Ⓣ][1]
|
||||
|
||||
Invokes `interceptor` with the `value` as the first argument, and then returns `value`. The purpose of this method is to "tap into" a method chain, in order to perform operations on intermediate results within the chain.
|
||||
|
||||
@@ -926,7 +926,7 @@ _([1, 2, 3, 4])
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_prototypetostring"></a>`_.prototype.toString()`
|
||||
<a href="#_prototypetostring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5082 "View in source") [Ⓣ][1]
|
||||
<a href="#_prototypetostring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5097 "View in source") [Ⓣ][1]
|
||||
|
||||
Produces the `toString` result of the wrapped value.
|
||||
|
||||
@@ -947,7 +947,7 @@ _([1, 2, 3]).toString();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_prototypevalueof"></a>`_.prototype.valueOf()`
|
||||
<a href="#_prototypevalueof">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5099 "View in source") [Ⓣ][1]
|
||||
<a href="#_prototypevalueof">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5114 "View in source") [Ⓣ][1]
|
||||
|
||||
Extracts the wrapped value.
|
||||
|
||||
@@ -1787,9 +1787,9 @@ _.where(stooges, { 'age': 40 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_aftern-func"></a>`_.after(n, func)`
|
||||
<a href="#_aftern-func">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4095 "View in source") [Ⓣ][1]
|
||||
<a href="#_aftern-func">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4097 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that is restricted to executing `func` only after it is called `n` times. The `func` is executed with the `this` binding of the created function.
|
||||
If `n` is greater than `0`, a function is created that is restricted to executing `func`, with the `this` binding and arguments of the created function, only after it is called `n` times. If `n` is less than `1`, `func` is executed immediately, without a `this` binding or additional arguments, and its result is returned.
|
||||
|
||||
#### Arguments
|
||||
1. `n` *(Number)*: The number of times the function must be called before it is executed.
|
||||
@@ -1815,7 +1815,7 @@ _.forEach(notes, function(note) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_bindfunc--thisarg-arg1-arg2-"></a>`_.bind(func [, thisArg, arg1, arg2, ...])`
|
||||
<a href="#_bindfunc--thisarg-arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4128 "View in source") [Ⓣ][1]
|
||||
<a href="#_bindfunc--thisarg-arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4130 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that, when called, invokes `func` with the `this` binding of `thisArg` and prepends any additional `bind` arguments to those passed to the bound function.
|
||||
|
||||
@@ -1846,7 +1846,7 @@ func();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_bindallobject--methodname1-methodname2-"></a>`_.bindAll(object [, methodName1, methodName2, ...])`
|
||||
<a href="#_bindallobject--methodname1-methodname2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4159 "View in source") [Ⓣ][1]
|
||||
<a href="#_bindallobject--methodname1-methodname2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4161 "View in source") [Ⓣ][1]
|
||||
|
||||
Binds methods on `object` to `object`, overwriting the existing method. Method names may be specified as individual arguments or as arrays of method names. If no method names are provided, all the function properties of `object` will be bound.
|
||||
|
||||
@@ -1877,7 +1877,7 @@ jQuery('#docs').on('click', view.onClick);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_bindkeyobject-key--arg1-arg2-"></a>`_.bindKey(object, key [, arg1, arg2, ...])`
|
||||
<a href="#_bindkeyobject-key--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4205 "View in source") [Ⓣ][1]
|
||||
<a href="#_bindkeyobject-key--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4207 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that, when called, invokes the method at `object[key]` and prepends any additional `bindKey` arguments to those passed to the bound function. This method differs from `_.bind` by allowing bound functions to reference methods that will be redefined or don't yet exist. See http://michaux.ca/articles/lazy-function-definition-pattern.
|
||||
|
||||
@@ -1918,7 +1918,7 @@ func();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_composefunc1-func2-"></a>`_.compose([func1, func2, ...])`
|
||||
<a href="#_composefunc1-func2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4228 "View in source") [Ⓣ][1]
|
||||
<a href="#_composefunc1-func2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4230 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that is the composition of the passed functions, where each function consumes the return value of the function that follows. For example, composing the functions `f()`, `g()`, and `h()` produces `f(g(h()))`. Each function is executed with the `this` binding of the composed function.
|
||||
|
||||
@@ -1945,7 +1945,7 @@ welcome('moe');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_createcallbackfuncidentity-thisarg-argcount3"></a>`_.createCallback([func=identity, thisArg, argCount=3])`
|
||||
<a href="#_createcallbackfuncidentity-thisarg-argcount3">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4272 "View in source") [Ⓣ][1]
|
||||
<a href="#_createcallbackfuncidentity-thisarg-argcount3">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4287 "View in source") [Ⓣ][1]
|
||||
|
||||
Produces a callback bound to an optional `thisArg`. If `func` is a property name, the created callback will return the property value for a given element. If `func` is an object, the created callback will return `true` for elements that contain the equivalent object properties, otherwise it will return `false`.
|
||||
|
||||
@@ -1974,6 +1974,19 @@ _.createCallback = _.wrap(_.createCallback, function(func, callback, thisArg) {
|
||||
|
||||
_.filter(stooges, 'age__gt45');
|
||||
// => [{ 'name': 'larry', 'age': 50 }]
|
||||
|
||||
// create mixins with support for "_.pluck" and "_.where" callback shorthands
|
||||
_.mixin({
|
||||
'toLookup': function(collection, callback, thisArg) {
|
||||
callback = _.createCallback(callback, thisArg);
|
||||
return _.reduce(collection, function(result, value, index, collection) {
|
||||
return (result[callback(value, index, collection)] = value, result);
|
||||
}, {});
|
||||
}
|
||||
});
|
||||
|
||||
_.toLookup(stooges, 'name');
|
||||
// => { 'moe': { 'name': 'moe', 'age': 40 }, 'larry': { 'name': 'larry', 'age': 50 } }
|
||||
```
|
||||
|
||||
* * *
|
||||
@@ -1984,7 +1997,7 @@ _.filter(stooges, 'age__gt45');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_debouncefunc-wait-immediate"></a>`_.debounce(func, wait, immediate)`
|
||||
<a href="#_debouncefunc-wait-immediate">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4338 "View in source") [Ⓣ][1]
|
||||
<a href="#_debouncefunc-wait-immediate">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4353 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that will delay the execution of `func` until after `wait` milliseconds have elapsed since the last time it was invoked. Pass `true` for `immediate` to cause debounce to invoke `func` on the leading, instead of the trailing, edge of the `wait` timeout. Subsequent calls to the debounced function will return the result of the last `func` call.
|
||||
|
||||
@@ -2010,7 +2023,7 @@ jQuery(window).on('resize', lazyLayout);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_deferfunc--arg1-arg2-"></a>`_.defer(func [, arg1, arg2, ...])`
|
||||
<a href="#_deferfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4380 "View in source") [Ⓣ][1]
|
||||
<a href="#_deferfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4395 "View in source") [Ⓣ][1]
|
||||
|
||||
Defers executing the `func` function until the current call stack has cleared. Additional arguments will be passed to `func` when it is invoked.
|
||||
|
||||
@@ -2035,7 +2048,7 @@ _.defer(function() { alert('deferred'); });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_delayfunc-wait--arg1-arg2-"></a>`_.delay(func, wait [, arg1, arg2, ...])`
|
||||
<a href="#_delayfunc-wait--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4406 "View in source") [Ⓣ][1]
|
||||
<a href="#_delayfunc-wait--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4421 "View in source") [Ⓣ][1]
|
||||
|
||||
Executes the `func` function after `wait` milliseconds. Additional arguments will be passed to `func` when it is invoked.
|
||||
|
||||
@@ -2062,7 +2075,7 @@ _.delay(log, 1000, 'logged later');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_memoizefunc--resolver"></a>`_.memoize(func [, resolver])`
|
||||
<a href="#_memoizefunc--resolver">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4430 "View in source") [Ⓣ][1]
|
||||
<a href="#_memoizefunc--resolver">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4445 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that memoizes the result of `func`. If `resolver` is passed, it will be used to determine the cache key for storing the result based on the arguments passed to the memoized function. By default, the first argument passed to the memoized function is used as the cache key. The `func` is executed with the `this` binding of the memoized function.
|
||||
|
||||
@@ -2088,7 +2101,7 @@ var fibonacci = _.memoize(function(n) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_oncefunc"></a>`_.once(func)`
|
||||
<a href="#_oncefunc">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4457 "View in source") [Ⓣ][1]
|
||||
<a href="#_oncefunc">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4472 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that is restricted to execute `func` once. Repeat calls to the function will return the value of the first call. The `func` is executed with the `this` binding of the created function.
|
||||
|
||||
@@ -2114,7 +2127,7 @@ initialize();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_partialfunc--arg1-arg2-"></a>`_.partial(func [, arg1, arg2, ...])`
|
||||
<a href="#_partialfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4492 "View in source") [Ⓣ][1]
|
||||
<a href="#_partialfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4507 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that, when called, invokes `func` with any additional `partial` arguments prepended to those passed to the new function. This method is similar to `_.bind`, except it does **not** alter the `this` binding.
|
||||
|
||||
@@ -2141,7 +2154,7 @@ hi('moe');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_partialrightfunc--arg1-arg2-"></a>`_.partialRight(func [, arg1, arg2, ...])`
|
||||
<a href="#_partialrightfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4523 "View in source") [Ⓣ][1]
|
||||
<a href="#_partialrightfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4538 "View in source") [Ⓣ][1]
|
||||
|
||||
This method is similar to `_.partial`, except that `partial` arguments are appended to those passed to the new function.
|
||||
|
||||
@@ -2178,7 +2191,7 @@ options.imports
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_throttlefunc-wait"></a>`_.throttle(func, wait)`
|
||||
<a href="#_throttlefunc-wait">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4545 "View in source") [Ⓣ][1]
|
||||
<a href="#_throttlefunc-wait">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4560 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that, when executed, will only call the `func` function at most once per every `wait` milliseconds. If the throttled function is invoked more than once during the `wait` timeout, `func` will also be called on the trailing edge of the timeout. Subsequent calls to the throttled function will return the result of the last `func` call.
|
||||
|
||||
@@ -2203,7 +2216,7 @@ jQuery(window).on('scroll', throttled);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_wrapvalue-wrapper"></a>`_.wrap(value, wrapper)`
|
||||
<a href="#_wrapvalue-wrapper">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4598 "View in source") [Ⓣ][1]
|
||||
<a href="#_wrapvalue-wrapper">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4613 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that passes `value` to the `wrapper` function as its first argument. Additional arguments passed to the function are appended to those passed to the `wrapper` function. The `wrapper` is executed with the `this` binding of the created function.
|
||||
|
||||
@@ -3219,7 +3232,7 @@ _.values({ 'one': 1, 'two': 2, 'three': 3 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_escapestring"></a>`_.escape(string)`
|
||||
<a href="#_escapestring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4622 "View in source") [Ⓣ][1]
|
||||
<a href="#_escapestring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4637 "View in source") [Ⓣ][1]
|
||||
|
||||
Converts the characters `&`, `<`, `>`, `"`, and `'` in `string` to their corresponding HTML entities.
|
||||
|
||||
@@ -3243,7 +3256,7 @@ _.escape('Moe, Larry & Curly');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_identityvalue"></a>`_.identity(value)`
|
||||
<a href="#_identityvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4640 "View in source") [Ⓣ][1]
|
||||
<a href="#_identityvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4655 "View in source") [Ⓣ][1]
|
||||
|
||||
This function returns the first argument passed to it.
|
||||
|
||||
@@ -3268,7 +3281,7 @@ moe === _.identity(moe);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_mixinobject"></a>`_.mixin(object)`
|
||||
<a href="#_mixinobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4666 "View in source") [Ⓣ][1]
|
||||
<a href="#_mixinobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4681 "View in source") [Ⓣ][1]
|
||||
|
||||
Adds functions properties of `object` to the `lodash` function and chainable wrapper.
|
||||
|
||||
@@ -3298,7 +3311,7 @@ _('moe').capitalize();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_noconflict"></a>`_.noConflict()`
|
||||
<a href="#_noconflict">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4695 "View in source") [Ⓣ][1]
|
||||
<a href="#_noconflict">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4710 "View in source") [Ⓣ][1]
|
||||
|
||||
Reverts the '_' variable to its previous value and returns a reference to the `lodash` function.
|
||||
|
||||
@@ -3318,7 +3331,7 @@ var lodash = _.noConflict();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_parseintvalue"></a>`_.parseInt(value)`
|
||||
<a href="#_parseintvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4716 "View in source") [Ⓣ][1]
|
||||
<a href="#_parseintvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4731 "View in source") [Ⓣ][1]
|
||||
|
||||
Converts the given `value` into an integer of the specified `radix`.
|
||||
|
||||
@@ -3344,7 +3357,7 @@ _.parseInt('08');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_randommin0-max1"></a>`_.random([min=0, max=1])`
|
||||
<a href="#_randommin0-max1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4739 "View in source") [Ⓣ][1]
|
||||
<a href="#_randommin0-max1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4754 "View in source") [Ⓣ][1]
|
||||
|
||||
Produces a random number between `min` and `max` *(inclusive)*. If only one argument is passed, a number between `0` and the given number will be returned.
|
||||
|
||||
@@ -3372,7 +3385,7 @@ _.random(5);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_resultobject-property"></a>`_.result(object, property)`
|
||||
<a href="#_resultobject-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4778 "View in source") [Ⓣ][1]
|
||||
<a href="#_resultobject-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4793 "View in source") [Ⓣ][1]
|
||||
|
||||
Resolves the value of `property` on `object`. If `property` is a function, it will be invoked with the `this` binding of `object` and its result returned, else the property value is returned. If `object` is falsey, then `undefined` is returned.
|
||||
|
||||
@@ -3425,7 +3438,7 @@ Create a new `lodash` function using the given `context` object.
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_templatetext-data-options"></a>`_.template(text, data, options)`
|
||||
<a href="#_templatetext-data-options">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4865 "View in source") [Ⓣ][1]
|
||||
<a href="#_templatetext-data-options">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4880 "View in source") [Ⓣ][1]
|
||||
|
||||
A micro-templating method that handles arbitrary delimiters, preserves whitespace, and correctly escapes quotes within interpolated code.
|
||||
|
||||
@@ -3509,7 +3522,7 @@ fs.writeFileSync(path.join(cwd, 'jst.js'), '\
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_timesn-callback--thisarg"></a>`_.times(n, callback [, thisArg])`
|
||||
<a href="#_timesn-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4990 "View in source") [Ⓣ][1]
|
||||
<a href="#_timesn-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5005 "View in source") [Ⓣ][1]
|
||||
|
||||
Executes the `callback` function `n` times, returning an array of the results of each `callback` execution. The `callback` is bound to `thisArg` and invoked with one argument; *(index)*.
|
||||
|
||||
@@ -3541,7 +3554,7 @@ _.times(3, function(n) { this.cast(n); }, mage);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_unescapestring"></a>`_.unescape(string)`
|
||||
<a href="#_unescapestring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5017 "View in source") [Ⓣ][1]
|
||||
<a href="#_unescapestring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5032 "View in source") [Ⓣ][1]
|
||||
|
||||
The opposite of `_.escape`, this method converts the HTML entities `&`, `<`, `>`, `"`, and `'` in `string` to their corresponding characters.
|
||||
|
||||
@@ -3565,7 +3578,7 @@ _.unescape('Moe, Larry & Curly');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_uniqueidprefix"></a>`_.uniqueId([prefix])`
|
||||
<a href="#_uniqueidprefix">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5037 "View in source") [Ⓣ][1]
|
||||
<a href="#_uniqueidprefix">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5052 "View in source") [Ⓣ][1]
|
||||
|
||||
Generates a unique ID. If `prefix` is passed, the ID will be appended to it.
|
||||
|
||||
@@ -3618,7 +3631,7 @@ A reference to the `lodash` function.
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_version"></a>`_.VERSION`
|
||||
<a href="#_version">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5271 "View in source") [Ⓣ][1]
|
||||
<a href="#_version">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5286 "View in source") [Ⓣ][1]
|
||||
|
||||
*(String)*: The semantic version number.
|
||||
|
||||
|
||||
23
lodash.js
23
lodash.js
@@ -4073,9 +4073,11 @@
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Creates a function that is restricted to executing `func` only after it is
|
||||
* called `n` times. The `func` is executed with the `this` binding of the
|
||||
* created function.
|
||||
* If `n` is greater than `0`, a function is created that is restricted to
|
||||
* executing `func`, with the `this` binding and arguments of the created
|
||||
* function, only after it is called `n` times. If `n` is less than `1`,
|
||||
* `func` is executed immediately, without a `this` binding or additional
|
||||
* arguments, and its result is returned.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
@@ -4268,6 +4270,19 @@
|
||||
*
|
||||
* _.filter(stooges, 'age__gt45');
|
||||
* // => [{ 'name': 'larry', 'age': 50 }]
|
||||
*
|
||||
* // create mixins with support for "_.pluck" and "_.where" callback shorthands
|
||||
* _.mixin({
|
||||
* 'toLookup': function(collection, callback, thisArg) {
|
||||
* callback = _.createCallback(callback, thisArg);
|
||||
* return _.reduce(collection, function(result, value, index, collection) {
|
||||
* return (result[callback(value, index, collection)] = value, result);
|
||||
* }, {});
|
||||
* }
|
||||
* });
|
||||
*
|
||||
* _.toLookup(stooges, 'name');
|
||||
* // => { 'moe': { 'name': 'moe', 'age': 40 }, 'larry': { 'name': 'larry', 'age': 50 } }
|
||||
*/
|
||||
function createCallback(func, thisArg, argCount) {
|
||||
if (func == null) {
|
||||
@@ -4992,7 +5007,7 @@
|
||||
var index = -1,
|
||||
result = Array(n);
|
||||
|
||||
callback = createCallback(callback, thisArg, 1);
|
||||
callback = lodash.createCallback(callback, thisArg, 1);
|
||||
while (++index < n) {
|
||||
result[index] = callback(index);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user