define(["exports","./buildModuleUrl-8cce5713","./Cartesian4-b0ddc4ba","./Check-7b2a090c","./when-b60132fc"],(function(t,e,i,n,h){"use strict";function r(t,e,i,n){this.x=h.defaultValue(t,0),this.y=h.defaultValue(e,0),this.width=h.defaultValue(i,0),this.height=h.defaultValue(n,0)}r.packedLength=4,r.pack=function(t,e,i){return i=h.defaultValue(i,0),e[i++]=t.x,e[i++]=t.y,e[i++]=t.width,e[i]=t.height,e},r.unpack=function(t,e,i){return e=h.defaultValue(e,0),h.defined(i)||(i=new r),i.x=t[e++],i.y=t[e++],i.width=t[e++],i.height=t[e],i},r.fromPoints=function(t,e){if(h.defined(e)||(e=new r),!h.defined(t)||0===t.length)return e.x=0,e.y=0,e.width=0,e.height=0,e;for(var i=t.length,n=t[0].x,a=t[0].y,d=t[0].x,u=t[0].y,c=1;ci.width?i.width=n:n<0&&(i.width-=n,i.x=e.x),h>i.height?i.height=h:h<0&&(i.height-=h,i.y=e.y),i},r.intersect=function(t,i){var n=t.x,h=t.y,r=i.x,a=i.y;return n>r+i.width||n+t.widtha+i.height?e.Intersect.OUTSIDE:e.Intersect.INTERSECTING},r.equals=function(t,e){return t===e||h.defined(t)&&h.defined(e)&&t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height},r.prototype.clone=function(t){return r.clone(this,t)},r.prototype.intersect=function(t){return r.intersect(this,t)},r.prototype.equals=function(t){return r.equals(this,t)},t.BoundingRectangle=r}));