import{aasS}from"./chunk-FAPED76U.js";import{aasj}from"./chunk-N5SNKJ43.js";import{aasD}from"./chunk-YFQNY2YN.js";import{aasV}from"./chunk-NT26NNVH.js";import{basT,casB,dasL}from"./chunk-NW2YE576.js";import{dasO}from"./chunk-2NIQ5ECB.js";import{aasx}from"./chunk-QHHYYTCM.js";import{aasc,dasl}from"./chunk-RH3GFHG2.js";import{aasE}from"./chunk-FRWNWNYJ.js";import{aasm}from"./chunk-TA3RE4KQ.js";import{aas_}from"./chunk-RTY3VPG6.js";import{easd}from"./chunk-LRNH5AEO.js";varq=newc,M=newc;functionU(e){lett=e.center;M=c.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,M),e.height,M),M=c.add(t,M,M);leti=newO(M,e.semiMajorAxis),f=S.computeEllipsePositions(e,!1,!0).outerPositions,o=newV({position:newL({componentDatatype:x.DOUBLE,componentsPerAttribute:3,values:S.raisePositionsToHeight(f,e,!1)})}),r=f.length/3,u=D.createTypedArray(r,r*2),h=0;for(letn=0;n<r;++n)u[h++]=n,u[h++]=(n+1)%r;return{boundingSphere:i,attributes:o,indices:u}}varN=newO,P=newO;functionR(e){lett=e.center,i=e.ellipsoid,f=e.semiMajorAxis,o=c.multiplyByScalar(i.geodeticSurfaceNormal(t,q),e.height,q);N.center=c.add(t,o,N.center),N.radius=f,o=c.multiplyByScalar(i.geodeticSurfaceNormal(t,o),e.extrudedHeight,o),P.center=c.add(t,o,P.center),P.radius=f;letr=S.computeEllipsePositions(e,!1,!0).outerPositions,u=newV({position:newL({componentDatatype:x.DOUBLE,componentsPerAttribute:3,values:S.raisePositionsToHeight(r,e,!0)})});r=u.position.values;leth=O.union(N,P),n=r.length/3;if(d(e.offsetAttribute)){letg=newUint8Array(n);if(e.offsetAttribute===j.TOP)g=g.fill(1,0,n/2);else{letH=e.offsetAttribute===j.NONE?0:1;g=g.fill(H)}u.applyOffset=newL({componentDatatype:x.UNSIGNED_BYTE,componentsPerAttribute:1,values:g})}letp=m(e.numberOfVerticalLines,16);p=E.clamp(p,0,n/2);leta=D.createTypedArray(n,n*2+p*2);n/=2;letA=0,s;for(s=0;s<n;++s)a[A++]=s,a[A++]=(s+1)%n,a[A++]=s+n,a[A++]=(s+1)%n+n;letk;if(p>0){letg=Math.min(p,n);k=Math.round(n/g);letH=Math.min(k*p,n);for(s=0;s<H;s+=k)a[A++]=s,a[A++]=s+n}return{boundingSphere:h,attributes:u,indices:a}}functionw(e){e=m(e,m.EMPTY_OBJECT);lett=e.center,i=m(e.ellipsoid,l.default),f=e.semiMajorAxis,o=e.semiMinorAxis,r=m(e.granularity,E.RADIANS_PER_DEGREE);if(!d(t))thrownew_("center is required.");if(!d(f))thrownew_("semiMajorAxis is required.");if(!d(o))thrownew_("semiMinorAxis is required.");if(f<o)thrownew_("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(r<=0)thrownew_("granularity must be greater than zero.");letu=m(e.height,0),h=m(e.extrudedHeight,u);this._center=c.clone(t),this._semiMajorAxis=f,this._semiMinorAxis=o,this._ellipsoid=l.clone(i),this._rotation=m(e.rotation,0),this._height=Math.max(h,u),this._granularity=r,this._extrudedHeight=Math.min(h,u),this._numberOfVerticalLines=Math.max(m(e.numberOfVerticalLines,16),0),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipseOutlineGeometry"}w.packedLength=c.packedLength+l.packedLength+8;w.pack=function(e,t,i){if(!d(e))thrownew_("value is required");if(!d(t))thrownew_("array is required");returni=m(i,0),c.pack(e._center,t,i),i+=c.packedLength,l.pack(e._ellipsoid,t,i),i+=l.packedLength,t[i++]=e._semiMajorAxis,t[i++]=e._semiMinorAxis,t[i++]=e._rotation,t[i++]=e._height,t[i++]=e._granularity,t[i++]=e._extrudedHeight,t[i++]=e._numberOfVerticalLines,t[i]=m(e._offsetAttribute,-1),t};vary=newc,C=newl,b={center:y,ellipsoid:C,semiMajorAxis:void0,semiMinorAxis:void0,rotation:void0,height:void0,granularity:void0,extrudedHeight:void0,numberOfVerticalLines:void0,offsetAttribute:void0};w.unpack=function(e,t,i){if(!d(e))thrownew_("array is required");t=m(t,0);letf=c.unpack(e,t,y);t+=c.packedLength;leto=l.unpack(e,t,C);t+=l.packedLength;letr=e[t++],u=e[t++],h=e[t++],n=e[t++],p=e[t++],a=e[t++],A=e[t++],s=e[t];returnd(i)?(i._center=c.clone(f,i._center),i._ellipsoid=l.clone(o,i._ellipsoid),i._semiMajorAxis=r,i._semiMinorAxis=u,i._rotation=h,i._height=n,i._granularity=p,i._extrudedHeight=a,i._numberOfVerticalLines=A,i._offsetAttribute=s===-1?void0:s,i):(b.height=n,b.extrudedHei