define(["./when-4bbc8319","./Matrix2-860854d4","./ArcType-fc72c06c","./GeometryOffsetAttribute-24539cee","./BoundingRectangle-aee525c0","./Transforms-0becfc64","./RuntimeError-1349fdaf","./ComponentDatatype-8f55628c","./EllipsoidGeodesic-0a6aa4ee","./EllipsoidTangentPlane-407b38a6","./GeometryAttribute-4590b388","./GeometryInstance-ace7be43","./GeometryPipeline-8721156a","./IndexDatatype-1d853600","./PolygonGeometryLibrary-70493175","./PolygonPipeline-bfbb6016","./VertexFormat-b8b51b88","./combine-e9466e32","./WebGLConstants-508b9636","./AxisAlignedBoundingBox-ebc959c9","./IntersectionTests-1d677ce2","./Plane-0e4269ac","./AttributeCompression-5f6be9e6","./EncodedCartesian3-6e74751e","./arrayRemoveDuplicates-b1a32b72","./EllipsoidRhumbLine-d4d43630","./GeometryAttributes-7827a6c2"],(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;rK.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=0?n:n+s.CesiumMath.TWO_PI;i.westOverIDL=Math.min(i.westOverIDL,c),i.eastOverIDL=Math.max(i.eastOverIDL,c)}}const ee=[];function te(e,t,o,i,n,r,a,s,l){const u={walls:[]};let m;if(r||a){const i=g.PolygonGeometryLibrary.createGeometryFromPositions(e,t,o,n,s,l),c=i.attributes.position.values,d=i.indices;let h,f;if(r&&a){const e=c.concat(c);h=e.length/3,f=y.IndexDatatype.createTypedArray(h,2*d.length),f.set(d);const t=d.length,o=h/2;for(m=0;m