1
0
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
13 KiB

/*!
Lo-Dash 0.9.0 lodash.com/license
Underscore.js 1.4.2 underscorejs.org/LICENSE
*/
;(function(e,t){function s(e,t,n){var r;if(!e)return e;var t=p(t,n),i=e.length,n=-1;if("number"==typeof i){for(;++n<i;)if(r=e[n],t(r,n,e)===J)return e}else for(n in e)if(it.call(e,n)&&(r=e[n],t(r,n,e)===J))return e}function o(e){var t,n,r=e;if(!e)return e;for(var i=1,s=arguments.length;i<s;i++)if(r=arguments[i])for(t in r)n=r[t],e[t]=n;return e}function u(e){var t,n,i=e;if(!e)return e;for(var s=1,o=arguments.length;s<o;s++)if(i=arguments[s])for(t in i)n=i[t],e[t]==r&&(e[t]=n);return e}function a(e
,t){var n,r;if(e)for(n in t=p(t),e)if(it.call(e,n)&&(r=e[n],t(r,n,e)===J))break}function f(e,t){var n,r;if(e)for(n in t=p(t),e)if(r=e[n],t(r,n,e)===J)break}function l(e){if(e&&e.__wrapped__)return e;if(!(this instanceof l))return new l(e);this.__wrapped__=e}function c(e,n){var r=e.b,i=n.b,e=e.a,n=n.a;if(e!==n){if(e>n||e===t)return 1;if(e<n||n===t)return-1}return r<i?-1:1}function h(e,t,n){function r(){var i=arguments,s=t;return n.length&&(i=i.length?n.concat(ot.call(i)):n),this instanceof r?(m.prototype=
e.prototype,s=new m,(i=e.apply(s,i))&&Tt[typeof i]?i:s):e.apply(s,i)}return r}function p(e,n){return e?"function"!=typeof e?function(t){return t[e]}:n!==t?function(t,r,i){return e.call(n,t,r,i)}:e:U}function d(e){return"\\"+Nt[e]}function v(e){return Ct[e]}function m(){}function g(e){return kt[e]}function y(e){var t=[];return a(e,function(e,n){t.push(n)}),t}function b(e){var t=[];return f(e,function(e,n){S(e)&&t.push(n)}),t.sort()}function w(e){var t={};return a(e,function(e,n){t[e]=n}),t}function E
(e,t,s,o){if(e===t)return 0!==e||1/e==1/t;if(e==r||t==r)return e===t;var u=ut.call(e);if(u!=ut.call(t))return i;switch(u){case mt:case gt:return+e==+t;case yt:return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case wt:case Et:return e==t+""}var a=u==vt;if(!a){if(e.__wrapped__||t.__wrapped__)return E(e.__wrapped__||e,t.__wrapped__||t);if(u!=bt)return i;var u=e.constructor,f=t.constructor;if(u!=f&&(!S(u)||!(u instanceof u&&S(f)&&f instanceof f)))return i}s||(s=[]),o||(o=[]);for(u=s.length;u--;)if(s[u]==e)return o
[u]==t;u=n,f=0,s.push(e),o.push(t);if(a){f=e.length;if(u=f==t.length)for(;f--&&(u=E(e[f],t[f],s,o)););return u}for(var l in e)if(it.call(e,l)&&(f++,!it.call(t,l)||!E(e[l],t[l],s,o)))return i;for(l in t)if(it.call(t,l)&&!(f--))return i;return n}function S(e){return"function"==typeof e}function x(e){return ut.call(e)==Et}function T(e){var t=[];return a(e,function(e){t.push(e)}),t}function N(e,t){return"number"==typeof (e?e.length:0)?-1<j(e,t):P(e,function(e){return e===t})}function C(e,t,r){var i=n
,t=p(t,r);return s(e,function(e,n,r){return!(i=t(e,n,r))&&J}),!!i}function k(e,t,n){var r=[],t=p(t,n);return s(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r}function L(e,t,r){var i,t=p(t,r);return P(e,function(e,r,s){return t(e,r,s)&&(i=e,n)}),i}function A(e,t,n){var r=-1,i=e?e.length:0,o=Array("number"==typeof i?i:0),t=p(t,n);if(Lt(e))for(;++r<i;)o[r]=t(e[r],r,e);else s(e,function(e,n,i){o[++r]=t(e,n,i)});return o}function O(e,t,n){var r=-Infinity,i=-1,o=e?e.length:0,u=r;if(t||"number"!=typeof o)t=p
(t,n),s(e,function(e,n,i){n=t(e,n,i),n>r&&(r=n,u=e)});else for(;++i<o;)e[i]>u&&(u=e[i]);return u}function M(e,t){var n=[];return s(e,function(e){n.push(e[t])}),n}function _(e,t,n,r){var o=3>arguments.length,t=p(t,r);return s(e,function(e,r,s){n=o?(o=i,e):t(n,e,r,s)}),n}function D(e,t,n,r){var o=e?e.length:0,u=3>arguments.length;if("number"!=typeof o)var a=At(e),o=a.length;return s(e,function(s,f,l){f=a?a[--o]:--o,n=u?(u=i,e[f]):t.call(r,n,e[f],f,l)}),n}function P(e,t,n){var r,t=p(t,n);return s(e,
function(e,n,i){return(r=t(e,n,i))&&J}),!!r}function H(e,t,n){if(e)return t==r||n?e[0]:ot.call(e,0,t)}function B(e,t){for(var n=-1,r=e?e.length:0,i=[];++n<r;){var s=e[n];Lt(s)?st.apply(i,t?s:B(s)):i.push(s)}return i}function j(e,t,n){var r=-1,i=e?e.length:0;if("number"==typeof n)r=(0>n?ht(0,i+n):n||0)-1;else if(n)return r=I(e,t),e[r]===t?r:-1;for(;++r<i;)if(e[r]===t)return r;return-1}function F(e,t,n){return e?ot.call(e,t==r||n?1:t):[]}function I(e,t,n,r){for(var i=0,s=e?e.length:i,n=n?p(n,r):U,t=
n(t);i<s;)r=i+s>>>1,n(e[r])<t?i=r+1:s=r;return i}function q(e,t,n,r){for(var i=-1,s=e?e.length:0,o=[],u=[],n=p(n,r);++i<s;)if(r=n(e[i],i,e),t?!i||u[u.length-1]!==r:0>j(u,r))u.push(r),o.push(e[i]);return o}function R(e,t){return xt||at&&2<arguments.length?at.call.apply(at,arguments):h(e,t,ot.call(arguments,2))}function U(e){return e}function z(e){s(b(e),function(t){var r=l[t]=e[t];l.prototype[t]=function(){var e=[this.__wrapped__];return st.apply(e,arguments),e=r.apply(l,e),this.__chain__&&(e=new
l(e),e.__chain__=n),e}})}var n=!0,r=null,i=!1,W="object"==typeof exports&&exports,X="object"==typeof global&&global;X.global===X&&(e=X);var V=[],X={},$=0,J={},K=e._,Q=/&(?:amp|lt|gt|quot|#x27);/g,G=RegExp("^"+(X.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Y=/($^)/,Z=/[&<>"']/g,et=/['\n\r\t\u2028\u2029\\]/g,tt=Math.ceil,nt=V.concat,rt=Math.floor,it=X.hasOwnProperty,st=V.push,ot=V.slice,ut=X.toString,at=G.test(at=ot.bind)&&at,ft=G.test(ft=Array.isArray
)&&ft,lt=e.isFinite,ct=G.test(ct=Object.keys)&&ct,ht=Math.max,pt=Math.min,dt=Math.random,vt="[object Array]",mt="[object Boolean]",gt="[object Date]",yt="[object Number]",bt="[object Object]",wt="[object RegExp]",Et="[object String]",St=(St={0:1,length:1},V.splice.call(St,0,1),St[0]),xt=at&&/\n|Opera/.test(at+ut.call(e.opera)),Tt={"boolean":i,"function":n,object:n,number:i,string:i,"undefined":i},Nt={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};l.templateSettings=
{escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},l.isArguments=function(e){return"[object Arguments]"==ut.call(e)},l.isArguments(arguments)||(l.isArguments=function(e){return e?it.call(e,"callee"):i});var Ct={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"},kt=w(Ct),Lt=ft||function(e){return ut.call(e)==vt};S(/x/)&&(S=function(e){return"[object Function]"==ut.call(e)});var At=ct?function(e){return e&&Tt[typeof e]?ct(e):[]}:y;l.VERSION="0.9.0"
,l.after=function(e,t){return 1>e?t():function(){if(1>--e)return t.apply(this,arguments)}},l.bind=R,l.bindAll=function(e){for(var t=arguments,n=1<t.length?0:(t=b(e),-1),r=t.length;++n<r;){var i=t[n];e[i]=R(e[i],e)}return e},l.chain=function(e){return e=new l(e),e.__chain__=n,e},l.clone=function(e){return e&&Tt[typeof e]?Lt(e)?ot.call(e):o({},e):e},l.compact=function(e){for(var t=-1,n=e?e.length:0,r=[];++t<n;){var i=e[t];i&&r.push(i)}return r},l.compose=function(){var e=arguments;return function()
{for(var t=arguments,n=e.length;n--;)t=[e[n].apply(this,t)];return t[0]}},l.contains=N,l.countBy=function(e,t,n){var r={},t=p(t,n);return s(e,function(e,n,i){n=t(e,n,i),it.call(r,n)?r[n]++:r[n]=1}),r},l.debounce=function(e,t,n){function i(){a=r,n||(o=e.apply(u,s))}var s,o,u,a;return function(){var r=n&&!a;return s=arguments,u=this,clearTimeout(a),a=setTimeout(i,t),r&&(o=e.apply(u,s)),o}},l.defaults=u,l.defer=function(e){var n=ot.call(arguments,1);return setTimeout(function(){e.apply(t,n)},1)},l.delay=
function(e,n){var r=ot.call(arguments,2);return setTimeout(function(){e.apply(t,r)},n)},l.difference=function(e){for(var t=-1,n=e.length,r=nt.apply(V,arguments),i=[];++t<n;){var s=e[t];0>j(r,s,n)&&i.push(s)}return i},l.escape=function(e){return e==r?"":(e+"").replace(Z,v)},l.every=C,l.extend=o,l.filter=k,l.find=L,l.first=H,l.flatten=B,l.forEach=s,l.functions=b,l.groupBy=function(e,t,n){var r={},t=p(t,n);return s(e,function(e,n,i){n=t(e,n,i),(it.call(r,n)?r[n]:r[n]=[]).push(e)}),r},l.has=function(
e,t){return e?it.call(e,t):i},l.identity=U,l.indexOf=j,l.initial=function(e,t,n){return e?ot.call(e,0,-(t==r||n?1:t)):[]},l.intersection=function(e){var t=arguments,n=t.length,r=[];return s(e,function(e){if(0>j(r,e)){for(var i=n;--i;)if(0>j(t[i],e))return;r.push(e)}}),r},l.invert=w,l.invoke=function(e,t){var n=ot.call(arguments,2),r="function"==typeof t,i=[];return s(e,function(e){i.push((r?t:e[t]).apply(e,n))}),i},l.isArray=Lt,l.isBoolean=function(e){return e===n||e===i||ut.call(e)==mt},l.isDate=
function(e){return ut.call(e)==gt},l.isElement=function(e){return e?1===e.nodeType:i},l.isEmpty=function(e){if(!e)return n;if(Lt(e)||x(e))return!e.length;for(var t in e)if(it.call(e,t))return i;return n},l.isEqual=E,l.isFinite=function(e){return lt(e?+e:parseFloat(e))},l.isFunction=S,l.isNaN=function(e){return ut.call(e)==yt&&e!=+e},l.isNull=function(e){return e===r},l.isNumber=function(e){return ut.call(e)==yt},l.isObject=function(e){return e?Tt[typeof e]:i},l.isRegExp=function(e){return ut.call
(e)==wt},l.isString=x,l.isUndefined=function(e){return e===t},l.keys=At,l.last=function(e,t,n){if(e){var i=e.length;return t==r||n?e[i-1]:ot.call(e,-t||i)}},l.lastIndexOf=function(e,t,n){var r=e?e.length:0;for("number"==typeof n&&(r=(0>n?ht(0,r+n):pt(n,r-1))+1);r--;)if(e[r]===t)return r;return-1},l.map=A,l.max=O,l.memoize=function(e,t){var n={};return function(){var r=t?t.apply(this,arguments):arguments[0];return it.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},l.min=function(e,t,n){var r=Infinity
,i=-1,o=e?e.length:0,u=r;if(t||"number"!=typeof o)t=p(t,n),s(e,function(e,n,i){n=t(e,n,i),n<r&&(r=n,u=e)});else for(;++i<o;)e[i]<u&&(u=e[i]);return u},l.mixin=z,l.noConflict=function(){return e._=K,this},l.object=function(e,t){for(var n=-1,r=e?e.length:0,i={};++n<r;){var s=e[n];t?i[s]=t[n]:i[s[0]]=s[1]}return i},l.omit=function(e){var t=nt.apply(V,arguments),n={};return f(e,function(e,r){0>j(t,r,1)&&(n[r]=e)}),n},l.once=function(e){var t,s=i;return function(){return s?t:(s=n,t=e.apply(this,arguments
),e=r,t)}},l.pairs=function(e){var t=[];return a(e,function(e,n){t.push([n,e])}),t},l.pick=function(e){for(var t=0,n=nt.apply(V,arguments),r=n.length,i={};++t<r;){var s=n[t];s in e&&(i[s]=e[s])}return i},l.pluck=M,l.random=function(e,t){return e==r&&t==r&&(t=1),e=+e||0,t==r&&(t=e,e=0),e+rt(dt()*((+t||0)-e+1))},l.range=function(e,t,n){e=+e||0,n=+n||1,t==r&&(t=e,e=0);for(var i=-1,t=ht(0,tt((t-e)/n)),s=Array(t);++i<t;)s[i]=e,e+=n;return s},l.reduce=_,l.reduceRight=D,l.reject=function(e,t,n){return t=
p(t,n),k(e,function(e,n,r){return!t(e,n,r)})},l.rest=F,l.result=function(e,t){var n=e?e[t]:r;return S(n)?e[t]():n},l.shuffle=function(e){var t=-1,n=Array(e?e.length:0);return s(e,function(e){var r=rt(dt()*(++t+1));n[t]=n[r],n[r]=e}),n},l.size=function(e){var t=e?e.length:0;return"number"==typeof t?t:At(e).length},l.some=P,l.sortBy=function(e,t,n){var r=[],t=p(t,n);s(e,function(e,n,i){r.push({a:t(e,n,i),b:n,c:e})}),e=r.length;for(r.sort(c);e--;)r[e]=r[e].c;return r},l.sortedIndex=I,l.tap=function(
e,t){return t(e),e},l.template=function(e,t,n){e||(e="");var n=u({},n,l.templateSettings),r=0,i="__p += '",s=n.variable;e.replace(RegExp((n.escape||Y).source+"|"+(n.interpolate||Y).source+"|"+(n.evaluate||Y).source+"|$","g"),function(t,n,s,o,u){i+=e.slice(r,u).replace(et,d),i+=n?"'+_['escape']("+n+")+'":o?"';"+o+";__p+='":s?"'+((__t=("+s+"))==null?'':__t)+'":"",r=u+t.length}),i+="';",s||(s="obj",i="with("+s+"||{}){"+i+"}"),i="function("+s+"){var __t,__p='',__j=[].join;function print(){__p+=__j.call(arguments,'')}"+
i+"return __p}";try{var o=Function("_","return "+i)(l)}catch(a){throw a.source=i,a}return t?o(t):(o.source=i,o)},l.throttle=function(e,t){function n(){a=new Date,u=r,s=e.apply(o,i)}var i,s,o,u,a=0;return function(){var r=new Date,f=t-(r-a);return i=arguments,o=this,0>=f?(clearTimeout(u),a=r,s=e.apply(o,i)):u||(u=setTimeout(n,f)),s}},l.times=function(e,t,n){for(var e=+e||0,r=-1,i=Array(e);++r<e;)i[r]=t.call(n,r);return i},l.toArray=function(e){return e&&"number"==typeof e.length?"string"==typeof e?
e.split(""):ot.call(e):T(e)},l.unescape=function(e){return e==r?"":(e+"").replace(Q,g)},l.union=function(){for(var e=-1,t=nt.apply(V,arguments),n=t.length,r=[];++e<n;){var i=t[e];0>j(r,i)&&r.push(i)}return r},l.uniq=q,l.uniqueId=function(e){var t=$++;return e?e+t:t},l.values=T,l.where=function(e,t){var n=[];return f(t,function(e,t){n.push(t)}),k(e,function(e){for(var r=n.length;r--;){var i=e[n[r]]===t[n[r]];if(!i)break}return!!i})},l.without=function(e){for(var t=-1,n=e.length,r=[];++t<n;){var i=
e[t];0>j(arguments,i,1)&&r.push(i)}return r},l.wrap=function(e,t){return function(){var n=[e];return st.apply(n,arguments),t.apply(this,n)}},l.zip=function(e){for(var t=-1,n=e?O(M(arguments,"length")):0,r=Array(n);++t<n;)r[t]=M(arguments,t);return r},l.all=C,l.any=P,l.collect=A,l.detect=L,l.drop=F,l.each=s,l.foldl=_,l.foldr=D,l.head=H,l.include=N,l.inject=_,l.methods=b,l.select=k,l.tail=F,l.take=H,l.unique=q,z(l),l.prototype.chain=function(){return this.__chain__=n,this},l.prototype.value=function(
){return this.__wrapped__},s("pop push reverse shift sort splice unshift".split(" "),function(e){var t=V[e];l.prototype[e]=function(){var e=this.__wrapped__;return t.apply(e,arguments),St&&e.length===0&&delete e[0],this.__chain__&&(e=new l(e),e.__chain__=n),e}}),s(["concat","join","slice"],function(e){var t=V[e];l.prototype[e]=function(){var e=t.apply(this.__wrapped__,arguments);return this.__chain__&&(e=new l(e),e.__chain__=n),e}}),W?"object"==typeof module&&module&&module.exports==W?(module.exports=
l)._=l:W._=l:e._=l})(this);