import{fC as O}from"./index.6c049565.js";function D(h,e,r){var I;const n=h.byteLength/(4*e),o=new Uint32Array(h,0,n*e);let f=new Uint32Array(n);const g=(I=r==null?void 0:r.minReduction)!=null?I:0,s=(r==null?void 0:r.originalIndices)||null,p=s?s.length:0,u=(r==null?void 0:r.componentOffsets)||null;let U=0;if(u)for(let t=0;tU&&(U=i)}else U=n;const w=Math.floor(1.1*U)+1;(a==null||a.length<2*w)&&(a=new Uint32Array(O(2*w)));for(let t=0;t<2*w;t++)a[t]=0;let c=0;const A=!!u&&!!s,b=A?p:n,m=A?new Uint32Array(p):null,M=1.96;let C=g!==0?Math.ceil(4*M*M/(g*g)*g*(1-g)):b,d=1,j=u?u[1]:b;for(let t=0;t=w&&(y-=w)}k===c&&(a[2*y]=q,a[2*y+1]=i+1,c++),f[i]=k}if(g!==0&&1-c/n>>2)|0;return n>>>0}let a=null;export{D as n};