/** * @license * Lo-Dash 2.4.1 (Custom Build) lodash.com/license | Underscore.js 1.6.0 underscorejs.org/LICENSE * Build: `lodash -o ./dist/lodash.compat.js` */ ;(function(){function n(n,t){return typeof n=="undefined"?t:n}function t(n,t){if(n!==t){if(n>t||typeof n=="undefined")return 1;if(ne||13e||8202r||13r||8202a(t,l)&&f.push(l);return f}function pt(n,t){var r=-1,e=n,u=n?n.length:0;if(typeof u=="number"&&-1i(s,h)&&((u||f)&&s.push(h),c.push(p))}return c}function Et(n,t){for(var r=-1,e=t(n),u=e.length,o=Ir(u);++rr&&(r=0),s&&(a=[]),p&&(i=[]),h=[n,t,r,e,u,o,a,i],t==x||t==(x|O)?c(h):X(h)) }function Nt(){var n=(n=o.indexOf)===$t?r:n;return n}function Tt(n){return typeof n=="function"&&Yr.test(Qr.call(n))}function Lt(n){var t,r;return!n||Xr.call(n)!=ot||!te.call(n,"constructor")&&(t=n.constructor,gr(t)&&!(t instanceof t))||!ke.argsClass&&pr(n)||!ke.nodeClass&&h(n)?false:ke.ownLast?(_t(n,function(n,t,e){return r=te.call(e,t),false}),false!==r):(_t(n,function(n,t){r=t}),typeof r=="undefined"||te.call(n,r))}function Wt(n){for(var t=-1,r=br(n),e=r.length,u=[];++ta?0:a)}function $t(n,t,e){var u=n?n.length:0;if(typeof e=="number")e=0>e?ve(0,u+e):e||0;else if(e)return e=Ut(n,t),u&&n[e]===t?e:-1;return r(n,t,e)}function Dt(n,t,r){var e=n?n.length:0;if(typeof t!="number"&&null!=t){var u=e,a=0; for(t=o.createCallback(t,r,3);u--&&t(n[u],u,n);)a++}else a=null==t||r?1:t;return a=e-a,qt(n,0,0>a?0:a)}function zt(n,t,r){var e=n?n.length:0;if(typeof t!="number"&&null!=t){var u=e,a=0;for(t=o.createCallback(t,r,3);u--&&t(n[u],u,n);)a++}else if(a=t,null==a||r)return n?n[e-1]:w;return a=e-a,qt(n,0>a?0:a)}function Bt(n,t,r){if(typeof t!="number"&&null!=t){var e=-1,u=n?n.length:0,a=0;for(t=o.createCallback(t,r,3);++et?0:t;return qt(n,a)}function qt(n,t,r){var e=-1,u=n?n.length:0; for(t=+t||0,0>t?t=ve(u+t,0):t>u&&(t=u),r=typeof r=="undefined"?u:+r||0,0>r?r=ve(u+r,0):r>u&&(r=u),u=t>r?0:r-t,r=Ir(u);++e>>1,r(n[e])r?0:r);++tr?ve(0,e+r):r,-1u?0:u>>>0);if(t=o.createCallback(t,r,3),Te(n))for(;++ea&&(a=l)}else t=null==t&&dr(n)?u:o.createCallback(t,r,3),pt(n,function(n,r,u){r=t(n,r,u),r>e&&(e=r,a=n) });return a}function rr(n,t,r,e){var u=3>arguments.length;if(t=o.createCallback(t,e,4),Te(n)){var a=-1,i=n.length;for(u&&i&&(r=n[++a]);++aarguments.length;return t=o.createCallback(t,e,4),ht(n,function(n,e,o){r=u?(u=false,n):t(r,n,e,o)}),r}function ur(n){var t=-1,r=n&&n.length,e=Ir(0>r?0:r>>>0);return pt(n,function(n){var r=kt(0,++t);e[t]=e[r],e[r]=n}),e}function or(n,t,r){var e;if(t=o.createCallback(t,r,3),Te(n)){r=-1; for(var u=n.length;++rarguments.length)return Rt(n,x,null,t);if(n)var r=n[S]?n[S][2]:n.length,e=qt(arguments,2),r=r-e.length;return Rt(n,x|O,r,t,e)}function ir(n,t,r){function e(){c&&Hr(c),a=c=s=w,(g||h!==t)&&(p=qe(),i=n.apply(f,o),c||a||(o=f=null))}function u(){var r=t-(qe()-l);0>=r||r>t?(a&&Hr(a),r=s,a=c=s=w,r&&(p=qe(),i=n.apply(f,o),c||a||(o=f=null))):c=oe(u,r)}var o,a,i,l,f,c,s,p=0,h=false,g=true; if(!gr(n))throw new zr;if(t=0>t?0:t,true===r)var v=true,g=false;else vr(r)&&(v=r.leading,h="maxWait"in r&&(ve(t,r.maxWait)||0),g="trailing"in r?r.trailing:g);return function(){if(o=arguments,l=qe(),f=this,s=g&&(c||!v),false===h)var r=v&&!c;else{a||v||(p=l);var y=h-(l-p),m=0>=y||y>h;m?(a&&(a=Hr(a)),p=l,i=n.apply(f,o)):a||(a=oe(e,y))}return m&&c?c=Hr(c):c||t===h||(c=oe(u,t)),r&&(m=true,i=n.apply(f,o)),!m||c||a||(o=f=null),i}}function lr(n){if(!gr(n))throw new zr;return function(){return!n.apply(this,arguments) }}function fr(n,t,r){var e=arguments;if(!n||2>e.length)return n;var u=0,o=e.length,a=typeof r;if("number"!=a&&"string"!=a||!e[3]||e[3][r]!==t||(o=2),3arguments.length)return t;var r=qt(arguments);return r.push(n),fr.apply(null,r)}function sr(n){var t=[];return _t(n,function(n,r){gr(n)&&t.push(r) }),t.sort()}function pr(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Xr.call(n)==J||false}function hr(n){return n&&typeof n=="object"&&1===n.nodeType&&(ke.nodeClass?-1t||null==n)return r;n=Dr(n);do t%2&&(r+=n),t=Jr(t/2),n+=n;while(t);return r}function jr(n,t,r){var e=typeof n;return"function"==e||null==n?(typeof t=="undefined"||!("prototype"in n))&&n||U(n,t,r):"object"!=e?Sr(n):Or(n) }function kr(n){return n}function Or(n){n||(n={});var t=We(n),r=t.length,e=t[0],u=n[e];return 1!=r||u!==u||vr(u)?function(e){for(var u=r,o=false;u--&&(o=t[u],o=te.call(e,o)&&Ct(e[o],n[o],null,true)););return o}:function(n){return te.call(n,e)?(n=n[e],u===n&&(0!==u||1/u==1/n)):false}}function Er(n,t,r){var e=true,u=t&&sr(t);t&&(r||u.length)||(null==r&&(r=t),t=n,n=o,u=sr(t)),false===r?e=false:vr(r)&&"chain"in r&&(e=r.chain),r=-1;for(var a=gr(n),i=u?u.length:0;++r--n?t.apply(this,arguments):void 0}},o.assign=fr,o.at=function(n,t){var r=arguments,e=-1,u=vt(r,true,false,1),o=u.length,a=typeof t;for("number"!=a&&"string"!=a||!r[2]||r[2][t]!==n||(o=1),ke.unindexedChars&&dr(n)&&(n=n.split("")),r=Ir(o);++earguments.length?Rt(t,x|C,null,n):Rt(t,x|C|O,null,n,qt(arguments,2))},o.chain=function(n){return n=new a(n),n.__chain__=true,n},o.compact=function(n){for(var t=-1,r=n?n.length:0,e=0,u=[];++t(h?e(h,c):i(f,c))){for(u=o,(h||f).push(c);--u;)if(h=a[u],0>(h?e(h,c):i(t[u],c)))continue n; p.push(c)}}return p},o.invert=function(n,t){for(var r=-1,e=We(n),u=e.length,o={};++ro?0:o>>>0);return pt(n,function(n){var o=u?t:null!=n&&n[t];a[++e]=o?o.apply(n,r):w}),a},o.keys=We,o.keysIn=br,o.map=nr,o.mapValues=function(n,t,r){var e={};return t=o.createCallback(t,r,3),wt(n,function(n,r,u){e[r]=t(n,r,u)}),e},o.matches=Or,o.max=tr,o.memoize=function(n,t){function r(){var e=r.cache,u=t?t.apply(this,arguments):"_"+arguments[0]; return te.call(e,u)?e[u]:e[u]=n.apply(this,arguments)}if(!gr(n))throw new zr;return r.cache={},r},o.merge=function(n,t,r){if(!n)return n;var e=arguments,u=e.length,o=typeof r;if("number"!=o&&"string"!=o||!e[3]||e[3][r]!==t||(u=2),3u?0:u>>>0);for(a||(t=o.createCallback(t,r,3)),pt(n,function(n,r,u){if(a)for(r=t.length,u=Ir(r);r--;)u[r]=n[t[r]]; else u=t(n,r,u);f[++e]={a:u,b:e,c:n}}),u=f.length,f.sort(a?l:i);u--;)f[u]=f[u].c;return f},o.tap=function(n,t,r){return t.call(r,n),n},o.throttle=function(n,t,r){var e=true,u=true;if(!gr(n))throw new zr;return false===r?e=false:vr(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),ft.leading=e,ft.maxWait=+t,ft.trailing=u,ir(n,t,ft)},o.times=function(n,t,r){n=-1<(n=+n)?n:0;var e=-1,u=Ir(n);for(t=U(t,r,1);++er?ve(0,e+r):ye(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},o.mixin=Er,o.noConflict=function(){return t._=Vr,this},o.noop=Ar,o.now=qe,o.pad=function(n,t,r){n=null==n?"":Dr(n),t|=0;var e=n.length;return e=n.length)return n;var o=r-e.length;if(1>o)return e;if(r=n.slice(0,o),null==u)return r+e;if(mr(u)){if(n.slice(o).search(u)){var a,i,l=n.slice(0,o);for(u.global||(u=$r(u.source,(z.exec(u)||"")+"g")),u.lastIndex=0;a=u.exec(l);)i=a.index; r=r.slice(0,null==i?o:i)}}else n.indexOf(u,o)!=o&&(u=r.lastIndexOf(u),-1n.indexOf(";")?n:n.replace(L,b))},o.uniqueId=function(n){var t=++I;return Dr(null==n?"":n)+t},o.all=Yt,o.any=or,o.detect=Ht,o.findWhere=Ht,o.foldl=rr,o.foldr=er,o.include=Xt,o.inject=rr,Er(function(){var n={};return wt(o,function(t,r){o.prototype[r]||(n[r]=t)}),n}(),false),o.first=Pt,o.last=zt,o.sample=function(n,t,r){return n&&typeof n.length!="number"?n=wr(n):ke.unindexedChars&&dr(n)&&(n=n.split("")),null==t||r?(t=n?n.length:0,0"']/g,F=/<%-([\s\S]+?)%>/g,P=/<%([\s\S]+?)%>/g,$=/<%=([\s\S]+?)%>/g,D=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,z=/\w*$/,B=/^\s*function[ \n\r\t]+\w/,q=/^0[xX]/,U=/[\xC0-\xFF]/g,K=/($^)/,M=/[.*+?^${}()|[\]\\]/g,V=/\bthis\b/,Z=/['\n\r\t\u2028\u2029\\]/g,X=/[A-Z]{2,}|[a-zA-Z0-9][a-z0-9]*/g,Y=" \t\x0B\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",G="Array Boolean Date Error Function Math Number Object RegExp Set String _ clearTimeout document isFinite isNaN parseInt setTimeout TypeError window WinRTError".split(" "),H="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),J="[object Arguments]",Q="[object Array]",nt="[object Boolean]",tt="[object Date]",rt="[object Error]",et="[object Function]",ut="[object Number]",ot="[object Object]",at="[object RegExp]",it="[object String]",lt={}; lt[et]=false,lt[J]=lt[Q]=lt[nt]=lt[tt]=lt[ut]=lt[ot]=lt[at]=lt[it]=true;var ft={leading:false,maxWait:0,trailing:false},ct={configurable:false,enumerable:false,value:null,writable:false},st={"&":"&","<":"<",">":">",'"':""","'":"'"},pt={"&":"&","<":"<",">":">",""":'"',"'":"'"},ht={\u00c0:"A",\u00c1:"A",\u00c2:"A",\u00c3:"A",\u00c4:"A",\u00c5:"A",\u00e0:"a",\u00e1:"a",\u00e2:"a",\u00e3:"a",\u00e4:"a",\u00e5:"a",\u00c7:"C",\u00e7:"c",\u00d0:"D",\u00f0:"d",\u00c8:"E",\u00c9:"E",\u00ca:"E",\u00cb:"E",\u00e8:"e",\u00e9:"e",\u00ea:"e",\u00eb:"e",\u00cc:"I",\u00cd:"I",\u00ce:"I",\u00cf:"I",\u00ec:"i",\u00ed:"i",\u00ee:"i",\u00ef:"i",\u00d1:"N",\u00f1:"n",\u00d2:"O",\u00d3:"O",\u00d4:"O",\u00d5:"O",\u00d6:"O",\u00d8:"O",\u00f2:"o",\u00f3:"o",\u00f4:"o",\u00f5:"o",\u00f6:"o",\u00f8:"o",\u00d9:"U",\u00da:"U",\u00db:"U",\u00dc:"U",\u00f9:"u",\u00fa:"u",\u00fb:"u",\u00fc:"u",\u00dd:"Y",\u00fd:"y",\u00ff:"y",\u00c6:"AE",\u00e6:"ae",\u00de:"Th",\u00fe:"th",\u00df:"ss","\xd7":" ","\xf7":" "},gt={"function":true,object:true},vt={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},yt=gt[typeof window]&&window||this,mt=gt[typeof exports]&&exports&&!exports.nodeType&&exports,gt=gt[typeof module]&&module&&!module.nodeType&&module,dt=mt&>&&typeof global=="object"&&global; !dt||dt.global!==dt&&dt.window!==dt&&dt.self!==dt||(yt=dt);var dt=gt&>.exports===mt&&mt,bt=_();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(yt._=bt, define(function(){return bt})):mt&>?dt?(gt.exports=bt)._=bt:mt._=bt:yt._=bt}).call(this);