define(["./when-229515d6","./Matrix2-f0fc6cd3","./ArcType-e1641d8d","./GeometryOffsetAttribute-369d5efa","./BoundingRectangle-8d15888c","./Transforms-4a1d2c0e","./RuntimeError-8f3d96ee","./ComponentDatatype-5f63ec93","./EllipsoidGeodesic-412b0c43","./EllipsoidTangentPlane-3f1b123a","./GeometryAttribute-4b6dfc85","./GeometryInstance-28411208","./GeometryPipeline-c36432c1","./IndexDatatype-c2b69fc2","./PolygonGeometryLibrary-0cf237e6","./PolygonPipeline-583f5389","./VertexFormat-af764a6f","./combine-6d9c3903","./WebGLConstants-f63312fc","./AxisAlignedBoundingBox-0ebb51f1","./IntersectionTests-3a1d2826","./Plane-863ea815","./AttributeCompression-0ee09568","./EncodedCartesian3-55eee0ea","./arrayRemoveDuplicates-7cd4e18c","./EllipsoidRhumbLine-0893952b","./GeometryAttributes-b253752a"],(function(e,t,o,i,n,r,a,s,l,c,u,p,m,y,g,d,h,f,b,_,P,x,w,C,T,I,A){"use strict";const E=new t.Cartographic,v=new t.Cartographic;function G(e,t,o,i){const n=i.cartesianToCartographic(e,E).height,r=i.cartesianToCartographic(t,v);r.height=n,i.cartographicToCartesian(r,t);const a=i.cartesianToCartographic(o,v);a.height=n-100,i.cartographicToCartesian(a,o)}const O=new n.BoundingRectangle,V=new t.Cartesian3,F=new t.Cartesian3,D=new t.Cartesian3,L=new t.Cartesian3,N=new t.Cartesian3,H=new t.Cartesian3;let R=new t.Cartesian3,M=new t.Cartesian3,S=new t.Cartesian3;const B=new t.Cartesian2,k=new t.Cartesian2,z=new t.Cartesian3,W=new r.Quaternion,Y=new t.Matrix3,U=new t.Matrix3;function j(o){const n=o.vertexFormat,a=o.geometry,l=o.shadowVolume,c=a.attributes.position.values;let p=c.length;const m=o.wall,y=o.top||m,g=o.bottom||m;if(n.st||n.normal||n.tangent||n.bitangent||l){const e=o.boundingRectangle,i=o.tangentPlane,d=o.ellipsoid,h=o.stRotation,f=o.perPositionHeight,b=B;b.x=e.x,b.y=e.y;const _=n.st?new Float32Array(p/3*2):void 0;let P;n.normal&&(P=f&&y&&!m?a.attributes.normal.values:new Float32Array(p));const x=n.tangent?new Float32Array(p):void 0,w=n.bitangent?new Float32Array(p):void 0,C=l?new Float32Array(p):void 0;let T=0,I=0,A=F,E=D,v=L,O=!0,j=Y,Q=U;if(0!==h){let e=r.Quaternion.fromAxisAngle(i._plane.normal,h,W);j=t.Matrix3.fromQuaternion(e,j),e=r.Quaternion.fromAxisAngle(i._plane.normal,-h,W),Q=t.Matrix3.fromQuaternion(e,Q)}else j=t.Matrix3.clone(t.Matrix3.IDENTITY,j),Q=t.Matrix3.clone(t.Matrix3.IDENTITY,Q);let q=0,K=0;y&&g&&(q=p/2,K=p/3,p/=2);for(let r=0;r
K.eastOverIDL-K.westOverIDL&&(c.west=K.westOverIDL,c.east=K.eastOverIDL,c.east>s.CesiumMath.PI&&(c.east=c.east-s.CesiumMath.TWO_PI),c.west>s.CesiumMath.PI&&(c.west=c.west-s.CesiumMath.TWO_PI)),c}const X=new t.Cartographic;function $(e,t,o,i){const n=e.surfaceDistance,r=Math.ceil(n*t),a=r>0?n/(r-1):Number.POSITIVE_INFINITY;let l=0;for(let t=0;t