小红书.apk(点击下载) / g.java


package uu2;

import android.content.Intent;
import com.alibaba.alibclinkpartner.linkpartner.constants.ALPParamConstant;
import com.alibaba.baichuan.trade.biz.applink.adapter.AppLinkConstants;
import com.google.android.gms.common.GoogleApiAvailabilityLight;
import com.google.gson.internal.LinkedTreeMap;
import com.meizu.cloud.pushsdk.notification.model.AdvanceSetting;
import com.tencent.matrix.trace.config.SharePluginInfo;
import com.tencent.smtt.sdk.TbsVideoCacheTask;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import kotlin.Metadata;
import kotlin.TuplesKt;
import kotlin.Unit;
import kotlin.collections.ArraysKt___ArraysKt;
import kotlin.collections.CollectionsKt__CollectionsKt;
import kotlin.collections.CollectionsKt___CollectionsKt;
import kotlin.collections.MapsKt__MapsJVMKt;
import kotlin.collections.MapsKt__MapsKt;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.FunctionReferenceImpl;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Lambda;

@Metadata(bv = {}, d1 = {"\u0000Z\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010 \n\u0002\u0010\u000e\n\u0000\n\u0002\u0010$\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0011\u0018\u00002\u00020\u0001:\u0001\rB\u0007¢\u0006\u0004\b(\u0010)J\u000e\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00030\u0002H\u0016JJ\u0010\r\u001aD\u0012\u0004\u0012\u00020\u0003\u0012:\u00128\u0012$\u0012\"\u0012\u0004\u0012\u00020\u0003\u0012\u0006\u0012\u0004\u0018\u00010\b0\u0007j\u0010\u0012\u0004\u0012\u00020\u0003\u0012\u0006\u0012\u0004\u0018\u00010\b`\t\u0012\u0004\u0012\u00020\n\u0012\u0004\u0012\u00020\u000b0\u0006j\u0002`\f0\u0005H\u0016JD\u0010\u0011\u001a>\u0012\u0004\u0012\u00020\u0003\u00124\u00122\u0012$\u0012\"\u0012\u0004\u0012\u00020\u0003\u0012\u0006\u0012\u0004\u0018\u00010\b0\u0007j\u0010\u0012\u0004\u0012\u00020\u0003\u0012\u0006\u0012\u0004\u0018\u00010\b`\t\u0012\u0004\u0012\u00020\u000f0\u000ej\u0002`\u00100\u0005H\u0016J\u0010\u0010\u0014\u001a\u00020\u000b2\b\u0010\u0013\u001a\u0004\u0018\u00010\u0012J\b\u0010\u0015\u001a\u00020\u000bH\u0016J\"\u0010\u001b\u001a\u00020\u000b2\u0006\u0010\u0017\u001a\u00020\u00162\u0006\u0010\u0018\u001a\u00020\u00162\b\u0010\u001a\u001a\u0004\u0018\u00010\u0019H\u0016J.\u0010\u001d\u001a\u00020\u000f2&\u0010\u001c\u001a\"\u0012\u0004\u0012\u00020\u0003\u0012\u0006\u0012\u0004\u0018\u00010\b0\u0007j\u0010\u0012\u0004\u0012\u00020\u0003\u0012\u0006\u0012\u0004\u0018\u00010\b`\tJ8\u0010\u001f\u001a\u00020\u000b2&\u0010\u001c\u001a\"\u0012\u0004\u0012\u00020\u0003\u0012\u0006\u0012\u0004\u0018\u00010\b0\u0007j\u0010\u0012\u0004\u0012\u00020\u0003\u0012\u0006\u0012\u0004\u0018\u00010\b`\t2\u0006\u0010\u001e\u001a\u00020\nH\u0002J8\u0010 \u001a\u00020\u000b2&\u0010\u001c\u001a\"\u0012\u0004\u0012\u00020\u0003\u0012\u0006\u0012\u0004\u0018\u00010\b0\u0007j\u0010\u0012\u0004\u0012\u00020\u0003\u0012\u0006\u0012\u0004\u0018\u00010\b`\t2\u0006\u0010\u001e\u001a\u00020\nH\u0002J8\u0010!\u001a\u00020\u000b2&\u0010\u001c\u001a\"\u0012\u0004\u0012\u00020\u0003\u0012\u0006\u0012\u0004\u0018\u00010\b0\u0007j\u0010\u0012\u0004\u0012\u00020\u0003\u0012\u0006\u0012\u0004\u0018\u00010\b`\t2\u0006\u0010\u001e\u001a\u00020\nH\u0002R$\u0010\"\u001a\u0004\u0018\u00010\u00128\u0006@\u0006X†\u000e¢\u0006\u0012\n\u0004\b\"\u0010#\u001a\u0004\b$\u0010%\"\u0004\b&\u0010'¨\u0006*"}, d2 = {"Luu2/g;", "Luu2/a;", "", "", z60.h.f160753a, "", "Lkotlin/Function2;", "Ljava/util/HashMap;", "", "Lkotlin/collections/HashMap;", "Lt50/a;", "", "Lcom/xingin/bridgecore/bridge/ASyncBridgeMethod;", "a", "Lkotlin/Function1;", "Lt50/c;", "Lcom/xingin/bridgecore/bridge/SyncBridgeMethod;", "c", "Ltu2/b;", "downloadEventCallback", GoogleApiAvailabilityLight.TRACKING_SOURCE_NOTIFICATION, "g", "", AppLinkConstants.REQUESTCODE, ALPParamConstant.RESULT_CODE, "Landroid/content/Intent;", "data", "e", "args", "o", "callback", "l", com.igexin.push.core.d.c.f25536c, "q", "mDownloadEventListener", "Ltu2/b;", "m", "()Ltu2/b;", "setMDownloadEventListener", "(Ltu2/b;)V", "<init>", "()V", "xybridge_library_release"}, k = 1, mv = {1, 6, 0})
/* compiled from: XhsFetchFileHorizonBridge.kt */
public final class g extends a {

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

    /* renamed from: b  reason: collision with root package name */
    public tu2.b f138752b;

    /* renamed from: c  reason: collision with root package name */
    public final String[] f138753c = {"cacheFor3DWeb", "cacheFor3DAR", "showInAlbum"};

    @Metadata(bv = {}, d1 = {"\u0000\u0018\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\b\n\u0002\b\u0003\n\u0002\u0010\u000e\n\u0002\b\u0007\b†\u0003\u0018\u00002\u00020\u0001B\t\b\u0002¢\u0006\u0004\b\u000b\u0010\fR\u0014\u0010\u0003\u001a\u00020\u00028\u0006X†T¢\u0006\u0006\n\u0004\b\u0003\u0010\u0004R\u0014\u0010\u0005\u001a\u00020\u00028\u0006X†T¢\u0006\u0006\n\u0004\b\u0005\u0010\u0004R\u0014\u0010\u0007\u001a\u00020\u00068\u0006X†T¢\u0006\u0006\n\u0004\b\u0007\u0010\bR\u0014\u0010\t\u001a\u00020\u00068\u0006X†T¢\u0006\u0006\n\u0004\b\t\u0010\bR\u0014\u0010\n\u001a\u00020\u00068\u0006X†T¢\u0006\u0006\n\u0004\b\n\u0010\b¨\u0006\r"}, d2 = {"Luu2/g$a;", "", "", "NO_NETWORK", "I", "NO_STORAGE_PERMISSION", "", "SHOW_IN_ALBUM", "Ljava/lang/String;", "USE_FOR_3D_WEB", "USE_FOR_AR_WEB", "<init>", "()V", "xybridge_library_release"}, k = 1, mv = {1, 6, 0})
    /* compiled from: XhsFetchFileHorizonBridge.kt */
    public static final class a {
        public a() {
        }

        public /* synthetic */ a(DefaultConstructorMarker defaultConstructorMarker) {
            this();
        }
    }

    @Metadata(d1 = {"\u0000\u000e\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0003H\n¢\u0006\u0002\b\u0004"}, d2 = {"<anonymous>", "", "status", "", "invoke"}, k = 3, mv = {1, 6, 0}, xi = 48)
    /* compiled from: XhsFetchFileHorizonBridge.kt */
    public static final class b extends Lambda implements Function1<String, Unit> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ t50.a f138754a;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public b(t50.a aVar) {
            super(1);
            this.f138754a = aVar;
        }

        /* 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 // kotlin.jvm.functions.Function1
        public /* bridge */ /* synthetic */ Unit invoke(String str) {
            invoke(str);
            return Unit.INSTANCE;
        }

        public final void invoke(String str) {
            Intrinsics.checkNotNullParameter(str, "status");
            ko2.e.a("backgroundFetchFile", "addBackgroundFetchFile status = " + str + "...");
            this.f138754a.a(t50.c.f132459d.b(MapsKt__MapsKt.hashMapOf(TuplesKt.to("status", str))));
        }
    }

    @Metadata(k = 3, mv = {1, 6, 0}, xi = 48)
    /* compiled from: XhsFetchFileHorizonBridge.kt */
    public /* synthetic */ class c extends FunctionReferenceImpl implements Function2<HashMap<String, Object>, t50.a, Unit> {
        public c(Object obj) {
            super(2, obj, g.class, "backgroundFetchFile", "backgroundFetchFile(Ljava/util/HashMap;Lcom/xingin/bridgecore/bridge/IXYHorizonBridgeCallback;)V", 0);
        }

        public final void a(HashMap<String, Object> hashMap, t50.a aVar) {
            Intrinsics.checkNotNullParameter(hashMap, "p0");
            Intrinsics.checkNotNullParameter(aVar, "p1");
            ((g) this.receiver).l(hashMap, aVar);
        }

        /* 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, java.lang.Object] */
        @Override // kotlin.jvm.functions.Function2
        public /* bridge */ /* synthetic */ Unit invoke(HashMap<String, Object> hashMap, t50.a aVar) {
            a(hashMap, aVar);
            return Unit.INSTANCE;
        }
    }

    @Metadata(k = 3, mv = {1, 6, 0}, xi = 48)
    /* compiled from: XhsFetchFileHorizonBridge.kt */
    public /* synthetic */ class d extends FunctionReferenceImpl implements Function2<HashMap<String, Object>, t50.a, Unit> {
        public d(Object obj) {
            super(2, obj, g.class, "queryBackgroundFetchFileStatus", "queryBackgroundFetchFileStatus(Ljava/util/HashMap;Lcom/xingin/bridgecore/bridge/IXYHorizonBridgeCallback;)V", 0);
        }

        public final void a(HashMap<String, Object> hashMap, t50.a aVar) {
            Intrinsics.checkNotNullParameter(hashMap, "p0");
            Intrinsics.checkNotNullParameter(aVar, "p1");
            ((g) this.receiver).p(hashMap, aVar);
        }

        /* 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, java.lang.Object] */
        @Override // kotlin.jvm.functions.Function2
        public /* bridge */ /* synthetic */ Unit invoke(HashMap<String, Object> hashMap, t50.a aVar) {
            a(hashMap, aVar);
            return Unit.INSTANCE;
        }
    }

    @Metadata(k = 3, mv = {1, 6, 0}, xi = 48)
    /* compiled from: XhsFetchFileHorizonBridge.kt */
    public /* synthetic */ class e extends FunctionReferenceImpl implements Function2<HashMap<String, Object>, t50.a, Unit> {
        public e(Object obj) {
            super(2, obj, g.class, "updateBackgroundFetchFileStatus", "updateBackgroundFetchFileStatus(Ljava/util/HashMap;Lcom/xingin/bridgecore/bridge/IXYHorizonBridgeCallback;)V", 0);
        }

        public final void a(HashMap<String, Object> hashMap, t50.a aVar) {
            Intrinsics.checkNotNullParameter(hashMap, "p0");
            Intrinsics.checkNotNullParameter(aVar, "p1");
            ((g) this.receiver).q(hashMap, aVar);
        }

        /* 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, java.lang.Object] */
        @Override // kotlin.jvm.functions.Function2
        public /* bridge */ /* synthetic */ Unit invoke(HashMap<String, Object> hashMap, t50.a aVar) {
            a(hashMap, aVar);
            return Unit.INSTANCE;
        }
    }

    @Metadata(k = 3, mv = {1, 6, 0}, xi = 48)
    /* compiled from: XhsFetchFileHorizonBridge.kt */
    public /* synthetic */ class f extends FunctionReferenceImpl implements Function1<HashMap<String, Object>, t50.c> {
        public f(Object obj) {
            super(1, obj, g.class, "openDownloadedFile", "openDownloadedFile(Ljava/util/HashMap;)Lcom/xingin/bridgecore/bridge/XYHorizonBridgeResult;", 0);
        }

        /* renamed from: a */
        public final t50.c invoke(HashMap<String, Object> hashMap) {
            Intrinsics.checkNotNullParameter(hashMap, "p0");
            return ((g) this.receiver).o(hashMap);
        }
    }

    @Metadata(d1 = {"\u0000\u000e\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0003H\n¢\u0006\u0002\b\u0004"}, d2 = {"<anonymous>", "", "status", "", "invoke"}, k = 3, mv = {1, 6, 0}, xi = 48)
    /* renamed from: uu2.g$g  reason: collision with other inner class name */
    /* compiled from: XhsFetchFileHorizonBridge.kt */
    public static final class C2278g extends Lambda implements Function1<String, Unit> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ t50.a f138755a;

        /* renamed from: b  reason: collision with root package name */
        public final /* synthetic */ g f138756b;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public C2278g(t50.a aVar, g gVar) {
            super(1);
            this.f138755a = aVar;
            this.f138756b = gVar;
        }

        /* 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 // kotlin.jvm.functions.Function1
        public /* bridge */ /* synthetic */ Unit invoke(String str) {
            invoke(str);
            return Unit.INSTANCE;
        }

        public final void invoke(String str) {
            Intrinsics.checkNotNullParameter(str, "status");
            this.f138755a.a(t50.c.f132459d.b(MapsKt__MapsKt.hashMapOf(TuplesKt.to("status", str))));
            tu2.b m14 = this.f138756b.m();
            if (m14 != null) {
                ru2.d.f127247a.E(m14);
            }
        }
    }

    @Metadata(d1 = {"\u0000\u000e\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0003H\n¢\u0006\u0002\b\u0004"}, d2 = {"<anonymous>", "", AdvanceSetting.NETWORK_TYPE, "", "invoke"}, k = 3, mv = {1, 6, 0}, xi = 48)
    /* compiled from: XhsFetchFileHorizonBridge.kt */
    public static final class h extends Lambda implements Function1<String, Unit> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ t50.a f138757a;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public h(t50.a aVar) {
            super(1);
            this.f138757a = aVar;
        }

        /* 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 // kotlin.jvm.functions.Function1
        public /* bridge */ /* synthetic */ Unit invoke(String str) {
            invoke(str);
            return Unit.INSTANCE;
        }

        public final void invoke(String str) {
            Intrinsics.checkNotNullParameter(str, AdvanceSetting.NETWORK_TYPE);
            this.f138757a.a(t50.c.f132459d.b(MapsKt__MapsKt.hashMapOf(TuplesKt.to("status", str))));
        }
    }

    @Override // t50.b
    public Map<String, Function2<HashMap<String, Object>, t50.a, Unit>> a() {
        return MapsKt__MapsKt.mapOf(TuplesKt.to("backgroundFetchFile", new c(this)), TuplesKt.to("queryBackgroundFetchFileStatus", new d(this)), TuplesKt.to("updateBackgroundFetchFileStatus", new e(this)));
    }

    @Override // t50.b
    public Map<String, Function1<HashMap<String, Object>, t50.c>> c() {
        return MapsKt__MapsJVMKt.mapOf(TuplesKt.to("openDownloadedFile", new f(this)));
    }

    @Override // t50.b
    public void e(int i10, int i14, Intent intent) {
        super.e(i10, i14, intent);
        if (i10 == 10901) {
            ru2.d.f127247a.z(i14 == -1);
        }
    }

    @Override // uu2.a, t50.b
    public void g() {
        tu2.b bVar = this.f138752b;
        if (bVar != null) {
            ru2.d.f127247a.O(bVar);
        }
        this.f138752b = null;
    }

    @Override // uu2.a
    public List<String> h() {
        return CollectionsKt__CollectionsKt.listOf((Object[]) new String[]{"backgroundFetchFile", "queryBackgroundFetchFileStatus", "updateBackgroundFetchFileStatus", "openDownloadedFile"});
    }

    /* JADX WARNING: Removed duplicated region for block: B:15:0x0054  */
    /* JADX WARNING: Removed duplicated region for block: B:22:0x0076  */
    /* JADX WARNING: Removed duplicated region for block: B:23:0x007b  */
    /* JADX WARNING: Removed duplicated region for block: B:30:0x00a5  */
    /* JADX WARNING: Removed duplicated region for block: B:31:0x00a7  */
    /* JADX WARNING: Removed duplicated region for block: B:34:0x00ae  */
    /* JADX WARNING: Removed duplicated region for block: B:35:0x00c6  */
    /* JADX WARNING: Removed duplicated region for block: B:44:0x0026 A[SYNTHETIC] */
    public final void l(HashMap<String, Object> hashMap, t50.a aVar) {
        List list;
        boolean z14;
        String str = (String) hashMap.get("url");
        if (str == null) {
            str = "";
        }
        LinkedTreeMap linkedTreeMap = (LinkedTreeMap) hashMap.get(SharePluginInfo.ISSUE_CPU_USAGE);
        if (linkedTreeMap != null) {
            LinkedHashMap linkedHashMap = new LinkedHashMap();
            for (Map.Entry entry : linkedTreeMap.entrySet()) {
                if (ArraysKt___ArraysKt.contains(this.f138753c, entry.getKey())) {
                    Object value = entry.getValue();
                    Intrinsics.checkNotNullExpressionValue(value, "entry.value");
                    if (((Boolean) value).booleanValue()) {
                        z14 = true;
                        if (!z14) {
                            linkedHashMap.put(entry.getKey(), entry.getValue());
                        }
                    }
                }
                z14 = false;
                if (!z14) {
                }
            }
            Set keySet = linkedHashMap.keySet();
            if (keySet != null) {
                list = CollectionsKt___CollectionsKt.toList(keySet);
                Boolean bool = (Boolean) hashMap.get("openWhenFinished");
                boolean booleanValue = bool == null ? bool.booleanValue() : false;
                if (linkedTreeMap == null || (r1 = (Boolean) linkedTreeMap.get("showInAlbum")) == null) {
                    Boolean bool2 = Boolean.FALSE;
                }
                tu2.e eVar = new tu2.e(str, (String) hashMap.get(TbsVideoCacheTask.KEY_VIDEO_CACHE_PARAM_FILENAME), list, Boolean.valueOf(bool2.booleanValue()));
                if (!(str.length() != 0)) {
                    aVar.a(new t50.c(-1, MapsKt__MapsKt.hashMapOf(TuplesKt.to("status", "none")), "url is null"));
                    return;
                }
                ru2.d dVar = ru2.d.f127247a;
                if (!dVar.v()) {
                    ru2.d.G(dVar, null, null, 3, null);
                    aVar.a(new t50.c(-20001, MapsKt__MapsKt.hashMapOf(TuplesKt.to("status", "none")), "no permission"));
                    return;
                } else if (dVar.y()) {
                    aVar.a(new t50.c(-20002, MapsKt__MapsKt.hashMapOf(TuplesKt.to("status", "none")), "no network"));
                    return;
                } else {
                    dVar.q(eVar, booleanValue, new b(aVar));
                    return;
                }
            }
        }
        list = null;
        Boolean bool3 = (Boolean) hashMap.get("openWhenFinished");
        if (bool3 == null) {
        }
        Boolean bool22 = Boolean.FALSE;
        tu2.e eVar2 = new tu2.e(str, (String) hashMap.get(TbsVideoCacheTask.KEY_VIDEO_CACHE_PARAM_FILENAME), list, Boolean.valueOf(bool22.booleanValue()));
        if (!(str.length() != 0)) {
        }
    }

    public final tu2.b m() {
        return this.f138752b;
    }

    public final void n(tu2.b bVar) {
        this.f138752b = bVar;
    }

    public final t50.c o(HashMap<String, Object> hashMap) {
        Intrinsics.checkNotNullParameter(hashMap, "args");
        String str = (String) hashMap.get("url");
        if (str == null) {
            str = "";
        }
        if (str.length() == 0) {
            return new t50.c(-1, MapsKt__MapsKt.hashMapOf(TuplesKt.to("status", "none")), "url is null");
        }
        return t50.c.f132459d.b(MapsKt__MapsKt.hashMapOf(TuplesKt.to("status", Boolean.valueOf(ru2.d.f127247a.A(str)))));
    }

    public final void p(HashMap<String, Object> hashMap, t50.a aVar) {
        String str = (String) hashMap.get("url");
        if (str == null) {
            str = "";
        }
        if (str.length() == 0) {
            aVar.a(new t50.c(-1, MapsKt__MapsKt.hashMapOf(TuplesKt.to("status", "none")), "url is null"));
        }
        ru2.d.f127247a.D(str, new C2278g(aVar, this));
    }

    public final void q(HashMap<String, Object> hashMap, t50.a aVar) {
        String str = (String) hashMap.get("url");
        String str2 = "";
        if (str == null) {
            str = str2;
        }
        String str3 = (String) hashMap.get("status");
        if (str3 != null) {
            str2 = str3;
        }
        if (str.length() == 0) {
            aVar.a(new t50.c(-1, MapsKt__MapsKt.hashMapOf(TuplesKt.to("status", "none")), "url is null"));
        }
        ru2.d.f127247a.P(str, str2, new h(aVar));
    }
}