/** * @license * Lo-Dash 3.0.0-pre (Custom Build) lodash.com/license | Underscore.js 1.7.0 underscorejs.org/LICENSE * Build: `lodash underscore -o ./dist/lodash.underscore.js` */ ;(function(){function n(n,r){for(var t=-1,e=n.length;++te||!u||typeof t=="undefined"&&o){t=1;break n}if(tu(r,i)&&o.push(i)}return o}function _(n,r){var t=n?n.length:0;if(typeof t!="number"||-1>=t||t>Cr)return E(n,r,Vt); for(var e=-1,u=J(n);++e=t||t>Cr){for(var t=J(n),e=Vt(n),u=e.length;u--;){var o=e[u];if(r(t[o],o,t)===Br)break}return n}for(e=J(n);t--&&r(e[t],t,e)!==Br;);return n}function w(n,r){var t=true;return _(n,function(n,e,u){return(t=!!r(n,e,u))||Br}),t}function A(n,r){var t=[];return _(n,function(n,e,u){r(n,e,u)&&t.push(n)}),t}function x(n,r,t){var e;return t(n,function(n,t,u){return r(n,t,u)?(e=n,Br):void 0}),e}function T(n,r,t,e){e=(e||0)-1; for(var u=n.length,o=-1,i=[];++ee(i,a)&&(r&&i.push(a),o.push(f))}return o}function N(n,r){return function(t,e,u){e=m(e,u,3);var o=r?r():{};if(Pt(t)){u=-1; for(var i=t.length;++ur?0:r) }function L(n,r,t){var e=n?n.length:0;if(!e)return-1;if(typeof t=="number")t=0>t?Ft(e+t,0):t||0;else if(t)return t=Y(n,r),n[t]===r?t:-1;return f(n,r,t)}function Q(n,r,t){return X(n,null==r||t?1:0>r?0:r)}function X(n,r,t){var e=-1,u=n?n.length:0,o=typeof t;if(t&&"number"!=o&&h(n,r,t)&&(r=0,t=u),r=null==r?0:+r||0,0>r&&(r=-r>u?0:u+r),t="undefined"==o||t>u?u:+t||0,0>t&&(t+=u),t&&t==u&&!r)return a(n);for(u=r>t?0:t-r,t=Array(u);++eu&&(u=i)}}else r=m(r,t,3),_(n,function(n,t,o){t=r(n,t,o),(t>e||-1/0===t&&t===u)&&(e=t,u=n)});return u}function ar(n,r){return ir(n,$r(r))}function cr(n,r,t,e){return(Pt(n)?u:$)(n,m(r,e,4),t,3>arguments.length,_)}function lr(n,r,t,e){return(Pt(n)?o:$)(n,m(r,e,4),t,3>arguments.length,j)}function pr(n){n=H(n);for(var r=-1,t=n.length,e=Array(t);++r=t||t>r?(f&&clearTimeout(f),t=s,f=p=s=qr,t&&(h=Gt(),a=n.apply(l,i),p||f||(i=l=null))):p=setTimeout(e,t)}function u(){p&&clearTimeout(p),f=p=s=qr,(v||g!==r)&&(h=Gt(),a=n.apply(l,i),p||f||(i=l=null)) }function o(){if(i=arguments,c=Gt(),l=this,s=v&&(p||!y),false===g)var t=y&&!p;else{f||y||(h=c);var o=g-(c-h),m=0>=o||o>g;m?(f&&(f=clearTimeout(f)),h=c,a=n.apply(l,i)):f||(f=setTimeout(u,o))}return m&&p?p=clearTimeout(p):p||r===g||(p=setTimeout(e,r)),t&&(m=true,a=n.apply(l,i)),!m||p||f||(i=l=null),a}var i,f,a,c,l,p,s,h=0,g=false,v=true;if(!br(n))throw new TypeError(Wr);if(r=0>r?0:r,true===t)var y=true,v=false;else dr(t)&&(y=t.leading,g="maxWait"in t&&Ft(+t.maxWait||0,r),v="trailing"in t?t.trailing:v);return o.cancel=function(){p&&clearTimeout(p),f&&clearTimeout(f),f=p=s=qr },o}function vr(n){for(var r=X(arguments,1),t=r,e=vr.placeholder,u=-1,o=t.length,i=-1,f=[];++u"'`]/g,Jr=/^\[object .+?Constructor\]$/,Kr=/($^)/,Lr=/[.*+?^${}()|[\]\/\\]/g,Qr=/['\n\r\u2028\u2029\\]/g,Xr="[object Arguments]",Yr="[object Boolean]",Zr="[object Date]",nt="[object Error]",rt="[object Number]",tt="[object Object]",et="[object RegExp]",ut="[object String]",ot={}; ot[Xr]=ot["[object Array]"]=ot["[object Float32Array]"]=ot["[object Float64Array]"]=ot["[object Int8Array]"]=ot["[object Int16Array]"]=ot["[object Int32Array]"]=ot["[object Uint8Array]"]=ot["[object Uint8ClampedArray]"]=ot["[object Uint16Array]"]=ot["[object Uint32Array]"]=true,ot["[object ArrayBuffer]"]=ot[Yr]=ot[Zr]=ot[nt]=ot["[object Function]"]=ot["[object Map]"]=ot[rt]=ot[tt]=ot[et]=ot["[object Set]"]=ot[ut]=ot["[object WeakMap]"]=false;var it={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},ft={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},at={"function":true,object:true},ct={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},lt=at[typeof window]&&window||this,pt=at[typeof exports]&&exports&&!exports.nodeType&&exports,st=at[typeof module]&&module&&!module.nodeType&&module,ht=pt&&st&&typeof global=="object"&&global; !ht||ht.global!==ht&&ht.window!==ht&&ht.self!==ht||(lt=ht);var gt=st&&st.exports===pt&&pt,vt=Array.prototype,yt=Object.prototype,mt=Function.prototype.toString,bt=yt.hasOwnProperty,dt=lt._,_t=yt.toString,jt=RegExp("^"+function(n){return(n=null==n?"":n+"")&&(Lr.lastIndex=0,Lr.test(n))?n.replace(Lr,"\\$&"):n}(_t).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),wt=Math.ceil,At=Math.floor,xt=vt.push,Tt=yt.propertyIsEnumerable,Et=vt.splice,Ot=_r(Ot=Object.create)&&Ot,kt=_r(kt=Array.isArray)&&kt,St=lt.isFinite,It=_r(It=Object.keys)&&It,Ft=Math.max,Mt=Math.min,$t=_r($t=Date.now)&&$t,qt=Math.random,Bt={}; !function(){var n={0:1,length:1};Bt.spliceObjects=(Et.call(n,0,1),!n[0])}(0,0),v.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},Ot||(b=function(){function n(){}return function(r){if(dr(r)){n.prototype=r;var t=new n;n.prototype=null}return t||lt.Object()}}());var Nt=Q,Rt=K,Ut=N(function(n,r,t){bt.call(n,t)?++n[t]:n[t]=1}),Wt=N(function(n,r,t){bt.call(n,t)?n[t].push(r):n[t]=[r]}),Dt=N(function(n,r,t){n[t]=r}),zt=N(function(n,r,t){n[t?0:1].push(r) },function(){return[[],[]]}),Ct=vr(hr,2);yr(arguments)||(yr=function(n){var r=n&&typeof n=="object"?n.length:qr;return typeof r=="number"&&-1--n?r.apply(this,arguments):void 0}},v.before=hr,v.bind=function(n,r){return 3>arguments.length?z(n,Nr,r):F(n,Nr|Ur,X(arguments,2),[],r)},v.bindAll=function(n){for(var r=n,t=1r?0:r)},v.intersection=function(){for(var n=[],r=-1,t=arguments.length;++ri(a,e)){for(r=t;--r;)if(0>i(n[r],e))continue n;a.push(e)}return a},v.invert=function(n){for(var r=-1,t=Vt(n),e=t.length,u={};++rt)return function(){};if(!r(n,br))throw new TypeError(Wr);return function(){for(var r=t,e=n[r].apply(this,arguments);r--;)e=n[r].call(this,e);return e}},v.each=or,v.extend=Ar,v.iteratee=function(n,r,t){return m(n,t?qr:r)},v.methods=Tr,v.object=function(n,r){var t=-1,e=n?n.length:0,u={};for(r||!e||Pt(n[0])||(r=[]);++tr?0:r))},v.lastIndexOf=function(n,r,t){var e=n?n.length:0;if(!e)return-1;var u=e;if(typeof t=="number"&&(u=(0>t?Ft(e+t,0):Mt(t||0,e-1))+1),r!==r)return s(n,u,true);for(;u--;)if(n[u]===r)return u;return-1},v.max=fr,v.min=function(n,r,t){r=h(n,r,t)?null:r;var e=1/0,u=e;if(null==r){t=-1,n=H(n);for(var o=n.length;++tr?0:+r||0,n.length),n)},Mr(Ar({},v)),v.VERSION="3.0.0-pre",y.prototype=v.prototype,v.prototype.chain=function(){return nr(this) },v.prototype.value=function(){return this.__wrapped__},vr.placeholder=v,n("concat join pop push reverse shift sort splice unshift".split(" "),function(n){var r=vt[n],t=!/^(?:concat|join|slice)$/.test(n),e=!Bt.spliceObjects&&/^(?:pop|shift|splice)$/.test(n);v.prototype[n]=function(){var n=this.__wrapped__,u=r.apply(n,arguments);return e&&0===n.length&&delete n[0],t&&(u=n),this.__chain__?new y(u,true):u}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(lt._=v, define("underscore",function(){return v })):pt&&st?gt?(st.exports=v)._=v:pt._=v:lt._=v}).call(this);