define(["exports","./Matrix2-c6c16658","./RuntimeError-5b082e8f","./when-4bbc8319","./WebGLConstants-508b9636","./Transforms-f15de320"],(function(t,e,n,a,r,i){"use strict";var o=Object.freeze({NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3});const s={POINTS:r.WebGLConstants.POINTS,LINES:r.WebGLConstants.LINES,LINE_LOOP:r.WebGLConstants.LINE_LOOP,LINE_STRIP:r.WebGLConstants.LINE_STRIP,TRIANGLES:r.WebGLConstants.TRIANGLES,TRIANGLE_STRIP:r.WebGLConstants.TRIANGLE_STRIP,TRIANGLE_FAN:r.WebGLConstants.TRIANGLE_FAN,validate:function(t){return t===s.POINTS||t===s.LINES||t===s.LINE_LOOP||t===s.LINE_STRIP||t===s.TRIANGLES||t===s.TRIANGLE_STRIP||t===s.TRIANGLE_FAN}};var u=Object.freeze(s);function I(t){t=a.defaultValue(t,a.defaultValue.EMPTY_OBJECT),this.attributes=t.attributes,this.indices=t.indices,this.primitiveType=a.defaultValue(t.primitiveType,u.TRIANGLES),this.boundingSphere=t.boundingSphere,this.geometryType=a.defaultValue(t.geometryType,o.NONE),this.boundingSphereCV=t.boundingSphereCV,this.offsetAttribute=t.offsetAttribute}I.computeNumberOfVertices=function(t){let e=-1;for(const n in t.attributes)if(t.attributes.hasOwnProperty(n)&&a.defined(t.attributes[n])&&a.defined(t.attributes[n].values)){const a=t.attributes[n];e=a.values.length/a.componentsPerAttribute}return e};const N=new e.Cartographic,c=new e.Cartesian3,l=new e.Matrix4,T=[new e.Cartographic,new e.Cartographic,new e.Cartographic],b=[new e.Cartesian2,new e.Cartesian2,new e.Cartesian2],m=[new e.Cartesian2,new e.Cartesian2,new e.Cartesian2],p=new e.Cartesian3,f=new i.Quaternion,y=new e.Matrix4,E=new e.Matrix2;I._textureCoordinateRotationPoints=function(t,n,a,r){let o;const s=e.Rectangle.center(r,N),u=e.Cartographic.toCartesian(s,a,c),I=i.Transforms.eastNorthUpToFixedFrame(u,a,l),L=e.Matrix4.inverse(I,l),h=b,C=T;C[0].longitude=r.west,C[0].latitude=r.south,C[1].longitude=r.west,C[1].latitude=r.north,C[2].longitude=r.east,C[2].latitude=r.south;let x=p;for(o=0;o<3;o++)e.Cartographic.toCartesian(C[o],a,x),x=e.Matrix4.multiplyByPointAsVector(L,x,x),h[o].x=x.x,h[o].y=x.y;const d=i.Quaternion.fromAxisAngle(e.Cartesian3.UNIT_Z,-n,f),A=e.Matrix3.fromQuaternion(d,y),P=t.length;let S=Number.POSITIVE_INFINITY,G=Number.POSITIVE_INFINITY,w=Number.NEGATIVE_INFINITY,R=Number.NEGATIVE_INFINITY;for(o=0;o