package a.i.b.a.c.d.a.c.a;

import a.f.a.b;
import a.f.b.j;
import a.f.b.k;
import a.i.b.a.c.b.am;
import a.i.b.a.c.b.c.g;
import a.i.b.a.c.b.c.n;
import a.i.b.a.c.b.l;
import a.i.b.a.c.d.a.b.d;
import a.i.b.a.c.d.a.c.h;
import a.i.b.a.c.f.a;
import a.i.b.a.c.f.f;
import com.tencent.matrix.trace.core.AppMethodBeat;
import java.util.Map;
import java.util.Set;

final class g$j extends k implements b<f, g> {
    final /* synthetic */ h BlU;
    final /* synthetic */ g Bom;

    g$j(g gVar, h hVar) {
        this.Bom = gVar;
        this.BlU = hVar;
        super(1);
    }

    public final /* synthetic */ Object am(Object obj) {
        AppMethodBeat.i(119915);
        f fVar = (f) obj;
        j.p(fVar, "name");
        g gVar;
        if (((Set) g.c(this.Bom).invoke()).contains(fVar)) {
            f fVar2;
            a.i.b.a.c.d.a.j jVar = this.BlU.Bnv.BmR;
            a c = a.i.b.a.c.i.c.a.c((a.i.b.a.c.b.h) this.Bom.Bok);
            if (c == null) {
                j.dWJ();
            }
            a.i.b.a.c.d.a.e.g a = jVar.a(c.p(fVar));
            if (a != null) {
                h hVar = this.BlU;
                l lVar = (l) this.Bom.Bok;
                j.o(a, "it");
                f fVar3 = new f(hVar, lVar, a);
                this.BlU.Bnv.Bng.a((d) fVar3);
                fVar2 = fVar3;
            } else {
                fVar2 = null;
            }
            gVar = (g) fVar2;
            AppMethodBeat.o(119915);
            return gVar;
        }
        n a2;
        a.i.b.a.c.d.a.e.n nVar = (a.i.b.a.c.d.a.e.n) ((Map) g.d(this.Bom).invoke()).get(fVar);
        if (nVar != null) {
            a2 = n.a(this.BlU.Bnv.Baf, this.Bom.Bok, fVar, this.BlU.Bnv.Baf.i((a.f.a.a) new a(this)), a.i.b.a.c.d.a.c.f.a(this.BlU, (a.i.b.a.c.d.a.e.d) nVar), (am) this.BlU.Bnv.BmZ.a((a.i.b.a.c.d.a.e.l) nVar));
        } else {
            a2 = null;
        }
        gVar = (g) a2;
        AppMethodBeat.o(119915);
        return gVar;
    }
}
