mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 16:17:50 +00:00
39 lines
18 KiB
JavaScript
39 lines
18 KiB
JavaScript
/**
|
|
* @license
|
|
* Lo-Dash 2.2.1 (Custom Build) lodash.com/license | Underscore.js 1.5.2 underscorejs.org/LICENSE
|
|
* Build: `lodash underscore exports="amd,commonjs,global,node" -o ./dist/lodash.underscore.js`
|
|
*/
|
|
;(function(){function n(n,r,t){t=(t||0)-1;for(var e=n?n.length:0;++t<e;)if(n[t]===r)return t;return-1}function r(n,r){var t=n.m,e=r.m;if(t!==e){if(t>e||typeof t=="undefined")return 1;if(t<e||typeof e=="undefined")return-1}return n.n-r.n}function t(n){return"\\"+yr[n]}function e(){}function u(n,r,t){r||(r=0),typeof t=="undefined"&&(t=n?n.length:0);var e=-1;t=t-r||0;for(var u=Array(0>t?0:t);++e<t;)u[e]=n[r+e];return u}function o(n){return n instanceof o?n:new i(n)}function i(n,r){this.__chain__=!!r,this.__wrapped__=n
|
|
}function f(n){function r(){if(e){var n=e.slice();Rr.apply(n,arguments)}if(this instanceof r){var o=a(t.prototype),n=t.apply(o,n||arguments);return T(n)?n:o}return t.apply(u,n||arguments)}var t=n[0],e=n[2],u=n[4];return r}function a(n){return T(n)?Br(n):{}}function l(n,r,t){if(typeof n!="function")return Z;if(typeof r=="undefined"||!("prototype"in n))return n;switch(t){case 1:return function(t){return n.call(r,t)};case 2:return function(t,e){return n.call(r,t,e)};case 3:return function(t,e,u){return n.call(r,t,e,u)
|
|
};case 4:return function(t,e,u,o){return n.call(r,t,e,u,o)}}return Q(n,r)}function c(n){function r(){var n=p?f:this;if(g||o||i){if(o){var y=o.slice();Rr.apply(y,arguments)}if((i||g)&&(y||(y=u(arguments)),i&&Rr.apply(y,i),g&&y.length<l))return e|=16,c([t,h?e:-4&e,y,null,f,l])}return y||(y=arguments),s&&(t=n[v]),this instanceof r?(n=a(t.prototype),y=t.apply(n,y),T(y)?y:n):t.apply(n,y)}var t=n[0],e=n[1],o=n[2],i=n[3],f=n[4],l=n[5],p=1&e,s=2&e,g=4&e,h=8&e,v=t;return r}function p(n,r,t,e){e=(e||0)-1;for(var u=n?n.length:0,o=[];++e<u;){var i=n[e];
|
|
if(i&&typeof i=="object"&&typeof i.length=="number"&&(Cr(i)||d(i))){r||(i=p(i,r,t));var f=-1,a=i.length,l=o.length;for(o.length+=a;++f<a;)o[l++]=i[f]}else t||o.push(i)}return o}function s(n,r,t,e){if(n===r)return 0!==n||1/n==1/r;if(n===n&&!(n&&vr[typeof n]||r&&vr[typeof r]))return!1;if(null==n||null==r)return n===r;var u=Er.call(n),i=Er.call(r);if(u!=i)return!1;switch(u){case lr:case cr:return+n==+r;case pr:return n!=+n?r!=+r:0==n?1/n==1/r:n==+r;case gr:case hr:return n==r+""}if(i=u==ar,!i){if(kr.call(n,"__wrapped__")||r instanceof o)return s(n.__wrapped__||n,r.__wrapped__||r,t,e);
|
|
if(u!=sr)return!1;var u=n.constructor,f=r.constructor;if(u!=f&&!(E(u)&&u instanceof u&&E(f)&&f instanceof f)&&"constructor"in n&&"constructor"in r)return!1}for(t||(t=[]),e||(e=[]),u=t.length;u--;)if(t[u]==n)return e[u]==r;var a=!0,l=0;if(t.push(n),e.push(r),i){if(l=r.length,a=l==n.length)for(;l--&&(a=s(n[l],r[l],t,e)););return a}return Kr(r,function(r,u,o){return kr.call(o,u)?(l++,!(a=kr.call(n,u)&&s(n[u],r,t,e))&&er):void 0}),a&&Kr(n,function(n,r,t){return kr.call(t,r)?!(a=-1<--l)&&er:void 0}),a
|
|
}function g(n,r,t){for(var e=-1,u=m(),o=n?n.length:0,i=[],f=t?[]:i;++e<o;){var a=n[e],l=t?t(a,e,n):a;(r?!e||f[f.length-1]!==l:0>u(f,l))&&(t&&f.push(l),i.push(a))}return i}function h(n){return function(r,t,e){var u={};t=X(t,e,3),e=-1;var o=r?r.length:0;if(typeof o=="number")for(;++e<o;){var i=r[e];n(u,i,t(i,e,r),r)}else Lr(r,function(r,e,o){n(u,r,t(r,e,o),o)});return u}}function v(n,r,t,e,u,o){var i=16&r,a=32&r;if(!(2&r||E(n)))throw new TypeError;return i&&!t.length&&(r&=-17,t=!1),a&&!e.length&&(r&=-33,e=!1),(1==r||17===r?f:c)([n,r,t,e,u,o])
|
|
}function y(n){return Vr[n]}function m(){var r=(r=o.indexOf)===H?n:r;return r}function _(n){return Gr[n]}function d(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Er.call(n)==fr||!1}function b(n){if(!n)return n;for(var r=1,t=arguments.length;r<t;r++){var e=arguments[r];if(e)for(var u in e)n[u]=e[u]}return n}function w(n){if(!n)return n;for(var r=1,t=arguments.length;r<t;r++){var e=arguments[r];if(e)for(var u in e)"undefined"==typeof n[u]&&(n[u]=e[u])}return n}function j(n){var r=[];return Kr(n,function(n,t){E(n)&&r.push(t)
|
|
}),r.sort()}function x(n){for(var r=-1,t=Ur(n),e=t.length,u={};++r<e;){var o=t[r];u[n[o]]=o}return u}function A(n){if(!n)return!0;if(Cr(n)||S(n))return!n.length;for(var r in n)if(kr.call(n,r))return!1;return!0}function E(n){return typeof n=="function"}function T(n){return!(!n||!vr[typeof n])}function O(n){return typeof n=="number"||n&&typeof n=="object"&&Er.call(n)==pr||!1}function S(n){return typeof n=="string"||n&&typeof n=="object"&&Er.call(n)==hr||!1}function k(n){for(var r=-1,t=Ur(n),e=t.length,u=Array(e);++r<e;)u[r]=n[t[r]];
|
|
return u}function N(n,r){var t=m(),e=n?n.length:0,u=!1;return e&&typeof e=="number"?u=-1<t(n,r):Lr(n,function(n){return(u=n===r)&&er}),u}function R(n,r,t){var e=!0;r=X(r,t,3),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++t<u&&(e=!!r(n[t],t,n)););else Lr(n,function(n,t,u){return!(e=!!r(n,t,u))&&er});return e}function B(n,r,t){var e=[];r=X(r,t,3),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++t<u;){var o=n[t];r(o,t,n)&&e.push(o)}else Lr(n,function(n,t,u){r(n,t,u)&&e.push(n)});return e}function F(n,r,t){r=X(r,t,3),t=-1;
|
|
var e=n?n.length:0;if(typeof e!="number"){var u;return Lr(n,function(n,t,e){return r(n,t,e)?(u=n,er):void 0}),u}for(;++t<e;){var o=n[t];if(r(o,t,n))return o}}function q(n,r,t){var e=-1,u=n?n.length:0;if(r=r&&typeof t=="undefined"?r:l(r,t,3),typeof u=="number")for(;++e<u&&r(n[e],e,n)!==er;);else Lr(n,r)}function D(n,r){var t=n?n.length:0;if(typeof t=="number")for(;t--&&false!==r(n[t],t,n););else{var e=Ur(n),t=e.length;Lr(n,function(n,u,o){return u=e?e[--t]:--t,false===r(o[u],u,o)&&er})}}function M(n,r,t){var e=-1,u=n?n.length:0;
|
|
if(r=X(r,t,3),typeof u=="number")for(var o=Array(u);++e<u;)o[e]=r(n[e],e,n);else o=[],Lr(n,function(n,t,u){o[++e]=r(n,t,u)});return o}function $(n,r,t){var e=-1/0,u=e;typeof r!="function"&&t&&t[r]===n&&(r=null);var o=-1,i=n?n.length:0;if(null==r&&typeof i=="number")for(;++o<i;)t=n[o],t>u&&(u=t);else r=null==r&&S(n)?charAtCallback:X(r,t,3),q(n,function(n,t,o){t=r(n,t,o),t>e&&(e=t,u=n)});return u}function I(n,r){var t=-1,e=n?n.length:0;if(typeof e=="number")for(var u=Array(e);++t<e;)u[t]=n[t][r];return u||M(n,r)
|
|
}function W(n,r,t,e){if(!n)return t;var u=3>arguments.length;r=l(r,e,4);var o=-1,i=n.length;if(typeof i=="number")for(u&&(t=n[++o]);++o<i;)t=r(t,n[o],o,n);else Lr(n,function(n,e,o){t=u?(u=!1,n):r(t,n,e,o)});return t}function z(n,r,t,e){var u=3>arguments.length;return r=l(r,e,4),D(n,function(n,e,o){t=u?(u=!1,n):r(t,n,e,o)}),t}function C(n){var r=-1,t=n?n.length:0,e=Array(typeof t=="number"?t:0);return q(n,function(n){var t;t=++r,t=0+Sr(Wr()*(t-0+1)),e[r]=e[t],e[t]=n}),e}function P(n,r,t){var e;r=X(r,t,3),t=-1;
|
|
var u=n?n.length:0;if(typeof u=="number")for(;++t<u&&!(e=r(n[t],t,n)););else Lr(n,function(n,t,u){return(e=r(n,t,u))&&er});return!!e}function U(n,r,t){return t&&A(r)?rr:(t?F:B)(n,r)}function V(n){for(var r=-1,t=m(),e=n?n.length:0,u=p(arguments,!0,!0,1),o=[];++r<e;){var i=n[r];0>t(u,i)&&o.push(i)}return o}function G(n,r,t){var e=0,o=n?n.length:0;if(typeof r!="number"&&null!=r){var i=-1;for(r=X(r,t,3);++i<o&&r(n[i],i,n);)e++}else if(e=r,null==e||t)return n?n[0]:rr;return u(n,0,Ir($r(0,e),o))}function H(r,t,e){if(typeof e=="number"){var u=r?r.length:0;
|
|
e=0>e?$r(0,u+e):e||0}else if(e)return e=K(r,t),r[e]===t?e:-1;return n(r,t,e)}function J(n,r,t){if(typeof r!="number"&&null!=r){var e=0,o=-1,i=n?n.length:0;for(r=X(r,t,3);++o<i&&r(n[o],o,n);)e++}else e=null==r||t?1:$r(0,r);return u(n,e)}function K(n,r,t,e){var u=0,o=n?n.length:u;for(t=t?X(t,e,1):Z,r=t(r);u<o;)e=u+o>>>1,t(n[e])<r?u=e+1:o=e;return u}function L(n,r,t,e){return typeof r!="boolean"&&null!=r&&(e=t,t=typeof r!="function"&&e&&e[r]===n?null:r,r=!1),null!=t&&(t=X(t,e,3)),g(n,r,t)}function Q(n,r){return 2<arguments.length?v(n,17,u(arguments,2),null,r):v(n,1,null,null,r)
|
|
}function X(n,r,t){var e=typeof n;if(null==n||"function"==e)return l(n,r,t);if("object"!=e)return function(r){return r[n]};var u=Ur(n);return function(r){for(var t=u.length,e=!1;t--&&(e=r[u[t]]===n[u[t]]););return e}}function Y(n,r,t){var e,u,o,i,f,a,l,c=0,p=!1,s=!0;if(!E(n))throw new TypeError;if(r=$r(0,r)||0,true===t)var g=!0,s=!1;else T(t)&&(g=t.leading,p="maxWait"in t&&($r(r,t.maxWait)||0),s="trailing"in t?t.trailing:s);var h=function(){var t=r-(Nr()-i);0<t?a=setTimeout(h,t):(u&&clearTimeout(u),t=l,u=a=l=rr,t&&(c=Nr(),o=n.apply(f,e)))
|
|
},v=function(){a&&clearTimeout(a),u=a=l=rr,(s||p!==r)&&(c=Nr(),o=n.apply(f,e))};return function(){if(e=arguments,i=Nr(),f=this,l=s&&(a||!g),false===p)var t=g&&!a;else{u||g||(c=i);var y=p-(i-c);0<y?u||(u=setTimeout(v,y)):(u&&(u=clearTimeout(u)),c=i,o=n.apply(f,e))}return a||r===p||(a=setTimeout(h,r)),t&&(o=n.apply(f,e)),o}}function Z(n){return n}function nr(n){q(j(n),function(r){var t=o[r]=n[r];o.prototype[r]=function(){var n=[this.__wrapped__];return Rr.apply(n,arguments),n=t.apply(o,n),this.__chain__?new i(n,!0):n
|
|
}})}var rr,tr=0,er={},ur=+new Date+"",or=/($^)/,ir=/['\n\r\t\u2028\u2029\\]/g,fr="[object Arguments]",ar="[object Array]",lr="[object Boolean]",cr="[object Date]",pr="[object Number]",sr="[object Object]",gr="[object RegExp]",hr="[object String]",vr={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},yr={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},mr=vr[typeof window]&&window||this,_r=vr[typeof exports]&&exports&&!exports.nodeType&&exports,dr=vr[typeof module]&&module&&!module.nodeType&&module,br=dr&&dr.exports===_r&&_r,wr=vr[typeof global]&&global;
|
|
!wr||wr.global!==wr&&wr.window!==wr||(mr=wr);var jr=[],xr=Object.prototype,Ar=mr._,Er=xr.toString,Tr=RegExp("^"+(Er+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),Or=Math.ceil,Sr=Math.floor,kr=xr.hasOwnProperty,Nr=Tr.test(Nr=Date.now)&&Nr||function(){return+new Date},Rr=jr.push,Br=Tr.test(Br=Object.create)&&Br,Fr=Tr.test(Fr=Array.isArray)&&Fr,qr=mr.isFinite,Dr=mr.isNaN,Mr=Tr.test(Mr=Object.keys)&&Mr,$r=Math.max,Ir=Math.min,Wr=Math.random;i.prototype=o.prototype;
|
|
var zr={};!function(){var n={0:1,length:1};zr.spliceObjects=(jr.splice.call(n,0,1),!n[0])}(1),o.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},Br||(a=function(n){if(T(n)){e.prototype=n;var r=new e;e.prototype=null}return r||{}}),d(arguments)||(d=function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&kr.call(n,"callee")||!1});var Cr=Fr||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Er.call(n)==ar||!1
|
|
},Pr=function(n){var r,t=[];if(!n||!vr[typeof n])return t;for(r in n)kr.call(n,r)&&t.push(r);return t},Ur=Mr?function(n){return T(n)?Mr(n):[]}:Pr,Vr={"&":"&","<":"<",">":">",'"':""","'":"'"},Gr=x(Vr),Hr=RegExp("("+Ur(Gr).join("|")+")","g"),Jr=RegExp("["+Ur(Vr).join("")+"]","g"),Kr=function(n,r){var t;if(!n||!vr[typeof n])return n;for(t in n)if(r(n[t],t,n)===er)break;return n},Lr=function(n,r){var t;if(!n||!vr[typeof n])return n;for(t in n)if(kr.call(n,t)&&r(n[t],t,n)===er)break;
|
|
return n};E(/x/)&&(E=function(n){return typeof n=="function"&&"[object Function]"==Er.call(n)});var Qr=h(function(n,r,t){kr.call(n,t)?n[t]++:n[t]=1}),Xr=h(function(n,r,t){(kr.call(n,t)?n[t]:n[t]=[]).push(r)}),Yr=h(function(n,r,t){n[t]=r});o.after=function(n,r){if(!E(r))throw new TypeError;return function(){return 1>--n?r.apply(this,arguments):void 0}},o.bind=Q,o.bindAll=function(n){for(var r=1<arguments.length?p(arguments,!0,!1,1):j(n),t=-1,e=r.length;++t<e;){var u=r[t];n[u]=v(n[u],1,null,null,n)}return n
|
|
},o.chain=function(n){return n=new i(n),n.__chain__=!0,n},o.compact=function(n){for(var r=-1,t=n?n.length:0,e=[];++r<t;){var u=n[r];u&&e.push(u)}return e},o.compose=function(){for(var n=arguments,r=n.length;r--;)if(!E(n[r]))throw new TypeError;return function(){for(var r=arguments,t=n.length;t--;)r=[n[t].apply(this,r)];return r[0]}},o.countBy=Qr,o.debounce=Y,o.defaults=w,o.defer=function(n){if(!E(n))throw new TypeError;var r=u(arguments,1);return setTimeout(function(){n.apply(rr,r)},1)},o.delay=function(n,r){if(!E(n))throw new TypeError;
|
|
var t=u(arguments,2);return setTimeout(function(){n.apply(rr,t)},r)},o.difference=V,o.filter=B,o.flatten=function(n,r){return p(n,r)},o.forEach=q,o.functions=j,o.groupBy=Xr,o.indexBy=Yr,o.initial=function(n,r,t){var e=0,o=n?n.length:0;if(typeof r!="number"&&null!=r){var i=o;for(r=X(r,t,3);i--&&r(n[i],i,n);)e++}else e=null==r||t?1:r||e;return u(n,0,Ir($r(0,o-e),o))},o.intersection=function(n){var r=arguments,t=r.length,e=-1,u=m(),o=n?n.length:0,i=[];n:for(;++e<o;){var f=n[e];if(0>u(i,f)){for(var a=t;--a;)if(0>u(r[a],f))continue n;
|
|
i.push(f)}}return i},o.invert=x,o.invoke=function(n,r){var t=u(arguments,2),e=-1,o=typeof r=="function",i=n?n.length:0,f=Array(typeof i=="number"?i:0);return q(n,function(n){f[++e]=(o?r:n[r]).apply(n,t)}),f},o.keys=Ur,o.map=M,o.max=$,o.memoize=function(n,r){var t={};return function(){var e=r?r.apply(this,arguments):ur+arguments[0];return kr.call(t,e)?t[e]:t[e]=n.apply(this,arguments)}},o.min=function(n,r,t){var e=1/0,u=e;typeof r!="function"&&t&&t[r]===n&&(r=null);var o=-1,i=n?n.length:0;if(null==r&&typeof i=="number")for(;++o<i;)t=n[o],t<u&&(u=t);
|
|
else r=null==r&&S(n)?charAtCallback:X(r,t,3),q(n,function(n,t,o){t=r(n,t,o),t<e&&(e=t,u=n)});return u},o.omit=function(n){var r=m(),t=p(arguments,!0,!1,1),e={};return Kr(n,function(n,u){0>r(t,u)&&(e[u]=n)}),e},o.once=function(n){var r,t;if(!E(n))throw new TypeError;return function(){return r?t:(r=!0,t=n.apply(this,arguments),n=null,t)}},o.pairs=function(n){for(var r=-1,t=Ur(n),e=t.length,u=Array(e);++r<e;){var o=t[r];u[r]=[o,n[o]]}return u},o.partial=function(n){return v(n,16,u(arguments,1))},o.pick=function(n){for(var r=-1,t=p(arguments,!0,!1,1),e=t.length,u={};++r<e;){var o=t[r];
|
|
o in n&&(u[o]=n[o])}return u},o.pluck=I,o.range=function(n,r,t){n=+n||0,t=+t||1,null==r&&(r=n,n=0);var e=-1;r=$r(0,Or((r-n)/t));for(var u=Array(r);++e<r;)u[e]=n,n+=t;return u},o.reject=function(n,r,t){return r=X(r,t,3),B(n,function(n,t,e){return!r(n,t,e)})},o.rest=J,o.shuffle=C,o.sortBy=function(n,t,e){var u=-1,o=n?n.length:0,i=Array(typeof o=="number"?o:0);for(t=X(t,e,3),q(n,function(n,r,e){i[++u]={m:t(n,r,e),n:u,o:n}}),o=i.length,i.sort(r);o--;)i[o]=i[o].o;return i},o.tap=function(n,r){return r(n),n
|
|
},o.throttle=function(n,r,t){var e=!0,u=!0;if(!E(n))throw new TypeError;return false===t?e=!1:T(t)&&(e="leading"in t?t.leading:e,u="trailing"in t?t.trailing:u),t={},t.leading=e,t.maxWait=r,t.trailing=u,Y(n,r,t)},o.times=function(n,r,t){n=-1<(n=+n)?n:0;var e=-1,u=Array(n);for(r=l(r,t,1);++e<n;)u[e]=r(e);return u},o.toArray=function(n){return Cr(n)?u(n):n&&typeof n.length=="number"?M(n):k(n)},o.union=function(){return g(p(arguments,!0,!0))},o.uniq=L,o.values=k,o.where=U,o.without=function(n){return V(n,u(arguments,1))
|
|
},o.wrap=function(n,r){return v(r,16,[n])},o.zip=function(){for(var n=-1,r=$(I(arguments,"length")),t=Array(0>r?0:r);++n<r;)t[n]=I(arguments,n);return t},o.collect=M,o.drop=J,o.each=q,o.extend=b,o.methods=j,o.object=function(n,r){for(var t=-1,e=n?n.length:0,u={};++t<e;){var o=n[t];r?u[o]=r[t]:o&&(u[o[0]]=o[1])}return u},o.select=B,o.tail=J,o.unique=L,o.clone=function(n){return T(n)?Cr(n)?u(n):b({},n):n},o.contains=N,o.escape=function(n){return null==n?"":(n+"").replace(Jr,y)},o.every=R,o.find=F,o.has=function(n,r){return n?kr.call(n,r):!1
|
|
},o.identity=Z,o.indexOf=H,o.isArguments=d,o.isArray=Cr,o.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&Er.call(n)==lr||!1},o.isDate=function(n){return n&&typeof n=="object"&&Er.call(n)==cr||!1},o.isElement=function(n){return n&&1===n.nodeType||!1},o.isEmpty=A,o.isEqual=function(n,r){return s(n,r)},o.isFinite=function(n){return qr(n)&&!Dr(parseFloat(n))},o.isFunction=E,o.isNaN=function(n){return O(n)&&n!=+n},o.isNull=function(n){return null===n},o.isNumber=O,o.isObject=T,o.isRegExp=function(n){return n&&vr[typeof n]&&Er.call(n)==gr||!1
|
|
},o.isString=S,o.isUndefined=function(n){return typeof n=="undefined"},o.lastIndexOf=function(n,r,t){var e=n?n.length:0;for(typeof t=="number"&&(e=(0>t?$r(0,e+t):Ir(t,e-1))+1);e--;)if(n[e]===r)return e;return-1},o.mixin=nr,o.noConflict=function(){return mr._=Ar,this},o.random=function(n,r){return null==n&&null==r&&(r=1),n=+n||0,null==r?(r=n,n=0):r=+r||0,n+Sr(Wr()*(r-n+1))},o.reduce=W,o.reduceRight=z,o.result=function(n,r){if(n){var t=n[r];return E(t)?n[r]():t}},o.size=function(n){var r=n?n.length:0;
|
|
return typeof r=="number"?r:Ur(n).length},o.some=P,o.sortedIndex=K,o.template=function(n,r,e){var u=o,i=u.templateSettings;n=(n||"")+"",e=w({},e,i);var f=0,a="__p+='",i=e.variable;n.replace(RegExp((e.escape||or).source+"|"+(e.interpolate||or).source+"|"+(e.evaluate||or).source+"|$","g"),function(r,e,u,o,i){return a+=n.slice(f,i).replace(ir,t),e&&(a+="'+_.escape("+e+")+'"),o&&(a+="';"+o+";\n__p+='"),u&&(a+="'+((__t=("+u+"))==null?'':__t)+'"),f=i+r.length,r}),a+="';",i||(i="obj",a="with("+i+"||{}){"+a+"}"),a="function("+i+"){var __t,__p='',__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+a+"return __p}";
|
|
try{var l=Function("_","return "+a)(u)}catch(c){throw c.source=a,c}return r?l(r):(l.source=a,l)},o.unescape=function(n){return null==n?"":(n+"").replace(Hr,_)},o.uniqueId=function(n){var r=++tr+"";return n?n+r:r},o.all=R,o.any=P,o.detect=F,o.findWhere=function(n,r){return U(n,r,!0)},o.foldl=W,o.foldr=z,o.include=N,o.inject=W,o.first=G,o.last=function(n,r,t){var e=0,o=n?n.length:0;if(typeof r!="number"&&null!=r){var i=o;for(r=X(r,t,3);i--&&r(n[i],i,n);)e++}else if(e=r,null==e||t)return n?n[o-1]:rr;
|
|
return u(n,$r(0,o-e))},o.sample=function(n,r,t){return n&&typeof n.length!="number"&&(n=k(n)),null==r||t?n?n[0+Sr(Wr()*(n.length-1-0+1))]:rr:(n=C(n),n.length=Ir($r(0,r),n.length),n)},o.take=G,o.head=G,nr(o),o.VERSION="2.2.1",o.prototype.chain=function(){return this.__chain__=!0,this},o.prototype.value=function(){return this.__wrapped__},q("pop push reverse shift sort splice unshift".split(" "),function(n){var r=jr[n];o.prototype[n]=function(){var n=this.__wrapped__;return r.apply(n,arguments),zr.spliceObjects||0!==n.length||delete n[0],this
|
|
}}),q(["concat","join","slice"],function(n){var r=jr[n];o.prototype[n]=function(){var n=r.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new i(n),n.__chain__=!0),n}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(mr._=o, define(function(){return o})):_r&&dr?br?(dr.exports=o)._=o:_r._=o:mr._=o}).call(this); |