define(["./defaultValue-f6d5e6da","./Matrix3-81054f0f","./ArcType-26a3f38d","./BoundingRectangle-1d581417","./Transforms-20461479","./Matrix2-413c4048","./ComponentDatatype-ab629b88","./EllipsoidGeodesic-2723ab86","./EllipsoidTangentPlane-d430e7d5","./GeometryAttribute-b8117bde","./GeometryInstance-0318e0cd","./GeometryOffsetAttribute-2579b8d2","./GeometryPipeline-fcaf4d4d","./IndexDatatype-d3db4e7d","./Math-2ce22ee9","./PolygonGeometryLibrary-d7e504f0","./PolygonPipeline-621b1cb0","./VertexFormat-fbdec922","./combine-0c102d93","./RuntimeError-9b4ce3fb","./WebGLConstants-7f557f93","./AxisAlignedBoundingBox-2c0751ca","./IntersectionTests-a57eed59","./Plane-6add0ae1","./AttributeCompression-48e336db","./EncodedCartesian3-5e2017ab","./arrayRemoveDuplicates-9b636830","./EllipsoidRhumbLine-77eff028","./GeometryAttributes-1e4ddcd2"],(function(t,e,o,i,r,n,a,s,l,u,c,p,y,d,m,g,h,f,b,_,P,x,C,w,T,I,A,v,E){"use strict";const G=new e.Cartographic,O=new e.Cartographic;function L(t,e,o,i){const r=i.cartesianToCartographic(t,G).height,n=i.cartesianToCartographic(e,O);n.height=r,i.cartographicToCartesian(n,e);const a=i.cartesianToCartographic(o,O);a.height=r-100,i.cartographicToCartesian(a,o)}const V=new i.BoundingRectangle,H=new e.Cartesian3,D=new e.Cartesian3,N=new e.Cartesian3,F=new e.Cartesian3,R=new e.Cartesian3,M=new e.Cartesian3;let S=new e.Cartesian3,B=new e.Cartesian3,k=new e.Cartesian3;const z=new n.Cartesian2,W=new n.Cartesian2,Y=new e.Cartesian3,U=new r.Quaternion,j=new e.Matrix3,Q=new e.Matrix3;function q(o){const i=o.vertexFormat,s=o.geometry,l=o.shadowVolume,c=s.attributes.position.values,y=t.defined(s.attributes.st)?s.attributes.st.values:void 0;let d=c.length;const g=o.wall,h=o.top||g,f=o.bottom||g;if(i.st||i.normal||i.tangent||i.bitangent||l){const p=o.boundingRectangle,b=o.tangentPlane,_=o.ellipsoid,P=o.stRotation,x=o.perPositionHeight,C=z;C.x=p.x,C.y=p.y;const w=i.st?new Float32Array(d/3*2):void 0;let T;i.normal&&(T=x&&h&&!g?s.attributes.normal.values:new Float32Array(d));const I=i.tangent?new Float32Array(d):void 0,A=i.bitangent?new Float32Array(d):void 0,v=l?new Float32Array(d):void 0;let E=0,G=0,O=D,V=N,q=F,K=!0,Z=j,J=Q;if(0!==P){let t=r.Quaternion.fromAxisAngle(b._plane.normal,P,U);Z=e.Matrix3.fromQuaternion(t,Z),t=r.Quaternion.fromAxisAngle(b._plane.normal,-P,U),J=e.Matrix3.fromQuaternion(t,J)}else Z=e.Matrix3.clone(e.Matrix3.IDENTITY,Z),J=e.Matrix3.clone(e.Matrix3.IDENTITY,J);let X=0,$=0;h&&f&&(X=d/2,$=d/3,d/=2);for(let r=0;rJ.eastOverIDL-J.westOverIDL&&(l.west=J.westOverIDL,l.east=J.eastOverIDL,l.east>m.CesiumMath.PI&&(l.east=l.east-m.CesiumMath.TWO_PI),l.west>m.CesiumMath.PI&&(l.west=l.west-m.CesiumMath.TWO_PI)),l}const tt=new e.Cartographic;function et(t,e,o,i){const r=t.surfaceDistance,n=Math.ceil(r*e),a=n>0?r/(n-1):Number.POSITIVE_INFINITY;let s=0;for(let e=0;e=0?r:r+m.CesiumMath.TWO_PI;i.westOverIDL=Math.min(i.westOverIDL,l),i.eastOverIDL=Math.max(i.eastOverIDL,l)}}const ot=[];function it(e,o,i,r,n,a,s,u,p,y){const m={walls:[]};let f;if(s||u){const n=g.PolygonGeometryLibrary.createGeometryFromPositions(e,o,i,r,a,p,y),l=n.attributes.position.values,h=n.indices;let b,_;if(s&&u){const e=l.concat(l);b=e.length/3,_=d.IndexDatatype.createTypedArray(b,2*h.length),_.set(h);const o=h.length,r=b/2;for(f=0;f