package com.tencent.mm.plugin.wallet_core.model;

import android.content.Context;
import android.content.Intent;
import com.google.android.gms.common.util.CrashUtils.ErrorDialogData;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.cd.h.d;
import com.tencent.mm.ci.h;
import com.tencent.mm.compatible.util.k;
import com.tencent.mm.g.a.tu;
import com.tencent.mm.g.a.va;
import com.tencent.mm.model.at;
import com.tencent.mm.model.b;
import com.tencent.mm.model.bz.a;
import com.tencent.mm.model.q;
import com.tencent.mm.plugin.messenger.foundation.a.p;
import com.tencent.mm.plugin.wallet_core.d.c;
import com.tencent.mm.plugin.wallet_core.d.e;
import com.tencent.mm.plugin.wallet_core.d.f;
import com.tencent.mm.plugin.wallet_core.d.g;
import com.tencent.mm.plugin.wallet_core.d.i;
import com.tencent.mm.plugin.wallet_core.d.j;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.ah;
import com.tencent.mm.ui.MMActivity;
import com.tencent.ytcommon.BuildConfig;
import java.util.ArrayList;
import java.util.HashMap;

public class r implements at {
    private static HashMap<Integer, d> eaA;
    private a old = new 7(this);
    private volatile t tBM = new t();
    private h<ak> tBN = new h(new 1(this));
    private volatile ae tBO = null;
    private h<ah> tBP = new h(new 12(this));
    private h<j> tBQ = new h(new 18(this));
    private h<c> tBR = new h(new 19(this));
    private h<com.tencent.mm.plugin.wallet_core.d.a> tBS = new h(new 20(this));
    private h<f> tBT = new h(new 21(this));
    private h<com.tencent.mm.plugin.wallet_core.d.d> tBU = new h(new 22(this));
    private x tBV = new x();
    private h<e> tBW = new h(new 23(this));
    private h<i> tBX = new h(new 24(this));
    private h<com.tencent.mm.plugin.wallet_core.d.h> tBY = new h(new 2(this));
    private h<g> tBZ = new h(new 3(this));
    private com.tencent.mm.plugin.wallet_core.id_verify.util.a tCa = new com.tencent.mm.plugin.wallet_core.id_verify.util.a();
    private com.tencent.mm.sdk.b.c tCb = new 4(this);
    private String tCc = BuildConfig.FLAVOR;
    private com.tencent.mm.sdk.b.c<tu> tCd = new 5(this);
    private com.tencent.mm.sdk.b.c<va> tCe = new 6(this);

    public r() {
        AppMethodBeat.i(46866);
        AppMethodBeat.o(46866);
    }

    static {
        AppMethodBeat.i(46886);
        k.a("tenpay_utils", r.class.getClassLoader());
        HashMap hashMap = new HashMap();
        eaA = hashMap;
        hashMap.put(Integer.valueOf("WALLET_USER_INFO_TABLE".hashCode()), new 8());
        eaA.put(Integer.valueOf("WALLET_BANKCARD_TABLE".hashCode()), new 9());
        eaA.put(Integer.valueOf("LOAN_ENTRY_INFO_TABLE".hashCode()), new 10());
        eaA.put(Integer.valueOf("WALLET_KIND_INFO_TABLE".hashCode()), new d() {
            public final String[] Af() {
                return f.fnj;
            }
        });
        eaA.put(Integer.valueOf("WALLET_BULLETIN_TABLE".hashCode()), new 13());
        eaA.put(Integer.valueOf("WALLET_PREF_INFO_TABLE".hashCode()), new 14());
        eaA.put(Integer.valueOf("WALLET_FUNCTIOIN_INFO_TABLE".hashCode()), new 15());
        eaA.put(Integer.valueOf("WALLET_GREY_ITEM_TABLE".hashCode()), new 16());
        eaA.put(Integer.valueOf("WALLET_LUKCY_MONEY".hashCode()), new 17());
        AppMethodBeat.o(46886);
    }

    public static r cPD() {
        AppMethodBeat.i(46867);
        r rVar = (r) q.Y(r.class);
        AppMethodBeat.o(46867);
        return rVar;
    }

    public final HashMap<Integer, d> Jx() {
        return eaA;
    }

    public static j cPE() {
        AppMethodBeat.i(46868);
        if (com.tencent.mm.kernel.g.RK()) {
            j jVar = (j) cPD().tBQ.get();
            AppMethodBeat.o(46868);
            return jVar;
        }
        b bVar = new b();
        AppMethodBeat.o(46868);
        throw bVar;
    }

    public static g cPF() {
        AppMethodBeat.i(46869);
        if (com.tencent.mm.kernel.g.RK()) {
            g gVar = (g) cPD().tBZ.get();
            AppMethodBeat.o(46869);
            return gVar;
        }
        b bVar = new b();
        AppMethodBeat.o(46869);
        throw bVar;
    }

    public static c cPG() {
        AppMethodBeat.i(46870);
        if (com.tencent.mm.kernel.g.RK()) {
            c cVar = (c) cPD().tBR.get();
            AppMethodBeat.o(46870);
            return cVar;
        }
        b bVar = new b();
        AppMethodBeat.o(46870);
        throw bVar;
    }

    public static com.tencent.mm.plugin.wallet_core.d.h cPH() {
        AppMethodBeat.i(46871);
        if (com.tencent.mm.kernel.g.RK()) {
            com.tencent.mm.plugin.wallet_core.d.h hVar = (com.tencent.mm.plugin.wallet_core.d.h) cPD().tBY.get();
            AppMethodBeat.o(46871);
            return hVar;
        }
        b bVar = new b();
        AppMethodBeat.o(46871);
        throw bVar;
    }

    public static ak cPI() {
        AppMethodBeat.i(46872);
        if (com.tencent.mm.kernel.g.RK()) {
            ak akVar = (ak) cPD().tBN.get();
            AppMethodBeat.o(46872);
            return akVar;
        }
        b bVar = new b();
        AppMethodBeat.o(46872);
        throw bVar;
    }

    public static ah cPJ() {
        AppMethodBeat.i(46873);
        if (com.tencent.mm.kernel.g.RK()) {
            ah ahVar = (ah) cPD().tBP.get();
            AppMethodBeat.o(46873);
            return ahVar;
        }
        b bVar = new b();
        AppMethodBeat.o(46873);
        throw bVar;
    }

    public static com.tencent.mm.plugin.wallet_core.d.a cPK() {
        AppMethodBeat.i(46874);
        if (com.tencent.mm.kernel.g.RK()) {
            com.tencent.mm.plugin.wallet_core.d.a aVar = (com.tencent.mm.plugin.wallet_core.d.a) cPD().tBS.get();
            AppMethodBeat.o(46874);
            return aVar;
        }
        b bVar = new b();
        AppMethodBeat.o(46874);
        throw bVar;
    }

    public static f cPL() {
        AppMethodBeat.i(46875);
        if (com.tencent.mm.kernel.g.RK()) {
            f fVar = (f) cPD().tBT.get();
            AppMethodBeat.o(46875);
            return fVar;
        }
        b bVar = new b();
        AppMethodBeat.o(46875);
        throw bVar;
    }

    public static com.tencent.mm.plugin.wallet_core.d.d cPM() {
        AppMethodBeat.i(46876);
        if (com.tencent.mm.kernel.g.RK()) {
            com.tencent.mm.plugin.wallet_core.d.d dVar = (com.tencent.mm.plugin.wallet_core.d.d) cPD().tBU.get();
            AppMethodBeat.o(46876);
            return dVar;
        }
        b bVar = new b();
        AppMethodBeat.o(46876);
        throw bVar;
    }

    public static e cPN() {
        AppMethodBeat.i(46877);
        if (com.tencent.mm.kernel.g.RK()) {
            e eVar = (e) cPD().tBW.get();
            AppMethodBeat.o(46877);
            return eVar;
        }
        b bVar = new b();
        AppMethodBeat.o(46877);
        throw bVar;
    }

    public static i cPO() {
        AppMethodBeat.i(46878);
        if (com.tencent.mm.kernel.g.RK()) {
            i iVar = (i) cPD().tBX.get();
            AppMethodBeat.o(46878);
            return iVar;
        }
        b bVar = new b();
        AppMethodBeat.o(46878);
        throw bVar;
    }

    public final void iy(int i) {
    }

    public final void bA(boolean z) {
    }

    public static ae cPP() {
        AppMethodBeat.i(46879);
        ae aeVar = cPD().tBO;
        AppMethodBeat.o(46879);
        return aeVar;
    }

    public final void bz(boolean z) {
        AppMethodBeat.i(46880);
        ab.i("MicroMsg.SubCoreWalletCore", "onAccountPostReset subcore walletCore");
        com.tencent.mm.wallet_core.c.b.dNJ();
        com.tencent.mm.wallet_core.c.b.init(ah.getContext());
        ((p) com.tencent.mm.kernel.g.M(p.class)).getSysCmdMsgExtension().a("paymsg", this.old, true);
        cPI().cQv();
        this.tBO = ae.cPT();
        ((p) com.tencent.mm.kernel.g.M(p.class)).getSysCmdMsgExtension().a("paymsg", this.tBO.kBx, true);
        com.tencent.mm.sdk.b.a.xxA.b(this.tCb);
        com.tencent.mm.sdk.b.a.xxA.b(this.tBV);
        com.tencent.mm.sdk.b.a.xxA.b(this.tCe);
        com.tencent.mm.sdk.b.a.xxA.b(this.tCd);
        com.tencent.mm.pluginsdk.cmd.b.a(new a(), new String[]{"//cleanpaycn"});
        AppMethodBeat.o(46880);
    }

    public final void onAccountRelease() {
        AppMethodBeat.i(46881);
        ((p) com.tencent.mm.kernel.g.M(p.class)).getSysCmdMsgExtension().b("paymsg", this.old, true);
        cPI().Km();
        ah cPJ = cPJ();
        cPJ.tCO = null;
        cPJ.tCN.clear();
        cPJ.tCN = new ArrayList();
        ((p) com.tencent.mm.kernel.g.M(p.class)).getSysCmdMsgExtension().b("paymsg", this.tBO.kBx, true);
        if (ae.lUV != null) {
            ae.lUV.clear();
        }
        this.tBO = null;
        com.tencent.mm.sdk.b.a.xxA.d(this.tCb);
        com.tencent.mm.sdk.b.a.xxA.d(this.tBV);
        com.tencent.mm.sdk.b.a.xxA.d(this.tCe);
        com.tencent.mm.sdk.b.a.xxA.d(this.tCd);
        AppMethodBeat.o(46881);
    }

    public static void B(Context context, Intent intent) {
        AppMethodBeat.i(46882);
        if (intent == null) {
            intent = new Intent();
        }
        if (com.tencent.mm.model.r.YN()) {
            intent.setFlags(ErrorDialogData.DYNAMITE_CRASH);
            ab.i("MicroMsg.SubCoreWalletCore", "entryWalletIndexPage wallet type is h5,jump to ibg");
            com.tencent.mm.bp.d.b(context, "wallet_core", ".ui.ibg.WalletIbgAdapterUI", intent);
            AppMethodBeat.o(46882);
        } else if (com.tencent.mm.model.r.YO()) {
            intent.setFlags(ErrorDialogData.DYNAMITE_CRASH);
            com.tencent.mm.bp.d.b(context, "mall", ".ui.MallIndexOSUI", intent);
            AppMethodBeat.o(46882);
        } else {
            ab.i("MicroMsg.SubCoreWalletCore", "entryWalletIndexPage wallet type is native");
            intent.setFlags(ErrorDialogData.DYNAMITE_CRASH);
            com.tencent.mm.bp.d.b(context, "mall", ".ui.MallIndexUI", intent);
            com.tencent.mm.kernel.g.RQ();
            if (com.tencent.mm.kernel.g.RP().isSDCardAvailable()) {
                com.tencent.mm.ba.k kVar = new com.tencent.mm.ba.k(11);
                com.tencent.mm.kernel.g.RQ();
                com.tencent.mm.kernel.g.RO().eJo.a(kVar, 0);
            }
            AppMethodBeat.o(46882);
        }
    }

    public static t cPQ() {
        AppMethodBeat.i(46883);
        t tVar = cPD().tBM;
        AppMethodBeat.o(46883);
        return tVar;
    }

    public static boolean a(MMActivity mMActivity, com.tencent.mm.wallet_core.d.e eVar) {
        AppMethodBeat.i(46884);
        boolean a = cPD().tCa.a(mMActivity, eVar, 1008);
        AppMethodBeat.o(46884);
        return a;
    }

    public static boolean b(MMActivity mMActivity, com.tencent.mm.wallet_core.d.e eVar) {
        AppMethodBeat.i(46885);
        boolean a = cPD().tCa.a(mMActivity, eVar, 1006);
        AppMethodBeat.o(46885);
        return a;
    }
}
