content: package okhttp3;
  
  import java.io.IOException;
  import java.nio.charset.Charset;
  import java.util.ArrayList;
  import java.util.List;
  import kotlin.Deprecated;
  import kotlin.DeprecationLevel;
  import kotlin.Metadata;
  import kotlin.ReplaceWith;
  import kotlin.jvm.internal.DefaultConstructorMarker;
  import kotlin.jvm.internal.Intrinsics;
  import mt.Log1F380D;
  import okhttp3.HttpUrl;
  import okhttp3.internal.Util;
  import okio.Buffer;
  import okio.BufferedSink;
  
  @Metadata(bv = {1, 0, 3}, d1 = {"\u0000@\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010 \n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0010\t\n\u0000\n\u0002\u0018\u0002\n\u0002\b\b\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0003\u0018\u0000 \u001c2\u00020\u0001:\u0002\u001b\u001cB#\b\u0000\u0012\f\u0010\u0002\u001a\b\u0012\u0004\u0012\u00020\u00040\u0003\u0012\f\u0010\u0005\u001a\b\u0012\u0004\u0012\u00020\u00040\u0003¢\u0006\u0002\u0010\u0006J\b\u0010\n\u001a\u00020\u000bH\u0016J\b\u0010\f\u001a\u00020\rH\u0016J\u000e\u0010\u000e\u001a\u00020\u00042\u0006\u0010\u000f\u001a\u00020\bJ\u000e\u0010\u0010\u001a\u00020\u00042\u0006\u0010\u000f\u001a\u00020\bJ\u000e\u0010\u0011\u001a\u00020\u00042\u0006\u0010\u000f\u001a\u00020\bJ\r\u0010\u0007\u001a\u00020\bH\u0007¢\u0006\u0002\b\u0012J\u000e\u0010\u0013\u001a\u00020\u00042\u0006\u0010\u000f\u001a\u00020\bJ\u001a\u0010\u0014\u001a\u00020\u000b2\b\u0010\u0015\u001a\u0004\u0018\u00010\u00162\u0006\u0010\u0017\u001a\u00020\u0018H\u0002J\u0010\u0010\u0019\u001a\u00020\u001a2\u0006\u0010\u0015\u001a\u00020\u0016H\u0016R\u0014\u0010\u0002\u001a\b\u0012\u0004\u0012\u00020\u00040\u0003X\u0004¢\u0006\u0002\n\u0000R\u0014\u0010\u0005\u001a\b\u0012\u0004\u0012\u00020\u00040\u0003X\u0004¢\u0006\u0002\n\u0000R\u0011\u0010\u0007\u001a\u00020\b8G¢\u0006\u0006\u001a\u0004\b\u0007\u0010\t¨\u0006\u001d"}, d2 = {"Lokhttp3/FormBody;", "Lokhttp3/RequestBody;", "encodedNames", "", "", "encodedValues", "(Ljava/util/List;Ljava/util/List;)V", "size", "", "()I", "contentLength", "", "contentType", "Lokhttp3/MediaType;", "encodedName", "index", "encodedValue", "name", "-deprecated_size", "value", "writeOrCountBytes", "sink", "Lokio/BufferedSink;", "countBytes", "", "writeTo", "", "Builder", "Companion", "okhttp"}, k = 1, mv = {1, 4, 0})
  /* compiled from: 01B9 */
  public final class FormBody extends RequestBody {
      private static final MediaType CONTENT_TYPE = MediaType.Companion.get("application/x-www-form-urlencoded");
      public static final Companion Companion = new Companion((DefaultConstructorMarker) null);
      private final List<String> encodedNames;
      private final List<String> encodedValues;
  
      @Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u0012\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\b\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002R\u000e\u0010\u0003\u001a\u00020\u0004X\u0004¢\u0006\u0002\n\u0000¨\u0006\u0005"}, d2 = {"Lokhttp3/FormBody$Companion;", "", "()V", "CONTENT_TYPE", "Lokhttp3/MediaType;", "okhttp"}, k = 1, mv = {1, 4, 0})
      /* compiled from: FormBody.kt */
      public static final class Companion {
          private Companion() {
          }
  
          public /* synthetic */ Companion(DefaultConstructorMarker $constructor_marker) {
              this();
          }
      }
  
      public FormBody(List<String> encodedNames2, List<String> encodedValues2) {
          Intrinsics.checkNotNullParameter(encodedNames2, "encodedNames");
          Intrinsics.checkNotNullParameter(encodedValues2, "encodedValues");
          this.encodedNames = Util.toImmutableList(encodedNames2);
          this.encodedValues = Util.toImmutableList(encodedValues2);
      }
  
      private final long writeOrCountBytes(BufferedSink sink, boolean countBytes) {
          Buffer buffer;
          if (countBytes) {
              buffer = new Buffer();
          } else {
              Intrinsics.checkNotNull(sink);
              buffer = sink.getBuffer();
          }
          int size = this.encodedNames.size();
          for (int i = 0; i < size; i++) {
              if (i > 0) {
                  buffer.writeByte(38);
              }
              buffer.writeUtf8(this.encodedNames.get(i));
              buffer.writeByte(61);
              buffer.writeUtf8(this.encodedValues.get(i));
          }
          if (!countBytes) {
              return 0;
          }
          long size2 = buffer.size();
          buffer.clear();
          return size2;
      }
  
      @Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "size", imports = {}))
      /* renamed from: -deprecated_size  reason: not valid java name */
      public final int m1630deprecated_size() {
          return size();
      }
  
      public long contentLength() {
          return writeOrCountBytes((BufferedSink) null, true);
      }
  
      public MediaType contentType() {
          return CONTENT_TYPE;
      }
  
      public final String encodedName(int index) {
          return this.encodedNames.get(index);
      }
  
      public final String encodedValue(int index) {
          return this.encodedValues.get(index);
      }
  
      public final String name(int index) {
          String percentDecode$okhttp$default = HttpUrl.Companion.percentDecode$okhttp$default(HttpUrl.Companion, encodedName(index), 0, 0, true, 3, (Object) null);
          Log1F380D.a((Object) percentDecode$okhttp$default);
          return percentDecode$okhttp$default;
      }
  
      public final int size() {
          return this.encodedNames.size();
      }
  
      public void writeTo(BufferedSink sink) throws IOException {
          Intrinsics.checkNotNullParameter(sink, "sink");
          writeOrCountBytes(sink, false);
      }
  
      @Metadata(bv = {1, 0, 3}, d1 = {"\u0000$\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010!\n\u0002\u0010\u000e\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0000\u0018\u00002\u00020\u0001B\u0013\b\u0007\u0012\n\b\u0002\u0010\u0002\u001a\u0004\u0018\u00010\u0003¢\u0006\u0002\u0010\u0004J\u0016\u0010\t\u001a\u00020\u00002\u0006\u0010\n\u001a\u00020\u00072\u0006\u0010\u000b\u001a\u00020\u0007J\u0016\u0010\f\u001a\u00020\u00002\u0006\u0010\n\u001a\u00020\u00072\u0006\u0010\u000b\u001a\u00020\u0007J\u0006\u0010\r\u001a\u00020\u000eR\u0010\u0010\u0002\u001a\u0004\u0018\u00010\u0003X\u0004¢\u0006\u0002\n\u0000R\u0014\u0010\u0005\u001a\b\u0012\u0004\u0012\u00020\u00070\u0006X\u0004¢\u0006\u0002\n\u0000R\u0014\u0010\b\u001a\b\u0012\u0004\u0012\u00020\u00070\u0006X\u0004¢\u0006\u0002\n\u0000¨\u0006\u000f"}, d2 = {"Lokhttp3/FormBody$Builder;", "", "charset", "Ljava/nio/charset/Charset;", "(Ljava/nio/charset/Charset;)V", "names", "", "", "values", "add", "name", "value", "addEncoded", "build", "Lokhttp3/FormBody;", "okhttp"}, k = 1, mv = {1, 4, 0})
      /* compiled from: 01B8 */
      public static final class Builder {
          private final Charset charset;
          private final List<String> names;
          private final List<String> values;
  
          public Builder() {
              this((Charset) null, 1, (DefaultConstructorMarker) null);
          }
  
          public Builder(Charset charset2) {
              this.charset = charset2;
              this.names = new ArrayList();
              this.values = new ArrayList();
          }
  
          /* JADX WARNING: Illegal instructions before constructor call */
          /* Code decompiled incorrectly, please refer to instructions dump. */
          public /* synthetic */ Builder(java.nio.charset.Charset r1, int r2, kotlin.jvm.internal.DefaultConstructorMarker r3) {
              /*
                  r0 = this;
                  r2 = r2 & 1
                  if (r2 == 0) goto L_0x0008
                  r1 = 0
                  r2 = r1
                  java.nio.charset.Charset r2 = (java.nio.charset.Charset) r2
              L_0x0008:
                  r0.<init>(r1)
                  return
              */
              throw new UnsupportedOperationException("Method not decompiled: okhttp3.FormBody.Builder.<init>(java.nio.charset.Charset, int, kotlin.jvm.internal.DefaultConstructorMarker):void");
          }
  
          public final Builder add(String name, String value) {
              Intrinsics.checkNotNullParameter(name, "name");
              Intrinsics.checkNotNullParameter(value, "value");
              Builder builder = this;
              String canonicalize$okhttp$default = HttpUrl.Companion.canonicalize$okhttp$default(HttpUrl.Companion, name, 0, 0, HttpUrl.FORM_ENCODE_SET, false, false, true, false, builder.charset, 91, (Object) null);
              Log1F380D.a((Object) canonicalize$okhttp$default);
              builder.names.add(canonicalize$okhttp$default);
              String canonicalize$okhttp$default2 = HttpUrl.Companion.canonicalize$okhttp$default(HttpUrl.Companion, value, 0, 0, HttpUrl.FORM_ENCODE_SET, false, false, true, false, builder.charset, 91, (Object) null);
              Log1F380D.a((Object) canonicalize$okhttp$default2);
              builder.values.add(canonicalize$okhttp$default2);
              return this;
          }
  
          public final FormBody build() {
              return new FormBody(this.names, this.values);
          }
  
          public final Builder addEncoded(String name, String value) {
              Intrinsics.checkNotNullParameter(name, "name");
              Intrinsics.checkNotNullParameter(value, "value");
              Builder builder = this;
              String canonicalize$okhttp$default = HttpUrl.Companion.canonicalize$okhttp$default(HttpUrl.Companion, name, 0, 0, HttpUrl.FORM_ENCODE_SET, true, false, true, false, builder.charset, 83, (Object) null);
              Log1F380D.a((Object) canonicalize$okhttp$default);
              builder.names.add(canonicalize$okhttp$default);
              String canonicalize$okhttp$default2 = HttpUrl.Companion.canonicalize$okhttp$default(HttpUrl.Companion, value, 0, 0, HttpUrl.FORM_ENCODE_SET, true, false, true, false, builder.charset, 83, (Object) null);
              Log1F380D.a((Object) canonicalize$okhttp$default2);
              builder.values.add(canonicalize$okhttp$default2);
              return this;
          }
      }
  
      public final String value(int index) {
          String percentDecode$okhttp$default = HttpUrl.Companion.percentDecode$okhttp$default(HttpUrl.Companion, encodedValue(index), 0, 0, true, 3, (Object) null);
          Log1F380D.a((Object) percentDecode$okhttp$default);
          return percentDecode$okhttp$default;
      }
  }
  