"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const _SetCache = require("./_SetCache.cjs");
const _arrayIncludes = require("./_arrayIncludes.cjs");
const _arrayIncludesWith = require("./_arrayIncludesWith.cjs");
const _cacheHas = require("./_cacheHas.cjs");
const _createSet = require("./_createSet.cjs");
const _setToArray = require("./_setToArray.cjs");
var _baseUniq;
var hasRequired_baseUniq;
function require_baseUniq() {
  if (hasRequired_baseUniq)
    return _baseUniq;
  hasRequired_baseUniq = 1;
  var SetCache = _SetCache.__require(), arrayIncludes = _arrayIncludes.__require(), arrayIncludesWith = _arrayIncludesWith.__require(), cacheHas = _cacheHas.__require(), createSet = _createSet.__require(), setToArray = _setToArray.__require();
  var LARGE_ARRAY_SIZE = 200;
  function baseUniq(array, iteratee, comparator) {
    var index = -1, includes = arrayIncludes, length = array.length, isCommon = true, result = [], seen = result;
    if (comparator) {
      isCommon = false;
      includes = arrayIncludesWith;
    } else if (length >= LARGE_ARRAY_SIZE) {
      var set = iteratee ? null : createSet(array);
      if (set) {
        return setToArray(set);
      }
      isCommon = false;
      includes = cacheHas;
      seen = new SetCache();
    } else {
      seen = iteratee ? [] : result;
    }
    outer:
      while (++index < length) {
        var value = array[index], computed = iteratee ? iteratee(value) : value;
        value = comparator || value !== 0 ? value : 0;
        if (isCommon && computed === computed) {
          var seenIndex = seen.length;
          while (seenIndex--) {
            if (seen[seenIndex] === computed) {
              continue outer;
            }
          }
          if (iteratee) {
            seen.push(computed);
          }
          result.push(value);
        } else if (!includes(seen, computed, comparator)) {
          if (seen !== result) {
            seen.push(computed);
          }
          result.push(value);
        }
      }
    return result;
  }
  _baseUniq = baseUniq;
  return _baseUniq;
}
exports.__require = require_baseUniq;
//# sourceMappingURL=_baseUniq.cjs.map
