APK反编译源代码展示 - 南明离火平台提供

应用版本信息
应用名称:Epic Games Store
版本号:5.1.0
包名称:com.epicgames.portal

MD5 校验值:ac0107089df22e8b2a14c76c592b76ef

反编译源代码说明

l.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。


package g1;

import androidx.compose.material.TextFieldImplKt;
import androidx.compose.runtime.MutableState;
import androidx.compose.runtime.SnapshotStateKt__SnapshotStateKt;
import androidx.compose.runtime.internal.StabilityInferred;
import androidx.constraintlayout.core.motion.utils.TypedValues;
import androidx.lifecycle.SavedStateHandle;
import com.epicgames.portal.GameUpdatedNotification;
import com.epicgames.portal.common.model.ConnectionType;
import com.epicgames.portal.core.lifecycle.ApplicationLifecycleObserver;
import com.epicgames.portal.domain.model.AppModel;
import com.epicgames.portal.domain.model.GameAppModel;
import com.epicgames.portal.domain.model.LauncherAppModel;
import com.epicgames.portal.domain.model.settings.KeyImageModelKt;
import com.epicgames.portal.presentation.Screen;
import com.epicgames.portal.presentation.feature.errormodalwindow.ErrorInfo;
import com.epicgames.portal.presentation.feature.home.Event;
import com.epicgames.portal.presentation.feature.home.State;
import com.epicgames.portal.presentation.feature.library.model.LibraryTaskUiState;
import com.epicgames.portal.presentation.feature.library.model.Status;
import com.epicgames.portal.services.settings.Settings;
import com.epicgames.portal.services.settings.model.Setting;
import com.epicgames.portal.services.settings.model.SettingChangeDescriptor;
import com.epicgames.portal.services.settings.model.SettingsChangedArgs;
import com.epicgames.portal.silentupdate.domain.usecase.CancelHibernationNotificationUseCase;
import com.epicgames.portal.silentupdate.service.analytic.AnalyticTrackerHelper;
import com.epicgames.portal.silentupdate.service.hibernation.repository.HibernationRepository;
import com.epicgames.portal.views.toast.model.GeneralToast;
import com.epicgames.portal.views.toast.model.NotificationToast;
import com.epicgames.portal.views.toast.model.ToastModel;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import kotlin.collections.x0;
import kotlin.coroutines.Continuation;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlinx.coroutines.CoroutineScope;
import kotlinx.coroutines.t0;
import kotlinx.coroutines.w0;
import kotlinx.coroutines.z1;

@StabilityInferred(parameters = 0)
public final class l extends i0.a {
    public static final d V = new d(null);
    public static final int W = 8;
    private final i0.b A;
    private final f1.a B;
    private final SavedStateHandle C;
    private final m3.c D;
    private final String E;
    private final String F;
    private final MutableState G;
    private final x6.a H;
    private boolean I;
    private LinkedHashSet<ToastModel> J;
    private final LinkedHashSet<ToastModel> K;
    private d1.c L;
    private k1.d M;
    private String N;
    private final List<ErrorInfo> O;
    private boolean P;
    private boolean Q;
    private ConnectionType R;
    private Status S;
    private boolean T;
    private boolean U;

    private final x0.b f5101h;

    private final g1.d f5102i;

    private final m3.e f5103j;

    private final t0.c f5104k;

    private final Settings f5105l;

    private final r0.d f5106m;

    private final m3.h f5107n;

    private final z2.c f5108o;

    private final HibernationRepository f5109p;

    private final b3.a f5110q;

    private final x2.d f5111r;

    private final i3.g f5112s;

    private final x2.b f5113t;

    private final AnalyticTrackerHelper f5114u;

    private final g0.a f5115v;

    private final r1.a f5116w;

    private final x2.c f5117x;

    private final CancelHibernationNotificationUseCase f5118y;

    private final k1.a f5119z;

    @kotlin.coroutines.jvm.internal.e(c = "com.epicgames.portal.presentation.feature.home.MainViewModel$1", f = "MainViewModel.kt", l = {128, 144}, m = "invokeSuspend")
    public static final class a extends kotlin.coroutines.jvm.internal.k implements l8.p<CoroutineScope, Continuation<? super b8.z>, Object> {

        int f5120e;

        @kotlin.coroutines.jvm.internal.e(c = "com.epicgames.portal.presentation.feature.home.MainViewModel$1$1", f = "MainViewModel.kt", l = {}, m = "invokeSuspend")
        public static final class C0170a extends kotlin.coroutines.jvm.internal.k implements l8.p<CoroutineScope, Continuation<? super b8.z>, Object> {

            int f5122e;

            final l f5123f;

            public static final class C0171a extends kotlin.jvm.internal.p implements l8.a<b8.z> {

                final l f5124e;

                @kotlin.coroutines.jvm.internal.e(c = "com.epicgames.portal.presentation.feature.home.MainViewModel$1$1$1$1", f = "MainViewModel.kt", l = {}, m = "invokeSuspend")
                public static final class C0172a extends kotlin.coroutines.jvm.internal.k implements l8.p<CoroutineScope, Continuation<? super b8.z>, Object> {

                    int f5125e;

                    final l f5126f;

                    C0172a(l lVar, Continuation<? super C0172a> continuation) {
                        super(2, continuation);
                        this.f5126f = lVar;
                    }

                    @Override
                    public final Continuation<b8.z> create(Object obj, Continuation<?> continuation) {
                        return new C0172a(this.f5126f, continuation);
                    }

                    @Override
                    public final Object mo9invoke(CoroutineScope coroutineScope, Continuation<? super b8.z> continuation) {
                        return ((C0172a) create(coroutineScope, continuation)).invokeSuspend(b8.z.f1016a);
                    }

                    @Override
                    public final Object invokeSuspend(Object obj) {
                        f8.d.c();
                        if (this.f5125e == 0) {
                            b8.p.b(obj);
                            this.f5126f.a1();
                            return b8.z.f1016a;
                        }
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                }

                C0171a(l lVar) {
                    super(0);
                    this.f5124e = lVar;
                }

                @Override
                public b8.z invoke() {
                    invoke2();
                    return b8.z.f1016a;
                }

                public final void invoke2() {
                    this.f5124e.Z0();
                    l lVar = this.f5124e;
                    lVar.d(new C0172a(lVar, null));
                    this.f5124e.b2();
                }
            }

            C0170a(l lVar, Continuation<? super C0170a> continuation) {
                super(2, continuation);
                this.f5123f = lVar;
            }

            @Override
            public final Continuation<b8.z> create(Object obj, Continuation<?> continuation) {
                return new C0170a(this.f5123f, continuation);
            }

            @Override
            public final Object mo9invoke(CoroutineScope coroutineScope, Continuation<? super b8.z> continuation) {
                return ((C0170a) create(coroutineScope, continuation)).invokeSuspend(b8.z.f1016a);
            }

            @Override
            public final Object invokeSuspend(Object obj) {
                State a10;
                f8.d.c();
                if (this.f5122e == 0) {
                    b8.p.b(obj);
                    l lVar = this.f5123f;
                    a10 = r2.a((r34 & 1) != 0 ? r2.f2101e : true, (r34 & 2) != 0 ? r2.f2102f : false, (r34 & 4) != 0 ? r2.f2103g : false, (r34 & 8) != 0 ? r2.f2104h : false, (r34 & 16) != 0 ? r2.f2105i : false, (r34 & 32) != 0 ? r2.f2106j : false, (r34 & 64) != 0 ? r2.f2107k : false, (r34 & 128) != 0 ? r2.f2108l : null, (r34 & 256) != 0 ? r2.f2109m : null, (r34 & 512) != 0 ? r2.f2110n : null, (r34 & 1024) != 0 ? r2.f2111o : null, (r34 & 2048) != 0 ? r2.f2112p : false, (r34 & 4096) != 0 ? r2.f2113q : false, (r34 & 8192) != 0 ? r2.f2114r : null, (r34 & 16384) != 0 ? r2.f2115s : false, (r34 & 32768) != 0 ? lVar.R0().f2116t : null);
                    lVar.R1(a10);
                    l lVar2 = this.f5123f;
                    lVar2.f2(new C0171a(lVar2));
                    return b8.z.f1016a;
                }
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
        }

        a(Continuation<? super a> continuation) {
            super(2, continuation);
        }

        @Override
        public final Continuation<b8.z> create(Object obj, Continuation<?> continuation) {
            return new a(continuation);
        }

        @Override
        public final Object mo9invoke(CoroutineScope coroutineScope, Continuation<? super b8.z> continuation) {
            return ((a) create(coroutineScope, continuation)).invokeSuspend(b8.z.f1016a);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            Object c10;
            c10 = f8.d.c();
            int i10 = this.f5120e;
            if (i10 == 0) {
                b8.p.b(obj);
                l lVar = l.this;
                lVar.U = lVar.f5106m.j();
                if (!l.this.f5101h.b().isEmpty()) {
                    m3.c cVar = l.this.D;
                    this.f5120e = 1;
                    if (cVar.a(300L, this) == c10) {
                        return c10;
                    }
                    l lVar2 = l.this;
                    lVar2.e(new C0170a(lVar2, null));
                } else {
                    l lVar3 = l.this;
                    this.f5120e = 2;
                    if (lVar3.K0(this) == c10) {
                        return c10;
                    }
                }
            } else if (i10 == 1) {
                b8.p.b(obj);
                l lVar22 = l.this;
                lVar22.e(new C0170a(lVar22, null));
            } else {
                if (i10 != 2) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                b8.p.b(obj);
            }
            l.this.P0();
            return b8.z.f1016a;
        }
    }

    @kotlin.coroutines.jvm.internal.e(c = "com.epicgames.portal.presentation.feature.home.MainViewModel$onTryAgainButtonClicked$1", f = "MainViewModel.kt", l = {297, 303, 307}, m = "invokeSuspend")
    public static final class a0 extends kotlin.coroutines.jvm.internal.k implements l8.p<CoroutineScope, Continuation<? super b8.z>, Object> {

        int f5127e;

        a0(Continuation<? super a0> continuation) {
            super(2, continuation);
        }

        @Override
        public final Continuation<b8.z> create(Object obj, Continuation<?> continuation) {
            return new a0(continuation);
        }

        @Override
        public final Object mo9invoke(CoroutineScope coroutineScope, Continuation<? super b8.z> continuation) {
            return ((a0) create(coroutineScope, continuation)).invokeSuspend(b8.z.f1016a);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            Object c10;
            Object a10;
            State a11;
            State a12;
            State a13;
            State a14;
            c10 = f8.d.c();
            int i10 = this.f5127e;
            if (i10 != 0) {
                if (i10 == 1) {
                    b8.p.b(obj);
                    l lVar = l.this;
                    a12 = r2.a((r34 & 1) != 0 ? r2.f2101e : false, (r34 & 2) != 0 ? r2.f2102f : false, (r34 & 4) != 0 ? r2.f2103g : false, (r34 & 8) != 0 ? r2.f2104h : false, (r34 & 16) != 0 ? r2.f2105i : false, (r34 & 32) != 0 ? r2.f2106j : false, (r34 & 64) != 0 ? r2.f2107k : false, (r34 & 128) != 0 ? r2.f2108l : null, (r34 & 256) != 0 ? r2.f2109m : null, (r34 & 512) != 0 ? r2.f2110n : null, (r34 & 1024) != 0 ? r2.f2111o : null, (r34 & 2048) != 0 ? r2.f2112p : false, (r34 & 4096) != 0 ? r2.f2113q : false, (r34 & 8192) != 0 ? r2.f2114r : null, (r34 & 16384) != 0 ? r2.f2115s : false, (r34 & 32768) != 0 ? lVar.R0().f2116t : null);
                    lVar.R1(a12);
                    return b8.z.f1016a;
                }
                if (i10 == 2) {
                    b8.p.b(obj);
                    l lVar2 = l.this;
                    a13 = r2.a((r34 & 1) != 0 ? r2.f2101e : false, (r34 & 2) != 0 ? r2.f2102f : false, (r34 & 4) != 0 ? r2.f2103g : false, (r34 & 8) != 0 ? r2.f2104h : false, (r34 & 16) != 0 ? r2.f2105i : false, (r34 & 32) != 0 ? r2.f2106j : false, (r34 & 64) != 0 ? r2.f2107k : false, (r34 & 128) != 0 ? r2.f2108l : null, (r34 & 256) != 0 ? r2.f2109m : null, (r34 & 512) != 0 ? r2.f2110n : null, (r34 & 1024) != 0 ? r2.f2111o : null, (r34 & 2048) != 0 ? r2.f2112p : false, (r34 & 4096) != 0 ? r2.f2113q : false, (r34 & 8192) != 0 ? r2.f2114r : null, (r34 & 16384) != 0 ? r2.f2115s : false, (r34 & 32768) != 0 ? lVar2.R0().f2116t : null);
                    lVar2.R1(a13);
                    return b8.z.f1016a;
                }
                if (i10 != 3) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                b8.p.b(obj);
                a10 = obj;
                if (!((Boolean) a10).booleanValue()) {
                    l lVar3 = l.this;
                    State R0 = lVar3.R0();
                    Screen.Update update = Screen.Update.f2085g;
                    a14 = R0.a((r34 & 1) != 0 ? R0.f2101e : false, (r34 & 2) != 0 ? R0.f2102f : false, (r34 & 4) != 0 ? R0.f2103g : false, (r34 & 8) != 0 ? R0.f2104h : false, (r34 & 16) != 0 ? R0.f2105i : false, (r34 & 32) != 0 ? R0.f2106j : false, (r34 & 64) != 0 ? R0.f2107k : false, (r34 & 128) != 0 ? R0.f2108l : update, (r34 & 256) != 0 ? R0.f2109m : update.a(), (r34 & 512) != 0 ? R0.f2110n : null, (r34 & 1024) != 0 ? R0.f2111o : null, (r34 & 2048) != 0 ? R0.f2112p : false, (r34 & 4096) != 0 ? R0.f2113q : false, (r34 & 8192) != 0 ? R0.f2114r : null, (r34 & 16384) != 0 ? R0.f2115s : false, (r34 & 32768) != 0 ? R0.f2116t : null);
                    lVar3.R1(a14);
                }
                return b8.z.f1016a;
            }
            b8.p.b(obj);
            if (!l.this.Q) {
                m3.c cVar = l.this.D;
                this.f5127e = 1;
                if (cVar.a(1000L, this) == c10) {
                    return c10;
                }
                l lVar4 = l.this;
                a12 = r2.a((r34 & 1) != 0 ? r2.f2101e : false, (r34 & 2) != 0 ? r2.f2102f : false, (r34 & 4) != 0 ? r2.f2103g : false, (r34 & 8) != 0 ? r2.f2104h : false, (r34 & 16) != 0 ? r2.f2105i : false, (r34 & 32) != 0 ? r2.f2106j : false, (r34 & 64) != 0 ? r2.f2107k : false, (r34 & 128) != 0 ? r2.f2108l : null, (r34 & 256) != 0 ? r2.f2109m : null, (r34 & 512) != 0 ? r2.f2110n : null, (r34 & 1024) != 0 ? r2.f2111o : null, (r34 & 2048) != 0 ? r2.f2112p : false, (r34 & 4096) != 0 ? r2.f2113q : false, (r34 & 8192) != 0 ? r2.f2114r : null, (r34 & 16384) != 0 ? r2.f2115s : false, (r34 & 32768) != 0 ? lVar4.R0().f2116t : null);
                lVar4.R1(a12);
                return b8.z.f1016a;
            }
            if (!l.this.R0().A()) {
                l lVar5 = l.this;
                a11 = r5.a((r34 & 1) != 0 ? r5.f2101e : false, (r34 & 2) != 0 ? r5.f2102f : false, (r34 & 4) != 0 ? r5.f2103g : false, (r34 & 8) != 0 ? r5.f2104h : true, (r34 & 16) != 0 ? r5.f2105i : false, (r34 & 32) != 0 ? r5.f2106j : false, (r34 & 64) != 0 ? r5.f2107k : false, (r34 & 128) != 0 ? r5.f2108l : null, (r34 & 256) != 0 ? r5.f2109m : null, (r34 & 512) != 0 ? r5.f2110n : null, (r34 & 1024) != 0 ? r5.f2111o : null, (r34 & 2048) != 0 ? r5.f2112p : false, (r34 & 4096) != 0 ? r5.f2113q : false, (r34 & 8192) != 0 ? r5.f2114r : null, (r34 & 16384) != 0 ? r5.f2115s : false, (r34 & 32768) != 0 ? lVar5.R0().f2116t : null);
                lVar5.R1(a11);
                l lVar6 = l.this;
                this.f5127e = 2;
                if (lVar6.K0(this) == c10) {
                    return c10;
                }
                l lVar22 = l.this;
                a13 = r2.a((r34 & 1) != 0 ? r2.f2101e : false, (r34 & 2) != 0 ? r2.f2102f : false, (r34 & 4) != 0 ? r2.f2103g : false, (r34 & 8) != 0 ? r2.f2104h : false, (r34 & 16) != 0 ? r2.f2105i : false, (r34 & 32) != 0 ? r2.f2106j : false, (r34 & 64) != 0 ? r2.f2107k : false, (r34 & 128) != 0 ? r2.f2108l : null, (r34 & 256) != 0 ? r2.f2109m : null, (r34 & 512) != 0 ? r2.f2110n : null, (r34 & 1024) != 0 ? r2.f2111o : null, (r34 & 2048) != 0 ? r2.f2112p : false, (r34 & 4096) != 0 ? r2.f2113q : false, (r34 & 8192) != 0 ? r2.f2114r : null, (r34 & 16384) != 0 ? r2.f2115s : false, (r34 & 32768) != 0 ? lVar22.R0().f2116t : null);
                lVar22.R1(a13);
                return b8.z.f1016a;
            }
            r1.a aVar = l.this.f5116w;
            this.f5127e = 3;
            a10 = aVar.a(this);
            if (a10 == c10) {
                return c10;
            }
            if (!((Boolean) a10).booleanValue()) {
            }
            return b8.z.f1016a;
        }
    }

    @kotlin.coroutines.jvm.internal.e(c = "com.epicgames.portal.presentation.feature.home.MainViewModel$2", f = "MainViewModel.kt", l = {TextFieldImplKt.AnimationDuration}, m = "invokeSuspend")
    public static final class b extends kotlin.coroutines.jvm.internal.k implements l8.p<CoroutineScope, Continuation<? super b8.z>, Object> {

        int f5129e;

        public static final class a implements kotlinx.coroutines.flow.f<Boolean> {

            final l f5131e;

            a(l lVar) {
                this.f5131e = lVar;
            }

            public final Object a(boolean z10, Continuation<? super b8.z> continuation) {
                if (!z10) {
                    l lVar = this.f5131e;
                    Screen.Update update = Screen.Update.f2085g;
                    if (lVar.V0(update)) {
                        return b8.z.f1016a;
                    }
                    this.f5131e.H0(update);
                }
                return b8.z.f1016a;
            }

            @Override
            public Object emit(Boolean bool, Continuation continuation) {
                return a(bool.booleanValue(), continuation);
            }
        }

        b(Continuation<? super b> continuation) {
            super(2, continuation);
        }

        @Override
        public final Continuation<b8.z> create(Object obj, Continuation<?> continuation) {
            return new b(continuation);
        }

        @Override
        public final Object mo9invoke(CoroutineScope coroutineScope, Continuation<? super b8.z> continuation) {
            return ((b) create(coroutineScope, continuation)).invokeSuspend(b8.z.f1016a);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            Object c10;
            c10 = f8.d.c();
            int i10 = this.f5129e;
            if (i10 == 0) {
                b8.p.b(obj);
                kotlinx.coroutines.flow.y<Boolean> j10 = l.this.f5101h.j();
                a aVar = new a(l.this);
                this.f5129e = 1;
                if (j10.collect(aVar, this) == c10) {
                    return c10;
                }
            } else {
                if (i10 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                b8.p.b(obj);
            }
            throw new b8.d();
        }
    }

    @kotlin.coroutines.jvm.internal.e(c = "com.epicgames.portal.presentation.feature.home.MainViewModel$onUserLastInteracted$1", f = "MainViewModel.kt", l = {498, 499}, m = "invokeSuspend")
    public static final class b0 extends kotlin.coroutines.jvm.internal.k implements l8.p<CoroutineScope, Continuation<? super b8.z>, Object> {

        int f5132e;

        b0(Continuation<? super b0> continuation) {
            super(2, continuation);
        }

        @Override
        public final Continuation<b8.z> create(Object obj, Continuation<?> continuation) {
            return new b0(continuation);
        }

        @Override
        public final Object mo9invoke(CoroutineScope coroutineScope, Continuation<? super b8.z> continuation) {
            return ((b0) create(coroutineScope, continuation)).invokeSuspend(b8.z.f1016a);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            Object c10;
            c10 = f8.d.c();
            int i10 = this.f5132e;
            if (i10 == 0) {
                b8.p.b(obj);
                HibernationRepository hibernationRepository = l.this.f5109p;
                long time = new Date().getTime();
                this.f5132e = 1;
                if (hibernationRepository.g(time, this) == c10) {
                    return c10;
                }
            } else {
                if (i10 != 1) {
                    if (i10 != 2) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    b8.p.b(obj);
                    return b8.z.f1016a;
                }
                b8.p.b(obj);
            }
            x2.c cVar = l.this.f5117x;
            this.f5132e = 2;
            if (cVar.a(this) == c10) {
                return c10;
            }
            return b8.z.f1016a;
        }
    }

    public static final class c extends kotlin.jvm.internal.p implements l8.l<SettingsChangedArgs, b8.z> {
        c() {
            super(1);
        }

        public final void a(SettingsChangedArgs it) {
            m3.h hVar = l.this.f5107n;
            kotlin.jvm.internal.o.f(it, "it");
            if (hVar.a(it)) {
                l.this.f5106m.u(m3.h.c(l.this.f5107n, false, 1, null));
                l.this.f5108o.d();
            }
            Boolean f10 = l.this.f5106m.f(it);
            if (f10 != null) {
                l.this.P = f10.booleanValue();
            }
            Boolean h10 = l.this.f5106m.h(it);
            if (h10 != null) {
                l lVar = l.this;
                boolean booleanValue = h10.booleanValue();
                lVar.T = booleanValue;
                if (booleanValue) {
                    lVar.U0();
                    lVar.S0();
                }
            }
            Boolean m10 = l.this.f5106m.m(it);
            if (m10 != null) {
                l.this.U = m10.booleanValue();
            }
            Map<String, SettingChangeDescriptor<String>> changedStrings = it.getChangedStrings();
            if (changedStrings != null) {
                l lVar2 = l.this;
                if (lVar2.f5106m.d(changedStrings)) {
                    lVar2.f5106m.t(true);
                }
            }
        }

        @Override
        public b8.z invoke(SettingsChangedArgs settingsChangedArgs) {
            a(settingsChangedArgs);
            return b8.z.f1016a;
        }
    }

    public static final class c0 extends kotlin.jvm.internal.p implements l8.a<b8.z> {
        c0() {
            super(0);
        }

        @Override
        public b8.z invoke() {
            invoke2();
            return b8.z.f1016a;
        }

        public final void invoke2() {
            l.this.b2();
            l.this.a1();
            l.this.Z0();
        }
    }

    public static final class d {
        private d() {
        }

        public d(DefaultConstructorMarker defaultConstructorMarker) {
            this();
        }
    }

    public static final class d0 extends kotlin.jvm.internal.p implements l8.l<LibraryTaskUiState, b8.z> {

        @kotlin.coroutines.jvm.internal.e(c = "com.epicgames.portal.presentation.feature.home.MainViewModel$registerLibraryListener$1$1$1", f = "MainViewModel.kt", l = {}, m = "invokeSuspend")
        public static final class a extends kotlin.coroutines.jvm.internal.k implements l8.p<CoroutineScope, Continuation<? super b8.z>, Object> {

            int f5137e;

            final l f5138f;

            final ErrorInfo f5139g;

            a(l lVar, ErrorInfo errorInfo, Continuation<? super a> continuation) {
                super(2, continuation);
                this.f5138f = lVar;
                this.f5139g = errorInfo;
            }

            @Override
            public final Continuation<b8.z> create(Object obj, Continuation<?> continuation) {
                return new a(this.f5138f, this.f5139g, continuation);
            }

            @Override
            public final Object mo9invoke(CoroutineScope coroutineScope, Continuation<? super b8.z> continuation) {
                return ((a) create(coroutineScope, continuation)).invokeSuspend(b8.z.f1016a);
            }

            @Override
            public final Object invokeSuspend(Object obj) {
                State a10;
                f8.d.c();
                if (this.f5137e == 0) {
                    b8.p.b(obj);
                    if (this.f5138f.O.contains(this.f5139g)) {
                        return b8.z.f1016a;
                    }
                    if (!kotlin.jvm.internal.o.b(this.f5138f.R0().e(), this.f5139g)) {
                        this.f5138f.O.add(this.f5139g);
                        if (this.f5138f.R0().e() != null) {
                            return b8.z.f1016a;
                        }
                        this.f5138f.f5114u.j(this.f5139g.b());
                        l lVar = this.f5138f;
                        a10 = r2.a((r34 & 1) != 0 ? r2.f2101e : false, (r34 & 2) != 0 ? r2.f2102f : false, (r34 & 4) != 0 ? r2.f2103g : false, (r34 & 8) != 0 ? r2.f2104h : false, (r34 & 16) != 0 ? r2.f2105i : false, (r34 & 32) != 0 ? r2.f2106j : false, (r34 & 64) != 0 ? r2.f2107k : false, (r34 & 128) != 0 ? r2.f2108l : null, (r34 & 256) != 0 ? r2.f2109m : null, (r34 & 512) != 0 ? r2.f2110n : null, (r34 & 1024) != 0 ? r2.f2111o : null, (r34 & 2048) != 0 ? r2.f2112p : !this.f5138f.O.isEmpty(), (r34 & 4096) != 0 ? r2.f2113q : false, (r34 & 8192) != 0 ? r2.f2114r : null, (r34 & 16384) != 0 ? r2.f2115s : false, (r34 & 32768) != 0 ? lVar.R0().f2116t : this.f5139g);
                        lVar.R1(a10);
                    }
                    return b8.z.f1016a;
                }
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
        }

        d0() {
            super(1);
        }

        public final void a(LibraryTaskUiState taskUiState) {
            String str;
            kotlin.jvm.internal.o.g(taskUiState, "taskUiState");
            l.this.S = taskUiState.getStatus();
            if (l.this.W0() || l.this.X0()) {
                l.this.d2();
            }
            l lVar = l.this;
            if (lVar.Y0(lVar.S)) {
                l.this.L0();
            }
            if (l.this.B0()) {
                l.this.f5106m.s(true);
            }
            str = g1.m.f5226a;
            l.this.f("onStateChanged: " + taskUiState, str);
            if (!kotlin.jvm.internal.o.b(taskUiState.getRequestType(), "LIBRARY_TASK_PROGRESS_UPDATED") || taskUiState.getError() == null) {
                return;
            }
            l.this.L0();
            ErrorInfo a10 = l.this.B.a(taskUiState.getError());
            l lVar2 = l.this;
            lVar2.e(new a(lVar2, a10, null));
        }

        @Override
        public b8.z invoke(LibraryTaskUiState libraryTaskUiState) {
            a(libraryTaskUiState);
            return b8.z.f1016a;
        }
    }

    @kotlin.coroutines.jvm.internal.e(c = "com.epicgames.portal.presentation.feature.home.MainViewModel$cancelHibernationNotification$1", f = "MainViewModel.kt", l = {346, 347}, m = "invokeSuspend")
    public static final class e extends kotlin.coroutines.jvm.internal.k implements l8.p<CoroutineScope, Continuation<? super b8.z>, Object> {

        int f5140e;

        e(Continuation<? super e> continuation) {
            super(2, continuation);
        }

        @Override
        public final Continuation<b8.z> create(Object obj, Continuation<?> continuation) {
            return new e(continuation);
        }

        @Override
        public final Object mo9invoke(CoroutineScope coroutineScope, Continuation<? super b8.z> continuation) {
            return ((e) create(coroutineScope, continuation)).invokeSuspend(b8.z.f1016a);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            Object c10;
            c10 = f8.d.c();
            int i10 = this.f5140e;
            if (i10 == 0) {
                b8.p.b(obj);
                CancelHibernationNotificationUseCase cancelHibernationNotificationUseCase = l.this.f5118y;
                this.f5140e = 1;
                if (cancelHibernationNotificationUseCase.b(this) == c10) {
                    return c10;
                }
            } else {
                if (i10 != 1) {
                    if (i10 != 2) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    b8.p.b(obj);
                    return b8.z.f1016a;
                }
                b8.p.b(obj);
            }
            CancelHibernationNotificationUseCase cancelHibernationNotificationUseCase2 = l.this.f5118y;
            this.f5140e = 2;
            if (cancelHibernationNotificationUseCase2.a(this) == c10) {
                return c10;
            }
            return b8.z.f1016a;
        }
    }

    @kotlin.coroutines.jvm.internal.e(c = "com.epicgames.portal.presentation.feature.home.MainViewModel$setForegroundAppMode$1", f = "MainViewModel.kt", l = {}, m = "invokeSuspend")
    public static final class e0 extends kotlin.coroutines.jvm.internal.k implements l8.p<CoroutineScope, Continuation<? super b8.z>, Object> {

        int f5142e;

        final boolean f5144g;

        e0(boolean z10, Continuation<? super e0> continuation) {
            super(2, continuation);
            this.f5144g = z10;
        }

        @Override
        public final Continuation<b8.z> create(Object obj, Continuation<?> continuation) {
            return new e0(this.f5144g, continuation);
        }

        @Override
        public final Object mo9invoke(CoroutineScope coroutineScope, Continuation<? super b8.z> continuation) {
            return ((e0) create(coroutineScope, continuation)).invokeSuspend(b8.z.f1016a);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            f8.d.c();
            if (this.f5142e == 0) {
                b8.p.b(obj);
                l.this.f5105l.o(new Setting("isInForeground", kotlin.coroutines.jvm.internal.b.a(this.f5144g)));
                return b8.z.f1016a;
            }
            throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
        }
    }

    @kotlin.coroutines.jvm.internal.e(c = "com.epicgames.portal.presentation.feature.home.MainViewModel", f = "MainViewModel.kt", l = {640}, m = "deleteNotificationToast")
    public static final class f extends kotlin.coroutines.jvm.internal.d {

        Object f5145e;

        int f5146f;

        Object f5147g;

        int f5149i;

        f(Continuation<? super f> continuation) {
            super(continuation);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            this.f5147g = obj;
            this.f5149i |= Integer.MIN_VALUE;
            return l.this.D0(0, this);
        }
    }

    @kotlin.coroutines.jvm.internal.e(c = "com.epicgames.portal.presentation.feature.home.MainViewModel", f = "MainViewModel.kt", l = {551}, m = "shouldShowAutoUpdateDialog")
    public static final class f0 extends kotlin.coroutines.jvm.internal.d {

        Object f5150e;

        int f5152g;

        f0(Continuation<? super f0> continuation) {
            super(continuation);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            this.f5150e = obj;
            this.f5152g |= Integer.MIN_VALUE;
            return l.this.S1(this);
        }
    }

    @kotlin.coroutines.jvm.internal.e(c = "com.epicgames.portal.presentation.feature.home.MainViewModel$emitScreen$1", f = "MainViewModel.kt", l = {}, m = "invokeSuspend")
    public static final class g extends kotlin.coroutines.jvm.internal.k implements l8.p<CoroutineScope, Continuation<? super b8.z>, Object> {

        int f5153e;

        final Screen f5155g;

        g(Screen screen, Continuation<? super g> continuation) {
            super(2, continuation);
            this.f5155g = screen;
        }

        @Override
        public final Continuation<b8.z> create(Object obj, Continuation<?> continuation) {
            return new g(this.f5155g, continuation);
        }

        @Override
        public final Object mo9invoke(CoroutineScope coroutineScope, Continuation<? super b8.z> continuation) {
            return ((g) create(coroutineScope, continuation)).invokeSuspend(b8.z.f1016a);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            State a10;
            f8.d.c();
            if (this.f5153e == 0) {
                b8.p.b(obj);
                l lVar = l.this;
                a10 = r2.a((r34 & 1) != 0 ? r2.f2101e : false, (r34 & 2) != 0 ? r2.f2102f : false, (r34 & 4) != 0 ? r2.f2103g : false, (r34 & 8) != 0 ? r2.f2104h : false, (r34 & 16) != 0 ? r2.f2105i : false, (r34 & 32) != 0 ? r2.f2106j : false, (r34 & 64) != 0 ? r2.f2107k : false, (r34 & 128) != 0 ? r2.f2108l : this.f5155g, (r34 & 256) != 0 ? r2.f2109m : null, (r34 & 512) != 0 ? r2.f2110n : null, (r34 & 1024) != 0 ? r2.f2111o : null, (r34 & 2048) != 0 ? r2.f2112p : false, (r34 & 4096) != 0 ? r2.f2113q : false, (r34 & 8192) != 0 ? r2.f2114r : null, (r34 & 16384) != 0 ? r2.f2115s : false, (r34 & 32768) != 0 ? lVar.R0().f2116t : null);
                lVar.R1(a10);
                return b8.z.f1016a;
            }
            throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
        }
    }

    @kotlin.coroutines.jvm.internal.e(c = "com.epicgames.portal.presentation.feature.home.MainViewModel", f = "MainViewModel.kt", l = {557}, m = "showAutoUpdateDialog")
    public static final class g0 extends kotlin.coroutines.jvm.internal.d {

        Object f5156e;

        Object f5157f;

        int f5159h;

        g0(Continuation<? super g0> continuation) {
            super(continuation);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            this.f5157f = obj;
            this.f5159h |= Integer.MIN_VALUE;
            return l.this.X1(this);
        }
    }

    @kotlin.coroutines.jvm.internal.e(c = "com.epicgames.portal.presentation.feature.home.MainViewModel$emitToasts$1", f = "MainViewModel.kt", l = {}, m = "invokeSuspend")
    public static final class h extends kotlin.coroutines.jvm.internal.k implements l8.p<CoroutineScope, Continuation<? super b8.z>, Object> {

        int f5160e;

        h(Continuation<? super h> continuation) {
            super(2, continuation);
        }

        @Override
        public final Continuation<b8.z> create(Object obj, Continuation<?> continuation) {
            return new h(continuation);
        }

        @Override
        public final Object mo9invoke(CoroutineScope coroutineScope, Continuation<? super b8.z> continuation) {
            return ((h) create(coroutineScope, continuation)).invokeSuspend(b8.z.f1016a);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            State a10;
            f8.d.c();
            if (this.f5160e == 0) {
                b8.p.b(obj);
                l lVar = l.this;
                a10 = r2.a((r34 & 1) != 0 ? r2.f2101e : false, (r34 & 2) != 0 ? r2.f2102f : false, (r34 & 4) != 0 ? r2.f2103g : false, (r34 & 8) != 0 ? r2.f2104h : false, (r34 & 16) != 0 ? r2.f2105i : false, (r34 & 32) != 0 ? r2.f2106j : false, (r34 & 64) != 0 ? r2.f2107k : false, (r34 & 128) != 0 ? r2.f2108l : null, (r34 & 256) != 0 ? r2.f2109m : null, (r34 & 512) != 0 ? r2.f2110n : null, (r34 & 1024) != 0 ? r2.f2111o : l.this.Q0(), (r34 & 2048) != 0 ? r2.f2112p : false, (r34 & 4096) != 0 ? r2.f2113q : false, (r34 & 8192) != 0 ? r2.f2114r : null, (r34 & 16384) != 0 ? r2.f2115s : false, (r34 & 32768) != 0 ? lVar.R0().f2116t : null);
                lVar.R1(a10);
                return b8.z.f1016a;
            }
            throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
        }
    }

    @kotlin.coroutines.jvm.internal.e(c = "com.epicgames.portal.presentation.feature.home.MainViewModel$showHibernationDialog$1", f = "MainViewModel.kt", l = {564, 565}, m = "invokeSuspend")
    public static final class h0 extends kotlin.coroutines.jvm.internal.k implements l8.p<CoroutineScope, Continuation<? super b8.z>, Object> {

        int f5162e;

        h0(Continuation<? super h0> continuation) {
            super(2, continuation);
        }

        @Override
        public final Continuation<b8.z> create(Object obj, Continuation<?> continuation) {
            return new h0(continuation);
        }

        @Override
        public final Object mo9invoke(CoroutineScope coroutineScope, Continuation<? super b8.z> continuation) {
            return ((h0) create(coroutineScope, continuation)).invokeSuspend(b8.z.f1016a);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            Object c10;
            c10 = f8.d.c();
            int i10 = this.f5162e;
            if (i10 == 0) {
                b8.p.b(obj);
                l.this.G0(true);
                HibernationRepository hibernationRepository = l.this.f5109p;
                this.f5162e = 1;
                if (hibernationRepository.f(true, this) == c10) {
                    return c10;
                }
            } else {
                if (i10 != 1) {
                    if (i10 != 2) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    b8.p.b(obj);
                    l.this.f5114u.f();
                    return b8.z.f1016a;
                }
                b8.p.b(obj);
            }
            HibernationRepository hibernationRepository2 = l.this.f5109p;
            long time = new Date().getTime();
            this.f5162e = 2;
            if (hibernationRepository2.g(time, this) == c10) {
                return c10;
            }
            l.this.f5114u.f();
            return b8.z.f1016a;
        }
    }

    @kotlin.coroutines.jvm.internal.e(c = "com.epicgames.portal.presentation.feature.home.MainViewModel$emitUpdateScreen$1", f = "MainViewModel.kt", l = {}, m = "invokeSuspend")
    public static final class i extends kotlin.coroutines.jvm.internal.k implements l8.p<CoroutineScope, Continuation<? super b8.z>, Object> {

        int f5164e;

        i(Continuation<? super i> continuation) {
            super(2, continuation);
        }

        @Override
        public final Continuation<b8.z> create(Object obj, Continuation<?> continuation) {
            return new i(continuation);
        }

        @Override
        public final Object mo9invoke(CoroutineScope coroutineScope, Continuation<? super b8.z> continuation) {
            return ((i) create(coroutineScope, continuation)).invokeSuspend(b8.z.f1016a);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            f8.d.c();
            if (this.f5164e != 0) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            b8.p.b(obj);
            l.this.H0(Screen.Update.f2085g);
            return b8.z.f1016a;
        }
    }

    @kotlin.coroutines.jvm.internal.e(c = "com.epicgames.portal.presentation.feature.home.MainViewModel$showNextDialogIfNeed$1", f = "MainViewModel.kt", l = {}, m = "invokeSuspend")
    public static final class i0 extends kotlin.coroutines.jvm.internal.k implements l8.p<CoroutineScope, Continuation<? super b8.z>, Object> {

        int f5166e;

        final ErrorInfo f5168g;

        i0(ErrorInfo errorInfo, Continuation<? super i0> continuation) {
            super(2, continuation);
            this.f5168g = errorInfo;
        }

        @Override
        public final Continuation<b8.z> create(Object obj, Continuation<?> continuation) {
            return new i0(this.f5168g, continuation);
        }

        @Override
        public final Object mo9invoke(CoroutineScope coroutineScope, Continuation<? super b8.z> continuation) {
            return ((i0) create(coroutineScope, continuation)).invokeSuspend(b8.z.f1016a);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            Object c02;
            State a10;
            f8.d.c();
            if (this.f5166e == 0) {
                b8.p.b(obj);
                kotlin.jvm.internal.i0.a(l.this.O).remove(this.f5168g);
                l lVar = l.this;
                State R0 = lVar.R0();
                c02 = kotlin.collections.e0.c0(l.this.O);
                a10 = R0.a((r34 & 1) != 0 ? R0.f2101e : false, (r34 & 2) != 0 ? R0.f2102f : false, (r34 & 4) != 0 ? R0.f2103g : false, (r34 & 8) != 0 ? R0.f2104h : false, (r34 & 16) != 0 ? R0.f2105i : false, (r34 & 32) != 0 ? R0.f2106j : false, (r34 & 64) != 0 ? R0.f2107k : false, (r34 & 128) != 0 ? R0.f2108l : null, (r34 & 256) != 0 ? R0.f2109m : null, (r34 & 512) != 0 ? R0.f2110n : null, (r34 & 1024) != 0 ? R0.f2111o : null, (r34 & 2048) != 0 ? R0.f2112p : !l.this.O.isEmpty(), (r34 & 4096) != 0 ? R0.f2113q : false, (r34 & 8192) != 0 ? R0.f2114r : null, (r34 & 16384) != 0 ? R0.f2115s : false, (r34 & 32768) != 0 ? R0.f2116t : (ErrorInfo) c02);
                lVar.R1(a10);
                return b8.z.f1016a;
            }
            throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
        }
    }

    @kotlin.coroutines.jvm.internal.e(c = "com.epicgames.portal.presentation.feature.home.MainViewModel", f = "MainViewModel.kt", l = {396, TypedValues.CycleType.TYPE_ALPHA, 412}, m = "fetchAppList")
    public static final class j extends kotlin.coroutines.jvm.internal.d {

        Object f5169e;

        Object f5170f;

        Object f5171g;

        Object f5172h;

        int f5174j;

        j(Continuation<? super j> continuation) {
            super(continuation);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            this.f5172h = obj;
            this.f5174j |= Integer.MIN_VALUE;
            return l.this.K0(this);
        }
    }

    @kotlin.coroutines.jvm.internal.e(c = "com.epicgames.portal.presentation.feature.home.MainViewModel$showNotifications$1", f = "MainViewModel.kt", l = {271, 272, 272}, m = "invokeSuspend")
    public static final class j0 extends kotlin.coroutines.jvm.internal.k implements l8.p<CoroutineScope, Continuation<? super b8.z>, Object> {

        int f5175e;

        j0(Continuation<? super j0> continuation) {
            super(2, continuation);
        }

        @Override
        public final Continuation<b8.z> create(Object obj, Continuation<?> continuation) {
            return new j0(continuation);
        }

        @Override
        public final Object mo9invoke(CoroutineScope coroutineScope, Continuation<? super b8.z> continuation) {
            return ((j0) create(coroutineScope, continuation)).invokeSuspend(b8.z.f1016a);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            Object c10;
            c10 = f8.d.c();
            int i10 = this.f5175e;
            if (i10 == 0) {
                b8.p.b(obj);
                l lVar = l.this;
                this.f5175e = 1;
                obj = lVar.U1(this);
                if (obj == c10) {
                    return c10;
                }
            } else {
                if (i10 != 1) {
                    if (i10 != 2) {
                        if (i10 != 3) {
                            throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                        }
                        b8.p.b(obj);
                        l.this.c2();
                        return b8.z.f1016a;
                    }
                    b8.p.b(obj);
                    if (((Boolean) obj).booleanValue()) {
                        l.this.e2();
                    } else {
                        l lVar2 = l.this;
                        this.f5175e = 3;
                        if (lVar2.X1(this) == c10) {
                            return c10;
                        }
                    }
                    l.this.c2();
                    return b8.z.f1016a;
                }
                b8.p.b(obj);
            }
            if (!((Boolean) obj).booleanValue()) {
                l lVar3 = l.this;
                this.f5175e = 2;
                obj = lVar3.S1(this);
                if (obj == c10) {
                    return c10;
                }
                if (((Boolean) obj).booleanValue()) {
                }
                l.this.c2();
                return b8.z.f1016a;
            }
            l.this.Z1();
            l.this.c2();
            return b8.z.f1016a;
        }
    }

    @kotlin.coroutines.jvm.internal.e(c = "com.epicgames.portal.presentation.feature.home.MainViewModel$fetchAppList$2$1", f = "MainViewModel.kt", l = {}, m = "invokeSuspend")
    public static final class k extends kotlin.coroutines.jvm.internal.k implements l8.p<CoroutineScope, Continuation<? super b8.z>, Object> {

        int f5177e;

        final boolean f5179g;

        k(boolean z10, Continuation<? super k> continuation) {
            super(2, continuation);
            this.f5179g = z10;
        }

        @Override
        public final Continuation<b8.z> create(Object obj, Continuation<?> continuation) {
            return new k(this.f5179g, continuation);
        }

        @Override
        public final Object mo9invoke(CoroutineScope coroutineScope, Continuation<? super b8.z> continuation) {
            return ((k) create(coroutineScope, continuation)).invokeSuspend(b8.z.f1016a);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            State a10;
            f8.d.c();
            if (this.f5177e == 0) {
                b8.p.b(obj);
                l lVar = l.this;
                a10 = r2.a((r34 & 1) != 0 ? r2.f2101e : true, (r34 & 2) != 0 ? r2.f2102f : false, (r34 & 4) != 0 ? r2.f2103g : false, (r34 & 8) != 0 ? r2.f2104h : false, (r34 & 16) != 0 ? r2.f2105i : false, (r34 & 32) != 0 ? r2.f2106j : false, (r34 & 64) != 0 ? r2.f2107k : false, (r34 & 128) != 0 ? r2.f2108l : this.f5179g ? Screen.Update.f2085g : Screen.Home.f2073g, (r34 & 256) != 0 ? r2.f2109m : (this.f5179g ? Screen.Update.f2085g : Screen.Home.f2073g).a(), (r34 & 512) != 0 ? r2.f2110n : null, (r34 & 1024) != 0 ? r2.f2111o : null, (r34 & 2048) != 0 ? r2.f2112p : false, (r34 & 4096) != 0 ? r2.f2113q : false, (r34 & 8192) != 0 ? r2.f2114r : null, (r34 & 16384) != 0 ? r2.f2115s : false, (r34 & 32768) != 0 ? lVar.R0().f2116t : null);
                lVar.R1(a10);
                if (!this.f5179g) {
                    l.this.b2();
                    l.this.a1();
                }
                return b8.z.f1016a;
            }
            throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
        }
    }

    @kotlin.coroutines.jvm.internal.e(c = "com.epicgames.portal.presentation.feature.home.MainViewModel$showUpdateScreenOrPerform$1", f = "MainViewModel.kt", l = {443}, m = "invokeSuspend")
    public static final class k0 extends kotlin.coroutines.jvm.internal.k implements l8.p<CoroutineScope, Continuation<? super b8.z>, Object> {

        int f5180e;

        final l8.a<b8.z> f5182g;

        k0(l8.a<b8.z> aVar, Continuation<? super k0> continuation) {
            super(2, continuation);
            this.f5182g = aVar;
        }

        @Override
        public final Continuation<b8.z> create(Object obj, Continuation<?> continuation) {
            return new k0(this.f5182g, continuation);
        }

        @Override
        public final Object mo9invoke(CoroutineScope coroutineScope, Continuation<? super b8.z> continuation) {
            return ((k0) create(coroutineScope, continuation)).invokeSuspend(b8.z.f1016a);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            Object c10;
            c10 = f8.d.c();
            int i10 = this.f5180e;
            if (i10 == 0) {
                b8.p.b(obj);
                r1.a aVar = l.this.f5116w;
                this.f5180e = 1;
                obj = aVar.a(this);
                if (obj == c10) {
                    return c10;
                }
            } else {
                if (i10 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                b8.p.b(obj);
            }
            if (!((Boolean) obj).booleanValue()) {
                l.this.J0();
            } else {
                this.f5182g.invoke();
            }
            return b8.z.f1016a;
        }
    }

    @kotlin.coroutines.jvm.internal.e(c = "com.epicgames.portal.presentation.feature.home.MainViewModel$fetchAppList$2$prefetchJob$1", f = "MainViewModel.kt", l = {399}, m = "invokeSuspend")
    public static final class C0173l extends kotlin.coroutines.jvm.internal.k implements l8.p<CoroutineScope, Continuation<? super q.i>, Object> {

        int f5183e;

        final List<AppModel> f5185g;

        C0173l(List<? extends AppModel> list, Continuation<? super C0173l> continuation) {
            super(2, continuation);
            this.f5185g = list;
        }

        @Override
        public final Continuation<b8.z> create(Object obj, Continuation<?> continuation) {
            return new C0173l(this.f5185g, continuation);
        }

        @Override
        public final Object mo9invoke(CoroutineScope coroutineScope, Continuation<? super q.i> continuation) {
            return ((C0173l) create(coroutineScope, continuation)).invokeSuspend(b8.z.f1016a);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            Object c10;
            Object c02;
            c10 = f8.d.c();
            int i10 = this.f5183e;
            if (i10 == 0) {
                b8.p.b(obj);
                i0.b bVar = l.this.A;
                List<AppModel> list = this.f5185g;
                ArrayList arrayList = new ArrayList();
                for (Object obj2 : list) {
                    if (obj2 instanceof GameAppModel) {
                        arrayList.add(obj2);
                    }
                }
                c02 = kotlin.collections.e0.c0(arrayList);
                GameAppModel gameAppModel = (GameAppModel) c02;
                String urlOrEmpty = KeyImageModelKt.getUrlOrEmpty(gameAppModel != null ? gameAppModel.getPromoImg() : null);
                this.f5183e = 1;
                obj = bVar.b(urlOrEmpty, this);
                if (obj == c10) {
                    return c10;
                }
            } else {
                if (i10 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                b8.p.b(obj);
            }
            return obj;
        }
    }

    @kotlin.coroutines.jvm.internal.e(c = "com.epicgames.portal.presentation.feature.home.MainViewModel$fetchAppList$3$1", f = "MainViewModel.kt", l = {}, m = "invokeSuspend")
    public static final class m extends kotlin.coroutines.jvm.internal.k implements l8.p<CoroutineScope, Continuation<? super b8.z>, Object> {

        int f5186e;

        m(Continuation<? super m> continuation) {
            super(2, continuation);
        }

        @Override
        public final Continuation<b8.z> create(Object obj, Continuation<?> continuation) {
            return new m(continuation);
        }

        @Override
        public final Object mo9invoke(CoroutineScope coroutineScope, Continuation<? super b8.z> continuation) {
            return ((m) create(coroutineScope, continuation)).invokeSuspend(b8.z.f1016a);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            State a10;
            f8.d.c();
            if (this.f5186e == 0) {
                b8.p.b(obj);
                l lVar = l.this;
                State R0 = lVar.R0();
                Screen.Offline offline = Screen.Offline.f2079g;
                a10 = R0.a((r34 & 1) != 0 ? R0.f2101e : false, (r34 & 2) != 0 ? R0.f2102f : false, (r34 & 4) != 0 ? R0.f2103g : false, (r34 & 8) != 0 ? R0.f2104h : false, (r34 & 16) != 0 ? R0.f2105i : false, (r34 & 32) != 0 ? R0.f2106j : false, (r34 & 64) != 0 ? R0.f2107k : false, (r34 & 128) != 0 ? R0.f2108l : offline, (r34 & 256) != 0 ? R0.f2109m : offline.a(), (r34 & 512) != 0 ? R0.f2110n : null, (r34 & 1024) != 0 ? R0.f2111o : null, (r34 & 2048) != 0 ? R0.f2112p : false, (r34 & 4096) != 0 ? R0.f2113q : false, (r34 & 8192) != 0 ? R0.f2114r : null, (r34 & 16384) != 0 ? R0.f2115s : false, (r34 & 32768) != 0 ? R0.f2116t : null);
                lVar.R1(a10);
                return b8.z.f1016a;
            }
            throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
        }
    }

    @kotlin.coroutines.jvm.internal.e(c = "com.epicgames.portal.presentation.feature.home.MainViewModel$getNotificationToastsFromRepository$1", f = "MainViewModel.kt", l = {647}, m = "invokeSuspend")
    public static final class n extends kotlin.coroutines.jvm.internal.k implements l8.p<CoroutineScope, Continuation<? super b8.z>, Object> {

        Object f5188e;

        int f5189f;

        n(Continuation<? super n> continuation) {
            super(2, continuation);
        }

        @Override
        public final Continuation<b8.z> create(Object obj, Continuation<?> continuation) {
            return new n(continuation);
        }

        @Override
        public final Object mo9invoke(CoroutineScope coroutineScope, Continuation<? super b8.z> continuation) {
            return ((n) create(coroutineScope, continuation)).invokeSuspend(b8.z.f1016a);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            Object c10;
            l lVar;
            int v10;
            c10 = f8.d.c();
            int i10 = this.f5189f;
            if (i10 == 0) {
                b8.p.b(obj);
                l lVar2 = l.this;
                this.f5188e = lVar2;
                this.f5189f = 1;
                Object O0 = lVar2.O0(this);
                if (O0 == c10) {
                    return c10;
                }
                lVar = lVar2;
                obj = O0;
            } else {
                if (i10 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                lVar = (l) this.f5188e;
                b8.p.b(obj);
            }
            Iterable iterable = (Iterable) obj;
            l lVar3 = l.this;
            v10 = kotlin.collections.x.v(iterable, 10);
            ArrayList arrayList = new ArrayList(v10);
            Iterator it = iterable.iterator();
            while (it.hasNext()) {
                arrayList.add(lVar3.g2((GameUpdatedNotification) it.next()));
            }
            lVar.J = new LinkedHashSet(arrayList);
            return b8.z.f1016a;
        }
    }

    @kotlin.coroutines.jvm.internal.e(c = "com.epicgames.portal.presentation.feature.home.MainViewModel", f = "MainViewModel.kt", l = {651}, m = "getNotifications")
    public static final class o extends kotlin.coroutines.jvm.internal.d {

        Object f5191e;

        int f5193g;

        o(Continuation<? super o> continuation) {
            super(continuation);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            this.f5191e = obj;
            this.f5193g |= Integer.MIN_VALUE;
            return l.this.O0(this);
        }
    }

    @kotlin.coroutines.jvm.internal.e(c = "com.epicgames.portal.presentation.feature.home.MainViewModel$navigatePdpFromDeepLink$1", f = "MainViewModel.kt", l = {454, 455}, m = "invokeSuspend")
    public static final class p extends kotlin.coroutines.jvm.internal.k implements l8.p<CoroutineScope, Continuation<? super b8.z>, Object> {

        Object f5194e;

        Object f5195f;

        int f5196g;

        p(Continuation<? super p> continuation) {
            super(2, continuation);
        }

        @Override
        public final Continuation<b8.z> create(Object obj, Continuation<?> continuation) {
            return new p(continuation);
        }

        @Override
        public final Object mo9invoke(CoroutineScope coroutineScope, Continuation<? super b8.z> continuation) {
            return ((p) create(coroutineScope, continuation)).invokeSuspend(b8.z.f1016a);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            Object c10;
            d1.c cVar;
            l lVar;
            Object obj2;
            d1.c cVar2;
            c10 = f8.d.c();
            int i10 = this.f5196g;
            if (i10 == 0) {
                b8.p.b(obj);
                cVar = l.this.L;
                if (cVar != null) {
                    lVar = l.this;
                    if (cVar instanceof d1.d) {
                        i3.g gVar = lVar.f5112s;
                        int b10 = ((d1.d) cVar).b();
                        this.f5194e = lVar;
                        this.f5195f = cVar;
                        this.f5196g = 1;
                        if (gVar.l(b10, this) == c10) {
                            return c10;
                        }
                    } else {
                        if (cVar instanceof d1.b) {
                            List<AppModel> b11 = lVar.f5101h.b();
                            ArrayList arrayList = new ArrayList();
                            for (Object obj3 : b11) {
                                if (obj3 instanceof GameAppModel) {
                                    arrayList.add(obj3);
                                }
                            }
                            Iterator it = arrayList.iterator();
                            while (true) {
                                if (!it.hasNext()) {
                                    obj2 = null;
                                    break;
                                }
                                obj2 = it.next();
                                if (kotlin.jvm.internal.o.b(((GameAppModel) obj2).getNamespace(), cVar.a())) {
                                    break;
                                }
                            }
                            GameAppModel gameAppModel = (GameAppModel) obj2;
                            lVar.f5114u.o(((d1.b) cVar).b(), gameAppModel != null ? gameAppModel.getLastSeenPackageName() : null);
                        }
                        lVar.y1(cVar.a());
                        lVar.L = null;
                    }
                }
                return b8.z.f1016a;
            }
            if (i10 != 1) {
                if (i10 != 2) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                cVar2 = (d1.c) this.f5195f;
                lVar = (l) this.f5194e;
                b8.p.b(obj);
                cVar = cVar2;
                lVar.y1(cVar.a());
                lVar.L = null;
                return b8.z.f1016a;
            }
            d1.c cVar3 = (d1.c) this.f5195f;
            l lVar2 = (l) this.f5194e;
            b8.p.b(obj);
            cVar = cVar3;
            lVar = lVar2;
            int b12 = ((d1.d) cVar).b();
            this.f5194e = lVar;
            this.f5195f = cVar;
            this.f5196g = 2;
            if (lVar.D0(b12, this) == c10) {
                return c10;
            }
            cVar2 = cVar;
            cVar = cVar2;
            lVar.y1(cVar.a());
            lVar.L = null;
            return b8.z.f1016a;
        }
    }

    @kotlin.coroutines.jvm.internal.e(c = "com.epicgames.portal.presentation.feature.home.MainViewModel$navigatePdpFromGameUpdate$1", f = "MainViewModel.kt", l = {483}, m = "invokeSuspend")
    public static final class q extends kotlin.coroutines.jvm.internal.k implements l8.p<CoroutineScope, Continuation<? super b8.z>, Object> {

        Object f5198e;

        Object f5199f;

        int f5200g;

        q(Continuation<? super q> continuation) {
            super(2, continuation);
        }

        @Override
        public final Continuation<b8.z> create(Object obj, Continuation<?> continuation) {
            return new q(continuation);
        }

        @Override
        public final Object mo9invoke(CoroutineScope coroutineScope, Continuation<? super b8.z> continuation) {
            return ((q) create(coroutineScope, continuation)).invokeSuspend(b8.z.f1016a);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            Object c10;
            l lVar;
            Object obj2;
            GameAppModel gameAppModel;
            c10 = f8.d.c();
            int i10 = this.f5200g;
            if (i10 == 0) {
                b8.p.b(obj);
                if (l.this.N != null) {
                    lVar = l.this;
                    List<AppModel> b10 = lVar.f5101h.b();
                    ArrayList arrayList = new ArrayList();
                    for (Object obj3 : b10) {
                        if (obj3 instanceof GameAppModel) {
                            arrayList.add(obj3);
                        }
                    }
                    Iterator it = arrayList.iterator();
                    while (true) {
                        if (!it.hasNext()) {
                            obj2 = null;
                            break;
                        }
                        obj2 = it.next();
                        if (kotlin.jvm.internal.o.b(((GameAppModel) obj2).getLastSeenPackageName(), lVar.N)) {
                            break;
                        }
                    }
                    GameAppModel gameAppModel2 = (GameAppModel) obj2;
                    if (gameAppModel2 != null) {
                        lVar.f5114u.l();
                        this.f5198e = lVar;
                        this.f5199f = gameAppModel2;
                        this.f5200g = 1;
                        if (w0.a(300L, this) == c10) {
                            return c10;
                        }
                        gameAppModel = gameAppModel2;
                    }
                    lVar.N = null;
                }
                return b8.z.f1016a;
            }
            if (i10 != 1) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            gameAppModel = (GameAppModel) this.f5199f;
            lVar = (l) this.f5198e;
            b8.p.b(obj);
            lVar.y1(gameAppModel.getNamespace());
            lVar.f5119z.c(gameAppModel.getLastSeenPackageName());
            lVar.N = null;
            return b8.z.f1016a;
        }
    }

    @kotlin.coroutines.jvm.internal.e(c = "com.epicgames.portal.presentation.feature.home.MainViewModel$observeConnectivity$1", f = "MainViewModel.kt", l = {386}, m = "invokeSuspend")
    public static final class r extends kotlin.coroutines.jvm.internal.k implements l8.p<CoroutineScope, Continuation<? super b8.z>, Object> {

        int f5202e;

        @kotlin.coroutines.jvm.internal.e(c = "com.epicgames.portal.presentation.feature.home.MainViewModel$observeConnectivity$1$1", f = "MainViewModel.kt", l = {}, m = "invokeSuspend")
        public static final class a extends kotlin.coroutines.jvm.internal.k implements l8.p<ConnectionType, Continuation<? super b8.z>, Object> {

            int f5204e;

            Object f5205f;

            final l f5206g;

            a(l lVar, Continuation<? super a> continuation) {
                super(2, continuation);
                this.f5206g = lVar;
            }

            @Override
            public final Continuation<b8.z> create(Object obj, Continuation<?> continuation) {
                a aVar = new a(this.f5206g, continuation);
                aVar.f5205f = obj;
                return aVar;
            }

            @Override
            public final Object invokeSuspend(Object obj) {
                String str;
                f8.d.c();
                if (this.f5204e == 0) {
                    b8.p.b(obj);
                    ConnectionType connectionType = (ConnectionType) this.f5205f;
                    str = g1.m.f5226a;
                    this.f5206g.f("connection state changes = " + connectionType, str);
                    l lVar = this.f5206g;
                    lVar.Q = lVar.f5103j.b(connectionType) ^ true;
                    this.f5206g.R = connectionType;
                    this.f5206g.c2();
                    if (this.f5206g.X0()) {
                        this.f5206g.d2();
                    }
                    if (this.f5206g.R != ConnectionType.Cell) {
                        this.f5206g.U0();
                    }
                    return b8.z.f1016a;
                }
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }

            @Override
            public final Object mo9invoke(ConnectionType connectionType, Continuation<? super b8.z> continuation) {
                return ((a) create(connectionType, continuation)).invokeSuspend(b8.z.f1016a);
            }
        }

        r(Continuation<? super r> continuation) {
            super(2, continuation);
        }

        @Override
        public final Continuation<b8.z> create(Object obj, Continuation<?> continuation) {
            return new r(continuation);
        }

        @Override
        public final Object mo9invoke(CoroutineScope coroutineScope, Continuation<? super b8.z> continuation) {
            return ((r) create(coroutineScope, continuation)).invokeSuspend(b8.z.f1016a);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            Object c10;
            c10 = f8.d.c();
            int i10 = this.f5202e;
            if (i10 == 0) {
                b8.p.b(obj);
                kotlinx.coroutines.flow.e x10 = kotlinx.coroutines.flow.g.x(kotlinx.coroutines.flow.g.k(l.this.f5102i.a()), new a(l.this, null));
                this.f5202e = 1;
                if (kotlinx.coroutines.flow.g.i(x10, this) == c10) {
                    return c10;
                }
            } else {
                if (i10 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                b8.p.b(obj);
            }
            return b8.z.f1016a;
        }
    }

    @kotlin.coroutines.jvm.internal.e(c = "com.epicgames.portal.presentation.feature.home.MainViewModel$onAppInForeground$1", f = "MainViewModel.kt", l = {331}, m = "invokeSuspend")
    static final class s extends kotlin.coroutines.jvm.internal.k implements l8.p<CoroutineScope, Continuation<? super b8.z>, Object> {

        Object f5207e;

        int f5208f;

        s(Continuation<? super s> continuation) {
            super(2, continuation);
        }

        @Override
        public final Continuation<b8.z> create(Object obj, Continuation<?> continuation) {
            return new s(continuation);
        }

        @Override
        public final Object mo9invoke(CoroutineScope coroutineScope, Continuation<? super b8.z> continuation) {
            return ((s) create(coroutineScope, continuation)).invokeSuspend(b8.z.f1016a);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            Object c10;
            AnalyticTrackerHelper analyticTrackerHelper;
            c10 = f8.d.c();
            int i10 = this.f5208f;
            if (i10 == 0) {
                b8.p.b(obj);
                AnalyticTrackerHelper analyticTrackerHelper2 = l.this.f5114u;
                b3.a aVar = l.this.f5110q;
                this.f5207e = analyticTrackerHelper2;
                this.f5208f = 1;
                Object a10 = aVar.a(this);
                if (a10 == c10) {
                    return c10;
                }
                analyticTrackerHelper = analyticTrackerHelper2;
                obj = a10;
            } else {
                if (i10 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                analyticTrackerHelper = (AnalyticTrackerHelper) this.f5207e;
                b8.p.b(obj);
            }
            analyticTrackerHelper.b(b3.g.a((b3.f) obj));
            return b8.z.f1016a;
        }
    }

    @kotlin.coroutines.jvm.internal.e(c = "com.epicgames.portal.presentation.feature.home.MainViewModel$onExternalLinkClicked$1", f = "MainViewModel.kt", l = {}, m = "invokeSuspend")
    public static final class t extends kotlin.coroutines.jvm.internal.k implements l8.p<CoroutineScope, Continuation<? super b8.z>, Object> {

        int f5210e;

        final String f5212g;

        t(String str, Continuation<? super t> continuation) {
            super(2, continuation);
            this.f5212g = str;
        }

        @Override
        public final Continuation<b8.z> create(Object obj, Continuation<?> continuation) {
            return new t(this.f5212g, continuation);
        }

        @Override
        public final Object mo9invoke(CoroutineScope coroutineScope, Continuation<? super b8.z> continuation) {
            return ((t) create(coroutineScope, continuation)).invokeSuspend(b8.z.f1016a);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            f8.d.c();
            if (this.f5210e == 0) {
                b8.p.b(obj);
                l.this.F0(new Event.OpenSupportLink(this.f5212g));
                return b8.z.f1016a;
            }
            throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
        }
    }

    @kotlin.coroutines.jvm.internal.e(c = "com.epicgames.portal.presentation.feature.home.MainViewModel$onHibernationDisableClick$1", f = "MainViewModel.kt", l = {592}, m = "invokeSuspend")
    public static final class u extends kotlin.coroutines.jvm.internal.k implements l8.p<CoroutineScope, Continuation<? super b8.z>, Object> {

        int f5213e;

        u(Continuation<? super u> continuation) {
            super(2, continuation);
        }

        @Override
        public final Continuation<b8.z> create(Object obj, Continuation<?> continuation) {
            return new u(continuation);
        }

        @Override
        public final Object mo9invoke(CoroutineScope coroutineScope, Continuation<? super b8.z> continuation) {
            return ((u) create(coroutineScope, continuation)).invokeSuspend(b8.z.f1016a);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            Object c10;
            c10 = f8.d.c();
            int i10 = this.f5213e;
            if (i10 == 0) {
                b8.p.b(obj);
                HibernationRepository hibernationRepository = l.this.f5109p;
                this.f5213e = 1;
                if (hibernationRepository.e(true, this) == c10) {
                    return c10;
                }
            } else {
                if (i10 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                b8.p.b(obj);
            }
            l.this.m1();
            l.this.f5114u.h("Dismiss");
            return b8.z.f1016a;
        }
    }

    @kotlin.coroutines.jvm.internal.e(c = "com.epicgames.portal.presentation.feature.home.MainViewModel$onHibernationDismissClick$1", f = "MainViewModel.kt", l = {TypedValues.MotionType.TYPE_ANIMATE_CIRCLEANGLE_TO, TypedValues.MotionType.TYPE_PATHMOTION_ARC}, m = "invokeSuspend")
    public static final class v extends kotlin.coroutines.jvm.internal.k implements l8.p<CoroutineScope, Continuation<? super b8.z>, Object> {

        int f5215e;

        v(Continuation<? super v> continuation) {
            super(2, continuation);
        }

        @Override
        public final Continuation<b8.z> create(Object obj, Continuation<?> continuation) {
            return new v(continuation);
        }

        @Override
        public final Object mo9invoke(CoroutineScope coroutineScope, Continuation<? super b8.z> continuation) {
            return ((v) create(coroutineScope, continuation)).invokeSuspend(b8.z.f1016a);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            Object c10;
            c10 = f8.d.c();
            int i10 = this.f5215e;
            if (i10 == 0) {
                b8.p.b(obj);
                l lVar = l.this;
                this.f5215e = 1;
                obj = lVar.S1(this);
                if (obj == c10) {
                    return c10;
                }
            } else {
                if (i10 != 1) {
                    if (i10 != 2) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    b8.p.b(obj);
                    return b8.z.f1016a;
                }
                b8.p.b(obj);
            }
            if (((Boolean) obj).booleanValue()) {
                l lVar2 = l.this;
                this.f5215e = 2;
                if (lVar2.X1(this) == c10) {
                    return c10;
                }
            } else {
                l.this.e2();
            }
            return b8.z.f1016a;
        }
    }

    @kotlin.coroutines.jvm.internal.e(c = "com.epicgames.portal.presentation.feature.home.MainViewModel$onHibernationNotificationClick$1", f = "MainViewModel.kt", l = {351}, m = "invokeSuspend")
    public static final class w extends kotlin.coroutines.jvm.internal.k implements l8.p<CoroutineScope, Continuation<? super b8.z>, Object> {

        int f5217e;

        w(Continuation<? super w> continuation) {
            super(2, continuation);
        }

        @Override
        public final Continuation<b8.z> create(Object obj, Continuation<?> continuation) {
            return new w(continuation);
        }

        @Override
        public final Object mo9invoke(CoroutineScope coroutineScope, Continuation<? super b8.z> continuation) {
            return ((w) create(coroutineScope, continuation)).invokeSuspend(b8.z.f1016a);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            Object c10;
            c10 = f8.d.c();
            int i10 = this.f5217e;
            if (i10 == 0) {
                b8.p.b(obj);
                x2.b bVar = l.this.f5113t;
                this.f5217e = 1;
                if (bVar.a(this) == c10) {
                    return c10;
                }
            } else {
                if (i10 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                b8.p.b(obj);
            }
            l.this.f5114u.m("Notification_container");
            return b8.z.f1016a;
        }
    }

    @kotlin.coroutines.jvm.internal.e(c = "com.epicgames.portal.presentation.feature.home.MainViewModel$onSupportLinkClicked$1", f = "MainViewModel.kt", l = {}, m = "invokeSuspend")
    public static final class x extends kotlin.coroutines.jvm.internal.k implements l8.p<CoroutineScope, Continuation<? super b8.z>, Object> {

        int f5219e;

        x(Continuation<? super x> continuation) {
            super(2, continuation);
        }

        @Override
        public final Continuation<b8.z> create(Object obj, Continuation<?> continuation) {
            return new x(continuation);
        }

        @Override
        public final Object mo9invoke(CoroutineScope coroutineScope, Continuation<? super b8.z> continuation) {
            return ((x) create(coroutineScope, continuation)).invokeSuspend(b8.z.f1016a);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            f8.d.c();
            if (this.f5219e == 0) {
                b8.p.b(obj);
                l.this.F0(new Event.OpenSupportLink("https://www.epicgames.com/help/en-US/epic-games-store-c5719341124379 "));
                return b8.z.f1016a;
            }
            throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
        }
    }

    public static final class y extends n3.a {

        final ToastModel f5222b;

        y(ToastModel toastModel) {
            super(0L, 0L, 3, null);
            this.f5222b = toastModel;
        }

        @Override
        public void onFinish() {
            l.this.G1(this.f5222b);
        }
    }

    @kotlin.coroutines.jvm.internal.e(c = "com.epicgames.portal.presentation.feature.home.MainViewModel$onToastDeleteClicked$1", f = "MainViewModel.kt", l = {633}, m = "invokeSuspend")
    public static final class z extends kotlin.coroutines.jvm.internal.k implements l8.p<CoroutineScope, Continuation<? super b8.z>, Object> {

        int f5223e;

        final ToastModel f5224f;

        final l f5225g;

        z(ToastModel toastModel, l lVar, Continuation<? super z> continuation) {
            super(2, continuation);
            this.f5224f = toastModel;
            this.f5225g = lVar;
        }

        @Override
        public final Continuation<b8.z> create(Object obj, Continuation<?> continuation) {
            return new z(this.f5224f, this.f5225g, continuation);
        }

        @Override
        public final Object mo9invoke(CoroutineScope coroutineScope, Continuation<? super b8.z> continuation) {
            return ((z) create(coroutineScope, continuation)).invokeSuspend(b8.z.f1016a);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            Object c10;
            c10 = f8.d.c();
            int i10 = this.f5223e;
            if (i10 == 0) {
                b8.p.b(obj);
                ToastModel toastModel = this.f5224f;
                if (toastModel instanceof NotificationToast) {
                    l lVar = this.f5225g;
                    int id = toastModel.getId();
                    this.f5223e = 1;
                    if (lVar.D0(id, this) == c10) {
                        return c10;
                    }
                } else {
                    this.f5225g.C0(toastModel);
                }
            } else {
                if (i10 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                b8.p.b(obj);
            }
            return b8.z.f1016a;
        }
    }

    public l(x0.b appRepository, g1.d observer, m3.e networkUtils, t0.c featureFlagsRemoteDataSource, Settings settings, r0.d settingsHelper, m3.h silentUpdateUtils, z2.c silentUpdateManagerHelper, HibernationRepository hibernationRepository, b3.a getHibernationState, x2.d showAutoUpdateDialogUseCase, i3.g notificationsRepository, x2.b getHibernationDialogState, AnalyticTrackerHelper tracker, g0.a notificationManager, r1.a launcherVersionChecker, x2.c scheduleHibernationNotification, CancelHibernationNotificationUseCase cancelHibernationNotificationUseCase, k1.a libraryHelper, i0.b coilManager, f1.a errorMapper, SavedStateHandle savedStateHandle, m3.c delayHelper, String eulaKey, String autoUpdateEnabledMessage, ApplicationLifecycleObserver applicationLifecycleObserver, i0.c coroutineDispatcherProvider, i0.e launcherLogger) {
        super(applicationLifecycleObserver, coroutineDispatcherProvider, launcherLogger);
        MutableState mutableStateOf$default;
        kotlin.jvm.internal.o.g(appRepository, "appRepository");
        kotlin.jvm.internal.o.g(observer, "observer");
        kotlin.jvm.internal.o.g(networkUtils, "networkUtils");
        kotlin.jvm.internal.o.g(featureFlagsRemoteDataSource, "featureFlagsRemoteDataSource");
        kotlin.jvm.internal.o.g(settings, "settings");
        kotlin.jvm.internal.o.g(settingsHelper, "settingsHelper");
        kotlin.jvm.internal.o.g(silentUpdateUtils, "silentUpdateUtils");
        kotlin.jvm.internal.o.g(silentUpdateManagerHelper, "silentUpdateManagerHelper");
        kotlin.jvm.internal.o.g(hibernationRepository, "hibernationRepository");
        kotlin.jvm.internal.o.g(getHibernationState, "getHibernationState");
        kotlin.jvm.internal.o.g(showAutoUpdateDialogUseCase, "showAutoUpdateDialogUseCase");
        kotlin.jvm.internal.o.g(notificationsRepository, "notificationsRepository");
        kotlin.jvm.internal.o.g(getHibernationDialogState, "getHibernationDialogState");
        kotlin.jvm.internal.o.g(tracker, "tracker");
        kotlin.jvm.internal.o.g(notificationManager, "notificationManager");
        kotlin.jvm.internal.o.g(launcherVersionChecker, "launcherVersionChecker");
        kotlin.jvm.internal.o.g(scheduleHibernationNotification, "scheduleHibernationNotification");
        kotlin.jvm.internal.o.g(cancelHibernationNotificationUseCase, "cancelHibernationNotificationUseCase");
        kotlin.jvm.internal.o.g(libraryHelper, "libraryHelper");
        kotlin.jvm.internal.o.g(coilManager, "coilManager");
        kotlin.jvm.internal.o.g(errorMapper, "errorMapper");
        kotlin.jvm.internal.o.g(savedStateHandle, "savedStateHandle");
        kotlin.jvm.internal.o.g(delayHelper, "delayHelper");
        kotlin.jvm.internal.o.g(eulaKey, "eulaKey");
        kotlin.jvm.internal.o.g(autoUpdateEnabledMessage, "autoUpdateEnabledMessage");
        kotlin.jvm.internal.o.g(applicationLifecycleObserver, "applicationLifecycleObserver");
        kotlin.jvm.internal.o.g(coroutineDispatcherProvider, "coroutineDispatcherProvider");
        kotlin.jvm.internal.o.g(launcherLogger, "launcherLogger");
        this.f5101h = appRepository;
        this.f5102i = observer;
        this.f5103j = networkUtils;
        this.f5104k = featureFlagsRemoteDataSource;
        this.f5105l = settings;
        this.f5106m = settingsHelper;
        this.f5107n = silentUpdateUtils;
        this.f5108o = silentUpdateManagerHelper;
        this.f5109p = hibernationRepository;
        this.f5110q = getHibernationState;
        this.f5111r = showAutoUpdateDialogUseCase;
        this.f5112s = notificationsRepository;
        this.f5113t = getHibernationDialogState;
        this.f5114u = tracker;
        this.f5115v = notificationManager;
        this.f5116w = launcherVersionChecker;
        this.f5117x = scheduleHibernationNotification;
        this.f5118y = cancelHibernationNotificationUseCase;
        this.f5119z = libraryHelper;
        this.A = coilManager;
        this.B = errorMapper;
        this.C = savedStateHandle;
        this.D = delayHelper;
        this.E = eulaKey;
        this.F = autoUpdateEnabledMessage;
        State state = (State) savedStateHandle.get("saved-state-handle-ui-state");
        mutableStateOf$default = SnapshotStateKt__SnapshotStateKt.mutableStateOf$default(state == null ? new State(false, false, false, false, false, false, false, null, null, null, null, false, false, null, false, null, 65535, null) : state, null, 2, null);
        this.G = mutableStateOf$default;
        x6.a aVar = new x6.a();
        this.H = aVar;
        this.J = new LinkedHashSet<>();
        this.K = new LinkedHashSet<>();
        this.O = new ArrayList();
        this.P = true;
        this.Q = true;
        this.R = ConnectionType.None;
        this.S = Status.Unknown;
        d(new a(null));
        e(new b(null));
        N1();
        b1();
        u6.e<SettingsChangedArgs> m10 = settings.m();
        final c cVar = new c();
        aVar.b(m10.i(new z6.e() {
            @Override
            public final void accept(Object obj) {
                l.i(l8.l.this, obj);
            }
        }));
    }

    private final z1 A0() {
        return d(new e(null));
    }

    public final boolean B0() {
        Status status;
        return !this.P && ((status = this.S) == Status.Preparing || status == Status.Done || status == Status.Canceling || status == Status.Canceled || status == Status.Installing || status == Status.Unknown);
    }

    public static void B1(l lVar, boolean z10, int i10, Object obj) {
        if ((i10 & 1) != 0) {
            z10 = false;
        }
        lVar.A1(z10);
    }

    public final void C0(ToastModel toastModel) {
        this.K.remove(toastModel);
        I0();
    }

    public final Object D0(int i10, Continuation<? super b8.z> continuation) {
        f fVar;
        Object c10;
        int i11;
        l lVar;
        if (continuation instanceof f) {
            fVar = (f) continuation;
            int i12 = fVar.f5149i;
            if ((i12 & Integer.MIN_VALUE) != 0) {
                fVar.f5149i = i12 - Integer.MIN_VALUE;
                Object obj = fVar.f5147g;
                c10 = f8.d.c();
                i11 = fVar.f5149i;
                if (i11 != 0) {
                    b8.p.b(obj);
                    i3.g gVar = this.f5112s;
                    fVar.f5145e = this;
                    fVar.f5146f = i10;
                    fVar.f5149i = 1;
                    if (gVar.l(i10, fVar) == c10) {
                        return c10;
                    }
                    lVar = this;
                } else {
                    if (i11 != 1) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    i10 = fVar.f5146f;
                    lVar = (l) fVar.f5145e;
                    b8.p.b(obj);
                }
                lVar.N0();
                lVar.f5115v.a(i10);
                lVar.I0();
                return b8.z.f1016a;
            }
        }
        fVar = new f(continuation);
        Object obj2 = fVar.f5147g;
        c10 = f8.d.c();
        i11 = fVar.f5149i;
        if (i11 != 0) {
        }
        lVar.N0();
        lVar.f5115v.a(i10);
        lVar.I0();
        return b8.z.f1016a;
    }

    private final void E0(boolean z10) {
        State a10;
        this.I = z10;
        a10 = r1.a((r34 & 1) != 0 ? r1.f2101e : false, (r34 & 2) != 0 ? r1.f2102f : false, (r34 & 4) != 0 ? r1.f2103g : false, (r34 & 8) != 0 ? r1.f2104h : false, (r34 & 16) != 0 ? r1.f2105i : false, (r34 & 32) != 0 ? r1.f2106j : z10, (r34 & 64) != 0 ? r1.f2107k : false, (r34 & 128) != 0 ? r1.f2108l : null, (r34 & 256) != 0 ? r1.f2109m : null, (r34 & 512) != 0 ? r1.f2110n : null, (r34 & 1024) != 0 ? r1.f2111o : null, (r34 & 2048) != 0 ? r1.f2112p : false, (r34 & 4096) != 0 ? r1.f2113q : false, (r34 & 8192) != 0 ? r1.f2114r : null, (r34 & 16384) != 0 ? r1.f2115s : false, (r34 & 32768) != 0 ? R0().f2116t : null);
        R1(a10);
    }

    public final void F0(Event event) {
        List t02;
        State a10;
        State R0 = R0();
        t02 = kotlin.collections.e0.t0(R0().m(), event);
        a10 = R0.a((r34 & 1) != 0 ? R0.f2101e : false, (r34 & 2) != 0 ? R0.f2102f : false, (r34 & 4) != 0 ? R0.f2103g : false, (r34 & 8) != 0 ? R0.f2104h : false, (r34 & 16) != 0 ? R0.f2105i : false, (r34 & 32) != 0 ? R0.f2106j : false, (r34 & 64) != 0 ? R0.f2107k : false, (r34 & 128) != 0 ? R0.f2108l : null, (r34 & 256) != 0 ? R0.f2109m : null, (r34 & 512) != 0 ? R0.f2110n : t02, (r34 & 1024) != 0 ? R0.f2111o : null, (r34 & 2048) != 0 ? R0.f2112p : false, (r34 & 4096) != 0 ? R0.f2113q : false, (r34 & 8192) != 0 ? R0.f2114r : null, (r34 & 16384) != 0 ? R0.f2115s : false, (r34 & 32768) != 0 ? R0.f2116t : null);
        R1(a10);
    }

    public final void G0(boolean z10) {
        State a10;
        this.I = z10;
        a10 = r1.a((r34 & 1) != 0 ? r1.f2101e : false, (r34 & 2) != 0 ? r1.f2102f : false, (r34 & 4) != 0 ? r1.f2103g : false, (r34 & 8) != 0 ? r1.f2104h : false, (r34 & 16) != 0 ? r1.f2105i : false, (r34 & 32) != 0 ? r1.f2106j : false, (r34 & 64) != 0 ? r1.f2107k : z10, (r34 & 128) != 0 ? r1.f2108l : null, (r34 & 256) != 0 ? r1.f2109m : null, (r34 & 512) != 0 ? r1.f2110n : null, (r34 & 1024) != 0 ? r1.f2111o : null, (r34 & 2048) != 0 ? r1.f2112p : false, (r34 & 4096) != 0 ? r1.f2113q : false, (r34 & 8192) != 0 ? r1.f2114r : null, (r34 & 16384) != 0 ? r1.f2115s : false, (r34 & 32768) != 0 ? R0().f2116t : null);
        R1(a10);
    }

    public final void H0(Screen screen) {
        e(new g(screen, null));
    }

    private final z1 I0() {
        return e(new h(null));
    }

    public final z1 J0() {
        return e(new i(null));
    }

    public final Object K0(Continuation<? super b8.z> continuation) {
        j jVar;
        Object c10;
        int i10;
        Object a10;
        l lVar;
        List list;
        Object c02;
        LauncherAppModel launcherAppModel;
        Object b10;
        Object obj;
        l lVar2;
        Throwable e10;
        String TAG;
        if (continuation instanceof j) {
            jVar = (j) continuation;
            int i11 = jVar.f5174j;
            if ((i11 & Integer.MIN_VALUE) != 0) {
                jVar.f5174j = i11 - Integer.MIN_VALUE;
                Object obj2 = jVar.f5172h;
                c10 = f8.d.c();
                i10 = jVar.f5174j;
                boolean z10 = false;
                if (i10 != 0) {
                    b8.p.b(obj2);
                    x0.b bVar = this.f5101h;
                    jVar.f5169e = this;
                    jVar.f5174j = 1;
                    a10 = bVar.a(jVar);
                    if (a10 == c10) {
                        return c10;
                    }
                    lVar = this;
                } else {
                    if (i10 != 1) {
                        if (i10 != 2) {
                            if (i10 != 3) {
                                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                            }
                            obj = jVar.f5170f;
                            lVar2 = (l) jVar.f5169e;
                            b8.p.b(obj2);
                            lVar = lVar2;
                            if (((Boolean) obj2).booleanValue()) {
                                a10 = obj;
                            } else {
                                a10 = obj;
                                z10 = true;
                            }
                            lVar.e(new k(z10, null));
                            e10 = b8.o.e(a10);
                            if (e10 != null) {
                                TAG = g1.m.f5226a;
                                kotlin.jvm.internal.o.f(TAG, "TAG");
                                lVar.f(TAG, "fetchAppList: onFailure " + e10.getStackTrace());
                                lVar.e(new m(null));
                            }
                            return b8.z.f1016a;
                        }
                        List list2 = (List) jVar.f5171g;
                        Object obj3 = jVar.f5170f;
                        l lVar3 = (l) jVar.f5169e;
                        b8.p.b(obj2);
                        a10 = obj3;
                        list = list2;
                        lVar = lVar3;
                        ArrayList arrayList = new ArrayList();
                        for (Object obj4 : list) {
                            if (obj4 instanceof LauncherAppModel) {
                                arrayList.add(obj4);
                            }
                        }
                        c02 = kotlin.collections.e0.c0(arrayList);
                        launcherAppModel = (LauncherAppModel) c02;
                        if (!(launcherAppModel == null ? launcherAppModel.isAppLastVersion() : false) && lVar.f5106m.o()) {
                            t0.c cVar = lVar.f5104k;
                            jVar.f5169e = lVar;
                            jVar.f5170f = a10;
                            jVar.f5171g = null;
                            jVar.f5174j = 3;
                            b10 = cVar.b(jVar);
                            if (b10 != c10) {
                                return c10;
                            }
                            obj = a10;
                            obj2 = b10;
                            lVar2 = lVar;
                            lVar = lVar2;
                            if (((Boolean) obj2).booleanValue()) {
                            }
                        }
                        lVar.e(new k(z10, null));
                        e10 = b8.o.e(a10);
                        if (e10 != null) {
                        }
                        return b8.z.f1016a;
                    }
                    lVar = (l) jVar.f5169e;
                    b8.p.b(obj2);
                    a10 = ((b8.o) obj2).x();
                }
                if (b8.o.u(a10)) {
                    list = (List) a10;
                    t0 c11 = lVar.c(new C0173l(list, null));
                    jVar.f5169e = lVar;
                    jVar.f5170f = a10;
                    jVar.f5171g = list;
                    jVar.f5174j = 2;
                    if (c11.f0(jVar) == c10) {
                        return c10;
                    }
                    ArrayList arrayList2 = new ArrayList();
                    while (r8.hasNext()) {
                    }
                    c02 = kotlin.collections.e0.c0(arrayList2);
                    launcherAppModel = (LauncherAppModel) c02;
                    if (!(launcherAppModel == null ? launcherAppModel.isAppLastVersion() : false)) {
                        t0.c cVar2 = lVar.f5104k;
                        jVar.f5169e = lVar;
                        jVar.f5170f = a10;
                        jVar.f5171g = null;
                        jVar.f5174j = 3;
                        b10 = cVar2.b(jVar);
                        if (b10 != c10) {
                        }
                    }
                    lVar.e(new k(z10, null));
                }
                e10 = b8.o.e(a10);
                if (e10 != null) {
                }
                return b8.z.f1016a;
            }
        }
        jVar = new j(continuation);
        Object obj22 = jVar.f5172h;
        c10 = f8.d.c();
        i10 = jVar.f5174j;
        boolean z102 = false;
        if (i10 != 0) {
        }
        if (b8.o.u(a10)) {
        }
        e10 = b8.o.e(a10);
        if (e10 != null) {
        }
        return b8.z.f1016a;
    }

    private final z1 K1() {
        return e(new b0(null));
    }

    public final void L0() {
        State a10;
        a10 = r0.a((r34 & 1) != 0 ? r0.f2101e : false, (r34 & 2) != 0 ? r0.f2102f : false, (r34 & 4) != 0 ? r0.f2103g : false, (r34 & 8) != 0 ? r0.f2104h : false, (r34 & 16) != 0 ? r0.f2105i : false, (r34 & 32) != 0 ? r0.f2106j : false, (r34 & 64) != 0 ? r0.f2107k : false, (r34 & 128) != 0 ? r0.f2108l : null, (r34 & 256) != 0 ? r0.f2109m : null, (r34 & 512) != 0 ? r0.f2110n : null, (r34 & 1024) != 0 ? r0.f2111o : null, (r34 & 2048) != 0 ? r0.f2112p : false, (r34 & 4096) != 0 ? r0.f2113q : false, (r34 & 8192) != 0 ? r0.f2114r : null, (r34 & 16384) != 0 ? r0.f2115s : false, (r34 & 32768) != 0 ? R0().f2116t : null);
        R1(a10);
    }

    private final GeneralToast M0(String str) {
        return new GeneralToast(str.hashCode(), str);
    }

    private final z1 N0() {
        return e(new n(null));
    }

    private final void N1() {
        k1.a aVar = this.f5119z;
        k1.d a10 = aVar.a(new d0());
        this.M = a10;
        aVar.f(a10);
    }

    public final Object O0(Continuation<? super List<GameUpdatedNotification>> continuation) {
        o oVar;
        Object c10;
        int i10;
        List list;
        List k10;
        if (continuation instanceof o) {
            oVar = (o) continuation;
            int i11 = oVar.f5193g;
            if ((i11 & Integer.MIN_VALUE) != 0) {
                oVar.f5193g = i11 - Integer.MIN_VALUE;
                Object obj = oVar.f5191e;
                c10 = f8.d.c();
                i10 = oVar.f5193g;
                if (i10 != 0) {
                    b8.p.b(obj);
                    kotlinx.coroutines.flow.e<List<GameUpdatedNotification>> h10 = this.f5112s.h();
                    oVar.f5193g = 1;
                    obj = kotlinx.coroutines.flow.g.r(h10, oVar);
                    if (obj == c10) {
                        return c10;
                    }
                } else {
                    if (i10 != 1) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    b8.p.b(obj);
                }
                list = (List) obj;
                if (list == null) {
                    return list;
                }
                k10 = kotlin.collections.w.k();
                return k10;
            }
        }
        oVar = new o(continuation);
        Object obj2 = oVar.f5191e;
        c10 = f8.d.c();
        i10 = oVar.f5193g;
        if (i10 != 0) {
        }
        list = (List) obj2;
        if (list == null) {
        }
    }

    private final void O1() {
        k1.d dVar = this.M;
        if (dVar != null) {
            this.f5119z.j(dVar);
        }
    }

    public final void P0() {
        this.f5119z.g();
    }

    private final void P1(Screen screen) {
        if (V0(screen)) {
            return;
        }
        H0(screen);
        b2();
    }

    public final List<ToastModel> Q0() {
        Set h10;
        List<ToastModel> G0;
        h10 = x0.h(this.K, this.J);
        G0 = kotlin.collections.e0.G0(h10);
        return G0;
    }

    private final void Q1(boolean z10) {
        e(new e0(z10, null));
    }

    public final void R1(State state) {
        this.G.setValue(state);
    }

    public final void S0() {
        State a10;
        a10 = r0.a((r34 & 1) != 0 ? r0.f2101e : false, (r34 & 2) != 0 ? r0.f2102f : false, (r34 & 4) != 0 ? r0.f2103g : false, (r34 & 8) != 0 ? r0.f2104h : false, (r34 & 16) != 0 ? r0.f2105i : false, (r34 & 32) != 0 ? r0.f2106j : false, (r34 & 64) != 0 ? r0.f2107k : false, (r34 & 128) != 0 ? r0.f2108l : null, (r34 & 256) != 0 ? r0.f2109m : null, (r34 & 512) != 0 ? r0.f2110n : null, (r34 & 1024) != 0 ? r0.f2111o : null, (r34 & 2048) != 0 ? r0.f2112p : false, (r34 & 4096) != 0 ? r0.f2113q : false, (r34 & 8192) != 0 ? r0.f2114r : "", (r34 & 16384) != 0 ? r0.f2115s : false, (r34 & 32768) != 0 ? R0().f2116t : null);
        R1(a10);
    }

    public final Object S1(Continuation<? super Boolean> continuation) {
        f0 f0Var;
        Object c10;
        int i10;
        Object a10;
        if (continuation instanceof f0) {
            f0Var = (f0) continuation;
            int i11 = f0Var.f5152g;
            if ((i11 & Integer.MIN_VALUE) != 0) {
                f0Var.f5152g = i11 - Integer.MIN_VALUE;
                Object obj = f0Var.f5150e;
                c10 = f8.d.c();
                i10 = f0Var.f5152g;
                boolean z10 = false;
                if (i10 != 0) {
                    b8.p.b(obj);
                    if (T1()) {
                        x2.d dVar = this.f5111r;
                        f0Var.f5152g = 1;
                        a10 = dVar.a(f0Var);
                        if (a10 == c10) {
                            return c10;
                        }
                    }
                    return kotlin.coroutines.jvm.internal.b.a(z10);
                }
                if (i10 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                b8.p.b(obj);
                a10 = ((b8.o) obj).x();
                Boolean a11 = kotlin.coroutines.jvm.internal.b.a(false);
                if (b8.o.r(a10)) {
                    a10 = a11;
                }
                if (((Boolean) a10).booleanValue()) {
                    z10 = true;
                }
                return kotlin.coroutines.jvm.internal.b.a(z10);
            }
        }
        f0Var = new f0(continuation);
        Object obj2 = f0Var.f5150e;
        c10 = f8.d.c();
        i10 = f0Var.f5152g;
        boolean z102 = false;
        if (i10 != 0) {
        }
        Boolean a112 = kotlin.coroutines.jvm.internal.b.a(false);
        if (b8.o.r(a10)) {
        }
        if (((Boolean) a10).booleanValue()) {
        }
        return kotlin.coroutines.jvm.internal.b.a(z102);
    }

    private final void T0() {
        State a10;
        a10 = r0.a((r34 & 1) != 0 ? r0.f2101e : false, (r34 & 2) != 0 ? r0.f2102f : false, (r34 & 4) != 0 ? r0.f2103g : false, (r34 & 8) != 0 ? r0.f2104h : false, (r34 & 16) != 0 ? r0.f2105i : false, (r34 & 32) != 0 ? r0.f2106j : false, (r34 & 64) != 0 ? r0.f2107k : false, (r34 & 128) != 0 ? r0.f2108l : null, (r34 & 256) != 0 ? r0.f2109m : null, (r34 & 512) != 0 ? r0.f2110n : null, (r34 & 1024) != 0 ? r0.f2111o : null, (r34 & 2048) != 0 ? r0.f2112p : false, (r34 & 4096) != 0 ? r0.f2113q : false, (r34 & 8192) != 0 ? r0.f2114r : null, (r34 & 16384) != 0 ? r0.f2115s : false, (r34 & 32768) != 0 ? R0().f2116t : null);
        R1(a10);
    }

    private final boolean T1() {
        boolean z10;
        boolean D;
        if (!this.I) {
            Screen c10 = R0().c();
            if (!kotlin.jvm.internal.o.b(c10, Screen.Home.f2073g)) {
                D = u8.v.D(c10.a(), "profile/", false, 2, null);
                if (!D) {
                    z10 = false;
                    if (z10) {
                        return true;
                    }
                }
            }
            z10 = true;
            if (z10) {
            }
        }
        return false;
    }

    public final void U0() {
        State a10;
        a10 = r0.a((r34 & 1) != 0 ? r0.f2101e : false, (r34 & 2) != 0 ? r0.f2102f : false, (r34 & 4) != 0 ? r0.f2103g : false, (r34 & 8) != 0 ? r0.f2104h : false, (r34 & 16) != 0 ? r0.f2105i : false, (r34 & 32) != 0 ? r0.f2106j : false, (r34 & 64) != 0 ? r0.f2107k : false, (r34 & 128) != 0 ? r0.f2108l : null, (r34 & 256) != 0 ? r0.f2109m : null, (r34 & 512) != 0 ? r0.f2110n : null, (r34 & 1024) != 0 ? r0.f2111o : null, (r34 & 2048) != 0 ? r0.f2112p : false, (r34 & 4096) != 0 ? r0.f2113q : false, (r34 & 8192) != 0 ? r0.f2114r : null, (r34 & 16384) != 0 ? r0.f2115s : false, (r34 & 32768) != 0 ? R0().f2116t : null);
        R1(a10);
    }

    public final Object U1(Continuation<? super Boolean> continuation) {
        return T1() ? this.f5113t.b(continuation) : kotlin.coroutines.jvm.internal.b.a(false);
    }

    public final boolean V0(Screen screen) {
        return kotlin.jvm.internal.o.b(R0().c().a(), screen.a());
    }

    private final boolean V1() {
        boolean z10;
        boolean D;
        if (!this.Q) {
            Screen c10 = R0().c();
            if (!kotlin.jvm.internal.o.b(c10, Screen.Home.f2073g)) {
                D = u8.v.D(c10.a(), "profile/", false, 2, null);
                if (!D) {
                    z10 = false;
                    if (z10) {
                        return true;
                    }
                }
            }
            z10 = true;
            if (z10) {
            }
        }
        return false;
    }

    public final boolean W0() {
        return this.S == Status.Paused && this.P;
    }

    private final boolean W1() {
        boolean z10;
        boolean D;
        boolean D2;
        boolean D3;
        if (!this.I) {
            Screen c10 = R0().c();
            if (!kotlin.jvm.internal.o.b(c10, Screen.Home.f2073g)) {
                D = u8.v.D(c10.a(), "profile/", false, 2, null);
                if (!D) {
                    D2 = u8.v.D(c10.a(), "settings/", false, 2, null);
                    if (!D2) {
                        D3 = u8.v.D(c10.a(), "legal/", false, 2, null);
                        if (!D3 && !kotlin.jvm.internal.o.b(c10, Screen.Licenses.f2077g)) {
                            z10 = false;
                            if (z10) {
                                return true;
                            }
                        }
                    }
                }
            }
            z10 = true;
            if (z10) {
            }
        }
        return false;
    }

    public final boolean X0() {
        return this.R == ConnectionType.Cell && this.S == Status.DownloadingPreparing && !this.T && this.P && !this.U;
    }

    public final Object X1(Continuation<? super b8.z> continuation) {
        g0 g0Var;
        Object c10;
        int i10;
        l lVar;
        if (continuation instanceof g0) {
            g0Var = (g0) continuation;
            int i11 = g0Var.f5159h;
            if ((i11 & Integer.MIN_VALUE) != 0) {
                g0Var.f5159h = i11 - Integer.MIN_VALUE;
                Object obj = g0Var.f5157f;
                c10 = f8.d.c();
                i10 = g0Var.f5159h;
                if (i10 != 0) {
                    b8.p.b(obj);
                    i3.g gVar = this.f5112s;
                    g0Var.f5156e = this;
                    g0Var.f5159h = 1;
                    if (gVar.n(true, g0Var) == c10) {
                        return c10;
                    }
                    lVar = this;
                } else {
                    if (i10 != 1) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    lVar = (l) g0Var.f5156e;
                    b8.p.b(obj);
                }
                lVar.E0(true);
                return b8.z.f1016a;
            }
        }
        g0Var = new g0(continuation);
        Object obj2 = g0Var.f5157f;
        c10 = f8.d.c();
        i10 = g0Var.f5159h;
        if (i10 != 0) {
        }
        lVar.E0(true);
        return b8.z.f1016a;
    }

    public final boolean Y0(Status status) {
        return status == Status.Done || status == Status.Canceled;
    }

    private final void Y1(ToastModel toastModel) {
        z0(toastModel);
        e2();
    }

    public final z1 Z0() {
        return e(new p(null));
    }

    public final void Z1() {
        e(new h0(null));
    }

    public final z1 a1() {
        return e(new q(null));
    }

    private final void b1() {
        e(new r(null));
    }

    public final void b2() {
        e(new j0(null));
    }

    public final void c2() {
        State a10;
        a10 = r0.a((r34 & 1) != 0 ? r0.f2101e : false, (r34 & 2) != 0 ? r0.f2102f : false, (r34 & 4) != 0 ? r0.f2103g : V1(), (r34 & 8) != 0 ? r0.f2104h : false, (r34 & 16) != 0 ? r0.f2105i : false, (r34 & 32) != 0 ? r0.f2106j : false, (r34 & 64) != 0 ? r0.f2107k : false, (r34 & 128) != 0 ? r0.f2108l : null, (r34 & 256) != 0 ? r0.f2109m : null, (r34 & 512) != 0 ? r0.f2110n : null, (r34 & 1024) != 0 ? r0.f2111o : null, (r34 & 2048) != 0 ? r0.f2112p : false, (r34 & 4096) != 0 ? r0.f2113q : false, (r34 & 8192) != 0 ? r0.f2114r : null, (r34 & 16384) != 0 ? r0.f2115s : false, (r34 & 32768) != 0 ? R0().f2116t : null);
        R1(a10);
    }

    public final void d2() {
        State a10;
        this.f5106m.s(false);
        a10 = r3.a((r34 & 1) != 0 ? r3.f2101e : false, (r34 & 2) != 0 ? r3.f2102f : false, (r34 & 4) != 0 ? r3.f2103g : false, (r34 & 8) != 0 ? r3.f2104h : false, (r34 & 16) != 0 ? r3.f2105i : false, (r34 & 32) != 0 ? r3.f2106j : false, (r34 & 64) != 0 ? r3.f2107k : false, (r34 & 128) != 0 ? r3.f2108l : null, (r34 & 256) != 0 ? r3.f2109m : null, (r34 & 512) != 0 ? r3.f2110n : null, (r34 & 1024) != 0 ? r3.f2111o : null, (r34 & 2048) != 0 ? r3.f2112p : false, (r34 & 4096) != 0 ? r3.f2113q : true, (r34 & 8192) != 0 ? r3.f2114r : null, (r34 & 16384) != 0 ? r3.f2115s : false, (r34 & 32768) != 0 ? R0().f2116t : null);
        R1(a10);
    }

    public final void e2() {
        if (W1()) {
            N0();
            I0();
        }
    }

    public final z1 f2(l8.a<b8.z> aVar) {
        return d(new k0(aVar, null));
    }

    public final NotificationToast g2(GameUpdatedNotification gameUpdatedNotification) {
        int notificationId = gameUpdatedNotification.getNotificationId();
        String userFriendlyGameName = gameUpdatedNotification.getUserFriendlyGameName();
        kotlin.jvm.internal.o.f(userFriendlyGameName, "this.userFriendlyGameName");
        return new NotificationToast(notificationId, userFriendlyGameName);
    }

    private final void h2() {
        this.f5108o.e(true);
        this.f5108o.c();
    }

    public static final void i(l8.l tmp0, Object obj) {
        kotlin.jvm.internal.o.g(tmp0, "$tmp0");
        tmp0.invoke(obj);
    }

    private final void i2(String str) {
        this.f5119z.c(str);
        P0();
    }

    private final void j2() {
        State a10;
        a10 = r1.a((r34 & 1) != 0 ? r1.f2101e : false, (r34 & 2) != 0 ? r1.f2102f : false, (r34 & 4) != 0 ? r1.f2103g : false, (r34 & 8) != 0 ? r1.f2104h : false, (r34 & 16) != 0 ? r1.f2105i : true, (r34 & 32) != 0 ? r1.f2106j : false, (r34 & 64) != 0 ? r1.f2107k : false, (r34 & 128) != 0 ? r1.f2108l : null, (r34 & 256) != 0 ? r1.f2109m : null, (r34 & 512) != 0 ? r1.f2110n : null, (r34 & 1024) != 0 ? r1.f2111o : null, (r34 & 2048) != 0 ? r1.f2112p : false, (r34 & 4096) != 0 ? r1.f2113q : false, (r34 & 8192) != 0 ? r1.f2114r : null, (r34 & 16384) != 0 ? r1.f2115s : false, (r34 & 32768) != 0 ? R0().f2116t : null);
        R1(a10);
        this.f5119z.i();
    }

    private final void z0(ToastModel toastModel) {
        this.K.add(toastModel);
    }

    public final void A1(boolean z10) {
        P1(new Screen.Settings(z10));
    }

    public final void C1() {
        P1(new Screen.Legal(this.E));
    }

    public final void D1() {
        P1(Screen.Licenses.f2077g);
    }

    public final void E1() {
        e(new x(null));
    }

    public final void F1(ToastModel toast) {
        kotlin.jvm.internal.o.g(toast, "toast");
        new y(toast).start();
    }

    public final void G1(ToastModel toast) {
        kotlin.jvm.internal.o.g(toast, "toast");
        e(new z(toast, this, null));
    }

    public final void H1() {
        State a10;
        a10 = r1.a((r34 & 1) != 0 ? r1.f2101e : false, (r34 & 2) != 0 ? r1.f2102f : false, (r34 & 4) != 0 ? r1.f2103g : false, (r34 & 8) != 0 ? r1.f2104h : true, (r34 & 16) != 0 ? r1.f2105i : false, (r34 & 32) != 0 ? r1.f2106j : false, (r34 & 64) != 0 ? r1.f2107k : false, (r34 & 128) != 0 ? r1.f2108l : null, (r34 & 256) != 0 ? r1.f2109m : null, (r34 & 512) != 0 ? r1.f2110n : null, (r34 & 1024) != 0 ? r1.f2111o : null, (r34 & 2048) != 0 ? r1.f2112p : false, (r34 & 4096) != 0 ? r1.f2113q : false, (r34 & 8192) != 0 ? r1.f2114r : null, (r34 & 16384) != 0 ? r1.f2115s : false, (r34 & 32768) != 0 ? R0().f2116t : null);
        R1(a10);
        d(new a0(null));
    }

    public final void I1() {
        State a10;
        if (this.R != ConnectionType.Cell) {
            j2();
        } else {
            a10 = r3.a((r34 & 1) != 0 ? r3.f2101e : false, (r34 & 2) != 0 ? r3.f2102f : false, (r34 & 4) != 0 ? r3.f2103g : false, (r34 & 8) != 0 ? r3.f2104h : false, (r34 & 16) != 0 ? r3.f2105i : false, (r34 & 32) != 0 ? r3.f2106j : false, (r34 & 64) != 0 ? r3.f2107k : false, (r34 & 128) != 0 ? r3.f2108l : null, (r34 & 256) != 0 ? r3.f2109m : null, (r34 & 512) != 0 ? r3.f2110n : null, (r34 & 1024) != 0 ? r3.f2111o : null, (r34 & 2048) != 0 ? r3.f2112p : false, (r34 & 4096) != 0 ? r3.f2113q : false, (r34 & 8192) != 0 ? r3.f2114r : null, (r34 & 16384) != 0 ? r3.f2115s : true, (r34 & 32768) != 0 ? R0().f2116t : null);
            R1(a10);
        }
    }

    public final void J1() {
        this.f5114u.c();
    }

    public final void L1() {
        Q1(true);
        if (R0().A()) {
            f2(new c0());
        }
        A0();
    }

    public final void M1() {
        Q1(false);
        K1();
    }

    public final State R0() {
        return (State) this.G.getValue();
    }

    @Override
    public void a() {
        d(new s(null));
    }

    public final void a2(ErrorInfo errorInfo) {
        e(new i0(errorInfo, null));
    }

    @Override
    public void b() {
        this.f5114u.k();
    }

    public final void c1() {
        A1(true);
        E0(false);
    }

    public final void d1() {
        E0(false);
        e2();
    }

    public final void e1() {
        E0(false);
        h2();
        Y1(M0(this.F));
    }

    public final void f1(Screen screen) {
        if (screen != null) {
            P1(screen);
        }
    }

    public final void g1(d1.c deepLinkModel) {
        kotlin.jvm.internal.o.g(deepLinkModel, "deepLinkModel");
        this.L = deepLinkModel;
    }

    public final void h1() {
        this.f5106m.w();
        if (this.f5106m.n()) {
            F0(Event.ShowSwitchToProdToast.f2098e);
        } else {
            F0(Event.ShowSwitchToGameDevToast.f2096e);
        }
    }

    public final void i1(Event event) {
        List r02;
        State a10;
        kotlin.jvm.internal.o.g(event, "event");
        State R0 = R0();
        r02 = kotlin.collections.e0.r0(R0().m(), event);
        a10 = R0.a((r34 & 1) != 0 ? R0.f2101e : false, (r34 & 2) != 0 ? R0.f2102f : false, (r34 & 4) != 0 ? R0.f2103g : false, (r34 & 8) != 0 ? R0.f2104h : false, (r34 & 16) != 0 ? R0.f2105i : false, (r34 & 32) != 0 ? R0.f2106j : false, (r34 & 64) != 0 ? R0.f2107k : false, (r34 & 128) != 0 ? R0.f2108l : null, (r34 & 256) != 0 ? R0.f2109m : null, (r34 & 512) != 0 ? R0.f2110n : r02, (r34 & 1024) != 0 ? R0.f2111o : null, (r34 & 2048) != 0 ? R0.f2112p : false, (r34 & 4096) != 0 ? R0.f2113q : false, (r34 & 8192) != 0 ? R0.f2114r : null, (r34 & 16384) != 0 ? R0.f2115s : false, (r34 & 32768) != 0 ? R0.f2116t : null);
        R1(a10);
    }

    public final void j1(String link) {
        kotlin.jvm.internal.o.g(link, "link");
        e(new t(link, null));
    }

    public final void k1(String gamePackage) {
        kotlin.jvm.internal.o.g(gamePackage, "gamePackage");
        this.N = gamePackage;
    }

    public final z1 l1() {
        return e(new u(null));
    }

    public final void m1() {
        G0(false);
        e(new v(null));
    }

    public final z1 n1() {
        return e(new w(null));
    }

    public final void o1() {
        F0(Event.NavigateHibernationSettings.f2092e);
        m1();
        this.f5114u.h("Update");
    }

    @Override
    public void onCleared() {
        O1();
        super.onCleared();
        this.H.dispose();
    }

    public final void p1(String packageName) {
        State a10;
        kotlin.jvm.internal.o.g(packageName, "packageName");
        if (this.R != ConnectionType.Cell) {
            i2(packageName);
        } else {
            a10 = r2.a((r34 & 1) != 0 ? r2.f2101e : false, (r34 & 2) != 0 ? r2.f2102f : false, (r34 & 4) != 0 ? r2.f2103g : false, (r34 & 8) != 0 ? r2.f2104h : false, (r34 & 16) != 0 ? r2.f2105i : false, (r34 & 32) != 0 ? r2.f2106j : false, (r34 & 64) != 0 ? r2.f2107k : false, (r34 & 128) != 0 ? r2.f2108l : null, (r34 & 256) != 0 ? r2.f2109m : null, (r34 & 512) != 0 ? r2.f2110n : null, (r34 & 1024) != 0 ? r2.f2111o : null, (r34 & 2048) != 0 ? r2.f2112p : false, (r34 & 4096) != 0 ? r2.f2113q : false, (r34 & 8192) != 0 ? r2.f2114r : packageName, (r34 & 16384) != 0 ? r2.f2115s : false, (r34 & 32768) != 0 ? R0().f2116t : null);
            R1(a10);
        }
    }

    public final void q1() {
        S0();
    }

    public final void r1(String packageName) {
        kotlin.jvm.internal.o.g(packageName, "packageName");
        this.f5106m.p();
        i2(packageName);
        S0();
    }

    public final void s1() {
        T0();
    }

    public final void t1() {
        this.f5106m.p();
        j2();
        T0();
    }

    public final void u1(String eula) {
        kotlin.jvm.internal.o.g(eula, "eula");
        P1(new Screen.Legal(eula));
    }

    public final void v1() {
        State a10;
        if (R0().A()) {
            a10 = r1.a((r34 & 1) != 0 ? r1.f2101e : false, (r34 & 2) != 0 ? r1.f2102f : false, (r34 & 4) != 0 ? r1.f2103g : false, (r34 & 8) != 0 ? r1.f2104h : false, (r34 & 16) != 0 ? r1.f2105i : false, (r34 & 32) != 0 ? r1.f2106j : false, (r34 & 64) != 0 ? r1.f2107k : false, (r34 & 128) != 0 ? r1.f2108l : Screen.Home.f2073g, (r34 & 256) != 0 ? r1.f2109m : null, (r34 & 512) != 0 ? r1.f2110n : null, (r34 & 1024) != 0 ? r1.f2111o : null, (r34 & 2048) != 0 ? r1.f2112p : false, (r34 & 4096) != 0 ? r1.f2113q : false, (r34 & 8192) != 0 ? r1.f2114r : null, (r34 & 16384) != 0 ? r1.f2115s : false, (r34 & 32768) != 0 ? R0().f2116t : null);
            R1(a10);
        }
    }

    public final void w1() {
        U0();
    }

    public final void x1() {
        this.f5106m.p();
        U0();
    }

    public final void y1(String id) {
        kotlin.jvm.internal.o.g(id, "id");
        P1(new Screen.Pdp(id));
    }

    public final void z1() {
        this.C.set("saved-state-handle-ui-state", R0());
    }
}