package com.ss.android.ugc.aweme.creatortools;

import X.0EB;
import X.0HH;
import X.7he;
import X.8gF;
import X.AnonymousClass2GE;
import X.AnonymousClass2GO;
import X.AnonymousClass2HZ;
import X.AnonymousClass2KG;
import X.AnonymousClass2UX;
import X.AnonymousClass2ZR;
import X.AnonymousClass2ZS;
import X.AnonymousClass367;
import X.AnonymousClass3CR;
import X.AnonymousClass3CT;
import X.AnonymousClass3CU;
import X.AnonymousClass3CV;
import X.AnonymousClass3CW;
import X.AnonymousClass3CY;
import X.AnonymousClass3CZ;
import X.AnonymousClass3P1;
import X.AnonymousClass3ZQ;
import X.AnonymousClass43K;
import X.AnonymousClass43O;
import X.AnonymousClass4ZZ;
import X.C03012Pr;
import X.C06672dt;
import X.C12422nK;
import X.C15482sG;
import X.C16832uR;
import X.C17102us;
import X.C18812xd;
import X.C23223Bi;
import X.C23233Bj;
import X.C23243Bk;
import X.C23253Bl;
import X.C23403Ca;
import X.C23423Cc;
import X.C23453Cf;
import X.C25323Jk;
import X.C25333Jl;
import X.C29283Yq;
import X.C30953c7;
import X.C32773f3;
import X.C41553tD;
import X.C41563tE;
import X.C41573tF;
import X.C41583tG;
import X.C41603tI;
import X.C41613tJ;
import X.C41623tK;
import X.C41673tP;
import X.C41753tX;
import X.C42923vQ;
import X.C42933vR;
import X.C42953vT;
import X.C42963vU;
import X.C42973vV;
import X.C42983vW;
import X.C43013vZ;
import X.C43023va;
import X.C43043vc;
import X.C43073vf;
import X.C43093vh;
import X.C43103vi;
import X.C43123vk;
import X.C43133vl;
import X.C43143vm;
import X.C43153vn;
import X.C43163vo;
import X.C43173vp;
import X.C43183vq;
import X.C43193vr;
import X.C43203vs;
import X.C43213vt;
import X.C43223vu;
import X.C43233vv;
import X.C43253vx;
import X.C43263vy;
import X.C43273vz;
import X.C43283w0;
import X.C43293w1;
import X.C43303w2;
import X.C43313w3;
import X.C43323w4;
import X.C43343w6;
import X.C43353w7;
import X.C43363w8;
import X.C43403wC;
import X.C43413wD;
import X.C43453wH;
import X.C43493wL;
import X.C43883wy;
import X.C44343xi;
import X.C44473xv;
import X.C463242e;
import X.C463342f;
import X.C464542r;
import X.C474046i;
import X.C478047w;
import X.C61264ju;
import X.Crj;
import X.DS8;
import X.DZp;
import X.ESC;
import X.GDe;
import X.Hx0;
import X.ISm;
import X.Ls2;
import X.LsC;
import X.M12;
import X.Mjy;
import X.OFc;
import X.Qeg;
import X.Rc9;
import X.SNU;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.SparseArray;
import android.view.View;
import androidx.constraintlayout.widget.ConstraintLayout;
import com.bytedance.apm.agent.v2.instrumentation.ActivityAgent;
import com.bytedance.covode.number.Covode;
import com.bytedance.sysoptimizer.EnterTransitionCrashOptimizer;
import com.ss.android.ugc.aweme.IAccountUserService;
import com.ss.android.ugc.aweme.experiment.ClaCrowdsourcingEntrypoints;
import com.ss.android.ugc.aweme.live.ILiveOuterService;
import com.ss.android.ugc.aweme.live.LiveOuterService;
import com.ss.android.ugc.aweme.profile.model.User;
import com.ss.android.ugc.aweme.qna.services.QnaService;
import java.util.HashMap;
import java.util.Map;
import kotlin.h.b.n;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.ThreadMode;

public final class CreatorToolsActivity extends SNU implements AnonymousClass2HZ, AnonymousClass2GO {
    public static final C43413wD LJI = new C43413wD((byte) 0);
    public String LIZ = "";
    public GDe LIZIZ;
    public C32773f3 LIZJ;
    public C32773f3 LIZLLL;
    public C44343xi LJ;
    public AnonymousClass43K LJFF;
    public final Mjy LJII = new Mjy();
    public boolean LJIIIIZZ;
    public boolean LJIIIZ = true;
    public final boolean LJIIJ;
    public final boolean LJIIJJI;
    public final Crj LJIIL;
    public C32773f3 LJIILIIL;
    public C32773f3 LJIILJJIL;
    public C32773f3 LJIILL;
    public C32773f3 LJIILLIIL;
    public C32773f3 LJIIZILJ;
    public C32773f3 LJIJ;
    public C44343xi LJIJI;
    public C32773f3 LJIJJ;
    public C32773f3 LJIJJLI;
    public C32773f3 LJIL;
    public C32773f3 LJJ;
    public C32773f3 LJJI;
    public C44343xi LJJIFFI;
    public C32773f3 LJJII;
    public SparseArray LJJIII;

    static {
        Covode.recordClassIndex(62706);
    }

    private final C464542r LIZJ() {
        return (C464542r) this.LJIIL.getValue();
    }

    public final void _$_clearFindViewByIdCache() {
        SparseArray sparseArray = this.LJJIII;
        if (sparseArray != null) {
            sparseArray.clear();
        }
    }

    public final View _$_findCachedViewById(int i) {
        if (this.LJJIII == null) {
            this.LJJIII = new SparseArray();
        }
        View view = (View) this.LJJIII.get(i);
        if (view != null) {
            return view;
        }
        View findViewById = findViewById(i);
        this.LJJIII.put(i, findViewById);
        return findViewById;
    }

    public final Map<Integer, Object> getSubscriberEventTypes() {
        HashMap hashMap = new HashMap();
        hashMap.put(206, new Rc9(CreatorToolsActivity.class, "onSwitchBusinessAccountSuccessEvent", DS8.class, ThreadMode.MAIN, 0, false));
        hashMap.put(58, new Rc9(CreatorToolsActivity.class, "onJsBroadCastEvent", Hx0.class, ThreadMode.MAIN, 0, false));
        return hashMap;
    }

    /* JADX WARNING: type inference failed for: r0v0, types: [com.ss.android.ugc.aweme.creatortools.CreatorToolsActivity, X.SNU, android.app.Activity] */
    public final void onPause() {
        8gF.LIZJ(this);
        CreatorToolsActivity.super.onPause();
    }

    /* JADX WARNING: type inference failed for: r0v0, types: [com.ss.android.ugc.aweme.creatortools.CreatorToolsActivity, X.SNU, android.app.Activity] */
    public final void onStart() {
        8gF.LIZ(this);
        CreatorToolsActivity.super.onStart();
    }

    public final void onWindowFocusChanged(boolean z) {
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.creatortools.CreatorToolsActivity", "onWindowFocusChanged", true);
        CreatorToolsActivity.super.onWindowFocusChanged(z);
    }

    private final void LIZLLL() {
        C44343xi r1;
        if (this.LJIIIZ && (r1 = this.LJIJI) != null) {
            r1.LIZ(C43293w1.LIZ);
        }
    }

    private final void LJIL() {
        AnonymousClass2UX r2 = new AnonymousClass2UX();
        r2.LIZ("enter_from", "settings");
        n.LIZIZ(r2, "");
        C12422nK.LIZ("show_gifts_for_creators", r2.LIZ);
    }

    public final String LIZIZ() {
        String LIZ2;
        Intent intent = getIntent();
        if (intent == null || (LIZ2 = LIZ(intent, "PRO_ENTER_FROM")) == null) {
            return "";
        }
        return LIZ2;
    }

    /* JADX WARNING: type inference failed for: r4v0, types: [com.ss.android.ugc.aweme.creatortools.CreatorToolsActivity, X.4Qh] */
    private final void LJ() {
        C16832uR r2 = new C16832uR();
        String string = getString(2131823581);
        n.LIZIZ(string, "");
        AnonymousClass367.LIZ(r2, string, (Ls2<C03012Pr>) new C43253vx(this));
        ((C30953c7) _$_findCachedViewById(2131363834)).setNavActions(r2);
    }

    private final void LJFF() {
        LIZ("insight_show");
        C464542r LIZJ2 = LIZJ();
        String string = getString(2131832197);
        n.LIZIZ(string, "");
        C463342f r0 = r4;
        C463342f r4 = new C463342f("", false, (String) null, string, (C29283Yq) null, C18812xd.LIZ((LsC<? super AnonymousClass3ZQ, C03012Pr>) C41563tE.LIZ), false, (String) null, false, new C41553tD(this), (View.OnClickListener) null, 6102);
        LIZJ2.LIZ((AnonymousClass43O<?>) new C32773f3(r0));
    }

    private final void LJIIIIZZ() {
        if (QnaService.LIZ().enablePublicQna()) {
            C32773f3 r1 = this.LJIILL;
            if (r1 != null) {
                r1.LIZ(new C43073vf(this));
                return;
            }
            return;
        }
        C32773f3 r12 = this.LJIILL;
        if (r12 != null) {
            r12.LIZ(C43103vi.LIZ);
        }
    }

    private final void LJIIL() {
        C464542r LIZJ2 = LIZJ();
        String string = getString(2131821468);
        n.LIZIZ(string, "");
        C463342f r0 = r4;
        C463342f r4 = new C463342f("", false, (String) null, string, (C29283Yq) null, C18812xd.LIZ((LsC<? super AnonymousClass3ZQ, C03012Pr>) AnonymousClass3CW.LIZ), false, (String) null, false, new AnonymousClass3CV(this), (View.OnClickListener) null, 5974);
        LIZJ2.LIZ((AnonymousClass43O<?>) new C32773f3(r0));
    }

    /* JADX WARNING: type inference failed for: r1v0, types: [com.ss.android.ugc.aweme.creatortools.CreatorToolsActivity, X.SNU, java.lang.Object, android.app.Activity] */
    public final void onDestroy() {
        8gF.LJ(this);
        CreatorToolsActivity.super.onDestroy();
        GDe gDe = this.LIZIZ;
        if (gDe != null) {
            gDe.LIZ();
        }
        this.LJII.LIZ();
        if (EventBus.LIZ().LIZ(this)) {
            EventBus.LIZ().LIZIZ(this);
        }
    }

    /* JADX WARNING: type inference failed for: r1v0, types: [com.ss.android.ugc.aweme.creatortools.CreatorToolsActivity, X.SNU, android.app.Activity] */
    public final void onStop() {
        8gF.LIZLLL(this);
        CreatorToolsActivity.super.onStop();
        if (EnterTransitionCrashOptimizer.getContext() != null) {
            try {
                getWindow().getDecorView().getViewTreeObserver().dispatchOnPreDraw();
            } catch (Throwable unused) {
            }
        }
        try {
            getWindow().getDecorView().getViewTreeObserver().dispatchOnPreDraw();
        } catch (Throwable unused2) {
        }
    }

    public CreatorToolsActivity() {
        Boolean bool;
        AnonymousClass3P1 LJ2;
        AnonymousClass3P1 LJ3;
        ILiveOuterService LJJI2 = LiveOuterService.LJJI();
        Boolean bool2 = null;
        if (LJJI2 == null || (LJ3 = LJJI2.LJ()) == null) {
            bool = null;
        } else {
            bool = LJ3.LJIIL();
        }
        this.LJIIJ = n.LIZ(bool, true);
        ILiveOuterService LJJI3 = LiveOuterService.LJJI();
        if (!(LJJI3 == null || (LJ2 = LJJI3.LJ()) == null)) {
            bool2 = LJ2.LJIJ();
        }
        this.LJIIJJI = n.LIZ(bool2, true);
        this.LJIIL = 7he.LIZ(new C43093vh(this));
    }

    private final void LJI() {
        boolean z = !C43403wC.LIZ();
        C464542r LIZJ2 = LIZJ();
        String string = getString(2131823587);
        n.LIZIZ(string, "");
        C463342f r4 = r5;
        boolean z2 = z;
        C463342f r5 = new C463342f("", false, (String) null, string, (C29283Yq) null, C18812xd.LIZ((LsC<? super AnonymousClass3ZQ, C03012Pr>) C43203vs.LIZ), z, (String) null, false, new C43343w6(this), (View.OnClickListener) null, 5974);
        C32773f3 r1 = new C32773f3(r4);
        this.LJIILIIL = r1;
        LIZJ2.LIZ((AnonymousClass43O<?>) r1);
        if (z2) {
            LIZ("creator_portal_show");
        }
    }

    private final void LJIIIZ() {
        boolean LIZ2 = C43323w4.LIZ.LIZ();
        C464542r LIZJ2 = LIZJ();
        String string = getString(2131823586);
        n.LIZIZ(string, "");
        C463342f r4 = r5;
        boolean z = LIZ2;
        C463342f r5 = new C463342f("", false, (String) null, string, (C29283Yq) null, C18812xd.LIZ((LsC<? super AnonymousClass3ZQ, C03012Pr>) C43133vl.LIZ), LIZ2, (String) null, false, new C43263vy(this), (View.OnClickListener) null, 5974);
        C32773f3 r1 = new C32773f3(r4);
        this.LJIILLIIL = r1;
        LIZJ2.LIZ((AnonymousClass43O<?>) r1);
        if (z) {
            LIZ("creator_playlist_show");
        }
    }

    private final void LJIIJ() {
        ILiveOuterService LJJI2 = LiveOuterService.LJJI();
        n.LIZIZ(LJJI2, "");
        AnonymousClass3P1 LJ2 = LJJI2.LJ();
        n.LIZIZ(LJ2, "");
        this.LIZIZ = LJ2.LJJIL();
        C44343xi r1 = this.LJ;
        if (r1 != null) {
            r1.LIZ(C43283w0.LIZ);
        }
        C464542r LIZJ2 = LIZJ();
        String string = getString(2131830432);
        n.LIZIZ(string, "");
        C463342f r0 = r5;
        C463342f r5 = new C463342f("", C41753tX.LIZ.LJII(), (String) null, string, (C29283Yq) null, C18812xd.LIZ((LsC<? super AnonymousClass3ZQ, C03012Pr>) C43163vo.LIZ), true, (String) null, false, new C43013vZ(this), (View.OnClickListener) null, 5972);
        C32773f3 r12 = new C32773f3(r0);
        this.LIZLLL = r12;
        LIZJ2.LIZ((AnonymousClass43O<?>) r12);
    }

    private final void LJIIJJI() {
        C464542r LIZJ2 = LIZJ();
        String string = getString(2131826652);
        n.LIZIZ(string, "");
        AnonymousClass3ZQ LIZ2 = C18812xd.LIZ((LsC<? super AnonymousClass3ZQ, C03012Pr>) C23243Bk.LIZ);
        C463342f r0 = r4;
        C463342f r4 = new C463342f("", C41753tX.LIZ.LJIILLIIL(), (String) null, string, (C29283Yq) null, LIZ2, false, (String) null, false, (View.OnClickListener) null, (View.OnClickListener) null, 8148);
        C32773f3 r1 = new C32773f3(r0);
        this.LJIIZILJ = r1;
        LIZJ2.LIZ((AnonymousClass43O<?>) r1);
        C44343xi r12 = this.LJ;
        if (r12 != null) {
            r12.LIZ(C25333Jl.LIZ);
        }
        C32773f3 r13 = this.LJIIZILJ;
        if (r13 != null) {
            r13.LIZ(new C23223Bi(this));
        }
    }

    private final void LJIILIIL() {
        C464542r LIZJ2 = LIZJ();
        String string = getString(2131829855);
        n.LIZIZ(string, "");
        C463342f r0 = r4;
        C463342f r4 = new C463342f("", false, (String) null, string, (C29283Yq) null, C18812xd.LIZ((LsC<? super AnonymousClass3ZQ, C03012Pr>) C23453Cf.LIZ), false, (String) null, false, (View.OnClickListener) null, (View.OnClickListener) null, 8150);
        C32773f3 r1 = new C32773f3(r0);
        this.LJIJ = r1;
        LIZJ2.LIZ((AnonymousClass43O<?>) r1);
        C44343xi r12 = this.LJ;
        if (r12 != null) {
            r12.LIZ(C25323Jk.LIZ);
        }
        C32773f3 r13 = this.LJIJ;
        if (r13 != null) {
            r13.LIZ(new C23423Cc(this));
        }
    }

    private final void LJIILJJIL() {
        ClaCrowdsourcingEntrypoints LIZ2 = C43313w3.LIZ();
        if (LIZ2 != null) {
            LIZ2.isEnrolled();
            if (!LIZ2.isEnrolled() && !LIZ2.isEnrolled() && LIZ2.getPassAgs()) {
                LIZ2.isTargetedUser();
            }
        }
        C464542r LIZJ2 = LIZJ();
        String string = getString(2131822663);
        n.LIZIZ(string, "");
        C463342f r0 = r4;
        C463342f r4 = new C463342f("", false, (String) null, string, (C29283Yq) null, C18812xd.LIZ((LsC<? super AnonymousClass3ZQ, C03012Pr>) C23403Ca.LIZ), false, (String) null, false, new AnonymousClass3CZ(this), (View.OnClickListener) null, 5974);
        LIZJ2.LIZ((AnonymousClass43O<?>) new C32773f3(r0));
    }

    private final void LJIILL() {
        IAccountUserService LJFF2 = C474046i.LJFF();
        n.LIZIZ(LJFF2, "");
        User curUser = LJFF2.getCurUser();
        if (!ESC.LJ()) {
            IAccountUserService LJFF3 = C474046i.LJFF();
            n.LIZIZ(LJFF3, "");
            if (LJFF3.isLogin()) {
                n.LIZIZ(curUser, "");
                if (curUser.getAccountType() != 3 && !curUser.isAccuratePrivateAccount() && AnonymousClass3CY.LIZ.LIZ()) {
                    C464542r LIZJ2 = LIZJ();
                    String string = getString(2131831043);
                    n.LIZIZ(string, "");
                    C463342f r0 = r5;
                    C463342f r5 = new C463342f("", false, (String) null, string, (C29283Yq) null, C18812xd.LIZ((LsC<? super AnonymousClass3ZQ, C03012Pr>) new C23253Bl(this)), false, (String) null, false, new AnonymousClass3CR(this), (View.OnClickListener) null, 6102);
                    C32773f3 r1 = new C32773f3(r0);
                    this.LJJII = r1;
                    LIZJ2.LIZ((AnonymousClass43O<?>) r1);
                }
            }
        }
    }

    private final void LJIJ() {
        IAccountUserService LJFF2 = C474046i.LJFF();
        n.LIZIZ(LJFF2, "");
        User curUser = LJFF2.getCurUser();
        n.LIZIZ(curUser, "");
        boolean adAuthorization = curUser.getAdAuthorization();
        C464542r LIZJ2 = LIZJ();
        String string = getString(2131826730);
        n.LIZIZ(string, "");
        AnonymousClass43K r1 = new AnonymousClass43K(new C463242e(adAuthorization, string, new C42933vR(this), true, (Object) null, (View.OnClickListener) null, (C29283Yq) null, getString(2131826731), false, 7152));
        this.LJFF = r1;
        LIZJ2.LIZ((AnonymousClass43O<?>) r1);
    }

    private final void LJIJI() {
        if (C43353w7.LIZ()) {
            C464542r LIZJ2 = LIZJ();
            String string = getString(2131824266);
            n.LIZIZ(string, "");
            C463342f r0 = r4;
            C463342f r4 = new C463342f("", false, (String) null, string, (C29283Yq) null, C18812xd.LIZ((LsC<? super AnonymousClass3ZQ, C03012Pr>) C43153vn.LIZ), false, (String) null, false, (View.OnClickListener) null, (View.OnClickListener) null, 8150);
            C32773f3 r1 = new C32773f3(r0);
            this.LJIL = r1;
            LIZJ2.LIZ((AnonymousClass43O<?>) r1);
            if (C43363w8.LIZ == null || !this.LJIIIIZZ) {
                C43363w8.LIZIZ.LIZ(false, this.LJII, new C43303w2(this));
            } else {
                LIZ(C43363w8.LIZ);
            }
        }
    }

    private final void LJIJJ() {
        boolean LIZ2 = C43883wy.LIZ.LIZ();
        C464542r LIZJ2 = LIZJ();
        String string = getString(2131832705);
        n.LIZIZ(string, "");
        C463342f r4 = r5;
        boolean z = LIZ2;
        C463342f r5 = new C463342f("", false, (String) null, string, (C29283Yq) null, C18812xd.LIZ((LsC<? super AnonymousClass3ZQ, C03012Pr>) C41583tG.LIZ), LIZ2, (String) null, false, new C41573tF(this), (View.OnClickListener) null, 5974);
        C32773f3 r2 = new C32773f3(r4);
        this.LJJ = r2;
        LIZJ2.LIZ((AnonymousClass43O<?>) r2);
        if (z) {
            this.LJIIIZ = false;
            LIZ("tiktok_shoutouts_show");
        }
    }

    private final void LJIJJLI() {
        AnonymousClass2KG LIZ2 = C43273vz.LIZ.LIZ();
        boolean z = true;
        if (LIZ2 == null || !LIZ2.LIZ) {
            z = false;
        }
        C464542r LIZJ2 = LIZJ();
        String string = getString(2131834820);
        n.LIZIZ(string, "");
        C463342f r4 = r5;
        boolean z2 = z;
        C463342f r5 = new C463342f("", false, (String) null, string, (C29283Yq) null, C18812xd.LIZ((LsC<? super AnonymousClass3ZQ, C03012Pr>) AnonymousClass3CU.LIZ), z, (String) null, false, new AnonymousClass3CT(this), (View.OnClickListener) null, 5974);
        C32773f3 r1 = new C32773f3(r4);
        this.LJJI = r1;
        LIZJ2.LIZ((AnonymousClass43O<?>) r1);
        if (z2) {
            LJIL();
        }
    }

    /* JADX WARNING: type inference failed for: r3v0, types: [android.content.Context, com.ss.android.ugc.aweme.creatortools.CreatorToolsActivity] */
    private final void LJII() {
        boolean LIZ2 = C61264ju.LIZ();
        IAccountUserService LJFF2 = C474046i.LJFF();
        n.LIZIZ(LJFF2, "");
        User curUser = LJFF2.getCurUser();
        n.LIZIZ(curUser, "");
        int accountType = curUser.getAccountType();
        C17102us r1 = new C17102us();
        r1.element = 0;
        IAccountUserService LJFF3 = C474046i.LJFF();
        n.LIZIZ(LJFF3, "");
        User curUser2 = LJFF3.getCurUser();
        n.LIZIZ(curUser2, "");
        if (curUser2.getCommerceUserInfo() != null) {
            IAccountUserService LJFF4 = C474046i.LJFF();
            n.LIZIZ(LJFF4, "");
            User curUser3 = LJFF4.getCurUser();
            n.LIZIZ(curUser3, "");
            r1.element = curUser3.getCommerceUserInfo().getPromotePayType();
        }
        C464542r LIZJ2 = LIZJ();
        String string = getString(2131831118);
        n.LIZIZ(string, "");
        C463342f r6 = r7;
        C463342f r7 = new C463342f("", false, (String) null, string, (C29283Yq) null, C18812xd.LIZ((LsC<? super AnonymousClass3ZQ, C03012Pr>) C43143vm.LIZ), LIZ2, (String) null, false, new C478047w(this, accountType, r1), (View.OnClickListener) null, 5974);
        C32773f3 r0 = new C32773f3(r6);
        this.LJIILJJIL = r0;
        LIZJ2.LIZ((AnonymousClass43O<?>) r0);
        if (LIZ2) {
            AnonymousClass2UX r4 = new AnonymousClass2UX();
            r4.LIZ("user_account_type", accountType);
            r4.LIZ("promote_version", r1.element);
            r4.LIZ("enter_from", LIZIZ());
            r4.LIZ("promote_status", 1);
            C12422nK.LIZ("Promote_profile_entrance_show", r4.LIZ);
            C61264ju.LIZ(this);
        }
    }

    private final void LJIILLIIL() {
        C464542r LIZJ2 = LIZJ();
        C463342f r0 = r4;
        C463342f r4 = new C463342f("", false, (String) null, "Creator Marketplace", (C29283Yq) null, C18812xd.LIZ((LsC<? super AnonymousClass3ZQ, C03012Pr>) C43193vr.LIZ), false, (String) null, false, (View.OnClickListener) null, (View.OnClickListener) null, 8022);
        C32773f3 r1 = new C32773f3(r0);
        this.LJIJJ = r1;
        LIZJ2.LIZ((AnonymousClass43O<?>) r1);
        C15482sG r42 = new C15482sG();
        try {
            r42.element = C41753tX.LIZ.LJI();
        } catch (Exception e) {
            r42.element = null;
            0HH.LIZ(e);
        }
        if (r42.element == null || ((String) r42.element).length() <= 0 || !C41753tX.LIZ.LJ()) {
            C32773f3 r12 = this.LJIJJ;
            if (r12 != null) {
                r12.LIZ(C43123vk.LIZ);
                return;
            }
            return;
        }
        C32773f3 r13 = this.LJIJJ;
        if (r13 != null) {
            r13.LIZ(new C43023va(this, r42));
        }
        this.LJIIIZ = false;
        AnonymousClass2UX r3 = new AnonymousClass2UX();
        r3.LIZ("enter_from", LIZIZ());
        r3.LIZ("process_id", this.LIZ);
        C12422nK.LIZ("show_creator_marketplace_cell", r3.LIZ);
    }

    private final void LJIIZILJ() {
        C464542r LIZJ2 = LIZJ();
        String string = getString(2131823577);
        n.LIZIZ(string, "");
        C463342f r0 = r4;
        C463342f r4 = new C463342f("", false, (String) null, string, (C29283Yq) null, C18812xd.LIZ((LsC<? super AnonymousClass3ZQ, C03012Pr>) C41623tK.LIZ), false, (String) null, false, (View.OnClickListener) null, (View.OnClickListener) null, 8150);
        C32773f3 r1 = new C32773f3(r0);
        this.LJIJJLI = r1;
        LIZJ2.LIZ((AnonymousClass43O<?>) r1);
        String LIZ2 = C06672dt.LIZ();
        AnonymousClass2ZS LIZ3 = AnonymousClass2ZR.LIZ(LIZ2);
        if (ESC.LIZLLL() || TextUtils.isEmpty(LIZ2)) {
            C32773f3 r12 = this.LJIJJLI;
            if (r12 != null) {
                r12.LIZ(C41613tJ.LIZ);
                return;
            }
            return;
        }
        C32773f3 r13 = this.LJIJJLI;
        if (r13 != null) {
            r13.LIZ(new C41603tI(this, LIZ3));
        }
        this.LJIIIZ = false;
        AnonymousClass2UX r3 = new AnonymousClass2UX();
        r3.LIZ("enter_from", "creator_account");
        r3.LIZ("process_id", this.LIZ);
        C12422nK.LIZ("show_creator_fund_cell", r3.LIZ);
        LIZ("creator_fund_show");
    }

    /* JADX WARNING: type inference failed for: r6v0, types: [com.ss.android.ugc.aweme.creatortools.CreatorToolsActivity, X.SNU, android.app.Activity] */
    public final void onResume() {
        8gF.LIZIZ(this);
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.creatortools.CreatorToolsActivity", "onResume", true);
        CreatorToolsActivity.super.onResume();
        C32773f3 r1 = this.LJIJJ;
        if (r1 != null) {
            r1.LIZ(C42963vU.LIZ);
        }
        C32773f3 r12 = this.LJIILL;
        if (r12 != null) {
            r12.LIZ(C42973vV.LIZ);
        }
        C32773f3 r13 = this.LJJI;
        if (r13 != null) {
            r13.LIZ(C43043vc.LIZ);
        }
        C32773f3 r14 = this.LJJII;
        if (r14 != null) {
            r14.LIZ(C42983vW.LIZ);
        }
        IAccountUserService LJFF2 = C474046i.LJFF();
        n.LIZIZ(LJFF2, "");
        User curUser = LJFF2.getCurUser();
        n.LIZIZ(curUser, "");
        if (curUser.isEnableSubscription()) {
            AnonymousClass2UX r4 = new AnonymousClass2UX();
            r4.LIZ("enter_from", "creator_tools");
            C474046i.LIZ();
            IAccountUserService LJFF3 = C474046i.LIZ.LJFF();
            n.LIZIZ(LJFF3, "");
            r4.LIZ("anchor_id", LJFF3.getCurUserId());
            C12422nK.LIZ("creator_subscription_icon_show", r4.LIZ);
        }
        if (this.LJIIJ) {
            C32773f3 r15 = this.LJIIZILJ;
            if (r15 != null) {
                r15.LIZ(C23233Bj.LIZ);
            }
            LIZIZ("show");
        }
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.creatortools.CreatorToolsActivity", "onResume", false);
    }

    /* JADX WARNING: type inference failed for: r0v0, types: [com.ss.android.ugc.aweme.creatortools.CreatorToolsActivity, X.4Qh] */
    public final void LIZ() {
        String str;
        Boolean bool;
        Intent intent = getIntent();
        if (intent == null || (str = LIZ(intent, "bundle_process_id")) == null) {
            str = "";
        }
        this.LIZ = str;
        try {
            Intent intent2 = getIntent();
            if (intent2 != null) {
                bool = Boolean.valueOf(intent2.getBooleanExtra("HAS_PRELOAD", false));
            } else {
                bool = null;
            }
            this.LJIIIIZZ = bool.booleanValue();
        } catch (Exception e) {
            0HH.LIZ(e);
        }
        _$_findCachedViewById(2131368752).setItemAnimator((0EB) null);
        DZp _$_findCachedViewById = _$_findCachedViewById(2131368752);
        n.LIZIZ(_$_findCachedViewById, "");
        _$_findCachedViewById.setVisibility(4);
        Qeg _$_findCachedViewById2 = _$_findCachedViewById(2131363837);
        n.LIZIZ(_$_findCachedViewById2, "");
        _$_findCachedViewById2.setVisibility(4);
        Qeg _$_findCachedViewById3 = _$_findCachedViewById(2131363836);
        n.LIZIZ(_$_findCachedViewById3, "");
        _$_findCachedViewById3.setVisibility(4);
        AnonymousClass4ZZ r2 = (AnonymousClass4ZZ) _$_findCachedViewById(2131363835);
        n.LIZIZ(r2, "");
        r2.setVisibility(4);
        C15482sG r7 = new C15482sG();
        r7.element = _$_findCachedViewById(2131367399);
        r7.element.LIZIZ();
        LJ();
        C464542r LIZJ2 = LIZJ();
        String string = getString(2131823583);
        n.LIZIZ(string, "");
        LIZJ2.LIZ((AnonymousClass43O<?>) new C44343xi(new C41673tP(string, false, false, 14)));
        LJFF();
        LJI();
        LJII();
        C464542r LIZJ3 = LIZJ();
        String string2 = getString(2131820774);
        n.LIZIZ(string2, "");
        C463342f r4 = r10;
        C463342f r10 = new C463342f("", false, (String) null, string2, (C29283Yq) null, C18812xd.LIZ((LsC<? super AnonymousClass3ZQ, C03012Pr>) C43173vp.LIZ), false, (String) null, false, (View.OnClickListener) null, (View.OnClickListener) null, 8150);
        C32773f3 r22 = new C32773f3(r4);
        this.LJIILL = r22;
        LIZJ3.LIZ((AnonymousClass43O<?>) r22);
        LJIIIIZZ();
        LJIIIZ();
        LJIILJJIL();
        LJIILL();
        C464542r LIZJ4 = LIZJ();
        C44343xi r102 = new C44343xi(new C41673tP("LIVE", true, false, 8));
        this.LJ = r102;
        LIZJ4.LIZ((AnonymousClass43O<?>) r102);
        C464542r LIZJ5 = LIZJ();
        String string3 = getString(2131826708);
        n.LIZIZ(string3, "");
        C32773f3 r42 = new C32773f3(new C463342f("", false, (String) null, string3, (C29283Yq) null, C18812xd.LIZ((LsC<? super AnonymousClass3ZQ, C03012Pr>) C43183vq.LIZ), false, (String) null, false, (View.OnClickListener) null, (View.OnClickListener) null, 8022));
        this.LIZJ = r42;
        LIZJ5.LIZ((AnonymousClass43O<?>) r42);
        if (this.LJIIJ) {
            LJIIJJI();
        }
        if (this.LJIIJJI) {
            LJIILIIL();
        }
        IAccountUserService LJFF2 = C474046i.LJFF();
        n.LIZIZ(LJFF2, "");
        User curUser = LJFF2.getCurUser();
        n.LIZIZ(curUser, "");
        if (curUser.isEnableSubscription()) {
            LJIIJ();
        }
        ILiveOuterService LJJI2 = LiveOuterService.LJJI();
        n.LIZIZ(LJJI2, "");
        LJJI2.LIZLLL().LIZ(new C42923vQ(this));
        LJIIL();
        C464542r LIZJ6 = LIZJ();
        C44343xi r8 = new C44343xi(new C41673tP("", true, true, 8));
        this.LJIJI = r8;
        LIZJ6.LIZ((AnonymousClass43O<?>) r8);
        C43213vt LIZ2 = C43493wL.LIZ();
        if (LIZ2 == null || !LIZ2.LIZ) {
            DZp _$_findCachedViewById4 = _$_findCachedViewById(2131368752);
            n.LIZIZ(_$_findCachedViewById4, "");
            _$_findCachedViewById4.setVisibility(0);
            OFc _$_findCachedViewById5 = _$_findCachedViewById(2131367399);
            n.LIZIZ(_$_findCachedViewById5, "");
            _$_findCachedViewById5.setVisibility(8);
            LJIILLIIL();
            LJIIZILJ();
            LJIJI();
            LJIJJ();
            LJIJJLI();
            C44343xi r5 = this.LJIJI;
            if (r5 != null) {
                r5.LIZ(new C43223vu(this));
            }
            LIZLLL();
        } else {
            C44343xi r52 = this.LJIJI;
            if (r52 != null) {
                r52.LIZ(new C43233vv(this));
            }
            View view = (ConstraintLayout) _$_findCachedViewById(2131369724);
            n.LIZIZ(view, "");
            new C44473xv(view, LIZJ().LIZ().size(), this, LIZIZ(), LIZJ()).LIZIZ();
        }
        C464542r LIZJ7 = LIZJ();
        String string4 = getString(2131826733);
        n.LIZIZ(string4, "");
        C44343xi r6 = new C44343xi(new C41673tP(string4, true, true, 8));
        this.LJJIFFI = r6;
        LIZJ7.LIZ((AnonymousClass43O<?>) r6);
        LJIJ();
        _$_findCachedViewById(2131363836).setOnClickListener(new C42953vT(this, r7));
    }

    @ISm(LIZ = ThreadMode.MAIN)
    public final void onSwitchBusinessAccountSuccessEvent(DS8 ds8) {
        finish();
    }

    public final void LIZ(String str) {
        AnonymousClass2UX r2 = new AnonymousClass2UX();
        r2.LIZ("enter_from", LIZIZ());
        C12422nK.LIZ(str, r2.LIZ);
    }

    @ISm(LIZ = ThreadMode.MAIN)
    public final void onJsBroadCastEvent(Hx0 hx0) {
        M12.LIZ(hx0);
        if (n.LIZ(hx0.LIZIZ.optString("eventName"), "cla_crowdsourcing_onboarding_complete")) {
            AnonymousClass2GE.LIZ = true;
        }
    }

    public final void LIZIZ(String str) {
        AnonymousClass2UX r2 = new AnonymousClass2UX();
        IAccountUserService LJFF2 = C474046i.LJFF();
        n.LIZIZ(LJFF2, "");
        r2.LIZ("user_id", LJFF2.getCurUserId());
        r2.LIZ("action_type", str);
        C12422nK.LIZ("livesdk_creator_hub_inapp", r2.LIZ);
    }

    /* JADX WARNING: type inference failed for: r3v0, types: [com.ss.android.ugc.aweme.creatortools.CreatorToolsActivity, X.1oX, X.SNU, android.app.Activity] */
    public final void onCreate(Bundle bundle) {
        8gF.LIZ(this, bundle);
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.creatortools.CreatorToolsActivity", "onCreate", true);
        activityConfiguration(C43453wH.LIZ);
        CreatorToolsActivity.super.onCreate(bundle);
        supportRequestWindowFeature(10);
        setContentView(2131561241);
        LIZ();
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.creatortools.CreatorToolsActivity", "onCreate", false);
    }

    /* JADX WARNING: Code restructure failed: missing block: B:3:0x001b, code lost:
        if (r3 == null) goto L_0x001d;
     */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    private final void LIZJ(java.lang.String r6) {
        /*
            r5 = this;
            java.lang.String r2 = X.S9B.LJII()
            java.lang.String r4 = ""
            if (r2 == 0) goto L_0x001d
            java.util.Locale r1 = java.util.Locale.getDefault()
            kotlin.h.b.n.LIZIZ(r1, r4)
            java.lang.String r0 = "null cannot be cast to non-null type java.lang.String"
            java.util.Objects.requireNonNull(r2, r0)
            java.lang.String r3 = r2.toLowerCase(r1)
            kotlin.h.b.n.LIZIZ(r3, r4)
            if (r3 != 0) goto L_0x001e
        L_0x001d:
            r3 = r4
        L_0x001e:
            X.2UX r2 = new X.2UX
            r2.<init>()
            java.lang.String r1 = "EVENT_ORIGIN_FEATURE"
            java.lang.String r0 = "TEMAI"
            r2.LIZ((java.lang.String) r1, (java.lang.String) r0)
            java.lang.String r1 = "page_name"
            java.lang.String r0 = "creator_tools"
            r2.LIZ((java.lang.String) r1, (java.lang.String) r0)
            com.ss.android.ugc.aweme.IAccountUserService r0 = X.C474046i.LJFF()
            kotlin.h.b.n.LIZIZ(r0, r4)
            java.lang.String r1 = r0.getCurUserId()
            java.lang.String r0 = "author_id"
            r2.LIZ((java.lang.String) r0, (java.lang.String) r1)
            java.lang.String r0 = "country"
            r2.LIZ((java.lang.String) r0, (java.lang.String) r3)
            java.lang.String r0 = "is_onboard_ecom"
            r2.LIZ((java.lang.String) r0, (java.lang.String) r6)
            boolean r0 = X.C43353w7.LIZ()
            if (r0 == 0) goto L_0x0060
            java.lang.String r1 = "yes"
        L_0x0053:
            java.lang.String r0 = "enable_showcase"
            r2.LIZ((java.lang.String) r0, (java.lang.String) r1)
            java.util.Map<java.lang.String, java.lang.String> r1 = r2.LIZ
            java.lang.String r0 = "tiktokec_creator_tools_show"
            X.C12422nK.LIZ((java.lang.String) r0, (java.util.Map<java.lang.String, java.lang.String>) r1)
            return
        L_0x0060:
            java.lang.String r1 = "no"
            goto L_0x0053
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.creatortools.CreatorToolsActivity.LIZJ(java.lang.String):void");
    }

    /* JADX WARNING: Code restructure failed: missing block: B:6:0x002a, code lost:
        if (r5 == null) goto L_0x002c;
     */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public final void LIZ(X.C43063ve r8) {
        /*
            r7 = this;
            if (r8 == 0) goto L_0x009b
            boolean r0 = r8.LIZ
            r3 = 1
            if (r0 != r3) goto L_0x009b
            r0 = 0
            r7.LJIIIZ = r0
            java.lang.String r0 = "creator_showcase_show"
            r7.LIZ((java.lang.String) r0)
            java.lang.String r2 = X.S9B.LJII()
            java.lang.String r6 = ""
            if (r2 == 0) goto L_0x002c
            java.util.Locale r1 = java.util.Locale.getDefault()
            kotlin.h.b.n.LIZIZ(r1, r6)
            java.lang.String r0 = "null cannot be cast to non-null type java.lang.String"
            java.util.Objects.requireNonNull(r2, r0)
            java.lang.String r5 = r2.toLowerCase(r1)
            kotlin.h.b.n.LIZIZ(r5, r6)
            if (r5 != 0) goto L_0x002d
        L_0x002c:
            r5 = r6
        L_0x002d:
            X.3f3 r1 = r7.LJIL
            if (r1 == 0) goto L_0x0039
            X.3vS r0 = new X.3vS
            r0.<init>(r7, r8, r5)
            r1.LIZ(r0)
        L_0x0039:
            boolean r0 = r8.LIZ
            java.lang.String r2 = "yes"
            java.lang.String r4 = "no"
            if (r0 != r3) goto L_0x008d
            X.2UX r3 = new X.2UX
            r3.<init>()
            java.lang.String r1 = "EVENT_ORIGIN_FEATURE"
            java.lang.String r0 = "TEMAI"
            r3.LIZ((java.lang.String) r1, (java.lang.String) r0)
            java.lang.String r1 = "page_name"
            java.lang.String r0 = "creator_tools"
            r3.LIZ((java.lang.String) r1, (java.lang.String) r0)
            com.ss.android.ugc.aweme.IAccountUserService r0 = X.C474046i.LJFF()
            kotlin.h.b.n.LIZIZ(r0, r6)
            java.lang.String r1 = r0.getCurUserId()
            java.lang.String r0 = "author_id"
            r3.LIZ((java.lang.String) r0, (java.lang.String) r1)
            java.lang.String r0 = "country"
            r3.LIZ((java.lang.String) r0, (java.lang.String) r5)
            java.lang.String r1 = "module_for"
            java.lang.String r0 = "tiktok_showcase"
            r3.LIZ((java.lang.String) r1, (java.lang.String) r0)
            boolean r0 = r8.LIZIZ
            if (r0 == 0) goto L_0x0099
            r1 = r2
        L_0x0075:
            java.lang.String r0 = "is_onboard_ecom"
            r3.LIZ((java.lang.String) r0, (java.lang.String) r1)
            boolean r0 = X.C43353w7.LIZ()
            if (r0 == 0) goto L_0x0097
            r1 = r2
        L_0x0081:
            java.lang.String r0 = "enable_showcase"
            r3.LIZ((java.lang.String) r0, (java.lang.String) r1)
            java.util.Map<java.lang.String, java.lang.String> r1 = r3.LIZ
            java.lang.String r0 = "tiktokec_creator_tools_module_show"
            X.C12422nK.LIZ((java.lang.String) r0, (java.util.Map<java.lang.String, java.lang.String>) r1)
        L_0x008d:
            boolean r0 = r8.LIZIZ
            if (r0 == 0) goto L_0x0095
        L_0x0091:
            r7.LIZJ(r2)
            return
        L_0x0095:
            r2 = r4
            goto L_0x0091
        L_0x0097:
            r1 = r4
            goto L_0x0081
        L_0x0099:
            r1 = r4
            goto L_0x0075
        L_0x009b:
            X.3f3 r1 = r7.LJIL
            if (r1 == 0) goto L_0x00a4
            X.3vd r0 = X.C43053vd.LIZ
            r1.LIZ(r0)
        L_0x00a4:
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.creatortools.CreatorToolsActivity.LIZ(X.3ve):void");
    }

    public static String LIZ(Intent intent, String str) {
        try {
            return intent.getStringExtra(str);
        } catch (Exception unused) {
            return null;
        }
    }

    public final void onActivityResult(int i, int i2, Intent intent) {
        CreatorToolsActivity.super.onActivityResult(i, i2, intent);
    }
}
