define(["./arrayRemoveDuplicates-d2f048c5","./buildModuleUrl-57a32107","./Cartographic-3309dd0d","./Check-7b2a090c","./ComponentDatatype-c140a87d","./CoplanarPolygonGeometryLibrary-a90e3534","./when-b60132fc","./GeometryAttribute-c42d25b7","./GeometryAttributes-252e9929","./GeometryInstance-dbc9f4c4","./GeometryPipeline-6d9322f0","./IndexDatatype-8a5eead4","./PolygonGeometryLibrary-20c09e27","./Cartesian2-47311507","./Math-119be1a3","./Matrix4-cde86d0e","./Cartesian4-3ca25aab","./RuntimeError-4a5c8994","./WebGLConstants-4ae0db90","./OrientedBoundingBox-fcba62fd","./EllipsoidTangentPlane-ceab6aaa","./IntersectionTests-5e35c2ab","./Plane-ca0357f4","./PolygonPipeline-805ba13c","./earcut-2.2.1-20c8012f","./EllipsoidRhumbLine-ed1a6bf4","./FeatureDetection-c3b71206","./AttributeCompression-90851096","./EncodedCartesian3-f1396b05","./ArcType-29cf2197"],(function(e,t,r,a,n,o,i,y,c,l,p,u,s,d,m,b,g,f,h,P,G,v,C,L,E,T,k,H,w,A){"use strict";function D(e){for(var r=e.length,a=new Float64Array(3*r),o=u.IndexDatatype.createTypedArray(r,2*r),i=0,l=0,p=0;p<r;p++){var s=e[p];a[i++]=s.x,a[i++]=s.y,a[i++]=s.z,o[l++]=p,o[l++]=(p+1)%r}var d=new c.GeometryAttributes({position:new y.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:a})});return new y.Geometry({attributes:d,indices:o,primitiveType:t.PrimitiveType.LINES})}function I(e){var t=(e=i.defaultValue(e,i.defaultValue.EMPTY_OBJECT)).polygonHierarchy;this._polygonHierarchy=t,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=s.PolygonGeometryLibrary.computeHierarchyPackedLength(t)+1}I.fromPositions=function(e){return new I({polygonHierarchy:{positions:(e=i.defaultValue(e,i.defaultValue.EMPTY_OBJECT)).positions}})},I.pack=function(e,t,r){return r=i.defaultValue(r,0),t[r=s.PolygonGeometryLibrary.packPolygonHierarchy(e._polygonHierarchy,t,r)]=e.packedLength,t};var _={polygonHierarchy:{}};return I.unpack=function(e,t,r){t=i.defaultValue(t,0);var a=s.PolygonGeometryLibrary.unpackPolygonHierarchy(e,t);t=a.startingIndex,delete a.startingIndex;var n=e[t];return i.defined(r)||(r=new I(_)),r._polygonHierarchy=a,r.packedLength=n,r},I.createGeometry=function(a){var n=a._polygonHierarchy,i=n.positions;if(!((i=e.arrayRemoveDuplicates(i,r.Cartesian3.equalsEpsilon,!0)).length<3)&&o.CoplanarPolygonGeometryLibrary.validOutline(i)){var c=s.PolygonGeometryLibrary.polygonOutlinesFromHierarchy(n,!1);if(0!==c.length){for(var u=[],d=0;d<c.length;d++){var m=new l.GeometryInstance({geometry:D(c[d])});u.push(m)}var b=p.GeometryPipeline.combineInstances(u)[0],g=t.BoundingSphere.fromPoints(n.positions);return new y.Geometry({attributes:b.attributes,indices:b.indices,primitiveType:b.primitiveType,boundingSphere:g})}}},function(e,t){return i.defined(t)&&(e=I.unpack(e,t)),e._ellipsoid=d.Ellipsoid.clone(e._ellipsoid),I.createGeometry(e)}}));
