import{__exports as t}from"../../../_virtual/array-set.mjs";import{__require as r}from"./util.mjs";var e;function i(){if(e)return t;e=1;var i=r(),n=Object.prototype.hasOwnProperty,s="undefined"!=typeof Map;function o(){this._array=[],this._set=s?new Map:Object.create(null)}return o.fromArray=function(t,r){for(var e=new o,i=0,n=t.length;i<n;i++)e.add(t[i],r);return e},o.prototype.size=function(){return s?this._set.size:Object.getOwnPropertyNames(this._set).length},o.prototype.add=function(t,r){var e=s?t:i.toSetString(t),o=s?this.has(t):n.call(this._set,e),a=this._array.length;o&&!r||this._array.push(t),o||(s?this._set.set(t,a):this._set[e]=a)},o.prototype.has=function(t){if(s)return this._set.has(t);var r=i.toSetString(t);return n.call(this._set,r)},o.prototype.indexOf=function(t){if(s){var r=this._set.get(t);if(r>=0)return r}else{var e=i.toSetString(t);if(n.call(this._set,e))return this._set[e]}throw new Error('"'+t+'" is not in the set.')},o.prototype.at=function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)},o.prototype.toArray=function(){return this._array.slice()},t.ArraySet=o,t}export{i as __require};