function Queue(){this._callbacks=[],this._flushed=!1}Queue.prototype={add:function(a){var b=Array.prototype.slice.call(arguments,1);this._flushed?a.apply(a,b):this._callbacks.push(function(){var c=b.concat(Array.prototype.slice.call(arguments));a.apply(a,c)})},flush:function(){if(this._flushed)return;this._flushed=!0;while(this._callbacks[0])fn=this._callbacks.shift(),fn.apply(fn,Array.prototype.slice.call(arguments))}}