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

import X.0CH;
import X.0CM;
import X.1Bn;
import X.7he;
import X.7xA;
import X.8eL;
import X.9DY;
import X.9Y3;
import X.AnonymousClass2UX;
import X.AnonymousClass2VL;
import X.AnonymousClass2WF;
import X.AnonymousClass2WG;
import X.AnonymousClass2WI;
import X.AnonymousClass2WK;
import X.AnonymousClass2WL;
import X.AnonymousClass2WQ;
import X.AnonymousClass2WR;
import X.AnonymousClass2WT;
import X.AnonymousClass2WU;
import X.AnonymousClass2X0;
import X.AnonymousClass2X1;
import X.AnonymousClass2X5;
import X.AnonymousClass2X6;
import X.AnonymousClass2X7;
import X.AnonymousClass2X8;
import X.AnonymousClass2X9;
import X.AnonymousClass2XA;
import X.AnonymousClass2XB;
import X.AnonymousClass2XD;
import X.AnonymousClass2XE;
import X.AnonymousClass2XI;
import X.AnonymousClass2XP;
import X.AnonymousClass2Y3;
import X.AnonymousClass2YP;
import X.AnonymousClass2cN;
import X.C03482Rm;
import X.C04892Wx;
import X.C04902Wy;
import X.C04912Wz;
import X.C12422nK;
import X.C15482sG;
import X.Crj;
import X.JMA;
import X.LWw;
import X.LeS;
import X.Lea;
import X.Lel;
import X.Lnj;
import X.M12;
import X.PUw;
import X.Pdl;
import X.PgU;
import android.content.Context;
import android.os.Handler;
import android.os.Looper;
import android.text.TextUtils;
import com.bytedance.covode.number.Covode;
import com.bytedance.frameworks.apm.trace.MethodCollector;
import com.bytedance.ies.abmock.ClientExpManager;
import com.bytedance.ies.ugc.aweme.network.RetrofitFactory;
import com.bytedance.keva.Keva;
import com.google.gson.Gson;
import com.google.gson.c.d;
import com.ss.android.ugc.aweme.journey.IPluginService;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicBoolean;
import kotlin.h.b.n;
import org.json.JSONException;

public final class PluginService implements IPluginService, AnonymousClass2XP, AnonymousClass2X9 {
    public static final AnonymousClass2XD Companion = new AnonymousClass2XD((byte) 0);
    public final PluginApi api;
    public final AtomicBoolean didLoad = new AtomicBoolean(false);
    public AnonymousClass2cN disposable;
    public final Crj eventInterceptor$delegate = 7he.LIZ(new AnonymousClass2X5(this));
    public final Crj firstInstallVersion$delegate = 7he.LIZ(new C04902Wy(this));
    public final Keva keva = Keva.getRepo("plugin_repo");
    public Map<Long, AnonymousClass2WF> pluginMap = LWw.LIZ();
    public final 1Bn<Map<Long, AnonymousClass2WF>> plugins = new 1Bn<>();
    public RealtimeFeedbackInterceptor realtimeFeedbackInterceptor;
    public Map<Integer, AnonymousClass2X1> stateMachineMap = new HashMap();

    public interface PluginApi {
        static {
            Covode.recordClassIndex(97268);
        }

        @JMA(LIZ = "tiktok/v1/plugin/config/")
        PgU<C03482Rm> getPluginConfig(@PUw(LIZ = "has_previous_did") Boolean bool, @PUw(LIZ = "is_new_signup_user") Boolean bool2, @PUw(LIZ = "is_multiaccount_user") Boolean bool3, @PUw(LIZ = "first_install_version") String str, @PUw(LIZ = "cached_plugins") String str2, @PUw(LIZ = "cached_state_machines") String str3, @PUw(LIZ = "skip_cache") Boolean bool4, @PUw(LIZ = "client_xp_vids") String str4, @PUw(LIZ = "ssaid") String str5, @PUw(LIZ = "recommend_group") Integer num, @PUw(LIZ = "type") String str6, @PUw(LIZ = "gender_selection_ab") String str7, @PUw(LIZ = "new_user_journey_ab_groups") String str8);
    }

    static {
        Covode.recordClassIndex(97267);
    }

    private final AnonymousClass2Y3 getEventInterceptor() {
        return (AnonymousClass2Y3) this.eventInterceptor$delegate.getValue();
    }

    public final String getFirstInstallVersion() {
        return (String) this.firstInstallVersion$delegate.getValue();
    }

    public final void onComplete() {
        RealtimeFeedbackInterceptor realtimeFeedbackInterceptor2 = this.realtimeFeedbackInterceptor;
        if (realtimeFeedbackInterceptor2 != null && C12422nK.LIZ != null) {
            C12422nK.LIZ.remove(realtimeFeedbackInterceptor2);
        }
    }

    public final void tryInit() {
        if (this.didLoad.compareAndSet(false, true)) {
            Map<Long, AnonymousClass2WF> initCachedPlugins = initCachedPlugins();
            if (AnonymousClass2WG.LIZIZ.LIZ().getEnabled()) {
                C12422nK.LIZ((AnonymousClass2YP) getEventInterceptor());
                if (initCachedPlugins == null) {
                    initCachedPlugins = LWw.LIZ();
                }
                initUserSegmentation(initCachedPlugins);
            }
        }
    }

    public PluginService() {
        Object LIZ = RetrofitFactory.LIZ().LIZ(9DY.LJ).LIZ(PluginApi.class);
        n.LIZIZ(LIZ, "");
        this.api = (PluginApi) LIZ;
    }

    /* JADX WARNING: Failed to process nested try/catch */
    /* JADX WARNING: Missing exception handler attribute for start block: B:8:0x002d */
    /* JADX WARNING: Removed duplicated region for block: B:12:0x005c A[Catch:{ Exception -> 0x0074 }, LOOP:0: B:10:0x0056->B:12:0x005c, LOOP_END] */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    private final java.util.Map<java.lang.Long, X.AnonymousClass2WF> initCachedPlugins() {
        /*
            r6 = this;
            java.lang.String r3 = ""
            com.google.gson.Gson r2 = new com.google.gson.Gson
            r2.<init>()
            r5 = 0
            com.bytedance.keva.Keva r1 = r6.keva     // Catch:{ Exception -> 0x007a }
            java.lang.String r0 = "plugin_list"
            java.lang.String r1 = r1.getString(r0, r3)     // Catch:{ Exception -> 0x007a }
            boolean r0 = android.text.TextUtils.isEmpty(r1)     // Catch:{ Exception -> 0x007a }
            if (r0 == 0) goto L_0x001e
            java.util.Map r0 = X.LWw.LIZ()     // Catch:{ Exception -> 0x007a }
            r6.updatePlugins(r0)     // Catch:{ Exception -> 0x007a }
            return r5
        L_0x001e:
            X.2Wc r0 = new X.2Wc     // Catch:{ Exception -> 0x002d }
            r0.<init>()     // Catch:{ Exception -> 0x002d }
            java.lang.reflect.Type r0 = r0.type     // Catch:{ Exception -> 0x002d }
            java.lang.Object r0 = r2.LIZ(r1, r0)     // Catch:{ Exception -> 0x002d }
            java.util.Map r0 = (java.util.Map) r0     // Catch:{ Exception -> 0x002d }
            r5 = r0
            goto L_0x0074
        L_0x002d:
            X.2Wd r0 = new X.2Wd     // Catch:{ Exception -> 0x0074 }
            r0.<init>()     // Catch:{ Exception -> 0x0074 }
            java.lang.reflect.Type r0 = r0.type     // Catch:{ Exception -> 0x0074 }
            java.lang.Object r2 = r2.LIZ(r1, r0)     // Catch:{ Exception -> 0x0074 }
            kotlin.h.b.n.LIZIZ(r2, r3)     // Catch:{ Exception -> 0x0074 }
            java.util.List r2 = (java.util.List) r2     // Catch:{ Exception -> 0x0074 }
            r0 = 10
            int r0 = X.9HM.LIZ(r2, r0)     // Catch:{ Exception -> 0x0074 }
            int r1 = X.LWx.LIZ(r0)     // Catch:{ Exception -> 0x0074 }
            r0 = 16
            int r0 = X.Qx3.LIZJ(r1, r0)     // Catch:{ Exception -> 0x0074 }
            java.util.LinkedHashMap r4 = new java.util.LinkedHashMap     // Catch:{ Exception -> 0x0074 }
            r4.<init>(r0)     // Catch:{ Exception -> 0x0074 }
            java.util.Iterator r3 = r2.iterator()     // Catch:{ Exception -> 0x0074 }
        L_0x0056:
            boolean r0 = r3.hasNext()     // Catch:{ Exception -> 0x0074 }
            if (r0 == 0) goto L_0x0073
            java.lang.Object r2 = r3.next()     // Catch:{ Exception -> 0x0074 }
            r0 = r2
            X.2WF r0 = (X.AnonymousClass2WF) r0     // Catch:{ Exception -> 0x0074 }
            int r1 = r0.LIZ     // Catch:{ Exception -> 0x0074 }
            java.lang.Integer r0 = r0.LJ     // Catch:{ Exception -> 0x0074 }
            long r0 = r6.getPluginIdentifier(r1, r0)     // Catch:{ Exception -> 0x0074 }
            java.lang.Long r0 = java.lang.Long.valueOf(r0)     // Catch:{ Exception -> 0x0074 }
            r4.put(r0, r2)     // Catch:{ Exception -> 0x0074 }
            goto L_0x0056
        L_0x0073:
            r5 = r4
        L_0x0074:
            if (r5 == 0) goto L_0x007e
            r6.updatePlugins(r5)     // Catch:{ Exception -> 0x007a }
            goto L_0x007e
        L_0x007a:
            r0 = move-exception
            r6.onParseException(r0)
        L_0x007e:
            return r5
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.plugin.PluginService.initCachedPlugins():java.util.Map");
    }

    public final void initRealtimeFeedbackInterceptor() {
        RealtimeFeedbackInterceptor realtimeFeedbackInterceptor2;
        if (!AnonymousClass2X0.LIZJ.LIZ().booleanValue() || AnonymousClass2X0.LIZ.getBoolean("new_user_over_hundred_videos", false) || AnonymousClass2X0.LIZ.getBoolean("kill_switch", false) || 9Y3.LIZ().LIZ("new_user_realtime_feedback", ClientExpManager.new_user_realtime_feedback()) != AnonymousClass2X0.LIZIZ) {
            realtimeFeedbackInterceptor2 = null;
        } else {
            realtimeFeedbackInterceptor2 = AnonymousClass2XE.LIZ;
        }
        this.realtimeFeedbackInterceptor = realtimeFeedbackInterceptor2;
        if (realtimeFeedbackInterceptor2 != null) {
            M12.LIZ(this);
            realtimeFeedbackInterceptor2.LIZJ = this;
            C12422nK.LIZ((AnonymousClass2YP) realtimeFeedbackInterceptor2);
        }
    }

    private final void updatePlugins(Map<Long, AnonymousClass2WF> map) {
        this.pluginMap = map;
        this.plugins.postValue(map);
    }

    private final String getConditionalStateMachineKey(int i) {
        return "did_user_segment__".concat(String.valueOf(i));
    }

    private final String getUserKey(AnonymousClass2X6 r3) {
        return "new_user_" + r3.LIZ;
    }

    public final void onUpdateState(AnonymousClass2X1 r4) {
        M12.LIZ(r4);
        try {
            this.keva.storeString(getConditionalStateMachineKey(r4.LIZ), new Gson().LIZIZ(r4));
        } catch (Exception e) {
            onParseException(e);
        }
    }

    private final void onParseException(Exception exc) {
        if ((exc instanceof JSONException) || (exc instanceof d)) {
            AnonymousClass2UX r2 = new AnonymousClass2UX();
            String localizedMessage = exc.getLocalizedMessage();
            if (localizedMessage == null) {
                localizedMessage = "";
            }
            r2.LIZ("fail_info", localizedMessage);
            C12422nK.LIZ("ct_json_exception", r2.LIZ);
        } else if (!(exc instanceof NullPointerException)) {
            throw exc;
        }
    }

    public final Boolean cacheUserAndCheckIfNewSignup(AnonymousClass2X6 r4) {
        if (r4 == null) {
            this.keva.storeString("prev_user", "");
            return null;
        }
        this.keva.storeString("prev_user", r4.LIZ);
        String userKey = getUserKey(r4);
        if (this.keva.contains(userKey)) {
            return Boolean.valueOf(this.keva.getBoolean(userKey, false));
        }
        this.keva.storeBoolean(userKey, r4.LIZIZ);
        return Boolean.valueOf(r4.LIZIZ);
    }

    public static IPluginService createIPluginServicebyMonsterPlugin(boolean z) {
        MethodCollector.i(2482);
        IPluginService iPluginService = (IPluginService) Lnj.LIZ(IPluginService.class, z);
        if (iPluginService != null) {
            MethodCollector.o(2482);
            return iPluginService;
        }
        Object LIZIZ = Lnj.LIZIZ(IPluginService.class, z);
        if (LIZIZ != null) {
            IPluginService iPluginService2 = (IPluginService) LIZIZ;
            MethodCollector.o(2482);
            return iPluginService2;
        }
        if (Lnj.O == null) {
            synchronized (IPluginService.class) {
                try {
                    if (Lnj.O == null) {
                        Lnj.O = new PluginService();
                    }
                } catch (Throwable th) {
                    MethodCollector.o(2482);
                    throw th;
                }
            }
        }
        PluginService pluginService = (PluginService) Lnj.O;
        MethodCollector.o(2482);
        return pluginService;
    }

    private final Map<Long, AnonymousClass2WF> getMergedList(List<AnonymousClass2WF> list) {
        Map<Long, AnonymousClass2WF> map = this.pluginMap;
        LinkedHashMap linkedHashMap = new LinkedHashMap();
        linkedHashMap.putAll(map);
        for (AnonymousClass2WF next : list) {
            long pluginIdentifier = getPluginIdentifier(next.LIZ, next.LJ);
            AnonymousClass2WF r0 = map.get(Long.valueOf(pluginIdentifier));
            if (r0 == null || next.LIZLLL > r0.LIZLLL) {
                next.LJI = System.currentTimeMillis();
                linkedHashMap.put(Long.valueOf(pluginIdentifier), next);
            }
        }
        return linkedHashMap;
    }

    private final void initUserSegmentation(Map<Long, AnonymousClass2WF> map) {
        Integer num;
        C04912Wz r0;
        Gson gson = new Gson();
        try {
            String string = this.keva.getString("user_segment_list", "");
            if (!TextUtils.isEmpty(string)) {
                Object LIZ = gson.LIZ(string, new AnonymousClass2X7().type);
                n.LIZIZ(LIZ, "");
                boolean z = false;
                for (Number intValue : (Iterable) LIZ) {
                    int intValue2 = intValue.intValue();
                    try {
                        String string2 = this.keva.getString(getConditionalStateMachineKey(intValue2), "");
                        if (!TextUtils.isEmpty(string)) {
                            Type type = new AnonymousClass2X8().type;
                            Map<Integer, AnonymousClass2X1> map2 = this.stateMachineMap;
                            Integer valueOf = Integer.valueOf(intValue2);
                            Object LIZ2 = gson.LIZ(string2, type);
                            n.LIZIZ(LIZ2, "");
                            map2.put(valueOf, LIZ2);
                        }
                    } catch (Exception e) {
                        onParseException(e);
                    }
                    z = true;
                }
                if (z) {
                    Keva keva2 = this.keva;
                    Object[] array = this.stateMachineMap.keySet().toArray(new Integer[0]);
                    if (array != null) {
                        keva2.storeString("user_segment_list", gson.LIZIZ(array));
                    } else {
                        throw new NullPointerException("null cannot be cast to non-null type kotlin.Array<T>");
                    }
                }
            }
        } catch (Exception e2) {
            onParseException(e2);
        }
        LinkedHashMap linkedHashMap = new LinkedHashMap();
        Collection<AnonymousClass2WF> values = map.values();
        ArrayList<AnonymousClass2WF> arrayList = new ArrayList<>();
        for (T next : values) {
            AnonymousClass2WF r2 = (AnonymousClass2WF) next;
            if (r2.LIZIZ.LIZ == null) {
                C04912Wz r02 = r2.LIZIZ.LIZIZ;
                C04892Wx r1 = null;
                if (r02 != null) {
                    r1 = r02.LIZ;
                }
                if (!(r1 != C04892Wx.ConditionalShow || (r0 = r2.LIZIZ.LIZIZ) == null || r0.LIZIZ == null)) {
                    arrayList.add(next);
                }
            }
        }
        for (AnonymousClass2WF r22 : arrayList) {
            long pluginIdentifier = getPluginIdentifier(r22.LIZ, r22.LJ);
            C04912Wz r03 = r22.LIZIZ.LIZIZ;
            if (!(r03 == null || (num = r03.LIZIZ) == null)) {
                int intValue3 = num.intValue();
                Integer valueOf2 = Integer.valueOf(intValue3);
                List list = (List) linkedHashMap.get(Integer.valueOf(intValue3));
                if (list != null) {
                    list.add(Long.valueOf(pluginIdentifier));
                } else {
                    list = LeS.LIZJ(new Long[]{Long.valueOf(pluginIdentifier)});
                }
                linkedHashMap.put(valueOf2, list);
            }
        }
        getEventInterceptor().LIZ(linkedHashMap, Lea.LJIIJJI(this.stateMachineMap.values()), !7xA.LIZIZ().booleanValue());
    }

    private final long getPluginIdentifier(int i, Integer num) {
        int i2;
        if (num != null) {
            i2 = num.intValue();
        } else {
            i2 = 0;
        }
        return (((long) i) * 10000000000L) + ((long) i2);
    }

    public final AnonymousClass2VL backgroundThreadObserve(AnonymousClass2WI r4, 0CM<AnonymousClass2WF> r5) {
        M12.LIZ(r4, r5);
        C15482sG r2 = new C15482sG();
        r2.element = null;
        new Handler(Looper.getMainLooper()).post(new AnonymousClass2WQ(this, r2, r4, r5));
        return new AnonymousClass2WT(this, r2);
    }

    public final AnonymousClass2VL backgroundThreadObserveAll(AnonymousClass2WI r4, 0CM<List<AnonymousClass2WF>> r5) {
        M12.LIZ(r4, r5);
        C15482sG r2 = new C15482sG();
        r2.element = null;
        new Handler(Looper.getMainLooper()).post(new AnonymousClass2WR(this, r2, r4, r5));
        return new AnonymousClass2WU(this, r2);
    }

    public final void onCompleted(AnonymousClass2X1 r7, List<Long> list) {
        C04912Wz r0;
        AnonymousClass2XB r02;
        M12.LIZ(r7, list);
        Map map = (Map) this.plugins.getValue();
        if (map == null) {
            map = LWw.LIZ();
        }
        for (Long longValue : list) {
            AnonymousClass2WF r4 = (AnonymousClass2WF) map.get(Long.valueOf(longValue.longValue()));
            if (!(r4 == null || (r0 = r4.LIZIZ.LIZIZ) == null || (r02 = r0.LIZJ) == null)) {
                int i = AnonymousClass2XA.LIZIZ[r02.ordinal()];
                if (i == 1 || i == 2) {
                    logUserSegmentActivationET(r4, r7.LIZ, true);
                    r4.LIZIZ.LIZ = true;
                }
            }
        }
        updatePlugins(map);
        try {
            this.keva.storeString("plugin_list", new Gson().LIZIZ(map));
        } catch (Exception e) {
            onParseException(e);
        }
        onUpdateState(r7);
    }

    public final void updateRepo(List<AnonymousClass2WF> list, List<AnonymousClass2X1> list2) {
        Integer num;
        C04892Wx r1;
        C04912Wz r0;
        Integer num2;
        C04912Wz r02;
        AnonymousClass2XB r03;
        M12.LIZ(list);
        Gson gson = new Gson();
        Map<Long, AnonymousClass2WF> mergedList = getMergedList(list);
        if (AnonymousClass2WG.LIZIZ.LIZ().getEnabled()) {
            ArrayList arrayList = new ArrayList();
            LinkedHashSet linkedHashSet = new LinkedHashSet();
            if (list2 != null) {
                for (AnonymousClass2X1 r8 : list2) {
                    AnonymousClass2X1 r6 = this.stateMachineMap.get(Integer.valueOf(r8.LIZ));
                    if (r6 == null) {
                        this.stateMachineMap.put(Integer.valueOf(r8.LIZ), r8);
                        arrayList.add(r8);
                        this.keva.storeString(getConditionalStateMachineKey(r8.LIZ), gson.LIZIZ(r8));
                    } else if (n.LIZ(r6.LIZLLL, true) && (!n.LIZ(r8.LJ, true))) {
                        linkedHashSet.add(Integer.valueOf(r6.LIZ));
                    } else if (n.LIZ(r6.LJ, true)) {
                        Lel lel = Lel.INSTANCE;
                        M12.LIZ(lel);
                        r6.LIZIZ = lel;
                        this.keva.storeString(getConditionalStateMachineKey(r8.LIZ), gson.LIZIZ(r8));
                    }
                }
            }
            if (arrayList.size() > 0) {
                Object[] array = this.stateMachineMap.keySet().toArray(new Integer[0]);
                Objects.requireNonNull(array, "null cannot be cast to non-null type kotlin.Array<T>");
                this.keva.storeString("user_segment_list", gson.LIZIZ(array));
            }
            for (AnonymousClass2WF next : mergedList.values()) {
                C04912Wz r04 = next.LIZIZ.LIZIZ;
                if (!(r04 == null || (num2 = r04.LIZIZ) == null)) {
                    int intValue = num2.intValue();
                    if (linkedHashSet.contains(Integer.valueOf(intValue)) && (r02 = next.LIZIZ.LIZIZ) != null && (r03 = r02.LIZJ) != null && AnonymousClass2XA.LIZ[r03.ordinal()] == 1) {
                        logUserSegmentActivationET(next, intValue, false);
                        next.LIZIZ.LIZ = true;
                    }
                }
            }
            Collection<AnonymousClass2WF> values = mergedList.values();
            ArrayList<AnonymousClass2WF> arrayList2 = new ArrayList<>();
            for (T next2 : values) {
                AnonymousClass2WF r82 = (AnonymousClass2WF) next2;
                if (r82.LIZIZ.LIZ == null) {
                    C04912Wz r05 = r82.LIZIZ.LIZIZ;
                    if (r05 != null) {
                        r1 = r05.LIZ;
                    } else {
                        r1 = null;
                    }
                    if (!(r1 != C04892Wx.ConditionalShow || (r0 = r82.LIZIZ.LIZIZ) == null || r0.LIZIZ == null)) {
                        arrayList2.add(next2);
                    }
                }
            }
            LinkedHashMap linkedHashMap = new LinkedHashMap();
            for (AnonymousClass2WF r2 : arrayList2) {
                long pluginIdentifier = getPluginIdentifier(r2.LIZ, r2.LJ);
                C04912Wz r06 = r2.LIZIZ.LIZIZ;
                if (!(r06 == null || (num = r06.LIZIZ) == null)) {
                    int intValue2 = num.intValue();
                    Integer valueOf = Integer.valueOf(intValue2);
                    List list3 = (List) linkedHashMap.get(Integer.valueOf(intValue2));
                    if (list3 != null) {
                        list3.add(Long.valueOf(pluginIdentifier));
                    } else {
                        list3 = LeS.LIZJ(new Long[]{Long.valueOf(pluginIdentifier)});
                    }
                    linkedHashMap.put(valueOf, list3);
                }
            }
            getEventInterceptor().LIZ(linkedHashMap, Lea.LJIIJJI(this.stateMachineMap.values()), true);
        }
        updatePlugins(mergedList);
        this.keva.storeString("plugin_list", gson.LIZIZ(mergedList));
    }

    public final void observe(AnonymousClass2WI r3, 0CH r4, Pdl<AnonymousClass2WF> pdl) {
        M12.LIZ(r3, r4, pdl);
        this.plugins.observe(r4, new AnonymousClass2WL(r3, pdl));
    }

    public final void observeAll(AnonymousClass2WI r3, 0CH r4, Pdl<List<AnonymousClass2WF>> pdl) {
        M12.LIZ(r3, r4, pdl);
        this.plugins.observe(r4, new AnonymousClass2WK(r3, pdl));
    }

    private final void logUserSegmentActivationET(AnonymousClass2WF r5, int i, boolean z) {
        int i2;
        AnonymousClass2UX r3 = new AnonymousClass2UX();
        r3.LIZ("state_machine_id", i);
        r3.LIZ("is_realtime_trigger", z ? 1 : 0);
        r3.LIZ("plugin_id", r5.LIZ);
        Integer num = r5.LJ;
        if (num != null) {
            i2 = num.intValue();
        } else {
            i2 = -1;
        }
        r3.LIZ("instance_id", i2);
        int i3 = r5.LJFF;
        if (i3 == null) {
            i3 = -1;
        }
        r3.LIZ("ab_expose_vid", i3);
        C12422nK.LIZ("enter_user_segment", r3.LIZ);
    }

    public final void startPluginRequest(Boolean bool, AnonymousClass2X6 r10, Boolean bool2, Boolean bool3, Context context) {
        Boolean bool4 = bool3;
        8eL.LIZJ().submit(new AnonymousClass2XI(this, bool4, context, r10, bool, bool2));
    }
}
