function e(e,r){if(r<e)throw RangeError(`randomBigInt: The range [${e.toString()},${r.toString()}] is empty.`);let i=r-e,{length:a}=i.toString(2),o=Math.ceil(a/8),s=BigInt(8-a%8);for(;;){let r=t(n(o))>>s;if(r<=i)return r+e}}function t(e){let t=0n;for(let n of e)t=(t<<8n)+BigInt(n);return t}function n(e){let t=new Uint8Array(e);if(typeof crypto>`u`)for(let n=0;n<e;n+=1)t[n]=Math.floor(Math.random()*256);else crypto.getRandomValues(t);return t}exports.randomBigInt=e;
//# sourceMappingURL=randomBigInt.cjs.map