define(["./when-54335d57","./Cartesian2-697a9954","./ArcType-2b58731c","./GeometryOffsetAttribute-6e5d8e16","./BoundingRectangle-f46bca91","./Transforms-251ff661","./Check-f3fec9b0","./ComponentDatatype-417761a2","./EllipsoidGeodesic-efd225af","./EllipsoidTangentPlane-ae33ec6a","./GeometryAttribute-7ca1c9e4","./GeometryInstance-1bb3fb4a","./GeometryPipeline-1dd54e44","./IndexDatatype-c134ea39","./Math-737a2579","./PolygonGeometryLibrary-e3208a07","./PolygonPipeline-1048742e","./VertexFormat-acf45ede","./RuntimeError-88a32665","./WebGLConstants-4739ce15","./AxisAlignedBoundingBox-dcfdb7a9","./IntersectionTests-3e34a0aa","./Plane-d4cb7bb3","./AttributeCompression-ab5c33b7","./EncodedCartesian3-0ae9fe5e","./arrayRemoveDuplicates-db90b85c","./EllipsoidRhumbLine-e5c51fa7","./GeometryAttributes-caa08d6c"],function(z,W,p,Y,e,U,t,j,y,A,Q,E,G,O,q,V,F,f,a,r,o,i,n,s,l,u,c,m){"use strict";var K=new W.Cartographic,Z=new W.Cartographic;var D=new e.BoundingRectangle,J=new W.Cartesian3,X=new W.Cartesian3,$=new W.Cartesian3,ee=new W.Cartesian3,te=new W.Cartesian3,ae=new W.Cartesian3,re=new W.Cartesian3,oe=new W.Cartesian3,ie=new W.Cartesian3,ne=new W.Cartesian2,se=new W.Cartesian2,le=new W.Cartesian3,ue=new U.Quaternion,ce=new U.Matrix3,pe=new U.Matrix3;function L(e){var t,a=e.vertexFormat,r=e.geometry,o=e.shadowVolume,i=r.attributes.position.values,n=i.length,s=e.wall,l=e.top||s,u=e.bottom||s;if(a.st||a.normal||a.tangent||a.bitangent||o){var c=e.boundingRectangle,p=e.tangentPlane,y=e.ellipsoid,m=e.stRotation,g=e.perPositionHeight,d=ne;d.x=c.x,d.y=c.y;var h,f=a.st?new Float32Array(n/3*2):void 0;a.normal&&(h=g&&l&&!s?r.attributes.normal.values:new Float32Array(n));var b,_=a.tangent?new Float32Array(n):void 0,v=a.bitangent?new Float32Array(n):void 0,P=o?new Float32Array(n):void 0,C=0,x=0,w=X,T=$,I=ee,A=!0,E=ce,G=pe;G=0!==m?(b=U.Quaternion.fromAxisAngle(p._plane.normal,m,ue),E=U.Matrix3.fromQuaternion(b,E),b=U.Quaternion.fromAxisAngle(p._plane.normal,-m,ue),U.Matrix3.fromQuaternion(b,G)):(E=U.Matrix3.clone(U.Matrix3.IDENTITY,E),U.Matrix3.clone(U.Matrix3.IDENTITY,G));var O=0,V=0;l&&u&&(O=n/2,V=n/3,n/=2);for(var F=0;Fh.eastOverIDL-h.westOverIDL&&(o.west=h.westOverIDL,o.east=h.eastOverIDL,o.east>q.CesiumMath.PI&&(o.east=o.east-q.CesiumMath.TWO_PI),o.west>q.CesiumMath.PI&&(o.west=o.west-q.CesiumMath.TWO_PI)),o}var v=new W.Cartographic;function P(e,t,a,r){for(var o=e.surfaceDistance,i=Math.ceil(o*t),n=0