package defpackage;

import androidx.media3.container.NalUnitUtil;
import com.google.android.gms.measurement.api.AppMeasurementSdk;
import java.util.Iterator;
import java.util.List;
import kotlin.Metadata;

/* JADX INFO: loaded from: classes3.dex */
@Metadata(d1 = {"\u0000\n\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\b\u0086\b\u0018\u00002\u00020\u0001¨\u0006\u0002"}, d2 = {"Lb14;", "", "ktor-http"}, k = 1, mv = {2, 0, 0}, xi = NalUnitUtil.H265_NAL_UNIT_TYPE_UNSPECIFIED)
@vx8
public final /* data */ class b14 {
    public final String a;
    public final List b;
    public final double c;

    public b14(String str, List list) {
        Double d;
        Object next;
        String str2;
        Double dBc;
        cr4.g(str, AppMeasurementSdk.ConditionalUserProperty.VALUE);
        cr4.g(list, "params");
        this.a = str;
        this.b = list;
        Iterator it = list.iterator();
        while (true) {
            d = null;
            if (!it.hasNext()) {
                next = null;
                break;
            } else {
                next = it.next();
                if (cr4.b(((d14) next).a, "q")) {
                    break;
                }
            }
        }
        d14 d14Var = (d14) next;
        double dDoubleValue = 1.0d;
        if (d14Var != null && (str2 = d14Var.b) != null && (dBc = n89.bc(str2)) != null) {
            double dDoubleValue2 = dBc.doubleValue();
            if (0.0d <= dDoubleValue2 && dDoubleValue2 <= 1.0d) {
                d = dBc;
            }
            if (d != null) {
                dDoubleValue = d.doubleValue();
            }
        }
        this.c = dDoubleValue;
    }

    public final boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof b14)) {
            return false;
        }
        b14 b14Var = (b14) obj;
        return cr4.b(this.a, b14Var.a) && cr4.b(this.b, b14Var.b);
    }

    public final int hashCode() {
        return this.b.hashCode() + (this.a.hashCode() * 31);
    }

    public final String toString() {
        return "HeaderValue(value=" + this.a + ", params=" + this.b + ')';
    }
}
