WeChat.apk(点击下载) / WebPrefetcherManifest.java


package com.tencent.mm.plugin.brandservice.ui.timeline.preload;

import android.net.Uri;
import bw3.s62;
import bw3.t62;
import com.tencent.mm.app.d0;
import com.tencent.mm.autogen.events.MMTrimMemoryEvent;
import com.tencent.mm.sdk.event.IListener;
import com.tencent.mm.sdk.platformtools.BuildInfo;
import com.tencent.mm.sdk.platformtools.Log;
import com.tencent.mm.sdk.platformtools.MMKVSlotManager;
import com.tencent.mm.sdk.platformtools.MultiProcessMMKV;
import com.tencent.mm.sdk.platformtools.Util;
import ek4.y;
import fo3.e0;
import ho3.c;
import ie1.h;
import io3.d;
import io3.p;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.ReentrantLock;
import kh4.l;
import kotlin.Metadata;
import kotlin.Result;
import kotlin.ResultKt;
import lh4.a0;
import lh4.f0;
import lh4.m;
import lh4.o;
import wg4.b0;
import wg4.n;
import xg4.t;
import xg4.u;
import yz3.j;

public final class WebPrefetcherManifest {

    /* renamed from: a  reason: collision with root package name */
    public static final WebPrefetcherManifest f100251a = new WebPrefetcherManifest();

    /* renamed from: b  reason: collision with root package name */
    public static final wg4.g f100252b = wg4.h.a(c.f100259d);

    /* renamed from: c  reason: collision with root package name */
    public static final ReentrantLock f100253c;

    /* renamed from: d  reason: collision with root package name */
    public static final Condition f100254d;

    /* renamed from: e  reason: collision with root package name */
    public static a f100255e;

    /* renamed from: f  reason: collision with root package name */
    public static MMTrimMemoryEventListener f100256f;

    /* renamed from: g  reason: collision with root package name */
    public static d0.a f100257g;

    @Metadata(bv = {}, d1 = {"\u0000\u0010\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0002\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001B\u0007¢\u0006\u0004\b\u0003\u0010\u0004¨\u0006\u0005"}, d2 = {"Lcom/tencent/mm/plugin/brandservice/ui/timeline/preload/WebPrefetcherManifest$MMTrimMemoryEventListener;", "Lcom/tencent/mm/sdk/event/IListener;", "Lcom/tencent/mm/autogen/events/MMTrimMemoryEvent;", "<init>", "()V", "plugin-brandservice_release"}, k = 1, mv = {1, 7, 1})
    public static final class MMTrimMemoryEventListener extends IListener<MMTrimMemoryEvent> {
        public MMTrimMemoryEventListener() {
            super(com.tencent.mm.app.h.f61283d);
        }

        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [com.tencent.mm.sdk.event.IEvent] */
        @Override // com.tencent.mm.sdk.event.IListener
        public boolean callback(MMTrimMemoryEvent mMTrimMemoryEvent) {
            m.g(mMTrimMemoryEvent, "event");
            Log.i("MicroMsg.WebPrefetcherManifest", "MMTrimMemoryEvent callback received");
            WebPrefetcherManifest.f100251a.i();
            ww2.d.INSTANCE.p(1454, 131, 1);
            return false;
        }
    }

    public static final class a extends io3.d {
        public a() {
            e0.f216134a.o();
            R1(new a());
            R1(new y());
            R1(new g31.d());
        }

        @Override // io3.d
        public void T1(String str) {
            m.g(str, "domain");
            i.a(str);
        }
    }

    public static final class b extends o implements l<Boolean, b0> {

        /* renamed from: d  reason: collision with root package name */
        public final /* synthetic */ bh4.d<Boolean> f100258d;

        /* JADX DEBUG: Multi-variable search result rejected for r1v0, resolved type: bh4.d<? super java.lang.Boolean> */
        /* JADX WARN: Multi-variable type inference failed */
        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public b(bh4.d<? super Boolean> dVar) {
            super(1);
            this.f100258d = dVar;
        }

        /* Return type fixed from 'java.lang.Object' to match base method */
        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
        @Override // kh4.l
        public b0 invoke(Boolean bool) {
            this.f100258d.resumeWith(Result.m751constructorimpl(Boolean.valueOf(bool.booleanValue())));
            return b0.f332794a;
        }
    }

    public static final class c extends o implements kh4.a<Boolean> {

        /* renamed from: d  reason: collision with root package name */
        public static final c f100259d = new c();

        public c() {
            super(0);
        }

        /* Return type fixed from 'java.lang.Object' to match base method */
        @Override // kh4.a
        public Boolean invoke() {
            boolean z15 = false;
            if (BuildInfo.DEBUG || BuildInfo.IS_FLAVOR_RED || ((ie1.h) j.c(ie1.h.class)).Xj0(h.c.f232000is, 0) == 1) {
                z15 = true;
            }
            return Boolean.valueOf(z15);
        }
    }

    @dh4.f(c = "com.tencent.mm.plugin.brandservice.ui.timeline.preload.WebPrefetcherManifest", f = "WebPrefetcherManifest.kt", l = {152}, m = "getAllCaches")
    public static final class d extends dh4.d {

        /* renamed from: d  reason: collision with root package name */
        public /* synthetic */ Object f100260d;

        /* renamed from: e  reason: collision with root package name */
        public final /* synthetic */ WebPrefetcherManifest f100261e;

        /* renamed from: f  reason: collision with root package name */
        public int f100262f;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public d(WebPrefetcherManifest webPrefetcherManifest, bh4.d<? super d> dVar) {
            super(dVar);
            this.f100261e = webPrefetcherManifest;
        }

        @Override // dh4.a
        public final Object invokeSuspend(Object obj) {
            this.f100260d = obj;
            this.f100262f |= Integer.MIN_VALUE;
            return this.f100261e.c(null, this);
        }
    }

    @dh4.f(c = "com.tencent.mm.plugin.brandservice.ui.timeline.preload.WebPrefetcherManifest", f = "WebPrefetcherManifest.kt", l = {137}, m = "getFetchPkgType")
    public static final class e extends dh4.d {

        /* renamed from: d  reason: collision with root package name */
        public Object f100263d;

        /* renamed from: e  reason: collision with root package name */
        public /* synthetic */ Object f100264e;

        /* renamed from: f  reason: collision with root package name */
        public final /* synthetic */ WebPrefetcherManifest f100265f;

        /* renamed from: g  reason: collision with root package name */
        public int f100266g;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public e(WebPrefetcherManifest webPrefetcherManifest, bh4.d<? super e> dVar) {
            super(dVar);
            this.f100265f = webPrefetcherManifest;
        }

        @Override // dh4.a
        public final Object invokeSuspend(Object obj) {
            this.f100264e = obj;
            this.f100266g |= Integer.MIN_VALUE;
            return this.f100265f.d(null, null, this);
        }
    }

    public static final class f extends o implements l<String, b0> {

        /* renamed from: d  reason: collision with root package name */
        public final /* synthetic */ f0<String> f100267d;

        /* renamed from: e  reason: collision with root package name */
        public final /* synthetic */ String f100268e;

        /* renamed from: f  reason: collision with root package name */
        public final /* synthetic */ a0 f100269f;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public f(f0<String> f0Var, String str, a0 a0Var) {
            super(1);
            this.f100267d = f0Var;
            this.f100268e = str;
            this.f100269f = a0Var;
        }

        /* Return type fixed from 'java.lang.Object' to match base method */
        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
        @Override // kh4.l
        public b0 invoke(String str) {
            boolean z15;
            String str2 = str;
            ReentrantLock reentrantLock = WebPrefetcherManifest.f100253c;
            f0<String> f0Var = this.f100267d;
            String str3 = this.f100268e;
            a0 a0Var = this.f100269f;
            reentrantLock.lock();
            if (str2 != null) {
                try {
                    if (str2.length() != 0) {
                        z15 = false;
                        if (!z15 && !m.b(str2, "null") && !m.b(str2, "undefined")) {
                            f0Var.f253292d = (T) ("_manifest_" + i.j(str3) + '_' + str2);
                        }
                        WebPrefetcherManifest.f100254d.signalAll();
                        a0Var.f253280d = false;
                        b0 b0Var = b0.f332794a;
                        reentrantLock.unlock();
                        return b0.f332794a;
                    }
                } catch (Throwable th5) {
                    reentrantLock.unlock();
                    throw th5;
                }
            }
            z15 = true;
            f0Var.f253292d = (T) ("_manifest_" + i.j(str3) + '_' + str2);
            WebPrefetcherManifest.f100254d.signalAll();
            a0Var.f253280d = false;
            b0 b0Var2 = b0.f332794a;
            reentrantLock.unlock();
            return b0.f332794a;
        }
    }

    @dh4.f(c = "com.tencent.mm.plugin.brandservice.ui.timeline.preload.WebPrefetcherManifest", f = "WebPrefetcherManifest.kt", l = {125}, m = "shouldFetchContent")
    public static final class g extends dh4.d {

        /* renamed from: d  reason: collision with root package name */
        public Object f100270d;

        /* renamed from: e  reason: collision with root package name */
        public /* synthetic */ Object f100271e;

        /* renamed from: f  reason: collision with root package name */
        public final /* synthetic */ WebPrefetcherManifest f100272f;

        /* renamed from: g  reason: collision with root package name */
        public int f100273g;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public g(WebPrefetcherManifest webPrefetcherManifest, bh4.d<? super g> dVar) {
            super(dVar);
            this.f100272f = webPrefetcherManifest;
        }

        @Override // dh4.a
        public final Object invokeSuspend(Object obj) {
            this.f100271e = obj;
            this.f100273g |= Integer.MIN_VALUE;
            return this.f100272f.j(null, null, this);
        }
    }

    @dh4.f(c = "com.tencent.mm.plugin.brandservice.ui.timeline.preload.WebPrefetcherManifest", f = "WebPrefetcherManifest.kt", l = {114}, m = "shouldPrefetch")
    public static final class h extends dh4.d {

        /* renamed from: d  reason: collision with root package name */
        public Object f100274d;

        /* renamed from: e  reason: collision with root package name */
        public /* synthetic */ Object f100275e;

        /* renamed from: f  reason: collision with root package name */
        public final /* synthetic */ WebPrefetcherManifest f100276f;

        /* renamed from: g  reason: collision with root package name */
        public int f100277g;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public h(WebPrefetcherManifest webPrefetcherManifest, bh4.d<? super h> dVar) {
            super(dVar);
            this.f100276f = webPrefetcherManifest;
        }

        @Override // dh4.a
        public final Object invokeSuspend(Object obj) {
            this.f100275e = obj;
            this.f100277g |= Integer.MIN_VALUE;
            return this.f100276f.k(null, null, this);
        }
    }

    static {
        ReentrantLock reentrantLock = new ReentrantLock();
        f100253c = reentrantLock;
        f100254d = reentrantLock.newCondition();
    }

    public final Object a(int i15, String str, bh4.d<? super Boolean> dVar) {
        boolean z15;
        bh4.h hVar = new bh4.h(ch4.b.b(dVar));
        io3.d f15 = f100251a.f();
        b bVar = new b(hVar);
        m.g(str, "url");
        Iterator<io3.o> it = f15.D.iterator();
        while (true) {
            if (it.hasNext()) {
                if (it.next().a(i15, str, bVar)) {
                    z15 = true;
                    break;
                }
            } else {
                z15 = false;
                break;
            }
        }
        if (!z15) {
            Result.Companion companion = Result.Companion;
            hVar.resumeWith(Result.m751constructorimpl(Boolean.FALSE));
        }
        return hVar.b();
    }

    public final boolean b() {
        return ((Boolean) ((n) f100252b).getValue()).booleanValue();
    }

    /* JADX WARNING: Code restructure failed: missing block: B:28:0x0069, code lost:
        if (r3 == null) goto L_0x006b;
     */
    /* JADX WARNING: Removed duplicated region for block: B:12:0x0031  */
    /* JADX WARNING: Removed duplicated region for block: B:25:0x0061  */
    /* JADX WARNING: Removed duplicated region for block: B:32:0x007d A[LOOP:0: B:31:0x007b->B:32:0x007d, LOOP_END] */
    /* JADX WARNING: Removed duplicated region for block: B:8:0x0023  */
    public final Object c(io3.a aVar, bh4.d<? super List<String>> dVar) {
        d dVar2;
        int i15;
        int i16;
        String str;
        int length;
        if (dVar instanceof d) {
            dVar2 = (d) dVar;
            int i17 = dVar2.f100262f;
            if ((i17 & Integer.MIN_VALUE) != 0) {
                dVar2.f100262f = i17 - Integer.MIN_VALUE;
                Object obj = dVar2.f100260d;
                ch4.a aVar2 = ch4.a.COROUTINE_SUSPENDED;
                i15 = dVar2.f100262f;
                String str2 = null;
                if (i15 != 0) {
                    ResultKt.throwOnFailure(obj);
                    String str3 = aVar.f234425b.f37186e;
                    if (str3 == null || str3.length() == 0) {
                        return new ArrayList();
                    }
                    io3.d f15 = f();
                    dVar2.f100262f = 1;
                    d.b bVar = io3.d.I;
                    obj = f15.V1(aVar, "getAllCaches", null, dVar2);
                    if (obj == aVar2) {
                        return aVar2;
                    }
                } else if (i15 == 1) {
                    ResultKt.throwOnFailure(obj);
                } else {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                str = (String) obj;
                if (str != null) {
                    if (!y.n(str)) {
                        str2 = str;
                    }
                }
                str2 = "[]";
                a50.e eVar = new a50.e(str2);
                LinkedList linkedList = new LinkedList();
                length = eVar.length();
                for (i16 = 0; i16 < length; i16++) {
                    linkedList.add(eVar.getString(i16));
                }
                return linkedList;
            }
        }
        dVar2 = new d(this, dVar);
        Object obj2 = dVar2.f100260d;
        ch4.a aVar22 = ch4.a.COROUTINE_SUSPENDED;
        i15 = dVar2.f100262f;
        String str22 = null;
        if (i15 != 0) {
        }
        str = (String) obj2;
        if (str != null) {
        }
        str22 = "[]";
        a50.e eVar2 = new a50.e(str22);
        LinkedList linkedList2 = new LinkedList();
        length = eVar2.length();
        while (i16 < length) {
        }
        return linkedList2;
    }

    /* JADX WARNING: Removed duplicated region for block: B:12:0x0033  */
    /* JADX WARNING: Removed duplicated region for block: B:26:0x0075  */
    /* JADX WARNING: Removed duplicated region for block: B:28:0x007b  */
    /* JADX WARNING: Removed duplicated region for block: B:8:0x0021  */
    public final Object d(io3.a aVar, String str, bh4.d<? super Integer> dVar) {
        e eVar;
        int i15;
        int safeParseInt;
        boolean z15;
        if (dVar instanceof e) {
            eVar = (e) dVar;
            int i16 = eVar.f100266g;
            if ((i16 & Integer.MIN_VALUE) != 0) {
                eVar.f100266g = i16 - Integer.MIN_VALUE;
                Object obj = eVar.f100264e;
                ch4.a aVar2 = ch4.a.COROUTINE_SUSPENDED;
                i15 = eVar.f100266g;
                if (i15 != 0) {
                    ResultKt.throwOnFailure(obj);
                    String str2 = aVar.f234425b.f37186e;
                    if (str2 == null || str2.length() == 0) {
                        z15 = true;
                    } else {
                        z15 = false;
                    }
                    if (z15) {
                        return new Integer(1);
                    }
                    io3.d f15 = f();
                    List<? extends Object> f16 = u.f(str, aVar.f234426c);
                    eVar.f100263d = str;
                    eVar.f100266g = 1;
                    obj = f15.V1(aVar, "getFetchPkgType", f16, eVar);
                    if (obj == aVar2) {
                        return aVar2;
                    }
                } else if (i15 == 1) {
                    String str3 = (String) eVar.f100263d;
                    ResultKt.throwOnFailure(obj);
                } else {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                safeParseInt = Util.safeParseInt((String) obj);
                if (safeParseInt == 0) {
                    return new Integer(safeParseInt);
                }
                return new Integer(1);
            }
        }
        eVar = new e(this, dVar);
        Object obj2 = eVar.f100264e;
        ch4.a aVar22 = ch4.a.COROUTINE_SUSPENDED;
        i15 = eVar.f100266g;
        if (i15 != 0) {
        }
        safeParseInt = Util.safeParseInt((String) obj2);
        if (safeParseInt == 0) {
        }
    }

    /* JADX INFO: finally extract failed */
    /* JADX WARNING: Removed duplicated region for block: B:11:0x0020  */
    /* JADX WARNING: Removed duplicated region for block: B:24:0x0092  */
    /* JADX WARNING: Removed duplicated region for block: B:31:0x00b5  */
    public final synchronized String e(String str, io3.a aVar) {
        boolean z15;
        f0 f0Var;
        ReentrantLock reentrantLock;
        String str2;
        m.g(str, "url");
        m.g(aVar, "manifest");
        String str3 = aVar.f234425b.f37186e;
        boolean z16 = true;
        if (str3 != null) {
            if (str3.length() != 0) {
                z15 = false;
                if (!z15) {
                    n0 n0Var = n0.f100379a;
                    n0Var.getClass();
                    MMKVSlotManager mMKVSlotManager = n0.f100380b;
                    String str4 = aVar.f234425b.f37186e;
                    m.f(str4, "manifest.manifest.ManifestUrl");
                    if (mMKVSlotManager.containsKey(str4)) {
                        n0Var.getClass();
                        String str5 = aVar.f234425b.f37186e;
                        m.f(str5, "manifest.manifest.ManifestUrl");
                        if (!mMKVSlotManager.decodeBool(str5, true)) {
                            Log.w("MicroMsg.WebPrefetcherManifest", "getId manifest not have getId and ignore %s", aVar.f234425b.f37186e);
                            return null;
                        }
                    }
                }
                f0Var = new f0();
                a0 a0Var = new a0();
                a0Var.f253280d = true;
                System.currentTimeMillis();
                reentrantLock = f100253c;
                reentrantLock.lock();
                f100251a.f().W1(aVar, "getId", t.b(str), new f(f0Var, str, a0Var));
                f100254d.await(100, TimeUnit.MILLISECONDS);
                reentrantLock.unlock();
                if (f0Var.f253292d != null) {
                    T t15 = f0Var.f253292d;
                    System.currentTimeMillis();
                }
                str2 = aVar.f234425b.f37186e;
                if (str2 != null && !a0Var.f253280d) {
                    n0.f100379a.getClass();
                    MultiProcessMMKV multiProcessMMKV = (MultiProcessMMKV) n0.f100380b.getSlotForWrite();
                    if (f0Var.f253292d == null) {
                        z16 = false;
                    }
                    multiProcessMMKV.encode(str2, z16);
                }
                if (f0Var.f253292d == null && y.v(str, "https://view.inews.qq.com/", false)) {
                    Log.e("MicroMsg.WebPrefetcherManifest", "getId fail:" + str);
                }
                return f0Var.f253292d;
            }
        }
        z15 = true;
        if (!z15) {
        }
        f0Var = new f0();
        a0 a0Var2 = new a0();
        a0Var2.f253280d = true;
        System.currentTimeMillis();
        reentrantLock = f100253c;
        reentrantLock.lock();
        try {
            f100251a.f().W1(aVar, "getId", t.b(str), new f(f0Var, str, a0Var2));
            f100254d.await(100, TimeUnit.MILLISECONDS);
            reentrantLock.unlock();
            if (f0Var.f253292d != null) {
            }
            str2 = aVar.f234425b.f37186e;
            n0.f100379a.getClass();
            MultiProcessMMKV multiProcessMMKV2 = (MultiProcessMMKV) n0.f100380b.getSlotForWrite();
            if (f0Var.f253292d == null) {
            }
            multiProcessMMKV2.encode(str2, z16);
            Log.e("MicroMsg.WebPrefetcherManifest", "getId fail:" + str);
            return f0Var.f253292d;
        } catch (Throwable th5) {
            reentrantLock.unlock();
            throw th5;
        }
    }

    public final synchronized io3.d f() {
        a aVar;
        if (f100255e == null) {
            a aVar2 = new a();
            f100255e = aVar2;
            Log.i("MicroMsg.WebPrefetcherManifest", "createEngine %s", Integer.valueOf(aVar2.hashCode()));
        }
        if (f100256f == null) {
            c.b bVar = ho3.c.f227523y;
            if (((Boolean) ((n) ho3.c.f227524z).getValue()).booleanValue()) {
                MMTrimMemoryEventListener mMTrimMemoryEventListener = new MMTrimMemoryEventListener();
                mMTrimMemoryEventListener.alive();
                f100256f = mMTrimMemoryEventListener;
            }
        }
        if (f100257g == null) {
            d.b bVar2 = io3.d.I;
            if (((Boolean) ((n) io3.d.M).getValue()).booleanValue()) {
                b1 b1Var = new b1();
                b1Var.alive();
                f100257g = b1Var;
            }
        }
        aVar = f100255e;
        m.d(aVar);
        return aVar;
    }

    public final void g(io3.a aVar, String str, List<? extends Object> list, l<? super String, b0> lVar) {
        m.g(aVar, "manifest");
        m.g(str, "func");
        m.g(list, "params");
        m.g(lVar, "onCallback");
        f().W1(aVar, str, list, lVar);
    }

    /* JADX WARNING: Removed duplicated region for block: B:23:0x0088  */
    /* JADX WARNING: Removed duplicated region for block: B:33:0x00ba  */
    /* JADX WARNING: Removed duplicated region for block: B:41:0x0093 A[SYNTHETIC] */
    public final io3.a h(String str) {
        xv3.a aVar;
        s62 s622;
        boolean z15;
        byte[] decodeBytes;
        m.g(str, "url");
        d.b bVar = io3.d.I;
        n0.f100379a.getClass();
        MMKVSlotManager mMKVSlotManager = n0.f100380b;
        m.g(mMKVSlotManager, "settingManager");
        Uri parse = Uri.parse(str);
        io3.a c15 = bVar.c(parse.getHost());
        if (c15 != null) {
            Log.i("MicroMsg.WebPrefetcherJsEngine", "matchDebug:" + parse);
            return c15;
        }
        String a15 = p.a(String.valueOf(parse.getHost()));
        MultiProcessMMKV multiProcessMMKV = (MultiProcessMMKV) mMKVSlotManager.findSlot(a15);
        if (!(multiProcessMMKV == null || !multiProcessMMKV.containsKey(a15) || (decodeBytes = multiProcessMMKV.decodeBytes(a15)) == null)) {
            if (!(decodeBytes.length == 0)) {
                try {
                    Object newInstance = s62.class.newInstance();
                    ((xv3.a) newInstance).parseFrom(decodeBytes);
                    aVar = (xv3.a) newInstance;
                } catch (Exception e15) {
                    Log.printErrStackTrace("MultiProcessMMKV.decodeProtoBuffer", e15, "decode ProtoBuffer", new Object[0]);
                }
                s622 = (s62) aVar;
                if (s622 != null) {
                    LinkedList<t62> linkedList = s622.f36097f;
                    m.f(linkedList, "ResInfos");
                    for (T t15 : linkedList) {
                        String path = parse.getPath();
                        if (path != null) {
                            String str2 = t15.f37185d;
                            m.f(str2, "res.Path");
                            if (bd.d.d(path, str2, false, 2, null)) {
                                z15 = true;
                                if (!z15) {
                                    io3.b bVar2 = io3.d.Q;
                                    String str3 = t15.f37186e;
                                    m.f(str3, "res.ManifestUrl");
                                    if (bVar2.J(p.a(str3)).m()) {
                                        return new io3.a(s622, t15, null, 0, 0, false, null, 124, null);
                                    }
                                    Log.w("MicroMsg.WebPrefetcherJsEngine", "manifest lost:#" + a15 + ", " + t15.f37185d);
                                }
                            }
                        }
                        z15 = false;
                        if (!z15) {
                        }
                    }
                }
                d.b bVar3 = io3.d.I;
                return null;
            }
        }
        aVar = null;
        s622 = (s62) aVar;
        if (s622 != null) {
        }
        d.b bVar32 = io3.d.I;
        return null;
    }

    public final synchronized void i() {
        a aVar = f100255e;
        if (aVar != null) {
            ww2.d.INSTANCE.p(1454, 135, 1);
            ((xc4.j) xc4.j.f338034d).i(new io3.l(aVar), 3000);
            aVar.destroy();
            d0.a aVar2 = aVar.G;
            if (aVar2 != null) {
                aVar2.dead();
            }
        }
        f100255e = null;
    }

    /* JADX WARNING: Removed duplicated region for block: B:12:0x002f  */
    /* JADX WARNING: Removed duplicated region for block: B:8:0x0021  */
    public final Object j(io3.a aVar, String str, bh4.d<? super Boolean> dVar) {
        g gVar;
        int i15;
        boolean z15;
        boolean z16;
        if (dVar instanceof g) {
            gVar = (g) dVar;
            int i16 = gVar.f100273g;
            if ((i16 & Integer.MIN_VALUE) != 0) {
                gVar.f100273g = i16 - Integer.MIN_VALUE;
                Object obj = gVar.f100271e;
                ch4.a aVar2 = ch4.a.COROUTINE_SUSPENDED;
                i15 = gVar.f100273g;
                if (i15 != 0) {
                    ResultKt.throwOnFailure(obj);
                    String str2 = aVar.f234425b.f37186e;
                    if (str2 == null || str2.length() == 0) {
                        z16 = true;
                    } else {
                        z16 = false;
                    }
                    if (z16) {
                        z15 = ((Boolean) ((n) f100252b).getValue()).booleanValue();
                        return Boolean.valueOf(z15);
                    }
                    io3.d f15 = f();
                    List<? extends Object> f16 = u.f(str, aVar.f234426c);
                    gVar.f100270d = str;
                    gVar.f100273g = 1;
                    obj = f15.V1(aVar, "shouldFetchContent", f16, gVar);
                    if (obj == aVar2) {
                        return aVar2;
                    }
                } else if (i15 == 1) {
                    ResultKt.throwOnFailure(obj);
                } else {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                String str3 = (String) obj;
                z15 = m.b(obj, "true");
                return Boolean.valueOf(z15);
            }
        }
        gVar = new g(this, dVar);
        Object obj2 = gVar.f100271e;
        ch4.a aVar22 = ch4.a.COROUTINE_SUSPENDED;
        i15 = gVar.f100273g;
        if (i15 != 0) {
        }
        String str32 = (String) obj2;
        z15 = m.b(obj2, "true");
        return Boolean.valueOf(z15);
    }

    /* JADX WARNING: Removed duplicated region for block: B:12:0x002f  */
    /* JADX WARNING: Removed duplicated region for block: B:8:0x0021  */
    public final Object k(io3.a aVar, String str, bh4.d<? super Boolean> dVar) {
        h hVar;
        int i15;
        boolean z15;
        boolean z16;
        if (dVar instanceof h) {
            hVar = (h) dVar;
            int i16 = hVar.f100277g;
            if ((i16 & Integer.MIN_VALUE) != 0) {
                hVar.f100277g = i16 - Integer.MIN_VALUE;
                Object obj = hVar.f100275e;
                ch4.a aVar2 = ch4.a.COROUTINE_SUSPENDED;
                i15 = hVar.f100277g;
                if (i15 != 0) {
                    ResultKt.throwOnFailure(obj);
                    String str2 = aVar.f234425b.f37186e;
                    if (str2 == null || str2.length() == 0) {
                        z16 = true;
                    } else {
                        z16 = false;
                    }
                    if (z16) {
                        z15 = ((Boolean) ((n) f100252b).getValue()).booleanValue();
                        return Boolean.valueOf(z15);
                    }
                    io3.d f15 = f();
                    List<? extends Object> f16 = u.f(str, aVar.f234426c);
                    hVar.f100274d = str;
                    hVar.f100277g = 1;
                    obj = f15.V1(aVar, "fetch", f16, hVar);
                    if (obj == aVar2) {
                        return aVar2;
                    }
                } else if (i15 == 1) {
                    ResultKt.throwOnFailure(obj);
                } else {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                String str3 = (String) obj;
                z15 = m.b(obj, "true");
                return Boolean.valueOf(z15);
            }
        }
        hVar = new h(this, dVar);
        Object obj2 = hVar.f100275e;
        ch4.a aVar22 = ch4.a.COROUTINE_SUSPENDED;
        i15 = hVar.f100277g;
        if (i15 != 0) {
        }
        String str32 = (String) obj2;
        z15 = m.b(obj2, "true");
        return Boolean.valueOf(z15);
    }
}