package p3; 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; /* loaded from: classes2.dex */ public class k { /* renamed from: m, reason: collision with root package name */ public static final p3.c f13170m = new i(0.5f); /* renamed from: a, reason: collision with root package name */ d f13171a; /* renamed from: b, reason: collision with root package name */ d f13172b; /* renamed from: c, reason: collision with root package name */ d f13173c; /* renamed from: d, reason: collision with root package name */ d f13174d; /* renamed from: e, reason: collision with root package name */ p3.c f13175e; /* renamed from: f, reason: collision with root package name */ p3.c f13176f; /* renamed from: g, reason: collision with root package name */ p3.c f13177g; /* renamed from: h, reason: collision with root package name */ p3.c f13178h; /* renamed from: i, reason: collision with root package name */ f f13179i; /* renamed from: j, reason: collision with root package name */ f f13180j; /* renamed from: k, reason: collision with root package name */ f f13181k; /* renamed from: l, reason: collision with root package name */ f f13182l; public interface c { p3.c a(p3.c cVar); } public static b a() { return new b(); } public static b b(Context context, int i10, int i11) { return c(context, i10, i11, 0); } private static b c(Context context, int i10, int i11, int i12) { return d(context, i10, i11, new p3.a(i12)); } private static b d(Context context, int i10, int i11, p3.c cVar) { if (i11 != 0) { ContextThemeWrapper contextThemeWrapper = new ContextThemeWrapper(context, i10); i10 = i11; context = contextThemeWrapper; } TypedArray obtainStyledAttributes = context.obtainStyledAttributes(i10, c3.j.f3698x2); try { int i12 = obtainStyledAttributes.getInt(c3.j.f3703y2, 0); int i13 = obtainStyledAttributes.getInt(c3.j.B2, i12); int i14 = obtainStyledAttributes.getInt(c3.j.C2, i12); int i15 = obtainStyledAttributes.getInt(c3.j.A2, i12); int i16 = obtainStyledAttributes.getInt(c3.j.f3708z2, i12); p3.c m10 = m(obtainStyledAttributes, c3.j.D2, cVar); p3.c m11 = m(obtainStyledAttributes, c3.j.G2, m10); p3.c m12 = m(obtainStyledAttributes, c3.j.H2, m10); p3.c m13 = m(obtainStyledAttributes, c3.j.F2, m10); return new b().x(i13, m11).B(i14, m12).t(i15, m13).p(i16, m(obtainStyledAttributes, c3.j.E2, m10)); } finally { obtainStyledAttributes.recycle(); } } public static b e(Context context, AttributeSet attributeSet, int i10, int i11) { return f(context, attributeSet, i10, i11, 0); } public static b f(Context context, AttributeSet attributeSet, int i10, int i11, int i12) { return g(context, attributeSet, i10, i11, new p3.a(i12)); } public static b g(Context context, AttributeSet attributeSet, int i10, int i11, p3.c cVar) { TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, c3.j.f3572b2, i10, i11); int resourceId = obtainStyledAttributes.getResourceId(c3.j.f3578c2, 0); int resourceId2 = obtainStyledAttributes.getResourceId(c3.j.f3584d2, 0); obtainStyledAttributes.recycle(); return d(context, resourceId, resourceId2, cVar); } private static p3.c m(TypedArray typedArray, int i10, p3.c cVar) { TypedValue peekValue = typedArray.peekValue(i10); if (peekValue == null) { return cVar; } int i11 = peekValue.type; return i11 == 5 ? new p3.a(TypedValue.complexToDimensionPixelSize(peekValue.data, typedArray.getResources().getDisplayMetrics())) : i11 == 6 ? new i(peekValue.getFraction(1.0f, 1.0f)) : cVar; } public f h() { return this.f13181k; } public d i() { return this.f13174d; } public p3.c j() { return this.f13178h; } public d k() { return this.f13173c; } public p3.c l() { return this.f13177g; } public f n() { return this.f13182l; } public f o() { return this.f13180j; } public f p() { return this.f13179i; } public d q() { return this.f13171a; } public p3.c r() { return this.f13175e; } public d s() { return this.f13172b; } public p3.c t() { return this.f13176f; } public boolean u(RectF rectF) { boolean z10 = this.f13182l.getClass().equals(f.class) && this.f13180j.getClass().equals(f.class) && this.f13179i.getClass().equals(f.class) && this.f13181k.getClass().equals(f.class); float a10 = this.f13175e.a(rectF); return z10 && ((this.f13176f.a(rectF) > a10 ? 1 : (this.f13176f.a(rectF) == a10 ? 0 : -1)) == 0 && (this.f13178h.a(rectF) > a10 ? 1 : (this.f13178h.a(rectF) == a10 ? 0 : -1)) == 0 && (this.f13177g.a(rectF) > a10 ? 1 : (this.f13177g.a(rectF) == a10 ? 0 : -1)) == 0) && ((this.f13172b instanceof j) && (this.f13171a instanceof j) && (this.f13173c instanceof j) && (this.f13174d instanceof j)); } public b v() { return new b(this); } public k w(float f10) { return v().o(f10).m(); } public k x(c cVar) { return v().A(cVar.a(r())).E(cVar.a(t())).s(cVar.a(j())).w(cVar.a(l())).m(); } private k(b bVar) { this.f13171a = bVar.f13183a; this.f13172b = bVar.f13184b; this.f13173c = bVar.f13185c; this.f13174d = bVar.f13186d; this.f13175e = bVar.f13187e; this.f13176f = bVar.f13188f; this.f13177g = bVar.f13189g; this.f13178h = bVar.f13190h; this.f13179i = bVar.f13191i; this.f13180j = bVar.f13192j; this.f13181k = bVar.f13193k; this.f13182l = bVar.f13194l; } public static final class b { /* renamed from: a, reason: collision with root package name */ private d f13183a; /* renamed from: b, reason: collision with root package name */ private d f13184b; /* renamed from: c, reason: collision with root package name */ private d f13185c; /* renamed from: d, reason: collision with root package name */ private d f13186d; /* renamed from: e, reason: collision with root package name */ private p3.c f13187e; /* renamed from: f, reason: collision with root package name */ private p3.c f13188f; /* renamed from: g, reason: collision with root package name */ private p3.c f13189g; /* renamed from: h, reason: collision with root package name */ private p3.c f13190h; /* renamed from: i, reason: collision with root package name */ private f f13191i; /* renamed from: j, reason: collision with root package name */ private f f13192j; /* renamed from: k, reason: collision with root package name */ private f f13193k; /* renamed from: l, reason: collision with root package name */ private f f13194l; public b() { this.f13183a = h.b(); this.f13184b = h.b(); this.f13185c = h.b(); this.f13186d = h.b(); this.f13187e = new p3.a(0.0f); this.f13188f = new p3.a(0.0f); this.f13189g = new p3.a(0.0f); this.f13190h = new p3.a(0.0f); this.f13191i = h.c(); this.f13192j = h.c(); this.f13193k = h.c(); this.f13194l = h.c(); } private static float n(d dVar) { if (dVar instanceof j) { return ((j) dVar).f13169a; } if (dVar instanceof e) { return ((e) dVar).f13120a; } return -1.0f; } public b A(p3.c cVar) { this.f13187e = cVar; return this; } public b B(int i10, p3.c cVar) { return C(h.a(i10)).E(cVar); } public b C(d dVar) { this.f13184b = dVar; float n10 = n(dVar); if (n10 != -1.0f) { D(n10); } return this; } public b D(float f10) { this.f13188f = new p3.a(f10); return this; } public b E(p3.c cVar) { this.f13188f = cVar; return this; } public k m() { return new k(this); } public b o(float f10) { return z(f10).D(f10).v(f10).r(f10); } public b p(int i10, p3.c cVar) { return q(h.a(i10)).s(cVar); } public b q(d dVar) { this.f13186d = dVar; float n10 = n(dVar); if (n10 != -1.0f) { r(n10); } return this; } public b r(float f10) { this.f13190h = new p3.a(f10); return this; } public b s(p3.c cVar) { this.f13190h = cVar; return this; } public b t(int i10, p3.c cVar) { return u(h.a(i10)).w(cVar); } public b u(d dVar) { this.f13185c = dVar; float n10 = n(dVar); if (n10 != -1.0f) { v(n10); } return this; } public b v(float f10) { this.f13189g = new p3.a(f10); return this; } public b w(p3.c cVar) { this.f13189g = cVar; return this; } public b x(int i10, p3.c cVar) { return y(h.a(i10)).A(cVar); } public b y(d dVar) { this.f13183a = dVar; float n10 = n(dVar); if (n10 != -1.0f) { z(n10); } return this; } public b z(float f10) { this.f13187e = new p3.a(f10); return this; } public b(k kVar) { this.f13183a = h.b(); this.f13184b = h.b(); this.f13185c = h.b(); this.f13186d = h.b(); this.f13187e = new p3.a(0.0f); this.f13188f = new p3.a(0.0f); this.f13189g = new p3.a(0.0f); this.f13190h = new p3.a(0.0f); this.f13191i = h.c(); this.f13192j = h.c(); this.f13193k = h.c(); this.f13194l = h.c(); this.f13183a = kVar.f13171a; this.f13184b = kVar.f13172b; this.f13185c = kVar.f13173c; this.f13186d = kVar.f13174d; this.f13187e = kVar.f13175e; this.f13188f = kVar.f13176f; this.f13189g = kVar.f13177g; this.f13190h = kVar.f13178h; this.f13191i = kVar.f13179i; this.f13192j = kVar.f13180j; this.f13193k = kVar.f13181k; this.f13194l = kVar.f13182l; } } public k() { this.f13171a = h.b(); this.f13172b = h.b(); this.f13173c = h.b(); this.f13174d = h.b(); this.f13175e = new p3.a(0.0f); this.f13176f = new p3.a(0.0f); this.f13177g = new p3.a(0.0f); this.f13178h = new p3.a(0.0f); this.f13179i = h.c(); this.f13180j = h.c(); this.f13181k = h.c(); this.f13182l = h.c(); } }