import { __exports as c } from "../../../../../../../../../_virtual/removeTypeDuplicates2.js";
import "../../validators/generated/index.js";
import { __exports as u } from "../../../../../../../../../_virtual/index35.js";
Object.defineProperty(c, "__esModule", {
  value: !0
});
c.default = f;
var r = u;
function f(o) {
  const i = {}, n = {}, p = /* @__PURE__ */ new Set(), s = [];
  for (let t = 0; t < o.length; t++) {
    const e = o[t];
    if (!!e && !(s.indexOf(e) >= 0)) {
      if ((0, r.isTSAnyKeyword)(e))
        return [e];
      if ((0, r.isTSBaseType)(e)) {
        n[e.type] = e;
        continue;
      }
      if ((0, r.isTSUnionType)(e)) {
        p.has(e.types) || (o.push(...e.types), p.add(e.types));
        continue;
      }
      s.push(e);
    }
  }
  for (const t of Object.keys(n))
    s.push(n[t]);
  for (const t of Object.keys(i))
    s.push(i[t]);
  return s;
}
//# sourceMappingURL=removeTypeDuplicates.js.map
