!function(){var a={prepend:Array.prototype.unshift,topk:function(){for(var a=this,b=(a.length||1,{}),c=a.length-1;c>-1;)null==b[a[c]]?b[a[c]]=1:b[a[c]]++,c--;var d=Object.keys(b).sort(function(a,c){return b[c]-b[a]});return d.map(function(a){return{value:a,count:b[a]}})},topkp:function(){var a=this,b=a.length;return a=a.topk(),a.map(function(a){return a.percentage=a.count/b,a})},pluck:function(a){return this.map(function(b){return b[a]})},grab:function(a){return this.pluck(a)},spigot:function(a){var b={"true":[],"false":[]};return this.forEach(function(c){return a(c)?b["true"].push(c):b["false"].push(c)}),b},moses:function(a){return this.spigtot(a)},duplicates:function(a){var b=this;a&&(b=b.grab(a)),b=b.sort();for(var c=[],d=0;d<b.length-1;)b[d+1]===b[d]&&c.push(b[d]),d++;return c},dupes:function(a){return this.duplicates(a)},overlap:function(a){return this.filter(function(b){return a.some(function(a){return b===a})})},unique:function(a){var b,c={},d=this.length,e=[];if(void 0!==a){for(b=0;d>b;b+=1)void 0===c[this[b][a]]&&e.push(this[b]),c[this[b][a]]=!0;return e}for(b=0;d>b;b+=1)c[this[b]]=this[b];var f=Object.keys(c);for(d=f.length,b=0;d>b;b+=1)e.push(c[f[b]]);return e},uniq:function(a){return this.unique(a)},uniq_by:function(a){return this.unique(a)},random:function(){var a=this;return a[Math.floor(Math.random()*a.length)]},has:function(a){return this.some(function(b){return a===b})},includes:function(a){return this.has(a)},sum:function(a){return a?this.reduce(function(b,c){return b+c[a]},0):this.reduce(function(a,b){return a+b},0)},average:function(a){return this.sum(a)/this.length},flatten:function(){var a=this;return[].concat.apply([],a)},shuffle:function(){for(var a,b,c=this,d=c.length;d;)b=Math.floor(Math.random()*d--),a=c[d],c[d]=c[b],c[b]=a;return c},randomize:function(){return this.shuffle()},compact:function(){return this.filter(function(a){return void 0!==a&&null!==a})}};Object.keys(a).forEach(function(b){return Object.defineProperty(Array.prototype,b,{value:a[b],configurable:!0,enumerable:!1})})}();