package x3;

import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.RectF;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.view.ContextThemeWrapper;
import com.google.android.gms.internal.measurement.AbstractC0707u1;
import h3.AbstractC1031a;

/* JADX INFO: loaded from: classes.dex */
public final class k {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public android.support.v4.media.session.a f18636a = new i();

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public android.support.v4.media.session.a f18637b = new i();

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public android.support.v4.media.session.a f18638c = new i();

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public android.support.v4.media.session.a f18639d = new i();

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public InterfaceC1715c f18640e = new C1713a(0.0f);

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public InterfaceC1715c f18641f = new C1713a(0.0f);

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public InterfaceC1715c f18642g = new C1713a(0.0f);

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public InterfaceC1715c f18643h = new C1713a(0.0f);
    public e i = new e(0);

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public e f18644j = new e(0);

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public e f18645k = new e(0);

    /* JADX INFO: renamed from: l, reason: collision with root package name */
    public e f18646l = new e(0);

    public static j a(Context context, int i, int i5, C1713a c1713a) {
        if (i5 != 0) {
            ContextThemeWrapper contextThemeWrapper = new ContextThemeWrapper(context, i);
            i = i5;
            context = contextThemeWrapper;
        }
        TypedArray typedArrayObtainStyledAttributes = context.obtainStyledAttributes(i, AbstractC1031a.f13415v);
        try {
            int i8 = typedArrayObtainStyledAttributes.getInt(0, 0);
            int i9 = typedArrayObtainStyledAttributes.getInt(3, i8);
            int i10 = typedArrayObtainStyledAttributes.getInt(4, i8);
            int i11 = typedArrayObtainStyledAttributes.getInt(2, i8);
            int i12 = typedArrayObtainStyledAttributes.getInt(1, i8);
            InterfaceC1715c interfaceC1715cC = c(typedArrayObtainStyledAttributes, 5, c1713a);
            InterfaceC1715c interfaceC1715cC2 = c(typedArrayObtainStyledAttributes, 8, interfaceC1715cC);
            InterfaceC1715c interfaceC1715cC3 = c(typedArrayObtainStyledAttributes, 9, interfaceC1715cC);
            InterfaceC1715c interfaceC1715cC4 = c(typedArrayObtainStyledAttributes, 7, interfaceC1715cC);
            InterfaceC1715c interfaceC1715cC5 = c(typedArrayObtainStyledAttributes, 6, interfaceC1715cC);
            j jVar = new j();
            android.support.v4.media.session.a aVarF = AbstractC0707u1.f(i9);
            jVar.f18625a = aVarF;
            j.b(aVarF);
            jVar.f18629e = interfaceC1715cC2;
            android.support.v4.media.session.a aVarF2 = AbstractC0707u1.f(i10);
            jVar.f18626b = aVarF2;
            j.b(aVarF2);
            jVar.f18630f = interfaceC1715cC3;
            android.support.v4.media.session.a aVarF3 = AbstractC0707u1.f(i11);
            jVar.f18627c = aVarF3;
            j.b(aVarF3);
            jVar.f18631g = interfaceC1715cC4;
            android.support.v4.media.session.a aVarF4 = AbstractC0707u1.f(i12);
            jVar.f18628d = aVarF4;
            j.b(aVarF4);
            jVar.f18632h = interfaceC1715cC5;
            return jVar;
        } finally {
            typedArrayObtainStyledAttributes.recycle();
        }
    }

    public static j b(Context context, AttributeSet attributeSet, int i, int i5) {
        C1713a c1713a = new C1713a(0);
        TypedArray typedArrayObtainStyledAttributes = context.obtainStyledAttributes(attributeSet, AbstractC1031a.f13409p, i, i5);
        int resourceId = typedArrayObtainStyledAttributes.getResourceId(0, 0);
        int resourceId2 = typedArrayObtainStyledAttributes.getResourceId(1, 0);
        typedArrayObtainStyledAttributes.recycle();
        return a(context, resourceId, resourceId2, c1713a);
    }

    public static InterfaceC1715c c(TypedArray typedArray, int i, InterfaceC1715c interfaceC1715c) {
        TypedValue typedValuePeekValue = typedArray.peekValue(i);
        if (typedValuePeekValue != null) {
            int i5 = typedValuePeekValue.type;
            if (i5 == 5) {
                return new C1713a(TypedValue.complexToDimensionPixelSize(typedValuePeekValue.data, typedArray.getResources().getDisplayMetrics()));
            }
            if (i5 == 6) {
                return new h(typedValuePeekValue.getFraction(1.0f, 1.0f));
            }
        }
        return interfaceC1715c;
    }

    public final boolean d(RectF rectF) {
        boolean z8 = this.f18646l.getClass().equals(e.class) && this.f18644j.getClass().equals(e.class) && this.i.getClass().equals(e.class) && this.f18645k.getClass().equals(e.class);
        float fA = this.f18640e.a(rectF);
        return z8 && ((this.f18641f.a(rectF) > fA ? 1 : (this.f18641f.a(rectF) == fA ? 0 : -1)) == 0 && (this.f18643h.a(rectF) > fA ? 1 : (this.f18643h.a(rectF) == fA ? 0 : -1)) == 0 && (this.f18642g.a(rectF) > fA ? 1 : (this.f18642g.a(rectF) == fA ? 0 : -1)) == 0) && ((this.f18637b instanceof i) && (this.f18636a instanceof i) && (this.f18638c instanceof i) && (this.f18639d instanceof i));
    }

    public final j e() {
        j jVar = new j();
        jVar.f18625a = this.f18636a;
        jVar.f18626b = this.f18637b;
        jVar.f18627c = this.f18638c;
        jVar.f18628d = this.f18639d;
        jVar.f18629e = this.f18640e;
        jVar.f18630f = this.f18641f;
        jVar.f18631g = this.f18642g;
        jVar.f18632h = this.f18643h;
        jVar.i = this.i;
        jVar.f18633j = this.f18644j;
        jVar.f18634k = this.f18645k;
        jVar.f18635l = this.f18646l;
        return jVar;
    }
}
