import{aasM}from"./chunk-QV3DAXWD.js";import{aasV}from"./chunk-N5SNKJ43.js";import{aasN}from"./chunk-YFQNY2YN.js";import{aask}from"./chunk-NT26NNVH.js";import{basD,casP,dasL}from"./chunk-NW2YE576.js";import{dasy}from"./chunk-2NIQ5ECB.js";import"./chunk-7YEOLR2L.js";import{aasA}from"./chunk-QHHYYTCM.js";import{aasS,casR}from"./chunk-RH3GFHG2.js";import"./chunk-FRWNWNYJ.js";import"./chunk-UKWFHLUK.js";import"./chunk-UAWOHN7R.js";import{aasc}from"./chunk-TA3RE4KQ.js";import{aasT,basm}from"./chunk-RTY3VPG6.js";import{easd}from"./chunk-LRNH5AEO.js";varw=newR;functiona(t){t=c(t,c.EMPTY_OBJECT);lete=t.length,i=t.topRadius,f=t.bottomRadius,o=c(t.slices,128),r=Math.max(c(t.numberOfVerticalLines,16),0);if(m.typeOf.number("options.positions",e),m.typeOf.number("options.topRadius",i),m.typeOf.number("options.bottomRadius",f),m.typeOf.number.greaterThanOrEquals("options.slices",o,3),d(t.offsetAttribute)&&t.offsetAttribute===V.TOP)thrownewT("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._length=e,this._topRadius=i,this._bottomRadius=f,this._slices=o,this._numberOfVerticalLines=r,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderOutlineGeometry"}a.packedLength=6;a.pack=function(t,e,i){returnm.typeOf.object("value",t),m.defined("array",e),i=c(i,0),e[i++]=t._length,e[i++]=t._topRadius,e[i++]=t._bottomRadius,e[i++]=t._slices,e[i++]=t._numberOfVerticalLines,e[i]=c(t._offsetAttribute,-1),e};varb={length:void0,topRadius:void0,bottomRadius:void0,slices:void0,numberOfVerticalLines:void0,offsetAttribute:void0};a.unpack=function(t,e,i){m.defined("array",t),e=c(e,0);letf=t[e++],o=t[e++],r=t[e++],h=t[e++],l=t[e++],p=t[e];returnd(i)?(i._length=f,i._topRadius=o,i._bottomRadius=r,i._slices=h,i._numberOfVerticalLines=l,i._offsetAttribute=p===-1?void0:p,i):(b.length=f,b.topRadius=o,b.bottomRadius=r,b.slices=h,b.numberOfVerticalLines=l,b.offsetAttribute=p===-1?void0:p,newa(b))};a.createGeometry=function(t){lete=t._length,i=t._topRadius,f=t._bottomRadius,o=t._slices,r=t._numberOfVerticalLines;if(e<=0||i<0||f<0||i===0&&f===0)return;leth=o*2,l=M.computePositions(e,i,f,o,!1),p=o*2,E;if(r>0){letO=Math.min(r,o);E=Math.round(o/O),p+=O}lets=N.createTypedArray(h,p*2),u=0,n;for(n=0;n<o-1;n++)s[u++]=n,s[u++]=n+1,s[u++]=n+o,s[u++]=n+1+o;if(s[u++]=o-1,s[u++]=0,s[u++]=o+o-1,s[u++]=o,r>0)for(n=0;n<o;n+=E)s[u++]=n,s[u++]=n+o;let_=newk;_.position=newL({componentDatatype:A.DOUBLE,componentsPerAttribute:3,values:l}),w.x=e*.5,w.y=Math.max(f,i);letg=newy(S.ZERO,R.magnitude(w));if(d(t._offsetAttribute)){e=l.length;letO=t._offsetAttribute===V.NONE?0:1,B=newUint8Array(e/3).fill(O);_.applyOffset=newL({componentDatatype:A.UNSIGNED_BYTE,componentsPerAttribute:1,values:B})}returnnewP({attributes:_,indices:s,primitiveType:D.LINES,boundingSphere:g,offsetAttribute:t._offsetAttribute})};varC=a;functionG(t,e){returnd(e)&&(t=C.unpack(t,e)),C.createGeometry(t)}varet=G;export{etasdefault};