!function(){"use strict";angular.module("fqueue",[]).factory("FixedQueue",function(){function a(b,c){c=c||[];var d=Array.apply(null,c);return d.fixedSize=b,d.push=a.push,d.splice=a.splice,d.unshift=a.unshift,a.trimTail.call(d),d}return a.trimHead=function(){this.length<=this.fixedSize||Array.prototype.splice.call(this,0,this.length-this.fixedSize)},a.trimTail=function(){this.length<=this.fixedSize||Array.prototype.splice.call(this,this.fixedSize,this.length-this.fixedSize)},a.wrapMethod=function(a,b){var c=function(){var c=Array.prototype[a],d=c.apply(this,arguments);return b.call(this),d};return c},a.push=a.wrapMethod("push",a.trimHead),a.splice=a.wrapMethod("splice",a.trimTail),a.unshift=a.wrapMethod("unshift",a.trimTail),a})}();