package com.ss.android.ugc.aweme.specact.touchpoints.pendant;

import X.0CB;
import X.0CH;
import X.2Pr;
import X.2UX;
import X.2nK;
import X.36a;
import X.6Is;
import X.7hc;
import X.7he;
import X.C2978SGo;
import X.C2988SGy;
import X.C2989SGz;
import X.C2990SHa;
import X.C3002SHm;
import X.C3003SHn;
import X.C3007SHr;
import X.Crj;
import X.FI7;
import X.LsC;
import X.M12;
import X.SGT;
import X.SH5;
import X.SH6;
import X.SH7;
import X.SHD;
import X.SHE;
import X.SHF;
import X.SHG;
import X.SHJ;
import X.SHO;
import X.SHW;
import X.SHY;
import X.SIE;
import X.SJZ;
import android.view.View;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.aweme.compliance.api.a;
import com.ss.android.ugc.aweme.feed.model.Aweme;
import com.ss.android.ugc.aweme.model.TextExtraStruct;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import kotlin.h.b.n;

public final class SpecActPendantManager extends BasePendantManager implements View.OnClickListener, 6Is, SHO {
    public static final Crj LJIIIIZZ = 7he.LIZ(7hc.SYNCHRONIZED, C3007SHr.LIZ);
    public static final SGT LJIIIZ = new SGT((byte) 0);

    public final void onStateChanged(0CH r1, 0CB r2) {
        super.onStateChanged(r1, r2);
    }

    public SpecActPendantManager() {
    }

    public final boolean LJ() {
        return this.LIZIZ;
    }

    public final void LJIJ() {
        LIZ().LJ();
    }

    public final SHE LJIIJJI() {
        SJZ sjz = new SJZ();
        M12.LIZ(this);
        sjz.LIZIZ = this;
        return sjz;
    }

    public final C3002SHm LJIIL() {
        return (SIE) SIE.LIZ.getValue();
    }

    public final boolean LJIILLIIL() {
        return LIZ().LIZ();
    }

    public final boolean LJIIZILJ() {
        return LIZ().LIZJ();
    }

    static {
        Covode.recordClassIndex(115241);
    }

    public final void LJII() {
        super.LJII();
        C2988SGy.LIZLLL.LIZ();
        SH5 LIZ = SH5.LJIIIIZZ.LIZ();
        if (LIZ.LIZ != null) {
            LIZ.LIZJ = false;
            LIZ.LIZIZ = false;
            LIZ.LJ().LIZ(false);
        }
        LIZ().LIZ(false, SH6.LIZ.LJFF(this.LIZ), SH6.LIZ.LJI(this.LIZ));
    }

    public final void LJIJI() {
        SHE LIZ = LIZ();
        if (LIZ != null && LIZ.LIZ() && LIZ.LIZJ()) {
            Iterator<SHY> it = SH7.LIZ.iterator();
            while (it.hasNext()) {
                SHY next = it.next();
                if (next instanceof SHD) {
                    next.LIZ(LIZ, 0);
                }
            }
        }
    }

    public final void LJIILJJIL() {
        C2988SGy LIZ = C2988SGy.LIZLLL.LIZ();
        if (LIZ.LIZIZ) {
            if (LIZ.LIZ == null) {
                LIZ.LIZ = LJIIIZ.LIZ();
            }
            if (LIZ.LIZ()) {
                SHO sho = LIZ.LIZ;
                if (sho != null) {
                    sho.LIZ(false, "non_tracker", 0, "finished");
                }
            } else if (!SH5.LJIIIIZZ.LIZ().LJI()) {
                SH5 LIZ2 = SH5.LJIIIIZZ.LIZ();
                if (LIZ2.LJI) {
                    if (LIZ2.LJFF == null) {
                        LIZ2.LJFF = LJIIIZ.LIZ();
                    }
                    LIZ2.LJFF();
                }
            } else if (!C2989SGz.LJIIL.LIZ().LJIL()) {
                C2989SGz LIZ3 = C2989SGz.LJIIL.LIZ();
                if (LIZ3.LJIIIZ) {
                    if (LIZ3.LJIIIIZZ == null) {
                        LIZ3.LJIIIIZZ = LJIIIZ.LIZ();
                    }
                    LIZ3.LJJ();
                }
            }
        }
    }

    /* JADX WARNING: No exception handlers in catch block: Catch:{  } */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public final void LJIILIIL() {
        /*
            r10 = this;
            java.lang.String r4 = "null cannot be cast to non-null type com.ss.android.ugc.aweme.specact.touchpoints.pendant.helper.PendantResourceLoader"
            boolean r0 = r10.LIZIZ
            if (r0 == 0) goto L_0x00f1
            X.SHa r0 = r10.LIZ
            java.lang.String r2 = ""
            if (r0 == 0) goto L_0x0014
            X.SHK r0 = r0.LIZIZ
            if (r0 == 0) goto L_0x0014
            java.lang.String r7 = r0.LJIIJ
            if (r7 != 0) goto L_0x0015
        L_0x0014:
            r7 = r2
        L_0x0015:
            X.M12.LIZ(r7)
            X.SIC r6 = new X.SIC
            r6.<init>()
            X.M12.LIZ(r7)
            X.SHE r9 = r10.LIZ()     // Catch:{ all -> 0x00cf }
            java.lang.String r3 = "null cannot be cast to non-null type com.ss.android.ugc.aweme.specact.touchpoints.pendant.widget.SpecActWidget"
            if (r9 == 0) goto L_0x00c9
            X.SJZ r9 = (X.SJZ) r9     // Catch:{ all -> 0x00cf }
            X.SHa r8 = r10.LIZ     // Catch:{ all -> 0x00cf }
            r5 = 0
            if (r8 == 0) goto L_0x005f
            X.SHK r0 = r8.LIZIZ     // Catch:{ all -> 0x00cf }
            if (r0 == 0) goto L_0x005f
            X.SJa r1 = r9.LIZ     // Catch:{ all -> 0x00cf }
            if (r1 == 0) goto L_0x0049
            if (r8 == 0) goto L_0x0041
            X.SHK r0 = r8.LIZIZ     // Catch:{ all -> 0x00cf }
            if (r0 == 0) goto L_0x0041
            java.util.List<java.lang.String> r0 = r0.LJIIIIZZ     // Catch:{ all -> 0x00cf }
            if (r0 != 0) goto L_0x0046
        L_0x0041:
            java.util.ArrayList r0 = new java.util.ArrayList     // Catch:{ all -> 0x00cf }
            r0.<init>()     // Catch:{ all -> 0x00cf }
        L_0x0046:
            r1.setProgressBackgroundColor(r0)     // Catch:{ all -> 0x00cf }
        L_0x0049:
            X.SJa r1 = r9.LIZ     // Catch:{ all -> 0x00cf }
            if (r1 == 0) goto L_0x005f
            if (r8 == 0) goto L_0x0057
            X.SHK r0 = r8.LIZIZ     // Catch:{ all -> 0x00cf }
            if (r0 == 0) goto L_0x0057
            java.util.List<java.lang.String> r0 = r0.LJIIIZ     // Catch:{ all -> 0x00cf }
            if (r0 != 0) goto L_0x005c
        L_0x0057:
            java.util.ArrayList r0 = new java.util.ArrayList     // Catch:{ all -> 0x00cf }
            r0.<init>()     // Catch:{ all -> 0x00cf }
        L_0x005c:
            r1.setProgressForegroundColor(r0)     // Catch:{ all -> 0x00cf }
        L_0x005f:
            X.SHm r0 = r10.LIZIZ()     // Catch:{ all -> 0x00cf }
            if (r0 == 0) goto L_0x00c3
            X.SIE r0 = (X.SIE) r0     // Catch:{ all -> 0x00cf }
            X.SIF r1 = r0.LIZ()     // Catch:{ all -> 0x00cf }
            X.M12.LIZ(r7)     // Catch:{ all -> 0x00cf }
            boolean r0 = r1.LIZIZ     // Catch:{ all -> 0x00cf }
            if (r0 == 0) goto L_0x00bb
            X.ON6 r0 = r1.LIZ     // Catch:{ all -> 0x00cf }
            if (r0 == 0) goto L_0x007a
            java.io.InputStream r5 = r0.LIZ(r7)     // Catch:{ all -> 0x00cf }
        L_0x007a:
            java.lang.String r1 = r1.LIZ()     // Catch:{ all -> 0x00cf }
            if (r5 == 0) goto L_0x0082
            if (r1 != 0) goto L_0x0083
        L_0x0082:
            return
        L_0x0083:
            X.SHE r0 = r10.LIZ()     // Catch:{ all -> 0x00cf }
            if (r0 == 0) goto L_0x00b5
            X.SJZ r0 = (X.SJZ) r0     // Catch:{ all -> 0x00cf }
            X.M12.LIZ(r5, r1)     // Catch:{ all -> 0x00cf }
            X.SJa r0 = r0.LIZ     // Catch:{ all -> 0x00cf }
            if (r0 == 0) goto L_0x00b4
            X.M12.LIZ(r5, r1)     // Catch:{ all -> 0x00cf }
            X.HDc r3 = r0.getLottieView()     // Catch:{ Exception -> 0x00b0 }
            java.lang.String r0 = "bigLottie"
            X.0Kb r1 = X.0KE.LIZ(r5, r0)     // Catch:{ Exception -> 0x00b0 }
            X.Qkz r0 = new X.Qkz     // Catch:{ Exception -> 0x00b0 }
            r0.<init>(r3, r5, r6)     // Catch:{ Exception -> 0x00b0 }
            r1.LIZ(r0)     // Catch:{ Exception -> 0x00b0 }
            X.Ql0 r0 = new X.Ql0     // Catch:{ Exception -> 0x00b0 }
            r0.<init>(r3)     // Catch:{ Exception -> 0x00b0 }
            r1.LIZJ(r0)     // Catch:{ Exception -> 0x00b0 }
            return
        L_0x00b0:
            r0 = move-exception
            X.0HH.LIZ(r0)     // Catch:{ all -> 0x00cf }
        L_0x00b4:
            return
        L_0x00b5:
            java.lang.NullPointerException r0 = new java.lang.NullPointerException     // Catch:{ all -> 0x00cf }
            r0.<init>(r3)     // Catch:{ all -> 0x00cf }
            throw r0     // Catch:{ all -> 0x00cf }
        L_0x00bb:
            java.lang.Throwable r1 = new java.lang.Throwable     // Catch:{ all -> 0x00cf }
            java.lang.String r0 = "HAS NOT inited"
            r1.<init>(r0)     // Catch:{ all -> 0x00cf }
            throw r1     // Catch:{ all -> 0x00cf }
        L_0x00c3:
            java.lang.NullPointerException r0 = new java.lang.NullPointerException     // Catch:{ all -> 0x00cf }
            r0.<init>(r4)     // Catch:{ all -> 0x00cf }
            throw r0     // Catch:{ all -> 0x00cf }
        L_0x00c9:
            java.lang.NullPointerException r0 = new java.lang.NullPointerException     // Catch:{ all -> 0x00cf }
            r0.<init>(r3)     // Catch:{ all -> 0x00cf }
            throw r0     // Catch:{ all -> 0x00cf }
        L_0x00cf:
            X.SHm r0 = r10.LIZIZ()
            java.util.Objects.requireNonNull(r0, r4)
            X.SIE r0 = (X.SIE) r0
            X.SIF r0 = r0.LIZ()
            r0.LIZIZ()
            X.2rJ r0 = X.2rI.LIZ
            com.ss.android.ugc.aweme.local_test.LocalTestApi r0 = r0.LIZ
            kotlin.h.b.n.LIZIZ(r0, r2)
            X.FDb r2 = r0.getSpecActDebugService()
            java.lang.String r1 = "SpecPendant"
            java.lang.String r0 = "setWidgetResource error"
            r2.LIZ(r1, r0)
        L_0x00f1:
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.specact.touchpoints.pendant.SpecActPendantManager.LJIILIIL():void");
    }

    public final void LJIILL() {
        if (this.LIZ != null) {
            SH7 sh7 = SH7.LJFF;
            SHE LIZ = LIZ();
            if (LIZ == null || !LIZ.LIZ() || !LIZ.LJIIJ()) {
                sh7.LIZ("BubbleManager.tryShowBubble, notShow, b: widget not bound or not showing");
                return;
            }
            SH7.LIZIZ++;
            if (FI7.LJFF) {
                sh7.LIZ("BubbleManager.tryShowBubble, notShow, b: inAppPushIsShow");
            } else if (!SH7.LIZJ || !SH7.LIZLLL) {
                Iterator<SHY> it = SH7.LIZ.iterator();
                while (it.hasNext()) {
                    SHY next = it.next();
                    if (next.LIZ() == LIZ.LIZJ() && !(next instanceof SHD)) {
                        if (next.LIZ()) {
                            if (!SH7.LIZLLL && next.LIZ(LIZ, SH7.LIZIZ)) {
                                SH7.LIZLLL = true;
                                return;
                            }
                        } else if (!SH7.LIZJ && next.LIZ(LIZ, SH7.LIZIZ)) {
                            SH7.LIZJ = true;
                            return;
                        }
                    }
                }
                sh7.LIZ("BubbleManager.tryShowBubble, notShow ~~");
            } else {
                sh7.LIZ("BubbleManager.tryShowBubble, notShow, b: staticBubble and dynamic all show");
            }
        }
    }

    public /* synthetic */ SpecActPendantManager(byte b) {
        this();
    }

    public final void LIZ(int i) {
        LIZ().LIZIZ(i);
    }

    public final void LIZIZ(String str) {
        LIZ().LIZ(str);
    }

    private final boolean LIZJ(String str) {
        if (n.LIZ("ForYou", str)) {
            return true;
        }
        if (!n.LIZ("Follow", str)) {
            return false;
        }
        if (!LIZ().LIZJ()) {
            return SH6.LIZ.LJ(this.LIZ);
        }
        return true;
    }

    private final boolean LIZIZ(Aweme aweme) {
        if (C3003SHn.LIZ.LIZ(aweme)) {
            return false;
        }
        if ((aweme != null && aweme.getAwemeType() == 101) || a.LJIILJJIL().LIZ()) {
            return false;
        }
        if (LIZ().LIZJ()) {
            return true;
        }
        if (!SH6.LIZ.LJIIIZ(this.LIZ) || !SH6.LIZ.LJIIIIZZ(this.LIZ) || LIZ().LIZ(SH6.LIZ.LJII(this.LIZ))) {
            return false;
        }
        if (!LIZ().LJFF()) {
            return true;
        }
        return LIZJ(aweme);
    }

    private final boolean LIZJ(Aweme aweme) {
        if (!(aweme == null || aweme.getTextExtra() == null || aweme.getTextExtra().isEmpty())) {
            List<String> LIZLLL = SH6.LIZ.LIZLLL(this.LIZ);
            if (!LIZLLL.isEmpty()) {
                for (TextExtraStruct textExtraStruct : aweme.getTextExtra()) {
                    n.LIZIZ(textExtraStruct, "");
                    if (LIZLLL.contains(textExtraStruct.getCid())) {
                        return true;
                    }
                }
            }
        }
        return false;
    }

    public final void LIZ(C2990SHa sHa) {
        if (sHa != null) {
            HashMap hashMap = new HashMap();
            List<SHJ> list = SHF.LJIIJ.LIZ().LJI;
            ArrayList arrayList = new ArrayList();
            if (list != null && !list.isEmpty()) {
                for (SHJ next : list) {
                    if (next.LJ == 7 || next.LJ == 8 || next.LJ == 9) {
                        arrayList.add(next);
                    } else {
                        hashMap.put(Integer.valueOf(next.LJ), next);
                    }
                }
            }
            SH7.LJFF.LIZ((HashMap<Integer, SHJ>) hashMap, (List<SHJ>) arrayList);
        }
    }

    public final void LIZ(Aweme aweme) {
        int i;
        SHG shg;
        SHG shg2;
        String str;
        if (this.LIZ != null && LIZ().LIZ()) {
            if (SHW.LIZ.LIZ() || SHW.LIZ.LIZIZ()) {
                this.LJFF = aweme;
                boolean LIZJ = LIZJ(aweme);
                if (LIZJ && LIZJ(this.LJI)) {
                    2UX r2 = new 2UX();
                    if (this.LJFF == null) {
                        str = "";
                    } else {
                        Aweme aweme2 = this.LJFF;
                        if (aweme2 != null) {
                            str = aweme2.getAid();
                        } else {
                            str = null;
                        }
                    }
                    r2.LIZ("group_id", str);
                    2nK.LIZ("widget_time_tracker_show_tiktok_bonus", r2.LIZ);
                }
                if (LIZJ(this.LJI)) {
                    LIZ().LIZ(LIZIZ(aweme), LIZJ);
                    if (LIZ().LIZ() && LIZ().LJIIJ() && !LIZ().LIZJ()) {
                        SHE LIZ = LIZ();
                        String LJI = SH6.LIZ.LJI(this.LIZ);
                        C2990SHa sHa = this.LIZ;
                        boolean z = false;
                        if (sHa == null || (shg2 = sHa.LIZ) == null) {
                            i = 0;
                        } else {
                            i = shg2.LJIIJ;
                        }
                        C2990SHa sHa2 = this.LIZ;
                        if (!(sHa2 == null || (shg = sHa2.LIZ) == null)) {
                            z = shg.LJIIIZ;
                        }
                        LIZ.LIZ(LJI, i, z);
                    }
                } else if (!LIZ().LIZJ()) {
                    LIZ().LJII();
                } else {
                    LIZ().LJIIIZ();
                }
            }
        }
    }

    /* JADX WARNING: Code restructure failed: missing block: B:54:0x012b, code lost:
        if (r0.length() == 0) goto L_0x012d;
     */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public final void onClick(android.view.View r20) {
        /*
            r19 = this;
            r5 = r19
            if (r20 != 0) goto L_0x0005
            return
        L_0x0005:
            X.SHE r0 = r19.LIZ()
            boolean r0 = r0.LIZJ()
            if (r0 == 0) goto L_0x00c0
            java.lang.String r12 = "tracker"
        L_0x0011:
            X.SGU r0 = X.C2988SGy.LIZLLL
            r0.LIZ()
            X.SHc r0 = X.SH5.LJIIIIZZ
            X.SH5 r0 = r0.LIZ()
            java.lang.Boolean r1 = r0.LJ
            r4 = 1
            java.lang.Boolean r0 = java.lang.Boolean.valueOf(r4)
            boolean r13 = kotlin.h.b.n.LIZ(r1, r0)
            com.ss.android.ugc.aweme.feed.model.Aweme r0 = r5.LJFF
            java.lang.String r1 = ""
            if (r0 == 0) goto L_0x00bd
            com.ss.android.ugc.aweme.feed.model.Aweme r0 = r5.LJFF
            if (r0 != 0) goto L_0x0034
            kotlin.h.b.n.LIZIZ()
        L_0x0034:
            java.lang.String r14 = r0.getAid()
        L_0x0038:
            java.lang.String r0 = r5.LJI
            java.lang.String r3 = "ForYou"
            boolean r0 = kotlin.h.b.n.LIZ(r0, r3)
            java.lang.String r2 = "homepage_hot"
            java.lang.String r9 = "homepage_follow"
            if (r0 == 0) goto L_0x00ba
            r18 = r2
        L_0x0048:
            int r6 = r20.getId()
            r0 = 2131367481(0x7f0a1639, float:1.8354885E38)
            if (r6 != r0) goto L_0x0060
            X.SH7 r7 = X.SH7.LJFF
            X.SHE r0 = r19.LIZ()
            X.SHJ r6 = r0.LJIIJJI()
            java.lang.String r0 = "ok"
            r7.LIZ((X.SHJ) r6, (java.lang.String) r0)
        L_0x0060:
            X.SGo r10 = X.C2978SGo.LIZ
            X.SGU r0 = X.C2988SGy.LIZLLL
            r0.LIZ()
            X.SHc r0 = X.SH5.LJIIIIZZ
            X.SH5 r0 = r0.LIZ()
            boolean r0 = r0.LJII()
            r6 = 0
            if (r0 != 0) goto L_0x007e
            X.SHb r0 = X.C2989SGz.LJIIL
            X.SGz r0 = r0.LIZ()
            boolean r0 = r0.LJI
            if (r0 == 0) goto L_0x00b7
        L_0x007e:
            java.lang.String r11 = "ongoing"
        L_0x0080:
            kotlin.h.b.n.LIZIZ(r14, r1)
            com.ss.android.ugc.aweme.feed.model.Aweme r0 = r5.LJFF
            boolean r15 = r5.LIZJ((com.ss.android.ugc.aweme.feed.model.Aweme) r0)
            X.SHa r0 = r5.LIZ
            java.lang.String r16 = "widget"
            r17 = r0
            r10.LIZ(r11, r12, r13, r14, r15, r16, r17, r18)
            X.SHE r0 = r19.LIZ()
            boolean r0 = r0.LIZJ()
            if (r0 == 0) goto L_0x00b4
            java.lang.String r7 = "CLICK_DYNAMIC_PENDANT"
        L_0x009e:
            java.util.ArrayList<X.SHY> r0 = X.SH7.LIZ
            java.util.Iterator r1 = r0.iterator()
        L_0x00a4:
            boolean r0 = r1.hasNext()
            if (r0 == 0) goto L_0x00d2
            java.lang.Object r0 = r1.next()
            X.SHY r0 = (X.SHY) r0
            r0.LIZ((java.lang.String) r7)
            goto L_0x00a4
        L_0x00b4:
            java.lang.String r7 = "CLICK_STATIC_PENDANT"
            goto L_0x009e
        L_0x00b7:
            java.lang.String r11 = "finished"
            goto L_0x0080
        L_0x00ba:
            r18 = r9
            goto L_0x0048
        L_0x00bd:
            r14 = r1
            goto L_0x0038
        L_0x00c0:
            X.SHE r0 = r19.LIZ()
            boolean r0 = r0.LIZLLL()
            if (r0 == 0) goto L_0x00ce
            java.lang.String r12 = "folded_non_tracker"
            goto L_0x0011
        L_0x00ce:
            java.lang.String r12 = "non_tracker"
            goto L_0x0011
        L_0x00d2:
            boolean r0 = r5.LIZIZ
            java.lang.String r7 = "enter_from"
            if (r0 == 0) goto L_0x01a6
            X.SGU r0 = X.C2988SGy.LIZLLL
            r0.LIZ()
            X.SHc r0 = X.SH5.LJIIIIZZ
            X.SH5 r0 = r0.LIZ()
            java.lang.Boolean r1 = r0.LIZLLL
            java.lang.Boolean r0 = java.lang.Boolean.valueOf(r4)
            boolean r0 = kotlin.h.b.n.LIZ(r1, r0)
            if (r0 == 0) goto L_0x01a2
            java.lang.String r8 = "floating_badge_selected"
        L_0x00f1:
            X.SHE r0 = r19.LIZ()
            boolean r0 = r0.LIZJ()
            if (r0 == 0) goto L_0x0198
            X.SH6 r1 = X.SH6.LIZ
            X.SHa r0 = r5.LIZ
            java.lang.String r0 = r1.LIZJ(r0)
            boolean r0 = android.text.TextUtils.isEmpty(r0)
            if (r0 != 0) goto L_0x0198
            X.SH6 r1 = X.SH6.LIZ
            X.SHa r0 = r5.LIZ
            java.lang.String r1 = r1.LIZJ(r0)
        L_0x0111:
            X.FKx r0 = X.FKx.LIZ
            java.lang.String r1 = r0.LIZ(r1, r7, r8)
        L_0x0117:
            boolean r0 = android.text.TextUtils.isEmpty(r1)
            if (r0 != 0) goto L_0x014a
            android.net.Uri r1 = android.net.Uri.parse(r1)
            java.lang.String r0 = r1.getQueryParameter(r7)
            if (r0 == 0) goto L_0x012d
            int r0 = r0.length()
            if (r0 != 0) goto L_0x013d
        L_0x012d:
            android.net.Uri$Builder r1 = r1.buildUpon()
            java.lang.String r0 = r5.LJI
            boolean r0 = kotlin.h.b.n.LIZ(r0, r3)
            if (r0 == 0) goto L_0x0196
        L_0x0139:
            android.net.Uri$Builder r1 = r1.appendQueryParameter(r7, r2)
        L_0x013d:
            java.lang.String r2 = r1.toString()
            X.FKx r1 = X.FKx.LIZ
            android.content.Context r0 = r19.LJIIIZ()
            r1.LIZ(r0, r2)
        L_0x014a:
            X.SGU r0 = X.C2988SGy.LIZLLL
            r0.LIZ()
            X.SHc r0 = X.SH5.LJIIIIZZ
            X.SH5 r2 = r0.LIZ()
            X.SHI r0 = r2.LIZ
            if (r0 == 0) goto L_0x0195
            com.bytedance.keva.Keva r3 = r2.LIZLLL()
            X.8bz r1 = X.8bz.LIZ
            java.lang.String r0 = "new_pendant_click_time"
            java.lang.String r1 = r1.LIZ(r0)
            X.SFc r0 = X.C2940SFc.LIZ
            int r0 = r0.LIZ()
            r3.storeInt(r1, r0)
            boolean r0 = r2.LJII()
            if (r0 != 0) goto L_0x0195
            java.lang.Boolean r1 = r2.LJ
            java.lang.Boolean r0 = java.lang.Boolean.valueOf(r4)
            boolean r0 = kotlin.h.b.n.LIZ(r1, r0)
            if (r0 == 0) goto L_0x0195
            java.lang.Boolean r1 = r2.LIZLLL
            java.lang.Boolean r0 = java.lang.Boolean.valueOf(r6)
            boolean r0 = kotlin.h.b.n.LIZ(r1, r0)
            if (r0 == 0) goto L_0x0195
            r2.LIZ((boolean) r4, (boolean) r6)
            java.lang.Boolean r0 = java.lang.Boolean.valueOf(r4)
            r2.LIZLLL = r0
        L_0x0195:
            return
        L_0x0196:
            r2 = r9
            goto L_0x0139
        L_0x0198:
            X.SH6 r1 = X.SH6.LIZ
            X.SHa r0 = r5.LIZ
            java.lang.String r1 = r1.LIZIZ(r0)
            goto L_0x0111
        L_0x01a2:
            java.lang.String r8 = "floating_badge"
            goto L_0x00f1
        L_0x01a6:
            X.SH6 r1 = X.SH6.LIZ
            X.SHa r0 = r5.LIZ
            java.lang.String r1 = r1.LIZIZ(r0)
            goto L_0x0117
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.specact.touchpoints.pendant.SpecActPendantManager.onClick(android.view.View):void");
    }

    public final void LIZ(String str) {
        M12.LIZ(str);
        if (this.LIZ != null) {
            M12.LIZ(str);
            this.LJI = str;
            if (!LIZ().LIZ()) {
                return;
            }
            if (!LIZJ(str)) {
                if (!LIZ().LIZJ()) {
                    LIZ().LJII();
                } else {
                    LIZ().LJIIIZ();
                }
            } else if (!LIZIZ(this.LJFF)) {
            } else {
                if (!LIZ().LIZJ()) {
                    LIZ().LJI();
                } else {
                    LIZ().LJIIIIZZ();
                }
            }
        }
    }

    public final void LIZ(int i, int i2) {
        LIZ().LIZ(i, i2);
    }

    public final void LIZ(int i, String str) {
        SHJ shj;
        int i2;
        M12.LIZ(str);
        SHE LIZ = LIZ();
        M12.LIZ(str);
        if (LIZ != null && LIZ.LIZ() && LIZ.LJIIJ()) {
            if (i == 7 || i == 9) {
                Iterator<SHJ> it = SH7.LJ.iterator();
                while (it.hasNext()) {
                    shj = it.next();
                    if (shj.LJ == i) {
                    }
                }
                return;
            } else if (i == 8) {
                Iterator<SHJ> it2 = SH7.LJ.iterator();
                while (it2.hasNext()) {
                    shj = it2.next();
                    if (shj.LJ != i || !n.LIZ(shj.LJIILJJIL, str)) {
                    }
                }
                return;
            } else {
                return;
            }
            if (shj.LJ != 9) {
                if (LIZ.LIZJ()) {
                    LIZ.LIZ(shj.LJII, shj);
                }
            } else if (!LIZ.LIZJ() && !LIZ.LIZLLL()) {
                LIZ.LIZIZ(shj.LJII, "watch_video", shj);
            }
            if (36a.LIZ(shj.LIZIZ)) {
                C2978SGo sGo = C2978SGo.LIZ;
                int i3 = shj.LIZ;
                String str2 = shj.LIZIZ;
                Integer num = shj.LIZJ;
                if (num != null) {
                    i2 = num.intValue();
                } else {
                    i2 = -1;
                }
                String str3 = shj.LIZLLL;
                if (str3 == null) {
                    str3 = "";
                }
                sGo.LIZ(i3, str2, i2, str3, shj.LJ);
            }
        }
    }

    public final void LIZ(boolean z, boolean z2, int i, LsC<? super Integer, 2Pr> lsC) {
        LIZ().LIZ(z, z2, i, lsC);
    }

    /* JADX WARNING: Code restructure failed: missing block: B:27:0x00fb, code lost:
        if (r0 == null) goto L_0x00fd;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:30:0x0104, code lost:
        if (r0.length() > 0) goto L_0x0106;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:71:0x0195, code lost:
        if (r3 != null) goto L_0x0197;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:72:0x0197, code lost:
        r0 = r3.LIZIZ;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:73:0x0199, code lost:
        if (r0 == null) goto L_0x015c;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:75:0x019d, code lost:
        if (r0.LIZIZ == null) goto L_0x015c;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:76:0x019f, code lost:
        r0 = r3.LIZIZ;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:77:0x01a1, code lost:
        if (r0 == null) goto L_0x01b2;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:78:0x01a3, code lost:
        r0 = r0.LIZIZ;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:79:0x01a5, code lost:
        if (r0 != null) goto L_0x01aa;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:80:0x01a7, code lost:
        kotlin.h.b.n.LIZIZ();
     */
    /* JADX WARNING: Code restructure failed: missing block: B:82:0x01ae, code lost:
        if (r0.length() <= 0) goto L_0x015c;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:83:0x01b2, code lost:
        r0 = null;
     */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public final void LIZ(boolean r11, java.lang.String r12, int r13, java.lang.String r14) {
        /*
            r10 = this;
            X.M12.LIZ(r12, r14)
            X.SHE r0 = r10.LIZ()
            boolean r0 = r0.LIZ()
            if (r0 != 0) goto L_0x000e
            return
        L_0x000e:
            X.SHE r4 = r10.LIZ()
            r0 = 0
            if (r11 == 0) goto L_0x01be
            boolean r3 = r10.LIZIZ
        L_0x0017:
            X.SH6 r1 = X.SH6.LIZ
            X.SHa r0 = r10.LIZ
            java.lang.String r2 = r1.LJFF(r0)
            X.SH6 r1 = X.SH6.LIZ
            X.SHa r0 = r10.LIZ
            java.lang.String r0 = r1.LJI(r0)
            r4.LIZ((boolean) r3, (java.lang.String) r2, (java.lang.String) r0)
            if (r11 != 0) goto L_0x004e
            X.SH6 r1 = X.SH6.LIZ
            X.SHa r0 = r10.LIZ
            boolean r2 = r1.LJIIIZ(r0)
            X.SH6 r1 = X.SH6.LIZ
            X.SHa r0 = r10.LIZ
            boolean r1 = r1.LJIIIIZZ(r0)
            X.SHE r0 = r10.LIZ()
            r0.LIZIZ(r2, r1)
            X.RXI r1 = X.RXM.LIZ
            X.9EH r0 = X.9EH.LJJIFFI
            android.content.Context r0 = r0.LIZ()
            r1.LIZ(r0)
        L_0x004e:
            X.SHE r0 = r10.LIZ()
            boolean r0 = r0.LJIIJ()
            if (r0 == 0) goto L_0x0177
            X.M12.LIZ(r12, r14)
            com.ss.android.ugc.aweme.feed.model.Aweme r5 = r10.LJFF
            X.SHa r3 = r10.LIZ
            X.SH6 r1 = X.SH6.LIZ
            X.SHa r0 = r10.LIZ
            java.lang.String r8 = r1.LIZ(r0)
            X.SH6 r1 = X.SH6.LIZ
            X.SHa r0 = r10.LIZ
            java.lang.String r1 = r1.LIZ((X.C2990SHa) r0, (java.lang.String) r12)
            boolean r4 = r10.LIZJ
            java.lang.String r2 = r10.LJI
            java.lang.String r0 = "ForYou"
            boolean r0 = kotlin.h.b.n.LIZ(r2, r0)
            if (r0 == 0) goto L_0x01ba
            java.lang.String r6 = "homepage_hot"
        L_0x007d:
            java.lang.String r7 = ""
            if (r5 == 0) goto L_0x01b7
            java.lang.String r5 = r5.getGroupId()
        L_0x0085:
            X.M12.LIZ(r12, r14, r8, r1, r6)
            X.2UX r2 = new X.2UX
            r2.<init>()
            java.lang.String r0 = "widget_name"
            r2.LIZ(r0, r12)
            X.SHW r0 = X.SHW.LIZ
            java.lang.String r9 = r0.LJ()
            java.lang.String r0 = "page"
            r2.LIZ(r0, r9)
            java.lang.String r0 = "is_selected"
            r2.LIZ(r0, r13)
            java.lang.String r0 = "position"
            r2.LIZ(r0, r14)
            java.lang.String r0 = "event_keyword"
            r2.LIZ(r0, r8)
            java.lang.String r0 = "activity_name"
            r2.LIZ(r0, r1)
            X.8bz r0 = X.8bz.LIZ
            boolean r0 = r0.LIZ()
            java.lang.Boolean r1 = java.lang.Boolean.valueOf(r0)
            java.lang.String r0 = "is_login"
            r2.LIZ(r0, r1)
            java.lang.String r1 = X.S9B.LIZ()
            kotlin.h.b.n.LIZIZ(r1, r7)
            java.lang.String r0 = "null cannot be cast to non-null type java.lang.String"
            java.util.Objects.requireNonNull(r1, r0)
            java.lang.String r1 = r1.toLowerCase()
            kotlin.h.b.n.LIZIZ(r1, r7)
            java.lang.String r0 = "region"
            r2.LIZ(r0, r1)
            java.lang.String r0 = "enter_from"
            r2.LIZ(r0, r6)
            java.lang.String r0 = "group_id"
            r2.LIZ(r0, r5)
            java.util.Map r1 = r2.LIZ
            java.lang.String r0 = "widget_time_tracker_show"
            X.2nK.LIZ(r0, r1)
            r5 = 0
            if (r3 == 0) goto L_0x01b4
            X.SHG r0 = r3.LIZ
            if (r0 == 0) goto L_0x01b4
            java.lang.String r0 = r0.LIZIZ
        L_0x00f2:
            r2 = 1
            if (r0 == 0) goto L_0x0195
            X.SHG r0 = r3.LIZ
            if (r0 == 0) goto L_0x0192
            java.lang.String r0 = r0.LIZIZ
            if (r0 != 0) goto L_0x0100
        L_0x00fd:
            kotlin.h.b.n.LIZIZ()
        L_0x0100:
            int r0 = r0.length()
            if (r0 <= 0) goto L_0x0197
        L_0x0106:
            X.2UX r6 = new X.2UX
            r6.<init>()
            java.lang.String r7 = "non_tracker"
            boolean r0 = kotlin.h.b.n.LIZ(r12, r7)
            if (r0 == 0) goto L_0x018b
            X.SHG r0 = r3.LIZ
            if (r0 == 0) goto L_0x0190
        L_0x0117:
            int r0 = r0.LIZ
            java.lang.Integer r1 = java.lang.Integer.valueOf(r0)
        L_0x011d:
            java.lang.String r0 = "touch_point_id"
            r6.LIZ(r0, r1)
            boolean r0 = kotlin.h.b.n.LIZ(r12, r7)
            if (r0 == 0) goto L_0x0184
            X.SHG r0 = r3.LIZ
            if (r0 == 0) goto L_0x0189
        L_0x012c:
            java.lang.String r1 = r0.LIZIZ
        L_0x012e:
            java.lang.String r0 = "touch_point_name"
            r6.LIZ(r0, r1)
            boolean r0 = kotlin.h.b.n.LIZ(r12, r7)
            if (r0 == 0) goto L_0x017d
            X.SHG r0 = r3.LIZ
            if (r0 == 0) goto L_0x0182
        L_0x013d:
            java.lang.Integer r1 = r0.LIZJ
        L_0x013f:
            java.lang.String r0 = "launch_plan_id"
            r6.LIZ(r0, r1)
            boolean r0 = kotlin.h.b.n.LIZ(r12, r7)
            if (r0 == 0) goto L_0x0178
            X.SHG r0 = r3.LIZ
            if (r0 == 0) goto L_0x0150
        L_0x014e:
            java.lang.String r5 = r0.LIZLLL
        L_0x0150:
            java.lang.String r0 = "touch_point_ab_versions"
            r6.LIZ(r0, r5)
            java.util.Map r1 = r6.LIZ
            java.lang.String r0 = "touch_point_show"
            X.2nK.LIZ(r0, r1)
        L_0x015c:
            if (r4 == 0) goto L_0x0177
            X.2UX r1 = new X.2UX
            r1.<init>()
            if (r3 == 0) goto L_0x016b
            X.SHG r0 = r3.LIZ
            if (r0 == 0) goto L_0x016b
            int r2 = r0.LIZ
        L_0x016b:
            java.lang.String r0 = "point_id"
            r1.LIZ(r0, r2)
            java.util.Map r1 = r1.LIZ
            java.lang.String r0 = "touch_point_is_show"
            X.2nK.LIZ(r0, r1)
        L_0x0177:
            return
        L_0x0178:
            X.SHK r0 = r3.LIZIZ
            if (r0 == 0) goto L_0x0150
            goto L_0x014e
        L_0x017d:
            X.SHK r0 = r3.LIZIZ
            if (r0 == 0) goto L_0x0182
            goto L_0x013d
        L_0x0182:
            r1 = r5
            goto L_0x013f
        L_0x0184:
            X.SHK r0 = r3.LIZIZ
            if (r0 == 0) goto L_0x0189
            goto L_0x012c
        L_0x0189:
            r1 = r5
            goto L_0x012e
        L_0x018b:
            X.SHK r0 = r3.LIZIZ
            if (r0 == 0) goto L_0x0190
            goto L_0x0117
        L_0x0190:
            r1 = r5
            goto L_0x011d
        L_0x0192:
            r0 = r5
            goto L_0x00fd
        L_0x0195:
            if (r3 == 0) goto L_0x015c
        L_0x0197:
            X.SHK r0 = r3.LIZIZ
            if (r0 == 0) goto L_0x015c
            java.lang.String r0 = r0.LIZIZ
            if (r0 == 0) goto L_0x015c
            X.SHK r0 = r3.LIZIZ
            if (r0 == 0) goto L_0x01b2
            java.lang.String r0 = r0.LIZIZ
            if (r0 != 0) goto L_0x01aa
        L_0x01a7:
            kotlin.h.b.n.LIZIZ()
        L_0x01aa:
            int r0 = r0.length()
            if (r0 <= 0) goto L_0x015c
            goto L_0x0106
        L_0x01b2:
            r0 = r5
            goto L_0x01a7
        L_0x01b4:
            r0 = r5
            goto L_0x00f2
        L_0x01b7:
            r5 = r7
            goto L_0x0085
        L_0x01ba:
            java.lang.String r6 = "homepage_follow"
            goto L_0x007d
        L_0x01be:
            r3 = 0
            goto L_0x0017
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.specact.touchpoints.pendant.SpecActPendantManager.LIZ(boolean, java.lang.String, int, java.lang.String):void");
    }
}
