(function(t,i){typeof exports=="object"&&typeof module<"u"?i(exports):typeof define=="function"&&define.amd?define(["exports"],i):(t=typeof globalThis<"u"?globalThis:t||self,i(t.index={}))})(this,function(t){"use strict";function i(d,f,r,u){const e=d.filter((a,o)=>{const s=a[r];return typeof s=="number"&&s<=f&&!u.has(o)});if(e.length===0)return;const n=Math.floor(Math.random()*e.length);return u.add(d.indexOf(e[n])),e[n]}function c(d,f,r,u=!0){const e=[];let n=r;const a=new Set;for(;n>0;){const o=i(d,n,f,a);if(!o)break;const s=o[f];if(e.push(o),n-=s,u||a.add(d.indexOf(o)),n>=r)break}return e}t.getRandomCombination=c,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});