(function(){var e=function(e){var t=this,n=function(){var t=function(e){return e!==undefined?this.array[0]=e:this.array[0]},n=function(e){return e!==undefined?this.array[1]=e:this.array[1]};e.Vector=function(){this.update(e.makeArray(arguments))},e.Vector.prototype={app:function(t){var n,r,i=[];for(n=0;n<this.array.length;n++)i.push(t(this.array[n]));return r=new e.Vector,r.update(i)},plus:function(){var t,n=arguments[0]instanceof e.Vector?arguments[0].array:e.makeArray(arguments),r=this.array.slice(0),i=new e.Vector;for(t=0;t<n.length;t++)r[t]=(r[t]?r[t]:0)+n[t];return i.update(r)},minus:function(){var t,n=arguments[0]instanceof e.Vector?arguments[0].array:e.makeArray(arguments),r=this.array.slice(0),i=new e.Vector;for(t=0;t<n.length;t++)r[t]=(r[t]?r[t]:0)-n[t];return i.update(r)},equals:function(){var t,n=arguments[0]instanceof e.Vector?arguments[0].array:e.makeArray(arguments),r=this.array.slice(0),i=new e.Vector;for(t=0;t<n.length;t++)if(r[t]!=n[t])return null;return i.update(r)},x:t,left:t,width:t,y:n,top:n,height:n,toString:function(){return"("+this.array[0]+","+this.array[1]+")"},update:function(e){var t;if(this.array)for(t=0;t<this.array.length;t++)delete this.array[t];this.array=e;for(t=0;t<e.length;t++)this[t]=this.array[t];return this}},e.Event.prototype.vector=function(){if(this.originalEvent.synthetic){var t=document.documentElement,n=document.body;return new e.Vector(this.clientX+(t&&t.scrollLeft||n&&n.scrollLeft||0)-(t.clientLeft||0),this.clientY+(t&&t.scrollTop||n&&n.scrollTop||0)-(t.clientTop||0))}return new e.Vector(this.pageX,this.pageY)},e.fn.offsetv=function(){if(this[0]==window)return new e.Vector(window.pageXOffset?window.pageXOffset:document.documentElement.scrollLeft,window.pageYOffset?window.pageYOffset:document.documentElement.scrollTop);var t=this.offset();return new e.Vector(t.left,t.top)},e.fn.dimensionsv=function(t){return this[0]==window||!t?new e.Vector(this.width(),this.height()):new e.Vector(this[t+"Width"](),this[t+"Height"]())}};n(),t.resolveWith(n)};dispatch("mvc/lang.vector").containing(e).to("Foundry/2.1 Modules")})();