define(["./when-e3a49219","./Matrix2-ae0e0b05","./ArcType-5c308c35","./GeometryOffsetAttribute-9dbaeacc","./BoundingRectangle-61e59108","./Transforms-a6362ad2","./RuntimeError-ffc802eb","./ComponentDatatype-64cf6611","./EllipsoidGeodesic-524df442","./EllipsoidTangentPlane-e3af9e65","./GeometryAttribute-50aef525","./GeometryInstance-81c02fd9","./GeometryPipeline-50591033","./IndexDatatype-e12e2493","./PolygonGeometryLibrary-e16e0c71","./PolygonPipeline-2bbe6eb1","./VertexFormat-9bafa8ef","./PixelFormat-83d70a69","./WebGLConstants-1c8239cc","./combine-c7a1ec8a","./AxisAlignedBoundingBox-699685f5","./IntersectionTests-8be403d7","./Plane-2bf1bb80","./AttributeCompression-8cb78525","./EncodedCartesian3-f1386330","./arrayRemoveDuplicates-328bac4c","./EllipsoidRhumbLine-b6518e5c","./GeometryAttributes-3db3f2c9"],(function(e,t,r,a,o,i,n,s,l,u,c,p,m,y,g,d,h,f,v,b,_,P,x,w,C,T,I,A){"use strict";var E=new t.Cartographic,G=new t.Cartographic;function O(e,t,r,a){var o=a.cartesianToCartographic(e,E).height,i=a.cartesianToCartographic(t,G);i.height=o,a.cartographicToCartesian(i,t);var n=a.cartesianToCartographic(r,G);n.height=o-100,a.cartographicToCartesian(n,r)}var V=new o.BoundingRectangle,F=new t.Cartesian3,D=new t.Cartesian3,L=new t.Cartesian3,N=new t.Cartesian3,H=new t.Cartesian3,R=new t.Cartesian3,M=new t.Cartesian3,S=new t.Cartesian3,B=new t.Cartesian3,k=new t.Cartesian2,z=new t.Cartesian2,W=new t.Cartesian3,Y=new i.Quaternion,U=new t.Matrix3,j=new t.Matrix3;function Q(r){var o=r.vertexFormat,n=r.geometry,l=r.shadowVolume,u=n.attributes.position.values,p=u.length,m=r.wall,y=r.top||m,g=r.bottom||m;if(o.st||o.normal||o.tangent||o.bitangent||l){var d=r.boundingRectangle,h=r.tangentPlane,f=r.ellipsoid,v=r.stRotation,b=r.perPositionHeight,_=k;_.x=d.x,_.y=d.y;var P,x=o.st?new Float32Array(p/3*2):void 0;o.normal&&(P=b&&y&&!m?n.attributes.normal.values:new Float32Array(p));var w=o.tangent?new Float32Array(p):void 0,C=o.bitangent?new Float32Array(p):void 0,T=l?new Float32Array(p):void 0,I=0,A=0,E=D,G=L,V=N,Q=!0,q=U,K=j;if(0!==v){var Z=i.Quaternion.fromAxisAngle(h._plane.normal,v,Y);q=t.Matrix3.fromQuaternion(Z,q),Z=i.Quaternion.fromAxisAngle(h._plane.normal,-v,Y),K=t.Matrix3.fromQuaternion(Z,K)}else q=t.Matrix3.clone(t.Matrix3.IDENTITY,q),K=t.Matrix3.clone(t.Matrix3.IDENTITY,K);var J=0,X=0;y&&g&&(J=p/2,X=p/3,p/=2);for(var $=0;$Z.eastOverIDL-Z.westOverIDL&&(u.west=Z.westOverIDL,u.east=Z.eastOverIDL,u.east>s.CesiumMath.PI&&(u.east=u.east-s.CesiumMath.TWO_PI),u.west>s.CesiumMath.PI&&(u.west=u.west-s.CesiumMath.TWO_PI)),u}var $=new t.Cartographic;function ee(e,t,r,a){for(var o=e.surfaceDistance,i=Math.ceil(o*t),n=i>0?o/(i-1):Number.POSITIVE_INFINITY,l=0,u=0;u=0?p:p+s.CesiumMath.TWO_PI;a.westOverIDL=Math.min(a.westOverIDL,y),a.eastOverIDL=Math.max(a.eastOverIDL,y)}}var te=[];function re(e,t,r,a,o,i,n,s,l){var c,m={walls:[]};if(i||n){var h,f,v=g.PolygonGeometryLibrary.createGeometryFromPositions(e,t,r,o,s,l),b=v.attributes.position.values,_=v.indices;if(i&&n){var P=b.concat(b);h=P.length/3,(f=y.IndexDatatype.createTypedArray(h,2*_.length)).set(_);var x=_.length,w=h/2;for(c=0;c