define(["exports","./GeometryOffsetAttribute-1772960d","./Transforms-d5c6ad6e","./Matrix2-ccd5b911","./ComponentDatatype-93750d1a","./when-4bbc8319","./RuntimeError-346a3079","./GeometryAttribute-c30799b8","./GeometryAttributes-7827a6c2","./IndexDatatype-b7d979a6"],function(i,D,I,T,z,L,t,R,N,B){"use strict";var f=new T.Cartesian3(1,1,1),S=Math.cos,U=Math.sin;function l(i){i=L.defaultValue(i,L.defaultValue.EMPTY_OBJECT);var t=L.defaultValue(i.radii,f),e=L.defaultValue(i.innerRadii,t),a=L.defaultValue(i.minimumClock,0),n=L.defaultValue(i.maximumClock,z.CesiumMath.TWO_PI),r=L.defaultValue(i.minimumCone,0),o=L.defaultValue(i.maximumCone,z.CesiumMath.PI),s=Math.round(L.defaultValue(i.stackPartitions,10)),m=Math.round(L.defaultValue(i.slicePartitions,8)),u=Math.round(L.defaultValue(i.subdivisions,128));this._radii=T.Cartesian3.clone(t),this._innerRadii=T.Cartesian3.clone(e),this._minimumClock=a,this._maximumClock=n,this._minimumCone=r,this._maximumCone=o,this._stackPartitions=s,this._slicePartitions=m,this._subdivisions=u,this._offsetAttribute=i.offsetAttribute,this._workerName="createEllipsoidOutlineGeometry"}l.packedLength=2*T.Cartesian3.packedLength+8,l.pack=function(i,t,e){return e=L.defaultValue(e,0),T.Cartesian3.pack(i._radii,t,e),e+=T.Cartesian3.packedLength,T.Cartesian3.pack(i._innerRadii,t,e),e+=T.Cartesian3.packedLength,t[e++]=i._minimumClock,t[e++]=i._maximumClock,t[e++]=i._minimumCone,t[e++]=i._maximumCone,t[e++]=i._stackPartitions,t[e++]=i._slicePartitions,t[e++]=i._subdivisions,t[e]=L.defaultValue(i._offsetAttribute,-1),t};var c=new T.Cartesian3,C=new T.Cartesian3,_={radii:c,innerRadii:C,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};l.unpack=function(i,t,e){t=L.defaultValue(t,0);var a=T.Cartesian3.unpack(i,t,c);t+=T.Cartesian3.packedLength;var n=T.Cartesian3.unpack(i,t,C);t+=T.Cartesian3.packedLength;var r=i[t++],o=i[t++],s=i[t++],m=i[t++],u=i[t++],f=i[t++],d=i[t++],t=i[t];return L.defined(e)?(e._radii=T.Cartesian3.clone(a,e._radii),e._innerRadii=T.Cartesian3.clone(n,e._innerRadii),e._minimumClock=r,e._maximumClock=o,e._minimumCone=s,e._maximumCone=m,e._stackPartitions=u,e._slicePartitions=f,e._subdivisions=d,e._offsetAttribute=-1===t?void 0:t,e):(_.minimumClock=r,_.maximumClock=o,_.minimumCone=s,_.maximumCone=m,_.stackPartitions=u,_.slicePartitions=f,_.subdivisions=d,_.offsetAttribute=-1===t?void 0:t,new l(_))},l.createGeometry=function(i){var t=i._radii;if(!(t.x<=0||t.y<=0||t.z<=0)){var e=i._innerRadii;if(!(e.x<=0||e.y<=0||e.z<=0)){var a=i._minimumClock,n=i._maximumClock,r=i._minimumCone,o=i._maximumCone,s=i._subdivisions,m=T.Ellipsoid.fromCartesian3(t),u=i._slicePartitions+1,f=i._stackPartitions+1;(u=Math.round(u*Math.abs(n-a)/z.CesiumMath.TWO_PI))<2&&(u=2),(f=Math.round(f*Math.abs(o-r)/z.CesiumMath.PI))<2&&(f=2);var d=0,l=1,c=e.x!==t.x||e.y!==t.y||e.z!==t.z,C=!1,_=!1;c&&(l=2,0