package xyz.stream.utils;

import android.content.Context;
import android.database.Cursor;
import android.location.Location;
import android.location.LocationManager;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import androidx.constraintlayout.core.widgets.ConstraintWidget$DimensionBehaviour;
import androidx.core.widget.NestedScrollView;
import androidx.lifecycle.o0;
import androidx.lifecycle.u0;
import androidx.lifecycle.w0;
import androidx.lifecycle.y0;
import androidx.room.RoomDatabase;
import androidx.room.s0;
import androidx.room.t0;
import com.google.android.gms.ads.mediation.customevent.CustomEventAdapter;
import com.google.android.gms.measurement.internal.u1;
import com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton;
import com.google.firebase.installations.remote.TokenResult$ResponseCode;
import e.v0;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.security.GeneralSecurityException;
import java.security.InvalidAlgorithmParameterException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ScheduledFuture;
import xyz.stream.utils.entity.MatchReminderEntity;

/* JADX INFO: loaded from: classes3.dex */
public class t implements u0.m, n4.h, p0.e, com.google.android.gms.ads.mediation.customevent.c, w8.d, com.google.android.material.floatingactionbutton.i {

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public static volatile t f36169e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public static t f36170f;

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ int f36171a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public Object f36172b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public Object f36173c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public Object f36174d;

    public t(int i10) {
        this.f36171a = i10;
        if (i10 == 11) {
            this.f36173c = new ArrayList();
            this.f36172b = new ArrayList();
            this.f36174d = new ArrayList();
        } else if (i10 == 14) {
            this.f36172b = new com.google.android.gms.internal.measurement.c("", null, 0L);
            this.f36174d = new com.google.android.gms.internal.measurement.c("", null, 0L);
            this.f36173c = new ArrayList();
        } else {
            if (i10 != 24) {
                return;
            }
            this.f36172b = null;
            this.f36173c = null;
            this.f36174d = na.c.f31136e;
        }
    }

    public static t n() {
        if (f36169e == null) {
            synchronized (t.class) {
                try {
                    if (f36169e == null) {
                        int i10 = 0;
                        f36169e = new t(i10, i10);
                    }
                } finally {
                }
            }
        }
        return f36169e;
    }

    public final void A(w.e eVar) {
        ((ArrayList) this.f36172b).clear();
        int size = eVar.f34111v0.size();
        for (int i10 = 0; i10 < size; i10++) {
            w.d dVar = (w.d) eVar.f34111v0.get(i10);
            ConstraintWidget$DimensionBehaviour[] constraintWidget$DimensionBehaviourArr = dVar.U;
            ConstraintWidget$DimensionBehaviour constraintWidget$DimensionBehaviour = constraintWidget$DimensionBehaviourArr[0];
            ConstraintWidget$DimensionBehaviour constraintWidget$DimensionBehaviour2 = ConstraintWidget$DimensionBehaviour.f1014c;
            if (constraintWidget$DimensionBehaviour == constraintWidget$DimensionBehaviour2 || constraintWidget$DimensionBehaviourArr[1] == constraintWidget$DimensionBehaviour2) {
                ((ArrayList) this.f36172b).add(dVar);
            }
        }
        eVar.f34076x0.f34297b = true;
    }

    public final void B(String str, double d10, double d11) {
        List list;
        int i10 = 0;
        while (true) {
            list = (List) this.f36173c;
            if (i10 >= list.size()) {
                break;
            }
            double dDoubleValue = ((Double) ((List) this.f36174d).get(i10)).doubleValue();
            double dDoubleValue2 = ((Double) ((List) this.f36172b).get(i10)).doubleValue();
            if (d10 < dDoubleValue || (dDoubleValue == d10 && d11 < dDoubleValue2)) {
                break;
            } else {
                i10++;
            }
        }
        list.add(i10, str);
        ((List) this.f36174d).add(i10, Double.valueOf(d10));
        ((List) this.f36172b).add(i10, Double.valueOf(d11));
    }

    @Override // p0.e
    public final boolean a(Object obj) {
        if (obj instanceof u5.b) {
            ((u5.b) obj).d().f33260a = true;
        }
        switch (((androidx.window.core.h) ((u5.c) this.f36173c)).f4429a) {
            case 20:
                break;
            default:
                ((List) obj).clear();
                break;
        }
        return ((p0.e) this.f36174d).a(obj);
    }

    @Override // p0.e
    public final Object acquire() {
        Object objAcquire = ((p0.e) this.f36174d).acquire();
        if (objAcquire == null) {
            objAcquire = ((u5.a) this.f36172b).d();
            if (Log.isLoggable("FactoryPools", 2)) {
                objAcquire.getClass().toString();
            }
        }
        if (objAcquire instanceof u5.b) {
            ((u5.b) objAcquire).d().f33260a = false;
        }
        return objAcquire;
    }

    @Override // u0.m
    public final void b(NestedScrollView nestedScrollView, int i10, int i11) {
        e.k.c(nestedScrollView, (View) this.f36172b, (View) this.f36173c);
    }

    public final b7.c c() {
        String strJ = ((Long) this.f36172b) == null ? " delta" : "";
        if (((Long) this.f36173c) == null) {
            strJ = strJ.concat(" maxAllowedDelay");
        }
        if (((Set) this.f36174d) == null) {
            strJ = u1.j(strJ, " flags");
        }
        if (strJ.isEmpty()) {
            return new b7.c(((Long) this.f36172b).longValue(), ((Long) this.f36173c).longValue(), (Set) this.f36174d);
        }
        throw new IllegalStateException("Missing required properties:".concat(strJ));
    }

    public final /* synthetic */ Object clone() {
        switch (this.f36171a) {
            case 14:
                t tVar = new t((com.google.android.gms.internal.measurement.c) ((com.google.android.gms.internal.measurement.c) this.f36172b).clone());
                Iterator it = ((List) this.f36173c).iterator();
                while (it.hasNext()) {
                    ((List) tVar.f36173c).add((com.google.android.gms.internal.measurement.c) ((com.google.android.gms.internal.measurement.c) it.next()).clone());
                }
                return tVar;
            default:
                return super.clone();
        }
    }

    public final ea.n d() throws GeneralSecurityException {
        f0 f0Var;
        ea.q qVar = (ea.q) this.f36172b;
        if (qVar == null || (f0Var = (f0) this.f36173c) == null) {
            throw new GeneralSecurityException("Cannot build without parameters and/or key material");
        }
        if (qVar.f25735a != f0Var.E()) {
            throw new GeneralSecurityException("Key size mismatch");
        }
        if (((ea.q) this.f36172b).a() && ((Integer) this.f36174d) == null) {
            throw new GeneralSecurityException("Cannot create key without ID requirement with parameters with ID requirement");
        }
        if (((ea.q) this.f36172b).a() || ((Integer) this.f36174d) == null) {
            return new ea.n((ea.q) this.f36172b, (f0) this.f36173c, p(), (Integer) this.f36174d);
        }
        throw new GeneralSecurityException("Cannot create key with ID requirement with parameters without ID requirement");
    }

    public final ea.r e() throws GeneralSecurityException {
        f0 f0Var;
        ea.u uVar = (ea.u) this.f36172b;
        if (uVar == null || (f0Var = (f0) this.f36173c) == null) {
            throw new GeneralSecurityException("Cannot build without parameters and/or key material");
        }
        if (uVar.f25763a != f0Var.E()) {
            throw new GeneralSecurityException("Key size mismatch");
        }
        if (((ea.u) this.f36172b).a() && ((Integer) this.f36174d) == null) {
            throw new GeneralSecurityException("Cannot create key without ID requirement with parameters with ID requirement");
        }
        if (((ea.u) this.f36172b).a() || ((Integer) this.f36174d) == null) {
            return new ea.r((ea.u) this.f36172b, (f0) this.f36173c, p(), (Integer) this.f36174d);
        }
        throw new GeneralSecurityException("Cannot create key with ID requirement with parameters without ID requirement");
    }

    public final ea.v f() throws GeneralSecurityException {
        f0 f0Var;
        ea.y yVar = (ea.y) this.f36172b;
        if (yVar == null || (f0Var = (f0) this.f36173c) == null) {
            throw new GeneralSecurityException("Cannot build without parameters and/or key material");
        }
        if (yVar.f25792a != f0Var.E()) {
            throw new GeneralSecurityException("Key size mismatch");
        }
        if (((ea.y) this.f36172b).a() && ((Integer) this.f36174d) == null) {
            throw new GeneralSecurityException("Cannot create key without ID requirement with parameters with ID requirement");
        }
        if (((ea.y) this.f36172b).a() || ((Integer) this.f36174d) == null) {
            return new ea.v((ea.y) this.f36172b, (f0) this.f36173c, p(), (Integer) this.f36174d);
        }
        throw new GeneralSecurityException("Cannot create key with ID requirement with parameters without ID requirement");
    }

    public final ja.a g() throws GeneralSecurityException {
        f0 f0Var;
        ja.d dVar = (ja.d) this.f36172b;
        if (dVar == null || (f0Var = (f0) this.f36173c) == null) {
            throw new IllegalArgumentException("Cannot build without parameters and/or key material");
        }
        if (dVar.f28736a != f0Var.E()) {
            throw new GeneralSecurityException("Key size mismatch");
        }
        if (((ja.d) this.f36172b).a() && ((Integer) this.f36174d) == null) {
            throw new GeneralSecurityException("Cannot create key without ID requirement with parameters with ID requirement");
        }
        if (((ja.d) this.f36172b).a() || ((Integer) this.f36174d) == null) {
            return new ja.a((ja.d) this.f36172b, (f0) this.f36173c, p(), (Integer) this.f36174d);
        }
        throw new GeneralSecurityException("Cannot create key with ID requirement with parameters without ID requirement");
    }

    @Override // com.google.android.material.floatingactionbutton.i
    public final int getHeight() {
        Object obj = this.f36174d;
        return ((ExtendedFloatingActionButton) obj).f22544x0 == -1 ? ((com.google.android.material.floatingactionbutton.i) this.f36172b).getHeight() : (((ExtendedFloatingActionButton) obj).f22544x0 == 0 || ((ExtendedFloatingActionButton) obj).f22544x0 == -2) ? ((com.google.android.material.floatingactionbutton.i) this.f36173c).getHeight() : ((ExtendedFloatingActionButton) obj).f22544x0;
    }

    @Override // com.google.android.material.floatingactionbutton.i
    public final ViewGroup.LayoutParams getLayoutParams() {
        Object obj = this.f36174d;
        return new ViewGroup.LayoutParams(((ExtendedFloatingActionButton) obj).f22543w0 == 0 ? -2 : ((ExtendedFloatingActionButton) obj).f22543w0, ((ExtendedFloatingActionButton) obj).f22544x0 != 0 ? ((ExtendedFloatingActionButton) obj).f22544x0 : -2);
    }

    @Override // com.google.android.material.floatingactionbutton.i
    public final int getPaddingEnd() {
        return ((ExtendedFloatingActionButton) this.f36174d).f22537q0;
    }

    @Override // com.google.android.material.floatingactionbutton.i
    public final int getPaddingStart() {
        return ((ExtendedFloatingActionButton) this.f36174d).f22536p0;
    }

    @Override // n4.h
    public final n4.g getSystemIdInfo(String str) {
        s0 s0VarK = s0.k(1, "SELECT `SystemIdInfo`.`work_spec_id` AS `work_spec_id`, `SystemIdInfo`.`system_id` AS `system_id` FROM SystemIdInfo WHERE work_spec_id=?");
        if (str == null) {
            s0VarK.d(1);
        } else {
            s0VarK.l(1, str);
        }
        ((RoomDatabase) this.f36172b).assertNotSuspendingTransaction();
        Cursor cursorC = androidx.room.util.b.c((RoomDatabase) this.f36172b, s0VarK);
        try {
            return cursorC.moveToFirst() ? new n4.g(cursorC.getString(androidx.room.util.a.a(cursorC, "work_spec_id")), cursorC.getInt(androidx.room.util.a.a(cursorC, "system_id"))) : null;
        } finally {
            cursorC.close();
            s0VarK.m();
        }
    }

    @Override // com.google.android.material.floatingactionbutton.i
    public final int getWidth() {
        Object obj = this.f36174d;
        return ((ExtendedFloatingActionButton) obj).f22543w0 == -1 ? ((com.google.android.material.floatingactionbutton.i) this.f36172b).getWidth() : (((ExtendedFloatingActionButton) obj).f22543w0 == 0 || ((ExtendedFloatingActionButton) obj).f22543w0 == -2) ? ((com.google.android.material.floatingactionbutton.i) this.f36173c).getWidth() : ((ExtendedFloatingActionButton) obj).f22543w0;
    }

    public final jb.b h() {
        String str = ((Long) this.f36173c) == null ? " tokenExpirationTimestamp" : "";
        if (str.isEmpty()) {
            return new jb.b((String) this.f36172b, ((Long) this.f36173c).longValue(), (TokenResult$ResponseCode) this.f36174d, 0);
        }
        throw new IllegalStateException("Missing required properties:".concat(str));
    }

    public final na.a i() throws GeneralSecurityException {
        f0 f0Var;
        na.d dVar = (na.d) this.f36172b;
        if (dVar == null || (f0Var = (f0) this.f36173c) == null) {
            throw new GeneralSecurityException("Cannot build without parameters and/or key material");
        }
        if (dVar.f31138a != f0Var.E()) {
            throw new GeneralSecurityException("Key size mismatch");
        }
        if (((na.d) this.f36172b).a() && ((Integer) this.f36174d) == null) {
            throw new GeneralSecurityException("Cannot create key without ID requirement with parameters with ID requirement");
        }
        if (((na.d) this.f36172b).a() || ((Integer) this.f36174d) == null) {
            return new na.a((na.d) this.f36172b, (f0) this.f36173c, p(), (Integer) this.f36174d);
        }
        throw new GeneralSecurityException("Cannot create key with ID requirement with parameters without ID requirement");
    }

    public final na.d j() throws GeneralSecurityException {
        Integer num = (Integer) this.f36172b;
        if (num == null) {
            throw new GeneralSecurityException("key size not set");
        }
        if (((Integer) this.f36173c) == null) {
            throw new GeneralSecurityException("tag size not set");
        }
        if (((na.c) this.f36174d) != null) {
            return new na.d(num.intValue(), ((Integer) this.f36173c).intValue(), (na.c) this.f36174d);
        }
        throw new GeneralSecurityException("variant not set");
    }

    public final na.h k() throws GeneralSecurityException {
        f0 f0Var;
        na.l lVar = (na.l) this.f36172b;
        if (lVar == null || (f0Var = (f0) this.f36173c) == null) {
            throw new GeneralSecurityException("Cannot build without parameters and/or key material");
        }
        if (lVar.f31163a != f0Var.E()) {
            throw new GeneralSecurityException("Key size mismatch");
        }
        if (((na.l) this.f36172b).a() && ((Integer) this.f36174d) == null) {
            throw new GeneralSecurityException("Cannot create key without ID requirement with parameters with ID requirement");
        }
        if (((na.l) this.f36172b).a() || ((Integer) this.f36174d) == null) {
            return new na.h((na.l) this.f36172b, (f0) this.f36173c, p(), (Integer) this.f36174d);
        }
        throw new GeneralSecurityException("Cannot create key with ID requirement with parameters without ID requirement");
    }

    public final synchronized void l() {
        try {
            Object obj = this.f36174d;
            if (((TimerTask) obj) != null) {
                ((TimerTask) obj).cancel();
                this.f36174d = null;
            }
            Object obj2 = this.f36172b;
            if (((Timer) obj2) != null) {
                ((Timer) obj2).cancel();
                this.f36172b = null;
            }
        } catch (Throwable th) {
            throw th;
        }
    }

    public final byte[] m(Object obj) {
        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
        try {
            new com.google.firebase.encoders.proto.d(byteArrayOutputStream, (Map) this.f36172b, (Map) this.f36173c, (ab.c) this.f36174d).encode(obj);
        } catch (IOException unused) {
        }
        return byteArrayOutputStream.toByteArray();
    }

    public final Location o(String str) {
        try {
            if (((LocationManager) this.f36173c).isProviderEnabled(str)) {
                return ((LocationManager) this.f36173c).getLastKnownLocation(str);
            }
            return null;
        } catch (Exception unused) {
            return null;
        }
    }

    @Override // w8.d
    public final void onComplete(w8.h hVar) throws InterruptedException {
        switch (this.f36171a) {
            case 13:
                d8.b bVar = (d8.b) this.f36172b;
                String str = (String) this.f36173c;
                ScheduledFuture scheduledFuture = (ScheduledFuture) this.f36174d;
                synchronized (bVar.f25009a) {
                    bVar.f25009a.remove(str);
                    break;
                }
                scheduledFuture.cancel(false);
                return;
            default:
                ((o8.e) this.f36172b).removeCallbacksAndMessages(null);
                w8.i iVar = (w8.i) this.f36173c;
                if (hVar.j()) {
                    iVar.trySetResult(hVar.g());
                    return;
                }
                if (!((w8.t) hVar).f34253d) {
                    Exception exception = hVar.getException();
                    exception.getClass();
                    iVar.b(exception);
                    return;
                }
                w8.l lVar = (w8.l) this.f36174d;
                int i10 = lVar.f34227a;
                Object obj = lVar.f34228b;
                switch (i10) {
                    case 1:
                        ((CountDownLatch) obj).await();
                        return;
                    default:
                        ((w8.t) obj).zze(null);
                        return;
                }
        }
    }

    public final ta.a p() {
        switch (this.f36171a) {
            case 19:
                ea.p pVar = ((ea.q) this.f36172b).f25738d;
                if (pVar == ea.p.f25723d) {
                    return ma.u.f30557a;
                }
                if (pVar == ea.p.f25722c) {
                    return ma.u.a(((Integer) this.f36174d).intValue());
                }
                if (pVar == ea.p.f25721b) {
                    return ma.u.b(((Integer) this.f36174d).intValue());
                }
                throw new IllegalStateException("Unknown AesEaxParameters.Variant: " + ((ea.q) this.f36172b).f25738d);
            case 20:
                ea.t tVar = ((ea.u) this.f36172b).f25766d;
                if (tVar == ea.t.f25759d) {
                    return ma.u.f30557a;
                }
                if (tVar == ea.t.f25758c) {
                    return ma.u.a(((Integer) this.f36174d).intValue());
                }
                if (tVar == ea.t.f25757b) {
                    return ma.u.b(((Integer) this.f36174d).intValue());
                }
                throw new IllegalStateException("Unknown AesGcmParameters.Variant: " + ((ea.u) this.f36172b).f25766d);
            case 21:
                ea.x xVar = ((ea.y) this.f36172b).f25793b;
                if (xVar == ea.x.f25789d) {
                    return ma.u.f30557a;
                }
                if (xVar == ea.x.f25788c) {
                    return ma.u.a(((Integer) this.f36174d).intValue());
                }
                if (xVar == ea.x.f25787b) {
                    return ma.u.b(((Integer) this.f36174d).intValue());
                }
                throw new IllegalStateException("Unknown AesGcmSivParameters.Variant: " + ((ea.y) this.f36172b).f25793b);
            case 22:
                ja.c cVar = ((ja.d) this.f36172b).f28737b;
                if (cVar == ja.c.f28734d) {
                    return ma.u.f30557a;
                }
                if (cVar == ja.c.f28733c) {
                    return ma.u.a(((Integer) this.f36174d).intValue());
                }
                if (cVar == ja.c.f28732b) {
                    return ma.u.b(((Integer) this.f36174d).intValue());
                }
                throw new IllegalStateException("Unknown AesSivParameters.Variant: " + ((ja.d) this.f36172b).f28737b);
            case 23:
                na.c cVar2 = ((na.d) this.f36172b).f31140c;
                if (cVar2 == na.c.f31136e) {
                    return ma.u.f30557a;
                }
                if (cVar2 == na.c.f31135d || cVar2 == na.c.f31134c) {
                    return ma.u.a(((Integer) this.f36174d).intValue());
                }
                if (cVar2 == na.c.f31133b) {
                    return ma.u.b(((Integer) this.f36174d).intValue());
                }
                throw new IllegalStateException("Unknown AesCmacParametersParameters.Variant: " + ((na.d) this.f36172b).f31140c);
            default:
                na.k kVar = ((na.l) this.f36172b).f31165c;
                if (kVar == na.k.f31161e) {
                    return ma.u.f30557a;
                }
                if (kVar == na.k.f31160d || kVar == na.k.f31159c) {
                    return ma.u.a(((Integer) this.f36174d).intValue());
                }
                if (kVar == na.k.f31158b) {
                    return ma.u.b(((Integer) this.f36174d).intValue());
                }
                throw new IllegalStateException("Unknown HmacParameters.Variant: " + ((na.l) this.f36172b).f31165c);
        }
    }

    public final androidx.lifecycle.s0 q(kotlin.jvm.internal.b bVar, String str) {
        androidx.lifecycle.s0 s0VarA;
        nb.g.i(str, "key");
        y0 y0Var = (y0) this.f36172b;
        y0Var.getClass();
        androidx.lifecycle.s0 s0Var = (androidx.lifecycle.s0) y0Var.f2721a.get(str);
        if (bVar.d(s0Var)) {
            Object obj = (u0) this.f36173c;
            if (obj instanceof w0) {
                nb.g.f(s0Var);
                o0 o0Var = (o0) ((w0) obj);
                o0Var.getClass();
                androidx.lifecycle.l lVar = o0Var.f2680d;
                if (lVar != null) {
                    i3.f fVar = o0Var.f2681e;
                    nb.g.f(fVar);
                    androidx.lifecycle.z.a(s0Var, fVar, lVar);
                }
            }
            nb.g.g(s0Var, "null cannot be cast to non-null type T of androidx.lifecycle.viewmodel.ViewModelProviderImpl.getViewModel");
            return s0Var;
        }
        n1.c cVar = new n1.c((n1.b) this.f36174d);
        cVar.f30758a.put(o1.c.f31288a, str);
        u0 u0Var = (u0) this.f36173c;
        nb.g.i(u0Var, "factory");
        try {
            try {
                s0VarA = u0Var.b(bVar, cVar);
            } catch (AbstractMethodError unused) {
                s0VarA = u0Var.c(nb.g.B(bVar), cVar);
            }
        } catch (AbstractMethodError unused2) {
            s0VarA = u0Var.a(nb.g.B(bVar));
        }
        y0 y0Var2 = (y0) this.f36172b;
        y0Var2.getClass();
        nb.g.i(s0VarA, "viewModel");
        androidx.lifecycle.s0 s0Var2 = (androidx.lifecycle.s0) y0Var2.f2721a.put(str, s0VarA);
        if (s0Var2 != null) {
            s0Var2.clear$lifecycle_viewmodel_release();
        }
        return s0VarA;
    }

    public final void r() {
        t();
        if (((List) this.f36173c).isEmpty()) {
            return;
        }
        Collections.sort((List) this.f36173c, new androidx.browser.trusted.b(14));
        f0.o().C("sp_match_reminder_list", (List) this.f36173c);
        w();
    }

    public final void s(n4.g gVar) {
        ((RoomDatabase) this.f36172b).assertNotSuspendingTransaction();
        ((RoomDatabase) this.f36172b).beginTransaction();
        try {
            ((androidx.room.i) this.f36173c).e(gVar);
            ((RoomDatabase) this.f36172b).setTransactionSuccessful();
        } finally {
            ((RoomDatabase) this.f36172b).endTransaction();
        }
    }

    public final void t() {
        ArrayList arrayListM = f0.o().m(MatchReminderEntity.class, "sp_match_reminder_list");
        this.f36173c = arrayListM;
        if (arrayListM.isEmpty()) {
            return;
        }
        for (int size = ((List) this.f36173c).size() - 1; size >= 0; size--) {
            long jW = kotlinx.coroutines.flow.h.w(((MatchReminderEntity) ((List) this.f36173c).get(size)).getTime(), "yyyy-MM-dd HH:mm:ss");
            if (jW <= 0 || jW <= System.currentTimeMillis()) {
                ((List) this.f36173c).remove(size);
            }
        }
    }

    public final String toString() {
        switch (this.f36171a) {
            case 3:
                String string = "[ ";
                if (((u.k) this.f36172b) != null) {
                    for (int i10 = 0; i10 < 9; i10++) {
                        StringBuilder sbC = u.a.c(string);
                        sbC.append(((u.k) this.f36172b).f33162h[i10]);
                        sbC.append(" ");
                        string = sbC.toString();
                    }
                }
                StringBuilder sbD = u.a.d(string, "] ");
                sbD.append((u.k) this.f36172b);
                return sbD.toString();
            default:
                return super.toString();
        }
    }

    public final boolean u(int i10, w.d dVar, androidx.constraintlayout.widget.d dVar2) {
        x.b bVar = (x.b) this.f36173c;
        ConstraintWidget$DimensionBehaviour[] constraintWidget$DimensionBehaviourArr = dVar.U;
        bVar.f34284a = constraintWidget$DimensionBehaviourArr[0];
        bVar.f34285b = constraintWidget$DimensionBehaviourArr[1];
        bVar.f34286c = dVar.s();
        ((x.b) this.f36173c).f34287d = dVar.m();
        x.b bVar2 = (x.b) this.f36173c;
        bVar2.f34292i = false;
        bVar2.f34293j = i10;
        ConstraintWidget$DimensionBehaviour constraintWidget$DimensionBehaviour = bVar2.f34284a;
        ConstraintWidget$DimensionBehaviour constraintWidget$DimensionBehaviour2 = ConstraintWidget$DimensionBehaviour.f1014c;
        boolean z10 = constraintWidget$DimensionBehaviour == constraintWidget$DimensionBehaviour2;
        boolean z11 = bVar2.f34285b == constraintWidget$DimensionBehaviour2;
        boolean z12 = z10 && dVar.Y > 0.0f;
        boolean z13 = z11 && dVar.Y > 0.0f;
        ConstraintWidget$DimensionBehaviour constraintWidget$DimensionBehaviour3 = ConstraintWidget$DimensionBehaviour.f1012a;
        int[] iArr = dVar.f34066t;
        if (z12 && iArr[0] == 4) {
            bVar2.f34284a = constraintWidget$DimensionBehaviour3;
        }
        if (z13 && iArr[1] == 4) {
            bVar2.f34285b = constraintWidget$DimensionBehaviour3;
        }
        dVar2.b(dVar, bVar2);
        dVar.Q(((x.b) this.f36173c).f34288e);
        dVar.N(((x.b) this.f36173c).f34289f);
        x.b bVar3 = (x.b) this.f36173c;
        dVar.E = bVar3.f34291h;
        dVar.K(bVar3.f34290g);
        x.b bVar4 = (x.b) this.f36173c;
        bVar4.f34293j = 0;
        return bVar4.f34292i;
    }

    public final void v(String str) {
        ((RoomDatabase) this.f36172b).assertNotSuspendingTransaction();
        l3.j jVarA = ((t0) this.f36174d).a();
        if (str == null) {
            jVarA.d(1);
        } else {
            jVarA.l(1, str);
        }
        ((RoomDatabase) this.f36172b).beginTransaction();
        try {
            jVarA.n();
            ((RoomDatabase) this.f36172b).setTransactionSuccessful();
        } finally {
            ((RoomDatabase) this.f36172b).endTransaction();
            ((t0) this.f36174d).c(jVarA);
        }
    }

    public final synchronized void w() {
        try {
            Object obj = this.f36174d;
            if (((TimerTask) obj) != null) {
                ((TimerTask) obj).cancel();
                this.f36174d = null;
            }
            Object obj2 = this.f36173c;
            if (((List) obj2) != null && !((List) obj2).isEmpty()) {
                if (((Timer) this.f36172b) == null) {
                    this.f36172b = new Timer();
                }
                this.f36174d = new xyz.netfly.mobile.plugin.l(this, 2);
                MatchReminderEntity matchReminderEntity = (MatchReminderEntity) ((List) this.f36173c).get(0);
                long jW = kotlinx.coroutines.flow.h.w(matchReminderEntity.getTime(), "yyyy-MM-dd HH:mm:ss");
                if (jW <= 0) {
                    ((List) this.f36173c).remove(matchReminderEntity);
                    f0.o().C("sp_match_reminder_list", (List) this.f36173c);
                    w();
                    return;
                } else {
                    ((Timer) this.f36172b).schedule((TimerTask) this.f36174d, Math.max(0L, (jW - 300000) - System.currentTimeMillis()));
                    return;
                }
            }
            l();
        } catch (Throwable th) {
            throw th;
        }
    }

    public final void x(int i10) throws InvalidAlgorithmParameterException {
        if (i10 != 16 && i10 != 32) {
            throw new InvalidAlgorithmParameterException(String.format("Invalid key size %d; only 128-bit and 256-bit AES keys are supported", Integer.valueOf(i10 * 8)));
        }
        this.f36172b = Integer.valueOf(i10);
    }

    public final void y(int i10) throws GeneralSecurityException {
        if (i10 < 10 || 16 < i10) {
            throw new GeneralSecurityException(u1.g("Invalid tag size for AesCmacParameters: ", i10));
        }
        this.f36173c = Integer.valueOf(i10);
    }

    public final void z(w.e eVar, int i10, int i11, int i12) {
        eVar.getClass();
        int i13 = eVar.f34035d0;
        int i14 = eVar.f34037e0;
        eVar.f34035d0 = 0;
        eVar.f34037e0 = 0;
        eVar.Q(i11);
        eVar.N(i12);
        if (i13 < 0) {
            eVar.f34035d0 = 0;
        } else {
            eVar.f34035d0 = i13;
        }
        if (i14 < 0) {
            eVar.f34037e0 = 0;
        } else {
            eVar.f34037e0 = i14;
        }
        w.e eVar2 = (w.e) this.f36174d;
        eVar2.f34077y0 = i10;
        eVar2.T();
    }

    public /* synthetic */ t(int i10, int i11) {
        this.f36171a = i10;
    }

    public /* synthetic */ t(int i10, Object obj) {
        this.f36171a = i10;
        this.f36172b = null;
        this.f36173c = null;
        this.f36174d = null;
    }

    public /* synthetic */ t(Object obj, Object obj2, Object obj3, int i10) {
        this.f36171a = i10;
        this.f36172b = obj;
        this.f36173c = obj2;
        this.f36174d = obj3;
    }

    public /* synthetic */ t(Object obj, Object obj2, x6.b bVar, int i10) {
        this.f36171a = i10;
        this.f36174d = obj;
        this.f36172b = obj2;
        this.f36173c = bVar;
    }

    public t(CustomEventAdapter customEventAdapter, CustomEventAdapter customEventAdapter2, s7.l lVar) {
        this.f36171a = 12;
        Objects.requireNonNull(customEventAdapter);
        this.f36174d = customEventAdapter;
        this.f36172b = customEventAdapter2;
        this.f36173c = lVar;
    }

    public t(s8.a aVar) {
        this.f36171a = 26;
        this.f36172b = null;
        this.f36173c = aVar;
        xa.b bVar = new xa.b(this, 1);
        this.f36174d = bVar;
        aVar.a(bVar);
    }

    public t(com.google.android.gms.internal.measurement.c cVar) {
        this.f36171a = 14;
        this.f36172b = cVar;
        this.f36174d = (com.google.android.gms.internal.measurement.c) cVar.clone();
        this.f36173c = new ArrayList();
    }

    public t(RoomDatabase roomDatabase) {
        this.f36171a = 7;
        this.f36172b = roomDatabase;
        this.f36173c = new n4.c(this, roomDatabase, 2);
        this.f36174d = new n4.m(this, roomDatabase, 2);
    }

    public t(y0 y0Var, u0 u0Var, n1.b bVar) {
        this.f36171a = 5;
        nb.g.i(y0Var, "store");
        nb.g.i(u0Var, "factory");
        nb.g.i(bVar, "extras");
        this.f36172b = y0Var;
        this.f36173c = u0Var;
        this.f36174d = bVar;
    }

    public t(u.j jVar, u.j jVar2) {
        this.f36171a = 3;
        this.f36174d = jVar;
        this.f36173c = jVar2;
    }

    /* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
    public /* synthetic */ t() {
        this(19, (Object) null);
        this.f36171a = 19;
    }

    /* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
    public /* synthetic */ t(Object obj) {
        this(20, (Object) null);
        this.f36171a = 20;
    }

    /* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
    public /* synthetic */ t(u.a aVar) {
        this(21, (Object) null);
        this.f36171a = 21;
    }

    /* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
    public /* synthetic */ t(q qVar) {
        this(25, (Object) null);
        this.f36171a = 25;
    }

    /* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
    public /* synthetic */ t(p pVar) {
        this(22, (Object) null);
        this.f36171a = 22;
    }

    /* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
    public /* synthetic */ t(r rVar) {
        this(23, (Object) null);
        this.f36171a = 23;
    }

    /* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
    public /* synthetic */ t(s sVar) {
        this(24);
        this.f36171a = 24;
    }

    public t(Context context, LocationManager locationManager) {
        this.f36171a = 2;
        this.f36174d = new v0();
        this.f36172b = context;
        this.f36173c = locationManager;
    }

    public t(w.e eVar) {
        this.f36171a = 4;
        this.f36172b = new ArrayList();
        this.f36173c = new x.b();
        this.f36174d = eVar;
    }
}
