package h2;

import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import h2.p0;
import j2.g0;
import java.util.ArrayList;
import java.util.List;

/* loaded from: classes.dex */
public final class t0 extends g0.f {

    /* renamed from: b, reason: collision with root package name */
    public static final t0 f20725b = new t0();

    /* loaded from: classes.dex */
    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 f20726p = new a();

        a() {
            super(1);
        }

        public final void a(p0.a aVar) {
        }

        @Override // dn.l
        public /* bridge */ /* synthetic */ Object invoke(Object obj) {
            a((p0.a) obj);
            return rm.n0.f34904a;
        }
    }

    /* loaded from: classes.dex */
    static final class b extends kotlin.jvm.internal.v implements dn.l {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ p0 f20727p;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        b(p0 p0Var) {
            super(1);
            this.f20727p = p0Var;
        }

        public final void a(p0.a aVar) {
            p0.a.p(aVar, this.f20727p, 0, 0, BitmapDescriptorFactory.HUE_RED, null, 12, null);
        }

        @Override // dn.l
        public /* bridge */ /* synthetic */ Object invoke(Object obj) {
            a((p0.a) obj);
            return rm.n0.f34904a;
        }
    }

    /* loaded from: classes.dex */
    static final class c extends kotlin.jvm.internal.v implements dn.l {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ List f20728p;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        c(List list) {
            super(1);
            this.f20728p = list;
        }

        public final void a(p0.a aVar) {
            List list = this.f20728p;
            int size = list.size();
            for (int i10 = 0; i10 < size; i10++) {
                p0.a.p(aVar, (p0) list.get(i10), 0, 0, BitmapDescriptorFactory.HUE_RED, null, 12, null);
            }
        }

        @Override // dn.l
        public /* bridge */ /* synthetic */ Object invoke(Object obj) {
            a((p0.a) obj);
            return rm.n0.f34904a;
        }
    }

    private t0() {
        super("Undefined intrinsics block and it is required");
    }

    @Override // h2.e0
    public f0 f(g0 g0Var, List list, long j10) {
        if (list.isEmpty()) {
            return g0.j0(g0Var, c3.b.n(j10), c3.b.m(j10), null, a.f20726p, 4, null);
        }
        if (list.size() == 1) {
            p0 Y = ((d0) list.get(0)).Y(j10);
            return g0.j0(g0Var, c3.c.i(j10, Y.S0()), c3.c.h(j10, Y.F0()), null, new b(Y), 4, null);
        }
        ArrayList arrayList = new ArrayList(list.size());
        int size = list.size();
        for (int i10 = 0; i10 < size; i10++) {
            arrayList.add(((d0) list.get(i10)).Y(j10));
        }
        int size2 = arrayList.size();
        int i11 = 0;
        int i12 = 0;
        for (int i13 = 0; i13 < size2; i13++) {
            p0 p0Var = (p0) arrayList.get(i13);
            i11 = Math.max(p0Var.S0(), i11);
            i12 = Math.max(p0Var.F0(), i12);
        }
        return g0.j0(g0Var, c3.c.i(j10, i11), c3.c.h(j10, i12), null, new c(arrayList), 4, null);
    }
}
