package com.bumptech.glide.request;

import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.google.firebase.crashlytics.internal.metadata.UserMetadata;
import ei.k;
import java.util.Map;
import lh.j;
import sh.l;
import sh.o;
import sh.q;

/* loaded from: classes4.dex */
public abstract class a implements Cloneable {
    private boolean B;
    private Drawable D;
    private int E;
    private boolean I;
    private Resources.Theme J;
    private boolean K;
    private boolean L;
    private boolean M;
    private boolean O;

    /* renamed from: p, reason: collision with root package name */
    private int f12606p;

    /* renamed from: t, reason: collision with root package name */
    private Drawable f12610t;

    /* renamed from: u, reason: collision with root package name */
    private int f12611u;

    /* renamed from: v, reason: collision with root package name */
    private Drawable f12612v;

    /* renamed from: w, reason: collision with root package name */
    private int f12613w;

    /* renamed from: q, reason: collision with root package name */
    private float f12607q = 1.0f;

    /* renamed from: r, reason: collision with root package name */
    private j f12608r = j.f28172e;

    /* renamed from: s, reason: collision with root package name */
    private com.bumptech.glide.g f12609s = com.bumptech.glide.g.NORMAL;

    /* renamed from: x, reason: collision with root package name */
    private boolean f12614x = true;

    /* renamed from: y, reason: collision with root package name */
    private int f12615y = -1;

    /* renamed from: z, reason: collision with root package name */
    private int f12616z = -1;
    private jh.f A = di.a.c();
    private boolean C = true;
    private jh.h F = new jh.h();
    private Map G = new ei.b();
    private Class H = Object.class;
    private boolean N = true;

    private boolean H(int i10) {
        return K(this.f12606p, i10);
    }

    private static boolean K(int i10, int i11) {
        return (i10 & i11) != 0;
    }

    private a U(l lVar, jh.l lVar2) {
        return Z(lVar, lVar2, false);
    }

    private a Z(l lVar, jh.l lVar2, boolean z10) {
        a k02 = z10 ? k0(lVar, lVar2) : V(lVar, lVar2);
        k02.N = true;
        return k02;
    }

    private a a0() {
        return this;
    }

    public final Map A() {
        return this.G;
    }

    public final boolean B() {
        return this.O;
    }

    public final boolean C() {
        return this.L;
    }

    /* JADX INFO: Access modifiers changed from: protected */
    public final boolean D() {
        return this.K;
    }

    public final boolean E() {
        return this.f12614x;
    }

    public final boolean F() {
        return H(8);
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public boolean G() {
        return this.N;
    }

    public final boolean L() {
        return this.C;
    }

    public final boolean M() {
        return this.B;
    }

    public final boolean N() {
        return H(2048);
    }

    public final boolean O() {
        return ei.l.s(this.f12616z, this.f12615y);
    }

    public a P() {
        this.I = true;
        return a0();
    }

    public a R() {
        return V(l.f35728e, new sh.i());
    }

    public a S() {
        return U(l.f35727d, new sh.j());
    }

    public a T() {
        return U(l.f35726c, new q());
    }

    final a V(l lVar, jh.l lVar2) {
        if (this.K) {
            return clone().V(lVar, lVar2);
        }
        h(lVar);
        return j0(lVar2, false);
    }

    public a W(int i10, int i11) {
        if (this.K) {
            return clone().W(i10, i11);
        }
        this.f12616z = i10;
        this.f12615y = i11;
        this.f12606p |= 512;
        return b0();
    }

    public a X(Drawable drawable) {
        if (this.K) {
            return clone().X(drawable);
        }
        this.f12612v = drawable;
        int i10 = this.f12606p | 64;
        this.f12613w = 0;
        this.f12606p = i10 & (-129);
        return b0();
    }

    public a Y(com.bumptech.glide.g gVar) {
        if (this.K) {
            return clone().Y(gVar);
        }
        this.f12609s = (com.bumptech.glide.g) k.d(gVar);
        this.f12606p |= 8;
        return b0();
    }

    public a a(a aVar) {
        if (this.K) {
            return clone().a(aVar);
        }
        if (K(aVar.f12606p, 2)) {
            this.f12607q = aVar.f12607q;
        }
        if (K(aVar.f12606p, 262144)) {
            this.L = aVar.L;
        }
        if (K(aVar.f12606p, 1048576)) {
            this.O = aVar.O;
        }
        if (K(aVar.f12606p, 4)) {
            this.f12608r = aVar.f12608r;
        }
        if (K(aVar.f12606p, 8)) {
            this.f12609s = aVar.f12609s;
        }
        if (K(aVar.f12606p, 16)) {
            this.f12610t = aVar.f12610t;
            this.f12611u = 0;
            this.f12606p &= -33;
        }
        if (K(aVar.f12606p, 32)) {
            this.f12611u = aVar.f12611u;
            this.f12610t = null;
            this.f12606p &= -17;
        }
        if (K(aVar.f12606p, 64)) {
            this.f12612v = aVar.f12612v;
            this.f12613w = 0;
            this.f12606p &= -129;
        }
        if (K(aVar.f12606p, 128)) {
            this.f12613w = aVar.f12613w;
            this.f12612v = null;
            this.f12606p &= -65;
        }
        if (K(aVar.f12606p, 256)) {
            this.f12614x = aVar.f12614x;
        }
        if (K(aVar.f12606p, 512)) {
            this.f12616z = aVar.f12616z;
            this.f12615y = aVar.f12615y;
        }
        if (K(aVar.f12606p, UserMetadata.MAX_ATTRIBUTE_SIZE)) {
            this.A = aVar.A;
        }
        if (K(aVar.f12606p, 4096)) {
            this.H = aVar.H;
        }
        if (K(aVar.f12606p, UserMetadata.MAX_INTERNAL_KEY_SIZE)) {
            this.D = aVar.D;
            this.E = 0;
            this.f12606p &= -16385;
        }
        if (K(aVar.f12606p, 16384)) {
            this.E = aVar.E;
            this.D = null;
            this.f12606p &= -8193;
        }
        if (K(aVar.f12606p, 32768)) {
            this.J = aVar.J;
        }
        if (K(aVar.f12606p, 65536)) {
            this.C = aVar.C;
        }
        if (K(aVar.f12606p, 131072)) {
            this.B = aVar.B;
        }
        if (K(aVar.f12606p, 2048)) {
            this.G.putAll(aVar.G);
            this.N = aVar.N;
        }
        if (K(aVar.f12606p, 524288)) {
            this.M = aVar.M;
        }
        if (!this.C) {
            this.G.clear();
            int i10 = this.f12606p & (-2049);
            this.B = false;
            this.f12606p = i10 & (-131073);
            this.N = true;
        }
        this.f12606p |= aVar.f12606p;
        this.F.d(aVar.F);
        return b0();
    }

    public a b() {
        if (this.I && !this.K) {
            throw new IllegalStateException("You cannot auto lock an already locked options object, try clone() first");
        }
        this.K = true;
        return P();
    }

    /* JADX INFO: Access modifiers changed from: protected */
    public final a b0() {
        if (this.I) {
            throw new IllegalStateException("You cannot modify locked T, consider clone()");
        }
        return a0();
    }

    @Override // 
    /* renamed from: c, reason: merged with bridge method [inline-methods] */
    public a clone() {
        try {
            a aVar = (a) super.clone();
            jh.h hVar = new jh.h();
            aVar.F = hVar;
            hVar.d(this.F);
            ei.b bVar = new ei.b();
            aVar.G = bVar;
            bVar.putAll(this.G);
            aVar.I = false;
            aVar.K = false;
            return aVar;
        } catch (CloneNotSupportedException e10) {
            throw new RuntimeException(e10);
        }
    }

    public a c0(jh.g gVar, Object obj) {
        if (this.K) {
            return clone().c0(gVar, obj);
        }
        k.d(gVar);
        k.d(obj);
        this.F.e(gVar, obj);
        return b0();
    }

    public a d(Class cls) {
        if (this.K) {
            return clone().d(cls);
        }
        this.H = (Class) k.d(cls);
        this.f12606p |= 4096;
        return b0();
    }

    public a d0(jh.f fVar) {
        if (this.K) {
            return clone().d0(fVar);
        }
        this.A = (jh.f) k.d(fVar);
        this.f12606p |= UserMetadata.MAX_ATTRIBUTE_SIZE;
        return b0();
    }

    public boolean equals(Object obj) {
        if (!(obj instanceof a)) {
            return false;
        }
        a aVar = (a) obj;
        return Float.compare(aVar.f12607q, this.f12607q) == 0 && this.f12611u == aVar.f12611u && ei.l.c(this.f12610t, aVar.f12610t) && this.f12613w == aVar.f12613w && ei.l.c(this.f12612v, aVar.f12612v) && this.E == aVar.E && ei.l.c(this.D, aVar.D) && this.f12614x == aVar.f12614x && this.f12615y == aVar.f12615y && this.f12616z == aVar.f12616z && this.B == aVar.B && this.C == aVar.C && this.L == aVar.L && this.M == aVar.M && this.f12608r.equals(aVar.f12608r) && this.f12609s == aVar.f12609s && this.F.equals(aVar.F) && this.G.equals(aVar.G) && this.H.equals(aVar.H) && ei.l.c(this.A, aVar.A) && ei.l.c(this.J, aVar.J);
    }

    public a f(j jVar) {
        if (this.K) {
            return clone().f(jVar);
        }
        this.f12608r = (j) k.d(jVar);
        this.f12606p |= 4;
        return b0();
    }

    public a f0(float f10) {
        if (this.K) {
            return clone().f0(f10);
        }
        if (f10 < BitmapDescriptorFactory.HUE_RED || f10 > 1.0f) {
            throw new IllegalArgumentException("sizeMultiplier must be between 0 and 1");
        }
        this.f12607q = f10;
        this.f12606p |= 2;
        return b0();
    }

    public a g0(boolean z10) {
        if (this.K) {
            return clone().g0(true);
        }
        this.f12614x = !z10;
        this.f12606p |= 256;
        return b0();
    }

    public a h(l lVar) {
        return c0(l.f35731h, k.d(lVar));
    }

    a h0(Class cls, jh.l lVar, boolean z10) {
        if (this.K) {
            return clone().h0(cls, lVar, z10);
        }
        k.d(cls);
        k.d(lVar);
        this.G.put(cls, lVar);
        int i10 = this.f12606p | 2048;
        this.C = true;
        int i11 = i10 | 65536;
        this.f12606p = i11;
        this.N = false;
        if (z10) {
            this.f12606p = i11 | 131072;
            this.B = true;
        }
        return b0();
    }

    public int hashCode() {
        return ei.l.n(this.J, ei.l.n(this.A, ei.l.n(this.H, ei.l.n(this.G, ei.l.n(this.F, ei.l.n(this.f12609s, ei.l.n(this.f12608r, ei.l.o(this.M, ei.l.o(this.L, ei.l.o(this.C, ei.l.o(this.B, ei.l.m(this.f12616z, ei.l.m(this.f12615y, ei.l.o(this.f12614x, ei.l.n(this.D, ei.l.m(this.E, ei.l.n(this.f12612v, ei.l.m(this.f12613w, ei.l.n(this.f12610t, ei.l.m(this.f12611u, ei.l.k(this.f12607q)))))))))))))))))))));
    }

    public final j i() {
        return this.f12608r;
    }

    public a i0(jh.l lVar) {
        return j0(lVar, true);
    }

    public final int j() {
        return this.f12611u;
    }

    a j0(jh.l lVar, boolean z10) {
        if (this.K) {
            return clone().j0(lVar, z10);
        }
        o oVar = new o(lVar, z10);
        h0(Bitmap.class, lVar, z10);
        h0(Drawable.class, oVar, z10);
        h0(BitmapDrawable.class, oVar.c(), z10);
        h0(wh.c.class, new wh.f(lVar), z10);
        return b0();
    }

    public final Drawable k() {
        return this.f12610t;
    }

    final a k0(l lVar, jh.l lVar2) {
        if (this.K) {
            return clone().k0(lVar, lVar2);
        }
        h(lVar);
        return i0(lVar2);
    }

    public final Drawable l() {
        return this.D;
    }

    public a l0(boolean z10) {
        if (this.K) {
            return clone().l0(z10);
        }
        this.O = z10;
        this.f12606p |= 1048576;
        return b0();
    }

    public final int n() {
        return this.E;
    }

    public final boolean o() {
        return this.M;
    }

    public final jh.h p() {
        return this.F;
    }

    public final int q() {
        return this.f12615y;
    }

    public final int s() {
        return this.f12616z;
    }

    public final Drawable t() {
        return this.f12612v;
    }

    public final int u() {
        return this.f12613w;
    }

    public final com.bumptech.glide.g v() {
        return this.f12609s;
    }

    public final Class w() {
        return this.H;
    }

    public final jh.f x() {
        return this.A;
    }

    public final float y() {
        return this.f12607q;
    }

    public final Resources.Theme z() {
        return this.J;
    }
}
