/*
 * Decompiled with CFR 0.152.
 */
public final class eq
extends ep {
    private static final w a;
    private static final w b;
    private static final w c;
    private static final w d;
    private static final String e;
    private mo f;
    private iy g;
    private hx h;
    private gd i;

    public eq(eb eb2, gd gd2) {
        super(eb2, null);
        this.i = gd2;
    }

    private int l() {
        return this.h.a();
    }

    public final cq d() {
        return jy.g;
    }

    public final cq e() {
        if (!lh.t()) {
            return jy.c;
        }
        return null;
    }

    static {
        e = lh.d(7);
        a = jj.a(false);
        d = jj.a();
        c = jj.b(false);
        b = jj.b(false);
    }

    public final void a() {
        this.m();
    }

    public final void g_() {
        this.m();
    }

    public final void b() {
        this.g = null;
        this.h = null;
    }

    public final void a(ht ht2) {
        this.g.a(ht2, 0, 0);
    }

    public final void a(mo mo2) {
        this.f = mo2;
        super.n();
    }

    public final boolean a(boolean bl2) {
        return this.a(this.g);
    }

    public final int a(nj nj2) {
        switch (this.g.b(nj2)) {
            case -3: {
                return this.a(pb.a(7));
            }
            case -2: {
                return 3;
            }
        }
        return 4;
    }

    private void m() {
        if (this.t) {
            boolean bl2 = false;
            this.g = this.s.b(false, true);
            this.h = (hx)this.g.a();
            dz.a(this.h, e, d);
            gu gu2 = this.f.K();
            for (int i = 0; i < gu2.s(); ++i) {
                lk lk2;
                oz oz2 = gu2.a(i);
                if (!oz2.e() && !oz2.j() || !(lk2 = oz2.a.a).h(17)) continue;
                if (!bl2) {
                    bl2 = true;
                } else {
                    dz.a(this.h, 4);
                }
                String string = ps.a(this.s.j.a(oz2.a.k()));
                w w2 = mg.a(b, string, 1, 1);
                dz.a(this.h, string + " " + oz2.a.o(), -16777216, w2, true);
                for (int k = 0; k < lk2.i(17); ++k) {
                    lk lk3 = this.f.j(lk2.c(17, k));
                    if (lk3.h(1)) {
                        dz.a(this.h, lk3.g(1), -5636096, c);
                    }
                    if (lk3.h(2)) {
                        dz.b(this.h, lk3.g(2));
                    }
                    if (!lk3.h(3) || ed.b(string = lk3.g(3))) continue;
                    if (!string.toLowerCase().startsWith("http:")) {
                        string = "http://" + string;
                    }
                    String[] stringArray = cf.b(string);
                    new pt(4, 0, this.l(), a, stringArray[1], stringArray[0], 4).u = true;
                    this.h.e(new pt(4, 0, this.l(), a, stringArray[1], stringArray[0], 4));
                }
            }
            this.h.s();
        }
    }

    public final int a(pb pb2) {
        if (pb2.c != 8) {
            gm gm2;
            if (pb2.c == 7 && (gm2 = this.h.r()) instanceof pt) {
                ff.b("cl");
                this.i.c(((pt)gm2).b);
            }
            this.g.a(pb2);
            return 3;
        }
        return 1;
    }
}

