content: package kotlin.collections;
  
  import java.util.HashSet;
  import java.util.LinkedHashSet;
  import java.util.Set;
  import kotlin.Metadata;
  import kotlin.Unit;
  import kotlin.jvm.functions.Function1;
  import kotlin.jvm.internal.Intrinsics;
  
  @Metadata(d1 = {"\u0000J\n\u0000\n\u0002\u0010\"\n\u0002\b\u0002\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010#\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0011\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\u0000\n\u0002\b\u0005\u001aN\u0010\u0000\u001a\b\u0012\u0004\u0012\u0002H\u00020\u0001\"\u0004\b\u0000\u0010\u00022\u0006\u0010\u0003\u001a\u00020\u00042\u001f\b\u0001\u0010\u0005\u001a\u0019\u0012\n\u0012\b\u0012\u0004\u0012\u0002H\u00020\u0007\u0012\u0004\u0012\u00020\b0\u0006¢\u0006\u0002\b\tH\bø\u0001\u0000\u0002\n\n\b\b\u0001\u0012\u0002\u0010\u0002 \u0001\u001aF\u0010\u0000\u001a\b\u0012\u0004\u0012\u0002H\u00020\u0001\"\u0004\b\u0000\u0010\u00022\u001f\b\u0001\u0010\u0005\u001a\u0019\u0012\n\u0012\b\u0012\u0004\u0012\u0002H\u00020\u0007\u0012\u0004\u0012\u00020\b0\u0006¢\u0006\u0002\b\tH\bø\u0001\u0000\u0002\n\n\b\b\u0001\u0012\u0002\u0010\u0001 \u0001\u001a\u0012\u0010\n\u001a\b\u0012\u0004\u0012\u0002H\u000b0\u0001\"\u0004\b\u0000\u0010\u000b\u001a\u001f\u0010\f\u001a\u0012\u0012\u0004\u0012\u0002H\u000b0\rj\b\u0012\u0004\u0012\u0002H\u000b`\u000e\"\u0004\b\u0000\u0010\u000bH\b\u001a5\u0010\f\u001a\u0012\u0012\u0004\u0012\u0002H\u000b0\rj\b\u0012\u0004\u0012\u0002H\u000b`\u000e\"\u0004\b\u0000\u0010\u000b2\u0012\u0010\u000f\u001a\n\u0012\u0006\b\u0001\u0012\u0002H\u000b0\u0010\"\u0002H\u000b¢\u0006\u0002\u0010\u0011\u001a\u001f\u0010\u0012\u001a\u0012\u0012\u0004\u0012\u0002H\u000b0\u0013j\b\u0012\u0004\u0012\u0002H\u000b`\u0014\"\u0004\b\u0000\u0010\u000bH\b\u001a5\u0010\u0012\u001a\u0012\u0012\u0004\u0012\u0002H\u000b0\u0013j\b\u0012\u0004\u0012\u0002H\u000b`\u0014\"\u0004\b\u0000\u0010\u000b2\u0012\u0010\u000f\u001a\n\u0012\u0006\b\u0001\u0012\u0002H\u000b0\u0010\"\u0002H\u000b¢\u0006\u0002\u0010\u0015\u001a\u0015\u0010\u0016\u001a\b\u0012\u0004\u0012\u0002H\u000b0\u0007\"\u0004\b\u0000\u0010\u000bH\b\u001a+\u0010\u0016\u001a\b\u0012\u0004\u0012\u0002H\u000b0\u0007\"\u0004\b\u0000\u0010\u000b2\u0012\u0010\u000f\u001a\n\u0012\u0006\b\u0001\u0012\u0002H\u000b0\u0010\"\u0002H\u000b¢\u0006\u0002\u0010\u0017\u001a\u0015\u0010\u0018\u001a\b\u0012\u0004\u0012\u0002H\u000b0\u0001\"\u0004\b\u0000\u0010\u000bH\b\u001a+\u0010\u0018\u001a\b\u0012\u0004\u0012\u0002H\u000b0\u0001\"\u0004\b\u0000\u0010\u000b2\u0012\u0010\u000f\u001a\n\u0012\u0006\b\u0001\u0012\u0002H\u000b0\u0010\"\u0002H\u000b¢\u0006\u0002\u0010\u0017\u001a'\u0010\u0019\u001a\b\u0012\u0004\u0012\u0002H\u000b0\u0001\"\b\b\u0000\u0010\u000b*\u00020\u001a2\b\u0010\u001b\u001a\u0004\u0018\u0001H\u000bH\u0007¢\u0006\u0002\u0010\u001c\u001a5\u0010\u0019\u001a\b\u0012\u0004\u0012\u0002H\u000b0\u0001\"\b\b\u0000\u0010\u000b*\u00020\u001a2\u0016\u0010\u000f\u001a\f\u0012\b\b\u0001\u0012\u0004\u0018\u0001H\u000b0\u0010\"\u0004\u0018\u0001H\u000bH\u0007¢\u0006\u0002\u0010\u0017\u001a\u001e\u0010\u001d\u001a\b\u0012\u0004\u0012\u0002H\u000b0\u0001\"\u0004\b\u0000\u0010\u000b*\b\u0012\u0004\u0012\u0002H\u000b0\u0001H\u0000\u001a!\u0010\u001e\u001a\b\u0012\u0004\u0012\u0002H\u000b0\u0001\"\u0004\b\u0000\u0010\u000b*\n\u0012\u0004\u0012\u0002H\u000b\u0018\u00010\u0001H\b\u0002\u0007\n\u0005\b20\u0001¨\u0006\u001f"}, d2 = {"buildSet", "", "E", "capacity", "", "builderAction", "Lkotlin/Function1;", "", "", "Lkotlin/ExtensionFunctionType;", "emptySet", "T", "hashSetOf", "Ljava/util/HashSet;", "Lkotlin/collections/HashSet;", "elements", "", "([Ljava/lang/Object;)Ljava/util/HashSet;", "linkedSetOf", "Ljava/util/LinkedHashSet;", "Lkotlin/collections/LinkedHashSet;", "([Ljava/lang/Object;)Ljava/util/LinkedHashSet;", "mutableSetOf", "([Ljava/lang/Object;)Ljava/util/Set;", "setOf", "setOfNotNull", "", "element", "(Ljava/lang/Object;)Ljava/util/Set;", "optimizeReadOnlySet", "orEmpty", "kotlin-stdlib"}, k = 5, mv = {1, 7, 1}, xi = 49, xs = "kotlin/collections/SetsKt")
  /* compiled from: Sets.kt */
  class SetsKt__SetsKt extends SetsKt__SetsJVMKt {
      private static final <E> Set<E> buildSet(int capacity, Function1<? super Set<E>, Unit> builderAction) {
          Intrinsics.checkNotNullParameter(builderAction, "builderAction");
          Set createSetBuilder = SetsKt.createSetBuilder(capacity);
          builderAction.invoke(createSetBuilder);
          return SetsKt.build(createSetBuilder);
      }
  
      private static final <E> Set<E> buildSet(Function1<? super Set<E>, Unit> builderAction) {
          Intrinsics.checkNotNullParameter(builderAction, "builderAction");
          Set createSetBuilder = SetsKt.createSetBuilder();
          builderAction.invoke(createSetBuilder);
          return SetsKt.build(createSetBuilder);
      }
  
      public static final <T> Set<T> emptySet() {
          return EmptySet.INSTANCE;
      }
  
      private static final <T> HashSet<T> hashSetOf() {
          return new HashSet<>();
      }
  
      public static final <T> HashSet<T> hashSetOf(T... elements) {
          Intrinsics.checkNotNullParameter(elements, "elements");
          return (HashSet) ArraysKt.toCollection(elements, new HashSet(MapsKt.mapCapacity(elements.length)));
      }
  
      private static final <T> LinkedHashSet<T> linkedSetOf() {
          return new LinkedHashSet<>();
      }
  
      public static final <T> LinkedHashSet<T> linkedSetOf(T... elements) {
          Intrinsics.checkNotNullParameter(elements, "elements");
          return (LinkedHashSet) ArraysKt.toCollection(elements, new LinkedHashSet(MapsKt.mapCapacity(elements.length)));
      }
  
      private static final <T> Set<T> mutableSetOf() {
          return new LinkedHashSet<>();
      }
  
      public static final <T> Set<T> mutableSetOf(T... elements) {
          Intrinsics.checkNotNullParameter(elements, "elements");
          return (Set) ArraysKt.toCollection(elements, new LinkedHashSet(MapsKt.mapCapacity(elements.length)));
      }
  
      public static final <T> Set<T> optimizeReadOnlySet(Set<? extends T> $this$optimizeReadOnlySet) {
          Intrinsics.checkNotNullParameter($this$optimizeReadOnlySet, "<this>");
          switch ($this$optimizeReadOnlySet.size()) {
              case 0:
                  return SetsKt.emptySet();
              case 1:
                  return SetsKt.setOf($this$optimizeReadOnlySet.iterator().next());
              default:
                  return $this$optimizeReadOnlySet;
          }
      }
  
      private static final <T> Set<T> orEmpty(Set<? extends T> $this$orEmpty) {
          return $this$orEmpty == null ? SetsKt.emptySet() : $this$orEmpty;
      }
  
      private static final <T> Set<T> setOf() {
          return SetsKt.emptySet();
      }
  
      public static final <T> Set<T> setOf(T... elements) {
          Intrinsics.checkNotNullParameter(elements, "elements");
          return elements.length > 0 ? ArraysKt.toSet(elements) : SetsKt.emptySet();
      }
  
      public static final <T> Set<T> setOfNotNull(T element) {
          return element != null ? SetsKt.setOf(element) : SetsKt.emptySet();
      }
  
      public static final <T> Set<T> setOfNotNull(T... elements) {
          Intrinsics.checkNotNullParameter(elements, "elements");
          return (Set) ArraysKt.filterNotNullTo(elements, new LinkedHashSet());
      }
  }
  