package androidx.compose.ui.platform;

import java.util.Iterator;
import java.util.Map;

/* loaded from: classes.dex */
public abstract class a0 {

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class a extends kotlin.jvm.internal.v implements dn.l {

        /* renamed from: p, reason: collision with root package name */
        public static final a f2319p = new a();

        a() {
            super(1);
        }

        @Override // dn.l
        /* renamed from: a, reason: merged with bridge method [inline-methods] */
        public final Boolean invoke(j2.g0 g0Var) {
            o2.i I = g0Var.I();
            return Boolean.valueOf((I != null && I.D()) && I.i(o2.p.f30605a.g()));
        }
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final boolean g(o2.a aVar, Object obj) {
        if (aVar == obj) {
            return true;
        }
        if (!(obj instanceof o2.a)) {
            return false;
        }
        o2.a aVar2 = (o2.a) obj;
        if (!kotlin.jvm.internal.t.b(aVar.b(), aVar2.b())) {
            return false;
        }
        if (aVar.a() != null || aVar2.a() == null) {
            return aVar.a() == null || aVar2.a() != null;
        }
        return false;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final boolean h(o2.m mVar) {
        return !mVar.n().i(o2.p.f30605a.f());
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final boolean i(o2.m mVar) {
        o2.i w10 = mVar.w();
        o2.p pVar = o2.p.f30605a;
        if (w10.i(pVar.g()) && !kotlin.jvm.internal.t.b(o2.j.a(mVar.w(), pVar.i()), Boolean.TRUE)) {
            return true;
        }
        j2.g0 j10 = j(mVar.q(), a.f2319p);
        if (j10 != null) {
            o2.i I = j10.I();
            if (!(I != null ? kotlin.jvm.internal.t.b(o2.j.a(I, pVar.i()), Boolean.TRUE) : false)) {
                return true;
            }
        }
        return false;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final j2.g0 j(j2.g0 g0Var, dn.l lVar) {
        for (j2.g0 o02 = g0Var.o0(); o02 != null; o02 = o02.o0()) {
            if (((Boolean) lVar.invoke(o02)).booleanValue()) {
                return o02;
            }
        }
        return null;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final boolean k(o2.m mVar) {
        return mVar.p().getLayoutDirection() == c3.t.Rtl;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final boolean l(o2.m mVar, o2.i iVar) {
        Iterator it = iVar.iterator();
        while (it.hasNext()) {
            if (!mVar.n().i((o2.t) ((Map.Entry) it.next()).getKey())) {
                return true;
            }
        }
        return false;
    }
}
