package o;

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;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class N70 {
    public AbstractC0752ap a = new C2492t30();
    public AbstractC0752ap b = new C2492t30();
    public AbstractC0752ap c = new C2492t30();
    public AbstractC0752ap d = new C2492t30();
    public InterfaceC2273qn e = new C1915n(0.0f);
    public InterfaceC2273qn f = new C1915n(0.0f);
    public InterfaceC2273qn g = new C1915n(0.0f);
    public InterfaceC2273qn h = new C1915n(0.0f);
    public C0669Zu i;
    public C0669Zu j;
    public C0669Zu k;
    public C0669Zu l;

    public N70() {
        int i = 0;
        this.i = new C0669Zu(i);
        this.j = new C0669Zu(i);
        this.k = new C0669Zu(i);
        this.l = new C0669Zu(i);
    }

    public static M70 a(Context context, int i, int i2, C1915n c1915n) {
        ContextThemeWrapper contextThemeWrapper = new ContextThemeWrapper(context, i);
        if (i2 != 0) {
            contextThemeWrapper = new ContextThemeWrapper(contextThemeWrapper, i2);
        }
        TypedArray typedArrayObtainStyledAttributes = contextThemeWrapper.obtainStyledAttributes(XZ.v);
        try {
            int i3 = typedArrayObtainStyledAttributes.getInt(0, 0);
            int i4 = typedArrayObtainStyledAttributes.getInt(3, i3);
            int i5 = typedArrayObtainStyledAttributes.getInt(4, i3);
            int i6 = typedArrayObtainStyledAttributes.getInt(2, i3);
            int i7 = typedArrayObtainStyledAttributes.getInt(1, i3);
            InterfaceC2273qn interfaceC2273qnC = c(typedArrayObtainStyledAttributes, 5, c1915n);
            InterfaceC2273qn interfaceC2273qnC2 = c(typedArrayObtainStyledAttributes, 8, interfaceC2273qnC);
            InterfaceC2273qn interfaceC2273qnC3 = c(typedArrayObtainStyledAttributes, 9, interfaceC2273qnC);
            InterfaceC2273qn interfaceC2273qnC4 = c(typedArrayObtainStyledAttributes, 7, interfaceC2273qnC);
            InterfaceC2273qn interfaceC2273qnC5 = c(typedArrayObtainStyledAttributes, 6, interfaceC2273qnC);
            M70 m70 = new M70();
            m70.a = AbstractC2841wm0.o(i4);
            m70.e = interfaceC2273qnC2;
            m70.b = AbstractC2841wm0.o(i5);
            m70.f = interfaceC2273qnC3;
            m70.c = AbstractC2841wm0.o(i6);
            m70.g = interfaceC2273qnC4;
            m70.d = AbstractC2841wm0.o(i7);
            m70.h = interfaceC2273qnC5;
            return m70;
        } finally {
            typedArrayObtainStyledAttributes.recycle();
        }
    }

    public static M70 b(Context context, AttributeSet attributeSet, int i, int i2) {
        C1915n c1915n = new C1915n(0);
        TypedArray typedArrayObtainStyledAttributes = context.obtainStyledAttributes(attributeSet, XZ.p, i, i2);
        int resourceId = typedArrayObtainStyledAttributes.getResourceId(0, 0);
        int resourceId2 = typedArrayObtainStyledAttributes.getResourceId(1, 0);
        typedArrayObtainStyledAttributes.recycle();
        return a(context, resourceId, resourceId2, c1915n);
    }

    public static InterfaceC2273qn c(TypedArray typedArray, int i, InterfaceC2273qn interfaceC2273qn) {
        TypedValue typedValuePeekValue = typedArray.peekValue(i);
        if (typedValuePeekValue != null) {
            int i2 = typedValuePeekValue.type;
            if (i2 == 5) {
                return new C1915n(TypedValue.complexToDimensionPixelSize(typedValuePeekValue.data, typedArray.getResources().getDisplayMetrics()));
            }
            if (i2 == 6) {
                return new O10(typedValuePeekValue.getFraction(1.0f, 1.0f));
            }
        }
        return interfaceC2273qn;
    }

    public final boolean d(RectF rectF) {
        boolean z = this.l.getClass().equals(C0669Zu.class) && this.j.getClass().equals(C0669Zu.class) && this.i.getClass().equals(C0669Zu.class) && this.k.getClass().equals(C0669Zu.class);
        float fA = this.e.a(rectF);
        return z && ((this.f.a(rectF) > fA ? 1 : (this.f.a(rectF) == fA ? 0 : -1)) == 0 && (this.h.a(rectF) > fA ? 1 : (this.h.a(rectF) == fA ? 0 : -1)) == 0 && (this.g.a(rectF) > fA ? 1 : (this.g.a(rectF) == fA ? 0 : -1)) == 0) && ((this.b instanceof C2492t30) && (this.a instanceof C2492t30) && (this.c instanceof C2492t30) && (this.d instanceof C2492t30));
    }

    public final M70 e() {
        M70 m70 = new M70();
        m70.a = this.a;
        m70.b = this.b;
        m70.c = this.c;
        m70.d = this.d;
        m70.e = this.e;
        m70.f = this.f;
        m70.g = this.g;
        m70.h = this.h;
        m70.i = this.i;
        m70.j = this.j;
        m70.k = this.k;
        m70.l = this.l;
        return m70;
    }
}
